@dxc-technology/halstack-react 0.0.0-4d1e793 → 0.0.0-5145b03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ThemeContext.js +131 -99
- package/dist/{textarea/Textarea.js → V3Textarea/V3Textarea.js} +30 -26
- package/dist/accordion/Accordion.js +72 -59
- package/dist/accordion-group/AccordionGroup.js +1 -3
- package/dist/alert/Alert.js +126 -111
- package/dist/alert/index.d.ts +51 -0
- package/dist/box/Box.js +1 -9
- package/dist/button/Button.js +30 -20
- package/dist/card/Card.js +2 -4
- package/dist/checkbox/Checkbox.js +30 -21
- package/dist/chip/Chip.js +30 -28
- package/dist/common/variables.js +981 -572
- package/dist/date/Date.js +23 -35
- package/dist/date-input/DateInput.js +400 -0
- package/dist/date-input/index.d.ts +95 -0
- package/dist/dialog/Dialog.js +21 -39
- package/dist/dropdown/Dropdown.js +123 -71
- package/dist/file-input/FileInput.js +644 -0
- package/dist/file-input/FileItem.js +280 -0
- package/dist/file-input/index.d.ts +81 -0
- package/dist/footer/Footer.js +25 -35
- package/dist/footer/dxc_logo.svg +15 -0
- package/dist/header/Header.js +14 -42
- package/dist/header/dxc_logo_black.svg +8 -0
- package/dist/heading/Heading.js +1 -5
- package/dist/input-text/InputText.js +96 -58
- package/dist/layout/ApplicationLayout.js +1 -1
- package/dist/link/Link.js +23 -26
- package/dist/main.d.ts +8 -0
- package/dist/main.js +62 -6
- package/dist/new-select/NewSelect.js +836 -0
- package/dist/new-select/index.d.ts +53 -0
- package/dist/new-textarea/NewTextarea.js +369 -0
- package/dist/new-textarea/index.d.ts +117 -0
- package/dist/number-input/NumberInput.js +136 -0
- package/dist/number-input/NumberInputContext.js +16 -0
- package/dist/number-input/index.d.ts +113 -0
- package/dist/paginator/Paginator.js +10 -4
- package/dist/password-input/PasswordInput.js +198 -0
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +63 -27
- package/dist/resultsetTable/ResultsetTable.js +5 -22
- package/dist/select/Select.js +189 -185
- package/dist/sidenav/Sidenav.js +11 -15
- package/dist/slider/Slider.js +141 -62
- package/dist/spinner/Spinner.js +225 -58
- package/dist/table/Table.js +6 -2
- package/dist/tag/Tag.js +38 -36
- package/dist/text-input/TextInput.js +971 -0
- package/dist/text-input/index.d.ts +135 -0
- package/dist/toggle-group/ToggleGroup.js +130 -44
- package/dist/upload/Upload.js +3 -3
- package/dist/upload/buttons-upload/ButtonsUpload.js +8 -4
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +16 -12
- package/dist/upload/file-upload/FileToUpload.js +4 -4
- package/dist/upload/readme.md +2 -2
- package/dist/upload/transaction/Transaction.js +13 -9
- package/dist/upload/transactions/Transactions.js +11 -11
- package/dist/wizard/Wizard.js +84 -56
- package/dist/wizard/invalid_icon.svg +4 -5
- package/dist/wizard/valid_icon.svg +4 -5
- package/package.json +4 -2
- package/test/Date.test.js +48 -44
- package/test/DateInput.test.js +242 -0
- package/test/Dropdown.test.js +15 -0
- package/test/FileInput.test.js +201 -0
- package/test/InputText.test.js +24 -16
- package/test/NewTextarea.test.js +195 -0
- package/test/NumberInput.test.js +259 -0
- package/test/Paginator.test.js +1 -1
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +1 -2
- package/test/Select.test.js +44 -24
- package/test/Spinner.test.js +5 -0
- package/test/TextInput.test.js +732 -0
- package/test/ToggleGroup.test.js +5 -1
- package/test/Upload.test.js +5 -5
- package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/accordion-group/AccordionGroup.stories.js +0 -207
- package/dist/accordion-group/readme.md +0 -70
- package/dist/alert/Alert.stories.js +0 -158
- package/dist/alert/close.svg +0 -4
- package/dist/alert/error.svg +0 -4
- package/dist/alert/info.svg +0 -4
- package/dist/alert/readme.md +0 -43
- package/dist/alert/success.svg +0 -4
- package/dist/alert/warning.svg +0 -4
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.stories.js +0 -249
- package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
- package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
- package/dist/dropdown/readme.md +0 -69
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo_wht.png +0 -0
- package/dist/header/dxc_logo_black.png +0 -0
- package/dist/header/dxc_logo_blk_rgb.svg +0 -6
- package/dist/header/dxc_logo_white.png +0 -0
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/toggle-group/readme.md +0 -82
package/dist/spinner/Spinner.js
CHANGED
|
@@ -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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
90
|
-
|
|
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
|
-
}
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
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
|
|
118
|
-
return props.mode === "overlay" ? ""
|
|
270
|
+
var DXCSpinner = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
271
|
+
return props.mode === "overlay" ? "100vh" : "";
|
|
119
272
|
}, function (props) {
|
|
120
|
-
return props.mode === "overlay"
|
|
273
|
+
return props.mode === "overlay" ? "100vw" : "";
|
|
121
274
|
}, function (props) {
|
|
122
|
-
return props.mode === "overlay" ? "
|
|
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" ?
|
|
283
|
+
return props.mode === "overlay" ? "center" : "";
|
|
133
284
|
}, function (props) {
|
|
134
|
-
return props.mode === "overlay" ?
|
|
285
|
+
return props.mode === "overlay" ? "center" : "";
|
|
135
286
|
}, function (props) {
|
|
136
287
|
return props.mode === "overlay" ? 1300 : "";
|
|
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";
|
|
143
|
-
}, function (props) {
|
|
144
|
-
return props.mode === "small" && "30px" || "120px";
|
|
145
|
-
}, function (props) {
|
|
146
|
-
return props.mode === "overlay" ? "100" : "";
|
|
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.
|
|
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.
|
|
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
|
|
319
|
+
return props.mode !== "small" ? "409" : "38";
|
|
163
320
|
}, function (props) {
|
|
164
|
-
return props.
|
|
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.
|
|
335
|
+
return !props.isDeterminated ? "50% 50%" : "";
|
|
167
336
|
}, function (props) {
|
|
168
|
-
return props.mode
|
|
337
|
+
return props.mode !== "small" ? "409" : "38";
|
|
169
338
|
}, function (props) {
|
|
170
|
-
return props.mode
|
|
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
|
|
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.
|
|
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"].
|
|
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.
|
|
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) {
|
package/dist/table/Table.js
CHANGED
|
@@ -23,6 +23,8 @@ 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
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
|
|
|
@@ -34,7 +36,7 @@ function _templateObject2() {
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
function _templateObject() {
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n overflow
|
|
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,
|
|
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) {
|
package/dist/tag/Tag.js
CHANGED
|
@@ -30,7 +30,7 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
|
30
30
|
var _Box = _interopRequireDefault(require("../box/Box"));
|
|
31
31
|
|
|
32
32
|
function _templateObject8() {
|
|
33
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding:
|
|
33
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n flex-grow: 1;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"]);
|
|
34
34
|
|
|
35
35
|
_templateObject8 = function _templateObject8() {
|
|
36
36
|
return data;
|
|
@@ -40,7 +40,7 @@ function _templateObject8() {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function _templateObject7() {
|
|
43
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n background: ", ";\n width: ", ";\n justify-content: center;\n align-items: center;\n color: ", ";\n
|
|
43
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n background: ", ";\n width: ", ";\n height: 100%;\n justify-content: center;\n align-items: center;\n color: ", ";\n"]);
|
|
44
44
|
|
|
45
45
|
_templateObject7 = function _templateObject7() {
|
|
46
46
|
return data;
|
|
@@ -50,7 +50,7 @@ function _templateObject7() {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
function _templateObject6() {
|
|
53
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
53
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n\n img,\n svg {\n width: ", ";\n height: ", ";\n }\n"]);
|
|
54
54
|
|
|
55
55
|
_templateObject6 = function _templateObject6() {
|
|
56
56
|
return data;
|
|
@@ -60,7 +60,7 @@ function _templateObject6() {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function _templateObject5() {
|
|
63
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
63
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n width: ", ";\n height: ", ";\n"]);
|
|
64
64
|
|
|
65
65
|
_templateObject5 = function _templateObject5() {
|
|
66
66
|
return data;
|
|
@@ -70,7 +70,7 @@ function _templateObject5() {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function _templateObject4() {
|
|
73
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n
|
|
73
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n background: none;\n border-radius: 4px;\n border: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n\n :focus {\n outline: 2px solid ", ";\n }\n"]);
|
|
74
74
|
|
|
75
75
|
_templateObject4 = function _templateObject4() {
|
|
76
76
|
return data;
|
|
@@ -80,7 +80,7 @@ function _templateObject4() {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
function _templateObject3() {
|
|
83
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n"]);
|
|
83
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n border-radius: 4px;\n\n :focus {\n outline: 2px solid ", ";\n outline-offset: 0px;\n }\n"]);
|
|
84
84
|
|
|
85
85
|
_templateObject3 = function _templateObject3() {
|
|
86
86
|
return data;
|
|
@@ -100,7 +100,7 @@ function _templateObject2() {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function _templateObject() {
|
|
103
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
103
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n cursor: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
104
104
|
|
|
105
105
|
_templateObject = function _templateObject() {
|
|
106
106
|
return data;
|
|
@@ -117,7 +117,7 @@ var DxcTag = function DxcTag(_ref) {
|
|
|
117
117
|
linkHref = _ref.linkHref,
|
|
118
118
|
onClick = _ref.onClick,
|
|
119
119
|
_ref$iconBgColor = _ref.iconBgColor,
|
|
120
|
-
iconBgColor = _ref$iconBgColor === void 0 ? "#
|
|
120
|
+
iconBgColor = _ref$iconBgColor === void 0 ? "#5f249f" : _ref$iconBgColor,
|
|
121
121
|
_ref$labelPosition = _ref.labelPosition,
|
|
122
122
|
labelPosition = _ref$labelPosition === void 0 ? "after" : _ref$labelPosition,
|
|
123
123
|
_ref$newWindow = _ref.newWindow,
|
|
@@ -125,7 +125,7 @@ var DxcTag = function DxcTag(_ref) {
|
|
|
125
125
|
_ref$size = _ref.size,
|
|
126
126
|
size = _ref$size === void 0 ? "fitContent" : _ref$size,
|
|
127
127
|
_ref$tabIndex = _ref.tabIndex,
|
|
128
|
-
tabIndex = _ref$tabIndex === void 0 ?
|
|
128
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
129
129
|
var colorsTheme = (0, _useTheme["default"])();
|
|
130
130
|
|
|
131
131
|
var _useState = (0, _react.useState)(false),
|
|
@@ -134,9 +134,7 @@ var DxcTag = function DxcTag(_ref) {
|
|
|
134
134
|
changeIsHovered = _useState2[1];
|
|
135
135
|
|
|
136
136
|
var clickHandler = function clickHandler() {
|
|
137
|
-
|
|
138
|
-
onClick();
|
|
139
|
-
}
|
|
137
|
+
onClick && onClick();
|
|
140
138
|
};
|
|
141
139
|
|
|
142
140
|
var tagContent = _react["default"].createElement(_Box["default"], {
|
|
@@ -144,7 +142,6 @@ var DxcTag = function DxcTag(_ref) {
|
|
|
144
142
|
shadowDepth: isHovered && (onClick || linkHref) && 2 || 1
|
|
145
143
|
}, _react["default"].createElement(TagContent, {
|
|
146
144
|
labelPosition: labelPosition,
|
|
147
|
-
margin: margin,
|
|
148
145
|
size: size
|
|
149
146
|
}, _react["default"].createElement(IconContainer, {
|
|
150
147
|
iconBgColor: iconBgColor
|
|
@@ -185,9 +182,7 @@ var calculateWidth = function calculateWidth(size) {
|
|
|
185
182
|
return sizes[size];
|
|
186
183
|
};
|
|
187
184
|
|
|
188
|
-
var StyledDxcTag = _styledComponents["default"].div(_templateObject(), function (
|
|
189
|
-
return props.theme.fontStyle;
|
|
190
|
-
}, function (_ref2) {
|
|
185
|
+
var StyledDxcTag = _styledComponents["default"].div(_templateObject(), function (_ref2) {
|
|
191
186
|
var hasAction = _ref2.hasAction;
|
|
192
187
|
return hasAction && "pointer" || "unset";
|
|
193
188
|
}, function (_ref3) {
|
|
@@ -216,20 +211,24 @@ var TagContent = _styledComponents["default"].div(_templateObject2(), function (
|
|
|
216
211
|
return props.theme.height;
|
|
217
212
|
});
|
|
218
213
|
|
|
219
|
-
var StyledLink = _styledComponents["default"].a(_templateObject3())
|
|
214
|
+
var StyledLink = _styledComponents["default"].a(_templateObject3(), function (props) {
|
|
215
|
+
return props.theme.focusColor;
|
|
216
|
+
});
|
|
220
217
|
|
|
221
|
-
var StyledButton = _styledComponents["default"].button(_templateObject4())
|
|
218
|
+
var StyledButton = _styledComponents["default"].button(_templateObject4(), function (props) {
|
|
219
|
+
return props.theme.focusColor;
|
|
220
|
+
});
|
|
222
221
|
|
|
223
222
|
var TagIcon = _styledComponents["default"].img(_templateObject5(), function (props) {
|
|
224
|
-
return props.theme.iconHeight;
|
|
225
|
-
}, function (props) {
|
|
226
223
|
return props.theme.iconWidth;
|
|
224
|
+
}, function (props) {
|
|
225
|
+
return props.theme.iconHeight;
|
|
227
226
|
});
|
|
228
227
|
|
|
229
228
|
var TagIconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
230
|
-
return props.theme.iconHeight;
|
|
231
|
-
}, function (props) {
|
|
232
229
|
return props.theme.iconWidth;
|
|
230
|
+
}, function (props) {
|
|
231
|
+
return props.theme.iconHeight;
|
|
233
232
|
});
|
|
234
233
|
|
|
235
234
|
var IconContainer = _styledComponents["default"].div(_templateObject7(), function (_ref9) {
|
|
@@ -239,12 +238,26 @@ var IconContainer = _styledComponents["default"].div(_templateObject7(), functio
|
|
|
239
238
|
return props.theme.iconSectionWidth;
|
|
240
239
|
}, function (props) {
|
|
241
240
|
return props.theme.iconColor;
|
|
242
|
-
}, function (props) {
|
|
243
|
-
return props.theme.height;
|
|
244
241
|
});
|
|
245
242
|
|
|
246
243
|
var TagLabel = _styledComponents["default"].div(_templateObject8(), function (props) {
|
|
247
|
-
return props.theme.
|
|
244
|
+
return props.theme.fontFamily;
|
|
245
|
+
}, function (props) {
|
|
246
|
+
return props.theme.fontSize;
|
|
247
|
+
}, function (props) {
|
|
248
|
+
return props.theme.fontStyle;
|
|
249
|
+
}, function (props) {
|
|
250
|
+
return props.theme.fontWeight;
|
|
251
|
+
}, function (props) {
|
|
252
|
+
return props.theme.fontColor;
|
|
253
|
+
}, function (props) {
|
|
254
|
+
return props.theme.labelPaddingTop;
|
|
255
|
+
}, function (props) {
|
|
256
|
+
return props.theme.labelPaddingBottom;
|
|
257
|
+
}, function (props) {
|
|
258
|
+
return props.theme.labelPaddingLeft;
|
|
259
|
+
}, function (props) {
|
|
260
|
+
return props.theme.labelPaddingRight;
|
|
248
261
|
});
|
|
249
262
|
|
|
250
263
|
DxcTag.propTypes = {
|
|
@@ -265,16 +278,5 @@ DxcTag.propTypes = {
|
|
|
265
278
|
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
266
279
|
tabIndex: _propTypes["default"].number
|
|
267
280
|
};
|
|
268
|
-
DxcTag.defaultProps = {
|
|
269
|
-
icon: null,
|
|
270
|
-
iconSrc: null,
|
|
271
|
-
label: null,
|
|
272
|
-
margin: null,
|
|
273
|
-
linkHref: null,
|
|
274
|
-
onClick: null,
|
|
275
|
-
iconBgColor: "#6f2c91",
|
|
276
|
-
labelPosition: "after",
|
|
277
|
-
newWindow: false
|
|
278
|
-
};
|
|
279
281
|
var _default = DxcTag;
|
|
280
282
|
exports["default"] = _default;
|