@sproutsocial/racine 11.3.0-beta.1 → 11.3.1-beta-deps.1
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 +24 -0
- package/__flow__/Badge/constants.js +48 -0
- package/__flow__/Badge/index.js +60 -33
- package/__flow__/Badge/index.stories.js +35 -42
- package/__flow__/Badge/index.test.js +34 -32
- package/__flow__/Badge/styles.js +22 -42
- package/__flow__/Button/index.js +1 -0
- package/__flow__/Button/index.stories.js +51 -67
- package/__flow__/EmptyState/index.test.js +1 -1
- package/__flow__/Input/index.js +67 -116
- package/__flow__/Input/index.stories.js +0 -33
- package/__flow__/Input/index.test.js +1 -199
- package/__flow__/Input/styles.js +1 -1
- package/__flow__/Menu/__snapshots__/index.test.js.snap +3 -3
- package/__flow__/setupTests.js +1 -1
- package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +0 -14
- package/__flow__/systemProps/tests/layout.test.js +0 -9
- package/__flow__/themes/extendedThemes/README.md +6 -0
- package/commonjs/Badge/constants.js +43 -0
- package/commonjs/Badge/index.js +41 -39
- package/commonjs/Badge/styles.js +15 -31
- package/commonjs/Button/index.js +1 -0
- package/commonjs/DatePicker/styles.js +5 -1
- package/commonjs/Input/index.js +30 -66
- package/commonjs/Input/styles.js +1 -1
- package/commonjs/Menu/index.js +10 -10
- package/commonjs/Modal/styles.js +5 -1
- package/commonjs/Toast/index.js +14 -14
- package/commonjs/Toast/styles.js +5 -2
- package/lib/Badge/constants.js +38 -0
- package/lib/Badge/index.js +38 -39
- package/lib/Badge/styles.js +12 -27
- package/lib/Button/index.js +1 -0
- package/lib/DatePicker/styles.js +5 -1
- package/lib/Input/index.js +29 -59
- package/lib/Input/styles.js +1 -1
- package/lib/Menu/index.js +11 -10
- package/lib/Modal/styles.js +5 -1
- package/lib/Toast/index.js +14 -14
- package/lib/Toast/styles.js +5 -1
- package/package.json +25 -21
- package/__flow__/Button/__snapshots__/index.test.js.snap +0 -511
- package/__flow__/Button/index.test.js +0 -113
package/lib/Badge/index.js
CHANGED
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
var _excluded = ["
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
47
|
+
|
|
48
|
+
export default Badge;
|
package/lib/Badge/styles.js
CHANGED
|
@@ -1,35 +1,20 @@
|
|
|
1
|
-
import styled
|
|
1
|
+
import styled from "styled-components";
|
|
2
2
|
import { COMMON } from "../utils/system-props";
|
|
3
3
|
import { themeGet } from "@styled-system/theme-get";
|
|
4
|
-
|
|
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
|
-
})(["
|
|
27
|
-
return
|
|
28
|
-
}, function (
|
|
29
|
-
return
|
|
30
|
-
}, function (
|
|
31
|
-
return
|
|
32
|
-
}, function (
|
|
33
|
-
return
|
|
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;
|
package/lib/Button/index.js
CHANGED
package/lib/DatePicker/styles.js
CHANGED
|
@@ -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{
|
|
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) {
|
package/lib/Input/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "
|
|
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,31 +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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_this.handleClear = function (e) {
|
|
47
|
-
return _this.props.onClear == null ? void 0 : _this.props.onClear(e);
|
|
27
|
+
if (_this.props.onBlur) {
|
|
28
|
+
_this.props.onBlur(e);
|
|
29
|
+
}
|
|
48
30
|
};
|
|
49
31
|
|
|
50
32
|
_this.handleChange = function (e) {
|
|
51
|
-
|
|
33
|
+
if (_this.props.onChange) {
|
|
34
|
+
_this.props.onChange(e, e.currentTarget.value);
|
|
35
|
+
}
|
|
52
36
|
};
|
|
53
37
|
|
|
54
38
|
_this.handleFocus = function (e) {
|
|
55
|
-
|
|
39
|
+
if (_this.props.onFocus) {
|
|
40
|
+
_this.props.onFocus(e);
|
|
41
|
+
}
|
|
56
42
|
};
|
|
57
43
|
|
|
58
44
|
_this.handleKeyDown = function (e) {
|
|
59
|
-
|
|
45
|
+
if (_this.props.onKeyDown) {
|
|
46
|
+
_this.props.onKeyDown(e, e.currentTarget.value);
|
|
47
|
+
}
|
|
60
48
|
};
|
|
61
49
|
|
|
62
50
|
_this.handleKeyUp = function (e) {
|
|
63
|
-
|
|
51
|
+
if (_this.props.onKeyUp) {
|
|
52
|
+
_this.props.onKeyUp(e, e.currentTarget.value);
|
|
53
|
+
}
|
|
64
54
|
};
|
|
65
55
|
|
|
66
56
|
_this.handlePaste = function (e) {
|
|
67
|
-
|
|
57
|
+
if (_this.props.onPaste) {
|
|
58
|
+
_this.props.onPaste(e, e.currentTarget.value);
|
|
59
|
+
}
|
|
68
60
|
};
|
|
69
61
|
|
|
70
62
|
return _this;
|
|
@@ -73,8 +65,6 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
73
65
|
var _proto = Input.prototype;
|
|
74
66
|
|
|
75
67
|
_proto.render = function render() {
|
|
76
|
-
var _elementAfter$type;
|
|
77
|
-
|
|
78
68
|
var _this$props = this.props,
|
|
79
69
|
autoComplete = _this$props.autoComplete,
|
|
80
70
|
autoFocus = _this$props.autoFocus,
|
|
@@ -93,11 +83,9 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
93
83
|
maxLength = _this$props.maxLength,
|
|
94
84
|
ariaLabel = _this$props.ariaLabel,
|
|
95
85
|
ariaDescribedby = _this$props.ariaDescribedby,
|
|
96
|
-
clearButtonLabel = _this$props.clearButtonLabel,
|
|
97
86
|
innerRef = _this$props.innerRef,
|
|
98
87
|
onBlur = _this$props.onBlur,
|
|
99
88
|
onChange = _this$props.onChange,
|
|
100
|
-
onClear = _this$props.onClear,
|
|
101
89
|
onFocus = _this$props.onFocus,
|
|
102
90
|
onKeyDown = _this$props.onKeyDown,
|
|
103
91
|
onKeyUp = _this$props.onKeyUp,
|
|
@@ -107,38 +95,25 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
107
95
|
_this$props$qa = _this$props.qa,
|
|
108
96
|
qa = _this$props$qa === void 0 ? {} : _this$props$qa,
|
|
109
97
|
appearance = _this$props.appearance,
|
|
110
|
-
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
111
|
-
|
|
98
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
112
99
|
|
|
113
100
|
var autoCompleteValue = undefined;
|
|
114
101
|
|
|
115
102
|
if (autoComplete !== undefined) {
|
|
116
103
|
autoCompleteValue = autoComplete ? "on" : "off";
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var elementBefore = type === "search" && !elemBefore ? /*#__PURE__*/React.createElement(Icon, {
|
|
121
|
-
name: "search",
|
|
122
|
-
ariaHidden: true
|
|
123
|
-
}) : elemBefore; // Do not add a ClearButton if no onClear callback is provided or if an elemAfter prop was passed.
|
|
104
|
+
}
|
|
124
105
|
|
|
125
|
-
var elementAfter = type === "search" && onClear && !elemAfter ? /*#__PURE__*/React.createElement(ClearButton, null) : elemAfter;
|
|
126
106
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
127
|
-
hasBeforeElement: !!
|
|
128
|
-
hasAfterElement: !!
|
|
107
|
+
hasBeforeElement: !!elemBefore,
|
|
108
|
+
hasAfterElement: !!elemAfter,
|
|
129
109
|
disabled: disabled,
|
|
130
110
|
invalid: !!isInvalid,
|
|
131
111
|
warning: hasWarning,
|
|
132
112
|
appearance: appearance // $FlowIssue - upgrade v0.112.0
|
|
133
113
|
|
|
134
|
-
}, rest), /*#__PURE__*/React.createElement(
|
|
135
|
-
value: {
|
|
136
|
-
handleClear: this.handleClear,
|
|
137
|
-
clearButtonLabel: clearButtonLabel
|
|
138
|
-
}
|
|
139
|
-
}, elementBefore && /*#__PURE__*/React.createElement(Accessory, {
|
|
114
|
+
}, rest), elemBefore && /*#__PURE__*/React.createElement(Accessory, {
|
|
140
115
|
before: true
|
|
141
|
-
},
|
|
116
|
+
}, elemBefore), /*#__PURE__*/React.createElement("input", _extends({
|
|
142
117
|
"aria-invalid": !!isInvalid,
|
|
143
118
|
"aria-label": ariaLabel,
|
|
144
119
|
"aria-describedby": ariaDescribedby,
|
|
@@ -163,12 +138,9 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
163
138
|
"data-qa-input": name || "",
|
|
164
139
|
"data-qa-input-isdisabled": disabled === true,
|
|
165
140
|
"data-qa-input-isrequired": required === true
|
|
166
|
-
}, qa, inputProps)),
|
|
167
|
-
after: true
|
|
168
|
-
|
|
169
|
-
,
|
|
170
|
-
isClearButton: (elementAfter == null ? void 0 : (_elementAfter$type = elementAfter.type) == null ? void 0 : _elementAfter$type.prototype) === Input.ClearButton.prototype
|
|
171
|
-
}, elementAfter)));
|
|
141
|
+
}, qa, inputProps)), elemAfter && /*#__PURE__*/React.createElement(Accessory, {
|
|
142
|
+
after: true
|
|
143
|
+
}, elemAfter));
|
|
172
144
|
};
|
|
173
145
|
|
|
174
146
|
return Input;
|
|
@@ -181,6 +153,4 @@ Input.defaultProps = {
|
|
|
181
153
|
size: "default",
|
|
182
154
|
appearance: "primary"
|
|
183
155
|
};
|
|
184
|
-
Input
|
|
185
|
-
Input.ClearButton.displayName = "Input.ClearButton";
|
|
186
|
-
export default Input;
|
|
156
|
+
export { Input as default };
|
package/lib/Input/styles.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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-
|
|
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;
|
package/lib/Modal/styles.js
CHANGED
|
@@ -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
|
|
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",
|
package/lib/Toast/index.js
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/lib/Toast/styles.js
CHANGED
|
@@ -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(["", "
|
|
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.
|
|
3
|
+
"version": "11.3.1-beta-deps.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"__flow__",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"lodash.curry": "^4.1.1",
|
|
70
70
|
"lodash.uniqueid": "^4.0.1",
|
|
71
71
|
"lru-memoize": "^1.1.0",
|
|
72
|
-
"mutationobserver-shim": "^0.3.
|
|
72
|
+
"mutationobserver-shim": "^0.3.7",
|
|
73
73
|
"polished": "^3.4.1",
|
|
74
74
|
"raw-loader": "^3.0.0",
|
|
75
75
|
"react-focus-lock": "^2.0.3",
|
|
@@ -77,14 +77,14 @@
|
|
|
77
77
|
"react-popper": "^1.3.3",
|
|
78
78
|
"react-spring": "^8.0.25",
|
|
79
79
|
"react-toastify": "^6.0.5",
|
|
80
|
-
"react-virtualized": "9.
|
|
80
|
+
"react-virtualized": "9.22.3",
|
|
81
81
|
"scroll-into-view-if-needed": "1.1.0",
|
|
82
82
|
"styled-system": "^5.1.5",
|
|
83
83
|
"use-measure": "^0.2.2"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@babel/cli": "^7.5.5",
|
|
87
|
-
"@babel/core": "^7.
|
|
87
|
+
"@babel/core": "^7.12.9",
|
|
88
88
|
"@babel/plugin-proposal-class-properties": "^7.4.4",
|
|
89
89
|
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
|
90
90
|
"@babel/preset-env": "^7.8.0",
|
|
@@ -99,23 +99,27 @@
|
|
|
99
99
|
"@sproutsocial/seeds-networkcolor": "^2.9.0",
|
|
100
100
|
"@sproutsocial/seeds-space": "^0.4.7",
|
|
101
101
|
"@sproutsocial/seeds-typography": "^3.0.1",
|
|
102
|
-
"@storybook/addon-a11y": "^6.
|
|
103
|
-
"@storybook/addon-actions": "^6.
|
|
104
|
-
"@storybook/addon-
|
|
105
|
-
"@storybook/addon-
|
|
106
|
-
"@storybook/addon-
|
|
107
|
-
"@storybook/
|
|
102
|
+
"@storybook/addon-a11y": "^6.4.19",
|
|
103
|
+
"@storybook/addon-actions": "^6.4.19",
|
|
104
|
+
"@storybook/addon-controls": "^6.4.19",
|
|
105
|
+
"@storybook/addon-knobs": "^6.4.0",
|
|
106
|
+
"@storybook/addon-storysource": "^6.4.19",
|
|
107
|
+
"@storybook/addon-viewport": "^6.4.19",
|
|
108
|
+
"@storybook/addons": "^6.4.19",
|
|
108
109
|
"@storybook/react": "^6.4.19",
|
|
109
|
-
"@storybook/theming": "^6.
|
|
110
|
+
"@storybook/theming": "^6.4.19",
|
|
111
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
110
112
|
"@testing-library/react": "^11.2.2",
|
|
111
113
|
"@testing-library/user-event": "^13.0.0",
|
|
114
|
+
"@univision/babel-plugin-styled-components": "^1.10.9",
|
|
115
|
+
"axios": "^0.26.1",
|
|
112
116
|
"babel-core": "^7.0.0-bridge",
|
|
113
117
|
"babel-eslint": "10.1.0",
|
|
114
|
-
"babel-jest": "
|
|
115
|
-
"babel-loader": "8.
|
|
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": "^
|
|
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": "
|
|
141
|
-
"jest-axe": "
|
|
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.
|
|
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.
|
|
159
|
-
"styled-components": "5.
|
|
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.
|
|
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
|
],
|