@velkymx/vibeui 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -9
- package/dist/components/VibeAlert.vue.d.ts +12 -2
- package/dist/components/VibeAutocomplete.vue.d.ts +46 -0
- package/dist/components/VibeButton.vue.d.ts +4 -4
- package/dist/components/VibeDataTable.vue.d.ts +6 -6
- package/dist/components/VibeDatePicker.vue.d.ts +122 -0
- package/dist/components/VibeDraggable.vue.d.ts +81 -0
- package/dist/components/VibeDroppable.vue.d.ts +74 -0
- package/dist/components/VibeFileInput.vue.d.ts +133 -0
- package/dist/components/VibeFormCheckbox.vue.d.ts +1 -1
- package/dist/components/VibeFormDatepicker.vue.d.ts +1 -1
- package/dist/components/VibeFormGroup.vue.d.ts +1 -1
- package/dist/components/VibeFormInput.vue.d.ts +1 -1
- package/dist/components/VibeFormRadio.vue.d.ts +1 -1
- package/dist/components/VibeFormSelect.vue.d.ts +1 -1
- package/dist/components/VibeFormSpinbutton.vue.d.ts +1 -1
- package/dist/components/VibeFormSwitch.vue.d.ts +1 -1
- package/dist/components/VibeFormTextarea.vue.d.ts +1 -1
- package/dist/components/VibeFormWysiwyg.vue.d.ts +2 -2
- package/dist/components/VibeResizable.vue.d.ts +144 -0
- package/dist/components/VibeSkeleton.vue.d.ts +53 -0
- package/dist/components/VibeSlider.vue.d.ts +78 -0
- package/dist/components/VibeSortable.vue.d.ts +40 -0
- package/dist/components/VibeStepper.vue.d.ts +132 -0
- package/dist/components/VibeTab.vue.d.ts +45 -0
- package/dist/components/VibeTabs.vue.d.ts +82 -0
- package/dist/components/VibeToast.vue.d.ts +11 -0
- package/dist/components/VibeToastHost.vue.d.ts +15 -0
- package/dist/components/dndStore.d.ts +6 -0
- package/dist/components/index.d.ts +14 -1
- package/dist/composables/useForm.d.ts +22 -0
- package/dist/composables/usePosition.d.ts +20 -0
- package/dist/composables/useToast.d.ts +52 -0
- package/dist/directives/vTooltip.d.ts +25 -0
- package/dist/index.d.ts +6 -0
- package/dist/types.d.ts +11 -4
- package/dist/vibeui.css +1 -1
- package/dist/vibeui.es.js +4256 -1827
- package/dist/vibeui.umd.js +1 -1
- package/package.json +4 -5
- package/CLAUDE.md +0 -48
- package/docs/README.md +0 -153
- package/docs/components/advanced/popover.md +0 -150
- package/docs/components/advanced/scrollspy.md +0 -64
- package/docs/components/advanced/tooltip.md +0 -111
- package/docs/components/card/card.md +0 -215
- package/docs/components/core/alert.md +0 -72
- package/docs/components/core/badge.md +0 -81
- package/docs/components/core/button-group.md +0 -105
- package/docs/components/core/button.md +0 -127
- package/docs/components/core/close-button.md +0 -82
- package/docs/components/core/link.md +0 -36
- package/docs/components/core/placeholder.md +0 -135
- package/docs/components/core/spinner.md +0 -109
- package/docs/components/data/datatable.md +0 -416
- package/docs/components/interactive/accordion.md +0 -92
- package/docs/components/interactive/carousel.md +0 -97
- package/docs/components/interactive/collapse.md +0 -105
- package/docs/components/interactive/dropdown.md +0 -93
- package/docs/components/interactive/modal.md +0 -148
- package/docs/components/interactive/offcanvas.md +0 -89
- package/docs/components/interactive/toast.md +0 -114
- package/docs/components/layout/col.md +0 -123
- package/docs/components/layout/container.md +0 -59
- package/docs/components/layout/row.md +0 -113
- package/docs/components/list/list-group.md +0 -221
- package/docs/components/navigation/breadcrumb.md +0 -116
- package/docs/components/navigation/nav.md +0 -88
- package/docs/components/navigation/navbar.md +0 -106
- package/docs/components/navigation/pagination.md +0 -146
- package/docs/components/progress/progress.md +0 -182
- package/docs/composables/back-button.md +0 -28
- package/docs/composables/breakpoints.md +0 -54
- package/docs/composables/color-mode.md +0 -141
- package/docs/forms/README.md +0 -88
- package/docs/forms/form-checkbox.md +0 -50
- package/docs/forms/form-datepicker.md +0 -50
- package/docs/forms/form-group.md +0 -80
- package/docs/forms/form-input.md +0 -55
- package/docs/forms/form-radio.md +0 -58
- package/docs/forms/form-select.md +0 -54
- package/docs/forms/form-spinbutton.md +0 -55
- package/docs/forms/form-switch.md +0 -47
- package/docs/forms/form-textarea.md +0 -51
- package/docs/forms/form-wysiwyg.md +0 -64
- package/docs/forms/input-group.md +0 -51
- package/docs/forms/validation.md +0 -599
- package/llms.txt +0 -422
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# useBreakpoints
|
|
2
|
-
|
|
3
|
-
A composable for programmatic breakpoint detection using standard Bootstrap grid sizes.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
import { useBreakpoints } from '@velkymx/vibeui'
|
|
9
|
-
|
|
10
|
-
const { isMobile, isTablet, isLg, isXxl } = useBreakpoints()
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## API
|
|
14
|
-
|
|
15
|
-
| Property | Type | Description |
|
|
16
|
-
|---|---|---|
|
|
17
|
-
| `isXs` | `ComputedRef<boolean>` | `true` if width < 576px |
|
|
18
|
-
| `isSm` | `Ref<boolean>` | `true` if width >= 576px |
|
|
19
|
-
| `isMd` | `Ref<boolean>` | `true` if width >= 768px |
|
|
20
|
-
| `isLg` | `Ref<boolean>` | `true` if width >= 992px |
|
|
21
|
-
| `isXl` | `Ref<boolean>` | `true` if width >= 1200px |
|
|
22
|
-
| `isXxl` | `Ref<boolean>` | `true` if width >= 1400px |
|
|
23
|
-
| `isMobile` | `ComputedRef<boolean>` | `true` if screen is `xs` or `sm` (width < 768px) |
|
|
24
|
-
| `isTablet` | `ComputedRef<boolean>` | `true` if screen is exactly `md` (768px - 991px) |
|
|
25
|
-
|
|
26
|
-
## Performance
|
|
27
|
-
This composable uses `window.matchMedia` listeners instead of `resize` events, making it highly performant and efficient. It automatically cleans up listeners when the component is unmounted.
|
|
28
|
-
|
|
29
|
-
## Example: Adaptive Layout
|
|
30
|
-
|
|
31
|
-
```vue
|
|
32
|
-
<template>
|
|
33
|
-
<div>
|
|
34
|
-
<!-- Show offcanvas navigation on mobile, standard nav on desktop -->
|
|
35
|
-
<VibeOffcanvas v-if="isMobile" v-model="showSidebar">
|
|
36
|
-
<MySidebarContent />
|
|
37
|
-
</VibeOffcanvas>
|
|
38
|
-
|
|
39
|
-
<VibeRow v-else>
|
|
40
|
-
<VibeCol cols="3">
|
|
41
|
-
<MySidebarContent />
|
|
42
|
-
</VibeCol>
|
|
43
|
-
<VibeCol cols="9">
|
|
44
|
-
<slot />
|
|
45
|
-
</VibeCol>
|
|
46
|
-
</VibeRow>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script setup>
|
|
51
|
-
import { useBreakpoints } from '@velkymx/vibeui'
|
|
52
|
-
const { isMobile } = useBreakpoints()
|
|
53
|
-
</script>
|
|
54
|
-
```
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# useColorMode
|
|
2
|
-
|
|
3
|
-
Manages Bootstrap 5.3 color modes (`light`, `dark`, `auto`) for the entire app. Sets the `data-bs-theme` attribute on `<html>`, persists the user's preference to `localStorage`, and provides a reactive ref that components can watch.
|
|
4
|
-
|
|
5
|
-
**Singleton** — every call to `useColorMode()` returns the same shared state. There is one active color mode per app.
|
|
6
|
-
|
|
7
|
-
## Import
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
import { useColorMode } from '@velkymx/vibeui'
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Return Values
|
|
14
|
-
|
|
15
|
-
| Name | Type | Description |
|
|
16
|
-
|---|---|---|
|
|
17
|
-
| `colorMode` | `Ref<ColorMode>` | Reactive current mode. Bind to template or watch for changes. |
|
|
18
|
-
| `setColorMode(mode)` | `(mode: ColorMode) => void` | Set a specific mode. Persists to `localStorage` and updates `<html data-bs-theme>`. |
|
|
19
|
-
| `toggleColorMode()` | `() => void` | Cycle through `light → dark → auto → light`. |
|
|
20
|
-
| `initColorMode()` | `() => void` | Restore the saved preference from `localStorage`. **Call once at app startup.** Subsequent calls are no-ops. |
|
|
21
|
-
| `onColorModeChange(cb)` | `(mode: ColorMode) => void` | Register a callback that fires whenever the mode changes. Useful for hybrid app status bars. |
|
|
22
|
-
|
|
23
|
-
## Type
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
type ColorMode = 'light' | 'dark' | 'auto'
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
| Value | Behavior |
|
|
30
|
-
|---|---|
|
|
31
|
-
| `'light'` | Forces light theme regardless of OS setting |
|
|
32
|
-
| `'dark'` | Forces dark theme regardless of OS setting |
|
|
33
|
-
| `'auto'` | Follows the OS `prefers-color-scheme` media query |
|
|
34
|
-
|
|
35
|
-
## Setup
|
|
36
|
-
|
|
37
|
-
Call `initColorMode()` once in `main.ts` before mounting the app. This restores the user's last saved preference.
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
// main.ts
|
|
41
|
-
import { createApp } from 'vue'
|
|
42
|
-
import VibeUI, { useColorMode } from '@velkymx/vibeui'
|
|
43
|
-
import 'bootstrap/dist/css/bootstrap.min.css'
|
|
44
|
-
import App from './App.vue'
|
|
45
|
-
|
|
46
|
-
const { initColorMode } = useColorMode()
|
|
47
|
-
initColorMode()
|
|
48
|
-
|
|
49
|
-
createApp(App).use(VibeUI).mount('#app')
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Usage
|
|
53
|
-
|
|
54
|
-
### Toggle button
|
|
55
|
-
|
|
56
|
-
The most common use case — a button that cycles through all three modes.
|
|
57
|
-
|
|
58
|
-
```vue
|
|
59
|
-
<script setup lang="ts">
|
|
60
|
-
import { useColorMode } from '@velkymx/vibeui'
|
|
61
|
-
|
|
62
|
-
const { colorMode, toggleColorMode } = useColorMode()
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<template>
|
|
66
|
-
<VibeButton variant="secondary" @click="toggleColorMode">
|
|
67
|
-
Theme: {{ colorMode }}
|
|
68
|
-
</VibeButton>
|
|
69
|
-
</template>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Explicit mode switcher
|
|
73
|
-
|
|
74
|
-
A select or set of buttons that lets the user pick a specific mode.
|
|
75
|
-
|
|
76
|
-
```vue
|
|
77
|
-
<script setup lang="ts">
|
|
78
|
-
import { useColorMode } from '@velkymx/vibeui'
|
|
79
|
-
import type { ColorMode } from '@velkymx/vibeui'
|
|
80
|
-
|
|
81
|
-
const { colorMode, setColorMode } = useColorMode()
|
|
82
|
-
|
|
83
|
-
const options: { label: string; value: ColorMode }[] = [
|
|
84
|
-
{ label: 'Light', value: 'light' },
|
|
85
|
-
{ label: 'Dark', value: 'dark' },
|
|
86
|
-
{ label: 'System', value: 'auto' },
|
|
87
|
-
]
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<template>
|
|
91
|
-
<div class="btn-group">
|
|
92
|
-
<VibeButton
|
|
93
|
-
v-for="option in options"
|
|
94
|
-
:key="option.value"
|
|
95
|
-
:variant="colorMode === option.value ? 'primary' : 'outline-secondary'"
|
|
96
|
-
@click="setColorMode(option.value)"
|
|
97
|
-
>
|
|
98
|
-
{{ option.label }}
|
|
99
|
-
</VibeButton>
|
|
100
|
-
</div>
|
|
101
|
-
</template>
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Watching for changes
|
|
105
|
-
|
|
106
|
-
React to color mode changes anywhere in the app — for example, to swap a chart theme.
|
|
107
|
-
|
|
108
|
-
```vue
|
|
109
|
-
<script setup lang="ts">
|
|
110
|
-
import { watch } from 'vue'
|
|
111
|
-
import { useColorMode } from '@velkymx/vibeui'
|
|
112
|
-
|
|
113
|
-
const { colorMode } = useColorMode()
|
|
114
|
-
|
|
115
|
-
watch(colorMode, (mode) => {
|
|
116
|
-
console.log('Color mode changed to:', mode)
|
|
117
|
-
// e.g. update a third-party chart library's theme
|
|
118
|
-
})
|
|
119
|
-
</script>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Scoping color mode to a single component
|
|
123
|
-
|
|
124
|
-
Bootstrap's `data-bs-theme` attribute works on any element, not just `<html>`. For cases where one section of the page should always be dark regardless of the app-level setting, apply it directly in the template instead of using the composable.
|
|
125
|
-
|
|
126
|
-
```vue
|
|
127
|
-
<template>
|
|
128
|
-
<div data-bs-theme="dark">
|
|
129
|
-
<!-- This section is always dark -->
|
|
130
|
-
<VibeCard>Always dark card</VibeCard>
|
|
131
|
-
</div>
|
|
132
|
-
</template>
|
|
133
|
-
```
|
|
134
|
-
## Behavior Notes
|
|
135
|
-
|
|
136
|
-
- **Persistence** — the selected mode is stored in `localStorage` under the key `vibe-color-mode`. It survives page reloads.
|
|
137
|
-
- **System Theme Reactivity** — when the mode is set to `'auto'`, VibeUI automatically listens for OS-level theme changes (via `matchMedia`) and updates the DOM immediately without a page reload.
|
|
138
|
-
- **SSR-safe** — all `document` and `localStorage` access is guarded. The composable is safe to import in server-rendered environments; `applyColorMode` simply does nothing when `document` is undefined.
|
|
139
|
-
...
|
|
140
|
-
- **Invalid values** — `setColorMode` silently ignores any value that is not `'light'`, `'dark'`, or `'auto'`. No error is thrown.
|
|
141
|
-
- **`initColorMode` is idempotent** — it is safe to call it multiple times (e.g. from multiple entry points). Only the first call reads `localStorage` and applies the theme. All subsequent calls are no-ops and do not overwrite changes the user made after initialization.
|
package/docs/forms/README.md
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# VibeUI Form Components
|
|
2
|
-
|
|
3
|
-
Comprehensive form components with built-in validation support for both front-end and API-based validation.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
VibeUI provides a complete set of form components that seamlessly integrate with Bootstrap styling and include powerful validation capabilities out of the box.
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
- ✅ **Full Bootstrap Integration** - Uses native Bootstrap classes and styling
|
|
12
|
-
- ✅ **Zero-Boilerplate IDs** - `id` props are now optional and automatically generated
|
|
13
|
-
- ✅ **Form Automation** - `VibeFormGroup` automatically links its label to child inputs via ID injection
|
|
14
|
-
- ✅ **Two-Way Data Binding** - v-model support on all components
|
|
15
|
-
- ✅ **Built-in Validation** - Comprehensive validation system with custom validators
|
|
16
|
-
- ✅ **Accessible** - Automatic ARIA attribute management and label linking
|
|
17
|
-
- ✅ **TypeScript** - Fully typed components and APIs
|
|
18
|
-
|
|
19
|
-
## Components
|
|
20
|
-
|
|
21
|
-
### Input Components
|
|
22
|
-
|
|
23
|
-
| Component | Description | Documentation |
|
|
24
|
-
|-----------|-------------|---------------|
|
|
25
|
-
| **VibeFormInput** | Text, email, password, number, and other input types | [Docs](./form-input.md) |
|
|
26
|
-
| **VibeInputGroup** | Input group for prepending/appending text or buttons | [Docs](./input-group.md) |
|
|
27
|
-
| **VibeFormTextarea** | Multi-line text input | [Docs](./form-textarea.md) |
|
|
28
|
-
| **VibeFormSelect** | Single and multiple selection dropdowns | [Docs](./form-select.md) |
|
|
29
|
-
| **VibeFormSpinbutton** | Number input with increment/decrement buttons | [Docs](./form-spinbutton.md) |
|
|
30
|
-
| **VibeFormDatepicker** | Date, time, and datetime inputs | [Docs](./form-datepicker.md) |
|
|
31
|
-
|
|
32
|
-
### Choice Components
|
|
33
|
-
|
|
34
|
-
| Component | Description | Documentation |
|
|
35
|
-
|-----------|-------------|---------------|
|
|
36
|
-
| **VibeFormCheckbox** | Single checkboxes and checkbox groups | [Docs](./form-checkbox.md) |
|
|
37
|
-
| **VibeFormRadio** | Radio button groups for exclusive selection | [Docs](./form-radio.md) |
|
|
38
|
-
| **VibeFormSwitch** | Toggle switches for boolean settings | [Docs](./form-switch.md) |
|
|
39
|
-
|
|
40
|
-
### Advanced Components
|
|
41
|
-
|
|
42
|
-
| Component | Description | Documentation |
|
|
43
|
-
|-----------|-------------|---------------|
|
|
44
|
-
| **VibeFormWysiwyg** | WYSIWYG editor powered by QuillJS | [Docs](./form-wysiwyg.md) |
|
|
45
|
-
| **VibeFormGroup** | Form group container for layout and automated label linking | [Docs](./form-group.md) |
|
|
46
|
-
|
|
47
|
-
## Quick Start
|
|
48
|
-
|
|
49
|
-
### Basic Example (Automated)
|
|
50
|
-
|
|
51
|
-
VibeUI automatically handles ID generation and label linking. No `id` or `label-for` is required when using `VibeFormGroup`.
|
|
52
|
-
|
|
53
|
-
```vue
|
|
54
|
-
<script setup lang="ts">
|
|
55
|
-
import { ref } from 'vue'
|
|
56
|
-
const email = ref('')
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<template>
|
|
60
|
-
<VibeFormGroup label="Email Address">
|
|
61
|
-
<VibeFormInput
|
|
62
|
-
v-model="email"
|
|
63
|
-
type="email"
|
|
64
|
-
placeholder="Enter email"
|
|
65
|
-
/>
|
|
66
|
-
</VibeFormGroup>
|
|
67
|
-
</template>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Documentation
|
|
71
|
-
|
|
72
|
-
### Component Documentation
|
|
73
|
-
|
|
74
|
-
- [VibeFormInput](./form-input.md) - Text inputs with validation
|
|
75
|
-
- [VibeInputGroup](./input-group.md) - Prepend/append groups
|
|
76
|
-
- [VibeFormSelect](./form-select.md) - Select dropdowns
|
|
77
|
-
- [VibeFormTextarea](./form-textarea.md) - Multi-line text input
|
|
78
|
-
- [VibeFormSpinbutton](./form-spinbutton.md) - Number input with buttons
|
|
79
|
-
- [VibeFormDatepicker](./form-datepicker.md) - Date and time inputs
|
|
80
|
-
- [VibeFormCheckbox](./form-checkbox.md) - Checkboxes and groups
|
|
81
|
-
- [VibeFormRadio](./form-radio.md) - Radio button groups
|
|
82
|
-
- [VibeFormSwitch](./form-switch.md) - Toggle switches
|
|
83
|
-
- [VibeFormGroup](./form-group.md) - Form group container
|
|
84
|
-
- [VibeFormWysiwyg](./form-wysiwyg.md) - WYSIWYG editor
|
|
85
|
-
|
|
86
|
-
### Guides
|
|
87
|
-
|
|
88
|
-
- [Validation Guide](./validation.md) - Comprehensive validation documentation
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# VibeFormCheckbox
|
|
2
|
-
|
|
3
|
-
Checkbox component for single boolean values or multiple selections.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { ref } from 'vue'
|
|
10
|
-
const agreed = ref(false)
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<VibeFormCheckbox
|
|
15
|
-
v-model="agreed"
|
|
16
|
-
label="I agree to the terms"
|
|
17
|
-
/>
|
|
18
|
-
</template>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Props
|
|
22
|
-
|
|
23
|
-
| Prop | Type | Default | Description |
|
|
24
|
-
|------|------|---------|-------------|
|
|
25
|
-
| `modelValue` | `any` | `false` | The checked state (v-model) |
|
|
26
|
-
| `value` | `any` | `true` | Value when checked |
|
|
27
|
-
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
28
|
-
| `label` | `String` | `undefined` | Label text |
|
|
29
|
-
| `disabled` | `Boolean` | `false` | Disable the checkbox |
|
|
30
|
-
| `required` | `Boolean` | `false` | Mark as required |
|
|
31
|
-
| `inline` | `Boolean` | `false` | Display inline |
|
|
32
|
-
| `indeterminate` | `Boolean` | `false` | Set indeterminate state |
|
|
33
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
34
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
35
|
-
| `validateOn` | `'change' \| 'blur'` | `'change'` | When to validate |
|
|
36
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
37
|
-
| `reverse` | `Boolean` | `false` | Reverse label and input |
|
|
38
|
-
|
|
39
|
-
## Important Notes
|
|
40
|
-
|
|
41
|
-
**Automatic ID Generation:** This component automatically generates a unique ID if one is not provided.
|
|
42
|
-
|
|
43
|
-
**Automatic ID Injection:** When used inside a `VibeFormGroup`, this component will automatically inherit the group's ID to ensure proper label association and accessibility.
|
|
44
|
-
|
|
45
|
-
## Bootstrap CSS Classes
|
|
46
|
-
|
|
47
|
-
- `.form-check`
|
|
48
|
-
- `.form-check-input`
|
|
49
|
-
- `.form-check-label`
|
|
50
|
-
- `.is-valid`, `.is-invalid`
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# VibeFormDatepicker
|
|
2
|
-
|
|
3
|
-
Date and time input component using native browser pickers.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { ref } from 'vue'
|
|
10
|
-
const date = ref('')
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<VibeFormDatepicker
|
|
15
|
-
v-model="date"
|
|
16
|
-
label="Choose a date"
|
|
17
|
-
/>
|
|
18
|
-
</template>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Props
|
|
22
|
-
|
|
23
|
-
| Prop | Type | Default | Description |
|
|
24
|
-
|------|------|---------|-------------|
|
|
25
|
-
| `modelValue` | `String` | `''` | The date string (v-model) |
|
|
26
|
-
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
27
|
-
| `label` | `String` | `undefined` | Label text |
|
|
28
|
-
| `disabled` | `Boolean` | `false` | Disable the picker |
|
|
29
|
-
| `readonly` | `Boolean` | `false` | Make readonly |
|
|
30
|
-
| `required` | `Boolean` | `false` | Mark as required |
|
|
31
|
-
| `min` | `String` | `undefined` | Minimum date |
|
|
32
|
-
| `max` | `String` | `undefined` | Maximum date |
|
|
33
|
-
| `size` | `'sm' \| 'lg'` | `undefined` | Picker size |
|
|
34
|
-
| `type` | `String` | `'date'` | Type: `'date'`, `'time'`, `'datetime-local'`, etc. |
|
|
35
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
36
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
37
|
-
| `validateOn` | `'input' \| 'blur' \| 'change'` | `'blur'` | When to validate |
|
|
38
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
39
|
-
|
|
40
|
-
## Important Notes
|
|
41
|
-
|
|
42
|
-
**Automatic ID Generation:** This component automatically generates a unique ID if one is not provided.
|
|
43
|
-
|
|
44
|
-
**Automatic ID Injection:** When used inside a `VibeFormGroup`, this component will automatically inherit the group's ID to ensure proper label association and accessibility.
|
|
45
|
-
|
|
46
|
-
## Bootstrap CSS Classes
|
|
47
|
-
|
|
48
|
-
- `.form-control`
|
|
49
|
-
- `.form-control-{size}`
|
|
50
|
-
- `.is-valid`, `.is-invalid`
|
package/docs/forms/form-group.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# VibeFormGroup
|
|
2
|
-
|
|
3
|
-
Form group container component for organizing form fields with labels, help text, and validation feedback.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
VibeFormGroup automatically links its label to the child VibeUI form component using automatic ID injection.
|
|
8
|
-
|
|
9
|
-
```vue
|
|
10
|
-
<script setup lang="ts">
|
|
11
|
-
import { ref } from 'vue'
|
|
12
|
-
const email = ref('')
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<VibeFormGroup
|
|
17
|
-
label="Email Address"
|
|
18
|
-
help-text="We'll never share your email with anyone else."
|
|
19
|
-
>
|
|
20
|
-
<VibeFormInput
|
|
21
|
-
v-model="email"
|
|
22
|
-
type="email"
|
|
23
|
-
placeholder="Enter email"
|
|
24
|
-
/>
|
|
25
|
-
</VibeFormGroup>
|
|
26
|
-
</template>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Floating Labels
|
|
30
|
-
|
|
31
|
-
```vue
|
|
32
|
-
<template>
|
|
33
|
-
<VibeFormGroup
|
|
34
|
-
label="Email Address"
|
|
35
|
-
floating
|
|
36
|
-
>
|
|
37
|
-
<VibeFormInput
|
|
38
|
-
v-model="email"
|
|
39
|
-
type="email"
|
|
40
|
-
placeholder="name@example.com"
|
|
41
|
-
/>
|
|
42
|
-
</VibeFormGroup>
|
|
43
|
-
</template>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Horizontal Layout
|
|
47
|
-
|
|
48
|
-
```vue
|
|
49
|
-
<template>
|
|
50
|
-
<VibeFormGroup
|
|
51
|
-
label="Email"
|
|
52
|
-
row
|
|
53
|
-
:label-cols="3"
|
|
54
|
-
label-align="end"
|
|
55
|
-
>
|
|
56
|
-
<VibeFormInput v-model="email" type="email" />
|
|
57
|
-
</VibeFormGroup>
|
|
58
|
-
</template>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Important Notes
|
|
62
|
-
|
|
63
|
-
**Automatic ID Injection:** VibeFormGroup uses Vue's provide/inject to share a unique ID with its child VibeUI components (like `VibeFormInput`, `VibeFormSelect`, etc.). This ensures that labels and ARIA attributes are correctly linked without requiring manual `id` or `label-for` props.
|
|
64
|
-
|
|
65
|
-
**Manual Linking:** If you are using native HTML elements instead of VibeUI components inside the group, you must still provide a `label-for` on the group and a matching `id` on your element.
|
|
66
|
-
|
|
67
|
-
## Props
|
|
68
|
-
|
|
69
|
-
| Prop | Type | Default | Description |
|
|
70
|
-
|------|------|---------|-------------|
|
|
71
|
-
| `label` | `String` | `undefined` | Label text |
|
|
72
|
-
| `labelFor` | `String` | `Auto-generated` | ID of the form control |
|
|
73
|
-
| `required` | `Boolean` | `false` | Show required asterisk |
|
|
74
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
75
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
76
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
77
|
-
| `floating` | `Boolean` | `false` | Use floating label layout |
|
|
78
|
-
| `row` | `Boolean` | `false` | Use horizontal row layout |
|
|
79
|
-
| `labelCols` | `Number \| String` | `undefined` | Number of columns for label (1-12) |
|
|
80
|
-
| `labelAlign` | `'start' \| 'center' \| 'end'` | `undefined` | Label text alignment |
|
package/docs/forms/form-input.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# VibeFormInput
|
|
2
|
-
|
|
3
|
-
Text input component with built-in validation support for various input types.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { ref } from 'vue'
|
|
10
|
-
const name = ref('')
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<VibeFormInput
|
|
15
|
-
v-model="name"
|
|
16
|
-
label="Full Name"
|
|
17
|
-
placeholder="Enter your name"
|
|
18
|
-
/>
|
|
19
|
-
</template>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
|------|------|---------|-------------|
|
|
26
|
-
| `modelValue` | `String \| Number` | `''` | The input value (v-model) |
|
|
27
|
-
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
28
|
-
| `label` | `String` | `undefined` | Label text |
|
|
29
|
-
| `type` | `InputType` | `'text'` | HTML input type |
|
|
30
|
-
| `placeholder` | `String` | `undefined` | Placeholder text |
|
|
31
|
-
| `disabled` | `Boolean` | `false` | Disable the input |
|
|
32
|
-
| `readonly` | `Boolean` | `false` | Make the input readonly |
|
|
33
|
-
| `required` | `Boolean` | `false` | Mark as required |
|
|
34
|
-
| `size` | `'sm' \| 'lg'` | `undefined` | Input size |
|
|
35
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
36
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
37
|
-
| `validateOn` | `'input' \| 'blur' \| 'change'` | `'blur'` | When to validate |
|
|
38
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
39
|
-
| `plaintext` | `Boolean` | `false` | Display as plain text |
|
|
40
|
-
| `noWrapper` | `Boolean` | `false` | Removes the wrapping div, label, and feedback. Useful inside `VibeInputGroup`. |
|
|
41
|
-
| `focusRing` | `Boolean` | `false` | Enable the Bootstrap 5.3 focus-ring helper |
|
|
42
|
-
|
|
43
|
-
## Important Notes
|
|
44
|
-
|
|
45
|
-
**Automatic ID Generation:** This component automatically generates a unique ID if one is not provided.
|
|
46
|
-
|
|
47
|
-
**Automatic ID Injection:** When used inside a `VibeFormGroup`, this component will automatically inherit the group's ID to ensure proper label association and accessibility.
|
|
48
|
-
|
|
49
|
-
## Bootstrap CSS Classes
|
|
50
|
-
|
|
51
|
-
- `.form-control`
|
|
52
|
-
- `.form-control-{size}`
|
|
53
|
-
- `.is-valid`, `.is-invalid`
|
|
54
|
-
- `.form-control-plaintext`
|
|
55
|
-
- `.focus-ring`
|
package/docs/forms/form-radio.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# VibeFormRadio
|
|
2
|
-
|
|
3
|
-
Radio button component for exclusive selection within a group.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { ref } from 'vue'
|
|
10
|
-
const picked = ref('one')
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<VibeFormRadio
|
|
15
|
-
v-model="picked"
|
|
16
|
-
name="myGroup"
|
|
17
|
-
value="one"
|
|
18
|
-
label="Option One"
|
|
19
|
-
/>
|
|
20
|
-
<VibeFormRadio
|
|
21
|
-
v-model="picked"
|
|
22
|
-
name="myGroup"
|
|
23
|
-
value="two"
|
|
24
|
-
label="Option Two"
|
|
25
|
-
/>
|
|
26
|
-
</template>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Props
|
|
30
|
-
|
|
31
|
-
| Prop | Type | Default | Description |
|
|
32
|
-
|------|------|---------|-------------|
|
|
33
|
-
| `modelValue` | `any` | `''` | The picked value (v-model) |
|
|
34
|
-
| `value` | `any` | Required | Value of this radio |
|
|
35
|
-
| `name` | `String` | Required | Shared name for the radio group |
|
|
36
|
-
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
37
|
-
| `label` | `String` | `undefined` | Label text |
|
|
38
|
-
| `disabled` | `Boolean` | `false` | Disable the radio |
|
|
39
|
-
| `required` | `Boolean` | `false` | Mark as required |
|
|
40
|
-
| `inline` | `Boolean` | `false` | Display inline |
|
|
41
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
42
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
43
|
-
| `validateOn` | `'change' \| 'blur'` | `'change'` | When to validate |
|
|
44
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
45
|
-
| `reverse` | `Boolean` | `false` | Reverse label and input |
|
|
46
|
-
|
|
47
|
-
## Important Notes
|
|
48
|
-
|
|
49
|
-
**Automatic ID Generation:** This component automatically generates a unique ID if one is not provided.
|
|
50
|
-
|
|
51
|
-
**Automatic ID Injection:** When used inside a `VibeFormGroup`, this component will automatically inherit the group's ID to ensure proper label association and accessibility.
|
|
52
|
-
|
|
53
|
-
## Bootstrap CSS Classes
|
|
54
|
-
|
|
55
|
-
- `.form-check`
|
|
56
|
-
- `.form-check-input`
|
|
57
|
-
- `.form-check-label`
|
|
58
|
-
- `.is-valid`, `.is-invalid`
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# VibeFormSelect
|
|
2
|
-
|
|
3
|
-
Custom select component with support for single and multiple selection.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { ref } from 'vue'
|
|
10
|
-
const selected = ref('')
|
|
11
|
-
const options = [
|
|
12
|
-
{ value: '1', text: 'Option 1' },
|
|
13
|
-
{ value: '2', text: 'Option 2' }
|
|
14
|
-
]
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<VibeFormSelect
|
|
19
|
-
v-model="selected"
|
|
20
|
-
label="Choose an option"
|
|
21
|
-
:options="options"
|
|
22
|
-
/>
|
|
23
|
-
</template>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
| Prop | Type | Default | Description |
|
|
29
|
-
|------|------|---------|-------------|
|
|
30
|
-
| `modelValue` | `any` | `''` | Selected value (v-model) |
|
|
31
|
-
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
32
|
-
| `label` | `String` | `undefined` | Label text |
|
|
33
|
-
| `options` | `FormSelectOption[]` | `[]` | Array of options |
|
|
34
|
-
| `multiple` | `Boolean` | `false` | Enable multiple selection |
|
|
35
|
-
| `selectSize` | `Number` | `undefined` | Visible rows |
|
|
36
|
-
| `disabled` | `Boolean` | `false` | Disable the select |
|
|
37
|
-
| `required` | `Boolean` | `false` | Mark as required |
|
|
38
|
-
| `size` | `'sm' \| 'lg'` | `undefined` | Select size |
|
|
39
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
40
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
41
|
-
| `validateOn` | `'change' \| 'blur'` | `'change'` | When to validate |
|
|
42
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
43
|
-
|
|
44
|
-
## Important Notes
|
|
45
|
-
|
|
46
|
-
**Automatic ID Generation:** This component automatically generates a unique ID if one is not provided.
|
|
47
|
-
|
|
48
|
-
**Automatic ID Injection:** When used inside a `VibeFormGroup`, this component will automatically inherit the group's ID to ensure proper label association and accessibility.
|
|
49
|
-
|
|
50
|
-
## Bootstrap CSS Classes
|
|
51
|
-
|
|
52
|
-
- `.form-select`
|
|
53
|
-
- `.form-select-{size}`
|
|
54
|
-
- `.is-valid`, `.is-invalid`
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# VibeFormSpinbutton
|
|
2
|
-
|
|
3
|
-
Numeric input component with increment and decrement buttons.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```vue
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { ref } from 'vue'
|
|
10
|
-
const count = ref(0)
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<VibeFormSpinbutton
|
|
15
|
-
v-model="count"
|
|
16
|
-
label="Quantity"
|
|
17
|
-
:min="0"
|
|
18
|
-
:max="10"
|
|
19
|
-
/>
|
|
20
|
-
</template>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| Prop | Type | Default | Description |
|
|
26
|
-
|------|------|---------|-------------|
|
|
27
|
-
| `modelValue` | `Number` | `0` | The numeric value (v-model) |
|
|
28
|
-
| `id` | `String` | `Auto-generated` | Unique identifier |
|
|
29
|
-
| `label` | `String` | `undefined` | Label text |
|
|
30
|
-
| `disabled` | `Boolean` | `false` | Disable the spinbutton |
|
|
31
|
-
| `readonly` | `Boolean` | `false` | Make readonly |
|
|
32
|
-
| `required` | `Boolean` | `false` | Mark as required |
|
|
33
|
-
| `min` | `Number` | `undefined` | Minimum value |
|
|
34
|
-
| `max` | `Number` | `undefined` | Maximum value |
|
|
35
|
-
| `step` | `Number` | `1` | Increment/decrement step |
|
|
36
|
-
| `size` | `'sm' \| 'lg'` | `undefined` | Button and input size |
|
|
37
|
-
| `wrap` | `Boolean` | `false` | Wrap around when min/max reached |
|
|
38
|
-
| `vertical` | `Boolean` | `false` | Stack buttons vertically |
|
|
39
|
-
| `validationState` | `'valid' \| 'invalid' \| null` | `null` | Validation state |
|
|
40
|
-
| `validationMessage` | `String` | `undefined` | Validation message |
|
|
41
|
-
| `validateOn` | `'input' \| 'blur' \| 'change'` | `'blur'` | When to validate |
|
|
42
|
-
| `helpText` | `String` | `undefined` | Help text |
|
|
43
|
-
|
|
44
|
-
## Important Notes
|
|
45
|
-
|
|
46
|
-
**Automatic ID Generation:** This component automatically generates a unique ID if one is not provided.
|
|
47
|
-
|
|
48
|
-
**Automatic ID Injection:** When used inside a `VibeFormGroup`, this component will automatically inherit the group's ID to ensure proper label association and accessibility.
|
|
49
|
-
|
|
50
|
-
## Bootstrap CSS Classes
|
|
51
|
-
|
|
52
|
-
- `.form-control`
|
|
53
|
-
- `.input-group`
|
|
54
|
-
- `.btn`
|
|
55
|
-
- `.is-valid`, `.is-invalid`
|