@dxc-technology/halstack-react 0.0.0-7da4f49 → 0.0.0-7e6bf6c

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.
@@ -85,7 +85,7 @@ var parseAdvancedTheme = function parseAdvancedTheme(advancedTheme) {
85
85
  };
86
86
 
87
87
  var parseTheme = function parseTheme(theme) {
88
- var _theme$accordion$font, _theme$accordion, _theme$accordion$font2, _theme$accordion2, _theme$accordion$acce, _theme$accordion3, _theme$accordion$acce2, _theme$accordion4, _theme$accordion$acce3, _theme$accordion5, _setOpacity, _theme$accordion6, _theme$button$primary, _theme$button, _theme$button$baseCol, _theme$button2, _theme$button$baseCol2, _theme$button3, _theme$button$seconda, _theme$button4, _theme$button$baseCol3, _theme$button5, _theme$button$baseCol4, _theme$button6, _theme$button$baseCol5, _theme$button7, _subLightness, _theme$button8, _subLightness2, _theme$button9, _subLightness3, _theme$button10, _addLightness, _theme$button11, _addLightness2, _theme$button12, _theme$checkbox$baseC, _theme$checkbox, _theme$checkbox$baseC2, _theme$checkbox2, _theme$checkbox$check, _theme$checkbox3, _theme$checkbox$fontC, _theme$checkbox4, _subLightness4, _theme$checkbox5, _subLightness5, _theme$checkbox6, _theme$chip$baseColor, _theme$chip, _theme$chip$fontColor, _theme$chip2, _theme$chip$fontColor2, _theme$chip3, _theme$dateInput$sele, _theme$dateInput, _theme$dateInput$sele2, _theme$dateInput2, _setOpacity2, _theme$dateInput3, _theme$dropdown$baseC, _theme$dropdown, _theme$dropdown$fontC, _theme$dropdown2, _theme$dropdown$optio, _theme$dropdown3, _theme$dropdown$optio2, _theme$dropdown4, _setOpacity3, _theme$dropdown5, _setOpacity4, _theme$dropdown6, _setOpacity5, _theme$dropdown7, _setOpacity6, _theme$dropdown8, _theme$dropdown$fontC2, _theme$dropdown9, _theme$dropdown$fontC3, _theme$dropdown10, _theme$fileInput$font, _theme$fileInput, _theme$fileInput$font2, _theme$fileInput2, _theme$fileInput$font3, _theme$fileInput3, _theme$fileInput$font4, _theme$fileInput4, _theme$footer$baseCol, _theme$footer, _theme$footer$fontCol, _theme$footer2, _theme$footer$fontCol2, _theme$footer3, _theme$footer$fontCol3, _theme$footer4, _theme$footer$accentC, _theme$footer5, _theme$footer$logo, _theme$footer6, _theme$header$baseCol, _theme$header, _theme$header$accentC, _theme$header2, _theme$header$menuBas, _theme$header3, _theme$header$fontCol, _theme$header4, _theme$header$hamburg, _theme$header5, _setOpacity7, _theme$header6, _theme$header$logo, _theme$header7, _theme$header$logoRes, _theme$header8, _theme$header$content, _theme$header9, _theme$paginator$base, _theme$paginator, _theme$paginator$font, _theme$paginator2, _theme$progressBar$ac, _theme$progressBar, _theme$progressBar$ba, _theme$progressBar2, _theme$progressBar$fo, _theme$progressBar3, _theme$progressBar$fo2, _theme$progressBar4, _theme$progressBar$fo3, _theme$progressBar5, _theme$quickNav$fontC, _theme$quickNav, _theme$quickNav$accen, _theme$quickNav2, _setOpacity8, _theme$quickNav3, _theme$radio$baseColo, _theme$radio, _theme$radio$fontColo, _theme$radio2, _theme$radioGroup$bas, _theme$radioGroup, _theme$radioGroup$fon, _theme$radioGroup2, _theme$radioGroup$fon2, _theme$radioGroup3, _theme$radioGroup$fon3, _theme$radioGroup4, _theme$select$selecte, _theme$select, _theme$select$fontCol, _theme$select2, _theme$select$fontCol2, _theme$select3, _theme$select$fontCol3, _theme$select4, _theme$select$optionF, _theme$select5, _setOpacity9, _theme$select6, _theme$select$fontCol4, _theme$select7, _subLightness6, _theme$select8, _subLightness7, _theme$select9, _theme$sidenav$baseCo, _theme$sidenav, _theme$slider$fontCol, _theme$slider, _theme$slider$fontCol2, _theme$slider2, _theme$slider$fontCol3, _theme$slider3, _theme$slider$baseCol, _theme$slider4, _theme$slider$baseCol2, _theme$slider5, _theme$slider$baseCol3, _theme$slider6, _theme$slider$baseCol4, _theme$slider7, _subLightness8, _theme$slider8, _subLightness9, _theme$slider9, _setOpacity10, _theme$slider10, _theme$spinner$accent, _theme$spinner, _theme$spinner$baseCo, _theme$spinner2, _theme$spinner$fontCo, _theme$spinner3, _theme$spinner$fontCo2, _theme$spinner4, _theme$switch$checked, _theme$switch, _theme$switch$fontCol, _theme$switch2, _setOpacity11, _theme$switch3, _theme$table$baseColo, _theme$table, _theme$table$headerFo, _theme$table2, _theme$table$cellFont, _theme$table3, _theme$table$headerFo2, _theme$table4, _theme$tabs$baseColor, _theme$tabs, _theme$tabs$baseColor2, _theme$tabs2, _theme$tabs$baseColor3, _theme$tabs3, _theme$tabs$baseColor4, _theme$tabs4, _addLightness3, _theme$tabs5, _addLightness4, _theme$tabs6, _theme$textInput$font, _theme$textInput, _theme$textInput$font2, _theme$textInput2, _theme$textInput$font3, _theme$textInput3, _theme$textInput$font4, _theme$textInput4, _theme$textInput$font5, _theme$textInput5, _theme$textInput$font6, _theme$textInput6, _theme$textInput$font7, _theme$textInput7, _setOpacity12, _theme$textInput8, _setOpacity13, _theme$textInput9, _setOpacity14, _theme$textInput10, _theme$toggleGroup$se, _theme$toggleGroup, _theme$toggleGroup$se2, _theme$toggleGroup2, _theme$toggleGroup$un, _theme$toggleGroup3, _theme$toggleGroup$se3, _theme$toggleGroup4, _theme$toggleGroup$un2, _theme$toggleGroup5, _subLightness10, _theme$toggleGroup6, _subLightness11, _theme$toggleGroup7, _addLightness5, _theme$toggleGroup8, _addLightness6, _theme$toggleGroup9, _subLightness12, _theme$toggleGroup10, _theme$wizard$baseCol, _theme$wizard, _theme$wizard$fontCol, _theme$wizard2, _theme$wizard$baseCol2, _theme$wizard3, _theme$wizard$fontCol2, _theme$wizard4, _theme$wizard$fontCol3, _theme$wizard5, _theme$wizard$fontCol4, _theme$wizard6, _theme$wizard$fontCol5, _theme$wizard7, _setOpacity15, _theme$wizard8, _setOpacity16, _theme$wizard9, _setOpacity17, _theme$wizard10, _setOpacity18, _theme$wizard11;
88
+ var _theme$accordion$font, _theme$accordion, _theme$accordion$font2, _theme$accordion2, _theme$accordion$acce, _theme$accordion3, _theme$accordion$acce2, _theme$accordion4, _theme$accordion$acce3, _theme$accordion5, _setOpacity, _theme$accordion6, _theme$button$primary, _theme$button, _theme$button$baseCol, _theme$button2, _theme$button$baseCol2, _theme$button3, _theme$button$seconda, _theme$button4, _theme$button$baseCol3, _theme$button5, _theme$button$baseCol4, _theme$button6, _theme$button$baseCol5, _theme$button7, _subLightness, _theme$button8, _subLightness2, _theme$button9, _subLightness3, _theme$button10, _addLightness, _theme$button11, _addLightness2, _theme$button12, _theme$checkbox$baseC, _theme$checkbox, _theme$checkbox$baseC2, _theme$checkbox2, _theme$checkbox$check, _theme$checkbox3, _theme$checkbox$fontC, _theme$checkbox4, _subLightness4, _theme$checkbox5, _subLightness5, _theme$checkbox6, _theme$chip$baseColor, _theme$chip, _theme$chip$fontColor, _theme$chip2, _theme$chip$fontColor2, _theme$chip3, _theme$dateInput$sele, _theme$dateInput, _theme$dateInput$sele2, _theme$dateInput2, _setOpacity2, _theme$dateInput3, _theme$dropdown$baseC, _theme$dropdown, _theme$dropdown$fontC, _theme$dropdown2, _theme$dropdown$optio, _theme$dropdown3, _theme$dropdown$optio2, _theme$dropdown4, _setOpacity3, _theme$dropdown5, _setOpacity4, _theme$dropdown6, _setOpacity5, _theme$dropdown7, _setOpacity6, _theme$dropdown8, _theme$dropdown$fontC2, _theme$dropdown9, _theme$dropdown$fontC3, _theme$dropdown10, _theme$fileInput$font, _theme$fileInput, _theme$fileInput$font2, _theme$fileInput2, _theme$fileInput$font3, _theme$fileInput3, _theme$fileInput$font4, _theme$fileInput4, _theme$footer$baseCol, _theme$footer, _theme$footer$fontCol, _theme$footer2, _theme$footer$fontCol2, _theme$footer3, _theme$footer$fontCol3, _theme$footer4, _theme$footer$accentC, _theme$footer5, _theme$footer$logo, _theme$footer6, _theme$header$baseCol, _theme$header, _theme$header$accentC, _theme$header2, _theme$header$menuBas, _theme$header3, _theme$header$fontCol, _theme$header4, _theme$header$hamburg, _theme$header5, _setOpacity7, _theme$header6, _theme$header$logo, _theme$header7, _theme$header$logoRes, _theme$header8, _theme$header$content, _theme$header9, _theme$paginator$base, _theme$paginator, _theme$paginator$font, _theme$paginator2, _theme$progressBar$ac, _theme$progressBar, _theme$progressBar$ba, _theme$progressBar2, _theme$progressBar$fo, _theme$progressBar3, _theme$progressBar$fo2, _theme$progressBar4, _theme$progressBar$fo3, _theme$progressBar5, _theme$quickNav$fontC, _theme$quickNav, _theme$quickNav$accen, _theme$quickNav2, _setOpacity8, _theme$quickNav3, _theme$radioGroup$bas, _theme$radioGroup, _theme$radioGroup$fon, _theme$radioGroup2, _theme$radioGroup$fon2, _theme$radioGroup3, _theme$radioGroup$fon3, _theme$radioGroup4, _theme$select$selecte, _theme$select, _theme$select$fontCol, _theme$select2, _theme$select$fontCol2, _theme$select3, _theme$select$fontCol3, _theme$select4, _theme$select$optionF, _theme$select5, _setOpacity9, _theme$select6, _theme$select$fontCol4, _theme$select7, _subLightness6, _theme$select8, _subLightness7, _theme$select9, _theme$sidenav$baseCo, _theme$sidenav, _theme$slider$fontCol, _theme$slider, _theme$slider$fontCol2, _theme$slider2, _theme$slider$fontCol3, _theme$slider3, _theme$slider$baseCol, _theme$slider4, _theme$slider$baseCol2, _theme$slider5, _theme$slider$baseCol3, _theme$slider6, _theme$slider$baseCol4, _theme$slider7, _subLightness8, _theme$slider8, _subLightness9, _theme$slider9, _setOpacity10, _theme$slider10, _theme$spinner$accent, _theme$spinner, _theme$spinner$baseCo, _theme$spinner2, _theme$spinner$fontCo, _theme$spinner3, _theme$spinner$fontCo2, _theme$spinner4, _theme$switch$checked, _theme$switch, _theme$switch$fontCol, _theme$switch2, _setOpacity11, _theme$switch3, _theme$table$baseColo, _theme$table, _theme$table$headerFo, _theme$table2, _theme$table$cellFont, _theme$table3, _theme$table$headerFo2, _theme$table4, _theme$tabs$baseColor, _theme$tabs, _theme$tabs$baseColor2, _theme$tabs2, _theme$tabs$baseColor3, _theme$tabs3, _theme$tabs$baseColor4, _theme$tabs4, _addLightness3, _theme$tabs5, _addLightness4, _theme$tabs6, _theme$textInput$font, _theme$textInput, _theme$textInput$font2, _theme$textInput2, _theme$textInput$font3, _theme$textInput3, _theme$textInput$font4, _theme$textInput4, _theme$textInput$font5, _theme$textInput5, _theme$textInput$font6, _theme$textInput6, _theme$textInput$font7, _theme$textInput7, _setOpacity12, _theme$textInput8, _setOpacity13, _theme$textInput9, _setOpacity14, _theme$textInput10, _theme$toggleGroup$se, _theme$toggleGroup, _theme$toggleGroup$se2, _theme$toggleGroup2, _theme$toggleGroup$un, _theme$toggleGroup3, _theme$toggleGroup$se3, _theme$toggleGroup4, _theme$toggleGroup$un2, _theme$toggleGroup5, _subLightness10, _theme$toggleGroup6, _subLightness11, _theme$toggleGroup7, _addLightness5, _theme$toggleGroup8, _addLightness6, _theme$toggleGroup9, _subLightness12, _theme$toggleGroup10, _theme$wizard$baseCol, _theme$wizard, _theme$wizard$fontCol, _theme$wizard2, _theme$wizard$baseCol2, _theme$wizard3, _theme$wizard$fontCol2, _theme$wizard4, _theme$wizard$fontCol3, _theme$wizard5, _theme$wizard$fontCol4, _theme$wizard6, _theme$wizard$fontCol5, _theme$wizard7, _setOpacity15, _theme$wizard8, _setOpacity16, _theme$wizard9, _setOpacity17, _theme$wizard10, _setOpacity18, _theme$wizard11;
89
89
 
90
90
  var componentTokensCopy = JSON.parse(JSON.stringify(_variables.componentTokens));
91
91
  var accordionTokens = componentTokensCopy.accordion;
@@ -169,9 +169,6 @@ var parseTheme = function parseTheme(theme) {
169
169
  quickNavTokens.fontColor = (_theme$quickNav$fontC = theme === null || theme === void 0 ? void 0 : (_theme$quickNav = theme.quickNav) === null || _theme$quickNav === void 0 ? void 0 : _theme$quickNav.fontColor) !== null && _theme$quickNav$fontC !== void 0 ? _theme$quickNav$fontC : quickNavTokens.fontColor;
170
170
  quickNavTokens.selectedFontColor = (_theme$quickNav$accen = theme === null || theme === void 0 ? void 0 : (_theme$quickNav2 = theme.quickNav) === null || _theme$quickNav2 === void 0 ? void 0 : _theme$quickNav2.accentColor) !== null && _theme$quickNav$accen !== void 0 ? _theme$quickNav$accen : quickNavTokens.selectedFontColor;
171
171
  quickNavTokens.hoverFontColor = (_setOpacity8 = setOpacity(theme === null || theme === void 0 ? void 0 : (_theme$quickNav3 = theme.quickNav) === null || _theme$quickNav3 === void 0 ? void 0 : _theme$quickNav3.accentColor, 0.7)) !== null && _setOpacity8 !== void 0 ? _setOpacity8 : quickNavTokens.hoverFontColor;
172
- var radioTokens = componentTokensCopy.radio;
173
- radioTokens.color = (_theme$radio$baseColo = theme === null || theme === void 0 ? void 0 : (_theme$radio = theme.radio) === null || _theme$radio === void 0 ? void 0 : _theme$radio.baseColor) !== null && _theme$radio$baseColo !== void 0 ? _theme$radio$baseColo : radioTokens.color;
174
- radioTokens.fontColor = (_theme$radio$fontColo = theme === null || theme === void 0 ? void 0 : (_theme$radio2 = theme.radio) === null || _theme$radio2 === void 0 ? void 0 : _theme$radio2.fontColor) !== null && _theme$radio$fontColo !== void 0 ? _theme$radio$fontColo : radioTokens.color;
175
172
  var radioGroupTokens = componentTokensCopy.radioGroup;
176
173
  radioGroupTokens.radioInputColor = (_theme$radioGroup$bas = theme === null || theme === void 0 ? void 0 : (_theme$radioGroup = theme.radioGroup) === null || _theme$radioGroup === void 0 ? void 0 : _theme$radioGroup.baseColor) !== null && _theme$radioGroup$bas !== void 0 ? _theme$radioGroup$bas : radioGroupTokens.radioInputColor;
177
174
  radioGroupTokens.labelFontColor = (_theme$radioGroup$fon = theme === null || theme === void 0 ? void 0 : (_theme$radioGroup2 = theme.radioGroup) === null || _theme$radioGroup2 === void 0 ? void 0 : _theme$radioGroup2.fontColor) !== null && _theme$radioGroup$fon !== void 0 ? _theme$radioGroup$fon : radioGroupTokens.labelFontColor;
package/badge/Badge.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import BadgePropsType from "./types";
3
- declare const DxcBadge: ({ notificationText }: BadgePropsType) => JSX.Element;
3
+ declare const DxcBadge: ({ notificationText, disabled }: BadgePropsType) => JSX.Element;
4
4
  export default DxcBadge;
package/badge/Badge.js CHANGED
@@ -24,17 +24,19 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
 
26
26
  var DxcBadge = function DxcBadge(_ref) {
27
- var notificationText = _ref.notificationText;
27
+ var notificationText = _ref.notificationText,
28
+ disabled = _ref.disabled;
28
29
  var colorsTheme = (0, _useTheme["default"])();
29
30
  return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
30
31
  theme: colorsTheme.tabs
31
32
  }, /*#__PURE__*/_react["default"].createElement(StyledDxcBadge, {
32
- notificationText: notificationText
33
+ notificationText: notificationText,
34
+ disabled: disabled
33
35
  }, /*#__PURE__*/_react["default"].createElement("span", null, notificationText)));
34
36
  };
35
37
 
36
38
  var StyledDxcBadge = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n display: flex;\n padding-bottom: 1px;\n padding-right: 1px;\n flex-wrap: wrap;\n box-sizing: border-box;\n align-items: center;\n line-height: 1;\n align-content: center;\n flex-direction: row;\n justify-content: center;\n"])), function (props) {
37
- return props.theme.badgeBackgroundColor;
39
+ return props.disabled ? props.theme.disabledBadgeBackgroundColor : props.theme.badgeBackgroundColor;
38
40
  }, function (props) {
39
41
  return props.theme.badgeFontFamily;
40
42
  }, function (props) {
package/badge/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  declare type Props = {
2
2
  notificationText: boolean | number | string;
3
+ disabled?: boolean;
3
4
  };
4
5
  export default Props;
package/box/Box.js CHANGED
@@ -71,9 +71,8 @@ var calculateWidth = function calculateWidth(margin, size, padding) {
71
71
  return sizes[size];
72
72
  };
73
73
 
74
- var StyledDxcBox = _styledComponents["default"].div(_templateObject || (_templateObject = (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"])), function (_ref2) {
75
- var display = _ref2.display;
76
- return display;
74
+ var StyledDxcBox = _styledComponents["default"].div(_templateObject || (_templateObject = (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"])), function (props) {
75
+ return props.display;
77
76
  }, function (props) {
78
77
  return props.theme.borderRadius;
79
78
  }, function (props) {
@@ -90,36 +89,27 @@ var StyledDxcBox = _styledComponents["default"].div(_templateObject || (_templat
90
89
  return props.theme.backgroundColor;
91
90
  }, function (props) {
92
91
  return props.shadowDepth === 1 ? "".concat(props.theme.oneShadowDepthShadowOffsetX, " ").concat(props.theme.oneShadowDepthShadowOffsetY, " ").concat(props.theme.oneShadowDepthShadowBlur, " ").concat(props.theme.oneShadowDepthShadowSpread, " ").concat(props.theme.oneShadowDepthShadowColor) : props.shadowDepth === 2 ? "".concat(props.theme.twoShadowDepthShadowOffsetX, " ").concat(props.theme.twoShadowDepthShadowOffsetY, " ").concat(props.theme.twoShadowDepthShadowBlur, " ").concat(props.theme.twoShadowDepthShadowSpread, " ").concat(props.theme.twoShadowDepthShadowColor) : "".concat(props.theme.noneShadowDepthShadowOffsetX, " ").concat(props.theme.noneShadowDepthShadowOffsetY, " ").concat(props.theme.noneShadowDepthShadowBlur, " ").concat(props.theme.noneShadowDepthShadowSpread, " ").concat(props.theme.noneShadowDepthShadowColor);
93
- }, function (_ref3) {
94
- var margin = _ref3.margin;
95
- return margin && (0, _typeof2["default"])(margin) !== "object" ? _variables.spaces[margin] : "0px";
96
- }, function (_ref4) {
97
- var margin = _ref4.margin;
98
- return margin && margin.top ? _variables.spaces[margin.top] : "";
99
- }, function (_ref5) {
100
- var margin = _ref5.margin;
101
- return margin && margin.right ? _variables.spaces[margin.right] : "";
102
- }, function (_ref6) {
103
- var margin = _ref6.margin;
104
- return margin && margin.bottom ? _variables.spaces[margin.bottom] : "";
105
- }, function (_ref7) {
106
- var margin = _ref7.margin;
107
- return margin && margin.left ? _variables.spaces[margin.left] : "";
108
- }, function (_ref8) {
109
- var padding = _ref8.padding;
92
+ }, function (props) {
93
+ return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
94
+ }, function (props) {
95
+ return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
96
+ }, function (props) {
97
+ return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
98
+ }, function (props) {
99
+ return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
100
+ }, function (props) {
101
+ return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
102
+ }, function (_ref2) {
103
+ var padding = _ref2.padding;
110
104
  return padding && (0, _typeof2["default"])(padding) !== "object" ? _variables.spaces[padding] : "0px";
111
- }, function (_ref9) {
112
- var padding = _ref9.padding;
113
- return padding && padding.top ? _variables.spaces[padding.top] : "";
114
- }, function (_ref10) {
115
- var padding = _ref10.padding;
116
- return padding && padding.right ? _variables.spaces[padding.right] : "";
117
- }, function (_ref11) {
118
- var padding = _ref11.padding;
119
- return padding && padding.bottom ? _variables.spaces[padding.bottom] : "";
120
- }, function (_ref12) {
121
- var padding = _ref12.padding;
122
- return padding && padding.left ? _variables.spaces[padding.left] : "";
105
+ }, function (props) {
106
+ return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
107
+ }, function (props) {
108
+ return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
109
+ }, function (props) {
110
+ return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
111
+ }, function (props) {
112
+ return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
123
113
  });
124
114
 
125
115
  var _default = DxcBox;
@@ -800,24 +800,6 @@ var componentTokens = {
800
800
  fontStyle: globalTokens.type_normal,
801
801
  fontWeight: globalTokens.type_regular
802
802
  },
803
- radio: {
804
- circleLabelSpacing: "10px",
805
- circleSize: "24px",
806
- color: globalTokens.black,
807
- colorOnDark: globalTokens.white,
808
- disabledColor: globalTokens.lighterBlack,
809
- disabledColorOnDark: "#575757",
810
- disabledFontColor: globalTokens.lighterBlack,
811
- disabledFontColorOnDark: "#575757",
812
- focusColor: globalTokens.hal_blue_l_50,
813
- focusColorOnDark: "#1682FF",
814
- fontColor: globalTokens.inherit,
815
- fontColorOnDark: globalTokens.white,
816
- fontFamily: globalTokens.type_sans,
817
- fontSize: globalTokens.type_scale_root,
818
- fontStyle: globalTokens.type_normal,
819
- fontWeight: globalTokens.type_regular
820
- },
821
803
  radioGroup: {
822
804
  fontFamily: globalTokens.type_sans,
823
805
  radioInputColor: globalTokens.hal_blue_l_45,
@@ -1168,6 +1150,7 @@ var componentTokens = {
1168
1150
  disabledFontColor: "#999999",
1169
1151
  disabledIconColor: "#999999",
1170
1152
  disabledFontStyle: globalTokens.type_normal,
1153
+ disabledBadgeBackgroundColor: "#0000004D",
1171
1154
  hoverBackgroundColor: "#f2eafa",
1172
1155
  pressedBackgroundColor: "#e5d5f6",
1173
1156
  pressedFontWeight: globalTokens.type_semibold,
@@ -1479,6 +1462,9 @@ var defaultTranslatedComponentLabels = {
1479
1462
  daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1480
1463
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
1481
1464
  monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
1465
+ },
1466
+ applicationLayout: {
1467
+ visibilityToggleTitle: "Toggle visibility sidenav"
1482
1468
  }
1483
1469
  };
1484
1470
  exports.defaultTranslatedComponentLabels = defaultTranslatedComponentLabels;
@@ -1,10 +1,11 @@
1
1
  /// <reference types="react" />
2
- import AppLayoutPropsType, { AppLayoutFooterPropsType, AppLayoutMainPropsType, AppLayoutHeaderPropsType } from "./types";
2
+ import AppLayoutPropsType, { AppLayoutSidenavPropsType, AppLayoutFooterPropsType, AppLayoutMainPropsType, AppLayoutHeaderPropsType } from "./types";
3
3
  declare const DxcApplicationLayout: {
4
- ({ children }: AppLayoutPropsType): JSX.Element;
4
+ ({ visibilityToggleLabel, children }: AppLayoutPropsType): JSX.Element;
5
5
  Header: ({ children }: AppLayoutHeaderPropsType) => JSX.Element;
6
6
  Main: ({ children }: AppLayoutMainPropsType) => JSX.Element;
7
7
  Footer: ({ children }: AppLayoutFooterPropsType) => JSX.Element;
8
- SideNav: (props: any) => JSX.Element;
8
+ SideNav: ({ ...childProps }: AppLayoutSidenavPropsType) => JSX.Element;
9
+ useResponsiveSidenavVisibility: () => (isSidenavVisible: boolean) => void;
9
10
  };
10
11
  export default DxcApplicationLayout;
@@ -13,23 +13,29 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
13
13
 
14
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
15
 
16
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
17
17
 
18
18
  var _react = _interopRequireWildcard(require("react"));
19
19
 
20
- var _main = require("../main");
20
+ var _Header = _interopRequireDefault(require("../header/Header"));
21
21
 
22
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
22
+ var _Footer = _interopRequireDefault(require("../footer/Footer"));
23
+
24
+ var _Sidenav = _interopRequireDefault(require("../sidenav/Sidenav"));
25
+
26
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
23
27
 
24
28
  var _variables = require("../common/variables.js");
25
29
 
26
30
  var _Icons = require("./Icons");
27
31
 
28
- var _useTheme = _interopRequireDefault(require("../useTheme"));
32
+ var _uuid = require("uuid");
29
33
 
30
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
34
+ var _SidenavContext = require("./SidenavContext");
31
35
 
32
- var _excluded = ["displayArrow", "mode"];
36
+ var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
37
+
38
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
33
39
 
34
40
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
41
 
@@ -52,17 +58,13 @@ var Footer = function Footer(_ref3) {
52
58
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
53
59
  };
54
60
 
55
- var SideNav = function SideNav(props) {
56
- var _props$displayArrow = props.displayArrow,
57
- displayArrow = _props$displayArrow === void 0 ? true : _props$displayArrow,
58
- _props$mode = props.mode,
59
- mode = _props$mode === void 0 ? "overlay" : _props$mode,
60
- childProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
61
- return /*#__PURE__*/_react["default"].createElement(_main.DxcSidenav, childProps, childProps.children);
61
+ var Sidenav = function Sidenav(_ref4) {
62
+ var childProps = (0, _extends2["default"])({}, _ref4);
63
+ return /*#__PURE__*/_react["default"].createElement(_Sidenav["default"], childProps, childProps.children);
62
64
  };
63
65
 
64
66
  var defaultFooter = function defaultFooter() {
65
- return /*#__PURE__*/_react["default"].createElement(_main.DxcFooter, {
67
+ return /*#__PURE__*/_react["default"].createElement(_Footer["default"], {
66
68
  copyright: "\xA9 DXC Technology ".concat(year, "\u200B\u200B\u200B\u200B. All rights reserved."),
67
69
  bottomLinks: [{
68
70
  href: "https://www.linkedin.com/company/dxctechnology",
@@ -88,131 +90,110 @@ var defaultFooter = function defaultFooter() {
88
90
  };
89
91
 
90
92
  var defaultHeader = function defaultHeader() {
91
- return /*#__PURE__*/_react["default"].createElement(_main.DxcHeader, {
93
+ return /*#__PURE__*/_react["default"].createElement(_Header["default"], {
92
94
  underlined: true
93
95
  });
94
96
  };
95
97
 
96
98
  var childTypeExists = function childTypeExists(children, childType) {
97
99
  return children.find(function (child) {
98
- return child && child.type && child.type === childType;
100
+ return (child === null || child === void 0 ? void 0 : child.type) === childType;
99
101
  });
100
102
  };
101
103
 
102
- var DxcApplicationLayout = function DxcApplicationLayout(_ref4) {
103
- var children = _ref4.children;
104
- var ref = (0, _react.useRef)(null);
105
- var colorsTheme = (0, _useTheme["default"])();
104
+ var DxcApplicationLayout = function DxcApplicationLayout(_ref5) {
105
+ var _ref5$visibilityToggl = _ref5.visibilityToggleLabel,
106
+ visibilityToggleLabel = _ref5$visibilityToggl === void 0 ? "" : _ref5$visibilityToggl,
107
+ children = _ref5.children;
106
108
 
107
- var _useState = (0, _react.useState)(true),
108
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
109
- isSideNavVisible = _useState2[0],
110
- setIsSideNavVisible = _useState2[1];
109
+ var _useState = (0, _react.useState)("appLayout-".concat((0, _uuid.v4)())),
110
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 1),
111
+ appLayoutId = _useState2[0];
112
+
113
+ var visibilityToggleLabelId = "label-".concat(appLayoutId);
111
114
 
112
115
  var _useState3 = (0, _react.useState)(false),
113
116
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
114
- isResponsive = _useState4[0],
115
- setIsResponsive = _useState4[1];
117
+ isSidenavVisibleResponsive = _useState4[0],
118
+ setIsSidenavVisibleResponsive = _useState4[1];
119
+
120
+ var _useState5 = (0, _react.useState)(false),
121
+ _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
122
+ isResponsive = _useState6[0],
123
+ setIsResponsive = _useState6[1];
124
+
125
+ var ref = (0, _react.useRef)(null);
126
+ var translatedLabels = (0, _useTranslatedLabels["default"])();
116
127
 
117
128
  var childrenArray = _react["default"].Children.toArray(children);
118
129
 
119
- var header = childTypeExists(childrenArray, _main.DxcHeader) || childTypeExists(childrenArray, Header) || defaultHeader();
120
- var footer = childTypeExists(childrenArray, _main.DxcFooter) || childTypeExists(childrenArray, Footer) || defaultFooter();
121
- var sideNav = childTypeExists(childrenArray, SideNav);
130
+ var header = childTypeExists(childrenArray, _Header["default"]) || childTypeExists(childrenArray, Header) || defaultHeader();
131
+ var footer = childTypeExists(childrenArray, _Footer["default"]) || childTypeExists(childrenArray, Footer) || defaultFooter();
132
+ var sidenav = childTypeExists(childrenArray, Sidenav);
122
133
  var main = childTypeExists(childrenArray, Main);
123
- var displayArrow = sideNav && sideNav.props && sideNav.props.displayArrow;
124
- var sideNavMode = sideNav && sideNav.props && sideNav.props.mode;
125
-
126
- var ArrowIcon = function ArrowIcon() {
127
- return /*#__PURE__*/_react["default"].createElement("svg", {
128
- xmlns: "http://www.w3.org/2000/svg",
129
- width: "15.995",
130
- height: "10.01",
131
- viewBox: "0 0 15.995 10.01"
132
- }, /*#__PURE__*/_react["default"].createElement("path", {
133
- "data-testid": "arrow-to-right",
134
- d: "M17.71,11.29l-4-4a1,1,0,0,0-1.42,1.42L14.59,11H3a1,1,0,0,0,0,2H14.59l-2.3,2.29a1,1,0,1,0,1.42,1.42l4-4a1.034,1.034,0,0,0,0-1.42Z",
135
- transform: "translate(-2 -6.996)"
136
- }));
137
- };
138
134
 
139
135
  var handleResize = function handleResize() {
140
136
  setIsResponsive(window.matchMedia("(max-width: ".concat(_variables.responsiveSizes.medium, "rem)")).matches);
141
- setIsSideNavVisible(true);
142
137
  };
143
138
 
144
- (0, _react.useEffect)(function () {
145
- if (ref.current) {
146
- window.addEventListener("resize", handleResize);
147
- }
139
+ var handleSidenavVisibility = function handleSidenavVisibility() {
140
+ setIsSidenavVisibleResponsive(function (isSidenavVisibleResponsive) {
141
+ return !isSidenavVisibleResponsive;
142
+ });
143
+ };
148
144
 
145
+ (0, _react.useEffect)(function () {
146
+ handleResize();
147
+ window.addEventListener("resize", handleResize);
149
148
  return function () {
150
149
  window.removeEventListener("resize", handleResize);
151
150
  };
152
- }, [ref.current]);
153
-
154
- var handleSidenav = function handleSidenav() {
155
- setIsSideNavVisible(!isSideNavVisible);
156
- };
157
-
158
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
159
- theme: colorsTheme.sidenav
160
- }, /*#__PURE__*/_react["default"].createElement(ApplicationLayoutContainer, {
151
+ }, [setIsResponsive]);
152
+ (0, _react.useEffect)(function () {
153
+ !isResponsive && setIsSidenavVisibleResponsive(false);
154
+ }, [isResponsive, setIsSidenavVisibleResponsive]);
155
+ return /*#__PURE__*/_react["default"].createElement(ApplicationLayoutContainer, {
156
+ hasSidenav: sidenav ? true : false,
157
+ isSidenavVisible: isSidenavVisibleResponsive,
161
158
  ref: ref
162
- }, /*#__PURE__*/_react["default"].createElement(HeaderContainer, null, header), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(ContentContainer, null, /*#__PURE__*/_react["default"].createElement(SideNavArrowContainer, {
163
- isSideNavVisible: isSideNavVisible
164
- }, sideNav, /*#__PURE__*/_react["default"].createElement(ArrowContainer, null, sideNav && (displayArrow || isResponsive) && /*#__PURE__*/_react["default"].createElement(ArrowTrigger, {
165
- role: "button",
166
- tabIndex: 0,
167
- onClick: handleSidenav,
168
- isSideNavVisible: isSideNavVisible
169
- }, /*#__PURE__*/_react["default"].createElement(ArrowIcon, null)))), /*#__PURE__*/_react["default"].createElement(MainBodyContainer, null, /*#__PURE__*/_react["default"].createElement(MainContent, {
170
- sideNav: sideNav,
171
- mode: isResponsive ? "overlay" : sideNavMode,
172
- isSideNavVisible: isSideNavVisible
173
- }, main), /*#__PURE__*/_react["default"].createElement(FooterContainer, {
174
- sideNav: sideNav,
175
- mode: isResponsive ? "overlay" : sideNavMode,
176
- isSideNavVisible: isSideNavVisible
177
- }, footer))))));
159
+ }, /*#__PURE__*/_react["default"].createElement(HeaderContainer, null, header), sidenav && isResponsive && /*#__PURE__*/_react["default"].createElement(VisibilityToggle, null, /*#__PURE__*/_react["default"].createElement(HamburgerTrigger, {
160
+ onClick: handleSidenavVisibility,
161
+ "aria-labelledby": visibilityToggleLabel ? visibilityToggleLabelId : undefined,
162
+ "aria-label": visibilityToggleLabel ? undefined : translatedLabels.applicationLayout.visibilityToggleTitle,
163
+ title: translatedLabels.applicationLayout.visibilityToggleTitle
164
+ }, _Icons.hamburgerIcon), visibilityToggleLabel && /*#__PURE__*/_react["default"].createElement(VisibilityToggleLabel, {
165
+ id: visibilityToggleLabelId
166
+ }, visibilityToggleLabel)), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(_SidenavContext.SidenavContextProvider, {
167
+ value: setIsSidenavVisibleResponsive
168
+ }, sidenav && (isResponsive ? isSidenavVisibleResponsive : true) && /*#__PURE__*/_react["default"].createElement(SidenavContainer, null, sidenav)), /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(MainContentContainer, null, main), footer)));
178
169
  };
179
170
 
180
- DxcApplicationLayout.Header = Header;
181
- DxcApplicationLayout.Main = Main;
182
- DxcApplicationLayout.Footer = Footer;
183
- DxcApplicationLayout.SideNav = SideNav;
184
-
185
- var ApplicationLayoutContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n"])));
186
-
187
- var HeaderContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 1250;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n"])));
171
+ var ApplicationLayoutContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n\n @media (max-width: ", "rem) {\n ", ";\n ", "\n }\n"])), _variables.responsiveSizes.medium, function (props) {
172
+ return props.hasSidenav && "top: 112px";
173
+ }, function (props) {
174
+ return props.isSidenavVisible && "overflow: hidden;";
175
+ });
188
176
 
189
- var BodyContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n display: flex;\n flex-direction: column;\n"])));
177
+ var HeaderContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n"])));
190
178
 
191
- var ContentContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex: 1 1 auto;\n align-items: flex-start;\n"])));
179
+ var VisibilityToggle = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 64px;\n left: 0;\n right: 0;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 12px 16px;\n gap: 10px;\n width: 100%;\n background-color: #f2f2f2;\n user-select: none;\n z-index: 2;\n"])));
192
180
 
193
- var MainBodyContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n min-width: 0;\n display: flex;\n flex-direction: column;\n"])));
181
+ var HamburgerTrigger = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n border: 0px solid transparent;\n border-radius: 2px;\n padding: 3px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n cursor: pointer;\n\n :hover {\n background-color: #e6e6e6;\n }\n :active {\n background-color: #cccccc;\n }\n :focus,\n :focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n & > svg {\n height: 20px;\n width: 20px;\n }\n"])));
194
182
 
195
- var FooterContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: ", ";\n transition: margin 0.4s ease-in-out;\n"])), function (props) {
196
- return props.sideNav ? props.mode === "push" && !props.isSideNavVisible || props.mode === "overlay" ? "-300px" : "" : "";
197
- });
183
+ var VisibilityToggleLabel = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: Open Sans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n"])));
198
184
 
199
- var MainContent = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n flex-grow: 1;\n position: relative;\n min-height: calc(100vh - 184px);\n margin-left: ", ";\n transition: margin 0.4s ease-in-out;\n"])), function (props) {
200
- return props.sideNav ? props.mode === "push" && props.isSideNavVisible ? "" : "-297px" : "";
201
- });
185
+ var BodyContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex: 1;\n"])));
202
186
 
203
- var SideNavArrowContainer = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n z-index: 1200;\n transform: ", ";\n transition: transform 0.4s ease-in-out;\n height: calc(100vh - 64px);\n position: sticky;\n top: 64px;\n"])), function (props) {
204
- return props.isSideNavVisible ? "translateX(0)" : !props.isSideNavVisible ? "translateX(-100%)" : "";
205
- });
187
+ var SidenavContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n position: sticky;\n top: 64px;\n display: flex;\n height: calc(100vh - 64px);\n z-index: 1;\n\n @media (max-width: ", "rem) {\n position: fixed;\n top: 112px;\n }\n"])), _variables.responsiveSizes.medium);
206
188
 
207
- var ArrowContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n height: calc(100vh - 64px);\n left: 279px;\n"])));
189
+ var MainContainer = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
208
190
 
209
- var ArrowTrigger = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n position: sticky;\n top: 45vh;\n width: 42px;\n min-height: 42px;\n background-color: ", ";\n border-radius: 50%;\n transform: ", ";\n transition: transform 0.4s ease-in-out;\n z-index: 1250;\n cursor: pointer;\n & > svg {\n fill: ", ";\n }\n :focus {\n outline: #0095ff auto 1px;\n }\n"])), function (props) {
210
- return "".concat(props.theme.arrowContainerColor);
211
- }, function (props) {
212
- return props.isSideNavVisible ? "rotate(-180deg)" : "rotate(0deg)";
213
- }, function (props) {
214
- return props.theme.arrowColor;
215
- });
191
+ var MainContentContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n"])));
216
192
 
193
+ DxcApplicationLayout.Header = Header;
194
+ DxcApplicationLayout.Main = Main;
195
+ DxcApplicationLayout.Footer = Footer;
196
+ DxcApplicationLayout.SideNav = Sidenav;
197
+ DxcApplicationLayout.useResponsiveSidenavVisibility = _SidenavContext.useResponsiveSidenavVisibility;
217
198
  var _default = DxcApplicationLayout;
218
199
  exports["default"] = _default;
@@ -2,8 +2,7 @@ import React from "react";
2
2
  import DxcApplicationLayout from "./ApplicationLayout";
3
3
  import DxcSidenav from "../sidenav/Sidenav";
4
4
  import Title from "../../.storybook/components/Title";
5
- import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
6
- import { userEvent, within, waitFor } from "@storybook/testing-library";
5
+ import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
7
6
 
8
7
  export default {
9
8
  title: "Application Layout ",
@@ -11,8 +10,8 @@ export default {
11
10
  parameters: {
12
11
  viewport: {
13
12
  viewports: INITIAL_VIEWPORTS,
14
- }
15
- }
13
+ },
14
+ },
16
15
  };
17
16
 
18
17
  export const DefaultApplicationLayout = () => (
@@ -50,51 +49,9 @@ export const ApplicationLayoutWithDefaultSidenav = () => (
50
49
  </>
51
50
  );
52
51
 
53
- export const ApplicationLayoutWithPushSidenav = () => (
54
- <>
55
- <DxcApplicationLayout>
56
- <DxcApplicationLayout.SideNav mode="push">
57
- <DxcSidenav.Title>Application layout with push sidenav</DxcSidenav.Title>
58
- <p>SideNav Content</p>
59
- <p>SideNav Content</p>
60
- <p>SideNav Content</p>
61
- <p>SideNav Content</p>
62
- <p>SideNav Content</p>
63
- </DxcApplicationLayout.SideNav>
64
- <DxcApplicationLayout.Main>
65
- <p>Main Content</p>
66
- <p>Main Content</p>
67
- <p>Main Content</p>
68
- <p>Main Content</p>
69
- </DxcApplicationLayout.Main>
70
- </DxcApplicationLayout>
71
- </>
72
- );
73
-
74
- export const ApplicationLayoutWithArrowSidenav = () => (
75
- <>
76
- <DxcApplicationLayout>
77
- <DxcApplicationLayout.SideNav mode="overlay" displayArrow>
78
- <DxcSidenav.Title>Application layout with push sidenav</DxcSidenav.Title>
79
- <p>SideNav Content</p>
80
- <p>SideNav Content</p>
81
- <p>SideNav Content</p>
82
- <p>SideNav Content</p>
83
- <p>SideNav Content</p>
84
- </DxcApplicationLayout.SideNav>
85
- <DxcApplicationLayout.Main>
86
- <p>Main Content</p>
87
- <p>Main Content</p>
88
- <p>Main Content</p>
89
- <p>Main Content</p>
90
- </DxcApplicationLayout.Main>
91
- </DxcApplicationLayout>
92
- </>
93
- );
94
-
95
52
  export const ApplicationLayoutWithResponsiveSidenav = () => (
96
53
  <>
97
- <DxcApplicationLayout>
54
+ <DxcApplicationLayout visibilityToggleLabel="Example">
98
55
  <DxcApplicationLayout.SideNav>
99
56
  <DxcSidenav.Title>Application layout with push sidenav</DxcSidenav.Title>
100
57
  <p>SideNav Content</p>
@@ -115,16 +72,19 @@ export const ApplicationLayoutWithResponsiveSidenav = () => (
115
72
 
116
73
  ApplicationLayoutWithResponsiveSidenav.parameters = {
117
74
  viewport: {
118
- defaultViewport: 'pixel',
75
+ defaultViewport: "pixel",
119
76
  },
120
77
  };
121
78
 
122
79
  export const ApplicationLayoutWithCustomHeader = () => (
123
80
  <>
124
81
  <DxcApplicationLayout>
125
- <DxcApplicationLayout.Header> <p>Custom Header</p> </DxcApplicationLayout.Header>
82
+ <DxcApplicationLayout.Header>
83
+ {" "}
84
+ <p>Custom Header</p>{" "}
85
+ </DxcApplicationLayout.Header>
126
86
  <DxcApplicationLayout.SideNav>
127
- <DxcSidenav.Title>Application layout with push sidenav</DxcSidenav.Title>
87
+ <DxcSidenav.Title>Application layout with custom header</DxcSidenav.Title>
128
88
  <p>SideNav Content</p>
129
89
  <p>SideNav Content</p>
130
90
  <p>SideNav Content</p>
@@ -145,7 +105,7 @@ export const ApplicationLayoutWithCustomFooter = () => (
145
105
  <>
146
106
  <DxcApplicationLayout>
147
107
  <DxcApplicationLayout.SideNav>
148
- <DxcSidenav.Title>Application layout with push sidenav</DxcSidenav.Title>
108
+ <DxcSidenav.Title>Application layout with custom footer</DxcSidenav.Title>
149
109
  <p>SideNav Content</p>
150
110
  <p>SideNav Content</p>
151
111
  <p>SideNav Content</p>
@@ -158,14 +118,9 @@ export const ApplicationLayoutWithCustomFooter = () => (
158
118
  <p>Main Content</p>
159
119
  <p>Main Content</p>
160
120
  </DxcApplicationLayout.Main>
161
- <DxcApplicationLayout.Footer> <p>Custom Footer</p> </DxcApplicationLayout.Footer>
121
+ <DxcApplicationLayout.Footer>
122
+ <p>Custom Footer</p>
123
+ </DxcApplicationLayout.Footer>
162
124
  </DxcApplicationLayout>
163
125
  </>
164
126
  );
165
-
166
- export const ApplicationLayoutWithClosingSidenav = ApplicationLayoutWithArrowSidenav.bind({});
167
- ApplicationLayoutWithClosingSidenav.play = async ({ canvasElement }) => {
168
- const canvas = within(canvasElement);
169
- const arrow = canvas.getByRole("button");
170
- await userEvent.click(arrow);
171
- };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const facebookLogo: JSX.Element;
3
+ export declare const twitterLogo: JSX.Element;
4
+ export declare const linkedinLogo: JSX.Element;
5
+ export declare const hamburgerIcon: JSX.Element;