@editora/ui-core 0.1.18 → 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 (307) 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 -669
  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-button.d.ts +1 -0
  57. package/dist/components/ui-button.d.ts.map +1 -1
  58. package/dist/components/ui-date-picker.d.ts.map +1 -1
  59. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  60. package/dist/components/ui-date-range-time-picker.d.ts +1 -0
  61. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  62. package/dist/components/ui-date-time-picker.d.ts +1 -0
  63. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  64. package/dist/components/ui-orbiter.d.ts.map +1 -1
  65. package/dist/components/ui-skeleton.d.ts.map +1 -1
  66. package/dist/components/ui-split-button.d.ts +1 -0
  67. package/dist/components/ui-split-button.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 +30 -9
  80. package/dist/date-picker.esm.js +90 -97
  81. package/dist/date-range-picker.cjs.js +22 -3
  82. package/dist/date-range-picker.esm.js +103 -108
  83. package/dist/date-range-time-picker.cjs.js +28 -12
  84. package/dist/date-range-time-picker.esm.js +137 -150
  85. package/dist/date-time-picker.cjs.js +25 -9
  86. package/dist/date-time-picker.esm.js +139 -155
  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 +4 -4
  162. package/dist/multi-select.esm.js +120 -140
  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 +2 -2
  196. package/dist/portal.esm.js +10 -19
  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 +11 -18
  201. package/dist/presence.cjs.js +1 -1
  202. package/dist/presence.esm.js +7 -13
  203. package/dist/progress.cjs.js +1 -1
  204. package/dist/progress.esm.js +5 -9
  205. package/dist/quick-actions.cjs.js +6 -6
  206. package/dist/quick-actions.esm.js +52 -62
  207. package/dist/radio-group.cjs.js +13 -13
  208. package/dist/radio-group.esm.js +39 -51
  209. package/dist/radio.cjs.js +1 -1
  210. package/dist/radio.esm.js +5 -9
  211. package/dist/rating.cjs.js +1 -1
  212. package/dist/rating.esm.js +12 -23
  213. package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
  214. package/dist/roving-focus-group.cjs.js +1 -1
  215. package/dist/roving-focus-group.esm.js +3 -5
  216. package/dist/runtime-CTaOSmBj.js +1 -0
  217. package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
  218. package/dist/runtime.cjs.js +1 -1
  219. package/dist/runtime.esm.js +6 -6
  220. package/dist/scroll-area.cjs.js +3 -3
  221. package/dist/scroll-area.esm.js +38 -46
  222. package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
  223. package/dist/section.cjs.js +1 -1
  224. package/dist/section.esm.js +1 -1
  225. package/dist/select.cjs.js +7 -7
  226. package/dist/select.esm.js +67 -97
  227. package/dist/selection-popup.cjs.js +1 -1
  228. package/dist/selection-popup.esm.js +8 -15
  229. package/dist/separator.cjs.js +1 -1
  230. package/dist/separator.esm.js +1 -1
  231. package/dist/sidebar.cjs.js +18 -18
  232. package/dist/sidebar.esm.js +117 -139
  233. package/dist/skeleton.cjs.js +11 -11
  234. package/dist/skeleton.esm.js +27 -24
  235. package/dist/slider.cjs.js +1 -1
  236. package/dist/slider.esm.js +6 -11
  237. package/dist/slot.cjs.js +4 -4
  238. package/dist/slot.esm.js +16 -19
  239. package/dist/sortable.cjs.js +45 -45
  240. package/dist/sortable.esm.js +421 -524
  241. package/dist/spinning-text.cjs.js +12 -12
  242. package/dist/spinning-text.esm.js +80 -92
  243. package/dist/split-button.cjs.js +4 -4
  244. package/dist/split-button.esm.js +77 -62
  245. package/dist/splitter.cjs.js +1 -1
  246. package/dist/splitter.esm.js +1 -1
  247. package/dist/stepper.cjs.js +8 -8
  248. package/dist/stepper.esm.js +32 -52
  249. package/dist/switch.cjs.js +7 -7
  250. package/dist/switch.esm.js +23 -31
  251. package/dist/table.cjs.js +2 -2
  252. package/dist/table.esm.js +46 -56
  253. package/dist/tabs.cjs.js +3 -3
  254. package/dist/tabs.esm.js +35 -55
  255. package/dist/tags-input.cjs.js +4 -4
  256. package/dist/tags-input.esm.js +45 -62
  257. package/dist/textarea.cjs.js +6 -6
  258. package/dist/textarea.esm.js +32 -41
  259. package/dist/time-field.cjs.js +4 -4
  260. package/dist/time-field.esm.js +70 -84
  261. package/dist/time-picker.cjs.js +29 -21
  262. package/dist/time-picker.esm.js +96 -110
  263. package/dist/timeline.cjs.js +1 -1
  264. package/dist/timeline.esm.js +3 -5
  265. package/dist/toast.cjs.js +2 -2
  266. package/dist/toast.esm.js +33 -47
  267. package/dist/toggle-group.cjs.js +6 -6
  268. package/dist/toggle-group.esm.js +85 -105
  269. package/dist/toggle.cjs.js +1 -1
  270. package/dist/toggle.esm.js +3 -5
  271. package/dist/toolbar.cjs.js +1 -1
  272. package/dist/toolbar.esm.js +13 -24
  273. package/dist/tooltip.cjs.js +2 -2
  274. package/dist/tooltip.esm.js +31 -42
  275. package/dist/transfer-list.cjs.js +19 -19
  276. package/dist/transfer-list.esm.js +98 -111
  277. package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
  278. package/dist/tree-Dx_kv_ih.js +39 -0
  279. package/dist/tree-item.cjs.js +2 -2
  280. package/dist/tree-item.esm.js +2 -3
  281. package/dist/tree.cjs.js +1 -1
  282. package/dist/tree.esm.js +2 -5
  283. package/dist/ui-button-Q0GNNWKC.mjs +665 -0
  284. package/dist/ui-button-rXQOS9QJ.js +521 -0
  285. package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
  286. package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
  287. package/dist/visually-hidden.cjs.js +1 -1
  288. package/dist/visually-hidden.esm.js +1 -1
  289. package/dist/wizard.cjs.js +14 -14
  290. package/dist/wizard.esm.js +85 -105
  291. package/package.json +3 -3
  292. package/dist/date-time-utils-66480de4.js +0 -1
  293. package/dist/date-time-utils-a2c7af25.mjs +0 -307
  294. package/dist/dismissable-layer-193e3bed.js +0 -1
  295. package/dist/focus-scope-2b12b4e7.js +0 -1
  296. package/dist/listbox-308789a0.mjs +0 -210
  297. package/dist/listbox-ef2f708e.js +0 -46
  298. package/dist/panel-group-40254cdd.js +0 -36
  299. package/dist/portal-c69756c0.js +0 -1
  300. package/dist/positioner-33529bb8.js +0 -1
  301. package/dist/runtime-3f13807b.js +0 -1
  302. package/dist/tree-0a7a8d05.js +0 -39
  303. /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
  304. /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
  305. /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
  306. /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
  307. /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
@@ -1,7 +1,7 @@
1
- import { E as v } from "./ElementBase-909688f3.mjs";
2
- import { c as h } from "./portal-fe73e5cc.mjs";
3
- import { c as f } from "./dismissable-layer-9c7e6b58.mjs";
4
- import { l as b } from "./positioner-e9770c66.mjs";
1
+ import { E as v } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { b as h } from "./portal-bR42gHvG.mjs";
3
+ import { c as f } from "./dismissable-layer-BmPIoK80.mjs";
4
+ import { e as b } from "./positioner-D0VGxtYU.mjs";
5
5
  const g = `
6
6
  .popover-shell {
7
7
  --ui-popover-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
@@ -309,28 +309,25 @@ class m extends v {
309
309
  ];
310
310
  }
311
311
  attributeChangedCallback(e, t, r) {
312
- var o;
313
312
  if (t !== r) {
314
313
  if (e === "open") {
315
314
  this._syncOpenState();
316
315
  return;
317
316
  }
318
- this._isOpen && ((o = this._portalEl) != null && o.isConnected) && (e === "placement" || e === "offset" || e === "flip" || e === "shift" || e === "variant" || e === "tone" || e === "size" || e === "radius" || e === "elevation" ? this._mountPortal() : (e === "close-on-escape" || e === "close-on-outside") && this._syncDismissableLayer());
317
+ this._isOpen && this._portalEl?.isConnected && (e === "placement" || e === "offset" || e === "flip" || e === "shift" || e === "variant" || e === "tone" || e === "size" || e === "radius" || e === "elevation" ? this._mountPortal() : (e === "close-on-escape" || e === "close-on-outside") && this._syncDismissableLayer());
319
318
  }
320
319
  }
321
320
  connectedCallback() {
322
321
  super.connectedCallback(), this.addEventListener("click", this._onHostClick), this._observeHost(), this._syncOpenState();
323
322
  }
324
323
  disconnectedCallback() {
325
- var e;
326
- this.removeEventListener("click", this._onHostClick), (e = this._hostObserver) == null || e.disconnect(), this._hostObserver = null, this._teardownPortal(), super.disconnectedCallback();
324
+ this.removeEventListener("click", this._onHostClick), this._hostObserver?.disconnect(), this._hostObserver = null, this._teardownPortal(), super.disconnectedCallback();
327
325
  }
328
326
  _handleHostClick(e) {
329
327
  const t = this._getTrigger();
330
- if (!t)
331
- return;
328
+ if (!t) return;
332
329
  const r = typeof e.composedPath == "function" ? e.composedPath() : [], o = e.target instanceof Node ? e.target : null;
333
- (r.includes(t) || !!o && (t === o || t.contains(o))) && this.toggle();
330
+ (r.includes(t) || o && (t === o || t.contains(o))) && this.toggle();
334
331
  }
335
332
  open() {
336
333
  this.setAttribute("open", "");
@@ -342,8 +339,7 @@ class m extends v {
342
339
  this.hasAttribute("open") ? this.close() : this.open();
343
340
  }
344
341
  updatePosition() {
345
- var e;
346
- (e = this._positioner) == null || e.update();
342
+ this._positioner?.update();
347
343
  }
348
344
  _getTrigger() {
349
345
  return this.querySelector('[slot="trigger"]');
@@ -357,8 +353,8 @@ class m extends v {
357
353
  r && (e.dataset.tone = r);
358
354
  const o = this.getAttribute("size");
359
355
  o && (e.dataset.size = o);
360
- const i = this.getAttribute("elevation");
361
- i && (e.dataset.elevation = i);
356
+ const a = this.getAttribute("elevation");
357
+ a && (e.dataset.elevation = a);
362
358
  const s = this.getAttribute("radius");
363
359
  if (s && s.trim()) {
364
360
  const p = s.trim(), d = /^-?\d+(\.\d+)?$/.test(p) ? `${p}px` : p;
@@ -366,12 +362,12 @@ class m extends v {
366
362
  }
367
363
  const l = document.createElement("style");
368
364
  l.textContent = g, e.appendChild(l);
369
- const a = document.createElement("div");
370
- a.className = "panel show", this._panelEl = a;
365
+ const i = document.createElement("div");
366
+ i.className = "panel show", this._panelEl = i;
371
367
  const c = document.createElement("div");
372
- c.className = "arrow", a.appendChild(c);
368
+ c.className = "arrow", i.appendChild(c);
373
369
  const u = this.querySelector('[slot="content"]'), n = document.createElement("div");
374
- return n.className = "content", u && n.appendChild(u.cloneNode(!0)), a.appendChild(n), e.appendChild(a), e;
370
+ return n.className = "content", u && n.appendChild(u.cloneNode(!0)), i.appendChild(n), e.appendChild(i), e;
375
371
  }
376
372
  _getContentSource() {
377
373
  return this.querySelector('[slot="content"]');
@@ -391,9 +387,8 @@ class m extends v {
391
387
  return this.getAttribute("close-on-outside") !== "false";
392
388
  }
393
389
  _syncDismissableLayer() {
394
- var t;
395
390
  const e = this._getTrigger();
396
- !e || !this._panelEl || ((t = this._layer) == null || t.destroy(), this._layer = f({
391
+ !e || !this._panelEl || (this._layer?.destroy(), this._layer = f({
397
392
  node: this._panelEl,
398
393
  trigger: e,
399
394
  closeOnEscape: this._closeOnEscape(),
@@ -402,8 +397,7 @@ class m extends v {
402
397
  }));
403
398
  }
404
399
  _teardownPortal() {
405
- var e, t, r, o;
406
- if ((e = this._contentObserver) == null || e.disconnect(), this._contentObserver = null, (t = this._layer) == null || t.destroy(), this._layer = null, (r = this._positioner) == null || r.destroy(), this._positioner = null, this._panelEl = null, (o = this._portalEl) != null && o.parentElement)
400
+ if (this._contentObserver?.disconnect(), this._contentObserver = null, this._layer?.destroy(), this._layer = null, this._positioner?.destroy(), this._positioner = null, this._panelEl = null, this._portalEl?.parentElement)
407
401
  try {
408
402
  this._portalEl.parentElement.removeChild(this._portalEl);
409
403
  } catch {
@@ -416,8 +410,7 @@ class m extends v {
416
410
  }));
417
411
  }
418
412
  _observeContent() {
419
- var t;
420
- (t = this._contentObserver) == null || t.disconnect(), this._contentObserver = null;
413
+ this._contentObserver?.disconnect(), this._contentObserver = null;
421
414
  const e = this._getContentSource();
422
415
  !e || typeof MutationObserver > "u" || (this._contentObserver = new MutationObserver(() => this._schedulePortalSync()), this._contentObserver.observe(e, {
423
416
  attributes: !0,
@@ -427,16 +420,14 @@ class m extends v {
427
420
  }));
428
421
  }
429
422
  _observeHost() {
430
- var e;
431
- (e = this._hostObserver) == null || e.disconnect(), this._hostObserver = null, !(typeof MutationObserver > "u") && (this._hostObserver = new MutationObserver(() => this._schedulePortalSync()), this._hostObserver.observe(this, {
423
+ this._hostObserver?.disconnect(), this._hostObserver = null, !(typeof MutationObserver > "u") && (this._hostObserver = new MutationObserver(() => this._schedulePortalSync()), this._hostObserver.observe(this, {
432
424
  childList: !0,
433
425
  subtree: !1
434
426
  }));
435
427
  }
436
428
  _mountPortal() {
437
429
  const e = this._getTrigger();
438
- if (!e)
439
- return;
430
+ if (!e) return;
440
431
  this._teardownPortal(), this._portalEl = this._buildPortalContent();
441
432
  const t = h();
442
433
  t && (t.appendChild(this._portalEl), this._observeContent(), this._positioner = b({
@@ -450,10 +441,9 @@ class m extends v {
450
441
  }), this._syncDismissableLayer());
451
442
  }
452
443
  _syncOpenState() {
453
- var i;
454
444
  const e = this.hasAttribute("open");
455
445
  if (e === this._isOpen) {
456
- e && (!this._portalEl || !this._portalEl.isConnected ? this._mountPortal() : (i = this._positioner) == null || i.update());
446
+ e && (!this._portalEl || !this._portalEl.isConnected ? this._mountPortal() : this._positioner?.update());
457
447
  return;
458
448
  }
459
449
  if (this._isOpen = e, e) {
@@ -0,0 +1 @@
1
+ "use strict";const C=require("./positioner-D_fqyx_j.js");function H(a="ui-portal-root"){if(typeof document>"u")return null;let e=document.getElementById(a);return e||(e=document.createElement("div"),e.id=a,e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="0",e.style.pointerEvents="none",e.style.zIndex="var(--ui-portal-z, 1600)",document.body.appendChild(e)),e.style.zIndex||(e.style.zIndex="var(--ui-portal-z, 1600)"),e}function x(a,e,l="top"){const t=typeof l=="string"?{placement:l}:l,r=e instanceof HTMLElement?e:typeof e.getBoundingClientRect=="function"?e.getBoundingClientRect():e,n=C.computePositionState(a,r,{placement:t.placement||"top",strategy:t.strategy||"fixed",offset:typeof t.offset=="number"?t.offset:8,flip:t.flip,shift:t.shift,arrow:t.arrow??null,boundary:t.boundary??null,boundaryPadding:t.boundaryPadding,dir:t.dir,autoPlacement:t.autoPlacement,allowedPlacements:t.allowedPlacements,fallbackPlacements:t.fallbackPlacements,inline:t.inline,hideWhenDetached:t.hideWhenDetached}),d=a.getBoundingClientRect(),m=n.middlewareData?.arrow?.x??Math.round(d.left+d.width/2-n.x),h=n.middlewareData?.arrow?.y??Math.round(d.top+d.height/2-n.y);return{top:n.y,left:n.x,placement:n.placement,x:m,y:h,strategy:n.strategy,availableWidth:n.availableWidth,availableHeight:n.availableHeight,middlewareData:n.middlewareData,referenceHidden:n.referenceHidden,escaped:n.escaped}}function M(a,e,l,t={}){return C.autoUpdatePositioner(a,e,l,t)}function D(a,e,l="top"){const t=typeof l=="string"?{placement:l}:l,r=t.placement||"top",n=typeof t.offset=="number"?t.offset:8,d=t.flip!==!1,m=!!t.shift,h=H();if(!h)return;e.style.position="absolute",e.style.pointerEvents="auto",h.appendChild(e);let P=()=>{};function W(f,y,c){const o=t.arrow||e.querySelector(".arrow");if(!o)return;const i=a.getBoundingClientRect(),g=i.left+i.width/2,w=i.top+i.height/2;if(c==="top"||c==="bottom"){const u=g-y,s=8,p=e.offsetWidth-8,b=Math.max(s,Math.min(p,u));o.style.left=`${Math.round(b)}px`,o.style.top=""}else{const u=w-f,s=8,p=e.offsetHeight-8,b=Math.max(s,Math.min(p,u));o.style.top=`${Math.round(b)}px`,o.style.left=""}}function v(){if(a&&typeof a.getBoundingClientRect=="function"&&a instanceof HTMLElement){const i=a,g=i.getRootNode?.(),w=g instanceof ShadowRoot?g.host:null,u=i.isConnected||document.body.contains(i)||(w?document.body.contains(w):!1),s=window.getComputedStyle(i),p=s.display!=="none"&&s.visibility!=="hidden"&&parseFloat(s.opacity||"1")>0;if(!u||!p){try{e.parentElement&&e.parentElement.removeChild(e)}catch{}P();return}}const f=x(a,e,{placement:r,offset:n,flip:d,shift:m,strategy:t.strategy||"fixed",boundary:t.boundary??null,boundaryPadding:t.boundaryPadding,dir:t.dir,autoPlacement:t.autoPlacement,allowedPlacements:t.allowedPlacements,fallbackPlacements:t.fallbackPlacements,inline:t.inline,hideWhenDetached:t.hideWhenDetached,arrow:t.arrow??null}),y=window.innerWidth||document.documentElement.clientWidth,c=window.innerHeight||document.documentElement.clientHeight;let o=f;d&&(f.top<0&&r==="top"||f.top+e.offsetHeight>c&&r==="bottom")&&(o=x(a,e,{placement:r==="top"?"bottom":"top",offset:n,flip:d,shift:m,strategy:t.strategy||"fixed",boundary:t.boundary??null,boundaryPadding:t.boundaryPadding,dir:t.dir,autoPlacement:t.autoPlacement,allowedPlacements:t.allowedPlacements,fallbackPlacements:t.fallbackPlacements,inline:t.inline,hideWhenDetached:t.hideWhenDetached,arrow:t.arrow??null})),o.left<4&&(o.left=4),o.left+e.offsetWidth>y-4&&(o.left=y-e.offsetWidth-4),o.top<4&&(o.top=4),o.top+e.offsetHeight>c-4&&(o.top=c-e.offsetHeight-4),e.style.top=`${Math.round(o.top)}px`,e.style.left=`${Math.round(o.left)}px`,W(o.top,o.left,o.placement),e.setAttribute("data-placement",o.placement)}return v(),P=M(a,e,v),()=>{try{e.parentElement&&e.parentElement.removeChild(e)}catch{}P()}}exports.autoUpdatePosition=M;exports.computePosition=x;exports.createPortalContainer=H;exports.showPortalFor=D;
@@ -1,13 +1,11 @@
1
- import { c as H, a as M } from "./positioner-e9770c66.mjs";
1
+ import { a as H, c as M } from "./positioner-D0VGxtYU.mjs";
2
2
  function W(a = "ui-portal-root") {
3
- if (typeof document > "u")
4
- return null;
3
+ if (typeof document > "u") return null;
5
4
  let e = document.getElementById(a);
6
5
  return e || (e = document.createElement("div"), e.id = a, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", e.style.width = "100%", e.style.height = "0", e.style.pointerEvents = "none", e.style.zIndex = "var(--ui-portal-z, 1600)", document.body.appendChild(e)), e.style.zIndex || (e.style.zIndex = "var(--ui-portal-z, 1600)"), e;
7
6
  }
8
- function C(a, e, i = "top") {
9
- var p, P, h, l;
10
- const t = typeof i == "string" ? { placement: i } : i, c = e instanceof HTMLElement ? e : typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : e, n = H(a, c, {
7
+ function v(a, e, l = "top") {
8
+ const t = typeof l == "string" ? { placement: l } : l, r = e instanceof HTMLElement ? e : typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : e, n = M(a, r, {
11
9
  placement: t.placement || "top",
12
10
  strategy: t.strategy || "fixed",
13
11
  offset: typeof t.offset == "number" ? t.offset : 8,
@@ -22,13 +20,13 @@ function C(a, e, i = "top") {
22
20
  fallbackPlacements: t.fallbackPlacements,
23
21
  inline: t.inline,
24
22
  hideWhenDetached: t.hideWhenDetached
25
- }), d = a.getBoundingClientRect(), w = ((P = (p = n.middlewareData) == null ? void 0 : p.arrow) == null ? void 0 : P.x) ?? Math.round(d.left + d.width / 2 - n.x), b = ((l = (h = n.middlewareData) == null ? void 0 : h.arrow) == null ? void 0 : l.y) ?? Math.round(d.top + d.height / 2 - n.y);
23
+ }), s = a.getBoundingClientRect(), m = n.middlewareData?.arrow?.x ?? Math.round(s.left + s.width / 2 - n.x), h = n.middlewareData?.arrow?.y ?? Math.round(s.top + s.height / 2 - n.y);
26
24
  return {
27
25
  top: n.y,
28
26
  left: n.x,
29
27
  placement: n.placement,
30
- x: w,
31
- y: b,
28
+ x: m,
29
+ y: h,
32
30
  strategy: n.strategy,
33
31
  availableWidth: n.availableWidth,
34
32
  availableHeight: n.availableHeight,
@@ -37,47 +35,44 @@ function C(a, e, i = "top") {
37
35
  escaped: n.escaped
38
36
  };
39
37
  }
40
- function D(a, e, i, t = {}) {
41
- return M(a, e, i, t);
38
+ function D(a, e, l, t = {}) {
39
+ return H(a, e, l, t);
42
40
  }
43
- function B(a, e, i = "top") {
44
- const t = typeof i == "string" ? { placement: i } : i, c = t.placement || "top", n = typeof t.offset == "number" ? t.offset : 8, d = t.flip !== !1, w = !!t.shift, b = W();
45
- if (!b)
46
- return;
47
- e.style.position = "absolute", e.style.pointerEvents = "auto", b.appendChild(e);
48
- let p = () => {
41
+ function k(a, e, l = "top") {
42
+ const t = typeof l == "string" ? { placement: l } : l, r = t.placement || "top", n = typeof t.offset == "number" ? t.offset : 8, s = t.flip !== !1, m = !!t.shift, h = W();
43
+ if (!h) return;
44
+ e.style.position = "absolute", e.style.pointerEvents = "auto", h.appendChild(e);
45
+ let P = () => {
49
46
  };
50
- function P(l, x, u) {
47
+ function C(f, y, c) {
51
48
  const o = t.arrow || e.querySelector(".arrow");
52
- if (!o)
53
- return;
54
- const r = a.getBoundingClientRect(), s = r.left + r.width / 2, v = r.top + r.height / 2;
55
- if (u === "top" || u === "bottom") {
56
- const m = s - x, y = 8, f = e.offsetWidth - 8, g = Math.max(y, Math.min(f, m));
57
- o.style.left = `${Math.round(g)}px`, o.style.top = "";
49
+ if (!o) return;
50
+ const i = a.getBoundingClientRect(), g = i.left + i.width / 2, w = i.top + i.height / 2;
51
+ if (c === "top" || c === "bottom") {
52
+ const p = g - y, d = 8, u = e.offsetWidth - 8, b = Math.max(d, Math.min(u, p));
53
+ o.style.left = `${Math.round(b)}px`, o.style.top = "";
58
54
  } else {
59
- const m = v - l, y = 8, f = e.offsetHeight - 8, g = Math.max(y, Math.min(f, m));
60
- o.style.top = `${Math.round(g)}px`, o.style.left = "";
55
+ const p = w - f, d = 8, u = e.offsetHeight - 8, b = Math.max(d, Math.min(u, p));
56
+ o.style.top = `${Math.round(b)}px`, o.style.left = "";
61
57
  }
62
58
  }
63
- function h() {
64
- var r;
59
+ function x() {
65
60
  if (a && typeof a.getBoundingClientRect == "function" && a instanceof HTMLElement) {
66
- const s = a, v = (r = s.getRootNode) == null ? void 0 : r.call(s), m = v instanceof ShadowRoot ? v.host : null, y = s.isConnected || document.body.contains(s) || (m ? document.body.contains(m) : !1), f = window.getComputedStyle(s), g = f.display !== "none" && f.visibility !== "hidden" && parseFloat(f.opacity || "1") > 0;
67
- if (!y || !g) {
61
+ const i = a, g = i.getRootNode?.(), w = g instanceof ShadowRoot ? g.host : null, p = i.isConnected || document.body.contains(i) || (w ? document.body.contains(w) : !1), d = window.getComputedStyle(i), u = d.display !== "none" && d.visibility !== "hidden" && parseFloat(d.opacity || "1") > 0;
62
+ if (!p || !u) {
68
63
  try {
69
64
  e.parentElement && e.parentElement.removeChild(e);
70
65
  } catch {
71
66
  }
72
- p();
67
+ P();
73
68
  return;
74
69
  }
75
70
  }
76
- const l = C(a, e, {
77
- placement: c,
71
+ const f = v(a, e, {
72
+ placement: r,
78
73
  offset: n,
79
- flip: d,
80
- shift: w,
74
+ flip: s,
75
+ shift: m,
81
76
  strategy: t.strategy || "fixed",
82
77
  boundary: t.boundary ?? null,
83
78
  boundaryPadding: t.boundaryPadding,
@@ -88,13 +83,13 @@ function B(a, e, i = "top") {
88
83
  inline: t.inline,
89
84
  hideWhenDetached: t.hideWhenDetached,
90
85
  arrow: t.arrow ?? null
91
- }), x = window.innerWidth || document.documentElement.clientWidth, u = window.innerHeight || document.documentElement.clientHeight;
92
- let o = l;
93
- d && (l.top < 0 && c === "top" || l.top + e.offsetHeight > u && c === "bottom") && (o = C(a, e, {
94
- placement: c === "top" ? "bottom" : "top",
86
+ }), y = window.innerWidth || document.documentElement.clientWidth, c = window.innerHeight || document.documentElement.clientHeight;
87
+ let o = f;
88
+ s && (f.top < 0 && r === "top" || f.top + e.offsetHeight > c && r === "bottom") && (o = v(a, e, {
89
+ placement: r === "top" ? "bottom" : "top",
95
90
  offset: n,
96
- flip: d,
97
- shift: w,
91
+ flip: s,
92
+ shift: m,
98
93
  strategy: t.strategy || "fixed",
99
94
  boundary: t.boundary ?? null,
100
95
  boundaryPadding: t.boundaryPadding,
@@ -105,19 +100,19 @@ function B(a, e, i = "top") {
105
100
  inline: t.inline,
106
101
  hideWhenDetached: t.hideWhenDetached,
107
102
  arrow: t.arrow ?? null
108
- })), o.left < 4 && (o.left = 4), o.left + e.offsetWidth > x - 4 && (o.left = x - e.offsetWidth - 4), o.top < 4 && (o.top = 4), o.top + e.offsetHeight > u - 4 && (o.top = u - e.offsetHeight - 4), e.style.top = `${Math.round(o.top)}px`, e.style.left = `${Math.round(o.left)}px`, P(o.top, o.left, o.placement), e.setAttribute("data-placement", o.placement);
103
+ })), o.left < 4 && (o.left = 4), o.left + e.offsetWidth > y - 4 && (o.left = y - e.offsetWidth - 4), o.top < 4 && (o.top = 4), o.top + e.offsetHeight > c - 4 && (o.top = c - e.offsetHeight - 4), e.style.top = `${Math.round(o.top)}px`, e.style.left = `${Math.round(o.left)}px`, C(o.top, o.left, o.placement), e.setAttribute("data-placement", o.placement);
109
104
  }
110
- return h(), p = D(a, e, h), () => {
105
+ return x(), P = D(a, e, x), () => {
111
106
  try {
112
107
  e.parentElement && e.parentElement.removeChild(e);
113
108
  } catch {
114
109
  }
115
- p();
110
+ P();
116
111
  };
117
112
  }
118
113
  export {
119
- C as a,
120
- D as b,
121
- W as c,
122
- B as s
114
+ D as a,
115
+ W as b,
116
+ v as c,
117
+ k as s
123
118
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-1b301e7f.js"),l=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-EV6mVBUV.js"),l=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
@@ -31,7 +31,7 @@
31
31
  --ui-portal-color: CanvasText;
32
32
  }
33
33
  }
34
- `;function a(r){return r==="prepend"?"prepend":"append"}function h(r){var t;return r.nodeType===Node.ELEMENT_NODE?!0:r.nodeType===Node.TEXT_NODE?!!((t=r.textContent)!=null&&t.trim()):!1}function u(r){return r.nodeType===Node.ELEMENT_NODE||r.nodeType===Node.TEXT_NODE}class n extends o.ElementBase{constructor(){super(),this._headless=!1,this._strategy="append",this._target=null,this._slot=null,this._entries=[],this._syncing=!1,this._guardTimer=null,this._targetObserver=null,this._pendingSlotSync=!1,this._onSlotChange=this._onSlotChange.bind(this),this._onTargetMutations=this._onTargetMutations.bind(this)}static get observedAttributes(){return["target","headless","strategy","disabled"]}connectedCallback(){super.connectedCallback(),this._syncConfig(),this._mountAllFromSlot()}disconnectedCallback(){this._guardTimer!=null&&(window.clearTimeout(this._guardTimer),this._guardTimer=null),this._slot&&(this._slot.removeEventListener("slotchange",this._onSlotChange),this._slot=null),this._disconnectTargetObserver(),this._restoreAll(),super.disconnectedCallback()}attributeChangedCallback(t,e,s){if(e!==s){if(this._syncConfig(),this._headless){this._restoreAll();return}(t==="target"||t==="strategy"||t==="disabled"||t==="headless")&&this._moveAllToTarget()}}_syncConfig(){this._headless=this.hasAttribute("headless")||this.hasAttribute("disabled"),this._strategy=a(this.getAttribute("strategy")),this._target=this._resolveTarget(),this._connectTargetObserver()}_resolveTarget(){const t=this.getAttribute("target");if(t){const e=document.querySelector(t);if(e instanceof HTMLElement)return e;this.dispatchEvent(new CustomEvent("target-missing",{detail:{target:t},bubbles:!0}))}return document.body}_connectTargetObserver(){this._disconnectTargetObserver(),!(!this._target||typeof MutationObserver>"u")&&(this._targetObserver=new MutationObserver(this._onTargetMutations),this._targetObserver.observe(this._target,{childList:!0,subtree:!0}))}_disconnectTargetObserver(){this._targetObserver&&(this._targetObserver.disconnect(),this._targetObserver=null)}_onTargetMutations(){if(this._syncing)return;let t=!1;this._entries=this._entries.filter(e=>{if(e.node.isConnected)return!0;try{e.anchor.parentNode&&e.anchor.parentNode.removeChild(e.anchor)}catch{}return t=!0,!1}),t&&this.dispatchEvent(new CustomEvent("sync",{detail:{count:this._entries.length},bubbles:!0}))}_beginSync(){this._syncing=!0,this._guardTimer!=null&&window.clearTimeout(this._guardTimer),this._guardTimer=window.setTimeout(()=>{this._syncing=!1,this._guardTimer=null,this._pendingSlotSync&&(this._pendingSlotSync=!1,this._mountAllFromSlot())},0)}_findEntry(t){return this._entries.find(e=>e.node===t)}_portalNode(t){if(!this._target||this._headless||!u(t)||this._findEntry(t)||!this.contains(t))return;const e=document.createComment("ui-portal-anchor"),s=t.parentNode;s&&(this._beginSync(),s.insertBefore(e,t),this._strategy==="prepend"?this._target.insertBefore(t,this._target.firstChild):this._target.appendChild(t),this._entries.push({node:t,anchor:e}))}_restoreEntry(t){const{node:e,anchor:s}=t;this._beginSync(),s.parentNode&&(s.parentNode.insertBefore(e,s),s.parentNode.removeChild(s))}_restoreAll(){if(!this._entries.length)return;const t=[...this._entries];this._entries=[],t.forEach(e=>this._restoreEntry(e)),this.dispatchEvent(new CustomEvent("unmount",{detail:{count:t.length},bubbles:!0}))}_moveAllToTarget(){if(this._headless){this._restoreAll();return}const t=[...this._entries];this._entries=[],t.forEach(e=>{const s=e.anchor,i=e.node;s.parentNode&&(this._beginSync(),this._strategy==="prepend"?this._target.insertBefore(i,this._target.firstChild):this._target.appendChild(i),this._entries.push({node:i,anchor:s}))}),this.dispatchEvent(new CustomEvent("mount",{detail:{count:this._entries.length},bubbles:!0}))}_mountAllFromSlot(){if(this._headless)return;const t=this._slot||this.root.querySelector("slot");if(!t)return;const e=t.assignedNodes({flatten:!0}).filter(s=>h(s));e.forEach(s=>this._portalNode(s)),e.length&&this.dispatchEvent(new CustomEvent("mount",{detail:{count:this._entries.length},bubbles:!0}))}_pruneDetachedEntries(){this._entries.length&&(this._entries=this._entries.filter(t=>{if(t.node.isConnected)return!0;try{t.anchor.parentNode&&t.anchor.parentNode.removeChild(t.anchor)}catch{}return!1}))}_onSlotChange(){if(!this._headless){if(this._syncing){this._pendingSlotSync=!0;return}this._pruneDetachedEntries(),this._mountAllFromSlot()}}render(){this.setContent(`
34
+ `;function a(r){return r==="prepend"?"prepend":"append"}function h(r){return r.nodeType===Node.ELEMENT_NODE?!0:r.nodeType===Node.TEXT_NODE?!!r.textContent?.trim():!1}function u(r){return r.nodeType===Node.ELEMENT_NODE||r.nodeType===Node.TEXT_NODE}class n extends o.ElementBase{constructor(){super(),this._headless=!1,this._strategy="append",this._target=null,this._slot=null,this._entries=[],this._syncing=!1,this._guardTimer=null,this._targetObserver=null,this._pendingSlotSync=!1,this._onSlotChange=this._onSlotChange.bind(this),this._onTargetMutations=this._onTargetMutations.bind(this)}static get observedAttributes(){return["target","headless","strategy","disabled"]}connectedCallback(){super.connectedCallback(),this._syncConfig(),this._mountAllFromSlot()}disconnectedCallback(){this._guardTimer!=null&&(window.clearTimeout(this._guardTimer),this._guardTimer=null),this._slot&&(this._slot.removeEventListener("slotchange",this._onSlotChange),this._slot=null),this._disconnectTargetObserver(),this._restoreAll(),super.disconnectedCallback()}attributeChangedCallback(t,e,s){if(e!==s){if(this._syncConfig(),this._headless){this._restoreAll();return}(t==="target"||t==="strategy"||t==="disabled"||t==="headless")&&this._moveAllToTarget()}}_syncConfig(){this._headless=this.hasAttribute("headless")||this.hasAttribute("disabled"),this._strategy=a(this.getAttribute("strategy")),this._target=this._resolveTarget(),this._connectTargetObserver()}_resolveTarget(){const t=this.getAttribute("target");if(t){const e=document.querySelector(t);if(e instanceof HTMLElement)return e;this.dispatchEvent(new CustomEvent("target-missing",{detail:{target:t},bubbles:!0}))}return document.body}_connectTargetObserver(){this._disconnectTargetObserver(),!(!this._target||typeof MutationObserver>"u")&&(this._targetObserver=new MutationObserver(this._onTargetMutations),this._targetObserver.observe(this._target,{childList:!0,subtree:!0}))}_disconnectTargetObserver(){this._targetObserver&&(this._targetObserver.disconnect(),this._targetObserver=null)}_onTargetMutations(){if(this._syncing)return;let t=!1;this._entries=this._entries.filter(e=>{if(e.node.isConnected)return!0;try{e.anchor.parentNode&&e.anchor.parentNode.removeChild(e.anchor)}catch{}return t=!0,!1}),t&&this.dispatchEvent(new CustomEvent("sync",{detail:{count:this._entries.length},bubbles:!0}))}_beginSync(){this._syncing=!0,this._guardTimer!=null&&window.clearTimeout(this._guardTimer),this._guardTimer=window.setTimeout(()=>{this._syncing=!1,this._guardTimer=null,this._pendingSlotSync&&(this._pendingSlotSync=!1,this._mountAllFromSlot())},0)}_findEntry(t){return this._entries.find(e=>e.node===t)}_portalNode(t){if(!this._target||this._headless||!u(t)||this._findEntry(t)||!this.contains(t))return;const e=document.createComment("ui-portal-anchor"),s=t.parentNode;s&&(this._beginSync(),s.insertBefore(e,t),this._strategy==="prepend"?this._target.insertBefore(t,this._target.firstChild):this._target.appendChild(t),this._entries.push({node:t,anchor:e}))}_restoreEntry(t){const{node:e,anchor:s}=t;this._beginSync(),s.parentNode&&(s.parentNode.insertBefore(e,s),s.parentNode.removeChild(s))}_restoreAll(){if(!this._entries.length)return;const t=[...this._entries];this._entries=[],t.forEach(e=>this._restoreEntry(e)),this.dispatchEvent(new CustomEvent("unmount",{detail:{count:t.length},bubbles:!0}))}_moveAllToTarget(){if(this._headless){this._restoreAll();return}const t=[...this._entries];this._entries=[],t.forEach(e=>{const s=e.anchor,i=e.node;s.parentNode&&(this._beginSync(),this._strategy==="prepend"?this._target.insertBefore(i,this._target.firstChild):this._target.appendChild(i),this._entries.push({node:i,anchor:s}))}),this.dispatchEvent(new CustomEvent("mount",{detail:{count:this._entries.length},bubbles:!0}))}_mountAllFromSlot(){if(this._headless)return;const t=this._slot||this.root.querySelector("slot");if(!t)return;const e=t.assignedNodes({flatten:!0}).filter(s=>h(s));e.forEach(s=>this._portalNode(s)),e.length&&this.dispatchEvent(new CustomEvent("mount",{detail:{count:this._entries.length},bubbles:!0}))}_pruneDetachedEntries(){this._entries.length&&(this._entries=this._entries.filter(t=>{if(t.node.isConnected)return!0;try{t.anchor.parentNode&&t.anchor.parentNode.removeChild(t.anchor)}catch{}return!1}))}_onSlotChange(){if(!this._headless){if(this._syncing){this._pendingSlotSync=!0;return}this._pruneDetachedEntries(),this._mountAllFromSlot()}}render(){this.setContent(`
35
35
  <style>${l}</style>
36
36
  <div class="source" part="source">
37
37
  <slot></slot>
@@ -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 o = `
3
3
  :host {
4
4
  display: contents;
@@ -37,8 +37,7 @@ function l(r) {
37
37
  return r === "prepend" ? "prepend" : "append";
38
38
  }
39
39
  function a(r) {
40
- var t;
41
- return r.nodeType === Node.ELEMENT_NODE ? !0 : r.nodeType === Node.TEXT_NODE ? !!((t = r.textContent) != null && t.trim()) : !1;
40
+ return r.nodeType === Node.ELEMENT_NODE ? !0 : r.nodeType === Node.TEXT_NODE ? !!r.textContent?.trim() : !1;
42
41
  }
43
42
  function h(r) {
44
43
  return r.nodeType === Node.ELEMENT_NODE || r.nodeType === Node.TEXT_NODE;
@@ -72,8 +71,7 @@ class u extends n {
72
71
  const t = this.getAttribute("target");
73
72
  if (t) {
74
73
  const e = document.querySelector(t);
75
- if (e instanceof HTMLElement)
76
- return e;
74
+ if (e instanceof HTMLElement) return e;
77
75
  this.dispatchEvent(
78
76
  new CustomEvent("target-missing", {
79
77
  detail: { target: t },
@@ -90,12 +88,10 @@ class u extends n {
90
88
  this._targetObserver && (this._targetObserver.disconnect(), this._targetObserver = null);
91
89
  }
92
90
  _onTargetMutations() {
93
- if (this._syncing)
94
- return;
91
+ if (this._syncing) return;
95
92
  let t = !1;
96
93
  this._entries = this._entries.filter((e) => {
97
- if (e.node.isConnected)
98
- return !0;
94
+ if (e.node.isConnected) return !0;
99
95
  try {
100
96
  e.anchor.parentNode && e.anchor.parentNode.removeChild(e.anchor);
101
97
  } catch {
@@ -112,8 +108,7 @@ class u extends n {
112
108
  return this._entries.find((e) => e.node === t);
113
109
  }
114
110
  _portalNode(t) {
115
- if (!this._target || this._headless || !h(t) || this._findEntry(t) || !this.contains(t))
116
- return;
111
+ if (!this._target || this._headless || !h(t) || this._findEntry(t) || !this.contains(t)) return;
117
112
  const e = document.createComment("ui-portal-anchor"), s = t.parentNode;
118
113
  s && (this._beginSync(), s.insertBefore(e, t), this._strategy === "prepend" ? this._target.insertBefore(t, this._target.firstChild) : this._target.appendChild(t), this._entries.push({ node: t, anchor: e }));
119
114
  }
@@ -122,8 +117,7 @@ class u extends n {
122
117
  this._beginSync(), s.parentNode && (s.parentNode.insertBefore(e, s), s.parentNode.removeChild(s));
123
118
  }
124
119
  _restoreAll() {
125
- if (!this._entries.length)
126
- return;
120
+ if (!this._entries.length) return;
127
121
  const t = [...this._entries];
128
122
  this._entries = [], t.forEach((e) => this._restoreEntry(e)), this.dispatchEvent(new CustomEvent("unmount", { detail: { count: t.length }, bubbles: !0 }));
129
123
  }
@@ -139,18 +133,15 @@ class u extends n {
139
133
  }), this.dispatchEvent(new CustomEvent("mount", { detail: { count: this._entries.length }, bubbles: !0 }));
140
134
  }
141
135
  _mountAllFromSlot() {
142
- if (this._headless)
143
- return;
136
+ if (this._headless) return;
144
137
  const t = this._slot || this.root.querySelector("slot");
145
- if (!t)
146
- return;
138
+ if (!t) return;
147
139
  const e = t.assignedNodes({ flatten: !0 }).filter((s) => a(s));
148
140
  e.forEach((s) => this._portalNode(s)), e.length && this.dispatchEvent(new CustomEvent("mount", { detail: { count: this._entries.length }, bubbles: !0 }));
149
141
  }
150
142
  _pruneDetachedEntries() {
151
143
  this._entries.length && (this._entries = this._entries.filter((t) => {
152
- if (t.node.isConnected)
153
- return !0;
144
+ if (t.node.isConnected) return !0;
154
145
  try {
155
146
  t.anchor.parentNode && t.anchor.parentNode.removeChild(t.anchor);
156
147
  } catch {