@sproutsocial/racine 7.7.0-beta-collapsible.0 → 8.0.0-beta-dark-mode.3

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 (179) 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 +9 -9
  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__/ChartLegend/styles.js +6 -6
  14. package/__flow__/Checkbox/styles.js +18 -16
  15. package/__flow__/Collapsible/index.js +6 -24
  16. package/__flow__/Collapsible/index.stories.js +11 -82
  17. package/__flow__/Collapsible/styles.js +2 -28
  18. package/__flow__/DatePicker/styles.js +14 -12
  19. package/__flow__/Drawer/styles.js +1 -1
  20. package/__flow__/FormField/index.js +1 -1
  21. package/__flow__/Icon/index.stories.js +24 -6
  22. package/__flow__/Input/styles.js +6 -6
  23. package/__flow__/KeyboardKey/styles.js +2 -2
  24. package/__flow__/Link/styles.js +3 -5
  25. package/__flow__/Listbox/__snapshots__/index.test.js.snap +8 -2
  26. package/__flow__/Listbox/index.js +4 -4
  27. package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -2
  28. package/__flow__/Menu/index.js +7 -2
  29. package/__flow__/Menu/styles.js +6 -3
  30. package/__flow__/Message/index.js +2 -2
  31. package/__flow__/Message/index.stories.js +1 -1
  32. package/__flow__/Modal/index.js +1 -1
  33. package/__flow__/Modal/index.stories.js +14 -8
  34. package/__flow__/Modal/styles.js +2 -2
  35. package/__flow__/Numeral/styles.js +2 -1
  36. package/__flow__/OverflowList/index.stories.js +15 -8
  37. package/__flow__/Popout/index.js +3 -3
  38. package/__flow__/Radio/styles.js +8 -8
  39. package/__flow__/SegmentedControl/styles.js +9 -5
  40. package/__flow__/Select/styles.js +5 -5
  41. package/__flow__/Skeleton/index.js +4 -4
  42. package/__flow__/Skeleton/index.stories.js +1 -1
  43. package/__flow__/Stack/index.js +1 -1
  44. package/__flow__/Stack/index.stories.js +3 -1
  45. package/__flow__/Switch/styles.js +13 -11
  46. package/__flow__/Table/styles.js +2 -1
  47. package/__flow__/TableCell/index.stories.js +2 -0
  48. package/__flow__/TableHeaderCell/index.stories.js +3 -0
  49. package/__flow__/TableRowAccordion/styles.js +2 -1
  50. package/__flow__/Tabs/styles.js +5 -5
  51. package/__flow__/Textarea/styles.js +5 -5
  52. package/__flow__/ThemeProvider/index.js +2 -2
  53. package/__flow__/Toast/index.js +1 -1
  54. package/__flow__/Toast/styles.js +3 -3
  55. package/__flow__/Token/styles.js +19 -8
  56. package/__flow__/TokenInput/index.js +2 -1
  57. package/__flow__/TokenInput/styles.js +14 -6
  58. package/__flow__/Tooltip/index.js +2 -2
  59. package/__flow__/index.js +2 -2
  60. package/__flow__/themes/dark/decorative-palettes.js +43 -0
  61. package/__flow__/themes/dark/theme.js +195 -0
  62. package/__flow__/themes/default/decorative-palettes.js +43 -0
  63. package/__flow__/themes/default/literal-colors.js +160 -0
  64. package/__flow__/themes/default/theme.js +336 -0
  65. package/__flow__/types/system-props.flow.js +2 -2
  66. package/__flow__/types/theme.colors.flow.js +244 -0
  67. package/__flow__/types/theme.flow.js +38 -213
  68. package/__flow__/utils/mixins.js +4 -3
  69. package/__flow__/utils/responsiveProps/index.js +1 -1
  70. package/commonjs/Badge/styles.js +1 -1
  71. package/commonjs/Banner/index.js +3 -2
  72. package/commonjs/Banner/styles.js +1 -1
  73. package/commonjs/Button/index.js +5 -3
  74. package/commonjs/Button/styles.js +12 -11
  75. package/commonjs/Card/index.js +2 -2
  76. package/commonjs/CharacterCounter/styles.js +1 -1
  77. package/commonjs/Checkbox/styles.js +7 -7
  78. package/commonjs/Collapsible/index.js +6 -15
  79. package/commonjs/Collapsible/styles.js +1 -8
  80. package/commonjs/DatePicker/styles.js +13 -11
  81. package/commonjs/Drawer/styles.js +1 -1
  82. package/commonjs/FormField/index.js +1 -1
  83. package/commonjs/Input/styles.js +6 -6
  84. package/commonjs/KeyboardKey/styles.js +2 -2
  85. package/commonjs/Link/styles.js +4 -8
  86. package/commonjs/Listbox/index.js +4 -4
  87. package/commonjs/Menu/index.js +2 -2
  88. package/commonjs/Menu/styles.js +10 -4
  89. package/commonjs/Message/index.js +2 -2
  90. package/commonjs/Modal/index.js +1 -1
  91. package/commonjs/Modal/styles.js +2 -2
  92. package/commonjs/Numeral/styles.js +1 -1
  93. package/commonjs/Popout/index.js +2 -2
  94. package/commonjs/Radio/styles.js +4 -4
  95. package/commonjs/SegmentedControl/styles.js +5 -5
  96. package/commonjs/Select/styles.js +5 -5
  97. package/commonjs/Skeleton/index.js +2 -2
  98. package/commonjs/Switch/styles.js +7 -7
  99. package/commonjs/Table/styles.js +1 -1
  100. package/commonjs/TableRowAccordion/styles.js +1 -1
  101. package/commonjs/Tabs/styles.js +5 -5
  102. package/commonjs/Textarea/styles.js +5 -5
  103. package/commonjs/ThemeProvider/index.js +1 -1
  104. package/commonjs/Toast/index.js +1 -1
  105. package/commonjs/Toast/styles.js +3 -3
  106. package/commonjs/Token/styles.js +18 -10
  107. package/commonjs/TokenInput/index.js +38 -35
  108. package/commonjs/TokenInput/styles.js +9 -7
  109. package/commonjs/Tooltip/index.js +2 -2
  110. package/commonjs/index.js +3 -3
  111. package/commonjs/themes/dark/decorative-palettes.js +51 -0
  112. package/commonjs/themes/dark/theme.js +195 -0
  113. package/commonjs/themes/default/decorative-palettes.js +51 -0
  114. package/commonjs/themes/default/literal-colors.js +165 -0
  115. package/commonjs/themes/default/theme.js +334 -0
  116. package/commonjs/types/theme.colors.flow.js +5 -0
  117. package/commonjs/types/theme.flow.js +1 -5
  118. package/commonjs/utils/mixins.js +2 -2
  119. package/commonjs/utils/responsiveProps/index.js +1 -1
  120. package/lib/Badge/styles.js +1 -1
  121. package/lib/Banner/index.js +3 -2
  122. package/lib/Banner/styles.js +1 -1
  123. package/lib/Button/index.js +5 -3
  124. package/lib/Button/styles.js +11 -11
  125. package/lib/Card/index.js +2 -2
  126. package/lib/CharacterCounter/styles.js +1 -1
  127. package/lib/Checkbox/styles.js +7 -7
  128. package/lib/Collapsible/index.js +6 -15
  129. package/lib/Collapsible/styles.js +1 -8
  130. package/lib/DatePicker/styles.js +12 -11
  131. package/lib/Drawer/styles.js +1 -1
  132. package/lib/FormField/index.js +1 -1
  133. package/lib/Input/styles.js +6 -6
  134. package/lib/KeyboardKey/styles.js +2 -2
  135. package/lib/Link/styles.js +4 -8
  136. package/lib/Listbox/index.js +4 -4
  137. package/lib/Menu/index.js +2 -2
  138. package/lib/Menu/styles.js +10 -4
  139. package/lib/Message/index.js +2 -2
  140. package/lib/Modal/index.js +1 -1
  141. package/lib/Modal/styles.js +2 -2
  142. package/lib/Numeral/styles.js +1 -1
  143. package/lib/Popout/index.js +2 -2
  144. package/lib/Radio/styles.js +4 -4
  145. package/lib/SegmentedControl/styles.js +5 -5
  146. package/lib/Select/styles.js +5 -5
  147. package/lib/Skeleton/index.js +2 -2
  148. package/lib/Switch/styles.js +7 -7
  149. package/lib/Table/styles.js +1 -1
  150. package/lib/TableRowAccordion/styles.js +1 -1
  151. package/lib/Tabs/styles.js +5 -5
  152. package/lib/Textarea/styles.js +5 -5
  153. package/lib/ThemeProvider/index.js +1 -1
  154. package/lib/Toast/index.js +1 -1
  155. package/lib/Toast/styles.js +3 -3
  156. package/lib/Token/styles.js +18 -10
  157. package/lib/TokenInput/index.js +38 -35
  158. package/lib/TokenInput/styles.js +9 -7
  159. package/lib/Tooltip/index.js +2 -2
  160. package/lib/index.js +2 -2
  161. package/lib/themes/dark/decorative-palettes.js +36 -0
  162. package/lib/themes/dark/theme.js +185 -0
  163. package/lib/themes/default/decorative-palettes.js +36 -0
  164. package/lib/themes/default/literal-colors.js +156 -0
  165. package/lib/themes/default/theme.js +306 -0
  166. package/lib/types/theme.colors.flow.js +1 -0
  167. package/lib/types/theme.flow.js +1 -1
  168. package/lib/utils/mixins.js +2 -2
  169. package/lib/utils/responsiveProps/index.js +1 -1
  170. package/package.json +2 -2
  171. package/__flow__/themes/dark.js +0 -133
  172. package/__flow__/themes/light.js +0 -7
  173. package/__flow__/utils/theme.js +0 -422
  174. package/commonjs/themes/dark.js +0 -140
  175. package/commonjs/themes/light.js +0 -14
  176. package/commonjs/utils/theme.js +0 -421
  177. package/lib/themes/dark.js +0 -131
  178. package/lib/themes/light.js +0 -5
  179. package/lib/utils/theme.js +0 -402
@@ -26,9 +26,9 @@ export const Input: StyledComponent<any, TypeTheme, *> = styled.input`
26
26
  margin: 0;
27
27
  appearance: none;
28
28
  cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
29
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
29
+ border: 1px solid ${(props) => props.theme.colors.form.border.base};
30
30
  border-radius: 50%;
31
- background-color: ${(props) => props.theme.colors.background.container};
31
+ background-color: ${(props) => props.theme.colors.form.background.base};
32
32
  transition: border-color ${(props) => props.theme.duration.fast}
33
33
  ${(props) => props.theme.easing.ease_in},
34
34
  background-color ${(props) => props.theme.duration.fast}
@@ -72,13 +72,13 @@ export const InputWrapper: StyledComponent<any, TypeTheme, *> = styled.span`
72
72
  &:hover,
73
73
  &:focus {
74
74
  ${Input} {
75
- border-color: ${props.theme.colors.forms.borderColor};
76
- 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};
77
77
  }
78
78
 
79
79
  &:before {
80
80
  opacity: ${props.disabled ? 0 : 1};
81
- background-color: ${props.theme.colors.forms.borderColor};
81
+ background-color: ${props.theme.colors.form.background.base};
82
82
  }
83
83
  }
84
84
  `}
@@ -87,13 +87,13 @@ export const InputWrapper: StyledComponent<any, TypeTheme, *> = styled.span`
87
87
  props.checked &&
88
88
  css`
89
89
  ${Input} {
90
- border-color: ${props.theme.colors.selection.border};
91
- background-color: ${props.theme.colors.selection.background};
90
+ border-color: ${props.theme.colors.form.border.selected};
91
+ background-color: ${props.theme.colors.form.background.selected};
92
92
  }
93
93
 
94
94
  &:before {
95
95
  opacity: 1;
96
- background-color: ${props.theme.colors.background.container};
96
+ background-color: ${props.theme.colors.form.background.base};
97
97
  }
98
98
  `}
99
99
  `;
@@ -8,7 +8,8 @@ import type { TypeTheme } from "../types/theme.flow";
8
8
 
9
9
  // eslint-disable-next-line prettier/prettier
10
10
  export const SegmentedControlContainer = styled<typeof Box, TypeTheme, {disabled?: boolean, ...}>(Box)`
11
- border: 1px solid ${(props) => props.theme.colors.selection.border};
11
+ border: 1px solid
12
+ ${(props) => props.theme.colors.button.secondary.border.base};
12
13
  border-radius: ${(props) => props.theme.radii.outer};
13
14
  padding: ${(props) => props.theme.space[100]};
14
15
 
@@ -61,17 +62,20 @@ export const SegmentedControlLabel = styled<typeof Text, TypeTheme, any>(Text)`
61
62
  transition: all ${(props) => props.theme.duration.fast};
62
63
 
63
64
  &:hover {
64
- background-color: ${(props) => props.theme.colors.border};
65
+ background-color: ${(props) =>
66
+ props.theme.colors.listItem.background.hover};
65
67
  }
66
68
 
67
69
  ${(props) =>
68
70
  props.isActive &&
69
71
  css`
70
- color: ${(props) => props.theme.colors.background.container};
71
- background-color: ${(props) => props.theme.colors.selection.background};
72
+ color: ${(props) => props.theme.colors.text.inverse};
73
+ background-color: ${(props) =>
74
+ props.theme.colors.listItem.background.selected};
72
75
 
73
76
  &:hover {
74
- background-color: ${(props) => props.theme.colors.selection.background};
77
+ background-color: ${(props) =>
78
+ props.theme.colors.listItem.background.selected};
75
79
  }
76
80
  `}
77
81
  `;
@@ -12,9 +12,9 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
12
12
  select {
13
13
  box-sizing: border-box;
14
14
  width: 100%;
15
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
15
+ border: 1px solid ${(props) => props.theme.colors.form.border.base};
16
16
  border-radius: ${(props) => props.theme.radii[500]};
17
- background-color: ${(props) => props.theme.colors.background.container};
17
+ background-color: ${(props) => props.theme.colors.form.background.base};
18
18
  color: ${(props) => props.theme.colors.text.body};
19
19
  cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
20
20
  outline: none;
@@ -85,11 +85,11 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
85
85
  props.invalid &&
86
86
  css`
87
87
  select {
88
- border-color: ${(props) => props.theme.colors.error.color};
88
+ border-color: ${(props) => props.theme.colors.form.border.error};
89
89
  }
90
90
 
91
91
  ${Arrow} {
92
- color: ${(props) => props.theme.colors.error.color};
92
+ color: ${(props) => props.theme.colors.icon.error};
93
93
  }
94
94
  `}
95
95
 
@@ -111,7 +111,7 @@ export const Arrow: StyledComponent<any, TypeTheme, *> = styled.span`
111
111
  }
112
112
  }};
113
113
  transform: translateY(-50%);
114
- color: ${(props) => props.theme.colors.icon.primary};
114
+ color: ${(props) => props.theme.colors.icon.base};
115
115
  pointer-events: none;
116
116
  `;
117
117
 
@@ -6,13 +6,13 @@ import { transparentize } from "polished";
6
6
  import type { TypeTheme } from "../types/theme.flow";
7
7
 
8
8
  const Skeleton = styled<typeof Box, TypeTheme>(Box)`
9
- background: ${(p) => p.theme.colors.background.app};
9
+ background: ${(p) => p.theme.colors.app.background.base};
10
10
  background-image: ${(props) =>
11
11
  `linear-gradient(
12
12
  288deg,
13
- ${transparentize(0.7, props.theme.colors.border)} 32%,
14
- ${transparentize(0.05, props.theme.colors.border)},
15
- ${transparentize(0.7, props.theme.colors.border)} 68%
13
+ ${transparentize(0.7, props.theme.colors.container.border.base)} 32%,
14
+ ${transparentize(0.05, props.theme.colors.container.border.base)},
15
+ ${transparentize(0.7, props.theme.colors.container.border.base)} 68%
16
16
  );`};
17
17
  background-size: 400%;
18
18
  background-repeat: no-repeat;
@@ -13,7 +13,7 @@ const CardExample = () => {
13
13
  p={400}
14
14
  borderRadius="outer"
15
15
  border={500}
16
- borderColor="border"
16
+ borderColor="container.border.base"
17
17
  >
18
18
  <Skeleton borderRadius="pill" height={48} width={48} mb={400} />
19
19
  <Skeleton borderRadius="inner" height={16} width="100%" mb={400} />
@@ -11,7 +11,7 @@ type TypeAlignment = "left" | "center" | "right" | "stretch";
11
11
 
12
12
  type TypeProps = {
13
13
  /** Amount of space between items in the stack */
14
- space?: TypeResponsive<TypeSpace>,
14
+ space?: TypeResponsive<$Keys<TypeSpace>>,
15
15
  /** Alignment of the items in the stack (horizontal or vertical) */
16
16
  align?: TypeResponsive<TypeAlignment>,
17
17
  /** Axis upon which the stack is laid out (left, center, right, or stretch) */
@@ -3,7 +3,9 @@ import Stack from "./index";
3
3
  import Text from "../Text";
4
4
  import { select } from "@storybook/addon-knobs";
5
5
 
6
- const Item = (props) => <Text as="div" bg="neutral.0" {...props} />;
6
+ const Item = (props) => (
7
+ <Text as="div" color="text.body" bg="container.background.base" {...props} />
8
+ );
7
9
 
8
10
  const alignmentOptions = ["left", "center", "right", "stretch"];
9
11
  const directionOptions = ["horizontal", "vertical"];
@@ -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
+ };