@sproutsocial/racine 7.5.0 → 8.0.0-beta-dark-mode.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.
Files changed (171) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/__flow__/Badge/styles.js +1 -1
  3. package/__flow__/Banner/index.js +2 -1
  4. package/__flow__/Banner/styles.js +9 -6
  5. package/__flow__/Box/index.stories.js +3 -3
  6. package/__flow__/Box/styles.js +4 -4
  7. package/__flow__/Button/__snapshots__/index.test.js.snap +4 -4
  8. package/__flow__/Button/index.js +7 -2
  9. package/__flow__/Button/index.stories.js +6 -1
  10. package/__flow__/Button/styles.js +17 -12
  11. package/__flow__/Card/index.js +2 -2
  12. package/__flow__/CharacterCounter/styles.js +1 -1
  13. package/__flow__/Checkbox/styles.js +18 -16
  14. package/__flow__/Collapsible/index.stories.js +11 -5
  15. package/__flow__/DatePicker/styles.js +14 -12
  16. package/__flow__/Drawer/styles.js +1 -1
  17. package/__flow__/FormField/index.js +1 -1
  18. package/__flow__/Icon/index.stories.js +24 -6
  19. package/__flow__/Input/styles.js +6 -6
  20. package/__flow__/KeyboardKey/styles.js +2 -2
  21. package/__flow__/Link/styles.js +3 -5
  22. package/__flow__/Listbox/__snapshots__/index.test.js.snap +8 -2
  23. package/__flow__/Listbox/index.js +4 -4
  24. package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -2
  25. package/__flow__/Menu/index.js +7 -2
  26. package/__flow__/Menu/styles.js +6 -3
  27. package/__flow__/Message/index.js +2 -2
  28. package/__flow__/Message/index.stories.js +1 -1
  29. package/__flow__/Modal/index.js +1 -1
  30. package/__flow__/Modal/index.stories.js +14 -8
  31. package/__flow__/Modal/styles.js +2 -2
  32. package/__flow__/Numeral/styles.js +2 -1
  33. package/__flow__/OverflowList/index.stories.js +15 -8
  34. package/__flow__/Popout/index.js +3 -3
  35. package/__flow__/Radio/styles.js +8 -8
  36. package/__flow__/SegmentedControl/styles.js +9 -5
  37. package/__flow__/Select/styles.js +5 -5
  38. package/__flow__/Skeleton/index.js +4 -4
  39. package/__flow__/Skeleton/index.stories.js +1 -1
  40. package/__flow__/Stack/index.stories.js +3 -1
  41. package/__flow__/Switch/styles.js +13 -11
  42. package/__flow__/Table/styles.js +2 -1
  43. package/__flow__/TableCell/index.stories.js +2 -0
  44. package/__flow__/TableHeaderCell/index.stories.js +3 -0
  45. package/__flow__/TableRowAccordion/styles.js +2 -1
  46. package/__flow__/Tabs/styles.js +5 -5
  47. package/__flow__/Textarea/styles.js +5 -5
  48. package/__flow__/ThemeProvider/index.js +2 -2
  49. package/__flow__/Toast/index.js +1 -1
  50. package/__flow__/Toast/styles.js +3 -3
  51. package/__flow__/Token/styles.js +19 -8
  52. package/__flow__/TokenInput/index.js +2 -1
  53. package/__flow__/TokenInput/styles.js +14 -6
  54. package/__flow__/Tooltip/index.js +2 -2
  55. package/__flow__/index.js +2 -2
  56. package/__flow__/themes/dark/decorative-palettes.js +43 -0
  57. package/__flow__/themes/dark/theme.js +195 -0
  58. package/__flow__/themes/default/decorative-palettes.js +43 -0
  59. package/__flow__/themes/default/literal-colors.js +160 -0
  60. package/__flow__/themes/default/theme.js +334 -0
  61. package/__flow__/types/system-props.flow.js +2 -2
  62. package/__flow__/types/theme.colors.flow.js +244 -0
  63. package/__flow__/types/theme.flow.js +38 -213
  64. package/__flow__/utils/mixins.js +4 -3
  65. package/__flow__/utils/responsiveProps/index.js +1 -1
  66. package/commonjs/Badge/styles.js +1 -1
  67. package/commonjs/Banner/index.js +3 -2
  68. package/commonjs/Banner/styles.js +1 -1
  69. package/commonjs/Button/index.js +5 -3
  70. package/commonjs/Button/styles.js +12 -11
  71. package/commonjs/Card/index.js +2 -2
  72. package/commonjs/CharacterCounter/styles.js +1 -1
  73. package/commonjs/Checkbox/styles.js +7 -7
  74. package/commonjs/DatePicker/styles.js +13 -11
  75. package/commonjs/Drawer/styles.js +1 -1
  76. package/commonjs/FormField/index.js +1 -1
  77. package/commonjs/Input/styles.js +6 -6
  78. package/commonjs/KeyboardKey/styles.js +2 -2
  79. package/commonjs/Link/styles.js +4 -8
  80. package/commonjs/Listbox/index.js +4 -4
  81. package/commonjs/Menu/index.js +2 -2
  82. package/commonjs/Menu/styles.js +10 -4
  83. package/commonjs/Message/index.js +2 -2
  84. package/commonjs/Modal/index.js +1 -1
  85. package/commonjs/Modal/styles.js +2 -2
  86. package/commonjs/Numeral/styles.js +1 -1
  87. package/commonjs/Popout/index.js +2 -2
  88. package/commonjs/Radio/styles.js +4 -4
  89. package/commonjs/SegmentedControl/styles.js +5 -5
  90. package/commonjs/Select/styles.js +5 -5
  91. package/commonjs/Skeleton/index.js +2 -2
  92. package/commonjs/Switch/styles.js +7 -7
  93. package/commonjs/Table/styles.js +1 -1
  94. package/commonjs/TableRowAccordion/styles.js +1 -1
  95. package/commonjs/Tabs/styles.js +5 -5
  96. package/commonjs/Textarea/styles.js +5 -5
  97. package/commonjs/ThemeProvider/index.js +1 -1
  98. package/commonjs/Toast/index.js +1 -1
  99. package/commonjs/Toast/styles.js +3 -3
  100. package/commonjs/Token/styles.js +18 -10
  101. package/commonjs/TokenInput/index.js +38 -35
  102. package/commonjs/TokenInput/styles.js +9 -7
  103. package/commonjs/Tooltip/index.js +2 -2
  104. package/commonjs/index.js +3 -3
  105. package/commonjs/themes/dark/decorative-palettes.js +51 -0
  106. package/commonjs/themes/dark/theme.js +195 -0
  107. package/commonjs/themes/default/decorative-palettes.js +51 -0
  108. package/commonjs/themes/default/literal-colors.js +165 -0
  109. package/commonjs/themes/default/theme.js +333 -0
  110. package/commonjs/types/theme.colors.flow.js +5 -0
  111. package/commonjs/types/theme.flow.js +1 -5
  112. package/commonjs/utils/mixins.js +2 -2
  113. package/commonjs/utils/responsiveProps/index.js +1 -1
  114. package/lib/Badge/styles.js +1 -1
  115. package/lib/Banner/index.js +3 -2
  116. package/lib/Banner/styles.js +1 -1
  117. package/lib/Button/index.js +5 -3
  118. package/lib/Button/styles.js +11 -11
  119. package/lib/Card/index.js +2 -2
  120. package/lib/CharacterCounter/styles.js +1 -1
  121. package/lib/Checkbox/styles.js +7 -7
  122. package/lib/DatePicker/styles.js +12 -11
  123. package/lib/Drawer/styles.js +1 -1
  124. package/lib/FormField/index.js +1 -1
  125. package/lib/Input/styles.js +6 -6
  126. package/lib/KeyboardKey/styles.js +2 -2
  127. package/lib/Link/styles.js +4 -8
  128. package/lib/Listbox/index.js +4 -4
  129. package/lib/Menu/index.js +2 -2
  130. package/lib/Menu/styles.js +10 -4
  131. package/lib/Message/index.js +2 -2
  132. package/lib/Modal/index.js +1 -1
  133. package/lib/Modal/styles.js +2 -2
  134. package/lib/Numeral/styles.js +1 -1
  135. package/lib/Popout/index.js +2 -2
  136. package/lib/Radio/styles.js +4 -4
  137. package/lib/SegmentedControl/styles.js +5 -5
  138. package/lib/Select/styles.js +5 -5
  139. package/lib/Skeleton/index.js +2 -2
  140. package/lib/Switch/styles.js +7 -7
  141. package/lib/Table/styles.js +1 -1
  142. package/lib/TableRowAccordion/styles.js +1 -1
  143. package/lib/Tabs/styles.js +5 -5
  144. package/lib/Textarea/styles.js +5 -5
  145. package/lib/ThemeProvider/index.js +1 -1
  146. package/lib/Toast/index.js +1 -1
  147. package/lib/Toast/styles.js +3 -3
  148. package/lib/Token/styles.js +18 -10
  149. package/lib/TokenInput/index.js +38 -35
  150. package/lib/TokenInput/styles.js +9 -7
  151. package/lib/Tooltip/index.js +2 -2
  152. package/lib/index.js +2 -2
  153. package/lib/themes/dark/decorative-palettes.js +36 -0
  154. package/lib/themes/dark/theme.js +185 -0
  155. package/lib/themes/default/decorative-palettes.js +36 -0
  156. package/lib/themes/default/literal-colors.js +156 -0
  157. package/lib/themes/default/theme.js +305 -0
  158. package/lib/types/theme.colors.flow.js +1 -0
  159. package/lib/types/theme.flow.js +1 -1
  160. package/lib/utils/mixins.js +2 -2
  161. package/lib/utils/responsiveProps/index.js +1 -1
  162. package/package.json +1 -1
  163. package/__flow__/themes/dark.js +0 -133
  164. package/__flow__/themes/light.js +0 -7
  165. package/__flow__/utils/theme.js +0 -422
  166. package/commonjs/themes/dark.js +0 -140
  167. package/commonjs/themes/light.js +0 -14
  168. package/commonjs/utils/theme.js +0 -421
  169. package/lib/themes/dark.js +0 -131
  170. package/lib/themes/light.js +0 -5
  171. package/lib/utils/theme.js +0 -402
@@ -17,13 +17,13 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
17
17
  ${(props) => props.theme.space[200]};
18
18
  vertical-align: middle;
19
19
  appearance: none;
20
- background-color: ${(props) => props.theme.colors.background.container};
20
+ background-color: ${(props) => props.theme.colors.form.background.base};
21
21
  border-radius: 11px;
22
22
  outline: none;
23
23
  cursor: pointer;
24
24
  transition: background-color ${(props) => props.theme.duration.fast}
25
25
  ${(props) => props.theme.easing.ease_inout};
26
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
26
+ border: 1px solid ${(props) => props.theme.colors.form.border.base};
27
27
  white-space: nowrap;
28
28
  overflow: hidden;
29
29
 
@@ -33,7 +33,8 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
33
33
  left: 0;
34
34
  width: 14px;
35
35
  height: 14px;
36
- background-color: ${(props) => props.theme.colors.forms.borderColor};
36
+ background-color: ${(props) => props.theme.colors.icon.base};
37
+ opacity: 0.64;
37
38
  border-radius: 50%;
38
39
  content: "";
39
40
  transition: transform ${(props) => props.theme.duration.fast}
@@ -48,13 +49,14 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
48
49
  ${(props) => {
49
50
  if (props.checked) {
50
51
  return css`
51
- color: ${props.theme.colors.selection.color};
52
+ color: ${props.theme.colors.text.body};
52
53
  text-align: left;
53
- border-color: ${props.theme.colors.selection.border};
54
- background-color: ${props.theme.colors.selection.background};
54
+ border-color: ${props.theme.colors.form.border.selected};
55
+ background-color: ${props.theme.colors.form.background.selected};
55
56
 
56
57
  &::after {
57
- background-color: ${props.theme.colors.background.container};
58
+ background-color: ${props.theme.colors.icon.inverse};
59
+ opacity: 1;
58
60
  transform: translate(17px, -50%);
59
61
  }
60
62
 
@@ -63,15 +65,15 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
63
65
  top: 50%;
64
66
  left: 4px;
65
67
  transform: translate(0, -50%);
66
- color: ${props.theme.colors.background.container};
68
+ color: ${props.theme.colors.icon.inverse};
67
69
  }
68
70
  `;
69
71
  } else {
70
72
  return `
71
73
  &:hover,
72
74
  &:focus {
73
- border-color: ${props.theme.colors.forms.borderColor};
74
- background-color: ${props.theme.colors.background.container};
75
+ border-color: ${props.theme.colors.form.border.base};
76
+ background-color: ${props.theme.colors.form.background.base};
75
77
  }
76
78
  &:hover {
77
79
  &::after {
@@ -92,7 +94,7 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
92
94
  &:hover,
93
95
  &:focus {
94
96
  background-color: ${(props) =>
95
- props.theme.colors.selection.background};
97
+ props.theme.colors.container.background.selected};
96
98
  }
97
99
  }
98
100
  `}
@@ -14,7 +14,8 @@ const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.table`
14
14
 
15
15
  tr,
16
16
  thead {
17
- border-bottom: 1px solid ${(props) => props.theme.colors.border};
17
+ border-bottom: 1px solid
18
+ ${(props) => props.theme.colors.container.border.base};
18
19
  }
19
20
 
20
21
  ${COMMON}
@@ -11,6 +11,7 @@ export const defaultStory = () => (
11
11
  <TableCell
12
12
  content={text("content", "🍔 Bacon Smokehouse Burger")}
13
13
  id={text("id", "bacon_smokehouse")}
14
+ color="text.body"
14
15
  />
15
16
  );
16
17
 
@@ -25,6 +26,7 @@ export const additionalProps = () => (
25
26
  width={number("width", 300)}
26
27
  colSpan={number("colSpan", 2)}
27
28
  align={text("align", "center")}
29
+ color="text.body"
28
30
  />
29
31
  );
30
32
 
@@ -11,6 +11,7 @@ export const defaultStory = () => (
11
11
  <TableHeaderCell
12
12
  content={text("content", "Food Item")}
13
13
  id={text("id", "1")}
14
+ color="text.headline"
14
15
  />
15
16
  );
16
17
 
@@ -23,6 +24,7 @@ export const sortable = () => (
23
24
  isSortable={boolean("isSortable", true)}
24
25
  content={text("content", "Food Item")}
25
26
  id={text("id", "1")}
27
+ color="text.headline"
26
28
  />
27
29
  );
28
30
 
@@ -37,6 +39,7 @@ export const additionalProps = () => (
37
39
  id={text("id", "2")}
38
40
  align={text("align", "center")}
39
41
  width={number("width", 100)}
42
+ color="text.headline"
40
43
  />
41
44
  );
42
45
 
@@ -5,7 +5,8 @@ import { COMMON } from "../utils/system-props";
5
5
  import type { TypeTheme } from "../types/theme.flow";
6
6
 
7
7
  const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.tbody`
8
- border-bottom: 1px solid ${(props) => props.theme.colors.border};
8
+ border-bottom: 1px solid
9
+ ${(props) => props.theme.colors.container.border.base};
9
10
 
10
11
  ${COMMON}
11
12
  `;
@@ -12,7 +12,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.ul`
12
12
  padding: 0;
13
13
  list-style: none;
14
14
  border-bottom: ${(props) => props.theme.borders[500]}
15
- ${(props) => props.theme.colors.border};
15
+ ${(props) => props.theme.colors.container.border.base};
16
16
 
17
17
  ${COMMON}
18
18
  `;
@@ -37,7 +37,7 @@ export const TabItem: StyledComponent<any, TypeTheme, *> = styled.li`
37
37
  props.isSelected &&
38
38
  css`
39
39
  box-shadow: ${(props) =>
40
- `inset 0 -3px 0 0 ${props.theme.colors.cta.primary.background}`};
40
+ `inset 0 -3px 0 0 ${props.theme.colors.button.primary.background.base}`};
41
41
  `};
42
42
 
43
43
  &:hover {
@@ -45,7 +45,7 @@ export const TabItem: StyledComponent<any, TypeTheme, *> = styled.li`
45
45
  props.isSelected &&
46
46
  css`
47
47
  box-shadow: ${(props) =>
48
- `inset 0 -3px 0 0 ${props.theme.colors.cta.primary.hoverBackground}`};
48
+ `inset 0 -3px 0 0 ${props.theme.colors.button.primary.background.hover}`};
49
49
  `};
50
50
  }
51
51
  `;
@@ -59,14 +59,14 @@ export const TabButton: StyledComponent<{ ... }, TypeTheme, *> = styled(Button)`
59
59
  ${(props) =>
60
60
  props.isSelected &&
61
61
  css`
62
- color: ${(props) => props.theme.colors.cta.link.color};
62
+ color: ${(props) => props.theme.colors.link.base};
63
63
  `};
64
64
 
65
65
  &:hover {
66
66
  ${(props) =>
67
67
  props.isSelected &&
68
68
  css`
69
- color: ${(props) => props.theme.colors.cta.link.hoverColor};
69
+ color: ${(props) => props.theme.colors.link.hover};
70
70
  `};
71
71
  }
72
72
 
@@ -14,9 +14,9 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
14
14
  display: block;
15
15
  width: 100%;
16
16
  padding: ${(props) => props.theme.space[300]};
17
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
17
+ border: 1px solid ${(props) => props.theme.colors.form.border.base};
18
18
  border-radius: ${(props) => props.theme.radii[500]};
19
- background-color: ${(props) => props.theme.colors.background.container};
19
+ background-color: ${(props) => props.theme.colors.form.background.base};
20
20
  color: ${(props) => props.theme.colors.text.body};
21
21
  outline: none;
22
22
  resize: none;
@@ -34,7 +34,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
34
34
  }
35
35
 
36
36
  &:placeholder {
37
- color: ${(props) => props.theme.colors.forms.placeholderColor};
37
+ color: ${(props) => props.theme.colors.form.placeholder.base};
38
38
  }
39
39
 
40
40
  ${(props) =>
@@ -70,7 +70,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
70
70
  props.invalid &&
71
71
  css`
72
72
  textarea {
73
- border-color: ${(props) => props.theme.colors.error.color};
73
+ border-color: ${(props) => props.theme.colors.form.border.error};
74
74
  }
75
75
  `}
76
76
 
@@ -79,7 +79,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
79
79
 
80
80
  export const Accessory: StyledComponent<any, TypeTheme, *> = styled.div`
81
81
  position: absolute;
82
- color: ${(props) => props.theme.colors.icon.primary};
82
+ color: ${(props) => props.theme.colors.icon.base};
83
83
 
84
84
  ${(props) =>
85
85
  props.before &&
@@ -1,9 +1,9 @@
1
1
  // @flow strict-local
2
2
  import * as React from "react";
3
3
  import { ThemeProvider as BaseThemeProvider } from "styled-components";
4
- import theme from "../utils/theme";
4
+ import theme from "../themes/default/theme";
5
5
 
6
- import typeof { default as TypeTheme } from "../utils/theme";
6
+ import typeof { default as TypeTheme } from "../themes/default/theme";
7
7
 
8
8
  type TypeProps = $ReadOnly<{|
9
9
  theme?: TypeTheme,
@@ -136,7 +136,7 @@ const Toast = ({ content, theme, color, icon }: TypeProps) => {
136
136
  </Box>
137
137
 
138
138
  <IconBox>
139
- <Icon name="x" ml={400} color="neutral.800" />
139
+ <Icon name="x" ml={400} color="icon.base" />
140
140
  </IconBox>
141
141
  </Box>
142
142
  </Container>
@@ -18,14 +18,14 @@ const Container = styled<typeof Box, TypeTheme, TypeProps>(Box)`
18
18
  font-family: ${(p) => p.theme.fontFamily};
19
19
  ${(p) => p.theme.typography[200]}
20
20
  position: relative;
21
- background: ${(p) => p.theme.colors.background.container};
22
- border-left: 2px solid ${(p) => p.theme.colors[p.type].border};
21
+ background: ${(p) => p.theme.colors.container.background.base};
22
+ border-left: 2px solid ${(p) => p.theme.colors.container.border[p.type]};
23
23
  `;
24
24
 
25
25
  export const CustomIcon = styled<typeof Icon, TypeTheme, TypeProps>(Icon)`
26
26
  margin-right: ${(props) => props.theme.space[400]};
27
27
  transform: translateY(4px);
28
- color: ${(p) => (p.customColor ? undefined : p.theme.colors[p.type].icon)};
28
+ color: ${(p) => (p.customColor ? undefined : p.theme.colors.icon[p.type])};
29
29
  `;
30
30
 
31
31
  export const GlobalToastStyles = createGlobalStyle`
@@ -14,8 +14,8 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
14
14
  ${(props) => props.theme.space[300]};
15
15
  margin: 0;
16
16
  color: ${(props) => props.theme.colors.text.body};
17
- background: ${(props) => props.theme.colors.background.container};
18
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
17
+ background: ${(props) => props.theme.colors.container.background.base};
18
+ border: 1px solid ${(props) => props.theme.colors.container.border.base};
19
19
  font-weight: ${(props) => props.theme.fontWeights.normal};
20
20
  line-height: 1;
21
21
  vertical-align: middle;
@@ -36,8 +36,10 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
36
36
  &:hover,
37
37
  &:active {
38
38
  color: ${(props) => props.theme.colors.text.body};
39
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
40
- background-color: ${(props) => props.theme.colors.background.app};
39
+ border: 1px solid
40
+ ${(props) => props.theme.colors.container.border.decorative.neutral};
41
+ background-color: ${(props) =>
42
+ props.theme.colors.container.background.decorative.neutral};
41
43
  }
42
44
  `}
43
45
 
@@ -46,17 +48,26 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
46
48
  css`
47
49
  opacity: 0.4;
48
50
  cursor: not-allowed;
51
+ &:hover,
52
+ &:active {
53
+ background: ${(props) => props.theme.colors.container.background.base};
54
+ border: 1px solid ${(props) => props.theme.colors.container.border.base};
55
+ }
49
56
  `}
50
57
 
51
58
  ${(props) =>
52
59
  !props.valid &&
53
60
  css`
54
- color: ${(props) => props.theme.colors.text.inverse};
55
- border-color: ${(props) => props.theme.colors.error.color};
56
- background: ${(props) => props.theme.colors.error.color};
61
+ color: ${(props) => props.theme.colors.text.body};
62
+ border-color: ${(props) => props.theme.colors.container.border.error};
63
+ background: ${(props) => props.theme.colors.container.background.error};
57
64
 
58
65
  &:hover {
59
- color: ${(props) => props.theme.colors.text.inverse};
66
+ color: ${(props) => props.theme.colors.text.body};
67
+ border: 1px solid
68
+ ${(props) => props.theme.colors.container.border.error};
69
+ background-color: ${(props) =>
70
+ props.theme.colors.container.background.error};
60
71
  }
61
72
  `}
62
73
 
@@ -255,7 +255,7 @@ export default class TokenInput extends React.Component<TypeProps, TypeState> {
255
255
  };
256
256
 
257
257
  renderToken(token: TypeTokenSpec): React.Node {
258
- const { iconName: defaultIconName } = this.props;
258
+ const { iconName: defaultIconName, disabled } = this.props;
259
259
  const activeId = this.state.activeToken;
260
260
  const { id, iconName: tokenIconName, value, valid } = token;
261
261
  const iconName = tokenIconName || defaultIconName;
@@ -267,6 +267,7 @@ export default class TokenInput extends React.Component<TypeProps, TypeState> {
267
267
  onClick={(e) => this.handleClickToken(e, token)}
268
268
  valid={valid}
269
269
  active={isActive}
270
+ disabled={disabled}
270
271
  >
271
272
  <Box display="flex" alignItems="center">
272
273
  {iconName && <Icon name={iconName} size="mini" pr={300} />}
@@ -14,12 +14,12 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
14
14
  align-content: center;
15
15
  cursor: text;
16
16
  width: 100%;
17
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
17
+ border: 1px solid ${(props) => props.theme.colors.form.border.base};
18
18
  border-radius: ${(props) => props.theme.radii[500]};
19
19
  margin: 0;
20
20
  padding: ${(props) => props.theme.space[300]};
21
21
  padding-top: ${(props) => props.theme.space[200]};
22
- background-color: ${(props) => props.theme.colors.background.container};
22
+ background-color: ${(props) => props.theme.colors.form.background.base};
23
23
  color: ${(props) => props.theme.colors.text.body};
24
24
  transition: border-color ${(props) => props.theme.duration.fast}
25
25
  ${(props) => props.theme.easing.ease_in},
@@ -46,7 +46,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
46
46
  ${(props) => props.theme.space[300]} ${(props) => props.theme.space[100]}
47
47
  0;
48
48
  color: ${(props) => props.theme.colors.text.body};
49
- background-color: ${(props) => props.theme.colors.background.container};
49
+ background-color: ${(props) => props.theme.colors.form.background.base};
50
50
  /** This matches the height of the token so size does not change as tokens are added */
51
51
  min-height: 20px;
52
52
 
@@ -68,10 +68,18 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
68
68
  &:not(output):not(:focus):-moz-ui-invalid {
69
69
  box-shadow: none;
70
70
  }
71
+
72
+ ${(props) =>
73
+ props.disabled &&
74
+ css`
75
+ opacity: 0.4;
76
+
77
+ cursor: not-allowed;
78
+ `}
71
79
  }
72
80
 
73
81
  &:placeholder {
74
- color: ${(props) => props.theme.colors.forms.placeholderColor};
82
+ color: ${(props) => props.theme.colors.form.placeholder.base};
75
83
  }
76
84
 
77
85
  ${(props) =>
@@ -104,13 +112,13 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
104
112
  ${(props) =>
105
113
  props.invalid &&
106
114
  css`
107
- border-color: ${(props) => props.theme.colors.error.color};
115
+ border-color: ${(props) => props.theme.colors.form.border.error};
108
116
  `}
109
117
 
110
118
  ${(props) =>
111
119
  props.warning &&
112
120
  css`
113
- border-color: ${(props) => props.theme.colors.warning.color};
121
+ border-color: ${(props) => props.theme.colors.form.border.warning};
114
122
  `}
115
123
 
116
124
  ${COMMON}
@@ -158,10 +158,10 @@ const Content = ({
158
158
  py={appearance === "box" ? 400 : 200}
159
159
  m={200}
160
160
  color="text.body"
161
- bg="background.container"
161
+ bg="container.background.base"
162
162
  boxShadow={300}
163
163
  border={500}
164
- borderColor="border"
164
+ borderColor="container.border.base"
165
165
  // $FlowIssue - upgrade v0.112.0
166
166
  {...rest}
167
167
  >
package/__flow__/index.js CHANGED
@@ -3,8 +3,8 @@ export type { EnumIconNames } from "./EnumIconNames";
3
3
  export type { TypeTheme } from "./types/theme.flow";
4
4
  export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
5
5
  export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
6
- export { default as theme } from "./utils/theme";
7
- export { default as darkTheme } from "./themes/dark";
6
+ export { default as theme } from "./themes/default/theme";
7
+ export { default as darkTheme } from "./themes/dark/theme";
8
8
  export { default as Icon } from "./Icon";
9
9
  // DEPRECATED: Alert has been renamed to Banner
10
10
  export { default as Alert } from "./Banner";
@@ -0,0 +1,43 @@
1
+ import COLORS from "@sproutsocial/seeds-color";
2
+
3
+ export const green = {
4
+ background: COLORS.COLOR_GREEN_900,
5
+ highlight: COLORS.COLOR_GREEN_500,
6
+ foreground: COLORS.COLOR_GREEN_100,
7
+ };
8
+
9
+ export const blue = {
10
+ background: COLORS.COLOR_BLUE_900,
11
+ highlight: COLORS.COLOR_BLUE_600,
12
+ foreground: COLORS.COLOR_BLUE_100,
13
+ };
14
+
15
+ export const purple = {
16
+ background: COLORS.COLOR_PURPLE_800,
17
+ highlight: COLORS.COLOR_PURPLE_500,
18
+ foreground: COLORS.COLOR_PURPLE_100,
19
+ };
20
+
21
+ export const yellow = {
22
+ background: COLORS.COLOR_YELLOW_900,
23
+ highlight: COLORS.COLOR_YELLOW_600,
24
+ foreground: COLORS.COLOR_YELLOW_100,
25
+ };
26
+
27
+ export const orange = {
28
+ background: COLORS.COLOR_ORANGE_900,
29
+ highlight: COLORS.COLOR_ORANGE_600,
30
+ foreground: COLORS.COLOR_ORANGE_100,
31
+ };
32
+
33
+ export const red = {
34
+ background: COLORS.COLOR_RED_900,
35
+ highlight: COLORS.COLOR_RED_600,
36
+ foreground: COLORS.COLOR_RED_100,
37
+ };
38
+
39
+ export const neutral = {
40
+ background: COLORS.COLOR_NEUTRAL_900,
41
+ highlight: COLORS.COLOR_NEUTRAL_500,
42
+ foreground: COLORS.COLOR_NEUTRAL_100,
43
+ };
@@ -0,0 +1,195 @@
1
+ // @flow strict-local
2
+
3
+ import COLORS from "@sproutsocial/seeds-color";
4
+ import defaultTheme from "../default/theme";
5
+ import {
6
+ green,
7
+ blue,
8
+ purple,
9
+ yellow,
10
+ orange,
11
+ red,
12
+ neutral,
13
+ } from "./decorative-palettes";
14
+
15
+ const darkTheme = {
16
+ ...defaultTheme,
17
+ colors: {
18
+ ...defaultTheme.colors,
19
+ app: {
20
+ background: {
21
+ base: COLORS.COLOR_NEUTRAL_1000,
22
+ },
23
+ },
24
+ container: {
25
+ background: {
26
+ base: COLORS.COLOR_NEUTRAL_900,
27
+ success: green.background,
28
+ warning: yellow.background,
29
+ error: red.background,
30
+ info: blue.background,
31
+ opportunity: purple.background,
32
+ danger: red.background,
33
+ decorative: {
34
+ green: green.background,
35
+ blue: blue.background,
36
+ purple: purple.background,
37
+ yellow: yellow.background,
38
+ orange: orange.background,
39
+ red: red.background,
40
+ neutral: neutral.background,
41
+ },
42
+ selected: COLORS.COLOR_NEUTRAL_0,
43
+ },
44
+ border: {
45
+ base: COLORS.COLOR_NEUTRAL_1100,
46
+ success: green.highlight,
47
+ warning: yellow.highlight,
48
+ error: red.highlight,
49
+ danger: red.highlight,
50
+ info: blue.highlight,
51
+ opportunity: purple.highlight,
52
+ decorative: {
53
+ green: green.highlight,
54
+ blue: blue.highlight,
55
+ purple: purple.highlight,
56
+ yellow: yellow.highlight,
57
+ orange: orange.highlight,
58
+ red: red.highlight,
59
+ neutral: neutral.highlight,
60
+ },
61
+ selected: COLORS.COLOR_NEUTRAL_0,
62
+ },
63
+ },
64
+ button: {
65
+ primary: {
66
+ background: {
67
+ base: COLORS.COLOR_BLUE_400,
68
+ hover: COLORS.COLOR_BLUE_300,
69
+ active: COLORS.COLOR_BLUE_200,
70
+ },
71
+ border: {
72
+ base: "transparent",
73
+ },
74
+ text: {
75
+ base: COLORS.COLOR_NEUTRAL_900,
76
+ hover: COLORS.COLOR_NEUTRAL_1000,
77
+ },
78
+ },
79
+ secondary: {
80
+ background: {
81
+ base: "transparent",
82
+ hover: COLORS.COLOR_NEUTRAL_100,
83
+ active: COLORS.COLOR_NEUTRAL_0,
84
+ },
85
+ border: {
86
+ base: COLORS.COLOR_NEUTRAL_0,
87
+ },
88
+ text: {
89
+ base: COLORS.COLOR_NEUTRAL_0,
90
+ hover: COLORS.COLOR_NEUTRAL_800,
91
+ },
92
+ },
93
+ pill: {
94
+ background: {
95
+ base: "transparent",
96
+ hover: COLORS.COLOR_NEUTRAL_1000,
97
+ active: COLORS.COLOR_NEUTRAL_900,
98
+ },
99
+ border: {
100
+ base: "transparent",
101
+ },
102
+ text: {
103
+ base: COLORS.COLOR_NEUTRAL_100,
104
+ hover: COLORS.COLOR_NEUTRAL_0,
105
+ },
106
+ },
107
+ destructive: {
108
+ background: {
109
+ base: COLORS.COLOR_RED_400,
110
+ hover: COLORS.COLOR_RED_300,
111
+ active: COLORS.COLOR_RED_200,
112
+ },
113
+ border: {
114
+ base: "transparent",
115
+ },
116
+ text: {
117
+ base: COLORS.COLOR_NEUTRAL_900,
118
+ hover: COLORS.COLOR_NEUTRAL_1000,
119
+ },
120
+ },
121
+ placeholder: {
122
+ background: {
123
+ base: "transparent",
124
+ hover: COLORS.COLOR_NEUTRAL_1100,
125
+ active: COLORS.COLOR_NEUTRAL_1100,
126
+ },
127
+ border: {
128
+ base: COLORS.COLOR_NEUTRAL_500,
129
+ },
130
+ text: {
131
+ base: COLORS.COLOR_BLUE_400,
132
+ hover: COLORS.COLOR_BLUE_300,
133
+ },
134
+ },
135
+ unstyled: {
136
+ background: {
137
+ base: "transparent",
138
+ },
139
+ border: {
140
+ base: "transparent",
141
+ },
142
+ text: {
143
+ base: COLORS.COLOR_NEUTRAL_300,
144
+ hover: COLORS.COLOR_NEUTRAL_200,
145
+ },
146
+ },
147
+ },
148
+ link: {
149
+ base: COLORS.COLOR_BLUE_400,
150
+ hover: COLORS.COLOR_BLUE_300,
151
+ },
152
+ text: {
153
+ headline: COLORS.COLOR_NEUTRAL_0,
154
+ subtext: COLORS.COLOR_NEUTRAL_300,
155
+ body: COLORS.COLOR_NEUTRAL_100,
156
+ inverse: COLORS.COLOR_NEUTRAL_900,
157
+ error: COLORS.COLOR_RED_400,
158
+ },
159
+ icon: {
160
+ base: COLORS.COLOR_NEUTRAL_100,
161
+ inverse: COLORS.COLOR_NEUTRAL_900,
162
+ success: green.foreground,
163
+ warning: yellow.foreground,
164
+ error: red.foreground,
165
+ danger: red.foreground,
166
+ info: blue.foreground,
167
+ opportunity: purple.foreground,
168
+ },
169
+ form: {
170
+ background: {
171
+ base: COLORS.COLOR_NEUTRAL_900,
172
+ selected: COLORS.COLOR_NEUTRAL_0,
173
+ },
174
+ border: {
175
+ base: COLORS.COLOR_NEUTRAL_500,
176
+ error: red.highlight,
177
+ warning: yellow.highlight,
178
+ selected: COLORS.COLOR_NEUTRAL_0,
179
+ },
180
+ placeholder: {
181
+ base: COLORS.COLOR_NEUTRAL_500,
182
+ },
183
+ },
184
+ listItem: {
185
+ background: {
186
+ base: "transparent",
187
+ hover: COLORS.COLOR_NEUTRAL_800,
188
+ selected: COLORS.COLOR_NEUTRAL_0,
189
+ },
190
+ },
191
+ },
192
+ mode: "dark",
193
+ };
194
+
195
+ export default darkTheme;