@redis-ui/styles 21.29.0 → 21.30.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/index.js +4872 -4862
- package/dist/index.umd.cjs +11 -11
- package/dist/themes/themeDarkNext/theme/components/chip.js +37 -50
- package/dist/themes/themeDarkNext/theme/components/sideBar.js +2 -2
- package/dist/themes/themeLightNext/theme/components/chip.js +37 -50
- package/dist/themes/themeLightNext/theme/components/sideBar.js +2 -2
- package/dist/themes/types/theme/components/chip.types.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,63 +1,50 @@
|
|
|
1
|
+
import { withOpacity } from '../../../../utils';
|
|
1
2
|
import { tokens } from '../../tokens';
|
|
3
|
+
const tagColor = tokens.semantic.color.text.secondary300;
|
|
4
|
+
const { secondary0 } = tokens.semantic.color.text;
|
|
5
|
+
const normal = {
|
|
6
|
+
bgColor: withOpacity(tagColor, 0.08),
|
|
7
|
+
textColor: tagColor,
|
|
8
|
+
borderColor: tokens.semantic.color.border.secondary700
|
|
9
|
+
};
|
|
10
|
+
const disabled = {
|
|
11
|
+
bgColor: tokens.semantic.color.background.secondary900,
|
|
12
|
+
textColor: tokens.semantic.color.text.secondary400,
|
|
13
|
+
borderColor: tokens.semantic.color.border.secondary700
|
|
14
|
+
};
|
|
15
|
+
const size = {
|
|
16
|
+
padding: '0 0.9rem',
|
|
17
|
+
borderRadius: '0.4rem',
|
|
18
|
+
gap: '0.6rem'
|
|
19
|
+
};
|
|
20
|
+
const closeButtonVariant = {
|
|
21
|
+
color: tagColor,
|
|
22
|
+
hoverColor: secondary0,
|
|
23
|
+
hoverBgColor: withOpacity(secondary0, 0.14)
|
|
24
|
+
};
|
|
25
|
+
const closeButtonSize = {
|
|
26
|
+
borderRadius: '100%',
|
|
27
|
+
margin: '0 -0.4rem 0 0'
|
|
28
|
+
};
|
|
2
29
|
const theme = {
|
|
30
|
+
fontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
3
31
|
sizes: {
|
|
4
|
-
M: {
|
|
5
|
-
|
|
6
|
-
padding: '0.4rem 0.6rem',
|
|
7
|
-
borderRadius: '4px',
|
|
8
|
-
gap: '0.5rem'
|
|
9
|
-
},
|
|
10
|
-
S: {
|
|
11
|
-
height: '2.4rem',
|
|
12
|
-
padding: '0.4rem 0.6rem',
|
|
13
|
-
borderRadius: '4px',
|
|
14
|
-
gap: '0.5rem'
|
|
15
|
-
}
|
|
32
|
+
M: { ...size, height: '2.4rem', fontSize: '1.3rem' },
|
|
33
|
+
S: { ...size, height: '2rem', fontSize: '1.2rem' }
|
|
16
34
|
},
|
|
17
35
|
variant: {
|
|
18
|
-
regular: {
|
|
19
|
-
|
|
20
|
-
bgColor: tokens.semantic.color.background.secondary900,
|
|
21
|
-
textColor: tokens.semantic.color.text.secondary0,
|
|
22
|
-
borderColor: tokens.semantic.color.border.secondary700
|
|
23
|
-
},
|
|
24
|
-
disabled: {
|
|
25
|
-
bgColor: tokens.semantic.color.background.secondary700,
|
|
26
|
-
textColor: tokens.semantic.color.text.secondary400,
|
|
27
|
-
borderColor: tokens.semantic.color.border.secondary700
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
flat: {
|
|
31
|
-
normal: {
|
|
32
|
-
bgColor: tokens.semantic.color.background.secondary900,
|
|
33
|
-
textColor: tokens.semantic.color.text.secondary0,
|
|
34
|
-
borderColor: tokens.semantic.color.border.secondary700
|
|
35
|
-
},
|
|
36
|
-
disabled: {
|
|
37
|
-
bgColor: tokens.semantic.color.background.secondary700,
|
|
38
|
-
textColor: tokens.semantic.color.text.secondary400,
|
|
39
|
-
borderColor: tokens.semantic.color.border.secondary700
|
|
40
|
-
}
|
|
41
|
-
}
|
|
36
|
+
regular: { normal, disabled },
|
|
37
|
+
flat: { normal, disabled }
|
|
42
38
|
},
|
|
43
39
|
closeButton: {
|
|
40
|
+
glyph: 'cross',
|
|
44
41
|
variant: {
|
|
45
|
-
regular:
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
flat: {
|
|
49
|
-
color: tokens.semantic.color.text.secondary400
|
|
50
|
-
}
|
|
42
|
+
regular: closeButtonVariant,
|
|
43
|
+
flat: closeButtonVariant
|
|
51
44
|
},
|
|
52
45
|
size: {
|
|
53
|
-
M: {
|
|
54
|
-
|
|
55
|
-
borderRadius: '100%'
|
|
56
|
-
},
|
|
57
|
-
S: {
|
|
58
|
-
size: '1.6rem',
|
|
59
|
-
borderRadius: '100%'
|
|
60
|
-
}
|
|
46
|
+
M: { ...closeButtonSize, size: '1.6rem', iconSize: '1.4rem' },
|
|
47
|
+
S: { ...closeButtonSize, size: '1.4rem', iconSize: '1.2rem' }
|
|
61
48
|
}
|
|
62
49
|
}
|
|
63
50
|
};
|
|
@@ -54,9 +54,9 @@ const theme = {
|
|
|
54
54
|
labelColor: tokens.semantic.color.text.secondary0
|
|
55
55
|
},
|
|
56
56
|
hover: {
|
|
57
|
-
textColor: tokens.semantic.color.text.
|
|
57
|
+
textColor: tokens.semantic.color.text.primary400,
|
|
58
58
|
bgColor: tokens.semantic.color.background.secondary900,
|
|
59
|
-
labelColor: tokens.semantic.color.text.
|
|
59
|
+
labelColor: tokens.semantic.color.text.primary400
|
|
60
60
|
},
|
|
61
61
|
active: {
|
|
62
62
|
textColor: tokens.semantic.color.text.primary400,
|
|
@@ -1,63 +1,50 @@
|
|
|
1
|
+
import { withOpacity } from '../../../../utils';
|
|
1
2
|
import { tokens } from '../../tokens';
|
|
3
|
+
const tagColor = '#4F626B';
|
|
4
|
+
const { secondary950 } = tokens.semantic.color.text;
|
|
5
|
+
const normal = {
|
|
6
|
+
bgColor: withOpacity(tagColor, 0.08),
|
|
7
|
+
textColor: tagColor,
|
|
8
|
+
borderColor: tokens.semantic.color.border.secondary200
|
|
9
|
+
};
|
|
10
|
+
const disabled = {
|
|
11
|
+
bgColor: tokens.semantic.color.background.neutral100,
|
|
12
|
+
textColor: tokens.semantic.color.text.secondary400,
|
|
13
|
+
borderColor: tokens.semantic.color.border.secondary200
|
|
14
|
+
};
|
|
15
|
+
const size = {
|
|
16
|
+
padding: '0 0.9rem',
|
|
17
|
+
borderRadius: '0.4rem',
|
|
18
|
+
gap: '0.6rem'
|
|
19
|
+
};
|
|
20
|
+
const closeButtonVariant = {
|
|
21
|
+
color: tagColor,
|
|
22
|
+
hoverColor: secondary950,
|
|
23
|
+
hoverBgColor: withOpacity(secondary950, 0.14)
|
|
24
|
+
};
|
|
25
|
+
const closeButtonSize = {
|
|
26
|
+
borderRadius: '100%',
|
|
27
|
+
margin: '0 -0.4rem 0 0'
|
|
28
|
+
};
|
|
2
29
|
const theme = {
|
|
30
|
+
fontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
3
31
|
sizes: {
|
|
4
|
-
M: {
|
|
5
|
-
|
|
6
|
-
padding: '0.4rem 0.6rem',
|
|
7
|
-
borderRadius: '4px',
|
|
8
|
-
gap: '0.5rem'
|
|
9
|
-
},
|
|
10
|
-
S: {
|
|
11
|
-
height: '2.4rem',
|
|
12
|
-
padding: '0.4rem 0.6rem',
|
|
13
|
-
borderRadius: '4px',
|
|
14
|
-
gap: '0.5rem'
|
|
15
|
-
}
|
|
32
|
+
M: { ...size, height: '2.4rem', fontSize: '1.3rem' },
|
|
33
|
+
S: { ...size, height: '2rem', fontSize: '1.2rem' }
|
|
16
34
|
},
|
|
17
35
|
variant: {
|
|
18
|
-
regular: {
|
|
19
|
-
|
|
20
|
-
bgColor: tokens.semantic.color.background.neutral100,
|
|
21
|
-
textColor: tokens.semantic.color.text.secondary950,
|
|
22
|
-
borderColor: tokens.semantic.color.border.secondary200
|
|
23
|
-
},
|
|
24
|
-
disabled: {
|
|
25
|
-
bgColor: tokens.semantic.color.background.secondary200,
|
|
26
|
-
textColor: tokens.semantic.color.text.secondary500,
|
|
27
|
-
borderColor: tokens.semantic.color.border.secondary200
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
flat: {
|
|
31
|
-
normal: {
|
|
32
|
-
bgColor: tokens.semantic.color.background.neutral100,
|
|
33
|
-
textColor: tokens.semantic.color.text.secondary950,
|
|
34
|
-
borderColor: tokens.semantic.color.border.secondary200
|
|
35
|
-
},
|
|
36
|
-
disabled: {
|
|
37
|
-
bgColor: tokens.semantic.color.background.secondary200,
|
|
38
|
-
textColor: tokens.semantic.color.text.secondary500,
|
|
39
|
-
borderColor: tokens.semantic.color.border.secondary200
|
|
40
|
-
}
|
|
41
|
-
}
|
|
36
|
+
regular: { normal, disabled },
|
|
37
|
+
flat: { normal, disabled }
|
|
42
38
|
},
|
|
43
39
|
closeButton: {
|
|
40
|
+
glyph: 'cross',
|
|
44
41
|
variant: {
|
|
45
|
-
regular:
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
flat: {
|
|
49
|
-
color: tokens.semantic.color.text.secondary500
|
|
50
|
-
}
|
|
42
|
+
regular: closeButtonVariant,
|
|
43
|
+
flat: closeButtonVariant
|
|
51
44
|
},
|
|
52
45
|
size: {
|
|
53
|
-
M: {
|
|
54
|
-
|
|
55
|
-
borderRadius: '100%'
|
|
56
|
-
},
|
|
57
|
-
S: {
|
|
58
|
-
size: '1.6rem',
|
|
59
|
-
borderRadius: '100%'
|
|
60
|
-
}
|
|
46
|
+
M: { ...closeButtonSize, size: '1.6rem', iconSize: '1.4rem' },
|
|
47
|
+
S: { ...closeButtonSize, size: '1.4rem', iconSize: '1.2rem' }
|
|
61
48
|
}
|
|
62
49
|
}
|
|
63
50
|
};
|
|
@@ -54,9 +54,9 @@ const theme = {
|
|
|
54
54
|
labelColor: tokens.semantic.color.text.secondary950
|
|
55
55
|
},
|
|
56
56
|
hover: {
|
|
57
|
-
textColor: tokens.semantic.color.text.
|
|
57
|
+
textColor: tokens.semantic.color.text.primary700,
|
|
58
58
|
bgColor: tokens.semantic.color.background.neutral100,
|
|
59
|
-
labelColor: tokens.semantic.color.text.
|
|
59
|
+
labelColor: tokens.semantic.color.text.primary700
|
|
60
60
|
},
|
|
61
61
|
active: {
|
|
62
62
|
textColor: tokens.semantic.color.text.primary700,
|
|
@@ -2,11 +2,13 @@ export type ChipSize = 'M' | 'S';
|
|
|
2
2
|
export type ChipVariant = 'regular' | 'flat';
|
|
3
3
|
export type ChipState = 'normal' | 'disabled';
|
|
4
4
|
export type ChipTheme = {
|
|
5
|
+
fontFamily?: string;
|
|
5
6
|
sizes: Record<ChipSize, {
|
|
6
7
|
height: string;
|
|
7
8
|
padding: string;
|
|
8
9
|
borderRadius: string;
|
|
9
10
|
gap: string;
|
|
11
|
+
fontSize?: string;
|
|
10
12
|
}>;
|
|
11
13
|
variant: Record<ChipVariant, Record<ChipState, {
|
|
12
14
|
bgColor: string;
|
|
@@ -14,12 +16,18 @@ export type ChipTheme = {
|
|
|
14
16
|
borderColor?: string;
|
|
15
17
|
}>>;
|
|
16
18
|
closeButton: {
|
|
19
|
+
/** `circle` is a filled circle with a cut-out cross, `cross` is a bare cross. Defaults to `circle`. */
|
|
20
|
+
glyph?: 'circle' | 'cross';
|
|
17
21
|
size: Record<ChipSize, {
|
|
18
22
|
size: string;
|
|
19
23
|
borderRadius: string;
|
|
24
|
+
iconSize?: string;
|
|
25
|
+
margin?: string;
|
|
20
26
|
}>;
|
|
21
27
|
variant: Record<ChipVariant, {
|
|
22
28
|
color: string;
|
|
29
|
+
hoverColor?: string;
|
|
30
|
+
hoverBgColor?: string;
|
|
23
31
|
}>;
|
|
24
32
|
};
|
|
25
33
|
};
|