@bridge-ui/vue 0.0.6 → 0.0.8

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 (204) hide show
  1. package/ai/AGENTS.md +31 -0
  2. package/ai/README.md +35 -0
  3. package/ai/guidelines/core.md +44 -0
  4. package/ai/llms.txt +38 -0
  5. package/ai/skills/bridge-ui-components/SKILL.md +37 -0
  6. package/ai/skills/bridge-ui-forms/SKILL.md +38 -0
  7. package/ai/skills/bridge-ui-overlays/SKILL.md +37 -0
  8. package/ai/skills/bridge-ui-setup/SKILL.md +38 -0
  9. package/bin/__tests__/ai.test.ts +319 -0
  10. package/bin/ai.mjs +469 -0
  11. package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +8 -8
  12. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +5 -5
  13. package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +17 -17
  14. package/dist/Adapters/I18n/index.d.ts +1 -1
  15. package/dist/Adapters/I18n/index.js +2 -2
  16. package/dist/Adapters/I18n/useI18nAdapter.d.ts +7 -3
  17. package/dist/Adapters/I18n/useI18nAdapter.js +12 -7
  18. package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
  19. package/dist/Adapters/index.d.ts +1 -1
  20. package/dist/Adapters/index.js +3 -3
  21. package/dist/Components/Alert/composables/useAlert.js +17 -17
  22. package/dist/Components/Autocomplete/Autocomplete.js +5 -0
  23. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +40 -0
  24. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +197 -0
  25. package/dist/Components/Autocomplete/AutocompleteOption.js +5 -0
  26. package/dist/Components/Autocomplete/AutocompleteOption.vue.d.ts +4 -0
  27. package/dist/Components/Autocomplete/AutocompleteOption.vue_vue_type_script_setup_true_lang.js +32 -0
  28. package/dist/Components/Autocomplete/autocomplete.types.d.ts +285 -0
  29. package/dist/Components/Autocomplete/autocompleteInjectionKey.d.ts +7 -0
  30. package/dist/Components/Autocomplete/autocompleteInjectionKey.js +4 -0
  31. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +763 -0
  32. package/dist/Components/Autocomplete/composables/useAutocomplete.js +386 -0
  33. package/dist/Components/Autocomplete/index.d.ts +4 -0
  34. package/dist/Components/Autocomplete/index.js +4 -0
  35. package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
  36. package/dist/Components/Avatar/composables/useAvatar.js +13 -13
  37. package/dist/Components/Badge/composables/useBadge.js +8 -8
  38. package/dist/Components/BaseField/BaseField.js +5 -0
  39. package/dist/Components/BaseField/BaseField.vue.d.ts +15 -0
  40. package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +41 -0
  41. package/dist/Components/BaseField/BaseFieldLabel.js +5 -0
  42. package/dist/Components/BaseField/BaseFieldLabel.vue.d.ts +7 -0
  43. package/dist/Components/BaseField/BaseFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
  44. package/dist/Components/BaseField/baseField.types.d.ts +222 -0
  45. package/dist/Components/BaseField/composables/useBaseField.d.ts +55 -0
  46. package/dist/Components/BaseField/composables/useBaseField.js +131 -0
  47. package/dist/Components/BaseField/index.d.ts +4 -0
  48. package/dist/Components/BaseField/index.js +3 -0
  49. package/dist/Components/Button/composables/useButton.d.ts +1 -1
  50. package/dist/Components/Button/composables/useButton.js +14 -14
  51. package/dist/Components/Card/composables/useCard.js +27 -27
  52. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -2
  53. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
  54. package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
  55. package/dist/Components/Chip/Chip.vue.d.ts +1 -1
  56. package/dist/Components/Chip/composables/useChip.d.ts +1 -1
  57. package/dist/Components/Chip/composables/useChip.js +6 -6
  58. package/dist/Components/Divider/composables/useDivider.js +5 -5
  59. package/dist/Components/Drawer/Drawer.vue.d.ts +2 -2
  60. package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
  61. package/dist/Components/Drawer/composables/useDrawer.js +23 -23
  62. package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +1 -1
  63. package/dist/Components/FormControl/composables/useFormControl.d.ts +13 -4
  64. package/dist/Components/FormControl/composables/useFormControl.js +63 -59
  65. package/dist/Components/FormControl/formControl.types.d.ts +6 -6
  66. package/dist/Components/FormControl/index.d.ts +1 -1
  67. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  68. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  69. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  70. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  71. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
  72. package/dist/Components/FormField/composables/useFormField.d.ts +7 -3
  73. package/dist/Components/FormField/composables/useFormField.js +29 -29
  74. package/dist/Components/FormField/formField.types.d.ts +14 -14
  75. package/dist/Components/Icon/composables/useIcon.js +5 -5
  76. package/dist/Components/Label/composables/useLabel.js +5 -5
  77. package/dist/Components/Link/composables/useLink.js +9 -9
  78. package/dist/Components/List/composables/useList.js +6 -6
  79. package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
  80. package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
  81. package/dist/Components/ListItem/composables/useListItem.js +20 -20
  82. package/dist/Components/ListSection/composables/useListSection.js +8 -8
  83. package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
  84. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +29 -28
  85. package/dist/Components/Listbox/composables/useListbox.d.ts +10 -1
  86. package/dist/Components/Listbox/composables/useListbox.js +23 -23
  87. package/dist/Components/Listbox/index.d.ts +1 -0
  88. package/dist/Components/Listbox/index.js +3 -3
  89. package/dist/Components/Listbox/listbox.types.d.ts +6 -0
  90. package/dist/Components/Menu/Menu.vue.d.ts +2 -2
  91. package/dist/Components/Menu/composables/useMenu.js +43 -43
  92. package/dist/Components/Modal/Modal.vue.d.ts +2 -2
  93. package/dist/Components/Modal/composables/useModal.d.ts +1 -1
  94. package/dist/Components/Modal/composables/useModal.js +18 -18
  95. package/dist/Components/NumberField/NumberField.vue.d.ts +2 -2
  96. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +34 -34
  97. package/dist/Components/NumberField/composables/useNumberField.d.ts +4 -4
  98. package/dist/Components/NumberField/composables/useNumberField.js +13 -10
  99. package/dist/Components/OtpField/OtpField.js +5 -0
  100. package/dist/Components/OtpField/OtpField.vue.d.ts +31 -0
  101. package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +62 -0
  102. package/dist/Components/OtpField/composables/useOtpField.d.ts +287 -0
  103. package/dist/Components/OtpField/composables/useOtpField.js +154 -0
  104. package/dist/Components/OtpField/index.d.ts +4 -0
  105. package/dist/Components/OtpField/index.js +3 -0
  106. package/dist/Components/OtpField/otpField.types.d.ts +120 -0
  107. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +23 -23
  108. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +4 -4
  109. package/dist/Components/PasswordField/composables/usePasswordField.js +6 -3
  110. package/dist/Components/Progress/composables/useProgress.js +11 -11
  111. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -2
  112. package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
  113. package/dist/Components/Radio/composables/useRadio.js +9 -9
  114. package/dist/Components/Select/Select.vue.d.ts +5 -5
  115. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +16 -13
  116. package/dist/Components/Select/composables/useSelect.d.ts +5 -4
  117. package/dist/Components/Select/composables/useSelect.js +167 -163
  118. package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
  119. package/dist/Components/Slider/Slider.js +5 -0
  120. package/dist/Components/Slider/Slider.vue.d.ts +25 -0
  121. package/dist/Components/Slider/Slider.vue_vue_type_script_setup_true_lang.js +113 -0
  122. package/dist/Components/Slider/composables/useSlider.d.ts +482 -0
  123. package/dist/Components/Slider/composables/useSlider.js +287 -0
  124. package/dist/Components/Slider/index.d.ts +4 -0
  125. package/dist/Components/Slider/index.js +3 -0
  126. package/dist/Components/Slider/slider.types.d.ts +169 -0
  127. package/dist/Components/Snackbar/Snackbar.vue.d.ts +2 -2
  128. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +54 -54
  129. package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
  130. package/dist/Components/Spinner/composables/useSpinner.js +11 -11
  131. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -2
  132. package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
  133. package/dist/Components/Switch/composables/useSwitch.js +9 -9
  134. package/dist/Components/Tab/composables/useTab.js +11 -11
  135. package/dist/Components/TabList/composables/useTabList.js +7 -7
  136. package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
  137. package/dist/Components/Tabs/Tabs.vue.d.ts +2 -2
  138. package/dist/Components/Tabs/composables/useTabs.js +22 -22
  139. package/dist/Components/TextField/TextField.vue.d.ts +1 -1
  140. package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +6 -6
  141. package/dist/Components/TextField/composables/useTextField.d.ts +4 -4
  142. package/dist/Components/TextField/composables/useTextField.js +2 -2
  143. package/dist/Components/Textarea/Textarea.vue.d.ts +1 -1
  144. package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +6 -6
  145. package/dist/Components/Textarea/composables/useTextarea.d.ts +4 -4
  146. package/dist/Components/Textarea/composables/useTextarea.js +10 -9
  147. package/dist/Components/Tooltip/composables/useTooltip.js +17 -17
  148. package/dist/Provider/bridgeUITypes.d.ts +4 -1
  149. package/dist/Provider/createBridgeUIApi.js +13 -1
  150. package/dist/Utils/index.d.ts +3 -3
  151. package/dist/Utils/index.js +11 -8
  152. package/dist/Utils/useBreakpoint.js +7 -7
  153. package/dist/augments.d.ts +29 -17
  154. package/dist/index.d.ts +11 -3
  155. package/dist/index.js +88 -80
  156. package/docs/README.md +56 -0
  157. package/docs/components/Alert.md +96 -0
  158. package/docs/components/Autocomplete.md +198 -0
  159. package/docs/components/Avatar.md +60 -0
  160. package/docs/components/Badge.md +47 -0
  161. package/docs/components/BaseField.md +126 -0
  162. package/docs/components/BridgeUIProvider.md +151 -0
  163. package/docs/components/Button.md +93 -0
  164. package/docs/components/Card.md +287 -0
  165. package/docs/components/Checkbox.md +87 -0
  166. package/docs/components/Divider.md +56 -0
  167. package/docs/components/Drawer.md +137 -0
  168. package/docs/components/FormControl.md +66 -0
  169. package/docs/components/FormField.md +71 -0
  170. package/docs/components/I18n.md +125 -0
  171. package/docs/components/Icon.md +88 -0
  172. package/docs/components/Label.md +31 -0
  173. package/docs/components/Link.md +71 -0
  174. package/docs/components/List.md +167 -0
  175. package/docs/components/Menu.md +97 -0
  176. package/docs/components/Modal.md +154 -0
  177. package/docs/components/NumberField.md +80 -0
  178. package/docs/components/OtpField.md +133 -0
  179. package/docs/components/PasswordField.md +82 -0
  180. package/docs/components/Progress.md +68 -0
  181. package/docs/components/Radio.md +91 -0
  182. package/docs/components/Select.md +181 -0
  183. package/docs/components/Skeleton.md +38 -0
  184. package/docs/components/Slider.md +140 -0
  185. package/docs/components/Snackbar.md +99 -0
  186. package/docs/components/Spinner.md +61 -0
  187. package/docs/components/Switch.md +72 -0
  188. package/docs/components/Tabs.md +207 -0
  189. package/docs/components/TextField.md +72 -0
  190. package/docs/components/Textarea.md +80 -0
  191. package/docs/components/Tooltip.md +125 -0
  192. package/docs/components/useBreakpoint.md +100 -0
  193. package/docs/components/useDialogAction.md +97 -0
  194. package/docs/components/useDrawerAction.md +75 -0
  195. package/docs/components/useModalAction.md +75 -0
  196. package/docs/components/useSnackbarAction.md +85 -0
  197. package/docs/examples/i18n-dictionary.ts +48 -0
  198. package/docs/examples/i18n-vue-i18n.ts +34 -0
  199. package/docs/examples/icon-fontawesome.ts +112 -0
  200. package/docs/examples/icon-heroicons.ts +57 -0
  201. package/docs/examples/icon-lucide.ts +57 -0
  202. package/docs/examples/icon-phosphor.ts +57 -0
  203. package/docs/examples/icon-tabler.ts +57 -0
  204. package/package.json +13 -5
@@ -0,0 +1,71 @@
1
+ # FormField
2
+
3
+ > Building block for field chrome. Prefer public fields (`TextField`, `Select`, …) in apps; FormField remains exported for advanced composition. Not a `BridgeUIComponentsConfig` key — theme via the public parent (`components.TextField`, `components.Select`, …).
4
+
5
+ Form field chrome (label, adornments, error) used by TextField, Select, and other inputs.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import { FormField } from "@bridge-ui/vue";
11
+ ```
12
+
13
+ ## Examples
14
+
15
+ ### Usage
16
+
17
+ ```vue
18
+ <FormField label="Email" description="We never share your email.">
19
+ <input type="email" class="w-full rounded border px-3 py-2" />
20
+ </FormField>
21
+ ```
22
+
23
+ ### customProps
24
+
25
+ ```vue
26
+ <FormField
27
+ label="Email"
28
+ description="We never share your email."
29
+ :custom-props="{
30
+ root: { id: 'email-field' },
31
+ description: { id: 'email-desc' },
32
+ label: { id: 'email-label', for: 'email-input' },
33
+ input: { id: 'email-input', autocomplete: 'email', name: 'email' },
34
+ }"
35
+ >
36
+ <input type="email" class="w-full rounded border px-3 py-2" />
37
+ </FormField>
38
+ ```
39
+
40
+ ## Props
41
+
42
+ | Prop | Type | Default | Description |
43
+ | ------------------ | ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | `classes` | `FormFieldClasses` | — | Classes for the field chrome and the control (includes label, container, adornments). |
45
+ | `color` | `FormFieldColor` | "primary" | The color to apply to the field control. |
46
+ | `controlId` | `string` | — | Associates labels and helper text with a form control. When omitted, an id is generated automatically. |
47
+ | `corner` | `string` | — | Secondary label text at the inline end of the header row. |
48
+ | `customProps` | `FormFieldCustomProps` | — | Extra props for internal parts (`header`, `label`, `input`, `container`, …). |
49
+ | `description` | `string` | — | Helper text below the control (hidden when the field is invalid). |
50
+ | `disabled` | `boolean` | `false` | Whether the control is disabled. |
51
+ | `end` | `string` | — | Inline-end text inside the field (suffix), e.g. `@mail.com`. |
52
+ | `endIcon` | `LucideIcon` | — | Icon at the **inline end** (physical right in `ltr`, physical left in `rtl`). |
53
+ | `error` | `boolean` | `false` | When `true`, applies invalid styling on the label and hides description. |
54
+ | `errorIcon` | `LucideIcon` | CircleAlert | Icon used when `showErrorIcon` is enabled and the field is invalid. |
55
+ | `errorMessage` | `string` | — | Error message below the control. Shown only when set (or via `#errorMessage` slot). |
56
+ | `field` | `UseFormFieldReturn` | — | Pre-composed field API from a parent composable (e.g. `useTextField`). Used by `<FormField :field="…" />`; not set on field wrappers such as TextField. |
57
+ | `hideErrorMessage` | `boolean` | `false` | When `true`, does not reserve space below the control for error messages. |
58
+ | `label` | `string` | — | The primary label text above the control. |
59
+ | `readonly` | `boolean` | `false` | Whether the control is read-only. |
60
+ | `required` | `boolean` | `false` | Shows a red asterisk on the label. |
61
+ | `rounded` | `FormFieldRounded` | "md" | The roundedness of the field control. |
62
+ | `showErrorIcon` | `boolean` | `true` | When `true` and the field is invalid, shows an error icon at the inline end when no `endIcon` or `end` slot is present. |
63
+ | `size` | `FormFieldSize` | "md" | Typography scale for label, corner, description, and error message, and control sizing (input, container, icons). |
64
+ | `slots` | `FormFieldSlots` | — | Chrome slots (`label`, `description`, `errorMessage`, …) via `#slot` or prop; inline adornments use `#start` / `#end`. |
65
+ | `start` | `string` | — | Inline-start text inside the field (prefix), e.g. `https://`. |
66
+ | `startIcon` | `LucideIcon` | — | Icon at the **inline start** (physical left in `ltr`, physical right in `rtl`). |
67
+ | `variant` | `FormFieldVariant` | "outline" | The visual variant of the field shell and control. |
68
+
69
+ ## Related components
70
+
71
+ TextField, Select, NumberField, Textarea, PasswordField
@@ -0,0 +1,125 @@
1
+ # i18n
2
+
3
+ Bridge chrome strings (aria-labels, empty/loading copy) resolve through an optional i18n adapter on `BridgeUIProvider` / `createBridgeUI` (`global.i18n`). Without an adapter, the English source string is returned as-is.
4
+
5
+ Lookup is **gettext-style**: the source English text is the key. Multi-locale
6
+ adapters can keep the active locale internally via optional `setLocale`.
7
+
8
+ ```ts
9
+ const resolveMessage = useResolveMessage();
10
+
11
+ resolveMessage("Hide password");
12
+ ```
13
+
14
+ `useResolveMessage` reads the active adapter from context. **Interpolation and
15
+ pluralization are the adapter’s job** (vue-i18n, i18next, or a custom `t`).
16
+ Bridge `setLocale` updates `global.locale` and calls optional `adapter.setLocale`
17
+ — persistence (localStorage, backend) stays in the app.
18
+
19
+ Implement `I18nAdapter` as a plain object — Bridge only defines the interface.
20
+
21
+ ## Import
22
+
23
+ ```ts
24
+ import { useResolveMessage, type I18nAdapter } from "@bridge-ui/vue";
25
+ ```
26
+
27
+ ## Examples
28
+
29
+ ### Resolve in a component
30
+
31
+ ```vue
32
+ <script setup lang="ts">
33
+ import { useResolveMessage } from "@bridge-ui/vue";
34
+
35
+ const resolveMessage = useResolveMessage();
36
+ </script>
37
+
38
+ <template>
39
+ <button type="button" :aria-label="resolveMessage('Clear selection')">
40
+ Clear
41
+ </button>
42
+ </template>
43
+ ```
44
+
45
+ ### Dictionary adapter
46
+
47
+ Locale-keyed source→string map (no replace/plural). Optional `setLocale`
48
+ updates the active locale used by `t`.
49
+
50
+ ```ts
51
+ import { createBridgeUI } from "@bridge-ui/vue";
52
+ import { createDictionaryI18nAdapter } from "@examples/i18n-dictionary";
53
+
54
+ const i18n = createDictionaryI18nAdapter();
55
+
56
+ const bridge = createBridgeUI({
57
+ global: { i18n, locale: "pt-BR" },
58
+ });
59
+ ```
60
+
61
+ ### Custom adapter
62
+
63
+ ```ts
64
+ import { get } from "es-toolkit/compat";
65
+ import type { I18nAdapter } from "@bridge-ui/vue";
66
+
67
+ const messages: Record<string, Record<string, string>> = {
68
+ "pt-BR": {
69
+ Close: "Fechar",
70
+ "Hide password": "Ocultar senha",
71
+ "Clear selection": "Limpar seleção",
72
+ },
73
+ };
74
+
75
+ let locale = "en-US";
76
+
77
+ const i18n: I18nAdapter = {
78
+ setLocale(next) {
79
+ locale = next;
80
+ },
81
+ t(message) {
82
+ return get(messages, [locale, message], message);
83
+ },
84
+ };
85
+ ```
86
+
87
+ ### vue-i18n (replace & plural)
88
+
89
+ ```ts
90
+ import { createI18n } from "vue-i18n";
91
+ import { createVueI18nAdapter } from "@examples/i18n-vue-i18n";
92
+
93
+ const vueI18n = createI18n({ legacy: false, locale: "en-US", messages: {} });
94
+ const i18n = createVueI18nAdapter(vueI18n.global);
95
+
96
+ const resolveMessage = useResolveMessage();
97
+ resolveMessage("{count} item", { count: 3 });
98
+ // → vue-i18n handles interpolation / plural rules
99
+
100
+ setLocale("pt-BR"); // Bridge locale + i18n.locale via adapter.setLocale
101
+ ```
102
+
103
+ Other ready examples:
104
+
105
+ | File | Library | Replace / plural |
106
+ | -------------------- | -------------------- | ---------------- |
107
+ | `i18n-dictionary.ts` | In-memory dictionary | No (static map) |
108
+ | `i18n-vue-i18n.ts` | vue-i18n | Yes (via lib) |
109
+
110
+ ## Chrome strings
111
+
112
+ | Source (key) |
113
+ | ----------------- |
114
+ | `Close` |
115
+ | `Loading...` |
116
+ | `No options` |
117
+ | `Show password` |
118
+ | `Hide password` |
119
+ | `Clear selection` |
120
+ | `Increment value` |
121
+ | `Decrement value` |
122
+
123
+ ## Related components
124
+
125
+ BridgeUIProvider, PasswordField, NumberField, Select, Listbox, Snackbar
@@ -0,0 +1,88 @@
1
+ # Icon
2
+
3
+ Renders an icon from a semantic name (via the icon adapter) or a concrete icon component, with design-system sizing.
4
+
5
+ Semantic names require an icon adapter on `BridgeUIProvider` / `createBridgeUI` (`global.icons`). Bridge only defines the `IconAdapter` interface — copy an example from `packages/vue/docs/examples/`.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import { Icon } from "@bridge-ui/vue/Components/Icon";
11
+ ```
12
+
13
+ ## Examples
14
+
15
+ ### Icon component
16
+
17
+ ```ts
18
+ import { Info } from "@lucide/vue";
19
+ ```
20
+
21
+ ```vue
22
+ <Icon size="md" :icon="Info" />
23
+ ```
24
+
25
+ ### Semantic name + adapter
26
+
27
+ ```ts
28
+ import { createBridgeUI } from "@bridge-ui/vue";
29
+ import { createLucideIconAdapter } from "@examples/icon-lucide";
30
+
31
+ const icons = createLucideIconAdapter();
32
+
33
+ app.use(
34
+ createBridgeUI({
35
+ global: { icons },
36
+ }),
37
+ );
38
+ ```
39
+
40
+ ```vue
41
+ <Icon size="md" icon="info" />
42
+ ```
43
+
44
+ Other ready examples (same `create*IconAdapter()` shape):
45
+
46
+ | File | Library |
47
+ | --------------------- | --------------------------- |
48
+ | `icon-lucide.ts` | Lucide |
49
+ | `icon-heroicons.ts` | Heroicons (24 outline) |
50
+ | `icon-tabler.ts` | Tabler Icons |
51
+ | `icon-phosphor.ts` | Phosphor Icons |
52
+ | `icon-fontawesome.ts` | Font Awesome 6 (free solid) |
53
+
54
+ ### Font Awesome definitions
55
+
56
+ With the Font Awesome adapter, pass definitions directly — `normalize` wraps them:
57
+
58
+ ```ts
59
+ import { createBridgeUI } from "@bridge-ui/vue";
60
+ import { faCoffee } from "@fortawesome/free-solid-svg-icons";
61
+ import { createFontAwesomeIconAdapter } from "@examples/icon-fontawesome";
62
+
63
+ const icons = createFontAwesomeIconAdapter();
64
+
65
+ app.use(
66
+ createBridgeUI({
67
+ global: { icons },
68
+ }),
69
+ );
70
+ ```
71
+
72
+ ```vue
73
+ <Icon :icon="faCoffee" />
74
+ <Icon icon="info" />
75
+ ```
76
+
77
+ The example also exports `wrapFaIcon` if you need a component outside `<Icon />`.
78
+
79
+ ## Props
80
+
81
+ | Prop | Type | Default | Description |
82
+ | ------ | ------------ | ------- | ---------------------------------------------------------------------------- |
83
+ | `icon` | `IconSource` | — | Semantic name, icon component, or adapter-normalized native value (e.g. FA). |
84
+ | `size` | `IconSize` | "md" | The size of the icon. |
85
+
86
+ ## Related components
87
+
88
+ Button, Alert, TextField, BridgeUIProvider
@@ -0,0 +1,31 @@
1
+ # Label
2
+
3
+ Accessible label element with required and error styling.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Label } from "@bridge-ui/vue/Components/Label";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Label required for="email">Email</Label>
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | Prop | Type | Default | Description |
22
+ | ---------- | -------------- | ------- | --------------------------------------------------- |
23
+ | `classes` | `LabelClasses` | — | The classes to apply to the label. |
24
+ | `error` | `boolean` | `false` | Applies error label colors. |
25
+ | `for` | `string` | — | Associates the label with a form control. |
26
+ | `required` | `boolean` | `false` | Shows a red required asterisk after the label text. |
27
+ | `size` | `LabelSize` | "md" | Typography scale aligned with TextField sizes. |
28
+
29
+ ## Related components
30
+
31
+ FormField, FormControl
@@ -0,0 +1,71 @@
1
+ # Link
2
+
3
+ Styled anchor for in-app and external navigation.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Link } from "@bridge-ui/vue/Components/Link";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Link href="/dashboard">Dashboard</Link>
17
+
18
+ <Link color="primary" underline="hover" href="https://example.com">
19
+ External link
20
+ </Link>
21
+
22
+ <Link href="#" :left-icon="Info">
23
+ With icon
24
+ </Link>
25
+ ```
26
+
27
+ ### States
28
+
29
+ ```vue
30
+ <Link disabled href="/button">
31
+ Disabled
32
+ </Link>
33
+
34
+ <Link external href="https://example.com">
35
+ External
36
+ </Link>
37
+ ```
38
+
39
+ ### customProps
40
+
41
+ ```vue
42
+ <Link
43
+ href="#"
44
+ :left-icon="ExternalLink"
45
+ :custom-props="{
46
+ leftIcon: { 'aria-hidden': true },
47
+ root: { id: 'docs-link', target: '_blank', rel: 'noopener noreferrer' },
48
+ }"
49
+ >
50
+ Open documentation
51
+ </Link>
52
+ ```
53
+
54
+ ## Props
55
+
56
+ | Prop | Type | Default | Description |
57
+ | ------------- | ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------- |
58
+ | `classes` | `LinkClasses` | — | The classes to apply to the link. |
59
+ | `color` | `LinkColor` | "primary" | The color to apply to the link. |
60
+ | `customProps` | `LinkCustomProps` | — | Extra props for internal parts (`leftIcon`, `rightIcon`, etc.). Root HTML attributes stay on the component top level. |
61
+ | `disabled` | `boolean` | `false` | Whether the link is disabled. |
62
+ | `external` | `boolean` | `false` | Whether the link opens in a new tab. |
63
+ | `href` | `string` | — | The URL the link points to. |
64
+ | `leftIcon` | `LucideIcon` | — | The icon to display before the link text. |
65
+ | `rightIcon` | `LucideIcon` | — | The icon to display after the link text. |
66
+ | `size` | `LinkSize` | "md" | The size of the link. |
67
+ | `underline` | `LinkUnderline` | "hover" | The underline behavior of the link. |
68
+
69
+ ## Related components
70
+
71
+ Button
@@ -0,0 +1,167 @@
1
+ # List
2
+
3
+ Vertical list container. Use with `ListItem` and `ListSection`.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { List } from "@bridge-ui/vue/Components/List";
9
+ import { ListItem } from "@bridge-ui/vue/Components/ListItem";
10
+ import { ListSection } from "@bridge-ui/vue/Components/ListSection";
11
+ ```
12
+
13
+ ## Examples
14
+
15
+ ### Usage
16
+
17
+ ```vue
18
+ <List>
19
+ <ListItem primary="Inbox" secondary="12 messages" />
20
+ <ListItem primary="Drafts" secondary="3 items" />
21
+ <ListItem primary="Sent" />
22
+ </List>
23
+ ```
24
+
25
+ ### Sections
26
+
27
+ ```vue
28
+ <List>
29
+ <ListSection title="Folders" />
30
+ <ListItem primary="Inbox" />
31
+ <ListItem primary="Drafts" />
32
+ <ListSection title="Labels" />
33
+ <ListItem primary="Important" />
34
+ </List>
35
+ ```
36
+
37
+ ### Interactive
38
+
39
+ ```vue
40
+ <List role="menu">
41
+ <ListItem
42
+ interactive
43
+ role="menuitem"
44
+ primary="Profile"
45
+ v-on:click="selected = 'profile'"
46
+ :selected="selected === 'profile'"
47
+ />
48
+ <ListItem
49
+ interactive
50
+ role="menuitem"
51
+ primary="Settings"
52
+ v-on:click="selected = 'settings'"
53
+ :selected="selected === 'settings'"
54
+ />
55
+ </List>
56
+ ```
57
+
58
+ ### Start and end slots
59
+
60
+ ```vue
61
+ <ListItem interactive primary="Inbox" secondary="12 unread messages">
62
+ <template #start>
63
+ <Mail class="text-secondary-500 size-5" />
64
+ </template>
65
+
66
+ <template #end>
67
+ <span class="text-secondary-400 text-xs">12</span>
68
+ </template>
69
+ </ListItem>
70
+ ```
71
+
72
+ ### Selected icon
73
+
74
+ Selected rows show a check icon by default. Customize it with `selectedIcon` on `ListItem`, or pass `null` to hide it. Providing the `#end` slot replaces the selected icon.
75
+
76
+ ```vue
77
+ <List>
78
+ <ListItem selected interactive primary="Inbox" />
79
+ <ListItem selected interactive primary="Starred" :selected-icon="Star" />
80
+ <ListItem selected interactive primary="No icon" :selected-icon="null" />
81
+ </List>
82
+ ```
83
+
84
+ ### Disabled and divider
85
+
86
+ ```vue
87
+ <ListItem interactive primary="Available action" />
88
+ <ListItem disabled interactive primary="Disabled action" />
89
+ <ListItem divider primary="With divider" />
90
+ ```
91
+
92
+ ### Nested
93
+
94
+ ```vue
95
+ <List>
96
+ <ListItem primary="Documents" />
97
+ <List nested>
98
+ <ListItem primary="Reports" />
99
+ <ListItem primary="Invoices" />
100
+ </List>
101
+ <ListItem primary="Settings" />
102
+ </List>
103
+ ```
104
+
105
+ ### Sticky section
106
+
107
+ With the default `as="li"`, sticky styles apply on the section root. The list (or a parent) needs a scroll container with a constrained height.
108
+
109
+ ```vue
110
+ <div class="max-h-48 overflow-y-auto">
111
+ <List>
112
+ <ListSection sticky title="Section A" />
113
+ <ListItem primary="Item A1" />
114
+ <ListSection sticky title="Section B" />
115
+ <ListItem primary="Item B1" />
116
+ </List>
117
+ </div>
118
+ ```
119
+
120
+ ### Inset section
121
+
122
+ ```vue
123
+ <ListSection inset title="With icons below" />
124
+ ```
125
+
126
+ ## Props (`List`)
127
+
128
+ | Prop | Type | Default | Description |
129
+ | ------------- | ----------------------- | ------- | ---------------------------------------------------------------------------------- |
130
+ | `as` | `"nav" \| "ol" \| "ul"` | "ul" | The element to render as. |
131
+ | `classes` | `ListClasses` | — | The classes to apply to the list. |
132
+ | `customProps` | `ListCustomProps` | — | Props forwarded to each list part. |
133
+ | `dense` | `boolean` | `false` | Compact vertical spacing on items (`ListItem` / `ListSection`), not the list root. |
134
+ | `nested` | `boolean` | `false` | When true, indents the list for nested navigation/submenus. |
135
+
136
+ ## Props (`ListItem`)
137
+
138
+ | Prop | Type | Default | Description |
139
+ | -------------- | ------------------------------------ | -------- | ---------------------------------------------------------------------------------- |
140
+ | `as` | `"div" \| "li"` | "li" | The element to render as. |
141
+ | `classes` | `ListItemClasses` | — | The classes to apply to the item. |
142
+ | `customProps` | `ListItemCustomProps` | — | Props forwarded to each item part. |
143
+ | `dense` | `boolean` | — | Compact vertical padding. Inherits `dense` from parent `List` when omitted. |
144
+ | `disabled` | `boolean` | `false` | When true, the item is not interactive and appears muted. |
145
+ | `divider` | `boolean` | `false` | When true, renders a bottom divider on the item. |
146
+ | `interactive` | `boolean` | `false` | When true, applies hover/focus styles and `tabIndex={0}` on the inner wrapper. |
147
+ | `primary` | `string` | — | Primary label text. |
148
+ | `role` | `"button" \| "menuitem" \| "option"` | "button" | ARIA role for the interactive wrapper. |
149
+ | `secondary` | `string` | — | Secondary/description text below the primary line. |
150
+ | `selected` | `boolean` | `false` | When true, highlights the item as selected. |
151
+ | `selectedIcon` | `null \| LucideIcon` | `Check` | Icon shown when `selected` is true. Use `null` to hide it. Replaced by `#end`. |
152
+ | `value` | `ListboxValue` | — | When set inside a `Select` / `Listbox`, registers this row as a selectable option. |
153
+
154
+ ## Props (`ListSection`)
155
+
156
+ | Prop | Type | Default | Description |
157
+ | ------------- | ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
158
+ | `as` | `"div" \| "li"` | "li" | The element to render as. |
159
+ | `classes` | `ListSectionClasses` | — | The classes to apply to the section. |
160
+ | `customProps` | `ListSectionCustomProps` | — | Props forwarded to each section part. |
161
+ | `inset` | `boolean` | `false` | When true, adds left padding to align with items that have leading icons. |
162
+ | `sticky` | `boolean` | `false` | When true, sticks the heading while scrolling. On `as="li"` (default), sticky + opaque background apply to the root; on `as="div"`, they apply to the title. |
163
+ | `title` | `string` | — | Section label text. |
164
+
165
+ ## Related components
166
+
167
+ Menu, Select
@@ -0,0 +1,97 @@
1
+ # Menu
2
+
3
+ Anchored floating panel for actions and dropdowns. Control with `v-model` / `show`.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Menu } from "@bridge-ui/vue/Components/Menu";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Menu v-model="open">
17
+ <template #trigger>
18
+ <Button v-on:click="open = true">Open menu</Button>
19
+ </template>
20
+
21
+ <MenuContent v-on:action="open = false" />
22
+ </Menu>
23
+ ```
24
+
25
+ ### Placement
26
+
27
+ ```vue
28
+ <Menu v-model="open" placement="bottom-end">
29
+ <template #trigger>
30
+ <Button v-on:click="open = true">Open menu</Button>
31
+ </template>
32
+
33
+ <MenuContent />
34
+ </Menu>
35
+ ```
36
+
37
+ ### Persistent
38
+
39
+ ```vue
40
+ <Menu persistent v-model="open">
41
+ <template #trigger>
42
+ <Button v-on:click="open = true">Open persistent</Button>
43
+ </template>
44
+
45
+ <MenuContent />
46
+ </Menu>
47
+ ```
48
+
49
+ ### anchorEl
50
+
51
+ ```vue
52
+ <div ref="anchorRef">
53
+ <Button v-on:click="open = true">External anchor</Button>
54
+ </div>
55
+
56
+ <Menu v-model="open" :anchor-el="anchorRef">
57
+ <MenuContent />
58
+ </Menu>
59
+ ```
60
+
61
+ ## Props
62
+
63
+ | Prop | Type | Default | Description |
64
+ | ------------------- | ------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
65
+ | `anchorEl` | `HTMLElement \| null` | — | Element that anchors the menu panel. When set, it is used for positioning and click-away instead of the `trigger` slot wrapper. Prefer this when the opener lives outside the `Menu` or is controlled manually. Not merged into Bridge defaults (DOM nodes must not be deep-merged). |
66
+ | `classes` | `MenuClasses` | — | The classes to apply to the menu. |
67
+ | `closeOnClickAway` | `boolean` | `true` | Whether the menu closes when clicking outside the trigger and panel. |
68
+ | `closeOnEscape` | `boolean` | `true` | Whether the menu closes on escape key press. |
69
+ | `customProps` | `MenuCustomProps` | — | Props forwarded to each menu part. |
70
+ | `disableAutoFocus` | `boolean` | `false` | When true, the menu does not auto-focus the first focusable item on open. |
71
+ | `disableScrollLock` | `boolean` | `true` | When true, body scroll is not locked while the menu is open. |
72
+ | `keepMounted` | `boolean` | `false` | When true, the menu stays mounted in the DOM after closing (hidden). |
73
+ | `offset` | `number` | 4 | Gap between the trigger and the menu panel (px). |
74
+ | `onShowChange` | `(show: boolean) => void` | — | Called when `show` should change (controlled state without `v-model`). |
75
+ | `persistent` | `boolean` | `false` | When true, escape and click-away do not close the menu. |
76
+ | `placement` | `PositionPlacement` | "bottom-start" | Preferred placement of the menu relative to the anchor (Floating UI). |
77
+ | `rounded` | `MenuRounded` | "md" | The roundedness of the menu panel. |
78
+ | `shadow` | `MenuShadow` | "md" | The shadow to apply to the menu panel. |
79
+ | `strategy` | `PositionStrategy` | "fixed" | CSS position strategy for the floating panel. |
80
+ | `teleportTo` | `string \| false` | "body" | Where to portal the menu panel. Pass `false` to render in place. |
81
+
82
+ ### v-model
83
+
84
+ | Prop / Event | Type | Default | Description |
85
+ | ------------------- | -------------------------- | ------- | ---------------------------------------------------------------------------- |
86
+ | `modelValue` | `boolean` | `false` | Whether the menu is open. Bound with `v-model`. |
87
+ | `update:modelValue` | `(value: boolean) => void` | — | Emitted when `v-model` should update. Listen with `v-on:update:model-value`. |
88
+
89
+ ## Events
90
+
91
+ | Event | Payload | Description |
92
+ | ------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------- |
93
+ | `v-on:close` | — | Emitted when the user dismisses the menu (Escape or click-away). Not emitted when the parent sets `v-model` to `false` directly. |
94
+
95
+ ## Related components
96
+
97
+ List, ListItem, Select, Button