@dxc-technology/halstack-react 0.0.0-ba36a4a → 0.0.0-beebecd
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 +69 -61
- package/dist/alert/Alert.js +5 -5
- package/dist/alert/index.d.ts +51 -0
- package/dist/common/variables.js +298 -90
- package/dist/date/Date.js +4 -6
- package/dist/{new-date/NewDate.js → date-input/DateInput.js} +69 -72
- package/dist/date-input/index.d.ts +95 -0
- 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/input-text/InputText.js +3 -3
- package/dist/layout/ApplicationLayout.js +1 -1
- package/dist/link/Link.js +4 -8
- package/dist/main.d.ts +8 -0
- package/dist/main.js +29 -13
- package/dist/new-select/NewSelect.js +836 -0
- package/dist/new-select/index.d.ts +53 -0
- package/dist/new-textarea/NewTextarea.js +62 -39
- package/dist/new-textarea/index.d.ts +117 -0
- package/dist/{number/Number.js → number-input/NumberInput.js} +9 -11
- package/dist/{number/NumberContext.js → number-input/NumberInputContext.js} +2 -2
- package/dist/number-input/index.d.ts +113 -0
- package/dist/{password/Password.js → password-input/PasswordInput.js} +11 -13
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +1 -1
- package/dist/select/Select.js +122 -158
- package/dist/sidenav/Sidenav.js +6 -4
- package/dist/slider/Slider.js +89 -14
- package/dist/tag/Tag.js +26 -32
- package/dist/{new-input-text/NewInputText.js → text-input/TextInput.js} +180 -170
- package/dist/text-input/index.d.ts +135 -0
- package/dist/toggle-group/ToggleGroup.js +132 -28
- package/package.json +2 -1
- package/test/{NewDate.test.js → DateInput.test.js} +66 -27
- package/test/FileInput.test.js +201 -0
- package/test/InputText.test.js +24 -16
- package/test/NewTextarea.test.js +95 -101
- package/test/{Number.test.js → NumberInput.test.js} +84 -66
- 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 +40 -17
- package/test/{NewInputText.test.js → TextInput.test.js} +146 -231
- package/test/ToggleGroup.test.js +5 -1
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/password/styles.css +0 -3
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/slider/Slider.stories.js +0 -241
- package/test/Password.test.js +0 -76
|
@@ -0,0 +1,280 @@
|
|
|
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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
+
|
|
20
|
+
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
21
|
+
|
|
22
|
+
function _templateObject10() {
|
|
23
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
24
|
+
|
|
25
|
+
_templateObject10 = function _templateObject10() {
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _templateObject9() {
|
|
33
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 4px;\n margin-left: 4px;\n background-color: transparent;\n padding: 3px;\n cursor: pointer;\n svg {\n line-height: 18px;\n }\n"]);
|
|
34
|
+
|
|
35
|
+
_templateObject9 = function _templateObject9() {
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function _templateObject8() {
|
|
43
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n color: #d0011b;\n"]);
|
|
44
|
+
|
|
45
|
+
_templateObject8 = function _templateObject8() {
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _templateObject7() {
|
|
53
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n width: ", ";\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
54
|
+
|
|
55
|
+
_templateObject7 = function _templateObject7() {
|
|
56
|
+
return data;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function _templateObject6() {
|
|
63
|
+
var data = (0, _taggedTemplateLiteral2["default"])([""]);
|
|
64
|
+
|
|
65
|
+
_templateObject6 = function _templateObject6() {
|
|
66
|
+
return data;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return data;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function _templateObject5() {
|
|
73
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 12px;\n background-color: ", ";\n width: 48px;\n height: 48px;\n border-radius: 2px;\n color: ", ";\n"]);
|
|
74
|
+
|
|
75
|
+
_templateObject5 = function _templateObject5() {
|
|
76
|
+
return data;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return data;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function _templateObject4() {
|
|
83
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 48px;\n height: 48px;\n object-fit: contain;\n margin-right: 12px;\n border-radius: 2px;\n"]);
|
|
84
|
+
|
|
85
|
+
_templateObject4 = function _templateObject4() {
|
|
86
|
+
return data;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function _templateObject3() {
|
|
93
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n align-items: center;\n"]);
|
|
94
|
+
|
|
95
|
+
_templateObject3 = function _templateObject3() {
|
|
96
|
+
return data;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
return data;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function _templateObject2() {
|
|
103
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n"]);
|
|
104
|
+
|
|
105
|
+
_templateObject2 = function _templateObject2() {
|
|
106
|
+
return data;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return data;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function _templateObject() {
|
|
113
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n padding: ", ";\n background-color: ", ";\n border-radius: ", ";\n width: ", ";\n min-height: ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n display: flex;\n justify-content: center;\n"]);
|
|
114
|
+
|
|
115
|
+
_templateObject = function _templateObject() {
|
|
116
|
+
return data;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
return data;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
var deleteIcon = _react["default"].createElement("svg", {
|
|
123
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
124
|
+
width: "24",
|
|
125
|
+
height: "24",
|
|
126
|
+
viewBox: "0 0 24 24",
|
|
127
|
+
fill: "currentColor"
|
|
128
|
+
}, _react["default"].createElement("path", {
|
|
129
|
+
d: "M0 0h24v24H0V0z",
|
|
130
|
+
fill: "none"
|
|
131
|
+
}), _react["default"].createElement("path", {
|
|
132
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
133
|
+
}));
|
|
134
|
+
|
|
135
|
+
var errorIcon = _react["default"].createElement("svg", {
|
|
136
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
137
|
+
height: "24px",
|
|
138
|
+
viewBox: "0 0 24 24",
|
|
139
|
+
width: "24px",
|
|
140
|
+
fill: "currentColor"
|
|
141
|
+
}, _react["default"].createElement("path", {
|
|
142
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
|
|
143
|
+
}));
|
|
144
|
+
|
|
145
|
+
var FileItem = function FileItem(_ref) {
|
|
146
|
+
var mode = _ref.mode,
|
|
147
|
+
multiple = _ref.multiple,
|
|
148
|
+
_ref$name = _ref.name,
|
|
149
|
+
name = _ref$name === void 0 ? "" : _ref$name,
|
|
150
|
+
_ref$error = _ref.error,
|
|
151
|
+
error = _ref$error === void 0 ? "" : _ref$error,
|
|
152
|
+
showPreview = _ref.showPreview,
|
|
153
|
+
preview = _ref.preview,
|
|
154
|
+
type = _ref.type,
|
|
155
|
+
numFiles = _ref.numFiles,
|
|
156
|
+
onDelete = _ref.onDelete;
|
|
157
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
158
|
+
var isImage = type.includes("image");
|
|
159
|
+
|
|
160
|
+
var getIconAriaLabel = function getIconAriaLabel() {
|
|
161
|
+
if (type.includes("video")) {
|
|
162
|
+
return "video";
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (type.includes("audio")) {
|
|
166
|
+
return "audio";
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return "file";
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
173
|
+
theme: colorsTheme.fileInput
|
|
174
|
+
}, _react["default"].createElement(Container, {
|
|
175
|
+
mode: mode,
|
|
176
|
+
multiple: multiple,
|
|
177
|
+
error: error,
|
|
178
|
+
showPreview: showPreview,
|
|
179
|
+
numFiles: numFiles
|
|
180
|
+
}, showPreview && (isImage ? _react["default"].createElement(ImagePreview, {
|
|
181
|
+
src: preview,
|
|
182
|
+
alt: name
|
|
183
|
+
}) : _react["default"].createElement(IconPreviewContainer, {
|
|
184
|
+
error: error,
|
|
185
|
+
"aria-label": getIconAriaLabel()
|
|
186
|
+
}, _react["default"].createElement(IconPreview, {
|
|
187
|
+
error: error
|
|
188
|
+
}, preview))), _react["default"].createElement(FileItemContent, null, _react["default"].createElement(FileItemContainer, null, _react["default"].createElement(FileName, {
|
|
189
|
+
mode: mode,
|
|
190
|
+
multiple: multiple,
|
|
191
|
+
error: error,
|
|
192
|
+
showPreview: showPreview,
|
|
193
|
+
numFiles: numFiles
|
|
194
|
+
}, name), error && _react["default"].createElement(ErrorIcon, {
|
|
195
|
+
"aria-label": "Error"
|
|
196
|
+
}, errorIcon), _react["default"].createElement(DeleteIcon, {
|
|
197
|
+
onClick: function onClick() {
|
|
198
|
+
return onDelete(name);
|
|
199
|
+
},
|
|
200
|
+
"aria-label": "Remove ".concat(name)
|
|
201
|
+
}, deleteIcon)), error && (multiple || numFiles > 1) && _react["default"].createElement(ErrorMessage, null, error))));
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
var Container = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
205
|
+
return props.showPreview ? "8px" : "8px 8px 8px 16px";
|
|
206
|
+
}, function (props) {
|
|
207
|
+
return props.error && props.theme.errorFileItemBackgroundColor;
|
|
208
|
+
}, function (props) {
|
|
209
|
+
return props.theme.fileItemBorderRadius;
|
|
210
|
+
}, function (props) {
|
|
211
|
+
return props.mode === "file" && !props.multiple && props.numFiles === 1 ? "calc(230px - 26px)" : !props.showPreview ? "calc(320px - 26px)" : props.showPreview && "calc(320px - 18px)";
|
|
212
|
+
}, function (props) {
|
|
213
|
+
return props.mode === "file" && !props.multiple && props.numFiles === 1 || !props.showPreview && !props.error ? "calc(40px - 18px)" : !props.showPreview && props.error ? "calc(59px - 18px)" : "calc(64px - 18px)";
|
|
214
|
+
}, function (props) {
|
|
215
|
+
return props.error ? props.theme.errorFileItemBorderColor : props.theme.fileItemBorderColor;
|
|
216
|
+
}, function (props) {
|
|
217
|
+
return props.theme.fileItemBorderThickness;
|
|
218
|
+
}, function (props) {
|
|
219
|
+
return props.theme.fileItemBorderStyle;
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
var FileItemContent = _styledComponents["default"].div(_templateObject2());
|
|
223
|
+
|
|
224
|
+
var FileItemContainer = _styledComponents["default"].div(_templateObject3());
|
|
225
|
+
|
|
226
|
+
var ImagePreview = _styledComponents["default"].img(_templateObject4());
|
|
227
|
+
|
|
228
|
+
var IconPreviewContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
229
|
+
return props.error ? props.theme.errorFileItemIconBackgroundColor : props.theme.fileItemIconBackgroundColor;
|
|
230
|
+
}, function (props) {
|
|
231
|
+
return props.error ? props.theme.errorFileItemIconColor : props.theme.fileItemIconColor;
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
var IconPreview = _styledComponents["default"].div(_templateObject6());
|
|
235
|
+
|
|
236
|
+
var FileName = _styledComponents["default"].span(_templateObject7(), function (props) {
|
|
237
|
+
return props.theme.fileNameFontColor;
|
|
238
|
+
}, function (props) {
|
|
239
|
+
return props.mode === "file" && !props.multiple && props.error && props.numFiles === 1 ? "calc(230px - 76px)" : props.mode === "file" && !props.multiple && !props.error && props.numFiles === 1 ? "calc(230px - 50px)" : !props.showPreview && !props.error ? "calc(320px - 52px)" : !props.showPreview && props.error ? "calc(320px - 76px)" : props.showPreview && props.error ? "calc(320px - 128px)" : props.showPreview && !props.error && "calc(320px - 102px)";
|
|
240
|
+
}, function (props) {
|
|
241
|
+
return props.theme.fileItemFontFamily;
|
|
242
|
+
}, function (props) {
|
|
243
|
+
return props.theme.fileItemFontSize;
|
|
244
|
+
}, function (props) {
|
|
245
|
+
return props.theme.fileItemFontWeight;
|
|
246
|
+
}, function (props) {
|
|
247
|
+
return props.theme.fileItemLineHeight;
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
var ErrorIcon = _styledComponents["default"].span(_templateObject8());
|
|
251
|
+
|
|
252
|
+
var DeleteIcon = _styledComponents["default"].button(_templateObject9(), function (props) {
|
|
253
|
+
return props.theme.fontFamily;
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
var ErrorMessage = _styledComponents["default"].span(_templateObject10(), function (props) {
|
|
257
|
+
return props.theme.errorMessageFontColor;
|
|
258
|
+
}, function (props) {
|
|
259
|
+
return props.theme.errorMessageFontFamily;
|
|
260
|
+
}, function (props) {
|
|
261
|
+
return props.theme.errorMessageFontSize;
|
|
262
|
+
}, function (props) {
|
|
263
|
+
return props.theme.errorMessageFontWeight;
|
|
264
|
+
}, function (props) {
|
|
265
|
+
return props.theme.errorMessageLineHeight;
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
FileItem.propTypes = {
|
|
269
|
+
mode: _propTypes["default"].string,
|
|
270
|
+
multiple: _propTypes["default"].bool,
|
|
271
|
+
name: _propTypes["default"].string,
|
|
272
|
+
type: _propTypes["default"].string,
|
|
273
|
+
showPreview: _propTypes["default"]["boolean"],
|
|
274
|
+
numFiles: _propTypes["default"].number,
|
|
275
|
+
preview: _propTypes["default"].string,
|
|
276
|
+
error: _propTypes["default"].string,
|
|
277
|
+
onDelete: _propTypes["default"].func
|
|
278
|
+
};
|
|
279
|
+
var _default = FileItem;
|
|
280
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
type Size = "small" | "medium" | "large" | "fillParent";
|
|
2
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
type FileData = {
|
|
10
|
+
error?: string;
|
|
11
|
+
file?: File;
|
|
12
|
+
preview?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
/**
|
|
17
|
+
* Name attribute of the file input element.
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Text to be placed above the file input.
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Uses one of the available file input modes:
|
|
26
|
+
* 'file': Files are selected by clicking the button and selecting it through the file explorer.
|
|
27
|
+
* 'filedrop': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
|
|
28
|
+
* 'dropzone': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
|
|
29
|
+
* The drag and drop area of this mode is bigger than the one of the filedrop mode.
|
|
30
|
+
*/
|
|
31
|
+
mode?: "file" | "filedrop" | "dropzone";
|
|
32
|
+
/**
|
|
33
|
+
* Helper text to be placed above the file input.
|
|
34
|
+
*/
|
|
35
|
+
helperText?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Defines the file types accepted by the component. It is not possible to select a file with a non valid type.
|
|
38
|
+
*/
|
|
39
|
+
accept?: string;
|
|
40
|
+
/**
|
|
41
|
+
* An array of FileData representing the selected files.
|
|
42
|
+
*/
|
|
43
|
+
value?: FileData[];
|
|
44
|
+
/**
|
|
45
|
+
* Minimum file size allowed (in bytes). If the file size does not comply the minSize, an error will be passed to the FileData.
|
|
46
|
+
*/
|
|
47
|
+
minSize?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Maximum file size allowed (in bytes). If the file size does not comply the maxSize, an error will be passed to the FileData.
|
|
50
|
+
*/
|
|
51
|
+
maxSize?: number;
|
|
52
|
+
/**
|
|
53
|
+
* If true and if the file is an image, a preview of it will be shown. If it is not an image, an icon refering to the file's type will be shown.
|
|
54
|
+
* If mode is not multiple and there is one file already selected, the file will be replaced by the last selected one.
|
|
55
|
+
*/
|
|
56
|
+
showPreview?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* If true, more than one file can be selected. If false, only one file can be selected.
|
|
59
|
+
*/
|
|
60
|
+
multiple?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* If true, the component will be disabled.
|
|
63
|
+
*/
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* This function will be called when the user selects or drops a file. The list of files will be sent as a parameter.
|
|
67
|
+
* In this function, the files can be updated or returned as they come. These files must be passed to the value in order to be shown.
|
|
68
|
+
*/
|
|
69
|
+
callbackFile?: (files: FileData[]) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
72
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
73
|
+
*/
|
|
74
|
+
margin?: Space | Margin;
|
|
75
|
+
/**
|
|
76
|
+
* Value of the tabindex attribute.
|
|
77
|
+
*/
|
|
78
|
+
tabIndex?: number;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default function DxcTextInput(props: Props): JSX.Element;
|
|
@@ -166,7 +166,7 @@ var makeCancelable = function makeCancelable(promise) {
|
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
var
|
|
169
|
+
var V3DxcInputText = function V3DxcInputText(_ref) {
|
|
170
170
|
var _ref$label = _ref.label,
|
|
171
171
|
label = _ref$label === void 0 ? " " : _ref$label,
|
|
172
172
|
_ref$name = _ref.name,
|
|
@@ -672,7 +672,7 @@ var TextContainer = _styledComponents["default"].div(_templateObject10(), functi
|
|
|
672
672
|
return props.backgroundType === "dark" ? props.theme.disabledColorOnDark : props.theme.disabledColor;
|
|
673
673
|
});
|
|
674
674
|
|
|
675
|
-
|
|
675
|
+
V3DxcInputText.propTypes = {
|
|
676
676
|
label: _propTypes["default"].string,
|
|
677
677
|
name: _propTypes["default"].string,
|
|
678
678
|
value: _propTypes["default"].string,
|
|
@@ -703,5 +703,5 @@ DxcInputText.propTypes = {
|
|
|
703
703
|
autocompleteOptions: _propTypes["default"].any,
|
|
704
704
|
tabIndex: _propTypes["default"].number
|
|
705
705
|
};
|
|
706
|
-
var _default =
|
|
706
|
+
var _default = V3DxcInputText;
|
|
707
707
|
exports["default"] = _default;
|
|
@@ -124,7 +124,7 @@ function _templateObject2() {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
function _templateObject() {
|
|
127
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right:0;\n"]);
|
|
127
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n"]);
|
|
128
128
|
|
|
129
129
|
_templateObject = function _templateObject() {
|
|
130
130
|
return data;
|
package/dist/link/Link.js
CHANGED
|
@@ -26,7 +26,7 @@ var _variables = require("../common/variables.js");
|
|
|
26
26
|
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
27
27
|
|
|
28
28
|
function _templateObject6() {
|
|
29
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", "
|
|
29
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", ";\n overflow: hidden;\n \n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
30
30
|
|
|
31
31
|
_templateObject6 = function _templateObject6() {
|
|
32
32
|
return data;
|
|
@@ -36,7 +36,7 @@ function _templateObject6() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function _templateObject5() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", "
|
|
39
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", ";\n"]);
|
|
40
40
|
|
|
41
41
|
_templateObject5 = function _templateObject5() {
|
|
42
42
|
return data;
|
|
@@ -204,9 +204,7 @@ var LinkIcon = _styledComponents["default"].img(_templateObject5(), function (pr
|
|
|
204
204
|
}, function (props) {
|
|
205
205
|
return props.theme.iconSize;
|
|
206
206
|
}, function (props) {
|
|
207
|
-
return props.iconPosition === "before" ? "margin-right" : "margin-left";
|
|
208
|
-
}, function (props) {
|
|
209
|
-
return props.theme.iconSpacing;
|
|
207
|
+
return "".concat(props.iconPosition === "before" ? "margin-right" : "margin-left", ": ").concat(props.theme.iconSpacing);
|
|
210
208
|
});
|
|
211
209
|
|
|
212
210
|
var LinkIconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
@@ -214,9 +212,7 @@ var LinkIconContainer = _styledComponents["default"].div(_templateObject6(), fun
|
|
|
214
212
|
}, function (props) {
|
|
215
213
|
return props.theme.iconSize;
|
|
216
214
|
}, function (props) {
|
|
217
|
-
return props.iconPosition === "before" ? "margin-right" : "margin-left";
|
|
218
|
-
}, function (props) {
|
|
219
|
-
return props.theme.iconSpacing;
|
|
215
|
+
return "".concat(props.iconPosition === "before" ? "margin-right" : "margin-left", ": ").concat(props.theme.iconSpacing);
|
|
220
216
|
});
|
|
221
217
|
|
|
222
218
|
DxcLink.propTypes = {
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as DxcAlert } from "./alert/index";
|
|
2
|
+
export { default as DxcNewSelect } from "./new-select/index";
|
|
3
|
+
export { default as DxcTextInput } from "./text-input/index";
|
|
4
|
+
export { default as DxcDateInput } from "./date-input/index";
|
|
5
|
+
export { default as DxcNewTextarea } from "./new-textarea/index";
|
|
6
|
+
export { default as DxcNumberInput } from "./number-input/index";
|
|
7
|
+
export { default as DxcPasswordInput } from "./password-input/index";
|
|
8
|
+
export { default as DxcFileInput } from "./file-input/index";
|
package/dist/main.js
CHANGED
|
@@ -67,7 +67,7 @@ Object.defineProperty(exports, "DxcHeader", {
|
|
|
67
67
|
return _Header["default"];
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
Object.defineProperty(exports, "
|
|
70
|
+
Object.defineProperty(exports, "V3DxcInputText", {
|
|
71
71
|
enumerable: true,
|
|
72
72
|
get: function get() {
|
|
73
73
|
return _InputText["default"];
|
|
@@ -217,28 +217,28 @@ Object.defineProperty(exports, "DxcBadge", {
|
|
|
217
217
|
return _Badge["default"];
|
|
218
218
|
}
|
|
219
219
|
});
|
|
220
|
-
Object.defineProperty(exports, "
|
|
220
|
+
Object.defineProperty(exports, "DxcTextInput", {
|
|
221
221
|
enumerable: true,
|
|
222
222
|
get: function get() {
|
|
223
|
-
return
|
|
223
|
+
return _TextInput["default"];
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
|
-
Object.defineProperty(exports, "
|
|
226
|
+
Object.defineProperty(exports, "DxcPasswordInput", {
|
|
227
227
|
enumerable: true,
|
|
228
228
|
get: function get() {
|
|
229
|
-
return
|
|
229
|
+
return _PasswordInput["default"];
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
|
-
Object.defineProperty(exports, "
|
|
232
|
+
Object.defineProperty(exports, "DxcDateInput", {
|
|
233
233
|
enumerable: true,
|
|
234
234
|
get: function get() {
|
|
235
|
-
return
|
|
235
|
+
return _DateInput["default"];
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
|
-
Object.defineProperty(exports, "
|
|
238
|
+
Object.defineProperty(exports, "DxcNumberInput", {
|
|
239
239
|
enumerable: true,
|
|
240
240
|
get: function get() {
|
|
241
|
-
return
|
|
241
|
+
return _NumberInput["default"];
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
Object.defineProperty(exports, "DxcNewTextarea", {
|
|
@@ -247,6 +247,18 @@ Object.defineProperty(exports, "DxcNewTextarea", {
|
|
|
247
247
|
return _NewTextarea["default"];
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
|
+
Object.defineProperty(exports, "DxcNewSelect", {
|
|
251
|
+
enumerable: true,
|
|
252
|
+
get: function get() {
|
|
253
|
+
return _NewSelect["default"];
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
Object.defineProperty(exports, "DxcFileInput", {
|
|
257
|
+
enumerable: true,
|
|
258
|
+
get: function get() {
|
|
259
|
+
return _FileInput["default"];
|
|
260
|
+
}
|
|
261
|
+
});
|
|
250
262
|
Object.defineProperty(exports, "ThemeContext", {
|
|
251
263
|
enumerable: true,
|
|
252
264
|
get: function get() {
|
|
@@ -336,16 +348,20 @@ var _AccordionGroup = _interopRequireDefault(require("./accordion-group/Accordio
|
|
|
336
348
|
|
|
337
349
|
var _Badge = _interopRequireDefault(require("./badge/Badge"));
|
|
338
350
|
|
|
339
|
-
var
|
|
351
|
+
var _TextInput = _interopRequireDefault(require("./text-input/TextInput"));
|
|
340
352
|
|
|
341
|
-
var
|
|
353
|
+
var _PasswordInput = _interopRequireDefault(require("./password-input/PasswordInput"));
|
|
342
354
|
|
|
343
|
-
var
|
|
355
|
+
var _DateInput = _interopRequireDefault(require("./date-input/DateInput"));
|
|
344
356
|
|
|
345
|
-
var
|
|
357
|
+
var _NumberInput = _interopRequireDefault(require("./number-input/NumberInput"));
|
|
346
358
|
|
|
347
359
|
var _NewTextarea = _interopRequireDefault(require("./new-textarea/NewTextarea"));
|
|
348
360
|
|
|
361
|
+
var _NewSelect = _interopRequireDefault(require("./new-select/NewSelect"));
|
|
362
|
+
|
|
363
|
+
var _FileInput = _interopRequireDefault(require("./file-input/FileInput"));
|
|
364
|
+
|
|
349
365
|
var _ThemeContext = _interopRequireWildcard(require("./ThemeContext.js"));
|
|
350
366
|
|
|
351
367
|
var _BackgroundColorContext = require("./BackgroundColorContext.js");
|