@teammodlr/ui-kit 2.1.4 → 2.1.5

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,6 +1,5 @@
1
1
  import { createVar, globalStyle, style, styleVariants } from "@vanilla-extract/css";
2
2
  import { themeVars } from "../../../styles/theme.css";
3
- import { fonts } from "../../../styles/typography.css";
4
3
 
5
4
  const sizes = {
6
5
  xs: '26px',
@@ -48,7 +47,6 @@ export const base = style({
48
47
  [vars.backgroundColor]: '#FFFFFF',
49
48
  [vars.cursor]: 'text',
50
49
  },
51
- height: vars.height,
52
50
  minHeight: vars.height,
53
51
  width: '100%',
54
52
  borderRadius: vars.radius,
@@ -88,6 +86,8 @@ export const selectedTags = style({
88
86
  flexWrap: 'wrap',
89
87
  alignItems: 'center',
90
88
  gap: themeVars.space[1],
89
+ paddingTop: themeVars.space[1.5],
90
+ paddingBottom: themeVars.space[1.5],
91
91
  });
92
92
 
93
93
  export const block = style({
@@ -200,6 +200,8 @@ export const search = style({
200
200
  position: 'sticky',
201
201
  top: 0,
202
202
  zIndex: 1,
203
+ borderBottom: `1px solid ${themeVars.color.gray[200]}`,
204
+ display: 'flex',
203
205
  });
204
206
 
205
207
  export const searchInput = style({
@@ -208,8 +210,8 @@ export const searchInput = style({
208
210
  outline: 'none',
209
211
  width: '100%',
210
212
  fontSize: themeVars.fontSize.base,
211
- borderBottom: `1px solid ${themeVars.color.gray[200]}`,
212
213
  color: themeVars.color.gray[800],
214
+ flexShrink: 1
213
215
  });
214
216
 
215
217
  export const options = style({
@@ -237,6 +239,7 @@ export const option = style({
237
239
  transition: "background-color 0.05s ease-in-out",
238
240
  backgroundColor: vars.optionBackgroundColor,
239
241
  borderRadius: borderRadiuses.md,
242
+ userSelect: "none",
240
243
  ':hover': {
241
244
  vars: {
242
245
  [vars.optionColor]: themeVars.color.gray[800],
@@ -245,6 +248,7 @@ export const option = style({
245
248
  }
246
249
  });
247
250
 
251
+
248
252
  export const optionFocused = style({
249
253
  vars: {
250
254
  [vars.optionColor]: themeVars.color.gray[800],
@@ -259,18 +263,85 @@ export const optionFocused = style({
259
263
  });
260
264
 
261
265
  export const optionSelected = style({
262
- vars: {
263
- [vars.optionColor]: themeVars.color.blue[50],
264
- [vars.optionBackgroundColor]: themeVars.color.blue[500],
265
- },
266
+ // vars: {
267
+ // [vars.optionColor]: themeVars.color.blue[50],
268
+ // [vars.optionBackgroundColor]: themeVars.color.blue[500],
269
+ // },
270
+ // ':hover': {
271
+ // vars: {
272
+ // [vars.optionColor]: themeVars.color.blue[50],
273
+ // [vars.optionBackgroundColor]: themeVars.color.blue[600],
274
+ // },
275
+ // }
276
+ });
277
+
278
+ export const optionLabel = style({
279
+
280
+ });
281
+
282
+ export const checkAll = style({
283
+ display: 'flex',
284
+ alignItems: 'center',
285
+ justifyContent: 'center',
286
+ width: themeVars.space[5],
287
+ margin: `0 ${themeVars.space[2]}`,
288
+ flexShrink: 0,
289
+ flex: 1
290
+ });
291
+
292
+ export const checkAllButton = style({
293
+ flexShrink: 0,
294
+ alignItems: 'center',
295
+ cursor: 'pointer',
296
+ justifyContent: 'center',
297
+ marginLeft: themeVars.space[2.5],
298
+ width: themeVars.space[6],
299
+ height: themeVars.space[6],
300
+ borderRadius: borderRadiuses.md,
301
+ color: themeVars.color.blue[500],
302
+ border: `2px solid ${themeVars.color.gray[200]}`,
303
+ padding: 0,
304
+ background: 'none',
305
+ outline: 'none',
266
306
  ':hover': {
267
- vars: {
268
- [vars.optionColor]: themeVars.color.blue[50],
269
- [vars.optionBackgroundColor]: themeVars.color.blue[600],
270
- },
307
+ borderColor: themeVars.color.gray[300],
308
+ }
309
+ });
310
+
311
+ export const checkAllButtonActive = style({
312
+ border: `1px solid ${themeVars.color.blue[500]}`,
313
+ background: themeVars.color.blue[500],
314
+ color: 'white',
315
+ ':hover': {
316
+ borderColor: themeVars.color.blue[600],
317
+ background: themeVars.color.blue[600],
271
318
  }
272
319
  });
273
320
 
321
+ globalStyle(`${checkAllButtonActive} > svg`, {
322
+ position: 'relative',
323
+ top: '1px',
324
+ width: themeVars.space[4],
325
+ height: themeVars.space[4],
326
+ color: 'white'
327
+ });
328
+
329
+ export const optionIcon = style({
330
+ display: 'flex',
331
+ alignItems: 'center',
332
+ justifyContent: 'center',
333
+ width: themeVars.space[5],
334
+ marginLeft: '-2px'
335
+ });
336
+
337
+ globalStyle(`${optionIcon} > svg`, {
338
+ position: 'relative',
339
+ top: '1px',
340
+ width: themeVars.space[5],
341
+ height: themeVars.space[5],
342
+ color: themeVars.color.blue[500],
343
+ });
344
+
274
345
  export const noResults = style({
275
346
  padding: `${themeVars.space[2]} 0`,
276
347
  display: 'flex',
@@ -283,3 +354,12 @@ export const noResults = style({
283
354
  color: themeVars.color.gray[500],
284
355
  fontSize: themeVars.fontSize.small,
285
356
  });
357
+
358
+ export const clearable = style({
359
+ width: themeVars.space[4],
360
+ height: themeVars.space[4],
361
+ position: 'absolute',
362
+ right: themeVars.space[2],
363
+ top: '0',
364
+ display: 'flex',
365
+ })
@@ -1,6 +1,5 @@
1
1
  import { createVar, globalStyle, style, styleVariants } from "@vanilla-extract/css";
2
2
  import { themeVars } from "../../../styles/theme.css";
3
- import { fonts } from "../../../styles/typography.css";
4
3
 
5
4
  const sizes = {
6
5
  xs: '18px',
@@ -1,5 +1,4 @@
1
1
  import {createGlobalTheme, globalStyle, styleVariants} from '@vanilla-extract/css';
2
- import {fonts} from "./typography.css";
3
2
 
4
3
  export const spaceScale = {
5
4
  '0': '0px',
@@ -12,6 +11,9 @@ export const spaceScale = {
12
11
  '3.5': '14px',
13
12
  '4': '16px',
14
13
  '5': '18px',
14
+ '6': '20px',
15
+ '7': '24px',
16
+ '8': '28px',
15
17
  };
16
18
 
17
19
  export const marginVariants = styleVariants(spaceScale, (space) => ({
@@ -1,22 +0,0 @@
1
- import type { FontMetrics } from "@capsizecss/core";
2
- interface Meta {
3
- fallback: string;
4
- file: string;
5
- format: string;
6
- metrics: FontMetrics;
7
- name: string;
8
- wghtRange: string;
9
- wghts: {
10
- [key: string]: number;
11
- };
12
- }
13
- type FontFamilyId = "INTER";
14
- type Fonts = Record<FontFamilyId, Meta>;
15
- export declare const fonts: Fonts;
16
- export declare const fontStyles: {
17
- INTER_SMALL: string;
18
- INTER_MED: string;
19
- INTER_LARGE: string;
20
- INTER_XLARGE: string;
21
- };
22
- export {};
@@ -1,91 +0,0 @@
1
- import type { FontMetrics } from "@capsizecss/core";
2
- import interFontMetrics from "@capsizecss/metrics/inter";
3
- import { createTextStyle } from "@capsizecss/vanilla-extract";
4
- import { style } from "@vanilla-extract/css";
5
-
6
- interface Meta {
7
- fallback: string;
8
- file: string;
9
- format: string;
10
- metrics: FontMetrics;
11
- name: string;
12
- wghtRange: string;
13
- wghts: {
14
- [key: string]: number;
15
- };
16
- }
17
-
18
- type FontFamilyId = "INTER";
19
-
20
- type Fonts = Record<FontFamilyId, Meta>;
21
-
22
- const FONT_DIR = `/fonts`;
23
-
24
- export const fonts: Fonts = {
25
- INTER: {
26
- fallback: `sans-serif`,
27
- file: ``,
28
- format: `truetype-variations`,
29
- metrics: interFontMetrics,
30
- name: `Inter`,
31
- wghtRange: `100 900`,
32
- wghts: {
33
- "400": 400,
34
- "500": 500,
35
- "600": 600,
36
- "700": 700,
37
- },
38
- },
39
- };
40
-
41
- // https://type-scale.com
42
- // Major Third
43
- // base: 16
44
- const typeScale = {
45
- s: 12.8,
46
- m: 16,
47
- l: 20,
48
- xl: 25,
49
- };
50
-
51
- interface Props {
52
- id: FontFamilyId;
53
- leading: number;
54
- size: number;
55
- }
56
-
57
- function calcFontCss({ id, leading, size }: Props) {
58
- return style([
59
- createTextStyle({
60
- fontMetrics: fonts[id].metrics,
61
- fontSize: size,
62
- leading,
63
- }),
64
- {
65
- fontFamily: `"${fonts[id].name}", ${fonts[id].fallback}`,
66
- },
67
- ]);
68
- }
69
-
70
- export const fontStyles = {
71
- INTER_SMALL: calcFontCss({
72
- id: "INTER",
73
- leading: 16.5,
74
- size: typeScale.s,
75
- }),
76
- INTER_MED: calcFontCss({
77
- id: "INTER",
78
- leading: 21,
79
- size: typeScale.m,
80
- }),
81
- INTER_LARGE: calcFontCss({
82
- id: "INTER",
83
- leading: 25,
84
- size: typeScale.l,
85
- }),
86
- INTER_XLARGE: calcFontCss({
87
- id: "INTER",
88
- leading: 32,
89
- size: typeScale.xl,
90
- }),
91
- };