@astryx-vue/core 0.3.0 → 0.4.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 (512) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
  3. package/dist/AppShell/index.d.ts +1 -1
  4. package/dist/AppShell/index.js +1 -1
  5. package/dist/{AppShell-0wTvOo3H.js → AppShell-awAKicsc.js} +3 -3
  6. package/dist/Avatar/index.js +1 -1
  7. package/dist/{Avatar-pPZ4dI_s.js → Avatar-DXBjJ88C.js} +47 -34
  8. package/dist/AvatarGroup/index.d.ts +1 -1
  9. package/dist/AvatarGroup/index.js +1 -1
  10. package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-kpAeKLNq.js} +57 -13
  11. package/dist/Banner/index.d.ts +1 -1
  12. package/dist/Banner/index.js +1 -1
  13. package/dist/{Banner-GbGxrqQO.js → Banner-BdvuyzAe.js} +71 -35
  14. package/dist/Blockquote/index.js +1 -1
  15. package/dist/Blockquote-DRoKdcxZ.js +27 -0
  16. package/dist/BottomSheet/index.d.ts +1 -1
  17. package/dist/BottomSheet/index.js +2 -2
  18. package/dist/{BottomSheet-pt7m4CvC.js → BottomSheet-B4sc3F1S.js} +286 -140
  19. package/dist/{BottomSheet-JYMB_Ofl.js → BottomSheet-m54uCMJN.js} +20 -4
  20. package/dist/Breadcrumbs/index.d.ts +2 -2
  21. package/dist/Breadcrumbs/index.js +2 -2
  22. package/dist/Breadcrumbs-D4ZzHEB0.js +223 -0
  23. package/dist/Button/index.d.ts +1 -1
  24. package/dist/Button/index.js +1 -1
  25. package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
  26. package/dist/ButtonGroup/index.d.ts +1 -1
  27. package/dist/ButtonGroup/index.js +1 -1
  28. package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
  29. package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
  30. package/dist/Calendar/index.d.ts +1 -1
  31. package/dist/Calendar/index.js +1 -1
  32. package/dist/{Calendar-B7vIowKq.js → Calendar-CjK-JUDM.js} +5 -5
  33. package/dist/Card/index.d.ts +2 -2
  34. package/dist/Carousel/index.js +1 -1
  35. package/dist/{Carousel-CA8zpD9v.js → Carousel-D262qigj.js} +8 -8
  36. package/dist/Chat/index.d.ts +1 -1
  37. package/dist/Chat/index.js +1 -1
  38. package/dist/{Chat-Bmna9EOA.js → Chat-DD_mlIP3.js} +165 -101
  39. package/dist/CheckboxIndicator/index.js +1 -1
  40. package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
  41. package/dist/CheckboxInput/index.d.ts +1 -1
  42. package/dist/CheckboxInput/index.js +1 -1
  43. package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-D8vTmAMZ.js} +20 -12
  44. package/dist/CheckboxList/index.d.ts +1 -1
  45. package/dist/CheckboxList/index.js +1 -1
  46. package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-DCvHewHB.js} +155 -38
  47. package/dist/Citation/index.js +1 -1
  48. package/dist/{Citation-Djgwa0ko.js → Citation-C69BgxW3.js} +8 -3
  49. package/dist/ClickableCard/index.d.ts +1 -1
  50. package/dist/ClickableCard/index.js +1 -1
  51. package/dist/{ClickableCard-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
  52. package/dist/Code/index.d.ts +1 -1
  53. package/dist/Code/index.js +3 -3
  54. package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
  55. package/dist/{CodeBlock-D0BFubut.js → CodeBlock-DsbwTBiT.js} +8 -8
  56. package/dist/Collapsible/index.d.ts +1 -1
  57. package/dist/Collapsible/index.js +1 -1
  58. package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
  59. package/dist/CommandPalette/index.d.ts +1 -1
  60. package/dist/CommandPalette/index.js +1 -1
  61. package/dist/{CommandPalette-YHsUNg3V.js → CommandPalette-CZ7CZglZ.js} +147 -67
  62. package/dist/ComplexSelector/index.d.ts +1 -1
  63. package/dist/ComplexSelector/index.js +1 -1
  64. package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-CIz6DDmY.js} +114 -28
  65. package/dist/ContextMenu/index.d.ts +2 -2
  66. package/dist/ContextMenu/index.js +2 -2
  67. package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-CxoiRh_h.js} +297 -179
  68. package/dist/DateInput/index.d.ts +1 -1
  69. package/dist/DateInput/index.js +1 -1
  70. package/dist/{DateInput-DT518j5E.js → DateInput-C67HCOU-.js} +563 -72
  71. package/dist/DateRangeInput/index.d.ts +1 -1
  72. package/dist/DateRangeInput/index.js +1 -1
  73. package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Dsf5Tyf-.js} +91 -26
  74. package/dist/DateTimeInput/index.d.ts +1 -1
  75. package/dist/DateTimeInput/index.js +1 -1
  76. package/dist/DateTimeInput-tfM1y5nZ.js +562 -0
  77. package/dist/Dialog/index.d.ts +1 -1
  78. package/dist/Dialog/index.js +2 -2
  79. package/dist/{Dialog-BiOSKQso.js → Dialog-DT1GzCrB.js} +28 -11
  80. package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
  81. package/dist/Divider/index.d.ts +1 -1
  82. package/dist/Divider/index.js +1 -1
  83. package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
  84. package/dist/DropdownMenu/index.d.ts +2 -2
  85. package/dist/DropdownMenu/index.js +3 -3
  86. package/dist/{DropdownMenu-CoOQVlRp.js → DropdownMenu-C6wBC18g.js} +84 -56
  87. package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-G-pWSiBk.js} +479 -264
  88. package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
  89. package/dist/EmptyState/index.js +1 -1
  90. package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
  91. package/dist/Field/index.d.ts +4 -3
  92. package/dist/Field/index.js +4 -3
  93. package/dist/{Field-D5gUEGw4.js → Field-JIxT3xCh.js} +5 -4
  94. package/dist/FieldIcon-BFSHZEs_.js +40 -0
  95. package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-BbgLt4ug.js} +4 -4
  96. package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-CHqp1y3z.js} +13 -8
  97. package/dist/FieldStatus/index.d.ts +1 -1
  98. package/dist/FieldStatus/index.js +1 -1
  99. package/dist/{FieldStatus-MjY19ERl.js → FieldStatus-DaAB3TIt.js} +1 -1
  100. package/dist/FileInput/index.d.ts +1 -1
  101. package/dist/FileInput/index.js +1 -1
  102. package/dist/{FileInput-BpdiO1V8.js → FileInput-Bi1uty-F.js} +108 -31
  103. package/dist/FormLayout/index.d.ts +1 -1
  104. package/dist/FormLayout/index.js +1 -1
  105. package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
  106. package/dist/Heading/index.d.ts +1 -1
  107. package/dist/Heading/index.js +1 -1
  108. package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
  109. package/dist/HoverCard/index.js +1 -1
  110. package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
  111. package/dist/Icon/index.d.ts +4 -4
  112. package/dist/Icon/index.js +1 -1
  113. package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
  114. package/dist/IconButton/index.js +1 -1
  115. package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
  116. package/dist/Indicator/index.d.ts +2 -2
  117. package/dist/Indicator/index.js +2 -1
  118. package/dist/InputClearButton-CfSIqc-V.js +40 -0
  119. package/dist/InputGroup/index.d.ts +1 -1
  120. package/dist/InputGroup/index.js +2 -2
  121. package/dist/{InputGroup-CA03Smrs.js → InputGroup-D3F-QnET.js} +2 -2
  122. package/dist/InternationalizationProvider/index.d.ts +1 -1
  123. package/dist/InternationalizationProvider/index.js +1 -1
  124. package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-CVV5QDgp.js} +5 -9
  125. package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
  126. package/dist/Kbd/index.js +1 -1
  127. package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
  128. package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
  129. package/dist/LayerProvider/index.js +1 -1
  130. package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
  131. package/dist/Layout/index.d.ts +1 -1
  132. package/dist/Layout/index.js +2 -2
  133. package/dist/{Layout-C6RHllr-.js → Layout-JJRCG7Mf.js} +1 -1
  134. package/dist/{LayoutPanel-DXOsaeQb.js → LayoutPanel-zM5vjrKS.js} +12 -8
  135. package/dist/Lightbox/index.js +1 -1
  136. package/dist/{Lightbox-DTF9EdTG.js → Lightbox-CjXhbDPc.js} +14 -12
  137. package/dist/Link/index.js +1 -1
  138. package/dist/{Link-BqHCtiyt.js → Link-ClNkTN1Q.js} +29 -12
  139. package/dist/List/index.d.ts +1 -1
  140. package/dist/List/index.js +2 -2
  141. package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
  142. package/dist/Markdown/index.d.ts +5 -2
  143. package/dist/Markdown/index.js +4 -2
  144. package/dist/Markdown/parser/index.d.ts +4 -0
  145. package/dist/Markdown/parser/index.js +2 -0
  146. package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
  147. package/dist/Markdown/plugin-protocol/index.js +107 -0
  148. package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
  149. package/dist/Markdown/plugin-renderer/index.js +42 -0
  150. package/dist/{Markdown-CvtN7HnF.js → Markdown-EIBrwQrb.js} +195 -524
  151. package/dist/MediaTheme-DlLqYhDy.js +433 -0
  152. package/dist/MetadataList/index.js +1 -1
  153. package/dist/{MetadataList-B-OelQlt.js → MetadataList-DLlSLX1n.js} +15 -7
  154. package/dist/MobileNav/index.js +1 -1
  155. package/dist/{MobileNavToggle-DxGz0xKA.js → MobileNavToggle-DgJYyzT6.js} +52 -17
  156. package/dist/MoreMenu/index.d.ts +1 -1
  157. package/dist/MoreMenu/index.js +1 -1
  158. package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-C8BEt6-O.js} +74 -61
  159. package/dist/MultiSelector/index.d.ts +1 -1
  160. package/dist/MultiSelector/index.js +1 -1
  161. package/dist/MultiSelector-C7NCAtwW.js +1456 -0
  162. package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
  163. package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-DQXisuaX.js} +29 -26
  164. package/dist/NavItem/index.d.ts +1 -1
  165. package/dist/NavItem/index.js +2 -2
  166. package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
  167. package/dist/NavMenu/index.d.ts +1 -1
  168. package/dist/NavMenu/index.js +3 -3
  169. package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
  170. package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
  171. package/dist/NumberInput/index.d.ts +1 -1
  172. package/dist/NumberInput/index.js +1 -1
  173. package/dist/NumberInput-3u3NZWnv.js +727 -0
  174. package/dist/Outline/index.d.ts +2 -2
  175. package/dist/Outline/index.js +2 -2
  176. package/dist/{Outline-755h-lMP.js → Outline-8szj9eXu.js} +91 -6
  177. package/dist/OverflowList/index.d.ts +2 -2
  178. package/dist/OverflowList/index.js +1 -1
  179. package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BizpEwH8.js} +23 -6
  180. package/dist/Pagination/index.d.ts +1 -1
  181. package/dist/Pagination/index.js +1 -1
  182. package/dist/{Pagination-DqwNQFRp.js → Pagination-Cihr1CjD.js} +2 -2
  183. package/dist/PickerWheel-CSwUYfes.js +69 -0
  184. package/dist/Popover/index.d.ts +1 -1
  185. package/dist/Popover/index.js +1 -1
  186. package/dist/{Popover-DJf8POzL.js → Popover-78dFjTb9.js} +20 -15
  187. package/dist/PowerSearch/index.d.ts +1 -1
  188. package/dist/PowerSearch/index.js +1 -1
  189. package/dist/{PowerSearch-DvjiPqMZ.js → PowerSearch-BHx91ypY.js} +778 -590
  190. package/dist/ProgressBar/index.d.ts +1 -1
  191. package/dist/ProgressBar/index.js +1 -1
  192. package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
  193. package/dist/Radio/index.d.ts +1 -1
  194. package/dist/Radio/index.js +1 -1
  195. package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-DeSIRrgt.js} +94 -26
  196. package/dist/RadioList/index.d.ts +1 -1
  197. package/dist/RadioList/index.js +1 -1
  198. package/dist/{RadioList-xY1cwLdZ.js → RadioList-Co2lmetC.js} +57 -8
  199. package/dist/Resizable/index.d.ts +1 -1
  200. package/dist/Resizable/index.js +1 -1
  201. package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-DjLZ2pcq.js} +103 -50
  202. package/dist/ScrollableArea/index.d.ts +1 -1
  203. package/dist/ScrollableArea/index.js +1 -1
  204. package/dist/{ScrollableArea-D4dCJv9I.js → ScrollableArea-0u6RWtGG.js} +1 -1
  205. package/dist/SegmentedControl/index.d.ts +1 -1
  206. package/dist/SegmentedControl/index.js +1 -1
  207. package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
  208. package/dist/SelectableCard/index.d.ts +1 -1
  209. package/dist/SelectableCard/index.js +1 -1
  210. package/dist/{SelectableCard-Cku4dRzc.js → SelectableCard-BEqnhPaX.js} +16 -11
  211. package/dist/Selector/index.d.ts +1 -1
  212. package/dist/Selector/index.js +1 -1
  213. package/dist/Selector-swa3RNQI.js +1049 -0
  214. package/dist/SideNav/index.d.ts +1 -1
  215. package/dist/SideNav/index.js +1 -1
  216. package/dist/{SideNav-BF8mYDxl.js → SideNav-BH6XKsW2.js} +56 -42
  217. package/dist/Slider/index.d.ts +1 -1
  218. package/dist/Slider/index.js +1 -1
  219. package/dist/{Slider-DWobsPgm.js → Slider-DG2YXll8.js} +172 -46
  220. package/dist/Spinner/index.js +1 -1
  221. package/dist/Spinner-BY8iQz--.js +200 -0
  222. package/dist/Stack/index.js +2 -2
  223. package/dist/{Stack-CTsTFfar.js → Stack-Bb_h60t3.js} +1 -1
  224. package/dist/{Stack-kQlYbbL4.js → Stack-Bp-XN9J4.js} +12 -7
  225. package/dist/StatusDot/index.d.ts +1 -1
  226. package/dist/StatusDot/index.js +1 -1
  227. package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
  228. package/dist/Stepper/index.d.ts +1 -1
  229. package/dist/Stepper/index.js +1 -1
  230. package/dist/{Stepper-CE8dHysu.js → Stepper-FtkTq5qR.js} +127 -113
  231. package/dist/Switch/index.d.ts +1 -1
  232. package/dist/Switch/index.js +1 -1
  233. package/dist/{Switch-DaVPRxvN.js → Switch-0JKvJluV.js} +38 -22
  234. package/dist/TabList/index.d.ts +2 -2
  235. package/dist/TabList/index.js +1 -1
  236. package/dist/{TabList-DIkK9sgK.js → TabList-cpjvnbhx.js} +205 -63
  237. package/dist/Table/index.d.ts +3 -3
  238. package/dist/Table/index.js +1 -1
  239. package/dist/{Table-fecqnm7P.js → Table-fWs_ZQBF.js} +735 -461
  240. package/dist/Text/index.d.ts +1 -1
  241. package/dist/Text/index.js +1 -1
  242. package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
  243. package/dist/TextArea/index.d.ts +1 -1
  244. package/dist/TextArea/index.js +1 -1
  245. package/dist/{TextArea-Ab5Sw60T.js → TextArea-CwSfEjT1.js} +110 -50
  246. package/dist/TextInput/index.d.ts +1 -1
  247. package/dist/TextInput/index.js +1 -1
  248. package/dist/{TextInput-zFT1_qgI.js → TextInput-CavITage.js} +71 -38
  249. package/dist/Theme/index.d.ts +3 -3
  250. package/dist/Theme/index.js +3 -2
  251. package/dist/Theme-BbDT8B_C.js +2125 -0
  252. package/dist/Thumbnail/index.js +1 -1
  253. package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-DpJnaNbg.js} +17 -14
  254. package/dist/{TimeField-CoHDGmsP.js → TimeField-DefNjDIT.js} +297 -40
  255. package/dist/TimeInput/index.d.ts +1 -1
  256. package/dist/TimeInput/index.js +1 -1
  257. package/dist/{TimeInput-D2k3Ux3p.js → TimeInput-j5vzN8MG.js} +78 -9
  258. package/dist/Timer/index.js +1 -1
  259. package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
  260. package/dist/Timestamp/index.d.ts +1 -1
  261. package/dist/Timestamp/index.js +1 -1
  262. package/dist/{Timestamp-xpQKCk0d.js → Timestamp-dtT4yADD.js} +9 -9
  263. package/dist/Toast/index.d.ts +1 -1
  264. package/dist/Toast/index.js +1 -1
  265. package/dist/Toast-igtJYSw0.js +685 -0
  266. package/dist/ToggleButton/index.d.ts +1 -1
  267. package/dist/ToggleButton/index.js +1 -1
  268. package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
  269. package/dist/Token/index.d.ts +1 -1
  270. package/dist/Token/index.js +1 -1
  271. package/dist/{Token-DsntTYhQ.js → Token-DhsAtAH6.js} +32 -17
  272. package/dist/Tokenizer/index.d.ts +1 -1
  273. package/dist/Tokenizer/index.js +1 -1
  274. package/dist/{Tokenizer-B5C_qY7t.js → Tokenizer-BGdj78UK.js} +107 -23
  275. package/dist/Toolbar/index.d.ts +2 -2
  276. package/dist/Toolbar/index.js +1 -1
  277. package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
  278. package/dist/Tooltip/index.d.ts +1 -1
  279. package/dist/Tooltip/index.js +1 -1
  280. package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
  281. package/dist/TopNav/index.d.ts +1 -1
  282. package/dist/TopNav/index.js +1 -1
  283. package/dist/{TopNav-Ciq0l1w7.js → TopNav-Dw0m387B.js} +23 -22
  284. package/dist/TreeList/index.d.ts +1 -1
  285. package/dist/TreeList/index.js +1 -1
  286. package/dist/{TreeList-BUz-KZJd.js → TreeList-Bunn7u3T.js} +129 -46
  287. package/dist/Typeahead/index.d.ts +1 -1
  288. package/dist/Typeahead/index.js +2 -2
  289. package/dist/{Typeahead-JP9RT87x.js → Typeahead-DRyf2HEh.js} +123 -26
  290. package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BY5__sPC.js} +141 -51
  291. package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
  292. package/dist/characters-rcDbGt71.d.ts +29 -0
  293. package/dist/characters-wTnzjkkR.js +58 -0
  294. package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
  295. package/dist/composables/index.d.ts +5 -4
  296. package/dist/composables/index.js +23 -18
  297. package/dist/{composables-CbKx9C1Y.js → composables-CnsDaMuU.js} +167 -197
  298. package/dist/context-B6UElI5X.js +5 -0
  299. package/dist/context-CM-cjGg_.js +1425 -0
  300. package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
  301. package/dist/context-IvbU9c3T.js +8 -0
  302. package/dist/context-pjBxaMSh.js +28 -0
  303. package/dist/fieldParts--SyRZVQG.js +44 -0
  304. package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
  305. package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
  306. package/dist/hoverIntent-DMHGb85c.js +115 -0
  307. package/dist/{index-ClNU2Th8.d.ts → index-3t5RAfNP.d.ts} +6 -2
  308. package/dist/{index-B9e52paP.d.ts → index-5LVG3QyV.d.ts} +1 -1
  309. package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
  310. package/dist/{index-TXcNH86P.d.ts → index-B1eCxBCY.d.ts} +1 -1
  311. package/dist/{index-Cn-sSds-.d.ts → index-B1t1oQWH.d.ts} +24 -1
  312. package/dist/{index-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
  313. package/dist/{index-yT1yiiww.d.ts → index-BI6jikpA.d.ts} +23 -11
  314. package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
  315. package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
  316. package/dist/{index-Crp3NFLW.d.ts → index-BZKgbyN9.d.ts} +1 -1
  317. package/dist/{index-Bu8NA2SD.d.ts → index-BaxM-pFP.d.ts} +12 -3
  318. package/dist/{index-BVKivP59.d.ts → index-Bgk1Rj2A.d.ts} +32 -3
  319. package/dist/index-BkUkm6Al.d.ts +11 -0
  320. package/dist/index-Bo-ofFyg.d.ts +166 -0
  321. package/dist/{index-B1WJxt-n.d.ts → index-C-tFz2Yx.d.ts} +17 -7
  322. package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
  323. package/dist/{index-CqE4Bf3Q.d.ts → index-C732aNMY.d.ts} +18 -4
  324. package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
  325. package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
  326. package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
  327. package/dist/index-CKUfpmFL.d.ts +375 -0
  328. package/dist/{index-CL1T2j4y.d.ts → index-CL8JvxHW.d.ts} +3 -3
  329. package/dist/{index-IBAInumL.d.ts → index-CMme-xmL.d.ts} +19 -6
  330. package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
  331. package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
  332. package/dist/{index-B42oE_F-.d.ts → index-CT5OEUxd.d.ts} +17 -4
  333. package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
  334. package/dist/{index-Cde5JvtX.d.ts → index-CUVmtB5-.d.ts} +13 -6
  335. package/dist/{index-DXpSFlPG.d.ts → index-CWaSYtk9.d.ts} +4 -4
  336. package/dist/{index-CVn0GBdB.d.ts → index-Ca8VIE4l.d.ts} +1 -1
  337. package/dist/{index-Cyb9Du5Z.d.ts → index-CfR2Z0uG.d.ts} +1 -1
  338. package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
  339. package/dist/{index-hCpxKePE.d.ts → index-D5N9ikrS.d.ts} +1 -1
  340. package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
  341. package/dist/{index-i0tNFWfz.d.ts → index-D8lv2BiD.d.ts} +3 -1
  342. package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
  343. package/dist/{index-0QGtSf3r.d.ts → index-DFLPv9io.d.ts} +4 -3
  344. package/dist/{index-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
  345. package/dist/{index-D41_xqjs.d.ts → index-DTuhnqHb.d.ts} +16 -9
  346. package/dist/{index-B3Fomy15.d.ts → index-DbiZvj1P.d.ts} +4 -4
  347. package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
  348. package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
  349. package/dist/{index-BhpAUzUr.d.ts → index-Dy746dfn.d.ts} +1 -1
  350. package/dist/{index-GI9xIV9l.d.ts → index-JL4auphT.d.ts} +2 -2
  351. package/dist/{index-DVmgNb78.d.ts → index-TA1zVibb.d.ts} +4 -4
  352. package/dist/{index-DUaLJO7l.d.ts → index-UA93Im7H.d.ts} +155 -109
  353. package/dist/{index-COgrQZIL.d.ts → index-YKCx03zD.d.ts} +2 -2
  354. package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
  355. package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
  356. package/dist/{index-CICeEoZV.d.ts → index-pNtfr-RW.d.ts} +1 -1
  357. package/dist/{index-B4OOtNP8.d.ts → index-pYh4gqgl.d.ts} +1 -1
  358. package/dist/index.d.ts +81 -75
  359. package/dist/index.js +150 -136
  360. package/dist/inlineSize-BNe8wggI.js +66 -0
  361. package/dist/inputPresentation-BOyHkCDr.js +62 -0
  362. package/dist/interactionModality-ACpTMhak.js +44 -0
  363. package/dist/isApplePlatform-B1ju6F5B.js +27 -0
  364. package/dist/isRenderable-BnKHIqfd.js +21 -0
  365. package/dist/layerDepth-CNDh-IHb.js +181 -0
  366. package/dist/link-DuuA2eCL.js +30 -0
  367. package/dist/loadCatalog-CsZFr9dg.js +424 -0
  368. package/dist/loadCatalog-opk5hs94.d.ts +803 -0
  369. package/dist/locale/index.d.ts +2 -2
  370. package/dist/locale/index.js +4 -3
  371. package/dist/locale-D1Z3K290.js +343 -0
  372. package/dist/modalOutlet-CUOcrhIu.js +56 -0
  373. package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
  374. package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
  375. package/dist/protocol-DHxY0NI8.js +113 -0
  376. package/dist/protocol-DwUmpC5G.d.ts +240 -0
  377. package/dist/publicParser-B6XMcsB2.d.ts +141 -0
  378. package/dist/publicParser-DWUMCx7j.js +1437 -0
  379. package/dist/resizableChannel-3vivrEcT.js +20 -0
  380. package/dist/safeUrl-CsvfcZ9m.js +54 -0
  381. package/dist/scopedProvide-C-Df7c15.js +30 -0
  382. package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
  383. package/dist/scrollLock-C3aT4-0z.js +102 -0
  384. package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-DtyScdZs.js} +5 -14
  385. package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
  386. package/dist/slug-DAK6hdbr.js +17 -0
  387. package/dist/syntaxContext-DmIfNNtb.js +4 -0
  388. package/dist/triggerVariant-BsL8jMHs.js +16 -0
  389. package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
  390. package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
  391. package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
  392. package/dist/upstreamMap-ocuIRfI2.js +893 -0
  393. package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
  394. package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
  395. package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
  396. package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
  397. package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
  398. package/dist/{useIndicator-i1NORM7W.js → useIndicator-D9Y0dJsm.js} +5 -23
  399. package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
  400. package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-CWkCeMyX.js} +2 -2
  401. package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
  402. package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
  403. package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
  404. package/dist/useMenuHover-Djreu23i.js +170 -0
  405. package/dist/useMenuPress-8foxY8z4.js +764 -0
  406. package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
  407. package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
  408. package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
  409. package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
  410. package/dist/usePressFeedback-BJCpjEpv.js +319 -0
  411. package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
  412. package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
  413. package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
  414. package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
  415. package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
  416. package/dist/useScrollableArea-BE8b3qm7.js +222 -0
  417. package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
  418. package/dist/useTranslator-PEXMxDpv.js +35 -0
  419. package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
  420. package/dist/utils/index.d.ts +3 -0
  421. package/dist/utils/index.js +5 -0
  422. package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
  423. package/dist/utils-z3Q6BGIJ.js +819 -0
  424. package/locales/SOURCE.json +1 -1
  425. package/package.json +18 -2
  426. package/reset.css +364 -1
  427. package/styles/avatar-group.css +9 -1
  428. package/styles/badge.css +8 -5
  429. package/styles/banner.css +125 -26
  430. package/styles/blockquote.css +1 -0
  431. package/styles/bordered-control.css +1 -1
  432. package/styles/bottom-sheet.css +74 -6
  433. package/styles/breadcrumbs.css +16 -2
  434. package/styles/button-group.css +3 -1
  435. package/styles/button.css +53 -11
  436. package/styles/card.css +1 -1
  437. package/styles/chat.css +16 -6
  438. package/styles/checkbox-input.css +10 -0
  439. package/styles/clickable-card.css +10 -3
  440. package/styles/collapsible.css +12 -5
  441. package/styles/command-palette.css +29 -14
  442. package/styles/complex-selector.css +24 -5
  443. package/styles/context-menu.css +3 -3
  444. package/styles/date-input.css +111 -1
  445. package/styles/dialog-header.css +4 -1
  446. package/styles/dialog.css +7 -0
  447. package/styles/dropdown-menu.css +12 -3
  448. package/styles/field.css +5 -0
  449. package/styles/form-layout.css +1 -0
  450. package/styles/heading.css +18 -8
  451. package/styles/icon.css +9 -9
  452. package/styles/kbd.css +1 -1
  453. package/styles/layer.css +72 -0
  454. package/styles/list.css +9 -2
  455. package/styles/metadata-list.css +1 -0
  456. package/styles/mobile-nav.css +4 -1
  457. package/styles/multi-selector.css +48 -1
  458. package/styles/nav-item.css +9 -2
  459. package/styles/nav-menu.css +12 -2
  460. package/styles/number-input.css +9 -1
  461. package/styles/overflow-list.css +1 -1
  462. package/styles/popover.css +2 -1
  463. package/styles/power-search.css +5 -3
  464. package/styles/pressable.css +63 -22
  465. package/styles/progress-bar.css +15 -3
  466. package/styles/radio.css +16 -0
  467. package/styles/resize-handle.css +42 -0
  468. package/styles/segmented-control.css +12 -4
  469. package/styles/selector.css +53 -1
  470. package/styles/side-nav.css +19 -0
  471. package/styles/slider.css +4 -3
  472. package/styles/spinner.css +48 -42
  473. package/styles/stepper.css +58 -4
  474. package/styles/switch.css +26 -0
  475. package/styles/tab-list.css +132 -3
  476. package/styles/table.css +88 -11
  477. package/styles/text-area.css +7 -1
  478. package/styles/text-input.css +1 -1
  479. package/styles/text.css +6 -6
  480. package/styles/thumbnail.css +11 -3
  481. package/styles/time-input.css +8 -0
  482. package/styles/toast.css +37 -3
  483. package/styles/token.css +2 -2
  484. package/styles/tokenizer.css +1 -1
  485. package/styles/toolbar.css +4 -1
  486. package/styles/tree-list.css +1 -1
  487. package/styles/typeahead.css +34 -1
  488. package/styles.css +1 -0
  489. package/dist/Blockquote-DFqBv_oJ.js +0 -18
  490. package/dist/Breadcrumbs-DIm4figq.js +0 -141
  491. package/dist/ButtonGroup-ySQWanDP.js +0 -125
  492. package/dist/DateTimeInput-A7m2O3bg.js +0 -268
  493. package/dist/FieldIcon--NTgW5IU.js +0 -44
  494. package/dist/MultiSelector-BtAUfQ3t.js +0 -990
  495. package/dist/NumberInput-AZ9x3oja.js +0 -473
  496. package/dist/Selector-DJ2BhUTV.js +0 -677
  497. package/dist/Spinner-9cYUCnDy.js +0 -84
  498. package/dist/Theme-CtaUWo4g.js +0 -1246
  499. package/dist/Toast-BuqIZV5z.js +0 -322
  500. package/dist/context-4PuqD1Ic.js +0 -4
  501. package/dist/context-D5-MwxnN.js +0 -4
  502. package/dist/context-iABt_ueM.js +0 -976
  503. package/dist/index-BH9PzQ1F.d.ts +0 -87
  504. package/dist/link-C4_WogdF.js +0 -18
  505. package/dist/loadCatalog-BGHKG_9N.d.ts +0 -457
  506. package/dist/loadCatalog-CXKqEB9s.js +0 -877
  507. package/dist/locale-DgkZEMTn.js +0 -105
  508. package/dist/platform-B_9W_aHW.js +0 -33
  509. package/dist/scrollLock-BzIvIimL.js +0 -42
  510. package/dist/useMenuPress-D-FRNrBW.js +0 -573
  511. package/dist/useScrollableArea-DDk_CluT.js +0 -172
  512. /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
@@ -0,0 +1,1456 @@
1
+ import { n as useButtonTooltip } from "./Button-ONOoHdkg.js";
2
+ import { t as _sfc_main$2 } from "./ButtonTooltip-CNKOQHYR.js";
3
+ import { t as useAnnounce } from "./announce-B210eJVf.js";
4
+ import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
5
+ import { n as useDevWarning } from "./useDevWarning-DznOpOHT.js";
6
+ import { t as useDisclosureHandle } from "./useDisclosureHandle-Df3HhAfC.js";
7
+ import { a as isImeKeyEvent } from "./layerDepth-CNDh-IHb.js";
8
+ import { t as useFieldControlState } from "./useFieldControlState-voICDrys.js";
9
+ import { n as focusElement } from "./focus-l8jVTcqd.js";
10
+ import { n as isKeyboardModality, r as trackInteractionModality } from "./interactionModality-ACpTMhak.js";
11
+ import { t as _sfc_main$3 } from "./Icon-KDnUyY7f.js";
12
+ import { s as useAstryxMessages } from "./context-CM-cjGg_.js";
13
+ import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
14
+ import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
15
+ import { t as _sfc_main$4 } from "./BottomSheet-B4sc3F1S.js";
16
+ import { t as _sfc_main$5 } from "./Spinner-BY8iQz--.js";
17
+ import { t as useIndicator } from "./useIndicator-D9Y0dJsm.js";
18
+ import { t as _sfc_main$6 } from "./Field-JIxT3xCh.js";
19
+ import { n as useInputGroupContext } from "./context-IvbU9c3T.js";
20
+ import { t as useFieldPartStyling } from "./fieldParts--SyRZVQG.js";
21
+ import { n as fieldStatusPlacement, t as normalizeTriggerVariant } from "./triggerVariant-BsL8jMHs.js";
22
+ import { n as _sfc_main$7, t as searchResultMessage } from "./searchResultMessage-DtyScdZs.js";
23
+ import { t as _sfc_main$8 } from "./Token-DhsAtAH6.js";
24
+ import { n as useAnchoredListbox, t as scrollOptionIntoView } from "./useAnchoredListbox-DGxxKHZb.js";
25
+ import { n as OptionAction, r as isOptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-CkJcuvaU.js";
26
+ import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, onScopeDispose, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useAttrs, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
27
+ import "../styles/layer.css";
28
+ import "../styles/button.css";
29
+ import "../styles/visually-hidden-utility.css";
30
+ import "../styles/multi-selector.css";
31
+ //#region src/MultiSelector/options.ts
32
+ const SELECT_ALL_VALUE = "__astryx_select_all__";
33
+ function isDivider(option) {
34
+ return typeof option === "object" && option !== null && "type" in option && option.type === "divider";
35
+ }
36
+ function isSection(option) {
37
+ return typeof option === "object" && option !== null && "type" in option && option.type === "section";
38
+ }
39
+ function normalizeOption(option) {
40
+ if (typeof option === "string") return {
41
+ value: option,
42
+ label: option
43
+ };
44
+ return option;
45
+ }
46
+ function matches(option, query) {
47
+ if (query === "") return true;
48
+ return option.label.toLowerCase().includes(query) || (option.description?.toLowerCase().includes(query) ?? false);
49
+ }
50
+ /**
51
+ * 把字符串、对象、分隔线和分组收成渲染行。搜索时丢掉对不上的选项和因此变空的分组。
52
+ */
53
+ function flattenOptions(options, query) {
54
+ const normalizedQuery = query.trim().toLowerCase();
55
+ const rows = [];
56
+ let pendingDivider = false;
57
+ function pushDivider() {
58
+ if (!pendingDivider || rows.length === 0) return;
59
+ rows.push({
60
+ kind: "divider",
61
+ key: `divider-${rows.length}`
62
+ });
63
+ pendingDivider = false;
64
+ }
65
+ function pushOption(option, key) {
66
+ if (!matches(option, normalizedQuery)) return;
67
+ pushDivider();
68
+ rows.push({
69
+ kind: "option",
70
+ key,
71
+ option
72
+ });
73
+ }
74
+ options.forEach((option, index) => {
75
+ if (typeof option === "string") {
76
+ pushOption(normalizeOption(option), `option-${option}`);
77
+ return;
78
+ }
79
+ if (isDivider(option)) {
80
+ pendingDivider = true;
81
+ return;
82
+ }
83
+ if (isSection(option)) {
84
+ const children = option.options.map(normalizeOption).filter((item) => matches(item, normalizedQuery));
85
+ if (children.length === 0) return;
86
+ pendingDivider = rows.length > 0;
87
+ pushDivider();
88
+ rows.push({
89
+ kind: "heading",
90
+ key: `heading-${option.label}-${index}`,
91
+ label: option.label
92
+ });
93
+ for (const child of children) rows.push({
94
+ kind: "option",
95
+ key: `${option.label}-${String(child.value)}`,
96
+ option: child
97
+ });
98
+ return;
99
+ }
100
+ pushOption(option, `option-${String(option.value)}`);
101
+ });
102
+ return rows;
103
+ }
104
+ //#endregion
105
+ //#region src/MultiSelector/MultiSelectorPanel.vue
106
+ const _hoisted_1$1 = ["data-keyboard-focus"];
107
+ const _hoisted_2$1 = [
108
+ "id",
109
+ "aria-label",
110
+ "aria-controls",
111
+ "aria-activedescendant",
112
+ "placeholder",
113
+ "value"
114
+ ];
115
+ const _hoisted_3$1 = ["aria-label"];
116
+ const _hoisted_4$1 = ["id", "data-option-id"];
117
+ const _hoisted_5$1 = { class: "astryx-multi-selector-option-label" };
118
+ const _hoisted_6$1 = ["id", "data-option-id"];
119
+ const _hoisted_7$1 = { class: "astryx-multi-selector-option-label" };
120
+ const _hoisted_8$1 = ["id"];
121
+ const _hoisted_9$1 = [
122
+ "id",
123
+ "aria-selected",
124
+ "data-option-id"
125
+ ];
126
+ const _hoisted_10$1 = { class: "astryx-multi-selector-option-label" };
127
+ const _hoisted_11$1 = ["aria-selected"];
128
+ const _hoisted_12$1 = ["id", "data-option-id"];
129
+ const _hoisted_13 = { class: "astryx-multi-selector-option-label" };
130
+ const _hoisted_14 = ["id"];
131
+ const _hoisted_15 = {
132
+ key: 0,
133
+ class: "astryx-multi-selector-divider",
134
+ role: "separator"
135
+ };
136
+ const _hoisted_16 = {
137
+ key: 1,
138
+ class: "astryx-multi-selector-heading",
139
+ role: "presentation"
140
+ };
141
+ const _hoisted_17 = ["aria-label"];
142
+ const _hoisted_18 = { "aria-hidden": "true" };
143
+ const _hoisted_19 = [
144
+ "id",
145
+ "aria-selected",
146
+ "aria-disabled",
147
+ "data-option-id",
148
+ "onMouseenter",
149
+ "onClick"
150
+ ];
151
+ const _hoisted_20 = { class: "astryx-multi-selector-option-copy" };
152
+ const _hoisted_21 = { class: "astryx-multi-selector-option-label" };
153
+ const _hoisted_22 = {
154
+ key: 0,
155
+ class: "astryx-multi-selector-option-description"
156
+ };
157
+ const _hoisted_23 = ["aria-selected", "aria-disabled"];
158
+ const _hoisted_24 = [
159
+ "id",
160
+ "data-option-id",
161
+ "onMouseenter",
162
+ "onClick"
163
+ ];
164
+ const _hoisted_25 = { class: "astryx-multi-selector-option-copy" };
165
+ const _hoisted_26 = { class: "astryx-multi-selector-option-label" };
166
+ const _hoisted_27 = {
167
+ key: 0,
168
+ class: "astryx-multi-selector-option-description"
169
+ };
170
+ const _hoisted_28 = ["id"];
171
+ const _hoisted_29 = {
172
+ key: 6,
173
+ class: "astryx-multi-selector-empty",
174
+ role: "presentation"
175
+ };
176
+ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
177
+ name: "AstryxMultiSelectorPanel",
178
+ __name: "MultiSelectorPanel",
179
+ props: {
180
+ searchable: { type: Boolean },
181
+ query: {},
182
+ searchId: {},
183
+ searchPlaceholder: {},
184
+ clearLabel: {},
185
+ listboxId: {},
186
+ activeIndex: {},
187
+ activeDescendant: {},
188
+ grid: { type: Boolean },
189
+ actionIndex: {},
190
+ createOption: {},
191
+ selectAll: { type: Boolean },
192
+ selectAllIndex: {},
193
+ selectAllLabel: {},
194
+ selectAllState: {},
195
+ checkboxPosition: {},
196
+ size: {},
197
+ loading: { type: Boolean },
198
+ realMatchCount: {},
199
+ rows: {},
200
+ showEmpty: { type: Boolean },
201
+ emptyText: {},
202
+ emptySearchText: {},
203
+ searchKeyboardFocus: { type: Boolean },
204
+ mark: {},
205
+ isSelected: { type: Function },
206
+ checkboxState: { type: Function },
207
+ optionIndex: { type: Function },
208
+ optionDomId: { type: Function },
209
+ actionDomId: { type: Function }
210
+ },
211
+ emits: [
212
+ "query",
213
+ "keydown",
214
+ "clearQuery",
215
+ "searchFocus",
216
+ "searchBlur",
217
+ "toggle",
218
+ "highlight"
219
+ ],
220
+ setup(__props, { expose: __expose, emit: __emit }) {
221
+ const props = __props;
222
+ const emit = __emit;
223
+ const searchRef = useTemplateRef("searchRef");
224
+ const markSize = computed(() => props.size === "lg" ? "md" : "sm");
225
+ __expose({
226
+ focusSearch: () => searchRef.value?.focus(),
227
+ searchInput: searchRef
228
+ });
229
+ function actionOf(option) {
230
+ return option?.action;
231
+ }
232
+ return (_ctx, _cache) => {
233
+ return openBlock(), createElementBlock("div", null, [
234
+ __props.searchable ? (openBlock(), createElementBlock("div", {
235
+ key: 0,
236
+ class: "astryx-multi-selector-search",
237
+ "data-keyboard-focus": __props.searchKeyboardFocus ? "true" : void 0
238
+ }, [
239
+ createVNode(_sfc_main$3, {
240
+ class: "astryx-multi-selector-search-icon",
241
+ icon: "search",
242
+ size: "sm"
243
+ }),
244
+ createElementVNode("input", {
245
+ id: __props.searchId,
246
+ ref_key: "searchRef",
247
+ ref: searchRef,
248
+ class: "astryx-multi-selector-search-input",
249
+ type: "text",
250
+ role: "combobox",
251
+ autocomplete: "off",
252
+ "aria-label": __props.searchPlaceholder,
253
+ "aria-expanded": "true",
254
+ "aria-controls": __props.listboxId,
255
+ "aria-autocomplete": "list",
256
+ "aria-activedescendant": __props.activeDescendant,
257
+ placeholder: __props.searchPlaceholder,
258
+ value: __props.query,
259
+ onInput: _cache[0] || (_cache[0] = ($event) => emit("query", $event)),
260
+ onFocus: _cache[1] || (_cache[1] = ($event) => emit("searchFocus")),
261
+ onBlur: _cache[2] || (_cache[2] = ($event) => emit("searchBlur")),
262
+ onKeydown: _cache[3] || (_cache[3] = ($event) => emit("keydown", $event))
263
+ }, null, 40, _hoisted_2$1),
264
+ __props.query ? (openBlock(), createElementBlock("button", {
265
+ key: 0,
266
+ type: "button",
267
+ class: "astryx-multi-selector-search-clear",
268
+ "aria-label": __props.clearLabel,
269
+ onClick: _cache[4] || (_cache[4] = withModifiers(($event) => emit("clearQuery"), ["stop"]))
270
+ }, [createVNode(_sfc_main$3, {
271
+ icon: "close",
272
+ size: "sm"
273
+ })], 8, _hoisted_3$1)) : createCommentVNode("v-if", true)
274
+ ], 8, _hoisted_1$1)) : createCommentVNode("v-if", true),
275
+ createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 创建行不进 Tab 序,方向键和回车由组合框处理。 "),
276
+ __props.createOption && !__props.grid ? (openBlock(), createElementBlock("div", {
277
+ key: 1,
278
+ id: __props.optionDomId(0),
279
+ class: normalizeClass(["astryx-multi-selector-option is-create", { "is-active": __props.activeIndex === 0 }]),
280
+ role: "option",
281
+ "aria-selected": false,
282
+ "data-option-id": String(__props.createOption.value),
283
+ tabindex: "-1",
284
+ onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {}, ["prevent"])),
285
+ onMouseenter: _cache[6] || (_cache[6] = ($event) => emit("highlight", 0)),
286
+ onClick: _cache[7] || (_cache[7] = ($event) => emit("toggle", __props.createOption.value))
287
+ }, [createElementVNode("span", _hoisted_5$1, toDisplayString(__props.createOption.label), 1)], 42, _hoisted_4$1)) : __props.createOption ? (openBlock(), createElementBlock("div", {
288
+ key: 2,
289
+ class: normalizeClass(["astryx-multi-selector-option is-create", { "is-active": __props.activeIndex === 0 }]),
290
+ role: "row",
291
+ "aria-selected": false
292
+ }, [
293
+ createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 创建行不进 Tab 序,方向键和回车由组合框处理。 "),
294
+ createElementVNode("div", {
295
+ id: __props.optionDomId(0),
296
+ class: "astryx-multi-selector-option-main",
297
+ role: "gridcell",
298
+ tabindex: "-1",
299
+ "data-option-id": String(__props.createOption.value),
300
+ onMousedown: _cache[8] || (_cache[8] = withModifiers(() => {}, ["prevent"])),
301
+ onMouseenter: _cache[9] || (_cache[9] = ($event) => emit("highlight", 0)),
302
+ onClick: _cache[10] || (_cache[10] = ($event) => emit("toggle", __props.createOption.value))
303
+ }, [createElementVNode("span", _hoisted_7$1, toDisplayString(__props.createOption.label), 1)], 40, _hoisted_6$1),
304
+ createElementVNode("div", {
305
+ id: __props.actionDomId(0),
306
+ class: "astryx-multi-selector-option-action",
307
+ role: "gridcell"
308
+ }, null, 8, _hoisted_8$1)
309
+ ], 2)) : createCommentVNode("v-if", true),
310
+ createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 全选行不进 Tab 序,方向键和空格由组合框处理。 "),
311
+ __props.selectAll && !__props.loading && __props.realMatchCount > 0 && !__props.grid ? (openBlock(), createElementBlock("div", {
312
+ key: 3,
313
+ id: __props.optionDomId(__props.selectAllIndex),
314
+ class: normalizeClass(["astryx-multi-selector-option is-select-all", { "is-active": __props.activeIndex === __props.selectAllIndex }]),
315
+ role: "option",
316
+ "aria-selected": __props.selectAllState === "checked",
317
+ "data-option-id": unref(SELECT_ALL_VALUE),
318
+ tabindex: "-1",
319
+ onMousedown: _cache[11] || (_cache[11] = withModifiers(() => {}, ["prevent"])),
320
+ onMouseenter: _cache[12] || (_cache[12] = ($event) => emit("highlight", __props.selectAllIndex)),
321
+ onClick: _cache[13] || (_cache[13] = ($event) => emit("toggle", unref("__astryx_select_all__")))
322
+ }, [
323
+ __props.checkboxPosition === "start" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
324
+ key: 0,
325
+ state: __props.selectAllState,
326
+ size: markSize.value
327
+ }, null, 8, ["state", "size"])) : createCommentVNode("v-if", true),
328
+ createElementVNode("span", _hoisted_10$1, toDisplayString(__props.selectAllLabel), 1),
329
+ __props.checkboxPosition === "end" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
330
+ key: 1,
331
+ state: __props.selectAllState,
332
+ size: markSize.value
333
+ }, null, 8, ["state", "size"])) : createCommentVNode("v-if", true)
334
+ ], 42, _hoisted_9$1)) : __props.selectAll && !__props.loading && __props.realMatchCount > 0 ? (openBlock(), createElementBlock("div", {
335
+ key: 4,
336
+ class: normalizeClass(["astryx-multi-selector-option is-select-all", { "is-active": __props.activeIndex === __props.selectAllIndex }]),
337
+ role: "row",
338
+ "aria-selected": __props.selectAllState === "checked"
339
+ }, [
340
+ createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 全选行不进 Tab 序,方向键和空格由组合框处理。 "),
341
+ createElementVNode("div", {
342
+ id: __props.optionDomId(__props.selectAllIndex),
343
+ class: "astryx-multi-selector-option-main",
344
+ role: "gridcell",
345
+ tabindex: "-1",
346
+ "data-option-id": unref(SELECT_ALL_VALUE),
347
+ onMousedown: _cache[14] || (_cache[14] = withModifiers(() => {}, ["prevent"])),
348
+ onMouseenter: _cache[15] || (_cache[15] = ($event) => emit("highlight", __props.selectAllIndex)),
349
+ onClick: _cache[16] || (_cache[16] = ($event) => emit("toggle", unref("__astryx_select_all__")))
350
+ }, [
351
+ __props.checkboxPosition === "start" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
352
+ key: 0,
353
+ state: __props.selectAllState,
354
+ size: markSize.value
355
+ }, null, 8, ["state", "size"])) : createCommentVNode("v-if", true),
356
+ createElementVNode("span", _hoisted_13, toDisplayString(__props.selectAllLabel), 1),
357
+ __props.checkboxPosition === "end" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
358
+ key: 1,
359
+ state: __props.selectAllState,
360
+ size: markSize.value
361
+ }, null, 8, ["state", "size"])) : createCommentVNode("v-if", true)
362
+ ], 40, _hoisted_12$1),
363
+ createElementVNode("div", {
364
+ id: __props.actionDomId(__props.selectAllIndex),
365
+ class: "astryx-multi-selector-option-action",
366
+ role: "gridcell"
367
+ }, null, 8, _hoisted_14)
368
+ ], 10, _hoisted_11$1)) : createCommentVNode("v-if", true),
369
+ !__props.loading ? (openBlock(true), createElementBlock(Fragment, { key: 5 }, renderList(__props.rows, (row) => {
370
+ return openBlock(), createElementBlock(Fragment, { key: row.key }, [row.kind === "divider" ? (openBlock(), createElementBlock("div", _hoisted_15)) : row.kind === "heading" && !__props.grid ? (openBlock(), createElementBlock("div", _hoisted_16, toDisplayString(row.label), 1)) : row.kind === "heading" ? (openBlock(), createElementBlock("div", {
371
+ key: 2,
372
+ class: "astryx-multi-selector-heading",
373
+ role: "rowgroup",
374
+ "aria-label": row.label
375
+ }, [createElementVNode("span", _hoisted_18, toDisplayString(row.label), 1)], 8, _hoisted_17)) : row.option && !__props.grid ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 选项不进 Tab 序,方向键和空格由组合框处理。 "), createElementVNode("div", {
376
+ id: __props.optionDomId(__props.optionIndex(row.option.value)),
377
+ class: normalizeClass(["astryx-multi-selector-option", {
378
+ "is-active": __props.optionIndex(row.option.value) === __props.activeIndex,
379
+ "is-disabled": row.option.disabled
380
+ }]),
381
+ role: "option",
382
+ "aria-selected": __props.isSelected(row.option.value),
383
+ "aria-disabled": row.option.disabled || void 0,
384
+ "data-option-id": String(row.option.value),
385
+ tabindex: "-1",
386
+ onMousedown: _cache[17] || (_cache[17] = withModifiers(() => {}, ["prevent"])),
387
+ onMouseenter: ($event) => emit("highlight", __props.optionIndex(row.option.value)),
388
+ onClick: ($event) => emit("toggle", row.option.value)
389
+ }, [
390
+ __props.checkboxPosition === "start" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
391
+ key: 0,
392
+ state: __props.checkboxState(row.option),
393
+ size: markSize.value,
394
+ "is-disabled": row.option.disabled
395
+ }, null, 8, [
396
+ "state",
397
+ "size",
398
+ "is-disabled"
399
+ ])) : createCommentVNode("v-if", true),
400
+ createElementVNode("span", _hoisted_20, [_ctx.$slots.option ? renderSlot(_ctx.$slots, "option", {
401
+ option: row.option,
402
+ selected: __props.isSelected(row.option.value),
403
+ active: __props.optionIndex(row.option.value) === __props.activeIndex
404
+ }, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("span", _hoisted_21, toDisplayString(row.option.label), 1), row.option.description ? (openBlock(), createElementBlock("span", _hoisted_22, toDisplayString(row.option.description), 1)) : createCommentVNode("v-if", true)], 64))]),
405
+ __props.checkboxPosition === "end" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
406
+ key: 1,
407
+ state: __props.checkboxState(row.option),
408
+ size: markSize.value,
409
+ "is-disabled": row.option.disabled
410
+ }, null, 8, [
411
+ "state",
412
+ "size",
413
+ "is-disabled"
414
+ ])) : createCommentVNode("v-if", true)
415
+ ], 42, _hoisted_19)], 2112)) : row.option ? (openBlock(), createElementBlock("div", {
416
+ key: 4,
417
+ class: normalizeClass(["astryx-multi-selector-option", {
418
+ "is-active": __props.optionIndex(row.option.value) === __props.activeIndex,
419
+ "is-disabled": row.option.disabled
420
+ }]),
421
+ role: "row",
422
+ "aria-selected": __props.isSelected(row.option.value),
423
+ "aria-disabled": row.option.disabled || void 0
424
+ }, [
425
+ createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/mouse-events-have-key-events -- 选项不进 Tab 序,方向键和空格由组合框处理。 "),
426
+ createElementVNode("div", {
427
+ id: __props.optionDomId(__props.optionIndex(row.option.value)),
428
+ class: "astryx-multi-selector-option-main",
429
+ role: "gridcell",
430
+ tabindex: "-1",
431
+ "data-option-id": String(row.option.value),
432
+ onMousedown: _cache[18] || (_cache[18] = withModifiers(() => {}, ["prevent"])),
433
+ onMouseenter: ($event) => emit("highlight", __props.optionIndex(row.option.value)),
434
+ onClick: ($event) => emit("toggle", row.option.value)
435
+ }, [
436
+ __props.checkboxPosition === "start" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
437
+ key: 0,
438
+ state: __props.checkboxState(row.option),
439
+ size: markSize.value,
440
+ "is-disabled": row.option.disabled
441
+ }, null, 8, [
442
+ "state",
443
+ "size",
444
+ "is-disabled"
445
+ ])) : createCommentVNode("v-if", true),
446
+ createElementVNode("span", _hoisted_25, [_ctx.$slots.option ? renderSlot(_ctx.$slots, "option", {
447
+ option: row.option,
448
+ selected: __props.isSelected(row.option.value),
449
+ active: __props.optionIndex(row.option.value) === __props.activeIndex
450
+ }, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("span", _hoisted_26, toDisplayString(row.option.label), 1), row.option.description ? (openBlock(), createElementBlock("span", _hoisted_27, toDisplayString(row.option.description), 1)) : createCommentVNode("v-if", true)], 64))]),
451
+ __props.checkboxPosition === "end" ? (openBlock(), createBlock(resolveDynamicComponent(__props.mark), {
452
+ key: 1,
453
+ state: __props.checkboxState(row.option),
454
+ size: markSize.value,
455
+ "is-disabled": row.option.disabled
456
+ }, null, 8, [
457
+ "state",
458
+ "size",
459
+ "is-disabled"
460
+ ])) : createCommentVNode("v-if", true)
461
+ ], 40, _hoisted_24),
462
+ createElementVNode("div", {
463
+ id: unref(isOptionAction)(actionOf(row.option)) ? void 0 : __props.actionDomId(__props.optionIndex(row.option.value)),
464
+ class: normalizeClass(["astryx-multi-selector-option-action", { "is-active": __props.actionIndex === __props.optionIndex(row.option.value) }]),
465
+ role: "gridcell",
466
+ onMousedown: _cache[19] || (_cache[19] = withModifiers(() => {}, ["stop"])),
467
+ onClick: _cache[20] || (_cache[20] = withModifiers(() => {}, ["stop"]))
468
+ }, [unref(isOptionAction)(actionOf(row.option)) ? (openBlock(), createBlock(unref(OptionAction), {
469
+ key: 0,
470
+ node: actionOf(row.option),
471
+ "dom-id": __props.actionDomId(__props.optionIndex(row.option.value))
472
+ }, null, 8, ["node", "dom-id"])) : createCommentVNode("v-if", true)], 42, _hoisted_28)
473
+ ], 10, _hoisted_23)) : createCommentVNode("v-if", true)], 64);
474
+ }), 128)) : createCommentVNode("v-if", true),
475
+ __props.showEmpty ? (openBlock(), createElementBlock("div", _hoisted_29, [!__props.query.trim() ? renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(__props.emptyText), 1)], void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.emptySearchText), 1)], 64))])) : createCommentVNode("v-if", true)
476
+ ]);
477
+ };
478
+ }
479
+ });
480
+ //#endregion
481
+ //#region src/MultiSelector/createOption.ts
482
+ /** 创建行的值永远不是真实选项。选中它会走创建,而不是切换勾选。 */
483
+ const CREATE_VALUE_PREFIX = "__astryx_multi_selector_create__";
484
+ function createOptionValue(query) {
485
+ return `${CREATE_VALUE_PREFIX}${query}`;
486
+ }
487
+ function readCreateQuery(value) {
488
+ if (typeof value !== "string" || !value.startsWith("__astryx_multi_selector_create__")) return null;
489
+ return value.slice(32);
490
+ }
491
+ /**
492
+ * 输入去掉首尾空白后,和任何选项标签都不相同(忽略大小写)时,返回可以创建的文本。
493
+ * 空字符串、加载中、没开搜索,都不提供创建行。
494
+ */
495
+ function resolveCreateQuery(input) {
496
+ if (!input.enabled) return null;
497
+ const trimmed = input.query.trim();
498
+ if (trimmed === "") return null;
499
+ const wanted = trimmed.toLowerCase();
500
+ return input.labels.some((label) => label.toLowerCase() === wanted) ? null : trimmed;
501
+ }
502
+ //#endregion
503
+ //#region src/MultiSelector/multiSelectorKeyboard.ts
504
+ /** 多选面板的按键。输入法组合期间不处理。调用方要先放行选项操作那一列。 */
505
+ function applyMultiSelectorKey(event, ctx) {
506
+ if (!ctx.canActivate) return;
507
+ const searchInput = ctx.searchable && event.target instanceof HTMLInputElement;
508
+ switch (event.key) {
509
+ case "ArrowDown":
510
+ event.preventDefault();
511
+ if (!ctx.isOpen) ctx.open();
512
+ else ctx.highlightNext();
513
+ break;
514
+ case "ArrowUp":
515
+ event.preventDefault();
516
+ if (!ctx.isOpen) {
517
+ ctx.open();
518
+ ctx.highlightLast();
519
+ } else ctx.highlightPrevious();
520
+ break;
521
+ case "Home":
522
+ if (!searchInput && ctx.isOpen) {
523
+ event.preventDefault();
524
+ ctx.highlightFirst();
525
+ }
526
+ break;
527
+ case "End":
528
+ if (!searchInput && ctx.isOpen) {
529
+ event.preventDefault();
530
+ ctx.highlightLast();
531
+ }
532
+ break;
533
+ case "PageUp":
534
+ if (ctx.isOpen) {
535
+ event.preventDefault();
536
+ ctx.highlightFirst();
537
+ }
538
+ break;
539
+ case "PageDown":
540
+ if (ctx.isOpen) {
541
+ event.preventDefault();
542
+ ctx.highlightLast();
543
+ }
544
+ break;
545
+ case "Enter":
546
+ case " ":
547
+ if (event.key === " " && searchInput) break;
548
+ event.preventDefault();
549
+ if (ctx.isOpen && ctx.activeIndex >= 0) {
550
+ const option = ctx.optionAt(ctx.activeIndex);
551
+ if (option && !option.disabled) ctx.toggleValue(option.value);
552
+ } else if (ctx.isOpen && ctx.createQuery != null) ctx.commitCreate(ctx.createQuery);
553
+ else if (!ctx.isOpen) ctx.open();
554
+ break;
555
+ case "Escape":
556
+ if (ctx.isOpen) {
557
+ event.preventDefault();
558
+ ctx.close();
559
+ ctx.focusTrigger();
560
+ }
561
+ break;
562
+ case "Tab":
563
+ if (ctx.isOpen) ctx.close();
564
+ break;
565
+ case "Backspace":
566
+ case "Delete":
567
+ if (!searchInput && !ctx.isOpen && ctx.selectedCount > 0) {
568
+ event.preventDefault();
569
+ ctx.clearSelection();
570
+ }
571
+ break;
572
+ default: if (!searchInput && event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
573
+ event.preventDefault();
574
+ if (!ctx.isOpen) ctx.open();
575
+ ctx.jumpToMatch(event.key);
576
+ }
577
+ }
578
+ }
579
+ //#endregion
580
+ //#region src/MultiSelector/useMultiSelectorMenu.ts
581
+ /** 多选面板的列表、创建行和选项操作。触发器自己的展示留在组件里。 */
582
+ function useMultiSelectorMenu(host) {
583
+ const query = ref("");
584
+ const selectedValues = computed(() => host.props.modelValue ?? []);
585
+ const searchPlaceholder = computed(() => host.props.searchPlaceholder ?? host.messages.value.multiSelector.search);
586
+ const selectAllLabel = computed(() => host.props.selectAllLabel ?? host.messages.value.multiSelector.selectAll);
587
+ const emptyText = computed(() => host.props.emptyText ?? host.messages.value.multiSelector.empty);
588
+ const emptySearchText = computed(() => host.props.emptySearchText ?? host.messages.value.multiSelector.emptySearch);
589
+ const rows = computed(() => flattenOptions(host.props.options, query.value));
590
+ const optionByValue = computed(() => {
591
+ const map = /* @__PURE__ */ new Map();
592
+ for (const row of flattenOptions(host.props.options, "")) if (row.kind === "option" && row.option) map.set(row.option.value, row.option);
593
+ return map;
594
+ });
595
+ const createQuery = computed(() => resolveCreateQuery({
596
+ enabled: host.props.hasCreate === true && host.props.searchable === true && !host.isLoading.value,
597
+ query: query.value,
598
+ labels: [...optionByValue.value.values()].map((option) => option.label)
599
+ }));
600
+ const createOption = computed(() => {
601
+ if (createQuery.value == null) return null;
602
+ return {
603
+ value: createOptionValue(createQuery.value),
604
+ label: host.messages.value.multiSelector.create(createQuery.value)
605
+ };
606
+ });
607
+ const selectable = computed(() => {
608
+ const items = rows.value.flatMap((row) => row.kind === "option" && row.option ? [row.option] : []);
609
+ const head = [];
610
+ if (createOption.value) head.push(createOption.value);
611
+ if (host.props.selectAll) head.push({
612
+ value: SELECT_ALL_VALUE,
613
+ label: selectAllLabel.value
614
+ });
615
+ return [...head, ...items];
616
+ });
617
+ const comboboxOptions = computed(() => selectable.value.map((option) => ({
618
+ value: option.value,
619
+ label: option.label,
620
+ disabled: option.disabled ?? false,
621
+ description: option.description
622
+ })));
623
+ const dummyValue = ref(null);
624
+ let openingFromMount = false;
625
+ const selectAllIndex = computed(() => host.props.selectAll ? createOption.value ? 1 : 0 : -1);
626
+ const combobox = useCombobox({
627
+ options: comboboxOptions,
628
+ modelValue: dummyValue,
629
+ isEnabled: host.canActivate,
630
+ isSearchable: ref(false),
631
+ onChange: () => {},
632
+ onOpenChange: (isOpen) => {
633
+ host.emitOpenChange(isOpen);
634
+ if (isOpen && host.props.searchable && !openingFromMount) nextTick(() => host.getSearchInput()?.focus());
635
+ if (!isOpen) query.value = "";
636
+ }
637
+ });
638
+ const selectedOptions = computed(() => selectedValues.value.flatMap((value) => {
639
+ const option = optionByValue.value.get(value);
640
+ return option ? [option] : [];
641
+ }));
642
+ const enabledValues = computed(() => selectable.value.filter((option) => option.value !== "__astryx_select_all__" && readCreateQuery(option.value) == null && !option.disabled).map((option) => option.value));
643
+ const selectedEnabledCount = computed(() => enabledValues.value.filter((value) => selectedValues.value.includes(value)).length);
644
+ const selectAllState = computed(() => {
645
+ if (selectedEnabledCount.value === 0) return "unchecked";
646
+ if (selectedEnabledCount.value === enabledValues.value.length) return "checked";
647
+ return "indeterminate";
648
+ });
649
+ const realMatchCount = computed(() => rows.value.filter((row) => row.kind === "option").length);
650
+ const showEmpty = computed(() => !host.isLoading.value && realMatchCount.value === 0 && createOption.value == null);
651
+ const announcement = computed(() => searchResultMessage({
652
+ isOpen: combobox.isOpen.value,
653
+ isLoading: host.isLoading.value,
654
+ query: query.value,
655
+ matchCount: realMatchCount.value,
656
+ hasCreateRow: createOption.value != null,
657
+ emptyText: emptyText.value,
658
+ emptySearchText: emptySearchText.value,
659
+ resultCount: host.messages.value.multiSelector.resultCount
660
+ }));
661
+ const gridLatched = ref(false);
662
+ watch(optionByValue, (map) => {
663
+ if ([...map.values()].some((option) => isOptionAction(option.action))) gridLatched.value = true;
664
+ }, { immediate: true });
665
+ const gridMode = computed(() => gridLatched.value);
666
+ function optionDomId(index) {
667
+ return `${host.listboxId}-option-${index}`;
668
+ }
669
+ function actionDomId(index) {
670
+ return `${host.listboxId}-action-${index}`;
671
+ }
672
+ function rowHasAction(index) {
673
+ const option = selectable.value[index];
674
+ if (option == null) return false;
675
+ return isOptionAction(optionByValue.value.get(option.value)?.action);
676
+ }
677
+ const actionGrid = useOptionActionGrid({
678
+ enabled: () => gridMode.value,
679
+ isOpen: () => combobox.isOpen.value,
680
+ activeIndex: combobox.activeIndex,
681
+ rowHasAction,
682
+ getListbox: () => host.listboxRef.value,
683
+ optionId: optionDomId,
684
+ actionId: actionDomId
685
+ });
686
+ const popupKind = computed(() => {
687
+ if (host.props.presentation === "bottom-sheet") return "dialog";
688
+ return gridMode.value ? "grid" : "listbox";
689
+ });
690
+ watch(query, (value) => {
691
+ host.emitSearch(value);
692
+ if (combobox.isOpen.value) combobox.highlightFirst();
693
+ });
694
+ watch(announcement, (message) => {
695
+ if (message) host.announce(message);
696
+ });
697
+ watch(() => [host.props.hasCreate, host.props.searchable], ([create, search]) => {
698
+ const dev = import.meta.env?.DEV === true;
699
+ if (create && !search && dev) console.warn("[MultiSelector] hasCreate 需要同时开启 searchable,否则不会出现创建行。");
700
+ }, { immediate: true });
701
+ watch(() => combobox.activeIndex.value, (index) => {
702
+ if (!combobox.isOpen.value || index < 0) return;
703
+ const option = selectable.value[index];
704
+ nextTick(() => scrollOptionIntoView(host.listboxRef.value, option ? String(option.value) : void 0));
705
+ });
706
+ function commit(next, change) {
707
+ host.emitUpdate(next);
708
+ host.emitChange(next, change);
709
+ }
710
+ function commitCreate(created) {
711
+ commit([...selectedValues.value, created], {
712
+ type: "create",
713
+ query: created
714
+ });
715
+ host.announce(host.messages.value.multiSelector.created(created));
716
+ query.value = "";
717
+ }
718
+ function isSelected(value) {
719
+ return selectedValues.value.includes(value);
720
+ }
721
+ function toggleValue(value) {
722
+ if (!host.canActivate.value || host.isLoading.value) return;
723
+ const created = readCreateQuery(value);
724
+ if (created != null) {
725
+ commitCreate(created);
726
+ return;
727
+ }
728
+ if (value === "__astryx_select_all__") {
729
+ const allOn = selectAllState.value === "checked";
730
+ const enabled = new Set(enabledValues.value);
731
+ commit(allOn ? selectedValues.value.filter((item) => !enabled.has(item)) : [.../* @__PURE__ */ new Set([...selectedValues.value, ...enabledValues.value])]);
732
+ return;
733
+ }
734
+ if (optionByValue.value.get(value)?.disabled) return;
735
+ commit(isSelected(value) ? selectedValues.value.filter((item) => item !== value) : [...selectedValues.value, value]);
736
+ }
737
+ function optionIndex(value) {
738
+ return selectable.value.findIndex((option) => option.value === value);
739
+ }
740
+ function highlight(index) {
741
+ const option = selectable.value[index];
742
+ if (option && !option.disabled) combobox.activeIndex.value = index;
743
+ }
744
+ function checkboxState(option) {
745
+ if (option.value === "__astryx_select_all__") return selectAllState.value;
746
+ return isSelected(option.value) ? "checked" : "unchecked";
747
+ }
748
+ function onKeyDown(event) {
749
+ if (isImeKeyEvent(event) || event.isComposing) return;
750
+ if (actionGrid.onKeyDown(event)) return;
751
+ applyMultiSelectorKey(event, {
752
+ canActivate: host.canActivate.value,
753
+ searchable: host.props.searchable === true,
754
+ isOpen: combobox.isOpen.value,
755
+ activeIndex: combobox.activeIndex.value,
756
+ createQuery: createQuery.value,
757
+ selectedCount: selectedValues.value.length,
758
+ optionAt: (index) => selectable.value[index],
759
+ open: () => combobox.open(),
760
+ close: () => combobox.close(),
761
+ highlightNext: () => combobox.highlightNext(),
762
+ highlightPrevious: () => combobox.highlightPrevious(),
763
+ highlightFirst: () => combobox.highlightFirst(),
764
+ highlightLast: () => combobox.highlightLast(),
765
+ jumpToMatch: (char) => combobox.jumpToMatch(char),
766
+ toggleValue,
767
+ commitCreate,
768
+ clearSelection: () => commit([]),
769
+ focusTrigger: host.focusTrigger
770
+ });
771
+ }
772
+ function openFromMount() {
773
+ openingFromMount = true;
774
+ if (host.canActivate.value) combobox.open();
775
+ openingFromMount = false;
776
+ }
777
+ function onSearchInput(event) {
778
+ query.value = event.target.value;
779
+ }
780
+ return {
781
+ query,
782
+ combobox,
783
+ rows,
784
+ createOption,
785
+ selectAllIndex,
786
+ selectAllLabel,
787
+ selectAllState,
788
+ selectedValues,
789
+ selectedOptions,
790
+ realMatchCount,
791
+ showEmpty,
792
+ emptyText,
793
+ emptySearchText,
794
+ searchPlaceholder,
795
+ gridMode,
796
+ actionGrid,
797
+ popupKind,
798
+ optionDomId,
799
+ optionIndex,
800
+ isSelected,
801
+ toggleValue,
802
+ highlight,
803
+ checkboxState,
804
+ commit,
805
+ onKeyDown,
806
+ onSearchInput,
807
+ openFromMount,
808
+ open: () => {
809
+ if (host.canActivate.value) combobox.open();
810
+ },
811
+ close: () => combobox.close()
812
+ };
813
+ }
814
+ //#endregion
815
+ //#region src/MultiSelector/MultiSelector.vue
816
+ const _hoisted_1 = ["data-variant"];
817
+ const _hoisted_2 = {
818
+ key: 0,
819
+ class: "astryx-multi-selector-icon",
820
+ "aria-hidden": "true"
821
+ };
822
+ const _hoisted_3 = [
823
+ "disabled",
824
+ "aria-disabled",
825
+ "aria-readonly",
826
+ "aria-busy",
827
+ "role",
828
+ "aria-haspopup",
829
+ "aria-expanded",
830
+ "aria-controls",
831
+ "aria-autocomplete",
832
+ "aria-activedescendant",
833
+ "aria-describedby"
834
+ ];
835
+ const _hoisted_4 = {
836
+ key: 0,
837
+ class: "astryx-multi-selector-placeholder"
838
+ };
839
+ const _hoisted_5 = {
840
+ key: 1,
841
+ class: "astryx-multi-selector-value"
842
+ };
843
+ const _hoisted_6 = {
844
+ key: 2,
845
+ class: "astryx-multi-selector-value"
846
+ };
847
+ const _hoisted_7 = {
848
+ key: 0,
849
+ class: "astryx-multi-selector-more"
850
+ };
851
+ const _hoisted_8 = ["aria-label"];
852
+ const _hoisted_9 = {
853
+ class: "astryx-multi-selector-more",
854
+ "data-overflow-indicator": ""
855
+ };
856
+ const _hoisted_10 = [
857
+ "name",
858
+ "value",
859
+ "disabled"
860
+ ];
861
+ const _hoisted_11 = { class: "astryx-multi-selector-sheet-title" };
862
+ const _hoisted_12 = [
863
+ "role",
864
+ "aria-label",
865
+ "data-placement"
866
+ ];
867
+ const _sfc_main = /*@__PURE__*/ defineComponent({
868
+ name: "AstryxMultiSelector",
869
+ inheritAttrs: false,
870
+ __name: "MultiSelector",
871
+ props: {
872
+ modelValue: { default: () => [] },
873
+ options: {},
874
+ label: {},
875
+ isLabelHidden: { type: Boolean },
876
+ labelHidden: {
877
+ type: Boolean,
878
+ default: false
879
+ },
880
+ description: {},
881
+ placeholder: {},
882
+ disabled: {
883
+ type: Boolean,
884
+ default: false
885
+ },
886
+ disabledMessage: {},
887
+ disabledReason: {},
888
+ status: { default: "default" },
889
+ statusMessage: {},
890
+ statusVariant: { default: "attached" },
891
+ size: { default: "md" },
892
+ variant: { default: "input" },
893
+ presentation: { default: "popover" },
894
+ clearable: {
895
+ type: Boolean,
896
+ default: false
897
+ },
898
+ hasClear: { type: Boolean },
899
+ isDefaultOpen: { type: Boolean },
900
+ searchable: {
901
+ type: Boolean,
902
+ default: false
903
+ },
904
+ searchPlaceholder: {},
905
+ selectAll: {
906
+ type: Boolean,
907
+ default: false
908
+ },
909
+ selectAllLabel: {},
910
+ triggerDisplay: { default: "count" },
911
+ maxBadges: { default: 3 },
912
+ checkboxPosition: { default: "start" },
913
+ required: {
914
+ type: Boolean,
915
+ default: false
916
+ },
917
+ optional: {
918
+ type: Boolean,
919
+ default: false
920
+ },
921
+ name: {},
922
+ width: {},
923
+ isReadOnly: {
924
+ type: Boolean,
925
+ default: false
926
+ },
927
+ isLoading: {
928
+ type: Boolean,
929
+ default: false
930
+ },
931
+ formatValue: {},
932
+ hasCreate: {
933
+ type: Boolean,
934
+ default: false
935
+ },
936
+ handleRef: {},
937
+ emptyText: {},
938
+ emptySearchText: {},
939
+ containerClass: { type: [
940
+ Boolean,
941
+ null,
942
+ String,
943
+ Object,
944
+ Array
945
+ ] },
946
+ containerStyle: { type: [
947
+ Boolean,
948
+ null,
949
+ String,
950
+ Object,
951
+ Array
952
+ ] },
953
+ controlClass: { type: [
954
+ Boolean,
955
+ null,
956
+ String,
957
+ Object,
958
+ Array
959
+ ] },
960
+ controlStyle: { type: [
961
+ Boolean,
962
+ null,
963
+ String,
964
+ Object,
965
+ Array
966
+ ] }
967
+ },
968
+ emits: [
969
+ "update:modelValue",
970
+ "change",
971
+ "search",
972
+ "openChange",
973
+ "click",
974
+ "focus",
975
+ "keydown"
976
+ ],
977
+ setup(__props, { expose: __expose, emit: __emit }) {
978
+ const props = __props;
979
+ const emit = __emit;
980
+ const slots = useSlots();
981
+ const attrs = useAttrs();
982
+ const parts = useFieldPartStyling({
983
+ component: "MultiSelector",
984
+ props,
985
+ attrs,
986
+ reservedAttrs: [
987
+ "id",
988
+ "role",
989
+ "aria-label",
990
+ "aria-labelledby",
991
+ "aria-describedby",
992
+ "aria-expanded",
993
+ "aria-controls",
994
+ "aria-haspopup",
995
+ "aria-activedescendant",
996
+ "aria-autocomplete",
997
+ "aria-disabled",
998
+ "aria-required",
999
+ "aria-busy",
1000
+ "aria-readonly"
1001
+ ]
1002
+ });
1003
+ const triggerVariant = computed(() => normalizeTriggerVariant(props.variant));
1004
+ const CheckboxMark = useIndicator("checkbox");
1005
+ const messages = useAstryxMessages();
1006
+ const announce = useAnnounce();
1007
+ const inputGroup = useInputGroupContext();
1008
+ const inGroup = computed(() => inputGroup != null);
1009
+ const control = useFieldControlState({
1010
+ disabled: () => props.disabled || (inputGroup?.disabled.value ?? false),
1011
+ readOnly: () => props.isReadOnly,
1012
+ loading: () => props.isLoading
1013
+ });
1014
+ const triggerId = `astryx-multi-selector-${useId()}`;
1015
+ const listboxId = `${triggerId}-listbox`;
1016
+ const searchId = `${triggerId}-search`;
1017
+ const disabledId = `${triggerId}-disabled`;
1018
+ const anchorRef = useTemplateRef("anchorRef");
1019
+ const listboxRef = useTemplateRef("listboxRef");
1020
+ const triggerRef = useTemplateRef("triggerRef");
1021
+ useScrollbars(listboxRef);
1022
+ const readOnlyId = `${triggerId}-readonly`;
1023
+ const disabledTooltipId = `${triggerId}-disabled-tooltip`;
1024
+ /** 旧名 disabledReason 和新名 disabledMessage 等价。 */
1025
+ const resolvedDisabledMessage = computed(() => props.disabledMessage?.trim() || props.disabledReason?.trim());
1026
+ const showsDisabledMessage = computed(() => control.isDisabled.value && !!resolvedDisabledMessage.value);
1027
+ const disabledTooltip = useButtonTooltip(showsDisabledMessage);
1028
+ const hasClear = computed(() => props.hasClear || props.clearable);
1029
+ const hasCustomTrigger = computed(() => slots.trigger != null);
1030
+ const customAnchor = shallowRef(null);
1031
+ const anchor = computed(() => customAnchor.value ?? anchorRef.value);
1032
+ function setCustomTrigger(element) {
1033
+ customAnchor.value = element instanceof HTMLElement ? element : null;
1034
+ }
1035
+ const placeholder = computed(() => props.placeholder ?? messages.value.multiSelector.placeholder);
1036
+ const fieldStatus = computed(() => {
1037
+ if (!props.statusMessage || props.status === "default") return void 0;
1038
+ return {
1039
+ type: props.status,
1040
+ message: props.statusMessage
1041
+ };
1042
+ });
1043
+ const effectiveStatusVariant = computed(() => fieldStatusPlacement(props.variant, props.statusVariant));
1044
+ const statusGlyph = computed(() => {
1045
+ if (props.status === "default" || effectiveStatusVariant.value === "detached") return void 0;
1046
+ return props.status;
1047
+ });
1048
+ const panelRef = useTemplateRef("panelRef");
1049
+ const menu = useMultiSelectorMenu({
1050
+ props,
1051
+ emitUpdate: (value) => emit("update:modelValue", value),
1052
+ emitChange: (value, change) => emit("change", value, change),
1053
+ emitSearch: (value) => emit("search", value),
1054
+ emitOpenChange: (isOpen) => emit("openChange", isOpen),
1055
+ canActivate: control.canActivate,
1056
+ isLoading: control.isLoading,
1057
+ messages,
1058
+ announce,
1059
+ listboxRef,
1060
+ getSearchInput: () => panelRef.value ? panelRef.value.searchInput ?? null : null,
1061
+ focusTrigger: () => {
1062
+ const trigger = triggerRef.value ?? customAnchor.value;
1063
+ if (trigger != null) nextTick(() => focusElement(trigger));
1064
+ },
1065
+ listboxId
1066
+ });
1067
+ const { combobox, selectedValues, selectedOptions } = menu;
1068
+ trackInteractionModality();
1069
+ const searchKeyboardFocus = ref(false);
1070
+ const sheetSlot = useTemplateRef("sheetSlot");
1071
+ const isSheet = computed(() => props.presentation === "bottom-sheet");
1072
+ const sheetOpen = computed({
1073
+ get: () => isSheet.value && combobox.isOpen.value,
1074
+ set: (open) => {
1075
+ if (!open && combobox.isOpen.value) combobox.close();
1076
+ }
1077
+ });
1078
+ const listboxTarget = computed(() => isSheet.value && sheetSlot.value ? sheetSlot.value : "body");
1079
+ function onSearchFocus() {
1080
+ searchKeyboardFocus.value = isKeyboardModality();
1081
+ }
1082
+ function onSearchBlur() {
1083
+ searchKeyboardFocus.value = false;
1084
+ }
1085
+ const anchored = useAnchoredListbox({
1086
+ anchor,
1087
+ layer: listboxRef,
1088
+ isOpen: computed(() => combobox.isOpen.value && !isSheet.value),
1089
+ onDismiss: () => {
1090
+ combobox.close();
1091
+ }
1092
+ });
1093
+ const badgeCount = computed(() => selectedOptions.value.length);
1094
+ const overflow = useOverflow(badgeCount, { gap: 4 });
1095
+ const visibleBadgeCount = computed(() => Math.min(overflow.visibleCount.value, props.maxBadges, badgeCount.value));
1096
+ const hiddenBadgeCount = computed(() => Math.max(0, badgeCount.value - visibleBadgeCount.value));
1097
+ const measureMoreLabel = computed(() => messages.value.multiSelector.more(Math.max(hiddenBadgeCount.value, 1)));
1098
+ const labelText = computed(() => {
1099
+ const labels = selectedOptions.value.map((option) => option.label);
1100
+ const shown = labels.slice(0, props.maxBadges);
1101
+ const extra = labels.length - shown.length;
1102
+ if (shown.length === 0) return "";
1103
+ return extra > 0 ? `${shown.join(", ")} ${messages.value.multiSelector.more(extra)}` : shown.join(", ");
1104
+ });
1105
+ const formattedValue = computed(() => {
1106
+ if (selectedOptions.value.length === 0 || props.formatValue == null || props.triggerDisplay === "badges") return void 0;
1107
+ return props.formatValue(selectedOptions.value.map((option) => ({
1108
+ value: option.value,
1109
+ label: option.label
1110
+ })));
1111
+ });
1112
+ const describedBy = computed(() => {
1113
+ return [
1114
+ inGroup.value ? inputGroup?.describedBy.value : void 0,
1115
+ !inGroup.value && props.description ? `${triggerId}-description` : void 0,
1116
+ !inGroup.value && props.statusMessage ? `${triggerId}-status` : void 0,
1117
+ showsDisabledMessage.value ? disabledId : void 0
1118
+ ].filter(Boolean).join(" ") || void 0;
1119
+ });
1120
+ useDevWarning("MultiSelector", "`containerClass`/`containerStyle` have no effect on a custom trigger.", () => hasCustomTrigger.value && (props.containerClass != null || props.containerStyle != null));
1121
+ useDevWarning("MultiSelector", "`controlClass`/`controlStyle` have no effect on a custom trigger.", () => hasCustomTrigger.value && (props.controlClass != null || props.controlStyle != null));
1122
+ function onTriggerClick(event) {
1123
+ if (control.canActivate.value) combobox.toggle();
1124
+ emit("click", event);
1125
+ }
1126
+ function onTriggerFocus(event) {
1127
+ emit("focus", event);
1128
+ disabledTooltip.onFocus(event);
1129
+ }
1130
+ function onTriggerKeyDown(event) {
1131
+ menu.onKeyDown(event);
1132
+ if (!event.defaultPrevented) emit("keydown", event);
1133
+ }
1134
+ /** 选项和操作按钮上的 Escape 不会经过搜索框,在列表根上接住并回到触发器。 */
1135
+ function onListboxEscape(event) {
1136
+ if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
1137
+ menu.onKeyDown(event);
1138
+ }
1139
+ watch(listboxRef, (el, prev) => {
1140
+ prev?.removeEventListener("keydown", onListboxEscape);
1141
+ el?.addEventListener("keydown", onListboxEscape);
1142
+ }, { flush: "sync" });
1143
+ onScopeDispose(() => listboxRef.value?.removeEventListener("keydown", onListboxEscape));
1144
+ const triggerProps = computed(() => ({
1145
+ "id": triggerId,
1146
+ "onClick": onTriggerClick,
1147
+ "onKeyDown": onTriggerKeyDown,
1148
+ "onFocus": onTriggerFocus,
1149
+ "aria-haspopup": menu.popupKind.value,
1150
+ "aria-expanded": combobox.isOpen.value,
1151
+ "aria-controls": listboxId,
1152
+ "aria-busy": control.isLoading.value ? true : void 0,
1153
+ "triggerRef": setCustomTrigger
1154
+ }));
1155
+ onMounted(() => {
1156
+ if (!props.isDefaultOpen) return;
1157
+ menu.openFromMount();
1158
+ });
1159
+ const handle = {
1160
+ open: () => menu.open(),
1161
+ close: () => menu.close(),
1162
+ toggle: () => {
1163
+ if (combobox.isOpen.value) menu.close();
1164
+ else menu.open();
1165
+ },
1166
+ isOpen: () => combobox.isOpen.value
1167
+ };
1168
+ useDisclosureHandle(() => props.handleRef, handle);
1169
+ __expose({
1170
+ focus: () => {
1171
+ if (props.searchable && combobox.isOpen.value) panelRef.value?.focusSearch();
1172
+ else anchor.value?.focus();
1173
+ },
1174
+ blur: () => anchor.value?.blur(),
1175
+ ...handle
1176
+ });
1177
+ return (_ctx, _cache) => {
1178
+ return openBlock(), createElementBlock(Fragment, null, [
1179
+ hasCustomTrigger.value ? renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps(triggerProps.value)), void 0, void 0, 0) : (openBlock(), createBlock(_sfc_main$6, {
1180
+ key: 1,
1181
+ class: normalizeClass(["astryx-multi-selector", [
1182
+ unref(parts).containerClass.value,
1183
+ `size-${props.size}`,
1184
+ `variant-${triggerVariant.value}`
1185
+ ]]),
1186
+ style: normalizeStyle(unref(parts).containerStyle.value),
1187
+ label: props.label,
1188
+ "input-id": props.searchable && unref(combobox).isOpen.value ? searchId : triggerId,
1189
+ "is-label-hidden": inGroup.value || props.isLabelHidden || props.labelHidden,
1190
+ "is-disabled": unref(control).isDisabled.value,
1191
+ "is-required": inGroup.value ? false : props.required,
1192
+ "is-optional": inGroup.value ? false : props.optional,
1193
+ description: inGroup.value ? void 0 : props.description,
1194
+ status: inGroup.value ? void 0 : fieldStatus.value,
1195
+ "status-variant": effectiveStatusVariant.value,
1196
+ width: props.width
1197
+ }, {
1198
+ default: withCtx(() => [createElementVNode("div", {
1199
+ ref_key: "anchorRef",
1200
+ ref: anchorRef,
1201
+ class: normalizeClass(["astryx-multi-selector-control", [
1202
+ unref(parts).controlClass(),
1203
+ `status-${props.status}`,
1204
+ {
1205
+ "is-open": unref(combobox).isOpen.value,
1206
+ "is-disabled": unref(control).isDisabled.value,
1207
+ "is-readonly": unref(control).isReadOnly.value,
1208
+ "is-loading": unref(control).isLoading.value,
1209
+ "is-ghost": triggerVariant.value === "ghost"
1210
+ }
1211
+ ]]),
1212
+ style: normalizeStyle(unref(parts).controlStyle()),
1213
+ "data-variant": triggerVariant.value,
1214
+ onPointerenter: _cache[2] || (_cache[2] = (...args) => unref(disabledTooltip).onPointerEnter && unref(disabledTooltip).onPointerEnter(...args)),
1215
+ onPointerleave: _cache[3] || (_cache[3] = (...args) => unref(disabledTooltip).onPointerLeave && unref(disabledTooltip).onPointerLeave(...args))
1216
+ }, [
1217
+ _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("v-if", true),
1218
+ createElementVNode("button", mergeProps(unref(parts).forwardedAttrs(), {
1219
+ id: triggerId,
1220
+ ref_key: "triggerRef",
1221
+ ref: triggerRef,
1222
+ type: "button",
1223
+ class: "astryx-multi-selector-trigger",
1224
+ disabled: unref(control).isDisabled.value && !showsDisabledMessage.value,
1225
+ "aria-disabled": showsDisabledMessage.value ? "true" : void 0,
1226
+ "aria-readonly": unref(control).isReadOnly.value || void 0,
1227
+ "aria-busy": unref(control).isLoading.value || void 0,
1228
+ role: props.searchable && !unref(control).isReadOnly.value ? void 0 : "combobox",
1229
+ "aria-haspopup": unref(control).isReadOnly.value ? void 0 : unref(menu).popupKind.value,
1230
+ "aria-expanded": unref(control).isReadOnly.value ? false : unref(combobox).isOpen.value,
1231
+ "aria-controls": unref(control).isReadOnly.value ? void 0 : listboxId,
1232
+ "aria-autocomplete": props.searchable ? void 0 : "none",
1233
+ "aria-activedescendant": !props.searchable ? unref(menu).actionGrid.activeDescendant.value : void 0,
1234
+ "aria-describedby": [describedBy.value, unref(control).isReadOnly.value ? readOnlyId : void 0].filter(Boolean).join(" ") || void 0,
1235
+ onClick: onTriggerClick,
1236
+ onFocus: onTriggerFocus,
1237
+ onBlur: _cache[0] || (_cache[0] = (...args) => unref(disabledTooltip).onBlur && unref(disabledTooltip).onBlur(...args)),
1238
+ onKeydown: onTriggerKeyDown
1239
+ }), [unref(selectedOptions).length === 0 ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(placeholder.value), 1)) : props.triggerDisplay === "count" ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(formattedValue.value ?? unref(messages).multiSelector.selected(unref(selectedOptions).length)), 1)) : props.triggerDisplay === "labels" ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(formattedValue.value ?? labelText.value), 1)) : (openBlock(), createElementBlock("span", {
1240
+ key: 3,
1241
+ ref: unref(overflow).containerRef,
1242
+ class: "astryx-multi-selector-badges"
1243
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedOptions).slice(0, visibleBadgeCount.value), (option) => {
1244
+ return openBlock(), createBlock(_sfc_main$8, {
1245
+ key: option.value,
1246
+ label: option.label,
1247
+ size: props.size === "lg" ? "md" : "sm"
1248
+ }, null, 8, ["label", "size"]);
1249
+ }), 128)), hiddenBadgeCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(unref(messages).multiSelector.more(hiddenBadgeCount.value)), 1)) : createCommentVNode("v-if", true)], 512))], 16, _hoisted_3),
1250
+ unref(control).isLoading.value ? (openBlock(), createBlock(_sfc_main$5, {
1251
+ key: 1,
1252
+ class: "astryx-multi-selector-spinner",
1253
+ size: "sm",
1254
+ "aria-label": unref(messages).multiSelector.loading
1255
+ }, null, 8, ["aria-label"])) : createCommentVNode("v-if", true),
1256
+ hasClear.value && unref(selectedValues).length > 0 && unref(control).canActivate.value ? (openBlock(), createElementBlock("button", {
1257
+ key: 2,
1258
+ type: "button",
1259
+ class: "astryx-multi-selector-clear",
1260
+ "aria-label": unref(messages).multiSelector.clearAll(props.label),
1261
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => unref(menu).commit([]), ["stop"]))
1262
+ }, [createVNode(_sfc_main$3, {
1263
+ icon: "close",
1264
+ size: "sm"
1265
+ })], 8, _hoisted_8)) : createCommentVNode("v-if", true),
1266
+ statusGlyph.value ? (openBlock(), createBlock(_sfc_main$7, {
1267
+ key: 3,
1268
+ type: statusGlyph.value,
1269
+ message: fieldStatus.value?.message,
1270
+ tooltip: effectiveStatusVariant.value === "tooltip"
1271
+ }, null, 8, [
1272
+ "type",
1273
+ "message",
1274
+ "tooltip"
1275
+ ])) : unref(control).canActivate.value ? (openBlock(), createBlock(_sfc_main$3, {
1276
+ key: 4,
1277
+ class: normalizeClass(["astryx-multi-selector-chevron", { "is-open": unref(combobox).isOpen.value }]),
1278
+ icon: "chevronDown",
1279
+ size: "sm"
1280
+ }, null, 8, ["class"])) : createCommentVNode("v-if", true),
1281
+ unref(control).isReadOnly.value ? (openBlock(), createElementBlock("span", {
1282
+ key: 5,
1283
+ id: readOnlyId,
1284
+ class: "astryx-visually-hidden"
1285
+ }, toDisplayString(unref(messages).multiSelector.readOnly), 1)) : createCommentVNode("v-if", true),
1286
+ props.triggerDisplay === "badges" ? (openBlock(), createElementBlock("span", {
1287
+ key: 6,
1288
+ ref: unref(overflow).measureRef,
1289
+ class: "astryx-multi-selector-measure",
1290
+ "aria-hidden": "true"
1291
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedOptions), (option) => {
1292
+ return openBlock(), createBlock(_sfc_main$8, {
1293
+ key: option.value,
1294
+ label: option.label,
1295
+ size: props.size === "lg" ? "md" : "sm"
1296
+ }, null, 8, ["label", "size"]);
1297
+ }), 128)), createElementVNode("span", _hoisted_9, toDisplayString(measureMoreLabel.value), 1)], 512)) : createCommentVNode("v-if", true),
1298
+ showsDisabledMessage.value ? (openBlock(), createElementBlock("span", {
1299
+ key: 7,
1300
+ id: disabledId,
1301
+ class: "astryx-visually-hidden"
1302
+ }, toDisplayString(resolvedDisabledMessage.value), 1)) : createCommentVNode("v-if", true),
1303
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedValues), (value) => {
1304
+ return openBlock(), createElementBlock("input", {
1305
+ key: value,
1306
+ type: "hidden",
1307
+ name: props.name,
1308
+ value,
1309
+ disabled: !props.name
1310
+ }, null, 8, _hoisted_10);
1311
+ }), 128))
1312
+ ], 46, _hoisted_1)]),
1313
+ _: 3
1314
+ }, 8, [
1315
+ "class",
1316
+ "style",
1317
+ "label",
1318
+ "input-id",
1319
+ "is-label-hidden",
1320
+ "is-disabled",
1321
+ "is-required",
1322
+ "is-optional",
1323
+ "description",
1324
+ "status",
1325
+ "status-variant",
1326
+ "width"
1327
+ ])),
1328
+ isSheet.value ? (openBlock(), createBlock(_sfc_main$4, {
1329
+ key: 2,
1330
+ "is-open": sheetOpen.value,
1331
+ "onUpdate:isOpen": _cache[4] || (_cache[4] = ($event) => sheetOpen.value = $event),
1332
+ height: "hug",
1333
+ label: props.label,
1334
+ padding: 2
1335
+ }, {
1336
+ default: withCtx(() => [createElementVNode("div", {
1337
+ ref_key: "sheetSlot",
1338
+ ref: sheetSlot,
1339
+ class: "astryx-multi-selector-sheet"
1340
+ }, [createElementVNode("div", _hoisted_11, toDisplayString(props.label), 1)], 512)]),
1341
+ _: 1
1342
+ }, 8, ["is-open", "label"])) : createCommentVNode("v-if", true),
1343
+ (openBlock(), createBlock(Teleport, { to: listboxTarget.value }, [withDirectives(createElementVNode("div", {
1344
+ id: listboxId,
1345
+ ref_key: "listboxRef",
1346
+ ref: listboxRef,
1347
+ class: normalizeClass(["astryx-multi-selector-listbox astryx-layer", { "is-sheet": isSheet.value }]),
1348
+ role: unref(menu).gridMode.value ? "grid" : "listbox",
1349
+ "aria-multiselectable": "true",
1350
+ "aria-label": props.label,
1351
+ "data-placement": isSheet.value ? void 0 : unref(anchored).position.value.placement,
1352
+ style: normalizeStyle(isSheet.value ? void 0 : unref(anchored).style.value),
1353
+ tabindex: "-1"
1354
+ }, [createVNode(_sfc_main$1, {
1355
+ ref_key: "panelRef",
1356
+ ref: panelRef,
1357
+ searchable: Boolean(props.searchable),
1358
+ query: unref(menu).query.value,
1359
+ "search-id": searchId,
1360
+ "search-placeholder": unref(menu).searchPlaceholder.value,
1361
+ "clear-label": unref(messages).multiSelector.clear,
1362
+ "listbox-id": listboxId,
1363
+ "active-index": unref(combobox).activeIndex.value,
1364
+ "active-descendant": unref(menu).actionGrid.activeDescendant.value,
1365
+ grid: unref(menu).gridMode.value,
1366
+ "action-index": unref(menu).actionGrid.column.value === "action" ? unref(combobox).activeIndex.value : -1,
1367
+ "create-option": unref(menu).createOption.value,
1368
+ "select-all": Boolean(props.selectAll),
1369
+ "select-all-index": unref(menu).selectAllIndex.value,
1370
+ "select-all-label": unref(menu).selectAllLabel.value,
1371
+ "select-all-state": unref(menu).selectAllState.value,
1372
+ "checkbox-position": props.checkboxPosition,
1373
+ size: props.size,
1374
+ loading: unref(control).isLoading.value,
1375
+ "real-match-count": unref(menu).realMatchCount.value,
1376
+ rows: unref(menu).rows.value,
1377
+ "show-empty": unref(menu).showEmpty.value,
1378
+ "empty-text": unref(menu).emptyText.value,
1379
+ "empty-search-text": unref(menu).emptySearchText.value,
1380
+ "search-keyboard-focus": searchKeyboardFocus.value,
1381
+ mark: unref(CheckboxMark),
1382
+ "is-selected": unref(menu).isSelected,
1383
+ "checkbox-state": unref(menu).checkboxState,
1384
+ "option-index": unref(menu).optionIndex,
1385
+ "option-dom-id": unref(menu).optionDomId,
1386
+ "action-dom-id": (index) => `${listboxId}-action-${index}`,
1387
+ onQuery: unref(menu).onSearchInput,
1388
+ onKeydown: unref(menu).onKeyDown,
1389
+ onClearQuery: _cache[5] || (_cache[5] = ($event) => unref(menu).query.value = ""),
1390
+ onSearchFocus,
1391
+ onSearchBlur,
1392
+ onToggle: unref(menu).toggleValue,
1393
+ onHighlight: unref(menu).highlight
1394
+ }, createSlots({ _: 2 }, [_ctx.$slots.option ? {
1395
+ name: "option",
1396
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps(slotProps)))]),
1397
+ key: "0"
1398
+ } : void 0, _ctx.$slots.empty ? {
1399
+ name: "empty",
1400
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
1401
+ key: "1"
1402
+ } : void 0]), 1032, [
1403
+ "searchable",
1404
+ "query",
1405
+ "search-placeholder",
1406
+ "clear-label",
1407
+ "active-index",
1408
+ "active-descendant",
1409
+ "grid",
1410
+ "action-index",
1411
+ "create-option",
1412
+ "select-all",
1413
+ "select-all-index",
1414
+ "select-all-label",
1415
+ "select-all-state",
1416
+ "checkbox-position",
1417
+ "size",
1418
+ "loading",
1419
+ "real-match-count",
1420
+ "rows",
1421
+ "show-empty",
1422
+ "empty-text",
1423
+ "empty-search-text",
1424
+ "search-keyboard-focus",
1425
+ "mark",
1426
+ "is-selected",
1427
+ "checkbox-state",
1428
+ "option-index",
1429
+ "option-dom-id",
1430
+ "action-dom-id",
1431
+ "onQuery",
1432
+ "onKeydown",
1433
+ "onToggle",
1434
+ "onHighlight"
1435
+ ])], 14, _hoisted_12), [[vShow, unref(combobox).isOpen.value]])], 8, ["to"])),
1436
+ showsDisabledMessage.value ? (openBlock(), createBlock(_sfc_main$2, {
1437
+ key: 3,
1438
+ id: disabledTooltipId,
1439
+ anchor: anchor.value,
1440
+ open: unref(disabledTooltip).isOpen.value,
1441
+ text: resolvedDisabledMessage.value ?? "",
1442
+ onPointerEnter: unref(disabledTooltip).onTooltipPointerEnter,
1443
+ onPointerLeave: unref(disabledTooltip).onTooltipPointerLeave
1444
+ }, null, 8, [
1445
+ "anchor",
1446
+ "open",
1447
+ "text",
1448
+ "onPointerEnter",
1449
+ "onPointerLeave"
1450
+ ])) : createCommentVNode("v-if", true)
1451
+ ], 64);
1452
+ };
1453
+ }
1454
+ });
1455
+ //#endregion
1456
+ export { SELECT_ALL_VALUE as n, flattenOptions as r, _sfc_main as t };