@dxc-technology/halstack-react 0.0.0-11cad3f → 0.0.0-1418b62
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/ThemeContext.js +130 -98
- package/dist/accordion/Accordion.js +66 -59
- package/dist/accordion-group/AccordionGroup.js +1 -3
- package/dist/alert/Alert.js +126 -111
- package/dist/alert/index.d.ts +51 -0
- package/dist/box/Box.js +1 -9
- package/dist/button/Button.js +31 -25
- package/dist/checkbox/Checkbox.js +23 -17
- package/dist/chip/Chip.js +21 -25
- package/dist/common/variables.js +906 -536
- package/dist/date/Date.js +7 -9
- package/dist/dialog/Dialog.js +15 -32
- package/dist/dropdown/Dropdown.js +118 -69
- package/dist/file-input/FileInput.js +644 -0
- package/dist/file-input/FileItem.js +280 -0
- package/dist/file-input/index.d.ts +81 -0
- package/dist/footer/Footer.js +25 -35
- package/dist/footer/dxc_logo.svg +15 -0
- package/dist/header/Header.js +14 -42
- package/dist/header/dxc_logo_black.svg +8 -0
- package/dist/heading/Heading.js +1 -5
- package/dist/input-text/InputText.js +93 -55
- package/dist/layout/ApplicationLayout.js +1 -1
- package/dist/link/Link.js +4 -8
- package/dist/main.d.ts +8 -0
- package/dist/main.js +56 -0
- package/dist/new-date/NewDate.js +400 -0
- package/dist/new-date/index.d.ts +95 -0
- package/dist/new-input-text/NewInputText.js +967 -0
- package/dist/new-input-text/index.d.ts +135 -0
- package/dist/new-select/NewSelect.js +836 -0
- package/dist/new-select/index.d.ts +53 -0
- package/dist/new-textarea/NewTextarea.js +365 -0
- package/dist/new-textarea/index.d.ts +117 -0
- package/dist/number/Number.js +136 -0
- package/dist/number/NumberContext.js +16 -0
- package/dist/number/index.d.ts +113 -0
- package/dist/paginator/Paginator.js +10 -4
- package/dist/password/Password.js +200 -0
- package/dist/password/index.d.ts +94 -0
- package/dist/password/styles.css +3 -0
- package/dist/progress-bar/ProgressBar.js +63 -27
- package/dist/select/Select.js +171 -185
- package/dist/sidenav/Sidenav.js +11 -15
- package/dist/slider/Slider.js +56 -52
- package/dist/spinner/Spinner.js +225 -58
- package/dist/table/Table.js +5 -1
- package/dist/tag/Tag.js +38 -36
- package/dist/textarea/Textarea.js +26 -22
- package/dist/toggle-group/ToggleGroup.js +21 -39
- package/dist/upload/buttons-upload/ButtonsUpload.js +5 -1
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +10 -6
- package/dist/upload/file-upload/FileToUpload.js +1 -1
- package/dist/upload/transaction/Transaction.js +12 -8
- package/dist/upload/transactions/Transactions.js +11 -11
- package/dist/wizard/Wizard.js +8 -8
- package/package.json +4 -2
- package/test/Dropdown.test.js +15 -0
- package/test/FileInput.test.js +201 -0
- package/test/NewDate.test.js +232 -0
- package/test/NewInputText.test.js +734 -0
- package/test/NewTextarea.test.js +195 -0
- package/test/Number.test.js +257 -0
- package/test/Paginator.test.js +1 -1
- package/test/Password.test.js +83 -0
- package/test/ResultsetTable.test.js +1 -2
- package/test/Select.test.js +44 -24
- package/test/Spinner.test.js +5 -0
- 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.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- 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/dxc_logo_wht.png +0 -0
- 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/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/toggle-group/readme.md +0 -82
|
@@ -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) {
|
|
@@ -185,11 +185,13 @@ var DxcAccordion = function DxcAccordion(_ref) {
|
|
|
185
185
|
tabIndex: disabled ? -1 : tabIndex
|
|
186
186
|
}, _react["default"].createElement(AccordionInfo, {
|
|
187
187
|
disabled: disabled
|
|
188
|
-
}, _react["default"].createElement(AccordionLabel, null, label), icon ? _react["default"].createElement(IconContainer,
|
|
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, {
|
|
189
191
|
src: iconSrc
|
|
190
192
|
})), assistiveText && _react["default"].createElement(AccordionAssistiveText, {
|
|
191
193
|
disabled: disabled
|
|
192
|
-
}, assistiveText)), _react["default"].createElement(_ExpansionPanelDetails["default"], null, _react["default"].createElement(
|
|
194
|
+
}, assistiveText)), _react["default"].createElement(_ExpansionPanelDetails["default"], null, _react["default"].createElement(AccordionContent, {
|
|
193
195
|
disabled: disabled
|
|
194
196
|
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
195
197
|
color: colorsTheme.accordion.backgroundColor
|
|
@@ -200,30 +202,6 @@ var calculateWidth = function calculateWidth(margin) {
|
|
|
200
202
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
201
203
|
};
|
|
202
204
|
|
|
203
|
-
DxcAccordion.propTypes = {
|
|
204
|
-
label: _propTypes["default"].string,
|
|
205
|
-
iconSrc: _propTypes["default"].string,
|
|
206
|
-
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
207
|
-
assistiveText: _propTypes["default"].string,
|
|
208
|
-
disabled: _propTypes["default"].bool,
|
|
209
|
-
onChange: _propTypes["default"].func,
|
|
210
|
-
isExpanded: _propTypes["default"].bool,
|
|
211
|
-
children: _propTypes["default"].element,
|
|
212
|
-
margin: _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
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
219
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
220
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
221
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
222
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
223
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
224
|
-
tabIndex: _propTypes["default"].number
|
|
225
|
-
};
|
|
226
|
-
|
|
227
205
|
var DXCAccordion = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
228
206
|
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
229
207
|
}, function (props) {
|
|
@@ -239,7 +217,7 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
|
|
|
239
217
|
}, function (props) {
|
|
240
218
|
return props.disabled && "not-allowed" || "pointer";
|
|
241
219
|
}, function (props) {
|
|
242
|
-
return props.theme.backgroundColor;
|
|
220
|
+
return props.disabled ? props.theme.disabledBackgroundColor : props.theme.backgroundColor;
|
|
243
221
|
}, function (props) {
|
|
244
222
|
return "".concat(props.theme.boxShadowOffsetX, " ").concat(props.theme.boxShadowOffsetY, " ").concat(props.theme.boxShadowBlur, " ").concat(props.theme.boxShadowColor);
|
|
245
223
|
}, function (props) {
|
|
@@ -248,6 +226,16 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
|
|
|
248
226
|
return props.theme.borderRadius;
|
|
249
227
|
}, function (props) {
|
|
250
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);
|
|
251
239
|
}, function (props) {
|
|
252
240
|
return "".concat(props.theme.hoverBackgroundColor);
|
|
253
241
|
}, function (props) {
|
|
@@ -257,17 +245,11 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
|
|
|
257
245
|
}, function (props) {
|
|
258
246
|
return props.theme.titleLabelPaddingBottom;
|
|
259
247
|
}, function (props) {
|
|
260
|
-
return props.theme.
|
|
248
|
+
return props.theme.titleLabelPaddingRight;
|
|
261
249
|
}, function (props) {
|
|
262
|
-
return props.theme.
|
|
250
|
+
return props.theme.titleLabelPaddingLeft;
|
|
263
251
|
}, function (props) {
|
|
264
|
-
return props.theme.
|
|
265
|
-
}, function (props) {
|
|
266
|
-
return props.theme.titleFocusBorderStyle;
|
|
267
|
-
}, function (props) {
|
|
268
|
-
return props.theme.titleFocusBorderColor;
|
|
269
|
-
}, function (props) {
|
|
270
|
-
return props.theme.customContentPanelHeight;
|
|
252
|
+
return props.disabled ? props.theme.disabledArrowColor : props.theme.arrowColor;
|
|
271
253
|
}, function (props) {
|
|
272
254
|
return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
|
|
273
255
|
}, function (props) {
|
|
@@ -293,20 +275,12 @@ var AccordionInfo = _styledComponents["default"].div(_templateObject2(), functio
|
|
|
293
275
|
}, function (props) {
|
|
294
276
|
return props.theme.titleFonLabeltWeight;
|
|
295
277
|
}, function (props) {
|
|
296
|
-
return props.disabled
|
|
278
|
+
return props.disabled ? props.theme.disabledTitleLabelFontColor : props.theme.titleLabelFontColor;
|
|
297
279
|
});
|
|
298
280
|
|
|
299
281
|
var AccordionLabel = _styledComponents["default"].div(_templateObject3());
|
|
300
282
|
|
|
301
|
-
var
|
|
302
|
-
return props.theme.customContentFontFamily;
|
|
303
|
-
}, function (props) {
|
|
304
|
-
return props.theme.customContentFontSize;
|
|
305
|
-
}, function (props) {
|
|
306
|
-
return props.theme.customContentFontWeight;
|
|
307
|
-
}, function (props) {
|
|
308
|
-
return props.disabled && props.theme.disabledFontColor || props.theme.customContentFontColor || props.theme.fontColorBase;
|
|
309
|
-
});
|
|
283
|
+
var AccordionContent = _styledComponents["default"].div(_templateObject4());
|
|
310
284
|
|
|
311
285
|
var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
312
286
|
return props.theme.assistiveTextPaddingLeft;
|
|
@@ -321,7 +295,7 @@ var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5()
|
|
|
321
295
|
}, function (props) {
|
|
322
296
|
return props.theme.assistiveTextFontWeight;
|
|
323
297
|
}, function (props) {
|
|
324
|
-
return props.disabled
|
|
298
|
+
return props.disabled ? props.theme.disabledAssistiveTextFontColor : props.theme.assistiveTextFontColor;
|
|
325
299
|
}, function (props) {
|
|
326
300
|
return props.theme.assistiveTextLetterSpacing;
|
|
327
301
|
}, function (props) {
|
|
@@ -329,18 +303,51 @@ var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5()
|
|
|
329
303
|
});
|
|
330
304
|
|
|
331
305
|
var IconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
332
|
-
return props.theme.
|
|
306
|
+
return props.theme.iconSize;
|
|
333
307
|
}, function (props) {
|
|
334
|
-
return props.theme.
|
|
308
|
+
return props.theme.iconSize;
|
|
335
309
|
}, function (props) {
|
|
336
310
|
return props.theme.iconMarginLeft;
|
|
337
311
|
}, function (props) {
|
|
338
312
|
return props.theme.iconMarginRigth;
|
|
339
313
|
}, function (props) {
|
|
340
|
-
return props.theme.
|
|
314
|
+
return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
|
|
341
315
|
});
|
|
342
316
|
|
|
343
|
-
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
|
+
});
|
|
344
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
|
+
};
|
|
345
352
|
var _default = DxcAccordion;
|
|
346
353
|
exports["default"] = _default;
|
|
@@ -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;
|