@velkymx/vibeui 0.9.0 → 1.1.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/AGENTS.md +44 -0
- package/CLAUDE.md +48 -0
- package/README.md +222 -197
- package/dist/App.vue.d.ts +2 -1
- package/dist/components/HelloWorld.vue.d.ts +2 -1
- package/dist/components/VibeAccordion.vue.d.ts +39 -40
- package/dist/components/VibeAlert.vue.d.ts +21 -37
- package/dist/components/VibeAutocomplete.vue.d.ts +59 -31
- package/dist/components/VibeBadge.vue.d.ts +10 -18
- package/dist/components/VibeBreadcrumb.vue.d.ts +25 -21
- package/dist/components/VibeButton.vue.d.ts +13 -17
- package/dist/components/VibeButtonGroup.vue.d.ts +11 -19
- package/dist/components/VibeCard.vue.d.ts +51 -24
- package/dist/components/VibeCarousel.vue.d.ts +27 -49
- package/dist/components/VibeChartBar.vue.d.ts +61 -0
- package/dist/components/VibeChartLine.vue.d.ts +70 -0
- package/dist/components/VibeChartPie.vue.d.ts +34 -0
- package/dist/components/VibeCloseButton.vue.d.ts +9 -7
- package/dist/components/VibeCol.vue.d.ts +9 -17
- package/dist/components/VibeCollapse.vue.d.ts +24 -32
- package/dist/components/VibeContainer.vue.d.ts +9 -17
- package/dist/components/VibeDataTable.vue.d.ts +122 -63
- package/dist/components/VibeDatePicker.vue.d.ts +4 -6
- package/dist/components/VibeDraggable.vue.d.ts +9 -13
- package/dist/components/VibeDropdown.vue.d.ts +46 -43
- package/dist/components/VibeDroppable.vue.d.ts +9 -13
- package/dist/components/VibeFileInput.vue.d.ts +14 -20
- package/dist/components/VibeFormCheckbox.vue.d.ts +30 -22
- package/dist/components/VibeFormDatepicker.vue.d.ts +27 -30
- package/dist/components/VibeFormErrorSummary.vue.d.ts +17 -0
- package/dist/components/VibeFormGroup.vue.d.ts +10 -13
- package/dist/components/VibeFormInput.vue.d.ts +60 -25
- package/dist/components/VibeFormRadio.vue.d.ts +23 -24
- package/dist/components/VibeFormSelect.vue.d.ts +28 -34
- package/dist/components/VibeFormSpinbutton.vue.d.ts +31 -34
- package/dist/components/VibeFormSwitch.vue.d.ts +22 -23
- package/dist/components/VibeFormTextarea.vue.d.ts +24 -25
- package/dist/components/VibeFormWysiwyg.vue.d.ts +23 -22
- package/dist/components/VibeHero.vue.d.ts +117 -0
- package/dist/components/VibeIcon.vue.d.ts +27 -7
- package/dist/components/VibeInputGroup.vue.d.ts +12 -14
- package/dist/components/VibeLink.vue.d.ts +14 -18
- package/dist/components/VibeListGroup.vue.d.ts +26 -22
- package/dist/components/VibeModal.vue.d.ts +47 -45
- package/dist/components/VibeNav.vue.d.ts +40 -20
- package/dist/components/VibeNavbar.vue.d.ts +12 -19
- package/dist/components/VibeNavbarBrand.vue.d.ts +9 -17
- package/dist/components/VibeNavbarNav.vue.d.ts +52 -33
- package/dist/components/VibeNavbarToggle.vue.d.ts +7 -5
- package/dist/components/VibeOffcanvas.vue.d.ts +28 -43
- package/dist/components/VibePagination.vue.d.ts +38 -29
- package/dist/components/VibePlaceholder.vue.d.ts +9 -17
- package/dist/components/VibePopover.vue.d.ts +17 -40
- package/dist/components/VibeProgress.vue.d.ts +13 -21
- package/dist/components/VibeResizable.vue.d.ts +10 -14
- package/dist/components/VibeRow.vue.d.ts +9 -17
- package/dist/components/VibeScrollspy.vue.d.ts +37 -25
- package/dist/components/VibeSkeleton.vue.d.ts +2 -1
- package/dist/components/VibeSlider.vue.d.ts +4 -5
- package/dist/components/VibeSortable.vue.d.ts +37 -18
- package/dist/components/VibeSpinner.vue.d.ts +4 -7
- package/dist/components/VibeStepper.vue.d.ts +32 -31
- package/dist/components/VibeTab.vue.d.ts +7 -11
- package/dist/components/VibeTabContent.vue.d.ts +13 -31
- package/dist/components/VibeTabs.vue.d.ts +9 -13
- package/dist/components/VibeToast.vue.d.ts +31 -44
- package/dist/components/VibeToastHost.vue.d.ts +2 -1
- package/dist/components/VibeTooltip.vue.d.ts +16 -39
- package/dist/components/chart/chartColors.d.ts +3 -0
- package/dist/components/chart/chartResize.d.ts +2 -0
- package/dist/components/chart/chartTooltip.d.ts +2 -0
- package/dist/components/chart/chartTypes.d.ts +6 -0
- package/dist/components/chart/drawBar.d.ts +5 -0
- package/dist/components/chart/drawLine.d.ts +18 -0
- package/dist/components/chart/drawPie.d.ts +4 -0
- package/dist/components/dndStore.d.ts +1 -0
- package/dist/components/index.d.ts +6 -1
- package/dist/composables/useBreakpoints.d.ts +1 -0
- package/dist/composables/useColorMode.d.ts +1 -1
- package/dist/composables/useId.d.ts +1 -4
- package/dist/directives/vTooltip.d.ts +2 -3
- package/dist/injectionKeys.d.ts +34 -0
- package/dist/purify.es-eYghtX9j.mjs +735 -0
- package/dist/types.d.ts +23 -2
- package/dist/utils/routeKey.d.ts +11 -0
- package/dist/utils/safeCss.d.ts +16 -0
- package/dist/utils/safeHref.d.ts +7 -0
- package/dist/utils/sanitizeHtml.d.ts +13 -0
- package/dist/vibeui.css +2 -1
- package/dist/vibeui.es.js +8527 -5855
- package/dist/vibeui.umd.js +3 -1
- package/docs/README.md +225 -0
- package/docs/components/advanced/popover.md +125 -0
- package/docs/components/advanced/scrollspy.md +106 -0
- package/docs/components/advanced/tooltip.md +90 -0
- package/docs/components/card/card.md +223 -0
- package/docs/components/charts/chart-bar.md +129 -0
- package/docs/components/charts/chart-line.md +136 -0
- package/docs/components/charts/chart-pie.md +102 -0
- package/docs/components/core/alert.md +94 -0
- package/docs/components/core/badge.md +75 -0
- package/docs/components/core/button-group.md +99 -0
- package/docs/components/core/button.md +145 -0
- package/docs/components/core/close-button.md +82 -0
- package/docs/components/core/link.md +79 -0
- package/docs/components/core/placeholder.md +129 -0
- package/docs/components/core/skeleton.md +40 -0
- package/docs/components/core/spinner.md +103 -0
- package/docs/components/data/datatable.md +437 -0
- package/docs/components/hero/hero.md +65 -0
- package/docs/components/interactive/accordion.md +121 -0
- package/docs/components/interactive/carousel.md +112 -0
- package/docs/components/interactive/collapse.md +106 -0
- package/docs/components/interactive/date-picker.md +78 -0
- package/docs/components/interactive/draggable.md +91 -0
- package/docs/components/interactive/dropdown.md +129 -0
- package/docs/components/interactive/modal.md +151 -0
- package/docs/components/interactive/offcanvas.md +92 -0
- package/docs/components/interactive/resizable.md +73 -0
- package/docs/components/interactive/slider.md +57 -0
- package/docs/components/interactive/sortable.md +52 -0
- package/docs/components/interactive/stepper.md +83 -0
- package/docs/components/interactive/tabs.md +66 -0
- package/docs/components/interactive/toast.md +177 -0
- package/docs/components/layout/col.md +117 -0
- package/docs/components/layout/container.md +53 -0
- package/docs/components/layout/row.md +107 -0
- package/docs/components/list/list-group.md +225 -0
- package/docs/components/navigation/breadcrumb.md +120 -0
- package/docs/components/navigation/nav.md +151 -0
- package/docs/components/navigation/navbar.md +114 -0
- package/docs/components/navigation/pagination.md +163 -0
- package/docs/components/progress/progress.md +188 -0
- package/docs/composables/back-button.md +28 -0
- package/docs/composables/breakpoints.md +54 -0
- package/docs/composables/color-mode.md +179 -0
- package/docs/composables/use-form.md +78 -0
- package/docs/composables/use-position.md +68 -0
- package/docs/composables/use-toast.md +91 -0
- package/docs/directives/v-tooltip.md +58 -0
- package/docs/forms/README.md +87 -0
- package/docs/forms/autocomplete.md +96 -0
- package/docs/forms/file-input.md +97 -0
- package/docs/forms/form-checkbox.md +100 -0
- package/docs/forms/form-datepicker.md +80 -0
- package/docs/forms/form-error-summary.md +96 -0
- package/docs/forms/form-group.md +118 -0
- package/docs/forms/form-input.md +140 -0
- package/docs/forms/form-radio.md +82 -0
- package/docs/forms/form-select.md +98 -0
- package/docs/forms/form-spinbutton.md +94 -0
- package/docs/forms/form-switch.md +75 -0
- package/docs/forms/form-textarea.md +82 -0
- package/docs/forms/form-wysiwyg.md +99 -0
- package/docs/forms/input-group.md +70 -0
- package/docs/forms/validation.md +213 -0
- package/docs/getting-started/starter-template.md +136 -0
- package/docs/superpowers/plans/2026-05-12-vibe-charts.md +1999 -0
- package/docs/superpowers/plans/2026-05-29-e2e-browser-testing.md +615 -0
- package/docs/superpowers/specs/2026-05-12-charting-design.md +185 -0
- package/docs/superpowers/specs/2026-05-29-e2e-browser-testing-design.md +168 -0
- package/docs/utilities/position.md +82 -0
- package/docs/versioning.md +57 -0
- package/examples/README.md +201 -0
- package/examples/album.html +262 -0
- package/examples/blog.html +166 -0
- package/examples/carousel.html +114 -0
- package/examples/checkout.html +275 -0
- package/examples/cover.html +89 -0
- package/examples/dashboard.html +156 -0
- package/examples/index.html +129 -0
- package/examples/jumbotron.html +56 -0
- package/examples/mobile-dashboard.html +138 -0
- package/examples/pricing.html +172 -0
- package/examples/product.html +145 -0
- package/examples/sidebars.html +166 -0
- package/examples/sign-in.html +119 -0
- package/examples/starter.html +314 -0
- package/examples/sticky-footer-navbar.html +70 -0
- package/examples/sticky-footer.html +60 -0
- package/examples/test-simple.html +91 -0
- package/llms.txt +801 -0
- package/package.json +44 -14
- package/dist/types/index.d.ts +0 -6
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
## Slots
|
|
15
|
+
|
|
16
|
+
| Slot | Description |
|
|
17
|
+
|------|-------------|
|
|
18
|
+
| `default` | Badge content |
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Basic Badge
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<template>
|
|
26
|
+
<VibeButton variant="primary">
|
|
27
|
+
Notifications <VibeBadge variant="secondary">4</VibeBadge>
|
|
28
|
+
</VibeButton>
|
|
29
|
+
</template>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Pill Badges
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<template>
|
|
36
|
+
<div>
|
|
37
|
+
<VibeBadge variant="primary" pill>Primary</VibeBadge>
|
|
38
|
+
<VibeBadge variant="success" pill>Success</VibeBadge>
|
|
39
|
+
<VibeBadge variant="danger" pill>Danger</VibeBadge>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Link Badges
|
|
45
|
+
|
|
46
|
+
```vue
|
|
47
|
+
<template>
|
|
48
|
+
<VibeBadge tag="a" href="#" variant="primary">Link Badge</VibeBadge>
|
|
49
|
+
</template>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### All Variants
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<div>
|
|
57
|
+
<VibeBadge variant="primary">Primary</VibeBadge>
|
|
58
|
+
<VibeBadge variant="secondary">Secondary</VibeBadge>
|
|
59
|
+
<VibeBadge variant="success">Success</VibeBadge>
|
|
60
|
+
<VibeBadge variant="danger">Danger</VibeBadge>
|
|
61
|
+
<VibeBadge variant="warning">Warning</VibeBadge>
|
|
62
|
+
<VibeBadge variant="info">Info</VibeBadge>
|
|
63
|
+
<VibeBadge variant="light">Light</VibeBadge>
|
|
64
|
+
<VibeBadge variant="dark">Dark</VibeBadge>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Bootstrap CSS Classes
|
|
70
|
+
|
|
71
|
+
- `.badge`
|
|
72
|
+
- `.bg-{variant}`
|
|
73
|
+
- `.bg-{variant}-subtle` (when `subtle` is true)
|
|
74
|
+
- `.text-{variant}-emphasis` (when `subtle` is true)
|
|
75
|
+
- `.rounded-pill` (when `pill` is true)
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
## Slots
|
|
15
|
+
|
|
16
|
+
| Slot | Description |
|
|
17
|
+
|------|-------------|
|
|
18
|
+
| `default` | Button group content (typically VibeButton components) |
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Basic Button Group
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<template>
|
|
26
|
+
<VibeButtonGroup>
|
|
27
|
+
<VibeButton variant="primary">Left</VibeButton>
|
|
28
|
+
<VibeButton variant="primary">Middle</VibeButton>
|
|
29
|
+
<VibeButton variant="primary">Right</VibeButton>
|
|
30
|
+
</VibeButtonGroup>
|
|
31
|
+
</template>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Button Toolbar
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<template>
|
|
38
|
+
<div>
|
|
39
|
+
<VibeButtonGroup aria-label="First group">
|
|
40
|
+
<VibeButton variant="secondary">1</VibeButton>
|
|
41
|
+
<VibeButton variant="secondary">2</VibeButton>
|
|
42
|
+
<VibeButton variant="secondary">3</VibeButton>
|
|
43
|
+
</VibeButtonGroup>
|
|
44
|
+
|
|
45
|
+
<VibeButtonGroup aria-label="Second group">
|
|
46
|
+
<VibeButton variant="secondary">4</VibeButton>
|
|
47
|
+
<VibeButton variant="secondary">5</VibeButton>
|
|
48
|
+
</VibeButtonGroup>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Vertical Button Group
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<template>
|
|
57
|
+
<VibeButtonGroup vertical>
|
|
58
|
+
<VibeButton variant="primary">Button 1</VibeButton>
|
|
59
|
+
<VibeButton variant="primary">Button 2</VibeButton>
|
|
60
|
+
<VibeButton variant="primary">Button 3</VibeButton>
|
|
61
|
+
</VibeButtonGroup>
|
|
62
|
+
</template>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Sized Button Groups
|
|
66
|
+
|
|
67
|
+
```vue
|
|
68
|
+
<template>
|
|
69
|
+
<div>
|
|
70
|
+
<VibeButtonGroup size="sm">
|
|
71
|
+
<VibeButton variant="primary">Small</VibeButton>
|
|
72
|
+
<VibeButton variant="primary">Group</VibeButton>
|
|
73
|
+
</VibeButtonGroup>
|
|
74
|
+
|
|
75
|
+
<VibeButtonGroup size="lg">
|
|
76
|
+
<VibeButton variant="primary">Large</VibeButton>
|
|
77
|
+
<VibeButton variant="primary">Group</VibeButton>
|
|
78
|
+
</VibeButtonGroup>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Mixed Button Types
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<template>
|
|
87
|
+
<VibeButtonGroup>
|
|
88
|
+
<VibeButton variant="danger">Delete</VibeButton>
|
|
89
|
+
<VibeButton variant="warning" outline>Archive</VibeButton>
|
|
90
|
+
<VibeButton variant="success">Save</VibeButton>
|
|
91
|
+
</VibeButtonGroup>
|
|
92
|
+
</template>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Bootstrap CSS Classes
|
|
96
|
+
|
|
97
|
+
- `.btn-group`
|
|
98
|
+
- `.btn-group-vertical`
|
|
99
|
+
- `.btn-group-{size}`
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
## Accessibility
|
|
20
|
+
|
|
21
|
+
**Disabled contrast (WCAG 1.4.3):** The disabled state overrides Bootstrap's default `opacity: 0.65` fade with full-opacity body tokens (`--bs-body-color` / `--bs-tertiary-bg`), keeping label contrast ≥ 4.5:1 in both light and dark mode.
|
|
22
|
+
|
|
23
|
+
**Icon-only buttons (WCAG 4.1.2):** A button whose slot contains only an icon (no visible text) must have an `aria-label` or `aria-labelledby` attribute so screen readers can announce its purpose. In development mode, VibeButton logs a `console.warn` when this is missing.
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<!-- correct -->
|
|
27
|
+
<VibeButton aria-label="Delete item">
|
|
28
|
+
<i class="bi bi-trash" aria-hidden="true" />
|
|
29
|
+
</VibeButton>
|
|
30
|
+
|
|
31
|
+
<!-- incorrect — no accessible name -->
|
|
32
|
+
<VibeButton>
|
|
33
|
+
<i class="bi bi-trash" />
|
|
34
|
+
</VibeButton>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Events
|
|
38
|
+
|
|
39
|
+
| Event | Payload | Description |
|
|
40
|
+
|-------|---------|-------------|
|
|
41
|
+
| `click` | `MouseEvent` | Emitted when button is clicked (unless disabled) |
|
|
42
|
+
| `component-error` | `ComponentError` | Emitted when an error occurs |
|
|
43
|
+
|
|
44
|
+
## Slots
|
|
45
|
+
|
|
46
|
+
| Slot | Description |
|
|
47
|
+
|------|-------------|
|
|
48
|
+
| `default` | Button content |
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
### Basic Buttons
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<div>
|
|
57
|
+
<VibeButton variant="primary">Primary</VibeButton>
|
|
58
|
+
<VibeButton variant="secondary">Secondary</VibeButton>
|
|
59
|
+
<VibeButton variant="success">Success</VibeButton>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Outline Buttons
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<template>
|
|
68
|
+
<div>
|
|
69
|
+
<VibeButton variant="primary" outline>Outline Primary</VibeButton>
|
|
70
|
+
<VibeButton variant="danger" outline>Outline Danger</VibeButton>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Button Sizes
|
|
76
|
+
|
|
77
|
+
```vue
|
|
78
|
+
<template>
|
|
79
|
+
<div>
|
|
80
|
+
<VibeButton variant="primary" size="sm">Small</VibeButton>
|
|
81
|
+
<VibeButton variant="primary">Normal</VibeButton>
|
|
82
|
+
<VibeButton variant="primary" size="lg">Large</VibeButton>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Disabled State
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<template>
|
|
91
|
+
<VibeButton variant="primary" disabled>Disabled Button</VibeButton>
|
|
92
|
+
</template>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Link Buttons
|
|
96
|
+
|
|
97
|
+
```vue
|
|
98
|
+
<template>
|
|
99
|
+
<div>
|
|
100
|
+
<!-- Anchor link -->
|
|
101
|
+
<VibeButton variant="primary" href="https://example.com">
|
|
102
|
+
External Link
|
|
103
|
+
</VibeButton>
|
|
104
|
+
|
|
105
|
+
<!-- Router link (requires Vue Router) -->
|
|
106
|
+
<VibeButton variant="secondary" :to="{ name: 'home' }">
|
|
107
|
+
Home
|
|
108
|
+
</VibeButton>
|
|
109
|
+
</div>
|
|
110
|
+
</template>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Form Submit
|
|
114
|
+
|
|
115
|
+
```vue
|
|
116
|
+
<template>
|
|
117
|
+
<form @submit.prevent="handleSubmit">
|
|
118
|
+
<VibeButton type="submit" variant="success">Submit Form</VibeButton>
|
|
119
|
+
</form>
|
|
120
|
+
</template>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### With Click Handler
|
|
124
|
+
|
|
125
|
+
```vue
|
|
126
|
+
<script setup>
|
|
127
|
+
const handleClick = () => {
|
|
128
|
+
console.log('Button clicked!')
|
|
129
|
+
}
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<template>
|
|
133
|
+
<VibeButton variant="primary" @click="handleClick">
|
|
134
|
+
Click Me
|
|
135
|
+
</VibeButton>
|
|
136
|
+
</template>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Bootstrap CSS Classes
|
|
140
|
+
|
|
141
|
+
- `.btn`
|
|
142
|
+
- `.btn-{variant}` or `.btn-outline-{variant}`
|
|
143
|
+
- `.btn-{size}`
|
|
144
|
+
- `.active`
|
|
145
|
+
- `.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` | `MouseEvent` | Emitted when button is clicked (unless disabled) |
|
|
18
|
+
| `component-error` | `ComponentError` | Emitted when an error occurs |
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Basic Close Button
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<script setup>
|
|
26
|
+
const handleClose = () => {
|
|
27
|
+
console.log('Closed!')
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<VibeCloseButton @click="handleClose" />
|
|
33
|
+
</template>
|
|
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,79 @@
|
|
|
1
|
+
# VibeLink
|
|
2
|
+
|
|
3
|
+
A flexible link component that supports Bootstrap 5.3's link color and underline utilities, plus Vue Router integration.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `tag` | `Tag \| 'a'` | `'a'` | HTML tag to render (ignored when `to` is set — renders a router-link) |
|
|
10
|
+
| `href` | `String` | `undefined` | URL for standard links. Sanitized — see Important Notes. |
|
|
11
|
+
| `to` | `String \| Object` | `undefined` | Router link destination (renders `router-link`) |
|
|
12
|
+
| `variant` | `Variant` | `undefined` | Link color variant (`primary`, `success`, etc.) |
|
|
13
|
+
| `underline` | `Boolean \| '0'` | `true` | Underline behavior. `false` or `'0'` removes the underline. |
|
|
14
|
+
| `underlineVariant` | `Variant` | `undefined` | Color of the underline |
|
|
15
|
+
| `underlineOpacity` | `0 \| 10 \| 25 \| 50 \| 75 \| 100` | `undefined` | Opacity of the underline |
|
|
16
|
+
| `offset` | `1 \| 2 \| 3` | `undefined` | Underline offset from text |
|
|
17
|
+
| `opacity` | `10 \| 25 \| 50 \| 75 \| 100` | `undefined` | Link text opacity |
|
|
18
|
+
| `focusRing` | `Boolean` | `false` | Enable the Bootstrap 5.3 focus-ring helper |
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| Slot | Description |
|
|
23
|
+
|------|-------------|
|
|
24
|
+
| `default` | Link content |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Basic Link
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<template>
|
|
32
|
+
<VibeLink href="https://example.com">Standard Link</VibeLink>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Colored Link Without Underline
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<template>
|
|
40
|
+
<VibeLink variant="danger" underline="0">Link without underline</VibeLink>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Underline Styling
|
|
45
|
+
|
|
46
|
+
```vue
|
|
47
|
+
<template>
|
|
48
|
+
<VibeLink
|
|
49
|
+
href="https://example.com"
|
|
50
|
+
underline-variant="success"
|
|
51
|
+
:underline-opacity="50"
|
|
52
|
+
:offset="2"
|
|
53
|
+
>
|
|
54
|
+
Styled underline
|
|
55
|
+
</VibeLink>
|
|
56
|
+
</template>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Router Link
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<template>
|
|
63
|
+
<VibeLink :to="{ name: 'home' }">Home</VibeLink>
|
|
64
|
+
</template>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Important Notes
|
|
68
|
+
|
|
69
|
+
**`href` sanitization:** The `href` prop is sanitized. Only `https://`/`http://` URLs, absolute paths (`/path`), relative paths (`./`, `../`), and anchors (`#section`) are allowed. Dangerous values such as `javascript:`, `data:`, `vbscript:`, and protocol-relative `//host` URLs are stripped — the `href` attribute is omitted entirely. Use `to` for in-app navigation via Vue Router.
|
|
70
|
+
|
|
71
|
+
## Bootstrap CSS Classes
|
|
72
|
+
|
|
73
|
+
- `.link-{variant}`
|
|
74
|
+
- `.link-underline-opacity-0` (when `underline` is `false`/`'0'`)
|
|
75
|
+
- `.link-underline-{variant}`
|
|
76
|
+
- `.link-underline-opacity-{value}`
|
|
77
|
+
- `.link-offset-{value}`
|
|
78
|
+
- `.link-opacity-{value}`
|
|
79
|
+
- `.focus-ring`
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
## Slots
|
|
16
|
+
|
|
17
|
+
| Slot | Description |
|
|
18
|
+
|------|-------------|
|
|
19
|
+
| `default` | Placeholder content (typically empty) |
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
### Basic Placeholder
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<template>
|
|
27
|
+
<VibePlaceholder width="75" />
|
|
28
|
+
</template>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Placeholder Card
|
|
32
|
+
|
|
33
|
+
```vue
|
|
34
|
+
<template>
|
|
35
|
+
<VibeCard>
|
|
36
|
+
<template #title>
|
|
37
|
+
<VibePlaceholder width="100" />
|
|
38
|
+
</template>
|
|
39
|
+
<template #body>
|
|
40
|
+
<VibePlaceholder width="100" />
|
|
41
|
+
<VibePlaceholder width="100" />
|
|
42
|
+
<VibePlaceholder width="75" />
|
|
43
|
+
</template>
|
|
44
|
+
</VibeCard>
|
|
45
|
+
</template>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### With Glow Animation
|
|
49
|
+
|
|
50
|
+
```vue
|
|
51
|
+
<template>
|
|
52
|
+
<div>
|
|
53
|
+
<VibePlaceholder animation="glow" width="100" />
|
|
54
|
+
<VibePlaceholder animation="glow" width="75" />
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### With Wave Animation
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<template>
|
|
63
|
+
<div>
|
|
64
|
+
<VibePlaceholder animation="wave" width="100" />
|
|
65
|
+
<VibePlaceholder animation="wave" width="90" />
|
|
66
|
+
<VibePlaceholder animation="wave" width="80" />
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Colored Placeholders
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<template>
|
|
75
|
+
<div>
|
|
76
|
+
<VibePlaceholder variant="primary" width="100" />
|
|
77
|
+
<VibePlaceholder variant="success" width="75" />
|
|
78
|
+
<VibePlaceholder variant="danger" width="50" />
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Sizes
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<template>
|
|
87
|
+
<div>
|
|
88
|
+
<VibePlaceholder size="lg" width="100" />
|
|
89
|
+
<VibePlaceholder width="100" />
|
|
90
|
+
<VibePlaceholder size="sm" width="100" />
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Loading State Example
|
|
96
|
+
|
|
97
|
+
```vue
|
|
98
|
+
<script setup>
|
|
99
|
+
import { ref, onMounted } from 'vue'
|
|
100
|
+
|
|
101
|
+
const loading = ref(true)
|
|
102
|
+
const data = ref(null)
|
|
103
|
+
|
|
104
|
+
onMounted(async () => {
|
|
105
|
+
// Simulate API call
|
|
106
|
+
await new Promise(resolve => setTimeout(resolve, 2000))
|
|
107
|
+
data.value = { title: 'Article Title', content: 'Article content...' }
|
|
108
|
+
loading.value = false
|
|
109
|
+
})
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
<VibeCard v-if="loading">
|
|
114
|
+
<template #body>
|
|
115
|
+
<VibePlaceholder animation="glow" width="100" />
|
|
116
|
+
<VibePlaceholder animation="glow" width="100" />
|
|
117
|
+
<VibePlaceholder animation="glow" width="75" />
|
|
118
|
+
</template>
|
|
119
|
+
</VibeCard>
|
|
120
|
+
<VibeCard v-else :title="data.title" :body="data.content" />
|
|
121
|
+
</template>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Bootstrap CSS Classes
|
|
125
|
+
|
|
126
|
+
- `.placeholder`
|
|
127
|
+
- `.bg-{variant}`
|
|
128
|
+
- `.placeholder-{size}`
|
|
129
|
+
- `.placeholder-{animation}`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# VibeSkeleton
|
|
2
|
+
|
|
3
|
+
Loading placeholder with shimmer animation. Drop-in replacement for ad-hoc empty states while data loads.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `variant` | `'text' \| 'rect' \| 'circle' \| 'card'` | `'text'` | Shape preset |
|
|
10
|
+
| `width` | `String \| Number` | `undefined` | CSS dimension. Number = pixels. |
|
|
11
|
+
| `height` | `String \| Number` | `undefined` | CSS dimension. Number = pixels. |
|
|
12
|
+
| `lines` | `Number` | `1` | Lines rendered when `variant="text"` |
|
|
13
|
+
| `animated` | `Boolean` | `true` | Shimmer animation. Respects `prefers-reduced-motion`. |
|
|
14
|
+
|
|
15
|
+
## Variants
|
|
16
|
+
|
|
17
|
+
- **`text`**: stack of `lines` placeholder rows. Last line is shorter (60%).
|
|
18
|
+
- **`rect`**: rectangular block.
|
|
19
|
+
- **`circle`**: circular block. Setting `width` auto-applies same `height` for 1:1.
|
|
20
|
+
- **`card`**: rectangular preview area + 2 text lines (image-card pattern).
|
|
21
|
+
|
|
22
|
+
## Accessibility
|
|
23
|
+
|
|
24
|
+
Each skeleton element exposes `role="status"` and `aria-busy="true"` so assistive tech announces a loading state.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<!-- 3 placeholder lines while a paragraph loads -->
|
|
30
|
+
<VibeSkeleton :lines="3" />
|
|
31
|
+
|
|
32
|
+
<!-- 64px avatar placeholder -->
|
|
33
|
+
<VibeSkeleton variant="circle" :width="64" />
|
|
34
|
+
|
|
35
|
+
<!-- 16:9 image area then text -->
|
|
36
|
+
<VibeSkeleton variant="card" />
|
|
37
|
+
|
|
38
|
+
<!-- Disable shimmer for low-power UI -->
|
|
39
|
+
<VibeSkeleton variant="rect" :width="200" :height="100" :animated="false" />
|
|
40
|
+
```
|