@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/lib/Input/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "clearButtonLabel", "innerRef", "onBlur", "onChange", "onClear", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "appearance"];
|
|
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; }
|
|
@@ -8,6 +10,22 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
8
10
|
|
|
9
11
|
import * as React from "react";
|
|
10
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
|
+
};
|
|
11
29
|
|
|
12
30
|
var Input = /*#__PURE__*/function (_React$Component) {
|
|
13
31
|
_inheritsLoose(Input, _React$Component);
|
|
@@ -22,39 +40,35 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
22
40
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
23
41
|
|
|
24
42
|
_this.handleBlur = function (e) {
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
return _this.props.onBlur == null ? void 0 : _this.props.onBlur(e);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
_this.handleClear = function (e) {
|
|
47
|
+
if (_this.props.onClear) {
|
|
48
|
+
_this.props.onClear(e);
|
|
49
|
+
} else if (_this.props.onChange) {
|
|
50
|
+
_this.props.onChange(e, "");
|
|
27
51
|
}
|
|
28
52
|
};
|
|
29
53
|
|
|
30
54
|
_this.handleChange = function (e) {
|
|
31
|
-
|
|
32
|
-
_this.props.onChange(e, e.currentTarget.value);
|
|
33
|
-
}
|
|
55
|
+
return _this.props.onChange == null ? void 0 : _this.props.onChange(e, e.currentTarget.value);
|
|
34
56
|
};
|
|
35
57
|
|
|
36
58
|
_this.handleFocus = function (e) {
|
|
37
|
-
|
|
38
|
-
_this.props.onFocus(e);
|
|
39
|
-
}
|
|
59
|
+
return _this.props.onFocus == null ? void 0 : _this.props.onFocus(e);
|
|
40
60
|
};
|
|
41
61
|
|
|
42
62
|
_this.handleKeyDown = function (e) {
|
|
43
|
-
|
|
44
|
-
_this.props.onKeyDown(e, e.currentTarget.value);
|
|
45
|
-
}
|
|
63
|
+
return _this.props.onKeyDown == null ? void 0 : _this.props.onKeyDown(e, e.currentTarget.value);
|
|
46
64
|
};
|
|
47
65
|
|
|
48
66
|
_this.handleKeyUp = function (e) {
|
|
49
|
-
|
|
50
|
-
_this.props.onKeyUp(e, e.currentTarget.value);
|
|
51
|
-
}
|
|
67
|
+
return _this.props.onKeyUp == null ? void 0 : _this.props.onKeyUp(e, e.currentTarget.value);
|
|
52
68
|
};
|
|
53
69
|
|
|
54
70
|
_this.handlePaste = function (e) {
|
|
55
|
-
|
|
56
|
-
_this.props.onPaste(e, e.currentTarget.value);
|
|
57
|
-
}
|
|
71
|
+
return _this.props.onPaste == null ? void 0 : _this.props.onPaste(e, e.currentTarget.value);
|
|
58
72
|
};
|
|
59
73
|
|
|
60
74
|
return _this;
|
|
@@ -63,6 +77,8 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
63
77
|
var _proto = Input.prototype;
|
|
64
78
|
|
|
65
79
|
_proto.render = function render() {
|
|
80
|
+
var _elementAfter$type;
|
|
81
|
+
|
|
66
82
|
var _this$props = this.props,
|
|
67
83
|
autoComplete = _this$props.autoComplete,
|
|
68
84
|
autoFocus = _this$props.autoFocus,
|
|
@@ -81,9 +97,11 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
81
97
|
maxLength = _this$props.maxLength,
|
|
82
98
|
ariaLabel = _this$props.ariaLabel,
|
|
83
99
|
ariaDescribedby = _this$props.ariaDescribedby,
|
|
100
|
+
clearButtonLabel = _this$props.clearButtonLabel,
|
|
84
101
|
innerRef = _this$props.innerRef,
|
|
85
102
|
onBlur = _this$props.onBlur,
|
|
86
103
|
onChange = _this$props.onChange,
|
|
104
|
+
onClear = _this$props.onClear,
|
|
87
105
|
onFocus = _this$props.onFocus,
|
|
88
106
|
onKeyDown = _this$props.onKeyDown,
|
|
89
107
|
onKeyUp = _this$props.onKeyUp,
|
|
@@ -93,25 +111,37 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
93
111
|
_this$props$qa = _this$props.qa,
|
|
94
112
|
qa = _this$props$qa === void 0 ? {} : _this$props$qa,
|
|
95
113
|
appearance = _this$props.appearance,
|
|
96
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
114
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded); // Convert autoComplete from a boolean prop to a string value.
|
|
115
|
+
|
|
97
116
|
|
|
98
117
|
var autoCompleteValue = undefined;
|
|
99
118
|
|
|
100
119
|
if (autoComplete !== undefined) {
|
|
101
120
|
autoCompleteValue = autoComplete ? "on" : "off";
|
|
102
|
-
}
|
|
121
|
+
} // Add default elemBefore and elemAfter elements if type is search.
|
|
122
|
+
|
|
103
123
|
|
|
124
|
+
var elementBefore = type === "search" && !elemBefore ? /*#__PURE__*/React.createElement(Icon, {
|
|
125
|
+
name: "search",
|
|
126
|
+
ariaHidden: true
|
|
127
|
+
}) : elemBefore;
|
|
128
|
+
var elementAfter = type === "search" && !elemAfter ? /*#__PURE__*/React.createElement(ClearButton, null) : elemAfter;
|
|
104
129
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
105
|
-
hasBeforeElement: !!
|
|
106
|
-
hasAfterElement: !!
|
|
130
|
+
hasBeforeElement: !!elementBefore,
|
|
131
|
+
hasAfterElement: !!elementAfter,
|
|
107
132
|
disabled: disabled,
|
|
108
133
|
invalid: !!isInvalid,
|
|
109
134
|
warning: hasWarning,
|
|
110
135
|
appearance: appearance // $FlowIssue - upgrade v0.112.0
|
|
111
136
|
|
|
112
|
-
}, rest),
|
|
137
|
+
}, rest), /*#__PURE__*/React.createElement(InputContext.Provider, {
|
|
138
|
+
value: {
|
|
139
|
+
handleClear: this.handleClear,
|
|
140
|
+
clearButtonLabel: clearButtonLabel
|
|
141
|
+
}
|
|
142
|
+
}, elementBefore && /*#__PURE__*/React.createElement(Accessory, {
|
|
113
143
|
before: true
|
|
114
|
-
},
|
|
144
|
+
}, elementBefore), /*#__PURE__*/React.createElement("input", _extends({
|
|
115
145
|
"aria-invalid": !!isInvalid,
|
|
116
146
|
"aria-label": ariaLabel,
|
|
117
147
|
"aria-describedby": ariaDescribedby,
|
|
@@ -136,9 +166,12 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
136
166
|
"data-qa-input": name || "",
|
|
137
167
|
"data-qa-input-isdisabled": disabled === true,
|
|
138
168
|
"data-qa-input-isrequired": required === true
|
|
139
|
-
}, qa, inputProps)),
|
|
140
|
-
after: true
|
|
141
|
-
|
|
169
|
+
}, qa, inputProps)), elementAfter && /*#__PURE__*/React.createElement(Accessory, {
|
|
170
|
+
after: true // Used for positioning. This logic will detect if the element is a ClearButton,
|
|
171
|
+
// regardless of whether it was manually passed as elemAfter or automatically added to a search Input.
|
|
172
|
+
,
|
|
173
|
+
isClearButton: (elementAfter == null ? void 0 : (_elementAfter$type = elementAfter.type) == null ? void 0 : _elementAfter$type.prototype) === Input.ClearButton.prototype
|
|
174
|
+
}, elementAfter)));
|
|
142
175
|
};
|
|
143
176
|
|
|
144
177
|
return Input;
|
|
@@ -151,4 +184,6 @@ Input.defaultProps = {
|
|
|
151
184
|
size: "default",
|
|
152
185
|
appearance: "primary"
|
|
153
186
|
};
|
|
154
|
-
|
|
187
|
+
Input.ClearButton = ClearButton;
|
|
188
|
+
Input.ClearButton.displayName = "Input.ClearButton";
|
|
189
|
+
export default Input;
|
package/lib/Input/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import { COMMON } from "../utils/system-props";
|
|
|
3
3
|
import { focusRing } from "../utils/mixins";
|
|
4
4
|
var Container = styled.div.withConfig({
|
|
5
5
|
displayName: "styles__Container",
|
|
6
|
-
componentId: "uozj0s-0"
|
|
6
|
+
componentId: "sc-uozj0s-0"
|
|
7
7
|
})(["box-sizing:border-box;position:relative;input{box-sizing:border-box;width:100%;border:1px solid transparent;border-radius:", ";background-color:", ";color:", ";outline:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";appearance:none;line-height:16px;margin:0;padding:", ";font-size:", ";&::-ms-clear{display:none;}&::-webkit-search-cancel-button{appearance:none;}&:focus{", "}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}&:placeholder{color:", ";}", " ", "}", " ", " ", " ", " ", ""], function (props) {
|
|
8
8
|
return props.theme.radii[500];
|
|
9
9
|
}, function (props) {
|
|
@@ -67,13 +67,13 @@ var Container = styled.div.withConfig({
|
|
|
67
67
|
}, COMMON);
|
|
68
68
|
export var Accessory = styled.div.withConfig({
|
|
69
69
|
displayName: "styles__Accessory",
|
|
70
|
-
componentId: "uozj0s-1"
|
|
70
|
+
componentId: "sc-uozj0s-1"
|
|
71
71
|
})(["position:absolute;top:50%;transform:translateY(-50%);color:", ";display:flex;align-items:center;", ";", ";"], function (props) {
|
|
72
72
|
return props.theme.colors.icon.base;
|
|
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.theme.space[350]);
|
|
76
|
+
return props.after && css(["right:", ";"], props.isClearButton ? 0 : props.theme.space[350]);
|
|
77
77
|
});
|
|
78
78
|
Container.displayName = "InputContainer";
|
|
79
79
|
Accessory.displayName = "InputAccessory";
|
package/lib/KeyboardKey/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["children"];
|
|
2
|
+
|
|
1
3
|
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; }
|
|
2
4
|
|
|
3
5
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
@@ -20,7 +22,7 @@ var KeyboardKey = /*#__PURE__*/function (_React$Component) {
|
|
|
20
22
|
_proto.render = function render() {
|
|
21
23
|
var _this$props = this.props,
|
|
22
24
|
children = _this$props.children,
|
|
23
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
25
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
24
26
|
|
|
25
27
|
return /*#__PURE__*/React.createElement(Container, rest, /*#__PURE__*/React.createElement("kbd", {
|
|
26
28
|
"data-qa-keyboardkey": children
|
package/lib/Label/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"no babel-plugin-flow-react-proptypes";
|
|
2
2
|
|
|
3
|
+
var _excluded = ["as"];
|
|
4
|
+
|
|
3
5
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4
6
|
|
|
5
7
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -15,7 +17,7 @@ import Text from "../Text";
|
|
|
15
17
|
var LabelBase = function LabelBase(_ref) {
|
|
16
18
|
var _ref$as = _ref.as,
|
|
17
19
|
as = _ref$as === void 0 ? "label" : _ref$as,
|
|
18
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
20
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
21
|
|
|
20
22
|
return /*#__PURE__*/React.createElement(Text, _extends({}, rest, {
|
|
21
23
|
as: as
|
|
@@ -24,7 +26,7 @@ var LabelBase = function LabelBase(_ref) {
|
|
|
24
26
|
|
|
25
27
|
var StyledLabel = styled(LabelBase).withConfig({
|
|
26
28
|
displayName: "Label__StyledLabel",
|
|
27
|
-
componentId: "rqdi0a-0"
|
|
29
|
+
componentId: "sc-rqdi0a-0"
|
|
28
30
|
})(["display:flex;align-items:center;"]);
|
|
29
31
|
|
|
30
32
|
var Label = /*#__PURE__*/function (_React$Component) {
|
package/lib/Link/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["href", "external", "children", "disabled", "onClick", "as", "underline", "qa"];
|
|
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; }
|
|
@@ -15,7 +17,7 @@ var Link = function Link(_ref) {
|
|
|
15
17
|
underline = _ref.underline,
|
|
16
18
|
_ref$qa = _ref.qa,
|
|
17
19
|
qa = _ref$qa === void 0 ? {} : _ref$qa,
|
|
18
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
20
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
21
|
|
|
20
22
|
if (!href && external) {
|
|
21
23
|
console.warn("Warning: external prop cannot be set without a href declaration");
|
package/lib/Link/styles.js
CHANGED
|
@@ -4,7 +4,7 @@ import Text from "../Text";
|
|
|
4
4
|
import { TYPOGRAPHY, COMMON, FLEXBOX } from "../utils/system-props";
|
|
5
5
|
var Container = styled(Text).withConfig({
|
|
6
6
|
displayName: "styles__Container",
|
|
7
|
-
componentId: "adcw4a-0"
|
|
7
|
+
componentId: "sc-adcw4a-0"
|
|
8
8
|
})(["border:0;font-family:", ";text-decoration:", ";appearance:none;cursor:pointer;", " font-weight:", ";color:", ";&:hover{color:", ";text-decoration:underline;}&:active{color:", ";}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", " ", ""], function (props) {
|
|
9
9
|
return props.theme.fontFamily;
|
|
10
10
|
}, function (props) {
|
package/lib/Listbox/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["role", "children"],
|
|
2
|
+
_excluded2 = ["children"];
|
|
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; }
|
|
@@ -12,7 +15,7 @@ export var Listbox = function Listbox(_ref) {
|
|
|
12
15
|
var _ref$role = _ref.role,
|
|
13
16
|
role = _ref$role === void 0 ? MENU_ROLES.LISTBOX : _ref$role,
|
|
14
17
|
children = _ref.children,
|
|
15
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
19
|
|
|
17
20
|
return /*#__PURE__*/React.createElement(Menu, _extends({}, rest, {
|
|
18
21
|
role: role
|
|
@@ -25,7 +28,7 @@ export var Listbox = function Listbox(_ref) {
|
|
|
25
28
|
|
|
26
29
|
export var ListboxButtonContainer = styled(MenuButton).withConfig({
|
|
27
30
|
displayName: "Listbox__ListboxButtonContainer",
|
|
28
|
-
componentId: "c9mfi8-0"
|
|
31
|
+
componentId: "sc-c9mfi8-0"
|
|
29
32
|
})(["position:relative;width:100%;border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";cursor:", ";outline:none;appearance:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";text-align:left;margin:0;&:active{transform:none;}padding:", ";font-size:", ";", ""], function (props) {
|
|
30
33
|
return props.theme.colors.form.border.base;
|
|
31
34
|
}, function (props) {
|
|
@@ -79,7 +82,7 @@ export var ListboxButtonContainer = styled(MenuButton).withConfig({
|
|
|
79
82
|
});
|
|
80
83
|
export var ListboxButton = function ListboxButton(_ref2) {
|
|
81
84
|
var children = _ref2.children,
|
|
82
|
-
restProps = _objectWithoutPropertiesLoose(_ref2,
|
|
85
|
+
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
83
86
|
|
|
84
87
|
return /*#__PURE__*/React.createElement(ListboxButtonContainer, _extends({}, restProps, {
|
|
85
88
|
popoutProps: _extends({
|
package/lib/Loader/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["text", "size", "delay", "color", "qa"];
|
|
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; }
|
|
@@ -25,7 +27,7 @@ var Loader = /*#__PURE__*/function (_React$Component) {
|
|
|
25
27
|
delay = _this$props.delay,
|
|
26
28
|
color = _this$props.color,
|
|
27
29
|
qa = _this$props.qa,
|
|
28
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
30
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
29
31
|
|
|
30
32
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
31
33
|
small: size === "small",
|
package/lib/Loader/styles.js
CHANGED
|
@@ -19,7 +19,7 @@ var Container = styled.div.attrs({
|
|
|
19
19
|
className: "Loader"
|
|
20
20
|
}).withConfig({
|
|
21
21
|
displayName: "styles__Container",
|
|
22
|
-
componentId: "zj8x0q-0"
|
|
22
|
+
componentId: "sc-zj8x0q-0"
|
|
23
23
|
})(["position:relative;margin:0 auto;overflow:hidden;&:after{position:absolute;top:50%;left:50%;border-style:solid;border-radius:50%;content:\"\";transition:opacity 250ms;animation:", ";}", " ", " ", ""], function (props) {
|
|
24
24
|
return props.delay ? css(["", " 2.25s infinite linear,", " 2s 1"], spin, delay) : css(["", " 2.25s infinite linear"], spin);
|
|
25
25
|
}, function (props) {
|
|
@@ -29,6 +29,6 @@ var Container = styled.div.attrs({
|
|
|
29
29
|
}, COMMON);
|
|
30
30
|
export var Text = styled.div.withConfig({
|
|
31
31
|
displayName: "styles__Text",
|
|
32
|
-
componentId: "zj8x0q-1"
|
|
32
|
+
componentId: "sc-zj8x0q-1"
|
|
33
33
|
})(["", ""], visuallyHidden);
|
|
34
34
|
export default Container;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["appearance", "isLoading", "disabled", "loaderLabel", "children"];
|
|
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; }
|
|
@@ -38,7 +40,7 @@ export var LoaderButton = function LoaderButton(_ref) {
|
|
|
38
40
|
disabled = _ref.disabled,
|
|
39
41
|
loaderLabel = _ref.loaderLabel,
|
|
40
42
|
children = _ref.children,
|
|
41
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
43
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
42
44
|
|
|
43
45
|
var isLoading = Boolean(_isLoading);
|
|
44
46
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
package/lib/Menu/descendants.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["context", "element"],
|
|
2
|
+
_excluded2 = ["element"];
|
|
3
|
+
|
|
1
4
|
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; }
|
|
2
5
|
|
|
3
6
|
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); }
|
|
@@ -91,7 +94,7 @@ export function createDescendantContext(name, initialValue) {
|
|
|
91
94
|
export function useDescendant(_ref, indexProp) {
|
|
92
95
|
var context = _ref.context,
|
|
93
96
|
element = _ref.element,
|
|
94
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
97
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
95
98
|
|
|
96
99
|
var _useState = useState(),
|
|
97
100
|
forceUpdate = _useState[1];
|
|
@@ -125,7 +128,7 @@ export function DescendantProvider(_ref2) {
|
|
|
125
128
|
set = _ref2.set;
|
|
126
129
|
var registerDescendant = useCallback(function (_ref3) {
|
|
127
130
|
var element = _ref3.element,
|
|
128
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
131
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
129
132
|
|
|
130
133
|
if (!element) {
|
|
131
134
|
return;
|
package/lib/Menu/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import _styled from "styled-components";
|
|
2
|
+
var _excluded = ["id", "index", "as", "children", "role", "elemBefore", "elemAfter", "value", "onKeyPress", "onClick", "selected", "disabled", "indeterminate", "label"],
|
|
3
|
+
_excluded2 = ["children", "title", "titleAs", "disabled"],
|
|
4
|
+
_excluded3 = ["children", "role", "multiselect", "innerRef"],
|
|
5
|
+
_excluded4 = ["role", "children", "onChange", "value", "multiselect", "innerRef"],
|
|
6
|
+
_excluded5 = ["content", "popoutProps", "children", "onClick", "closeOnItemClick", "id", "placement"];
|
|
2
7
|
|
|
3
8
|
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
9
|
|
|
@@ -67,7 +72,7 @@ export var MenuItem = function MenuItem(_ref) {
|
|
|
67
72
|
disabled = _ref.disabled,
|
|
68
73
|
indeterminate = _ref.indeterminate,
|
|
69
74
|
labelProp = _ref.label,
|
|
70
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
75
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
71
76
|
|
|
72
77
|
var _useContext = useContext(MenuContext),
|
|
73
78
|
menuRole = _useContext.role,
|
|
@@ -227,21 +232,13 @@ export var MenuRadio = function MenuRadio(props) {
|
|
|
227
232
|
role: MENU_ITEM_ROLES.RADIO
|
|
228
233
|
}, props));
|
|
229
234
|
};
|
|
230
|
-
|
|
231
|
-
var _StyledText = styled(Text).withConfig({
|
|
232
|
-
displayName: "Menu___StyledText",
|
|
233
|
-
componentId: "sc-1p3rdnp-0"
|
|
234
|
-
})(["", ""], function (p) {
|
|
235
|
-
return p._css;
|
|
236
|
-
});
|
|
237
|
-
|
|
238
235
|
export var MenuGroup = function MenuGroup(_ref2) {
|
|
239
236
|
var children = _ref2.children,
|
|
240
237
|
title = _ref2.title,
|
|
241
238
|
titleAs = _ref2.titleAs,
|
|
242
239
|
_ref2$disabled = _ref2.disabled,
|
|
243
240
|
isDisabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
244
|
-
props = _objectWithoutPropertiesLoose(_ref2,
|
|
241
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
245
242
|
|
|
246
243
|
return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(Box, {
|
|
247
244
|
pl: 400,
|
|
@@ -254,7 +251,7 @@ export var MenuGroup = function MenuGroup(_ref2) {
|
|
|
254
251
|
fontWeight: 600,
|
|
255
252
|
mt: 350,
|
|
256
253
|
color: "text.headline",
|
|
257
|
-
_css: isDisabled && disabled
|
|
254
|
+
$_css: isDisabled && disabled
|
|
258
255
|
}, title)), /*#__PURE__*/React.createElement(Box, _extends({}, props, {
|
|
259
256
|
p: 300,
|
|
260
257
|
role: "group"
|
|
@@ -309,7 +306,7 @@ var MenuItems = function MenuItems(_ref3) {
|
|
|
309
306
|
role = _ref3.role,
|
|
310
307
|
multiselect = _ref3.multiselect,
|
|
311
308
|
innerRef = _ref3.innerRef,
|
|
312
|
-
props = _objectWithoutPropertiesLoose(_ref3,
|
|
309
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
313
310
|
|
|
314
311
|
var _useMenuKeyDown = useMenuKeyDown(),
|
|
315
312
|
handleKeyDown = _useMenuKeyDown.handleKeyDown,
|
|
@@ -337,7 +334,7 @@ export var Menu = function Menu(_ref4) {
|
|
|
337
334
|
value = _ref4.value,
|
|
338
335
|
multiselect = _ref4.multiselect,
|
|
339
336
|
innerRef = _ref4.innerRef,
|
|
340
|
-
props = _objectWithoutPropertiesLoose(_ref4,
|
|
337
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
341
338
|
|
|
342
339
|
var _useDescendants = useDescendants(),
|
|
343
340
|
descendants = _useDescendants[0],
|
|
@@ -397,7 +394,7 @@ Menu.Divider.displayName = "Menu.Divider";
|
|
|
397
394
|
Menu.FilterInput.displayName = "Menu.FilterInput";
|
|
398
395
|
var CustomPopoutContent = styled(Popout.Content).withConfig({
|
|
399
396
|
displayName: "Menu__CustomPopoutContent",
|
|
400
|
-
componentId: "sc-1p3rdnp-
|
|
397
|
+
componentId: "sc-1p3rdnp-0"
|
|
401
398
|
})(["padding:0;margin-left:0;margin-right:0;"]);
|
|
402
399
|
export var MenuButton = function MenuButton(_ref5) {
|
|
403
400
|
var content = _ref5.content,
|
|
@@ -410,7 +407,7 @@ export var MenuButton = function MenuButton(_ref5) {
|
|
|
410
407
|
id = _ref5$id === void 0 ? uniqueId("MenuButton-") : _ref5$id,
|
|
411
408
|
_ref5$placement = _ref5.placement,
|
|
412
409
|
placement = _ref5$placement === void 0 ? "bottom" : _ref5$placement,
|
|
413
|
-
props = _objectWithoutPropertiesLoose(_ref5,
|
|
410
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
414
411
|
|
|
415
412
|
var _useState3 = useState(false),
|
|
416
413
|
isOpen = _useState3[0],
|
|
@@ -451,4 +448,11 @@ export var MenuButton = function MenuButton(_ref5) {
|
|
|
451
448
|
}
|
|
452
449
|
}), children)));
|
|
453
450
|
};
|
|
454
|
-
export default Menu;
|
|
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
|
+
});
|
package/lib/Menu/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import Box from "../Box";
|
|
|
3
3
|
import { disabled, focusRing } from "../utils/mixins";
|
|
4
4
|
export var MenuItemContainer = styled(Box).withConfig({
|
|
5
5
|
displayName: "styles__MenuItemContainer",
|
|
6
|
-
componentId: "fjvae4-0"
|
|
6
|
+
componentId: "sc-fjvae4-0"
|
|
7
7
|
})(["", ";width:100%;border-radius:", ";background-color:", ";border:none;text-align:left;color:", ";font-family:", ";font-weight:", ";padding:", ";list-style-type:none;outline:0;", ";", " ", " ", " ", " ", ""], function (props) {
|
|
8
8
|
return !props.hidden && css(["display:block;"]);
|
|
9
9
|
}, function (props) {
|
|
@@ -43,5 +43,5 @@ export var MenuItemContainer = styled(Box).withConfig({
|
|
|
43
43
|
});
|
|
44
44
|
export var MenuItemsContainer = styled(Box).withConfig({
|
|
45
45
|
displayName: "styles__MenuItemsContainer",
|
|
46
|
-
componentId: "fjvae4-1"
|
|
46
|
+
componentId: "sc-fjvae4-1"
|
|
47
47
|
})(["list-style-type:none;&:focus{", "}"], focusRing);
|
package/lib/Message/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["children", "density", "borderColor", "bg", "indentContent", "innerRef", "qa"];
|
|
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; }
|
|
@@ -52,7 +54,7 @@ var Message = function Message(_ref) {
|
|
|
52
54
|
indentContent = _ref$indentContent === void 0 ? true : _ref$indentContent,
|
|
53
55
|
innerRef = _ref.innerRef,
|
|
54
56
|
qa = _ref.qa,
|
|
55
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
57
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
56
58
|
|
|
57
59
|
return /*#__PURE__*/React.createElement(MessageContext.Provider, {
|
|
58
60
|
value: {
|
package/lib/Modal/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var _excluded = ["title", "subtitle", "children", "bordered"],
|
|
2
|
+
_excluded2 = ["children"],
|
|
3
|
+
_excluded3 = ["appElementSelector", "children", "isOpen", "label", "onClose", "closeButtonLabel", "width", "zIndex"];
|
|
4
|
+
|
|
1
5
|
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
6
|
|
|
3
7
|
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; }
|
|
@@ -16,7 +20,7 @@ var ModalHeader = function ModalHeader(props) {
|
|
|
16
20
|
subtitle = props.subtitle,
|
|
17
21
|
children = props.children,
|
|
18
22
|
bordered = props.bordered,
|
|
19
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
23
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
26
|
/*#__PURE__*/
|
|
@@ -71,7 +75,7 @@ ModalFooter.defaultProps = {
|
|
|
71
75
|
var ModalContent = /*#__PURE__*/React.forwardRef( // $FlowIssue - upgrade v0.112.0
|
|
72
76
|
function (_ref, ref) {
|
|
73
77
|
var children = _ref.children,
|
|
74
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
78
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
75
79
|
|
|
76
80
|
var _useContext2 = useContext(ModalContext),
|
|
77
81
|
label = _useContext2.label;
|
|
@@ -95,7 +99,7 @@ var Modal = function Modal(props) {
|
|
|
95
99
|
closeButtonLabel = props.closeButtonLabel,
|
|
96
100
|
width = props.width,
|
|
97
101
|
zIndex = props.zIndex,
|
|
98
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
102
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded3);
|
|
99
103
|
|
|
100
104
|
var isCloseable = Boolean(onClose);
|
|
101
105
|
var appElement = appElementSelector && document ? document.querySelector(appElementSelector) : null;
|
package/lib/Modal/styles.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
1
|
+
var _excluded = ["className"];
|
|
4
2
|
|
|
5
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); }
|
|
6
4
|
|
|
@@ -17,7 +15,7 @@ var BODY_PADDING = "64px";
|
|
|
17
15
|
|
|
18
16
|
function ReactModalAdapter(_ref) {
|
|
19
17
|
var className = _ref.className,
|
|
20
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21
19
|
|
|
22
20
|
// We want to create *__Content and *__Overlay class names on the subcomponents.
|
|
23
21
|
// Because `className` could be a space-separated list of class names, we make
|
|
@@ -36,7 +34,7 @@ function ReactModalAdapter(_ref) {
|
|
|
36
34
|
}, props));
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
export var Body = createGlobalStyle(
|
|
37
|
+
export var Body = createGlobalStyle([".ReactModal__Body--open{overflow:hidden;}"]); // eslint-disable-next-line prettier/prettier
|
|
40
38
|
|
|
41
39
|
export var Container = styled(ReactModalAdapter).withConfig({
|
|
42
40
|
displayName: "styles__Container",
|
package/lib/Numeral/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["number", "locale", "format", "currency", "abbreviate", "precision", "qa"];
|
|
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; }
|
|
@@ -82,7 +84,7 @@ var normalizeArgs = function normalizeArgs(props) {
|
|
|
82
84
|
abbreviate = _props$abbreviate === void 0 ? true : _props$abbreviate,
|
|
83
85
|
precision = props.precision,
|
|
84
86
|
qa = props.qa,
|
|
85
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
87
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
86
88
|
|
|
87
89
|
var threshold = getThreshold(abbreviate);
|
|
88
90
|
|
package/lib/Numeral/styles.js
CHANGED
|
@@ -2,11 +2,11 @@ import styled from "styled-components";
|
|
|
2
2
|
import Text from "../Text";
|
|
3
3
|
export var Container = styled(Text).withConfig({
|
|
4
4
|
displayName: "styles__Container",
|
|
5
|
-
componentId: "o79gt9-0"
|
|
5
|
+
componentId: "sc-o79gt9-0"
|
|
6
6
|
})(["font-variant-numeric:tabular-nums;"]);
|
|
7
7
|
export var AbbrContainer = styled(Text).withConfig({
|
|
8
8
|
displayName: "styles__AbbrContainer",
|
|
9
|
-
componentId: "o79gt9-1"
|
|
9
|
+
componentId: "sc-o79gt9-1"
|
|
10
10
|
})(["font-variant-numeric:tabular-nums;border-bottom:1px dotted ", ";"], function (props) {
|
|
11
11
|
return props.theme.colors.container.border.base;
|
|
12
12
|
});
|
|
@@ -6,7 +6,7 @@ var Container = styled(function (props) {
|
|
|
6
6
|
return /*#__PURE__*/React.createElement(List, props);
|
|
7
7
|
}).withConfig({
|
|
8
8
|
displayName: "styles__Container",
|
|
9
|
-
componentId: "ugoond-0"
|
|
9
|
+
componentId: "sc-ugoond-0"
|
|
10
10
|
})(["box-sizing:border-box;font-family:", ";", " ", " ", " ", " ", " ", ""], function (_ref) {
|
|
11
11
|
var theme = _ref.theme;
|
|
12
12
|
return theme.fontFamily;
|