@dxc-technology/halstack-react 0.0.0-e628009 → 0.0.0-e690193
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/README.md +27 -47
- package/dist/index.d.mts +3923 -0
- package/dist/index.d.ts +3923 -0
- package/dist/index.js +14133 -0
- package/dist/index.mjs +14045 -0
- package/package.json +92 -68
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -248
- package/dist/V3Textarea/V3Textarea.js +0 -264
- package/dist/accordion/Accordion.js +0 -353
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/alert/Alert.js +0 -403
- package/dist/alert/index.d.ts +0 -51
- package/dist/badge/Badge.js +0 -63
- package/dist/box/Box.js +0 -156
- package/dist/button/Button.js +0 -238
- package/dist/card/Card.js +0 -254
- package/dist/checkbox/Checkbox.js +0 -300
- package/dist/chip/Chip.js +0 -265
- package/dist/common/OpenSans.css +0 -81
- package/dist/common/RequiredComponent.js +0 -40
- package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Light.ttf +0 -0
- package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/dist/common/utils.js +0 -22
- package/dist/common/variables.js +0 -1569
- package/dist/date/Date.js +0 -379
- package/dist/date-input/DateInput.js +0 -400
- package/dist/date-input/index.d.ts +0 -95
- package/dist/dialog/Dialog.js +0 -218
- package/dist/dropdown/Dropdown.js +0 -544
- package/dist/file-input/FileInput.js +0 -644
- package/dist/file-input/FileItem.js +0 -280
- package/dist/file-input/index.d.ts +0 -81
- package/dist/footer/Footer.js +0 -421
- package/dist/footer/Icons.js +0 -77
- package/dist/header/Header.js +0 -434
- package/dist/header/Icons.js +0 -59
- package/dist/heading/Heading.js +0 -230
- package/dist/input-text/Icons.js +0 -22
- package/dist/input-text/InputText.js +0 -705
- package/dist/layout/ApplicationLayout.js +0 -327
- package/dist/layout/Icons.js +0 -55
- package/dist/link/Link.js +0 -237
- package/dist/main.d.ts +0 -8
- package/dist/main.js +0 -367
- package/dist/new-select/NewSelect.js +0 -836
- package/dist/new-select/index.d.ts +0 -53
- package/dist/number-input/NumberInput.js +0 -136
- package/dist/number-input/NumberInputContext.js +0 -16
- package/dist/number-input/index.d.ts +0 -113
- package/dist/paginator/Icons.js +0 -66
- package/dist/paginator/Paginator.js +0 -283
- package/dist/password-input/PasswordInput.js +0 -198
- package/dist/password-input/index.d.ts +0 -94
- package/dist/progress-bar/ProgressBar.js +0 -242
- package/dist/radio/Radio.js +0 -209
- package/dist/resultsetTable/ResultsetTable.js +0 -358
- package/dist/select/Select.js +0 -549
- package/dist/sidenav/Sidenav.js +0 -179
- package/dist/slider/Slider.js +0 -404
- package/dist/spinner/Spinner.js +0 -381
- package/dist/switch/Switch.js +0 -222
- package/dist/table/Table.js +0 -132
- package/dist/tabs/Tabs.js +0 -343
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tag/Tag.js +0 -282
- package/dist/text-input/TextInput.js +0 -971
- package/dist/text-input/index.d.ts +0 -135
- package/dist/textarea/Textarea.js +0 -369
- package/dist/textarea/index.d.ts +0 -117
- package/dist/toggle/Toggle.js +0 -220
- package/dist/toggle-group/ToggleGroup.js +0 -327
- package/dist/upload/Upload.js +0 -205
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/dist/upload/buttons-upload/Icons.js +0 -40
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/dist/upload/dragAndDropArea/Icons.js +0 -39
- package/dist/upload/file-upload/FileToUpload.js +0 -189
- package/dist/upload/file-upload/Icons.js +0 -66
- package/dist/upload/files-upload/FilesToUpload.js +0 -123
- package/dist/upload/transaction/Icons.js +0 -160
- package/dist/upload/transaction/Transaction.js +0 -148
- package/dist/upload/transactions/Transactions.js +0 -138
- package/dist/useTheme.js +0 -22
- package/dist/wizard/Icons.js +0 -65
- package/dist/wizard/Wizard.js +0 -405
- package/test/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -397
- package/test/DateInput.test.js +0 -242
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -145
- package/test/FileInput.test.js +0 -201
- package/test/Footer.test.js +0 -94
- package/test/Header.test.js +0 -34
- package/test/Heading.test.js +0 -83
- package/test/InputText.test.js +0 -248
- package/test/Link.test.js +0 -43
- package/test/NumberInput.test.js +0 -259
- package/test/Paginator.test.js +0 -177
- package/test/PasswordInput.test.js +0 -83
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -329
- package/test/Select.test.js +0 -212
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -74
- package/test/Spinner.test.js +0 -32
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -109
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextInput.test.js +0 -732
- package/test/Textarea.test.js +0 -193
- package/test/ToggleGroup.test.js +0 -85
- package/test/Upload.test.js +0 -60
- package/test/V3TextArea.test.js +0 -51
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
package/dist/heading/Heading.js
DELETED
|
@@ -1,230 +0,0 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
|
-
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
|
-
var _variables = require("../common/variables.js");
|
|
25
|
-
|
|
26
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
27
|
-
|
|
28
|
-
function _templateObject6() {
|
|
29
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
30
|
-
|
|
31
|
-
_templateObject6 = function _templateObject6() {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _templateObject5() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject5 = function _templateObject5() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject4() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject4 = function _templateObject4() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject3() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
60
|
-
|
|
61
|
-
_templateObject3 = function _templateObject3() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _templateObject2() {
|
|
69
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
70
|
-
|
|
71
|
-
_templateObject2 = function _templateObject2() {
|
|
72
|
-
return data;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _templateObject() {
|
|
79
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
80
|
-
|
|
81
|
-
_templateObject = function _templateObject() {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
var DxcHeading = function DxcHeading(_ref) {
|
|
89
|
-
var _ref$level = _ref.level,
|
|
90
|
-
level = _ref$level === void 0 ? 1 : _ref$level,
|
|
91
|
-
_ref$text = _ref.text,
|
|
92
|
-
text = _ref$text === void 0 ? "" : _ref$text,
|
|
93
|
-
as = _ref.as,
|
|
94
|
-
_ref$weight = _ref.weight,
|
|
95
|
-
weight = _ref$weight === void 0 ? "" : _ref$weight,
|
|
96
|
-
margin = _ref.margin;
|
|
97
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
98
|
-
|
|
99
|
-
var checkValidAs = function checkValidAs() {
|
|
100
|
-
if (as === "h1" || as === "h2" || as === "h3" || as === "h4" || as === "h5") return as;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
104
|
-
theme: colorsTheme.heading
|
|
105
|
-
}, _react["default"].createElement(HeadingContainer, {
|
|
106
|
-
margin: margin
|
|
107
|
-
}, level === 1 ? _react["default"].createElement(HeadingLevel1, {
|
|
108
|
-
as: checkValidAs(as),
|
|
109
|
-
weight: weight
|
|
110
|
-
}, text) : level === 2 ? _react["default"].createElement(HeadingLevel2, {
|
|
111
|
-
as: checkValidAs(as),
|
|
112
|
-
weight: weight
|
|
113
|
-
}, text) : level === 3 ? _react["default"].createElement(HeadingLevel3, {
|
|
114
|
-
as: checkValidAs(as),
|
|
115
|
-
weight: weight
|
|
116
|
-
}, text) : level === 4 ? _react["default"].createElement(HeadingLevel4, {
|
|
117
|
-
as: checkValidAs(as),
|
|
118
|
-
weight: weight
|
|
119
|
-
}, text) : _react["default"].createElement(HeadingLevel5, {
|
|
120
|
-
as: checkValidAs(as),
|
|
121
|
-
weight: weight
|
|
122
|
-
}, text)));
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
var HeadingContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
126
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
127
|
-
}, function (props) {
|
|
128
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
129
|
-
}, function (props) {
|
|
130
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
131
|
-
}, function (props) {
|
|
132
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
133
|
-
}, function (props) {
|
|
134
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
var HeadingLevel1 = _styledComponents["default"].h1(_templateObject2(), function (props) {
|
|
138
|
-
return props.theme.level1FontFamily;
|
|
139
|
-
}, function (props) {
|
|
140
|
-
return props.theme.level1FontStyle;
|
|
141
|
-
}, function (props) {
|
|
142
|
-
return props.theme.level1FontSize;
|
|
143
|
-
}, function (props) {
|
|
144
|
-
return props.theme.level1LineHeight;
|
|
145
|
-
}, function (props) {
|
|
146
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level1FontWeight;
|
|
147
|
-
}, function (props) {
|
|
148
|
-
return props.theme.level1LetterSpacing;
|
|
149
|
-
}, function (props) {
|
|
150
|
-
return props.theme.level1FontColor;
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
var HeadingLevel2 = _styledComponents["default"].h2(_templateObject3(), function (props) {
|
|
154
|
-
return props.theme.level2FontFamily;
|
|
155
|
-
}, function (props) {
|
|
156
|
-
return props.theme.level2FontStyle;
|
|
157
|
-
}, function (props) {
|
|
158
|
-
return props.theme.level2FontSize;
|
|
159
|
-
}, function (props) {
|
|
160
|
-
return props.theme.level2LineHeight;
|
|
161
|
-
}, function (props) {
|
|
162
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level2FontWeight;
|
|
163
|
-
}, function (props) {
|
|
164
|
-
return props.theme.level2LetterSpacing;
|
|
165
|
-
}, function (props) {
|
|
166
|
-
return props.theme.level2FontColor;
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
var HeadingLevel3 = _styledComponents["default"].h3(_templateObject4(), function (props) {
|
|
170
|
-
return props.theme.level3FontFamily;
|
|
171
|
-
}, function (props) {
|
|
172
|
-
return props.theme.level3FontStyle;
|
|
173
|
-
}, function (props) {
|
|
174
|
-
return props.theme.level3FontSize;
|
|
175
|
-
}, function (props) {
|
|
176
|
-
return props.theme.level3LineHeight;
|
|
177
|
-
}, function (props) {
|
|
178
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level3FontWeight;
|
|
179
|
-
}, function (props) {
|
|
180
|
-
return props.theme.level3LetterSpacing;
|
|
181
|
-
}, function (props) {
|
|
182
|
-
return props.theme.level3FontColor;
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
var HeadingLevel4 = _styledComponents["default"].h4(_templateObject5(), function (props) {
|
|
186
|
-
return props.theme.level4FontFamily;
|
|
187
|
-
}, function (props) {
|
|
188
|
-
return props.theme.level4FontStyle;
|
|
189
|
-
}, function (props) {
|
|
190
|
-
return props.theme.level4FontSize;
|
|
191
|
-
}, function (props) {
|
|
192
|
-
return props.theme.level4LineHeight;
|
|
193
|
-
}, function (props) {
|
|
194
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level4FontWeight;
|
|
195
|
-
}, function (props) {
|
|
196
|
-
return props.theme.level4LetterSpacing;
|
|
197
|
-
}, function (props) {
|
|
198
|
-
return props.theme.level4FontColor;
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
var HeadingLevel5 = _styledComponents["default"].h5(_templateObject6(), function (props) {
|
|
202
|
-
return props.theme.level5FontFamily;
|
|
203
|
-
}, function (props) {
|
|
204
|
-
return props.theme.level5FontStyle;
|
|
205
|
-
}, function (props) {
|
|
206
|
-
return props.theme.level5FontSize;
|
|
207
|
-
}, function (props) {
|
|
208
|
-
return props.theme.level5LineHeight;
|
|
209
|
-
}, function (props) {
|
|
210
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level5FontWeight;
|
|
211
|
-
}, function (props) {
|
|
212
|
-
return props.theme.level5LetterSpacing;
|
|
213
|
-
}, function (props) {
|
|
214
|
-
return props.theme.level5FontColor;
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
DxcHeading.propTypes = {
|
|
218
|
-
level: _propTypes["default"].number,
|
|
219
|
-
text: _propTypes["default"].string,
|
|
220
|
-
as: _propTypes["default"].oneOf(["h1", "h2", "h3", "h4", "h5"]),
|
|
221
|
-
weight: _propTypes["default"].oneOf(["light", "normal", "bold", ""]),
|
|
222
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
223
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
224
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
225
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
226
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
227
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
228
|
-
};
|
|
229
|
-
var _default = DxcHeading;
|
|
230
|
-
exports["default"] = _default;
|
package/dist/input-text/Icons.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _default = _react["default"].createElement("svg", {
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
-
height: "24px",
|
|
15
|
-
viewBox: "0 0 24 24",
|
|
16
|
-
width: "24px",
|
|
17
|
-
fill: "currentColor"
|
|
18
|
-
}, _react["default"].createElement("path", {
|
|
19
|
-
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"
|
|
20
|
-
}));
|
|
21
|
-
|
|
22
|
-
exports["default"] = _default;
|