vlite3 1.5.12 → 1.5.14

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 (124) hide show
  1. package/README.md +20 -8
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
  4. package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
  5. package/components/Form/AccordionView2.vue.js +1 -1
  6. package/components/Form/Form.vue.js +2 -2
  7. package/components/NavbarCommandPalette.vue.js +1 -1
  8. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +7 -7
  9. package/components/PanZoomViewport/PanZoomViewport.vue.js +1 -1
  10. package/components/Tabes/Tabes.vue.js +2 -2
  11. package/docs/README.md +16 -0
  12. package/docs/component-index.md +313 -0
  13. package/docs/components/accordion.md +52 -0
  14. package/docs/components/alert.md +34 -0
  15. package/docs/components/app-shell.md +371 -0
  16. package/docs/components/async-select.md +264 -0
  17. package/docs/components/attachments-list.md +231 -0
  18. package/docs/components/avatar-group.md +74 -0
  19. package/docs/components/avatar-uploader.md +61 -0
  20. package/docs/components/avatar.md +28 -0
  21. package/docs/components/badge.md +81 -0
  22. package/docs/components/barcode.md +42 -0
  23. package/docs/components/beacon.md +29 -0
  24. package/docs/components/breadcrumb.md +317 -0
  25. package/docs/components/button-group.md +35 -0
  26. package/docs/components/button.md +86 -0
  27. package/docs/components/calendar.md +95 -0
  28. package/docs/components/carousel.md +122 -0
  29. package/docs/components/cart.md +533 -0
  30. package/docs/components/category-manager.md +269 -0
  31. package/docs/components/category-menu.md +251 -0
  32. package/docs/components/charts.md +1456 -0
  33. package/docs/components/chat.md +330 -0
  34. package/docs/components/checkbox.md +31 -0
  35. package/docs/components/chip.md +137 -0
  36. package/docs/components/choice-box.md +40 -0
  37. package/docs/components/clipboard.md +105 -0
  38. package/docs/components/clock.md +70 -0
  39. package/docs/components/color-picker.md +82 -0
  40. package/docs/components/command-palette.md +214 -0
  41. package/docs/components/comment-thread.md +171 -0
  42. package/docs/components/confirmation-modal.md +50 -0
  43. package/docs/components/custom-fields-display.md +94 -0
  44. package/docs/components/custom-fields.md +97 -0
  45. package/docs/components/data-list.md +93 -0
  46. package/docs/components/data-table.md +922 -0
  47. package/docs/components/date-picker.md +58 -0
  48. package/docs/components/date-range-picker.md +24 -0
  49. package/docs/components/date-time.md +104 -0
  50. package/docs/components/dropdown.md +740 -0
  51. package/docs/components/empty.md +100 -0
  52. package/docs/components/export-data.md +320 -0
  53. package/docs/components/file-picker.md +83 -0
  54. package/docs/components/file-preview.md +42 -0
  55. package/docs/components/file-tree.md +144 -0
  56. package/docs/components/footer.md +251 -0
  57. package/docs/components/forms.md +776 -0
  58. package/docs/components/gantt-chart.md +767 -0
  59. package/docs/components/google-login.md +67 -0
  60. package/docs/components/google-map.md +128 -0
  61. package/docs/components/heatmap.md +80 -0
  62. package/docs/components/icon-picker.md +58 -0
  63. package/docs/components/icon.md +176 -0
  64. package/docs/components/image-comparison.md +51 -0
  65. package/docs/components/image-magnifier.md +26 -0
  66. package/docs/components/import-data.md +521 -0
  67. package/docs/components/input.md +58 -0
  68. package/docs/components/invoice.md +339 -0
  69. package/docs/components/kanban.md +302 -0
  70. package/docs/components/label.md +25 -0
  71. package/docs/components/list.md +419 -0
  72. package/docs/components/masonry.md +55 -0
  73. package/docs/components/modal.md +133 -0
  74. package/docs/components/multi-select.md +54 -0
  75. package/docs/components/navbar.md +403 -0
  76. package/docs/components/number-input.md +41 -0
  77. package/docs/components/otp-input.md +68 -0
  78. package/docs/components/pagination.md +83 -0
  79. package/docs/components/pan-zoom-viewport.md +245 -0
  80. package/docs/components/permission-editor.md +322 -0
  81. package/docs/components/persona.md +56 -0
  82. package/docs/components/price.md +106 -0
  83. package/docs/components/pricing-plan.md +68 -0
  84. package/docs/components/progress-bar.md +53 -0
  85. package/docs/components/qr-code.md +59 -0
  86. package/docs/components/rating.md +59 -0
  87. package/docs/components/rich-text-editor.md +210 -0
  88. package/docs/components/scale-generator.md +101 -0
  89. package/docs/components/screen.md +208 -0
  90. package/docs/components/seo-provider.md +189 -0
  91. package/docs/components/side-panel.md +94 -0
  92. package/docs/components/sidebar-menu.md +422 -0
  93. package/docs/components/skeleton.md +115 -0
  94. package/docs/components/slider.md +48 -0
  95. package/docs/components/spinner.md +27 -0
  96. package/docs/components/splitter.md +97 -0
  97. package/docs/components/stats.md +234 -0
  98. package/docs/components/status-chip.md +232 -0
  99. package/docs/components/switch.md +23 -0
  100. package/docs/components/tabs.md +335 -0
  101. package/docs/components/tag-input.md +55 -0
  102. package/docs/components/textarea.md +31 -0
  103. package/docs/components/theme-provider.md +130 -0
  104. package/docs/components/theme-toggle.md +36 -0
  105. package/docs/components/thumbnail-selector.md +186 -0
  106. package/docs/components/timeline.md +225 -0
  107. package/docs/components/toast-notification.md +89 -0
  108. package/docs/components/tooltip.md +31 -0
  109. package/docs/components/workbook.md +102 -0
  110. package/docs/composables/use-theme.md +59 -0
  111. package/docs/getting-started/setup.md +176 -0
  112. package/docs/guides/draggable.md +211 -0
  113. package/docs/guides/internationalization.md +281 -0
  114. package/docs/guides/performance.md +118 -0
  115. package/docs/guides/testing-forms.md +154 -0
  116. package/docs/guides/testing-overlays.md +131 -0
  117. package/docs/guides/theming.md +124 -0
  118. package/docs/utilities/search.md +580 -0
  119. package/docs/utilities/utilities.md +371 -0
  120. package/docs-manifest.json +336 -0
  121. package/package.json +5 -13
  122. package/scripts/generate-docs-manifest.js +207 -0
  123. package/scripts/sync-docs.js +754 -0
  124. package/style.css +1 -1
@@ -0,0 +1,231 @@
1
+ # AttachmentsList
2
+
3
+ **Import:** `import { AttachmentsList } from 'vlite3'`
4
+
5
+ Styled attachment list with secure download (Fetch + Blob, no new tab) and inline preview via `FilePreview`. Stable BEM classes (`vl-attachments-list__*`) for CSS overrides; `*Class` props inject Tailwind/custom classes without touching source.
6
+
7
+ ## Index
8
+
9
+ | # | Section | Jump |
10
+ |---|---------|------|
11
+ | 0 | Overview | _(above)_ |
12
+ | 1 | Props | [#1-props](#1-props) |
13
+ | 2 | Types | [#2-types](#2-types) |
14
+ | 3 | Slots | [#3-slots](#3-slots) |
15
+ | 4 | Variants | [#4-variants](#4-variants) |
16
+ | 5 | BEM / CSS hooks | [#5-bem--css-hooks](#5-bem--css-hooks) |
17
+ | 6 | Usage | [#6-usage](#6-usage) |
18
+ | 7 | Full props example | [#7-full-props-example](#7-full-props-example) |
19
+
20
+ ---
21
+
22
+ ## 1. Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ |------|------|---------|-------------|
26
+ | `attachments` | `AttachmentItem \| AttachmentItem[]` | `[]` | File(s) to display |
27
+ | `canView` | `boolean` | `true` | Show Preview (eye) control |
28
+ | `canDownload` | `boolean` | `true` | Enable programmatic download |
29
+ | `variant` | `'default' \| 'list' \| 'inline' \| 'card'` | `'default'` | Layout mode → [#4](#4-variants) |
30
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size for `default`/`list`/`inline` |
31
+ | `clickToPreview` | `boolean` | `false` | Row click opens preview; eye hidden |
32
+ | `showDownloadInList` | `boolean` | `true` | `false` hides list download btn (modal download still via `canDownload`) |
33
+ | `rootClass` | `string` | `''` | Root wrapper |
34
+ | `gridClass` | `string` | `''` | Card grid (**card** only) |
35
+ | `cardClass` | `string` | `''` | Card item (**card**) |
36
+ | `cardThumbnailClass` | `string` | `''` | Card thumbnail (**card**) |
37
+ | `cardInfoClass` | `string` | `''` | Card footer info (**card**) |
38
+ | `cardActionsClass` | `string` | `''` | Card overlay actions (**card**) |
39
+ | `listClass` | `string` | `''` | List container (`default`/`list`/`inline`) |
40
+ | `itemClass` | `string` | `''` | List row (`default`/`list`/`inline`) |
41
+ | `itemIconBoxClass` | `string` | `''` | List icon/thumbnail box |
42
+ | `itemNameClass` | `string` | `''` | File name text |
43
+ | `itemSizeClass` | `string` | `''` | File size subtext |
44
+ | `itemActionsClass` | `string` | `''` | List actions container |
45
+ | `emptyClass` | `string` | `''` | Empty-state placeholder |
46
+
47
+ ---
48
+
49
+ ## 2. Types
50
+
51
+ ```ts
52
+ export interface AttachmentItem {
53
+ fileName?: string
54
+ fileSize?: number
55
+ fileUrl: string
56
+ thumbnailUrl?: string
57
+ fileType?: string
58
+ [key: string]: any
59
+ }
60
+
61
+ /** Scoped props for `#item` slot */
62
+ export interface AttachmentItemSlotProps {
63
+ file: AttachmentItem
64
+ index: number
65
+ variant: 'default' | 'list' | 'inline' | 'card'
66
+ size: 'sm' | 'md' | 'lg'
67
+ canView: boolean
68
+ canDownload: boolean
69
+ clickToPreview: boolean
70
+ showDownloadInList: boolean
71
+ isDownloading: boolean
72
+ isPreviewable: boolean
73
+ isImage: boolean
74
+ formattedSize: string // e.g. "1.5 MB"; empty if no size
75
+ icon: string // Iconify icon for file type
76
+ preview: () => void | Promise<void> // open built-in preview (or download if not previewable)
77
+ download: () => Promise<void> // secure programmatic download
78
+ }
79
+ ```
80
+
81
+ ---
82
+
83
+ ## 3. Slots
84
+
85
+ | Slot | Scoped props | Behavior |
86
+ |------|--------------|----------|
87
+ | `item` | `AttachmentItemSlotProps` [#2](#2-types) | Replaces default row/card UI. Use `preview()` / `download()` for built-in actions. |
88
+
89
+ When `#item` is set, default card/list markup for that item is not rendered.
90
+
91
+ ```vue
92
+ <AttachmentsList :attachments="files" variant="list">
93
+ <template #item="{ file, icon, formattedSize, isDownloading, preview, download, canDownload }">
94
+ <div class="flex items-center gap-3 p-3 rounded-lg border cursor-pointer" @click="preview()">
95
+ <Icon :icon="icon" class="w-5 h-5 shrink-0" />
96
+ <div class="min-w-0 flex-1">
97
+ <p class="truncate">{{ file.fileName }}</p>
98
+ <p v-if="formattedSize">{{ formattedSize }}</p>
99
+ </div>
100
+ <Button v-if="canDownload" :loading="isDownloading" icon="lucide:download" @click.stop="download()" />
101
+ </div>
102
+ </template>
103
+ </AttachmentsList>
104
+ ```
105
+
106
+ ---
107
+
108
+ ## 4. Variants
109
+
110
+ | Variant | Layout | Notes |
111
+ |---------|--------|-------|
112
+ | `default` / `list` | Vertical bordered rows | Supports `size` sm/md/lg |
113
+ | `inline` | Transparent/muted rows | For chat bubbles / embedded content; supports `size` |
114
+ | `card` | Thumbnail grid + hover actions | Default 4-col responsive grid; override via `gridClass` |
115
+
116
+ ```vue
117
+ <AttachmentsList :attachments="files" variant="list" size="md" />
118
+ <AttachmentsList :attachments="files" variant="inline" size="sm" />
119
+ <AttachmentsList :attachments="files" variant="card" />
120
+ ```
121
+
122
+ ---
123
+
124
+ ## 5. BEM / CSS hooks
125
+
126
+ | Element | BEM | Related prop |
127
+ |---------|-----|--------------|
128
+ | Root | `vl-attachments-list` | `rootClass` |
129
+ | Card grid | `vl-attachments-list__grid` | `gridClass` |
130
+ | Card item | `vl-attachments-list__card` | `cardClass` |
131
+ | Card thumbnail | `vl-attachments-list__card-thumbnail` | `cardThumbnailClass` |
132
+ | Card info/footer | `vl-attachments-list__card-info` | `cardInfoClass` |
133
+ | Card overlay actions | `vl-attachments-list__card-actions` | `cardActionsClass` |
134
+ | List container | `vl-attachments-list__list` | `listClass` |
135
+ | List row | `vl-attachments-list__item` | `itemClass` |
136
+ | List icon box | `vl-attachments-list__item-icon-box` | `itemIconBoxClass` |
137
+ | File name | `vl-attachments-list__item-name` | `itemNameClass` |
138
+ | File size | `vl-attachments-list__item-size` | `itemSizeClass` |
139
+ | List actions | `vl-attachments-list__item-actions` | `itemActionsClass` |
140
+ | Empty state | `vl-attachments-list__empty` | `emptyClass` |
141
+
142
+ CSS override examples:
143
+
144
+ ```css
145
+ .vl-attachments-list__card-thumbnail { height: 12rem; }
146
+ .vl-attachments-list__item {
147
+ background-color: hsl(var(--primary) / 0.05);
148
+ border-color: hsl(var(--primary) / 0.2);
149
+ }
150
+ .vl-attachments-list__item-icon-box { border-radius: 9999px; }
151
+ ```
152
+
153
+ ---
154
+
155
+ ## 6. Usage
156
+
157
+ **Basic**
158
+ ```vue
159
+ <script setup>
160
+ import { AttachmentsList } from 'vlite3'
161
+ const files = [{ fileName: 'invoice-2023.pdf', fileSize: 1048576, fileUrl: 'https://example.com/invoice.pdf' }]
162
+ </script>
163
+ <template>
164
+ <AttachmentsList :attachments="files" />
165
+ </template>
166
+ ```
167
+
168
+ **Disable actions**
169
+ ```vue
170
+ <AttachmentsList :attachments="files" :can-download="false" :can-view="false" />
171
+ ```
172
+
173
+ **Click-to-preview** — eye hidden; row clickable; list download optional
174
+ ```vue
175
+ <AttachmentsList
176
+ :attachments="files"
177
+ variant="list"
178
+ :click-to-preview="true"
179
+ :show-download-in-list="false" />
180
+ ```
181
+
182
+ **Card + class hooks** — 2-col grid, tighter gap, custom card chrome
183
+ ```vue
184
+ <AttachmentsList
185
+ :attachments="files"
186
+ variant="card"
187
+ grid-class="grid-cols-2 gap-2"
188
+ card-class="rounded-none border-2"
189
+ card-thumbnail-class="h-32" />
190
+ ```
191
+
192
+ **List + class hooks**
193
+ ```vue
194
+ <AttachmentsList
195
+ :attachments="files"
196
+ variant="list"
197
+ item-class="!border-primary/30 !bg-primary/5"
198
+ item-icon-box-class="!rounded-full"
199
+ item-name-class="!text-primary"
200
+ item-size-class="!text-primary/50" />
201
+ ```
202
+
203
+ **Custom `#item`** → [#3](#3-slots)
204
+
205
+ ---
206
+
207
+ ## 7. Full props example
208
+
209
+ ```vue
210
+ <AttachmentsList
211
+ :attachments="files"
212
+ variant="card"
213
+ size="md"
214
+ :can-view="true"
215
+ :can-download="true"
216
+ :click-to-preview="false"
217
+ :show-download-in-list="true"
218
+ root-class="p-4 border rounded-xl"
219
+ grid-class="grid-cols-3 gap-3"
220
+ card-class="shadow-lg"
221
+ card-thumbnail-class="h-48"
222
+ card-info-class="bg-muted/20"
223
+ card-actions-class="gap-2"
224
+ list-class="gap-2"
225
+ item-class="!rounded-xl"
226
+ item-icon-box-class="!rounded-full"
227
+ item-name-class="font-bold"
228
+ item-size-class="italic"
229
+ item-actions-class="gap-2"
230
+ empty-class="!border-solid !border-primary/30" />
231
+ ```
@@ -0,0 +1,74 @@
1
+ # Avatar Group
2
+
3
+ **Import:** `import { AvatarGroup } from 'vlite3'`
4
+
5
+ ### Description
6
+
7
+ A visual layout component that stacks multiple avatars horizontally with a configurable overlap. It automatically calculates an overflow count (e.g., "+3") when the number of items exceeds the `max` prop and provides built-in tooltips for individual avatars.
8
+
9
+ ---
10
+
11
+ ### Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ | :-------- | :--------------------- | :----------- | :----------------------------------------------------------------------------------- |
15
+ | `items` | `AvatarGroupItem[]` | **Required** | Array of avatar data objects. |
16
+ | `max` | `number` | `4` | Maximum number of avatars to show before clustering the rest into an overflow badge. |
17
+ | `size` | `AvatarSize` | `'md'` | Size of the avatars: `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'`. |
18
+ | `rounded` | `AvatarRounded` | `'full'` | Border radius: `'none' \| 'sm' \| 'md' \| 'lg' \| 'full'`. |
19
+ | `overlap` | `'sm' \| 'md' \| 'lg'` | `'md'` | Density of the horizontal overlap. |
20
+
21
+ ---
22
+
23
+ ### Data Model
24
+
25
+ #### `AvatarGroupItem` Shape
26
+
27
+ | Property | Type | Description |
28
+ | :--------- | :-------- | :--------------------------------------------------------- |
29
+ | `src` | `string?` | Image URL for the avatar. |
30
+ | `alt` | `string?` | Alt text for accessibility. |
31
+ | `fallback` | `string?` | Initials or text to show if the image fails or is missing. |
32
+ | `heading` | `string?` | Bold text shown in the tooltip (e.g., User Name). |
33
+ | `text` | `string?` | Secondary text shown in the tooltip (e.g., User email). |
34
+
35
+ ---
36
+
37
+ ### Implementation Examples
38
+
39
+ #### 1. Basic Usage with Tooltips
40
+
41
+ ```vue
42
+ <script setup>
43
+ import { AvatarGroup } from 'vlite3'
44
+
45
+ const team = [
46
+ { src: '...', heading: 'Alice', text: 'Developer' },
47
+ { src: '...', heading: 'Bob', text: 'Designer' },
48
+ { src: '...', heading: 'Charlie', text: 'Product' },
49
+ { src: '...', heading: 'David', text: 'DevOps' },
50
+ ]
51
+ </script>
52
+
53
+ <template>
54
+ <AvatarGroup :items="team" :max="3" size="lg" />
55
+ </template>
56
+ ```
57
+
58
+ #### 2. Custom Shapes & Densities
59
+
60
+ ```vue
61
+ <template>
62
+ <!-- Square avatars with tight overlap -->
63
+ <AvatarGroup :items="items" rounded="none" overlap="lg" size="sm" />
64
+ </template>
65
+ ```
66
+
67
+ ---
68
+
69
+ ### Senior Engineer's Notes
70
+
71
+ 1. **Visual Separation**: The component automatically adds a ring (`ring-2 ring-background`) around each avatar to ensure clear visual separation when they overlap.
72
+ 2. **Performance**: The overflow calculation is handled via a lightweight computed property. For lists with hundreds of users, always keep the `max` prop at a reasonable number (e.g., 3-10) to minimize the number of DOM nodes.
73
+ 3. **Tooltip Integration**: The component uses the internal `Tooltip` component. Tooltips are only rendered if either `heading` or `text` is provided for an item.
74
+ 4. **Fallback Rendering**: If `src` is missing, the `Avatar` component's built-in fallback logic is used (usually showing initials derived from `alt` or `fallback`).
@@ -0,0 +1,61 @@
1
+ # AvatarUploader
2
+
3
+ **Import:** `import { AvatarUploader } from 'vlite3'`
4
+
5
+ ### Description
6
+
7
+ A single-image avatar picker built on `FilePicker`. Use it standalone with `v-model`, or as a Form field via `type: 'avatarUpload'`. Pending base64 values are uploaded through the global upload service before form submission — the same pipeline used by [`ThumbnailSelector`](../advanced/thumbnail-selector.md) (`thumbnailSelector`) and `fileUploader`.
8
+
9
+ For multi-image galleries with a primary thumbnail, use [ThumbnailSelector](../advanced/thumbnail-selector.md) instead.
10
+
11
+ ### Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ | :----------- | :--------------- | :--------- | :------------------------------------------ |
15
+ | `modelValue` | `string \| null` | `null` | Binding (`v-model`) - usually Base64 or URL |
16
+ | `size` | `AvatarSize` | `'xl'` | Size of the avatar |
17
+ | `rounded` | `AvatarRounded` | `'full'` | Border radius |
18
+ | `editable` | `boolean` | `true` | Enable upload/remove actions |
19
+ | `loading` | `boolean` | `false` | Show loading overlay |
20
+ | `disabled` | `boolean` | `false` | Disable interactions |
21
+ | `fallback` | `string` | — | Fallback image/text |
22
+ | `alt` | `string` | `'Avatar'` | Alt text for accessible reading |
23
+ | `maxSize` | `number` | — | Max file size in bytes |
24
+ | `className` | `string` | — | Custom class for Avatar |
25
+
26
+ ### Events
27
+
28
+ - `@update:modelValue`: Emitted with Base64 string on upload
29
+ - `@change`: Emitted with full `FilePickerValue` object
30
+ - `@error`: Emitted on validation errors
31
+
32
+ ### Form Field Integration
33
+
34
+ Declare `type: 'avatarUpload'` in a Form schema. The field value is a string (URL or pending base64). Use `maxFileSize` (in **MB**) on the schema field — Form forwards it to the uploader.
35
+
36
+ ```javascript
37
+ const schema = [
38
+ {
39
+ name: 'avatar',
40
+ label: 'Profile Picture',
41
+ type: 'avatarUpload',
42
+ maxFileSize: 5, // MB
43
+ },
44
+ ]
45
+ ```
46
+
47
+ See [Forms — File Uploads](./forms.md#file-uploads) for the full upload field set (`avatarUpload`, `thumbnailSelector`, `fileUploader`, `file`).
48
+
49
+ ### Usage
50
+
51
+ #### Basic Usage
52
+
53
+ ```vue
54
+ <AvatarUploader v-model="userAvatar" size="xl" />
55
+ ```
56
+
57
+ #### Rounded Square & Validation
58
+
59
+ ```vue
60
+ <AvatarUploader v-model="avatar" rounded="lg" :max-size="1024 * 1024" @error="handleError" />
61
+ ```
@@ -0,0 +1,28 @@
1
+ # Avatar
2
+
3
+ **Import:** `import { Avatar } from 'vlite3'`
4
+
5
+ ### Props
6
+
7
+ | Prop | Type | Default | Description |
8
+ | ---------- | --------------- | -------- | ------------------------------------- |
9
+ | `src` | `string` | — | Image URL |
10
+ | `alt` | `string` | `Avatar` | Alt text, used for initial generation |
11
+ | `fallback` | `string` | — | Explicit text fallback (e.g. "JD") |
12
+ | `size` | `AvatarSize` | `md` | Dimensions |
13
+ | `rounded` | `AvatarRounded` | `full` | Shape |
14
+ | `class` | `string` | — | Custom classes |
15
+
16
+ ### Types
17
+
18
+ ```ts
19
+ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
20
+ type AvatarRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'
21
+ ```
22
+
23
+ ### Usage
24
+
25
+ ```vue
26
+ <Avatar src="https://i.pravatar.cc/150" size="lg" />
27
+ <Avatar alt="John Doe" fallback="JD" rounded="md" />
28
+ ```
@@ -0,0 +1,81 @@
1
+ # Badge
2
+
3
+ **Import:** `import { Badge } from 'vlite3'`
4
+
5
+ A small inline label component for displaying statuses, categories, or counts. Renders as a rounded pill with a semantic or neutral color variant.
6
+
7
+ Label text always stays on a single line. Width sizes to content (`w-max`) and does not shrink in tables, flex columns, or other constrained containers.
8
+
9
+ ### Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | :-------- | :---------------------- | :---------- | :--------------------------------------------- |
13
+ | `variant` | `BadgeVariant \| string` | `'default'` | Color theme of the badge |
14
+ | `class` | `string` | `''` | Additional CSS classes applied to the root |
15
+
16
+ ### Slots
17
+
18
+ | Slot | Description |
19
+ | :-------- | :--------------------------------- |
20
+ | `default` | Badge label / content |
21
+
22
+ ### Types
23
+ ```ts
24
+ type BadgeVariant =
25
+ | 'default'
26
+ | 'secondary'
27
+ | 'outline'
28
+ | 'danger'
29
+ | 'warning'
30
+ | 'info'
31
+ | 'success'
32
+ | 'purple'
33
+ | 'teal'
34
+ | 'indigo'
35
+ | 'orange'
36
+ | 'pink'
37
+ | 'cyan'
38
+ ```
39
+
40
+ ### Variants
41
+
42
+ | Value | Description |
43
+ | :---------- | :---------------------------------------------------------- |
44
+ | `default` | Filled primary background with primary foreground text |
45
+ | `secondary` | Secondary subtle background with matching border |
46
+ | `outline` | Transparent background with visible border, foreground text |
47
+ | `danger` | Red semantic color (subtle background + border) |
48
+ | `warning` | Amber/yellow semantic color |
49
+ | `info` | Blue semantic color |
50
+ | `success` | Green semantic color |
51
+ | `purple` | Purple extended semantic color |
52
+ | `teal` | Teal extended semantic color |
53
+ | `indigo` | Indigo extended semantic color |
54
+ | `orange` | Orange extended semantic color |
55
+ | `pink` | Pink extended semantic color |
56
+ | `cyan` | Cyan extended semantic color |
57
+
58
+ > The `variant` prop also accepts any `string` to support dynamic or custom extended themes.
59
+
60
+ ### Usage
61
+ ```vue
62
+ <!-- Base -->
63
+ <Badge>Default</Badge>
64
+ <Badge variant="secondary">Secondary</Badge>
65
+ <Badge variant="outline">Outline</Badge>
66
+
67
+ <!-- Semantic colors -->
68
+ <Badge variant="success">Completed</Badge>
69
+ <Badge variant="warning">Pending</Badge>
70
+ <Badge variant="danger">Failed</Badge>
71
+ <Badge variant="info">Processing</Badge>
72
+
73
+ <!-- Extended colors -->
74
+ <Badge variant="purple">Beta</Badge>
75
+ <Badge variant="teal">Featured</Badge>
76
+ <Badge variant="indigo">New</Badge>
77
+
78
+ <!-- With custom class -->
79
+ <Badge variant="success" class="text-sm px-3">Large Badge</Badge>
80
+ ```
81
+
@@ -0,0 +1,42 @@
1
+ # Barcode
2
+
3
+ **Import:** `import { Barcode, barcodesConstants } from 'vlite3'`
4
+
5
+ ### Description
6
+
7
+ A highly customizable and responsive component for rendering barcodes in multiple formats using `jsbarcode`. It automatically scales to fit inside its parent container while preserving its aspect ratio.
8
+
9
+ ### Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | :------------- | :-------- | :---------- | :------------------------------- |
13
+ | `value` | `string` | — | The value to encode |
14
+ | `format` | `string` | `'CODE128'` | Barcode format |
15
+ | `displayValue` | `boolean` | `true` | Show the value below the barcode |
16
+ | `width` | `number` | `2` | Width of a single bar |
17
+ | `height` | `number` | `100` | Height of the barcode |
18
+ | `lineColor` | `string` | `'#000000'` | Color of the barcode bars |
19
+ | `background` | `string` | `'#ffffff'` | Background color |
20
+ | `margin` | `number` | `10` | Margin around the barcode |
21
+
22
+ ### Constants
23
+
24
+ You can import `barcodesConstants` for a convenient list of supported formats:
25
+
26
+ ```ts
27
+ import { barcodesConstants } from 'vlite3'
28
+ ```
29
+
30
+ Includes: `CODE128`, `CODE39`, `UPC`, `EAN13`, `ITF14`, `EAN8`, `EAN5`, `MSI`, `pharmacode`, `EAN2`
31
+
32
+ ### Usage
33
+
34
+ ```vue
35
+ <script setup>
36
+ import { Barcode } from 'vlite3'
37
+ </script>
38
+
39
+ <template>
40
+ <Barcode value="vLite3-1234" format="CODE128" />
41
+ </template>
42
+ ```
@@ -0,0 +1,29 @@
1
+ # Beacon
2
+
3
+ **Import:** `import { Beacon } from 'vlite3'`
4
+
5
+ A pulsating beacon that attracts attention, acting as an indicator for users to notice updates, notifications, or features.
6
+
7
+ ### Props
8
+
9
+ | Prop | Type | Default | Description |
10
+ | :-------- | :------------------------------------------------------ | :-------- | :------------ |
11
+ | `variant` | `primary \| danger \| warning \| success \| info` | `primary` | Visual style |
12
+ | `size` | `sm \| md \| lg` | `md` | Dimensions |
13
+ | `class` | `any` | — | Custom class |
14
+
15
+ ### Usage
16
+
17
+ ```vue
18
+ <!-- Basic -->
19
+ <Beacon />
20
+
21
+ <!-- Status Indicator -->
22
+ <Beacon variant="success" />
23
+
24
+ <!-- On a Button -->
25
+ <div class="relative inline-flex">
26
+ <Button icon="lucide:bell" variant="outline" rounded="full" />
27
+ <Beacon variant="danger" class="absolute top-0 right-0" />
28
+ </div>
29
+ ```