@dxc-technology/halstack-react 0.0.0-4e9134c → 0.0.0-4fd9593

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.
@@ -179,11 +179,11 @@ var parseTheme = function parseTheme(theme) {
179
179
  tabsTokens.pressedBackgroundColor = (_setLightness4 = setLightness(theme === null || theme === void 0 ? void 0 : (_theme$tabs6 = theme.tabs) === null || _theme$tabs6 === void 0 ? void 0 : _theme$tabs6.baseColor, 53)) !== null && _setLightness4 !== void 0 ? _setLightness4 : tabsTokens.pressedBackgroundColor;
180
180
  var toggleGroupTokens = componentTokensCopy.toggleGroup;
181
181
  toggleGroupTokens.unselectedBackgroundColor = (_ref56 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup = theme.toggleGroup) === null || _theme$toggleGroup === void 0 ? void 0 : _theme$toggleGroup.unselectedBaseColor) !== null && _ref56 !== void 0 ? _ref56 : toggleGroupTokens.unselectedBackgroundColor;
182
- toggleGroupTokens.unselectedBackgroundHoverColor = (_ref57 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup2 = theme.toggleGroup) === null || _theme$toggleGroup2 === void 0 ? void 0 : _theme$toggleGroup2.unselectedHoverBaseColor) !== null && _ref57 !== void 0 ? _ref57 : toggleGroupTokens.unselectedBackgroundHoverColor;
182
+ toggleGroupTokens.unselectedHoverBackgroundColor = (_ref57 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup2 = theme.toggleGroup) === null || _theme$toggleGroup2 === void 0 ? void 0 : _theme$toggleGroup2.unselectedHoverBaseColor) !== null && _ref57 !== void 0 ? _ref57 : toggleGroupTokens.unselectedHoverBackgroundColor;
183
183
  toggleGroupTokens.unselectedFontColor = (_ref58 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup3 = theme.toggleGroup) === null || _theme$toggleGroup3 === void 0 ? void 0 : _theme$toggleGroup3.unselectedFontColor) !== null && _ref58 !== void 0 ? _ref58 : toggleGroupTokens.unselectedFontColor;
184
184
  toggleGroupTokens.unselectedHoverFontColor = (_ref59 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup4 = theme.toggleGroup) === null || _theme$toggleGroup4 === void 0 ? void 0 : _theme$toggleGroup4.unselectedHoverFontColor) !== null && _ref59 !== void 0 ? _ref59 : toggleGroupTokens.unselectedHoverFontColor;
185
185
  toggleGroupTokens.selectedBackgroundColor = (_ref60 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup5 = theme.toggleGroup) === null || _theme$toggleGroup5 === void 0 ? void 0 : _theme$toggleGroup5.selectedBaseColor) !== null && _ref60 !== void 0 ? _ref60 : toggleGroupTokens.selectedBackgroundColor;
186
- toggleGroupTokens.selectedBackgroundHoverColor = (_ref61 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup6 = theme.toggleGroup) === null || _theme$toggleGroup6 === void 0 ? void 0 : _theme$toggleGroup6.selectedHoverBaseColor) !== null && _ref61 !== void 0 ? _ref61 : toggleGroupTokens.selectedBackgroundHoverColor;
186
+ toggleGroupTokens.selectedHoverBackgroundColor = (_ref61 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup6 = theme.toggleGroup) === null || _theme$toggleGroup6 === void 0 ? void 0 : _theme$toggleGroup6.selectedHoverBaseColor) !== null && _ref61 !== void 0 ? _ref61 : toggleGroupTokens.selectedHoverBackgroundColor;
187
187
  toggleGroupTokens.selectedFontColor = (_ref62 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup7 = theme.toggleGroup) === null || _theme$toggleGroup7 === void 0 ? void 0 : _theme$toggleGroup7.selectedFontColor) !== null && _ref62 !== void 0 ? _ref62 : toggleGroupTokens.selectedFontColor;
188
188
  toggleGroupTokens.selectedHoverFontColor = (_ref63 = theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup8 = theme.toggleGroup) === null || _theme$toggleGroup8 === void 0 ? void 0 : _theme$toggleGroup8.selectedHoverFontColor) !== null && _ref63 !== void 0 ? _ref63 : toggleGroupTokens.selectedHoverFontColor;
189
189
  toggleGroupTokens.disabledSelectedBackgroundColor = (_setOpacity25 = setOpacity(theme === null || theme === void 0 ? void 0 : (_theme$toggleGroup9 = theme.toggleGroup) === null || _theme$toggleGroup9 === void 0 ? void 0 : _theme$toggleGroup9.selectedBaseColor, 0.34)) !== null && _setOpacity25 !== void 0 ? _setOpacity25 : toggleGroupTokens.disabledSelectedBackgroundColor;
@@ -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 max-height: 20px;\n max-width: 20px;\n margin-left: 0px;\n margin-right: 10px;\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 max-height: ", ";\n max-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"]);
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\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"]);
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 font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", " !important;\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\n width: ", ";\n\n cursor: ", ";\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 :hover {\n background-color: ", ";\n }\n }\n\n .MuiButtonBase-root {\n border-radius: ", ";\n height: auto;\n &.Mui-expanded {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n .MuiSvgIcon-root {\n opacity: 1;\n }\n }\n\n &.MuiIconButton-root {\n height: auto;\n }\n\n .MuiExpansionPanelSummary-content {\n padding-top: ", ";\n padding-bottom: ", ";\n padding-right: 16px;\n padding-left: 0;\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\n .MuiExpansionPanelSummary-root.Mui-expanded {\n min-height: 48px;\n }\n\n .MuiTouchRipple-root {\n display: none;\n }\n }\n\n .MuiCollapse-hidden {\n display: none;\n }\n\n .MuiPaper-root.Mui-disabled {\n color: ", ";\n }\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\n .MuiExpansionPanelSummary-root.Mui-disabled {\n opacity: 1;\n }\n .MuiExpansionPanelSummary-root.Mui-focused {\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n }\n\n .MuiExpansionPanelDetails-root {\n height: ", ";\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n }\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\n width: ", ";\n\n cursor: ", ";\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 :hover {\n background-color: ", ";\n }\n }\n\n .MuiButtonBase-root {\n border-radius: ", ";\n height: auto;\n &.Mui-expanded {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n .MuiSvgIcon-root {\n opacity: 1;\n }\n }\n\n &.MuiIconButton-root {\n height: auto;\n }\n\n .MuiExpansionPanelSummary-content {\n padding-top: ", ";\n padding-bottom: ", ";\n padding-right: 16px;\n padding-left: 0;\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\n .MuiExpansionPanelSummary-root.Mui-expanded {\n min-height: 48px;\n }\n\n .MuiTouchRipple-root {\n display: none;\n }\n }\n\n .MuiCollapse-hidden {\n display: none;\n }\n\n .MuiPaper-root.Mui-disabled {\n color: ", ";\n }\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\n .MuiExpansionPanelSummary-root.Mui-disabled {\n opacity: 1;\n }\n .MuiExpansionPanelSummary-root.Mui-focused {\n border-width: ", ";\n border-style: ", ";\n border-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"])(); // const backgroundType = useContext(BackgroundColorContext);
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, null, (0, _typeof2["default"])(icon) === "object" ? icon : _react["default"].createElement(icon)) : iconSrc && _react["default"].createElement(AccordionIcon, {
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(AccordionText, {
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
@@ -257,17 +259,15 @@ var DXCAccordion = _styledComponents["default"].div(_templateObject(), function
257
259
  }, function (props) {
258
260
  return props.theme.titleLabelPaddingBottom;
259
261
  }, function (props) {
260
- return props.theme.disabledFontColor;
261
- }, function (props) {
262
- return props.theme.arrowColor;
262
+ return props.theme.disabledColor;
263
263
  }, function (props) {
264
- return props.theme.titleFocusBorderThickness;
264
+ return props.disabled ? props.theme.disabledColor : props.theme.arrowColor;
265
265
  }, function (props) {
266
- return props.theme.titleFocusBorderStyle;
266
+ return props.theme.focusBorderThickness;
267
267
  }, function (props) {
268
- return props.theme.titleFocusBorderColor;
268
+ return props.theme.focusBorderStyle;
269
269
  }, function (props) {
270
- return props.theme.customContentPanelHeight;
270
+ return props.theme.focusBorderColor;
271
271
  }, function (props) {
272
272
  return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
273
273
  }, function (props) {
@@ -293,20 +293,12 @@ var AccordionInfo = _styledComponents["default"].div(_templateObject2(), functio
293
293
  }, function (props) {
294
294
  return props.theme.titleFonLabeltWeight;
295
295
  }, function (props) {
296
- return props.disabled && props.theme.disabledFontColor || props.theme.titleLabelFontColor || props.theme.fontColorBase;
296
+ return props.disabled ? props.theme.disabledColor : props.theme.titleLabelFontColor;
297
297
  });
298
298
 
299
299
  var AccordionLabel = _styledComponents["default"].div(_templateObject3());
300
300
 
301
- var AccordionText = _styledComponents["default"].div(_templateObject4(), function (props) {
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
- });
301
+ var AccordionContent = _styledComponents["default"].div(_templateObject4());
310
302
 
311
303
  var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5(), function (props) {
312
304
  return props.theme.assistiveTextPaddingLeft;
@@ -321,7 +313,7 @@ var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5()
321
313
  }, function (props) {
322
314
  return props.theme.assistiveTextFontWeight;
323
315
  }, function (props) {
324
- return props.disabled && props.theme.disabledFontColor || props.theme.assistiveTextFontColor || props.theme.fontColorBase;
316
+ return props.disabled ? props.theme.disabledColor : props.theme.assistiveTextFontColor;
325
317
  }, function (props) {
326
318
  return props.theme.assistiveTextLetterSpacing;
327
319
  }, function (props) {
@@ -329,18 +321,28 @@ var AccordionAssistiveText = _styledComponents["default"].div(_templateObject5()
329
321
  });
330
322
 
331
323
  var IconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
332
- return props.theme.iconMaxHeight;
324
+ return props.theme.iconSize;
333
325
  }, function (props) {
334
- return props.theme.iconMaxWidth;
326
+ return props.theme.iconSize;
335
327
  }, function (props) {
336
328
  return props.theme.iconMarginLeft;
337
329
  }, function (props) {
338
330
  return props.theme.iconMarginRigth;
339
331
  }, function (props) {
340
- return props.theme.arrowColor;
332
+ return props.disabled ? props.theme.disabledColor : props.theme.iconColor;
341
333
  });
342
334
 
343
- var AccordionIcon = _styledComponents["default"].img(_templateObject7());
335
+ var AccordionIcon = _styledComponents["default"].img(_templateObject7(), function (props) {
336
+ return props.theme.iconSize;
337
+ }, function (props) {
338
+ return props.theme.iconSize;
339
+ }, function (props) {
340
+ return props.theme.iconMarginLeft;
341
+ }, function (props) {
342
+ return props.theme.iconMarginRigth;
343
+ }, function (props) {
344
+ return props.disabled ? props.theme.disabledColor : props.theme.iconColor;
345
+ });
344
346
 
345
347
  var _default = DxcAccordion;
346
348
  exports["default"] = _default;
@@ -37,6 +37,8 @@ var _utils = require("../common/utils.js");
37
37
 
38
38
  var _useTheme = _interopRequireDefault(require("../useTheme.js"));
39
39
 
40
+ var _BackgroundColorContext = require("../BackgroundColorContext.js");
41
+
40
42
  function _templateObject11() {
41
43
  var data = (0, _taggedTemplateLiteral2["default"])([""]);
42
44
 
@@ -58,7 +60,7 @@ function _templateObject10() {
58
60
  }
59
61
 
60
62
  function _templateObject9() {
61
- var data = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n overflow-y: auto;\n"]);
63
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n overflow-y: auto;\n"]);
62
64
 
63
65
  _templateObject9 = function _templateObject9() {
64
66
  return data;
@@ -88,7 +90,7 @@ function _templateObject7() {
88
90
  }
89
91
 
90
92
  function _templateObject6() {
91
- var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-right: ", ";\n padding-left: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n flex-grow: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
93
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-right: ", ";\n padding-left: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n flex-grow: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
92
94
 
93
95
  _templateObject6 = function _templateObject6() {
94
96
  return data;
@@ -98,7 +100,7 @@ function _templateObject6() {
98
100
  }
99
101
 
100
102
  function _templateObject5() {
101
- var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-right: ", ";\n padding-left: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n font-style: ", ";\n text-transform: ", ";\n"]);
103
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-right: ", ";\n padding-left: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n font-style: ", ";\n text-transform: ", ";\n"]);
102
104
 
103
105
  _templateObject5 = function _templateObject5() {
104
106
  return data;
@@ -187,7 +189,9 @@ var DxcAlert = function DxcAlert(_ref) {
187
189
  tabIndex: tabIndex
188
190
  }, _react["default"].createElement(CloseImg, {
189
191
  src: _close["default"]
190
- })))), children && _react["default"].createElement(AlertContent, null, children))));
192
+ })))), children && _react["default"].createElement(AlertContent, null, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
193
+ color: type === "info" && colorsTheme.alert.infoColor || type === "confirm" && colorsTheme.alert.successColor || type === "warning" && colorsTheme.alert.warningColor || type === "error" && colorsTheme.alert.errorColor
194
+ }, children)))));
191
195
  };
192
196
 
193
197
  var sizes = {
package/dist/box/Box.js CHANGED
@@ -30,7 +30,7 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
30
30
  var _BackgroundColorContext = require("../BackgroundColorContext.js");
31
31
 
32
32
  function _templateObject() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n letter-spacing: ", ";\n overflow: hidden;\n font-size: ", ";\n font-family: ", ";\n font-weight: ", ";\n color: ", ";\n width: ", ";\n background-color: ", ";\n box-shadow: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
33
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n letter-spacing: ", ";\n overflow: hidden;\n width: ", ";\n background-color: ", ";\n box-shadow: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
34
34
 
35
35
  _templateObject = function _templateObject() {
36
36
  return data;
@@ -91,14 +91,6 @@ var StyledDxcBox = _styledComponents["default"].div(_templateObject(), function
91
91
  return props.theme.borderColor;
92
92
  }, function (props) {
93
93
  return props.theme.letterSpacing;
94
- }, function (props) {
95
- return props.theme.fontSize;
96
- }, function (props) {
97
- return props.theme.fontFamily;
98
- }, function (props) {
99
- return props.theme.fontWeight;
100
- }, function (props) {
101
- return props.theme.fontColor;
102
94
  }, function (props) {
103
95
  return calculateWidth(props.margin, props.size, props.padding);
104
96
  }, function (props) {
@@ -46,7 +46,7 @@ function _templateObject3() {
46
46
  }
47
47
 
48
48
  function _templateObject2() {
49
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: ", ";\n display: inline-flex;\n align-items: center;\n cursor: ", ";\n position: relative;\n flex-direction: ", ";\n .MuiCheckbox-colorSecondary {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n &.Mui-disabled {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n opacity: 0.34;\n }\n }\n }\n &.Mui-checked {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n\n &:hover {\n background-color: transparent;\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n background-color: transparent;\n color: ", ";\n }\n }\n }\n }\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n width: 26.6px;\n height: 26.6px;\n }\n }\n }\n\n .MuiIconButton-colorSecondary {\n &:hover {\n background-color: transparent;\n }\n }\n .MuiButtonBase-root {\n &:hover {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n }\n &.Mui-focusVisible {\n .MuiIconButton-label {\n outline: ", " auto 1px;\n }\n }\n z-index: 1;\n padding: 10px;\n ", ": ", ";\n padding-left: ", ";\n padding-right: ", ";\n margin: 2px;\n margin-left: ", ";\n margin-right: ", ";\n }\n"]);
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: ", ";\n display: inline-flex;\n align-items: center;\n cursor: ", ";\n position: relative;\n flex-direction: ", ";\n .MuiCheckbox-colorSecondary {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n &.Mui-disabled {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n opacity: 0.34;\n }\n }\n }\n &.Mui-checked {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n\n &:hover {\n background-color: transparent;\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n background-color: transparent;\n color: ", ";\n }\n }\n }\n }\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n width: 26.6px;\n height: 26.6px;\n }\n }\n }\n\n .MuiIconButton-colorSecondary {\n &:hover {\n background-color: transparent;\n }\n }\n .MuiButtonBase-root {\n &:hover {\n .MuiIconButton-label {\n & > .MuiSvgIcon-root {\n color: ", ";\n }\n }\n }\n &.Mui-focusVisible {\n .MuiIconButton-label {\n outline: ", "\n auto 1px;\n }\n }\n z-index: 1;\n padding: 10px;\n ", ": ", ";\n padding-left: ", ";\n padding-right: ", ";\n margin: 2px;\n margin-left: ", ";\n margin-right: ", ";\n }\n"]);
50
50
 
51
51
  _templateObject2 = function _templateObject2() {
52
52
  return data;
@@ -91,7 +91,7 @@ var DxcCheckbox = function DxcCheckbox(_ref) {
91
91
  setInnerChecked = _useState2[1];
92
92
 
93
93
  var colorsTheme = (0, _useTheme["default"])();
94
- var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]) || "light";
94
+ var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
95
95
 
96
96
  var handlerCheckboxChange = function handlerCheckboxChange(checkboxValue) {
97
97
  if (checked === undefined) {
@@ -237,11 +237,11 @@ var CheckboxContainer = _styledComponents["default"].span(_templateObject2(), fu
237
237
  }, function (props) {
238
238
  return props.disabled ? getDisabledColor(props, "background") : getNotDisabledColor(props, "background");
239
239
  }, function (props) {
240
- return props.backgroundType && props.backgroundType === "dark" ? props.theme.backgroundHoverColorCheckedOnDark : props.theme.backgroundHoverColorChecked;
240
+ return props.backgroundType === "dark" ? props.theme.hoverBackgroundColorCheckedOnDark : props.theme.hoverBackgroundColorChecked;
241
241
  }, function (props) {
242
- return props.backgroundType && props.backgroundType === "dark" ? props.theme.borderHoverColorOnDark : props.theme.borderHoverColor;
242
+ return props.backgroundType === "dark" ? props.theme.hoverBorderColorOnDark : props.theme.hoverBorderColor;
243
243
  }, function (props) {
244
- return props.theme.focusColor;
244
+ return props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor;
245
245
  }, function (props) {
246
246
  return props.labelPosition === "after" ? "padding-right" : "padding-left";
247
247
  }, function (props) {
package/dist/chip/Chip.js CHANGED
@@ -28,7 +28,7 @@ var _utils = require("../common/utils.js");
28
28
  var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
29
 
30
30
  function _templateObject5() {
31
- var data = (0, _taggedTemplateLiteral2["default"])(["\n opacity: ", ";\n ", "\n ", "\n width: ", ";\n height: ", ";\n overflow: hidden;\n padding-left: ", ";\n padding-right: ", ";\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
31
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n ", "\n ", "\n width: ", ";\n height: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n &:focus {\n outline-color: ", ";\n outline-width: 2px;\n ", "\n }\n"]);
32
32
 
33
33
  _templateObject5 = function _templateObject5() {
34
34
  return data;
@@ -38,7 +38,7 @@ function _templateObject5() {
38
38
  }
39
39
 
40
40
  function _templateObject4() {
41
- var data = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n margin-right: ", ";\n width: ", ";\n height: ", ";\n padding-left: \"", "\";\n padding-right: ", ";\n"]);
41
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n ", "\n margin-right: ", ";\n width: ", ";\n height: ", ";\n"]);
42
42
 
43
43
  _templateObject4 = function _templateObject4() {
44
44
  return data;
@@ -48,7 +48,7 @@ function _templateObject4() {
48
48
  }
49
49
 
50
50
  function _templateObject3() {
51
- var data = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n margin-left: ", ";\n width: ", ";\n height: ", ";\n padding-left: ", ";\n padding-right: ", ";\n"]);
51
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n ", "\n margin-left: ", ";\n width: ", ";\n height: ", ";\n"]);
52
52
 
53
53
  _templateObject3 = function _templateObject3() {
54
54
  return data;
@@ -68,7 +68,7 @@ function _templateObject2() {
68
68
  }
69
69
 
70
70
  function _templateObject() {
71
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n border-radius: ", ";\n max-width: ", ";\n background-color: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n cursor: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
71
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n min-height: 40px;\n max-width: ", ";\n background-color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n"]);
72
72
 
73
73
  _templateObject = function _templateObject() {
74
74
  return data;
@@ -152,13 +152,13 @@ var getCursor = function getCursor(interactuable, disabled) {
152
152
  return "cursor:default; outline:none;";
153
153
  };
154
154
 
155
- var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function (props) {
156
- return props.theme.borderRadius;
157
- }, function (_ref2) {
155
+ var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function (_ref2) {
158
156
  var margin = _ref2.margin;
159
157
  return "calc(100% - 40px - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
160
158
  }, function (props) {
161
159
  return props.disabled && props.theme.disabledBackgroundColor || props.theme.backgroundColor;
160
+ }, function (props) {
161
+ return props.theme.borderRadius;
162
162
  }, function (props) {
163
163
  return props.theme.borderThickness;
164
164
  }, function (props) {
@@ -173,9 +173,6 @@ var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function
173
173
  return props.theme.contentPaddingLeft;
174
174
  }, function (props) {
175
175
  return props.theme.contentPaddingRight;
176
- }, function (_ref3) {
177
- var disabled = _ref3.disabled;
178
- return disabled && "not-allowed";
179
176
  }, function (props) {
180
177
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
181
178
  }, function (props) {
@@ -186,6 +183,9 @@ var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function
186
183
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
187
184
  }, function (props) {
188
185
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
186
+ }, function (_ref3) {
187
+ var disabled = _ref3.disabled;
188
+ return disabled && "not-allowed";
189
189
  });
190
190
 
191
191
  var ChipTextContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
@@ -197,44 +197,40 @@ var ChipTextContainer = _styledComponents["default"].span(_templateObject2(), fu
197
197
  }, function (props) {
198
198
  return props.theme.fontStyle;
199
199
  }, function (props) {
200
- return props.disabled && props.theme.disabledFontColor || props.theme.fontColor;
200
+ return props.disabled ? props.theme.disabledFontColor : props.theme.fontColor;
201
201
  }, function (_ref4) {
202
202
  var disabled = _ref4.disabled;
203
203
  return disabled && "not-allowed" || "default";
204
204
  });
205
205
 
206
206
  var SuffixIconContainer = _styledComponents["default"].img(_templateObject3(), function (props) {
207
+ return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
208
+ }, function (props) {
207
209
  return getCursor(props.interactuable, props.disabled);
208
210
  }, function (props) {
209
- return (props.label || props.suffixIconSrc) && "10px" || props.prefixIconSrc && "5px";
211
+ return (props.label || props.suffixIconSrc) && props.theme.iconSpacing || props.prefixIconSrc && "5px";
210
212
  }, function (props) {
211
213
  return props.theme.iconSize;
212
214
  }, function (props) {
213
215
  return props.theme.iconSize;
214
- }, function (props) {
215
- return props.theme.iconPaddingLeft;
216
- }, function (props) {
217
- return props.theme.iconPaddingRight;
218
216
  });
219
217
 
220
218
  var PrefixIconContainer = _styledComponents["default"].img(_templateObject4(), function (props) {
219
+ return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
220
+ }, function (props) {
221
221
  return getCursor(props.interactuable, props.disabled);
222
222
  }, function (props) {
223
- return (props.label || props.suffixIconSrc) && "10px" || props.prefixIconSrc && "5px";
223
+ return (props.label || props.suffixIconSrc) && props.theme.iconSpacing || props.prefixIconSrc && "5px";
224
224
  }, function (props) {
225
225
  return props.theme.iconSize;
226
226
  }, function (props) {
227
227
  return props.theme.iconSize;
228
- }, function (props) {
229
- return props.theme.iconPaddingLeft;
230
- }, function (props) {
231
- return props.theme.iconPaddingRight;
232
228
  });
233
229
 
234
230
  var IconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
235
- return props.disabled && "0.34";
231
+ return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
236
232
  }, function (props) {
237
- return props.prefixIcon ? "margin-right: ".concat((props.label || props.suffixIcon || props.suffixIconSrc) && "10px" || (props.prefixIcon || props.prefixIconSrc) && "0", ";") : "margin-left: ".concat((props.label || props.prefixIcon || props.prefixIconSrc) && "10px" || (props.prefixIcon || props.prefixIconSrc) && "0", ";");
233
+ return props.prefixIcon ? "margin-right: ".concat((props.label || props.suffixIcon || props.suffixIconSrc) && props.theme.iconSpacing || (props.prefixIcon || props.prefixIconSrc) && "0", ";") : "margin-left: ".concat((props.label || props.prefixIcon || props.prefixIconSrc) && props.theme.iconSpacing || (props.prefixIcon || props.prefixIconSrc) && "0", ";");
238
234
  }, function (props) {
239
235
  return getCursor(props.interactuable, props.disabled);
240
236
  }, function (props) {
@@ -242,9 +238,9 @@ var IconContainer = _styledComponents["default"].div(_templateObject5(), functio
242
238
  }, function (props) {
243
239
  return props.theme.iconSize;
244
240
  }, function (props) {
245
- return props.theme.iconPaddingLeft;
241
+ return props.theme.focusColor;
246
242
  }, function (props) {
247
- return props.theme.iconPaddingRight;
243
+ return props.disabled && "outline: none;";
248
244
  });
249
245
 
250
246
  DxcChip.propTypes = {