@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.
Files changed (205) hide show
  1. package/AGENTS.md +44 -0
  2. package/CLAUDE.md +48 -0
  3. package/README.md +222 -197
  4. package/dist/purify.es-1D-VntFD.mjs +679 -0
  5. package/dist/src/App.vue.d.ts +3 -0
  6. package/dist/src/components/HelloWorld.vue.d.ts +6 -0
  7. package/dist/src/components/VibeAccordion.vue.d.ts +89 -0
  8. package/dist/{components → src/components}/VibeAlert.vue.d.ts +18 -34
  9. package/dist/src/components/VibeAutocomplete.vue.d.ts +74 -0
  10. package/dist/{components → src/components}/VibeBadge.vue.d.ts +10 -18
  11. package/dist/src/components/VibeBreadcrumb.vue.d.ts +51 -0
  12. package/dist/{components → src/components}/VibeButton.vue.d.ts +13 -17
  13. package/dist/{components → src/components}/VibeButtonGroup.vue.d.ts +10 -18
  14. package/dist/{components → src/components}/VibeCard.vue.d.ts +51 -24
  15. package/dist/{components → src/components}/VibeCarousel.vue.d.ts +27 -49
  16. package/dist/src/components/VibeChartBar.vue.d.ts +61 -0
  17. package/dist/src/components/VibeChartLine.vue.d.ts +70 -0
  18. package/dist/src/components/VibeChartPie.vue.d.ts +34 -0
  19. package/dist/{components → src/components}/VibeCloseButton.vue.d.ts +9 -7
  20. package/dist/{components → src/components}/VibeCol.vue.d.ts +9 -17
  21. package/dist/src/components/VibeCollapse.vue.d.ts +76 -0
  22. package/dist/src/components/VibeContainer.vue.d.ts +36 -0
  23. package/dist/src/components/VibeDataTable.vue.d.ts +131 -0
  24. package/dist/{components → src/components}/VibeDatePicker.vue.d.ts +4 -6
  25. package/dist/{components → src/components}/VibeDraggable.vue.d.ts +9 -13
  26. package/dist/{components → src/components}/VibeDropdown.vue.d.ts +46 -43
  27. package/dist/{components → src/components}/VibeDroppable.vue.d.ts +9 -13
  28. package/dist/{components → src/components}/VibeFileInput.vue.d.ts +14 -20
  29. package/dist/{components → src/components}/VibeFormCheckbox.vue.d.ts +29 -21
  30. package/dist/{components → src/components}/VibeFormDatepicker.vue.d.ts +26 -29
  31. package/dist/{components → src/components}/VibeFormGroup.vue.d.ts +10 -13
  32. package/dist/{components → src/components}/VibeFormInput.vue.d.ts +22 -23
  33. package/dist/{components → src/components}/VibeFormRadio.vue.d.ts +22 -23
  34. package/dist/{components → src/components}/VibeFormSelect.vue.d.ts +27 -33
  35. package/dist/{components → src/components}/VibeFormSpinbutton.vue.d.ts +30 -33
  36. package/dist/{components → src/components}/VibeFormSwitch.vue.d.ts +21 -22
  37. package/dist/{components → src/components}/VibeFormTextarea.vue.d.ts +23 -24
  38. package/dist/{components → src/components}/VibeFormWysiwyg.vue.d.ts +22 -21
  39. package/dist/src/components/VibeHero.vue.d.ts +108 -0
  40. package/dist/{components → src/components}/VibeIcon.vue.d.ts +27 -7
  41. package/dist/{components → src/components}/VibeInputGroup.vue.d.ts +11 -13
  42. package/dist/{components → src/components}/VibeLink.vue.d.ts +14 -18
  43. package/dist/{components → src/components}/VibeListGroup.vue.d.ts +26 -22
  44. package/dist/{components → src/components}/VibeModal.vue.d.ts +29 -45
  45. package/dist/{components → src/components}/VibeNav.vue.d.ts +40 -20
  46. package/dist/{components → src/components}/VibeNavbar.vue.d.ts +12 -19
  47. package/dist/src/components/VibeNavbarBrand.vue.d.ts +34 -0
  48. package/dist/src/components/VibeNavbarNav.vue.d.ts +80 -0
  49. package/dist/{components → src/components}/VibeNavbarToggle.vue.d.ts +7 -5
  50. package/dist/{components → src/components}/VibeOffcanvas.vue.d.ts +28 -43
  51. package/dist/{components → src/components}/VibePagination.vue.d.ts +38 -29
  52. package/dist/{components → src/components}/VibePlaceholder.vue.d.ts +9 -17
  53. package/dist/src/components/VibePopover.vue.d.ts +72 -0
  54. package/dist/src/components/VibeProgress.vue.d.ts +37 -0
  55. package/dist/{components → src/components}/VibeResizable.vue.d.ts +10 -14
  56. package/dist/{components → src/components}/VibeRow.vue.d.ts +9 -17
  57. package/dist/src/components/VibeScrollspy.vue.d.ts +89 -0
  58. package/dist/{components → src/components}/VibeSkeleton.vue.d.ts +2 -1
  59. package/dist/{components → src/components}/VibeSlider.vue.d.ts +4 -5
  60. package/dist/src/components/VibeSortable.vue.d.ts +59 -0
  61. package/dist/{components → src/components}/VibeSpinner.vue.d.ts +4 -7
  62. package/dist/{components → src/components}/VibeStepper.vue.d.ts +32 -31
  63. package/dist/{components → src/components}/VibeTab.vue.d.ts +7 -11
  64. package/dist/src/components/VibeTabContent.vue.d.ts +56 -0
  65. package/dist/{components → src/components}/VibeTabs.vue.d.ts +9 -13
  66. package/dist/{components → src/components}/VibeToast.vue.d.ts +31 -44
  67. package/dist/{components → src/components}/VibeToastHost.vue.d.ts +2 -1
  68. package/dist/src/components/VibeTooltip.vue.d.ts +63 -0
  69. package/dist/src/components/chart/chartColors.d.ts +3 -0
  70. package/dist/src/components/chart/chartResize.d.ts +2 -0
  71. package/dist/src/components/chart/chartTooltip.d.ts +2 -0
  72. package/dist/src/components/chart/chartTypes.d.ts +6 -0
  73. package/dist/src/components/chart/drawBar.d.ts +5 -0
  74. package/dist/src/components/chart/drawLine.d.ts +18 -0
  75. package/dist/src/components/chart/drawPie.d.ts +4 -0
  76. package/dist/{components → src/components}/dndStore.d.ts +1 -0
  77. package/dist/{components → src/components}/index.d.ts +5 -1
  78. package/dist/{composables → src/composables}/useBreakpoints.d.ts +1 -0
  79. package/dist/{composables → src/composables}/useColorMode.d.ts +1 -1
  80. package/dist/src/composables/useId.d.ts +2 -0
  81. package/dist/{directives → src/directives}/vTooltip.d.ts +2 -3
  82. package/dist/src/injectionKeys.d.ts +28 -0
  83. package/dist/{types.d.ts → src/types.d.ts} +21 -2
  84. package/dist/src/utils/safeCss.d.ts +16 -0
  85. package/dist/src/utils/safeHref.d.ts +7 -0
  86. package/dist/src/utils/sanitizeHtml.d.ts +13 -0
  87. package/dist/vibeui.css +2 -1
  88. package/dist/vibeui.es.js +8269 -5855
  89. package/dist/vibeui.umd.js +3 -1
  90. package/docs/README.md +225 -0
  91. package/docs/components/advanced/popover.md +125 -0
  92. package/docs/components/advanced/scrollspy.md +106 -0
  93. package/docs/components/advanced/tooltip.md +90 -0
  94. package/docs/components/card/card.md +223 -0
  95. package/docs/components/charts/chart-bar.md +129 -0
  96. package/docs/components/charts/chart-line.md +136 -0
  97. package/docs/components/charts/chart-pie.md +102 -0
  98. package/docs/components/core/alert.md +94 -0
  99. package/docs/components/core/badge.md +75 -0
  100. package/docs/components/core/button-group.md +99 -0
  101. package/docs/components/core/button.md +127 -0
  102. package/docs/components/core/close-button.md +82 -0
  103. package/docs/components/core/link.md +79 -0
  104. package/docs/components/core/placeholder.md +129 -0
  105. package/docs/components/core/skeleton.md +40 -0
  106. package/docs/components/core/spinner.md +103 -0
  107. package/docs/components/data/datatable.md +435 -0
  108. package/docs/components/hero/hero.md +64 -0
  109. package/docs/components/interactive/accordion.md +121 -0
  110. package/docs/components/interactive/carousel.md +112 -0
  111. package/docs/components/interactive/collapse.md +106 -0
  112. package/docs/components/interactive/date-picker.md +78 -0
  113. package/docs/components/interactive/draggable.md +91 -0
  114. package/docs/components/interactive/dropdown.md +129 -0
  115. package/docs/components/interactive/modal.md +143 -0
  116. package/docs/components/interactive/offcanvas.md +92 -0
  117. package/docs/components/interactive/resizable.md +73 -0
  118. package/docs/components/interactive/slider.md +57 -0
  119. package/docs/components/interactive/sortable.md +52 -0
  120. package/docs/components/interactive/stepper.md +83 -0
  121. package/docs/components/interactive/tabs.md +66 -0
  122. package/docs/components/interactive/toast.md +177 -0
  123. package/docs/components/layout/col.md +117 -0
  124. package/docs/components/layout/container.md +53 -0
  125. package/docs/components/layout/row.md +107 -0
  126. package/docs/components/list/list-group.md +225 -0
  127. package/docs/components/navigation/breadcrumb.md +120 -0
  128. package/docs/components/navigation/nav.md +151 -0
  129. package/docs/components/navigation/navbar.md +108 -0
  130. package/docs/components/navigation/pagination.md +162 -0
  131. package/docs/components/progress/progress.md +188 -0
  132. package/docs/composables/back-button.md +28 -0
  133. package/docs/composables/breakpoints.md +54 -0
  134. package/docs/composables/color-mode.md +179 -0
  135. package/docs/composables/use-form.md +78 -0
  136. package/docs/composables/use-position.md +68 -0
  137. package/docs/composables/use-toast.md +91 -0
  138. package/docs/directives/v-tooltip.md +58 -0
  139. package/docs/forms/README.md +87 -0
  140. package/docs/forms/autocomplete.md +96 -0
  141. package/docs/forms/file-input.md +97 -0
  142. package/docs/forms/form-checkbox.md +100 -0
  143. package/docs/forms/form-datepicker.md +80 -0
  144. package/docs/forms/form-group.md +115 -0
  145. package/docs/forms/form-input.md +112 -0
  146. package/docs/forms/form-radio.md +82 -0
  147. package/docs/forms/form-select.md +98 -0
  148. package/docs/forms/form-spinbutton.md +94 -0
  149. package/docs/forms/form-switch.md +75 -0
  150. package/docs/forms/form-textarea.md +82 -0
  151. package/docs/forms/form-wysiwyg.md +99 -0
  152. package/docs/forms/input-group.md +70 -0
  153. package/docs/forms/validation.md +213 -0
  154. package/docs/getting-started/starter-template.md +136 -0
  155. package/docs/superpowers/plans/2026-05-12-vibe-charts.md +1999 -0
  156. package/docs/superpowers/plans/2026-05-29-e2e-browser-testing.md +615 -0
  157. package/docs/superpowers/specs/2026-05-12-charting-design.md +185 -0
  158. package/docs/superpowers/specs/2026-05-29-e2e-browser-testing-design.md +168 -0
  159. package/docs/utilities/position.md +82 -0
  160. package/docs/versioning.md +57 -0
  161. package/examples/README.md +201 -0
  162. package/examples/album.html +262 -0
  163. package/examples/blog.html +166 -0
  164. package/examples/carousel.html +114 -0
  165. package/examples/checkout.html +275 -0
  166. package/examples/cover.html +89 -0
  167. package/examples/dashboard.html +156 -0
  168. package/examples/index.html +129 -0
  169. package/examples/jumbotron.html +56 -0
  170. package/examples/mobile-dashboard.html +138 -0
  171. package/examples/pricing.html +172 -0
  172. package/examples/product.html +145 -0
  173. package/examples/sidebars.html +166 -0
  174. package/examples/sign-in.html +119 -0
  175. package/examples/starter.html +314 -0
  176. package/examples/sticky-footer-navbar.html +70 -0
  177. package/examples/sticky-footer.html +60 -0
  178. package/examples/test-simple.html +91 -0
  179. package/llms.txt +782 -0
  180. package/package.json +44 -14
  181. package/dist/App.vue.d.ts +0 -2
  182. package/dist/components/HelloWorld.vue.d.ts +0 -5
  183. package/dist/components/VibeAccordion.vue.d.ts +0 -90
  184. package/dist/components/VibeAutocomplete.vue.d.ts +0 -46
  185. package/dist/components/VibeBreadcrumb.vue.d.ts +0 -47
  186. package/dist/components/VibeCollapse.vue.d.ts +0 -84
  187. package/dist/components/VibeContainer.vue.d.ts +0 -44
  188. package/dist/components/VibeDataTable.vue.d.ts +0 -76
  189. package/dist/components/VibeNavbarBrand.vue.d.ts +0 -42
  190. package/dist/components/VibeNavbarNav.vue.d.ts +0 -61
  191. package/dist/components/VibePopover.vue.d.ts +0 -95
  192. package/dist/components/VibeProgress.vue.d.ts +0 -45
  193. package/dist/components/VibeScrollspy.vue.d.ts +0 -77
  194. package/dist/components/VibeSortable.vue.d.ts +0 -40
  195. package/dist/components/VibeTabContent.vue.d.ts +0 -74
  196. package/dist/components/VibeTooltip.vue.d.ts +0 -86
  197. package/dist/composables/useId.d.ts +0 -5
  198. package/dist/types/index.d.ts +0 -6
  199. /package/dist/{composables → src/composables}/useBackButton.d.ts +0 -0
  200. /package/dist/{composables → src/composables}/useForm.d.ts +0 -0
  201. /package/dist/{composables → src/composables}/useFormValidation.d.ts +0 -0
  202. /package/dist/{composables → src/composables}/usePosition.d.ts +0 -0
  203. /package/dist/{composables → src/composables}/useToast.d.ts +0 -0
  204. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  205. /package/dist/{main.d.ts → src/main.d.ts} +0 -0
@@ -0,0 +1,120 @@
1
+ # VibeBreadcrumb
2
+
3
+ Data-driven breadcrumb navigation to indicate the current page's location within a navigational hierarchy.
4
+
5
+ ## Props
6
+
7
+ | Prop | Type | Default | Description |
8
+ |------|------|---------|-------------|
9
+ | `ariaLabel` | `String` | `'breadcrumb'` | ARIA label for navigation |
10
+ | `items` | `BreadcrumbItem[]` | Required | Array of breadcrumb items |
11
+
12
+ ### BreadcrumbItem Interface
13
+
14
+ ```typescript
15
+ interface BreadcrumbItem {
16
+ text: string
17
+ href?: string
18
+ to?: string | object
19
+ active?: boolean
20
+ }
21
+ ```
22
+
23
+ ## Events
24
+
25
+ | Event | Payload | Description |
26
+ |-------|---------|-------------|
27
+ | `item-click` | `{ item, index, event }` | Emitted when an item is clicked (unless active) |
28
+
29
+ ## Slots
30
+
31
+ | Slot | Scope | Description |
32
+ |------|-------|-------------|
33
+ | `item` | `{ item, index }` | Custom item rendering |
34
+
35
+ ## Usage
36
+
37
+ ### Basic Example
38
+
39
+ ```vue
40
+ <template>
41
+ <VibeBreadcrumb :items="breadcrumbItems" />
42
+ </template>
43
+
44
+ <script setup>
45
+ const breadcrumbItems = [
46
+ { text: 'Home', href: '/' },
47
+ { text: 'Library', href: '/library' },
48
+ { text: 'Data', active: true }
49
+ ]
50
+ </script>
51
+ ```
52
+
53
+ ### With Router Links
54
+
55
+ ```vue
56
+ <template>
57
+ <VibeBreadcrumb :items="breadcrumbItems" />
58
+ </template>
59
+
60
+ <script setup>
61
+ const breadcrumbItems = [
62
+ { text: 'Home', to: { name: 'home' } },
63
+ { text: 'Products', to: { name: 'products' } },
64
+ { text: 'Details', active: true }
65
+ ]
66
+ </script>
67
+ ```
68
+
69
+ ### Custom Item Rendering
70
+
71
+ Use the `item` scoped slot for custom rendering:
72
+
73
+ ```vue
74
+ <template>
75
+ <VibeBreadcrumb :items="breadcrumbItems">
76
+ <template #item="{ item, index }">
77
+ <VibeIcon v-if="item.icon" :icon="item.icon" class="me-1" />
78
+ {{ item.text }}
79
+ </template>
80
+ </VibeBreadcrumb>
81
+ </template>
82
+
83
+ <script setup>
84
+ const breadcrumbItems = [
85
+ { text: 'Home', href: '/', icon: 'house-fill' },
86
+ { text: 'Library', href: '/library', icon: 'book' },
87
+ { text: 'Data', active: true, icon: 'file-earmark' }
88
+ ]
89
+ </script>
90
+ ```
91
+
92
+ ### With Event Handling
93
+
94
+ ```vue
95
+ <template>
96
+ <VibeBreadcrumb :items="breadcrumbItems" @item-click="handleClick" />
97
+ </template>
98
+
99
+ <script setup>
100
+ const breadcrumbItems = [
101
+ { text: 'Home', href: '/' },
102
+ { text: 'Products', href: '/products' },
103
+ { text: 'Details', active: true }
104
+ ]
105
+
106
+ const handleClick = ({ item, index }) => {
107
+ console.log(`Clicked: ${item.text} at index ${index}`)
108
+ }
109
+ </script>
110
+ ```
111
+
112
+ ## Important Notes
113
+
114
+ **`href` sanitization:** Item `href` values are sanitized. Only `https?://`, root-relative (`/path`), relative (`./`, `../`), and anchor (`#anchor`) URLs are allowed. `javascript:`, `data:`, and protocol-relative (`//`) URLs are stripped — such items render as plain text instead of links. Use `to` for Vue Router navigation.
115
+
116
+ ## Bootstrap CSS Classes
117
+
118
+ - `.breadcrumb`
119
+ - `.breadcrumb-item`
120
+ - `.active`
@@ -0,0 +1,151 @@
1
+ # VibeNav
2
+
3
+ Data-driven navigation tabs and pills for organizing content.
4
+
5
+ ## Props
6
+
7
+ | Prop | Type | Default | Description |
8
+ |------|------|---------|-------------|
9
+ | `tabs` | `Boolean` | `false` | Use tabs style |
10
+ | `pills` | `Boolean` | `false` | Use pills style |
11
+ | `underline` | `Boolean` | `false` | Use the new Bootstrap 5.3 underline style |
12
+ | `fill` | `Boolean` | `false` | Fill available width proportionally |
13
+ | `justified` | `Boolean` | `false` | Fill available width equally |
14
+ | `vertical` | `Boolean` | `false` | Stack navigation vertically |
15
+ | `tag` | `String` | `'ul'` | HTML tag to render |
16
+ | `items` | `NavItem[]` | Required | Array of nav items |
17
+
18
+ ### NavItem Interface
19
+
20
+ ```typescript
21
+ interface NavItem {
22
+ text: string
23
+ href?: string
24
+ to?: string | object
25
+ /** Tab panel selector (e.g. '#panel-id') for tabs/pills mode with router-link items */
26
+ target?: string
27
+ active?: boolean
28
+ disabled?: boolean
29
+ children?: NavItem[] // Support for dropdowns
30
+ }
31
+ ```
32
+
33
+ ## Events
34
+
35
+ | Event | Payload | Description |
36
+ |-------|---------|-------------|
37
+ | `item-click` | `{ item, index, event }` | Emitted when item is clicked |
38
+ | `show` | `event` | Emitted when a tab starts showing |
39
+ | `shown` | `event` | Emitted when a tab is fully shown |
40
+ | `hide` | `event` | Emitted when a tab starts hiding |
41
+ | `hidden` | `event` | Emitted when a tab is fully hidden |
42
+
43
+ ## Slots
44
+
45
+ | Slot | Scope | Description |
46
+ |------|-------|-------------|
47
+ | `item` | `{ item, index }` | Custom item rendering |
48
+
49
+ ## Usage
50
+
51
+ ### Custom item content (`#item` slot)
52
+
53
+ Use the `item` slot to render richer nav links — e.g. an icon next to the label. The slot is scoped with `{ item, index }`.
54
+
55
+ ```vue
56
+ <template>
57
+ <VibeNav :items="navItems">
58
+ <template #item="{ item }">
59
+ <VibeIcon :icon="item.icon" class="me-2" />
60
+ {{ item.text }}
61
+ </template>
62
+ </VibeNav>
63
+ </template>
64
+
65
+ <script setup>
66
+ const navItems = [
67
+ { text: 'Home', href: '#', icon: 'house', active: true },
68
+ { text: 'Profile', href: '#', icon: 'person' }
69
+ ]
70
+ </script>
71
+ ```
72
+
73
+ ### Interactive Tabs
74
+
75
+ When using the `tabs` or `pills` props, nav links with an `href` starting with `#` will automatically act as Bootstrap tab triggers.
76
+
77
+ ```vue
78
+ <template>
79
+ <div>
80
+ <VibeNav tabs :items="navItems" />
81
+
82
+ <VibeTabContent :panes="tabPanes" class="mt-3" />
83
+ </div>
84
+ </template>
85
+
86
+ <script setup>
87
+ const navItems = [
88
+ { text: 'Home', href: '#home', active: true },
89
+ { text: 'Profile', href: '#profile' }
90
+ ]
91
+
92
+ const tabPanes = [
93
+ { id: 'home', content: 'Home content...', active: true },
94
+ { id: 'profile', content: 'Profile content...' }
95
+ ]
96
+ </script>
97
+ ```
98
+
99
+ ### Tabs with Vue Router Links
100
+
101
+ Items using `to` (router-link) also work in tabs/pills mode. Provide a `target` field pointing to the panel ID, and Bootstrap Tab events (`show`, `shown`, `hide`, `hidden`) will fire correctly:
102
+
103
+ ```vue
104
+ <template>
105
+ <VibeNav tabs :items="navItems" @shown="onShown" />
106
+ <div class="tab-content mt-3">
107
+ <div id="overview-pane" class="tab-pane fade show active">Overview content</div>
108
+ <div id="settings-pane" class="tab-pane fade">Settings content</div>
109
+ </div>
110
+ </template>
111
+
112
+ <script setup>
113
+ const navItems = [
114
+ { text: 'Overview', to: '/overview', target: '#overview-pane', active: true },
115
+ { text: 'Settings', to: '/settings', target: '#settings-pane' }
116
+ ]
117
+
118
+ const onShown = (event) => {
119
+ console.log('Tab shown:', event.target)
120
+ }
121
+ </script>
122
+ ```
123
+
124
+ Items with `to` starting with `#` are also treated as tab targets without needing an explicit `target` field.
125
+
126
+ ## Exposed Methods
127
+
128
+ | Method | Description |
129
+ |--------|-------------|
130
+ | `refresh()` | Tears down and re-initializes Bootstrap Tab instances. Call after dynamically changing items if needed. |
131
+
132
+ > **Escape hatch:** `_unsafe_bsInstances` (a `Map` of the underlying Bootstrap `Tab` instances) is also exposed. It is **not** part of the stable API — calling `dispose()` or other lifecycle methods on these directly WILL break the component.
133
+
134
+ ## Important Notes
135
+
136
+ **`href` sanitization:** Item and child `href` values are sanitized. Only `https?://`, root-relative (`/path`), relative (`./`, `../`), and anchor (`#anchor`) URLs are allowed; `javascript:`, `data:`, and protocol-relative (`//`) URLs are stripped. Use `to` for Vue Router navigation.
137
+
138
+ **Disabled button items:** Items without `href` or `to` (plain button items) receive the HTML `disabled` attribute when `disabled: true` is set. Link and router-link items only get the disabled visual style — the browser attribute is omitted because `<a disabled>` has no native effect.
139
+
140
+ **Automatic Initialization:** When using `tabs` or `pills`, this component automatically initializes Bootstrap's Tab functionality for items that target a local panel ID via `href="#..."`, `target="#..."`, or `to="#..."`.
141
+
142
+ **State Management:** For complex tab state, combine `VibeNav` with `VibeTabContent` and manage the `active` state through your data.
143
+
144
+ ## Bootstrap CSS Classes
145
+
146
+ - `.nav`
147
+ - `.nav-tabs`
148
+ - `.nav-pills`
149
+ - `.nav-underline`
150
+ - `.nav-item`
151
+ - `.nav-link`
@@ -0,0 +1,108 @@
1
+ # Navbar Components
2
+
3
+ Responsive navigation header with support for branding, navigation, and collapsible content.
4
+
5
+ ## VibeNavbar
6
+
7
+ Main navbar container. Provides reactive collapse state to child components via Vue's provide/inject.
8
+
9
+ ### Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ |------|------|---------|-------------|
13
+ | `variant` | `Variant\|'dark'\|'light'` | `'light'` | Background color: maps to `bg-{variant}` |
14
+ | `theme` | `'dark'\|'light'` | auto | Color scheme applied via `data-bs-theme`. Defaults to `'dark'` when `variant='dark'`, `'light'` when `variant='light'`, otherwise unset |
15
+ | `expand` | `Boolean\|String` | `'lg'` | Breakpoint for collapse: `'sm'`, `'md'`, `'lg'`, `'xl'`, or `true` for always expanded |
16
+ | `container` | `Boolean\|String` | `true` | Container type: `true` for fluid, or `'sm'`, `'md'`, `'lg'`, `'xl'` |
17
+ | `position` | `NavbarPosition` | `undefined` | Position: `'fixed-top'`, `'fixed-bottom'`, `'sticky-top'` |
18
+ | `tag` | `String` | `'nav'` | HTML tag to render |
19
+
20
+ ## Sub-Components
21
+
22
+ ### VibeNavbarBrand
23
+ Branding/logo section
24
+
25
+ #### Props
26
+
27
+ | Prop | Type | Default | Description |
28
+ |------|------|---------|-------------|
29
+ | `href` | `String` | `undefined` | Link URL (renders as `<a>`) |
30
+ | `to` | `String\|Object` | `undefined` | Router link target (renders as `<router-link>`) |
31
+
32
+ ### VibeNavbarToggle
33
+ Mobile collapse toggle button.
34
+
35
+ #### Props
36
+
37
+ | Prop | Type | Default | Description |
38
+ |------|------|---------|-------------|
39
+ | `target` | `String` | Required | The `id` of the `VibeCollapse` to toggle |
40
+ | `ariaLabel` | `String` | `'Toggle navigation'` | Accessible label for the button |
41
+
42
+ ### VibeNavbarNav
43
+ Navigation links container. Supports regular links and dropdown items.
44
+
45
+ #### Props
46
+
47
+ | Prop | Type | Default | Description |
48
+ |------|------|---------|-------------|
49
+ | `tag` | `String` | `'ul'` | HTML tag to render |
50
+ | `items` | `NavItem[]` | `undefined` | Array of nav items (data-driven mode) |
51
+
52
+ #### Events
53
+
54
+ | Event | Payload | Description |
55
+ |-------|---------|-------------|
56
+ | `item-click` | `{ item, index, event }` | Emitted when a regular nav item is clicked |
57
+ | `dropdown-item-click` | `{ item, itemIndex, child, childIndex, event }` | Emitted when a dropdown child item is clicked |
58
+
59
+ ## Usage
60
+
61
+ ### Basic Navbar
62
+
63
+ ```vue
64
+ <template>
65
+ <VibeNavbar variant="light" expand="lg">
66
+ <VibeNavbarBrand href="#">Navbar</VibeNavbarBrand>
67
+ <VibeNavbarToggle target="navbarNav" />
68
+ <VibeCollapse id="navbarNav" is-nav>
69
+ <VibeNavbarNav :items="navItems" />
70
+ </VibeCollapse>
71
+ </VibeNavbar>
72
+ </template>
73
+
74
+ <script setup>
75
+ const navItems = [
76
+ { text: 'Home', href: '#', active: true },
77
+ { text: 'Features', href: '#' },
78
+ { text: 'Pricing', href: '#' }
79
+ ]
80
+ </script>
81
+ ```
82
+
83
+ ## Important Notes
84
+
85
+ **`href` sanitization:** `VibeNavbarBrand` (and `VibeNavbarNav` items) sanitize `href` values. Only `https?://`, root-relative (`/path`), relative (`./`, `../`), and anchor (`#anchor`) URLs are allowed; `javascript:`, `data:`, and protocol-relative (`//`) URLs are stripped. Use `to` for Vue Router navigation.
86
+
87
+ **Automatic Synchronization:** `VibeNavbarToggle` is refactored to ensure that clicking it updates both Vue's internal state and the underlying Bootstrap `Collapse` instance simultaneously.
88
+
89
+ **Smooth Transitions:** `VibeCollapse` now utilizes Bootstrap's JavaScript engine by default, providing smooth sliding animations when toggled via the navbar.
90
+
91
+ **State Management:** Even when using Bootstrap JS for animations, the navbar remains fully reactive. You can still control the collapse state programmatically via the `VibeCollapse` `v-model`.
92
+
93
+ ## Mobile & Hybrid Optimization
94
+
95
+ **Safe Areas:** When using `position="fixed-top"`, `fixed-bottom"`, or `sticky-top"`, the navbar automatically adds padding to account for device safe areas (notches) in hybrid environments like Capacitor.
96
+
97
+ ## Bootstrap CSS Classes
98
+
99
+ - `.navbar`
100
+ - `.navbar-expand-{breakpoint}`
101
+ - `.bg-{variant}`
102
+ - `data-bs-theme="dark|light"`
103
+ - `.navbar-brand`
104
+ - `.navbar-toggler`
105
+ - `.navbar-nav`
106
+ - `.navbar-collapse`
107
+ - `.nav-item`
108
+ - `.nav-link`
@@ -0,0 +1,162 @@
1
+ # VibePagination
2
+
3
+ Data-driven pagination component with v-model support.
4
+
5
+ ## Props
6
+
7
+ | Prop | Type | Default | Description |
8
+ |------|------|---------|-------------|
9
+ | `size` | `'sm' \| 'lg'` | `undefined` | Pagination size |
10
+ | `ariaLabel` | `String` | `'Pagination'` | ARIA label for the nav element |
11
+ | `totalPages` | `Number` | Required | Total number of pages |
12
+ | `currentPage` | `Number` | `1` | Current active page |
13
+ | `showPrevNext` | `Boolean` | `true` | Show previous/next buttons |
14
+ | `prevText` | `String` | `'Previous'` | Text for previous button |
15
+ | `nextText` | `String` | `'Next'` | Text for next button |
16
+ | `maxVisiblePages` | `Number` | `7` | Maximum page buttons to show before collapsing to ellipsis |
17
+
18
+ ## Events
19
+
20
+ | Event | Payload | Description |
21
+ |-------|---------|-------------|
22
+ | `update:currentPage` | `page: number` | Emitted when page changes (v-model) |
23
+ | `page-click` | `page: number` | Emitted when a page is clicked |
24
+
25
+ ## Slots
26
+
27
+ | Slot | Scope | Description |
28
+ |------|-------|-------------|
29
+ | `prev` | `{ disabled }` | Custom previous button |
30
+ | `page` | `{ page, active }` | Custom page button |
31
+ | `next` | `{ disabled }` | Custom next button |
32
+
33
+ ## Usage
34
+
35
+ ### Basic Example
36
+
37
+ ```vue
38
+ <template>
39
+ <VibePagination
40
+ :total-pages="10"
41
+ v-model:current-page="currentPage"
42
+ />
43
+ </template>
44
+
45
+ <script setup>
46
+ import { ref } from 'vue'
47
+
48
+ const currentPage = ref(1)
49
+ </script>
50
+ ```
51
+
52
+ ### Sizes
53
+
54
+ ```vue
55
+ <template>
56
+ <!-- Small -->
57
+ <VibePagination :total-pages="5" size="sm" v-model:current-page="page1" />
58
+
59
+ <!-- Default -->
60
+ <VibePagination :total-pages="5" v-model:current-page="page2" />
61
+
62
+ <!-- Large -->
63
+ <VibePagination :total-pages="5" size="lg" v-model:current-page="page3" />
64
+ </template>
65
+ ```
66
+
67
+ ### Without Prev/Next Buttons
68
+
69
+ ```vue
70
+ <template>
71
+ <VibePagination
72
+ :total-pages="10"
73
+ :show-prev-next="false"
74
+ v-model:current-page="currentPage"
75
+ />
76
+ </template>
77
+ ```
78
+
79
+ ### Custom Button Text
80
+
81
+ ```vue
82
+ <template>
83
+ <VibePagination
84
+ :total-pages="10"
85
+ prev-text="← Back"
86
+ next-text="Forward →"
87
+ v-model:current-page="currentPage"
88
+ />
89
+ </template>
90
+ ```
91
+
92
+ ### Large Page Counts (Ellipsis)
93
+
94
+ When `totalPages` exceeds `maxVisiblePages`, intermediate pages are replaced with ellipsis (`…`). First and last pages are always shown, and the window of visible pages tracks the current page.
95
+
96
+ ```vue
97
+ <template>
98
+ <!-- 100 pages, only 7 buttons max — ellipsis collapses the rest -->
99
+ <VibePagination
100
+ :total-pages="100"
101
+ v-model:current-page="currentPage"
102
+ :max-visible-pages="7"
103
+ />
104
+ </template>
105
+ ```
106
+
107
+ ### Custom Page Rendering
108
+
109
+ Use scoped slots for complete customization:
110
+
111
+ ```vue
112
+ <template>
113
+ <VibePagination :total-pages="10" v-model:current-page="currentPage">
114
+ <template #prev="{ disabled }">
115
+ <VibeIcon icon="chevron-left" />
116
+ </template>
117
+
118
+ <template #page="{ page, active }">
119
+ Page {{ page }}
120
+ </template>
121
+
122
+ <template #next="{ disabled }">
123
+ <VibeIcon icon="chevron-right" />
124
+ </template>
125
+ </VibePagination>
126
+ </template>
127
+ ```
128
+
129
+ ### With Event Handling
130
+
131
+ ```vue
132
+ <template>
133
+ <VibePagination
134
+ :total-pages="20"
135
+ v-model:current-page="currentPage"
136
+ @page-click="handlePageClick"
137
+ />
138
+
139
+ <p>Current page: {{ currentPage }}</p>
140
+ </template>
141
+
142
+ <script setup>
143
+ import { ref } from 'vue'
144
+
145
+ const currentPage = ref(1)
146
+
147
+ const handlePageClick = (page) => {
148
+ console.log(`Navigated to page ${page}`)
149
+ // Fetch data for the new page
150
+ }
151
+ </script>
152
+ ```
153
+
154
+ ## Bootstrap CSS Classes
155
+
156
+ - `.pagination`
157
+ - `.pagination-sm`
158
+ - `.pagination-lg`
159
+ - `.page-item`
160
+ - `.page-link`
161
+ - `.active`
162
+ - `.disabled`