@velkymx/vibeui 0.9.0 → 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/CLAUDE.md +48 -0
- package/README.md +222 -197
- 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 +18 -34
- 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 +13 -17
- 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/{components → src/components}/VibeDatePicker.vue.d.ts +4 -6
- package/dist/{components → src/components}/VibeDraggable.vue.d.ts +9 -13
- package/dist/{components → src/components}/VibeDropdown.vue.d.ts +46 -43
- package/dist/{components → src/components}/VibeDroppable.vue.d.ts +9 -13
- package/dist/{components → src/components}/VibeFileInput.vue.d.ts +14 -20
- package/dist/{components → src/components}/VibeFormCheckbox.vue.d.ts +29 -21
- package/dist/{components → src/components}/VibeFormDatepicker.vue.d.ts +26 -29
- package/dist/{components → src/components}/VibeFormGroup.vue.d.ts +10 -13
- package/dist/{components → src/components}/VibeFormInput.vue.d.ts +22 -23
- package/dist/{components → src/components}/VibeFormRadio.vue.d.ts +22 -23
- package/dist/{components → src/components}/VibeFormSelect.vue.d.ts +27 -33
- package/dist/{components → src/components}/VibeFormSpinbutton.vue.d.ts +30 -33
- package/dist/{components → src/components}/VibeFormSwitch.vue.d.ts +21 -22
- package/dist/{components → src/components}/VibeFormTextarea.vue.d.ts +23 -24
- package/dist/{components → src/components}/VibeFormWysiwyg.vue.d.ts +22 -21
- 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/{components → src/components}/VibeResizable.vue.d.ts +10 -14
- package/dist/{components → src/components}/VibeRow.vue.d.ts +9 -17
- package/dist/src/components/VibeScrollspy.vue.d.ts +89 -0
- package/dist/{components → src/components}/VibeSkeleton.vue.d.ts +2 -1
- package/dist/{components → src/components}/VibeSlider.vue.d.ts +4 -5
- package/dist/src/components/VibeSortable.vue.d.ts +59 -0
- package/dist/{components → src/components}/VibeSpinner.vue.d.ts +4 -7
- package/dist/{components → src/components}/VibeStepper.vue.d.ts +32 -31
- package/dist/{components → src/components}/VibeTab.vue.d.ts +7 -11
- package/dist/src/components/VibeTabContent.vue.d.ts +56 -0
- package/dist/{components → src/components}/VibeTabs.vue.d.ts +9 -13
- package/dist/{components → src/components}/VibeToast.vue.d.ts +31 -44
- package/dist/{components → src/components}/VibeToastHost.vue.d.ts +2 -1
- 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/{components → src/components}/dndStore.d.ts +1 -0
- package/dist/{components → src/components}/index.d.ts +5 -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/useId.d.ts +2 -0
- package/dist/{directives → src/directives}/vTooltip.d.ts +2 -3
- package/dist/src/injectionKeys.d.ts +28 -0
- package/dist/{types.d.ts → src/types.d.ts} +21 -2
- 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 +8269 -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 +127 -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 +435 -0
- package/docs/components/hero/hero.md +64 -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 +143 -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 +108 -0
- package/docs/components/navigation/pagination.md +162 -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-group.md +115 -0
- package/docs/forms/form-input.md +112 -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 +782 -0
- package/package.json +44 -14
- 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/VibeAutocomplete.vue.d.ts +0 -46
- 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/VibeSortable.vue.d.ts +0 -40
- 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}/useForm.d.ts +0 -0
- /package/dist/{composables → src/composables}/useFormValidation.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePosition.d.ts +0 -0
- /package/dist/{composables → src/composables}/useToast.d.ts +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# VibeAccordion
|
|
2
|
+
|
|
3
|
+
Collapsible accordion component for organizing content in a data-driven way.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier for the accordion |
|
|
10
|
+
| `flush` | `Boolean` | `false` | Remove borders and rounded corners |
|
|
11
|
+
| `items` | `AccordionItem[]` | Required | Array of accordion items |
|
|
12
|
+
| `alwaysOpen` | `Boolean` | `false` | Don't collapse other items when one is opened |
|
|
13
|
+
|
|
14
|
+
### AccordionItem Interface
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
interface AccordionItem {
|
|
18
|
+
id: string
|
|
19
|
+
title: string
|
|
20
|
+
content: string
|
|
21
|
+
show?: boolean
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Events
|
|
26
|
+
|
|
27
|
+
| Event | Payload | Description |
|
|
28
|
+
|-------|---------|-------------|
|
|
29
|
+
| `item-click` | `{ item, index }` | Emitted when an accordion item is clicked |
|
|
30
|
+
| `show` | `id` | Emitted when an item starts showing |
|
|
31
|
+
| `shown` | `id` | Emitted when an item is fully shown |
|
|
32
|
+
| `hide` | `id` | Emitted when an item starts hiding |
|
|
33
|
+
| `hidden` | `id` | Emitted when an item is fully hidden |
|
|
34
|
+
| `component-error` | `ComponentError` | Emitted if Bootstrap JS fails to load |
|
|
35
|
+
|
|
36
|
+
## Slots
|
|
37
|
+
|
|
38
|
+
| Slot | Scope | Description |
|
|
39
|
+
|------|-------|-------------|
|
|
40
|
+
| `title` | `{ item, index }` | Custom title rendering |
|
|
41
|
+
| `content` | `{ item, index }` | Custom content rendering |
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
### Basic Example
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<template>
|
|
49
|
+
<VibeAccordion :items="accordionItems" />
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup>
|
|
53
|
+
const accordionItems = [
|
|
54
|
+
{
|
|
55
|
+
id: 'collapseOne',
|
|
56
|
+
title: 'Accordion Item #1',
|
|
57
|
+
content: 'This is the first item\'s content.',
|
|
58
|
+
show: true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'collapseTwo',
|
|
62
|
+
title: 'Accordion Item #2',
|
|
63
|
+
content: 'This is the second item\'s content.'
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
</script>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Always Open
|
|
70
|
+
|
|
71
|
+
Items stay open when another item is opened:
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<template>
|
|
75
|
+
<VibeAccordion always-open :items="accordionItems" />
|
|
76
|
+
</template>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Custom Title and Content (Slots)
|
|
80
|
+
|
|
81
|
+
Both the `title` and `content` slots receive `{ item, index }` so you can render rich markup while still driving the accordion from the `items` array:
|
|
82
|
+
|
|
83
|
+
```vue
|
|
84
|
+
<template>
|
|
85
|
+
<VibeAccordion :items="accordionItems">
|
|
86
|
+
<template #title="{ item }">
|
|
87
|
+
<strong>{{ item.title }}</strong>
|
|
88
|
+
</template>
|
|
89
|
+
<template #content="{ item }">
|
|
90
|
+
<div v-html="item.content" />
|
|
91
|
+
</template>
|
|
92
|
+
</VibeAccordion>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<script setup>
|
|
96
|
+
const accordionItems = [
|
|
97
|
+
{ id: 'one', title: 'Item #1', content: '<p>Rich <em>HTML</em> body.</p>', show: true },
|
|
98
|
+
{ id: 'two', title: 'Item #2', content: '<p>Second body.</p>' }
|
|
99
|
+
]
|
|
100
|
+
</script>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Important Notes
|
|
104
|
+
|
|
105
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Collapse functionality for each item when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
106
|
+
|
|
107
|
+
**Reactivity:** The `show` property in the `AccordionItem` objects is watched. Changing it in your parent state will trigger the corresponding Bootstrap transition.
|
|
108
|
+
|
|
109
|
+
**Item ids:** Each `item.id` (and the accordion `id`) must contain only alphanumeric characters, hyphens, and underscores — Bootstrap's internal `querySelector` breaks on CSS-special characters. In dev mode an unsafe id logs a console warning.
|
|
110
|
+
|
|
111
|
+
**Escape Hatch:** The exposed `_unsafe_bsInstances` template ref is a `Map` of the underlying Bootstrap Collapse instances keyed by item id. It is **not** part of the stable API — calling `dispose()` or other lifecycle methods on them directly **will** break the component. To re-sync after manual DOM changes, call the exposed `refresh()` method instead.
|
|
112
|
+
|
|
113
|
+
## Bootstrap CSS Classes
|
|
114
|
+
|
|
115
|
+
- `.accordion`
|
|
116
|
+
- `.accordion-flush`
|
|
117
|
+
- `.accordion-item`
|
|
118
|
+
- `.accordion-header`
|
|
119
|
+
- `.accordion-button`
|
|
120
|
+
- `.accordion-collapse`
|
|
121
|
+
- `.accordion-body`
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# VibeCarousel
|
|
2
|
+
|
|
3
|
+
Data-driven slideshow component for cycling through images or content.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `modelValue` | `Number` | `0` | Active slide index (v-model) |
|
|
11
|
+
| `controls` | `Boolean` | `true` | Show prev/next controls |
|
|
12
|
+
| `indicators` | `Boolean` | `true` | Show slide indicators |
|
|
13
|
+
| `ride` | `Boolean\|String` | `false` | Auto-play: `false`, `true`, or `'carousel'` |
|
|
14
|
+
| `interval` | `Number\|Boolean` | `5000` | Slide interval in ms (`false` to disable) |
|
|
15
|
+
| `keyboard` | `Boolean` | `true` | Keyboard navigation |
|
|
16
|
+
| `pause` | `String\|Boolean` | `'hover'` | Pause on hover (`'hover'` or `false`) |
|
|
17
|
+
| `wrap` | `Boolean` | `true` | Continuous cycling |
|
|
18
|
+
| `touch` | `Boolean` | `true` | Touch swipe support |
|
|
19
|
+
| `dark` | `Boolean` | `false` | Dark variant indicators/controls |
|
|
20
|
+
| `fade` | `Boolean` | `false` | Fade transition instead of slide |
|
|
21
|
+
| `items` | `CarouselItem[]` | Required | Array of carousel items |
|
|
22
|
+
|
|
23
|
+
### CarouselItem Interface
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
interface CarouselItem {
|
|
27
|
+
src: string
|
|
28
|
+
alt?: string
|
|
29
|
+
caption?: string
|
|
30
|
+
captionText?: string
|
|
31
|
+
active?: boolean
|
|
32
|
+
interval?: number
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
| Event | Payload | Description |
|
|
39
|
+
|-------|---------|-------------|
|
|
40
|
+
| `update:modelValue` | `Number` | Emitted when the active slide changes |
|
|
41
|
+
| `slide` | `Event` | Emitted when slide transition starts (Bootstrap `slide.bs.carousel`) |
|
|
42
|
+
| `slid` | `Event` | Emitted when slide transition completes (Bootstrap `slid.bs.carousel`) |
|
|
43
|
+
| `component-error` | `ComponentError` | Emitted if Bootstrap JS fails to load |
|
|
44
|
+
|
|
45
|
+
## Slots
|
|
46
|
+
|
|
47
|
+
| Slot | Scope | Description |
|
|
48
|
+
|------|-------|-------------|
|
|
49
|
+
| `caption` | `{ item, index }` | Custom caption rendering |
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
### Reactive Usage (v-model)
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<template>
|
|
57
|
+
<div>
|
|
58
|
+
<VibeCarousel v-model="currentSlide" :items="carouselItems" />
|
|
59
|
+
|
|
60
|
+
<div class="mt-3">
|
|
61
|
+
<VibeButton @click="currentSlide = 0">Go to Slide 1</VibeButton>
|
|
62
|
+
<VibeButton @click="currentSlide = 1">Go to Slide 2</VibeButton>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script setup>
|
|
68
|
+
import { ref } from 'vue'
|
|
69
|
+
const currentSlide = ref(0)
|
|
70
|
+
const carouselItems = [
|
|
71
|
+
{ src: '/img/slide-1.jpg', caption: 'First slide', captionText: 'Intro copy' },
|
|
72
|
+
{ src: '/img/slide-2.jpg', caption: 'Second slide' }
|
|
73
|
+
]
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Basic Carousel
|
|
78
|
+
|
|
79
|
+
```vue
|
|
80
|
+
<template>
|
|
81
|
+
<VibeCarousel :items="carouselItems" />
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script setup>
|
|
85
|
+
const carouselItems = [
|
|
86
|
+
{ src: '/img/slide-1.jpg', alt: 'A scenic view' },
|
|
87
|
+
{ src: '/img/slide-2.jpg', alt: 'A city street' }
|
|
88
|
+
]
|
|
89
|
+
</script>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Important Notes
|
|
93
|
+
|
|
94
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Carousel functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
95
|
+
|
|
96
|
+
**`item.src` is required:** Every slide is an image slide — each item must provide a `src`. Captions and alt text are optional (an accessible fallback `alt` is generated from `alt` → `caption` → `captionText` → `"Carousel slide N"`).
|
|
97
|
+
|
|
98
|
+
**Empty items:** An empty `items` array is handled gracefully — the carousel simply renders no slides.
|
|
99
|
+
|
|
100
|
+
**Escape Hatch:** The exposed `_unsafe_bsInstance` template ref gives raw access to the underlying Bootstrap Carousel instance. It is **not** part of the stable API — calling `dispose()` or other lifecycle methods on it directly **will** break the component. To re-initialize after manual changes, call the exposed `refresh()` method instead.
|
|
101
|
+
|
|
102
|
+
## Bootstrap CSS Classes
|
|
103
|
+
|
|
104
|
+
- `.carousel`
|
|
105
|
+
- `.carousel-inner`
|
|
106
|
+
- `.carousel-item`
|
|
107
|
+
- `.carousel-control-prev`
|
|
108
|
+
- `.carousel-control-next`
|
|
109
|
+
- `.carousel-indicators`
|
|
110
|
+
- `.carousel-caption`
|
|
111
|
+
- `.carousel-dark`
|
|
112
|
+
- `.carousel-fade`
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# VibeCollapse
|
|
2
|
+
|
|
3
|
+
Toggle visibility of content with smooth transitions.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `modelValue` | `Boolean` | `false` | Control visibility (v-model) |
|
|
11
|
+
| `tag` | `String` | `'div'` | HTML tag to render |
|
|
12
|
+
| `horizontal` | `Boolean` | `false` | Horizontal collapse |
|
|
13
|
+
| `isNav` | `Boolean` | `false` | Adds `navbar-collapse` class for use inside `VibeNavbar` |
|
|
14
|
+
|
|
15
|
+
## Events
|
|
16
|
+
|
|
17
|
+
| Event | Payload | Description |
|
|
18
|
+
|-------|---------|-------------|
|
|
19
|
+
| `update:modelValue` | `Boolean` | Emitted when visibility changes |
|
|
20
|
+
| `show` | - | Emitted when collapse starts showing |
|
|
21
|
+
| `shown` | - | Emitted when collapse is fully shown |
|
|
22
|
+
| `hide` | - | Emitted when collapse starts hiding |
|
|
23
|
+
| `hidden` | - | Emitted when collapse is fully hidden |
|
|
24
|
+
| `component-error` | `ComponentError` | Emitted if Bootstrap JS fails to load |
|
|
25
|
+
|
|
26
|
+
## Slots
|
|
27
|
+
|
|
28
|
+
| Slot | Description |
|
|
29
|
+
|------|-------------|
|
|
30
|
+
| `default` | Collapsible content |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
### Reactive Usage (v-model)
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<template>
|
|
38
|
+
<div>
|
|
39
|
+
<VibeButton variant="primary" @click="show = !show">
|
|
40
|
+
Toggle Collapse
|
|
41
|
+
</VibeButton>
|
|
42
|
+
|
|
43
|
+
<VibeCollapse v-model="show">
|
|
44
|
+
<div class="card card-body mt-2">
|
|
45
|
+
This content is controlled via Vue state with smooth animations.
|
|
46
|
+
</div>
|
|
47
|
+
</VibeCollapse>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
import { ref } from 'vue'
|
|
53
|
+
const show = ref(false)
|
|
54
|
+
</script>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Inside a Navbar
|
|
58
|
+
|
|
59
|
+
When used inside a `VibeNavbar`, add `is-nav` to get the `navbar-collapse` class. `VibeNavbarToggle` will automatically synchronize with this component.
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<template>
|
|
63
|
+
<VibeNavbar variant="dark" expand="lg">
|
|
64
|
+
<VibeNavbarBrand href="#">Brand</VibeNavbarBrand>
|
|
65
|
+
<VibeNavbarToggle target="navContent" />
|
|
66
|
+
<VibeCollapse id="navContent" is-nav>
|
|
67
|
+
<VibeNavbarNav :items="navItems" />
|
|
68
|
+
</VibeCollapse>
|
|
69
|
+
</VibeNavbar>
|
|
70
|
+
</template>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Horizontal Collapse
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<template>
|
|
77
|
+
<div>
|
|
78
|
+
<VibeButton variant="primary" @click="show = !show">
|
|
79
|
+
Toggle Width
|
|
80
|
+
</VibeButton>
|
|
81
|
+
|
|
82
|
+
<div style="min-height: 120px">
|
|
83
|
+
<VibeCollapse v-model="show" horizontal>
|
|
84
|
+
<div class="card card-body" style="width: 300px">
|
|
85
|
+
This is horizontal collapse content!
|
|
86
|
+
</div>
|
|
87
|
+
</VibeCollapse>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Important Notes
|
|
94
|
+
|
|
95
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Collapse functionality when it is mounted, ensuring that smooth sliding transitions are used.
|
|
96
|
+
|
|
97
|
+
**State Synchronization:** Clicking a toggle (like `VibeNavbarToggle`) updates both Vue's `v-model` state and Bootstrap's JavaScript instance simultaneously, so the two never drift out of sync.
|
|
98
|
+
|
|
99
|
+
**Pre-init fallback:** Before Bootstrap JS finishes loading, an open collapse (`v-model` true) still renders visible via the `.show` class; once Bootstrap is ready it takes ownership of the class.
|
|
100
|
+
|
|
101
|
+
## Bootstrap CSS Classes
|
|
102
|
+
|
|
103
|
+
- `.collapse`
|
|
104
|
+
- `.navbar-collapse` (when `is-nav` is set)
|
|
105
|
+
- `.collapse-horizontal`
|
|
106
|
+
- `.show`
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# VibeDatePicker
|
|
2
|
+
|
|
3
|
+
Calendar-popover datepicker with single + range mode. Distinct from `VibeFormDatepicker`, which is a thin wrapper around `<input type="date">`.
|
|
4
|
+
|
|
5
|
+
Values are ISO `YYYY-MM-DD` strings.
|
|
6
|
+
|
|
7
|
+
## Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `modelValue` | `String \| null \| [String\|null, String\|null]` | `null` | ISO date(s) (v-model) |
|
|
12
|
+
| `range` | `Boolean` | `false` | Range selection mode |
|
|
13
|
+
| `min` | `String` | `undefined` | ISO lower bound |
|
|
14
|
+
| `max` | `String` | `undefined` | ISO upper bound |
|
|
15
|
+
| `disabledDates` | `String[]` | `[]` | Specific ISO dates to disable |
|
|
16
|
+
| `format` | `(iso) => string` | `undefined` | Display formatter for input value |
|
|
17
|
+
| `placeholder` | `String` | `'Select date'` | |
|
|
18
|
+
| `weekStart` | `Number` | `0` | 0 = Sunday, 1 = Monday |
|
|
19
|
+
| `id` | `String` | auto | |
|
|
20
|
+
| `label` | `String` | `undefined` | |
|
|
21
|
+
| `disabled` | `Boolean` | `false` | |
|
|
22
|
+
|
|
23
|
+
### Events
|
|
24
|
+
|
|
25
|
+
| Event | Payload | Description |
|
|
26
|
+
|-------|---------|-------------|
|
|
27
|
+
| `update:modelValue` | `String \| [String\|null, String\|null]` | Selection committed |
|
|
28
|
+
| `open` | — | Popover opened |
|
|
29
|
+
| `close` | — | Popover closed |
|
|
30
|
+
|
|
31
|
+
### Exposed methods
|
|
32
|
+
|
|
33
|
+
- `open()` — programmatically open the popover.
|
|
34
|
+
- `close()` — programmatically close.
|
|
35
|
+
|
|
36
|
+
## Single mode
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<script setup>
|
|
40
|
+
import { ref } from 'vue'
|
|
41
|
+
const date = ref(null)
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<VibeDatePicker v-model="date" label="Due date" />
|
|
46
|
+
</template>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Range mode
|
|
50
|
+
|
|
51
|
+
```vue
|
|
52
|
+
<VibeDatePicker
|
|
53
|
+
v-model="range"
|
|
54
|
+
range
|
|
55
|
+
:min="'2026-01-01'"
|
|
56
|
+
:max="'2026-12-31'"
|
|
57
|
+
:format="iso => iso.split('-').reverse().join('/')"
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The first click sets `[start, null]`. The second click adds the end date and closes the popover; if the second pick is earlier than the first, the range is auto-swapped to stay ordered.
|
|
62
|
+
|
|
63
|
+
## Disabling dates
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<VibeDatePicker
|
|
67
|
+
v-model="date"
|
|
68
|
+
:disabled-dates="['2026-04-29', '2026-04-30']"
|
|
69
|
+
/>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Important Notes
|
|
73
|
+
|
|
74
|
+
**Zero-padded ISO bounds:** `min`, `max`, and every entry in `disabledDates` must be zero-padded `YYYY-MM-DD` (e.g. `2026-04-05`, not `2026-4-5`). Comparisons are lexical string comparisons, so an unpadded value compares incorrectly. In dev mode, a non-conforming `min`/`max` logs a console warning.
|
|
75
|
+
|
|
76
|
+
**Read-only input:** The text input is read-only; dates are chosen through the calendar popover, which closes on outside click or `Escape`.
|
|
77
|
+
|
|
78
|
+
**Keyboard navigation:** The grid supports arrow keys (day), `PageUp`/`PageDown` (month), `Home`/`End` (week), and `Enter`/`Space` to select.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# VibeDraggable / VibeDroppable
|
|
2
|
+
|
|
3
|
+
Generic drag-and-drop primitives for kanban boards, builders, palette UIs. Communicates payloads through a shared module-level store, so payloads can be typed objects or non-serializable values (refs, functions) — no DataTransfer string round-trip.
|
|
4
|
+
|
|
5
|
+
## VibeDraggable Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `payload` | `unknown` | `undefined` | Data passed to the matching droppable on drop |
|
|
10
|
+
| `group` | `String` | `'default'` | Tag used to match against droppable groups |
|
|
11
|
+
| `disabled` | `Boolean` | `false` | Disable dragging |
|
|
12
|
+
| `tag` | `String` | `'div'` | Element to render |
|
|
13
|
+
|
|
14
|
+
### Events
|
|
15
|
+
|
|
16
|
+
| Event | Payload | Description |
|
|
17
|
+
|-------|---------|-------------|
|
|
18
|
+
| `dragstart` | `{ payload, group, event }` | Emitted on dragstart |
|
|
19
|
+
| `dragend` | `{ payload, group, event }` | Emitted on dragend, regardless of drop success |
|
|
20
|
+
|
|
21
|
+
### Slots
|
|
22
|
+
|
|
23
|
+
Default slot scope: `{ isDragging }`.
|
|
24
|
+
|
|
25
|
+
## VibeDroppable Props
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
|------|------|---------|-------------|
|
|
29
|
+
| `group` | `String` | `'default'` | Group accepted unless `acceptGroups` overrides |
|
|
30
|
+
| `acceptGroups` | `String[]` | `undefined` | Whitelist of groups that may drop here |
|
|
31
|
+
| `disabled` | `Boolean` | `false` | Reject all drops |
|
|
32
|
+
| `tag` | `String` | `'div'` | Element to render |
|
|
33
|
+
|
|
34
|
+
### Events
|
|
35
|
+
|
|
36
|
+
| Event | Payload | Description |
|
|
37
|
+
|-------|---------|-------------|
|
|
38
|
+
| `drop` | `{ payload, group, event }` | Successful drop, only emitted when group matches |
|
|
39
|
+
| `dragenter` | `DragEvent` | |
|
|
40
|
+
| `dragleave` | `DragEvent` | |
|
|
41
|
+
|
|
42
|
+
### Slots
|
|
43
|
+
|
|
44
|
+
Default slot scope: `{ isOver }`.
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
### Kanban column move
|
|
49
|
+
|
|
50
|
+
```vue
|
|
51
|
+
<script setup>
|
|
52
|
+
import { ref } from 'vue'
|
|
53
|
+
const todo = ref([{ id: 1, title: 'Wireframes' }])
|
|
54
|
+
const done = ref([])
|
|
55
|
+
|
|
56
|
+
function moveCard(card, from, to) {
|
|
57
|
+
from.value = from.value.filter(c => c.id !== card.id)
|
|
58
|
+
to.value.push(card)
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<div class="d-flex gap-3">
|
|
64
|
+
<VibeDroppable group="cards" @drop="({ payload }) => moveCard(payload, todo, done)">
|
|
65
|
+
<template #default="{ isOver }">
|
|
66
|
+
<div :class="['col bg-light p-3', isOver ? 'border-primary' : '']">
|
|
67
|
+
<h5>To do</h5>
|
|
68
|
+
<VibeDraggable v-for="card in todo" :key="card.id" :payload="card" group="cards">
|
|
69
|
+
<div class="card mb-2 p-2">{{ card.title }}</div>
|
|
70
|
+
</VibeDraggable>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
</VibeDroppable>
|
|
74
|
+
|
|
75
|
+
<VibeDroppable group="cards" @drop="({ payload }) => moveCard(payload, done, todo)">
|
|
76
|
+
<h5>Done</h5>
|
|
77
|
+
<VibeDraggable v-for="card in done" :key="card.id" :payload="card" group="cards">
|
|
78
|
+
<div class="card mb-2 p-2">{{ card.title }}</div>
|
|
79
|
+
</VibeDraggable>
|
|
80
|
+
</VibeDroppable>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Multi-source whitelist
|
|
86
|
+
|
|
87
|
+
```vue
|
|
88
|
+
<VibeDroppable :accept-groups="['todo', 'done']" group="trash">
|
|
89
|
+
<div class="trash-zone">Drop to delete</div>
|
|
90
|
+
</VibeDroppable>
|
|
91
|
+
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# VibeDropdown
|
|
2
|
+
|
|
3
|
+
Data-driven toggleable contextual overlay for displaying lists of links.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
10
|
+
| `text` | `String` | `'Dropdown'` | Button text |
|
|
11
|
+
| `variant` | `Variant` | `'primary'` | Button color variant |
|
|
12
|
+
| `size` | `Size` | `undefined` | Button size (`'sm'` or `'lg'`) |
|
|
13
|
+
| `split` | `Boolean` | `false` | Split button style |
|
|
14
|
+
| `direction` | `Direction` | `'down'` | Direction: `'up'`, `'down'`, `'start'`, `'end'` |
|
|
15
|
+
| `menuEnd` | `Boolean` | `false` | Align menu to the right |
|
|
16
|
+
| `items` | `DropdownItem[]` | Required | Array of dropdown items |
|
|
17
|
+
| `autoClose` | `Boolean\|String` | `true` | Close behavior: `true`, `false`, `'inside'`, `'outside'` |
|
|
18
|
+
|
|
19
|
+
### DropdownItem Interface
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
interface DropdownItem {
|
|
23
|
+
text?: string
|
|
24
|
+
href?: string
|
|
25
|
+
to?: string | object
|
|
26
|
+
active?: boolean
|
|
27
|
+
disabled?: boolean
|
|
28
|
+
divider?: boolean
|
|
29
|
+
header?: boolean
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Events
|
|
34
|
+
|
|
35
|
+
| Event | Payload | Description |
|
|
36
|
+
|-------|---------|-------------|
|
|
37
|
+
| `item-click` | `{ item, index, event }` | Emitted when an item is clicked |
|
|
38
|
+
| `show` | - | Emitted when dropdown starts showing |
|
|
39
|
+
| `shown` | - | Emitted when dropdown is fully shown |
|
|
40
|
+
| `hide` | - | Emitted when dropdown starts hiding |
|
|
41
|
+
| `hidden` | - | Emitted when dropdown is fully hidden |
|
|
42
|
+
| `component-error` | `ComponentError` | Emitted if Bootstrap JS fails to load |
|
|
43
|
+
|
|
44
|
+
## Slots
|
|
45
|
+
|
|
46
|
+
| Slot | Scope | Description |
|
|
47
|
+
|------|-------|-------------|
|
|
48
|
+
| `button` | - | Custom button content |
|
|
49
|
+
| `item` | `{ item, index }` | Custom item rendering |
|
|
50
|
+
| `header` | `{ item, index }` | Custom header rendering |
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
### Basic Dropdown
|
|
55
|
+
|
|
56
|
+
```vue
|
|
57
|
+
<template>
|
|
58
|
+
<VibeDropdown text="Dropdown Menu" :items="dropdownItems" @item-click="onItemClick" />
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script setup>
|
|
62
|
+
const dropdownItems = [
|
|
63
|
+
{ header: true, text: 'Actions' },
|
|
64
|
+
{ text: 'Edit', href: '#edit' },
|
|
65
|
+
{ text: 'Duplicate', href: '#duplicate' },
|
|
66
|
+
{ divider: true },
|
|
67
|
+
{ text: 'Delete', href: '#delete', active: false }
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
function onItemClick({ item, index }) {
|
|
71
|
+
console.log('clicked', item.text, 'at', index)
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Custom Item Rendering (Slots)
|
|
77
|
+
|
|
78
|
+
The `item` and `header` slots receive `{ item, index }` so you can render rich markup while still driving the menu from the `items` array:
|
|
79
|
+
|
|
80
|
+
```vue
|
|
81
|
+
<template>
|
|
82
|
+
<VibeDropdown text="Menu" :items="dropdownItems">
|
|
83
|
+
<template #item="{ item }">
|
|
84
|
+
<i :class="item.icon" class="me-2" />{{ item.text }}
|
|
85
|
+
</template>
|
|
86
|
+
</VibeDropdown>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script setup>
|
|
90
|
+
const dropdownItems = [
|
|
91
|
+
{ text: 'Profile', href: '#', icon: 'bi bi-person' },
|
|
92
|
+
{ text: 'Settings', href: '#', icon: 'bi bi-gear' }
|
|
93
|
+
]
|
|
94
|
+
</script>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Programmatic Control
|
|
98
|
+
|
|
99
|
+
```vue
|
|
100
|
+
<template>
|
|
101
|
+
<div>
|
|
102
|
+
<VibeButton @click="myDropdown.toggle()">External Toggle</VibeButton>
|
|
103
|
+
|
|
104
|
+
<VibeDropdown ref="myDropdown" text="Dropdown Menu" :items="dropdownItems" />
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<script setup>
|
|
109
|
+
import { ref } from 'vue'
|
|
110
|
+
const myDropdown = ref(null)
|
|
111
|
+
const dropdownItems = [
|
|
112
|
+
{ text: 'Edit', href: '#edit' },
|
|
113
|
+
{ text: 'Delete', href: '#delete' }
|
|
114
|
+
]
|
|
115
|
+
</script>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Important Notes
|
|
119
|
+
|
|
120
|
+
**Automatic Initialization:** This component automatically initializes Bootstrap's Dropdown functionality when it is mounted, provided that Bootstrap's JavaScript is available in your project.
|
|
121
|
+
|
|
122
|
+
**Programmatic Methods:** The component exposes `show()`, `hide()`, and `toggle()` via template refs for programmatic control.
|
|
123
|
+
|
|
124
|
+
## Bootstrap CSS Classes
|
|
125
|
+
|
|
126
|
+
- `.dropdown`, `.dropup`, `.dropend`, `.dropstart`
|
|
127
|
+
- `.dropdown-toggle`
|
|
128
|
+
- `.dropdown-menu`
|
|
129
|
+
- `.dropdown-item`
|