@astryx-vue/core 0.2.2 → 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 (347) hide show
  1. package/THIRD_PARTY_NOTICES.md +4 -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.js +1 -1
  5. package/dist/{AppShell-Cb41gIAj.js → AppShell-CeBmB0Q9.js} +2 -2
  6. package/dist/Avatar/index.d.ts +1 -1
  7. package/dist/Avatar/index.js +1 -1
  8. package/dist/{Avatar-jmHInHwj.js → Avatar-BB4Z4LF1.js} +10 -4
  9. package/dist/AvatarGroup/index.d.ts +1 -1
  10. package/dist/Banner/index.d.ts +1 -1
  11. package/dist/BottomSheet/index.d.ts +2 -2
  12. package/dist/BottomSheet/index.js +3 -2
  13. package/dist/{BottomSheet-Dg95HB1s.js → BottomSheet-BV6vfgGu.js} +82 -22
  14. package/dist/BottomSheet-o7xw-TOi.js +153 -0
  15. package/dist/Breadcrumbs/index.d.ts +3 -2
  16. package/dist/Breadcrumbs/index.js +3 -2
  17. package/dist/{Breadcrumbs-CTQ7fjDn.js → Breadcrumbs-D6G7f5WL.js} +13 -8
  18. package/dist/Button/index.d.ts +1 -1
  19. package/dist/ButtonGroup/index.d.ts +1 -1
  20. package/dist/Calendar/index.d.ts +2 -2
  21. package/dist/Calendar/index.js +1 -1
  22. package/dist/Calendar-DmTeM7PO.js +656 -0
  23. package/dist/Carousel/index.js +1 -1
  24. package/dist/{Carousel-X0cuQkvg.js → Carousel-CIKrcA2r.js} +2 -2
  25. package/dist/Chat/index.d.ts +1 -1
  26. package/dist/Chat/index.js +1 -1
  27. package/dist/{Chat-M0tiGrNT.js → Chat-BFox3u9D.js} +3 -3
  28. package/dist/CheckboxIndicator/index.js +1 -1
  29. package/dist/CheckboxIndicator-D37cm2Rh.js +68 -0
  30. package/dist/CheckboxInput/index.d.ts +1 -1
  31. package/dist/CheckboxInput/index.js +1 -1
  32. package/dist/{CheckboxInput-CMsEE1_4.js → CheckboxInput-25Q8ItH-.js} +10 -9
  33. package/dist/CheckboxList/index.d.ts +1 -1
  34. package/dist/CheckboxList/index.js +1 -1
  35. package/dist/{CheckboxList-BbCPiend.js → CheckboxList-BlPf7vPe.js} +78 -25
  36. package/dist/Citation/index.js +1 -1
  37. package/dist/{Citation-C1veUk5p.js → Citation-BG-vg9ia.js} +2 -2
  38. package/dist/ClickableCard/index.d.ts +1 -1
  39. package/dist/Code/index.d.ts +3 -3
  40. package/dist/Code/index.js +4 -4
  41. package/dist/{Code-yb_KOFtJ.js → Code-XnPuGxey.js} +3 -2
  42. package/dist/{CodeBlock-DesTJAkm.js → CodeBlock-B2pnEOJY.js} +146 -16
  43. package/dist/Collapsible/index.js +1 -1
  44. package/dist/{Collapsible-BestK35V.js → Collapsible-3YerR-FO.js} +1 -1
  45. package/dist/CommandPalette/index.js +1 -1
  46. package/dist/{CommandPalette-BArt97V8.js → CommandPalette-DKgHzmJk.js} +10 -10
  47. package/dist/ComplexSelector/index.d.ts +1 -1
  48. package/dist/ComplexSelector/index.js +1 -1
  49. package/dist/{ComplexSelector-CAoig1RK.js → ComplexSelector-Dv44FFhN.js} +3 -3
  50. package/dist/ContextMenu/index.d.ts +3 -2
  51. package/dist/ContextMenu/index.js +3 -2
  52. package/dist/{ContextMenu-9Im6i43E.js → ContextMenu-BeJO5HYx.js} +206 -423
  53. package/dist/DateInput/index.d.ts +2 -2
  54. package/dist/DateInput/index.js +1 -1
  55. package/dist/DateInput-D4XFAEMp.js +743 -0
  56. package/dist/DateRangeInput/index.d.ts +1 -1
  57. package/dist/DateRangeInput/index.js +1 -1
  58. package/dist/{DateRangeInput-DwDy3eRo.js → DateRangeInput-Cp6AZfew.js} +54 -19
  59. package/dist/DateTimeInput/index.d.ts +1 -1
  60. package/dist/DateTimeInput/index.js +1 -1
  61. package/dist/{DateTimeInput-BYiaC9bn.js → DateTimeInput-B6MPPp76.js} +54 -15
  62. package/dist/Divider/index.d.ts +1 -1
  63. package/dist/DropdownMenu/index.d.ts +3 -3
  64. package/dist/DropdownMenu/index.js +4 -3
  65. package/dist/{DropdownMenu-Dh-WAHKb.js → DropdownMenu--lnUeJEG.js} +309 -64
  66. package/dist/DropdownMenu-6E9jFdFe.js +325 -0
  67. package/dist/DropdownMenuRadioItem.vue-CXEURBcq.d.ts +564 -0
  68. package/dist/EmptyState/index.js +1 -1
  69. package/dist/{EmptyState-CUJdTYKV.js → EmptyState-0RWymQUS.js} +2 -2
  70. package/dist/FileInput/index.d.ts +1 -1
  71. package/dist/FileInput/index.js +1 -1
  72. package/dist/{FileInput-DLO6V12n.js → FileInput-DuNwdbAo.js} +2 -2
  73. package/dist/Grid/index.d.ts +1 -1
  74. package/dist/Heading/index.d.ts +2 -2
  75. package/dist/Heading/index.js +1 -1
  76. package/dist/Heading-B9C3LZlS.js +94 -0
  77. package/dist/Icon/index.d.ts +4 -3
  78. package/dist/Icon/index.js +2 -2
  79. package/dist/{Icon-CJKjdJy-.js → Icon-bteSId7T.js} +113 -18
  80. package/dist/Indicator/index.d.ts +3 -0
  81. package/dist/Indicator/index.js +2 -0
  82. package/dist/InputGroup/index.d.ts +2 -2
  83. package/dist/InputGroup/index.js +3 -2
  84. package/dist/InputGroup-BzR6JRZb.js +129 -0
  85. package/dist/Item-DrYJL1TG.js +590 -0
  86. package/dist/Lightbox/index.js +1 -1
  87. package/dist/{Lightbox-CdFCS_EA.js → Lightbox-Br3o0SyQ.js} +2 -2
  88. package/dist/Link/index.d.ts +3 -2
  89. package/dist/Link/index.js +1 -1
  90. package/dist/Link-DCZ6922-.js +196 -0
  91. package/dist/List/index.d.ts +3 -3
  92. package/dist/List/index.js +2 -2
  93. package/dist/{ListItem-pGxvn6QJ.js → ListItem-CcRHWuEm.js} +8 -2
  94. package/dist/Markdown/index.d.ts +2 -2
  95. package/dist/Markdown/index.js +2 -2
  96. package/dist/{Markdown-BqKloI3w.js → Markdown-Bz0R3kNj.js} +280 -33
  97. package/dist/MetadataList/index.js +1 -1
  98. package/dist/{MetadataList-CvZkmisf.js → MetadataList-CFaocx6j.js} +1 -1
  99. package/dist/MobileNav/index.js +1 -1
  100. package/dist/{MobileNavToggle-Bwi0qXXM.js → MobileNavToggle-Dh3uLivq.js} +1 -1
  101. package/dist/MoreMenu/index.d.ts +1 -1
  102. package/dist/MoreMenu/index.js +1 -1
  103. package/dist/{MoreMenu-BwJaJrkB.js → MoreMenu-B95nRSe8.js} +3 -3
  104. package/dist/MultiSelector/index.d.ts +2 -2
  105. package/dist/MultiSelector/index.js +1 -1
  106. package/dist/{MultiSelector-C-ETfFy_.js → MultiSelector-DuF5TECE.js} +304 -122
  107. package/dist/{NavDisclosure-DHrSNRDR.js → NavDisclosure-C6sPZ89n.js} +5 -2
  108. package/dist/NavHeadingSurface-Cb3x9iDx.js +287 -0
  109. package/dist/NavMenu/index.d.ts +2 -2
  110. package/dist/NavMenu/index.js +4 -3
  111. package/dist/NavMenu-ClIgMaxE.js +176 -0
  112. package/dist/{NavMenuItem-B-k7olt5.js → NavMenuItem-E7S8gBh-.js} +1 -1
  113. package/dist/NumberInput/index.d.ts +1 -1
  114. package/dist/NumberInput/index.js +1 -1
  115. package/dist/{NumberInput-DjetVB8O.js → NumberInput-B4IL3s_8.js} +1 -1
  116. package/dist/Outline/index.js +1 -1
  117. package/dist/{Outline-Bz9c-u5y.js → Outline-DBUuchi9.js} +1 -1
  118. package/dist/OverflowList/index.d.ts +1 -1
  119. package/dist/OverflowList/index.js +1 -1
  120. package/dist/{OverflowList-ED-KN9Y5.js → OverflowList-aDd_oem0.js} +3 -3
  121. package/dist/Pagination/index.d.ts +1 -1
  122. package/dist/Pagination/index.js +1 -1
  123. package/dist/{Pagination-Cb66HMEf.js → Pagination-CNe9F6Fl.js} +181 -45
  124. package/dist/Popover/index.js +1 -1
  125. package/dist/{Popover-Crhk9PNP.js → Popover-D7zqpFwU.js} +1 -1
  126. package/dist/PowerSearch/index.d.ts +1 -1
  127. package/dist/PowerSearch/index.js +1 -1
  128. package/dist/{PowerSearch-CjU8y4mi.js → PowerSearch-C6U8Sq1Y.js} +16 -16
  129. package/dist/ProgressBar/index.d.ts +2 -2
  130. package/dist/ProgressBar/index.js +1 -1
  131. package/dist/{ProgressBar-DO9Chic6.js → ProgressBar-DF6WZNCI.js} +45 -6
  132. package/dist/Radio/index.d.ts +1 -1
  133. package/dist/Radio/index.js +1 -1
  134. package/dist/{RadioGroup-BqjdSCfJ.js → RadioGroup-CBqUPq_L.js} +16 -8
  135. package/dist/RadioList/index.d.ts +1 -1
  136. package/dist/RadioList/index.js +1 -1
  137. package/dist/{RadioList-DI8ujXcT.js → RadioList-CPOJn9Th.js} +1 -1
  138. package/dist/Resizable/index.js +1 -1
  139. package/dist/{Resizable-D-TBCg0Y.js → ResizeHandle-DYy0e3v9.js} +1 -1
  140. package/dist/ScrollableArea/index.d.ts +1 -1
  141. package/dist/SelectableCard/index.d.ts +1 -1
  142. package/dist/Selector/index.d.ts +2 -2
  143. package/dist/Selector/index.js +1 -1
  144. package/dist/Selector-5N-hq2nF.js +618 -0
  145. package/dist/SideNav/index.d.ts +2 -2
  146. package/dist/SideNav/index.js +1 -1
  147. package/dist/{SideNav-DonEfiAx.js → SideNav-CT9lfspi.js} +226 -230
  148. package/dist/Stepper/index.js +1 -1
  149. package/dist/{Stepper-D2ZIcUNx.js → Stepper-BqhVCgC-.js} +1 -1
  150. package/dist/Switch/index.d.ts +1 -1
  151. package/dist/TabList/index.js +1 -1
  152. package/dist/{TabList-D3F-stq-.js → TabList-BlzkrObv.js} +2 -2
  153. package/dist/Table/index.js +1 -1
  154. package/dist/{Table-CrP2Uffq.js → Table-CsdH8fCB.js} +7 -7
  155. package/dist/Text/index.d.ts +3 -3
  156. package/dist/Text/index.js +1 -1
  157. package/dist/Text-DIzZw6FA.js +86 -0
  158. package/dist/TextArea/index.d.ts +1 -1
  159. package/dist/TextInput/index.d.ts +1 -1
  160. package/dist/Theme/index.d.ts +3 -2
  161. package/dist/Theme/index.js +2 -2
  162. package/dist/Theme-CtaUWo4g.js +1246 -0
  163. package/dist/Thumbnail/index.js +1 -1
  164. package/dist/{Thumbnail-BC5JGPGZ.js → Thumbnail-BnQwX1cQ.js} +3 -3
  165. package/dist/{TimeField-DpHFrNv0.js → TimeField-Biiuv0hB.js} +2 -2
  166. package/dist/TimeInput/index.d.ts +1 -1
  167. package/dist/TimeInput/index.js +1 -1
  168. package/dist/{TimeInput-DJLV0_4z.js → TimeInput-C9gptCOK.js} +1 -1
  169. package/dist/Timer/index.d.ts +1 -1
  170. package/dist/Timer/index.js +1 -1
  171. package/dist/{Timer-B7GV6hqd.js → Timer-kxzQx3tp.js} +1 -1
  172. package/dist/Timestamp/index.d.ts +1 -1
  173. package/dist/Timestamp/index.js +1 -1
  174. package/dist/{Timestamp-GKNjjt5g.js → Timestamp-D7bd_nF3.js} +3 -3
  175. package/dist/ToggleButton/index.d.ts +1 -1
  176. package/dist/Token/index.d.ts +1 -1
  177. package/dist/Token/index.js +1 -1
  178. package/dist/{Token-Chu_eCVs.js → Token-D2GsI_Ei.js} +2 -2
  179. package/dist/Tokenizer/index.d.ts +1 -1
  180. package/dist/Tokenizer/index.js +1 -1
  181. package/dist/{Tokenizer-DRDpvQ_l.js → Tokenizer-rwzamZg4.js} +4 -4
  182. package/dist/Toolbar/index.d.ts +1 -1
  183. package/dist/Tooltip/index.d.ts +1 -1
  184. package/dist/Tooltip/index.js +1 -1
  185. package/dist/{Tooltip-mp0NMh_Y.js → Tooltip-C2fh9anJ.js} +23 -8
  186. package/dist/TopNav/index.d.ts +1 -1
  187. package/dist/TopNav/index.js +1 -1
  188. package/dist/{TopNav-CEyWddtA.js → TopNav-arWFLTBM.js} +113 -43
  189. package/dist/TreeList/index.js +1 -1
  190. package/dist/{TreeList-COS8US8e.js → TreeList-C9xvMpJZ.js} +2 -2
  191. package/dist/Typeahead/index.d.ts +2 -2
  192. package/dist/Typeahead/index.js +3 -2
  193. package/dist/Typeahead-_V11btpv.js +499 -0
  194. package/dist/{TypeaheadMenu-CGvo0Tud.js → TypeaheadMenu-BEObzonz.js} +46 -10
  195. package/dist/{context-O2Vb8cJl.js → colorMode-CBgdgDSn.js} +1 -7
  196. package/dist/composables/index.d.ts +2 -2
  197. package/dist/composables/index.js +12 -7
  198. package/dist/composables-CWw6t-RJ.js +520 -0
  199. package/dist/{context-CiKncNSH.js → context-CPh7kE-a.js} +140 -18
  200. package/dist/context-Cws_tXTr.js +7 -0
  201. package/dist/context-D5-MwxnN.js +4 -0
  202. package/dist/{index-CJlBAXwj.d.ts → index-12QYAbiz.d.ts} +41 -4
  203. package/dist/{index-Cs5pcwY3.d.ts → index-6yB8BtEu.d.ts} +3 -3
  204. package/dist/{index-C7mxUcDR.d.ts → index-B4OOtNP8.d.ts} +2 -2
  205. package/dist/index-BBtJt5_A.d.ts +26 -0
  206. package/dist/{index-CRizexSC.d.ts → index-BH9PzQ1F.d.ts} +13 -73
  207. package/dist/index-BPwD6aBv.d.ts +83 -0
  208. package/dist/{index-DOUEn7V0.d.ts → index-BcZI402h.d.ts} +64 -5
  209. package/dist/{index-C8wDPDcP.d.ts → index-Bi49IrAJ.d.ts} +50 -8
  210. package/dist/{index-DimuSES0.d.ts → index-BlOIC_AM.d.ts} +3 -1
  211. package/dist/{index-C5p2NeCr.d.ts → index-Blm197N_.d.ts} +11 -2
  212. package/dist/{index-Bu3oXIIS.d.ts → index-BmmdzwT9.d.ts} +6 -0
  213. package/dist/{index-kVhSuA9t.d.ts → index-BxhJqiZ7.d.ts} +6 -6
  214. package/dist/{index-HV6W3xCx.d.ts → index-Byar3h1e.d.ts} +1 -1
  215. package/dist/{index-qiZtHnGK.d.ts → index-C3GaPqvJ.d.ts} +123 -8
  216. package/dist/{index-D4I_obqR.d.ts → index-CFIXnk5D.d.ts} +1 -1
  217. package/dist/{index-cGagYM1g.d.ts → index-CI9kyg74.d.ts} +11 -1
  218. package/dist/{index-D-ZuubCK.d.ts → index-CUCcYKxl.d.ts} +1 -1
  219. package/dist/{index-DWH_HzXi.d.ts → index-ChWlKHjc.d.ts} +1 -1
  220. package/dist/{index-DGXviOlp.d.ts → index-D-ezcKaY.d.ts} +30 -4
  221. package/dist/{index-Cm_TiLXU.d.ts → index-Dgg0bHVM.d.ts} +7 -3
  222. package/dist/index-DxR1FChm.d.ts +158 -0
  223. package/dist/{index-DNRBbwp_.d.ts → index-EtZgovdH.d.ts} +842 -107
  224. package/dist/{index-BHqRH7QW.d.ts → index-FEy8qFSD.d.ts} +2 -2
  225. package/dist/index-XuAAcYiP.d.ts +77 -0
  226. package/dist/{index-D0TlUOtG.d.ts → index-YmSe1ujk.d.ts} +76 -3
  227. package/dist/{index-BMrggCw-.d.ts → index-bvr3WHvs.d.ts} +1 -1
  228. package/dist/{index-CDDMDHJM.d.ts → index-c67ca7eJ.d.ts} +1 -1
  229. package/dist/{index-c_TaW8mM.d.ts → index-cL3q7O4R.d.ts} +31 -2
  230. package/dist/{index-CGZ2xi3r.d.ts → index-eshFLli0.d.ts} +40 -3
  231. package/dist/{index-DsyKhauk.d.ts → index-hCpxKePE.d.ts} +48 -2
  232. package/dist/{index-u5ozu0G7.d.ts → index-vP0EtrJJ.d.ts} +13 -3
  233. package/dist/{index-B1TG2GPS.d.ts → index-vizlhXVs.d.ts} +246 -45
  234. package/dist/{index-DfgHJE7H.d.ts → index-z3uLM1O6.d.ts} +153 -24
  235. package/dist/index.d.ts +82 -80
  236. package/dist/index.js +127 -116
  237. package/dist/locale/index.d.ts +2 -2
  238. package/dist/locale/index.js +3 -3
  239. package/dist/locale-sLw5Caia.js +917 -0
  240. package/dist/searchResultMessage-CCnq-_ce.js +94 -0
  241. package/dist/semantic-CKH9XVqa.d.ts +54 -0
  242. package/dist/syntaxTheme-CwVEcVDk.d.ts +57 -0
  243. package/dist/{syntaxTheme-ClpWALZX.js → syntaxTheme-R7xnu5x5.js} +24 -3
  244. package/dist/{types-pnljWjEE.d.ts → types-CwyibrRB.d.ts} +12 -11
  245. package/dist/{types-Bt-lSgYX.d.ts → types-D9nP_X-c.d.ts} +14 -1
  246. package/dist/{types-CAZY4Xua.d.ts → types-DGYHIu4I.d.ts} +30 -1
  247. package/dist/types-D_J66aPN.d.ts +85 -0
  248. package/dist/types-gKsEkk2g.d.ts +320 -0
  249. package/dist/{useAnchoredListbox-7W90Ny-9.js → useAnchoredListbox-BN9LQnon.js} +1 -1
  250. package/dist/useDatePresentation-C07PnOCw.js +21 -0
  251. package/dist/{useMonthGrid-CmJsZTcB.js → useDateRange-CIXoE_8k.js} +1 -42
  252. package/dist/useDisclosureHandle-Df3HhAfC.js +24 -0
  253. package/dist/{useDismiss-CAiHU6QD.js → useDismiss-Cj8x_51F.js} +8 -4
  254. package/dist/useFieldControlState-voICDrys.js +18 -0
  255. package/dist/useHandleRef-6cdKugm8.js +17 -0
  256. package/dist/useIndicator-i1NORM7W.js +147 -0
  257. package/dist/useMenuDrillIn-BgjJcY3K.js +520 -0
  258. package/dist/useMenuPress-DUmEy4TB.js +425 -0
  259. package/dist/useMonthGrid-fGHSSrFc.js +43 -0
  260. package/dist/usePendingChange-ib-h8FZK.js +25 -0
  261. package/dist/{composables-CVfjp9h4.js → useResizable-B3ahKLoZ.js} +74 -152
  262. package/dist/useSubmenuMode-CZN9qrUo.js +37 -0
  263. package/dist/useTruncation-B5qXQzAP.js +53 -0
  264. package/locales/SOURCE.json +37 -0
  265. package/locales/af-ZA.json +1482 -0
  266. package/locales/ar-SA.json +1482 -0
  267. package/locales/ca-ES.json +1482 -0
  268. package/locales/cs-CZ.json +1482 -0
  269. package/locales/da-DK.json +1482 -0
  270. package/locales/de-DE.json +1482 -0
  271. package/locales/el-GR.json +1482 -0
  272. package/locales/en.json +1646 -0
  273. package/locales/es-ES.json +1482 -0
  274. package/locales/fi-FI.json +1482 -0
  275. package/locales/fr-FR.json +1482 -0
  276. package/locales/he-IL.json +1482 -0
  277. package/locales/hu-HU.json +1482 -0
  278. package/locales/it-IT.json +1482 -0
  279. package/locales/ja-JP.json +1482 -0
  280. package/locales/ko-KR.json +1482 -0
  281. package/locales/nl-NL.json +1482 -0
  282. package/locales/no-NO.json +1482 -0
  283. package/locales/pl-PL.json +1482 -0
  284. package/locales/pt-BR.json +1482 -0
  285. package/locales/pt-PT.json +1482 -0
  286. package/locales/ro-RO.json +1482 -0
  287. package/locales/ru-RU.json +1482 -0
  288. package/locales/sr-SP.json +1482 -0
  289. package/locales/sv-SE.json +1482 -0
  290. package/locales/tr-TR.json +1482 -0
  291. package/locales/uk-UA.json +1482 -0
  292. package/locales/vi-VN.json +1482 -0
  293. package/locales/zh-CN.json +1482 -0
  294. package/locales/zh-TW.json +1482 -0
  295. package/package.json +7 -1
  296. package/styles/bottom-sheet.css +27 -0
  297. package/styles/calendar.css +38 -3
  298. package/styles/check-indicator.css +17 -0
  299. package/styles/checkbox-indicator.css +29 -10
  300. package/styles/checkbox-input.css +0 -11
  301. package/styles/code.css +62 -0
  302. package/styles/container-reveal.css +104 -0
  303. package/styles/date-input.css +48 -0
  304. package/styles/dropdown-menu.css +163 -0
  305. package/styles/field.css +48 -0
  306. package/styles/heading.css +47 -0
  307. package/styles/icon.css +51 -3
  308. package/styles/input-group.css +32 -3
  309. package/styles/keyboard-hint.css +28 -0
  310. package/styles/link.css +34 -0
  311. package/styles/list.css +88 -1
  312. package/styles/markdown.css +12 -0
  313. package/styles/multi-selector.css +26 -0
  314. package/styles/pagination.css +30 -0
  315. package/styles/progress-bar.css +49 -0
  316. package/styles/radio-indicator.css +90 -0
  317. package/styles/radio.css +9 -42
  318. package/styles/selector.css +112 -14
  319. package/styles/side-nav.css +36 -1
  320. package/styles/text.css +18 -0
  321. package/styles/top-nav.css +145 -6
  322. package/styles/typeahead.css +24 -0
  323. package/styles.css +4 -0
  324. package/dist/Calendar-BFaI5AMv.js +0 -352
  325. package/dist/CheckboxIndicator-DdJmksHt.js +0 -52
  326. package/dist/DateInput-BLocxqC3.js +0 -376
  327. package/dist/DropdownMenu-Ddfr-aEC.js +0 -164
  328. package/dist/Heading-Dugosn6j.js +0 -43
  329. package/dist/InputGroup-ChrFVxzV.js +0 -42
  330. package/dist/Item-C1z6gXn8.js +0 -289
  331. package/dist/Link-DqdQZ37C.js +0 -141
  332. package/dist/Selector-DE2IEFML.js +0 -468
  333. package/dist/Text-BHVghsWo.js +0 -53
  334. package/dist/Theme-BuUiiJNr.js +0 -429
  335. package/dist/Typeahead-P7cCqtaQ.js +0 -375
  336. package/dist/index-Bgv4ZmBl.d.ts +0 -72
  337. package/dist/index-DN7MXPHM.d.ts +0 -398
  338. package/dist/index-Dg3ZmwEg.d.ts +0 -75
  339. package/dist/index-IbUN4M8V.d.ts +0 -40
  340. package/dist/index-jdjcb3Js.d.ts +0 -80
  341. package/dist/locale-Cpk_nrLA.js +0 -18
  342. package/dist/syntaxTheme-Bcs1YMF7.d.ts +0 -38
  343. package/dist/types-DDAAT1Xd.d.ts +0 -285
  344. package/dist/useGridRovingFocus-DQQAOYH5.js +0 -99
  345. package/dist/useHotkeys-dABSK1o9.js +0 -80
  346. package/dist/useLongPress-Cyxwa73s.js +0 -60
  347. package/dist/{index-BUXNRekN.d.ts → index-IdK2g5B4.d.ts} +2 -2
@@ -0,0 +1,320 @@
1
+ import { i as SyntaxThemeDefinition } from "./syntaxTheme-CwVEcVDk.js";
2
+ import { t as SemanticIconMap } from "./semantic-CKH9XVqa.js";
3
+ import { Component } from "vue";
4
+ //#region src/Indicator/types.d.ts
5
+ /**
6
+ * Each family owns its own states.
7
+ *
8
+ * A radio is only chosen or not. A checkbox can also be partial. Keeping the
9
+ * families apart means a radio graphic is never asked to draw a mixed state.
10
+ */
11
+ interface IndicatorFamilyMap {
12
+ singleSelection: 'unchecked' | 'checked';
13
+ multiSelection: 'unchecked' | 'checked' | 'indeterminate';
14
+ }
15
+ type IndicatorFamily = keyof IndicatorFamilyMap & string;
16
+ type IndicatorState<F extends IndicatorFamily = IndicatorFamily> = IndicatorFamilyMap[F];
17
+ /** Matches the control sizes of the inputs that draw these graphics. */
18
+ type IndicatorSize = 'sm' | 'md';
19
+ /**
20
+ * Which edge of a row the mark sits on.
21
+ *
22
+ * Logical, not physical: start is the left edge in left-to-right text.
23
+ * The row decides this. The graphic itself has no position.
24
+ */
25
+ type IndicatorPosition = 'start' | 'end';
26
+ /**
27
+ * Props every indicator accepts.
28
+ *
29
+ * The graphic is decorative. The control that draws it keeps the input, the
30
+ * role, the accessible name, and the keyboard. Hover and focus reach the
31
+ * graphic through the `astryx-indicator-scope` class on that control, not
32
+ * through a prop.
33
+ */
34
+ interface IndicatorProps<F extends IndicatorFamily = IndicatorFamily> {
35
+ /** Which state to draw. The family decides which states exist. */
36
+ state: IndicatorState<F>;
37
+ /**
38
+ * Control size. `sm` is 20px and `md` is 24px.
39
+ * @default 'md'
40
+ */
41
+ size?: IndicatorSize;
42
+ /**
43
+ * Whether the owning control is disabled. Visual only.
44
+ * @default false
45
+ */
46
+ isDisabled?: boolean;
47
+ }
48
+ /** A component that can stand in for one indicator name. */
49
+ type IndicatorComponent<F extends IndicatorFamily = IndicatorFamily> = Component<IndicatorProps<F>>;
50
+ /**
51
+ * Names a theme can replace.
52
+ *
53
+ * Packages can add names by augmenting this interface. Core has no default
54
+ * for a name it does not know, so `getIndicator` returns undefined for those
55
+ * and the caller supplies the fallback.
56
+ */
57
+ interface IndicatorMap {
58
+ /** The mark on a chosen option. A check by default, and nothing when unchosen. */
59
+ check: 'singleSelection';
60
+ /** The circle of a radio. */
61
+ radio: 'singleSelection';
62
+ /** The box of a checkbox, including the partial state. */
63
+ checkbox: 'multiSelection';
64
+ }
65
+ type IndicatorName = keyof IndicatorMap & string;
66
+ type CoreIndicatorName = 'check' | 'checkbox' | 'radio';
67
+ /**
68
+ * Theme overrides, keyed by indicator name.
69
+ *
70
+ * One entry replaces that graphic everywhere it is drawn. Mapping `check` to
71
+ * the radio graphic turns every single-selection mark into a radio.
72
+ */
73
+ interface IndicatorRegistry {
74
+ check?: IndicatorComponent<'singleSelection'>;
75
+ radio?: IndicatorComponent<'singleSelection'>;
76
+ checkbox?: IndicatorComponent<'multiSelection'>;
77
+ [name: string]: Component | undefined;
78
+ }
79
+ //#endregion
80
+ //#region src/Theme/expandColorScale.d.ts
81
+ /**
82
+ * Palette seed for `defineTheme({ color })`.
83
+ *
84
+ * `accent` is one hex, or a light stop then a dark stop. Omit it to recolor
85
+ * only the neutrals. `neutralStyle` is how much of the seed hue stays in
86
+ * those neutrals. `high` contrast pulls text and borders further apart.
87
+ */
88
+ interface ColorScaleConfig {
89
+ accent?: string | readonly [light: string, dark: string];
90
+ /** @default 'cool' */
91
+ neutralStyle?: 'warm' | 'cool' | 'neutral';
92
+ /** @default 'standard' */
93
+ contrast?: 'standard' | 'high';
94
+ }
95
+ type ColorScaleTokens = Record<string, string>;
96
+ /**
97
+ * Semantic color tokens derived from an accent.
98
+ *
99
+ * Status colors, chart colors, and on-dark / on-light stay out of this map.
100
+ * `--color-accent-muted`, `--color-text-accent`, and `--color-icon-accent`
101
+ * point at `var(--color-accent)`. `--color-on-accent` is baked from the seed,
102
+ * because the contrast pick cannot be expressed as a CSS reference.
103
+ *
104
+ * Names are the upstream names. `defineTheme()` adds the `--astryx-` prefix.
105
+ */
106
+ declare function expandColorScale(config?: ColorScaleConfig): ColorScaleTokens;
107
+ //#endregion
108
+ //#region src/Theme/expandMotionScale.d.ts
109
+ /**
110
+ * Duration scale. `min` is `base × ratio`, `max` is `base / ratio`,
111
+ * both rounded to 5ms. `slow` is optional. `easing` sets `--ease-standard`.
112
+ */
113
+ interface MotionScaleConfig {
114
+ /** Micro-interactions, in ms. */
115
+ fast: number;
116
+ /** Enter and exit, in ms. */
117
+ medium: number;
118
+ /** Continuous motion, in ms. */
119
+ slow?: number;
120
+ /**
121
+ * Neighbor ratio. Typical range is 0.65–0.85.
122
+ * Neutral uses 0.75.
123
+ */
124
+ ratio: number;
125
+ /** Optional `--ease-standard` curve. */
126
+ easing?: string;
127
+ }
128
+ type MotionScaleTokens = Record<string, string>;
129
+ /** `--duration-*` and an optional `--ease-standard`. */
130
+ declare function expandMotionScale(config: MotionScaleConfig): MotionScaleTokens;
131
+ //#endregion
132
+ //#region src/Theme/expandRadiusScale.d.ts
133
+ /**
134
+ * Radius scale. `none` stays 0 and `full` stays 9999px.
135
+ * The steps are inner ×1, element ×2, container ×3, page and chat ×7.
136
+ */
137
+ interface RadiusScaleConfig {
138
+ /** Base unit in px. */
139
+ base: number;
140
+ /** Multiplier for every step except none and full. 0 makes those corners square. */
141
+ multiplier: number;
142
+ }
143
+ type RadiusScaleTokens = Record<string, string>;
144
+ /** `--radius-*` tokens. Names are unprefixed; `defineTheme()` adds `--astryx-`. */
145
+ declare function expandRadiusScale(config: RadiusScaleConfig): RadiusScaleTokens;
146
+ //#endregion
147
+ //#region src/Theme/expandTypeScale.d.ts
148
+ /** Per-level heading weights. Values are CSS font-weight values. */
149
+ type HeadingWeightOverrides = Partial<Record<1 | 2 | 3 | 4 | 5 | 6, string>>;
150
+ /** Per-role text weights. Extra keys are kept for a theme's own roles. */
151
+ type TextWeightOverrides = Partial<Record<string, string>>;
152
+ /**
153
+ * Geometric type scale. `base` is the body size in px. `ratio` is the step.
154
+ * Size at a step is `round(base × ratio^step)`.
155
+ */
156
+ interface TypeScaleConfig {
157
+ base: number;
158
+ ratio: number;
159
+ weights?: {
160
+ heading?: HeadingWeightOverrides;
161
+ text?: TextWeightOverrides;
162
+ };
163
+ }
164
+ type TypeScaleTokens = Record<string, string>;
165
+ /**
166
+ * Raw `--font-size-*` steps, then heading and text roles.
167
+ *
168
+ * Sizes on the roles point at the raw steps with `var()`. Line heights are
169
+ * unitless ratios snapped onto a 4px grid. Weights point at `--font-weight-*`.
170
+ */
171
+ declare function expandTypeScale(config: TypeScaleConfig): TypeScaleTokens;
172
+ //#endregion
173
+ //#region src/Theme/types.d.ts
174
+ /** Color mode for a theme subtree. `system` follows the page and the OS. */
175
+ type ThemeMode = 'light' | 'dark' | 'system';
176
+ /**
177
+ * A token value.
178
+ *
179
+ * A string is used as written. A two-item tuple is the light stop, then the
180
+ * dark stop, and becomes `light-dark()`.
181
+ */
182
+ type ThemeTokenValue = string | readonly [string, string];
183
+ /** CSS custom properties for a theme. Keys may omit the `--astryx-` prefix. */
184
+ type ThemeTokens = Record<string, ThemeTokenValue>;
185
+ /** Token overrides for one inverted surface. */
186
+ interface ThemeSurfaceInput {
187
+ tokens?: ThemeTokens;
188
+ }
189
+ /**
190
+ * CSS declarations for one component state.
191
+ *
192
+ * A key that starts with `:` is a pseudo-class, for example `:hover`.
193
+ * `:hover` is the enabled control: disabled and `aria-disabled` elements skip it.
194
+ */
195
+ type StyleOverrides = Record<string, string | Record<string, string>>;
196
+ /**
197
+ * Per-component style overrides.
198
+ *
199
+ * `base` matches the component root. `variant:secondary` matches that variant.
200
+ * `variant:destructive+size:sm` matches both at once.
201
+ * Component names are the public names, such as `button` or `radio-indicator`.
202
+ */
203
+ type ComponentStyleMap = Record<string, Record<string, StyleOverrides>>;
204
+ /** One font role. Heading inherits body family and fallbacks when it omits them. */
205
+ interface TypographyRole {
206
+ /** Primary family name. A name with spaces is quoted. */
207
+ family?: string;
208
+ /** Fallback stack, already written as CSS. */
209
+ fallbacks?: string;
210
+ /** Default weight name (`semibold`) or a CSS font-weight value. */
211
+ weight?: string;
212
+ /** Heading levels 1–6. Ignored on body and code. */
213
+ weights?: Partial<Record<1 | 2 | 3 | 4 | 5 | 6, string>>;
214
+ }
215
+ /**
216
+ * Fonts and the type scale.
217
+ *
218
+ * Loading the family is the caller's job. This only writes the tokens.
219
+ */
220
+ interface TypographyConfig {
221
+ scale?: TypeScaleConfig;
222
+ body?: TypographyRole;
223
+ /** Family and fallbacks fall back to `body` when omitted. */
224
+ heading?: TypographyRole;
225
+ code?: TypographyRole;
226
+ }
227
+ interface DefineThemeInput {
228
+ /** Theme name. Used as `data-astryx-theme`. */
229
+ name: string;
230
+ /** Semantic token overrides. These win over generated values, token by token. */
231
+ tokens?: ThemeTokens;
232
+ /**
233
+ * Accent palette. Neutrals, surfaces, text, icons, and borders come from the
234
+ * seed. Explicit `tokens` still win.
235
+ */
236
+ color?: ColorScaleConfig;
237
+ /** Fonts and a type scale from `base` and `ratio`. */
238
+ typography?: TypographyConfig;
239
+ /** Radius steps from a base pixel size and a multiplier. */
240
+ radius?: RadiusScaleConfig;
241
+ /** Duration steps from fast, medium, slow, and a ratio. */
242
+ motion?: MotionScaleConfig;
243
+ /**
244
+ * Component style overrides, scoped to this theme name.
245
+ * `Theme` injects the compiled sheet. `css` on the result is that sheet.
246
+ */
247
+ components?: ComponentStyleMap;
248
+ /** Another theme to start from. This theme's own values win. */
249
+ extends?: ThemeDefinition;
250
+ /** Syntax colors for code in this subtree, unless a SyntaxTheme is closer. */
251
+ syntax?: SyntaxThemeDefinition;
252
+ /** Extra tokens for content on a dark surface. */
253
+ onDark?: ThemeSurfaceInput;
254
+ /** Extra tokens for content on a light surface. */
255
+ onLight?: ThemeSurfaceInput;
256
+ /**
257
+ * Semantic icon name to Iconify id.
258
+ *
259
+ * Entries replace the built-in map by name and merge with the theme this
260
+ * one extends. A name that is not listed keeps the built-in id.
261
+ */
262
+ icons?: SemanticIconMap;
263
+ /**
264
+ * Indicator graphics, replaced by name.
265
+ *
266
+ * One entry reaches every control that draws that indicator. Entries merge
267
+ * with the theme this one extends.
268
+ */
269
+ indicators?: IndicatorRegistry;
270
+ }
271
+ interface ThemeDefinition {
272
+ name: string;
273
+ /** Token values already written as CSS. */
274
+ tokens: Readonly<Record<string, string>>;
275
+ /** Extra tokens applied by MediaTheme when the surface is dark. */
276
+ onDark: Readonly<Record<string, string>>;
277
+ /** Extra tokens applied by MediaTheme when the surface is light. */
278
+ onLight: Readonly<Record<string, string>>;
279
+ syntax?: SyntaxThemeDefinition;
280
+ /** Semantic icon overrides. Absent when this theme does not set any. */
281
+ icons?: SemanticIconMap;
282
+ /** Indicator overrides. Absent when this theme does not set any. */
283
+ indicators?: IndicatorRegistry;
284
+ /**
285
+ * Merged component style map. Present when this theme or its base sets one.
286
+ * A child theme starts from this map.
287
+ */
288
+ components?: ComponentStyleMap;
289
+ /**
290
+ * Compiled component rules, scoped to `[data-astryx-theme="<name>"]`
291
+ * and placed in the `astryx.overrides` layer.
292
+ */
293
+ css?: string;
294
+ readonly __astryxTheme: true;
295
+ }
296
+ interface ThemeProps {
297
+ /** Theme from `defineTheme()`. */
298
+ theme: ThemeDefinition;
299
+ /**
300
+ * Color mode for this subtree.
301
+ * @default 'system'
302
+ */
303
+ mode?: ThemeMode;
304
+ }
305
+ /** Surface luminance, `auto` to measure it, or `off` to leave the page theme. */
306
+ type MediaThemeMode = 'dark' | 'light' | 'auto' | 'off';
307
+ interface MediaThemeProps {
308
+ /**
309
+ * Which surface the children sit on.
310
+ * `auto` measures the parent. `off` keeps the surrounding theme.
311
+ */
312
+ mode: MediaThemeMode;
313
+ /**
314
+ * Side used by `auto` before the surface can be measured, and when it cannot.
315
+ * @default 'dark'
316
+ */
317
+ fallback?: 'dark' | 'light';
318
+ }
319
+ //#endregion
320
+ export { IndicatorRegistry as A, IndicatorComponent as C, IndicatorName as D, IndicatorMap as E, IndicatorState as M, IndicatorPosition as O, CoreIndicatorName as S, IndicatorFamilyMap as T, expandRadiusScale as _, StyleOverrides as a, ColorScaleConfig as b, ThemeProps as c, ThemeTokens as d, TypographyConfig as f, RadiusScaleConfig as g, expandTypeScale as h, MediaThemeProps as i, IndicatorSize as j, IndicatorProps as k, ThemeSurfaceInput as l, TypeScaleConfig as m, DefineThemeInput as n, ThemeDefinition as o, TypographyRole as p, MediaThemeMode as r, ThemeMode as s, ComponentStyleMap as t, ThemeTokenValue as u, MotionScaleConfig as v, IndicatorFamily as w, expandColorScale as x, expandMotionScale as y };
@@ -1,4 +1,4 @@
1
- import { t as useDismiss } from "./useDismiss-CAiHU6QD.js";
1
+ import { t as useDismiss } from "./useDismiss-Cj8x_51F.js";
2
2
  import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
3
3
  import { computed, onMounted, ref, watch } from "vue";
4
4
  //#region src/Typeahead/useAnchoredListbox.ts
@@ -0,0 +1,21 @@
1
+ //#region src/composables/useDatePresentation.ts
2
+ /**
3
+ * `presentation` wins over the older native picker name.
4
+ * With neither set, a mouse gets the calendar popover and a coarse pointer gets the system date control.
5
+ */
6
+ function resolveDatePresentation(presentation, nativePicker) {
7
+ if (presentation) return presentation;
8
+ if (nativePicker === "always") return "native";
9
+ if (nativePicker === "never") return "adaptive-bottom-sheet";
10
+ if (nativePicker === "touch") return "adaptive-native";
11
+ return "adaptive-native";
12
+ }
13
+ function resolveDateSurface(presentation, coarse) {
14
+ if (presentation === "popover") return "popover";
15
+ if (presentation === "bottom-sheet") return "sheet";
16
+ if (presentation === "native") return "native";
17
+ if (presentation === "adaptive-bottom-sheet") return coarse ? "sheet" : "popover";
18
+ return coarse ? "native" : "popover";
19
+ }
20
+ //#endregion
21
+ export { resolveDateSurface as n, resolveDatePresentation as t };
@@ -1,4 +1,3 @@
1
- import { CalendarDate } from "@internationalized/date";
2
1
  //#region src/composables/useDateRange.ts
3
2
  const WEEKDAY_INDEX = {
4
3
  sun: 0,
@@ -96,44 +95,4 @@ function formatDateRange(range, locale) {
96
95
  return `${format(range.start)} – ${format(range.end)}`;
97
96
  }
98
97
  //#endregion
99
- //#region src/composables/useMonthGrid.ts
100
- function toISODate(date) {
101
- const month = String(date.month).padStart(2, "0");
102
- const day = String(date.day).padStart(2, "0");
103
- return `${date.year}-${month}-${day}`;
104
- }
105
- function parseISODate(value) {
106
- const [year, month, day] = value.split("-").map(Number);
107
- return new CalendarDate(year, month, day);
108
- }
109
- function buildMonthGrid(year, month, weekStartsOn) {
110
- const first = new CalendarDate(year, month, 1);
111
- const start = resolveWeekStart(weekStartsOn);
112
- const offset = (first.toDate("UTC").getUTCDay() - start + 7) % 7;
113
- let cursor = first.subtract({ days: offset });
114
- const weeks = [];
115
- for (let week = 0; week < 6; week += 1) {
116
- const days = [];
117
- for (let day = 0; day < 7; day += 1) {
118
- days.push(toISODate(cursor));
119
- cursor = cursor.add({ days: 1 });
120
- }
121
- weeks.push(days);
122
- }
123
- return weeks;
124
- }
125
- function addMonths(year, month, amount) {
126
- const date = new CalendarDate(year, month, 1).add({ months: amount });
127
- return {
128
- year: date.year,
129
- month: date.month
130
- };
131
- }
132
- function todayISODate() {
133
- const now = /* @__PURE__ */ new Date();
134
- const month = String(now.getMonth() + 1).padStart(2, "0");
135
- const day = String(now.getDate()).padStart(2, "0");
136
- return `${now.getFullYear()}-${month}-${day}`;
137
- }
138
- //#endregion
139
- export { todayISODate as a, formatDateRange as c, isSameRange as d, orderRange as f, toISODate as i, isDayOutsideSpan as l, spanDays as m, buildMonthGrid as n, applyRangeClick as o, resolveWeekStart as p, parseISODate as r, compareISODate as s, addMonths as t, isRangeWithinSpan as u };
98
+ export { isRangeWithinSpan as a, resolveWeekStart as c, isDayOutsideSpan as i, spanDays as l, compareISODate as n, isSameRange as o, formatDateRange as r, orderRange as s, applyRangeClick as t };
@@ -0,0 +1,24 @@
1
+ import { onBeforeUnmount, watchEffect } from "vue";
2
+ //#region src/composables/useDisclosureHandle.ts
3
+ function publish(target, value) {
4
+ if (target == null) return;
5
+ if (typeof target === "function") target(value);
6
+ else target.value = value;
7
+ }
8
+ /**
9
+ * 把打开、关闭、切换和当前是否打开写到调用方持有的句柄上。
10
+ * 必须传入读取函数。句柄本身常常就是一个 ref,直接交给 Vue 的解包会拿到里面的 null。
11
+ * 句柄换掉时先把旧的清空,组件卸载时也清空。
12
+ */
13
+ function useDisclosureHandle(read, handle) {
14
+ let previous;
15
+ watchEffect(() => {
16
+ const target = read();
17
+ if (previous != null && previous !== target) publish(previous, null);
18
+ publish(target, handle);
19
+ previous = target;
20
+ });
21
+ onBeforeUnmount(() => publish(read(), null));
22
+ }
23
+ //#endregion
24
+ export { useDisclosureHandle as t };
@@ -13,6 +13,10 @@ const escapeStack = [];
13
13
  function useDismiss(options) {
14
14
  const { container, trigger, isEnabled, enableEscape = { value: true }, onDismiss } = options;
15
15
  let isAttached = false;
16
+ function dismissFromEscape() {
17
+ if (options.onEscape != null) options.onEscape();
18
+ else onDismiss();
19
+ }
16
20
  function onClickOutside(event) {
17
21
  if (!isEnabled.value) return;
18
22
  const el = container.value;
@@ -25,9 +29,9 @@ function useDismiss(options) {
25
29
  function onEscapeKey(event) {
26
30
  if (!isEnabled.value || !enableEscape.value) return;
27
31
  if (event.key === "Escape") {
28
- if (escapeStack[escapeStack.length - 1] === onDismiss) {
32
+ if (escapeStack[escapeStack.length - 1] === dismissFromEscape) {
29
33
  event.preventDefault();
30
- onDismiss();
34
+ dismissFromEscape();
31
35
  }
32
36
  }
33
37
  }
@@ -38,14 +42,14 @@ function useDismiss(options) {
38
42
  isAttached = true;
39
43
  document.addEventListener("pointerdown", onClickOutside, true);
40
44
  document.addEventListener("keydown", onEscapeKey, true);
41
- if (enableEscape.value) escapeStack.push(onDismiss);
45
+ if (enableEscape.value) escapeStack.push(dismissFromEscape);
42
46
  }
43
47
  function teardown() {
44
48
  if (typeof document === "undefined" || !isAttached) return;
45
49
  isAttached = false;
46
50
  document.removeEventListener("pointerdown", onClickOutside, true);
47
51
  document.removeEventListener("keydown", onEscapeKey, true);
48
- const index = escapeStack.indexOf(onDismiss);
52
+ const index = escapeStack.indexOf(dismissFromEscape);
49
53
  if (index !== -1) escapeStack.splice(index, 1);
50
54
  }
51
55
  watch(isEnabled, (enabled) => {
@@ -0,0 +1,18 @@
1
+ import { computed, toValue } from "vue";
2
+ //#region src/composables/useFieldControlState.ts
3
+ /**
4
+ * 选择器和复选列表共用的三种互斥状态。
5
+ * 同时标成禁用和只读时,按禁用处理。
6
+ */
7
+ function useFieldControlState(input) {
8
+ const isDisabled = computed(() => toValue(input.disabled) === true);
9
+ const isReadOnly = computed(() => toValue(input.readOnly) === true && !isDisabled.value);
10
+ return {
11
+ isDisabled,
12
+ isReadOnly,
13
+ isLoading: computed(() => toValue(input.loading) === true),
14
+ canActivate: computed(() => !isDisabled.value && !isReadOnly.value)
15
+ };
16
+ }
17
+ //#endregion
18
+ export { useFieldControlState as t };
@@ -0,0 +1,17 @@
1
+ import { onBeforeUnmount, watch } from "vue";
2
+ //#region src/composables/useHandleRef.ts
3
+ function publish(target, handle) {
4
+ if (target == null) return;
5
+ if (typeof target === "function") target(handle);
6
+ else target.value = handle;
7
+ }
8
+ /** Keeps an imperative handle on a ref or a callback, and clears it when the owner goes away. */
9
+ function useHandleRef(read, handle) {
10
+ watch(read, (_next, previous) => {
11
+ if (previous != null && previous !== read()) publish(previous, null);
12
+ publish(read(), handle);
13
+ }, { immediate: true });
14
+ onBeforeUnmount(() => publish(read(), null));
15
+ }
16
+ //#endregion
17
+ export { useHandleRef as t };
@@ -0,0 +1,147 @@
1
+ import { t as _sfc_main$2 } from "./Icon-bteSId7T.js";
2
+ import { n as themeContextKey } from "./context-Cws_tXTr.js";
3
+ import { n as decorativeAttrs, t as _sfc_main$3 } from "./CheckboxIndicator-D37cm2Rh.js";
4
+ import { Comment, Fragment, Text, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, inject, mergeProps, openBlock, renderSlot, unref, useAttrs, useSlots, useTemplateRef } from "vue";
5
+ import "../styles/check-indicator.css";
6
+ import "../styles/radio-indicator.css";
7
+ //#region src/Indicator/isRenderable.ts
8
+ /**
9
+ * Whether a slot or vnode should replace an indicator's own mark.
10
+ *
11
+ * Null, undefined, booleans, and the empty string do not count. An element
12
+ * does, even when that element later renders nothing. A host writes
13
+ * `v-if="busy"` around a spinner, and `false` must not delete the mark.
14
+ */
15
+ function isRenderable(value) {
16
+ if (value == null || typeof value === "boolean" || value === "") return false;
17
+ if (Array.isArray(value)) return value.some((item) => isRenderable(item));
18
+ if (typeof value !== "object") return true;
19
+ const node = value;
20
+ if (node.type === Comment) return false;
21
+ if (node.type === Text) return String(node.children ?? "").trim() !== "";
22
+ if (node.type === Fragment) return isRenderable(node.children);
23
+ return true;
24
+ }
25
+ //#endregion
26
+ //#region src/Indicator/useReplacementSlot.ts
27
+ /**
28
+ * Whether the default slot should take the place of the state mark.
29
+ *
30
+ * Called during render. The slot function runs once to inspect, and the
31
+ * template renders it again when the answer is yes.
32
+ */
33
+ function useReplacementSlot() {
34
+ const slots = useSlots();
35
+ return () => isRenderable(slots.default?.());
36
+ }
37
+ //#endregion
38
+ //#region src/Indicator/CheckIndicator.vue
39
+ const _hoisted_1$1 = ["data-size", "data-disabled"];
40
+ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
41
+ name: "AstryxCheckIndicator",
42
+ inheritAttrs: false,
43
+ __name: "CheckIndicator",
44
+ props: {
45
+ state: {},
46
+ size: { default: "md" },
47
+ isDisabled: { type: Boolean }
48
+ },
49
+ setup(__props, { expose: __expose }) {
50
+ const props = __props;
51
+ const attrs = useAttrs();
52
+ const element = useTemplateRef("mark");
53
+ const passed = computed(() => decorativeAttrs(attrs));
54
+ const replacement = useReplacementSlot();
55
+ __expose({ element });
56
+ return (_ctx, _cache) => {
57
+ return unref(replacement)() ? (openBlock(), createElementBlock("span", mergeProps({
58
+ key: 0,
59
+ ref: "mark"
60
+ }, passed.value, {
61
+ class: "astryx-check-indicator",
62
+ "aria-hidden": "true",
63
+ "data-size": props.size,
64
+ "data-disabled": __props.isDisabled || void 0
65
+ }), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$1)) : __props.state === "checked" ? (openBlock(), createBlock(_sfc_main$2, mergeProps({
66
+ key: 1,
67
+ ref: "mark"
68
+ }, passed.value, {
69
+ icon: "check",
70
+ size: "sm",
71
+ color: __props.isDisabled ? "disabled" : "accent",
72
+ "aria-hidden": "true"
73
+ }), null, 16, ["color"])) : createCommentVNode("v-if", true);
74
+ };
75
+ }
76
+ });
77
+ //#endregion
78
+ //#region src/Indicator/RadioIndicator.vue
79
+ const _hoisted_1 = [
80
+ "data-state",
81
+ "data-size",
82
+ "data-disabled"
83
+ ];
84
+ const _hoisted_2 = {
85
+ key: 0,
86
+ class: "astryx-radio-indicator-dot"
87
+ };
88
+ const _sfc_main = /*@__PURE__*/ defineComponent({
89
+ name: "AstryxRadioIndicator",
90
+ inheritAttrs: false,
91
+ __name: "RadioIndicator",
92
+ props: {
93
+ state: {},
94
+ size: {},
95
+ isDisabled: { type: Boolean }
96
+ },
97
+ setup(__props, { expose: __expose }) {
98
+ const props = __props;
99
+ const attrs = useAttrs();
100
+ const element = useTemplateRef("indicator");
101
+ const passed = computed(() => decorativeAttrs(attrs));
102
+ const checked = computed(() => props.state !== "unchecked");
103
+ __expose({ element });
104
+ return (_ctx, _cache) => {
105
+ return openBlock(), createElementBlock("span", mergeProps(passed.value, {
106
+ ref: "indicator",
107
+ class: "astryx-radio-indicator",
108
+ "aria-hidden": "true",
109
+ "data-state": checked.value ? "checked" : "unchecked",
110
+ "data-size": props.size,
111
+ "data-disabled": __props.isDisabled || void 0
112
+ }), [renderSlot(_ctx.$slots, "default", {}, () => [checked.value ? (openBlock(), createElementBlock("span", _hoisted_2)) : createCommentVNode("v-if", true)])], 16, _hoisted_1);
113
+ };
114
+ }
115
+ });
116
+ //#endregion
117
+ //#region src/Indicator/registry.ts
118
+ /**
119
+ * The graphics this package ships.
120
+ *
121
+ * A theme's `indicators` entries replace these by name. The set is closed:
122
+ * a name added by augmentation is not in here.
123
+ */
124
+ const defaultIndicators = {
125
+ check: _sfc_main$1,
126
+ checkbox: _sfc_main$3,
127
+ radio: _sfc_main
128
+ };
129
+ function isCoreIndicatorName(name) {
130
+ return name === "check" || name === "checkbox" || name === "radio";
131
+ }
132
+ function themeIndicators(theme) {
133
+ return theme?.indicators;
134
+ }
135
+ function getIndicator(name, theme) {
136
+ const override = themeIndicators(theme)?.[name];
137
+ if (override) return override;
138
+ if (isCoreIndicatorName(name)) return defaultIndicators[name];
139
+ }
140
+ //#endregion
141
+ //#region src/Indicator/useIndicator.ts
142
+ function useIndicator(name) {
143
+ const context = inject(themeContextKey, null);
144
+ return computed(() => getIndicator(name, context?.value.theme));
145
+ }
146
+ //#endregion
147
+ export { _sfc_main as a, isCoreIndicatorName as i, defaultIndicators as n, _sfc_main$1 as o, getIndicator as r, isRenderable as s, useIndicator as t };