@dxc-technology/halstack-react 0.0.0-e628009 → 0.0.0-e690193

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 (136) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +3923 -0
  3. package/dist/index.d.ts +3923 -0
  4. package/dist/index.js +14133 -0
  5. package/dist/index.mjs +14045 -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/chip/Chip.js +0 -265
  21. package/dist/common/OpenSans.css +0 -81
  22. package/dist/common/RequiredComponent.js +0 -40
  23. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  24. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  25. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  26. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  27. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  28. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  29. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  30. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  31. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  32. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  33. package/dist/common/utils.js +0 -22
  34. package/dist/common/variables.js +0 -1569
  35. package/dist/date/Date.js +0 -379
  36. package/dist/date-input/DateInput.js +0 -400
  37. package/dist/date-input/index.d.ts +0 -95
  38. package/dist/dialog/Dialog.js +0 -218
  39. package/dist/dropdown/Dropdown.js +0 -544
  40. package/dist/file-input/FileInput.js +0 -644
  41. package/dist/file-input/FileItem.js +0 -280
  42. package/dist/file-input/index.d.ts +0 -81
  43. package/dist/footer/Footer.js +0 -421
  44. package/dist/footer/Icons.js +0 -77
  45. package/dist/header/Header.js +0 -434
  46. package/dist/header/Icons.js +0 -59
  47. package/dist/heading/Heading.js +0 -230
  48. package/dist/input-text/Icons.js +0 -22
  49. package/dist/input-text/InputText.js +0 -705
  50. package/dist/layout/ApplicationLayout.js +0 -327
  51. package/dist/layout/Icons.js +0 -55
  52. package/dist/link/Link.js +0 -237
  53. package/dist/main.d.ts +0 -8
  54. package/dist/main.js +0 -367
  55. package/dist/new-select/NewSelect.js +0 -836
  56. package/dist/new-select/index.d.ts +0 -53
  57. package/dist/number-input/NumberInput.js +0 -136
  58. package/dist/number-input/NumberInputContext.js +0 -16
  59. package/dist/number-input/index.d.ts +0 -113
  60. package/dist/paginator/Icons.js +0 -66
  61. package/dist/paginator/Paginator.js +0 -283
  62. package/dist/password-input/PasswordInput.js +0 -198
  63. package/dist/password-input/index.d.ts +0 -94
  64. package/dist/progress-bar/ProgressBar.js +0 -242
  65. package/dist/radio/Radio.js +0 -209
  66. package/dist/resultsetTable/ResultsetTable.js +0 -358
  67. package/dist/select/Select.js +0 -549
  68. package/dist/sidenav/Sidenav.js +0 -179
  69. package/dist/slider/Slider.js +0 -404
  70. package/dist/spinner/Spinner.js +0 -381
  71. package/dist/switch/Switch.js +0 -222
  72. package/dist/table/Table.js +0 -132
  73. package/dist/tabs/Tabs.js +0 -343
  74. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  75. package/dist/tag/Tag.js +0 -282
  76. package/dist/text-input/TextInput.js +0 -971
  77. package/dist/text-input/index.d.ts +0 -135
  78. package/dist/textarea/Textarea.js +0 -369
  79. package/dist/textarea/index.d.ts +0 -117
  80. package/dist/toggle/Toggle.js +0 -220
  81. package/dist/toggle-group/ToggleGroup.js +0 -327
  82. package/dist/upload/Upload.js +0 -205
  83. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  84. package/dist/upload/buttons-upload/Icons.js +0 -40
  85. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  86. package/dist/upload/dragAndDropArea/Icons.js +0 -39
  87. package/dist/upload/file-upload/FileToUpload.js +0 -189
  88. package/dist/upload/file-upload/Icons.js +0 -66
  89. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  90. package/dist/upload/transaction/Icons.js +0 -160
  91. package/dist/upload/transaction/Transaction.js +0 -148
  92. package/dist/upload/transactions/Transactions.js +0 -138
  93. package/dist/useTheme.js +0 -22
  94. package/dist/wizard/Icons.js +0 -65
  95. package/dist/wizard/Wizard.js +0 -405
  96. package/test/Accordion.test.js +0 -33
  97. package/test/AccordionGroup.test.js +0 -125
  98. package/test/Alert.test.js +0 -53
  99. package/test/Box.test.js +0 -10
  100. package/test/Button.test.js +0 -18
  101. package/test/Card.test.js +0 -30
  102. package/test/Checkbox.test.js +0 -45
  103. package/test/Chip.test.js +0 -25
  104. package/test/Date.test.js +0 -397
  105. package/test/DateInput.test.js +0 -242
  106. package/test/Dialog.test.js +0 -23
  107. package/test/Dropdown.test.js +0 -145
  108. package/test/FileInput.test.js +0 -201
  109. package/test/Footer.test.js +0 -94
  110. package/test/Header.test.js +0 -34
  111. package/test/Heading.test.js +0 -83
  112. package/test/InputText.test.js +0 -248
  113. package/test/Link.test.js +0 -43
  114. package/test/NumberInput.test.js +0 -259
  115. package/test/Paginator.test.js +0 -177
  116. package/test/PasswordInput.test.js +0 -83
  117. package/test/ProgressBar.test.js +0 -35
  118. package/test/Radio.test.js +0 -37
  119. package/test/ResultsetTable.test.js +0 -329
  120. package/test/Select.test.js +0 -212
  121. package/test/Sidenav.test.js +0 -45
  122. package/test/Slider.test.js +0 -74
  123. package/test/Spinner.test.js +0 -32
  124. package/test/Switch.test.js +0 -45
  125. package/test/Table.test.js +0 -36
  126. package/test/Tabs.test.js +0 -109
  127. package/test/TabsForSections.test.js +0 -34
  128. package/test/Tag.test.js +0 -32
  129. package/test/TextInput.test.js +0 -732
  130. package/test/Textarea.test.js +0 -193
  131. package/test/ToggleGroup.test.js +0 -85
  132. package/test/Upload.test.js +0 -60
  133. package/test/V3TextArea.test.js +0 -51
  134. package/test/Wizard.test.js +0 -130
  135. package/test/mocks/pngMock.js +0 -1
  136. 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,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;