@sproutsocial/racine 11.2.0 → 11.3.0-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 +0 -6
- package/__flow__/Badge/index.js +32 -58
- package/__flow__/Badge/index.stories.js +42 -35
- package/__flow__/Badge/index.test.js +32 -34
- package/__flow__/Badge/styles.js +42 -22
- package/__flow__/Input/index.js +124 -66
- package/__flow__/Input/index.stories.js +33 -0
- package/__flow__/Input/index.test.js +224 -1
- package/__flow__/Input/styles.js +1 -1
- package/commonjs/Avatar/index.js +7 -4
- package/commonjs/Badge/index.js +39 -39
- package/commonjs/Badge/styles.js +32 -16
- package/commonjs/Banner/index.js +3 -1
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Box/styles.js +1 -1
- package/commonjs/Breadcrumb/index.js +5 -2
- package/commonjs/Button/index.js +3 -1
- package/commonjs/Card/index.js +3 -1
- package/commonjs/Card/styles.js +3 -3
- package/commonjs/CharacterCounter/index.js +3 -1
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/ChartLegend/index.js +3 -1
- package/commonjs/ChartLegend/styles.js +3 -3
- package/commonjs/Checkbox/index.js +3 -1
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Collapsible/index.js +5 -2
- package/commonjs/DatePicker/DateRangePicker.js +3 -1
- package/commonjs/DatePicker/SingleDatePicker.js +3 -1
- package/commonjs/DatePicker/StatefulDateRangePicker.js +3 -1
- package/commonjs/DatePicker/StatefulSingleDatePicker.js +3 -1
- package/commonjs/DatePicker/common.js +1 -1
- package/commonjs/DatePicker/styles.js +2 -6
- package/commonjs/Drawer/SlideTransition.js +3 -1
- package/commonjs/Drawer/index.js +9 -4
- package/commonjs/Drawer/styles.js +2 -2
- package/commonjs/EmptyState/index.js +3 -1
- package/commonjs/Fieldset/index.js +7 -3
- package/commonjs/FormField/index.js +3 -1
- package/commonjs/Icon/index.js +5 -2
- package/commonjs/Icon/styles.js +1 -1
- package/commonjs/Image/index.js +3 -1
- package/commonjs/Image/styles.js +1 -1
- package/commonjs/Indicator/index.js +3 -1
- package/commonjs/Input/index.js +69 -28
- package/commonjs/Input/styles.js +3 -3
- package/commonjs/KeyboardKey/index.js +3 -1
- package/commonjs/Label/index.js +4 -2
- package/commonjs/Link/index.js +3 -1
- package/commonjs/Link/styles.js +1 -1
- package/commonjs/Listbox/index.js +7 -4
- package/commonjs/Loader/index.js +3 -1
- package/commonjs/Loader/styles.js +2 -2
- package/commonjs/LoaderButton/index.js +3 -1
- package/commonjs/Menu/constants.js +1 -1
- package/commonjs/Menu/descendants.js +10 -7
- package/commonjs/Menu/hooks.js +1 -1
- package/commonjs/Menu/index.js +22 -16
- package/commonjs/Menu/styles.js +2 -2
- package/commonjs/Message/index.js +3 -1
- package/commonjs/Message/styles.js +1 -1
- package/commonjs/Modal/index.js +7 -3
- package/commonjs/Modal/styles.js +4 -6
- package/commonjs/Numeral/constants.js +1 -1
- package/commonjs/Numeral/index.js +3 -1
- package/commonjs/Numeral/styles.js +3 -3
- package/commonjs/OverflowList/styles.js +1 -1
- package/commonjs/Popout/index.js +7 -3
- package/commonjs/Popout/styles.js +1 -1
- package/commonjs/Radio/index.js +3 -1
- package/commonjs/Radio/styles.js +4 -4
- package/commonjs/SegmentedControl/index.js +5 -2
- package/commonjs/Select/index.js +3 -1
- package/commonjs/Stack/index.js +3 -1
- package/commonjs/Switch/index.js +3 -1
- package/commonjs/Switch/styles.js +1 -1
- package/commonjs/Table/index.js +10 -5
- package/commonjs/TableCell/index.js +3 -1
- package/commonjs/TableHeaderCell/index.js +3 -1
- package/commonjs/TableRowAccordion/index.js +3 -1
- package/commonjs/Tabs/index.js +5 -2
- package/commonjs/Tabs/styles.js +4 -4
- package/commonjs/Text/index.js +3 -1
- package/commonjs/Text/styles.js +1 -1
- package/commonjs/Textarea/index.js +3 -1
- package/commonjs/Toast/index.js +15 -15
- package/commonjs/Toast/styles.js +4 -7
- package/commonjs/ToggleHint/index.js +3 -1
- package/commonjs/Token/index.js +3 -1
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/index.js +3 -1
- package/commonjs/Tooltip/index.js +5 -2
- package/commonjs/Tooltip/styles.js +1 -1
- package/commonjs/VisuallyHidden/index.js +1 -1
- package/commonjs/index.js +1 -1
- package/commonjs/themes/dark/decorative-palettes.js +1 -1
- package/commonjs/themes/dark/theme.js +1 -1
- package/commonjs/themes/light/decorative-palettes.js +1 -1
- package/commonjs/themes/light/theme.js +1 -1
- package/commonjs/utils/hooks.js +3 -2
- package/commonjs/utils/mixins.js +1 -1
- package/commonjs/utils/system-props.js +1 -1
- package/dist/themes/dark/dark.scss +5 -5
- package/dist/themes/light/light.scss +95 -95
- package/lib/Avatar/index.js +7 -4
- package/lib/Badge/index.js +40 -37
- package/lib/Badge/styles.js +28 -13
- package/lib/Banner/index.js +3 -1
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/styles.js +1 -1
- package/lib/Breadcrumb/index.js +5 -2
- package/lib/Button/index.js +3 -1
- package/lib/Card/index.js +3 -1
- package/lib/Card/styles.js +2 -2
- package/lib/CharacterCounter/index.js +3 -1
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/index.js +3 -1
- package/lib/ChartLegend/styles.js +3 -3
- package/lib/Checkbox/index.js +3 -1
- package/lib/Collapsible/index.js +5 -2
- package/lib/DatePicker/DateRangePicker.js +3 -1
- package/lib/DatePicker/SingleDatePicker.js +3 -1
- package/lib/DatePicker/StatefulDateRangePicker.js +3 -1
- package/lib/DatePicker/StatefulSingleDatePicker.js +3 -1
- package/lib/DatePicker/styles.js +2 -6
- package/lib/Drawer/SlideTransition.js +3 -1
- package/lib/Drawer/index.js +9 -4
- package/lib/Drawer/styles.js +2 -2
- package/lib/EmptyState/index.js +3 -1
- package/lib/Fieldset/index.js +7 -3
- package/lib/FormField/index.js +3 -1
- package/lib/Icon/index.js +5 -2
- package/lib/Icon/styles.js +1 -1
- package/lib/Image/index.js +3 -1
- package/lib/Image/styles.js +1 -1
- package/lib/Indicator/index.js +3 -1
- package/lib/Input/index.js +62 -27
- package/lib/Input/styles.js +3 -3
- package/lib/KeyboardKey/index.js +3 -1
- package/lib/Label/index.js +4 -2
- package/lib/Link/index.js +3 -1
- package/lib/Link/styles.js +1 -1
- package/lib/Listbox/index.js +6 -3
- package/lib/Loader/index.js +3 -1
- package/lib/Loader/styles.js +2 -2
- package/lib/LoaderButton/index.js +3 -1
- package/lib/Menu/descendants.js +5 -2
- package/lib/Menu/index.js +20 -16
- package/lib/Menu/styles.js +2 -2
- package/lib/Message/index.js +3 -1
- package/lib/Modal/index.js +7 -3
- package/lib/Modal/styles.js +3 -5
- package/lib/Numeral/index.js +3 -1
- package/lib/Numeral/styles.js +2 -2
- package/lib/OverflowList/styles.js +1 -1
- package/lib/Popout/index.js +7 -3
- package/lib/Popout/styles.js +1 -1
- package/lib/Radio/index.js +3 -1
- package/lib/Radio/styles.js +4 -4
- package/lib/SegmentedControl/index.js +5 -2
- package/lib/Select/index.js +3 -1
- package/lib/Stack/index.js +3 -1
- package/lib/Switch/index.js +3 -1
- package/lib/Switch/styles.js +1 -1
- package/lib/Table/index.js +9 -4
- package/lib/TableCell/index.js +3 -1
- package/lib/TableHeaderCell/index.js +3 -1
- package/lib/TableRowAccordion/index.js +3 -1
- package/lib/Tabs/index.js +5 -2
- package/lib/Tabs/styles.js +3 -3
- package/lib/Text/index.js +3 -1
- package/lib/Text/styles.js +1 -1
- package/lib/Textarea/index.js +3 -1
- package/lib/Toast/index.js +14 -14
- package/lib/Toast/styles.js +3 -7
- package/lib/ToggleHint/index.js +3 -1
- package/lib/Token/index.js +3 -1
- package/lib/Token/styles.js +1 -1
- package/lib/TokenInput/index.js +3 -1
- package/lib/Tooltip/index.js +5 -2
- package/lib/Tooltip/styles.js +1 -1
- package/lib/VisuallyHidden/index.js +1 -1
- package/package.json +1 -1
- package/__flow__/Badge/constants.js +0 -48
- package/commonjs/Badge/constants.js +0 -43
- package/lib/Badge/constants.js +0 -38
package/commonjs/Toast/styles.js
CHANGED
|
@@ -11,19 +11,16 @@ 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
|
-
componentId: "wp5x29-0"
|
|
23
|
+
componentId: "sc-wp5x29-0"
|
|
27
24
|
})(["display:flex;align-items:center;font-family:", ";", " position:relative;background:", ";border-left:2px solid ", ";"], function (p) {
|
|
28
25
|
return p.theme.fontFamily;
|
|
29
26
|
}, function (p) {
|
|
@@ -35,14 +32,14 @@ var Container = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
|
35
32
|
});
|
|
36
33
|
var CustomIcon = (0, _styledComponents.default)(_Icon.default).withConfig({
|
|
37
34
|
displayName: "styles__CustomIcon",
|
|
38
|
-
componentId: "wp5x29-1"
|
|
35
|
+
componentId: "sc-wp5x29-1"
|
|
39
36
|
})(["margin-right:", ";transform:translateY(4px);color:", ";"], function (props) {
|
|
40
37
|
return props.theme.space[400];
|
|
41
38
|
}, function (p) {
|
|
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];
|
|
@@ -9,6 +9,8 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
9
9
|
|
|
10
10
|
var _styles = _interopRequireWildcard(require("./styles"));
|
|
11
11
|
|
|
12
|
+
var _excluded = ["icon", "isOpen", "openString", "closeString", "qa", "className"];
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
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); }
|
|
@@ -63,7 +65,7 @@ var ToggleHint = /*#__PURE__*/function (_React$Component) {
|
|
|
63
65
|
closeString = _this$props.closeString,
|
|
64
66
|
qa = _this$props.qa,
|
|
65
67
|
className = _this$props.className,
|
|
66
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
68
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
67
69
|
|
|
68
70
|
return /*#__PURE__*/React.createElement(_styles.default, _extends({
|
|
69
71
|
icon: icon,
|
package/commonjs/Token/index.js
CHANGED
|
@@ -13,6 +13,8 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
13
13
|
|
|
14
14
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
15
15
|
|
|
16
|
+
var _excluded = ["children", "closeable", "onClick", "qa", "valid", "disabled", "palette"];
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
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); }
|
|
@@ -35,7 +37,7 @@ var Token = function Token(_ref) {
|
|
|
35
37
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
36
38
|
_ref$palette = _ref.palette,
|
|
37
39
|
palette = _ref$palette === void 0 ? "neutral" : _ref$palette,
|
|
38
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
40
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
39
41
|
|
|
40
42
|
var textContainer = (0, _hooks.useTextContent)("");
|
|
41
43
|
return /*#__PURE__*/React.createElement(_styles.default, _extends({
|
package/commonjs/Token/styles.js
CHANGED
|
@@ -15,7 +15,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
15
|
|
|
16
16
|
var Container = _styledComponents.default.button.withConfig({
|
|
17
17
|
displayName: "styles__Container",
|
|
18
|
-
componentId: "nyn5zy-0"
|
|
18
|
+
componentId: "sc-nyn5zy-0"
|
|
19
19
|
})(["position:relative;display:inline-block;margin:0;line-height:1;vertical-align:middle;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
|
|
20
20
|
var theme = _ref.theme;
|
|
21
21
|
return (0, _styledComponents.css)(["", " font-family:", ";font-weight:", ";border:1px solid ", ";border-radius:", ";color:", ";background:", ";padding:", " ", ";transition:all ", " ", ";"], theme.typography[200], theme.fontFamily, theme.fontWeights.normal, theme.colors.container.border.base, theme.radii[500], theme.colors.text.body, theme.colors.container.background.base, theme.space[200], theme.space[300], theme.duration.fast, theme.easing.ease_inout);
|
|
@@ -17,6 +17,8 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
17
17
|
|
|
18
18
|
var _Token = _interopRequireDefault(require("../Token"));
|
|
19
19
|
|
|
20
|
+
var _excluded = ["autoFocus", "autocomplete", "disabled", "isInvalid", "hasWarning", "id", "name", "placeholder", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaDescribedby", "ariaLabel", "innerRef", "onAddToken", "onRemoveToken", "onChangeTokens", "onClickToken", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "tokens"];
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
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); }
|
|
@@ -282,7 +284,7 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
|
|
|
282
284
|
_this$props5$qa = _this$props5.qa,
|
|
283
285
|
qa = _this$props5$qa === void 0 ? {} : _this$props5$qa,
|
|
284
286
|
tokens = _this$props5.tokens,
|
|
285
|
-
rest = _objectWithoutPropertiesLoose(_this$props5,
|
|
287
|
+
rest = _objectWithoutPropertiesLoose(_this$props5, _excluded);
|
|
286
288
|
|
|
287
289
|
var state = this.state;
|
|
288
290
|
return /*#__PURE__*/React.createElement(_styles.default, _extends({
|
|
@@ -11,6 +11,9 @@ var _Popout = _interopRequireDefault(require("../Popout"));
|
|
|
11
11
|
|
|
12
12
|
var _seedsMotionUnitless = _interopRequireDefault(require("@sproutsocial/seeds-motion/dist/seeds-motion-unitless"));
|
|
13
13
|
|
|
14
|
+
var _excluded = ["content", "children", "enterDelay", "placement", "appearance", "zIndex", "qa", "popoutProps", "truncated"],
|
|
15
|
+
_excluded2 = ["appearance", "children"];
|
|
16
|
+
|
|
14
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
18
|
|
|
16
19
|
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); }
|
|
@@ -48,7 +51,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
48
51
|
popoutProps = _ref.popoutProps,
|
|
49
52
|
_ref$truncated = _ref.truncated,
|
|
50
53
|
truncated = _ref$truncated === void 0 ? false : _ref$truncated,
|
|
51
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
54
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
52
55
|
|
|
53
56
|
var _useState = (0, React.useState)(false),
|
|
54
57
|
shouldShow = _useState[0],
|
|
@@ -122,7 +125,7 @@ var Content = function Content(_ref2) {
|
|
|
122
125
|
var _ref2$appearance = _ref2.appearance,
|
|
123
126
|
appearance = _ref2$appearance === void 0 ? "pill" : _ref2$appearance,
|
|
124
127
|
children = _ref2.children,
|
|
125
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
128
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
126
129
|
|
|
127
130
|
return /*#__PURE__*/React.createElement(_styles.TooltipContent, _extends({
|
|
128
131
|
appearance: appearance,
|
|
@@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
12
12
|
// eslint-disable-next-line prettier/prettier
|
|
13
13
|
var TooltipContent = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
14
14
|
displayName: "styles__TooltipContent",
|
|
15
|
-
componentId: "t1xjnk-0"
|
|
15
|
+
componentId: "sc-t1xjnk-0"
|
|
16
16
|
})(["font-family:", ";", " text-align:", ";"], function (props) {
|
|
17
17
|
return props.theme.fontFamily;
|
|
18
18
|
}, function (props) {
|
|
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
|
|
12
12
|
var VisuallyHidden = _styledComponents.default.span.withConfig({
|
|
13
13
|
displayName: "VisuallyHidden",
|
|
14
|
-
componentId: "rxkbyc-0"
|
|
14
|
+
componentId: "sc-rxkbyc-0"
|
|
15
15
|
})(["", ""], _mixins.visuallyHidden);
|
|
16
16
|
|
|
17
17
|
exports.VisuallyHidden = VisuallyHidden;
|
package/commonjs/index.js
CHANGED
|
@@ -70,7 +70,7 @@ var _exportNames = {
|
|
|
70
70
|
DateRangePicker: true,
|
|
71
71
|
VisuallyHidden: true
|
|
72
72
|
};
|
|
73
|
-
exports.
|
|
73
|
+
exports.visuallyHidden = exports.useTextContent = exports.useSelect = exports.useMultiselect = exports.toast = exports.theme = exports.focusRing = exports.disabled = exports.darkTheme = exports.VisuallyHidden = exports.Tooltip = exports.TokenInput = exports.Token = exports.ToggleHint = exports.ToastContainer = exports.ThemeProvider = exports.Textarea = exports.Text = exports.Tabs = exports.TableRowAccordion = exports.TableHeaderCell = exports.TableCell = exports.Table = exports.Switch = exports.Stack = exports.Skeleton = exports.SingleDatePicker = exports.Select = exports.SegmentedControl = exports.Radio = exports.Popout = exports.OverflowList = exports.Numeral = exports.Modal = exports.Message = exports.MenuItemContainer = exports.MenuButtonContext = exports.MenuButton = exports.Menu = exports.LoaderButton = exports.Loader = exports.ListboxButton = exports.Listbox = exports.Link = exports.Label = exports.KeyboardKey = exports.Input = exports.Indicator = exports.Image = exports.Icon = exports.FormField = exports.Fieldset = exports.EmptyState = exports.Drawer = exports.DateRangePicker = exports.Collapsible = exports.Checkbox = exports.ChartLegend = exports.CharacterCounter = exports.Card = exports.Button = exports.Breadcrumb = exports.Box = exports.Banner = exports.Badge = exports.Avatar = exports.Alert = void 0;
|
|
74
74
|
|
|
75
75
|
var _systemProps = require("./systemProps");
|
|
76
76
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.yellow = exports.red = exports.purple = exports.orange = exports.neutral = exports.green = exports.blue = void 0;
|
|
5
5
|
|
|
6
6
|
var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.yellow = exports.red = exports.purple = exports.orange = exports.neutral = exports.green = exports.blue = void 0;
|
|
5
5
|
|
|
6
6
|
var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.typography = exports.space = exports.shadows = exports.radii = exports.fontWeights = exports.fontFamily = exports.easing = exports.duration = exports.default = exports.breakpoints = exports.borders = exports.borderWidths = void 0;
|
|
5
5
|
|
|
6
6
|
var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
7
7
|
|
package/commonjs/utils/hooks.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
"no babel-plugin-flow-react-proptypes";
|
|
3
3
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.
|
|
5
|
+
exports.useMultiselect = void 0;
|
|
6
6
|
exports.useMutationObserver = useMutationObserver;
|
|
7
7
|
exports.useMutationObserverOnce = useMutationObserverOnce;
|
|
8
|
+
exports.useSelect = void 0;
|
|
9
|
+
exports.useTextContent = useTextContent;
|
|
8
10
|
exports.useWhyDidYouUpdate = useWhyDidYouUpdate;
|
|
9
|
-
exports.useMultiselect = exports.useSelect = void 0;
|
|
10
11
|
|
|
11
12
|
var _react = require("react");
|
|
12
13
|
|
package/commonjs/utils/mixins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.visuallyHidden = exports.svgToDataURL = exports.pill = exports.focusRing = exports.disabled = void 0;
|
|
5
5
|
|
|
6
6
|
var _styledComponents = require("styled-components");
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.TYPOGRAPHY = exports.POSITION = exports.LAYOUT = exports.GRID = exports.FLEXBOX = exports.COMMON = exports.BORDER = void 0;
|
|
5
5
|
|
|
6
6
|
var styles = _interopRequireWildcard(require("styled-system"));
|
|
7
7
|
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
$dark: (
|
|
2
2
|
__esModule: true,
|
|
3
|
-
shadows: (
|
|
4
|
-
low: 0px 2px 4px #040404FF,
|
|
5
|
-
medium: 0px 8px 16px #040404FF,
|
|
6
|
-
high: 0px 16px 32px #040404FF
|
|
7
|
-
),
|
|
8
3
|
default: (
|
|
9
4
|
utils: (
|
|
10
5
|
|
|
@@ -617,5 +612,10 @@ $dark: (
|
|
|
617
612
|
slow: .6s
|
|
618
613
|
),
|
|
619
614
|
mode: dark
|
|
615
|
+
),
|
|
616
|
+
shadows: (
|
|
617
|
+
low: 0px 2px 4px #040404FF,
|
|
618
|
+
medium: 0px 8px 16px #040404FF,
|
|
619
|
+
high: 0px 16px 32px #040404FF
|
|
620
620
|
)
|
|
621
621
|
);
|
|
@@ -1,104 +1,12 @@
|
|
|
1
1
|
$light: (
|
|
2
2
|
__esModule: true,
|
|
3
|
-
breakpoints: (900px, 1200px, 1500px, 1800px),
|
|
4
|
-
typography: (
|
|
5
|
-
100: (
|
|
6
|
-
fontSize: 11px,
|
|
7
|
-
lineHeight: 18.666666666666668px
|
|
8
|
-
),
|
|
9
|
-
200: (
|
|
10
|
-
fontSize: 13px,
|
|
11
|
-
lineHeight: 21.333333333333332px
|
|
12
|
-
),
|
|
13
|
-
300: (
|
|
14
|
-
fontSize: 16px,
|
|
15
|
-
lineHeight: 24px
|
|
16
|
-
),
|
|
17
|
-
400: (
|
|
18
|
-
fontSize: 18px,
|
|
19
|
-
lineHeight: 26.666666666666668px
|
|
20
|
-
),
|
|
21
|
-
500: (
|
|
22
|
-
fontSize: 21px,
|
|
23
|
-
lineHeight: 29.333333333333332px
|
|
24
|
-
),
|
|
25
|
-
600: (
|
|
26
|
-
fontSize: 24px,
|
|
27
|
-
lineHeight: 32px
|
|
28
|
-
),
|
|
29
|
-
700: (
|
|
30
|
-
fontSize: 32px,
|
|
31
|
-
lineHeight: 40px
|
|
32
|
-
),
|
|
33
|
-
800: (
|
|
34
|
-
fontSize: 43px,
|
|
35
|
-
lineHeight: 50.666666666666664px
|
|
36
|
-
),
|
|
37
|
-
900: (
|
|
38
|
-
fontSize: 57px,
|
|
39
|
-
lineHeight: 64px
|
|
40
|
-
),
|
|
41
|
-
1000: (
|
|
42
|
-
fontSize: 76px,
|
|
43
|
-
lineHeight: 80px
|
|
44
|
-
),
|
|
45
|
-
1100: (
|
|
46
|
-
fontSize: 101px,
|
|
47
|
-
lineHeight: 101.33333333333333px
|
|
48
|
-
),
|
|
49
|
-
1200: (
|
|
50
|
-
fontSize: 135px,
|
|
51
|
-
lineHeight: 125.33333333333333px
|
|
52
|
-
)
|
|
53
|
-
),
|
|
54
|
-
fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif",
|
|
55
|
-
fontWeights: (
|
|
56
|
-
normal: 400,
|
|
57
|
-
semibold: 600,
|
|
58
|
-
bold: 700,
|
|
59
|
-
extrabold: 800
|
|
60
|
-
),
|
|
61
|
-
space: (
|
|
62
|
-
0: 0px,
|
|
63
|
-
100: 2px,
|
|
64
|
-
200: 4px,
|
|
65
|
-
300: 8px,
|
|
66
|
-
350: 12px,
|
|
67
|
-
400: 16px,
|
|
68
|
-
450: 24px,
|
|
69
|
-
500: 32px,
|
|
70
|
-
600: 40px
|
|
71
|
-
),
|
|
72
|
-
radii: (
|
|
73
|
-
400: 4px,
|
|
74
|
-
500: 6px,
|
|
75
|
-
600: 8px,
|
|
76
|
-
1000: 999999px,
|
|
77
|
-
inner: 6px,
|
|
78
|
-
outer: 8px,
|
|
79
|
-
pill: 999999px
|
|
80
|
-
),
|
|
81
|
-
borders: (
|
|
82
|
-
500: 1px solid
|
|
83
|
-
),
|
|
84
3
|
borderWidths: (
|
|
85
4
|
500: 1px
|
|
86
5
|
),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
medium: 0px 8px 16px #2733333D,
|
|
90
|
-
high: 0px 16px 32px #2733333D
|
|
91
|
-
),
|
|
92
|
-
easing: (
|
|
93
|
-
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
94
|
-
ease_out: cubic-bezier(0, 0, .2, 1),
|
|
95
|
-
ease_inout: cubic-bezier(.4, 0, .2, 1)
|
|
96
|
-
),
|
|
97
|
-
duration: (
|
|
98
|
-
fast: .15s,
|
|
99
|
-
medium: .3s,
|
|
100
|
-
slow: .6s
|
|
6
|
+
borders: (
|
|
7
|
+
500: 1px solid
|
|
101
8
|
),
|
|
9
|
+
breakpoints: (900px, 1200px, 1500px, 1800px),
|
|
102
10
|
default: (
|
|
103
11
|
utils: (
|
|
104
12
|
|
|
@@ -708,5 +616,97 @@ $light: (
|
|
|
708
616
|
slow: .6s
|
|
709
617
|
),
|
|
710
618
|
mode: light
|
|
619
|
+
),
|
|
620
|
+
duration: (
|
|
621
|
+
fast: .15s,
|
|
622
|
+
medium: .3s,
|
|
623
|
+
slow: .6s
|
|
624
|
+
),
|
|
625
|
+
easing: (
|
|
626
|
+
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
627
|
+
ease_out: cubic-bezier(0, 0, .2, 1),
|
|
628
|
+
ease_inout: cubic-bezier(.4, 0, .2, 1)
|
|
629
|
+
),
|
|
630
|
+
fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif",
|
|
631
|
+
fontWeights: (
|
|
632
|
+
normal: 400,
|
|
633
|
+
semibold: 600,
|
|
634
|
+
bold: 700,
|
|
635
|
+
extrabold: 800
|
|
636
|
+
),
|
|
637
|
+
radii: (
|
|
638
|
+
400: 4px,
|
|
639
|
+
500: 6px,
|
|
640
|
+
600: 8px,
|
|
641
|
+
1000: 999999px,
|
|
642
|
+
inner: 6px,
|
|
643
|
+
outer: 8px,
|
|
644
|
+
pill: 999999px
|
|
645
|
+
),
|
|
646
|
+
shadows: (
|
|
647
|
+
low: 0px 2px 4px #2733333D,
|
|
648
|
+
medium: 0px 8px 16px #2733333D,
|
|
649
|
+
high: 0px 16px 32px #2733333D
|
|
650
|
+
),
|
|
651
|
+
space: (
|
|
652
|
+
0: 0px,
|
|
653
|
+
100: 2px,
|
|
654
|
+
200: 4px,
|
|
655
|
+
300: 8px,
|
|
656
|
+
350: 12px,
|
|
657
|
+
400: 16px,
|
|
658
|
+
450: 24px,
|
|
659
|
+
500: 32px,
|
|
660
|
+
600: 40px
|
|
661
|
+
),
|
|
662
|
+
typography: (
|
|
663
|
+
100: (
|
|
664
|
+
fontSize: 11px,
|
|
665
|
+
lineHeight: 18.666666666666668px
|
|
666
|
+
),
|
|
667
|
+
200: (
|
|
668
|
+
fontSize: 13px,
|
|
669
|
+
lineHeight: 21.333333333333332px
|
|
670
|
+
),
|
|
671
|
+
300: (
|
|
672
|
+
fontSize: 16px,
|
|
673
|
+
lineHeight: 24px
|
|
674
|
+
),
|
|
675
|
+
400: (
|
|
676
|
+
fontSize: 18px,
|
|
677
|
+
lineHeight: 26.666666666666668px
|
|
678
|
+
),
|
|
679
|
+
500: (
|
|
680
|
+
fontSize: 21px,
|
|
681
|
+
lineHeight: 29.333333333333332px
|
|
682
|
+
),
|
|
683
|
+
600: (
|
|
684
|
+
fontSize: 24px,
|
|
685
|
+
lineHeight: 32px
|
|
686
|
+
),
|
|
687
|
+
700: (
|
|
688
|
+
fontSize: 32px,
|
|
689
|
+
lineHeight: 40px
|
|
690
|
+
),
|
|
691
|
+
800: (
|
|
692
|
+
fontSize: 43px,
|
|
693
|
+
lineHeight: 50.666666666666664px
|
|
694
|
+
),
|
|
695
|
+
900: (
|
|
696
|
+
fontSize: 57px,
|
|
697
|
+
lineHeight: 64px
|
|
698
|
+
),
|
|
699
|
+
1000: (
|
|
700
|
+
fontSize: 76px,
|
|
701
|
+
lineHeight: 80px
|
|
702
|
+
),
|
|
703
|
+
1100: (
|
|
704
|
+
fontSize: 101px,
|
|
705
|
+
lineHeight: 101.33333333333333px
|
|
706
|
+
),
|
|
707
|
+
1200: (
|
|
708
|
+
fontSize: 135px,
|
|
709
|
+
lineHeight: 125.33333333333333px
|
|
710
|
+
)
|
|
711
711
|
)
|
|
712
712
|
);
|
package/lib/Avatar/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["fontSize"],
|
|
2
|
+
_excluded2 = ["appearance", "name", "src", "variant", "type", "size", "bg", "color"];
|
|
3
|
+
|
|
1
4
|
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); }
|
|
2
5
|
|
|
3
6
|
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; }
|
|
@@ -11,12 +14,12 @@ import Image from "../Image";
|
|
|
11
14
|
import Text from "../Text";
|
|
12
15
|
var AvatarText = styled(function (_ref) {
|
|
13
16
|
var fontSize = _ref.fontSize,
|
|
14
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
17
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
18
|
|
|
16
19
|
return /*#__PURE__*/React.createElement(Text, rest);
|
|
17
20
|
}).withConfig({
|
|
18
21
|
displayName: "Avatar__AvatarText",
|
|
19
|
-
componentId: "yx873f-0"
|
|
22
|
+
componentId: "sc-yx873f-0"
|
|
20
23
|
})(["font-size:", "px;color:", "px;"], function (props) {
|
|
21
24
|
return props.fontSize;
|
|
22
25
|
}, function (props) {
|
|
@@ -24,7 +27,7 @@ var AvatarText = styled(function (_ref) {
|
|
|
24
27
|
});
|
|
25
28
|
var Container = styled(Box).withConfig({
|
|
26
29
|
displayName: "Avatar__Container",
|
|
27
|
-
componentId: "yx873f-1"
|
|
30
|
+
componentId: "sc-yx873f-1"
|
|
28
31
|
})(["", ""], function (_ref2) {
|
|
29
32
|
var theme = _ref2.theme,
|
|
30
33
|
type = _ref2.type,
|
|
@@ -59,7 +62,7 @@ export var Avatar = function Avatar(_ref3) {
|
|
|
59
62
|
size = _ref3$size === void 0 ? "40px" : _ref3$size,
|
|
60
63
|
bg = _ref3.bg,
|
|
61
64
|
color = _ref3.color,
|
|
62
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
65
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
63
66
|
|
|
64
67
|
var _useState = useState(false),
|
|
65
68
|
imageFailedLoading = _useState[0],
|
package/lib/Badge/index.js
CHANGED
|
@@ -1,46 +1,49 @@
|
|
|
1
|
+
var _excluded = ["size", "type", "tip", "text"];
|
|
2
|
+
|
|
1
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); }
|
|
2
4
|
|
|
3
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; }
|
|
4
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
|
+
|
|
5
11
|
import * as React from "react";
|
|
6
|
-
import Icon from "../Icon";
|
|
7
12
|
import Container from "./styles";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type = _ref.type,
|
|
15
|
-
tip = _ref.tip,
|
|
16
|
-
_ref$size = _ref.size,
|
|
17
|
-
size = _ref$size === void 0 ? "small" : _ref$size,
|
|
18
|
-
_ref$badgeColor = _ref.badgeColor,
|
|
19
|
-
badgeColor = _ref$badgeColor === void 0 ? "blue" : _ref$badgeColor,
|
|
20
|
-
rest = _objectWithoutPropertiesLoose(_ref, ["children", "text", "iconName", "type", "tip", "size", "badgeColor"]);
|
|
21
|
-
|
|
22
|
-
if (children && text) {
|
|
23
|
-
throw new Error("can't use both `children` and `text` props. Text is deprecated, consider using children.");
|
|
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;
|
|
24
19
|
}
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
// size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
|
|
28
|
-
size: size === "default" ? "large" : size,
|
|
29
|
-
badgeColor: badgeColor,
|
|
30
|
-
"data-tip": tip,
|
|
31
|
-
"data-qa-badge": text || "",
|
|
32
|
-
"data-qa-badge-type": type,
|
|
33
|
-
"data-qa-badge-tip": tip || "",
|
|
34
|
-
type: type && type
|
|
35
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
36
|
-
display: "flex",
|
|
37
|
-
alignItems: "center",
|
|
38
|
-
JustifyContent: "center"
|
|
39
|
-
}, iconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
40
|
-
mr: 200,
|
|
41
|
-
name: iconName,
|
|
42
|
-
size: size === "small" ? "mini" : "default"
|
|
43
|
-
}) : null, children || text));
|
|
44
|
-
};
|
|
21
|
+
var _proto = Badge.prototype;
|
|
45
22
|
|
|
46
|
-
|
|
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"
|
|
48
|
+
};
|
|
49
|
+
export { Badge as default };
|