@astryx-vue/core 0.2.3 → 0.2.5

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 (288) hide show
  1. package/README.md +28 -26
  2. package/THIRD_PARTY_NOTICES.md +2 -0
  3. package/dist/AlertDialog/index.js +1 -1
  4. package/dist/{AlertDialog-ovx4cBjM.js → AlertDialog-B6UeBCE7.js} +2 -2
  5. package/dist/AppShell/index.js +1 -1
  6. package/dist/{AppShell-Dd-D4bA2.js → AppShell-CeBmB0Q9.js} +2 -2
  7. package/dist/Avatar/index.d.ts +1 -1
  8. package/dist/Avatar/index.js +1 -1
  9. package/dist/{Avatar-jmHInHwj.js → Avatar-BB4Z4LF1.js} +10 -4
  10. package/dist/AvatarGroup/index.d.ts +1 -1
  11. package/dist/Banner/index.d.ts +1 -1
  12. package/dist/BottomSheet/index.d.ts +2 -2
  13. package/dist/BottomSheet/index.js +3 -2
  14. package/dist/{BottomSheet-Dg95HB1s.js → BottomSheet-BV6vfgGu.js} +82 -22
  15. package/dist/BottomSheet-o7xw-TOi.js +153 -0
  16. package/dist/Breadcrumbs/index.d.ts +2 -2
  17. package/dist/Breadcrumbs/index.js +2 -2
  18. package/dist/{Breadcrumbs-CWGfgLNK.js → Breadcrumbs-D6G7f5WL.js} +1 -1
  19. package/dist/Button/index.d.ts +1 -1
  20. package/dist/ButtonGroup/index.d.ts +1 -1
  21. package/dist/Calendar/index.d.ts +1 -1
  22. package/dist/Calendar/index.js +1 -1
  23. package/dist/{Calendar-CnOsSjMY.js → Calendar-DmTeM7PO.js} +2 -2
  24. package/dist/Carousel/index.js +1 -1
  25. package/dist/{Carousel-JA7ilqI_.js → Carousel-CIKrcA2r.js} +1 -1
  26. package/dist/Chat/index.js +1 -1
  27. package/dist/{Chat-C7WrCOE4.js → Chat-BFox3u9D.js} +1 -1
  28. package/dist/CheckboxInput/index.d.ts +1 -1
  29. package/dist/CheckboxList/index.d.ts +1 -1
  30. package/dist/CheckboxList/index.js +1 -1
  31. package/dist/{CheckboxList-CnCGnkZk.js → CheckboxList-BlPf7vPe.js} +4 -4
  32. package/dist/Citation/index.js +1 -1
  33. package/dist/{Citation-CtwrU33I.js → Citation-BG-vg9ia.js} +1 -1
  34. package/dist/ClickableCard/index.d.ts +1 -1
  35. package/dist/Code/index.d.ts +3 -3
  36. package/dist/Code/index.js +4 -4
  37. package/dist/{Code-BvefYRpx.js → Code-XnPuGxey.js} +1 -1
  38. package/dist/{CodeBlock-BZGzYeoL.js → CodeBlock-B2pnEOJY.js} +145 -15
  39. package/dist/CommandPalette/index.js +1 -1
  40. package/dist/{CommandPalette-BNbM9T9y.js → CommandPalette-DKgHzmJk.js} +10 -10
  41. package/dist/ComplexSelector/index.js +1 -1
  42. package/dist/{ComplexSelector-LtbLlrcj.js → ComplexSelector-Dv44FFhN.js} +1 -1
  43. package/dist/ContextMenu/index.d.ts +2 -2
  44. package/dist/ContextMenu/index.js +2 -2
  45. package/dist/{ContextMenu-DVQl0xL5.js → ContextMenu-BeJO5HYx.js} +4 -369
  46. package/dist/DateInput/index.d.ts +1 -1
  47. package/dist/DateInput/index.js +1 -1
  48. package/dist/{DateInput-zm8sNc0t.js → DateInput-D4XFAEMp.js} +3 -3
  49. package/dist/DateRangeInput/index.d.ts +1 -1
  50. package/dist/DateRangeInput/index.js +1 -1
  51. package/dist/{DateRangeInput-DlVFzrf7.js → DateRangeInput-Cp6AZfew.js} +2 -2
  52. package/dist/DateTimeInput/index.d.ts +1 -1
  53. package/dist/DateTimeInput/index.js +1 -1
  54. package/dist/{DateTimeInput-C7Z-p6Yd.js → DateTimeInput-B6MPPp76.js} +3 -3
  55. package/dist/DropdownMenu/index.d.ts +2 -2
  56. package/dist/DropdownMenu/index.js +3 -3
  57. package/dist/{DropdownMenu-BoZChdev.js → DropdownMenu--lnUeJEG.js} +3 -3
  58. package/dist/{DropdownMenu-u1psFjis.js → DropdownMenu-6E9jFdFe.js} +4 -4
  59. package/dist/{DropdownMenuRadioItem.vue-uVM0FD2f.d.ts → DropdownMenuRadioItem.vue-CXEURBcq.d.ts} +1 -1
  60. package/dist/EmptyState/index.js +1 -1
  61. package/dist/{EmptyState-CUJdTYKV.js → EmptyState-0RWymQUS.js} +2 -2
  62. package/dist/FileInput/index.d.ts +1 -1
  63. package/dist/FileInput/index.js +1 -1
  64. package/dist/{FileInput-QdlZn7qK.js → FileInput-DuNwdbAo.js} +1 -1
  65. package/dist/Grid/index.d.ts +1 -1
  66. package/dist/Heading/index.d.ts +2 -2
  67. package/dist/Heading/index.js +1 -1
  68. package/dist/Heading-B9C3LZlS.js +94 -0
  69. package/dist/Indicator/index.d.ts +2 -2
  70. package/dist/InputGroup/index.d.ts +1 -1
  71. package/dist/Item-DrYJL1TG.js +590 -0
  72. package/dist/Lightbox/index.js +1 -1
  73. package/dist/{Lightbox-BSzfqZ-u.js → Lightbox-Br3o0SyQ.js} +1 -1
  74. package/dist/Link/index.d.ts +3 -2
  75. package/dist/Link/index.js +1 -1
  76. package/dist/Link-DCZ6922-.js +196 -0
  77. package/dist/List/index.d.ts +3 -3
  78. package/dist/List/index.js +2 -2
  79. package/dist/{ListItem-pGxvn6QJ.js → ListItem-CcRHWuEm.js} +8 -2
  80. package/dist/Markdown/index.d.ts +2 -2
  81. package/dist/Markdown/index.js +2 -2
  82. package/dist/{Markdown-B6tSqenv.js → Markdown-Bz0R3kNj.js} +274 -30
  83. package/dist/MetadataList/index.js +1 -1
  84. package/dist/{MetadataList-aN1tRn6W.js → MetadataList-CFaocx6j.js} +1 -1
  85. package/dist/MobileNav/index.js +1 -1
  86. package/dist/{MobileNavToggle-fqcSafkc.js → MobileNavToggle-Dh3uLivq.js} +1 -1
  87. package/dist/MoreMenu/index.d.ts +1 -1
  88. package/dist/MoreMenu/index.js +1 -1
  89. package/dist/{MoreMenu-B3brqdK_.js → MoreMenu-B95nRSe8.js} +2 -2
  90. package/dist/MultiSelector/index.d.ts +1 -1
  91. package/dist/MultiSelector/index.js +1 -1
  92. package/dist/{MultiSelector-BD5PMgez.js → MultiSelector-DuF5TECE.js} +4 -4
  93. package/dist/{NavDisclosure-DbYLDXK0.js → NavDisclosure-C6sPZ89n.js} +4 -1
  94. package/dist/NavHeadingSurface-Cb3x9iDx.js +287 -0
  95. package/dist/NavItem/index.d.ts +1 -1
  96. package/dist/NavMenu/index.d.ts +2 -2
  97. package/dist/NavMenu/index.js +4 -3
  98. package/dist/NavMenu-ClIgMaxE.js +176 -0
  99. package/dist/{NavMenuItem-DrwIMHKO.js → NavMenuItem-E7S8gBh-.js} +1 -1
  100. package/dist/NumberInput/index.d.ts +1 -1
  101. package/dist/NumberInput/index.js +1 -1
  102. package/dist/{NumberInput-CBeU4lEl.js → NumberInput-B4IL3s_8.js} +1 -1
  103. package/dist/Outline/index.js +1 -1
  104. package/dist/{Outline--HVMSB6i.js → Outline-DBUuchi9.js} +1 -1
  105. package/dist/OverflowList/index.d.ts +1 -1
  106. package/dist/OverflowList/index.js +1 -1
  107. package/dist/{OverflowList-FMh7r-r_.js → OverflowList-aDd_oem0.js} +3 -3
  108. package/dist/Pagination/index.d.ts +1 -1
  109. package/dist/Pagination/index.js +1 -1
  110. package/dist/{Pagination-DlIvESjx.js → Pagination-CNe9F6Fl.js} +181 -45
  111. package/dist/Popover/index.d.ts +1 -1
  112. package/dist/PowerSearch/index.d.ts +1 -1
  113. package/dist/PowerSearch/index.js +1 -1
  114. package/dist/{PowerSearch-CMG7Rb69.js → PowerSearch-C6U8Sq1Y.js} +13 -13
  115. package/dist/ProgressBar/index.d.ts +2 -2
  116. package/dist/ProgressBar/index.js +1 -1
  117. package/dist/{ProgressBar-DO9Chic6.js → ProgressBar-DF6WZNCI.js} +45 -6
  118. package/dist/Radio/index.d.ts +1 -1
  119. package/dist/RadioList/index.d.ts +1 -1
  120. package/dist/Resizable/index.d.ts +1 -1
  121. package/dist/Resizable/index.js +1 -1
  122. package/dist/{Resizable-CXpvj1TZ.js → ResizeHandle-DYy0e3v9.js} +1 -1
  123. package/dist/ScrollableArea/index.d.ts +1 -1
  124. package/dist/SelectableCard/index.d.ts +1 -1
  125. package/dist/Selector/index.d.ts +1 -1
  126. package/dist/Selector/index.js +1 -1
  127. package/dist/{Selector-BpPnuWH3.js → Selector-5N-hq2nF.js} +3 -3
  128. package/dist/SideNav/index.d.ts +2 -2
  129. package/dist/SideNav/index.js +1 -1
  130. package/dist/{SideNav-D4TupqgE.js → SideNav-CT9lfspi.js} +225 -229
  131. package/dist/Stack/index.d.ts +1 -1
  132. package/dist/Stepper/index.js +1 -1
  133. package/dist/{Stepper-H-6-T5Ps.js → Stepper-BqhVCgC-.js} +1 -1
  134. package/dist/Switch/index.d.ts +1 -1
  135. package/dist/Table/index.js +1 -1
  136. package/dist/{Table-nqA_njNz.js → Table-CsdH8fCB.js} +4 -4
  137. package/dist/Text/index.d.ts +3 -3
  138. package/dist/Text/index.js +1 -1
  139. package/dist/Text-DIzZw6FA.js +86 -0
  140. package/dist/TextArea/index.d.ts +1 -1
  141. package/dist/TextInput/index.d.ts +1 -1
  142. package/dist/Theme/index.d.ts +3 -3
  143. package/dist/Theme/index.js +2 -2
  144. package/dist/Theme-CtaUWo4g.js +1246 -0
  145. package/dist/Thumbnail/index.js +1 -1
  146. package/dist/{Thumbnail-CXb3m_Hv.js → Thumbnail-BnQwX1cQ.js} +2 -2
  147. package/dist/{TimeField-B3cndWb0.js → TimeField-Biiuv0hB.js} +1 -1
  148. package/dist/TimeInput/index.d.ts +1 -1
  149. package/dist/TimeInput/index.js +1 -1
  150. package/dist/{TimeInput-BHQ_LKGm.js → TimeInput-C9gptCOK.js} +1 -1
  151. package/dist/Timer/index.d.ts +1 -1
  152. package/dist/Timer/index.js +1 -1
  153. package/dist/{Timer-B7GV6hqd.js → Timer-kxzQx3tp.js} +1 -1
  154. package/dist/Timestamp/index.d.ts +1 -1
  155. package/dist/Timestamp/index.js +1 -1
  156. package/dist/{Timestamp-Cfuxbb3i.js → Timestamp-D7bd_nF3.js} +2 -2
  157. package/dist/ToggleButton/index.d.ts +1 -1
  158. package/dist/Token/index.d.ts +1 -1
  159. package/dist/Token/index.js +1 -1
  160. package/dist/{Token-CdVLH0_H.js → Token-D2GsI_Ei.js} +1 -1
  161. package/dist/Tokenizer/index.js +1 -1
  162. package/dist/{Tokenizer-DlD-S_8-.js → Tokenizer-rwzamZg4.js} +3 -3
  163. package/dist/Toolbar/index.d.ts +1 -1
  164. package/dist/Tooltip/index.d.ts +1 -1
  165. package/dist/Tooltip/index.js +1 -1
  166. package/dist/{Tooltip-mp0NMh_Y.js → Tooltip-C2fh9anJ.js} +23 -8
  167. package/dist/TopNav/index.d.ts +1 -1
  168. package/dist/TopNav/index.js +1 -1
  169. package/dist/{TopNav-DzV874G7.js → TopNav-arWFLTBM.js} +112 -42
  170. package/dist/TreeList/index.js +1 -1
  171. package/dist/{TreeList-DEwvlZRV.js → TreeList-C9xvMpJZ.js} +1 -1
  172. package/dist/Typeahead/index.d.ts +2 -2
  173. package/dist/Typeahead/index.js +3 -2
  174. package/dist/Typeahead-_V11btpv.js +499 -0
  175. package/dist/{TypeaheadMenu-CGvo0Tud.js → TypeaheadMenu-BEObzonz.js} +46 -10
  176. package/dist/composables/index.d.ts +2 -2
  177. package/dist/composables/index.js +4 -4
  178. package/dist/composables-CWw6t-RJ.js +520 -0
  179. package/dist/{context-DmOLCubj.js → context-CPh7kE-a.js} +58 -10
  180. package/dist/{index-BRfR0lhb.d.ts → index-12QYAbiz.d.ts} +1 -1
  181. package/dist/{index-D1Twv_fL.d.ts → index-4TRnFGxv.d.ts} +6 -6
  182. package/dist/{index-BTAgQRP0.d.ts → index-B9rqmYxh.d.ts} +150 -62
  183. package/dist/index-BBtJt5_A.d.ts +26 -0
  184. package/dist/{index-Ch6BbxCP.d.ts → index-BH9PzQ1F.d.ts} +13 -8
  185. package/dist/{index-C2sfHfBw.d.ts → index-BK9T1TPZ.d.ts} +4 -4
  186. package/dist/{index-D_UEJIU5.d.ts → index-BPwD6aBv.d.ts} +1 -1
  187. package/dist/{index-B1x05arQ.d.ts → index-BlOIC_AM.d.ts} +1 -1
  188. package/dist/{index-C5p2NeCr.d.ts → index-Blm197N_.d.ts} +11 -2
  189. package/dist/{index-Bu3oXIIS.d.ts → index-BmmdzwT9.d.ts} +6 -0
  190. package/dist/{index-MPcg1Pm4.d.ts → index-BpH4wvsg.d.ts} +2 -2
  191. package/dist/{index-BMn9ghAX.d.ts → index-C1HIqW_H.d.ts} +2 -2
  192. package/dist/{index-LIyvJTW3.d.ts → index-C3GaPqvJ.d.ts} +84 -8
  193. package/dist/{index-DkVEBdWa.d.ts → index-CB9Srua5.d.ts} +1 -1
  194. package/dist/{index-C8wDPDcP.d.ts → index-CLmKfnqf.d.ts} +49 -7
  195. package/dist/{index-DMQG6kdM.d.ts → index-CPwzSbQQ.d.ts} +2 -2
  196. package/dist/{index-DAiGhkNZ.d.ts → index-D4I_obqR.d.ts} +1 -1
  197. package/dist/{index-foQMNKZO.d.ts → index-D5N9ikrS.d.ts} +48 -2
  198. package/dist/{index-D8o50qOE.d.ts → index-DFbvnBlf.d.ts} +31 -2
  199. package/dist/{index-Cm_TiLXU.d.ts → index-Dgg0bHVM.d.ts} +7 -3
  200. package/dist/{index-ViSV0RBx.d.ts → index-DjMwF8ET.d.ts} +11 -1
  201. package/dist/{index-nCEmW6wa.d.ts → index-DtePJ_w_.d.ts} +1 -1
  202. package/dist/index-DxR1FChm.d.ts +158 -0
  203. package/dist/{index-f4NGT-e2.d.ts → index-EFqQF2Bx.d.ts} +1 -1
  204. package/dist/{index-BB5yVIN-.d.ts → index-JL4auphT.d.ts} +2 -2
  205. package/dist/{index-B9f1rUEv.d.ts → index-XuAAcYiP.d.ts} +1 -1
  206. package/dist/{index-D0TlUOtG.d.ts → index-YmSe1ujk.d.ts} +76 -3
  207. package/dist/{index-BMrggCw-.d.ts → index-bvr3WHvs.d.ts} +1 -1
  208. package/dist/{index-CDDMDHJM.d.ts → index-c67ca7eJ.d.ts} +1 -1
  209. package/dist/{index-CGZ2xi3r.d.ts → index-eshFLli0.d.ts} +40 -3
  210. package/dist/{index-DxsKyAxq.d.ts → index-vizlhXVs.d.ts} +131 -2
  211. package/dist/{index-DfgHJE7H.d.ts → index-z3uLM1O6.d.ts} +153 -24
  212. package/dist/index.d.ts +80 -79
  213. package/dist/index.js +118 -115
  214. package/dist/locale/index.d.ts +2 -2
  215. package/dist/locale/index.js +3 -3
  216. package/dist/locale-sLw5Caia.js +917 -0
  217. package/dist/{searchResultMessage-DN0HeRRB.js → searchResultMessage-CCnq-_ce.js} +1 -1
  218. package/dist/syntaxTheme-CwVEcVDk.d.ts +57 -0
  219. package/dist/{syntaxTheme-ClpWALZX.js → syntaxTheme-R7xnu5x5.js} +24 -3
  220. package/dist/{types-Bt-lSgYX.d.ts → types-D9nP_X-c.d.ts} +14 -1
  221. package/dist/{types-CAZY4Xua.d.ts → types-DGYHIu4I.d.ts} +30 -1
  222. package/dist/types-D_J66aPN.d.ts +85 -0
  223. package/dist/types-gKsEkk2g.d.ts +320 -0
  224. package/dist/{useMenuDrillIn-OaEwjK44.js → useMenuDrillIn-BgjJcY3K.js} +1 -1
  225. package/dist/useMenuPress-DUmEy4TB.js +425 -0
  226. package/dist/{composables-DDI08XFF.js → useResizable-B3ahKLoZ.js} +73 -248
  227. package/dist/useTruncation-B5qXQzAP.js +53 -0
  228. package/locales/SOURCE.json +37 -0
  229. package/locales/af-ZA.json +1482 -0
  230. package/locales/ar-SA.json +1482 -0
  231. package/locales/ca-ES.json +1482 -0
  232. package/locales/cs-CZ.json +1482 -0
  233. package/locales/da-DK.json +1482 -0
  234. package/locales/de-DE.json +1482 -0
  235. package/locales/el-GR.json +1482 -0
  236. package/locales/en.json +1646 -0
  237. package/locales/es-ES.json +1482 -0
  238. package/locales/fi-FI.json +1482 -0
  239. package/locales/fr-FR.json +1482 -0
  240. package/locales/he-IL.json +1482 -0
  241. package/locales/hu-HU.json +1482 -0
  242. package/locales/it-IT.json +1482 -0
  243. package/locales/ja-JP.json +1482 -0
  244. package/locales/ko-KR.json +1482 -0
  245. package/locales/nl-NL.json +1482 -0
  246. package/locales/no-NO.json +1482 -0
  247. package/locales/pl-PL.json +1482 -0
  248. package/locales/pt-BR.json +1482 -0
  249. package/locales/pt-PT.json +1482 -0
  250. package/locales/ro-RO.json +1482 -0
  251. package/locales/ru-RU.json +1482 -0
  252. package/locales/sr-SP.json +1482 -0
  253. package/locales/sv-SE.json +1482 -0
  254. package/locales/tr-TR.json +1482 -0
  255. package/locales/uk-UA.json +1482 -0
  256. package/locales/vi-VN.json +1482 -0
  257. package/locales/zh-CN.json +1482 -0
  258. package/locales/zh-TW.json +1482 -0
  259. package/package.json +4 -2
  260. package/styles/bottom-sheet.css +27 -0
  261. package/styles/code.css +62 -0
  262. package/styles/container-reveal.css +104 -0
  263. package/styles/heading.css +47 -0
  264. package/styles/keyboard-hint.css +28 -0
  265. package/styles/link.css +34 -0
  266. package/styles/list.css +88 -1
  267. package/styles/markdown.css +12 -0
  268. package/styles/pagination.css +30 -0
  269. package/styles/progress-bar.css +49 -0
  270. package/styles/side-nav.css +36 -1
  271. package/styles/text.css +18 -0
  272. package/styles/top-nav.css +145 -6
  273. package/styles/typeahead.css +24 -0
  274. package/styles.css +2 -0
  275. package/dist/Heading-Dugosn6j.js +0 -43
  276. package/dist/Item-C1z6gXn8.js +0 -289
  277. package/dist/Link-DqdQZ37C.js +0 -141
  278. package/dist/Text-BHVghsWo.js +0 -53
  279. package/dist/Theme-CejS9MHm.js +0 -447
  280. package/dist/Typeahead-DQ3tmqYe.js +0 -375
  281. package/dist/index-Bqb_Fyju.d.ts +0 -80
  282. package/dist/index-Dg3ZmwEg.d.ts +0 -75
  283. package/dist/locale-CCwVnyMZ.js +0 -42
  284. package/dist/syntaxTheme-Bcs1YMF7.d.ts +0 -38
  285. package/dist/types-jmqqnkKA.d.ts +0 -163
  286. package/dist/useHotkeys-dABSK1o9.js +0 -80
  287. package/dist/useLongPress-Cyxwa73s.js +0 -60
  288. package/dist/{index-BXkNZF3q.d.ts → index-CpiWVbRZ.d.ts} +1 -1
package/README.md CHANGED
@@ -1,54 +1,56 @@
1
1
  # @astryx-vue/core
2
2
 
3
- Vue components for astryx-vue.
3
+ Vue 3 components for [astryx-vue](https://github.com/astryx-vue/astryx-vue), an unofficial port of Astryx. Not affiliated with Meta.
4
4
 
5
- Docs: <https://astryx-vue.pages.dev>
5
+ > **Using an agent?** Install `@astryx-vue/cli` and run `astryx-vue component Button`, or `astryx-vue init --features agents` so the agent looks components up instead of guessing. The binary is `astryx-vue`, not `astryx`.
6
6
 
7
- ```bash
7
+ ## Install
8
+
9
+ ```sh
8
10
  pnpm add @astryx-vue/core @astryx-vue/themes
9
11
  ```
10
12
 
11
- Component entries load structural styles. Import a theme once at the app entry. To load every structural stylesheet yourself, also import `@astryx-vue/core/styles.css`.
13
+ Peer dependency: `vue` `^3.5.0`.
14
+
15
+ ## Use
16
+
17
+ Import a theme once at the app entry, then import the component you need from its subpath. The subpath loads that component's structural styles. You do not need StyleX or UnoCSS.
12
18
 
13
19
  ```ts
14
- import { Badge } from '@astryx-vue/core/Badge'
15
- import '@astryx-vue/core/styles.css'
16
20
  import '@astryx-vue/themes/neutral.css'
17
21
  ```
18
22
 
19
23
  ```vue
20
24
  <script setup lang="ts">
21
- import { Badge } from '@astryx-vue/core/Badge'
25
+ import { Button } from '@astryx-vue/core/Button'
22
26
  </script>
23
27
 
24
28
  <template>
25
- <Badge variant="success">
26
- Ready
27
- </Badge>
29
+ <Button label="Save changes" variant="primary" />
28
30
  </template>
29
31
  ```
30
32
 
31
- Text inputs include their own label, description and validation status:
32
-
33
- ```vue
34
- <script setup lang="ts">
35
- import { TextInput } from '@astryx-vue/core/TextInput'
36
- import { shallowRef } from 'vue'
33
+ Prefer a subpath such as `@astryx-vue/core/Button` over the package root. The root re-exports the same components, and a bundler that keeps unused re-exports can pull in more than you asked for. Import `@astryx-vue/core/styles.css` only when you want every structural sheet in one file.
37
34
 
38
- const email = shallowRef('')
39
- </script>
35
+ Props, slots, and events are on the docs site, or:
40
36
 
41
- <template>
42
- <TextInput v-model="email" label="Email" type="email" auto-complete="email" />
43
- </template>
37
+ ```sh
38
+ npx @astryx-vue/cli component Button
44
39
  ```
45
40
 
46
- Use `Field` and `FieldLabel` from `@astryx-vue/core/Field`, and `FieldStatus` from `@astryx-vue/core/FieldStatus`, for custom controls. `Field` supplies association IDs through its default slot; forward them to the control's `id`, `aria-labelledby` and `aria-describedby`.
41
+ ## Related packages
42
+
43
+ | Package | What it is |
44
+ | --- | --- |
45
+ | `@astryx-vue/themes` | Neutral, Butter, Chocolate, Gothic, Matcha, Stone, and Y2K |
46
+ | `@astryx-vue/cli` | `astryx-vue` for component docs, search, and agent context |
47
47
 
48
- `TextInput` supports clear buttons, disabled reasons, read-only values, three sizes, status messages and asynchronous `changeAction`. Use `@action-error` to handle failed actions. Inputs remain editable while actions are pending; request cancellation and stale-result handling belong to the application.
48
+ ## Resources
49
49
 
50
- `CheckboxInput` from `@astryx-vue/core/CheckboxInput` supports `v-model` with `boolean | 'indeterminate'`. It includes a label, description, validation status, disabled reasons, native form submission and asynchronous `changeAction`. Pending actions block repeat activation. Failures emit `actionError`; the application decides whether to revert the model. `CheckboxIndicator` from `@astryx-vue/core/CheckboxIndicator` provides the decorative visual without input behavior.
50
+ - [Documentation](https://astryx-vue.pages.dev/en/components/)
51
+ - [CLI guide](https://astryx-vue.pages.dev/en/guide/cli)
52
+ - [Repository](https://github.com/astryx-vue/astryx-vue)
51
53
 
52
- `Slider` from `@astryx-vue/core/Slider` accepts a numeric `v-model` or a `[number, number]` range. It supports marks, horizontal and vertical orientation, keyboard controls, value formatting, form values and disabled reasons. `changeEnd` fires when an adjustment ends.
54
+ ## License
53
55
 
54
- `Banner` from `@astryx-vue/core/Banner` shows persistent info, success, warning or error messages. It supports actions, dismissal, card and section containers, and optional details. Use `v-model:is-open` to control the details or `:collapsible="false"` to keep them visible.
56
+ MIT. Astryx is copyright Meta Platforms, Inc. This package is an unofficial port and is not affiliated with or endorsed by Meta.
@@ -14,6 +14,8 @@ The TextInput, CheckboxInput, CheckboxIndicator, Slider, Banner and Field family
14
14
 
15
15
  The indicator family and semantic icon names added in October 2026 also reference the upstream implementation at commit `fdb53f3` (0.7.1), including CheckIndicator, RadioIndicator, the indicator registry, and the semantic icon name list. Their public behavior is adapted into Vue components and a name-to-Iconify map under the same MIT license. The Vue slots, composables, and built-in glyph fallback are local adaptations.
16
16
 
17
+ The locale JSON files in `locales/` are copied from `packages/core/locales` at commit `df75749470029f0b34680e13deac635f2d72c89d`. They stay in the upstream React Intl shape. `loadAstryxCatalog` maps their keys onto this package's message tree. The files are not hand-translated here.
18
+
17
19
  When files or substantial portions are copied or adapted, their original copyright and license notices must be kept here or alongside the adapted files.
18
20
 
19
21
  No Meta trademarks, logos, or endorsement are granted by the Astryx software license.
@@ -1,2 +1,2 @@
1
- import { n as _sfc_main, t as useImperativeAlertDialog } from "../AlertDialog-ovx4cBjM.js";
1
+ import { n as _sfc_main, t as useImperativeAlertDialog } from "../AlertDialog-B6UeBCE7.js";
2
2
  export { _sfc_main as AlertDialog, useImperativeAlertDialog };
@@ -1,9 +1,9 @@
1
1
  import { t as _sfc_main$1 } from "./Button-DrqeomlE.js";
2
2
  import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
3
3
  import { t as _sfc_main$2 } from "./Dialog-rfUt3y8P.js";
4
- import { t as _sfc_main$3 } from "./Heading-Dugosn6j.js";
4
+ import { t as _sfc_main$3 } from "./Heading-B9C3LZlS.js";
5
5
  import { t as _sfc_main$4 } from "./Stack-gGcYdOAh.js";
6
- import { t as _sfc_main$5 } from "./Text-BHVghsWo.js";
6
+ import { t as _sfc_main$5 } from "./Text-DIzZw6FA.js";
7
7
  import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, mergeProps, normalizeClass, openBlock, provide, ref, renderList, renderSlot, shallowRef, toDisplayString, unref, useId, useTemplateRef, withCtx } from "vue";
8
8
  import "../styles/alert-dialog.css";
9
9
  //#region src/AlertDialog/context.ts
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../AppShell-Dd-D4bA2.js";
1
+ import { t as _sfc_main } from "../AppShell-CeBmB0Q9.js";
2
2
  export { _sfc_main as AppShell };
@@ -1,7 +1,7 @@
1
1
  import { t as appShellMobileKey } from "./useAppShellMobile-DTsyuAJ4.js";
2
+ import { o as useAstryxMessages } from "./context-CPh7kE-a.js";
2
3
  import { a as _sfc_main$2, n as _sfc_main$4, r as _sfc_main$3, t as _sfc_main$5 } from "./LayoutPanel-C34uOq3e.js";
3
- import { a as useAstryxMessages } from "./context-DmOLCubj.js";
4
- import { n as _sfc_main$7, t as _sfc_main$6 } from "./MobileNavToggle-fqcSafkc.js";
4
+ import { n as _sfc_main$7, t as _sfc_main$6 } from "./MobileNavToggle-Dh3uLivq.js";
5
5
  import { n as sideNavRenderModeKey } from "./context-BjNya0v8.js";
6
6
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeModels, mergeProps, openBlock, provide, reactive, ref, renderSlot, toDisplayString, unref, useAttrs, useId, useModel, useSlots, useTemplateRef, watch, withCtx } from "vue";
7
7
  import "../styles/app-shell.css";
@@ -1,2 +1,2 @@
1
- import { a as AvatarProps, c as AvatarStatusDotProps, i as AvatarNumericSize, l as AvatarStatusDotVariant, n as _default, o as AvatarShape, r as AvatarNamedSize, s as AvatarSize, t as _default$1 } from "../index-Bu3oXIIS.js";
1
+ import { a as AvatarProps, c as AvatarStatusDotProps, i as AvatarNumericSize, l as AvatarStatusDotVariant, n as _default, o as AvatarShape, r as AvatarNamedSize, s as AvatarSize, t as _default$1 } from "../index-BmmdzwT9.js";
2
2
  export { _default as Avatar, type AvatarNamedSize, type AvatarNumericSize, type AvatarProps, type AvatarShape, type AvatarSize, _default$1 as AvatarStatusDot, type AvatarStatusDotProps, type AvatarStatusDotVariant };
@@ -1,2 +1,2 @@
1
- import { n as _sfc_main, t as _sfc_main$1 } from "../Avatar-jmHInHwj.js";
1
+ import { n as _sfc_main, t as _sfc_main$1 } from "../Avatar-BB4Z4LF1.js";
2
2
  export { _sfc_main as Avatar, _sfc_main$1 as AvatarStatusDot };
@@ -1,6 +1,6 @@
1
+ import { t as _sfc_main$2 } from "./Tooltip-C2fh9anJ.js";
1
2
  import { n as AvatarGroupContext, t as resolveSize } from "./utils-C9r3UD_y.js";
2
- import { t as _sfc_main$2 } from "./Tooltip-mp0NMh_Y.js";
3
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, inject, mergeProps, normalizeStyle, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, withCtx } from "vue";
3
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, inject, mergeProps, normalizeStyle, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, toRaw, unref, useAttrs, withCtx } from "vue";
4
4
  import "../styles/avatar.css";
5
5
  //#region src/Avatar/Avatar.vue
6
6
  const _hoisted_1$1 = { class: "astryx-avatar__content" };
@@ -30,6 +30,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
30
30
  shape: { default: "circle" },
31
31
  src: {},
32
32
  href: {},
33
+ as: {},
33
34
  target: {},
34
35
  rel: {},
35
36
  tooltip: {
@@ -84,10 +85,14 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
84
85
  const accessibleName = computed(() => {
85
86
  return meaningfulAlt.value || meaningfulName.value;
86
87
  });
87
- const isLink = computed(() => props.href != null);
88
+ const isLink = computed(() => props.href != null && props.href !== "");
88
89
  const isButton = computed(() => !isLink.value && attrs.onClick != null);
89
90
  const isInteractive = computed(() => isLink.value || isButton.value);
90
- const rootTag = computed(() => isLink.value ? "a" : isButton.value ? "button" : "span");
91
+ const isCustomLink = computed(() => isLink.value && props.as != null);
92
+ const rootTag = computed(() => {
93
+ if (isLink.value) return props.as == null ? "a" : toRaw(props.as);
94
+ return isButton.value ? "button" : "span";
95
+ });
91
96
  const linkRel = computed(() => {
92
97
  const parts = new Set((props.rel ?? "").split(/\s+/).filter(Boolean));
93
98
  if (props.target === "_blank") {
@@ -124,6 +129,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
124
129
  bindings.href = props.href;
125
130
  bindings.target = props.target;
126
131
  bindings.rel = linkRel.value;
132
+ if (isCustomLink.value) bindings.to = props.href;
127
133
  }
128
134
  if (isButton.value) bindings.type = attrs.type ?? "button";
129
135
  if (!isInteractive.value && tooltipText.value != null && bindings.tabindex == null && bindings.tabIndex == null) bindings.tabindex = 0;
@@ -1,2 +1,2 @@
1
- import { i as AvatarGroupProps, n as _default, r as AvatarGroupOverflowProps, t as _default$1 } from "../index-BTAgQRP0.js";
1
+ import { i as AvatarGroupProps, n as _default, r as AvatarGroupOverflowProps, t as _default$1 } from "../index-B9rqmYxh.js";
2
2
  export { _default as AvatarGroup, _default$1 as AvatarGroupOverflow, type AvatarGroupOverflowProps, type AvatarGroupProps };
@@ -1,2 +1,2 @@
1
- import { Ci as BannerProps, Si as BannerEmits, Ti as BannerStatus, bi as _default, wi as BannerSlots, xi as BannerContainer } from "../index-BTAgQRP0.js";
1
+ import { Ci as BannerContainer, Di as BannerStatus, Ei as BannerSlots, Si as _default, Ti as BannerProps, wi as BannerEmits } from "../index-B9rqmYxh.js";
2
2
  export { _default as Banner, type BannerContainer, type BannerEmits, type BannerProps, type BannerSlots, type BannerStatus };
@@ -1,2 +1,2 @@
1
- import { a as BottomSheetPadding, c as BottomSheetSlots, i as BottomSheetMotion, l as BottomSheetSnapPoint, n as BottomSheetEmits, o as BottomSheetProps, r as BottomSheetHeight, s as BottomSheetPurpose, t as _default, u as BottomSheetState } from "../index-C8wDPDcP.js";
2
- export { _default as BottomSheet, type BottomSheetEmits, type BottomSheetHeight, type BottomSheetMotion, type BottomSheetPadding, type BottomSheetProps, type BottomSheetPurpose, type BottomSheetSlots, type BottomSheetSnapPoint, type BottomSheetState };
1
+ import { a as BottomSheetMotion, c as BottomSheetPurpose, d as BottomSheetState, i as BottomSheetHeight, l as BottomSheetSlots, n as _default, o as BottomSheetPadding, r as BottomSheetEmits, s as BottomSheetProps, t as _default$1, u as BottomSheetSnapPoint } from "../index-CLmKfnqf.js";
2
+ export { _default as BottomSheet, type BottomSheetEmits, type BottomSheetHeight, type BottomSheetMotion, type BottomSheetPadding, type BottomSheetProps, type BottomSheetPurpose, type BottomSheetSlots, type BottomSheetSnapPoint, type BottomSheetState, _default$1 as BottomSheetSwitcher };
@@ -1,2 +1,3 @@
1
- import { t as _sfc_main } from "../BottomSheet-Dg95HB1s.js";
2
- export { _sfc_main as BottomSheet };
1
+ import { t as _sfc_main } from "../BottomSheet-BV6vfgGu.js";
2
+ import { t as _sfc_main$1 } from "../BottomSheet-o7xw-TOi.js";
3
+ export { _sfc_main as BottomSheet, _sfc_main$1 as BottomSheetSwitcher };
@@ -1,6 +1,6 @@
1
1
  import { n as useFocusTrap, t as useRestoreFocus } from "./useRestoreFocus-BvMdXVX9.js";
2
2
  import { t as useScrollLock } from "./scrollLock-BzIvIimL.js";
3
- import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, toValue, unref, useAttrs, useModel, useTemplateRef, watch, withCtx } from "vue";
3
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUpdated, openBlock, ref, renderSlot, toValue, unref, useAttrs, useModel, useTemplateRef, watch, withCtx } from "vue";
4
4
  import "../styles/bottom-sheet.css";
5
5
  /** Scrim opacity at the peek stop: dimmed, never clear, because the sheet stays modal. */
6
6
  const MIN_PEEK_SCRIM_OPACITY = .3;
@@ -676,16 +676,20 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
676
676
  }
677
677
  });
678
678
  //#endregion
679
+ //#region src/BottomSheet/switcher.ts
680
+ const bottomSheetSwitcherKey = Symbol("astryx-bottom-sheet-switcher");
681
+ //#endregion
679
682
  //#region src/BottomSheet/BottomSheet.vue
680
- const _hoisted_1 = {
681
- key: 0,
683
+ const _hoisted_1 = ["inert"];
684
+ const _hoisted_2 = {
685
+ key: 1,
682
686
  class: "astryx-bottom-sheet-inline"
683
687
  };
684
- const _hoisted_2 = {
688
+ const _hoisted_3 = {
685
689
  key: 0,
686
690
  class: "astryx-bottom-sheet__positioner astryx-bottom-sheet__positioner--inline"
687
691
  };
688
- const _hoisted_3 = [
692
+ const _hoisted_4 = [
689
693
  "aria-label",
690
694
  "aria-labelledby",
691
695
  "aria-modal",
@@ -693,7 +697,7 @@ const _hoisted_3 = [
693
697
  "role",
694
698
  "inert"
695
699
  ];
696
- const _hoisted_4 = { class: "astryx-bottom-sheet__positioner" };
700
+ const _hoisted_5 = { class: "astryx-bottom-sheet__positioner" };
697
701
  const _sfc_main = /*@__PURE__*/ defineComponent({
698
702
  name: "AstryxBottomSheet",
699
703
  inheritAttrs: false,
@@ -701,6 +705,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
701
705
  props: /*@__PURE__*/ mergeModels({
702
706
  isOpen: { type: Boolean },
703
707
  label: {},
708
+ sheetId: {},
704
709
  isInline: {
705
710
  type: Boolean,
706
711
  default: false
@@ -732,14 +737,25 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
732
737
  const props = __props;
733
738
  const emit = __emit;
734
739
  const isOpen = useModel(__props, "isOpen");
740
+ const switcher = inject(bottomSheetSwitcherKey, null);
741
+ const hosted = computed(() => switcher != null && props.sheetId != null);
742
+ const retained = computed(() => {
743
+ if (!hosted.value || switcher == null) return false;
744
+ return switcher.retainedId.value === props.sheetId && switcher.activeId.value !== props.sheetId;
745
+ });
746
+ const open = computed(() => {
747
+ if (!hosted.value || props.sheetId == null) return isOpen.value;
748
+ return switcher?.activeId.value === props.sheetId || switcher?.retainedId.value === props.sheetId;
749
+ });
735
750
  const attrs = useAttrs();
736
751
  const dialog = useTemplateRef("dialog");
737
752
  const panel = useTemplateRef("panel");
738
753
  const isPresented = ref(false);
739
754
  const scrimOpacity = ref(1);
740
755
  const panelState = computed(() => {
741
- if (isOpen.value) return "open";
742
- if (props.isInline) return "hidden";
756
+ if (retained.value) return "exiting";
757
+ if (open.value) return "open";
758
+ if (props.isInline || hosted.value) return "hidden";
743
759
  return isPresented.value ? "exiting" : "hidden";
744
760
  });
745
761
  const isDismissible = computed(() => props.purpose === "info");
@@ -747,10 +763,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
747
763
  const dialogStyle = computed(() => ({ "--_sheet-scrim-opacity": String(scrimOpacity.value) }));
748
764
  useFocusTrap({
749
765
  container: computed(() => panelElement()),
750
- isEnabled: computed(() => isOpen.value && props.hasScrim)
766
+ isEnabled: computed(() => !hosted.value && isOpen.value && props.hasScrim)
751
767
  });
752
768
  useRestoreFocus({
753
- isEnabled: computed(() => !props.isInline),
769
+ isEnabled: computed(() => !props.isInline && !hosted.value),
754
770
  shouldRestore: isOpen
755
771
  });
756
772
  /** The dialog carries the accessible name; the panel keeps every other attribute. */
@@ -805,6 +821,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
805
821
  if (target?.isConnected) target.focus();
806
822
  }
807
823
  function requestClose() {
824
+ if (hosted.value && props.sheetId != null) {
825
+ if (switcher?.activeId.value === props.sheetId) switcher.setActive(null);
826
+ emit("openChange", false);
827
+ return;
828
+ }
808
829
  isOpen.value = false;
809
830
  emit("openChange", false);
810
831
  }
@@ -830,13 +851,23 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
830
851
  emit("motionComplete", motion);
831
852
  if (motion === "exiting") closeSheet();
832
853
  }
833
- watch(isOpen, (open) => {
834
- if (open) openSheet();
854
+ watch(isOpen, (value) => {
855
+ if (hosted.value || !value) return;
856
+ openSheet();
835
857
  }, { flush: "post" });
836
858
  onMounted(() => {
859
+ if (hosted.value && props.sheetId != null) {
860
+ switcher?.register(props.sheetId, {
861
+ getElement: () => panelElement(),
862
+ label: () => props.label,
863
+ purpose: () => props.purpose
864
+ });
865
+ return;
866
+ }
837
867
  if (isOpen.value) openSheet();
838
868
  });
839
869
  onBeforeUnmount(() => {
870
+ if (props.sheetId != null) switcher?.unregister(props.sheetId);
840
871
  unlockScroll();
841
872
  });
842
873
  __expose({
@@ -845,7 +876,36 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
845
876
  blur: () => panelElement()?.blur()
846
877
  });
847
878
  return (_ctx, _cache) => {
848
- return __props.isInline ? (openBlock(), createElementBlock("div", _hoisted_1, [isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_sfc_main$1, mergeProps({
879
+ return hosted.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [open.value ? (openBlock(), createElementBlock("div", {
880
+ key: 0,
881
+ class: normalizeClass(["astryx-bottom-sheet__positioner", retained.value ? "astryx-bottom-sheet__positioner--retained" : "astryx-bottom-sheet__positioner--active"]),
882
+ style: normalizeStyle(retained.value ? { "--_sheet-align": `${unref(switcher)?.alignmentOffset.value ?? 0}px` } : void 0),
883
+ inert: retained.value || void 0
884
+ }, [createVNode(_sfc_main$1, mergeProps({
885
+ ref_key: "panel",
886
+ ref: panel
887
+ }, panelAttrs(), {
888
+ state: panelState.value,
889
+ label: __props.label,
890
+ height: __props.height,
891
+ padding: __props.padding,
892
+ "snap-points": __props.snapPoints,
893
+ "is-swipe-dismiss-allowed": __props.purpose === "info",
894
+ onDismiss: requestClose,
895
+ onSnap: _cache[0] || (_cache[0] = ($event) => emit("snap", $event)),
896
+ onMotionStart: _cache[1] || (_cache[1] = ($event) => emit("motionStart", $event)),
897
+ onMotionComplete: _cache[2] || (_cache[2] = ($event) => emit("motionComplete", $event))
898
+ }), {
899
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
900
+ _: 3
901
+ }, 16, [
902
+ "state",
903
+ "label",
904
+ "height",
905
+ "padding",
906
+ "snap-points",
907
+ "is-swipe-dismiss-allowed"
908
+ ])], 14, _hoisted_1)) : createCommentVNode("v-if", true)], 64)) : __props.isInline ? (openBlock(), createElementBlock("div", _hoisted_2, [isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(_sfc_main$1, mergeProps({
849
909
  ref_key: "panel",
850
910
  ref: panel
851
911
  }, panelAttrs(), {
@@ -855,7 +915,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
855
915
  padding: __props.padding,
856
916
  "snap-points": __props.snapPoints,
857
917
  "is-swipe-dismiss-allowed": false,
858
- onSnap: _cache[0] || (_cache[0] = ($event) => emit("snap", $event))
918
+ onSnap: _cache[3] || (_cache[3] = ($event) => emit("snap", $event))
859
919
  }), {
860
920
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
861
921
  _: 3
@@ -866,7 +926,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
866
926
  "padding",
867
927
  "snap-points"
868
928
  ])])) : createCommentVNode("v-if", true)])) : (openBlock(), createElementBlock("dialog", {
869
- key: 1,
929
+ key: 2,
870
930
  ref_key: "dialog",
871
931
  ref: dialog,
872
932
  class: normalizeClass(["astryx-bottom-sheet-dialog", {
@@ -883,7 +943,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
883
943
  onCancel,
884
944
  onClick: onDialogClick,
885
945
  onKeydown
886
- }, [createElementVNode("div", _hoisted_4, [createVNode(_sfc_main$1, mergeProps({
946
+ }, [createElementVNode("div", _hoisted_5, [createVNode(_sfc_main$1, mergeProps({
887
947
  ref_key: "panel",
888
948
  ref: panel
889
949
  }, panelAttrs(), {
@@ -894,9 +954,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
894
954
  "snap-points": __props.snapPoints,
895
955
  "is-swipe-dismiss-allowed": isSwipeDismissAllowed.value,
896
956
  onDismiss: requestClose,
897
- onScrimOpacity: _cache[1] || (_cache[1] = ($event) => scrimOpacity.value = $event),
898
- onSnap: _cache[2] || (_cache[2] = ($event) => emit("snap", $event)),
899
- onMotionStart: _cache[3] || (_cache[3] = ($event) => emit("motionStart", $event)),
957
+ onScrimOpacity: _cache[4] || (_cache[4] = ($event) => scrimOpacity.value = $event),
958
+ onSnap: _cache[5] || (_cache[5] = ($event) => emit("snap", $event)),
959
+ onMotionStart: _cache[6] || (_cache[6] = ($event) => emit("motionStart", $event)),
900
960
  onMotionComplete: onPanelMotionComplete
901
961
  }), {
902
962
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
@@ -908,12 +968,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
908
968
  "padding",
909
969
  "snap-points",
910
970
  "is-swipe-dismiss-allowed"
911
- ])]), _cache[4] || (_cache[4] = createElementVNode("div", {
971
+ ])]), _cache[7] || (_cache[7] = createElementVNode("div", {
912
972
  class: "astryx-bottom-sheet__edge-tint",
913
973
  "aria-hidden": "true"
914
- }, null, -1))], 46, _hoisted_3));
974
+ }, null, -1))], 46, _hoisted_4));
915
975
  };
916
976
  }
917
977
  });
918
978
  //#endregion
919
- export { _sfc_main as t };
979
+ export { bottomSheetSwitcherKey as n, _sfc_main as t };
@@ -0,0 +1,153 @@
1
+ import { n as useFocusTrap } from "./useRestoreFocus-BvMdXVX9.js";
2
+ import { t as useScrollLock } from "./scrollLock-BzIvIimL.js";
3
+ import { n as bottomSheetSwitcherKey } from "./BottomSheet-BV6vfgGu.js";
4
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeModels, nextTick, normalizeClass, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, shallowRef, useModel, useTemplateRef, watch } from "vue";
5
+ import "../styles/bottom-sheet.css";
6
+ //#region src/BottomSheet/BottomSheetSwitcher.vue
7
+ const _hoisted_1 = ["aria-label", "aria-modal"];
8
+ const _sfc_main = /*@__PURE__*/ defineComponent({
9
+ name: "AstryxBottomSheetSwitcher",
10
+ inheritAttrs: false,
11
+ __name: "BottomSheetSwitcher",
12
+ props: /*@__PURE__*/ mergeModels({
13
+ label: {},
14
+ purpose: {},
15
+ hasScrim: {
16
+ type: Boolean,
17
+ default: true
18
+ }
19
+ }, {
20
+ "activeSheet": { default: null },
21
+ "activeSheetModifiers": {}
22
+ }),
23
+ emits: ["update:activeSheet"],
24
+ setup(__props) {
25
+ const props = __props;
26
+ const activeSheet = useModel(__props, "activeSheet");
27
+ const retainedId = ref(null);
28
+ const alignmentOffset = ref(0);
29
+ const sheets = shallowRef(/* @__PURE__ */ new Map());
30
+ const dialog = useTemplateRef("dialog");
31
+ const isScrollLocked = ref(false);
32
+ let handoffTimer;
33
+ useScrollLock(isScrollLocked);
34
+ function registration(id) {
35
+ return id == null ? void 0 : sheets.value.get(id);
36
+ }
37
+ const activeElement = computed(() => registration(activeSheet.value)?.getElement() ?? null);
38
+ const flowPurpose = computed(() => props.purpose ?? registration(activeSheet.value)?.purpose() ?? "info");
39
+ const dialogLabel = computed(() => props.label ?? registration(activeSheet.value)?.label() ?? "Bottom sheet");
40
+ useFocusTrap({
41
+ container: activeElement,
42
+ isEnabled: computed(() => activeSheet.value != null && props.hasScrim)
43
+ });
44
+ function setActive(id) {
45
+ const previous = activeSheet.value;
46
+ if (previous === id) return;
47
+ if (handoffTimer != null) clearTimeout(handoffTimer);
48
+ if (previous != null && id != null) {
49
+ retainedId.value = previous;
50
+ alignmentOffset.value = 0;
51
+ activeSheet.value = id;
52
+ nextTick(() => {
53
+ const previousHeight = registration(previous)?.getElement()?.offsetHeight ?? 0;
54
+ const nextHeight = registration(id)?.getElement()?.offsetHeight ?? 0;
55
+ alignmentOffset.value = Math.max(0, previousHeight - nextHeight);
56
+ });
57
+ handoffTimer = setTimeout(() => {
58
+ if (retainedId.value === previous) {
59
+ retainedId.value = null;
60
+ alignmentOffset.value = 0;
61
+ }
62
+ }, 420);
63
+ return;
64
+ }
65
+ retainedId.value = null;
66
+ alignmentOffset.value = 0;
67
+ activeSheet.value = id;
68
+ }
69
+ function register(id, entry) {
70
+ const next = new Map(sheets.value);
71
+ next.set(id, entry);
72
+ sheets.value = next;
73
+ }
74
+ function unregister(id) {
75
+ const next = new Map(sheets.value);
76
+ next.delete(id);
77
+ sheets.value = next;
78
+ }
79
+ provide(bottomSheetSwitcherKey, {
80
+ activeId: activeSheet,
81
+ retainedId,
82
+ alignmentOffset,
83
+ setActive,
84
+ register,
85
+ unregister
86
+ });
87
+ function openDialog() {
88
+ const element = dialog.value;
89
+ if (!element) return;
90
+ if (!element.open) {
91
+ if (props.hasScrim) element.showModal();
92
+ else element.show();
93
+ }
94
+ isScrollLocked.value = props.hasScrim;
95
+ nextTick(() => {
96
+ const panel = activeElement.value;
97
+ if (!panel) return;
98
+ (panel.querySelector("[data-autofocus]") ?? panel).focus({ preventScroll: true });
99
+ });
100
+ }
101
+ function closeDialog() {
102
+ dialog.value?.close();
103
+ isScrollLocked.value = false;
104
+ retainedId.value = null;
105
+ alignmentOffset.value = 0;
106
+ }
107
+ function requestClose() {
108
+ if (flowPurpose.value === "required") return;
109
+ setActive(null);
110
+ }
111
+ function onKeydown(event) {
112
+ if (event.key !== "Escape" || event.isComposing) return;
113
+ event.preventDefault();
114
+ requestClose();
115
+ }
116
+ function onCancel(event) {
117
+ event.preventDefault();
118
+ requestClose();
119
+ }
120
+ function onDialogClick(event) {
121
+ if (event.target !== event.currentTarget) return;
122
+ if (props.hasScrim && flowPurpose.value === "info") setActive(null);
123
+ }
124
+ watch(activeSheet, (id) => {
125
+ if (id) openDialog();
126
+ else closeDialog();
127
+ }, { flush: "post" });
128
+ onMounted(() => {
129
+ if (activeSheet.value) openDialog();
130
+ });
131
+ onBeforeUnmount(() => {
132
+ if (handoffTimer != null) clearTimeout(handoffTimer);
133
+ isScrollLocked.value = false;
134
+ });
135
+ return (_ctx, _cache) => {
136
+ return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- 点在对话框空白处才关闭;键盘用 Escape,不给对话框再加一个按钮。 "), createElementVNode("dialog", {
137
+ ref_key: "dialog",
138
+ ref: dialog,
139
+ class: normalizeClass(["astryx-bottom-sheet-dialog astryx-bottom-sheet-switcher", {
140
+ "astryx-bottom-sheet-dialog--scrim": __props.hasScrim,
141
+ "astryx-bottom-sheet-dialog--closing": activeSheet.value == null
142
+ }]),
143
+ "aria-label": dialogLabel.value,
144
+ "aria-modal": __props.hasScrim && activeSheet.value != null ? "true" : void 0,
145
+ onCancel,
146
+ onClick: onDialogClick,
147
+ onKeydown
148
+ }, [renderSlot(_ctx.$slots, "default")], 42, _hoisted_1)], 2112);
149
+ };
150
+ }
151
+ });
152
+ //#endregion
153
+ export { _sfc_main as t };
@@ -1,3 +1,3 @@
1
- import { E as DropdownMenuRadioItemProps, n as _default$2, r as _default$1, s as DropdownMenuCheckboxItemProps, t as _default$3, w as DropdownMenuRadioGroupProps } from "../DropdownMenuRadioItem.vue-uVM0FD2f.js";
2
- import { a as BreadcrumbsProps, i as BreadcrumbMenuOption, n as _default, o as BreadcrumbsVariant, r as BreadcrumbItemProps, t as _default$4 } from "../index-B1x05arQ.js";
1
+ import { E as DropdownMenuRadioItemProps, n as _default$2, r as _default$1, s as DropdownMenuCheckboxItemProps, t as _default$3, w as DropdownMenuRadioGroupProps } from "../DropdownMenuRadioItem.vue-CXEURBcq.js";
2
+ import { a as BreadcrumbsProps, i as BreadcrumbMenuOption, n as _default, o as BreadcrumbsVariant, r as BreadcrumbItemProps, t as _default$4 } from "../index-BlOIC_AM.js";
3
3
  export { _default as BreadcrumbItem, type BreadcrumbItemProps, _default$1 as BreadcrumbMenuCheckboxItem, type DropdownMenuCheckboxItemProps as BreadcrumbMenuCheckboxItemProps, type BreadcrumbMenuOption, _default$2 as BreadcrumbMenuRadioGroup, type DropdownMenuRadioGroupProps as BreadcrumbMenuRadioGroupProps, _default$3 as BreadcrumbMenuRadioItem, type DropdownMenuRadioItemProps as BreadcrumbMenuRadioItemProps, _default$4 as Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsVariant };
@@ -1,3 +1,3 @@
1
- import { i as _sfc_main$1, n as _sfc_main$3, r as _sfc_main$2 } from "../useMenuDrillIn-OaEwjK44.js";
2
- import { n as _sfc_main, t as _sfc_main$4 } from "../Breadcrumbs-CWGfgLNK.js";
1
+ import { i as _sfc_main$1, n as _sfc_main$3, r as _sfc_main$2 } from "../useMenuDrillIn-BgjJcY3K.js";
2
+ import { n as _sfc_main, t as _sfc_main$4 } from "../Breadcrumbs-D6G7f5WL.js";
3
3
  export { _sfc_main as BreadcrumbItem, _sfc_main$1 as BreadcrumbMenuCheckboxItem, _sfc_main$2 as BreadcrumbMenuRadioGroup, _sfc_main$3 as BreadcrumbMenuRadioItem, _sfc_main$4 as Breadcrumbs };
@@ -1,5 +1,5 @@
1
1
  import { t as _sfc_main$2 } from "./Icon-bteSId7T.js";
2
- import { t as _sfc_main$3 } from "./DropdownMenu-BoZChdev.js";
2
+ import { t as _sfc_main$3 } from "./DropdownMenu--lnUeJEG.js";
3
3
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, inject, mergeProps, normalizeClass, openBlock, provide, renderSlot, toDisplayString, useSlots, withCtx } from "vue";
4
4
  import "../styles/breadcrumbs.css";
5
5
  //#region src/Breadcrumbs/context.ts
@@ -1,3 +1,3 @@
1
1
  import { a as ButtonProps, c as ButtonSizeValue, d as ButtonVariantMap, i as ButtonLinkElement, l as ButtonSlots, n as ButtonElevation, o as ButtonRootElement, r as ButtonEmits, s as ButtonSize, t as ButtonClickAction, u as ButtonVariant } from "../types-WlmsNL1I.js";
2
- import { t as _default } from "../index-f4NGT-e2.js";
2
+ import { t as _default } from "../index-EFqQF2Bx.js";
3
3
  export { _default as Button, _default as default, type ButtonClickAction, type ButtonElevation, type ButtonEmits, type ButtonLinkElement, type ButtonProps, type ButtonRootElement, type ButtonSize, type ButtonSizeValue, type ButtonSlots, type ButtonVariant, type ButtonVariantMap };
@@ -1,2 +1,2 @@
1
- import { _i as ButtonGroupProps, gi as _default, vi as ButtonGroupSlots, yi as ButtonGroupOrientation } from "../index-BTAgQRP0.js";
1
+ import { bi as ButtonGroupSlots, vi as _default, xi as ButtonGroupOrientation, yi as ButtonGroupProps } from "../index-B9rqmYxh.js";
2
2
  export { _default as ButtonGroup, _default as default, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonGroupSlots };
@@ -1,2 +1,2 @@
1
- import { di as CalendarHandle, fi as CalendarHandleRef, hi as CalendarSlots, li as _default, mi as CalendarRangeValue, pi as CalendarProps, ui as CalendarEmits } from "../index-BTAgQRP0.js";
1
+ import { _i as CalendarSlots, di as _default, fi as CalendarEmits, gi as CalendarRangeValue, hi as CalendarProps, mi as CalendarHandleRef, pi as CalendarHandle } from "../index-B9rqmYxh.js";
2
2
  export { _default as Calendar, type CalendarEmits, type CalendarHandle, type CalendarHandleRef, type CalendarProps, type CalendarRangeValue, type CalendarSlots };
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../Calendar-CnOsSjMY.js";
1
+ import { t as _sfc_main } from "../Calendar-DmTeM7PO.js";
2
2
  export { _sfc_main as Calendar };