@bridge-ui/vue 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/dist/Actions/BridgeUIHosts.js +5 -0
  2. package/dist/Actions/BridgeUIHosts.vue.d.ts +18 -0
  3. package/dist/Actions/BridgeUIHosts.vue_vue_type_script_setup_true_lang.js +27 -0
  4. package/dist/Actions/Dialog/BridgeDialogAction.js +5 -0
  5. package/dist/Actions/Dialog/BridgeDialogAction.vue.d.ts +8 -0
  6. package/dist/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +62 -0
  7. package/dist/Actions/Dialog/BridgeDialogHost.js +5 -0
  8. package/dist/Actions/Dialog/BridgeDialogHost.vue.d.ts +14 -0
  9. package/dist/Actions/Dialog/BridgeDialogHost.vue_vue_type_script_setup_true_lang.js +26 -0
  10. package/dist/Actions/Dialog/BridgeDialogItem.js +5 -0
  11. package/dist/Actions/Dialog/BridgeDialogItem.vue.d.ts +4 -0
  12. package/dist/Actions/Dialog/BridgeDialogItem.vue_vue_type_script_setup_true_lang.js +47 -0
  13. package/dist/Actions/Dialog/ResolveBridgeDialogFooter.js +5 -0
  14. package/dist/Actions/Dialog/ResolveBridgeDialogFooter.vue.d.ts +4 -0
  15. package/dist/Actions/Dialog/ResolveBridgeDialogFooter.vue_vue_type_script_setup_true_lang.js +35 -0
  16. package/dist/Actions/Dialog/bridgeDialog.types.d.ts +128 -0
  17. package/dist/Actions/Dialog/bridgeDialogInjectionKey.d.ts +3 -0
  18. package/dist/Actions/Dialog/bridgeDialogInjectionKey.js +4 -0
  19. package/dist/Actions/Dialog/createBridgeDialogApi.d.ts +2 -0
  20. package/dist/Actions/Dialog/createBridgeDialogApi.js +49 -0
  21. package/dist/Actions/Dialog/index.d.ts +3 -0
  22. package/dist/Actions/Dialog/index.js +3 -0
  23. package/dist/Actions/Dialog/useDialogAction.d.ts +5 -0
  24. package/dist/Actions/Dialog/useDialogAction.js +26 -0
  25. package/dist/Actions/Modal/BridgeModalHost.js +5 -0
  26. package/dist/Actions/Modal/BridgeModalHost.vue.d.ts +14 -0
  27. package/dist/Actions/Modal/BridgeModalHost.vue_vue_type_script_setup_true_lang.js +35 -0
  28. package/dist/Actions/Modal/bridgeModal.types.d.ts +44 -0
  29. package/dist/Actions/Modal/bridgeModalInjectionKey.d.ts +3 -0
  30. package/dist/Actions/Modal/bridgeModalInjectionKey.js +4 -0
  31. package/dist/Actions/Modal/createBridgeModalApi.d.ts +2 -0
  32. package/dist/Actions/Modal/createBridgeModalApi.js +49 -0
  33. package/dist/Actions/Modal/index.d.ts +3 -0
  34. package/dist/Actions/Modal/index.js +3 -0
  35. package/dist/Actions/Modal/useModalAction.d.ts +5 -0
  36. package/dist/Actions/Modal/useModalAction.js +26 -0
  37. package/dist/Actions/Snackbar/BridgeSnackbarAction.js +5 -0
  38. package/dist/Actions/Snackbar/BridgeSnackbarAction.vue.d.ts +8 -0
  39. package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +86 -0
  40. package/dist/Actions/Snackbar/BridgeSnackbarHost.js +5 -0
  41. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue.d.ts +16 -0
  42. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +55 -0
  43. package/dist/Actions/Snackbar/BridgeSnackbarItem.js +5 -0
  44. package/dist/Actions/Snackbar/BridgeSnackbarItem.vue.d.ts +4 -0
  45. package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +117 -0
  46. package/dist/Actions/Snackbar/bridgeSnackbar.types.d.ts +127 -0
  47. package/dist/Actions/Snackbar/bridgeSnackbarInjectionKey.d.ts +3 -0
  48. package/dist/Actions/Snackbar/bridgeSnackbarInjectionKey.js +4 -0
  49. package/dist/Actions/Snackbar/createBridgeSnackbarApi.d.ts +14 -0
  50. package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +59 -0
  51. package/dist/Actions/Snackbar/index.d.ts +3 -0
  52. package/dist/Actions/Snackbar/index.js +3 -0
  53. package/dist/Actions/Snackbar/useSnackbarAction.d.ts +5 -0
  54. package/dist/Actions/Snackbar/useSnackbarAction.js +27 -0
  55. package/dist/Actions/bridgeUIHosts.types.d.ts +17 -0
  56. package/dist/Actions/index.d.ts +8 -0
  57. package/dist/Actions/index.js +8 -0
  58. package/dist/Components/Alert/Alert.js +5 -0
  59. package/dist/Components/Alert/Alert.vue.d.ts +11 -0
  60. package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +43 -0
  61. package/dist/Components/Alert/alert.types.d.ts +134 -0
  62. package/dist/Components/Alert/alertDefaultIcons.d.ts +4 -0
  63. package/dist/Components/Alert/alertDefaultIcons.js +13 -0
  64. package/dist/Components/Alert/composables/useAlert.d.ts +18 -0
  65. package/dist/Components/Alert/composables/useAlert.js +71 -0
  66. package/dist/Components/Alert/index.d.ts +3 -0
  67. package/dist/Components/Alert/index.js +3 -0
  68. package/dist/Components/Avatar/Avatar.js +5 -0
  69. package/dist/Components/Avatar/Avatar.vue.d.ts +11 -0
  70. package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +32 -0
  71. package/dist/Components/Avatar/avatar.types.d.ts +81 -0
  72. package/dist/Components/Avatar/composables/useAvatar.d.ts +23 -0
  73. package/dist/Components/Avatar/composables/useAvatar.js +73 -0
  74. package/dist/Components/Avatar/index.d.ts +3 -0
  75. package/dist/Components/Avatar/index.js +3 -0
  76. package/dist/Components/Badge/Badge.js +5 -0
  77. package/dist/Components/Badge/Badge.vue.d.ts +4 -0
  78. package/dist/Components/Badge/Badge.vue_vue_type_script_setup_true_lang.js +29 -0
  79. package/dist/Components/Badge/badge.types.d.ts +64 -0
  80. package/dist/Components/Badge/composables/useBadge.d.ts +9 -0
  81. package/dist/Components/Badge/composables/useBadge.js +47 -0
  82. package/dist/Components/Badge/index.d.ts +3 -0
  83. package/dist/Components/Badge/index.js +3 -0
  84. package/dist/Components/Button/Button.js +5 -0
  85. package/dist/Components/Button/Button.vue.d.ts +11 -0
  86. package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +74 -0
  87. package/dist/Components/Button/button.types.d.ts +181 -0
  88. package/dist/Components/Button/composables/useButton.d.ts +22 -0
  89. package/dist/Components/Button/composables/useButton.js +91 -0
  90. package/dist/Components/Button/index.d.ts +3 -0
  91. package/dist/Components/Button/index.js +3 -0
  92. package/dist/Components/Card/Card.js +5 -0
  93. package/dist/Components/Card/Card.vue.d.ts +11 -0
  94. package/dist/Components/Card/Card.vue_vue_type_script_setup_true_lang.js +33 -0
  95. package/dist/Components/Card/card.types.d.ts +124 -0
  96. package/dist/Components/Card/composables/useCard.d.ts +18 -0
  97. package/dist/Components/Card/composables/useCard.js +80 -0
  98. package/dist/Components/Card/index.d.ts +3 -0
  99. package/dist/Components/Card/index.js +3 -0
  100. package/dist/Components/Checkbox/Checkbox.js +5 -0
  101. package/dist/Components/Checkbox/Checkbox.vue.d.ts +20 -0
  102. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +70 -0
  103. package/dist/Components/Checkbox/checkbox.types.d.ts +98 -0
  104. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +279 -0
  105. package/dist/Components/Checkbox/composables/useCheckbox.js +76 -0
  106. package/dist/Components/Checkbox/index.d.ts +3 -0
  107. package/dist/Components/Checkbox/index.js +3 -0
  108. package/dist/Components/FormControl/FormControl.js +5 -0
  109. package/dist/Components/FormControl/FormControl.vue.d.ts +17 -0
  110. package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +31 -0
  111. package/dist/Components/FormControl/composables/useFormControl.d.ts +45 -0
  112. package/dist/Components/FormControl/composables/useFormControl.js +110 -0
  113. package/dist/Components/FormControl/formControl.types.d.ts +198 -0
  114. package/dist/Components/FormControl/index.d.ts +4 -0
  115. package/dist/Components/FormControl/index.js +3 -0
  116. package/dist/Components/FormField/FilledFormField.js +5 -0
  117. package/dist/Components/FormField/FilledFormField.vue.d.ts +17 -0
  118. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +39 -0
  119. package/dist/Components/FormField/FormField.js +5 -0
  120. package/dist/Components/FormField/FormField.vue.d.ts +15 -0
  121. package/dist/Components/FormField/FormField.vue_vue_type_script_setup_true_lang.js +37 -0
  122. package/dist/Components/FormField/NotchedFormField.js +5 -0
  123. package/dist/Components/FormField/NotchedFormField.vue.d.ts +17 -0
  124. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +38 -0
  125. package/dist/Components/FormField/OutlinedFormField.js +5 -0
  126. package/dist/Components/FormField/OutlinedFormField.vue.d.ts +17 -0
  127. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +39 -0
  128. package/dist/Components/FormField/StackedFormField.js +5 -0
  129. package/dist/Components/FormField/StackedFormField.vue.d.ts +17 -0
  130. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +42 -0
  131. package/dist/Components/FormField/UnderlinedFormField.js +5 -0
  132. package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +17 -0
  133. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +39 -0
  134. package/dist/Components/FormField/composables/useFormField.d.ts +474 -0
  135. package/dist/Components/FormField/composables/useFormField.js +219 -0
  136. package/dist/Components/FormField/formField.types.d.ts +294 -0
  137. package/dist/Components/FormField/index.d.ts +4 -0
  138. package/dist/Components/FormField/index.js +3 -0
  139. package/dist/Components/Icon/Icon.js +5 -0
  140. package/dist/Components/Icon/Icon.vue.d.ts +4 -0
  141. package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +17 -0
  142. package/dist/Components/Icon/composables/useIcon.d.ts +9 -0
  143. package/dist/Components/Icon/composables/useIcon.js +26 -0
  144. package/dist/Components/Icon/icon.types.d.ts +17 -0
  145. package/dist/Components/Icon/index.d.ts +3 -0
  146. package/dist/Components/Icon/index.js +3 -0
  147. package/dist/Components/Label/Label.js +5 -0
  148. package/dist/Components/Label/Label.vue.d.ts +4 -0
  149. package/dist/Components/Label/Label.vue_vue_type_script_setup_true_lang.js +21 -0
  150. package/dist/Components/Label/composables/useLabel.d.ts +10 -0
  151. package/dist/Components/Label/composables/useLabel.js +44 -0
  152. package/dist/Components/Label/index.d.ts +3 -0
  153. package/dist/Components/Label/index.js +3 -0
  154. package/dist/Components/Label/label.types.d.ts +52 -0
  155. package/dist/Components/Link/Link.js +5 -0
  156. package/dist/Components/Link/Link.vue.d.ts +11 -0
  157. package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +52 -0
  158. package/dist/Components/Link/composables/useLink.d.ts +18 -0
  159. package/dist/Components/Link/composables/useLink.js +66 -0
  160. package/dist/Components/Link/index.d.ts +3 -0
  161. package/dist/Components/Link/index.js +3 -0
  162. package/dist/Components/Link/link.types.d.ts +113 -0
  163. package/dist/Components/List/List.js +5 -0
  164. package/dist/Components/List/List.vue.d.ts +9 -0
  165. package/dist/Components/List/List.vue_vue_type_script_setup_true_lang.js +31 -0
  166. package/dist/Components/List/composables/useList.d.ts +11 -0
  167. package/dist/Components/List/composables/useList.js +44 -0
  168. package/dist/Components/List/index.d.ts +5 -0
  169. package/dist/Components/List/index.js +4 -0
  170. package/dist/Components/List/list.types.d.ts +57 -0
  171. package/dist/Components/List/listInjectionKey.d.ts +5 -0
  172. package/dist/Components/List/listInjectionKey.js +4 -0
  173. package/dist/Components/ListItem/ListItem.js +5 -0
  174. package/dist/Components/ListItem/ListItem.vue.d.ts +19 -0
  175. package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +57 -0
  176. package/dist/Components/ListItem/composables/useListItem.d.ts +40 -0
  177. package/dist/Components/ListItem/composables/useListItem.js +104 -0
  178. package/dist/Components/ListItem/index.d.ts +3 -0
  179. package/dist/Components/ListItem/index.js +3 -0
  180. package/dist/Components/ListItem/listItem.types.d.ts +164 -0
  181. package/dist/Components/ListSection/ListSection.js +5 -0
  182. package/dist/Components/ListSection/ListSection.vue.d.ts +15 -0
  183. package/dist/Components/ListSection/ListSection.vue_vue_type_script_setup_true_lang.js +30 -0
  184. package/dist/Components/ListSection/composables/useListSection.d.ts +13 -0
  185. package/dist/Components/ListSection/composables/useListSection.js +51 -0
  186. package/dist/Components/ListSection/index.d.ts +3 -0
  187. package/dist/Components/ListSection/index.js +3 -0
  188. package/dist/Components/ListSection/listSection.types.d.ts +71 -0
  189. package/dist/Components/Listbox/Listbox.js +5 -0
  190. package/dist/Components/Listbox/Listbox.vue.d.ts +34 -0
  191. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +157 -0
  192. package/dist/Components/Listbox/composables/useListbox.d.ts +13 -0
  193. package/dist/Components/Listbox/composables/useListbox.js +47 -0
  194. package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +16 -0
  195. package/dist/Components/Listbox/composables/useListboxNavigation.js +62 -0
  196. package/dist/Components/Listbox/index.d.ts +4 -0
  197. package/dist/Components/Listbox/index.js +4 -0
  198. package/dist/Components/Listbox/listbox.types.d.ts +170 -0
  199. package/dist/Components/Menu/Menu.js +5 -0
  200. package/dist/Components/Menu/Menu.vue.d.ts +36 -0
  201. package/dist/Components/Menu/Menu.vue_vue_type_script_setup_true_lang.js +80 -0
  202. package/dist/Components/Menu/composables/useMenu.d.ts +54 -0
  203. package/dist/Components/Menu/composables/useMenu.js +217 -0
  204. package/dist/Components/Menu/index.d.ts +4 -0
  205. package/dist/Components/Menu/index.js +3 -0
  206. package/dist/Components/Menu/menu.types.d.ts +172 -0
  207. package/dist/Components/Modal/Modal.js +5 -0
  208. package/dist/Components/Modal/Modal.vue.d.ts +38 -0
  209. package/dist/Components/Modal/Modal.vue_vue_type_script_setup_true_lang.js +94 -0
  210. package/dist/Components/Modal/composables/useModal.d.ts +61 -0
  211. package/dist/Components/Modal/composables/useModal.js +191 -0
  212. package/dist/Components/Modal/index.d.ts +4 -0
  213. package/dist/Components/Modal/index.js +3 -0
  214. package/dist/Components/Modal/modal.types.d.ts +177 -0
  215. package/dist/Components/NumberField/NumberField.js +5 -0
  216. package/dist/Components/NumberField/NumberField.vue.d.ts +24 -0
  217. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +83 -0
  218. package/dist/Components/NumberField/composables/useNumberField.d.ts +696 -0
  219. package/dist/Components/NumberField/composables/useNumberField.js +64 -0
  220. package/dist/Components/NumberField/index.d.ts +4 -0
  221. package/dist/Components/NumberField/index.js +3 -0
  222. package/dist/Components/NumberField/numberField.types.d.ts +52 -0
  223. package/dist/Components/PasswordField/PasswordField.js +5 -0
  224. package/dist/Components/PasswordField/PasswordField.vue.d.ts +24 -0
  225. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +67 -0
  226. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +691 -0
  227. package/dist/Components/PasswordField/composables/usePasswordField.js +40 -0
  228. package/dist/Components/PasswordField/index.d.ts +4 -0
  229. package/dist/Components/PasswordField/index.js +3 -0
  230. package/dist/Components/PasswordField/passwordField.types.d.ts +34 -0
  231. package/dist/Components/Radio/Radio.js +5 -0
  232. package/dist/Components/Radio/Radio.vue.d.ts +20 -0
  233. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +57 -0
  234. package/dist/Components/Radio/composables/useRadio.d.ts +278 -0
  235. package/dist/Components/Radio/composables/useRadio.js +78 -0
  236. package/dist/Components/Radio/index.d.ts +3 -0
  237. package/dist/Components/Radio/index.js +3 -0
  238. package/dist/Components/Radio/radio.types.d.ts +104 -0
  239. package/dist/Components/Select/Select.js +5 -0
  240. package/dist/Components/Select/Select.vue.d.ts +40 -0
  241. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +191 -0
  242. package/dist/Components/Select/SelectOption.js +5 -0
  243. package/dist/Components/Select/SelectOption.vue.d.ts +4 -0
  244. package/dist/Components/Select/SelectOption.vue_vue_type_script_setup_true_lang.js +30 -0
  245. package/dist/Components/Select/composables/useSelect.d.ts +733 -0
  246. package/dist/Components/Select/composables/useSelect.js +305 -0
  247. package/dist/Components/Select/index.d.ts +4 -0
  248. package/dist/Components/Select/index.js +4 -0
  249. package/dist/Components/Select/select.types.d.ts +231 -0
  250. package/dist/Components/Select/selectInjectionKey.d.ts +7 -0
  251. package/dist/Components/Select/selectInjectionKey.js +4 -0
  252. package/dist/Components/Snackbar/Snackbar.js +5 -0
  253. package/dist/Components/Snackbar/Snackbar.vue.d.ts +32 -0
  254. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +156 -0
  255. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +248 -0
  256. package/dist/Components/Snackbar/composables/useSnackbar.js +210 -0
  257. package/dist/Components/Snackbar/index.d.ts +4 -0
  258. package/dist/Components/Snackbar/index.js +3 -0
  259. package/dist/Components/Snackbar/snackbar.types.d.ts +214 -0
  260. package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +4 -0
  261. package/dist/Components/Snackbar/snackbarDefaultIcons.js +13 -0
  262. package/dist/Components/Switch/Switch.js +5 -0
  263. package/dist/Components/Switch/Switch.vue.d.ts +20 -0
  264. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +61 -0
  265. package/dist/Components/Switch/composables/useSwitch.d.ts +278 -0
  266. package/dist/Components/Switch/composables/useSwitch.js +73 -0
  267. package/dist/Components/Switch/index.d.ts +3 -0
  268. package/dist/Components/Switch/index.js +3 -0
  269. package/dist/Components/Switch/switch.types.d.ts +92 -0
  270. package/dist/Components/TextField/TextField.js +5 -0
  271. package/dist/Components/TextField/TextField.vue.d.ts +22 -0
  272. package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +49 -0
  273. package/dist/Components/TextField/composables/useTextField.d.ts +680 -0
  274. package/dist/Components/TextField/composables/useTextField.js +21 -0
  275. package/dist/Components/TextField/index.d.ts +3 -0
  276. package/dist/Components/TextField/index.js +3 -0
  277. package/dist/Components/TextField/textField.types.d.ts +15 -0
  278. package/dist/Components/Textarea/Textarea.js +5 -0
  279. package/dist/Components/Textarea/Textarea.vue.d.ts +22 -0
  280. package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +57 -0
  281. package/dist/Components/Textarea/composables/useTextarea.d.ts +685 -0
  282. package/dist/Components/Textarea/composables/useTextarea.js +72 -0
  283. package/dist/Components/Textarea/index.d.ts +3 -0
  284. package/dist/Components/Textarea/index.js +3 -0
  285. package/dist/Components/Textarea/textarea.types.d.ts +34 -0
  286. package/dist/Provider/BridgeUIProvider.js +5 -0
  287. package/dist/Provider/BridgeUIProvider.vue.d.ts +18 -0
  288. package/dist/Provider/BridgeUIProvider.vue_vue_type_script_setup_true_lang.js +20 -0
  289. package/dist/Provider/bridgeUITypes.d.ts +8 -0
  290. package/dist/Provider/createBridgeUI.d.ts +3 -0
  291. package/dist/Provider/createBridgeUI.js +15 -0
  292. package/dist/Provider/createBridgeUIApi.d.ts +7 -0
  293. package/dist/Provider/createBridgeUIApi.js +36 -0
  294. package/dist/Provider/index.d.ts +5 -0
  295. package/dist/Provider/index.js +4 -0
  296. package/dist/Provider/injectionKey.d.ts +3 -0
  297. package/dist/Provider/injectionKey.js +4 -0
  298. package/dist/Provider/useBridgeUI.d.ts +2 -0
  299. package/dist/Provider/useBridgeUI.js +8 -0
  300. package/dist/Utils/index.d.ts +47 -0
  301. package/dist/Utils/index.js +55 -0
  302. package/dist/Utils/slotOrProp.d.ts +28 -0
  303. package/dist/Utils/slotOrProp.js +23 -0
  304. package/dist/Utils/useHoldRepeat.d.ts +13 -0
  305. package/dist/Utils/useHoldRepeat.js +38 -0
  306. package/dist/augments.d.ts +113 -0
  307. package/dist/index.d.ts +54 -0
  308. package/dist/index.js +53 -0
  309. package/dist/theme.css +205 -0
  310. package/package.json +90 -0
@@ -0,0 +1,157 @@
1
+ import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
2
+ import n from "../List/List.js";
3
+ import { useListbox as r } from "./composables/useListbox.js";
4
+ import i from "../ListItem/ListItem.js";
5
+ import a from "../Menu/Menu.js";
6
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createSlots as d, createVNode as f, defineComponent as p, mergeModels as m, mergeProps as h, normalizeClass as g, normalizeProps as _, openBlock as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, useModel as w, useSlots as T, watch as E, withCtx as D } from "vue";
7
+ import { cn as O } from "@bridge-ui/core";
8
+ import { Check as k } from "lucide-vue-next";
9
+ //#region src/Components/Listbox/Listbox.vue?vue&type=script&setup=true&lang.ts
10
+ var A = {
11
+ key: 1,
12
+ class: "px-4 py-3 text-sm text-gray-500"
13
+ }, j = { key: 1 }, M = {
14
+ key: 3,
15
+ class: "px-4 py-3 text-sm text-gray-500"
16
+ }, N = /* @__PURE__ */ p({
17
+ __name: "Listbox",
18
+ props: /* @__PURE__ */ m({
19
+ anchorEl: {},
20
+ classes: {},
21
+ color: { default: "primary" },
22
+ customProps: {},
23
+ disableAutoFocus: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ disableMaxHeight: { type: Boolean },
28
+ emptyMessage: { default: "No options" },
29
+ hideEmptyMessage: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ highlightedIndex: { default: -1 },
34
+ invalidated: { type: Boolean },
35
+ isSelected: {},
36
+ labelledBy: {},
37
+ listboxId: {},
38
+ loading: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ maxHeight: {},
43
+ multiple: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ options: {},
48
+ placement: { default: "bottom-start" },
49
+ showCheckmark: {
50
+ type: Boolean,
51
+ default: !0
52
+ }
53
+ }, {
54
+ modelValue: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ modelModifiers: {}
59
+ }),
60
+ emits: /* @__PURE__ */ m(["select", "show-change"], ["update:modelValue"]),
61
+ setup(p, { emit: m }) {
62
+ let N = T(), P = m, F = w(p, "modelValue");
63
+ E(F, (e) => {
64
+ P("show-change", e);
65
+ });
66
+ let I = p, { merged: L, checkClass: R, scrollBind: z, mergedClasses: B, optionSelectedClass: V, optionHighlightedClass: H } = r(I, { color: "primary" }), U = s(() => !I.loading && I.options.length === 0 && I.hideEmptyMessage !== !0), W = s(() => O(R.value, B.value.check));
67
+ function G(e) {
68
+ return I.isSelected?.(e) ?? !1;
69
+ }
70
+ function K(e) {
71
+ return I.highlightedIndex === e;
72
+ }
73
+ function q(e) {
74
+ e.preventDefault();
75
+ }
76
+ function J(e, t) {
77
+ let n = {
78
+ tabindex: -1,
79
+ onMousedown: q
80
+ };
81
+ return G(e.value) ? n.class = O(V.value, B.value.optionSelected) : K(t) && (n.class = O(H.value, B.value.optionHighlighted)), { interactive: n };
82
+ }
83
+ function Y(e) {
84
+ e.disabled || P("select", e);
85
+ }
86
+ return (r, s) => (v(), c(C(a), {
87
+ modelValue: F.value,
88
+ "onUpdate:modelValue": s[0] ||= (e) => F.value = e,
89
+ "anchor-el": p.anchorEl,
90
+ placement: p.placement,
91
+ "close-on-click-away": !0,
92
+ "disable-auto-focus": p.disableAutoFocus,
93
+ "custom-props": { content: C(L).customProps?.content }
94
+ }, {
95
+ default: D(() => [
96
+ C(e)(C(N), "beforeOptions") ? (v(), c(x(C(t)(C(N), "beforeOptions")), { key: 0 })) : l("", !0),
97
+ p.loading ? (v(), u("div", A, [C(e)(C(N), "loading") ? (v(), c(x(C(t)(C(N), "loading")), { key: 0 })) : (v(), u("span", j, "Loading..."))])) : (v(), u("div", _(h({ key: 2 }, C(z))), [f(C(n), {
98
+ dense: "",
99
+ role: "listbox",
100
+ padding: "none",
101
+ id: p.listboxId,
102
+ "aria-labelledby": p.labelledBy,
103
+ "aria-multiselectable": p.multiple || void 0
104
+ }, {
105
+ default: D(() => [(v(!0), u(o, null, y(p.options, (t, n) => (v(), c(C(i), {
106
+ interactive: "",
107
+ role: "option",
108
+ selected: !1,
109
+ primary: t.label,
110
+ key: String(t.value),
111
+ disabled: t.disabled,
112
+ secondary: t.description,
113
+ onClick: (e) => Y(t),
114
+ id: `${p.listboxId}-option-${n}`,
115
+ "aria-selected": G(t.value),
116
+ "custom-props": J(t, n)
117
+ }, d({ _: 2 }, [C(e)(C(N), "option") ? {
118
+ name: "default",
119
+ fn: D(() => [b(r.$slots, "option", {
120
+ option: t,
121
+ selected: G(t.value)
122
+ })]),
123
+ key: "0"
124
+ } : void 0, p.showCheckmark && G(t.value) ? {
125
+ name: "end",
126
+ fn: D(() => [f(C(k), { class: g(["size-4", W.value]) }, null, 8, ["class"])]),
127
+ key: "1"
128
+ } : void 0]), 1032, [
129
+ "primary",
130
+ "disabled",
131
+ "secondary",
132
+ "onClick",
133
+ "id",
134
+ "aria-selected",
135
+ "custom-props"
136
+ ]))), 128))]),
137
+ _: 3
138
+ }, 8, [
139
+ "id",
140
+ "aria-labelledby",
141
+ "aria-multiselectable"
142
+ ])], 16)),
143
+ U.value && !C(e)(C(N), "empty") ? (v(), u("div", M, S(p.emptyMessage), 1)) : U.value && C(e)(C(N), "empty") ? (v(), c(x(C(t)(C(N), "empty")), { key: 4 })) : l("", !0),
144
+ C(e)(C(N), "afterOptions") ? (v(), c(x(C(t)(C(N), "afterOptions")), { key: 5 })) : l("", !0)
145
+ ]),
146
+ _: 3
147
+ }, 8, [
148
+ "modelValue",
149
+ "anchor-el",
150
+ "placement",
151
+ "disable-auto-focus",
152
+ "custom-props"
153
+ ]));
154
+ }
155
+ });
156
+ //#endregion
157
+ export { N as default };
@@ -0,0 +1,13 @@
1
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
2
+ import { ListboxClasses, ListboxOwnProps } from '../listbox.types';
3
+ type ListboxLibDefaults = LibDefaultsShape<ListboxOwnProps, "color">;
4
+ type ListboxMerged = MergeLibDefaults<ListboxOwnProps, ListboxLibDefaults>;
5
+ export declare function useListbox(props: ListboxOwnProps, libDefaults: ListboxLibDefaults): {
6
+ merged: import('vue').ComputedRef<ListboxMerged>;
7
+ checkClass: import('vue').ComputedRef<string | undefined>;
8
+ scrollBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
9
+ mergedClasses: import('vue').ComputedRef<Partial<ListboxClasses>>;
10
+ optionSelectedClass: import('vue').ComputedRef<string | undefined>;
11
+ optionHighlightedClass: import('vue').ComputedRef<string | undefined>;
12
+ };
13
+ export {};
@@ -0,0 +1,47 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { computed as r, useAttrs as i } from "vue";
3
+ import { get as a } from "es-toolkit/compat";
4
+ import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
5
+ import { colorProps as l, invalidatedProps as u } from "@bridge-ui/core/Components/Listbox";
6
+ //#region src/Components/Listbox/composables/useListbox.ts
7
+ var d = [
8
+ "color",
9
+ "classes",
10
+ "maxHeight",
11
+ "customProps",
12
+ "invalidated",
13
+ "disableMaxHeight"
14
+ ];
15
+ function f(f, p) {
16
+ let m = i(), h = r(() => c({
17
+ props: {
18
+ ...m,
19
+ ...f
20
+ },
21
+ bridgeKeys: d
22
+ })), { merged: g, entry: _ } = t({
23
+ libDefaults: p,
24
+ componentName: "Listbox",
25
+ props: () => h.value.componentProps
26
+ }), v = n({
27
+ entry: _,
28
+ props: () => h.value.componentProps
29
+ }), y = r(() => a(s(l, _.value?.customProps?.color), g.value.color ?? "primary")), b = r(() => s(u, _.value?.customProps?.invalidated)), x = r(() => g.value.invalidated ? b.value : y.value), S = r(() => x.value?.selected), C = r(() => x.value?.highlighted);
30
+ return {
31
+ merged: g,
32
+ checkClass: r(() => x.value?.check),
33
+ scrollBind: r(() => {
34
+ let t = g.value.maxHeight ?? "max-h-60", n = g.value.disableMaxHeight === !0;
35
+ return e(g.value.customProps?.scroll, {}, o({
36
+ "overflow-y-auto overscroll-contain": !n,
37
+ [t]: !n,
38
+ [v.value.scroll ?? ""]: !0
39
+ }));
40
+ }),
41
+ mergedClasses: v,
42
+ optionSelectedClass: S,
43
+ optionHighlightedClass: C
44
+ };
45
+ }
46
+ //#endregion
47
+ export { f as useListbox };
@@ -0,0 +1,16 @@
1
+ import { MaybeRefOrGetter, Ref } from 'vue';
2
+ import { ListboxOption, ListboxValue } from '../listbox.types';
3
+ export declare function findFirstEnabledOptionIndex(options: ListboxOption[]): number;
4
+ export declare function findLastEnabledOptionIndex(options: ListboxOption[]): number;
5
+ export declare function moveListboxHighlight(options: ListboxOption[], currentIndex: number, delta: number): number;
6
+ export declare function getListboxOptionId(listboxId: string, index: number): string;
7
+ export declare function getListboxActiveDescendantId(listboxId: string, highlightedIndex: number): string | undefined;
8
+ export declare function useListboxNavigation(options: MaybeRefOrGetter<ListboxOption[]>, highlightedIndex: Ref<number>, listboxId: MaybeRefOrGetter<string>): {
9
+ moveHighlight: (delta: number) => void;
10
+ highlightLast: () => void;
11
+ resetHighlight: () => void;
12
+ highlightFirst: () => void;
13
+ activeDescendantId: import('vue').ComputedRef<string | undefined>;
14
+ getHighlightedOption: () => ListboxOption;
15
+ highlightCurrentSelection: (isSelected?: (value: ListboxValue) => boolean) => void;
16
+ };
@@ -0,0 +1,62 @@
1
+ import { computed as e, toValue as t } from "vue";
2
+ //#region src/Components/Listbox/composables/useListboxNavigation.ts
3
+ function n(e) {
4
+ return e.findIndex((e) => !e.disabled);
5
+ }
6
+ function r(e) {
7
+ for (let t = e.length - 1; t >= 0; --t) if (!e[t]?.disabled) return t;
8
+ return -1;
9
+ }
10
+ function i(e, t, i) {
11
+ if (!e.length) return -1;
12
+ if (t < 0) return i > 0 ? n(e) : r(e);
13
+ let a = t;
14
+ for (let t = 0; t < e.length; t += 1) if (a = (a + i + e.length) % e.length, !e[a]?.disabled) return a;
15
+ return -1;
16
+ }
17
+ function a(e, t) {
18
+ return `${e}-option-${t}`;
19
+ }
20
+ function o(e, t) {
21
+ if (!(t < 0)) return a(e, t);
22
+ }
23
+ function s(a, s, c) {
24
+ let l = e(() => o(t(c), s.value));
25
+ function u() {
26
+ s.value = n(t(a));
27
+ }
28
+ function d(e) {
29
+ let n = t(a);
30
+ if (e) {
31
+ let t = n.findIndex((t) => !t.disabled && e(t.value));
32
+ if (t >= 0) {
33
+ s.value = t;
34
+ return;
35
+ }
36
+ }
37
+ s.value = -1;
38
+ }
39
+ function f() {
40
+ s.value = n(t(a));
41
+ }
42
+ function p() {
43
+ s.value = r(t(a));
44
+ }
45
+ function m(e) {
46
+ s.value = i(t(a), s.value, e);
47
+ }
48
+ function h() {
49
+ return t(a)[s.value];
50
+ }
51
+ return {
52
+ moveHighlight: m,
53
+ highlightLast: p,
54
+ resetHighlight: u,
55
+ highlightFirst: f,
56
+ activeDescendantId: l,
57
+ getHighlightedOption: h,
58
+ highlightCurrentSelection: d
59
+ };
60
+ }
61
+ //#endregion
62
+ export { n as findFirstEnabledOptionIndex, r as findLastEnabledOptionIndex, o as getListboxActiveDescendantId, a as getListboxOptionId, i as moveListboxHighlight, s as useListboxNavigation };
@@ -0,0 +1,4 @@
1
+ export { useListbox } from './composables/useListbox';
2
+ export { findFirstEnabledOptionIndex, findLastEnabledOptionIndex, getListboxActiveDescendantId, getListboxOptionId, moveListboxHighlight, useListboxNavigation, } from './composables/useListboxNavigation';
3
+ export type { ListboxClasses, ListboxColorOverrides, ListboxCustomProps, ListboxEmits, ListboxOption, ListboxOwnProps, ListboxProps, ListboxSlots, ListboxValue, } from './listbox.types';
4
+ export { default as Listbox } from './Listbox.vue';
@@ -0,0 +1,4 @@
1
+ import { useListbox as e } from "./composables/useListbox.js";
2
+ import { findFirstEnabledOptionIndex as t, findLastEnabledOptionIndex as n, getListboxActiveDescendantId as r, getListboxOptionId as i, moveListboxHighlight as a, useListboxNavigation as o } from "./composables/useListboxNavigation.js";
3
+ import s from "./Listbox.js";
4
+ export { s as Listbox, t as findFirstEnabledOptionIndex, n as findLastEnabledOptionIndex, r as getListboxActiveDescendantId, i as getListboxOptionId, a as moveListboxHighlight, e as useListbox, o as useListboxNavigation };
@@ -0,0 +1,170 @@
1
+ import { HTMLAttributes, Slot } from 'vue';
2
+ import { ListboxColor, ListboxOption, ListboxValue, MergeHtmlProps, MergeProps, PositionPlacement } from '@bridge-ui/core';
3
+ export interface ListboxColorOverrides {}
4
+ export interface ListboxClasses {
5
+ /**
6
+ * Classes merged onto the check icon.
7
+ */
8
+ check?: string;
9
+ /**
10
+ * Classes merged onto keyboard-highlighted options.
11
+ */
12
+ optionHighlighted?: string;
13
+ /**
14
+ * Classes merged onto selected options.
15
+ */
16
+ optionSelected?: string;
17
+ /**
18
+ * Classes merged onto the scrollable options container.
19
+ */
20
+ scroll?: string;
21
+ }
22
+ export interface ListboxCustomProps {
23
+ /**
24
+ * Props forwarded to the floating menu panel.
25
+ */
26
+ content?: HTMLAttributes;
27
+ /**
28
+ * Props forwarded to the scrollable options container.
29
+ */
30
+ scroll?: HTMLAttributes;
31
+ }
32
+ export type { ListboxOption, ListboxValue } from '@bridge-ui/core';
33
+ export interface ListboxEmits {
34
+ /**
35
+ * Emitted when the user activates an option.
36
+ */
37
+ select: [option: ListboxOption];
38
+ /**
39
+ * Emitted when open state should change (controlled state).
40
+ * Listen with `@show-change` / `v-on:show-change`.
41
+ */
42
+ "show-change": [show: boolean];
43
+ }
44
+ export interface ListboxOwnProps {
45
+ /**
46
+ * Element that anchors the floating panel (typically the field container).
47
+ */
48
+ anchorEl?: null | HTMLElement;
49
+ /**
50
+ * Classes for listbox parts.
51
+ */
52
+ classes?: ListboxClasses;
53
+ /**
54
+ * Color palette aligned with `FormField` (`primary`, `error`, …).
55
+ *
56
+ * @default "primary"
57
+ */
58
+ color?: MergeProps<ListboxColor, ListboxColorOverrides>;
59
+ /**
60
+ * Extra props for internal parts.
61
+ */
62
+ customProps?: ListboxCustomProps;
63
+ /**
64
+ * When true, the menu does not auto-focus the first item on open.
65
+ * Use when focus stays on a combobox input (e.g. searchable Select).
66
+ *
67
+ * @default false
68
+ */
69
+ disableAutoFocus?: boolean;
70
+ /**
71
+ * When true, the options list is not height-limited.
72
+ *
73
+ * @default false
74
+ */
75
+ disableMaxHeight?: boolean;
76
+ /**
77
+ * Message when the options list is empty.
78
+ *
79
+ * @default "No options"
80
+ */
81
+ emptyMessage?: string;
82
+ /**
83
+ * Hides the empty-state message.
84
+ *
85
+ * @default false
86
+ */
87
+ hideEmptyMessage?: boolean;
88
+ /**
89
+ * Index of the keyboard-highlighted option.
90
+ *
91
+ * @default -1
92
+ */
93
+ highlightedIndex?: number;
94
+ /**
95
+ * When `true`, applies invalidated option colors.
96
+ *
97
+ * @default false
98
+ */
99
+ invalidated?: boolean;
100
+ /**
101
+ * Whether a value is selected (shows checkmark when `showCheckmark` is true).
102
+ */
103
+ isSelected?: (value: ListboxValue) => boolean;
104
+ /**
105
+ * `id` of the element that labels the listbox (`aria-labelledby`).
106
+ */
107
+ labelledBy?: string;
108
+ /**
109
+ * Root id of the listbox (`aria-controls` on the combobox references this).
110
+ */
111
+ listboxId: string;
112
+ /**
113
+ * External loading state.
114
+ */
115
+ loading?: boolean;
116
+ /**
117
+ * Tailwind max-height class for the options scroll area (e.g. `max-h-80`).
118
+ *
119
+ * @default "max-h-60"
120
+ */
121
+ maxHeight?: string;
122
+ /**
123
+ * Whether multiple options can be selected.
124
+ *
125
+ * @default false
126
+ */
127
+ multiple?: boolean;
128
+ /**
129
+ * Options to render.
130
+ */
131
+ options: ListboxOption[];
132
+ /**
133
+ * Preferred placement of the panel relative to the anchor.
134
+ *
135
+ * @default "bottom-start"
136
+ */
137
+ placement?: PositionPlacement;
138
+ /**
139
+ * Shows a check icon on selected options.
140
+ *
141
+ * @default true
142
+ */
143
+ showCheckmark?: boolean;
144
+ }
145
+ export interface ListboxSlots {
146
+ /**
147
+ * Content below the list.
148
+ */
149
+ afterOptions?: Slot;
150
+ /**
151
+ * Content above the list.
152
+ */
153
+ beforeOptions?: Slot;
154
+ /**
155
+ * Custom empty-state content.
156
+ */
157
+ empty?: Slot;
158
+ /**
159
+ * Custom loading content.
160
+ */
161
+ loading?: Slot;
162
+ /**
163
+ * Custom option item content.
164
+ */
165
+ option?: Slot<{
166
+ option: ListboxOption;
167
+ selected: boolean;
168
+ }>;
169
+ }
170
+ export type ListboxProps = MergeHtmlProps<ListboxOwnProps, HTMLAttributes>;
@@ -0,0 +1,5 @@
1
+ import e from "./Menu.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Menu/Menu.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,36 @@
1
+ import { MenuOwnProps, MenuSlots } from './menu.types';
2
+ type __VLS_Slots = MenuSlots;
3
+ type __VLS_Props = MenuOwnProps;
4
+ type __VLS_ModelProps = {
5
+ modelValue?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (value: boolean) => any;
10
+ close: () => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
+ onClose?: (() => any) | undefined;
14
+ }>, {
15
+ offset: number;
16
+ rounded: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').MenuRounded, import('./menu.types').MenuRoundedOverrides>;
17
+ shadow: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').MenuShadow, import('./menu.types').MenuShadowOverrides>;
18
+ anchorEl: null | HTMLElement;
19
+ closeOnClickAway: boolean;
20
+ closeOnEscape: boolean;
21
+ disableAutoFocus: boolean;
22
+ disableScrollLock: boolean;
23
+ keepMounted: boolean;
24
+ persistent: boolean;
25
+ placement: import('@floating-ui/utils').Placement;
26
+ strategy: import('@bridge-ui/core').PositionStrategy;
27
+ teleportTo: false | string;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,80 @@
1
+ import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
2
+ import { useMenu as n } from "./composables/useMenu.js";
3
+ import { Fragment as r, Teleport as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, normalizeProps as p, openBlock as m, resolveDynamicComponent as h, unref as g, useModel as _, useSlots as v } from "vue";
4
+ //#region src/Components/Menu/Menu.vue?vue&type=script&setup=true&lang.ts
5
+ var y = /* @__PURE__ */ u({
6
+ inheritAttrs: !1,
7
+ __name: "Menu",
8
+ props: /* @__PURE__ */ d({
9
+ anchorEl: { default: null },
10
+ classes: {},
11
+ closeOnClickAway: {
12
+ type: Boolean,
13
+ default: !0
14
+ },
15
+ closeOnEscape: {
16
+ type: Boolean,
17
+ default: !0
18
+ },
19
+ customProps: {},
20
+ disableAutoFocus: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ disableScrollLock: {
25
+ type: Boolean,
26
+ default: !0
27
+ },
28
+ keepMounted: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ offset: { default: 4 },
33
+ onShowChange: {},
34
+ persistent: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ placement: { default: "bottom-start" },
39
+ rounded: { default: "md" },
40
+ shadow: { default: "md" },
41
+ strategy: { default: "fixed" },
42
+ teleportTo: {
43
+ type: [Boolean, String],
44
+ default: "body"
45
+ }
46
+ }, {
47
+ modelValue: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ modelModifiers: {}
52
+ }),
53
+ emits: /* @__PURE__ */ d(["close"], ["update:modelValue"]),
54
+ setup(u, { emit: d }) {
55
+ let y = v(), b = d, x = u, { merged: S, mounted: C, rootBind: w, triggerBind: T, contentBind: E, setTriggerRef: D, setContentRef: O } = n(x, {
56
+ offset: 4,
57
+ shadow: "md",
58
+ rounded: "md",
59
+ strategy: "fixed",
60
+ teleportTo: "body",
61
+ closeOnEscape: !0,
62
+ closeOnClickAway: !0,
63
+ disableScrollLock: !0,
64
+ placement: "bottom-start"
65
+ }, {
66
+ show: _(u, "modelValue"),
67
+ onClose: () => b("close"),
68
+ onShowChange: (e) => x.onShowChange?.(e)
69
+ }), k = a(() => e(y, "trigger")), A = a(() => S.value.teleportTo === !1), j = a(() => S.value.teleportTo === !1 ? "body" : S.value.teleportTo);
70
+ return (e, n) => (m(), c(r, null, [k.value ? (m(), c("div", p(f({ key: 0 }, g(w))), [l("div", f({ ref: g(D) }, g(T)), [(m(), o(h(g(t)(g(y), "trigger"))))], 16)], 16)) : s("", !0), (m(), o(i, {
71
+ to: j.value,
72
+ disabled: A.value
73
+ }, [g(C) ? (m(), c("div", f({
74
+ key: 0,
75
+ ref: g(O)
76
+ }, g(E)), [(m(), o(h(g(t)(g(y), "default"))))], 16)) : s("", !0)], 8, ["to", "disabled"]))], 64));
77
+ }
78
+ });
79
+ //#endregion
80
+ export { y as default };
@@ -0,0 +1,54 @@
1
+ import { ComponentPublicInstance, Ref } from 'vue';
2
+ import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
3
+ import { MenuOwnProps, MenuProps } from '../menu.types';
4
+ type MenuLibDefaults = LibDefaultsShape<MenuOwnProps, "offset" | "shadow" | "rounded" | "strategy" | "placement" | "teleportTo" | "closeOnEscape" | "closeOnClickAway" | "disableScrollLock">;
5
+ type MenuMerged = MergeLibDefaults<MenuOwnProps, MenuLibDefaults>;
6
+ export type MenuOptions = {
7
+ /**
8
+ * Called when the menu requests to close.
9
+ * Sugar for `onShowChange(false)`.
10
+ */
11
+ onClose?: () => void;
12
+ /**
13
+ * Called when `show` should change (controlled state).
14
+ */
15
+ onShowChange?: (show: boolean) => void;
16
+ /**
17
+ * Whether the menu is visible (`defineModel()` / `v-model`).
18
+ *
19
+ * @default false
20
+ */
21
+ show?: Ref<boolean>;
22
+ };
23
+ export declare function useMenu(props: MenuOwnProps, libDefaults: MenuLibDefaults, options?: MenuOptions): {
24
+ merged: import('vue').ComputedRef<MenuMerged>;
25
+ menuId: string;
26
+ mounted: Ref<boolean, boolean>;
27
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
28
+ class: string;
29
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<MenuProps, "offset" | "classes" | "customProps" | "rounded" | "shadow" | "closeOnClickAway" | "closeOnEscape" | "disableAutoFocus" | "disableScrollLock" | "keepMounted" | "persistent" | "placement" | "strategy" | "teleportTo">, "anchorEl" | "onShowChange">>>;
30
+ isPortaled: import('vue').ComputedRef<boolean>;
31
+ triggerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
32
+ tabindex: number;
33
+ role: string;
34
+ "aria-expanded": boolean;
35
+ onKeydown: (event: KeyboardEvent) => void;
36
+ "aria-haspopup": "menu";
37
+ onClickCapture: () => void;
38
+ "aria-controls": string | undefined;
39
+ class: string;
40
+ }, "class", import('vue').HTMLAttributes | undefined, {}>>;
41
+ contentBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
42
+ id: string;
43
+ role: string;
44
+ onKeydown: (event: KeyboardEvent) => void;
45
+ style: {
46
+ zIndex: number;
47
+ };
48
+ "aria-hidden": boolean | undefined;
49
+ class: string;
50
+ }, "class", import('vue').HTMLAttributes | undefined, {}>>;
51
+ setTriggerRef: (element: null | Element | ComponentPublicInstance) => void;
52
+ setContentRef: (element: null | Element | ComponentPublicInstance) => void;
53
+ };
54
+ export {};