vlite3 1.5.11 → 1.5.13
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.
- package/README.md +20 -8
- package/components/Accordion/AccordionContent.vue.js +2 -2
- package/components/CategoryManager/CategoryManager2.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/{AccordionView.vue.js → AccordionView2.vue.js} +2 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/index2.vue.js +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +7 -7
- package/components/PanZoomViewport/PanZoomViewport.vue.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Splitter/Splitter.vue.d.ts +7 -0
- package/components/Splitter/Splitter.vue.js +33 -29
- package/components/Tabes/Tabes.vue.js +2 -2
- package/docs/README.md +17 -0
- package/docs/all-components.md +89 -0
- package/docs/component-index.md +313 -0
- package/docs/components/accordion.md +52 -0
- package/docs/components/alert.md +34 -0
- package/docs/components/app-shell.md +371 -0
- package/docs/components/async-select.md +264 -0
- package/docs/components/attachments-list.md +231 -0
- package/docs/components/avatar-group.md +74 -0
- package/docs/components/avatar-uploader.md +61 -0
- package/docs/components/avatar.md +28 -0
- package/docs/components/badge.md +81 -0
- package/docs/components/barcode.md +42 -0
- package/docs/components/beacon.md +29 -0
- package/docs/components/breadcrumb.md +317 -0
- package/docs/components/button-group.md +35 -0
- package/docs/components/button.md +86 -0
- package/docs/components/calendar.md +95 -0
- package/docs/components/carousel.md +122 -0
- package/docs/components/cart.md +533 -0
- package/docs/components/category-manager.md +269 -0
- package/docs/components/category-menu.md +251 -0
- package/docs/components/charts.md +1456 -0
- package/docs/components/chat.md +330 -0
- package/docs/components/checkbox.md +31 -0
- package/docs/components/chip.md +137 -0
- package/docs/components/choice-box.md +40 -0
- package/docs/components/clipboard.md +105 -0
- package/docs/components/clock.md +70 -0
- package/docs/components/color-picker.md +82 -0
- package/docs/components/command-palette.md +214 -0
- package/docs/components/comment-thread.md +171 -0
- package/docs/components/confirmation-modal.md +50 -0
- package/docs/components/custom-fields-display.md +94 -0
- package/docs/components/custom-fields.md +97 -0
- package/docs/components/data-list.md +93 -0
- package/docs/components/data-table.md +922 -0
- package/docs/components/date-picker.md +58 -0
- package/docs/components/date-range-picker.md +24 -0
- package/docs/components/date-time.md +104 -0
- package/docs/components/dropdown.md +740 -0
- package/docs/components/empty.md +100 -0
- package/docs/components/export-data.md +320 -0
- package/docs/components/file-picker.md +83 -0
- package/docs/components/file-preview.md +42 -0
- package/docs/components/file-tree.md +144 -0
- package/docs/components/footer.md +251 -0
- package/docs/components/forms.md +776 -0
- package/docs/components/gantt-chart.md +767 -0
- package/docs/components/google-login.md +67 -0
- package/docs/components/google-map.md +128 -0
- package/docs/components/heatmap.md +80 -0
- package/docs/components/icon-picker.md +58 -0
- package/docs/components/icon.md +176 -0
- package/docs/components/image-comparison.md +51 -0
- package/docs/components/image-magnifier.md +26 -0
- package/docs/components/import-data.md +521 -0
- package/docs/components/input.md +58 -0
- package/docs/components/invoice.md +339 -0
- package/docs/components/kanban.md +302 -0
- package/docs/components/label.md +25 -0
- package/docs/components/list.md +419 -0
- package/docs/components/masonry.md +55 -0
- package/docs/components/modal.md +133 -0
- package/docs/components/multi-select.md +54 -0
- package/docs/components/navbar.md +403 -0
- package/docs/components/number-input.md +41 -0
- package/docs/components/otp-input.md +68 -0
- package/docs/components/pagination.md +83 -0
- package/docs/components/pan-zoom-viewport.md +245 -0
- package/docs/components/permission-editor.md +322 -0
- package/docs/components/persona.md +56 -0
- package/docs/components/price.md +106 -0
- package/docs/components/pricing-plan.md +68 -0
- package/docs/components/progress-bar.md +53 -0
- package/docs/components/qr-code.md +59 -0
- package/docs/components/rating.md +59 -0
- package/docs/components/rich-text-editor.md +210 -0
- package/docs/components/scale-generator.md +101 -0
- package/docs/components/screen.md +208 -0
- package/docs/components/seo-provider.md +189 -0
- package/docs/components/side-panel.md +94 -0
- package/docs/components/sidebar-menu.md +422 -0
- package/docs/components/skeleton.md +115 -0
- package/docs/components/slider.md +48 -0
- package/docs/components/spinner.md +27 -0
- package/docs/components/splitter.md +97 -0
- package/docs/components/stats.md +234 -0
- package/docs/components/status-chip.md +232 -0
- package/docs/components/switch.md +23 -0
- package/docs/components/tabs.md +335 -0
- package/docs/components/tag-input.md +55 -0
- package/docs/components/textarea.md +31 -0
- package/docs/components/theme-provider.md +130 -0
- package/docs/components/theme-toggle.md +36 -0
- package/docs/components/thumbnail-selector.md +186 -0
- package/docs/components/timeline.md +225 -0
- package/docs/components/toast-notification.md +89 -0
- package/docs/components/tooltip.md +31 -0
- package/docs/components/workbook.md +102 -0
- package/docs/composables/use-theme.md +59 -0
- package/docs/getting-started/setup.md +176 -0
- package/docs/guides/draggable.md +211 -0
- package/docs/guides/internationalization.md +281 -0
- package/docs/guides/performance.md +118 -0
- package/docs/guides/testing-forms.md +154 -0
- package/docs/guides/testing-overlays.md +131 -0
- package/docs/guides/theming.md +124 -0
- package/docs/utilities/search.md +580 -0
- package/docs/utilities/utilities.md +371 -0
- package/docs-manifest.json +339 -0
- package/package.json +6 -15
- package/scripts/generate-docs-manifest.js +207 -0
- package/scripts/sync-docs.js +754 -0
- package/style.css +1 -1
- /package/components/Dropdown/{DropdownMenu2.vue.js → DropdownMenu3.vue.js} +0 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# Breadcrumb
|
|
2
|
+
|
|
3
|
+
**Import:** `import { Breadcrumb, BreadcrumbItem } from 'vlite3'`
|
|
4
|
+
|
|
5
|
+
The `Breadcrumb` component displays a navigational hierarchy for the current page. It supports data-driven usage via the `items` prop, or manual slot-driven composition using `<BreadcrumbItem>` directly.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Breadcrumb (Wrapper)
|
|
10
|
+
|
|
11
|
+
### Props
|
|
12
|
+
|
|
13
|
+
| Prop | Type | Default | Description |
|
|
14
|
+
| :---------- | :------------------- | :---------- | :------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `items` | `BreadcrumbItemSchema[]` | — | Array of breadcrumb items rendered automatically. When omitted, use the default slot. |
|
|
16
|
+
| `variant` | `BreadcrumbVariant` | `default` | Visual style of the breadcrumb. See variants below. |
|
|
17
|
+
| `separator` | `BreadcrumbSeparator`| `chevron` | Character used between items. See separator options below. |
|
|
18
|
+
| `size` | `BreadcrumbSize` | `md` | Font size of the breadcrumb trail. |
|
|
19
|
+
| `maxItems` | `number` | — | Max visible items before collapsing. Shows first item, ellipsis, and tail items. Click `…` to expand. |
|
|
20
|
+
| `class` | `string` | — | Additional CSS classes applied to the `<nav>` wrapper. |
|
|
21
|
+
|
|
22
|
+
### Emits
|
|
23
|
+
|
|
24
|
+
| Event | Payload | Description |
|
|
25
|
+
| :----------- | :---------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `item-click` | `{ item: BreadcrumbItemSchema, index: number }` | Fires on every clickable item click (non-disabled, non-current). Routing via `to`/`href` still happens normally in parallel. `index` is the position in the original `items` array. |
|
|
27
|
+
|
|
28
|
+
### Types
|
|
29
|
+
```ts
|
|
30
|
+
type BreadcrumbVariant = 'default' | 'contained' | 'pills' | 'arrow'
|
|
31
|
+
|
|
32
|
+
type BreadcrumbSeparator = 'slash' | 'chevron' | 'dot' | 'arrow'
|
|
33
|
+
|
|
34
|
+
type BreadcrumbSize = 'sm' | 'md' | 'lg'
|
|
35
|
+
|
|
36
|
+
interface BreadcrumbItemSchema {
|
|
37
|
+
label: string
|
|
38
|
+
to?: string // Vue Router route path
|
|
39
|
+
href?: string // Native anchor href
|
|
40
|
+
icon?: string // Iconify icon ID rendered before the label
|
|
41
|
+
disabled?: boolean
|
|
42
|
+
active?: boolean
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Variants
|
|
47
|
+
|
|
48
|
+
| Value | Description |
|
|
49
|
+
| :---------- | :--------------------------------------------------------------------------- |
|
|
50
|
+
| `default` | Plain text links with no background, minimal visual weight. |
|
|
51
|
+
| `contained` | Wraps the entire breadcrumb in a pill-shaped bordered container. |
|
|
52
|
+
| `pills` | Each individual item gets a rounded pill background; active item uses primary color. |
|
|
53
|
+
| `arrow` | Items are shaped as chevron arrows using clip-path, flowing seamlessly left-to-right. |
|
|
54
|
+
|
|
55
|
+
### Separators
|
|
56
|
+
|
|
57
|
+
| Value | Character | Description |
|
|
58
|
+
| :-------- | :-------- | :---------------- |
|
|
59
|
+
| `chevron` | `›` | Default separator |
|
|
60
|
+
| `slash` | `/` | URL-style |
|
|
61
|
+
| `dot` | `·` | Subtle divider |
|
|
62
|
+
| `arrow` | `→` | Directional arrow |
|
|
63
|
+
|
|
64
|
+
> **Note:** When `variant="arrow"` is used, separators are hidden automatically via CSS.
|
|
65
|
+
|
|
66
|
+
### Slots
|
|
67
|
+
|
|
68
|
+
| Name | Description |
|
|
69
|
+
| :-------- | :-------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `default` | Used for manual slot-driven composition. Rendered when `items` prop is not provided. Place `<BreadcrumbItem>` components and separator `<li>` elements here. |
|
|
71
|
+
|
|
72
|
+
### Collapse Behavior
|
|
73
|
+
|
|
74
|
+
When `maxItems` is set and the `items` array exceeds that count, the breadcrumb automatically collapses. It shows the **first item**, an **ellipsis button (`…`)**, and the **last `maxItems - 1` items**. Clicking the ellipsis expands the full list. This state is internal and resets on component remount.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## BreadcrumbItem
|
|
79
|
+
|
|
80
|
+
The `BreadcrumbItem` is the individual item component used either internally by `Breadcrumb` when `items` is provided, or directly in the default slot for manual composition.
|
|
81
|
+
|
|
82
|
+
### Props
|
|
83
|
+
|
|
84
|
+
| Prop | Type | Default | Description |
|
|
85
|
+
| :---------- | :------------------- | :-------- | :-------------------------------------------------------------------------- |
|
|
86
|
+
| `label` | `string` | — | Display text of the item. Used as slot fallback. |
|
|
87
|
+
| `to` | `string` | — | Vue Router route path. Renders a `<router-link>` when set. |
|
|
88
|
+
| `href` | `string` | — | Native anchor href. Renders an `<a>` tag when set (and `to` is not set). |
|
|
89
|
+
| `icon` | `string` | — | Iconify icon ID rendered before the label. |
|
|
90
|
+
| `disabled` | `boolean` | `false` | Grays out the item and disables interaction. Renders as `<span>`. |
|
|
91
|
+
| `isCurrent` | `boolean` | `false` | Marks item as the active/current page. Renders bold, no link, aria-current. |
|
|
92
|
+
| `size` | `BreadcrumbSize` | `md` | Controls icon size relative to text. Inherited from parent `Breadcrumb`. |
|
|
93
|
+
| `variant` | `string` | `default` | Inherited from parent `Breadcrumb` for style context. |
|
|
94
|
+
|
|
95
|
+
### Slot
|
|
96
|
+
|
|
97
|
+
| Name | Description |
|
|
98
|
+
| :-------- | :-------------------------------------------------------- |
|
|
99
|
+
| `default` | Custom content inside the item, overrides the `label` prop. |
|
|
100
|
+
|
|
101
|
+
### Tag Resolution
|
|
102
|
+
|
|
103
|
+
The rendered HTML element is automatically resolved:
|
|
104
|
+
|
|
105
|
+
| Condition | Rendered Tag |
|
|
106
|
+
| :------------------------ | :---------------- |
|
|
107
|
+
| `disabled` or `isCurrent` | `<span>` |
|
|
108
|
+
| `to` is set | `<router-link>` |
|
|
109
|
+
| `href` is set | `<a>` |
|
|
110
|
+
| None of the above | `<span>` |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## useBreadcrumb Composable
|
|
115
|
+
|
|
116
|
+
**Import:** `import { useBreadcrumb } from 'vlite3'`
|
|
117
|
+
|
|
118
|
+
Automatically generates reactive breadcrumb items from the current Vue Router route path. Useful for integrating Breadcrumb into layouts without manual configuration.
|
|
119
|
+
```ts
|
|
120
|
+
function useBreadcrumb(options?: UseBreadcrumbOptions): { items: ComputedRef<BreadcrumbItemSchema[]> }
|
|
121
|
+
|
|
122
|
+
interface UseBreadcrumbOptions {
|
|
123
|
+
homeIcon?: string // Default: 'lucide:home'
|
|
124
|
+
homeLabel?: string // Default: 'Home'
|
|
125
|
+
homePath?: string // Default: '/'
|
|
126
|
+
labelMap?: Record<string, string> // Override labels per path, e.g. { '/settings': 'Preferences' }
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Path segments are humanized automatically: `avatar-uploader` → `Avatar Uploader`.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Examples
|
|
135
|
+
|
|
136
|
+
### Basic (data-driven)
|
|
137
|
+
```vue
|
|
138
|
+
<script setup>
|
|
139
|
+
import { Breadcrumb } from 'vlite3'
|
|
140
|
+
|
|
141
|
+
const items = [
|
|
142
|
+
{ label: 'Home', to: '/', icon: 'lucide:home' },
|
|
143
|
+
{ label: 'Components', to: '/components' },
|
|
144
|
+
{ label: 'Breadcrumb' },
|
|
145
|
+
]
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<template>
|
|
149
|
+
<Breadcrumb :items="items" />
|
|
150
|
+
</template>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Event-based click (state navigation)
|
|
154
|
+
|
|
155
|
+
Just add `@item-click` — no flags, no extra config. Fires for every clickable item.
|
|
156
|
+
Items with `to`/`href` still route normally; the event fires in parallel.
|
|
157
|
+
```vue
|
|
158
|
+
<script setup>
|
|
159
|
+
import { Breadcrumb } from 'vlite3'
|
|
160
|
+
import type { BreadcrumbItemSchema } from 'vlite3'
|
|
161
|
+
|
|
162
|
+
const steps: BreadcrumbItemSchema[] = [
|
|
163
|
+
{ label: 'Account', icon: 'lucide:user' },
|
|
164
|
+
{ label: 'Profile', icon: 'lucide:pencil' },
|
|
165
|
+
{ label: 'Review', icon: 'lucide:check-circle' },
|
|
166
|
+
]
|
|
167
|
+
|
|
168
|
+
function onStep({ item, index }: { item: BreadcrumbItemSchema; index: number }) {
|
|
169
|
+
// use index to drive any state — wizard step, tab, panel, etc.
|
|
170
|
+
}
|
|
171
|
+
</script>
|
|
172
|
+
|
|
173
|
+
<template>
|
|
174
|
+
<Breadcrumb :items="steps" variant="pills" @item-click="onStep" />
|
|
175
|
+
</template>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Variants
|
|
179
|
+
```vue
|
|
180
|
+
<Breadcrumb :items="items" variant="default" />
|
|
181
|
+
<Breadcrumb :items="items" variant="contained" />
|
|
182
|
+
<Breadcrumb :items="items" variant="pills" />
|
|
183
|
+
<Breadcrumb :items="items" variant="arrow" />
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Separators
|
|
187
|
+
```vue
|
|
188
|
+
<Breadcrumb :items="items" separator="chevron" />
|
|
189
|
+
<Breadcrumb :items="items" separator="slash" />
|
|
190
|
+
<Breadcrumb :items="items" separator="dot" />
|
|
191
|
+
<Breadcrumb :items="items" separator="arrow" />
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Sizes
|
|
195
|
+
```vue
|
|
196
|
+
<Breadcrumb :items="items" size="sm" />
|
|
197
|
+
<Breadcrumb :items="items" size="md" />
|
|
198
|
+
<Breadcrumb :items="items" size="lg" />
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### With Icons
|
|
202
|
+
```vue
|
|
203
|
+
<script setup>
|
|
204
|
+
const items = [
|
|
205
|
+
{ label: 'Home', to: '/', icon: 'lucide:home' },
|
|
206
|
+
{ label: 'Settings', icon: 'lucide:settings' },
|
|
207
|
+
{ label: 'Security', icon: 'lucide:shield' },
|
|
208
|
+
]
|
|
209
|
+
</script>
|
|
210
|
+
|
|
211
|
+
<template>
|
|
212
|
+
<Breadcrumb :items="items" />
|
|
213
|
+
</template>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Collapsed (maxItems)
|
|
217
|
+
```vue
|
|
218
|
+
<script setup>
|
|
219
|
+
const longItems = [
|
|
220
|
+
{ label: 'Home', to: '/' },
|
|
221
|
+
{ label: 'Documents' },
|
|
222
|
+
{ label: 'Projects' },
|
|
223
|
+
{ label: 'Web Development' },
|
|
224
|
+
{ label: 'Vue Components' },
|
|
225
|
+
{ label: 'Breadcrumb' },
|
|
226
|
+
]
|
|
227
|
+
</script>
|
|
228
|
+
|
|
229
|
+
<template>
|
|
230
|
+
<!-- Shows: Home > ... > Vue Components > Breadcrumb -->
|
|
231
|
+
<Breadcrumb :items="longItems" :max-items="3" />
|
|
232
|
+
</template>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Disabled Item
|
|
236
|
+
```vue
|
|
237
|
+
<script setup>
|
|
238
|
+
const items = [
|
|
239
|
+
{ label: 'Home', to: '/', icon: 'lucide:home' },
|
|
240
|
+
{ label: 'Archived', disabled: true },
|
|
241
|
+
{ label: 'Current Page' },
|
|
242
|
+
]
|
|
243
|
+
</script>
|
|
244
|
+
|
|
245
|
+
<template>
|
|
246
|
+
<Breadcrumb :items="items" />
|
|
247
|
+
</template>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Combined Variant + Separator + Size
|
|
251
|
+
```vue
|
|
252
|
+
<Breadcrumb :items="items" variant="contained" separator="slash" size="md" />
|
|
253
|
+
<Breadcrumb :items="items" variant="pills" separator="dot" size="lg" />
|
|
254
|
+
<Breadcrumb :items="items" variant="arrow" size="sm" />
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Slot-Driven (Manual Composition)
|
|
258
|
+
|
|
259
|
+
Use `<BreadcrumbItem>` directly when you need custom rendering inside items.
|
|
260
|
+
```vue
|
|
261
|
+
<template>
|
|
262
|
+
<Breadcrumb>
|
|
263
|
+
<BreadcrumbItem label="Home" to="/" icon="lucide:home" />
|
|
264
|
+
<li class="breadcrumb-separator" aria-hidden="true"><span>›</span></li>
|
|
265
|
+
<BreadcrumbItem label="Library" />
|
|
266
|
+
<li class="breadcrumb-separator" aria-hidden="true"><span>›</span></li>
|
|
267
|
+
<BreadcrumbItem label="Current Page" :is-current="true" />
|
|
268
|
+
</Breadcrumb>
|
|
269
|
+
</template>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Auto-generated from Route (useBreadcrumb)
|
|
273
|
+
```vue
|
|
274
|
+
<script setup>
|
|
275
|
+
import { Breadcrumb, useBreadcrumb } from 'vlite3'
|
|
276
|
+
|
|
277
|
+
const { items } = useBreadcrumb({
|
|
278
|
+
homeIcon: 'lucide:home',
|
|
279
|
+
labelMap: {
|
|
280
|
+
'/settings': 'Preferences',
|
|
281
|
+
'/settings/account': 'Account Settings',
|
|
282
|
+
},
|
|
283
|
+
})
|
|
284
|
+
</script>
|
|
285
|
+
|
|
286
|
+
<template>
|
|
287
|
+
<Breadcrumb :items="items" separator="slash" size="sm" />
|
|
288
|
+
</template>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Inside Navbar (breadcrumb prop)
|
|
292
|
+
|
|
293
|
+
The `Navbar` component has built-in breadcrumb support via props. Pass `breadcrumb` to enable it, and access the generated items in the `#header` slot scope.
|
|
294
|
+
```vue
|
|
295
|
+
<Navbar
|
|
296
|
+
breadcrumb
|
|
297
|
+
breadcrumb-variant="default"
|
|
298
|
+
breadcrumb-separator="slash"
|
|
299
|
+
breadcrumb-size="sm"
|
|
300
|
+
breadcrumb-home-icon="lucide:home"
|
|
301
|
+
breadcrumb-position="header">
|
|
302
|
+
<template #header="{ breadcrumbItems }">
|
|
303
|
+
<Breadcrumb :items="breadcrumbItems" separator="slash" size="sm" />
|
|
304
|
+
</template>
|
|
305
|
+
</Navbar>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
| Navbar Prop | Type | Default | Description |
|
|
309
|
+
| :---------------------- | :-------------------- | :------------- | :---------------------------------------------------- |
|
|
310
|
+
| `breadcrumb` | `boolean` | `false` | Enables auto-breadcrumb generation from current route |
|
|
311
|
+
| `breadcrumbVariant` | `BreadcrumbVariant` | `default` | Visual variant passed to `<Breadcrumb>` |
|
|
312
|
+
| `breadcrumbSeparator` | `BreadcrumbSeparator` | `chevron` | Separator passed to `<Breadcrumb>` |
|
|
313
|
+
| `breadcrumbSize` | `BreadcrumbSize` | `sm` | Size passed to `<Breadcrumb>` |
|
|
314
|
+
| `breadcrumbHomeIcon` | `string` | `lucide:home` | Icon for the Home item |
|
|
315
|
+
| `breadcrumbPosition` | `'header' \| 'main'` | `header` | Where to render the breadcrumb inside the layout |
|
|
316
|
+
| `breadcrumbLabels` | `Record<string, string>` | — | Override labels per path segment |
|
|
317
|
+
| `breadcrumbClass` | `string` | — | Custom class for the breadcrumb wrapper |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ButtonGroup
|
|
2
|
+
|
|
3
|
+
**Import:** `import { ButtonGroup } from 'vlite3'`
|
|
4
|
+
|
|
5
|
+
### Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
| ----------- | ---------------------------- | ------------ | ----------------------------- |
|
|
9
|
+
| `variant` | `ButtonVariant` | — | Group button variant |
|
|
10
|
+
| `size` | `ButtonSize` | — | Group button size |
|
|
11
|
+
| `direction` | `'horizontal' \| 'vertical'` | `horizontal` | Layout axis |
|
|
12
|
+
| `attached` | `boolean` | `true` | Fuse borders (false adds gap) |
|
|
13
|
+
| `class` | `string` | — | Custom class |
|
|
14
|
+
|
|
15
|
+
### Usage
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<ButtonGroup attached>
|
|
19
|
+
<Button>Years</Button>
|
|
20
|
+
<Button>Months</Button>
|
|
21
|
+
</ButtonGroup>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### Outline variant (border-aware)
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<ButtonGroup>
|
|
28
|
+
<Button variant="outline">Left</Button>
|
|
29
|
+
<Button variant="outline">Center</Button>
|
|
30
|
+
</ButtonGroup>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### RTL
|
|
34
|
+
|
|
35
|
+
Under `html[dir=rtl]`, the first slot item sits on **inline-start** (right) and attached outer corners use logical radii (`border-*-start/end-radius`), so the capsule ends stay rounded. Avoid adding `flex-row` on the group — global RTL utilities reverse that class and invert the rounding.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
**Import:** `import { Button } from 'vlite3'`
|
|
4
|
+
|
|
5
|
+
### Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
| :--------------- | :------------------------------------- | :----------- | :------------------------------------ |
|
|
9
|
+
| `variant` | `ButtonVariant` | `primary` | Visual style |
|
|
10
|
+
| `size` | `ButtonSize` | `md` | Dimensions |
|
|
11
|
+
| `rounded` | `ButtonRounded` | `md` | Border radius |
|
|
12
|
+
| `icon` | `string` | — | Leading icon (inline-start; Iconify ID or image URL) |
|
|
13
|
+
| `iconRight` | `string` | — | Trailing icon (inline-end; Iconify ID) |
|
|
14
|
+
| `text` | `string` | — | Label text (alt to slot) |
|
|
15
|
+
| `description` | `string` | — | Subtitle/description text below label |
|
|
16
|
+
| `textI18n` | `string` | — | I18n translation key for text |
|
|
17
|
+
| `type` | `button \| submit \| reset` | `button` | Native type |
|
|
18
|
+
| `loading` | `boolean` | `false` | Show spinner |
|
|
19
|
+
| `disabled` | `boolean` | `false` | Disable interaction |
|
|
20
|
+
| `asIcon` | `boolean` | `false` | Force render as icon button |
|
|
21
|
+
| `layout` | `'horizontal' \| 'vertical' \| 'tile'` | `horizontal` | Layout orientation |
|
|
22
|
+
| `dir` | `'ltr' \| 'rtl' \| 'auto'` | `auto` | Text/icon direction (`auto` → ancestor `dir`, then `html[dir]`) |
|
|
23
|
+
| `textClass` | `string` | — | Custom class for text span |
|
|
24
|
+
| `iconClass` | `string` | — | Custom class for leading icon |
|
|
25
|
+
| `iconRightClass` | `string` | — | Custom class for trailing icon |
|
|
26
|
+
| `class` | `any` | — | Custom class for button router/root |
|
|
27
|
+
|
|
28
|
+
### Types
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
type ButtonVariant =
|
|
32
|
+
| 'primary'
|
|
33
|
+
| 'primary-light'
|
|
34
|
+
| 'secondary'
|
|
35
|
+
| 'danger'
|
|
36
|
+
| 'danger-light'
|
|
37
|
+
| 'warning'
|
|
38
|
+
| 'warning-light'
|
|
39
|
+
| 'info'
|
|
40
|
+
| 'info-light'
|
|
41
|
+
| 'success'
|
|
42
|
+
| 'success-light'
|
|
43
|
+
| 'outline'
|
|
44
|
+
| 'outline-primary'
|
|
45
|
+
| 'outline-danger'
|
|
46
|
+
| 'outline-warning'
|
|
47
|
+
| 'outline-info'
|
|
48
|
+
| 'outline-success'
|
|
49
|
+
| 'ghost'
|
|
50
|
+
| 'transparent'
|
|
51
|
+
| 'link'
|
|
52
|
+
|
|
53
|
+
type ButtonSize = 'xs' | 'sm' | 'sm2' | 'md' | 'lg' | 'xl'
|
|
54
|
+
type ButtonRounded = 'none' | 'sm' | 'sm2' | 'md' | 'lg' | 'xl' | '2xl' | 'full'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Usage
|
|
58
|
+
|
|
59
|
+
```vue
|
|
60
|
+
<Button variant="primary" icon="lucide:plus">Add Item</Button>
|
|
61
|
+
<Button variant="ghost" loading />
|
|
62
|
+
|
|
63
|
+
<!-- Tile layout (app-shortcut grid) -->
|
|
64
|
+
<Button icon="lucide:instagram" layout="tile" variant="primary" rounded="xl">Instagram</Button>
|
|
65
|
+
<Button icon="lucide:camera" layout="tile" variant="info-light" rounded="xl">Camera</Button>
|
|
66
|
+
|
|
67
|
+
<!-- Tile with custom icon background -->
|
|
68
|
+
<Button icon="lucide:heart" layout="tile" variant="danger" rounded="xl">Health</Button>
|
|
69
|
+
|
|
70
|
+
<!-- With Beacon -->
|
|
71
|
+
<div class="relative inline-flex">
|
|
72
|
+
<Button icon="lucide:bell" variant="outline" rounded="full" />
|
|
73
|
+
<Beacon variant="danger" class="absolute top-0 end-0" />
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### RTL
|
|
78
|
+
|
|
79
|
+
By default `dir="auto"` **inherits** direction from the nearest ancestor / `html[dir]` (the attribute is omitted so a stale `dir="ltr"` cannot pin the control). Horizontal buttons keep DOM order under that direction so:
|
|
80
|
+
|
|
81
|
+
- `icon` sits on **inline-start** (right under RTL)
|
|
82
|
+
- label / slot text follows the inherited direction
|
|
83
|
+
- `iconRight` sits on **inline-end** (left under RTL)
|
|
84
|
+
- description blocks use `text-start` alignment
|
|
85
|
+
|
|
86
|
+
Pass `dir="rtl"` / `"ltr"` to force a side. Avoid adding `flex-row` on the button — global RTL utilities reverse that class; `v-btn-horizontal` already locks the correct row order.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Vue Event Calendar
|
|
2
|
+
|
|
3
|
+
A powerful, feature-rich Vue 3 calendar component with support for multiple views (Month, Week, Day), drag-and-drop functionality, event management, and real-time interactions. Built with TypeScript and optimized for performance.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Multiple View Types**: Month, Week, and Day views with seamless switching
|
|
8
|
+
- **Event Management**: Create, edit, delete, and drag-and-drop events
|
|
9
|
+
- **Drag & Drop**: Move events between dates and time slots with visual feedback
|
|
10
|
+
- **Event Resizing**: Resize events by dragging handles in week/day views
|
|
11
|
+
- **Real-time Updates**: Live current time indicator and automatic refreshing
|
|
12
|
+
- **Responsive Design**: Mobile-friendly with touch support
|
|
13
|
+
- **Customizable**: Flexible styling, time formats, and event rendering
|
|
14
|
+
- **Accessibility**: ARIA attributes and keyboard navigation support
|
|
15
|
+
- **TypeScript Support**: Fully typed for enhanced developer experience
|
|
16
|
+
- **Performance Optimized**: Efficient rendering and memory management
|
|
17
|
+
|
|
18
|
+
## Basic Usage
|
|
19
|
+
|
|
20
|
+
```vue
|
|
21
|
+
<script setup>
|
|
22
|
+
import { ref } from 'vue'
|
|
23
|
+
import { Calendar } from 'vlite3'
|
|
24
|
+
|
|
25
|
+
const events = ref([
|
|
26
|
+
{
|
|
27
|
+
id: '1',
|
|
28
|
+
title: 'Team Meeting',
|
|
29
|
+
start: '2025-01-20T10:00:00.000Z', // Uses ISO format
|
|
30
|
+
end: '2025-01-20T11:00:00.000Z',
|
|
31
|
+
backgroundColor: '#3b82f6',
|
|
32
|
+
textColor: '#ffffff',
|
|
33
|
+
},
|
|
34
|
+
])
|
|
35
|
+
|
|
36
|
+
const handleEventClick = (event) => {
|
|
37
|
+
console.log('Event clicked:', event)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const handleEventCreate = ({ date, start, end }) => {
|
|
41
|
+
const newEvent = {
|
|
42
|
+
id: Date.now().toString(),
|
|
43
|
+
title: 'New Event',
|
|
44
|
+
start,
|
|
45
|
+
end,
|
|
46
|
+
backgroundColor: '#10b981',
|
|
47
|
+
textColor: '#ffffff',
|
|
48
|
+
}
|
|
49
|
+
events.value.push(newEvent)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const handleEventUpdate = ({ eventId, start, end }) => {
|
|
53
|
+
const eventIndex = events.value.findIndex((e) => e.id === eventId)
|
|
54
|
+
if (eventIndex !== -1) {
|
|
55
|
+
events.value[eventIndex] = {
|
|
56
|
+
...events.value[eventIndex],
|
|
57
|
+
start,
|
|
58
|
+
end,
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<Calendar
|
|
66
|
+
:events="events"
|
|
67
|
+
:can-add="true"
|
|
68
|
+
:can-edit="true"
|
|
69
|
+
@eventClick="handleEventClick"
|
|
70
|
+
@eventCreate="handleEventCreate"
|
|
71
|
+
@eventUpdate="handleEventUpdate" />
|
|
72
|
+
</template>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Props
|
|
76
|
+
|
|
77
|
+
| Prop | Type | Default | Description |
|
|
78
|
+
| -------------------- | ----------------------------- | --------- | --------------------------------------------------------- |
|
|
79
|
+
| `events` | `any[]` | `[]` | Array of calendar events to display |
|
|
80
|
+
| `loading` | `boolean` | `false` | Show loading state |
|
|
81
|
+
| `canAdd` | `boolean` | `false` | Enable/disable event creation functionality |
|
|
82
|
+
| `canEdit` | `boolean` | `false` | Enable/disable event editing functionality |
|
|
83
|
+
| `canDelete` | `boolean` | `false` | Enable/disable event deletion functionality |
|
|
84
|
+
|
|
85
|
+
## Events
|
|
86
|
+
|
|
87
|
+
| Event | Parameters | Description |
|
|
88
|
+
| ------------- | ----------------------------------------------------- | ------------------------------------ |
|
|
89
|
+
| `eventClick` | `event: any` | Fired when an event is clicked |
|
|
90
|
+
| `eventCreate` | `{ date: Date, start: string, end?: string }` | Fired when a new event is created |
|
|
91
|
+
| `eventUpdate` | `{ eventId: string, start: string, end?: string }` | Fired when an event is updated/moved |
|
|
92
|
+
| `eventEdit` | `event: any` | Fired when edit action is clicked |
|
|
93
|
+
| `eventDelete` | `event: any` | Fired when delete action is clicked |
|
|
94
|
+
| `dayClick` | `date: Date` | Fired when a calendar day is clicked |
|
|
95
|
+
| `dateChange` | `date: Date` | Fired when the current date changes |
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Carousel
|
|
2
|
+
|
|
3
|
+
**Import:** `import { Carousel } from 'vlite3'`
|
|
4
|
+
|
|
5
|
+
### Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
| :------------------------------ | :--------------------------------- | :---------------- | :----------------------------------------------------- |
|
|
9
|
+
| `data` | `any[]` | `[]` | Array of items to render |
|
|
10
|
+
| `pagination` | `PaginationType \| PaginationType[] \| false` | `'dots'` | Pagination type: `dots`, `buttons`, `lines`, `fraction` or array of types |
|
|
11
|
+
| `paginationSize` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'sm'` | Size of pagination elements |
|
|
12
|
+
| `paginationPosition` | `PaginationPosition \| PaginationPosition[]` | `'bottom-center'` | Position(s) of pagination |
|
|
13
|
+
| `paginationVisibility` | `PaginationVisibility \| PaginationVisibility[]` | `'always'` | Visibility: `always`, `hover` |
|
|
14
|
+
| `paginationBackground` | `boolean` | `false` | Show background for pagination |
|
|
15
|
+
| `paginationHoverInitialTimeout` | `number` | `500` | Timeout before hiding on hover mode |
|
|
16
|
+
| `paginationHoverEdgeThreshold` | `number` | `10` | Edge threshold for hover mode |
|
|
17
|
+
| `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Scroll direction |
|
|
18
|
+
| `itemsToShow` | `number \| SlidesPerView` | `1` | Number of items or responsive map (e.g., `{ 768: 2 }`) |
|
|
19
|
+
| `gap` | `number` | `0` | Space between items in pixels |
|
|
20
|
+
| `autoPlay` | `boolean` | `false` | Enable auto-scrolling |
|
|
21
|
+
| `autoPlayInterval` | `number` | `3000` | Delay between auto-plays |
|
|
22
|
+
| `draggable` | `boolean` | `false` | Enable mouse/touch dragging |
|
|
23
|
+
| `loop` | `boolean` | `false` | Infinite loop mode |
|
|
24
|
+
| `speed` | `number` | `700` | Transition speed in ms |
|
|
25
|
+
| `easing` | `string` | `'ease'` | CSS easing function |
|
|
26
|
+
| `mousewheel` | `boolean` | `true` | Enable scrolling via mousewheel |
|
|
27
|
+
| `autoFocus` | `boolean` | `false` | Auto focus on mount |
|
|
28
|
+
| `currentItem` | `number` | `0` | Index of the current item |
|
|
29
|
+
| `bufferSize` | `number` | `5` | DOM nodes rendered outside view |
|
|
30
|
+
| `maxDomElements` | `number` | `10` | Max DOM elements to render |
|
|
31
|
+
| `updateKey` | `string \| number` | — | Force carousel update when changed |
|
|
32
|
+
| `wheelOptions` | `WheelOptions` | — | Custom mousewheel sensitivity and thresholds |
|
|
33
|
+
|
|
34
|
+
### Types
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
export type PaginationType = 'buttons' | 'dots' | 'lines' | 'fraction' | false
|
|
38
|
+
|
|
39
|
+
export type PaginationPosition =
|
|
40
|
+
| 'center'
|
|
41
|
+
| 'bottom-center'
|
|
42
|
+
| 'bottom-left'
|
|
43
|
+
| 'bottom-right'
|
|
44
|
+
| 'center-right'
|
|
45
|
+
| 'bottom'
|
|
46
|
+
|
|
47
|
+
export type PaginationVisibility = 'always' | 'hover'
|
|
48
|
+
|
|
49
|
+
export interface WheelOptions {
|
|
50
|
+
threshold?: number
|
|
51
|
+
velocityThreshold?: number
|
|
52
|
+
pageScrollThreshold?: number
|
|
53
|
+
debounceTime?: number
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Exposed Methods
|
|
58
|
+
|
|
59
|
+
Access these via `ref`:
|
|
60
|
+
|
|
61
|
+
- `goToSlide(index: number, smooth?: boolean)`: Navigate to specific index
|
|
62
|
+
- `goNext(smooth?: boolean)`: Next item
|
|
63
|
+
- `goPrev(smooth?: boolean)`: Previous item
|
|
64
|
+
- `goNextPage(smooth?: boolean)`: Next page of items
|
|
65
|
+
- `goPrevPage(smooth?: boolean)`: Previous page of items
|
|
66
|
+
- `state`: Readonly carousel state (`currentIndex`, `isTransitioning`, etc.)
|
|
67
|
+
|
|
68
|
+
### Slots
|
|
69
|
+
|
|
70
|
+
| Slot | Description | Props |
|
|
71
|
+
| :-------- | :--------------------------- | :---------------- |
|
|
72
|
+
| `default` | Template for each slide item | `{ item, index }` |
|
|
73
|
+
|
|
74
|
+
### Usage
|
|
75
|
+
|
|
76
|
+
#### Basic Carousel
|
|
77
|
+
|
|
78
|
+
```vue
|
|
79
|
+
<Carousel :data="images" pagination="dots">
|
|
80
|
+
<template #default="{ item }">
|
|
81
|
+
<img :src="item" class="rounded-lg" />
|
|
82
|
+
</template>
|
|
83
|
+
</Carousel>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### Multiple Paginations
|
|
87
|
+
|
|
88
|
+
You can provide arrays for `pagination` and `paginationPosition` to render multiple control layers.
|
|
89
|
+
|
|
90
|
+
```vue
|
|
91
|
+
<Carousel
|
|
92
|
+
:data="items"
|
|
93
|
+
:pagination="['dots', 'buttons']"
|
|
94
|
+
:pagination-position="['bottom-center', 'center']"
|
|
95
|
+
>
|
|
96
|
+
<template #default="{ item }">
|
|
97
|
+
<div class="p-10 bg-muted">{{ item }}</div>
|
|
98
|
+
</template>
|
|
99
|
+
</Carousel>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### Responsive with Gap
|
|
103
|
+
|
|
104
|
+
```vue
|
|
105
|
+
<Carousel :data="items" :items-to-show="{ 640: 1, 1024: 3 }" :gap="20" pagination="buttons">
|
|
106
|
+
<template #default="{ item }">
|
|
107
|
+
<Card :title="item.title" />
|
|
108
|
+
</template>
|
|
109
|
+
</Carousel>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Vertical mode
|
|
113
|
+
|
|
114
|
+
```vue
|
|
115
|
+
<Carousel :data="images" direction="vertical" :items-to-show="1">
|
|
116
|
+
<template #default="{ item }">
|
|
117
|
+
<div class="h-[400px]">
|
|
118
|
+
<img :src="item" class="h-full object-cover" />
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
</Carousel>
|
|
122
|
+
```
|