aeon-ui-engine 1.0.3 → 1.2.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/CHANGELOG.md +34 -0
  2. package/CONSUMER.md +82 -40
  3. package/README.md +47 -16
  4. package/package.json +9 -2
  5. package/packages/cli/README.md +17 -0
  6. package/packages/cli/dist/bin.d.ts +1 -0
  7. package/packages/cli/dist/bin.js +35 -0
  8. package/packages/cli/dist/chunk-IW5NT2Z2.js +103 -0
  9. package/packages/cli/dist/index.d.ts +10 -0
  10. package/packages/cli/dist/index.js +6 -0
  11. package/packages/cli/node_modules/.bin/esbuild +21 -0
  12. package/packages/cli/node_modules/.bin/jiti +21 -0
  13. package/packages/cli/node_modules/.bin/tsc +21 -0
  14. package/packages/cli/node_modules/.bin/tsserver +21 -0
  15. package/packages/cli/node_modules/.bin/tsup +21 -0
  16. package/packages/cli/node_modules/.bin/tsup-node +21 -0
  17. package/packages/cli/node_modules/.bin/tsx +21 -0
  18. package/packages/cli/node_modules/.bin/vite +21 -0
  19. package/packages/cli/node_modules/.bin/vitest +21 -0
  20. package/packages/cli/package.json +50 -0
  21. package/packages/cli/src/bin.ts +34 -0
  22. package/packages/cli/src/index.ts +1 -0
  23. package/packages/cli/src/init.ts +107 -0
  24. package/packages/cli/tsconfig.json +10 -0
  25. package/packages/core/README.md +7 -1
  26. package/packages/core/dist/index.d.ts +255 -7
  27. package/packages/core/dist/index.js +372 -2
  28. package/packages/core/node_modules/.bin/esbuild +4 -4
  29. package/packages/core/node_modules/.bin/vite +4 -4
  30. package/packages/core/node_modules/.bin/vitest +2 -2
  31. package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  32. package/packages/core/package.json +17 -5
  33. package/packages/core/src/anatomy.ts +234 -5
  34. package/packages/core/src/brand-theme.ts +172 -0
  35. package/packages/core/src/index.ts +1 -0
  36. package/packages/core/src/machine.test.ts +62 -1
  37. package/packages/core/src/machine.ts +93 -0
  38. package/packages/core/src/theme.ts +105 -0
  39. package/packages/panda/aeon.css +8 -0
  40. package/packages/panda/package.json +1 -1
  41. package/packages/panda/panda.config.ts +58 -1
  42. package/packages/panda/src/recipes/app-shell.ts +137 -0
  43. package/packages/panda/src/recipes/avatar.ts +131 -0
  44. package/packages/panda/src/recipes/bar.ts +206 -0
  45. package/packages/panda/src/recipes/button-group.ts +12 -4
  46. package/packages/panda/src/recipes/button.ts +1 -0
  47. package/packages/panda/src/recipes/combobox.ts +2 -1
  48. package/packages/panda/src/recipes/composer.ts +81 -0
  49. package/packages/panda/src/recipes/content.ts +104 -0
  50. package/packages/panda/src/recipes/conversation.ts +106 -0
  51. package/packages/panda/src/recipes/entry.ts +217 -0
  52. package/packages/panda/src/recipes/field.ts +12 -2
  53. package/packages/panda/src/recipes/floating.ts +26 -13
  54. package/packages/panda/src/recipes/identity.ts +73 -0
  55. package/packages/panda/src/recipes/index.ts +15 -0
  56. package/packages/panda/src/recipes/list-row.ts +109 -0
  57. package/packages/panda/src/recipes/metric-strip.ts +80 -0
  58. package/packages/panda/src/recipes/nav.ts +155 -0
  59. package/packages/panda/src/recipes/panel.ts +156 -0
  60. package/packages/panda/src/recipes/pin-input.ts +3 -2
  61. package/packages/panda/src/recipes/profile-header.ts +120 -0
  62. package/packages/panda/src/recipes/select.ts +2 -1
  63. package/packages/panda/src/recipes/slider.ts +6 -4
  64. package/packages/panda/src/recipes/theme-switcher.ts +110 -0
  65. package/packages/panda/src/recipes/thread.ts +88 -0
  66. package/packages/panda/src/theme/catalog-types.ts +2 -0
  67. package/packages/panda/src/theme/catalog.ts +23 -0
  68. package/packages/panda/src/theme/chrome.css +2 -1
  69. package/packages/panda/src/theme/consumer-shell.css +129 -0
  70. package/packages/panda/src/theme/electron.css +30 -0
  71. package/packages/panda/src/theme/global-theme-css.ts +9 -0
  72. package/packages/panda/src/theme/omarchy.themes.ts +607 -0
  73. package/packages/panda/src/theme/palette.ts +3 -0
  74. package/packages/panda/src/theme/scrollbars.css +58 -21
  75. package/packages/panda/src/theme/themes.config.ts +39 -1
  76. package/packages/panda/styled-system/css/conditions.mjs +1 -1
  77. package/packages/panda/styled-system/css/css.mjs +1 -1
  78. package/packages/panda/styled-system/css/sva.mjs +9 -4
  79. package/packages/panda/styled-system/helpers.mjs +11 -22
  80. package/packages/panda/styled-system/jsx/create-style-context.d.ts +54 -0
  81. package/packages/panda/styled-system/jsx/create-style-context.mjs +121 -0
  82. package/packages/panda/styled-system/jsx/factory.mjs +14 -5
  83. package/packages/panda/styled-system/jsx/index.d.ts +1 -0
  84. package/packages/panda/styled-system/jsx/index.mjs +1 -0
  85. package/packages/panda/styled-system/jsx/is-valid-prop.mjs +2 -2
  86. package/packages/panda/styled-system/patterns/aspect-ratio.d.ts +0 -1
  87. package/packages/panda/styled-system/patterns/bleed.d.ts +0 -1
  88. package/packages/panda/styled-system/patterns/box.d.ts +0 -1
  89. package/packages/panda/styled-system/patterns/center.d.ts +0 -1
  90. package/packages/panda/styled-system/patterns/circle.d.ts +0 -1
  91. package/packages/panda/styled-system/patterns/container.d.ts +0 -1
  92. package/packages/panda/styled-system/patterns/cq.d.ts +0 -1
  93. package/packages/panda/styled-system/patterns/divider.d.ts +0 -1
  94. package/packages/panda/styled-system/patterns/flex.d.ts +0 -1
  95. package/packages/panda/styled-system/patterns/float.d.ts +0 -1
  96. package/packages/panda/styled-system/patterns/grid-item.d.ts +0 -1
  97. package/packages/panda/styled-system/patterns/grid.d.ts +0 -1
  98. package/packages/panda/styled-system/patterns/grid.mjs +1 -1
  99. package/packages/panda/styled-system/patterns/hstack.d.ts +0 -1
  100. package/packages/panda/styled-system/patterns/hstack.mjs +1 -1
  101. package/packages/panda/styled-system/patterns/link-overlay.d.ts +0 -1
  102. package/packages/panda/styled-system/patterns/spacer.d.ts +0 -1
  103. package/packages/panda/styled-system/patterns/spacer.mjs +6 -2
  104. package/packages/panda/styled-system/patterns/square.d.ts +0 -1
  105. package/packages/panda/styled-system/patterns/stack.d.ts +0 -1
  106. package/packages/panda/styled-system/patterns/stack.mjs +1 -1
  107. package/packages/panda/styled-system/patterns/visually-hidden.d.ts +0 -1
  108. package/packages/panda/styled-system/patterns/vstack.d.ts +0 -1
  109. package/packages/panda/styled-system/patterns/vstack.mjs +1 -1
  110. package/packages/panda/styled-system/patterns/wrap.d.ts +0 -1
  111. package/packages/panda/styled-system/patterns/wrap.mjs +1 -1
  112. package/packages/panda/styled-system/recipes/aeon-accordion.d.ts +4 -3
  113. package/packages/panda/styled-system/recipes/aeon-accordion.mjs +1 -0
  114. package/packages/panda/styled-system/recipes/aeon-app-shell.d.ts +34 -0
  115. package/packages/panda/styled-system/recipes/aeon-app-shell.mjs +70 -0
  116. package/packages/panda/styled-system/recipes/aeon-async.d.ts +4 -3
  117. package/packages/panda/styled-system/recipes/aeon-async.mjs +1 -0
  118. package/packages/panda/styled-system/recipes/aeon-avatar.d.ts +36 -0
  119. package/packages/panda/styled-system/recipes/aeon-avatar.mjs +57 -0
  120. package/packages/panda/styled-system/recipes/aeon-badge.d.ts +3 -0
  121. package/packages/panda/styled-system/recipes/aeon-bar.d.ts +40 -0
  122. package/packages/panda/styled-system/recipes/aeon-bar.mjs +77 -0
  123. package/packages/panda/styled-system/recipes/aeon-button-group.d.ts +3 -2
  124. package/packages/panda/styled-system/recipes/aeon-button.d.ts +3 -2
  125. package/packages/panda/styled-system/recipes/aeon-checkbox.d.ts +4 -1
  126. package/packages/panda/styled-system/recipes/aeon-checkbox.mjs +1 -0
  127. package/packages/panda/styled-system/recipes/aeon-combobox.d.ts +4 -3
  128. package/packages/panda/styled-system/recipes/aeon-combobox.mjs +1 -0
  129. package/packages/panda/styled-system/recipes/aeon-composer.d.ts +31 -0
  130. package/packages/panda/styled-system/recipes/aeon-composer.mjs +45 -0
  131. package/packages/panda/styled-system/recipes/aeon-content.d.ts +34 -0
  132. package/packages/panda/styled-system/recipes/aeon-content.mjs +70 -0
  133. package/packages/panda/styled-system/recipes/aeon-conversation.d.ts +31 -0
  134. package/packages/panda/styled-system/recipes/aeon-conversation.mjs +61 -0
  135. package/packages/panda/styled-system/recipes/aeon-dialog.d.ts +4 -1
  136. package/packages/panda/styled-system/recipes/aeon-dialog.mjs +1 -0
  137. package/packages/panda/styled-system/recipes/aeon-entry.d.ts +38 -0
  138. package/packages/panda/styled-system/recipes/aeon-entry.mjs +100 -0
  139. package/packages/panda/styled-system/recipes/aeon-field.d.ts +4 -3
  140. package/packages/panda/styled-system/recipes/aeon-field.mjs +1 -0
  141. package/packages/panda/styled-system/recipes/aeon-identity.d.ts +36 -0
  142. package/packages/panda/styled-system/recipes/aeon-identity.mjs +63 -0
  143. package/packages/panda/styled-system/recipes/aeon-list-row.d.ts +33 -0
  144. package/packages/panda/styled-system/recipes/aeon-list-row.mjs +49 -0
  145. package/packages/panda/styled-system/recipes/aeon-menu.d.ts +4 -1
  146. package/packages/panda/styled-system/recipes/aeon-menu.mjs +1 -0
  147. package/packages/panda/styled-system/recipes/aeon-metric-strip.d.ts +36 -0
  148. package/packages/panda/styled-system/recipes/aeon-metric-strip.mjs +54 -0
  149. package/packages/panda/styled-system/recipes/aeon-nav.d.ts +38 -0
  150. package/packages/panda/styled-system/recipes/aeon-nav.mjs +69 -0
  151. package/packages/panda/styled-system/recipes/aeon-panel.d.ts +34 -0
  152. package/packages/panda/styled-system/recipes/aeon-panel.mjs +58 -0
  153. package/packages/panda/styled-system/recipes/aeon-pin-input.d.ts +4 -1
  154. package/packages/panda/styled-system/recipes/aeon-pin-input.mjs +1 -0
  155. package/packages/panda/styled-system/recipes/aeon-popover.d.ts +4 -1
  156. package/packages/panda/styled-system/recipes/aeon-popover.mjs +1 -0
  157. package/packages/panda/styled-system/recipes/aeon-profile-header.d.ts +36 -0
  158. package/packages/panda/styled-system/recipes/aeon-profile-header.mjs +62 -0
  159. package/packages/panda/styled-system/recipes/aeon-progress.d.ts +4 -1
  160. package/packages/panda/styled-system/recipes/aeon-progress.mjs +1 -0
  161. package/packages/panda/styled-system/recipes/aeon-radio-group.d.ts +4 -1
  162. package/packages/panda/styled-system/recipes/aeon-radio-group.mjs +1 -0
  163. package/packages/panda/styled-system/recipes/aeon-scroll.d.ts +4 -3
  164. package/packages/panda/styled-system/recipes/aeon-scroll.mjs +1 -0
  165. package/packages/panda/styled-system/recipes/aeon-select.d.ts +4 -3
  166. package/packages/panda/styled-system/recipes/aeon-select.mjs +1 -0
  167. package/packages/panda/styled-system/recipes/aeon-separator.d.ts +4 -1
  168. package/packages/panda/styled-system/recipes/aeon-separator.mjs +1 -0
  169. package/packages/panda/styled-system/recipes/aeon-slider.d.ts +4 -1
  170. package/packages/panda/styled-system/recipes/aeon-slider.mjs +1 -0
  171. package/packages/panda/styled-system/recipes/aeon-switch.d.ts +4 -1
  172. package/packages/panda/styled-system/recipes/aeon-switch.mjs +1 -0
  173. package/packages/panda/styled-system/recipes/aeon-tabs.d.ts +4 -1
  174. package/packages/panda/styled-system/recipes/aeon-tabs.mjs +1 -0
  175. package/packages/panda/styled-system/recipes/aeon-theme-switcher.d.ts +34 -0
  176. package/packages/panda/styled-system/recipes/aeon-theme-switcher.mjs +59 -0
  177. package/packages/panda/styled-system/recipes/aeon-thread.d.ts +31 -0
  178. package/packages/panda/styled-system/recipes/aeon-thread.mjs +53 -0
  179. package/packages/panda/styled-system/recipes/aeon-toast.d.ts +4 -1
  180. package/packages/panda/styled-system/recipes/aeon-toast.mjs +1 -0
  181. package/packages/panda/styled-system/recipes/aeon-tooltip.d.ts +4 -1
  182. package/packages/panda/styled-system/recipes/aeon-tooltip.mjs +1 -0
  183. package/packages/panda/styled-system/recipes/index.d.ts +16 -1
  184. package/packages/panda/styled-system/recipes/index.mjs +16 -1
  185. package/packages/panda/styled-system/styles.css +2317 -450
  186. package/packages/panda/styled-system/tokens/index.mjs +43 -7
  187. package/packages/panda/styled-system/tokens/tokens.d.ts +5 -5
  188. package/packages/panda/styled-system/types/composition.d.ts +86 -23
  189. package/packages/panda/styled-system/types/conditions.d.ts +34 -10
  190. package/packages/panda/styled-system/types/csstype.d.ts +6405 -5133
  191. package/packages/panda/styled-system/types/jsx.d.ts +27 -10
  192. package/packages/panda/styled-system/types/pattern.d.ts +4 -4
  193. package/packages/panda/styled-system/types/prop-type.d.ts +11 -1
  194. package/packages/panda/styled-system/types/style-props.d.ts +2763 -2165
  195. package/packages/panda/styled-system/types/system-types.d.ts +38 -80
  196. package/packages/panda/theme-runtime.css +945 -0
  197. package/packages/primitives/dist/chunk-4NOKRUSG.js +81 -0
  198. package/packages/primitives/dist/chunk-R25CUHNF.js +46 -0
  199. package/packages/primitives/dist/chunk-RO2DMFN5.js +89 -0
  200. package/packages/primitives/dist/chunk-V5D7LS4J.js +61 -0
  201. package/packages/primitives/dist/chunk-YBPNI2LI.js +70 -0
  202. package/packages/primitives/dist/index.d.ts +5 -0
  203. package/packages/primitives/dist/index.js +46 -14
  204. package/packages/primitives/dist/machines/app-nav.d.ts +96 -0
  205. package/packages/primitives/dist/machines/app-nav.js +12 -0
  206. package/packages/primitives/dist/machines/app-shell.d.ts +57 -0
  207. package/packages/primitives/dist/machines/app-shell.js +8 -0
  208. package/packages/primitives/dist/machines/async.d.ts +4 -4
  209. package/packages/primitives/dist/machines/content-region.d.ts +72 -0
  210. package/packages/primitives/dist/machines/content-region.js +8 -0
  211. package/packages/primitives/dist/machines/panel.d.ts +50 -0
  212. package/packages/primitives/dist/machines/panel.js +6 -0
  213. package/packages/primitives/dist/machines/sticky-bar.d.ts +62 -0
  214. package/packages/primitives/dist/machines/sticky-bar.js +8 -0
  215. package/packages/primitives/node_modules/.bin/esbuild +21 -0
  216. package/packages/primitives/node_modules/.bin/vite +21 -0
  217. package/packages/primitives/node_modules/.bin/vitest +2 -2
  218. package/packages/primitives/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  219. package/packages/primitives/package.json +15 -5
  220. package/packages/primitives/scripts/xstate-introspect.mjs +35 -0
  221. package/packages/primitives/src/__tests__/app-nav.test.ts +30 -0
  222. package/packages/primitives/src/index.ts +5 -0
  223. package/packages/primitives/src/machines/app-nav.ts +107 -0
  224. package/packages/primitives/src/machines/app-shell.ts +63 -0
  225. package/packages/primitives/src/machines/content-region.ts +107 -0
  226. package/packages/primitives/src/machines/panel.ts +71 -0
  227. package/packages/primitives/src/machines/sticky-bar.ts +89 -0
  228. package/packages/react/dist/index.d.ts +536 -17
  229. package/packages/react/dist/index.js +2163 -479
  230. package/packages/react/node_modules/.bin/esbuild +21 -0
  231. package/packages/react/node_modules/.bin/vite +21 -0
  232. package/packages/react/node_modules/.bin/vitest +2 -2
  233. package/packages/react/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  234. package/packages/react/package.json +18 -7
  235. package/packages/react/src/app-nav/index.tsx +249 -0
  236. package/packages/react/src/app-shell/index.tsx +154 -0
  237. package/packages/react/src/async/index.tsx +6 -1
  238. package/packages/react/src/async/map-content-state.ts +18 -0
  239. package/packages/react/src/avatar/index.tsx +23 -1
  240. package/packages/react/src/bar/index.tsx +101 -0
  241. package/packages/react/src/button/index.tsx +4 -2
  242. package/packages/react/src/composer/index.tsx +75 -0
  243. package/packages/react/src/content/index.tsx +149 -0
  244. package/packages/react/src/conversation/index.tsx +78 -0
  245. package/packages/react/src/entry/index.tsx +85 -0
  246. package/packages/react/src/field/index.tsx +31 -18
  247. package/packages/react/src/hooks/use-fit-text.ts +59 -0
  248. package/packages/react/src/identity/index.tsx +110 -0
  249. package/packages/react/src/index.ts +19 -0
  250. package/packages/react/src/list-row/index.tsx +80 -0
  251. package/packages/react/src/metric-strip/index.tsx +88 -0
  252. package/packages/react/src/nav/index.tsx +155 -0
  253. package/packages/react/src/panel/index.tsx +267 -0
  254. package/packages/react/src/profile-header/index.tsx +91 -0
  255. package/packages/react/src/prompt/index.tsx +161 -0
  256. package/packages/react/src/radio-group/index.tsx +19 -7
  257. package/packages/react/src/slider/index.tsx +3 -1
  258. package/packages/react/src/status-banner/index.tsx +84 -0
  259. package/packages/react/src/sticky-bar/index.tsx +135 -0
  260. package/packages/react/src/switch/index.tsx +7 -1
  261. package/packages/react/src/theme-switcher/index.tsx +227 -0
  262. package/packages/react/src/thread/index.tsx +95 -0
  263. package/packages/react/src/toast/primitives.tsx +2 -2
  264. package/packages/react/src/tooltip/tooltip.test.tsx +9 -1
  265. package/packages/react/tsconfig.json +2 -1
  266. package/packages/schemas/README.md +52 -0
  267. package/packages/schemas/dist/index.d.ts +287 -0
  268. package/packages/schemas/dist/index.js +701 -0
  269. package/packages/schemas/json/accordion.json +132 -0
  270. package/packages/schemas/json/async.json +161 -0
  271. package/packages/schemas/json/button.json +170 -0
  272. package/packages/schemas/json/catalog.json +2299 -0
  273. package/packages/schemas/json/checkbox.json +136 -0
  274. package/packages/schemas/json/combobox.json +130 -0
  275. package/packages/schemas/json/dialog.json +154 -0
  276. package/packages/schemas/json/field.json +171 -0
  277. package/packages/schemas/json/menu.json +138 -0
  278. package/packages/schemas/json/popover.json +133 -0
  279. package/packages/schemas/json/progress.json +137 -0
  280. package/packages/schemas/json/scroll.json +129 -0
  281. package/packages/schemas/json/select.json +140 -0
  282. package/packages/schemas/json/switch.json +136 -0
  283. package/packages/schemas/json/tabs.json +135 -0
  284. package/packages/schemas/json/toast.json +141 -0
  285. package/packages/schemas/json/tooltip.json +123 -0
  286. package/packages/schemas/node_modules/.bin/esbuild +21 -0
  287. package/packages/schemas/node_modules/.bin/jiti +21 -0
  288. package/packages/schemas/node_modules/.bin/tsc +21 -0
  289. package/packages/schemas/node_modules/.bin/tsserver +21 -0
  290. package/packages/schemas/node_modules/.bin/tsup +21 -0
  291. package/packages/schemas/node_modules/.bin/tsup-node +21 -0
  292. package/packages/schemas/node_modules/.bin/tsx +21 -0
  293. package/packages/schemas/node_modules/.bin/vite +21 -0
  294. package/packages/schemas/node_modules/.bin/vitest +21 -0
  295. package/packages/schemas/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  296. package/packages/schemas/package.json +56 -0
  297. package/packages/schemas/prompts/cursorrules.md +64 -0
  298. package/packages/schemas/prompts/statecharts.md +31 -0
  299. package/packages/schemas/prompts/system.md +30 -0
  300. package/packages/schemas/registry/catalog.json +54 -0
  301. package/packages/schemas/registry/components/accordion.json +132 -0
  302. package/packages/schemas/registry/components/async.json +161 -0
  303. package/packages/schemas/registry/components/button.json +170 -0
  304. package/packages/schemas/registry/components/checkbox.json +136 -0
  305. package/packages/schemas/registry/components/combobox.json +130 -0
  306. package/packages/schemas/registry/components/dialog.json +154 -0
  307. package/packages/schemas/registry/components/field.json +171 -0
  308. package/packages/schemas/registry/components/menu.json +138 -0
  309. package/packages/schemas/registry/components/popover.json +133 -0
  310. package/packages/schemas/registry/components/progress.json +137 -0
  311. package/packages/schemas/registry/components/scroll.json +129 -0
  312. package/packages/schemas/registry/components/select.json +140 -0
  313. package/packages/schemas/registry/components/switch.json +136 -0
  314. package/packages/schemas/registry/components/tabs.json +135 -0
  315. package/packages/schemas/registry/components/toast.json +141 -0
  316. package/packages/schemas/registry/components/tooltip.json +123 -0
  317. package/packages/schemas/registry/machines/async.json +219 -0
  318. package/packages/schemas/registry/machines/buttonLifecycle.json +224 -0
  319. package/packages/schemas/registry/machines/dialog.json +143 -0
  320. package/packages/schemas/registry/machines/field.json +275 -0
  321. package/packages/schemas/scripts/emit.ts +61 -0
  322. package/packages/schemas/src/aeon-to-schema.test.ts +70 -0
  323. package/packages/schemas/src/aeon-to-schema.ts +206 -0
  324. package/packages/schemas/src/agent-bridge.ts +82 -0
  325. package/packages/schemas/src/components.ts +307 -0
  326. package/packages/schemas/src/index.test.ts +25 -0
  327. package/packages/schemas/src/index.ts +25 -0
  328. package/packages/schemas/src/prompts.ts +121 -0
  329. package/packages/schemas/src/registry.ts +73 -0
  330. package/packages/schemas/src/schema-builder.ts +87 -0
  331. package/packages/schemas/tsconfig.json +9 -0
  332. package/packages/solid/package.json +2 -2
  333. package/packages/svelte/node_modules/.bin/esbuild +21 -0
  334. package/packages/svelte/node_modules/.bin/vite +4 -4
  335. package/packages/svelte/package.json +15 -5
  336. package/packages/ui/README.md +19 -6
  337. package/packages/ui/dist/index.d.ts +254 -9
  338. package/packages/ui/dist/index.js +690 -139
  339. package/packages/ui/src/app-nav.tsx +2 -0
  340. package/packages/ui/src/app-shell.tsx +44 -0
  341. package/packages/ui/src/async.tsx +2 -1
  342. package/packages/ui/src/avatar.tsx +35 -0
  343. package/packages/ui/src/bar.tsx +34 -0
  344. package/packages/ui/src/composer.tsx +27 -0
  345. package/packages/ui/src/content.tsx +43 -0
  346. package/packages/ui/src/conversation.tsx +43 -0
  347. package/packages/ui/src/entry.tsx +76 -0
  348. package/packages/ui/src/field.tsx +5 -0
  349. package/packages/ui/src/identity.tsx +35 -0
  350. package/packages/ui/src/index.ts +20 -0
  351. package/packages/ui/src/list-row.tsx +30 -0
  352. package/packages/ui/src/metric-strip.tsx +29 -0
  353. package/packages/ui/src/nav.tsx +46 -0
  354. package/packages/ui/src/panel.tsx +39 -0
  355. package/packages/ui/src/profile-header.tsx +35 -0
  356. package/packages/ui/src/prompt.tsx +29 -0
  357. package/packages/ui/src/status-banner.tsx +1 -0
  358. package/packages/ui/src/sticky-bar.tsx +42 -0
  359. package/packages/ui/src/switch.tsx +17 -4
  360. package/packages/ui/src/theme-switcher.tsx +41 -0
  361. package/packages/ui/src/thread.tsx +35 -0
  362. package/packages/vue/package.json +3 -3
  363. package/scripts/vite-aliases.mjs +65 -3
  364. package/scripts/xstate-introspect.mjs +68 -0
  365. package/packages/react/src/async/legacy-region.tsx +0 -38
@@ -29,12 +29,13 @@ import { jsx } from "react/jsx-runtime";
29
29
  var Root = forwardRef(function ButtonRoot({ variant = "solid", size = "md", disabled, status = "idle", children, className, ...rest }, ref) {
30
30
  const resolvedStatus = disabled ? "disabled" : status;
31
31
  const isBusy = resolvedStatus === "pending";
32
+ const isLocked = resolvedStatus === "success";
32
33
  return /* @__PURE__ */ jsx(
33
34
  "button",
34
35
  {
35
36
  ref,
36
37
  type: "button",
37
- disabled: disabled || isBusy || resolvedStatus === "disabled",
38
+ disabled: disabled || isBusy || isLocked || resolvedStatus === "disabled",
38
39
  "aria-busy": isBusy || void 0,
39
40
  className,
40
41
  "data-aeon-variant": variant,
@@ -42,7 +43,7 @@ var Root = forwardRef(function ButtonRoot({ variant = "solid", size = "md", disa
42
43
  ...mergeProps(
43
44
  partAttrs(buttonAnatomy.scope, buttonAnatomy.root, {
44
45
  state: resolvedStatus,
45
- disabled: Boolean(disabled || resolvedStatus === "disabled")
46
+ disabled: Boolean(disabled || resolvedStatus === "disabled" || isLocked)
46
47
  }),
47
48
  rest
48
49
  ),
@@ -79,7 +80,7 @@ function useAeonMachine(machine, options) {
79
80
  }
80
81
 
81
82
  // src/switch/index.tsx
82
- import { jsx as jsx2 } from "react/jsx-runtime";
83
+ import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
83
84
  var SwitchCtx = createContext(null);
84
85
  function useSwitchCtx() {
85
86
  const ctx = useContext(SwitchCtx);
@@ -135,7 +136,7 @@ var Root2 = forwardRef2(function SwitchRoot({ checked, defaultChecked = false, d
135
136
  },
136
137
  rest
137
138
  ),
138
- children
139
+ children: children ?? /* @__PURE__ */ jsx2(Fragment, { children: /* @__PURE__ */ jsx2(Control, { children: /* @__PURE__ */ jsx2(Thumb, {}) }) })
139
140
  }
140
141
  ) });
141
142
  });
@@ -649,24 +650,197 @@ var Dialog = {
649
650
  CloseTrigger
650
651
  };
651
652
 
652
- // src/tabs/index.tsx
653
- import { partAttrs as partAttrs5, tabsAnatomy } from "@aeon-ui/core";
654
- import { tabsMachine } from "@aeon-ui/primitives";
653
+ // src/prompt/index.tsx
654
+ import { partAttrs as partAttrs5, promptAnatomy, scopeAttrs } from "@aeon-ui/core";
655
655
  import {
656
656
  createContext as createContext4,
657
657
  forwardRef as forwardRef5,
658
658
  useContext as useContext4,
659
- useEffect as useEffect7,
660
659
  useMemo as useMemo4
661
660
  } from "react";
662
661
  import { jsx as jsx5 } from "react/jsx-runtime";
663
- var TabsCtx = createContext4(null);
662
+ var PromptCtx = createContext4(null);
663
+ function usePromptCtx() {
664
+ const ctx = useContext4(PromptCtx);
665
+ if (!ctx) throw new Error("Prompt parts must be used within Prompt.Root");
666
+ return ctx;
667
+ }
668
+ var Root5 = forwardRef5(function PromptRoot({ status = "pending", children, className, ...dialogProps }, ref) {
669
+ const value = useMemo4(() => ({ status }), [status]);
670
+ return /* @__PURE__ */ jsx5(PromptCtx.Provider, { value, children: /* @__PURE__ */ jsx5(Dialog.Root, { ...dialogProps, children: /* @__PURE__ */ jsx5(
671
+ "div",
672
+ {
673
+ ref,
674
+ className,
675
+ ...scopeAttrs(promptAnatomy.scope, promptAnatomy.root, { state: status }),
676
+ children
677
+ }
678
+ ) }) });
679
+ });
680
+ var Eyebrow = forwardRef5(
681
+ function PromptEyebrow(props, ref) {
682
+ const { status } = usePromptCtx();
683
+ return /* @__PURE__ */ jsx5(
684
+ "p",
685
+ {
686
+ ref,
687
+ ...mergeProps(partAttrs5(promptAnatomy.scope, promptAnatomy.eyebrow, { state: status }), props)
688
+ }
689
+ );
690
+ }
691
+ );
692
+ var Meta = forwardRef5(function PromptMeta(props, ref) {
693
+ const { status } = usePromptCtx();
694
+ return /* @__PURE__ */ jsx5(
695
+ "dl",
696
+ {
697
+ ref,
698
+ ...mergeProps(partAttrs5(promptAnatomy.scope, promptAnatomy.meta, { state: status }), props)
699
+ }
700
+ );
701
+ });
702
+ var Amount = forwardRef5(function PromptAmount(props, ref) {
703
+ const { status } = usePromptCtx();
704
+ return /* @__PURE__ */ jsx5(
705
+ "div",
706
+ {
707
+ ref,
708
+ ...mergeProps(partAttrs5(promptAnatomy.scope, promptAnatomy.amount, { state: status }), props)
709
+ }
710
+ );
711
+ });
712
+ var Actions = forwardRef5(function PromptActions(props, ref) {
713
+ const { status } = usePromptCtx();
714
+ return /* @__PURE__ */ jsx5(
715
+ "div",
716
+ {
717
+ ref,
718
+ ...mergeProps(partAttrs5(promptAnatomy.scope, promptAnatomy.actions, { state: status }), props)
719
+ }
720
+ );
721
+ });
722
+ var Primary = forwardRef5(
723
+ function PromptPrimary(props, ref) {
724
+ const { status } = usePromptCtx();
725
+ return /* @__PURE__ */ jsx5(
726
+ "button",
727
+ {
728
+ ref,
729
+ type: "button",
730
+ ...mergeProps(
731
+ partAttrs5(promptAnatomy.scope, promptAnatomy.primary, { state: status }),
732
+ props
733
+ )
734
+ }
735
+ );
736
+ }
737
+ );
738
+ var Secondary = forwardRef5(
739
+ function PromptSecondary(props, ref) {
740
+ const { status } = usePromptCtx();
741
+ return /* @__PURE__ */ jsx5(
742
+ "button",
743
+ {
744
+ ref,
745
+ type: "button",
746
+ ...mergeProps(
747
+ partAttrs5(promptAnatomy.scope, promptAnatomy.secondary, { state: status }),
748
+ props
749
+ )
750
+ }
751
+ );
752
+ }
753
+ );
754
+ var Prompt = {
755
+ Root: Root5,
756
+ Trigger: Dialog.Trigger,
757
+ Portal: Dialog.Portal,
758
+ Backdrop: Dialog.Backdrop,
759
+ Positioner: Dialog.Positioner,
760
+ Content: Dialog.Content,
761
+ Title: Dialog.Title,
762
+ Description: Dialog.Description,
763
+ CloseTrigger: Dialog.CloseTrigger,
764
+ Eyebrow,
765
+ Meta,
766
+ Amount,
767
+ Actions,
768
+ Primary,
769
+ Secondary
770
+ };
771
+
772
+ // src/status-banner/index.tsx
773
+ import { partAttrs as partAttrs6, scopeAttrs as scopeAttrs2, statusBannerAnatomy } from "@aeon-ui/core";
774
+ import { forwardRef as forwardRef6 } from "react";
775
+ import { jsx as jsx6 } from "react/jsx-runtime";
776
+ var Root6 = forwardRef6(function StatusBannerRoot({ tone = "info", status, children, ...rest }, ref) {
777
+ const state = [tone, status].filter(Boolean).join(" ");
778
+ return /* @__PURE__ */ jsx6(
779
+ "div",
780
+ {
781
+ ref,
782
+ role: "status",
783
+ ...mergeProps(scopeAttrs2(statusBannerAnatomy.scope, statusBannerAnatomy.root, { state }), rest),
784
+ children
785
+ }
786
+ );
787
+ });
788
+ var Copy = forwardRef6(function StatusBannerCopy(props, ref) {
789
+ return /* @__PURE__ */ jsx6("div", { ref, ...mergeProps(partAttrs6(statusBannerAnatomy.scope, statusBannerAnatomy.copy), props) });
790
+ });
791
+ var Title2 = forwardRef6(function StatusBannerTitle(props, ref) {
792
+ return /* @__PURE__ */ jsx6(
793
+ "strong",
794
+ {
795
+ ref,
796
+ ...mergeProps(partAttrs6(statusBannerAnatomy.scope, statusBannerAnatomy.title), props)
797
+ }
798
+ );
799
+ });
800
+ var Body = forwardRef6(function StatusBannerBody(props, ref) {
801
+ return /* @__PURE__ */ jsx6("span", { ref, ...mergeProps(partAttrs6(statusBannerAnatomy.scope, statusBannerAnatomy.body), props) });
802
+ });
803
+ var Actions2 = forwardRef6(function StatusBannerActions(props, ref) {
804
+ return /* @__PURE__ */ jsx6(
805
+ "div",
806
+ {
807
+ ref,
808
+ ...mergeProps(partAttrs6(statusBannerAnatomy.scope, statusBannerAnatomy.actions), props)
809
+ }
810
+ );
811
+ });
812
+ var Action = forwardRef6(
813
+ function StatusBannerAction(props, ref) {
814
+ return /* @__PURE__ */ jsx6("button", { ref, type: "button", ...props });
815
+ }
816
+ );
817
+ var StatusBanner = {
818
+ Root: Root6,
819
+ Copy,
820
+ Title: Title2,
821
+ Body,
822
+ Actions: Actions2,
823
+ Action
824
+ };
825
+
826
+ // src/tabs/index.tsx
827
+ import { partAttrs as partAttrs7, tabsAnatomy } from "@aeon-ui/core";
828
+ import { tabsMachine } from "@aeon-ui/primitives";
829
+ import {
830
+ createContext as createContext5,
831
+ forwardRef as forwardRef7,
832
+ useContext as useContext5,
833
+ useEffect as useEffect7,
834
+ useMemo as useMemo5
835
+ } from "react";
836
+ import { jsx as jsx7 } from "react/jsx-runtime";
837
+ var TabsCtx = createContext5(null);
664
838
  function useTabsCtx() {
665
- const ctx = useContext4(TabsCtx);
839
+ const ctx = useContext5(TabsCtx);
666
840
  if (!ctx) throw new Error("Tabs parts must be used within Tabs.Root");
667
841
  return ctx;
668
842
  }
669
- var Root5 = forwardRef5(function TabsRoot({ value, defaultValue = "", onValueChange, children, className, ...rest }, ref) {
843
+ var Root7 = forwardRef7(function TabsRoot({ value, defaultValue = "", onValueChange, children, className, ...rest }, ref) {
670
844
  const [snapshot, send] = useAeonMachine(tabsMachine, {
671
845
  input: { value: defaultValue, disabled: false }
672
846
  });
@@ -677,24 +851,24 @@ var Root5 = forwardRef5(function TabsRoot({ value, defaultValue = "", onValueCha
677
851
  useEffect7(() => {
678
852
  if (value !== void 0) send({ type: "SET_VALUE", value });
679
853
  }, [value, send]);
680
- const ctx = useMemo4(() => ({ value: resolvedValue, send }), [resolvedValue, send]);
681
- return /* @__PURE__ */ jsx5(TabsCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx5(
854
+ const ctx = useMemo5(() => ({ value: resolvedValue, send }), [resolvedValue, send]);
855
+ return /* @__PURE__ */ jsx7(TabsCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx7(
682
856
  "div",
683
857
  {
684
858
  ref,
685
859
  className,
686
- ...mergeProps(partAttrs5(tabsAnatomy.scope, tabsAnatomy.root), rest),
860
+ ...mergeProps(partAttrs7(tabsAnatomy.scope, tabsAnatomy.root), rest),
687
861
  children
688
862
  }
689
863
  ) });
690
864
  });
691
- var List = forwardRef5(function TabsList(props, ref) {
692
- return /* @__PURE__ */ jsx5("div", { ref, role: "tablist", ...mergeProps(partAttrs5(tabsAnatomy.scope, tabsAnatomy.list), props) });
865
+ var List = forwardRef7(function TabsList(props, ref) {
866
+ return /* @__PURE__ */ jsx7("div", { ref, role: "tablist", ...mergeProps(partAttrs7(tabsAnatomy.scope, tabsAnatomy.list), props) });
693
867
  });
694
- var Trigger2 = forwardRef5(function TabsTrigger({ value: triggerValue, onClick, ...rest }, ref) {
868
+ var Trigger2 = forwardRef7(function TabsTrigger({ value: triggerValue, onClick, ...rest }, ref) {
695
869
  const { value, send } = useTabsCtx();
696
870
  const selected = value === triggerValue;
697
- return /* @__PURE__ */ jsx5(
871
+ return /* @__PURE__ */ jsx7(
698
872
  "button",
699
873
  {
700
874
  ref,
@@ -703,7 +877,7 @@ var Trigger2 = forwardRef5(function TabsTrigger({ value: triggerValue, onClick,
703
877
  "aria-selected": selected,
704
878
  "data-selected": selected ? "" : void 0,
705
879
  ...mergeProps(
706
- partAttrs5(tabsAnatomy.scope, tabsAnatomy.trigger, {
880
+ partAttrs7(tabsAnatomy.scope, tabsAnatomy.trigger, {
707
881
  state: selected ? "selected" : "unselected",
708
882
  highlighted: selected
709
883
  }),
@@ -718,55 +892,55 @@ var Trigger2 = forwardRef5(function TabsTrigger({ value: triggerValue, onClick,
718
892
  }
719
893
  );
720
894
  });
721
- var Content2 = forwardRef5(function TabsContent({ value: contentValue, ...rest }, ref) {
895
+ var Content2 = forwardRef7(function TabsContent({ value: contentValue, ...rest }, ref) {
722
896
  const { value } = useTabsCtx();
723
897
  if (value !== contentValue) return null;
724
- return /* @__PURE__ */ jsx5(
898
+ return /* @__PURE__ */ jsx7(
725
899
  "div",
726
900
  {
727
901
  ref,
728
902
  role: "tabpanel",
729
903
  ...mergeProps(
730
- partAttrs5(tabsAnatomy.scope, tabsAnatomy.content, { state: "active" }),
904
+ partAttrs7(tabsAnatomy.scope, tabsAnatomy.content, { state: "active" }),
731
905
  rest
732
906
  )
733
907
  }
734
908
  );
735
909
  });
736
- var Indicator2 = forwardRef5(function TabsIndicator(props, ref) {
737
- return /* @__PURE__ */ jsx5("div", { ref, ...mergeProps(partAttrs5(tabsAnatomy.scope, tabsAnatomy.indicator), props) });
910
+ var Indicator2 = forwardRef7(function TabsIndicator(props, ref) {
911
+ return /* @__PURE__ */ jsx7("div", { ref, ...mergeProps(partAttrs7(tabsAnatomy.scope, tabsAnatomy.indicator), props) });
738
912
  });
739
- var Tabs = { Root: Root5, List, Trigger: Trigger2, Content: Content2, Indicator: Indicator2 };
913
+ var Tabs = { Root: Root7, List, Trigger: Trigger2, Content: Content2, Indicator: Indicator2 };
740
914
 
741
915
  // src/separator/index.tsx
742
- import { partAttrs as partAttrs6, separatorAnatomy } from "@aeon-ui/core";
743
- import { forwardRef as forwardRef6 } from "react";
744
- import { jsx as jsx6 } from "react/jsx-runtime";
745
- var Root6 = forwardRef6(function SeparatorRoot({ orientation = "horizontal", ...rest }, ref) {
746
- return /* @__PURE__ */ jsx6(
916
+ import { partAttrs as partAttrs8, separatorAnatomy } from "@aeon-ui/core";
917
+ import { forwardRef as forwardRef8 } from "react";
918
+ import { jsx as jsx8 } from "react/jsx-runtime";
919
+ var Root8 = forwardRef8(function SeparatorRoot({ orientation = "horizontal", ...rest }, ref) {
920
+ return /* @__PURE__ */ jsx8(
747
921
  "div",
748
922
  {
749
923
  ref,
750
924
  role: "separator",
751
925
  "aria-orientation": orientation,
752
- ...mergeProps(partAttrs6(separatorAnatomy.scope, separatorAnatomy.root), rest)
926
+ ...mergeProps(partAttrs8(separatorAnatomy.scope, separatorAnatomy.root), rest)
753
927
  }
754
928
  );
755
929
  });
756
- var Separator = { Root: Root6 };
930
+ var Separator = { Root: Root8 };
757
931
 
758
932
  // src/progress/index.tsx
759
- import { partAttrs as partAttrs7, partOnlyAttrs, progressAnatomy } from "@aeon-ui/core";
933
+ import { partAttrs as partAttrs9, partOnlyAttrs, progressAnatomy } from "@aeon-ui/core";
760
934
  import {
761
- createContext as createContext5,
762
- forwardRef as forwardRef7,
763
- useContext as useContext5,
764
- useMemo as useMemo5
935
+ createContext as createContext6,
936
+ forwardRef as forwardRef9,
937
+ useContext as useContext6,
938
+ useMemo as useMemo6
765
939
  } from "react";
766
- import { jsx as jsx7 } from "react/jsx-runtime";
767
- var ProgressCtx = createContext5(null);
940
+ import { jsx as jsx9 } from "react/jsx-runtime";
941
+ var ProgressCtx = createContext6(null);
768
942
  function useProgressCtx() {
769
- const ctx = useContext5(ProgressCtx);
943
+ const ctx = useContext6(ProgressCtx);
770
944
  if (!ctx) throw new Error("Progress parts must be used within Progress.Root");
771
945
  return ctx;
772
946
  }
@@ -775,14 +949,14 @@ function resolveProgressState(value, max, indeterminate) {
775
949
  if (value >= max) return "complete";
776
950
  return "idle";
777
951
  }
778
- var Root7 = forwardRef7(function ProgressRoot({ value = 0, max = 100, indeterminate = false, children, className, ...rest }, ref) {
952
+ var Root9 = forwardRef9(function ProgressRoot({ value = 0, max = 100, indeterminate = false, children, className, ...rest }, ref) {
779
953
  const clampedValue = Math.min(Math.max(value, 0), max);
780
954
  const state = resolveProgressState(clampedValue, max, indeterminate);
781
- const ctx = useMemo5(
955
+ const ctx = useMemo6(
782
956
  () => ({ value: clampedValue, max, indeterminate, state }),
783
957
  [clampedValue, max, indeterminate, state]
784
958
  );
785
- return /* @__PURE__ */ jsx7(ProgressCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx7(
959
+ return /* @__PURE__ */ jsx9(ProgressCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx9(
786
960
  "div",
787
961
  {
788
962
  ref,
@@ -793,20 +967,20 @@ var Root7 = forwardRef7(function ProgressRoot({ value = 0, max = 100, indetermin
793
967
  "aria-valuenow": indeterminate ? void 0 : clampedValue,
794
968
  "aria-busy": indeterminate || void 0,
795
969
  ...mergeProps(
796
- partAttrs7(progressAnatomy.scope, progressAnatomy.root, { state }),
970
+ partAttrs9(progressAnatomy.scope, progressAnatomy.root, { state }),
797
971
  rest
798
972
  ),
799
973
  children
800
974
  }
801
975
  ) });
802
976
  });
803
- var Track = forwardRef7(function ProgressTrack(props, ref) {
804
- return /* @__PURE__ */ jsx7("div", { ref, ...mergeProps(partOnlyAttrs(progressAnatomy.track), props) });
977
+ var Track = forwardRef9(function ProgressTrack(props, ref) {
978
+ return /* @__PURE__ */ jsx9("div", { ref, ...mergeProps(partOnlyAttrs(progressAnatomy.track), props) });
805
979
  });
806
- var Range = forwardRef7(function ProgressRange({ style, ...rest }, ref) {
980
+ var Range = forwardRef9(function ProgressRange({ style, ...rest }, ref) {
807
981
  const { value, max, indeterminate } = useProgressCtx();
808
982
  const width = indeterminate ? void 0 : `${value / max * 100}%`;
809
- return /* @__PURE__ */ jsx7(
983
+ return /* @__PURE__ */ jsx9(
810
984
  "div",
811
985
  {
812
986
  ref,
@@ -816,65 +990,75 @@ var Range = forwardRef7(function ProgressRange({ style, ...rest }, ref) {
816
990
  }
817
991
  );
818
992
  });
819
- var Label4 = forwardRef7(function ProgressLabel(props, ref) {
820
- return /* @__PURE__ */ jsx7("span", { ref, ...mergeProps(partOnlyAttrs(progressAnatomy.label), props) });
993
+ var Label4 = forwardRef9(function ProgressLabel(props, ref) {
994
+ return /* @__PURE__ */ jsx9("span", { ref, ...mergeProps(partOnlyAttrs(progressAnatomy.label), props) });
821
995
  });
822
- var Progress = { Root: Root7, Track, Range, Label: Label4 };
996
+ var Progress = { Root: Root9, Track, Range, Label: Label4 };
823
997
 
824
998
  // src/radio-group/index.tsx
825
- import { partAttrs as partAttrs8, partOnlyAttrs as partOnlyAttrs2, radioGroupAnatomy } from "@aeon-ui/core";
999
+ import { partAttrs as partAttrs10, partOnlyAttrs as partOnlyAttrs2, radioGroupAnatomy } from "@aeon-ui/core";
826
1000
  import { tabsMachine as tabsMachine2 } from "@aeon-ui/primitives";
827
1001
  import {
828
- createContext as createContext6,
829
- forwardRef as forwardRef8,
830
- useContext as useContext6,
1002
+ createContext as createContext7,
1003
+ forwardRef as forwardRef10,
1004
+ useCallback,
1005
+ useContext as useContext7,
831
1006
  useEffect as useEffect8,
832
- useMemo as useMemo6
1007
+ useMemo as useMemo7
833
1008
  } from "react";
834
- import { jsx as jsx8 } from "react/jsx-runtime";
835
- var RadioGroupCtx = createContext6(null);
1009
+ import { jsx as jsx10 } from "react/jsx-runtime";
1010
+ var RadioGroupCtx = createContext7(null);
836
1011
  function useRadioGroupCtx() {
837
- const ctx = useContext6(RadioGroupCtx);
1012
+ const ctx = useContext7(RadioGroupCtx);
838
1013
  if (!ctx) throw new Error("RadioGroup parts must be used within RadioGroup.Root");
839
1014
  return ctx;
840
1015
  }
841
- var RadioGroupItemCtx = createContext6(null);
1016
+ var RadioGroupItemCtx = createContext7(null);
842
1017
  function useRadioGroupItemCtx() {
843
- const ctx = useContext6(RadioGroupItemCtx);
1018
+ const ctx = useContext7(RadioGroupItemCtx);
844
1019
  if (!ctx) throw new Error("RadioGroup item parts must be used within RadioGroup.Item");
845
1020
  return ctx;
846
1021
  }
847
- var Root8 = forwardRef8(function RadioGroupRoot({ value, defaultValue = "", onValueChange, children, className, ...rest }, ref) {
1022
+ var Root10 = forwardRef10(function RadioGroupRoot({ value, defaultValue = "", onValueChange, children, className, ...rest }, ref) {
848
1023
  const [snapshot, send] = useAeonMachine(tabsMachine2, {
849
1024
  input: { value: defaultValue, disabled: false }
850
1025
  });
851
1026
  const resolvedValue = value ?? snapshot.context.value;
1027
+ const controlled = value !== void 0;
1028
+ const selectValue = useCallback(
1029
+ (next) => {
1030
+ if (controlled) onValueChange?.(next);
1031
+ else send({ type: "SELECT", value: next });
1032
+ },
1033
+ [controlled, onValueChange, send]
1034
+ );
852
1035
  useEffect8(() => {
853
- onValueChange?.(resolvedValue);
854
- }, [resolvedValue, onValueChange]);
1036
+ if (controlled) return;
1037
+ onValueChange?.(snapshot.context.value);
1038
+ }, [snapshot.context.value, controlled, onValueChange]);
855
1039
  useEffect8(() => {
856
1040
  if (value !== void 0) send({ type: "SET_VALUE", value });
857
1041
  }, [value, send]);
858
- const ctx = useMemo6(() => ({ value: resolvedValue, send }), [resolvedValue, send]);
859
- return /* @__PURE__ */ jsx8(RadioGroupCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx8(
1042
+ const ctx = useMemo7(() => ({ value: resolvedValue, send, selectValue }), [resolvedValue, send, selectValue]);
1043
+ return /* @__PURE__ */ jsx10(RadioGroupCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx10(
860
1044
  "div",
861
1045
  {
862
1046
  ref,
863
1047
  role: "radiogroup",
864
1048
  className,
865
1049
  ...mergeProps(
866
- partAttrs8(radioGroupAnatomy.scope, radioGroupAnatomy.root),
1050
+ partAttrs10(radioGroupAnatomy.scope, radioGroupAnatomy.root),
867
1051
  rest
868
1052
  ),
869
1053
  children
870
1054
  }
871
1055
  ) });
872
1056
  });
873
- var Item = forwardRef8(function RadioGroupItem({ value: itemValue, children, ...rest }, ref) {
1057
+ var Item = forwardRef10(function RadioGroupItem({ value: itemValue, children, ...rest }, ref) {
874
1058
  const { value } = useRadioGroupCtx();
875
1059
  const selected = value === itemValue;
876
- const itemCtx = useMemo6(() => ({ value: itemValue, selected }), [itemValue, selected]);
877
- return /* @__PURE__ */ jsx8(RadioGroupItemCtx.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx8(
1060
+ const itemCtx = useMemo7(() => ({ value: itemValue, selected }), [itemValue, selected]);
1061
+ return /* @__PURE__ */ jsx10(RadioGroupItemCtx.Provider, { value: itemCtx, children: /* @__PURE__ */ jsx10(
878
1062
  "div",
879
1063
  {
880
1064
  ref,
@@ -888,11 +1072,11 @@ var Item = forwardRef8(function RadioGroupItem({ value: itemValue, children, ...
888
1072
  }
889
1073
  ) });
890
1074
  });
891
- var ItemControl = forwardRef8(function RadioGroupItemControl({ onClick, onKeyDown, ...rest }, ref) {
892
- const { send } = useRadioGroupCtx();
1075
+ var ItemControl = forwardRef10(function RadioGroupItemControl({ onClick, onKeyDown, ...rest }, ref) {
1076
+ const { selectValue } = useRadioGroupCtx();
893
1077
  const { value: itemValue, selected } = useRadioGroupItemCtx();
894
- const select = () => send({ type: "SELECT", value: itemValue });
895
- return /* @__PURE__ */ jsx8(
1078
+ const select = () => selectValue(itemValue);
1079
+ return /* @__PURE__ */ jsx10(
896
1080
  "span",
897
1081
  {
898
1082
  ref,
@@ -922,10 +1106,10 @@ var ItemControl = forwardRef8(function RadioGroupItemControl({ onClick, onKeyDow
922
1106
  }
923
1107
  );
924
1108
  });
925
- var ItemIndicator = forwardRef8(function RadioGroupItemIndicator(props, ref) {
1109
+ var ItemIndicator = forwardRef10(function RadioGroupItemIndicator(props, ref) {
926
1110
  const { selected } = useRadioGroupItemCtx();
927
1111
  if (!selected) return null;
928
- return /* @__PURE__ */ jsx8(
1112
+ return /* @__PURE__ */ jsx10(
929
1113
  "span",
930
1114
  {
931
1115
  ref,
@@ -936,10 +1120,10 @@ var ItemIndicator = forwardRef8(function RadioGroupItemIndicator(props, ref) {
936
1120
  }
937
1121
  );
938
1122
  });
939
- var ItemLabel = forwardRef8(function RadioGroupItemLabel({ onClick, ...rest }, ref) {
940
- const { send } = useRadioGroupCtx();
1123
+ var ItemLabel = forwardRef10(function RadioGroupItemLabel({ onClick, ...rest }, ref) {
1124
+ const { selectValue } = useRadioGroupCtx();
941
1125
  const { value: itemValue } = useRadioGroupItemCtx();
942
- return /* @__PURE__ */ jsx8(
1126
+ return /* @__PURE__ */ jsx10(
943
1127
  "span",
944
1128
  {
945
1129
  ref,
@@ -948,7 +1132,7 @@ var ItemLabel = forwardRef8(function RadioGroupItemLabel({ onClick, ...rest }, r
948
1132
  {
949
1133
  onClick: (e) => {
950
1134
  onClick?.(e);
951
- send({ type: "SELECT", value: itemValue });
1135
+ selectValue(itemValue);
952
1136
  }
953
1137
  },
954
1138
  rest
@@ -956,24 +1140,24 @@ var ItemLabel = forwardRef8(function RadioGroupItemLabel({ onClick, ...rest }, r
956
1140
  }
957
1141
  );
958
1142
  });
959
- var RadioGroup = { Root: Root8, Item, ItemControl, ItemIndicator, ItemLabel };
1143
+ var RadioGroup = { Root: Root10, Item, ItemControl, ItemIndicator, ItemLabel };
960
1144
 
961
1145
  // src/slider/index.tsx
962
- import { partAttrs as partAttrs9, partOnlyAttrs as partOnlyAttrs3, sliderAnatomy } from "@aeon-ui/core";
1146
+ import { partAttrs as partAttrs11, partOnlyAttrs as partOnlyAttrs3, sliderAnatomy } from "@aeon-ui/core";
963
1147
  import { sliderMachine, snapSliderValue } from "@aeon-ui/primitives";
964
1148
  import {
965
- createContext as createContext7,
966
- forwardRef as forwardRef9,
967
- useCallback,
968
- useContext as useContext7,
1149
+ createContext as createContext8,
1150
+ forwardRef as forwardRef11,
1151
+ useCallback as useCallback2,
1152
+ useContext as useContext8,
969
1153
  useEffect as useEffect9,
970
- useMemo as useMemo7,
1154
+ useMemo as useMemo8,
971
1155
  useRef as useRef2
972
1156
  } from "react";
973
- import { jsx as jsx9 } from "react/jsx-runtime";
974
- var SliderCtx = createContext7(null);
1157
+ import { jsx as jsx11 } from "react/jsx-runtime";
1158
+ var SliderCtx = createContext8(null);
975
1159
  function useSliderCtx() {
976
- const ctx = useContext7(SliderCtx);
1160
+ const ctx = useContext8(SliderCtx);
977
1161
  if (!ctx) throw new Error("Slider parts must be used within Slider.Root");
978
1162
  return ctx;
979
1163
  }
@@ -981,7 +1165,7 @@ function percent(value, min, max) {
981
1165
  if (max <= min) return 0;
982
1166
  return (value - min) / (max - min) * 100;
983
1167
  }
984
- var Root9 = forwardRef9(function SliderRoot({
1168
+ var Root11 = forwardRef11(function SliderRoot({
985
1169
  value,
986
1170
  defaultValue,
987
1171
  min = 0,
@@ -1011,7 +1195,7 @@ var Root9 = forwardRef9(function SliderRoot({
1011
1195
  useEffect9(() => {
1012
1196
  if (value !== void 0) send({ type: "SET_VALUE", value });
1013
1197
  }, [value, send]);
1014
- const setValueFromClientX = useCallback(
1198
+ const setValueFromClientX = useCallback2(
1015
1199
  (clientX) => {
1016
1200
  const track = trackRef.current;
1017
1201
  if (!track || disabled) return;
@@ -1035,7 +1219,7 @@ var Root9 = forwardRef9(function SliderRoot({
1035
1219
  window.removeEventListener("pointerup", onUp);
1036
1220
  };
1037
1221
  }, [dragging, setValueFromClientX, send]);
1038
- const ctx = useMemo7(
1222
+ const ctx = useMemo8(
1039
1223
  () => ({
1040
1224
  value: resolvedValue,
1041
1225
  min,
@@ -1050,13 +1234,13 @@ var Root9 = forwardRef9(function SliderRoot({
1050
1234
  }),
1051
1235
  [resolvedValue, min, max, step, disabled, dragging, send, onValueChange, setValueFromClientX]
1052
1236
  );
1053
- return /* @__PURE__ */ jsx9(SliderCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx9(
1237
+ return /* @__PURE__ */ jsx11(SliderCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx11(
1054
1238
  "div",
1055
1239
  {
1056
1240
  ref,
1057
1241
  className,
1058
1242
  ...mergeProps(
1059
- partAttrs9(sliderAnatomy.scope, sliderAnatomy.root, {
1243
+ partAttrs11(sliderAnatomy.scope, sliderAnatomy.root, {
1060
1244
  state: dragging ? "dragging" : "idle",
1061
1245
  disabled
1062
1246
  }),
@@ -1066,9 +1250,9 @@ var Root9 = forwardRef9(function SliderRoot({
1066
1250
  }
1067
1251
  ) });
1068
1252
  });
1069
- var Track2 = forwardRef9(function SliderTrack({ onPointerDown, ...rest }, ref) {
1253
+ var Track2 = forwardRef11(function SliderTrack({ onPointerDown, ...rest }, ref) {
1070
1254
  const { disabled, send, setValueFromClientX, trackRef } = useSliderCtx();
1071
- return /* @__PURE__ */ jsx9(
1255
+ return /* @__PURE__ */ jsx11(
1072
1256
  "div",
1073
1257
  {
1074
1258
  ref: (node) => {
@@ -1092,9 +1276,9 @@ var Track2 = forwardRef9(function SliderTrack({ onPointerDown, ...rest }, ref) {
1092
1276
  }
1093
1277
  );
1094
1278
  });
1095
- var Range2 = forwardRef9(function SliderRange({ style, ...rest }, ref) {
1279
+ var Range2 = forwardRef11(function SliderRange({ style, ...rest }, ref) {
1096
1280
  const { value, min, max } = useSliderCtx();
1097
- return /* @__PURE__ */ jsx9(
1281
+ return /* @__PURE__ */ jsx11(
1098
1282
  "div",
1099
1283
  {
1100
1284
  ref,
@@ -1104,9 +1288,9 @@ var Range2 = forwardRef9(function SliderRange({ style, ...rest }, ref) {
1104
1288
  }
1105
1289
  );
1106
1290
  });
1107
- var Thumb2 = forwardRef9(function SliderThumb({ onKeyDown, onPointerDown, style, ...rest }, ref) {
1108
- const { value, min, max, step, disabled, dragging, send } = useSliderCtx();
1109
- return /* @__PURE__ */ jsx9(
1291
+ var Thumb2 = forwardRef11(function SliderThumb({ onKeyDown, onPointerDown, style, ...rest }, ref) {
1292
+ const { value, min, max, step, disabled, dragging, send, setValueFromClientX } = useSliderCtx();
1293
+ return /* @__PURE__ */ jsx11(
1110
1294
  "span",
1111
1295
  {
1112
1296
  ref,
@@ -1124,7 +1308,9 @@ var Thumb2 = forwardRef9(function SliderThumb({ onKeyDown, onPointerDown, style,
1124
1308
  onPointerDown?.(e);
1125
1309
  if (disabled || e.button !== 0) return;
1126
1310
  e.stopPropagation();
1311
+ e.currentTarget.setPointerCapture(e.pointerId);
1127
1312
  send({ type: "POINTER_DOWN" });
1313
+ setValueFromClientX(e.clientX);
1128
1314
  },
1129
1315
  onKeyDown: (e) => {
1130
1316
  onKeyDown?.(e);
@@ -1152,35 +1338,35 @@ var Thumb2 = forwardRef9(function SliderThumb({ onKeyDown, onPointerDown, style,
1152
1338
  }
1153
1339
  );
1154
1340
  });
1155
- var ValueText = forwardRef9(function SliderValueText(props, ref) {
1341
+ var ValueText = forwardRef11(function SliderValueText(props, ref) {
1156
1342
  const { value } = useSliderCtx();
1157
- return /* @__PURE__ */ jsx9("span", { ref, ...mergeProps(partOnlyAttrs3(sliderAnatomy.valueText), props), children: props.children ?? value });
1343
+ return /* @__PURE__ */ jsx11("span", { ref, ...mergeProps(partOnlyAttrs3(sliderAnatomy.valueText), props), children: props.children ?? value });
1158
1344
  });
1159
- var Slider = { Root: Root9, Track: Track2, Range: Range2, Thumb: Thumb2, ValueText };
1345
+ var Slider = { Root: Root11, Track: Track2, Range: Range2, Thumb: Thumb2, ValueText };
1160
1346
 
1161
1347
  // src/pin-input/index.tsx
1162
- import { partAttrs as partAttrs10, partOnlyAttrs as partOnlyAttrs4, pinInputAnatomy } from "@aeon-ui/core";
1348
+ import { partAttrs as partAttrs12, partOnlyAttrs as partOnlyAttrs4, pinInputAnatomy } from "@aeon-ui/core";
1163
1349
  import {
1164
- createContext as createContext8,
1165
- forwardRef as forwardRef10,
1166
- useCallback as useCallback2,
1167
- useContext as useContext8,
1350
+ createContext as createContext9,
1351
+ forwardRef as forwardRef12,
1352
+ useCallback as useCallback3,
1353
+ useContext as useContext9,
1168
1354
  useEffect as useEffect10,
1169
- useMemo as useMemo8,
1355
+ useMemo as useMemo9,
1170
1356
  useRef as useRef3,
1171
1357
  useState as useState2
1172
1358
  } from "react";
1173
- import { jsx as jsx10 } from "react/jsx-runtime";
1174
- var PinInputCtx = createContext8(null);
1359
+ import { jsx as jsx12 } from "react/jsx-runtime";
1360
+ var PinInputCtx = createContext9(null);
1175
1361
  function usePinInputCtx() {
1176
- const ctx = useContext8(PinInputCtx);
1362
+ const ctx = useContext9(PinInputCtx);
1177
1363
  if (!ctx) throw new Error("PinInput parts must be used within PinInput.Root");
1178
1364
  return ctx;
1179
1365
  }
1180
1366
  function normalizePinValue(raw, length) {
1181
1367
  return raw.replace(/\s/g, "").slice(0, length).split("");
1182
1368
  }
1183
- var Root10 = forwardRef10(function PinInputRoot({
1369
+ var Root12 = forwardRef12(function PinInputRoot({
1184
1370
  length = 4,
1185
1371
  value,
1186
1372
  defaultValue = "",
@@ -1202,7 +1388,7 @@ var Root10 = forwardRef10(function PinInputRoot({
1202
1388
  onValueChange?.(resolved);
1203
1389
  if (resolved.length === length && !resolved.includes("")) onComplete?.(resolved);
1204
1390
  }, [resolved, length, onValueChange, onComplete]);
1205
- const setChars = useCallback2(
1391
+ const setChars = useCallback3(
1206
1392
  (next) => {
1207
1393
  const joined = next.slice(0, length).join("");
1208
1394
  if (!controlled) setUncontrolled(next.slice(0, length));
@@ -1211,7 +1397,7 @@ var Root10 = forwardRef10(function PinInputRoot({
1211
1397
  },
1212
1398
  [controlled, length, onValueChange, onComplete]
1213
1399
  );
1214
- const setChar = useCallback2(
1400
+ const setChar = useCallback3(
1215
1401
  (index, char) => {
1216
1402
  const next = [...chars.slice(0, length)];
1217
1403
  while (next.length < length) next.push("");
@@ -1220,25 +1406,25 @@ var Root10 = forwardRef10(function PinInputRoot({
1220
1406
  },
1221
1407
  [chars, length, setChars]
1222
1408
  );
1223
- const focusInput = useCallback2((index) => {
1409
+ const focusInput = useCallback3((index) => {
1224
1410
  const el = inputRefs.current[index];
1225
1411
  el?.focus();
1226
1412
  el?.select();
1227
1413
  }, []);
1228
- const registerInput = useCallback2((index, el) => {
1414
+ const registerInput = useCallback3((index, el) => {
1229
1415
  inputRefs.current[index] = el;
1230
1416
  }, []);
1231
- const ctx = useMemo8(
1417
+ const ctx = useMemo9(
1232
1418
  () => ({ length, values: chars.slice(0, length), disabled, type, setChar, focusInput, registerInput }),
1233
1419
  [length, chars, disabled, type, setChar, focusInput, registerInput]
1234
1420
  );
1235
- return /* @__PURE__ */ jsx10(PinInputCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx10(
1421
+ return /* @__PURE__ */ jsx12(PinInputCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx12(
1236
1422
  "div",
1237
1423
  {
1238
1424
  ref,
1239
1425
  className,
1240
1426
  ...mergeProps(
1241
- partAttrs10(pinInputAnatomy.scope, pinInputAnatomy.root, {
1427
+ partAttrs12(pinInputAnatomy.scope, pinInputAnatomy.root, {
1242
1428
  state: resolved.length === length && !resolved.includes("") ? "complete" : "idle",
1243
1429
  disabled
1244
1430
  }),
@@ -1248,7 +1434,7 @@ var Root10 = forwardRef10(function PinInputRoot({
1248
1434
  }
1249
1435
  ) });
1250
1436
  });
1251
- var Input = forwardRef10(function PinInputInput({ index, onKeyDown, onChange, onPaste, ...rest }, ref) {
1437
+ var Input = forwardRef12(function PinInputInput({ index, onKeyDown, onChange, onPaste, ...rest }, ref) {
1252
1438
  const { length, values, disabled, type, setChar, focusInput, registerInput } = usePinInputCtx();
1253
1439
  const value = values[index] ?? "";
1254
1440
  const pattern = type === "numeric" ? /^[0-9]$/ : /^[0-9a-zA-Z]$/;
@@ -1257,7 +1443,7 @@ var Input = forwardRef10(function PinInputInput({ index, onKeyDown, onChange, on
1257
1443
  const char = raw.slice(-1);
1258
1444
  return pattern.test(char) ? char : "";
1259
1445
  };
1260
- return /* @__PURE__ */ jsx10(
1446
+ return /* @__PURE__ */ jsx12(
1261
1447
  "input",
1262
1448
  {
1263
1449
  ref: (node) => {
@@ -1310,32 +1496,32 @@ var Input = forwardRef10(function PinInputInput({ index, onKeyDown, onChange, on
1310
1496
  }
1311
1497
  );
1312
1498
  });
1313
- var Group2 = forwardRef10(
1499
+ var Group2 = forwardRef12(
1314
1500
  function PinInputGroup({ inputClassName, className, ...rest }, ref) {
1315
1501
  const { length } = usePinInputCtx();
1316
- return /* @__PURE__ */ jsx10("div", { ref, className, ...rest, children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx10(Input, { index, className: inputClassName }, index)) });
1502
+ return /* @__PURE__ */ jsx12("div", { ref, className, ...rest, children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx12(Input, { index, className: inputClassName }, index)) });
1317
1503
  }
1318
1504
  );
1319
- var PinInput = { Root: Root10, Input, Group: Group2 };
1505
+ var PinInput = { Root: Root12, Input, Group: Group2 };
1320
1506
 
1321
1507
  // src/accordion/index.tsx
1322
- import { accordionAnatomy, partOnlyAttrs as partOnlyAttrs5, scopeAttrs } from "@aeon-ui/core";
1508
+ import { accordionAnatomy, partOnlyAttrs as partOnlyAttrs5, scopeAttrs as scopeAttrs3 } from "@aeon-ui/core";
1323
1509
  import { accordionMachine } from "@aeon-ui/primitives";
1324
1510
  import {
1325
- createContext as createContext9,
1326
- forwardRef as forwardRef11,
1327
- useContext as useContext9,
1511
+ createContext as createContext10,
1512
+ forwardRef as forwardRef13,
1513
+ useContext as useContext10,
1328
1514
  useEffect as useEffect11,
1329
- useMemo as useMemo9
1515
+ useMemo as useMemo10
1330
1516
  } from "react";
1331
- import { jsx as jsx11 } from "react/jsx-runtime";
1332
- var AccordionCtx = createContext9(null);
1517
+ import { jsx as jsx13 } from "react/jsx-runtime";
1518
+ var AccordionCtx = createContext10(null);
1333
1519
  function useAccordionCtx() {
1334
- const ctx = useContext9(AccordionCtx);
1520
+ const ctx = useContext10(AccordionCtx);
1335
1521
  if (!ctx) throw new Error("Accordion parts must be used within Accordion.Root");
1336
1522
  return ctx;
1337
1523
  }
1338
- var Root11 = forwardRef11(function AccordionRoot({
1524
+ var Root13 = forwardRef13(function AccordionRoot({
1339
1525
  value,
1340
1526
  defaultValue = [],
1341
1527
  multiple = false,
@@ -1355,24 +1541,24 @@ var Root11 = forwardRef11(function AccordionRoot({
1355
1541
  useEffect11(() => {
1356
1542
  if (value !== void 0) send({ type: "SET_VALUE", value });
1357
1543
  }, [value, send]);
1358
- const ctx = useMemo9(() => ({ value: resolvedValue, send }), [resolvedValue, send]);
1359
- return /* @__PURE__ */ jsx11(AccordionCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx11(
1544
+ const ctx = useMemo10(() => ({ value: resolvedValue, send }), [resolvedValue, send]);
1545
+ return /* @__PURE__ */ jsx13(AccordionCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx13(
1360
1546
  "div",
1361
1547
  {
1362
1548
  ref,
1363
1549
  className,
1364
1550
  ...mergeProps(
1365
- scopeAttrs(accordionAnatomy.scope, accordionAnatomy.root),
1551
+ scopeAttrs3(accordionAnatomy.scope, accordionAnatomy.root),
1366
1552
  rest
1367
1553
  ),
1368
1554
  children
1369
1555
  }
1370
1556
  ) });
1371
1557
  });
1372
- var Item2 = forwardRef11(function AccordionItem({ value: itemValue, children, ...rest }, ref) {
1558
+ var Item2 = forwardRef13(function AccordionItem({ value: itemValue, children, ...rest }, ref) {
1373
1559
  const { value } = useAccordionCtx();
1374
1560
  const open = value.includes(itemValue);
1375
- return /* @__PURE__ */ jsx11(
1561
+ return /* @__PURE__ */ jsx13(
1376
1562
  "div",
1377
1563
  {
1378
1564
  ref,
@@ -1386,10 +1572,10 @@ var Item2 = forwardRef11(function AccordionItem({ value: itemValue, children, ..
1386
1572
  }
1387
1573
  );
1388
1574
  });
1389
- var ItemTrigger = forwardRef11(function AccordionItemTrigger({ value: itemValue, onClick, ...rest }, ref) {
1575
+ var ItemTrigger = forwardRef13(function AccordionItemTrigger({ value: itemValue, onClick, ...rest }, ref) {
1390
1576
  const { value, send } = useAccordionCtx();
1391
1577
  const open = value.includes(itemValue);
1392
- return /* @__PURE__ */ jsx11(
1578
+ return /* @__PURE__ */ jsx13(
1393
1579
  "button",
1394
1580
  {
1395
1581
  ref,
@@ -1410,10 +1596,10 @@ var ItemTrigger = forwardRef11(function AccordionItemTrigger({ value: itemValue,
1410
1596
  }
1411
1597
  );
1412
1598
  });
1413
- var ItemContent = forwardRef11(function AccordionItemContent({ value: itemValue, children, ...rest }, ref) {
1599
+ var ItemContent = forwardRef13(function AccordionItemContent({ value: itemValue, children, ...rest }, ref) {
1414
1600
  const { value } = useAccordionCtx();
1415
1601
  if (!value.includes(itemValue)) return null;
1416
- return /* @__PURE__ */ jsx11(
1602
+ return /* @__PURE__ */ jsx13(
1417
1603
  "div",
1418
1604
  {
1419
1605
  ref,
@@ -1425,8 +1611,8 @@ var ItemContent = forwardRef11(function AccordionItemContent({ value: itemValue,
1425
1611
  }
1426
1612
  );
1427
1613
  });
1428
- var ItemIndicator2 = forwardRef11(function AccordionItemIndicator(props, ref) {
1429
- return /* @__PURE__ */ jsx11(
1614
+ var ItemIndicator2 = forwardRef13(function AccordionItemIndicator(props, ref) {
1615
+ return /* @__PURE__ */ jsx13(
1430
1616
  "span",
1431
1617
  {
1432
1618
  ref,
@@ -1434,14 +1620,14 @@ var ItemIndicator2 = forwardRef11(function AccordionItemIndicator(props, ref) {
1434
1620
  }
1435
1621
  );
1436
1622
  });
1437
- var Accordion = { Root: Root11, Item: Item2, ItemTrigger, ItemContent, ItemIndicator: ItemIndicator2 };
1623
+ var Accordion = { Root: Root13, Item: Item2, ItemTrigger, ItemContent, ItemIndicator: ItemIndicator2 };
1438
1624
 
1439
1625
  // src/async/actions.tsx
1440
1626
  import { asyncAnatomy, partOnlyAttrs as partOnlyAttrs6 } from "@aeon-ui/core";
1441
- import { forwardRef as forwardRef12 } from "react";
1442
- import { jsx as jsx12 } from "react/jsx-runtime";
1443
- var AsyncActions = forwardRef12(function AsyncActions2({ children, className, ...rest }, ref) {
1444
- return /* @__PURE__ */ jsx12(
1627
+ import { forwardRef as forwardRef14 } from "react";
1628
+ import { jsx as jsx14 } from "react/jsx-runtime";
1629
+ var AsyncActions = forwardRef14(function AsyncActions2({ children, className, ...rest }, ref) {
1630
+ return /* @__PURE__ */ jsx14(
1445
1631
  "div",
1446
1632
  {
1447
1633
  ref,
@@ -1454,12 +1640,12 @@ var AsyncActions = forwardRef12(function AsyncActions2({ children, className, ..
1454
1640
 
1455
1641
  // src/async/context.tsx
1456
1642
  import { createAsyncMachine } from "@aeon-ui/primitives";
1457
- import { createContext as createContext10, useContext as useContext10, useMemo as useMemo10 } from "react";
1458
- import { jsx as jsx13 } from "react/jsx-runtime";
1643
+ import { createContext as createContext11, useContext as useContext11, useMemo as useMemo11 } from "react";
1644
+ import { jsx as jsx15 } from "react/jsx-runtime";
1459
1645
  var defaultMachine = createAsyncMachine();
1460
- var AsyncCtx = createContext10(null);
1646
+ var AsyncCtx = createContext11(null);
1461
1647
  function useAsyncContext() {
1462
- const ctx = useContext10(AsyncCtx);
1648
+ const ctx = useContext11(AsyncCtx);
1463
1649
  if (!ctx) {
1464
1650
  throw new Error("Async compound components must be used within <Async.Root>");
1465
1651
  }
@@ -1471,7 +1657,7 @@ function AsyncProvider({ children, machine }) {
1471
1657
  const status = String(snapshot.value);
1472
1658
  const { data, error, stale } = snapshot.context;
1473
1659
  const stateAttr = stale && status === "success" ? `${status} stale` : status;
1474
- const value = useMemo10(
1660
+ const value = useMemo11(
1475
1661
  () => ({
1476
1662
  send,
1477
1663
  status,
@@ -1482,14 +1668,14 @@ function AsyncProvider({ children, machine }) {
1482
1668
  }),
1483
1669
  [send, status, data, error, stale, stateAttr]
1484
1670
  );
1485
- return /* @__PURE__ */ jsx13(AsyncCtx.Provider, { value, children });
1671
+ return /* @__PURE__ */ jsx15(AsyncCtx.Provider, { value, children });
1486
1672
  }
1487
1673
 
1488
1674
  // src/async/readout.tsx
1489
- import { asyncAnatomy as asyncAnatomy2, partAttrs as partAttrs11, partOnlyAttrs as partOnlyAttrs7 } from "@aeon-ui/core";
1490
- import { forwardRef as forwardRef13 } from "react";
1491
- import { jsx as jsx14, jsxs } from "react/jsx-runtime";
1492
- var AsyncReadout = forwardRef13(function AsyncReadout2({ children, className, ...rest }, ref) {
1675
+ import { asyncAnatomy as asyncAnatomy2, partAttrs as partAttrs13, partOnlyAttrs as partOnlyAttrs7 } from "@aeon-ui/core";
1676
+ import { forwardRef as forwardRef15 } from "react";
1677
+ import { jsx as jsx16, jsxs } from "react/jsx-runtime";
1678
+ var AsyncReadout = forwardRef15(function AsyncReadout2({ children, className, ...rest }, ref) {
1493
1679
  const { stateAttr } = useAsyncContext();
1494
1680
  return /* @__PURE__ */ jsxs(
1495
1681
  "div",
@@ -1498,9 +1684,9 @@ var AsyncReadout = forwardRef13(function AsyncReadout2({ children, className, ..
1498
1684
  role: "status",
1499
1685
  "aria-live": "polite",
1500
1686
  className,
1501
- ...mergeProps(partAttrs11(asyncAnatomy2.scope, asyncAnatomy2.readout, { state: stateAttr }), rest),
1687
+ ...mergeProps(partAttrs13(asyncAnatomy2.scope, asyncAnatomy2.readout, { state: stateAttr }), rest),
1502
1688
  children: [
1503
- /* @__PURE__ */ jsx14(
1689
+ /* @__PURE__ */ jsx16(
1504
1690
  "span",
1505
1691
  {
1506
1692
  className: "aeon-async-readout__rail",
@@ -1508,48 +1694,48 @@ var AsyncReadout = forwardRef13(function AsyncReadout2({ children, className, ..
1508
1694
  ...partOnlyAttrs7(asyncAnatomy2.readoutRail)
1509
1695
  }
1510
1696
  ),
1511
- /* @__PURE__ */ jsx14("div", { className: "aeon-async-readout__body", ...partOnlyAttrs7(asyncAnatomy2.readoutBody), children })
1697
+ /* @__PURE__ */ jsx16("div", { className: "aeon-async-readout__body", ...partOnlyAttrs7(asyncAnatomy2.readoutBody), children })
1512
1698
  ]
1513
1699
  }
1514
1700
  );
1515
1701
  });
1516
1702
 
1517
1703
  // src/async/root.tsx
1518
- import { asyncAnatomy as asyncAnatomy3, partAttrs as partAttrs12 } from "@aeon-ui/core";
1519
- import { forwardRef as forwardRef14 } from "react";
1520
- import { jsx as jsx15 } from "react/jsx-runtime";
1521
- var AsyncRootInner = forwardRef14(function AsyncRootInner2({ children, className, ...rest }, ref) {
1704
+ import { asyncAnatomy as asyncAnatomy3, partAttrs as partAttrs14 } from "@aeon-ui/core";
1705
+ import { forwardRef as forwardRef16 } from "react";
1706
+ import { jsx as jsx17 } from "react/jsx-runtime";
1707
+ var AsyncRootInner = forwardRef16(function AsyncRootInner2({ children, className, ...rest }, ref) {
1522
1708
  const { stateAttr } = useAsyncContext();
1523
- return /* @__PURE__ */ jsx15(
1709
+ return /* @__PURE__ */ jsx17(
1524
1710
  "div",
1525
1711
  {
1526
1712
  ref,
1527
1713
  className,
1528
- ...mergeProps(partAttrs12(asyncAnatomy3.scope, asyncAnatomy3.root, { state: stateAttr }), rest),
1714
+ ...mergeProps(partAttrs14(asyncAnatomy3.scope, asyncAnatomy3.root, { state: stateAttr }), rest),
1529
1715
  children
1530
1716
  }
1531
1717
  );
1532
1718
  });
1533
- var AsyncRoot = forwardRef14(function AsyncRoot2({ children, className, ...rest }, ref) {
1534
- return /* @__PURE__ */ jsx15(AsyncProvider, { children: /* @__PURE__ */ jsx15(AsyncRootInner, { ref, className, ...rest, children }) });
1719
+ var AsyncRoot = forwardRef16(function AsyncRoot2({ children, className, ...rest }, ref) {
1720
+ return /* @__PURE__ */ jsx17(AsyncProvider, { children: /* @__PURE__ */ jsx17(AsyncRootInner, { ref, className, ...rest, children }) });
1535
1721
  });
1536
1722
 
1537
1723
  // src/async/track.tsx
1538
1724
  import { asyncAnatomy as asyncAnatomy4, partOnlyAttrs as partOnlyAttrs8 } from "@aeon-ui/core";
1539
1725
  import { ASYNC_LIFECYCLE_STATES } from "@aeon-ui/primitives";
1540
- import { forwardRef as forwardRef15 } from "react";
1541
- import { jsx as jsx16 } from "react/jsx-runtime";
1726
+ import { forwardRef as forwardRef17 } from "react";
1727
+ import { jsx as jsx18 } from "react/jsx-runtime";
1542
1728
  function segmentPhase(index, activeIndex) {
1543
1729
  if (activeIndex === -1) return "future";
1544
1730
  if (index === activeIndex) return "active";
1545
1731
  if (index < activeIndex) return "past";
1546
1732
  return "future";
1547
1733
  }
1548
- var AsyncTrack = forwardRef15(function AsyncTrack2({ states = ASYNC_LIFECYCLE_STATES, className, ...rest }, ref) {
1734
+ var AsyncTrack = forwardRef17(function AsyncTrack2({ states = ASYNC_LIFECYCLE_STATES, className, ...rest }, ref) {
1549
1735
  const { status } = useAsyncContext();
1550
1736
  const activeIndex = states.indexOf(status);
1551
1737
  const { style, ...restWithoutStyle } = rest;
1552
- return /* @__PURE__ */ jsx16(
1738
+ return /* @__PURE__ */ jsx18(
1553
1739
  "div",
1554
1740
  {
1555
1741
  ref,
@@ -1563,7 +1749,7 @@ var AsyncTrack = forwardRef15(function AsyncTrack2({ states = ASYNC_LIFECYCLE_ST
1563
1749
  ...mergeProps(partOnlyAttrs8(asyncAnatomy4.track), restWithoutStyle),
1564
1750
  children: states.map((id, index) => {
1565
1751
  const phase = segmentPhase(index, activeIndex);
1566
- return /* @__PURE__ */ jsx16(
1752
+ return /* @__PURE__ */ jsx18(
1567
1753
  "span",
1568
1754
  {
1569
1755
  role: "listitem",
@@ -1580,35 +1766,25 @@ var AsyncTrack = forwardRef15(function AsyncTrack2({ states = ASYNC_LIFECYCLE_ST
1580
1766
  );
1581
1767
  });
1582
1768
 
1583
- // src/async/legacy-region.tsx
1584
- import { partAttrs as partAttrs13 } from "@aeon-ui/core";
1585
- import { createAsyncMachine as createAsyncMachine2 } from "@aeon-ui/primitives";
1586
- import { useMemo as useMemo11 } from "react";
1587
- import { Fragment, jsx as jsx17, jsxs as jsxs2 } from "react/jsx-runtime";
1588
- function AsyncRegion({ children, className }) {
1589
- const machine = useMemo11(() => createAsyncMachine2(), []);
1590
- const [snapshot] = useAeonMachine(machine);
1591
- const status = snapshot.value;
1592
- const { data, error } = snapshot.context;
1593
- const content = typeof children === "function" ? children({ status, data, error }) : children;
1594
- return /* @__PURE__ */ jsx17(
1595
- "div",
1596
- {
1597
- className,
1598
- ...mergeProps(partAttrs13("async", "root", { state: status })),
1599
- children: content ?? /* @__PURE__ */ jsxs2(Fragment, { children: [
1600
- status === "idle" && /* @__PURE__ */ jsx17("span", { "data-aeon-part": "idle", children: "Ready" }),
1601
- status === "loading" && /* @__PURE__ */ jsx17("span", { "data-aeon-part": "loading", children: "Loading\u2026" }),
1602
- status === "success" && /* @__PURE__ */ jsx17("span", { "data-aeon-part": "success", children: String(data) }),
1603
- status === "failure" && /* @__PURE__ */ jsx17("span", { "data-aeon-part": "failure", children: error }),
1604
- status === "empty" && /* @__PURE__ */ jsx17("span", { "data-aeon-part": "empty", children: "No results" })
1605
- ] })
1606
- }
1607
- );
1769
+ // src/async/map-content-state.ts
1770
+ function asyncStatusToContentState(status) {
1771
+ switch (status) {
1772
+ case "loading":
1773
+ return "pending";
1774
+ case "empty":
1775
+ return "empty";
1776
+ case "failure":
1777
+ return "error";
1778
+ case "success":
1779
+ return "success";
1780
+ case "idle":
1781
+ default:
1782
+ return "idle";
1783
+ }
1608
1784
  }
1609
1785
 
1610
1786
  // src/async/index.tsx
1611
- import { createAsyncMachine as createAsyncMachine3 } from "@aeon-ui/primitives";
1787
+ import { createAsyncMachine as createAsyncMachine2 } from "@aeon-ui/primitives";
1612
1788
  var Async = {
1613
1789
  Root: AsyncRoot,
1614
1790
  Provider: AsyncProvider,
@@ -1618,47 +1794,60 @@ var Async = {
1618
1794
  };
1619
1795
 
1620
1796
  // src/field/index.tsx
1621
- import { fieldAnatomy, partAttrs as partAttrs14, partOnlyAttrs as partOnlyAttrs9, stateToAttr } from "@aeon-ui/core";
1797
+ import { fieldAnatomy, fieldFace, fieldRegions, partAttrs as partAttrs15, partOnlyAttrs as partOnlyAttrs9 } from "@aeon-ui/core";
1622
1798
  import { fieldMachine } from "@aeon-ui/primitives";
1623
1799
  import {
1624
- createContext as createContext11,
1625
- forwardRef as forwardRef16,
1626
- useContext as useContext11,
1800
+ createContext as createContext12,
1801
+ forwardRef as forwardRef18,
1802
+ useContext as useContext12,
1627
1803
  useMemo as useMemo12
1628
1804
  } from "react";
1629
- import { jsx as jsx18 } from "react/jsx-runtime";
1630
- var FieldCtx = createContext11(null);
1805
+ import { jsx as jsx19 } from "react/jsx-runtime";
1806
+ var FieldCtx = createContext12(null);
1631
1807
  function useFieldContext() {
1632
- const ctx = useContext11(FieldCtx);
1808
+ const ctx = useContext12(FieldCtx);
1633
1809
  if (!ctx) throw new Error("Field parts must be used within <Field.Root>");
1634
1810
  return ctx;
1635
1811
  }
1636
- var Root12 = forwardRef16(function FieldRoot({ children, className, id }, ref) {
1812
+ var Root14 = forwardRef18(function FieldRoot({ children, className, id }, ref) {
1637
1813
  const [snapshot, send] = useAeonMachine(fieldMachine);
1638
- const stateAttr = stateToAttr(snapshot.value);
1639
- const invalid = typeof snapshot.value === "object" && snapshot.value !== null && "validation" in snapshot.value && snapshot.value.validation === "invalid";
1640
- const pending = typeof snapshot.value === "object" && snapshot.value !== null && "submission" in snapshot.value && snapshot.value.submission === "pending";
1814
+ const face = fieldFace(snapshot.value);
1815
+ const regions = fieldRegions(snapshot.value);
1816
+ const invalid = regions.validation === "invalid";
1817
+ const pending = regions.submission === "pending";
1641
1818
  const value = useMemo12(
1642
- () => ({ stateAttr, send, invalid, pending }),
1643
- [stateAttr, send, invalid, pending]
1819
+ () => ({
1820
+ face,
1821
+ stateAttr: face,
1822
+ interaction: regions.interaction,
1823
+ validation: regions.validation,
1824
+ submission: regions.submission,
1825
+ send,
1826
+ invalid,
1827
+ pending
1828
+ }),
1829
+ [face, regions.interaction, regions.validation, regions.submission, send, invalid, pending]
1644
1830
  );
1645
- return /* @__PURE__ */ jsx18(FieldCtx.Provider, { value, children: /* @__PURE__ */ jsx18(
1831
+ return /* @__PURE__ */ jsx19(FieldCtx.Provider, { value, children: /* @__PURE__ */ jsx19(
1646
1832
  "div",
1647
1833
  {
1648
1834
  ref,
1649
1835
  id,
1650
1836
  className,
1651
- ...partAttrs14(fieldAnatomy.scope, fieldAnatomy.root, { state: stateAttr }),
1837
+ "data-aeon-interaction": regions.interaction,
1838
+ "data-aeon-validation": regions.validation,
1839
+ "data-aeon-submission": regions.submission,
1840
+ ...partAttrs15(fieldAnatomy.scope, fieldAnatomy.root, { state: face }),
1652
1841
  children
1653
1842
  }
1654
1843
  ) });
1655
1844
  });
1656
- var Label5 = forwardRef16(function FieldLabel(props, ref) {
1657
- return /* @__PURE__ */ jsx18("label", { ref, ...partOnlyAttrs9(fieldAnatomy.label), ...props });
1845
+ var Label5 = forwardRef18(function FieldLabel(props, ref) {
1846
+ return /* @__PURE__ */ jsx19("label", { ref, ...partOnlyAttrs9(fieldAnatomy.label), ...props });
1658
1847
  });
1659
- var Control3 = forwardRef16(function FieldControl({ validate, onChange, onBlur, ...rest }, ref) {
1848
+ var Control3 = forwardRef18(function FieldControl({ validate, onChange, onBlur, ...rest }, ref) {
1660
1849
  const { send, invalid } = useFieldContext();
1661
- return /* @__PURE__ */ jsx18(
1850
+ return /* @__PURE__ */ jsx19(
1662
1851
  "input",
1663
1852
  {
1664
1853
  ref,
@@ -1682,9 +1871,9 @@ var Control3 = forwardRef16(function FieldControl({ validate, onChange, onBlur,
1682
1871
  }
1683
1872
  );
1684
1873
  });
1685
- var Textarea = forwardRef16(function FieldTextarea({ validate, onChange, onBlur, ...rest }, ref) {
1874
+ var Textarea = forwardRef18(function FieldTextarea({ validate, onChange, onBlur, ...rest }, ref) {
1686
1875
  const { send, invalid } = useFieldContext();
1687
- return /* @__PURE__ */ jsx18(
1876
+ return /* @__PURE__ */ jsx19(
1688
1877
  "textarea",
1689
1878
  {
1690
1879
  ref,
@@ -1708,34 +1897,35 @@ var Textarea = forwardRef16(function FieldTextarea({ validate, onChange, onBlur,
1708
1897
  }
1709
1898
  );
1710
1899
  });
1711
- var Message = forwardRef16(
1712
- function FieldMessage(props, ref) {
1900
+ var Message = forwardRef18(
1901
+ function FieldMessage({ children, ...props }, ref) {
1713
1902
  const { invalid } = useFieldContext();
1714
1903
  if (!invalid) return null;
1715
- return /* @__PURE__ */ jsx18(
1904
+ return /* @__PURE__ */ jsx19(
1716
1905
  "p",
1717
1906
  {
1718
1907
  ref,
1719
1908
  role: "alert",
1720
1909
  ...partOnlyAttrs9(fieldAnatomy.message, { state: "invalid" }),
1721
- ...props
1910
+ ...props,
1911
+ children: children ?? "Check this field."
1722
1912
  }
1723
1913
  );
1724
1914
  }
1725
1915
  );
1726
- var Hint = forwardRef16(
1916
+ var Hint = forwardRef18(
1727
1917
  function FieldHint(props, ref) {
1728
- return /* @__PURE__ */ jsx18("p", { ref, ...partOnlyAttrs9(fieldAnatomy.hint), ...props });
1918
+ return /* @__PURE__ */ jsx19("p", { ref, ...partOnlyAttrs9(fieldAnatomy.hint), ...props });
1729
1919
  }
1730
1920
  );
1731
- var Field = { Root: Root12, Label: Label5, Control: Control3, Textarea, Message, Hint };
1921
+ var Field = { Root: Root14, Label: Label5, Control: Control3, Input: Control3, Textarea, Message, Hint };
1732
1922
 
1733
1923
  // src/scroll/index.tsx
1734
- import { scrollAnatomy, partAttrs as partAttrs15, partOnlyAttrs as partOnlyAttrs10 } from "@aeon-ui/core";
1924
+ import { scrollAnatomy, partAttrs as partAttrs16, partOnlyAttrs as partOnlyAttrs10 } from "@aeon-ui/core";
1735
1925
  import {
1736
- createContext as createContext12,
1737
- forwardRef as forwardRef17,
1738
- useContext as useContext12,
1926
+ createContext as createContext13,
1927
+ forwardRef as forwardRef19,
1928
+ useContext as useContext13,
1739
1929
  useMemo as useMemo13,
1740
1930
  useRef as useRef4
1741
1931
  } from "react";
@@ -1766,35 +1956,35 @@ function useScrollState(ref) {
1766
1956
  }
1767
1957
 
1768
1958
  // src/scroll/index.tsx
1769
- import { jsx as jsx19 } from "react/jsx-runtime";
1770
- var ScrollCtx = createContext12(null);
1959
+ import { jsx as jsx20 } from "react/jsx-runtime";
1960
+ var ScrollCtx = createContext13(null);
1771
1961
  function useScrollContext() {
1772
- const ctx = useContext12(ScrollCtx);
1962
+ const ctx = useContext13(ScrollCtx);
1773
1963
  if (!ctx) throw new Error("Scroll parts must be used within <Scroll.Root>");
1774
1964
  return ctx;
1775
1965
  }
1776
- var Root13 = forwardRef17(function ScrollRoot({ children, className, ...rest }, ref) {
1966
+ var Root15 = forwardRef19(function ScrollRoot({ children, className, ...rest }, ref) {
1777
1967
  const viewportRef = useRef4(null);
1778
1968
  const stateAttr = useScrollState(viewportRef);
1779
1969
  const value = useMemo13(() => ({ stateAttr }), [stateAttr]);
1780
- return /* @__PURE__ */ jsx19(ScrollCtx.Provider, { value, children: /* @__PURE__ */ jsx19(
1970
+ return /* @__PURE__ */ jsx20(ScrollCtx.Provider, { value, children: /* @__PURE__ */ jsx20(
1781
1971
  "div",
1782
1972
  {
1783
1973
  ref,
1784
1974
  className,
1785
- ...partAttrs15(scrollAnatomy.scope, scrollAnatomy.root),
1975
+ ...partAttrs16(scrollAnatomy.scope, scrollAnatomy.root),
1786
1976
  ...rest,
1787
- children: /* @__PURE__ */ jsx19(ScrollViewportRefContext.Provider, { value: viewportRef, children })
1977
+ children: /* @__PURE__ */ jsx20(ScrollViewportRefContext.Provider, { value: viewportRef, children })
1788
1978
  }
1789
1979
  ) });
1790
1980
  });
1791
- var ScrollViewportRefContext = createContext12(
1981
+ var ScrollViewportRefContext = createContext13(
1792
1982
  null
1793
1983
  );
1794
- var Viewport = forwardRef17(function ScrollViewport({ children, className, ...rest }, forwardedRef) {
1795
- const ctxRef = useContext12(ScrollViewportRefContext);
1984
+ var Viewport = forwardRef19(function ScrollViewport({ children, className, ...rest }, forwardedRef) {
1985
+ const ctxRef = useContext13(ScrollViewportRefContext);
1796
1986
  const { stateAttr } = useScrollContext();
1797
- return /* @__PURE__ */ jsx19(
1987
+ return /* @__PURE__ */ jsx20(
1798
1988
  "div",
1799
1989
  {
1800
1990
  ref: (node) => {
@@ -1804,29 +1994,29 @@ var Viewport = forwardRef17(function ScrollViewport({ children, className, ...re
1804
1994
  },
1805
1995
  className,
1806
1996
  "data-aeon-scroll": "",
1807
- ...partAttrs15(scrollAnatomy.scope, scrollAnatomy.viewport, { state: stateAttr }),
1997
+ ...partAttrs16(scrollAnatomy.scope, scrollAnatomy.viewport, { state: stateAttr }),
1808
1998
  ...rest,
1809
1999
  children
1810
2000
  }
1811
2001
  );
1812
2002
  });
1813
- var Content3 = forwardRef17(function ScrollContent(props, ref) {
1814
- return /* @__PURE__ */ jsx19("div", { ref, ...partOnlyAttrs10(scrollAnatomy.content), ...props });
2003
+ var Content3 = forwardRef19(function ScrollContent(props, ref) {
2004
+ return /* @__PURE__ */ jsx20("div", { ref, ...partOnlyAttrs10(scrollAnatomy.content), ...props });
1815
2005
  });
1816
2006
  var Scroll = {
1817
- Root: Root13,
2007
+ Root: Root15,
1818
2008
  Viewport,
1819
2009
  Content: Content3
1820
2010
  };
1821
2011
 
1822
2012
  // src/select/index.tsx
1823
- import { selectAnatomy, partAttrs as partAttrs17, partOnlyAttrs as partOnlyAttrs11 } from "@aeon-ui/core";
2013
+ import { selectAnatomy, partAttrs as partAttrs18, partOnlyAttrs as partOnlyAttrs11 } from "@aeon-ui/core";
1824
2014
  import { popoverMachine } from "@aeon-ui/primitives";
1825
2015
  import {
1826
- createContext as createContext13,
1827
- forwardRef as forwardRef19,
1828
- useCallback as useCallback3,
1829
- useContext as useContext13,
2016
+ createContext as createContext14,
2017
+ forwardRef as forwardRef21,
2018
+ useCallback as useCallback4,
2019
+ useContext as useContext14,
1830
2020
  useId as useId2,
1831
2021
  useMemo as useMemo14,
1832
2022
  useRef as useRef5,
@@ -1834,8 +2024,8 @@ import {
1834
2024
  } from "react";
1835
2025
 
1836
2026
  // src/floating/FloatingPositioner.tsx
1837
- import { partAttrs as partAttrs16 } from "@aeon-ui/core";
1838
- import { forwardRef as forwardRef18 } from "react";
2027
+ import { partAttrs as partAttrs17 } from "@aeon-ui/core";
2028
+ import { forwardRef as forwardRef20 } from "react";
1839
2029
 
1840
2030
  // src/hooks/use-anchor-position.ts
1841
2031
  import { useEffect as useEffect12 } from "react";
@@ -1879,8 +2069,8 @@ function useAnchorPosition(anchorRef, floatingRef, active, placement = "bottom-s
1879
2069
  }
1880
2070
 
1881
2071
  // src/floating/FloatingPositioner.tsx
1882
- import { jsx as jsx20 } from "react/jsx-runtime";
1883
- var FloatingPositioner = forwardRef18(
2072
+ import { jsx as jsx21 } from "react/jsx-runtime";
2073
+ var FloatingPositioner = forwardRef20(
1884
2074
  function FloatingPositioner2({
1885
2075
  open,
1886
2076
  scope,
@@ -1899,7 +2089,7 @@ var FloatingPositioner = forwardRef18(
1899
2089
  matchWidth: matchAnchorWidth
1900
2090
  });
1901
2091
  if (!open) return null;
1902
- const node = /* @__PURE__ */ jsx20(
2092
+ const node = /* @__PURE__ */ jsx21(
1903
2093
  "div",
1904
2094
  {
1905
2095
  ref: (el) => {
@@ -1908,7 +2098,7 @@ var FloatingPositioner = forwardRef18(
1908
2098
  else if (ref) ref.current = el;
1909
2099
  },
1910
2100
  className,
1911
- ...mergeProps(partAttrs16(scope, part, { state: "open" }), rest),
2101
+ ...mergeProps(partAttrs17(scope, part, { state: "open" }), rest),
1912
2102
  children
1913
2103
  }
1914
2104
  );
@@ -1932,11 +2122,11 @@ function useOutsideClick(refs, enabled, onOutside) {
1932
2122
  }
1933
2123
 
1934
2124
  // src/select/index.tsx
1935
- import { jsx as jsx21, jsxs as jsxs3 } from "react/jsx-runtime";
1936
- var SelectCtx = createContext13(null);
1937
- var SelectPositionerCtx = createContext13(false);
2125
+ import { jsx as jsx22, jsxs as jsxs2 } from "react/jsx-runtime";
2126
+ var SelectCtx = createContext14(null);
2127
+ var SelectPositionerCtx = createContext14(false);
1938
2128
  function useSelectCtx() {
1939
- const ctx = useContext13(SelectCtx);
2129
+ const ctx = useContext14(SelectCtx);
1940
2130
  if (!ctx) throw new Error("Select parts must be used within <Select.Root>");
1941
2131
  return ctx;
1942
2132
  }
@@ -1945,7 +2135,7 @@ function optionValuesFromDom(listboxId, content) {
1945
2135
  const prefix = `${listboxId}-option-`;
1946
2136
  return Array.from(content.querySelectorAll('button[role="option"]:not(:disabled)')).map((el) => el.id.startsWith(prefix) ? el.id.slice(prefix.length) : "").filter(Boolean);
1947
2137
  }
1948
- var Root14 = forwardRef19(function SelectRoot({ value, onValueChange, children, className, disabled }, ref) {
2138
+ var Root16 = forwardRef21(function SelectRoot({ value, onValueChange, children, className, disabled }, ref) {
1949
2139
  const [snapshot, send] = useAeonMachine(popoverMachine, { input: { open: false } });
1950
2140
  const [highlightedValue, setHighlightedValue] = useState4(null);
1951
2141
  const triggerRef = useRef5(null);
@@ -1954,26 +2144,26 @@ var Root14 = forwardRef19(function SelectRoot({ value, onValueChange, children,
1954
2144
  const rootRef = useRef5(null);
1955
2145
  const listboxId = useId2();
1956
2146
  const open = disabled ? false : snapshot.matches("open");
1957
- const close = useCallback3(() => {
2147
+ const close = useCallback4(() => {
1958
2148
  send({ type: "CLOSE" });
1959
2149
  setHighlightedValue(null);
1960
2150
  }, [send]);
1961
2151
  useOutsideClick([rootRef, positionerRef], open, () => send({ type: "POINTER_DOWN_OUTSIDE" }));
1962
- const getOptionValues = useCallback3(
2152
+ const getOptionValues = useCallback4(
1963
2153
  () => optionValuesFromDom(listboxId, contentRef.current),
1964
2154
  [listboxId, open]
1965
2155
  );
1966
- const selectValue = useCallback3(
2156
+ const selectValue = useCallback4(
1967
2157
  (next) => {
1968
2158
  onValueChange?.(next);
1969
2159
  close();
1970
2160
  },
1971
2161
  [onValueChange, close]
1972
2162
  );
1973
- const highlightValue = useCallback3((next) => {
2163
+ const highlightValue = useCallback4((next) => {
1974
2164
  setHighlightedValue(next);
1975
2165
  }, []);
1976
- const moveHighlight = useCallback3(
2166
+ const moveHighlight = useCallback4(
1977
2167
  (delta) => {
1978
2168
  const options = getOptionValues();
1979
2169
  if (options.length === 0) {
@@ -1988,7 +2178,7 @@ var Root14 = forwardRef19(function SelectRoot({ value, onValueChange, children,
1988
2178
  },
1989
2179
  [getOptionValues, highlightedValue]
1990
2180
  );
1991
- const onListboxKeyDown = useCallback3(
2181
+ const onListboxKeyDown = useCallback4(
1992
2182
  (e) => {
1993
2183
  if (e.defaultPrevented) return;
1994
2184
  if ((e.key === "Enter" || e.key === " ") && !open) {
@@ -2060,7 +2250,7 @@ var Root14 = forwardRef19(function SelectRoot({ value, onValueChange, children,
2060
2250
  onListboxKeyDown
2061
2251
  ]
2062
2252
  );
2063
- return /* @__PURE__ */ jsx21(SelectCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx21(
2253
+ return /* @__PURE__ */ jsx22(SelectCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx22(
2064
2254
  "div",
2065
2255
  {
2066
2256
  ref: (node) => {
@@ -2069,19 +2259,19 @@ var Root14 = forwardRef19(function SelectRoot({ value, onValueChange, children,
2069
2259
  else if (ref) ref.current = node;
2070
2260
  },
2071
2261
  className,
2072
- ...partAttrs17(selectAnatomy.scope, selectAnatomy.root, {
2262
+ ...partAttrs18(selectAnatomy.scope, selectAnatomy.root, {
2073
2263
  state: open ? "open" : "closed"
2074
2264
  }),
2075
2265
  children
2076
2266
  }
2077
2267
  ) });
2078
2268
  });
2079
- var ValueText2 = forwardRef19(function SelectValueText(props, ref) {
2080
- return /* @__PURE__ */ jsx21("span", { ref, ...partOnlyAttrs11(selectAnatomy.value), ...props });
2269
+ var ValueText2 = forwardRef21(function SelectValueText(props, ref) {
2270
+ return /* @__PURE__ */ jsx22("span", { ref, ...partOnlyAttrs11(selectAnatomy.value), ...props });
2081
2271
  });
2082
- var Trigger3 = forwardRef19(function SelectTrigger({ children, onClick, onKeyDown, ...rest }, ref) {
2272
+ var Trigger3 = forwardRef21(function SelectTrigger({ children, onClick, onKeyDown, ...rest }, ref) {
2083
2273
  const { open, send, listboxId, triggerRef, onListboxKeyDown } = useSelectCtx();
2084
- return /* @__PURE__ */ jsxs3(
2274
+ return /* @__PURE__ */ jsxs2(
2085
2275
  "button",
2086
2276
  {
2087
2277
  ref: (node) => {
@@ -2093,7 +2283,7 @@ var Trigger3 = forwardRef19(function SelectTrigger({ children, onClick, onKeyDow
2093
2283
  "aria-haspopup": "listbox",
2094
2284
  "aria-expanded": open,
2095
2285
  "aria-controls": open ? listboxId : void 0,
2096
- ...partAttrs17(selectAnatomy.scope, selectAnatomy.trigger, { state: open ? "open" : "closed" }),
2286
+ ...partAttrs18(selectAnatomy.scope, selectAnatomy.trigger, { state: open ? "open" : "closed" }),
2097
2287
  ...mergeProps(rest, {
2098
2288
  onClick: (e) => {
2099
2289
  onClick?.(e);
@@ -2106,14 +2296,14 @@ var Trigger3 = forwardRef19(function SelectTrigger({ children, onClick, onKeyDow
2106
2296
  }),
2107
2297
  children: [
2108
2298
  children,
2109
- /* @__PURE__ */ jsx21("span", { ...partOnlyAttrs11(selectAnatomy.icon), "aria-hidden": true })
2299
+ /* @__PURE__ */ jsx22("span", { ...partOnlyAttrs11(selectAnatomy.icon), "aria-hidden": true })
2110
2300
  ]
2111
2301
  }
2112
2302
  );
2113
2303
  });
2114
- var Positioner2 = forwardRef19(function SelectPositioner({ portalled = true, children, className, ...rest }, ref) {
2304
+ var Positioner2 = forwardRef21(function SelectPositioner({ portalled = true, children, className, ...rest }, ref) {
2115
2305
  const { open, triggerRef, positionerRef } = useSelectCtx();
2116
- return /* @__PURE__ */ jsx21(SelectPositionerCtx.Provider, { value: true, children: /* @__PURE__ */ jsx21(
2306
+ return /* @__PURE__ */ jsx22(SelectPositionerCtx.Provider, { value: true, children: /* @__PURE__ */ jsx22(
2117
2307
  FloatingPositioner,
2118
2308
  {
2119
2309
  ref,
@@ -2130,12 +2320,12 @@ var Positioner2 = forwardRef19(function SelectPositioner({ portalled = true, chi
2130
2320
  }
2131
2321
  ) });
2132
2322
  });
2133
- var Content4 = forwardRef19(function SelectContent({ portalled = true, onKeyDown, children, className, ...rest }, ref) {
2134
- const inPositioner = useContext13(SelectPositionerCtx);
2323
+ var Content4 = forwardRef21(function SelectContent({ portalled = true, onKeyDown, children, className, ...rest }, ref) {
2324
+ const inPositioner = useContext14(SelectPositionerCtx);
2135
2325
  const { open, listboxId, contentRef, highlightedValue, onListboxKeyDown, triggerRef, positionerRef } = useSelectCtx();
2136
2326
  if (!open) return null;
2137
2327
  const activeId = highlightedValue && open ? `${listboxId}-option-${highlightedValue}` : void 0;
2138
- const listbox = /* @__PURE__ */ jsx21(
2328
+ const listbox = /* @__PURE__ */ jsx22(
2139
2329
  "div",
2140
2330
  {
2141
2331
  ref: (node) => {
@@ -2148,7 +2338,7 @@ var Content4 = forwardRef19(function SelectContent({ portalled = true, onKeyDown
2148
2338
  "aria-activedescendant": activeId,
2149
2339
  className,
2150
2340
  "data-aeon-scroll": "",
2151
- ...partAttrs17(selectAnatomy.scope, selectAnatomy.content, { state: "open" }),
2341
+ ...partAttrs18(selectAnatomy.scope, selectAnatomy.content, { state: "open" }),
2152
2342
  ...mergeProps(rest, {
2153
2343
  onKeyDown: (e) => {
2154
2344
  onKeyDown?.(e);
@@ -2159,7 +2349,7 @@ var Content4 = forwardRef19(function SelectContent({ portalled = true, onKeyDown
2159
2349
  }
2160
2350
  );
2161
2351
  if (inPositioner) return listbox;
2162
- return /* @__PURE__ */ jsx21(
2352
+ return /* @__PURE__ */ jsx22(
2163
2353
  FloatingPositioner,
2164
2354
  {
2165
2355
  open,
@@ -2173,11 +2363,11 @@ var Content4 = forwardRef19(function SelectContent({ portalled = true, onKeyDown
2173
2363
  }
2174
2364
  );
2175
2365
  });
2176
- var Item3 = forwardRef19(function SelectItem({ value, disabled = false, children, onClick, ...rest }, ref) {
2366
+ var Item3 = forwardRef21(function SelectItem({ value, disabled = false, children, onClick, ...rest }, ref) {
2177
2367
  const { value: selected, listboxId, highlightedValue, selectValue } = useSelectCtx();
2178
2368
  const selectedState = value === selected;
2179
2369
  const highlighted = value === highlightedValue;
2180
- return /* @__PURE__ */ jsx21(
2370
+ return /* @__PURE__ */ jsx22(
2181
2371
  "button",
2182
2372
  {
2183
2373
  ref,
@@ -2186,7 +2376,7 @@ var Item3 = forwardRef19(function SelectItem({ value, disabled = false, children
2186
2376
  id: `${listboxId}-option-${value}`,
2187
2377
  "aria-selected": selectedState,
2188
2378
  disabled,
2189
- ...partAttrs17(selectAnatomy.scope, selectAnatomy.item, {
2379
+ ...partAttrs18(selectAnatomy.scope, selectAnatomy.item, {
2190
2380
  state: selectedState ? "selected" : highlighted ? "highlighted" : "idle",
2191
2381
  highlighted
2192
2382
  }),
@@ -2201,7 +2391,7 @@ var Item3 = forwardRef19(function SelectItem({ value, disabled = false, children
2201
2391
  );
2202
2392
  });
2203
2393
  var Select = {
2204
- Root: Root14,
2394
+ Root: Root16,
2205
2395
  Trigger: Trigger3,
2206
2396
  ValueText: ValueText2,
2207
2397
  Positioner: Positioner2,
@@ -2210,22 +2400,22 @@ var Select = {
2210
2400
  };
2211
2401
 
2212
2402
  // src/combobox/index.tsx
2213
- import { comboboxAnatomy, partAttrs as partAttrs18, partOnlyAttrs as partOnlyAttrs12 } from "@aeon-ui/core";
2403
+ import { comboboxAnatomy, partAttrs as partAttrs19, partOnlyAttrs as partOnlyAttrs12 } from "@aeon-ui/core";
2214
2404
  import {
2215
- createContext as createContext14,
2216
- forwardRef as forwardRef20,
2217
- useCallback as useCallback4,
2218
- useContext as useContext14,
2405
+ createContext as createContext15,
2406
+ forwardRef as forwardRef22,
2407
+ useCallback as useCallback5,
2408
+ useContext as useContext15,
2219
2409
  useEffect as useEffect14,
2220
2410
  useId as useId3,
2221
2411
  useMemo as useMemo15,
2222
2412
  useRef as useRef6,
2223
2413
  useState as useState5
2224
2414
  } from "react";
2225
- import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs4 } from "react/jsx-runtime";
2226
- var ComboboxCtx = createContext14(null);
2415
+ import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs3 } from "react/jsx-runtime";
2416
+ var ComboboxCtx = createContext15(null);
2227
2417
  function useComboboxCtx() {
2228
- const ctx = useContext14(ComboboxCtx);
2418
+ const ctx = useContext15(ComboboxCtx);
2229
2419
  if (!ctx) throw new Error("Combobox parts must be used within <Combobox.Root>");
2230
2420
  return ctx;
2231
2421
  }
@@ -2239,14 +2429,14 @@ function matchesQuery(label, query) {
2239
2429
  if (!q) return true;
2240
2430
  return label.toLowerCase().includes(q);
2241
2431
  }
2242
- var Root15 = forwardRef20(function ComboboxRoot({ value, onValueChange, children, className, disabled }, ref) {
2432
+ var Root17 = forwardRef22(function ComboboxRoot({ value, onValueChange, children, className, disabled }, ref) {
2243
2433
  const [open, setOpenState] = useState5(false);
2244
2434
  const [query, setQuery] = useState5("");
2245
2435
  const [highlightedValue, setHighlightedValue] = useState5(null);
2246
2436
  const [itemsVersion, setItemsVersion] = useState5(0);
2247
2437
  const itemsRef = useRef6([]);
2248
2438
  const listboxId = useId3();
2249
- const setOpen = useCallback4(
2439
+ const setOpen = useCallback5(
2250
2440
  (next) => {
2251
2441
  if (disabled) return;
2252
2442
  setOpenState(next);
@@ -2257,15 +2447,15 @@ var Root15 = forwardRef20(function ComboboxRoot({ value, onValueChange, children
2257
2447
  },
2258
2448
  [disabled]
2259
2449
  );
2260
- const registerItem = useCallback4((item) => {
2450
+ const registerItem = useCallback5((item) => {
2261
2451
  itemsRef.current = [...itemsRef.current.filter((i) => i.value !== item.value), item];
2262
2452
  setItemsVersion((v) => v + 1);
2263
2453
  }, []);
2264
- const unregisterItem = useCallback4((valueKey) => {
2454
+ const unregisterItem = useCallback5((valueKey) => {
2265
2455
  itemsRef.current = itemsRef.current.filter((i) => i.value !== valueKey);
2266
2456
  setItemsVersion((v) => v + 1);
2267
2457
  }, []);
2268
- const getItems = useCallback4(() => itemsRef.current, []);
2458
+ const getItems = useCallback5(() => itemsRef.current, []);
2269
2459
  const ctx = useMemo15(
2270
2460
  () => ({
2271
2461
  value,
@@ -2297,12 +2487,12 @@ var Root15 = forwardRef20(function ComboboxRoot({ value, onValueChange, children
2297
2487
  disabled
2298
2488
  ]
2299
2489
  );
2300
- return /* @__PURE__ */ jsx22(ComboboxCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx22(
2490
+ return /* @__PURE__ */ jsx23(ComboboxCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx23(
2301
2491
  "div",
2302
2492
  {
2303
2493
  ref,
2304
2494
  className,
2305
- ...partAttrs18(comboboxAnatomy.scope, comboboxAnatomy.root, {
2495
+ ...partAttrs19(comboboxAnatomy.scope, comboboxAnatomy.root, {
2306
2496
  state: open ? "open" : "closed"
2307
2497
  }),
2308
2498
  children
@@ -2316,7 +2506,7 @@ function useVisibleItems() {
2316
2506
  return getItems().filter((i) => matchesQuery(i.label, query));
2317
2507
  }, [query, getItems, itemsVersion]);
2318
2508
  }
2319
- var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus, onClick, value: valueProp, ...rest }, ref) {
2509
+ var Input2 = forwardRef22(function ComboboxInput({ onChange, onKeyDown, onFocus, onClick, value: valueProp, ...rest }, ref) {
2320
2510
  const {
2321
2511
  value: selected,
2322
2512
  open,
@@ -2337,7 +2527,7 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2337
2527
  return getItems().find((i) => i.value === selected)?.label ?? "";
2338
2528
  }, [getItems, selected, itemsVersion]);
2339
2529
  const displayValue = open ? query : selectedLabel;
2340
- const selectValue = useCallback4(
2530
+ const selectValue = useCallback5(
2341
2531
  (next) => {
2342
2532
  onValueChange?.(next);
2343
2533
  setOpen(false);
@@ -2346,7 +2536,7 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2346
2536
  },
2347
2537
  [onValueChange, setOpen, setQuery, setHighlightedValue]
2348
2538
  );
2349
- const moveHighlight = useCallback4(
2539
+ const moveHighlight = useCallback5(
2350
2540
  (delta) => {
2351
2541
  if (visible.length === 0) {
2352
2542
  setHighlightedValue(null);
@@ -2360,7 +2550,7 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2360
2550
  },
2361
2551
  [visible, highlightedValue, setHighlightedValue]
2362
2552
  );
2363
- const setRefs = useCallback4(
2553
+ const setRefs = useCallback5(
2364
2554
  (node) => {
2365
2555
  inputRef.current = node;
2366
2556
  if (typeof ref === "function") ref(node);
@@ -2385,8 +2575,8 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2385
2575
  };
2386
2576
  }, [open, setOpen]);
2387
2577
  const activeDescendant = highlightedValue && open ? `${listboxId}-option-${highlightedValue}` : void 0;
2388
- return /* @__PURE__ */ jsxs4(Fragment2, { children: [
2389
- /* @__PURE__ */ jsx22(
2578
+ return /* @__PURE__ */ jsxs3(Fragment2, { children: [
2579
+ /* @__PURE__ */ jsx23(
2390
2580
  "input",
2391
2581
  {
2392
2582
  ref: setRefs,
@@ -2398,7 +2588,7 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2398
2588
  "aria-activedescendant": activeDescendant,
2399
2589
  autoComplete: "off",
2400
2590
  value: valueProp ?? displayValue,
2401
- ...partAttrs18(comboboxAnatomy.scope, comboboxAnatomy.input, { state: open ? "open" : "closed" }),
2591
+ ...partAttrs19(comboboxAnatomy.scope, comboboxAnatomy.input, { state: open ? "open" : "closed" }),
2402
2592
  ...mergeProps(rest, {
2403
2593
  onFocus: (e) => {
2404
2594
  onFocus?.(e);
@@ -2447,7 +2637,7 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2447
2637
  })
2448
2638
  }
2449
2639
  ),
2450
- /* @__PURE__ */ jsx22(
2640
+ /* @__PURE__ */ jsx23(
2451
2641
  "span",
2452
2642
  {
2453
2643
  ...partOnlyAttrs12(comboboxAnatomy.icon, { state: open ? "open" : "closed" }),
@@ -2457,10 +2647,10 @@ var Input2 = forwardRef20(function ComboboxInput({ onChange, onKeyDown, onFocus,
2457
2647
  )
2458
2648
  ] });
2459
2649
  });
2460
- var Content5 = forwardRef20(function ComboboxContent({ children, className, ...rest }, ref) {
2650
+ var Content5 = forwardRef22(function ComboboxContent({ children, className, ...rest }, ref) {
2461
2651
  const { open, listboxId } = useComboboxCtx();
2462
2652
  if (!open) return null;
2463
- return /* @__PURE__ */ jsx22(
2653
+ return /* @__PURE__ */ jsx23(
2464
2654
  "div",
2465
2655
  {
2466
2656
  ref,
@@ -2468,13 +2658,13 @@ var Content5 = forwardRef20(function ComboboxContent({ children, className, ...r
2468
2658
  role: "listbox",
2469
2659
  className,
2470
2660
  "data-aeon-scroll": "",
2471
- ...partAttrs18(comboboxAnatomy.scope, comboboxAnatomy.content),
2661
+ ...partAttrs19(comboboxAnatomy.scope, comboboxAnatomy.content),
2472
2662
  ...rest,
2473
2663
  children
2474
2664
  }
2475
2665
  );
2476
2666
  });
2477
- var Item4 = forwardRef20(function ComboboxItem({ value, textValue, children, onClick, ...rest }, ref) {
2667
+ var Item4 = forwardRef22(function ComboboxItem({ value, textValue, children, onClick, ...rest }, ref) {
2478
2668
  const {
2479
2669
  value: selected,
2480
2670
  query,
@@ -2495,7 +2685,7 @@ var Item4 = forwardRef20(function ComboboxItem({ value, textValue, children, onC
2495
2685
  if (!matchesQuery(label, query)) return null;
2496
2686
  const selectedState = value === selected;
2497
2687
  const highlighted = value === highlightedValue;
2498
- return /* @__PURE__ */ jsx22(
2688
+ return /* @__PURE__ */ jsx23(
2499
2689
  "button",
2500
2690
  {
2501
2691
  ref,
@@ -2504,7 +2694,7 @@ var Item4 = forwardRef20(function ComboboxItem({ value, textValue, children, onC
2504
2694
  id: resolvedOptionId,
2505
2695
  "aria-selected": selectedState,
2506
2696
  "data-highlighted": highlighted ? "" : void 0,
2507
- ...partAttrs18(comboboxAnatomy.scope, comboboxAnatomy.item, {
2697
+ ...partAttrs19(comboboxAnatomy.scope, comboboxAnatomy.item, {
2508
2698
  state: selectedState ? "selected" : "idle",
2509
2699
  highlighted
2510
2700
  }),
@@ -2522,23 +2712,23 @@ var Item4 = forwardRef20(function ComboboxItem({ value, textValue, children, onC
2522
2712
  }
2523
2713
  );
2524
2714
  });
2525
- var Empty = forwardRef20(function ComboboxEmpty({ children, className, ...rest }, ref) {
2715
+ var Empty = forwardRef22(function ComboboxEmpty({ children, className, ...rest }, ref) {
2526
2716
  const { open, query } = useComboboxCtx();
2527
2717
  const visible = useVisibleItems();
2528
2718
  if (!open || !query.trim() || visible.length > 0) return null;
2529
- return /* @__PURE__ */ jsx22(
2719
+ return /* @__PURE__ */ jsx23(
2530
2720
  "div",
2531
2721
  {
2532
2722
  ref,
2533
2723
  className,
2534
- ...partAttrs18(comboboxAnatomy.scope, comboboxAnatomy.empty),
2724
+ ...partAttrs19(comboboxAnatomy.scope, comboboxAnatomy.empty),
2535
2725
  ...rest,
2536
2726
  children: children ?? "No results"
2537
2727
  }
2538
2728
  );
2539
2729
  });
2540
2730
  var Combobox = {
2541
- Root: Root15,
2731
+ Root: Root17,
2542
2732
  Input: Input2,
2543
2733
  Content: Content5,
2544
2734
  Item: Item4,
@@ -2546,26 +2736,26 @@ var Combobox = {
2546
2736
  };
2547
2737
 
2548
2738
  // src/popover/index.tsx
2549
- import { popoverAnatomy, partAttrs as partAttrs19 } from "@aeon-ui/core";
2739
+ import { popoverAnatomy, partAttrs as partAttrs20 } from "@aeon-ui/core";
2550
2740
  import { popoverMachine as popoverMachine2 } from "@aeon-ui/primitives";
2551
2741
  import {
2552
- createContext as createContext15,
2553
- forwardRef as forwardRef21,
2554
- useCallback as useCallback5,
2555
- useContext as useContext15,
2742
+ createContext as createContext16,
2743
+ forwardRef as forwardRef23,
2744
+ useCallback as useCallback6,
2745
+ useContext as useContext16,
2556
2746
  useEffect as useEffect15,
2557
2747
  useId as useId4,
2558
2748
  useMemo as useMemo16,
2559
2749
  useRef as useRef7
2560
2750
  } from "react";
2561
- import { jsx as jsx23 } from "react/jsx-runtime";
2562
- var PopoverCtx = createContext15(null);
2751
+ import { jsx as jsx24 } from "react/jsx-runtime";
2752
+ var PopoverCtx = createContext16(null);
2563
2753
  function usePopoverCtx() {
2564
- const ctx = useContext15(PopoverCtx);
2754
+ const ctx = useContext16(PopoverCtx);
2565
2755
  if (!ctx) throw new Error("Popover parts must be used within Popover.Root");
2566
2756
  return ctx;
2567
2757
  }
2568
- var Root16 = forwardRef21(function PopoverRoot({ open, defaultOpen = false, onOpenChange, children, className, ...rest }, ref) {
2758
+ var Root18 = forwardRef23(function PopoverRoot({ open, defaultOpen = false, onOpenChange, children, className, ...rest }, ref) {
2569
2759
  const [snapshot, send] = useAeonMachine(popoverMachine2, {
2570
2760
  input: { open: defaultOpen }
2571
2761
  });
@@ -2581,13 +2771,13 @@ var Root16 = forwardRef21(function PopoverRoot({ open, defaultOpen = false, onOp
2581
2771
  useEffect15(() => {
2582
2772
  if (open !== void 0) send({ type: "SET_OPEN", open });
2583
2773
  }, [open, send]);
2584
- const close = useCallback5(() => send({ type: "CLOSE" }), [send]);
2774
+ const close = useCallback6(() => send({ type: "CLOSE" }), [send]);
2585
2775
  useOutsideClick([rootRef, positionerRef], resolvedOpen, close);
2586
2776
  const value = useMemo16(
2587
2777
  () => ({ open: resolvedOpen, send, triggerId, contentId, triggerRef, positionerRef }),
2588
2778
  [resolvedOpen, send, triggerId, contentId]
2589
2779
  );
2590
- return /* @__PURE__ */ jsx23(PopoverCtx.Provider, { value, children: /* @__PURE__ */ jsx23(
2780
+ return /* @__PURE__ */ jsx24(PopoverCtx.Provider, { value, children: /* @__PURE__ */ jsx24(
2591
2781
  "div",
2592
2782
  {
2593
2783
  ref: (node) => {
@@ -2597,7 +2787,7 @@ var Root16 = forwardRef21(function PopoverRoot({ open, defaultOpen = false, onOp
2597
2787
  },
2598
2788
  className,
2599
2789
  ...mergeProps(
2600
- partAttrs19(popoverAnatomy.scope, popoverAnatomy.root, {
2790
+ partAttrs20(popoverAnatomy.scope, popoverAnatomy.root, {
2601
2791
  state: resolvedOpen ? "open" : "closed"
2602
2792
  }),
2603
2793
  rest
@@ -2606,9 +2796,9 @@ var Root16 = forwardRef21(function PopoverRoot({ open, defaultOpen = false, onOp
2606
2796
  }
2607
2797
  ) });
2608
2798
  });
2609
- var Trigger4 = forwardRef21(function PopoverTrigger({ onClick, ...rest }, ref) {
2799
+ var Trigger4 = forwardRef23(function PopoverTrigger({ onClick, ...rest }, ref) {
2610
2800
  const { open, send, triggerId, contentId, triggerRef } = usePopoverCtx();
2611
- return /* @__PURE__ */ jsx23(
2801
+ return /* @__PURE__ */ jsx24(
2612
2802
  "button",
2613
2803
  {
2614
2804
  ref: (node) => {
@@ -2621,7 +2811,7 @@ var Trigger4 = forwardRef21(function PopoverTrigger({ onClick, ...rest }, ref) {
2621
2811
  "aria-expanded": open,
2622
2812
  "aria-controls": open ? contentId : void 0,
2623
2813
  ...mergeProps(
2624
- partAttrs19(popoverAnatomy.scope, popoverAnatomy.trigger, { state: open ? "open" : "closed" }),
2814
+ partAttrs20(popoverAnatomy.scope, popoverAnatomy.trigger, { state: open ? "open" : "closed" }),
2625
2815
  {
2626
2816
  onClick: (e) => {
2627
2817
  onClick?.(e);
@@ -2633,9 +2823,9 @@ var Trigger4 = forwardRef21(function PopoverTrigger({ onClick, ...rest }, ref) {
2633
2823
  }
2634
2824
  );
2635
2825
  });
2636
- var Positioner3 = forwardRef21(function PopoverPositioner({ portalled = true, placement = "bottom-start", children, className, ...rest }, ref) {
2826
+ var Positioner3 = forwardRef23(function PopoverPositioner({ portalled = true, placement = "bottom-start", children, className, ...rest }, ref) {
2637
2827
  const { open, triggerRef, positionerRef } = usePopoverCtx();
2638
- return /* @__PURE__ */ jsx23(
2828
+ return /* @__PURE__ */ jsx24(
2639
2829
  FloatingPositioner,
2640
2830
  {
2641
2831
  ref,
@@ -2652,10 +2842,10 @@ var Positioner3 = forwardRef21(function PopoverPositioner({ portalled = true, pl
2652
2842
  }
2653
2843
  );
2654
2844
  });
2655
- var Content6 = forwardRef21(function PopoverContent({ onKeyDown, ...rest }, ref) {
2845
+ var Content6 = forwardRef23(function PopoverContent({ onKeyDown, ...rest }, ref) {
2656
2846
  const { open, send, triggerId, contentId } = usePopoverCtx();
2657
2847
  if (!open) return null;
2658
- return /* @__PURE__ */ jsx23(
2848
+ return /* @__PURE__ */ jsx24(
2659
2849
  "div",
2660
2850
  {
2661
2851
  ref,
@@ -2664,7 +2854,7 @@ var Content6 = forwardRef21(function PopoverContent({ onKeyDown, ...rest }, ref)
2664
2854
  "aria-modal": false,
2665
2855
  "aria-labelledby": triggerId,
2666
2856
  ...mergeProps(
2667
- partAttrs19(popoverAnatomy.scope, popoverAnatomy.content, { state: "open" }),
2857
+ partAttrs20(popoverAnatomy.scope, popoverAnatomy.content, { state: "open" }),
2668
2858
  {
2669
2859
  onKeyDown: (e) => {
2670
2860
  onKeyDown?.(e);
@@ -2676,22 +2866,22 @@ var Content6 = forwardRef21(function PopoverContent({ onKeyDown, ...rest }, ref)
2676
2866
  }
2677
2867
  );
2678
2868
  });
2679
- var Arrow = forwardRef21(function PopoverArrow(props, ref) {
2869
+ var Arrow = forwardRef23(function PopoverArrow(props, ref) {
2680
2870
  const { open } = usePopoverCtx();
2681
2871
  if (!open) return null;
2682
- return /* @__PURE__ */ jsx23("div", { ref, ...mergeProps(partAttrs19(popoverAnatomy.scope, popoverAnatomy.arrow), props) });
2872
+ return /* @__PURE__ */ jsx24("div", { ref, ...mergeProps(partAttrs20(popoverAnatomy.scope, popoverAnatomy.arrow), props) });
2683
2873
  });
2684
- var CloseTrigger2 = forwardRef21(
2874
+ var CloseTrigger2 = forwardRef23(
2685
2875
  function PopoverCloseTrigger({ onClick, ...rest }, ref) {
2686
2876
  const { send } = usePopoverCtx();
2687
- return /* @__PURE__ */ jsx23(
2877
+ return /* @__PURE__ */ jsx24(
2688
2878
  "button",
2689
2879
  {
2690
2880
  ref,
2691
2881
  type: "button",
2692
2882
  "aria-label": "Close",
2693
2883
  ...mergeProps(
2694
- partAttrs19(popoverAnatomy.scope, popoverAnatomy.closeTrigger),
2884
+ partAttrs20(popoverAnatomy.scope, popoverAnatomy.closeTrigger),
2695
2885
  {
2696
2886
  onClick: (e) => {
2697
2887
  onClick?.(e);
@@ -2704,29 +2894,29 @@ var CloseTrigger2 = forwardRef21(
2704
2894
  );
2705
2895
  }
2706
2896
  );
2707
- var Popover = { Root: Root16, Trigger: Trigger4, Positioner: Positioner3, Content: Content6, Arrow, CloseTrigger: CloseTrigger2 };
2897
+ var Popover = { Root: Root18, Trigger: Trigger4, Positioner: Positioner3, Content: Content6, Arrow, CloseTrigger: CloseTrigger2 };
2708
2898
 
2709
2899
  // src/menu/index.tsx
2710
- import { menuAnatomy, partAttrs as partAttrs20 } from "@aeon-ui/core";
2900
+ import { menuAnatomy, partAttrs as partAttrs21 } from "@aeon-ui/core";
2711
2901
  import { popoverMachine as popoverMachine3 } from "@aeon-ui/primitives";
2712
2902
  import {
2713
- createContext as createContext16,
2714
- forwardRef as forwardRef22,
2715
- useCallback as useCallback6,
2716
- useContext as useContext16,
2903
+ createContext as createContext17,
2904
+ forwardRef as forwardRef24,
2905
+ useCallback as useCallback7,
2906
+ useContext as useContext17,
2717
2907
  useEffect as useEffect16,
2718
2908
  useId as useId5,
2719
2909
  useMemo as useMemo17,
2720
2910
  useRef as useRef8
2721
2911
  } from "react";
2722
- import { jsx as jsx24 } from "react/jsx-runtime";
2723
- var MenuCtx = createContext16(null);
2912
+ import { jsx as jsx25 } from "react/jsx-runtime";
2913
+ var MenuCtx = createContext17(null);
2724
2914
  function useMenuCtx() {
2725
- const ctx = useContext16(MenuCtx);
2915
+ const ctx = useContext17(MenuCtx);
2726
2916
  if (!ctx) throw new Error("Menu parts must be used within Menu.Root");
2727
2917
  return ctx;
2728
2918
  }
2729
- var Root17 = forwardRef22(function MenuRoot({ open, defaultOpen = false, onOpenChange, children, className, ...rest }, ref) {
2919
+ var Root19 = forwardRef24(function MenuRoot({ open, defaultOpen = false, onOpenChange, children, className, ...rest }, ref) {
2730
2920
  const [snapshot, send] = useAeonMachine(popoverMachine3, { input: { open: defaultOpen } });
2731
2921
  const resolvedOpen = open ?? snapshot.context.open;
2732
2922
  const rootRef = useRef8(null);
@@ -2740,13 +2930,13 @@ var Root17 = forwardRef22(function MenuRoot({ open, defaultOpen = false, onOpenC
2740
2930
  useEffect16(() => {
2741
2931
  if (open !== void 0) send({ type: "SET_OPEN", open });
2742
2932
  }, [open, send]);
2743
- const close = useCallback6(() => send({ type: "CLOSE" }), [send]);
2933
+ const close = useCallback7(() => send({ type: "CLOSE" }), [send]);
2744
2934
  useOutsideClick([rootRef, positionerRef], resolvedOpen, close);
2745
2935
  const value = useMemo17(
2746
2936
  () => ({ open: resolvedOpen, send, triggerId, menuId, triggerRef, positionerRef }),
2747
2937
  [resolvedOpen, send, triggerId, menuId]
2748
2938
  );
2749
- return /* @__PURE__ */ jsx24(MenuCtx.Provider, { value, children: /* @__PURE__ */ jsx24(
2939
+ return /* @__PURE__ */ jsx25(MenuCtx.Provider, { value, children: /* @__PURE__ */ jsx25(
2750
2940
  "div",
2751
2941
  {
2752
2942
  ref: (node) => {
@@ -2756,16 +2946,16 @@ var Root17 = forwardRef22(function MenuRoot({ open, defaultOpen = false, onOpenC
2756
2946
  },
2757
2947
  className,
2758
2948
  ...mergeProps(
2759
- partAttrs20(menuAnatomy.scope, menuAnatomy.root, { state: resolvedOpen ? "open" : "closed" }),
2949
+ partAttrs21(menuAnatomy.scope, menuAnatomy.root, { state: resolvedOpen ? "open" : "closed" }),
2760
2950
  rest
2761
2951
  ),
2762
2952
  children
2763
2953
  }
2764
2954
  ) });
2765
2955
  });
2766
- var Trigger5 = forwardRef22(function MenuTrigger({ onClick, ...rest }, ref) {
2956
+ var Trigger5 = forwardRef24(function MenuTrigger({ onClick, ...rest }, ref) {
2767
2957
  const { open, send, triggerId, menuId, triggerRef } = useMenuCtx();
2768
- return /* @__PURE__ */ jsx24(
2958
+ return /* @__PURE__ */ jsx25(
2769
2959
  "button",
2770
2960
  {
2771
2961
  ref: (node) => {
@@ -2779,7 +2969,7 @@ var Trigger5 = forwardRef22(function MenuTrigger({ onClick, ...rest }, ref) {
2779
2969
  "aria-expanded": open,
2780
2970
  "aria-controls": open ? menuId : void 0,
2781
2971
  ...mergeProps(
2782
- partAttrs20(menuAnatomy.scope, menuAnatomy.trigger, { state: open ? "open" : "closed" }),
2972
+ partAttrs21(menuAnatomy.scope, menuAnatomy.trigger, { state: open ? "open" : "closed" }),
2783
2973
  {
2784
2974
  onClick: (e) => {
2785
2975
  onClick?.(e);
@@ -2791,9 +2981,9 @@ var Trigger5 = forwardRef22(function MenuTrigger({ onClick, ...rest }, ref) {
2791
2981
  }
2792
2982
  );
2793
2983
  });
2794
- var Positioner4 = forwardRef22(function MenuPositioner({ portalled = true, placement = "bottom-start", children, className, ...rest }, ref) {
2984
+ var Positioner4 = forwardRef24(function MenuPositioner({ portalled = true, placement = "bottom-start", children, className, ...rest }, ref) {
2795
2985
  const { open, triggerRef, positionerRef } = useMenuCtx();
2796
- return /* @__PURE__ */ jsx24(
2986
+ return /* @__PURE__ */ jsx25(
2797
2987
  FloatingPositioner,
2798
2988
  {
2799
2989
  ref,
@@ -2810,17 +3000,17 @@ var Positioner4 = forwardRef22(function MenuPositioner({ portalled = true, place
2810
3000
  }
2811
3001
  );
2812
3002
  });
2813
- var Content7 = forwardRef22(function MenuContent({ onKeyDown, ...rest }, ref) {
3003
+ var Content7 = forwardRef24(function MenuContent({ onKeyDown, ...rest }, ref) {
2814
3004
  const { open, send, menuId } = useMenuCtx();
2815
3005
  if (!open) return null;
2816
- return /* @__PURE__ */ jsx24(
3006
+ return /* @__PURE__ */ jsx25(
2817
3007
  "div",
2818
3008
  {
2819
3009
  ref,
2820
3010
  id: menuId,
2821
3011
  role: "menu",
2822
3012
  ...mergeProps(
2823
- partAttrs20(menuAnatomy.scope, menuAnatomy.content, { state: "open" }),
3013
+ partAttrs21(menuAnatomy.scope, menuAnatomy.content, { state: "open" }),
2824
3014
  {
2825
3015
  onKeyDown: (e) => {
2826
3016
  onKeyDown?.(e);
@@ -2832,16 +3022,16 @@ var Content7 = forwardRef22(function MenuContent({ onKeyDown, ...rest }, ref) {
2832
3022
  }
2833
3023
  );
2834
3024
  });
2835
- var Item5 = forwardRef22(function MenuItem({ closeOnSelect = true, onClick, ...rest }, ref) {
3025
+ var Item5 = forwardRef24(function MenuItem({ closeOnSelect = true, onClick, ...rest }, ref) {
2836
3026
  const { send } = useMenuCtx();
2837
- return /* @__PURE__ */ jsx24(
3027
+ return /* @__PURE__ */ jsx25(
2838
3028
  "button",
2839
3029
  {
2840
3030
  ref,
2841
3031
  type: "button",
2842
3032
  role: "menuitem",
2843
3033
  ...mergeProps(
2844
- partAttrs20(menuAnatomy.scope, menuAnatomy.item),
3034
+ partAttrs21(menuAnatomy.scope, menuAnatomy.item),
2845
3035
  {
2846
3036
  onClick: (e) => {
2847
3037
  onClick?.(e);
@@ -2853,17 +3043,17 @@ var Item5 = forwardRef22(function MenuItem({ closeOnSelect = true, onClick, ...r
2853
3043
  }
2854
3044
  );
2855
3045
  });
2856
- var Separator2 = forwardRef22(function MenuSeparator(props, ref) {
2857
- return /* @__PURE__ */ jsx24("div", { ref, role: "separator", ...mergeProps(partAttrs20(menuAnatomy.scope, menuAnatomy.separator), props) });
3046
+ var Separator2 = forwardRef24(function MenuSeparator(props, ref) {
3047
+ return /* @__PURE__ */ jsx25("div", { ref, role: "separator", ...mergeProps(partAttrs21(menuAnatomy.scope, menuAnatomy.separator), props) });
2858
3048
  });
2859
- var Menu = { Root: Root17, Trigger: Trigger5, Positioner: Positioner4, Content: Content7, Item: Item5, Separator: Separator2 };
3049
+ var Menu = { Root: Root19, Trigger: Trigger5, Positioner: Positioner4, Content: Content7, Item: Item5, Separator: Separator2 };
2860
3050
 
2861
3051
  // src/tooltip/index.tsx
2862
- import { tooltipAnatomy, partAttrs as partAttrs21 } from "@aeon-ui/core";
3052
+ import { tooltipAnatomy, partAttrs as partAttrs22 } from "@aeon-ui/core";
2863
3053
  import {
2864
- createContext as createContext17,
2865
- forwardRef as forwardRef23,
2866
- useContext as useContext17,
3054
+ createContext as createContext18,
3055
+ forwardRef as forwardRef25,
3056
+ useContext as useContext18,
2867
3057
  useEffect as useEffect18,
2868
3058
  useId as useId6,
2869
3059
  useMemo as useMemo18,
@@ -2886,14 +3076,14 @@ function usePrefersHover() {
2886
3076
  }
2887
3077
 
2888
3078
  // src/tooltip/index.tsx
2889
- import { jsx as jsx25 } from "react/jsx-runtime";
2890
- var TooltipCtx = createContext17(null);
3079
+ import { jsx as jsx26 } from "react/jsx-runtime";
3080
+ var TooltipCtx = createContext18(null);
2891
3081
  function useTooltipCtx() {
2892
- const ctx = useContext17(TooltipCtx);
3082
+ const ctx = useContext18(TooltipCtx);
2893
3083
  if (!ctx) throw new Error("Tooltip parts must be used within Tooltip.Root");
2894
3084
  return ctx;
2895
3085
  }
2896
- var Root18 = forwardRef23(function TooltipRoot({
3086
+ var Root20 = forwardRef25(function TooltipRoot({
2897
3087
  open,
2898
3088
  defaultOpen = false,
2899
3089
  onOpenChange,
@@ -2982,13 +3172,13 @@ var Root18 = forwardRef23(function TooltipRoot({
2982
3172
  }),
2983
3173
  [resolvedOpen, triggerId, contentId, openDelay, closeDelay, touchDurationMs, touchOutsideGraceMs, showOnFocus, prefersHover]
2984
3174
  );
2985
- return /* @__PURE__ */ jsx25(TooltipCtx.Provider, { value, children: /* @__PURE__ */ jsx25(
3175
+ return /* @__PURE__ */ jsx26(TooltipCtx.Provider, { value, children: /* @__PURE__ */ jsx26(
2986
3176
  "div",
2987
3177
  {
2988
3178
  ref,
2989
3179
  className,
2990
3180
  ...mergeProps(
2991
- partAttrs21(tooltipAnatomy.scope, tooltipAnatomy.root, {
3181
+ partAttrs22(tooltipAnatomy.scope, tooltipAnatomy.root, {
2992
3182
  state: resolvedOpen ? "open" : "closed"
2993
3183
  }),
2994
3184
  rest
@@ -2997,7 +3187,7 @@ var Root18 = forwardRef23(function TooltipRoot({
2997
3187
  }
2998
3188
  ) });
2999
3189
  });
3000
- var Trigger6 = forwardRef23(function TooltipTrigger({ onClick, onMouseEnter, onMouseLeave, onFocus, onBlur, onPointerDown, ...rest }, ref) {
3190
+ var Trigger6 = forwardRef25(function TooltipTrigger({ onClick, onMouseEnter, onMouseLeave, onFocus, onBlur, onPointerDown, ...rest }, ref) {
3001
3191
  const {
3002
3192
  open,
3003
3193
  triggerId,
@@ -3010,7 +3200,7 @@ var Trigger6 = forwardRef23(function TooltipTrigger({ onClick, onMouseEnter, onM
3010
3200
  showOnFocus,
3011
3201
  prefersHover
3012
3202
  } = useTooltipCtx();
3013
- return /* @__PURE__ */ jsx25(
3203
+ return /* @__PURE__ */ jsx26(
3014
3204
  "span",
3015
3205
  {
3016
3206
  ref: (node) => {
@@ -3022,7 +3212,7 @@ var Trigger6 = forwardRef23(function TooltipTrigger({ onClick, onMouseEnter, onM
3022
3212
  tabIndex: 0,
3023
3213
  "aria-describedby": open ? contentId : void 0,
3024
3214
  ...mergeProps(
3025
- partAttrs21(tooltipAnatomy.scope, tooltipAnatomy.trigger, { state: open ? "open" : "closed" }),
3215
+ partAttrs22(tooltipAnatomy.scope, tooltipAnatomy.trigger, { state: open ? "open" : "closed" }),
3026
3216
  {
3027
3217
  onMouseEnter: (e) => {
3028
3218
  onMouseEnter?.(e);
@@ -3054,9 +3244,9 @@ var Trigger6 = forwardRef23(function TooltipTrigger({ onClick, onMouseEnter, onM
3054
3244
  }
3055
3245
  );
3056
3246
  });
3057
- var Positioner5 = forwardRef23(function TooltipPositioner({ portalled = true, placement = "top-start", children, className, ...rest }, ref) {
3247
+ var Positioner5 = forwardRef25(function TooltipPositioner({ portalled = true, placement = "top-start", children, className, ...rest }, ref) {
3058
3248
  const { open, triggerRef, positionerRef } = useTooltipCtx();
3059
- return /* @__PURE__ */ jsx25(
3249
+ return /* @__PURE__ */ jsx26(
3060
3250
  FloatingPositioner,
3061
3251
  {
3062
3252
  ref,
@@ -3073,46 +3263,46 @@ var Positioner5 = forwardRef23(function TooltipPositioner({ portalled = true, pl
3073
3263
  }
3074
3264
  );
3075
3265
  });
3076
- var Content8 = forwardRef23(function TooltipContent(props, ref) {
3266
+ var Content8 = forwardRef25(function TooltipContent(props, ref) {
3077
3267
  const { open, contentId } = useTooltipCtx();
3078
3268
  if (!open) return null;
3079
- return /* @__PURE__ */ jsx25(
3269
+ return /* @__PURE__ */ jsx26(
3080
3270
  "div",
3081
3271
  {
3082
3272
  ref,
3083
3273
  id: contentId,
3084
3274
  role: "tooltip",
3085
- ...mergeProps(partAttrs21(tooltipAnatomy.scope, tooltipAnatomy.content, { state: "open" }), props)
3275
+ ...mergeProps(partAttrs22(tooltipAnatomy.scope, tooltipAnatomy.content, { state: "open" }), props)
3086
3276
  }
3087
3277
  );
3088
3278
  });
3089
- var Arrow2 = forwardRef23(function TooltipArrow(props, ref) {
3279
+ var Arrow2 = forwardRef25(function TooltipArrow(props, ref) {
3090
3280
  const { open } = useTooltipCtx();
3091
3281
  if (!open) return null;
3092
- return /* @__PURE__ */ jsx25("div", { ref, ...mergeProps(partAttrs21(tooltipAnatomy.scope, tooltipAnatomy.arrow), props) });
3282
+ return /* @__PURE__ */ jsx26("div", { ref, ...mergeProps(partAttrs22(tooltipAnatomy.scope, tooltipAnatomy.arrow), props) });
3093
3283
  });
3094
- var Tooltip = { Root: Root18, Trigger: Trigger6, Positioner: Positioner5, Content: Content8, Arrow: Arrow2 };
3284
+ var Tooltip = { Root: Root20, Trigger: Trigger6, Positioner: Positioner5, Content: Content8, Arrow: Arrow2 };
3095
3285
 
3096
3286
  // src/toast/primitives.tsx
3097
- import { toastAnatomy, partAttrs as partAttrs22 } from "@aeon-ui/core";
3287
+ import { toastAnatomy, partAttrs as partAttrs23 } from "@aeon-ui/core";
3098
3288
  import { toastMachine } from "@aeon-ui/primitives";
3099
3289
  import {
3100
- createContext as createContext18,
3101
- forwardRef as forwardRef24,
3102
- useContext as useContext18,
3290
+ createContext as createContext19,
3291
+ forwardRef as forwardRef26,
3292
+ useContext as useContext19,
3103
3293
  useEffect as useEffect19,
3104
3294
  useId as useId7,
3105
3295
  useMemo as useMemo19,
3106
3296
  useRef as useRef10
3107
3297
  } from "react";
3108
- import { jsx as jsx26 } from "react/jsx-runtime";
3109
- var ToastCtx = createContext18(null);
3298
+ import { jsx as jsx27 } from "react/jsx-runtime";
3299
+ var ToastCtx = createContext19(null);
3110
3300
  function useToastCtx() {
3111
- const ctx = useContext18(ToastCtx);
3301
+ const ctx = useContext19(ToastCtx);
3112
3302
  if (!ctx) throw new Error("Toast parts must be used within Toast.Root");
3113
3303
  return ctx;
3114
3304
  }
3115
- var Root19 = forwardRef24(function ToastRoot({ durationMs = 5e3, defaultVisible = false, onVisibleChange, children, className, ...rest }, ref) {
3305
+ var Root21 = forwardRef26(function ToastRoot({ durationMs = 5e3, defaultVisible = false, onVisibleChange, children, className, ...rest }, ref) {
3116
3306
  const [snapshot, send] = useAeonMachine(toastMachine, { input: { durationMs } });
3117
3307
  const visible = snapshot.matches("visible");
3118
3308
  const titleId = useId7();
@@ -3129,7 +3319,7 @@ var Root19 = forwardRef24(function ToastRoot({ durationMs = 5e3, defaultVisible
3129
3319
  if (hasBeenVisible.current) onVisibleChange?.(false);
3130
3320
  }, [visible, onVisibleChange]);
3131
3321
  const value = useMemo19(() => ({ visible, send, titleId }), [visible, send, titleId]);
3132
- return /* @__PURE__ */ jsx26(ToastCtx.Provider, { value, children: /* @__PURE__ */ jsx26(
3322
+ return /* @__PURE__ */ jsx27(ToastCtx.Provider, { value, children: /* @__PURE__ */ jsx27(
3133
3323
  "div",
3134
3324
  {
3135
3325
  ref,
@@ -3137,7 +3327,7 @@ var Root19 = forwardRef24(function ToastRoot({ durationMs = 5e3, defaultVisible
3137
3327
  "aria-live": "polite",
3138
3328
  "aria-atomic": "true",
3139
3329
  ...mergeProps(
3140
- partAttrs22(toastAnatomy.scope, toastAnatomy.root, { state: visible ? "visible" : "hidden" }),
3330
+ partAttrs23(toastAnatomy.scope, toastAnatomy.root, { state: visible ? "visible" : "hidden" }),
3141
3331
  rest
3142
3332
  ),
3143
3333
  className,
@@ -3146,26 +3336,26 @@ var Root19 = forwardRef24(function ToastRoot({ durationMs = 5e3, defaultVisible
3146
3336
  }
3147
3337
  ) });
3148
3338
  });
3149
- var Title2 = forwardRef24(function ToastTitle(props, ref) {
3339
+ var Title3 = forwardRef26(function ToastTitle(props, ref) {
3150
3340
  const { titleId } = useToastCtx();
3151
- return /* @__PURE__ */ jsx26("p", { ref, id: titleId, ...mergeProps(partAttrs22(toastAnatomy.scope, toastAnatomy.title), props) });
3341
+ return /* @__PURE__ */ jsx27("p", { ref, id: titleId, ...mergeProps(partAttrs23(toastAnatomy.scope, toastAnatomy.title), props) });
3152
3342
  });
3153
- var Description2 = forwardRef24(
3343
+ var Description2 = forwardRef26(
3154
3344
  function ToastDescription(props, ref) {
3155
- return /* @__PURE__ */ jsx26("p", { ref, ...mergeProps(partAttrs22(toastAnatomy.scope, toastAnatomy.description), props) });
3345
+ return /* @__PURE__ */ jsx27("p", { ref, ...mergeProps(partAttrs23(toastAnatomy.scope, toastAnatomy.description), props) });
3156
3346
  }
3157
3347
  );
3158
- var CloseTrigger3 = forwardRef24(
3348
+ var CloseTrigger3 = forwardRef26(
3159
3349
  function ToastCloseTrigger({ onClick, children, ...rest }, ref) {
3160
3350
  const { send } = useToastCtx();
3161
- return /* @__PURE__ */ jsx26(
3351
+ return /* @__PURE__ */ jsx27(
3162
3352
  "button",
3163
3353
  {
3164
3354
  ref,
3165
3355
  type: "button",
3166
- "aria-label": typeof children === "string" ? void 0 : "Dismiss",
3356
+ "aria-label": "Dismiss",
3167
3357
  ...mergeProps(
3168
- partAttrs22(toastAnatomy.scope, toastAnatomy.closeTrigger),
3358
+ partAttrs23(toastAnatomy.scope, toastAnatomy.closeTrigger),
3169
3359
  {
3170
3360
  onClick: (e) => {
3171
3361
  onClick?.(e);
@@ -3174,7 +3364,7 @@ var CloseTrigger3 = forwardRef24(
3174
3364
  },
3175
3365
  rest
3176
3366
  ),
3177
- children: children ?? "Dismiss"
3367
+ children: children ?? "\xD7"
3178
3368
  }
3179
3369
  );
3180
3370
  }
@@ -3191,9 +3381,9 @@ function Show({ durationMs }) {
3191
3381
  }
3192
3382
 
3193
3383
  // src/toast/provider.tsx
3194
- import { toastAnatomy as toastAnatomy2, partAttrs as partAttrs23 } from "@aeon-ui/core";
3384
+ import { toastAnatomy as toastAnatomy2, partAttrs as partAttrs24 } from "@aeon-ui/core";
3195
3385
  import {
3196
- useCallback as useCallback7,
3386
+ useCallback as useCallback8,
3197
3387
  useEffect as useEffect20,
3198
3388
  useMemo as useMemo20,
3199
3389
  useState as useState8
@@ -3201,10 +3391,10 @@ import {
3201
3391
  import { createPortal as createPortal2 } from "react-dom";
3202
3392
 
3203
3393
  // src/toast/context.tsx
3204
- import { createContext as createContext19, useContext as useContext19 } from "react";
3205
- var ToastStoreCtx = createContext19(null);
3394
+ import { createContext as createContext20, useContext as useContext20 } from "react";
3395
+ var ToastStoreCtx = createContext20(null);
3206
3396
  function useToastStore() {
3207
- const ctx = useContext19(ToastStoreCtx);
3397
+ const ctx = useContext20(ToastStoreCtx);
3208
3398
  if (!ctx) {
3209
3399
  throw new Error("useToast must be used within Toast.Provider");
3210
3400
  }
@@ -3212,12 +3402,12 @@ function useToastStore() {
3212
3402
  }
3213
3403
 
3214
3404
  // src/toast/toast-item.tsx
3215
- import { forwardRef as forwardRef25 } from "react";
3216
- import { jsx as jsx27, jsxs as jsxs5 } from "react/jsx-runtime";
3217
- var ToastItem = forwardRef25(function ToastItem2({ item, onExited, className, ...rest }, ref) {
3405
+ import { forwardRef as forwardRef27 } from "react";
3406
+ import { jsx as jsx28, jsxs as jsxs4 } from "react/jsx-runtime";
3407
+ var ToastItem = forwardRef27(function ToastItem2({ item, onExited, className, ...rest }, ref) {
3218
3408
  const { id, title, description, durationMs } = item;
3219
- return /* @__PURE__ */ jsxs5(
3220
- Root19,
3409
+ return /* @__PURE__ */ jsxs4(
3410
+ Root21,
3221
3411
  {
3222
3412
  ref,
3223
3413
  className,
@@ -3228,16 +3418,16 @@ var ToastItem = forwardRef25(function ToastItem2({ item, onExited, className, ..
3228
3418
  },
3229
3419
  ...rest,
3230
3420
  children: [
3231
- title ? /* @__PURE__ */ jsx27(Title2, { children: title }) : null,
3232
- description ? /* @__PURE__ */ jsx27(Description2, { children: description }) : null,
3233
- /* @__PURE__ */ jsx27(CloseTrigger3, {})
3421
+ title ? /* @__PURE__ */ jsx28(Title3, { children: title }) : null,
3422
+ description ? /* @__PURE__ */ jsx28(Description2, { children: description }) : null,
3423
+ /* @__PURE__ */ jsx28(CloseTrigger3, {})
3234
3424
  ]
3235
3425
  }
3236
3426
  );
3237
3427
  });
3238
3428
 
3239
3429
  // src/toast/provider.tsx
3240
- import { jsx as jsx28 } from "react/jsx-runtime";
3430
+ import { jsx as jsx29 } from "react/jsx-runtime";
3241
3431
  var PLACEMENT_ATTR = {
3242
3432
  "top-start": "top-start",
3243
3433
  "top-end": "top-end",
@@ -3249,13 +3439,13 @@ function nextToastId() {
3249
3439
  }
3250
3440
  function ToastProvider({ children, limit = 5 }) {
3251
3441
  const [items, setItems] = useState8([]);
3252
- const dismiss = useCallback7((id) => {
3442
+ const dismiss = useCallback8((id) => {
3253
3443
  setItems((prev) => prev.filter((t) => t.id !== id));
3254
3444
  }, []);
3255
- const dismissAll = useCallback7(() => {
3445
+ const dismissAll = useCallback8(() => {
3256
3446
  setItems([]);
3257
3447
  }, []);
3258
- const publish = useCallback7(
3448
+ const publish = useCallback8(
3259
3449
  (options) => {
3260
3450
  const id = options.id ?? nextToastId();
3261
3451
  const record = { ...options, id };
@@ -3272,7 +3462,7 @@ function ToastProvider({ children, limit = 5 }) {
3272
3462
  () => ({ items, publish, dismiss, dismissAll }),
3273
3463
  [items, publish, dismiss, dismissAll]
3274
3464
  );
3275
- return /* @__PURE__ */ jsx28(ToastStoreCtx.Provider, { value, children });
3465
+ return /* @__PURE__ */ jsx29(ToastStoreCtx.Provider, { value, children });
3276
3466
  }
3277
3467
  function ToastViewport({ placement = "bottom-end", className, ...rest }) {
3278
3468
  const { items, dismiss } = useToastStore();
@@ -3282,11 +3472,11 @@ function ToastViewport({ placement = "bottom-end", className, ...rest }) {
3282
3472
  }, []);
3283
3473
  if (!mounted) return null;
3284
3474
  return createPortal2(
3285
- /* @__PURE__ */ jsx28(
3475
+ /* @__PURE__ */ jsx29(
3286
3476
  "div",
3287
3477
  {
3288
3478
  ...mergeProps(
3289
- partAttrs23(toastAnatomy2.scope, toastAnatomy2.viewport, {
3479
+ partAttrs24(toastAnatomy2.scope, toastAnatomy2.viewport, {
3290
3480
  state: items.length > 0 ? "active" : "idle"
3291
3481
  }),
3292
3482
  {
@@ -3295,7 +3485,7 @@ function ToastViewport({ placement = "bottom-end", className, ...rest }) {
3295
3485
  rest
3296
3486
  ),
3297
3487
  className,
3298
- children: items.map((item) => /* @__PURE__ */ jsx28(ToastItem, { item, onExited: dismiss }, item.id))
3488
+ children: items.map((item) => /* @__PURE__ */ jsx29(ToastItem, { item, onExited: dismiss }, item.id))
3299
3489
  }
3300
3490
  ),
3301
3491
  document.body
@@ -3310,152 +3500,1646 @@ function useToast() {
3310
3500
  var Toast = {
3311
3501
  Provider: ToastProvider,
3312
3502
  Viewport: ToastViewport,
3313
- Root: Root19,
3314
- Title: Title2,
3503
+ Root: Root21,
3504
+ Title: Title3,
3315
3505
  Description: Description2,
3316
3506
  CloseTrigger: CloseTrigger3,
3317
3507
  Show
3318
3508
  };
3319
3509
 
3510
+ // src/theme-switcher/index.tsx
3511
+ import { partAttrs as partAttrs25, scopeAttrs as scopeAttrs4, themeSwitcherAnatomy } from "@aeon-ui/core";
3512
+ import {
3513
+ applyAeonTheme,
3514
+ initAeonTheme
3515
+ } from "@aeon-ui/core";
3516
+ import {
3517
+ createContext as createContext21,
3518
+ forwardRef as forwardRef28,
3519
+ useContext as useContext21,
3520
+ useLayoutEffect as useLayoutEffect2,
3521
+ useState as useState9
3522
+ } from "react";
3523
+ import { jsx as jsx30 } from "react/jsx-runtime";
3524
+ var Root22 = forwardRef28(
3525
+ function ThemeSwitcherRoot({ defaultTheme, defaultMode, onThemeChange, children, ...rest }, ref) {
3526
+ const [themeId, setThemeId] = useState9(defaultTheme ?? "default");
3527
+ const [mode, setMode] = useState9(defaultMode ?? "dark");
3528
+ useLayoutEffect2(() => {
3529
+ const { themeId: t, mode: m } = initAeonTheme();
3530
+ setThemeId(t);
3531
+ setMode(m);
3532
+ }, []);
3533
+ const handleThemeChange = (next) => {
3534
+ setThemeId(next);
3535
+ applyAeonTheme(next, mode);
3536
+ onThemeChange?.(next, mode);
3537
+ };
3538
+ const handleModeChange = (next) => {
3539
+ setMode(next);
3540
+ applyAeonTheme(themeId, next);
3541
+ onThemeChange?.(themeId, next);
3542
+ };
3543
+ return /* @__PURE__ */ jsx30(
3544
+ "div",
3545
+ {
3546
+ ref,
3547
+ ...mergeProps(
3548
+ scopeAttrs4(themeSwitcherAnatomy.scope, themeSwitcherAnatomy.root),
3549
+ rest
3550
+ ),
3551
+ children: /* @__PURE__ */ jsx30(
3552
+ ThemeSwitcherContext.Provider,
3553
+ {
3554
+ value: { themeId, mode, handleThemeChange, handleModeChange },
3555
+ children
3556
+ }
3557
+ )
3558
+ }
3559
+ );
3560
+ }
3561
+ );
3562
+ var ThemeSwitcherContext = createContext21(null);
3563
+ function useThemeSwitcher() {
3564
+ const ctx = useContext21(ThemeSwitcherContext);
3565
+ if (!ctx) throw new Error("ThemeSwitcher parts must be used inside <ThemeSwitcher.Root>");
3566
+ return ctx;
3567
+ }
3568
+ var Modes = forwardRef28(
3569
+ function ThemeSwitcherModes(props, ref) {
3570
+ return /* @__PURE__ */ jsx30(
3571
+ "div",
3572
+ {
3573
+ ref,
3574
+ role: "group",
3575
+ "aria-label": "Color mode",
3576
+ ...mergeProps(
3577
+ partAttrs25(themeSwitcherAnatomy.scope, themeSwitcherAnatomy.modes),
3578
+ props
3579
+ )
3580
+ }
3581
+ );
3582
+ }
3583
+ );
3584
+ var ModeBtn = forwardRef28(
3585
+ function ThemeSwitcherModeBtn({ mode, active, ...rest }, ref) {
3586
+ const { handleModeChange } = useThemeSwitcher();
3587
+ return /* @__PURE__ */ jsx30(
3588
+ "button",
3589
+ {
3590
+ ref,
3591
+ type: "button",
3592
+ "aria-pressed": active,
3593
+ "data-active": active ? "true" : void 0,
3594
+ ...mergeProps(
3595
+ partAttrs25(themeSwitcherAnatomy.scope, themeSwitcherAnatomy.modeBtn),
3596
+ rest
3597
+ ),
3598
+ onClick: (e) => {
3599
+ handleModeChange(mode);
3600
+ rest.onClick?.(e);
3601
+ },
3602
+ children: rest.children ?? (mode === "light" ? "Light" : "Dark")
3603
+ }
3604
+ );
3605
+ }
3606
+ );
3607
+ var ThemeSelect = forwardRef28(
3608
+ function ThemeSwitcherThemeSelect({ children, ...rest }, ref) {
3609
+ return /* @__PURE__ */ jsx30(
3610
+ "div",
3611
+ {
3612
+ ref,
3613
+ ...mergeProps(
3614
+ partAttrs25(themeSwitcherAnatomy.scope, themeSwitcherAnatomy.themeSelect),
3615
+ rest
3616
+ ),
3617
+ children
3618
+ }
3619
+ );
3620
+ }
3621
+ );
3622
+ var ThemeTrigger = forwardRef28(
3623
+ function ThemeSwitcherThemeTrigger(props, ref) {
3624
+ const { themeId } = useThemeSwitcher();
3625
+ return /* @__PURE__ */ jsx30(
3626
+ "button",
3627
+ {
3628
+ ref,
3629
+ type: "button",
3630
+ "aria-label": `Theme preset: ${themeId}`,
3631
+ ...mergeProps(
3632
+ partAttrs25(themeSwitcherAnatomy.scope, themeSwitcherAnatomy.themeTrigger),
3633
+ props
3634
+ ),
3635
+ children: props.children ?? themeId
3636
+ }
3637
+ );
3638
+ }
3639
+ );
3640
+ var ThemeSwitcher = {
3641
+ Root: Root22,
3642
+ Modes,
3643
+ ModeBtn,
3644
+ ThemeSelect,
3645
+ ThemeTrigger
3646
+ };
3647
+
3320
3648
  // src/avatar/index.tsx
3321
- import { avatarAnatomy, partAttrs as partAttrs24 } from "@aeon-ui/core";
3649
+ import { avatarAnatomy, partAttrs as partAttrs26 } from "@aeon-ui/core";
3322
3650
  import {
3323
- createContext as createContext20,
3324
- forwardRef as forwardRef26,
3325
- useCallback as useCallback8,
3326
- useContext as useContext20,
3651
+ createContext as createContext22,
3652
+ forwardRef as forwardRef29,
3653
+ useCallback as useCallback9,
3654
+ useContext as useContext22,
3327
3655
  useEffect as useEffect21,
3328
3656
  useMemo as useMemo21,
3329
- useState as useState9
3657
+ useState as useState10
3330
3658
  } from "react";
3331
- import { jsx as jsx29 } from "react/jsx-runtime";
3332
- var AvatarCtx = createContext20(null);
3659
+ import { jsx as jsx31 } from "react/jsx-runtime";
3660
+ var AvatarCtx = createContext22(null);
3333
3661
  function useAvatarCtx() {
3334
- const ctx = useContext20(AvatarCtx);
3662
+ const ctx = useContext22(AvatarCtx);
3335
3663
  if (!ctx) throw new Error("Avatar parts must be used within Avatar.Root");
3336
3664
  return ctx;
3337
3665
  }
3338
- var Root20 = forwardRef26(function AvatarRoot({ children, className, ...rest }, ref) {
3339
- const [status, setStatus] = useState9("idle");
3666
+ var Root23 = forwardRef29(function AvatarRoot({ children, className, ...rest }, ref) {
3667
+ const [status, setStatus] = useState10("idle");
3340
3668
  const value = useMemo21(() => ({ status, setStatus }), [status]);
3341
- return /* @__PURE__ */ jsx29(AvatarCtx.Provider, { value, children: /* @__PURE__ */ jsx29(
3669
+ return /* @__PURE__ */ jsx31(AvatarCtx.Provider, { value, children: /* @__PURE__ */ jsx31(
3342
3670
  "span",
3343
3671
  {
3344
3672
  ref,
3345
3673
  className,
3346
3674
  ...mergeProps(
3347
- partAttrs24(avatarAnatomy.scope, avatarAnatomy.root, { state: status }),
3675
+ partAttrs26(avatarAnatomy.scope, avatarAnatomy.root, {
3676
+ // `ready` alias keeps product CSS friendly; `loaded` stays for existing recipes.
3677
+ state: status === "loaded" ? "loaded ready" : status
3678
+ }),
3348
3679
  rest
3349
3680
  ),
3350
3681
  children
3351
3682
  }
3352
3683
  ) });
3353
3684
  });
3354
- var Image = forwardRef26(function AvatarImage({ src, alt, onLoad, onError, className, ...rest }, ref) {
3685
+ var Image = forwardRef29(function AvatarImage({ src, alt, onLoad, onError, className, ...rest }, ref) {
3355
3686
  const { status, setStatus } = useAvatarCtx();
3356
3687
  useEffect21(() => {
3357
3688
  if (!src) setStatus("idle");
3358
3689
  else setStatus("loading");
3359
3690
  }, [src, setStatus]);
3360
- const handleLoad = useCallback8(
3691
+ const handleLoad = useCallback9(
3361
3692
  (e) => {
3362
3693
  onLoad?.(e);
3363
3694
  setStatus("loaded");
3364
3695
  },
3365
3696
  [onLoad, setStatus]
3366
3697
  );
3367
- const handleError = useCallback8(
3698
+ const handleError = useCallback9(
3368
3699
  (e) => {
3369
3700
  onError?.(e);
3370
3701
  setStatus("error");
3371
3702
  },
3372
3703
  [onError, setStatus]
3373
3704
  );
3374
- return /* @__PURE__ */ jsx29(
3705
+ return /* @__PURE__ */ jsx31(
3375
3706
  "img",
3376
3707
  {
3377
3708
  ref,
3378
3709
  src,
3379
3710
  alt,
3380
3711
  hidden: status !== "loaded",
3381
- ...partAttrs24(avatarAnatomy.scope, avatarAnatomy.image, { state: status }),
3712
+ ...partAttrs26(avatarAnatomy.scope, avatarAnatomy.image, { state: status }),
3382
3713
  className,
3383
3714
  ...mergeProps(rest, { onLoad: handleLoad, onError: handleError })
3384
3715
  }
3385
3716
  );
3386
3717
  });
3387
- var Fallback = forwardRef26(function AvatarFallback({ className, ...rest }, ref) {
3718
+ var Fallback = forwardRef29(function AvatarFallback({ className, ...rest }, ref) {
3388
3719
  const { status } = useAvatarCtx();
3389
3720
  const show = status !== "loaded";
3390
- return /* @__PURE__ */ jsx29(
3721
+ return /* @__PURE__ */ jsx31(
3391
3722
  "span",
3392
3723
  {
3393
3724
  ref,
3394
3725
  hidden: !show,
3395
- ...partAttrs24(avatarAnatomy.scope, avatarAnatomy.fallback, { state: status }),
3726
+ ...partAttrs26(avatarAnatomy.scope, avatarAnatomy.fallback, { state: status }),
3727
+ className,
3728
+ ...rest
3729
+ }
3730
+ );
3731
+ });
3732
+ var Badge = forwardRef29(function AvatarBadge({ presence = "idle", className, ...rest }, ref) {
3733
+ useAvatarCtx();
3734
+ return /* @__PURE__ */ jsx31(
3735
+ "span",
3736
+ {
3737
+ ref,
3738
+ "data-aeon-presence": presence,
3739
+ ...partAttrs26(avatarAnatomy.scope, avatarAnatomy.badge, { state: presence }),
3396
3740
  className,
3397
3741
  ...rest
3398
3742
  }
3399
3743
  );
3400
3744
  });
3401
3745
  var Avatar = {
3402
- Root: Root20,
3746
+ Root: Root23,
3403
3747
  Image,
3404
- Fallback
3748
+ Fallback,
3749
+ Badge
3405
3750
  };
3406
3751
 
3407
- // src/hooks/use-layout-mode.ts
3408
- import { getCompactMq, layoutCompositionForMode, matchLayoutMode } from "@aeon-ui/core";
3409
- import { useEffect as useEffect22, useMemo as useMemo22, useState as useState10 } from "react";
3410
- function useLayoutMode(spec) {
3411
- const mq = useMemo22(() => getCompactMq(spec), [spec.compactMq]);
3412
- const [mode, setMode] = useState10(() => matchLayoutMode(spec, mq));
3413
- useEffect22(() => {
3414
- const sync = () => setMode(matchLayoutMode(spec, mq));
3415
- sync();
3416
- mq.addEventListener("change", sync);
3417
- return () => mq.removeEventListener("change", sync);
3418
- }, [spec, mq]);
3419
- const composition = useMemo22(() => layoutCompositionForMode(spec, mode), [spec, mode]);
3420
- return { mode, composition };
3752
+ // src/identity/index.tsx
3753
+ import { identityAnatomy, partAttrs as partAttrs27, scopeAttrs as scopeAttrs5 } from "@aeon-ui/core";
3754
+ import { createContext as createContext23, forwardRef as forwardRef30, useContext as useContext23 } from "react";
3755
+ import { jsx as jsx32 } from "react/jsx-runtime";
3756
+ var IdentityCtx = createContext23(null);
3757
+ function useIdentityCtx() {
3758
+ const ctx = useContext23(IdentityCtx);
3759
+ if (!ctx) throw new Error("Identity parts must be used within Identity.Root");
3760
+ return ctx;
3761
+ }
3762
+ var Root24 = forwardRef30(function IdentityRoot({ as: Tag = "div", size = "md", children, ...rest }, ref) {
3763
+ return /* @__PURE__ */ jsx32(IdentityCtx.Provider, { value: { size }, children: /* @__PURE__ */ jsx32(
3764
+ Tag,
3765
+ {
3766
+ ref,
3767
+ "data-aeon-size": size,
3768
+ ...mergeProps(scopeAttrs5(identityAnatomy.scope, identityAnatomy.root), rest),
3769
+ children
3770
+ }
3771
+ ) });
3772
+ });
3773
+ var AvatarSlot = forwardRef30(
3774
+ function IdentityAvatar(props, ref) {
3775
+ useIdentityCtx();
3776
+ return /* @__PURE__ */ jsx32(
3777
+ "span",
3778
+ {
3779
+ ref,
3780
+ ...mergeProps(partAttrs27(identityAnatomy.scope, identityAnatomy.avatar), props)
3781
+ }
3782
+ );
3783
+ }
3784
+ );
3785
+ var Title4 = forwardRef30(function IdentityTitle(props, ref) {
3786
+ useIdentityCtx();
3787
+ return /* @__PURE__ */ jsx32(
3788
+ "span",
3789
+ {
3790
+ ref,
3791
+ ...mergeProps(partAttrs27(identityAnatomy.scope, identityAnatomy.title), props)
3792
+ }
3793
+ );
3794
+ });
3795
+ var Subtitle = forwardRef30(
3796
+ function IdentitySubtitle(props, ref) {
3797
+ useIdentityCtx();
3798
+ return /* @__PURE__ */ jsx32(
3799
+ "span",
3800
+ {
3801
+ ref,
3802
+ ...mergeProps(partAttrs27(identityAnatomy.scope, identityAnatomy.subtitle), props)
3803
+ }
3804
+ );
3805
+ }
3806
+ );
3807
+ var Meta2 = forwardRef30(function IdentityMeta(props, ref) {
3808
+ useIdentityCtx();
3809
+ return /* @__PURE__ */ jsx32("span", { ref, ...mergeProps(partAttrs27(identityAnatomy.scope, identityAnatomy.meta), props) });
3810
+ });
3811
+ var Trailing = forwardRef30(
3812
+ function IdentityTrailing(props, ref) {
3813
+ useIdentityCtx();
3814
+ return /* @__PURE__ */ jsx32(
3815
+ "span",
3816
+ {
3817
+ ref,
3818
+ ...mergeProps(partAttrs27(identityAnatomy.scope, identityAnatomy.trailing), props)
3819
+ }
3820
+ );
3821
+ }
3822
+ );
3823
+ var Identity = {
3824
+ Root: Root24,
3825
+ Avatar: AvatarSlot,
3826
+ Title: Title4,
3827
+ Subtitle,
3828
+ Meta: Meta2,
3829
+ Trailing
3830
+ };
3831
+
3832
+ // src/metric-strip/index.tsx
3833
+ import { metricStripAnatomy, partAttrs as partAttrs28, scopeAttrs as scopeAttrs6 } from "@aeon-ui/core";
3834
+ import { createContext as createContext24, forwardRef as forwardRef31, useContext as useContext24 } from "react";
3835
+ import { jsx as jsx33 } from "react/jsx-runtime";
3836
+ var MetricCtx = createContext24(null);
3837
+ function useMetricCtx() {
3838
+ const ctx = useContext24(MetricCtx);
3839
+ if (!ctx) throw new Error("MetricStrip parts must be used within MetricStrip.Root");
3840
+ return ctx;
3841
+ }
3842
+ var Root25 = forwardRef31(function MetricStripRoot({ density = "cluster", children, ...rest }, ref) {
3843
+ return /* @__PURE__ */ jsx33(MetricCtx.Provider, { value: { density }, children: /* @__PURE__ */ jsx33(
3844
+ "div",
3845
+ {
3846
+ ref,
3847
+ "data-aeon-density": density,
3848
+ role: "group",
3849
+ ...mergeProps(scopeAttrs6(metricStripAnatomy.scope, metricStripAnatomy.root), rest),
3850
+ children
3851
+ }
3852
+ ) });
3853
+ });
3854
+ var Chip = forwardRef31(function MetricChip(props, ref) {
3855
+ useMetricCtx();
3856
+ return /* @__PURE__ */ jsx33(
3857
+ "span",
3858
+ {
3859
+ ref,
3860
+ ...mergeProps(partAttrs28(metricStripAnatomy.scope, metricStripAnatomy.chip), props)
3861
+ }
3862
+ );
3863
+ });
3864
+ var Value = forwardRef31(function MetricValue(props, ref) {
3865
+ useMetricCtx();
3866
+ return /* @__PURE__ */ jsx33(
3867
+ "span",
3868
+ {
3869
+ ref,
3870
+ ...mergeProps(partAttrs28(metricStripAnatomy.scope, metricStripAnatomy.value), props)
3871
+ }
3872
+ );
3873
+ });
3874
+ var Label6 = forwardRef31(function MetricLabel(props, ref) {
3875
+ useMetricCtx();
3876
+ return /* @__PURE__ */ jsx33(
3877
+ "span",
3878
+ {
3879
+ ref,
3880
+ ...mergeProps(partAttrs28(metricStripAnatomy.scope, metricStripAnatomy.label), props)
3881
+ }
3882
+ );
3883
+ });
3884
+ var MetricStrip = {
3885
+ Root: Root25,
3886
+ Chip,
3887
+ Value,
3888
+ Label: Label6
3889
+ };
3890
+
3891
+ // src/list-row/index.tsx
3892
+ import { listRowAnatomy, partAttrs as partAttrs29, scopeAttrs as scopeAttrs7 } from "@aeon-ui/core";
3893
+ import { forwardRef as forwardRef32 } from "react";
3894
+ import { jsx as jsx34 } from "react/jsx-runtime";
3895
+ var Root26 = forwardRef32(function ListRowRoot({ as: Tag = "button", type, children, ...rest }, ref) {
3896
+ const buttonType = Tag === "button" ? type ?? "button" : void 0;
3897
+ return /* @__PURE__ */ jsx34(
3898
+ Tag,
3899
+ {
3900
+ ref,
3901
+ type: buttonType,
3902
+ ...mergeProps(scopeAttrs7(listRowAnatomy.scope, listRowAnatomy.root), rest),
3903
+ children
3904
+ }
3905
+ );
3906
+ });
3907
+ var Leading = forwardRef32(function ListRowLeading(props, ref) {
3908
+ return /* @__PURE__ */ jsx34(
3909
+ "span",
3910
+ {
3911
+ ref,
3912
+ ...mergeProps(partAttrs29(listRowAnatomy.scope, listRowAnatomy.leading), props)
3913
+ }
3914
+ );
3915
+ });
3916
+ var Label7 = forwardRef32(function ListRowLabel(props, ref) {
3917
+ return /* @__PURE__ */ jsx34("span", { ref, ...mergeProps(partAttrs29(listRowAnatomy.scope, listRowAnatomy.label), props) });
3918
+ });
3919
+ var Description3 = forwardRef32(
3920
+ function ListRowDescription(props, ref) {
3921
+ return /* @__PURE__ */ jsx34(
3922
+ "span",
3923
+ {
3924
+ ref,
3925
+ ...mergeProps(partAttrs29(listRowAnatomy.scope, listRowAnatomy.description), props)
3926
+ }
3927
+ );
3928
+ }
3929
+ );
3930
+ var Trailing2 = forwardRef32(
3931
+ function ListRowTrailing(props, ref) {
3932
+ return /* @__PURE__ */ jsx34(
3933
+ "span",
3934
+ {
3935
+ ref,
3936
+ ...mergeProps(partAttrs29(listRowAnatomy.scope, listRowAnatomy.trailing), props)
3937
+ }
3938
+ );
3939
+ }
3940
+ );
3941
+ var ListRow = {
3942
+ Root: Root26,
3943
+ Leading,
3944
+ Label: Label7,
3945
+ Description: Description3,
3946
+ Trailing: Trailing2
3947
+ };
3948
+
3949
+ // src/entry/index.tsx
3950
+ import { entryAnatomy, partAttrs as partAttrs30, scopeAttrs as scopeAttrs8 } from "@aeon-ui/core";
3951
+ import { forwardRef as forwardRef33 } from "react";
3952
+ import { jsx as jsx35 } from "react/jsx-runtime";
3953
+ var List2 = forwardRef33(function EntryList({ children, ...rest }, ref) {
3954
+ return /* @__PURE__ */ jsx35(
3955
+ "div",
3956
+ {
3957
+ ref,
3958
+ ...mergeProps(scopeAttrs8(entryAnatomy.scope, entryAnatomy.list), rest),
3959
+ children
3960
+ }
3961
+ );
3962
+ });
3963
+ var Root27 = forwardRef33(function EntryRoot({ as: Tag = "article", state = "idle", children, ...rest }, ref) {
3964
+ return /* @__PURE__ */ jsx35(
3965
+ Tag,
3966
+ {
3967
+ ref,
3968
+ ...mergeProps(scopeAttrs8(entryAnatomy.scope, entryAnatomy.root, { state }), rest),
3969
+ children
3970
+ }
3971
+ );
3972
+ });
3973
+ function Part(part, displayName, defaultTag = "div") {
3974
+ const Comp = forwardRef33(
3975
+ function EntryPart({ as: Tag = defaultTag, ...props }, ref) {
3976
+ return /* @__PURE__ */ jsx35(
3977
+ Tag,
3978
+ {
3979
+ ref,
3980
+ ...mergeProps(partAttrs30(entryAnatomy.scope, part), props)
3981
+ }
3982
+ );
3983
+ }
3984
+ );
3985
+ Comp.displayName = displayName;
3986
+ return Comp;
3987
+ }
3988
+ var Entry = {
3989
+ List: List2,
3990
+ Root: Root27,
3991
+ Header: Part(entryAnatomy.header, "Entry.Header", "header"),
3992
+ Leading: Part(entryAnatomy.leading, "Entry.Leading", "div"),
3993
+ Heading: Part(entryAnatomy.heading, "Entry.Heading", "div"),
3994
+ Title: Part(entryAnatomy.title, "Entry.Title", "div"),
3995
+ Subtitle: Part(entryAnatomy.subtitle, "Entry.Subtitle", "div"),
3996
+ Meta: Part(entryAnatomy.meta, "Entry.Meta", "span"),
3997
+ Media: Part(entryAnatomy.media, "Entry.Media", "div"),
3998
+ Body: Part(entryAnatomy.body, "Entry.Body", "div"),
3999
+ Values: Part(entryAnatomy.values, "Entry.Values", "div"),
4000
+ Value: Part(entryAnatomy.value, "Entry.Value", "span"),
4001
+ Actions: Part(entryAnatomy.actions, "Entry.Actions", "div"),
4002
+ Footer: Part(entryAnatomy.footer, "Entry.Footer", "footer")
4003
+ };
4004
+
4005
+ // src/conversation/index.tsx
4006
+ import { conversationAnatomy, partAttrs as partAttrs31, scopeAttrs as scopeAttrs9 } from "@aeon-ui/core";
4007
+ import { forwardRef as forwardRef34 } from "react";
4008
+ import { jsx as jsx36 } from "react/jsx-runtime";
4009
+ var Root28 = forwardRef34(function ConversationRoot({ children, ...rest }, ref) {
4010
+ return /* @__PURE__ */ jsx36(
4011
+ "div",
4012
+ {
4013
+ ref,
4014
+ ...mergeProps(scopeAttrs9(conversationAnatomy.scope, conversationAnatomy.root), rest),
4015
+ children
4016
+ }
4017
+ );
4018
+ });
4019
+ var Item6 = forwardRef34(function ConversationItem({ state = "idle", as: Tag = "button", type, children, ...rest }, ref) {
4020
+ const buttonType = Tag === "button" ? type ?? "button" : void 0;
4021
+ return /* @__PURE__ */ jsx36(
4022
+ Tag,
4023
+ {
4024
+ ref,
4025
+ type: buttonType,
4026
+ ...mergeProps(
4027
+ partAttrs31(conversationAnatomy.scope, conversationAnatomy.item, { state }),
4028
+ rest
4029
+ ),
4030
+ children
4031
+ }
4032
+ );
4033
+ });
4034
+ function Part2(part, displayName) {
4035
+ const Comp = forwardRef34(function ConversationPart(props, ref) {
4036
+ return /* @__PURE__ */ jsx36(
4037
+ "span",
4038
+ {
4039
+ ref,
4040
+ ...mergeProps(partAttrs31(conversationAnatomy.scope, part), props)
4041
+ }
4042
+ );
4043
+ });
4044
+ Comp.displayName = displayName;
4045
+ return Comp;
4046
+ }
4047
+ var Conversation = {
4048
+ Root: Root28,
4049
+ Item: Item6,
4050
+ Leading: Part2(conversationAnatomy.leading, "Conversation.Leading"),
4051
+ Body: Part2(conversationAnatomy.body, "Conversation.Body"),
4052
+ Title: Part2(conversationAnatomy.title, "Conversation.Title"),
4053
+ Preview: Part2(conversationAnatomy.preview, "Conversation.Preview"),
4054
+ Meta: Part2(conversationAnatomy.meta, "Conversation.Meta"),
4055
+ Badge: Part2(conversationAnatomy.badge, "Conversation.Badge")
4056
+ };
4057
+
4058
+ // src/thread/index.tsx
4059
+ import { partAttrs as partAttrs32, scopeAttrs as scopeAttrs10, threadAnatomy } from "@aeon-ui/core";
4060
+ import { forwardRef as forwardRef35 } from "react";
4061
+ import { jsx as jsx37 } from "react/jsx-runtime";
4062
+ var Root29 = forwardRef35(function ThreadRoot({ children, ...rest }, ref) {
4063
+ return /* @__PURE__ */ jsx37(
4064
+ "div",
4065
+ {
4066
+ ref,
4067
+ ...mergeProps(scopeAttrs10(threadAnatomy.scope, threadAnatomy.root), rest),
4068
+ children
4069
+ }
4070
+ );
4071
+ });
4072
+ var List3 = forwardRef35(function ThreadList(props, ref) {
4073
+ return /* @__PURE__ */ jsx37(
4074
+ "div",
4075
+ {
4076
+ ref,
4077
+ role: "log",
4078
+ "aria-live": "polite",
4079
+ ...mergeProps(partAttrs32(threadAnatomy.scope, threadAnatomy.list), props)
4080
+ }
4081
+ );
4082
+ });
4083
+ var Item7 = forwardRef35(function ThreadItem({ state = "theirs", ...rest }, ref) {
4084
+ return /* @__PURE__ */ jsx37(
4085
+ "div",
4086
+ {
4087
+ ref,
4088
+ ...mergeProps(partAttrs32(threadAnatomy.scope, threadAnatomy.item, { state }), rest)
4089
+ }
4090
+ );
4091
+ });
4092
+ var Bubble = forwardRef35(function ThreadBubble(props, ref) {
4093
+ return /* @__PURE__ */ jsx37(
4094
+ "div",
4095
+ {
4096
+ ref,
4097
+ ...mergeProps(partAttrs32(threadAnatomy.scope, threadAnatomy.bubble), props)
4098
+ }
4099
+ );
4100
+ });
4101
+ var Meta3 = forwardRef35(function ThreadMeta(props, ref) {
4102
+ return /* @__PURE__ */ jsx37("span", { ref, ...mergeProps(partAttrs32(threadAnatomy.scope, threadAnatomy.meta), props) });
4103
+ });
4104
+ var Day = forwardRef35(function ThreadDay(props, ref) {
4105
+ return /* @__PURE__ */ jsx37("div", { ref, ...mergeProps(partAttrs32(threadAnatomy.scope, threadAnatomy.day), props) });
4106
+ });
4107
+ var Thread = {
4108
+ Root: Root29,
4109
+ List: List3,
4110
+ Item: Item7,
4111
+ Bubble,
4112
+ Meta: Meta3,
4113
+ Day
4114
+ };
4115
+
4116
+ // src/composer/index.tsx
4117
+ import { composerAnatomy, partAttrs as partAttrs33, scopeAttrs as scopeAttrs11 } from "@aeon-ui/core";
4118
+ import {
4119
+ forwardRef as forwardRef36
4120
+ } from "react";
4121
+ import { jsx as jsx38 } from "react/jsx-runtime";
4122
+ var Root30 = forwardRef36(function ComposerRoot({ state = "idle", children, ...rest }, ref) {
4123
+ return /* @__PURE__ */ jsx38(
4124
+ "form",
4125
+ {
4126
+ ref,
4127
+ ...mergeProps(scopeAttrs11(composerAnatomy.scope, composerAnatomy.root, { state }), rest),
4128
+ children
4129
+ }
4130
+ );
4131
+ });
4132
+ var Input3 = forwardRef36(
4133
+ function ComposerInput(props, ref) {
4134
+ return /* @__PURE__ */ jsx38(
4135
+ "textarea",
4136
+ {
4137
+ ref,
4138
+ rows: 1,
4139
+ ...mergeProps(partAttrs33(composerAnatomy.scope, composerAnatomy.input), props)
4140
+ }
4141
+ );
4142
+ }
4143
+ );
4144
+ var Actions3 = forwardRef36(
4145
+ function ComposerActions(props, ref) {
4146
+ return /* @__PURE__ */ jsx38(
4147
+ "div",
4148
+ {
4149
+ ref,
4150
+ ...mergeProps(partAttrs33(composerAnatomy.scope, composerAnatomy.actions), props)
4151
+ }
4152
+ );
4153
+ }
4154
+ );
4155
+ var Send = forwardRef36(
4156
+ function ComposerSend(props, ref) {
4157
+ return /* @__PURE__ */ jsx38(
4158
+ "span",
4159
+ {
4160
+ ref,
4161
+ ...mergeProps(partAttrs33(composerAnatomy.scope, composerAnatomy.send), props)
4162
+ }
4163
+ );
4164
+ }
4165
+ );
4166
+ var Composer = {
4167
+ Root: Root30,
4168
+ Input: Input3,
4169
+ Actions: Actions3,
4170
+ Send
4171
+ };
4172
+
4173
+ // src/profile-header/index.tsx
4174
+ import { profileHeaderAnatomy, partAttrs as partAttrs34, scopeAttrs as scopeAttrs12 } from "@aeon-ui/core";
4175
+ import { forwardRef as forwardRef37 } from "react";
4176
+ import { jsx as jsx39 } from "react/jsx-runtime";
4177
+ var Root31 = forwardRef37(function ProfileHeaderRoot({ children, ...rest }, ref) {
4178
+ return /* @__PURE__ */ jsx39(
4179
+ "header",
4180
+ {
4181
+ ref,
4182
+ ...mergeProps(scopeAttrs12(profileHeaderAnatomy.scope, profileHeaderAnatomy.root), rest),
4183
+ children
4184
+ }
4185
+ );
4186
+ });
4187
+ var Media = forwardRef37(function ProfileHeaderMedia(props, ref) {
4188
+ return /* @__PURE__ */ jsx39(
4189
+ "div",
4190
+ {
4191
+ ref,
4192
+ ...mergeProps(partAttrs34(profileHeaderAnatomy.scope, profileHeaderAnatomy.media), props)
4193
+ }
4194
+ );
4195
+ });
4196
+ var IdentitySlot = forwardRef37(
4197
+ function ProfileHeaderIdentity(props, ref) {
4198
+ return /* @__PURE__ */ jsx39(
4199
+ "div",
4200
+ {
4201
+ ref,
4202
+ ...mergeProps(partAttrs34(profileHeaderAnatomy.scope, profileHeaderAnatomy.identity), props)
4203
+ }
4204
+ );
4205
+ }
4206
+ );
4207
+ var Metrics = forwardRef37(
4208
+ function ProfileHeaderMetrics(props, ref) {
4209
+ return /* @__PURE__ */ jsx39(
4210
+ "div",
4211
+ {
4212
+ ref,
4213
+ ...mergeProps(partAttrs34(profileHeaderAnatomy.scope, profileHeaderAnatomy.metrics), props)
4214
+ }
4215
+ );
4216
+ }
4217
+ );
4218
+ var Actions4 = forwardRef37(
4219
+ function ProfileHeaderActions(props, ref) {
4220
+ return /* @__PURE__ */ jsx39(
4221
+ "div",
4222
+ {
4223
+ ref,
4224
+ ...mergeProps(partAttrs34(profileHeaderAnatomy.scope, profileHeaderAnatomy.actions), props)
4225
+ }
4226
+ );
4227
+ }
4228
+ );
4229
+ var Body2 = forwardRef37(function ProfileHeaderBody(props, ref) {
4230
+ return /* @__PURE__ */ jsx39(
4231
+ "div",
4232
+ {
4233
+ ref,
4234
+ ...mergeProps(partAttrs34(profileHeaderAnatomy.scope, profileHeaderAnatomy.body), props)
4235
+ }
4236
+ );
4237
+ });
4238
+ var ProfileHeader = {
4239
+ Root: Root31,
4240
+ Media,
4241
+ Identity: IdentitySlot,
4242
+ Metrics,
4243
+ Actions: Actions4,
4244
+ Body: Body2
4245
+ };
4246
+
4247
+ // src/bar/index.tsx
4248
+ import { barAnatomy, partAttrs as partAttrs35, scopeAttrs as scopeAttrs13 } from "@aeon-ui/core";
4249
+ import { createContext as createContext25, forwardRef as forwardRef38 } from "react";
4250
+ import { jsx as jsx40 } from "react/jsx-runtime";
4251
+ var BarContext = createContext25({});
4252
+ var Root32 = forwardRef38(function BarRoot({ as: Tag = "header", gap, children, ...rest }, ref) {
4253
+ return /* @__PURE__ */ jsx40(BarContext.Provider, { value: { gap }, children: /* @__PURE__ */ jsx40(
4254
+ Tag,
4255
+ {
4256
+ ref,
4257
+ ...mergeProps(scopeAttrs13(barAnatomy.scope, barAnatomy.root), rest),
4258
+ children
4259
+ }
4260
+ ) });
4261
+ });
4262
+ var Zone = forwardRef38(function BarZone({ zone, children, ...rest }, ref) {
4263
+ return /* @__PURE__ */ jsx40(
4264
+ "div",
4265
+ {
4266
+ ref,
4267
+ ...mergeProps(partAttrs35(barAnatomy.scope, zone), rest),
4268
+ children
4269
+ }
4270
+ );
4271
+ });
4272
+ var Bar = {
4273
+ Root: Root32,
4274
+ Leading: forwardRef38(
4275
+ function BarLeading(props, ref) {
4276
+ return /* @__PURE__ */ jsx40(Zone, { ref, zone: "leading", ...props });
4277
+ }
4278
+ ),
4279
+ Center: forwardRef38(
4280
+ function BarCenter(props, ref) {
4281
+ return /* @__PURE__ */ jsx40(Zone, { ref, zone: "center", ...props });
4282
+ }
4283
+ ),
4284
+ Trailing: forwardRef38(
4285
+ function BarTrailing(props, ref) {
4286
+ return /* @__PURE__ */ jsx40(Zone, { ref, zone: "trailing", ...props });
4287
+ }
4288
+ )
4289
+ };
4290
+
4291
+ // src/panel/index.tsx
4292
+ import { panelAnatomy, partAttrs as partAttrs36, scopeAttrs as scopeAttrs14 } from "@aeon-ui/core";
4293
+ import { panelMachine } from "@aeon-ui/primitives";
4294
+ import {
4295
+ createContext as createContext26,
4296
+ forwardRef as forwardRef39,
4297
+ useContext as useContext25,
4298
+ useEffect as useEffect22,
4299
+ useId as useId8,
4300
+ useMemo as useMemo22
4301
+ } from "react";
4302
+ import { jsx as jsx41 } from "react/jsx-runtime";
4303
+ var PanelCtx = createContext26(null);
4304
+ function usePanelCtx() {
4305
+ const ctx = useContext25(PanelCtx);
4306
+ if (!ctx) throw new Error("Panel parts must be used within Panel.Root");
4307
+ return ctx;
4308
+ }
4309
+ var Group3 = forwardRef39(function PanelGroup({ orientation = "horizontal", children, className, ...rest }, ref) {
4310
+ return /* @__PURE__ */ jsx41(
4311
+ "div",
4312
+ {
4313
+ ref,
4314
+ className,
4315
+ "data-aeon-orientation": orientation,
4316
+ ...mergeProps(partAttrs36(panelAnatomy.scope, panelAnatomy.group), rest),
4317
+ children
4318
+ }
4319
+ );
4320
+ });
4321
+ var Root33 = forwardRef39(function PanelRoot({
4322
+ label,
4323
+ defaultExpanded = true,
4324
+ expanded: expandedProp,
4325
+ collapsible = true,
4326
+ onExpandedChange,
4327
+ children,
4328
+ className,
4329
+ ...rest
4330
+ }, ref) {
4331
+ const contentId = useId8().replace(/:/g, "");
4332
+ const [snapshot, send] = useAeonMachine(panelMachine, {
4333
+ input: { expanded: defaultExpanded }
4334
+ });
4335
+ const machineExpanded = snapshot.value === "expanded";
4336
+ const expanded = expandedProp ?? machineExpanded;
4337
+ const state = expanded ? "expanded" : "collapsed";
4338
+ useEffect22(() => {
4339
+ onExpandedChange?.(expanded);
4340
+ }, [expanded, onExpandedChange]);
4341
+ useEffect22(() => {
4342
+ if (expandedProp === void 0) return;
4343
+ send({ type: "SET_EXPANDED", expanded: expandedProp });
4344
+ }, [expandedProp, send]);
4345
+ const ctx = useMemo22(
4346
+ () => ({
4347
+ state,
4348
+ expanded,
4349
+ collapsible,
4350
+ label,
4351
+ contentId: `aeon-panel-${contentId}`,
4352
+ send
4353
+ }),
4354
+ [state, expanded, collapsible, label, contentId, send]
4355
+ );
4356
+ return /* @__PURE__ */ jsx41(PanelCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx41(
4357
+ "div",
4358
+ {
4359
+ ref,
4360
+ className,
4361
+ ...mergeProps(
4362
+ scopeAttrs14(panelAnatomy.scope, panelAnatomy.root, { state }),
4363
+ {
4364
+ "data-aeon-collapsible": collapsible ? "true" : void 0
4365
+ },
4366
+ rest
4367
+ ),
4368
+ children
4369
+ }
4370
+ ) });
4371
+ });
4372
+ var Trigger7 = forwardRef39(function PanelTrigger({ children, onClick, ...rest }, ref) {
4373
+ const { expanded, collapsible, contentId, send, label } = usePanelCtx();
4374
+ return /* @__PURE__ */ jsx41(
4375
+ "button",
4376
+ {
4377
+ ref,
4378
+ type: "button",
4379
+ "aria-expanded": expanded,
4380
+ "aria-controls": contentId,
4381
+ disabled: !collapsible,
4382
+ ...mergeProps(
4383
+ partAttrs36(panelAnatomy.scope, panelAnatomy.trigger, {
4384
+ state: expanded ? "expanded" : "collapsed"
4385
+ }),
4386
+ rest
4387
+ ),
4388
+ onClick: (e) => {
4389
+ onClick?.(e);
4390
+ if (!e.defaultPrevented && collapsible) send({ type: "TOGGLE" });
4391
+ },
4392
+ children: children ?? (expanded ? "Collapse" : `Expand ${label}`)
4393
+ }
4394
+ );
4395
+ });
4396
+ var Label8 = forwardRef39(function PanelLabel({ children, onClick, ...rest }, ref) {
4397
+ const { label, state, collapsible, send, expanded, contentId } = usePanelCtx();
4398
+ const text = typeof children === "string" || children == null ? String(children ?? label) : null;
4399
+ return /* @__PURE__ */ jsx41(
4400
+ "span",
4401
+ {
4402
+ ref,
4403
+ role: collapsible ? "button" : void 0,
4404
+ tabIndex: collapsible ? 0 : void 0,
4405
+ "aria-expanded": collapsible ? expanded : void 0,
4406
+ "aria-controls": collapsible ? contentId : void 0,
4407
+ ...mergeProps(partAttrs36(panelAnatomy.scope, panelAnatomy.label, { state }), rest),
4408
+ onClick: (e) => {
4409
+ onClick?.(e);
4410
+ if (!e.defaultPrevented && collapsible) send({ type: "TOGGLE" });
4411
+ },
4412
+ onKeyDown: (e) => {
4413
+ if (!collapsible) return;
4414
+ if (e.key === "Enter" || e.key === " ") {
4415
+ e.preventDefault();
4416
+ send({ type: "TOGGLE" });
4417
+ }
4418
+ },
4419
+ children: text != null ? state === "collapsed" ? text.split("").map(
4420
+ (ch, i) => ch === " " ? /* @__PURE__ */ jsx41("span", { "data-aeon-part": "label-gap", "aria-hidden": true, children: " " }, `sp-${i}`) : /* @__PURE__ */ jsx41("span", { "data-aeon-part": "label-char", children: ch }, `${ch}-${i}`)
4421
+ ) : text : children
4422
+ }
4423
+ );
4424
+ });
4425
+ var Content9 = forwardRef39(function PanelContent({ children, ...rest }, ref) {
4426
+ const { expanded, contentId, state } = usePanelCtx();
4427
+ return /* @__PURE__ */ jsx41(
4428
+ "div",
4429
+ {
4430
+ ref,
4431
+ id: contentId,
4432
+ hidden: !expanded,
4433
+ ...mergeProps(partAttrs36(panelAnatomy.scope, panelAnatomy.content, { state }), rest),
4434
+ children
4435
+ }
4436
+ );
4437
+ });
4438
+ var Panel = {
4439
+ Group: Group3,
4440
+ Root: Root33,
4441
+ Trigger: Trigger7,
4442
+ Label: Label8,
4443
+ Content: Content9
4444
+ };
4445
+
4446
+ // src/app-shell/index.tsx
4447
+ import { appShellAnatomy, partAttrs as partAttrs37, scopeAttrs as scopeAttrs15 } from "@aeon-ui/core";
4448
+ import { appShellMachine } from "@aeon-ui/primitives";
4449
+ import {
4450
+ createContext as createContext27,
4451
+ forwardRef as forwardRef40,
4452
+ useContext as useContext26,
4453
+ useEffect as useEffect23,
4454
+ useMemo as useMemo23
4455
+ } from "react";
4456
+ import { jsx as jsx42 } from "react/jsx-runtime";
4457
+ var AppShellCtx = createContext27(null);
4458
+ function useAppShellContext() {
4459
+ const ctx = useContext26(AppShellCtx);
4460
+ if (!ctx) throw new Error("AppShell parts must be used within AppShell.Root");
4461
+ return ctx;
4462
+ }
4463
+ var Root34 = forwardRef40(function AppShellRoot({ defaultDockVisible = true, dockVisible: dockVisibleProp, children, ...rest }, ref) {
4464
+ const [snapshot, send] = useAeonMachine(appShellMachine, {
4465
+ input: { dockVisible: dockVisibleProp ?? defaultDockVisible }
4466
+ });
4467
+ const chrome = snapshot.value;
4468
+ const dockVisible = dockVisibleProp ?? snapshot.context.dockVisible;
4469
+ useEffect23(() => {
4470
+ if (dockVisibleProp === void 0) return;
4471
+ if (snapshot.context.dockVisible !== dockVisibleProp) {
4472
+ send({ type: "SET_DOCK", visible: dockVisibleProp });
4473
+ }
4474
+ }, [dockVisibleProp, snapshot.context.dockVisible, send]);
4475
+ const value = useMemo23(
4476
+ () => ({
4477
+ chrome,
4478
+ dockVisible,
4479
+ overlayOpen: chrome === "overlayOpen",
4480
+ send
4481
+ }),
4482
+ [chrome, dockVisible, send]
4483
+ );
4484
+ return /* @__PURE__ */ jsx42(AppShellCtx.Provider, { value, children: /* @__PURE__ */ jsx42(
4485
+ "div",
4486
+ {
4487
+ ref,
4488
+ "data-aeon-dock": dockVisible ? "visible" : "hidden",
4489
+ ...mergeProps(
4490
+ scopeAttrs15(appShellAnatomy.scope, appShellAnatomy.root, { state: chrome }),
4491
+ rest
4492
+ ),
4493
+ children
4494
+ }
4495
+ ) });
4496
+ });
4497
+ function ShellPart(part, displayName, defaultTag = "div") {
4498
+ const Comp = forwardRef40(
4499
+ function AeonShellPart({ as: Tag = defaultTag, ...rest }, ref) {
4500
+ const { chrome } = useAppShellContext();
4501
+ return /* @__PURE__ */ jsx42(
4502
+ Tag,
4503
+ {
4504
+ ref,
4505
+ ...mergeProps(partAttrs37(appShellAnatomy.scope, part, { state: chrome }), rest)
4506
+ }
4507
+ );
4508
+ }
4509
+ );
4510
+ Comp.displayName = displayName;
4511
+ return Comp;
4512
+ }
4513
+ var Header = ShellPart(appShellAnatomy.header, "AppShell.Header", "header");
4514
+ var Subheader = ShellPart(appShellAnatomy.subheader, "AppShell.Subheader");
4515
+ var Content10 = ShellPart(appShellAnatomy.content, "AppShell.Content", "main");
4516
+ var Aside = ShellPart(appShellAnatomy.aside, "AppShell.Aside", "aside");
4517
+ var Footer = ShellPart(appShellAnatomy.footer, "AppShell.Footer", "footer");
4518
+ var Dock = forwardRef40(function AppShellDock({ hidden, ...rest }, ref) {
4519
+ const { chrome, dockVisible } = useAppShellContext();
4520
+ if (!dockVisible) return null;
4521
+ return /* @__PURE__ */ jsx42(
4522
+ "div",
4523
+ {
4524
+ ref,
4525
+ hidden,
4526
+ ...mergeProps(partAttrs37(appShellAnatomy.scope, appShellAnatomy.dock, { state: chrome }), rest)
4527
+ }
4528
+ );
4529
+ });
4530
+ var Scrim = forwardRef40(function AppShellScrim(props, ref) {
4531
+ const { chrome, overlayOpen, send } = useAppShellContext();
4532
+ if (!overlayOpen) return null;
4533
+ return /* @__PURE__ */ jsx42(
4534
+ "div",
4535
+ {
4536
+ ref,
4537
+ role: "presentation",
4538
+ onClick: () => send({ type: "CLOSE_OVERLAY" }),
4539
+ ...mergeProps(partAttrs37(appShellAnatomy.scope, appShellAnatomy.scrim, { state: chrome }), props)
4540
+ }
4541
+ );
4542
+ });
4543
+ var AppShell = {
4544
+ Root: Root34,
4545
+ Header,
4546
+ Subheader,
4547
+ Content: Content10,
4548
+ Aside,
4549
+ Footer,
4550
+ Dock,
4551
+ Scrim
4552
+ };
4553
+
4554
+ // src/app-nav/index.tsx
4555
+ import {
4556
+ appNavAnatomy,
4557
+ partAttrs as partAttrs38,
4558
+ scopeAttrs as scopeAttrs16
4559
+ } from "@aeon-ui/core";
4560
+ import {
4561
+ appNavChild,
4562
+ appNavMachine,
4563
+ appNavStateAttr
4564
+ } from "@aeon-ui/primitives";
4565
+ import {
4566
+ createContext as createContext28,
4567
+ forwardRef as forwardRef41,
4568
+ useContext as useContext27,
4569
+ useMemo as useMemo24
4570
+ } from "react";
4571
+ import { jsx as jsx43 } from "react/jsx-runtime";
4572
+ var AppNavCtx = createContext28(null);
4573
+ function useAppNav() {
4574
+ const ctx = useContext27(AppNavCtx);
4575
+ if (!ctx) throw new Error("AppNav parts must be used within AppNav.Root");
4576
+ return ctx;
4577
+ }
4578
+ function useAppNavMachine(input) {
4579
+ const [snapshot, send] = useAeonMachine(appNavMachine, {
4580
+ input: { section: input?.section ?? "home", stack: input?.stack ?? [] }
4581
+ });
4582
+ const section = snapshot.context.section;
4583
+ const stack = snapshot.context.stack;
4584
+ const child = appNavChild(snapshot.context);
4585
+ const stateAttr = appNavStateAttr(snapshot.context);
4586
+ return useMemo24(
4587
+ () => ({
4588
+ section,
4589
+ stack,
4590
+ child,
4591
+ stateAttr,
4592
+ send,
4593
+ setSection: (next) => send({ type: "SET_SECTION", section: next }),
4594
+ push: (next) => send({ type: "PUSH", child: next }),
4595
+ replace: (next) => send({ type: "REPLACE", child: next }),
4596
+ pop: () => send({ type: "POP" }),
4597
+ popTo: (id) => send({ type: "POP_TO", id }),
4598
+ clear: () => send({ type: "CLEAR" }),
4599
+ reset: (next) => send({ type: "RESET", section: next })
4600
+ }),
4601
+ [section, stack, child, stateAttr, send]
4602
+ );
4603
+ }
4604
+ var Root35 = forwardRef41(function AppNavRoot({ defaultSection = "home", children, ...rest }, ref) {
4605
+ const nav = useAppNavMachine({ section: defaultSection });
4606
+ return /* @__PURE__ */ jsx43(AppNavCtx.Provider, { value: nav, children: /* @__PURE__ */ jsx43(
4607
+ "div",
4608
+ {
4609
+ ref,
4610
+ ...mergeProps(
4611
+ scopeAttrs16(appNavAnatomy.scope, appNavAnatomy.root, { state: nav.stateAttr }),
4612
+ rest
4613
+ ),
4614
+ children
4615
+ }
4616
+ ) });
4617
+ });
4618
+ var Rail = forwardRef41(function AppNavRail(props, ref) {
4619
+ const { stateAttr } = useAppNav();
4620
+ return /* @__PURE__ */ jsx43(
4621
+ "nav",
4622
+ {
4623
+ ref,
4624
+ ...mergeProps(partAttrs38(appNavAnatomy.scope, appNavAnatomy.rail, { state: stateAttr }), props)
4625
+ }
4626
+ );
4627
+ });
4628
+ var Section = forwardRef41(function AppNavSection({ value, onClick, ...rest }, ref) {
4629
+ const { section, child, setSection } = useAppNav();
4630
+ const isActive = section === value && !child;
4631
+ return /* @__PURE__ */ jsx43(
4632
+ "button",
4633
+ {
4634
+ ref,
4635
+ type: "button",
4636
+ "aria-current": isActive ? "page" : void 0,
4637
+ "data-aeon-value": value,
4638
+ onClick: (e) => {
4639
+ onClick?.(e);
4640
+ if (e.defaultPrevented) return;
4641
+ setSection(value);
4642
+ },
4643
+ ...mergeProps(
4644
+ partAttrs38(appNavAnatomy.scope, appNavAnatomy.section, {
4645
+ state: section === value ? child ? "section-active" : "active" : "inactive"
4646
+ }),
4647
+ rest
4648
+ )
4649
+ }
4650
+ );
4651
+ });
4652
+ var Stage = forwardRef41(function AppNavStage(props, ref) {
4653
+ const { stateAttr } = useAppNav();
4654
+ return /* @__PURE__ */ jsx43(
4655
+ "div",
4656
+ {
4657
+ ref,
4658
+ ...mergeProps(partAttrs38(appNavAnatomy.scope, appNavAnatomy.stage, { state: stateAttr }), props)
4659
+ }
4660
+ );
4661
+ });
4662
+ var Breadcrumb = forwardRef41(function AppNavBreadcrumb({ labels, ...rest }, ref) {
4663
+ const { section, stack, setSection, popTo, clear, stateAttr } = useAppNav();
4664
+ const crumbs = [
4665
+ { id: section, label: labels?.[0] ?? section, kind: "section" },
4666
+ ...stack.map((entry, i) => ({
4667
+ id: entry.id,
4668
+ label: labels?.[i + 1] ?? entry.type,
4669
+ kind: "child"
4670
+ }))
4671
+ ];
4672
+ return /* @__PURE__ */ jsx43(
4673
+ "nav",
4674
+ {
4675
+ ref,
4676
+ "aria-label": "Breadcrumb",
4677
+ ...mergeProps(
4678
+ partAttrs38(appNavAnatomy.scope, appNavAnatomy.breadcrumb, { state: stateAttr }),
4679
+ rest
4680
+ ),
4681
+ children: crumbs.map((crumb, index) => {
4682
+ const last = index === crumbs.length - 1;
4683
+ return /* @__PURE__ */ jsx43(
4684
+ "button",
4685
+ {
4686
+ type: "button",
4687
+ disabled: last,
4688
+ ...partAttrs38(appNavAnatomy.scope, appNavAnatomy.crumb, {
4689
+ state: last ? "current" : "ancestor"
4690
+ }),
4691
+ onClick: () => {
4692
+ if (crumb.kind === "section") {
4693
+ clear();
4694
+ setSection(crumb.id);
4695
+ } else {
4696
+ popTo(crumb.id);
4697
+ }
4698
+ },
4699
+ children: crumb.label
4700
+ },
4701
+ `${crumb.kind}:${crumb.id}`
4702
+ );
4703
+ })
4704
+ }
4705
+ );
4706
+ });
4707
+ var Back = forwardRef41(
4708
+ function AppNavBack({ onClick, children = "Back", ...rest }, ref) {
4709
+ const { child, pop, stateAttr } = useAppNav();
4710
+ if (!child) return null;
4711
+ return /* @__PURE__ */ jsx43(
4712
+ "button",
4713
+ {
4714
+ ref,
4715
+ type: "button",
4716
+ onClick: (e) => {
4717
+ onClick?.(e);
4718
+ if (e.defaultPrevented) return;
4719
+ pop();
4720
+ },
4721
+ ...mergeProps(
4722
+ partAttrs38(appNavAnatomy.scope, appNavAnatomy.back, { state: stateAttr }),
4723
+ rest
4724
+ ),
4725
+ children
4726
+ }
4727
+ );
4728
+ }
4729
+ );
4730
+ var AppNav = {
4731
+ Root: Root35,
4732
+ Rail,
4733
+ Section,
4734
+ Stage,
4735
+ Breadcrumb,
4736
+ Back
4737
+ };
4738
+
4739
+ // src/content/index.tsx
4740
+ import { contentAnatomy, partAttrs as partAttrs39, scopeAttrs as scopeAttrs17 } from "@aeon-ui/core";
4741
+ import { contentRegionMachine } from "@aeon-ui/primitives";
4742
+ import {
4743
+ createContext as createContext29,
4744
+ forwardRef as forwardRef42,
4745
+ useContext as useContext28,
4746
+ useMemo as useMemo25
4747
+ } from "react";
4748
+ import { jsx as jsx44 } from "react/jsx-runtime";
4749
+ var ContentCtx = createContext29(null);
4750
+ function useContentContext() {
4751
+ const ctx = useContext28(ContentCtx);
4752
+ if (!ctx) throw new Error("Content parts must be used within Content.Root");
4753
+ return ctx;
4754
+ }
4755
+ var Root36 = forwardRef42(function ContentRoot({ state: stateProp, children, ...rest }, ref) {
4756
+ const [snapshot, send] = useAeonMachine(contentRegionMachine);
4757
+ const machineState = snapshot.value;
4758
+ const state = stateProp ?? machineState;
4759
+ const value = useMemo25(
4760
+ () => ({ state, error: snapshot.context.error, send }),
4761
+ [state, snapshot.context.error, send]
4762
+ );
4763
+ return /* @__PURE__ */ jsx44(ContentCtx.Provider, { value, children: /* @__PURE__ */ jsx44(
4764
+ "div",
4765
+ {
4766
+ ref,
4767
+ ...mergeProps(scopeAttrs17(contentAnatomy.scope, contentAnatomy.root, { state }), rest),
4768
+ children
4769
+ }
4770
+ ) });
4771
+ });
4772
+ var Toolbar = forwardRef42(function ContentToolbar(props, ref) {
4773
+ const { state } = useContentContext();
4774
+ return /* @__PURE__ */ jsx44(
4775
+ "div",
4776
+ {
4777
+ ref,
4778
+ ...mergeProps(partAttrs39(contentAnatomy.scope, contentAnatomy.toolbar, { state }), props)
4779
+ }
4780
+ );
4781
+ });
4782
+ var Body3 = forwardRef42(function ContentBody({ hidden, ...rest }, ref) {
4783
+ const { state } = useContentContext();
4784
+ const show = state === "ready" || state === "loadingMore" || state === "success" || state === "idle";
4785
+ if (!show) return null;
4786
+ return /* @__PURE__ */ jsx44(
4787
+ "div",
4788
+ {
4789
+ ref,
4790
+ hidden,
4791
+ ...mergeProps(partAttrs39(contentAnatomy.scope, contentAnatomy.body, { state }), rest)
4792
+ }
4793
+ );
4794
+ });
4795
+ function StatusSlot(part, match, displayName) {
4796
+ const matches = Array.isArray(match) ? match : [match];
4797
+ const Comp = forwardRef42(function ContentStatusSlot(props, ref) {
4798
+ const { state } = useContentContext();
4799
+ if (!matches.includes(state)) return null;
4800
+ return /* @__PURE__ */ jsx44(
4801
+ "div",
4802
+ {
4803
+ ref,
4804
+ role: "status",
4805
+ ...mergeProps(partAttrs39(contentAnatomy.scope, part, { state }), props)
4806
+ }
4807
+ );
4808
+ });
4809
+ Comp.displayName = displayName;
4810
+ return Comp;
4811
+ }
4812
+ var Pending = StatusSlot(contentAnatomy.pending, "pending", "Content.Pending");
4813
+ var Empty2 = StatusSlot(contentAnatomy.empty, "empty", "Content.Empty");
4814
+ var ErrorSlot = StatusSlot(contentAnatomy.error, "error", "Content.Error");
4815
+ var Success = StatusSlot(contentAnatomy.success, "success", "Content.Success");
4816
+ var Sentinel = forwardRef42(function ContentSentinel(props, ref) {
4817
+ const { state } = useContentContext();
4818
+ if (state !== "ready" && state !== "loadingMore") return null;
4819
+ return /* @__PURE__ */ jsx44(
4820
+ "div",
4821
+ {
4822
+ ref,
4823
+ ...mergeProps(partAttrs39(contentAnatomy.scope, contentAnatomy.sentinel, { state }), props)
4824
+ }
4825
+ );
4826
+ });
4827
+ var Content11 = {
4828
+ Root: Root36,
4829
+ Toolbar,
4830
+ Body: Body3,
4831
+ Pending,
4832
+ Empty: Empty2,
4833
+ Error: ErrorSlot,
4834
+ Success,
4835
+ Sentinel
4836
+ };
4837
+
4838
+ // src/nav/index.tsx
4839
+ import { navAnatomy, partAttrs as partAttrs40, scopeAttrs as scopeAttrs18 } from "@aeon-ui/core";
4840
+ import { tabsMachine as tabsMachine3 } from "@aeon-ui/primitives";
4841
+ import {
4842
+ createContext as createContext30,
4843
+ forwardRef as forwardRef43,
4844
+ useContext as useContext29,
4845
+ useEffect as useEffect24,
4846
+ useMemo as useMemo26
4847
+ } from "react";
4848
+ import { jsx as jsx45 } from "react/jsx-runtime";
4849
+ var NavCtx = createContext30(null);
4850
+ function useNavCtx() {
4851
+ const ctx = useContext29(NavCtx);
4852
+ if (!ctx) throw new Error("Nav parts must be used within Nav.Root");
4853
+ return ctx;
4854
+ }
4855
+ var Root37 = forwardRef43(function NavRoot({
4856
+ defaultValue = "",
4857
+ value,
4858
+ onValueChange,
4859
+ as: Tag = "nav",
4860
+ orientation = "horizontal",
4861
+ children,
4862
+ ...rest
4863
+ }, ref) {
4864
+ const [snapshot, send] = useAeonMachine(tabsMachine3, {
4865
+ input: { value: defaultValue, disabled: false }
4866
+ });
4867
+ const resolvedValue = value ?? snapshot.context.value;
4868
+ useEffect24(() => {
4869
+ if (value !== void 0) send({ type: "SET_VALUE", value });
4870
+ }, [value, send]);
4871
+ const ctx = useMemo26(
4872
+ () => ({ value: resolvedValue, send, onValueChange }),
4873
+ [resolvedValue, send, onValueChange]
4874
+ );
4875
+ return /* @__PURE__ */ jsx45(NavCtx.Provider, { value: ctx, children: /* @__PURE__ */ jsx45(
4876
+ Tag,
4877
+ {
4878
+ ref,
4879
+ "data-aeon-orientation": orientation,
4880
+ ...mergeProps(scopeAttrs18(navAnatomy.scope, navAnatomy.root), rest),
4881
+ children
4882
+ }
4883
+ ) });
4884
+ });
4885
+ var Item8 = forwardRef43(function NavItem({ value, disabled, onClick, children, ...rest }, ref) {
4886
+ const { value: selected, send, onValueChange } = useNavCtx();
4887
+ const active = selected === value;
4888
+ const state = disabled ? "disabled" : active ? "active" : "inactive";
4889
+ return /* @__PURE__ */ jsx45(
4890
+ "button",
4891
+ {
4892
+ ref,
4893
+ type: "button",
4894
+ disabled,
4895
+ "aria-current": active ? "page" : void 0,
4896
+ "data-aeon-value": value,
4897
+ onClick: (e) => {
4898
+ onClick?.(e);
4899
+ if (disabled || e.defaultPrevented) return;
4900
+ send({ type: "SELECT", value });
4901
+ onValueChange?.(value);
4902
+ },
4903
+ ...mergeProps(partAttrs40(navAnatomy.scope, navAnatomy.item, { state, disabled }), rest),
4904
+ children
4905
+ }
4906
+ );
4907
+ });
4908
+ var Indicator3 = forwardRef43(function NavIndicator(props, ref) {
4909
+ return /* @__PURE__ */ jsx45(
4910
+ "span",
4911
+ {
4912
+ ref,
4913
+ "aria-hidden": true,
4914
+ ...mergeProps(partAttrs40(navAnatomy.scope, navAnatomy.indicator), props)
4915
+ }
4916
+ );
4917
+ });
4918
+ var Label9 = forwardRef43(function NavLabel(props, ref) {
4919
+ return /* @__PURE__ */ jsx45("span", { ref, ...mergeProps(partAttrs40(navAnatomy.scope, navAnatomy.label), props) });
4920
+ });
4921
+ var Icon2 = forwardRef43(function NavIcon(props, ref) {
4922
+ return /* @__PURE__ */ jsx45("span", { ref, ...mergeProps(partAttrs40(navAnatomy.scope, navAnatomy.icon), props) });
4923
+ });
4924
+ var Badge2 = forwardRef43(function NavBadge(props, ref) {
4925
+ return /* @__PURE__ */ jsx45("span", { ref, ...mergeProps(partAttrs40(navAnatomy.scope, navAnatomy.badge), props) });
4926
+ });
4927
+ var Nav = {
4928
+ Root: Root37,
4929
+ Item: Item8,
4930
+ Indicator: Indicator3,
4931
+ Label: Label9,
4932
+ Icon: Icon2,
4933
+ Badge: Badge2
4934
+ };
4935
+
4936
+ // src/sticky-bar/index.tsx
4937
+ import { barAnatomy as barAnatomy2, partAttrs as partAttrs41, scopeAttrs as scopeAttrs19 } from "@aeon-ui/core";
4938
+ import { stickyBarMachine } from "@aeon-ui/primitives";
4939
+ import {
4940
+ createContext as createContext31,
4941
+ forwardRef as forwardRef44,
4942
+ useContext as useContext30,
4943
+ useMemo as useMemo27
4944
+ } from "react";
4945
+ import { jsx as jsx46 } from "react/jsx-runtime";
4946
+ var StickyBarCtx = createContext31(null);
4947
+ function useStickyBarContext() {
4948
+ const ctx = useContext30(StickyBarCtx);
4949
+ if (!ctx) throw new Error("StickyBar parts must be used within StickyBar.Root");
4950
+ return ctx;
4951
+ }
4952
+ var Root38 = forwardRef44(function StickyBarRoot({
4953
+ /* Default div — AppShell.Header is already the landmark; nested <header> is invalid
4954
+ HTML and browsers auto-close the outer header (0-height), so the bar covers content. */
4955
+ as: Tag = "div",
4956
+ placement = "top",
4957
+ defaultState = "floating",
4958
+ children,
4959
+ style,
4960
+ ...rest
4961
+ }, ref) {
4962
+ const [snapshot, send] = useAeonMachine(stickyBarMachine, {
4963
+ input: { initial: defaultState }
4964
+ });
4965
+ const state = snapshot.value;
4966
+ const offsetPx = snapshot.context.offsetPx;
4967
+ const value = useMemo27(() => ({ state, offsetPx, send }), [state, offsetPx, send]);
4968
+ if (state === "hidden") return null;
4969
+ const stickyStyle = {
4970
+ ...typeof style === "object" && style ? style : {},
4971
+ ...offsetPx > 0 ? { ["--aeon-bar-offset"]: `${offsetPx}px` } : {}
4972
+ };
4973
+ return /* @__PURE__ */ jsx46(StickyBarCtx.Provider, { value, children: /* @__PURE__ */ jsx46(
4974
+ Tag,
4975
+ {
4976
+ ref,
4977
+ "data-aeon-placement": placement,
4978
+ style: stickyStyle,
4979
+ ...mergeProps(scopeAttrs19(barAnatomy2.scope, barAnatomy2.root, { state }), rest),
4980
+ children
4981
+ }
4982
+ ) });
4983
+ });
4984
+ var Zone2 = forwardRef44(function StickyBarZone({ zone, ...rest }, ref) {
4985
+ const { state } = useStickyBarContext();
4986
+ return /* @__PURE__ */ jsx46(
4987
+ "div",
4988
+ {
4989
+ ref,
4990
+ ...mergeProps(partAttrs41(barAnatomy2.scope, zone, { state }), rest)
4991
+ }
4992
+ );
4993
+ });
4994
+ var Leading2 = forwardRef44(
4995
+ function StickyBarLeading(props, ref) {
4996
+ return /* @__PURE__ */ jsx46(Zone2, { ref, zone: "leading", ...props });
4997
+ }
4998
+ );
4999
+ var Center = forwardRef44(
5000
+ function StickyBarCenter(props, ref) {
5001
+ return /* @__PURE__ */ jsx46(Zone2, { ref, zone: "center", ...props });
5002
+ }
5003
+ );
5004
+ var Trailing3 = forwardRef44(
5005
+ function StickyBarTrailing(props, ref) {
5006
+ return /* @__PURE__ */ jsx46(Zone2, { ref, zone: "trailing", ...props });
5007
+ }
5008
+ );
5009
+ var Seam = forwardRef44(function StickyBarSeam(props, ref) {
5010
+ const { state } = useStickyBarContext();
5011
+ return /* @__PURE__ */ jsx46(
5012
+ "div",
5013
+ {
5014
+ ref,
5015
+ "aria-hidden": true,
5016
+ ...mergeProps(partAttrs41(barAnatomy2.scope, barAnatomy2.seam, { state }), props)
5017
+ }
5018
+ );
5019
+ });
5020
+ var StickyBar = {
5021
+ Root: Root38,
5022
+ Leading: Leading2,
5023
+ Center,
5024
+ Trailing: Trailing3,
5025
+ Seam
5026
+ };
5027
+
5028
+ // src/hooks/use-layout-mode.ts
5029
+ import { getCompactMq, layoutCompositionForMode, matchLayoutMode } from "@aeon-ui/core";
5030
+ import { useEffect as useEffect25, useMemo as useMemo28, useState as useState11 } from "react";
5031
+ function useLayoutMode(spec) {
5032
+ const mq = useMemo28(() => getCompactMq(spec), [spec.compactMq]);
5033
+ const [mode, setMode] = useState11(() => matchLayoutMode(spec, mq));
5034
+ useEffect25(() => {
5035
+ const sync = () => setMode(matchLayoutMode(spec, mq));
5036
+ sync();
5037
+ mq.addEventListener("change", sync);
5038
+ return () => mq.removeEventListener("change", sync);
5039
+ }, [spec, mq]);
5040
+ const composition = useMemo28(() => layoutCompositionForMode(spec, mode), [spec, mode]);
5041
+ return { mode, composition };
5042
+ }
5043
+
5044
+ // src/hooks/use-fit-text.ts
5045
+ import { useLayoutEffect as useLayoutEffect3 } from "react";
5046
+ function useFitText(slotRef, contentRef, opts = {}) {
5047
+ const maxPx = opts.maxPx ?? 28;
5048
+ const minPx = opts.minPx ?? 8;
5049
+ const watch = opts.watch;
5050
+ useLayoutEffect3(() => {
5051
+ const slot = slotRef.current;
5052
+ const content = contentRef.current;
5053
+ if (!slot || !content) return;
5054
+ const fit = () => {
5055
+ const available = slot.clientWidth;
5056
+ if (available <= 0) return;
5057
+ content.style.transform = "";
5058
+ content.style.transformOrigin = "";
5059
+ content.style.fontSize = `${maxPx}px`;
5060
+ let size = maxPx;
5061
+ while (size > minPx && content.scrollWidth > available + 0.5) {
5062
+ size -= 0.5;
5063
+ content.style.fontSize = `${size}px`;
5064
+ }
5065
+ if (content.scrollWidth > available + 0.5) {
5066
+ const scale = Math.max(0.35, available / content.scrollWidth);
5067
+ content.style.transformOrigin = "center center";
5068
+ content.style.transform = `scale(${scale})`;
5069
+ }
5070
+ };
5071
+ fit();
5072
+ const ro = new ResizeObserver(fit);
5073
+ ro.observe(slot);
5074
+ return () => {
5075
+ ro.disconnect();
5076
+ content.style.fontSize = "";
5077
+ content.style.transform = "";
5078
+ content.style.transformOrigin = "";
5079
+ };
5080
+ }, [slotRef, contentRef, maxPx, minPx, watch]);
3421
5081
  }
3422
5082
  export {
3423
5083
  Accordion,
5084
+ AppNav,
5085
+ AppShell,
3424
5086
  Async,
3425
5087
  AsyncActions,
3426
5088
  AsyncProvider,
3427
5089
  AsyncReadout,
3428
- AsyncRegion,
3429
5090
  AsyncRoot,
3430
5091
  AsyncTrack,
3431
5092
  Avatar,
5093
+ Bar,
3432
5094
  Button,
3433
5095
  Checkbox,
3434
5096
  Combobox,
5097
+ Composer,
5098
+ Content11 as Content,
5099
+ Conversation,
3435
5100
  Dialog,
5101
+ Entry,
3436
5102
  Field,
5103
+ Identity,
5104
+ ListRow,
3437
5105
  Menu,
5106
+ MetricStrip,
5107
+ Nav,
5108
+ Panel,
3438
5109
  PinInput,
3439
5110
  Popover,
5111
+ ProfileHeader,
3440
5112
  Progress,
5113
+ Prompt,
3441
5114
  RadioGroup,
3442
5115
  Scroll,
3443
5116
  Select,
3444
5117
  Separator,
3445
5118
  Slider,
5119
+ StatusBanner,
5120
+ StickyBar,
3446
5121
  Switch,
3447
5122
  Tabs,
5123
+ ThemeSwitcher,
5124
+ Thread,
3448
5125
  Toast,
3449
5126
  ToastItem,
3450
5127
  Tooltip,
3451
- createAsyncMachine3 as createAsyncMachine,
5128
+ asyncStatusToContentState,
5129
+ createAsyncMachine2 as createAsyncMachine,
3452
5130
  fieldMachine,
3453
5131
  useAeonMachine,
5132
+ useAppNav,
5133
+ useAppNavMachine,
5134
+ useAppShellContext,
3454
5135
  useAsyncContext,
5136
+ useContentContext,
3455
5137
  useFieldContext,
5138
+ useFitText,
3456
5139
  useLayoutMode,
3457
5140
  useScrollContext,
3458
5141
  useScrollState,
5142
+ useStickyBarContext,
3459
5143
  useToast,
3460
5144
  useToastStore
3461
5145
  };