@dxc-technology/halstack-react 0.0.0-ebb089f → 0.0.0-ebe476f

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 (168) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +6683 -0
  3. package/dist/index.d.ts +6683 -0
  4. package/dist/index.js +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/package.json +77 -71
  7. package/babel.config.js +0 -7
  8. package/dist/BackgroundColorContext.js +0 -46
  9. package/dist/ThemeContext.js +0 -250
  10. package/dist/V3Select/V3Select.js +0 -549
  11. package/dist/V3Select/index.d.ts +0 -27
  12. package/dist/V3Textarea/V3Textarea.js +0 -264
  13. package/dist/V3Textarea/index.d.ts +0 -27
  14. package/dist/accordion/Accordion.js +0 -353
  15. package/dist/accordion/index.d.ts +0 -28
  16. package/dist/accordion-group/AccordionGroup.js +0 -186
  17. package/dist/accordion-group/index.d.ts +0 -16
  18. package/dist/alert/Alert.js +0 -403
  19. package/dist/alert/index.d.ts +0 -51
  20. package/dist/badge/Badge.js +0 -63
  21. package/dist/box/Box.js +0 -156
  22. package/dist/box/index.d.ts +0 -25
  23. package/dist/button/Button.js +0 -238
  24. package/dist/button/Button.stories.js +0 -27
  25. package/dist/button/index.d.ts +0 -24
  26. package/dist/card/Card.js +0 -254
  27. package/dist/card/index.d.ts +0 -22
  28. package/dist/checkbox/Checkbox.js +0 -299
  29. package/dist/checkbox/index.d.ts +0 -24
  30. package/dist/chip/Chip.js +0 -265
  31. package/dist/chip/index.d.ts +0 -22
  32. package/dist/common/OpenSans.css +0 -81
  33. package/dist/common/RequiredComponent.js +0 -40
  34. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  35. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  36. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  37. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  38. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  39. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  40. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  41. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  42. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  43. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  44. package/dist/common/utils.js +0 -22
  45. package/dist/common/variables.js +0 -1574
  46. package/dist/date/Date.js +0 -379
  47. package/dist/date/index.d.ts +0 -27
  48. package/dist/date-input/DateInput.js +0 -400
  49. package/dist/date-input/index.d.ts +0 -95
  50. package/dist/dialog/Dialog.js +0 -218
  51. package/dist/dialog/index.d.ts +0 -18
  52. package/dist/dropdown/Dropdown.js +0 -544
  53. package/dist/dropdown/index.d.ts +0 -26
  54. package/dist/file-input/FileInput.js +0 -644
  55. package/dist/file-input/FileItem.js +0 -287
  56. package/dist/file-input/index.d.ts +0 -81
  57. package/dist/footer/Footer.js +0 -421
  58. package/dist/footer/Icons.js +0 -77
  59. package/dist/footer/index.d.ts +0 -25
  60. package/dist/header/Header.js +0 -470
  61. package/dist/header/Icons.js +0 -59
  62. package/dist/header/index.d.ts +0 -25
  63. package/dist/heading/Heading.js +0 -230
  64. package/dist/heading/index.d.ts +0 -17
  65. package/dist/input-text/Icons.js +0 -22
  66. package/dist/input-text/InputText.js +0 -705
  67. package/dist/input-text/index.d.ts +0 -36
  68. package/dist/layout/ApplicationLayout.js +0 -327
  69. package/dist/layout/Icons.js +0 -55
  70. package/dist/link/Link.js +0 -237
  71. package/dist/link/index.d.ts +0 -23
  72. package/dist/main.d.ts +0 -40
  73. package/dist/main.js +0 -359
  74. package/dist/number-input/NumberInput.js +0 -136
  75. package/dist/number-input/NumberInputContext.js +0 -16
  76. package/dist/number-input/index.d.ts +0 -113
  77. package/dist/paginator/Icons.js +0 -66
  78. package/dist/paginator/Paginator.js +0 -305
  79. package/dist/paginator/index.d.ts +0 -20
  80. package/dist/password-input/PasswordInput.js +0 -203
  81. package/dist/password-input/index.d.ts +0 -94
  82. package/dist/progress-bar/ProgressBar.js +0 -242
  83. package/dist/progress-bar/index.d.ts +0 -18
  84. package/dist/radio/Radio.js +0 -209
  85. package/dist/radio/index.d.ts +0 -23
  86. package/dist/resultsetTable/ResultsetTable.js +0 -358
  87. package/dist/resultsetTable/index.d.ts +0 -19
  88. package/dist/select/Select.js +0 -1137
  89. package/dist/select/index.d.ts +0 -131
  90. package/dist/sidenav/Sidenav.js +0 -179
  91. package/dist/sidenav/index.d.ts +0 -13
  92. package/dist/slider/Slider.js +0 -404
  93. package/dist/slider/index.d.ts +0 -29
  94. package/dist/spinner/Spinner.js +0 -381
  95. package/dist/spinner/index.d.ts +0 -17
  96. package/dist/switch/Switch.js +0 -222
  97. package/dist/switch/index.d.ts +0 -24
  98. package/dist/table/Table.js +0 -132
  99. package/dist/table/index.d.ts +0 -13
  100. package/dist/tabs/Tabs.js +0 -343
  101. package/dist/tabs/index.d.ts +0 -19
  102. package/dist/tag/Tag.js +0 -282
  103. package/dist/tag/index.d.ts +0 -24
  104. package/dist/text-input/TextInput.js +0 -974
  105. package/dist/text-input/index.d.ts +0 -135
  106. package/dist/textarea/Textarea.js +0 -369
  107. package/dist/textarea/index.d.ts +0 -117
  108. package/dist/toggle/Toggle.js +0 -220
  109. package/dist/toggle/index.d.ts +0 -21
  110. package/dist/toggle-group/ToggleGroup.js +0 -327
  111. package/dist/toggle-group/index.d.ts +0 -21
  112. package/dist/upload/Upload.js +0 -205
  113. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  114. package/dist/upload/buttons-upload/Icons.js +0 -40
  115. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  116. package/dist/upload/dragAndDropArea/Icons.js +0 -39
  117. package/dist/upload/file-upload/FileToUpload.js +0 -189
  118. package/dist/upload/file-upload/Icons.js +0 -66
  119. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  120. package/dist/upload/index.d.ts +0 -15
  121. package/dist/upload/transaction/Icons.js +0 -160
  122. package/dist/upload/transaction/Transaction.js +0 -148
  123. package/dist/upload/transactions/Transactions.js +0 -138
  124. package/dist/useTheme.js +0 -22
  125. package/dist/wizard/Icons.js +0 -65
  126. package/dist/wizard/Wizard.js +0 -405
  127. package/dist/wizard/index.d.ts +0 -18
  128. package/test/Accordion.test.js +0 -33
  129. package/test/AccordionGroup.test.js +0 -125
  130. package/test/Alert.test.js +0 -53
  131. package/test/Box.test.js +0 -10
  132. package/test/Button.test.js +0 -18
  133. package/test/Card.test.js +0 -30
  134. package/test/Checkbox.test.js +0 -45
  135. package/test/Chip.test.js +0 -25
  136. package/test/Date.test.js +0 -395
  137. package/test/DateInput.test.js +0 -242
  138. package/test/Dialog.test.js +0 -23
  139. package/test/Dropdown.test.js +0 -145
  140. package/test/FileInput.test.js +0 -201
  141. package/test/Footer.test.js +0 -94
  142. package/test/Header.test.js +0 -34
  143. package/test/Heading.test.js +0 -83
  144. package/test/InputText.test.js +0 -239
  145. package/test/Link.test.js +0 -43
  146. package/test/NumberInput.test.js +0 -259
  147. package/test/Paginator.test.js +0 -181
  148. package/test/PasswordInput.test.js +0 -83
  149. package/test/ProgressBar.test.js +0 -35
  150. package/test/Radio.test.js +0 -37
  151. package/test/ResultsetTable.test.js +0 -330
  152. package/test/Select.test.js +0 -928
  153. package/test/Sidenav.test.js +0 -45
  154. package/test/Slider.test.js +0 -74
  155. package/test/Spinner.test.js +0 -32
  156. package/test/Switch.test.js +0 -45
  157. package/test/Table.test.js +0 -36
  158. package/test/Tabs.test.js +0 -109
  159. package/test/Tag.test.js +0 -32
  160. package/test/TextInput.test.js +0 -731
  161. package/test/Textarea.test.js +0 -193
  162. package/test/ToggleGroup.test.js +0 -85
  163. package/test/Upload.test.js +0 -60
  164. package/test/V3Select.test.js +0 -212
  165. package/test/V3TextArea.test.js +0 -51
  166. package/test/Wizard.test.js +0 -130
  167. package/test/mocks/pngMock.js +0 -1
  168. package/test/mocks/svgMock.js +0 -1
package/dist/chip/Chip.js DELETED
@@ -1,265 +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
- var _utils = require("../common/utils.js");
27
-
28
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
-
30
- function _templateObject5() {
31
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n ", "\n ", "\n width: ", ";\n height: ", ";\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n &:focus {\n outline-color: ", ";\n outline-width: 2px;\n ", "\n }\n"]);
32
-
33
- _templateObject5 = function _templateObject5() {
34
- return data;
35
- };
36
-
37
- return data;
38
- }
39
-
40
- function _templateObject4() {
41
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n ", "\n margin-right: ", ";\n width: ", ";\n height: ", ";\n"]);
42
-
43
- _templateObject4 = function _templateObject4() {
44
- return data;
45
- };
46
-
47
- return data;
48
- }
49
-
50
- function _templateObject3() {
51
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n ", "\n margin-left: ", ";\n width: ", ";\n height: ", ";\n"]);
52
-
53
- _templateObject3 = function _templateObject3() {
54
- return data;
55
- };
56
-
57
- return data;
58
- }
59
-
60
- function _templateObject2() {
61
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-family: ", ";\n font-weight: ", ";\n font-style: ", ";\n color: ", ";\n cursor: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"]);
62
-
63
- _templateObject2 = function _templateObject2() {
64
- return data;
65
- };
66
-
67
- return data;
68
- }
69
-
70
- function _templateObject() {
71
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n min-height: 40px;\n max-width: ", ";\n background-color: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n"]);
72
-
73
- _templateObject = function _templateObject() {
74
- return data;
75
- };
76
-
77
- return data;
78
- }
79
-
80
- var DxcChip = function DxcChip(_ref) {
81
- var label = _ref.label,
82
- suffixIcon = _ref.suffixIcon,
83
- prefixIcon = _ref.prefixIcon,
84
- suffixIconSrc = _ref.suffixIconSrc,
85
- onClickSuffix = _ref.onClickSuffix,
86
- prefixIconSrc = _ref.prefixIconSrc,
87
- onClickPrefix = _ref.onClickPrefix,
88
- disabled = _ref.disabled,
89
- margin = _ref.margin,
90
- _ref$tabIndex = _ref.tabIndex,
91
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
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
- mode: "prefix",
103
- tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
104
- onClick: function onClick() {
105
- return onClickPrefix && !disabled && onClickPrefix(label);
106
- },
107
- interactuable: typeof onClickPrefix === "function" && !disabled
108
- }, (0, _typeof2["default"])(prefixIcon) === "object" ? prefixIcon : _react["default"].createElement(prefixIcon)) : prefixIconSrc && _react["default"].createElement(PrefixIconContainer, {
109
- disabled: disabled,
110
- src: prefixIconSrc,
111
- label: label,
112
- tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
113
- onClick: function onClick() {
114
- return onClickPrefix && !disabled && onClickPrefix(label);
115
- },
116
- interactuable: typeof onClickPrefix === "function" && !disabled
117
- }), label && _react["default"].createElement(ChipTextContainer, {
118
- disabled: disabled,
119
- prefixIconSrc: prefixIconSrc,
120
- suffixIconSrc: suffixIconSrc
121
- }, label), suffixIcon ? _react["default"].createElement(IconContainer, {
122
- disabled: disabled,
123
- suffixIcon: true,
124
- mode: "suffix",
125
- label: label,
126
- tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
127
- onClick: function onClick() {
128
- return onClickSuffix && !disabled && onClickSuffix(label);
129
- },
130
- interactuable: typeof onClickSuffix === "function" && !disabled
131
- }, (0, _typeof2["default"])(suffixIcon) === "object" ? suffixIcon : _react["default"].createElement(suffixIcon)) : suffixIconSrc && _react["default"].createElement(SuffixIconContainer, {
132
- disabled: disabled,
133
- src: suffixIconSrc,
134
- label: label,
135
- tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
136
- onClick: function onClick() {
137
- return onClickSuffix && !disabled && onClickSuffix(label);
138
- },
139
- interactuable: typeof onClickSuffix === "function" && !disabled
140
- })));
141
- };
142
-
143
- var getCursor = function getCursor(interactuable, disabled) {
144
- if (disabled) {
145
- return "cursor:not-allowed;";
146
- }
147
-
148
- if (interactuable) {
149
- return "cursor:pointer;";
150
- }
151
-
152
- return "cursor:default; outline:none;";
153
- };
154
-
155
- var StyledDxcChip = _styledComponents["default"].div(_templateObject(), function (_ref2) {
156
- var margin = _ref2.margin;
157
- return "calc(100% - 40px - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
158
- }, function (props) {
159
- return props.disabled && props.theme.disabledBackgroundColor || props.theme.backgroundColor;
160
- }, function (props) {
161
- return props.theme.borderRadius;
162
- }, function (props) {
163
- return props.theme.borderThickness;
164
- }, function (props) {
165
- return props.theme.borderStyle;
166
- }, function (props) {
167
- return props.theme.borderColor;
168
- }, function (props) {
169
- return props.theme.contentPaddingTop;
170
- }, function (props) {
171
- return props.theme.contentPaddingBottom;
172
- }, function (props) {
173
- return props.theme.contentPaddingLeft;
174
- }, function (props) {
175
- return props.theme.contentPaddingRight;
176
- }, function (props) {
177
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
178
- }, function (props) {
179
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
180
- }, function (props) {
181
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
182
- }, function (props) {
183
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
184
- }, function (props) {
185
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
186
- }, function (_ref3) {
187
- var disabled = _ref3.disabled;
188
- return disabled && "not-allowed";
189
- });
190
-
191
- var ChipTextContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
192
- return props.theme.fontSize;
193
- }, function (props) {
194
- return props.theme.fontFamily;
195
- }, function (props) {
196
- return props.theme.fontWeight;
197
- }, function (props) {
198
- return props.theme.fontStyle;
199
- }, function (props) {
200
- return props.disabled ? props.theme.disabledFontColor : props.theme.fontColor;
201
- }, function (_ref4) {
202
- var disabled = _ref4.disabled;
203
- return disabled && "not-allowed" || "default";
204
- });
205
-
206
- var SuffixIconContainer = _styledComponents["default"].img(_templateObject3(), function (props) {
207
- return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
208
- }, function (props) {
209
- return getCursor(props.interactuable, props.disabled);
210
- }, function (props) {
211
- return (props.label || props.suffixIconSrc) && props.theme.iconSpacing || props.prefixIconSrc && "5px";
212
- }, function (props) {
213
- return props.theme.iconSize;
214
- }, function (props) {
215
- return props.theme.iconSize;
216
- });
217
-
218
- var PrefixIconContainer = _styledComponents["default"].img(_templateObject4(), function (props) {
219
- return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
220
- }, function (props) {
221
- return getCursor(props.interactuable, props.disabled);
222
- }, function (props) {
223
- return (props.label || props.suffixIconSrc) && props.theme.iconSpacing || props.prefixIconSrc && "5px";
224
- }, function (props) {
225
- return props.theme.iconSize;
226
- }, function (props) {
227
- return props.theme.iconSize;
228
- });
229
-
230
- var IconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
231
- return props.disabled ? props.theme.disabledIconColor : props.theme.iconColor;
232
- }, function (props) {
233
- return props.prefixIcon ? "margin-right: ".concat((props.label || props.suffixIcon || props.suffixIconSrc) && props.theme.iconSpacing || (props.prefixIcon || props.prefixIconSrc) && "0", ";") : "margin-left: ".concat((props.label || props.prefixIcon || props.prefixIconSrc) && props.theme.iconSpacing || (props.prefixIcon || props.prefixIconSrc) && "0", ";");
234
- }, function (props) {
235
- return getCursor(props.interactuable, props.disabled);
236
- }, function (props) {
237
- return props.theme.iconSize;
238
- }, function (props) {
239
- return props.theme.iconSize;
240
- }, function (props) {
241
- return props.theme.focusColor;
242
- }, function (props) {
243
- return props.disabled && "outline: none;";
244
- });
245
-
246
- DxcChip.propTypes = {
247
- label: _propTypes["default"].string,
248
- disabled: _propTypes["default"].bool,
249
- theme: _propTypes["default"].oneOf(["dark", "light"]),
250
- suffixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
251
- prefixIcon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
252
- suffixIconSrc: _propTypes["default"].string,
253
- prefixIconSrc: _propTypes["default"].string,
254
- onClickSuffix: _propTypes["default"].func,
255
- onClickPrefix: _propTypes["default"].func,
256
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
257
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
258
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
259
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
260
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
261
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
262
- tabIndex: _propTypes["default"].number
263
- };
264
- var _default = DxcChip;
265
- exports["default"] = _default;
@@ -1,22 +0,0 @@
1
- type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
2
- type Margin = {
3
- top?: Space;
4
- bottom?: Space;
5
- left?: Space;
6
- right?: Space;
7
- };
8
-
9
- type Props = {
10
- label?: string;
11
- suffixIcon?: any;
12
- preffixIcon?: any;
13
- suffixIconSrc?: string;
14
- onClickSuffix?: void;
15
- prefixIconSrc?: string;
16
- onClickPrefix?: void;
17
- disabled?: boolean;
18
- margin?: Space | Margin;
19
- tabIndex?: number;
20
- };
21
-
22
- export default function DxcChip(props: Props): JSX.Element;
@@ -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,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.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;