@colorffy/ui 1.0.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.
Files changed (220) hide show
  1. package/README.md +634 -0
  2. package/dist/components/layout/HeaderContent.vue.d.ts +71 -0
  3. package/dist/components/layout/HeaderContent.vue.d.ts.map +1 -0
  4. package/dist/components/layout/PaneContent.vue.d.ts +42 -0
  5. package/dist/components/layout/PaneContent.vue.d.ts.map +1 -0
  6. package/dist/components/state/BaseSkeleton.vue.d.ts +30 -0
  7. package/dist/components/state/BaseSkeleton.vue.d.ts.map +1 -0
  8. package/dist/components/state/Empty.vue.d.ts +37 -0
  9. package/dist/components/state/Empty.vue.d.ts.map +1 -0
  10. package/dist/components/state/ExpressiveLoading.vue.d.ts +24 -0
  11. package/dist/components/state/ExpressiveLoading.vue.d.ts.map +1 -0
  12. package/dist/components/state/GridSkeleton.vue.d.ts +21 -0
  13. package/dist/components/state/GridSkeleton.vue.d.ts.map +1 -0
  14. package/dist/components/state/Loading.vue.d.ts +26 -0
  15. package/dist/components/state/Loading.vue.d.ts.map +1 -0
  16. package/dist/components/state/ShapeLoading.vue.d.ts +22 -0
  17. package/dist/components/state/ShapeLoading.vue.d.ts.map +1 -0
  18. package/dist/components/state/TableSkeleton.vue.d.ts +26 -0
  19. package/dist/components/state/TableSkeleton.vue.d.ts.map +1 -0
  20. package/dist/components/ui/accordion/Accordion.stories.d.ts +86 -0
  21. package/dist/components/ui/accordion/Accordion.stories.d.ts.map +1 -0
  22. package/dist/components/ui/accordion/Accordion.vue.d.ts +37 -0
  23. package/dist/components/ui/accordion/Accordion.vue.d.ts.map +1 -0
  24. package/dist/components/ui/accordion/AccordionGroup.vue.d.ts +22 -0
  25. package/dist/components/ui/accordion/AccordionGroup.vue.d.ts.map +1 -0
  26. package/dist/components/ui/alert/Alert.stories.d.ts +70 -0
  27. package/dist/components/ui/alert/Alert.stories.d.ts.map +1 -0
  28. package/dist/components/ui/alert/Alert.vue.d.ts +26 -0
  29. package/dist/components/ui/alert/Alert.vue.d.ts.map +1 -0
  30. package/dist/components/ui/alert/AlertToast.vue.d.ts +21 -0
  31. package/dist/components/ui/alert/AlertToast.vue.d.ts.map +1 -0
  32. package/dist/components/ui/badge/Badge.stories.d.ts +45 -0
  33. package/dist/components/ui/badge/Badge.stories.d.ts.map +1 -0
  34. package/dist/components/ui/badge/Badge.vue.d.ts +13 -0
  35. package/dist/components/ui/badge/Badge.vue.d.ts.map +1 -0
  36. package/dist/components/ui/badge/BadgeGroup.vue.d.ts +18 -0
  37. package/dist/components/ui/badge/BadgeGroup.vue.d.ts.map +1 -0
  38. package/dist/components/ui/button/Button.stories.d.ts +110 -0
  39. package/dist/components/ui/button/Button.stories.d.ts.map +1 -0
  40. package/dist/components/ui/button/Button.vue.d.ts +37 -0
  41. package/dist/components/ui/button/Button.vue.d.ts.map +1 -0
  42. package/dist/components/ui/button/ButtonFabGroup.vue.d.ts +23 -0
  43. package/dist/components/ui/button/ButtonFabGroup.vue.d.ts.map +1 -0
  44. package/dist/components/ui/button/ButtonGroup.vue.d.ts +24 -0
  45. package/dist/components/ui/button/ButtonGroup.vue.d.ts.map +1 -0
  46. package/dist/components/ui/button/ButtonMenu.vue.d.ts +46 -0
  47. package/dist/components/ui/button/ButtonMenu.vue.d.ts.map +1 -0
  48. package/dist/components/ui/button/ButtonMenuDivider.vue.d.ts +3 -0
  49. package/dist/components/ui/button/ButtonMenuDivider.vue.d.ts.map +1 -0
  50. package/dist/components/ui/button/ButtonMenuItem.vue.d.ts +26 -0
  51. package/dist/components/ui/button/ButtonMenuItem.vue.d.ts.map +1 -0
  52. package/dist/components/ui/button/ButtonMenuText.vue.d.ts +9 -0
  53. package/dist/components/ui/button/ButtonMenuText.vue.d.ts.map +1 -0
  54. package/dist/components/ui/button/ButtonToggleGroup.vue.d.ts +30 -0
  55. package/dist/components/ui/button/ButtonToggleGroup.vue.d.ts.map +1 -0
  56. package/dist/components/ui/button/ButtonTooltip.vue.d.ts +42 -0
  57. package/dist/components/ui/button/ButtonTooltip.vue.d.ts.map +1 -0
  58. package/dist/components/ui/card/Card.stories.d.ts +57 -0
  59. package/dist/components/ui/card/Card.stories.d.ts.map +1 -0
  60. package/dist/components/ui/card/Card.vue.d.ts +28 -0
  61. package/dist/components/ui/card/Card.vue.d.ts.map +1 -0
  62. package/dist/components/ui/datatable/Datatable.stories.d.ts +13 -0
  63. package/dist/components/ui/datatable/Datatable.stories.d.ts.map +1 -0
  64. package/dist/components/ui/datatable/Datatable.vue.d.ts +48 -0
  65. package/dist/components/ui/datatable/Datatable.vue.d.ts.map +1 -0
  66. package/dist/components/ui/dialog/ConfirmModal.vue.d.ts +49 -0
  67. package/dist/components/ui/dialog/ConfirmModal.vue.d.ts.map +1 -0
  68. package/dist/components/ui/dialog/Modal.stories.d.ts +79 -0
  69. package/dist/components/ui/dialog/Modal.stories.d.ts.map +1 -0
  70. package/dist/components/ui/dialog/Modal.vue.d.ts +41 -0
  71. package/dist/components/ui/dialog/Modal.vue.d.ts.map +1 -0
  72. package/dist/components/ui/icon/App.vue.d.ts +16 -0
  73. package/dist/components/ui/icon/App.vue.d.ts.map +1 -0
  74. package/dist/components/ui/icon/Material.stories.d.ts +36 -0
  75. package/dist/components/ui/icon/Material.stories.d.ts.map +1 -0
  76. package/dist/components/ui/icon/Material.vue.d.ts +7 -0
  77. package/dist/components/ui/icon/Material.vue.d.ts.map +1 -0
  78. package/dist/components/ui/icon/Shapes.vue.d.ts +10 -0
  79. package/dist/components/ui/icon/Shapes.vue.d.ts.map +1 -0
  80. package/dist/components/ui/icon/Tool.vue.d.ts +9 -0
  81. package/dist/components/ui/icon/Tool.vue.d.ts.map +1 -0
  82. package/dist/components/ui/image/Avatar.stories.d.ts +12 -0
  83. package/dist/components/ui/image/Avatar.stories.d.ts.map +1 -0
  84. package/dist/components/ui/image/Avatar.vue.d.ts +10 -0
  85. package/dist/components/ui/image/Avatar.vue.d.ts.map +1 -0
  86. package/dist/components/ui/input/Check.stories.d.ts +10 -0
  87. package/dist/components/ui/input/Check.stories.d.ts.map +1 -0
  88. package/dist/components/ui/input/Check.vue.d.ts +25 -0
  89. package/dist/components/ui/input/Check.vue.d.ts.map +1 -0
  90. package/dist/components/ui/input/ColorPicker.stories.d.ts +10 -0
  91. package/dist/components/ui/input/ColorPicker.stories.d.ts.map +1 -0
  92. package/dist/components/ui/input/ColorPicker.vue.d.ts +26 -0
  93. package/dist/components/ui/input/ColorPicker.vue.d.ts.map +1 -0
  94. package/dist/components/ui/input/File.vue.d.ts +30 -0
  95. package/dist/components/ui/input/File.vue.d.ts.map +1 -0
  96. package/dist/components/ui/input/PhoneNumber.vue.d.ts +40 -0
  97. package/dist/components/ui/input/PhoneNumber.vue.d.ts.map +1 -0
  98. package/dist/components/ui/input/Radio.vue.d.ts +28 -0
  99. package/dist/components/ui/input/Radio.vue.d.ts.map +1 -0
  100. package/dist/components/ui/input/Range.stories.d.ts +13 -0
  101. package/dist/components/ui/input/Range.stories.d.ts.map +1 -0
  102. package/dist/components/ui/input/Range.vue.d.ts +36 -0
  103. package/dist/components/ui/input/Range.vue.d.ts.map +1 -0
  104. package/dist/components/ui/input/Select.stories.d.ts +14 -0
  105. package/dist/components/ui/input/Select.stories.d.ts.map +1 -0
  106. package/dist/components/ui/input/Select.vue.d.ts +42 -0
  107. package/dist/components/ui/input/Select.vue.d.ts.map +1 -0
  108. package/dist/components/ui/input/Text.stories.d.ts +12 -0
  109. package/dist/components/ui/input/Text.stories.d.ts.map +1 -0
  110. package/dist/components/ui/input/Text.vue.d.ts +48 -0
  111. package/dist/components/ui/input/Text.vue.d.ts.map +1 -0
  112. package/dist/components/ui/input/TextArea.stories.d.ts +18 -0
  113. package/dist/components/ui/input/TextArea.stories.d.ts.map +1 -0
  114. package/dist/components/ui/input/Textarea.vue.d.ts +48 -0
  115. package/dist/components/ui/input/Textarea.vue.d.ts.map +1 -0
  116. package/dist/components/ui/link/LinkTooltip.vue.d.ts +40 -0
  117. package/dist/components/ui/link/LinkTooltip.vue.d.ts.map +1 -0
  118. package/dist/components/ui/list/List.stories.d.ts +62 -0
  119. package/dist/components/ui/list/List.stories.d.ts.map +1 -0
  120. package/dist/components/ui/list/ListGroup.vue.d.ts +24 -0
  121. package/dist/components/ui/list/ListGroup.vue.d.ts.map +1 -0
  122. package/dist/components/ui/list/ListItem.vue.d.ts +11 -0
  123. package/dist/components/ui/list/ListItem.vue.d.ts.map +1 -0
  124. package/dist/components/ui/navbar/Navbar.stories.d.ts +56 -0
  125. package/dist/components/ui/navbar/Navbar.stories.d.ts.map +1 -0
  126. package/dist/components/ui/navbar/Navbar.vue.d.ts +24 -0
  127. package/dist/components/ui/navbar/Navbar.vue.d.ts.map +1 -0
  128. package/dist/components/ui/navbar/NavbarAvatar.vue.d.ts +13 -0
  129. package/dist/components/ui/navbar/NavbarAvatar.vue.d.ts.map +1 -0
  130. package/dist/components/ui/navbar/NavbarBrand.vue.d.ts +29 -0
  131. package/dist/components/ui/navbar/NavbarBrand.vue.d.ts.map +1 -0
  132. package/dist/components/ui/navbar/NavbarCollapse.vue.d.ts +22 -0
  133. package/dist/components/ui/navbar/NavbarCollapse.vue.d.ts.map +1 -0
  134. package/dist/components/ui/navbar/NavbarItem.vue.d.ts +21 -0
  135. package/dist/components/ui/navbar/NavbarItem.vue.d.ts.map +1 -0
  136. package/dist/components/ui/navbar/NavbarLink.vue.d.ts +31 -0
  137. package/dist/components/ui/navbar/NavbarLink.vue.d.ts.map +1 -0
  138. package/dist/components/ui/navbar/NavbarMobileMenu.vue.d.ts +21 -0
  139. package/dist/components/ui/navbar/NavbarMobileMenu.vue.d.ts.map +1 -0
  140. package/dist/components/ui/navbar/NavbarNav.vue.d.ts +22 -0
  141. package/dist/components/ui/navbar/NavbarNav.vue.d.ts.map +1 -0
  142. package/dist/components/ui/navbar/NavbarTitle.vue.d.ts +23 -0
  143. package/dist/components/ui/navbar/NavbarTitle.vue.d.ts.map +1 -0
  144. package/dist/components/ui/navbar/NavbarToggle.vue.d.ts +13 -0
  145. package/dist/components/ui/navbar/NavbarToggle.vue.d.ts.map +1 -0
  146. package/dist/components/ui/navigation/NavigationBar.vue.d.ts +16 -0
  147. package/dist/components/ui/navigation/NavigationBar.vue.d.ts.map +1 -0
  148. package/dist/components/ui/navigation/PopoverMenu.vue.d.ts +50 -0
  149. package/dist/components/ui/navigation/PopoverMenu.vue.d.ts.map +1 -0
  150. package/dist/components/ui/navigation/SegmentedControls.vue.d.ts +16 -0
  151. package/dist/components/ui/navigation/SegmentedControls.vue.d.ts.map +1 -0
  152. package/dist/components/ui/navigation/Tabs.vue.d.ts +16 -0
  153. package/dist/components/ui/navigation/Tabs.vue.d.ts.map +1 -0
  154. package/dist/components/ui/sidebar/Sidebar.stories.d.ts +64 -0
  155. package/dist/components/ui/sidebar/Sidebar.stories.d.ts.map +1 -0
  156. package/dist/components/ui/sidebar/Sidebar.vue.d.ts +27 -0
  157. package/dist/components/ui/sidebar/Sidebar.vue.d.ts.map +1 -0
  158. package/dist/components/ui/sidebar/SidebarBody.vue.d.ts +22 -0
  159. package/dist/components/ui/sidebar/SidebarBody.vue.d.ts.map +1 -0
  160. package/dist/components/ui/sidebar/SidebarDropdown.vue.d.ts +25 -0
  161. package/dist/components/ui/sidebar/SidebarDropdown.vue.d.ts.map +1 -0
  162. package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +22 -0
  163. package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts.map +1 -0
  164. package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +25 -0
  165. package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts.map +1 -0
  166. package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +22 -0
  167. package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts.map +1 -0
  168. package/dist/components/ui/sidebar/SidebarLink.vue.d.ts +47 -0
  169. package/dist/components/ui/sidebar/SidebarLink.vue.d.ts.map +1 -0
  170. package/dist/components/ui/sidebar/SidebarText.vue.d.ts +11 -0
  171. package/dist/components/ui/sidebar/SidebarText.vue.d.ts.map +1 -0
  172. package/dist/components-CPV7PsCp.cjs +10 -0
  173. package/dist/components-CPV7PsCp.cjs.map +1 -0
  174. package/dist/components-DUB9BBm_.js +4210 -0
  175. package/dist/components-DUB9BBm_.js.map +1 -0
  176. package/dist/components.d.ts +68 -0
  177. package/dist/components.d.ts.map +1 -0
  178. package/dist/composables/useDateUtils.d.ts +4 -0
  179. package/dist/composables/useDateUtils.d.ts.map +1 -0
  180. package/dist/composables/useTextUtils.d.ts +6 -0
  181. package/dist/composables/useTextUtils.d.ts.map +1 -0
  182. package/dist/composables/useToast.d.ts +14 -0
  183. package/dist/composables/useToast.d.ts.map +1 -0
  184. package/dist/index.cjs +2 -0
  185. package/dist/index.cjs.map +1 -0
  186. package/dist/index.d.ts +17 -0
  187. package/dist/index.d.ts.map +1 -0
  188. package/dist/index.js +102 -0
  189. package/dist/index.js.map +1 -0
  190. package/dist/nuxt.cjs +2 -0
  191. package/dist/nuxt.cjs.map +1 -0
  192. package/dist/nuxt.d.ts +1 -0
  193. package/dist/nuxt.js +21 -0
  194. package/dist/nuxt.js.map +1 -0
  195. package/dist/plugin.d.ts +4 -0
  196. package/dist/plugin.d.ts.map +1 -0
  197. package/dist/style.css +1 -0
  198. package/dist/types/accordion.d.ts +56 -0
  199. package/dist/types/accordion.d.ts.map +1 -0
  200. package/dist/types/alert.d.ts +46 -0
  201. package/dist/types/alert.d.ts.map +1 -0
  202. package/dist/types/avatar.d.ts +16 -0
  203. package/dist/types/avatar.d.ts.map +1 -0
  204. package/dist/types/badge.d.ts +47 -0
  205. package/dist/types/badge.d.ts.map +1 -0
  206. package/dist/types/button.d.ts +115 -0
  207. package/dist/types/button.d.ts.map +1 -0
  208. package/dist/types/card.d.ts +37 -0
  209. package/dist/types/card.d.ts.map +1 -0
  210. package/dist/types/dialog.d.ts +89 -0
  211. package/dist/types/dialog.d.ts.map +1 -0
  212. package/dist/types/icon.d.ts +142 -0
  213. package/dist/types/icon.d.ts.map +1 -0
  214. package/dist/types/list.d.ts +70 -0
  215. package/dist/types/list.d.ts.map +1 -0
  216. package/dist/types/navbar.d.ts +184 -0
  217. package/dist/types/navbar.d.ts.map +1 -0
  218. package/dist/types/sidebar.d.ts +146 -0
  219. package/dist/types/sidebar.d.ts.map +1 -0
  220. package/package.json +70 -0
package/README.md ADDED
@@ -0,0 +1,634 @@
1
+ # @colorffy/ui
2
+
3
+ A modern Vue 3 component library built with TypeScript. Features a comprehensive collection of **unstyled, headless UI components** with full TypeScript support. Designed to work seamlessly with **ColorffyCSS** (optional) or your own custom styles.
4
+
5
+ ## Features
6
+
7
+ ✨ **70+ Vue 3 Components** - Accordion, Alerts, Buttons, Cards, Dialogs, Forms, Navigation, and more
8
+ 🎨 **Style-Agnostic** - Use with ColorffyCSS or bring your own styles
9
+ 📘 **Full TypeScript Support** - Complete type definitions for all components
10
+ 🔌 **Flexible Installation** - Use globally or import individually
11
+ 🚀 **Tree-shakeable** - Import only what you need
12
+ ⚡ **Nuxt 3 Compatible** - Works seamlessly with Nuxt applications
13
+ 🎯 **Headless Architecture** - Full control over styling and behavior
14
+
15
+ ## Installation
16
+
17
+ ### Install ColorffyUI
18
+
19
+ ```bash
20
+ # npm
21
+ npm install @colorffy/ui
22
+
23
+ # yarn
24
+ yarn add @colorffy/ui
25
+
26
+ # pnpm
27
+ pnpm add @colorffy/ui
28
+ ```
29
+
30
+ ### Install Peer Dependencies
31
+
32
+ ColorffyUI requires the following peer dependencies:
33
+
34
+ ```bash
35
+ npm install @vueuse/components floating-vue vue
36
+ ```
37
+
38
+ ### Install ColorffyCSS (Optional, Recommended)
39
+
40
+ For pre-built, beautiful styling that works out of the box:
41
+
42
+ ```bash
43
+ npm install @colorffy/css
44
+ ```
45
+
46
+ > **Note:** ColorffyUI components are **unstyled by default**. You can use ColorffyCSS for instant styling, or provide your own custom styles.
47
+
48
+ ## Styling Options
49
+
50
+ ### Option 1: Use ColorffyCSS (Recommended)
51
+
52
+ Import the compiled CSS in your `main.ts`:
53
+
54
+ ```typescript
55
+ import ColorffyUI from '@colorffy/ui'
56
+ import { createApp } from 'vue'
57
+ import App from './App.vue'
58
+ import '@colorffy/css' // Import styles
59
+
60
+ const app = createApp(App)
61
+ app.use(ColorffyUI)
62
+ app.mount('#app')
63
+ ```
64
+
65
+ ### Option 2: Customize ColorffyCSS with SCSS
66
+
67
+ For full customization, use SCSS to override variables:
68
+
69
+ ```scss
70
+ // src/assets/variables.scss
71
+ // Override ColorffyCSS variables
72
+ @forward '@colorffy/css/scss/abstracts/variables' with (
73
+ $primary: #4f46e5,
74
+ $secondary: #ec4899,
75
+ $accent: #0ea5e9,
76
+ );
77
+
78
+ // Import the framework
79
+ @use '@colorffy/css/scss/main';
80
+ ```
81
+
82
+ ```scss
83
+ // src/assets/main.scss
84
+ @use 'variables' as *;
85
+
86
+ // Your custom styles
87
+ :root {
88
+ --custom-var: value;
89
+ }
90
+ ```
91
+
92
+ ```typescript
93
+ import ColorffyUI from '@colorffy/ui'
94
+ // main.ts
95
+ import { createApp } from 'vue'
96
+ import App from './App.vue'
97
+ import './assets/main.scss' // Import customized styles
98
+
99
+ const app = createApp(App)
100
+ app.use(ColorffyUI)
101
+ app.mount('#app')
102
+ ```
103
+
104
+ ### Option 3: Custom Styles
105
+
106
+ Use ColorffyUI components without any styling framework. Components use semantic class names like `.btn`, `.card`, `.alert`, etc. that you can style however you want:
107
+
108
+ ```css
109
+ /* your-custom-styles.css */
110
+ .btn {
111
+ padding: 0.5rem 1rem;
112
+ border-radius: 0.25rem;
113
+ /* Your custom button styles */
114
+ }
115
+
116
+ .card {
117
+ background: white;
118
+ border: 1px solid #e5e7eb;
119
+ /* Your custom card styles */
120
+ }
121
+ ```
122
+
123
+ For more details on ColorffyCSS customization, see the [ColorffyCSS README](https://www.npmjs.com/package/@colorffy/css).
124
+
125
+ ## Usage
126
+
127
+ ### Option 1: Global Registration (Recommended for most cases)
128
+
129
+ Register all components globally in your `main.ts`:
130
+
131
+ ```typescript
132
+ import ColorffyUI from '@colorffy/ui'
133
+ import { createApp } from 'vue'
134
+ import App from './App.vue'
135
+
136
+ const app = createApp(App)
137
+ app.use(ColorffyUI)
138
+ app.mount('#app')
139
+ ```
140
+
141
+ Then use components anywhere without imports:
142
+
143
+ ```vue
144
+ <template>
145
+ <div>
146
+ <UiButton variant="filled" color="primary" text="Click me!" />
147
+ <UiCard>
148
+ <template #body>
149
+ <h2>Card Content</h2>
150
+ </template>
151
+ </UiCard>
152
+ </div>
153
+ </template>
154
+ ```
155
+
156
+ ### Option 2: Individual Component Imports (Better for tree-shaking)
157
+
158
+ Import only the components you need:
159
+
160
+ ```vue
161
+ <script setup lang="ts">
162
+ import { UiAlert, UiButton, UiCard } from '@colorffy/ui'
163
+ </script>
164
+
165
+ <template>
166
+ <div>
167
+ <UiButton variant="filled" color="primary" text="Click me!" />
168
+ <UiCard>
169
+ <template #body>
170
+ <h2>Card Content</h2>
171
+ </template>
172
+ </UiCard>
173
+ <UiAlert
174
+ type="banner"
175
+ variant="success"
176
+ message="Operation successful!"
177
+ />
178
+ </div>
179
+ </template>
180
+ ```
181
+
182
+ ### Option 3: Selective Global Registration
183
+
184
+ Register only specific components globally:
185
+
186
+ ```typescript
187
+ import { UiAlert, UiButton, UiCard } from '@colorffy/ui'
188
+ import { createApp } from 'vue'
189
+ import App from './App.vue'
190
+
191
+ const app = createApp(App)
192
+
193
+ // Register only needed components
194
+ app.component('UiButton', UiButton)
195
+ app.component('UiCard', UiCard)
196
+ app.component('UiAlert', UiAlert)
197
+
198
+ app.mount('#app')
199
+ ```
200
+
201
+ ## Nuxt 3 Usage
202
+
203
+ ### Install Dependencies
204
+
205
+ ```bash
206
+ npm install @colorffy/ui @colorffy/css
207
+ ```
208
+
209
+ ### Setup with ColorffyCSS
210
+
211
+ Add ColorffyCSS to your `nuxt.config.ts`:
212
+
213
+ ```typescript
214
+ export default defineNuxtConfig({
215
+ css: ['@colorffy/css']
216
+ })
217
+ ```
218
+
219
+ ### Global Registration with Nuxt Plugin
220
+
221
+ Create a plugin file `plugins/colorffy-ui.ts`:
222
+
223
+ ```typescript
224
+ import ColorffyUI from '@colorffy/ui'
225
+
226
+ export default defineNuxtPlugin((nuxtApp) => {
227
+ nuxtApp.vueApp.use(ColorffyUI)
228
+ })
229
+ ```
230
+
231
+ ### Customize with SCSS (Advanced)
232
+
233
+ For full SCSS customization in Nuxt:
234
+
235
+ ```typescript
236
+ // nuxt.config.ts
237
+ export default defineNuxtConfig({
238
+ css: ['~/assets/scss/main.scss'],
239
+ vite: {
240
+ css: {
241
+ preprocessorOptions: {
242
+ scss: {
243
+ additionalData: '@use "~/assets/scss/variables.scss" as *;'
244
+ }
245
+ }
246
+ }
247
+ }
248
+ })
249
+ ```
250
+
251
+ ```scss
252
+ // assets/scss/variables.scss
253
+ @forward '@colorffy/css/scss/abstracts/variables' with (
254
+ $primary: #4f46e5,
255
+ $secondary: #ec4899,
256
+ $accent: #0ea5e9,
257
+ );
258
+
259
+ @use '@colorffy/css/scss/main';
260
+ ```
261
+
262
+ Then use components anywhere in your Nuxt app:
263
+
264
+ ```vue
265
+ <template>
266
+ <div>
267
+ <UiButton variant="filled" color="primary" text="Click me!" />
268
+ <UiCard>
269
+ <template #body>
270
+ <h2>Card Content</h2>
271
+ </template>
272
+ </UiCard>
273
+ </div>
274
+ </template>
275
+ ```
276
+
277
+ ### Individual Component Imports in Nuxt
278
+
279
+ Import components directly in your pages/components:
280
+
281
+ ```vue
282
+ <script setup lang="ts">
283
+ import { UiAlert, UiButton, UiCard } from '@colorffy/ui'
284
+ </script>
285
+
286
+ <template>
287
+ <div>
288
+ <UiButton variant="filled" color="primary" text="Click me!" />
289
+ <UiCard>
290
+ <template #body>
291
+ <h2>Card Content</h2>
292
+ </template>
293
+ </UiCard>
294
+ </div>
295
+ </template>
296
+ ```
297
+
298
+ ### Auto-imports (Optional)
299
+
300
+ To enable auto-imports in Nuxt, add to your `nuxt.config.ts`:
301
+
302
+ ```typescript
303
+ export default defineNuxtConfig({
304
+ components: [
305
+ {
306
+ path: 'node_modules/@colorffy/ui/dist',
307
+ pattern: '**/*.vue',
308
+ pathPrefix: false
309
+ }
310
+ ]
311
+ })
312
+ ```
313
+
314
+ ## Component Categories
315
+
316
+ ### Layout Components
317
+ - `UiHeaderContent` - Page header with title and subtitle
318
+ - `UiPaneContent` - Content container/pane
319
+
320
+ ### UI Components
321
+
322
+ #### Accordion
323
+ - `UiAccordion` - Single accordion item
324
+ - `UiAccordionGroup` - Group of accordion items
325
+
326
+ #### Alerts
327
+ - `UiAlert` - Alert/notification component
328
+ - `UiAlertToast` - Toast notification
329
+
330
+ #### Badges
331
+ - `UiBadge` - Badge/tag component
332
+ - `UiBadgeGroup` - Group of badges
333
+
334
+ #### Buttons
335
+ - `UiButton` - Standard button
336
+ - `UiButtonMenu` - Button with dropdown menu
337
+ - `UiButtonMenuDivider` - Menu divider
338
+ - `UiButtonMenuItem` - Menu item
339
+ - `UiButtonMenuText` - Menu text item
340
+ - `UiButtonToggleGroup` - Toggle button group
341
+ - `UiButtonTooltip` - Button with tooltip
342
+
343
+ #### Cards
344
+ - `UiCard` - Card container
345
+
346
+ #### Dialogs
347
+ - `UiModal` - Modal dialog
348
+ - `UiConfirmModal` - Confirmation modal
349
+
350
+ #### Icons
351
+ - `UiIconApp` - Application icons
352
+ - `UiIconMaterial` - Material Design icons
353
+ - `UiIconShapes` - Shape icons
354
+ - `UiIconTool` - Tool icons
355
+
356
+ #### Images
357
+ - `UiAvatar` - Avatar component
358
+
359
+ #### Form Inputs
360
+ - `UiInputCheck` - Checkbox input
361
+ - `UiInputColorPicker` - Color picker
362
+ - `UiInputFile` - File upload
363
+ - `UiInputPhoneNumber` - Phone number input
364
+ - `UiInputRadio` - Radio button
365
+ - `UiInputRange` - Range slider
366
+ - `UiInputSelect` - Select dropdown
367
+ - `UiInputText` - Text input
368
+ - `UiInputTextarea` - Textarea input
369
+
370
+ #### Links
371
+ - `UiLinkTooltip` - Link with tooltip
372
+
373
+ #### Lists
374
+ - `UiListGroup` - List container
375
+ - `UiListItem` - List item
376
+
377
+ #### Navigation
378
+ - `UiDrawerLink` - Drawer navigation link
379
+ - `UiNavbarLink` - Navbar link
380
+ - `UiNavigationBar` - Navigation bar
381
+ - `UiPopoverMenu` - Popover menu
382
+ - `UiSegmentedControls` - Segmented control
383
+ - `UiTabs` - Tab navigation
384
+
385
+ #### Tables
386
+ - `UiDatatable` - Data table component
387
+
388
+ ### State Components
389
+ - `UiBaseSkeleton` - Basic skeleton loader
390
+ - `UiEmpty` - Empty state
391
+ - `UiExpressiveLoading` - Expressive loading animation
392
+ - `UiGridSkeleton` - Grid skeleton loader
393
+ - `UiLoading` - Loading spinner
394
+ - `UiShapeLoading` - Shape loading animation
395
+ - `UiTableSkeleton` - Table skeleton loader
396
+
397
+ ## Composables
398
+
399
+ The library also exports useful composables:
400
+
401
+ ```typescript
402
+ import { useDateUtils, useTextUtils, useToast } from '@colorffy/ui'
403
+
404
+ // Show toast notification
405
+ const toast = useToast()
406
+ toast.show({ message: 'Success!', variant: 'success' })
407
+
408
+ // Date utilities
409
+ const dateUtils = useDateUtils()
410
+
411
+ // Text utilities
412
+ const textUtils = useTextUtils()
413
+ ```
414
+
415
+ ## Component Examples
416
+
417
+ ### Button
418
+
419
+ ```vue
420
+ <template>
421
+ <!-- Filled buttons -->
422
+ <UiButton variant="filled" text="Primary" />
423
+ <UiButton variant="filled" color="success" text="Success" />
424
+ <UiButton variant="filled" color="danger" text="Danger" />
425
+
426
+ <!-- Tonal buttons -->
427
+ <UiButton variant="tonal" color="primary" text="Tonal" />
428
+
429
+ <!-- Outline buttons -->
430
+ <UiButton variant="outline" text="Outline" />
431
+
432
+ <!-- With icon -->
433
+ <UiButton variant="filled" text="With Icon">
434
+ <template #icon>
435
+ <UiIconMaterial icon-code="&#xe000;" />
436
+ </template>
437
+ </UiButton>
438
+
439
+ <!-- Sizes -->
440
+ <UiButton variant="filled" size="sm" text="Small" />
441
+ <UiButton variant="filled" size="md" text="Medium" />
442
+ <UiButton variant="filled" size="lg" text="Large" />
443
+
444
+ <!-- Loading state -->
445
+ <UiButton variant="filled" :loading="true" text="Loading" />
446
+ </template>
447
+ ```
448
+
449
+ ### Alert
450
+
451
+ ```vue
452
+ <template>
453
+ <UiAlert
454
+ type="banner"
455
+ variant="success"
456
+ title="Success!"
457
+ message="Your operation completed successfully."
458
+ />
459
+
460
+ <UiAlert
461
+ type="snackbar"
462
+ variant="warning"
463
+ message="Warning message"
464
+ />
465
+
466
+ <UiAlert
467
+ type="tonal"
468
+ variant="danger"
469
+ title="Error"
470
+ message="Something went wrong."
471
+ :critical="true"
472
+ />
473
+ </template>
474
+ ```
475
+
476
+ ### Card
477
+
478
+ ```vue
479
+ <template>
480
+ <UiCard variant="pane">
481
+ <template #body>
482
+ <h3>Card Title</h3>
483
+ <p>Card content goes here...</p>
484
+ </template>
485
+ </UiCard>
486
+ </template>
487
+ ```
488
+
489
+ ### Accordion
490
+
491
+ ```vue
492
+ <template>
493
+ <UiAccordionGroup>
494
+ <UiAccordion title="Section 1" name="accordion-demo">
495
+ <template #content>
496
+ <p>Content for section 1</p>
497
+ </template>
498
+ </UiAccordion>
499
+
500
+ <UiAccordion title="Section 2" name="accordion-demo">
501
+ <template #content>
502
+ <p>Content for section 2</p>
503
+ </template>
504
+ </UiAccordion>
505
+ </UiAccordionGroup>
506
+ </template>
507
+ ```
508
+
509
+ ### Form Inputs
510
+
511
+ ```vue
512
+ <template>
513
+ <UiInputText
514
+ v-model="name"
515
+ label="Name"
516
+ placeholder="Enter your name"
517
+ />
518
+
519
+ <UiInputSelect
520
+ v-model="selected"
521
+ :options="options"
522
+ label="Choose option"
523
+ />
524
+
525
+ <UiInputCheck
526
+ v-model="agree"
527
+ label="I agree to terms"
528
+ />
529
+ </template>
530
+ ```
531
+
532
+ ## TypeScript Support
533
+
534
+ All components come with full TypeScript support. Import types as needed:
535
+
536
+ ```typescript
537
+ import type {
538
+ AlertType,
539
+ AlertVariant,
540
+ ButtonColor,
541
+ ButtonVariant
542
+ } from '@colorffy/ui'
543
+
544
+ // Use in your components
545
+ const variant: ButtonVariant = 'filled'
546
+ const color: ButtonColor = 'primary'
547
+ ```
548
+
549
+ ## Styling
550
+
551
+ ### With ColorffyCSS (Recommended)
552
+
553
+ ColorffyUI is designed to work seamlessly with ColorffyCSS, which provides:
554
+ - Modern, responsive design system
555
+ - Consistent color palette with tonal variants
556
+ - Pre-built component styles
557
+ - Utility classes for rapid development
558
+ - Customizable themes with SCSS variables
559
+
560
+ Install ColorffyCSS and import it in your app:
561
+
562
+ ```bash
563
+ npm install @colorffy/css
564
+ ```
565
+
566
+ ```typescript
567
+ // main.ts
568
+ import '@colorffy/css'
569
+ ```
570
+
571
+ ### Custom Styling
572
+
573
+ All components use semantic class names that you can style:
574
+
575
+ ```css
576
+ /* Component classes */
577
+ .btn { /* Button styles */ }
578
+ .btn.btn-filled { /* Filled variant */ }
579
+ .btn.btn-primary { /* Primary color */ }
580
+
581
+ .card { /* Card styles */ }
582
+ .card.card-pane { /* Pane variant */ }
583
+
584
+ .alert { /* Alert styles */ }
585
+ .alert.alert-success { /* Success variant */ }
586
+
587
+ /* And more... */
588
+ ```
589
+
590
+ ### CSS Variable Overrides
591
+
592
+ Override CSS custom properties for runtime theming:
593
+
594
+ ```css
595
+ :root {
596
+ /* Theme colors */
597
+ --theme-primary-base: #4f46e5;
598
+ --theme-secondary-base: #ec4899;
599
+
600
+ /* Component variables */
601
+ --_btn-radius: 50px;
602
+ --_card-bg-color: #ffffff;
603
+ }
604
+ ```
605
+
606
+ For complete styling documentation, see the [ColorffyCSS README](https://www.npmjs.com/package/@colorffy/css).
607
+
608
+ ## Browser Support
609
+
610
+ - Chrome (latest)
611
+ - Firefox (latest)
612
+ - Safari (latest)
613
+ - Edge (latest)
614
+
615
+ ## Contributing
616
+
617
+ Contributions are welcome! Please feel free to submit issues or pull requests.
618
+
619
+ ## License
620
+
621
+ ISC
622
+
623
+ ## Author
624
+
625
+ Giancarlos Garza
626
+
627
+ ## Links
628
+
629
+ - [npm Package](https://www.npmjs.com/package/@colorffy/ui)
630
+ - [ColorffyCSS](https://www.npmjs.com/package/@colorffy/css)
631
+
632
+ ---
633
+
634
+ Made with ❤️ using Vue 3 and TypeScript
@@ -0,0 +1,71 @@
1
+ /**
2
+ * HeaderContent Component
3
+ *
4
+ * A flexible header component with support for back buttons, actions, and featured badges.
5
+ * Designed for page headers with navigation and action controls.
6
+ *
7
+ * @component
8
+ * @example
9
+ * ```vue
10
+ * <HeaderContent
11
+ * title="Gradient Generator"
12
+ * subtitle="Create beautiful gradients"
13
+ * :is-featured="true"
14
+ * :actions="true"
15
+ * :back-button="true"
16
+ * back-button-label="Back to tools"
17
+ * @click="handleBack"
18
+ * >
19
+ * <template #actions>
20
+ * <UiButton text="Save" />
21
+ * </template>
22
+ * </HeaderContent>
23
+ * ```
24
+ */
25
+ /** Interfaces */
26
+ interface IHeaderContentProps {
27
+ /** Main title text to display */
28
+ title?: string | null;
29
+ /** Subtitle text to display below the title */
30
+ subtitle?: string | null;
31
+ /** Whether to show actions slot */
32
+ actions?: boolean;
33
+ /** Whether to hide actions on mobile devices */
34
+ hideActionsOnMobile?: boolean;
35
+ /** Whether to show back button */
36
+ backButton?: boolean;
37
+ /** Tooltip text for the back button */
38
+ backButtonLabel?: string;
39
+ /** Additional CSS classes for the header container */
40
+ containerClass?: string | string[];
41
+ }
42
+ declare function __VLS_template(): {
43
+ attrs: Partial<{}>;
44
+ slots: {
45
+ actions?(_: {}): any;
46
+ };
47
+ refs: {};
48
+ rootEl: HTMLDivElement;
49
+ };
50
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
51
+ declare const __VLS_component: import('vue').DefineComponent<IHeaderContentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
52
+ click: () => any;
53
+ }, string, import('vue').PublicProps, Readonly<IHeaderContentProps> & Readonly<{
54
+ onClick?: (() => any) | undefined;
55
+ }>, {
56
+ title: string | null;
57
+ subtitle: string | null;
58
+ actions: boolean;
59
+ hideActionsOnMobile: boolean;
60
+ backButton: boolean;
61
+ backButtonLabel: string;
62
+ containerClass: string | string[];
63
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
64
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
65
+ export default _default;
66
+ type __VLS_WithTemplateSlots<T, S> = T & {
67
+ new (): {
68
+ $slots: S;
69
+ };
70
+ };
71
+ //# sourceMappingURL=HeaderContent.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/HeaderContent.vue"],"names":[],"mappings":"AAmLA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iBAAiB;AACjB,UAAU,mBAAmB;IAC3B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CACnC;AAiED,iBAAS,cAAc;WAyGT,OAAO,IAA6B;;yBAVpB,GAAG;;;;EAehC;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;WA5MX,MAAM,GAAG,IAAI;cAEV,MAAM,GAAG,IAAI;aAEd,OAAO;yBAEK,OAAO;gBAEhB,OAAO;qBAEF,MAAM;oBAEP,MAAM,GAAG,MAAM,EAAE;wFAyMlC,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}