@robuust-digital/vue-components 1.3.2 → 2.0.0-rc.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/README.md +47 -52
- package/dist/_shared/ButtonBase-CQjlJ85F.js +87 -0
- package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +55 -0
- package/dist/_shared/FormInput-abFMz_J4.js +82 -0
- package/dist/_shared/Modal-COVlUEud.js +193 -0
- package/dist/_shared/Tooltip-BKXJoJ1x.js +126 -0
- package/dist/_shared/XMarkIcon-90mcPzBs.js +19 -0
- package/dist/_shared/icon-spinner-CmxIOqaK.js +26 -0
- package/dist/combobox/combobox.css +203 -0
- package/dist/combobox/index.js +349 -0
- package/dist/combobox/styles.css +1 -0
- package/dist/core/accordion.css +47 -0
- package/dist/core/alert.css +169 -0
- package/dist/core/badge.css +121 -0
- package/dist/core/button.css +393 -0
- package/dist/core/checkbox.css +60 -0
- package/dist/core/empty-state.css +56 -0
- package/dist/core/index.js +779 -0
- package/dist/core/input.css +92 -0
- package/dist/core/pagination.css +48 -0
- package/dist/core/radio.css +61 -0
- package/dist/core/select.css +81 -0
- package/dist/core/styles.css +92 -0
- package/dist/core/table.css +87 -0
- package/dist/core/tabs.css +74 -0
- package/dist/core/textarea.css +48 -0
- package/dist/core/theme.css +11 -0
- package/dist/dialogs/drawer.css +72 -0
- package/dist/dialogs/index.js +200 -0
- package/dist/dialogs/modal.css +98 -0
- package/dist/dialogs/styles.css +2 -0
- package/dist/dropdown/dropdown.css +89 -0
- package/dist/dropdown/index.js +136 -0
- package/dist/dropdown/styles.css +1 -0
- package/dist/lightswitch/index.js +48 -0
- package/dist/lightswitch/lightswitch.css +68 -0
- package/dist/lightswitch/styles.css +1 -0
- package/dist/rich-text-editor/index.js +262 -0
- package/dist/rich-text-editor/rich-text.css +83 -0
- package/dist/rich-text-editor/styles.css +1 -0
- package/dist/toast/index.js +100 -0
- package/dist/toast/styles.css +1 -0
- package/dist/toast/toast.css +187 -0
- package/dist/tooltip/index.js +5 -0
- package/dist/tooltip/styles.css +1 -0
- package/dist/tooltip/tooltip.css +69 -0
- package/package.json +58 -53
- package/dist/nuxt-module.js +0 -27
- package/dist/style.css +0 -1
- package/dist/tailwind/base/index.js +0 -72
- package/dist/tailwind/components/accordion.js +0 -59
- package/dist/tailwind/components/alert.js +0 -166
- package/dist/tailwind/components/badge.js +0 -119
- package/dist/tailwind/components/button.js +0 -292
- package/dist/tailwind/components/checkbox.js +0 -70
- package/dist/tailwind/components/combobox.js +0 -226
- package/dist/tailwind/components/drawer.js +0 -104
- package/dist/tailwind/components/dropdown.js +0 -97
- package/dist/tailwind/components/empty-state.js +0 -69
- package/dist/tailwind/components/input.js +0 -101
- package/dist/tailwind/components/lightswitch.js +0 -79
- package/dist/tailwind/components/modal.js +0 -132
- package/dist/tailwind/components/pagination.js +0 -62
- package/dist/tailwind/components/radio.js +0 -75
- package/dist/tailwind/components/rich-text.js +0 -100
- package/dist/tailwind/components/select.js +0 -88
- package/dist/tailwind/components/table.js +0 -109
- package/dist/tailwind/components/tabs.js +0 -95
- package/dist/tailwind/components/textarea.js +0 -53
- package/dist/tailwind/components/toast.js +0 -188
- package/dist/tailwind/components/tooltip.js +0 -74
- package/dist/tailwind/index.js +0 -94
- package/dist/vue-components.es.js +0 -2401
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Textarea component
|
|
3
|
-
*
|
|
4
|
-
* @param {Object} theme - The global theme object
|
|
5
|
-
*/
|
|
6
|
-
export default (theme) => ({
|
|
7
|
-
':root': {
|
|
8
|
-
'--rvc-textarea-border-radius': 'var(--rvc-base-border-radius)',
|
|
9
|
-
'--rvc-textarea-border-width': 'var(--rvc-base-border-width)',
|
|
10
|
-
'--rvc-textarea-border-color': 'var(--rvc-base-border-color)',
|
|
11
|
-
'--rvc-textarea-font-size': 'var(--rvc-base-input-font-size)',
|
|
12
|
-
'--rvc-textarea-font-weight': 'var(--rvc-base-input-font-weight)',
|
|
13
|
-
'--rvc-textarea-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
14
|
-
'--rvc-textarea-color': 'var(--rvc-base-input-color)',
|
|
15
|
-
'--rvc-textarea-bg-color': 'var(--rvc-base-input-bg-color)',
|
|
16
|
-
'--rvc-textarea-padding-x': 'var(--rvc-base-input-padding-x)',
|
|
17
|
-
'--rvc-textarea-height': 'var(--rvc-base-input-height)',
|
|
18
|
-
'--rvc-textarea-placeholder-color': 'var(--rvc-base-input-placeholder-color)',
|
|
19
|
-
'--rvc-textarea-padding-y': theme('padding[1.5]'),
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
'.rvc-textarea': {
|
|
23
|
-
borderRadius: 'var(--rvc-textarea-border-radius)',
|
|
24
|
-
borderWidth: 'var(--rvc-textarea-border-width)',
|
|
25
|
-
borderColor: 'var(--rvc-textarea-border-color)',
|
|
26
|
-
paddingTop: 'var(--rvc-textarea-padding-y)',
|
|
27
|
-
paddingRight: 'var(--rvc-textarea-padding-x)',
|
|
28
|
-
paddingBottom: 'var(--rvc-textarea-padding-y)',
|
|
29
|
-
paddingLeft: 'var(--rvc-textarea-padding-x)',
|
|
30
|
-
backgroundColor: 'var(--rvc-textarea-bg-color)',
|
|
31
|
-
fontSize: 'var(--rvc-textarea-font-size)',
|
|
32
|
-
fontWeight: 'var(--rvc-textarea-font-weight)',
|
|
33
|
-
color: 'var(--rvc-textarea-color)',
|
|
34
|
-
boxShadow: 'var(--rvc-textarea-box-shadow)',
|
|
35
|
-
minHeight: 'var(--rvc-textarea-height)',
|
|
36
|
-
display: 'block',
|
|
37
|
-
backgroundImage: 'none',
|
|
38
|
-
width: '100%',
|
|
39
|
-
position: 'relative',
|
|
40
|
-
appearance: 'none',
|
|
41
|
-
outlineWidth: 0,
|
|
42
|
-
...theme('components.textarea'),
|
|
43
|
-
|
|
44
|
-
// Size variants
|
|
45
|
-
'&.rvc-textarea-sm': {
|
|
46
|
-
'--rvc-textarea-font-size': 'calc(var(--rvc-base-input-font-size) * 0.9)',
|
|
47
|
-
'--rvc-textarea-padding-x': 'calc(var(--rvc-base-input-padding-x) * 0.85)',
|
|
48
|
-
'--rvc-textarea-padding-y': `calc(${theme('padding[1.5]')} * 0.75)`,
|
|
49
|
-
'--rvc-textarea-height': '1.875rem',
|
|
50
|
-
...theme('components.textarea.sm'),
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
});
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Toast component
|
|
3
|
-
*
|
|
4
|
-
* @param {Object} theme - The global theme object
|
|
5
|
-
*/
|
|
6
|
-
export default (theme) => ({
|
|
7
|
-
':root': {
|
|
8
|
-
// Custom properties
|
|
9
|
-
'--rvc-toast-border-radius': 'var(--rvc-base-border-radius)',
|
|
10
|
-
'--rvc-toast-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
11
|
-
'--rvc-toast-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
12
|
-
'--rvc-toast-border-width': 'var(--rvc-base-border-width)',
|
|
13
|
-
'--rvc-toast-padding-x': theme('padding.6'),
|
|
14
|
-
'--rvc-toast-padding-y': theme('padding.6'),
|
|
15
|
-
'--rvc-toast-max-width': theme('maxWidth.xl'),
|
|
16
|
-
'--rvc-toast-min-width': theme('maxWidth.xl'),
|
|
17
|
-
'--rvc-toast-font-size': theme('fontSize.base.0'),
|
|
18
|
-
'--rvc-toast-gap': theme('gap[1.5]'),
|
|
19
|
-
'--rvc-toast-anchor-decoration': 'underline',
|
|
20
|
-
'--rvc-toast-icon-size': theme('width.6'),
|
|
21
|
-
'--rvc-toast-title-font-weight': theme('fontWeight.medium'),
|
|
22
|
-
'--rvc-toast-transition-property': theme('transitionProperty.colors'),
|
|
23
|
-
'--rvc-toast-offset': theme('width.6'),
|
|
24
|
-
|
|
25
|
-
// Default color variables
|
|
26
|
-
'--rvc-toast-bg-color': theme('colors.blue.50'),
|
|
27
|
-
'--rvc-toast-border-color': theme('colors.blue.200'),
|
|
28
|
-
'--rvc-toast-color': theme('colors.blue.700'),
|
|
29
|
-
'--rvc-toast-icon-color': theme('colors.blue.500'),
|
|
30
|
-
'--rvc-toast-title-color': theme('colors.blue.800'),
|
|
31
|
-
'--rvc-toast-close-bg-color': theme('colors.blue.200'),
|
|
32
|
-
'--rvc-toast-close-hover-bg-color': theme('colors.blue.300'),
|
|
33
|
-
'--rvc-toast-anchor-color': 'inherit',
|
|
34
|
-
'--rvc-toast-anchor-hover-color': theme('colors.blue.600'),
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
'.rvc-toast': {
|
|
38
|
-
gap: 'var(--rvc-toast-gap)',
|
|
39
|
-
paddingTop: 'var(--rvc-toast-padding-y)',
|
|
40
|
-
paddingBottom: 'var(--rvc-toast-padding-y)',
|
|
41
|
-
paddingLeft: 'var(--rvc-toast-padding-x)',
|
|
42
|
-
paddingRight: 'var(--rvc-toast-padding-x)',
|
|
43
|
-
borderRadius: 'var(--rvc-toast-border-radius)',
|
|
44
|
-
fontSize: 'var(--rvc-toast-font-size)',
|
|
45
|
-
backgroundColor: 'var(--rvc-toast-bg-color)',
|
|
46
|
-
color: 'var(--rvc-toast-color)',
|
|
47
|
-
maxWidth: 'var(--rvc-toast-max-width)',
|
|
48
|
-
minWidth: 'var(--rvc-toast-min-width)',
|
|
49
|
-
borderWidth: 'var(--rvc-toast-border-width)',
|
|
50
|
-
borderColor: 'var(--rvc-toast-border-color)',
|
|
51
|
-
filter: 'drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.05))',
|
|
52
|
-
display: 'flex',
|
|
53
|
-
position: 'fixed',
|
|
54
|
-
left: '50%',
|
|
55
|
-
transform: 'translateX(-50%)',
|
|
56
|
-
overflow: 'hidden',
|
|
57
|
-
zIndex: '99',
|
|
58
|
-
...theme('components.toast'),
|
|
59
|
-
|
|
60
|
-
'&.rvc-toast-bottom': {
|
|
61
|
-
bottom: 'var(--rvc-toast-offset)',
|
|
62
|
-
...theme('components.toast.bottom'),
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
'&.rvc-toast-top': {
|
|
66
|
-
top: 'var(--rvc-toast-offset)',
|
|
67
|
-
...theme('components.toast.top'),
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
// Elements
|
|
71
|
-
a: {
|
|
72
|
-
textDecoration: 'var(--rvc-toast-anchor-decoration)',
|
|
73
|
-
transitionProperty: 'var(--rvc-toast-transition-property)',
|
|
74
|
-
transitionDuration: 'var(--rvc-toast-transition-duration)',
|
|
75
|
-
transitionTimingFunction: 'var(--rvc-toast-transition-timing-function)',
|
|
76
|
-
color: 'var(--rvc-toast-anchor-color)',
|
|
77
|
-
...theme('components.toast.a'),
|
|
78
|
-
|
|
79
|
-
'&:hover': {
|
|
80
|
-
color: 'var(--rvc-toast-anchor-hover-color)',
|
|
81
|
-
...theme('components.toast.a[&:hover]'),
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
'ul,ol': {
|
|
86
|
-
listStylePosition: 'inside',
|
|
87
|
-
margin: 0,
|
|
88
|
-
paddingLeft: theme('padding.2'),
|
|
89
|
-
...theme('components.toast[ul,ol]'),
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
ul: {
|
|
93
|
-
listStyleType: 'disc',
|
|
94
|
-
...theme('components.toast.ul'),
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
ol: {
|
|
98
|
-
listStyleType: 'decimal',
|
|
99
|
-
...theme('components.toast.ol'),
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
'.rvc-toast-close': {
|
|
103
|
-
backgroundColor: 'var(--rvc-toast-close-bg-color)',
|
|
104
|
-
color: 'var(--rvc-toast-icon-color)',
|
|
105
|
-
borderBottomLeftRadius: 'var(--rvc-toast-border-radius)',
|
|
106
|
-
transitionProperty: 'var(--rvc-toast-transition-property)',
|
|
107
|
-
transitionDuration: 'var(--rvc-toast-transition-duration)',
|
|
108
|
-
transitionTimingFunction: 'var(--rvc-toast-transition-timing-function)',
|
|
109
|
-
display: 'inline-flex',
|
|
110
|
-
justifyContent: 'center',
|
|
111
|
-
alignItems: 'center',
|
|
112
|
-
position: 'absolute',
|
|
113
|
-
top: '0',
|
|
114
|
-
right: '0',
|
|
115
|
-
padding: theme('padding[1.5]'),
|
|
116
|
-
...theme('components.toast[.rvc-toast-close]'),
|
|
117
|
-
|
|
118
|
-
'&:hover': {
|
|
119
|
-
backgroundColor: 'var(--rvc-toast-close-hover-bg-color)',
|
|
120
|
-
color: 'var(--rvc-toast-icon-hover-color)',
|
|
121
|
-
...theme('components.toast[.rvc-toast-close][&:hover]'),
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
'.rvc-toast-icon': {
|
|
126
|
-
width: 'var(--rvc-toast-icon-size)',
|
|
127
|
-
height: 'var(--rvc-toast-icon-size)',
|
|
128
|
-
color: 'var(--rvc-toast-icon-color)',
|
|
129
|
-
display: 'block',
|
|
130
|
-
flexShrink: '0',
|
|
131
|
-
...theme('components.toast[.rvc-toast-icon]'),
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
'.rvc-toast-title': {
|
|
135
|
-
color: 'var(--rvc-toast-title-color)',
|
|
136
|
-
fontWeight: 'var(--rvc-toast-title-font-weight)',
|
|
137
|
-
display: 'block',
|
|
138
|
-
marginBottom: theme('margin.2'),
|
|
139
|
-
...theme('components.toast[.rvc-toast-title]'),
|
|
140
|
-
|
|
141
|
-
'&:last-child': {
|
|
142
|
-
marginBottom: '0',
|
|
143
|
-
...theme('components.toast[.rvc-toast-title][&:last-child]'),
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
// Color variants
|
|
148
|
-
'&.rvc-toast-info': {
|
|
149
|
-
...theme('components.toast.info'),
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
'&.rvc-toast-warning': {
|
|
153
|
-
'--rvc-toast-bg-color': theme('colors.yellow.50'),
|
|
154
|
-
'--rvc-toast-border-color': theme('colors.yellow.200'),
|
|
155
|
-
'--rvc-toast-color': theme('colors.yellow.700'),
|
|
156
|
-
'--rvc-toast-icon-color': theme('colors.yellow.500'),
|
|
157
|
-
'--rvc-toast-title-color': theme('colors.yellow.800'),
|
|
158
|
-
'--rvc-toast-close-bg-color': theme('colors.yellow.200'),
|
|
159
|
-
'--rvc-toast-close-hover-bg-color': theme('colors.yellow.300'),
|
|
160
|
-
'--rvc-toast-anchor-hover-color': theme('colors.yellow.600'),
|
|
161
|
-
...theme('components.toast.warning'),
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
'&.rvc-toast-success': {
|
|
165
|
-
'--rvc-toast-bg-color': theme('colors.green.50'),
|
|
166
|
-
'--rvc-toast-border-color': theme('colors.green.200'),
|
|
167
|
-
'--rvc-toast-color': theme('colors.green.700'),
|
|
168
|
-
'--rvc-toast-icon-color': theme('colors.green.500'),
|
|
169
|
-
'--rvc-toast-title-color': theme('colors.green.800'),
|
|
170
|
-
'--rvc-toast-close-bg-color': theme('colors.green.200'),
|
|
171
|
-
'--rvc-toast-close-hover-bg-color': theme('colors.green.300'),
|
|
172
|
-
'--rvc-toast-anchor-hover-color': theme('colors.green.600'),
|
|
173
|
-
...theme('components.toast.success'),
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
'&.rvc-toast-danger': {
|
|
177
|
-
'--rvc-toast-bg-color': theme('colors.red.50'),
|
|
178
|
-
'--rvc-toast-border-color': theme('colors.red.200'),
|
|
179
|
-
'--rvc-toast-color': theme('colors.red.700'),
|
|
180
|
-
'--rvc-toast-icon-color': theme('colors.red.500'),
|
|
181
|
-
'--rvc-toast-title-color': theme('colors.red.800'),
|
|
182
|
-
'--rvc-toast-close-bg-color': theme('colors.red.200'),
|
|
183
|
-
'--rvc-toast-close-hover-bg-color': theme('colors.red.300'),
|
|
184
|
-
'--rvc-toast-anchor-hover-color': theme('colors.red.600'),
|
|
185
|
-
...theme('components.toast.danger'),
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { withAlphaValue } from 'tailwindcss/lib/util/withAlphaVariable';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Tooltip component
|
|
5
|
-
*
|
|
6
|
-
* @param {Object} theme - The global theme object
|
|
7
|
-
*/
|
|
8
|
-
export default (theme) => ({
|
|
9
|
-
':root': {
|
|
10
|
-
'--rvc-tooltip-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
11
|
-
'--rvc-tooltip-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
12
|
-
'--rvc-tooltip-border-radius': 'var(--rvc-base-border-radius)',
|
|
13
|
-
'--rvc-tooltip-color': theme('colors.white'),
|
|
14
|
-
'--rvc-tooltip-transition-property': 'opacity, visibility',
|
|
15
|
-
'--rvc-tooltip-text-align': 'left',
|
|
16
|
-
'--rvc-tooltip-padding-x': theme('padding.4'),
|
|
17
|
-
'--rvc-tooltip-padding-y': theme('padding.4'),
|
|
18
|
-
'--rvc-tooltip-width': theme('width.max'),
|
|
19
|
-
'--rvc-tooltip-bg-color': withAlphaValue(theme('colors.slate.700'), 0.6),
|
|
20
|
-
'--rvc-tooltip-arrow-size': theme('width.3'),
|
|
21
|
-
'--rvc-tooltip-blur-size': theme('blur.sm'),
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
'.rvc-tooltip': {
|
|
25
|
-
zIndex: 10,
|
|
26
|
-
color: 'var(--rvc-tooltip-color)',
|
|
27
|
-
transitionProperty: 'var(--rvc-tooltip-transition-property)',
|
|
28
|
-
transitionDuration: 'var(--rvc-tooltip-transition-duration)',
|
|
29
|
-
transitionTimingFunction: 'var(--rvc-tooltip-transition-timing-function)',
|
|
30
|
-
textAlign: 'var(--rvc-tooltip-text-align)',
|
|
31
|
-
paddingTop: 'var(--rvc-tooltip-padding-y)',
|
|
32
|
-
paddingRight: 'var(--rvc-tooltip-padding-x)',
|
|
33
|
-
paddingBottom: 'var(--rvc-tooltip-padding-y)',
|
|
34
|
-
paddingLeft: 'var(--rvc-tooltip-padding-x)',
|
|
35
|
-
width: 'var(--rvc-tooltip-width)',
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
top: 0,
|
|
38
|
-
left: 0,
|
|
39
|
-
...theme('components.tooltip'),
|
|
40
|
-
|
|
41
|
-
'&::before': {
|
|
42
|
-
content: '""',
|
|
43
|
-
position: 'absolute',
|
|
44
|
-
top: 0,
|
|
45
|
-
right: 0,
|
|
46
|
-
bottom: 0,
|
|
47
|
-
left: 0,
|
|
48
|
-
borderRadius: 'var(--rvc-tooltip-border-radius)',
|
|
49
|
-
backgroundColor: 'var(--rvc-tooltip-bg-color)',
|
|
50
|
-
zIndex: -1,
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
// Arrow
|
|
54
|
-
'.rvc-tooltip-arrow': {
|
|
55
|
-
backgroundColor: 'var(--rvc-tooltip-bg-color)',
|
|
56
|
-
width: 'var(--rvc-tooltip-arrow-size)',
|
|
57
|
-
height: 'var(--rvc-tooltip-arrow-size)',
|
|
58
|
-
clipPath: 'polygon(0 0, 50% 50%, 100% 0)',
|
|
59
|
-
zIndex: -1,
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
'&.rvc-tooltip-blur::before, &.rvc-tooltip-blur .rvc-tooltip-arrow': {
|
|
63
|
-
backdropFilter: 'blur(var(--rvc-tooltip-blur-size))',
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
// Size variants
|
|
67
|
-
'&.rvc-tooltip-sm': {
|
|
68
|
-
'--rvc-tooltip-padding-x': theme('padding.2'),
|
|
69
|
-
'--rvc-tooltip-padding-y': theme('padding.0'),
|
|
70
|
-
'--rvc-tooltip-arrow-size': theme('width[1.5]'),
|
|
71
|
-
...theme('components.tooltip.sm'),
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
});
|
package/dist/tailwind/index.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import plugin from 'tailwindcss/plugin';
|
|
2
|
-
|
|
3
|
-
// Base
|
|
4
|
-
import base from './base/index.js';
|
|
5
|
-
|
|
6
|
-
// Components
|
|
7
|
-
import accordion from './components/accordion.js';
|
|
8
|
-
import alert from './components/alert.js';
|
|
9
|
-
import badge from './components/badge.js';
|
|
10
|
-
import button from './components/button.js';
|
|
11
|
-
import checkbox from './components/checkbox.js';
|
|
12
|
-
import combobox from './components/combobox.js';
|
|
13
|
-
import drawer from './components/drawer.js';
|
|
14
|
-
import dropdown from './components/dropdown.js';
|
|
15
|
-
import emptyState from './components/empty-state.js';
|
|
16
|
-
import input from './components/input.js';
|
|
17
|
-
import lightswitch from './components/lightswitch.js';
|
|
18
|
-
import modal from './components/modal.js';
|
|
19
|
-
import pagination from './components/pagination.js';
|
|
20
|
-
import radio from './components/radio.js';
|
|
21
|
-
import richText from './components/rich-text.js';
|
|
22
|
-
import select from './components/select.js';
|
|
23
|
-
import table from './components/table.js';
|
|
24
|
-
import tabs from './components/tabs.js';
|
|
25
|
-
import textarea from './components/textarea.js';
|
|
26
|
-
import toast from './components/toast.js';
|
|
27
|
-
import tooltip from './components/tooltip.js';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Tailwind Theme plugin
|
|
31
|
-
*
|
|
32
|
-
* @type {import('tailwindcss').Plugin}
|
|
33
|
-
*
|
|
34
|
-
* @param {import('tailwindcss').AddComponents} addComponents
|
|
35
|
-
* @param {import('tailwindcss').Theme} theme
|
|
36
|
-
*
|
|
37
|
-
* @returns {void}
|
|
38
|
-
*/
|
|
39
|
-
export default plugin.withOptions(
|
|
40
|
-
() => ({ addComponents, addBase, theme }) => {
|
|
41
|
-
addBase(base(theme));
|
|
42
|
-
addComponents([
|
|
43
|
-
accordion(theme),
|
|
44
|
-
alert(theme),
|
|
45
|
-
badge(theme),
|
|
46
|
-
button(theme),
|
|
47
|
-
checkbox(theme),
|
|
48
|
-
combobox(theme),
|
|
49
|
-
drawer(theme),
|
|
50
|
-
dropdown(theme),
|
|
51
|
-
emptyState(theme),
|
|
52
|
-
input(theme),
|
|
53
|
-
lightswitch(theme),
|
|
54
|
-
pagination(theme),
|
|
55
|
-
modal(theme),
|
|
56
|
-
radio(theme),
|
|
57
|
-
richText(theme),
|
|
58
|
-
select(theme),
|
|
59
|
-
table(theme),
|
|
60
|
-
tabs(theme),
|
|
61
|
-
textarea(theme),
|
|
62
|
-
toast(theme),
|
|
63
|
-
tooltip(theme),
|
|
64
|
-
], { respectPrefix: false });
|
|
65
|
-
},
|
|
66
|
-
() => ({
|
|
67
|
-
safelist: [
|
|
68
|
-
// Base
|
|
69
|
-
'rvc-focus',
|
|
70
|
-
// Components
|
|
71
|
-
'rvc-accordion',
|
|
72
|
-
'rvc-alert',
|
|
73
|
-
'rvc-badge',
|
|
74
|
-
'rvc-button',
|
|
75
|
-
'rvc-checkbox',
|
|
76
|
-
'rvc-combobox',
|
|
77
|
-
'rvc-drawer',
|
|
78
|
-
'rvc-dropdown',
|
|
79
|
-
'rvc-empty-state',
|
|
80
|
-
'rvc-input',
|
|
81
|
-
'rvc-lightswitch-group',
|
|
82
|
-
'rvc-modal',
|
|
83
|
-
'rvc-radio',
|
|
84
|
-
'rvc-rich-text',
|
|
85
|
-
'rvc-pagination',
|
|
86
|
-
'rvc-select',
|
|
87
|
-
'rvc-table',
|
|
88
|
-
'rvc-tabs',
|
|
89
|
-
'rvc-textarea',
|
|
90
|
-
'rvc-toast',
|
|
91
|
-
'rvc-tooltip',
|
|
92
|
-
],
|
|
93
|
-
}),
|
|
94
|
-
);
|