@dxc-technology/halstack-react 0.0.0-eb2a4cc → 0.0.0-ebb089f
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/README.md +2 -2
- package/babel.config.js +5 -2
- package/dist/BackgroundColorContext.js +46 -0
- package/dist/ThemeContext.js +237 -2
- package/dist/V3Select/V3Select.js +549 -0
- package/dist/V3Select/index.d.ts +27 -0
- package/dist/V3Textarea/V3Textarea.js +264 -0
- package/dist/V3Textarea/index.d.ts +27 -0
- package/dist/accordion/Accordion.js +170 -81
- package/dist/accordion/index.d.ts +28 -0
- package/dist/accordion-group/AccordionGroup.js +186 -0
- package/dist/accordion-group/index.d.ts +16 -0
- package/dist/alert/Alert.js +184 -83
- package/dist/alert/index.d.ts +51 -0
- package/dist/badge/Badge.js +63 -0
- package/dist/box/Box.js +31 -23
- package/dist/box/index.d.ts +25 -0
- package/dist/button/Button.js +84 -29
- package/dist/button/Button.stories.js +14 -211
- package/dist/button/index.d.ts +24 -0
- package/dist/card/Card.js +72 -35
- package/dist/card/index.d.ts +22 -0
- package/dist/checkbox/Checkbox.js +107 -32
- package/dist/checkbox/index.d.ts +24 -0
- package/dist/chip/Chip.js +135 -40
- package/dist/chip/index.d.ts +22 -0
- package/dist/common/RequiredComponent.js +2 -8
- package/dist/common/utils.js +2 -22
- package/dist/common/variables.js +1472 -159
- package/dist/date/Date.js +81 -59
- package/dist/date/index.d.ts +27 -0
- package/dist/date-input/DateInput.js +400 -0
- package/dist/date-input/index.d.ts +95 -0
- package/dist/dialog/Dialog.js +61 -36
- package/dist/dialog/index.d.ts +18 -0
- package/dist/dropdown/Dropdown.js +226 -94
- package/dist/dropdown/index.d.ts +26 -0
- package/dist/file-input/FileInput.js +644 -0
- package/dist/file-input/FileItem.js +287 -0
- package/dist/file-input/index.d.ts +81 -0
- package/dist/footer/Footer.js +122 -47
- package/dist/footer/Icons.js +77 -0
- package/dist/footer/index.d.ts +25 -0
- package/dist/header/Header.js +211 -91
- package/dist/header/Icons.js +59 -0
- package/dist/header/index.d.ts +25 -0
- package/dist/heading/Heading.js +93 -22
- package/dist/heading/index.d.ts +17 -0
- package/dist/input-text/Icons.js +22 -0
- package/dist/input-text/InputText.js +290 -104
- package/dist/input-text/index.d.ts +36 -0
- package/dist/layout/ApplicationLayout.js +327 -0
- package/dist/layout/Icons.js +55 -0
- package/dist/link/Link.js +136 -35
- package/dist/link/index.d.ts +23 -0
- package/dist/main.d.ts +40 -0
- package/dist/main.js +112 -16
- 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/Icons.js +66 -0
- package/dist/paginator/Paginator.js +184 -57
- package/dist/paginator/index.d.ts +20 -0
- package/dist/password-input/PasswordInput.js +203 -0
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +97 -44
- package/dist/progress-bar/index.d.ts +18 -0
- package/dist/radio/Radio.js +39 -21
- package/dist/radio/index.d.ts +23 -0
- package/dist/resultsetTable/ResultsetTable.js +93 -69
- package/dist/resultsetTable/index.d.ts +19 -0
- package/dist/select/Select.js +957 -262
- package/dist/select/index.d.ts +131 -0
- package/dist/sidenav/Sidenav.js +87 -125
- package/dist/sidenav/index.d.ts +13 -0
- package/dist/slider/Slider.js +219 -73
- package/dist/slider/index.d.ts +29 -0
- package/dist/spinner/Spinner.js +249 -64
- package/dist/spinner/index.d.ts +17 -0
- package/dist/switch/Switch.js +51 -26
- package/dist/switch/index.d.ts +24 -0
- package/dist/table/Table.js +63 -15
- package/dist/table/index.d.ts +13 -0
- package/dist/tabs/Tabs.js +208 -35
- package/dist/tabs/index.d.ts +19 -0
- package/dist/tag/Tag.js +100 -35
- package/dist/tag/index.d.ts +24 -0
- package/dist/text-input/TextInput.js +974 -0
- package/dist/text-input/index.d.ts +135 -0
- package/dist/textarea/Textarea.js +250 -107
- package/dist/textarea/index.d.ts +117 -0
- package/dist/toggle/Toggle.js +16 -19
- package/dist/toggle/index.d.ts +21 -0
- package/dist/toggle-group/ToggleGroup.js +327 -0
- package/dist/toggle-group/index.d.ts +21 -0
- package/dist/upload/Upload.js +13 -8
- package/dist/upload/buttons-upload/ButtonsUpload.js +35 -25
- package/dist/upload/buttons-upload/Icons.js +40 -0
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +84 -37
- package/dist/upload/dragAndDropArea/Icons.js +39 -0
- package/dist/upload/file-upload/FileToUpload.js +64 -33
- package/dist/upload/file-upload/Icons.js +66 -0
- package/dist/upload/files-upload/FilesToUpload.js +16 -16
- package/dist/upload/index.d.ts +15 -0
- package/dist/upload/transaction/Icons.js +160 -0
- package/dist/upload/transaction/Transaction.js +42 -49
- package/dist/upload/transactions/Transactions.js +38 -20
- package/dist/useTheme.js +22 -0
- package/dist/wizard/Icons.js +65 -0
- package/dist/wizard/Wizard.js +156 -61
- package/dist/wizard/index.d.ts +18 -0
- package/package.json +26 -14
- package/test/AccordionGroup.test.js +125 -0
- package/test/Date.test.js +15 -13
- package/test/DateInput.test.js +242 -0
- package/test/Dropdown.test.js +19 -4
- package/test/FileInput.test.js +201 -0
- package/test/Footer.test.js +2 -7
- package/test/Header.test.js +5 -10
- package/test/Heading.test.js +60 -12
- package/test/InputText.test.js +31 -28
- package/test/Link.test.js +25 -7
- package/test/NumberInput.test.js +259 -0
- package/test/Paginator.test.js +76 -60
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +65 -17
- package/test/Select.test.js +869 -132
- package/test/Sidenav.test.js +22 -64
- package/test/Slider.test.js +24 -15
- package/test/Spinner.test.js +5 -0
- package/test/Tabs.test.js +21 -0
- package/test/TextInput.test.js +731 -0
- package/test/Textarea.test.js +193 -0
- package/test/ToggleGroup.test.js +85 -0
- package/test/Upload.test.js +1 -1
- package/test/V3Select.test.js +212 -0
- 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/readme.md +0 -93
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/common/services/example-service.js +0 -10
- package/dist/common/services/example-service.test.js +0 -12
- 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.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_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/link/readme.md +0 -51
- 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.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/slider/readme.md +0 -64
- 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/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/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/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/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/invalid_icon.svg +0 -6
- package/dist/wizard/valid_icon.svg +0 -6
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/TabsForSections.test.js +0 -34
- package/test/Toggle.test.js +0 -43
|
@@ -11,10 +11,10 @@ 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"));
|
|
@@ -29,24 +29,64 @@ var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
|
|
|
29
29
|
|
|
30
30
|
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
31
31
|
|
|
32
|
-
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
33
|
-
|
|
34
32
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
35
33
|
|
|
36
|
-
require("../common/OpenSans.css");
|
|
37
|
-
|
|
38
34
|
var _Popper = _interopRequireDefault(require("@material-ui/core/Popper"));
|
|
39
35
|
|
|
36
|
+
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
37
|
+
|
|
40
38
|
var _variables = require("../common/variables.js");
|
|
41
39
|
|
|
42
40
|
var _utils = require("../common/utils.js");
|
|
43
41
|
|
|
44
|
-
var
|
|
42
|
+
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
43
|
+
|
|
44
|
+
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
45
|
+
|
|
46
|
+
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
|
|
47
|
+
|
|
48
|
+
function _templateObject10() {
|
|
49
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n position: relative;\n height: auto;\n width: ", ";\n\n .MuiTextField-root {\n width: 100%;\n font-family: ", ";\n\n .MuiFormHelperText-root {\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", " !important;\n margin-top: 6px;\n }\n\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-left: ", ";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n\n transform: ", ";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\n\n & + div,\n & + div + p {\n color: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n & + div::before {\n border-color: ", ";\n }\n & + div + p {\n color: ", ";\n }\n }\n }\n\n .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n font-family: ", ";\n\n &::before {\n border-bottom: ", ";\n }\n\n &:not(.Mui-error)::before,\n &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n\n &::after {\n border-bottom: ", ";\n }\n\n &.Mui-error {\n &::before {\n border-width: ", ";\n border-color: ", ";\n }\n &::after {\n transform: scaleX(0);\n }\n }\n\n &.Mui-focused {\n &::after {\n border-width: calc(", " + 1px);\n border-color: ", ";\n }\n &.Mui-error::after {\n border-color: ", ";\n }\n }\n\n &.Mui-disabled {\n cursor: not-allowed;\n\n &::before {\n border-bottom: ", ";\n border-bottom-style: solid;\n }\n }\n\n .MuiInputBase-input {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-left: ", ";\n text-overflow: ellipsis;\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n\n .MuiInputAdornment-root {\n height: 20px;\n\n &.MuiInputAdornment-positionEnd {\n & > p {\n font-family: ", ";\n margin-right: 8px;\n margin-bottom: 1px;\n }\n }\n &.Mui-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n }\n\n &:hover:not(.Mui-disabled):before &:hover:not(.Mui-error):before {\n border-bottom-color: ", ";\n }\n }\n\n & > p {\n &.Mui-error {\n color: ", " !important;\n }\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n }\n"]);
|
|
50
|
+
|
|
51
|
+
_templateObject10 = function _templateObject10() {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function _templateObject9() {
|
|
59
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n"]);
|
|
60
|
+
|
|
61
|
+
_templateObject9 = function _templateObject9() {
|
|
62
|
+
return data;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return data;
|
|
66
|
+
}
|
|
45
67
|
|
|
46
|
-
|
|
68
|
+
function _templateObject8() {
|
|
69
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n color: ", ";\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
70
|
+
|
|
71
|
+
_templateObject8 = function _templateObject8() {
|
|
72
|
+
return data;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function _templateObject7() {
|
|
79
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n top: 23px;\n left: 0;\n max-height: 20px;\n max-width: 20px;\n margin-right: 8px;\n width: 20px;\n opacity: ", ";\n ", ";\n"]);
|
|
80
|
+
|
|
81
|
+
_templateObject7 = function _templateObject7() {
|
|
82
|
+
return data;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
return data;
|
|
86
|
+
}
|
|
47
87
|
|
|
48
88
|
function _templateObject6() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
89
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n font-weight: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n max-height: 20px;\n max-width: 20px;\n opacity: ", ";\n z-index: 1;\n ", ";\n"]);
|
|
50
90
|
|
|
51
91
|
_templateObject6 = function _templateObject6() {
|
|
52
92
|
return data;
|
|
@@ -56,7 +96,7 @@ function _templateObject6() {
|
|
|
56
96
|
}
|
|
57
97
|
|
|
58
98
|
function _templateObject5() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n top:
|
|
99
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n width: 20px;\n max-height: 20px;\n max-width: 20px;\n color: ", ";\n z-index: 1;\n opacity: ", ";\n ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
60
100
|
|
|
61
101
|
_templateObject5 = function _templateObject5() {
|
|
62
102
|
return data;
|
|
@@ -66,7 +106,7 @@ function _templateObject5() {
|
|
|
66
106
|
}
|
|
67
107
|
|
|
68
108
|
function _templateObject4() {
|
|
69
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n
|
|
109
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 20px;\n left: 0px;\n max-height: 20px;\n max-width: 20px;\n z-index: 1;\n opacity: ", ";\n ", ";\n"]);
|
|
70
110
|
|
|
71
111
|
_templateObject4 = function _templateObject4() {
|
|
72
112
|
return data;
|
|
@@ -76,7 +116,7 @@ function _templateObject4() {
|
|
|
76
116
|
}
|
|
77
117
|
|
|
78
118
|
function _templateObject3() {
|
|
79
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
119
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n .MuiPaper-root {\n max-height: 250px;\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n overflow: auto;\n\n ::-webkit-scrollbar {\n width: 3px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n\n li {\n padding-bottom: ", ";\n padding-top: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n }\n"]);
|
|
80
120
|
|
|
81
121
|
_templateObject3 = function _templateObject3() {
|
|
82
122
|
return data;
|
|
@@ -86,7 +126,7 @@ function _templateObject3() {
|
|
|
86
126
|
}
|
|
87
127
|
|
|
88
128
|
function _templateObject2() {
|
|
89
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
129
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 1301;\n"]);
|
|
90
130
|
|
|
91
131
|
_templateObject2 = function _templateObject2() {
|
|
92
132
|
return data;
|
|
@@ -96,7 +136,7 @@ function _templateObject2() {
|
|
|
96
136
|
}
|
|
97
137
|
|
|
98
138
|
function _templateObject() {
|
|
99
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-left: 12px;\n"]);
|
|
139
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-left: 12px;\n color: red;\n"]);
|
|
100
140
|
|
|
101
141
|
_templateObject = function _templateObject() {
|
|
102
142
|
return data;
|
|
@@ -140,6 +180,8 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
140
180
|
prefix = _ref$prefix === void 0 ? "" : _ref$prefix,
|
|
141
181
|
_ref$suffix = _ref.suffix,
|
|
142
182
|
suffix = _ref$suffix === void 0 ? "" : _ref$suffix,
|
|
183
|
+
prefixIcon = _ref.prefixIcon,
|
|
184
|
+
suffixIcon = _ref.suffixIcon,
|
|
143
185
|
_ref$prefixIconSrc = _ref.prefixIconSrc,
|
|
144
186
|
prefixIconSrc = _ref$prefixIconSrc === void 0 ? "" : _ref$prefixIconSrc,
|
|
145
187
|
_ref$suffixIconSrc = _ref.suffixIconSrc,
|
|
@@ -161,7 +203,9 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
161
203
|
margin = _ref.margin,
|
|
162
204
|
_ref$size = _ref.size,
|
|
163
205
|
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
164
|
-
autocompleteOptions = _ref.autocompleteOptions
|
|
206
|
+
autocompleteOptions = _ref.autocompleteOptions,
|
|
207
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
208
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
165
209
|
|
|
166
210
|
var _useState = (0, _react.useState)(""),
|
|
167
211
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -193,10 +237,8 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
193
237
|
isError = _useState12[0],
|
|
194
238
|
changeIsError = _useState12[1];
|
|
195
239
|
|
|
196
|
-
var
|
|
197
|
-
var
|
|
198
|
-
return (0, _utils.getCustomTheme)(_variables.theme, (0, _utils.getCustomTheme)(_variables.defaultTheme, customTheme));
|
|
199
|
-
}, [customTheme]);
|
|
240
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
241
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
200
242
|
|
|
201
243
|
var changeValue = function changeValue(newValue) {
|
|
202
244
|
if (value === null || value === undefined) {
|
|
@@ -275,28 +317,80 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
275
317
|
}
|
|
276
318
|
};
|
|
277
319
|
|
|
320
|
+
var handleSuffixKeyPress = function handleSuffixKeyPress(event) {
|
|
321
|
+
event.preventDefault();
|
|
322
|
+
|
|
323
|
+
if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) {
|
|
324
|
+
onClickSuffix(event);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
var handlePrefixKeyPress = function handlePrefixKeyPress(event) {
|
|
329
|
+
event.preventDefault();
|
|
330
|
+
|
|
331
|
+
if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) {
|
|
332
|
+
onClickPrefix(event);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
var ThemedSuggestions = function ThemedSuggestions() {
|
|
337
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
338
|
+
return _react["default"].createElement(SuggestionsContainer, {
|
|
339
|
+
margin: margin,
|
|
340
|
+
size: size,
|
|
341
|
+
backgroundType: backgroundType
|
|
342
|
+
}, _react["default"].createElement(_Paper["default"], null, isOpen && !isSearching && !isError && filteredOptions.length === 0 && _react["default"].createElement(_MenuItem["default"], null, "No matches found."), isOpen && !isSearching && filteredOptions.length > 0 && filteredOptions.map(function (suggestion) {
|
|
343
|
+
return _react["default"].createElement(_MenuItem["default"], {
|
|
344
|
+
key: suggestion,
|
|
345
|
+
disableRipple: true,
|
|
346
|
+
onMouseDown: function onMouseDown(event) {
|
|
347
|
+
return event.preventDefault();
|
|
348
|
+
},
|
|
349
|
+
onClick: function onClick() {
|
|
350
|
+
return handlerSuggestionClicked(suggestion);
|
|
351
|
+
}
|
|
352
|
+
}, suggestion);
|
|
353
|
+
}), isSearching && _react["default"].createElement(_MenuItem["default"], null, "Searching..."), isError && _react["default"].createElement(_MenuItem["default"], null, "Error fetching data", _react["default"].createElement(ErrorIconContainer, null, _Icons["default"]))));
|
|
354
|
+
};
|
|
355
|
+
|
|
278
356
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
279
357
|
theme: colorsTheme.inputText
|
|
280
358
|
}, _react["default"].createElement(TextContainer, {
|
|
359
|
+
prefixIcon: prefixIcon,
|
|
281
360
|
prefixIconSrc: prefixIconSrc,
|
|
282
361
|
prefix: prefix,
|
|
283
362
|
required: required,
|
|
284
363
|
assistiveText: assistiveText,
|
|
285
364
|
margin: margin,
|
|
286
|
-
size: size
|
|
287
|
-
|
|
365
|
+
size: size,
|
|
366
|
+
backgroundType: backgroundType
|
|
367
|
+
}, prefixIcon ? _react["default"].createElement(PrefixIconContainer, {
|
|
368
|
+
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
369
|
+
disabled: disabled,
|
|
370
|
+
onClick: !disabled ? onClickPrefix : null,
|
|
371
|
+
interactuable: typeof onClickPrefix === "function" && !disabled,
|
|
372
|
+
backgroundType: backgroundType,
|
|
373
|
+
onKeyPress: handlePrefixKeyPress
|
|
374
|
+
}, (0, _typeof2["default"])(prefixIcon) === "object" ? prefixIcon : _react["default"].createElement(prefixIcon)) : prefixIconSrc && _react["default"].createElement(PrefixIcon, {
|
|
375
|
+
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
288
376
|
src: prefixIconSrc,
|
|
289
377
|
disabled: disabled,
|
|
290
|
-
onClick: onClickPrefix
|
|
291
|
-
|
|
378
|
+
onClick: !disabled ? onClickPrefix : null,
|
|
379
|
+
interactuable: typeof onClickPrefix === "function" && !disabled,
|
|
380
|
+
onKeyPress: handlePrefixKeyPress
|
|
381
|
+
}) || prefix && _react["default"].createElement(PrefixLabel, {
|
|
382
|
+
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
292
383
|
disabled: disabled,
|
|
293
|
-
onClick: onClickPrefix
|
|
384
|
+
onClick: !disabled ? onClickPrefix : null,
|
|
385
|
+
interactuable: typeof onClickPrefix === "function" && !disabled,
|
|
386
|
+
backgroundType: backgroundType,
|
|
387
|
+
onKeyPress: handlePrefixKeyPress
|
|
294
388
|
}, prefix), _react["default"].createElement(_TextField["default"], {
|
|
295
389
|
error: invalid,
|
|
296
390
|
value: value != null ? value : innerValue,
|
|
297
391
|
name: name,
|
|
298
392
|
disabled: disabled,
|
|
299
|
-
label: required ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_RequiredComponent["default"], null, label)
|
|
393
|
+
label: required ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_RequiredComponent["default"], null), label) : label,
|
|
300
394
|
helperText: assistiveText,
|
|
301
395
|
onChange: function onChange(event) {
|
|
302
396
|
return handlerInputChange(event);
|
|
@@ -308,16 +402,35 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
308
402
|
placeholder: placeholder,
|
|
309
403
|
type: isMasked ? "password" : "text",
|
|
310
404
|
InputProps: {
|
|
311
|
-
endAdornment: (suffix || suffixIconSrc) && _react["default"].createElement(_InputAdornment["default"], {
|
|
312
|
-
position: "end"
|
|
313
|
-
|
|
314
|
-
|
|
405
|
+
endAdornment: (suffix || suffixIconSrc || suffixIcon) && _react["default"].createElement(_InputAdornment["default"], {
|
|
406
|
+
position: "end"
|
|
407
|
+
}, suffixIcon ? _react["default"].createElement(SuffixIconContainer, {
|
|
408
|
+
tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
|
|
409
|
+
disabled: disabled,
|
|
410
|
+
onClick: onClickSuffix,
|
|
411
|
+
interactuable: typeof onClickSuffix === "function" && !disabled,
|
|
412
|
+
backgroundType: backgroundType,
|
|
413
|
+
onKeyPress: handleSuffixKeyPress
|
|
414
|
+
}, (0, _typeof2["default"])(suffixIcon) === "object" ? suffixIcon : _react["default"].createElement(suffixIcon)) : suffixIconSrc && _react["default"].createElement(SuffixIcon, {
|
|
415
|
+
tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
|
|
315
416
|
disabled: disabled,
|
|
316
417
|
src: suffixIconSrc,
|
|
317
|
-
onClick: onClickSuffix
|
|
318
|
-
|
|
418
|
+
onClick: onClickSuffix,
|
|
419
|
+
interactuable: typeof onClickSuffix === "function" && !disabled,
|
|
420
|
+
onKeyPress: handleSuffixKeyPress
|
|
421
|
+
}) || _react["default"].createElement(SuffixLabel, {
|
|
422
|
+
tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
|
|
423
|
+
onClick: onClickSuffix,
|
|
424
|
+
disabled: disabled,
|
|
425
|
+
interactuable: typeof onClickSuffix === "function" && !disabled,
|
|
426
|
+
backgroundType: backgroundType,
|
|
427
|
+
onKeyPress: handleSuffixKeyPress
|
|
428
|
+
}, suffix))
|
|
429
|
+
},
|
|
430
|
+
inputProps: {
|
|
431
|
+
tabIndex: tabIndex
|
|
319
432
|
}
|
|
320
|
-
})), _react["default"].createElement(
|
|
433
|
+
})), _react["default"].createElement(DxcSuggestions, {
|
|
321
434
|
open: isOpen,
|
|
322
435
|
anchorEl: anchorEl,
|
|
323
436
|
anchororigin: {
|
|
@@ -329,22 +442,9 @@ var DxcInputText = function DxcInputText(_ref) {
|
|
|
329
442
|
marginTop: "0px"
|
|
330
443
|
}
|
|
331
444
|
}
|
|
332
|
-
}, _react["default"].createElement(
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}, _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_Paper["default"], null, isOpen && !isSearching && !isError && filteredOptions.length === 0 && _react["default"].createElement(_MenuItem["default"], null, "No matches found."), isOpen && !isSearching && filteredOptions.length > 0 && filteredOptions.map(function (suggestion) {
|
|
336
|
-
return _react["default"].createElement(_MenuItem["default"], {
|
|
337
|
-
key: suggestion,
|
|
338
|
-
onMouseDown: function onMouseDown(event) {
|
|
339
|
-
return event.preventDefault();
|
|
340
|
-
},
|
|
341
|
-
onClick: function onClick() {
|
|
342
|
-
return handlerSuggestionClicked(suggestion);
|
|
343
|
-
}
|
|
344
|
-
}, suggestion);
|
|
345
|
-
}), isSearching && _react["default"].createElement(_MenuItem["default"], null, "Searching..."), isError && _react["default"].createElement(_MenuItem["default"], null, "Error fetching data", _react["default"].createElement(ErrorIcon, {
|
|
346
|
-
src: _error["default"]
|
|
347
|
-
})))))));
|
|
445
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
446
|
+
color: colorsTheme.inputText.optionBackgroundColor
|
|
447
|
+
}, _react["default"].createElement(ThemedSuggestions, null))));
|
|
348
448
|
};
|
|
349
449
|
|
|
350
450
|
var sizes = {
|
|
@@ -354,7 +454,7 @@ var sizes = {
|
|
|
354
454
|
fillParent: "100%"
|
|
355
455
|
};
|
|
356
456
|
|
|
357
|
-
var
|
|
457
|
+
var ErrorIconContainer = _styledComponents["default"].div(_templateObject());
|
|
358
458
|
|
|
359
459
|
var calculateWidth = function calculateWidth(margin, size) {
|
|
360
460
|
if (size === "fillParent") {
|
|
@@ -364,51 +464,115 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
364
464
|
return sizes[size];
|
|
365
465
|
};
|
|
366
466
|
|
|
367
|
-
var
|
|
467
|
+
var getCursor = function getCursor(interactuable, disabled) {
|
|
468
|
+
if (disabled) {
|
|
469
|
+
return "cursor:not-allowed;";
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (interactuable) {
|
|
473
|
+
return "cursor:pointer;";
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
return "cursor:default; outline:none;";
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
var DxcSuggestions = (0, _styledComponents["default"])(_Popper["default"])(_templateObject2());
|
|
480
|
+
|
|
481
|
+
var SuggestionsContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
368
482
|
return calculateWidth(props.margin, props.size);
|
|
483
|
+
}, function (props) {
|
|
484
|
+
return props.theme.optionBackgroundColor;
|
|
485
|
+
}, function (props) {
|
|
486
|
+
return props.theme.fontFamily;
|
|
487
|
+
}, function (props) {
|
|
488
|
+
return props.theme.optionFontSize;
|
|
489
|
+
}, function (props) {
|
|
490
|
+
return props.theme.optionFontStyle;
|
|
491
|
+
}, function (props) {
|
|
492
|
+
return props.theme.optionFontWeight;
|
|
493
|
+
}, function (props) {
|
|
494
|
+
return props.backgroundType === "dark" ? props.theme.optionFontColorOnDark : props.theme.optionFontColor;
|
|
495
|
+
}, function (props) {
|
|
496
|
+
return props.theme.optionBorderColor;
|
|
497
|
+
}, function (props) {
|
|
498
|
+
return props.theme.optionBorderThickness;
|
|
499
|
+
}, function (props) {
|
|
500
|
+
return props.theme.optionBorderStyle;
|
|
369
501
|
}, function (props) {
|
|
370
502
|
return props.theme.scrollBarTrackColor;
|
|
371
503
|
}, function (props) {
|
|
372
504
|
return props.theme.scrollBarThumbColor;
|
|
505
|
+
}, function (props) {
|
|
506
|
+
return props.theme.optionPaddingBottom;
|
|
507
|
+
}, function (props) {
|
|
508
|
+
return props.theme.optionPaddingTop;
|
|
373
509
|
}, function (props) {
|
|
374
510
|
return props.theme.hoverOptionColor;
|
|
375
511
|
}, function (props) {
|
|
376
|
-
return ""
|
|
512
|
+
return props.backgroundType === "dark" ? props.theme.hoverOptionBackgroundColorOnDark : props.theme.hoverOptionBackgroundColor;
|
|
513
|
+
}, function (props) {
|
|
514
|
+
return props.backgroundType === "dark" ? props.theme.selectedOptionBackgroundColorOnDark : props.theme.selectedOptionBackgroundColor;
|
|
377
515
|
});
|
|
378
516
|
|
|
379
|
-
var PrefixIcon = _styledComponents["default"].img(
|
|
517
|
+
var PrefixIcon = _styledComponents["default"].img(_templateObject4(), function (props) {
|
|
380
518
|
return props.disabled && 0.5 || 1;
|
|
381
519
|
}, function (props) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
520
|
+
return getCursor(props.interactuable, props.disabled);
|
|
521
|
+
});
|
|
385
522
|
|
|
386
|
-
|
|
523
|
+
var PrefixIconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
524
|
+
return props.backgroundType === "dark" ? props.theme.prefixIconColorOnDark : props.theme.prefixIconColor;
|
|
525
|
+
}, function (props) {
|
|
526
|
+
return props.disabled && 0.5 || 1;
|
|
527
|
+
}, function (props) {
|
|
528
|
+
return getCursor(props.interactuable, props.disabled);
|
|
387
529
|
});
|
|
388
530
|
|
|
389
|
-
var PrefixLabel = _styledComponents["default"].span(
|
|
390
|
-
return props.theme.
|
|
531
|
+
var PrefixLabel = _styledComponents["default"].span(_templateObject6(), function (props) {
|
|
532
|
+
return props.theme.prefixLabelFontWeight;
|
|
533
|
+
}, function (props) {
|
|
534
|
+
return props.theme.fontFamily;
|
|
535
|
+
}, function (props) {
|
|
536
|
+
return props.theme.prefixLabelFontSize;
|
|
537
|
+
}, function (props) {
|
|
538
|
+
return props.theme.prefixLabelFontStyle;
|
|
539
|
+
}, function (props) {
|
|
540
|
+
return props.backgroundType === "dark" ? props.theme.prefixLabelFontColorOnDark : props.theme.prefixLabelFontColor;
|
|
391
541
|
}, function (props) {
|
|
392
542
|
return props.disabled && 0.5 || 1;
|
|
393
543
|
}, function (props) {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
544
|
+
return getCursor(props.interactuable, props.disabled);
|
|
545
|
+
});
|
|
397
546
|
|
|
398
|
-
|
|
547
|
+
var SuffixIcon = _styledComponents["default"].img(_templateObject7(), function (props) {
|
|
548
|
+
return props.disabled && 0.5 || 1;
|
|
549
|
+
}, function (props) {
|
|
550
|
+
return getCursor(props.interactuable, props.disabled);
|
|
399
551
|
});
|
|
400
552
|
|
|
401
|
-
var
|
|
553
|
+
var SuffixIconContainer = _styledComponents["default"].div(_templateObject8(), function (props) {
|
|
554
|
+
return props.backgroundType === "dark" ? props.theme.suffixIconColorOnDark : props.theme.suffixIconColor;
|
|
555
|
+
}, function (props) {
|
|
402
556
|
return props.disabled && 0.5 || 1;
|
|
403
557
|
}, function (props) {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}
|
|
558
|
+
return getCursor(props.interactuable, props.disabled);
|
|
559
|
+
});
|
|
407
560
|
|
|
408
|
-
|
|
561
|
+
var SuffixLabel = _styledComponents["default"].span(_templateObject9(), function (props) {
|
|
562
|
+
return getCursor(props.interactuable, props.disabled);
|
|
563
|
+
}, function (props) {
|
|
564
|
+
return props.theme.suffixLabelFontWeight;
|
|
565
|
+
}, function (props) {
|
|
566
|
+
return props.theme.fontFamily;
|
|
567
|
+
}, function (props) {
|
|
568
|
+
return props.theme.suffixLabelFontSize;
|
|
569
|
+
}, function (props) {
|
|
570
|
+
return props.theme.suffixLabelFontStyle;
|
|
571
|
+
}, function (props) {
|
|
572
|
+
return props.backgroundType === "dark" ? props.theme.suffixLabelFontColorOnDark : props.theme.suffixLabelFontColor;
|
|
409
573
|
});
|
|
410
574
|
|
|
411
|
-
var TextContainer = _styledComponents["default"].div(
|
|
575
|
+
var TextContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
|
|
412
576
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
413
577
|
}, function (props) {
|
|
414
578
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
@@ -421,80 +585,101 @@ var TextContainer = _styledComponents["default"].div(_templateObject6(), functio
|
|
|
421
585
|
}, function (props) {
|
|
422
586
|
return calculateWidth(props.margin, props.size);
|
|
423
587
|
}, function (props) {
|
|
424
|
-
return props.theme.
|
|
588
|
+
return props.theme.fontFamily;
|
|
425
589
|
}, function (props) {
|
|
426
|
-
return props.theme.
|
|
590
|
+
return props.theme.assistiveTextFontWeight;
|
|
427
591
|
}, function (props) {
|
|
428
|
-
return
|
|
592
|
+
return props.theme.fontFamily;
|
|
429
593
|
}, function (props) {
|
|
430
|
-
return props.theme.
|
|
594
|
+
return props.theme.assistiveTextFontSize;
|
|
431
595
|
}, function (props) {
|
|
432
|
-
return props.
|
|
596
|
+
return props.theme.assistiveTextFontStyle;
|
|
433
597
|
}, function (props) {
|
|
434
|
-
return props.theme.
|
|
598
|
+
return props.backgroundType === "dark" ? props.theme.assistiveTextFontColorOnDark : props.theme.assistiveTextFontColor;
|
|
435
599
|
}, function (props) {
|
|
436
|
-
return props.theme.
|
|
600
|
+
return props.theme.labelFontSize;
|
|
437
601
|
}, function (props) {
|
|
438
|
-
return props.
|
|
602
|
+
return props.theme.labelFontStyle;
|
|
439
603
|
}, function (props) {
|
|
440
|
-
return props.theme.
|
|
604
|
+
return props.theme.labelFontWeight;
|
|
441
605
|
}, function (props) {
|
|
442
|
-
return props.theme.
|
|
606
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
443
607
|
}, function (props) {
|
|
444
|
-
return props.
|
|
608
|
+
return (props.prefixIconSrc || props.prefix || props.prefixIcon) && "32px" || "inherit";
|
|
445
609
|
}, function (props) {
|
|
446
|
-
return props.theme.
|
|
610
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
447
611
|
}, function (props) {
|
|
448
|
-
return props.theme.
|
|
612
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
449
613
|
}, function (props) {
|
|
450
|
-
return
|
|
614
|
+
return props.prefixIconSrc || props.prefixIcon || (props.prefix || props.suffix) && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
|
|
451
615
|
}, function (props) {
|
|
452
|
-
return
|
|
616
|
+
return props.theme.fontFamily;
|
|
453
617
|
}, function (props) {
|
|
454
|
-
return "
|
|
618
|
+
return props.prefixIcon && "translate(8px, 1.5px) scale(0.75);" || props.prefixIconSrc && "translate(8px, 1.5px) scale(0.75);" || props.prefix && "translate(8px, 1.5px) scale(0.75);" || "translate(0, 1.5px) scale(0.75);";
|
|
455
619
|
}, function (props) {
|
|
456
|
-
return props.theme.
|
|
620
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
457
621
|
}, function (props) {
|
|
458
|
-
return props.theme.
|
|
622
|
+
return props.theme.fontFamily;
|
|
459
623
|
}, function (props) {
|
|
460
|
-
return props.theme.
|
|
624
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
461
625
|
}, function (props) {
|
|
462
|
-
return props.theme.
|
|
626
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
463
627
|
}, function (props) {
|
|
464
|
-
return props.theme.
|
|
628
|
+
return props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor;
|
|
465
629
|
}, function (props) {
|
|
466
|
-
return "
|
|
630
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
467
631
|
}, function (props) {
|
|
468
|
-
return
|
|
632
|
+
return props.theme.fontFamily;
|
|
469
633
|
}, function (props) {
|
|
470
|
-
return props.theme.
|
|
634
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
471
635
|
}, function (props) {
|
|
472
|
-
return props.theme.
|
|
636
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
473
637
|
}, function (props) {
|
|
474
|
-
return props.theme.
|
|
638
|
+
return "calc(".concat(props.theme.underlineThickness, " + 1px) solid ").concat(props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor);
|
|
475
639
|
}, function (props) {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
return
|
|
640
|
+
return props.theme.underlineThickness;
|
|
641
|
+
}, function (props) {
|
|
642
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
643
|
+
}, function (props) {
|
|
644
|
+
return props.theme.underlineThickness;
|
|
645
|
+
}, function (props) {
|
|
646
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
647
|
+
}, function (props) {
|
|
648
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
649
|
+
}, function (props) {
|
|
650
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor, " !important");
|
|
651
|
+
}, function (props) {
|
|
652
|
+
return props.theme.valueFontSize;
|
|
653
|
+
}, function (props) {
|
|
654
|
+
return props.theme.valueFontStyle;
|
|
655
|
+
}, function (props) {
|
|
656
|
+
return props.theme.valueFontWeight;
|
|
657
|
+
}, function (props) {
|
|
658
|
+
return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
659
|
+
}, function (props) {
|
|
660
|
+
return (props.prefixIconSrc || props.prefix || props.prefixIcon) && "32px" || "inherit";
|
|
661
|
+
}, function (props) {
|
|
662
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
663
|
+
}, function (props) {
|
|
664
|
+
return props.theme.fontFamily;
|
|
481
665
|
}, function (props) {
|
|
482
|
-
return props.theme.
|
|
666
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
483
667
|
}, function (props) {
|
|
484
|
-
return props.theme.
|
|
668
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
485
669
|
}, function (props) {
|
|
486
|
-
return props.theme.
|
|
670
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
487
671
|
});
|
|
488
672
|
|
|
489
673
|
DxcInputText.propTypes = {
|
|
490
674
|
label: _propTypes["default"].string,
|
|
491
675
|
name: _propTypes["default"].string,
|
|
492
676
|
value: _propTypes["default"].string,
|
|
493
|
-
theme: _propTypes["default"].oneOf(["light", "dark", ""]),
|
|
494
677
|
assistiveText: _propTypes["default"].string,
|
|
495
678
|
disabled: _propTypes["default"].bool,
|
|
496
679
|
prefix: _propTypes["default"].string,
|
|
497
680
|
suffix: _propTypes["default"].string,
|
|
681
|
+
prefixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
682
|
+
suffixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
498
683
|
prefixIconSrc: _propTypes["default"].string,
|
|
499
684
|
suffixIconSrc: _propTypes["default"].string,
|
|
500
685
|
required: _propTypes["default"].bool,
|
|
@@ -513,7 +698,8 @@ DxcInputText.propTypes = {
|
|
|
513
698
|
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
514
699
|
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
515
700
|
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
516
|
-
autocompleteOptions: _propTypes["default"].any
|
|
701
|
+
autocompleteOptions: _propTypes["default"].any,
|
|
702
|
+
tabIndex: _propTypes["default"].number
|
|
517
703
|
};
|
|
518
704
|
var _default = DxcInputText;
|
|
519
705
|
exports["default"] = _default;
|