@dxc-technology/halstack-react 0.0.0-46226da → 0.0.0-4727df3

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 (129) hide show
  1. package/README.md +1 -1
  2. package/dist/ThemeContext.js +131 -99
  3. package/dist/V3Textarea/V3Textarea.js +264 -0
  4. package/dist/accordion/Accordion.js +80 -83
  5. package/dist/accordion-group/AccordionGroup.js +1 -3
  6. package/dist/alert/Alert.js +168 -83
  7. package/dist/alert/index.d.ts +51 -0
  8. package/dist/badge/Badge.js +29 -6
  9. package/dist/box/Box.js +27 -18
  10. package/dist/button/Button.js +30 -20
  11. package/dist/card/Card.js +15 -8
  12. package/dist/checkbox/Checkbox.js +88 -21
  13. package/dist/chip/Chip.js +63 -21
  14. package/dist/common/variables.js +1202 -397
  15. package/dist/date/Date.js +66 -44
  16. package/dist/date-input/DateInput.js +400 -0
  17. package/dist/date-input/index.d.ts +95 -0
  18. package/dist/dialog/Dialog.js +44 -29
  19. package/dist/dropdown/Dropdown.js +162 -74
  20. package/dist/file-input/FileInput.js +644 -0
  21. package/dist/file-input/FileItem.js +280 -0
  22. package/dist/file-input/index.d.ts +81 -0
  23. package/dist/footer/Footer.js +69 -53
  24. package/dist/footer/Icons.js +77 -0
  25. package/dist/header/Header.js +89 -86
  26. package/dist/header/Icons.js +59 -0
  27. package/dist/heading/Heading.js +1 -5
  28. package/dist/input-text/Icons.js +22 -0
  29. package/dist/input-text/InputText.js +162 -66
  30. package/dist/layout/ApplicationLayout.js +3 -3
  31. package/dist/link/Link.js +76 -39
  32. package/dist/main.d.ts +8 -0
  33. package/dist/main.js +62 -6
  34. package/dist/new-select/NewSelect.js +836 -0
  35. package/dist/new-select/index.d.ts +53 -0
  36. package/dist/number-input/NumberInput.js +136 -0
  37. package/dist/number-input/NumberInputContext.js +16 -0
  38. package/dist/number-input/index.d.ts +113 -0
  39. package/dist/paginator/Paginator.js +41 -13
  40. package/dist/password-input/PasswordInput.js +198 -0
  41. package/dist/password-input/index.d.ts +94 -0
  42. package/dist/progress-bar/ProgressBar.js +88 -38
  43. package/dist/radio/Radio.js +28 -9
  44. package/dist/resultsetTable/ResultsetTable.js +64 -38
  45. package/dist/select/Select.js +207 -148
  46. package/dist/sidenav/Sidenav.js +11 -15
  47. package/dist/slider/Slider.js +190 -63
  48. package/dist/spinner/Spinner.js +226 -59
  49. package/dist/switch/Switch.js +4 -10
  50. package/dist/table/Table.js +19 -5
  51. package/dist/tabs/Tabs.js +37 -19
  52. package/dist/tag/Tag.js +50 -36
  53. package/dist/text-input/TextInput.js +971 -0
  54. package/dist/text-input/index.d.ts +135 -0
  55. package/dist/textarea/Textarea.js +238 -107
  56. package/dist/textarea/index.d.ts +117 -0
  57. package/dist/toggle-group/ToggleGroup.js +139 -35
  58. package/dist/upload/Upload.js +4 -8
  59. package/dist/upload/buttons-upload/ButtonsUpload.js +27 -11
  60. package/dist/upload/dragAndDropArea/DragAndDropArea.js +54 -18
  61. package/dist/upload/file-upload/FileToUpload.js +37 -15
  62. package/dist/upload/files-upload/FilesToUpload.js +3 -3
  63. package/dist/upload/readme.md +2 -2
  64. package/dist/upload/transaction/Transaction.js +39 -16
  65. package/dist/upload/transactions/Transactions.js +24 -8
  66. package/dist/wizard/Wizard.js +106 -50
  67. package/dist/wizard/invalid_icon.svg +4 -5
  68. package/dist/wizard/valid_icon.svg +4 -5
  69. package/package.json +4 -2
  70. package/test/Date.test.js +49 -45
  71. package/test/DateInput.test.js +242 -0
  72. package/test/Dropdown.test.js +15 -0
  73. package/test/FileInput.test.js +201 -0
  74. package/test/Footer.test.js +2 -7
  75. package/test/Header.test.js +5 -10
  76. package/test/InputText.test.js +24 -16
  77. package/test/Link.test.js +3 -2
  78. package/test/NumberInput.test.js +259 -0
  79. package/test/Paginator.test.js +1 -1
  80. package/test/PasswordInput.test.js +83 -0
  81. package/test/ResultsetTable.test.js +1 -2
  82. package/test/Select.test.js +44 -24
  83. package/test/Spinner.test.js +5 -0
  84. package/test/TextInput.test.js +732 -0
  85. package/test/Textarea.test.js +193 -0
  86. package/test/ToggleGroup.test.js +5 -1
  87. package/test/Upload.test.js +5 -5
  88. package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
  89. package/dist/accordion/Accordion.stories.js +0 -207
  90. package/dist/accordion/readme.md +0 -96
  91. package/dist/accordion-group/AccordionGroup.stories.js +0 -207
  92. package/dist/accordion-group/readme.md +0 -70
  93. package/dist/alert/Alert.stories.js +0 -158
  94. package/dist/alert/close.svg +0 -4
  95. package/dist/alert/error.svg +0 -4
  96. package/dist/alert/info.svg +0 -4
  97. package/dist/alert/readme.md +0 -43
  98. package/dist/alert/success.svg +0 -4
  99. package/dist/alert/warning.svg +0 -4
  100. package/dist/button/Button.stories.js +0 -224
  101. package/dist/button/readme.md +0 -93
  102. package/dist/date/calendar.svg +0 -1
  103. package/dist/date/calendar_dark.svg +0 -1
  104. package/dist/dialog/Dialog.stories.js +0 -217
  105. package/dist/dialog/readme.md +0 -32
  106. package/dist/dropdown/Dropdown.stories.js +0 -249
  107. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  108. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  109. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  110. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  111. package/dist/dropdown/readme.md +0 -69
  112. package/dist/footer/Footer.stories.js +0 -94
  113. package/dist/footer/dxc_logo_wht.png +0 -0
  114. package/dist/footer/readme.md +0 -41
  115. package/dist/header/Header.stories.js +0 -176
  116. package/dist/header/close_icon.svg +0 -1
  117. package/dist/header/dxc_logo_black.png +0 -0
  118. package/dist/header/dxc_logo_blk_rgb.svg +0 -6
  119. package/dist/header/dxc_logo_white.png +0 -0
  120. package/dist/header/hamb_menu_black.svg +0 -1
  121. package/dist/header/hamb_menu_white.svg +0 -1
  122. package/dist/header/readme.md +0 -33
  123. package/dist/input-text/InputText.stories.js +0 -209
  124. package/dist/input-text/error.svg +0 -1
  125. package/dist/input-text/readme.md +0 -91
  126. package/dist/select/Select.stories.js +0 -235
  127. package/dist/select/readme.md +0 -72
  128. package/dist/slider/Slider.stories.js +0 -241
  129. package/dist/toggle-group/readme.md +0 -82
@@ -15,20 +15,100 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
15
15
 
16
16
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
17
 
18
- var _react = _interopRequireDefault(require("react"));
18
+ var _react = _interopRequireWildcard(require("react"));
19
19
 
20
20
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
21
 
22
- var _CircularProgress = _interopRequireDefault(require("@material-ui/core/CircularProgress"));
23
-
24
22
  var _propTypes = _interopRequireDefault(require("prop-types"));
25
23
 
26
24
  var _variables = require("../common/variables.js");
27
25
 
28
26
  var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
27
 
28
+ var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
29
+
30
+ function _templateObject12() {
31
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: ", ";\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n text-align: ", ";\n letter-spacing: ", ";\n"]);
32
+
33
+ _templateObject12 = function _templateObject12() {
34
+ return data;
35
+ };
36
+
37
+ return data;
38
+ }
39
+
40
+ function _templateObject11() {
41
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-style: ", ";\n color: ", ";\n text-align: ", ";\n letter-spacing: ", ";\n"]);
42
+
43
+ _templateObject11 = function _templateObject11() {
44
+ return data;
45
+ };
46
+
47
+ return data;
48
+ }
49
+
50
+ function _templateObject10() {
51
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: block;\n margin: 0 auto;\n position: absolute;\n text-align: center;\n width: 110px;\n"]);
52
+
53
+ _templateObject10 = function _templateObject10() {
54
+ return data;
55
+ };
56
+
57
+ return data;
58
+ }
59
+
60
+ function _templateObject9() {
61
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n fill: transparent;\n stroke-linecap: initial;\n vector-effect: non-scaling-stroke;\n animation: ", ";\n stroke: ", ";\n transform-origin: ", ";\n stroke-dasharray: ", ";\n stroke-width: ", ";\n stroke-dashoffset: ", ";\n"]);
62
+
63
+ _templateObject9 = function _templateObject9() {
64
+ return data;
65
+ };
66
+
67
+ return data;
68
+ }
69
+
70
+ function _templateObject8() {
71
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n transform: rotate(-90deg);\n top: 0;\n left: 0;\n transform-origin: center;\n overflow: visible;\n animation: ", ";\n"]);
72
+
73
+ _templateObject8 = function _templateObject8() {
74
+ return data;
75
+ };
76
+
77
+ return data;
78
+ }
79
+
80
+ function _templateObject7() {
81
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n position: relative;\n z-index: 2;\n"]);
82
+
83
+ _templateObject7 = function _templateObject7() {
84
+ return data;
85
+ };
86
+
87
+ return data;
88
+ }
89
+
90
+ function _templateObject6() {
91
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n animation: none;\n fill: transparent;\n stroke: ", ";\n stroke-dasharray: ", ";\n stroke-linecap: initial;\n stroke-width: ", ";\n transform-origin: 50% 50%;\n vector-effect: non-scaling-stroke;\n"]);
92
+
93
+ _templateObject6 = function _templateObject6() {
94
+ return data;
95
+ };
96
+
97
+ return data;
98
+ }
99
+
100
+ function _templateObject5() {
101
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n"]);
102
+
103
+ _templateObject5 = function _templateObject5() {
104
+ return data;
105
+ };
106
+
107
+ return data;
108
+ }
109
+
30
110
  function _templateObject4() {
31
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-style: ", ";\n margin-top: ", ";\n display: ", ";\n color: ", ";\n text-align: ", ";\n letter-spacing: ", ";\n"]);
111
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n position: absolute;\n z-index: 1;\n"]);
32
112
 
33
113
  _templateObject4 = function _templateObject4() {
34
114
  return data;
@@ -38,7 +118,7 @@ function _templateObject4() {
38
118
  }
39
119
 
40
120
  function _templateObject3() {
41
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-style: ", ";\n margin-top: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n letter-spacing: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]);
121
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 100vw;\n height: 100vh;\n opacity: 1;\n transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n position: fixed;\n top: 0;\n left: 0;\n background-color: ", ";\n opacity: ", ";\n"]);
42
122
 
43
123
  _templateObject3 = function _templateObject3() {
44
124
  return data;
@@ -48,7 +128,7 @@ function _templateObject3() {
48
128
  }
49
129
 
50
130
  function _templateObject2() {
51
- var data = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: unset;\n border-radius: 80px;\n border: ", ";\n width: ", ";\n height: ", ";\n z-index: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n .MuiCircularProgress-colorPrimary {\n color: ", ";\n width: ", ";\n height: ", ";\n margin-top: ", ";\n margin-left: ", ";\n }\n\n .MuiCircularProgress-circle {\n stroke-width: ", ";\n r: ", ";\n }\n"]);
131
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n align-items: center;\n display: flex;\n height: ", ";\n width: ", ";\n justify-content: center;\n position: relative;\n background-color: transparent;\n\n @keyframes spinner-svg {\n 0% {\n transform: rotateZ(0deg);\n }\n 100% {\n transform: rotateZ(360deg);\n }\n }\n @keyframes svg-circle-large {\n 0% {\n stroke-dashoffset: 400;\n transform: rotate(0);\n }\n\n 50% {\n stroke-dashoffset: 75;\n transform: rotate(45deg);\n }\n\n 100% {\n stroke-dashoffset: 400;\n transform: rotate(360deg);\n }\n }\n @keyframes svg-circle-small {\n 0% {\n stroke-dashoffset: 35;\n transform: rotate(0);\n }\n\n 50% {\n stroke-dashoffset: 8;\n transform: rotate(45deg);\n }\n\n 100% {\n stroke-dashoffset: 35;\n transform: rotate(360deg);\n }\n }\n"]);
52
132
 
53
133
  _templateObject2 = function _templateObject2() {
54
134
  return data;
@@ -58,7 +138,7 @@ function _templateObject2() {
58
138
  }
59
139
 
60
140
  function _templateObject() {
61
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n opacity: ", ";\n display: flex;\n flex-wrap: wrap;\n justify-content: ", ";\n align-items: ", ";\n position: ", ";\n top: ", ";\n left: ", ";\n right: ", ";\n bottom: ", ";\n z-index: ", ";\n"]);
141
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n display: ", ";\n position: ", ";\n top: ", ";\n left: ", ";\n justify-content: ", ";\n align-items: ", ";\n z-index: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
62
142
 
63
143
  _templateObject = function _templateObject() {
64
144
  return data;
@@ -77,28 +157,101 @@ var DxcSpinner = function DxcSpinner(_ref) {
77
157
  mode = _ref$mode === void 0 ? "large" : _ref$mode,
78
158
  margin = _ref.margin;
79
159
  var colorsTheme = (0, _useTheme["default"])();
160
+ var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
80
161
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
81
162
  theme: colorsTheme.spinner
82
- }, _react["default"].createElement(BackgroundSpinner, {
83
- mode: mode
84
163
  }, _react["default"].createElement(DXCSpinner, {
85
164
  margin: margin,
86
- showValue: showValue,
87
- label: label,
88
165
  mode: mode
89
- }, label && mode !== "small" && _react["default"].createElement(SpinnerLabel, {
90
- showValue: showValue,
166
+ }, _react["default"].createElement(SpinnerContainer, {
167
+ backgroundType: backgroundType,
168
+ mode: mode
169
+ }, mode === "overlay" && _react["default"].createElement(BackOverlay, null), _react["default"].createElement(BackgroundSpinner, {
170
+ mode: mode
171
+ }, mode !== "small" && _react["default"].createElement(SVGBackground, {
172
+ viewBox: "0 0 140 140"
173
+ }, _react["default"].createElement(CircleBackground, {
174
+ cx: "70",
175
+ cy: "70",
176
+ r: "65",
91
177
  mode: mode
92
- }, label), value && mode !== "small" && _react["default"].createElement(SpinnerProgress, {
178
+ })), mode === "small" && _react["default"].createElement(SVGBackground, {
179
+ viewBox: "0 0 16 16"
180
+ }, _react["default"].createElement(CircleBackground, {
181
+ cx: "8",
182
+ cy: "8",
183
+ r: "6",
184
+ mode: mode
185
+ }))), value >= 0 && value <= 100 ? _react["default"].createElement(Spinner, {
186
+ role: "progressbar",
187
+ mode: mode
188
+ }, mode !== "small" && _react["default"].createElement(SVGSpinner, {
189
+ viewBox: "0 0 140 140",
190
+ isDeterminated: true
191
+ }, _react["default"].createElement(CircleSpinner, {
192
+ cx: "70",
193
+ cy: "70",
194
+ r: "65",
195
+ backgroundType: backgroundType,
93
196
  mode: mode,
94
- showValue: showValue,
95
- label: label
96
- }, value === "" ? 0 : value >= 0 && value <= 100 ? value : value < 0 ? 0 : 100, "%"), _react["default"].createElement(_CircularProgress["default"], {
97
- variant: showValue ? "static" : "indeterminate",
98
- value: value === "" ? 0 : value >= 0 && value <= 100 ? value : value < 0 ? 0 : 100,
197
+ isDeterminated: true,
198
+ value: value
199
+ })), mode === "small" && _react["default"].createElement(SVGSpinner, {
200
+ viewBox: "0 0 16 16",
201
+ isDeterminated: true
202
+ }, _react["default"].createElement(CircleSpinner, {
203
+ cx: "8",
204
+ cy: "8",
205
+ r: "6",
206
+ backgroundType: backgroundType,
207
+ mode: mode,
208
+ isDeterminated: true,
209
+ value: value
210
+ }))) : _react["default"].createElement(Spinner, {
211
+ role: "progressbar",
212
+ mode: mode
213
+ }, mode !== "small" && _react["default"].createElement(SVGSpinner, {
214
+ viewBox: "0 0 140 140",
215
+ isDeterminated: false
216
+ }, _react["default"].createElement(CircleSpinner, {
217
+ cx: "70",
218
+ cy: "70",
219
+ r: "65",
220
+ backgroundType: backgroundType,
99
221
  mode: mode,
100
- label: label
101
- }))));
222
+ isDeterminated: false
223
+ })), mode === "small" && _react["default"].createElement(SVGSpinner, {
224
+ viewBox: "0 0 16 16",
225
+ isDeterminated: false
226
+ }, _react["default"].createElement(CircleSpinner, {
227
+ cx: "8",
228
+ cy: "8",
229
+ r: "6",
230
+ backgroundType: backgroundType,
231
+ mode: mode,
232
+ isDeterminated: false
233
+ }))), mode !== "small" && _react["default"].createElement(LabelsContainer, {
234
+ label: label,
235
+ value: value,
236
+ showValue: showValue
237
+ }, _react["default"].createElement(SpinnerLabel, {
238
+ backgroundType: backgroundType,
239
+ mode: mode
240
+ }, label), (value || value === 0) && showValue && _react["default"].createElement(SpinnerProgress, {
241
+ backgroundType: backgroundType,
242
+ mode: mode,
243
+ showValue: showValue
244
+ }, value, "%")))));
245
+ };
246
+
247
+ var determinatedValue = function determinatedValue(props, strokeDashArray) {
248
+ var val = 0;
249
+
250
+ if (props.value >= 0 && props.value <= 100) {
251
+ val = strokeDashArray * (1 - props.value / 100);
252
+ }
253
+
254
+ return val;
102
255
  };
103
256
 
104
257
  DxcSpinner.propTypes = {
@@ -114,14 +267,12 @@ DxcSpinner.propTypes = {
114
267
  }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
115
268
  };
116
269
 
117
- var BackgroundSpinner = _styledComponents["default"].div(_templateObject(), function (props) {
118
- return props.mode === "overlay" ? "".concat(props.theme.overlayBackgroundColor) : "transparent";
270
+ var DXCSpinner = _styledComponents["default"].div(_templateObject(), function (props) {
271
+ return props.mode === "overlay" ? "100vh" : "";
119
272
  }, function (props) {
120
- return props.mode === "overlay" && "".concat(props.theme.overlayOpacity);
273
+ return props.mode === "overlay" ? "100vw" : "";
121
274
  }, function (props) {
122
- return props.mode === "overlay" ? "center" : "";
123
- }, function (props) {
124
- return props.mode === "overlay" ? "center" : "";
275
+ return props.mode === "overlay" ? "flex" : "";
125
276
  }, function (props) {
126
277
  return props.mode === "overlay" ? "fixed" : "";
127
278
  }, function (props) {
@@ -129,21 +280,11 @@ var BackgroundSpinner = _styledComponents["default"].div(_templateObject(), func
129
280
  }, function (props) {
130
281
  return props.mode === "overlay" ? 0 : "";
131
282
  }, function (props) {
132
- return props.mode === "overlay" ? 0 : "";
133
- }, function (props) {
134
- return props.mode === "overlay" ? 0 : "";
135
- }, function (props) {
136
- return props.mode === "overlay" ? 1000 : "";
137
- });
138
-
139
- var DXCSpinner = _styledComponents["default"].div(_templateObject2(), function (props) {
140
- return props.mode === "small" && "6px solid".concat(props.theme.totalCircleColor) || "8.5px solid ".concat(props.theme.totalCircleColor);
141
- }, function (props) {
142
- return props.mode === "small" && "30px" || "120px";
283
+ return props.mode === "overlay" ? "center" : "";
143
284
  }, function (props) {
144
- return props.mode === "small" && "30px" || "120px";
285
+ return props.mode === "overlay" ? "center" : "";
145
286
  }, function (props) {
146
- return props.mode === "overlay" ? "100" : "";
287
+ return props.mode === "overlay" ? 1300 : "";
147
288
  }, function (props) {
148
289
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
149
290
  }, function (props) {
@@ -154,23 +295,55 @@ var DXCSpinner = _styledComponents["default"].div(_templateObject2(), function (
154
295
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
155
296
  }, function (props) {
156
297
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
298
+ });
299
+
300
+ var SpinnerContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
301
+ return props.mode === "small" ? "16px" : "140px";
157
302
  }, function (props) {
158
- return props.theme.trackCircleColor;
303
+ return props.mode === "small" ? "16px" : "140px";
304
+ });
305
+
306
+ var BackOverlay = _styledComponents["default"].div(_templateObject3(), function (props) {
307
+ return "".concat(props.theme.overlayBackgroundColor);
159
308
  }, function (props) {
160
- return props.mode === "small" && "44px !important" || "141px !important";
309
+ return "".concat(props.theme.overlayOpacity);
310
+ });
311
+
312
+ var BackgroundSpinner = _styledComponents["default"].div(_templateObject4());
313
+
314
+ var SVGBackground = _styledComponents["default"].svg(_templateObject5());
315
+
316
+ var CircleBackground = _styledComponents["default"].circle(_templateObject6(), function (props) {
317
+ return "".concat(props.theme.totalCircleColor);
161
318
  }, function (props) {
162
- return props.mode === "small" && "44px !important" || "141px !important";
319
+ return props.mode !== "small" ? "409" : "38";
163
320
  }, function (props) {
164
- return props.label === "" && props.showValue === false && props.mode === "large" ? "-10px" : props.mode === "small" ? "-7px" : props.label !== "" && props.showValue === false ? "-80px" : props.label === "" && props.showValue === true && props.mode === "overlay" ? "-10.75px" : props.label === "" && props.showValue === true && props.mode !== "overlay" ? "-79.75px" : props.label !== "" && props.showValue === true && props.mode === "overlay" ? "-72.5px" : "-89.5px";
321
+ return props.mode !== "small" ? "8.5px" : "2px";
322
+ });
323
+
324
+ var Spinner = _styledComponents["default"].div(_templateObject7());
325
+
326
+ var SVGSpinner = _styledComponents["default"].svg(_templateObject8(), function (props) {
327
+ return !props.isDeterminated ? "1.4s linear infinite both spinner-svg" : "";
328
+ });
329
+
330
+ var CircleSpinner = _styledComponents["default"].circle(_templateObject9(), function (props) {
331
+ return props.isDeterminated ? "none" : props.mode !== "small" ? "1.4s ease-in-out infinite both svg-circle-large" : "1.4s ease-in-out infinite both svg-circle-small";
332
+ }, function (props) {
333
+ return props.backgroundType === "dark" ? props.theme.trackCircleColorOnDark : props.theme.trackCircleColor;
165
334
  }, function (props) {
166
- return props.mode === "small" && "-7px !important" || "-11px !important";
335
+ return !props.isDeterminated ? "50% 50%" : "";
167
336
  }, function (props) {
168
- return props.mode === "small" && "6.2px" || "2.7px";
337
+ return props.mode !== "small" ? "409" : "38";
169
338
  }, function (props) {
170
- return props.mode === "small" && "18.2" || "20.2";
339
+ return props.mode !== "small" ? "8.5px" : "2px";
340
+ }, function (props) {
341
+ return props.isDeterminated ? props.mode !== "small" ? determinatedValue(props, 409) : determinatedValue(props, 38) : "";
171
342
  });
172
343
 
173
- var SpinnerLabel = _styledComponents["default"].div(_templateObject3(), function (props) {
344
+ var LabelsContainer = _styledComponents["default"].div(_templateObject10());
345
+
346
+ var SpinnerLabel = _styledComponents["default"].p(_templateObject11(), function (props) {
174
347
  return props.mode === "overlay" ? props.theme.overlayLabelFontFamily : props.theme.labelFontFamily;
175
348
  }, function (props) {
176
349
  return props.mode === "overlay" ? props.theme.overlayLabelFontWeight : props.theme.labelFontWeight;
@@ -179,18 +352,16 @@ var SpinnerLabel = _styledComponents["default"].div(_templateObject3(), function
179
352
  }, function (props) {
180
353
  return props.mode === "overlay" ? props.theme.overlayLabelFontStyle : props.theme.labelFontStyle;
181
354
  }, function (props) {
182
- return props.showValue === false && "52px" || "45px";
183
- }, function (props) {
184
- return props.mode === "overlay" ? props.theme.overlayLabelFontColor : props.theme.labelFontColor;
185
- }, function (props) {
186
- return props.mode === "overlay" ? props.theme.overlayLabelFontTextTransform : props.theme.labelFontTextTransform;
355
+ return props.mode === "overlay" ? props.theme.overlayLabelFontColor : props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
187
356
  }, function (props) {
188
357
  return props.mode === "overlay" ? props.theme.overlayLabelTextAlign : props.theme.labelTextAlign;
189
358
  }, function (props) {
190
359
  return props.mode === "overlay" ? props.theme.overlayLabelLetterSpacing : props.theme.labelLetterSpacing;
191
360
  });
192
361
 
193
- var SpinnerProgress = _styledComponents["default"].div(_templateObject4(), function (props) {
362
+ var SpinnerProgress = _styledComponents["default"].p(_templateObject12(), function (props) {
363
+ return props.value !== "" && props.showValue === true && "block" || "none";
364
+ }, function (props) {
194
365
  return props.mode === "overlay" ? props.theme.overlayProgressValueFontFamily : props.theme.progressValueFontFamily;
195
366
  }, function (props) {
196
367
  return props.mode === "overlay" ? props.theme.overlayProgressValueFontWeight : props.theme.progressValueFontWeight;
@@ -199,11 +370,7 @@ var SpinnerProgress = _styledComponents["default"].div(_templateObject4(), funct
199
370
  }, function (props) {
200
371
  return props.mode === "overlay" ? props.theme.overlayProgressValueFontStyle : props.theme.progressValueFontStyle;
201
372
  }, function (props) {
202
- return props.label === "" && "52px" || "";
203
- }, function (props) {
204
- return props.value !== "" && props.showValue === true && "block" || "none";
205
- }, function (props) {
206
- return props.mode === "overlay" ? props.theme.overlayProgressValueFontColor : props.theme.progressValueFontColor;
373
+ return props.mode === "overlay" ? props.theme.overlayProgressValueFontColor : props.backgroundType === "dark" ? props.theme.progressValueFontColorOnDark : props.theme.progressValueFontColor;
207
374
  }, function (props) {
208
375
  return props.mode === "overlay" ? props.theme.overlayProgressValueTextAlign : props.theme.progressValueTextAlign;
209
376
  }, function (props) {
@@ -36,7 +36,7 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
36
36
  var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
37
37
 
38
38
  function _templateObject2() {
39
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n opacity: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n cursor: ", ";\n margin-right: ", ";\n"]);
39
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n opacity: 1;\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n cursor: ", ";\n ", "\n"]);
40
40
 
41
41
  _templateObject2 = function _templateObject2() {
42
42
  return data;
@@ -46,7 +46,7 @@ function _templateObject2() {
46
46
  }
47
47
 
48
48
  function _templateObject() {
49
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n display: inline-flex;\n align-items: center;\n flex-direction: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n \n .MuiSwitch-root {\n align-items: center;\n width: ", ";\n height: 45px;\n margin: 3px;\n\n .Mui-focusVisible {\n border: ", ";\n padding: 7px;\n }\n\n .MuiSwitch-track {\n /*Enabled and unchecked bar*/\n background-color: ", ";\n height: ", ";\n }\n\n .MuiSwitch-switchBase + .MuiSwitch-track {\n opacity: ", ";\n .Mui-checked {\n opacity: ", ";\n }\n }\n\n .MuiIconButton-root {\n /*Enabled and unchecked*/\n top: unset;\n .MuiSwitch-thumb {\n /*Only for thumb in all states*/\n width: ", ";\n height: ", ";\n }\n color: ", ";\n &:hover {\n background-color: transparent;\n }\n &.Mui-disabled {\n /*Disabled and unchecked*/\n color: ", ";\n + .MuiSwitch-track {\n /*Disabled and unchecked bar*/\n background-color: ", ";\n }\n }\n &.Mui-disabled.Mui-checked {\n /*Disabled and checked*/\n color: ", ";\n + .MuiSwitch-track {\n /*Disabled and checked bar*/\n background-color: ", ";\n }\n }\n &.Mui-checked {\n /*Enabled and checked*/\n color: ", ";\n transform: translateX(", ");\n &:hover {\n background-color: transparent;\n }\n + .MuiSwitch-track {\n /*Enabled and checked bar*/\n background-color: ", ";\n }\n }\n }\n }\n"]);
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n display: inline-flex;\n align-items: center;\n flex-direction: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n opacity: 1;\n \n .MuiSwitch-root {\n align-items: center;\n width: ", ";\n height: 45px;\n margin: 3px;\n\n .Mui-focusVisible {\n border: ", ";\n padding: 7px;\n }\n\n .MuiSwitch-track {\n /*Enabled and unchecked bar*/\n background-color: ", ";\n height: ", ";\n }\n\n .MuiSwitch-switchBase + .MuiSwitch-track {\n opacity: 1;\n }\n\n .MuiIconButton-root {\n /*Enabled and unchecked*/\n top: unset;\n .MuiSwitch-thumb {\n /*Only for thumb in all states*/\n width: ", ";\n height: ", ";\n }\n color: ", ";\n &:hover {\n background-color: transparent;\n }\n &.Mui-disabled {\n /*Disabled and unchecked*/\n color: ", ";\n + .MuiSwitch-track {\n /*Disabled and unchecked bar*/\n background-color: ", ";\n }\n }\n &.Mui-disabled.Mui-checked {\n /*Disabled and checked*/\n color: ", ";\n + .MuiSwitch-track {\n /*Disabled and checked bar*/\n background-color: ", ";\n }\n }\n &.Mui-checked {\n /*Enabled and checked*/\n color: ", ";\n transform: translateX(", ");\n &:hover {\n background-color: transparent;\n }\n + .MuiSwitch-track {\n /*Enabled and checked bar*/\n background-color: ", ";\n }\n }\n }\n }\n"]);
50
50
 
51
51
  _templateObject = function _templateObject() {
52
52
  return data;
@@ -162,10 +162,6 @@ var SwitchContainer = _styledComponents["default"].div(_templateObject(), functi
162
162
  return props.backgroundType === "dark" ? props.theme.uncheckedTrackBackgroundColorOnDark : props.theme.uncheckedTrackBackgroundColor;
163
163
  }, function (props) {
164
164
  return props.theme.trackHeight;
165
- }, function (props) {
166
- return props.disabled ? "0.34" : "1";
167
- }, function (props) {
168
- return props.disabled ? "0.34" : "1";
169
165
  }, function (props) {
170
166
  return props.theme.thumbWidth;
171
167
  }, function (props) {
@@ -183,15 +179,13 @@ var SwitchContainer = _styledComponents["default"].div(_templateObject(), functi
183
179
  }, function (props) {
184
180
  return props.backgroundType === "dark" ? props.theme.checkedThumbBackgroundColorOnDark : props.theme.checkedThumbBackgroundColor;
185
181
  }, function (props) {
186
- return props.theme.thumbTranslateX;
182
+ return props.theme.thumbShift;
187
183
  }, function (props) {
188
184
  return props.backgroundType === "dark" ? props.theme.checkedTrackBackgroundColorOnDark : props.theme.checkedTrackBackgroundColor;
189
185
  });
190
186
 
191
187
  var LabelContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
192
188
  return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledLabelFontColorOnDark : props.theme.disabledLabelFontColor : props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
193
- }, function (props) {
194
- return props.disabled ? "0.34" : "";
195
189
  }, function (props) {
196
190
  return props.theme.labelFontFamily;
197
191
  }, function (props) {
@@ -203,7 +197,7 @@ var LabelContainer = _styledComponents["default"].span(_templateObject2(), funct
203
197
  }, function (props) {
204
198
  return props.disabled === true ? "not-allowed" : "pointer";
205
199
  }, function (props) {
206
- return props.theme.labelMarginRight;
200
+ return props.labelPosition === "after" ? "margin-left: ".concat(props.theme.spaceBetweenLabelSwitch, ";") : "margin-right: ".concat(props.theme.spaceBetweenLabelSwitch, ";");
207
201
  });
208
202
 
209
203
  DxcSwitch.propTypes = {
@@ -23,8 +23,10 @@ var _utils = require("../common/utils.js");
23
23
 
24
24
  var _useTheme = _interopRequireDefault(require("../useTheme.js"));
25
25
 
26
+ var _BackgroundColorContext = require("../BackgroundColorContext.js");
27
+
26
28
  function _templateObject2() {
27
- var data = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n height: ", ";\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n min-height: 48px;\n padding: 14px 20px 12px 40px;\n }\n & th {\n padding: 16px 20px 16px 40px;\n min-height: 60px;\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n }\n & th:first-child {\n border-top-left-radius: 4px;\n }\n & th:last-child {\n border-top-right-radius: 4px;\n }\n"]);
29
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th:first-child {\n border-top-left-radius: ", ";\n }\n & th:last-child {\n border-top-right-radius: ", ";\n }\n"]);
28
30
 
29
31
  _templateObject2 = function _templateObject2() {
30
32
  return data;
@@ -34,7 +36,7 @@ function _templateObject2() {
34
36
  }
35
37
 
36
38
  function _templateObject() {
37
- var data = (0, _taggedTemplateLiteral2["default"])(["\n overflow-x: auto;\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n &::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 6px;\n }\n &::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 6px;\n }\n"]);
39
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n overflow: hidden auto;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 6px;\n }\n &::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 6px;\n }\n"]);
38
40
 
39
41
  _templateObject = function _templateObject() {
40
42
  return data;
@@ -51,7 +53,9 @@ var DxcTable = function DxcTable(_ref) {
51
53
  theme: colorsTheme.table
52
54
  }, _react["default"].createElement(DxcTableContainer, {
53
55
  margin: margin
54
- }, _react["default"].createElement(DxcTableContent, null, children)));
56
+ }, _react["default"].createElement(DxcTableContent, null, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
57
+ color: colorsTheme.table.dataBackgroundColor
58
+ }, children))));
55
59
  };
56
60
 
57
61
  var calculateWidth = function calculateWidth(margin) {
@@ -78,8 +82,6 @@ var DxcTableContainer = _styledComponents["default"].div(_templateObject(), func
78
82
 
79
83
  var DxcTableContent = _styledComponents["default"].table(_templateObject2(), function (props) {
80
84
  return "".concat(props.theme.rowSeparatorThickness, " ").concat(props.theme.rowSeparatorStyle, " ").concat(props.theme.rowSeparatorColor);
81
- }, function (props) {
82
- return props.theme.rowHeight;
83
85
  }, function (props) {
84
86
  return props.theme.dataBackgroundColor;
85
87
  }, function (props) {
@@ -96,6 +98,10 @@ var DxcTableContent = _styledComponents["default"].table(_templateObject2(), fun
96
98
  return props.theme.dataFontTextTransform;
97
99
  }, function (props) {
98
100
  return props.theme.dataTextAlign;
101
+ }, function (props) {
102
+ return props.theme.dataTextLineHeight;
103
+ }, function (props) {
104
+ return "".concat(props.theme.dataPaddingTop, " ").concat(props.theme.dataPaddingRight, " ").concat(props.theme.dataPaddingBottom, " ").concat(props.theme.dataPaddingLeft);
99
105
  }, function (props) {
100
106
  return props.theme.headerBackgroundColor;
101
107
  }, function (props) {
@@ -112,6 +118,14 @@ var DxcTableContent = _styledComponents["default"].table(_templateObject2(), fun
112
118
  return props.theme.headerFontTextTransform;
113
119
  }, function (props) {
114
120
  return props.theme.headerTextAlign;
121
+ }, function (props) {
122
+ return props.theme.headerTextLineHeight;
123
+ }, function (props) {
124
+ return "".concat(props.theme.headerPaddingTop, " ").concat(props.theme.headerPaddingRight, " ").concat(props.theme.headerPaddingBottom, " ").concat(props.theme.headerPaddingLeft);
125
+ }, function (props) {
126
+ return props.theme.headerBorderRadius;
127
+ }, function (props) {
128
+ return props.theme.headerBorderRadius;
115
129
  });
116
130
 
117
131
  var _default = DxcTable;