@sproutsocial/racine 11.4.0 → 11.4.1-input-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__flow__/Input/index.js +7 -6
- package/__flow__/utils/index.js +23 -0
- package/commonjs/Avatar/index.js +7 -4
- package/commonjs/Badge/index.js +3 -1
- package/commonjs/Badge/styles.js +1 -1
- 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 +10 -10
- package/commonjs/Input/styles.js +2 -2
- 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/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 +7 -4
- package/lib/Badge/index.js +3 -1
- package/lib/Badge/styles.js +1 -1
- 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 +9 -10
- package/lib/Input/styles.js +2 -2
- 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/lib/utils/index.js +24 -0
- package/package.json +1 -1
package/lib/Banner/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["type", "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; }
|
|
@@ -67,7 +69,7 @@ var Banner = /*#__PURE__*/function (_React$Component) {
|
|
|
67
69
|
var _this$props = this.props,
|
|
68
70
|
type = _this$props.type,
|
|
69
71
|
text = _this$props.text,
|
|
70
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
72
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
71
73
|
|
|
72
74
|
return /*#__PURE__*/React.createElement(Container // danger needs to be properly deprecated and removed DS-1094
|
|
73
75
|
, _extends({
|
package/lib/Banner/styles.js
CHANGED
|
@@ -2,7 +2,7 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import { COMMON, LAYOUT } from "../utils/system-props";
|
|
3
3
|
var Container = styled.div.withConfig({
|
|
4
4
|
displayName: "styles__Container",
|
|
5
|
-
componentId: "q43dr4-0"
|
|
5
|
+
componentId: "sc-q43dr4-0"
|
|
6
6
|
})(function (props) {
|
|
7
7
|
return css(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;&:hover{color:", ";text-decoration:underline;}}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.body, props.theme.radii.outer, props.theme.fontFamily, props.theme.typography[200], props.theme.space[300], props.theme.colors.container.border[props.type], props.theme.colors.container.background[props.type], props.theme.space[400], props.theme.colors.icon[props.type], props.theme.fontWeights.semibold, props.theme.colors.text.body, props.theme.colors.text.body, COMMON, LAYOUT);
|
|
8
8
|
});
|
package/lib/Box/styles.js
CHANGED
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
import { COMMON, BORDER, LAYOUT, POSITION, FLEXBOX, GRID } from "../utils/system-props";
|
|
3
3
|
var Container = styled.div.withConfig({
|
|
4
4
|
displayName: "styles__Container",
|
|
5
|
-
componentId: "ma8yo6-0"
|
|
5
|
+
componentId: "sc-ma8yo6-0"
|
|
6
6
|
})(["box-sizing:border-box;font-family:", ";", " ", " ", " ", " ", " ", ""], function (_ref) {
|
|
7
7
|
var theme = _ref.theme;
|
|
8
8
|
return theme.fontFamily;
|
package/lib/Breadcrumb/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["children", "href"],
|
|
2
|
+
_excluded2 = ["ariaLabel", "overflow", "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 @@ import Nav from "./styles";
|
|
|
12
15
|
var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
13
16
|
var children = _ref.children,
|
|
14
17
|
href = _ref.href,
|
|
15
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
19
|
|
|
17
20
|
return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Link, _extends({
|
|
18
21
|
href: href // $FlowIssue - upgrade v0.112.0
|
|
@@ -24,7 +27,7 @@ var Breadcrumb = function Breadcrumb(_ref2) {
|
|
|
24
27
|
var ariaLabel = _ref2.ariaLabel,
|
|
25
28
|
overflow = _ref2.overflow,
|
|
26
29
|
children = _ref2.children,
|
|
27
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
30
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
28
31
|
|
|
29
32
|
var listItems = Children.toArray(children);
|
|
30
33
|
var lastItem = listItems[listItems.length - 1];
|
package/lib/Button/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["href", "appearance", "active", "disabled", "external", "children", "size", "innerRef", "onClick", "title", "qa", "as", "ariaLabel"];
|
|
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; }
|
|
@@ -23,7 +25,7 @@ var Button = function Button(_ref) {
|
|
|
23
25
|
qa = _ref$qa === void 0 ? {} : _ref$qa,
|
|
24
26
|
as = _ref.as,
|
|
25
27
|
ariaLabel = _ref.ariaLabel,
|
|
26
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
28
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
27
29
|
|
|
28
30
|
if (!href && external) {
|
|
29
31
|
console.warn("Warning: external prop cannot be set without a href declaration");
|
package/lib/Card/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"no babel-plugin-flow-react-proptypes";
|
|
2
2
|
|
|
3
|
+
var _excluded = ["onClick", "href", "children", "ariaLabel", "buttonProps", "border", "borderColor", "color", "bg"];
|
|
4
|
+
|
|
3
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); }
|
|
4
6
|
|
|
5
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; }
|
|
@@ -22,7 +24,7 @@ var Card = function Card(_ref) {
|
|
|
22
24
|
color = _ref$color === void 0 ? "text.body" : _ref$color,
|
|
23
25
|
_ref$bg = _ref.bg,
|
|
24
26
|
bg = _ref$bg === void 0 ? "container.background.base" : _ref$bg,
|
|
25
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
27
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
26
28
|
|
|
27
29
|
return /*#__PURE__*/React.createElement(Container, _extends({}, rest, {
|
|
28
30
|
border: border,
|
package/lib/Card/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import Button from "../Button";
|
|
|
3
3
|
import Box from "../Box";
|
|
4
4
|
var Container = styled(Box).withConfig({
|
|
5
5
|
displayName: "styles__Container",
|
|
6
|
-
componentId: "p098yi-0"
|
|
6
|
+
componentId: "sc-p098yi-0"
|
|
7
7
|
})(["width:100%;border-radius:", ";position:relative;z-index:0;::after{content:\"\";top:0;left:0;position:absolute;border-radius:", ";z-index:-1;width:100%;height:100%;opacity:0;box-shadow:", ";transition:opacity ", " ", ";}&:hover{&::after{opacity:1;}}[role=\"button\"],[type=\"button\"],a{position:relative;}"], function (props) {
|
|
8
8
|
return props.theme.radii.outer;
|
|
9
9
|
}, function (props) {
|
|
@@ -17,6 +17,6 @@ var Container = styled(Box).withConfig({
|
|
|
17
17
|
});
|
|
18
18
|
var ClickableArea = styled(Button).withConfig({
|
|
19
19
|
displayName: "styles__ClickableArea",
|
|
20
|
-
componentId: "p098yi-1"
|
|
20
|
+
componentId: "sc-p098yi-1"
|
|
21
21
|
})(["position:absolute !important;top:0;bottom:0;left:0;right:0;width:100%;"]);
|
|
22
22
|
export { Container, ClickableArea };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["size"];
|
|
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; }
|
|
@@ -21,7 +23,7 @@ var CharacterCounter = /*#__PURE__*/function (_React$Component) {
|
|
|
21
23
|
_proto.render = function render() {
|
|
22
24
|
var _this$props = this.props,
|
|
23
25
|
size = _this$props.size,
|
|
24
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
26
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
25
27
|
|
|
26
28
|
var remaining = this.props.maxValue - this.props.currentValue;
|
|
27
29
|
return (
|
|
@@ -2,7 +2,7 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import { COMMON } from "../utils/system-props";
|
|
3
3
|
var Container = styled.div.withConfig({
|
|
4
4
|
displayName: "styles__Container",
|
|
5
|
-
componentId: "do9szx-0"
|
|
5
|
+
componentId: "sc-do9szx-0"
|
|
6
6
|
})(["font-family:", ";", ";font-weight:", ";line-height:1;font-variant-numeric:tabular-nums;color:", ";", " ", ""], function (props) {
|
|
7
7
|
return props.theme.fontFamily;
|
|
8
8
|
}, function (props) {
|
package/lib/ChartLegend/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["legendLabels", "stacked", "theme"];
|
|
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; }
|
|
@@ -32,7 +34,7 @@ var ChartLegend = function ChartLegend(props) {
|
|
|
32
34
|
stacked = props.stacked,
|
|
33
35
|
_props$theme = props.theme,
|
|
34
36
|
theme = _props$theme === void 0 ? "compare" : _props$theme,
|
|
35
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
37
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
36
38
|
|
|
37
39
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
38
40
|
inline: !stacked,
|
|
@@ -2,13 +2,13 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import { COMMON, LAYOUT } from "../utils/system-props";
|
|
3
3
|
export var Label = styled.span.withConfig({
|
|
4
4
|
displayName: "styles__Label",
|
|
5
|
-
componentId: "se0ijc-0"
|
|
5
|
+
componentId: "sc-se0ijc-0"
|
|
6
6
|
})(["display:flex;align-items:center;color:", ";white-space:nowrap;text-transform:capitalize;"], function (props) {
|
|
7
7
|
return props.theme.colors.text.subtext;
|
|
8
8
|
});
|
|
9
9
|
export var Swatch = styled.span.withConfig({
|
|
10
10
|
displayName: "styles__Swatch",
|
|
11
|
-
componentId: "se0ijc-1"
|
|
11
|
+
componentId: "sc-se0ijc-1"
|
|
12
12
|
})(["margin-right:", ";width:", ";height:", ";border-radius:4px;", ""], function (props) {
|
|
13
13
|
return props.theme.space[300];
|
|
14
14
|
}, function (props) {
|
|
@@ -18,7 +18,7 @@ export var Swatch = styled.span.withConfig({
|
|
|
18
18
|
}, COMMON);
|
|
19
19
|
var Container = styled.div.withConfig({
|
|
20
20
|
displayName: "styles__Container",
|
|
21
|
-
componentId: "se0ijc-2"
|
|
21
|
+
componentId: "sc-se0ijc-2"
|
|
22
22
|
})(["", " ", " ", ""], function (props) {
|
|
23
23
|
return props.inline && css(["display:flex;justify-content:center;", " + ", "{margin-left:", ";}"], Label, Label, function (props) {
|
|
24
24
|
return props.theme.space[450];
|
package/lib/Checkbox/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["id", "value", "name", "label", "checked", "disabled", "indeterminate", "onChange", "ariaLabel", "appearance", "qa", "tabIndex", "inputProps"];
|
|
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; }
|
|
@@ -63,7 +65,7 @@ var Checkbox = /*#__PURE__*/function (_React$Component) {
|
|
|
63
65
|
tabIndex = _this$props.tabIndex,
|
|
64
66
|
_this$props$inputProp = _this$props.inputProps,
|
|
65
67
|
inputProps = _this$props$inputProp === void 0 ? {} : _this$props$inputProp,
|
|
66
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
68
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
67
69
|
|
|
68
70
|
var isPill = appearance === "pill"; // TODO: Refactor pill checkboxes to use fewer elements for performance gains
|
|
69
71
|
|
package/lib/Collapsible/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["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; }
|
|
@@ -48,7 +51,7 @@ var determineMaxHeight = function determineMaxHeight(isHidden, openHeight, compu
|
|
|
48
51
|
|
|
49
52
|
var Trigger = function Trigger(_ref2) {
|
|
50
53
|
var children = _ref2.children,
|
|
51
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
54
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
52
55
|
|
|
53
56
|
var _useContext = useContext(CollapsibleContext),
|
|
54
57
|
isOpen = _useContext.isOpen,
|
|
@@ -62,7 +65,7 @@ var Trigger = function Trigger(_ref2) {
|
|
|
62
65
|
|
|
63
66
|
var Panel = function Panel(_ref3) {
|
|
64
67
|
var children = _ref3.children,
|
|
65
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
68
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
66
69
|
|
|
67
70
|
var _useContext2 = useContext(CollapsibleContext),
|
|
68
71
|
isOpen = _useContext2.isOpen,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["startDate", "endDate", "onDatesChange"];
|
|
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; }
|
|
@@ -11,7 +13,7 @@ var DateRangePicker = function DateRangePicker(_ref) {
|
|
|
11
13
|
var startDate = _ref.startDate,
|
|
12
14
|
endDate = _ref.endDate,
|
|
13
15
|
onDatesChange = _ref.onDatesChange,
|
|
14
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
16
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
17
|
|
|
16
18
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ReactDatesCssOverrides, null), /*#__PURE__*/React.createElement(DayPickerRangeController, _extends({
|
|
17
19
|
startDate: startDate,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["onDateChange", "date"];
|
|
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; }
|
|
@@ -10,7 +12,7 @@ import { commonDatePickerProps } from "./common";
|
|
|
10
12
|
var SingleDatePicker = function SingleDatePicker(_ref) {
|
|
11
13
|
var onDateChange = _ref.onDateChange,
|
|
12
14
|
date = _ref.date,
|
|
13
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
16
|
|
|
15
17
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ReactDatesCssOverrides, null), /*#__PURE__*/React.createElement(DayPickerSingleDateController, _extends({
|
|
16
18
|
date: date,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["startDate", "endDate", "onDatesChange", "onFocusChange"];
|
|
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; }
|
|
@@ -10,7 +12,7 @@ export var StatefulDateRangePicker = function StatefulDateRangePicker(_ref) {
|
|
|
10
12
|
endDate = _ref.endDate,
|
|
11
13
|
onDatesChange = _ref.onDatesChange,
|
|
12
14
|
onFocusChange = _ref.onFocusChange,
|
|
13
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
16
|
|
|
15
17
|
var _useState = useState({
|
|
16
18
|
startDate: startDate,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["date", "onDateChange"];
|
|
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; }
|
|
@@ -7,7 +9,7 @@ import SingleDatePicker from "./SingleDatePicker";
|
|
|
7
9
|
export var StatefulSingleDatePicker = function StatefulSingleDatePicker(_ref) {
|
|
8
10
|
var date = _ref.date,
|
|
9
11
|
onDateChange = _ref.onDateChange,
|
|
10
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
12
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11
13
|
|
|
12
14
|
var _useState = useState(date),
|
|
13
15
|
stateDate = _useState[0],
|
package/lib/DatePicker/styles.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
1
|
import styled, { createGlobalStyle, css } from "styled-components";
|
|
6
2
|
import moment from "moment";
|
|
7
3
|
import Box from "../Box";
|
|
@@ -56,7 +52,7 @@ var shouldHaveRightPill = function shouldHaveRightPill(modifiers, day) {
|
|
|
56
52
|
|
|
57
53
|
export var CalendarDay = styled(Box).withConfig({
|
|
58
54
|
displayName: "styles__CalendarDay",
|
|
59
|
-
componentId: "fso9yi-0"
|
|
55
|
+
componentId: "sc-fso9yi-0"
|
|
60
56
|
})(["", ";"], function (_ref) {
|
|
61
57
|
var modifiers = _ref.modifiers,
|
|
62
58
|
day = _ref.day,
|
|
@@ -72,7 +68,7 @@ export var CalendarDay = styled(Box).withConfig({
|
|
|
72
68
|
return css(["color:", ";", ";"], theme.colors.text.subtext, disabled);
|
|
73
69
|
}
|
|
74
70
|
});
|
|
75
|
-
export var ReactDatesCssOverrides = createGlobalStyle(
|
|
71
|
+
export var ReactDatesCssOverrides = createGlobalStyle([".DayPicker{box-sizing:content-box;font-weight:", ";font-family:", ";&_transitionContainer{height:228px !important;}&_weekHeader{color:", ";border-bottom:1px solid ", ";top:26px;width:230px;&_ul{padding-left:10px;}}&_weekHeaders__horizontal{margin-left:0}&_weekHeader_li{", " color:", ";font-weight:", ";margin:0;}&__horizontal{box-shadow:none;background:", ";}}.CalendarDay{background-color:transparent;&__selected,&__selected_span,&:hover{background-color:transparent;}&__default{color:", ";}&__default,&__default:hover{border:none;color:", ";}}.CalendarMonth{", " background:", ";padding:0 15px;&_caption{", " color:", ";padding-top:0;background:", ";strong{font-weight:", ";}}&_table{line-height:21.333px;tr{vertical-align:middle;}td{padding:0;border-bottom:none;}}}.CalendarMonthGrid{background:", ";}.DayPickerNavigation_button__horizontal{color:", ";top:-4px;padding:7px 8px;position:absolute;line-height:0.78;border-radius:9999px;border:none;background:", ";&:nth-child(1){left:22px;}&:nth-child(2){right:22px;}&:hover{background:", ";}}"], function (_ref2) {
|
|
76
72
|
var theme = _ref2.theme;
|
|
77
73
|
return theme.fontWeights.normal;
|
|
78
74
|
}, function (props) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["isVisible", "children", "width", "direction"];
|
|
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
|
import * as React from "react";
|
|
@@ -8,7 +10,7 @@ export var SlideTransition = function SlideTransition(_ref) {
|
|
|
8
10
|
children = _ref.children,
|
|
9
11
|
width = _ref.width,
|
|
10
12
|
direction = _ref.direction,
|
|
11
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
13
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
14
|
|
|
13
15
|
var offset = width * (direction === "left" ? -1 : 1);
|
|
14
16
|
var transitions = useTransition(isVisible, null, {
|
package/lib/Drawer/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
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
|
+
|
|
1
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; }
|
|
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); }
|
|
@@ -53,7 +58,7 @@ var DrawerHeader = function DrawerHeader(_ref) {
|
|
|
53
58
|
title = _ref$title === void 0 ? "" : _ref$title,
|
|
54
59
|
children = _ref.children,
|
|
55
60
|
render = _ref.render,
|
|
56
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
61
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
57
62
|
|
|
58
63
|
var drawerContext = useContext(DrawerContext);
|
|
59
64
|
|
|
@@ -79,7 +84,7 @@ var DrawerHeader = function DrawerHeader(_ref) {
|
|
|
79
84
|
|
|
80
85
|
var DrawerContent = function DrawerContent(_ref2) {
|
|
81
86
|
var children = _ref2.children,
|
|
82
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
87
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
83
88
|
|
|
84
89
|
return (
|
|
85
90
|
/*#__PURE__*/
|
|
@@ -102,7 +107,7 @@ var Drawer = function Drawer(_ref3) {
|
|
|
102
107
|
onClose = _ref3.onClose,
|
|
103
108
|
zIndex = _ref3.zIndex,
|
|
104
109
|
closeTargets = _ref3.closeTargets,
|
|
105
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
110
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
106
111
|
|
|
107
112
|
var drawerRef = useRef(null);
|
|
108
113
|
useEffect(function () {
|
|
@@ -174,7 +179,7 @@ var DrawerContainer = function DrawerContainer(_ref4) {
|
|
|
174
179
|
zIndex = _ref4$zIndex === void 0 ? 7 : _ref4$zIndex,
|
|
175
180
|
_ref4$closeTargets = _ref4.closeTargets,
|
|
176
181
|
closeTargets = _ref4$closeTargets === void 0 ? [] : _ref4$closeTargets,
|
|
177
|
-
rest = _objectWithoutPropertiesLoose(_ref4,
|
|
182
|
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
178
183
|
|
|
179
184
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
180
185
|
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: "bo5voc-0"
|
|
6
|
+
componentId: "sc-bo5voc-0"
|
|
7
7
|
})(["overflow-y:auto;"]);
|
|
8
8
|
var Container = styled.div.withConfig({
|
|
9
9
|
displayName: "styles__Container",
|
|
10
|
-
componentId: "bo5voc-1"
|
|
10
|
+
componentId: "sc-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,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["media", "headline", "subtext", "primaryAction", "secondaryAction"];
|
|
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; }
|
|
@@ -12,7 +14,7 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
12
14
|
subtext = _ref.subtext,
|
|
13
15
|
primaryAction = _ref.primaryAction,
|
|
14
16
|
secondaryAction = _ref.secondaryAction,
|
|
15
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
17
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
18
|
|
|
17
19
|
return (
|
|
18
20
|
/*#__PURE__*/
|
package/lib/Fieldset/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
var _excluded = ["layout", "label", "helperText", "children"],
|
|
2
|
+
_excluded2 = ["children"],
|
|
3
|
+
_excluded3 = ["children"];
|
|
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 Fieldset = function Fieldset(_ref) {
|
|
|
16
20
|
label = _ref.label,
|
|
17
21
|
helperText = _ref.helperText,
|
|
18
22
|
children = _ref.children,
|
|
19
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
23
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
26
|
/*#__PURE__*/
|
|
@@ -39,7 +43,7 @@ var Fieldset = function Fieldset(_ref) {
|
|
|
39
43
|
|
|
40
44
|
var FieldsetLegend = function FieldsetLegend(_ref2) {
|
|
41
45
|
var children = _ref2.children,
|
|
42
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
46
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
43
47
|
|
|
44
48
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
45
49
|
as: "legend",
|
|
@@ -52,7 +56,7 @@ var FieldsetLegend = function FieldsetLegend(_ref2) {
|
|
|
52
56
|
|
|
53
57
|
var FieldsetHelperText = function FieldsetHelperText(_ref3) {
|
|
54
58
|
var children = _ref3.children,
|
|
55
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
59
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
56
60
|
|
|
57
61
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
58
62
|
as: "p",
|
package/lib/FormField/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"no babel-plugin-flow-react-proptypes";
|
|
2
2
|
|
|
3
|
+
var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden"];
|
|
4
|
+
|
|
3
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); }
|
|
4
6
|
|
|
5
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; }
|
|
@@ -27,7 +29,7 @@ var FormField = function FormField(_ref) {
|
|
|
27
29
|
qa = _ref.qa,
|
|
28
30
|
_ref$isLabelHidden = _ref.isLabelHidden,
|
|
29
31
|
isLabelHidden = _ref$isLabelHidden === void 0 ? false : _ref$isLabelHidden,
|
|
30
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
32
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31
33
|
|
|
32
34
|
var _useState = useState(identifier || "FormField-" + idCounter++),
|
|
33
35
|
id = _useState[0];
|
package/lib/Icon/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["name", "size", "fixedWidth", "ariaLabel"],
|
|
2
|
+
_excluded2 = ["activeName", "inactiveName", "isActive", "size", "fixedWidth", "ariaLabel"];
|
|
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; }
|
|
@@ -16,7 +19,7 @@ var Icon = function Icon(_ref) {
|
|
|
16
19
|
_ref$fixedWidth = _ref.fixedWidth,
|
|
17
20
|
fixedWidth = _ref$fixedWidth === void 0 ? false : _ref$fixedWidth,
|
|
18
21
|
ariaLabel = _ref.ariaLabel,
|
|
19
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
22
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
23
|
|
|
21
24
|
var iconName = deprecatedIcons[name] || name;
|
|
22
25
|
var iconViewBox = iconViewBoxes[iconName];
|
|
@@ -57,7 +60,7 @@ var IconToggle = function IconToggle(_ref2) {
|
|
|
57
60
|
_ref2$fixedWidth = _ref2.fixedWidth,
|
|
58
61
|
fixedWidth = _ref2$fixedWidth === void 0 ? false : _ref2$fixedWidth,
|
|
59
62
|
ariaLabel = _ref2.ariaLabel,
|
|
60
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
63
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
61
64
|
|
|
62
65
|
return (
|
|
63
66
|
/*#__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: "x0vwa5-0"
|
|
22
|
+
componentId: "sc-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,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["alt", "title", "onClick", "onError", "onLoad", "src", "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; }
|
|
@@ -85,7 +87,7 @@ var Image = /*#__PURE__*/function (_React$Component) {
|
|
|
85
87
|
onLoad = _this$props.onLoad,
|
|
86
88
|
src = _this$props.src,
|
|
87
89
|
qa = _this$props.qa,
|
|
88
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
90
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
89
91
|
|
|
90
92
|
return /*#__PURE__*/React.createElement(ImageContainer, _extends({
|
|
91
93
|
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: "ub2idf-0"
|
|
8
|
+
componentId: "sc-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,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["tooltip"];
|
|
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; }
|
|
@@ -22,7 +24,7 @@ var Indicator = /*#__PURE__*/function (_React$Component) {
|
|
|
22
24
|
_proto.render = function render() {
|
|
23
25
|
var _this$props = this.props,
|
|
24
26
|
tooltip = _this$props.tooltip,
|
|
25
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
27
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
26
28
|
|
|
27
29
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
28
30
|
"data-tip": tooltip,
|
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", "size"];
|
|
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; }
|
|
@@ -11,6 +13,7 @@ import Container, { Accessory } from "./styles";
|
|
|
11
13
|
import Button from "../Button";
|
|
12
14
|
import Icon from "../Icon";
|
|
13
15
|
import styled from "styled-components";
|
|
16
|
+
import { mergeRefs } from "../utils";
|
|
14
17
|
var InputContext = /*#__PURE__*/React.createContext({});
|
|
15
18
|
var StyledButton = styled(Button).withConfig({
|
|
16
19
|
displayName: "Input__StyledButton",
|
|
@@ -83,19 +86,16 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
89
|
+
_this.inputRef = /*#__PURE__*/React.createRef();
|
|
86
90
|
|
|
87
91
|
_this.handleBlur = function (e) {
|
|
88
92
|
return _this.props.onBlur == null ? void 0 : _this.props.onBlur(e);
|
|
89
93
|
};
|
|
90
94
|
|
|
91
95
|
_this.handleClear = function (e) {
|
|
92
|
-
|
|
93
|
-
if (typeof _this.props.innerRef === "object") {
|
|
94
|
-
var _this$props$innerRef$;
|
|
95
|
-
|
|
96
|
-
(_this$props$innerRef$ = _this.props.innerRef.current) == null ? void 0 : _this$props$innerRef$.focus();
|
|
97
|
-
}
|
|
96
|
+
var _this$inputRef, _this$inputRef$curren;
|
|
98
97
|
|
|
98
|
+
(_this$inputRef = _this.inputRef) == null ? void 0 : (_this$inputRef$curren = _this$inputRef.current) == null ? void 0 : _this$inputRef$curren.focus();
|
|
99
99
|
_this.props.onClear == null ? void 0 : _this.props.onClear(e);
|
|
100
100
|
};
|
|
101
101
|
|
|
@@ -158,7 +158,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
158
158
|
qa = _this$props$qa === void 0 ? {} : _this$props$qa,
|
|
159
159
|
appearance = _this$props.appearance,
|
|
160
160
|
size = _this$props.size,
|
|
161
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
161
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded); // Convert autoComplete from a boolean prop to a string value.
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
var autoCompleteValue = undefined;
|
|
@@ -215,7 +215,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
|
|
|
215
215
|
onKeyDown: this.handleKeyDown,
|
|
216
216
|
onKeyUp: this.handleKeyUp,
|
|
217
217
|
onPaste: this.handlePaste,
|
|
218
|
-
ref: innerRef,
|
|
218
|
+
ref: mergeRefs([innerRef, this.inputRef]),
|
|
219
219
|
"data-qa-input": name || "",
|
|
220
220
|
"data-qa-input-isdisabled": disabled === true,
|
|
221
221
|
"data-qa-input-isrequired": required === true
|
|
@@ -233,8 +233,7 @@ Input.defaultProps = {
|
|
|
233
233
|
disabled: false,
|
|
234
234
|
type: "text",
|
|
235
235
|
size: "default",
|
|
236
|
-
appearance: "primary"
|
|
237
|
-
innerRef: /*#__PURE__*/React.createRef()
|
|
236
|
+
appearance: "primary"
|
|
238
237
|
};
|
|
239
238
|
Input.ClearButton = ClearButton;
|
|
240
239
|
Input.ClearButton.displayName = "Input.ClearButton";
|