@velkymx/vibeui 0.8.0 → 0.8.2
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/CLAUDE.md +48 -0
- package/dist/vibeui.css +1 -1
- package/dist/vibeui.es.js +149 -148
- package/dist/vibeui.umd.js +1 -1
- package/docs/README.md +153 -0
- package/docs/components/advanced/popover.md +150 -0
- package/docs/components/advanced/scrollspy.md +64 -0
- package/docs/components/advanced/tooltip.md +111 -0
- package/docs/components/card/card.md +215 -0
- package/docs/components/core/alert.md +72 -0
- package/docs/components/core/badge.md +81 -0
- package/docs/components/core/button-group.md +105 -0
- package/docs/components/core/button.md +127 -0
- package/docs/components/core/close-button.md +82 -0
- package/docs/components/core/link.md +36 -0
- package/docs/components/core/placeholder.md +135 -0
- package/docs/components/core/spinner.md +109 -0
- package/docs/components/data/datatable.md +416 -0
- package/docs/components/interactive/accordion.md +92 -0
- package/docs/components/interactive/carousel.md +97 -0
- package/docs/components/interactive/collapse.md +105 -0
- package/docs/components/interactive/dropdown.md +93 -0
- package/docs/components/interactive/modal.md +148 -0
- package/docs/components/interactive/offcanvas.md +89 -0
- package/docs/components/interactive/toast.md +114 -0
- package/docs/components/layout/col.md +123 -0
- package/docs/components/layout/container.md +59 -0
- package/docs/components/layout/row.md +113 -0
- package/docs/components/list/list-group.md +221 -0
- package/docs/components/navigation/breadcrumb.md +116 -0
- package/docs/components/navigation/nav.md +88 -0
- package/docs/components/navigation/navbar.md +106 -0
- package/docs/components/navigation/pagination.md +146 -0
- package/docs/components/progress/progress.md +182 -0
- package/docs/composables/back-button.md +28 -0
- package/docs/composables/breakpoints.md +54 -0
- package/docs/composables/color-mode.md +141 -0
- package/docs/forms/README.md +88 -0
- package/docs/forms/form-checkbox.md +50 -0
- package/docs/forms/form-datepicker.md +50 -0
- package/docs/forms/form-group.md +80 -0
- package/docs/forms/form-input.md +55 -0
- package/docs/forms/form-radio.md +58 -0
- package/docs/forms/form-select.md +54 -0
- package/docs/forms/form-spinbutton.md +55 -0
- package/docs/forms/form-switch.md +47 -0
- package/docs/forms/form-textarea.md +51 -0
- package/docs/forms/form-wysiwyg.md +64 -0
- package/docs/forms/input-group.md +51 -0
- package/docs/forms/validation.md +599 -0
- package/llms.txt +422 -0
- package/package.json +5 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# VibeContainer
|
|
2
|
+
|
|
3
|
+
Responsive container component wrapping Bootstrap's `.container`, `.container-fluid`, and `.container-{breakpoint}` classes.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `fluid` | `Boolean \| ContainerType` | `false` | `false` = `.container`, `true` = `.container-fluid`, or a breakpoint (`'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`) for `.container-{breakpoint}` |
|
|
10
|
+
| `tag` | `Tag` | `'div'` | HTML element to render |
|
|
11
|
+
|
|
12
|
+
### ContainerType
|
|
13
|
+
|
|
14
|
+
`'sm' | 'md' | 'lg' | 'xl' | 'xxl'`
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
| Event | Payload | Description |
|
|
19
|
+
|-------|---------|-------------|
|
|
20
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
21
|
+
|
|
22
|
+
## Slots
|
|
23
|
+
|
|
24
|
+
| Slot | Description |
|
|
25
|
+
|------|-------------|
|
|
26
|
+
| `default` | Container content |
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
### Fixed-width Container
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<template>
|
|
34
|
+
<VibeContainer>
|
|
35
|
+
<p>Responsive fixed-width container</p>
|
|
36
|
+
</VibeContainer>
|
|
37
|
+
</template>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Fluid Container
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<template>
|
|
44
|
+
<VibeContainer fluid>
|
|
45
|
+
<p>Full-width container spanning the entire viewport</p>
|
|
46
|
+
</VibeContainer>
|
|
47
|
+
</template>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Responsive Breakpoint Container
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<template>
|
|
54
|
+
<!-- 100% wide until the md breakpoint, then fixed-width -->
|
|
55
|
+
<VibeContainer fluid="md">
|
|
56
|
+
<p>Fluid until medium breakpoint</p>
|
|
57
|
+
</VibeContainer>
|
|
58
|
+
</template>
|
|
59
|
+
```
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# VibeRow
|
|
2
|
+
|
|
3
|
+
Row component for Bootstrap's grid system. Provides gutters, row columns, and alignment props.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `tag` | `Tag` | `'div'` | HTML element to render |
|
|
10
|
+
| `gutters` | `GutterSize` | `undefined` | Base gutter size (both axes) |
|
|
11
|
+
| `guttersX` | `GutterSize` | `undefined` | Horizontal gutter size |
|
|
12
|
+
| `guttersY` | `GutterSize` | `undefined` | Vertical gutter size |
|
|
13
|
+
| `guttersSm` | `GutterSize` | `undefined` | Gutter size at `sm` breakpoint |
|
|
14
|
+
| `guttersMd` | `GutterSize` | `undefined` | Gutter size at `md` breakpoint |
|
|
15
|
+
| `guttersLg` | `GutterSize` | `undefined` | Gutter size at `lg` breakpoint |
|
|
16
|
+
| `guttersXl` | `GutterSize` | `undefined` | Gutter size at `xl` breakpoint |
|
|
17
|
+
| `guttersXxl` | `GutterSize` | `undefined` | Gutter size at `xxl` breakpoint |
|
|
18
|
+
| `guttersXSm` | `GutterSize` | `undefined` | Horizontal gutter at `sm` breakpoint |
|
|
19
|
+
| `guttersXMd` | `GutterSize` | `undefined` | Horizontal gutter at `md` breakpoint |
|
|
20
|
+
| `guttersXLg` | `GutterSize` | `undefined` | Horizontal gutter at `lg` breakpoint |
|
|
21
|
+
| `guttersXXl` | `GutterSize` | `undefined` | Horizontal gutter at `xl` breakpoint |
|
|
22
|
+
| `guttersXXxl` | `GutterSize` | `undefined` | Horizontal gutter at `xxl` breakpoint |
|
|
23
|
+
| `guttersYSm` | `GutterSize` | `undefined` | Vertical gutter at `sm` breakpoint |
|
|
24
|
+
| `guttersYMd` | `GutterSize` | `undefined` | Vertical gutter at `md` breakpoint |
|
|
25
|
+
| `guttersYLg` | `GutterSize` | `undefined` | Vertical gutter at `lg` breakpoint |
|
|
26
|
+
| `guttersYXl` | `GutterSize` | `undefined` | Vertical gutter at `xl` breakpoint |
|
|
27
|
+
| `guttersYXxl` | `GutterSize` | `undefined` | Vertical gutter at `xxl` breakpoint |
|
|
28
|
+
| `rowCols` | `RowColsSize` | `undefined` | Number of columns per row |
|
|
29
|
+
| `rowColsSm` | `RowColsSize` | `undefined` | Columns per row at `sm` breakpoint |
|
|
30
|
+
| `rowColsMd` | `RowColsSize` | `undefined` | Columns per row at `md` breakpoint |
|
|
31
|
+
| `rowColsLg` | `RowColsSize` | `undefined` | Columns per row at `lg` breakpoint |
|
|
32
|
+
| `rowColsXl` | `RowColsSize` | `undefined` | Columns per row at `xl` breakpoint |
|
|
33
|
+
| `rowColsXxl` | `RowColsSize` | `undefined` | Columns per row at `xxl` breakpoint |
|
|
34
|
+
| `alignItems` | `AlignItems` | `undefined` | Vertical alignment of columns |
|
|
35
|
+
| `justifyContent` | `JustifyContent` | `undefined` | Horizontal distribution of columns |
|
|
36
|
+
|
|
37
|
+
### Type Reference
|
|
38
|
+
|
|
39
|
+
- **GutterSize:** `0 | 1 | 2 | 3 | 4 | 5`
|
|
40
|
+
- **RowColsSize:** `1 | 2 | 3 | 4 | 5 | 6`
|
|
41
|
+
- **AlignItems:** `'start' | 'center' | 'end' | 'baseline' | 'stretch'`
|
|
42
|
+
- **JustifyContent:** `'start' | 'center' | 'end' | 'around' | 'between' | 'evenly'`
|
|
43
|
+
|
|
44
|
+
## Events
|
|
45
|
+
|
|
46
|
+
| Event | Payload | Description |
|
|
47
|
+
|-------|---------|-------------|
|
|
48
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
49
|
+
|
|
50
|
+
## Slots
|
|
51
|
+
|
|
52
|
+
| Slot | Description |
|
|
53
|
+
|------|-------------|
|
|
54
|
+
| `default` | Row content (typically `VibeCol` components) |
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
### Basic Grid
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<template>
|
|
62
|
+
<VibeContainer>
|
|
63
|
+
<VibeRow>
|
|
64
|
+
<VibeCol>Column 1</VibeCol>
|
|
65
|
+
<VibeCol>Column 2</VibeCol>
|
|
66
|
+
<VibeCol>Column 3</VibeCol>
|
|
67
|
+
</VibeRow>
|
|
68
|
+
</VibeContainer>
|
|
69
|
+
</template>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### With Gutters
|
|
73
|
+
|
|
74
|
+
```vue
|
|
75
|
+
<template>
|
|
76
|
+
<VibeContainer>
|
|
77
|
+
<VibeRow :gutters="3" :guttersY="4">
|
|
78
|
+
<VibeCol :cols="6">Col 1</VibeCol>
|
|
79
|
+
<VibeCol :cols="6">Col 2</VibeCol>
|
|
80
|
+
<VibeCol :cols="6">Col 3</VibeCol>
|
|
81
|
+
<VibeCol :cols="6">Col 4</VibeCol>
|
|
82
|
+
</VibeRow>
|
|
83
|
+
</VibeContainer>
|
|
84
|
+
</template>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Row Columns
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<template>
|
|
91
|
+
<VibeContainer>
|
|
92
|
+
<!-- Automatically size each child to 1/3 width -->
|
|
93
|
+
<VibeRow :row-cols="3">
|
|
94
|
+
<VibeCol>Item 1</VibeCol>
|
|
95
|
+
<VibeCol>Item 2</VibeCol>
|
|
96
|
+
<VibeCol>Item 3</VibeCol>
|
|
97
|
+
</VibeRow>
|
|
98
|
+
</VibeContainer>
|
|
99
|
+
</template>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Alignment
|
|
103
|
+
|
|
104
|
+
```vue
|
|
105
|
+
<template>
|
|
106
|
+
<VibeContainer>
|
|
107
|
+
<VibeRow align-items="center" justify-content="between">
|
|
108
|
+
<VibeCol :cols="4">Left</VibeCol>
|
|
109
|
+
<VibeCol :cols="4">Right</VibeCol>
|
|
110
|
+
</VibeRow>
|
|
111
|
+
</VibeContainer>
|
|
112
|
+
</template>
|
|
113
|
+
```
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# VibeListGroup
|
|
2
|
+
|
|
3
|
+
Data-driven component for displaying flexible lists of content.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `flush` | `Boolean` | `false` | Remove borders and rounded corners |
|
|
10
|
+
| `horizontal` | `Boolean\|String` | `false` | Horizontal layout: `true` or breakpoint (`'sm'`, `'md'`, `'lg'`, `'xl'`) |
|
|
11
|
+
| `numbered` | `Boolean` | `false` | Numbered list items |
|
|
12
|
+
| `tag` | `String` | `'ul'` | HTML tag: `'ul'`, `'ol'`, or `'div'` |
|
|
13
|
+
| `items` | `ListGroupItem[]` | Required | Array of list group items |
|
|
14
|
+
|
|
15
|
+
### ListGroupItem Interface
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
interface ListGroupItem {
|
|
19
|
+
text: string
|
|
20
|
+
href?: string
|
|
21
|
+
to?: string | object
|
|
22
|
+
active?: boolean
|
|
23
|
+
disabled?: boolean
|
|
24
|
+
variant?: Variant
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
| Event | Payload | Description |
|
|
31
|
+
|-------|---------|-------------|
|
|
32
|
+
| `item-click` | `{ item, index, event }` | Emitted when an item is clicked (unless disabled) |
|
|
33
|
+
|
|
34
|
+
## Slots
|
|
35
|
+
|
|
36
|
+
| Slot | Scope | Description |
|
|
37
|
+
|------|-------|-------------|
|
|
38
|
+
| `item` | `{ item, index }` | Custom item rendering |
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
### Basic List
|
|
43
|
+
|
|
44
|
+
```vue
|
|
45
|
+
<template>
|
|
46
|
+
<VibeListGroup :items="listItems" />
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup>
|
|
50
|
+
const listItems = [
|
|
51
|
+
{ text: 'An item' },
|
|
52
|
+
{ text: 'A second item' },
|
|
53
|
+
{ text: 'A third item' }
|
|
54
|
+
]
|
|
55
|
+
</script>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Active and Disabled Items
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<template>
|
|
62
|
+
<VibeListGroup :items="listItems" />
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script setup>
|
|
66
|
+
const listItems = [
|
|
67
|
+
{ text: 'An item' },
|
|
68
|
+
{ text: 'A second item', active: true },
|
|
69
|
+
{ text: 'A third item' },
|
|
70
|
+
{ text: 'A disabled item', disabled: true }
|
|
71
|
+
]
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### With Links
|
|
76
|
+
|
|
77
|
+
```vue
|
|
78
|
+
<template>
|
|
79
|
+
<VibeListGroup :items="listItems" />
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script setup>
|
|
83
|
+
const listItems = [
|
|
84
|
+
{ text: 'Link 1', href: '#', active: true },
|
|
85
|
+
{ text: 'Link 2', href: '#' },
|
|
86
|
+
{ text: 'Link 3', href: '#' }
|
|
87
|
+
]
|
|
88
|
+
</script>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### With Router Links
|
|
92
|
+
|
|
93
|
+
```vue
|
|
94
|
+
<template>
|
|
95
|
+
<VibeListGroup :items="listItems" />
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
<script setup>
|
|
99
|
+
const listItems = [
|
|
100
|
+
{ text: 'Home', to: { name: 'home' } },
|
|
101
|
+
{ text: 'About', to: { name: 'about' } },
|
|
102
|
+
{ text: 'Contact', to: { name: 'contact' } }
|
|
103
|
+
]
|
|
104
|
+
</script>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Colored Items
|
|
108
|
+
|
|
109
|
+
```vue
|
|
110
|
+
<template>
|
|
111
|
+
<VibeListGroup :items="listItems" />
|
|
112
|
+
</template>
|
|
113
|
+
|
|
114
|
+
<script setup>
|
|
115
|
+
const listItems = [
|
|
116
|
+
{ text: 'Primary item', variant: 'primary' },
|
|
117
|
+
{ text: 'Success item', variant: 'success' },
|
|
118
|
+
{ text: 'Danger item', variant: 'danger' },
|
|
119
|
+
{ text: 'Warning item', variant: 'warning' },
|
|
120
|
+
{ text: 'Info item', variant: 'info' }
|
|
121
|
+
]
|
|
122
|
+
</script>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Flush List
|
|
126
|
+
|
|
127
|
+
Remove borders and rounded corners:
|
|
128
|
+
|
|
129
|
+
```vue
|
|
130
|
+
<template>
|
|
131
|
+
<VibeListGroup flush :items="listItems" />
|
|
132
|
+
</template>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Horizontal List
|
|
136
|
+
|
|
137
|
+
```vue
|
|
138
|
+
<template>
|
|
139
|
+
<!-- Always horizontal -->
|
|
140
|
+
<VibeListGroup horizontal :items="listItems" />
|
|
141
|
+
|
|
142
|
+
<!-- Horizontal on md and up -->
|
|
143
|
+
<VibeListGroup horizontal="md" :items="listItems" />
|
|
144
|
+
</template>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Numbered List
|
|
148
|
+
|
|
149
|
+
```vue
|
|
150
|
+
<template>
|
|
151
|
+
<VibeListGroup numbered tag="ol" :items="listItems" />
|
|
152
|
+
</template>
|
|
153
|
+
|
|
154
|
+
<script setup>
|
|
155
|
+
const listItems = [
|
|
156
|
+
{ text: 'First item' },
|
|
157
|
+
{ text: 'Second item' },
|
|
158
|
+
{ text: 'Third item' }
|
|
159
|
+
]
|
|
160
|
+
</script>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Custom Item Rendering
|
|
164
|
+
|
|
165
|
+
Use the `item` scoped slot for complex content:
|
|
166
|
+
|
|
167
|
+
```vue
|
|
168
|
+
<template>
|
|
169
|
+
<VibeListGroup :items="listItems">
|
|
170
|
+
<template #item="{ item }">
|
|
171
|
+
<div class="d-flex justify-content-between align-items-center">
|
|
172
|
+
<div>
|
|
173
|
+
<h5 class="mb-1">{{ item.text }}</h5>
|
|
174
|
+
<p class="mb-1">{{ item.description }}</p>
|
|
175
|
+
</div>
|
|
176
|
+
<VibeBadge variant="primary">{{ item.count }}</VibeBadge>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
179
|
+
</VibeListGroup>
|
|
180
|
+
</template>
|
|
181
|
+
|
|
182
|
+
<script setup>
|
|
183
|
+
const listItems = [
|
|
184
|
+
{ text: 'Inbox', description: 'Unread messages', count: 14 },
|
|
185
|
+
{ text: 'Starred', description: 'Important items', count: 3 },
|
|
186
|
+
{ text: 'Sent', description: 'Outgoing mail', count: 25 }
|
|
187
|
+
]
|
|
188
|
+
</script>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### With Event Handling
|
|
192
|
+
|
|
193
|
+
```vue
|
|
194
|
+
<template>
|
|
195
|
+
<VibeListGroup :items="listItems" @item-click="handleClick" />
|
|
196
|
+
</template>
|
|
197
|
+
|
|
198
|
+
<script setup>
|
|
199
|
+
const listItems = [
|
|
200
|
+
{ text: 'Item 1' },
|
|
201
|
+
{ text: 'Item 2' },
|
|
202
|
+
{ text: 'Item 3' }
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
const handleClick = ({ item, index }) => {
|
|
206
|
+
console.log(`Clicked: ${item.text} at index ${index}`)
|
|
207
|
+
}
|
|
208
|
+
</script>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Bootstrap CSS Classes
|
|
212
|
+
|
|
213
|
+
- `.list-group`
|
|
214
|
+
- `.list-group-flush`
|
|
215
|
+
- `.list-group-horizontal`, `.list-group-horizontal-{breakpoint}`
|
|
216
|
+
- `.list-group-numbered`
|
|
217
|
+
- `.list-group-item`
|
|
218
|
+
- `.list-group-item-{variant}`
|
|
219
|
+
- `.list-group-item-action`
|
|
220
|
+
- `.active`
|
|
221
|
+
- `.disabled`
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# VibeBreadcrumb
|
|
2
|
+
|
|
3
|
+
Data-driven breadcrumb navigation to indicate the current page's location within a navigational hierarchy.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `ariaLabel` | `String` | `'breadcrumb'` | ARIA label for navigation |
|
|
10
|
+
| `items` | `BreadcrumbItem[]` | Required | Array of breadcrumb items |
|
|
11
|
+
|
|
12
|
+
### BreadcrumbItem Interface
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
interface BreadcrumbItem {
|
|
16
|
+
text: string
|
|
17
|
+
href?: string
|
|
18
|
+
to?: string | object
|
|
19
|
+
active?: boolean
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Events
|
|
24
|
+
|
|
25
|
+
| Event | Payload | Description |
|
|
26
|
+
|-------|---------|-------------|
|
|
27
|
+
| `item-click` | `{ item, index, event }` | Emitted when an item is clicked (unless active) |
|
|
28
|
+
|
|
29
|
+
## Slots
|
|
30
|
+
|
|
31
|
+
| Slot | Scope | Description |
|
|
32
|
+
|------|-------|-------------|
|
|
33
|
+
| `item` | `{ item, index }` | Custom item rendering |
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### Basic Example
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<template>
|
|
41
|
+
<VibeBreadcrumb :items="breadcrumbItems" />
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script setup>
|
|
45
|
+
const breadcrumbItems = [
|
|
46
|
+
{ text: 'Home', href: '/' },
|
|
47
|
+
{ text: 'Library', href: '/library' },
|
|
48
|
+
{ text: 'Data', active: true }
|
|
49
|
+
]
|
|
50
|
+
</script>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### With Router Links
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<template>
|
|
57
|
+
<VibeBreadcrumb :items="breadcrumbItems" />
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup>
|
|
61
|
+
const breadcrumbItems = [
|
|
62
|
+
{ text: 'Home', to: { name: 'home' } },
|
|
63
|
+
{ text: 'Products', to: { name: 'products' } },
|
|
64
|
+
{ text: 'Details', active: true }
|
|
65
|
+
]
|
|
66
|
+
</script>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Custom Item Rendering
|
|
70
|
+
|
|
71
|
+
Use the `item` scoped slot for custom rendering:
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<template>
|
|
75
|
+
<VibeBreadcrumb :items="breadcrumbItems">
|
|
76
|
+
<template #item="{ item, index }">
|
|
77
|
+
<VibeIcon v-if="item.icon" :icon="item.icon" class="me-1" />
|
|
78
|
+
{{ item.text }}
|
|
79
|
+
</template>
|
|
80
|
+
</VibeBreadcrumb>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<script setup>
|
|
84
|
+
const breadcrumbItems = [
|
|
85
|
+
{ text: 'Home', href: '/', icon: 'house-fill' },
|
|
86
|
+
{ text: 'Library', href: '/library', icon: 'book' },
|
|
87
|
+
{ text: 'Data', active: true, icon: 'file-earmark' }
|
|
88
|
+
]
|
|
89
|
+
</script>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### With Event Handling
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<template>
|
|
96
|
+
<VibeBreadcrumb :items="breadcrumbItems" @item-click="handleClick" />
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script setup>
|
|
100
|
+
const breadcrumbItems = [
|
|
101
|
+
{ text: 'Home', href: '/' },
|
|
102
|
+
{ text: 'Products', href: '/products' },
|
|
103
|
+
{ text: 'Details', active: true }
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
const handleClick = ({ item, index }) => {
|
|
107
|
+
console.log(`Clicked: ${item.text} at index ${index}`)
|
|
108
|
+
}
|
|
109
|
+
</script>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Bootstrap CSS Classes
|
|
113
|
+
|
|
114
|
+
- `.breadcrumb`
|
|
115
|
+
- `.breadcrumb-item`
|
|
116
|
+
- `.active`
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# VibeNav
|
|
2
|
+
|
|
3
|
+
Data-driven navigation tabs and pills for organizing content.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `tabs` | `Boolean` | `false` | Use tabs style |
|
|
10
|
+
| `pills` | `Boolean` | `false` | Use pills style |
|
|
11
|
+
| `underline` | `Boolean` | `false` | Use the new Bootstrap 5.3 underline style |
|
|
12
|
+
| `fill` | `Boolean` | `false` | Fill available width proportionally |
|
|
13
|
+
| `justified` | `Boolean` | `false` | Fill available width equally |
|
|
14
|
+
| `vertical` | `Boolean` | `false` | Stack navigation vertically |
|
|
15
|
+
| `tag` | `String` | `'ul'` | HTML tag to render |
|
|
16
|
+
| `items` | `NavItem[]` | Required | Array of nav items |
|
|
17
|
+
|
|
18
|
+
### NavItem Interface
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
interface NavItem {
|
|
22
|
+
text: string
|
|
23
|
+
href?: string
|
|
24
|
+
to?: string | object
|
|
25
|
+
active?: boolean
|
|
26
|
+
disabled?: boolean
|
|
27
|
+
children?: NavItem[] // Support for dropdowns
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Events
|
|
32
|
+
|
|
33
|
+
| Event | Payload | Description |
|
|
34
|
+
|-------|---------|-------------|
|
|
35
|
+
| `item-click` | `{ item, index, event }` | Emitted when item is clicked |
|
|
36
|
+
| `show` | `event` | Emitted when a tab starts showing |
|
|
37
|
+
| `shown` | `event` | Emitted when a tab is fully shown |
|
|
38
|
+
| `hide` | `event` | Emitted when a tab starts hiding |
|
|
39
|
+
| `hidden` | `event` | Emitted when a tab is fully hidden |
|
|
40
|
+
|
|
41
|
+
## Slots
|
|
42
|
+
|
|
43
|
+
| Slot | Scope | Description |
|
|
44
|
+
|------|-------|-------------|
|
|
45
|
+
| `item` | `{ item, index }` | Custom item rendering |
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
### Interactive Tabs
|
|
50
|
+
|
|
51
|
+
When using the `tabs` or `pills` props, nav links with an `href` starting with `#` will automatically act as Bootstrap tab triggers.
|
|
52
|
+
|
|
53
|
+
```vue
|
|
54
|
+
<template>
|
|
55
|
+
<div>
|
|
56
|
+
<VibeNav tabs :items="navItems" />
|
|
57
|
+
|
|
58
|
+
<VibeTabContent :panes="tabPanes" class="mt-3" />
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup>
|
|
63
|
+
const navItems = [
|
|
64
|
+
{ text: 'Home', href: '#home', active: true },
|
|
65
|
+
{ text: 'Profile', href: '#profile' }
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
const tabPanes = [
|
|
69
|
+
{ id: 'home', content: 'Home content...', active: true },
|
|
70
|
+
{ id: 'profile', content: 'Profile content...' }
|
|
71
|
+
]
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Important Notes
|
|
76
|
+
|
|
77
|
+
**Automatic Initialization:** When using `tabs` or `pills`, this component automatically initializes Bootstrap's Tab functionality for any items that target a local ID (e.g., `href="#my-tab"`).
|
|
78
|
+
|
|
79
|
+
**State Management:** For complex tab state, combine `VibeNav` with `VibeTabContent` and manage the `active` state through your data.
|
|
80
|
+
|
|
81
|
+
## Bootstrap CSS Classes
|
|
82
|
+
|
|
83
|
+
- `.nav`
|
|
84
|
+
- `.nav-tabs`
|
|
85
|
+
- `.nav-pills`
|
|
86
|
+
- `.nav-underline`
|
|
87
|
+
- `.nav-item`
|
|
88
|
+
- `.nav-link`
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Navbar Components
|
|
2
|
+
|
|
3
|
+
Responsive navigation header with support for branding, navigation, and collapsible content.
|
|
4
|
+
|
|
5
|
+
## VibeNavbar
|
|
6
|
+
|
|
7
|
+
Main navbar container. Provides reactive collapse state to child components via Vue's provide/inject.
|
|
8
|
+
|
|
9
|
+
### Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
|------|------|---------|-------------|
|
|
13
|
+
| `variant` | `Variant\|'dark'\|'light'` | `'light'` | Background color: maps to `bg-{variant}` |
|
|
14
|
+
| `theme` | `'dark'\|'light'` | auto | Color scheme applied via `data-bs-theme`. Defaults to `'dark'` when `variant='dark'`, `'light'` when `variant='light'`, otherwise unset |
|
|
15
|
+
| `expand` | `Boolean\|String` | `'lg'` | Breakpoint for collapse: `'sm'`, `'md'`, `'lg'`, `'xl'`, or `true` for always expanded |
|
|
16
|
+
| `container` | `Boolean\|String` | `true` | Container type: `true` for fluid, or `'sm'`, `'md'`, `'lg'`, `'xl'` |
|
|
17
|
+
| `position` | `NavbarPosition` | `undefined` | Position: `'fixed-top'`, `'fixed-bottom'`, `'sticky-top'` |
|
|
18
|
+
| `tag` | `String` | `'nav'` | HTML tag to render |
|
|
19
|
+
|
|
20
|
+
## Sub-Components
|
|
21
|
+
|
|
22
|
+
### VibeNavbarBrand
|
|
23
|
+
Branding/logo section
|
|
24
|
+
|
|
25
|
+
#### Props
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
|------|------|---------|-------------|
|
|
29
|
+
| `href` | `String` | `undefined` | Link URL (renders as `<a>`) |
|
|
30
|
+
| `to` | `String\|Object` | `undefined` | Router link target (renders as `<router-link>`) |
|
|
31
|
+
|
|
32
|
+
### VibeNavbarToggle
|
|
33
|
+
Mobile collapse toggle button.
|
|
34
|
+
|
|
35
|
+
#### Props
|
|
36
|
+
|
|
37
|
+
| Prop | Type | Default | Description |
|
|
38
|
+
|------|------|---------|-------------|
|
|
39
|
+
| `target` | `String` | Required | The `id` of the `VibeCollapse` to toggle |
|
|
40
|
+
| `ariaLabel` | `String` | `'Toggle navigation'` | Accessible label for the button |
|
|
41
|
+
|
|
42
|
+
### VibeNavbarNav
|
|
43
|
+
Navigation links container. Supports regular links and dropdown items.
|
|
44
|
+
|
|
45
|
+
#### Props
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Description |
|
|
48
|
+
|------|------|---------|-------------|
|
|
49
|
+
| `tag` | `String` | `'ul'` | HTML tag to render |
|
|
50
|
+
| `items` | `NavItem[]` | `undefined` | Array of nav items (data-driven mode) |
|
|
51
|
+
|
|
52
|
+
#### Events
|
|
53
|
+
|
|
54
|
+
| Event | Payload | Description |
|
|
55
|
+
|-------|---------|-------------|
|
|
56
|
+
| `item-click` | `{ item, index, event }` | Emitted when a regular nav item is clicked |
|
|
57
|
+
| `dropdown-item-click` | `{ item, itemIndex, child, childIndex, event }` | Emitted when a dropdown child item is clicked |
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### Basic Navbar
|
|
62
|
+
|
|
63
|
+
```vue
|
|
64
|
+
<template>
|
|
65
|
+
<VibeNavbar variant="light" expand="lg">
|
|
66
|
+
<VibeNavbarBrand href="#">Navbar</VibeNavbarBrand>
|
|
67
|
+
<VibeNavbarToggle target="navbarNav" />
|
|
68
|
+
<VibeCollapse id="navbarNav" is-nav>
|
|
69
|
+
<VibeNavbarNav :items="navItems" />
|
|
70
|
+
</VibeCollapse>
|
|
71
|
+
</VibeNavbar>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script setup>
|
|
75
|
+
const navItems = [
|
|
76
|
+
{ text: 'Home', href: '#', active: true },
|
|
77
|
+
{ text: 'Features', href: '#' },
|
|
78
|
+
{ text: 'Pricing', href: '#' }
|
|
79
|
+
]
|
|
80
|
+
</script>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Important Notes
|
|
84
|
+
|
|
85
|
+
**Automatic Synchronization:** `VibeNavbarToggle` is refactored to ensure that clicking it updates both Vue's internal state and the underlying Bootstrap `Collapse` instance simultaneously.
|
|
86
|
+
|
|
87
|
+
**Smooth Transitions:** `VibeCollapse` now utilizes Bootstrap's JavaScript engine by default, providing smooth sliding animations when toggled via the navbar.
|
|
88
|
+
|
|
89
|
+
**State Management:** Even when using Bootstrap JS for animations, the navbar remains fully reactive. You can still control the collapse state programmatically via the `VibeCollapse` `v-model`.
|
|
90
|
+
|
|
91
|
+
## Mobile & Hybrid Optimization
|
|
92
|
+
|
|
93
|
+
**Safe Areas:** When using `position="fixed-top"`, `fixed-bottom"`, or `sticky-top"`, the navbar automatically adds padding to account for device safe areas (notches) in hybrid environments like Capacitor.
|
|
94
|
+
|
|
95
|
+
## Bootstrap CSS Classes
|
|
96
|
+
|
|
97
|
+
- `.navbar`
|
|
98
|
+
- `.navbar-expand-{breakpoint}`
|
|
99
|
+
- `.bg-{variant}`
|
|
100
|
+
- `data-bs-theme="dark|light"`
|
|
101
|
+
- `.navbar-brand`
|
|
102
|
+
- `.navbar-toggler`
|
|
103
|
+
- `.navbar-nav`
|
|
104
|
+
- `.navbar-collapse`
|
|
105
|
+
- `.nav-item`
|
|
106
|
+
- `.nav-link`
|