@dxc-technology/halstack-react 0.0.0-e792e0c → 0.0.0-e832ef8
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/babel.config.js +6 -2
- package/dist/BackgroundColorContext.js +46 -0
- package/dist/ThemeContext.js +235 -2
- package/dist/V3Textarea/V3Textarea.js +264 -0
- package/dist/accordion/Accordion.js +170 -81
- package/dist/accordion-group/AccordionGroup.js +186 -0
- package/dist/alert/Alert.js +184 -83
- package/dist/alert/index.d.ts +51 -0
- package/dist/badge/Badge.js +63 -0
- package/dist/box/Box.js +31 -23
- package/dist/button/Button.js +82 -27
- package/dist/card/Card.js +72 -35
- package/dist/checkbox/Checkbox.js +108 -32
- package/dist/chip/Chip.js +129 -35
- package/dist/common/RequiredComponent.js +2 -8
- package/dist/common/utils.js +2 -22
- package/dist/common/variables.js +1459 -197
- package/dist/date/Date.js +86 -64
- package/dist/date-input/DateInput.js +400 -0
- package/dist/date-input/index.d.ts +95 -0
- package/dist/dialog/Dialog.js +58 -37
- package/dist/dropdown/Dropdown.js +226 -94
- 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 +122 -47
- package/dist/footer/Icons.js +77 -0
- package/dist/header/Header.js +171 -91
- package/dist/header/Icons.js +59 -0
- package/dist/heading/Heading.js +81 -22
- package/dist/input-text/Icons.js +22 -0
- package/dist/input-text/InputText.js +293 -107
- package/dist/layout/ApplicationLayout.js +327 -0
- package/dist/layout/Icons.js +55 -0
- package/dist/link/Link.js +136 -35
- package/dist/main.d.ts +8 -0
- package/dist/main.js +111 -7
- package/dist/new-select/NewSelect.js +836 -0
- package/dist/new-select/index.d.ts +53 -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/Icons.js +66 -0
- package/dist/paginator/Paginator.js +162 -57
- package/dist/password-input/PasswordInput.js +198 -0
- package/dist/password-input/index.d.ts +94 -0
- package/dist/progress-bar/ProgressBar.js +97 -44
- package/dist/radio/Radio.js +39 -21
- package/dist/resultsetTable/ResultsetTable.js +93 -69
- package/dist/select/Select.js +250 -143
- package/dist/sidenav/Sidenav.js +85 -143
- package/dist/slider/Slider.js +219 -73
- package/dist/spinner/Spinner.js +249 -64
- package/dist/switch/Switch.js +51 -26
- package/dist/table/Table.js +63 -15
- package/dist/tabs/Tabs.js +208 -35
- package/dist/tabs-for-sections/TabsForSections.js +1 -16
- package/dist/tag/Tag.js +100 -35
- package/dist/text-input/TextInput.js +971 -0
- package/dist/text-input/index.d.ts +135 -0
- package/dist/textarea/Textarea.js +250 -107
- package/dist/textarea/index.d.ts +117 -0
- package/dist/toggle/Toggle.js +16 -19
- package/dist/toggle-group/ToggleGroup.js +327 -0
- package/dist/upload/Upload.js +16 -11
- package/dist/upload/buttons-upload/ButtonsUpload.js +35 -25
- package/dist/upload/buttons-upload/Icons.js +40 -0
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -31
- package/dist/upload/file-upload/FileToUpload.js +64 -33
- package/dist/upload/file-upload/Icons.js +66 -0
- package/dist/upload/files-upload/FilesToUpload.js +16 -16
- package/dist/upload/readme.md +2 -2
- package/dist/upload/transaction/Icons.js +160 -0
- package/dist/upload/transaction/Transaction.js +42 -49
- package/dist/upload/transactions/Transactions.js +38 -20
- package/dist/useTheme.js +22 -0
- package/dist/wizard/Icons.js +65 -0
- package/dist/wizard/Wizard.js +141 -56
- package/package.json +14 -6
- package/test/AccordionGroup.test.js +125 -0
- package/test/Date.test.js +49 -45
- package/test/DateInput.test.js +242 -0
- package/test/Dropdown.test.js +19 -4
- package/test/FileInput.test.js +201 -0
- package/test/Footer.test.js +2 -7
- package/test/Header.test.js +5 -10
- package/test/InputText.test.js +53 -41
- package/test/Link.test.js +25 -7
- package/test/NumberInput.test.js +259 -0
- package/test/Paginator.test.js +72 -60
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +66 -19
- package/test/Select.test.js +55 -34
- package/test/Sidenav.test.js +22 -64
- package/test/Slider.test.js +24 -15
- package/test/Spinner.test.js +5 -0
- package/test/Tabs.test.js +21 -0
- package/test/TextInput.test.js +732 -0
- package/test/Textarea.test.js +193 -0
- package/test/ToggleGroup.test.js +85 -0
- 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/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/common/services/example-service.js +0 -10
- package/dist/common/services/example-service.test.js +0 -12
- 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/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.png +0 -0
- package/dist/header/dxc_logo_white.png +0 -0
- 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/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- 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/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/sidenav/arrow_icon.svg +0 -3
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- 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 -6
- package/dist/wizard/valid_icon.svg +0 -6
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/Toggle.test.js +0 -43
package/dist/heading/Heading.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
3
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
6
|
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -15,16 +17,16 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
15
17
|
|
|
16
18
|
var _react = _interopRequireDefault(require("react"));
|
|
17
19
|
|
|
18
|
-
var _styledComponents =
|
|
20
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
21
|
|
|
20
22
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
23
|
|
|
22
|
-
require("../common/OpenSans.css");
|
|
23
|
-
|
|
24
24
|
var _variables = require("../common/variables.js");
|
|
25
25
|
|
|
26
|
+
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
27
|
+
|
|
26
28
|
function _templateObject6() {
|
|
27
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size:
|
|
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"]);
|
|
28
30
|
|
|
29
31
|
_templateObject6 = function _templateObject6() {
|
|
30
32
|
return data;
|
|
@@ -34,7 +36,7 @@ function _templateObject6() {
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
function _templateObject5() {
|
|
37
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size:
|
|
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"]);
|
|
38
40
|
|
|
39
41
|
_templateObject5 = function _templateObject5() {
|
|
40
42
|
return data;
|
|
@@ -44,7 +46,7 @@ function _templateObject5() {
|
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
function _templateObject4() {
|
|
47
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size:
|
|
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"]);
|
|
48
50
|
|
|
49
51
|
_templateObject4 = function _templateObject4() {
|
|
50
52
|
return data;
|
|
@@ -54,7 +56,7 @@ function _templateObject4() {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
function _templateObject3() {
|
|
57
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size:
|
|
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"]);
|
|
58
60
|
|
|
59
61
|
_templateObject3 = function _templateObject3() {
|
|
60
62
|
return data;
|
|
@@ -64,7 +66,7 @@ function _templateObject3() {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
function _templateObject2() {
|
|
67
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size:
|
|
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"]);
|
|
68
70
|
|
|
69
71
|
_templateObject2 = function _templateObject2() {
|
|
70
72
|
return data;
|
|
@@ -74,7 +76,7 @@ function _templateObject2() {
|
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
function _templateObject() {
|
|
77
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n
|
|
79
|
+
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
78
80
|
|
|
79
81
|
_templateObject = function _templateObject() {
|
|
80
82
|
return data;
|
|
@@ -86,15 +88,15 @@ function _templateObject() {
|
|
|
86
88
|
var DxcHeading = function DxcHeading(_ref) {
|
|
87
89
|
var _ref$level = _ref.level,
|
|
88
90
|
level = _ref$level === void 0 ? 1 : _ref$level,
|
|
89
|
-
_ref$theme = _ref.theme,
|
|
90
|
-
theme = _ref$theme === void 0 ? "light" : _ref$theme,
|
|
91
91
|
_ref$text = _ref.text,
|
|
92
92
|
text = _ref$text === void 0 ? "" : _ref$text,
|
|
93
93
|
_ref$weight = _ref.weight,
|
|
94
94
|
weight = _ref$weight === void 0 ? "" : _ref$weight,
|
|
95
95
|
margin = _ref.margin;
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
97
|
+
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
98
|
+
theme: colorsTheme.heading
|
|
99
|
+
}, _react["default"].createElement(HeadingContainer, {
|
|
98
100
|
margin: margin
|
|
99
101
|
}, level === 1 ? _react["default"].createElement(HeadingLevel1, {
|
|
100
102
|
weight: weight
|
|
@@ -106,7 +108,7 @@ var DxcHeading = function DxcHeading(_ref) {
|
|
|
106
108
|
weight: weight
|
|
107
109
|
}, text) : _react["default"].createElement(HeadingLevel5, {
|
|
108
110
|
weight: weight
|
|
109
|
-
}, text));
|
|
111
|
+
}, text)));
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
var HeadingContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
@@ -119,33 +121,90 @@ var HeadingContainer = _styledComponents["default"].div(_templateObject(), funct
|
|
|
119
121
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
120
122
|
}, function (props) {
|
|
121
123
|
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
122
|
-
}, function (props) {
|
|
123
|
-
return props.brightness === "light" ? "#000000DE" : "#FFFFFF";
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
var HeadingLevel1 = _styledComponents["default"].h1(_templateObject2(), function (props) {
|
|
127
|
-
return props.
|
|
127
|
+
return props.theme.level1FontFamily;
|
|
128
|
+
}, function (props) {
|
|
129
|
+
return props.theme.level1FontStyle;
|
|
130
|
+
}, function (props) {
|
|
131
|
+
return props.theme.level1FontSize;
|
|
132
|
+
}, function (props) {
|
|
133
|
+
return props.theme.level1LineHeight;
|
|
134
|
+
}, function (props) {
|
|
135
|
+
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level1FontWeight;
|
|
136
|
+
}, function (props) {
|
|
137
|
+
return props.theme.level1LetterSpacing;
|
|
138
|
+
}, function (props) {
|
|
139
|
+
return props.theme.level1FontColor;
|
|
128
140
|
});
|
|
129
141
|
|
|
130
142
|
var HeadingLevel2 = _styledComponents["default"].h2(_templateObject3(), function (props) {
|
|
131
|
-
return props.
|
|
143
|
+
return props.theme.level2FontFamily;
|
|
144
|
+
}, function (props) {
|
|
145
|
+
return props.theme.level2FontStyle;
|
|
146
|
+
}, function (props) {
|
|
147
|
+
return props.theme.level2FontSize;
|
|
148
|
+
}, function (props) {
|
|
149
|
+
return props.theme.level2LineHeight;
|
|
150
|
+
}, function (props) {
|
|
151
|
+
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level2FontWeight;
|
|
152
|
+
}, function (props) {
|
|
153
|
+
return props.theme.level2LetterSpacing;
|
|
154
|
+
}, function (props) {
|
|
155
|
+
return props.theme.level2FontColor;
|
|
132
156
|
});
|
|
133
157
|
|
|
134
158
|
var HeadingLevel3 = _styledComponents["default"].h3(_templateObject4(), function (props) {
|
|
135
|
-
return props.
|
|
159
|
+
return props.theme.level3FontFamily;
|
|
160
|
+
}, function (props) {
|
|
161
|
+
return props.theme.level3FontStyle;
|
|
162
|
+
}, function (props) {
|
|
163
|
+
return props.theme.level3FontSize;
|
|
164
|
+
}, function (props) {
|
|
165
|
+
return props.theme.level3LineHeight;
|
|
166
|
+
}, function (props) {
|
|
167
|
+
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level3FontWeight;
|
|
168
|
+
}, function (props) {
|
|
169
|
+
return props.theme.level3LetterSpacing;
|
|
170
|
+
}, function (props) {
|
|
171
|
+
return props.theme.level3FontColor;
|
|
136
172
|
});
|
|
137
173
|
|
|
138
174
|
var HeadingLevel4 = _styledComponents["default"].h4(_templateObject5(), function (props) {
|
|
139
|
-
return props.
|
|
175
|
+
return props.theme.level4FontFamily;
|
|
176
|
+
}, function (props) {
|
|
177
|
+
return props.theme.level4FontStyle;
|
|
178
|
+
}, function (props) {
|
|
179
|
+
return props.theme.level4FontSize;
|
|
180
|
+
}, function (props) {
|
|
181
|
+
return props.theme.level4LineHeight;
|
|
182
|
+
}, function (props) {
|
|
183
|
+
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level4FontWeight;
|
|
184
|
+
}, function (props) {
|
|
185
|
+
return props.theme.level4LetterSpacing;
|
|
186
|
+
}, function (props) {
|
|
187
|
+
return props.theme.level4FontColor;
|
|
140
188
|
});
|
|
141
189
|
|
|
142
190
|
var HeadingLevel5 = _styledComponents["default"].h5(_templateObject6(), function (props) {
|
|
143
|
-
return props.
|
|
191
|
+
return props.theme.level5FontFamily;
|
|
192
|
+
}, function (props) {
|
|
193
|
+
return props.theme.level5FontStyle;
|
|
194
|
+
}, function (props) {
|
|
195
|
+
return props.theme.level5FontSize;
|
|
196
|
+
}, function (props) {
|
|
197
|
+
return props.theme.level5LineHeight;
|
|
198
|
+
}, function (props) {
|
|
199
|
+
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level5FontWeight;
|
|
200
|
+
}, function (props) {
|
|
201
|
+
return props.theme.level5LetterSpacing;
|
|
202
|
+
}, function (props) {
|
|
203
|
+
return props.theme.level5FontColor;
|
|
144
204
|
});
|
|
145
205
|
|
|
146
206
|
DxcHeading.propTypes = {
|
|
147
207
|
level: _propTypes["default"].number,
|
|
148
|
-
theme: _propTypes["default"].oneOf(["light", "dark", ""]),
|
|
149
208
|
text: _propTypes["default"].string,
|
|
150
209
|
weight: _propTypes["default"].oneOf(["light", "normal", "bold", ""]),
|
|
151
210
|
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
@@ -0,0 +1,22 @@
|
|
|
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;
|