@redis-ui/styles 21.3.0 → 21.5.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.
@@ -41,6 +41,19 @@ const theme = {
41
41
  tableHeaderCell: {
42
42
  padding: '1rem 1.2rem',
43
43
  color: tokens.semantic.color.text.secondary200,
44
+ activeColor: tokens.semantic.color.text.secondary200,
45
+ contentMinHeight: '35px',
46
+ typography: {
47
+ fontFamily: tokens.core.font.fontFamily.regular,
48
+ fontSize: tokens.core.font.fontSize.s14,
49
+ fontWeight: tokens.core.font.fontWeight.semiBold,
50
+ letterSpacing: 'inherit',
51
+ textTransform: 'inherit'
52
+ },
53
+ sortIndicator: {
54
+ variant: 'arrow',
55
+ size: 'S'
56
+ },
44
57
  separator: {
45
58
  color: tokens.semantic.color.border.secondary800,
46
59
  width: '1px',
@@ -1,5 +1,6 @@
1
1
  import { tokens } from '../../tokens';
2
- import icon from '../assets/Moon.svg';
2
+ import sunIcon from '../assets/Sun.svg';
3
+ import moonIcon from '../assets/Moon.svg';
3
4
  const theme = {
4
5
  width: '3.6rem',
5
6
  height: '2.2rem',
@@ -9,10 +10,14 @@ const theme = {
9
10
  borderColor: tokens.semantic.color.border.transparent,
10
11
  bgColor: tokens.semantic.color.background.secondary700,
11
12
  thumb: {
12
- icon: `url("${icon}")`,
13
+ icon: `url("${moonIcon}")`,
13
14
  iconAspectRatio: '1/1',
14
15
  borderRadius: '0',
15
16
  bgColor: 'transparent'
17
+ },
18
+ modeIcon: {
19
+ light: `url("${sunIcon}")`,
20
+ dark: `url("${moonIcon}")`
16
21
  }
17
22
  };
18
23
  export default theme;
@@ -4,7 +4,7 @@ const theme = {
4
4
  tableContainer: {
5
5
  borderRadius: '0.8rem',
6
6
  backgroundColor: tokens.semantic.color.background.secondary950,
7
- boxShadow: `0px 0px 0px 1px ${tokens.semantic.color.border.secondary800}`
7
+ boxShadow: `0px 0px 0px 1px ${tokens.semantic.color.border.secondary700}`
8
8
  },
9
9
  topBar: {
10
10
  minHeight: '5.6rem',
@@ -12,7 +12,7 @@ const theme = {
12
12
  gap: '0 1.6rem',
13
13
  bgColor: tokens.semantic.color.background.transparent,
14
14
  separator: {
15
- color: tokens.semantic.color.border.secondary800,
15
+ color: tokens.semantic.color.border.secondary700,
16
16
  width: '1px'
17
17
  }
18
18
  },
@@ -22,55 +22,69 @@ const theme = {
22
22
  gap: '0 1.2rem',
23
23
  bgColor: tokens.semantic.color.background.transparent,
24
24
  separator: {
25
- color: tokens.semantic.color.border.secondary800,
25
+ color: tokens.semantic.color.border.secondary700,
26
26
  width: '1px'
27
27
  }
28
28
  },
29
29
  tableTh: {
30
- color: tokens.semantic.color.text.secondary200,
31
- borderRight: tokens.semantic.color.border.secondary800
30
+ color: tokens.semantic.color.text.secondary400,
31
+ borderRight: tokens.semantic.color.border.secondary700
32
32
  },
33
33
  tableHeaderRow: {
34
- minHeight: '5.6rem',
35
- bgColor: tokens.semantic.color.background.secondary950,
34
+ minHeight: '4.4rem',
35
+ bgColor: tokens.semantic.color.background.secondary900,
36
36
  separator: {
37
- color: tokens.semantic.color.border.secondary800,
37
+ color: tokens.semantic.color.border.secondary700,
38
38
  width: '1px'
39
39
  }
40
40
  },
41
41
  tableHeaderCell: {
42
- padding: '1rem 1.2rem',
43
- color: tokens.semantic.color.text.secondary200,
42
+ padding: '1rem 1.6rem',
43
+ color: tokens.semantic.color.text.secondary400,
44
+ activeColor: tokens.semantic.color.text.secondary200,
45
+ contentMinHeight: '2.4rem',
46
+ typography: {
47
+ fontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
48
+ fontSize: tokens.core.font.fontSize.s10,
49
+ fontWeight: tokens.core.font.fontWeight.normal,
50
+ letterSpacing: '0.1em',
51
+ textTransform: 'uppercase'
52
+ },
53
+ sortIndicator: {
54
+ variant: 'caret',
55
+ size: 'XS'
56
+ },
44
57
  separator: {
45
- color: tokens.semantic.color.border.secondary800,
46
- width: '1px',
58
+ color: tokens.semantic.color.border.secondary700,
59
+ width: '0',
47
60
  blockPadding: '1rem'
48
61
  }
49
62
  },
50
63
  tableBodyRow: {
51
- minHeight: '4.8rem',
64
+ minHeight: '4.4rem',
52
65
  separator: {
53
- color: tokens.semantic.color.border.secondary800,
66
+ color: tokens.semantic.color.border.secondary700,
54
67
  width: '1px'
55
68
  },
56
- borderTop: tokens.semantic.color.border.secondary800,
57
- backgroundColor: tokens.semantic.color.background.secondary900,
58
- hoverBoxShadow: tokens.core.shadow.shadow300
69
+ borderTop: tokens.semantic.color.border.secondary700,
70
+ backgroundColor: tokens.semantic.color.background.transparent,
71
+ hoverBoxShadow: 'none',
72
+ hoverBackgroundColor: tokens.semantic.color.background.secondary900
59
73
  },
60
74
  tableBodyCell: {
61
- padding: '0.4rem 1.2rem',
75
+ padding: '1.2rem 1.6rem',
62
76
  color: tokens.semantic.color.text.secondary200
63
77
  }
64
78
  },
65
79
  pagination: {
66
80
  bar: {
67
- borderColor: tokens.semantic.color.border.secondary800,
81
+ borderColor: tokens.semantic.color.border.secondary700,
68
82
  borderSize: '1px 0 0',
69
83
  gap: '3.2rem',
70
84
  height: '4rem',
71
85
  padding: '0 1.2rem',
72
86
  fontSize: '1.2rem',
73
- textColor: tokens.semantic.color.text.secondary700
87
+ textColor: tokens.semantic.color.text.secondary300
74
88
  },
75
89
  navButton: {
76
90
  color: tokens.semantic.color.text.secondary200,
@@ -1,5 +1,6 @@
1
1
  import { tokens } from '../../tokens';
2
- import icon from '../assets/Moon.svg';
2
+ import sunIcon from '../assets/Sun.svg';
3
+ import moonIcon from '../assets/Moon.svg';
3
4
  const theme = {
4
5
  width: '3.6rem',
5
6
  height: '2.2rem',
@@ -9,10 +10,14 @@ const theme = {
9
10
  borderColor: tokens.semantic.color.border.transparent,
10
11
  bgColor: tokens.semantic.color.background.secondary700,
11
12
  thumb: {
12
- icon: `url("${icon}")`,
13
+ icon: `url("${moonIcon}")`,
13
14
  iconAspectRatio: '1/1',
14
15
  borderRadius: '0',
15
16
  bgColor: 'transparent'
17
+ },
18
+ modeIcon: {
19
+ light: `url("${sunIcon}")`,
20
+ dark: `url("${moonIcon}")`
16
21
  }
17
22
  };
18
23
  export default theme;
@@ -41,6 +41,19 @@ const theme = {
41
41
  tableHeaderCell: {
42
42
  padding: '1rem 1.2rem',
43
43
  color: tokens.semantic.color.text.secondary950,
44
+ activeColor: tokens.semantic.color.text.secondary950,
45
+ contentMinHeight: '35px',
46
+ typography: {
47
+ fontFamily: tokens.core.font.fontFamily.regular,
48
+ fontSize: tokens.core.font.fontSize.s14,
49
+ fontWeight: tokens.core.font.fontWeight.semiBold,
50
+ letterSpacing: 'inherit',
51
+ textTransform: 'inherit'
52
+ },
53
+ sortIndicator: {
54
+ variant: 'arrow',
55
+ size: 'S'
56
+ },
44
57
  separator: {
45
58
  color: tokens.semantic.color.border.secondary300,
46
59
  width: '1px',
@@ -1,5 +1,6 @@
1
1
  import { tokens } from '../../tokens';
2
- import icon from '../assets/Sun.svg';
2
+ import sunIcon from '../assets/Sun.svg';
3
+ import moonIcon from '../assets/Moon.svg';
3
4
  const theme = {
4
5
  width: '3.6rem',
5
6
  height: '2.2rem',
@@ -9,10 +10,14 @@ const theme = {
9
10
  borderColor: tokens.semantic.color.border.transparent,
10
11
  bgColor: tokens.semantic.color.background.secondary200,
11
12
  thumb: {
12
- icon: `url("${icon}")`,
13
+ icon: `url("${sunIcon}")`,
13
14
  iconAspectRatio: '1/1',
14
15
  borderRadius: '0',
15
16
  bgColor: 'transparent'
17
+ },
18
+ modeIcon: {
19
+ light: `url("${sunIcon}")`,
20
+ dark: `url("${moonIcon}")`
16
21
  }
17
22
  };
18
23
  export default theme;
@@ -4,7 +4,7 @@ const theme = {
4
4
  tableContainer: {
5
5
  borderRadius: '0.8rem',
6
6
  backgroundColor: tokens.semantic.color.background.secondary0,
7
- boxShadow: `0px 0px 0px 1px ${tokens.semantic.color.border.secondary300}`
7
+ boxShadow: `0px 0px 0px 1px ${tokens.semantic.color.border.secondary200}`
8
8
  },
9
9
  topBar: {
10
10
  minHeight: '5.6rem',
@@ -12,7 +12,7 @@ const theme = {
12
12
  gap: '0 1.6rem',
13
13
  bgColor: tokens.semantic.color.background.transparent,
14
14
  separator: {
15
- color: tokens.semantic.color.border.secondary300,
15
+ color: tokens.semantic.color.border.secondary200,
16
16
  width: '1px'
17
17
  }
18
18
  },
@@ -22,49 +22,63 @@ const theme = {
22
22
  gap: '0 1.2rem',
23
23
  bgColor: tokens.semantic.color.background.transparent,
24
24
  separator: {
25
- color: tokens.semantic.color.border.secondary300,
25
+ color: tokens.semantic.color.border.secondary200,
26
26
  width: '1px'
27
27
  }
28
28
  },
29
29
  tableTh: {
30
- color: tokens.semantic.color.text.secondary950,
31
- borderRight: tokens.semantic.color.border.secondary300
30
+ color: tokens.semantic.color.text.secondary500,
31
+ borderRight: tokens.semantic.color.border.secondary200
32
32
  },
33
33
  tableHeaderRow: {
34
- minHeight: '5.6rem',
35
- bgColor: tokens.semantic.color.background.secondary0,
34
+ minHeight: '4.4rem',
35
+ bgColor: tokens.semantic.color.background.neutral100,
36
36
  separator: {
37
- color: tokens.semantic.color.border.secondary300,
37
+ color: tokens.semantic.color.border.secondary200,
38
38
  width: '1px'
39
39
  }
40
40
  },
41
41
  tableHeaderCell: {
42
- padding: '1rem 1.2rem',
43
- color: tokens.semantic.color.text.secondary950,
42
+ padding: '1rem 1.6rem',
43
+ color: tokens.semantic.color.text.secondary500,
44
+ activeColor: tokens.semantic.color.text.secondary950,
45
+ contentMinHeight: '2.4rem',
46
+ typography: {
47
+ fontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
48
+ fontSize: tokens.core.font.fontSize.s10,
49
+ fontWeight: tokens.core.font.fontWeight.normal,
50
+ letterSpacing: '0.1em',
51
+ textTransform: 'uppercase'
52
+ },
53
+ sortIndicator: {
54
+ variant: 'caret',
55
+ size: 'XS'
56
+ },
44
57
  separator: {
45
- color: tokens.semantic.color.border.secondary300,
46
- width: '1px',
58
+ color: tokens.semantic.color.border.secondary200,
59
+ width: '0',
47
60
  blockPadding: '1rem'
48
61
  }
49
62
  },
50
63
  tableBodyRow: {
51
- minHeight: '4.8rem',
64
+ minHeight: '4.4rem',
52
65
  separator: {
53
- color: tokens.semantic.color.border.secondary300,
66
+ color: tokens.semantic.color.border.secondary200,
54
67
  width: '1px'
55
68
  },
56
- borderTop: tokens.semantic.color.border.secondary300,
57
- backgroundColor: tokens.semantic.color.background.secondary50,
58
- hoverBoxShadow: tokens.core.shadow.shadow300
69
+ borderTop: tokens.semantic.color.border.secondary200,
70
+ backgroundColor: tokens.semantic.color.background.transparent,
71
+ hoverBoxShadow: 'none',
72
+ hoverBackgroundColor: tokens.semantic.color.background.neutral100
59
73
  },
60
74
  tableBodyCell: {
61
- padding: '0.4rem 1.2rem',
75
+ padding: '1.2rem 1.6rem',
62
76
  color: tokens.semantic.color.text.secondary950
63
77
  }
64
78
  },
65
79
  pagination: {
66
80
  bar: {
67
- borderColor: tokens.semantic.color.border.secondary300,
81
+ borderColor: tokens.semantic.color.border.secondary200,
68
82
  borderSize: '1px 0 0',
69
83
  gap: '3.2rem',
70
84
  height: '4rem',
@@ -1,5 +1,6 @@
1
1
  import { tokens } from '../../tokens';
2
- import icon from '../assets/Sun.svg';
2
+ import sunIcon from '../assets/Sun.svg';
3
+ import moonIcon from '../assets/Moon.svg';
3
4
  const theme = {
4
5
  width: '3.6rem',
5
6
  height: '2.2rem',
@@ -9,10 +10,14 @@ const theme = {
9
10
  borderColor: tokens.semantic.color.border.transparent,
10
11
  bgColor: tokens.semantic.color.background.secondary200,
11
12
  thumb: {
12
- icon: `url("${icon}")`,
13
+ icon: `url("${sunIcon}")`,
13
14
  iconAspectRatio: '1/1',
14
15
  borderRadius: '0',
15
16
  bgColor: 'transparent'
17
+ },
18
+ modeIcon: {
19
+ light: `url("${sunIcon}")`,
20
+ dark: `url("${moonIcon}")`
16
21
  }
17
22
  };
18
23
  export default theme;
@@ -1,3 +1,5 @@
1
+ import { IconSizeType } from './global.types';
2
+ export type TableSortIndicatorVariant = 'arrow' | 'caret';
1
3
  export type TableTheme = {
2
4
  table: {
3
5
  tableContainer: {
@@ -36,6 +38,19 @@ export type TableTheme = {
36
38
  tableHeaderCell: {
37
39
  padding: string;
38
40
  color: string;
41
+ activeColor: string;
42
+ contentMinHeight: string;
43
+ typography: {
44
+ fontFamily: string;
45
+ fontSize: string;
46
+ fontWeight: string;
47
+ letterSpacing: string;
48
+ textTransform: string;
49
+ };
50
+ sortIndicator: {
51
+ variant: TableSortIndicatorVariant;
52
+ size: IconSizeType;
53
+ };
39
54
  separator: {
40
55
  color: string;
41
56
  width: string;
@@ -57,6 +72,7 @@ export type TableTheme = {
57
72
  };
58
73
  backgroundColor: string;
59
74
  hoverBoxShadow: string;
75
+ hoverBackgroundColor?: string;
60
76
  };
61
77
  tableBodyCell: {
62
78
  padding: string;
@@ -12,4 +12,9 @@ export type ThemeModeSwitchTheme = {
12
12
  borderRadius: string;
13
13
  bgColor: string;
14
14
  };
15
+ /** Icon standing for each theme mode, for controls that show a mode other than the active one. */
16
+ modeIcon: {
17
+ light: string;
18
+ dark: string;
19
+ };
15
20
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/styles",
3
3
  "license": "UNLICENSED",
4
- "version": "21.3.0",
4
+ "version": "21.5.0",
5
5
  "repository": "git@github.com:redislabsdev/redis-ui.git",
6
6
  "type": "module",
7
7
  "files": [