@sproutsocial/racine 11.3.1-beta-deps.4 → 11.4.0-input-beta.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 (48) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/__flow__/Button/__snapshots__/index.test.js.snap +511 -0
  3. package/__flow__/Button/index.js +0 -2
  4. package/__flow__/Button/index.stories.js +67 -51
  5. package/__flow__/Button/index.test.js +113 -0
  6. package/__flow__/Button/styles.js +1 -1
  7. package/__flow__/EmptyState/index.test.js +1 -1
  8. package/__flow__/Input/index.js +185 -66
  9. package/__flow__/Input/index.stories.js +65 -0
  10. package/__flow__/Input/index.test.js +227 -1
  11. package/__flow__/Input/styles.js +1 -1
  12. package/__flow__/Link/index.js +2 -1
  13. package/__flow__/Menu/__snapshots__/index.test.js.snap +2 -2
  14. package/__flow__/TokenInput/index.js +1 -1
  15. package/__flow__/setupTests.js +1 -1
  16. package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +14 -0
  17. package/__flow__/systemProps/tests/layout.test.js +9 -0
  18. package/__flow__/themes/dark/theme.js +3 -0
  19. package/__flow__/themes/light/theme.js +3 -0
  20. package/__flow__/types/theme.colors.flow.js +3 -0
  21. package/commonjs/Button/index.js +0 -1
  22. package/commonjs/Button/styles.js +0 -1
  23. package/commonjs/DatePicker/styles.js +1 -5
  24. package/commonjs/Input/index.js +125 -31
  25. package/commonjs/Input/styles.js +1 -1
  26. package/commonjs/Menu/index.js +10 -10
  27. package/commonjs/Modal/styles.js +1 -5
  28. package/commonjs/Toast/index.js +14 -14
  29. package/commonjs/Toast/styles.js +2 -5
  30. package/commonjs/TokenInput/index.js +1 -1
  31. package/commonjs/themes/dark/theme.js +4 -1
  32. package/commonjs/themes/light/theme.js +4 -1
  33. package/dist/themes/dark/dark.scss +4 -1
  34. package/dist/themes/light/light.scss +4 -1
  35. package/lib/Button/index.js +0 -1
  36. package/lib/Button/styles.js +0 -1
  37. package/lib/DatePicker/styles.js +1 -5
  38. package/lib/Input/index.js +118 -31
  39. package/lib/Input/styles.js +1 -1
  40. package/lib/Menu/index.js +10 -11
  41. package/lib/Modal/styles.js +1 -5
  42. package/lib/Toast/index.js +14 -14
  43. package/lib/Toast/styles.js +1 -5
  44. package/lib/TokenInput/index.js +1 -1
  45. package/lib/themes/dark/theme.js +4 -1
  46. package/lib/themes/light/theme.js +4 -1
  47. package/package.json +20 -25
  48. package/bin/buildNpm.js +0 -58
@@ -7,7 +7,15 @@ var React = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _styles = _interopRequireWildcard(require("./styles"));
9
9
 
10
- 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"];
10
+ var _Button = _interopRequireDefault(require("../Button"));
11
+
12
+ var _Icon = _interopRequireDefault(require("../Icon"));
13
+
14
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
15
+
16
+ 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", "size"];
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
19
 
12
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
21
 
@@ -21,6 +29,67 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
21
29
 
22
30
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
31
 
32
+ var InputContext = /*#__PURE__*/React.createContext({});
33
+ var StyledButton = (0, _styledComponents.default)(_Button.default).withConfig({
34
+ displayName: "Input__StyledButton",
35
+ componentId: "sc-1ck1dnm-0"
36
+ })(["&:hover,&:active{color:", ";}"], function (props) {
37
+ return props.theme.utils.interact(props.theme.colors.icon.base);
38
+ });
39
+
40
+ var ClearButton = function ClearButton() {
41
+ var _React$useContext = React.useContext(InputContext),
42
+ onClear = _React$useContext.onClear,
43
+ handleClear = _React$useContext.handleClear,
44
+ clearButtonLabel = _React$useContext.clearButtonLabel,
45
+ hasValue = _React$useContext.hasValue,
46
+ inputSize = _React$useContext.size; // Hide the button when there is no text to clear.
47
+
48
+
49
+ if (!hasValue) {
50
+ return null;
51
+ } // Log a warning and hide the button when no onClear callback is provided.
52
+ // If we called handleClear with no onClear prop, all the button would do is focus the Input.
53
+
54
+
55
+ if (!onClear) {
56
+ console.warn("Warning: No onClear prop provided to Input when using Input.ClearButton. Omitting Input.ClearButton.");
57
+ return null;
58
+ } // Warn if clearButtonLabel is not included, so that the unlocalized fallback will not be mistaken for a proper label.
59
+
60
+
61
+ if (!clearButtonLabel) {
62
+ console.warn("Warning: clearButtonLabel prop is required when using Input.ClearButton. Please pass a localized clearButtonLabel to Input.");
63
+ } // Reduce Button padding for size small Inputs so that the Button won't go outside the bounds of the Input.
64
+ // This adjustment is handled automatically for default and large Inputs via Button's size. There is no "small" Button.
65
+
66
+
67
+ var py = inputSize === "small" ? 100 : undefined;
68
+ var px = inputSize === "small" ? 200 : undefined;
69
+ var buttonSize = inputSize === "small" ? "default" : inputSize;
70
+ return /*#__PURE__*/React.createElement(StyledButton, {
71
+ onClick: handleClear,
72
+ size: buttonSize,
73
+ py: py,
74
+ px: px,
75
+ title: clearButtonLabel || "Clear",
76
+ ariaLabel: clearButtonLabel || "Clear",
77
+ color: "icon.base"
78
+ }, /*#__PURE__*/React.createElement(_Icon.default, {
79
+ name: "circlex"
80
+ }));
81
+ }; // Used for positioning elementAfter. This logic will detect if the element is a ClearButton,
82
+ // regardless of whether it was manually passed as elemAfter or automatically added to a search Input.
83
+
84
+
85
+ var isClearButton = function isClearButton(elem) {
86
+ if (elem != null && elem.type) {
87
+ return elem.type.displayName === "Input.ClearButton";
88
+ }
89
+
90
+ return false;
91
+ };
92
+
24
93
  var Input = /*#__PURE__*/function (_React$Component) {
25
94
  _inheritsLoose(Input, _React$Component);
26
95
 
@@ -34,39 +103,38 @@ var Input = /*#__PURE__*/function (_React$Component) {
34
103
  _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
35
104
 
36
105
  _this.handleBlur = function (e) {
37
- if (_this.props.onBlur) {
38
- _this.props.onBlur(e);
106
+ return _this.props.onBlur == null ? void 0 : _this.props.onBlur(e);
107
+ };
108
+
109
+ _this.handleClear = function (e) {
110
+ // Only attempt to focus the input if the ref is an object. It won't work for refs that are functions.
111
+ if (typeof _this.props.innerRef === "object") {
112
+ var _this$props$innerRef$;
113
+
114
+ (_this$props$innerRef$ = _this.props.innerRef.current) == null ? void 0 : _this$props$innerRef$.focus();
39
115
  }
116
+
117
+ _this.props.onClear == null ? void 0 : _this.props.onClear(e);
40
118
  };
41
119
 
42
120
  _this.handleChange = function (e) {
43
- if (_this.props.onChange) {
44
- _this.props.onChange(e, e.currentTarget.value);
45
- }
121
+ return _this.props.onChange == null ? void 0 : _this.props.onChange(e, e.currentTarget.value);
46
122
  };
47
123
 
48
124
  _this.handleFocus = function (e) {
49
- if (_this.props.onFocus) {
50
- _this.props.onFocus(e);
51
- }
125
+ return _this.props.onFocus == null ? void 0 : _this.props.onFocus(e);
52
126
  };
53
127
 
54
128
  _this.handleKeyDown = function (e) {
55
- if (_this.props.onKeyDown) {
56
- _this.props.onKeyDown(e, e.currentTarget.value);
57
- }
129
+ return _this.props.onKeyDown == null ? void 0 : _this.props.onKeyDown(e, e.currentTarget.value);
58
130
  };
59
131
 
60
132
  _this.handleKeyUp = function (e) {
61
- if (_this.props.onKeyUp) {
62
- _this.props.onKeyUp(e, e.currentTarget.value);
63
- }
133
+ return _this.props.onKeyUp == null ? void 0 : _this.props.onKeyUp(e, e.currentTarget.value);
64
134
  };
65
135
 
66
136
  _this.handlePaste = function (e) {
67
- if (_this.props.onPaste) {
68
- _this.props.onPaste(e, e.currentTarget.value);
69
- }
137
+ return _this.props.onPaste == null ? void 0 : _this.props.onPaste(e, e.currentTarget.value);
70
138
  };
71
139
 
72
140
  return _this;
@@ -93,9 +161,11 @@ var Input = /*#__PURE__*/function (_React$Component) {
93
161
  maxLength = _this$props.maxLength,
94
162
  ariaLabel = _this$props.ariaLabel,
95
163
  ariaDescribedby = _this$props.ariaDescribedby,
164
+ clearButtonLabel = _this$props.clearButtonLabel,
96
165
  innerRef = _this$props.innerRef,
97
166
  onBlur = _this$props.onBlur,
98
167
  onChange = _this$props.onChange,
168
+ onClear = _this$props.onClear,
99
169
  onFocus = _this$props.onFocus,
100
170
  onKeyDown = _this$props.onKeyDown,
101
171
  onKeyUp = _this$props.onKeyUp,
@@ -105,25 +175,44 @@ var Input = /*#__PURE__*/function (_React$Component) {
105
175
  _this$props$qa = _this$props.qa,
106
176
  qa = _this$props$qa === void 0 ? {} : _this$props$qa,
107
177
  appearance = _this$props.appearance,
108
- rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
178
+ size = _this$props.size,
179
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded); // Convert autoComplete from a boolean prop to a string value.
180
+
109
181
 
110
182
  var autoCompleteValue = undefined;
111
183
 
112
184
  if (autoComplete !== undefined) {
113
185
  autoCompleteValue = autoComplete ? "on" : "off";
114
- }
186
+ } // Add default elemBefore and elemAfter elements if type is search.
187
+
115
188
 
189
+ var elementBefore = type === "search" && !elemBefore ? /*#__PURE__*/React.createElement(_Icon.default, {
190
+ name: "search",
191
+ ariaHidden: true,
192
+ color: "icon.base"
193
+ }) : elemBefore; // Do not add a ClearButton if no onClear callback is provided or if an elemAfter prop was passed.
194
+
195
+ var elementAfter = type === "search" && onClear && !elemAfter ? /*#__PURE__*/React.createElement(ClearButton, null) : elemAfter;
116
196
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
117
- hasBeforeElement: !!elemBefore,
118
- hasAfterElement: !!elemAfter,
197
+ hasBeforeElement: !!elementBefore,
198
+ hasAfterElement: !!elementAfter,
119
199
  disabled: disabled,
120
200
  invalid: !!isInvalid,
121
201
  warning: hasWarning,
122
- appearance: appearance // $FlowIssue - upgrade v0.112.0
202
+ appearance: appearance,
203
+ size: size // $FlowIssue - upgrade v0.112.0
123
204
 
124
- }, rest), elemBefore && /*#__PURE__*/React.createElement(_styles.Accessory, {
205
+ }, rest), /*#__PURE__*/React.createElement(InputContext.Provider, {
206
+ value: {
207
+ handleClear: this.handleClear,
208
+ hasValue: !!value,
209
+ clearButtonLabel: clearButtonLabel,
210
+ onClear: onClear,
211
+ size: size
212
+ }
213
+ }, elementBefore && /*#__PURE__*/React.createElement(_styles.Accessory, {
125
214
  before: true
126
- }, elemBefore), /*#__PURE__*/React.createElement("input", _extends({
215
+ }, elementBefore), /*#__PURE__*/React.createElement("input", _extends({
127
216
  "aria-invalid": !!isInvalid,
128
217
  "aria-label": ariaLabel,
129
218
  "aria-describedby": ariaDescribedby,
@@ -148,19 +237,24 @@ var Input = /*#__PURE__*/function (_React$Component) {
148
237
  "data-qa-input": name || "",
149
238
  "data-qa-input-isdisabled": disabled === true,
150
239
  "data-qa-input-isrequired": required === true
151
- }, qa, inputProps)), elemAfter && /*#__PURE__*/React.createElement(_styles.Accessory, {
152
- after: true
153
- }, elemAfter));
240
+ }, qa, inputProps)), elementAfter && /*#__PURE__*/React.createElement(_styles.Accessory, {
241
+ after: true,
242
+ isClearButton: isClearButton(elementAfter)
243
+ }, elementAfter)));
154
244
  };
155
245
 
156
246
  return Input;
157
247
  }(React.Component);
158
248
 
159
- exports.default = Input;
160
249
  Input.defaultProps = {
161
250
  autoFocus: false,
162
251
  disabled: false,
163
252
  type: "text",
164
253
  size: "default",
165
- appearance: "primary"
166
- };
254
+ appearance: "primary",
255
+ innerRef: /*#__PURE__*/React.createRef()
256
+ };
257
+ Input.ClearButton = ClearButton;
258
+ Input.ClearButton.displayName = "Input.ClearButton";
259
+ var _default = Input;
260
+ exports.default = _default;
@@ -86,7 +86,7 @@ var Accessory = _styledComponents.default.div.withConfig({
86
86
  }, function (props) {
87
87
  return props.before && (0, _styledComponents.css)(["left:", ";"], props.theme.space[350]);
88
88
  }, function (props) {
89
- return props.after && (0, _styledComponents.css)(["right:", ";"], props.theme.space[350]);
89
+ return props.after && (0, _styledComponents.css)(["right:", ";"], props.isClearButton ? 0 : props.theme.space[350]);
90
90
  });
91
91
 
92
92
  exports.Accessory = Accessory;
@@ -267,13 +267,6 @@ var MenuRadio = function MenuRadio(props) {
267
267
 
268
268
  exports.MenuRadio = MenuRadio;
269
269
 
270
- var _StyledText = (0, _styledComponents.default)(_Text.default).withConfig({
271
- displayName: "Menu___StyledText",
272
- componentId: "sc-1p3rdnp-0"
273
- })(["", ""], function (p) {
274
- return p._css;
275
- });
276
-
277
270
  var MenuGroup = function MenuGroup(_ref2) {
278
271
  var children = _ref2.children,
279
272
  title = _ref2.title,
@@ -293,7 +286,7 @@ var MenuGroup = function MenuGroup(_ref2) {
293
286
  fontWeight: 600,
294
287
  mt: 350,
295
288
  color: "text.headline",
296
- _css: isDisabled && _mixins.disabled
289
+ $_css: isDisabled && _mixins.disabled
297
290
  }, title)), /*#__PURE__*/React.createElement(_Box.default, _extends({}, props, {
298
291
  p: 300,
299
292
  role: "group"
@@ -443,7 +436,7 @@ Menu.Divider.displayName = "Menu.Divider";
443
436
  Menu.FilterInput.displayName = "Menu.FilterInput";
444
437
  var CustomPopoutContent = (0, _styledComponents.default)(_Popout.default.Content).withConfig({
445
438
  displayName: "Menu__CustomPopoutContent",
446
- componentId: "sc-1p3rdnp-1"
439
+ componentId: "sc-1p3rdnp-0"
447
440
  })(["padding:0;margin-left:0;margin-right:0;"]);
448
441
 
449
442
  var MenuButton = function MenuButton(_ref5) {
@@ -501,4 +494,11 @@ var MenuButton = function MenuButton(_ref5) {
501
494
 
502
495
  exports.MenuButton = MenuButton;
503
496
  var _default = Menu;
504
- exports.default = _default;
497
+ exports.default = _default;
498
+
499
+ var _StyledText = (0, _styledComponents.default)(_Text.default).withConfig({
500
+ displayName: "Menu___StyledText",
501
+ componentId: "sc-1p3rdnp-1"
502
+ })(["", ""], function (p) {
503
+ return p.$_css;
504
+ });
@@ -15,8 +15,6 @@ var _Box = _interopRequireDefault(require("../Box"));
15
15
 
16
16
  var _systemProps = require("../utils/system-props");
17
17
 
18
- var _templateObject;
19
-
20
18
  var _excluded = ["className"];
21
19
 
22
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -25,8 +23,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
25
23
 
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
25
 
28
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
29
-
30
26
  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); }
31
27
 
32
28
  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; }
@@ -55,7 +51,7 @@ function ReactModalAdapter(_ref) {
55
51
  }, props));
56
52
  }
57
53
 
58
- var Body = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n .ReactModal__Body--open {\n overflow: hidden;\n }\n"]))); // eslint-disable-next-line prettier/prettier
54
+ var Body = (0, _styledComponents.createGlobalStyle)([".ReactModal__Body--open{overflow:hidden;}"]); // eslint-disable-next-line prettier/prettier
59
55
 
60
56
  exports.Body = Body;
61
57
  var Container = (0, _styledComponents.default)(ReactModalAdapter).withConfig({
@@ -82,26 +82,14 @@ function toast(options) {
82
82
  });
83
83
  }
84
84
 
85
- var _StyledBox = (0, _styledComponents.default)(_Box.default).withConfig({
86
- displayName: "Toast___StyledBox",
87
- componentId: "sc-1vii3dq-0"
88
- })(["", ""], function (p) {
89
- return p._css;
90
- });
91
-
92
85
  var IconBox = function IconBox(props) {
93
86
  return /*#__PURE__*/React.createElement(_StyledBox, _extends({
94
87
  display: "inline-block"
95
88
  }, props, {
96
- _css: "line-height: 1;"
89
+ $_css: "line-height: 1;"
97
90
  }));
98
91
  };
99
92
 
100
- var _StyledBox2 = (0, _styledComponents.default)(_Box.default).withConfig({
101
- displayName: "Toast___StyledBox2",
102
- componentId: "sc-1vii3dq-1"
103
- })(["transform:translateY(1px);"]);
104
-
105
93
  var Toast = function Toast(_ref) {
106
94
  var content = _ref.content,
107
95
  theme = _ref.theme,
@@ -140,4 +128,16 @@ var Toast = function Toast(_ref) {
140
128
  };
141
129
 
142
130
  var _default = ToastContainer;
143
- exports.default = _default;
131
+ exports.default = _default;
132
+
133
+ var _StyledBox = (0, _styledComponents.default)(_Box.default).withConfig({
134
+ displayName: "Toast___StyledBox",
135
+ componentId: "sc-1vii3dq-0"
136
+ })(["", ""], function (p) {
137
+ return p.$_css;
138
+ });
139
+
140
+ var _StyledBox2 = (0, _styledComponents.default)(_Box.default).withConfig({
141
+ displayName: "Toast___StyledBox2",
142
+ componentId: "sc-1vii3dq-1"
143
+ })(["transform:translateY(1px);"]);
@@ -11,16 +11,13 @@ var _Icon = _interopRequireDefault(require("../Icon"));
11
11
 
12
12
  var _ReactToastify = _interopRequireDefault(require("!!raw-loader!react-toastify/dist/ReactToastify.css"));
13
13
 
14
- var _templateObject;
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
17
 
20
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
19
 
22
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
23
-
20
+ // $FlowIssue
24
21
  var Container = (0, _styledComponents.default)(_Box.default).withConfig({
25
22
  displayName: "styles__Container",
26
23
  componentId: "sc-wp5x29-0"
@@ -42,7 +39,7 @@ var CustomIcon = (0, _styledComponents.default)(_Icon.default).withConfig({
42
39
  return p.customColor ? undefined : p.theme.colors.icon[p.type];
43
40
  });
44
41
  exports.CustomIcon = CustomIcon;
45
- var GlobalToastStyles = (0, _styledComponents.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"])), _ReactToastify.default, function (p) {
42
+ var GlobalToastStyles = (0, _styledComponents.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;}}"], _ReactToastify.default, function (p) {
46
43
  return p.theme.space[400];
47
44
  }, function (p) {
48
45
  return p.theme.space[400];
@@ -302,7 +302,7 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
302
302
  "aria-invalid": !!isInvalid,
303
303
  "aria-label": ariaLabel,
304
304
  autoFocus: autoFocus,
305
- autocomplete: autocomplete,
305
+ autoComplete: autocomplete,
306
306
  disabled: disabled,
307
307
  id: id,
308
308
  name: name,
@@ -175,7 +175,10 @@ var colors = _extends({}, _theme.default.colors, {
175
175
  subtext: _seedsColor.default.COLOR_NEUTRAL_300,
176
176
  body: _seedsColor.default.COLOR_NEUTRAL_100,
177
177
  inverse: _seedsColor.default.COLOR_NEUTRAL_900,
178
- error: _seedsColor.default.COLOR_RED_400
178
+ error: _seedsColor.default.COLOR_RED_400,
179
+ background: {
180
+ highlight: _seedsColor.default.COLOR_YELLOW_900
181
+ }
179
182
  },
180
183
  icon: {
181
184
  base: _seedsColor.default.COLOR_NEUTRAL_100,
@@ -177,7 +177,10 @@ var colors = _extends({
177
177
  subtext: _seedsColor.default.COLOR_NEUTRAL_700,
178
178
  body: _seedsColor.default.COLOR_NEUTRAL_800,
179
179
  inverse: _seedsColor.default.COLOR_NEUTRAL_0,
180
- error: _seedsColor.default.COLOR_RED_800
180
+ error: _seedsColor.default.COLOR_RED_800,
181
+ background: {
182
+ highlight: _seedsColor.default.COLOR_YELLOW_200
183
+ }
181
184
  },
182
185
  icon: {
183
186
  base: _seedsColor.default.COLOR_NEUTRAL_800,
@@ -147,7 +147,10 @@ $dark: (
147
147
  subtext: #c8cccc,
148
148
  body: #f3f4f4,
149
149
  inverse: #273333,
150
- error: #ff7f6e
150
+ error: #ff7f6e,
151
+ background: (
152
+ highlight: #944c0c
153
+ )
151
154
  ),
152
155
  icon: (
153
156
  base: #f3f4f4,
@@ -154,7 +154,10 @@ $light: (
154
154
  subtext: #515e5f,
155
155
  body: #364141,
156
156
  inverse: #FFFFFF,
157
- error: #c63434
157
+ error: #c63434,
158
+ background: (
159
+ highlight: #ffe99a
160
+ )
158
161
  ),
159
162
  icon: (
160
163
  base: #364141,
@@ -53,5 +53,4 @@ var Button = function Button(_ref) {
53
53
  }, qa, rest), children);
54
54
  };
55
55
 
56
- Button.displayName = "Button";
57
56
  export default Button;
@@ -44,5 +44,4 @@ var Container = styled.button.withConfig({
44
44
  }, function (props) {
45
45
  return props.appearance === "pill" && css(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode === "dark" ? "screen" : "multiply", pill);
46
46
  }, Icon, LAYOUT, COMMON);
47
- Container.displayName = "Button-Container";
48
47
  export default Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
@@ -1,7 +1,3 @@
1
- var _templateObject;
2
-
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
-
5
1
  import styled, { createGlobalStyle, css } from "styled-components";
6
2
  import moment from "moment";
7
3
  import Box from "../Box";
@@ -72,7 +68,7 @@ export var CalendarDay = styled(Box).withConfig({
72
68
  return css(["color:", ";", ";"], theme.colors.text.subtext, disabled);
73
69
  }
74
70
  });
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) {
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) {
76
72
  var theme = _ref2.theme;
77
73
  return theme.fontWeights.normal;
78
74
  }, function (props) {