@velkymx/vibeui 0.8.1 → 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,72 @@
|
|
|
1
|
+
# VibeAlert
|
|
2
|
+
|
|
3
|
+
Alert messages with Bootstrap styling, supporting variants, dismissible functionality, and v-model binding.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `variant` | `Variant` | `'primary'` | Color variant |
|
|
10
|
+
| `subtle` | `Boolean` | `false` | Renders alert with subtle background and emphasis text |
|
|
11
|
+
| `modelValue` | `Boolean` | `true` | Controls visibility (v-model support) |
|
|
12
|
+
| `dismissable` | `Boolean` | `false` | Shows close button when true |
|
|
13
|
+
| `message` | `String` | Required | Alert message text |
|
|
14
|
+
| `fade` | `Boolean` | `true` | Use fade animation on dismissal |
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
| Event | Payload | Description |
|
|
19
|
+
|-------|---------|-------------|
|
|
20
|
+
| `update:modelValue` | `Boolean` | Emitted when alert is dismissed |
|
|
21
|
+
| `close` | - | Emitted when dismissal starts |
|
|
22
|
+
| `closed` | - | Emitted when dismissal completes |
|
|
23
|
+
|
|
24
|
+
## Slots
|
|
25
|
+
|
|
26
|
+
| Slot | Description |
|
|
27
|
+
|------|-------------|
|
|
28
|
+
| `default` | Alert content (overrides `message` prop) |
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
### Basic Alert
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<template>
|
|
36
|
+
<VibeAlert variant="success" message="Operation completed successfully!" />
|
|
37
|
+
</template>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Dismissible Alert with v-model
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<script setup>
|
|
44
|
+
import { ref } from 'vue'
|
|
45
|
+
const showAlert = ref(true)
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<VibeAlert
|
|
50
|
+
variant="warning"
|
|
51
|
+
dismissable
|
|
52
|
+
v-model="showAlert"
|
|
53
|
+
message="This alert can be dismissed"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Important Notes
|
|
59
|
+
|
|
60
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Alert functionality when it is mounted, ensuring smooth dismissal animations.
|
|
61
|
+
|
|
62
|
+
**Instance Exposure:** You can access the underlying Bootstrap instance via template ref using the `bsInstance` property.
|
|
63
|
+
|
|
64
|
+
## Bootstrap CSS Classes
|
|
65
|
+
|
|
66
|
+
- `.alert`
|
|
67
|
+
- `.alert-{variant}`
|
|
68
|
+
- `.bg-{variant}-subtle` (when `subtle` is true)
|
|
69
|
+
- `.text-{variant}-emphasis` (when `subtle` is true)
|
|
70
|
+
- `.border-{variant}-subtle` (when `subtle` is true)
|
|
71
|
+
- `.alert-dismissible`
|
|
72
|
+
- `.fade`, `.show`
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# VibeBadge
|
|
2
|
+
|
|
3
|
+
Small count and labeling component with Bootstrap 5.3 styling.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `variant` | `Variant` | `'primary'` | Background color variant |
|
|
10
|
+
| `subtle` | `Boolean` | `false` | Renders badge with subtle background and emphasis text |
|
|
11
|
+
| `pill` | `Boolean` | `false` | Renders badge with rounded pill shape |
|
|
12
|
+
| `tag` | `String` | `'span'` | HTML tag to render: `'span'`, `'a'`, or any valid tag |
|
|
13
|
+
|
|
14
|
+
## Events
|
|
15
|
+
|
|
16
|
+
| Event | Payload | Description |
|
|
17
|
+
|-------|---------|-------------|
|
|
18
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| Slot | Description |
|
|
23
|
+
|------|-------------|
|
|
24
|
+
| `default` | Badge content |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Basic Badge
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<template>
|
|
32
|
+
<VibeButton variant="primary">
|
|
33
|
+
Notifications <VibeBadge variant="secondary">4</VibeBadge>
|
|
34
|
+
</VibeButton>
|
|
35
|
+
</template>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Pill Badges
|
|
39
|
+
|
|
40
|
+
```vue
|
|
41
|
+
<template>
|
|
42
|
+
<div>
|
|
43
|
+
<VibeBadge variant="primary" pill>Primary</VibeBadge>
|
|
44
|
+
<VibeBadge variant="success" pill>Success</VibeBadge>
|
|
45
|
+
<VibeBadge variant="danger" pill>Danger</VibeBadge>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Link Badges
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<template>
|
|
54
|
+
<VibeBadge tag="a" href="#" variant="primary">Link Badge</VibeBadge>
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### All Variants
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<template>
|
|
62
|
+
<div>
|
|
63
|
+
<VibeBadge variant="primary">Primary</VibeBadge>
|
|
64
|
+
<VibeBadge variant="secondary">Secondary</VibeBadge>
|
|
65
|
+
<VibeBadge variant="success">Success</VibeBadge>
|
|
66
|
+
<VibeBadge variant="danger">Danger</VibeBadge>
|
|
67
|
+
<VibeBadge variant="warning">Warning</VibeBadge>
|
|
68
|
+
<VibeBadge variant="info">Info</VibeBadge>
|
|
69
|
+
<VibeBadge variant="light">Light</VibeBadge>
|
|
70
|
+
<VibeBadge variant="dark">Dark</VibeBadge>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Bootstrap CSS Classes
|
|
76
|
+
|
|
77
|
+
- `.badge`
|
|
78
|
+
- `.bg-{variant}`
|
|
79
|
+
- `.bg-{variant}-subtle` (when `subtle` is true)
|
|
80
|
+
- `.text-{variant}-emphasis` (when `subtle` is true)
|
|
81
|
+
- `.rounded-pill` (when `pill` is true)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# VibeButtonGroup
|
|
2
|
+
|
|
3
|
+
Group buttons together in a single line or vertically.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `size` | `Size` | `undefined` | Size for all buttons in group: `'sm'` or `'lg'` |
|
|
10
|
+
| `vertical` | `Boolean` | `false` | Stack buttons vertically |
|
|
11
|
+
| `role` | `String` | `'group'` | ARIA role attribute |
|
|
12
|
+
| `ariaLabel` | `String` | `undefined` | ARIA label for accessibility |
|
|
13
|
+
|
|
14
|
+
## Events
|
|
15
|
+
|
|
16
|
+
| Event | Payload | Description |
|
|
17
|
+
|-------|---------|-------------|
|
|
18
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| Slot | Description |
|
|
23
|
+
|------|-------------|
|
|
24
|
+
| `default` | Button group content (typically VibeButton components) |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Basic Button Group
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<template>
|
|
32
|
+
<VibeButtonGroup>
|
|
33
|
+
<VibeButton variant="primary">Left</VibeButton>
|
|
34
|
+
<VibeButton variant="primary">Middle</VibeButton>
|
|
35
|
+
<VibeButton variant="primary">Right</VibeButton>
|
|
36
|
+
</VibeButtonGroup>
|
|
37
|
+
</template>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Button Toolbar
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<template>
|
|
44
|
+
<div>
|
|
45
|
+
<VibeButtonGroup aria-label="First group">
|
|
46
|
+
<VibeButton variant="secondary">1</VibeButton>
|
|
47
|
+
<VibeButton variant="secondary">2</VibeButton>
|
|
48
|
+
<VibeButton variant="secondary">3</VibeButton>
|
|
49
|
+
</VibeButtonGroup>
|
|
50
|
+
|
|
51
|
+
<VibeButtonGroup aria-label="Second group">
|
|
52
|
+
<VibeButton variant="secondary">4</VibeButton>
|
|
53
|
+
<VibeButton variant="secondary">5</VibeButton>
|
|
54
|
+
</VibeButtonGroup>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Vertical Button Group
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<template>
|
|
63
|
+
<VibeButtonGroup vertical>
|
|
64
|
+
<VibeButton variant="primary">Button 1</VibeButton>
|
|
65
|
+
<VibeButton variant="primary">Button 2</VibeButton>
|
|
66
|
+
<VibeButton variant="primary">Button 3</VibeButton>
|
|
67
|
+
</VibeButtonGroup>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Sized Button Groups
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<template>
|
|
75
|
+
<div>
|
|
76
|
+
<VibeButtonGroup size="sm">
|
|
77
|
+
<VibeButton variant="primary">Small</VibeButton>
|
|
78
|
+
<VibeButton variant="primary">Group</VibeButton>
|
|
79
|
+
</VibeButtonGroup>
|
|
80
|
+
|
|
81
|
+
<VibeButtonGroup size="lg">
|
|
82
|
+
<VibeButton variant="primary">Large</VibeButton>
|
|
83
|
+
<VibeButton variant="primary">Group</VibeButton>
|
|
84
|
+
</VibeButtonGroup>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Mixed Button Types
|
|
90
|
+
|
|
91
|
+
```vue
|
|
92
|
+
<template>
|
|
93
|
+
<VibeButtonGroup>
|
|
94
|
+
<VibeButton variant="danger">Delete</VibeButton>
|
|
95
|
+
<VibeButton variant="warning" outline>Archive</VibeButton>
|
|
96
|
+
<VibeButton variant="success">Save</VibeButton>
|
|
97
|
+
</VibeButtonGroup>
|
|
98
|
+
</template>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Bootstrap CSS Classes
|
|
102
|
+
|
|
103
|
+
- `.btn-group`
|
|
104
|
+
- `.btn-group-vertical`
|
|
105
|
+
- `.btn-group-{size}`
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# VibeButton
|
|
2
|
+
|
|
3
|
+
Button component with variants, sizes, and support for links and router-links.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `variant` | `Variant` | `'primary'` | Button color variant |
|
|
10
|
+
| `size` | `Size` | `undefined` | Button size: `'sm'` or `'lg'` |
|
|
11
|
+
| `outline` | `Boolean` | `false` | Use outline style instead of solid |
|
|
12
|
+
| `disabled` | `Boolean` | `false` | Disable the button |
|
|
13
|
+
| `type` | `ButtonType` | `'button'` | Button type: `'button'`, `'submit'`, or `'reset'` |
|
|
14
|
+
| `href` | `String` | `undefined` | Renders as anchor tag with href |
|
|
15
|
+
| `to` | `String\|Object` | `undefined` | Renders as router-link with to prop |
|
|
16
|
+
| `active` | `Boolean` | `false` | Apply active state styling |
|
|
17
|
+
| `focusRing` | `Boolean` | `false` | Enable the Bootstrap 5.3 focus-ring helper |
|
|
18
|
+
|
|
19
|
+
## Events
|
|
20
|
+
|
|
21
|
+
| Event | Payload | Description |
|
|
22
|
+
|-------|---------|-------------|
|
|
23
|
+
| `click` | `Event` | Emitted when button is clicked (unless disabled) |
|
|
24
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
25
|
+
|
|
26
|
+
## Slots
|
|
27
|
+
|
|
28
|
+
| Slot | Description |
|
|
29
|
+
|------|-------------|
|
|
30
|
+
| `default` | Button content |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
### Basic Buttons
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<template>
|
|
38
|
+
<div>
|
|
39
|
+
<VibeButton variant="primary">Primary</VibeButton>
|
|
40
|
+
<VibeButton variant="secondary">Secondary</VibeButton>
|
|
41
|
+
<VibeButton variant="success">Success</VibeButton>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Outline Buttons
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<template>
|
|
50
|
+
<div>
|
|
51
|
+
<VibeButton variant="primary" outline>Outline Primary</VibeButton>
|
|
52
|
+
<VibeButton variant="danger" outline>Outline Danger</VibeButton>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Button Sizes
|
|
58
|
+
|
|
59
|
+
```vue
|
|
60
|
+
<template>
|
|
61
|
+
<div>
|
|
62
|
+
<VibeButton variant="primary" size="sm">Small</VibeButton>
|
|
63
|
+
<VibeButton variant="primary">Normal</VibeButton>
|
|
64
|
+
<VibeButton variant="primary" size="lg">Large</VibeButton>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Disabled State
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<template>
|
|
73
|
+
<VibeButton variant="primary" disabled>Disabled Button</VibeButton>
|
|
74
|
+
</template>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Link Buttons
|
|
78
|
+
|
|
79
|
+
```vue
|
|
80
|
+
<template>
|
|
81
|
+
<div>
|
|
82
|
+
<!-- Anchor link -->
|
|
83
|
+
<VibeButton variant="primary" href="https://example.com">
|
|
84
|
+
External Link
|
|
85
|
+
</VibeButton>
|
|
86
|
+
|
|
87
|
+
<!-- Router link (requires Vue Router) -->
|
|
88
|
+
<VibeButton variant="secondary" :to="{ name: 'home' }">
|
|
89
|
+
Home
|
|
90
|
+
</VibeButton>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Form Submit
|
|
96
|
+
|
|
97
|
+
```vue
|
|
98
|
+
<template>
|
|
99
|
+
<form @submit.prevent="handleSubmit">
|
|
100
|
+
<VibeButton type="submit" variant="success">Submit Form</VibeButton>
|
|
101
|
+
</form>
|
|
102
|
+
</template>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### With Click Handler
|
|
106
|
+
|
|
107
|
+
```vue
|
|
108
|
+
<script setup>
|
|
109
|
+
const handleClick = () => {
|
|
110
|
+
console.log('Button clicked!')
|
|
111
|
+
}
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<template>
|
|
115
|
+
<VibeButton variant="primary" @click="handleClick">
|
|
116
|
+
Click Me
|
|
117
|
+
</VibeButton>
|
|
118
|
+
</template>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Bootstrap CSS Classes
|
|
122
|
+
|
|
123
|
+
- `.btn`
|
|
124
|
+
- `.btn-{variant}` or `.btn-outline-{variant}`
|
|
125
|
+
- `.btn-{size}`
|
|
126
|
+
- `.active`
|
|
127
|
+
- `.focus-ring`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# VibeCloseButton
|
|
2
|
+
|
|
3
|
+
Generic close button for dismissing content like modals and alerts.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `disabled` | `Boolean` | `false` | Disable the close button |
|
|
10
|
+
| `white` | `Boolean` | `false` | Use white variant for dark backgrounds |
|
|
11
|
+
| `ariaLabel` | `String` | `'Close'` | Accessible label for screen readers |
|
|
12
|
+
|
|
13
|
+
## Events
|
|
14
|
+
|
|
15
|
+
| Event | Payload | Description |
|
|
16
|
+
|-------|---------|-------------|
|
|
17
|
+
| `click` | `Event` | Emitted when button is clicked (unless disabled) |
|
|
18
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Basic Close Button
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<template>
|
|
26
|
+
<VibeCloseButton @click="handleClose" />
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
const handleClose = () => {
|
|
31
|
+
console.log('Closed!')
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### White Variant
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<template>
|
|
40
|
+
<div class="bg-dark p-3">
|
|
41
|
+
<VibeCloseButton white />
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Custom Aria Label
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<template>
|
|
50
|
+
<VibeCloseButton aria-label="Dismiss notification" />
|
|
51
|
+
</template>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Disabled State
|
|
55
|
+
|
|
56
|
+
```vue
|
|
57
|
+
<template>
|
|
58
|
+
<VibeCloseButton disabled />
|
|
59
|
+
</template>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### In Alert Context
|
|
63
|
+
|
|
64
|
+
```vue
|
|
65
|
+
<script setup>
|
|
66
|
+
import { ref } from 'vue'
|
|
67
|
+
|
|
68
|
+
const showAlert = ref(true)
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<div v-if="showAlert" class="alert alert-warning d-flex justify-content-between">
|
|
73
|
+
<span>Warning message</span>
|
|
74
|
+
<VibeCloseButton @click="showAlert = false" />
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Bootstrap CSS Classes
|
|
80
|
+
|
|
81
|
+
- `.btn-close`
|
|
82
|
+
- `.btn-close-white`
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# VibeLink
|
|
2
|
+
|
|
3
|
+
A flexible link component that supports Bootstrap 5.3's new link and underline utilities.
|
|
4
|
+
|
|
5
|
+
## Basic Usage
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<VibeLink href="https://example.com">Standard Link</VibeLink>
|
|
9
|
+
|
|
10
|
+
<VibeLink variant="danger" underline="0">Link without underline</VibeLink>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| Prop | Type | Default | Description |
|
|
16
|
+
|------|------|---------|-------------|
|
|
17
|
+
| `variant` | `Variant` | `undefined` | Link color variant (`primary`, `success`, etc.) |
|
|
18
|
+
| `underline` | `Boolean \| '0' \| '1' \| '2' \| '3'` | `true` | Underline behavior. `'0'` removes underline. |
|
|
19
|
+
| `underlineVariant` | `Variant` | `undefined` | Color of the underline |
|
|
20
|
+
| `underlineOpacity` | `0 \| 10 \| 25 \| 50 \| 75 \| 100` | `undefined` | Opacity of the underline |
|
|
21
|
+
| `offset` | `1 \| 2 \| 3` | `undefined` | Underline offset from text |
|
|
22
|
+
| `opacity` | `10 \| 25 \| 50 \| 75 \| 100` | `undefined` | Link text opacity |
|
|
23
|
+
| `focusRing` | `Boolean` | `false` | Enable the focus-ring helper |
|
|
24
|
+
| `href` | `String` | `undefined` | URL for standard links |
|
|
25
|
+
| `to` | `String \| Object` | `undefined` | Router link destination |
|
|
26
|
+
| `tag` | `String` | `'a'` | HTML tag to use (if not a router-link) |
|
|
27
|
+
|
|
28
|
+
## Bootstrap 5.3 Utilities
|
|
29
|
+
This component maps directly to the following Bootstrap classes:
|
|
30
|
+
- `.link-{variant}`
|
|
31
|
+
- `.link-underline-0`
|
|
32
|
+
- `.link-underline-{variant}`
|
|
33
|
+
- `.link-underline-opacity-{value}`
|
|
34
|
+
- `.link-offset-{value}`
|
|
35
|
+
- `.link-opacity-{value}`
|
|
36
|
+
- `.focus-ring`
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# VibePlaceholder
|
|
2
|
+
|
|
3
|
+
Placeholder loading component with optional animations.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `variant` | `Variant` | `undefined` | Background color variant |
|
|
10
|
+
| `size` | `Size` | `undefined` | Placeholder size: `'sm'` or `'lg'` |
|
|
11
|
+
| `animation` | `PlaceholderAnimation` | `undefined` | Animation type: `'glow'` or `'wave'` |
|
|
12
|
+
| `width` | `String\|Number` | `undefined` | Width as percentage or CSS value |
|
|
13
|
+
| `tag` | `String` | `'span'` | HTML tag to render |
|
|
14
|
+
|
|
15
|
+
## Events
|
|
16
|
+
|
|
17
|
+
| Event | Payload | Description |
|
|
18
|
+
|-------|---------|-------------|
|
|
19
|
+
| `component-error` | `Object` | Emitted when an error occurs |
|
|
20
|
+
|
|
21
|
+
## Slots
|
|
22
|
+
|
|
23
|
+
| Slot | Description |
|
|
24
|
+
|------|-------------|
|
|
25
|
+
| `default` | Placeholder content (typically empty) |
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Basic Placeholder
|
|
30
|
+
|
|
31
|
+
```vue
|
|
32
|
+
<template>
|
|
33
|
+
<VibePlaceholder width="75" />
|
|
34
|
+
</template>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Placeholder Card
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<template>
|
|
41
|
+
<VibeCard>
|
|
42
|
+
<template #title>
|
|
43
|
+
<VibePlaceholder width="100" />
|
|
44
|
+
</template>
|
|
45
|
+
<template #body>
|
|
46
|
+
<VibePlaceholder width="100" />
|
|
47
|
+
<VibePlaceholder width="100" />
|
|
48
|
+
<VibePlaceholder width="75" />
|
|
49
|
+
</template>
|
|
50
|
+
</VibeCard>
|
|
51
|
+
</template>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### With Glow Animation
|
|
55
|
+
|
|
56
|
+
```vue
|
|
57
|
+
<template>
|
|
58
|
+
<div>
|
|
59
|
+
<VibePlaceholder animation="glow" width="100" />
|
|
60
|
+
<VibePlaceholder animation="glow" width="75" />
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### With Wave Animation
|
|
66
|
+
|
|
67
|
+
```vue
|
|
68
|
+
<template>
|
|
69
|
+
<div>
|
|
70
|
+
<VibePlaceholder animation="wave" width="100" />
|
|
71
|
+
<VibePlaceholder animation="wave" width="90" />
|
|
72
|
+
<VibePlaceholder animation="wave" width="80" />
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Colored Placeholders
|
|
78
|
+
|
|
79
|
+
```vue
|
|
80
|
+
<template>
|
|
81
|
+
<div>
|
|
82
|
+
<VibePlaceholder variant="primary" width="100" />
|
|
83
|
+
<VibePlaceholder variant="success" width="75" />
|
|
84
|
+
<VibePlaceholder variant="danger" width="50" />
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Sizes
|
|
90
|
+
|
|
91
|
+
```vue
|
|
92
|
+
<template>
|
|
93
|
+
<div>
|
|
94
|
+
<VibePlaceholder size="lg" width="100" />
|
|
95
|
+
<VibePlaceholder width="100" />
|
|
96
|
+
<VibePlaceholder size="sm" width="100" />
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Loading State Example
|
|
102
|
+
|
|
103
|
+
```vue
|
|
104
|
+
<script setup>
|
|
105
|
+
import { ref, onMounted } from 'vue'
|
|
106
|
+
|
|
107
|
+
const loading = ref(true)
|
|
108
|
+
const data = ref(null)
|
|
109
|
+
|
|
110
|
+
onMounted(async () => {
|
|
111
|
+
// Simulate API call
|
|
112
|
+
await new Promise(resolve => setTimeout(resolve, 2000))
|
|
113
|
+
data.value = { title: 'Article Title', content: 'Article content...' }
|
|
114
|
+
loading.value = false
|
|
115
|
+
})
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<template>
|
|
119
|
+
<VibeCard v-if="loading">
|
|
120
|
+
<template #body>
|
|
121
|
+
<VibePlaceholder animation="glow" width="100" />
|
|
122
|
+
<VibePlaceholder animation="glow" width="100" />
|
|
123
|
+
<VibePlaceholder animation="glow" width="75" />
|
|
124
|
+
</template>
|
|
125
|
+
</VibeCard>
|
|
126
|
+
<VibeCard v-else :title="data.title" :body="data.content" />
|
|
127
|
+
</template>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Bootstrap CSS Classes
|
|
131
|
+
|
|
132
|
+
- `.placeholder`
|
|
133
|
+
- `.bg-{variant}`
|
|
134
|
+
- `.placeholder-{size}`
|
|
135
|
+
- `.placeholder-{animation}`
|