@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,4 +1,4 @@
1
- "use strict";const D=require("./ElementBase-EV6mVBUV.js");require("./ui-icon-BzVNC_lr.js");const F=`
1
+ "use strict";const P=require("./ElementBase-DxbvhLJs.js");require("./ui-icon-D3avtxX_.js");const I=`
2
2
  :host {
3
3
  --ui-btn-radius: var(--ui-control-radius, var(--ui-radius, 4px));
4
4
  --ui-btn-min-height: var(--ui-control-min-height, var(--base-button-height-md, 40px));
@@ -17,7 +17,7 @@
17
17
  --ui-btn-surface: var(--ui-color-surface, #ffffff);
18
18
  --ui-btn-surface-alt: var(--ui-color-surface-alt, #f8fafc);
19
19
  --ui-btn-text: var(--ui-color-text, #0f172a);
20
- --ui-btn-muted: var(--ui-color-muted, #64748b);
20
+ --ui-btn-muted: var(--ui-color-muted, #526175);
21
21
  --ui-btn-ring: var(--ui-color-focus-ring, #2563eb);
22
22
 
23
23
  display: inline-flex;
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  :host([tone="neutral"]) {
36
- --ui-btn-accent: color-mix(in srgb, var(--ui-color-muted, #64748b) 74%, var(--ui-color-text, #0f172a) 26%);
36
+ --ui-btn-accent: color-mix(in srgb, var(--ui-color-muted, #526175) 74%, var(--ui-color-text, #0f172a) 26%);
37
37
  }
38
38
 
39
39
  :host([tone="info"]) {
@@ -41,11 +41,11 @@
41
41
  }
42
42
 
43
43
  :host([tone="success"]) {
44
- --ui-btn-accent: var(--ui-color-success, #16a34a);
44
+ --ui-btn-accent: var(--ui-color-success, #15803d);
45
45
  }
46
46
 
47
47
  :host([tone="warning"]) {
48
- --ui-btn-accent: var(--ui-color-warning, #d97706);
48
+ --ui-btn-accent: var(--ui-color-warning, #b45309);
49
49
  }
50
50
 
51
51
  :host([tone="danger"]) {
@@ -57,7 +57,7 @@
57
57
  }
58
58
 
59
59
  :host([state="success"]) {
60
- --ui-btn-accent: var(--ui-color-success, #16a34a);
60
+ --ui-btn-accent: var(--ui-color-success, #15803d);
61
61
  }
62
62
 
63
63
  :host([theme="dark"]) {
@@ -85,8 +85,8 @@
85
85
  }
86
86
 
87
87
  :host([recipe="soft"]) {
88
- --ui-btn-surface: color-mix(in srgb, var(--ui-btn-accent) 10%, white);
89
- --ui-btn-surface-alt: color-mix(in srgb, var(--ui-btn-accent) 14%, white);
88
+ --ui-btn-surface: color-mix(in srgb, var(--ui-btn-accent) 10%, var(--ui-color-surface, #ffffff));
89
+ --ui-btn-surface-alt: color-mix(in srgb, var(--ui-btn-accent) 14%, var(--ui-color-surface, #ffffff));
90
90
  }
91
91
 
92
92
  :host([recipe="soft"]) .btn--secondary {
@@ -229,7 +229,8 @@
229
229
 
230
230
  .btn--primary {
231
231
  background: var(--ui-btn-accent);
232
- color: #ffffff;
232
+ /* The theme's text colour for a primary fill: the default theme's amber needs dark text. */
233
+ color: var(--ui-color-foreground-on-primary, #ffffff);
233
234
  border-color: color-mix(in srgb, var(--ui-btn-accent) 74%, #0f172a 26%);
234
235
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-btn-accent) 22%, transparent);
235
236
  }
@@ -240,7 +241,7 @@
240
241
 
241
242
  .btn--secondary {
242
243
  background: var(--ui-btn-surface);
243
- color: color-mix(in srgb, var(--ui-btn-accent) 78%, var(--ui-btn-text) 22%);
244
+ color: color-mix(in srgb, var(--ui-btn-accent) 50%, var(--ui-btn-text) 50%);
244
245
  border-color: color-mix(in srgb, var(--ui-btn-accent) 22%, var(--ui-btn-muted));
245
246
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
246
247
  }
@@ -251,7 +252,7 @@
251
252
 
252
253
  .btn--ghost {
253
254
  background: transparent;
254
- color: color-mix(in srgb, var(--ui-btn-accent) 80%, var(--ui-btn-text) 20%);
255
+ color: color-mix(in srgb, var(--ui-btn-accent) 50%, var(--ui-btn-text) 50%);
255
256
  border-color: transparent;
256
257
  box-shadow: none;
257
258
  }
@@ -272,25 +273,25 @@
272
273
  }
273
274
 
274
275
  .btn--success {
275
- background: var(--ui-color-success, #16a34a);
276
+ background: var(--ui-color-success, #15803d);
276
277
  color: #ffffff;
277
- border-color: color-mix(in srgb, var(--ui-color-success, #16a34a) 70%, #0f172a 30%);
278
- box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-success, #16a34a) 20%, transparent);
278
+ border-color: color-mix(in srgb, var(--ui-color-success, #15803d) 70%, #0f172a 30%);
279
+ box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-success, #15803d) 20%, transparent);
279
280
  }
280
281
 
281
282
  .btn--success:hover:not([disabled]) {
282
- background: color-mix(in srgb, var(--ui-color-success, #16a34a) 86%, #0f172a 14%);
283
+ background: color-mix(in srgb, var(--ui-color-success, #15803d) 86%, #0f172a 14%);
283
284
  }
284
285
 
285
286
  .btn--warning {
286
- background: var(--ui-color-warning, #d97706);
287
+ background: var(--ui-color-warning, #b45309);
287
288
  color: #ffffff;
288
- border-color: color-mix(in srgb, var(--ui-color-warning, #d97706) 70%, #0f172a 30%);
289
- box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-warning, #d97706) 18%, transparent);
289
+ border-color: color-mix(in srgb, var(--ui-color-warning, #b45309) 70%, #0f172a 30%);
290
+ box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-warning, #b45309) 18%, transparent);
290
291
  }
291
292
 
292
293
  .btn--warning:hover:not([disabled]) {
293
- background: color-mix(in srgb, var(--ui-color-warning, #d97706) 86%, #0f172a 14%);
294
+ background: color-mix(in srgb, var(--ui-color-warning, #b45309) 86%, #0f172a 14%);
294
295
  }
295
296
 
296
297
  :host([size="sm"]) {
@@ -318,7 +319,7 @@
318
319
  }
319
320
 
320
321
  :host([state="success"]) .btn:not([disabled]) {
321
- box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-color-success, #16a34a) 30%, transparent), 0 8px 18px rgba(22, 163, 74, 0.14);
322
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-color-success, #15803d) 30%, transparent), 0 8px 18px rgba(22, 163, 74, 0.14);
322
323
  }
323
324
 
324
325
  :host([data-animation]) .btn:not([disabled]):hover {
@@ -501,21 +502,21 @@
501
502
  color: HighlightText;
502
503
  }
503
504
  }
504
- `;function _(t){return t!==null&&t.toLowerCase()!=="false"&&t!=="0"}function I(t){return t==="secondary"||t==="ghost"||t==="danger"||t==="success"||t==="warning"?t:"primary"}function U(t){return t==="sm"||t==="lg"?t:"md"}function S(t){return t==="scale"||t==="pulse"||t==="none"?t:null}function N(t){return t==="neutral"||t==="info"||t==="success"||t==="warning"||t==="danger"?t:null}function G(t){return t==="loading"||t==="error"||t==="success"?t:"idle"}function $(t){return t==="submit"||t==="reset"?t:"button"}function J(t){return t==="classic"||t==="solid"||t==="soft"||t==="surface"||t==="outline"||t==="ghost"?t:null}function K(t){return t==="none"||t==="sm"||t==="md"||t==="lg"||t==="full"?t:null}function Q(t){return t==="1"||t==="2"||t==="3"||t==="4"?t:null}function V(t){if(!t)return null;const n=t.trim();return n?n==="full"?"999px":/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n:null}function r(t,n){const e=t.getAttribute(n);if(e!=null)return e;const i=t[n];return typeof i=="string"&&i.length>0?i:null}function c(t,n){const e=t.getAttribute(n);if(e!=null)return _(e);const i=t[n];return typeof i=="boolean"?i:typeof i=="string"?_(i):!1}function u(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function L(t,n){return!!t.querySelector(`[slot="${n}"]`)}function W(t,n){if(n==="button")return;const e=t.closest("form");if(!e)return;if(n==="reset"){e.reset();return}if(typeof e.requestSubmit=="function"){e.requestSubmit();return}const i=new Event("submit",{bubbles:!0,cancelable:!0});e.dispatchEvent(i)}class E extends D.ElementBase{constructor(){super(),this._slots=[],this._contentObserver=null,this._onRootClick=this._onRootClick.bind(this),this._onSlotChange=this._onSlotChange.bind(this),this._onContentMutations=this._onContentMutations.bind(this)}static get observedAttributes(){return["disabled","variant","size","headless","loading","icon","block","animation","theme","tone","state","type","recipe","shape","radius","scale","loading-label","aria-label"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onRootClick),this._contentObserver=new MutationObserver(this._onContentMutations),this._contentObserver.observe(this,{childList:!0,subtree:!1,characterData:!0})}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClick),this._contentObserver?.disconnect(),this._contentObserver=null,this._detachSlotListeners(),super.disconnectedCallback()}attributeChangedCallback(n,e,i){if(e!==i){if(n==="animation"){const o=S(i);o?this.setAttribute("data-animation",o):this.removeAttribute("data-animation")}this.isConnected&&this.requestRender()}}_onRootClick(n){const i=n.target?.closest('button[data-ui-button="true"]');if(!i||i.disabled)return;const o=$(i.getAttribute("data-request-type"));queueMicrotask(()=>{n.defaultPrevented||W(this,o)})}_attachSlotListeners(){this._detachSlotListeners(),this._slots=Array.from(this.root.querySelectorAll("slot")),this._slots.forEach(n=>n.addEventListener("slotchange",this._onSlotChange))}_detachSlotListeners(){this._slots.forEach(n=>n.removeEventListener("slotchange",this._onSlotChange)),this._slots=[]}_onSlotChange(){this.requestRender()}_onContentMutations(){this.requestRender()}render(){const n=c(this,"disabled"),e=c(this,"loading"),i=r(this,"state"),o=G(i),s=e||o==="loading",l=r(this,"icon"),q=I(r(this,"variant")),b=r(this,"size"),d=U(b),h=S(r(this,"animation")),a=r(this,"theme"),p=a==="dark"||a==="brand"?a:null,f=r(this,"tone"),g=N(f),R=c(this,"block"),T=c(this,"headless"),M=$(r(this,"type")),m=J(r(this,"recipe")),x=r(this,"shape"),v=K(x),B=r(this,"radius"),y=V(B),w=Q(r(this,"scale")),k=r(this,"aria-label"),j=r(this,"loading-label")||"Loading";h?this.setAttribute("data-animation",h):this.removeAttribute("data-animation"),R?this.setAttribute("block",""):this.removeAttribute("block"),T?this.setAttribute("headless",""):this.removeAttribute("headless"),f!=null&&(g?this.setAttribute("tone",g):this.removeAttribute("tone")),b!=null&&(d==="md"?this.removeAttribute("size"):this.setAttribute("size",d)),a!=null&&(p?this.setAttribute("theme",p):this.removeAttribute("theme")),i!=null&&(o==="idle"?this.removeAttribute("state"):this.setAttribute("state",o)),m?this.setAttribute("recipe",m):this.removeAttribute("recipe"),x!=null&&(v?this.setAttribute("shape",v):this.removeAttribute("shape")),y?this.style.setProperty("--ui-btn-radius",y):this.style.removeProperty("--ui-btn-radius"),w?this.setAttribute("scale",w):this.removeAttribute("scale");const z=n||s;z?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"),s?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy");const H=L(this,"prefix"),O=L(this,"suffix"),A=!s&&l?`<ui-icon class="icon" name="${u(l)}" aria-hidden="true"></ui-icon>`:"",C=s?'<span class="spinner" aria-hidden="true" part="spinner"></span>':"",Y=C||A||H?`<span class="slot slot--prefix" part="prefix">${C}${A}${s?"":'<slot name="prefix"></slot>'}</span>`:"",P=O?'<span class="slot slot--suffix" part="suffix"><slot name="suffix"></slot></span>':"";this.setContent(`
505
- <style>${F}</style>
505
+ `;function S(t){return t!==null&&t.toLowerCase()!=="false"&&t!=="0"}function U(t){return t==="secondary"||t==="ghost"||t==="danger"||t==="success"||t==="warning"?t:"primary"}function N(t){return t==="sm"||t==="lg"?t:"md"}function C(t){return t==="scale"||t==="pulse"||t==="none"?t:null}function W(t){return t==="neutral"||t==="info"||t==="success"||t==="warning"||t==="danger"?t:null}function G(t){return t==="loading"||t==="error"||t==="success"?t:"idle"}function $(t){return t==="submit"||t==="reset"?t:"button"}function J(t){return t==="classic"||t==="solid"||t==="soft"||t==="surface"||t==="outline"||t==="ghost"?t:null}function K(t){return t==="none"||t==="sm"||t==="md"||t==="lg"||t==="full"?t:null}function Q(t){return t==="1"||t==="2"||t==="3"||t==="4"?t:null}function V(t){if(!t)return null;const n=t.trim();return n?n==="full"?"999px":/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n:null}function r(t,n){const e=t.getAttribute(n);if(e!=null)return e;const i=t[n];return typeof i=="string"&&i.length>0?i:null}function c(t,n){const e=t.getAttribute(n);if(e!=null)return S(e);const i=t[n];return typeof i=="boolean"?i:typeof i=="string"?S(i):!1}function u(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function E(t,n){return!!t.querySelector(`[slot="${n}"]`)}function X(t,n){if(n==="button")return;const e=t.closest("form");if(!e){const o=t.closest("ui-form");n==="reset"?o?.reset?.():o?.requestSubmit?.();return}if(n==="reset"){e.reset();return}if(typeof e.requestSubmit=="function"){e.requestSubmit();return}const i=new Event("submit",{bubbles:!0,cancelable:!0});e.dispatchEvent(i)}const T=["aria-expanded","aria-haspopup","aria-pressed"];class q extends P.ElementBase{constructor(){super(),this._slots=[],this._contentObserver=null,this._onRootClick=this._onRootClick.bind(this),this._onSlotChange=this._onSlotChange.bind(this),this._onContentMutations=this._onContentMutations.bind(this)}static get observedAttributes(){return["disabled","variant","size","headless","loading","icon","block","animation","theme","tone","state","type","recipe","shape","radius","scale","loading-label","aria-label","aria-expanded","aria-haspopup","aria-pressed"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onRootClick),this._contentObserver=new MutationObserver(this._onContentMutations),this._contentObserver.observe(this,{childList:!0,subtree:!1,characterData:!0})}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClick),this._contentObserver?.disconnect(),this._contentObserver=null,this._detachSlotListeners(),super.disconnectedCallback()}attributeChangedCallback(n,e,i){if(e!==i){if(n==="animation"){const o=C(i);o?this.setAttribute("data-animation",o):this.removeAttribute("data-animation")}if(T.includes(n)){this._syncForwardedState();return}this.isConnected&&this.requestRender()}}_syncForwardedState(){const n=this.root.querySelector('button[data-ui-button="true"]');if(n)for(const e of T){const i=this.getAttribute(e);i==null||i===""?n.removeAttribute(e):n.getAttribute(e)!==i&&n.setAttribute(e,i)}}_onRootClick(n){const i=n.target?.closest('button[data-ui-button="true"]');if(!i||i.disabled)return;const o=$(i.getAttribute("data-request-type"));queueMicrotask(()=>{n.defaultPrevented||X(this,o)})}_attachSlotListeners(){this._detachSlotListeners(),this._slots=Array.from(this.root.querySelectorAll("slot")),this._slots.forEach(n=>n.addEventListener("slotchange",this._onSlotChange))}_detachSlotListeners(){this._slots.forEach(n=>n.removeEventListener("slotchange",this._onSlotChange)),this._slots=[]}_onSlotChange(){this.requestRender()}_onContentMutations(){this.requestRender()}render(){const n=c(this,"disabled"),e=c(this,"loading"),i=r(this,"state"),o=G(i),s=e||o==="loading",l=r(this,"icon"),L=U(r(this,"variant")),b=r(this,"size"),d=N(b),h=C(r(this,"animation")),a=r(this,"theme"),f=a==="dark"||a==="brand"?a:null,p=r(this,"tone"),g=W(p),R=c(this,"block"),M=c(this,"headless"),B=$(r(this,"type")),m=J(r(this,"recipe")),x=r(this,"shape"),v=K(x),F=r(this,"radius"),y=V(F),w=Q(r(this,"scale")),k=r(this,"aria-label"),O=r(this,"loading-label")||"Loading";h?this.setAttribute("data-animation",h):this.removeAttribute("data-animation"),R?this.setAttribute("block",""):this.removeAttribute("block"),M?this.setAttribute("headless",""):this.removeAttribute("headless"),p!=null&&(g?this.setAttribute("tone",g):this.removeAttribute("tone")),b!=null&&(d==="md"?this.removeAttribute("size"):this.setAttribute("size",d)),a!=null&&(f?this.setAttribute("theme",f):this.removeAttribute("theme")),i!=null&&(o==="idle"?this.removeAttribute("state"):this.setAttribute("state",o)),m?this.setAttribute("recipe",m):this.removeAttribute("recipe"),x!=null&&(v?this.setAttribute("shape",v):this.removeAttribute("shape")),y?this.style.setProperty("--ui-btn-radius",y):this.style.removeProperty("--ui-btn-radius"),w?this.setAttribute("scale",w):this.removeAttribute("scale");const A=n||s;A?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"),s?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy");const j=E(this,"prefix"),H=E(this,"suffix"),z=!s&&l?`<ui-icon class="icon" name="${u(l)}" aria-hidden="true"></ui-icon>`:"",_=s?'<span class="spinner" aria-hidden="true" part="spinner"></span>':"",Y=_||z||j?`<span class="slot slot--prefix" part="prefix">${_}${z}${s?"":'<slot name="prefix"></slot>'}</span>`:"",D=H?'<span class="slot slot--suffix" part="suffix"><slot name="suffix"></slot></span>':"";this.setContent(`
506
+ <style>${I}</style>
506
507
  <button
507
- class="btn btn--${q}"
508
+ class="btn btn--${L}"
508
509
  part="button"
509
510
  type="button"
510
511
  data-ui-button="true"
511
- data-request-type="${M}"
512
+ data-request-type="${B}"
512
513
  aria-busy="${s?"true":"false"}"
513
514
  ${k?`aria-label="${u(k)}"`:""}
514
- ${z?"disabled":""}
515
+ ${A?"disabled":""}
515
516
  >
516
517
  ${Y}
517
518
  <span class="slot slot--label" part="label"><slot></slot></span>
518
- ${P}
519
- ${s?`<span class="sr-only">${u(j)}</span>`:""}
519
+ ${D}
520
+ ${s?`<span class="sr-only">${u(O)}</span>`:""}
520
521
  </button>
521
- `),this._attachSlotListeners()}}typeof customElements<"u"&&!customElements.get("ui-button")&&customElements.define("ui-button",E);exports.UIButton=E;
522
+ `),this._syncForwardedState(),this._attachSlotListeners()}}typeof customElements<"u"&&!customElements.get("ui-button")&&customElements.define("ui-button",q);exports.UIButton=q;
@@ -1,6 +1,6 @@
1
- import { E as P } from "./ElementBase-YlTLMsGk.mjs";
2
- import "./ui-icon-YI6lyuqU.mjs";
3
- const D = `
1
+ import { E as D } from "./ElementBase-BeZT54Hj.mjs";
2
+ import "./ui-icon-DLhB08Fo.mjs";
3
+ const P = `
4
4
  :host {
5
5
  --ui-btn-radius: var(--ui-control-radius, var(--ui-radius, 4px));
6
6
  --ui-btn-min-height: var(--ui-control-min-height, var(--base-button-height-md, 40px));
@@ -19,7 +19,7 @@ const D = `
19
19
  --ui-btn-surface: var(--ui-color-surface, #ffffff);
20
20
  --ui-btn-surface-alt: var(--ui-color-surface-alt, #f8fafc);
21
21
  --ui-btn-text: var(--ui-color-text, #0f172a);
22
- --ui-btn-muted: var(--ui-color-muted, #64748b);
22
+ --ui-btn-muted: var(--ui-color-muted, #526175);
23
23
  --ui-btn-ring: var(--ui-color-focus-ring, #2563eb);
24
24
 
25
25
  display: inline-flex;
@@ -35,7 +35,7 @@ const D = `
35
35
  }
36
36
 
37
37
  :host([tone="neutral"]) {
38
- --ui-btn-accent: color-mix(in srgb, var(--ui-color-muted, #64748b) 74%, var(--ui-color-text, #0f172a) 26%);
38
+ --ui-btn-accent: color-mix(in srgb, var(--ui-color-muted, #526175) 74%, var(--ui-color-text, #0f172a) 26%);
39
39
  }
40
40
 
41
41
  :host([tone="info"]) {
@@ -43,11 +43,11 @@ const D = `
43
43
  }
44
44
 
45
45
  :host([tone="success"]) {
46
- --ui-btn-accent: var(--ui-color-success, #16a34a);
46
+ --ui-btn-accent: var(--ui-color-success, #15803d);
47
47
  }
48
48
 
49
49
  :host([tone="warning"]) {
50
- --ui-btn-accent: var(--ui-color-warning, #d97706);
50
+ --ui-btn-accent: var(--ui-color-warning, #b45309);
51
51
  }
52
52
 
53
53
  :host([tone="danger"]) {
@@ -59,7 +59,7 @@ const D = `
59
59
  }
60
60
 
61
61
  :host([state="success"]) {
62
- --ui-btn-accent: var(--ui-color-success, #16a34a);
62
+ --ui-btn-accent: var(--ui-color-success, #15803d);
63
63
  }
64
64
 
65
65
  :host([theme="dark"]) {
@@ -87,8 +87,8 @@ const D = `
87
87
  }
88
88
 
89
89
  :host([recipe="soft"]) {
90
- --ui-btn-surface: color-mix(in srgb, var(--ui-btn-accent) 10%, white);
91
- --ui-btn-surface-alt: color-mix(in srgb, var(--ui-btn-accent) 14%, white);
90
+ --ui-btn-surface: color-mix(in srgb, var(--ui-btn-accent) 10%, var(--ui-color-surface, #ffffff));
91
+ --ui-btn-surface-alt: color-mix(in srgb, var(--ui-btn-accent) 14%, var(--ui-color-surface, #ffffff));
92
92
  }
93
93
 
94
94
  :host([recipe="soft"]) .btn--secondary {
@@ -231,7 +231,8 @@ const D = `
231
231
 
232
232
  .btn--primary {
233
233
  background: var(--ui-btn-accent);
234
- color: #ffffff;
234
+ /* The theme's text colour for a primary fill: the default theme's amber needs dark text. */
235
+ color: var(--ui-color-foreground-on-primary, #ffffff);
235
236
  border-color: color-mix(in srgb, var(--ui-btn-accent) 74%, #0f172a 26%);
236
237
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-btn-accent) 22%, transparent);
237
238
  }
@@ -242,7 +243,7 @@ const D = `
242
243
 
243
244
  .btn--secondary {
244
245
  background: var(--ui-btn-surface);
245
- color: color-mix(in srgb, var(--ui-btn-accent) 78%, var(--ui-btn-text) 22%);
246
+ color: color-mix(in srgb, var(--ui-btn-accent) 50%, var(--ui-btn-text) 50%);
246
247
  border-color: color-mix(in srgb, var(--ui-btn-accent) 22%, var(--ui-btn-muted));
247
248
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
248
249
  }
@@ -253,7 +254,7 @@ const D = `
253
254
 
254
255
  .btn--ghost {
255
256
  background: transparent;
256
- color: color-mix(in srgb, var(--ui-btn-accent) 80%, var(--ui-btn-text) 20%);
257
+ color: color-mix(in srgb, var(--ui-btn-accent) 50%, var(--ui-btn-text) 50%);
257
258
  border-color: transparent;
258
259
  box-shadow: none;
259
260
  }
@@ -274,25 +275,25 @@ const D = `
274
275
  }
275
276
 
276
277
  .btn--success {
277
- background: var(--ui-color-success, #16a34a);
278
+ background: var(--ui-color-success, #15803d);
278
279
  color: #ffffff;
279
- border-color: color-mix(in srgb, var(--ui-color-success, #16a34a) 70%, #0f172a 30%);
280
- box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-success, #16a34a) 20%, transparent);
280
+ border-color: color-mix(in srgb, var(--ui-color-success, #15803d) 70%, #0f172a 30%);
281
+ box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-success, #15803d) 20%, transparent);
281
282
  }
282
283
 
283
284
  .btn--success:hover:not([disabled]) {
284
- background: color-mix(in srgb, var(--ui-color-success, #16a34a) 86%, #0f172a 14%);
285
+ background: color-mix(in srgb, var(--ui-color-success, #15803d) 86%, #0f172a 14%);
285
286
  }
286
287
 
287
288
  .btn--warning {
288
- background: var(--ui-color-warning, #d97706);
289
+ background: var(--ui-color-warning, #b45309);
289
290
  color: #ffffff;
290
- border-color: color-mix(in srgb, var(--ui-color-warning, #d97706) 70%, #0f172a 30%);
291
- box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-warning, #d97706) 18%, transparent);
291
+ border-color: color-mix(in srgb, var(--ui-color-warning, #b45309) 70%, #0f172a 30%);
292
+ box-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 8px 18px color-mix(in srgb, var(--ui-color-warning, #b45309) 18%, transparent);
292
293
  }
293
294
 
294
295
  .btn--warning:hover:not([disabled]) {
295
- background: color-mix(in srgb, var(--ui-color-warning, #d97706) 86%, #0f172a 14%);
296
+ background: color-mix(in srgb, var(--ui-color-warning, #b45309) 86%, #0f172a 14%);
296
297
  }
297
298
 
298
299
  :host([size="sm"]) {
@@ -320,7 +321,7 @@ const D = `
320
321
  }
321
322
 
322
323
  :host([state="success"]) .btn:not([disabled]) {
323
- box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-color-success, #16a34a) 30%, transparent), 0 8px 18px rgba(22, 163, 74, 0.14);
324
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-color-success, #15803d) 30%, transparent), 0 8px 18px rgba(22, 163, 74, 0.14);
324
325
  }
325
326
 
326
327
  :host([data-animation]) .btn:not([disabled]):hover {
@@ -504,22 +505,22 @@ const D = `
504
505
  }
505
506
  }
506
507
  `;
507
- function _(t) {
508
+ function S(t) {
508
509
  return t !== null && t.toLowerCase() !== "false" && t !== "0";
509
510
  }
510
- function F(t) {
511
+ function U(t) {
511
512
  return t === "secondary" || t === "ghost" || t === "danger" || t === "success" || t === "warning" ? t : "primary";
512
513
  }
513
- function U(t) {
514
+ function I(t) {
514
515
  return t === "sm" || t === "lg" ? t : "md";
515
516
  }
516
- function S(t) {
517
+ function C(t) {
517
518
  return t === "scale" || t === "pulse" || t === "none" ? t : null;
518
519
  }
519
- function I(t) {
520
+ function N(t) {
520
521
  return t === "neutral" || t === "info" || t === "success" || t === "warning" || t === "danger" ? t : null;
521
522
  }
522
- function N(t) {
523
+ function W(t) {
523
524
  return t === "loading" || t === "error" || t === "success" ? t : "idle";
524
525
  }
525
526
  function $(t) {
@@ -547,20 +548,24 @@ function r(t, n) {
547
548
  }
548
549
  function c(t, n) {
549
550
  const e = t.getAttribute(n);
550
- if (e != null) return _(e);
551
+ if (e != null) return S(e);
551
552
  const i = t[n];
552
- return typeof i == "boolean" ? i : typeof i == "string" ? _(i) : !1;
553
+ return typeof i == "boolean" ? i : typeof i == "string" ? S(i) : !1;
553
554
  }
554
555
  function u(t) {
555
556
  return t.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
556
557
  }
557
- function L(t, n) {
558
+ function E(t, n) {
558
559
  return !!t.querySelector(`[slot="${n}"]`);
559
560
  }
560
561
  function V(t, n) {
561
562
  if (n === "button") return;
562
563
  const e = t.closest("form");
563
- if (!e) return;
564
+ if (!e) {
565
+ const o = t.closest("ui-form");
566
+ n === "reset" ? o?.reset?.() : o?.requestSubmit?.();
567
+ return;
568
+ }
564
569
  if (n === "reset") {
565
570
  e.reset();
566
571
  return;
@@ -572,7 +577,8 @@ function V(t, n) {
572
577
  const i = new Event("submit", { bubbles: !0, cancelable: !0 });
573
578
  e.dispatchEvent(i);
574
579
  }
575
- class W extends P {
580
+ const T = ["aria-expanded", "aria-haspopup", "aria-pressed"];
581
+ class X extends D {
576
582
  constructor() {
577
583
  super(), this._slots = [], this._contentObserver = null, this._onRootClick = this._onRootClick.bind(this), this._onSlotChange = this._onSlotChange.bind(this), this._onContentMutations = this._onContentMutations.bind(this);
578
584
  }
@@ -595,7 +601,10 @@ class W extends P {
595
601
  "radius",
596
602
  "scale",
597
603
  "loading-label",
598
- "aria-label"
604
+ "aria-label",
605
+ "aria-expanded",
606
+ "aria-haspopup",
607
+ "aria-pressed"
599
608
  ];
600
609
  }
601
610
  connectedCallback() {
@@ -607,12 +616,24 @@ class W extends P {
607
616
  attributeChangedCallback(n, e, i) {
608
617
  if (e !== i) {
609
618
  if (n === "animation") {
610
- const o = S(i);
619
+ const o = C(i);
611
620
  o ? this.setAttribute("data-animation", o) : this.removeAttribute("data-animation");
612
621
  }
622
+ if (T.includes(n)) {
623
+ this._syncForwardedState();
624
+ return;
625
+ }
613
626
  this.isConnected && this.requestRender();
614
627
  }
615
628
  }
629
+ _syncForwardedState() {
630
+ const n = this.root.querySelector('button[data-ui-button="true"]');
631
+ if (n)
632
+ for (const e of T) {
633
+ const i = this.getAttribute(e);
634
+ i == null || i === "" ? n.removeAttribute(e) : n.getAttribute(e) !== i && n.setAttribute(e, i);
635
+ }
636
+ }
616
637
  _onRootClick(n) {
617
638
  const i = n.target?.closest('button[data-ui-button="true"]');
618
639
  if (!i || i.disabled) return;
@@ -634,32 +655,32 @@ class W extends P {
634
655
  this.requestRender();
635
656
  }
636
657
  render() {
637
- const n = c(this, "disabled"), e = c(this, "loading"), i = r(this, "state"), o = N(i), s = e || o === "loading", l = r(this, "icon"), E = F(r(this, "variant")), b = r(this, "size"), d = U(b), h = S(r(this, "animation")), a = r(this, "theme"), p = a === "dark" || a === "brand" ? a : null, f = r(this, "tone"), g = I(f), q = c(this, "block"), R = c(this, "headless"), T = $(r(this, "type")), m = G(r(this, "recipe")), x = r(this, "shape"), v = J(x), M = r(this, "radius"), y = Q(M), w = K(r(this, "scale")), k = r(this, "aria-label"), B = r(this, "loading-label") || "Loading";
638
- h ? this.setAttribute("data-animation", h) : this.removeAttribute("data-animation"), q ? this.setAttribute("block", "") : this.removeAttribute("block"), R ? this.setAttribute("headless", "") : this.removeAttribute("headless"), f != null && (g ? this.setAttribute("tone", g) : this.removeAttribute("tone")), b != null && (d === "md" ? this.removeAttribute("size") : this.setAttribute("size", d)), a != null && (p ? this.setAttribute("theme", p) : this.removeAttribute("theme")), i != null && (o === "idle" ? this.removeAttribute("state") : this.setAttribute("state", o)), m ? this.setAttribute("recipe", m) : this.removeAttribute("recipe"), x != null && (v ? this.setAttribute("shape", v) : this.removeAttribute("shape")), y ? this.style.setProperty("--ui-btn-radius", y) : this.style.removeProperty("--ui-btn-radius"), w ? this.setAttribute("scale", w) : this.removeAttribute("scale");
639
- const z = n || s;
640
- z ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"), s ? this.setAttribute("aria-busy", "true") : this.removeAttribute("aria-busy");
641
- const j = L(this, "prefix"), H = L(this, "suffix"), A = !s && l ? `<ui-icon class="icon" name="${u(l)}" aria-hidden="true"></ui-icon>` : "", C = s ? '<span class="spinner" aria-hidden="true" part="spinner"></span>' : "", O = C || A || j ? `<span class="slot slot--prefix" part="prefix">${C}${A}${s ? "" : '<slot name="prefix"></slot>'}</span>` : "", Y = H ? '<span class="slot slot--suffix" part="suffix"><slot name="suffix"></slot></span>' : "";
658
+ const n = c(this, "disabled"), e = c(this, "loading"), i = r(this, "state"), o = W(i), s = e || o === "loading", l = r(this, "icon"), L = U(r(this, "variant")), b = r(this, "size"), d = I(b), h = C(r(this, "animation")), a = r(this, "theme"), f = a === "dark" || a === "brand" ? a : null, p = r(this, "tone"), g = N(p), R = c(this, "block"), q = c(this, "headless"), M = $(r(this, "type")), m = G(r(this, "recipe")), x = r(this, "shape"), v = J(x), B = r(this, "radius"), y = Q(B), w = K(r(this, "scale")), k = r(this, "aria-label"), F = r(this, "loading-label") || "Loading";
659
+ h ? this.setAttribute("data-animation", h) : this.removeAttribute("data-animation"), R ? this.setAttribute("block", "") : this.removeAttribute("block"), q ? this.setAttribute("headless", "") : this.removeAttribute("headless"), p != null && (g ? this.setAttribute("tone", g) : this.removeAttribute("tone")), b != null && (d === "md" ? this.removeAttribute("size") : this.setAttribute("size", d)), a != null && (f ? this.setAttribute("theme", f) : this.removeAttribute("theme")), i != null && (o === "idle" ? this.removeAttribute("state") : this.setAttribute("state", o)), m ? this.setAttribute("recipe", m) : this.removeAttribute("recipe"), x != null && (v ? this.setAttribute("shape", v) : this.removeAttribute("shape")), y ? this.style.setProperty("--ui-btn-radius", y) : this.style.removeProperty("--ui-btn-radius"), w ? this.setAttribute("scale", w) : this.removeAttribute("scale");
660
+ const A = n || s;
661
+ A ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"), s ? this.setAttribute("aria-busy", "true") : this.removeAttribute("aria-busy");
662
+ const O = E(this, "prefix"), j = E(this, "suffix"), z = !s && l ? `<ui-icon class="icon" name="${u(l)}" aria-hidden="true"></ui-icon>` : "", _ = s ? '<span class="spinner" aria-hidden="true" part="spinner"></span>' : "", H = _ || z || O ? `<span class="slot slot--prefix" part="prefix">${_}${z}${s ? "" : '<slot name="prefix"></slot>'}</span>` : "", Y = j ? '<span class="slot slot--suffix" part="suffix"><slot name="suffix"></slot></span>' : "";
642
663
  this.setContent(`
643
- <style>${D}</style>
664
+ <style>${P}</style>
644
665
  <button
645
- class="btn btn--${E}"
666
+ class="btn btn--${L}"
646
667
  part="button"
647
668
  type="button"
648
669
  data-ui-button="true"
649
- data-request-type="${T}"
670
+ data-request-type="${M}"
650
671
  aria-busy="${s ? "true" : "false"}"
651
672
  ${k ? `aria-label="${u(k)}"` : ""}
652
- ${z ? "disabled" : ""}
673
+ ${A ? "disabled" : ""}
653
674
  >
654
- ${O}
675
+ ${H}
655
676
  <span class="slot slot--label" part="label"><slot></slot></span>
656
677
  ${Y}
657
- ${s ? `<span class="sr-only">${u(B)}</span>` : ""}
678
+ ${s ? `<span class="sr-only">${u(F)}</span>` : ""}
658
679
  </button>
659
- `), this._attachSlotListeners();
680
+ `), this._syncForwardedState(), this._attachSlotListeners();
660
681
  }
661
682
  }
662
- typeof customElements < "u" && !customElements.get("ui-button") && customElements.define("ui-button", W);
683
+ typeof customElements < "u" && !customElements.get("ui-button") && customElements.define("ui-button", X);
663
684
  export {
664
- W as U
685
+ X as U
665
686
  };
@@ -1,4 +1,4 @@
1
- "use strict";const k=require("./ElementBase-EV6mVBUV.js"),l=require("@editora/icons"),a=new Map,d=new Map;function c(i){return String(i||"").trim().toLowerCase().replace(/\s+/g,"-").replace(/_/g,"-")}function y(i,e){if(!e)return`${i}::default`;const r=e.variant||"outline",t=e.iconWeight||"",n=e.secondaryColor||"",o=e.strokeWidth==null?"":String(e.strokeWidth),s=e.absoluteStrokeWidth?"1":"0",b=e.strokeLinecap||"",f=e.strokeLinejoin||"",m=e.rotate==null?"":String(e.rotate),v=e.flip||"",x=e.rtl?"1":"0";return[i,r,t,n,o,s,b,f,m,v,x].join("::")}function z(i,e){const r=c(i);r&&a.set(r,e)}function w(i){const e=c(i);e&&a.delete(e)}function C(){a.clear()}function I(i){const e=c(i);return e?a.has(e)?!0:l.hasIcon(e):!1}function A(i,e){return u(i,{variant:e})}function u(i,e){const r=c(i);if(!r)return"";const t=a.get(r);if(t)return t;if(!l.hasIcon(r))return"";const n=y(r,e),o=d.get(n);if(o)return o;const s=l.renderIconSvg(r,{variant:e?.variant||"outline",iconWeight:e?.iconWeight,secondaryColor:e?.secondaryColor,strokeWidth:e?.strokeWidth,absoluteStrokeWidth:e?.absoluteStrokeWidth,strokeLinecap:e?.strokeLinecap,strokeLinejoin:e?.strokeLinejoin,rotate:e?.rotate,flip:e?.flip,rtl:e?.rtl,color:"currentColor",decorative:!0});return s&&d.set(n,s),s}const W=`
1
+ "use strict";const k=require("./ElementBase-DxbvhLJs.js"),l=require("@editora/icons"),a=new Map,d=new Map;function c(i){return String(i||"").trim().toLowerCase().replace(/\s+/g,"-").replace(/_/g,"-")}function y(i,e){if(!e)return`${i}::default`;const r=e.variant||"outline",t=e.iconWeight||"",n=e.secondaryColor||"",o=e.strokeWidth==null?"":String(e.strokeWidth),s=e.absoluteStrokeWidth?"1":"0",g=e.strokeLinecap||"",f=e.strokeLinejoin||"",m=e.rotate==null?"":String(e.rotate),v=e.flip||"",x=e.rtl?"1":"0";return[i,r,t,n,o,s,g,f,m,v,x].join("::")}function z(i,e){const r=c(i);r&&a.set(r,e)}function w(i){const e=c(i);e&&a.delete(e)}function C(){a.clear()}function I(i){const e=c(i);return e?a.has(e)?!0:l.hasIcon(e):!1}function A(i,e){return u(i,{variant:e})}function u(i,e){const r=c(i);if(!r)return"";const t=a.get(r);if(t)return t;if(!l.hasIcon(r))return"";const n=y(r,e),o=d.get(n);if(o)return o;const s=l.renderIconSvg(r,{variant:e?.variant||"outline",iconWeight:e?.iconWeight,secondaryColor:e?.secondaryColor,strokeWidth:e?.strokeWidth,absoluteStrokeWidth:e?.absoluteStrokeWidth,strokeLinecap:e?.strokeLinecap,strokeLinejoin:e?.strokeLinejoin,rotate:e?.rotate,flip:e?.flip,rtl:e?.rtl,color:"currentColor",decorative:!0});return s&&d.set(n,s),s}const W=`
2
2
  :host {
3
3
  --ui-icon-size: 1em;
4
4
  --ui-icon-color: currentColor;
@@ -124,8 +124,8 @@
124
124
  }
125
125
 
126
126
  :host([tone="brand"]) { --ui-icon-color: var(--ui-color-primary, var(--ui-primary, #2563eb)); }
127
- :host([tone="success"]) { --ui-icon-color: var(--ui-color-success, var(--ui-success, #16a34a)); }
128
- :host([tone="warning"]) { --ui-icon-color: var(--ui-color-warning, var(--ui-warning, #d97706)); }
127
+ :host([tone="success"]) { --ui-icon-color: var(--ui-color-success, var(--ui-success, #15803d)); }
128
+ :host([tone="warning"]) { --ui-icon-color: var(--ui-color-warning, var(--ui-warning, #b45309)); }
129
129
  :host([tone="danger"]) { --ui-icon-color: var(--ui-color-danger, var(--ui-error, #dc2626)); }
130
130
 
131
131
  :host([shape="square"]) { --ui-icon-radius: 4px; }
@@ -195,7 +195,7 @@
195
195
  border-color: Canvas;
196
196
  }
197
197
  }
198
- `;function h(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function S(i){if(!i)return null;const e=i.trim();return e?/^\d+(\.\d+)?$/.test(e)?`${e}px`:e:null}function p(i){if(!i)return;const e=Number(i);return Number.isFinite(e)?e:void 0}class g extends k.ElementBase{constructor(){super(),this._lastName=""}static get observedAttributes(){return["name","size","color","variant","icon-variant","icon-weight","secondary-color","tone","shape","spin","pulse","badge","label","decorative","stroke-width","absolute-stroke-width","stroke-linecap","stroke-linejoin","rotate","flip","rtl","headless"]}_syncDynamicVars(){const e=S(this.getAttribute("size"));e?this.style.setProperty("--ui-icon-size",e):this.style.removeProperty("--ui-icon-size");const r=this.getAttribute("color");r?this.style.setProperty("--ui-icon-color",r):this.style.removeProperty("--ui-icon-color");const t=this.getAttribute("stroke-width");t?this.style.setProperty("--ui-icon-stroke-width",t):this.style.removeProperty("--ui-icon-stroke-width")}render(){if(this._syncDynamicVars(),this.hasAttribute("headless")){this.setContent("<style></style><slot></slot>");return}const e=this.getAttribute("name")||"",r=this.getAttribute("label")||"",t=this.hasAttribute("decorative"),n=e?u(e,{variant:this.getAttribute("icon-variant")||void 0,iconWeight:this.getAttribute("icon-weight")||void 0,secondaryColor:this.getAttribute("secondary-color")||void 0,strokeWidth:p(this.getAttribute("stroke-width")),absoluteStrokeWidth:this.hasAttribute("absolute-stroke-width"),strokeLinecap:this.getAttribute("stroke-linecap")||void 0,strokeLinejoin:this.getAttribute("stroke-linejoin")||void 0,rotate:p(this.getAttribute("rotate")),flip:this.getAttribute("flip")||void 0,rtl:this.hasAttribute("rtl")}):"",o=!!n,s=t?'aria-hidden="true" role="presentation"':`role="img" aria-label="${h(r||e||"icon")}"`;this.setContent(`
198
+ `;function h(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function S(i){if(!i)return null;const e=i.trim();return e?/^\d+(\.\d+)?$/.test(e)?`${e}px`:e:null}function p(i){if(!i)return;const e=Number(i);return Number.isFinite(e)?e:void 0}class b extends k.ElementBase{constructor(){super(),this._lastName=""}static get observedAttributes(){return["name","size","color","variant","icon-variant","icon-weight","secondary-color","tone","shape","spin","pulse","badge","label","decorative","stroke-width","absolute-stroke-width","stroke-linecap","stroke-linejoin","rotate","flip","rtl","headless"]}_syncDynamicVars(){const e=S(this.getAttribute("size"));e?this.style.setProperty("--ui-icon-size",e):this.style.removeProperty("--ui-icon-size");const r=this.getAttribute("color");r?this.style.setProperty("--ui-icon-color",r):this.style.removeProperty("--ui-icon-color");const t=this.getAttribute("stroke-width");t?this.style.setProperty("--ui-icon-stroke-width",t):this.style.removeProperty("--ui-icon-stroke-width")}render(){if(this._syncDynamicVars(),this.hasAttribute("headless")){this.setContent("<style></style><slot></slot>");return}const e=this.getAttribute("name")||"",r=this.getAttribute("label")||"",t=this.hasAttribute("decorative"),n=e?u(e,{variant:this.getAttribute("icon-variant")||void 0,iconWeight:this.getAttribute("icon-weight")||void 0,secondaryColor:this.getAttribute("secondary-color")||void 0,strokeWidth:p(this.getAttribute("stroke-width")),absoluteStrokeWidth:this.hasAttribute("absolute-stroke-width"),strokeLinecap:this.getAttribute("stroke-linecap")||void 0,strokeLinejoin:this.getAttribute("stroke-linejoin")||void 0,rotate:p(this.getAttribute("rotate")),flip:this.getAttribute("flip")||void 0,rtl:this.hasAttribute("rtl")}):"",o=!!n,s=t?'aria-hidden="true" role="presentation"':`role="img" aria-label="${h(r||e||"icon")}"`;this.setContent(`
199
199
  <style>${W}</style>
200
200
  <span class="icon" part="icon" ${s}>
201
201
  <span class="glyph" part="glyph">
@@ -204,4 +204,4 @@
204
204
  </span>
205
205
  ${this.hasAttribute("badge")?'<span class="badge" part="badge" aria-hidden="true"></span>':""}
206
206
  </span>
207
- `),e!==this._lastName&&(this.dispatchEvent(new CustomEvent("iconchange",{detail:{name:e,found:o},bubbles:!0})),this._lastName=e)}shouldRenderOnAttributeChange(e,r,t){return!0}}typeof customElements<"u"&&!customElements.get("ui-icon")&&customElements.define("ui-icon",g);exports.UIIcon=g;exports.clearCustomIcons=C;exports.getIcon=u;exports.getIconVariant=A;exports.hasIcon=I;exports.registerIcon=z;exports.unregisterIcon=w;
207
+ `),e!==this._lastName&&(this.dispatchEvent(new CustomEvent("iconchange",{detail:{name:e,found:o},bubbles:!0})),this._lastName=e)}shouldRenderOnAttributeChange(e,r,t){return!0}}typeof customElements<"u"&&!customElements.get("ui-icon")&&customElements.define("ui-icon",b);exports.UIIcon=b;exports.clearCustomIcons=C;exports.getIcon=u;exports.getIconVariant=A;exports.hasIcon=I;exports.registerIcon=z;exports.unregisterIcon=w;
@@ -1,4 +1,4 @@
1
- import { E as x } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as x } from "./ElementBase-BeZT54Hj.mjs";
2
2
  import { hasIcon as h, renderIconSvg as k } from "@editora/icons";
3
3
  const a = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
4
4
  function c(i) {
@@ -189,8 +189,8 @@ const z = `
189
189
  }
190
190
 
191
191
  :host([tone="brand"]) { --ui-icon-color: var(--ui-color-primary, var(--ui-primary, #2563eb)); }
192
- :host([tone="success"]) { --ui-icon-color: var(--ui-color-success, var(--ui-success, #16a34a)); }
193
- :host([tone="warning"]) { --ui-icon-color: var(--ui-color-warning, var(--ui-warning, #d97706)); }
192
+ :host([tone="success"]) { --ui-icon-color: var(--ui-color-success, var(--ui-success, #15803d)); }
193
+ :host([tone="warning"]) { --ui-icon-color: var(--ui-color-warning, var(--ui-warning, #b45309)); }
194
194
  :host([tone="danger"]) { --ui-icon-color: var(--ui-color-danger, var(--ui-error, #dc2626)); }
195
195
 
196
196
  :host([shape="square"]) { --ui-icon-radius: 4px; }
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./ElementBase-EV6mVBUV.js"),a=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./ElementBase-DxbvhLJs.js"),a=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
@@ -1,4 +1,4 @@
1
- import { E as i } from "./ElementBase-YlTLMsGk.mjs";
1
+ import { E as i } from "./ElementBase-BeZT54Hj.mjs";
2
2
  const r = `
3
3
  :host {
4
4
  display: contents;