@redis-ui/styles 21.28.0 → 21.30.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/dist/index.js +4920 -4854
- package/dist/index.umd.cjs +11 -11
- package/dist/themes/themeDark/theme/components/input.js +15 -1
- package/dist/themes/themeDarkNext/theme/components/chip.js +37 -50
- package/dist/themes/themeDarkNext/theme/components/input.js +15 -1
- package/dist/themes/themeLight/theme/components/input.js +15 -1
- package/dist/themes/themeLightNext/theme/components/chip.js +37 -50
- package/dist/themes/themeLightNext/theme/components/input.js +15 -1
- package/dist/themes/types/theme/components/chip.types.d.ts +8 -0
- package/dist/themes/types/theme/components/input.types.d.ts +11 -1
- package/package.json +1 -1
|
@@ -9,6 +9,10 @@ const theme = {
|
|
|
9
9
|
resetButton: {
|
|
10
10
|
iconColor: tokens.semantic.color.icon.secondary200
|
|
11
11
|
},
|
|
12
|
+
copyButton: {
|
|
13
|
+
iconSize: '1.4rem',
|
|
14
|
+
hoverIconColor: tokens.semantic.color.text.secondary200
|
|
15
|
+
},
|
|
12
16
|
indicator: {
|
|
13
17
|
errorTooltipTextColor: tokens.semantic.color.text.secondary50,
|
|
14
18
|
errorIconColor: tokens.semantic.color.icon.danger400,
|
|
@@ -54,6 +58,10 @@ const theme = {
|
|
|
54
58
|
bgColor: 'transparent',
|
|
55
59
|
textColor: tokens.semantic.color.text.secondary200,
|
|
56
60
|
borderColor: 'transparent'
|
|
61
|
+
},
|
|
62
|
+
boxedReadonly: {
|
|
63
|
+
bgColor: tokens.semantic.color.background.secondary990,
|
|
64
|
+
textColor: tokens.semantic.color.text.secondary400
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
67
|
textarea: {
|
|
@@ -65,7 +73,13 @@ const theme = {
|
|
|
65
73
|
minHeight: '3.6rem',
|
|
66
74
|
maxHeight: '8rem'
|
|
67
75
|
},
|
|
68
|
-
indicatorMargin: '0.8rem 0.9rem auto auto'
|
|
76
|
+
indicatorMargin: '0.8rem 0.9rem auto auto',
|
|
77
|
+
copyButton: {
|
|
78
|
+
inset: '1.1rem 0.9rem auto auto',
|
|
79
|
+
statusInset: '1.1rem 3.7rem auto auto',
|
|
80
|
+
padding: '0.8rem 3.1rem 0.8rem 1rem',
|
|
81
|
+
statusPadding: '0.8rem 5.9rem 0.8rem 1rem'
|
|
82
|
+
}
|
|
69
83
|
},
|
|
70
84
|
search: {
|
|
71
85
|
iconColor: tokens.semantic.color.icon.secondary200,
|
|
@@ -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
|
};
|
|
@@ -9,6 +9,10 @@ const theme = {
|
|
|
9
9
|
resetButton: {
|
|
10
10
|
iconColor: tokens.semantic.color.icon.secondary400
|
|
11
11
|
},
|
|
12
|
+
copyButton: {
|
|
13
|
+
iconSize: '1.4rem',
|
|
14
|
+
hoverIconColor: tokens.semantic.color.text.secondary0
|
|
15
|
+
},
|
|
12
16
|
indicator: {
|
|
13
17
|
errorTooltipTextColor: tokens.semantic.color.text.primary300,
|
|
14
18
|
errorIconColor: tokens.semantic.color.icon.primary300,
|
|
@@ -57,6 +61,10 @@ const theme = {
|
|
|
57
61
|
bgColor: 'transparent',
|
|
58
62
|
textColor: tokens.semantic.color.text.secondary0,
|
|
59
63
|
borderColor: 'transparent'
|
|
64
|
+
},
|
|
65
|
+
boxedReadonly: {
|
|
66
|
+
bgColor: tokens.semantic.color.background.secondary990,
|
|
67
|
+
textColor: tokens.semantic.color.text.secondary300
|
|
60
68
|
}
|
|
61
69
|
},
|
|
62
70
|
textarea: {
|
|
@@ -68,7 +76,13 @@ const theme = {
|
|
|
68
76
|
minHeight: '3.6rem',
|
|
69
77
|
maxHeight: '8rem'
|
|
70
78
|
},
|
|
71
|
-
indicatorMargin: '0.8rem 0.9rem auto auto'
|
|
79
|
+
indicatorMargin: '0.8rem 0.9rem auto auto',
|
|
80
|
+
copyButton: {
|
|
81
|
+
inset: '1.1rem 0.9rem auto auto',
|
|
82
|
+
statusInset: '1.1rem 3.7rem auto auto',
|
|
83
|
+
padding: '0.8rem 3.1rem 0.8rem 1rem',
|
|
84
|
+
statusPadding: '0.8rem 5.9rem 0.8rem 1rem'
|
|
85
|
+
}
|
|
72
86
|
},
|
|
73
87
|
search: {
|
|
74
88
|
iconColor: tokens.semantic.color.icon.secondary400,
|
|
@@ -9,6 +9,10 @@ const theme = {
|
|
|
9
9
|
resetButton: {
|
|
10
10
|
iconColor: tokens.semantic.color.icon.secondary950
|
|
11
11
|
},
|
|
12
|
+
copyButton: {
|
|
13
|
+
iconSize: '1.4rem',
|
|
14
|
+
hoverIconColor: tokens.semantic.color.text.secondary950
|
|
15
|
+
},
|
|
12
16
|
indicator: {
|
|
13
17
|
errorTooltipTextColor: tokens.semantic.color.text.danger500,
|
|
14
18
|
errorIconColor: tokens.semantic.color.icon.danger500,
|
|
@@ -54,6 +58,10 @@ const theme = {
|
|
|
54
58
|
bgColor: 'transparent',
|
|
55
59
|
textColor: tokens.semantic.color.text.secondary950,
|
|
56
60
|
borderColor: 'transparent'
|
|
61
|
+
},
|
|
62
|
+
boxedReadonly: {
|
|
63
|
+
bgColor: tokens.semantic.color.background.secondary100,
|
|
64
|
+
textColor: tokens.semantic.color.text.secondary700
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
67
|
textarea: {
|
|
@@ -65,7 +73,13 @@ const theme = {
|
|
|
65
73
|
minHeight: '3.6rem',
|
|
66
74
|
maxHeight: '8rem'
|
|
67
75
|
},
|
|
68
|
-
indicatorMargin: '0.8rem 0.9rem auto auto'
|
|
76
|
+
indicatorMargin: '0.8rem 0.9rem auto auto',
|
|
77
|
+
copyButton: {
|
|
78
|
+
inset: '1.1rem 0.9rem auto auto',
|
|
79
|
+
statusInset: '1.1rem 3.7rem auto auto',
|
|
80
|
+
padding: '0.8rem 3.1rem 0.8rem 1rem',
|
|
81
|
+
statusPadding: '0.8rem 5.9rem 0.8rem 1rem'
|
|
82
|
+
}
|
|
69
83
|
},
|
|
70
84
|
search: {
|
|
71
85
|
iconColor: tokens.semantic.color.icon.secondary950,
|
|
@@ -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
|
};
|
|
@@ -9,6 +9,10 @@ const theme = {
|
|
|
9
9
|
resetButton: {
|
|
10
10
|
iconColor: tokens.semantic.color.icon.secondary500
|
|
11
11
|
},
|
|
12
|
+
copyButton: {
|
|
13
|
+
iconSize: '1.4rem',
|
|
14
|
+
hoverIconColor: tokens.semantic.color.text.secondary950
|
|
15
|
+
},
|
|
12
16
|
indicator: {
|
|
13
17
|
errorTooltipTextColor: tokens.semantic.color.text.danger500,
|
|
14
18
|
errorIconColor: tokens.semantic.color.icon.danger500,
|
|
@@ -57,6 +61,10 @@ const theme = {
|
|
|
57
61
|
bgColor: 'transparent',
|
|
58
62
|
textColor: tokens.semantic.color.text.secondary950,
|
|
59
63
|
borderColor: 'transparent'
|
|
64
|
+
},
|
|
65
|
+
boxedReadonly: {
|
|
66
|
+
bgColor: tokens.semantic.color.background.secondary50,
|
|
67
|
+
textColor: tokens.semantic.color.text.secondary700
|
|
60
68
|
}
|
|
61
69
|
},
|
|
62
70
|
textarea: {
|
|
@@ -68,7 +76,13 @@ const theme = {
|
|
|
68
76
|
minHeight: '3.6rem',
|
|
69
77
|
maxHeight: '8rem'
|
|
70
78
|
},
|
|
71
|
-
indicatorMargin: '0.8rem 0.9rem auto auto'
|
|
79
|
+
indicatorMargin: '0.8rem 0.9rem auto auto',
|
|
80
|
+
copyButton: {
|
|
81
|
+
inset: '1.1rem 0.9rem auto auto',
|
|
82
|
+
statusInset: '1.1rem 3.7rem auto auto',
|
|
83
|
+
padding: '0.8rem 3.1rem 0.8rem 1rem',
|
|
84
|
+
statusPadding: '0.8rem 5.9rem 0.8rem 1rem'
|
|
85
|
+
}
|
|
72
86
|
},
|
|
73
87
|
search: {
|
|
74
88
|
iconColor: tokens.semantic.color.icon.secondary500,
|
|
@@ -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
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LoaderSize } from './loader.types';
|
|
2
2
|
type InputVariant = 'outline' | 'underline';
|
|
3
|
-
type InputState = 'normal' | 'focused' | 'disabled' | 'error' | 'success' | 'readonly';
|
|
3
|
+
type InputState = 'normal' | 'focused' | 'disabled' | 'error' | 'success' | 'readonly' | 'boxedReadonly';
|
|
4
4
|
type InputStateColors = {
|
|
5
5
|
bgColor?: string;
|
|
6
6
|
textColor?: string;
|
|
@@ -16,6 +16,10 @@ export type InputTheme = {
|
|
|
16
16
|
resetButton: {
|
|
17
17
|
iconColor: string;
|
|
18
18
|
};
|
|
19
|
+
copyButton: {
|
|
20
|
+
iconSize: string;
|
|
21
|
+
hoverIconColor: string;
|
|
22
|
+
};
|
|
19
23
|
indicator: {
|
|
20
24
|
errorTooltipTextColor: string;
|
|
21
25
|
errorIconColor: string;
|
|
@@ -45,6 +49,12 @@ export type InputTheme = {
|
|
|
45
49
|
maxHeight: string;
|
|
46
50
|
};
|
|
47
51
|
indicatorMargin: string;
|
|
52
|
+
copyButton: {
|
|
53
|
+
inset: string;
|
|
54
|
+
statusInset: string;
|
|
55
|
+
padding: string;
|
|
56
|
+
statusPadding: string;
|
|
57
|
+
};
|
|
48
58
|
};
|
|
49
59
|
search: {
|
|
50
60
|
iconColor: string;
|