@astryx-vue/core 0.2.3 → 0.2.4

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 (303) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -0
  2. package/dist/AlertDialog/index.js +1 -1
  3. package/dist/{AlertDialog-ovx4cBjM.js → AlertDialog-B6UeBCE7.js} +2 -2
  4. package/dist/AppShell/index.d.ts +1 -1
  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/Card/index.d.ts +1 -1
  25. package/dist/Carousel/index.js +1 -1
  26. package/dist/{Carousel-JA7ilqI_.js → Carousel-CIKrcA2r.js} +1 -1
  27. package/dist/Chat/index.d.ts +1 -1
  28. package/dist/Chat/index.js +1 -1
  29. package/dist/{Chat-C7WrCOE4.js → Chat-BFox3u9D.js} +1 -1
  30. package/dist/CheckboxInput/index.d.ts +1 -1
  31. package/dist/CheckboxList/index.d.ts +1 -1
  32. package/dist/CheckboxList/index.js +1 -1
  33. package/dist/{CheckboxList-CnCGnkZk.js → CheckboxList-BlPf7vPe.js} +4 -4
  34. package/dist/Citation/index.js +1 -1
  35. package/dist/{Citation-CtwrU33I.js → Citation-BG-vg9ia.js} +1 -1
  36. package/dist/ClickableCard/index.d.ts +1 -1
  37. package/dist/Code/index.d.ts +3 -3
  38. package/dist/Code/index.js +4 -4
  39. package/dist/{Code-BvefYRpx.js → Code-XnPuGxey.js} +1 -1
  40. package/dist/{CodeBlock-BZGzYeoL.js → CodeBlock-B2pnEOJY.js} +145 -15
  41. package/dist/Collapsible/index.d.ts +1 -1
  42. package/dist/CommandPalette/index.js +1 -1
  43. package/dist/{CommandPalette-BNbM9T9y.js → CommandPalette-DKgHzmJk.js} +10 -10
  44. package/dist/ComplexSelector/index.js +1 -1
  45. package/dist/{ComplexSelector-LtbLlrcj.js → ComplexSelector-Dv44FFhN.js} +1 -1
  46. package/dist/ContextMenu/index.d.ts +2 -2
  47. package/dist/ContextMenu/index.js +2 -2
  48. package/dist/{ContextMenu-DVQl0xL5.js → ContextMenu-BeJO5HYx.js} +4 -369
  49. package/dist/DateInput/index.d.ts +1 -1
  50. package/dist/DateInput/index.js +1 -1
  51. package/dist/{DateInput-zm8sNc0t.js → DateInput-D4XFAEMp.js} +3 -3
  52. package/dist/DateRangeInput/index.d.ts +1 -1
  53. package/dist/DateRangeInput/index.js +1 -1
  54. package/dist/{DateRangeInput-DlVFzrf7.js → DateRangeInput-Cp6AZfew.js} +2 -2
  55. package/dist/DateTimeInput/index.d.ts +1 -1
  56. package/dist/DateTimeInput/index.js +1 -1
  57. package/dist/{DateTimeInput-C7Z-p6Yd.js → DateTimeInput-B6MPPp76.js} +3 -3
  58. package/dist/Dialog/index.d.ts +1 -1
  59. package/dist/Divider/index.d.ts +1 -1
  60. package/dist/DropdownMenu/index.d.ts +2 -2
  61. package/dist/DropdownMenu/index.js +3 -3
  62. package/dist/{DropdownMenu-BoZChdev.js → DropdownMenu--lnUeJEG.js} +3 -3
  63. package/dist/{DropdownMenu-u1psFjis.js → DropdownMenu-6E9jFdFe.js} +4 -4
  64. package/dist/{DropdownMenuRadioItem.vue-uVM0FD2f.d.ts → DropdownMenuRadioItem.vue-CXEURBcq.d.ts} +1 -1
  65. package/dist/EmptyState/index.js +1 -1
  66. package/dist/{EmptyState-CUJdTYKV.js → EmptyState-0RWymQUS.js} +2 -2
  67. package/dist/FileInput/index.d.ts +1 -1
  68. package/dist/FileInput/index.js +1 -1
  69. package/dist/{FileInput-QdlZn7qK.js → FileInput-DuNwdbAo.js} +1 -1
  70. package/dist/Grid/index.d.ts +1 -1
  71. package/dist/Heading/index.d.ts +2 -2
  72. package/dist/Heading/index.js +1 -1
  73. package/dist/Heading-B9C3LZlS.js +94 -0
  74. package/dist/Indicator/index.d.ts +2 -2
  75. package/dist/InputGroup/index.d.ts +1 -1
  76. package/dist/Item-DrYJL1TG.js +590 -0
  77. package/dist/Lightbox/index.js +1 -1
  78. package/dist/{Lightbox-BSzfqZ-u.js → Lightbox-Br3o0SyQ.js} +1 -1
  79. package/dist/Link/index.d.ts +3 -2
  80. package/dist/Link/index.js +1 -1
  81. package/dist/Link-DCZ6922-.js +196 -0
  82. package/dist/List/index.d.ts +3 -3
  83. package/dist/List/index.js +2 -2
  84. package/dist/{ListItem-pGxvn6QJ.js → ListItem-CcRHWuEm.js} +8 -2
  85. package/dist/Markdown/index.d.ts +2 -2
  86. package/dist/Markdown/index.js +2 -2
  87. package/dist/{Markdown-B6tSqenv.js → Markdown-Bz0R3kNj.js} +274 -30
  88. package/dist/MetadataList/index.js +1 -1
  89. package/dist/{MetadataList-aN1tRn6W.js → MetadataList-CFaocx6j.js} +1 -1
  90. package/dist/MobileNav/index.js +1 -1
  91. package/dist/{MobileNavToggle-fqcSafkc.js → MobileNavToggle-Dh3uLivq.js} +1 -1
  92. package/dist/MoreMenu/index.d.ts +1 -1
  93. package/dist/MoreMenu/index.js +1 -1
  94. package/dist/{MoreMenu-B3brqdK_.js → MoreMenu-B95nRSe8.js} +2 -2
  95. package/dist/MultiSelector/index.d.ts +1 -1
  96. package/dist/MultiSelector/index.js +1 -1
  97. package/dist/{MultiSelector-BD5PMgez.js → MultiSelector-DuF5TECE.js} +4 -4
  98. package/dist/{NavDisclosure-DbYLDXK0.js → NavDisclosure-C6sPZ89n.js} +4 -1
  99. package/dist/NavHeadingSurface-Cb3x9iDx.js +287 -0
  100. package/dist/NavItem/index.d.ts +1 -1
  101. package/dist/NavMenu/index.d.ts +2 -2
  102. package/dist/NavMenu/index.js +4 -3
  103. package/dist/NavMenu-ClIgMaxE.js +176 -0
  104. package/dist/{NavMenuItem-DrwIMHKO.js → NavMenuItem-E7S8gBh-.js} +1 -1
  105. package/dist/NumberInput/index.d.ts +1 -1
  106. package/dist/NumberInput/index.js +1 -1
  107. package/dist/{NumberInput-CBeU4lEl.js → NumberInput-B4IL3s_8.js} +1 -1
  108. package/dist/Outline/index.js +1 -1
  109. package/dist/{Outline--HVMSB6i.js → Outline-DBUuchi9.js} +1 -1
  110. package/dist/OverflowList/index.d.ts +1 -1
  111. package/dist/OverflowList/index.js +1 -1
  112. package/dist/{OverflowList-FMh7r-r_.js → OverflowList-aDd_oem0.js} +3 -3
  113. package/dist/Pagination/index.d.ts +1 -1
  114. package/dist/Pagination/index.js +1 -1
  115. package/dist/{Pagination-DlIvESjx.js → Pagination-CNe9F6Fl.js} +181 -45
  116. package/dist/Popover/index.d.ts +1 -1
  117. package/dist/PowerSearch/index.d.ts +1 -1
  118. package/dist/PowerSearch/index.js +1 -1
  119. package/dist/{PowerSearch-CMG7Rb69.js → PowerSearch-C6U8Sq1Y.js} +13 -13
  120. package/dist/ProgressBar/index.d.ts +2 -2
  121. package/dist/ProgressBar/index.js +1 -1
  122. package/dist/{ProgressBar-DO9Chic6.js → ProgressBar-DF6WZNCI.js} +45 -6
  123. package/dist/Radio/index.d.ts +1 -1
  124. package/dist/RadioList/index.d.ts +1 -1
  125. package/dist/Resizable/index.js +1 -1
  126. package/dist/{Resizable-CXpvj1TZ.js → ResizeHandle-DYy0e3v9.js} +1 -1
  127. package/dist/ScrollableArea/index.d.ts +1 -1
  128. package/dist/SegmentedControl/index.d.ts +1 -1
  129. package/dist/SelectableCard/index.d.ts +1 -1
  130. package/dist/Selector/index.d.ts +1 -1
  131. package/dist/Selector/index.js +1 -1
  132. package/dist/{Selector-BpPnuWH3.js → Selector-5N-hq2nF.js} +3 -3
  133. package/dist/SideNav/index.d.ts +2 -2
  134. package/dist/SideNav/index.js +1 -1
  135. package/dist/{SideNav-D4TupqgE.js → SideNav-CT9lfspi.js} +225 -229
  136. package/dist/Stack/index.d.ts +1 -1
  137. package/dist/Stepper/index.d.ts +1 -1
  138. package/dist/Stepper/index.js +1 -1
  139. package/dist/{Stepper-H-6-T5Ps.js → Stepper-BqhVCgC-.js} +1 -1
  140. package/dist/Switch/index.d.ts +1 -1
  141. package/dist/TabList/index.d.ts +1 -1
  142. package/dist/Table/index.js +1 -1
  143. package/dist/{Table-nqA_njNz.js → Table-CsdH8fCB.js} +4 -4
  144. package/dist/Text/index.d.ts +3 -3
  145. package/dist/Text/index.js +1 -1
  146. package/dist/Text-DIzZw6FA.js +86 -0
  147. package/dist/TextArea/index.d.ts +1 -1
  148. package/dist/TextInput/index.d.ts +1 -1
  149. package/dist/Theme/index.d.ts +3 -3
  150. package/dist/Theme/index.js +2 -2
  151. package/dist/Theme-CtaUWo4g.js +1246 -0
  152. package/dist/Thumbnail/index.js +1 -1
  153. package/dist/{Thumbnail-CXb3m_Hv.js → Thumbnail-BnQwX1cQ.js} +2 -2
  154. package/dist/{TimeField-B3cndWb0.js → TimeField-Biiuv0hB.js} +1 -1
  155. package/dist/TimeInput/index.d.ts +1 -1
  156. package/dist/TimeInput/index.js +1 -1
  157. package/dist/{TimeInput-BHQ_LKGm.js → TimeInput-C9gptCOK.js} +1 -1
  158. package/dist/Timer/index.d.ts +1 -1
  159. package/dist/Timer/index.js +1 -1
  160. package/dist/{Timer-B7GV6hqd.js → Timer-kxzQx3tp.js} +1 -1
  161. package/dist/Timestamp/index.d.ts +1 -1
  162. package/dist/Timestamp/index.js +1 -1
  163. package/dist/{Timestamp-Cfuxbb3i.js → Timestamp-D7bd_nF3.js} +2 -2
  164. package/dist/ToggleButton/index.d.ts +1 -1
  165. package/dist/Token/index.d.ts +1 -1
  166. package/dist/Token/index.js +1 -1
  167. package/dist/{Token-CdVLH0_H.js → Token-D2GsI_Ei.js} +1 -1
  168. package/dist/Tokenizer/index.js +1 -1
  169. package/dist/{Tokenizer-DlD-S_8-.js → Tokenizer-rwzamZg4.js} +3 -3
  170. package/dist/Toolbar/index.d.ts +1 -1
  171. package/dist/Tooltip/index.d.ts +1 -1
  172. package/dist/Tooltip/index.js +1 -1
  173. package/dist/{Tooltip-mp0NMh_Y.js → Tooltip-C2fh9anJ.js} +23 -8
  174. package/dist/TopNav/index.d.ts +1 -1
  175. package/dist/TopNav/index.js +1 -1
  176. package/dist/{TopNav-DzV874G7.js → TopNav-arWFLTBM.js} +112 -42
  177. package/dist/TreeList/index.js +1 -1
  178. package/dist/{TreeList-DEwvlZRV.js → TreeList-C9xvMpJZ.js} +1 -1
  179. package/dist/Typeahead/index.d.ts +2 -2
  180. package/dist/Typeahead/index.js +3 -2
  181. package/dist/Typeahead-_V11btpv.js +499 -0
  182. package/dist/{TypeaheadMenu-CGvo0Tud.js → TypeaheadMenu-BEObzonz.js} +46 -10
  183. package/dist/composables/index.d.ts +2 -2
  184. package/dist/composables/index.js +4 -4
  185. package/dist/composables-CWw6t-RJ.js +520 -0
  186. package/dist/{context-DmOLCubj.js → context-CPh7kE-a.js} +58 -10
  187. package/dist/{index-BRfR0lhb.d.ts → index-12QYAbiz.d.ts} +1 -1
  188. package/dist/{index-DMQG6kdM.d.ts → index-6yB8BtEu.d.ts} +2 -2
  189. package/dist/{index-f4NGT-e2.d.ts → index-B4OOtNP8.d.ts} +3 -3
  190. package/dist/index-BBtJt5_A.d.ts +26 -0
  191. package/dist/{index-Ch6BbxCP.d.ts → index-BH9PzQ1F.d.ts} +13 -8
  192. package/dist/{index-MPcg1Pm4.d.ts → index-BKr7yvVv.d.ts} +1 -1
  193. package/dist/{index-D_UEJIU5.d.ts → index-BPwD6aBv.d.ts} +1 -1
  194. package/dist/{index-D1Twv_fL.d.ts → index-BcZI402h.d.ts} +4 -4
  195. package/dist/{index-C8wDPDcP.d.ts → index-Bi49IrAJ.d.ts} +50 -8
  196. package/dist/{index-B1x05arQ.d.ts → index-BlOIC_AM.d.ts} +1 -1
  197. package/dist/{index-C5p2NeCr.d.ts → index-Blm197N_.d.ts} +11 -2
  198. package/dist/{index-Bu3oXIIS.d.ts → index-BmmdzwT9.d.ts} +6 -0
  199. package/dist/{index-BMn9ghAX.d.ts → index-Bu0Zd1uw.d.ts} +3 -3
  200. package/dist/{index-Ctu32CLv.d.ts → index-BxhJqiZ7.d.ts} +2 -2
  201. package/dist/{index-CA6RbRWx.d.ts → index-By2mSzUA.d.ts} +1 -1
  202. package/dist/{index-HV6W3xCx.d.ts → index-Byar3h1e.d.ts} +1 -1
  203. package/dist/{index-LIyvJTW3.d.ts → index-C3GaPqvJ.d.ts} +84 -8
  204. package/dist/{index-DAiGhkNZ.d.ts → index-CFIXnk5D.d.ts} +1 -1
  205. package/dist/{index-ViSV0RBx.d.ts → index-CI9kyg74.d.ts} +12 -2
  206. package/dist/{index-C-QpeUlQ.d.ts → index-CNjbOgty.d.ts} +2 -2
  207. package/dist/{index-BB5yVIN-.d.ts → index-CUCcYKxl.d.ts} +3 -3
  208. package/dist/{index-Ca8VIE4l.d.ts → index-CVn0GBdB.d.ts} +1 -1
  209. package/dist/{index-xfkEuGLY.d.ts → index-CZeoAr0a.d.ts} +2 -2
  210. package/dist/{index-C2sfHfBw.d.ts → index-D-ezcKaY.d.ts} +3 -3
  211. package/dist/{index-BcJBLWJ0.d.ts → index-DA52oIdw.d.ts} +2 -2
  212. package/dist/{index-D7-WTV6I.d.ts → index-D_nYxnNv.d.ts} +1 -1
  213. package/dist/{index-Cm_TiLXU.d.ts → index-Dgg0bHVM.d.ts} +7 -3
  214. package/dist/index-DxR1FChm.d.ts +158 -0
  215. package/dist/{index-BTAgQRP0.d.ts → index-EtZgovdH.d.ts} +169 -81
  216. package/dist/{index-B9f1rUEv.d.ts → index-XuAAcYiP.d.ts} +1 -1
  217. package/dist/{index-D0TlUOtG.d.ts → index-YmSe1ujk.d.ts} +76 -3
  218. package/dist/{index-BMrggCw-.d.ts → index-bvr3WHvs.d.ts} +1 -1
  219. package/dist/{index-CDDMDHJM.d.ts → index-c67ca7eJ.d.ts} +1 -1
  220. package/dist/{index-D8o50qOE.d.ts → index-cL3q7O4R.d.ts} +32 -3
  221. package/dist/{index-CGZ2xi3r.d.ts → index-eshFLli0.d.ts} +40 -3
  222. package/dist/{index-DkVEBdWa.d.ts → index-fa72tWIU.d.ts} +2 -2
  223. package/dist/{index-COxy6LEW.d.ts → index-gW0HW02U.d.ts} +1 -1
  224. package/dist/{index-foQMNKZO.d.ts → index-hCpxKePE.d.ts} +49 -3
  225. package/dist/{index-DxsKyAxq.d.ts → index-vizlhXVs.d.ts} +131 -2
  226. package/dist/{index-DfgHJE7H.d.ts → index-z3uLM1O6.d.ts} +153 -24
  227. package/dist/index.d.ts +81 -80
  228. package/dist/index.js +118 -115
  229. package/dist/locale/index.d.ts +2 -2
  230. package/dist/locale/index.js +3 -3
  231. package/dist/locale-sLw5Caia.js +917 -0
  232. package/dist/{searchResultMessage-DN0HeRRB.js → searchResultMessage-CCnq-_ce.js} +1 -1
  233. package/dist/syntaxTheme-CwVEcVDk.d.ts +57 -0
  234. package/dist/{syntaxTheme-ClpWALZX.js → syntaxTheme-R7xnu5x5.js} +24 -3
  235. package/dist/{types-Bt-lSgYX.d.ts → types-D9nP_X-c.d.ts} +14 -1
  236. package/dist/{types-CAZY4Xua.d.ts → types-DGYHIu4I.d.ts} +30 -1
  237. package/dist/types-D_J66aPN.d.ts +85 -0
  238. package/dist/types-gKsEkk2g.d.ts +320 -0
  239. package/dist/{useMenuDrillIn-OaEwjK44.js → useMenuDrillIn-BgjJcY3K.js} +1 -1
  240. package/dist/useMenuPress-DUmEy4TB.js +425 -0
  241. package/dist/{composables-DDI08XFF.js → useResizable-B3ahKLoZ.js} +73 -248
  242. package/dist/useTruncation-B5qXQzAP.js +53 -0
  243. package/locales/SOURCE.json +37 -0
  244. package/locales/af-ZA.json +1482 -0
  245. package/locales/ar-SA.json +1482 -0
  246. package/locales/ca-ES.json +1482 -0
  247. package/locales/cs-CZ.json +1482 -0
  248. package/locales/da-DK.json +1482 -0
  249. package/locales/de-DE.json +1482 -0
  250. package/locales/el-GR.json +1482 -0
  251. package/locales/en.json +1646 -0
  252. package/locales/es-ES.json +1482 -0
  253. package/locales/fi-FI.json +1482 -0
  254. package/locales/fr-FR.json +1482 -0
  255. package/locales/he-IL.json +1482 -0
  256. package/locales/hu-HU.json +1482 -0
  257. package/locales/it-IT.json +1482 -0
  258. package/locales/ja-JP.json +1482 -0
  259. package/locales/ko-KR.json +1482 -0
  260. package/locales/nl-NL.json +1482 -0
  261. package/locales/no-NO.json +1482 -0
  262. package/locales/pl-PL.json +1482 -0
  263. package/locales/pt-BR.json +1482 -0
  264. package/locales/pt-PT.json +1482 -0
  265. package/locales/ro-RO.json +1482 -0
  266. package/locales/ru-RU.json +1482 -0
  267. package/locales/sr-SP.json +1482 -0
  268. package/locales/sv-SE.json +1482 -0
  269. package/locales/tr-TR.json +1482 -0
  270. package/locales/uk-UA.json +1482 -0
  271. package/locales/vi-VN.json +1482 -0
  272. package/locales/zh-CN.json +1482 -0
  273. package/locales/zh-TW.json +1482 -0
  274. package/package.json +3 -1
  275. package/styles/bottom-sheet.css +27 -0
  276. package/styles/code.css +62 -0
  277. package/styles/container-reveal.css +104 -0
  278. package/styles/heading.css +47 -0
  279. package/styles/keyboard-hint.css +28 -0
  280. package/styles/link.css +34 -0
  281. package/styles/list.css +88 -1
  282. package/styles/markdown.css +12 -0
  283. package/styles/pagination.css +30 -0
  284. package/styles/progress-bar.css +49 -0
  285. package/styles/side-nav.css +36 -1
  286. package/styles/text.css +18 -0
  287. package/styles/top-nav.css +145 -6
  288. package/styles/typeahead.css +24 -0
  289. package/styles.css +2 -0
  290. package/dist/Heading-Dugosn6j.js +0 -43
  291. package/dist/Item-C1z6gXn8.js +0 -289
  292. package/dist/Link-DqdQZ37C.js +0 -141
  293. package/dist/Text-BHVghsWo.js +0 -53
  294. package/dist/Theme-CejS9MHm.js +0 -447
  295. package/dist/Typeahead-DQ3tmqYe.js +0 -375
  296. package/dist/index-Bqb_Fyju.d.ts +0 -80
  297. package/dist/index-Dg3ZmwEg.d.ts +0 -75
  298. package/dist/locale-CCwVnyMZ.js +0 -42
  299. package/dist/syntaxTheme-Bcs1YMF7.d.ts +0 -38
  300. package/dist/types-jmqqnkKA.d.ts +0 -163
  301. package/dist/useHotkeys-dABSK1o9.js +0 -80
  302. package/dist/useLongPress-Cyxwa73s.js +0 -60
  303. package/dist/{index-BXkNZF3q.d.ts → index-IdK2g5B4.d.ts} +2 -2
@@ -1,375 +0,0 @@
1
- import { a as useAstryxMessages } from "./context-DmOLCubj.js";
2
- import { t as _sfc_main$1 } from "./Spinner-9cYUCnDy.js";
3
- import { t as _sfc_main$2 } from "./Field-8zRxzDHE.js";
4
- import { t as _sfc_main$3 } from "./Token-CdVLH0_H.js";
5
- import { n as useAnchoredListbox, t as scrollOptionIntoView } from "./useAnchoredListbox-BN9LQnon.js";
6
- import { n as useTypeaheadMenu, t as _sfc_main$4 } from "./TypeaheadMenu-CGvo0Tud.js";
7
- import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref, useId, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
8
- import "../styles/visually-hidden-utility.css";
9
- import "../styles/typeahead.css";
10
- //#region src/Typeahead/Typeahead.vue
11
- const _hoisted_1 = {
12
- key: 0,
13
- class: "astryx-typeahead-icon",
14
- "aria-hidden": "true"
15
- };
16
- const _hoisted_2 = [
17
- "placeholder",
18
- "value",
19
- "disabled",
20
- "readonly",
21
- "aria-disabled",
22
- "aria-expanded",
23
- "aria-activedescendant",
24
- "aria-describedby",
25
- "aria-required",
26
- "title"
27
- ];
28
- const _hoisted_3 = ["aria-label"];
29
- const _hoisted_4 = ["name", "value"];
30
- const _hoisted_5 = ["aria-label", "data-placement"];
31
- const _sfc_main = /*@__PURE__*/ defineComponent({
32
- name: "AstryxTypeahead",
33
- inheritAttrs: false,
34
- __name: "Typeahead",
35
- props: {
36
- modelValue: { default: null },
37
- searchSource: {},
38
- label: {},
39
- labelHidden: {
40
- type: Boolean,
41
- default: false
42
- },
43
- description: {},
44
- placeholder: {},
45
- disabled: {
46
- type: Boolean,
47
- default: false
48
- },
49
- disabledReason: {},
50
- status: { default: "default" },
51
- statusMessage: {},
52
- size: { default: "md" },
53
- clearable: {
54
- type: Boolean,
55
- default: true
56
- },
57
- debounceMs: { default: 150 },
58
- maxMenuItems: { default: 10 },
59
- showOnFocus: {
60
- type: Boolean,
61
- default: false
62
- },
63
- emptyText: {},
64
- required: {
65
- type: Boolean,
66
- default: false
67
- },
68
- optional: {
69
- type: Boolean,
70
- default: false
71
- },
72
- name: {},
73
- width: {}
74
- },
75
- emits: [
76
- "update:modelValue",
77
- "change",
78
- "search",
79
- "openChange"
80
- ],
81
- setup(__props, { expose: __expose, emit: __emit }) {
82
- const props = __props;
83
- const emit = __emit;
84
- const messages = useAstryxMessages();
85
- const inputId = `astryx-typeahead-${useId()}`;
86
- const listboxId = `${inputId}-listbox`;
87
- const disabledId = `${inputId}-disabled`;
88
- const editing = ref(false);
89
- let suppressFocusOpen = false;
90
- const inputRef = useTemplateRef("inputRef");
91
- const anchorRef = useTemplateRef("anchorRef");
92
- const listboxRef = useTemplateRef("listboxRef");
93
- const placeholder = computed(() => props.placeholder ?? messages.value.typeahead.placeholder);
94
- const emptyText = computed(() => props.emptyText ?? messages.value.typeahead.empty);
95
- const clearLabel = computed(() => messages.value.typeahead.clear);
96
- const focusableDisabled = computed(() => props.disabled && Boolean(props.disabledReason?.trim()));
97
- const fieldStatus = computed(() => {
98
- if (!props.statusMessage || props.status === "default") return void 0;
99
- return {
100
- type: props.status,
101
- message: props.statusMessage
102
- };
103
- });
104
- const menu = useTypeaheadMenu({
105
- source: () => props.searchSource,
106
- debounceMs: () => props.debounceMs,
107
- showOnFocus: () => props.showOnFocus,
108
- maxItems: () => props.maxMenuItems,
109
- disabled: () => props.disabled,
110
- onSelect: (entry) => {
111
- commit(entry.item);
112
- },
113
- onEscape: () => {
114
- restoreSelection();
115
- },
116
- onQueryChange: (query) => {
117
- emit("search", query);
118
- }
119
- });
120
- const anchored = useAnchoredListbox({
121
- anchor: anchorRef,
122
- layer: listboxRef,
123
- isOpen: menu.combobox.isOpen,
124
- onDismiss: () => {
125
- menu.close();
126
- restoreSelection();
127
- }
128
- });
129
- const selected = computed(() => props.modelValue ?? null);
130
- const showToken = computed(() => selected.value != null && !editing.value);
131
- const describedBy = computed(() => {
132
- return [
133
- props.description ? `${inputId}-description` : void 0,
134
- props.statusMessage ? `${inputId}-status` : void 0,
135
- focusableDisabled.value ? disabledId : void 0
136
- ].filter(Boolean).join(" ") || void 0;
137
- });
138
- watch(() => menu.combobox.isOpen.value, (isOpen) => {
139
- emit("openChange", isOpen);
140
- });
141
- watch(() => menu.combobox.activeIndex.value, (index) => {
142
- if (index < 0 || !menu.combobox.isOpen.value) return;
143
- nextTick(() => {
144
- scrollOptionIntoView(listboxRef.value, menu.entries.value[index]?.id);
145
- });
146
- });
147
- function commit(item) {
148
- editing.value = false;
149
- menu.query.value = "";
150
- menu.close();
151
- emit("update:modelValue", item);
152
- emit("change", item);
153
- suppressFocusOpen = item != null;
154
- nextTick(() => {
155
- inputRef.value?.focus();
156
- suppressFocusOpen = false;
157
- });
158
- }
159
- function restoreSelection() {
160
- if (selected.value == null) return;
161
- editing.value = false;
162
- menu.query.value = "";
163
- }
164
- function startEdit() {
165
- if (props.disabled || selected.value == null || editing.value) return;
166
- editing.value = true;
167
- menu.setQuery(selected.value.label);
168
- nextTick(() => {
169
- inputRef.value?.focus();
170
- inputRef.value?.select();
171
- });
172
- }
173
- function highlight(index) {
174
- const entry = menu.entries.value[index];
175
- if (entry && !entry.disabled) menu.combobox.activeIndex.value = index;
176
- }
177
- function onInput(event) {
178
- if (props.disabled) return;
179
- menu.setQuery(event.target.value);
180
- }
181
- function onFocus() {
182
- if (props.disabled || suppressFocusOpen) return;
183
- if (showToken.value) {
184
- startEdit();
185
- return;
186
- }
187
- if (props.showOnFocus) menu.open();
188
- }
189
- function onBlur(event) {
190
- const next = event.relatedTarget;
191
- if (next instanceof Node && (anchorRef.value?.contains(next) || listboxRef.value?.contains(next))) return;
192
- menu.close();
193
- restoreSelection();
194
- }
195
- function onControlClick(event) {
196
- if (props.disabled) return;
197
- const target = event.target;
198
- if (target instanceof Element && target.closest("button, a")) return;
199
- if (showToken.value) startEdit();
200
- else inputRef.value?.focus();
201
- }
202
- function onClear(event) {
203
- event.stopPropagation();
204
- commit(null);
205
- }
206
- function onMenuSelect(id) {
207
- const entry = menu.entries.value.find((item) => item.id === id);
208
- if (entry && !entry.disabled) commit(entry.item);
209
- }
210
- function optionSelected(id) {
211
- return selected.value?.id === id;
212
- }
213
- __expose({
214
- focus: () => inputRef.value?.focus(),
215
- blur: () => inputRef.value?.blur()
216
- });
217
- return (_ctx, _cache) => {
218
- return openBlock(), createElementBlock(Fragment, null, [createVNode(_sfc_main$2, {
219
- class: normalizeClass(["astryx-typeahead", [`size-${props.size}`]]),
220
- label: props.label,
221
- "input-id": inputId,
222
- description: props.description,
223
- "is-label-hidden": props.labelHidden,
224
- "is-disabled": props.disabled,
225
- "is-required": props.required,
226
- "is-optional": props.optional,
227
- status: fieldStatus.value,
228
- width: props.width
229
- }, {
230
- default: withCtx(() => [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/no-static-element-interactions -- 点空白处只是把焦点交给组合框;键盘用户直接 Tab 到输入框。 "), createElementVNode("div", {
231
- ref_key: "anchorRef",
232
- ref: anchorRef,
233
- class: normalizeClass(["astryx-typeahead-control", [`status-${props.status}`, {
234
- "is-open": unref(menu).combobox.isOpen.value,
235
- "is-disabled": props.disabled
236
- }]]),
237
- onClick: onControlClick
238
- }, [
239
- _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("v-if", true),
240
- showToken.value && selected.value ? (openBlock(), createBlock(_sfc_main$3, {
241
- key: 1,
242
- class: "astryx-typeahead-value",
243
- label: selected.value.label,
244
- size: props.size,
245
- disabled: props.disabled,
246
- onClick: startEdit
247
- }, null, 8, [
248
- "label",
249
- "size",
250
- "disabled"
251
- ])) : createCommentVNode("v-if", true),
252
- createElementVNode("input", {
253
- id: inputId,
254
- ref_key: "inputRef",
255
- ref: inputRef,
256
- class: normalizeClass(["astryx-typeahead-input", { "is-hidden": showToken.value }]),
257
- type: "text",
258
- role: "combobox",
259
- autocomplete: "off",
260
- autocapitalize: "off",
261
- placeholder: showToken.value ? void 0 : placeholder.value,
262
- value: showToken.value ? "" : unref(menu).query.value,
263
- disabled: props.disabled && !focusableDisabled.value,
264
- readonly: focusableDisabled.value || void 0,
265
- "aria-disabled": focusableDisabled.value ? "true" : void 0,
266
- "aria-expanded": unref(menu).combobox.isOpen.value,
267
- "aria-controls": listboxId,
268
- "aria-autocomplete": "list",
269
- "aria-activedescendant": unref(menu).activeId.value ? `${listboxId}-option-${unref(menu).combobox.activeIndex.value}` : void 0,
270
- "aria-describedby": describedBy.value,
271
- "aria-required": props.required || void 0,
272
- title: props.disabledReason,
273
- onInput,
274
- onFocus,
275
- onBlur,
276
- onKeydown: _cache[0] || (_cache[0] = (...args) => unref(menu).onKeyDown && unref(menu).onKeyDown(...args))
277
- }, null, 42, _hoisted_2),
278
- unref(menu).status.value === "loading" ? (openBlock(), createBlock(_sfc_main$1, {
279
- key: 2,
280
- class: "astryx-typeahead-spinner",
281
- size: "sm",
282
- "aria-label": unref(messages).typeahead.loading
283
- }, null, 8, ["aria-label"])) : createCommentVNode("v-if", true),
284
- props.clearable && selected.value && !props.disabled ? (openBlock(), createElementBlock("button", {
285
- key: 3,
286
- type: "button",
287
- class: "astryx-typeahead-clear",
288
- "aria-label": clearLabel.value,
289
- onClick: onClear
290
- }, [..._cache[1] || (_cache[1] = [createElementVNode("svg", {
291
- width: "16",
292
- height: "16",
293
- viewBox: "0 0 16 16",
294
- fill: "none",
295
- "aria-hidden": "true"
296
- }, [createElementVNode("path", {
297
- d: "M12 4L4 12M4 4L12 12",
298
- stroke: "currentColor",
299
- "stroke-width": "1.5",
300
- "stroke-linecap": "round"
301
- })], -1)])], 8, _hoisted_3)) : createCommentVNode("v-if", true),
302
- focusableDisabled.value ? (openBlock(), createElementBlock("span", {
303
- key: 4,
304
- id: disabledId,
305
- class: "astryx-visually-hidden"
306
- }, toDisplayString(props.disabledReason), 1)) : createCommentVNode("v-if", true),
307
- props.name ? (openBlock(), createElementBlock("input", {
308
- key: 5,
309
- type: "hidden",
310
- name: props.name,
311
- value: selected.value?.id ?? ""
312
- }, null, 8, _hoisted_4)) : createCommentVNode("v-if", true)
313
- ], 2)]),
314
- _: 3
315
- }, 8, [
316
- "class",
317
- "label",
318
- "description",
319
- "is-label-hidden",
320
- "is-disabled",
321
- "is-required",
322
- "is-optional",
323
- "status",
324
- "width"
325
- ]), (openBlock(), createBlock(Teleport, { to: "body" }, [withDirectives(createElementVNode("div", {
326
- id: listboxId,
327
- ref_key: "listboxRef",
328
- ref: listboxRef,
329
- class: "astryx-typeahead-listbox",
330
- role: "listbox",
331
- "aria-label": unref(messages).typeahead.results,
332
- "data-placement": unref(anchored).position.value.placement,
333
- style: normalizeStyle(unref(anchored).style.value),
334
- tabindex: "-1"
335
- }, [createVNode(_sfc_main$4, {
336
- entries: unref(menu).entries.value.map((entry) => ({
337
- id: entry.id,
338
- label: entry.label,
339
- description: entry.description,
340
- disabled: entry.disabled,
341
- selected: optionSelected(entry.item.id)
342
- })),
343
- "active-index": unref(menu).combobox.activeIndex.value,
344
- status: unref(menu).status.value,
345
- "listbox-id": listboxId,
346
- "empty-text": emptyText.value,
347
- "loading-text": unref(messages).typeahead.loading,
348
- "error-text": unref(messages).typeahead.error,
349
- onSelect: onMenuSelect,
350
- onHighlight: highlight
351
- }, createSlots({ _: 2 }, [_ctx.$slots.item ? {
352
- name: "item",
353
- fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "item", {
354
- item: unref(menu).entries.value.find((entry) => entry.id === slotProps.entry.id).item,
355
- isActive: slotProps.isActive,
356
- isSelected: slotProps.isSelected
357
- })]),
358
- key: "0"
359
- } : void 0, _ctx.$slots.empty ? {
360
- name: "empty",
361
- fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
362
- key: "1"
363
- } : void 0]), 1032, [
364
- "entries",
365
- "active-index",
366
- "status",
367
- "empty-text",
368
- "loading-text",
369
- "error-text"
370
- ])], 12, _hoisted_5), [[vShow, unref(menu).combobox.isOpen.value]])]))], 64);
371
- };
372
- }
373
- });
374
- //#endregion
375
- export { _sfc_main as t };
@@ -1,80 +0,0 @@
1
- import { a as SearchableItem, i as SearchSource } from "./useAsyncSource-xpQovjV_.js";
2
- //#region src/Typeahead/types.d.ts
3
- type TypeaheadSize = 'sm' | 'md' | 'lg';
4
- type TypeaheadStatus = 'default' | 'success' | 'warning' | 'error';
5
- interface TypeaheadProps<T extends SearchableItem = SearchableItem> {
6
- /** 当前选中的条目。空表示还没选。 */
7
- modelValue?: T | null;
8
- /** 静态或异步搜索源。 */
9
- searchSource: SearchSource<T>;
10
- /** 字段标签。屏幕阅读器始终读得到。 */
11
- label: string;
12
- /** 视觉上隐藏标签。 */
13
- labelHidden?: boolean;
14
- /** 标签下方的说明。 */
15
- description?: string;
16
- placeholder?: string;
17
- disabled?: boolean;
18
- /** 禁用原因。有值时控件仍可聚焦,方便读到原因。 */
19
- disabledReason?: string;
20
- status?: TypeaheadStatus;
21
- statusMessage?: string;
22
- size?: TypeaheadSize;
23
- /** 显示清除按钮。 */
24
- clearable?: boolean;
25
- /** 输入停顿后再搜索,单位毫秒。本地数据可设为 0。 */
26
- debounceMs?: number;
27
- /** 下拉最多显示多少条。 */
28
- maxMenuItems?: number;
29
- /** 聚焦时还没输入就展示结果。 */
30
- showOnFocus?: boolean;
31
- emptyText?: string;
32
- required?: boolean;
33
- optional?: boolean;
34
- /** 表单字段名。选中后提交条目的 id。 */
35
- name?: string;
36
- width?: number | string;
37
- }
38
- interface TypeaheadEmits<T extends SearchableItem = SearchableItem> {
39
- 'update:modelValue': [value: T | null];
40
- 'change': [value: T | null];
41
- 'search': [query: string];
42
- 'openChange': [isOpen: boolean];
43
- }
44
- interface TypeaheadSlots<T extends SearchableItem = SearchableItem> {
45
- /** 输入框开头的图标。 */
46
- icon?: () => unknown;
47
- /** 自定义下拉条目。 */
48
- item?: (props: {
49
- item: T;
50
- isActive: boolean;
51
- isSelected: boolean;
52
- }) => unknown;
53
- /** 自定义空状态。 */
54
- empty?: () => unknown;
55
- }
56
- //#endregion
57
- //#region src/Typeahead/Typeahead.vue.d.ts
58
- declare const __VLS_export: <T extends SearchableItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
59
- props: import("vue").PublicProps & __VLS_PrettifyLocal<TypeaheadProps<T> & {
60
- onChange?: ((value: T | null) => any) | undefined;
61
- onSearch?: ((query: string) => any) | undefined;
62
- "onUpdate:modelValue"?: ((value: T | null) => any) | undefined;
63
- onOpenChange?: ((isOpen: boolean) => any) | undefined;
64
- }> & (typeof globalThis extends {
65
- __VLS_PROPS_FALLBACK: infer P;
66
- } ? P : {});
67
- expose: (exposed: import("vue").ShallowUnwrapRef<{
68
- focus: () => void | undefined;
69
- blur: () => void | undefined;
70
- }>) => void;
71
- attrs: any;
72
- slots: TypeaheadSlots<T>;
73
- emit: ((evt: "change", value: T | null) => void) & ((evt: "search", query: string) => void) & ((evt: "update:modelValue", value: T | null) => void) & ((evt: "openChange", isOpen: boolean) => void);
74
- }>) => import("vue").VNode & {
75
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
76
- };
77
- declare const _default: typeof __VLS_export;
78
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
79
- //#endregion
80
- export { TypeaheadSlots as a, TypeaheadSize as i, TypeaheadEmits as n, TypeaheadStatus as o, TypeaheadProps as r, _default as t };
@@ -1,75 +0,0 @@
1
- //#region src/Link/types.d.ts
2
- type LinkColor = 'primary' | 'secondary' | 'accent' | 'inherit';
3
- interface LinkProps {
4
- /**
5
- * Link destination URL.
6
- */
7
- href?: string;
8
- /**
9
- * Whether the link opens in a new tab and shows an external indicator.
10
- * @default false
11
- */
12
- isExternalLink?: boolean;
13
- /**
14
- * Whether the link always shows an underline.
15
- * @default false
16
- */
17
- hasUnderline?: boolean;
18
- /**
19
- * Text color.
20
- * @default 'accent'
21
- */
22
- color?: LinkColor;
23
- /**
24
- * Whether the link is disabled.
25
- * @default false
26
- */
27
- isDisabled?: boolean;
28
- /**
29
- * HTML target attribute.
30
- */
31
- target?: string;
32
- /**
33
- * HTML rel attribute.
34
- */
35
- rel?: string;
36
- /**
37
- * Causes the browser to download the linked URL.
38
- */
39
- download?: string | boolean;
40
- /**
41
- * Tooltip text shown on hover and keyboard focus.
42
- */
43
- tooltip?: string;
44
- /**
45
- * Whether the link stands alone, rather than sitting inside body text.
46
- * Applies body font size and line height.
47
- * @default false
48
- */
49
- isStandalone?: boolean;
50
- }
51
- //#endregion
52
- //#region src/Link/Link.vue.d.ts
53
- type __VLS_Slots = {
54
- default: () => unknown;
55
- };
56
- declare const __VLS_base: import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
57
- click: (event: MouseEvent) => any;
58
- }, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{
59
- onClick?: ((event: MouseEvent) => any) | undefined;
60
- }>, {
61
- isDisabled: boolean;
62
- color: LinkColor;
63
- isExternalLink: boolean;
64
- hasUnderline: boolean;
65
- isStandalone: boolean;
66
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
67
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
68
- declare const _default: typeof __VLS_export;
69
- type __VLS_WithSlots<T, S> = T & {
70
- new (): {
71
- $slots: S;
72
- };
73
- };
74
- //#endregion
75
- export { LinkColor as n, LinkProps as r, _default as t };
@@ -1,42 +0,0 @@
1
- //#region src/locale/format.ts
2
- const weekdayStart = new Date(2023, 0, 1);
3
- /** CLDR stand-alone short names. Intl `short` is Sun/Mon, which is not the calendar header. */
4
- const standaloneShortWeekdays = {
5
- "en": [
6
- "Su",
7
- "Mo",
8
- "Tu",
9
- "We",
10
- "Th",
11
- "Fr",
12
- "Sa"
13
- ],
14
- "zh-CN": [
15
- "周日",
16
- "周一",
17
- "周二",
18
- "周三",
19
- "周四",
20
- "周五",
21
- "周六"
22
- ]
23
- };
24
- function standaloneShortWeekdayNames(locale) {
25
- return standaloneShortWeekdays[locale];
26
- }
27
- function formatCalendarMonth(year, month, locale) {
28
- return new Intl.DateTimeFormat(locale, {
29
- month: "long",
30
- year: "numeric"
31
- }).format(new Date(year, month - 1, 1));
32
- }
33
- function weekdayNames(locale, style) {
34
- const formatter = new Intl.DateTimeFormat(locale, { weekday: style });
35
- return Array.from({ length: 7 }, (_, index) => {
36
- const date = new Date(weekdayStart);
37
- date.setDate(weekdayStart.getDate() + index);
38
- return formatter.format(date);
39
- });
40
- }
41
- //#endregion
42
- export { standaloneShortWeekdayNames as n, weekdayNames as r, formatCalendarMonth as t };
@@ -1,38 +0,0 @@
1
- //#region src/Code/syntaxTheme.d.ts
2
- declare const SYNTAX_TOKEN_KEYS: readonly ["keyword", "string", "comment", "number", "function", "type", "variable", "operator", "constant", "tag", "attribute", "property", "punctuation", "background"];
3
- type SyntaxTokenKey = (typeof SYNTAX_TOKEN_KEYS)[number];
4
- interface SyntaxThemeTokens {
5
- keyword: string;
6
- string: string;
7
- comment: string;
8
- number: string;
9
- function: string;
10
- type: string;
11
- variable: string;
12
- operator: string;
13
- constant: string;
14
- tag: string;
15
- attribute: string;
16
- property: string;
17
- punctuation: string;
18
- background: string;
19
- }
20
- /** A string is used as written. A tuple is the light stop, then the dark stop. */
21
- type SyntaxTokenValue = string | readonly [string, string];
22
- interface SyntaxThemeDefinition {
23
- name: string;
24
- tokens: SyntaxThemeTokens;
25
- }
26
- interface SyntaxThemeInput {
27
- name: string;
28
- tokens: { [K in keyof SyntaxThemeTokens]: SyntaxTokenValue; };
29
- }
30
- /**
31
- * Create a syntax theme. All 14 tokens are required.
32
- * `[light, dark]` tuples are stored as `light-dark()`.
33
- */
34
- declare function defineSyntaxTheme(theme: SyntaxThemeInput): SyntaxThemeDefinition;
35
- /** GitHub Dark (GitHub Primer team), MIT. */
36
- declare const githubDark: SyntaxThemeDefinition;
37
- //#endregion
38
- export { SyntaxTokenKey as a, githubDark as c, SyntaxThemeTokens as i, SyntaxThemeDefinition as n, SyntaxTokenValue as o, SyntaxThemeInput as r, defineSyntaxTheme as s, SYNTAX_TOKEN_KEYS as t };