@teammodlr/ui-kit 2.1.61 → 2.1.63

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.
@@ -1,368 +1,367 @@
1
- import {
2
- createVar,
3
- globalStyle,
4
- style,
5
- styleVariants
6
- } from '@vanilla-extract/css';
7
- import { themeVars } from '../../../styles/theme.css';
8
-
9
- const sizes = {
10
- xs: '26px',
11
- sm: '30px',
12
- md: '38px',
13
- lg: '42px',
14
- xl: '48px'
15
- };
16
-
17
- const borderRadiuses = {
18
- xs: '2px',
19
- sm: '3px',
20
- md: '4px',
21
- lg: '6px',
22
- xl: '8px'
23
- };
24
-
25
- export const vars = {
26
- height: createVar(),
27
- radius: createVar(),
28
- paddingX: createVar(),
29
- paddingY: createVar(),
30
- borderColor: createVar(),
31
- backgroundColor: createVar(),
32
- color: createVar(),
33
- cursor: createVar(),
34
- optionColor: createVar(),
35
- optionBackgroundColor: createVar()
36
- };
37
-
38
- export const wrapper = style({
39
- position: 'relative',
40
- outline: 'none'
41
- });
42
-
43
- export const base = style({
44
- vars: {
45
- [vars.height]: sizes.md,
46
- [vars.radius]: borderRadiuses.md,
47
- [vars.paddingX]: themeVars.space[2],
48
- [vars.paddingY]: themeVars.space[0],
49
- [vars.borderColor]: themeVars.color.gray[300],
50
- [vars.color]: themeVars.color.gray[900],
51
- [vars.backgroundColor]: '#FFFFFF',
52
- [vars.cursor]: 'text'
53
- },
54
- minHeight: vars.height,
55
- width: '100%',
56
- borderRadius: vars.radius,
57
- borderWidth: 1,
58
- borderStyle: 'solid',
59
- borderColor: vars.borderColor,
60
- padding: `${vars.paddingY} ${vars.paddingX}`,
61
- fontSize: themeVars.fontSize.base,
62
- display: 'block',
63
- textAlign: 'left',
64
- appearance: 'none',
65
- lineHeight: vars.height,
66
- boxSizing: 'border-box',
67
- resize: 'none',
68
- cursor: 'pointer',
69
- boxShadow: 'none',
70
- backgroundColor: vars.backgroundColor,
71
- transition: `color .3s ${themeVars.transition.default},
72
- background-color .3s ${themeVars.transition.default},
73
- box-shadow .3s ${themeVars.transition.default},
74
- border-color .3s ${themeVars.transition.default}`,
75
- ':hover': {
76
- vars: {
77
- [vars.borderColor]: themeVars.color.blue[400]
78
- }
79
- },
80
- ':focus': {
81
- vars: {
82
- [vars.borderColor]: themeVars.color.blue[500]
83
- },
84
- outline: 'none',
85
- boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
86
- }
87
- });
88
-
89
- export const selectedTags = style({
90
- display: 'flex',
91
- flexWrap: 'wrap',
92
- alignItems: 'center',
93
- gap: themeVars.space[1],
94
- paddingTop: themeVars.space[1.5],
95
- paddingBottom: themeVars.space[1.5]
96
- });
97
-
98
- export const block = style({
99
- width: '100%'
100
- });
101
-
102
- export const disabled = style({
103
- vars: {
104
- [vars.borderColor]: themeVars.color.gray[200],
105
- [vars.color]: themeVars.color.gray[500],
106
- [vars.backgroundColor]: themeVars.color.gray[50],
107
- [vars.cursor]: 'not-allowed'
108
- },
109
- ':focus': {
110
- boxShadow: 'none'
111
- },
112
- ':hover': {
113
- cursor: 'not-allowed'
114
- }
115
- });
116
-
117
- export const label = style({
118
- fontWeight: '500',
119
- display: 'inline-block',
120
- fontSize: themeVars.fontSize.base,
121
- wordBreak: 'break-word',
122
- cursor: 'pointer',
123
- marginBottom: themeVars.space[1]
124
- });
125
-
126
- export const description = style({
127
- display: 'block',
128
- textDecoration: 'none',
129
- fontSize: themeVars.fontSize.base,
130
- color: themeVars.color.gray[600],
131
- lineHeight: themeVars.fontSize.large,
132
- wordBreak: 'break-word',
133
- marginBottom: themeVars.space[1.5]
134
- });
135
-
136
- export const errorMessage = style({
137
- display: 'block',
138
- textDecoration: 'none',
139
- fontSize: themeVars.fontSize.base,
140
- color: themeVars.color.red[600],
141
- wordBreak: 'break-word',
142
- marginTop: themeVars.space[1.5]
143
- });
144
-
145
- export const error = style({
146
- vars: {
147
- [vars.borderColor]: themeVars.color.red[500]
148
- },
149
- ':hover': {
150
- vars: {
151
- [vars.borderColor]: themeVars.color.red[500]
152
- }
153
- },
154
- ':focus': {
155
- boxShadow: `0 0 0 2px ${themeVars.color.red[200]}`,
156
- vars: {
157
- [vars.borderColor]: themeVars.color.red[500]
158
- }
159
- }
160
- });
161
-
162
- export const focused = style({
163
- vars: {
164
- [vars.borderColor]: themeVars.color.blue[500]
165
- },
166
- boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
167
- });
168
-
169
- export const rightIcon = style({
170
- pointerEvents: 'none',
171
- position: 'absolute',
172
- zIndex: 1,
173
- right: 0,
174
- top: 0,
175
- bottom: 0,
176
- display: 'flex',
177
- alignItems: 'center',
178
- justifyContent: 'center',
179
- width: '2.25rem',
180
- color: themeVars.color.gray[400]
181
- });
182
-
183
- export const hasRightIcon = style({
184
- paddingRight: '2.25rem'
185
- });
186
-
187
- export const menu = style({
188
- backgroundColor: '#FFFFFF',
189
- borderRadius: '4px',
190
- zIndex: 4000,
191
- border: `1px solid ${themeVars.color.gray[200]}`,
192
- boxShadow: themeVars.shadow.md,
193
- maxHeight: '230px',
194
- overflowY: 'auto'
195
- });
196
-
197
- export const placeholder = style({
198
- userSelect: 'none',
199
- color: themeVars.color.gray[500]
200
- });
201
-
202
- export const search = style({
203
- // padding: `${themeVars.space[1]} ${themeVars.space[1]} 0`,
204
- backgroundColor: '#FFFFFF',
205
- position: 'sticky',
206
- top: 0,
207
- zIndex: 1,
208
- borderBottom: `1px solid ${themeVars.color.gray[200]}`,
209
- display: 'flex'
210
- });
211
-
212
- export const searchInput = style({
213
- padding: `${themeVars.space[2.5]} ${themeVars.space[2.5]}`,
214
- border: 'none',
215
- outline: 'none',
216
- width: '100%',
217
- fontSize: themeVars.fontSize.base,
218
- color: themeVars.color.gray[800],
219
- flexShrink: 1
220
- });
221
-
222
- export const options = style({
223
- padding: themeVars.space[1],
224
- display: 'flex',
225
- flexDirection: 'column',
226
- gap: themeVars.space[0.5]
227
- });
228
-
229
- export const option = style({
230
- vars: {
231
- [vars.optionColor]: themeVars.color.gray[800],
232
- [vars.optionBackgroundColor]: '#FFFFFF'
233
- },
234
- position: 'relative',
235
- display: 'flex',
236
- alignItems: 'center',
237
- cursor: 'pointer',
238
- minHeight: '36px',
239
- fontSize: themeVars.fontSize.base,
240
- paddingBlock: themeVars.space['1.5'],
241
- paddingInline: themeVars.space['3'],
242
- gap: themeVars.space[2],
243
- color: vars.optionColor,
244
- transition: 'background-color 0.05s ease-in-out',
245
- backgroundColor: vars.optionBackgroundColor,
246
- borderRadius: borderRadiuses.md,
247
- userSelect: 'none',
248
- ':hover': {
249
- vars: {
250
- [vars.optionColor]: themeVars.color.gray[800],
251
- [vars.optionBackgroundColor]: themeVars.color.gray[100]
252
- }
253
- }
254
- });
255
-
256
- export const optionFocused = style({
257
- vars: {
258
- [vars.optionColor]: themeVars.color.gray[800],
259
- [vars.optionBackgroundColor]: themeVars.color.gray[100]
260
- },
261
- ':hover': {
262
- vars: {
263
- [vars.optionColor]: themeVars.color.gray[800],
264
- [vars.optionBackgroundColor]: themeVars.color.gray[100]
265
- }
266
- }
267
- });
268
-
269
- export const optionSelected = style({
270
- // vars: {
271
- // [vars.optionColor]: themeVars.color.blue[50],
272
- // [vars.optionBackgroundColor]: themeVars.color.blue[500],
273
- // },
274
- // ':hover': {
275
- // vars: {
276
- // [vars.optionColor]: themeVars.color.blue[50],
277
- // [vars.optionBackgroundColor]: themeVars.color.blue[600],
278
- // },
279
- // }
280
- });
281
-
282
- export const optionLabel = style({});
283
-
284
- export const checkAll = style({
285
- display: 'flex',
286
- alignItems: 'center',
287
- justifyContent: 'center',
288
- width: themeVars.space[5],
289
- margin: `0 ${themeVars.space[2]}`,
290
- flexShrink: 0,
291
- flex: 1
292
- });
293
-
294
- export const checkAllButton = style({
295
- flexShrink: 0,
296
- alignItems: 'center',
297
- cursor: 'pointer',
298
- justifyContent: 'center',
299
- marginLeft: themeVars.space[2.5],
300
- width: themeVars.space[6],
301
- height: themeVars.space[6],
302
- borderRadius: borderRadiuses.md,
303
- color: themeVars.color.blue[500],
304
- border: `2px solid ${themeVars.color.gray[200]}`,
305
- padding: 0,
306
- background: 'none',
307
- outline: 'none',
308
- ':hover': {
309
- borderColor: themeVars.color.gray[300]
310
- }
311
- });
312
-
313
- export const checkAllButtonActive = style({
314
- border: `1px solid ${themeVars.color.blue[500]}`,
315
- background: themeVars.color.blue[500],
316
- color: 'white',
317
- ':hover': {
318
- borderColor: themeVars.color.blue[600],
319
- background: themeVars.color.blue[600]
320
- }
321
- });
322
-
323
- globalStyle(`${checkAllButtonActive} > svg`, {
324
- position: 'relative',
325
- top: '1px',
326
- width: themeVars.space[4],
327
- height: themeVars.space[4],
328
- color: 'white',
329
- verticalAlign: 'top'
330
- });
331
-
332
- export const optionIcon = style({
333
- display: 'flex',
334
- alignItems: 'center',
335
- justifyContent: 'center',
336
- width: themeVars.space[5],
337
- marginLeft: '-2px'
338
- });
339
-
340
- globalStyle(`${optionIcon} > svg`, {
341
- position: 'relative',
342
- top: '1px',
343
- width: themeVars.space[5],
344
- height: themeVars.space[5],
345
- color: themeVars.color.blue[500]
346
- });
347
-
348
- export const noResults = style({
349
- padding: `${themeVars.space[2]} 0`,
350
- display: 'flex',
351
- // flexDirection: 'column',
352
- alignItems: 'center',
353
- textAlign: 'center',
354
- justifyContent: 'center',
355
- gap: themeVars.space[0.5],
356
- width: '100%',
357
- color: themeVars.color.gray[500],
358
- fontSize: themeVars.fontSize.small
359
- });
360
-
361
- export const clearable = style({
362
- width: themeVars.space[4],
363
- height: themeVars.space[4],
364
- position: 'absolute',
365
- right: themeVars.space[2],
366
- top: '0',
367
- display: 'flex'
368
- });
1
+ import {
2
+ createVar,
3
+ globalStyle,
4
+ style,
5
+ styleVariants
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
8
+
9
+ const sizes = {
10
+ xs: '26px',
11
+ sm: '30px',
12
+ md: '38px',
13
+ lg: '42px',
14
+ xl: '48px'
15
+ };
16
+
17
+ const borderRadiuses = {
18
+ xs: '2px',
19
+ sm: '3px',
20
+ md: '4px',
21
+ lg: '6px',
22
+ xl: '8px'
23
+ };
24
+
25
+ export const vars = {
26
+ height: createVar(),
27
+ radius: createVar(),
28
+ paddingX: createVar(),
29
+ paddingY: createVar(),
30
+ borderColor: createVar(),
31
+ backgroundColor: createVar(),
32
+ color: createVar(),
33
+ cursor: createVar(),
34
+ optionColor: createVar(),
35
+ optionBackgroundColor: createVar()
36
+ };
37
+
38
+ export const wrapper = style({
39
+ position: 'relative',
40
+ outline: 'none'
41
+ });
42
+
43
+ export const base = style({
44
+ vars: {
45
+ [vars.height]: sizes.md,
46
+ [vars.radius]: borderRadiuses.md,
47
+ [vars.paddingX]: themeVars.space[2],
48
+ [vars.paddingY]: themeVars.space[0],
49
+ [vars.borderColor]: themeVars.color.gray[300],
50
+ [vars.color]: themeVars.color.gray[900],
51
+ [vars.backgroundColor]: '#FFFFFF',
52
+ [vars.cursor]: 'text'
53
+ },
54
+ minHeight: vars.height,
55
+ width: '100%',
56
+ borderRadius: vars.radius,
57
+ borderWidth: 1,
58
+ borderStyle: 'solid',
59
+ borderColor: vars.borderColor,
60
+ padding: `${vars.paddingY} ${vars.paddingX}`,
61
+ fontSize: themeVars.fontSize.base,
62
+ display: 'block',
63
+ textAlign: 'left',
64
+ appearance: 'none',
65
+ lineHeight: vars.height,
66
+ boxSizing: 'border-box',
67
+ resize: 'none',
68
+ cursor: 'pointer',
69
+ boxShadow: 'none',
70
+ backgroundColor: vars.backgroundColor,
71
+ transition: `color .3s ${themeVars.transition.default},
72
+ background-color .3s ${themeVars.transition.default},
73
+ box-shadow .3s ${themeVars.transition.default},
74
+ border-color .3s ${themeVars.transition.default}`,
75
+ ':hover': {
76
+ vars: {
77
+ [vars.borderColor]: themeVars.color.blue[400]
78
+ }
79
+ },
80
+ ':focus': {
81
+ vars: {
82
+ [vars.borderColor]: themeVars.color.blue[500]
83
+ },
84
+ outline: 'none',
85
+ boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
86
+ }
87
+ });
88
+
89
+ export const selectedTags = style({
90
+ display: 'flex',
91
+ flexWrap: 'wrap',
92
+ alignItems: 'center',
93
+ gap: themeVars.space[1],
94
+ paddingTop: themeVars.space[1.5],
95
+ paddingBottom: themeVars.space[1.5]
96
+ });
97
+
98
+ export const block = style({
99
+ width: '100%'
100
+ });
101
+
102
+ export const disabled = style({
103
+ vars: {
104
+ [vars.borderColor]: themeVars.color.gray[200],
105
+ [vars.color]: themeVars.color.gray[500],
106
+ [vars.backgroundColor]: themeVars.color.gray[50],
107
+ [vars.cursor]: 'not-allowed'
108
+ },
109
+ ':focus': {
110
+ boxShadow: 'none'
111
+ },
112
+ ':hover': {
113
+ cursor: 'not-allowed'
114
+ }
115
+ });
116
+
117
+ export const label = style({
118
+ fontWeight: '500',
119
+ display: 'inline-block',
120
+ fontSize: themeVars.fontSize.base,
121
+ wordBreak: 'break-word',
122
+ cursor: 'pointer',
123
+ marginBottom: themeVars.space[1]
124
+ });
125
+
126
+ export const description = style({
127
+ display: 'block',
128
+ textDecoration: 'none',
129
+ fontSize: themeVars.fontSize.base,
130
+ color: themeVars.color.gray[600],
131
+ lineHeight: themeVars.fontSize.large,
132
+ wordBreak: 'break-word',
133
+ marginBottom: themeVars.space[1.5]
134
+ });
135
+
136
+ export const errorMessage = style({
137
+ display: 'block',
138
+ textDecoration: 'none',
139
+ fontSize: themeVars.fontSize.base,
140
+ color: themeVars.color.red[600],
141
+ wordBreak: 'break-word',
142
+ marginTop: themeVars.space[1.5]
143
+ });
144
+
145
+ export const error = style({
146
+ vars: {
147
+ [vars.borderColor]: themeVars.color.red[500]
148
+ },
149
+ ':hover': {
150
+ vars: {
151
+ [vars.borderColor]: themeVars.color.red[500]
152
+ }
153
+ },
154
+ ':focus': {
155
+ boxShadow: `0 0 0 2px ${themeVars.color.red[200]}`,
156
+ vars: {
157
+ [vars.borderColor]: themeVars.color.red[500]
158
+ }
159
+ }
160
+ });
161
+
162
+ export const focused = style({
163
+ vars: {
164
+ [vars.borderColor]: themeVars.color.blue[500]
165
+ },
166
+ boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
167
+ });
168
+
169
+ export const rightIcon = style({
170
+ pointerEvents: 'none',
171
+ position: 'absolute',
172
+ zIndex: 1,
173
+ right: 0,
174
+ top: 0,
175
+ bottom: 0,
176
+ display: 'flex',
177
+ alignItems: 'center',
178
+ justifyContent: 'center',
179
+ width: '2.25rem',
180
+ color: themeVars.color.gray[400]
181
+ });
182
+
183
+ export const hasRightIcon = style({
184
+ paddingRight: '2.25rem'
185
+ });
186
+
187
+ export const menu = style({
188
+ backgroundColor: '#FFFFFF',
189
+ borderRadius: '4px',
190
+ border: `1px solid ${themeVars.color.gray[200]}`,
191
+ boxShadow: themeVars.shadow.md,
192
+ maxHeight: '230px',
193
+ overflowY: 'auto'
194
+ });
195
+
196
+ export const placeholder = style({
197
+ userSelect: 'none',
198
+ color: themeVars.color.gray[500]
199
+ });
200
+
201
+ export const search = style({
202
+ // padding: `${themeVars.space[1]} ${themeVars.space[1]} 0`,
203
+ backgroundColor: '#FFFFFF',
204
+ position: 'sticky',
205
+ top: 0,
206
+ zIndex: 1,
207
+ borderBottom: `1px solid ${themeVars.color.gray[200]}`,
208
+ display: 'flex'
209
+ });
210
+
211
+ export const searchInput = style({
212
+ padding: `${themeVars.space[2.5]} ${themeVars.space[2.5]}`,
213
+ border: 'none',
214
+ outline: 'none',
215
+ width: '100%',
216
+ fontSize: themeVars.fontSize.base,
217
+ color: themeVars.color.gray[800],
218
+ flexShrink: 1
219
+ });
220
+
221
+ export const options = style({
222
+ padding: themeVars.space[1],
223
+ display: 'flex',
224
+ flexDirection: 'column',
225
+ gap: themeVars.space[0.5]
226
+ });
227
+
228
+ export const option = style({
229
+ vars: {
230
+ [vars.optionColor]: themeVars.color.gray[800],
231
+ [vars.optionBackgroundColor]: '#FFFFFF'
232
+ },
233
+ position: 'relative',
234
+ display: 'flex',
235
+ alignItems: 'center',
236
+ cursor: 'pointer',
237
+ minHeight: '36px',
238
+ fontSize: themeVars.fontSize.base,
239
+ paddingBlock: themeVars.space['1.5'],
240
+ paddingInline: themeVars.space['3'],
241
+ gap: themeVars.space[2],
242
+ color: vars.optionColor,
243
+ transition: 'background-color 0.05s ease-in-out',
244
+ backgroundColor: vars.optionBackgroundColor,
245
+ borderRadius: borderRadiuses.md,
246
+ userSelect: 'none',
247
+ ':hover': {
248
+ vars: {
249
+ [vars.optionColor]: themeVars.color.gray[800],
250
+ [vars.optionBackgroundColor]: themeVars.color.gray[100]
251
+ }
252
+ }
253
+ });
254
+
255
+ export const optionFocused = style({
256
+ vars: {
257
+ [vars.optionColor]: themeVars.color.gray[800],
258
+ [vars.optionBackgroundColor]: themeVars.color.gray[100]
259
+ },
260
+ ':hover': {
261
+ vars: {
262
+ [vars.optionColor]: themeVars.color.gray[800],
263
+ [vars.optionBackgroundColor]: themeVars.color.gray[100]
264
+ }
265
+ }
266
+ });
267
+
268
+ export const optionSelected = style({
269
+ // vars: {
270
+ // [vars.optionColor]: themeVars.color.blue[50],
271
+ // [vars.optionBackgroundColor]: themeVars.color.blue[500],
272
+ // },
273
+ // ':hover': {
274
+ // vars: {
275
+ // [vars.optionColor]: themeVars.color.blue[50],
276
+ // [vars.optionBackgroundColor]: themeVars.color.blue[600],
277
+ // },
278
+ // }
279
+ });
280
+
281
+ export const optionLabel = style({});
282
+
283
+ export const checkAll = style({
284
+ display: 'flex',
285
+ alignItems: 'center',
286
+ justifyContent: 'center',
287
+ width: themeVars.space[5],
288
+ margin: `0 ${themeVars.space[2]}`,
289
+ flexShrink: 0,
290
+ flex: 1
291
+ });
292
+
293
+ export const checkAllButton = style({
294
+ flexShrink: 0,
295
+ alignItems: 'center',
296
+ cursor: 'pointer',
297
+ justifyContent: 'center',
298
+ marginLeft: themeVars.space[2.5],
299
+ width: themeVars.space[6],
300
+ height: themeVars.space[6],
301
+ borderRadius: borderRadiuses.md,
302
+ color: themeVars.color.blue[500],
303
+ border: `2px solid ${themeVars.color.gray[200]}`,
304
+ padding: 0,
305
+ background: 'none',
306
+ outline: 'none',
307
+ ':hover': {
308
+ borderColor: themeVars.color.gray[300]
309
+ }
310
+ });
311
+
312
+ export const checkAllButtonActive = style({
313
+ border: `1px solid ${themeVars.color.blue[500]}`,
314
+ background: themeVars.color.blue[500],
315
+ color: 'white',
316
+ ':hover': {
317
+ borderColor: themeVars.color.blue[600],
318
+ background: themeVars.color.blue[600]
319
+ }
320
+ });
321
+
322
+ globalStyle(`${checkAllButtonActive} > svg`, {
323
+ position: 'relative',
324
+ top: '1px',
325
+ width: themeVars.space[4],
326
+ height: themeVars.space[4],
327
+ color: 'white',
328
+ verticalAlign: 'top'
329
+ });
330
+
331
+ export const optionIcon = style({
332
+ display: 'flex',
333
+ alignItems: 'center',
334
+ justifyContent: 'center',
335
+ width: themeVars.space[5],
336
+ marginLeft: '-2px'
337
+ });
338
+
339
+ globalStyle(`${optionIcon} > svg`, {
340
+ position: 'relative',
341
+ top: '1px',
342
+ width: themeVars.space[5],
343
+ height: themeVars.space[5],
344
+ color: themeVars.color.blue[500]
345
+ });
346
+
347
+ export const noResults = style({
348
+ padding: `${themeVars.space[2]} 0`,
349
+ display: 'flex',
350
+ // flexDirection: 'column',
351
+ alignItems: 'center',
352
+ textAlign: 'center',
353
+ justifyContent: 'center',
354
+ gap: themeVars.space[0.5],
355
+ width: '100%',
356
+ color: themeVars.color.gray[500],
357
+ fontSize: themeVars.fontSize.small
358
+ });
359
+
360
+ export const clearable = style({
361
+ width: themeVars.space[4],
362
+ height: themeVars.space[4],
363
+ position: 'absolute',
364
+ right: themeVars.space[2],
365
+ top: '0',
366
+ display: 'flex'
367
+ });