@editora/ui-core 0.1.19 → 0.1.21

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 (313) 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 +30 -29
  48. package/dist/color-picker.cjs.js +10 -10
  49. package/dist/color-picker.esm.js +190 -253
  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-collection.d.ts.map +1 -1
  57. package/dist/components/ui-multi-select.d.ts.map +1 -1
  58. package/dist/components/ui-orbiter.d.ts.map +1 -1
  59. package/dist/components/ui-portal.d.ts.map +1 -1
  60. package/dist/components/ui-positioner.d.ts.map +1 -1
  61. package/dist/components/ui-skeleton.d.ts.map +1 -1
  62. package/dist/components/ui-sortable.d.ts +8 -0
  63. package/dist/components/ui-sortable.d.ts.map +1 -1
  64. package/dist/components/ui-split-button.d.ts +1 -0
  65. package/dist/components/ui-split-button.d.ts.map +1 -1
  66. package/dist/components/ui-tabs.d.ts.map +1 -1
  67. package/dist/components/ui-textarea.d.ts.map +1 -1
  68. package/dist/components/ui-time-picker.d.ts.map +1 -1
  69. package/dist/container.cjs.js +2 -2
  70. package/dist/container.esm.js +2 -3
  71. package/dist/context-menu.cjs.js +8 -8
  72. package/dist/context-menu.esm.js +157 -219
  73. package/dist/control-group.cjs.js +1 -1
  74. package/dist/control-group.esm.js +2 -3
  75. package/dist/data-table.cjs.js +4 -4
  76. package/dist/data-table.esm.js +299 -381
  77. package/dist/date-field.cjs.js +3 -3
  78. package/dist/date-field.esm.js +68 -80
  79. package/dist/date-picker.cjs.js +9 -9
  80. package/dist/date-picker.esm.js +69 -97
  81. package/dist/date-range-picker.cjs.js +3 -3
  82. package/dist/date-range-picker.esm.js +32 -56
  83. package/dist/date-range-time-picker.cjs.js +9 -9
  84. package/dist/date-range-time-picker.esm.js +111 -140
  85. package/dist/date-time-picker.cjs.js +7 -7
  86. package/dist/date-time-picker.esm.js +115 -147
  87. package/dist/date-time-utils-Dmost5Ee.js +1 -0
  88. package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
  89. package/dist/description.cjs.js +1 -1
  90. package/dist/description.esm.js +3 -5
  91. package/dist/dialog.cjs.js +12 -12
  92. package/dist/dialog.esm.js +44 -63
  93. package/dist/direction-provider.cjs.js +1 -1
  94. package/dist/direction-provider.esm.js +2 -3
  95. package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
  96. package/dist/dismissable-layer-DNfrKA20.js +1 -0
  97. package/dist/dismissable-layer.cjs.js +2 -2
  98. package/dist/dismissable-layer.esm.js +4 -6
  99. package/dist/dock.cjs.js +5 -5
  100. package/dist/dock.esm.js +134 -155
  101. package/dist/drawer.cjs.js +2 -2
  102. package/dist/drawer.esm.js +18 -35
  103. package/dist/dropdown.cjs.js +2 -2
  104. package/dist/dropdown.esm.js +119 -149
  105. package/dist/dropzone.cjs.js +1 -1
  106. package/dist/dropzone.esm.js +0 -1
  107. package/dist/empty-state.cjs.js +1 -1
  108. package/dist/empty-state.esm.js +1 -1
  109. package/dist/field-error.cjs.js +1 -1
  110. package/dist/field-error.esm.js +3 -5
  111. package/dist/field.cjs.js +5 -5
  112. package/dist/field.esm.js +27 -34
  113. package/dist/fieldset.cjs.js +4 -4
  114. package/dist/fieldset.esm.js +19 -24
  115. package/dist/file-upload.cjs.js +4 -4
  116. package/dist/file-upload.esm.js +69 -93
  117. package/dist/flex.cjs.js +1 -1
  118. package/dist/flex.esm.js +5 -9
  119. package/dist/floating-toolbar.cjs.js +4 -4
  120. package/dist/floating-toolbar.esm.js +60 -85
  121. package/dist/focus-scope-Bwug2gDv.js +1 -0
  122. package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
  123. package/dist/focus-scope.cjs.js +2 -2
  124. package/dist/focus-scope.esm.js +15 -20
  125. package/dist/form.cjs.js +2 -2
  126. package/dist/form.esm.js +26 -53
  127. package/dist/gantt.cjs.js +43 -43
  128. package/dist/gantt.esm.js +295 -322
  129. package/dist/grid.cjs.js +1 -1
  130. package/dist/grid.esm.js +5 -9
  131. package/dist/hover-card.cjs.js +4 -4
  132. package/dist/hover-card.esm.js +22 -28
  133. package/dist/icon-cloud.cjs.js +7 -7
  134. package/dist/icon-cloud.esm.js +48 -62
  135. package/dist/icon.cjs.js +1 -1
  136. package/dist/icon.esm.js +2 -4
  137. package/dist/index.cjs.js +1 -1
  138. package/dist/index.esm.js +378 -390
  139. package/dist/inline-edit.cjs.js +11 -11
  140. package/dist/inline-edit.esm.js +32 -36
  141. package/dist/input.cjs.js +17 -17
  142. package/dist/input.esm.js +50 -63
  143. package/dist/label.cjs.js +2 -2
  144. package/dist/label.esm.js +8 -17
  145. package/dist/layout.cjs.js +2 -2
  146. package/dist/layout.esm.js +20 -26
  147. package/dist/listbox-B6QgECax.js +46 -0
  148. package/dist/listbox-DJamVeFj.mjs +200 -0
  149. package/dist/listbox.cjs.js +1 -1
  150. package/dist/listbox.esm.js +2 -4
  151. package/dist/marquee.cjs.js +5 -5
  152. package/dist/marquee.esm.js +33 -50
  153. package/dist/masonry-grid.cjs.js +1 -1
  154. package/dist/masonry-grid.esm.js +5 -9
  155. package/dist/menu.cjs.js +3 -3
  156. package/dist/menu.esm.js +106 -126
  157. package/dist/menubar.cjs.js +5 -5
  158. package/dist/menubar.esm.js +118 -164
  159. package/dist/meter.cjs.js +2 -2
  160. package/dist/meter.esm.js +4 -4
  161. package/dist/multi-select.cjs.js +5 -5
  162. package/dist/multi-select.esm.js +125 -137
  163. package/dist/navigation-menu.cjs.js +4 -4
  164. package/dist/navigation-menu.esm.js +44 -55
  165. package/dist/number-field.cjs.js +2 -2
  166. package/dist/number-field.esm.js +73 -98
  167. package/dist/number-ticker.cjs.js +3 -3
  168. package/dist/number-ticker.esm.js +22 -43
  169. package/dist/odometer.cjs.js +1 -1
  170. package/dist/odometer.esm.js +5 -9
  171. package/dist/orbiter.cjs.js +13 -13
  172. package/dist/orbiter.esm.js +79 -90
  173. package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
  174. package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
  175. package/dist/pagination.cjs.js +2 -2
  176. package/dist/pagination.esm.js +14 -18
  177. package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
  178. package/dist/panel-group-CaD0_KQf.js +36 -0
  179. package/dist/panel-group.cjs.js +1 -1
  180. package/dist/panel-group.esm.js +2 -5
  181. package/dist/panel.cjs.js +4 -4
  182. package/dist/panel.esm.js +8 -10
  183. package/dist/password-field.cjs.js +9 -9
  184. package/dist/password-field.esm.js +62 -82
  185. package/dist/pin-input.cjs.js +3 -3
  186. package/dist/pin-input.esm.js +33 -39
  187. package/dist/placement-grid.cjs.js +4 -4
  188. package/dist/placement-grid.esm.js +108 -131
  189. package/dist/plugin-panel.cjs.js +7 -7
  190. package/dist/plugin-panel.esm.js +13 -15
  191. package/dist/popover.cjs.js +2 -2
  192. package/dist/popover.esm.js +21 -31
  193. package/dist/portal-DgpQ3Jo1.js +1 -0
  194. package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
  195. package/dist/portal.cjs.js +3 -3
  196. package/dist/portal.esm.js +20 -28
  197. package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
  198. package/dist/positioner-D_fqyx_j.js +1 -0
  199. package/dist/positioner.cjs.js +2 -2
  200. package/dist/positioner.esm.js +22 -28
  201. package/dist/presence.cjs.js +1 -1
  202. package/dist/presence.esm.js +7 -13
  203. package/dist/primitives/auto-scroll.d.ts +9 -0
  204. package/dist/primitives/auto-scroll.d.ts.map +1 -0
  205. package/dist/primitives/selector.d.ts +4 -0
  206. package/dist/primitives/selector.d.ts.map +1 -0
  207. package/dist/progress.cjs.js +1 -1
  208. package/dist/progress.esm.js +5 -9
  209. package/dist/quick-actions.cjs.js +6 -6
  210. package/dist/quick-actions.esm.js +52 -62
  211. package/dist/radio-group.cjs.js +13 -13
  212. package/dist/radio-group.esm.js +39 -51
  213. package/dist/radio.cjs.js +1 -1
  214. package/dist/radio.esm.js +5 -9
  215. package/dist/rating.cjs.js +1 -1
  216. package/dist/rating.esm.js +12 -23
  217. package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
  218. package/dist/roving-focus-group.cjs.js +1 -1
  219. package/dist/roving-focus-group.esm.js +3 -5
  220. package/dist/runtime-CTaOSmBj.js +1 -0
  221. package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
  222. package/dist/runtime.cjs.js +1 -1
  223. package/dist/runtime.esm.js +6 -6
  224. package/dist/scroll-area.cjs.js +3 -3
  225. package/dist/scroll-area.esm.js +38 -46
  226. package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
  227. package/dist/section.cjs.js +1 -1
  228. package/dist/section.esm.js +1 -1
  229. package/dist/select.cjs.js +7 -7
  230. package/dist/select.esm.js +67 -97
  231. package/dist/selection-popup.cjs.js +1 -1
  232. package/dist/selection-popup.esm.js +8 -15
  233. package/dist/selector-BvAh35ve.js +1 -0
  234. package/dist/selector-WI8pD7YO.mjs +18 -0
  235. package/dist/separator.cjs.js +1 -1
  236. package/dist/separator.esm.js +1 -1
  237. package/dist/sidebar.cjs.js +18 -18
  238. package/dist/sidebar.esm.js +117 -139
  239. package/dist/skeleton.cjs.js +11 -11
  240. package/dist/skeleton.esm.js +27 -24
  241. package/dist/slider.cjs.js +1 -1
  242. package/dist/slider.esm.js +6 -11
  243. package/dist/slot.cjs.js +4 -4
  244. package/dist/slot.esm.js +16 -19
  245. package/dist/sortable.cjs.js +79 -65
  246. package/dist/sortable.esm.js +714 -734
  247. package/dist/spinning-text.cjs.js +12 -12
  248. package/dist/spinning-text.esm.js +80 -92
  249. package/dist/split-button.cjs.js +4 -4
  250. package/dist/split-button.esm.js +77 -62
  251. package/dist/splitter.cjs.js +1 -1
  252. package/dist/splitter.esm.js +1 -1
  253. package/dist/stepper.cjs.js +8 -8
  254. package/dist/stepper.esm.js +32 -52
  255. package/dist/switch.cjs.js +7 -7
  256. package/dist/switch.esm.js +23 -31
  257. package/dist/table.cjs.js +2 -2
  258. package/dist/table.esm.js +46 -56
  259. package/dist/tabs.cjs.js +8 -8
  260. package/dist/tabs.esm.js +89 -109
  261. package/dist/tags-input.cjs.js +4 -4
  262. package/dist/tags-input.esm.js +45 -62
  263. package/dist/textarea.cjs.js +10 -10
  264. package/dist/textarea.esm.js +49 -52
  265. package/dist/time-field.cjs.js +4 -4
  266. package/dist/time-field.esm.js +70 -84
  267. package/dist/time-picker.cjs.js +22 -22
  268. package/dist/time-picker.esm.js +88 -110
  269. package/dist/timeline.cjs.js +1 -1
  270. package/dist/timeline.esm.js +3 -5
  271. package/dist/toast.cjs.js +2 -2
  272. package/dist/toast.esm.js +33 -47
  273. package/dist/toggle-group.cjs.js +6 -6
  274. package/dist/toggle-group.esm.js +85 -105
  275. package/dist/toggle.cjs.js +1 -1
  276. package/dist/toggle.esm.js +3 -5
  277. package/dist/toolbar.cjs.js +1 -1
  278. package/dist/toolbar.esm.js +13 -24
  279. package/dist/tooltip.cjs.js +2 -2
  280. package/dist/tooltip.esm.js +31 -42
  281. package/dist/transfer-list.cjs.js +31 -31
  282. package/dist/transfer-list.esm.js +114 -127
  283. package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
  284. package/dist/tree-Dx_kv_ih.js +39 -0
  285. package/dist/tree-item.cjs.js +2 -2
  286. package/dist/tree-item.esm.js +2 -3
  287. package/dist/tree.cjs.js +1 -1
  288. package/dist/tree.esm.js +2 -5
  289. package/dist/ui-button-Q0GNNWKC.mjs +665 -0
  290. package/dist/ui-button-rXQOS9QJ.js +521 -0
  291. package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
  292. package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
  293. package/dist/visually-hidden.cjs.js +1 -1
  294. package/dist/visually-hidden.esm.js +1 -1
  295. package/dist/wizard.cjs.js +14 -14
  296. package/dist/wizard.esm.js +85 -105
  297. package/package.json +2 -2
  298. package/dist/date-time-utils-66480de4.js +0 -1
  299. package/dist/date-time-utils-a2c7af25.mjs +0 -307
  300. package/dist/dismissable-layer-193e3bed.js +0 -1
  301. package/dist/focus-scope-2b12b4e7.js +0 -1
  302. package/dist/listbox-308789a0.mjs +0 -210
  303. package/dist/listbox-ef2f708e.js +0 -46
  304. package/dist/panel-group-40254cdd.js +0 -36
  305. package/dist/portal-c69756c0.js +0 -1
  306. package/dist/positioner-33529bb8.js +0 -1
  307. package/dist/runtime-3f13807b.js +0 -1
  308. package/dist/tree-0a7a8d05.js +0 -39
  309. /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
  310. /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
  311. /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
  312. /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
  313. /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
@@ -1,7 +1,6 @@
1
- import { E as R } from "./ElementBase-909688f3.mjs";
2
- import { f as M, a as q, b as $ } from "./collection-a1aac0c6.mjs";
3
- import { r as L } from "./listbox-308789a0.mjs";
4
- import "./collection.esm.js";
1
+ import { E as R } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { f as M, b as q, a as $ } from "./collection-C7URGjEI.mjs";
3
+ import { r as L } from "./listbox-DJamVeFj.mjs";
5
4
  const F = `
6
5
  :host {
7
6
  --ui-select-width: var(--ui-width, min(340px, 100%));
@@ -748,8 +747,7 @@ const F = `
748
747
  }
749
748
  `;
750
749
  function h(p) {
751
- if (p == null)
752
- return !1;
750
+ if (p == null) return !1;
753
751
  const e = String(p).toLowerCase();
754
752
  return e !== "false" && e !== "0";
755
753
  }
@@ -757,8 +755,7 @@ function f(p) {
757
755
  return String(p).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
758
756
  }
759
757
  function D(p) {
760
- if (!p)
761
- return null;
758
+ if (!p) return null;
762
759
  const e = String(p).trim();
763
760
  return e ? e === "none" ? "4px" : e === "full" ? "999px" : e === "large" ? "16px" : /^-?\\d+(\\.\\d+)?$/.test(e) ? `${e}px` : e : null;
764
761
  }
@@ -829,8 +826,7 @@ class O extends R {
829
826
  connectedCallback() {
830
827
  super.connectedCallback(), this.root.addEventListener("click", this._onRootClick), this.root.addEventListener("keydown", this._onRootKeyDown), this.root.addEventListener("pointerdown", this._onRootPointerDown), this.root.addEventListener("pointermove", this._onRootPointerMove, { passive: !0 }), this.root.addEventListener("slotchange", this._onSlotChange), this._observer = new MutationObserver((e) => {
831
828
  e.some((i) => {
832
- if (!(i.target instanceof HTMLElement) || i.target === this)
833
- return i.type === "childList";
829
+ if (!(i.target instanceof HTMLElement) || i.target === this) return i.type === "childList";
834
830
  const s = i.target.tagName.toLowerCase();
835
831
  return s === "option" || s === "optgroup";
836
832
  }) && this._scheduleOptionsSync();
@@ -903,27 +899,22 @@ class O extends R {
903
899
  t && t.closest(".menu-item") && e.preventDefault();
904
900
  }
905
901
  _onRootPointerMove(e) {
906
- if (!this._open)
907
- return;
908
- const t = e.target, i = t == null ? void 0 : t.closest(".menu-item[data-index]");
909
- if (!i)
910
- return;
902
+ if (!this._open) return;
903
+ const i = e.target?.closest(".menu-item[data-index]");
904
+ if (!i) return;
911
905
  const s = Number(i.dataset.index || "-1"), o = this._options[s];
912
906
  !o || o.disabled || s === this._activeIndex || this._setActiveIndex(s);
913
907
  }
914
908
  _onRootClick(e) {
915
909
  const t = e.target;
916
- if (!t)
917
- return;
910
+ if (!t) return;
918
911
  if (t.closest(".trigger")) {
919
- if (this.disabled)
920
- return;
912
+ if (this.disabled) return;
921
913
  this._open ? this._closeMenu({ restoreFocus: !1 }) : this._openMenu();
922
914
  return;
923
915
  }
924
916
  const i = t.closest(".menu-item[data-index]");
925
- if (!i)
926
- return;
917
+ if (!i) return;
927
918
  const s = Number(i.dataset.index || "-1"), o = this._options[s];
928
919
  !o || o.disabled || (this._applyValueFromUser(o.value), this._closeMenu());
929
920
  }
@@ -938,13 +929,11 @@ class O extends R {
938
929
  e.preventDefault(), this._open ? this._moveActive(-1) : this._openMenu();
939
930
  break;
940
931
  case "Home":
941
- if (!this._open)
942
- return;
932
+ if (!this._open) return;
943
933
  e.preventDefault(), this._setActiveIndex(this._firstEnabledIndex());
944
934
  break;
945
935
  case "End":
946
- if (!this._open)
947
- return;
936
+ if (!this._open) return;
948
937
  e.preventDefault(), this._setActiveIndex(this._lastEnabledIndex());
949
938
  break;
950
939
  case "Enter":
@@ -957,8 +946,7 @@ class O extends R {
957
946
  break;
958
947
  }
959
948
  case "Escape":
960
- if (!this._open)
961
- return;
949
+ if (!this._open) return;
962
950
  e.preventDefault(), this._closeMenu();
963
951
  break;
964
952
  case "Tab":
@@ -967,15 +955,13 @@ class O extends R {
967
955
  }
968
956
  }
969
957
  _onDocumentPointerDown(e) {
970
- if (!this._open)
971
- return;
958
+ if (!this._open) return;
972
959
  const t = typeof e.composedPath == "function" ? e.composedPath() : [];
973
960
  t.includes(this) || t.includes(this.root) || this._closeMenu({ restoreFocus: !1 });
974
961
  }
975
962
  _isInternalEvent(e) {
976
- var s, o, a;
977
963
  const t = e.target, i = typeof e.composedPath == "function" ? e.composedPath() : [];
978
- return i.includes(this) || i.includes(this.root) || t instanceof Node && (t === this || this.root.contains(t) || (s = this._controlEl) != null && s.contains(t) || (o = this._panelEl) != null && o.contains(t) || (a = this._menuEl) != null && a.contains(t)) ? !0 : !!(this._controlEl && i.includes(this._controlEl) || this._triggerEl && i.includes(this._triggerEl) || this._panelEl && i.includes(this._panelEl) || this._menuEl && i.includes(this._menuEl));
964
+ return i.includes(this) || i.includes(this.root) || t instanceof Node && (t === this || this.root.contains(t) || this._controlEl?.contains(t) || this._panelEl?.contains(t) || this._menuEl?.contains(t)) ? !0 : !!(this._controlEl && i.includes(this._controlEl) || this._triggerEl && i.includes(this._triggerEl) || this._panelEl && i.includes(this._panelEl) || this._menuEl && i.includes(this._menuEl));
979
965
  }
980
966
  _onWindowResize() {
981
967
  this._open && this._schedulePanelPlacement();
@@ -1024,26 +1010,23 @@ class O extends R {
1024
1010
  (this.getAttribute("value") || "") !== e && (this.setAttribute("value", e), this._emitValue("input", e), this._emitValue("change", e));
1025
1011
  }
1026
1012
  _attachFormRegistration() {
1027
- var o;
1028
1013
  this._formUnregister && (this._formUnregister(), this._formUnregister = null);
1029
1014
  const e = this.getAttribute("name");
1030
- if (!e)
1031
- return;
1032
- const t = this.getRootNode(), i = t instanceof ShadowRoot ? t.host : null, s = ((o = i == null ? void 0 : i.closest) == null ? void 0 : o.call(i, "ui-form")) || this.closest("ui-form");
1015
+ if (!e) return;
1016
+ const t = this.getRootNode(), s = (t instanceof ShadowRoot ? t.host : null)?.closest?.("ui-form") || this.closest("ui-form");
1033
1017
  !s || typeof s.registerField != "function" || (this._formUnregister = s.registerField(e, {
1034
1018
  name: e,
1035
1019
  getValue: () => this.value,
1036
- setValue: (a) => {
1037
- this.value = a;
1020
+ setValue: (o) => {
1021
+ this.value = o;
1038
1022
  },
1039
1023
  validate: async () => {
1040
- if (!(h(this.getAttribute("required")) || this.hasAttribute("required")))
1041
- return { valid: !0 };
1042
- const r = this.value.trim().length > 0;
1043
- return { valid: r, message: r ? void 0 : "This field is required." };
1024
+ if (!(h(this.getAttribute("required")) || this.hasAttribute("required"))) return { valid: !0 };
1025
+ const l = this.value.trim().length > 0;
1026
+ return { valid: l, message: l ? void 0 : "This field is required." };
1044
1027
  },
1045
- setError: (a) => {
1046
- a ? (this.setAttribute("validation", "error"), this.setAttribute("error", a)) : (this.getAttribute("validation") === "error" && this.removeAttribute("validation"), this.removeAttribute("error"));
1028
+ setError: (o) => {
1029
+ o ? (this.setAttribute("validation", "error"), this.setAttribute("error", o)) : (this.getAttribute("validation") === "error" && this.removeAttribute("validation"), this.removeAttribute("error"));
1047
1030
  }
1048
1031
  }));
1049
1032
  }
@@ -1056,10 +1039,10 @@ class O extends R {
1056
1039
  }
1057
1040
  _buildOptionsFromChildren() {
1058
1041
  const e = [], t = (r, u) => {
1059
- const n = (r.label || r.textContent || r.value || "").trim(), c = String(r.value ?? "");
1042
+ const n = (r.label || r.textContent || r.value || "").trim(), a = String(r.value ?? "");
1060
1043
  e.push({
1061
- value: c,
1062
- label: n || c,
1044
+ value: a,
1045
+ label: n || a,
1063
1046
  disabled: !!r.disabled,
1064
1047
  group: u
1065
1048
  });
@@ -1071,19 +1054,19 @@ class O extends R {
1071
1054
  return;
1072
1055
  }
1073
1056
  if (u === "optgroup") {
1074
- const n = r, c = (n.label || "").trim();
1075
- Array.from(n.children).forEach((l) => {
1076
- l instanceof HTMLOptionElement && e.push({
1077
- value: String(l.value ?? ""),
1078
- label: (l.label || l.textContent || l.value || "").trim() || String(l.value ?? ""),
1079
- disabled: !!l.disabled || !!n.disabled,
1080
- group: c
1057
+ const n = r, a = (n.label || "").trim();
1058
+ Array.from(n.children).forEach((c) => {
1059
+ c instanceof HTMLOptionElement && e.push({
1060
+ value: String(c.value ?? ""),
1061
+ label: (c.label || c.textContent || c.value || "").trim() || String(c.value ?? ""),
1062
+ disabled: !!c.disabled || !!n.disabled,
1063
+ group: a
1081
1064
  });
1082
1065
  });
1083
1066
  }
1084
1067
  });
1085
- const s = (this.getAttribute("placeholder") || "").trim(), o = h(this.getAttribute("required")) || this.hasAttribute("required"), a = e.some((r) => r.value === "");
1086
- return s && !o && !a && e.unshift({ value: "", label: s, disabled: !1, group: "" }), e;
1068
+ const s = (this.getAttribute("placeholder") || "").trim(), o = h(this.getAttribute("required")) || this.hasAttribute("required"), l = e.some((r) => r.value === "");
1069
+ return s && !o && !l && e.unshift({ value: "", label: s, disabled: !1, group: "" }), e;
1087
1070
  }
1088
1071
  _computeOptionsFingerprint(e) {
1089
1072
  return e.map((t) => `${t.value}${t.label}${t.disabled ? "1" : "0"}${t.group}`).join("");
@@ -1101,22 +1084,17 @@ class O extends R {
1101
1084
  return this.getAttribute("check-placement") === "start" ? "start" : "end";
1102
1085
  }
1103
1086
  _syncOptionsData() {
1104
- var c;
1105
1087
  const e = this._buildOptionsFromChildren(), t = this._computeOptionsFingerprint(e), i = t !== this._optionsFingerprint;
1106
1088
  this._options = e, this._optionsFingerprint = t;
1107
- const s = this.getAttribute("value") || "", o = this.hasAttribute("value"), a = this._options.some((l) => l.value === s), r = h(this.getAttribute("required")) || this.hasAttribute("required"), u = ((c = this._options.find((l) => !l.disabled)) == null ? void 0 : c.value) || "", n = !r && this._options.some((l) => l.value === "") ? "" : u;
1108
- return o ? a || this._setValueAttr(n) : this._setValueAttr(n), i;
1089
+ const s = this.getAttribute("value") || "", o = this.hasAttribute("value"), l = this._options.some((a) => a.value === s), r = h(this.getAttribute("required")) || this.hasAttribute("required"), u = this._options.find((a) => !a.disabled)?.value || "", n = !r && this._options.some((a) => a.value === "") ? "" : u;
1090
+ return o ? l || this._setValueAttr(n) : this._setValueAttr(n), i;
1109
1091
  }
1110
1092
  _currentDisplayText() {
1111
1093
  const e = this.value, t = (this.getAttribute("placeholder") || "").trim();
1112
- if (e === "" && t)
1113
- return t;
1114
- const i = this._options.find((s) => s.value === e);
1115
- return (i == null ? void 0 : i.label) || e;
1094
+ return e === "" && t ? t : this._options.find((s) => s.value === e)?.label || e;
1116
1095
  }
1117
1096
  _setActiveIndex(e) {
1118
- if (!this._menuEl || e === this._activeIndex)
1119
- return;
1097
+ if (!this._menuEl || e === this._activeIndex) return;
1120
1098
  this._activeIndex = e;
1121
1099
  const t = e >= 0 && this._menuItems[e] || null;
1122
1100
  this._menuEl.setActiveItem(t, {
@@ -1126,29 +1104,25 @@ class O extends R {
1126
1104
  });
1127
1105
  }
1128
1106
  _moveActive(e) {
1129
- if (!this._menuEl || !this._options.length)
1130
- return;
1107
+ if (!this._menuEl || !this._options.length) return;
1131
1108
  const t = this._activeIndex >= 0 ? this._menuItems[this._activeIndex] : null, i = this._menuEl.move(e, {
1132
1109
  current: t,
1133
1110
  focus: !1,
1134
1111
  owner: this._triggerEl,
1135
1112
  scroll: !0
1136
1113
  });
1137
- if (!i)
1138
- return;
1114
+ if (!i) return;
1139
1115
  const s = Number(i.dataset.index || "-1");
1140
1116
  s >= 0 && (this._activeIndex = s);
1141
1117
  }
1142
1118
  _selectActiveOption() {
1143
- if (this._activeIndex < 0)
1144
- return;
1119
+ if (this._activeIndex < 0) return;
1145
1120
  const e = this._options[this._activeIndex];
1146
1121
  !e || e.disabled || (this._applyValueFromUser(e.value), this._closeMenu());
1147
1122
  }
1148
1123
  _renderMenu() {
1149
1124
  const e = this._menuEl;
1150
- if (!e)
1151
- return;
1125
+ if (!e) return;
1152
1126
  const t = `${this._optionsFingerprint}${this.showCheck ? "1" : "0"}${this._checkPlacement()}`;
1153
1127
  if (this._menuItems.length > 0 && t === this._menuRenderFingerprint && this._menuItems.length === this._options.length) {
1154
1128
  this._syncMenuSelectionState(), this._schedulePanelPlacement();
@@ -1168,19 +1142,18 @@ class O extends R {
1168
1142
  r.group || (s = "__none__");
1169
1143
  const n = document.createElement("button");
1170
1144
  n.type = "button", n.className = "menu-item", n.id = `${this._uid}-opt-${u}`, n.setAttribute("role", "option"), n.setAttribute("data-index", String(u)), n.setAttribute("data-value", r.value), n.setAttribute("aria-selected", r.value === this.value ? "true" : "false"), n.setAttribute("aria-disabled", r.disabled ? "true" : "false"), n.tabIndex = -1, r.disabled && (n.disabled = !0);
1145
+ const a = document.createElement("span");
1146
+ a.className = "menu-item-label", a.textContent = r.label;
1171
1147
  const c = document.createElement("span");
1172
- c.className = "menu-item-label", c.textContent = r.label;
1173
- const l = document.createElement("span");
1174
- l.className = "menu-item-check", l.setAttribute("aria-hidden", "true");
1148
+ c.className = "menu-item-check", c.setAttribute("aria-hidden", "true");
1175
1149
  const b = this.showCheck, m = this._checkPlacement();
1176
- l.hidden = !b, n.setAttribute("data-check-placement", m), b && m === "start" ? n.append(l, c) : n.append(c, l), e.appendChild(n), this._menuItems.push(n);
1150
+ c.hidden = !b, n.setAttribute("data-check-placement", m), b && m === "start" ? n.append(c, a) : n.append(a, c), e.appendChild(n), this._menuItems.push(n);
1177
1151
  });
1178
- const o = this._menuItems[0] || null, a = this._menuItems[this._menuItems.length - 1] || null;
1179
- o && o.setAttribute("data-edge-start", "true"), a && a.setAttribute("data-edge-end", "true"), e.refresh(), this._menuRenderFingerprint = t, this._syncMenuSelectionState(), this._schedulePanelPlacement();
1152
+ const o = this._menuItems[0] || null, l = this._menuItems[this._menuItems.length - 1] || null;
1153
+ o && o.setAttribute("data-edge-start", "true"), l && l.setAttribute("data-edge-end", "true"), e.refresh(), this._menuRenderFingerprint = t, this._syncMenuSelectionState(), this._schedulePanelPlacement();
1180
1154
  }
1181
1155
  _syncMenuSelectionState() {
1182
- if (!this._menuEl)
1183
- return;
1156
+ if (!this._menuEl) return;
1184
1157
  const e = this._selectedIndex();
1185
1158
  this._menuItems.forEach((i) => {
1186
1159
  const s = Number(i.dataset.index || "-1");
@@ -1198,38 +1171,35 @@ class O extends R {
1198
1171
  }
1199
1172
  _syncPanelPlacement() {
1200
1173
  const e = this._panelEl, t = this._controlEl, i = this._menuEl;
1201
- if (!e || !t || !i || !this._open)
1202
- return;
1203
- const s = t.getBoundingClientRect(), o = window.innerHeight || document.documentElement.clientHeight || 0, a = Math.max(0, o - s.bottom - 12), r = Math.max(0, s.top - 12), u = Math.min(Math.max(i.scrollHeight, i.offsetHeight) + 4, 320), n = a < u && r > a;
1204
- this._placement = n ? "top" : "bottom", e.setAttribute("data-placement", this._placement), e.style.setProperty("--ui-select-available-height", `${Math.floor(n ? r : a)}px`);
1174
+ if (!e || !t || !i || !this._open) return;
1175
+ const s = t.getBoundingClientRect(), o = window.innerHeight || document.documentElement.clientHeight || 0, l = Math.max(0, o - s.bottom - 12), r = Math.max(0, s.top - 12), u = Math.min(Math.max(i.scrollHeight, i.offsetHeight) + 4, 320), n = l < u && r > l;
1176
+ this._placement = n ? "top" : "bottom", e.setAttribute("data-placement", this._placement), e.style.setProperty("--ui-select-available-height", `${Math.floor(n ? r : l)}px`);
1205
1177
  }
1206
1178
  _openMenu() {
1207
1179
  this._open || this.disabled || (this._cancelPanelPlacement(), this._syncOptionsData(), this._open = !0, this._syncControlState(), this._renderMenu(), this._attachOpenListeners());
1208
1180
  }
1209
1181
  _closeMenu(e = {}) {
1210
- var t, i;
1211
1182
  if (this._open && (this._open = !1, this._activeIndex = -1, this._cancelPanelPlacement(), this._teardownOpenListeners(), this._syncControlState(), e.restoreFocus !== !1))
1212
1183
  try {
1213
- (t = this._triggerEl) == null || t.focus({ preventScroll: !0 });
1184
+ this._triggerEl?.focus({ preventScroll: !0 });
1214
1185
  } catch {
1215
- (i = this._triggerEl) == null || i.focus();
1186
+ this._triggerEl?.focus();
1216
1187
  }
1217
1188
  }
1218
1189
  _syncControlState() {
1219
1190
  const e = this._triggerEl, t = this._controlEl, i = this._valueEl, s = this._panelEl;
1220
- if (!e || !t || !i || !s)
1221
- return;
1222
- const o = this.getAttribute("label") || "", a = this.getAttribute("description") || "", r = this.getAttribute("error") || "", u = this.getAttribute("aria-label") || o || "Select", n = h(this.getAttribute("loading")), c = h(this.getAttribute("required")) || this.hasAttribute("required"), l = this.getAttribute("tabindex"), b = this.hasAttribute("validation") && this.getAttribute("validation") === "error" || this.hasAttribute("invalid") || this.getAttribute("data-invalid") === "true", m = D(this.getAttribute("radius")), d = this.root.querySelector(".label"), v = this.root.querySelector(".label-text"), g = this.root.querySelector(".description"), x = this.root.querySelector(".description-text"), _ = this.root.querySelector(".error"), y = this.root.querySelector(".error-text"), w = this.root.querySelector(".meta"), A = this.root.querySelector(".required"), E = !!o || this._hasSlotContent("label"), k = !!a || this._hasSlotContent("description"), C = !!r || this._hasSlotContent("error"), I = this._hasSlotContent("leading"), z = this._hasSlotContent("trailing"), P = !!(this.getAttribute("placeholder") || "").trim() && this.value === "";
1223
- v && (v.textContent = o), x && (x.textContent = a), y && (y.textContent = r), d && (d.hidden = !E), g && (g.hidden = !k), _ && (_.hidden = !C), w && (w.hidden = !E && !k), A && (A.hidden = !c), i.textContent = this._currentDisplayText(), t.setAttribute("data-open", this._open ? "true" : "false"), t.setAttribute("data-placeholder-shown", P ? "true" : "false"), t.setAttribute("data-has-leading", String(I)), t.setAttribute("data-has-trailing", String(z)), e.disabled = this.disabled, e.setAttribute("aria-label", u), e.setAttribute("aria-expanded", this._open ? "true" : "false"), e.setAttribute("aria-busy", n ? "true" : "false"), e.setAttribute("aria-required", c ? "true" : "false"), b ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"), l != null && !this.disabled ? e.setAttribute("tabindex", l) : this.disabled ? e.setAttribute("tabindex", "-1") : e.setAttribute("tabindex", "0"), s.hidden = !this._open, s.setAttribute("data-placement", this._placement), this._open ? e.setAttribute("aria-controls", `${this._uid}-listbox`) : e.removeAttribute("aria-controls"), m && !["none", "full", "large"].includes(this.getAttribute("radius") || "") ? this.style.setProperty("--ui-select-radius", m) : this.style.removeProperty("--ui-select-radius"), this.setAttribute("aria-disabled", this.disabled ? "true" : "false"), this.setAttribute("aria-busy", n ? "true" : "false"), this.toggleAttribute("open", this._open), this._open && this._schedulePanelPlacement();
1191
+ if (!e || !t || !i || !s) return;
1192
+ const o = this.getAttribute("label") || "", l = this.getAttribute("description") || "", r = this.getAttribute("error") || "", u = this.getAttribute("aria-label") || o || "Select", n = h(this.getAttribute("loading")), a = h(this.getAttribute("required")) || this.hasAttribute("required"), c = this.getAttribute("tabindex"), b = this.hasAttribute("validation") && this.getAttribute("validation") === "error" || this.hasAttribute("invalid") || this.getAttribute("data-invalid") === "true", m = D(this.getAttribute("radius")), d = this.root.querySelector(".label"), v = this.root.querySelector(".label-text"), g = this.root.querySelector(".description"), x = this.root.querySelector(".description-text"), _ = this.root.querySelector(".error"), y = this.root.querySelector(".error-text"), w = this.root.querySelector(".meta"), A = this.root.querySelector(".required"), E = !!o || this._hasSlotContent("label"), k = !!l || this._hasSlotContent("description"), C = !!r || this._hasSlotContent("error"), I = this._hasSlotContent("leading"), z = this._hasSlotContent("trailing"), P = !!(this.getAttribute("placeholder") || "").trim() && this.value === "";
1193
+ v && (v.textContent = o), x && (x.textContent = l), y && (y.textContent = r), d && (d.hidden = !E), g && (g.hidden = !k), _ && (_.hidden = !C), w && (w.hidden = !E && !k), A && (A.hidden = !a), i.textContent = this._currentDisplayText(), t.setAttribute("data-open", this._open ? "true" : "false"), t.setAttribute("data-placeholder-shown", P ? "true" : "false"), t.setAttribute("data-has-leading", String(I)), t.setAttribute("data-has-trailing", String(z)), e.disabled = this.disabled, e.setAttribute("aria-label", u), e.setAttribute("aria-expanded", this._open ? "true" : "false"), e.setAttribute("aria-busy", n ? "true" : "false"), e.setAttribute("aria-required", a ? "true" : "false"), b ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"), c != null && !this.disabled ? e.setAttribute("tabindex", c) : this.disabled ? e.setAttribute("tabindex", "-1") : e.setAttribute("tabindex", "0"), s.hidden = !this._open, s.setAttribute("data-placement", this._placement), this._open ? e.setAttribute("aria-controls", `${this._uid}-listbox`) : e.removeAttribute("aria-controls"), m && !["none", "full", "large"].includes(this.getAttribute("radius") || "") ? this.style.setProperty("--ui-select-radius", m) : this.style.removeProperty("--ui-select-radius"), this.setAttribute("aria-disabled", this.disabled ? "true" : "false"), this.setAttribute("aria-busy", n ? "true" : "false"), this.toggleAttribute("open", this._open), this._open && this._schedulePanelPlacement();
1224
1194
  }
1225
1195
  render() {
1226
- const e = this.getAttribute("label") || "", t = this.getAttribute("description") || "", i = this.getAttribute("error") || "", s = h(this.getAttribute("required")) || this.hasAttribute("required"), o = this.getAttribute("aria-label") || e || "Select", a = !!e || this._hasSlotContent("label"), r = !!t || this._hasSlotContent("description"), u = !!i || this._hasSlotContent("error"), n = this._hasSlotContent("leading"), c = this._hasSlotContent("trailing"), l = `${this._uid}-label`, b = `${this._uid}-description`, m = `${this._uid}-error`, d = `${this._uid}-trigger`, v = `${this._uid}-listbox`, g = [r ? b : "", u ? m : ""].filter(Boolean).join(" ");
1196
+ const e = this.getAttribute("label") || "", t = this.getAttribute("description") || "", i = this.getAttribute("error") || "", s = h(this.getAttribute("required")) || this.hasAttribute("required"), o = this.getAttribute("aria-label") || e || "Select", l = !!e || this._hasSlotContent("label"), r = !!t || this._hasSlotContent("description"), u = !!i || this._hasSlotContent("error"), n = this._hasSlotContent("leading"), a = this._hasSlotContent("trailing"), c = `${this._uid}-label`, b = `${this._uid}-description`, m = `${this._uid}-error`, d = `${this._uid}-trigger`, v = `${this._uid}-listbox`, g = [r ? b : "", u ? m : ""].filter(Boolean).join(" ");
1227
1197
  this.setContent(`
1228
1198
  <style>${F}</style>
1229
1199
  <slot class="content-slot"></slot>
1230
1200
  <div class="root" part="root">
1231
- <div class="meta" part="meta" ${a || r ? "" : "hidden"}>
1232
- <label class="label" part="label" id="${l}" for="${d}" ${a ? "" : "hidden"}>
1201
+ <div class="meta" part="meta" ${l || r ? "" : "hidden"}>
1202
+ <label class="label" part="label" id="${c}" for="${d}" ${l ? "" : "hidden"}>
1233
1203
  <slot name="label"><span class="label-text">${f(e)}</span></slot>
1234
1204
  <span class="required" aria-hidden="true" ${s ? "" : "hidden"}>*</span>
1235
1205
  </label>
@@ -1238,7 +1208,7 @@ class O extends R {
1238
1208
  </p>
1239
1209
  </div>
1240
1210
  <div class="field-shell" part="field-shell">
1241
- <div class="control" part="control" data-has-leading="${n}" data-has-trailing="${c}" data-open="false">
1211
+ <div class="control" part="control" data-has-leading="${n}" data-has-trailing="${a}" data-open="false">
1242
1212
  <span class="leading" part="leading" ${n ? "" : "hidden"}>
1243
1213
  <slot name="leading"></slot>
1244
1214
  </span>
@@ -1251,12 +1221,12 @@ class O extends R {
1251
1221
  aria-haspopup="listbox"
1252
1222
  aria-expanded="false"
1253
1223
  aria-label="${f(o)}"
1254
- ${a ? `aria-labelledby="${l}"` : ""}
1224
+ ${l ? `aria-labelledby="${c}"` : ""}
1255
1225
  ${g ? `aria-describedby="${f(g)}"` : ""}
1256
1226
  >
1257
1227
  <span class="value" part="value"></span>
1258
1228
  </button>
1259
- <span class="trailing" part="trailing" ${c ? "" : "hidden"}>
1229
+ <span class="trailing" part="trailing" ${a ? "" : "hidden"}>
1260
1230
  <slot name="trailing"></slot>
1261
1231
  </span>
1262
1232
  <span class="indicator" part="indicator" aria-hidden="true"></span>
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("./ElementBase-1b301e7f.js"),S=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("./ElementBase-EV6mVBUV.js"),S=`
2
2
  :host {
3
3
  --ui-selection-popup-z: 1280;
4
4
  --ui-selection-popup-offset: 10px;
@@ -1,4 +1,4 @@
1
- import { E as D } from "./ElementBase-909688f3.mjs";
1
+ import { E as D } from "./ElementBase-YlTLMsGk.mjs";
2
2
  const E = `
3
3
  :host {
4
4
  --ui-selection-popup-z: 1280;
@@ -191,14 +191,12 @@ const E = `
191
191
  }
192
192
  `;
193
193
  function M(p, e) {
194
- if (p == null || p === "")
195
- return e;
194
+ if (p == null || p === "") return e;
196
195
  const t = Number(p);
197
196
  return Number.isFinite(t) ? t : e;
198
197
  }
199
198
  function y(p, e = !1) {
200
- if (p == null)
201
- return e;
199
+ if (p == null) return e;
202
200
  const t = String(p).toLowerCase();
203
201
  return t !== "false" && t !== "0" && t !== "off";
204
202
  }
@@ -247,8 +245,7 @@ class S extends D {
247
245
  e ? this.setAttribute("open", "") : this.removeAttribute("open");
248
246
  }
249
247
  openFor(e) {
250
- if (!e)
251
- return;
248
+ if (!e) return;
252
249
  const t = document.getElementById(e);
253
250
  t && (this._anchor = t, this.setAttribute("anchor-id", e), this.setAttribute("open", ""), this._schedulePosition());
254
251
  }
@@ -284,8 +281,7 @@ class S extends D {
284
281
  this.open && this._schedulePosition();
285
282
  }
286
283
  _onDocumentPointerDown(e) {
287
- if (!this.open || !y(this.getAttribute("close-on-outside"), !0))
288
- return;
284
+ if (!this.open || !y(this.getAttribute("close-on-outside"), !0)) return;
289
285
  const t = e.composedPath();
290
286
  t.includes(this) || this._anchor && t.includes(this._anchor) || this.close();
291
287
  }
@@ -334,18 +330,15 @@ class S extends D {
334
330
  }
335
331
  _position() {
336
332
  const e = this._popup;
337
- if (!e || !this.open || !this._anchor)
338
- return;
333
+ if (!e || !this.open || !this._anchor) return;
339
334
  if (!document.body.contains(this._anchor)) {
340
335
  this.close();
341
336
  return;
342
337
  }
343
338
  const t = this._anchor.getBoundingClientRect();
344
- if (t.width === 0 && t.height === 0)
345
- return;
339
+ if (t.width === 0 && t.height === 0) return;
346
340
  const o = e.getBoundingClientRect();
347
- if (o.width === 0 || o.height === 0)
348
- return;
341
+ if (o.width === 0 || o.height === 0) return;
349
342
  const s = this.getAttribute("placement") || "top", u = M(this.getAttribute("offset"), 10), r = 8, a = [], i = (c) => {
350
343
  a.includes(c) || a.push(c);
351
344
  };
@@ -0,0 +1 @@
1
+ "use strict";let r=null,u=!0;function l(t){if(t===r)return u;let e=!0;try{document.createDocumentFragment().querySelector(t)}catch{e=!1}return r=t,u=e,e}function n(t,e){return!e||!l(e)?null:t.querySelector(e)}exports.isValidSelector=l;exports.safeQuerySelector=n;
@@ -0,0 +1,18 @@
1
+ let r = null, u = !0;
2
+ function l(t) {
3
+ if (t === r) return u;
4
+ let e = !0;
5
+ try {
6
+ document.createDocumentFragment().querySelector(t);
7
+ } catch {
8
+ e = !1;
9
+ }
10
+ return r = t, u = e, e;
11
+ }
12
+ function n(t, e) {
13
+ return !e || !l(e) ? null : t.querySelector(e);
14
+ }
15
+ export {
16
+ l as i,
17
+ n as s
18
+ };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./ElementBase-1b301e7f.js"),l=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./ElementBase-EV6mVBUV.js"),l=`
2
2
  :host {
3
3
  --ui-separator-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 80%, transparent);
4
4
  --ui-separator-thickness: 1px;
@@ -1,4 +1,4 @@
1
- import { E as n } from "./ElementBase-909688f3.mjs";
1
+ import { E as n } from "./ElementBase-YlTLMsGk.mjs";
2
2
  const s = `
3
3
  :host {
4
4
  --ui-separator-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 80%, transparent);