@velkymx/vibeui 0.8.2 → 1.0.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/AGENTS.md +44 -0
- package/README.md +245 -58
- package/dist/purify.es-1D-VntFD.mjs +679 -0
- package/dist/src/App.vue.d.ts +3 -0
- package/dist/src/components/HelloWorld.vue.d.ts +6 -0
- package/dist/src/components/VibeAccordion.vue.d.ts +89 -0
- package/dist/{components → src/components}/VibeAlert.vue.d.ts +24 -30
- package/dist/src/components/VibeAutocomplete.vue.d.ts +74 -0
- package/dist/{components → src/components}/VibeBadge.vue.d.ts +10 -18
- package/dist/src/components/VibeBreadcrumb.vue.d.ts +51 -0
- package/dist/{components → src/components}/VibeButton.vue.d.ts +16 -20
- package/dist/{components → src/components}/VibeButtonGroup.vue.d.ts +10 -18
- package/dist/{components → src/components}/VibeCard.vue.d.ts +51 -24
- package/dist/{components → src/components}/VibeCarousel.vue.d.ts +27 -49
- package/dist/src/components/VibeChartBar.vue.d.ts +61 -0
- package/dist/src/components/VibeChartLine.vue.d.ts +70 -0
- package/dist/src/components/VibeChartPie.vue.d.ts +34 -0
- package/dist/{components → src/components}/VibeCloseButton.vue.d.ts +9 -7
- package/dist/{components → src/components}/VibeCol.vue.d.ts +9 -17
- package/dist/src/components/VibeCollapse.vue.d.ts +76 -0
- package/dist/src/components/VibeContainer.vue.d.ts +36 -0
- package/dist/src/components/VibeDataTable.vue.d.ts +131 -0
- package/dist/src/components/VibeDatePicker.vue.d.ts +120 -0
- package/dist/src/components/VibeDraggable.vue.d.ts +77 -0
- package/dist/{components → src/components}/VibeDropdown.vue.d.ts +46 -43
- package/dist/src/components/VibeDroppable.vue.d.ts +70 -0
- package/dist/src/components/VibeFileInput.vue.d.ts +127 -0
- package/dist/{components → src/components}/VibeFormCheckbox.vue.d.ts +30 -22
- package/dist/{components → src/components}/VibeFormDatepicker.vue.d.ts +27 -30
- package/dist/{components → src/components}/VibeFormGroup.vue.d.ts +11 -14
- package/dist/{components → src/components}/VibeFormInput.vue.d.ts +22 -23
- package/dist/{components → src/components}/VibeFormRadio.vue.d.ts +23 -24
- package/dist/{components → src/components}/VibeFormSelect.vue.d.ts +28 -34
- package/dist/{components → src/components}/VibeFormSpinbutton.vue.d.ts +31 -34
- package/dist/{components → src/components}/VibeFormSwitch.vue.d.ts +22 -23
- package/dist/{components → src/components}/VibeFormTextarea.vue.d.ts +24 -25
- package/dist/{components → src/components}/VibeFormWysiwyg.vue.d.ts +24 -23
- package/dist/src/components/VibeHero.vue.d.ts +108 -0
- package/dist/{components → src/components}/VibeIcon.vue.d.ts +27 -7
- package/dist/{components → src/components}/VibeInputGroup.vue.d.ts +11 -13
- package/dist/{components → src/components}/VibeLink.vue.d.ts +14 -18
- package/dist/{components → src/components}/VibeListGroup.vue.d.ts +26 -22
- package/dist/{components → src/components}/VibeModal.vue.d.ts +29 -45
- package/dist/{components → src/components}/VibeNav.vue.d.ts +40 -20
- package/dist/{components → src/components}/VibeNavbar.vue.d.ts +12 -19
- package/dist/src/components/VibeNavbarBrand.vue.d.ts +34 -0
- package/dist/src/components/VibeNavbarNav.vue.d.ts +80 -0
- package/dist/{components → src/components}/VibeNavbarToggle.vue.d.ts +7 -5
- package/dist/{components → src/components}/VibeOffcanvas.vue.d.ts +28 -43
- package/dist/{components → src/components}/VibePagination.vue.d.ts +38 -29
- package/dist/{components → src/components}/VibePlaceholder.vue.d.ts +9 -17
- package/dist/src/components/VibePopover.vue.d.ts +72 -0
- package/dist/src/components/VibeProgress.vue.d.ts +37 -0
- package/dist/src/components/VibeResizable.vue.d.ts +140 -0
- package/dist/{components → src/components}/VibeRow.vue.d.ts +9 -17
- package/dist/src/components/VibeScrollspy.vue.d.ts +89 -0
- package/dist/src/components/VibeSkeleton.vue.d.ts +54 -0
- package/dist/src/components/VibeSlider.vue.d.ts +77 -0
- package/dist/src/components/VibeSortable.vue.d.ts +59 -0
- package/dist/{components → src/components}/VibeSpinner.vue.d.ts +4 -7
- package/dist/src/components/VibeStepper.vue.d.ts +133 -0
- package/dist/src/components/VibeTab.vue.d.ts +41 -0
- package/dist/src/components/VibeTabContent.vue.d.ts +56 -0
- package/dist/src/components/VibeTabs.vue.d.ts +78 -0
- package/dist/{components → src/components}/VibeToast.vue.d.ts +40 -42
- package/dist/src/components/VibeToastHost.vue.d.ts +16 -0
- package/dist/src/components/VibeTooltip.vue.d.ts +63 -0
- package/dist/src/components/chart/chartColors.d.ts +3 -0
- package/dist/src/components/chart/chartResize.d.ts +2 -0
- package/dist/src/components/chart/chartTooltip.d.ts +2 -0
- package/dist/src/components/chart/chartTypes.d.ts +6 -0
- package/dist/src/components/chart/drawBar.d.ts +5 -0
- package/dist/src/components/chart/drawLine.d.ts +18 -0
- package/dist/src/components/chart/drawPie.d.ts +4 -0
- package/dist/src/components/dndStore.d.ts +7 -0
- package/dist/{components → src/components}/index.d.ts +18 -1
- package/dist/{composables → src/composables}/useBreakpoints.d.ts +1 -0
- package/dist/{composables → src/composables}/useColorMode.d.ts +1 -1
- package/dist/src/composables/useForm.d.ts +22 -0
- package/dist/src/composables/useId.d.ts +2 -0
- package/dist/src/composables/usePosition.d.ts +20 -0
- package/dist/src/composables/useToast.d.ts +52 -0
- package/dist/src/directives/vTooltip.d.ts +24 -0
- package/dist/{index.d.ts → src/index.d.ts} +6 -0
- package/dist/src/injectionKeys.d.ts +28 -0
- package/dist/{types.d.ts → src/types.d.ts} +32 -6
- package/dist/src/utils/safeCss.d.ts +16 -0
- package/dist/src/utils/safeHref.d.ts +7 -0
- package/dist/src/utils/sanitizeHtml.d.ts +13 -0
- package/dist/vibeui.css +2 -1
- package/dist/vibeui.es.js +8351 -3508
- package/dist/vibeui.umd.js +3 -1
- package/docs/README.md +85 -13
- package/docs/components/advanced/popover.md +27 -52
- package/docs/components/advanced/scrollspy.md +57 -15
- package/docs/components/advanced/tooltip.md +26 -47
- package/docs/components/card/card.md +9 -1
- 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 +27 -5
- package/docs/components/core/badge.md +0 -6
- package/docs/components/core/button-group.md +0 -6
- package/docs/components/core/button.md +1 -1
- package/docs/components/core/close-button.md +5 -5
- package/docs/components/core/link.md +60 -17
- package/docs/components/core/placeholder.md +0 -6
- package/docs/components/core/skeleton.md +40 -0
- package/docs/components/core/spinner.md +0 -6
- package/docs/components/data/datatable.md +29 -10
- package/docs/components/hero/hero.md +64 -0
- package/docs/components/interactive/accordion.md +29 -0
- package/docs/components/interactive/carousel.md +19 -4
- package/docs/components/interactive/collapse.md +3 -2
- package/docs/components/interactive/date-picker.md +78 -0
- package/docs/components/interactive/draggable.md +91 -0
- package/docs/components/interactive/dropdown.md +54 -18
- package/docs/components/interactive/modal.md +15 -20
- package/docs/components/interactive/offcanvas.md +4 -1
- 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 +93 -30
- package/docs/components/layout/col.md +0 -6
- package/docs/components/layout/container.md +0 -6
- package/docs/components/layout/row.md +0 -6
- package/docs/components/list/list-group.md +4 -0
- package/docs/components/navigation/breadcrumb.md +4 -0
- package/docs/components/navigation/nav.md +64 -1
- package/docs/components/navigation/navbar.md +2 -0
- package/docs/components/navigation/pagination.md +16 -0
- package/docs/components/progress/progress.md +7 -1
- package/docs/composables/color-mode.md +44 -6
- 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 +60 -61
- package/docs/forms/autocomplete.md +96 -0
- package/docs/forms/file-input.md +97 -0
- package/docs/forms/form-checkbox.md +75 -25
- package/docs/forms/form-datepicker.md +58 -28
- package/docs/forms/form-group.md +79 -44
- package/docs/forms/form-input.md +88 -31
- package/docs/forms/form-radio.md +60 -36
- package/docs/forms/form-select.md +75 -31
- package/docs/forms/form-spinbutton.md +72 -33
- package/docs/forms/form-switch.md +53 -25
- package/docs/forms/form-textarea.md +60 -29
- package/docs/forms/form-wysiwyg.md +73 -38
- package/docs/forms/input-group.md +53 -34
- package/docs/forms/validation.md +135 -521
- 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 +407 -47
- package/package.json +42 -13
- package/dist/App.vue.d.ts +0 -2
- package/dist/components/HelloWorld.vue.d.ts +0 -5
- package/dist/components/VibeAccordion.vue.d.ts +0 -90
- package/dist/components/VibeBreadcrumb.vue.d.ts +0 -47
- package/dist/components/VibeCollapse.vue.d.ts +0 -84
- package/dist/components/VibeContainer.vue.d.ts +0 -44
- package/dist/components/VibeDataTable.vue.d.ts +0 -76
- package/dist/components/VibeNavbarBrand.vue.d.ts +0 -42
- package/dist/components/VibeNavbarNav.vue.d.ts +0 -61
- package/dist/components/VibePopover.vue.d.ts +0 -95
- package/dist/components/VibeProgress.vue.d.ts +0 -45
- package/dist/components/VibeScrollspy.vue.d.ts +0 -77
- package/dist/components/VibeTabContent.vue.d.ts +0 -74
- package/dist/components/VibeTooltip.vue.d.ts +0 -86
- package/dist/composables/useId.d.ts +0 -5
- package/dist/types/index.d.ts +0 -6
- /package/dist/{composables → src/composables}/useBackButton.d.ts +0 -0
- /package/dist/{composables → src/composables}/useFormValidation.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# VibeChartBar
|
|
2
|
+
|
|
3
|
+
Canvas-based bar chart with responsive sizing, interactive tooltips, stacked mode, and Bootstrap-aware color cycling.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `data` | `ChartData` | Required | Chart data: labels array + datasets array |
|
|
10
|
+
| `legend` | `'top' \| 'bottom' \| 'none'` | `'bottom'` | Legend position |
|
|
11
|
+
| `height` | `Number \| String` | `'auto'` | Fixed height in px or CSS string. `'auto'` uses 16:9 aspect ratio |
|
|
12
|
+
| `showAxes` | `Boolean` | `true` | Render X and Y axes |
|
|
13
|
+
| `showGrid` | `Boolean` | `true` | Render horizontal grid lines |
|
|
14
|
+
| `stacked` | `Boolean` | `false` | Stack datasets on top of each other instead of grouping side-by-side |
|
|
15
|
+
|
|
16
|
+
## Data Shape
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
interface ChartData {
|
|
20
|
+
labels: string[] // X-axis category labels
|
|
21
|
+
datasets: ChartDataset[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface ChartDataset {
|
|
25
|
+
label: string // Series name (shown in legend and tooltip)
|
|
26
|
+
data: number[] // One value per label
|
|
27
|
+
color?: string // CSS color string. Defaults to Bootstrap CSS variables cycling through
|
|
28
|
+
// --bs-primary, --bs-success, --bs-danger, --bs-warning, --bs-info, ...
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Import from `@velkymx/vibeui`:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import type { ChartData } from '@velkymx/vibeui'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
### Basic Bar Chart
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<script setup>
|
|
44
|
+
const data = {
|
|
45
|
+
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
|
|
46
|
+
datasets: [
|
|
47
|
+
{ label: 'Orders', data: [34, 52, 48, 61, 44] }
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<VibeChartBar :data="data" />
|
|
54
|
+
</template>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Grouped Bars (Multiple Datasets)
|
|
58
|
+
|
|
59
|
+
```vue
|
|
60
|
+
<template>
|
|
61
|
+
<VibeChartBar :data="{
|
|
62
|
+
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
63
|
+
datasets: [
|
|
64
|
+
{ label: 'Product A', data: [120, 145, 132, 170] },
|
|
65
|
+
{ label: 'Product B', data: [ 80, 95, 88, 105] }
|
|
66
|
+
]
|
|
67
|
+
}" />
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Stacked Bar Chart
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<template>
|
|
75
|
+
<VibeChartBar :data="data" stacked />
|
|
76
|
+
</template>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Fixed Height, Legend at Top
|
|
80
|
+
|
|
81
|
+
```vue
|
|
82
|
+
<template>
|
|
83
|
+
<VibeChartBar :data="data" :height="250" legend="top" />
|
|
84
|
+
</template>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Custom Colors
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<template>
|
|
91
|
+
<VibeChartBar :data="{
|
|
92
|
+
labels: ['A', 'B', 'C'],
|
|
93
|
+
datasets: [
|
|
94
|
+
{ label: 'Wins', data: [8, 5, 7], color: '#2ecc71' },
|
|
95
|
+
{ label: 'Losses', data: [2, 5, 3], color: '#e74c3c' }
|
|
96
|
+
]
|
|
97
|
+
}" />
|
|
98
|
+
</template>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Reactive Data
|
|
102
|
+
|
|
103
|
+
```vue
|
|
104
|
+
<script setup>
|
|
105
|
+
import { ref } from 'vue'
|
|
106
|
+
|
|
107
|
+
const data = ref({
|
|
108
|
+
labels: ['Jan', 'Feb'],
|
|
109
|
+
datasets: [{ label: 'Sales', data: [100, 150] }]
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
function addWeek() {
|
|
113
|
+
data.value.labels.push('Mar')
|
|
114
|
+
data.value.datasets[0].data.push(130)
|
|
115
|
+
}
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<template>
|
|
119
|
+
<VibeChartBar :data="data" />
|
|
120
|
+
<button @click="addWeek">Add Month</button>
|
|
121
|
+
</template>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Notes
|
|
125
|
+
|
|
126
|
+
- **No external dependency.** VibeChartBar draws directly on a `<canvas>` element — no Chart.js or other charting library required.
|
|
127
|
+
- **Color cycling.** When `color` is omitted on a dataset, colors cycle through Bootstrap's CSS variables (`--bs-primary`, `--bs-success`, `--bs-danger`, ...) resolved from the container's computed styles. Colors follow your Bootstrap theme and dark mode automatically.
|
|
128
|
+
- **Responsive.** The canvas resizes via `ResizeObserver` and redraws at device pixel ratio for crisp HiDPI output.
|
|
129
|
+
- **Tooltips.** Hover over any bar to see the category, series name, and value.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# VibeChartLine
|
|
2
|
+
|
|
3
|
+
Canvas-based line chart with responsive sizing, interactive tooltips, and Bootstrap-aware color cycling.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `data` | `ChartData` | Required | Chart data: labels array + datasets array |
|
|
10
|
+
| `legend` | `'top' \| 'bottom' \| 'none'` | `'bottom'` | Legend position |
|
|
11
|
+
| `height` | `Number \| String` | `'auto'` | Fixed height in px or CSS string. `'auto'` uses 16:9 aspect ratio |
|
|
12
|
+
| `showAxes` | `Boolean` | `true` | Render X and Y axes |
|
|
13
|
+
| `showGrid` | `Boolean` | `true` | Render horizontal grid lines |
|
|
14
|
+
| `smooth` | `Boolean` | `false` | Render lines as bezier curves instead of straight segments |
|
|
15
|
+
| `fill` | `Boolean` | `false` | Fill the area under each line |
|
|
16
|
+
|
|
17
|
+
## Data Shape
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
interface ChartData {
|
|
21
|
+
labels: string[] // X-axis labels
|
|
22
|
+
datasets: ChartDataset[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ChartDataset {
|
|
26
|
+
label: string // Series name (shown in legend and tooltip)
|
|
27
|
+
data: number[] // One value per label
|
|
28
|
+
color?: string // CSS color string. Defaults to Bootstrap CSS variables cycling through
|
|
29
|
+
// --bs-primary, --bs-success, --bs-danger, --bs-warning, --bs-info, ...
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Import from `@velkymx/vibeui`:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import type { ChartData } from '@velkymx/vibeui'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### Basic Line Chart
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<script setup>
|
|
45
|
+
import { ref } from 'vue'
|
|
46
|
+
|
|
47
|
+
const data = ref({
|
|
48
|
+
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
|
|
49
|
+
datasets: [
|
|
50
|
+
{ label: 'Revenue', data: [12000, 18000, 15000, 22000, 19000, 27000] }
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<VibeChartLine :data="data" />
|
|
57
|
+
</template>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Multiple Series
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
<template>
|
|
64
|
+
<VibeChartLine :data="{
|
|
65
|
+
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
66
|
+
datasets: [
|
|
67
|
+
{ label: 'Sales', data: [45, 62, 58, 75] },
|
|
68
|
+
{ label: 'Costs', data: [30, 35, 32, 40] }
|
|
69
|
+
]
|
|
70
|
+
}" />
|
|
71
|
+
</template>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Smooth Filled Curves
|
|
75
|
+
|
|
76
|
+
```vue
|
|
77
|
+
<template>
|
|
78
|
+
<VibeChartLine :data="data" smooth fill />
|
|
79
|
+
</template>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Fixed Height, Legend at Top
|
|
83
|
+
|
|
84
|
+
```vue
|
|
85
|
+
<template>
|
|
86
|
+
<VibeChartLine :data="data" :height="300" legend="top" />
|
|
87
|
+
</template>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Custom Colors
|
|
91
|
+
|
|
92
|
+
Override per-dataset colors with any CSS color string:
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<template>
|
|
96
|
+
<VibeChartLine :data="{
|
|
97
|
+
labels: ['A', 'B', 'C'],
|
|
98
|
+
datasets: [
|
|
99
|
+
{ label: 'Alpha', data: [1, 3, 2], color: '#e74c3c' },
|
|
100
|
+
{ label: 'Beta', data: [2, 1, 4], color: '#3498db' }
|
|
101
|
+
]
|
|
102
|
+
}" />
|
|
103
|
+
</template>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Reactive Data
|
|
107
|
+
|
|
108
|
+
The chart redraws whenever `data` changes:
|
|
109
|
+
|
|
110
|
+
```vue
|
|
111
|
+
<script setup>
|
|
112
|
+
import { ref } from 'vue'
|
|
113
|
+
|
|
114
|
+
const data = ref({
|
|
115
|
+
labels: ['Jan', 'Feb', 'Mar'],
|
|
116
|
+
datasets: [{ label: 'Visits', data: [100, 200, 150] }]
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
function addMonth() {
|
|
120
|
+
data.value.labels.push('Apr')
|
|
121
|
+
data.value.datasets[0].data.push(180)
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<template>
|
|
126
|
+
<VibeChartLine :data="data" />
|
|
127
|
+
<button @click="addMonth">Add Month</button>
|
|
128
|
+
</template>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Notes
|
|
132
|
+
|
|
133
|
+
- **No external dependency.** VibeChartLine draws directly on a `<canvas>` element — no Chart.js or other charting library required.
|
|
134
|
+
- **Color cycling.** When `color` is omitted on a dataset, colors cycle through Bootstrap's CSS variables (`--bs-primary`, `--bs-success`, `--bs-danger`, ...) resolved from the computed styles of the container. Colors automatically follow your Bootstrap theme, including dark mode.
|
|
135
|
+
- **Responsive.** The canvas resizes via `ResizeObserver` on the container element and redraws at the device pixel ratio for crisp output on HiDPI screens.
|
|
136
|
+
- **Tooltips.** Hover over a data point to see the label and value. The chart redraws on each tooltip state change.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# VibeChartPie
|
|
2
|
+
|
|
3
|
+
Canvas-based pie chart with interactive tooltips, Bootstrap-aware color cycling, and responsive sizing.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `data` | `ChartData` | Required | Chart data: labels array + single dataset |
|
|
10
|
+
| `legend` | `'top' \| 'bottom' \| 'none'` | `'bottom'` | Legend position |
|
|
11
|
+
| `height` | `Number \| String` | `'auto'` | Fixed height in px or CSS string. `'auto'` uses 1:1 aspect ratio |
|
|
12
|
+
|
|
13
|
+
## Data Shape
|
|
14
|
+
|
|
15
|
+
Pie charts use a single dataset. Each value in `data` corresponds to one slice, identified by the matching index in `labels`.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
interface ChartData {
|
|
19
|
+
labels: string[] // One label per slice
|
|
20
|
+
datasets: ChartDataset[] // Use one dataset for pie charts
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ChartDataset {
|
|
24
|
+
label: string // Series name (used in tooltip prefix)
|
|
25
|
+
data: number[] // One value per slice (raw values; chart computes percentages)
|
|
26
|
+
color?: string // Not used for pie — slice colors are auto-cycled from Bootstrap
|
|
27
|
+
// CSS variables (--bs-primary, --bs-success, --bs-danger, ...)
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Slice colors are always auto-assigned from Bootstrap CSS variables in order — individual slice color overrides via `dataset.color` are not supported on pie charts.
|
|
32
|
+
|
|
33
|
+
Import from `@velkymx/vibeui`:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import type { ChartData } from '@velkymx/vibeui'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### Basic Pie Chart
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<script setup>
|
|
45
|
+
const data = {
|
|
46
|
+
labels: ['Direct', 'Organic', 'Referral', 'Social'],
|
|
47
|
+
datasets: [
|
|
48
|
+
{ label: 'Traffic', data: [40, 30, 20, 10] }
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<VibeChartPie :data="data" />
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Fixed Height, Legend at Top
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<template>
|
|
62
|
+
<VibeChartPie :data="data" :height="300" legend="top" />
|
|
63
|
+
</template>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### No Legend
|
|
67
|
+
|
|
68
|
+
```vue
|
|
69
|
+
<template>
|
|
70
|
+
<VibeChartPie :data="data" legend="none" />
|
|
71
|
+
</template>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Reactive Data
|
|
75
|
+
|
|
76
|
+
```vue
|
|
77
|
+
<script setup>
|
|
78
|
+
import { ref } from 'vue'
|
|
79
|
+
|
|
80
|
+
const data = ref({
|
|
81
|
+
labels: ['A', 'B', 'C'],
|
|
82
|
+
datasets: [{ label: 'Share', data: [50, 30, 20] }]
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
function refresh() {
|
|
86
|
+
data.value.datasets[0].data = [35, 45, 20]
|
|
87
|
+
}
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<template>
|
|
91
|
+
<VibeChartPie :data="data" />
|
|
92
|
+
<button @click="refresh">Refresh</button>
|
|
93
|
+
</template>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
- **No external dependency.** VibeChartPie draws directly on a `<canvas>` element — no Chart.js or other charting library required.
|
|
99
|
+
- **Color cycling.** Slice colors cycle through Bootstrap CSS variables (`--bs-primary`, `--bs-success`, `--bs-danger`, `--bs-warning`, `--bs-info`, ...) resolved from the container's computed styles. Colors follow your Bootstrap theme and dark mode.
|
|
100
|
+
- **Responsive.** Defaults to a square 1:1 aspect ratio. The canvas resizes via `ResizeObserver` and redraws at device pixel ratio for crisp HiDPI output.
|
|
101
|
+
- **Tooltips.** Hover over a slice to see the label and value.
|
|
102
|
+
- **Single dataset.** Pass exactly one dataset. Multiple datasets are silently ignored.
|
|
@@ -9,8 +9,8 @@ Alert messages with Bootstrap styling, supporting variants, dismissible function
|
|
|
9
9
|
| `variant` | `Variant` | `'primary'` | Color variant |
|
|
10
10
|
| `subtle` | `Boolean` | `false` | Renders alert with subtle background and emphasis text |
|
|
11
11
|
| `modelValue` | `Boolean` | `true` | Controls visibility (v-model support) |
|
|
12
|
-
| `
|
|
13
|
-
| `message` | `String` |
|
|
12
|
+
| `dismissible` | `Boolean` | `false` | Shows close button when true |
|
|
13
|
+
| `message` | `String` | `''` | Alert message text. Renders alongside default slot content; optional when the slot is used. |
|
|
14
14
|
| `fade` | `Boolean` | `true` | Use fade animation on dismissal |
|
|
15
15
|
|
|
16
16
|
## Events
|
|
@@ -25,7 +25,7 @@ Alert messages with Bootstrap styling, supporting variants, dismissible function
|
|
|
25
25
|
|
|
26
26
|
| Slot | Description |
|
|
27
27
|
|------|-------------|
|
|
28
|
-
| `default` |
|
|
28
|
+
| `default` | Additional alert content, appended after the `message` prop. When `message` is empty, slot is the sole content. |
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
@@ -48,18 +48,40 @@ const showAlert = ref(true)
|
|
|
48
48
|
<template>
|
|
49
49
|
<VibeAlert
|
|
50
50
|
variant="warning"
|
|
51
|
-
|
|
51
|
+
dismissible
|
|
52
52
|
v-model="showAlert"
|
|
53
53
|
message="This alert can be dismissed"
|
|
54
54
|
/>
|
|
55
55
|
</template>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
### Rich Content via Default Slot
|
|
59
|
+
|
|
60
|
+
Use the default slot for inline buttons, links, icons, or rich VNode content. Slot content is appended after the `message` prop text — both render. Omit `message` when the slot is the sole content.
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
<template>
|
|
64
|
+
<!-- message prop + slot button coexist -->
|
|
65
|
+
<VibeAlert variant="success" message="Sprint locked. Planning is frozen.">
|
|
66
|
+
<div class="mt-2">
|
|
67
|
+
<VibeButton size="sm" variant="success" @click="goToBoard">Go to Sprint Board</VibeButton>
|
|
68
|
+
</div>
|
|
69
|
+
</VibeAlert>
|
|
70
|
+
|
|
71
|
+
<!-- slot as sole content -->
|
|
72
|
+
<VibeAlert variant="warning" dismissible>
|
|
73
|
+
<strong>Sprint locked.</strong>
|
|
74
|
+
Changes are frozen until release.
|
|
75
|
+
<VibeButton size="sm" variant="primary" @click="unlock">Unlock</VibeButton>
|
|
76
|
+
</VibeAlert>
|
|
77
|
+
</template>
|
|
78
|
+
```
|
|
79
|
+
|
|
58
80
|
## Important Notes
|
|
59
81
|
|
|
60
82
|
**Automatic Initialization:** This component automatically initializes Bootstrap's Alert functionality when it is mounted, ensuring smooth dismissal animations.
|
|
61
83
|
|
|
62
|
-
**
|
|
84
|
+
**Dismissing:** Use `v-model` to show/dismiss the alert programmatically — there is no exposed Bootstrap instance to manage manually.
|
|
63
85
|
|
|
64
86
|
## Bootstrap CSS Classes
|
|
65
87
|
|
|
@@ -11,12 +11,6 @@ Small count and labeling component with Bootstrap 5.3 styling.
|
|
|
11
11
|
| `pill` | `Boolean` | `false` | Renders badge with rounded pill shape |
|
|
12
12
|
| `tag` | `String` | `'span'` | HTML tag to render: `'span'`, `'a'`, or any valid tag |
|
|
13
13
|
|
|
14
|
-
## Events
|
|
15
|
-
|
|
16
|
-
| Event | Payload | Description |
|
|
17
|
-
|-------|---------|-------------|
|
|
18
|
-
| `component-error` | `Object` | Emitted when an error occurs |
|
|
19
|
-
|
|
20
14
|
## Slots
|
|
21
15
|
|
|
22
16
|
| Slot | Description |
|
|
@@ -11,12 +11,6 @@ Group buttons together in a single line or vertically.
|
|
|
11
11
|
| `role` | `String` | `'group'` | ARIA role attribute |
|
|
12
12
|
| `ariaLabel` | `String` | `undefined` | ARIA label for accessibility |
|
|
13
13
|
|
|
14
|
-
## Events
|
|
15
|
-
|
|
16
|
-
| Event | Payload | Description |
|
|
17
|
-
|-------|---------|-------------|
|
|
18
|
-
| `component-error` | `Object` | Emitted when an error occurs |
|
|
19
|
-
|
|
20
14
|
## Slots
|
|
21
15
|
|
|
22
16
|
| Slot | Description |
|
|
@@ -20,7 +20,7 @@ Button component with variants, sizes, and support for links and router-links.
|
|
|
20
20
|
|
|
21
21
|
| Event | Payload | Description |
|
|
22
22
|
|-------|---------|-------------|
|
|
23
|
-
| `click` | `
|
|
23
|
+
| `click` | `MouseEvent` | Emitted when button is clicked (unless disabled) |
|
|
24
24
|
| `component-error` | `Object` | Emitted when an error occurs |
|
|
25
25
|
|
|
26
26
|
## Slots
|
|
@@ -14,7 +14,7 @@ Generic close button for dismissing content like modals and alerts.
|
|
|
14
14
|
|
|
15
15
|
| Event | Payload | Description |
|
|
16
16
|
|-------|---------|-------------|
|
|
17
|
-
| `click` | `
|
|
17
|
+
| `click` | `MouseEvent` | Emitted when button is clicked (unless disabled) |
|
|
18
18
|
| `component-error` | `Object` | Emitted when an error occurs |
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -22,15 +22,15 @@ Generic close button for dismissing content like modals and alerts.
|
|
|
22
22
|
### Basic Close Button
|
|
23
23
|
|
|
24
24
|
```vue
|
|
25
|
-
<template>
|
|
26
|
-
<VibeCloseButton @click="handleClose" />
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
25
|
<script setup>
|
|
30
26
|
const handleClose = () => {
|
|
31
27
|
console.log('Closed!')
|
|
32
28
|
}
|
|
33
29
|
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<VibeCloseButton @click="handleClose" />
|
|
33
|
+
</template>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### White Variant
|
|
@@ -1,34 +1,77 @@
|
|
|
1
1
|
# VibeLink
|
|
2
2
|
|
|
3
|
-
A flexible link component that supports Bootstrap 5.3's
|
|
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
|
-
```
|
|
3
|
+
A flexible link component that supports Bootstrap 5.3's link color and underline utilities, plus Vue Router integration.
|
|
12
4
|
|
|
13
5
|
## Props
|
|
14
6
|
|
|
15
7
|
| Prop | Type | Default | Description |
|
|
16
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`) |
|
|
17
12
|
| `variant` | `Variant` | `undefined` | Link color variant (`primary`, `success`, etc.) |
|
|
18
|
-
| `underline` | `Boolean \| '0'
|
|
13
|
+
| `underline` | `Boolean \| '0'` | `true` | Underline behavior. `false` or `'0'` removes the underline. |
|
|
19
14
|
| `underlineVariant` | `Variant` | `undefined` | Color of the underline |
|
|
20
15
|
| `underlineOpacity` | `0 \| 10 \| 25 \| 50 \| 75 \| 100` | `undefined` | Opacity of the underline |
|
|
21
16
|
| `offset` | `1 \| 2 \| 3` | `undefined` | Underline offset from text |
|
|
22
17
|
| `opacity` | `10 \| 25 \| 50 \| 75 \| 100` | `undefined` | Link text opacity |
|
|
23
|
-
| `focusRing` | `Boolean` | `false` | Enable the focus-ring helper |
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
27
72
|
|
|
28
|
-
## Bootstrap 5.3 Utilities
|
|
29
|
-
This component maps directly to the following Bootstrap classes:
|
|
30
73
|
- `.link-{variant}`
|
|
31
|
-
- `.link-underline-0`
|
|
74
|
+
- `.link-underline-opacity-0` (when `underline` is `false`/`'0'`)
|
|
32
75
|
- `.link-underline-{variant}`
|
|
33
76
|
- `.link-underline-opacity-{value}`
|
|
34
77
|
- `.link-offset-{value}`
|
|
@@ -12,12 +12,6 @@ Placeholder loading component with optional animations.
|
|
|
12
12
|
| `width` | `String\|Number` | `undefined` | Width as percentage or CSS value |
|
|
13
13
|
| `tag` | `String` | `'span'` | HTML tag to render |
|
|
14
14
|
|
|
15
|
-
## Events
|
|
16
|
-
|
|
17
|
-
| Event | Payload | Description |
|
|
18
|
-
|-------|---------|-------------|
|
|
19
|
-
| `component-error` | `Object` | Emitted when an error occurs |
|
|
20
|
-
|
|
21
15
|
## Slots
|
|
22
16
|
|
|
23
17
|
| Slot | Description |
|
|
@@ -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
|
+
```
|
|
@@ -12,12 +12,6 @@ Loading spinner with border or grow animation styles.
|
|
|
12
12
|
| `label` | `String` | `'Loading...'` | Screen reader text |
|
|
13
13
|
| `tag` | `String` | `'div'` | HTML tag to render |
|
|
14
14
|
|
|
15
|
-
## Events
|
|
16
|
-
|
|
17
|
-
| Event | Payload | Description |
|
|
18
|
-
|-------|---------|-------------|
|
|
19
|
-
| `component-error` | `Object` | Emitted when an error occurs |
|
|
20
|
-
|
|
21
15
|
## Usage
|
|
22
16
|
|
|
23
17
|
### Basic Spinner
|