@dxc-technology/halstack-react 0.0.0-e345e78 → 0.0.0-e3e5511
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/BackgroundColorContext.js +46 -0
- package/ThemeContext.js +250 -0
- package/V3Select/V3Select.js +549 -0
- package/V3Select/index.d.ts +27 -0
- package/V3Textarea/V3Textarea.js +264 -0
- package/V3Textarea/index.d.ts +27 -0
- package/accordion/Accordion.js +353 -0
- package/accordion/index.d.ts +28 -0
- package/accordion-group/AccordionGroup.js +186 -0
- package/accordion-group/index.d.ts +16 -0
- package/alert/Alert.js +403 -0
- package/alert/index.d.ts +51 -0
- package/badge/Badge.js +63 -0
- package/{dist/box → box}/Box.js +31 -23
- package/box/index.d.ts +25 -0
- package/button/Button.js +238 -0
- package/button/Button.stories.js +27 -0
- package/button/index.d.ts +24 -0
- package/{dist/card → card}/Card.js +72 -35
- package/card/index.d.ts +22 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +107 -32
- package/checkbox/index.d.ts +24 -0
- package/chip/Chip.js +265 -0
- package/chip/index.d.ts +22 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +2 -8
- package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/common/utils.js +22 -0
- package/common/variables.js +1574 -0
- package/{dist/date → date}/Date.js +81 -59
- package/date/index.d.ts +27 -0
- package/date-input/DateInput.js +400 -0
- package/date-input/index.d.ts +95 -0
- package/{dist/dialog → dialog}/Dialog.js +61 -36
- package/dialog/index.d.ts +18 -0
- package/dropdown/Dropdown.js +544 -0
- package/dropdown/index.d.ts +26 -0
- package/file-input/FileInput.js +644 -0
- package/file-input/FileItem.js +287 -0
- package/file-input/index.d.ts +81 -0
- package/{dist/footer → footer}/Footer.js +122 -47
- package/footer/Icons.js +77 -0
- package/footer/index.d.ts +25 -0
- package/header/Header.js +470 -0
- package/header/Icons.js +59 -0
- package/header/index.d.ts +25 -0
- package/{dist/heading → heading}/Heading.js +93 -22
- package/heading/index.d.ts +17 -0
- package/input-text/Icons.js +22 -0
- package/input-text/InputText.js +705 -0
- package/input-text/index.d.ts +36 -0
- package/layout/ApplicationLayout.js +327 -0
- package/layout/Icons.js +55 -0
- package/link/Link.js +237 -0
- package/link/index.d.ts +23 -0
- package/main.d.ts +40 -0
- package/{dist/main.js → main.js} +112 -16
- package/number-input/NumberInput.js +136 -0
- package/{dist/ThemeContext.js → number-input/NumberInputContext.js} +3 -2
- package/number-input/index.d.ts +113 -0
- package/package.json +31 -19
- package/paginator/Icons.js +66 -0
- package/paginator/Paginator.js +305 -0
- package/paginator/index.d.ts +20 -0
- package/password-input/PasswordInput.js +203 -0
- package/password-input/index.d.ts +94 -0
- package/{dist/progress-bar → progress-bar}/ProgressBar.js +97 -44
- package/progress-bar/index.d.ts +18 -0
- package/{dist/radio → radio}/Radio.js +39 -21
- package/radio/index.d.ts +23 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +93 -69
- package/resultsetTable/index.d.ts +19 -0
- package/select/Select.js +1137 -0
- package/select/index.d.ts +131 -0
- package/sidenav/Sidenav.js +179 -0
- package/sidenav/index.d.ts +13 -0
- package/slider/Slider.js +404 -0
- package/slider/index.d.ts +29 -0
- package/spinner/Spinner.js +381 -0
- package/spinner/index.d.ts +17 -0
- package/{dist/switch → switch}/Switch.js +52 -25
- package/switch/index.d.ts +24 -0
- package/table/Table.js +132 -0
- package/table/index.d.ts +13 -0
- package/tabs/Tabs.js +343 -0
- package/tabs/index.d.ts +19 -0
- package/{dist/tag → tag}/Tag.js +100 -35
- package/tag/index.d.ts +24 -0
- package/text-input/TextInput.js +974 -0
- package/text-input/index.d.ts +135 -0
- package/textarea/Textarea.js +369 -0
- package/textarea/index.d.ts +117 -0
- package/{dist/toggle → toggle}/Toggle.js +16 -19
- package/toggle/index.d.ts +21 -0
- package/toggle-group/ToggleGroup.js +327 -0
- package/toggle-group/index.d.ts +21 -0
- package/{dist/upload → upload}/Upload.js +13 -8
- package/{dist/upload → upload}/buttons-upload/ButtonsUpload.js +35 -25
- package/upload/buttons-upload/Icons.js +40 -0
- package/{dist/upload → upload}/dragAndDropArea/DragAndDropArea.js +84 -37
- package/upload/dragAndDropArea/Icons.js +39 -0
- package/upload/file-upload/FileToUpload.js +189 -0
- package/upload/file-upload/Icons.js +66 -0
- package/{dist/upload → upload}/files-upload/FilesToUpload.js +16 -16
- package/upload/index.d.ts +15 -0
- package/upload/transaction/Icons.js +160 -0
- package/upload/transaction/Transaction.js +148 -0
- package/{dist/upload → upload}/transactions/Transactions.js +38 -20
- package/useTheme.js +22 -0
- package/wizard/Icons.js +65 -0
- package/wizard/Wizard.js +405 -0
- package/wizard/index.d.ts +18 -0
- package/README.md +0 -66
- package/babel.config.js +0 -4
- package/dist/accordion/Accordion.js +0 -264
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/alert/Alert.js +0 -302
- 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.js +0 -183
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/chip/Chip.js +0 -170
- package/dist/common/services/example-service.js +0 -10
- package/dist/common/services/example-service.test.js +0 -12
- package/dist/common/utils.js +0 -42
- package/dist/common/variables.js +0 -260
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.js +0 -412
- 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.js +0 -350
- 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_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.js +0 -519
- 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/link/Link.js +0 -136
- package/dist/link/readme.md +0 -51
- package/dist/paginator/Paginator.js +0 -178
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/select/Select.js +0 -442
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/sidenav/Sidenav.js +0 -217
- package/dist/sidenav/arrow_icon.svg +0 -3
- package/dist/slider/Slider.js +0 -258
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -196
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/table/Table.js +0 -84
- package/dist/tabs/Tabs.js +0 -170
- package/dist/tabs/Tabs.stories.js +0 -130
- package/dist/tabs/readme.md +0 -78
- package/dist/tabs-for-sections/TabsForSections.js +0 -107
- package/dist/tabs-for-sections/readme.md +0 -78
- package/dist/textarea/Textarea.js +0 -226
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
- package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
- package/dist/upload/file-upload/FileToUpload.js +0 -158
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/Transaction.js +0 -155
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/wizard/Wizard.js +0 -310
- package/dist/wizard/invalid_icon.svg +0 -6
- package/dist/wizard/valid_icon.svg +0 -6
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/Accordion.test.js +0 -33
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -393
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -130
- package/test/Footer.test.js +0 -99
- package/test/Header.test.js +0 -39
- package/test/Heading.test.js +0 -35
- package/test/InputText.test.js +0 -236
- package/test/Link.test.js +0 -25
- package/test/Paginator.test.js +0 -165
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -282
- package/test/Select.test.js +0 -191
- package/test/Sidenav.test.js +0 -87
- package/test/Slider.test.js +0 -65
- package/test/Spinner.test.js +0 -27
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -88
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextArea.test.js +0 -52
- package/test/Toggle.test.js +0 -43
- package/test/Upload.test.js +0 -60
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
|
@@ -11,21 +11,17 @@ exports["default"] = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
13
|
|
|
14
|
-
var _react =
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
16
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
17
|
|
|
18
|
-
require("../../common/OpenSans.css");
|
|
19
|
-
|
|
20
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
|
|
22
20
|
var _FileToUpload = _interopRequireDefault(require("../file-upload/FileToUpload"));
|
|
23
21
|
|
|
24
22
|
var _ButtonsUpload = _interopRequireDefault(require("../buttons-upload/ButtonsUpload"));
|
|
25
23
|
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var _ThemeContext = _interopRequireDefault(require("../../ThemeContext.js"));
|
|
24
|
+
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
29
25
|
|
|
30
26
|
function _templateObject2() {
|
|
31
27
|
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 83%;\n overflow: auto;\n margin-top: 2px;\n ::-webkit-scrollbar {\n width: 3px;\n }\n ::-webkit-scrollbar-track {\n border-radius: 3px;\n background-color: ", ";\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: ", ";\n }\n"]);
|
|
@@ -38,7 +34,7 @@ function _templateObject2() {
|
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
function _templateObject() {
|
|
41
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
37
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n padding: 20px;\n border-radius: 4px 4px 0px 4px;\n box-shadow: 0px 0px 1px ", ";\n background-color: ", ";\n"]);
|
|
42
38
|
|
|
43
39
|
_templateObject = function _templateObject() {
|
|
44
40
|
return data;
|
|
@@ -50,9 +46,9 @@ function _templateObject() {
|
|
|
50
46
|
var DxcFilesToUpload = function DxcFilesToUpload(_ref) {
|
|
51
47
|
var filesToUpload = _ref.filesToUpload,
|
|
52
48
|
onUpload = _ref.onUpload,
|
|
53
|
-
addFile = _ref.addFile
|
|
54
|
-
|
|
55
|
-
var colorsTheme = (0,
|
|
49
|
+
addFile = _ref.addFile,
|
|
50
|
+
tabIndexValue = _ref.tabIndexValue;
|
|
51
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
56
52
|
|
|
57
53
|
var handleDrag = function handleDrag(e) {
|
|
58
54
|
e.preventDefault();
|
|
@@ -84,7 +80,7 @@ var DxcFilesToUpload = function DxcFilesToUpload(_ref) {
|
|
|
84
80
|
};
|
|
85
81
|
|
|
86
82
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
87
|
-
theme: colorsTheme
|
|
83
|
+
theme: colorsTheme.upload
|
|
88
84
|
}, _react["default"].createElement(DXCFilesToUpload, {
|
|
89
85
|
onDrop: handleDrop,
|
|
90
86
|
onDragEnter: handleDragIn,
|
|
@@ -95,11 +91,13 @@ var DxcFilesToUpload = function DxcFilesToUpload(_ref) {
|
|
|
95
91
|
name: fileToUpload.name,
|
|
96
92
|
type: fileToUpload.type,
|
|
97
93
|
image: fileToUpload.image,
|
|
98
|
-
onDelete: fileToUpload.deleteFile
|
|
94
|
+
onDelete: fileToUpload.deleteFile,
|
|
95
|
+
tabIndexValue: tabIndexValue
|
|
99
96
|
});
|
|
100
97
|
})), _react["default"].createElement(_ButtonsUpload["default"], {
|
|
101
98
|
addFile: addFile,
|
|
102
|
-
onUpload: onUpload
|
|
99
|
+
onUpload: onUpload,
|
|
100
|
+
tabIndex: tabIndexValue
|
|
103
101
|
})));
|
|
104
102
|
};
|
|
105
103
|
|
|
@@ -110,13 +108,15 @@ DxcFilesToUpload.propTypes = {
|
|
|
110
108
|
};
|
|
111
109
|
|
|
112
110
|
var DXCFilesToUpload = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
113
|
-
return props.theme.
|
|
111
|
+
return props.theme.shadowColor;
|
|
112
|
+
}, function (props) {
|
|
113
|
+
return props.theme.backgroundColor;
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
var FilesToUpload = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
117
|
-
return props.theme.
|
|
117
|
+
return props.theme.scrollBarTrackColor;
|
|
118
118
|
}, function (props) {
|
|
119
|
-
return props.theme.
|
|
119
|
+
return props.theme.scrollBarThumbColor;
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
var _default = DxcFilesToUpload;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
callbackUpload?: void;
|
|
11
|
+
margin?: Space | Margin;
|
|
12
|
+
tabIndex?: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default function DxcUpload(props: Props): JSX.Element;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.audioIconError = exports.videoIconError = exports.imageIconError = exports.defaultIconError = exports.audioIcon = exports.videoIcon = exports.imageIcon = exports.defaultIcon = exports.errorIcon = exports.successIcon = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var successIcon = _react["default"].createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: "24",
|
|
15
|
+
height: "24",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "#50B50F"
|
|
18
|
+
}, _react["default"].createElement("path", {
|
|
19
|
+
fill: "none",
|
|
20
|
+
d: "M0 0h24v24H0z"
|
|
21
|
+
}), _react["default"].createElement("path", {
|
|
22
|
+
d: "M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
exports.successIcon = successIcon;
|
|
26
|
+
|
|
27
|
+
var errorIcon = _react["default"].createElement("svg", {
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
+
width: "24",
|
|
30
|
+
height: "24",
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
fill: "#D0011B"
|
|
33
|
+
}, _react["default"].createElement("path", {
|
|
34
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
35
|
+
}), _react["default"].createElement("path", {
|
|
36
|
+
d: "M0 0h24v24H0z",
|
|
37
|
+
fill: "none"
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
exports.errorIcon = errorIcon;
|
|
41
|
+
|
|
42
|
+
var defaultIcon = _react["default"].createElement("svg", {
|
|
43
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
44
|
+
width: "24",
|
|
45
|
+
height: "24",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "#D9D9D9"
|
|
48
|
+
}, _react["default"].createElement("path", {
|
|
49
|
+
d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"
|
|
50
|
+
}), _react["default"].createElement("path", {
|
|
51
|
+
d: "M0 0h24v24H0z",
|
|
52
|
+
fill: "none"
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
exports.defaultIcon = defaultIcon;
|
|
56
|
+
|
|
57
|
+
var imageIcon = _react["default"].createElement("svg", {
|
|
58
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
+
width: "24",
|
|
60
|
+
height: "24",
|
|
61
|
+
viewBox: "0 0 24 24",
|
|
62
|
+
fill: "#D9D9D9"
|
|
63
|
+
}, _react["default"].createElement("path", {
|
|
64
|
+
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"
|
|
65
|
+
}), _react["default"].createElement("path", {
|
|
66
|
+
d: "M0 0h24v24H0z",
|
|
67
|
+
fill: "none"
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
exports.imageIcon = imageIcon;
|
|
71
|
+
|
|
72
|
+
var videoIcon = _react["default"].createElement("svg", {
|
|
73
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
74
|
+
width: "24",
|
|
75
|
+
height: "24",
|
|
76
|
+
viewBox: "0 0 24 24",
|
|
77
|
+
fill: "#D9D9D9"
|
|
78
|
+
}, _react["default"].createElement("path", {
|
|
79
|
+
d: "M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"
|
|
80
|
+
}), _react["default"].createElement("path", {
|
|
81
|
+
d: "M0 0h24v24H0z",
|
|
82
|
+
fill: "none"
|
|
83
|
+
}));
|
|
84
|
+
|
|
85
|
+
exports.videoIcon = videoIcon;
|
|
86
|
+
|
|
87
|
+
var audioIcon = _react["default"].createElement("svg", {
|
|
88
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
89
|
+
width: "24",
|
|
90
|
+
height: "24",
|
|
91
|
+
viewBox: "0 0 24 24",
|
|
92
|
+
fill: "#D9D9D9"
|
|
93
|
+
}, _react["default"].createElement("path", {
|
|
94
|
+
fill: "none",
|
|
95
|
+
d: "M0 0h24v24H0V0z"
|
|
96
|
+
}), _react["default"].createElement("path", {
|
|
97
|
+
d: "M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"
|
|
98
|
+
}));
|
|
99
|
+
|
|
100
|
+
exports.audioIcon = audioIcon;
|
|
101
|
+
|
|
102
|
+
var defaultIconError = _react["default"].createElement("svg", {
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
width: "24",
|
|
105
|
+
height: "24",
|
|
106
|
+
viewBox: "0 0 24 24",
|
|
107
|
+
fill: "#D0011B"
|
|
108
|
+
}, _react["default"].createElement("path", {
|
|
109
|
+
d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"
|
|
110
|
+
}), _react["default"].createElement("path", {
|
|
111
|
+
d: "M0 0h24v24H0z",
|
|
112
|
+
fill: "none"
|
|
113
|
+
}));
|
|
114
|
+
|
|
115
|
+
exports.defaultIconError = defaultIconError;
|
|
116
|
+
|
|
117
|
+
var imageIconError = _react["default"].createElement("svg", {
|
|
118
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
119
|
+
width: "24",
|
|
120
|
+
height: "24",
|
|
121
|
+
viewBox: "0 0 24 24",
|
|
122
|
+
fill: "#D0011B"
|
|
123
|
+
}, _react["default"].createElement("path", {
|
|
124
|
+
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"
|
|
125
|
+
}), _react["default"].createElement("path", {
|
|
126
|
+
d: "M0 0h24v24H0z",
|
|
127
|
+
fill: "none"
|
|
128
|
+
}));
|
|
129
|
+
|
|
130
|
+
exports.imageIconError = imageIconError;
|
|
131
|
+
|
|
132
|
+
var videoIconError = _react["default"].createElement("svg", {
|
|
133
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
134
|
+
width: "24",
|
|
135
|
+
height: "24",
|
|
136
|
+
viewBox: "0 0 24 24",
|
|
137
|
+
fill: "#D0011B"
|
|
138
|
+
}, _react["default"].createElement("path", {
|
|
139
|
+
d: "M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"
|
|
140
|
+
}), _react["default"].createElement("path", {
|
|
141
|
+
d: "M0 0h24v24H0z",
|
|
142
|
+
fill: "none"
|
|
143
|
+
}));
|
|
144
|
+
|
|
145
|
+
exports.videoIconError = videoIconError;
|
|
146
|
+
|
|
147
|
+
var audioIconError = _react["default"].createElement("svg", {
|
|
148
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
149
|
+
width: "24",
|
|
150
|
+
height: "24",
|
|
151
|
+
viewBox: "0 0 24 24",
|
|
152
|
+
fill: "#D0011B"
|
|
153
|
+
}, _react["default"].createElement("path", {
|
|
154
|
+
fill: "none",
|
|
155
|
+
d: "M0 0h24v24H0V0z"
|
|
156
|
+
}), _react["default"].createElement("path", {
|
|
157
|
+
d: "M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"
|
|
158
|
+
}));
|
|
159
|
+
|
|
160
|
+
exports.audioIconError = audioIconError;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
+
|
|
20
|
+
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
21
|
+
|
|
22
|
+
var _Icons = require("./Icons");
|
|
23
|
+
|
|
24
|
+
var _Spinner = _interopRequireDefault(require("../../spinner/Spinner"));
|
|
25
|
+
|
|
26
|
+
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
27
|
+
|
|
28
|
+
var _BackgroundColorContext = require("../../BackgroundColorContext.js");
|
|
29
|
+
|
|
30
|
+
function _templateObject5() {
|
|
31
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n width: 80%;\n"]);
|
|
32
|
+
|
|
33
|
+
_templateObject5 = function _templateObject5() {
|
|
34
|
+
return data;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function _templateObject4() {
|
|
41
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 25px;\n height: 20px;\n max-width: 20%;\n"]);
|
|
42
|
+
|
|
43
|
+
_templateObject4 = function _templateObject4() {
|
|
44
|
+
return data;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _templateObject3() {
|
|
51
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-right: 16px;\n width: 80%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"]);
|
|
52
|
+
|
|
53
|
+
_templateObject3 = function _templateObject3() {
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _templateObject2() {
|
|
61
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n mask-size: ", ";\n height: ", ";\n width: ", ";\n margin-right: 16px;\n max-width: 20%;\n & svg {\n fill: ", ";\n }\n"]);
|
|
62
|
+
|
|
63
|
+
_templateObject2 = function _templateObject2() {
|
|
64
|
+
return data;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return data;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function _templateObject() {
|
|
71
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n max-width: 100%;\n display: flex;\n flex-direction: row;\n margin-bottom: 16px;\n color: ", ";\n .MuiCircularProgress-root {\n width: 28px !important;\n height: 28px !important;\n }\n"]);
|
|
72
|
+
|
|
73
|
+
_templateObject = function _templateObject() {
|
|
74
|
+
return data;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return data;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
var DxcTransaction = function DxcTransaction(_ref) {
|
|
81
|
+
var _ref$name = _ref.name,
|
|
82
|
+
name = _ref$name === void 0 ? "" : _ref$name,
|
|
83
|
+
_ref$type = _ref.type,
|
|
84
|
+
type = _ref$type === void 0 ? "" : _ref$type,
|
|
85
|
+
_ref$status = _ref.status,
|
|
86
|
+
status = _ref$status === void 0 ? "" : _ref$status,
|
|
87
|
+
_ref$message = _ref.message,
|
|
88
|
+
message = _ref$message === void 0 ? "" : _ref$message;
|
|
89
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
90
|
+
|
|
91
|
+
var icon = status === "error" && (type.includes("image") && _Icons.imageIconError || type.includes("video") && _Icons.videoIconError || type.includes("audio") && _Icons.audioIconError || _Icons.defaultIconError) || type.includes("image") && _Icons.imageIcon || type.includes("video") && _Icons.videoIcon || type.includes("audio") && _Icons.audioIcon || _Icons.defaultIcon;
|
|
92
|
+
|
|
93
|
+
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
94
|
+
theme: colorsTheme.upload
|
|
95
|
+
}, _react["default"].createElement(DXCTransaction, {
|
|
96
|
+
status: status
|
|
97
|
+
}, _react["default"].createElement(FileImage, {
|
|
98
|
+
status: status
|
|
99
|
+
}, icon), status === "processing" && _react["default"].createElement(FileData, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
100
|
+
color: colorsTheme.upload.backgroundColor
|
|
101
|
+
}, _react["default"].createElement(_Spinner["default"], {
|
|
102
|
+
mode: "small"
|
|
103
|
+
}))) || status === "success" && _react["default"].createElement(FileData, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(FileStatus, null, _Icons.successIcon)) || status === "error" && _react["default"].createElement(FileData, null, _react["default"].createElement(_Tooltip["default"], {
|
|
104
|
+
title: message
|
|
105
|
+
}, _react["default"].createElement(FileName, null, name)), _react["default"].createElement(FileStatus, null, _Icons.errorIcon), " ")));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
DxcTransaction.propTypes = {
|
|
109
|
+
name: _propTypes["default"].string,
|
|
110
|
+
type: _propTypes["default"].string,
|
|
111
|
+
status: _propTypes["default"].string,
|
|
112
|
+
message: _propTypes["default"].string
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var DXCTransaction = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
116
|
+
return props.theme.fontFamily;
|
|
117
|
+
}, function (props) {
|
|
118
|
+
return props.status === "error" && props.theme.errorColor;
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
var FileImage = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
122
|
+
return "".concat(props.theme.uploadedFileIconSize, " ").concat(props.theme.uploadedFileIconSize);
|
|
123
|
+
}, function (props) {
|
|
124
|
+
return props.theme.uploadedFileIconSize;
|
|
125
|
+
}, function (props) {
|
|
126
|
+
return props.theme.uploadedFileIconSize;
|
|
127
|
+
}, function (props) {
|
|
128
|
+
return props.status === "error" && props.theme.errorColor || props.theme.uploadedFileIconColor;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
var FileName = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
132
|
+
return props.theme.fileNameFontSize;
|
|
133
|
+
}, function (props) {
|
|
134
|
+
return props.theme.fileNameFontStyle;
|
|
135
|
+
}, function (props) {
|
|
136
|
+
return props.theme.fileNameFontWeight;
|
|
137
|
+
}, function (props) {
|
|
138
|
+
return props.theme.fileNameFontTextTransform;
|
|
139
|
+
}, function (props) {
|
|
140
|
+
return props.theme.fileNameFontColor;
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
var FileStatus = _styledComponents["default"].div(_templateObject4());
|
|
144
|
+
|
|
145
|
+
var FileData = _styledComponents["default"].div(_templateObject5());
|
|
146
|
+
|
|
147
|
+
var _default = DxcTransaction;
|
|
148
|
+
exports["default"] = _default;
|
|
@@ -11,22 +11,18 @@ exports["default"] = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
13
|
|
|
14
|
-
var _react =
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
16
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
17
|
|
|
18
|
-
require("../../common/OpenSans.css");
|
|
19
|
-
|
|
20
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
|
|
22
20
|
var _Transaction = _interopRequireDefault(require("../transaction/Transaction"));
|
|
23
21
|
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var _ThemeContext = _interopRequireDefault(require("../../ThemeContext.js"));
|
|
22
|
+
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
27
23
|
|
|
28
24
|
function _templateObject5() {
|
|
29
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-weight:
|
|
25
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"]);
|
|
30
26
|
|
|
31
27
|
_templateObject5 = function _templateObject5() {
|
|
32
28
|
return data;
|
|
@@ -36,7 +32,7 @@ function _templateObject5() {
|
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
function _templateObject4() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size:
|
|
35
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n"]);
|
|
40
36
|
|
|
41
37
|
_templateObject4 = function _templateObject4() {
|
|
42
38
|
return data;
|
|
@@ -46,7 +42,7 @@ function _templateObject4() {
|
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
function _templateObject3() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
45
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-bottom: 4px;\n"]);
|
|
50
46
|
|
|
51
47
|
_templateObject3 = function _templateObject3() {
|
|
52
48
|
return data;
|
|
@@ -66,7 +62,7 @@ function _templateObject2() {
|
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
function _templateObject() {
|
|
69
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family:
|
|
65
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n max-width: 100%;\n width: 35%;\n padding-top: 46px;\n padding-left: 65px;\n border-radius: 4px 0px 4px 4px;\n box-shadow: 0px 0px 1px ", ";\n background-color: ", ";\n overflow: auto;\n ::-webkit-scrollbar {\n width: 3px;\n height: 3px;\n }\n ::-webkit-scrollbar-track {\n border-radius: 3px;\n background-color: ", ";\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: ", ";\n }\n"]);
|
|
70
66
|
|
|
71
67
|
_templateObject = function _templateObject() {
|
|
72
68
|
return data;
|
|
@@ -77,11 +73,9 @@ function _templateObject() {
|
|
|
77
73
|
|
|
78
74
|
var DxcTransactions = function DxcTransactions(_ref) {
|
|
79
75
|
var transactions = _ref.transactions;
|
|
80
|
-
|
|
81
|
-
var colorsTheme = (0, _react.useContext)(_ThemeContext["default"]) || _variables.colors;
|
|
82
|
-
|
|
76
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
83
77
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
84
|
-
theme: colorsTheme
|
|
78
|
+
theme: colorsTheme.upload
|
|
85
79
|
}, _react["default"].createElement(DXCTransactions, null, _react["default"].createElement(TransactionsText, null, _react["default"].createElement(TransactionsTitle, null, "Files uploaded"), _react["default"].createElement(TransactionsSubTitle, null, _react["default"].createElement(TransactionsNumber, null, transactions && transactions.filter(function (file) {
|
|
86
80
|
return file.status === "success";
|
|
87
81
|
}).length), " ", "documents in total")), transactions.map(function (transaction) {
|
|
@@ -99,22 +93,46 @@ DxcTransactions.propTypes = {
|
|
|
99
93
|
};
|
|
100
94
|
|
|
101
95
|
var DXCTransactions = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
102
|
-
return props.theme.
|
|
96
|
+
return props.theme.fontFamily;
|
|
103
97
|
}, function (props) {
|
|
104
|
-
return props.theme.
|
|
98
|
+
return props.theme.shadowColor;
|
|
105
99
|
}, function (props) {
|
|
106
|
-
return props.theme.
|
|
100
|
+
return props.theme.backgroundColor;
|
|
101
|
+
}, function (props) {
|
|
102
|
+
return props.theme.scrollBarTrackColor;
|
|
103
|
+
}, function (props) {
|
|
104
|
+
return props.theme.scrollBarThumbColor;
|
|
107
105
|
});
|
|
108
106
|
|
|
109
107
|
var TransactionsText = _styledComponents["default"].span(_templateObject2());
|
|
110
108
|
|
|
111
|
-
var TransactionsTitle = _styledComponents["default"].span(_templateObject3())
|
|
109
|
+
var TransactionsTitle = _styledComponents["default"].span(_templateObject3(), function (props) {
|
|
110
|
+
return props.theme.uploadedFilesTitleFontSize;
|
|
111
|
+
}, function (props) {
|
|
112
|
+
return props.theme.uploadedFilesTitleFontStyle;
|
|
113
|
+
}, function (props) {
|
|
114
|
+
return props.theme.uploadedFilesTitleFontWeight;
|
|
115
|
+
}, function (props) {
|
|
116
|
+
return props.theme.uploadedFilesTitleFontTextTransform;
|
|
117
|
+
}, function (props) {
|
|
118
|
+
return props.theme.uploadedFilesTitleFontColor;
|
|
119
|
+
});
|
|
112
120
|
|
|
113
121
|
var TransactionsSubTitle = _styledComponents["default"].span(_templateObject4(), function (props) {
|
|
114
|
-
return props.theme.
|
|
122
|
+
return props.theme.uploadedFilesSubtitleFontSize;
|
|
123
|
+
}, function (props) {
|
|
124
|
+
return props.theme.uploadedFilesSubtitleFontStyle;
|
|
125
|
+
}, function (props) {
|
|
126
|
+
return props.theme.uploadedFilesSubtitleFontWeight;
|
|
127
|
+
}, function (props) {
|
|
128
|
+
return props.theme.uploadedFilesSubtitleFontTextTransform;
|
|
129
|
+
}, function (props) {
|
|
130
|
+
return props.theme.uploadedFilesSubtitleFontColor;
|
|
115
131
|
});
|
|
116
132
|
|
|
117
|
-
var TransactionsNumber = _styledComponents["default"].span(_templateObject5())
|
|
133
|
+
var TransactionsNumber = _styledComponents["default"].span(_templateObject5(), function (props) {
|
|
134
|
+
return props.theme.uploadedFilesNumberFontWeight;
|
|
135
|
+
});
|
|
118
136
|
|
|
119
137
|
var _default = DxcTransactions;
|
|
120
138
|
exports["default"] = _default;
|
package/useTheme.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
|
|
12
|
+
var _variables = require("./common/variables.js");
|
|
13
|
+
|
|
14
|
+
var _ThemeContext = _interopRequireDefault(require("./ThemeContext.js"));
|
|
15
|
+
|
|
16
|
+
var useTheme = function useTheme() {
|
|
17
|
+
var colorsTheme = (0, _react.useContext)(_ThemeContext["default"]);
|
|
18
|
+
return colorsTheme || _variables.componentTokens;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var _default = useTheme;
|
|
22
|
+
exports["default"] = _default;
|
package/wizard/Icons.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.validIcon = exports.invalidIcon = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var invalidIcon = _react["default"].createElement("svg", {
|
|
13
|
+
id: "highlight_off_black_18dp",
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
width: "18",
|
|
16
|
+
height: "18",
|
|
17
|
+
viewBox: "0 0 18 18"
|
|
18
|
+
}, _react["default"].createElement("path", {
|
|
19
|
+
id: "Path_2943",
|
|
20
|
+
"data-name": "Path 2943",
|
|
21
|
+
d: "M0,0H18V18H0Z",
|
|
22
|
+
fill: "none"
|
|
23
|
+
}), _react["default"].createElement("path", {
|
|
24
|
+
id: "Path_2944",
|
|
25
|
+
"data-name": "Path 2944",
|
|
26
|
+
d: "M10,4a6,6,0,1,0,6,6A6.01,6.01,0,0,0,10,4Zm3,7.945L11.945,13,10,11.06,8.059,13,7,11.945,8.944,10,7,8.059,8.059,7,10,8.944,11.945,7,13,8.059,11.06,10Z",
|
|
27
|
+
transform: "translate(-1.002 -1.002)",
|
|
28
|
+
fill: "#ffe6e9"
|
|
29
|
+
}), _react["default"].createElement("path", {
|
|
30
|
+
id: "Path_2945",
|
|
31
|
+
"data-name": "Path 2945",
|
|
32
|
+
d: "M11.444,6.5,9.5,8.443,7.558,6.5,6.5,7.558,8.443,9.5,6.5,11.444,7.558,12.5,9.5,10.558,11.444,12.5,12.5,11.444,10.558,9.5,12.5,7.558ZM9.5,2A7.5,7.5,0,1,0,17,9.5,7.494,7.494,0,0,0,9.5,2Zm0,13.5a6,6,0,1,1,6-6A6.009,6.009,0,0,1,9.5,15.5Z",
|
|
33
|
+
transform: "translate(-0.501 -0.501)",
|
|
34
|
+
fill: "#d0011b"
|
|
35
|
+
}));
|
|
36
|
+
|
|
37
|
+
exports.invalidIcon = invalidIcon;
|
|
38
|
+
|
|
39
|
+
var validIcon = _react["default"].createElement("svg", {
|
|
40
|
+
id: "check_circle_black_18dp",
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
width: "18",
|
|
43
|
+
height: "18",
|
|
44
|
+
viewBox: "0 0 18 18"
|
|
45
|
+
}, _react["default"].createElement("path", {
|
|
46
|
+
id: "Path_2946",
|
|
47
|
+
"data-name": "Path 2946",
|
|
48
|
+
d: "M0,0H18V18H0Z",
|
|
49
|
+
fill: "none"
|
|
50
|
+
}), _react["default"].createElement("path", {
|
|
51
|
+
id: "Path_2947",
|
|
52
|
+
"data-name": "Path 2947",
|
|
53
|
+
d: "M9.986,4a5.986,5.986,0,1,0,5.986,5.986A5.994,5.994,0,0,0,9.986,4Zm-1.5,9.727L5.5,10.734,6.551,9.679l1.938,1.93L13.42,6.679l1.055,1.063Z",
|
|
54
|
+
transform: "translate(-0.986 -0.986)",
|
|
55
|
+
fill: "#eafaef",
|
|
56
|
+
opacity: "0.999"
|
|
57
|
+
}), _react["default"].createElement("path", {
|
|
58
|
+
id: "Path_2948",
|
|
59
|
+
"data-name": "Path 2948",
|
|
60
|
+
d: "M9.493,2a7.493,7.493,0,1,0,7.493,7.493A7.5,7.5,0,0,0,9.493,2Zm0,13.487a5.994,5.994,0,1,1,5.994-5.994A6,6,0,0,1,9.493,15.487Zm3.439-9.306L7.994,11.119,6.054,9.186,5,10.242l3,3,5.994-5.994Z",
|
|
61
|
+
transform: "translate(-0.493 -0.493)",
|
|
62
|
+
fill: "#24a148"
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
exports.validIcon = validIcon;
|