@editora/ui-core 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/dist/{ElementBase-DxbvhLJs.js → ElementBase-CbUsP3D6.js} +1 -1
  2. package/dist/{ElementBase-BeZT54Hj.mjs → ElementBase-D5QsC5Vw.mjs} +10 -1
  3. package/dist/ElementBase.d.ts +7 -0
  4. package/dist/ElementBase.d.ts.map +1 -1
  5. package/dist/accordion.cjs.js +1 -1
  6. package/dist/accordion.esm.js +1 -1
  7. package/dist/add-icons-CVeHOsWl.js +1 -0
  8. package/dist/add-icons-DBUZJ0g7.mjs +14 -0
  9. package/dist/add-icons.cjs.js +1 -0
  10. package/dist/add-icons.d.ts +16 -0
  11. package/dist/add-icons.d.ts.map +1 -0
  12. package/dist/add-icons.esm.js +4 -0
  13. package/dist/alert-dialog.cjs.js +24 -24
  14. package/dist/alert-dialog.esm.js +112 -107
  15. package/dist/alert.cjs.js +8 -8
  16. package/dist/alert.esm.js +22 -22
  17. package/dist/animated-beam.cjs.js +1 -1
  18. package/dist/animated-beam.esm.js +1 -1
  19. package/dist/animated-list.cjs.js +1 -1
  20. package/dist/animated-list.esm.js +1 -1
  21. package/dist/animated-text.cjs.js +1 -1
  22. package/dist/animated-text.esm.js +1 -1
  23. package/dist/app-header.cjs.js +15 -3
  24. package/dist/app-header.esm.js +31 -4
  25. package/dist/aspect-ratio.cjs.js +1 -1
  26. package/dist/aspect-ratio.esm.js +1 -1
  27. package/dist/avatar.cjs.js +1 -1
  28. package/dist/avatar.esm.js +1 -1
  29. package/dist/badge.cjs.js +1 -1
  30. package/dist/badge.esm.js +1 -1
  31. package/dist/block-controls.cjs.js +1 -1
  32. package/dist/block-controls.esm.js +1 -1
  33. package/dist/box.cjs.js +1 -1
  34. package/dist/box.esm.js +1 -1
  35. package/dist/breadcrumb.cjs.js +4 -4
  36. package/dist/breadcrumb.esm.js +93 -84
  37. package/dist/button.cjs.js +520 -1
  38. package/dist/button.esm.js +682 -2
  39. package/dist/{calendar-CzpWDxLc.js → calendar-BsVqtpjM.js} +6 -6
  40. package/dist/{calendar-DkSDFg33.mjs → calendar-CFafqZVA.mjs} +6 -6
  41. package/dist/calendar.cjs.js +1 -1
  42. package/dist/calendar.esm.js +1 -1
  43. package/dist/card.cjs.js +6 -5
  44. package/dist/card.esm.js +52 -39
  45. package/dist/chart.cjs.js +2 -2
  46. package/dist/chart.esm.js +2 -2
  47. package/dist/checkbox.cjs.js +4 -4
  48. package/dist/checkbox.esm.js +36 -15
  49. package/dist/clone-source-BxK2pEVw.mjs +11 -0
  50. package/dist/clone-source-C7E_ri5f.js +1 -0
  51. package/dist/collapsible.cjs.js +1 -1
  52. package/dist/collapsible.esm.js +1 -1
  53. package/dist/color-picker.cjs.js +2 -2
  54. package/dist/color-picker.esm.js +3 -3
  55. package/dist/combobox.cjs.js +4 -4
  56. package/dist/combobox.esm.js +22 -19
  57. package/dist/command-palette.cjs.js +1 -1
  58. package/dist/command-palette.esm.js +1 -1
  59. package/dist/command.cjs.js +1 -1
  60. package/dist/command.esm.js +1 -1
  61. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  62. package/dist/components/ui-alert.d.ts.map +1 -1
  63. package/dist/components/ui-app-header.d.ts +1 -0
  64. package/dist/components/ui-app-header.d.ts.map +1 -1
  65. package/dist/components/ui-breadcrumb.d.ts.map +1 -1
  66. package/dist/components/ui-card.d.ts +7 -0
  67. package/dist/components/ui-card.d.ts.map +1 -1
  68. package/dist/components/ui-checkbox.d.ts +6 -0
  69. package/dist/components/ui-checkbox.d.ts.map +1 -1
  70. package/dist/components/ui-combobox.d.ts.map +1 -1
  71. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  72. package/dist/components/ui-dialog.d.ts +1 -0
  73. package/dist/components/ui-dialog.d.ts.map +1 -1
  74. package/dist/components/ui-drawer.d.ts.map +1 -1
  75. package/dist/components/ui-dropdown.d.ts.map +1 -1
  76. package/dist/components/ui-empty-state.d.ts.map +1 -1
  77. package/dist/components/ui-hover-card.d.ts.map +1 -1
  78. package/dist/components/ui-icon.d.ts +1 -0
  79. package/dist/components/ui-icon.d.ts.map +1 -1
  80. package/dist/components/ui-input.d.ts +16 -0
  81. package/dist/components/ui-input.d.ts.map +1 -1
  82. package/dist/components/ui-layout.d.ts +20 -0
  83. package/dist/components/ui-layout.d.ts.map +1 -1
  84. package/dist/components/ui-menu.d.ts +1 -0
  85. package/dist/components/ui-menu.d.ts.map +1 -1
  86. package/dist/components/ui-menubar.d.ts.map +1 -1
  87. package/dist/components/ui-multi-select.d.ts +6 -0
  88. package/dist/components/ui-multi-select.d.ts.map +1 -1
  89. package/dist/components/ui-number-field.d.ts +6 -0
  90. package/dist/components/ui-number-field.d.ts.map +1 -1
  91. package/dist/components/ui-pagination.d.ts.map +1 -1
  92. package/dist/components/ui-password-field.d.ts +11 -0
  93. package/dist/components/ui-password-field.d.ts.map +1 -1
  94. package/dist/components/ui-popover.d.ts.map +1 -1
  95. package/dist/components/ui-positioner.d.ts.map +1 -1
  96. package/dist/components/ui-radio-group.d.ts +6 -0
  97. package/dist/components/ui-radio-group.d.ts.map +1 -1
  98. package/dist/components/ui-rating.d.ts +1 -0
  99. package/dist/components/ui-rating.d.ts.map +1 -1
  100. package/dist/components/ui-select.d.ts +7 -0
  101. package/dist/components/ui-select.d.ts.map +1 -1
  102. package/dist/components/ui-sidebar.d.ts +1 -0
  103. package/dist/components/ui-sidebar.d.ts.map +1 -1
  104. package/dist/components/ui-slider.d.ts +6 -0
  105. package/dist/components/ui-slider.d.ts.map +1 -1
  106. package/dist/components/ui-sortable.d.ts +1 -0
  107. package/dist/components/ui-sortable.d.ts.map +1 -1
  108. package/dist/components/ui-switch.d.ts +6 -0
  109. package/dist/components/ui-switch.d.ts.map +1 -1
  110. package/dist/components/ui-tabs.d.ts +2 -0
  111. package/dist/components/ui-tabs.d.ts.map +1 -1
  112. package/dist/components/ui-textarea.d.ts +6 -0
  113. package/dist/components/ui-textarea.d.ts.map +1 -1
  114. package/dist/components/ui-toast.d.ts.map +1 -1
  115. package/dist/components/ui-tooltip.d.ts.map +1 -1
  116. package/dist/container.cjs.js +1 -1
  117. package/dist/container.esm.js +1 -1
  118. package/dist/context-menu.cjs.js +2 -2
  119. package/dist/context-menu.esm.js +2 -2
  120. package/dist/control-group.cjs.js +1 -1
  121. package/dist/control-group.esm.js +1 -1
  122. package/dist/data-table.cjs.js +5 -5
  123. package/dist/data-table.esm.js +7 -7
  124. package/dist/date-field.cjs.js +1 -1
  125. package/dist/date-field.esm.js +3 -3
  126. package/dist/date-picker.cjs.js +2 -2
  127. package/dist/date-picker.esm.js +17 -17
  128. package/dist/date-range-picker.cjs.js +2 -2
  129. package/dist/date-range-picker.esm.js +4 -4
  130. package/dist/date-range-time-picker.cjs.js +3 -3
  131. package/dist/date-range-time-picker.esm.js +16 -16
  132. package/dist/date-time-picker.cjs.js +26 -23
  133. package/dist/date-time-picker.esm.js +49 -46
  134. package/dist/{date-time-utils-zAx4ghvC.mjs → date-time-utils-CJUksWj3.mjs} +1 -1
  135. package/dist/{date-time-utils-C-4eHTyy.js → date-time-utils-D3hQQ5Om.js} +1 -1
  136. package/dist/description.cjs.js +1 -1
  137. package/dist/description.esm.js +1 -1
  138. package/dist/dialog.cjs.js +7 -7
  139. package/dist/dialog.esm.js +51 -47
  140. package/dist/direction-provider.cjs.js +1 -1
  141. package/dist/direction-provider.esm.js +1 -1
  142. package/dist/dismissable-layer.cjs.js +1 -1
  143. package/dist/dismissable-layer.esm.js +1 -1
  144. package/dist/dock.cjs.js +1 -1
  145. package/dist/dock.esm.js +1 -1
  146. package/dist/drawer.cjs.js +5 -5
  147. package/dist/drawer.esm.js +18 -17
  148. package/dist/dropdown.cjs.js +7 -7
  149. package/dist/dropdown.esm.js +39 -38
  150. package/dist/empty-state.cjs.js +12 -2
  151. package/dist/empty-state.esm.js +17 -7
  152. package/dist/field-error.cjs.js +1 -1
  153. package/dist/field-error.esm.js +1 -1
  154. package/dist/field.cjs.js +2 -2
  155. package/dist/field.esm.js +2 -2
  156. package/dist/fieldset.cjs.js +1 -1
  157. package/dist/fieldset.esm.js +1 -1
  158. package/dist/file-upload.cjs.js +1 -1
  159. package/dist/file-upload.esm.js +1 -1
  160. package/dist/flex.cjs.js +1 -1
  161. package/dist/flex.esm.js +1 -1
  162. package/dist/floating-toolbar.cjs.js +2 -2
  163. package/dist/floating-toolbar.esm.js +2 -2
  164. package/dist/focus-scope-Dl0qk5GP.mjs +177 -0
  165. package/dist/focus-scope-Doz0bnE1.js +1 -0
  166. package/dist/focus-scope.cjs.js +1 -1
  167. package/dist/focus-scope.esm.js +2 -2
  168. package/dist/form-control-B90_3kYN.js +1 -0
  169. package/dist/form-control-D9wWUMBl.mjs +86 -0
  170. package/dist/form.cjs.js +2 -2
  171. package/dist/form.esm.js +2 -2
  172. package/dist/gantt.cjs.js +2 -2
  173. package/dist/gantt.esm.js +2 -2
  174. package/dist/grid.cjs.js +1 -1
  175. package/dist/grid.esm.js +1 -1
  176. package/dist/hover-card.cjs.js +5 -5
  177. package/dist/hover-card.esm.js +19 -18
  178. package/dist/icon-cloud.cjs.js +1 -1
  179. package/dist/icon-cloud.esm.js +1 -1
  180. package/dist/icon.cjs.js +207 -1
  181. package/dist/icon.esm.js +294 -2
  182. package/dist/icons-CpCpPXV5.js +1 -0
  183. package/dist/icons-DWYbbhb0.mjs +115 -0
  184. package/dist/icons.d.ts +11 -1
  185. package/dist/icons.d.ts.map +1 -1
  186. package/dist/implicit-submit-B6M5Uc56.js +1 -0
  187. package/dist/implicit-submit-Lr0-q2LR.mjs +44 -0
  188. package/dist/index.cjs.js +1 -1
  189. package/dist/index.d.ts +1 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.esm.js +309 -299
  192. package/dist/inline-edit.cjs.js +1 -1
  193. package/dist/inline-edit.esm.js +1 -1
  194. package/dist/input.cjs.js +62 -20
  195. package/dist/input.esm.js +164 -58
  196. package/dist/label.cjs.js +1 -1
  197. package/dist/label.esm.js +1 -1
  198. package/dist/layout.cjs.js +145 -4
  199. package/dist/layout.esm.js +278 -40
  200. package/dist/marquee.cjs.js +1 -1
  201. package/dist/marquee.esm.js +1 -1
  202. package/dist/masonry-grid.cjs.js +1 -1
  203. package/dist/masonry-grid.esm.js +1 -1
  204. package/dist/menu.cjs.js +8 -8
  205. package/dist/menu.esm.js +51 -47
  206. package/dist/menubar.cjs.js +9 -9
  207. package/dist/menubar.esm.js +41 -40
  208. package/dist/meter.cjs.js +1 -1
  209. package/dist/meter.esm.js +1 -1
  210. package/dist/multi-select.cjs.js +7 -7
  211. package/dist/multi-select.esm.js +55 -34
  212. package/dist/navigate-CXebafwF.mjs +18 -0
  213. package/dist/navigate-ChJVIIuS.js +1 -0
  214. package/dist/navigation-menu.cjs.js +1 -1
  215. package/dist/navigation-menu.esm.js +1 -1
  216. package/dist/number-attribute-BAF07JrU.mjs +8 -0
  217. package/dist/number-attribute-C4Rrl7d3.js +1 -0
  218. package/dist/number-field.cjs.js +8 -8
  219. package/dist/number-field.esm.js +90 -69
  220. package/dist/number-ticker.cjs.js +1 -1
  221. package/dist/number-ticker.esm.js +1 -1
  222. package/dist/odometer.cjs.js +1 -1
  223. package/dist/odometer.esm.js +1 -1
  224. package/dist/orbiter.cjs.js +1 -1
  225. package/dist/orbiter.esm.js +1 -1
  226. package/dist/pagination.cjs.js +24 -23
  227. package/dist/pagination.esm.js +61 -46
  228. package/dist/{panel-group-BVHJEdfx.js → panel-group-BIzzpQ5i.js} +1 -1
  229. package/dist/{panel-group-BxO_eNW6.mjs → panel-group-CFLjzRWI.mjs} +1 -1
  230. package/dist/panel-group.cjs.js +1 -1
  231. package/dist/panel-group.esm.js +1 -1
  232. package/dist/panel.cjs.js +1 -1
  233. package/dist/panel.esm.js +1 -1
  234. package/dist/password-field.cjs.js +36 -16
  235. package/dist/password-field.esm.js +113 -44
  236. package/dist/pin-input.cjs.js +1 -1
  237. package/dist/pin-input.esm.js +1 -1
  238. package/dist/placement-grid.cjs.js +1 -1
  239. package/dist/placement-grid.esm.js +1 -1
  240. package/dist/plugin-panel.cjs.js +1 -1
  241. package/dist/plugin-panel.esm.js +1 -1
  242. package/dist/popover.cjs.js +2 -2
  243. package/dist/popover.esm.js +28 -26
  244. package/dist/portal.cjs.js +1 -1
  245. package/dist/portal.esm.js +1 -1
  246. package/dist/positioner.cjs.js +2 -2
  247. package/dist/positioner.esm.js +35 -38
  248. package/dist/preload.cjs.js +221 -0
  249. package/dist/preload.css +220 -0
  250. package/dist/preload.d.ts +17 -0
  251. package/dist/preload.d.ts.map +1 -0
  252. package/dist/preload.esm.js +224 -0
  253. package/dist/presence.cjs.js +1 -1
  254. package/dist/presence.esm.js +1 -1
  255. package/dist/primitives/clone-source.d.ts +3 -0
  256. package/dist/primitives/clone-source.d.ts.map +1 -0
  257. package/dist/primitives/focus-scope.d.ts +6 -0
  258. package/dist/primitives/focus-scope.d.ts.map +1 -1
  259. package/dist/primitives/form-control.d.ts +68 -0
  260. package/dist/primitives/form-control.d.ts.map +1 -0
  261. package/dist/primitives/implicit-submit.d.ts +17 -0
  262. package/dist/primitives/implicit-submit.d.ts.map +1 -0
  263. package/dist/primitives/navigate.d.ts +27 -0
  264. package/dist/primitives/navigate.d.ts.map +1 -0
  265. package/dist/primitives/number-attribute.d.ts +7 -0
  266. package/dist/primitives/number-attribute.d.ts.map +1 -0
  267. package/dist/primitives/slotted-input.d.ts +19 -0
  268. package/dist/primitives/slotted-input.d.ts.map +1 -0
  269. package/dist/progress.cjs.js +3 -3
  270. package/dist/progress.esm.js +3 -3
  271. package/dist/quick-actions.cjs.js +5 -5
  272. package/dist/quick-actions.esm.js +3 -3
  273. package/dist/radio-group.cjs.js +9 -9
  274. package/dist/radio-group.esm.js +47 -24
  275. package/dist/radio.cjs.js +1 -1
  276. package/dist/radio.esm.js +1 -1
  277. package/dist/rating.cjs.js +6 -6
  278. package/dist/rating.esm.js +21 -10
  279. package/dist/{runtime-CJzoaC8Z.mjs → runtime-CORXjP7e.mjs} +366 -352
  280. package/dist/runtime-uCly3ECd.js +5 -0
  281. package/dist/runtime.cjs.js +1 -1
  282. package/dist/runtime.esm.js +1 -1
  283. package/dist/scroll-area.cjs.js +1 -1
  284. package/dist/scroll-area.esm.js +1 -1
  285. package/dist/section.cjs.js +1 -1
  286. package/dist/section.esm.js +1 -1
  287. package/dist/select.cjs.js +21 -21
  288. package/dist/select.esm.js +111 -71
  289. package/dist/selection-popup.cjs.js +2 -2
  290. package/dist/selection-popup.esm.js +2 -2
  291. package/dist/semantic-tokens.d.ts.map +1 -1
  292. package/dist/separator.cjs.js +1 -1
  293. package/dist/separator.esm.js +1 -1
  294. package/dist/sidebar.cjs.js +15 -15
  295. package/dist/sidebar.esm.js +48 -42
  296. package/dist/skeleton.cjs.js +1 -1
  297. package/dist/skeleton.esm.js +1 -1
  298. package/dist/slider.cjs.js +11 -11
  299. package/dist/slider.esm.js +40 -23
  300. package/dist/slot.cjs.js +1 -1
  301. package/dist/slot.esm.js +1 -1
  302. package/dist/slotted-input-BVq2QQg2.js +1 -0
  303. package/dist/slotted-input-atWznLfm.mjs +13 -0
  304. package/dist/sortable.cjs.js +25 -25
  305. package/dist/sortable.esm.js +29 -21
  306. package/dist/spinning-text.cjs.js +1 -1
  307. package/dist/spinning-text.esm.js +1 -1
  308. package/dist/split-button.cjs.js +1 -1
  309. package/dist/split-button.esm.js +1 -1
  310. package/dist/splitter.cjs.js +1 -1
  311. package/dist/splitter.esm.js +1 -1
  312. package/dist/standalone/add-icons.d.ts +2 -0
  313. package/dist/standalone/add-icons.d.ts.map +1 -0
  314. package/dist/standalone/preload.d.ts +2 -0
  315. package/dist/standalone/preload.d.ts.map +1 -0
  316. package/dist/stepper.cjs.js +3 -3
  317. package/dist/stepper.esm.js +3 -3
  318. package/dist/switch.cjs.js +9 -9
  319. package/dist/switch.esm.js +56 -35
  320. package/dist/table.cjs.js +1 -1
  321. package/dist/table.esm.js +1 -1
  322. package/dist/tabs.cjs.js +14 -14
  323. package/dist/tabs.esm.js +129 -115
  324. package/dist/tags-input.cjs.js +1 -1
  325. package/dist/tags-input.esm.js +1 -1
  326. package/dist/textarea.cjs.js +33 -11
  327. package/dist/textarea.esm.js +74 -35
  328. package/dist/theme.d.ts +6 -0
  329. package/dist/theme.d.ts.map +1 -1
  330. package/dist/time-field.cjs.js +1 -1
  331. package/dist/time-field.esm.js +2 -2
  332. package/dist/time-picker.cjs.js +1 -1
  333. package/dist/time-picker.esm.js +3 -3
  334. package/dist/timeline.cjs.js +2 -2
  335. package/dist/timeline.esm.js +2 -2
  336. package/dist/toast.cjs.js +4 -4
  337. package/dist/toast.esm.js +17 -16
  338. package/dist/toggle-group.cjs.js +1 -1
  339. package/dist/toggle-group.esm.js +1 -1
  340. package/dist/toggle.cjs.js +3 -3
  341. package/dist/toggle.esm.js +9 -9
  342. package/dist/toolbar.cjs.js +1 -1
  343. package/dist/toolbar.esm.js +1 -1
  344. package/dist/tooltip.cjs.js +2 -2
  345. package/dist/tooltip.esm.js +12 -14
  346. package/dist/transfer-list.cjs.js +1 -1
  347. package/dist/transfer-list.esm.js +1 -1
  348. package/dist/{tree-33fVNnaf.mjs → tree-CD2k2lIC.mjs} +1 -1
  349. package/dist/{tree-Dc02MChE.js → tree-ChQfhxya.js} +1 -1
  350. package/dist/tree-item.cjs.js +1 -1
  351. package/dist/tree-item.esm.js +1 -1
  352. package/dist/tree.cjs.js +1 -1
  353. package/dist/tree.esm.js +1 -1
  354. package/dist/visually-hidden.cjs.js +1 -1
  355. package/dist/visually-hidden.esm.js +1 -1
  356. package/dist/wizard.cjs.js +4 -4
  357. package/dist/wizard.esm.js +4 -4
  358. package/package.json +3 -2
  359. package/dist/focus-scope-Bwug2gDv.js +0 -1
  360. package/dist/focus-scope-CmEsG5UZ.mjs +0 -138
  361. package/dist/runtime-DYSIU3sR.js +0 -5
  362. package/dist/ui-button-C3OmI7Sn.mjs +0 -684
  363. package/dist/ui-button-CnLwXBnx.js +0 -520
  364. package/dist/ui-icon-D3avtxX_.js +0 -207
  365. package/dist/ui-icon-DLhB08Fo.mjs +0 -361
@@ -1,7 +1,8 @@
1
- import { E as Z } from "./ElementBase-BeZT54Hj.mjs";
2
- import { c as G, l as J } from "./overlay-motion-BX3dPLay.mjs";
1
+ import { E as G } from "./ElementBase-D5QsC5Vw.mjs";
2
+ import { g as J, d as Q, c as U } from "./focus-scope-Dl0qk5GP.mjs";
3
+ import { c as X, l as tt } from "./overlay-motion-BX3dPLay.mjs";
3
4
  import { a as S, r as L } from "./scroll-lock-LfqXXqsu.mjs";
4
- const Q = `
5
+ const it = `
5
6
  :host {
6
7
  display: block;
7
8
  color-scheme: light dark;
@@ -539,60 +540,60 @@ const Q = `
539
540
  border: 1px solid CanvasText;
540
541
  }
541
542
  }
542
- `, X = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
543
- function f(i, t) {
544
- if (i == null) return t;
545
- const e = i.trim().toLowerCase();
546
- return e !== "false" && e !== "0" && e !== "off";
543
+ `;
544
+ function f(e, t) {
545
+ if (e == null) return t;
546
+ const i = e.trim().toLowerCase();
547
+ return i !== "false" && i !== "0" && i !== "off";
547
548
  }
548
- function s(i) {
549
- return String(i).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
549
+ function s(e) {
550
+ return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
550
551
  }
551
- function tt(i) {
552
- return i === "info" || i === "success" || i === "warning" || i === "danger" ? i : "neutral";
552
+ function et(e) {
553
+ return e === "info" || e === "success" || e === "warning" || e === "danger" ? e : "neutral";
553
554
  }
554
- function et(i) {
555
- return i === "sm" || i === "1" ? "sm" : i === "lg" || i === "3" ? "lg" : "md";
555
+ function rt(e) {
556
+ return e === "sm" || e === "1" ? "sm" : e === "lg" || e === "3" ? "lg" : "md";
556
557
  }
557
- function it(i) {
558
- return i === "soft" || i === "outline" || i === "solid" ? i : "surface";
558
+ function at(e) {
559
+ return e === "soft" || e === "outline" || e === "solid" ? e : "surface";
559
560
  }
560
- function rt(i) {
561
- return i === "none" || i === "high" ? i : "low";
561
+ function st(e) {
562
+ return e === "none" || e === "high" ? e : "low";
562
563
  }
563
- function at(i) {
564
- return i === "none" ? "none" : "line";
564
+ function ot(e) {
565
+ return e === "none" ? "none" : "line";
565
566
  }
566
- function st(i, t = "var(--base-alert-dialog-radius, var(--ui-radius, 6px))") {
567
- if (i == null) return t;
568
- const e = i.trim().toLowerCase();
569
- return e ? e === "full" || e === "pill" ? "999px" : /^-?\d+(\.\d+)?$/.test(e) ? `${e}px` : i : t;
567
+ function nt(e, t = "var(--base-alert-dialog-radius, var(--ui-radius, 6px))") {
568
+ if (e == null) return t;
569
+ const i = e.trim().toLowerCase();
570
+ return i ? i === "full" || i === "pill" ? "999px" : /^-?\d+(\.\d+)?$/.test(i) ? `${i}px` : e : t;
570
571
  }
571
- const ot = /* @__PURE__ */ new Set(["tone", "size", "variant", "elevation", "indicator", "radius"]);
572
- function nt(i) {
573
- return i === "success" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M5 10.2 8.3 13.4 15 6.8"></path></svg>' : i === "warning" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.6 17 16.4H3L10 3.6Z"></path><path d="M10 8v3.4"></path><circle cx="10" cy="14.1" r="0.9" fill="currentColor" stroke="none"></circle></svg>' : i === "danger" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="m7.5 7.5 5 5M12.5 7.5l-5 5"></path></svg>' : i === "info" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="M10 13v-3.8"></path><circle cx="10" cy="6.5" r="0.9" fill="currentColor" stroke="none"></circle></svg>' : '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M6 10h8"></path><circle cx="10" cy="10" r="7.1"></circle></svg>';
572
+ const lt = /* @__PURE__ */ new Set(["tone", "size", "variant", "elevation", "indicator", "radius"]);
573
+ function ct(e) {
574
+ return e === "success" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M5 10.2 8.3 13.4 15 6.8"></path></svg>' : e === "warning" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.6 17 16.4H3L10 3.6Z"></path><path d="M10 8v3.4"></path><circle cx="10" cy="14.1" r="0.9" fill="currentColor" stroke="none"></circle></svg>' : e === "danger" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="m7.5 7.5 5 5M12.5 7.5l-5 5"></path></svg>' : e === "info" ? '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="M10 13v-3.8"></path><circle cx="10" cy="6.5" r="0.9" fill="currentColor" stroke="none"></circle></svg>' : '<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M6 10h8"></path><circle cx="10" cy="10" r="7.1"></circle></svg>';
574
575
  }
575
576
  function u() {
576
577
  return typeof window < "u" && typeof document < "u";
577
578
  }
578
579
  function T() {
579
580
  if (!u()) return null;
580
- const i = document.activeElement;
581
- return i instanceof HTMLElement ? i : null;
581
+ const e = document.activeElement;
582
+ return e instanceof HTMLElement ? e : null;
582
583
  }
583
- function k(i) {
584
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => i()) : window.setTimeout(i, 16);
584
+ function k(e) {
585
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => e()) : window.setTimeout(e, 16);
585
586
  }
586
- function p(i) {
587
- if (i) {
587
+ function p(e) {
588
+ if (e) {
588
589
  if (typeof cancelAnimationFrame == "function") {
589
- cancelAnimationFrame(i);
590
+ cancelAnimationFrame(e);
590
591
  return;
591
592
  }
592
- window.clearTimeout(i);
593
+ window.clearTimeout(e);
593
594
  }
594
595
  }
595
- const c = "data-ui-auto-name", l = class l extends Z {
596
+ const l = "data-ui-auto-name", c = class c extends G {
596
597
  constructor() {
597
598
  super(), this._lastActive = null, this._active = !1, this._terminalEmitted = !1, this._closeMeta = null, this._uid = Math.random().toString(36).slice(2, 10), this._dialogId = "", this._config = {}, this._inputValue = "", this._checked = !1, this._runtimeError = "", this._activeHeadless = !1, this._focusInitialFrame = 0, this._restoreFocusFrame = 0, this._presented = !1, this._finishClose = null, this._onClick = this._onClick.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onFocusIn = this._onFocusIn.bind(this), this._onInput = this._onInput.bind(this), this._dialogId = this._uid;
598
599
  }
@@ -605,6 +606,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
605
606
  "close-on-backdrop",
606
607
  "lock-while-loading",
607
608
  "role",
609
+ "dialog-role",
608
610
  "tone",
609
611
  "size",
610
612
  "variant",
@@ -630,9 +632,9 @@ const c = "data-ui-auto-name", l = class l extends Z {
630
632
  disconnectedCallback() {
631
633
  this.root.removeEventListener("click", this._onClick), this.root.removeEventListener("keydown", this._onKeyDown), this.root.removeEventListener("input", this._onInput), this._focusInitialFrame && (p(this._focusInitialFrame), this._focusInitialFrame = 0), this._restoreFocusFrame && (p(this._restoreFocusFrame), this._restoreFocusFrame = 0), this._active && !this._terminalEmitted && this.close("dismiss", "unmount"), this._deactivate(), super.disconnectedCallback();
632
634
  }
633
- attributeChangedCallback(t, e, r) {
634
- if (e !== r) {
635
- if (ot.has(t)) {
635
+ attributeChangedCallback(t, i, r) {
636
+ if (i !== r) {
637
+ if (lt.has(t)) {
636
638
  this._syncVisualTokens();
637
639
  return;
638
640
  }
@@ -684,13 +686,13 @@ const c = "data-ui-auto-name", l = class l extends Z {
684
686
  this.setAttribute("lock-while-loading", String(t));
685
687
  }
686
688
  get roleType() {
687
- return this.getAttribute("role") === "dialog" ? "dialog" : "alertdialog";
689
+ return (this.getAttribute("dialog-role") || this.getAttribute("role")) === "dialog" ? "dialog" : "alertdialog";
688
690
  }
689
691
  set roleType(t) {
690
- this.setAttribute("role", t);
692
+ this.setAttribute("dialog-role", t);
691
693
  }
692
694
  get tone() {
693
- return tt(this.getAttribute("tone"));
695
+ return et(this.getAttribute("tone"));
694
696
  }
695
697
  set tone(t) {
696
698
  if (t === "neutral") {
@@ -700,7 +702,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
700
702
  this.setAttribute("tone", t);
701
703
  }
702
704
  get size() {
703
- return et(this.getAttribute("size"));
705
+ return rt(this.getAttribute("size"));
704
706
  }
705
707
  set size(t) {
706
708
  if (t === "md") {
@@ -710,7 +712,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
710
712
  this.setAttribute("size", t);
711
713
  }
712
714
  get variant() {
713
- return it(this.getAttribute("variant"));
715
+ return at(this.getAttribute("variant"));
714
716
  }
715
717
  set variant(t) {
716
718
  if (t === "surface") {
@@ -720,7 +722,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
720
722
  this.setAttribute("variant", t);
721
723
  }
722
724
  get elevation() {
723
- return rt(this.getAttribute("elevation"));
725
+ return st(this.getAttribute("elevation"));
724
726
  }
725
727
  set elevation(t) {
726
728
  if (t === "low") {
@@ -730,7 +732,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
730
732
  this.setAttribute("elevation", t);
731
733
  }
732
734
  get indicator() {
733
- return at(this.getAttribute("indicator"));
735
+ return ot(this.getAttribute("indicator"));
734
736
  }
735
737
  set indicator(t) {
736
738
  if (t === "line") {
@@ -787,16 +789,16 @@ const c = "data-ui-auto-name", l = class l extends Z {
787
789
  }
788
790
  setInputValue(t) {
789
791
  this._inputValue = t;
790
- const e = this.root.querySelector(".input");
791
- e && (e.value = t);
792
+ const i = this.root.querySelector(".input");
793
+ i && (i.value = t);
792
794
  }
793
795
  getChecked() {
794
796
  return this.root.querySelector(".checkbox-input")?.checked ?? this._checked;
795
797
  }
796
798
  setChecked(t) {
797
799
  this._checked = t;
798
- const e = this.root.querySelector(".checkbox-input");
799
- e && (e.checked = t);
800
+ const i = this.root.querySelector(".checkbox-input");
801
+ i && (i.checked = t);
800
802
  }
801
803
  setError(t) {
802
804
  this._runtimeError = t, this.state = t ? "error" : "idle", this.requestRender();
@@ -804,14 +806,13 @@ const c = "data-ui-auto-name", l = class l extends Z {
804
806
  clearError() {
805
807
  this._runtimeError = "", this.state === "error" && (this.state = "idle"), this.requestRender();
806
808
  }
807
- close(t = "dismiss", e, r) {
808
- this._terminalEmitted || (this._closeMeta = { action: t, source: e, reason: r }, this.hasAttribute("open") && this.removeAttribute("open"), this._syncOpenState());
809
+ close(t = "dismiss", i, r) {
810
+ this._terminalEmitted || (this._closeMeta = { action: t, source: i, reason: r }, this.hasAttribute("open") && this.removeAttribute("open"), this._syncOpenState());
809
811
  }
810
812
  _syncFromAttributes() {
811
- this.hasAttribute("role") || this.setAttribute("role", "alertdialog");
812
813
  }
813
814
  _syncVisualTokens() {
814
- this.style.setProperty("--ui-alert-radius", st(this.getAttribute("radius")));
815
+ this.style.setProperty("--ui-alert-radius", nt(this.getAttribute("radius")));
815
816
  }
816
817
  _syncOpenState() {
817
818
  const t = this.hasAttribute("open");
@@ -822,7 +823,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
822
823
  !t && this._active && this._deactivate();
823
824
  }
824
825
  _activate() {
825
- this._active = !0, this._activeHeadless = this.headless, this._terminalEmitted = !1, this._closeMeta = null, l._openStack.includes(this) || l._openStack.push(this), this._lastActive = this.headless ? null : T(), this.headless || S(), u() && !this.headless && document.addEventListener("focusin", this._onFocusIn, !0);
826
+ this._active = !0, this._activeHeadless = this.headless, this._terminalEmitted = !1, this._closeMeta = null, c._openStack.includes(this) || c._openStack.push(this), this._lastActive = this.headless ? null : T(), this.headless || S(), u() && !this.headless && document.addEventListener("focusin", this._onFocusIn, !0);
826
827
  const t = this.dialogId || this._uid;
827
828
  this._dispatchWithLegacy("ui-open", "open", { id: t }), this.headless || (this._focusInitialFrame && p(this._focusInitialFrame), this._focusInitialFrame = k(() => {
828
829
  this._focusInitialFrame = 0, this._focusInitial();
@@ -831,8 +832,8 @@ const c = "data-ui-auto-name", l = class l extends Z {
831
832
  _deactivate() {
832
833
  if (!this._active) return;
833
834
  this._active = !1;
834
- const t = l._openStack.lastIndexOf(this);
835
- if (t >= 0 && l._openStack.splice(t, 1), u() && !this._activeHeadless && document.removeEventListener("focusin", this._onFocusIn, !0), this._activeHeadless || L(), !this._terminalEmitted) {
835
+ const t = c._openStack.lastIndexOf(this);
836
+ if (t >= 0 && c._openStack.splice(t, 1), u() && !this._activeHeadless && document.removeEventListener("focusin", this._onFocusIn, !0), this._activeHeadless || L(), !this._terminalEmitted) {
836
837
  const r = this._closeMeta || { action: "dismiss", source: "abort" }, a = this.dialogId || this._uid;
837
838
  r.action === "cancel" ? this._dispatchWithLegacy("ui-cancel", "cancel", { id: a }) : r.action === "dismiss" && this._dispatchWithLegacy("ui-dismiss", "dismiss", {
838
839
  id: a,
@@ -845,11 +846,11 @@ const c = "data-ui-auto-name", l = class l extends Z {
845
846
  reason: r.reason
846
847
  }), this._terminalEmitted = !0, this._closeMeta = null;
847
848
  }
848
- const e = this._lastActive;
849
- this._lastActive = null, e && !this._activeHeadless && (this._restoreFocusFrame && p(this._restoreFocusFrame), this._restoreFocusFrame = k(() => {
849
+ const i = this._lastActive;
850
+ this._lastActive = null, i && !this._activeHeadless && (this._restoreFocusFrame && p(this._restoreFocusFrame), this._restoreFocusFrame = k(() => {
850
851
  this._restoreFocusFrame = 0;
851
852
  try {
852
- e.focus();
853
+ i.focus();
853
854
  } catch {
854
855
  }
855
856
  })), this._activeHeadless = !1, this.requestRender();
@@ -865,7 +866,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
865
866
  });
866
867
  }
867
868
  }
868
- _dispatchWithLegacy(t, e, r, a = !1) {
869
+ _dispatchWithLegacy(t, i, r, a = !1) {
869
870
  const o = new CustomEvent(t, {
870
871
  detail: r,
871
872
  bubbles: !0,
@@ -873,7 +874,7 @@ const c = "data-ui-auto-name", l = class l extends Z {
873
874
  cancelable: a
874
875
  });
875
876
  this.dispatchEvent(o);
876
- const n = new CustomEvent(e, {
877
+ const n = new CustomEvent(i, {
877
878
  detail: r,
878
879
  bubbles: !0,
879
880
  composed: !0,
@@ -883,16 +884,16 @@ const c = "data-ui-auto-name", l = class l extends Z {
883
884
  }
884
885
  _isTopMost() {
885
886
  if (!this._active) return !1;
886
- const t = l._openStack;
887
+ const t = c._openStack;
887
888
  return t.length > 0 && t[t.length - 1] === this;
888
889
  }
889
890
  _queryPanel() {
890
891
  return this.root.querySelector(".dialog");
891
892
  }
892
893
  _collectFocusable(t) {
893
- return Array.from(t.querySelectorAll(X)).filter((e) => {
894
- if (e.disabled || e.getAttribute("aria-hidden") === "true") return !1;
895
- const a = u() ? window.getComputedStyle(e) : null;
894
+ return J(t).filter((i) => {
895
+ if (i.disabled || i.getAttribute("aria-hidden") === "true") return !1;
896
+ const a = u() ? window.getComputedStyle(i) : null;
896
897
  return !(a && (a.display === "none" || a.visibility === "hidden"));
897
898
  });
898
899
  }
@@ -900,9 +901,9 @@ const c = "data-ui-auto-name", l = class l extends Z {
900
901
  if (!this.open) return;
901
902
  const t = this._queryPanel();
902
903
  if (!t) return;
903
- const e = this.initialFocus;
904
- if (e) {
905
- const n = t.querySelector(e);
904
+ const i = this.initialFocus;
905
+ if (i) {
906
+ const n = t.querySelector(i);
906
907
  if (n && typeof n.focus == "function") {
907
908
  n.focus();
908
909
  return;
@@ -917,30 +918,30 @@ const c = "data-ui-auto-name", l = class l extends Z {
917
918
  }
918
919
  _handleTab(t) {
919
920
  if (t.key !== "Tab") return;
920
- const e = this._queryPanel();
921
- if (!e) return;
922
- const r = this._collectFocusable(e);
921
+ const i = this._queryPanel();
922
+ if (!i) return;
923
+ const r = this._collectFocusable(i);
923
924
  if (!r.length) {
924
- t.preventDefault(), e.focus();
925
+ t.preventDefault(), i.focus();
925
926
  return;
926
927
  }
927
- const a = this.root.activeElement || document.activeElement, o = r[0], n = r[r.length - 1];
928
+ const a = Q(), o = r[0], n = r[r.length - 1];
928
929
  if (t.shiftKey) {
929
- (a === o || !a || !e.contains(a)) && (t.preventDefault(), n.focus());
930
+ (a === o || !a || !U(i, a)) && (t.preventDefault(), n.focus());
930
931
  return;
931
932
  }
932
933
  a === n && (t.preventDefault(), o.focus());
933
934
  }
934
935
  _onFocusIn(t) {
935
936
  if (!this.open || !this._isTopMost()) return;
936
- const e = this._queryPanel();
937
- if (!e) return;
937
+ const i = this._queryPanel();
938
+ if (!i) return;
938
939
  const r = t.target;
939
- (typeof t.composedPath == "function" ? t.composedPath() : []).includes(e) || r && e.contains(r) || this._focusInitial();
940
+ (typeof t.composedPath == "function" ? t.composedPath() : []).includes(i) || r && i.contains(r) || this._focusInitial();
940
941
  }
941
942
  _onInput(t) {
942
- const e = t.target;
943
- e && (e.classList.contains("input") && (this._inputValue = e.value), e.classList.contains("checkbox-input") && (this._checked = e.checked), this._dispatchWithLegacy("ui-change", "change", {
943
+ const i = t.target;
944
+ i && (i.classList.contains("input") && (this._inputValue = i.value), i.classList.contains("checkbox-input") && (this._checked = i.checked), this._dispatchWithLegacy("ui-change", "change", {
944
945
  id: this.dialogId || this._uid,
945
946
  inputValue: this._inputValue,
946
947
  checked: this._checked
@@ -949,8 +950,8 @@ const c = "data-ui-auto-name", l = class l extends Z {
949
950
  _isInteractionLocked() {
950
951
  return this.state === "loading" && this.lockWhileLoading;
951
952
  }
952
- _requestDismiss(t, e) {
953
- this._isInteractionLocked() || this.close("dismiss", t, e);
953
+ _requestDismiss(t, i) {
954
+ this._isInteractionLocked() || this.close("dismiss", t, i);
954
955
  }
955
956
  _handleConfirm() {
956
957
  const t = {
@@ -965,21 +966,21 @@ const c = "data-ui-auto-name", l = class l extends Z {
965
966
  }
966
967
  _onClick(t) {
967
968
  if (!this.open || !this._isTopMost()) return;
968
- const e = t.target;
969
- if (e) {
970
- if (e.classList.contains("backdrop") && this.closeOnBackdrop) {
969
+ const i = t.target;
970
+ if (i) {
971
+ if (i.classList.contains("backdrop") && this.closeOnBackdrop) {
971
972
  this._requestDismiss("backdrop");
972
973
  return;
973
974
  }
974
- if (e.closest(".close")) {
975
+ if (i.closest(".close")) {
975
976
  this._requestDismiss("close-icon");
976
977
  return;
977
978
  }
978
- if (e.closest(".btn-confirm")) {
979
+ if (i.closest(".btn-confirm")) {
979
980
  this._handleConfirm();
980
981
  return;
981
982
  }
982
- e.closest(".btn-cancel") && this._handleCancel();
983
+ i.closest(".btn-cancel") && this._handleCancel();
983
984
  }
984
985
  }
985
986
  _onKeyDown(t) {
@@ -995,23 +996,27 @@ const c = "data-ui-auto-name", l = class l extends Z {
995
996
  // The host carries role="alertdialog" (that attribute is also how the role is configured), so it
996
997
  // is exposed as a dialog of its own. Closed, it was an empty, unnamed alert dialog sitting in the
997
998
  // page; open, it needs the same name as the dialog inside its shadow root.
998
- _syncHostSemantics(t, e = "", r = !1) {
999
+ _syncHostSemantics(t, i = "", r = !1) {
1000
+ if (!this.hasAttribute("role")) {
1001
+ this.hasAttribute(l) && (this.removeAttribute("aria-label"), this.removeAttribute(l)), t ? this.hasAttribute("aria-hidden") && this.removeAttribute("aria-hidden") : this.getAttribute("aria-hidden") !== "true" && this.setAttribute("aria-hidden", "true");
1002
+ return;
1003
+ }
999
1004
  if (!t) {
1000
- this.getAttribute("aria-hidden") !== "true" && this.setAttribute("aria-hidden", "true"), this.hasAttribute(c) && (this.removeAttribute("aria-label"), this.removeAttribute(c));
1005
+ this.getAttribute("aria-hidden") !== "true" && this.setAttribute("aria-hidden", "true"), this.hasAttribute(l) && (this.removeAttribute("aria-label"), this.removeAttribute(l));
1001
1006
  return;
1002
1007
  }
1003
1008
  if (this.hasAttribute("aria-hidden") && this.removeAttribute("aria-hidden"), r) {
1004
- this.hasAttribute(c) && this.removeAttribute(c);
1009
+ this.hasAttribute(l) && this.removeAttribute(l);
1005
1010
  return;
1006
1011
  }
1007
- this.getAttribute("aria-label") !== e && this.setAttribute("aria-label", e), this.hasAttribute(c) || this.setAttribute(c, "");
1012
+ this.getAttribute("aria-label") !== i && this.setAttribute("aria-label", i), this.hasAttribute(l) || this.setAttribute(l, "");
1008
1013
  }
1009
1014
  render() {
1010
1015
  if (!this.open) {
1011
1016
  this._syncHostSemantics(!1);
1012
1017
  const _ = this.root.querySelector(".backdrop");
1013
1018
  if (this._presented && _) {
1014
- this._presented = !1, _.removeAttribute("data-instant"), this._finishClose = G(_, () => {
1019
+ this._presented = !1, _.removeAttribute("data-instant"), this._finishClose = X(_, () => {
1015
1020
  this._finishClose = null, this.setContent("");
1016
1021
  });
1017
1022
  return;
@@ -1021,24 +1026,24 @@ const c = "data-ui-auto-name", l = class l extends Z {
1021
1026
  return;
1022
1027
  }
1023
1028
  this._finishClose?.(), this._finishClose = null;
1024
- const t = this._config.title ?? this.getAttribute("title") ?? "", e = this._config.description ?? this.getAttribute("description") ?? "", r = this._config.confirmText ?? this.getAttribute("confirm-text") ?? "Confirm", a = this._config.cancelText ?? this.getAttribute("cancel-text") ?? "Cancel", o = this._config.loadingText ?? this.getAttribute("loading-text") ?? "Working...", n = !!this._config.input?.enabled, $ = this._config.input?.label || "Value", B = this._config.input?.placeholder || "", q = !!this._config.input?.required, O = !!this._config.checkbox?.enabled, D = this._config.checkbox?.label || "Remember this choice", M = this.state, b = this._runtimeError || this._config.errorMessage || this.getAttribute("error-message") || "", w = `ui-alert-title-${this._uid}`, A = `ui-alert-description-${this._uid}`, z = `ui-alert-error-${this._uid}`, H = !!this.querySelector('[slot="title"]'), V = !!this.querySelector('[slot="description"]'), R = !!this.querySelector('[slot="icon"]'), W = !!this.querySelector('[slot="footer"]'), P = !!this.querySelector('[slot="content"]'), g = H || !!t, m = V || !!e, j = R || g || m, K = this._config.showCancel ?? this.dismissible, Y = this._config.showClose ?? this.dismissible, N = this.tone, v = this.hasAttribute(c) ? "" : this.getAttribute("aria-label") || "", F = this.getAttribute("aria-labelledby") || "", C = this.getAttribute("aria-describedby") || "", x = F || (g ? w : ""), E = v || (x ? "" : t || e || "Dialog"), U = (this.querySelector('[slot="title"]')?.textContent || "").replace(/\s+/g, " ").trim();
1029
+ const t = this._config.title ?? this.getAttribute("title") ?? "", i = this._config.description ?? this.getAttribute("description") ?? "", r = this._config.confirmText ?? this.getAttribute("confirm-text") ?? "Confirm", a = this._config.cancelText ?? this.getAttribute("cancel-text") ?? "Cancel", o = this._config.loadingText ?? this.getAttribute("loading-text") ?? "Working...", n = !!this._config.input?.enabled, $ = this._config.input?.label || "Value", B = this._config.input?.placeholder || "", q = !!this._config.input?.required, D = !!this._config.checkbox?.enabled, M = this._config.checkbox?.label || "Remember this choice", O = this.state, b = this._runtimeError || this._config.errorMessage || this.getAttribute("error-message") || "", w = `ui-alert-title-${this._uid}`, A = `ui-alert-description-${this._uid}`, z = `ui-alert-error-${this._uid}`, H = !!this.querySelector('[slot="title"]'), V = !!this.querySelector('[slot="description"]'), W = !!this.querySelector('[slot="icon"]'), R = !!this.querySelector('[slot="footer"]'), P = !!this.querySelector('[slot="content"]'), g = H || !!t, m = V || !!i, j = W || g || m, K = this._config.showCancel ?? this.dismissible, Y = this._config.showClose ?? this.dismissible, N = this.tone, v = this.hasAttribute(l) ? "" : this.getAttribute("aria-label") || "", F = this.getAttribute("aria-labelledby") || "", C = this.getAttribute("aria-describedby") || "", x = F || (g ? w : ""), I = v || (x ? "" : t || i || "Dialog"), Z = (this.querySelector('[slot="title"]')?.textContent || "").replace(/\s+/g, " ").trim();
1025
1030
  this._syncHostSemantics(
1026
1031
  !0,
1027
- v || U || t || e || "Dialog",
1032
+ v || Z || t || i || "Dialog",
1028
1033
  !!v || !!F
1029
1034
  );
1030
1035
  const d = [];
1031
1036
  C ? d.push(C) : (m && d.push(A), b && d.push(z));
1032
- const h = M === "loading";
1037
+ const h = O === "loading";
1033
1038
  this.setContent(`
1034
- <style>${Q}</style>
1039
+ <style>${it}</style>
1035
1040
  <div class="backdrop" part="backdrop" role="presentation" data-open="${String(this.open)}" data-state="open" ${this._presented ? "data-instant" : ""}>
1036
1041
  <section
1037
1042
  class="dialog"
1038
1043
  part="dialog"
1039
1044
  role="${s(this.roleType)}"
1040
1045
  aria-modal="true"
1041
- ${E ? `aria-label="${s(E)}"` : ""}
1046
+ ${I ? `aria-label="${s(I)}"` : ""}
1042
1047
  ${x ? `aria-labelledby="${s(x)}"` : ""}
1043
1048
  ${d.length ? `aria-describedby="${s(d.join(" "))}"` : ""}
1044
1049
  tabindex="-1"
@@ -1053,12 +1058,12 @@ const c = "data-ui-auto-name", l = class l extends Z {
1053
1058
  <div class="header-main">
1054
1059
  <span class="icon-wrap" part="icon-wrap" aria-hidden="true">
1055
1060
  <span class="icon" part="icon">
1056
- <slot name="icon">${nt(N)}</slot>
1061
+ <slot name="icon">${ct(N)}</slot>
1057
1062
  </span>
1058
1063
  </span>
1059
1064
  <div class="heading">
1060
1065
  ${g ? `<h2 id="${w}" class="title" part="title"><slot name="title">${s(t)}</slot></h2>` : ""}
1061
- ${m ? `<p id="${A}" class="description" part="description"><slot name="description">${s(e)}</slot></p>` : ""}
1066
+ ${m ? `<p id="${A}" class="description" part="description"><slot name="description">${s(i)}</slot></p>` : ""}
1062
1067
  </div>
1063
1068
  </div>
1064
1069
  </header>` : ""}
@@ -1079,10 +1084,10 @@ const c = "data-ui-auto-name", l = class l extends Z {
1079
1084
  />
1080
1085
  </label>` : ""}
1081
1086
 
1082
- ${O ? `<label class="checkbox" part="checkbox">
1087
+ ${D ? `<label class="checkbox" part="checkbox">
1083
1088
  <span class="checkbox-line">
1084
1089
  <input class="checkbox-input" type="checkbox" ${this.getChecked() ? "checked" : ""} ${h ? "disabled" : ""} />
1085
- <span>${s(D)}</span>
1090
+ <span>${s(M)}</span>
1086
1091
  </span>
1087
1092
  </label>` : ""}
1088
1093
  </div>
@@ -1092,18 +1097,18 @@ const c = "data-ui-auto-name", l = class l extends Z {
1092
1097
  <footer class="footer" part="footer">
1093
1098
  ${h ? `<span class="loading"><span class="spinner" aria-hidden="true"></span><span>${s(o)}</span></span>` : '<span aria-hidden="true"></span>'}
1094
1099
 
1095
- ${W ? '<slot name="footer"></slot>' : `${K ? `<button class="btn btn-cancel" part="cancel" type="button" ${h ? "disabled" : ""}>${s(a)}</button>` : ""}
1100
+ ${R ? '<slot name="footer"></slot>' : `${K ? `<button class="btn btn-cancel" part="cancel" type="button" ${h ? "disabled" : ""}>${s(a)}</button>` : ""}
1096
1101
  <button class="btn btn-confirm" part="confirm" type="button" ${h ? "disabled" : ""}>${s(r)}</button>`}
1097
1102
  </footer>
1098
1103
  </section>
1099
1104
  </div>
1100
1105
  `);
1101
- const I = this.root.querySelector(".backdrop");
1102
- I && !this.headless && J(I, { resetBox: !1 }), this._presented = !0;
1106
+ const E = this.root.querySelector(".backdrop");
1107
+ E && !this.headless && tt(E, { resetBox: !1 }), this._presented = !0;
1103
1108
  }
1104
1109
  };
1105
- l._openStack = [];
1106
- let y = l;
1110
+ c._openStack = [];
1111
+ let y = c;
1107
1112
  typeof customElements < "u" && !customElements.get("ui-alert-dialog") && customElements.define("ui-alert-dialog", y);
1108
1113
  export {
1109
1114
  y as UIAlertDialog
package/dist/alert.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-DxbvhLJs.js"),z=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=require("./ElementBase-CbUsP3D6.js"),k=`
2
2
  :host {
3
3
  display: block;
4
4
  --ui-alert-radius: var(--base-alert-radius, var(--ui-radius, 6px));
@@ -334,23 +334,23 @@
334
334
  border-color: Highlight;
335
335
  }
336
336
  }
337
- `;function n(r){return String(r).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function k(r){return r==="neutral"||r==="success"||r==="warning"||r==="danger"?r:"info"}function _(r){return r==="surface"||r==="outline"||r==="solid"||r==="soft"?r:"surface"}function C(r){return r==="sm"||r==="lg"?r:r==="1"?"sm":r==="3"?"lg":"md"}function S(r){return r==="banner"?"banner":"inline"}function A(r){return r==="none"||r==="low"||r==="high"?r:"low"}function $(r){return r==="none"?"none":"line"}function B(r,i="var(--base-alert-radius, var(--ui-radius, 6px))"){if(!r||!r.trim())return i;const t=r.trim().toLowerCase();return t==="full"||t==="pill"?"999px":t==="square"||t==="none"?"0px":/^-?\d+(\.\d+)?$/.test(t)?`${t}px`:r.trim()}function o(r,i){return Array.from(r.children).some(t=>{if(!(t instanceof HTMLElement))return!1;const e=t.getAttribute("slot")||"";return i?e===i:e===""})}function E(r){return r==="success"?'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M5 10.2 8.3 13.4 15 6.8"></path></svg>':r==="warning"?'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.6 17 16.4H3L10 3.6Z"></path><path d="M10 8v3.4"></path><circle cx="10" cy="14.1" r="0.9" fill="currentColor" stroke="none"></circle></svg>':r==="danger"?'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="m7.5 7.5 5 5M12.5 7.5l-5 5"></path></svg>':'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="M10 13v-3.8"></path><circle cx="10" cy="6.5" r="0.9" fill="currentColor" stroke="none"></circle></svg>'}class l extends y.ElementBase{constructor(){super(),this._dismissBtn=null,this._actionsSlot=null,this._onDismiss=this._onDismiss.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["title","description","dismissible","tone","variant","layout","headless","hidden","size","radius","elevation","indicator"]}disconnectedCallback(){this._dismissBtn&&(this._dismissBtn.removeEventListener("click",this._onDismiss),this._dismissBtn=null),this._actionsSlot&&(this._actionsSlot.removeEventListener("slotchange",this._onSlotChange),this._actionsSlot=null),super.disconnectedCallback()}get open(){return!this.hasAttribute("hidden")}set open(i){i?this.removeAttribute("hidden"):this.setAttribute("hidden","")}connectedCallback(){super.connectedCallback(),this._syncHostStyles()}attributeChangedCallback(i,t,e){if(t!==e){if(i==="radius"){this._syncHostStyles();return}super.attributeChangedCallback(i,t,e)}}_onDismiss(i){i.preventDefault();const t=new CustomEvent("close",{bubbles:!0,cancelable:!0});this.dispatchEvent(t),t.defaultPrevented||(this.open=!1)}_onSlotChange(){const i=this.root.querySelector(".actions");if(!i||!this._actionsSlot)return;const t=this._actionsSlot.assignedNodes({flatten:!0}).length>0;i.setAttribute("data-empty",t?"false":"true")}_syncHostStyles(){const i=this.getAttribute("radius");if(i&&i.trim()){this.style.setProperty("--ui-alert-radius",B(i));return}this.style.removeProperty("--ui-alert-radius")}render(){const i=this.getAttribute("title")||"",t=this.getAttribute("description")||"",e=this.hasAttribute("dismissible"),a=k(this.getAttribute("tone")),u=_(this.getAttribute("variant")),c=S(this.getAttribute("layout")),d=C(this.getAttribute("size")),h=A(this.getAttribute("elevation")),p=$(this.getAttribute("indicator")),s=a==="danger"||a==="warning"?"alert":"status",g=s==="alert"?"assertive":"polite",b=o(this,"title"),f=o(this),v=o(this,"actions"),m=i||b?`<div class="title" part="title"><slot name="title">${n(i)}</slot></div>`:"",x=t||f?`<div class="description" part="description"><slot>${n(t)}</slot></div>`:"",w=a==="danger"?"Dismiss critical alert":"Dismiss alert";this.setContent(`
338
- <style>${z}</style>
339
- <section class="alert tone-${a} variant-${u} layout-${c} size-${d} elevation-${h} indicator-${p}" part="base" role="${s}" aria-live="${g}" aria-atomic="true">
337
+ `;function n(r){return String(r).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function _(r){return r==="neutral"||r==="success"||r==="warning"||r==="danger"?r:"info"}function C(r){return r==="surface"||r==="outline"||r==="solid"||r==="soft"?r:"surface"}function S(r){return r==="sm"||r==="lg"?r:r==="1"?"sm":r==="3"?"lg":"md"}function A(r){return r==="banner"?"banner":"inline"}function $(r){return r==="none"||r==="low"||r==="high"?r:"low"}function B(r){return r==="none"?"none":"line"}function E(r,i="var(--base-alert-radius, var(--ui-radius, 6px))"){if(!r||!r.trim())return i;const t=r.trim().toLowerCase();return t==="full"||t==="pill"?"999px":t==="square"||t==="none"?"0px":/^-?\d+(\.\d+)?$/.test(t)?`${t}px`:r.trim()}function o(r,i){return Array.from(r.children).some(t=>{if(!(t instanceof HTMLElement))return!1;const e=t.getAttribute("slot")||"";return i?e===i:e===""})}function L(r){return r==="success"?'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M5 10.2 8.3 13.4 15 6.8"></path></svg>':r==="warning"?'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3.6 17 16.4H3L10 3.6Z"></path><path d="M10 8v3.4"></path><circle cx="10" cy="14.1" r="0.9" fill="currentColor" stroke="none"></circle></svg>':r==="danger"?'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="m7.5 7.5 5 5M12.5 7.5l-5 5"></path></svg>':'<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.1"></circle><path d="M10 13v-3.8"></path><circle cx="10" cy="6.5" r="0.9" fill="currentColor" stroke="none"></circle></svg>'}class l extends z.ElementBase{constructor(){super(),this._dismissBtn=null,this._actionsSlot=null,this._onDismiss=this._onDismiss.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["title","description","dismissible","tone","variant","layout","headless","hidden","size","radius","elevation","indicator","live"]}disconnectedCallback(){this._dismissBtn&&(this._dismissBtn.removeEventListener("click",this._onDismiss),this._dismissBtn=null),this._actionsSlot&&(this._actionsSlot.removeEventListener("slotchange",this._onSlotChange),this._actionsSlot=null),super.disconnectedCallback()}get open(){return!this.hasAttribute("hidden")}set open(i){i?this.removeAttribute("hidden"):this.setAttribute("hidden","")}connectedCallback(){super.connectedCallback(),this._syncHostStyles()}attributeChangedCallback(i,t,e){if(t!==e){if(i==="radius"){this._syncHostStyles();return}super.attributeChangedCallback(i,t,e)}}_onDismiss(i){i.preventDefault();const t=new CustomEvent("close",{bubbles:!0,cancelable:!0});this.dispatchEvent(t),t.defaultPrevented||(this.open=!1)}_onSlotChange(){const i=this.root.querySelector(".actions");if(!i||!this._actionsSlot)return;const t=this._actionsSlot.assignedNodes({flatten:!0}).length>0;i.setAttribute("data-empty",t?"false":"true")}_syncHostStyles(){const i=this.getAttribute("radius");if(i&&i.trim()){this.style.setProperty("--ui-alert-radius",E(i));return}this.style.removeProperty("--ui-alert-radius")}render(){const i=this.getAttribute("title")||"",t=this.getAttribute("description")||"",e=this.hasAttribute("dismissible"),a=_(this.getAttribute("tone")),u=C(this.getAttribute("variant")),c=A(this.getAttribute("layout")),d=S(this.getAttribute("size")),h=$(this.getAttribute("elevation")),p=B(this.getAttribute("indicator")),g=this.getAttribute("live")!=="false",s=a==="danger"||a==="warning"?"alert":"status",b=g?`role="${s}" aria-live="${s==="alert"?"assertive":"polite"}" aria-atomic="true"`:"",f=o(this,"title"),v=o(this),m=o(this,"actions"),x=i||f?`<div class="title" part="title"><slot name="title">${n(i)}</slot></div>`:"",w=t||v?`<div class="description" part="description"><slot>${n(t)}</slot></div>`:"",y=a==="danger"?"Dismiss critical alert":"Dismiss alert";this.setContent(`
338
+ <style>${k}</style>
339
+ <section class="alert tone-${a} variant-${u} layout-${c} size-${d} elevation-${h} indicator-${p}" part="base" ${b}>
340
340
  <div class="row">
341
341
  <span class="icon-wrap" part="icon-wrap" aria-hidden="true">
342
342
  <span class="icon" part="icon">
343
- <slot name="icon">${E(a)}</slot>
343
+ <slot name="icon">${L(a)}</slot>
344
344
  </span>
345
345
  </span>
346
346
  <div class="content">
347
- ${m}
348
347
  ${x}
349
- <div class="actions" part="actions" data-empty="${v?"false":"true"}">
348
+ ${w}
349
+ <div class="actions" part="actions" data-empty="${m?"false":"true"}">
350
350
  <slot name="actions"></slot>
351
351
  </div>
352
352
  </div>
353
- ${e?`<button class="dismiss" part="dismiss" type="button" aria-label="${w}">
353
+ ${e?`<button class="dismiss" part="dismiss" type="button" aria-label="${y}">
354
354
  <svg width="14" height="14" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round">
355
355
  <path d="m6 6 8 8M14 6l-8 8"></path>
356
356
  </svg>