@dxc-technology/halstack-react 0.0.0-a678636 → 0.0.0-a94d337
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/babel.config.js +6 -2
- package/dist/BackgroundColorContext.js +46 -0
- package/dist/ThemeContext.js +235 -2
- package/dist/V3Textarea/V3Textarea.js +264 -0
- package/dist/accordion/Accordion.js +170 -65
- package/dist/accordion-group/AccordionGroup.js +186 -0
- package/dist/alert/Alert.js +183 -84
- package/dist/alert/index.d.ts +51 -0
- package/dist/badge/Badge.js +63 -0
- package/dist/box/Box.js +31 -23
- package/dist/button/Button.js +83 -26
- package/dist/card/Card.js +72 -35
- package/dist/checkbox/Checkbox.js +98 -38
- package/dist/chip/Chip.js +128 -36
- package/dist/common/RequiredComponent.js +2 -8
- package/dist/common/utils.js +2 -22
- package/dist/common/variables.js +1439 -304
- package/dist/date/Date.js +80 -57
- package/dist/date-input/DateInput.js +400 -0
- package/dist/date-input/index.d.ts +95 -0
- package/dist/dialog/Dialog.js +58 -37
- package/dist/dropdown/Dropdown.js +199 -71
- package/dist/file-input/FileInput.js +644 -0
- package/dist/file-input/FileItem.js +280 -0
- package/dist/file-input/index.d.ts +81 -0
- package/dist/footer/Footer.js +121 -46
- package/dist/footer/Icons.js +77 -0
- package/dist/header/Header.js +171 -97
- package/dist/header/Icons.js +59 -0
- package/dist/heading/Heading.js +81 -16
- package/dist/input-text/Icons.js +22 -0
- package/dist/input-text/InputText.js +292 -106
- package/dist/layout/ApplicationLayout.js +327 -0
- package/dist/layout/Icons.js +55 -0
- package/dist/link/Link.js +136 -35
- package/dist/main.d.ts +8 -0
- package/dist/main.js +103 -7
- package/dist/new-select/NewSelect.js +836 -0
- package/dist/new-select/index.d.ts +53 -0
- package/dist/number-input/NumberInput.js +136 -0
- package/dist/number-input/NumberInputContext.js +16 -0
- package/dist/number-input/index.d.ts +113 -0
- package/dist/paginator/Paginator.js +149 -56
- package/dist/password-input/PasswordInput.js +198 -0
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +95 -38
- package/dist/radio/Radio.js +31 -17
- package/dist/resultsetTable/ResultsetTable.js +93 -68
- package/dist/select/Select.js +244 -146
- package/dist/sidenav/Sidenav.js +86 -129
- package/dist/slider/Slider.js +206 -70
- package/dist/spinner/Spinner.js +247 -59
- package/dist/switch/Switch.js +50 -27
- package/dist/table/Table.js +52 -13
- package/dist/tabs/Tabs.js +206 -35
- package/dist/tabs-for-sections/TabsForSections.js +1 -16
- package/dist/tag/Tag.js +100 -35
- package/dist/text-input/TextInput.js +971 -0
- package/dist/text-input/index.d.ts +135 -0
- package/dist/textarea/Textarea.js +248 -106
- package/dist/textarea/index.d.ts +117 -0
- package/dist/toggle/Toggle.js +16 -19
- package/dist/toggle-group/ToggleGroup.js +158 -48
- package/dist/upload/Upload.js +16 -11
- package/dist/upload/buttons-upload/ButtonsUpload.js +31 -14
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -28
- package/dist/upload/file-upload/FileToUpload.js +50 -24
- package/dist/upload/files-upload/FilesToUpload.js +16 -16
- package/dist/upload/readme.md +2 -2
- package/dist/upload/transaction/Transaction.js +44 -24
- package/dist/upload/transactions/Transactions.js +38 -20
- package/dist/useTheme.js +22 -0
- package/dist/wizard/Wizard.js +139 -55
- package/dist/wizard/invalid_icon.svg +4 -5
- package/dist/wizard/valid_icon.svg +4 -5
- package/package.json +13 -5
- package/test/AccordionGroup.test.js +125 -0
- package/test/Date.test.js +49 -45
- package/test/DateInput.test.js +242 -0
- package/test/Dropdown.test.js +15 -0
- package/test/FileInput.test.js +201 -0
- package/test/Footer.test.js +2 -7
- package/test/Header.test.js +5 -10
- package/test/InputText.test.js +53 -41
- package/test/Link.test.js +25 -7
- package/test/NumberInput.test.js +259 -0
- package/test/Paginator.test.js +72 -60
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +66 -19
- package/test/Select.test.js +55 -34
- package/test/Sidenav.test.js +22 -64
- package/test/Slider.test.js +17 -0
- package/test/Spinner.test.js +5 -0
- package/test/Tabs.test.js +21 -0
- package/test/TextInput.test.js +732 -0
- package/test/Textarea.test.js +193 -0
- package/test/ToggleGroup.test.js +5 -1
- package/test/Upload.test.js +5 -5
- package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/alert/Alert.stories.js +0 -158
- package/dist/alert/close.svg +0 -4
- package/dist/alert/error.svg +0 -4
- package/dist/alert/info.svg +0 -4
- package/dist/alert/readme.md +0 -43
- package/dist/alert/success.svg +0 -4
- package/dist/alert/warning.svg +0 -4
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/common/services/example-service.js +0 -10
- package/dist/common/services/example-service.test.js +0 -12
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.stories.js +0 -249
- package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
- package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
- package/dist/dropdown/readme.md +0 -69
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo_wht.png +0 -0
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.png +0 -0
- package/dist/header/dxc_logo_blk_rgb.svg +0 -6
- package/dist/header/dxc_logo_white.png +0 -0
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/sidenav/arrow_icon.svg +0 -3
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/toggle-group/readme.md +0 -82
- package/test/Toggle.test.js +0 -43
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
type Size = "small" | "medium" | "large" | "fillParent";
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
/**
|
|
12
|
+
* Text to be placed above the textarea.
|
|
13
|
+
*/
|
|
14
|
+
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Name attribute of the textarea element.
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Value of the textarea. If undefined, the component will be uncontrolled and the value will be managed internally.
|
|
21
|
+
*/
|
|
22
|
+
value?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Helper text to be placed above the textarea.
|
|
25
|
+
*/
|
|
26
|
+
helperText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Text to be put as placeholder of the textarea.
|
|
29
|
+
*/
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/**
|
|
32
|
+
* If true, the component will be disabled.
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* If true, the textarea will be optional, showing '(Optional)'
|
|
37
|
+
* next to the label. Otherwise, the field will be considered required
|
|
38
|
+
* and an error will be passed as a parameter to the OnBlur and onChange functions
|
|
39
|
+
* when it has not been filled.
|
|
40
|
+
*/
|
|
41
|
+
optional?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Defines the textarea's ability to resize vertically. It can be:
|
|
44
|
+
* - 'auto': The textarea grows or shrinks automatically in order to fit the content.
|
|
45
|
+
* - 'manual': The height of the textarea is enabled to be manually modified.
|
|
46
|
+
* - 'none': The textarea has a fixed height and can't be modified.
|
|
47
|
+
*/
|
|
48
|
+
verticalGrow?: "auto" | "manual" | "none";
|
|
49
|
+
/**
|
|
50
|
+
* Number of rows of the textarea.
|
|
51
|
+
*/
|
|
52
|
+
rows?: number;
|
|
53
|
+
/**
|
|
54
|
+
* This function will be called when the user types within the textarea.
|
|
55
|
+
* An object including the current value and the error (if the value
|
|
56
|
+
* entered is not valid) will be passed to this function.
|
|
57
|
+
* If there is no error, error will be null.
|
|
58
|
+
*/
|
|
59
|
+
onChange?: (val: { value: string; error: string }) => void;
|
|
60
|
+
/**
|
|
61
|
+
* This function will be called when the textarea loses the focus. An
|
|
62
|
+
* object including the textarea value and the error (if the value entered
|
|
63
|
+
* is not valid) will be passed to this function. If there is no error,
|
|
64
|
+
* error will be null.
|
|
65
|
+
*/
|
|
66
|
+
onBlur?: (val: { value: string; error: string }) => void;
|
|
67
|
+
/**
|
|
68
|
+
* If it is defined, the component will change its appearance, showing
|
|
69
|
+
* the error below the textarea. If it is not defined, the error
|
|
70
|
+
* messages will be managed internally, but never displayed on its own.
|
|
71
|
+
*/
|
|
72
|
+
error?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Regular expression that defines the valid format allowed by the
|
|
75
|
+
* textarea. This will be checked both when the textarea loses the focus
|
|
76
|
+
* and while typing within it. If the string entered does not match the
|
|
77
|
+
* pattern, the onBlur and onChange functions will be called with the
|
|
78
|
+
* current value and an internal error informing that this value does not
|
|
79
|
+
* match the pattern. If the pattern is met, the error parameter of both
|
|
80
|
+
* events will be null.
|
|
81
|
+
*/
|
|
82
|
+
pattern?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Specifies the minimun and maximum length allowed by the textarea.
|
|
85
|
+
* This will be checked both when the textarea loses the
|
|
86
|
+
* focus and while typing within it. If the string entered does not
|
|
87
|
+
* comply the length, the onBlur and onChange functions will be called
|
|
88
|
+
* with the current value and an internal error informing that the value
|
|
89
|
+
* length does not comply the specified range. If a valid length is
|
|
90
|
+
* reached, the error parameter of both events will be null.
|
|
91
|
+
*/
|
|
92
|
+
length?: { min: number; max: number };
|
|
93
|
+
/**
|
|
94
|
+
* HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the textarea value.
|
|
95
|
+
* Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
|
|
96
|
+
*/
|
|
97
|
+
autocomplete?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
100
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
101
|
+
*/
|
|
102
|
+
margin?: Space | Margin;
|
|
103
|
+
/**
|
|
104
|
+
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
105
|
+
*/
|
|
106
|
+
size?: Size;
|
|
107
|
+
/**
|
|
108
|
+
* Value of the tabindex attribute.
|
|
109
|
+
*/
|
|
110
|
+
tabIndex?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Reference to the component.
|
|
113
|
+
*/
|
|
114
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default function DxcTextarea(props: Props): JSX.Element;
|
package/dist/toggle/Toggle.js
CHANGED
|
@@ -15,7 +15,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
15
15
|
|
|
16
16
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
17
|
|
|
18
|
-
var _react =
|
|
18
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
19
|
|
|
20
20
|
var _lab = require("@material-ui/lab");
|
|
21
21
|
|
|
@@ -23,13 +23,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
23
23
|
|
|
24
24
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
25
25
|
|
|
26
|
-
require("../common/OpenSans.css");
|
|
27
|
-
|
|
28
|
-
var _variables = require("../common/variables.js");
|
|
29
|
-
|
|
30
26
|
var _utils = require("../common/utils.js");
|
|
31
27
|
|
|
32
|
-
var
|
|
28
|
+
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
33
29
|
|
|
34
30
|
function _templateObject4() {
|
|
35
31
|
var data = (0, _taggedTemplateLiteral2["default"])([""]);
|
|
@@ -62,7 +58,7 @@ function _templateObject2() {
|
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
function _templateObject() {
|
|
65
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n opacity: ", ";\n cursor: ", ";\n display: inline-block;\n width: ", ";\n }\n\n .MuiToggleButton-label {\n font-size: 14px;\n font-family:
|
|
61
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n opacity: ", ";\n cursor: ", ";\n display: inline-block;\n width: ", ";\n }\n\n .MuiToggleButton-label {\n font-size: 14px;\n font-family: ", ";\n color: ", ";\n }\n .MuiButtonBase-root {\n width: ", ";\n min-height: ", ";\n background-color: ", ";\n &:hover {\n background-color: ", ";\n .MuiToggleButton-label {\n color: ", ";\n }\n }\n }\n\n .MuiToggleButton-root {\n min-width: 42px;\n height: 43px;\n border: ", ";\n\n border-radius: 4px !important;\n }\n\n .MuiToggleButton-root.Mui-selected {\n background-color: ", ";\n &:hover {\n background-color: ", ";\n .MuiToggleButton-label {\n color: ", ";\n }\n }\n }\n\n .MuiToggleButton-root:last-child,\n .MuiToggleButton-root:first-child,\n .MuiToggleButton-root:not(:first-child) {\n padding: ", ";\n }\n\n .MuiTouchRipple-child {\n background-color: ", ";\n }\n"]);
|
|
66
62
|
|
|
67
63
|
_templateObject = function _templateObject() {
|
|
68
64
|
return data;
|
|
@@ -92,8 +88,7 @@ var DxcToggle = function DxcToggle(_ref) {
|
|
|
92
88
|
margin = _ref.margin,
|
|
93
89
|
_ref$size = _ref.size,
|
|
94
90
|
size = _ref$size === void 0 ? "fitContent" : _ref$size;
|
|
95
|
-
|
|
96
|
-
var colorsTheme = (0, _react.useContext)(_ThemeContext["default"]) || _variables.colors;
|
|
91
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
97
92
|
|
|
98
93
|
var handlerToggleClick = function handlerToggleClick() {
|
|
99
94
|
if (!disabled && typeof onClick === "function") {
|
|
@@ -149,21 +144,23 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
149
144
|
};
|
|
150
145
|
|
|
151
146
|
var DxcToggleContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
152
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ?
|
|
147
|
+
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? spaces[props.margin] : "0px";
|
|
153
148
|
}, function (props) {
|
|
154
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ?
|
|
149
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? spaces[props.margin.top] : "";
|
|
155
150
|
}, function (props) {
|
|
156
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ?
|
|
151
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? spaces[props.margin.right] : "";
|
|
157
152
|
}, function (props) {
|
|
158
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ?
|
|
153
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? spaces[props.margin.bottom] : "";
|
|
159
154
|
}, function (props) {
|
|
160
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ?
|
|
155
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? spaces[props.margin.left] : "";
|
|
161
156
|
}, function (props) {
|
|
162
157
|
return props.disabled ? "0.5" : "1";
|
|
163
158
|
}, function (props) {
|
|
164
159
|
return props.disabled ? "not-allowed" : "pointer";
|
|
165
160
|
}, function (props) {
|
|
166
161
|
return calculateWidth(props.margin, props.size);
|
|
162
|
+
}, function (props) {
|
|
163
|
+
return props.theme.fontFamily;
|
|
167
164
|
}, function (props) {
|
|
168
165
|
return props.brightness === "dark" && props.mode === "outlined" ? props.theme.white : props.theme.black;
|
|
169
166
|
}, function (props) {
|
|
@@ -213,11 +210,11 @@ DxcToggle.propTypes = {
|
|
|
213
210
|
disableRipple: _propTypes["default"].bool,
|
|
214
211
|
onClick: _propTypes["default"].func,
|
|
215
212
|
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
216
|
-
top: _propTypes["default"].oneOf(Object.keys(
|
|
217
|
-
bottom: _propTypes["default"].oneOf(Object.keys(
|
|
218
|
-
left: _propTypes["default"].oneOf(Object.keys(
|
|
219
|
-
right: _propTypes["default"].oneOf(Object.keys(
|
|
220
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(
|
|
213
|
+
top: _propTypes["default"].oneOf(Object.keys(spaces)),
|
|
214
|
+
bottom: _propTypes["default"].oneOf(Object.keys(spaces)),
|
|
215
|
+
left: _propTypes["default"].oneOf(Object.keys(spaces)),
|
|
216
|
+
right: _propTypes["default"].oneOf(Object.keys(spaces))
|
|
217
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(spaces)))])
|
|
221
218
|
};
|
|
222
219
|
var _default = DxcToggle;
|
|
223
220
|
exports["default"] = _default;
|
|
@@ -11,28 +11,56 @@ exports["default"] = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
13
|
|
|
14
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
-
|
|
16
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
15
|
|
|
16
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
17
|
+
|
|
18
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
19
|
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
21
|
|
|
22
22
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _uuid = require("uuid");
|
|
25
25
|
|
|
26
|
-
require("
|
|
26
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
27
|
|
|
28
28
|
var _variables = require("../common/variables.js");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
31
|
+
|
|
32
|
+
function _templateObject9() {
|
|
33
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: ", ";\n height: 24px;\n width: 24px;\n overflow: hidden;\n display: flex;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
34
|
+
|
|
35
|
+
_templateObject9 = function _templateObject9() {
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function _templateObject8() {
|
|
43
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 24px;\n width: 24px;\n margin-right: ", ";\n"]);
|
|
44
|
+
|
|
45
|
+
_templateObject8 = function _templateObject8() {
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _templateObject7() {
|
|
53
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n"]);
|
|
54
|
+
|
|
55
|
+
_templateObject7 = function _templateObject7() {
|
|
56
|
+
return data;
|
|
57
|
+
};
|
|
31
58
|
|
|
32
|
-
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
33
61
|
|
|
34
62
|
function _templateObject6() {
|
|
35
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
63
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
|
|
36
64
|
|
|
37
65
|
_templateObject6 = function _templateObject6() {
|
|
38
66
|
return data;
|
|
@@ -42,7 +70,7 @@ function _templateObject6() {
|
|
|
42
70
|
}
|
|
43
71
|
|
|
44
72
|
function _templateObject5() {
|
|
45
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
73
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-right: ", ";\n\n ", "\n"]);
|
|
46
74
|
|
|
47
75
|
_templateObject5 = function _templateObject5() {
|
|
48
76
|
return data;
|
|
@@ -52,7 +80,7 @@ function _templateObject5() {
|
|
|
52
80
|
}
|
|
53
81
|
|
|
54
82
|
function _templateObject4() {
|
|
55
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction:
|
|
83
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n opacity: 1;\n height: calc(48px - 4px - 4px);\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n border-color: ", ";\n background-color: ", ";\n padding: 4px;\n margin-top: ", ";\n"]);
|
|
56
84
|
|
|
57
85
|
_templateObject4 = function _templateObject4() {
|
|
58
86
|
return data;
|
|
@@ -62,7 +90,7 @@ function _templateObject4() {
|
|
|
62
90
|
}
|
|
63
91
|
|
|
64
92
|
function _templateObject3() {
|
|
65
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
93
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-direction: column;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
66
94
|
|
|
67
95
|
_templateObject3 = function _templateObject3() {
|
|
68
96
|
return data;
|
|
@@ -72,7 +100,7 @@ function _templateObject3() {
|
|
|
72
100
|
}
|
|
73
101
|
|
|
74
102
|
function _templateObject2() {
|
|
75
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
103
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
76
104
|
|
|
77
105
|
_templateObject2 = function _templateObject2() {
|
|
78
106
|
return data;
|
|
@@ -82,7 +110,7 @@ function _templateObject2() {
|
|
|
82
110
|
}
|
|
83
111
|
|
|
84
112
|
function _templateObject() {
|
|
85
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
113
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
86
114
|
|
|
87
115
|
_templateObject = function _templateObject() {
|
|
88
116
|
return data;
|
|
@@ -92,7 +120,9 @@ function _templateObject() {
|
|
|
92
120
|
}
|
|
93
121
|
|
|
94
122
|
var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
95
|
-
var
|
|
123
|
+
var label = _ref.label,
|
|
124
|
+
helperText = _ref.helperText,
|
|
125
|
+
value = _ref.value,
|
|
96
126
|
onChange = _ref.onChange,
|
|
97
127
|
_ref$disabled = _ref.disabled,
|
|
98
128
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -100,19 +130,19 @@ var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
|
100
130
|
options = _ref$options === void 0 ? [] : _ref$options,
|
|
101
131
|
margin = _ref.margin,
|
|
102
132
|
_ref$multiple = _ref.multiple,
|
|
103
|
-
multiple = _ref$multiple === void 0 ? false : _ref$multiple
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}, [customTheme]);
|
|
133
|
+
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
|
134
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
135
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
136
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
108
137
|
|
|
109
138
|
var _useState = (0, _react.useState)(multiple ? [] : null),
|
|
110
139
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
111
140
|
selectedValue = _useState2[0],
|
|
112
141
|
setSelectedValue = _useState2[1];
|
|
113
142
|
|
|
114
|
-
|
|
115
|
-
|
|
143
|
+
var _useState3 = (0, _react.useState)("toggle-group-".concat((0, _uuid.v4)())),
|
|
144
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 1),
|
|
145
|
+
toggleGroupId = _useState4[0];
|
|
116
146
|
|
|
117
147
|
var handleToggleChange = function handleToggleChange(selectedOption) {
|
|
118
148
|
var newSelectedOptions;
|
|
@@ -131,20 +161,25 @@ var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
|
131
161
|
}
|
|
132
162
|
|
|
133
163
|
setSelectedValue(newSelectedOptions);
|
|
134
|
-
} else
|
|
135
|
-
setSelectedValue(selectedOption === selectedValue ? null : selectedOption);
|
|
136
|
-
}
|
|
164
|
+
} else setSelectedValue(selectedOption === selectedValue ? null : selectedOption);
|
|
137
165
|
} else if (multiple) {
|
|
138
166
|
newSelectedOptions = value.map(function (v) {
|
|
139
167
|
return v;
|
|
140
168
|
});
|
|
141
|
-
;
|
|
142
|
-
newSelectedOptions.push(selectedOption);
|
|
143
|
-
}
|
|
144
169
|
|
|
145
|
-
|
|
146
|
-
|
|
170
|
+
if (newSelectedOptions.includes(selectedOption)) {
|
|
171
|
+
var _index = newSelectedOptions.indexOf(selectedOption);
|
|
172
|
+
|
|
173
|
+
newSelectedOptions.splice(_index, 1);
|
|
174
|
+
} else newSelectedOptions.push(selectedOption);
|
|
147
175
|
}
|
|
176
|
+
|
|
177
|
+
typeof onChange === "function" && onChange(multiple ? newSelectedOptions : selectedOption);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
var handleKeyPress = function handleKeyPress(event, optionValue) {
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) handleToggleChange(optionValue);
|
|
148
183
|
};
|
|
149
184
|
|
|
150
185
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
@@ -152,25 +187,71 @@ var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
|
152
187
|
}, _react["default"].createElement(ToggleGroup, {
|
|
153
188
|
margin: margin,
|
|
154
189
|
disabled: disabled
|
|
155
|
-
}, _react["default"].createElement(
|
|
190
|
+
}, _react["default"].createElement(Label, {
|
|
191
|
+
htmlFor: toggleGroupId,
|
|
192
|
+
disabled: disabled
|
|
193
|
+
}, label), _react["default"].createElement(HelperText, {
|
|
194
|
+
disabled: disabled
|
|
195
|
+
}, helperText), _react["default"].createElement(OptionsContainer, {
|
|
196
|
+
id: toggleGroupId,
|
|
197
|
+
role: multiple ? "group" : "radiogroup"
|
|
198
|
+
}, options.map(function (option, i) {
|
|
156
199
|
return _react["default"].createElement(ToggleContainer, {
|
|
157
200
|
selected: multiple ? value ? value.includes(option.value) : selectedValue.includes(option.value) : value ? option.value === value : option.value === selectedValue,
|
|
201
|
+
role: multiple ? "switch" : "radio",
|
|
202
|
+
"aria-checked": multiple ? value ? value.includes(option.value) : selectedValue.includes(option.value) : value ? option.value === value : option.value === selectedValue,
|
|
203
|
+
tabIndex: !disabled ? tabIndex : -1,
|
|
158
204
|
onClick: function onClick() {
|
|
159
205
|
return !disabled && handleToggleChange(option.value);
|
|
160
206
|
},
|
|
161
207
|
isFirst: i === 0,
|
|
162
208
|
isLast: i === options.length - 1,
|
|
163
|
-
isIcon: option.iconSrc,
|
|
209
|
+
isIcon: option.iconSrc || option.icon,
|
|
210
|
+
optionLabel: option.label,
|
|
164
211
|
disabled: disabled,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
212
|
+
onKeyPress: function onKeyPress(event) {
|
|
213
|
+
handleKeyPress(event, option.value);
|
|
214
|
+
},
|
|
215
|
+
key: "toggle-".concat(i, "-").concat(option.label)
|
|
216
|
+
}, _react["default"].createElement(OptionContent, null, option.icon && _react["default"].createElement(IconContainer, {
|
|
217
|
+
optionLabel: option.label
|
|
218
|
+
}, (0, _typeof2["default"])(option.icon) === "object" ? option.icon : _react["default"].createElement(option.icon)), option.iconSrc && _react["default"].createElement(Icon, {
|
|
219
|
+
src: option.iconSrc,
|
|
220
|
+
optionLabel: option.label
|
|
221
|
+
}), option.label && _react["default"].createElement(LabelContainer, null, option.label)));
|
|
169
222
|
}))));
|
|
170
223
|
};
|
|
171
224
|
|
|
172
|
-
var
|
|
173
|
-
return props.
|
|
225
|
+
var Label = _styledComponents["default"].label(_templateObject(), function (props) {
|
|
226
|
+
return props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor;
|
|
227
|
+
}, function (props) {
|
|
228
|
+
return props.theme.labelFontFamily;
|
|
229
|
+
}, function (props) {
|
|
230
|
+
return props.theme.labelFontSize;
|
|
231
|
+
}, function (props) {
|
|
232
|
+
return props.theme.labelFontStyle;
|
|
233
|
+
}, function (props) {
|
|
234
|
+
return props.theme.labelFontWeight;
|
|
235
|
+
}, function (props) {
|
|
236
|
+
return props.theme.labelLineHeight;
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
var HelperText = _styledComponents["default"].span(_templateObject2(), function (props) {
|
|
240
|
+
return props.disabled ? props.theme.disabledHelperTextFontcolor : props.theme.helperTextFontColor;
|
|
241
|
+
}, function (props) {
|
|
242
|
+
return props.theme.helperTextFontFamily;
|
|
243
|
+
}, function (props) {
|
|
244
|
+
return props.theme.helperTextFontSize;
|
|
245
|
+
}, function (props) {
|
|
246
|
+
return props.theme.helperTextFontStyle;
|
|
247
|
+
}, function (props) {
|
|
248
|
+
return props.theme.helperTextFontWeight;
|
|
249
|
+
}, function (props) {
|
|
250
|
+
return props.theme.helperTextLineHeight;
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
var ToggleGroup = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
254
|
+
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
174
255
|
}, function (props) {
|
|
175
256
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
176
257
|
}, function (props) {
|
|
@@ -179,31 +260,59 @@ var ToggleGroup = _styledComponents["default"].div(_templateObject(), function (
|
|
|
179
260
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
180
261
|
}, function (props) {
|
|
181
262
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
182
|
-
}, function (props) {
|
|
183
|
-
return props.disabled && "opacity: ".concat(props.theme.disabledOpacity, ";");
|
|
184
263
|
});
|
|
185
264
|
|
|
186
|
-
var
|
|
265
|
+
var OptionsContainer = _styledComponents["default"].div(_templateObject4(), function (props) {
|
|
266
|
+
return props.theme.containerBorderThickness;
|
|
267
|
+
}, function (props) {
|
|
268
|
+
return props.theme.containerBorderStyle;
|
|
269
|
+
}, function (props) {
|
|
270
|
+
return props.theme.containerBorderRadius;
|
|
271
|
+
}, function (props) {
|
|
272
|
+
return props.theme.containerBorderColor;
|
|
273
|
+
}, function (props) {
|
|
274
|
+
return props.theme.containerBackgroundColor;
|
|
275
|
+
}, function (props) {
|
|
276
|
+
return props.theme.containerMarginTop;
|
|
277
|
+
});
|
|
187
278
|
|
|
188
|
-
var
|
|
279
|
+
var ToggleContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
280
|
+
return !props.isLast && "4px";
|
|
281
|
+
}, function (props) {
|
|
282
|
+
return "\n background-color: ".concat(props.selected ? props.disabled ? props.theme.selectedDisabledBackgroundColor : props.theme.selectedBackgroundColor : props.disabled ? props.theme.unselectedDisabledBackgroundColor : props.theme.unselectedBackgroundColor, ";\n border-width: ").concat(props.theme.optionBorderThickness, ";\n border-style: ").concat(props.theme.optionBorderStyle, ";\n border-radius: ").concat(props.theme.optionBorderRadius, ";\n padding-left: ").concat(props.optionLabel && props.isIcon || props.optionLabel && !props.isIcon ? props.theme.labelPaddingLeft : props.theme.iconPaddingLeft, ";\n padding-right: ").concat(props.optionLabel && props.isIcon || props.optionLabel && !props.isIcon ? props.theme.labelPaddingRight : props.theme.iconPaddingRight, ";\n ").concat(!props.disabled ? ":hover {\n background-color: ".concat(props.selected ? props.theme.selectedHoverBackgroundColor : props.theme.unselectedHoverBackgroundColor, ";\n }\n :active {\n background-color: ").concat(props.selected ? props.theme.selectedActiveBackgroundColor : props.theme.unselectedActiveBackgroundColor, ";\n color: #ffffff;\n } \n :focus {\n border-color: transparent;\n box-shadow: 0 0 0 ").concat(props.theme.optionFocusBorderThickness, " ").concat(props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor, ";\n }\n &:focus-visible {\n outline: none;\n }\n cursor: pointer;\n color: ").concat(props.selected ? props.theme.selectedFontColor : props.theme.unselectedFontColor, ";\n") : "color: ".concat(props.selected ? props.theme.selectedDisabledFontColor : props.theme.unselectedDisabledFontColor, ";\n cursor: not-allowed;"), "\n ");
|
|
283
|
+
});
|
|
189
284
|
|
|
190
|
-
var
|
|
191
|
-
return
|
|
285
|
+
var LabelContainer = _styledComponents["default"].span(_templateObject6(), function (props) {
|
|
286
|
+
return props.theme.optionLabelFontFamily;
|
|
287
|
+
}, function (props) {
|
|
288
|
+
return props.theme.optionLabelFontSize;
|
|
289
|
+
}, function (props) {
|
|
290
|
+
return props.theme.optionLabelFontStyle;
|
|
291
|
+
}, function (props) {
|
|
292
|
+
return props.theme.optionLabelFontWeight;
|
|
192
293
|
});
|
|
193
294
|
|
|
194
|
-
var
|
|
295
|
+
var OptionContent = _styledComponents["default"].div(_templateObject7());
|
|
195
296
|
|
|
196
|
-
var
|
|
297
|
+
var Icon = _styledComponents["default"].img(_templateObject8(), function (props) {
|
|
298
|
+
return props.optionLabel && props.theme.iconMarginRight;
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
var IconContainer = _styledComponents["default"].div(_templateObject9(), function (props) {
|
|
302
|
+
return props.optionLabel && props.theme.iconMarginRight;
|
|
303
|
+
});
|
|
197
304
|
|
|
198
305
|
DxcToggleGroup.propTypes = {
|
|
199
|
-
|
|
200
|
-
|
|
306
|
+
label: _propTypes["default"].string,
|
|
307
|
+
helperText: _propTypes["default"].string,
|
|
308
|
+
value: _propTypes["default"].any,
|
|
201
309
|
onChange: _propTypes["default"].func,
|
|
202
310
|
disabled: _propTypes["default"].bool,
|
|
203
311
|
multiple: _propTypes["default"].bool,
|
|
204
312
|
options: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
205
313
|
value: _propTypes["default"].any.isRequired,
|
|
206
|
-
label: _propTypes["default"].
|
|
314
|
+
label: _propTypes["default"].string,
|
|
315
|
+
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
207
316
|
iconSrc: _propTypes["default"].string
|
|
208
317
|
})),
|
|
209
318
|
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
@@ -211,7 +320,8 @@ DxcToggleGroup.propTypes = {
|
|
|
211
320
|
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
212
321
|
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
213
322
|
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
214
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
323
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
324
|
+
tabIndex: _propTypes["default"].number
|
|
215
325
|
};
|
|
216
326
|
var _default = DxcToggleGroup;
|
|
217
327
|
exports["default"] = _default;
|
package/dist/upload/Upload.js
CHANGED
|
@@ -21,8 +21,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
21
|
|
|
22
22
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
23
23
|
|
|
24
|
-
require("../common/OpenSans.css");
|
|
25
|
-
|
|
26
24
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
25
|
|
|
28
26
|
var _DragAndDropArea = _interopRequireDefault(require("./dragAndDropArea/DragAndDropArea"));
|
|
@@ -34,7 +32,7 @@ var _Transactions = _interopRequireDefault(require("./transactions/Transactions"
|
|
|
34
32
|
var _variables = require("../common/variables.js");
|
|
35
33
|
|
|
36
34
|
function _templateObject() {
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
35
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-width: 100%;\n height: 400px;\n box-shadow: 0px 3px 6px #00000029;\n border-radius: 4px;\n display: flex;\n flex-direction: row;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
38
36
|
|
|
39
37
|
_templateObject = function _templateObject() {
|
|
40
38
|
return data;
|
|
@@ -43,9 +41,11 @@ function _templateObject() {
|
|
|
43
41
|
return data;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
var
|
|
44
|
+
var V3DxcUpload = function V3DxcUpload(_ref) {
|
|
47
45
|
var callbackUpload = _ref.callbackUpload,
|
|
48
|
-
margin = _ref.margin
|
|
46
|
+
margin = _ref.margin,
|
|
47
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
48
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
49
49
|
|
|
50
50
|
var _useState = (0, _react.useState)([]),
|
|
51
51
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -160,28 +160,33 @@ var DxcUpload = function DxcUpload(_ref) {
|
|
|
160
160
|
return _react["default"].createElement(DXCUpload, {
|
|
161
161
|
margin: margin
|
|
162
162
|
}, transactionFiles && transactionFiles.length !== 0 && _react["default"].createElement(_Transactions["default"], {
|
|
163
|
+
tabIndexValue: tabIndex,
|
|
163
164
|
transactions: transactionFiles
|
|
164
165
|
}), filesToUpload && filesToUpload.length === 0 && transactionFiles && transactionFiles.length === 0 && _react["default"].createElement(_DragAndDropArea["default"], {
|
|
165
166
|
dashed: false,
|
|
166
|
-
addFile: onDragHandler
|
|
167
|
+
addFile: onDragHandler,
|
|
168
|
+
tabIndexValue: tabIndex
|
|
167
169
|
}) || filesToUpload && filesToUpload.length === 0 && transactionFiles && transactionFiles.length !== 0 && _react["default"].createElement(_DragAndDropArea["default"], {
|
|
168
170
|
dashed: true,
|
|
169
|
-
addFile: onDragHandler
|
|
171
|
+
addFile: onDragHandler,
|
|
172
|
+
tabIndexValue: tabIndex
|
|
170
173
|
}), filesToUpload && filesToUpload.length !== 0 && _react["default"].createElement(_FilesToUpload["default"], {
|
|
171
174
|
filesToUpload: filesToUpload,
|
|
172
175
|
addFile: onDragHandler,
|
|
173
|
-
onUpload: onUploadHandler
|
|
176
|
+
onUpload: onUploadHandler,
|
|
177
|
+
tabIndexValue: tabIndex
|
|
174
178
|
}));
|
|
175
179
|
};
|
|
176
180
|
|
|
177
|
-
|
|
181
|
+
V3DxcUpload.propTypes = {
|
|
178
182
|
callbackUpload: _propTypes["default"].func,
|
|
179
183
|
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
180
184
|
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
181
185
|
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
182
186
|
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
183
187
|
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
184
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
188
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
189
|
+
tabIndex: _propTypes["default"].number
|
|
185
190
|
};
|
|
186
191
|
|
|
187
192
|
var DXCUpload = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
@@ -196,5 +201,5 @@ var DXCUpload = _styledComponents["default"].div(_templateObject(), function (pr
|
|
|
196
201
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
197
202
|
});
|
|
198
203
|
|
|
199
|
-
var _default =
|
|
204
|
+
var _default = V3DxcUpload;
|
|
200
205
|
exports["default"] = _default;
|