@astryx-vue/core 0.38.0 → 0.40.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 (269) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-BVTKz7re.js → AlertDialog-McG6w72O.js} +6 -6
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-C2y8U6wp.js → AppShell-lv3WDlCi.js} +5 -5
  5. package/dist/AvatarGroup/index.d.ts +1 -1
  6. package/dist/Banner/index.d.ts +1 -1
  7. package/dist/Banner/index.js +1 -1
  8. package/dist/{Banner-NCI6aOKt.js → Banner-CmWBciT7.js} +2 -2
  9. package/dist/BottomSheet/index.d.ts +1 -1
  10. package/dist/BottomSheet/index.js +2 -2
  11. package/dist/BottomSheet-BOEmV4QT.js +527 -0
  12. package/dist/{BottomSheet-CFdGLVIF.js → BottomSheet-BkBRbF1_.js} +1381 -194
  13. package/dist/Breadcrumbs/index.js +2 -2
  14. package/dist/{Breadcrumbs-CwEfccnT.js → Breadcrumbs-D7dac2Vx.js} +2 -2
  15. package/dist/Button/index.d.ts +1 -1
  16. package/dist/Button/index.js +1 -1
  17. package/dist/{Button-BZV5wL4j.js → Button-pAwKXPpg.js} +2 -2
  18. package/dist/ButtonGroup/index.d.ts +1 -1
  19. package/dist/ButtonGroup/index.js +1 -1
  20. package/dist/{ButtonGroup-CaQ7bir4.js → ButtonGroup-CuxHcLGQ.js} +2 -2
  21. package/dist/Calendar/index.d.ts +1 -1
  22. package/dist/Calendar/index.js +1 -1
  23. package/dist/{Calendar-S5IjkDsY.js → Calendar-CfhOlgQJ.js} +1 -1
  24. package/dist/Carousel/index.d.ts +1 -1
  25. package/dist/Carousel/index.js +1 -1
  26. package/dist/{Carousel-CbOusMO0.js → Carousel-CS2e2A7m.js} +2 -2
  27. package/dist/Chat/index.d.ts +1 -1
  28. package/dist/Chat/index.js +1 -1
  29. package/dist/{Chat-BrHbv7Ah.js → Chat-BpZRcgDp.js} +5 -5
  30. package/dist/CheckboxInput/index.d.ts +1 -1
  31. package/dist/CheckboxInput/index.js +1 -1
  32. package/dist/{CheckboxInput-CV8aHb9r.js → CheckboxInput-DhacWPUS.js} +4 -4
  33. package/dist/CheckboxList/index.d.ts +1 -1
  34. package/dist/CheckboxList/index.js +1 -1
  35. package/dist/{CheckboxListItem-SyF1JdT3.js → CheckboxListItem-D7PdrL6R.js} +3 -3
  36. package/dist/Citation/index.js +1 -1
  37. package/dist/{Citation-Ijf06x0V.js → Citation-DXMQVSi5.js} +1 -1
  38. package/dist/ClickableCard/index.d.ts +1 -1
  39. package/dist/Code/index.js +2 -2
  40. package/dist/{Code-BNOzyQX4.js → Code-CpOHgCdF.js} +4 -3
  41. package/dist/{CodeBlock-DYXx_9Kj.js → CodeBlock-CkGp6dGF.js} +3 -3
  42. package/dist/Collapsible/index.js +1 -1
  43. package/dist/{Collapsible-48Q1GfRw.js → Collapsible-CaKmR3yE.js} +3 -3
  44. package/dist/CommandPalette/index.js +1 -1
  45. package/dist/{CommandPalette-Ct70AcIK.js → CommandPalette-DiM8MlSa.js} +3 -3
  46. package/dist/ComplexSelector/index.d.ts +1 -1
  47. package/dist/ComplexSelector/index.js +1 -1
  48. package/dist/{ComplexSelector-NnPRhI6t.js → ComplexSelector-BmXhD8Oe.js} +5 -5
  49. package/dist/{ComponentIcon-Dw4xQxg3.js → ComponentIcon-B67QcA-d.js} +2 -2
  50. package/dist/ContextMenu/index.d.ts +1 -1
  51. package/dist/ContextMenu/index.js +2 -2
  52. package/dist/{ContextMenu-C7m059d4.js → ContextMenu-DcqcObzD.js} +6 -6
  53. package/dist/DateInput/index.d.ts +1 -1
  54. package/dist/DateInput/index.js +1 -1
  55. package/dist/{DateInput-D-NIlF5P.js → DateInput-C3KNWKD5.js} +9 -9
  56. package/dist/DateRangeInput/index.d.ts +1 -1
  57. package/dist/DateRangeInput/index.js +1 -1
  58. package/dist/{DateRangeInput-BYl649eD.js → DateRangeInput-C7qeaG20.js} +6 -6
  59. package/dist/DateTimeInput/index.d.ts +1 -1
  60. package/dist/DateTimeInput/index.js +1 -1
  61. package/dist/{DateTimeInput-CBzae6EW.js → DateTimeInput-L0EZbgPe.js} +9 -9
  62. package/dist/Dialog/index.js +3 -3
  63. package/dist/{Dialog-BP2KWnEi.js → Dialog-DLg0POKn.js} +1 -1
  64. package/dist/{Dialog-BUl1lqE6.js → Dialog-iVqfWx9T.js} +1 -1
  65. package/dist/{DialogHeader-DKt_lREy.js → DialogHeader-B0B8oATV.js} +1 -1
  66. package/dist/Divider/index.d.ts +1 -1
  67. package/dist/Drawer/index.d.ts +1 -1
  68. package/dist/Drawer/index.js +1 -1
  69. package/dist/{Drawer-D63qUfxP.js → Drawer-C0x5HNmD.js} +2 -2
  70. package/dist/DropdownMenu/index.js +2 -2
  71. package/dist/{DropdownMenu-BkTjcbtP.js → DropdownMenu-pqhotFvD.js} +7 -7
  72. package/dist/Field/index.js +3 -3
  73. package/dist/{Field-DgtZ9Czv.js → Field-D3W-qMmn.js} +2 -2
  74. package/dist/{FieldIcon-BU1ZWAuo.js → FieldIcon-C6A69-um.js} +1 -1
  75. package/dist/{FieldInfoTip-D4vkQb2F.js → FieldInfoTip-K-cUaCBk.js} +2 -2
  76. package/dist/{FieldLabel-DkElUlTP.js → FieldLabel-CIe1tEyM.js} +2 -2
  77. package/dist/FieldStatus/index.js +1 -1
  78. package/dist/{FieldStatus-DmCWPT6U.js → FieldStatus-QjwGygl3.js} +1 -1
  79. package/dist/FileInput/index.js +1 -1
  80. package/dist/{FileInput-epZuREvN.js → FileInput-Crb5znnx.js} +5 -5
  81. package/dist/Heading/index.d.ts +1 -1
  82. package/dist/Icon/index.js +2 -2
  83. package/dist/{Icon-Dk0jccgU.js → Icon-BUSj1-Th.js} +1 -1
  84. package/dist/{Icon-M1Rlknd0.js → Icon-CYXC4iYF.js} +1 -1
  85. package/dist/IconButton/index.js +1 -1
  86. package/dist/{IconButton-ddP2kBOE.js → IconButton-Cug4YcFk.js} +1 -1
  87. package/dist/Indicator/index.d.ts +2 -2
  88. package/dist/Indicator/index.js +1 -1
  89. package/dist/InfoTip/index.d.ts +1 -1
  90. package/dist/InfoTip/index.js +1 -1
  91. package/dist/{InfoTip-D2rbGvF9.js → InfoTip-Cu4a1mi4.js} +2 -2
  92. package/dist/{InputClearButton-pGsDJl26.js → InputClearButton-CgUhJflI.js} +2 -2
  93. package/dist/InputGroup/index.js +1 -1
  94. package/dist/{InputGroup-BIVCj2rq.js → InputGroup-BRsu7Tbv.js} +1 -1
  95. package/dist/Layout/index.js +2 -2
  96. package/dist/{Layout-DIs9FbLS.js → Layout-DTSKNAzq.js} +1 -1
  97. package/dist/{LayoutPanel-DPueklAW.js → LayoutPanel-CH4HZGLR.js} +1 -1
  98. package/dist/Lightbox/index.js +1 -1
  99. package/dist/{Lightbox-CYFqIuYF.js → Lightbox-_RBPOxDZ.js} +2 -2
  100. package/dist/Link/index.d.ts +1 -1
  101. package/dist/Link/index.js +1 -1
  102. package/dist/{Link-Bte02xvC.js → Link-BsmxrY3Y.js} +1 -1
  103. package/dist/List/index.d.ts +1 -1
  104. package/dist/List/index.js +1 -1
  105. package/dist/{ListItem-DyJ5nTUB.js → ListItem-DZwU5RrZ.js} +2 -2
  106. package/dist/Markdown/index.d.ts +1 -1
  107. package/dist/Markdown/index.js +1 -1
  108. package/dist/{Markdown-DLOM7sua.js → Markdown-CiLkzTFi.js} +3 -3
  109. package/dist/{MediaTheme-CBkEmVe4.js → MediaTheme-BavxpAJt.js} +5 -77
  110. package/dist/MoreMenu/index.d.ts +1 -1
  111. package/dist/MoreMenu/index.js +1 -1
  112. package/dist/{MoreMenu-Dfw9RqEG.js → MoreMenu-BWuzaT3K.js} +4 -4
  113. package/dist/MultiSelector/index.d.ts +1 -1
  114. package/dist/MultiSelector/index.js +1 -1
  115. package/dist/{MultiSelector-670gfK2P.js → MultiSelector-geUPBvlE.js} +8 -8
  116. package/dist/{NavHeadingSurface-CyzeGig1.js → NavHeadingSurface-C3QJ64vm.js} +1 -1
  117. package/dist/NumberInput/index.d.ts +1 -1
  118. package/dist/NumberInput/index.js +1 -1
  119. package/dist/{NumberInput-CoozsQxb.js → NumberInput--sai94t9.js} +6 -6
  120. package/dist/OverflowList/index.d.ts +1 -1
  121. package/dist/Overlay/index.d.ts +1 -1
  122. package/dist/Pagination/index.js +1 -1
  123. package/dist/{Pagination-HRiDkiv1.js → Pagination-C10gbfyv.js} +2 -2
  124. package/dist/{PickerWheel-BH7fotFp.js → PickerWheel-CpAyp6NS.js} +5 -4
  125. package/dist/Popover/index.d.ts +2 -2
  126. package/dist/Popover/index.js +1 -1
  127. package/dist/{Popover-CIfmPr2b.js → Popover-C6_p8KAA.js} +4 -4
  128. package/dist/PowerSearch/index.d.ts +1 -1
  129. package/dist/PowerSearch/index.js +1 -1
  130. package/dist/{PowerSearch-lZ7C-9_i.js → PowerSearch-D47zbO7s.js} +21 -21
  131. package/dist/Radio/index.d.ts +1 -1
  132. package/dist/Radio/index.js +1 -1
  133. package/dist/{RadioGroup-DE0vl44p.js → RadioGroup-C1VXRBSf.js} +3 -3
  134. package/dist/RadioList/index.d.ts +1 -1
  135. package/dist/RadioList/index.js +1 -1
  136. package/dist/{RadioListItem-CMH7E4o4.js → RadioListItem-DrAwYoOz.js} +1 -1
  137. package/dist/Resizable/index.js +1 -1
  138. package/dist/{ResizeHandle-IXhzcM0r.js → ResizeHandle-ruXeaXUT.js} +1 -1
  139. package/dist/ScrollableArea/index.d.ts +1 -1
  140. package/dist/SegmentedControl/index.js +1 -1
  141. package/dist/{SegmentedControl-DfQbw_Kx.js → SegmentedControl-D9atngIc.js} +2 -2
  142. package/dist/SelectableCard/index.d.ts +1 -1
  143. package/dist/Selector/index.d.ts +1 -1
  144. package/dist/Selector/index.js +1 -1
  145. package/dist/{Selector-BA_Br1PQ.js → Selector-DFTryuh1.js} +7 -7
  146. package/dist/SideNav/index.d.ts +1 -1
  147. package/dist/SideNav/index.js +2 -2
  148. package/dist/{SideNav-iTVaFVr8.js → SideNav-Bjk5ACqf.js} +7 -7
  149. package/dist/Slider/index.js +1 -1
  150. package/dist/{Slider-Dd-7-KDB.js → Slider-rOwQQK6G.js} +1 -1
  151. package/dist/Spinner/index.js +1 -1
  152. package/dist/{Spinner-D1adu3uH.js → Spinner-lLOYfbOY.js} +1 -1
  153. package/dist/Stack/index.d.ts +1 -1
  154. package/dist/Stepper/index.d.ts +1 -1
  155. package/dist/Stepper/index.js +1 -1
  156. package/dist/{Stepper-2Pzjo2X6.js → Stepper-0ycdCwND.js} +1 -1
  157. package/dist/Switch/index.d.ts +1 -1
  158. package/dist/Switch/index.js +1 -1
  159. package/dist/{Switch-CDzpdofs.js → Switch-BBfZ6XqA.js} +3 -3
  160. package/dist/TabList/index.js +1 -1
  161. package/dist/{TabList-2WI0pFSQ.js → TabList-BnLUktgm.js} +1 -1
  162. package/dist/Table/index.d.ts +1 -1
  163. package/dist/Table/index.js +1 -1
  164. package/dist/{Table-Dv2v2Qn1.js → Table-D0yjxm9X.js} +13 -13
  165. package/dist/Text/index.d.ts +1 -1
  166. package/dist/TextArea/index.d.ts +1 -1
  167. package/dist/TextArea/index.js +1 -1
  168. package/dist/{TextArea-DVaMUVoM.js → TextArea-Cr00OL0D.js} +6 -6
  169. package/dist/TextInput/index.d.ts +1 -1
  170. package/dist/TextInput/index.js +1 -1
  171. package/dist/{TextInput-CuZ0_q-W.js → TextInput-CVfvRHOa.js} +6 -6
  172. package/dist/Theme/index.d.ts +3 -3
  173. package/dist/Theme/index.js +3 -3
  174. package/dist/{Theme-CwruhtLu.js → Theme-B_kAJHy2.js} +111 -23
  175. package/dist/Thumbnail/index.js +1 -1
  176. package/dist/{Thumbnail-DdWfJKHa.js → Thumbnail-CJPZ299u.js} +3 -3
  177. package/dist/{TimeField-BxM1p1iV.js → TimeField-Csp1-lRo.js} +7 -7
  178. package/dist/TimeInput/index.d.ts +1 -1
  179. package/dist/TimeInput/index.js +1 -1
  180. package/dist/{TimeInput-OazN0w6r.js → TimeInput-B4JLpJ2N.js} +2 -2
  181. package/dist/Timer/index.d.ts +1 -1
  182. package/dist/Timestamp/index.d.ts +1 -1
  183. package/dist/Timestamp/index.js +1 -1
  184. package/dist/{Timestamp-B6Ob-xlj.js → Timestamp-BmH-CQ8p.js} +2 -2
  185. package/dist/Toast/index.js +1 -1
  186. package/dist/{Toast-CW2ML8tU.js → Toast-Cuc1o3ph.js} +6 -7
  187. package/dist/ToggleButton/index.d.ts +1 -1
  188. package/dist/ToggleButton/index.js +1 -1
  189. package/dist/{ToggleButton-8XAM4Mko.js → ToggleButton-BsAi9ln1.js} +3 -3
  190. package/dist/Tokenizer/index.d.ts +1 -1
  191. package/dist/Tokenizer/index.js +1 -1
  192. package/dist/{Tokenizer-OZbI0TqN.js → Tokenizer-CXCnZtY3.js} +258 -176
  193. package/dist/Toolbar/index.d.ts +1 -1
  194. package/dist/TopNav/index.d.ts +1 -1
  195. package/dist/TopNav/index.js +1 -1
  196. package/dist/{TopNav-Bea1f-4t.js → TopNav-GvK-XIRl.js} +3 -3
  197. package/dist/TreeList/index.js +1 -1
  198. package/dist/{TreeList-DEGpCrNi.js → TreeList-CfELZwbQ.js} +5 -5
  199. package/dist/Typeahead/index.js +2 -2
  200. package/dist/{Typeahead-BONCIm6m.js → Typeahead-Csob3tst.js} +5 -5
  201. package/dist/{accessibleName-YrrAARQX.js → accessibleName-CYV4uRm9.js} +3 -3
  202. package/dist/{adaptationTypes-D874ONPJ.d.ts → adaptationTypes-D5HrfPSt.d.ts} +9 -0
  203. package/dist/{assertOptions-Byu4Yqfg.js → assertOptions-BOwrrTT-.js} +1 -1
  204. package/dist/colorMode-DVs86FF2.js +49 -0
  205. package/dist/{compactDefinition-CMTR5KqU.d.ts → compactDefinition-BPg0hR8Q.d.ts} +1 -1
  206. package/dist/{compactDefinition-BeFUKEFg.js → compactDefinition-D32f2O_H.js} +1 -1
  207. package/dist/composables/index.d.ts +2 -2
  208. package/dist/composables/index.js +7 -7
  209. package/dist/{composables-BJfZbXeW.js → composables-DqaKLASV.js} +2 -2
  210. package/dist/{context-DArta_KP.js → context-CLCiYDtY.js} +1 -1
  211. package/dist/context-CwV8eyUd.js +12 -0
  212. package/dist/contrast-B0fsdq4U.js +75 -0
  213. package/dist/{index-Pad9p8CU.d.ts → index-Ak1b0V24.d.ts} +1 -1
  214. package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
  215. package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
  216. package/dist/{index-CTASAiq2.d.ts → index-BFPb14Xj.d.ts} +4 -4
  217. package/dist/{index-CQi9WGWE.d.ts → index-BfOs5BQj.d.ts} +3 -3
  218. package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
  219. package/dist/{index-Dgl2rXqH.d.ts → index-BzaRSOA3.d.ts} +2 -1
  220. package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
  221. package/dist/index-CDZhxbEp.d.ts +44 -0
  222. package/dist/{index-DkYOGpsC.d.ts → index-CTo75wH5.d.ts} +1 -1
  223. package/dist/{index-V6uruC4Z.d.ts → index-CqvIpZ-t.d.ts} +1 -1
  224. package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
  225. package/dist/{index--kbwaSXW.d.ts → index-CuW4AQ7M.d.ts} +1 -1
  226. package/dist/{index-C8wfe0Mr.d.ts → index-D05JGsT3.d.ts} +1 -1
  227. package/dist/{index-DxFU2kv3.d.ts → index-DN2b-w3H.d.ts} +52 -52
  228. package/dist/{index-J83fLEyo.d.ts → index-DgNCHxvu.d.ts} +2 -2
  229. package/dist/{index-JE1HrzdJ.d.ts → index-Ds4dOCSy.d.ts} +5 -2
  230. package/dist/{index-DXGoFpRN.d.ts → index-LvZ3vP29.d.ts} +1 -1
  231. package/dist/{index-EUzmHHm6.d.ts → index-WBF_zxXX.d.ts} +2 -2
  232. package/dist/{index-BrY-v2wz.d.ts → index-YP5WRwXH.d.ts} +5 -5
  233. package/dist/index.d.ts +25 -23
  234. package/dist/index.js +88 -87
  235. package/dist/{landing-CwF_76em.js → landing-DjJvKu3c.js} +1 -1
  236. package/dist/{lazyBottomSheet-COX_Z3-V.js → lazyBottomSheet-0H4ih8Oh.js} +1 -1
  237. package/dist/{modalOutlet-BwR9AAlm.js → modalOutlet-C2nqIYUt.js} +7 -6
  238. package/dist/motionTokenDefaults-EFzpiAF5.js +38 -0
  239. package/dist/palette/index.d.ts +3 -0
  240. package/dist/palette/index.js +2 -0
  241. package/dist/palette-DlNBLR8U.js +2114 -0
  242. package/dist/{presentationHold-ZKixVLcz.js → presentationHold-Bjjux3fp.js} +1 -1
  243. package/dist/{reportChange-DuOzs-8h.js → reportChange-wIeU3q3y.js} +1 -1
  244. package/dist/{resizableChannel-6oZZNYYM.js → resizableChannel-b7iQNnCj.js} +2 -2
  245. package/dist/{themeTiming-Cv_hsTJU.js → themeTiming-DOf0j6SM.js} +2 -1
  246. package/dist/{tokenReferences-sKpv-7_O.js → tokenReferences-CdmofltU.js} +1 -38
  247. package/dist/{triggerVariant-DPuBmzpp.js → triggerVariant-CRQoD-4F.js} +1 -1
  248. package/dist/{types-D97oBk6c.d.ts → types-DTlpQo7j.d.ts} +1 -1
  249. package/dist/types-DypDQlbk.d.ts +176 -0
  250. package/dist/{useActionGroupTracking-DB5xIxPW.js → useActionGroupTracking-SVkaaOzz.js} +1 -1
  251. package/dist/{useAnimatedLayout-CVYflMPG.js → useAnimatedLayout-CXjd5pjG.js} +1 -1
  252. package/dist/{useChatStreamScroll-3mJvbNtI.js → useChatStreamScroll-BQpGHGAr.js} +1 -1
  253. package/dist/{useHeldPresentation-CaIKTwUh.js → useHeldPresentation-0Z0Untra.js} +1 -1
  254. package/dist/{useIndicator-PFDBNOvX.js → useIndicator-Co1ERlg-.js} +2 -2
  255. package/dist/{useInputStatusIcon-CV8qfqzK.js → useInputStatusIcon-CRG-be-K.js} +2 -2
  256. package/dist/{useMediaQuery-BzXGT1Aw.js → useMediaQuery-DKnSDG3S.js} +1 -1
  257. package/dist/{useMenuHover-DoBatZeD.js → useMenuHover-Dahcf3qo.js} +1 -1
  258. package/dist/{useMobileKeyboard-DOa93Ek2.js → useMobileKeyboard-Cibxl8ZC.js} +1 -1
  259. package/dist/{useResizable-9WyAIDnz.js → useResizable-CJQAV_tU.js} +1 -1
  260. package/dist/useResolvedColorMode-CyZjLvfj.js +159 -0
  261. package/dist/{useTouchHitArea-DvKV21NY.js → useTouchHitArea-BdpeksgK.js} +225 -43
  262. package/dist/{useTypeaheadMenuConfig-DUZD3GqE.js → useTypeaheadMenuConfig-0glQWHQd.js} +1 -1
  263. package/package.json +5 -1
  264. package/styles/bottom-sheet.css +61 -19
  265. package/styles/date-input.css +76 -0
  266. package/styles/tokenizer.css +88 -0
  267. package/dist/BottomSheet-dgHDqtQg.js +0 -203
  268. package/dist/context-Cws_tXTr.js +0 -7
  269. package/dist/useResolvedColorMode-Df97_9w_.js +0 -78
@@ -1,2 +1,2 @@
1
- import { n as _sfc_main, t as useImperativeAlertDialog } from "../AlertDialog-BVTKz7re.js";
1
+ import { n as _sfc_main, t as useImperativeAlertDialog } from "../AlertDialog-McG6w72O.js";
2
2
  export { _sfc_main as AlertDialog, useImperativeAlertDialog };
@@ -1,12 +1,12 @@
1
- import { a as pressGroupItemProps } from "./useTouchHitArea-DvKV21NY.js";
2
- import { t as useActionGroupTracking } from "./useActionGroupTracking-DB5xIxPW.js";
3
- import { t as _sfc_main$1 } from "./Button-BZV5wL4j.js";
1
+ import { a as pressGroupItemProps } from "./useTouchHitArea-BdpeksgK.js";
2
+ import { t as useActionGroupTracking } from "./useActionGroupTracking-SVkaaOzz.js";
3
+ import { t as _sfc_main$1 } from "./Button-pAwKXPpg.js";
4
4
  import { t as useCoarsePointer } from "./useCoarsePointer-GItEMrjX.js";
5
- import { t as useMediaQuery } from "./useMediaQuery-BzXGT1Aw.js";
5
+ import { t as useMediaQuery } from "./useMediaQuery-DKnSDG3S.js";
6
6
  import { n as createMotionEngine } from "./animator-i7djdtNK.js";
7
- import { r as readThemeTimingOrInstant } from "./themeTiming-Cv_hsTJU.js";
7
+ import { r as readThemeTimingOrInstant } from "./themeTiming-DOf0j6SM.js";
8
8
  import { t as holdInput } from "./inputHold-B53XZ8if.js";
9
- import { t as _sfc_main$2 } from "./Dialog-BUl1lqE6.js";
9
+ import { t as _sfc_main$2 } from "./Dialog-iVqfWx9T.js";
10
10
  import { t as _sfc_main$3 } from "./Heading-SdObK_xM.js";
11
11
  import { t as useScrollbars } from "./useScrollbars-Ch0xqJWO.js";
12
12
  import { t as _sfc_main$4 } from "./Stack-DPB-Ztf7.js";
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../AppShell-C2y8U6wp.js";
1
+ import { t as _sfc_main } from "../AppShell-lv3WDlCi.js";
2
2
  export { _sfc_main as AppShell };
@@ -1,13 +1,13 @@
1
- import { n as themeContextKey } from "./context-Cws_tXTr.js";
1
+ import { r as themeContextKey } from "./context-CwV8eyUd.js";
2
2
  import { o as useComponentMessages } from "./context-B8IEFCDR.js";
3
- import { S as layoutStartFor, l as createAnimatedLayout, t as reportLayoutChange } from "./reportChange-DuOzs-8h.js";
4
- import { c as holdLayoutSwap, i as sideNavShellKey, l as playLayoutFrames, r as sideNavRenderModeKey, u as playLayoutSwap } from "./context-DArta_KP.js";
5
- import { n as landLayoutGlide, r as layoutMotionFor } from "./landing-CwF_76em.js";
3
+ import { S as layoutStartFor, l as createAnimatedLayout, t as reportLayoutChange } from "./reportChange-wIeU3q3y.js";
4
+ import { c as holdLayoutSwap, i as sideNavShellKey, l as playLayoutFrames, r as sideNavRenderModeKey, u as playLayoutSwap } from "./context-CLCiYDtY.js";
5
+ import { n as landLayoutGlide, r as layoutMotionFor } from "./landing-DjJvKu3c.js";
6
6
  import { t as appShellMobileKey } from "./useAppShellMobile-DTsyuAJ4.js";
7
7
  import { t as attachScrollKeyboardDelegation } from "./scrollKeyboardDelegation-DZ4t5PvC.js";
8
8
  import { a as layoutSlotsKey, i as layoutDividerKey, n as layoutAreaKey, r as layoutContainerKey, t as emptyLayoutSlots } from "./context-D-Hwh-Jf.js";
9
9
  import { n as observeMainOverflow } from "./useScrollRegionProps-DwkPUb-O.js";
10
- import { a as _sfc_main$2, n as _sfc_main$4, r as _sfc_main$3, t as _sfc_main$5 } from "./LayoutPanel-DPueklAW.js";
10
+ import { a as _sfc_main$2, n as _sfc_main$4, r as _sfc_main$3, t as _sfc_main$5 } from "./LayoutPanel-CH4HZGLR.js";
11
11
  import { t as layoutMessages } from "./layout-DhX4-SyE.js";
12
12
  import { t as navMessages } from "./nav-DpKQUHqR.js";
13
13
  import { n as _sfc_main$7, t as _sfc_main$6 } from "./MobileNavToggle-CiY__Fy9.js";
@@ -1,2 +1,2 @@
1
- import { a as AvatarGroupOverflowSlots, i as AvatarGroupOverflowProps, n as _default, o as AvatarGroupProps, r as AvatarGroupOverflowEmits, t as _default$1 } from "../index-DxFU2kv3.js";
1
+ import { a as AvatarGroupOverflowSlots, i as AvatarGroupOverflowProps, n as _default, o as AvatarGroupProps, r as AvatarGroupOverflowEmits, t as _default$1 } from "../index-DN2b-w3H.js";
2
2
  export { _default as AvatarGroup, _default$1 as AvatarGroupOverflow, type AvatarGroupOverflowEmits, type AvatarGroupOverflowProps, type AvatarGroupOverflowSlots, type AvatarGroupProps };
@@ -1,2 +1,2 @@
1
- import { Al as BannerStatus, Dl as BannerEmits, El as BannerContainer, Ol as BannerProps, Tl as _default, kl as BannerSlots } from "../index-DxFU2kv3.js";
1
+ import { Al as BannerStatus, Dl as BannerEmits, El as BannerContainer, Ol as BannerProps, Tl as _default, kl as BannerSlots } from "../index-DN2b-w3H.js";
2
2
  export { _default as Banner, type BannerContainer, type BannerEmits, type BannerProps, type BannerSlots, type BannerStatus };
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../Banner-NCI6aOKt.js";
1
+ import { t as _sfc_main } from "../Banner-CmWBciT7.js";
2
2
  export { _sfc_main as Banner };
@@ -1,7 +1,7 @@
1
1
  import { t as isRenderable } from "./isRenderable-BnKHIqfd.js";
2
2
  import { o as useComponentMessages } from "./context-B8IEFCDR.js";
3
- import { t as _sfc_main$1 } from "./FieldIcon-BU1ZWAuo.js";
4
- import { t as _sfc_main$2 } from "./IconButton-ddP2kBOE.js";
3
+ import { t as _sfc_main$1 } from "./FieldIcon-C6A69-um.js";
4
+ import { t as _sfc_main$2 } from "./IconButton-Cug4YcFk.js";
5
5
  import { t as bannerMessages } from "./banner-Bv76b50U.js";
6
6
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, openBlock, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, useAttrs, useId, useModel, useSlots, useTemplateRef, watch, withCtx } from "vue";
7
7
  import "../styles/banner.css";
@@ -1,2 +1,2 @@
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-JE1HrzdJ.js";
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-Ds4dOCSy.js";
2
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,3 +1,3 @@
1
- import { n as _sfc_main } from "../BottomSheet-CFdGLVIF.js";
2
- import { t as _sfc_main$1 } from "../BottomSheet-dgHDqtQg.js";
1
+ import { n as _sfc_main } from "../BottomSheet-BkBRbF1_.js";
2
+ import { t as _sfc_main$1 } from "../BottomSheet-BOEmV4QT.js";
3
3
  export { _sfc_main as BottomSheet, _sfc_main$1 as BottomSheetSwitcher };
@@ -0,0 +1,527 @@
1
+ import { _ as writeScrimOpacity, a as isClosingTogether, b as focusSheetPanel, c as reportClosedTogether, d as bottomSheetSwitcherKey, f as cancelScrimWrite, g as returnFocusTo, h as presentWithClearScrim, i as getBottomSheetBeneath, l as setBottomSheetOpen, m as presentStepModally, o as notifyBottomSheetHostChanged, p as closeDialogKeepingFocus, r as useSheetLayerDismiss, s as registerBottomSheet, u as useModalOutletWhile, v as BOTTOM_SHEET_STACK_DEFAULT_VIEW, y as bottomSheetHostKey } from "./BottomSheet-BkBRbF1_.js";
2
+ import { t as isImeKeyEvent } from "./ime-VY8-80S8.js";
3
+ import { t as useScrollLock } from "./scrollLock-CoVg9lLU.js";
4
+ import { n as restoreLayerFocus, r as trackLayerFocus, t as isLayerFocusStranded } from "./layerFocusReturn-uixUCSc8.js";
5
+ import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, mergeModels, normalizeClass, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, shallowRef, useAttrs, useModel, useTemplateRef, watch } from "vue";
6
+ import "../styles/bottom-sheet.css";
7
+ //#region src/BottomSheet/switcher/useSwitcherStack.ts
8
+ /**
9
+ * 不带过渡地把流程那层遮罩交给 `dialog`。遮罩的透明度过渡会从进场对话框呈现时的透明值慢慢升起,
10
+ * 正好在上一个对话框的遮罩消失时让页面变亮一下。哪怕很短的时长也会先画一帧起始值,所以先关掉过渡、
11
+ * 刷一次样式让新值在这条规则下生效,再把时长还给之后的拖动和退场。
12
+ */
13
+ function takeOverScrim(dialog, opacity) {
14
+ dialog.style.setProperty("--_sheet-scrim-duration", "0s");
15
+ dialog.style.setProperty("--_sheet-scrim-opacity", String(opacity));
16
+ if (typeof getComputedStyle === "function") getComputedStyle(dialog, "::backdrop").opacity;
17
+ dialog.style.removeProperty("--_sheet-scrim-duration");
18
+ }
19
+ /**
20
+ * 带遮罩的整段流程在底部面板叠放里算一层:步骤自己呈现对话框,登记表只在要恢复打开顺序时重新呈现
21
+ * 这一层的宿主对话框。这里还管流程唯一的那层遮罩、流程的打开者,以及流程结束时焦点去哪。
22
+ */
23
+ function useSwitcherStack(options) {
24
+ const key = {};
25
+ const view = shallowRef(BOTTOM_SHEET_STACK_DEFAULT_VIEW);
26
+ const scrimWrite = { frame: null };
27
+ let leaveStack = null;
28
+ let registeredScrim = false;
29
+ let notifiedHost = null;
30
+ let leftStack = null;
31
+ let trigger = null;
32
+ let focusRecord = null;
33
+ let isModalFlow = false;
34
+ let hadFocusAtClose = false;
35
+ let isFocusReturnPending = false;
36
+ let scrimOpacity = 1;
37
+ let scrimOwner = null;
38
+ let presentationCounter = 0;
39
+ const presentationOrder = /* @__PURE__ */ new Map();
40
+ const hostDialog = () => options.hostId.value == null ? null : options.dialogOf(options.hostId.value);
41
+ const ownsStackScrim = (stackView) => !stackView.isStacked || stackView.ownsScrim;
42
+ /** 焦点在流程里:在流程的外层或任何一步的对话框里。 */
43
+ function holdsFocus(active) {
44
+ if (active == null) return false;
45
+ if (options.getFlow()?.contains(active)) return true;
46
+ for (const id of options.stepIds()) if (options.dialogOf(id)?.contains(active)) return true;
47
+ return false;
48
+ }
49
+ function beforePresent(id) {
50
+ if (trigger == null && typeof document !== "undefined") {
51
+ trigger = document.activeElement;
52
+ focusRecord?.stop();
53
+ focusRecord = trackLayerFocus({
54
+ getLayer: options.getFlow,
55
+ opener: trigger
56
+ });
57
+ }
58
+ if (!options.hasScrim()) return;
59
+ isModalFlow = true;
60
+ presentationCounter += 1;
61
+ presentationOrder.set(id, presentationCounter);
62
+ }
63
+ function isCoveredInTopLayer(id) {
64
+ const own = presentationOrder.get(id);
65
+ if (own == null) return false;
66
+ for (const [other, stamp] of presentationOrder) if (other !== id && stamp > own && options.dialogOf(other)?.open) return true;
67
+ return false;
68
+ }
69
+ function forgetStep(id) {
70
+ presentationOrder.delete(id);
71
+ }
72
+ /** 一叠只有一层可见遮罩:只有遮罩主人的 `::backdrop` 带当前透明度,其它步骤的遮罩一直透明。 */
73
+ function applyScrim() {
74
+ const ownerId = options.scrimOwnerId.value;
75
+ const owner = ownerId == null ? null : options.dialogOf(ownerId);
76
+ const value = ownsStackScrim(view.value) ? scrimOpacity : 0;
77
+ const ownerChanged = scrimOwner != null && scrimOwner !== ownerId;
78
+ scrimOwner = ownerId;
79
+ for (const id of options.stepIds()) {
80
+ const dialog = options.dialogOf(id);
81
+ if (dialog == null) continue;
82
+ if (dialog === owner) {
83
+ if (ownerChanged && dialog.open) takeOverScrim(dialog, value);
84
+ else dialog.style.setProperty("--_sheet-scrim-opacity", String(value));
85
+ } else if (id !== ownerId) dialog.style.setProperty("--_sheet-scrim-opacity", "0");
86
+ }
87
+ }
88
+ /** 拖动当前那步时遮罩跟手变淡;交接后还在给上一步发的拖动事件不算。 */
89
+ function onScrimOpacity(id, opacity) {
90
+ if (id !== options.activeId.value) return;
91
+ scrimOpacity = opacity;
92
+ applyScrim();
93
+ }
94
+ function register() {
95
+ registeredScrim = options.hasScrim();
96
+ leaveStack = registerBottomSheet({
97
+ key,
98
+ getElement: hostDialog,
99
+ getTreeAnchor: options.getFlow,
100
+ show: () => {
101
+ const dialog = hostDialog();
102
+ const id = options.hostId.value;
103
+ if (dialog == null || id == null || dialog.open) return;
104
+ beforePresent(id);
105
+ if (id === scrimOwner && ownsStackScrim(view.value)) {
106
+ dialog.style.setProperty("--_sheet-scrim-opacity", String(scrimOpacity));
107
+ presentStepModally(dialog);
108
+ } else presentWithClearScrim(dialog);
109
+ notifiedHost = dialog;
110
+ },
111
+ hide: () => closeDialogKeepingFocus(hostDialog()),
112
+ getReturnTarget: () => trigger,
113
+ focus: (reason) => {
114
+ const active = options.activeId.value;
115
+ focusSheetPanel(active == null ? null : options.panelOf(active), reason, true);
116
+ },
117
+ onView: (next) => {
118
+ const previous = view.value;
119
+ view.value = next;
120
+ const owner = scrimOwner == null ? null : options.dialogOf(scrimOwner);
121
+ if (owner == null) return;
122
+ const ownsNow = ownsStackScrim(next);
123
+ if (options.isFlowOpen.value && ownsNow !== ownsStackScrim(previous)) writeScrimOpacity(owner, ownsNow && scrimOpacity > 0 ? "1" : "0", scrimWrite);
124
+ else if (!options.isFlowOpen.value && next.isScrimTakenOver) writeScrimOpacity(owner, "0", scrimWrite);
125
+ }
126
+ }, options.isFlowOpen.value, true);
127
+ }
128
+ function leave() {
129
+ const stop = leaveStack;
130
+ if (stop == null) return;
131
+ leftStack = {
132
+ depth: view.value.depth,
133
+ revealed: getBottomSheetBeneath(key),
134
+ closingTogether: isClosingTogether(key)
135
+ };
136
+ leaveStack = null;
137
+ notifiedHost = null;
138
+ stop();
139
+ view.value = BOTTOM_SHEET_STACK_DEFAULT_VIEW;
140
+ }
141
+ function syncStack() {
142
+ const shouldRegister = options.isFlowVisible.value && options.hasScrim();
143
+ if (leaveStack != null && (!shouldRegister || registeredScrim !== options.hasScrim())) leave();
144
+ if (!shouldRegister) return;
145
+ if (leaveStack == null) register();
146
+ else setBottomSheetOpen(key, options.isFlowOpen.value);
147
+ }
148
+ /** 这一层换了实现它的对话框(交接到了自带对话框的下一步):呈现之后让登记表把该在它上面的面板放回上面。 */
149
+ function syncHostDialog() {
150
+ const dialog = hostDialog();
151
+ if (leaveStack == null || dialog == null || !dialog.open || dialog === notifiedHost) return;
152
+ notifiedHost = dialog;
153
+ notifyBottomSheetHostChanged(key);
154
+ }
155
+ function returnFocus() {
156
+ const left = leftStack;
157
+ leftStack = null;
158
+ if (isModalFlow) {
159
+ if ((left?.depth ?? view.value.depth) > 0) {} else if (left?.closingTogether) reportClosedTogether(key);
160
+ else {
161
+ const revealed = left?.revealed ?? getBottomSheetBeneath(key);
162
+ if (revealed != null && (trigger == null || !revealed.element.contains(trigger))) revealed.focus();
163
+ else returnFocusTo(trigger);
164
+ }
165
+ } else if (!options.hasScrim()) {
166
+ const active = document.activeElement;
167
+ const isFocusLeftInFlow = active == null || active === document.body || holdsFocus(active);
168
+ if (hadFocusAtClose && isFocusLeftInFlow) returnFocusTo(trigger);
169
+ }
170
+ hadFocusAtClose = false;
171
+ trigger = null;
172
+ focusRecord?.stop();
173
+ focusRecord = null;
174
+ isModalFlow = false;
175
+ presentationOrder.clear();
176
+ }
177
+ /** 流程不再可见、而且每一步的对话框都关了,才还焦点:开着的模态对话框会挡住页面上的打开者。 */
178
+ function tryReturnFocus() {
179
+ if (!isFocusReturnPending) return;
180
+ for (const id of options.stepIds()) if (options.dialogOf(id)?.open) return;
181
+ isFocusReturnPending = false;
182
+ returnFocus();
183
+ }
184
+ function afterStepSync() {
185
+ syncHostDialog();
186
+ tryReturnFocus();
187
+ }
188
+ watch(options.isFlowOpen, (open, wasOpen) => {
189
+ if (wasOpen && !open && typeof document !== "undefined") hadFocusAtClose = holdsFocus(document.activeElement);
190
+ }, { flush: "post" });
191
+ watch([
192
+ options.scrimOwnerId,
193
+ () => ownsStackScrim(view.value),
194
+ options.activeId,
195
+ options.hasScrim,
196
+ options.isFlowVisible
197
+ ], () => {
198
+ scrimOpacity = options.activeId.value == null ? 0 : 1;
199
+ applyScrim();
200
+ }, { flush: "post" });
201
+ watch([
202
+ options.isFlowVisible,
203
+ options.isFlowOpen,
204
+ options.hasScrim
205
+ ], syncStack, { flush: "post" });
206
+ watch(options.hostId, syncHostDialog, { flush: "post" });
207
+ watch(options.isFlowVisible, (visible) => {
208
+ if (visible) {
209
+ isFocusReturnPending = false;
210
+ return;
211
+ }
212
+ isFocusReturnPending = true;
213
+ tryReturnFocus();
214
+ }, { flush: "post" });
215
+ onBeforeUnmount(() => {
216
+ cancelScrimWrite(scrimWrite);
217
+ const record = focusRecord;
218
+ focusRecord = null;
219
+ const wasStranded = record != null && options.isFlowVisible.value && isLayerFocusStranded(record, options.getFlow());
220
+ leaveStack?.();
221
+ leaveStack = null;
222
+ if (record != null) queueMicrotask(() => {
223
+ if (wasStranded) restoreLayerFocus(record, {
224
+ layer: null,
225
+ name: "BottomSheetSwitcher"
226
+ });
227
+ record.stop();
228
+ });
229
+ });
230
+ return {
231
+ view,
232
+ beforePresent,
233
+ afterStepSync,
234
+ isCoveredInTopLayer,
235
+ forgetStep,
236
+ onScrimOpacity
237
+ };
238
+ }
239
+ //#endregion
240
+ //#region src/BottomSheet/switcher/useSwitcherTransition.ts
241
+ const IDLE = Object.freeze({
242
+ enteringId: null,
243
+ retainedId: null,
244
+ retainedPhase: null,
245
+ alignmentOffset: 0,
246
+ isAlignmentComplete: false
247
+ });
248
+ const ALIGNMENT_THRESHOLD_PX = 1;
249
+ function transitionForChange(previous, next) {
250
+ if (previous == null) return IDLE;
251
+ if (next == null) return {
252
+ ...IDLE,
253
+ retainedId: previous,
254
+ retainedPhase: "exiting"
255
+ };
256
+ return {
257
+ ...IDLE,
258
+ enteringId: next,
259
+ retainedId: previous,
260
+ retainedPhase: "covered"
261
+ };
262
+ }
263
+ /** 被留下的那步要往下移多少,才能和进场那步停下来的顶边对齐。进场那步的定位层不跟着进场位移走,它的顶边就是停的地方。 */
264
+ function alignmentOffsetFor(entering, retained) {
265
+ if (entering == null || retained == null) return 0;
266
+ const enteringTop = (entering.parentElement ?? entering).getBoundingClientRect().top;
267
+ return Math.max(0, enteringTop - retained.getBoundingClientRect().top);
268
+ }
269
+ /**
270
+ * 切换器的交接状态机:换到下一步时新的一步从下面升上来,比它高的上一步同时往下移到顶边对齐,
271
+ * 两边都走完后上一步淡出;整段流程关掉时最后那步滑出。
272
+ */
273
+ function useSwitcherTransition(options) {
274
+ const transition = shallowRef(IDLE);
275
+ watch(options.activeId, (next, previous) => {
276
+ const change = transitionForChange(previous, next);
277
+ transition.value = change.retainedId != null && !options.hasStep(change.retainedId) ? IDLE : change;
278
+ }, { flush: "sync" });
279
+ const retainedId = computed(() => transition.value.retainedId);
280
+ function phaseOf(id) {
281
+ const current = transition.value;
282
+ if (id === options.activeId.value) return id === current.enteringId ? "entering" : "active";
283
+ if (id === current.retainedId) return current.retainedPhase ?? "hidden";
284
+ return "hidden";
285
+ }
286
+ function alignmentOffsetOf(id) {
287
+ return transition.value.retainedId === id ? transition.value.alignmentOffset : 0;
288
+ }
289
+ function onEnterStart(id) {
290
+ const current = transition.value;
291
+ if (current.enteringId !== id || current.retainedId == null || current.retainedPhase !== "covered") return;
292
+ const offset = alignmentOffsetFor(options.getPanel(id), options.getPanel(current.retainedId));
293
+ if (offset <= ALIGNMENT_THRESHOLD_PX) return;
294
+ transition.value = {
295
+ ...current,
296
+ retainedPhase: "aligning",
297
+ alignmentOffset: offset,
298
+ isAlignmentComplete: false
299
+ };
300
+ }
301
+ function onComplete(id, motion) {
302
+ const current = transition.value;
303
+ if (motion === "entering") {
304
+ if (current.enteringId !== id) return;
305
+ if (current.retainedId == null) transition.value = IDLE;
306
+ else if (current.retainedPhase === "aligning" && !current.isAlignmentComplete) transition.value = {
307
+ ...current,
308
+ enteringId: null
309
+ };
310
+ else transition.value = {
311
+ ...current,
312
+ enteringId: null,
313
+ retainedPhase: "fading"
314
+ };
315
+ return;
316
+ }
317
+ if (current.retainedId !== id) return;
318
+ if (motion === "aligning" && current.retainedPhase === "aligning") {
319
+ transition.value = current.enteringId == null ? {
320
+ ...current,
321
+ retainedPhase: "fading"
322
+ } : {
323
+ ...current,
324
+ isAlignmentComplete: true
325
+ };
326
+ return;
327
+ }
328
+ if ((motion === "fading" || motion === "exiting") && current.retainedPhase === motion) transition.value = IDLE;
329
+ }
330
+ /** 被留下的那步卸载了:交接就此结束。 */
331
+ function dropStep(id) {
332
+ if (transition.value.retainedId === id) transition.value = IDLE;
333
+ }
334
+ return {
335
+ retainedId,
336
+ phaseOf,
337
+ alignmentOffsetOf,
338
+ onEnterStart,
339
+ onComplete,
340
+ dropStep
341
+ };
342
+ }
343
+ //#endregion
344
+ //#region src/BottomSheet/BottomSheetSwitcher.vue
345
+ /**
346
+ * 让一组 BottomSheet 同时最多只有一张是当前那步,每一步各有自己的原生 dialog。
347
+ * 换步时上一步原地留着、不能操作,新的一步从下面升上来,上一步比它高时同时往下移到顶边对齐,
348
+ * 两边都走完后上一步淡出。
349
+ *
350
+ * @deprecated Write each step as its own `BottomSheet` with `isOpen`, driven
351
+ * by one state value that names the open step; closing the top sheet and opening the
352
+ * next in the same update, from a control inside the open step, runs the same replace
353
+ * handoff (see BottomSheet, "Replacing a sheet"). Keeps working until a future minor
354
+ * release removes it.
355
+ */
356
+ const _sfc_main = /*@__PURE__*/ defineComponent({
357
+ name: "AstryxBottomSheetSwitcher",
358
+ inheritAttrs: false,
359
+ __name: "BottomSheetSwitcher",
360
+ props: /*@__PURE__*/ mergeModels({
361
+ label: {},
362
+ purpose: {},
363
+ hasScrim: {
364
+ type: Boolean,
365
+ default: true
366
+ }
367
+ }, {
368
+ "activeSheet": { default: null },
369
+ "activeSheetModifiers": {}
370
+ }),
371
+ emits: /*@__PURE__*/ mergeModels(["cancel"], ["update:activeSheet"]),
372
+ setup(__props, { emit: __emit }) {
373
+ const props = __props;
374
+ const emit = __emit;
375
+ const activeSheet = useModel(__props, "activeSheet");
376
+ const attrs = useAttrs();
377
+ const host = inject(bottomSheetHostKey, null);
378
+ const flow = useTemplateRef("flow");
379
+ const isMounted = ref(false);
380
+ const activeId = computed(() => isMounted.value && (host?.isOpen.value ?? true) ? activeSheet.value : null);
381
+ const settledId = ref(getCurrentInstance()?.vnode.el != null ? activeSheet.value : null);
382
+ const steps = shallowRef(/* @__PURE__ */ new Map());
383
+ function hasStep(id) {
384
+ return id != null && steps.value.has(id);
385
+ }
386
+ const transition = useSwitcherTransition({
387
+ activeId,
388
+ hasStep,
389
+ getPanel: (id) => steps.value.get(id)?.getPanel() ?? null
390
+ });
391
+ const presentedActive = computed(() => hasStep(activeId.value) ? activeId.value : null);
392
+ const presentedRetained = computed(() => hasStep(transition.retainedId.value) ? transition.retainedId.value : null);
393
+ const isFlowVisible = computed(() => presentedActive.value != null || presentedRetained.value != null);
394
+ const isFlowOpen = computed(() => activeId.value != null);
395
+ const isFlowClosing = computed(() => isFlowVisible.value && activeId.value == null);
396
+ const lastHostId = ref(null);
397
+ const presentedHost = computed(() => presentedActive.value ?? presentedRetained.value);
398
+ watch(presentedHost, (id) => {
399
+ if (id != null) lastHostId.value = id;
400
+ }, { flush: "sync" });
401
+ const hostId = computed(() => presentedHost.value ?? (hasStep(lastHostId.value) ? lastHostId.value : steps.value.keys().next().value ?? null));
402
+ const scrimOwnerId = computed(() => presentedRetained.value ?? presentedActive.value);
403
+ const flowPurpose = computed(() => props.purpose ?? (activeId.value == null ? void 0 : steps.value.get(activeId.value)?.purpose()) ?? "info");
404
+ const dialogOf = (id) => steps.value.get(id)?.getDialog() ?? null;
405
+ const hostDialog = () => hostId.value == null ? null : dialogOf(hostId.value);
406
+ const stack = useSwitcherStack({
407
+ hasScrim: () => props.hasScrim,
408
+ activeId,
409
+ isFlowVisible,
410
+ isFlowOpen,
411
+ hostId,
412
+ scrimOwnerId,
413
+ dialogOf,
414
+ panelOf: (id) => steps.value.get(id)?.getPanel() ?? null,
415
+ stepIds: () => steps.value.keys(),
416
+ getFlow: () => flow.value ?? null
417
+ });
418
+ const stackView = stack.view;
419
+ useScrollLock(computed(() => props.hasScrim && isFlowVisible.value));
420
+ useModalOutletWhile(hostDialog, () => props.hasScrim && isFlowOpen.value && (stackView.value.isTop || !stackView.value.isStacked));
421
+ function requestCloseFlow() {
422
+ if (flowPurpose.value === "required") return;
423
+ activeSheet.value = null;
424
+ }
425
+ const layerEscape = computed(() => {
426
+ if (activeId.value == null || flowPurpose.value === "required") return "block";
427
+ if (!props.hasScrim) return "ignore";
428
+ return "close";
429
+ });
430
+ const layer = useSheetLayerDismiss({
431
+ isActive: isFlowVisible,
432
+ escape: layerEscape,
433
+ getContainer: hostDialog,
434
+ isPresent: () => (hostDialog()?.open ?? false) && !stackView.value.isCovered,
435
+ onDismiss: requestCloseFlow
436
+ });
437
+ function onKeydown(event) {
438
+ if (event.key !== "Escape" || !layer.isTop()) return;
439
+ event.preventDefault();
440
+ if (isImeKeyEvent(event)) return;
441
+ requestCloseFlow();
442
+ }
443
+ function onCancel(event) {
444
+ if (event.target !== event.currentTarget) return;
445
+ emit("cancel", event);
446
+ if (event.defaultPrevented) return;
447
+ event.preventDefault();
448
+ if (!layer.isTop()) return;
449
+ requestCloseFlow();
450
+ }
451
+ function onClick(event) {
452
+ if (event.target !== event.currentTarget || event.currentTarget !== hostDialog()) return;
453
+ if (props.hasScrim && flowPurpose.value === "info") activeSheet.value = null;
454
+ }
455
+ function onMotionStart(id, motion) {
456
+ if (motion === "entering") transition.onEnterStart(id);
457
+ }
458
+ function onMotionComplete(id, motion) {
459
+ transition.onComplete(id, motion);
460
+ }
461
+ /** id 和 data-testid 只放在宿主对话框上;其它 attrs 落到每一步的对话框上。 */
462
+ const hostAttrs = computed(() => ({
463
+ "id": attrs.id,
464
+ "data-testid": attrs["data-testid"]
465
+ }));
466
+ const stepAttrs = computed(() => {
467
+ const { "id": _id, "data-testid": _testId, ...rest } = attrs;
468
+ return {
469
+ ...rest,
470
+ "aria-label": attrs["aria-label"] ?? props.label
471
+ };
472
+ });
473
+ const context = {
474
+ activeId,
475
+ hasScrim: () => props.hasScrim,
476
+ isFlowClosing,
477
+ stackView,
478
+ settledId,
479
+ phaseOf: transition.phaseOf,
480
+ alignmentOffsetOf: transition.alignmentOffsetOf,
481
+ isHost: (id) => hostId.value === id,
482
+ isScrimOwner: (id) => scrimOwnerId.value === id,
483
+ stepAttrs: () => stepAttrs.value,
484
+ hostAttrs: () => hostAttrs.value,
485
+ register: (id, step) => {
486
+ const next = new Map(steps.value);
487
+ next.set(id, step);
488
+ steps.value = next;
489
+ },
490
+ unregister: (id) => {
491
+ const next = new Map(steps.value);
492
+ next.delete(id);
493
+ steps.value = next;
494
+ transition.dropStep(id);
495
+ stack.forgetStep(id);
496
+ },
497
+ beforePresent: stack.beforePresent,
498
+ afterStepSync: stack.afterStepSync,
499
+ isCoveredInTopLayer: stack.isCoveredInTopLayer,
500
+ onMotionStart,
501
+ onMotionComplete,
502
+ onScrimOpacity: stack.onScrimOpacity,
503
+ requestClose: (id) => {
504
+ if (activeSheet.value === id) activeSheet.value = null;
505
+ },
506
+ onCancel,
507
+ onClick,
508
+ onKeydown
509
+ };
510
+ provide(bottomSheetSwitcherKey, context);
511
+ watch(activeSheet, (_id, previous) => {
512
+ if (previous != null) settledId.value = null;
513
+ });
514
+ onMounted(() => {
515
+ isMounted.value = true;
516
+ });
517
+ return (_ctx, _cache) => {
518
+ return openBlock(), createElementBlock("div", {
519
+ ref_key: "flow",
520
+ ref: flow,
521
+ class: normalizeClass(["astryx-bottom-sheet-switcher-flow", { "astryx-bottom-sheet-switcher-flow--non-modal": !__props.hasScrim && isFlowVisible.value }])
522
+ }, [renderSlot(_ctx.$slots, "default")], 2);
523
+ };
524
+ }
525
+ });
526
+ //#endregion
527
+ export { _sfc_main as t };