@sproutsocial/racine 7.5.0-update.0 → 8.0.0-beta-dark-mode.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.
Files changed (173) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +18 -1
  3. package/__flow__/Badge/styles.js +3 -1
  4. package/__flow__/Banner/index.js +2 -1
  5. package/__flow__/Banner/styles.js +9 -6
  6. package/__flow__/Box/index.stories.js +3 -3
  7. package/__flow__/Box/styles.js +9 -9
  8. package/__flow__/Button/__snapshots__/index.test.js.snap +4 -4
  9. package/__flow__/Button/index.js +7 -2
  10. package/__flow__/Button/index.stories.js +6 -1
  11. package/__flow__/Button/styles.js +17 -12
  12. package/__flow__/Card/index.js +2 -2
  13. package/__flow__/CharacterCounter/styles.js +1 -1
  14. package/__flow__/ChartLegend/styles.js +6 -6
  15. package/__flow__/Checkbox/styles.js +18 -16
  16. package/__flow__/Collapsible/index.stories.js +11 -5
  17. package/__flow__/DatePicker/styles.js +14 -12
  18. package/__flow__/Drawer/styles.js +1 -1
  19. package/__flow__/FormField/index.js +1 -1
  20. package/__flow__/Icon/index.stories.js +24 -6
  21. package/__flow__/Input/styles.js +6 -6
  22. package/__flow__/KeyboardKey/styles.js +2 -2
  23. package/__flow__/Link/styles.js +3 -5
  24. package/__flow__/Listbox/__snapshots__/index.test.js.snap +8 -2
  25. package/__flow__/Listbox/index.js +4 -4
  26. package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -2
  27. package/__flow__/Menu/index.js +7 -2
  28. package/__flow__/Menu/styles.js +6 -3
  29. package/__flow__/Message/index.js +2 -2
  30. package/__flow__/Message/index.stories.js +1 -1
  31. package/__flow__/Modal/index.js +1 -1
  32. package/__flow__/Modal/index.stories.js +14 -8
  33. package/__flow__/Modal/styles.js +2 -2
  34. package/__flow__/Numeral/styles.js +2 -1
  35. package/__flow__/OverflowList/index.stories.js +15 -8
  36. package/__flow__/Popout/index.js +3 -3
  37. package/__flow__/Radio/styles.js +8 -8
  38. package/__flow__/SegmentedControl/styles.js +9 -5
  39. package/__flow__/Select/styles.js +5 -5
  40. package/__flow__/Skeleton/index.js +4 -4
  41. package/__flow__/Skeleton/index.stories.js +1 -1
  42. package/__flow__/Stack/index.stories.js +3 -1
  43. package/__flow__/Switch/styles.js +13 -11
  44. package/__flow__/Table/styles.js +2 -1
  45. package/__flow__/TableCell/index.stories.js +2 -0
  46. package/__flow__/TableHeaderCell/index.stories.js +3 -0
  47. package/__flow__/TableRowAccordion/styles.js +2 -1
  48. package/__flow__/Tabs/styles.js +5 -5
  49. package/__flow__/Textarea/styles.js +5 -5
  50. package/__flow__/ThemeProvider/index.js +2 -2
  51. package/__flow__/Toast/index.js +1 -1
  52. package/__flow__/Toast/styles.js +3 -3
  53. package/__flow__/Token/styles.js +19 -8
  54. package/__flow__/TokenInput/index.js +2 -1
  55. package/__flow__/TokenInput/styles.js +14 -6
  56. package/__flow__/Tooltip/index.js +2 -2
  57. package/__flow__/index.js +2 -2
  58. package/__flow__/themes/dark/decorative-palettes.js +43 -0
  59. package/__flow__/themes/dark/theme.js +195 -0
  60. package/__flow__/themes/default/decorative-palettes.js +43 -0
  61. package/__flow__/themes/default/literal-colors.js +160 -0
  62. package/__flow__/themes/default/theme.js +332 -0
  63. package/__flow__/types/system-props.flow.js +2 -2
  64. package/__flow__/types/theme.colors.flow.js +239 -0
  65. package/__flow__/types/theme.flow.js +38 -213
  66. package/__flow__/utils/mixins.js +4 -3
  67. package/__flow__/utils/responsiveProps/index.js +1 -1
  68. package/commonjs/Badge/styles.js +2 -1
  69. package/commonjs/Banner/index.js +3 -2
  70. package/commonjs/Banner/styles.js +1 -1
  71. package/commonjs/Button/index.js +5 -3
  72. package/commonjs/Button/styles.js +12 -11
  73. package/commonjs/Card/index.js +2 -2
  74. package/commonjs/CharacterCounter/styles.js +1 -1
  75. package/commonjs/Checkbox/styles.js +7 -7
  76. package/commonjs/DatePicker/styles.js +13 -11
  77. package/commonjs/Drawer/styles.js +1 -1
  78. package/commonjs/FormField/index.js +1 -1
  79. package/commonjs/Input/styles.js +6 -6
  80. package/commonjs/KeyboardKey/styles.js +2 -2
  81. package/commonjs/Link/styles.js +4 -8
  82. package/commonjs/Listbox/index.js +4 -4
  83. package/commonjs/Menu/index.js +2 -2
  84. package/commonjs/Menu/styles.js +10 -4
  85. package/commonjs/Message/index.js +2 -2
  86. package/commonjs/Modal/index.js +1 -1
  87. package/commonjs/Modal/styles.js +2 -2
  88. package/commonjs/Numeral/styles.js +1 -1
  89. package/commonjs/Popout/index.js +2 -2
  90. package/commonjs/Radio/styles.js +4 -4
  91. package/commonjs/SegmentedControl/styles.js +5 -5
  92. package/commonjs/Select/styles.js +5 -5
  93. package/commonjs/Skeleton/index.js +2 -2
  94. package/commonjs/Switch/styles.js +7 -7
  95. package/commonjs/Table/styles.js +1 -1
  96. package/commonjs/TableRowAccordion/styles.js +1 -1
  97. package/commonjs/Tabs/styles.js +5 -5
  98. package/commonjs/Textarea/styles.js +5 -5
  99. package/commonjs/ThemeProvider/index.js +1 -1
  100. package/commonjs/Toast/index.js +1 -1
  101. package/commonjs/Toast/styles.js +3 -3
  102. package/commonjs/Token/styles.js +18 -10
  103. package/commonjs/TokenInput/index.js +38 -35
  104. package/commonjs/TokenInput/styles.js +9 -7
  105. package/commonjs/Tooltip/index.js +2 -2
  106. package/commonjs/index.js +3 -3
  107. package/commonjs/themes/dark/decorative-palettes.js +51 -0
  108. package/commonjs/themes/dark/theme.js +195 -0
  109. package/commonjs/themes/default/decorative-palettes.js +51 -0
  110. package/commonjs/themes/default/literal-colors.js +165 -0
  111. package/commonjs/themes/default/theme.js +333 -0
  112. package/commonjs/types/theme.colors.flow.js +1 -0
  113. package/commonjs/types/theme.flow.js +1 -5
  114. package/commonjs/utils/mixins.js +2 -2
  115. package/commonjs/utils/responsiveProps/index.js +1 -1
  116. package/lib/Badge/styles.js +2 -1
  117. package/lib/Banner/index.js +3 -2
  118. package/lib/Banner/styles.js +1 -1
  119. package/lib/Button/index.js +5 -3
  120. package/lib/Button/styles.js +11 -11
  121. package/lib/Card/index.js +2 -2
  122. package/lib/CharacterCounter/styles.js +1 -1
  123. package/lib/Checkbox/styles.js +7 -7
  124. package/lib/DatePicker/styles.js +12 -11
  125. package/lib/Drawer/styles.js +1 -1
  126. package/lib/FormField/index.js +1 -1
  127. package/lib/Input/styles.js +6 -6
  128. package/lib/KeyboardKey/styles.js +2 -2
  129. package/lib/Link/styles.js +4 -8
  130. package/lib/Listbox/index.js +4 -4
  131. package/lib/Menu/index.js +2 -2
  132. package/lib/Menu/styles.js +10 -4
  133. package/lib/Message/index.js +2 -2
  134. package/lib/Modal/index.js +1 -1
  135. package/lib/Modal/styles.js +2 -2
  136. package/lib/Numeral/styles.js +1 -1
  137. package/lib/Popout/index.js +2 -2
  138. package/lib/Radio/styles.js +4 -4
  139. package/lib/SegmentedControl/styles.js +5 -5
  140. package/lib/Select/styles.js +5 -5
  141. package/lib/Skeleton/index.js +2 -2
  142. package/lib/Switch/styles.js +7 -7
  143. package/lib/Table/styles.js +1 -1
  144. package/lib/TableRowAccordion/styles.js +1 -1
  145. package/lib/Tabs/styles.js +5 -5
  146. package/lib/Textarea/styles.js +5 -5
  147. package/lib/ThemeProvider/index.js +1 -1
  148. package/lib/Toast/index.js +1 -1
  149. package/lib/Toast/styles.js +3 -3
  150. package/lib/Token/styles.js +18 -10
  151. package/lib/TokenInput/index.js +38 -35
  152. package/lib/TokenInput/styles.js +9 -7
  153. package/lib/Tooltip/index.js +2 -2
  154. package/lib/index.js +2 -2
  155. package/lib/themes/dark/decorative-palettes.js +36 -0
  156. package/lib/themes/dark/theme.js +185 -0
  157. package/lib/themes/default/decorative-palettes.js +36 -0
  158. package/lib/themes/default/literal-colors.js +156 -0
  159. package/lib/themes/default/theme.js +305 -0
  160. package/lib/types/theme.colors.flow.js +0 -0
  161. package/lib/types/theme.flow.js +1 -1
  162. package/lib/utils/mixins.js +2 -2
  163. package/lib/utils/responsiveProps/index.js +1 -1
  164. package/package.json +1 -1
  165. package/__flow__/themes/dark.js +0 -133
  166. package/__flow__/themes/light.js +0 -7
  167. package/__flow__/utils/theme.js +0 -422
  168. package/commonjs/themes/dark.js +0 -140
  169. package/commonjs/themes/light.js +0 -14
  170. package/commonjs/utils/theme.js +0 -421
  171. package/lib/themes/dark.js +0 -131
  172. package/lib/themes/light.js +0 -5
  173. package/lib/utils/theme.js +0 -402
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b69f92a: fix(token) hover styling for invalid tokens
8
+
9
+ ## 7.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 6700ead: This change allows consumers to specify whether or not a Link should be underlined. This work is part of our accessibility initiatives.
14
+
3
15
  ## 7.4.2
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  ## Installation
25
25
 
26
- Install Racine and its peer dependencies using npm or yarn:
26
+ Install Racine using npm or yarn:
27
27
 
28
28
  ```sh
29
29
  $ yarn add @sproutsocial/racine react styled-components
@@ -31,6 +31,23 @@ $ yarn add @sproutsocial/racine react styled-components
31
31
  $ npm install @sproutsocial/racine react styled-components
32
32
  ```
33
33
 
34
+ You may also require specific peer dependencies when starting a new project or sandbox environment:
35
+
36
+ ```js
37
+ @sproutsocial/seeds-border
38
+ @sproutsocial/seeds-color
39
+ @sproutsocial/seeds-depth
40
+ @sproutsocial/seeds-motion
41
+ @sproutsocial/seeds-networkcolor
42
+ @sproutsocial/seeds-space
43
+ @sproutsocial/seeds-typography
44
+ moment
45
+ prop-types
46
+ react
47
+ react-dates
48
+ styled-components
49
+ ```
50
+
34
51
  Then, wrap your app's React root in Racine's `ThemeProvider` component:
35
52
 
36
53
  ```js
@@ -15,8 +15,10 @@ const colors = {
15
15
  suggestion: "colors.neutral.900",
16
16
  };
17
17
 
18
+ console.log(themeGet(colors["secondary"]));
19
+
18
20
  const backgroundColors = {
19
- primary: "colors.cta.primary",
21
+ primary: "colors.blue.700",
20
22
  secondary: "colors.yellow.500",
21
23
  passive: "colors.neutral.200",
22
24
  common: "colors.aqua.600",
@@ -45,7 +45,8 @@ export default class Banner extends React.Component<TypeProps> {
45
45
  const { type, text, ...rest } = this.props;
46
46
  return (
47
47
  <Container
48
- type={type}
48
+ // danger needs to be properly deprecated and removed DS-1094
49
+ type={type === "danger" ? "error" : type}
49
50
  data-qa-alert={""}
50
51
  data-qa-alert-type={type}
51
52
  data-qa-alert-text={text}
@@ -15,28 +15,31 @@ const Container: StyledComponent<TypeProps, TypeTheme, *> = styled.div(
15
15
  overflow: hidden;
16
16
  align-items: center;
17
17
  justify-content: space-between;
18
- color: ${props.theme.colors.text.headline};
18
+ color: ${props.theme.colors.text.body};
19
19
  border-radius: ${props.theme.radii.outer};
20
20
  font-family: ${props.theme.fontFamily};
21
21
  ${props.theme.typography[200]}
22
22
  padding: ${props.theme.space[300]};
23
- border: 1px solid ${props.theme.colors[props.type].border};
24
- background-color: ${props.theme.colors[props.type].background};
23
+ border: 1px solid ${props.theme.colors.container.border[props.type]};
24
+ background-color: ${props.theme.colors.container.background[props.type]};
25
25
 
26
26
  .Icon {
27
27
  align-self: flex-start;
28
28
  margin-top: 3px;
29
29
  margin-right: ${props.theme.space[400]};
30
30
  min-width: 16px;
31
- color: ${props.theme.colors[props.type].icon};
31
+ color: ${props.theme.colors.icon[props.type]};
32
32
  }
33
33
 
34
34
  a,
35
35
  button {
36
36
  font-weight: ${props.theme.fontWeights.semibold};
37
- color: ${props.theme.colors.text.headline};
37
+ color: ${props.theme.colors.text.body};
38
38
  font-size: inherit;
39
- text-decoration: underline;
39
+ &:hover {
40
+ color: ${props.theme.colors.text.body};
41
+ text-decoration: underline;
42
+ }
40
43
  }
41
44
 
42
45
  > span:not(.Icon) {
@@ -3,7 +3,7 @@ import { css } from "styled-components";
3
3
  import { text } from "@storybook/addon-knobs";
4
4
  import Box from "./index";
5
5
  import useMeasure from "use-measure";
6
- import theme from "../utils/theme";
6
+ import theme from "../themes/default/theme";
7
7
 
8
8
  export default {
9
9
  title: "Box",
@@ -67,7 +67,7 @@ export const Responsive = () => {
67
67
  top: 0;
68
68
  bottom: 0;
69
69
  width: 324px;
70
- background: ${(p) => p.theme.colors.background.container};
70
+ background: ${(p) => p.theme.colors.container.background.base};
71
71
  }
72
72
 
73
73
  &:after {
@@ -78,7 +78,7 @@ export const Responsive = () => {
78
78
  bottom: 0;
79
79
  width: 64px;
80
80
  background: white;
81
- border: 1px solid ${(p) => p.theme.colors.border};
81
+ border: 1px solid ${(p) => p.theme.colors.container.border.base};
82
82
  }
83
83
  `}
84
84
  >
@@ -32,15 +32,15 @@ export type TypeContainerProps = $ReadOnly<{|
32
32
 
33
33
  type TypeBoxContainer = StyledComponent<TypeContainerProps, TypeTheme, *>;
34
34
  const Container: TypeBoxContainer = styled.div`
35
- box-sizing: border-box;
36
- font-family: ${({ theme }) => theme.fontFamily};
35
+ box-sizing: border-box;
36
+ font-family: ${({ theme }) => theme.fontFamily};
37
37
 
38
- ${COMMON}
39
- ${BORDER}
40
- ${LAYOUT}
41
- ${POSITION}
42
- ${FLEXBOX}
43
- ${GRID}
44
- `;
38
+ ${COMMON}
39
+ ${BORDER}
40
+ ${LAYOUT}
41
+ ${POSITION}
42
+ ${FLEXBOX}
43
+ ${GRID}
44
+ `;
45
45
 
46
46
  export default Container;
@@ -23,7 +23,7 @@ exports[`Racine Button should render in active state 1`] = `
23
23
  padding: 8px;
24
24
  font-size: 13px;
25
25
  color: #FFFFFF !important;
26
- background: #364141 !important;
26
+ background: #273333 !important;
27
27
  }
28
28
 
29
29
  .c0:visited {
@@ -40,7 +40,7 @@ exports[`Racine Button should render in active state 1`] = `
40
40
 
41
41
  .c0:active {
42
42
  color: #FFFFFF;
43
- background: #364141;
43
+ background: #273333;
44
44
  -webkit-transform: translateY(1px);
45
45
  -ms-transform: translateY(1px);
46
46
  transform: translateY(1px);
@@ -257,7 +257,7 @@ exports[`Racine Button should render in large size 1`] = `
257
257
 
258
258
  .c0:active {
259
259
  color: #FFFFFF;
260
- background: #364141;
260
+ background: #273333;
261
261
  -webkit-transform: translateY(1px);
262
262
  -ms-transform: translateY(1px);
263
263
  transform: translateY(1px);
@@ -475,7 +475,7 @@ exports[`Racine Button should render in secondary style 1`] = `
475
475
 
476
476
  .c0:active {
477
477
  color: #FFFFFF;
478
- background: #364141;
478
+ background: #273333;
479
479
  -webkit-transform: translateY(1px);
480
480
  -ms-transform: translateY(1px);
481
481
  transform: translateY(1px);
@@ -6,12 +6,14 @@ export type TypeProps = {
6
6
  /** If the button is being used as an anchor, this prop will cause the link to open in a new tab. */
7
7
  external?: boolean,
8
8
  size?: "large" | "default",
9
+ /** What the button looks like. "default" is deprecated in favor of "unstyled" */
9
10
  appearance?:
10
11
  | "primary"
11
12
  | "secondary"
12
13
  | "pill"
13
14
  | "destructive"
14
15
  | "default"
16
+ | "unstyled"
15
17
  | "placeholder",
16
18
  /** Set the button to display in its active state */
17
19
  active?: boolean,
@@ -33,7 +35,7 @@ export type TypeProps = {
33
35
 
34
36
  const Button = ({
35
37
  href,
36
- appearance = "default",
38
+ appearance = "unstyled",
37
39
  active = false,
38
40
  disabled,
39
41
  external,
@@ -53,6 +55,9 @@ const Button = ({
53
55
  );
54
56
  }
55
57
 
58
+ // plans to properly deprecate captured in DS-1096
59
+ const appearanceCheck = appearance === "default" ? "unstyled" : appearance;
60
+
56
61
  return (
57
62
  <Container
58
63
  title={title}
@@ -65,7 +70,7 @@ const Button = ({
65
70
  aria-disabled={disabled ? disabled : undefined}
66
71
  disabled={disabled}
67
72
  buttonSize={size}
68
- appearance={appearance}
73
+ appearance={appearanceCheck}
69
74
  ref={innerRef}
70
75
  onClick={onClick}
71
76
  data-qa-button={title || ""}
@@ -9,7 +9,12 @@ export default {
9
9
  };
10
10
 
11
11
  export const defaultStory = () => (
12
- <Button onClick={() => alert("Testing...")}>Default</Button>
12
+ <Button
13
+ appearance={text("appearance", "default")}
14
+ onClick={() => alert("Testing...")}
15
+ >
16
+ Default
17
+ </Button>
13
18
  );
14
19
 
15
20
  defaultStory.story = {
@@ -12,12 +12,13 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
12
12
  text-align: center;
13
13
  font-family: ${(props) => props.theme.fontFamily};
14
14
  border: 1px solid
15
- ${(props) => props.theme.colors.cta[props.appearance].borderColor};
15
+ ${(props) => props.theme.colors.button[props.appearance].border.base};
16
16
  border-radius: ${(props) => props.theme.radii[500]};
17
17
  border-style: ${(props) =>
18
18
  props.appearance === "placeholder" ? "dashed" : "solid"};
19
- background: ${(props) => props.theme.colors.cta[props.appearance].background};
20
- color: ${(props) => props.theme.colors.cta[props.appearance].color};
19
+ background: ${(props) =>
20
+ props.theme.colors.button[props.appearance].background.base};
21
+ color: ${(props) => props.theme.colors.button[props.appearance].text.base};
21
22
  cursor: pointer;
22
23
  text-decoration: none;
23
24
  /**
@@ -41,22 +42,22 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
41
42
  : props.theme.typography[300].fontSize};
42
43
 
43
44
  &:visited {
44
- color: ${(props) => props.theme.colors.cta[props.appearance].color};
45
+ color: ${(props) => props.theme.colors.button[props.appearance].text.base};
45
46
  }
46
47
 
47
48
  &:hover {
48
- color: ${(props) => props.theme.colors.cta[props.appearance].hoverColor};
49
+ color: ${(props) => props.theme.colors.button[props.appearance].text.hover};
49
50
  background: ${(props) =>
50
- props.theme.colors.cta[props.appearance].hoverBackground};
51
+ props.theme.colors.button[props.appearance].background.hover};
51
52
  text-decoration: none;
52
53
  box-shadow: ${(props) =>
53
54
  props.appearance === "placeholder" ? props.theme.shadows[100] : "none"};
54
55
  }
55
56
 
56
57
  &:active {
57
- color: ${(props) => props.theme.colors.cta[props.appearance].hoverColor};
58
+ color: ${(props) => props.theme.colors.button[props.appearance].text.hover};
58
59
  background: ${(props) =>
59
- props.theme.colors.cta[props.appearance].activeBackground};
60
+ props.theme.colors.button[props.appearance].background.active};
60
61
  transform: translateY(1px);
61
62
  }
62
63
 
@@ -71,9 +72,10 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
71
72
  ${(props) =>
72
73
  props.active &&
73
74
  css`
74
- color: ${props.theme.colors.cta[props.appearance].hoverColor} !important;
75
- background: ${props.theme.colors.cta[props.appearance]
76
- .activeBackground} !important;
75
+ color: ${props.theme.colors.button[props.appearance].text
76
+ .hover} !important;
77
+ background: ${props.theme.colors.button[props.appearance].background
78
+ .active} !important;
77
79
  `}
78
80
 
79
81
  ${(props) => props.disabled && disabled}
@@ -84,7 +86,8 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
84
86
  display: inline-flex;
85
87
  align-items: center;
86
88
  justify-content: center;
87
- mix-blend-mode: multiply;
89
+ /* This solution is temporary. DS-1095 */
90
+ mix-blend-mode: ${props.theme.mode ? "screen" : "multiply"};
88
91
 
89
92
  ${pill}
90
93
  `}
@@ -98,3 +101,5 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
98
101
  `;
99
102
 
100
103
  export default Container;
104
+
105
+ //${props.theme.mode === "dark" ? "screen" : "multiply"}
@@ -26,9 +26,9 @@ const Card = ({
26
26
  ariaLabel,
27
27
  buttonProps = {},
28
28
  border = 500,
29
- borderColor = "border",
29
+ borderColor = "container.border.base",
30
30
  color = "text.body",
31
- bg = "background.container",
31
+ bg = "container.background.base",
32
32
  ...rest
33
33
  }: TypeProps) => {
34
34
  return (
@@ -12,7 +12,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
12
12
  font-variant-numeric: tabular-nums;
13
13
  color: ${(props) =>
14
14
  props.overlimit
15
- ? props.theme.colors.error.color
15
+ ? props.theme.colors.text.error
16
16
  : props.theme.colors.text.subtext};
17
17
 
18
18
  ${(p) =>
@@ -25,13 +25,13 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
25
25
  ${(props) =>
26
26
  props.inline &&
27
27
  css`
28
- display: flex;
29
- justify-content: center;
28
+ display: flex;
29
+ justify-content: center;
30
30
 
31
- ${Label} + ${Label} {
32
- margin-left: ${(props) => props.theme.space[450]};
33
- }
34
- `}
31
+ ${Label} + ${Label} {
32
+ margin-left: ${(props) => props.theme.space[450]};
33
+ }
34
+ `}
35
35
 
36
36
  ${COMMON}
37
37
  ${LAYOUT}
@@ -34,11 +34,12 @@ export const InputWrapper = styled<typeof Box, TypeTheme, any>(Box)`
34
34
  background-color: transparent;
35
35
  transition: all ${(props) => props.theme.duration.fast}
36
36
  ${(props) => props.theme.easing.ease_inout};
37
- mix-blend-mode: multiply;
37
+ /* This solution is temporary. DS-1095 */
38
+ mix-blend-mode: ${props.theme.mode ? "screen" : "multiply"};
38
39
  ${pill}
39
40
 
40
41
  &:hover {
41
- background-color: ${props.theme.colors.background.app};
42
+ background-color: ${props.theme.colors.app.background.base};
42
43
  }
43
44
 
44
45
  ${PillInput} {
@@ -54,9 +55,9 @@ export const CheckboxBox: StyledComponent<{ ... }, TypeTheme, *> = styled.div`
54
55
  position: relative;
55
56
  width: ${(props) => props.theme.space[400]};
56
57
  height: ${(props) => props.theme.space[400]};
57
- border: 1px solid ${(props) => props.theme.colors.forms.borderColor};
58
+ border: 1px solid ${(props) => props.theme.colors.form.border.base};
58
59
  border-radius: 4px;
59
- background-color: ${(props) => props.theme.colors.background.container};
60
+ background-color: ${(props) => props.theme.colors.form.background.base};
60
61
  transition: border-color ${(props) => props.theme.duration.fast}
61
62
  ${(props) => props.theme.easing.ease_in},
62
63
  background-color ${(props) => props.theme.duration.fast}
@@ -116,7 +117,7 @@ export const PillInput: StyledComponent<any, TypeTheme, *> = styled.input`
116
117
  &:focus {
117
118
  ~ ${CheckboxBox} ${CheckIcon} {
118
119
  opacity: ${(props) => (props.disabled ? 0 : 1)};
119
- color: ${props.theme.colors.forms.borderColor};
120
+ color: ${props.theme.colors.form.border.base};
120
121
  }
121
122
  }
122
123
  `}
@@ -125,8 +126,8 @@ export const PillInput: StyledComponent<any, TypeTheme, *> = styled.input`
125
126
  props.checked &&
126
127
  css`
127
128
  ~ ${CheckboxBox} {
128
- border-color: ${props.theme.colors.selection.border};
129
- background-color: ${props.theme.colors.selection.background};
129
+ border-color: ${props.theme.colors.form.border.selected};
130
+ background-color: ${props.theme.colors.form.background.selected};
130
131
  }
131
132
  ~ ${CheckboxBox} ${CheckIcon} {
132
133
  opacity: 1;
@@ -195,8 +196,8 @@ export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span
195
196
  props.indeterminate ? "indeterminate" : "check",
196
197
 
197
198
  props.checked
198
- ? props.theme.colors.background.container
199
- : props.theme.colors.forms.borderColor
199
+ ? props.theme.colors.form.background.base
200
+ : props.theme.colors.form.border.base
200
201
  )}");
201
202
  opacity: ${props.checked ? 1 : 0};
202
203
  position: absolute;
@@ -227,9 +228,9 @@ export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span
227
228
  padding: 0;
228
229
  width: ${props.theme.space[400]};
229
230
  height: ${props.theme.space[400]};
230
- border: 1px solid ${props.theme.colors.forms.borderColor};
231
+ border: 1px solid ${props.theme.colors.form.border.base};
231
232
  border-radius: 4px;
232
- background-color: ${props.theme.colors.background.container};
233
+ background-color: ${props.theme.colors.form.background.base};
233
234
  transition: all ${props.theme.duration.fast}
234
235
  ${props.theme.easing.ease_in};
235
236
  cursor: ${props.disabled ? "not-allowed" : "pointer"};
@@ -240,20 +241,21 @@ export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span
240
241
  css`
241
242
  border-color: ${props.theme.colors
242
243
  .neutral[300]} !important; /* We don't want the focus ring to remove the border */
243
- background-color: ${props.theme.colors.background.container};
244
+ background-color: ${props.theme.colors.form.background.base};
244
245
  `}
245
246
  }
246
247
 
247
248
  &:checked {
248
- border-color: ${props.theme.colors.selection.border};
249
- background-color: ${props.theme.colors.selection.background};
249
+ border-color: ${props.theme.colors.form.border.selected};
250
+ background-color: ${props.theme.colors.form.background.selected};
250
251
  }
251
252
 
252
253
  ${props.indeterminate &&
253
254
  props.checked &&
254
255
  css`
255
- border-color: ${props.theme.colors.selection.border} !important;
256
- background-color: ${props.theme.colors.selection} !important;
256
+ border-color: ${props.theme.colors.form.border.selected} !important;
257
+ background-color: ${props.theme.colors.form.background
258
+ .selected} !important;
257
259
  `}
258
260
 
259
261
  &:focus {
@@ -26,7 +26,7 @@ export default {
26
26
 
27
27
  export const defaultStory = () => (
28
28
  <StatefulCollapse>
29
- <Box width="100%" height="200px" bg="neutral.200" p={400}>
29
+ <Box width="100%" height="200px" bg="container.background.base" p={400}>
30
30
  <Button appearance="secondary">A button</Button>
31
31
  </Box>
32
32
  </StatefulCollapse>
@@ -38,7 +38,7 @@ defaultStory.story = {
38
38
 
39
39
  export const initialIsOpen = () => (
40
40
  <StatefulCollapse initialIsOpen>
41
- <Box width="100%" height="200px" bg="neutral.200" p={400}>
41
+ <Box width="100%" height="200px" bg="container.background.base" p={400}>
42
42
  <Button appearance="secondary">A button</Button>
43
43
  </Box>
44
44
  </StatefulCollapse>
@@ -50,7 +50,13 @@ initialIsOpen.story = {
50
50
 
51
51
  export const withOffset = () => (
52
52
  <StatefulCollapse offset={100}>
53
- <Box width="100%" height="200px" bg="neutral.200" p={400} mt="100px">
53
+ <Box
54
+ width="100%"
55
+ height="200px"
56
+ bg="container.background.base"
57
+ p={400}
58
+ mt="100px"
59
+ >
54
60
  <Button appearance="secondary">A button</Button>
55
61
  </Box>
56
62
  </StatefulCollapse>
@@ -62,7 +68,7 @@ withOffset.story = {
62
68
 
63
69
  export const withShortContent = () => (
64
70
  <StatefulCollapse>
65
- <Box width="15%" height="50px" bg="neutral.200" p={400}>
71
+ <Box width="15%" height="50px" bg="container.background.base" p={400}>
66
72
  Hello.
67
73
  </Box>
68
74
  </StatefulCollapse>
@@ -74,7 +80,7 @@ withShortContent.story = {
74
80
 
75
81
  export const withTallContent = () => (
76
82
  <StatefulCollapse>
77
- <Box width="15%" height="200vh" bg="neutral.200" p={400}>
83
+ <Box width="15%" height="200vh" bg="container.background.base" p={400}>
78
84
  Hello.
79
85
  </Box>
80
86
  </StatefulCollapse>
@@ -2,6 +2,7 @@
2
2
  import styled, { createGlobalStyle, css } from "styled-components";
3
3
  import moment from "moment";
4
4
  import Box from "../Box";
5
+ import { disabled } from "../utils/mixins";
5
6
  import type { TypeTheme } from "../types/theme.flow";
6
7
 
7
8
  /*
@@ -61,8 +62,8 @@ export const CalendarDay = styled<typeof Box, TypeTheme, *>(Box)`
61
62
  ${({ modifiers, day, theme }) => {
62
63
  if (isSelected(modifiers)) {
63
64
  return css`
64
- background-color: ${theme.colors.selection.background};
65
- color: ${theme.colors.selection.color};
65
+ background-color: ${theme.colors.container.background.selected};
66
+ color: ${theme.colors.text.inverse};
66
67
  margin-left: ${shouldHaveLeftPill(modifiers, day) && theme.space[200]};
67
68
  margin-right: ${shouldHaveRightPill(modifiers, day) &&
68
69
  theme.space[200]};
@@ -81,11 +82,12 @@ export const CalendarDay = styled<typeof Box, TypeTheme, *>(Box)`
81
82
  return css`
82
83
  margin: 0 ${theme.space[200]};
83
84
  border-radius: ${theme.radii.pill};
84
- border: 1px solid ${theme.colors.selection.border};
85
+ border: 1px solid ${theme.colors.container.border.selected};
85
86
  `;
86
87
  } else if (isOutOfRange(modifiers)) {
87
88
  return css`
88
- color: ${theme.colors.selection.disabledColor};
89
+ color: ${theme.colors.text.subtext};
90
+ ${disabled};
89
91
  `;
90
92
  }
91
93
  }};
@@ -107,7 +109,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
107
109
 
108
110
  &_weekHeader {
109
111
  color: ${({ theme }) => theme.colors.text.headline};
110
- border-bottom: 1px solid ${({ theme }) => theme.colors.border};
112
+ border-bottom: 1px solid ${({ theme }) => theme.colors.container.border.base};
111
113
 
112
114
  /* Magic number to match position of .CalendarMonth_caption */
113
115
  top: 26px;
@@ -134,7 +136,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
134
136
 
135
137
  &__horizontal {
136
138
  box-shadow: none;
137
- background: ${({ theme }) => theme.colors.background.container};
139
+ background: ${({ theme }) => theme.colors.container.background.base};
138
140
  }
139
141
  }
140
142
 
@@ -157,7 +159,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
157
159
 
158
160
  .CalendarMonth {
159
161
  ${({ theme }) => theme.typography[200]}
160
- background: ${({ theme }) => theme.colors.background.container};
162
+ background: ${({ theme }) => theme.colors.container.background.base};
161
163
 
162
164
  /* spacing between visible months and months off canvas */
163
165
  padding: 0 15px;
@@ -166,7 +168,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
166
168
  ${({ theme }) => theme.typography[200]}
167
169
  color: ${({ theme }) => theme.colors.text.headline};
168
170
  padding-top: 0;
169
- background: ${({ theme }) => theme.colors.background.container};
171
+ background: ${({ theme }) => theme.colors.container.background.base};
170
172
 
171
173
  strong {
172
174
  font-weight: ${({ theme }) => theme.fontWeights.semibold};
@@ -186,19 +188,19 @@ export const ReactDatesCssOverrides = createGlobalStyle`
186
188
  }
187
189
 
188
190
  .CalendarMonthGrid {
189
- background: ${({ theme }) => theme.colors.background.container};
191
+ background: ${({ theme }) => theme.colors.container.background.base};
190
192
  }
191
193
 
192
194
  /* Left and Right Arrow Buttons to navigate months */
193
195
  .DayPickerNavigation_button__horizontal {
194
- color: ${({ theme }) => theme.colors.cta.pill.color};
196
+ color: ${({ theme }) => theme.colors.button.pill.text.base};
195
197
  top: -4px;
196
198
  padding: 7px 8px;
197
199
  position: absolute;
198
200
  line-height: 0.78;
199
201
  border-radius: 9999px;
200
202
  border: none;
201
- background: ${({ theme }) => theme.colors.cta.pill.background};
203
+ background: ${({ theme }) => theme.colors.button.pill.background.base};
202
204
 
203
205
  &:nth-child(1) {
204
206
  left: 22px;
@@ -208,7 +210,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
208
210
  }
209
211
 
210
212
  &:hover {
211
- background: ${({ theme }) => theme.colors.cta.pill.hoverBackground};
213
+ background: ${({ theme }) => theme.colors.button.pill.background.hover};
212
214
  }
213
215
  }
214
216
  `;
@@ -16,7 +16,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
16
16
  top: 0;
17
17
  height: 100%;
18
18
  width: ${(props) => props.width}px;
19
- background-color: ${(props) => props.theme.colors.background.container};
19
+ background-color: ${(props) => props.theme.colors.container.background.base};
20
20
  box-shadow: ${(props) => props.theme.shadows[400]};
21
21
  filter: blur(0);
22
22
 
@@ -81,7 +81,7 @@ const FormField = ({
81
81
  <Text
82
82
  as="div"
83
83
  fontSize={200}
84
- color="error.color"
84
+ color="text.error"
85
85
  mt={300}
86
86
  id={errorId}
87
87
  data-qa-formfield-error={