@dxc-technology/halstack-react 0.0.0-e792e0c → 0.0.0-e7da1f7

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 (185) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +6536 -0
  3. package/dist/index.d.ts +6536 -0
  4. package/dist/index.js +13461 -0
  5. package/dist/index.mjs +13404 -0
  6. package/package.json +76 -60
  7. package/babel.config.js +0 -4
  8. package/dist/ThemeContext.js +0 -15
  9. package/dist/accordion/Accordion.js +0 -264
  10. package/dist/accordion/Accordion.stories.js +0 -207
  11. package/dist/accordion/readme.md +0 -96
  12. package/dist/alert/Alert.js +0 -302
  13. package/dist/alert/Alert.stories.js +0 -158
  14. package/dist/alert/close.svg +0 -4
  15. package/dist/alert/error.svg +0 -4
  16. package/dist/alert/info.svg +0 -4
  17. package/dist/alert/readme.md +0 -43
  18. package/dist/alert/success.svg +0 -4
  19. package/dist/alert/warning.svg +0 -4
  20. package/dist/box/Box.js +0 -148
  21. package/dist/button/Button.js +0 -183
  22. package/dist/button/Button.stories.js +0 -224
  23. package/dist/button/readme.md +0 -93
  24. package/dist/card/Card.js +0 -217
  25. package/dist/checkbox/Checkbox.js +0 -224
  26. package/dist/checkbox/Checkbox.stories.js +0 -144
  27. package/dist/checkbox/readme.md +0 -116
  28. package/dist/chip/Chip.js +0 -171
  29. package/dist/common/OpenSans.css +0 -81
  30. package/dist/common/RequiredComponent.js +0 -46
  31. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  32. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  33. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  34. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  35. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  36. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  37. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  38. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  39. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  40. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  41. package/dist/common/services/example-service.js +0 -10
  42. package/dist/common/services/example-service.test.js +0 -12
  43. package/dist/common/utils.js +0 -42
  44. package/dist/common/variables.js +0 -307
  45. package/dist/date/Date.js +0 -357
  46. package/dist/date/Date.stories.js +0 -205
  47. package/dist/date/calendar.svg +0 -1
  48. package/dist/date/calendar_dark.svg +0 -1
  49. package/dist/date/readme.md +0 -73
  50. package/dist/dialog/Dialog.js +0 -197
  51. package/dist/dialog/Dialog.stories.js +0 -217
  52. package/dist/dialog/readme.md +0 -32
  53. package/dist/dropdown/Dropdown.js +0 -412
  54. package/dist/dropdown/Dropdown.stories.js +0 -249
  55. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  56. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  57. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  58. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  59. package/dist/dropdown/readme.md +0 -69
  60. package/dist/footer/Footer.js +0 -346
  61. package/dist/footer/Footer.stories.js +0 -94
  62. package/dist/footer/dxc_logo_wht.png +0 -0
  63. package/dist/footer/readme.md +0 -41
  64. package/dist/header/Header.js +0 -354
  65. package/dist/header/Header.stories.js +0 -176
  66. package/dist/header/close_icon.svg +0 -1
  67. package/dist/header/dxc_logo_black.png +0 -0
  68. package/dist/header/dxc_logo_white.png +0 -0
  69. package/dist/header/hamb_menu_black.svg +0 -1
  70. package/dist/header/hamb_menu_white.svg +0 -1
  71. package/dist/header/readme.md +0 -33
  72. package/dist/heading/Heading.js +0 -159
  73. package/dist/input-text/InputText.js +0 -519
  74. package/dist/input-text/InputText.stories.js +0 -209
  75. package/dist/input-text/error.svg +0 -1
  76. package/dist/input-text/readme.md +0 -91
  77. package/dist/link/Link.js +0 -136
  78. package/dist/link/readme.md +0 -51
  79. package/dist/main.js +0 -263
  80. package/dist/paginator/Paginator.js +0 -178
  81. package/dist/paginator/images/next.svg +0 -3
  82. package/dist/paginator/images/nextPage.svg +0 -3
  83. package/dist/paginator/images/previous.svg +0 -3
  84. package/dist/paginator/images/previousPage.svg +0 -3
  85. package/dist/paginator/readme.md +0 -50
  86. package/dist/progress-bar/ProgressBar.js +0 -189
  87. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  88. package/dist/progress-bar/readme.md +0 -63
  89. package/dist/radio/Radio.js +0 -191
  90. package/dist/radio/Radio.stories.js +0 -166
  91. package/dist/radio/readme.md +0 -70
  92. package/dist/resultsetTable/ResultsetTable.js +0 -334
  93. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  94. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  95. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  96. package/dist/select/Select.js +0 -442
  97. package/dist/select/Select.stories.js +0 -235
  98. package/dist/select/readme.md +0 -72
  99. package/dist/sidenav/Sidenav.js +0 -237
  100. package/dist/sidenav/arrow_icon.svg +0 -3
  101. package/dist/slider/Slider.js +0 -258
  102. package/dist/slider/Slider.stories.js +0 -241
  103. package/dist/slider/readme.md +0 -64
  104. package/dist/spinner/Spinner.js +0 -196
  105. package/dist/spinner/Spinner.stories.js +0 -183
  106. package/dist/spinner/readme.md +0 -65
  107. package/dist/switch/Switch.js +0 -197
  108. package/dist/switch/Switch.stories.js +0 -134
  109. package/dist/switch/readme.md +0 -133
  110. package/dist/table/Table.js +0 -84
  111. package/dist/tabs/Tabs.js +0 -170
  112. package/dist/tabs/Tabs.stories.js +0 -130
  113. package/dist/tabs/readme.md +0 -78
  114. package/dist/tabs-for-sections/TabsForSections.js +0 -107
  115. package/dist/tabs-for-sections/readme.md +0 -78
  116. package/dist/tag/Tag.js +0 -217
  117. package/dist/textarea/Textarea.js +0 -226
  118. package/dist/toggle/Toggle.js +0 -223
  119. package/dist/toggle/Toggle.stories.js +0 -297
  120. package/dist/toggle/readme.md +0 -80
  121. package/dist/upload/Upload.js +0 -200
  122. package/dist/upload/Upload.stories.js +0 -72
  123. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -125
  124. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  125. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  126. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -282
  127. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  128. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  129. package/dist/upload/file-upload/FileToUpload.js +0 -158
  130. package/dist/upload/file-upload/audio-icon.svg +0 -4
  131. package/dist/upload/file-upload/close.svg +0 -4
  132. package/dist/upload/file-upload/file-icon.svg +0 -4
  133. package/dist/upload/file-upload/video-icon.svg +0 -4
  134. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  135. package/dist/upload/readme.md +0 -37
  136. package/dist/upload/transaction/Transaction.js +0 -155
  137. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  138. package/dist/upload/transaction/audio-icon.svg +0 -4
  139. package/dist/upload/transaction/error-icon.svg +0 -4
  140. package/dist/upload/transaction/file-icon-err.svg +0 -4
  141. package/dist/upload/transaction/file-icon.svg +0 -4
  142. package/dist/upload/transaction/image-icon-err.svg +0 -4
  143. package/dist/upload/transaction/image-icon.svg +0 -4
  144. package/dist/upload/transaction/success-icon.svg +0 -4
  145. package/dist/upload/transaction/video-icon-err.svg +0 -4
  146. package/dist/upload/transaction/video-icon.svg +0 -4
  147. package/dist/upload/transactions/Transactions.js +0 -120
  148. package/dist/wizard/Wizard.js +0 -320
  149. package/dist/wizard/invalid_icon.svg +0 -6
  150. package/dist/wizard/valid_icon.svg +0 -6
  151. package/dist/wizard/validation-wrong.svg +0 -6
  152. package/test/Accordion.test.js +0 -33
  153. package/test/Alert.test.js +0 -53
  154. package/test/Box.test.js +0 -10
  155. package/test/Button.test.js +0 -18
  156. package/test/Card.test.js +0 -30
  157. package/test/Checkbox.test.js +0 -45
  158. package/test/Chip.test.js +0 -25
  159. package/test/Date.test.js +0 -393
  160. package/test/Dialog.test.js +0 -23
  161. package/test/Dropdown.test.js +0 -130
  162. package/test/Footer.test.js +0 -99
  163. package/test/Header.test.js +0 -39
  164. package/test/Heading.test.js +0 -35
  165. package/test/InputText.test.js +0 -236
  166. package/test/Link.test.js +0 -25
  167. package/test/Paginator.test.js +0 -165
  168. package/test/ProgressBar.test.js +0 -35
  169. package/test/Radio.test.js +0 -37
  170. package/test/ResultsetTable.test.js +0 -282
  171. package/test/Select.test.js +0 -191
  172. package/test/Sidenav.test.js +0 -87
  173. package/test/Slider.test.js +0 -65
  174. package/test/Spinner.test.js +0 -27
  175. package/test/Switch.test.js +0 -45
  176. package/test/Table.test.js +0 -36
  177. package/test/Tabs.test.js +0 -88
  178. package/test/TabsForSections.test.js +0 -34
  179. package/test/Tag.test.js +0 -32
  180. package/test/TextArea.test.js +0 -52
  181. package/test/Toggle.test.js +0 -43
  182. package/test/Upload.test.js +0 -60
  183. package/test/Wizard.test.js +0 -130
  184. package/test/mocks/pngMock.js +0 -1
  185. 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,171 +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 = _interopRequireWildcard(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 _ThemeContext = _interopRequireDefault(require("../ThemeContext.js"));
27
-
28
- require("../common/OpenSans.css");
29
-
30
- var _utils = require("../common/utils.js");
31
-
32
- function _templateObject4() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n cursor: ", ";\n padding-right: ", ";\n"]);
34
-
35
- _templateObject4 = function _templateObject4() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- function _templateObject3() {
43
- var data = (0, _taggedTemplateLiteral2["default"])(["\n cursor: ", ";\n padding-left: ", ";\n"]);
44
-
45
- _templateObject3 = function _templateObject3() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject2() {
53
- 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"]);
54
-
55
- _templateObject2 = function _templateObject2() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
61
-
62
- function _templateObject() {
63
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 22px;\n display: inline-flex;\n align-items: center;\n border-radius: 50px;\n margin: 2px;\n max-width: ", ";\n\n ", ";\n\n padding: 10px 20px;\n cursor: ", ";\n opacity: ", ";\n background: ", ";\n\nmargin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
64
-
65
- _templateObject = function _templateObject() {
66
- return data;
67
- };
68
-
69
- return data;
70
- }
71
-
72
- var DxcChip = function DxcChip(_ref) {
73
- var label = _ref.label,
74
- suffixIconSrc = _ref.suffixIconSrc,
75
- onClickSuffix = _ref.onClickSuffix,
76
- prefixIconSrc = _ref.prefixIconSrc,
77
- onClickPrefix = _ref.onClickPrefix,
78
- disabled = _ref.disabled,
79
- margin = _ref.margin;
80
- var customTheme = (0, _react.useContext)(_ThemeContext["default"]);
81
- var colorsTheme = (0, _react.useMemo)(function () {
82
- return (0, _utils.getCustomTheme)(_variables.theme, (0, _utils.getCustomTheme)(_variables.defaultTheme, customTheme));
83
- }, [customTheme]);
84
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
85
- theme: colorsTheme.chip
86
- }, _react["default"].createElement(StyledDxcChip, {
87
- disabled: disabled,
88
- margin: margin
89
- }, prefixIconSrc && _react["default"].createElement(PrefixIconContainer, {
90
- disabled: disabled,
91
- src: prefixIconSrc,
92
- label: label,
93
- onClick: function onClick() {
94
- return onClickPrefix && !disabled && onClickPrefix(label);
95
- }
96
- }), label && _react["default"].createElement(ChipTextContainer, {
97
- disabled: disabled,
98
- prefixIconSrc: prefixIconSrc,
99
- suffixIconSrc: suffixIconSrc
100
- }, label), suffixIconSrc && _react["default"].createElement(SuffixIconContainer, {
101
- disabled: disabled,
102
- src: suffixIconSrc,
103
- label: label,
104
- onClick: function onClick() {
105
- return onClickSuffix && !disabled && onClickSuffix(label);
106
- }
107
- })));
108
- };
109
-
110
- var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function (_ref2) {
111
- var margin = _ref2.margin;
112
- return "calc(100% - 40px - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
113
- }, function (props) {
114
- return props.theme.outlinedColor !== "" ? "border: 1px solid ".concat(props.theme.outlinedColor) : "";
115
- }, function (_ref3) {
116
- var disabled = _ref3.disabled;
117
- return disabled && "not-allowed";
118
- }, function (props) {
119
- return props.disabled && props.theme.disabled || "initial";
120
- }, function (props) {
121
- return props.theme.backgroundColor;
122
- }, function (props) {
123
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
124
- }, function (props) {
125
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
126
- }, function (props) {
127
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
128
- }, function (props) {
129
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
130
- }, function (props) {
131
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
132
- });
133
-
134
- var ChipTextContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
135
- return props.theme.fontColor;
136
- }, function (_ref4) {
137
- var disabled = _ref4.disabled;
138
- return disabled && "not-allowed" || "default";
139
- });
140
-
141
- var SuffixIconContainer = _styledComponents["default"].img(_templateObject3(), function (_ref5) {
142
- var disabled = _ref5.disabled;
143
- return disabled && "not-allowed" || "pointer";
144
- }, function (props) {
145
- return (props.label || props.suffixIconSrc) && "10px" || props.prefixIconSrc && "5px";
146
- });
147
-
148
- var PrefixIconContainer = _styledComponents["default"].img(_templateObject4(), function (_ref6) {
149
- var disabled = _ref6.disabled;
150
- return disabled && "not-allowed" || "pointer";
151
- }, function (props) {
152
- return (props.label || props.suffixIconSrc) && "10px" || props.prefixIconSrc && "5px";
153
- });
154
-
155
- DxcChip.propTypes = {
156
- label: _propTypes["default"].string,
157
- disabled: _propTypes["default"].bool,
158
- theme: _propTypes["default"].oneOf(["dark", "light"]),
159
- suffixIconSrc: _propTypes["default"].string,
160
- prefixIconSrc: _propTypes["default"].string,
161
- onClickSuffix: _propTypes["default"].func,
162
- onClickPrefix: _propTypes["default"].func,
163
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
164
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
165
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
166
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
167
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
168
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
169
- };
170
- var _default = DxcChip;
171
- 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,46 +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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _react = _interopRequireWildcard(require("react"));
15
-
16
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
17
-
18
- var _propTypes = _interopRequireDefault(require("prop-types"));
19
-
20
- var _variables = require("./variables.js");
21
-
22
- var _ThemeContext = _interopRequireDefault(require("../ThemeContext.js"));
23
-
24
- function _templateObject() {
25
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: #d0011b;\n margin-right: 1px;\n cursor: default;\n"]);
26
-
27
- _templateObject = function _templateObject() {
28
- return data;
29
- };
30
-
31
- return data;
32
- }
33
-
34
- var DxcRequired = function DxcRequired(_ref) {
35
- var _ref$theme = _ref.theme,
36
- theme = _ref$theme === void 0 ? "light" : _ref$theme;
37
- return _react["default"].createElement(RequiredSpan, null, "*");
38
- };
39
-
40
- var RequiredSpan = _styledComponents["default"].span(_templateObject());
41
-
42
- DxcRequired.propTypes = {
43
- theme: _propTypes["default"].oneOf(["dark", "light"])
44
- };
45
- var _default = DxcRequired;
46
- 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 = 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;