@dxc-technology/halstack-react 0.0.0-a25956f → 0.0.0-a3f5d07
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/{dist/BackgroundColorContext.js → BackgroundColorContext.js} +0 -0
- package/ThemeContext.js +250 -0
- package/{dist/select/Select.js → V3Select/V3Select.js} +193 -189
- package/V3Select/index.d.ts +27 -0
- package/{dist/textarea/Textarea.js → V3Textarea/V3Textarea.js} +30 -26
- package/V3Textarea/index.d.ts +27 -0
- package/{dist/accordion → accordion}/Accordion.js +72 -59
- package/accordion/index.d.ts +28 -0
- package/{dist/accordion-group → accordion-group}/AccordionGroup.js +1 -3
- package/accordion-group/index.d.ts +16 -0
- package/{dist/alert → alert}/Alert.js +126 -111
- package/alert/index.d.ts +51 -0
- package/{dist/badge → badge}/Badge.js +0 -0
- package/{dist/box → box}/Box.js +1 -9
- 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 +0 -0
- package/card/index.d.ts +22 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +33 -25
- package/checkbox/index.d.ts +24 -0
- package/{dist/chip → chip}/Chip.js +21 -25
- package/chip/index.d.ts +22 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +0 -0
- 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/{dist/common → common}/utils.js +0 -0
- package/common/variables.js +1567 -0
- package/{dist/date → date}/Date.js +17 -29
- 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 +21 -39
- package/dialog/index.d.ts +18 -0
- package/{dist/dropdown → dropdown}/Dropdown.js +123 -71
- 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 +69 -53
- package/footer/Icons.js +77 -0
- package/footer/index.d.ts +25 -0
- package/{dist/header → header}/Header.js +123 -84
- package/header/Icons.js +59 -0
- package/header/index.d.ts +25 -0
- package/{dist/heading → heading}/Heading.js +13 -5
- package/heading/index.d.ts +17 -0
- package/input-text/Icons.js +22 -0
- package/{dist/input-text → input-text}/InputText.js +97 -61
- package/input-text/index.d.ts +36 -0
- package/{dist/layout → layout}/ApplicationLayout.js +5 -9
- package/layout/Icons.js +55 -0
- package/{dist/link → link}/Link.js +23 -26
- package/link/index.d.ts +23 -0
- package/main.d.ts +40 -0
- package/{dist/main.js → main.js} +62 -14
- package/number-input/NumberInput.js +136 -0
- package/number-input/NumberInputContext.js +16 -0
- package/number-input/index.d.ts +113 -0
- package/package.json +23 -17
- package/paginator/Icons.js +66 -0
- package/{dist/paginator → paginator}/Paginator.js +60 -38
- 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 +63 -27
- package/progress-bar/index.d.ts +18 -0
- package/{dist/radio → radio}/Radio.js +0 -0
- package/radio/index.d.ts +23 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +5 -22
- package/resultsetTable/index.d.ts +19 -0
- package/select/Select.js +1138 -0
- package/select/index.d.ts +131 -0
- package/{dist/sidenav → sidenav}/Sidenav.js +11 -15
- package/sidenav/index.d.ts +13 -0
- package/{dist/slider → slider}/Slider.js +155 -66
- 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 +0 -0
- package/switch/index.d.ts +24 -0
- package/{dist/table → table}/Table.js +6 -2
- package/table/index.d.ts +13 -0
- package/{dist/tabs → tabs}/Tabs.js +0 -0
- package/tabs/index.d.ts +19 -0
- package/{dist/tag → tag}/Tag.js +38 -36
- package/tag/index.d.ts +24 -0
- package/text-input/TextInput.js +992 -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 +0 -0
- 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 +0 -0
- package/{dist/upload → upload}/buttons-upload/ButtonsUpload.js +13 -13
- package/upload/buttons-upload/Icons.js +40 -0
- package/{dist/upload → upload}/dragAndDropArea/DragAndDropArea.js +27 -23
- package/upload/dragAndDropArea/Icons.js +39 -0
- package/{dist/upload → upload}/file-upload/FileToUpload.js +29 -24
- package/upload/file-upload/Icons.js +66 -0
- package/{dist/upload → upload}/files-upload/FilesToUpload.js +0 -0
- package/upload/index.d.ts +15 -0
- package/upload/transaction/Icons.js +160 -0
- package/{dist/upload → upload}/transaction/Transaction.js +19 -42
- package/{dist/upload → upload}/transactions/Transactions.js +11 -11
- package/{dist/useTheme.js → useTheme.js} +0 -0
- package/wizard/Icons.js +65 -0
- package/{dist/wizard → wizard}/Wizard.js +85 -63
- package/wizard/index.d.ts +18 -0
- package/README.md +0 -66
- package/babel.config.js +0 -8
- package/dist/ThemeContext.js +0 -216
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/accordion-group/AccordionGroup.stories.js +0 -207
- package/dist/accordion-group/readme.md +0 -70
- 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 -228
- 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/common/variables.js +0 -1160
- 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_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/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- 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/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -214
- 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 -92
- 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/toggle-group/ToggleGroup.js +0 -241
- package/dist/toggle-group/readme.md +0 -82
- 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/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- 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 -240
- package/test/Link.test.js +0 -43
- package/test/Paginator.test.js +0 -177
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -330
- package/test/Select.test.js +0 -192
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -82
- 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 -109
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextArea.test.js +0 -52
- package/test/ToggleGroup.test.js +0 -81
- 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
|
@@ -15,8 +15,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
15
15
|
|
|
16
16
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
17
17
|
|
|
18
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
-
|
|
20
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
21
19
|
|
|
22
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -27,12 +25,12 @@ var _InputLabel = _interopRequireDefault(require("@material-ui/core/InputLabel")
|
|
|
27
25
|
|
|
28
26
|
var _FormControl = _interopRequireDefault(require("@material-ui/core/FormControl"));
|
|
29
27
|
|
|
28
|
+
var _FormHelperText = _interopRequireDefault(require("@material-ui/core/FormHelperText"));
|
|
29
|
+
|
|
30
30
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
31
31
|
|
|
32
32
|
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
33
33
|
|
|
34
|
-
var _styles = require("@material-ui/core/styles");
|
|
35
|
-
|
|
36
34
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
37
35
|
|
|
38
36
|
var _Checkbox = _interopRequireDefault(require("../checkbox/Checkbox"));
|
|
@@ -45,10 +43,30 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
|
45
43
|
|
|
46
44
|
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
47
45
|
|
|
48
|
-
var _BackgroundColorContext =
|
|
46
|
+
var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
|
|
47
|
+
|
|
48
|
+
function _templateObject10() {
|
|
49
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n\n .MuiFormControl-root {\n width: 100%;\n }\n\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n margin-top: 6px;\n\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n }\n }\n\n .MuiFormLabel-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n margin-top: -3px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n height: 22px;\n display: flex;\n align-items: center;\n\n &.Mui-disabled {\n color: ", ";\n }\n &.Mui-focused {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n }\n }\n\n .MuiSelect-select.MuiSelect-select {\n padding-right: unset;\n }\n\n .MuiSelect-select {\n width: 100%;\n height: 20px;\n display: flex;\n padding-right: 10px;\n align-items: center;\n\n :focus {\n background-color: transparent;\n outline: ", "\n auto 2px;\n }\n & > *:last-child::after {\n content: unset;\n }\n & > *:last-child::before {\n content: unset;\n }\n &.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n &:focus {\n outline: none;\n }\n }\n }\n .MuiInputBase-input {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n }\n .MuiInput-underline {\n &.Mui-focused {\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n }\n &.Mui-disabled:before {\n border-bottom-style: solid;\n }\n }\n .MuiInput-underline:hover:not(.Mui-disabled):before {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiInput-underline:after {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiInput-underline:before {\n border-bottom: ", " solid;\n border-bottom-color: ", ";\n }\n .MuiSelect-icon {\n color: ", " !important;\n }\n & label {\n text-overflow: ellipsis;\n overflow: hidden;\n width: calc(100% - 24px);\n }\n\n .MuiMenu-paper {\n background-color: ", ";\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.3);\n min-width: auto;\n width: auto;\n max-height: 250px;\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n\n &::-webkit-scrollbar {\n width: 3px;\n margin: 5px;\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 }\n .MuiList-root {\n width: auto !important;\n padding-right: 0 !important;\n }\n .MuiList-padding {\n padding-bottom: 0px;\n padding-top: 0px;\n }\n .MuiMenuItem-root {\n padding-bottom: ", ";\n padding-top: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:focus {\n outline: ", "\n auto 2px;\n outline-offset: -1px;\n }\n &.MuiListItem-root.Mui-selected {\n background-color: ", ";\n }\n & span.MuiButtonBase-root {\n // multiple checkbox\n padding: 0px;\n margin: 5px 0px;\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 color: ", ";\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
60
|
+
|
|
61
|
+
_templateObject9 = function _templateObject9() {
|
|
62
|
+
return data;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return data;
|
|
66
|
+
}
|
|
49
67
|
|
|
50
68
|
function _templateObject8() {
|
|
51
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n
|
|
69
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n"]);
|
|
52
70
|
|
|
53
71
|
_templateObject8 = function _templateObject8() {
|
|
54
72
|
return data;
|
|
@@ -58,7 +76,7 @@ function _templateObject8() {
|
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
function _templateObject7() {
|
|
61
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
79
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"]);
|
|
62
80
|
|
|
63
81
|
_templateObject7 = function _templateObject7() {
|
|
64
82
|
return data;
|
|
@@ -68,7 +86,7 @@ function _templateObject7() {
|
|
|
68
86
|
}
|
|
69
87
|
|
|
70
88
|
function _templateObject6() {
|
|
71
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
89
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content: ", ";\n margin-right: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n width: ", ";\n\n &::before {\n margin: 0 4px;\n ", ";\n }\n &::after {\n margin: 0 4px;\n ", ";\n }\n"]);
|
|
72
90
|
|
|
73
91
|
_templateObject6 = function _templateObject6() {
|
|
74
92
|
return data;
|
|
@@ -78,7 +96,7 @@ function _templateObject6() {
|
|
|
78
96
|
}
|
|
79
97
|
|
|
80
98
|
function _templateObject5() {
|
|
81
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
99
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
|
|
82
100
|
|
|
83
101
|
_templateObject5 = function _templateObject5() {
|
|
84
102
|
return data;
|
|
@@ -88,7 +106,7 @@ function _templateObject5() {
|
|
|
88
106
|
}
|
|
89
107
|
|
|
90
108
|
function _templateObject4() {
|
|
91
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
109
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n"]);
|
|
92
110
|
|
|
93
111
|
_templateObject4 = function _templateObject4() {
|
|
94
112
|
return data;
|
|
@@ -98,7 +116,7 @@ function _templateObject4() {
|
|
|
98
116
|
}
|
|
99
117
|
|
|
100
118
|
function _templateObject3() {
|
|
101
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
119
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n width: ", ";\n height: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
102
120
|
|
|
103
121
|
_templateObject3 = function _templateObject3() {
|
|
104
122
|
return data;
|
|
@@ -108,7 +126,7 @@ function _templateObject3() {
|
|
|
108
126
|
}
|
|
109
127
|
|
|
110
128
|
function _templateObject2() {
|
|
111
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n"]);
|
|
129
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n display: flex;\n align-items: center;\n flex-direction: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n"]);
|
|
112
130
|
|
|
113
131
|
_templateObject2 = function _templateObject2() {
|
|
114
132
|
return data;
|
|
@@ -127,103 +145,12 @@ function _templateObject() {
|
|
|
127
145
|
return data;
|
|
128
146
|
}
|
|
129
147
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
133
|
-
|
|
134
|
-
var useStyles = (0, _styles.makeStyles)(function () {
|
|
135
|
-
return {
|
|
136
|
-
root: function root(props) {
|
|
137
|
-
return {
|
|
138
|
-
minWidth: props.width
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
dropdownStyle: function dropdownStyle(props) {
|
|
142
|
-
return {
|
|
143
|
-
boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.3)",
|
|
144
|
-
minWidth: props.width,
|
|
145
|
-
width: props.width,
|
|
146
|
-
maxHeight: "250px",
|
|
147
|
-
"&::-webkit-scrollbar": {
|
|
148
|
-
width: "3px",
|
|
149
|
-
margin: "5px"
|
|
150
|
-
},
|
|
151
|
-
"&::-webkit-scrollbar-track": {
|
|
152
|
-
borderRadius: "3px",
|
|
153
|
-
backgroundColor: props.scrollBarTrackColor
|
|
154
|
-
},
|
|
155
|
-
"&::-webkit-scrollbar-thumb": {
|
|
156
|
-
borderRadius: "3px",
|
|
157
|
-
backgroundColor: props.scrollBarThumbColor
|
|
158
|
-
},
|
|
159
|
-
"& .MuiList-root": {
|
|
160
|
-
width: "auto !important",
|
|
161
|
-
paddingRight: "0 !important",
|
|
162
|
-
backgroundColor: props.optionsBackgroundColor,
|
|
163
|
-
borderColor: props.optionsBorderColor,
|
|
164
|
-
borderWidth: props.optionsBorderThickness,
|
|
165
|
-
borderStyle: props.optionsBorderStyle
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
},
|
|
169
|
-
itemList: function itemList(props) {
|
|
170
|
-
return {
|
|
171
|
-
color: "".concat(props.optionsFontColor || props.color),
|
|
172
|
-
"&.MuiList-padding": {
|
|
173
|
-
paddingBottom: "0px",
|
|
174
|
-
paddingTop: "0px"
|
|
175
|
-
},
|
|
176
|
-
"& li": {
|
|
177
|
-
fontSize: props.optionsFontSize,
|
|
178
|
-
fontStyle: props.optionsFontStyle,
|
|
179
|
-
fontWeight: props.optionsFontWeight,
|
|
180
|
-
paddingBottom: props.optionPaddingBottom,
|
|
181
|
-
paddingTop: props.optionPaddingTop,
|
|
182
|
-
paddingLeft: props.optionPaddingLeft,
|
|
183
|
-
paddingRight: props.optionPaddingRight,
|
|
184
|
-
"&:hover": {
|
|
185
|
-
backgroundColor: "".concat(props.backgroundType === "dark" ? props.hoveredOptionBackgroundColorOnDark : props.hoveredOptionBackgroundColor, " !important"),
|
|
186
|
-
color: "".concat(props.optionsFontColor || props.color)
|
|
187
|
-
},
|
|
188
|
-
"&:active": {
|
|
189
|
-
backgroundColor: "".concat(props.backgroundType === "dark" ? props.selectedOptionBackgroundColorOnDark : props.selectedOptionBackgroundColor) + props.hoverOptionBackgroundColor,
|
|
190
|
-
color: "".concat(props.optionsFontColor || props.color)
|
|
191
|
-
},
|
|
192
|
-
"&:focus": {
|
|
193
|
-
outline: "".concat(props.backgroundType === "dark" ? props.focusColorOnDark : props.focusColor, " auto 2px")
|
|
194
|
-
},
|
|
195
|
-
"&.MuiListItem-root.Mui-selected": {
|
|
196
|
-
backgroundColor: "".concat(props.backgroundType === "dark" ? props.selectedOptionBackgroundColorOnDark : props.selectedOptionBackgroundColor, " !important"),
|
|
197
|
-
color: "".concat(props.optionsFontColor || props.color)
|
|
198
|
-
},
|
|
199
|
-
"&.MuiListItem-root.Mui-focusVisible": {
|
|
200
|
-
backgroundColor: "unset"
|
|
201
|
-
},
|
|
202
|
-
"& span.MuiButtonBase-root": {
|
|
203
|
-
padding: "0px",
|
|
204
|
-
margin: "5px 0px",
|
|
205
|
-
"& span.MuiIconButton-label > svg": {
|
|
206
|
-
width: "26px",
|
|
207
|
-
height: "26px"
|
|
208
|
-
},
|
|
209
|
-
"&:hover": {
|
|
210
|
-
color: "".concat(props.backgroundType === "dark" ? props.borderColorOnDark : props.borderColor)
|
|
211
|
-
},
|
|
212
|
-
"&.Mui-checked:hover": {
|
|
213
|
-
color: "".concat(props.backgroundType === "dark" ? props.backgroundColorCheckedOnDark : props.backgroundColorChecked)
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
var DxcSelect = function DxcSelect(_ref) {
|
|
148
|
+
var V3DxcSelect = function V3DxcSelect(_ref) {
|
|
223
149
|
var value = _ref.value,
|
|
224
150
|
name = _ref.name,
|
|
225
151
|
onChange = _ref.onChange,
|
|
226
152
|
label = _ref.label,
|
|
153
|
+
assistiveText = _ref.assistiveText,
|
|
227
154
|
_ref$required = _ref.required,
|
|
228
155
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
229
156
|
_ref$disabled = _ref.disabled,
|
|
@@ -249,14 +176,6 @@ var DxcSelect = function DxcSelect(_ref) {
|
|
|
249
176
|
selectedValue = _useState2[0],
|
|
250
177
|
setSelectedValue = _useState2[1];
|
|
251
178
|
|
|
252
|
-
var selectValues = _objectSpread({
|
|
253
|
-
width: "auto"
|
|
254
|
-
}, colorsTheme.select, {}, colorsTheme.checkbox, {
|
|
255
|
-
backgroundType: backgroundType
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
var classes = useStyles(selectValues);
|
|
259
|
-
|
|
260
179
|
var handleSelectChange = function handleSelectChange(selectedOption) {
|
|
261
180
|
if (multiple) {
|
|
262
181
|
setSelectedValue(selectedOption.target.value);
|
|
@@ -277,16 +196,21 @@ var DxcSelect = function DxcSelect(_ref) {
|
|
|
277
196
|
var selectedItem = options.filter(function (option) {
|
|
278
197
|
return option.value === selected;
|
|
279
198
|
})[0];
|
|
280
|
-
return _react["default"].createElement(
|
|
199
|
+
return _react["default"].createElement(SelectedOptionContainer, {
|
|
281
200
|
iconPosition: iconPosition,
|
|
282
201
|
multiple: multiple,
|
|
283
202
|
label: selectedItem && selectedItem.label,
|
|
284
203
|
key: selectedItem && selectedItem.label
|
|
285
|
-
}, selectedItem && selectedItem.icon ? _react["default"].createElement(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
204
|
+
}, selectedItem && selectedItem.icon ? _react["default"].createElement(SelectedOptionIconContainer, {
|
|
205
|
+
backgroundType: backgroundType,
|
|
206
|
+
disabled: disabled,
|
|
207
|
+
label: selectedItem.label,
|
|
208
|
+
iconPosition: iconPosition
|
|
209
|
+
}, (0, _typeof2["default"])(selectedItem.icon) === "object" ? selectedItem.icon : _react["default"].createElement(selectedItem.icon)) : selectedItem && selectedItem.iconSrc && _react["default"].createElement(SelectedOptionIcon, {
|
|
210
|
+
src: selectedItem && selectedItem.iconSrc,
|
|
211
|
+
label: selectedItem.label,
|
|
212
|
+
iconPosition: iconPosition
|
|
213
|
+
}), selectedItem && selectedItem.label && _react["default"].createElement(SelectedOptionLabelContainer, {
|
|
290
214
|
iconSrc: selectedItem && selectedItem.iconSrc && selectedItem.icon,
|
|
291
215
|
iconPosition: iconPosition,
|
|
292
216
|
disabled: disabled
|
|
@@ -302,7 +226,7 @@ var DxcSelect = function DxcSelect(_ref) {
|
|
|
302
226
|
};
|
|
303
227
|
|
|
304
228
|
var getSelectedValuesWithIcons = function getSelectedValuesWithIcons(optionsList, selected) {
|
|
305
|
-
return
|
|
229
|
+
return optionsList.filter(function (x) {
|
|
306
230
|
return selected.includes(x.value);
|
|
307
231
|
}).map(function (optionToRender) {
|
|
308
232
|
return getLabelForSingleSelect(optionToRender.value);
|
|
@@ -335,8 +259,31 @@ var DxcSelect = function DxcSelect(_ref) {
|
|
|
335
259
|
}
|
|
336
260
|
};
|
|
337
261
|
|
|
262
|
+
var ThemedOption = function ThemedOption(_ref2) {
|
|
263
|
+
var option = _ref2.option;
|
|
264
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
265
|
+
return _react["default"].createElement(_react["default"].Fragment, null, multiple && _react["default"].createElement(_Checkbox["default"], {
|
|
266
|
+
size: "fitContent",
|
|
267
|
+
checked: isChecked(selectedValue, value, option)
|
|
268
|
+
}), _react["default"].createElement(OptionListContainer, {
|
|
269
|
+
iconPosition: iconPosition,
|
|
270
|
+
multiple: multiple
|
|
271
|
+
}, option.icon ? _react["default"].createElement(OptionListIconContainer, {
|
|
272
|
+
backgroundType: backgroundType,
|
|
273
|
+
disabled: disabled,
|
|
274
|
+
label: option.label,
|
|
275
|
+
iconPosition: iconPosition
|
|
276
|
+
}, (0, _typeof2["default"])(option.icon) === "object" ? option.icon : _react["default"].createElement(option.icon)) : option.iconSrc && _react["default"].createElement(OptionListIcon, {
|
|
277
|
+
src: option.iconSrc,
|
|
278
|
+
label: option.label,
|
|
279
|
+
iconPosition: iconPosition
|
|
280
|
+
}), " ", _react["default"].createElement(OptionListLabelContainer, {
|
|
281
|
+
backgroundType: backgroundType
|
|
282
|
+
}, option.label)));
|
|
283
|
+
};
|
|
284
|
+
|
|
338
285
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
339
|
-
theme: colorsTheme.
|
|
286
|
+
theme: colorsTheme.V3Select
|
|
340
287
|
}, _react["default"].createElement(SelectContainer, {
|
|
341
288
|
margin: margin,
|
|
342
289
|
size: size,
|
|
@@ -353,15 +300,12 @@ var DxcSelect = function DxcSelect(_ref) {
|
|
|
353
300
|
value: value !== undefined ? value : selectedValue,
|
|
354
301
|
disabled: disabled,
|
|
355
302
|
MenuProps: {
|
|
356
|
-
classes: {
|
|
357
|
-
paper: classes.dropdownStyle,
|
|
358
|
-
list: classes.itemList
|
|
359
|
-
},
|
|
360
303
|
getContentAnchorEl: null,
|
|
361
304
|
anchorOrigin: {
|
|
362
305
|
vertical: "bottom",
|
|
363
306
|
horizontal: "left"
|
|
364
|
-
}
|
|
307
|
+
},
|
|
308
|
+
disablePortal: true
|
|
365
309
|
},
|
|
366
310
|
inputProps: {
|
|
367
311
|
tabIndex: disabled ? -1 : tabIndex
|
|
@@ -372,21 +316,14 @@ var DxcSelect = function DxcSelect(_ref) {
|
|
|
372
316
|
value: option.value,
|
|
373
317
|
disableRipple: true,
|
|
374
318
|
key: option.value
|
|
375
|
-
},
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
iconPosition: iconPosition
|
|
384
|
-
}, (0, _typeof2["default"])(option.icon) === "object" ? option.icon : _react["default"].createElement(option.icon)) : option.iconSrc && _react["default"].createElement(ListIcon, {
|
|
385
|
-
src: option.iconSrc,
|
|
386
|
-
label: option.label,
|
|
387
|
-
iconPosition: iconPosition
|
|
388
|
-
}), " ", _react["default"].createElement(LabelCont, null, option.label)));
|
|
389
|
-
})))));
|
|
319
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
320
|
+
color: colorsTheme.V3Select.optionBackgroundColor
|
|
321
|
+
}, _react["default"].createElement(ThemedOption, {
|
|
322
|
+
option: option
|
|
323
|
+
})));
|
|
324
|
+
})), assistiveText && _react["default"].createElement(_FormHelperText["default"], {
|
|
325
|
+
disabled: disabled
|
|
326
|
+
}, assistiveText))));
|
|
390
327
|
};
|
|
391
328
|
|
|
392
329
|
var sizes = {
|
|
@@ -397,72 +334,92 @@ var sizes = {
|
|
|
397
334
|
};
|
|
398
335
|
|
|
399
336
|
var calculateWidth = function calculateWidth(margin, size) {
|
|
400
|
-
|
|
401
|
-
return "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
return sizes[size];
|
|
337
|
+
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
405
338
|
};
|
|
406
339
|
|
|
407
340
|
var MultipleLabelSelected = _styledComponents["default"].div(_templateObject());
|
|
408
341
|
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
342
|
+
var OptionListContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
343
|
+
return props.theme.fontFamily;
|
|
344
|
+
}, function (props) {
|
|
412
345
|
return props.iconPosition === "before" && "row" || "row-reverse";
|
|
413
346
|
}, function (props) {
|
|
414
|
-
return props.
|
|
347
|
+
return props.multiple && "margin-left: ".concat(props.theme.optionCheckboxSpacing, ";");
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
var OptionListIconContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
351
|
+
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor : props.backgroundType === "dark" ? props.theme.optionIconColorOnDark : props.theme.optionIconColor;
|
|
415
352
|
}, function (props) {
|
|
416
|
-
return props.
|
|
353
|
+
return props.theme.optionIconSize;
|
|
417
354
|
}, function (props) {
|
|
418
|
-
return
|
|
355
|
+
return props.theme.optionIconSize;
|
|
419
356
|
}, function (props) {
|
|
420
|
-
return props.iconPosition === "after" &&
|
|
357
|
+
return props.iconPosition === "after" && props.label && props.theme.optionIconSpacing || "0px";
|
|
421
358
|
}, function (props) {
|
|
422
|
-
return props.iconPosition === "before" &&
|
|
359
|
+
return props.iconPosition === "before" && props.label && props.theme.optionIconSpacing || "0px";
|
|
423
360
|
});
|
|
424
361
|
|
|
425
|
-
var
|
|
426
|
-
return props.theme.
|
|
362
|
+
var OptionListIcon = _styledComponents["default"].img(_templateObject4(), function (props) {
|
|
363
|
+
return props.theme.optionIconSize;
|
|
364
|
+
}, function (props) {
|
|
365
|
+
return props.theme.optionIconSize;
|
|
427
366
|
}, function (props) {
|
|
428
|
-
return
|
|
367
|
+
return props.iconPosition === "after" && props.label !== "" && props.theme.optionIconSpacing || "0px";
|
|
429
368
|
}, function (props) {
|
|
430
|
-
return
|
|
369
|
+
return props.iconPosition === "before" && props.label !== "" && props.theme.optionIconSpacing || "0px";
|
|
431
370
|
});
|
|
432
371
|
|
|
433
|
-
var
|
|
434
|
-
return props.theme.
|
|
372
|
+
var OptionListLabelContainer = _styledComponents["default"].span(_templateObject5(), function (props) {
|
|
373
|
+
return props.theme.optionFontSize;
|
|
435
374
|
}, function (props) {
|
|
436
|
-
return props.
|
|
375
|
+
return props.theme.optionFontStyle;
|
|
437
376
|
}, function (props) {
|
|
438
|
-
return props.
|
|
377
|
+
return props.theme.optionFontWeight;
|
|
378
|
+
}, function (props) {
|
|
379
|
+
return props.backgroundType === "dark" ? props.theme.optionFontColorOnDark : props.theme.optionFontColor;
|
|
439
380
|
});
|
|
440
381
|
|
|
441
|
-
var
|
|
442
|
-
return props.
|
|
382
|
+
var SelectedOptionContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
383
|
+
return props.iconPosition === "before" && "row" || "row-reverse";
|
|
384
|
+
}, function (props) {
|
|
385
|
+
return props.iconPosition === "before" && "flex-start" || "flex-end";
|
|
443
386
|
}, function (props) {
|
|
444
|
-
return props.
|
|
387
|
+
return props.multiple && props.label && "15px" || "0px";
|
|
388
|
+
}, function (props) {
|
|
389
|
+
return !props.multiple && "calc(100% - 24px)" || "auto";
|
|
445
390
|
}, function (props) {
|
|
446
|
-
return props.iconPosition === "after" && props.label !== ""
|
|
391
|
+
return props.iconPosition === "after" && (props.label !== "" || props.label === undefined) && "content:','";
|
|
447
392
|
}, function (props) {
|
|
448
|
-
return props.iconPosition === "before" && props.label !== ""
|
|
393
|
+
return props.iconPosition === "before" && (props.label !== "" || props.label === undefined) && "content:','";
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
var SelectedOptionLabelContainer = _styledComponents["default"].span(_templateObject7(), function (props) {
|
|
397
|
+
return props.theme.fontFamily;
|
|
449
398
|
});
|
|
450
399
|
|
|
451
|
-
var
|
|
452
|
-
return props.theme.
|
|
400
|
+
var SelectedOptionIcon = _styledComponents["default"].img(_templateObject8(), function (props) {
|
|
401
|
+
return props.theme.valueIconSize;
|
|
453
402
|
}, function (props) {
|
|
454
|
-
return props.theme.
|
|
403
|
+
return props.theme.valueIconSize;
|
|
404
|
+
}, function (props) {
|
|
405
|
+
return props.iconPosition === "after" && props.label !== "" && props.theme.valueIconSpacing || "0px";
|
|
406
|
+
}, function (props) {
|
|
407
|
+
return props.iconPosition === "before" && props.label !== "" && props.theme.valueIconSpacing || "0px";
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
var SelectedOptionIconContainer = _styledComponents["default"].div(_templateObject9(), function (props) {
|
|
411
|
+
return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor : props.backgroundType === "dark" ? props.theme.valueIconColorOnDark : props.theme.valueIconColor;
|
|
455
412
|
}, function (props) {
|
|
456
|
-
return props.theme.
|
|
413
|
+
return props.theme.valueIconSize;
|
|
457
414
|
}, function (props) {
|
|
458
|
-
return props.
|
|
415
|
+
return props.theme.valueIconSize;
|
|
459
416
|
}, function (props) {
|
|
460
|
-
return props.iconPosition === "
|
|
417
|
+
return props.iconPosition === "after" && props.label !== "" && props.theme.valueIconSpacing || "0px";
|
|
461
418
|
}, function (props) {
|
|
462
|
-
return props.
|
|
419
|
+
return props.iconPosition === "before" && props.label !== "" && props.theme.valueIconSpacing || "0px";
|
|
463
420
|
});
|
|
464
421
|
|
|
465
|
-
var SelectContainer = _styledComponents["default"].div(
|
|
422
|
+
var SelectContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
|
|
466
423
|
return calculateWidth(props.margin, props.size);
|
|
467
424
|
}, function (props) {
|
|
468
425
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
@@ -475,15 +432,27 @@ var SelectContainer = _styledComponents["default"].div(_templateObject8(), funct
|
|
|
475
432
|
}, function (props) {
|
|
476
433
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
477
434
|
}, function (props) {
|
|
478
|
-
return props.theme.
|
|
435
|
+
return props.theme.fontFamily;
|
|
436
|
+
}, function (props) {
|
|
437
|
+
return props.theme.assistiveTextFontSize;
|
|
438
|
+
}, function (props) {
|
|
439
|
+
return props.theme.assistiveTextFontStyle;
|
|
440
|
+
}, function (props) {
|
|
441
|
+
return props.theme.assistiveTextFontWeight;
|
|
442
|
+
}, function (props) {
|
|
443
|
+
return props.backgroundType === "dark" ? props.invalid === true ? props.theme.errorColorOnDark : props.theme.assistiveTextFontColorOnDark : props.invalid === true ? props.theme.errorColor : props.theme.assistiveTextFontColor;
|
|
444
|
+
}, function (props) {
|
|
445
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
479
446
|
}, function (props) {
|
|
480
447
|
return props.theme.fontFamily;
|
|
448
|
+
}, function (props) {
|
|
449
|
+
return props.theme.labelFontSize;
|
|
481
450
|
}, function (props) {
|
|
482
451
|
return props.theme.labelFontStyle;
|
|
483
452
|
}, function (props) {
|
|
484
453
|
return props.theme.labelFontWeight;
|
|
485
454
|
}, function (props) {
|
|
486
|
-
return props.backgroundType === "dark" ? props.invalid === true ? props.theme.errorColorOnDark : props.theme.
|
|
455
|
+
return props.backgroundType === "dark" ? props.invalid === true ? props.theme.errorColorOnDark : props.theme.labelFontColorOnDark : props.invalid === true ? props.theme.errorColor : props.theme.labelFontColor;
|
|
487
456
|
}, function (props) {
|
|
488
457
|
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
489
458
|
}, function (props) {
|
|
@@ -493,32 +462,67 @@ var SelectContainer = _styledComponents["default"].div(_templateObject8(), funct
|
|
|
493
462
|
}, function (props) {
|
|
494
463
|
return props.theme.labelFontWeight;
|
|
495
464
|
}, function (props) {
|
|
496
|
-
return props.backgroundType === "dark" ? props.invalid === true ? props.theme.errorColorOnDark : props.theme.
|
|
497
|
-
}, function (props) {
|
|
498
|
-
return props.backgroundType === "dark" ? props.theme.colorOnDark : props.theme.color;
|
|
465
|
+
return props.backgroundType === "dark" ? props.invalid === true ? props.theme.errorColorOnDark : props.theme.labelFontColorOnDark : props.invalid === true ? props.theme.errorColor : props.theme.labelFontColor;
|
|
499
466
|
}, function (props) {
|
|
500
467
|
return props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor;
|
|
501
468
|
}, function (props) {
|
|
502
469
|
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
503
470
|
}, function (props) {
|
|
504
|
-
return props.theme.
|
|
471
|
+
return props.theme.valueFontSize;
|
|
472
|
+
}, function (props) {
|
|
473
|
+
return props.theme.valueFontStyle;
|
|
474
|
+
}, function (props) {
|
|
475
|
+
return props.theme.valueFontWeight;
|
|
476
|
+
}, function (props) {
|
|
477
|
+
return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
478
|
+
}, function (props) {
|
|
479
|
+
return props.theme.underlineThickness;
|
|
505
480
|
}, function (props) {
|
|
506
|
-
return props.disabled &&
|
|
481
|
+
return props.backgroundType === "dark" ? props.invalid === true && props.theme.errorColorOnDark || props.disabled && props.theme.disabledColorOnDark || props.theme.underlineFocusColorOnDark : props.invalid === true && props.theme.errorColor || props.disabled && props.theme.disabledColor || props.theme.underlineFocusColor;
|
|
507
482
|
}, function (props) {
|
|
508
|
-
return props.
|
|
483
|
+
return props.theme.underlineThickness;
|
|
509
484
|
}, function (props) {
|
|
510
|
-
return props.backgroundType === "dark" ? props.invalid === true && props.theme.errorColorOnDark || props.disabled && props.theme.disabledColorOnDark || props.theme.
|
|
485
|
+
return props.backgroundType === "dark" ? props.invalid === true && props.theme.errorColorOnDark || props.disabled && props.theme.disabledColorOnDark || props.theme.underlineColorOnDark : props.invalid === true && props.theme.errorColor || props.disabled && props.theme.disabledColor || props.theme.underlineColor;
|
|
511
486
|
}, function (props) {
|
|
512
|
-
return props.
|
|
487
|
+
return props.theme.underlineThickness;
|
|
513
488
|
}, function (props) {
|
|
514
|
-
return props.backgroundType === "dark" ? props.invalid === true
|
|
489
|
+
return props.backgroundType === "dark" ? props.invalid === true ? props.theme.errorColorOnDark : props.theme.underlineFocusColorOnDark : props.invalid === true ? props.theme.errorColor : props.theme.underlineFocusColor;
|
|
490
|
+
}, function (props) {
|
|
491
|
+
return props.theme.underlineThickness;
|
|
492
|
+
}, function (props) {
|
|
493
|
+
return props.backgroundType === "dark" ? props.invalid === true && props.theme.errorColorOnDark || props.disabled && props.theme.disabledColorOnDark || props.theme.underlineColorOnDark : props.invalid === true && props.theme.errorColor || props.disabled && props.theme.disabledColor || props.theme.underlineColor;
|
|
494
|
+
}, function (props) {
|
|
495
|
+
return props.backgroundType === "dark" ? props.disabled && props.theme.disabledColorOnDark || props.theme.arrowColorOnDark : props.disabled && props.theme.disabledColor || props.theme.arrowColor;
|
|
496
|
+
}, function (props) {
|
|
497
|
+
return props.theme.optionBackgroundColor;
|
|
498
|
+
}, function (props) {
|
|
499
|
+
return props.theme.optionBorderColor;
|
|
500
|
+
}, function (props) {
|
|
501
|
+
return props.theme.optionBorderThickness;
|
|
502
|
+
}, function (props) {
|
|
503
|
+
return props.theme.optionBorderStyle;
|
|
504
|
+
}, function (props) {
|
|
505
|
+
return props.theme.scrollBarTrackColor;
|
|
506
|
+
}, function (props) {
|
|
507
|
+
return props.theme.scrollBarThumbColor;
|
|
508
|
+
}, function (props) {
|
|
509
|
+
return props.theme.optionPaddingBottom;
|
|
510
|
+
}, function (props) {
|
|
511
|
+
return props.theme.optionPaddingTop;
|
|
512
|
+
}, function (props) {
|
|
513
|
+
return props.backgroundType === "dark" ? props.theme.hoverOptionBackgroundColorOnDark : props.theme.hoverOptionBackgroundColor;
|
|
514
|
+
}, function (props) {
|
|
515
|
+
return props.backgroundType === "dark" ? props.theme.activeOptionBackgroundColorOnDark : props.theme.activeOptionBackgroundColor;
|
|
516
|
+
}, function (props) {
|
|
517
|
+
return props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor;
|
|
515
518
|
}, function (props) {
|
|
516
|
-
return props.backgroundType === "dark" ? props.
|
|
519
|
+
return props.backgroundType === "dark" ? props.theme.selectedOptionBackgroundColorOnDark : props.theme.selectedOptionBackgroundColor;
|
|
517
520
|
});
|
|
518
521
|
|
|
519
|
-
|
|
522
|
+
V3DxcSelect.propTypes = {
|
|
520
523
|
size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
|
|
521
524
|
label: _propTypes["default"].string,
|
|
525
|
+
assistiveText: _propTypes["default"].string,
|
|
522
526
|
name: _propTypes["default"].string,
|
|
523
527
|
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number, _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]))]),
|
|
524
528
|
disabled: _propTypes["default"].bool,
|
|
@@ -541,5 +545,5 @@ DxcSelect.propTypes = {
|
|
|
541
545
|
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
542
546
|
tabIndex: _propTypes["default"].number
|
|
543
547
|
};
|
|
544
|
-
var _default =
|
|
548
|
+
var _default = V3DxcSelect;
|
|
545
549
|
exports["default"] = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
value?: any;
|
|
12
|
+
name?: string;
|
|
13
|
+
onChange?: void;
|
|
14
|
+
label?: string,
|
|
15
|
+
assistiveText?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
options?: any;
|
|
20
|
+
iconPosition?: "before" | "after";
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
margin?: Space | Margin;
|
|
23
|
+
size?: Size;
|
|
24
|
+
tabIndex?: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default function V3DxcSelect(props: Props): JSX.Element;
|