@robuust-digital/vue-components 1.3.2 → 2.0.0-rc.0
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 +55 -52
- 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,292 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Button component
|
|
3
|
-
*
|
|
4
|
-
* @param {Object} theme - The global theme object
|
|
5
|
-
*/
|
|
6
|
-
export default (theme) => {
|
|
7
|
-
const customColors = theme('components.button.custom') || {};
|
|
8
|
-
const customColorStyles = Object.keys(customColors).reduce((acc, colorName) => {
|
|
9
|
-
acc[`&.rvc-button-custom-${colorName}`] = {
|
|
10
|
-
...customColors[colorName],
|
|
11
|
-
};
|
|
12
|
-
return acc;
|
|
13
|
-
}, {});
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
':root': {
|
|
17
|
-
// Custom properties
|
|
18
|
-
'--rvc-button-border-radius': 'var(--rvc-base-border-radius)',
|
|
19
|
-
'--rvc-button-transition-duration': 'var(--rvc-base-transition-duration)',
|
|
20
|
-
'--rvc-button-transition-timing-function': 'var(--rvc-base-transition-timing-function)',
|
|
21
|
-
'--rvc-button-icon-loading-animation': 'var(--rvc-base-loading-animation)',
|
|
22
|
-
'--rvc-button-border-width': 'var(--rvc-base-border-width)',
|
|
23
|
-
'--rvc-button-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
24
|
-
'--rvc-button-height': theme('height.9'),
|
|
25
|
-
'--rvc-button-padding-x': theme('padding.3'),
|
|
26
|
-
'--rvc-button-gap': theme('gap[1.5]'),
|
|
27
|
-
'--rvc-button-font-weight': theme('fontWeight.semibold'),
|
|
28
|
-
'--rvc-button-font-size': theme('fontSize.base.0'),
|
|
29
|
-
'--rvc-button-transition-property': theme('transitionProperty.colors'),
|
|
30
|
-
'--rvc-button-icon-size': theme('width.5'),
|
|
31
|
-
'--rvc-button-icon-loading-size': theme('width.4'),
|
|
32
|
-
|
|
33
|
-
// Default color variables
|
|
34
|
-
'--rvc-button-bg-color': '#d9ff00',
|
|
35
|
-
'--rvc-button-color': '#000',
|
|
36
|
-
'--rvc-button-bg-color-hover': '#caf400',
|
|
37
|
-
'--rvc-button-color-hover': '#000',
|
|
38
|
-
'--rvc-button-border-color': theme('colors.transparent'),
|
|
39
|
-
'--rvc-button-border-color-hover': theme('colors.transparent'),
|
|
40
|
-
'--rvc-button-icon-color': theme('colors.slate.500'),
|
|
41
|
-
'--rvc-button-icon-color-hover': theme('colors.slate.950'),
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
'.rvc-button': {
|
|
45
|
-
height: 'var(--rvc-button-height)',
|
|
46
|
-
borderWidth: 'var(--rvc-button-border-width)',
|
|
47
|
-
borderColor: 'var(--rvc-button-border-color)',
|
|
48
|
-
transitionProperty: 'var(--rvc-button-transition-property)',
|
|
49
|
-
transitionDuration: 'var(--rvc-button-transition-duration)',
|
|
50
|
-
transitionTimingFunction: 'var(--rvc-button-transition-timing-function)',
|
|
51
|
-
paddingRight: 'var(--rvc-button-padding-x)',
|
|
52
|
-
paddingLeft: 'var(--rvc-button-padding-x)',
|
|
53
|
-
gap: 'var(--rvc-button-gap)',
|
|
54
|
-
borderRadius: 'var(--rvc-button-border-radius)',
|
|
55
|
-
fontWeight: 'var(--rvc-button-font-weight)',
|
|
56
|
-
fontSize: 'var(--rvc-button-font-size)',
|
|
57
|
-
backgroundColor: 'var(--rvc-button-bg-color)',
|
|
58
|
-
color: 'var(--rvc-button-color)',
|
|
59
|
-
boxShadow: 'var(--rvc-button-box-shadow)',
|
|
60
|
-
appearance: 'none',
|
|
61
|
-
cursor: 'pointer',
|
|
62
|
-
display: 'inline-flex',
|
|
63
|
-
alignItems: 'center',
|
|
64
|
-
justifyContent: 'center',
|
|
65
|
-
textAlign: 'center',
|
|
66
|
-
borderStyle: 'solid',
|
|
67
|
-
position: 'relative',
|
|
68
|
-
whiteSpace: 'nowrap',
|
|
69
|
-
...theme('components.button'),
|
|
70
|
-
|
|
71
|
-
// Hover state
|
|
72
|
-
'&:hover': {
|
|
73
|
-
backgroundColor: 'var(--rvc-button-bg-color-hover)',
|
|
74
|
-
color: 'var(--rvc-button-color-hover)',
|
|
75
|
-
borderColor: 'var(--rvc-button-border-color-hover)',
|
|
76
|
-
...theme('components.button[&:hover]'),
|
|
77
|
-
|
|
78
|
-
'.rvc-button-icon': {
|
|
79
|
-
color: 'var(--rvc-button-icon-color-hover)',
|
|
80
|
-
...theme('components.button[&:hover][.rvc-button-icon]'),
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
// Disabled state
|
|
85
|
-
'&:disabled': {
|
|
86
|
-
pointerEvents: 'none',
|
|
87
|
-
opacity: theme('opacity.50'),
|
|
88
|
-
...theme('components.button[&:disabled]'),
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
// Icon styling
|
|
92
|
-
'.rvc-button-icon': {
|
|
93
|
-
width: 'var(--rvc-button-icon-size)',
|
|
94
|
-
height: 'var(--rvc-button-icon-size)',
|
|
95
|
-
color: 'var(--rvc-button-icon-color)',
|
|
96
|
-
transitionProperty: 'var(--rvc-button-transition-property)',
|
|
97
|
-
transitionDuration: 'var(--rvc-button-transition-duration)',
|
|
98
|
-
transitionTimingFunction: 'var(--rvc-button-transition-timing-function)',
|
|
99
|
-
display: 'block',
|
|
100
|
-
flexShrink: '0',
|
|
101
|
-
...theme('components.button[.rvc-button-icon]'),
|
|
102
|
-
|
|
103
|
-
'&.rvc-button-icon-loading': {
|
|
104
|
-
width: 'var(--rvc-button-icon-loading-size)',
|
|
105
|
-
height: 'var(--rvc-button-icon-loading-size)',
|
|
106
|
-
animation: 'var(--rvc-button-icon-loading-animation)',
|
|
107
|
-
...theme('components.button[.rvc-button-icon][&.rvc-button-icon-loading]'),
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
// Icon-only styling
|
|
112
|
-
'&.rvc-button-icon-only': {
|
|
113
|
-
padding: 0,
|
|
114
|
-
aspectRatio: '1 / 1',
|
|
115
|
-
...theme('components.button[.rvc-button-icon-only]'),
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
// Reverse icon
|
|
119
|
-
'&.rvc-button-reverse': {
|
|
120
|
-
flexDirection: 'row-reverse',
|
|
121
|
-
...theme('components.button[.rvc-button-reverse]'),
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
// Color variants
|
|
125
|
-
'&.rvc-button-primary': {
|
|
126
|
-
...theme('components.button.primary'),
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
'&.rvc-button-secondary': {
|
|
130
|
-
'--rvc-button-bg-color': '#4f46e5',
|
|
131
|
-
'--rvc-button-color': '#fff',
|
|
132
|
-
'--rvc-button-bg-color-hover': '#6366f1',
|
|
133
|
-
'--rvc-button-color-hover': '#fff',
|
|
134
|
-
'--rvc-button-icon-color': theme('colors.slate.300'),
|
|
135
|
-
'--rvc-button-icon-color-hover': '#fff',
|
|
136
|
-
...theme('components.button.secondary'),
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
'&.rvc-button-tertiary': {
|
|
140
|
-
'--rvc-button-bg-color': '#475569',
|
|
141
|
-
'--rvc-button-color': '#fff',
|
|
142
|
-
'--rvc-button-bg-color-hover': '#64748b',
|
|
143
|
-
'--rvc-button-color-hover': '#fff',
|
|
144
|
-
'--rvc-button-icon-color': theme('colors.slate.300'),
|
|
145
|
-
'--rvc-button-icon-color-hover': '#fff',
|
|
146
|
-
...theme('components.button.tertiary'),
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
'&.rvc-button-light': {
|
|
150
|
-
'--rvc-button-bg-color': theme('colors.white'),
|
|
151
|
-
'--rvc-button-color': theme('colors.black'),
|
|
152
|
-
'--rvc-button-bg-color-hover': theme('colors.slate.50'),
|
|
153
|
-
'--rvc-button-color-hover': theme('colors.black'),
|
|
154
|
-
'--rvc-button-border-color': theme('colors.slate.200'),
|
|
155
|
-
'--rvc-button-border-color-hover': theme('colors.slate.200'),
|
|
156
|
-
...theme('components.button.light'),
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
'&.rvc-button-dark': {
|
|
160
|
-
'--rvc-button-bg-color': theme('colors.slate.950'),
|
|
161
|
-
'--rvc-button-color': theme('colors.white'),
|
|
162
|
-
'--rvc-button-bg-color-hover': theme('colors.slate.800'),
|
|
163
|
-
'--rvc-button-color-hover': theme('colors.white'),
|
|
164
|
-
'--rvc-button-icon-color': theme('colors.slate.300'),
|
|
165
|
-
'--rvc-button-icon-color-hover': theme('colors.white'),
|
|
166
|
-
...theme('components.button.dark'),
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
'&.rvc-button-red': {
|
|
170
|
-
'--rvc-button-bg-color': theme('colors.red.600'),
|
|
171
|
-
'--rvc-button-color': theme('colors.white'),
|
|
172
|
-
'--rvc-button-bg-color-hover': theme('colors.red.500'),
|
|
173
|
-
'--rvc-button-color-hover': theme('colors.white'),
|
|
174
|
-
'--rvc-button-icon-color': theme('colors.slate.300'),
|
|
175
|
-
'--rvc-button-icon-color-hover': theme('colors.white'),
|
|
176
|
-
...theme('components.button.red'),
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
'&.rvc-button-red-soft': {
|
|
180
|
-
'--rvc-button-bg-color': theme('colors.red.50'),
|
|
181
|
-
'--rvc-button-color': theme('colors.red.700'),
|
|
182
|
-
'--rvc-button-bg-color-hover': theme('colors.red.200'),
|
|
183
|
-
'--rvc-button-color-hover': theme('colors.red.700'),
|
|
184
|
-
'--rvc-button-border-color': theme('colors.red.200'),
|
|
185
|
-
'--rvc-button-border-color-hover': theme('colors.red.200'),
|
|
186
|
-
'--rvc-button-icon-color': theme('colors.red.500'),
|
|
187
|
-
'--rvc-button-icon-color-hover': theme('colors.red.700'),
|
|
188
|
-
...theme('components.button.red-soft'),
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
'&.rvc-button-yellow': {
|
|
192
|
-
'--rvc-button-bg-color': theme('colors.yellow.300'),
|
|
193
|
-
'--rvc-button-color': theme('colors.slate.950'),
|
|
194
|
-
'--rvc-button-bg-color-hover': theme('colors.yellow.400'),
|
|
195
|
-
'--rvc-button-color-hover': theme('colors.slate.950'),
|
|
196
|
-
...theme('components.button.yellow'),
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
'&.rvc-button-yellow-soft': {
|
|
200
|
-
'--rvc-button-bg-color': theme('colors.yellow.50'),
|
|
201
|
-
'--rvc-button-color': theme('colors.yellow.700'),
|
|
202
|
-
'--rvc-button-bg-color-hover': theme('colors.yellow.200'),
|
|
203
|
-
'--rvc-button-color-hover': theme('colors.yellow.700'),
|
|
204
|
-
'--rvc-button-border-color': theme('colors.yellow.200'),
|
|
205
|
-
'--rvc-button-border-color-hover': theme('colors.yellow.200'),
|
|
206
|
-
'--rvc-button-icon-color': theme('colors.yellow.500'),
|
|
207
|
-
'--rvc-button-icon-color-hover': theme('colors.yellow.700'),
|
|
208
|
-
...theme('components.button.yellow-soft'),
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
'&.rvc-button-green': {
|
|
212
|
-
'--rvc-button-bg-color': theme('colors.green.600'),
|
|
213
|
-
'--rvc-button-color': theme('colors.white'),
|
|
214
|
-
'--rvc-button-bg-color-hover': theme('colors.green.500'),
|
|
215
|
-
'--rvc-button-color-hover': theme('colors.white'),
|
|
216
|
-
'--rvc-button-icon-color': theme('colors.slate.300'),
|
|
217
|
-
'--rvc-button-icon-color-hover': theme('colors.white'),
|
|
218
|
-
...theme('components.button.green'),
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
'&.rvc-button-green-soft': {
|
|
222
|
-
'--rvc-button-bg-color': theme('colors.green.50'),
|
|
223
|
-
'--rvc-button-color': theme('colors.green.700'),
|
|
224
|
-
'--rvc-button-bg-color-hover': theme('colors.green.200'),
|
|
225
|
-
'--rvc-button-color-hover': theme('colors.green.700'),
|
|
226
|
-
'--rvc-button-border-color': theme('colors.green.200'),
|
|
227
|
-
'--rvc-button-border-color-hover': theme('colors.green.200'),
|
|
228
|
-
'--rvc-button-icon-color': theme('colors.green.500'),
|
|
229
|
-
'--rvc-button-icon-color-hover': theme('colors.green.700'),
|
|
230
|
-
...theme('components.button.green-soft'),
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
'&.rvc-button-blue': {
|
|
234
|
-
'--rvc-button-bg-color': theme('colors.blue.600'),
|
|
235
|
-
'--rvc-button-color': theme('colors.white'),
|
|
236
|
-
'--rvc-button-bg-color-hover': theme('colors.blue.500'),
|
|
237
|
-
'--rvc-button-color-hover': theme('colors.white'),
|
|
238
|
-
'--rvc-button-icon-color': theme('colors.slate.300'),
|
|
239
|
-
'--rvc-button-icon-color-hover': theme('colors.white'),
|
|
240
|
-
...theme('components.button.blue'),
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
'&.rvc-button-blue-soft': {
|
|
244
|
-
'--rvc-button-bg-color': theme('colors.blue.50'),
|
|
245
|
-
'--rvc-button-color': theme('colors.blue.700'),
|
|
246
|
-
'--rvc-button-bg-color-hover': theme('colors.blue.200'),
|
|
247
|
-
'--rvc-button-color-hover': theme('colors.blue.700'),
|
|
248
|
-
'--rvc-button-border-color': theme('colors.blue.200'),
|
|
249
|
-
'--rvc-button-border-color-hover': theme('colors.blue.200'),
|
|
250
|
-
'--rvc-button-icon-color': theme('colors.blue.500'),
|
|
251
|
-
'--rvc-button-icon-color-hover': theme('colors.blue.700'),
|
|
252
|
-
...theme('components.button.blue-soft'),
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
'&.rvc-button-clear': {
|
|
256
|
-
'--rvc-button-bg-color': theme('colors.transparent'),
|
|
257
|
-
'--rvc-button-color': theme('colors.indigo.600'),
|
|
258
|
-
'--rvc-button-bg-color-hover': theme('colors.transparent'),
|
|
259
|
-
'--rvc-button-color-hover': theme('colors.indigo.700'),
|
|
260
|
-
'--rvc-button-icon-color': theme('colors.indigo.600'),
|
|
261
|
-
'--rvc-button-icon-color-hover': theme('colors.indigo.700'),
|
|
262
|
-
|
|
263
|
-
paddingLeft: '0',
|
|
264
|
-
paddingRight: '0',
|
|
265
|
-
boxShadow: 'none',
|
|
266
|
-
...theme('components.button.clear'),
|
|
267
|
-
|
|
268
|
-
'&:hover': {
|
|
269
|
-
textDecoration: 'underline',
|
|
270
|
-
...theme('components.button.clear[&:hover]'),
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
...customColorStyles,
|
|
275
|
-
|
|
276
|
-
// Size variants
|
|
277
|
-
'&.rvc-button-sm': {
|
|
278
|
-
'--rvc-button-height': '1.875rem',
|
|
279
|
-
'--rvc-button-padding-x': theme('padding[2.5]'),
|
|
280
|
-
'--rvc-button-font-size': theme('fontSize.sm.0'),
|
|
281
|
-
'--rvc-button-icon-size': theme('width.4'),
|
|
282
|
-
'--rvc-button-icon-loading-size': theme('width.3'),
|
|
283
|
-
...theme('components.button.sm'),
|
|
284
|
-
|
|
285
|
-
'&.rvc-button-icon-only': {
|
|
286
|
-
padding: 0,
|
|
287
|
-
...theme('components.button.sm[&.rvc-button-icon-only]'),
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
};
|
|
292
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checkbox component
|
|
3
|
-
*
|
|
4
|
-
* @param {Object} theme - The global theme object
|
|
5
|
-
*/
|
|
6
|
-
export default (theme) => ({
|
|
7
|
-
':root': {
|
|
8
|
-
'--rvc-checkbox-input-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
9
|
-
'--rvc-checkbox-input-border-color': 'var(--rvc-base-border-color)',
|
|
10
|
-
'--rvc-checkbox-gap': theme('gap.2'),
|
|
11
|
-
'--rvc-checkbox-font-size': theme('fontSize.base.0'),
|
|
12
|
-
'--rvc-checkbox-font-weight': theme('fontWeight.medium'),
|
|
13
|
-
'--rvc-checkbox-color': theme('colors.slate.950'),
|
|
14
|
-
'--rvc-checkbox-input-size': theme('width.4'),
|
|
15
|
-
'--rvc-checkbox-input-border-radius': theme('borderRadius.DEFAULT'),
|
|
16
|
-
'--rvc-checkbox-input-border-width': theme('borderWidth.DEFAULT'),
|
|
17
|
-
'--rvc-checkbox-input-checked-bg-color': theme('colors.indigo.600'),
|
|
18
|
-
'--rvc-checkbox-input-checked-border-color': theme('colors.indigo.600'),
|
|
19
|
-
'--rvc-checkbox-input-checked-icon-color': theme('colors.white'),
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
'.rvc-checkbox': {
|
|
23
|
-
gap: 'var(--rvc-checkbox-gap)',
|
|
24
|
-
position: 'relative',
|
|
25
|
-
display: 'flex',
|
|
26
|
-
alignItems: 'flex-start',
|
|
27
|
-
cursor: 'pointer',
|
|
28
|
-
...theme('components.checkbox'),
|
|
29
|
-
|
|
30
|
-
label: {
|
|
31
|
-
fontSize: 'var(--rvc-checkbox-font-size)',
|
|
32
|
-
fontWeight: 'var(--rvc-checkbox-font-weight)',
|
|
33
|
-
color: 'var(--rvc-checkbox-color)',
|
|
34
|
-
display: 'block',
|
|
35
|
-
...theme('components.checkbox.label'),
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
'.rvc-checkbox-input': {
|
|
39
|
-
width: 'var(--rvc-checkbox-input-size)',
|
|
40
|
-
height: 'var(--rvc-checkbox-input-size)',
|
|
41
|
-
borderRadius: 'var(--rvc-checkbox-input-border-radius)',
|
|
42
|
-
borderWidth: 'var(--rvc-checkbox-input-border-width)',
|
|
43
|
-
borderColor: 'var(--rvc-checkbox-input-border-color)',
|
|
44
|
-
boxShadow: 'var(--rvc-checkbox-input-box-shadow)',
|
|
45
|
-
marginTop: theme('margin[0.5]'),
|
|
46
|
-
display: 'flex',
|
|
47
|
-
alignItems: 'center',
|
|
48
|
-
justifyContent: 'center',
|
|
49
|
-
...theme('components.checkbox[.rvc-checkbox-input]'),
|
|
50
|
-
|
|
51
|
-
svg: {
|
|
52
|
-
width: '100%',
|
|
53
|
-
height: '100%',
|
|
54
|
-
color: theme('colors.transparent'),
|
|
55
|
-
...theme('components.checkbox[.rvc-checkbox-input][svg]'),
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
'input:checked + .rvc-checkbox-input': {
|
|
60
|
-
backgroundColor: 'var(--rvc-checkbox-input-checked-bg-color)',
|
|
61
|
-
borderColor: 'var(--rvc-checkbox-input-checked-border-color)',
|
|
62
|
-
...theme('components.checkbox[input:checked+.rvc-checkbox-input]'),
|
|
63
|
-
|
|
64
|
-
svg: {
|
|
65
|
-
color: 'var(--rvc-checkbox-input-checked-icon-color)',
|
|
66
|
-
...theme('components.checkbox[input:checked+.rvc-checkbox-input][svg]'),
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
});
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combobox component
|
|
3
|
-
*
|
|
4
|
-
* @param {Object} theme - The global theme object
|
|
5
|
-
*/
|
|
6
|
-
export default (theme) => ({
|
|
7
|
-
':root': {
|
|
8
|
-
'--rvc-combobox-border-radius': 'var(--rvc-base-border-radius)',
|
|
9
|
-
'--rvc-combobox-border-width': 'var(--rvc-base-border-width)',
|
|
10
|
-
'--rvc-combobox-border-color': 'var(--rvc-base-border-color)',
|
|
11
|
-
'--rvc-combobox-font-size': 'var(--rvc-base-input-font-size)',
|
|
12
|
-
'--rvc-combobox-font-weight': 'var(--rvc-base-input-font-weight)',
|
|
13
|
-
'--rvc-combobox-box-shadow': 'var(--rvc-base-box-shadow)',
|
|
14
|
-
'--rvc-combobox-color': 'var(--rvc-base-input-color)',
|
|
15
|
-
'--rvc-combobox-bg-color': 'var(--rvc-base-input-bg-color)',
|
|
16
|
-
'--rvc-combobox-padding-x': 'var(--rvc-base-input-padding-x)',
|
|
17
|
-
'--rvc-combobox-height': 'var(--rvc-base-input-height)',
|
|
18
|
-
'--rvc-combobox-icon-size': 'var(--rvc-base-input-icon-size)',
|
|
19
|
-
'--rvc-combobox-icon-color': 'var(--rvc-base-input-icon-color)',
|
|
20
|
-
'--rvc-combobox-icon-loading-animation': 'var(--rvc-base-loading-animation)',
|
|
21
|
-
'--rvc-combobox-placeholder-color': 'var(--rvc-base-input-placeholder-color)',
|
|
22
|
-
'--rvc-combobox-clear-color': 'var(--rvc-base-input-icon-color)',
|
|
23
|
-
'--rvc-combobox-clear-color-hover': theme('colors.slate.700'),
|
|
24
|
-
'--rvc-combobox-chip-icon-size': theme('width.4'),
|
|
25
|
-
'--rvc-combobox-chip-color': 'var(--rvc-base-input-color)',
|
|
26
|
-
'--rvc-combobox-chip-color-hover': theme('colors.slate.700'),
|
|
27
|
-
'--rvc-combobox-chips-spacing': theme('margin.2'),
|
|
28
|
-
'--rvc-combobox-options-offset': theme('margin.1'),
|
|
29
|
-
'--rvc-combobox-options-z-index': theme('zIndex.10'),
|
|
30
|
-
'--rvc-combobox-options-max-height': theme('maxHeight.60'),
|
|
31
|
-
'--rvc-combobox-options-padding-x': '0.1875rem',
|
|
32
|
-
'--rvc-combobox-options-padding-y': '0.1875rem',
|
|
33
|
-
'--rvc-combobox-option-padding-x': theme('padding.2'),
|
|
34
|
-
'--rvc-combobox-option-padding-y': theme('padding[1.5]'),
|
|
35
|
-
'--rvc-combobox-option-bg-color-hover': theme('colors.slate.100'),
|
|
36
|
-
'--rvc-combobox-option-bg-color-active': 'transparent',
|
|
37
|
-
'--rvc-combobox-option-color-active': 'var(--rvc-base-input-color)',
|
|
38
|
-
'--rvc-combobox-option-font-weight-active': theme('fontWeight.semibold'),
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
'.rvc-combobox': {
|
|
42
|
-
display: 'block',
|
|
43
|
-
...theme('components.combobox'),
|
|
44
|
-
|
|
45
|
-
'.rvc-combobox-wrapper': {
|
|
46
|
-
display: 'grid',
|
|
47
|
-
gridTemplateColumns: theme('gridTemplateColumns.1'),
|
|
48
|
-
position: 'relative',
|
|
49
|
-
width: '100%',
|
|
50
|
-
...theme('components.combobox[.rvc-combobox-wrapper]'),
|
|
51
|
-
|
|
52
|
-
// Extra right padding
|
|
53
|
-
'&:has(.rvc-combobox-button svg) input': {
|
|
54
|
-
paddingRight: 'calc(var(--rvc-combobox-padding-x) + var(--rvc-combobox-icon-size) + 0.25rem)',
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
'> svg': {
|
|
58
|
-
marginLeft: 'var(--rvc-combobox-padding-x)',
|
|
59
|
-
justifySelf: 'start',
|
|
60
|
-
...theme('components.combobox[.rvc-combobox-wrapper > svg]'),
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
input: {
|
|
65
|
-
borderRadius: 'var(--rvc-combobox-border-radius)',
|
|
66
|
-
borderWidth: 'var(--rvc-combobox-border-width)',
|
|
67
|
-
borderColor: 'var(--rvc-combobox-border-color)',
|
|
68
|
-
paddingRight: 'var(--rvc-combobox-padding-x)',
|
|
69
|
-
paddingLeft: 'var(--rvc-combobox-padding-x)',
|
|
70
|
-
backgroundColor: 'var(--rvc-combobox-bg-color)',
|
|
71
|
-
fontSize: 'var(--rvc-combobox-font-size)',
|
|
72
|
-
fontWeight: 'var(--rvc-combobox-font-weight)',
|
|
73
|
-
color: 'var(--rvc-combobox-color)',
|
|
74
|
-
boxShadow: 'var(--rvc-combobox-box-shadow)',
|
|
75
|
-
height: 'var(--rvc-combobox-height)',
|
|
76
|
-
backgroundImage: 'none',
|
|
77
|
-
width: '100%',
|
|
78
|
-
position: 'relative',
|
|
79
|
-
gridColumnStart: '1',
|
|
80
|
-
gridRowStart: '1',
|
|
81
|
-
appearance: 'none',
|
|
82
|
-
outlineWidth: 0,
|
|
83
|
-
...theme('components.combobox.input'),
|
|
84
|
-
|
|
85
|
-
// Extra left padding
|
|
86
|
-
'&:nth-child(2)': {
|
|
87
|
-
paddingLeft: 'calc(var(--rvc-combobox-padding-x) + var(--rvc-combobox-icon-size) + 0.25rem)',
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
'&::placeholder': {
|
|
91
|
-
color: 'var(--rvc-combobox-placeholder-color)',
|
|
92
|
-
...theme('components.combobox.input[&::placeholder]'),
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
'.rvc-combobox-button, .rvc-combobox-wrapper > svg': {
|
|
97
|
-
color: 'var(--rvc-combobox-icon-color)',
|
|
98
|
-
position: 'relative',
|
|
99
|
-
gridColumnStart: '1',
|
|
100
|
-
gridRowStart: '1',
|
|
101
|
-
alignSelf: 'center',
|
|
102
|
-
zIndex: '1',
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
'.rvc-combobox-button': {
|
|
106
|
-
justifySelf: 'end',
|
|
107
|
-
marginRight: 'var(--rvc-combobox-padding-x)',
|
|
108
|
-
...theme('components.combobox[.rvc-combobox-button]'),
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
svg: {
|
|
112
|
-
pointerEvents: 'none',
|
|
113
|
-
|
|
114
|
-
'&:not([class]), &.rvc-combobox-spinner': {
|
|
115
|
-
width: 'var(--rvc-combobox-icon-size)',
|
|
116
|
-
height: 'var(--rvc-combobox-icon-size)',
|
|
117
|
-
color: 'var(--rvc-select-icon-color)',
|
|
118
|
-
...theme('components.combobox.svg'),
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
'.rvc-combobox-spinner': {
|
|
123
|
-
animation: 'var(--rvc-combobox-icon-loading-animation)',
|
|
124
|
-
...theme('components.combobox[.rvc-combobox-spinner]'),
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
'.rvc-combobox-clear': {
|
|
128
|
-
...theme('components.combobox[.rvc-combobox-clear]'),
|
|
129
|
-
|
|
130
|
-
'> *': {
|
|
131
|
-
color: 'var(--rvc-combobox-clear-color)',
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
'&:hover > *': {
|
|
135
|
-
color: 'var(--rvc-combobox-clear-color-hover)',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
'.rvc-combobox-chips': {
|
|
140
|
-
marginTop: 'var(--rvc-combobox-chips-spacing)',
|
|
141
|
-
display: 'flex',
|
|
142
|
-
flexWrap: 'wrap',
|
|
143
|
-
gap: 'var(--rvc-combobox-chips-spacing)',
|
|
144
|
-
...theme('components.combobox[.rvc-combobox-chips]'),
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
'.rvc-combobox-chip': {
|
|
148
|
-
color: 'var(--rvc-combobox-chip-color)',
|
|
149
|
-
...theme('components.combobox[.rvc-combobox-chip]'),
|
|
150
|
-
|
|
151
|
-
svg: {
|
|
152
|
-
width: 'var(--rvc-combobox-chip-icon-size)',
|
|
153
|
-
height: 'var(--rvc-combobox-chip-icon-size)',
|
|
154
|
-
...theme('components.combobox[.rvc-combobox-chip][svg]'),
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
'&:hover svg': {
|
|
158
|
-
color: 'var(--rvc-combobox-chip-color-hover)',
|
|
159
|
-
...theme('components.combobox[.rvc-combobox-chip][&:hover][svg]'),
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
'.rvc-combobox-options': {
|
|
164
|
-
paddingTop: 'var(--rvc-combobox-options-padding-y)',
|
|
165
|
-
paddingRight: 'var(--rvc-combobox-options-padding-x)',
|
|
166
|
-
paddingBottom: 'var(--rvc-combobox-options-padding-y)',
|
|
167
|
-
paddingLeft: 'var(--rvc-combobox-options-padding-x)',
|
|
168
|
-
top: 'calc(var(--rvc-combobox-height) + var(--rvc-combobox-options-offset))',
|
|
169
|
-
borderRadius: 'var(--rvc-combobox-border-radius)',
|
|
170
|
-
borderWidth: 'var(--rvc-combobox-border-width)',
|
|
171
|
-
borderColor: 'var(--rvc-combobox-border-color)',
|
|
172
|
-
backgroundColor: 'var(--rvc-combobox-bg-color)',
|
|
173
|
-
fontSize: 'var(--rvc-combobox-font-size)',
|
|
174
|
-
color: 'var(--rvc-combobox-color)',
|
|
175
|
-
boxShadow: 'var(--rvc-combobox-box-shadow)',
|
|
176
|
-
marginTop: 'var(--rvc-combobox-options-offset)',
|
|
177
|
-
zIndex: 'var(--rvc-combobox-options-z-index)',
|
|
178
|
-
maxHeight: 'var(--rvc-combobox-options-max-height)',
|
|
179
|
-
position: 'absolute',
|
|
180
|
-
width: '100%',
|
|
181
|
-
overflowY: 'auto',
|
|
182
|
-
...theme('components.combobox[.rvc-combobox-options]'),
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
'.rvc-combobox-option': {
|
|
186
|
-
paddingTop: 'var(--rvc-combobox-option-padding-y)',
|
|
187
|
-
paddingRight: 'var(--rvc-combobox-option-padding-x)',
|
|
188
|
-
paddingBottom: 'var(--rvc-combobox-option-padding-y)',
|
|
189
|
-
paddingLeft: 'var(--rvc-combobox-option-padding-x)',
|
|
190
|
-
borderRadius: 'var(--rvc-combobox-border-radius)',
|
|
191
|
-
color: 'var(--rvc-combobox-color)',
|
|
192
|
-
gap: theme('gap.2'),
|
|
193
|
-
alignItems: 'center',
|
|
194
|
-
position: 'relative',
|
|
195
|
-
display: 'flex',
|
|
196
|
-
userSelect: 'none',
|
|
197
|
-
cursor: 'pointer',
|
|
198
|
-
...theme('components.combobox[.rvc-combobox-option]'),
|
|
199
|
-
|
|
200
|
-
'&.rvc-combobox-option-hover': {
|
|
201
|
-
backgroundColor: 'var(--rvc-combobox-option-bg-color-hover)',
|
|
202
|
-
...theme('components.combobox[.rvc-combobox-option][&.rvc-combobox-option-hover]'),
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
'&.rvc-combobox-option-active': {
|
|
206
|
-
backgroundColor: 'var(--rvc-combobox-option-bg-color-active)',
|
|
207
|
-
color: 'var(--rvc-combobox-option-color-active)',
|
|
208
|
-
fontWeight: 'var(--rvc-combobox-option-font-weight-active)',
|
|
209
|
-
...theme('components.combobox[.rvc-combobox-option][&.rvc-combobox-option-active]'),
|
|
210
|
-
|
|
211
|
-
'&.rvc-combobox-option-hover': {
|
|
212
|
-
backgroundColor: 'var(--rvc-combobox-option-bg-color-hover)',
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
// Size variants
|
|
218
|
-
'&.rvc-combobox-sm': {
|
|
219
|
-
'--rvc-combobox-font-size': 'calc(var(--rvc-base-input-font-size) * 0.9)',
|
|
220
|
-
'--rvc-combobox-padding-x': 'calc(var(--rvc-base-input-padding-x) * 0.85)',
|
|
221
|
-
'--rvc-combobox-icon-size': 'calc(var(--rvc-base-input-icon-size) * 0.85)',
|
|
222
|
-
'--rvc-combobox-height': '1.875rem',
|
|
223
|
-
...theme('components.combobox.sm'),
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
});
|