cisse-vue-ui 0.1.0 → 0.1.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 (85) hide show
  1. package/README.md +435 -6
  2. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DQD2I1Wk.cjs +621 -0
  3. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DQD2I1Wk.cjs.map +1 -0
  4. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DVkcMcSN.js +622 -0
  5. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DVkcMcSN.js.map +1 -0
  6. package/dist/CollapsibleCard.vue_vue_type_script_setup_true_lang-D2MeLTRV.cjs +1133 -0
  7. package/dist/CollapsibleCard.vue_vue_type_script_setup_true_lang-D2MeLTRV.cjs.map +1 -0
  8. package/dist/CollapsibleCard.vue_vue_type_script_setup_true_lang-Ixih38V0.js +1134 -0
  9. package/dist/CollapsibleCard.vue_vue_type_script_setup_true_lang-Ixih38V0.js.map +1 -0
  10. package/dist/{NotificationList.vue_vue_type_script_setup_true_lang-B2hjbMm4.js → EmptyState.vue_vue_type_script_setup_true_lang-CrVvFwXA.js} +163 -44
  11. package/dist/EmptyState.vue_vue_type_script_setup_true_lang-CrVvFwXA.js.map +1 -0
  12. package/dist/{NotificationList.vue_vue_type_script_setup_true_lang-Ci3zIvrv.cjs → EmptyState.vue_vue_type_script_setup_true_lang-mlqLBP5W.cjs} +163 -44
  13. package/dist/EmptyState.vue_vue_type_script_setup_true_lang-mlqLBP5W.cjs.map +1 -0
  14. package/dist/MenuItem.vue_vue_type_script_setup_true_lang-BWz86k7c.cjs +86 -0
  15. package/dist/MenuItem.vue_vue_type_script_setup_true_lang-BWz86k7c.cjs.map +1 -0
  16. package/dist/MenuItem.vue_vue_type_script_setup_true_lang-emN2qlfR.js +87 -0
  17. package/dist/MenuItem.vue_vue_type_script_setup_true_lang-emN2qlfR.js.map +1 -0
  18. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DTlUENg3.js +265 -0
  19. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DTlUENg3.js.map +1 -0
  20. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-IcouTz4C.cjs +264 -0
  21. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-IcouTz4C.cjs.map +1 -0
  22. package/dist/components/core/AutocompleteComponent.vue.d.ts +7 -1
  23. package/dist/components/core/Avatar.vue.d.ts +20 -0
  24. package/dist/components/core/Button.vue.d.ts +49 -0
  25. package/dist/components/core/CollapsibleCard.vue.d.ts +28 -0
  26. package/dist/components/core/Dropdown.vue.d.ts +52 -0
  27. package/dist/components/core/MenuItem.vue.d.ts +11 -1
  28. package/dist/components/core/Stepper.vue.d.ts +22 -0
  29. package/dist/components/core/TabPanel.vue.d.ts +21 -0
  30. package/dist/components/core/Tabs.vue.d.ts +39 -0
  31. package/dist/components/core/index.cjs +14 -6
  32. package/dist/components/core/index.cjs.map +1 -1
  33. package/dist/components/core/index.d.ts +12 -0
  34. package/dist/components/core/index.js +14 -6
  35. package/dist/components/core/index.js.map +1 -1
  36. package/dist/components/feedback/Alert.vue.d.ts +34 -0
  37. package/dist/components/feedback/EmptyState.vue.d.ts +29 -0
  38. package/dist/components/feedback/index.cjs +8 -6
  39. package/dist/components/feedback/index.cjs.map +1 -1
  40. package/dist/components/feedback/index.d.ts +3 -0
  41. package/dist/components/feedback/index.js +3 -1
  42. package/dist/components/form/Checkbox.vue.d.ts +20 -0
  43. package/dist/components/form/FormSelect.vue.d.ts +35 -6
  44. package/dist/components/form/Switch.vue.d.ts +21 -0
  45. package/dist/components/form/index.cjs +9 -7
  46. package/dist/components/form/index.cjs.map +1 -1
  47. package/dist/components/form/index.d.ts +2 -0
  48. package/dist/components/form/index.js +4 -2
  49. package/dist/components/index.cjs +34 -19
  50. package/dist/components/index.cjs.map +1 -1
  51. package/dist/components/index.d.ts +1 -0
  52. package/dist/components/index.js +26 -11
  53. package/dist/components/index.js.map +1 -1
  54. package/dist/components/layout/BaseLayout.vue.d.ts +58 -0
  55. package/dist/components/layout/PageLayout.vue.d.ts +37 -0
  56. package/dist/components/layout/index.cjs +6 -0
  57. package/dist/components/layout/index.cjs.map +1 -0
  58. package/dist/components/layout/index.d.ts +3 -0
  59. package/dist/components/layout/index.js +6 -0
  60. package/dist/components/layout/index.js.map +1 -0
  61. package/dist/index-Bt9enqyq.cjs +47 -0
  62. package/dist/index-Bt9enqyq.cjs.map +1 -0
  63. package/dist/index-CxPY8Qb7.js +48 -0
  64. package/dist/index-CxPY8Qb7.js.map +1 -0
  65. package/dist/index.cjs +35 -20
  66. package/dist/index.cjs.map +1 -1
  67. package/dist/index.js +29 -14
  68. package/dist/index.js.map +1 -1
  69. package/dist/style.css +2 -0
  70. package/dist/types/components.d.ts +7 -0
  71. package/package.json +12 -3
  72. package/dist/NotificationList.vue_vue_type_script_setup_true_lang-B2hjbMm4.js.map +0 -1
  73. package/dist/NotificationList.vue_vue_type_script_setup_true_lang-Ci3zIvrv.cjs.map +0 -1
  74. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-Be73hShP.cjs +0 -234
  75. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-Be73hShP.cjs.map +0 -1
  76. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-DjT2qdcp.js +0 -235
  77. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-DjT2qdcp.js.map +0 -1
  78. package/dist/TableAction.vue_vue_type_script_setup_true_lang-BHskhVhK.js +0 -540
  79. package/dist/TableAction.vue_vue_type_script_setup_true_lang-BHskhVhK.js.map +0 -1
  80. package/dist/TableAction.vue_vue_type_script_setup_true_lang-CojbKn7E.cjs +0 -539
  81. package/dist/TableAction.vue_vue_type_script_setup_true_lang-CojbKn7E.cjs.map +0 -1
  82. package/dist/index-BoCtJCg0.cjs +0 -32
  83. package/dist/index-BoCtJCg0.cjs.map +0 -1
  84. package/dist/index-CGhDI10m.js +0 -33
  85. package/dist/index-CGhDI10m.js.map +0 -1
package/README.md CHANGED
@@ -1,15 +1,444 @@
1
- # vue-tailwind-ui
1
+ # cisse-vue-ui
2
2
 
3
- To install dependencies:
3
+ A Vue 3 component library built with TypeScript and Tailwind CSS v4.
4
+
5
+ ## Installation
4
6
 
5
7
  ```bash
6
- bun install
8
+ npm install cisse-vue-ui
9
+ # or
10
+ bun add cisse-vue-ui
7
11
  ```
8
12
 
9
- To run:
13
+ ### Peer Dependencies
10
14
 
11
15
  ```bash
12
- bun run index.ts
16
+ npm install vue@^3.4 tailwindcss@^4 @iconify/vue@^4
17
+ ```
18
+
19
+ ## Setup
20
+
21
+ ### 1. Import Styles
22
+
23
+ Add the pre-compiled CSS to your main CSS file:
24
+
25
+ ```css
26
+ @import 'cisse-vue-ui/style.css';
27
+ @import 'tailwindcss';
28
+ ```
29
+
30
+ ### 2. Configure Primary Color (Optional)
31
+
32
+ Override the default primary color in your CSS:
33
+
34
+ ```css
35
+ @theme {
36
+ --color-primary-50: oklch(97% 0.02 142);
37
+ --color-primary-100: oklch(94% 0.05 142);
38
+ --color-primary-200: oklch(88% 0.10 142);
39
+ --color-primary-300: oklch(78% 0.15 142);
40
+ --color-primary-400: oklch(65% 0.20 142);
41
+ --color-primary-500: oklch(55% 0.22 142);
42
+ --color-primary-600: oklch(48% 0.20 142);
43
+ --color-primary-700: oklch(40% 0.17 142);
44
+ --color-primary-800: oklch(32% 0.14 142);
45
+ --color-primary-900: oklch(25% 0.10 142);
46
+ --color-primary-950: oklch(18% 0.08 142);
47
+ }
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ ### Tree-Shaken Imports (Recommended)
53
+
54
+ ```vue
55
+ <script setup lang="ts">
56
+ import { Button, CardComponent, FormInput } from 'cisse-vue-ui'
57
+ </script>
58
+ ```
59
+
60
+ ### Category Imports
61
+
62
+ ```typescript
63
+ import { Button, Tabs, TabPanel } from 'cisse-vue-ui/components/core'
64
+ import { FormInput, FormSelect, Switch } from 'cisse-vue-ui/components/form'
65
+ import { Modal, Alert, LoadingSpinner } from 'cisse-vue-ui/components/feedback'
66
+ import { BaseLayout, PageLayout } from 'cisse-vue-ui/components/layout'
13
67
  ```
14
68
 
15
- This project was created using `bun init` in bun v1.2.4. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
69
+ ### Global Registration (Vue Plugin)
70
+
71
+ ```typescript
72
+ import { createApp } from 'vue'
73
+ import { VueTailwindUI } from 'cisse-vue-ui'
74
+
75
+ const app = createApp(App)
76
+
77
+ // Register all components
78
+ app.use(VueTailwindUI)
79
+
80
+ // Or with a prefix
81
+ app.use(VueTailwindUI, { prefix: 'Ui' }) // <UiButton>, <UiCard>, etc.
82
+
83
+ // Or specific components only
84
+ app.use(VueTailwindUI, { components: ['Button', 'CardComponent'] })
85
+ ```
86
+
87
+ ## Components
88
+
89
+ ### Core
90
+
91
+ | Component | Description |
92
+ |-----------|-------------|
93
+ | `Button` | Button with variants (primary, secondary, outline, ghost, danger, success), sizes, icons, loading state |
94
+ | `CardComponent` | Card container with header, content, and footer slots |
95
+ | `TableComponent` | Data table with sorting, actions, and custom column rendering |
96
+ | `Tabs` | Tab navigation with variants (underline, pills, boxed) |
97
+ | `TabPanel` | Tab content panel (use with Tabs) |
98
+ | `Dropdown` | Dropdown menu with items, icons, and dividers |
99
+ | `Avatar` | User avatar with image, initials, or icon fallback |
100
+ | `AutocompleteComponent` | Searchable select with keyboard navigation |
101
+ | `MenuItem` | Navigation menu item with icon, active state detection, and route support |
102
+ | `StatusBadge` | Colored status indicator badge |
103
+ | `TableAction` | Icon button for table row actions |
104
+ | `Stepper` | Multi-step progress indicator with horizontal/vertical orientation |
105
+ | `CollapsibleCard` | Card that can expand/collapse its content |
106
+
107
+ ### Form
108
+
109
+ | Component | Description |
110
+ |-----------|-------------|
111
+ | `FormInput` | Text input with label, validation, and icons |
112
+ | `FormSelect` | Select dropdown with label and validation |
113
+ | `FormGroup` | Form field wrapper with label and help text |
114
+ | `FormLabel` | Styled form label |
115
+ | `FormHelp` | Help text for form fields |
116
+ | `SearchInput` | Search input with icon and clear button |
117
+ | `Switch` | Toggle switch with label and description |
118
+ | `Checkbox` | Checkbox with label and description |
119
+
120
+ ### Feedback
121
+
122
+ | Component | Description |
123
+ |-----------|-------------|
124
+ | `Modal` | Modal dialog with header, body, footer slots |
125
+ | `Alert` | Alert banner with variants (info, success, warning, error) |
126
+ | `LoadingSpinner` | Loading indicator with size variants |
127
+ | `PaginationControls` | Pagination with page numbers and navigation |
128
+ | `NotificationList` | Toast notification container |
129
+ | `NotificationComponent` | Individual toast notification |
130
+ | `EmptyState` | Placeholder for empty content with icon and action slot |
131
+
132
+ ### Layout
133
+
134
+ | Component | Description |
135
+ |-----------|-------------|
136
+ | `BaseLayout` | App shell with sidebar, header, main content area, and route-aware menu |
137
+ | `PageLayout` | Page wrapper with breadcrumbs |
138
+
139
+ ### Type Display
140
+
141
+ | Component | Description |
142
+ |-----------|-------------|
143
+ | `TextType` | Text value display |
144
+ | `NumberType` | Formatted number display |
145
+ | `DateType` | Formatted date display |
146
+ | `BooleanType` | Boolean value display (check/cross icons) |
147
+ | `BadgeType` | Badge value display with colors |
148
+
149
+ ## Composables
150
+
151
+ ```typescript
152
+ import { useNotifications, useDarkMode, useExportCSV } from 'cisse-vue-ui/composables'
153
+ ```
154
+
155
+ ### useNotifications
156
+
157
+ ```typescript
158
+ const { notifications, addNotification, removeNotification } = useNotifications()
159
+
160
+ addNotification({
161
+ type: 'success',
162
+ title: 'Saved',
163
+ message: 'Your changes have been saved.'
164
+ })
165
+ ```
166
+
167
+ ### useDarkMode
168
+
169
+ ```typescript
170
+ const { isDark, toggle, enable, disable } = useDarkMode({
171
+ selector: 'html', // Element to add .dark class
172
+ storageKey: 'theme', // localStorage key
173
+ defaultDark: false // Default state
174
+ })
175
+ ```
176
+
177
+ ### useExportCSV
178
+
179
+ ```typescript
180
+ const { exportToCSV } = useExportCSV()
181
+
182
+ exportToCSV(data, columns, 'export.csv')
183
+ ```
184
+
185
+ ## Types
186
+
187
+ ```typescript
188
+ import type { Property, Notification, Breadcrumb } from 'cisse-vue-ui/types'
189
+
190
+ // Table column definition
191
+ const columns: Property[] = [
192
+ { key: 'name', label: 'Name', sortable: true },
193
+ { key: 'email', label: 'Email' },
194
+ { key: 'status', label: 'Status', type: 'badge' }
195
+ ]
196
+
197
+ // Breadcrumb navigation
198
+ const breadcrumbs: Breadcrumb[] = [
199
+ { label: 'Home', to: '/' },
200
+ { label: 'Users', to: '/users' },
201
+ { label: 'Edit' }
202
+ ]
203
+ ```
204
+
205
+ ## Component Examples
206
+
207
+ ### Button
208
+
209
+ ```vue
210
+ <Button variant="primary" size="md" :loading="isLoading">
211
+ Save Changes
212
+ </Button>
213
+
214
+ <Button variant="outline" icon="lucide:plus">
215
+ Add Item
216
+ </Button>
217
+
218
+ <Button variant="danger" icon="lucide:trash">
219
+ Delete
220
+ </Button>
221
+ ```
222
+
223
+ ### Tabs
224
+
225
+ ```vue
226
+ <script setup>
227
+ import { ref } from 'vue'
228
+ import { Tabs, TabPanel } from 'cisse-vue-ui'
229
+
230
+ const activeTab = ref('profile')
231
+ const tabs = [
232
+ { key: 'profile', label: 'Profile' },
233
+ { key: 'settings', label: 'Settings' },
234
+ { key: 'notifications', label: 'Notifications' }
235
+ ]
236
+ </script>
237
+
238
+ <template>
239
+ <Tabs v-model="activeTab" :tabs="tabs" variant="underline">
240
+ <TabPanel value="profile">Profile content</TabPanel>
241
+ <TabPanel value="settings">Settings content</TabPanel>
242
+ <TabPanel value="notifications">Notifications content</TabPanel>
243
+ </Tabs>
244
+ </template>
245
+ ```
246
+
247
+ ### Switch
248
+
249
+ ```vue
250
+ <Switch
251
+ v-model="emailNotifications"
252
+ label="Email notifications"
253
+ description="Receive email updates about your account"
254
+ />
255
+ ```
256
+
257
+ ### Alert
258
+
259
+ ```vue
260
+ <Alert variant="success" title="Success!" dismissible>
261
+ Your changes have been saved successfully.
262
+ </Alert>
263
+
264
+ <Alert variant="error" title="Error">
265
+ Something went wrong. Please try again.
266
+ </Alert>
267
+ ```
268
+
269
+ ### Dropdown
270
+
271
+ ```vue
272
+ <script setup>
273
+ import { Dropdown } from 'cisse-vue-ui'
274
+
275
+ const items = [
276
+ { key: 'edit', label: 'Edit', icon: 'lucide:edit' },
277
+ { key: 'duplicate', label: 'Duplicate', icon: 'lucide:copy' },
278
+ { key: 'divider', divider: true },
279
+ { key: 'delete', label: 'Delete', icon: 'lucide:trash', danger: true }
280
+ ]
281
+
282
+ const handleSelect = (item) => {
283
+ console.log('Selected:', item.key)
284
+ }
285
+ </script>
286
+
287
+ <template>
288
+ <Dropdown :items="items" @select="handleSelect">
289
+ <template #trigger-label>Actions</template>
290
+ </Dropdown>
291
+ </template>
292
+ ```
293
+
294
+ ### Stepper
295
+
296
+ ```vue
297
+ <script setup>
298
+ import { ref } from 'vue'
299
+ import { Stepper } from 'cisse-vue-ui'
300
+
301
+ const currentStep = ref('step2')
302
+ const steps = [
303
+ { key: 'step1', title: 'Account', description: 'Create account', icon: 'lucide:user' },
304
+ { key: 'step2', title: 'Profile', description: 'Set up profile', icon: 'lucide:settings' },
305
+ { key: 'step3', title: 'Complete', description: 'Ready to go!', icon: 'lucide:check' }
306
+ ]
307
+ </script>
308
+
309
+ <template>
310
+ <Stepper v-model="currentStep" :steps="steps" />
311
+ </template>
312
+ ```
313
+
314
+ ### EmptyState
315
+
316
+ ```vue
317
+ <EmptyState
318
+ title="No results found"
319
+ message="Try adjusting your search or filters"
320
+ icon="lucide:search-x"
321
+ >
322
+ <template #action>
323
+ <Button variant="primary" size="sm">Clear filters</Button>
324
+ </template>
325
+ </EmptyState>
326
+ ```
327
+
328
+ ### Checkbox
329
+
330
+ ```vue
331
+ <Checkbox
332
+ v-model="accepted"
333
+ label="Accept terms"
334
+ description="I agree to the terms and conditions"
335
+ />
336
+ ```
337
+
338
+ ### TableComponent
339
+
340
+ ```vue
341
+ <script setup>
342
+ import { TableComponent } from 'cisse-vue-ui'
343
+
344
+ const properties = [
345
+ { key: 'name', label: 'Name', sortable: true },
346
+ { key: 'email', label: 'Email' },
347
+ { key: 'role', label: 'Role', type: 'badge' }
348
+ ]
349
+
350
+ const data = [
351
+ { id: 1, name: 'John Doe', email: 'john@example.com', role: 'Admin' },
352
+ { id: 2, name: 'Jane Smith', email: 'jane@example.com', role: 'User' }
353
+ ]
354
+ </script>
355
+
356
+ <template>
357
+ <TableComponent
358
+ :properties="properties"
359
+ :data="data"
360
+ :loading="false"
361
+ >
362
+ <template #actions="{ item }">
363
+ <TableAction icon="lucide:edit" @click="edit(item)" />
364
+ <TableAction icon="lucide:trash" variant="danger" @click="delete(item)" />
365
+ </template>
366
+ </TableComponent>
367
+ </template>
368
+ ```
369
+
370
+ ### MenuItem
371
+
372
+ ```vue
373
+ <script setup>
374
+ import { useRoute } from 'vue-router'
375
+ import { MenuItem } from 'cisse-vue-ui'
376
+
377
+ const route = useRoute()
378
+
379
+ const menuItem = {
380
+ label: 'Dashboard',
381
+ link: '/dashboard',
382
+ icon: 'lucide:layout-dashboard'
383
+ }
384
+ </script>
385
+
386
+ <template>
387
+ <!-- Auto-detect active state from current route -->
388
+ <MenuItem :menu-item="menuItem" :current-path="route.path" />
389
+
390
+ <!-- Or manually control active state -->
391
+ <MenuItem :menu-item="menuItem" :active="true" />
392
+ </template>
393
+ ```
394
+
395
+ ### BaseLayout
396
+
397
+ ```vue
398
+ <script setup>
399
+ import { useRoute } from 'vue-router'
400
+ import { BaseLayout } from 'cisse-vue-ui'
401
+
402
+ const route = useRoute()
403
+
404
+ const menuItems = [
405
+ { label: 'Dashboard', link: '/', icon: 'lucide:home' },
406
+ { label: 'Users', link: '/users', icon: 'lucide:users' },
407
+ { label: 'Settings', link: '/settings', icon: 'lucide:settings' }
408
+ ]
409
+ </script>
410
+
411
+ <template>
412
+ <BaseLayout
413
+ :menu-items="menuItems"
414
+ :current-path="route.path"
415
+ :show-dark-toggle="true"
416
+ >
417
+ <template #logo>
418
+ <img src="/logo.svg" alt="Logo" class="h-8" />
419
+ </template>
420
+
421
+ <RouterView />
422
+ </BaseLayout>
423
+ </template>
424
+ ```
425
+
426
+ ## Dark Mode
427
+
428
+ Components support dark mode via the `.dark` class on a parent element:
429
+
430
+ ```html
431
+ <html class="dark">
432
+ <!-- Components will use dark theme -->
433
+ </html>
434
+ ```
435
+
436
+ Use the `useDarkMode` composable or implement your own toggle:
437
+
438
+ ```typescript
439
+ const { isDark, toggle } = useDarkMode()
440
+ ```
441
+
442
+ ## License
443
+
444
+ MIT