@robuust-digital/vue-components 1.0.0-rc.1 → 1.0.1-rc.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.
- package/README.md +11 -101
- package/dist/nuxt-module.js +2 -2
- package/dist/tailwind/components/button.js +142 -5
- package/dist/vue-components.es.js +11 -11
- package/dist/vue-components.umd.js +1 -1
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -12,21 +12,25 @@ A modern and customizable component library built with **Vue 3** and **Tailwind
|
|
|
12
12
|
|
|
13
13
|
## Docs
|
|
14
14
|
|
|
15
|
-
[**See
|
|
15
|
+
[**See full docs here**](https://robuust.github.io/vue-components/)
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
|
-
1. **Install the component library via yarn:**
|
|
19
|
+
1. **Install the component library via yarn or npm:**
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
yarn add @robuust/vue-components
|
|
22
|
+
yarn add @robuust-digital/vue-components
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm i @robuust-digital/vue-components
|
|
23
27
|
```
|
|
24
28
|
|
|
25
29
|
2. **Add the component library plugin to your `tailwind.config.js`:**
|
|
26
30
|
|
|
27
31
|
```javascript
|
|
28
32
|
// tailwind.config.js
|
|
29
|
-
import components from '@robuust/vue-components/
|
|
33
|
+
import components from '@robuust-digital/vue-components/tailwind';
|
|
30
34
|
|
|
31
35
|
export default {
|
|
32
36
|
theme: {
|
|
@@ -56,109 +60,15 @@ export default {
|
|
|
56
60
|
|
|
57
61
|
```javascript
|
|
58
62
|
export default defineNuxtConfig({
|
|
59
|
-
modules: ['@robuust/vue-components/nuxt'],
|
|
63
|
+
modules: ['@robuust-digital/vue-components/nuxt'],
|
|
60
64
|
});
|
|
61
65
|
```
|
|
62
66
|
|
|
63
67
|
This will automatically register all components globally in your Nuxt application, making them available for immediate use.
|
|
64
68
|
|
|
65
|
-
## Usage
|
|
66
|
-
|
|
67
|
-
Import and use components in your Vue 3 project with ease. Here’s an example of how to use the `ButtonBase` component:
|
|
68
|
-
|
|
69
|
-
```vue
|
|
70
|
-
<template>
|
|
71
|
-
<ButtonBase color="primary" label="Click Me" />
|
|
72
|
-
</template>
|
|
73
|
-
|
|
74
|
-
<script setup>
|
|
75
|
-
import { ButtonBase } from '@robuust/vue-components';
|
|
76
|
-
</script>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Props
|
|
80
|
-
|
|
81
|
-
- `label`: `String` – Button text label. Default is an empty string.
|
|
82
|
-
- `color`: `String` – Button color, accepts primary, secondary, or light. Default is primary.
|
|
83
|
-
- `as`: `String | Object | Function` – Render as a different component (e.g., NuxtLink or a). Default is `button`.
|
|
84
|
-
|
|
85
|
-
## Customizing with Tailwind CSS
|
|
86
|
-
|
|
87
|
-
Tailor component styles by overriding default values in `tailwind.config.js`. This allows you to establish a consistent design system across projects:
|
|
88
|
-
|
|
89
|
-
```javascript
|
|
90
|
-
// tailwind.config.js
|
|
91
|
-
module.exports = {
|
|
92
|
-
theme: {
|
|
93
|
-
extend: {
|
|
94
|
-
components: (theme) => ({
|
|
95
|
-
button: {
|
|
96
|
-
primary: {
|
|
97
|
-
backgroundColor: theme('colors.yellow.500'),
|
|
98
|
-
color: '#000',
|
|
99
|
-
},
|
|
100
|
-
secondary: {
|
|
101
|
-
backgroundColor: theme('colors.blue.500'),
|
|
102
|
-
color: '#fff',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
}),
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
```
|
|
110
|
-
|
|
111
69
|
### Example Tailwind Configuration
|
|
112
70
|
|
|
113
|
-
With this configuration, you can create a custom theme for
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Setup custom button classes and styling
|
|
117
|
-
|
|
118
|
-
You also can define **custom** color button classes and styling. You can set `backgroundColor`, `color`, `hoverBackgroundColor`, `hoverColor` and additional `styles: {}` and `hoverStyles: {}` within the `custom` key:
|
|
119
|
-
|
|
120
|
-
```javascript
|
|
121
|
-
// tailwind.config.js
|
|
122
|
-
module.exports = {
|
|
123
|
-
theme: {
|
|
124
|
-
extend: {
|
|
125
|
-
components: (theme) => ({
|
|
126
|
-
button: {
|
|
127
|
-
custom: {
|
|
128
|
-
foo: {
|
|
129
|
-
backgroundColor: theme('colors.pink.500'),
|
|
130
|
-
color: theme('colors.white'),
|
|
131
|
-
hoverBackgroundColor: theme('colors.pink.600'),
|
|
132
|
-
hoverColor: theme('colors.white'),
|
|
133
|
-
styles: {},
|
|
134
|
-
hoverStyles: {},
|
|
135
|
-
},
|
|
136
|
-
bar: {
|
|
137
|
-
backgroundColor: theme('colors.teal.500'),
|
|
138
|
-
color: theme('colors.white'),
|
|
139
|
-
hoverBackgroundColor: theme('colors.teal.600'),
|
|
140
|
-
hoverColor: theme('colors.white'),
|
|
141
|
-
styles: {},
|
|
142
|
-
hoverStyles: {},
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
}),
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
```vue
|
|
153
|
-
<template>
|
|
154
|
-
<ButtonBase color="custom-foo" label="Custom Foo Button" />
|
|
155
|
-
<ButtonBase color="custom-bar" label="Custom Bar Button" />
|
|
156
|
-
</template>
|
|
157
|
-
|
|
158
|
-
<script setup>
|
|
159
|
-
import { ButtonBase } from '@robuust/vue-components';
|
|
160
|
-
</script>
|
|
161
|
-
```
|
|
71
|
+
With this configuration, you can create a custom theme for all components. Each project can apply its own colors and style variants by simply adjusting these values.
|
|
162
72
|
|
|
163
73
|
## Development
|
|
164
74
|
|
|
@@ -190,4 +100,4 @@ yarn build
|
|
|
190
100
|
MIT © Robuust Digital
|
|
191
101
|
|
|
192
102
|
|
|
193
|
-
*With `@robuust/vue-components`, bring consistency, flexibility, and a polished look to all your Vue 3 applications.*
|
|
103
|
+
*With `@robuust-digital/vue-components`, bring consistency, flexibility, and a polished look to all your Vue 3 applications.*
|
package/dist/nuxt-module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtModule, addComponent } from '@nuxt/kit';
|
|
2
|
-
import * as components from '@robuust/vue-components';
|
|
2
|
+
import * as components from '@robuust-digital/vue-components';
|
|
3
3
|
import pkg from '../package.json';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -17,7 +17,7 @@ export default defineNuxtModule({
|
|
|
17
17
|
Object.keys(components).forEach((name) => {
|
|
18
18
|
addComponent({
|
|
19
19
|
name,
|
|
20
|
-
filePath: '@robuust/vue-components',
|
|
20
|
+
filePath: '@robuust-digital/vue-components',
|
|
21
21
|
export: name,
|
|
22
22
|
global: true,
|
|
23
23
|
});
|
|
@@ -29,13 +29,20 @@ export default (theme) => {
|
|
|
29
29
|
gap: theme('gap.2'),
|
|
30
30
|
borderRadius: theme('borderRadius.xl'),
|
|
31
31
|
fontWeight: theme('fontWeight.medium'),
|
|
32
|
-
fontSize: theme('fontSize.base'),
|
|
33
|
-
whiteSpace:
|
|
32
|
+
fontSize: theme('fontSize.base.0'),
|
|
33
|
+
whiteSpace: 'nowrap',
|
|
34
34
|
transitionProperty: theme('transitionProperty.colors'),
|
|
35
35
|
transitionDuration: theme('transitionDuration.300'),
|
|
36
36
|
transitionTimingFunction: theme('transitionTimingFunction.DEFAULT'),
|
|
37
37
|
...theme('components.button'),
|
|
38
38
|
|
|
39
|
+
// Disabled state
|
|
40
|
+
'&:disabled': {
|
|
41
|
+
'@apply pointer-events-none': {},
|
|
42
|
+
opacity: theme('opacity.50'),
|
|
43
|
+
...theme('components.button.disabled'),
|
|
44
|
+
},
|
|
45
|
+
|
|
39
46
|
// Icon styling
|
|
40
47
|
'.button-icon': {
|
|
41
48
|
'@apply block': {},
|
|
@@ -43,6 +50,16 @@ export default (theme) => {
|
|
|
43
50
|
height: theme('height.5'),
|
|
44
51
|
flexShrink: theme('flexShrink.0'),
|
|
45
52
|
...theme('components.button.icon'),
|
|
53
|
+
|
|
54
|
+
'&.button-icon-loading': {
|
|
55
|
+
'@apply animate-spin': {},
|
|
56
|
+
...theme('components.button.icon.loading'),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
// Reverse icon
|
|
61
|
+
'&.button-reverse': {
|
|
62
|
+
'@apply flex-row-reverse': {},
|
|
46
63
|
},
|
|
47
64
|
|
|
48
65
|
// Color variants
|
|
@@ -56,6 +73,14 @@ export default (theme) => {
|
|
|
56
73
|
color: theme('colors.black'),
|
|
57
74
|
...theme('components.button.primary.hover'),
|
|
58
75
|
},
|
|
76
|
+
|
|
77
|
+
'&:disabled': {
|
|
78
|
+
...theme('components.button.primary.disabled'),
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
'.button-icon': {
|
|
82
|
+
...theme('components.button.primary.icon'),
|
|
83
|
+
},
|
|
59
84
|
},
|
|
60
85
|
'&.button-primary-soft': {
|
|
61
86
|
backgroundColor: theme('colors.lime.200'),
|
|
@@ -67,6 +92,14 @@ export default (theme) => {
|
|
|
67
92
|
color: theme('colors.700'),
|
|
68
93
|
...theme('components.button.primary-soft.hover'),
|
|
69
94
|
},
|
|
95
|
+
|
|
96
|
+
'&:disabled': {
|
|
97
|
+
...theme('components.button.primary-soft.disabled'),
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
'.button-icon': {
|
|
101
|
+
...theme('components.button.primary-soft.icon'),
|
|
102
|
+
},
|
|
70
103
|
},
|
|
71
104
|
'&.button-secondary': {
|
|
72
105
|
backgroundColor: theme('colors.indigo.400'),
|
|
@@ -78,6 +111,14 @@ export default (theme) => {
|
|
|
78
111
|
color: theme('colors.white'),
|
|
79
112
|
...theme('components.button.secondary.hover'),
|
|
80
113
|
},
|
|
114
|
+
|
|
115
|
+
'&:disabled': {
|
|
116
|
+
...theme('components.button.secondary.disabled'),
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
'.button-icon': {
|
|
120
|
+
...theme('components.button.secondary.icon'),
|
|
121
|
+
},
|
|
81
122
|
},
|
|
82
123
|
'&.button-secondary-soft': {
|
|
83
124
|
backgroundColor: theme('colors.indigo.200'),
|
|
@@ -89,6 +130,14 @@ export default (theme) => {
|
|
|
89
130
|
color: theme('colors.700'),
|
|
90
131
|
...theme('components.button.secondary-soft.hover'),
|
|
91
132
|
},
|
|
133
|
+
|
|
134
|
+
'&:disabled': {
|
|
135
|
+
...theme('components.button.secondary-soft.disabled'),
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
'.button-icon': {
|
|
139
|
+
...theme('components.button.secondary-soft.icon'),
|
|
140
|
+
},
|
|
92
141
|
},
|
|
93
142
|
'&.button-tertiary': {
|
|
94
143
|
backgroundColor: theme('colors.orange.400'),
|
|
@@ -100,6 +149,14 @@ export default (theme) => {
|
|
|
100
149
|
color: theme('colors.black'),
|
|
101
150
|
...theme('components.button.tertiary.hover'),
|
|
102
151
|
},
|
|
152
|
+
|
|
153
|
+
'&:disabled': {
|
|
154
|
+
...theme('components.button.tertiary.disabled'),
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
'.button-icon': {
|
|
158
|
+
...theme('components.button.tertiary.icon'),
|
|
159
|
+
},
|
|
103
160
|
},
|
|
104
161
|
'&.button-tertiary-soft': {
|
|
105
162
|
backgroundColor: theme('colors.orange.200'),
|
|
@@ -111,6 +168,14 @@ export default (theme) => {
|
|
|
111
168
|
color: theme('colors.700'),
|
|
112
169
|
...theme('components.button.tertiary-soft.hover'),
|
|
113
170
|
},
|
|
171
|
+
|
|
172
|
+
'&:disabled': {
|
|
173
|
+
...theme('components.button.tertiary-soft.disabled'),
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
'.button-icon': {
|
|
177
|
+
...theme('components.button.tertiary-soft.icon'),
|
|
178
|
+
},
|
|
114
179
|
},
|
|
115
180
|
'&.button-light': {
|
|
116
181
|
backgroundColor: theme('colors.white'),
|
|
@@ -123,6 +188,14 @@ export default (theme) => {
|
|
|
123
188
|
color: theme('colors.stone.900'),
|
|
124
189
|
...theme('components.button.light.hover'),
|
|
125
190
|
},
|
|
191
|
+
|
|
192
|
+
'&:disabled': {
|
|
193
|
+
...theme('components.button.light.disabled'),
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
'.button-icon': {
|
|
197
|
+
...theme('components.button.light.icon'),
|
|
198
|
+
},
|
|
126
199
|
},
|
|
127
200
|
'&.button-dark': {
|
|
128
201
|
backgroundColor: theme('colors.black'),
|
|
@@ -134,6 +207,14 @@ export default (theme) => {
|
|
|
134
207
|
color: theme('colors.white'),
|
|
135
208
|
...theme('components.button.dark.hover'),
|
|
136
209
|
},
|
|
210
|
+
|
|
211
|
+
'&:disabled': {
|
|
212
|
+
...theme('components.button.dark.disabled'),
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
'.button-icon': {
|
|
216
|
+
...theme('components.button.dark.icon'),
|
|
217
|
+
},
|
|
137
218
|
},
|
|
138
219
|
'&.button-danger': {
|
|
139
220
|
backgroundColor: theme('colors.red.600'),
|
|
@@ -145,6 +226,14 @@ export default (theme) => {
|
|
|
145
226
|
color: theme('colors.white'),
|
|
146
227
|
...theme('components.button.danger.hover'),
|
|
147
228
|
},
|
|
229
|
+
|
|
230
|
+
'&:disabled': {
|
|
231
|
+
...theme('components.button.danger.disabled'),
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
'.button-icon': {
|
|
235
|
+
...theme('components.button.danger.icon'),
|
|
236
|
+
},
|
|
148
237
|
},
|
|
149
238
|
'&.button-danger-soft': {
|
|
150
239
|
backgroundColor: theme('colors.red.200'),
|
|
@@ -156,6 +245,14 @@ export default (theme) => {
|
|
|
156
245
|
color: theme('colors.700'),
|
|
157
246
|
...theme('components.button.danger-soft.hover'),
|
|
158
247
|
},
|
|
248
|
+
|
|
249
|
+
'&:disabled': {
|
|
250
|
+
...theme('components.button.danger-soft.disabled'),
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
'.button-icon': {
|
|
254
|
+
...theme('components.button.danger-soft.icon'),
|
|
255
|
+
},
|
|
159
256
|
},
|
|
160
257
|
'&.button-warning': {
|
|
161
258
|
backgroundColor: theme('colors.yellow.400'),
|
|
@@ -167,6 +264,14 @@ export default (theme) => {
|
|
|
167
264
|
color: theme('colors.black'),
|
|
168
265
|
...theme('components.button.warning.hover'),
|
|
169
266
|
},
|
|
267
|
+
|
|
268
|
+
'&:disabled': {
|
|
269
|
+
...theme('components.button.warning.disabled'),
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
'.button-icon': {
|
|
273
|
+
...theme('components.button.warning.icon'),
|
|
274
|
+
},
|
|
170
275
|
},
|
|
171
276
|
'&.button-warning-soft': {
|
|
172
277
|
backgroundColor: theme('colors.yellow.200'),
|
|
@@ -178,6 +283,14 @@ export default (theme) => {
|
|
|
178
283
|
color: theme('colors.700'),
|
|
179
284
|
...theme('components.button.warning-soft.hover'),
|
|
180
285
|
},
|
|
286
|
+
|
|
287
|
+
'&:disabled': {
|
|
288
|
+
...theme('components.button.warning-soft.disabled'),
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
'.button-icon': {
|
|
292
|
+
...theme('components.button.warning-soft.icon'),
|
|
293
|
+
},
|
|
181
294
|
},
|
|
182
295
|
'&.button-success': {
|
|
183
296
|
backgroundColor: theme('colors.green.500'),
|
|
@@ -189,6 +302,14 @@ export default (theme) => {
|
|
|
189
302
|
color: theme('colors.white'),
|
|
190
303
|
...theme('components.button.success.hover'),
|
|
191
304
|
},
|
|
305
|
+
|
|
306
|
+
'&:disabled': {
|
|
307
|
+
...theme('components.button.success.disabled'),
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
'.button-icon': {
|
|
311
|
+
...theme('components.button.success.icon'),
|
|
312
|
+
},
|
|
192
313
|
},
|
|
193
314
|
'&.button-success-soft': {
|
|
194
315
|
backgroundColor: theme('colors.green.200'),
|
|
@@ -200,6 +321,14 @@ export default (theme) => {
|
|
|
200
321
|
color: theme('colors.700'),
|
|
201
322
|
...theme('components.button.success-soft.hover'),
|
|
202
323
|
},
|
|
324
|
+
|
|
325
|
+
'&:disabled': {
|
|
326
|
+
...theme('components.button.success-soft.disabled'),
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
'.button-icon': {
|
|
330
|
+
...theme('components.button.success-soft.icon'),
|
|
331
|
+
},
|
|
203
332
|
},
|
|
204
333
|
'&.button-clear': {
|
|
205
334
|
'@apply bg-transparent px-0': {},
|
|
@@ -210,6 +339,14 @@ export default (theme) => {
|
|
|
210
339
|
color: theme('colors.stone.800'),
|
|
211
340
|
...theme('components.button.clear.hover'),
|
|
212
341
|
},
|
|
342
|
+
|
|
343
|
+
'&:disabled': {
|
|
344
|
+
...theme('components.button.clear.disabled'),
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
'.button-icon': {
|
|
348
|
+
...theme('components.button.clear.icon'),
|
|
349
|
+
},
|
|
213
350
|
},
|
|
214
351
|
...customColorStyles,
|
|
215
352
|
|
|
@@ -222,7 +359,7 @@ export default (theme) => {
|
|
|
222
359
|
gap: theme('gap[1.5]'),
|
|
223
360
|
borderRadius: theme('borderRadius.md'),
|
|
224
361
|
fontWeight: theme('fontWeight.medium'),
|
|
225
|
-
fontSize: theme('fontSize.xs'),
|
|
362
|
+
fontSize: theme('fontSize.xs.0'),
|
|
226
363
|
...theme('components.button.xs'),
|
|
227
364
|
|
|
228
365
|
'.button-icon': {
|
|
@@ -239,7 +376,7 @@ export default (theme) => {
|
|
|
239
376
|
gap: theme('gap.2'),
|
|
240
377
|
borderRadius: theme('borderRadius.lg'),
|
|
241
378
|
fontWeight: theme('fontWeight.medium'),
|
|
242
|
-
fontSize: theme('fontSize.sm'),
|
|
379
|
+
fontSize: theme('fontSize.sm.0'),
|
|
243
380
|
...theme('components.button.sm'),
|
|
244
381
|
|
|
245
382
|
'.button-icon': {
|
|
@@ -256,7 +393,7 @@ export default (theme) => {
|
|
|
256
393
|
gap: theme('gap.4'),
|
|
257
394
|
borderRadius: theme('borderRadius.2xl'),
|
|
258
395
|
fontWeight: theme('fontWeight.medium'),
|
|
259
|
-
fontSize: theme('fontSize.lg'),
|
|
396
|
+
fontSize: theme('fontSize.lg.0'),
|
|
260
397
|
...theme('components.button.lg'),
|
|
261
398
|
|
|
262
399
|
'.button-icon': {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { openBlock as n, createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { openBlock as n, createElementBlock as c, createElementVNode as r, createBlock as o, resolveDynamicComponent as l, normalizeClass as s, withCtx as u, createTextVNode as d, toDisplayString as y, renderSlot as i, createCommentVNode as a, unref as m } from "vue";
|
|
2
|
+
const g = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
fill: "none",
|
|
5
5
|
viewBox: "0 0 24 24"
|
|
6
6
|
};
|
|
7
|
-
function
|
|
8
|
-
return n(),
|
|
7
|
+
function f(t, e) {
|
|
8
|
+
return n(), c("svg", g, e[0] || (e[0] = [
|
|
9
9
|
r("circle", {
|
|
10
10
|
cx: "12",
|
|
11
11
|
cy: "12",
|
|
@@ -20,7 +20,7 @@ function g(t, e) {
|
|
|
20
20
|
}, null, -1)
|
|
21
21
|
]));
|
|
22
22
|
}
|
|
23
|
-
const b = { render:
|
|
23
|
+
const b = { render: f }, k = {
|
|
24
24
|
__name: "ButtonBase",
|
|
25
25
|
props: {
|
|
26
26
|
as: {
|
|
@@ -53,11 +53,11 @@ const b = { render: g }, w = {
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
setup(t) {
|
|
56
|
-
return (e,
|
|
57
|
-
class:
|
|
56
|
+
return (e, B) => (n(), o(l(t.as), {
|
|
57
|
+
class: s(["button", `button-${t.color}`, `button-${t.size}`, { "button-reverse": t.iconLeft }])
|
|
58
58
|
}, {
|
|
59
59
|
default: u(() => [
|
|
60
|
-
d(
|
|
60
|
+
d(y(t.label) + " ", 1),
|
|
61
61
|
i(e.$slots, "icon", {}, () => [
|
|
62
62
|
t.icon && !t.spinning ? (n(), o(l(t.icon), {
|
|
63
63
|
key: 0,
|
|
@@ -65,9 +65,9 @@ const b = { render: g }, w = {
|
|
|
65
65
|
})) : a("", !0)
|
|
66
66
|
]),
|
|
67
67
|
i(e.$slots, "spinner", {}, () => [
|
|
68
|
-
t.spinning ? (n(), o(
|
|
68
|
+
t.spinning ? (n(), o(m(b), {
|
|
69
69
|
key: 0,
|
|
70
|
-
class: "button-icon
|
|
70
|
+
class: "button-icon button-icon-loading"
|
|
71
71
|
})) : a("", !0)
|
|
72
72
|
])
|
|
73
73
|
]),
|
|
@@ -76,5 +76,5 @@ const b = { render: g }, w = {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
k as ButtonBase
|
|
80
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.VueComponents={},n.Vue))})(this,function(n,e){"use strict";const i={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"};function r(t,o){return e.openBlock(),e.createElementBlock("svg",i,o[0]||(o[0]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",style:{opacity:".25"}},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z"},null,-1)]))}const
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.VueComponents={},n.Vue))})(this,function(n,e){"use strict";const i={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"};function r(t,o){return e.openBlock(),e.createElementBlock("svg",i,o[0]||(o[0]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",style:{opacity:".25"}},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z"},null,-1)]))}const c={render:r},l={__name:"ButtonBase",props:{as:{type:[String,Object,Function],default:"button"},label:{type:String,default:""},icon:{type:[Object,Function],default:null},iconLeft:{type:Boolean},size:{type:String,default:"base",validator:t=>["xs","sm","base","lg"].includes(t)},spinning:{type:Boolean},color:{type:String,default:"primary",validator:t=>/^(primary|secondary|tertiary|light|dark|danger|warning|success)(-soft)?$/.test(t)||t.startsWith("custom-")||"clear"}},setup(t){return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{class:e.normalizeClass(["button",`button-${t.color}`,`button-${t.size}`,{"button-reverse":t.iconLeft}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label)+" ",1),e.renderSlot(o.$slots,"icon",{},()=>[t.icon&&!t.spinning?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"button-icon"})):e.createCommentVNode("",!0)]),e.renderSlot(o.$slots,"spinner",{},()=>[t.spinning?(e.openBlock(),e.createBlock(e.unref(c),{key:0,class:"button-icon button-icon-loading"})):e.createCommentVNode("",!0)])]),_:3},8,["class"]))}};n.ButtonBase=l,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robuust-digital/vue-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A modern and customizable component library built with **Vue 3** and **Tailwind CSS**, designed to deliver a flexible, cohesive UI experience across all projects. Quickly integrate reusable components with ease, and customize them to suit your unique branding needs.",
|
|
6
6
|
"directories": {
|
|
@@ -38,9 +38,7 @@
|
|
|
38
38
|
"preview": "vite preview",
|
|
39
39
|
"test:unit": "vitest run",
|
|
40
40
|
"lint": "eslint . --fix",
|
|
41
|
-
"
|
|
42
|
-
"npm:publish": "npm publish --access public",
|
|
43
|
-
"docs:dev": "vitepress dev docs",
|
|
41
|
+
"docs:dev": "vitepress dev docs --host",
|
|
44
42
|
"docs:build": "vitepress build docs",
|
|
45
43
|
"docs:preview": "vitepress preview docs"
|
|
46
44
|
},
|