@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,105 @@
|
|
|
1
|
+
# VibeCollapse
|
|
2
|
+
|
|
3
|
+
Toggle visibility of content with smooth transitions.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `modelValue` | `Boolean` | `false` | Control visibility (v-model) |
|
|
11
|
+
| `tag` | `String` | `'div'` | HTML tag to render |
|
|
12
|
+
| `horizontal` | `Boolean` | `false` | Horizontal collapse |
|
|
13
|
+
| `isNav` | `Boolean` | `false` | Adds `navbar-collapse` class for use inside `VibeNavbar` |
|
|
14
|
+
|
|
15
|
+
## Events
|
|
16
|
+
|
|
17
|
+
| Event | Payload | Description |
|
|
18
|
+
|-------|---------|-------------|
|
|
19
|
+
| `update:modelValue` | `Boolean` | Emitted when visibility changes |
|
|
20
|
+
| `show` | - | Emitted when collapse starts showing |
|
|
21
|
+
| `shown` | - | Emitted when collapse is fully shown |
|
|
22
|
+
| `hide` | - | Emitted when collapse starts hiding |
|
|
23
|
+
| `hidden` | - | Emitted when collapse is fully hidden |
|
|
24
|
+
|
|
25
|
+
## Slots
|
|
26
|
+
|
|
27
|
+
| Slot | Description |
|
|
28
|
+
|------|-------------|
|
|
29
|
+
| `default` | Collapsible content |
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Reactive Usage (v-model)
|
|
34
|
+
|
|
35
|
+
```vue
|
|
36
|
+
<template>
|
|
37
|
+
<div>
|
|
38
|
+
<VibeButton variant="primary" @click="show = !show">
|
|
39
|
+
Toggle Collapse
|
|
40
|
+
</VibeButton>
|
|
41
|
+
|
|
42
|
+
<VibeCollapse v-model="show">
|
|
43
|
+
<div class="card card-body mt-2">
|
|
44
|
+
This content is controlled via Vue state with smooth animations.
|
|
45
|
+
</div>
|
|
46
|
+
</VibeCollapse>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script setup>
|
|
51
|
+
import { ref } from 'vue'
|
|
52
|
+
const show = ref(false)
|
|
53
|
+
</script>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Inside a Navbar
|
|
57
|
+
|
|
58
|
+
When used inside a `VibeNavbar`, add `is-nav` to get the `navbar-collapse` class. `VibeNavbarToggle` will automatically synchronize with this component.
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<template>
|
|
62
|
+
<VibeNavbar variant="dark" expand="lg">
|
|
63
|
+
<VibeNavbarBrand href="#">Brand</VibeNavbarBrand>
|
|
64
|
+
<VibeNavbarToggle target="navContent" />
|
|
65
|
+
<VibeCollapse id="navContent" is-nav>
|
|
66
|
+
<VibeNavbarNav :items="navItems" />
|
|
67
|
+
</VibeCollapse>
|
|
68
|
+
</VibeNavbar>
|
|
69
|
+
</template>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Horizontal Collapse
|
|
73
|
+
|
|
74
|
+
```vue
|
|
75
|
+
<template>
|
|
76
|
+
<div>
|
|
77
|
+
<VibeButton variant="primary" @click="show = !show">
|
|
78
|
+
Toggle Width
|
|
79
|
+
</VibeButton>
|
|
80
|
+
|
|
81
|
+
<div style="min-height: 120px">
|
|
82
|
+
<VibeCollapse v-model="show" horizontal>
|
|
83
|
+
<div class="card card-body" style="width: 300px">
|
|
84
|
+
This is horizontal collapse content!
|
|
85
|
+
</div>
|
|
86
|
+
</VibeCollapse>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</template>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Important Notes
|
|
93
|
+
|
|
94
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Collapse functionality when it is mounted, ensuring that smooth sliding transitions are used.
|
|
95
|
+
|
|
96
|
+
**State Synchronization:** Refactored to ensure that clicking a toggle (like `VibeNavbarToggle`) updates both Vue's internal state and Bootstrap's JavaScript instance simultaneously.
|
|
97
|
+
|
|
98
|
+
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
99
|
+
|
|
100
|
+
## Bootstrap CSS Classes
|
|
101
|
+
|
|
102
|
+
- `.collapse`
|
|
103
|
+
- `.navbar-collapse` (when `is-nav` is set)
|
|
104
|
+
- `.collapse-horizontal`
|
|
105
|
+
- `.show`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# VibeDropdown
|
|
2
|
+
|
|
3
|
+
Data-driven toggleable contextual overlay for displaying lists of links.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `text` | `String` | `'Dropdown'` | Button text |
|
|
11
|
+
| `variant` | `Variant` | `'primary'` | Button color variant |
|
|
12
|
+
| `size` | `Size` | `undefined` | Button size (`'sm'` or `'lg'`) |
|
|
13
|
+
| `split` | `Boolean` | `false` | Split button style |
|
|
14
|
+
| `direction` | `Direction` | `'down'` | Direction: `'up'`, `'down'`, `'start'`, `'end'` |
|
|
15
|
+
| `menuEnd` | `Boolean` | `false` | Align menu to the right |
|
|
16
|
+
| `items` | `DropdownItem[]` | Required | Array of dropdown items |
|
|
17
|
+
| `autoClose` | `Boolean\|String` | `true` | Close behavior: `true`, `false`, `'inside'`, `'outside'` |
|
|
18
|
+
|
|
19
|
+
### DropdownItem Interface
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
interface DropdownItem {
|
|
23
|
+
text?: string
|
|
24
|
+
href?: string
|
|
25
|
+
to?: string | object
|
|
26
|
+
active?: boolean
|
|
27
|
+
disabled?: boolean
|
|
28
|
+
divider?: boolean
|
|
29
|
+
header?: boolean
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Events
|
|
34
|
+
|
|
35
|
+
| Event | Payload | Description |
|
|
36
|
+
|-------|---------|-------------|
|
|
37
|
+
| `item-click` | `{ item, index, event }` | Emitted when an item is clicked |
|
|
38
|
+
| `show` | - | Emitted when dropdown starts showing |
|
|
39
|
+
| `shown` | - | Emitted when dropdown is fully shown |
|
|
40
|
+
| `hide` | - | Emitted when dropdown starts hiding |
|
|
41
|
+
| `hidden` | - | Emitted when dropdown is fully hidden |
|
|
42
|
+
|
|
43
|
+
## Slots
|
|
44
|
+
|
|
45
|
+
| Slot | Scope | Description |
|
|
46
|
+
|------|-------|-------------|
|
|
47
|
+
| `button` | - | Custom button content |
|
|
48
|
+
| `item` | `{ item, index }` | Custom item rendering |
|
|
49
|
+
| `header` | `{ item, index }` | Custom header rendering |
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
### Programmatic Control
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<template>
|
|
57
|
+
<div>
|
|
58
|
+
<VibeButton @click="$refs.myDropdown.toggle()">External Toggle</VibeButton>
|
|
59
|
+
|
|
60
|
+
<VibeDropdown
|
|
61
|
+
ref="myDropdown"
|
|
62
|
+
text="Dropdown Menu"
|
|
63
|
+
:items="dropdownItems"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Basic Dropdown
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<template>
|
|
73
|
+
<VibeDropdown
|
|
74
|
+
text="Dropdown Menu"
|
|
75
|
+
:items="dropdownItems"
|
|
76
|
+
/>
|
|
77
|
+
</template>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Important Notes
|
|
81
|
+
|
|
82
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Dropdown functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
83
|
+
|
|
84
|
+
**Programmatic Methods:** You can call `show()`, `hide()`, and `toggle()` on the component instance via template refs.
|
|
85
|
+
|
|
86
|
+
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
87
|
+
|
|
88
|
+
## Bootstrap CSS Classes
|
|
89
|
+
|
|
90
|
+
- `.dropdown`, `.dropup`, `.dropend`, `.dropstart`
|
|
91
|
+
- `.dropdown-toggle`
|
|
92
|
+
- `.dropdown-menu`
|
|
93
|
+
- `.dropdown-item`
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# VibeModal
|
|
2
|
+
|
|
3
|
+
Modal dialogs for lightboxes, user notifications, or custom content.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier for the modal |
|
|
10
|
+
| `modelValue` | `Boolean` | `false` | Control visibility (v-model) |
|
|
11
|
+
| `title` | `String` | `''` | Modal title |
|
|
12
|
+
| `size` | `Size\|'xl'` | `undefined` | Modal size: `'sm'`, `'lg'`, `'xl'` |
|
|
13
|
+
| `centered` | `Boolean` | `false` | Vertically center modal |
|
|
14
|
+
| `scrollable` | `Boolean` | `false` | Scrollable modal body |
|
|
15
|
+
| `fullscreen` | `Boolean\|String` | `false` | Fullscreen: `true` or breakpoint |
|
|
16
|
+
| `staticBackdrop` | `Boolean` | `false` | Don't close on backdrop click |
|
|
17
|
+
| `hideHeader` | `Boolean` | `false` | Hide header section |
|
|
18
|
+
| `hideFooter` | `Boolean` | `false` | Hide footer section |
|
|
19
|
+
| `teleport` | `Boolean\|String` | `'body'` | Destination for Vue Teleport |
|
|
20
|
+
|
|
21
|
+
## Events
|
|
22
|
+
|
|
23
|
+
| Event | Payload | Description |
|
|
24
|
+
|-------|---------|-------------|
|
|
25
|
+
| `update:modelValue` | `Boolean` | Emitted when modal visibility changes |
|
|
26
|
+
| `show` | - | Emitted when modal starts showing |
|
|
27
|
+
| `shown` | - | Emitted when modal is fully shown |
|
|
28
|
+
| `hide` | - | Emitted when modal starts hiding |
|
|
29
|
+
| `hidden` | - | Emitted when modal is fully hidden |
|
|
30
|
+
|
|
31
|
+
## Slots
|
|
32
|
+
|
|
33
|
+
| Slot | Description |
|
|
34
|
+
|------|-------------|
|
|
35
|
+
| `default` | Modal body content |
|
|
36
|
+
| `header` | Custom header content |
|
|
37
|
+
| `footer` | Custom footer content |
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### Reactive Usage (v-model)
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<template>
|
|
45
|
+
<div>
|
|
46
|
+
<VibeButton variant="primary" @click="showModal = true">
|
|
47
|
+
Open Modal
|
|
48
|
+
</VibeButton>
|
|
49
|
+
|
|
50
|
+
<VibeModal v-model="showModal" title="Reactive Modal">
|
|
51
|
+
<p>This modal is controlled via Vue state.</p>
|
|
52
|
+
</VibeModal>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script setup>
|
|
57
|
+
import { ref } from 'vue'
|
|
58
|
+
const showModal = ref(false)
|
|
59
|
+
</script>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Basic Modal (Data Attributes)
|
|
63
|
+
|
|
64
|
+
```vue
|
|
65
|
+
<template>
|
|
66
|
+
<div>
|
|
67
|
+
<!-- You can still use standard Bootstrap data attributes -->
|
|
68
|
+
<VibeButton variant="primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
|
|
69
|
+
Launch Modal
|
|
70
|
+
</VibeButton>
|
|
71
|
+
|
|
72
|
+
<VibeModal id="exampleModal" title="Modal Title">
|
|
73
|
+
<p>Modal body text goes here.</p>
|
|
74
|
+
</VibeModal>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Sized Modals
|
|
80
|
+
|
|
81
|
+
```vue
|
|
82
|
+
<template>
|
|
83
|
+
<div>
|
|
84
|
+
<VibeModal title="Small Modal" size="sm">
|
|
85
|
+
Small modal content
|
|
86
|
+
</VibeModal>
|
|
87
|
+
|
|
88
|
+
<VibeModal title="Large Modal" size="lg">
|
|
89
|
+
Large modal content
|
|
90
|
+
</VibeModal>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Centered Modal
|
|
96
|
+
|
|
97
|
+
```vue
|
|
98
|
+
<template>
|
|
99
|
+
<VibeModal title="Centered Modal" centered>
|
|
100
|
+
This modal is vertically centered.
|
|
101
|
+
</VibeModal>
|
|
102
|
+
</template>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Custom Footer
|
|
106
|
+
|
|
107
|
+
```vue
|
|
108
|
+
<template>
|
|
109
|
+
<VibeModal title="Custom Footer">
|
|
110
|
+
<p>Modal with custom footer buttons.</p>
|
|
111
|
+
|
|
112
|
+
<template #footer>
|
|
113
|
+
<VibeButton variant="secondary" @click="showModal = false">Close</VibeButton>
|
|
114
|
+
<VibeButton variant="primary">Save changes</VibeButton>
|
|
115
|
+
</template>
|
|
116
|
+
</VibeModal>
|
|
117
|
+
</template>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Important Notes
|
|
121
|
+
|
|
122
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Modal functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
123
|
+
|
|
124
|
+
**Teleportation:** By default, this component teleports its DOM elements to the `<body>` to avoid stacking context issues. You can customize this with the `teleport` prop.
|
|
125
|
+
|
|
126
|
+
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
127
|
+
|
|
128
|
+
## Mobile Optimization
|
|
129
|
+
|
|
130
|
+
**Safe Areas:** In fullscreen mode, the modal header and footer automatically respect device safe areas (notches) in hybrid apps.
|
|
131
|
+
|
|
132
|
+
**Hardware Back Button:** On Android devices in hybrid environments, the hardware back button will automatically close the modal if it is open.
|
|
133
|
+
|
|
134
|
+
**Dynamic Height:** Fullscreen modals use `dvh` (dynamic viewport height) units to ensure they occupy the full screen height even when mobile browser bars are visible.
|
|
135
|
+
|
|
136
|
+
## Bootstrap CSS Classes
|
|
137
|
+
|
|
138
|
+
- `.modal`
|
|
139
|
+
- `.modal-dialog`
|
|
140
|
+
- `.modal-content`
|
|
141
|
+
- `.modal-header`
|
|
142
|
+
- `.modal-title`
|
|
143
|
+
- `.modal-body`
|
|
144
|
+
- `.modal-footer`
|
|
145
|
+
- `.modal-{size}`
|
|
146
|
+
- `.modal-dialog-centered`
|
|
147
|
+
- `.modal-dialog-scrollable`
|
|
148
|
+
- `.modal-fullscreen`
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# VibeOffcanvas
|
|
2
|
+
|
|
3
|
+
Hidden sidebar for navigation or additional content.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `modelValue` | `Boolean` | `false` | Control visibility (v-model) |
|
|
11
|
+
| `title` | `String` | `''` | Offcanvas title |
|
|
12
|
+
| `placement` | `OffcanvasPlacement` | `'start'` | Placement: `'start'`, `'end'`, `'top'`, `'bottom'` |
|
|
13
|
+
| `backdrop` | `Boolean\|String` | `true` | Backdrop: `true`, `false`, or `'static'` |
|
|
14
|
+
| `scroll` | `Boolean` | `false` | Allow body scrolling |
|
|
15
|
+
| `teleport` | `Boolean\|String` | `'body'` | Destination for Vue Teleport |
|
|
16
|
+
|
|
17
|
+
## Events
|
|
18
|
+
|
|
19
|
+
| Event | Payload | Description |
|
|
20
|
+
|-------|---------|-------------|
|
|
21
|
+
| `update:modelValue` | `Boolean` | Emitted when visibility changes |
|
|
22
|
+
| `show` | - | Emitted when offcanvas starts showing |
|
|
23
|
+
| `shown` | - | Emitted when offcanvas is fully shown |
|
|
24
|
+
| `hide` | - | Emitted when offcanvas starts hiding |
|
|
25
|
+
| `hidden` | - | Emitted when offcanvas is fully hidden |
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
|
|
29
|
+
| Slot | Description |
|
|
30
|
+
|------|-------------|
|
|
31
|
+
| `default` | Offcanvas body content |
|
|
32
|
+
| `header` | Custom header content |
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
### Reactive Usage (v-model)
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<template>
|
|
40
|
+
<div>
|
|
41
|
+
<VibeButton variant="primary" @click="showOffcanvas = true">
|
|
42
|
+
Open Offcanvas
|
|
43
|
+
</VibeButton>
|
|
44
|
+
|
|
45
|
+
<VibeOffcanvas v-model="showOffcanvas" title="Reactive Offcanvas">
|
|
46
|
+
This offcanvas is controlled via Vue state.
|
|
47
|
+
</VibeOffcanvas>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
import { ref } from 'vue'
|
|
53
|
+
const showOffcanvas = ref(false)
|
|
54
|
+
</script>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Placement Options
|
|
58
|
+
|
|
59
|
+
```vue
|
|
60
|
+
<template>
|
|
61
|
+
<VibeOffcanvas title="Right Side" placement="end">
|
|
62
|
+
Content on the right
|
|
63
|
+
</VibeOffcanvas>
|
|
64
|
+
</template>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Important Notes
|
|
68
|
+
|
|
69
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Offcanvas functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
70
|
+
|
|
71
|
+
**Teleportation:** By default, this component teleports its DOM elements to the `<body>` to avoid stacking context issues. You can customize this with the `teleport` prop.
|
|
72
|
+
|
|
73
|
+
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
74
|
+
|
|
75
|
+
## Mobile Optimization
|
|
76
|
+
|
|
77
|
+
**Safe Areas:** When used in hybrid apps with `viewport-fit=cover`, the offcanvas header automatically adds padding to account for device notches.
|
|
78
|
+
|
|
79
|
+
**Hardware Back Button:** On Android devices in hybrid environments, the hardware back button will automatically close the offcanvas if it is open.
|
|
80
|
+
|
|
81
|
+
**Dynamic Height:** The offcanvas uses `dvh` (dynamic viewport height) units to ensure it occupies the full screen height even when mobile browser bars are visible.
|
|
82
|
+
|
|
83
|
+
## Bootstrap CSS Classes
|
|
84
|
+
|
|
85
|
+
- `.offcanvas`
|
|
86
|
+
- `.offcanvas-{placement}`
|
|
87
|
+
- `.offcanvas-header`
|
|
88
|
+
- `.offcanvas-title`
|
|
89
|
+
- `.offcanvas-body`
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# VibeToast
|
|
2
|
+
|
|
3
|
+
Push notifications for lightweight alerts.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `modelValue` | `Boolean` | `false` | Control visibility (v-model) |
|
|
11
|
+
| `title` | `String` | `''` | Toast title |
|
|
12
|
+
| `variant` | `Variant` | `undefined` | Color variant |
|
|
13
|
+
| `autohide` | `Boolean` | `true` | Auto hide after delay |
|
|
14
|
+
| `delay` | `Number` | `5000` | Delay in milliseconds |
|
|
15
|
+
| `teleport` | `Boolean\|String` | `'body'` | Destination for Vue Teleport |
|
|
16
|
+
| `placement` | `ToastPlacement` | `'top-end'` | Position of the toast |
|
|
17
|
+
|
|
18
|
+
## Events
|
|
19
|
+
|
|
20
|
+
| Event | Payload | Description |
|
|
21
|
+
|-------|---------|-------------|
|
|
22
|
+
| `update:modelValue` | `Boolean` | Emitted when visibility changes |
|
|
23
|
+
| `show` | - | Emitted when toast starts showing |
|
|
24
|
+
| `shown` | - | Emitted when toast is fully shown |
|
|
25
|
+
| `hide` | - | Emitted when toast starts hiding |
|
|
26
|
+
| `hidden` | - | Emitted when toast is fully hidden |
|
|
27
|
+
|
|
28
|
+
## Slots
|
|
29
|
+
|
|
30
|
+
| Slot | Description |
|
|
31
|
+
|------|-------------|
|
|
32
|
+
| `default` | Toast body content |
|
|
33
|
+
| `header` | Custom header content |
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### Reactive Usage (v-model)
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<template>
|
|
41
|
+
<div>
|
|
42
|
+
<VibeButton @click="showToast = true">Show Toast</VibeButton>
|
|
43
|
+
|
|
44
|
+
<VibeToast v-model="showToast" title="Notification" variant="primary">
|
|
45
|
+
This toast is controlled via Vue state.
|
|
46
|
+
</VibeToast>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script setup>
|
|
51
|
+
import { ref } from 'vue'
|
|
52
|
+
const showToast = ref(false)
|
|
53
|
+
</script>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Placed Toasts
|
|
57
|
+
|
|
58
|
+
```vue
|
|
59
|
+
<template>
|
|
60
|
+
<div>
|
|
61
|
+
<VibeToast title="Success" variant="success" placement="bottom-end">
|
|
62
|
+
Operation completed successfully!
|
|
63
|
+
</VibeToast>
|
|
64
|
+
|
|
65
|
+
<VibeToast title="Center" variant="info" placement="middle-center">
|
|
66
|
+
I am in the middle of the screen
|
|
67
|
+
</VibeToast>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Colored Toasts
|
|
73
|
+
|
|
74
|
+
```vue
|
|
75
|
+
<template>
|
|
76
|
+
<div>
|
|
77
|
+
<VibeToast title="Success" variant="success">
|
|
78
|
+
Operation completed successfully!
|
|
79
|
+
</VibeToast>
|
|
80
|
+
|
|
81
|
+
<VibeToast title="Warning" variant="warning">
|
|
82
|
+
Please review your changes
|
|
83
|
+
</VibeToast>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Custom Delay
|
|
89
|
+
|
|
90
|
+
```vue
|
|
91
|
+
<template>
|
|
92
|
+
<VibeToast title="Quick Toast" :delay="2000">
|
|
93
|
+
This will auto-hide after 2 seconds
|
|
94
|
+
</VibeToast>
|
|
95
|
+
</template>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Important Notes
|
|
99
|
+
|
|
100
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Toast functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
101
|
+
|
|
102
|
+
**Automatic Container:** Unlike raw Bootstrap, VibeToast automatically manages its own `toast-container` and positioning based on the `placement` prop.
|
|
103
|
+
|
|
104
|
+
**Teleportation:** By default, this component teleports to the `<body>` to ensure it is always visible on top of other elements.
|
|
105
|
+
|
|
106
|
+
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
107
|
+
|
|
108
|
+
## Bootstrap CSS Classes
|
|
109
|
+
|
|
110
|
+
- `.toast`
|
|
111
|
+
- `.toast-header`
|
|
112
|
+
- `.toast-body`
|
|
113
|
+
- `.text-bg-{variant}`
|
|
114
|
+
- `.toast-container`
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# VibeCol
|
|
2
|
+
|
|
3
|
+
Column component for Bootstrap's grid system. Supports responsive sizing, offsets, ordering, and alignment.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `tag` | `Tag` | `'div'` | HTML element to render |
|
|
10
|
+
| `cols` | `ColSize \| Boolean` | `undefined` | Base column width (`1`-`12`, `'auto'`, or `true` for equal-width) |
|
|
11
|
+
| `sm` | `ColSize \| Boolean` | `undefined` | Column width at `sm` breakpoint |
|
|
12
|
+
| `md` | `ColSize \| Boolean` | `undefined` | Column width at `md` breakpoint |
|
|
13
|
+
| `lg` | `ColSize \| Boolean` | `undefined` | Column width at `lg` breakpoint |
|
|
14
|
+
| `xl` | `ColSize \| Boolean` | `undefined` | Column width at `xl` breakpoint |
|
|
15
|
+
| `xxl` | `ColSize \| Boolean` | `undefined` | Column width at `xxl` breakpoint |
|
|
16
|
+
| `offset` | `Number` | `undefined` | Base offset (`0`-`11`) |
|
|
17
|
+
| `offsetSm` | `Number` | `undefined` | Offset at `sm` breakpoint |
|
|
18
|
+
| `offsetMd` | `Number` | `undefined` | Offset at `md` breakpoint |
|
|
19
|
+
| `offsetLg` | `Number` | `undefined` | Offset at `lg` breakpoint |
|
|
20
|
+
| `offsetXl` | `Number` | `undefined` | Offset at `xl` breakpoint |
|
|
21
|
+
| `offsetXxl` | `Number` | `undefined` | Offset at `xxl` breakpoint |
|
|
22
|
+
| `order` | `OrderValue` | `undefined` | Base visual order |
|
|
23
|
+
| `orderSm` | `OrderValue` | `undefined` | Order at `sm` breakpoint |
|
|
24
|
+
| `orderMd` | `OrderValue` | `undefined` | Order at `md` breakpoint |
|
|
25
|
+
| `orderLg` | `OrderValue` | `undefined` | Order at `lg` breakpoint |
|
|
26
|
+
| `orderXl` | `OrderValue` | `undefined` | Order at `xl` breakpoint |
|
|
27
|
+
| `orderXxl` | `OrderValue` | `undefined` | Order at `xxl` breakpoint |
|
|
28
|
+
| `alignSelf` | `AlignItems` | `undefined` | Individual column vertical alignment |
|
|
29
|
+
|
|
30
|
+
### Type Reference
|
|
31
|
+
|
|
32
|
+
- **ColSize:** `1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto'`
|
|
33
|
+
- **OrderValue:** `0 | 1 | 2 | 3 | 4 | 5 | 'first' | 'last'`
|
|
34
|
+
- **AlignItems:** `'start' | 'center' | 'end' | 'baseline' | 'stretch'`
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
| Event | Payload | Description |
|
|
39
|
+
|-------|---------|-------------|
|
|
40
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
41
|
+
|
|
42
|
+
## Slots
|
|
43
|
+
|
|
44
|
+
| Slot | Description |
|
|
45
|
+
|------|-------------|
|
|
46
|
+
| `default` | Column content |
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
### Equal-width Columns
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<template>
|
|
54
|
+
<VibeRow>
|
|
55
|
+
<!-- No sizing props = equal-width (col class) -->
|
|
56
|
+
<VibeCol>1 of 3</VibeCol>
|
|
57
|
+
<VibeCol>2 of 3</VibeCol>
|
|
58
|
+
<VibeCol>3 of 3</VibeCol>
|
|
59
|
+
</VibeRow>
|
|
60
|
+
</template>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Specific Widths
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<template>
|
|
67
|
+
<VibeRow>
|
|
68
|
+
<VibeCol :cols="8">Main content</VibeCol>
|
|
69
|
+
<VibeCol :cols="4">Sidebar</VibeCol>
|
|
70
|
+
</VibeRow>
|
|
71
|
+
</template>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Responsive Columns
|
|
75
|
+
|
|
76
|
+
```vue
|
|
77
|
+
<template>
|
|
78
|
+
<VibeRow>
|
|
79
|
+
<!-- Full width on mobile, half on medium, third on large -->
|
|
80
|
+
<VibeCol :cols="12" :md="6" :lg="4">Responsive</VibeCol>
|
|
81
|
+
<VibeCol :cols="12" :md="6" :lg="4">Responsive</VibeCol>
|
|
82
|
+
<VibeCol :cols="12" :md="12" :lg="4">Responsive</VibeCol>
|
|
83
|
+
</VibeRow>
|
|
84
|
+
</template>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Auto-width Column
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<template>
|
|
91
|
+
<VibeRow>
|
|
92
|
+
<VibeCol :cols="2">Fixed</VibeCol>
|
|
93
|
+
<VibeCol cols="auto">Sized to content</VibeCol>
|
|
94
|
+
<VibeCol :cols="2">Fixed</VibeCol>
|
|
95
|
+
</VibeRow>
|
|
96
|
+
</template>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Offsets and Ordering
|
|
100
|
+
|
|
101
|
+
```vue
|
|
102
|
+
<template>
|
|
103
|
+
<VibeRow>
|
|
104
|
+
<VibeCol :cols="4" :offset="4">Centered column</VibeCol>
|
|
105
|
+
</VibeRow>
|
|
106
|
+
|
|
107
|
+
<VibeRow>
|
|
108
|
+
<VibeCol :cols="6" order="last">Appears second</VibeCol>
|
|
109
|
+
<VibeCol :cols="6" order="first">Appears first</VibeCol>
|
|
110
|
+
</VibeRow>
|
|
111
|
+
</template>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Vertical Alignment
|
|
115
|
+
|
|
116
|
+
```vue
|
|
117
|
+
<template>
|
|
118
|
+
<VibeRow align-items="start" style="height: 200px;">
|
|
119
|
+
<VibeCol>Top-aligned</VibeCol>
|
|
120
|
+
<VibeCol align-self="end">Bottom-aligned</VibeCol>
|
|
121
|
+
</VibeRow>
|
|
122
|
+
</template>
|
|
123
|
+
```
|