@dxc-technology/halstack-react 0.0.0-933ff75 → 0.0.0-936a23d

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.
Files changed (162) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +4032 -0
  3. package/dist/index.d.ts +4032 -0
  4. package/dist/index.js +15024 -0
  5. package/dist/index.mjs +14935 -0
  6. package/package.json +92 -68
  7. package/babel.config.js +0 -8
  8. package/dist/BackgroundColorContext.js +0 -46
  9. package/dist/ThemeContext.js +0 -248
  10. package/dist/V3Textarea/V3Textarea.js +0 -264
  11. package/dist/accordion/Accordion.js +0 -353
  12. package/dist/accordion-group/AccordionGroup.js +0 -186
  13. package/dist/alert/Alert.js +0 -403
  14. package/dist/alert/index.d.ts +0 -51
  15. package/dist/badge/Badge.js +0 -63
  16. package/dist/box/Box.js +0 -156
  17. package/dist/button/Button.js +0 -238
  18. package/dist/card/Card.js +0 -254
  19. package/dist/checkbox/Checkbox.js +0 -300
  20. package/dist/checkbox/Checkbox.stories.js +0 -144
  21. package/dist/checkbox/readme.md +0 -116
  22. package/dist/chip/Chip.js +0 -265
  23. package/dist/common/OpenSans.css +0 -81
  24. package/dist/common/RequiredComponent.js +0 -40
  25. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  26. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  27. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  28. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  29. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  30. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  31. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  32. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  33. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  34. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  35. package/dist/common/utils.js +0 -22
  36. package/dist/common/variables.js +0 -1569
  37. package/dist/date/Date.js +0 -379
  38. package/dist/date/Date.stories.js +0 -205
  39. package/dist/date/readme.md +0 -73
  40. package/dist/date-input/DateInput.js +0 -400
  41. package/dist/date-input/index.d.ts +0 -95
  42. package/dist/dialog/Dialog.js +0 -218
  43. package/dist/dropdown/Dropdown.js +0 -544
  44. package/dist/file-input/FileInput.js +0 -644
  45. package/dist/file-input/FileItem.js +0 -280
  46. package/dist/file-input/index.d.ts +0 -81
  47. package/dist/footer/Footer.js +0 -421
  48. package/dist/footer/Icons.js +0 -77
  49. package/dist/header/Header.js +0 -434
  50. package/dist/header/Icons.js +0 -59
  51. package/dist/heading/Heading.js +0 -218
  52. package/dist/input-text/Icons.js +0 -22
  53. package/dist/input-text/InputText.js +0 -705
  54. package/dist/layout/ApplicationLayout.js +0 -327
  55. package/dist/layout/Icons.js +0 -55
  56. package/dist/link/Link.js +0 -237
  57. package/dist/link/readme.md +0 -51
  58. package/dist/main.d.ts +0 -8
  59. package/dist/main.js +0 -367
  60. package/dist/new-select/NewSelect.js +0 -836
  61. package/dist/new-select/index.d.ts +0 -53
  62. package/dist/number-input/NumberInput.js +0 -136
  63. package/dist/number-input/NumberInputContext.js +0 -16
  64. package/dist/number-input/index.d.ts +0 -113
  65. package/dist/paginator/Icons.js +0 -66
  66. package/dist/paginator/Paginator.js +0 -283
  67. package/dist/password-input/PasswordInput.js +0 -198
  68. package/dist/password-input/index.d.ts +0 -94
  69. package/dist/progress-bar/ProgressBar.js +0 -242
  70. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  71. package/dist/progress-bar/readme.md +0 -63
  72. package/dist/radio/Radio.js +0 -209
  73. package/dist/radio/Radio.stories.js +0 -166
  74. package/dist/radio/readme.md +0 -70
  75. package/dist/resultsetTable/ResultsetTable.js +0 -358
  76. package/dist/select/Select.js +0 -549
  77. package/dist/sidenav/Sidenav.js +0 -179
  78. package/dist/slider/Slider.js +0 -404
  79. package/dist/slider/readme.md +0 -64
  80. package/dist/spinner/Spinner.js +0 -381
  81. package/dist/spinner/Spinner.stories.js +0 -183
  82. package/dist/spinner/readme.md +0 -65
  83. package/dist/switch/Switch.js +0 -222
  84. package/dist/switch/Switch.stories.js +0 -134
  85. package/dist/switch/readme.md +0 -133
  86. package/dist/table/Table.js +0 -132
  87. package/dist/tabs/Tabs.js +0 -343
  88. package/dist/tabs/Tabs.stories.js +0 -130
  89. package/dist/tabs/readme.md +0 -78
  90. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  91. package/dist/tabs-for-sections/readme.md +0 -78
  92. package/dist/tag/Tag.js +0 -282
  93. package/dist/text-input/TextInput.js +0 -971
  94. package/dist/text-input/index.d.ts +0 -135
  95. package/dist/textarea/Textarea.js +0 -369
  96. package/dist/textarea/index.d.ts +0 -117
  97. package/dist/toggle/Toggle.js +0 -220
  98. package/dist/toggle/Toggle.stories.js +0 -297
  99. package/dist/toggle/readme.md +0 -80
  100. package/dist/toggle-group/ToggleGroup.js +0 -327
  101. package/dist/upload/Upload.js +0 -205
  102. package/dist/upload/Upload.stories.js +0 -72
  103. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
  104. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  105. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  106. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  107. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  108. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  109. package/dist/upload/file-upload/FileToUpload.js +0 -184
  110. package/dist/upload/file-upload/audio-icon.svg +0 -4
  111. package/dist/upload/file-upload/close.svg +0 -4
  112. package/dist/upload/file-upload/file-icon.svg +0 -4
  113. package/dist/upload/file-upload/video-icon.svg +0 -4
  114. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  115. package/dist/upload/readme.md +0 -37
  116. package/dist/upload/transaction/Icons.js +0 -160
  117. package/dist/upload/transaction/Transaction.js +0 -148
  118. package/dist/upload/transactions/Transactions.js +0 -138
  119. package/dist/useTheme.js +0 -22
  120. package/dist/wizard/Icons.js +0 -65
  121. package/dist/wizard/Wizard.js +0 -405
  122. package/test/Accordion.test.js +0 -33
  123. package/test/AccordionGroup.test.js +0 -125
  124. package/test/Alert.test.js +0 -53
  125. package/test/Box.test.js +0 -10
  126. package/test/Button.test.js +0 -18
  127. package/test/Card.test.js +0 -30
  128. package/test/Checkbox.test.js +0 -45
  129. package/test/Chip.test.js +0 -25
  130. package/test/Date.test.js +0 -397
  131. package/test/DateInput.test.js +0 -242
  132. package/test/Dialog.test.js +0 -23
  133. package/test/Dropdown.test.js +0 -145
  134. package/test/FileInput.test.js +0 -201
  135. package/test/Footer.test.js +0 -94
  136. package/test/Header.test.js +0 -34
  137. package/test/Heading.test.js +0 -35
  138. package/test/InputText.test.js +0 -248
  139. package/test/Link.test.js +0 -43
  140. package/test/NumberInput.test.js +0 -259
  141. package/test/Paginator.test.js +0 -177
  142. package/test/PasswordInput.test.js +0 -83
  143. package/test/ProgressBar.test.js +0 -35
  144. package/test/Radio.test.js +0 -37
  145. package/test/ResultsetTable.test.js +0 -329
  146. package/test/Select.test.js +0 -212
  147. package/test/Sidenav.test.js +0 -45
  148. package/test/Slider.test.js +0 -74
  149. package/test/Spinner.test.js +0 -32
  150. package/test/Switch.test.js +0 -45
  151. package/test/Table.test.js +0 -36
  152. package/test/Tabs.test.js +0 -109
  153. package/test/TabsForSections.test.js +0 -34
  154. package/test/Tag.test.js +0 -32
  155. package/test/TextInput.test.js +0 -732
  156. package/test/Textarea.test.js +0 -193
  157. package/test/ToggleGroup.test.js +0 -85
  158. package/test/Upload.test.js +0 -60
  159. package/test/V3TextArea.test.js +0 -51
  160. package/test/Wizard.test.js +0 -130
  161. package/test/mocks/pngMock.js +0 -1
  162. package/test/mocks/svgMock.js +0 -1
@@ -1,218 +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
- _ref$weight = _ref.weight,
94
- weight = _ref$weight === void 0 ? "" : _ref$weight,
95
- margin = _ref.margin;
96
- var colorsTheme = (0, _useTheme["default"])();
97
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
98
- theme: colorsTheme.heading
99
- }, _react["default"].createElement(HeadingContainer, {
100
- margin: margin
101
- }, level === 1 ? _react["default"].createElement(HeadingLevel1, {
102
- weight: weight
103
- }, text) : level === 2 ? _react["default"].createElement(HeadingLevel2, {
104
- weight: weight
105
- }, text) : level === 3 ? _react["default"].createElement(HeadingLevel3, {
106
- weight: weight
107
- }, text) : level === 4 ? _react["default"].createElement(HeadingLevel4, {
108
- weight: weight
109
- }, text) : _react["default"].createElement(HeadingLevel5, {
110
- weight: weight
111
- }, text)));
112
- };
113
-
114
- var HeadingContainer = _styledComponents["default"].div(_templateObject(), function (props) {
115
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
116
- }, function (props) {
117
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
118
- }, function (props) {
119
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
120
- }, function (props) {
121
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
122
- }, function (props) {
123
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
124
- });
125
-
126
- var HeadingLevel1 = _styledComponents["default"].h1(_templateObject2(), function (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;
140
- });
141
-
142
- var HeadingLevel2 = _styledComponents["default"].h2(_templateObject3(), function (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;
156
- });
157
-
158
- var HeadingLevel3 = _styledComponents["default"].h3(_templateObject4(), function (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;
172
- });
173
-
174
- var HeadingLevel4 = _styledComponents["default"].h4(_templateObject5(), function (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;
188
- });
189
-
190
- var HeadingLevel5 = _styledComponents["default"].h5(_templateObject6(), function (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;
204
- });
205
-
206
- DxcHeading.propTypes = {
207
- level: _propTypes["default"].number,
208
- text: _propTypes["default"].string,
209
- weight: _propTypes["default"].oneOf(["light", "normal", "bold", ""]),
210
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
211
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
212
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
213
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
214
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
215
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
216
- };
217
- var _default = DxcHeading;
218
- exports["default"] = _default;
@@ -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;