@editora/ui-core 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/dist/{ElementBase-DxbvhLJs.js → ElementBase-CbUsP3D6.js} +1 -1
  2. package/dist/{ElementBase-BeZT54Hj.mjs → ElementBase-D5QsC5Vw.mjs} +10 -1
  3. package/dist/ElementBase.d.ts +7 -0
  4. package/dist/ElementBase.d.ts.map +1 -1
  5. package/dist/accordion.cjs.js +1 -1
  6. package/dist/accordion.esm.js +1 -1
  7. package/dist/add-icons-CVeHOsWl.js +1 -0
  8. package/dist/add-icons-DBUZJ0g7.mjs +14 -0
  9. package/dist/add-icons.cjs.js +1 -0
  10. package/dist/add-icons.d.ts +16 -0
  11. package/dist/add-icons.d.ts.map +1 -0
  12. package/dist/add-icons.esm.js +4 -0
  13. package/dist/alert-dialog.cjs.js +24 -24
  14. package/dist/alert-dialog.esm.js +112 -107
  15. package/dist/alert.cjs.js +8 -8
  16. package/dist/alert.esm.js +22 -22
  17. package/dist/animated-beam.cjs.js +1 -1
  18. package/dist/animated-beam.esm.js +1 -1
  19. package/dist/animated-list.cjs.js +1 -1
  20. package/dist/animated-list.esm.js +1 -1
  21. package/dist/animated-text.cjs.js +1 -1
  22. package/dist/animated-text.esm.js +1 -1
  23. package/dist/app-header.cjs.js +15 -3
  24. package/dist/app-header.esm.js +31 -4
  25. package/dist/aspect-ratio.cjs.js +1 -1
  26. package/dist/aspect-ratio.esm.js +1 -1
  27. package/dist/avatar.cjs.js +1 -1
  28. package/dist/avatar.esm.js +1 -1
  29. package/dist/badge.cjs.js +1 -1
  30. package/dist/badge.esm.js +1 -1
  31. package/dist/block-controls.cjs.js +1 -1
  32. package/dist/block-controls.esm.js +1 -1
  33. package/dist/box.cjs.js +1 -1
  34. package/dist/box.esm.js +1 -1
  35. package/dist/breadcrumb.cjs.js +4 -4
  36. package/dist/breadcrumb.esm.js +93 -84
  37. package/dist/button.cjs.js +520 -1
  38. package/dist/button.esm.js +682 -2
  39. package/dist/{calendar-CzpWDxLc.js → calendar-BsVqtpjM.js} +6 -6
  40. package/dist/{calendar-DkSDFg33.mjs → calendar-CFafqZVA.mjs} +6 -6
  41. package/dist/calendar.cjs.js +1 -1
  42. package/dist/calendar.esm.js +1 -1
  43. package/dist/card.cjs.js +6 -5
  44. package/dist/card.esm.js +52 -39
  45. package/dist/chart.cjs.js +2 -2
  46. package/dist/chart.esm.js +2 -2
  47. package/dist/checkbox.cjs.js +4 -4
  48. package/dist/checkbox.esm.js +36 -15
  49. package/dist/clone-source-BxK2pEVw.mjs +11 -0
  50. package/dist/clone-source-C7E_ri5f.js +1 -0
  51. package/dist/collapsible.cjs.js +1 -1
  52. package/dist/collapsible.esm.js +1 -1
  53. package/dist/color-picker.cjs.js +2 -2
  54. package/dist/color-picker.esm.js +3 -3
  55. package/dist/combobox.cjs.js +4 -4
  56. package/dist/combobox.esm.js +22 -19
  57. package/dist/command-palette.cjs.js +1 -1
  58. package/dist/command-palette.esm.js +1 -1
  59. package/dist/command.cjs.js +1 -1
  60. package/dist/command.esm.js +1 -1
  61. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  62. package/dist/components/ui-alert.d.ts.map +1 -1
  63. package/dist/components/ui-app-header.d.ts +1 -0
  64. package/dist/components/ui-app-header.d.ts.map +1 -1
  65. package/dist/components/ui-breadcrumb.d.ts.map +1 -1
  66. package/dist/components/ui-card.d.ts +7 -0
  67. package/dist/components/ui-card.d.ts.map +1 -1
  68. package/dist/components/ui-checkbox.d.ts +6 -0
  69. package/dist/components/ui-checkbox.d.ts.map +1 -1
  70. package/dist/components/ui-combobox.d.ts.map +1 -1
  71. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  72. package/dist/components/ui-dialog.d.ts +1 -0
  73. package/dist/components/ui-dialog.d.ts.map +1 -1
  74. package/dist/components/ui-drawer.d.ts.map +1 -1
  75. package/dist/components/ui-dropdown.d.ts.map +1 -1
  76. package/dist/components/ui-empty-state.d.ts.map +1 -1
  77. package/dist/components/ui-hover-card.d.ts.map +1 -1
  78. package/dist/components/ui-icon.d.ts +1 -0
  79. package/dist/components/ui-icon.d.ts.map +1 -1
  80. package/dist/components/ui-input.d.ts +16 -0
  81. package/dist/components/ui-input.d.ts.map +1 -1
  82. package/dist/components/ui-layout.d.ts +20 -0
  83. package/dist/components/ui-layout.d.ts.map +1 -1
  84. package/dist/components/ui-menu.d.ts +1 -0
  85. package/dist/components/ui-menu.d.ts.map +1 -1
  86. package/dist/components/ui-menubar.d.ts.map +1 -1
  87. package/dist/components/ui-multi-select.d.ts +6 -0
  88. package/dist/components/ui-multi-select.d.ts.map +1 -1
  89. package/dist/components/ui-number-field.d.ts +6 -0
  90. package/dist/components/ui-number-field.d.ts.map +1 -1
  91. package/dist/components/ui-pagination.d.ts.map +1 -1
  92. package/dist/components/ui-password-field.d.ts +11 -0
  93. package/dist/components/ui-password-field.d.ts.map +1 -1
  94. package/dist/components/ui-popover.d.ts.map +1 -1
  95. package/dist/components/ui-positioner.d.ts.map +1 -1
  96. package/dist/components/ui-radio-group.d.ts +6 -0
  97. package/dist/components/ui-radio-group.d.ts.map +1 -1
  98. package/dist/components/ui-rating.d.ts +1 -0
  99. package/dist/components/ui-rating.d.ts.map +1 -1
  100. package/dist/components/ui-select.d.ts +7 -0
  101. package/dist/components/ui-select.d.ts.map +1 -1
  102. package/dist/components/ui-sidebar.d.ts +1 -0
  103. package/dist/components/ui-sidebar.d.ts.map +1 -1
  104. package/dist/components/ui-slider.d.ts +6 -0
  105. package/dist/components/ui-slider.d.ts.map +1 -1
  106. package/dist/components/ui-sortable.d.ts +1 -0
  107. package/dist/components/ui-sortable.d.ts.map +1 -1
  108. package/dist/components/ui-switch.d.ts +6 -0
  109. package/dist/components/ui-switch.d.ts.map +1 -1
  110. package/dist/components/ui-tabs.d.ts +2 -0
  111. package/dist/components/ui-tabs.d.ts.map +1 -1
  112. package/dist/components/ui-textarea.d.ts +6 -0
  113. package/dist/components/ui-textarea.d.ts.map +1 -1
  114. package/dist/components/ui-toast.d.ts.map +1 -1
  115. package/dist/components/ui-tooltip.d.ts.map +1 -1
  116. package/dist/container.cjs.js +1 -1
  117. package/dist/container.esm.js +1 -1
  118. package/dist/context-menu.cjs.js +2 -2
  119. package/dist/context-menu.esm.js +2 -2
  120. package/dist/control-group.cjs.js +1 -1
  121. package/dist/control-group.esm.js +1 -1
  122. package/dist/data-table.cjs.js +5 -5
  123. package/dist/data-table.esm.js +7 -7
  124. package/dist/date-field.cjs.js +1 -1
  125. package/dist/date-field.esm.js +3 -3
  126. package/dist/date-picker.cjs.js +2 -2
  127. package/dist/date-picker.esm.js +17 -17
  128. package/dist/date-range-picker.cjs.js +2 -2
  129. package/dist/date-range-picker.esm.js +4 -4
  130. package/dist/date-range-time-picker.cjs.js +3 -3
  131. package/dist/date-range-time-picker.esm.js +16 -16
  132. package/dist/date-time-picker.cjs.js +26 -23
  133. package/dist/date-time-picker.esm.js +49 -46
  134. package/dist/{date-time-utils-zAx4ghvC.mjs → date-time-utils-CJUksWj3.mjs} +1 -1
  135. package/dist/{date-time-utils-C-4eHTyy.js → date-time-utils-D3hQQ5Om.js} +1 -1
  136. package/dist/description.cjs.js +1 -1
  137. package/dist/description.esm.js +1 -1
  138. package/dist/dialog.cjs.js +7 -7
  139. package/dist/dialog.esm.js +51 -47
  140. package/dist/direction-provider.cjs.js +1 -1
  141. package/dist/direction-provider.esm.js +1 -1
  142. package/dist/dismissable-layer.cjs.js +1 -1
  143. package/dist/dismissable-layer.esm.js +1 -1
  144. package/dist/dock.cjs.js +1 -1
  145. package/dist/dock.esm.js +1 -1
  146. package/dist/drawer.cjs.js +5 -5
  147. package/dist/drawer.esm.js +18 -17
  148. package/dist/dropdown.cjs.js +7 -7
  149. package/dist/dropdown.esm.js +39 -38
  150. package/dist/empty-state.cjs.js +12 -2
  151. package/dist/empty-state.esm.js +17 -7
  152. package/dist/field-error.cjs.js +1 -1
  153. package/dist/field-error.esm.js +1 -1
  154. package/dist/field.cjs.js +2 -2
  155. package/dist/field.esm.js +2 -2
  156. package/dist/fieldset.cjs.js +1 -1
  157. package/dist/fieldset.esm.js +1 -1
  158. package/dist/file-upload.cjs.js +1 -1
  159. package/dist/file-upload.esm.js +1 -1
  160. package/dist/flex.cjs.js +1 -1
  161. package/dist/flex.esm.js +1 -1
  162. package/dist/floating-toolbar.cjs.js +2 -2
  163. package/dist/floating-toolbar.esm.js +2 -2
  164. package/dist/focus-scope-Dl0qk5GP.mjs +177 -0
  165. package/dist/focus-scope-Doz0bnE1.js +1 -0
  166. package/dist/focus-scope.cjs.js +1 -1
  167. package/dist/focus-scope.esm.js +2 -2
  168. package/dist/form-control-B90_3kYN.js +1 -0
  169. package/dist/form-control-D9wWUMBl.mjs +86 -0
  170. package/dist/form.cjs.js +2 -2
  171. package/dist/form.esm.js +2 -2
  172. package/dist/gantt.cjs.js +2 -2
  173. package/dist/gantt.esm.js +2 -2
  174. package/dist/grid.cjs.js +1 -1
  175. package/dist/grid.esm.js +1 -1
  176. package/dist/hover-card.cjs.js +5 -5
  177. package/dist/hover-card.esm.js +19 -18
  178. package/dist/icon-cloud.cjs.js +1 -1
  179. package/dist/icon-cloud.esm.js +1 -1
  180. package/dist/icon.cjs.js +207 -1
  181. package/dist/icon.esm.js +294 -2
  182. package/dist/icons-CpCpPXV5.js +1 -0
  183. package/dist/icons-DWYbbhb0.mjs +115 -0
  184. package/dist/icons.d.ts +11 -1
  185. package/dist/icons.d.ts.map +1 -1
  186. package/dist/implicit-submit-B6M5Uc56.js +1 -0
  187. package/dist/implicit-submit-Lr0-q2LR.mjs +44 -0
  188. package/dist/index.cjs.js +1 -1
  189. package/dist/index.d.ts +1 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.esm.js +309 -299
  192. package/dist/inline-edit.cjs.js +1 -1
  193. package/dist/inline-edit.esm.js +1 -1
  194. package/dist/input.cjs.js +62 -20
  195. package/dist/input.esm.js +164 -58
  196. package/dist/label.cjs.js +1 -1
  197. package/dist/label.esm.js +1 -1
  198. package/dist/layout.cjs.js +145 -4
  199. package/dist/layout.esm.js +278 -40
  200. package/dist/marquee.cjs.js +1 -1
  201. package/dist/marquee.esm.js +1 -1
  202. package/dist/masonry-grid.cjs.js +1 -1
  203. package/dist/masonry-grid.esm.js +1 -1
  204. package/dist/menu.cjs.js +8 -8
  205. package/dist/menu.esm.js +51 -47
  206. package/dist/menubar.cjs.js +9 -9
  207. package/dist/menubar.esm.js +41 -40
  208. package/dist/meter.cjs.js +1 -1
  209. package/dist/meter.esm.js +1 -1
  210. package/dist/multi-select.cjs.js +7 -7
  211. package/dist/multi-select.esm.js +55 -34
  212. package/dist/navigate-CXebafwF.mjs +18 -0
  213. package/dist/navigate-ChJVIIuS.js +1 -0
  214. package/dist/navigation-menu.cjs.js +1 -1
  215. package/dist/navigation-menu.esm.js +1 -1
  216. package/dist/number-attribute-BAF07JrU.mjs +8 -0
  217. package/dist/number-attribute-C4Rrl7d3.js +1 -0
  218. package/dist/number-field.cjs.js +8 -8
  219. package/dist/number-field.esm.js +90 -69
  220. package/dist/number-ticker.cjs.js +1 -1
  221. package/dist/number-ticker.esm.js +1 -1
  222. package/dist/odometer.cjs.js +1 -1
  223. package/dist/odometer.esm.js +1 -1
  224. package/dist/orbiter.cjs.js +1 -1
  225. package/dist/orbiter.esm.js +1 -1
  226. package/dist/pagination.cjs.js +24 -23
  227. package/dist/pagination.esm.js +61 -46
  228. package/dist/{panel-group-BVHJEdfx.js → panel-group-BIzzpQ5i.js} +1 -1
  229. package/dist/{panel-group-BxO_eNW6.mjs → panel-group-CFLjzRWI.mjs} +1 -1
  230. package/dist/panel-group.cjs.js +1 -1
  231. package/dist/panel-group.esm.js +1 -1
  232. package/dist/panel.cjs.js +1 -1
  233. package/dist/panel.esm.js +1 -1
  234. package/dist/password-field.cjs.js +36 -16
  235. package/dist/password-field.esm.js +113 -44
  236. package/dist/pin-input.cjs.js +1 -1
  237. package/dist/pin-input.esm.js +1 -1
  238. package/dist/placement-grid.cjs.js +1 -1
  239. package/dist/placement-grid.esm.js +1 -1
  240. package/dist/plugin-panel.cjs.js +1 -1
  241. package/dist/plugin-panel.esm.js +1 -1
  242. package/dist/popover.cjs.js +2 -2
  243. package/dist/popover.esm.js +28 -26
  244. package/dist/portal.cjs.js +1 -1
  245. package/dist/portal.esm.js +1 -1
  246. package/dist/positioner.cjs.js +2 -2
  247. package/dist/positioner.esm.js +35 -38
  248. package/dist/preload.cjs.js +221 -0
  249. package/dist/preload.css +220 -0
  250. package/dist/preload.d.ts +17 -0
  251. package/dist/preload.d.ts.map +1 -0
  252. package/dist/preload.esm.js +224 -0
  253. package/dist/presence.cjs.js +1 -1
  254. package/dist/presence.esm.js +1 -1
  255. package/dist/primitives/clone-source.d.ts +3 -0
  256. package/dist/primitives/clone-source.d.ts.map +1 -0
  257. package/dist/primitives/focus-scope.d.ts +6 -0
  258. package/dist/primitives/focus-scope.d.ts.map +1 -1
  259. package/dist/primitives/form-control.d.ts +68 -0
  260. package/dist/primitives/form-control.d.ts.map +1 -0
  261. package/dist/primitives/implicit-submit.d.ts +17 -0
  262. package/dist/primitives/implicit-submit.d.ts.map +1 -0
  263. package/dist/primitives/navigate.d.ts +27 -0
  264. package/dist/primitives/navigate.d.ts.map +1 -0
  265. package/dist/primitives/number-attribute.d.ts +7 -0
  266. package/dist/primitives/number-attribute.d.ts.map +1 -0
  267. package/dist/primitives/slotted-input.d.ts +19 -0
  268. package/dist/primitives/slotted-input.d.ts.map +1 -0
  269. package/dist/progress.cjs.js +3 -3
  270. package/dist/progress.esm.js +3 -3
  271. package/dist/quick-actions.cjs.js +5 -5
  272. package/dist/quick-actions.esm.js +3 -3
  273. package/dist/radio-group.cjs.js +9 -9
  274. package/dist/radio-group.esm.js +47 -24
  275. package/dist/radio.cjs.js +1 -1
  276. package/dist/radio.esm.js +1 -1
  277. package/dist/rating.cjs.js +6 -6
  278. package/dist/rating.esm.js +21 -10
  279. package/dist/{runtime-BRT7E4A8.mjs → runtime-CORXjP7e.mjs} +379 -357
  280. package/dist/runtime-uCly3ECd.js +5 -0
  281. package/dist/runtime.cjs.js +1 -1
  282. package/dist/runtime.esm.js +1 -1
  283. package/dist/scroll-area.cjs.js +1 -1
  284. package/dist/scroll-area.esm.js +1 -1
  285. package/dist/section.cjs.js +1 -1
  286. package/dist/section.esm.js +1 -1
  287. package/dist/select.cjs.js +21 -21
  288. package/dist/select.esm.js +111 -71
  289. package/dist/selection-popup.cjs.js +2 -2
  290. package/dist/selection-popup.esm.js +2 -2
  291. package/dist/semantic-tokens.d.ts.map +1 -1
  292. package/dist/separator.cjs.js +1 -1
  293. package/dist/separator.esm.js +1 -1
  294. package/dist/sidebar.cjs.js +15 -15
  295. package/dist/sidebar.esm.js +48 -42
  296. package/dist/skeleton.cjs.js +1 -1
  297. package/dist/skeleton.esm.js +1 -1
  298. package/dist/slider.cjs.js +11 -11
  299. package/dist/slider.esm.js +40 -23
  300. package/dist/slot.cjs.js +1 -1
  301. package/dist/slot.esm.js +1 -1
  302. package/dist/slotted-input-BVq2QQg2.js +1 -0
  303. package/dist/slotted-input-atWznLfm.mjs +13 -0
  304. package/dist/sortable.cjs.js +25 -25
  305. package/dist/sortable.esm.js +29 -21
  306. package/dist/spinning-text.cjs.js +1 -1
  307. package/dist/spinning-text.esm.js +1 -1
  308. package/dist/split-button.cjs.js +1 -1
  309. package/dist/split-button.esm.js +1 -1
  310. package/dist/splitter.cjs.js +1 -1
  311. package/dist/splitter.esm.js +1 -1
  312. package/dist/standalone/add-icons.d.ts +2 -0
  313. package/dist/standalone/add-icons.d.ts.map +1 -0
  314. package/dist/standalone/preload.d.ts +2 -0
  315. package/dist/standalone/preload.d.ts.map +1 -0
  316. package/dist/stepper.cjs.js +3 -3
  317. package/dist/stepper.esm.js +3 -3
  318. package/dist/switch.cjs.js +9 -9
  319. package/dist/switch.esm.js +56 -35
  320. package/dist/table.cjs.js +1 -1
  321. package/dist/table.esm.js +1 -1
  322. package/dist/tabs.cjs.js +14 -14
  323. package/dist/tabs.esm.js +129 -115
  324. package/dist/tags-input.cjs.js +1 -1
  325. package/dist/tags-input.esm.js +1 -1
  326. package/dist/textarea.cjs.js +33 -11
  327. package/dist/textarea.esm.js +74 -35
  328. package/dist/theme.d.ts +6 -0
  329. package/dist/theme.d.ts.map +1 -1
  330. package/dist/time-field.cjs.js +1 -1
  331. package/dist/time-field.esm.js +2 -2
  332. package/dist/time-picker.cjs.js +1 -1
  333. package/dist/time-picker.esm.js +3 -3
  334. package/dist/timeline.cjs.js +2 -2
  335. package/dist/timeline.esm.js +2 -2
  336. package/dist/toast.cjs.js +4 -4
  337. package/dist/toast.esm.js +17 -16
  338. package/dist/toggle-group.cjs.js +1 -1
  339. package/dist/toggle-group.esm.js +1 -1
  340. package/dist/toggle.cjs.js +3 -3
  341. package/dist/toggle.esm.js +9 -9
  342. package/dist/toolbar.cjs.js +1 -1
  343. package/dist/toolbar.esm.js +1 -1
  344. package/dist/tooltip.cjs.js +2 -2
  345. package/dist/tooltip.esm.js +12 -14
  346. package/dist/transfer-list.cjs.js +1 -1
  347. package/dist/transfer-list.esm.js +1 -1
  348. package/dist/{tree-33fVNnaf.mjs → tree-CD2k2lIC.mjs} +1 -1
  349. package/dist/{tree-Dc02MChE.js → tree-ChQfhxya.js} +1 -1
  350. package/dist/tree-item.cjs.js +1 -1
  351. package/dist/tree-item.esm.js +1 -1
  352. package/dist/tree.cjs.js +1 -1
  353. package/dist/tree.esm.js +1 -1
  354. package/dist/visually-hidden.cjs.js +1 -1
  355. package/dist/visually-hidden.esm.js +1 -1
  356. package/dist/wizard.cjs.js +4 -4
  357. package/dist/wizard.esm.js +4 -4
  358. package/package.json +3 -2
  359. package/dist/focus-scope-Bwug2gDv.js +0 -1
  360. package/dist/focus-scope-CmEsG5UZ.mjs +0 -138
  361. package/dist/runtime-CXw4SGV9.js +0 -5
  362. package/dist/ui-button-C3OmI7Sn.mjs +0 -684
  363. package/dist/ui-button-CnLwXBnx.js +0 -520
  364. package/dist/ui-icon-D3avtxX_.js +0 -207
  365. package/dist/ui-icon-DLhB08Fo.mjs +0 -361
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./ElementBase-DxbvhLJs.js"),b=require("./portal-XbYR3m_q.js"),g=require("./dismissable-layer-DNfrKA20.js"),m=require("./positioner-DZ1FW6A9.js"),s=require("./overlay-motion-B56x1GoY.js"),_=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("./ElementBase-CbUsP3D6.js"),g=require("./number-attribute-C4Rrl7d3.js"),c=require("./clone-source-C7E_ri5f.js"),m=require("./portal-XbYR3m_q.js"),_=require("./dismissable-layer-DNfrKA20.js"),x=require("./positioner-DZ1FW6A9.js"),s=require("./overlay-motion-B56x1GoY.js"),y=`
2
2
  ${s.OVERLAY_MOTION_CSS}
3
3
 
4
4
  .popover-shell {
@@ -271,4 +271,4 @@
271
271
  box-shadow: none;
272
272
  }
273
273
  }
274
- `;class d extends f.ElementBase{constructor(){super(),this._portalEl=null,this._panelEl=null,this._positioner=null,this._layer=null,this._isOpen=!1,this._restoreFocusEl=null,this._contentObserver=null,this._hostObserver=null,this._syncPortalScheduled=!1,this._onHostClick=this._handleHostClick.bind(this)}static get observedAttributes(){return["open","placement","offset","flip","shift","close-on-escape","close-on-outside","variant","tone","size","radius","elevation"]}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"){this._syncOpenState();return}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())}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onHostClick),this._observeHost(),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("click",this._onHostClick),this._hostObserver?.disconnect(),this._hostObserver=null,this._teardownPortal(),super.disconnectedCallback()}_handleHostClick(e){const t=this._getTrigger();if(!t)return;const r=typeof e.composedPath=="function"?e.composedPath():[],o=e.target instanceof Node?e.target:null;(r.includes(t)||o&&(t===o||t.contains(o)))&&this.toggle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}toggle(){this.hasAttribute("open")?this.close():this.open()}updatePosition(){this._positioner?.update()}_getTrigger(){return this.querySelector('[slot="trigger"]')}_buildPortalContent(){const e=document.createElement("div");e.className="popover-shell",e.style.pointerEvents="auto";const t=this.getAttribute("variant");t&&(e.dataset.variant=t);const r=this.getAttribute("tone");r&&(e.dataset.tone=r);const o=this.getAttribute("size");o&&(e.dataset.size=o);const a=this.getAttribute("elevation");a&&(e.dataset.elevation=a);const n=this.getAttribute("radius");if(n&&n.trim()){const l=n.trim(),h=/^-?\d+(\.\d+)?$/.test(l)?`${l}px`:l;e.style.setProperty("--ui-popover-radius",h)}const c=document.createElement("style");c.textContent=_,e.appendChild(c);const i=document.createElement("div");i.className="panel show",this._panelEl=i;const u=document.createElement("div");u.className="arrow",i.appendChild(u);const v=this.querySelector('[slot="content"]'),p=document.createElement("div");return p.className="content",v&&p.appendChild(v.cloneNode(!0)),i.appendChild(p),e.appendChild(i),e}_getContentSource(){return this.querySelector('[slot="content"]')}_placement(){const e=this.getAttribute("placement");return e||"bottom"}_offset(){const e=Number(this.getAttribute("offset"));return Number.isFinite(e)?e:8}_closeOnEscape(){return this.getAttribute("close-on-escape")!=="false"}_closeOnOutside(){return this.getAttribute("close-on-outside")!=="false"}_syncDismissableLayer(){const e=this._getTrigger();!e||!this._panelEl||(this._layer?.destroy(),this._layer=g.createDismissableLayer({node:this._panelEl,trigger:e,closeOnEscape:this._closeOnEscape(),closeOnPointerOutside:this._closeOnOutside(),onDismiss:()=>this.close()}))}_teardownPortal(e=!1){this._contentObserver?.disconnect(),this._contentObserver=null,this._layer?.destroy(),this._layer=null,this._positioner?.destroy(),this._positioner=null,this._panelEl=null,e?s.retireOverlay(this._portalEl):s.removeOverlay(this._portalEl),this._portalEl=null}_schedulePortalSync(){this._syncPortalScheduled||!this._isOpen||(this._syncPortalScheduled=!0,queueMicrotask(()=>{this._syncPortalScheduled=!1,this._isOpen&&this._mountPortal()}))}_observeContent(){this._contentObserver?.disconnect(),this._contentObserver=null;const e=this._getContentSource();!e||typeof MutationObserver>"u"||(this._contentObserver=new MutationObserver(()=>this._schedulePortalSync()),this._contentObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}_observeHost(){this._hostObserver?.disconnect(),this._hostObserver=null,!(typeof MutationObserver>"u")&&(this._hostObserver=new MutationObserver(()=>this._schedulePortalSync()),this._hostObserver.observe(this,{childList:!0,subtree:!1}))}_mountPortal(){const e=this._getTrigger();if(!e)return;this._teardownPortal(),this._portalEl=this._buildPortalContent();const t=b.createPortalContainer();t&&(t.appendChild(this._portalEl),this._observeContent(),this._positioner=m.createPositioner({anchor:e,floating:this._portalEl,placement:this._placement(),offset:this._offset(),shift:this.getAttribute("shift")!=="false",flip:this.getAttribute("flip")!=="false",arrow:this._portalEl.querySelector(".arrow")}),s.openOverlay(this._portalEl),this._syncDismissableLayer())}_syncOpenState(){const e=this.hasAttribute("open");if(e===this._isOpen){e&&(!this._portalEl||!this._portalEl.isConnected?this._mountPortal():this._positioner?.update());return}if(this._isOpen=e,e){this._restoreFocusEl=document.activeElement instanceof HTMLElement?document.activeElement:null,this._mountPortal(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!0},bubbles:!0,composed:!0}));return}this._teardownPortal(!0),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!1},bubbles:!0,composed:!0}));const t=this._getTrigger(),r=this._restoreFocusEl;this._restoreFocusEl=null;const o=(t&&t.isConnected?t:r)||null;if(o&&o.isConnected)try{o.focus()}catch{}}render(){this.setContent('<slot name="trigger"></slot>')}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-popover")&&customElements.define("ui-popover",d);exports.UIPopover=d;
274
+ `;class h extends b.ElementBase{constructor(){super(),this._portalEl=null,this._panelEl=null,this._positioner=null,this._layer=null,this._isOpen=!1,this._restoreFocusEl=null,this._contentObserver=null,this._hostObserver=null,this._syncPortalScheduled=!1,this._onHostClick=this._handleHostClick.bind(this)}static get observedAttributes(){return["open","placement","offset","flip","shift","close-on-escape","close-on-outside","variant","tone","size","radius","elevation"]}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"){this._syncOpenState();return}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())}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onHostClick),this._observeHost(),c.hideCloneSource(this.querySelector('[slot="content"]')),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("click",this._onHostClick),this._hostObserver?.disconnect(),this._hostObserver=null,this._teardownPortal(),super.disconnectedCallback()}_handleHostClick(e){const t=this._getTrigger();if(!t)return;const r=typeof e.composedPath=="function"?e.composedPath():[],o=e.target instanceof Node?e.target:null;(r.includes(t)||o&&(t===o||t.contains(o)))&&this.toggle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}toggle(){this.hasAttribute("open")?this.close():this.open()}updatePosition(){this._positioner?.update()}_getTrigger(){return this.querySelector('[slot="trigger"]')}_buildPortalContent(){const e=document.createElement("div");e.className="popover-shell",e.style.pointerEvents="auto";const t=this.getAttribute("variant");t&&(e.dataset.variant=t);const r=this.getAttribute("tone");r&&(e.dataset.tone=r);const o=this.getAttribute("size");o&&(e.dataset.size=o);const a=this.getAttribute("elevation");a&&(e.dataset.elevation=a);const n=this.getAttribute("radius");if(n&&n.trim()){const l=n.trim(),f=/^-?\d+(\.\d+)?$/.test(l)?`${l}px`:l;e.style.setProperty("--ui-popover-radius",f)}const u=document.createElement("style");u.textContent=y,e.appendChild(u);const i=document.createElement("div");i.className="panel show",this._panelEl=i;const v=document.createElement("div");v.className="arrow",i.appendChild(v);const d=this.querySelector('[slot="content"]'),p=document.createElement("div");return p.className="content",d&&p.appendChild(c.revealClone(d.cloneNode(!0))),i.appendChild(p),e.appendChild(i),e}_getContentSource(){return this.querySelector('[slot="content"]')}_placement(){const e=this.getAttribute("placement");return e||"bottom"}_offset(){const e=g.numberAttribute(this.getAttribute("offset"),8);return Number.isFinite(e)?e:8}_closeOnEscape(){return this.getAttribute("close-on-escape")!=="false"}_closeOnOutside(){return this.getAttribute("close-on-outside")!=="false"}_syncDismissableLayer(){const e=this._getTrigger();!e||!this._panelEl||(this._layer?.destroy(),this._layer=_.createDismissableLayer({node:this._panelEl,trigger:e,closeOnEscape:this._closeOnEscape(),closeOnPointerOutside:this._closeOnOutside(),onDismiss:()=>this.close()}))}_teardownPortal(e=!1){this._contentObserver?.disconnect(),this._contentObserver=null,this._layer?.destroy(),this._layer=null,this._positioner?.destroy(),this._positioner=null,this._panelEl=null,e?s.retireOverlay(this._portalEl):s.removeOverlay(this._portalEl),this._portalEl=null}_schedulePortalSync(){this._syncPortalScheduled||!this._isOpen||(this._syncPortalScheduled=!0,queueMicrotask(()=>{this._syncPortalScheduled=!1,this._isOpen&&this._mountPortal()}))}_observeContent(){this._contentObserver?.disconnect(),this._contentObserver=null;const e=this._getContentSource();c.hideCloneSource(e),!(!e||typeof MutationObserver>"u")&&(this._contentObserver=new MutationObserver(()=>this._schedulePortalSync()),this._contentObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}_observeHost(){this._hostObserver?.disconnect(),this._hostObserver=null,!(typeof MutationObserver>"u")&&(this._hostObserver=new MutationObserver(()=>this._schedulePortalSync()),this._hostObserver.observe(this,{childList:!0,subtree:!1}))}_mountPortal(){const e=this._getTrigger();if(!e)return;this._teardownPortal(),this._portalEl=this._buildPortalContent();const t=m.createPortalContainer();t&&(t.appendChild(this._portalEl),this._observeContent(),this._positioner=x.createPositioner({anchor:e,floating:this._portalEl,placement:this._placement(),offset:this._offset(),shift:this.getAttribute("shift")!=="false",flip:this.getAttribute("flip")!=="false",arrow:this._portalEl.querySelector(".arrow")}),s.openOverlay(this._portalEl),this._syncDismissableLayer())}_syncOpenState(){const e=this.hasAttribute("open");if(e===this._isOpen){e&&(!this._portalEl||!this._portalEl.isConnected?this._mountPortal():this._positioner?.update());return}if(this._isOpen=e,e){this._restoreFocusEl=document.activeElement instanceof HTMLElement?document.activeElement:null,this._mountPortal(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!0},bubbles:!0,composed:!0}));return}this._teardownPortal(!0),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!1},bubbles:!0,composed:!0}));const t=this._getTrigger(),r=this._restoreFocusEl;this._restoreFocusEl=null;const o=(t&&t.isConnected?t:r)||null;if(o&&o.isConnected)try{o.focus()}catch{}}render(){this.setContent('<slot name="trigger"></slot>')}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-popover")&&customElements.define("ui-popover",h);exports.UIPopover=h;
@@ -1,10 +1,12 @@
1
- import { E as d } from "./ElementBase-BeZT54Hj.mjs";
2
- import { b as h } from "./portal-DeaM1tYY.mjs";
3
- import { c as f } from "./dismissable-layer-BmPIoK80.mjs";
4
- import { e as b } from "./positioner-BE8Nbho2.mjs";
5
- import { O as g, r as m, a as _, o as x } from "./overlay-motion-BX3dPLay.mjs";
6
- const w = `
7
- ${g}
1
+ import { E as h } from "./ElementBase-D5QsC5Vw.mjs";
2
+ import { n as f } from "./number-attribute-BAF07JrU.mjs";
3
+ import { h as v, r as b } from "./clone-source-BxK2pEVw.mjs";
4
+ import { b as g } from "./portal-DeaM1tYY.mjs";
5
+ import { c as m } from "./dismissable-layer-BmPIoK80.mjs";
6
+ import { e as _ } from "./positioner-BE8Nbho2.mjs";
7
+ import { O as x, r as w, a as y, o as E } from "./overlay-motion-BX3dPLay.mjs";
8
+ const C = `
9
+ ${x}
8
10
 
9
11
  .popover-shell {
10
12
  --ui-popover-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
@@ -277,7 +279,7 @@ const w = `
277
279
  }
278
280
  }
279
281
  `;
280
- class y extends d {
282
+ class O extends h {
281
283
  constructor() {
282
284
  super(), this._portalEl = null, this._panelEl = null, this._positioner = null, this._layer = null, this._isOpen = !1, this._restoreFocusEl = null, this._contentObserver = null, this._hostObserver = null, this._syncPortalScheduled = !1, this._onHostClick = this._handleHostClick.bind(this);
283
285
  }
@@ -307,7 +309,7 @@ class y extends d {
307
309
  }
308
310
  }
309
311
  connectedCallback() {
310
- super.connectedCallback(), this.addEventListener("click", this._onHostClick), this._observeHost(), this._syncOpenState();
312
+ super.connectedCallback(), this.addEventListener("click", this._onHostClick), this._observeHost(), v(this.querySelector('[slot="content"]')), this._syncOpenState();
311
313
  }
312
314
  disconnectedCallback() {
313
315
  this.removeEventListener("click", this._onHostClick), this._hostObserver?.disconnect(), this._hostObserver = null, this._teardownPortal(), super.disconnectedCallback();
@@ -342,21 +344,21 @@ class y extends d {
342
344
  r && (e.dataset.tone = r);
343
345
  const o = this.getAttribute("size");
344
346
  o && (e.dataset.size = o);
345
- const a = this.getAttribute("elevation");
346
- a && (e.dataset.elevation = a);
347
- const s = this.getAttribute("radius");
348
- if (s && s.trim()) {
349
- const p = s.trim(), v = /^-?\d+(\.\d+)?$/.test(p) ? `${p}px` : p;
350
- e.style.setProperty("--ui-popover-radius", v);
347
+ const s = this.getAttribute("elevation");
348
+ s && (e.dataset.elevation = s);
349
+ const a = this.getAttribute("radius");
350
+ if (a && a.trim()) {
351
+ const p = a.trim(), d = /^-?\d+(\.\d+)?$/.test(p) ? `${p}px` : p;
352
+ e.style.setProperty("--ui-popover-radius", d);
351
353
  }
352
354
  const l = document.createElement("style");
353
- l.textContent = w, e.appendChild(l);
355
+ l.textContent = C, e.appendChild(l);
354
356
  const i = document.createElement("div");
355
357
  i.className = "panel show", this._panelEl = i;
356
358
  const c = document.createElement("div");
357
359
  c.className = "arrow", i.appendChild(c);
358
360
  const u = this.querySelector('[slot="content"]'), n = document.createElement("div");
359
- return n.className = "content", u && n.appendChild(u.cloneNode(!0)), i.appendChild(n), e.appendChild(i), e;
361
+ return n.className = "content", u && n.appendChild(b(u.cloneNode(!0))), i.appendChild(n), e.appendChild(i), e;
360
362
  }
361
363
  _getContentSource() {
362
364
  return this.querySelector('[slot="content"]');
@@ -366,7 +368,7 @@ class y extends d {
366
368
  return e || "bottom";
367
369
  }
368
370
  _offset() {
369
- const e = Number(this.getAttribute("offset"));
371
+ const e = f(this.getAttribute("offset"), 8);
370
372
  return Number.isFinite(e) ? e : 8;
371
373
  }
372
374
  _closeOnEscape() {
@@ -377,7 +379,7 @@ class y extends d {
377
379
  }
378
380
  _syncDismissableLayer() {
379
381
  const e = this._getTrigger();
380
- !e || !this._panelEl || (this._layer?.destroy(), this._layer = f({
382
+ !e || !this._panelEl || (this._layer?.destroy(), this._layer = m({
381
383
  node: this._panelEl,
382
384
  trigger: e,
383
385
  closeOnEscape: this._closeOnEscape(),
@@ -386,7 +388,7 @@ class y extends d {
386
388
  }));
387
389
  }
388
390
  _teardownPortal(e = !1) {
389
- this._contentObserver?.disconnect(), this._contentObserver = null, this._layer?.destroy(), this._layer = null, this._positioner?.destroy(), this._positioner = null, this._panelEl = null, e ? m(this._portalEl) : _(this._portalEl), this._portalEl = null;
391
+ this._contentObserver?.disconnect(), this._contentObserver = null, this._layer?.destroy(), this._layer = null, this._positioner?.destroy(), this._positioner = null, this._panelEl = null, e ? w(this._portalEl) : y(this._portalEl), this._portalEl = null;
390
392
  }
391
393
  _schedulePortalSync() {
392
394
  this._syncPortalScheduled || !this._isOpen || (this._syncPortalScheduled = !0, queueMicrotask(() => {
@@ -396,7 +398,7 @@ class y extends d {
396
398
  _observeContent() {
397
399
  this._contentObserver?.disconnect(), this._contentObserver = null;
398
400
  const e = this._getContentSource();
399
- !e || typeof MutationObserver > "u" || (this._contentObserver = new MutationObserver(() => this._schedulePortalSync()), this._contentObserver.observe(e, {
401
+ v(e), !(!e || typeof MutationObserver > "u") && (this._contentObserver = new MutationObserver(() => this._schedulePortalSync()), this._contentObserver.observe(e, {
400
402
  attributes: !0,
401
403
  childList: !0,
402
404
  characterData: !0,
@@ -413,8 +415,8 @@ class y extends d {
413
415
  const e = this._getTrigger();
414
416
  if (!e) return;
415
417
  this._teardownPortal(), this._portalEl = this._buildPortalContent();
416
- const t = h();
417
- t && (t.appendChild(this._portalEl), this._observeContent(), this._positioner = b({
418
+ const t = g();
419
+ t && (t.appendChild(this._portalEl), this._observeContent(), this._positioner = _({
418
420
  anchor: e,
419
421
  floating: this._portalEl,
420
422
  placement: this._placement(),
@@ -422,7 +424,7 @@ class y extends d {
422
424
  shift: this.getAttribute("shift") !== "false",
423
425
  flip: this.getAttribute("flip") !== "false",
424
426
  arrow: this._portalEl.querySelector(".arrow")
425
- }), x(this._portalEl), this._syncDismissableLayer());
427
+ }), E(this._portalEl), this._syncDismissableLayer());
426
428
  }
427
429
  _syncOpenState() {
428
430
  const e = this.hasAttribute("open");
@@ -451,7 +453,7 @@ class y extends d {
451
453
  return !1;
452
454
  }
453
455
  }
454
- typeof customElements < "u" && !customElements.get("ui-popover") && customElements.define("ui-popover", y);
456
+ typeof customElements < "u" && !customElements.get("ui-popover") && customElements.define("ui-popover", O);
455
457
  export {
456
- y as UIPopover
458
+ O as UIPopover
457
459
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-DxbvhLJs.js"),l=require("./selector-BvAh35ve.js"),a=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-CbUsP3D6.js"),l=require("./selector-BvAh35ve.js"),a=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
@@ -1,4 +1,4 @@
1
- import { E as n } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as n } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  import { s as o } from "./selector-WI8pD7YO.mjs";
3
3
  const a = `
4
4
  :host {
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-DxbvhLJs.js"),h=require("./positioner-DZ1FW6A9.js"),a=require("./selector-BvAh35ve.js"),d=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-CbUsP3D6.js"),h=require("./positioner-DZ1FW6A9.js"),a=require("./selector-BvAh35ve.js"),d=require("./number-attribute-C4Rrl7d3.js"),f=`
2
2
  :host {
3
3
  display: contents;
4
4
  color-scheme: light dark;
5
5
  }
6
- `;function r(s,t=0){const e=Number(s);return Number.isFinite(e)?e:t}function o(s){if(s==null)return!1;const t=s.toLowerCase();return t!=="false"&&t!=="0"&&t!=="off"}function f(s){return new Set(["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"]).has(s)?s:"bottom"}function b(s){return s==="absolute"?"absolute":"fixed"}class u extends c.ElementBase{constructor(){super(...arguments),this._positioner=null,this._observer=null}static get observedAttributes(){return["open","placement","strategy","offset","cross-offset","flip","shift","match-width","fit-viewport","auto-placement","hide-when-detached","inline","boundary-padding","dir","anchor","headless"]}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>this._syncPositioner()),this._observer.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot","id"]}),this._syncPositioner()}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._destroyPositioner(),super.disconnectedCallback()}attributeChangedCallback(t,e,i){e!==i&&this._syncPositioner()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}updatePosition(){this._positioner?.update()}_destroyPositioner(){this._positioner?.destroy(),this._positioner=null}_resolveAnchor(){const t=this.getAttribute("anchor");if(t){const i=this.getRootNode(),n=i instanceof ShadowRoot||i instanceof Document?a.safeQuerySelector(i,t):null;if(n instanceof HTMLElement)return n;const l=a.safeQuerySelector(document,t);if(l instanceof HTMLElement)return l}const e=this.querySelector('[slot="anchor"]');return e instanceof HTMLElement?e:null}_resolveFloating(){const t=this.querySelector('[slot="content"]');return t instanceof HTMLElement?t:Array.from(this.children).find(e=>e.getAttribute("slot")!=="anchor")}_syncPositioner(){if(!this.isConnected)return;if(this.hasAttribute("headless")||!this.hasAttribute("open")){this._destroyPositioner();return}const t=this._resolveAnchor(),e=this._resolveFloating();if(!(t instanceof HTMLElement)||!(e instanceof HTMLElement)){this._destroyPositioner();return}this._destroyPositioner(),this._positioner=h.createPositioner({anchor:t,floating:e,placement:f(this.getAttribute("placement")),strategy:b(this.getAttribute("strategy")),dir:this.getAttribute("dir")==="rtl"?"rtl":"ltr",offset:r(this.getAttribute("offset"),8),crossOffset:r(this.getAttribute("cross-offset"),0),flip:!this.hasAttribute("flip")||o(this.getAttribute("flip")),shift:!this.hasAttribute("shift")||o(this.getAttribute("shift")),matchWidth:o(this.getAttribute("match-width")),fitViewport:o(this.getAttribute("fit-viewport")),autoPlacement:o(this.getAttribute("auto-placement")),hideWhenDetached:o(this.getAttribute("hide-when-detached")),inline:o(this.getAttribute("inline")),boundaryPadding:r(this.getAttribute("boundary-padding"),4),arrow:this.querySelector('[slot="arrow"], .arrow'),onUpdate:i=>{this.dispatchEvent(new CustomEvent("position-change",{detail:i,bubbles:!0,composed:!0}))}})}render(){this.setContent(`<style>${d}</style><slot name="anchor"></slot><slot name="content"></slot><slot></slot>`)}shouldRenderOnAttributeChange(){return!1}}typeof customElements<"u"&&!customElements.get("ui-positioner")&&customElements.define("ui-positioner",u);exports.UIPositioner=u;
6
+ `,r=(e,t=0)=>d.numberAttribute(e,t);function o(e){if(e==null)return!1;const t=e.toLowerCase();return t!=="false"&&t!=="0"&&t!=="off"}function b(e){return new Set(["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"]).has(e)?e:"bottom"}function m(e){return e==="absolute"?"absolute":"fixed"}class u extends c.ElementBase{constructor(){super(...arguments),this._positioner=null,this._observer=null}static get observedAttributes(){return["open","placement","strategy","offset","cross-offset","flip","shift","match-width","fit-viewport","auto-placement","hide-when-detached","inline","boundary-padding","dir","anchor","headless"]}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>this._syncPositioner()),this._observer.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot","id"]}),this._syncPositioner()}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._destroyPositioner(),super.disconnectedCallback()}attributeChangedCallback(t,s,i){s!==i&&this._syncPositioner()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}updatePosition(){this._positioner?.update()}_destroyPositioner(){this._positioner?.destroy(),this._positioner=null}_resolveAnchor(){const t=this.getAttribute("anchor");if(t){const i=this.getRootNode(),n=i instanceof ShadowRoot||i instanceof Document?a.safeQuerySelector(i,t):null;if(n instanceof HTMLElement)return n;const l=a.safeQuerySelector(document,t);if(l instanceof HTMLElement)return l}const s=this.querySelector('[slot="anchor"]');return s instanceof HTMLElement?s:null}_resolveFloating(){const t=this.querySelector('[slot="content"]');return t instanceof HTMLElement?t:Array.from(this.children).find(s=>s.getAttribute("slot")!=="anchor")}_syncPositioner(){if(!this.isConnected)return;if(this.hasAttribute("headless")||!this.hasAttribute("open")){this._destroyPositioner();return}const t=this._resolveAnchor(),s=this._resolveFloating();if(!(t instanceof HTMLElement)||!(s instanceof HTMLElement)){this._destroyPositioner();return}this._destroyPositioner(),this._positioner=h.createPositioner({anchor:t,floating:s,placement:b(this.getAttribute("placement")),strategy:m(this.getAttribute("strategy")),dir:this.getAttribute("dir")==="rtl"?"rtl":"ltr",offset:r(this.getAttribute("offset"),8),crossOffset:r(this.getAttribute("cross-offset"),0),flip:!this.hasAttribute("flip")||o(this.getAttribute("flip")),shift:!this.hasAttribute("shift")||o(this.getAttribute("shift")),matchWidth:o(this.getAttribute("match-width")),fitViewport:o(this.getAttribute("fit-viewport")),autoPlacement:o(this.getAttribute("auto-placement")),hideWhenDetached:o(this.getAttribute("hide-when-detached")),inline:o(this.getAttribute("inline")),boundaryPadding:r(this.getAttribute("boundary-padding"),4),arrow:this.querySelector('[slot="arrow"], .arrow'),onUpdate:i=>{this.dispatchEvent(new CustomEvent("position-change",{detail:i,bubbles:!0,composed:!0}))}})}render(){this.setContent(`<style>${f}</style><slot name="anchor"></slot><slot name="content"></slot><slot></slot>`)}shouldRenderOnAttributeChange(){return!1}}typeof customElements<"u"&&!customElements.get("ui-positioner")&&customElements.define("ui-positioner",u);exports.UIPositioner=u;
@@ -1,22 +1,19 @@
1
- import { E as h } from "./ElementBase-BeZT54Hj.mjs";
1
+ import { E as h } from "./ElementBase-D5QsC5Vw.mjs";
2
2
  import { e as c } from "./positioner-BE8Nbho2.mjs";
3
3
  import { s as l } from "./selector-WI8pD7YO.mjs";
4
- const u = `
4
+ import { n as u } from "./number-attribute-BAF07JrU.mjs";
5
+ const d = `
5
6
  :host {
6
7
  display: contents;
7
8
  color-scheme: light dark;
8
9
  }
9
- `;
10
- function r(s, t = 0) {
11
- const e = Number(s);
12
- return Number.isFinite(e) ? e : t;
13
- }
14
- function o(s) {
15
- if (s == null) return !1;
16
- const t = s.toLowerCase();
10
+ `, r = (e, t = 0) => u(e, t);
11
+ function i(e) {
12
+ if (e == null) return !1;
13
+ const t = e.toLowerCase();
17
14
  return t !== "false" && t !== "0" && t !== "off";
18
15
  }
19
- function d(s) {
16
+ function f(e) {
20
17
  return (/* @__PURE__ */ new Set([
21
18
  "top",
22
19
  "top-start",
@@ -30,12 +27,12 @@ function d(s) {
30
27
  "left",
31
28
  "left-start",
32
29
  "left-end"
33
- ])).has(s) ? s : "bottom";
30
+ ])).has(e) ? e : "bottom";
34
31
  }
35
- function f(s) {
36
- return s === "absolute" ? "absolute" : "fixed";
32
+ function b(e) {
33
+ return e === "absolute" ? "absolute" : "fixed";
37
34
  }
38
- class b extends h {
35
+ class m extends h {
39
36
  constructor() {
40
37
  super(...arguments), this._positioner = null, this._observer = null;
41
38
  }
@@ -65,8 +62,8 @@ class b extends h {
65
62
  disconnectedCallback() {
66
63
  this._observer?.disconnect(), this._observer = null, this._destroyPositioner(), super.disconnectedCallback();
67
64
  }
68
- attributeChangedCallback(t, e, i) {
69
- e !== i && this._syncPositioner();
65
+ attributeChangedCallback(t, s, o) {
66
+ s !== o && this._syncPositioner();
70
67
  }
71
68
  open() {
72
69
  this.setAttribute("open", "");
@@ -83,17 +80,17 @@ class b extends h {
83
80
  _resolveAnchor() {
84
81
  const t = this.getAttribute("anchor");
85
82
  if (t) {
86
- const i = this.getRootNode(), n = i instanceof ShadowRoot || i instanceof Document ? l(i, t) : null;
83
+ const o = this.getRootNode(), n = o instanceof ShadowRoot || o instanceof Document ? l(o, t) : null;
87
84
  if (n instanceof HTMLElement) return n;
88
85
  const a = l(document, t);
89
86
  if (a instanceof HTMLElement) return a;
90
87
  }
91
- const e = this.querySelector('[slot="anchor"]');
92
- return e instanceof HTMLElement ? e : null;
88
+ const s = this.querySelector('[slot="anchor"]');
89
+ return s instanceof HTMLElement ? s : null;
93
90
  }
94
91
  _resolveFloating() {
95
92
  const t = this.querySelector('[slot="content"]');
96
- return t instanceof HTMLElement ? t : Array.from(this.children).find((e) => e.getAttribute("slot") !== "anchor");
93
+ return t instanceof HTMLElement ? t : Array.from(this.children).find((s) => s.getAttribute("slot") !== "anchor");
97
94
  }
98
95
  _syncPositioner() {
99
96
  if (!this.isConnected) return;
@@ -101,41 +98,41 @@ class b extends h {
101
98
  this._destroyPositioner();
102
99
  return;
103
100
  }
104
- const t = this._resolveAnchor(), e = this._resolveFloating();
105
- if (!(t instanceof HTMLElement) || !(e instanceof HTMLElement)) {
101
+ const t = this._resolveAnchor(), s = this._resolveFloating();
102
+ if (!(t instanceof HTMLElement) || !(s instanceof HTMLElement)) {
106
103
  this._destroyPositioner();
107
104
  return;
108
105
  }
109
106
  this._destroyPositioner(), this._positioner = c({
110
107
  anchor: t,
111
- floating: e,
112
- placement: d(this.getAttribute("placement")),
113
- strategy: f(this.getAttribute("strategy")),
108
+ floating: s,
109
+ placement: f(this.getAttribute("placement")),
110
+ strategy: b(this.getAttribute("strategy")),
114
111
  dir: this.getAttribute("dir") === "rtl" ? "rtl" : "ltr",
115
112
  offset: r(this.getAttribute("offset"), 8),
116
113
  crossOffset: r(this.getAttribute("cross-offset"), 0),
117
- flip: !this.hasAttribute("flip") || o(this.getAttribute("flip")),
118
- shift: !this.hasAttribute("shift") || o(this.getAttribute("shift")),
119
- matchWidth: o(this.getAttribute("match-width")),
120
- fitViewport: o(this.getAttribute("fit-viewport")),
121
- autoPlacement: o(this.getAttribute("auto-placement")),
122
- hideWhenDetached: o(this.getAttribute("hide-when-detached")),
123
- inline: o(this.getAttribute("inline")),
114
+ flip: !this.hasAttribute("flip") || i(this.getAttribute("flip")),
115
+ shift: !this.hasAttribute("shift") || i(this.getAttribute("shift")),
116
+ matchWidth: i(this.getAttribute("match-width")),
117
+ fitViewport: i(this.getAttribute("fit-viewport")),
118
+ autoPlacement: i(this.getAttribute("auto-placement")),
119
+ hideWhenDetached: i(this.getAttribute("hide-when-detached")),
120
+ inline: i(this.getAttribute("inline")),
124
121
  boundaryPadding: r(this.getAttribute("boundary-padding"), 4),
125
122
  arrow: this.querySelector('[slot="arrow"], .arrow'),
126
- onUpdate: (i) => {
127
- this.dispatchEvent(new CustomEvent("position-change", { detail: i, bubbles: !0, composed: !0 }));
123
+ onUpdate: (o) => {
124
+ this.dispatchEvent(new CustomEvent("position-change", { detail: o, bubbles: !0, composed: !0 }));
128
125
  }
129
126
  });
130
127
  }
131
128
  render() {
132
- this.setContent(`<style>${u}</style><slot name="anchor"></slot><slot name="content"></slot><slot></slot>`);
129
+ this.setContent(`<style>${d}</style><slot name="anchor"></slot><slot name="content"></slot><slot></slot>`);
133
130
  }
134
131
  shouldRenderOnAttributeChange() {
135
132
  return !1;
136
133
  }
137
134
  }
138
- typeof customElements < "u" && !customElements.get("ui-positioner") && customElements.define("ui-positioner", b);
135
+ typeof customElements < "u" && !customElements.get("ui-positioner") && customElements.define("ui-positioner", m);
139
136
  export {
140
- b as UIPositioner
137
+ m as UIPositioner
141
138
  };
@@ -0,0 +1,221 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=`@layer editora-preload {
2
+ ui-alert:not(:defined),
3
+ ui-alert-dialog:not(:defined),
4
+ ui-app-header:not(:defined),
5
+ ui-aspect-ratio:not(:defined),
6
+ ui-box:not(:defined),
7
+ ui-breadcrumb:not(:defined),
8
+ ui-calendar:not(:defined),
9
+ ui-card:not(:defined),
10
+ ui-chart:not(:defined),
11
+ ui-collapsible:not(:defined),
12
+ ui-container:not(:defined),
13
+ ui-context-menu:not(:defined),
14
+ ui-control-group:not(:defined),
15
+ ui-data-table:not(:defined),
16
+ ui-date-field:not(:defined),
17
+ ui-description:not(:defined),
18
+ ui-dialog:not(:defined),
19
+ ui-drawer:not(:defined),
20
+ ui-empty-state:not(:defined),
21
+ ui-field:not(:defined),
22
+ ui-field-error:not(:defined),
23
+ ui-fieldset:not(:defined),
24
+ ui-file-upload:not(:defined),
25
+ ui-form:not(:defined),
26
+ ui-gantt:not(:defined),
27
+ ui-inline-edit:not(:defined),
28
+ ui-input:not(:defined),
29
+ ui-layout:not(:defined),
30
+ ui-masonry-grid:not(:defined),
31
+ ui-meter:not(:defined),
32
+ ui-multi-select:not(:defined),
33
+ ui-navigation-menu:not(:defined),
34
+ ui-number-field:not(:defined),
35
+ ui-otp-input:not(:defined),
36
+ ui-panel:not(:defined),
37
+ ui-panel-group:not(:defined),
38
+ ui-password-field:not(:defined),
39
+ ui-pin-input:not(:defined),
40
+ ui-plugin-panel:not(:defined),
41
+ ui-progress:not(:defined),
42
+ ui-quick-actions:not(:defined),
43
+ ui-radio-group:not(:defined),
44
+ ui-scroll-area:not(:defined),
45
+ ui-section:not(:defined),
46
+ ui-separator:not(:defined),
47
+ ui-sidebar:not(:defined),
48
+ ui-skeleton:not(:defined),
49
+ ui-sortable:not(:defined),
50
+ ui-splitter:not(:defined),
51
+ ui-stepper:not(:defined),
52
+ ui-table:not(:defined),
53
+ ui-tabs:not(:defined),
54
+ ui-tags-input:not(:defined),
55
+ ui-time-field:not(:defined),
56
+ ui-timeline:not(:defined),
57
+ ui-toast:not(:defined),
58
+ ui-toolbar:not(:defined),
59
+ ui-transfer-list:not(:defined),
60
+ ui-tree:not(:defined),
61
+ ui-tree-item:not(:defined) {
62
+ display: block;
63
+ }
64
+
65
+ ui-flex:not(:defined) {
66
+ display: flex;
67
+ }
68
+
69
+ ui-command:not(:defined),
70
+ ui-grid:not(:defined),
71
+ ui-placement-grid:not(:defined) {
72
+ display: grid;
73
+ }
74
+
75
+ ui-avatar:not(:defined),
76
+ ui-color-picker:not(:defined),
77
+ ui-combobox:not(:defined),
78
+ ui-menu:not(:defined),
79
+ ui-menubar:not(:defined) {
80
+ display: inline-block;
81
+ }
82
+
83
+ ui-anchor:not(:defined),
84
+ ui-badge:not(:defined),
85
+ ui-block-controls:not(:defined),
86
+ ui-button:not(:defined),
87
+ ui-checkbox:not(:defined),
88
+ ui-hover-card:not(:defined),
89
+ ui-label:not(:defined),
90
+ ui-odometer:not(:defined),
91
+ ui-pagination:not(:defined),
92
+ ui-radio:not(:defined),
93
+ ui-rating:not(:defined),
94
+ ui-slot:not(:defined),
95
+ ui-switch:not(:defined),
96
+ ui-toggle:not(:defined),
97
+ ui-toggle-group:not(:defined) {
98
+ display: inline-flex;
99
+ }
100
+
101
+ ui-date-picker:not(:defined),
102
+ ui-date-range-picker:not(:defined),
103
+ ui-date-range-time-picker:not(:defined),
104
+ ui-date-time-picker:not(:defined),
105
+ ui-dropdown:not(:defined),
106
+ ui-icon:not(:defined),
107
+ ui-select:not(:defined),
108
+ ui-slider:not(:defined),
109
+ ui-textarea:not(:defined),
110
+ ui-time-picker:not(:defined) {
111
+ display: inline-grid;
112
+ }
113
+
114
+ ui-direction-provider:not(:defined),
115
+ ui-dismissable-layer:not(:defined),
116
+ ui-focus-scope:not(:defined),
117
+ ui-portal:not(:defined),
118
+ ui-positioner:not(:defined),
119
+ ui-presence:not(:defined),
120
+ ui-visually-hidden:not(:defined) {
121
+ display: contents;
122
+ }
123
+
124
+ ui-command-palette:not(:defined),
125
+ ui-floating-toolbar:not(:defined),
126
+ ui-selection-popup:not(:defined) {
127
+ display: none;
128
+ }
129
+
130
+ /* Spacing the elements draw around slotted content (default size; approximate for others). */
131
+ ui-tabs:not(:defined) > [slot="panel"] {
132
+ display: block;
133
+ margin-block-start: 12px;
134
+ padding-block: 8px;
135
+ }
136
+
137
+ ui-card:not(:defined) {
138
+ display: grid;
139
+ gap: var(--ui-card-gap, 8px);
140
+ padding: var(--ui-card-padding, 16px) var(--ui-card-padding, 16px) 0;
141
+ border: 1px solid transparent;
142
+ }
143
+
144
+ /* Content the element renders itself, or only shows on demand. */
145
+ ui-dialog:not(:defined),
146
+ ui-alert-dialog:not(:defined),
147
+ ui-drawer:not(:defined),
148
+ ui-toast:not(:defined) {
149
+ display: none;
150
+ }
151
+
152
+ ui-dropdown:not(:defined) > [slot="content"],
153
+ ui-menu:not(:defined) > [slot="content"],
154
+ ui-menu:not(:defined) > [slot="item"],
155
+ ui-menubar:not(:defined) > [slot="content"],
156
+ ui-context-menu:not(:defined) > [slot="content"],
157
+ ui-popover:not(:defined) > [slot="content"],
158
+ ui-hover-card:not(:defined) > [slot="card"],
159
+ ui-navigation-menu:not(:defined) > [slot="panel"],
160
+ ui-split-button:not(:defined) > [slot="menuitem"],
161
+ ui-select:not(:defined) > :is(option, optgroup),
162
+ ui-multi-select:not(:defined) > :is(option, optgroup),
163
+ ui-combobox:not(:defined) > :is(option, optgroup),
164
+ ui-tabs:not(:defined) > [slot="panel"] ~ [slot="panel"] {
165
+ display: none;
166
+ }
167
+
168
+ /* Form controls draw their field in the shadow root, so they take no space until defined: reserve
169
+ the height they will have (measured: 32px control, about 26px more with a label and another
170
+ 24px with a description). */
171
+ :is(ui-input, ui-password-field, ui-number-field, ui-select, ui-multi-select, ui-combobox, ui-tags-input, ui-date-field, ui-time-field, ui-date-picker, ui-time-picker, ui-date-time-picker, ui-date-range-picker, ui-date-range-time-picker):not(:defined),
172
+ ui-button:not(:defined),
173
+ ui-pagination:not(:defined) {
174
+ min-block-size: var(--ui-control-height-2, 32px);
175
+ }
176
+
177
+ :is(ui-input, ui-password-field, ui-number-field, ui-select, ui-multi-select, ui-combobox, ui-tags-input, ui-date-field, ui-time-field, ui-date-picker, ui-time-picker, ui-date-time-picker, ui-date-range-picker, ui-date-range-time-picker)[label]:not(:defined) {
178
+ min-block-size: calc(var(--ui-control-height-2, 32px) + 26px);
179
+ }
180
+
181
+ :is(ui-input, ui-password-field, ui-number-field, ui-select, ui-multi-select, ui-combobox, ui-tags-input, ui-date-field, ui-time-field, ui-date-picker, ui-time-picker, ui-date-time-picker, ui-date-range-picker, ui-date-range-time-picker)[label][description]:not(:defined) {
182
+ min-block-size: calc(var(--ui-control-height-2, 32px) + 50px);
183
+ }
184
+
185
+ ui-textarea:not(:defined) {
186
+ min-block-size: 122px;
187
+ }
188
+
189
+ ui-textarea[label]:not(:defined) {
190
+ min-block-size: 148px;
191
+ }
192
+
193
+ /* The selected panel (a server-rendered selected attribute), not the first. Browsers without
194
+ :nth-child(… of S) drop these rules and keep showing the first panel. */
195
+ ui-tabs[selected="1"]:not(:defined) > [slot="panel"]:not(:nth-child(2 of [slot="panel"])) { display: none; }
196
+ ui-tabs[selected="1"]:not(:defined) > :nth-child(2 of [slot="panel"]) { display: block; }
197
+ ui-tabs[selected="2"]:not(:defined) > [slot="panel"]:not(:nth-child(3 of [slot="panel"])) { display: none; }
198
+ ui-tabs[selected="2"]:not(:defined) > :nth-child(3 of [slot="panel"]) { display: block; }
199
+ ui-tabs[selected="3"]:not(:defined) > [slot="panel"]:not(:nth-child(4 of [slot="panel"])) { display: none; }
200
+ ui-tabs[selected="3"]:not(:defined) > :nth-child(4 of [slot="panel"]) { display: block; }
201
+ ui-tabs[selected="4"]:not(:defined) > [slot="panel"]:not(:nth-child(5 of [slot="panel"])) { display: none; }
202
+ ui-tabs[selected="4"]:not(:defined) > :nth-child(5 of [slot="panel"]) { display: block; }
203
+ ui-tabs[selected="5"]:not(:defined) > [slot="panel"]:not(:nth-child(6 of [slot="panel"])) { display: none; }
204
+ ui-tabs[selected="5"]:not(:defined) > :nth-child(6 of [slot="panel"]) { display: block; }
205
+ ui-tabs[selected="6"]:not(:defined) > [slot="panel"]:not(:nth-child(7 of [slot="panel"])) { display: none; }
206
+ ui-tabs[selected="6"]:not(:defined) > :nth-child(7 of [slot="panel"]) { display: block; }
207
+ ui-tabs[selected="7"]:not(:defined) > [slot="panel"]:not(:nth-child(8 of [slot="panel"])) { display: none; }
208
+ ui-tabs[selected="7"]:not(:defined) > :nth-child(8 of [slot="panel"]) { display: block; }
209
+ ui-tabs[selected="8"]:not(:defined) > [slot="panel"]:not(:nth-child(9 of [slot="panel"])) { display: none; }
210
+ ui-tabs[selected="8"]:not(:defined) > :nth-child(9 of [slot="panel"]) { display: block; }
211
+ ui-tabs[selected="9"]:not(:defined) > [slot="panel"]:not(:nth-child(10 of [slot="panel"])) { display: none; }
212
+ ui-tabs[selected="9"]:not(:defined) > :nth-child(10 of [slot="panel"]) { display: block; }
213
+
214
+ /* Tab labels in a row of about the strip's height, instead of stacked blocks. */
215
+ ui-tabs:not(:defined) > [slot="tab"] {
216
+ display: inline-block;
217
+ padding: 8px 12px;
218
+ line-height: 20px;
219
+ }
220
+ }
221
+ `;exports.PRELOAD_CSS=e;