@editora/ui-core 0.1.19 → 0.1.20

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 (299) hide show
  1. package/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
  2. package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
  3. package/dist/accordion.cjs.js +3 -3
  4. package/dist/accordion.esm.js +39 -62
  5. package/dist/alert-dialog.cjs.js +19 -19
  6. package/dist/alert-dialog.esm.js +69 -87
  7. package/dist/alert.cjs.js +1 -1
  8. package/dist/alert.esm.js +4 -7
  9. package/dist/anchor.cjs.js +2 -2
  10. package/dist/anchor.esm.js +3 -3
  11. package/dist/animated-beam.cjs.js +83 -83
  12. package/dist/animated-beam.esm.js +250 -277
  13. package/dist/animated-list.cjs.js +4 -4
  14. package/dist/animated-list.esm.js +47 -61
  15. package/dist/animated-text.cjs.js +2 -2
  16. package/dist/animated-text.esm.js +13 -24
  17. package/dist/app-header.cjs.js +3 -3
  18. package/dist/app-header.esm.js +11 -13
  19. package/dist/aspect-ratio.cjs.js +1 -1
  20. package/dist/aspect-ratio.esm.js +4 -7
  21. package/dist/avatar.cjs.js +1 -1
  22. package/dist/avatar.esm.js +7 -13
  23. package/dist/badge.cjs.js +1 -1
  24. package/dist/badge.esm.js +4 -7
  25. package/dist/block-controls.cjs.js +2 -2
  26. package/dist/block-controls.esm.js +19 -35
  27. package/dist/box.cjs.js +1 -1
  28. package/dist/box.esm.js +8 -15
  29. package/dist/breadcrumb.cjs.js +2 -2
  30. package/dist/breadcrumb.esm.js +20 -37
  31. package/dist/button.cjs.js +1 -521
  32. package/dist/button.esm.js +2 -671
  33. package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
  34. package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
  35. package/dist/calendar.cjs.js +1 -1
  36. package/dist/calendar.esm.js +8 -9
  37. package/dist/card.cjs.js +4 -4
  38. package/dist/card.esm.js +13 -19
  39. package/dist/chart.cjs.js +64 -64
  40. package/dist/chart.esm.js +223 -254
  41. package/dist/checkbox.cjs.js +1 -1
  42. package/dist/checkbox.esm.js +2 -3
  43. package/dist/collapsible.cjs.js +1 -1
  44. package/dist/collapsible.esm.js +5 -9
  45. package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
  46. package/dist/collection.cjs.js +1 -1
  47. package/dist/collection.esm.js +4 -7
  48. package/dist/color-picker.cjs.js +9 -9
  49. package/dist/color-picker.esm.js +189 -252
  50. package/dist/combobox.cjs.js +13 -13
  51. package/dist/combobox.esm.js +93 -126
  52. package/dist/command-palette.cjs.js +3 -3
  53. package/dist/command-palette.esm.js +19 -30
  54. package/dist/command.cjs.js +4 -4
  55. package/dist/command.esm.js +41 -53
  56. package/dist/components/ui-orbiter.d.ts.map +1 -1
  57. package/dist/components/ui-skeleton.d.ts.map +1 -1
  58. package/dist/components/ui-split-button.d.ts +1 -0
  59. package/dist/components/ui-split-button.d.ts.map +1 -1
  60. package/dist/components/ui-time-picker.d.ts.map +1 -1
  61. package/dist/container.cjs.js +2 -2
  62. package/dist/container.esm.js +2 -3
  63. package/dist/context-menu.cjs.js +8 -8
  64. package/dist/context-menu.esm.js +157 -219
  65. package/dist/control-group.cjs.js +1 -1
  66. package/dist/control-group.esm.js +2 -3
  67. package/dist/data-table.cjs.js +4 -4
  68. package/dist/data-table.esm.js +299 -381
  69. package/dist/date-field.cjs.js +3 -3
  70. package/dist/date-field.esm.js +68 -80
  71. package/dist/date-picker.cjs.js +9 -9
  72. package/dist/date-picker.esm.js +69 -97
  73. package/dist/date-range-picker.cjs.js +3 -3
  74. package/dist/date-range-picker.esm.js +32 -56
  75. package/dist/date-range-time-picker.cjs.js +9 -9
  76. package/dist/date-range-time-picker.esm.js +111 -140
  77. package/dist/date-time-picker.cjs.js +4 -4
  78. package/dist/date-time-picker.esm.js +112 -144
  79. package/dist/date-time-utils-Dmost5Ee.js +1 -0
  80. package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
  81. package/dist/description.cjs.js +1 -1
  82. package/dist/description.esm.js +3 -5
  83. package/dist/dialog.cjs.js +12 -12
  84. package/dist/dialog.esm.js +44 -63
  85. package/dist/direction-provider.cjs.js +1 -1
  86. package/dist/direction-provider.esm.js +2 -3
  87. package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
  88. package/dist/dismissable-layer-DNfrKA20.js +1 -0
  89. package/dist/dismissable-layer.cjs.js +2 -2
  90. package/dist/dismissable-layer.esm.js +4 -6
  91. package/dist/dock.cjs.js +5 -5
  92. package/dist/dock.esm.js +134 -155
  93. package/dist/drawer.cjs.js +2 -2
  94. package/dist/drawer.esm.js +18 -35
  95. package/dist/dropdown.cjs.js +2 -2
  96. package/dist/dropdown.esm.js +119 -149
  97. package/dist/dropzone.cjs.js +1 -1
  98. package/dist/dropzone.esm.js +0 -1
  99. package/dist/empty-state.cjs.js +1 -1
  100. package/dist/empty-state.esm.js +1 -1
  101. package/dist/field-error.cjs.js +1 -1
  102. package/dist/field-error.esm.js +3 -5
  103. package/dist/field.cjs.js +5 -5
  104. package/dist/field.esm.js +27 -34
  105. package/dist/fieldset.cjs.js +4 -4
  106. package/dist/fieldset.esm.js +19 -24
  107. package/dist/file-upload.cjs.js +4 -4
  108. package/dist/file-upload.esm.js +69 -93
  109. package/dist/flex.cjs.js +1 -1
  110. package/dist/flex.esm.js +5 -9
  111. package/dist/floating-toolbar.cjs.js +4 -4
  112. package/dist/floating-toolbar.esm.js +60 -85
  113. package/dist/focus-scope-Bwug2gDv.js +1 -0
  114. package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
  115. package/dist/focus-scope.cjs.js +2 -2
  116. package/dist/focus-scope.esm.js +15 -20
  117. package/dist/form.cjs.js +2 -2
  118. package/dist/form.esm.js +26 -53
  119. package/dist/gantt.cjs.js +43 -43
  120. package/dist/gantt.esm.js +295 -322
  121. package/dist/grid.cjs.js +1 -1
  122. package/dist/grid.esm.js +5 -9
  123. package/dist/hover-card.cjs.js +4 -4
  124. package/dist/hover-card.esm.js +22 -28
  125. package/dist/icon-cloud.cjs.js +7 -7
  126. package/dist/icon-cloud.esm.js +48 -62
  127. package/dist/icon.cjs.js +1 -1
  128. package/dist/icon.esm.js +2 -4
  129. package/dist/index.cjs.js +1 -1
  130. package/dist/index.esm.js +378 -390
  131. package/dist/inline-edit.cjs.js +11 -11
  132. package/dist/inline-edit.esm.js +32 -36
  133. package/dist/input.cjs.js +17 -17
  134. package/dist/input.esm.js +50 -63
  135. package/dist/label.cjs.js +2 -2
  136. package/dist/label.esm.js +8 -17
  137. package/dist/layout.cjs.js +2 -2
  138. package/dist/layout.esm.js +20 -26
  139. package/dist/listbox-B6QgECax.js +46 -0
  140. package/dist/listbox-DJamVeFj.mjs +200 -0
  141. package/dist/listbox.cjs.js +1 -1
  142. package/dist/listbox.esm.js +2 -4
  143. package/dist/marquee.cjs.js +5 -5
  144. package/dist/marquee.esm.js +33 -50
  145. package/dist/masonry-grid.cjs.js +1 -1
  146. package/dist/masonry-grid.esm.js +5 -9
  147. package/dist/menu.cjs.js +3 -3
  148. package/dist/menu.esm.js +106 -126
  149. package/dist/menubar.cjs.js +5 -5
  150. package/dist/menubar.esm.js +118 -164
  151. package/dist/meter.cjs.js +2 -2
  152. package/dist/meter.esm.js +4 -4
  153. package/dist/multi-select.cjs.js +4 -4
  154. package/dist/multi-select.esm.js +120 -140
  155. package/dist/navigation-menu.cjs.js +4 -4
  156. package/dist/navigation-menu.esm.js +44 -55
  157. package/dist/number-field.cjs.js +2 -2
  158. package/dist/number-field.esm.js +73 -98
  159. package/dist/number-ticker.cjs.js +3 -3
  160. package/dist/number-ticker.esm.js +22 -43
  161. package/dist/odometer.cjs.js +1 -1
  162. package/dist/odometer.esm.js +5 -9
  163. package/dist/orbiter.cjs.js +13 -13
  164. package/dist/orbiter.esm.js +79 -90
  165. package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
  166. package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
  167. package/dist/pagination.cjs.js +2 -2
  168. package/dist/pagination.esm.js +14 -18
  169. package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
  170. package/dist/panel-group-CaD0_KQf.js +36 -0
  171. package/dist/panel-group.cjs.js +1 -1
  172. package/dist/panel-group.esm.js +2 -5
  173. package/dist/panel.cjs.js +4 -4
  174. package/dist/panel.esm.js +8 -10
  175. package/dist/password-field.cjs.js +9 -9
  176. package/dist/password-field.esm.js +62 -82
  177. package/dist/pin-input.cjs.js +3 -3
  178. package/dist/pin-input.esm.js +33 -39
  179. package/dist/placement-grid.cjs.js +4 -4
  180. package/dist/placement-grid.esm.js +108 -131
  181. package/dist/plugin-panel.cjs.js +7 -7
  182. package/dist/plugin-panel.esm.js +13 -15
  183. package/dist/popover.cjs.js +2 -2
  184. package/dist/popover.esm.js +21 -31
  185. package/dist/portal-DgpQ3Jo1.js +1 -0
  186. package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
  187. package/dist/portal.cjs.js +2 -2
  188. package/dist/portal.esm.js +10 -19
  189. package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
  190. package/dist/positioner-D_fqyx_j.js +1 -0
  191. package/dist/positioner.cjs.js +2 -2
  192. package/dist/positioner.esm.js +11 -18
  193. package/dist/presence.cjs.js +1 -1
  194. package/dist/presence.esm.js +7 -13
  195. package/dist/progress.cjs.js +1 -1
  196. package/dist/progress.esm.js +5 -9
  197. package/dist/quick-actions.cjs.js +6 -6
  198. package/dist/quick-actions.esm.js +52 -62
  199. package/dist/radio-group.cjs.js +13 -13
  200. package/dist/radio-group.esm.js +39 -51
  201. package/dist/radio.cjs.js +1 -1
  202. package/dist/radio.esm.js +5 -9
  203. package/dist/rating.cjs.js +1 -1
  204. package/dist/rating.esm.js +12 -23
  205. package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
  206. package/dist/roving-focus-group.cjs.js +1 -1
  207. package/dist/roving-focus-group.esm.js +3 -5
  208. package/dist/runtime-CTaOSmBj.js +1 -0
  209. package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
  210. package/dist/runtime.cjs.js +1 -1
  211. package/dist/runtime.esm.js +6 -6
  212. package/dist/scroll-area.cjs.js +3 -3
  213. package/dist/scroll-area.esm.js +38 -46
  214. package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
  215. package/dist/section.cjs.js +1 -1
  216. package/dist/section.esm.js +1 -1
  217. package/dist/select.cjs.js +7 -7
  218. package/dist/select.esm.js +67 -97
  219. package/dist/selection-popup.cjs.js +1 -1
  220. package/dist/selection-popup.esm.js +8 -15
  221. package/dist/separator.cjs.js +1 -1
  222. package/dist/separator.esm.js +1 -1
  223. package/dist/sidebar.cjs.js +18 -18
  224. package/dist/sidebar.esm.js +117 -139
  225. package/dist/skeleton.cjs.js +11 -11
  226. package/dist/skeleton.esm.js +27 -24
  227. package/dist/slider.cjs.js +1 -1
  228. package/dist/slider.esm.js +6 -11
  229. package/dist/slot.cjs.js +4 -4
  230. package/dist/slot.esm.js +16 -19
  231. package/dist/sortable.cjs.js +45 -45
  232. package/dist/sortable.esm.js +421 -524
  233. package/dist/spinning-text.cjs.js +12 -12
  234. package/dist/spinning-text.esm.js +80 -92
  235. package/dist/split-button.cjs.js +4 -4
  236. package/dist/split-button.esm.js +77 -62
  237. package/dist/splitter.cjs.js +1 -1
  238. package/dist/splitter.esm.js +1 -1
  239. package/dist/stepper.cjs.js +8 -8
  240. package/dist/stepper.esm.js +32 -52
  241. package/dist/switch.cjs.js +7 -7
  242. package/dist/switch.esm.js +23 -31
  243. package/dist/table.cjs.js +2 -2
  244. package/dist/table.esm.js +46 -56
  245. package/dist/tabs.cjs.js +3 -3
  246. package/dist/tabs.esm.js +35 -55
  247. package/dist/tags-input.cjs.js +4 -4
  248. package/dist/tags-input.esm.js +45 -62
  249. package/dist/textarea.cjs.js +6 -6
  250. package/dist/textarea.esm.js +32 -41
  251. package/dist/time-field.cjs.js +4 -4
  252. package/dist/time-field.esm.js +70 -84
  253. package/dist/time-picker.cjs.js +22 -22
  254. package/dist/time-picker.esm.js +88 -110
  255. package/dist/timeline.cjs.js +1 -1
  256. package/dist/timeline.esm.js +3 -5
  257. package/dist/toast.cjs.js +2 -2
  258. package/dist/toast.esm.js +33 -47
  259. package/dist/toggle-group.cjs.js +6 -6
  260. package/dist/toggle-group.esm.js +85 -105
  261. package/dist/toggle.cjs.js +1 -1
  262. package/dist/toggle.esm.js +3 -5
  263. package/dist/toolbar.cjs.js +1 -1
  264. package/dist/toolbar.esm.js +13 -24
  265. package/dist/tooltip.cjs.js +2 -2
  266. package/dist/tooltip.esm.js +31 -42
  267. package/dist/transfer-list.cjs.js +19 -19
  268. package/dist/transfer-list.esm.js +98 -111
  269. package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
  270. package/dist/tree-Dx_kv_ih.js +39 -0
  271. package/dist/tree-item.cjs.js +2 -2
  272. package/dist/tree-item.esm.js +2 -3
  273. package/dist/tree.cjs.js +1 -1
  274. package/dist/tree.esm.js +2 -5
  275. package/dist/ui-button-Q0GNNWKC.mjs +665 -0
  276. package/dist/ui-button-rXQOS9QJ.js +521 -0
  277. package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
  278. package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
  279. package/dist/visually-hidden.cjs.js +1 -1
  280. package/dist/visually-hidden.esm.js +1 -1
  281. package/dist/wizard.cjs.js +14 -14
  282. package/dist/wizard.esm.js +85 -105
  283. package/package.json +2 -2
  284. package/dist/date-time-utils-66480de4.js +0 -1
  285. package/dist/date-time-utils-a2c7af25.mjs +0 -307
  286. package/dist/dismissable-layer-193e3bed.js +0 -1
  287. package/dist/focus-scope-2b12b4e7.js +0 -1
  288. package/dist/listbox-308789a0.mjs +0 -210
  289. package/dist/listbox-ef2f708e.js +0 -46
  290. package/dist/panel-group-40254cdd.js +0 -36
  291. package/dist/portal-c69756c0.js +0 -1
  292. package/dist/positioner-33529bb8.js +0 -1
  293. package/dist/runtime-3f13807b.js +0 -1
  294. package/dist/tree-0a7a8d05.js +0 -39
  295. /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
  296. /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
  297. /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
  298. /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
  299. /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { E as J } from "./ElementBase-909688f3.mjs";
2
- import { a as L, r as S } from "./scroll-lock-31da444f.mjs";
3
- const Q = `
1
+ import { E as K } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { a as F, r as z } from "./scroll-lock-LfqXXqsu.mjs";
3
+ const Y = `
4
4
  :host {
5
5
  display: block;
6
6
  color-scheme: light dark;
@@ -499,47 +499,44 @@ const Q = `
499
499
  border: 1px solid CanvasText;
500
500
  }
501
501
  }
502
- `, X = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
502
+ `, N = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
503
503
  function p(e, t) {
504
- if (e == null)
505
- return t;
504
+ if (e == null) return t;
506
505
  const i = e.trim().toLowerCase();
507
506
  return i !== "false" && i !== "0" && i !== "off";
508
507
  }
509
508
  function a(e) {
510
509
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
511
510
  }
512
- function tt(e) {
511
+ function Z(e) {
513
512
  return e === "info" || e === "success" || e === "warning" || e === "danger" ? e : "neutral";
514
513
  }
515
- function it(e) {
514
+ function G(e) {
516
515
  return e === "sm" || e === "1" ? "sm" : e === "lg" || e === "3" ? "lg" : "md";
517
516
  }
518
- function et(e) {
517
+ function J(e) {
519
518
  return e === "soft" || e === "outline" || e === "solid" ? e : "surface";
520
519
  }
521
- function rt(e) {
520
+ function Q(e) {
522
521
  return e === "none" || e === "high" ? e : "low";
523
522
  }
524
- function st(e) {
523
+ function U(e) {
525
524
  return e === "none" ? "none" : "line";
526
525
  }
527
- function at(e, t = "var(--base-alert-dialog-radius, var(--ui-radius, 4px))") {
528
- if (e == null)
529
- return t;
526
+ function X(e, t = "var(--base-alert-dialog-radius, var(--ui-radius, 4px))") {
527
+ if (e == null) return t;
530
528
  const i = e.trim().toLowerCase();
531
529
  return i ? i === "full" || i === "pill" ? "999px" : /^-?\d+(\.\d+)?$/.test(i) ? `${i}px` : e : t;
532
530
  }
533
- const ot = /* @__PURE__ */ new Set(["tone", "size", "variant", "elevation", "indicator", "radius"]);
534
- function nt(e) {
531
+ const tt = /* @__PURE__ */ new Set(["tone", "size", "variant", "elevation", "indicator", "radius"]);
532
+ function it(e) {
535
533
  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>';
536
534
  }
537
- function l() {
535
+ function c() {
538
536
  return typeof window < "u" && typeof document < "u";
539
537
  }
540
- function $() {
541
- if (!l())
542
- return null;
538
+ function E() {
539
+ if (!c()) return null;
543
540
  const e = document.activeElement;
544
541
  return e instanceof HTMLElement ? e : null;
545
542
  }
@@ -555,7 +552,7 @@ function h(e) {
555
552
  window.clearTimeout(e);
556
553
  }
557
554
  }
558
- const B = class c extends J {
555
+ const l = class l extends K {
559
556
  constructor() {
560
557
  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._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;
561
558
  }
@@ -595,7 +592,7 @@ const B = class c extends J {
595
592
  }
596
593
  attributeChangedCallback(t, i, r) {
597
594
  if (i !== r) {
598
- if (ot.has(t)) {
595
+ if (tt.has(t)) {
599
596
  this._syncVisualTokens();
600
597
  return;
601
598
  }
@@ -653,7 +650,7 @@ const B = class c extends J {
653
650
  this.setAttribute("role", t);
654
651
  }
655
652
  get tone() {
656
- return tt(this.getAttribute("tone"));
653
+ return Z(this.getAttribute("tone"));
657
654
  }
658
655
  set tone(t) {
659
656
  if (t === "neutral") {
@@ -663,7 +660,7 @@ const B = class c extends J {
663
660
  this.setAttribute("tone", t);
664
661
  }
665
662
  get size() {
666
- return it(this.getAttribute("size"));
663
+ return G(this.getAttribute("size"));
667
664
  }
668
665
  set size(t) {
669
666
  if (t === "md") {
@@ -673,7 +670,7 @@ const B = class c extends J {
673
670
  this.setAttribute("size", t);
674
671
  }
675
672
  get variant() {
676
- return et(this.getAttribute("variant"));
673
+ return J(this.getAttribute("variant"));
677
674
  }
678
675
  set variant(t) {
679
676
  if (t === "surface") {
@@ -683,7 +680,7 @@ const B = class c extends J {
683
680
  this.setAttribute("variant", t);
684
681
  }
685
682
  get elevation() {
686
- return rt(this.getAttribute("elevation"));
683
+ return Q(this.getAttribute("elevation"));
687
684
  }
688
685
  set elevation(t) {
689
686
  if (t === "low") {
@@ -693,7 +690,7 @@ const B = class c extends J {
693
690
  this.setAttribute("elevation", t);
694
691
  }
695
692
  get indicator() {
696
- return st(this.getAttribute("indicator"));
693
+ return U(this.getAttribute("indicator"));
697
694
  }
698
695
  set indicator(t) {
699
696
  if (t === "line") {
@@ -743,12 +740,10 @@ const B = class c extends J {
743
740
  return this._config;
744
741
  }
745
742
  set config(t) {
746
- var i, r;
747
- this._config = t || {}, this._config.id && (this._dialogId = this._config.id), this._config.dismissible != null && (this.dismissible = !!this._config.dismissible), this._config.closeOnEsc != null && (this.closeOnEsc = !!this._config.closeOnEsc), this._config.closeOnBackdrop != null && (this.closeOnBackdrop = !!this._config.closeOnBackdrop), this._config.lockWhileLoading != null && (this.lockWhileLoading = !!this._config.lockWhileLoading), this._config.role && (this.roleType = this._config.role), this._config.tone && (this.tone = this._config.tone), this._config.size && (this.size = this._config.size), this._config.variant && (this.variant = this._config.variant), this._config.elevation && (this.elevation = this._config.elevation), this._config.indicator && (this.indicator = this._config.indicator), this._config.radius != null && (this.radius = String(this._config.radius)), this._config.ariaLabel && this.setAttribute("aria-label", this._config.ariaLabel), this._config.ariaLabelledby && this.setAttribute("aria-labelledby", this._config.ariaLabelledby), this._config.ariaDescribedby && this.setAttribute("aria-describedby", this._config.ariaDescribedby), this._config.initialFocus && (this.initialFocus = this._config.initialFocus), this._config.headless != null && (this.headless = !!this._config.headless), this._inputValue = ((i = this._config.input) == null ? void 0 : i.value) ?? this._inputValue, this._checked = ((r = this._config.checkbox) == null ? void 0 : r.checked) ?? this._checked, this._runtimeError = this._config.errorMessage || "", this._syncVisualTokens(), this.requestRender();
743
+ this._config = t || {}, this._config.id && (this._dialogId = this._config.id), this._config.dismissible != null && (this.dismissible = !!this._config.dismissible), this._config.closeOnEsc != null && (this.closeOnEsc = !!this._config.closeOnEsc), this._config.closeOnBackdrop != null && (this.closeOnBackdrop = !!this._config.closeOnBackdrop), this._config.lockWhileLoading != null && (this.lockWhileLoading = !!this._config.lockWhileLoading), this._config.role && (this.roleType = this._config.role), this._config.tone && (this.tone = this._config.tone), this._config.size && (this.size = this._config.size), this._config.variant && (this.variant = this._config.variant), this._config.elevation && (this.elevation = this._config.elevation), this._config.indicator && (this.indicator = this._config.indicator), this._config.radius != null && (this.radius = String(this._config.radius)), this._config.ariaLabel && this.setAttribute("aria-label", this._config.ariaLabel), this._config.ariaLabelledby && this.setAttribute("aria-labelledby", this._config.ariaLabelledby), this._config.ariaDescribedby && this.setAttribute("aria-describedby", this._config.ariaDescribedby), this._config.initialFocus && (this.initialFocus = this._config.initialFocus), this._config.headless != null && (this.headless = !!this._config.headless), this._inputValue = this._config.input?.value ?? this._inputValue, this._checked = this._config.checkbox?.checked ?? this._checked, this._runtimeError = this._config.errorMessage || "", this._syncVisualTokens(), this.requestRender();
748
744
  }
749
745
  getInputValue() {
750
- const t = this.root.querySelector(".input");
751
- return (t == null ? void 0 : t.value) ?? this._inputValue;
746
+ return this.root.querySelector(".input")?.value ?? this._inputValue;
752
747
  }
753
748
  setInputValue(t) {
754
749
  this._inputValue = t;
@@ -756,8 +751,7 @@ const B = class c extends J {
756
751
  i && (i.value = t);
757
752
  }
758
753
  getChecked() {
759
- const t = this.root.querySelector(".checkbox-input");
760
- return (t == null ? void 0 : t.checked) ?? this._checked;
754
+ return this.root.querySelector(".checkbox-input")?.checked ?? this._checked;
761
755
  }
762
756
  setChecked(t) {
763
757
  this._checked = t;
@@ -777,7 +771,7 @@ const B = class c extends J {
777
771
  this.hasAttribute("role") || this.setAttribute("role", "alertdialog");
778
772
  }
779
773
  _syncVisualTokens() {
780
- this.style.setProperty("--ui-alert-radius", at(this.getAttribute("radius")));
774
+ this.style.setProperty("--ui-alert-radius", X(this.getAttribute("radius")));
781
775
  }
782
776
  _syncOpenState() {
783
777
  const t = this.hasAttribute("open");
@@ -788,18 +782,17 @@ const B = class c extends J {
788
782
  !t && this._active && this._deactivate();
789
783
  }
790
784
  _activate() {
791
- 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 : $(), this.headless || L(), l() && !this.headless && document.addEventListener("focusin", this._onFocusIn, !0);
785
+ 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 : E(), this.headless || F(), c() && !this.headless && document.addEventListener("focusin", this._onFocusIn, !0);
792
786
  const t = this.dialogId || this._uid;
793
787
  this._dispatchWithLegacy("ui-open", "open", { id: t }), this.headless || (this._focusInitialFrame && h(this._focusInitialFrame), this._focusInitialFrame = v(() => {
794
788
  this._focusInitialFrame = 0, this._focusInitial();
795
789
  })), this.requestRender();
796
790
  }
797
791
  _deactivate() {
798
- if (!this._active)
799
- return;
792
+ if (!this._active) return;
800
793
  this._active = !1;
801
- const t = c._openStack.lastIndexOf(this);
802
- if (t >= 0 && c._openStack.splice(t, 1), l() && !this._activeHeadless && document.removeEventListener("focusin", this._onFocusIn, !0), this._activeHeadless || S(), !this._terminalEmitted) {
794
+ const t = l._openStack.lastIndexOf(this);
795
+ if (t >= 0 && l._openStack.splice(t, 1), c() && !this._activeHeadless && document.removeEventListener("focusin", this._onFocusIn, !0), this._activeHeadless || z(), !this._terminalEmitted) {
803
796
  const r = this._closeMeta || { action: "dismiss", source: "abort" }, s = this.dialogId || this._uid;
804
797
  r.action === "cancel" ? this._dispatchWithLegacy("ui-cancel", "cancel", { id: s }) : r.action === "dismiss" && this._dispatchWithLegacy("ui-dismiss", "dismiss", {
805
798
  id: s,
@@ -824,10 +817,10 @@ const B = class c extends J {
824
817
  _syncActiveEnvironment() {
825
818
  if (this._active && this.headless !== this._activeHeadless) {
826
819
  if (this.headless) {
827
- l() && document.removeEventListener("focusin", this._onFocusIn, !0), S(), this._lastActive = null, this._activeHeadless = !0;
820
+ c() && document.removeEventListener("focusin", this._onFocusIn, !0), z(), this._lastActive = null, this._activeHeadless = !0;
828
821
  return;
829
822
  }
830
- this._lastActive = $(), L(), l() && document.addEventListener("focusin", this._onFocusIn, !0), this._activeHeadless = !1, this._focusInitialFrame && h(this._focusInitialFrame), this._focusInitialFrame = v(() => {
823
+ this._lastActive = E(), F(), c() && document.addEventListener("focusin", this._onFocusIn, !0), this._activeHeadless = !1, this._focusInitialFrame && h(this._focusInitialFrame), this._focusInitialFrame = v(() => {
831
824
  this._focusInitialFrame = 0, this._focusInitial();
832
825
  });
833
826
  }
@@ -849,28 +842,24 @@ const B = class c extends J {
849
842
  return this.dispatchEvent(n), o;
850
843
  }
851
844
  _isTopMost() {
852
- if (!this._active)
853
- return !1;
854
- const t = c._openStack;
845
+ if (!this._active) return !1;
846
+ const t = l._openStack;
855
847
  return t.length > 0 && t[t.length - 1] === this;
856
848
  }
857
849
  _queryPanel() {
858
850
  return this.root.querySelector(".dialog");
859
851
  }
860
852
  _collectFocusable(t) {
861
- return Array.from(t.querySelectorAll(X)).filter((i) => {
862
- if (i.disabled || i.getAttribute("aria-hidden") === "true")
863
- return !1;
864
- const s = l() ? window.getComputedStyle(i) : null;
853
+ return Array.from(t.querySelectorAll(N)).filter((i) => {
854
+ if (i.disabled || i.getAttribute("aria-hidden") === "true") return !1;
855
+ const s = c() ? window.getComputedStyle(i) : null;
865
856
  return !(s && (s.display === "none" || s.visibility === "hidden"));
866
857
  });
867
858
  }
868
859
  _focusInitial() {
869
- if (!this.open)
870
- return;
860
+ if (!this.open) return;
871
861
  const t = this._queryPanel();
872
- if (!t)
873
- return;
862
+ if (!t) return;
874
863
  const i = this.initialFocus;
875
864
  if (i) {
876
865
  const n = t.querySelector(i);
@@ -887,11 +876,9 @@ const B = class c extends J {
887
876
  }
888
877
  }
889
878
  _handleTab(t) {
890
- if (t.key !== "Tab")
891
- return;
879
+ if (t.key !== "Tab") return;
892
880
  const i = this._queryPanel();
893
- if (!i)
894
- return;
881
+ if (!i) return;
895
882
  const r = this._collectFocusable(i);
896
883
  if (!r.length) {
897
884
  t.preventDefault(), i.focus();
@@ -905,11 +892,9 @@ const B = class c extends J {
905
892
  s === n && (t.preventDefault(), o.focus());
906
893
  }
907
894
  _onFocusIn(t) {
908
- if (!this.open || !this._isTopMost())
909
- return;
895
+ if (!this.open || !this._isTopMost()) return;
910
896
  const i = this._queryPanel();
911
- if (!i)
912
- return;
897
+ if (!i) return;
913
898
  const r = t.target;
914
899
  (typeof t.composedPath == "function" ? t.composedPath() : []).includes(i) || r && i.contains(r) || this._focusInitial();
915
900
  }
@@ -939,8 +924,7 @@ const B = class c extends J {
939
924
  this._isInteractionLocked() || this.close("cancel");
940
925
  }
941
926
  _onClick(t) {
942
- if (!this.open || !this._isTopMost())
943
- return;
927
+ if (!this.open || !this._isTopMost()) return;
944
928
  const i = t.target;
945
929
  if (i) {
946
930
  if (i.classList.contains("backdrop") && this.closeOnBackdrop) {
@@ -961,8 +945,7 @@ const B = class c extends J {
961
945
  _onKeyDown(t) {
962
946
  if (!(!this.open || !this._isTopMost())) {
963
947
  if (t.key === "Escape") {
964
- if (!this.closeOnEsc)
965
- return;
948
+ if (!this.closeOnEsc) return;
966
949
  t.preventDefault(), t.stopPropagation(), this._requestDismiss("esc");
967
950
  return;
968
951
  }
@@ -970,77 +953,76 @@ const B = class c extends J {
970
953
  }
971
954
  }
972
955
  render() {
973
- var A, F, z, I, E, C;
974
956
  if (!this.open) {
975
957
  this.setContent("");
976
958
  return;
977
959
  }
978
- const t = this._config.title ?? this.getAttribute("title") ?? "", i = this._config.description ?? this.getAttribute("description") ?? "", r = this._config.confirmText ?? this.getAttribute("confirm-text") ?? "Confirm", s = this._config.cancelText ?? this.getAttribute("cancel-text") ?? "Cancel", o = this._config.loadingText ?? this.getAttribute("loading-text") ?? "Working...", n = !!((A = this._config.input) != null && A.enabled), T = ((F = this._config.input) == null ? void 0 : F.label) || "Value", q = ((z = this._config.input) == null ? void 0 : z.placeholder) || "", D = !!((I = this._config.input) != null && I.required), M = !!((E = this._config.checkbox) != null && E.enabled), O = ((C = this._config.checkbox) == null ? void 0 : C.label) || "Remember this choice", V = this.state, f = this._runtimeError || this._config.errorMessage || this.getAttribute("error-message") || "", x = `ui-alert-title-${this._uid}`, _ = `ui-alert-description-${this._uid}`, k = `ui-alert-error-${this._uid}`, H = !!this.querySelector('[slot="title"]'), W = !!this.querySelector('[slot="description"]'), R = !!this.querySelector('[slot="icon"]'), P = !!this.querySelector('[slot="footer"]'), j = !!this.querySelector('[slot="content"]'), g = H || !!t, b = W || !!i, K = R || g || b, Y = this._config.showCancel ?? this.dismissible, U = this._config.showClose ?? this.dismissible, N = this.tone, Z = this.getAttribute("aria-label") || "", G = this.getAttribute("aria-labelledby") || "", y = this.getAttribute("aria-describedby") || "", m = G || (g ? x : ""), w = Z || (m ? "" : t || i || "Dialog"), u = [];
979
- y ? u.push(y) : (b && u.push(_), f && u.push(k));
980
- const d = V === "loading";
960
+ const t = this._config.title ?? this.getAttribute("title") ?? "", i = this._config.description ?? this.getAttribute("description") ?? "", r = this._config.confirmText ?? this.getAttribute("confirm-text") ?? "Confirm", s = this._config.cancelText ?? this.getAttribute("cancel-text") ?? "Cancel", o = this._config.loadingText ?? this.getAttribute("loading-text") ?? "Working...", n = !!this._config.input?.enabled, I = this._config.input?.label || "Value", C = this._config.input?.placeholder || "", L = !!this._config.input?.required, S = !!this._config.checkbox?.enabled, $ = this._config.checkbox?.label || "Remember this choice", B = this.state, f = this._runtimeError || this._config.errorMessage || this.getAttribute("error-message") || "", _ = `ui-alert-title-${this._uid}`, k = `ui-alert-description-${this._uid}`, y = `ui-alert-error-${this._uid}`, T = !!this.querySelector('[slot="title"]'), q = !!this.querySelector('[slot="description"]'), M = !!this.querySelector('[slot="icon"]'), O = !!this.querySelector('[slot="footer"]'), D = !!this.querySelector('[slot="content"]'), g = T || !!t, b = q || !!i, V = M || g || b, H = this._config.showCancel ?? this.dismissible, W = this._config.showClose ?? this.dismissible, R = this.tone, P = this.getAttribute("aria-label") || "", j = this.getAttribute("aria-labelledby") || "", w = this.getAttribute("aria-describedby") || "", m = j || (g ? _ : ""), A = P || (m ? "" : t || i || "Dialog"), u = [];
961
+ w ? u.push(w) : (b && u.push(k), f && u.push(y));
962
+ const d = B === "loading";
981
963
  this.setContent(`
982
- <style>${Q}</style>
964
+ <style>${Y}</style>
983
965
  <div class="backdrop" part="backdrop" role="presentation" data-open="${String(this.open)}">
984
966
  <section
985
967
  class="dialog"
986
968
  part="dialog"
987
969
  role="${a(this.roleType)}"
988
970
  aria-modal="true"
989
- ${w ? `aria-label="${a(w)}"` : ""}
971
+ ${A ? `aria-label="${a(A)}"` : ""}
990
972
  ${m ? `aria-labelledby="${a(m)}"` : ""}
991
973
  ${u.length ? `aria-describedby="${a(u.join(" "))}"` : ""}
992
974
  tabindex="-1"
993
975
  >
994
- ${U ? `<button class="close" part="close" aria-label="Close dialog">
976
+ ${W ? `<button class="close" part="close" aria-label="Close dialog">
995
977
  <svg width="14" height="14" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round">
996
978
  <path d="m6 6 8 8M14 6l-8 8"></path>
997
979
  </svg>
998
980
  </button>` : ""}
999
981
 
1000
- ${K ? `<header class="header">
982
+ ${V ? `<header class="header">
1001
983
  <div class="header-main">
1002
984
  <span class="icon-wrap" part="icon-wrap" aria-hidden="true">
1003
985
  <span class="icon" part="icon">
1004
- <slot name="icon">${nt(N)}</slot>
986
+ <slot name="icon">${it(R)}</slot>
1005
987
  </span>
1006
988
  </span>
1007
989
  <div class="heading">
1008
- ${g ? `<h2 id="${x}" class="title" part="title"><slot name="title">${a(t)}</slot></h2>` : ""}
1009
- ${b ? `<p id="${_}" class="description" part="description"><slot name="description">${a(i)}</slot></p>` : ""}
990
+ ${g ? `<h2 id="${_}" class="title" part="title"><slot name="title">${a(t)}</slot></h2>` : ""}
991
+ ${b ? `<p id="${k}" class="description" part="description"><slot name="description">${a(i)}</slot></p>` : ""}
1010
992
  </div>
1011
993
  </div>
1012
994
  </header>` : ""}
1013
995
 
1014
996
  <div class="content" part="content">
1015
- ${j ? '<slot name="content"></slot>' : "<slot></slot>"}
997
+ ${D ? '<slot name="content"></slot>' : "<slot></slot>"}
1016
998
 
1017
999
  ${n ? `<label class="input-wrap">
1018
- <span class="label">${a(T)}</span>
1000
+ <span class="label">${a(I)}</span>
1019
1001
  <input
1020
1002
  class="input"
1021
1003
  part="input"
1022
1004
  type="text"
1023
1005
  value="${a(this.getInputValue())}"
1024
- placeholder="${a(q)}"
1025
- ${D ? "required" : ""}
1006
+ placeholder="${a(C)}"
1007
+ ${L ? "required" : ""}
1026
1008
  ${d ? "disabled" : ""}
1027
1009
  />
1028
1010
  </label>` : ""}
1029
1011
 
1030
- ${M ? `<label class="checkbox" part="checkbox">
1012
+ ${S ? `<label class="checkbox" part="checkbox">
1031
1013
  <span class="checkbox-line">
1032
1014
  <input class="checkbox-input" type="checkbox" ${this.getChecked() ? "checked" : ""} ${d ? "disabled" : ""} />
1033
- <span>${a(O)}</span>
1015
+ <span>${a($)}</span>
1034
1016
  </span>
1035
1017
  </label>` : ""}
1036
1018
  </div>
1037
1019
 
1038
- <div class="error" id="${k}" part="error" aria-live="polite" data-empty="${String(!f)}">${a(f)}</div>
1020
+ <div class="error" id="${y}" part="error" aria-live="polite" data-empty="${String(!f)}">${a(f)}</div>
1039
1021
 
1040
1022
  <footer class="footer" part="footer">
1041
1023
  ${d ? `<span class="loading"><span class="spinner" aria-hidden="true"></span><span>${a(o)}</span></span>` : '<span aria-hidden="true"></span>'}
1042
1024
 
1043
- ${P ? '<slot name="footer"></slot>' : `${Y ? `<button class="btn btn-cancel" part="cancel" type="button" ${d ? "disabled" : ""}>${a(s)}</button>` : ""}
1025
+ ${O ? '<slot name="footer"></slot>' : `${H ? `<button class="btn btn-cancel" part="cancel" type="button" ${d ? "disabled" : ""}>${a(s)}</button>` : ""}
1044
1026
  <button class="btn btn-confirm" part="confirm" type="button" ${d ? "disabled" : ""}>${a(r)}</button>`}
1045
1027
  </footer>
1046
1028
  </section>
@@ -1048,9 +1030,9 @@ const B = class c extends J {
1048
1030
  `);
1049
1031
  }
1050
1032
  };
1051
- B._openStack = [];
1052
- let lt = B;
1053
- typeof customElements < "u" && !customElements.get("ui-alert-dialog") && customElements.define("ui-alert-dialog", lt);
1033
+ l._openStack = [];
1034
+ let x = l;
1035
+ typeof customElements < "u" && !customElements.get("ui-alert-dialog") && customElements.define("ui-alert-dialog", x);
1054
1036
  export {
1055
- lt as UIAlertDialog
1037
+ x as UIAlertDialog
1056
1038
  };
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-1b301e7f.js"),z=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-EV6mVBUV.js"),z=`
2
2
  :host {
3
3
  display: block;
4
4
  --ui-alert-radius: var(--base-alert-radius, var(--ui-radius, 4px));
package/dist/alert.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as w } from "./ElementBase-909688f3.mjs";
1
+ import { E as w } from "./ElementBase-YlTLMsGk.mjs";
2
2
  const y = `
3
3
  :host {
4
4
  display: block;
@@ -349,15 +349,13 @@ function A(i) {
349
349
  return i === "none" ? "none" : "line";
350
350
  }
351
351
  function $(i, r = "var(--base-alert-radius, var(--ui-radius, 4px))") {
352
- if (!i || !i.trim())
353
- return r;
352
+ if (!i || !i.trim()) return r;
354
353
  const t = i.trim().toLowerCase();
355
354
  return t === "full" || t === "pill" ? "999px" : t === "square" || t === "none" ? "0px" : /^-?\d+(\.\d+)?$/.test(t) ? `${t}px` : i.trim();
356
355
  }
357
356
  function s(i, r) {
358
357
  return Array.from(i.children).some((t) => {
359
- if (!(t instanceof HTMLElement))
360
- return !1;
358
+ if (!(t instanceof HTMLElement)) return !1;
361
359
  const e = t.getAttribute("slot") || "";
362
360
  return r ? e === r : e === "";
363
361
  });
@@ -400,8 +398,7 @@ class B extends w {
400
398
  }
401
399
  _onSlotChange() {
402
400
  const r = this.root.querySelector(".actions");
403
- if (!r || !this._actionsSlot)
404
- return;
401
+ if (!r || !this._actionsSlot) return;
405
402
  const t = this._actionsSlot.assignedNodes({ flatten: !0 }).length > 0;
406
403
  r.setAttribute("data-empty", t ? "false" : "true");
407
404
  }
@@ -22,9 +22,9 @@
22
22
  cursor: default;
23
23
  opacity: 0.6;
24
24
  }
25
- `;class i extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"});t.innerHTML=`
25
+ `;class i extends HTMLElement{static get observedAttributes(){return["href","target","rel","download","hreflang","referrerpolicy","ping","type","aria-label","title"]}constructor(){super();const t=this.attachShadow({mode:"open"});t.innerHTML=`
26
26
  <style>${r}</style>
27
27
  <a part="anchor">
28
28
  <slot></slot>
29
29
  </a>
30
- `,this.anchorEl=t.querySelector("a")}static get observedAttributes(){return["href","target","rel","download","hreflang","referrerpolicy","ping","type","aria-label","title"]}connectedCallback(){this.syncAttributes()}attributeChangedCallback(){this.syncAttributes()}syncAttributes(){const t=this.getAttribute("href");this.syncAttribute("href"),this.syncAttribute("target"),this.syncAttribute("rel"),this.syncAttribute("download"),this.syncAttribute("hreflang"),this.syncAttribute("referrerpolicy"),this.syncAttribute("ping"),this.syncAttribute("type"),this.syncAttribute("aria-label"),this.syncAttribute("title"),t?this.anchorEl.removeAttribute("aria-disabled"):(this.anchorEl.removeAttribute("href"),this.anchorEl.setAttribute("aria-disabled","true"))}syncAttribute(t){const e=this.getAttribute(t);if(e==null){this.anchorEl.removeAttribute(t);return}this.anchorEl.setAttribute(t,e)}}typeof customElements<"u"&&!customElements.get("ui-anchor")&&customElements.define("ui-anchor",i);exports.UIAnchor=i;
30
+ `,this.anchorEl=t.querySelector("a")}connectedCallback(){this.syncAttributes()}attributeChangedCallback(){this.syncAttributes()}syncAttributes(){const t=this.getAttribute("href");this.syncAttribute("href"),this.syncAttribute("target"),this.syncAttribute("rel"),this.syncAttribute("download"),this.syncAttribute("hreflang"),this.syncAttribute("referrerpolicy"),this.syncAttribute("ping"),this.syncAttribute("type"),this.syncAttribute("aria-label"),this.syncAttribute("title"),t?this.anchorEl.removeAttribute("aria-disabled"):(this.anchorEl.removeAttribute("href"),this.anchorEl.setAttribute("aria-disabled","true"))}syncAttribute(t){const e=this.getAttribute(t);if(e==null){this.anchorEl.removeAttribute(t);return}this.anchorEl.setAttribute(t,e)}}typeof customElements<"u"&&!customElements.get("ui-anchor")&&customElements.define("ui-anchor",i);exports.UIAnchor=i;
@@ -24,6 +24,9 @@ const i = `
24
24
  }
25
25
  `;
26
26
  class r extends HTMLElement {
27
+ static get observedAttributes() {
28
+ return ["href", "target", "rel", "download", "hreflang", "referrerpolicy", "ping", "type", "aria-label", "title"];
29
+ }
27
30
  constructor() {
28
31
  super();
29
32
  const t = this.attachShadow({ mode: "open" });
@@ -34,9 +37,6 @@ class r extends HTMLElement {
34
37
  </a>
35
38
  `, this.anchorEl = t.querySelector("a");
36
39
  }
37
- static get observedAttributes() {
38
- return ["href", "target", "rel", "download", "hreflang", "referrerpolicy", "ping", "type", "aria-label", "title"];
39
- }
40
40
  connectedCallback() {
41
41
  this.syncAttributes();
42
42
  }