@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
|
@@ -36,7 +36,7 @@ var _RequiredComponent = _interopRequireDefault(require("../common/RequiredCompo
|
|
|
36
36
|
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
|
|
37
37
|
|
|
38
38
|
function _templateObject() {
|
|
39
|
-
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\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n margin-top: 6px;\n }\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n padding-left: \"inherit\";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: \"translate(0, 1.5px) scale(0.75);\";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n transform: \"translate(0, 1.5px) scale(0.75)\";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\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 .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n &::before {\n border-bottom: ", ";\n }\n &:not(.Mui-error)::before,\n &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n &::after {\n border-bottom: ", ";\n }\n\n .MuiInputBase-inputMultiline {\n overflow: auto !important;\n\n ::-webkit-scrollbar {\n width: 3px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n }\n\n &.Mui-error {\n &::before {\n border-width:
|
|
39
|
+
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\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n margin-top: 6px;\n }\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n padding-left: \"inherit\";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: \"translate(0, 1.5px) scale(0.75);\";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n transform: \"translate(0, 1.5px) scale(0.75)\";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\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 .MuiInputBase-root.MuiInput-root.MuiInput-underline {\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 .MuiInputBase-inputMultiline {\n overflow: auto !important;\n\n ::-webkit-scrollbar {\n width: 3px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\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-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n line-height: ", ";\n padding-left: \"inherit\";\n text-overflow: ellipsis;\n\n &.Mui-disabled {\n cursor: not-allowed;\n color: ", ";\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: ", ";\n }\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n }\n"]);
|
|
40
40
|
|
|
41
41
|
_templateObject = function _templateObject() {
|
|
42
42
|
return data;
|
|
@@ -45,7 +45,7 @@ function _templateObject() {
|
|
|
45
45
|
return data;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var V3DxcTextarea = function V3DxcTextarea(_ref) {
|
|
49
49
|
var _ref$label = _ref.label,
|
|
50
50
|
label = _ref$label === void 0 ? " " : _ref$label,
|
|
51
51
|
_ref$name = _ref.name,
|
|
@@ -107,7 +107,7 @@ var DxcTextarea = function DxcTextarea(_ref) {
|
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
110
|
-
theme: colorsTheme.
|
|
110
|
+
theme: colorsTheme.V3Textarea
|
|
111
111
|
}, _react["default"].createElement(TextContainer, {
|
|
112
112
|
required: required,
|
|
113
113
|
assistiveText: assistiveText,
|
|
@@ -156,7 +156,7 @@ var TextContainer = _styledComponents["default"].div(_templateObject(), function
|
|
|
156
156
|
}, function (props) {
|
|
157
157
|
return calculateWidth(props.margin, props.size);
|
|
158
158
|
}, function (props) {
|
|
159
|
-
return props.theme.
|
|
159
|
+
return props.theme.fontFamily;
|
|
160
160
|
}, function (props) {
|
|
161
161
|
return props.theme.assistiveTextFontSize;
|
|
162
162
|
}, function (props) {
|
|
@@ -176,66 +176,70 @@ var TextContainer = _styledComponents["default"].div(_templateObject(), function
|
|
|
176
176
|
}, function (props) {
|
|
177
177
|
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
178
178
|
}, function (props) {
|
|
179
|
-
return props.backgroundType === "dark" ? props.theme.
|
|
179
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
180
180
|
}, function (props) {
|
|
181
181
|
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
182
182
|
}, function (props) {
|
|
183
|
-
return props.theme.
|
|
183
|
+
return props.theme.fontFamily;
|
|
184
184
|
}, function (props) {
|
|
185
185
|
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
186
186
|
}, function (props) {
|
|
187
|
-
return props.theme.
|
|
187
|
+
return props.theme.fontFamily;
|
|
188
188
|
}, function (props) {
|
|
189
189
|
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
190
190
|
}, function (props) {
|
|
191
191
|
return props.backgroundType === "dark" ? props.theme.assistiveTextFontColorOnDark : props.theme.assistiveTextFontColor;
|
|
192
192
|
}, function (props) {
|
|
193
|
-
return props.backgroundType ? props.theme.
|
|
193
|
+
return props.backgroundType ? props.theme.underlineColorOnDark : props.theme.underlineColor;
|
|
194
194
|
}, function (props) {
|
|
195
|
-
return props.backgroundType === "dark" ? props.theme.
|
|
195
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
196
196
|
}, function (props) {
|
|
197
|
-
return "
|
|
197
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
198
198
|
}, function (props) {
|
|
199
|
-
return "
|
|
199
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
200
200
|
}, function (props) {
|
|
201
|
-
return "
|
|
201
|
+
return "calc(".concat(props.theme.underlineThickness, " + 1px) solid ").concat(props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor);
|
|
202
202
|
}, function (props) {
|
|
203
203
|
return props.backgroundType === "dark" ? props.theme.scrollBarTrackColorOnDark : props.theme.scrollBarTrackColor;
|
|
204
204
|
}, function (props) {
|
|
205
205
|
return props.backgroundType === "dark" ? props.theme.scrollBarThumbColorOnDark : props.theme.scrollBarThumbColor;
|
|
206
|
+
}, function (props) {
|
|
207
|
+
return props.theme.underlineThickness;
|
|
206
208
|
}, function (props) {
|
|
207
209
|
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
208
210
|
}, function (props) {
|
|
209
|
-
return props.
|
|
211
|
+
return props.theme.underlineThickness;
|
|
212
|
+
}, function (props) {
|
|
213
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
210
214
|
}, function (props) {
|
|
211
215
|
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
212
216
|
}, function (props) {
|
|
213
|
-
return "
|
|
217
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor, " !important");
|
|
214
218
|
}, function (props) {
|
|
215
|
-
return props.theme.
|
|
219
|
+
return props.theme.fontFamily;
|
|
216
220
|
}, function (props) {
|
|
217
|
-
return props.theme.
|
|
221
|
+
return props.theme.valueFontSize;
|
|
218
222
|
}, function (props) {
|
|
219
|
-
return props.theme.
|
|
223
|
+
return props.theme.valueFontStyle;
|
|
220
224
|
}, function (props) {
|
|
221
|
-
return props.theme.
|
|
225
|
+
return props.theme.valueFontWeight;
|
|
222
226
|
}, function (props) {
|
|
223
|
-
return props.theme.
|
|
227
|
+
return props.theme.valueLetterSpacing;
|
|
224
228
|
}, function (props) {
|
|
225
|
-
return props.backgroundType === "dark" ? props.theme.
|
|
229
|
+
return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
226
230
|
}, function (props) {
|
|
227
|
-
return props.theme.
|
|
231
|
+
return props.theme.valueLineHeight;
|
|
228
232
|
}, function (props) {
|
|
229
|
-
return props.backgroundType === "dark" ? props.theme.
|
|
233
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
230
234
|
}, function (props) {
|
|
231
|
-
return props.backgroundType === "dark" ? props.theme.
|
|
235
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
232
236
|
}, function (props) {
|
|
233
237
|
return "".concat(props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor, " !important");
|
|
234
238
|
}, function (props) {
|
|
235
|
-
return props.backgroundType === "dark" ? props.theme.
|
|
239
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
236
240
|
});
|
|
237
241
|
|
|
238
|
-
|
|
242
|
+
V3DxcTextarea.propTypes = {
|
|
239
243
|
label: _propTypes["default"].string,
|
|
240
244
|
name: _propTypes["default"].string,
|
|
241
245
|
value: _propTypes["default"].string,
|
|
@@ -256,5 +260,5 @@ DxcTextarea.propTypes = {
|
|
|
256
260
|
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
257
261
|
tabIndex: _propTypes["default"].number
|
|
258
262
|
};
|
|
259
|
-
var _default =
|
|
263
|
+
var _default = V3DxcTextarea;
|
|
260
264
|
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
|
+
label?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
assistiveText?: string;
|
|
15
|
+
disabled?: boolean,
|
|
16
|
+
onChange?: void;
|
|
17
|
+
onBlur?: void;
|
|
18
|
+
numRows?: number;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
margin?: Space | Margin;
|
|
23
|
+
size?: Size;
|
|
24
|
+
tabIndex?: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default function V3DxcTextarea(props: Props): JSX.Element;
|
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
12
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
13
|
|
|
14
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
+
|
|
16
16
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
17
17
|
|
|
18
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -40,7 +40,7 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
|
40
40
|
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
41
41
|
|
|
42
42
|
function _templateObject7() {
|
|
43
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
43
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n color: ", ";\n"]);
|
|
44
44
|
|
|
45
45
|
_templateObject7 = function _templateObject7() {
|
|
46
46
|
return data;
|
|
@@ -50,7 +50,7 @@ function _templateObject7() {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
function _templateObject6() {
|
|
53
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
53
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n color: ", ";\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
54
54
|
|
|
55
55
|
_templateObject6 = function _templateObject6() {
|
|
56
56
|
return data;
|
|
@@ -60,7 +60,7 @@ function _templateObject6() {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function _templateObject5() {
|
|
63
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-left: ", ";\n padding-right: ", ";\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n
|
|
63
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-left: ", ";\n padding-right: ", ";\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: ", ";\n text-align: end;\n"]);
|
|
64
64
|
|
|
65
65
|
_templateObject5 = function _templateObject5() {
|
|
66
66
|
return data;
|
|
@@ -70,7 +70,7 @@ function _templateObject5() {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function _templateObject4() {
|
|
73
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n
|
|
73
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n"]);
|
|
74
74
|
|
|
75
75
|
_templateObject4 = function _templateObject4() {
|
|
76
76
|
return data;
|
|
@@ -100,7 +100,7 @@ function _templateObject2() {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function _templateObject() {
|
|
103
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-width: 280px;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n
|
|
103
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-width: 280px;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: ", ";\n cursor: ", ";\n\n .MuiPaper-root {\n min-width: 0;\n display: flex;\n left: 85px;\n background-color: ", " !important;\n box-shadow: ", ";\n position: static;\n width: 100%;\n border-radius: ", ";\n\n &.Mui-expanded {\n border-radius: ", ";\n }\n &.MuiExpansionPanel-root {\n display: flex;\n flex-direction: column;\n min-height: 48px;\n }\n &.MuiExpansionPanel-rounded {\n border-radius: ", ";\n }\n .MuiButtonBase-root.MuiExpansionPanelSummary-root {\n min-height: 48px;\n height: 48px;\n\n :focus {\n outline-color: ", ";\n outline-style: ", ";\n outline-width: ", ";\n background-color: ", ";\n }\n :hover {\n background-color: ", ";\n }\n :active {\n background-color: ", ";\n }\n &.Mui-disabled {\n opacity: 1;\n }\n }\n .MuiButtonBase-root {\n border-radius: ", ";\n\n &.Mui-expanded {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n .MuiSvgIcon-root {\n opacity: 1;\n }\n }\n &.MuiIconButton-root {\n height: auto;\n }\n .MuiExpansionPanelSummary-content {\n padding-top: ", ";\n padding-bottom: ", ";\n padding-right: ", ";\n padding-left: ", ";\n min-width: 0;\n align-items: baseline;\n &.Mui-expanded {\n div:nth-child(2) {\n opacity: 1;\n }\n }\n :hover {\n div {\n opacity: 1;\n }\n }\n }\n }\n .MuiTouchRipple-root {\n display: none;\n }\n }\n .MuiCollapse-hidden {\n display: none;\n }\n .MuiCollapse-container {\n border-radius: 0px 0px 4px 4px;\n cursor: default;\n width: 100%;\n }\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n .MuiExpansionPanelDetails-root {\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n }\n"]);
|
|
104
104
|
|
|
105
105
|
_templateObject = function _templateObject() {
|
|
106
106
|
return data;
|
|
@@ -138,7 +138,7 @@ var DxcAccordion = function DxcAccordion(_ref) {
|
|
|
138
138
|
isResponsive = _useState2[0],
|
|
139
139
|
setIsResponsive = _useState2[1];
|
|
140
140
|
|
|
141
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
141
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
142
142
|
|
|
143
143
|
var handleResize = function handleResize(width) {
|
|
144
144
|
if (width) {
|
|
@@ -183,9 +183,17 @@ var DxcAccordion = function DxcAccordion(_ref) {
|
|
|
183
183
|
}, _react["default"].createElement(_ExpansionPanelSummary["default"], {
|
|
184
184
|
expandIcon: _react["default"].createElement(_ExpandMore["default"], null),
|
|
185
185
|
tabIndex: disabled ? -1 : tabIndex
|
|
186
|
-
}, _react["default"].createElement(AccordionInfo,
|
|
186
|
+
}, _react["default"].createElement(AccordionInfo, {
|
|
187
|
+
disabled: disabled
|
|
188
|
+
}, _react["default"].createElement(AccordionLabel, null, label), icon ? _react["default"].createElement(IconContainer, {
|
|
189
|
+
disabled: disabled
|
|
190
|
+
}, (0, _typeof2["default"])(icon) === "object" ? icon : _react["default"].createElement(icon)) : iconSrc && _react["default"].createElement(AccordionIcon, {
|
|
187
191
|
src: iconSrc
|
|
188
|
-
})), assistiveText && _react["default"].createElement(AccordionAssistiveText,
|
|
192
|
+
})), assistiveText && _react["default"].createElement(AccordionAssistiveText, {
|
|
193
|
+
disabled: disabled
|
|
194
|
+
}, assistiveText)), _react["default"].createElement(_ExpansionPanelDetails["default"], null, _react["default"].createElement(AccordionContent, {
|
|
195
|
+
disabled: disabled
|
|
196
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
189
197
|
color: colorsTheme.accordion.backgroundColor
|
|
190
198
|
}, children))))));
|
|
191
199
|
};
|
|
@@ -194,30 +202,6 @@ var calculateWidth = function calculateWidth(margin) {
|
|
|
194
202
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
195
203
|
};
|
|
196
204
|
|
|
197
|
-
DxcAccordion.propTypes = {
|
|
198
|
-
label: _propTypes["default"].string,
|
|
199
|
-
iconSrc: _propTypes["default"].string,
|
|
200
|
-
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
201
|
-
assistiveText: _propTypes["default"].string,
|
|
202
|
-
disabled: _propTypes["default"].bool,
|
|
203
|
-
onChange: _propTypes["default"].func,
|
|
204
|
-
isExpanded: _propTypes["default"].bool,
|
|
205
|
-
children: _propTypes["default"].element,
|
|
206
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
207
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
208
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
209
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
210
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
211
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
212
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
213
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
214
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
215
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
216
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
217
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
218
|
-
tabIndex: _propTypes["default"].number
|
|
219
|
-
};
|
|
220
|
-
|
|
221
205
|
var DXCAccordion = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
222
206
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
223
207
|
}, function (props) {
|
|
@@ -233,7 +217,7 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
|
|
|
233
217
|
}, function (props) {
|
|
234
218
|
return props.disabled && "not-allowed" || "pointer";
|
|
235
219
|
}, function (props) {
|
|
236
|
-
return props.theme.backgroundColor;
|
|
220
|
+
return props.disabled ? props.theme.disabledBackgroundColor : props.theme.backgroundColor;
|
|
237
221
|
}, function (props) {
|
|
238
222
|
return "".concat(props.theme.boxShadowOffsetX, " ").concat(props.theme.boxShadowOffsetY, " ").concat(props.theme.boxShadowBlur, " ").concat(props.theme.boxShadowColor);
|
|
239
223
|
}, function (props) {
|
|
@@ -242,6 +226,16 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
|
|
|
242
226
|
return props.theme.borderRadius;
|
|
243
227
|
}, function (props) {
|
|
244
228
|
return props.theme.borderRadius;
|
|
229
|
+
}, function (props) {
|
|
230
|
+
return props.theme.focusBorderColor;
|
|
231
|
+
}, function (props) {
|
|
232
|
+
return props.theme.focusBorderStyle;
|
|
233
|
+
}, function (props) {
|
|
234
|
+
return props.theme.focusBorderThickness;
|
|
235
|
+
}, function (props) {
|
|
236
|
+
return props.theme.backgroundColor;
|
|
237
|
+
}, function (props) {
|
|
238
|
+
return "".concat(props.theme.hoverBackgroundColor);
|
|
245
239
|
}, function (props) {
|
|
246
240
|
return "".concat(props.theme.hoverBackgroundColor);
|
|
247
241
|
}, function (props) {
|
|
@@ -251,17 +245,11 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
|
|
|
251
245
|
}, function (props) {
|
|
252
246
|
return props.theme.titleLabelPaddingBottom;
|
|
253
247
|
}, function (props) {
|
|
254
|
-
return props.theme.
|
|
255
|
-
}, function (props) {
|
|
256
|
-
return props.theme.arrowColor;
|
|
248
|
+
return props.theme.titleLabelPaddingRight;
|
|
257
249
|
}, function (props) {
|
|
258
|
-
return props.theme.
|
|
250
|
+
return props.theme.titleLabelPaddingLeft;
|
|
259
251
|
}, function (props) {
|
|
260
|
-
return props.theme.
|
|
261
|
-
}, function (props) {
|
|
262
|
-
return props.theme.titleFocusBorderColor;
|
|
263
|
-
}, function (props) {
|
|
264
|
-
return props.theme.customContentPanelHeight;
|
|
252
|
+
return props.disabled ? props.theme.disabledArrowColor : props.theme.arrowColor;
|
|
265
253
|
}, function (props) {
|
|
266
254
|
return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
|
|
267
255
|
}, function (props) {
|
|
@@ -287,20 +275,12 @@ var AccordionInfo = _styledComponents["default"].div(_templateObject2(), functio
|
|
|
287
275
|
}, function (props) {
|
|
288
276
|
return props.theme.titleFonLabeltWeight;
|
|
289
277
|
}, function (props) {
|
|
290
|
-
return props.theme.
|
|
278
|
+
return props.disabled ? props.theme.disabledTitleLabelFontColor : props.theme.titleLabelFontColor;
|
|
291
279
|
});
|
|
292
280
|
|
|
293
281
|
var AccordionLabel = _styledComponents["default"].div(_templateObject3());
|
|
294
282
|
|
|
295
|
-
var
|
|
296
|
-
return props.theme.customContentFontFamily;
|
|
297
|
-
}, function (props) {
|
|
298
|
-
return props.theme.customContentFontSize;
|
|
299
|
-
}, function (props) {
|
|
300
|
-
return props.theme.customContentFontWeight;
|
|
301
|
-
}, function (props) {
|
|
302
|
-
return props.theme.customContentFontColor || props.theme.fontColorBase;
|
|
303
|
-
});
|
|
283
|
+
var AccordionContent = _styledComponents["default"].div(_templateObject4());
|
|
304
284
|
|
|
305
285
|
var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
306
286
|
return props.theme.assistiveTextPaddingLeft;
|
|
@@ -315,7 +295,7 @@ var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5()
|
|
|
315
295
|
}, function (props) {
|
|
316
296
|
return props.theme.assistiveTextFontWeight;
|
|
317
297
|
}, function (props) {
|
|
318
|
-
return props.theme.
|
|
298
|
+
return props.disabled ? props.theme.disabledAssistiveTextFontColor : props.theme.assistiveTextFontColor;
|
|
319
299
|
}, function (props) {
|
|
320
300
|
return props.theme.assistiveTextLetterSpacing;
|
|
321
301
|
}, function (props) {
|
|
@@ -323,18 +303,51 @@ var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5()
|
|
|
323
303
|
});
|
|
324
304
|
|
|
325
305
|
var IconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
326
|
-
return props.theme.
|
|
306
|
+
return props.theme.iconSize;
|
|
327
307
|
}, function (props) {
|
|
328
|
-
return props.theme.
|
|
308
|
+
return props.theme.iconSize;
|
|
329
309
|
}, function (props) {
|
|
330
310
|
return props.theme.iconMarginLeft;
|
|
331
311
|
}, function (props) {
|
|
332
312
|
return props.theme.iconMarginRigth;
|
|
333
313
|
}, function (props) {
|
|
334
|
-
return props.theme.
|
|
314
|
+
return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
|
|
335
315
|
});
|
|
336
316
|
|
|
337
|
-
var AccordionIcon = _styledComponents["default"].img(_templateObject7())
|
|
317
|
+
var AccordionIcon = _styledComponents["default"].img(_templateObject7(), function (props) {
|
|
318
|
+
return props.theme.iconSize;
|
|
319
|
+
}, function (props) {
|
|
320
|
+
return props.theme.iconSize;
|
|
321
|
+
}, function (props) {
|
|
322
|
+
return props.theme.iconMarginLeft;
|
|
323
|
+
}, function (props) {
|
|
324
|
+
return props.theme.iconMarginRigth;
|
|
325
|
+
}, function (props) {
|
|
326
|
+
return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
|
|
327
|
+
});
|
|
338
328
|
|
|
329
|
+
DxcAccordion.propTypes = {
|
|
330
|
+
label: _propTypes["default"].string,
|
|
331
|
+
iconSrc: _propTypes["default"].string,
|
|
332
|
+
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
333
|
+
assistiveText: _propTypes["default"].string,
|
|
334
|
+
disabled: _propTypes["default"].bool,
|
|
335
|
+
onChange: _propTypes["default"].func,
|
|
336
|
+
isExpanded: _propTypes["default"].bool,
|
|
337
|
+
children: _propTypes["default"].element,
|
|
338
|
+
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
339
|
+
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
340
|
+
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
341
|
+
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
342
|
+
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
343
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
344
|
+
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
345
|
+
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
346
|
+
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
347
|
+
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
348
|
+
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
349
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
350
|
+
tabIndex: _propTypes["default"].number
|
|
351
|
+
};
|
|
339
352
|
var _default = DxcAccordion;
|
|
340
353
|
exports["default"] = _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
type Padding = {
|
|
9
|
+
top?: Space;
|
|
10
|
+
bottom?: Space;
|
|
11
|
+
left?: Space;
|
|
12
|
+
right?: Space;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
label?: string;
|
|
17
|
+
iconSrc?: string;
|
|
18
|
+
icon?: any;
|
|
19
|
+
assistiveText?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
onChange?: void;
|
|
22
|
+
isExpanded?: boolean;
|
|
23
|
+
margin?: Space | Margin;
|
|
24
|
+
padding?: Space | Padding;
|
|
25
|
+
tabIndex?: number;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default function DxcAccordion(props: Props): JSX.Element;
|
|
@@ -34,7 +34,7 @@ var _variables = require("../common/variables.js");
|
|
|
34
34
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
35
35
|
|
|
36
36
|
function _templateObject() {
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
37
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n cursor: ", ";\n\n & > :not(div:last-child) {\n & > div:first-child {\n border-radius: 0;\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-radius: 0;\n }\n\n & > .MuiButtonBase-root {\n border-radius: 0;\n }\n }\n }\n\n & > div:first-child {\n & > div:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom: ", ";\n border-color: ", ";\n\n & > .Mui-expanded {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n\n & > .MuiButtonBase-root {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n }\n }\n\n & > div:last-child {\n & > div:first-child {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & > .Mui-expanded {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n & > .MuiButtonBase-root {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n"]);
|
|
38
38
|
|
|
39
39
|
_templateObject = function _templateObject() {
|
|
40
40
|
return data;
|
|
@@ -103,8 +103,6 @@ var calculateWidth = function calculateWidth(margin) {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
var AccordionGroupContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
106
|
-
return props.theme.minWidth;
|
|
107
|
-
}, function (props) {
|
|
108
106
|
return calculateWidth(props.margin);
|
|
109
107
|
}, function (_ref3) {
|
|
110
108
|
var margin = _ref3.margin;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: Space;
|
|
4
|
+
bottom?: Space;
|
|
5
|
+
left?: Space;
|
|
6
|
+
right?: Space;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onActiveChange?: void;
|
|
12
|
+
indexActive?: number;
|
|
13
|
+
margin?: Space | Margin;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default function DxcAccordionGroup(props: Props): JSX.Element;
|