@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velkymx/vibeui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A lightweight Vue 3 component library for Bootstrap 5.3 with dual-mode support (shorthand props and composable slots)",
|
|
5
5
|
"main": "./dist/vibeui.umd.js",
|
|
6
6
|
"module": "./dist/vibeui.es.js",
|
|
@@ -14,16 +14,14 @@
|
|
|
14
14
|
"./dist/style.css": "./dist/vibeui.css"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
"llms.txt",
|
|
19
|
-
"CLAUDE.md",
|
|
20
|
-
"docs"
|
|
17
|
+
"dist"
|
|
21
18
|
],
|
|
22
19
|
"scripts": {
|
|
23
20
|
"dev": "vite",
|
|
24
21
|
"build": "vite build",
|
|
25
22
|
"preview": "vite preview",
|
|
26
23
|
"examples": "npm run build && cd examples && python3 -m http.server 8000",
|
|
24
|
+
"smoke": "npm run build && cp dist/vibeui.es.js dist/vibeui.css smoke/dist/ && cd smoke && python3 -m http.server 8001",
|
|
27
25
|
"test": "vitest",
|
|
28
26
|
"test:ui": "vitest --ui",
|
|
29
27
|
"test:run": "vitest run",
|
|
@@ -51,6 +49,7 @@
|
|
|
51
49
|
},
|
|
52
50
|
"homepage": "https://github.com/velkymx/vibeui#readme",
|
|
53
51
|
"dependencies": {
|
|
52
|
+
"@floating-ui/dom": "^1.7.6",
|
|
54
53
|
"vue": "^3.5.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
package/CLAUDE.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# VibeUI - AI Assistant Guide
|
|
2
|
-
|
|
3
|
-
**DO NOT read the source files in this package to understand how to use VibeUI.**
|
|
4
|
-
|
|
5
|
-
Instead, use these resources:
|
|
6
|
-
|
|
7
|
-
## Documentation
|
|
8
|
-
|
|
9
|
-
- **Full docs:** `docs/` directory in this package (included in npm install)
|
|
10
|
-
- **Start here:** `docs/README.md` for an overview
|
|
11
|
-
- **Component docs:** `docs/components/` for per-component API reference
|
|
12
|
-
- **Form docs:** `docs/forms/` for form components and validation
|
|
13
|
-
- **Composable docs:** `docs/composables/` for hooks like `useColorMode`
|
|
14
|
-
- **LLM-optimized reference:** `llms.txt` in this package root
|
|
15
|
-
|
|
16
|
-
## Quick Reference
|
|
17
|
-
|
|
18
|
-
- **Package:** `@velkymx/vibeui`
|
|
19
|
-
- **Repository:** https://github.com/velkymx/vibeui
|
|
20
|
-
- **Stack:** Vue 3 + Bootstrap 5.3 + TypeScript
|
|
21
|
-
|
|
22
|
-
## How to Use VibeUI
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import { createApp } from 'vue'
|
|
26
|
-
import VibeUI from '@velkymx/vibeui'
|
|
27
|
-
import 'bootstrap/dist/css/bootstrap.min.css'
|
|
28
|
-
|
|
29
|
-
createApp(App).use(VibeUI).mount('#app')
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
All components are available globally after `app.use(VibeUI)`, or can be imported individually:
|
|
33
|
-
|
|
34
|
-
```ts
|
|
35
|
-
import { VibeButton, VibeModal, VibeCard } from '@velkymx/vibeui'
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Key Patterns
|
|
39
|
-
|
|
40
|
-
- Components use Bootstrap 5.3 class names via props (e.g., `variant="primary"`, `size="lg"`)
|
|
41
|
-
- Interactive components (Modal, Offcanvas, Toast, Collapse) use `v-model` for visibility
|
|
42
|
-
- Data-driven components (Breadcrumb, ListGroup, Dropdown, Accordion) accept `items` arrays
|
|
43
|
-
- Bootstrap JS is managed internally - do NOT import bootstrap JS yourself
|
|
44
|
-
- Bootstrap CSS must be imported by the consumer
|
|
45
|
-
|
|
46
|
-
## For Complete API Details
|
|
47
|
-
|
|
48
|
-
Read the `docs/` directory or `llms.txt` - do not reverse-engineer behavior from dist files.
|
package/docs/README.md
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# VibeUI Documentation
|
|
2
|
-
|
|
3
|
-
Complete documentation for VibeUI - A modern Vue 3 UI component library built with Bootstrap 5.3.
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
VibeUI is designed to be simple and lightweight, providing Vue 3 components that wrap Bootstrap 5.3 functionality with a clean, intuitive API.
|
|
8
|
-
|
|
9
|
-
### Installation
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install @velkymx/vibeui bootstrap
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Setup
|
|
16
|
-
|
|
17
|
-
```javascript
|
|
18
|
-
import { createApp } from 'vue'
|
|
19
|
-
import App from './App.vue'
|
|
20
|
-
import VibeUI, { useColorMode } from '@velkymx/vibeui'
|
|
21
|
-
import 'bootstrap/dist/css/bootstrap.min.css'
|
|
22
|
-
|
|
23
|
-
// Restore saved color mode preference before mounting
|
|
24
|
-
const { initColorMode } = useColorMode()
|
|
25
|
-
initColorMode()
|
|
26
|
-
|
|
27
|
-
createApp(App).use(VibeUI).mount('#app')
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Bootstrap JavaScript
|
|
31
|
-
|
|
32
|
-
**VibeUI v0.8.0+ is mobile-optimized and fully abstracts Bootstrap's JavaScript.** You do not need to manually import or initialize Bootstrap JS for VibeUI components.
|
|
33
|
-
|
|
34
|
-
The library handles:
|
|
35
|
-
- **Dynamic Initialization:** Components initialize their own JS logic on mount.
|
|
36
|
-
- **Reactive Configuration:** Re-initializes automatically when props like `placement` or `delay` change.
|
|
37
|
-
- **Memory Cleanup:** Automatically disposes of Bootstrap instances on unmount.
|
|
38
|
-
- **State Integrity:** Synchronizes internal Vue state with native Bootstrap events.
|
|
39
|
-
|
|
40
|
-
## Components
|
|
41
|
-
|
|
42
|
-
### [Layout Components](./components/layout/)
|
|
43
|
-
- [VibeContainer](./components/layout/container.md)
|
|
44
|
-
- [VibeRow](./components/layout/row.md)
|
|
45
|
-
- [VibeCol](./components/layout/col.md)
|
|
46
|
-
|
|
47
|
-
### [Core Components](./components/core/)
|
|
48
|
-
- [VibeAlert](./components/core/alert.md)
|
|
49
|
-
- [VibeBadge](./components/core/badge.md)
|
|
50
|
-
- [VibeButton](./components/core/button.md)
|
|
51
|
-
- [VibeButtonGroup](./components/core/button-group.md)
|
|
52
|
-
- [VibeLink](./components/core/link.md)
|
|
53
|
-
- [VibeCloseButton](./components/core/close-button.md)
|
|
54
|
-
- [VibeSpinner](./components/core/spinner.md)
|
|
55
|
-
- [VibePlaceholder](./components/core/placeholder.md)
|
|
56
|
-
|
|
57
|
-
### [Interactive Components](./components/interactive/)
|
|
58
|
-
- [VibeAccordion](./components/interactive/accordion.md)
|
|
59
|
-
- [VibeCarousel](./components/interactive/carousel.md)
|
|
60
|
-
- [VibeCollapse](./components/interactive/collapse.md)
|
|
61
|
-
- [VibeDropdown](./components/interactive/dropdown.md)
|
|
62
|
-
- [VibeModal](./components/interactive/modal.md)
|
|
63
|
-
- [VibeOffcanvas](./components/interactive/offcanvas.md)
|
|
64
|
-
- [VibeToast](./components/interactive/toast.md)
|
|
65
|
-
|
|
66
|
-
### [Advanced Components](./components/advanced/)
|
|
67
|
-
- [VibeTooltip](./components/advanced/tooltip.md)
|
|
68
|
-
- [VibePopover](./components/advanced/popover.md)
|
|
69
|
-
- [VibeScrollspy](./components/advanced/scrollspy.md)
|
|
70
|
-
|
|
71
|
-
### [Data Components](./components/data/)
|
|
72
|
-
- [VibeDataTable](./components/data/datatable.md)
|
|
73
|
-
|
|
74
|
-
### [Form Components](./forms/)
|
|
75
|
-
- [VibeFormGroup](./forms/form-group.md) - Automated layout & accessibility
|
|
76
|
-
- [VibeFormInput](./forms/form-input.md)
|
|
77
|
-
- [VibeInputGroup](./forms/input-group.md)
|
|
78
|
-
- [VibeFormSelect](./forms/form-select.md)
|
|
79
|
-
- [VibeFormWysiwyg](./forms/form-wysiwyg.md)
|
|
80
|
-
|
|
81
|
-
## Composables
|
|
82
|
-
|
|
83
|
-
Standalone utilities that can be used independently of any component.
|
|
84
|
-
|
|
85
|
-
- [useColorMode](./composables/color-mode.md) - Manage Bootstrap light/dark/auto color modes
|
|
86
|
-
- `useBreakpoints` - Programmatic breakpoint detection (xs, sm, md, lg, xl, xxl)
|
|
87
|
-
- `useBackButton` - Handle Android hardware back button in hybrid mobile apps
|
|
88
|
-
|
|
89
|
-
## Design Philosophy
|
|
90
|
-
|
|
91
|
-
1. **Full Abstraction** - No "reach-around" required; the library manages the framework engine.
|
|
92
|
-
2. **Zero-Boilerplate** - Automatic IDs, Teleportation, and state syncing.
|
|
93
|
-
3. **Smart Forms** - Context-aware form groups automate accessibility.
|
|
94
|
-
4. **TypeScript First** - Comprehensive type definitions for all props and events.
|
|
95
|
-
|
|
96
|
-
## Common Patterns
|
|
97
|
-
|
|
98
|
-
### v-model Support
|
|
99
|
-
Most interactive and form components support `v-model` for two-way state synchronization.
|
|
100
|
-
|
|
101
|
-
```vue
|
|
102
|
-
<VibeModal v-model="show" title="Hello" />
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Instance Exposure
|
|
106
|
-
Advanced users can access the underlying Bootstrap instance via template refs:
|
|
107
|
-
|
|
108
|
-
```vue
|
|
109
|
-
<template>
|
|
110
|
-
<VibeModal ref="myModal" />
|
|
111
|
-
</template>
|
|
112
|
-
|
|
113
|
-
<script setup>
|
|
114
|
-
import { useTemplateRef, onMounted } from 'vue'
|
|
115
|
-
const modal = useTemplateRef('myModal')
|
|
116
|
-
|
|
117
|
-
onMounted(() => {
|
|
118
|
-
// Access native Bootstrap methods
|
|
119
|
-
modal.value.bsInstance.handleUpdate()
|
|
120
|
-
})
|
|
121
|
-
</script>
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Mobile & Hybrid App Support
|
|
125
|
-
|
|
126
|
-
VibeUI is optimized for mobile-first development and hybrid environments like **Capacitor**.
|
|
127
|
-
|
|
128
|
-
### Programmatic Breakpoints
|
|
129
|
-
Use the `useBreakpoints` composable to adapt your UI based on the viewport size.
|
|
130
|
-
|
|
131
|
-
```javascript
|
|
132
|
-
import { useBreakpoints } from '@velkymx/vibeui'
|
|
133
|
-
const { isMobile, isTablet, isLg } = useBreakpoints()
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Safe Areas
|
|
137
|
-
Components like `VibeNavbar`, `VibeOffcanvas`, and `VibeModal` automatically respect device safe areas (notches) when your app is configured with `viewport-fit=cover`.
|
|
138
|
-
|
|
139
|
-
### Hybrid Navigation
|
|
140
|
-
Use `useBackButton` to ensure Android hardware back button events correctly close active UI layers like modals and sidebars.
|
|
141
|
-
|
|
142
|
-
```javascript
|
|
143
|
-
import { useBackButton } from '@velkymx/vibeui'
|
|
144
|
-
// Registered automatically inside VibeModal and VibeOffcanvas
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Contributing
|
|
148
|
-
...
|
|
149
|
-
Contributions are welcome! Please visit the [GitHub repository](https://github.com/velkymx/vibeui) to report issues or submit pull requests.
|
|
150
|
-
|
|
151
|
-
## License
|
|
152
|
-
|
|
153
|
-
MIT License - See LICENSE file for details.
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
# VibePopover
|
|
2
|
-
|
|
3
|
-
Popovers for displaying rich content overlays. Requires Bootstrap JS and initialization.
|
|
4
|
-
|
|
5
|
-
## Props
|
|
6
|
-
|
|
7
|
-
| Prop | Type | Default | Description |
|
|
8
|
-
|------|------|---------|-------------|
|
|
9
|
-
| `title` | `String` | `undefined` | Popover title |
|
|
10
|
-
| `content` | `String` | Required | Popover content text |
|
|
11
|
-
| `placement` | `Placement` | `'top'` | Popover position: `'top'`, `'bottom'`, `'start'`, `'end'` |
|
|
12
|
-
| `trigger` | `String` | `'click'` | Trigger events (space-separated) |
|
|
13
|
-
| `html` | `Boolean` | `false` | Allow HTML content |
|
|
14
|
-
|
|
15
|
-
## Slots
|
|
16
|
-
|
|
17
|
-
| Slot | Description |
|
|
18
|
-
|------|-------------|
|
|
19
|
-
| `default` | Element that triggers the popover |
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
### Basic Popover
|
|
24
|
-
|
|
25
|
-
```vue
|
|
26
|
-
<template>
|
|
27
|
-
<VibePopover
|
|
28
|
-
title="Popover Title"
|
|
29
|
-
content="This is the popover content"
|
|
30
|
-
>
|
|
31
|
-
<VibeButton variant="danger">Click me</VibeButton>
|
|
32
|
-
</VibePopover>
|
|
33
|
-
</template>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Placement Options
|
|
37
|
-
|
|
38
|
-
```vue
|
|
39
|
-
<template>
|
|
40
|
-
<div>
|
|
41
|
-
<VibePopover
|
|
42
|
-
title="Top Popover"
|
|
43
|
-
content="Popover on top"
|
|
44
|
-
placement="top"
|
|
45
|
-
>
|
|
46
|
-
<VibeButton variant="secondary">Top</VibeButton>
|
|
47
|
-
</VibePopover>
|
|
48
|
-
|
|
49
|
-
<VibePopover
|
|
50
|
-
title="End Popover"
|
|
51
|
-
content="Popover on right"
|
|
52
|
-
placement="end"
|
|
53
|
-
>
|
|
54
|
-
<VibeButton variant="secondary">End</VibeButton>
|
|
55
|
-
</VibePopover>
|
|
56
|
-
|
|
57
|
-
<VibePopover
|
|
58
|
-
title="Bottom Popover"
|
|
59
|
-
content="Popover on bottom"
|
|
60
|
-
placement="bottom"
|
|
61
|
-
>
|
|
62
|
-
<VibeButton variant="secondary">Bottom</VibeButton>
|
|
63
|
-
</VibePopover>
|
|
64
|
-
|
|
65
|
-
<VibePopover
|
|
66
|
-
title="Start Popover"
|
|
67
|
-
content="Popover on left"
|
|
68
|
-
placement="start"
|
|
69
|
-
>
|
|
70
|
-
<VibeButton variant="secondary">Start</VibeButton>
|
|
71
|
-
</VibePopover>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Hover Trigger
|
|
77
|
-
|
|
78
|
-
```vue
|
|
79
|
-
<template>
|
|
80
|
-
<VibePopover
|
|
81
|
-
title="Hover Popover"
|
|
82
|
-
content="This appears on hover"
|
|
83
|
-
trigger="hover focus"
|
|
84
|
-
>
|
|
85
|
-
<VibeButton variant="info">Hover me</VibeButton>
|
|
86
|
-
</VibePopover>
|
|
87
|
-
</template>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### HTML Content
|
|
91
|
-
|
|
92
|
-
```vue
|
|
93
|
-
<template>
|
|
94
|
-
<VibePopover
|
|
95
|
-
title="<strong>HTML Title</strong>"
|
|
96
|
-
content="<em>HTML</em> content with <a href='#'>link</a>"
|
|
97
|
-
html
|
|
98
|
-
>
|
|
99
|
-
<VibeButton variant="warning">HTML Popover</VibeButton>
|
|
100
|
-
</VibePopover>
|
|
101
|
-
</template>
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### No Title
|
|
105
|
-
|
|
106
|
-
```vue
|
|
107
|
-
<template>
|
|
108
|
-
<VibePopover content="Just content, no title">
|
|
109
|
-
<VibeButton variant="success">No Title</VibeButton>
|
|
110
|
-
</VibePopover>
|
|
111
|
-
</template>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Important Notes
|
|
115
|
-
|
|
116
|
-
**Automatic Initialization:** This component automatically initializes Bootstrap's Popover functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
117
|
-
|
|
118
|
-
**Touch Optimization:** On touch devices, if the trigger is set to `hover focus`, it automatically switches to `click` to ensure reliable behavior on mobile screens.
|
|
119
|
-
|
|
120
|
-
**Manual Initialization (Optional):** If you are not using the automatic initialization or need to initialize popovers on non-VibeUI elements:
|
|
121
|
-
|
|
122
|
-
```javascript
|
|
123
|
-
// Initialize all popovers
|
|
124
|
-
import { Popover } from 'bootstrap'
|
|
125
|
-
...
|
|
126
|
-
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
|
|
127
|
-
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new Popover(popoverTriggerEl))
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Or in Vue:
|
|
131
|
-
|
|
132
|
-
```vue
|
|
133
|
-
<script setup>
|
|
134
|
-
import { onMounted } from 'vue'
|
|
135
|
-
import { Popover } from 'bootstrap'
|
|
136
|
-
|
|
137
|
-
onMounted(() => {
|
|
138
|
-
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
|
|
139
|
-
const popoverList = [...popoverTriggerList].map(el => new Popover(el))
|
|
140
|
-
})
|
|
141
|
-
</script>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Bootstrap CSS Classes
|
|
145
|
-
|
|
146
|
-
- Uses Bootstrap's `data-bs-toggle="popover"` attributes
|
|
147
|
-
- `.popover`
|
|
148
|
-
- `.popover-arrow`
|
|
149
|
-
- `.popover-header`
|
|
150
|
-
- `.popover-body`
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# VibeScrollspy
|
|
2
|
-
|
|
3
|
-
Automatically update navigation based on scroll position.
|
|
4
|
-
|
|
5
|
-
## Props
|
|
6
|
-
|
|
7
|
-
| Prop | Type | Default | Description |
|
|
8
|
-
|------|------|---------|-------------|
|
|
9
|
-
| `target` | `String` | Required | CSS selector of navigation element to update |
|
|
10
|
-
| `offset` | `Number` | `10` | Offset pixels from top when calculating position |
|
|
11
|
-
| `method` | `String` | `'auto'` | Scroll method: `'auto'`, `'offset'`, or `'position'` |
|
|
12
|
-
| `smoothScroll` | `Boolean` | `false` | Enable smooth scrolling |
|
|
13
|
-
| `tag` | `String` | `'div'` | HTML tag to render |
|
|
14
|
-
|
|
15
|
-
## Events
|
|
16
|
-
|
|
17
|
-
| Event | Payload | Description |
|
|
18
|
-
|-------|---------|-------------|
|
|
19
|
-
| `activate` | - | Emitted when a new item is activated |
|
|
20
|
-
|
|
21
|
-
## Slots
|
|
22
|
-
|
|
23
|
-
| Slot | Description |
|
|
24
|
-
|------|-------------|
|
|
25
|
-
| `default` | Scrollable content with target sections |
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
### Basic Scrollspy
|
|
30
|
-
|
|
31
|
-
```vue
|
|
32
|
-
<template>
|
|
33
|
-
<div class="row">
|
|
34
|
-
<div class="col-4">
|
|
35
|
-
<VibeNav id="navbar-example" vertical pills :items="navItems" />
|
|
36
|
-
</div>
|
|
37
|
-
<div class="col-8">
|
|
38
|
-
<VibeScrollspy
|
|
39
|
-
target="#navbar-example"
|
|
40
|
-
smooth-scroll
|
|
41
|
-
style="height: 300px; overflow-y: auto"
|
|
42
|
-
>
|
|
43
|
-
<h4 id="item-1">Item 1</h4>
|
|
44
|
-
<p>Content for item 1...</p>
|
|
45
|
-
<h4 id="item-2">Item 2</h4>
|
|
46
|
-
<p>Content for item 2...</p>
|
|
47
|
-
</VibeScrollspy>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Important Notes
|
|
54
|
-
|
|
55
|
-
**Automatic Initialization:** This component automatically initializes Bootstrap's ScrollSpy functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
56
|
-
|
|
57
|
-
**Manual Refresh:** If you dynamically add or remove content inside the scrollspy, you may need to call the `refresh()` method on the component instance via template refs.
|
|
58
|
-
|
|
59
|
-
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
60
|
-
|
|
61
|
-
## Bootstrap CSS Classes
|
|
62
|
-
|
|
63
|
-
- Uses Bootstrap's `data-bs-spy="scroll"` attributes
|
|
64
|
-
- Targets navigation items automatically
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# VibeTooltip
|
|
2
|
-
|
|
3
|
-
Tooltips for displaying contextual information. Requires Bootstrap JS and initialization.
|
|
4
|
-
|
|
5
|
-
## Props
|
|
6
|
-
|
|
7
|
-
| Prop | Type | Default | Description |
|
|
8
|
-
|------|------|---------|-------------|
|
|
9
|
-
| `content` | `String` | Required | Tooltip text content |
|
|
10
|
-
| `placement` | `Placement` | `'top'` | Tooltip position: `'top'`, `'bottom'`, `'start'`, `'end'` |
|
|
11
|
-
| `trigger` | `String` | `'hover focus'` | Trigger events (space-separated) |
|
|
12
|
-
| `html` | `Boolean` | `false` | Allow HTML content |
|
|
13
|
-
|
|
14
|
-
## Slots
|
|
15
|
-
|
|
16
|
-
| Slot | Description |
|
|
17
|
-
|------|-------------|
|
|
18
|
-
| `default` | Element that triggers the tooltip |
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
### Basic Tooltip
|
|
23
|
-
|
|
24
|
-
```vue
|
|
25
|
-
<template>
|
|
26
|
-
<VibeTooltip content="Tooltip text">
|
|
27
|
-
<VibeButton variant="secondary">Hover me</VibeButton>
|
|
28
|
-
</VibeTooltip>
|
|
29
|
-
</template>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Placement Options
|
|
33
|
-
|
|
34
|
-
```vue
|
|
35
|
-
<template>
|
|
36
|
-
<div>
|
|
37
|
-
<VibeTooltip content="Tooltip on top" placement="top">
|
|
38
|
-
<VibeButton variant="secondary">Top</VibeButton>
|
|
39
|
-
</VibeTooltip>
|
|
40
|
-
|
|
41
|
-
<VibeTooltip content="Tooltip on right" placement="end">
|
|
42
|
-
<VibeButton variant="secondary">End</VibeButton>
|
|
43
|
-
</VibeTooltip>
|
|
44
|
-
|
|
45
|
-
<VibeTooltip content="Tooltip on bottom" placement="bottom">
|
|
46
|
-
<VibeButton variant="secondary">Bottom</VibeButton>
|
|
47
|
-
</VibeTooltip>
|
|
48
|
-
|
|
49
|
-
<VibeTooltip content="Tooltip on left" placement="start">
|
|
50
|
-
<VibeButton variant="secondary">Start</VibeButton>
|
|
51
|
-
</VibeTooltip>
|
|
52
|
-
</div>
|
|
53
|
-
</template>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Custom Trigger
|
|
57
|
-
|
|
58
|
-
```vue
|
|
59
|
-
<template>
|
|
60
|
-
<VibeTooltip content="Click to see tooltip" trigger="click">
|
|
61
|
-
<VibeButton variant="primary">Click me</VibeButton>
|
|
62
|
-
</VibeTooltip>
|
|
63
|
-
</template>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### HTML Content
|
|
67
|
-
|
|
68
|
-
```vue
|
|
69
|
-
<template>
|
|
70
|
-
<VibeTooltip content="<em>Tooltip</em> with <strong>HTML</strong>" html>
|
|
71
|
-
<VibeButton variant="info">HTML Tooltip</VibeButton>
|
|
72
|
-
</VibeTooltip>
|
|
73
|
-
</template>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Important Notes
|
|
77
|
-
|
|
78
|
-
**Automatic Initialization:** This component automatically initializes Bootstrap's Tooltip functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
79
|
-
|
|
80
|
-
**Touch Optimization:** On touch devices, the tooltip automatically switches its trigger from `hover focus` to `click` to ensure reliable behavior on mobile screens.
|
|
81
|
-
|
|
82
|
-
**Manual Initialization (Optional):** If you are not using the automatic initialization or need to initialize tooltips on non-VibeUI elements:
|
|
83
|
-
|
|
84
|
-
```javascript
|
|
85
|
-
// Initialize all tooltips
|
|
86
|
-
import { Tooltip } from 'bootstrap'
|
|
87
|
-
...
|
|
88
|
-
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
|
89
|
-
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl))
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Or in Vue:
|
|
93
|
-
|
|
94
|
-
```vue
|
|
95
|
-
<script setup>
|
|
96
|
-
import { onMounted } from 'vue'
|
|
97
|
-
import { Tooltip } from 'bootstrap'
|
|
98
|
-
|
|
99
|
-
onMounted(() => {
|
|
100
|
-
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
|
101
|
-
const tooltipList = [...tooltipTriggerList].map(el => new Tooltip(el))
|
|
102
|
-
})
|
|
103
|
-
</script>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Bootstrap CSS Classes
|
|
107
|
-
|
|
108
|
-
- Uses Bootstrap's `data-bs-toggle="tooltip"` attributes
|
|
109
|
-
- `.tooltip`
|
|
110
|
-
- `.tooltip-arrow`
|
|
111
|
-
- `.tooltip-inner`
|