@sproutsocial/racine 11.3.1-beta-deps.2 → 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.
- package/CHANGELOG.md +22 -0
- package/__flow__/Button/__snapshots__/index.test.js.snap +511 -0
- package/__flow__/Button/index.js +0 -2
- package/__flow__/Button/index.stories.js +67 -51
- package/__flow__/Button/index.test.js +113 -0
- package/__flow__/Button/styles.js +1 -1
- package/__flow__/EmptyState/index.test.js +1 -1
- package/__flow__/Input/index.js +185 -66
- package/__flow__/Input/index.stories.js +65 -0
- package/__flow__/Input/index.test.js +227 -1
- package/__flow__/Input/styles.js +1 -1
- package/__flow__/Link/index.js +2 -1
- package/__flow__/Menu/__snapshots__/index.test.js.snap +2 -2
- package/__flow__/TokenInput/index.js +1 -1
- package/__flow__/setupTests.js +1 -1
- package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +14 -0
- package/__flow__/systemProps/tests/layout.test.js +9 -0
- package/__flow__/themes/dark/theme.js +3 -0
- package/__flow__/themes/light/theme.js +3 -0
- package/__flow__/types/theme.colors.flow.js +3 -0
- package/commonjs/Button/index.js +0 -1
- package/commonjs/Button/styles.js +0 -1
- package/commonjs/DatePicker/styles.js +1 -5
- package/commonjs/Input/index.js +125 -31
- package/commonjs/Input/styles.js +1 -1
- package/commonjs/Menu/index.js +10 -10
- package/commonjs/Modal/styles.js +1 -5
- package/commonjs/Toast/index.js +14 -14
- package/commonjs/Toast/styles.js +2 -5
- package/commonjs/TokenInput/index.js +1 -1
- package/commonjs/themes/dark/theme.js +4 -1
- package/commonjs/themes/light/theme.js +4 -1
- package/dist/themes/dark/dark.scss +4 -1
- package/dist/themes/light/light.scss +4 -1
- package/lib/Button/index.js +0 -1
- package/lib/Button/styles.js +0 -1
- package/lib/DatePicker/styles.js +1 -5
- package/lib/Input/index.js +118 -31
- package/lib/Input/styles.js +1 -1
- package/lib/Menu/index.js +10 -11
- package/lib/Modal/styles.js +1 -5
- package/lib/Toast/index.js +14 -14
- package/lib/Toast/styles.js +1 -5
- package/lib/TokenInput/index.js +1 -1
- package/lib/themes/dark/theme.js +4 -1
- package/lib/themes/light/theme.js +4 -1
- package/package.json +21 -25
- package/bin/buildNpm.js +0 -58
package/commonjs/Input/index.js
CHANGED
|
@@ -7,7 +7,15 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _styles = _interopRequireWildcard(require("./styles"));
|
|
9
9
|
|
|
10
|
-
var
|
|
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
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: !!
|
|
118
|
-
hasAfterElement: !!
|
|
197
|
+
hasBeforeElement: !!elementBefore,
|
|
198
|
+
hasAfterElement: !!elementAfter,
|
|
119
199
|
disabled: disabled,
|
|
120
200
|
invalid: !!isInvalid,
|
|
121
201
|
warning: hasWarning,
|
|
122
|
-
appearance: appearance
|
|
202
|
+
appearance: appearance,
|
|
203
|
+
size: size // $FlowIssue - upgrade v0.112.0
|
|
123
204
|
|
|
124
|
-
}, rest),
|
|
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
|
-
},
|
|
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)),
|
|
152
|
-
after: true
|
|
153
|
-
|
|
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;
|
package/commonjs/Input/styles.js
CHANGED
|
@@ -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;
|
package/commonjs/Menu/index.js
CHANGED
|
@@ -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-
|
|
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
|
+
});
|
package/commonjs/Modal/styles.js
CHANGED
|
@@ -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)(
|
|
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({
|
package/commonjs/Toast/index.js
CHANGED
|
@@ -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);"]);
|
package/commonjs/Toast/styles.js
CHANGED
|
@@ -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
|
-
|
|
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)(
|
|
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
|
-
|
|
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,
|
package/lib/Button/index.js
CHANGED
package/lib/Button/styles.js
CHANGED
|
@@ -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"}
|
package/lib/DatePicker/styles.js
CHANGED
|
@@ -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(
|
|
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) {
|