@astryx-vue/core 0.12.0 → 0.12.1

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 (258) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-BO2LucRK.js → AlertDialog-igjA8kZr.js} +6 -6
  3. package/dist/AppShell/index.d.ts +1 -1
  4. package/dist/AppShell/index.js +1 -1
  5. package/dist/{AppShell-kqwLt4ez.js → AppShell-DUHcLJWD.js} +2 -2
  6. package/dist/Avatar/index.js +1 -1
  7. package/dist/{Avatar-Bdnu3col.js → Avatar-KmdgVaAb.js} +1 -1
  8. package/dist/AvatarGroup/index.d.ts +1 -1
  9. package/dist/Banner/index.d.ts +1 -1
  10. package/dist/Banner/index.js +1 -1
  11. package/dist/{Banner-C-8DEWdJ.js → Banner-Bf_nMW3-.js} +1 -1
  12. package/dist/BottomSheet/index.d.ts +1 -1
  13. package/dist/BottomSheet/index.js +2 -2
  14. package/dist/{BottomSheet-CgOzQHaA.js → BottomSheet-B57XUJV3.js} +3 -2
  15. package/dist/{BottomSheet-BECeWtEy.js → BottomSheet-BMqjymuf.js} +3 -3
  16. package/dist/Breadcrumbs/index.js +1 -1
  17. package/dist/{Breadcrumbs-Dxjz2Dxn.js → Breadcrumbs-aTPAdLdg.js} +1 -1
  18. package/dist/Button/index.d.ts +1 -1
  19. package/dist/Button/index.js +1 -1
  20. package/dist/{Button-BeNp2zq_.js → Button-sUkQ0Ufo.js} +5 -4
  21. package/dist/ButtonGroup/index.d.ts +1 -1
  22. package/dist/ButtonGroup/index.js +1 -1
  23. package/dist/{ButtonGroup-CosYAili.js → ButtonGroup-CWra-KDj.js} +3 -2
  24. package/dist/Calendar/index.d.ts +1 -1
  25. package/dist/Card/index.d.ts +1 -1
  26. package/dist/Carousel/index.d.ts +1 -1
  27. package/dist/Carousel/index.js +1 -1
  28. package/dist/{Carousel-BCcyDFRy.js → Carousel-DmXceU9h.js} +1 -1
  29. package/dist/Chat/index.d.ts +1 -1
  30. package/dist/Chat/index.js +1 -1
  31. package/dist/{Chat-D3UDsL7W.js → Chat-CeibAkxn.js} +4 -4
  32. package/dist/CheckboxInput/index.d.ts +1 -1
  33. package/dist/CheckboxInput/index.js +1 -1
  34. package/dist/{CheckboxInput-iCg8FgRv.js → CheckboxInput-PvzPV1N1.js} +1 -1
  35. package/dist/CheckboxList/index.d.ts +1 -1
  36. package/dist/CheckboxList/index.js +1 -1
  37. package/dist/{CheckboxList-Dr40y9ME.js → CheckboxList-DKtNzb0t.js} +3 -3
  38. package/dist/ClickableCard/index.d.ts +1 -1
  39. package/dist/Code/index.d.ts +1 -1
  40. package/dist/Code/index.js +1 -1
  41. package/dist/{CodeBlock-B0LPcu-J.js → CodeBlock-CTPuBH_r.js} +1 -1
  42. package/dist/Collapsible/index.d.ts +1 -1
  43. package/dist/CommandPalette/index.js +1 -1
  44. package/dist/{CommandPalette-D_lf06eE.js → CommandPalette-DIoT_vZh.js} +1 -1
  45. package/dist/ComplexSelector/index.d.ts +1 -1
  46. package/dist/ComplexSelector/index.js +1 -1
  47. package/dist/{ComplexSelector-BzGKWYEv.js → ComplexSelector-B_5mzJjR.js} +2 -2
  48. package/dist/ContextMenu/index.d.ts +1 -1
  49. package/dist/ContextMenu/index.js +1 -1
  50. package/dist/{ContextMenu-6AnjpPJg.js → ContextMenu-DYnyk5rs.js} +4 -4
  51. package/dist/DateInput/index.d.ts +1 -1
  52. package/dist/DateInput/index.js +1 -1
  53. package/dist/{DateInput-OkjtSKwt.js → DateInput-DgPIsWPu.js} +4 -4
  54. package/dist/DateRangeInput/index.d.ts +1 -1
  55. package/dist/DateRangeInput/index.js +1 -1
  56. package/dist/{DateRangeInput-B4HT9NfM.js → DateRangeInput-oOfhUt1Q.js} +3 -3
  57. package/dist/DateTimeInput/index.d.ts +1 -1
  58. package/dist/DateTimeInput/index.js +1 -1
  59. package/dist/{DateTimeInput-B_tQlraA.js → DateTimeInput-DZfghF2h.js} +5 -5
  60. package/dist/Dialog/index.d.ts +1 -1
  61. package/dist/Dialog/index.js +3 -3
  62. package/dist/{Dialog-BtPktuiy.js → Dialog-Dkwt3mVt.js} +25 -8
  63. package/dist/{Dialog-3MKo31xn.js → Dialog-qIL4DUot.js} +1 -1
  64. package/dist/{DialogHeader-cr9rFLYM.js → DialogHeader-w4TCzYEj.js} +2 -2
  65. package/dist/Drawer/index.d.ts +1 -1
  66. package/dist/Drawer/index.js +1 -1
  67. package/dist/{Drawer-Ba-yG1rk.js → Drawer-DBHSNUAa.js} +2 -2
  68. package/dist/DropdownMenu/index.js +2 -2
  69. package/dist/{DropdownMenu-DJK_xIUd.js → DropdownMenu-Cncx4FbU.js} +3 -3
  70. package/dist/{DropdownMenu-B9eUWp_X.js → DropdownMenu-DHvAlqSj.js} +5 -5
  71. package/dist/EmptyState/index.js +1 -1
  72. package/dist/{EmptyState-v1cvHKav.js → EmptyState-uWyPaIR1.js} +2 -2
  73. package/dist/Field/index.js +3 -3
  74. package/dist/{Field-Dc15m78p.js → Field-CqDOsI3P.js} +1 -1
  75. package/dist/{FieldInfoTip-BouJddgS.js → FieldInfoTip-CUh2koNc.js} +1 -1
  76. package/dist/{FieldLabel-CfO3zaZ5.js → FieldLabel-BMHNRAG3.js} +1 -1
  77. package/dist/FileInput/index.d.ts +1 -1
  78. package/dist/FileInput/index.js +1 -1
  79. package/dist/{FileInput-hNPjfW1i.js → FileInput-C6dK2pvX.js} +2 -2
  80. package/dist/Heading/index.js +1 -1
  81. package/dist/{Heading-C10qO8wg.js → Heading-C0axugQa.js} +1 -1
  82. package/dist/HoverCard/index.d.ts +1 -1
  83. package/dist/HoverCard/index.js +1 -1
  84. package/dist/{HoverCard-3S3axq-o.js → HoverCard-C6Gxekg0.js} +3 -3
  85. package/dist/IconButton/index.js +1 -1
  86. package/dist/{IconButton-C91rhbvu.js → IconButton-Bv2eIsJy.js} +1 -1
  87. package/dist/InfoTip/index.d.ts +1 -1
  88. package/dist/InfoTip/index.js +1 -1
  89. package/dist/{InfoTip-iKOp_vUV.js → InfoTip-BKsbmGA6.js} +4 -2
  90. package/dist/{InputClearButton-BiF7qGMR.js → InputClearButton-CSS2Tjat.js} +2 -2
  91. package/dist/InputGroup/index.d.ts +1 -1
  92. package/dist/InputGroup/index.js +1 -1
  93. package/dist/{InputGroup-CIKleAu8.js → InputGroup-DTGh1ylC.js} +1 -1
  94. package/dist/{LayerContentBoundary-CvsKxwwm.js → LayerContentBoundary-DwTkbifx.js} +1 -1
  95. package/dist/Layout/index.js +2 -2
  96. package/dist/{Layout-OHKb6r7D.js → Layout-BeYYiLFm.js} +1 -1
  97. package/dist/{LayoutPanel-D-rpTtC-.js → LayoutPanel-DDLcJgzG.js} +3 -0
  98. package/dist/Lightbox/index.d.ts +1 -1
  99. package/dist/Lightbox/index.js +1 -1
  100. package/dist/{Lightbox-DZrWvhCQ.js → Lightbox-BZ-zBvly.js} +106 -28
  101. package/dist/Link/index.d.ts +1 -1
  102. package/dist/Link/index.js +1 -1
  103. package/dist/{Link-CnlFkwpY.js → Link-Ddu0KjPZ.js} +1 -1
  104. package/dist/List/index.d.ts +1 -1
  105. package/dist/Markdown/index.d.ts +1 -1
  106. package/dist/Markdown/index.js +1 -1
  107. package/dist/{Markdown-YVv-0uFI.js → Markdown-D7bQGV9u.js} +3 -3
  108. package/dist/MobileNav/index.js +1 -1
  109. package/dist/{MobileNavToggle-lgEHlilz.js → MobileNavToggle-Dfshmrdy.js} +3 -2
  110. package/dist/MoreMenu/index.d.ts +1 -1
  111. package/dist/MoreMenu/index.js +1 -1
  112. package/dist/{MoreMenu-DaLb4bgr.js → MoreMenu-Bie4B7Jr.js} +4 -4
  113. package/dist/MultiSelector/index.d.ts +1 -1
  114. package/dist/MultiSelector/index.js +1 -1
  115. package/dist/{MultiSelector-stzuffs3.js → MultiSelector-BdedjB6u.js} +5 -5
  116. package/dist/{NavDisclosure-DG4jls5z.js → NavDisclosure-1otbO71l.js} +1 -1
  117. package/dist/{NavHeadingSurface-9JQsxTxs.js → NavHeadingSurface-BkMR3V5m.js} +1 -1
  118. package/dist/NavItem/index.d.ts +1 -1
  119. package/dist/NavMenu/index.js +3 -3
  120. package/dist/{NavMenu-ChlWdHfi.js → NavMenu-dyGZS1yM.js} +2 -2
  121. package/dist/{NavMenuItem-DIMQohIa.js → NavMenuItem-CirgE73a.js} +1 -1
  122. package/dist/NumberInput/index.d.ts +1 -1
  123. package/dist/NumberInput/index.js +1 -1
  124. package/dist/{NumberInput-DH0Cb7L6.js → NumberInput-0KbcEF3_.js} +3 -3
  125. package/dist/OverflowList/index.d.ts +1 -1
  126. package/dist/OverflowList/index.js +1 -1
  127. package/dist/{OverflowList-BGzqG78e.js → OverflowList-BdcaX1bz.js} +2 -2
  128. package/dist/Pagination/index.d.ts +1 -1
  129. package/dist/Pagination/index.js +1 -1
  130. package/dist/{Pagination-DMG9KvKa.js → Pagination-uttop2ls.js} +1 -1
  131. package/dist/Popover/index.d.ts +1 -1
  132. package/dist/Popover/index.js +1 -1
  133. package/dist/{Popover-cnfHz2tm.js → Popover-BOQo9UPf.js} +78 -26
  134. package/dist/PowerSearch/index.d.ts +1 -1
  135. package/dist/PowerSearch/index.js +1 -1
  136. package/dist/{PowerSearch-GD52glLU.js → PowerSearch-DDuYfvNh.js} +15 -15
  137. package/dist/ProgressBar/index.d.ts +1 -1
  138. package/dist/ProgressBar/index.js +1 -1
  139. package/dist/{ProgressBar-gsm2A_cR.js → ProgressBar-BS3VSoE9.js} +1 -1
  140. package/dist/Radio/index.d.ts +1 -1
  141. package/dist/Radio/index.js +1 -1
  142. package/dist/{RadioGroup-D3TXgdwV.js → RadioGroup-DKaSstyl.js} +2 -2
  143. package/dist/RadioList/index.d.ts +1 -1
  144. package/dist/RadioList/index.js +1 -1
  145. package/dist/{RadioList-Boj8QfPe.js → RadioList-DtKm9spP.js} +1 -1
  146. package/dist/ScrollableArea/index.d.ts +1 -1
  147. package/dist/SelectableCard/index.d.ts +1 -1
  148. package/dist/Selector/index.d.ts +1 -1
  149. package/dist/Selector/index.js +1 -1
  150. package/dist/{Selector-CyY6vVUg.js → Selector-OpczmkqS.js} +4 -4
  151. package/dist/SideNav/index.d.ts +1 -1
  152. package/dist/SideNav/index.js +1 -1
  153. package/dist/{SideNav-s9yTmKX3.js → SideNav-L6CWk5fV.js} +5 -5
  154. package/dist/Slider/index.js +1 -1
  155. package/dist/{Slider-BQ4Dhxdx.js → Slider-DZS8mGZA.js} +1 -1
  156. package/dist/StatusDot/index.js +1 -1
  157. package/dist/{StatusDot-DF5wK42f.js → StatusDot-DaQGq8YN.js} +1 -1
  158. package/dist/Stepper/index.d.ts +1 -1
  159. package/dist/Switch/index.d.ts +1 -1
  160. package/dist/Switch/index.js +1 -1
  161. package/dist/{Switch-B0E8cZy7.js → Switch-BN_NnBuc.js} +1 -1
  162. package/dist/TabList/index.d.ts +1 -1
  163. package/dist/TabList/index.js +1 -1
  164. package/dist/{TabList-DBSXa5QT.js → TabList-Bmj4tGT-.js} +1 -1
  165. package/dist/Table/index.d.ts +1 -1
  166. package/dist/Table/index.js +1 -1
  167. package/dist/{Table-BxXYAtBy.js → Table-_pSoEiGP.js} +10 -10
  168. package/dist/Text/index.js +1 -1
  169. package/dist/{Text-WB-fpFne.js → Text-IijvZmW-.js} +1 -1
  170. package/dist/TextArea/index.d.ts +1 -1
  171. package/dist/TextArea/index.js +1 -1
  172. package/dist/{TextArea-CSoebCLx.js → TextArea-BDR179q1.js} +4 -4
  173. package/dist/TextInput/index.d.ts +1 -1
  174. package/dist/TextInput/index.js +1 -1
  175. package/dist/{TextInput-B3qNW95s.js → TextInput-kUzxl99M.js} +4 -4
  176. package/dist/Thumbnail/index.js +1 -1
  177. package/dist/{Thumbnail-CTkLFo-A.js → Thumbnail-Disi5yDb.js} +2 -2
  178. package/dist/{TimeField-CMZxZ6gI.js → TimeField-C0la1AtP.js} +4 -4
  179. package/dist/TimeInput/index.d.ts +1 -1
  180. package/dist/TimeInput/index.js +1 -1
  181. package/dist/{TimeInput-BFWgRaV-.js → TimeInput-C_jTijHh.js} +2 -2
  182. package/dist/Timer/index.js +1 -1
  183. package/dist/{Timer-BD2gSoQ3.js → Timer-DifGERP8.js} +1 -1
  184. package/dist/Timestamp/index.d.ts +1 -1
  185. package/dist/Timestamp/index.js +1 -1
  186. package/dist/{Timestamp-DWnbOvnI.js → Timestamp-BjXZGAvO.js} +3 -3
  187. package/dist/Toast/index.js +1 -1
  188. package/dist/{Toast-aI9QMW-L.js → Toast-DBo0WRAd.js} +1 -1
  189. package/dist/ToggleButton/index.d.ts +1 -1
  190. package/dist/ToggleButton/index.js +1 -1
  191. package/dist/{ToggleButton-DI9I-LBH.js → ToggleButton-B5HNykOh.js} +4 -3
  192. package/dist/Token/index.d.ts +1 -1
  193. package/dist/Tokenizer/index.d.ts +1 -1
  194. package/dist/Tokenizer/index.js +1 -1
  195. package/dist/{Tokenizer-Caqr8y0B.js → Tokenizer-BNazaZsP.js} +3 -3
  196. package/dist/Toolbar/index.d.ts +1 -1
  197. package/dist/Tooltip/index.d.ts +1 -1
  198. package/dist/Tooltip/index.js +2 -2
  199. package/dist/{Tooltip-CGHpFMnc.js → Tooltip-4APVAlN9.js} +1 -1
  200. package/dist/TopNav/index.d.ts +1 -1
  201. package/dist/TopNav/index.js +1 -1
  202. package/dist/{TopNav-Cm_Hn6Ub.js → TopNav-XSZWAR-7.js} +4 -4
  203. package/dist/Typeahead/index.d.ts +1 -1
  204. package/dist/Typeahead/index.js +1 -1
  205. package/dist/{Typeahead-tz2lm5qb.js → Typeahead-BgQVQw-0.js} +3 -3
  206. package/dist/composables/index.js +7 -6
  207. package/dist/context-Cgkyk-b7.js +10 -0
  208. package/dist/{index-C5bnMSjX.d.ts → index-9tZJgo0R.d.ts} +3 -3
  209. package/dist/{index-B-Jla56c.d.ts → index-B3FE7s7V.d.ts} +3 -3
  210. package/dist/{index-BzZC2Y7c.d.ts → index-B44fLswd.d.ts} +8 -7
  211. package/dist/{index-WA7z12bQ.d.ts → index-BmYnVNI-.d.ts} +2 -2
  212. package/dist/{index-CL8JvxHW.d.ts → index-C1zwvxPH.d.ts} +2 -2
  213. package/dist/{index-CiVrhGUJ.d.ts → index-C9ZssPUV.d.ts} +1 -1
  214. package/dist/{index-FeZXsFO-.d.ts → index-CBOv5j3c.d.ts} +3 -3
  215. package/dist/{index-1AZ4KZhg.d.ts → index-CCpcerMA.d.ts} +2 -2
  216. package/dist/{index-BvWBeoa8.d.ts → index-CEjvYAUZ.d.ts} +1 -1
  217. package/dist/{index-CuNFD1Yq.d.ts → index-CGDmjlec.d.ts} +65 -65
  218. package/dist/{index-B0XIZGY0.d.ts → index-CKtrcglY.d.ts} +8 -8
  219. package/dist/{index-ul1hNxih.d.ts → index-CLHJybQY.d.ts} +1 -1
  220. package/dist/{index-DyALKpjX.d.ts → index-CM2L3SUw.d.ts} +4 -4
  221. package/dist/{index-YKCx03zD.d.ts → index-COgrQZIL.d.ts} +2 -2
  222. package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
  223. package/dist/{index--tm6L1ot.d.ts → index-Cb-HJUhK.d.ts} +2 -2
  224. package/dist/{index-BhxqUt3y.d.ts → index-CuW4AQ7M.d.ts} +2 -2
  225. package/dist/{index-rnFsCdJ7.d.ts → index-Cy1rEWC-.d.ts} +1 -1
  226. package/dist/{index-CP-fJFcJ.d.ts → index-DFLPv9io.d.ts} +1 -1
  227. package/dist/{index-C5e2rZML.d.ts → index-DhcjuwQq.d.ts} +3 -3
  228. package/dist/{index-CO9GW-ik.d.ts → index-Q1oG9yIT.d.ts} +1 -1
  229. package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
  230. package/dist/{index-CQwracWX.d.ts → index-_5purQow.d.ts} +7 -7
  231. package/dist/{index-BSlzqFzV.d.ts → index-a1jCiQP7.d.ts} +5 -5
  232. package/dist/{index-DaXzQxos.d.ts → index-lmd9LZKB.d.ts} +8 -5
  233. package/dist/{index-3t5RAfNP.d.ts → index-mkbGYz8f.d.ts} +2 -2
  234. package/dist/{index-BEZ4ezJk.d.ts → index-wY6dKz6c.d.ts} +2 -2
  235. package/dist/index.d.ts +28 -28
  236. package/dist/index.js +83 -82
  237. package/dist/{layerDepth-CNDh-IHb.js → layerDepth-BF74Cctw.js} +38 -14
  238. package/dist/layerFocusReturn-DMJaFgcY.js +121 -0
  239. package/dist/{tooltipTriggerRules-Bg4tG8w2.js → tooltipTriggerRules-BY3LAtUl.js} +1 -1
  240. package/dist/{useActionGroupTracking-B4niQ_tR.js → useActionGroupTracking-BJMRaXil.js} +1 -1
  241. package/dist/{useAnchoredListbox-9Gn8asBR.js → useAnchoredListbox-CuRfVgKl.js} +1 -1
  242. package/dist/{useDismiss-0-Z-9D0A.js → useDismiss-BWd-sQ18.js} +26 -5
  243. package/dist/{useRestoreFocus-CEG0n2AK.js → useFocusTrap-FJt5QhEd.js} +2 -36
  244. package/dist/{useHoverLayerDismiss-kYJ_NqL4.js → useHoverLayerDismiss-uhfzmZyf.js} +1 -1
  245. package/dist/{useInputStatusIcon-Da2FiXwF.js → useInputStatusIcon-C3Q-q_wI.js} +1 -1
  246. package/dist/{useLayer-CED-g4Q2.js → useLayer-BGv_wRSG.js} +1 -1
  247. package/dist/{useResizable-I3BCiLSL.js → useResizable-DTDhsLip.js} +1 -1
  248. package/dist/useRestoreFocus-D2-pGoOk.js +38 -0
  249. package/dist/{useTooltip-D8Tq7-yd.js → useTooltip-md1tr6ef.js} +61 -29
  250. package/dist/{context-BJ9RkXYX.js → useTouchHitArea-1WtV3u6F.js} +1 -10
  251. package/dist/{useTruncationTooltip-BNk2xslw.js → useTruncationTooltip-BGsFITq5.js} +3 -3
  252. package/dist/{useTypeahead-DSMObTtg.js → useTypeahead-BrUwR-kv.js} +1 -1
  253. package/package.json +1 -1
  254. package/styles/dialog.css +0 -1
  255. package/styles/info-tip.css +0 -9
  256. package/styles/lightbox.css +7 -2
  257. package/styles/popover.css +2 -0
  258. package/dist/{index-D8lv2BiD.d.ts → index-J6YRJ7Ul.d.ts} +1 -1
@@ -1,4 +1,4 @@
1
- import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
1
+ import { a as isImeKeyEvent } from "./layerDepth-BF74Cctw.js";
2
2
  import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
3
3
  import { r as getFocusables } from "./focus-l8jVTcqd.js";
4
4
  import { onScopeDispose, ref, toValue, watch } from "vue";
@@ -158,38 +158,4 @@ function useFocusTrap(options = {}) {
158
158
  };
159
159
  }
160
160
  //#endregion
161
- //#region src/composables/useRestoreFocus.ts
162
- /**
163
- * 在浮层组件打开时保存当前焦点元素,关闭时恢复焦点。
164
- * 用于对话框、抽屉、弹出菜单等浮层组件。
165
- *
166
- * 恢复时焦点环跟着上一次的输入走:键盘关掉的照常画环,鼠标或手指关掉的不画。
167
- */
168
- function useRestoreFocus(options) {
169
- const { isEnabled, shouldRestore } = options;
170
- let savedElement = null;
171
- function save() {
172
- if (!isEnabled.value || typeof document === "undefined") return;
173
- trackInteractionModality();
174
- const active = document.activeElement;
175
- if (active instanceof HTMLElement) savedElement = active;
176
- }
177
- function restore() {
178
- if (!isEnabled.value || !savedElement) return;
179
- if (savedElement.isConnected && !savedElement.hasAttribute("disabled")) focusForLastInput(savedElement);
180
- savedElement = null;
181
- }
182
- watch(shouldRestore, (should) => {
183
- if (should) save();
184
- else if (isEnabled.value && savedElement) restore();
185
- });
186
- onScopeDispose(() => {
187
- savedElement = null;
188
- });
189
- return {
190
- save,
191
- restore
192
- };
193
- }
194
- //#endregion
195
- export { useFocusTrap as n, focusForLastInput as r, useRestoreFocus as t };
161
+ export { focusForLastInput as n, useFocusTrap as t };
@@ -1,4 +1,4 @@
1
- import { i as pushLayer, n as useLayerDepth, r as isTopLayer } from "./layerDepth-CNDh-IHb.js";
1
+ import { i as pushLayer, n as useLayerDepth, r as isTopLayer } from "./layerDepth-BF74Cctw.js";
2
2
  import { onScopeDispose } from "vue";
3
3
  //#region src/layer/useHoverLayerDismiss.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { t as _sfc_main } from "./FieldIcon-DMtfe1Ne.js";
2
- import { t as _sfc_main$1 } from "./FieldInfoTip-BouJddgS.js";
2
+ import { t as _sfc_main$1 } from "./FieldInfoTip-CUh2koNc.js";
3
3
  import { computed, toValue } from "vue";
4
4
  //#region src/composables/useInputStatusIcon.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-0-Z-9D0A.js";
1
+ import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-BWd-sQ18.js";
2
2
  import { computed, shallowRef, toValue, useId } from "vue";
3
3
  //#region src/composables/useLayer.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
1
+ import { a as isImeKeyEvent } from "./layerDepth-BF74Cctw.js";
2
2
  import { t as isApplePlatform } from "./isApplePlatform-B1ju6F5B.js";
3
3
  import { r as registerResizableChannel } from "./resizableChannel-3vivrEcT.js";
4
4
  import { computed, onBeforeUnmount, onMounted, onScopeDispose, reactive, ref, toValue, watch } from "vue";
@@ -0,0 +1,38 @@
1
+ import { r as trackInteractionModality } from "./interactionModality-ACpTMhak.js";
2
+ import { n as focusForLastInput } from "./useFocusTrap-FJt5QhEd.js";
3
+ import { onScopeDispose, watch } from "vue";
4
+ //#region src/composables/useRestoreFocus.ts
5
+ /**
6
+ * 在浮层组件打开时保存当前焦点元素,关闭时恢复焦点。
7
+ * 用于对话框、抽屉、弹出菜单等浮层组件。
8
+ *
9
+ * 恢复时焦点环跟着上一次的输入走:键盘关掉的照常画环,鼠标或手指关掉的不画。
10
+ */
11
+ function useRestoreFocus(options) {
12
+ const { isEnabled, shouldRestore } = options;
13
+ let savedElement = null;
14
+ function save() {
15
+ if (!isEnabled.value || typeof document === "undefined") return;
16
+ trackInteractionModality();
17
+ const active = document.activeElement;
18
+ if (active instanceof HTMLElement) savedElement = active;
19
+ }
20
+ function restore() {
21
+ if (!isEnabled.value || !savedElement) return;
22
+ if (savedElement.isConnected && !savedElement.hasAttribute("disabled")) focusForLastInput(savedElement);
23
+ savedElement = null;
24
+ }
25
+ watch(shouldRestore, (should) => {
26
+ if (should) save();
27
+ else if (isEnabled.value && savedElement) restore();
28
+ });
29
+ onScopeDispose(() => {
30
+ savedElement = null;
31
+ });
32
+ return {
33
+ save,
34
+ restore
35
+ };
36
+ }
37
+ //#endregion
38
+ export { useRestoreFocus as t };
@@ -1,11 +1,12 @@
1
1
  import { r as registerLayerSurface } from "./layerSurfacePress-C3PjPpJP.js";
2
2
  import { r as useResolvedLayerTeleport } from "./useLayerMountTarget-BmZyeKWE.js";
3
- import { t as useLayer } from "./useLayer-CED-g4Q2.js";
4
- import { t as _sfc_main$1 } from "./LayerContentBoundary-CvsKxwwm.js";
5
- import { n as isTextEntryTap, r as matchesFocusVisible, t as isActionTrigger } from "./tooltipTriggerRules-Bg4tG8w2.js";
3
+ import { t as useLayer } from "./useLayer-BGv_wRSG.js";
4
+ import { t as _sfc_main$1 } from "./LayerContentBoundary-DwTkbifx.js";
5
+ import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
6
+ import { i as matchesFocusVisible, n as isTextEntryControl, r as isTextEntryTap, t as isActionTrigger } from "./tooltipTriggerRules-BY3LAtUl.js";
6
7
  import { t as useAnnounce } from "./announce-B210eJVf.js";
7
8
  import { i as isFocusable } from "./focus-l8jVTcqd.js";
8
- import { t as useHoverLayerDismiss } from "./useHoverLayerDismiss-kYJ_NqL4.js";
9
+ import { t as useHoverLayerDismiss } from "./useHoverLayerDismiss-uhfzmZyf.js";
9
10
  import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeProps, onMounted, onScopeDispose, openBlock, ref, renderSlot, shallowRef, toDisplayString, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
10
11
  import "../styles/tooltip.css";
11
12
  //#region src/Tooltip/TooltipSurface.vue
@@ -107,6 +108,44 @@ function renderedText(element) {
107
108
  return parts.join("").replace(/\s+/g, " ").trim();
108
109
  }
109
110
  //#endregion
111
+ //#region src/Tooltip/tooltipFocusRules.ts
112
+ /**
113
+ * 这次焦点算不算触发器的焦点,焦点到达时才判断:
114
+ * - `always`:触发器自己或里面任何元素拿到焦点都算;
115
+ * - `auto`:触发器自己拿到焦点算;焦点落在里面时,触发器此刻能聚焦才算。
116
+ * 漫游 tabindex 的成员挂监听时可能是 `-1`,轮到它时已经是 Tab 停靠点了;
117
+ * 普通包裹层仍然不理会里面子元素的焦点;
118
+ * - `never`:都不算。
119
+ */
120
+ function isFocusForTrigger(mode, trigger, target) {
121
+ if (mode === "never") return false;
122
+ if (mode === "always") return true;
123
+ return target === trigger || isFocusable(trigger);
124
+ }
125
+ /**
126
+ * 落在 `target` 上的焦点会不会打开气泡。只有 `:focus-visible` 的焦点会,轻点从来不会。
127
+ * 上一次输入是指针时,只有文本框会打开:浏览器给指针点进文本框的焦点也算 focus-visible,
128
+ * 而指针按下之后脚本挪过来的焦点,在别的元素上也可能被标成 focus-visible。
129
+ */
130
+ function opensOnFocus(target, isTouch) {
131
+ if (isTouch || !matchesFocusVisible(target)) return false;
132
+ return isTextEntryControl(target) || getInteractionModality() !== "pointer";
133
+ }
134
+ function createFocusGate(mode) {
135
+ let counted = false;
136
+ return {
137
+ arrive(trigger, target) {
138
+ counted = trigger != null && isFocusForTrigger(mode(), trigger, target);
139
+ return counted;
140
+ },
141
+ leave(trigger, target) {
142
+ const wasCounted = counted || trigger != null && isFocusForTrigger(mode(), trigger, target);
143
+ counted = false;
144
+ return wasCounted;
145
+ }
146
+ };
147
+ }
148
+ //#endregion
110
149
  //#region src/Tooltip/tooltipPresentInterest.ts
111
150
  /** 仅库内部使用,不从 Tooltip 入口导出。 */
112
151
  const tooltipPresentInterestKey = Symbol("astryx-tooltip-present-interest");
@@ -152,15 +191,9 @@ function useTooltip(options = {}) {
152
191
  onHide: () => options.onHide?.()
153
192
  });
154
193
  const isOpen = computed(() => toValue(options.isOpen) ?? layer.isOpen.value);
155
- function isEnabled() {
156
- return toValue(options.isEnabled) ?? true;
157
- }
158
- function focusTriggerMode() {
159
- return toValue(options.focusTrigger) ?? "auto";
160
- }
161
- function touchTriggerMode() {
162
- return toValue(options.touchTrigger) ?? "auto";
163
- }
194
+ const isEnabled = () => toValue(options.isEnabled) ?? true;
195
+ const focusTriggerMode = () => toValue(options.focusTrigger) ?? "auto";
196
+ const touchTriggerMode = () => toValue(options.touchTrigger) ?? "auto";
164
197
  let showTimer;
165
198
  let hideTimer;
166
199
  function clearTimers() {
@@ -255,13 +288,17 @@ function useTooltip(options = {}) {
255
288
  if (isControlled.value) return;
256
289
  hideNow();
257
290
  }
291
+ const focusGate = createFocusGate(focusTriggerMode);
292
+ function onFocusArrive(trigger, target, isTouch) {
293
+ if (!focusGate.arrive(trigger, target) || !isEnabled() || !opensOnFocus(target, isTouch)) return;
294
+ if (toValue(options.isOpen) === false) options.onShow?.();
295
+ else showNow();
296
+ }
258
297
  function onFocusIn(event) {
259
- if (!isEnabled() || isTouchPointer.value) return;
260
- if (!matchesFocusVisible(event.target)) return;
261
- showNow();
298
+ onFocusArrive(bound, event.target, isTouchPointer.value);
262
299
  }
263
- function onFocusOut() {
264
- scheduleHide();
300
+ function onFocusOut(event) {
301
+ if (focusGate.leave(bound, event.target)) scheduleHide();
265
302
  }
266
303
  function onHeldFocusOut(event) {
267
304
  if (!isHeldOpen()) return;
@@ -332,23 +369,19 @@ function useTooltip(options = {}) {
332
369
  layer.hide();
333
370
  }
334
371
  });
335
- function shouldListenFocus(element) {
336
- return focusTriggerMode() === "always" || focusTriggerMode() === "auto" && isFocusable(element);
337
- }
338
372
  let describedByBefore = null;
339
373
  function bind(element) {
340
374
  if (bound === element) return;
341
375
  unbind();
342
376
  bound = element;
377
+ trackInteractionModality();
343
378
  element.addEventListener("pointerenter", onPointerEnter);
344
379
  element.addEventListener("mouseenter", onMouseEnter);
345
380
  element.addEventListener("mouseleave", onMouseLeave);
346
381
  element.addEventListener("pointerdown", onPointerDown);
347
382
  element.addEventListener("focusout", onHeldFocusOut);
348
- if (shouldListenFocus(element)) {
349
- element.addEventListener("focusin", onFocusIn);
350
- element.addEventListener("focusout", onFocusOut);
351
- }
383
+ element.addEventListener("focusin", onFocusIn);
384
+ element.addEventListener("focusout", onFocusOut);
352
385
  describedByBefore = element.getAttribute("aria-describedby");
353
386
  element.setAttribute("aria-describedby", [describedByBefore, layer.id].filter(Boolean).join(" "));
354
387
  answerPresentInterest(presentInterest, element, {
@@ -357,7 +390,7 @@ function useTooltip(options = {}) {
357
390
  isTouchPointer.value = true;
358
391
  onTouchTap(tapEvent);
359
392
  },
360
- focus: (focused) => shouldListenFocus(element) && matchesFocusVisible(focused) && showNow()
393
+ focus: (focused) => onFocusArrive(element, focused, false)
361
394
  });
362
395
  }
363
396
  function unbind() {
@@ -380,9 +413,8 @@ function useTooltip(options = {}) {
380
413
  else bind(element);
381
414
  }, { flush: "sync" });
382
415
  watch(() => toValue(options.isEnabled), (enabled) => {
383
- if (enabled !== false) return;
384
- clearTimeout(showTimer);
385
- showTimer = void 0;
416
+ if (enabled === false) hideNow();
417
+ else if (bound != null && bound.contains(document.activeElement)) onFocusArrive(bound, document.activeElement, false);
386
418
  }, { flush: "sync" });
387
419
  function syncControlled(open) {
388
420
  layer.isOpen.value = open;
@@ -1,6 +1,5 @@
1
1
  import { c as PRESS_GROUP_ITEM_ATTRIBUTE, l as isTrackedByGroup, r as pressFadeMs, t as PRESSED_ATTRIBUTE } from "./pressFeedback-Bwwpex9q.js";
2
2
  import { t as armStrayClick } from "./strayClick-CY-_ImKv.js";
3
- import { t as defineLayerScopedKey } from "./scopedProvide-C-Df7c15.js";
4
3
  import { toValue, watch } from "vue";
5
4
  import "../styles/touch-hit-area.css";
6
5
  /** 不长:热区就是目标本身。 */
@@ -665,12 +664,4 @@ function useTouchHitArea(element, enabled, options) {
665
664
  });
666
665
  }
667
666
  //#endregion
668
- //#region src/Button/context.ts
669
- const buttonGroupContextKey = defineLayerScopedKey("astryx-button-group", null);
670
- /**
671
- * 按钮是否画自己的触控热区。ButtonGroup、ToggleButtonGroup 提供 false:成员的热区由组统一画。
672
- * 输入框的清除按钮也提供 false,它用输入框自己的那一小圈。浮层里的按钮读到默认值 true,照样画自己的。
673
- */
674
- const buttonHitAreaContextKey = defineLayerScopedKey("astryx-button-hit-area", true);
675
- //#endregion
676
- export { GROUP_PRESS_POINTERS as a, resolveGroupTouch as c, useTouchHitArea as i, buttonHitAreaContextKey as n, createActionGroupTracker as o, GROUP_HIT_AREA as r, pressGroupItemProps as s, buttonGroupContextKey as t };
667
+ export { pressGroupItemProps as a, createActionGroupTracker as i, useTouchHitArea as n, resolveGroupTouch as o, GROUP_PRESS_POINTERS as r, GROUP_HIT_AREA as t };
@@ -1,7 +1,7 @@
1
1
  import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
2
- import { r as matchesFocusVisible } from "./tooltipTriggerRules-Bg4tG8w2.js";
3
- import { n as tooltipPresentInterestKey } from "./useTooltip-D8Tq7-yd.js";
4
- import { t as _sfc_main$1 } from "./Tooltip-CGHpFMnc.js";
2
+ import { i as matchesFocusVisible } from "./tooltipTriggerRules-BY3LAtUl.js";
3
+ import { n as tooltipPresentInterestKey } from "./useTooltip-md1tr6ef.js";
4
+ import { t as _sfc_main$1 } from "./Tooltip-4APVAlN9.js";
5
5
  import { n as useTruncation, t as truncatePlacement } from "./useTruncation-C4pdlaXa.js";
6
6
  import { computed, createBlock, createCommentVNode, defineComponent, openBlock, provide, shallowRef } from "vue";
7
7
  //#region src/Text/TruncationTooltip.vue
@@ -1,4 +1,4 @@
1
- import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
1
+ import { a as isImeKeyEvent } from "./layerDepth-BF74Cctw.js";
2
2
  import { n as isShortcutChord, r as nextTypeaheadBuffer, t as findTypeaheadMatch } from "./typeaheadMatch-Cl-oxKFt.js";
3
3
  import { onScopeDispose, ref } from "vue";
4
4
  //#region src/composables/useTypeahead.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/core",
3
3
  "type": "module",
4
- "version": "0.12.0",
4
+ "version": "0.12.1",
5
5
  "description": "Vue 3 components for the unofficial astryx-vue port of Astryx. Not affiliated with Meta.",
6
6
  "author": "ShenQingchuan",
7
7
  "license": "MIT",
package/styles/dialog.css CHANGED
@@ -49,7 +49,6 @@
49
49
 
50
50
  .astryx-dialog::backdrop {
51
51
  background: var(--astryx-dialog-overlay, rgb(255 255 255 / 50%));
52
- backdrop-filter: blur(2px);
53
52
  }
54
53
 
55
54
  .astryx-dialog--inline {
@@ -33,13 +33,4 @@
33
33
  outline-color: var(--astryx-focus-outline-color, currentcolor);
34
34
  outline-offset: var(--astryx-focus-outline-offset, 3px);
35
35
  }
36
-
37
- /* 触屏下按钮周围一圈看不见的点击带,把点击目标撑到 44px。 */
38
- @media (pointer: coarse) {
39
- .astryx-info-tip::after {
40
- position: absolute;
41
- inset: -12px;
42
- content: '';
43
- }
44
- }
45
36
  }
@@ -6,7 +6,9 @@
6
6
  inset: 0;
7
7
  width: 100vw;
8
8
  max-width: none;
9
+ /* 动态视口:手机浏览器实际露出来的高度。100vh 按收起工具栏算,Safari 底栏会盖住图注。 */
9
10
  height: 100vh;
11
+ height: 100dvh;
10
12
  max-height: none;
11
13
  margin: 0;
12
14
  padding: 0;
@@ -74,6 +76,7 @@
74
76
  display: block;
75
77
  max-width: min(100vw, 100%);
76
78
  max-height: calc(100vh - 7rem);
79
+ max-height: calc(100dvh - 7rem);
77
80
  object-fit: contain;
78
81
  outline: none;
79
82
  }
@@ -109,15 +112,17 @@
109
112
  /*
110
113
  * 图集每一页的照片下面都有一条两行高的图注区域,不管图注长短,照片区域在每页都一样大,
111
114
  * 翻页时照片不会忽大忽小。没有图注的页面也留着这块空间,只是不画底色。
115
+ * 单张照片有图注时用同一条区域和底色;没有图注就没有这条区域。
112
116
  */
113
117
  .astryx-lightbox {
114
118
  --_lightbox-caption-band-padding: var(--astryx-spacing-2, 8px);
115
119
  --_lightbox-caption-band-height: calc(2 * var(--astryx-text-body-size, 1rem) * var(--astryx-text-body-leading, 1.4286));
116
120
  }
117
121
 
118
- .astryx-lightbox[data-gallery] .astryx-lightbox__image,
119
- .astryx-lightbox[data-gallery] .astryx-lightbox__video {
122
+ .astryx-lightbox[data-caption-band] .astryx-lightbox__image,
123
+ .astryx-lightbox[data-caption-band] .astryx-lightbox__video {
120
124
  max-height: calc(100vh - 7rem - var(--_lightbox-caption-band-height) - 2 * var(--_lightbox-caption-band-padding) - env(safe-area-inset-bottom, 0px));
125
+ max-height: calc(100dvh - 7rem - var(--_lightbox-caption-band-height) - 2 * var(--_lightbox-caption-band-padding) - env(safe-area-inset-bottom, 0px));
121
126
  }
122
127
 
123
128
  .astryx-lightbox__caption-band {
@@ -104,6 +104,8 @@
104
104
  flex-direction: column;
105
105
  min-block-size: 0;
106
106
  max-block-size: calc(100vh - 16px);
107
+ /* 动态视口减去上下两道间距,间距在刘海和主屏指示条处随安全区变大。 */
108
+ max-block-size: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
107
109
  overflow: auto;
108
110
  overscroll-behavior: contain;
109
111
  padding: var(--_popover-padding, var(--astryx-spacing-3, 12px));
@@ -43,9 +43,9 @@ declare const __VLS_base: import("vue").DefineComponent<TokenProps, {}, {}, {},
43
43
  onRemove?: ((event: Event) => any) | undefined;
44
44
  }>, {
45
45
  size: TokenSize;
46
+ disabled: boolean;
46
47
  color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
47
48
  labelHidden: boolean;
48
- disabled: boolean;
49
49
  removable: boolean;
50
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
51
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;