@baklavue/mcp 1.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 (93) hide show
  1. package/README.md +72 -0
  2. package/dist/data/component-categories.d.ts +7 -0
  3. package/dist/data/component-categories.js +48 -0
  4. package/dist/data/loaders.d.ts +22 -0
  5. package/dist/data/loaders.js +346 -0
  6. package/dist/docs/components/accordion.md +601 -0
  7. package/dist/docs/components/alert.md +233 -0
  8. package/dist/docs/components/badge.md +100 -0
  9. package/dist/docs/components/banner.md +231 -0
  10. package/dist/docs/components/button.md +324 -0
  11. package/dist/docs/components/checkbox.md +343 -0
  12. package/dist/docs/components/chip.md +199 -0
  13. package/dist/docs/components/datepicker.md +243 -0
  14. package/dist/docs/components/dialog.md +224 -0
  15. package/dist/docs/components/drawer.md +188 -0
  16. package/dist/docs/components/dropdown.md +291 -0
  17. package/dist/docs/components/file-upload.md +248 -0
  18. package/dist/docs/components/icon.md +142 -0
  19. package/dist/docs/components/image.md +161 -0
  20. package/dist/docs/components/index.md +151 -0
  21. package/dist/docs/components/input.md +407 -0
  22. package/dist/docs/components/link.md +249 -0
  23. package/dist/docs/components/notification.md +179 -0
  24. package/dist/docs/components/pagination.md +168 -0
  25. package/dist/docs/components/radio.md +221 -0
  26. package/dist/docs/components/scroll-to-top.md +90 -0
  27. package/dist/docs/components/select.md +239 -0
  28. package/dist/docs/components/skeleton.md +79 -0
  29. package/dist/docs/components/spinner.md +93 -0
  30. package/dist/docs/components/split-button.md +165 -0
  31. package/dist/docs/components/stepper.md +337 -0
  32. package/dist/docs/components/switch.md +144 -0
  33. package/dist/docs/components/tab.md +140 -0
  34. package/dist/docs/components/table.md +362 -0
  35. package/dist/docs/components/tag.md +243 -0
  36. package/dist/docs/components/textarea.md +190 -0
  37. package/dist/docs/components/tooltip.md +155 -0
  38. package/dist/docs/composables/alert.md +87 -0
  39. package/dist/docs/composables/asyncState.md +74 -0
  40. package/dist/docs/composables/base64.md +72 -0
  41. package/dist/docs/composables/breakpoints.md +129 -0
  42. package/dist/docs/composables/clipboard.md +108 -0
  43. package/dist/docs/composables/colorScheme.md +110 -0
  44. package/dist/docs/composables/confirmDialog.md +105 -0
  45. package/dist/docs/composables/containerScroll.md +89 -0
  46. package/dist/docs/composables/cookie.md +137 -0
  47. package/dist/docs/composables/debounce.md +69 -0
  48. package/dist/docs/composables/disclosure.md +69 -0
  49. package/dist/docs/composables/elementSize.md +84 -0
  50. package/dist/docs/composables/fetch.md +257 -0
  51. package/dist/docs/composables/fieldArray.md +104 -0
  52. package/dist/docs/composables/file.md +343 -0
  53. package/dist/docs/composables/focusTrap.md +87 -0
  54. package/dist/docs/composables/formPersistence.md +69 -0
  55. package/dist/docs/composables/formState.md +71 -0
  56. package/dist/docs/composables/formValidation.md +355 -0
  57. package/dist/docs/composables/format.md +107 -0
  58. package/dist/docs/composables/id.md +54 -0
  59. package/dist/docs/composables/index.md +112 -0
  60. package/dist/docs/composables/infiniteQuery.md +104 -0
  61. package/dist/docs/composables/intersectionObserver.md +64 -0
  62. package/dist/docs/composables/lazyQuery.md +68 -0
  63. package/dist/docs/composables/loading.md +91 -0
  64. package/dist/docs/composables/mutation.md +83 -0
  65. package/dist/docs/composables/notification.md +169 -0
  66. package/dist/docs/composables/pagination.md +109 -0
  67. package/dist/docs/composables/polling.md +76 -0
  68. package/dist/docs/composables/previous.md +58 -0
  69. package/dist/docs/composables/query.md +248 -0
  70. package/dist/docs/composables/raf.md +78 -0
  71. package/dist/docs/composables/scrollLock.md +46 -0
  72. package/dist/docs/composables/scrollToError.md +291 -0
  73. package/dist/docs/composables/scrollVisibility.md +60 -0
  74. package/dist/docs/composables/share.md +78 -0
  75. package/dist/docs/composables/slug.md +58 -0
  76. package/dist/docs/composables/stepper.md +117 -0
  77. package/dist/docs/composables/stepperForm.md +74 -0
  78. package/dist/docs/composables/sticky.md +91 -0
  79. package/dist/docs/composables/storage.md +193 -0
  80. package/dist/docs/composables/theme.md +252 -0
  81. package/dist/docs/composables/themePreset.md +62 -0
  82. package/dist/docs/composables/throttle.md +76 -0
  83. package/dist/docs/composables/timer.md +78 -0
  84. package/dist/docs/composables/toggle.md +55 -0
  85. package/dist/docs/guide/contributing.md +364 -0
  86. package/dist/docs/guide/design-tokens.md +29 -0
  87. package/dist/docs/guide/getting-started.md +181 -0
  88. package/dist/docs/guide/installation.md +287 -0
  89. package/dist/docs/guide/localization.md +132 -0
  90. package/dist/docs/guide/mcp.md +141 -0
  91. package/dist/index.d.ts +2 -0
  92. package/dist/index.js +177 -0
  93. package/package.json +48 -0
@@ -0,0 +1,248 @@
1
+ # File Upload
2
+
3
+ A custom file upload component with drag-and-drop zone, click-to-browse, file list with remove, validation (size/type), and optional preview. Uses Baklava design tokens for consistent styling.
4
+
5
+ ## Basic Usage
6
+
7
+ Use `v-model` to bind the selected file(s). Single file mode by default.
8
+
9
+ <div class="component-demo">
10
+
11
+ <FileUploadBasicDemo />
12
+
13
+ </div>
14
+
15
+ ```vue
16
+ <template>
17
+ <BvFileUpload
18
+ v-model="file"
19
+ label="Upload document"
20
+ help-text="Single file, any type"
21
+ />
22
+ </template>
23
+
24
+ <script setup>
25
+ import { ref } from "vue";
26
+ import { BvFileUpload } from "@baklavue/ui";
27
+
28
+ const file = ref(null);
29
+ </script>
30
+ ```
31
+
32
+ ## Multiple Files
33
+
34
+ Set `multiple` to allow selecting multiple files.
35
+
36
+ <div class="component-demo">
37
+
38
+ <FileUploadMultipleDemo />
39
+
40
+ </div>
41
+
42
+ ```vue
43
+ <template>
44
+ <BvFileUpload
45
+ v-model="files"
46
+ multiple
47
+ label="Upload multiple files"
48
+ help-text="Drag and drop or click to browse"
49
+ />
50
+ </template>
51
+
52
+ <script setup>
53
+ import { ref } from "vue";
54
+ import { BvFileUpload } from "@baklavue/ui";
55
+
56
+ const files = ref([]);
57
+ </script>
58
+ ```
59
+
60
+ ## Validation
61
+
62
+ Use `accept`, `maxSize`, `minSize`, and `maxFiles` for validation. Listen to the `invalid` event to display custom error messages.
63
+
64
+ <div class="component-demo">
65
+
66
+ <FileUploadValidationDemo />
67
+
68
+ </div>
69
+
70
+ ```vue
71
+ <template>
72
+ <BvFileUpload
73
+ v-model="files"
74
+ multiple
75
+ accept="image/*"
76
+ :max-size="500 * 1024"
77
+ :max-files="3"
78
+ label="Images only (max 500 KB, 3 files)"
79
+ :invalid-text="invalidText"
80
+ @invalid="handleInvalid"
81
+ @change="handleChange"
82
+ />
83
+ </template>
84
+
85
+ <script setup>
86
+ import { ref } from "vue";
87
+ import { BvFileUpload } from "@baklavue/ui";
88
+ import type { FileUploadInvalidEntry } from "@baklavue/ui";
89
+
90
+ const files = ref([]);
91
+ const invalidText = ref("");
92
+ const MAX_SIZE = 500 * 1024; // 500 KB
93
+
94
+ const handleInvalid = (entries: FileUploadInvalidEntry[]) => {
95
+ const reasons = entries.map((e) => {
96
+ if (e.reason === "type") return `${e.file.name}: invalid type`;
97
+ if (e.reason === "size") return `${e.file.name}: max ${MAX_SIZE / 1024} KB`;
98
+ return `${e.file.name}: max 3 files`;
99
+ });
100
+ invalidText.value = reasons.join(". ");
101
+ };
102
+
103
+ const handleChange = () => {
104
+ invalidText.value = "";
105
+ };
106
+ </script>
107
+ ```
108
+
109
+ ## Preview
110
+
111
+ Enable `showPreview` to display image thumbnails for uploaded image files.
112
+
113
+ <div class="component-demo">
114
+
115
+ <FileUploadPreviewDemo />
116
+
117
+ </div>
118
+
119
+ ```vue
120
+ <template>
121
+ <BvFileUpload
122
+ v-model="files"
123
+ multiple
124
+ accept="image/*"
125
+ show-preview
126
+ label="Upload images with preview"
127
+ help-text="Accepts images only"
128
+ />
129
+ </template>
130
+
131
+ <script setup>
132
+ import { ref } from "vue";
133
+ import { BvFileUpload } from "@baklavue/ui";
134
+
135
+ const files = ref([]);
136
+ </script>
137
+ ```
138
+
139
+ ## Disabled
140
+
141
+ Use the `disabled` prop to prevent user interaction.
142
+
143
+ <div class="component-demo">
144
+
145
+ <FileUploadDisabledDemo />
146
+
147
+ </div>
148
+
149
+ ```vue
150
+ <template>
151
+ <BvFileUpload
152
+ v-model="file"
153
+ label="Disabled"
154
+ disabled
155
+ help-text="Upload is disabled"
156
+ />
157
+ </template>
158
+
159
+ <script setup>
160
+ import { ref } from "vue";
161
+ import { BvFileUpload } from "@baklavue/ui";
162
+
163
+ const file = ref(null);
164
+ </script>
165
+ ```
166
+
167
+ ## Custom Hint Slot
168
+
169
+ Use the `#hint` slot to customize the text displayed in the drop zone.
170
+
171
+ <div class="component-demo">
172
+
173
+ <FileUploadSlotDemo />
174
+
175
+ </div>
176
+
177
+ ```vue
178
+ <template>
179
+ <BvFileUpload v-model="file" label="Upload with custom hint">
180
+ <template #hint>
181
+ Drop your file here or <strong>click to browse</strong>
182
+ </template>
183
+ </BvFileUpload>
184
+ </template>
185
+
186
+ <script setup>
187
+ import { ref } from "vue";
188
+ import { BvFileUpload } from "@baklavue/ui";
189
+
190
+ const file = ref(null);
191
+ </script>
192
+ ```
193
+
194
+ ## Props
195
+
196
+ | Prop | Type | Default | Description |
197
+ | ------------- | -------------------------------- | ----------- | ---------------------------------------------------------- |
198
+ | `modelValue` | `File \| File[] \| null` | `undefined` | Bound files (v-model) |
199
+ | `multiple` | `boolean` | `false` | Allow multiple files |
200
+ | `accept` | `string` | `undefined` | Accepted MIME types or extensions (e.g. `image/*`, `.pdf`) |
201
+ | `maxSize` | `number` | `undefined` | Max file size in bytes |
202
+ | `minSize` | `number` | `undefined` | Min file size in bytes |
203
+ | `maxFiles` | `number` | `undefined` | Max file count when multiple |
204
+ | `disabled` | `boolean` | `false` | Disabled state |
205
+ | `label` | `string` | `undefined` | Label for the upload area |
206
+ | `helpText` | `string` | `undefined` | Helper text below the area |
207
+ | `invalidText` | `string` | `undefined` | Error message when validation fails |
208
+ | `showPreview` | `boolean` | `false` | Show image previews for image files |
209
+ | `size` | `"small" \| "medium" \| "large"` | `"medium"` | Drop zone size |
210
+
211
+ ## Events
212
+
213
+ | Event | Payload | Description |
214
+ | ------------------- | -------------------------- | ------------------------------------ |
215
+ | `update:modelValue` | `File \| File[] \| null` | Emitted when files change (v-model) |
216
+ | `invalid` | `FileUploadInvalidEntry[]` | Emitted when validation fails |
217
+ | `change` | `File[]` | Emitted when files are added/removed |
218
+
219
+ ## Slots
220
+
221
+ | Slot | Description |
222
+ | ------ | ------------------------------------------------- |
223
+ | `hint` | Custom hint text (like "Drag and drop or browse") |
224
+
225
+ ## Types
226
+
227
+ ```typescript
228
+ import type {
229
+ FileUploadProps,
230
+ FileUploadInvalidEntry,
231
+ FileUploadInvalidReason,
232
+ } from "@baklavue/ui";
233
+
234
+ interface FileUploadInvalidEntry {
235
+ file: File;
236
+ reason: "type" | "size" | "count";
237
+ }
238
+ ```
239
+
240
+ ## Usage Notes
241
+
242
+ - **Drag and drop**: The drop zone supports both click-to-browse and drag-and-drop. The `accept` attribute filters the native file picker; drag-and-drop files are validated in JavaScript.
243
+
244
+ - **Validation**: Client-side validation is for UX only. Always validate file types and sizes on the server.
245
+
246
+ - **Preview**: When `showPreview` is true, object URLs are created for image files. These are automatically revoked when files are removed or the component unmounts.
247
+
248
+ - **Accessibility**: The drop zone is keyboard-accessible via the hidden file input. Use a proper label for screen readers.
@@ -0,0 +1,142 @@
1
+ # Icon
2
+
3
+ A Vue UI kit component for Baklava's `bl-icon` component for displaying icons. The Icon component provides icon display with support for name, size, color, and custom slot content. Size and color are applied via CSS (`font-size`, `color`) as per Baklava's API.
4
+
5
+ ## Basic Usage
6
+
7
+ Use the `name` prop to display a Baklava icon. Available icon names come from the Baklava icons set.
8
+
9
+ <div class="component-demo">
10
+
11
+ <IconBasicDemo />
12
+
13
+ </div>
14
+
15
+ ```vue
16
+ <template>
17
+ <div style="display: flex; gap: 1rem;">
18
+ <BvIcon name="home" />
19
+ <BvIcon name="settings" />
20
+ <BvIcon name="info" />
21
+ <BvIcon name="user" />
22
+ </div>
23
+ </template>
24
+
25
+ <script setup>
26
+ import { BvIcon } from "@baklavue/ui";
27
+ </script>
28
+ ```
29
+
30
+ ## Size
31
+
32
+ Use the `size` prop to control the icon size. Accepts any valid CSS value (e.g. `"24px"`, `"1.5rem"`). Maps to the `font-size` CSS property on the underlying bl-icon.
33
+
34
+ <div class="component-demo">
35
+
36
+ <IconSizeDemo />
37
+
38
+ </div>
39
+
40
+ ```vue
41
+ <template>
42
+ <div style="display: flex; gap: 1rem; align-items: center;">
43
+ <BvIcon name="home" size="16px" />
44
+ <BvIcon name="home" size="24px" />
45
+ <BvIcon name="home" size="32px" />
46
+ <BvIcon name="home" size="48px" />
47
+ </div>
48
+ </template>
49
+
50
+ <script setup>
51
+ import { BvIcon } from "@baklavue/ui";
52
+ </script>
53
+ ```
54
+
55
+ ## Color
56
+
57
+ Use the `color` prop to set the icon color. Accepts any valid CSS color value (e.g. `"#0066cc"`, `"red"`, `"currentColor"`). Maps to the `color` CSS property on the underlying bl-icon.
58
+
59
+ <div class="component-demo">
60
+
61
+ <IconColorDemo />
62
+
63
+ </div>
64
+
65
+ ```vue
66
+ <template>
67
+ <div style="display: flex; gap: 1rem; align-items: center;">
68
+ <BvIcon name="info" color="#0066cc" />
69
+ <BvIcon name="info" color="#16a34a" />
70
+ <BvIcon name="info" color="#dc2626" />
71
+ <BvIcon name="info" color="#7c3aed" />
72
+ </div>
73
+ </template>
74
+
75
+ <script setup>
76
+ import { BvIcon } from "@baklavue/ui";
77
+ </script>
78
+ ```
79
+
80
+ ## Custom Slot
81
+
82
+ Use the default slot to provide custom SVG content instead of a named icon. When using the slot, the `name` prop is optional.
83
+
84
+ ```vue
85
+ <template>
86
+ <BvIcon>
87
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
88
+ <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
89
+ </svg>
90
+ </BvIcon>
91
+ </template>
92
+
93
+ <script setup>
94
+ import { BvIcon } from "@baklavue/ui";
95
+ </script>
96
+ ```
97
+
98
+ ## Props
99
+
100
+ | Prop | Type | Default | Description |
101
+ | ------ | ------------- | ----------- | --------------------------------------------------------------------------- |
102
+ | `name` | `BaklavaIcon` | `undefined` | Icon name from Baklava icons set. Optional when using default slot. |
103
+ | `size` | `string` | `undefined` | Icon size as CSS value (e.g. `"24px"`, `"1.5rem"`). Maps to `font-size`. |
104
+ | `color` | `string` | `undefined` | Icon color as CSS value (e.g. `"#0066cc"`). Maps to `color`. Default inherits. |
105
+
106
+ ## Events
107
+
108
+ | Event | Payload | Description |
109
+ | ------- | ------- | -------------------------------------------------------- |
110
+ | `load` | `string`| Emitted when the SVG icon has loaded (from `bl-load`). |
111
+ | `error` | `string`| Emitted when the SVG icon failed to load (from `bl-error`).|
112
+
113
+ ## Slots
114
+
115
+ | Slot | Props | Description |
116
+ | --------- | ----- | ----------------------------------------------------------------- |
117
+ | `default` | - | Custom SVG content. When provided, can be used instead of `name`. |
118
+
119
+ ## Types
120
+
121
+ ```typescript
122
+ import type { IconProps } from "@baklavue/ui";
123
+
124
+ interface IconProps {
125
+ /** Icon name from Baklava icons set */
126
+ name?: BaklavaIcon;
127
+ /** Icon size as CSS value (e.g. "24px", "1.5rem") */
128
+ size?: string;
129
+ /** Icon color as CSS value (e.g. "#0066cc", "red") */
130
+ color?: string;
131
+ }
132
+ ```
133
+
134
+ ## Usage Notes
135
+
136
+ - **Icon names**: Use valid Baklava icon names from the `@trendyol/baklava-icons` package. See [Baklava documentation](https://baklava.trendyol.com) for the full icon list.
137
+
138
+ - **Size and color**: These props are applied via inline styles to the underlying `bl-icon`. When omitted, the icon inherits `font-size` and `color` from its parent.
139
+
140
+ - **Accessibility**: When using icons for decorative purposes, ensure they are not announced by screen readers. For meaningful icons, provide appropriate `aria-label` or surround with descriptive text.
141
+
142
+ - **Styling**: The component uses Baklava's default styling. Custom styling can be applied through CSS variables or by wrapping the icon in a styled container.
@@ -0,0 +1,161 @@
1
+ # Image
2
+
3
+ Performance-focused image component with lazy loading, skeleton placeholder, and error handling. Prevents CLS (Cumulative Layout Shift) by reserving space with width/height.
4
+
5
+ ## Basic Usage
6
+
7
+ <div class="component-demo">
8
+
9
+ <ImageBasicDemo />
10
+
11
+ </div>
12
+
13
+ ```vue
14
+ <template>
15
+ <BvImage
16
+ src="/photo.jpg"
17
+ alt="Photo description"
18
+ width="200px"
19
+ height="120px"
20
+ />
21
+ </template>
22
+
23
+ <script setup>
24
+ import { BvImage } from "@baklavue/ui";
25
+ </script>
26
+ ```
27
+
28
+ ## Lazy Loading with Placeholder
29
+
30
+ Images use `loading="lazy"` by default. When `placeholder="skeleton"`, a skeleton loader is shown until the image loads.
31
+
32
+ <div class="component-demo">
33
+
34
+ <ImageLazyDemo />
35
+
36
+ </div>
37
+
38
+ ```vue
39
+ <template>
40
+ <BvImage
41
+ src="/photo.jpg"
42
+ alt="Photo"
43
+ width="200px"
44
+ height="120px"
45
+ loading="lazy"
46
+ placeholder="skeleton"
47
+ />
48
+ </template>
49
+
50
+ <script setup>
51
+ import { BvImage } from "@baklavue/ui";
52
+ </script>
53
+ ```
54
+
55
+ ## Responsive Images
56
+
57
+ Use `srcset` and `sizes` for responsive image delivery.
58
+
59
+ ```vue
60
+ <template>
61
+ <BvImage
62
+ src="/photo-800.jpg"
63
+ srcset="/photo-400.jpg 400w, /photo-800.jpg 800w, /photo-1200.jpg 1200w"
64
+ sizes="(max-width: 600px) 100vw, 50vw"
65
+ alt="Responsive photo"
66
+ width="100%"
67
+ height="auto"
68
+ />
69
+ </template>
70
+
71
+ <script setup>
72
+ import { BvImage } from "@baklavue/ui";
73
+ </script>
74
+ ```
75
+
76
+ ## Error Fallback
77
+
78
+ Provide a `fallback` slot when the image fails to load. Without it, a default gray placeholder is shown.
79
+
80
+ ```vue
81
+ <template>
82
+ <BvImage
83
+ src="/broken-url.jpg"
84
+ alt="Broken image"
85
+ width="200px"
86
+ height="120px"
87
+ @error="handleError"
88
+ >
89
+ <template #fallback>
90
+ <div style="padding: 1rem; text-align: center; color: #666;">
91
+ Failed to load image
92
+ </div>
93
+ </template>
94
+ </BvImage>
95
+ </template>
96
+
97
+ <script setup>
98
+ import { BvImage } from "@baklavue/ui";
99
+
100
+ function handleError() {
101
+ console.error("Image failed to load");
102
+ }
103
+ </script>
104
+ ```
105
+
106
+ ## Props
107
+
108
+ | Prop | Type | Default | Description |
109
+ | ------------- | -------------------- | ----------- | ---------------------------------------------- |
110
+ | `src` | `string` | required | Image URL |
111
+ | `alt` | `string` | required | Accessible description |
112
+ | `width` | `string` | `"100%"` | CSS width (recommended to prevent CLS) |
113
+ | `height` | `string` | `"auto"` | CSS height |
114
+ | `loading` | `"lazy" \| "eager"` | `"lazy"` | Native loading behavior |
115
+ | `placeholder` | `"skeleton" \| "none"` | `"skeleton"` | Placeholder while loading |
116
+ | `objectFit` | `string` | `"cover"` | CSS object-fit |
117
+ | `srcset` | `string` | - | Responsive image sources |
118
+ | `sizes` | `string` | - | Sizes attribute for srcset |
119
+
120
+ ## Events
121
+
122
+ | Event | Payload | Description |
123
+ | ------- | -------- | ------------------------------------ |
124
+ | `load` | `Event` | Emitted when the image has loaded |
125
+ | `error` | `Event` | Emitted when the image fails to load |
126
+
127
+ ## Slots
128
+
129
+ | Slot | Description |
130
+ | ------------- | -------------------------------------------- |
131
+ | `placeholder` | Custom placeholder (overrides skeleton) |
132
+ | `fallback` | Content when image fails to load |
133
+
134
+ ## Types
135
+
136
+ ```typescript
137
+ import type { ImageProps, ImageLoading, ImagePlaceholder } from "@baklavue/ui";
138
+
139
+ type ImageLoading = "lazy" | "eager";
140
+ type ImagePlaceholder = "skeleton" | "none";
141
+
142
+ interface ImageProps {
143
+ src: string;
144
+ alt: string;
145
+ width?: string;
146
+ height?: string;
147
+ loading?: ImageLoading;
148
+ placeholder?: ImagePlaceholder;
149
+ objectFit?: string;
150
+ srcset?: string;
151
+ sizes?: string;
152
+ }
153
+ ```
154
+
155
+ ## Usage Notes
156
+
157
+ - **CLS prevention**: Always provide `width` and `height` (or at least width with aspect-ratio) to avoid layout shift when images load.
158
+
159
+ - **Lazy loading**: Uses native `loading="lazy"` for deferred loading of offscreen images. No extra dependencies.
160
+
161
+ - **Placeholder**: The skeleton uses the same design tokens as `BvSkeleton` for consistent styling.
@@ -0,0 +1,151 @@
1
+ # Components
2
+
3
+ BaklaVue provides a comprehensive Vue 3 UI kit that brings the [Baklava Design System](https://baklava.design) to your Vue applications. Every component is **fully typed**, **composable**, and built with Vue 3 best practices—giving you a native, delightful development experience.
4
+
5
+ ::: tip Why BaklaVue?
6
+ Each component wraps Baklava's battle-tested web components under the hood, so you get enterprise-grade accessibility, theming, and design consistency—with Vue-native APIs like `v-model`, slots, and reactive props.
7
+ :::
8
+
9
+ ## Overview
10
+
11
+ | Category | Count | Purpose |
12
+ | -------- | ----- | ------- |
13
+ | Form | 9 | Inputs, selects, buttons, toggles, file upload, and date picking |
14
+ | Feedback | 7 | Alerts, badges, chips, tags, notifications, spinners, and skeleton loaders |
15
+ | Layout | 7 | Dialogs, drawers, dropdowns, tooltips, accordions, tabs, steppers |
16
+ | Navigation | 4 | Links, pagination, split buttons, scroll-to-top |
17
+ | Data | 3 | Tables, icons, and images |
18
+
19
+ **31 components** in total—ready to build beautiful, consistent interfaces.
20
+
21
+ ---
22
+
23
+ ## Form Components
24
+
25
+ Build forms and collect user input with purpose-built components. All form components support `v-model`, validation states, and full TypeScript inference.
26
+
27
+ | Component | Description |
28
+ | --------- | ----------- |
29
+ | [**Button**](/components/button) | Primary, secondary, tertiary variants • Multiple kinds (default, neutral, success, danger) • Sizes, icons, loading state |
30
+ | [**Input**](/components/input) | Text input with label, help text, validation • Types: text, email, password, number • Loading and disabled states |
31
+ | [**Checkbox**](/components/checkbox) | Single and grouped checkboxes • Indeterminate state • Custom slots and preferences |
32
+ | [**Radio**](/components/radio) | Radio button groups with full v-model support |
33
+ | [**Switch**](/components/switch) | Toggle switch for boolean settings • Multiple sizes |
34
+ | [**Select**](/components/select) | Single and multi-select dropdowns • Options via props or slots |
35
+ | [**Textarea**](/components/textarea) | Multi-line text input with validation |
36
+ | [**File Upload**](/components/file-upload) | Drag-and-drop file upload with validation, preview, and file list |
37
+ | [**Datepicker**](/components/datepicker) | Date selection with calendar popover |
38
+
39
+ ---
40
+
41
+ ## Feedback Components
42
+
43
+ Communicate status, guide users, and show progress. These components help you build clear, responsive feedback patterns.
44
+
45
+ | Component | Description |
46
+ | --------- | ----------- |
47
+ | [**Alert**](/components/alert) | Inline alerts for success, warning, error, info • Closable and programmatic control |
48
+ | [**Badge**](/components/badge) | Compact status indicators (e.g. counts, labels) |
49
+ | [**Banner**](/components/banner) | Full-width top-of-page banner for announcements • Closable with localStorage persistence |
50
+ | [**Chip**](/components/chip) | Notification badge on icons/avatars • Position, colors, sizes, standalone mode |
51
+ | [**Tag**](/components/tag) | Labels with optional close button • Selectable and customizable icons |
52
+ | [**Notification**](/components/notification) | Toast-style notifications • Use composable `useNotification` for programmatic control |
53
+ | [**Skeleton**](/components/skeleton) | Animated placeholder for content loading • Text, rectangle, circle variants |
54
+ | [**Spinner**](/components/spinner) | Loading spinner with size and variant options |
55
+
56
+ ---
57
+
58
+ ## Layout Components
59
+
60
+ Structure your UI with overlays, panels, and navigation patterns. Full control over open/close behavior and animations.
61
+
62
+ | Component | Description |
63
+ | --------- | ----------- |
64
+ | [**Dialog**](/components/dialog) | Modal dialogs with header, footer, caption • Programmatic open/close |
65
+ | [**Drawer**](/components/drawer) | Side drawer for navigation or forms • Left/right placement |
66
+ | [**Dropdown**](/components/dropdown) | Dropdown menus with items, groups, and slots |
67
+ | [**Tooltip**](/components/tooltip) | Contextual tooltips with placement control |
68
+ | [**Accordion**](/components/accordion) | Collapsible sections • Single or multiple open |
69
+ | [**Tab**](/components/tab) | Tab navigation with slot-based panels |
70
+ | [**Stepper**](/components/stepper) | Step indicator for wizards and multi-step flows |
71
+
72
+ ---
73
+
74
+ ## Navigation Components
75
+
76
+ Help users move through your app and trigger actions.
77
+
78
+ | Component | Description |
79
+ | --------- | ----------- |
80
+ | [**Link**](/components/link) | Internal and external links • Standalone and inline variants |
81
+ | [**Pagination**](/components/pagination) | Page navigation with jumper and select controls |
82
+ | [**ScrollToTop**](/components/scroll-to-top) | Floating button to scroll back to top • Configurable threshold and position |
83
+ | [**Split Button**](/components/split-button) | Primary action with secondary dropdown options |
84
+
85
+ ---
86
+
87
+ ## Data Display
88
+
89
+ Render data and assets with consistent styling.
90
+
91
+ | Component | Description |
92
+ | --------- | ----------- |
93
+ | [**Table**](/components/table) | Data tables with sorting, pagination, loading states • Custom cell slots |
94
+ | [**Icon**](/components/icon) | Icon component with size and color props |
95
+ | [**Image**](/components/image) | Performance-focused image with lazy loading, skeleton placeholder, and error fallback |
96
+
97
+ ---
98
+
99
+ ## Quick Start
100
+
101
+ ### Import and Use
102
+
103
+ Import components individually (recommended for tree-shaking):
104
+
105
+ ```vue
106
+ <template>
107
+ <div class="form-example">
108
+ <BvInput v-model="email" label="Email" type="email" />
109
+ <BvButton variant="primary" @click="handleSubmit">Submit</BvButton>
110
+ </div>
111
+ </template>
112
+
113
+ <script setup lang="ts">
114
+ import { ref } from "vue";
115
+ import { BvButton, BvInput } from "@baklavue/ui";
116
+
117
+ const email = ref("");
118
+
119
+ const handleSubmit = () => {
120
+ console.log("Submitted:", email.value);
121
+ };
122
+ </script>
123
+ ```
124
+
125
+ Or import everything:
126
+
127
+ ```typescript
128
+ import * as BaklaVue from "@baklavue/ui";
129
+ ```
130
+
131
+ ### TypeScript
132
+
133
+ All components ship with full type definitions. Use inferred props or import types:
134
+
135
+ ```typescript
136
+ import type { ButtonProps } from "@baklavue/ui";
137
+
138
+ const props: ButtonProps = {
139
+ variant: "primary",
140
+ size: "medium",
141
+ };
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Next Steps
147
+
148
+ - [**Browse components**](/components/button) — Each component has examples, API docs, and live demos
149
+ - [**API Reference**](/api/) — Full programmatic API
150
+ - [**Getting Started**](/guide/getting-started) — Project setup and configuration
151
+ - [**Design Tokens**](/guide/design-tokens) — Customize colors, spacing, typography