@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.
Files changed (88) hide show
  1. package/README.md +171 -9
  2. package/dist/components/VibeAlert.vue.d.ts +12 -2
  3. package/dist/components/VibeAutocomplete.vue.d.ts +46 -0
  4. package/dist/components/VibeButton.vue.d.ts +4 -4
  5. package/dist/components/VibeDataTable.vue.d.ts +6 -6
  6. package/dist/components/VibeDatePicker.vue.d.ts +122 -0
  7. package/dist/components/VibeDraggable.vue.d.ts +81 -0
  8. package/dist/components/VibeDroppable.vue.d.ts +74 -0
  9. package/dist/components/VibeFileInput.vue.d.ts +133 -0
  10. package/dist/components/VibeFormCheckbox.vue.d.ts +1 -1
  11. package/dist/components/VibeFormDatepicker.vue.d.ts +1 -1
  12. package/dist/components/VibeFormGroup.vue.d.ts +1 -1
  13. package/dist/components/VibeFormInput.vue.d.ts +1 -1
  14. package/dist/components/VibeFormRadio.vue.d.ts +1 -1
  15. package/dist/components/VibeFormSelect.vue.d.ts +1 -1
  16. package/dist/components/VibeFormSpinbutton.vue.d.ts +1 -1
  17. package/dist/components/VibeFormSwitch.vue.d.ts +1 -1
  18. package/dist/components/VibeFormTextarea.vue.d.ts +1 -1
  19. package/dist/components/VibeFormWysiwyg.vue.d.ts +2 -2
  20. package/dist/components/VibeResizable.vue.d.ts +144 -0
  21. package/dist/components/VibeSkeleton.vue.d.ts +53 -0
  22. package/dist/components/VibeSlider.vue.d.ts +78 -0
  23. package/dist/components/VibeSortable.vue.d.ts +40 -0
  24. package/dist/components/VibeStepper.vue.d.ts +132 -0
  25. package/dist/components/VibeTab.vue.d.ts +45 -0
  26. package/dist/components/VibeTabs.vue.d.ts +82 -0
  27. package/dist/components/VibeToast.vue.d.ts +11 -0
  28. package/dist/components/VibeToastHost.vue.d.ts +15 -0
  29. package/dist/components/dndStore.d.ts +6 -0
  30. package/dist/components/index.d.ts +14 -1
  31. package/dist/composables/useForm.d.ts +22 -0
  32. package/dist/composables/usePosition.d.ts +20 -0
  33. package/dist/composables/useToast.d.ts +52 -0
  34. package/dist/directives/vTooltip.d.ts +25 -0
  35. package/dist/index.d.ts +6 -0
  36. package/dist/types.d.ts +11 -4
  37. package/dist/vibeui.css +1 -1
  38. package/dist/vibeui.es.js +4256 -1827
  39. package/dist/vibeui.umd.js +1 -1
  40. package/package.json +4 -5
  41. package/CLAUDE.md +0 -48
  42. package/docs/README.md +0 -153
  43. package/docs/components/advanced/popover.md +0 -150
  44. package/docs/components/advanced/scrollspy.md +0 -64
  45. package/docs/components/advanced/tooltip.md +0 -111
  46. package/docs/components/card/card.md +0 -215
  47. package/docs/components/core/alert.md +0 -72
  48. package/docs/components/core/badge.md +0 -81
  49. package/docs/components/core/button-group.md +0 -105
  50. package/docs/components/core/button.md +0 -127
  51. package/docs/components/core/close-button.md +0 -82
  52. package/docs/components/core/link.md +0 -36
  53. package/docs/components/core/placeholder.md +0 -135
  54. package/docs/components/core/spinner.md +0 -109
  55. package/docs/components/data/datatable.md +0 -416
  56. package/docs/components/interactive/accordion.md +0 -92
  57. package/docs/components/interactive/carousel.md +0 -97
  58. package/docs/components/interactive/collapse.md +0 -105
  59. package/docs/components/interactive/dropdown.md +0 -93
  60. package/docs/components/interactive/modal.md +0 -148
  61. package/docs/components/interactive/offcanvas.md +0 -89
  62. package/docs/components/interactive/toast.md +0 -114
  63. package/docs/components/layout/col.md +0 -123
  64. package/docs/components/layout/container.md +0 -59
  65. package/docs/components/layout/row.md +0 -113
  66. package/docs/components/list/list-group.md +0 -221
  67. package/docs/components/navigation/breadcrumb.md +0 -116
  68. package/docs/components/navigation/nav.md +0 -88
  69. package/docs/components/navigation/navbar.md +0 -106
  70. package/docs/components/navigation/pagination.md +0 -146
  71. package/docs/components/progress/progress.md +0 -182
  72. package/docs/composables/back-button.md +0 -28
  73. package/docs/composables/breakpoints.md +0 -54
  74. package/docs/composables/color-mode.md +0 -141
  75. package/docs/forms/README.md +0 -88
  76. package/docs/forms/form-checkbox.md +0 -50
  77. package/docs/forms/form-datepicker.md +0 -50
  78. package/docs/forms/form-group.md +0 -80
  79. package/docs/forms/form-input.md +0 -55
  80. package/docs/forms/form-radio.md +0 -58
  81. package/docs/forms/form-select.md +0 -54
  82. package/docs/forms/form-spinbutton.md +0 -55
  83. package/docs/forms/form-switch.md +0 -47
  84. package/docs/forms/form-textarea.md +0 -51
  85. package/docs/forms/form-wysiwyg.md +0 -64
  86. package/docs/forms/input-group.md +0 -51
  87. package/docs/forms/validation.md +0 -599
  88. package/llms.txt +0 -422
@@ -1,215 +0,0 @@
1
- # VibeCard
2
-
3
- Flexible content container component for displaying headers, bodies, footers, and images.
4
-
5
- ## Props
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | `variant` | `Variant` | `undefined` | Background color variant |
10
- | `border` | `Variant` | `undefined` | Border color variant |
11
- | `textVariant` | `Variant` | `undefined` | Text color variant |
12
- | `tag` | `String` | `'div'` | HTML tag to render |
13
- | `title` | `String` | `undefined` | Card title |
14
- | `body` | `String` | `undefined` | Card body text |
15
- | `header` | `String` | `undefined` | Card header text |
16
- | `footer` | `String` | `undefined` | Card footer text |
17
- | `imgSrc` | `String` | `undefined` | Image URL |
18
- | `imgAlt` | `String` | `''` | Image alt text |
19
- | `imgTop` | `Boolean` | `true` | Display image at top |
20
- | `imgBottom` | `Boolean` | `false` | Display image at bottom |
21
-
22
- ## Slots
23
-
24
- | Slot | Description |
25
- |------|-------------|
26
- | `default` | Additional body content |
27
- | `header` | Custom header content |
28
- | `title` | Custom title content |
29
- | `body` | Custom body content |
30
- | `footer` | Custom footer content |
31
-
32
- ## Usage
33
-
34
- ### Basic Card
35
-
36
- ```vue
37
- <template>
38
- <VibeCard
39
- title="Card Title"
40
- body="This is the card body text. Quick and easy!"
41
- />
42
- </template>
43
- ```
44
-
45
- ### Card with Header and Footer
46
-
47
- ```vue
48
- <template>
49
- <VibeCard
50
- header="Featured"
51
- title="Special title treatment"
52
- body="With supporting text below as a natural lead-in."
53
- footer="2 days ago"
54
- />
55
- </template>
56
- ```
57
-
58
- ### Card with Image
59
-
60
- ```vue
61
- <template>
62
- <VibeCard
63
- img-src="/path/to/image.jpg"
64
- img-alt="Card image"
65
- title="Card with Image"
66
- body="This card has an image at the top."
67
- />
68
- </template>
69
- ```
70
-
71
- ### Colored Cards
72
-
73
- ```vue
74
- <template>
75
- <div>
76
- <VibeCard
77
- variant="primary"
78
- text-variant="white"
79
- title="Primary Card"
80
- body="Card with primary background."
81
- />
82
-
83
- <VibeCard
84
- variant="success"
85
- text-variant="white"
86
- title="Success Card"
87
- body="Card with success background."
88
- />
89
- </div>
90
- </template>
91
- ```
92
-
93
- ### Border Variants
94
-
95
- ```vue
96
- <template>
97
- <div>
98
- <VibeCard
99
- border="primary"
100
- title="Primary Border"
101
- body="Card with primary border."
102
- />
103
-
104
- <VibeCard
105
- border="danger"
106
- title="Danger Border"
107
- body="Card with danger border."
108
- />
109
- </div>
110
- </template>
111
- ```
112
-
113
- ### Custom Content with Slots
114
-
115
- Use named slots for complex content:
116
-
117
- ```vue
118
- <template>
119
- <VibeCard>
120
- <template #header>
121
- <strong>Featured</strong>
122
- </template>
123
-
124
- <template #title>
125
- Special Title Treatment
126
- </template>
127
-
128
- <template #body>
129
- <p>With supporting text below as a natural lead-in.</p>
130
- </template>
131
-
132
- <!-- Additional body content via default slot -->
133
- <VibeButton variant="primary">Go somewhere</VibeButton>
134
-
135
- <template #footer>
136
- <small class="text-muted">Last updated 3 mins ago</small>
137
- </template>
138
- </VibeCard>
139
- </template>
140
- ```
141
-
142
- ### Horizontal Card
143
-
144
- Use the default slot with Bootstrap grid:
145
-
146
- ```vue
147
- <template>
148
- <VibeCard>
149
- <div class="row g-0">
150
- <div class="col-md-4">
151
- <img src="/path/to/image.jpg" alt="..." class="card-img">
152
- </div>
153
- <div class="col-md-8">
154
- <div class="card-body">
155
- <h5 class="card-title">Horizontal Card</h5>
156
- <p class="card-text">
157
- This is a wider card with supporting text.
158
- </p>
159
- <p class="card-text">
160
- <small class="text-muted">Last updated 3 mins ago</small>
161
- </p>
162
- </div>
163
- </div>
164
- </div>
165
- </VibeCard>
166
- </template>
167
- ```
168
-
169
- ### Card Grid
170
-
171
- ```vue
172
- <template>
173
- <div class="row row-cols-1 row-cols-md-3 g-4">
174
- <div class="col">
175
- <VibeCard
176
- img-src="/path/to/image1.jpg"
177
- img-alt="Card 1"
178
- title="Card 1"
179
- body="Card content here."
180
- />
181
- </div>
182
- <div class="col">
183
- <VibeCard
184
- img-src="/path/to/image2.jpg"
185
- img-alt="Card 2"
186
- title="Card 2"
187
- body="Card content here."
188
- />
189
- </div>
190
- <div class="col">
191
- <VibeCard
192
- img-src="/path/to/image3.jpg"
193
- img-alt="Card 3"
194
- title="Card 3"
195
- body="Card content here."
196
- />
197
- </div>
198
- </div>
199
- </template>
200
- ```
201
-
202
- ## Bootstrap CSS Classes
203
-
204
- - `.card`
205
- - `.card-header`
206
- - `.card-body`
207
- - `.card-footer`
208
- - `.card-img-top`
209
- - `.card-img-bottom`
210
- - `.card-img`
211
- - `.card-title`
212
- - `.card-text`
213
- - `.bg-{variant}`
214
- - `.border-{variant}`
215
- - `.text-{variant}`
@@ -1,72 +0,0 @@
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`
@@ -1,81 +0,0 @@
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)
@@ -1,105 +0,0 @@
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}`
@@ -1,127 +0,0 @@
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`
@@ -1,82 +0,0 @@
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`