@velkymx/vibeui 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -9
- package/dist/components/VibeAlert.vue.d.ts +12 -2
- package/dist/components/VibeAutocomplete.vue.d.ts +46 -0
- package/dist/components/VibeButton.vue.d.ts +4 -4
- package/dist/components/VibeDataTable.vue.d.ts +6 -6
- package/dist/components/VibeDatePicker.vue.d.ts +122 -0
- package/dist/components/VibeDraggable.vue.d.ts +81 -0
- package/dist/components/VibeDroppable.vue.d.ts +74 -0
- package/dist/components/VibeFileInput.vue.d.ts +133 -0
- package/dist/components/VibeFormCheckbox.vue.d.ts +1 -1
- package/dist/components/VibeFormDatepicker.vue.d.ts +1 -1
- package/dist/components/VibeFormGroup.vue.d.ts +1 -1
- package/dist/components/VibeFormInput.vue.d.ts +1 -1
- package/dist/components/VibeFormRadio.vue.d.ts +1 -1
- package/dist/components/VibeFormSelect.vue.d.ts +1 -1
- package/dist/components/VibeFormSpinbutton.vue.d.ts +1 -1
- package/dist/components/VibeFormSwitch.vue.d.ts +1 -1
- package/dist/components/VibeFormTextarea.vue.d.ts +1 -1
- package/dist/components/VibeFormWysiwyg.vue.d.ts +2 -2
- package/dist/components/VibeResizable.vue.d.ts +144 -0
- package/dist/components/VibeSkeleton.vue.d.ts +53 -0
- package/dist/components/VibeSlider.vue.d.ts +78 -0
- package/dist/components/VibeSortable.vue.d.ts +40 -0
- package/dist/components/VibeStepper.vue.d.ts +132 -0
- package/dist/components/VibeTab.vue.d.ts +45 -0
- package/dist/components/VibeTabs.vue.d.ts +82 -0
- package/dist/components/VibeToast.vue.d.ts +11 -0
- package/dist/components/VibeToastHost.vue.d.ts +15 -0
- package/dist/components/dndStore.d.ts +6 -0
- package/dist/components/index.d.ts +14 -1
- package/dist/composables/useForm.d.ts +22 -0
- package/dist/composables/usePosition.d.ts +20 -0
- package/dist/composables/useToast.d.ts +52 -0
- package/dist/directives/vTooltip.d.ts +25 -0
- package/dist/index.d.ts +6 -0
- package/dist/types.d.ts +11 -4
- package/dist/vibeui.css +1 -1
- package/dist/vibeui.es.js +4256 -1827
- package/dist/vibeui.umd.js +1 -1
- package/package.json +4 -5
- package/CLAUDE.md +0 -48
- package/docs/README.md +0 -153
- package/docs/components/advanced/popover.md +0 -150
- package/docs/components/advanced/scrollspy.md +0 -64
- package/docs/components/advanced/tooltip.md +0 -111
- package/docs/components/card/card.md +0 -215
- package/docs/components/core/alert.md +0 -72
- package/docs/components/core/badge.md +0 -81
- package/docs/components/core/button-group.md +0 -105
- package/docs/components/core/button.md +0 -127
- package/docs/components/core/close-button.md +0 -82
- package/docs/components/core/link.md +0 -36
- package/docs/components/core/placeholder.md +0 -135
- package/docs/components/core/spinner.md +0 -109
- package/docs/components/data/datatable.md +0 -416
- package/docs/components/interactive/accordion.md +0 -92
- package/docs/components/interactive/carousel.md +0 -97
- package/docs/components/interactive/collapse.md +0 -105
- package/docs/components/interactive/dropdown.md +0 -93
- package/docs/components/interactive/modal.md +0 -148
- package/docs/components/interactive/offcanvas.md +0 -89
- package/docs/components/interactive/toast.md +0 -114
- package/docs/components/layout/col.md +0 -123
- package/docs/components/layout/container.md +0 -59
- package/docs/components/layout/row.md +0 -113
- package/docs/components/list/list-group.md +0 -221
- package/docs/components/navigation/breadcrumb.md +0 -116
- package/docs/components/navigation/nav.md +0 -88
- package/docs/components/navigation/navbar.md +0 -106
- package/docs/components/navigation/pagination.md +0 -146
- package/docs/components/progress/progress.md +0 -182
- package/docs/composables/back-button.md +0 -28
- package/docs/composables/breakpoints.md +0 -54
- package/docs/composables/color-mode.md +0 -141
- package/docs/forms/README.md +0 -88
- package/docs/forms/form-checkbox.md +0 -50
- package/docs/forms/form-datepicker.md +0 -50
- package/docs/forms/form-group.md +0 -80
- package/docs/forms/form-input.md +0 -55
- package/docs/forms/form-radio.md +0 -58
- package/docs/forms/form-select.md +0 -54
- package/docs/forms/form-spinbutton.md +0 -55
- package/docs/forms/form-switch.md +0 -47
- package/docs/forms/form-textarea.md +0 -51
- package/docs/forms/form-wysiwyg.md +0 -64
- package/docs/forms/input-group.md +0 -51
- package/docs/forms/validation.md +0 -599
- package/llms.txt +0 -422
|
@@ -1,116 +0,0 @@
|
|
|
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`
|
|
@@ -1,88 +0,0 @@
|
|
|
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`
|
|
@@ -1,106 +0,0 @@
|
|
|
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`
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# VibePagination
|
|
2
|
-
|
|
3
|
-
Data-driven pagination component with v-model support.
|
|
4
|
-
|
|
5
|
-
## Props
|
|
6
|
-
|
|
7
|
-
| Prop | Type | Default | Description |
|
|
8
|
-
|------|------|---------|-------------|
|
|
9
|
-
| `size` | `'sm' \| 'lg'` | `undefined` | Pagination size |
|
|
10
|
-
| `ariaLabel` | `String` | `'Pagination'` | ARIA label for the nav element |
|
|
11
|
-
| `totalPages` | `Number` | Required | Total number of pages |
|
|
12
|
-
| `currentPage` | `Number` | `1` | Current active page |
|
|
13
|
-
| `showPrevNext` | `Boolean` | `true` | Show previous/next buttons |
|
|
14
|
-
| `prevText` | `String` | `'Previous'` | Text for previous button |
|
|
15
|
-
| `nextText` | `String` | `'Next'` | Text for next button |
|
|
16
|
-
|
|
17
|
-
## Events
|
|
18
|
-
|
|
19
|
-
| Event | Payload | Description |
|
|
20
|
-
|-------|---------|-------------|
|
|
21
|
-
| `update:currentPage` | `page: number` | Emitted when page changes (v-model) |
|
|
22
|
-
| `page-click` | `page: number` | Emitted when a page is clicked |
|
|
23
|
-
|
|
24
|
-
## Slots
|
|
25
|
-
|
|
26
|
-
| Slot | Scope | Description |
|
|
27
|
-
|------|-------|-------------|
|
|
28
|
-
| `prev` | `{ disabled }` | Custom previous button |
|
|
29
|
-
| `page` | `{ page, active }` | Custom page button |
|
|
30
|
-
| `next` | `{ disabled }` | Custom next button |
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
|
|
34
|
-
### Basic Example
|
|
35
|
-
|
|
36
|
-
```vue
|
|
37
|
-
<template>
|
|
38
|
-
<VibePagination
|
|
39
|
-
:total-pages="10"
|
|
40
|
-
v-model:current-page="currentPage"
|
|
41
|
-
/>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<script setup>
|
|
45
|
-
import { ref } from 'vue'
|
|
46
|
-
|
|
47
|
-
const currentPage = ref(1)
|
|
48
|
-
</script>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Sizes
|
|
52
|
-
|
|
53
|
-
```vue
|
|
54
|
-
<template>
|
|
55
|
-
<!-- Small -->
|
|
56
|
-
<VibePagination :total-pages="5" size="sm" v-model:current-page="page1" />
|
|
57
|
-
|
|
58
|
-
<!-- Default -->
|
|
59
|
-
<VibePagination :total-pages="5" v-model:current-page="page2" />
|
|
60
|
-
|
|
61
|
-
<!-- Large -->
|
|
62
|
-
<VibePagination :total-pages="5" size="lg" v-model:current-page="page3" />
|
|
63
|
-
</template>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Without Prev/Next Buttons
|
|
67
|
-
|
|
68
|
-
```vue
|
|
69
|
-
<template>
|
|
70
|
-
<VibePagination
|
|
71
|
-
:total-pages="10"
|
|
72
|
-
:show-prev-next="false"
|
|
73
|
-
v-model:current-page="currentPage"
|
|
74
|
-
/>
|
|
75
|
-
</template>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Custom Button Text
|
|
79
|
-
|
|
80
|
-
```vue
|
|
81
|
-
<template>
|
|
82
|
-
<VibePagination
|
|
83
|
-
:total-pages="10"
|
|
84
|
-
prev-text="← Back"
|
|
85
|
-
next-text="Forward →"
|
|
86
|
-
v-model:current-page="currentPage"
|
|
87
|
-
/>
|
|
88
|
-
</template>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Custom Page Rendering
|
|
92
|
-
|
|
93
|
-
Use scoped slots for complete customization:
|
|
94
|
-
|
|
95
|
-
```vue
|
|
96
|
-
<template>
|
|
97
|
-
<VibePagination :total-pages="10" v-model:current-page="currentPage">
|
|
98
|
-
<template #prev="{ disabled }">
|
|
99
|
-
<VibeIcon icon="chevron-left" />
|
|
100
|
-
</template>
|
|
101
|
-
|
|
102
|
-
<template #page="{ page, active }">
|
|
103
|
-
Page {{ page }}
|
|
104
|
-
</template>
|
|
105
|
-
|
|
106
|
-
<template #next="{ disabled }">
|
|
107
|
-
<VibeIcon icon="chevron-right" />
|
|
108
|
-
</template>
|
|
109
|
-
</VibePagination>
|
|
110
|
-
</template>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### With Event Handling
|
|
114
|
-
|
|
115
|
-
```vue
|
|
116
|
-
<template>
|
|
117
|
-
<VibePagination
|
|
118
|
-
:total-pages="20"
|
|
119
|
-
v-model:current-page="currentPage"
|
|
120
|
-
@page-click="handlePageClick"
|
|
121
|
-
/>
|
|
122
|
-
|
|
123
|
-
<p>Current page: {{ currentPage }}</p>
|
|
124
|
-
</template>
|
|
125
|
-
|
|
126
|
-
<script setup>
|
|
127
|
-
import { ref } from 'vue'
|
|
128
|
-
|
|
129
|
-
const currentPage = ref(1)
|
|
130
|
-
|
|
131
|
-
const handlePageClick = (page) => {
|
|
132
|
-
console.log(`Navigated to page ${page}`)
|
|
133
|
-
// Fetch data for the new page
|
|
134
|
-
}
|
|
135
|
-
</script>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Bootstrap CSS Classes
|
|
139
|
-
|
|
140
|
-
- `.pagination`
|
|
141
|
-
- `.pagination-sm`
|
|
142
|
-
- `.pagination-lg`
|
|
143
|
-
- `.page-item`
|
|
144
|
-
- `.page-link`
|
|
145
|
-
- `.active`
|
|
146
|
-
- `.disabled`
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# VibeProgress
|
|
2
|
-
|
|
3
|
-
Data-driven progress bar component supporting single or multiple bars.
|
|
4
|
-
|
|
5
|
-
## Props
|
|
6
|
-
|
|
7
|
-
| Prop | Type | Default | Description |
|
|
8
|
-
|------|------|---------|-------------|
|
|
9
|
-
| `height` | `String` | `undefined` | Custom height (e.g., `'20px'`, `'2rem'`) |
|
|
10
|
-
| `bars` | `ProgressBar[]` | Required | Array of progress bars to display |
|
|
11
|
-
|
|
12
|
-
### ProgressBar Interface
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
interface ProgressBar {
|
|
16
|
-
value: number
|
|
17
|
-
max?: number
|
|
18
|
-
variant?: Variant
|
|
19
|
-
striped?: boolean
|
|
20
|
-
animated?: boolean
|
|
21
|
-
label?: string
|
|
22
|
-
showValue?: boolean
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Slots
|
|
27
|
-
|
|
28
|
-
| Slot | Scope | Description |
|
|
29
|
-
|------|-------|-------------|
|
|
30
|
-
| `label` | `{ bar, index }` | Custom label rendering for each bar |
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
|
|
34
|
-
### Basic Progress
|
|
35
|
-
|
|
36
|
-
```vue
|
|
37
|
-
<template>
|
|
38
|
-
<VibeProgress :bars="[{ value: 25 }]" />
|
|
39
|
-
</template>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### With Label
|
|
43
|
-
|
|
44
|
-
```vue
|
|
45
|
-
<template>
|
|
46
|
-
<VibeProgress :bars="[{ value: 75, showValue: true }]" />
|
|
47
|
-
</template>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Custom Height
|
|
51
|
-
|
|
52
|
-
```vue
|
|
53
|
-
<template>
|
|
54
|
-
<VibeProgress height="20px" :bars="[{ value: 50 }]" />
|
|
55
|
-
</template>
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Colored Progress Bars
|
|
59
|
-
|
|
60
|
-
```vue
|
|
61
|
-
<template>
|
|
62
|
-
<div class="d-flex flex-column gap-2">
|
|
63
|
-
<VibeProgress :bars="[{ value: 25, variant: 'success' }]" />
|
|
64
|
-
<VibeProgress :bars="[{ value: 50, variant: 'info' }]" />
|
|
65
|
-
<VibeProgress :bars="[{ value: 75, variant: 'warning' }]" />
|
|
66
|
-
<VibeProgress :bars="[{ value: 100, variant: 'danger' }]" />
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Striped and Animated
|
|
72
|
-
|
|
73
|
-
```vue
|
|
74
|
-
<template>
|
|
75
|
-
<div class="d-flex flex-column gap-2">
|
|
76
|
-
<!-- Striped -->
|
|
77
|
-
<VibeProgress :bars="[{ value: 60, variant: 'success', striped: true }]" />
|
|
78
|
-
|
|
79
|
-
<!-- Animated stripes -->
|
|
80
|
-
<VibeProgress :bars="[{ value: 75, variant: 'info', animated: true }]" />
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Multiple Bars
|
|
86
|
-
|
|
87
|
-
Stack multiple progress bars in a single component:
|
|
88
|
-
|
|
89
|
-
```vue
|
|
90
|
-
<template>
|
|
91
|
-
<VibeProgress :bars="progressBars" />
|
|
92
|
-
</template>
|
|
93
|
-
|
|
94
|
-
<script setup>
|
|
95
|
-
const progressBars = [
|
|
96
|
-
{ value: 15, variant: 'success' },
|
|
97
|
-
{ value: 30, variant: 'warning' },
|
|
98
|
-
{ value: 20, variant: 'danger' }
|
|
99
|
-
]
|
|
100
|
-
</script>
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Dynamic Progress
|
|
104
|
-
|
|
105
|
-
```vue
|
|
106
|
-
<script setup>
|
|
107
|
-
import { ref, onMounted } from 'vue'
|
|
108
|
-
|
|
109
|
-
const progress = ref(0)
|
|
110
|
-
|
|
111
|
-
onMounted(() => {
|
|
112
|
-
const interval = setInterval(() => {
|
|
113
|
-
if (progress.value < 100) {
|
|
114
|
-
progress.value += 10
|
|
115
|
-
} else {
|
|
116
|
-
clearInterval(interval)
|
|
117
|
-
}
|
|
118
|
-
}, 500)
|
|
119
|
-
})
|
|
120
|
-
</script>
|
|
121
|
-
|
|
122
|
-
<template>
|
|
123
|
-
<VibeProgress :bars="[{
|
|
124
|
-
value: progress,
|
|
125
|
-
variant: 'primary',
|
|
126
|
-
showValue: true
|
|
127
|
-
}]" />
|
|
128
|
-
</template>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Custom Label Rendering
|
|
132
|
-
|
|
133
|
-
Use the `label` scoped slot for custom labels:
|
|
134
|
-
|
|
135
|
-
```vue
|
|
136
|
-
<template>
|
|
137
|
-
<VibeProgress :bars="progressBars">
|
|
138
|
-
<template #label="{ bar }">
|
|
139
|
-
<strong>{{ bar.value }}% Complete</strong>
|
|
140
|
-
</template>
|
|
141
|
-
</VibeProgress>
|
|
142
|
-
</template>
|
|
143
|
-
|
|
144
|
-
<script setup>
|
|
145
|
-
const progressBars = [{ value: 75, variant: 'success' }]
|
|
146
|
-
</script>
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Complex Example
|
|
150
|
-
|
|
151
|
-
```vue
|
|
152
|
-
<script setup>
|
|
153
|
-
import { ref } from 'vue'
|
|
154
|
-
|
|
155
|
-
const tasks = ref([
|
|
156
|
-
{ name: 'Design', value: 100, variant: 'success' },
|
|
157
|
-
{ name: 'Development', value: 75, variant: 'primary', animated: true },
|
|
158
|
-
{ name: 'Testing', value: 50, variant: 'warning', striped: true },
|
|
159
|
-
{ name: 'Deployment', value: 0, variant: 'secondary' }
|
|
160
|
-
])
|
|
161
|
-
</script>
|
|
162
|
-
|
|
163
|
-
<template>
|
|
164
|
-
<div class="d-flex flex-column gap-3">
|
|
165
|
-
<div v-for="task in tasks" :key="task.name">
|
|
166
|
-
<div class="d-flex justify-content-between mb-1">
|
|
167
|
-
<span>{{ task.name }}</span>
|
|
168
|
-
<span>{{ task.value }}%</span>
|
|
169
|
-
</div>
|
|
170
|
-
<VibeProgress :bars="[task]" />
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
</template>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Bootstrap CSS Classes
|
|
177
|
-
|
|
178
|
-
- `.progress`
|
|
179
|
-
- `.progress-bar`
|
|
180
|
-
- `.bg-{variant}`
|
|
181
|
-
- `.progress-bar-striped`
|
|
182
|
-
- `.progress-bar-animated`
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# useBackButton
|
|
2
|
-
|
|
3
|
-
A composable to handle the Android hardware back button in hybrid mobile environments (like Capacitor or WebView apps).
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
import { useBackButton } from '@velkymx/vibeui'
|
|
9
|
-
|
|
10
|
-
// Automatically closes this logic when the back button is pressed
|
|
11
|
-
useBackButton(() => {
|
|
12
|
-
console.log('Back button pressed!')
|
|
13
|
-
closeMyOverlay()
|
|
14
|
-
})
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## How it Works
|
|
18
|
-
- It listens for the native `backbutton` event emitted by hybrid wrappers.
|
|
19
|
-
- It maintains an internal stack of "closeable" actions.
|
|
20
|
-
- When the back button is pressed, it executes the most recently registered action and prevents the default app-exit behavior.
|
|
21
|
-
- It automatically handles cleanup when the component using it is unmounted.
|
|
22
|
-
|
|
23
|
-
## Integrated Components
|
|
24
|
-
The following VibeUI components have `useBackButton` integrated automatically:
|
|
25
|
-
- `VibeModal`
|
|
26
|
-
- `VibeOffcanvas`
|
|
27
|
-
|
|
28
|
-
You don't need to manually use this composable if you are using these components; they will "just work" on Android devices.
|