@sproutsocial/racine 10.0.0 → 10.0.1-dependencies.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.
@@ -14,9 +14,4 @@ describe("Avatar", () => {
14
14
  const { container } = render(<Avatar name="Test User" />);
15
15
  expect(container.textContent).toEqual("TU");
16
16
  });
17
-
18
- it("should set the correct font size", () => {
19
- const { getByText } = render(<Avatar name="Test User" />);
20
- expect(getByText("TU")).toHaveStyleRule("font-size", "16px");
21
- });
22
17
  });
@@ -10,11 +10,6 @@ describe("Racine Badge", () => {
10
10
  expect(getByDataQaLabel({ "badge-type": "primary" })).toBeTruthy();
11
11
  });
12
12
 
13
- it("should render with correct size styling", () => {
14
- const { getByText } = render(<Badge text="Test" size="small" />);
15
- expect(getByText("Test")).toHaveStyleRule("padding", "4px 8px");
16
- });
17
-
18
13
  it("should render with secondary type", () => {
19
14
  const { getByText, getByDataQaLabel } = render(
20
15
  <Badge text="Test" type="secondary" />
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { boolean, text, number } from "@storybook/addon-knobs";
3
2
  import Button from "./index";
4
3
  import Icon from "../Icon";
5
4
  import Box from "../Box";
@@ -8,155 +7,140 @@ export default {
8
7
  title: "Button",
9
8
  };
10
9
 
11
- export const defaultStory = () => (
12
- <Button
13
- appearance={text("appearance", "default")}
14
- onClick={() => alert("Testing...")}
15
- >
10
+ export const defaultStory = (args) => (
11
+ <Button {...args} onClick={() => alert("Testing...")}>
16
12
  Default
17
13
  </Button>
18
14
  );
19
15
 
16
+ defaultStory.args = { appearance: "default" };
17
+
20
18
  defaultStory.story = {
21
19
  name: "Default",
22
20
  };
23
21
 
24
- export const primary = () => (
25
- <Button
26
- appearance={text("appearance", "primary")}
27
- onClick={() => alert("Testing...")}
28
- >
22
+ export const primary = (args) => (
23
+ <Button {...args} onClick={() => alert("Testing...")}>
29
24
  Primary Button
30
25
  </Button>
31
26
  );
32
27
 
28
+ primary.args = { appearance: "primary" };
29
+
33
30
  primary.story = {
34
31
  name: "Primary",
35
32
  };
36
33
 
37
- export const secondary = () => (
38
- <Button appearance={text("appearance", "secondary")}>Secondary Button</Button>
39
- );
34
+ export const secondary = (args) => <Button {...args}>Secondary Button</Button>;
35
+
36
+ secondary.args = { appearance: "secondary" };
40
37
 
41
38
  secondary.story = {
42
39
  name: "Secondary",
43
40
  };
44
41
 
45
- export const destructive = () => (
46
- <Button appearance={text("appearance", "destructive")}>
47
- Destructive Button
48
- </Button>
42
+ export const destructive = (args) => (
43
+ <Button {...args}>Destructive Button</Button>
49
44
  );
50
45
 
46
+ destructive.args = { appearance: "destructive" };
51
47
  destructive.story = {
52
48
  name: "Destructive",
53
49
  };
54
50
 
55
- export const placeholder = () => (
56
- <Button appearance={text("appearance", "placeholder")}>
57
- Placeholder Button
58
- </Button>
51
+ export const placeholder = (args) => (
52
+ <Button {...args}>Placeholder Button</Button>
59
53
  );
60
54
 
55
+ placeholder.args = { appearance: "placeholder" };
61
56
  placeholder.story = {
62
57
  name: "Placeholder",
63
58
  };
64
59
 
65
- export const largeButton = () => (
66
- <Button
67
- appearance={text("appearance", "primary")}
68
- size={text("size", "large")}
69
- >
70
- Large Button
71
- </Button>
72
- );
60
+ export const largeButton = (args) => <Button {...args}>Large Button</Button>;
61
+ largeButton.args = { size: "large", appearance: "primary" };
73
62
 
74
63
  largeButton.story = {
75
64
  name: "Large button",
76
65
  };
77
66
 
78
- export const pillButton = () => (
67
+ export const pillButton = (args) => (
79
68
  <Box bg="container.background.base" p={400}>
80
- <Button appearance={text("shape", "pill")}>
69
+ <Button {...args}>
81
70
  <Icon name="reply" mr={350} />
82
71
  Pill Button
83
72
  </Button>
84
73
  </Box>
85
74
  );
86
-
75
+ pillButton.args = { appearance: "pill" };
87
76
  pillButton.story = {
88
77
  name: "Pill button",
89
78
  };
90
79
 
91
- export const pillIconOnlyButton = () => (
80
+ export const pillIconOnlyButton = (args) => (
92
81
  <Box bg="container.background.base" p={400}>
93
- <Button appearance={text("shape", "pill")} ariaLabel="This is a label">
82
+ <Button {...args} ariaLabel="This is a label">
94
83
  <Icon name="circle-check-outline" />
95
84
  </Button>
96
85
  </Box>
97
86
  );
98
87
 
88
+ pillIconOnlyButton.args = { appearance: "pill" };
99
89
  pillIconOnlyButton.story = {
100
90
  name: "Pill icon only button",
101
91
  };
102
92
 
103
- export const activeButton = () => (
104
- <Button
105
- appearance={text("appearance", "secondary")}
106
- active={boolean("active", true)}
107
- >
108
- Active Button
109
- </Button>
110
- );
93
+ export const activeButton = (args) => <Button {...args}>Active Button</Button>;
111
94
 
95
+ activeButton.args = { appearance: "secondary", active: true };
112
96
  activeButton.story = {
113
97
  name: "Active button",
114
98
  };
115
99
 
116
- export const buttonAsALink = () => (
117
- <Button
118
- href={text("href", "http://sproutsocial.style")}
119
- external={boolean("external", true)}
120
- appearance={text("appearance", "primary")}
121
- >
122
- Button using anchor element
123
- </Button>
100
+ export const buttonAsALink = (args) => (
101
+ <Button {...args}>Button using anchor element</Button>
124
102
  );
125
-
103
+ buttonAsALink.args = {
104
+ appearance: "primary",
105
+ external: true,
106
+ href: "http://sproutsocial.style",
107
+ };
126
108
  buttonAsALink.story = {
127
109
  name: "Button as a link",
128
110
  };
129
111
 
130
- export const disabledButton = () => (
131
- <Button
132
- appearance={text("appearance", "primary")}
133
- disabled={text("disabled", "true")}
134
- >
135
- This Button is disabled
136
- </Button>
112
+ export const disabledButton = (args) => (
113
+ <Button {...args}>This Button is disabled</Button>
137
114
  );
138
-
115
+ disabledButton.args = {
116
+ appearance: "primary",
117
+ disabled: true,
118
+ };
139
119
  disabledButton.story = {
140
120
  name: "Disabled button",
141
121
  };
142
122
 
143
- export const fullWidthButton = () => (
144
- <Button appearance={text("appearance", "primary")} width={number("width", 1)}>
145
- Full-Width Button
146
- </Button>
123
+ export const fullWidthButton = (args) => (
124
+ <Button {...args}>Full-Width Button</Button>
147
125
  );
148
-
126
+ fullWidthButton.args = {
127
+ appearance: "primary",
128
+ width: 1,
129
+ };
149
130
  fullWidthButton.story = {
150
131
  name: "Full width button",
151
132
  };
152
133
 
153
- export const withIcon = () => (
154
- <Button appearance={text("appearance", "secondary")}>
134
+ export const withIcon = (args) => (
135
+ <Button {...args}>
155
136
  <Icon name="twitter" mr={350} />
156
137
  Secondary Button
157
138
  </Button>
158
139
  );
159
140
 
141
+ withIcon.args = {
142
+ appearance: "secondary",
143
+ };
160
144
  withIcon.story = {
161
145
  name: "With icon",
162
146
  };
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import { render } from "../utils/react-testing-library";
3
3
  import "jest-styled-components";
4
4
  import CharacterCounter from "./";
5
- import { COLOR_RED_800 } from "@sproutsocial/seeds-color";
6
5
 
7
6
  describe.only("CharacterCounter", () => {
8
7
  it("should render properly", () => {
@@ -13,11 +12,4 @@ describe.only("CharacterCounter", () => {
13
12
 
14
13
  expect(getByText(remainingNumber.toString())).toBeTruthy();
15
14
  });
16
-
17
- it("should render properly with overlimit values", () => {
18
- const { getByText } = render(
19
- <CharacterCounter currentValue={2} maxValue={1} />
20
- );
21
- expect(getByText("-1")).toHaveStyleRule("color", COLOR_RED_800);
22
- });
23
15
  });
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import { render } from "../utils/react-testing-library";
3
3
  import "jest-styled-components";
4
4
  import ChartLegend from "./";
5
- import { CONTRAST_THEME, COMPARE_THEME } from "../utils/chartColors";
6
5
 
7
6
  describe("ChartLegend", () => {
8
7
  let legendLabelsArray = [{ name: "Label One" }, { name: "Label Two" }];
@@ -15,40 +14,4 @@ describe("ChartLegend", () => {
15
14
  expect(getByText("Label One")).toBeTruthy();
16
15
  expect(getByText("Label Two")).toBeTruthy();
17
16
  });
18
-
19
- it("should render the correct theme", () => {
20
- const { getAllByDataQaLabel } = render(
21
- <ChartLegend legendLabels={legendLabelsArray} theme="contrast" />
22
- );
23
-
24
- expect(getAllByDataQaLabel({ swatch: "" })[0]).toHaveStyleRule(
25
- "background-color",
26
- CONTRAST_THEME[0]
27
- );
28
-
29
- expect(getAllByDataQaLabel({ swatch: "" })[1]).toHaveStyleRule(
30
- "background-color",
31
- CONTRAST_THEME[1]
32
- );
33
- });
34
-
35
- it("should display a custom color", () => {
36
- const newLegendLabelsArray = [
37
- { name: "Label One", color: "#000" },
38
- { name: "Label Two" },
39
- ];
40
- const { getAllByDataQaLabel } = render(
41
- <ChartLegend legendLabels={newLegendLabelsArray} />
42
- );
43
-
44
- expect(getAllByDataQaLabel({ swatch: "" })[0]).toHaveStyleRule(
45
- "background-color",
46
- "#000"
47
- );
48
-
49
- expect(getAllByDataQaLabel({ swatch: "" })[1]).toHaveStyleRule(
50
- "background-color",
51
- COMPARE_THEME[1]
52
- );
53
- });
54
17
  });
@@ -97,7 +97,6 @@ describe("EmptyState", () => {
97
97
  );
98
98
  const element = getByText("Reload Page");
99
99
  expect(element).toBeTruthy();
100
- expect(element).toHaveStyleRule("color", "#FFFFFF");
101
100
  });
102
101
 
103
102
  it("should render a secondary button", async () => {
@@ -105,7 +104,7 @@ describe("EmptyState", () => {
105
104
  <EmptyState
106
105
  media={
107
106
  <Image
108
- alt="No assets matching yoursearch or filters"
107
+ alt="No assets matching your search or filters"
109
108
  src="https://cl.ly/db498c7682df/download/analytics.svg"
110
109
  m={0}
111
110
  />
@@ -118,6 +117,5 @@ describe("EmptyState", () => {
118
117
  );
119
118
  const element = getByText("I'll do this later");
120
119
  expect(element).toBeTruthy();
121
- expect(element).toHaveStyleRule("color", "#515e5f");
122
120
  });
123
121
  });
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import "jest-styled-components";
3
3
  import { render } from "../utils/react-testing-library";
4
4
  import Link from "./";
5
- import { TYPOGRAPHY_SIZE_600 } from "@sproutsocial/seeds-typography";
6
5
 
7
6
  describe("Racine Link", () => {
8
7
  it("should render in an anchor tag", () => {
@@ -83,10 +82,6 @@ describe("Racine Link", () => {
83
82
  );
84
83
 
85
84
  expect(getByText("Link as span").tagName).toEqual("SPAN");
86
- expect(getByText("Link as span")).toHaveStyleRule(
87
- "font-size",
88
- TYPOGRAPHY_SIZE_600.fontSize
89
- );
90
85
  });
91
86
 
92
87
  it("Has type attribute as button when rendered as a button element", () => {
@@ -99,9 +94,4 @@ describe("Racine Link", () => {
99
94
  expect(getByText("Link").type).toBeFalsy();
100
95
  expect(getByText("Link").type).not.toEqual("button");
101
96
  });
102
-
103
- it("Can render with an underline", () => {
104
- const { getByText } = render(<Link underline>Link</Link>);
105
- expect(getByText("Link")).toHaveStyleRule("text-decoration", "underline");
106
- });
107
97
  });
@@ -1,8 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Listbox AsListbox multiselect should match snapshot 1`] = `
4
- <body>
5
- .c5 {
4
+ .c5 {
6
5
  display: inline-block;
7
6
  color: inherit;
8
7
  vertical-align: middle;
@@ -20,12 +19,12 @@ exports[`Listbox AsListbox multiselect should match snapshot 1`] = `
20
19
  width: 16px;
21
20
  }
22
21
 
23
- _:-ms-fullscreen .c5,
22
+ _:-ms-fullscreen .c4,
24
23
  html .c5 {
25
24
  width: 16px;
26
25
  }
27
26
 
28
- .pdf-page .c5 {
27
+ .pdf-page .c4 {
29
28
  width: 16px;
30
29
  }
31
30
 
@@ -131,7 +130,8 @@ html .c5 {
131
130
  transform: none;
132
131
  }
133
132
 
134
- <div>
133
+ <body>
134
+ <div>
135
135
  <div
136
136
  class="c0"
137
137
  >
@@ -185,12 +185,12 @@ exports[`Listbox AsListbox should match snapshot 1`] = `
185
185
  fill: currentColor;
186
186
  }
187
187
 
188
- _:-ms-fullscreen .c6,
188
+ _:-ms-fullscreen .c5,
189
189
  html .c6 {
190
190
  width: 16px;
191
191
  }
192
192
 
193
- .pdf-page .c6 {
193
+ .pdf-page .c5 {
194
194
  width: 16px;
195
195
  }
196
196
 
@@ -375,8 +375,7 @@ html .c6 {
375
375
  `;
376
376
 
377
377
  exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
378
- <body>
379
- .c0 {
378
+ .c0 {
380
379
  box-sizing: border-box;
381
380
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
382
381
  margin: 0px;
@@ -550,7 +549,8 @@ exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
550
549
  }
551
550
  }
552
551
 
553
- <div>
552
+ <body>
553
+ <div>
554
554
  <ul
555
555
  aria-activedescendant="MenuItem-28"
556
556
  aria-multiselectable="true"
@@ -673,8 +673,7 @@ exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
673
673
  `;
674
674
 
675
675
  exports[`Listbox AsListbox with filter input should match snapshot 1`] = `
676
- <body>
677
- .c0 {
676
+ .c0 {
678
677
  box-sizing: border-box;
679
678
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
680
679
  margin: 0px;
@@ -905,7 +904,8 @@ exports[`Listbox AsListbox with filter input should match snapshot 1`] = `
905
904
  }
906
905
  }
907
906
 
908
- <div>
907
+ <body>
908
+ <div>
909
909
  <ul
910
910
  aria-activedescendant="MenuItem-34"
911
911
  aria-multiselectable="true"
@@ -8,18 +8,4 @@ describe("Loader", () => {
8
8
  const { getByText } = render(<Loader />);
9
9
  expect(getByText("Loading")).toBeTruthy();
10
10
  });
11
-
12
- it("should render with small size class", () => {
13
- const { getByDataQaLabel } = render(<Loader size="small" />);
14
- expect(getByDataQaLabel({ loader: "" })).toHaveStyleRule("width", "20px");
15
- });
16
-
17
- it("should render with light theme", () => {
18
- const { getByDataQaLabel } = render(<Loader color="light" />);
19
- expect(getByDataQaLabel({ loader: "" })).toHaveStyleRule(
20
- "border-color",
21
- "rgba(255,255,255,0.3) rgba(255,255,255,0.3) rgba(255,255,255,0.7) rgba(255,255,255,0.7)",
22
- { modifier: ":after" }
23
- );
24
- });
25
11
  });
@@ -270,8 +270,7 @@ exports[`Menu AsMenu should match snapshot 1`] = `
270
270
  `;
271
271
 
272
272
  exports[`Menu AsMenuButton should match snapshot 1`] = `
273
- <body>
274
- .c3 {
273
+ .c3 {
275
274
  display: inline-block;
276
275
  color: inherit;
277
276
  vertical-align: middle;
@@ -284,12 +283,12 @@ exports[`Menu AsMenuButton should match snapshot 1`] = `
284
283
  fill: currentColor;
285
284
  }
286
285
 
287
- _:-ms-fullscreen .c3,
286
+ _:-ms-fullscreen .c2,
288
287
  html .c3 {
289
288
  width: 16px;
290
289
  }
291
290
 
292
- .pdf-page .c3 {
291
+ .pdf-page .c2 {
293
292
  width: 16px;
294
293
  }
295
294
 
@@ -357,7 +356,8 @@ html .c3 {
357
356
  display: inline-block;
358
357
  }
359
358
 
360
- <div>
359
+ <body>
360
+ <div>
361
361
  <div
362
362
  class="c0"
363
363
  >
@@ -7,25 +7,6 @@ import { COLOR_PURPLE_300 } from "@sproutsocial/seeds-color";
7
7
  afterEach(() => cleanup());
8
8
 
9
9
  describe("Modal", () => {
10
- it("renders a custom background color", () => {
11
- // Use baseElement since it renders in a Portal
12
- const { baseElement } = render(
13
- <Modal
14
- isOpen={true}
15
- label="Label"
16
- bg={COLOR_PURPLE_300}
17
- onClose={() => {}}
18
- closeButtonLabel="Close this dialog"
19
- >
20
- ajdsfljasdlfjlasdjf
21
- </Modal>
22
- );
23
- expect(baseElement.querySelector(".ReactModal__Content")).toHaveStyleRule(
24
- "background-color",
25
- COLOR_PURPLE_300
26
- );
27
- });
28
-
29
10
  it("should close on overlay click and esc", () => {
30
11
  const onClose = jest.fn();
31
12
  const { baseElement, getByText, getByLabelText } = render(
@@ -6,7 +6,6 @@ import styled, {
6
6
  } from "styled-components";
7
7
  import { width, zIndex } from "styled-system";
8
8
  import ReactModal from "react-modal";
9
- import { transparentize } from "polished";
10
9
  import Box from "../Box";
11
10
  import { COMMON } from "../utils/system-props";
12
11
 
@@ -62,8 +61,7 @@ export const Container: StyledComponent<any, TypeTheme, *> = styled(ReactModalAd
62
61
  display: flex;
63
62
  align-items: center;
64
63
  justify-content: center;
65
- background-color: ${(props) =>
66
- transparentize(0.32, props.theme.colors.neutral[1000])};
64
+ background-color: ${(props) => props.theme.colors.overlay.background.base};
67
65
  opacity: 0;
68
66
  will-change: opacity;
69
67
  transition: opacity ${(props) => props.theme.duration.medium}
@@ -4,49 +4,10 @@ import "jest-styled-components";
4
4
  import Text from "./";
5
5
 
6
6
  describe("Text", () => {
7
- it("does not set word break or truncated styles by default", () => {
8
- const { getByDataQaLabel } = render(<Text children="Default" />);
9
- const component = getByDataQaLabel({ text: "Default" });
10
- expect(component).not.toHaveStyleRule("word-break", "break-word");
11
- expect(component).not.toHaveStyleRule("text-overflow", "ellipsis");
12
- });
13
-
14
- it("sets word break styles when breakWord is true", () => {
15
- const { getByDataQaLabel } = render(
16
- <Text breakWord children="Word Break" />
17
- );
18
- const component = getByDataQaLabel({ text: "Word Break" });
19
- expect(component).toHaveStyleRule("word-break", "break-word");
20
- });
21
-
22
- it("sets truncated styles when truncated is true", () => {
23
- const { getByDataQaLabel } = render(
24
- <Text truncated children="Truncated" />
25
- );
26
- const component = getByDataQaLabel({ text: "Truncated" });
27
- expect(component).toHaveStyleRule("text-overflow", "ellipsis");
28
- });
29
-
30
- it("is italic when isItalicized is true", () => {
31
- const { getByDataQaLabel } = render(
32
- <Text isItalicized children="Italicized" />
33
- );
34
- const component = getByDataQaLabel({ text: "Italicized" });
35
- expect(component).toHaveStyleRule("font-style", "italic");
36
- });
37
-
38
7
  it("outputs the correct string/content", () => {
39
8
  const { getByText } = render(
40
9
  <Text children="Supercalifragilisticexpialidocious" />
41
10
  );
42
11
  expect(getByText("Supercalifragilisticexpialidocious")).toBeTruthy();
43
12
  });
44
-
45
- it("displays a custom size if using fontSize", () => {
46
- const { getByText } = render(
47
- <Text children="Custom sized text!" fontSize={1000} />
48
- );
49
- const component = getByText("Custom sized text!");
50
- expect(component).toHaveStyleRule("font-size", "76px");
51
- });
52
13
  });
@@ -13,6 +13,7 @@ import {
13
13
  red,
14
14
  neutral,
15
15
  } from "./decorative-palettes";
16
+ import { transparentize } from "polished";
16
17
 
17
18
  import interact from "../utils/interact";
18
19
 
@@ -24,6 +25,8 @@ export const shadows = {
24
25
  high: `${DEPTH.ELEVATION_LEVEL_400} ${COLORS.COLOR_NEUTRAL_1100}FF`,
25
26
  };
26
27
 
28
+ // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
29
+
27
30
  const colors = {
28
31
  ...lightTheme.colors,
29
32
  utils: {
@@ -207,6 +210,17 @@ const colors = {
207
210
  selected: COLORS.COLOR_NEUTRAL_0,
208
211
  },
209
212
  },
213
+ overlay: {
214
+ background: {
215
+ base: transparentize(0.28, COLORS.COLOR_NEUTRAL_1000),
216
+ },
217
+ text: {
218
+ base: COLORS.COLOR_NEUTRAL_0,
219
+ },
220
+ icon: {
221
+ base: COLORS.COLOR_NEUTRAL_0,
222
+ },
223
+ },
210
224
  elevation: {
211
225
  base: COLORS.COLOR_NEUTRAL_1100,
212
226
  },
@@ -18,6 +18,7 @@ import SPACE from "@sproutsocial/seeds-space";
18
18
  import DEPTH from "@sproutsocial/seeds-depth";
19
19
  import MOTION from "@sproutsocial/seeds-motion";
20
20
  import BORDER from "@sproutsocial/seeds-border";
21
+ import { transparentize } from "polished";
21
22
 
22
23
  import interact from "../utils/interact";
23
24
 
@@ -25,6 +26,8 @@ export const breakpoints = ["900px", "1200px", "1500px", "1800px"];
25
26
 
26
27
  const MODE = "light";
27
28
 
29
+ // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
30
+
28
31
  const colors = {
29
32
  app: {
30
33
  background: {
@@ -204,6 +207,17 @@ const colors = {
204
207
  selected: COLORS.COLOR_NEUTRAL_800,
205
208
  },
206
209
  },
210
+ overlay: {
211
+ background: {
212
+ base: transparentize(0.44, COLORS.COLOR_NEUTRAL_1000),
213
+ },
214
+ text: {
215
+ base: COLORS.COLOR_NEUTRAL_0,
216
+ },
217
+ icon: {
218
+ base: COLORS.COLOR_NEUTRAL_0,
219
+ },
220
+ },
207
221
  elevation: {
208
222
  base: `${COLORS.COLOR_NEUTRAL_900}3D`,
209
223
  },
@@ -11,8 +11,6 @@ var _styledSystem = require("styled-system");
11
11
 
12
12
  var _reactModal = _interopRequireDefault(require("react-modal"));
13
13
 
14
- var _polished = require("polished");
15
-
16
14
  var _Box = _interopRequireDefault(require("../Box"));
17
15
 
18
16
  var _systemProps = require("../utils/system-props");
@@ -62,7 +60,7 @@ var Container = (0, _styledComponents.default)(ReactModalAdapter).withConfig({
62
60
  displayName: "styles__Container",
63
61
  componentId: "sc-9lom4g-0"
64
62
  })(["&__Overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;display:flex;align-items:center;justify-content:center;background-color:", ";opacity:0;will-change:opacity;transition:opacity ", " ", ";", " &.ReactModal__Overlay--after-open{opacity:1;}&.ReactModal__Overlay--before-close{opacity:0;}}&__Content{display:flex;flex-direction:column;background:", ";border-radius:", ";box-shadow:", ";filter:blur(0);color:", ";outline:none;max-width:calc(100vw - ", ");max-height:calc(100vh - ", ");@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){height:calc(100vh - ", ");}", " ", "}"], function (props) {
65
- return (0, _polished.transparentize)(0.32, props.theme.colors.neutral[1000]);
63
+ return props.theme.colors.overlay.background.base;
66
64
  }, function (props) {
67
65
  return props.theme.duration.medium;
68
66
  }, function (props) {
@@ -13,6 +13,8 @@ var _datavizPalette = require("./dataviz-palette");
13
13
 
14
14
  var _decorativePalettes = require("./decorative-palettes");
15
15
 
16
+ var _polished = require("polished");
17
+
16
18
  var _interact = _interopRequireDefault(require("../utils/interact"));
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -24,7 +26,8 @@ var shadows = {
24
26
  low: _seedsDepth.default.ELEVATION_LEVEL_100 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF",
25
27
  medium: _seedsDepth.default.ELEVATION_LEVEL_300 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF",
26
28
  high: _seedsDepth.default.ELEVATION_LEVEL_400 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF"
27
- };
29
+ }; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
30
+
28
31
  exports.shadows = shadows;
29
32
 
30
33
  var colors = _extends({}, _theme.default.colors, {
@@ -209,6 +212,17 @@ var colors = _extends({}, _theme.default.colors, {
209
212
  selected: _seedsColor.default.COLOR_NEUTRAL_0
210
213
  }
211
214
  },
215
+ overlay: {
216
+ background: {
217
+ base: (0, _polished.transparentize)(0.28, _seedsColor.default.COLOR_NEUTRAL_1000)
218
+ },
219
+ text: {
220
+ base: _seedsColor.default.COLOR_NEUTRAL_0
221
+ },
222
+ icon: {
223
+ base: _seedsColor.default.COLOR_NEUTRAL_0
224
+ }
225
+ },
212
226
  elevation: {
213
227
  base: _seedsColor.default.COLOR_NEUTRAL_1100
214
228
  },
@@ -23,6 +23,8 @@ var _seedsMotion = _interopRequireDefault(require("@sproutsocial/seeds-motion"))
23
23
 
24
24
  var _seedsBorder = _interopRequireDefault(require("@sproutsocial/seeds-border"));
25
25
 
26
+ var _polished = require("polished");
27
+
26
28
  var _interact = _interopRequireDefault(require("../utils/interact"));
27
29
 
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -31,7 +33,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
31
33
 
32
34
  var breakpoints = ["900px", "1200px", "1500px", "1800px"];
33
35
  exports.breakpoints = breakpoints;
34
- var MODE = "light";
36
+ var MODE = "light"; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
35
37
 
36
38
  var colors = _extends({
37
39
  app: {
@@ -212,6 +214,17 @@ var colors = _extends({
212
214
  selected: _seedsColor.default.COLOR_NEUTRAL_800
213
215
  }
214
216
  },
217
+ overlay: {
218
+ background: {
219
+ base: (0, _polished.transparentize)(0.44, _seedsColor.default.COLOR_NEUTRAL_1000)
220
+ },
221
+ text: {
222
+ base: _seedsColor.default.COLOR_NEUTRAL_0
223
+ },
224
+ icon: {
225
+ base: _seedsColor.default.COLOR_NEUTRAL_0
226
+ }
227
+ },
215
228
  elevation: {
216
229
  base: _seedsColor.default.COLOR_NEUTRAL_900 + "3D"
217
230
  },
@@ -189,6 +189,17 @@ $dark: (
189
189
  selected: #FFFFFF
190
190
  )
191
191
  ),
192
+ overlay: (
193
+ background: (
194
+ base: rgba(22,32,32,0.72)
195
+ ),
196
+ text: (
197
+ base: #FFFFFF
198
+ ),
199
+ icon: (
200
+ base: #FFFFFF
201
+ )
202
+ ),
192
203
  elevation: (
193
204
  base: #040404
194
205
  ),
@@ -283,6 +283,17 @@ $light: (
283
283
  selected: #364141
284
284
  )
285
285
  ),
286
+ overlay: (
287
+ background: (
288
+ base: rgba(22,32,32,0.56)
289
+ ),
290
+ text: (
291
+ base: #FFFFFF
292
+ ),
293
+ icon: (
294
+ base: #FFFFFF
295
+ )
296
+ ),
286
297
  elevation: (
287
298
  base: #2733333D
288
299
  ),
@@ -10,7 +10,6 @@ import React from "react";
10
10
  import styled, { createGlobalStyle } from "styled-components";
11
11
  import { width, zIndex } from "styled-system";
12
12
  import ReactModal from "react-modal";
13
- import { transparentize } from "polished";
14
13
  import Box from "../Box";
15
14
  import { COMMON } from "../utils/system-props";
16
15
  // This is the max space allowed between the modal and the edge of the browser
@@ -43,7 +42,7 @@ export var Container = styled(ReactModalAdapter).withConfig({
43
42
  displayName: "styles__Container",
44
43
  componentId: "sc-9lom4g-0"
45
44
  })(["&__Overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;display:flex;align-items:center;justify-content:center;background-color:", ";opacity:0;will-change:opacity;transition:opacity ", " ", ";", " &.ReactModal__Overlay--after-open{opacity:1;}&.ReactModal__Overlay--before-close{opacity:0;}}&__Content{display:flex;flex-direction:column;background:", ";border-radius:", ";box-shadow:", ";filter:blur(0);color:", ";outline:none;max-width:calc(100vw - ", ");max-height:calc(100vh - ", ");@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){height:calc(100vh - ", ");}", " ", "}"], function (props) {
46
- return transparentize(0.32, props.theme.colors.neutral[1000]);
45
+ return props.theme.colors.overlay.background.base;
47
46
  }, function (props) {
48
47
  return props.theme.duration.medium;
49
48
  }, function (props) {
@@ -5,13 +5,14 @@ import DEPTH from "@sproutsocial/seeds-depth";
5
5
  import lightTheme from "../light/theme";
6
6
  import { datavizPalette } from "./dataviz-palette";
7
7
  import { green, blue, purple, yellow, orange, red, neutral } from "./decorative-palettes";
8
+ import { transparentize } from "polished";
8
9
  import interact from "../utils/interact";
9
10
  var MODE = "dark";
10
11
  export var shadows = {
11
12
  low: DEPTH.ELEVATION_LEVEL_100 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
12
13
  medium: DEPTH.ELEVATION_LEVEL_300 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
13
14
  high: DEPTH.ELEVATION_LEVEL_400 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF"
14
- };
15
+ }; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
15
16
 
16
17
  var colors = _extends({}, lightTheme.colors, {
17
18
  utils: {
@@ -195,6 +196,17 @@ var colors = _extends({}, lightTheme.colors, {
195
196
  selected: COLORS.COLOR_NEUTRAL_0
196
197
  }
197
198
  },
199
+ overlay: {
200
+ background: {
201
+ base: transparentize(0.28, COLORS.COLOR_NEUTRAL_1000)
202
+ },
203
+ text: {
204
+ base: COLORS.COLOR_NEUTRAL_0
205
+ },
206
+ icon: {
207
+ base: COLORS.COLOR_NEUTRAL_0
208
+ }
209
+ },
198
210
  elevation: {
199
211
  base: COLORS.COLOR_NEUTRAL_1100
200
212
  },
@@ -10,9 +10,10 @@ import SPACE from "@sproutsocial/seeds-space";
10
10
  import DEPTH from "@sproutsocial/seeds-depth";
11
11
  import MOTION from "@sproutsocial/seeds-motion";
12
12
  import BORDER from "@sproutsocial/seeds-border";
13
+ import { transparentize } from "polished";
13
14
  import interact from "../utils/interact";
14
15
  export var breakpoints = ["900px", "1200px", "1500px", "1800px"];
15
- var MODE = "light";
16
+ var MODE = "light"; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
16
17
 
17
18
  var colors = _extends({
18
19
  app: {
@@ -193,6 +194,17 @@ var colors = _extends({
193
194
  selected: COLORS.COLOR_NEUTRAL_800
194
195
  }
195
196
  },
197
+ overlay: {
198
+ background: {
199
+ base: transparentize(0.44, COLORS.COLOR_NEUTRAL_1000)
200
+ },
201
+ text: {
202
+ base: COLORS.COLOR_NEUTRAL_0
203
+ },
204
+ icon: {
205
+ base: COLORS.COLOR_NEUTRAL_0
206
+ }
207
+ },
196
208
  elevation: {
197
209
  base: COLORS.COLOR_NEUTRAL_900 + "3D"
198
210
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "10.0.0",
3
+ "version": "10.0.1-dependencies.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -62,6 +62,7 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
+ "@storybook/addon-controls": "^6.4.19",
65
66
  "@styled-system/theme-get": "^5.1.2",
66
67
  "classnames": "^2.2.6",
67
68
  "lodash.curry": "^4.1.1",
@@ -75,14 +76,14 @@
75
76
  "react-popper": "^1.3.3",
76
77
  "react-spring": "^8.0.25",
77
78
  "react-toastify": "^6.0.5",
78
- "react-virtualized": "9.18.5",
79
+ "react-virtualized": "9.22.3",
79
80
  "scroll-into-view-if-needed": "1.1.0",
80
81
  "styled-system": "^5.1.5",
81
82
  "use-measure": "^0.2.2"
82
83
  },
83
84
  "devDependencies": {
84
85
  "@babel/cli": "^7.5.5",
85
- "@babel/core": "^7.4.5",
86
+ "@babel/core": "^7.12.9",
86
87
  "@babel/plugin-proposal-class-properties": "^7.4.4",
87
88
  "@babel/plugin-syntax-dynamic-import": "^7.0.0",
88
89
  "@babel/preset-env": "^7.8.0",
@@ -97,20 +98,21 @@
97
98
  "@sproutsocial/seeds-networkcolor": "^2.9.0",
98
99
  "@sproutsocial/seeds-space": "^0.4.7",
99
100
  "@sproutsocial/seeds-typography": "^3.0.1",
100
- "@storybook/addon-a11y": "^6.1.11",
101
- "@storybook/addon-actions": "^6.3.8",
102
- "@storybook/addon-knobs": "^6.1.11",
103
- "@storybook/addon-storysource": "^6.1.11",
104
- "@storybook/addon-viewport": "^6.1.11",
105
- "@storybook/addons": "^6.1.11",
101
+ "@storybook/addon-a11y": "^6.4.19",
102
+ "@storybook/addon-actions": "^6.4.19",
103
+ "@storybook/addon-controls": "^6.4.19",
104
+ "@storybook/addon-knobs": "^6.4.0",
105
+ "@storybook/addon-storysource": "^6.4.19",
106
+ "@storybook/addon-viewport": "^6.4.19",
107
+ "@storybook/addons": "^6.4.19",
106
108
  "@storybook/react": "^6.4.19",
107
- "@storybook/theming": "^6.1.11",
109
+ "@storybook/theming": "^6.4.19",
108
110
  "@testing-library/react": "^11.2.2",
109
111
  "@testing-library/user-event": "^13.0.0",
110
112
  "babel-core": "^7.0.0-bridge",
111
113
  "babel-eslint": "10.1.0",
112
114
  "babel-jest": "26.1.0",
113
- "babel-loader": "8.0.6",
115
+ "babel-loader": "8.2.3",
114
116
  "babel-plugin-inline-import": "^3.0.0",
115
117
  "babel-plugin-polished": "^1.1.0",
116
118
  "babel-plugin-styled-components": "^1.10.0",
@@ -138,7 +140,7 @@
138
140
  "jest": "26.1.0",
139
141
  "jest-axe": "3.4.0",
140
142
  "jest-dom": "^3.5.0",
141
- "jest-styled-components": "7.0.0-beta.1",
143
+ "jest-styled-components": "7.0.8",
142
144
  "jscodeshift": "^0.6.4",
143
145
  "json-to-scss": "^1.6.2",
144
146
  "lint-staged": "^10.2.11",
@@ -146,15 +148,15 @@
146
148
  "npm-run-all": "^4.1.2",
147
149
  "outdent": "^0.7.0",
148
150
  "pify": "^4.0.1",
149
- "playroom": "^0.22.2",
151
+ "playroom": "^0.27.9",
150
152
  "prettier": "^2.0.5",
151
153
  "prop-types": "^15.6.1",
152
154
  "react": "16.12.0",
153
155
  "react-dates": "^21.8.0",
154
156
  "react-dom": "16.12.0",
155
157
  "rimraf": "^2.6.3",
156
- "storybook-dark-mode": "^1.0.7",
157
- "styled-components": "5.0.0-rc.2",
158
+ "storybook-dark-mode": "^1.0.9",
159
+ "styled-components": "5.3.3",
158
160
  "stylelint": "^13.8.0",
159
161
  "stylelint-config-recommended": "^2.2.0",
160
162
  "stylelint-config-styled-components": "^0.1.1",
@@ -179,6 +181,7 @@
179
181
  "styled-components": "^5.0.0-rc.2"
180
182
  },
181
183
  "resolutions": {
184
+ "**/eslint-import-resolver-node": "0.3.4",
182
185
  "lodash": "^4.17.21",
183
186
  "react-popper/create-react-context": "^0.3.0"
184
187
  },