@sproutsocial/racine 11.4.0-input-beta.0 → 11.4.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 +20 -0
- package/__flow__/Input/index.js +7 -6
- package/__flow__/Input/index.test.js +3 -0
- package/__flow__/utils/index.js +23 -0
- package/commonjs/Avatar/index.js +4 -7
- package/commonjs/Badge/index.js +1 -3
- package/commonjs/Badge/styles.js +1 -1
- package/commonjs/Banner/index.js +1 -3
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Box/styles.js +1 -1
- package/commonjs/Breadcrumb/index.js +2 -5
- package/commonjs/Button/index.js +1 -3
- package/commonjs/Card/index.js +1 -3
- package/commonjs/Card/styles.js +3 -3
- package/commonjs/CharacterCounter/index.js +1 -3
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/ChartLegend/index.js +1 -3
- package/commonjs/ChartLegend/styles.js +3 -3
- package/commonjs/Checkbox/index.js +1 -3
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Collapsible/index.js +2 -5
- package/commonjs/DatePicker/DateRangePicker.js +1 -3
- package/commonjs/DatePicker/SingleDatePicker.js +1 -3
- package/commonjs/DatePicker/StatefulDateRangePicker.js +1 -3
- package/commonjs/DatePicker/StatefulSingleDatePicker.js +1 -3
- package/commonjs/DatePicker/common.js +1 -1
- package/commonjs/DatePicker/styles.js +6 -2
- package/commonjs/Drawer/SlideTransition.js +1 -3
- package/commonjs/Drawer/index.js +4 -9
- package/commonjs/Drawer/styles.js +2 -2
- package/commonjs/EmptyState/index.js +1 -3
- package/commonjs/Fieldset/index.js +3 -7
- package/commonjs/FormField/index.js +1 -3
- package/commonjs/Icon/index.js +2 -5
- package/commonjs/Icon/styles.js +1 -1
- package/commonjs/Image/index.js +1 -3
- package/commonjs/Image/styles.js +1 -1
- package/commonjs/Indicator/index.js +1 -3
- package/commonjs/Input/index.js +7 -11
- package/commonjs/Input/styles.js +2 -2
- package/commonjs/KeyboardKey/index.js +1 -3
- package/commonjs/Label/index.js +2 -4
- package/commonjs/Link/index.js +1 -3
- package/commonjs/Link/styles.js +1 -1
- package/commonjs/Listbox/index.js +4 -7
- package/commonjs/Loader/index.js +1 -3
- package/commonjs/Loader/styles.js +2 -2
- package/commonjs/LoaderButton/index.js +1 -3
- package/commonjs/Menu/constants.js +1 -1
- package/commonjs/Menu/descendants.js +7 -10
- package/commonjs/Menu/hooks.js +1 -1
- package/commonjs/Menu/index.js +16 -22
- package/commonjs/Menu/styles.js +2 -2
- package/commonjs/Message/index.js +1 -3
- package/commonjs/Message/styles.js +1 -1
- package/commonjs/Modal/index.js +3 -7
- package/commonjs/Modal/styles.js +6 -4
- package/commonjs/Numeral/constants.js +1 -1
- package/commonjs/Numeral/index.js +1 -3
- package/commonjs/Numeral/styles.js +3 -3
- package/commonjs/OverflowList/styles.js +1 -1
- package/commonjs/Popout/index.js +3 -7
- package/commonjs/Popout/styles.js +1 -1
- package/commonjs/Radio/index.js +1 -3
- package/commonjs/Radio/styles.js +4 -4
- package/commonjs/SegmentedControl/index.js +2 -5
- package/commonjs/Select/index.js +1 -3
- package/commonjs/Stack/index.js +1 -3
- package/commonjs/Switch/index.js +1 -3
- package/commonjs/Switch/styles.js +1 -1
- package/commonjs/Table/index.js +5 -10
- package/commonjs/TableCell/index.js +1 -3
- package/commonjs/TableHeaderCell/index.js +1 -3
- package/commonjs/TableRowAccordion/index.js +1 -3
- package/commonjs/Tabs/index.js +2 -5
- package/commonjs/Tabs/styles.js +4 -4
- package/commonjs/Text/index.js +1 -3
- package/commonjs/Text/styles.js +1 -1
- package/commonjs/Textarea/index.js +1 -3
- package/commonjs/Toast/index.js +15 -15
- package/commonjs/Toast/styles.js +7 -4
- package/commonjs/ToggleHint/index.js +1 -3
- package/commonjs/Token/index.js +1 -3
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/index.js +1 -3
- package/commonjs/Tooltip/index.js +2 -5
- 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 +2 -3
- package/commonjs/utils/index.js +29 -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 +4 -7
- package/lib/Badge/index.js +1 -3
- package/lib/Badge/styles.js +1 -1
- package/lib/Banner/index.js +1 -3
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/styles.js +1 -1
- package/lib/Breadcrumb/index.js +2 -5
- package/lib/Button/index.js +1 -3
- package/lib/Card/index.js +1 -3
- package/lib/Card/styles.js +2 -2
- package/lib/CharacterCounter/index.js +1 -3
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/index.js +1 -3
- package/lib/ChartLegend/styles.js +3 -3
- package/lib/Checkbox/index.js +1 -3
- package/lib/Collapsible/index.js +2 -5
- package/lib/DatePicker/DateRangePicker.js +1 -3
- package/lib/DatePicker/SingleDatePicker.js +1 -3
- package/lib/DatePicker/StatefulDateRangePicker.js +1 -3
- package/lib/DatePicker/StatefulSingleDatePicker.js +1 -3
- package/lib/DatePicker/styles.js +6 -2
- package/lib/Drawer/SlideTransition.js +1 -3
- package/lib/Drawer/index.js +4 -9
- package/lib/Drawer/styles.js +2 -2
- package/lib/EmptyState/index.js +1 -3
- package/lib/Fieldset/index.js +3 -7
- package/lib/FormField/index.js +1 -3
- package/lib/Icon/index.js +2 -5
- package/lib/Icon/styles.js +1 -1
- package/lib/Image/index.js +1 -3
- package/lib/Image/styles.js +1 -1
- package/lib/Indicator/index.js +1 -3
- package/lib/Input/index.js +7 -12
- package/lib/Input/styles.js +2 -2
- package/lib/KeyboardKey/index.js +1 -3
- package/lib/Label/index.js +2 -4
- package/lib/Link/index.js +1 -3
- package/lib/Link/styles.js +1 -1
- package/lib/Listbox/index.js +3 -6
- package/lib/Loader/index.js +1 -3
- package/lib/Loader/styles.js +2 -2
- package/lib/LoaderButton/index.js +1 -3
- package/lib/Menu/descendants.js +2 -5
- package/lib/Menu/index.js +16 -20
- package/lib/Menu/styles.js +2 -2
- package/lib/Message/index.js +1 -3
- package/lib/Modal/index.js +3 -7
- package/lib/Modal/styles.js +5 -3
- package/lib/Numeral/index.js +1 -3
- package/lib/Numeral/styles.js +2 -2
- package/lib/OverflowList/styles.js +1 -1
- package/lib/Popout/index.js +3 -7
- package/lib/Popout/styles.js +1 -1
- package/lib/Radio/index.js +1 -3
- package/lib/Radio/styles.js +4 -4
- package/lib/SegmentedControl/index.js +2 -5
- package/lib/Select/index.js +1 -3
- package/lib/Stack/index.js +1 -3
- package/lib/Switch/index.js +1 -3
- package/lib/Switch/styles.js +1 -1
- package/lib/Table/index.js +4 -9
- package/lib/TableCell/index.js +1 -3
- package/lib/TableHeaderCell/index.js +1 -3
- package/lib/TableRowAccordion/index.js +1 -3
- package/lib/Tabs/index.js +2 -5
- package/lib/Tabs/styles.js +3 -3
- package/lib/Text/index.js +1 -3
- package/lib/Text/styles.js +1 -1
- package/lib/Textarea/index.js +1 -3
- package/lib/Toast/index.js +14 -14
- package/lib/Toast/styles.js +7 -3
- package/lib/ToggleHint/index.js +1 -3
- package/lib/Token/index.js +1 -3
- package/lib/Token/styles.js +1 -1
- package/lib/TokenInput/index.js +1 -3
- package/lib/Tooltip/index.js +2 -5
- package/lib/Tooltip/styles.js +1 -1
- package/lib/VisuallyHidden/index.js +1 -1
- package/lib/utils/index.js +24 -0
- package/package.json +1 -1
package/lib/Drawer/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
var _excluded = ["title", "children", "render"],
|
|
2
|
-
_excluded2 = ["children"],
|
|
3
|
-
_excluded3 = ["id", "style", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets"],
|
|
4
|
-
_excluded4 = ["children", "closeButtonLabel", "direction", "disableCloseOnClickOutside", "id", "isOpen", "offset", "onClose", "zIndex", "closeTargets"];
|
|
5
|
-
|
|
6
1
|
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; }
|
|
7
2
|
|
|
8
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); }
|
|
@@ -58,7 +53,7 @@ var DrawerHeader = function DrawerHeader(_ref) {
|
|
|
58
53
|
title = _ref$title === void 0 ? "" : _ref$title,
|
|
59
54
|
children = _ref.children,
|
|
60
55
|
render = _ref.render,
|
|
61
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
56
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["title", "children", "render"]);
|
|
62
57
|
|
|
63
58
|
var drawerContext = useContext(DrawerContext);
|
|
64
59
|
|
|
@@ -84,7 +79,7 @@ var DrawerHeader = function DrawerHeader(_ref) {
|
|
|
84
79
|
|
|
85
80
|
var DrawerContent = function DrawerContent(_ref2) {
|
|
86
81
|
var children = _ref2.children,
|
|
87
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
82
|
+
rest = _objectWithoutPropertiesLoose(_ref2, ["children"]);
|
|
88
83
|
|
|
89
84
|
return (
|
|
90
85
|
/*#__PURE__*/
|
|
@@ -107,7 +102,7 @@ var Drawer = function Drawer(_ref3) {
|
|
|
107
102
|
onClose = _ref3.onClose,
|
|
108
103
|
zIndex = _ref3.zIndex,
|
|
109
104
|
closeTargets = _ref3.closeTargets,
|
|
110
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
105
|
+
rest = _objectWithoutPropertiesLoose(_ref3, ["id", "style", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets"]);
|
|
111
106
|
|
|
112
107
|
var drawerRef = useRef(null);
|
|
113
108
|
useEffect(function () {
|
|
@@ -179,7 +174,7 @@ var DrawerContainer = function DrawerContainer(_ref4) {
|
|
|
179
174
|
zIndex = _ref4$zIndex === void 0 ? 7 : _ref4$zIndex,
|
|
180
175
|
_ref4$closeTargets = _ref4.closeTargets,
|
|
181
176
|
closeTargets = _ref4$closeTargets === void 0 ? [] : _ref4$closeTargets,
|
|
182
|
-
rest = _objectWithoutPropertiesLoose(_ref4,
|
|
177
|
+
rest = _objectWithoutPropertiesLoose(_ref4, ["children", "closeButtonLabel", "direction", "disableCloseOnClickOutside", "id", "isOpen", "offset", "onClose", "zIndex", "closeTargets"]);
|
|
183
178
|
|
|
184
179
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
185
180
|
id: id
|
package/lib/Drawer/styles.js
CHANGED
|
@@ -3,11 +3,11 @@ import { COMMON } from "../utils/system-props";
|
|
|
3
3
|
import Box from "../Box";
|
|
4
4
|
export var Content = styled(Box).withConfig({
|
|
5
5
|
displayName: "styles__Content",
|
|
6
|
-
componentId: "
|
|
6
|
+
componentId: "bo5voc-0"
|
|
7
7
|
})(["overflow-y:auto;"]);
|
|
8
8
|
var Container = styled.div.withConfig({
|
|
9
9
|
displayName: "styles__Container",
|
|
10
|
-
componentId: "
|
|
10
|
+
componentId: "bo5voc-1"
|
|
11
11
|
})(["display:flex;flex-direction:column;position:fixed;top:0;height:100%;width:", "px;background-color:", ";box-shadow:", ";filter:blur(0);", " ", ""], function (props) {
|
|
12
12
|
return props.width;
|
|
13
13
|
}, function (props) {
|
package/lib/EmptyState/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["media", "headline", "subtext", "primaryAction", "secondaryAction"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -14,7 +12,7 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
14
12
|
subtext = _ref.subtext,
|
|
15
13
|
primaryAction = _ref.primaryAction,
|
|
16
14
|
secondaryAction = _ref.secondaryAction,
|
|
17
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["media", "headline", "subtext", "primaryAction", "secondaryAction"]);
|
|
18
16
|
|
|
19
17
|
return (
|
|
20
18
|
/*#__PURE__*/
|
package/lib/Fieldset/index.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
var _excluded = ["layout", "label", "helperText", "children"],
|
|
2
|
-
_excluded2 = ["children"],
|
|
3
|
-
_excluded3 = ["children"];
|
|
4
|
-
|
|
5
1
|
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
2
|
|
|
7
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; }
|
|
@@ -20,7 +16,7 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
20
16
|
label = _ref.label,
|
|
21
17
|
helperText = _ref.helperText,
|
|
22
18
|
children = _ref.children,
|
|
23
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
19
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["layout", "label", "helperText", "children"]);
|
|
24
20
|
|
|
25
21
|
return (
|
|
26
22
|
/*#__PURE__*/
|
|
@@ -43,7 +39,7 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
43
39
|
|
|
44
40
|
var FieldsetLegend = function FieldsetLegend(_ref2) {
|
|
45
41
|
var children = _ref2.children,
|
|
46
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(_ref2, ["children"]);
|
|
47
43
|
|
|
48
44
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
49
45
|
as: "legend",
|
|
@@ -56,7 +52,7 @@ var FieldsetLegend = function FieldsetLegend(_ref2) {
|
|
|
56
52
|
|
|
57
53
|
var FieldsetHelperText = function FieldsetHelperText(_ref3) {
|
|
58
54
|
var children = _ref3.children,
|
|
59
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
55
|
+
rest = _objectWithoutPropertiesLoose(_ref3, ["children"]);
|
|
60
56
|
|
|
61
57
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
62
58
|
as: "p",
|
package/lib/FormField/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"no babel-plugin-flow-react-proptypes";
|
|
2
2
|
|
|
3
|
-
var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden"];
|
|
4
|
-
|
|
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
|
|
|
7
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; }
|
|
@@ -29,7 +27,7 @@ var FormField = function FormField(_ref) {
|
|
|
29
27
|
qa = _ref.qa,
|
|
30
28
|
_ref$isLabelHidden = _ref.isLabelHidden,
|
|
31
29
|
isLabelHidden = _ref$isLabelHidden === void 0 ? false : _ref$isLabelHidden,
|
|
32
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
30
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden"]);
|
|
33
31
|
|
|
34
32
|
var _useState = useState(identifier || "FormField-" + idCounter++),
|
|
35
33
|
id = _useState[0];
|
package/lib/Icon/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var _excluded = ["name", "size", "fixedWidth", "ariaLabel"],
|
|
2
|
-
_excluded2 = ["activeName", "inactiveName", "isActive", "size", "fixedWidth", "ariaLabel"];
|
|
3
|
-
|
|
4
1
|
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); }
|
|
5
2
|
|
|
6
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; }
|
|
@@ -19,7 +16,7 @@ var Icon = function Icon(_ref) {
|
|
|
19
16
|
_ref$fixedWidth = _ref.fixedWidth,
|
|
20
17
|
fixedWidth = _ref$fixedWidth === void 0 ? false : _ref$fixedWidth,
|
|
21
18
|
ariaLabel = _ref.ariaLabel,
|
|
22
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
19
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["name", "size", "fixedWidth", "ariaLabel"]);
|
|
23
20
|
|
|
24
21
|
var iconName = deprecatedIcons[name] || name;
|
|
25
22
|
var iconViewBox = iconViewBoxes[iconName];
|
|
@@ -60,7 +57,7 @@ var IconToggle = function IconToggle(_ref2) {
|
|
|
60
57
|
_ref2$fixedWidth = _ref2.fixedWidth,
|
|
61
58
|
fixedWidth = _ref2$fixedWidth === void 0 ? false : _ref2$fixedWidth,
|
|
62
59
|
ariaLabel = _ref2.ariaLabel,
|
|
63
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
60
|
+
rest = _objectWithoutPropertiesLoose(_ref2, ["activeName", "inactiveName", "isActive", "size", "fixedWidth", "ariaLabel"]);
|
|
64
61
|
|
|
65
62
|
return (
|
|
66
63
|
/*#__PURE__*/
|
package/lib/Icon/styles.js
CHANGED
|
@@ -19,7 +19,7 @@ var Container = styled.span.attrs({
|
|
|
19
19
|
className: "Icon"
|
|
20
20
|
}).withConfig({
|
|
21
21
|
displayName: "styles__Container",
|
|
22
|
-
componentId: "
|
|
22
|
+
componentId: "x0vwa5-0"
|
|
23
23
|
})(["display:inline-block;color:inherit;vertical-align:middle;", " ", " ", ""], function (props) {
|
|
24
24
|
return stylesForSize(sizes[props.iconSize], props.fixedWidth);
|
|
25
25
|
}, COMMON, verticalAlign);
|
package/lib/Image/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["alt", "title", "onClick", "onError", "onLoad", "src", "qa"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -87,7 +85,7 @@ var Image = /*#__PURE__*/function (_React$Component) {
|
|
|
87
85
|
onLoad = _this$props.onLoad,
|
|
88
86
|
src = _this$props.src,
|
|
89
87
|
qa = _this$props.qa,
|
|
90
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
88
|
+
rest = _objectWithoutPropertiesLoose(_this$props, ["alt", "title", "onClick", "onError", "onLoad", "src", "qa"]);
|
|
91
89
|
|
|
92
90
|
return /*#__PURE__*/React.createElement(ImageContainer, _extends({
|
|
93
91
|
isLoading: !this.state.didLoad,
|
package/lib/Image/styles.js
CHANGED
|
@@ -5,7 +5,7 @@ var ImageContainer = styled.img.attrs({
|
|
|
5
5
|
className: "Image"
|
|
6
6
|
}).withConfig({
|
|
7
7
|
displayName: "styles__ImageContainer",
|
|
8
|
-
componentId: "
|
|
8
|
+
componentId: "ub2idf-0"
|
|
9
9
|
})(["display:block;", " ", " ", ""], function (props) {
|
|
10
10
|
return props.isLoading && css(["visibility:hidden;"]);
|
|
11
11
|
}, COMMON, LAYOUT);
|
package/lib/Indicator/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["tooltip"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -24,7 +22,7 @@ var Indicator = /*#__PURE__*/function (_React$Component) {
|
|
|
24
22
|
_proto.render = function render() {
|
|
25
23
|
var _this$props = this.props,
|
|
26
24
|
tooltip = _this$props.tooltip,
|
|
27
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
25
|
+
rest = _objectWithoutPropertiesLoose(_this$props, ["tooltip"]);
|
|
28
26
|
|
|
29
27
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
30
28
|
"data-tip": tooltip,
|
package/lib/Input/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
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", "size"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -13,6 +11,7 @@ import Container, { Accessory } from "./styles";
|
|
|
13
11
|
import Button from "../Button";
|
|
14
12
|
import Icon from "../Icon";
|
|
15
13
|
import styled from "styled-components";
|
|
14
|
+
import { mergeRefs } from "../utils";
|
|
16
15
|
var InputContext = /*#__PURE__*/React.createContext({});
|
|
17
16
|
var StyledButton = styled(Button).withConfig({
|
|
18
17
|
displayName: "Input__StyledButton",
|
|
@@ -85,19 +84,16 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
87
|
+
_this.inputRef = /*#__PURE__*/React.createRef();
|
|
88
88
|
|
|
89
89
|
_this.handleBlur = function (e) {
|
|
90
90
|
return _this.props.onBlur == null ? void 0 : _this.props.onBlur(e);
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
_this.handleClear = function (e) {
|
|
94
|
-
|
|
95
|
-
if (typeof _this.props.innerRef === "object") {
|
|
96
|
-
var _this$props$innerRef$;
|
|
97
|
-
|
|
98
|
-
(_this$props$innerRef$ = _this.props.innerRef.current) == null ? void 0 : _this$props$innerRef$.focus();
|
|
99
|
-
}
|
|
94
|
+
var _this$inputRef, _this$inputRef$curren;
|
|
100
95
|
|
|
96
|
+
(_this$inputRef = _this.inputRef) == null ? void 0 : (_this$inputRef$curren = _this$inputRef.current) == null ? void 0 : _this$inputRef$curren.focus();
|
|
101
97
|
_this.props.onClear == null ? void 0 : _this.props.onClear(e);
|
|
102
98
|
};
|
|
103
99
|
|
|
@@ -160,7 +156,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
160
156
|
qa = _this$props$qa === void 0 ? {} : _this$props$qa,
|
|
161
157
|
appearance = _this$props.appearance,
|
|
162
158
|
size = _this$props.size,
|
|
163
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
159
|
+
rest = _objectWithoutPropertiesLoose(_this$props, ["autoComplete", "autoFocus", "disabled", "readOnly", "isInvalid", "hasWarning", "id", "name", "placeholder", "type", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaLabel", "ariaDescribedby", "clearButtonLabel", "innerRef", "onBlur", "onChange", "onClear", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "appearance", "size"]); // Convert autoComplete from a boolean prop to a string value.
|
|
164
160
|
|
|
165
161
|
|
|
166
162
|
var autoCompleteValue = undefined;
|
|
@@ -217,7 +213,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
217
213
|
onKeyDown: this.handleKeyDown,
|
|
218
214
|
onKeyUp: this.handleKeyUp,
|
|
219
215
|
onPaste: this.handlePaste,
|
|
220
|
-
ref: innerRef,
|
|
216
|
+
ref: mergeRefs([innerRef, this.inputRef]),
|
|
221
217
|
"data-qa-input": name || "",
|
|
222
218
|
"data-qa-input-isdisabled": disabled === true,
|
|
223
219
|
"data-qa-input-isrequired": required === true
|
|
@@ -235,8 +231,7 @@ Input.defaultProps = {
|
|
|
235
231
|
disabled: false,
|
|
236
232
|
type: "text",
|
|
237
233
|
size: "default",
|
|
238
|
-
appearance: "primary"
|
|
239
|
-
innerRef: /*#__PURE__*/React.createRef()
|
|
234
|
+
appearance: "primary"
|
|
240
235
|
};
|
|
241
236
|
Input.ClearButton = ClearButton;
|
|
242
237
|
Input.ClearButton.displayName = "Input.ClearButton";
|
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: "
|
|
6
|
+
componentId: "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,7 +67,7 @@ var Container = styled.div.withConfig({
|
|
|
67
67
|
}, COMMON);
|
|
68
68
|
export var Accessory = styled.div.withConfig({
|
|
69
69
|
displayName: "styles__Accessory",
|
|
70
|
-
componentId: "
|
|
70
|
+
componentId: "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) {
|
package/lib/KeyboardKey/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["children"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
3
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
@@ -22,7 +20,7 @@ var KeyboardKey = /*#__PURE__*/function (_React$Component) {
|
|
|
22
20
|
_proto.render = function render() {
|
|
23
21
|
var _this$props = this.props,
|
|
24
22
|
children = _this$props.children,
|
|
25
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
23
|
+
rest = _objectWithoutPropertiesLoose(_this$props, ["children"]);
|
|
26
24
|
|
|
27
25
|
return /*#__PURE__*/React.createElement(Container, rest, /*#__PURE__*/React.createElement("kbd", {
|
|
28
26
|
"data-qa-keyboardkey": children
|
package/lib/Label/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"no babel-plugin-flow-react-proptypes";
|
|
2
2
|
|
|
3
|
-
var _excluded = ["as"];
|
|
4
|
-
|
|
5
3
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
6
4
|
|
|
7
5
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -17,7 +15,7 @@ import Text from "../Text";
|
|
|
17
15
|
var LabelBase = function LabelBase(_ref) {
|
|
18
16
|
var _ref$as = _ref.as,
|
|
19
17
|
as = _ref$as === void 0 ? "label" : _ref$as,
|
|
20
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["as"]);
|
|
21
19
|
|
|
22
20
|
return /*#__PURE__*/React.createElement(Text, _extends({}, rest, {
|
|
23
21
|
as: as
|
|
@@ -26,7 +24,7 @@ var LabelBase = function LabelBase(_ref) {
|
|
|
26
24
|
|
|
27
25
|
var StyledLabel = styled(LabelBase).withConfig({
|
|
28
26
|
displayName: "Label__StyledLabel",
|
|
29
|
-
componentId: "
|
|
27
|
+
componentId: "rqdi0a-0"
|
|
30
28
|
})(["display:flex;align-items:center;"]);
|
|
31
29
|
|
|
32
30
|
var Label = /*#__PURE__*/function (_React$Component) {
|
package/lib/Link/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["href", "external", "children", "disabled", "onClick", "as", "underline", "qa"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -17,7 +15,7 @@ var Link = function Link(_ref) {
|
|
|
17
15
|
underline = _ref.underline,
|
|
18
16
|
_ref$qa = _ref.qa,
|
|
19
17
|
qa = _ref$qa === void 0 ? {} : _ref$qa,
|
|
20
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["href", "external", "children", "disabled", "onClick", "as", "underline", "qa"]);
|
|
21
19
|
|
|
22
20
|
if (!href && external) {
|
|
23
21
|
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: "
|
|
7
|
+
componentId: "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,6 +1,3 @@
|
|
|
1
|
-
var _excluded = ["role", "children"],
|
|
2
|
-
_excluded2 = ["children"];
|
|
3
|
-
|
|
4
1
|
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); }
|
|
5
2
|
|
|
6
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; }
|
|
@@ -15,7 +12,7 @@ export var Listbox = function Listbox(_ref) {
|
|
|
15
12
|
var _ref$role = _ref.role,
|
|
16
13
|
role = _ref$role === void 0 ? MENU_ROLES.LISTBOX : _ref$role,
|
|
17
14
|
children = _ref.children,
|
|
18
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["role", "children"]);
|
|
19
16
|
|
|
20
17
|
return /*#__PURE__*/React.createElement(Menu, _extends({}, rest, {
|
|
21
18
|
role: role
|
|
@@ -28,7 +25,7 @@ export var Listbox = function Listbox(_ref) {
|
|
|
28
25
|
|
|
29
26
|
export var ListboxButtonContainer = styled(MenuButton).withConfig({
|
|
30
27
|
displayName: "Listbox__ListboxButtonContainer",
|
|
31
|
-
componentId: "
|
|
28
|
+
componentId: "c9mfi8-0"
|
|
32
29
|
})(["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) {
|
|
33
30
|
return props.theme.colors.form.border.base;
|
|
34
31
|
}, function (props) {
|
|
@@ -82,7 +79,7 @@ export var ListboxButtonContainer = styled(MenuButton).withConfig({
|
|
|
82
79
|
});
|
|
83
80
|
export var ListboxButton = function ListboxButton(_ref2) {
|
|
84
81
|
var children = _ref2.children,
|
|
85
|
-
restProps = _objectWithoutPropertiesLoose(_ref2,
|
|
82
|
+
restProps = _objectWithoutPropertiesLoose(_ref2, ["children"]);
|
|
86
83
|
|
|
87
84
|
return /*#__PURE__*/React.createElement(ListboxButtonContainer, _extends({}, restProps, {
|
|
88
85
|
popoutProps: _extends({
|
package/lib/Loader/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["text", "size", "delay", "color", "qa"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -27,7 +25,7 @@ var Loader = /*#__PURE__*/function (_React$Component) {
|
|
|
27
25
|
delay = _this$props.delay,
|
|
28
26
|
color = _this$props.color,
|
|
29
27
|
qa = _this$props.qa,
|
|
30
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
28
|
+
rest = _objectWithoutPropertiesLoose(_this$props, ["text", "size", "delay", "color", "qa"]);
|
|
31
29
|
|
|
32
30
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
33
31
|
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: "
|
|
22
|
+
componentId: "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: "
|
|
32
|
+
componentId: "zj8x0q-1"
|
|
33
33
|
})(["", ""], visuallyHidden);
|
|
34
34
|
export default Container;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["appearance", "isLoading", "disabled", "loaderLabel", "children"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -40,7 +38,7 @@ export var LoaderButton = function LoaderButton(_ref) {
|
|
|
40
38
|
disabled = _ref.disabled,
|
|
41
39
|
loaderLabel = _ref.loaderLabel,
|
|
42
40
|
children = _ref.children,
|
|
43
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
41
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["appearance", "isLoading", "disabled", "loaderLabel", "children"]);
|
|
44
42
|
|
|
45
43
|
var isLoading = Boolean(_isLoading);
|
|
46
44
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
package/lib/Menu/descendants.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var _excluded = ["context", "element"],
|
|
2
|
-
_excluded2 = ["element"];
|
|
3
|
-
|
|
4
1
|
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; }
|
|
5
2
|
|
|
6
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); }
|
|
@@ -94,7 +91,7 @@ export function createDescendantContext(name, initialValue) {
|
|
|
94
91
|
export function useDescendant(_ref, indexProp) {
|
|
95
92
|
var context = _ref.context,
|
|
96
93
|
element = _ref.element,
|
|
97
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
94
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["context", "element"]);
|
|
98
95
|
|
|
99
96
|
var _useState = useState(),
|
|
100
97
|
forceUpdate = _useState[1];
|
|
@@ -128,7 +125,7 @@ export function DescendantProvider(_ref2) {
|
|
|
128
125
|
set = _ref2.set;
|
|
129
126
|
var registerDescendant = useCallback(function (_ref3) {
|
|
130
127
|
var element = _ref3.element,
|
|
131
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
128
|
+
rest = _objectWithoutPropertiesLoose(_ref3, ["element"]);
|
|
132
129
|
|
|
133
130
|
if (!element) {
|
|
134
131
|
return;
|
package/lib/Menu/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
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"];
|
|
7
2
|
|
|
8
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); }
|
|
9
4
|
|
|
@@ -72,7 +67,7 @@ export var MenuItem = function MenuItem(_ref) {
|
|
|
72
67
|
disabled = _ref.disabled,
|
|
73
68
|
indeterminate = _ref.indeterminate,
|
|
74
69
|
labelProp = _ref.label,
|
|
75
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
70
|
+
props = _objectWithoutPropertiesLoose(_ref, ["id", "index", "as", "children", "role", "elemBefore", "elemAfter", "value", "onKeyPress", "onClick", "selected", "disabled", "indeterminate", "label"]);
|
|
76
71
|
|
|
77
72
|
var _useContext = useContext(MenuContext),
|
|
78
73
|
menuRole = _useContext.role,
|
|
@@ -232,13 +227,21 @@ export var MenuRadio = function MenuRadio(props) {
|
|
|
232
227
|
role: MENU_ITEM_ROLES.RADIO
|
|
233
228
|
}, props));
|
|
234
229
|
};
|
|
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
|
+
|
|
235
238
|
export var MenuGroup = function MenuGroup(_ref2) {
|
|
236
239
|
var children = _ref2.children,
|
|
237
240
|
title = _ref2.title,
|
|
238
241
|
titleAs = _ref2.titleAs,
|
|
239
242
|
_ref2$disabled = _ref2.disabled,
|
|
240
243
|
isDisabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
241
|
-
props = _objectWithoutPropertiesLoose(_ref2,
|
|
244
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["children", "title", "titleAs", "disabled"]);
|
|
242
245
|
|
|
243
246
|
return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(Box, {
|
|
244
247
|
pl: 400,
|
|
@@ -251,7 +254,7 @@ export var MenuGroup = function MenuGroup(_ref2) {
|
|
|
251
254
|
fontWeight: 600,
|
|
252
255
|
mt: 350,
|
|
253
256
|
color: "text.headline",
|
|
254
|
-
|
|
257
|
+
_css: isDisabled && disabled
|
|
255
258
|
}, title)), /*#__PURE__*/React.createElement(Box, _extends({}, props, {
|
|
256
259
|
p: 300,
|
|
257
260
|
role: "group"
|
|
@@ -306,7 +309,7 @@ var MenuItems = function MenuItems(_ref3) {
|
|
|
306
309
|
role = _ref3.role,
|
|
307
310
|
multiselect = _ref3.multiselect,
|
|
308
311
|
innerRef = _ref3.innerRef,
|
|
309
|
-
props = _objectWithoutPropertiesLoose(_ref3,
|
|
312
|
+
props = _objectWithoutPropertiesLoose(_ref3, ["children", "role", "multiselect", "innerRef"]);
|
|
310
313
|
|
|
311
314
|
var _useMenuKeyDown = useMenuKeyDown(),
|
|
312
315
|
handleKeyDown = _useMenuKeyDown.handleKeyDown,
|
|
@@ -334,7 +337,7 @@ export var Menu = function Menu(_ref4) {
|
|
|
334
337
|
value = _ref4.value,
|
|
335
338
|
multiselect = _ref4.multiselect,
|
|
336
339
|
innerRef = _ref4.innerRef,
|
|
337
|
-
props = _objectWithoutPropertiesLoose(_ref4,
|
|
340
|
+
props = _objectWithoutPropertiesLoose(_ref4, ["role", "children", "onChange", "value", "multiselect", "innerRef"]);
|
|
338
341
|
|
|
339
342
|
var _useDescendants = useDescendants(),
|
|
340
343
|
descendants = _useDescendants[0],
|
|
@@ -394,7 +397,7 @@ Menu.Divider.displayName = "Menu.Divider";
|
|
|
394
397
|
Menu.FilterInput.displayName = "Menu.FilterInput";
|
|
395
398
|
var CustomPopoutContent = styled(Popout.Content).withConfig({
|
|
396
399
|
displayName: "Menu__CustomPopoutContent",
|
|
397
|
-
componentId: "sc-1p3rdnp-
|
|
400
|
+
componentId: "sc-1p3rdnp-1"
|
|
398
401
|
})(["padding:0;margin-left:0;margin-right:0;"]);
|
|
399
402
|
export var MenuButton = function MenuButton(_ref5) {
|
|
400
403
|
var content = _ref5.content,
|
|
@@ -407,7 +410,7 @@ export var MenuButton = function MenuButton(_ref5) {
|
|
|
407
410
|
id = _ref5$id === void 0 ? uniqueId("MenuButton-") : _ref5$id,
|
|
408
411
|
_ref5$placement = _ref5.placement,
|
|
409
412
|
placement = _ref5$placement === void 0 ? "bottom" : _ref5$placement,
|
|
410
|
-
props = _objectWithoutPropertiesLoose(_ref5,
|
|
413
|
+
props = _objectWithoutPropertiesLoose(_ref5, ["content", "popoutProps", "children", "onClick", "closeOnItemClick", "id", "placement"]);
|
|
411
414
|
|
|
412
415
|
var _useState3 = useState(false),
|
|
413
416
|
isOpen = _useState3[0],
|
|
@@ -448,11 +451,4 @@ export var MenuButton = function MenuButton(_ref5) {
|
|
|
448
451
|
}
|
|
449
452
|
}), children)));
|
|
450
453
|
};
|
|
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
|
-
});
|
|
454
|
+
export default Menu;
|
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: "
|
|
6
|
+
componentId: "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: "
|
|
46
|
+
componentId: "fjvae4-1"
|
|
47
47
|
})(["list-style-type:none;&:focus{", "}"], focusRing);
|
package/lib/Message/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _excluded = ["children", "density", "borderColor", "bg", "indentContent", "innerRef", "qa"];
|
|
2
|
-
|
|
3
1
|
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
2
|
|
|
5
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; }
|
|
@@ -54,7 +52,7 @@ var Message = function Message(_ref) {
|
|
|
54
52
|
indentContent = _ref$indentContent === void 0 ? true : _ref$indentContent,
|
|
55
53
|
innerRef = _ref.innerRef,
|
|
56
54
|
qa = _ref.qa,
|
|
57
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
55
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["children", "density", "borderColor", "bg", "indentContent", "innerRef", "qa"]);
|
|
58
56
|
|
|
59
57
|
return /*#__PURE__*/React.createElement(MessageContext.Provider, {
|
|
60
58
|
value: {
|