@dxc-technology/halstack-react 0.0.0-f2bc144 → 0.0.0-f2ee373

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 (197) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +6670 -0
  3. package/dist/index.d.ts +6670 -0
  4. package/dist/index.js +14289 -0
  5. package/dist/index.mjs +14232 -0
  6. package/package.json +74 -64
  7. package/babel.config.js +0 -8
  8. package/dist/ThemeContext.js +0 -180
  9. package/dist/accordion/Accordion.js +0 -268
  10. package/dist/accordion/Accordion.stories.js +0 -207
  11. package/dist/accordion/readme.md +0 -96
  12. package/dist/accordion-group/AccordionGroup.js +0 -156
  13. package/dist/accordion-group/AccordionGroup.stories.js +0 -207
  14. package/dist/accordion-group/readme.md +0 -70
  15. package/dist/alert/Alert.js +0 -303
  16. package/dist/alert/Alert.stories.js +0 -158
  17. package/dist/alert/close.svg +0 -4
  18. package/dist/alert/error.svg +0 -4
  19. package/dist/alert/info.svg +0 -4
  20. package/dist/alert/readme.md +0 -43
  21. package/dist/alert/success.svg +0 -4
  22. package/dist/alert/warning.svg +0 -4
  23. package/dist/badge/Badge.js +0 -42
  24. package/dist/box/Box.js +0 -145
  25. package/dist/button/Button.js +0 -199
  26. package/dist/button/Button.stories.js +0 -224
  27. package/dist/button/readme.md +0 -93
  28. package/dist/card/Card.js +0 -217
  29. package/dist/checkbox/Checkbox.js +0 -229
  30. package/dist/checkbox/Checkbox.stories.js +0 -144
  31. package/dist/checkbox/readme.md +0 -116
  32. package/dist/chip/Chip.js +0 -205
  33. package/dist/common/OpenSans.css +0 -81
  34. package/dist/common/RequiredComponent.js +0 -40
  35. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  36. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  37. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  38. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  39. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  40. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  41. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  42. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  43. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  44. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  45. package/dist/common/services/example-service.js +0 -10
  46. package/dist/common/services/example-service.test.js +0 -12
  47. package/dist/common/utils.js +0 -42
  48. package/dist/common/variables.js +0 -349
  49. package/dist/date/Date.js +0 -352
  50. package/dist/date/Date.stories.js +0 -205
  51. package/dist/date/calendar.svg +0 -1
  52. package/dist/date/calendar_dark.svg +0 -1
  53. package/dist/date/readme.md +0 -73
  54. package/dist/dialog/Dialog.js +0 -195
  55. package/dist/dialog/Dialog.stories.js +0 -217
  56. package/dist/dialog/readme.md +0 -32
  57. package/dist/dropdown/Dropdown.js +0 -446
  58. package/dist/dropdown/Dropdown.stories.js +0 -249
  59. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  60. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  61. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  62. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  63. package/dist/dropdown/readme.md +0 -69
  64. package/dist/footer/Footer.js +0 -366
  65. package/dist/footer/Footer.stories.js +0 -94
  66. package/dist/footer/dxc_logo_wht.png +0 -0
  67. package/dist/footer/readme.md +0 -41
  68. package/dist/header/Header.js +0 -368
  69. package/dist/header/Header.stories.js +0 -176
  70. package/dist/header/close_icon.svg +0 -1
  71. package/dist/header/dxc_logo_black.png +0 -0
  72. package/dist/header/dxc_logo_blk_rgb.svg +0 -6
  73. package/dist/header/dxc_logo_white.png +0 -0
  74. package/dist/header/hamb_menu_black.svg +0 -1
  75. package/dist/header/hamb_menu_white.svg +0 -1
  76. package/dist/header/readme.md +0 -33
  77. package/dist/heading/Heading.js +0 -153
  78. package/dist/input-text/InputText.js +0 -561
  79. package/dist/input-text/InputText.stories.js +0 -209
  80. package/dist/input-text/error.svg +0 -1
  81. package/dist/input-text/readme.md +0 -91
  82. package/dist/layout/ApplicationLayout.js +0 -330
  83. package/dist/layout/facebook.svg +0 -45
  84. package/dist/layout/linkedin.svg +0 -50
  85. package/dist/layout/twitter.svg +0 -53
  86. package/dist/link/Link.js +0 -187
  87. package/dist/link/readme.md +0 -51
  88. package/dist/main.js +0 -303
  89. package/dist/paginator/Paginator.js +0 -247
  90. package/dist/paginator/images/next.svg +0 -3
  91. package/dist/paginator/images/nextPage.svg +0 -3
  92. package/dist/paginator/images/previous.svg +0 -3
  93. package/dist/paginator/images/previousPage.svg +0 -3
  94. package/dist/paginator/readme.md +0 -50
  95. package/dist/progress-bar/ProgressBar.js +0 -184
  96. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  97. package/dist/progress-bar/readme.md +0 -63
  98. package/dist/radio/Radio.js +0 -190
  99. package/dist/radio/Radio.stories.js +0 -166
  100. package/dist/radio/readme.md +0 -70
  101. package/dist/resultsetTable/ResultsetTable.js +0 -327
  102. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  103. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  104. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  105. package/dist/select/Select.js +0 -475
  106. package/dist/select/Select.stories.js +0 -235
  107. package/dist/select/readme.md +0 -72
  108. package/dist/sidenav/Sidenav.js +0 -123
  109. package/dist/slider/Slider.js +0 -257
  110. package/dist/slider/Slider.stories.js +0 -241
  111. package/dist/slider/readme.md +0 -64
  112. package/dist/spinner/Spinner.js +0 -190
  113. package/dist/spinner/Spinner.stories.js +0 -183
  114. package/dist/spinner/readme.md +0 -65
  115. package/dist/switch/Switch.js +0 -190
  116. package/dist/switch/Switch.stories.js +0 -134
  117. package/dist/switch/readme.md +0 -133
  118. package/dist/table/Table.js +0 -102
  119. package/dist/tabs/Tabs.js +0 -302
  120. package/dist/tabs/Tabs.stories.js +0 -130
  121. package/dist/tabs/readme.md +0 -78
  122. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  123. package/dist/tabs-for-sections/readme.md +0 -78
  124. package/dist/tag/Tag.js +0 -249
  125. package/dist/textarea/Textarea.js +0 -220
  126. package/dist/toggle/Toggle.js +0 -223
  127. package/dist/toggle/Toggle.stories.js +0 -297
  128. package/dist/toggle/readme.md +0 -80
  129. package/dist/toggle-group/ToggleGroup.js +0 -209
  130. package/dist/toggle-group/readme.md +0 -82
  131. package/dist/upload/Upload.js +0 -200
  132. package/dist/upload/Upload.stories.js +0 -72
  133. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -122
  134. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  135. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  136. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -279
  137. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  138. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  139. package/dist/upload/file-upload/FileToUpload.js +0 -158
  140. package/dist/upload/file-upload/audio-icon.svg +0 -4
  141. package/dist/upload/file-upload/close.svg +0 -4
  142. package/dist/upload/file-upload/file-icon.svg +0 -4
  143. package/dist/upload/file-upload/video-icon.svg +0 -4
  144. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  145. package/dist/upload/readme.md +0 -37
  146. package/dist/upload/transaction/Transaction.js +0 -155
  147. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  148. package/dist/upload/transaction/audio-icon.svg +0 -4
  149. package/dist/upload/transaction/error-icon.svg +0 -4
  150. package/dist/upload/transaction/file-icon-err.svg +0 -4
  151. package/dist/upload/transaction/file-icon.svg +0 -4
  152. package/dist/upload/transaction/image-icon-err.svg +0 -4
  153. package/dist/upload/transaction/image-icon.svg +0 -4
  154. package/dist/upload/transaction/success-icon.svg +0 -4
  155. package/dist/upload/transaction/video-icon-err.svg +0 -4
  156. package/dist/upload/transaction/video-icon.svg +0 -4
  157. package/dist/upload/transactions/Transactions.js +0 -120
  158. package/dist/useTheme.js +0 -22
  159. package/dist/wizard/Wizard.js +0 -325
  160. package/dist/wizard/invalid_icon.svg +0 -6
  161. package/dist/wizard/valid_icon.svg +0 -6
  162. package/dist/wizard/validation-wrong.svg +0 -6
  163. package/test/Accordion.test.js +0 -33
  164. package/test/AccordionGroup.test.js +0 -109
  165. package/test/Alert.test.js +0 -53
  166. package/test/Box.test.js +0 -10
  167. package/test/Button.test.js +0 -18
  168. package/test/Card.test.js +0 -30
  169. package/test/Checkbox.test.js +0 -45
  170. package/test/Chip.test.js +0 -25
  171. package/test/Date.test.js +0 -393
  172. package/test/Dialog.test.js +0 -23
  173. package/test/Dropdown.test.js +0 -130
  174. package/test/Footer.test.js +0 -99
  175. package/test/Header.test.js +0 -39
  176. package/test/Heading.test.js +0 -35
  177. package/test/InputText.test.js +0 -240
  178. package/test/Link.test.js +0 -42
  179. package/test/Paginator.test.js +0 -177
  180. package/test/ProgressBar.test.js +0 -35
  181. package/test/Radio.test.js +0 -37
  182. package/test/ResultsetTable.test.js +0 -330
  183. package/test/Select.test.js +0 -192
  184. package/test/Sidenav.test.js +0 -45
  185. package/test/Slider.test.js +0 -82
  186. package/test/Spinner.test.js +0 -27
  187. package/test/Switch.test.js +0 -45
  188. package/test/Table.test.js +0 -36
  189. package/test/Tabs.test.js +0 -109
  190. package/test/TabsForSections.test.js +0 -34
  191. package/test/Tag.test.js +0 -32
  192. package/test/TextArea.test.js +0 -52
  193. package/test/ToggleGroup.test.js +0 -81
  194. package/test/Upload.test.js +0 -60
  195. package/test/Wizard.test.js +0 -130
  196. package/test/mocks/pngMock.js +0 -1
  197. package/test/mocks/svgMock.js +0 -1
@@ -1,116 +0,0 @@
1
- # DXC Checkbox Component
2
-
3
- ## Usage
4
-
5
- ```js
6
- import { DxcCheckbox } from "@dxc-technology/halstack-react";
7
-
8
- <DxcCheckbox onChange={handleNewValue} label="Test Checkbox" checked={checked} />;
9
- ```
10
-
11
- ## Props
12
-
13
- <table>
14
- <tr style="background-color: grey">
15
- <td>Name</td>
16
- <td>Default</td>
17
- <td>Description</td>
18
- </tr>
19
- <tr>
20
- <td>checked: boolean</td>
21
- <td><code>false</code></td>
22
- <td>If true, the component is checked.</td>
23
- </tr>
24
- <tr>
25
- <td>value: any</td>
26
- <td></td>
27
- <td>Will be passed to the value attribute of the html input element. When inside a form, this value will be only submitted if the checkbox is checked </td>
28
- </tr>
29
- <tr>
30
- <td>label: string</td>
31
- <td></td>
32
- <td>Text to be placed next to the checkbox.</td>
33
- </tr>
34
- <tr>
35
- <td>labelPosition: 'before' | 'after'</td>
36
- <td><code>'before'</code></td>
37
- <td>Whether the label should appear after or before the checkbox.</td>
38
- </tr>
39
- <tr>
40
- <td>theme: 'light' | 'dark'</td>
41
- <td><code>'light'</code></td>
42
- <td>Uses one of the available component themes.</td>
43
- </tr>
44
- <tr>
45
- <td>name: string</td>
46
- <td></td>
47
- <td>Name attribute of the input element.</td>
48
- </tr>
49
- <tr>
50
- <td>disabled: boolean</td>
51
- <td><code>false</code></td>
52
- <td>If true, the component will be disabled.</td>
53
- </tr>
54
- <tr>
55
- <td>required: boolean</td>
56
- <td><code>false</code></td>
57
- <td>If true, a red asterisk will appear before the label to indicate to the user that the field is required.</td>
58
- </tr>
59
- <tr>
60
- <td>disableRipple: boolean</td>
61
- <td><code>false</code></td>
62
- <td>If true, the ripple effect will be disabled.</td>
63
- </tr>
64
- <tr>
65
- <td>onChange: function</td>
66
- <td></td>
67
- <td>This function will be called when the user clicks the checkbox. The new value will be passed as a parameter.<br>
68
- </td>
69
- </tr>
70
- </table>
71
-
72
- ## Examples
73
-
74
- - Basic checkbox - Light theme - Enabled - Label after checkbox - With ripple
75
-
76
- ```js
77
- import React from "react";
78
- import { DxcCheckbox } from "@dxc-technology/halstack-react";
79
-
80
- class App extends React.Component {
81
- state = {
82
- isChecked: true
83
- };
84
- constructor() {
85
- super();
86
- this.handleChange = this.handleChange.bind(this);
87
- }
88
-
89
- handleChange(checked) {
90
- this.setState({
91
- isChecked: checked
92
- });
93
- }
94
-
95
- render() {
96
- return (
97
- <div>
98
- <DxcCheckbox
99
- checked={this.state.isChecked}
100
- value="Checkbox1"
101
- label="Checkbox 1"
102
- labelPosition="after"
103
- theme="light"
104
- name="Checkbox"
105
- disabled={false}
106
- disableRipple={false}
107
- onChange={event => this.handleChange(event)}
108
- />
109
- </div>
110
- );
111
- }
112
- }
113
- export default App;
114
-
115
-
116
- ```
package/dist/chip/Chip.js DELETED
@@ -1,205 +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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
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
- require("../common/OpenSans.css");
27
-
28
- var _utils = require("../common/utils.js");
29
-
30
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
31
-
32
- function _templateObject5() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n opacity: ", ";\n cursor: ", ";\n ", "\n max-width: 24px;\n max-height: 24px;\n overflow: hidden;\n"]);
34
-
35
- _templateObject5 = function _templateObject5() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- function _templateObject4() {
43
- var data = (0, _taggedTemplateLiteral2["default"])(["\n cursor: ", ";\n margin-right: ", ";\n max-width: 24px;\n max-height: 24px;\n"]);
44
-
45
- _templateObject4 = function _templateObject4() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject3() {
53
- var data = (0, _taggedTemplateLiteral2["default"])(["\n cursor: ", ";\n margin-left: ", ";\n max-width: 24px;\n max-height: 24px;\n"]);
54
-
55
- _templateObject3 = function _templateObject3() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
61
-
62
- function _templateObject2() {
63
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 16px;\n font-family: \"Open Sans\";\n line-height: 24px;\n color: ", ";\n cursor: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"]);
64
-
65
- _templateObject2 = function _templateObject2() {
66
- return data;
67
- };
68
-
69
- return data;
70
- }
71
-
72
- function _templateObject() {
73
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n border-radius: 50px;\n margin: 2px;\n max-width: ", ";\n background-color: ", ";\n ", ";\n height: ", ";\n padding: 10px 20px;\n cursor: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
74
-
75
- _templateObject = function _templateObject() {
76
- return data;
77
- };
78
-
79
- return data;
80
- }
81
-
82
- var DxcChip = function DxcChip(_ref) {
83
- var label = _ref.label,
84
- suffixIcon = _ref.suffixIcon,
85
- prefixIcon = _ref.prefixIcon,
86
- suffixIconSrc = _ref.suffixIconSrc,
87
- onClickSuffix = _ref.onClickSuffix,
88
- prefixIconSrc = _ref.prefixIconSrc,
89
- onClickPrefix = _ref.onClickPrefix,
90
- disabled = _ref.disabled,
91
- margin = _ref.margin;
92
- var colorsTheme = (0, _useTheme["default"])();
93
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
94
- theme: colorsTheme.chip
95
- }, _react["default"].createElement(StyledDxcChip, {
96
- disabled: disabled,
97
- margin: margin
98
- }, prefixIcon ? _react["default"].createElement(IconContainer, {
99
- disabled: disabled,
100
- prefixIcon: true,
101
- label: label,
102
- onClick: function onClick() {
103
- return onClickPrefix && !disabled && onClickPrefix(label);
104
- }
105
- }, (0, _typeof2["default"])(prefixIcon) === "object" ? prefixIcon : _react["default"].createElement(prefixIcon)) : prefixIconSrc && _react["default"].createElement(PrefixIconContainer, {
106
- disabled: disabled,
107
- src: prefixIconSrc,
108
- label: label,
109
- onClick: function onClick() {
110
- return onClickPrefix && !disabled && onClickPrefix(label);
111
- }
112
- }), label && _react["default"].createElement(ChipTextContainer, {
113
- disabled: disabled,
114
- prefixIconSrc: prefixIconSrc,
115
- suffixIconSrc: suffixIconSrc
116
- }, label), suffixIcon ? _react["default"].createElement(IconContainer, {
117
- disabled: disabled,
118
- suffixIcon: true,
119
- label: label,
120
- onClick: function onClick() {
121
- return onClickSuffix && !disabled && onClickSuffix(label);
122
- }
123
- }, (0, _typeof2["default"])(suffixIcon) === "object" ? suffixIcon : _react["default"].createElement(suffixIcon)) : suffixIconSrc && _react["default"].createElement(SuffixIconContainer, {
124
- disabled: disabled,
125
- src: suffixIconSrc,
126
- label: label,
127
- onClick: function onClick() {
128
- return onClickSuffix && !disabled && onClickSuffix(label);
129
- }
130
- })));
131
- };
132
-
133
- var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function (_ref2) {
134
- var margin = _ref2.margin;
135
- return "calc(100% - 40px - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
136
- }, function (props) {
137
- return props.disabled && props.theme.disabledBackgroundColor || props.theme.backgroundColor;
138
- }, function (props) {
139
- return props.theme.outlinedColor !== "" ? "border: 2px solid ".concat(props.theme.outlinedColor) : "";
140
- }, function (props) {
141
- return props.theme.outlinedColor !== "" ? "18px" : "22px";
142
- }, function (_ref3) {
143
- var disabled = _ref3.disabled;
144
- return disabled && "not-allowed";
145
- }, function (props) {
146
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
147
- }, function (props) {
148
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
149
- }, function (props) {
150
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
151
- }, function (props) {
152
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
153
- }, function (props) {
154
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
155
- });
156
-
157
- var ChipTextContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
158
- return props.disabled && props.theme.disabledFontColor || props.theme.fontColor;
159
- }, function (_ref4) {
160
- var disabled = _ref4.disabled;
161
- return disabled && "not-allowed" || "default";
162
- });
163
-
164
- var SuffixIconContainer = _styledComponents["default"].img(_templateObject3(), function (_ref5) {
165
- var disabled = _ref5.disabled;
166
- return disabled && "not-allowed" || "pointer";
167
- }, function (props) {
168
- return (props.label || props.suffixIconSrc) && "10px" || props.prefixIconSrc && "5px";
169
- });
170
-
171
- var PrefixIconContainer = _styledComponents["default"].img(_templateObject4(), function (_ref6) {
172
- var disabled = _ref6.disabled;
173
- return disabled && "not-allowed" || "pointer";
174
- }, function (props) {
175
- return (props.label || props.suffixIconSrc) && "10px" || props.prefixIconSrc && "5px";
176
- });
177
-
178
- var IconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
179
- return props.disabled && 0.34;
180
- }, function (_ref7) {
181
- var disabled = _ref7.disabled;
182
- return disabled && "not-allowed" || "pointer";
183
- }, function (props) {
184
- return props.prefixIcon ? "margin-right: ".concat((props.label || props.suffixIcon || props.suffixIconSrc) && "10px" || (props.prefixIcon || props.prefixIconSrc) && "0", ";") : "margin-left: ".concat((props.label || props.prefixIcon || props.prefixIconSrc) && "10px" || (props.prefixIcon || props.prefixIconSrc) && "0", ";");
185
- });
186
-
187
- DxcChip.propTypes = {
188
- label: _propTypes["default"].string,
189
- disabled: _propTypes["default"].bool,
190
- theme: _propTypes["default"].oneOf(["dark", "light"]),
191
- suffixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
192
- prefixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
193
- suffixIconSrc: _propTypes["default"].string,
194
- prefixIconSrc: _propTypes["default"].string,
195
- onClickSuffix: _propTypes["default"].func,
196
- onClickPrefix: _propTypes["default"].func,
197
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
198
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
199
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
200
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
201
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
202
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
203
- };
204
- var _default = DxcChip;
205
- exports["default"] = _default;
@@ -1,81 +0,0 @@
1
-
2
- @font-face {
3
- font-family: 'Open Sans';
4
- src: url('./fonts/OpenSans-Light.ttf')
5
- format('truetype');
6
- font-style: normal;
7
- font-weight: 200;
8
- }
9
-
10
- @font-face {
11
- font-family: 'Open Sans';
12
- src: url('./fonts/OpenSans-Regular.ttf')
13
- format('truetype');
14
- font-style: normal;
15
- font-weight: 400;
16
- }
17
-
18
- @font-face {
19
- font-family: 'Open Sans';
20
- src: url('./fonts/OpenSans-SemiBold.ttf')
21
- format('truetype');
22
- font-style: normal;
23
- font-weight: 600;
24
- }
25
-
26
- @font-face {
27
- font-family: 'Open Sans';
28
- src: url('./fonts/OpenSans-Bold.ttf')
29
- format('truetype');
30
- font-style: normal;
31
- font-weight: 700;
32
- }
33
-
34
- @font-face {
35
- font-family: 'Open Sans';
36
- src: url('./fonts/OpenSans-ExtraBold.ttf')
37
- format('truetype');
38
- font-style: normal;
39
- font-weight: 800;
40
- }
41
-
42
- @font-face {
43
- font-family: 'Open Sans';
44
- src: url('./fonts/OpenSans-LightItalic.ttf')
45
- format('truetype');
46
- font-style: italic;
47
- font-weight: 200;
48
- }
49
-
50
- @font-face {
51
- font-family: 'Open Sans';
52
- src: url('./fonts/OpenSans-Italic.ttf')
53
- format('truetype');
54
- font-style: italic;
55
- font-weight: 400;
56
- }
57
-
58
- @font-face {
59
- font-family: 'Open Sans';
60
- src: url('./fonts/OpenSans-SemiBoldItalic.ttf')
61
- format('truetype');
62
- font-style: italic;
63
- font-weight: 600;
64
- }
65
-
66
- @font-face {
67
- font-family: 'Open Sans';
68
- src: url('./fonts/OpenSans-BoldItalic.ttf')
69
- format('truetype');
70
- font-style: italic;
71
- font-weight: 700;
72
- }
73
-
74
- @font-face {
75
- font-family: 'Open Sans';
76
- src: url('./fonts/OpenSans-ExtraBoldItalic.ttf')
77
- format('truetype');
78
- font-style: italic;
79
- font-weight: 800;
80
- }
81
-
@@ -1,40 +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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
15
-
16
- var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
- function _templateObject() {
19
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: #d0011b;\n margin-right: 1px;\n cursor: default;\n"]);
20
-
21
- _templateObject = function _templateObject() {
22
- return data;
23
- };
24
-
25
- return data;
26
- }
27
-
28
- var DxcRequired = function DxcRequired(_ref) {
29
- var _ref$theme = _ref.theme,
30
- theme = _ref$theme === void 0 ? "light" : _ref$theme;
31
- return _react["default"].createElement(RequiredSpan, null, "*");
32
- };
33
-
34
- var RequiredSpan = _styledComponents["default"].span(_templateObject());
35
-
36
- DxcRequired.propTypes = {
37
- theme: _propTypes["default"].oneOf(["dark", "light"])
38
- };
39
- var _default = DxcRequired;
40
- exports["default"] = _default;
Binary file
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = testFunction;
7
-
8
- function testFunction(num1, num2) {
9
- return num1 + num2;
10
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _exampleService = _interopRequireDefault(require("./example-service"));
6
-
7
- describe("warnings array creation", function () {
8
- it("Function sums values", function () {
9
- var result = (0, _exampleService["default"])(2, 3);
10
- expect(result).toEqual(5);
11
- });
12
- });
@@ -1,42 +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.getCustomTheme = exports.getMargin = void 0;
9
-
10
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
11
-
12
- var _variables = require("./variables.js");
13
-
14
- var getMargin = function getMargin(marginProp, side) {
15
- if (marginProp && (0, _typeof2["default"])(marginProp) === "object") {
16
- return marginProp[side] && _variables.spaces[marginProp[side]] || "0px";
17
- } else {
18
- return marginProp && _variables.spaces[marginProp] || "0px";
19
- }
20
- };
21
-
22
- exports.getMargin = getMargin;
23
-
24
- var getCustomTheme = function getCustomTheme(defaultTheme, customTheme) {
25
- var newTheme = JSON.parse(JSON.stringify(defaultTheme));
26
-
27
- if (customTheme) {
28
- Object.keys(newTheme).map(function (component) {
29
- if (customTheme[component]) {
30
- Object.keys(newTheme[component]).map(function (objectKey) {
31
- if (customTheme[component][objectKey]) {
32
- newTheme[component][objectKey] = customTheme[component][objectKey];
33
- }
34
- });
35
- }
36
- });
37
- }
38
-
39
- return newTheme;
40
- };
41
-
42
- exports.getCustomTheme = getCustomTheme;