@sproutsocial/racine 11.3.0-beta.0 → 11.3.1-beta-deps.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 (43) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/__flow__/Badge/constants.js +48 -0
  3. package/__flow__/Badge/index.js +60 -33
  4. package/__flow__/Badge/index.stories.js +35 -42
  5. package/__flow__/Badge/index.test.js +34 -32
  6. package/__flow__/Badge/styles.js +22 -42
  7. package/__flow__/Button/index.js +1 -0
  8. package/__flow__/Button/index.stories.js +51 -67
  9. package/__flow__/EmptyState/index.test.js +1 -1
  10. package/__flow__/Input/index.js +66 -124
  11. package/__flow__/Input/index.stories.js +0 -33
  12. package/__flow__/Input/index.test.js +1 -224
  13. package/__flow__/Input/styles.js +1 -1
  14. package/__flow__/Menu/__snapshots__/index.test.js.snap +3 -3
  15. package/__flow__/setupTests.js +1 -1
  16. package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +0 -14
  17. package/__flow__/systemProps/tests/layout.test.js +0 -9
  18. package/__flow__/themes/extendedThemes/README.md +6 -0
  19. package/commonjs/Badge/constants.js +43 -0
  20. package/commonjs/Badge/index.js +41 -39
  21. package/commonjs/Badge/styles.js +15 -31
  22. package/commonjs/Button/index.js +1 -0
  23. package/commonjs/DatePicker/styles.js +5 -1
  24. package/commonjs/Input/index.js +29 -68
  25. package/commonjs/Input/styles.js +1 -1
  26. package/commonjs/Menu/index.js +10 -10
  27. package/commonjs/Modal/styles.js +5 -1
  28. package/commonjs/Toast/index.js +14 -14
  29. package/commonjs/Toast/styles.js +5 -2
  30. package/lib/Badge/constants.js +38 -0
  31. package/lib/Badge/index.js +38 -39
  32. package/lib/Badge/styles.js +12 -27
  33. package/lib/Button/index.js +1 -0
  34. package/lib/DatePicker/styles.js +5 -1
  35. package/lib/Input/index.js +28 -61
  36. package/lib/Input/styles.js +1 -1
  37. package/lib/Menu/index.js +11 -10
  38. package/lib/Modal/styles.js +5 -1
  39. package/lib/Toast/index.js +14 -14
  40. package/lib/Toast/styles.js +5 -1
  41. package/package.json +25 -21
  42. package/__flow__/Button/__snapshots__/index.test.js.snap +0 -511
  43. package/__flow__/Button/index.test.js +0 -113
@@ -1,49 +1,48 @@
1
- var _excluded = ["size", "type", "tip", "text"];
1
+ var _excluded = ["children", "text", "iconName", "type", "tip", "size", "badgeColor"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
5
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
6
 
7
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
8
-
9
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
-
11
7
  import * as React from "react";
8
+ import Icon from "../Icon";
12
9
  import Container from "./styles";
13
-
14
- var Badge = /*#__PURE__*/function (_React$Component) {
15
- _inheritsLoose(Badge, _React$Component);
16
-
17
- function Badge() {
18
- return _React$Component.apply(this, arguments) || this;
10
+ import Box from "../Box";
11
+
12
+ var Badge = function Badge(_ref) {
13
+ var children = _ref.children,
14
+ text = _ref.text,
15
+ iconName = _ref.iconName,
16
+ type = _ref.type,
17
+ tip = _ref.tip,
18
+ _ref$size = _ref.size,
19
+ size = _ref$size === void 0 ? "small" : _ref$size,
20
+ _ref$badgeColor = _ref.badgeColor,
21
+ badgeColor = _ref$badgeColor === void 0 ? "blue" : _ref$badgeColor,
22
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
23
+
24
+ if (children && text) {
25
+ throw new Error("can't use both `children` and `text` props. Text is deprecated, consider using children.");
19
26
  }
20
27
 
21
- var _proto = Badge.prototype;
22
-
23
- _proto.render = function render() {
24
- var _this$props = this.props,
25
- size = _this$props.size,
26
- type = _this$props.type,
27
- tip = _this$props.tip,
28
- text = _this$props.text,
29
- rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
30
-
31
- return /*#__PURE__*/React.createElement(Container, _extends({
32
- type: type,
33
- small: size === "small",
34
- "data-tip": tip,
35
- "data-qa-badge": text || "",
36
- "data-qa-badge-type": type,
37
- "data-qa-badge-tip": tip || "" // $FlowIssue - upgrade v0.112.0
38
-
39
- }, rest), text);
40
- };
41
-
42
- return Badge;
43
- }(React.Component);
44
-
45
- Badge.defaultProps = {
46
- type: "primary",
47
- size: "default"
28
+ return /*#__PURE__*/React.createElement(Container, _extends({}, rest, {
29
+ // size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
30
+ size: size === "default" ? "large" : size,
31
+ badgeColor: badgeColor,
32
+ "data-tip": tip,
33
+ "data-qa-badge": text || "",
34
+ "data-qa-badge-type": type,
35
+ "data-qa-badge-tip": tip || "",
36
+ type: type && type
37
+ }), /*#__PURE__*/React.createElement(Box, {
38
+ display: "flex",
39
+ alignItems: "center",
40
+ JustifyContent: "center"
41
+ }, iconName ? /*#__PURE__*/React.createElement(Icon, {
42
+ mr: 200,
43
+ name: iconName,
44
+ size: size === "small" ? "mini" : "default"
45
+ }) : null, children || text));
48
46
  };
49
- export { Badge as default };
47
+
48
+ export default Badge;
@@ -1,35 +1,20 @@
1
- import styled, { css } from "styled-components";
1
+ import styled from "styled-components";
2
2
  import { COMMON } from "../utils/system-props";
3
3
  import { themeGet } from "@styled-system/theme-get";
4
- var colors = {
5
- primary: "colors.neutral.0",
6
- secondary: "colors.neutral.800",
7
- passive: "colors.neutral.800",
8
- common: "colors.neutral.0",
9
- approval: "colors.neutral.800",
10
- default: "colors.neutral.0",
11
- suggestion: "colors.neutral.900"
12
- };
13
- var backgroundColors = {
14
- primary: "colors.blue.700",
15
- secondary: "colors.yellow.500",
16
- passive: "colors.neutral.200",
17
- common: "colors.aqua.600",
18
- approval: "colors.orange.300",
19
- default: "colors.purple.700",
20
- suggestion: "colors.blue.300"
21
- }; // eslint-disable-next-line prettier/prettier
4
+ import { legacyBadgeColors } from "./constants"; // eslint-disable-next-line prettier/prettier
22
5
 
23
6
  var Container = styled.span.withConfig({
24
7
  displayName: "styles__Container",
25
8
  componentId: "sc-g1g76b-0"
26
- })(["display:inline-block;text-align:center;border-radius:50px;font-family:", ";padding:", ";", " ", " ", ""], function (props) {
27
- return props.theme.fontFamily;
28
- }, function (props) {
29
- return props.small ? props.theme.space[200] + " " + props.theme.space[300] : props.theme.space[300] + " " + props.theme.space[350];
30
- }, function (props) {
31
- return props.small ? props.theme.typography[100] : props.theme.typography[200];
32
- }, function (props) {
33
- return css(["color:", ";background:", ";"], themeGet(colors[props.type])(props), themeGet(backgroundColors[props.type])(props));
9
+ })(["font-family:", ";", ";border-radius:9999px;line-height:16px;display:inline-block;color:", ";background:", ";padding:", ";", ";"], function (p) {
10
+ return p.theme.fontFamily;
11
+ }, function (p) {
12
+ return p.size === "small" ? p.theme.typography[100] : p.theme.typography[200];
13
+ }, function (p) {
14
+ return p.type ? themeGet(legacyBadgeColors[p.type].color) : p.theme.colors.text.body;
15
+ }, function (p) {
16
+ return p.type ? themeGet(legacyBadgeColors[p.type].background) : p.theme.colors.container.background.decorative[p.badgeColor];
17
+ }, function (p) {
18
+ return p.size === "small" ? p.theme.space[0] + " " + p.theme.space[200] : "" + p.theme.space[300];
34
19
  }, COMMON);
35
20
  export default Container;
@@ -34,6 +34,7 @@ var Button = function Button(_ref) {
34
34
 
35
35
  var appearanceCheck = appearance === "default" ? "unstyled" : appearance;
36
36
  return /*#__PURE__*/React.createElement(Container, _extends({
37
+ className: "container",
37
38
  title: title,
38
39
  active: active,
39
40
  href: href,
@@ -1,3 +1,7 @@
1
+ var _templateObject;
2
+
3
+ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
+
1
5
  import styled, { createGlobalStyle, css } from "styled-components";
2
6
  import moment from "moment";
3
7
  import Box from "../Box";
@@ -68,7 +72,7 @@ export var CalendarDay = styled(Box).withConfig({
68
72
  return css(["color:", ";", ";"], theme.colors.text.subtext, disabled);
69
73
  }
70
74
  });
71
- export var ReactDatesCssOverrides = createGlobalStyle([".DayPicker{box-sizing:content-box;font-weight:", ";font-family:", ";&_transitionContainer{height:228px !important;}&_weekHeader{color:", ";border-bottom:1px solid ", ";top:26px;width:230px;&_ul{padding-left:10px;}}&_weekHeaders__horizontal{margin-left:0}&_weekHeader_li{", " color:", ";font-weight:", ";margin:0;}&__horizontal{box-shadow:none;background:", ";}}.CalendarDay{background-color:transparent;&__selected,&__selected_span,&:hover{background-color:transparent;}&__default{color:", ";}&__default,&__default:hover{border:none;color:", ";}}.CalendarMonth{", " background:", ";padding:0 15px;&_caption{", " color:", ";padding-top:0;background:", ";strong{font-weight:", ";}}&_table{line-height:21.333px;tr{vertical-align:middle;}td{padding:0;border-bottom:none;}}}.CalendarMonthGrid{background:", ";}.DayPickerNavigation_button__horizontal{color:", ";top:-4px;padding:7px 8px;position:absolute;line-height:0.78;border-radius:9999px;border:none;background:", ";&:nth-child(1){left:22px;}&:nth-child(2){right:22px;}&:hover{background:", ";}}"], function (_ref2) {
75
+ export var ReactDatesCssOverrides = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\t.DayPicker {\n\t\tbox-sizing: content-box;\n\t\tfont-weight: ", ";\n\t\tfont-family: ", ";\n\n\t\t/* override react-dates height to better reflect how tall the component actually is */\n\t\t/* adding margin/padding will be more truer to our seeds system because the height */\n\t\t/* of the calendar adds an extra row of padding if we do not override it */\n\t\t&_transitionContainer {\n\t\t\t/* need !important because react-dates sets height on the element itself */\n\t\t\theight: 228px !important;\n\t\t}\n\n\t\t&_weekHeader {\n\t\t\tcolor: ", ";\n\t\t\tborder-bottom: 1px solid ", ";\n\n \t\t\t/* Magic number to match position of .CalendarMonth_caption */\n\t\t\ttop: 26px;\n\n\t\t\t/* Magic number to make the bottom border line stretch the full width */\n\t\t\twidth: 230px;\n\n\t\t\t&_ul {\n \t\t\t\t/* Magic number to line up day name headings over the correct numbers */\n\t\t\t\tpadding-left: 10px;\n\t\t\t}\n\t\t}\n\n\t\t&_weekHeaders__horizontal {\n\t\t\tmargin-left: 0\n\t\t}\n\n\t\t&_weekHeader_li {\n\t\t\t", "\n\t\t\tcolor: ", ";\n\t\t\tfont-weight: ", ";\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&__horizontal {\n\t\t\tbox-shadow: none;\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n .CalendarDay {\n\t\tbackground-color: transparent;\n\n &__selected, &__selected_span, &:hover {\n background-color: transparent;\n\t\t}\n\n\t\t&__default {\n\t\t\tcolor: ", ";\n\t\t}\n\t\t&__default,\n\t\t&__default:hover {\n\t\t\tborder: none;\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n\n .CalendarMonth {\n\t\t", "\n\t\tbackground: ", ";\n\n \t\t/* spacing between visible months and months off canvas */\n\t\tpadding: 0 15px;\n\n\t\t&_caption {\n\t\t\t", "\n\t\t\tcolor: ", ";\n\t\t\tpadding-top: 0;\n\t\t\tbackground: ", ";\n\n\t\t\tstrong {\n\t\t\t\tfont-weight: ", ";\n\t\t\t}\n\n\t\t}\n\t\t&_table {\n\t\t\tline-height: 21.333px;\n\t\t\ttr {\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t\ttd {\n\t\t\t\tpadding: 0;\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t.CalendarMonthGrid {\n\t\tbackground: ", ";\n\t}\n\n\t/* Left and Right Arrow Buttons to navigate months */\n\t.DayPickerNavigation_button__horizontal {\n\t\tcolor: ", ";\n\t\ttop: -4px;\n\t\tpadding: 7px 8px;\n\t\tposition: absolute;\n\t\tline-height: 0.78;\n\t\tborder-radius: 9999px;\n\t\tborder: none;\n\t\tbackground: ", ";\n\n\t\t&:nth-child(1) {\n\t\t\tleft: 22px;\n\t\t}\n\t\t&:nth-child(2) {\n\t\t\tright: 22px;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n"])), function (_ref2) {
72
76
  var theme = _ref2.theme;
73
77
  return theme.fontWeights.normal;
74
78
  }, function (props) {
@@ -1,4 +1,4 @@
1
- var _excluded = ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "clearButtonLabel", "innerRef", "onBlur", "onChange", "onClear", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "appearance"];
1
+ var _excluded = ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "innerRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "appearance"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -10,22 +10,6 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
10
10
 
11
11
  import * as React from "react";
12
12
  import Container, { Accessory } from "./styles";
13
- import Button from "../Button";
14
- import Icon from "../Icon";
15
- var InputContext = /*#__PURE__*/React.createContext({});
16
-
17
- var ClearButton = function ClearButton() {
18
- var _React$useContext = React.useContext(InputContext),
19
- handleClear = _React$useContext.handleClear,
20
- clearButtonLabel = _React$useContext.clearButtonLabel;
21
-
22
- return /*#__PURE__*/React.createElement(Button, {
23
- onClick: handleClear
24
- }, /*#__PURE__*/React.createElement(Icon, {
25
- name: "circlex",
26
- title: clearButtonLabel || "Clear"
27
- }));
28
- };
29
13
 
30
14
  var Input = /*#__PURE__*/function (_React$Component) {
31
15
  _inheritsLoose(Input, _React$Component);
@@ -40,35 +24,39 @@ var Input = /*#__PURE__*/function (_React$Component) {
40
24
  _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
41
25
 
42
26
  _this.handleBlur = function (e) {
43
- return _this.props.onBlur == null ? void 0 : _this.props.onBlur(e);
44
- };
45
-
46
- _this.handleClear = function (e) {
47
- if (_this.props.onClear) {
48
- _this.props.onClear(e);
49
- } else if (_this.props.onChange) {
50
- _this.props.onChange(e, "");
27
+ if (_this.props.onBlur) {
28
+ _this.props.onBlur(e);
51
29
  }
52
30
  };
53
31
 
54
32
  _this.handleChange = function (e) {
55
- return _this.props.onChange == null ? void 0 : _this.props.onChange(e, e.currentTarget.value);
33
+ if (_this.props.onChange) {
34
+ _this.props.onChange(e, e.currentTarget.value);
35
+ }
56
36
  };
57
37
 
58
38
  _this.handleFocus = function (e) {
59
- return _this.props.onFocus == null ? void 0 : _this.props.onFocus(e);
39
+ if (_this.props.onFocus) {
40
+ _this.props.onFocus(e);
41
+ }
60
42
  };
61
43
 
62
44
  _this.handleKeyDown = function (e) {
63
- return _this.props.onKeyDown == null ? void 0 : _this.props.onKeyDown(e, e.currentTarget.value);
45
+ if (_this.props.onKeyDown) {
46
+ _this.props.onKeyDown(e, e.currentTarget.value);
47
+ }
64
48
  };
65
49
 
66
50
  _this.handleKeyUp = function (e) {
67
- return _this.props.onKeyUp == null ? void 0 : _this.props.onKeyUp(e, e.currentTarget.value);
51
+ if (_this.props.onKeyUp) {
52
+ _this.props.onKeyUp(e, e.currentTarget.value);
53
+ }
68
54
  };
69
55
 
70
56
  _this.handlePaste = function (e) {
71
- return _this.props.onPaste == null ? void 0 : _this.props.onPaste(e, e.currentTarget.value);
57
+ if (_this.props.onPaste) {
58
+ _this.props.onPaste(e, e.currentTarget.value);
59
+ }
72
60
  };
73
61
 
74
62
  return _this;
@@ -77,8 +65,6 @@ var Input = /*#__PURE__*/function (_React$Component) {
77
65
  var _proto = Input.prototype;
78
66
 
79
67
  _proto.render = function render() {
80
- var _elementAfter$type;
81
-
82
68
  var _this$props = this.props,
83
69
  autoComplete = _this$props.autoComplete,
84
70
  autoFocus = _this$props.autoFocus,
@@ -97,11 +83,9 @@ var Input = /*#__PURE__*/function (_React$Component) {
97
83
  maxLength = _this$props.maxLength,
98
84
  ariaLabel = _this$props.ariaLabel,
99
85
  ariaDescribedby = _this$props.ariaDescribedby,
100
- clearButtonLabel = _this$props.clearButtonLabel,
101
86
  innerRef = _this$props.innerRef,
102
87
  onBlur = _this$props.onBlur,
103
88
  onChange = _this$props.onChange,
104
- onClear = _this$props.onClear,
105
89
  onFocus = _this$props.onFocus,
106
90
  onKeyDown = _this$props.onKeyDown,
107
91
  onKeyUp = _this$props.onKeyUp,
@@ -111,37 +95,25 @@ var Input = /*#__PURE__*/function (_React$Component) {
111
95
  _this$props$qa = _this$props.qa,
112
96
  qa = _this$props$qa === void 0 ? {} : _this$props$qa,
113
97
  appearance = _this$props.appearance,
114
- rest = _objectWithoutPropertiesLoose(_this$props, _excluded); // Convert autoComplete from a boolean prop to a string value.
115
-
98
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
116
99
 
117
100
  var autoCompleteValue = undefined;
118
101
 
119
102
  if (autoComplete !== undefined) {
120
103
  autoCompleteValue = autoComplete ? "on" : "off";
121
- } // Add default elemBefore and elemAfter elements if type is search.
122
-
104
+ }
123
105
 
124
- var elementBefore = type === "search" && !elemBefore ? /*#__PURE__*/React.createElement(Icon, {
125
- name: "search",
126
- ariaHidden: true
127
- }) : elemBefore;
128
- var elementAfter = type === "search" && !elemAfter ? /*#__PURE__*/React.createElement(ClearButton, null) : elemAfter;
129
106
  return /*#__PURE__*/React.createElement(Container, _extends({
130
- hasBeforeElement: !!elementBefore,
131
- hasAfterElement: !!elementAfter,
107
+ hasBeforeElement: !!elemBefore,
108
+ hasAfterElement: !!elemAfter,
132
109
  disabled: disabled,
133
110
  invalid: !!isInvalid,
134
111
  warning: hasWarning,
135
112
  appearance: appearance // $FlowIssue - upgrade v0.112.0
136
113
 
137
- }, rest), /*#__PURE__*/React.createElement(InputContext.Provider, {
138
- value: {
139
- handleClear: this.handleClear,
140
- clearButtonLabel: clearButtonLabel
141
- }
142
- }, elementBefore && /*#__PURE__*/React.createElement(Accessory, {
114
+ }, rest), elemBefore && /*#__PURE__*/React.createElement(Accessory, {
143
115
  before: true
144
- }, elementBefore), /*#__PURE__*/React.createElement("input", _extends({
116
+ }, elemBefore), /*#__PURE__*/React.createElement("input", _extends({
145
117
  "aria-invalid": !!isInvalid,
146
118
  "aria-label": ariaLabel,
147
119
  "aria-describedby": ariaDescribedby,
@@ -166,12 +138,9 @@ var Input = /*#__PURE__*/function (_React$Component) {
166
138
  "data-qa-input": name || "",
167
139
  "data-qa-input-isdisabled": disabled === true,
168
140
  "data-qa-input-isrequired": required === true
169
- }, qa, inputProps)), elementAfter && /*#__PURE__*/React.createElement(Accessory, {
170
- after: true // Used for positioning. This logic will detect if the element is a ClearButton,
171
- // regardless of whether it was manually passed as elemAfter or automatically added to a search Input.
172
- ,
173
- isClearButton: (elementAfter == null ? void 0 : (_elementAfter$type = elementAfter.type) == null ? void 0 : _elementAfter$type.prototype) === Input.ClearButton.prototype
174
- }, elementAfter)));
141
+ }, qa, inputProps)), elemAfter && /*#__PURE__*/React.createElement(Accessory, {
142
+ after: true
143
+ }, elemAfter));
175
144
  };
176
145
 
177
146
  return Input;
@@ -184,6 +153,4 @@ Input.defaultProps = {
184
153
  size: "default",
185
154
  appearance: "primary"
186
155
  };
187
- Input.ClearButton = ClearButton;
188
- Input.ClearButton.displayName = "Input.ClearButton";
189
- export default Input;
156
+ export { Input as default };
@@ -73,7 +73,7 @@ export var Accessory = styled.div.withConfig({
73
73
  }, function (props) {
74
74
  return props.before && css(["left:", ";"], props.theme.space[350]);
75
75
  }, function (props) {
76
- return props.after && css(["right:", ";"], props.isClearButton ? 0 : props.theme.space[350]);
76
+ return props.after && css(["right:", ";"], props.theme.space[350]);
77
77
  });
78
78
  Container.displayName = "InputContainer";
79
79
  Accessory.displayName = "InputAccessory";
package/lib/Menu/index.js CHANGED
@@ -232,6 +232,14 @@ export var MenuRadio = function MenuRadio(props) {
232
232
  role: MENU_ITEM_ROLES.RADIO
233
233
  }, props));
234
234
  };
235
+
236
+ var _StyledText = styled(Text).withConfig({
237
+ displayName: "Menu___StyledText",
238
+ componentId: "sc-1p3rdnp-0"
239
+ })(["", ""], function (p) {
240
+ return p._css;
241
+ });
242
+
235
243
  export var MenuGroup = function MenuGroup(_ref2) {
236
244
  var children = _ref2.children,
237
245
  title = _ref2.title,
@@ -251,7 +259,7 @@ export var MenuGroup = function MenuGroup(_ref2) {
251
259
  fontWeight: 600,
252
260
  mt: 350,
253
261
  color: "text.headline",
254
- $_css: isDisabled && disabled
262
+ _css: isDisabled && disabled
255
263
  }, title)), /*#__PURE__*/React.createElement(Box, _extends({}, props, {
256
264
  p: 300,
257
265
  role: "group"
@@ -394,7 +402,7 @@ Menu.Divider.displayName = "Menu.Divider";
394
402
  Menu.FilterInput.displayName = "Menu.FilterInput";
395
403
  var CustomPopoutContent = styled(Popout.Content).withConfig({
396
404
  displayName: "Menu__CustomPopoutContent",
397
- componentId: "sc-1p3rdnp-0"
405
+ componentId: "sc-1p3rdnp-1"
398
406
  })(["padding:0;margin-left:0;margin-right:0;"]);
399
407
  export var MenuButton = function MenuButton(_ref5) {
400
408
  var content = _ref5.content,
@@ -448,11 +456,4 @@ export var MenuButton = function MenuButton(_ref5) {
448
456
  }
449
457
  }), children)));
450
458
  };
451
- export default Menu;
452
-
453
- var _StyledText = styled(Text).withConfig({
454
- displayName: "Menu___StyledText",
455
- componentId: "sc-1p3rdnp-1"
456
- })(["", ""], function (p) {
457
- return p.$_css;
458
- });
459
+ export default Menu;
@@ -1,5 +1,9 @@
1
+ var _templateObject;
2
+
1
3
  var _excluded = ["className"];
2
4
 
5
+ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
6
+
3
7
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
8
 
5
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -34,7 +38,7 @@ function ReactModalAdapter(_ref) {
34
38
  }, props));
35
39
  }
36
40
 
37
- export var Body = createGlobalStyle([".ReactModal__Body--open{overflow:hidden;}"]); // eslint-disable-next-line prettier/prettier
41
+ export var Body = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n .ReactModal__Body--open {\n overflow: hidden;\n }\n"]))); // eslint-disable-next-line prettier/prettier
38
42
 
39
43
  export var Container = styled(ReactModalAdapter).withConfig({
40
44
  displayName: "styles__Container",
@@ -63,14 +63,26 @@ export function toast(options) {
63
63
  });
64
64
  }
65
65
 
66
+ var _StyledBox = _styled(Box).withConfig({
67
+ displayName: "Toast___StyledBox",
68
+ componentId: "sc-1vii3dq-0"
69
+ })(["", ""], function (p) {
70
+ return p._css;
71
+ });
72
+
66
73
  var IconBox = function IconBox(props) {
67
74
  return /*#__PURE__*/React.createElement(_StyledBox, _extends({
68
75
  display: "inline-block"
69
76
  }, props, {
70
- $_css: "line-height: 1;"
77
+ _css: "line-height: 1;"
71
78
  }));
72
79
  };
73
80
 
81
+ var _StyledBox2 = _styled(Box).withConfig({
82
+ displayName: "Toast___StyledBox2",
83
+ componentId: "sc-1vii3dq-1"
84
+ })(["transform:translateY(1px);"]);
85
+
74
86
  var Toast = function Toast(_ref) {
75
87
  var content = _ref.content,
76
88
  theme = _ref.theme,
@@ -108,16 +120,4 @@ var Toast = function Toast(_ref) {
108
120
  }))));
109
121
  };
110
122
 
111
- export default ToastContainer;
112
-
113
- var _StyledBox = _styled(Box).withConfig({
114
- displayName: "Toast___StyledBox",
115
- componentId: "sc-1vii3dq-0"
116
- })(["", ""], function (p) {
117
- return p.$_css;
118
- });
119
-
120
- var _StyledBox2 = _styled(Box).withConfig({
121
- displayName: "Toast___StyledBox2",
122
- componentId: "sc-1vii3dq-1"
123
- })(["transform:translateY(1px);"]);
123
+ export default ToastContainer;
@@ -1,3 +1,7 @@
1
+ var _templateObject;
2
+
3
+ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
+
1
5
  import styled, { createGlobalStyle } from "styled-components";
2
6
  import Box from "../Box";
3
7
  import Icon from "../Icon"; // $FlowIssue
@@ -23,7 +27,7 @@ export var CustomIcon = styled(Icon).withConfig({
23
27
  }, function (p) {
24
28
  return p.customColor ? undefined : p.theme.colors.icon[p.type];
25
29
  });
26
- export var GlobalToastStyles = createGlobalStyle(["", " .Toastify__toast:last-of-type{margin-bottom:0;}.Toastify-container-overrides{padding:0;width:360px;}.Toastify-toast-overrides{padding:0;min-height:0;border-radius:2px;}.Toastify__toast-container--bottom-right{bottom:", ";right:", ";}@media only screen and (max-width:480px){.Toastify-container-overrides{min-width:initial;}}"], toastStyles, function (p) {
30
+ export var GlobalToastStyles = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\t", "\n\n\t.Toastify__toast:last-of-type {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.Toastify-container-overrides {\n\t\tpadding: 0;\n\t\twidth: 360px;\n\t}\n\n\t.Toastify-toast-overrides {\n\t\tpadding: 0;\n\t\tmin-height: 0;\n\t\tborder-radius: 2px;\n\t}\n\n\t.Toastify__toast-container--bottom-right {\n\t\tbottom: ", ";\n\t\tright: ", ";\n\t}\n\n\t/* Override React Toastify's mobile width styles */\n\t@media only screen and (max-width: 480px) {\n\t\t.Toastify-container-overrides {\n\t\t\tmin-width: initial;\n\t\t}\n\t}\n"])), toastStyles, function (p) {
27
31
  return p.theme.space[400];
28
32
  }, function (p) {
29
33
  return p.theme.space[400];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "11.3.0-beta.0",
3
+ "version": "11.3.1-beta-deps.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -65,11 +65,13 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@styled-system/theme-get": "^5.1.2",
68
+ "@testing-library/jest-dom": "^5.16.4",
69
+ "@univision/babel-plugin-styled-components": "^1.10.9",
68
70
  "classnames": "^2.2.6",
69
71
  "lodash.curry": "^4.1.1",
70
72
  "lodash.uniqueid": "^4.0.1",
71
73
  "lru-memoize": "^1.1.0",
72
- "mutationobserver-shim": "^0.3.3",
74
+ "mutationobserver-shim": "^0.3.7",
73
75
  "polished": "^3.4.1",
74
76
  "raw-loader": "^3.0.0",
75
77
  "react-focus-lock": "^2.0.3",
@@ -77,14 +79,14 @@
77
79
  "react-popper": "^1.3.3",
78
80
  "react-spring": "^8.0.25",
79
81
  "react-toastify": "^6.0.5",
80
- "react-virtualized": "9.18.5",
82
+ "react-virtualized": "9.22.3",
81
83
  "scroll-into-view-if-needed": "1.1.0",
82
84
  "styled-system": "^5.1.5",
83
85
  "use-measure": "^0.2.2"
84
86
  },
85
87
  "devDependencies": {
86
88
  "@babel/cli": "^7.5.5",
87
- "@babel/core": "^7.4.5",
89
+ "@babel/core": "^7.12.9",
88
90
  "@babel/plugin-proposal-class-properties": "^7.4.4",
89
91
  "@babel/plugin-syntax-dynamic-import": "^7.0.0",
90
92
  "@babel/preset-env": "^7.8.0",
@@ -99,23 +101,25 @@
99
101
  "@sproutsocial/seeds-networkcolor": "^2.9.0",
100
102
  "@sproutsocial/seeds-space": "^0.4.7",
101
103
  "@sproutsocial/seeds-typography": "^3.0.1",
102
- "@storybook/addon-a11y": "^6.1.11",
103
- "@storybook/addon-actions": "^6.3.8",
104
- "@storybook/addon-knobs": "^6.1.11",
105
- "@storybook/addon-storysource": "^6.1.11",
106
- "@storybook/addon-viewport": "^6.1.11",
107
- "@storybook/addons": "^6.1.11",
104
+ "@storybook/addon-a11y": "^6.4.19",
105
+ "@storybook/addon-actions": "^6.4.19",
106
+ "@storybook/addon-controls": "^6.4.19",
107
+ "@storybook/addon-knobs": "^6.4.0",
108
+ "@storybook/addon-storysource": "^6.4.19",
109
+ "@storybook/addon-viewport": "^6.4.19",
110
+ "@storybook/addons": "^6.4.19",
108
111
  "@storybook/react": "^6.4.19",
109
- "@storybook/theming": "^6.1.11",
112
+ "@storybook/theming": "^6.4.19",
110
113
  "@testing-library/react": "^11.2.2",
111
114
  "@testing-library/user-event": "^13.0.0",
115
+ "axios": "^0.26.1",
112
116
  "babel-core": "^7.0.0-bridge",
113
117
  "babel-eslint": "10.1.0",
114
- "babel-jest": "26.1.0",
115
- "babel-loader": "8.0.6",
118
+ "babel-jest": "27.x.x",
119
+ "babel-loader": "8.2.3",
116
120
  "babel-plugin-inline-import": "^3.0.0",
117
121
  "babel-plugin-polished": "^1.1.0",
118
- "babel-plugin-styled-components": "^1.10.0",
122
+ "babel-plugin-styled-components": "^2.0.7",
119
123
  "babel-polyfill": "^6.26.0",
120
124
  "chalk": "^2.3.2",
121
125
  "chokidar": "^3.0.2",
@@ -137,9 +141,8 @@
137
141
  "identity-obj-proxy": "^3.0.0",
138
142
  "inquirer": "^6.4.1",
139
143
  "is-glob": "^4.0.1",
140
- "jest": "26.1.0",
141
- "jest-axe": "3.4.0",
142
- "jest-dom": "^3.5.0",
144
+ "jest": "27.x.x",
145
+ "jest-axe": "6.0.0",
143
146
  "jest-styled-components": "7.0.0-beta.1",
144
147
  "jscodeshift": "^0.6.4",
145
148
  "json-to-scss": "^1.6.2",
@@ -148,15 +151,15 @@
148
151
  "npm-run-all": "^4.1.2",
149
152
  "outdent": "^0.7.0",
150
153
  "pify": "^4.0.1",
151
- "playroom": "^0.22.2",
154
+ "playroom": "^0.27.9",
152
155
  "prettier": "^2.0.5",
153
156
  "prop-types": "^15.6.1",
154
157
  "react": "16.12.0",
155
158
  "react-dates": "^21.8.0",
156
159
  "react-dom": "16.12.0",
157
160
  "rimraf": "^2.6.3",
158
- "storybook-dark-mode": "^1.0.7",
159
- "styled-components": "5.0.0-rc.2",
161
+ "storybook-dark-mode": "^1.0.9",
162
+ "styled-components": "^5.2.3",
160
163
  "stylelint": "^13.8.0",
161
164
  "stylelint-config-recommended": "^2.2.0",
162
165
  "stylelint-config-styled-components": "^0.1.1",
@@ -178,13 +181,14 @@
178
181
  "prop-types": "^15.0.0",
179
182
  "react": "^16.2.0",
180
183
  "react-dates": "^21.8.0",
181
- "styled-components": "^5.0.0-rc.2"
184
+ "styled-components": "^5.2.3"
182
185
  },
183
186
  "resolutions": {
184
187
  "lodash": "^4.17.21",
185
188
  "react-popper/create-react-context": "^0.3.0"
186
189
  },
187
190
  "jest": {
191
+ "testEnvironment": "jsdom",
188
192
  "setupFilesAfterEnv": [
189
193
  "<rootDir>/src/setupTests.js"
190
194
  ],