@dxc-technology/halstack-react 0.0.0-9196773 → 0.0.0-933ff75
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/V3Textarea/V3Textarea.js +264 -0
- package/dist/button/Button.js +1 -1
- package/dist/common/variables.js +40 -40
- package/dist/date/Date.js +6 -6
- package/dist/file-input/FileInput.js +2 -2
- package/dist/footer/Footer.js +44 -18
- package/dist/footer/Icons.js +77 -0
- package/dist/header/Header.js +80 -49
- package/dist/header/Icons.js +59 -0
- package/dist/input-text/Icons.js +22 -0
- package/dist/input-text/InputText.js +4 -6
- package/dist/layout/ApplicationLayout.js +4 -8
- package/dist/layout/Icons.js +55 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +7 -7
- package/dist/paginator/Icons.js +66 -0
- package/dist/paginator/Paginator.js +5 -11
- package/dist/slider/Slider.js +16 -6
- package/dist/textarea/Textarea.js +227 -122
- package/dist/{new-textarea → textarea}/index.d.ts +1 -1
- package/dist/upload/transaction/Icons.js +160 -0
- package/dist/upload/transaction/Transaction.js +11 -38
- package/dist/wizard/Icons.js +65 -0
- package/dist/wizard/Wizard.js +3 -9
- package/package.json +1 -1
- package/test/Date.test.js +48 -44
- package/test/Footer.test.js +2 -7
- package/test/Header.test.js +5 -10
- package/test/Slider.test.js +9 -17
- package/test/{NewTextarea.test.js → Textarea.test.js} +16 -18
- package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
- package/dist/footer/dxc_logo.svg +0 -15
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.svg +0 -8
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- package/dist/new-textarea/NewTextarea.js +0 -369
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/wizard/invalid_icon.svg +0 -5
- package/dist/wizard/valid_icon.svg +0 -5
- package/dist/wizard/validation-wrong.svg +0 -6
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
+
|
|
14
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
+
|
|
16
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
+
|
|
18
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
+
|
|
22
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
|
+
|
|
24
|
+
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
25
|
+
|
|
26
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
+
|
|
28
|
+
var _variables = require("../common/variables.js");
|
|
29
|
+
|
|
30
|
+
var _utils = require("../common/utils.js");
|
|
31
|
+
|
|
32
|
+
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
33
|
+
|
|
34
|
+
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
35
|
+
|
|
36
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
|
|
37
|
+
|
|
38
|
+
function _templateObject() {
|
|
39
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: inline-block;\n position: relative;\n height: auto;\n width: ", ";\n\n .MuiTextField-root {\n width: 100%;\n\n .MuiFormHelperText-root {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n margin-top: 6px;\n }\n .MuiFormLabel-root {\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n padding-left: \"inherit\";\n\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n\n &.Mui-focused {\n color: ", ";\n &.MuiInputLabel-shrink {\n transform: \"translate(0, 1.5px) scale(0.75);\";\n }\n }\n\n &.MuiInputLabel-shrink {\n font-family: ", ";\n transform: \"translate(0, 1.5px) scale(0.75)\";\n }\n\n &.Mui-error {\n color: ", ";\n }\n\n &:not(.MuiInputLabel-shrink) {\n font-family: ", ";\n color: ", ";\n & + div,\n & + div + p {\n color: ", ";\n }\n }\n\n &.MuiInputLabel-shrink {\n & + div::before {\n border-color: ", ";\n }\n & + div + p {\n color: ", ";\n }\n }\n }\n .MuiInputBase-root.MuiInput-root.MuiInput-underline {\n &::before {\n border-bottom: ", ";\n }\n\n &:not(.Mui-error)::before,\n &:not(&.Mui-focused)::before {\n border-bottom: ", ";\n }\n\n &::after {\n border-bottom: ", ";\n }\n\n .MuiInputBase-inputMultiline {\n overflow: auto !important;\n\n ::-webkit-scrollbar {\n width: 3px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n }\n\n &.Mui-error {\n &::before {\n border-width: ", ";\n border-color: ", ";\n }\n &::after {\n transform: scaleX(0);\n }\n }\n\n &.Mui-focused {\n &::after {\n border-width: calc(", " + 1px);\n border-color: ", ";\n }\n &.Mui-error::after {\n border-color: ", ";\n }\n }\n\n &.Mui-disabled {\n cursor: not-allowed;\n\n &::before {\n border-bottom: ", ";\n border-bottom-style: solid;\n }\n }\n\n .MuiInputBase-input {\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n line-height: ", ";\n padding-left: \"inherit\";\n text-overflow: ellipsis;\n\n &.Mui-disabled {\n cursor: not-allowed;\n color: ", ";\n }\n }\n\n &:hover:not(.Mui-disabled):before &:hover:not(.Mui-error):before {\n border-bottom-color: ", ";\n }\n }\n\n & > p {\n &.Mui-error {\n color: ", ";\n }\n &.Mui-disabled {\n color: ", " !important;\n cursor: not-allowed;\n }\n }\n }\n"]);
|
|
40
|
+
|
|
41
|
+
_templateObject = function _templateObject() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var V3DxcTextarea = function V3DxcTextarea(_ref) {
|
|
49
|
+
var _ref$label = _ref.label,
|
|
50
|
+
label = _ref$label === void 0 ? " " : _ref$label,
|
|
51
|
+
_ref$name = _ref.name,
|
|
52
|
+
name = _ref$name === void 0 ? "" : _ref$name,
|
|
53
|
+
value = _ref.value,
|
|
54
|
+
_ref$assistiveText = _ref.assistiveText,
|
|
55
|
+
assistiveText = _ref$assistiveText === void 0 ? "" : _ref$assistiveText,
|
|
56
|
+
_ref$disabled = _ref.disabled,
|
|
57
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
58
|
+
_ref$onChange = _ref.onChange,
|
|
59
|
+
onChange = _ref$onChange === void 0 ? "" : _ref$onChange,
|
|
60
|
+
_ref$onBlur = _ref.onBlur,
|
|
61
|
+
onBlur = _ref$onBlur === void 0 ? "" : _ref$onBlur,
|
|
62
|
+
_ref$numRows = _ref.numRows,
|
|
63
|
+
numRows = _ref$numRows === void 0 ? 4 : _ref$numRows,
|
|
64
|
+
_ref$invalid = _ref.invalid,
|
|
65
|
+
invalid = _ref$invalid === void 0 ? false : _ref$invalid,
|
|
66
|
+
_ref$required = _ref.required,
|
|
67
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
68
|
+
_ref$placeholder = _ref.placeholder,
|
|
69
|
+
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
70
|
+
margin = _ref.margin,
|
|
71
|
+
_ref$size = _ref.size,
|
|
72
|
+
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
73
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
74
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
75
|
+
|
|
76
|
+
var _useState = (0, _react.useState)(""),
|
|
77
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
78
|
+
innerValue = _useState2[0],
|
|
79
|
+
setInnerValue = _useState2[1];
|
|
80
|
+
|
|
81
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
82
|
+
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
83
|
+
|
|
84
|
+
var handlerTextareaChange = function handlerTextareaChange(event) {
|
|
85
|
+
if (value === null || value === undefined) {
|
|
86
|
+
if (typeof onChange === "function") {
|
|
87
|
+
setInnerValue(event.target.value);
|
|
88
|
+
onChange(event.target.value);
|
|
89
|
+
} else {
|
|
90
|
+
setInnerValue(event.target.value);
|
|
91
|
+
}
|
|
92
|
+
} else if (onChange !== "") {
|
|
93
|
+
if (typeof onChange === "function") {
|
|
94
|
+
onChange(event.target.value);
|
|
95
|
+
} else {
|
|
96
|
+
setInnerValue(event.target.value);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var handlerTextareaBlur = function handlerTextareaBlur(event) {
|
|
102
|
+
setInnerValue(event.target.value);
|
|
103
|
+
|
|
104
|
+
if (onBlur) {
|
|
105
|
+
onBlur(event.target.value);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
110
|
+
theme: colorsTheme.V3Textarea
|
|
111
|
+
}, _react["default"].createElement(TextContainer, {
|
|
112
|
+
required: required,
|
|
113
|
+
assistiveText: assistiveText,
|
|
114
|
+
margin: margin,
|
|
115
|
+
size: size,
|
|
116
|
+
backgroundType: backgroundType
|
|
117
|
+
}, _react["default"].createElement(_TextField["default"], {
|
|
118
|
+
error: invalid,
|
|
119
|
+
value: value !== null ? value : innerValue,
|
|
120
|
+
name: name,
|
|
121
|
+
multiline: true,
|
|
122
|
+
disabled: disabled,
|
|
123
|
+
label: required ? _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_RequiredComponent["default"], null), label) : label,
|
|
124
|
+
helperText: assistiveText,
|
|
125
|
+
onChange: handlerTextareaChange,
|
|
126
|
+
onBlur: onBlur && handlerTextareaBlur || null,
|
|
127
|
+
rows: numRows,
|
|
128
|
+
placeholder: placeholder,
|
|
129
|
+
inputProps: {
|
|
130
|
+
tabIndex: tabIndex
|
|
131
|
+
}
|
|
132
|
+
})));
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var sizes = {
|
|
136
|
+
small: "42px",
|
|
137
|
+
medium: "240px",
|
|
138
|
+
large: "480px",
|
|
139
|
+
fillParent: "100%"
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
var calculateWidth = function calculateWidth(margin, size) {
|
|
143
|
+
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var TextContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
147
|
+
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
148
|
+
}, function (props) {
|
|
149
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
150
|
+
}, function (props) {
|
|
151
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
152
|
+
}, function (props) {
|
|
153
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
154
|
+
}, function (props) {
|
|
155
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
156
|
+
}, function (props) {
|
|
157
|
+
return calculateWidth(props.margin, props.size);
|
|
158
|
+
}, function (props) {
|
|
159
|
+
return props.theme.fontFamily;
|
|
160
|
+
}, function (props) {
|
|
161
|
+
return props.theme.assistiveTextFontSize;
|
|
162
|
+
}, function (props) {
|
|
163
|
+
return props.theme.assistiveTextFontStyle;
|
|
164
|
+
}, function (props) {
|
|
165
|
+
return props.theme.assistiveTextFontWeight;
|
|
166
|
+
}, function (props) {
|
|
167
|
+
return props.theme.assistiveTextLetterSpacing;
|
|
168
|
+
}, function (props) {
|
|
169
|
+
return props.theme.labelFontSize;
|
|
170
|
+
}, function (props) {
|
|
171
|
+
return props.theme.labelFontStyle;
|
|
172
|
+
}, function (props) {
|
|
173
|
+
return props.theme.labelFontWeight;
|
|
174
|
+
}, function (props) {
|
|
175
|
+
return props.theme.labelLetterSpacing;
|
|
176
|
+
}, function (props) {
|
|
177
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
178
|
+
}, function (props) {
|
|
179
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
180
|
+
}, function (props) {
|
|
181
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
182
|
+
}, function (props) {
|
|
183
|
+
return props.theme.fontFamily;
|
|
184
|
+
}, function (props) {
|
|
185
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
186
|
+
}, function (props) {
|
|
187
|
+
return props.theme.fontFamily;
|
|
188
|
+
}, function (props) {
|
|
189
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
190
|
+
}, function (props) {
|
|
191
|
+
return props.backgroundType === "dark" ? props.theme.assistiveTextFontColorOnDark : props.theme.assistiveTextFontColor;
|
|
192
|
+
}, function (props) {
|
|
193
|
+
return props.backgroundType ? props.theme.underlineColorOnDark : props.theme.underlineColor;
|
|
194
|
+
}, function (props) {
|
|
195
|
+
return props.backgroundType === "dark" ? props.theme.labelFontColorOnDark : props.theme.labelFontColor;
|
|
196
|
+
}, function (props) {
|
|
197
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
198
|
+
}, function (props) {
|
|
199
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.underlineColorOnDark : props.theme.underlineColor);
|
|
200
|
+
}, function (props) {
|
|
201
|
+
return "calc(".concat(props.theme.underlineThickness, " + 1px) solid ").concat(props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor);
|
|
202
|
+
}, function (props) {
|
|
203
|
+
return props.backgroundType === "dark" ? props.theme.scrollBarTrackColorOnDark : props.theme.scrollBarTrackColor;
|
|
204
|
+
}, function (props) {
|
|
205
|
+
return props.backgroundType === "dark" ? props.theme.scrollBarThumbColorOnDark : props.theme.scrollBarThumbColor;
|
|
206
|
+
}, function (props) {
|
|
207
|
+
return props.theme.underlineThickness;
|
|
208
|
+
}, function (props) {
|
|
209
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
210
|
+
}, function (props) {
|
|
211
|
+
return props.theme.underlineThickness;
|
|
212
|
+
}, function (props) {
|
|
213
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
214
|
+
}, function (props) {
|
|
215
|
+
return props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor;
|
|
216
|
+
}, function (props) {
|
|
217
|
+
return "".concat(props.theme.underlineThickness, " solid ").concat(props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor, " !important");
|
|
218
|
+
}, function (props) {
|
|
219
|
+
return props.theme.fontFamily;
|
|
220
|
+
}, function (props) {
|
|
221
|
+
return props.theme.valueFontSize;
|
|
222
|
+
}, function (props) {
|
|
223
|
+
return props.theme.valueFontStyle;
|
|
224
|
+
}, function (props) {
|
|
225
|
+
return props.theme.valueFontWeight;
|
|
226
|
+
}, function (props) {
|
|
227
|
+
return props.theme.valueLetterSpacing;
|
|
228
|
+
}, function (props) {
|
|
229
|
+
return props.backgroundType === "dark" ? props.theme.valueFontColorOnDark : props.theme.valueFontColor;
|
|
230
|
+
}, function (props) {
|
|
231
|
+
return props.theme.valueLineHeight;
|
|
232
|
+
}, function (props) {
|
|
233
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
234
|
+
}, function (props) {
|
|
235
|
+
return props.backgroundType === "dark" ? props.theme.underlineFocusColorOnDark : props.theme.underlineFocusColor;
|
|
236
|
+
}, function (props) {
|
|
237
|
+
return "".concat(props.backgroundType === "dark" ? props.theme.errorColorOnDark : props.theme.errorColor, " !important");
|
|
238
|
+
}, function (props) {
|
|
239
|
+
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
V3DxcTextarea.propTypes = {
|
|
243
|
+
label: _propTypes["default"].string,
|
|
244
|
+
name: _propTypes["default"].string,
|
|
245
|
+
value: _propTypes["default"].string,
|
|
246
|
+
assistiveText: _propTypes["default"].string,
|
|
247
|
+
disabled: _propTypes["default"].bool,
|
|
248
|
+
required: _propTypes["default"].bool,
|
|
249
|
+
invalid: _propTypes["default"].bool,
|
|
250
|
+
placeholder: _propTypes["default"].string,
|
|
251
|
+
onChange: _propTypes["default"].func,
|
|
252
|
+
onBlur: _propTypes["default"].func,
|
|
253
|
+
numRows: _propTypes["default"].number,
|
|
254
|
+
size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
|
|
255
|
+
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
256
|
+
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
257
|
+
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
258
|
+
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
259
|
+
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
260
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
261
|
+
tabIndex: _propTypes["default"].number
|
|
262
|
+
};
|
|
263
|
+
var _default = V3DxcTextarea;
|
|
264
|
+
exports["default"] = _default;
|
package/dist/button/Button.js
CHANGED
|
@@ -52,7 +52,7 @@ function _templateObject3() {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function _templateObject2() {
|
|
55
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 24px;\n max-width: 24px;\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n
|
|
55
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 24px;\n max-width: 24px;\n margin-left: ", ";\n margin-right: ", ";\n overflow: hidden;\n display: flex;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
56
56
|
|
|
57
57
|
_templateObject2 = function _templateObject2() {
|
|
58
58
|
return data;
|
package/dist/common/variables.js
CHANGED
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.typeface = exports.responsiveSizes = exports.spaces = exports.componentTokens = exports.globalTokens = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _Icons = require("../header/Icons");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _Icons2 = _interopRequireDefault(require("../footer/Icons"));
|
|
13
13
|
|
|
14
14
|
var globalTokens = {
|
|
15
15
|
// Color
|
|
@@ -559,7 +559,7 @@ var componentTokens = {
|
|
|
559
559
|
copyrightFontStyle: globalTokens.type_normal,
|
|
560
560
|
copyrightFontWeight: globalTokens.type_regular,
|
|
561
561
|
copyrightFontColor: globalTokens.hal_white,
|
|
562
|
-
logo:
|
|
562
|
+
logo: _Icons2["default"],
|
|
563
563
|
logoHeight: "32px",
|
|
564
564
|
logoWidth: "auto",
|
|
565
565
|
socialLinksSize: "24px",
|
|
@@ -577,8 +577,8 @@ var componentTokens = {
|
|
|
577
577
|
hamburguerTextTransform: globalTokens.type_uppercase,
|
|
578
578
|
hamburguerIconColor: globalTokens.hal_black,
|
|
579
579
|
hamburguerHoverColor: globalTokens.mediumGreyBlack,
|
|
580
|
-
logo:
|
|
581
|
-
logoResponsive:
|
|
580
|
+
logo: _Icons.dxcLogo,
|
|
581
|
+
logoResponsive: _Icons.dxcLogo,
|
|
582
582
|
logoHeight: "40px",
|
|
583
583
|
logoWidth: "auto",
|
|
584
584
|
menuBackgroundColor: globalTokens.hal_white,
|
|
@@ -1267,41 +1267,6 @@ var componentTokens = {
|
|
|
1267
1267
|
badgeRadiusWithNotificationNumber: "10px"
|
|
1268
1268
|
},
|
|
1269
1269
|
textarea: {
|
|
1270
|
-
fontFamily: globalTokens.type_sans,
|
|
1271
|
-
assistiveTextFontSize: globalTokens.type_scale_01,
|
|
1272
|
-
assistiveTextFontStyle: globalTokens.type_normal,
|
|
1273
|
-
assistiveTextFontWeight: globalTokens.type_regular,
|
|
1274
|
-
assistiveTextFontColor: globalTokens.black,
|
|
1275
|
-
assistiveTextFontColorOnDark: globalTokens.white,
|
|
1276
|
-
assistiveTextLetterSpacing: "0.03333em",
|
|
1277
|
-
disabledColor: globalTokens.lighterBlack,
|
|
1278
|
-
disabledColorOnDark: "#575757",
|
|
1279
|
-
errorColor: globalTokens.red,
|
|
1280
|
-
errorColorOnDark: globalTokens.hal_red_l_60,
|
|
1281
|
-
scrollBarThumbColor: globalTokens.darkGrey,
|
|
1282
|
-
scrollBarThumbColorOnDark: globalTokens.white,
|
|
1283
|
-
scrollBarTrackColor: globalTokens.lightGrey,
|
|
1284
|
-
scrollBarTrackColorOnDark: "#999999",
|
|
1285
|
-
labelFontSize: globalTokens.type_scale_03,
|
|
1286
|
-
labelFontStyle: globalTokens.type_normal,
|
|
1287
|
-
labelFontWeight: globalTokens.type_regular,
|
|
1288
|
-
labelFontColor: globalTokens.black,
|
|
1289
|
-
labelFontColorOnDark: globalTokens.white,
|
|
1290
|
-
labelLetterSpacing: "0.00938em",
|
|
1291
|
-
valueFontSize: globalTokens.type_scale_03,
|
|
1292
|
-
valueFontStyle: globalTokens.type_normal,
|
|
1293
|
-
valueFontWeight: globalTokens.type_regular,
|
|
1294
|
-
valueFontColor: globalTokens.black,
|
|
1295
|
-
valueFontColorOnDark: globalTokens.white,
|
|
1296
|
-
valueLetterSpacing: globalTokens.type_spacing_normal,
|
|
1297
|
-
valueLineHeight: "1.1875em",
|
|
1298
|
-
underlineColor: globalTokens.black,
|
|
1299
|
-
underlineColorOnDark: globalTokens.white,
|
|
1300
|
-
underlineFocusColor: globalTokens.black,
|
|
1301
|
-
underlineFocusColorOnDark: globalTokens.white,
|
|
1302
|
-
underlineThickness: "1px"
|
|
1303
|
-
},
|
|
1304
|
-
newTextarea: {
|
|
1305
1270
|
fontFamily: globalTokens.type_sans,
|
|
1306
1271
|
enabledBorderColor: globalTokens.hal_black,
|
|
1307
1272
|
enabledBorderColorOnDark: globalTokens.hal_white,
|
|
@@ -1459,6 +1424,41 @@ var componentTokens = {
|
|
|
1459
1424
|
uploadedFilesSubtitleFontColor: globalTokens.darkGrey,
|
|
1460
1425
|
uploadedFilesNumberFontWeight: globalTokens.type_bold
|
|
1461
1426
|
},
|
|
1427
|
+
V3Textarea: {
|
|
1428
|
+
fontFamily: globalTokens.type_sans,
|
|
1429
|
+
assistiveTextFontSize: globalTokens.type_scale_01,
|
|
1430
|
+
assistiveTextFontStyle: globalTokens.type_normal,
|
|
1431
|
+
assistiveTextFontWeight: globalTokens.type_regular,
|
|
1432
|
+
assistiveTextFontColor: globalTokens.black,
|
|
1433
|
+
assistiveTextFontColorOnDark: globalTokens.white,
|
|
1434
|
+
assistiveTextLetterSpacing: "0.03333em",
|
|
1435
|
+
disabledColor: globalTokens.lighterBlack,
|
|
1436
|
+
disabledColorOnDark: "#575757",
|
|
1437
|
+
errorColor: globalTokens.red,
|
|
1438
|
+
errorColorOnDark: globalTokens.hal_red_l_60,
|
|
1439
|
+
scrollBarThumbColor: globalTokens.darkGrey,
|
|
1440
|
+
scrollBarThumbColorOnDark: globalTokens.white,
|
|
1441
|
+
scrollBarTrackColor: globalTokens.lightGrey,
|
|
1442
|
+
scrollBarTrackColorOnDark: "#999999",
|
|
1443
|
+
labelFontSize: globalTokens.type_scale_03,
|
|
1444
|
+
labelFontStyle: globalTokens.type_normal,
|
|
1445
|
+
labelFontWeight: globalTokens.type_regular,
|
|
1446
|
+
labelFontColor: globalTokens.black,
|
|
1447
|
+
labelFontColorOnDark: globalTokens.white,
|
|
1448
|
+
labelLetterSpacing: "0.00938em",
|
|
1449
|
+
valueFontSize: globalTokens.type_scale_03,
|
|
1450
|
+
valueFontStyle: globalTokens.type_normal,
|
|
1451
|
+
valueFontWeight: globalTokens.type_regular,
|
|
1452
|
+
valueFontColor: globalTokens.black,
|
|
1453
|
+
valueFontColorOnDark: globalTokens.white,
|
|
1454
|
+
valueLetterSpacing: globalTokens.type_spacing_normal,
|
|
1455
|
+
valueLineHeight: "1.1875em",
|
|
1456
|
+
underlineColor: globalTokens.black,
|
|
1457
|
+
underlineColorOnDark: globalTokens.white,
|
|
1458
|
+
underlineFocusColor: globalTokens.black,
|
|
1459
|
+
underlineFocusColorOnDark: globalTokens.white,
|
|
1460
|
+
underlineThickness: "1px"
|
|
1461
|
+
},
|
|
1462
1462
|
wizard: {
|
|
1463
1463
|
disabledBackgroundColor: globalTokens.lightGrey,
|
|
1464
1464
|
disabledFontColor: globalTokens.darkGrey,
|
package/dist/date/Date.js
CHANGED
|
@@ -41,7 +41,7 @@ var _variables = require("../common/variables.js");
|
|
|
41
41
|
|
|
42
42
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _V3DxcDate$propTypes;
|
|
45
45
|
|
|
46
46
|
function _templateObject() {
|
|
47
47
|
var data = (0, _taggedTemplateLiteral2["default"])([""]);
|
|
@@ -53,7 +53,7 @@ function _templateObject() {
|
|
|
53
53
|
return data;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
var
|
|
56
|
+
var V3DxcDate = function V3DxcDate(_ref) {
|
|
57
57
|
var value = _ref.value,
|
|
58
58
|
_ref$format = _ref.format,
|
|
59
59
|
format = _ref$format === void 0 ? "dd-MM-yyyy" : _ref$format,
|
|
@@ -356,7 +356,7 @@ var sizes = {
|
|
|
356
356
|
|
|
357
357
|
var StyledDPicker = _styledComponents["default"].div(_templateObject());
|
|
358
358
|
|
|
359
|
-
|
|
359
|
+
V3DxcDate.propTypes = (_V3DxcDate$propTypes = {
|
|
360
360
|
value: _propTypes["default"].string,
|
|
361
361
|
format: _propTypes["default"].string,
|
|
362
362
|
label: _propTypes["default"].string,
|
|
@@ -369,11 +369,11 @@ DxcDate.propTypes = (_DxcDate$propTypes = {
|
|
|
369
369
|
invalid: _propTypes["default"].bool,
|
|
370
370
|
onChange: _propTypes["default"].func,
|
|
371
371
|
onBlur: _propTypes["default"].func
|
|
372
|
-
}, (0, _defineProperty2["default"])(
|
|
372
|
+
}, (0, _defineProperty2["default"])(_V3DxcDate$propTypes, "onChange", _propTypes["default"].func), (0, _defineProperty2["default"])(_V3DxcDate$propTypes, "size", _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes)))), (0, _defineProperty2["default"])(_V3DxcDate$propTypes, "margin", _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
373
373
|
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
374
374
|
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
375
375
|
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
376
376
|
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
377
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])), (0, _defineProperty2["default"])(
|
|
378
|
-
var _default =
|
|
377
|
+
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])), (0, _defineProperty2["default"])(_V3DxcDate$propTypes, "tabIndex", _propTypes["default"].number), _V3DxcDate$propTypes);
|
|
378
|
+
var _default = V3DxcDate;
|
|
379
379
|
exports["default"] = _default;
|
|
@@ -58,7 +58,7 @@ function _templateObject10() {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function _templateObject9() {
|
|
61
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n"]);
|
|
61
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin-top: 0.25rem;\n"]);
|
|
62
62
|
|
|
63
63
|
_templateObject9 = function _templateObject9() {
|
|
64
64
|
return data;
|
|
@@ -88,7 +88,7 @@ function _templateObject7() {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
function _templateObject6() {
|
|
91
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n\n input[type=\"file\"] {\n visibility: hidden;\n position: absolute;\n width: 0px;\n height: 0px;\n }\n"]);
|
|
91
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin-top: 0.25rem;\n\n input[type=\"file\"] {\n visibility: hidden;\n position: absolute;\n width: 0px;\n height: 0px;\n }\n"]);
|
|
92
92
|
|
|
93
93
|
_templateObject6 = function _templateObject6() {
|
|
94
94
|
return data;
|
package/dist/footer/Footer.js
CHANGED
|
@@ -29,9 +29,21 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
|
29
29
|
|
|
30
30
|
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
33
|
+
|
|
34
|
+
function _templateObject13() {
|
|
33
35
|
var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
|
|
34
36
|
|
|
37
|
+
_templateObject13 = function _templateObject13() {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _templateObject12() {
|
|
45
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px 10px;\n color: ", ";\n"]);
|
|
46
|
+
|
|
35
47
|
_templateObject12 = function _templateObject12() {
|
|
36
48
|
return data;
|
|
37
49
|
};
|
|
@@ -40,7 +52,7 @@ function _templateObject12() {
|
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
function _templateObject11() {
|
|
43
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
55
|
+
var data = (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"]);
|
|
44
56
|
|
|
45
57
|
_templateObject11 = function _templateObject11() {
|
|
46
58
|
return data;
|
|
@@ -50,7 +62,7 @@ function _templateObject11() {
|
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
function _templateObject10() {
|
|
53
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n
|
|
65
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n fill: ", ";\n }\n"]);
|
|
54
66
|
|
|
55
67
|
_templateObject10 = function _templateObject10() {
|
|
56
68
|
return data;
|
|
@@ -60,7 +72,7 @@ function _templateObject10() {
|
|
|
60
72
|
}
|
|
61
73
|
|
|
62
74
|
function _templateObject9() {
|
|
63
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n
|
|
75
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n margin-left: ", ";\n }\n"]);
|
|
64
76
|
|
|
65
77
|
_templateObject9 = function _templateObject9() {
|
|
66
78
|
return data;
|
|
@@ -70,7 +82,7 @@ function _templateObject9() {
|
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
function _templateObject8() {
|
|
73
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
85
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"]);
|
|
74
86
|
|
|
75
87
|
_templateObject8 = function _templateObject8() {
|
|
76
88
|
return data;
|
|
@@ -156,8 +168,6 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
156
168
|
bottomLinks = _ref$bottomLinks === void 0 ? [] : _ref$bottomLinks,
|
|
157
169
|
_ref$copyright = _ref.copyright,
|
|
158
170
|
copyright = _ref$copyright === void 0 ? "" : _ref$copyright,
|
|
159
|
-
_ref$logoSrc = _ref.logoSrc,
|
|
160
|
-
logoSrc = _ref$logoSrc === void 0 ? "default" : _ref$logoSrc,
|
|
161
171
|
children = _ref.children,
|
|
162
172
|
padding = _ref.padding,
|
|
163
173
|
margin = _ref.margin,
|
|
@@ -181,6 +191,20 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
181
191
|
setIsResponsivePhone = _useState6[1];
|
|
182
192
|
|
|
183
193
|
var colorsTheme = (0, _useTheme["default"])();
|
|
194
|
+
var footerLogo = (0, _react.useMemo)(function () {
|
|
195
|
+
if (!colorsTheme.footer.logo) {
|
|
196
|
+
return _Icons["default"];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (typeof colorsTheme.footer.logo === "string") {
|
|
200
|
+
return _react["default"].createElement(LogoImg, {
|
|
201
|
+
alt: "Logo",
|
|
202
|
+
src: colorsTheme.footer.logo
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return colorsTheme.footer.logo;
|
|
207
|
+
}, [colorsTheme.footer.logo]);
|
|
184
208
|
|
|
185
209
|
var handleResize = function handleResize(refWidth) {
|
|
186
210
|
if (ref.current) {
|
|
@@ -236,10 +260,7 @@ var DxcFooter = function DxcFooter(_ref) {
|
|
|
236
260
|
margin: margin,
|
|
237
261
|
refSize: refSize,
|
|
238
262
|
ref: ref
|
|
239
|
-
}, _react["default"].createElement(FooterHeader, null, _react["default"].createElement(
|
|
240
|
-
logoSrc: logoSrc,
|
|
241
|
-
src: logoSrc === "default" ? colorsTheme.footer.logo : logoSrc
|
|
242
|
-
}), _react["default"].createElement("div", null, socialLink)), isResponsivePhone && _react["default"].createElement("div", null, _react["default"].createElement(FooterFooter, {
|
|
263
|
+
}, _react["default"].createElement(FooterHeader, null, _react["default"].createElement(LogoContainer, null, footerLogo), _react["default"].createElement("div", null, socialLink)), isResponsivePhone && _react["default"].createElement("div", null, _react["default"].createElement(FooterFooter, {
|
|
243
264
|
className: "footerFooter",
|
|
244
265
|
refSize: refSize
|
|
245
266
|
}, _react["default"].createElement(BottomLinks, {
|
|
@@ -321,17 +342,23 @@ var Copyright = _styledComponents["default"].div(_templateObject6(), function (p
|
|
|
321
342
|
return props.theme.bottomLinksDividerSpacing;
|
|
322
343
|
});
|
|
323
344
|
|
|
324
|
-
var
|
|
345
|
+
var LogoContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
|
|
346
|
+
return props.theme.logoHeight;
|
|
347
|
+
}, function (props) {
|
|
348
|
+
return props.theme.logoWidth;
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
var LogoImg = _styledComponents["default"].img(_templateObject8(), function (props) {
|
|
325
352
|
return props.theme.logoHeight;
|
|
326
353
|
}, function (props) {
|
|
327
354
|
return props.theme.logoWidth;
|
|
328
355
|
});
|
|
329
356
|
|
|
330
|
-
var SocialAnchor = _styledComponents["default"].a(
|
|
357
|
+
var SocialAnchor = _styledComponents["default"].a(_templateObject9(), function (props) {
|
|
331
358
|
return props.index === 0 ? "0px" : props.theme.socialLinksGutter;
|
|
332
359
|
});
|
|
333
360
|
|
|
334
|
-
var SocialIcon = _styledComponents["default"].img(
|
|
361
|
+
var SocialIcon = _styledComponents["default"].img(_templateObject10(), function (props) {
|
|
335
362
|
return props.theme.socialLinksSize;
|
|
336
363
|
}, function (props) {
|
|
337
364
|
return props.theme.socialLinksSize;
|
|
@@ -339,7 +366,7 @@ var SocialIcon = _styledComponents["default"].img(_templateObject9(), function (
|
|
|
339
366
|
return props.theme.socialLinksColor;
|
|
340
367
|
});
|
|
341
368
|
|
|
342
|
-
var SocialIconContainer = _styledComponents["default"].div(
|
|
369
|
+
var SocialIconContainer = _styledComponents["default"].div(_templateObject11(), function (props) {
|
|
343
370
|
return props.theme.socialLinksSize;
|
|
344
371
|
}, function (props) {
|
|
345
372
|
return props.theme.socialLinksSize;
|
|
@@ -347,11 +374,11 @@ var SocialIconContainer = _styledComponents["default"].div(_templateObject10(),
|
|
|
347
374
|
return props.theme.socialLinksColor;
|
|
348
375
|
});
|
|
349
376
|
|
|
350
|
-
var Point = _styledComponents["default"].span(
|
|
377
|
+
var Point = _styledComponents["default"].span(_templateObject12(), function (props) {
|
|
351
378
|
return props.theme.bottomLinksFontColor;
|
|
352
379
|
});
|
|
353
380
|
|
|
354
|
-
var BottomLink = _styledComponents["default"].a(
|
|
381
|
+
var BottomLink = _styledComponents["default"].a(_templateObject13(), function (props) {
|
|
355
382
|
return props.theme.bottomLinksTextDecoration;
|
|
356
383
|
}, function (props) {
|
|
357
384
|
return props.theme.bottomLinksFontColor;
|
|
@@ -366,7 +393,6 @@ var BottomLink = _styledComponents["default"].a(_templateObject12(), function (p
|
|
|
366
393
|
});
|
|
367
394
|
|
|
368
395
|
DxcFooter.propTypes = {
|
|
369
|
-
logoSrc: _propTypes["default"].string,
|
|
370
396
|
socialLinks: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
371
397
|
logo: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
372
398
|
logoSrc: _propTypes["default"].string.isRequired,
|