@dxc-technology/halstack-react 0.0.0-d238e47 → 0.0.0-d30020b

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.
Files changed (161) hide show
  1. package/BackgroundColorContext.d.ts +10 -0
  2. package/BackgroundColorContext.js +1 -4
  3. package/ThemeContext.d.ts +15 -0
  4. package/ThemeContext.js +5 -8
  5. package/V3Select/V3Select.js +2 -2
  6. package/V3Textarea/V3Textarea.js +2 -2
  7. package/accordion/Accordion.d.ts +1 -1
  8. package/accordion/Accordion.js +11 -22
  9. package/accordion/Accordion.stories.tsx +307 -0
  10. package/accordion/types.d.ts +4 -8
  11. package/accordion-group/AccordionGroup.js +2 -2
  12. package/accordion-group/AccordionGroup.stories.tsx +225 -0
  13. package/accordion-group/types.d.ts +4 -8
  14. package/alert/Alert.js +2 -2
  15. package/badge/Badge.js +1 -1
  16. package/bleed/Bleed.d.ts +3 -0
  17. package/bleed/Bleed.js +84 -0
  18. package/bleed/Bleed.stories.tsx +342 -0
  19. package/bleed/types.d.ts +13 -0
  20. package/bleed/types.js +5 -0
  21. package/box/Box.js +2 -2
  22. package/button/Button.d.ts +1 -1
  23. package/button/Button.js +9 -17
  24. package/button/Button.stories.tsx +6 -8
  25. package/button/types.d.ts +3 -7
  26. package/card/Card.js +1 -1
  27. package/card/Card.stories.tsx +1 -1
  28. package/checkbox/Checkbox.js +2 -2
  29. package/checkbox/types.d.ts +1 -1
  30. package/chip/Chip.d.ts +4 -0
  31. package/chip/Chip.js +16 -76
  32. package/chip/Chip.stories.tsx +6 -8
  33. package/chip/types.d.ts +45 -0
  34. package/chip/types.js +5 -0
  35. package/common/variables.js +57 -23
  36. package/date/Date.js +1 -1
  37. package/date-input/DateInput.js +10 -13
  38. package/dialog/Dialog.js +4 -3
  39. package/dropdown/Dropdown.d.ts +1 -1
  40. package/dropdown/Dropdown.js +13 -35
  41. package/dropdown/Dropdown.stories.tsx +249 -0
  42. package/dropdown/types.d.ts +6 -15
  43. package/file-input/FileInput.d.ts +1 -1
  44. package/file-input/FileInput.js +160 -81
  45. package/file-input/FileInput.stories.tsx +507 -0
  46. package/file-input/FileItem.js +8 -6
  47. package/file-input/types.d.ts +32 -7
  48. package/footer/Footer.d.ts +1 -1
  49. package/footer/Footer.js +28 -36
  50. package/footer/{Footer.stories.jsx → Footer.stories.tsx} +1 -22
  51. package/footer/Icons.d.ts +2 -0
  52. package/footer/Icons.js +3 -3
  53. package/footer/types.d.ts +21 -17
  54. package/header/Header.js +2 -2
  55. package/header/Icons.d.ts +2 -0
  56. package/heading/Heading.js +1 -1
  57. package/heading/Heading.stories.tsx +3 -2
  58. package/input-text/InputText.js +2 -2
  59. package/inset/Inset.d.ts +3 -0
  60. package/inset/Inset.js +84 -0
  61. package/inset/Inset.stories.tsx +229 -0
  62. package/inset/types.d.ts +13 -0
  63. package/inset/types.js +5 -0
  64. package/layout/ApplicationLayout.d.ts +10 -0
  65. package/layout/ApplicationLayout.js +17 -21
  66. package/layout/ApplicationLayout.stories.tsx +171 -0
  67. package/layout/types.d.ts +57 -0
  68. package/layout/types.js +5 -0
  69. package/link/Link.js +8 -16
  70. package/link/Link.stories.tsx +6 -1
  71. package/link/types.d.ts +5 -9
  72. package/list/List.d.ts +4 -0
  73. package/list/List.js +47 -0
  74. package/list/List.stories.tsx +95 -0
  75. package/list/types.d.ts +7 -0
  76. package/list/types.js +5 -0
  77. package/main.d.ts +8 -3
  78. package/main.js +42 -2
  79. package/number-input/NumberInput.js +3 -6
  80. package/package.json +4 -2
  81. package/paginator/Paginator.js +2 -8
  82. package/password-input/PasswordInput.js +19 -18
  83. package/password-input/PasswordInput.stories.tsx +3 -3
  84. package/password-input/types.d.ts +13 -11
  85. package/progress-bar/ProgressBar.js +4 -4
  86. package/radio/Radio.js +2 -2
  87. package/radio-group/Radio.d.ts +4 -0
  88. package/radio-group/Radio.js +140 -0
  89. package/radio-group/RadioGroup.d.ts +4 -0
  90. package/radio-group/RadioGroup.js +273 -0
  91. package/radio-group/RadioGroup.stories.tsx +79 -0
  92. package/radio-group/RadioGroup.test.js +248 -0
  93. package/radio-group/types.d.ts +36 -0
  94. package/radio-group/types.js +5 -0
  95. package/resultsetTable/ResultsetTable.d.ts +1 -1
  96. package/resultsetTable/ResultsetTable.js +9 -4
  97. package/resultsetTable/ResultsetTable.stories.tsx +275 -0
  98. package/resultsetTable/types.d.ts +6 -2
  99. package/row/Row.d.ts +3 -0
  100. package/row/Row.js +127 -0
  101. package/row/Row.stories.tsx +237 -0
  102. package/row/types.d.ts +10 -0
  103. package/row/types.js +5 -0
  104. package/select/Select.d.ts +4 -0
  105. package/select/Select.js +20 -22
  106. package/select/types.d.ts +170 -0
  107. package/select/types.js +5 -0
  108. package/sidenav/Sidenav.js +2 -2
  109. package/sidenav/Sidenav.stories.tsx +18 -1
  110. package/slider/Slider.js +2 -2
  111. package/spinner/Spinner.js +2 -2
  112. package/spinner/Spinner.stories.jsx +1 -0
  113. package/stack/Stack.d.ts +3 -0
  114. package/stack/Stack.js +97 -0
  115. package/stack/Stack.stories.tsx +164 -0
  116. package/stack/types.d.ts +9 -0
  117. package/stack/types.js +5 -0
  118. package/switch/Switch.js +2 -2
  119. package/switch/Switch.stories.tsx +1 -1
  120. package/table/Table.js +2 -2
  121. package/table/Table.stories.jsx +2 -1
  122. package/tabs/Tabs.js +8 -8
  123. package/tabs/Tabs.stories.tsx +120 -0
  124. package/tabs/types.d.ts +23 -15
  125. package/tag/Tag.d.ts +1 -1
  126. package/tag/Tag.js +7 -12
  127. package/tag/Tag.stories.tsx +15 -22
  128. package/tag/types.d.ts +23 -14
  129. package/text/Text.d.ts +7 -0
  130. package/text/Text.js +30 -0
  131. package/text/Text.stories.tsx +19 -0
  132. package/text-input/TextInput.js +50 -41
  133. package/text-input/TextInput.stories.tsx +456 -0
  134. package/text-input/types.d.ts +14 -12
  135. package/textarea/Textarea.d.ts +4 -0
  136. package/textarea/Textarea.js +27 -60
  137. package/textarea/Textarea.stories.jsx +4 -3
  138. package/textarea/types.d.ts +130 -0
  139. package/textarea/types.js +5 -0
  140. package/toggle/Toggle.js +1 -1
  141. package/toggle-group/ToggleGroup.d.ts +4 -0
  142. package/toggle-group/ToggleGroup.js +16 -45
  143. package/toggle-group/ToggleGroup.stories.tsx +23 -28
  144. package/toggle-group/types.d.ts +97 -0
  145. package/toggle-group/types.js +5 -0
  146. package/upload/buttons-upload/ButtonsUpload.js +2 -2
  147. package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
  148. package/upload/file-upload/FileToUpload.js +1 -1
  149. package/upload/files-upload/FilesToUpload.js +1 -1
  150. package/upload/transaction/Transaction.js +2 -2
  151. package/upload/transactions/Transactions.js +1 -1
  152. package/useTheme.d.ts +2 -0
  153. package/useTheme.js +1 -1
  154. package/wizard/Wizard.js +59 -9
  155. package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +0 -0
  156. package/wizard/types.d.ts +3 -7
  157. package/chip/index.d.ts +0 -22
  158. package/select/index.d.ts +0 -131
  159. package/textarea/index.d.ts +0 -117
  160. package/toggle-group/index.d.ts +0 -21
  161. package/wizard/Icons.js +0 -65
package/footer/Footer.js CHANGED
@@ -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 _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
13
 
14
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
+
16
16
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
17
 
18
18
  var _react = _interopRequireWildcard(require("react"));
@@ -21,13 +21,13 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
21
 
22
22
  var _variables = require("../common/variables.js");
23
23
 
24
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
24
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
25
25
 
26
- var _BackgroundColorContext = require("../BackgroundColorContext.js");
26
+ var _BackgroundColorContext = require("../BackgroundColorContext");
27
27
 
28
- var _Icons = _interopRequireDefault(require("./Icons"));
28
+ var _Icons = require("./Icons");
29
29
 
30
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
30
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
31
31
 
32
32
  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); }
33
33
 
@@ -37,7 +37,7 @@ var DxcFooter = function DxcFooter(_ref) {
37
37
  var socialLinks = _ref.socialLinks,
38
38
  bottomLinks = _ref.bottomLinks,
39
39
  _ref$copyright = _ref.copyright,
40
- copyright = _ref$copyright === void 0 ? "" : _ref$copyright,
40
+ copyright = _ref$copyright === void 0 ? "\xA9 DXC Technology ".concat(new Date().getFullYear(), ". All rights reserved.") : _ref$copyright,
41
41
  children = _ref.children,
42
42
  padding = _ref.padding,
43
43
  margin = _ref.margin,
@@ -63,7 +63,7 @@ var DxcFooter = function DxcFooter(_ref) {
63
63
  var colorsTheme = (0, _useTheme["default"])();
64
64
  var footerLogo = (0, _react.useMemo)(function () {
65
65
  if (!colorsTheme.footer.logo) {
66
- return _Icons["default"];
66
+ return _Icons.dxcLogo;
67
67
  }
68
68
 
69
69
  if (typeof colorsTheme.footer.logo === "string") {
@@ -110,9 +110,9 @@ var DxcFooter = function DxcFooter(_ref) {
110
110
  key: "social".concat(index).concat(link.href),
111
111
  index: index,
112
112
  href: link && link.href ? link.href : ""
113
- }, link.logo ? /*#__PURE__*/_react["default"].createElement(SocialIconContainer, null, (0, _typeof2["default"])(link.logo) === "object" ? link.logo : /*#__PURE__*/_react["default"].createElement(link.logo)) : link && link.logoSrc && /*#__PURE__*/_react["default"].createElement(SocialIcon, {
114
- src: link.logoSrc
115
- }));
113
+ }, /*#__PURE__*/_react["default"].createElement(SocialIconContainer, null, typeof link.logo === "string" ? /*#__PURE__*/_react["default"].createElement(SocialIconImg, {
114
+ src: link.logo
115
+ }) : link.logo));
116
116
  });
117
117
  var bottomLink = bottomLinks === null || bottomLinks === void 0 ? void 0 : bottomLinks.map(function (link, index) {
118
118
  return /*#__PURE__*/_react["default"].createElement("span", {
@@ -130,19 +130,17 @@ var DxcFooter = function DxcFooter(_ref) {
130
130
  margin: margin,
131
131
  refSize: refSize,
132
132
  ref: ref
133
- }, /*#__PURE__*/_react["default"].createElement(FooterHeader, null, /*#__PURE__*/_react["default"].createElement(LogoContainer, null, footerLogo), /*#__PURE__*/_react["default"].createElement("div", null, socialLink)), isResponsivePhone && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(FooterFooter, {
134
- className: "footerFooter",
133
+ }, /*#__PURE__*/_react["default"].createElement(FooterHeader, {
135
134
  refSize: refSize
136
- }, /*#__PURE__*/_react["default"].createElement(BottomLinks, {
137
- refSize: refSize
138
- }, bottomLink), /*#__PURE__*/_react["default"].createElement(Copyright, {
135
+ }, /*#__PURE__*/_react["default"].createElement(LogoContainer, null, footerLogo), /*#__PURE__*/_react["default"].createElement(SocialLinkContainer, {
139
136
  refSize: refSize
140
- }, copyright))), (!isResponsiveTablet && !isResponsivePhone || isResponsiveTablet) && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(ChildComponents, {
137
+ }, socialLink)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(ChildComponents, {
141
138
  padding: padding
142
139
  }, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
143
140
  color: colorsTheme.footer.backgroundColor
144
141
  }, children)), /*#__PURE__*/_react["default"].createElement(FooterFooter, {
145
- className: "footerFooter"
142
+ className: "footerFooter",
143
+ refSize: refSize
146
144
  }, /*#__PURE__*/_react["default"].createElement(BottomLinks, {
147
145
  refSize: refSize
148
146
  }, bottomLink), /*#__PURE__*/_react["default"].createElement(Copyright, {
@@ -160,9 +158,9 @@ var FooterContainer = _styledComponents["default"].footer(_templateObject || (_t
160
158
  return props.theme.height;
161
159
  });
162
160
 
163
- var FooterHeader = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n"])));
161
+ var FooterHeader = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n row-gap: 24px;\n"])));
164
162
 
165
- var FooterFooter = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n flex-direction: ", ";\n align-items: ", ";\n border-top: ", ";\n"])), function (props) {
163
+ var FooterFooter = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n flex-direction: ", ";\n align-items: ", ";\n border-top: ", ";\n margin-top: 16px;\n"])), function (props) {
166
164
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "column" : "row";
167
165
  }, function (props) {
168
166
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "center" : "";
@@ -170,17 +168,15 @@ var FooterFooter = _styledComponents["default"].div(_templateObject3 || (_templa
170
168
  return "".concat(props.theme.bottomLinksDividerThickness, " ").concat(props.theme.bottomLinksDividerStyle, " ").concat(props.theme.bottomLinksDividerColor);
171
169
  });
172
170
 
173
- var BottomLinks = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n padding-top: ", ";\n display: inline-flex;\n flex-wrap: wrap;\n max-width: ", ";\n width: ", ";\n & > span:last-child span {\n display: none;\n }\n margin: ", ";\n"])), function (props) {
171
+ var BottomLinks = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n padding-top: ", ";\n display: inline-flex;\n flex-wrap: wrap;\n max-width: ", ";\n width: ", ";\n & > span:last-child span {\n display: none;\n }\n align-self: center;\n"])), function (props) {
174
172
  return props.theme.bottomLinksDividerSpacing;
175
173
  }, function (props) {
176
174
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "60%";
177
175
  }, function (props) {
178
176
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "";
179
- }, function (props) {
180
- return props.refSize <= _variables.responsiveSizes.mobileLarge ? "40px 0 40px 0" : "";
181
177
  });
182
178
 
183
- var ChildComponents = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 15px;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n overflow: hidden;\n"])), function (props) {
179
+ var ChildComponents = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 16px;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n overflow: hidden;\n"])), function (props) {
184
180
  return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
185
181
  }, function (props) {
186
182
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
@@ -207,7 +203,7 @@ var Copyright = _styledComponents["default"].div(_templateObject6 || (_templateO
207
203
  }, function (props) {
208
204
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "";
209
205
  }, function (props) {
210
- return props.refSize <= _variables.responsiveSizes.mobileLarge ? "center" : "right";
206
+ return props.refSize <= _variables.responsiveSizes.mobileLarge ? "left" : "right";
211
207
  }, function (props) {
212
208
  return props.theme.bottomLinksDividerSpacing;
213
209
  });
@@ -224,19 +220,15 @@ var LogoImg = _styledComponents["default"].img(_templateObject8 || (_templateObj
224
220
  return props.theme.logoWidth;
225
221
  });
226
222
 
227
- var SocialAnchor = _styledComponents["default"].a(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n margin-left: ", ";\n }\n"])), function (props) {
223
+ var SocialLinkContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-self: center;\n"])));
224
+
225
+ var SocialAnchor = _styledComponents["default"].a(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n margin-left: ", ";\n }\n"])), function (props) {
228
226
  return props.index === 0 ? "0px" : props.theme.socialLinksGutter;
229
227
  });
230
228
 
231
- var SocialIcon = _styledComponents["default"].img(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n fill: ", ";\n }\n"])), function (props) {
232
- return props.theme.socialLinksSize;
233
- }, function (props) {
234
- return props.theme.socialLinksSize;
235
- }, function (props) {
236
- return props.theme.socialLinksColor;
237
- });
229
+ var SocialIconImg = _styledComponents["default"].img(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])([""])));
238
230
 
239
- var SocialIconContainer = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n color: ", ";\n }\n\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
231
+ var SocialIconContainer = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n color: ", ";\n }\n\n overflow: hidden;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
240
232
  return props.theme.socialLinksSize;
241
233
  }, function (props) {
242
234
  return props.theme.socialLinksSize;
@@ -244,11 +236,11 @@ var SocialIconContainer = _styledComponents["default"].div(_templateObject11 ||
244
236
  return props.theme.socialLinksColor;
245
237
  });
246
238
 
247
- var Point = _styledComponents["default"].span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px 10px;\n color: ", ";\n"])), function (props) {
239
+ var Point = _styledComponents["default"].span(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px 10px;\n color: ", ";\n"])), function (props) {
248
240
  return props.theme.bottomLinksFontColor;
249
241
  });
250
242
 
251
- var BottomLink = _styledComponents["default"].a(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"])), function (props) {
243
+ var BottomLink = _styledComponents["default"].a(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"])), function (props) {
252
244
  return props.theme.bottomLinksTextDecoration;
253
245
  }, function (props) {
254
246
  return props.theme.bottomLinksFontColor;
@@ -28,28 +28,7 @@ const social = [
28
28
  },
29
29
  {
30
30
  href: "https://twitter.com/dxctechnology",
31
- logo: (
32
- <svg version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 438.536 438.536" fill="currentColor">
33
- <g>
34
- <path
35
- d="M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123
36
- C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126
37
- h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225
38
- C438.532,59.576,430.49,40.204,414.41,24.123z M335.471,168.735c0.191,1.713,0.288,4.278,0.288,7.71
39
- c0,15.989-2.334,32.025-6.995,48.104c-4.661,16.087-11.8,31.504-21.416,46.254c-9.606,14.749-21.074,27.791-34.396,39.115
40
- c-13.325,11.32-29.311,20.365-47.968,27.117c-18.648,6.762-38.637,10.143-59.953,10.143c-33.116,0-63.76-8.952-91.931-26.836
41
- c4.568,0.568,9.329,0.855,14.275,0.855c27.6,0,52.439-8.565,74.519-25.7c-12.941-0.185-24.506-4.179-34.688-11.991
42
- c-10.185-7.803-17.273-17.699-21.271-29.691c4.947,0.76,8.658,1.137,11.132,1.137c4.187,0,9.042-0.76,14.56-2.279
43
- c-13.894-2.669-25.598-9.562-35.115-20.697c-9.519-11.136-14.277-23.84-14.277-38.114v-0.571
44
- c10.085,4.755,19.602,7.229,28.549,7.422c-17.321-11.613-25.981-28.265-25.981-49.963c0-10.66,2.758-20.747,8.278-30.264
45
- c15.035,18.464,33.311,33.213,54.816,44.252c21.507,11.038,44.54,17.227,69.092,18.558c-0.95-3.616-1.427-8.186-1.427-13.704
46
- c0-16.562,5.853-30.692,17.56-42.399c11.703-11.706,25.837-17.561,42.394-17.561c17.515,0,32.079,6.283,43.688,18.846
47
- c13.134-2.474,25.892-7.33,38.26-14.56c-4.757,14.652-13.613,25.788-26.55,33.402c12.368-1.716,23.88-4.95,34.537-9.708
48
- C357.458,149.793,347.462,160.166,335.471,168.735z"
49
- />
50
- </g>
51
- </svg>
52
- ),
31
+ logo: "http://assets.stickpng.com/images/580b57fcd9996e24bc43c53e.png",
53
32
  },
54
33
  {
55
34
  href: "https://www.facebook.com/DXCTechnology/",
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const dxcLogo: JSX.Element;
package/footer/Icons.js CHANGED
@@ -5,11 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = void 0;
8
+ exports.dxcLogo = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _default = /*#__PURE__*/_react["default"].createElement("svg", {
12
+ var dxcLogo = /*#__PURE__*/_react["default"].createElement("svg", {
13
13
  id: "g10",
14
14
  xmlns: "http://www.w3.org/2000/svg",
15
15
  width: "280.781",
@@ -74,4 +74,4 @@ var _default = /*#__PURE__*/_react["default"].createElement("svg", {
74
74
  fill: "#fff"
75
75
  })));
76
76
 
77
- exports["default"] = _default;
77
+ exports.dxcLogo = dxcLogo;
package/footer/types.d.ts CHANGED
@@ -6,34 +6,38 @@ declare type Size = {
6
6
  left?: Space;
7
7
  right?: Space;
8
8
  };
9
+ declare type SVG = React.SVGProps<SVGSVGElement>;
9
10
  declare type SocialLink = {
10
- logo?: ImgElement;
11
- logoSrc?: string;
12
- href?: string;
11
+ /**
12
+ * Element used as the icon for the link.
13
+ */
14
+ logo: string | SVG;
15
+ /**
16
+ * URL of the page the link goes to.
17
+ */
18
+ href: string;
13
19
  };
14
20
  declare type BottomLink = {
15
- text?: string;
16
- href?: string;
21
+ /**
22
+ * Text for the link.
23
+ */
24
+ text: string;
25
+ /**
26
+ * URL of the page the link goes to.
27
+ */
28
+ href: string;
17
29
  };
18
- declare type ImgElement = HTMLElement & (SVGElement | HTMLImageElement);
19
30
  declare type FooterPropsType = {
20
31
  /**
21
32
  * An array of objects representing the links that will be rendered as
22
- * icons at the top-right side of the footer. Each object has the
23
- * following properties:
24
- * - logo: Element used as the icon for the link.
25
- * - logoSrc: The path of an icon for the link. @deprecated
26
- * - href: URL of the page the link goes to.
33
+ * icons at the top-right side of the footer.
27
34
  */
28
- socialLinks?: [SocialLink, ...SocialLink[]];
35
+ socialLinks?: SocialLink[];
29
36
  /**
30
37
  * An array of objects representing the links that will be rendered at
31
- * the bottom part of the footer. Each object has the following
32
- * properties:
33
- * - text: Text for the link.
34
- * - href: URL of the page the link goes to.
38
+ * the bottom part of the footer.
35
39
  */
36
- bottomLinks?: [BottomLink, ...BottomLink[]];
40
+ bottomLinks?: BottomLink[];
37
41
  /**
38
42
  * The center section of the footer. Can be used to render custom
39
43
  * content in this area.
package/header/Header.js CHANGED
@@ -27,9 +27,9 @@ var _Icons = require("./Icons");
27
27
 
28
28
  var _variables = require("../common/variables.js");
29
29
 
30
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
30
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
31
31
 
32
- var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
32
+ var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext"));
33
33
 
34
34
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
35
35
 
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const dxcLogo: JSX.Element;
@@ -19,7 +19,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
19
19
 
20
20
  var _variables = require("../common/variables.js");
21
21
 
22
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
22
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
23
23
 
24
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
25
25
 
@@ -28,9 +28,9 @@ export const Chromatic = () => (
28
28
  <Title title="'light' Weight" theme="light" level={4} />
29
29
  <DxcHeading text="Heading for sections within the page" level={2} weight="light" />
30
30
  <Title title="'normal' Weight" theme="light" level={4} />
31
- <DxcHeading text="Heading for sections within the page" level={4} weight="normal" />
31
+ <DxcHeading text="Heading for sections within the page" level={2} weight="normal" />
32
32
  <Title title="'bold' Weight" theme="light" level={4} />
33
- <DxcHeading text="Heading for sections within the page" weight="bold" />
33
+ <DxcHeading text="Heading for sections within the page" level={2} weight="bold" />
34
34
  </ExampleContainer>
35
35
  <Title title="Margins" theme="light" level={2} />
36
36
  <ExampleContainer>
@@ -48,6 +48,7 @@ export const Chromatic = () => (
48
48
  <DxcHeading text="Xlarge" margin="xlarge" />
49
49
  <Title title="Xxlarge" theme="light" level={4} />
50
50
  <DxcHeading text="Xxlarge" margin="xxlarge" />
51
+ <hr />
51
52
  </ExampleContainer>
52
53
  </>
53
54
  );
@@ -39,11 +39,11 @@ var _variables = require("../common/variables.js");
39
39
 
40
40
  var _utils = require("../common/utils.js");
41
41
 
42
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
42
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
43
43
 
44
44
  var _Icons = _interopRequireDefault(require("./Icons"));
45
45
 
46
- var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
46
+ var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext"));
47
47
 
48
48
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
49
49
 
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import InsetPropsType from "./types";
3
+ export default function Inset({ space, horizontal, vertical, top, right, bottom, left, children, }: InsetPropsType): JSX.Element;
package/inset/Inset.js ADDED
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = Inset;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
15
+
16
+ var _templateObject;
17
+
18
+ function Inset(_ref) {
19
+ var space = _ref.space,
20
+ horizontal = _ref.horizontal,
21
+ vertical = _ref.vertical,
22
+ top = _ref.top,
23
+ right = _ref.right,
24
+ bottom = _ref.bottom,
25
+ left = _ref.left,
26
+ children = _ref.children;
27
+ return /*#__PURE__*/_react["default"].createElement(StyledInset, {
28
+ space: space,
29
+ horizontal: horizontal,
30
+ vertical: vertical,
31
+ top: top,
32
+ right: right,
33
+ bottom: bottom,
34
+ left: left
35
+ }, children);
36
+ }
37
+
38
+ function getSpacingValue(spacingName) {
39
+ switch (spacingName) {
40
+ case "none":
41
+ return "0rem";
42
+
43
+ case "xxxsmall":
44
+ return "0.125rem";
45
+
46
+ case "xxsmall":
47
+ return "0.25rem";
48
+
49
+ case "xsmall":
50
+ return "0.5rem";
51
+
52
+ case "small":
53
+ return "1rem";
54
+
55
+ case "medium":
56
+ return "1.5rem";
57
+
58
+ case "large":
59
+ return "2rem";
60
+
61
+ case "xlarge":
62
+ return "3rem";
63
+
64
+ case "xxlarge":
65
+ return "4rem";
66
+
67
+ case "xxxlarge":
68
+ return "5rem";
69
+
70
+ default:
71
+ return "0rem";
72
+ }
73
+ }
74
+
75
+ var StyledInset = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (_ref2) {
76
+ var space = _ref2.space,
77
+ horizontal = _ref2.horizontal,
78
+ vertical = _ref2.vertical,
79
+ top = _ref2.top,
80
+ right = _ref2.right,
81
+ bottom = _ref2.bottom,
82
+ left = _ref2.left;
83
+ return "\n padding: ".concat(getSpacingValue(top || vertical || space), " ").concat(getSpacingValue(right || horizontal || space), "\n ").concat(getSpacingValue(bottom || vertical || space), " ").concat(getSpacingValue(left || horizontal || space), ";\n");
84
+ });