@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,287 @@
1
+ # Card
2
+
3
+ Surface container with optional title, action, and footer.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Card } from "@bridge-ui/vue/Components/Card";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Card title="Card title">
17
+ Card body content goes here.
18
+ </Card>
19
+
20
+ <Card variant="outlined" title="Outlined card">
21
+ Outlined surface with a visible border.
22
+ </Card>
23
+
24
+ <Card title="Confirm changes">
25
+ Review your changes before saving.
26
+
27
+ <template #footer>
28
+ <div class="flex justify-end gap-2">
29
+ <Button size="sm" variant="flat">Cancel</Button>
30
+
31
+ <Button size="sm">Save</Button>
32
+ </div>
33
+ </template>
34
+ </Card>
35
+ ```
36
+
37
+ ### Borderless
38
+
39
+ ```vue
40
+ <div class="grid gap-4 sm:grid-cols-2">
41
+ <Card title="With dividers (default)">
42
+ Default card with header and footer dividers.
43
+
44
+ <template #footer>
45
+ <div class="flex justify-end gap-2">
46
+ <Button size="sm" variant="flat">Cancel</Button>
47
+
48
+ <Button size="sm">Save</Button>
49
+ </div>
50
+ </template>
51
+ </Card>
52
+
53
+ <Card borderless title="Borderless">
54
+ Header and footer borders are removed.
55
+
56
+ <template #footer>
57
+ <Button size="sm" variant="flat">Cancel</Button>
58
+
59
+ <Button size="sm">Save</Button>
60
+ </template>
61
+ </Card>
62
+ </div>
63
+ ```
64
+
65
+ ### Title
66
+
67
+ ```vue
68
+ <Card title="Via title prop">
69
+ Content rendered via the title prop.
70
+ </Card>
71
+
72
+ <Card>
73
+ <template #title>
74
+ <span class="text-primary-600">Custom title slot</span>
75
+ </template>
76
+
77
+ Content with a custom title slot.
78
+ </Card>
79
+ ```
80
+
81
+ ### Action slot
82
+
83
+ ```vue
84
+ <Card title="Card with actions">
85
+ <template #action>
86
+ <Button
87
+ size="sm"
88
+ variant="flat"
89
+ density="mini"
90
+ aria-label="More options"
91
+ >
92
+ <MoreHorizontal class="size-4" />
93
+ </Button>
94
+ </template>
95
+
96
+ Use the action slot for header controls.
97
+ </Card>
98
+ ```
99
+
100
+ ### Footer slot
101
+
102
+ ```vue
103
+ <Card title="Confirm changes">
104
+ Are you sure you want to proceed?
105
+
106
+ <template #footer>
107
+ <Button size="sm" variant="flat">Cancel</Button>
108
+
109
+ <Button size="sm" color="primary">Confirm</Button>
110
+ </template>
111
+ </Card>
112
+ ```
113
+
114
+ ### Custom header slot
115
+
116
+ ```vue
117
+ <Card>
118
+ <template #header>
119
+ <div
120
+ class="border-secondary-200 bg-primary-50 dark:border-secondary-600 dark:bg-primary-950/30 flex items-center gap-3 border-b px-4 py-3"
121
+ >
122
+ <div
123
+ class="bg-primary-500 flex size-10 items-center justify-center rounded-full text-sm font-semibold text-white"
124
+ >
125
+ JD
126
+ </div>
127
+ <div>
128
+ <p class="font-medium">Jane Doe</p>
129
+ <p class="text-secondary-500 text-sm">Custom header area</p>
130
+ </div>
131
+ </div>
132
+ </template>
133
+
134
+ Replaces the default title row entirely.
135
+ </Card>
136
+ ```
137
+
138
+ ### Full composition
139
+
140
+ ```vue
141
+ <Card shadow="lg" rounded="2xl" title="Project settings">
142
+ <template #action>
143
+ <Button size="sm" variant="outline">Edit</Button>
144
+ </template>
145
+
146
+ Title, action, body, and footer together with elevated styling.
147
+
148
+ <template #footer>
149
+ <Button size="sm" color="error" variant="flat">Delete</Button>
150
+
151
+ <Button size="sm" color="primary">Save changes</Button>
152
+ </template>
153
+ </Card>
154
+ ```
155
+
156
+ ### Partial layouts
157
+
158
+ ```vue
159
+ <Card title="Title only (no body children)" />
160
+
161
+ <Card>Card with body content only.</Card>
162
+
163
+ <Card>
164
+ <template #footer>
165
+ <p class="text-secondary-500 text-sm">Footer only</p>
166
+ </template>
167
+ </Card>
168
+ ```
169
+
170
+ ### Classes
171
+
172
+ ```vue
173
+ <Card
174
+ title="Styled parts"
175
+ :classes="{
176
+ footer: 'bg-secondary-50',
177
+ body: 'text-secondary-600',
178
+ root: 'ring-2 ring-primary-200',
179
+ title: 'text-xl font-bold tracking-tight',
180
+ header: 'bg-primary-50 dark:bg-primary-950/20',
181
+ }"
182
+ >
183
+ Body text with custom classes applied.
184
+
185
+ <template #footer>
186
+ <span class="text-sm">Custom footer classes</span>
187
+ </template>
188
+ </Card>
189
+ ```
190
+
191
+ ### customProps
192
+
193
+ ```vue
194
+ <Card
195
+ title="Forwarded part attributes"
196
+ :custom-props="{
197
+ title: { id: 'card-demo-title' },
198
+ root: { 'data-testid': 'card-root' },
199
+ header: { 'aria-label': 'Card header' },
200
+ footer: { 'data-testid': 'card-footer' },
201
+ body: { role: 'region', 'aria-labelledby': 'card-demo-title' },
202
+ }"
203
+ >
204
+ Card body with forwarded attributes on each part.
205
+
206
+ <template #footer>
207
+ <span>Inspect DOM for data attributes on each part.</span>
208
+ </template>
209
+ </Card>
210
+ ```
211
+
212
+ ### Root HTML attributes
213
+
214
+ ```vue
215
+ <Card
216
+ id="demo-card"
217
+ role="article"
218
+ class="max-w-md"
219
+ title="Root attrs"
220
+ aria-label="Demo card"
221
+ >
222
+ class and other root HTML props are merged onto the root element.
223
+ </Card>
224
+ ```
225
+
226
+ ### Combined
227
+
228
+ ```vue
229
+ <Card
230
+ borderless
231
+ shadow="xl"
232
+ rounded="2xl"
233
+ padding="large"
234
+ variant="tonal"
235
+ title="Tonal card"
236
+ :classes="{ body: 'leading-relaxed' }"
237
+ >
238
+ Large padding, 2xl rounded, xl shadow (elevated only — here variant is
239
+ tonal so shadow is ignored), borderless, and custom body classes.
240
+
241
+ <template #action>
242
+ <Button size="sm" variant="flat">Options</Button>
243
+ </template>
244
+
245
+ <template #footer>
246
+ <Button full size="sm">Continue</Button>
247
+ </template>
248
+ </Card>
249
+ ```
250
+
251
+ ### customProps
252
+
253
+ ```vue
254
+ <Card
255
+ title="Forwarded part attributes"
256
+ :custom-props="{
257
+ title: { id: 'card-demo-title' },
258
+ root: { 'data-testid': 'card-root' },
259
+ header: { 'aria-label': 'Card header' },
260
+ footer: { 'data-testid': 'card-footer' },
261
+ body: { role: 'region', 'aria-labelledby': 'card-demo-title' },
262
+ }"
263
+ >
264
+ Card body with forwarded attributes on each part.
265
+
266
+ <template #footer>
267
+ <span>Inspect DOM for data attributes on each part.</span>
268
+ </template>
269
+ </Card>
270
+ ```
271
+
272
+ ## Props
273
+
274
+ | Prop | Type | Default | Description |
275
+ | ------------- | ----------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------- |
276
+ | `borderless` | `boolean` | `false` | Removes header and footer borders. |
277
+ | `classes` | `CardClasses` | — | The classes to apply to the card. |
278
+ | `customProps` | `CardCustomProps` | — | Extra props for internal parts (`header`, `title`, `body`, `footer`, etc.). Root HTML attributes stay on the component top level. |
279
+ | `padding` | `CardPadding` | "medium" | Padding for header, body, and footer (horizontal alignment is shared). |
280
+ | `rounded` | `CardRounded` | "sm" | The roundedness of the card. |
281
+ | `shadow` | `CardShadow` | "sm" | Shadow size. Only applied when `variant` is `elevated`. |
282
+ | `title` | `string` | — | The title to apply to the card. |
283
+ | `variant` | `CardVariant` | "elevated" | Visual style of the card. |
284
+
285
+ ## Related components
286
+
287
+ Modal, List
@@ -0,0 +1,87 @@
1
+ # Checkbox
2
+
3
+ Checkbox input with labels and form chrome. Extends FormControl props.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Checkbox } from "@bridge-ui/vue/Components/Checkbox";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Checkbox
17
+ end-label="Accept terms"
18
+ description="Receive updates about your account."
19
+ />
20
+
21
+ <Checkbox v-model="terms" end-label="Remember me" />
22
+
23
+ <Checkbox indeterminate end-label="Select all" />
24
+ ```
25
+
26
+ ### Required and error
27
+
28
+ ```vue
29
+ <Checkbox required end-label="Required field" />
30
+
31
+ <Checkbox
32
+ error
33
+ end-label="Invalid option"
34
+ error-message="You must accept to continue."
35
+ />
36
+ ```
37
+
38
+ ### States
39
+
40
+ ```vue
41
+ <Checkbox disabled :model-value="true" end-label="Disabled" />
42
+
43
+ <Checkbox readonly :model-value="true" end-label="Read-only" />
44
+ ```
45
+
46
+ ### customProps
47
+
48
+ ```vue
49
+ <Checkbox
50
+ end-label="Accept terms"
51
+ :custom-props="{
52
+ icon: { 'aria-hidden': true },
53
+ input: { name: 'terms', value: 'yes' },
54
+ control: { 'data-testid': 'terms-control' },
55
+ }"
56
+ />
57
+ ```
58
+
59
+ ## Props
60
+
61
+ ### Checkbox-specific
62
+
63
+ | Prop | Type | Default | Description |
64
+ | --------------- | --------------------- | --------- | ------------------------------------------------------------------------------------------ |
65
+ | `checked` | `boolean` | — | Whether the checkbox is checked. |
66
+ | `classes` | `CheckboxClasses` | — | Classes for the form control chrome and the checkbox control. |
67
+ | `color` | `CheckboxColor` | "primary" | The color to apply to the checkbox. |
68
+ | `customProps` | `CheckboxCustomProps` | — | Extra props for internal parts. |
69
+ | `indeterminate` | `boolean` | `false` | Whether the checkbox is in an indeterminate state. |
70
+ | `rounded` | `CheckboxRounded` | "sm" | The roundedness of the checkbox control. |
71
+ | `size` | `CheckboxSize` | "md" | Size of the control and of form control labels (`2xs` … `2xl`, same scale as `FormField`). |
72
+ | `slots` | `CheckboxSlots` | — | Chrome slots and the control slot. |
73
+
74
+ ### v-model
75
+
76
+ | Prop / Event | Type | Default | Description |
77
+ | ------------------- | -------------------------- | ------- | ---------------------------------------------------------------------------- |
78
+ | `modelValue` | `boolean` | — | Bound with `v-model`. |
79
+ | `update:modelValue` | `(value: boolean) => void` | — | Emitted when `v-model` should update. Listen with `v-on:update:model-value`. |
80
+
81
+ ### Inherited from FormControl
82
+
83
+ See [FormControl](./FormControl.md).
84
+
85
+ ## Related components
86
+
87
+ FormControl, Radio, Switch
@@ -0,0 +1,56 @@
1
+ # Divider
2
+
3
+ Horizontal or vertical separator for grouping content.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Divider } from "@bridge-ui/vue/Components/Divider";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <div class="space-y-4">
17
+ <p>Section one</p>
18
+ <Divider />
19
+ <p>Section two</p>
20
+ </div>
21
+ ```
22
+
23
+ ### Vertical
24
+
25
+ ```vue
26
+ <div class="flex h-8 items-center gap-4">
27
+ <span>Left</span>
28
+ <Divider orientation="vertical" />
29
+ <span>Right</span>
30
+ </div>
31
+ ```
32
+
33
+ ### Color
34
+
35
+ ```vue
36
+ <Divider color="primary" />
37
+ <Divider color="error" />
38
+ ```
39
+
40
+ ### Custom classes
41
+
42
+ ```vue
43
+ <Divider class="my-6 h-0.5 bg-primary-500" />
44
+ ```
45
+
46
+ ## Props
47
+
48
+ | Prop | Type | Default | Description |
49
+ | ------------- | -------------------- | -------------- | ------------------------------------ |
50
+ | `classes` | `DividerClasses` | — | The classes to apply to the divider. |
51
+ | `color` | `DividerColor` | `"dark"` | The fill color of the divider. |
52
+ | `orientation` | `DividerOrientation` | `"horizontal"` | The orientation of the divider. |
53
+
54
+ ## Related components
55
+
56
+ Card, ListItem, Menu
@@ -0,0 +1,137 @@
1
+ # Drawer
2
+
3
+ Drawer overlay docked to a viewport edge, with portal, backdrop, and focus management. Put any content inside.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { Drawer } from "@bridge-ui/vue/Components/Drawer";
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Usage
14
+
15
+ ```vue
16
+ <Button v-on:click="open = true">Open drawer</Button>
17
+
18
+ <Drawer v-model="open">
19
+ <Card title="Filters" :on-close="() => (open = false)">
20
+ Drawer content goes here.
21
+ </Card>
22
+ </Drawer>
23
+ ```
24
+
25
+ ### Persistent
26
+
27
+ ```vue
28
+ <Drawer persistent v-model="open">
29
+ <Card title="Persistent drawer" :on-close="() => (open = false)">
30
+ Clicking the backdrop or pressing Escape has no effect.
31
+ </Card>
32
+ </Drawer>
33
+ ```
34
+
35
+ ### Placement
36
+
37
+ ```vue
38
+ <Drawer v-model="open" placement="right">
39
+ <Card title="Right drawer" :on-close="() => (open = false)">
40
+ Docks to the right edge instead of the default left.
41
+ </Card>
42
+ </Drawer>
43
+ ```
44
+
45
+ ### Bottom sheet
46
+
47
+ ```vue
48
+ <Drawer v-model="open" placement="bottom">
49
+ <Card title="Bottom sheet" :on-close="() => (open = false)">
50
+ Docks to the bottom edge; `size` controls the sheet height.
51
+ </Card>
52
+ </Drawer>
53
+ ```
54
+
55
+ ### Full composition (Card)
56
+
57
+ ```vue
58
+ <Drawer blur="md" size="lg" v-model="open" transition="slide">
59
+ <Card
60
+ borderless
61
+ shadow="lg"
62
+ rounded="none"
63
+ padding="large"
64
+ variant="elevated"
65
+ title="Edit filters"
66
+ >
67
+ Large drawer with Card title, body, and footer slots.
68
+
69
+ <template #footer>
70
+ <Button size="sm" color="error" variant="flat" v-on:click="open = false">
71
+ Discard
72
+ </Button>
73
+
74
+ <Button size="sm" color="primary" v-on:click="open = false">Save</Button>
75
+ </template>
76
+ </Card>
77
+ </Drawer>
78
+ ```
79
+
80
+ ### customProps
81
+
82
+ ```vue
83
+ <Drawer
84
+ v-model="open"
85
+ :custom-props="{
86
+ root: { id: 'drawer-root' },
87
+ panel: { id: 'drawer-panel' },
88
+ overlay: { id: 'drawer-overlay' },
89
+ }"
90
+ >
91
+ <Card title="customProps" :on-close="() => (open = false)">
92
+ Inspect the DOM for ids on each drawer part.
93
+ </Card>
94
+ </Drawer>
95
+ ```
96
+
97
+ ## Props
98
+
99
+ | Prop | Type | Default | Description |
100
+ | --------------------- | ------------------- | ------- | ------------------------------------------------------------------------------------------ |
101
+ | `ariaLabel` | `string` | — | Accessible name for the dialog (`aria-label`). |
102
+ | `ariaLabelledBy` | `string` | — | Id of the element that labels the dialog (`aria-labelledby`). |
103
+ | `autoFocus` | `boolean` | `false` | When true, focuses the first focusable element inside the drawer on open. |
104
+ | `blur` | `DrawerBlur` | "none" | Backdrop blur on the overlay. |
105
+ | `classes` | `DrawerClasses` | — | The classes to apply to the drawer. |
106
+ | `closeOnEscape` | `boolean` | `true` | Whether the drawer closes on escape key press. |
107
+ | `closeOnOverlay` | `boolean` | `true` | Whether the drawer closes on overlay click. |
108
+ | `customProps` | `DrawerCustomProps` | — | Props forwarded to each drawer part. |
109
+ | `disableEnforceFocus` | `boolean` | `false` | When true, focus is not trapped inside the drawer while open. |
110
+ | `disableRestoreFocus` | `boolean` | `false` | When true, focus is not restored to the previously focused element on close. |
111
+ | `disableScrollLock` | `boolean` | `false` | When true, body scroll is not locked while the drawer is open. |
112
+ | `hideBackdrop` | `boolean` | `false` | When true, the backdrop overlay is not rendered. |
113
+ | `keepMounted` | `boolean` | `false` | When true, the drawer stays mounted in the DOM after closing (hidden). |
114
+ | `persistent` | `boolean` | `false` | When true, escape and overlay clicks do not close the drawer. |
115
+ | `placement` | `DrawerPlacement` | "left" | Edge the panel docks to. |
116
+ | `scroll` | `DrawerScroll` | "paper" | Where scroll happens: the page (`body`) or the drawer panel (`paper`). |
117
+ | `size` | `DrawerSize` | "md" | Panel size along the placement axis (width for `left`/`right`, height for `top`/`bottom`). |
118
+ | `teleportTo` | `string \| false` | "body" | Where to teleport the drawer. Pass `false` to render in place. |
119
+ | `transition` | `DrawerTransition` | "slide" | Enter/leave animation for overlay and panel. |
120
+
121
+ ### v-model
122
+
123
+ | Prop / Event | Type | Default | Description |
124
+ | ------------------- | -------------------------- | ------- | ---------------------------------------------------------------------------- |
125
+ | `modelValue` | `boolean` | `false` | Whether the drawer is visible. Bound with `v-model`. |
126
+ | `update:modelValue` | `(value: boolean) => void` | — | Emitted when `v-model` should update. Listen with `v-on:update:model-value`. |
127
+
128
+ ## Events
129
+
130
+ | Event | Payload | Description |
131
+ | ------------------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
132
+ | `v-on:close` | — | Emitted when the user dismisses the drawer (overlay or Escape). Not emitted when the parent sets `v-model` to `false` directly. |
133
+ | `v-on:show-change` | `(show: boolean)` | Emitted when visibility should change (controlled state). Listen with `v-on:show-change`. |
134
+
135
+ ## Related components
136
+
137
+ Card, useDialogAction, useDrawerAction, useModalAction
@@ -0,0 +1,66 @@
1
+ # FormControl
2
+
3
+ > Building block for toggle-row chrome. Prefer `Checkbox`, `Radio`, and `Switch` in apps; FormControl remains exported for advanced composition. Not a registry key — theme chrome via `tokens.formControl` on the public parent (e.g. `components.Checkbox.tokens.formControl`).
4
+
5
+ Low-level form control chrome (labels, description, error) for Checkbox, Radio, and Switch.
6
+
7
+ Control tokens stay on the parent (`tokens.color`, `tokens.invalidated`, …).
8
+
9
+ ## Import
10
+
11
+ ```ts
12
+ import { FormControl } from "@bridge-ui/vue";
13
+ ```
14
+
15
+ ## Examples
16
+
17
+ ### Usage
18
+
19
+ ```vue
20
+ <FormControl
21
+ end-label="Email notifications"
22
+ description="Receive product updates."
23
+ >
24
+ <Checkbox :default-checked="true" />
25
+ </FormControl>
26
+ ```
27
+
28
+ ### customProps
29
+
30
+ ```vue
31
+ <FormControl
32
+ end-label="Email notifications"
33
+ description="Receive product updates."
34
+ :custom-props="{
35
+ root: { id: 'notify-control' },
36
+ endLabel: { id: 'notify-label' },
37
+ description: { id: 'notify-desc', 'aria-live': 'polite' },
38
+ }"
39
+ >
40
+ <Checkbox :default-checked="true" />
41
+ </FormControl>
42
+ ```
43
+
44
+ ## Props
45
+
46
+ | Prop | Type | Default | Description |
47
+ | ------------------ | ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
48
+ | `classes` | `FormControlClasses` | — | Classes for labels, description, error, and layout chrome. |
49
+ | `controlId` | `string` | — | Associates labels and helper text with a form control. When omitted, an id is generated automatically. |
50
+ | `customProps` | `FormControlCustomProps` | — | Extra props for internal parts (`row`, `endLabel`, `description`, …). |
51
+ | `description` | `string` | — | Helper text below the control row (hidden when invalid). |
52
+ | `disabled` | `boolean` | `false` | Whether the control is disabled. |
53
+ | `endLabel` | `string` | — | Inline-end label after the control (right in LTR, left in RTL). |
54
+ | `error` | `boolean` | `false` | When `true`, applies invalid styling on labels and hides description. |
55
+ | `errorMessage` | `string` | — | Error message below the control row. |
56
+ | `field` | `UseFormControlReturn` | — | Pre-composed form control API from a parent composable. Used by `<FormControl :field="…" />`; not set on Checkbox, Radio, or Switch. |
57
+ | `hideErrorMessage` | `boolean` | `false` | When `true`, does not reserve space below the row for error messages. |
58
+ | `readonly` | `boolean` | `false` | Whether the control is read-only. |
59
+ | `required` | `boolean` | `false` | Sets the native `required` attribute on the control and shows a required asterisk on labels. |
60
+ | `size` | `LabelSize` | "md" | Typography scale for labels, description, and error text (aligned with `FormField` / `Label`). |
61
+ | `slots` | `FormControlSlots` | — | Chrome slots (`startLabel`, `endLabel`, `description`, `errorMessage`, …) and the control. |
62
+ | `startLabel` | `string` | — | Inline-start label before the control (left in LTR, right in RTL). |
63
+
64
+ ## Related components
65
+
66
+ Checkbox, Radio, Switch, Label