@stlhorizon/vue-ui 1.0.6 → 1.0.7
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 +100 -34
- package/dist/index.esm.js +9575 -8371
- package/dist/index.js +14 -14
- package/dist/src/components/Accordion.vue.d.ts +2 -2
- package/dist/src/components/AccordionItem.vue.d.ts +2 -2
- package/dist/src/components/Alert.vue.d.ts +3 -3
- package/dist/src/components/Avatar.vue.d.ts +2 -2
- package/dist/src/components/Breadcrumb.vue.d.ts +2 -2
- package/dist/src/components/Button.vue.d.ts +2 -2
- package/dist/src/components/ButtonGroup.vue.d.ts +2 -2
- package/dist/src/components/Checkbox.vue.d.ts +4 -4
- package/dist/src/components/DataTable.vue.d.ts +56 -4
- package/dist/src/components/DataTable.vue.d.ts.map +1 -1
- package/dist/src/components/DataTableCell.vue.d.ts +12 -4
- package/dist/src/components/DataTableCell.vue.d.ts.map +1 -1
- package/dist/src/components/DataTableFilters.vue.d.ts +19 -9
- package/dist/src/components/DataTableFilters.vue.d.ts.map +1 -1
- package/dist/src/components/DataTableHeader.vue.d.ts +16 -2
- package/dist/src/components/DataTableHeader.vue.d.ts.map +1 -1
- package/dist/src/components/DataTablePagination.vue.d.ts +22 -5
- package/dist/src/components/DataTablePagination.vue.d.ts.map +1 -1
- package/dist/src/components/DataTableRow.vue.d.ts +30 -6
- package/dist/src/components/DataTableRow.vue.d.ts.map +1 -1
- package/dist/src/components/DataTableToolBar.vue.d.ts +36 -19
- package/dist/src/components/DataTableToolBar.vue.d.ts.map +1 -1
- package/dist/src/components/DatePicker.vue.d.ts +4 -4
- package/dist/src/components/Divider.vue.d.ts +4 -4
- package/dist/src/components/DropdownItem.vue.d.ts +4 -4
- package/dist/src/components/FormField.vue.d.ts +8 -8
- package/dist/src/components/Label.vue.d.ts +2 -2
- package/dist/src/components/ListItem.vue.d.ts +4 -4
- package/dist/src/components/Logo.vue.d.ts +4 -4
- package/dist/src/components/MenuItem.vue.d.ts +4 -4
- package/dist/src/components/Option.vue.d.ts +4 -4
- package/dist/src/components/ProgressBar.vue.d.ts +4 -4
- package/dist/src/components/Radio.vue.d.ts +6 -6
- package/dist/src/components/Search.vue.d.ts +3 -3
- package/dist/src/components/Select.vue.d.ts +8 -8
- package/dist/src/components/Spinner.vue.d.ts +2 -2
- package/dist/src/components/StepperItem.vue.d.ts +2 -2
- package/dist/src/components/Switch.vue.d.ts +2 -2
- package/dist/src/components/Text.vue.d.ts +4 -4
- package/dist/src/components/Textarea.vue.d.ts +10 -10
- package/dist/src/components/TimelineItem.vue.d.ts +2 -2
- package/dist/src/components/Toast.vue.d.ts +2 -2
- package/dist/src/components/Typography.vue.d.ts +2 -2
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vue-ui.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,55 +4,104 @@ A comprehensive Vue.js component library built with Tailwind CSS, featuring 60+
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install @
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @stlhorizon/vue-ui
|
|
9
|
+
```
|
|
10
10
|
|
|
11
11
|
## Setup
|
|
12
12
|
|
|
13
13
|
1. Install the required peer dependencies:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
npm install vue@^3.
|
|
17
|
-
|
|
15
|
+
```bash
|
|
16
|
+
npm install vue@^3.5.18
|
|
17
|
+
```
|
|
18
18
|
|
|
19
19
|
2. Import the base styles in your main CSS file:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
@import '@
|
|
23
|
-
|
|
21
|
+
```css
|
|
22
|
+
@import '@stlhorizon/vue-ui/dist/vue-ui.css';
|
|
23
|
+
```
|
|
24
24
|
|
|
25
25
|
3. Configure your `tailwind.config.js` to include the library's content:
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
```js
|
|
28
28
|
/** @type {import('tailwindcss').Config} */
|
|
29
29
|
export default {
|
|
30
30
|
content: [
|
|
31
31
|
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
|
32
|
-
"./node_modules/@
|
|
32
|
+
"./node_modules/@stlhorizon/vue-ui/**/*.{vue,js,ts,jsx,tsx}"
|
|
33
33
|
],
|
|
34
34
|
// ... rest of your config
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
4. **Important: Vue Template Compiler Configuration**
|
|
39
|
+
|
|
40
|
+
If you encounter the error: *"Component provided template option but runtime compilation is not supported in this build of Vue"*, you need to configure your bundler to use the full Vue build that includes the template compiler.
|
|
41
|
+
|
|
42
|
+
### For Vite users:
|
|
43
|
+
|
|
44
|
+
Add this to your `vite.config.js`:
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
import { defineConfig } from 'vite'
|
|
48
|
+
import vue from '@vitejs/plugin-vue'
|
|
49
|
+
|
|
50
|
+
export default defineConfig({
|
|
51
|
+
plugins: [vue()],
|
|
52
|
+
resolve: {
|
|
53
|
+
alias: {
|
|
54
|
+
'vue': 'vue/dist/vue.esm-bundler.js'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### For Webpack users:
|
|
61
|
+
|
|
62
|
+
Add this to your `webpack.config.js`:
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
module.exports = {
|
|
66
|
+
resolve: {
|
|
67
|
+
alias: {
|
|
68
|
+
'vue$': 'vue/dist/vue.esm-bundler.js'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### For Nuxt 3 users:
|
|
75
|
+
|
|
76
|
+
Add this to your `nuxt.config.ts`:
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
export default defineNuxtConfig({
|
|
80
|
+
alias: {
|
|
81
|
+
'vue': 'vue/dist/vue.esm-bundler.js'
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
```
|
|
37
85
|
|
|
38
86
|
## Usage
|
|
39
87
|
|
|
40
88
|
### Global Registration (Recommended)
|
|
41
89
|
|
|
42
|
-
|
|
90
|
+
```js
|
|
43
91
|
// main.js
|
|
44
92
|
import { createApp } from 'vue'
|
|
45
|
-
import VueUI from '@
|
|
93
|
+
import VueUI from '@stlhorizon/vue-ui'
|
|
94
|
+
import '@stlhorizon/vue-ui/dist/vue-ui.css'
|
|
46
95
|
import App from './App.vue'
|
|
47
96
|
|
|
48
97
|
const app = createApp(App)
|
|
49
98
|
app.use(VueUI) // Auto-registers all components globally
|
|
50
99
|
app.mount('#app')
|
|
51
|
-
|
|
100
|
+
```
|
|
52
101
|
|
|
53
102
|
### Individual Component Import
|
|
54
103
|
|
|
55
|
-
|
|
104
|
+
```vue
|
|
56
105
|
<template>
|
|
57
106
|
<div>
|
|
58
107
|
<Button variant="default" size="lg">Click me</Button>
|
|
@@ -62,9 +111,9 @@ app.mount('#app')
|
|
|
62
111
|
</template>
|
|
63
112
|
|
|
64
113
|
<script setup>
|
|
65
|
-
import { Button, Input, DataTable } from '@
|
|
114
|
+
import { Button, Input, DataTable } from '@stlhorizon/vue-ui'
|
|
66
115
|
</script>
|
|
67
|
-
|
|
116
|
+
```
|
|
68
117
|
|
|
69
118
|
## Available Components
|
|
70
119
|
|
|
@@ -166,17 +215,17 @@ import { Button, Input, DataTable } from '@your-org/vue-ui'
|
|
|
166
215
|
## Component Examples
|
|
167
216
|
|
|
168
217
|
### Button Variants
|
|
169
|
-
|
|
218
|
+
```vue
|
|
170
219
|
<Button variant="default">Default</Button>
|
|
171
220
|
<Button variant="destructive">Destructive</Button>
|
|
172
221
|
<Button variant="outline">Outline</Button>
|
|
173
222
|
<Button variant="secondary">Secondary</Button>
|
|
174
223
|
<Button variant="ghost">Ghost</Button>
|
|
175
224
|
<Button variant="link">Link</Button>
|
|
176
|
-
|
|
225
|
+
```
|
|
177
226
|
|
|
178
227
|
### DataTable Usage
|
|
179
|
-
|
|
228
|
+
```vue
|
|
180
229
|
<template>
|
|
181
230
|
<DataTable
|
|
182
231
|
:data="users"
|
|
@@ -198,10 +247,10 @@ const columns = [
|
|
|
198
247
|
{ key: 'email', label: 'Email', sortable: true }
|
|
199
248
|
]
|
|
200
249
|
</script>
|
|
201
|
-
|
|
250
|
+
```
|
|
202
251
|
|
|
203
252
|
### Layout Usage
|
|
204
|
-
|
|
253
|
+
```vue
|
|
205
254
|
<template>
|
|
206
255
|
<DefaultLayout>
|
|
207
256
|
<template #header>
|
|
@@ -224,33 +273,45 @@ const columns = [
|
|
|
224
273
|
</template>
|
|
225
274
|
</DefaultLayout>
|
|
226
275
|
</template>
|
|
227
|
-
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Troubleshooting
|
|
279
|
+
|
|
280
|
+
### Common Issues
|
|
281
|
+
|
|
282
|
+
1. **Template compilation error**: Make sure you've configured the Vue alias as described in the setup section above.
|
|
283
|
+
|
|
284
|
+
2. **Styles not loading**: Ensure you're importing the CSS file: `@import '@stlhorizon/vue-ui/dist/vue-ui.css';`
|
|
285
|
+
|
|
286
|
+
3. **Components not found**: Make sure you've either registered components globally or imported them individually.
|
|
287
|
+
|
|
288
|
+
4. **Tailwind classes not working**: Verify that your `tailwind.config.js` includes the library's content path.
|
|
228
289
|
|
|
229
290
|
## Publishing to NPM
|
|
230
291
|
|
|
231
292
|
1. **Update package details in `package.json`:**
|
|
232
|
-
- Change
|
|
293
|
+
- Change package name if needed
|
|
233
294
|
- Update repository URL, author, and description
|
|
234
295
|
- Set the correct version number
|
|
235
296
|
|
|
236
297
|
2. **Build the library:**
|
|
237
|
-
|
|
298
|
+
```bash
|
|
238
299
|
npm run build
|
|
239
|
-
|
|
300
|
+
```
|
|
240
301
|
|
|
241
302
|
3. **Login to npm:**
|
|
242
|
-
|
|
303
|
+
```bash
|
|
243
304
|
npm login
|
|
244
|
-
|
|
305
|
+
```
|
|
245
306
|
|
|
246
307
|
4. **Publish:**
|
|
247
|
-
|
|
308
|
+
```bash
|
|
248
309
|
npm publish --access public
|
|
249
|
-
|
|
310
|
+
```
|
|
250
311
|
|
|
251
312
|
## Development
|
|
252
313
|
|
|
253
|
-
|
|
314
|
+
```bash
|
|
254
315
|
# Install dependencies
|
|
255
316
|
npm install
|
|
256
317
|
|
|
@@ -262,8 +323,13 @@ npm run build
|
|
|
262
323
|
|
|
263
324
|
# Lint code
|
|
264
325
|
npm run lint
|
|
265
|
-
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## Requirements
|
|
329
|
+
|
|
330
|
+
- Node.js: `^20.19.0 || >=22.12.0`
|
|
331
|
+
- Vue.js: `^3.5.18`
|
|
266
332
|
|
|
267
333
|
## License
|
|
268
334
|
|
|
269
|
-
MIT
|
|
335
|
+
MIT
|