@robuust-digital/vue-components 1.1.0-rc.0 → 1.1.1
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/dist/style.css +1 -1
- package/dist/tailwind/components/alert.js +188 -0
- package/dist/tailwind/components/button.js +10 -32
- package/dist/tailwind/index.js +2 -0
- package/dist/vue-components.es.js +617 -536
- package/dist/vue-components.umd.js +2 -2
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.rvc-pointer-events-none{pointer-events:none}.rvc-pointer-events-auto{pointer-events:auto}.rvc-fixed{position:fixed}.rvc-absolute{position:absolute}.rvc-relative{position:relative}.rvc-sticky{position:sticky}.rvc-inset-0{top:0;right:0;bottom:0;left:0}.rvc-inset-y-0{top:0;bottom:0}.rvc-left-0{left:0}.rvc-right-0{right:0}.rvc-top-0{top:0}.rvc-z-10{z-index:10}.rvc-ml-3{margin-left:.75rem}.rvc-flex{display:flex}.rvc-size-full{width:100%;height:100%}.rvc-h-7{height:1.75rem}.rvc-h-full{height:100%}.rvc-min-h-0{min-height:0px}.rvc-w-full{width:100%}.rvc-w-screen{width:100vw}.rvc-max-w-full{max-width:100%}.rvc-max-w-xl{max-width:36rem}.rvc-flex-1{flex:1 1 0%}.rvc-shrink-0{flex-shrink:0}.rvc-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-flex-col{flex-direction:column}.rvc-flex-col-reverse{flex-direction:column-reverse}.rvc-items-center{align-items:center}.rvc-justify-between{justify-content:space-between}.rvc-overflow-hidden{overflow:hidden}.rvc-overflow-y-scroll{overflow-y:scroll}.rvc-pl-10{padding-left:2.5rem}.rvc-font-black{font-weight:900}.rvc-opacity-0{opacity:0}.rvc-opacity-100{opacity:1}.rvc-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.rvc-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-duration-500{transition-duration:.5s}.rvc-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 640px){.sm\:rvc-duration-700{transition-duration:.7s}}
|
|
1
|
+
.rvc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.rvc-pointer-events-none{pointer-events:none}.rvc-pointer-events-auto{pointer-events:auto}.rvc-fixed{position:fixed}.rvc-absolute{position:absolute}.rvc-relative{position:relative}.rvc-sticky{position:sticky}.rvc-inset-0{top:0;right:0;bottom:0;left:0}.rvc-inset-y-0{top:0;bottom:0}.rvc-left-0{left:0}.rvc-right-0{right:0}.rvc-top-0{top:0}.rvc-z-10{z-index:10}.rvc-ml-3{margin-left:.75rem}.rvc-flex{display:flex}.rvc-size-5{width:1.25rem;height:1.25rem}.rvc-size-full{width:100%;height:100%}.rvc-h-7{height:1.75rem}.rvc-h-full{height:100%}.rvc-min-h-0{min-height:0px}.rvc-w-full{width:100%}.rvc-w-screen{width:100vw}.rvc-max-w-full{max-width:100%}.rvc-max-w-xl{max-width:36rem}.rvc-flex-1{flex:1 1 0%}.rvc-shrink-0{flex-shrink:0}.rvc-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rvc-flex-col{flex-direction:column}.rvc-flex-col-reverse{flex-direction:column-reverse}.rvc-items-center{align-items:center}.rvc-justify-between{justify-content:space-between}.rvc-overflow-hidden{overflow:hidden}.rvc-overflow-y-scroll{overflow-y:scroll}.rvc-pl-10{padding-left:2.5rem}.rvc-font-black{font-weight:900}.rvc-opacity-0{opacity:0}.rvc-opacity-100{opacity:1}.rvc-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.rvc-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.rvc-duration-500{transition-duration:.5s}.rvc-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 640px){.sm\:rvc-duration-700{transition-duration:.7s}}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert component
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} theme - The global theme object
|
|
5
|
+
*/
|
|
6
|
+
export default (theme) => ({
|
|
7
|
+
'.alert': {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
position: 'relative',
|
|
10
|
+
width: '100%',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
paddingTop: theme('padding.6'),
|
|
13
|
+
paddingBottom: theme('padding.6'),
|
|
14
|
+
paddingLeft: theme('padding.6'),
|
|
15
|
+
paddingRight: theme('padding.6'),
|
|
16
|
+
borderRadius: theme('borderRadius.md'),
|
|
17
|
+
borderStyle: 'solid',
|
|
18
|
+
fontSize: theme('fontSize.base.0'),
|
|
19
|
+
backgroundColor: theme('colors.blue.50'),
|
|
20
|
+
color: theme('colors.blue.700'),
|
|
21
|
+
...theme('components.alert'),
|
|
22
|
+
|
|
23
|
+
a: {
|
|
24
|
+
textDecoration: 'underline',
|
|
25
|
+
color: 'inherit',
|
|
26
|
+
...theme('components.alert.link'),
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
ul: {
|
|
30
|
+
listStyleType: 'disc',
|
|
31
|
+
listStylePosition: 'inside',
|
|
32
|
+
marginTop: '0',
|
|
33
|
+
marginBottom: '0',
|
|
34
|
+
marginLeft: theme('margin.2'),
|
|
35
|
+
paddingLeft: '0',
|
|
36
|
+
...theme('components.alert.list'),
|
|
37
|
+
|
|
38
|
+
li: {
|
|
39
|
+
marginTop: '0',
|
|
40
|
+
...theme('components.alert.listitem'),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
ol: {
|
|
45
|
+
listStyleType: 'decimal',
|
|
46
|
+
listStylePosition: 'inside',
|
|
47
|
+
marginTop: '0',
|
|
48
|
+
marginBottom: '0',
|
|
49
|
+
marginLeft: theme('margin.2'),
|
|
50
|
+
paddingLeft: '0',
|
|
51
|
+
...theme('components.alert.orderedlist'),
|
|
52
|
+
|
|
53
|
+
li: {
|
|
54
|
+
marginTop: '0',
|
|
55
|
+
...theme('components.alert.orderedlistitem'),
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
'.alert-close': {
|
|
60
|
+
display: 'inline-flex',
|
|
61
|
+
justifyContent: 'center',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
position: 'absolute',
|
|
64
|
+
top: '0',
|
|
65
|
+
right: '0',
|
|
66
|
+
padding: theme('padding[1.5]'),
|
|
67
|
+
borderBottomLeftRadius: theme('borderRadius.md'),
|
|
68
|
+
backgroundColor: theme('colors.blue.100'),
|
|
69
|
+
color: theme('colors.blue.400'),
|
|
70
|
+
transitionProperty: theme('transitionProperty.colors'),
|
|
71
|
+
transitionDuration: theme('transitionDuration.300'),
|
|
72
|
+
transitionTimingFunction: theme('transitionTimingFunction.DEFAULT'),
|
|
73
|
+
...theme('components.alert.close'),
|
|
74
|
+
|
|
75
|
+
'&:hover': {
|
|
76
|
+
backgroundColor: theme('colors.blue.200'),
|
|
77
|
+
color: theme('colors.blue.800'),
|
|
78
|
+
...theme('components.alert.close.hover'),
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
'.alert-icon': {
|
|
83
|
+
display: 'block',
|
|
84
|
+
width: theme('width.6'),
|
|
85
|
+
height: theme('height.6'),
|
|
86
|
+
marginRight: theme('margin.1'),
|
|
87
|
+
flexShrink: theme('flexShrink.0'),
|
|
88
|
+
color: theme('colors.blue.400'),
|
|
89
|
+
...theme('components.alert.icon'),
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
'.alert-title': {
|
|
93
|
+
display: 'block',
|
|
94
|
+
marginBottom: theme('margin.2'),
|
|
95
|
+
fontWeight: theme('fontWeight.medium'),
|
|
96
|
+
color: theme('colors.blue.800'),
|
|
97
|
+
...theme('components.alert.title'),
|
|
98
|
+
|
|
99
|
+
'&:last-child': {
|
|
100
|
+
marginBottom: '0',
|
|
101
|
+
...theme('components.alert.title.last'),
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
// Color variants
|
|
106
|
+
'&.alert-warning': {
|
|
107
|
+
backgroundColor: theme('colors.yellow.50'),
|
|
108
|
+
color: theme('colors.yellow.700'),
|
|
109
|
+
...theme('components.alert.warning'),
|
|
110
|
+
|
|
111
|
+
'.alert-close': {
|
|
112
|
+
backgroundColor: theme('colors.yellow.100'),
|
|
113
|
+
color: theme('colors.yellow.400'),
|
|
114
|
+
...theme('components.alert.warning.close'),
|
|
115
|
+
|
|
116
|
+
'&:hover': {
|
|
117
|
+
backgroundColor: theme('colors.yellow.200'),
|
|
118
|
+
color: theme('colors.yellow.800'),
|
|
119
|
+
...theme('components.alert.warning.close.hover'),
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
'.alert-icon': {
|
|
124
|
+
color: theme('colors.yellow.400'),
|
|
125
|
+
...theme('components.alert.warning.icon'),
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
'.alert-title': {
|
|
129
|
+
color: theme('colors.yellow.800'),
|
|
130
|
+
...theme('components.alert.warning.title'),
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
'&.alert-success': {
|
|
134
|
+
backgroundColor: theme('colors.green.50'),
|
|
135
|
+
color: theme('colors.green.700'),
|
|
136
|
+
...theme('components.alert.success'),
|
|
137
|
+
|
|
138
|
+
'.alert-close': {
|
|
139
|
+
backgroundColor: theme('colors.green.100'),
|
|
140
|
+
color: theme('colors.green.400'),
|
|
141
|
+
...theme('components.alert.success.close'),
|
|
142
|
+
|
|
143
|
+
'&:hover': {
|
|
144
|
+
backgroundColor: theme('colors.green.200'),
|
|
145
|
+
color: theme('colors.green.800'),
|
|
146
|
+
...theme('components.alert.success.close.hover'),
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
'.alert-icon': {
|
|
151
|
+
color: theme('colors.green.400'),
|
|
152
|
+
...theme('components.alert.success.icon'),
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
'.alert-title': {
|
|
156
|
+
color: theme('colors.green.800'),
|
|
157
|
+
...theme('components.alert.success.title'),
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
'&.alert-danger': {
|
|
161
|
+
backgroundColor: theme('colors.red.50'),
|
|
162
|
+
color: theme('colors.red.700'),
|
|
163
|
+
...theme('components.alert.danger'),
|
|
164
|
+
|
|
165
|
+
'.alert-close': {
|
|
166
|
+
backgroundColor: theme('colors.red.100'),
|
|
167
|
+
color: theme('colors.red.400'),
|
|
168
|
+
...theme('components.alert.danger.close'),
|
|
169
|
+
|
|
170
|
+
'&:hover': {
|
|
171
|
+
backgroundColor: theme('colors.red.200'),
|
|
172
|
+
color: theme('colors.red.800'),
|
|
173
|
+
...theme('components.alert.danger.close.hover'),
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
'.alert-icon': {
|
|
178
|
+
color: theme('colors.red.400'),
|
|
179
|
+
...theme('components.alert.danger.icon'),
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
'.alert-title': {
|
|
183
|
+
color: theme('colors.red.800'),
|
|
184
|
+
...theme('components.alert.danger.title'),
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
});
|
|
@@ -71,6 +71,13 @@ export default (theme) => {
|
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
|
|
74
|
+
// Icon-only styling
|
|
75
|
+
'&.button-icon-only': {
|
|
76
|
+
padding: theme('padding.2'),
|
|
77
|
+
aspectRatio: '1 / 1',
|
|
78
|
+
...theme('components.button.iconOnly'),
|
|
79
|
+
},
|
|
80
|
+
|
|
74
81
|
// Reverse icon
|
|
75
82
|
'&.button-reverse': {
|
|
76
83
|
flexDirection: 'row-reverse',
|
|
@@ -367,23 +374,6 @@ export default (theme) => {
|
|
|
367
374
|
...customColorStyles,
|
|
368
375
|
|
|
369
376
|
// Size variants
|
|
370
|
-
'&.button-xs': {
|
|
371
|
-
paddingTop: theme('padding.1'),
|
|
372
|
-
paddingRight: theme('padding.2'),
|
|
373
|
-
paddingBottom: theme('padding.1'),
|
|
374
|
-
paddingLeft: theme('padding.2'),
|
|
375
|
-
gap: theme('gap[1.5]'),
|
|
376
|
-
borderRadius: theme('borderRadius.md'),
|
|
377
|
-
fontWeight: theme('fontWeight.medium'),
|
|
378
|
-
fontSize: theme('fontSize.xs.0'),
|
|
379
|
-
...theme('components.button.xs'),
|
|
380
|
-
|
|
381
|
-
'.button-icon': {
|
|
382
|
-
width: theme('width.3'),
|
|
383
|
-
height: theme('height.3'),
|
|
384
|
-
...theme('components.button.xs.icon'),
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
377
|
'&.button-sm': {
|
|
388
378
|
paddingTop: theme('padding[1.5]'),
|
|
389
379
|
paddingRight: theme('padding.3'),
|
|
@@ -400,22 +390,10 @@ export default (theme) => {
|
|
|
400
390
|
height: theme('height.4'),
|
|
401
391
|
...theme('components.button.sm.icon'),
|
|
402
392
|
},
|
|
403
|
-
},
|
|
404
|
-
'&.button-lg': {
|
|
405
|
-
paddingTop: theme('padding[2.5]'),
|
|
406
|
-
paddingRight: theme('padding.6'),
|
|
407
|
-
paddingBottom: theme('padding[2.5]'),
|
|
408
|
-
paddingLeft: theme('padding.6'),
|
|
409
|
-
gap: theme('gap.4'),
|
|
410
|
-
borderRadius: theme('borderRadius.2xl'),
|
|
411
|
-
fontWeight: theme('fontWeight.medium'),
|
|
412
|
-
fontSize: theme('fontSize.lg.0'),
|
|
413
|
-
...theme('components.button.lg'),
|
|
414
393
|
|
|
415
|
-
'
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
...theme('components.button.lg.icon'),
|
|
394
|
+
'&.button-icon-only': {
|
|
395
|
+
padding: theme('padding[1.5]'),
|
|
396
|
+
...theme('components.button.sm.iconOnly'),
|
|
419
397
|
},
|
|
420
398
|
},
|
|
421
399
|
},
|
package/dist/tailwind/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import plugin from 'tailwindcss/plugin';
|
|
2
2
|
|
|
3
3
|
// Components
|
|
4
|
+
import alert from './components/alert.js';
|
|
4
5
|
import badge from './components/badge.js';
|
|
5
6
|
import button from './components/button.js';
|
|
6
7
|
import drawer from './components/drawer.js';
|
|
@@ -17,6 +18,7 @@ import drawer from './components/drawer.js';
|
|
|
17
18
|
*/
|
|
18
19
|
export default plugin.withOptions(() => ({ addComponents, theme }) => {
|
|
19
20
|
addComponents([
|
|
21
|
+
alert(theme),
|
|
20
22
|
badge(theme),
|
|
21
23
|
button(theme),
|
|
22
24
|
drawer(theme),
|