@codacy/ui-components 0.64.15 → 0.64.17

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 (224) hide show
  1. package/lib/Avatar/Avatar.js +25 -19
  2. package/lib/Avatar/Avatar.types.js +5 -1
  3. package/lib/Avatar/gravatar.js +17 -13
  4. package/lib/Avatar/index.js +16 -1
  5. package/lib/Banner/Banner.js +45 -32
  6. package/lib/Banner/Banner.styles.d.ts +11 -12
  7. package/lib/Banner/Banner.styles.js +26 -15
  8. package/lib/Banner/Banner.types.js +5 -1
  9. package/lib/Banner/index.js +27 -2
  10. package/lib/Button/Button.js +54 -51
  11. package/lib/Button/index.js +27 -2
  12. package/lib/Button/styles.d.ts +16 -12
  13. package/lib/Button/styles.js +58 -44
  14. package/lib/Button/types.js +5 -1
  15. package/lib/Checkbox/Checkbox.js +63 -54
  16. package/lib/Checkbox/CheckboxFilterList.js +46 -32
  17. package/lib/Checkbox/index.js +38 -3
  18. package/lib/Checkbox/styles.d.ts +25 -22
  19. package/lib/Checkbox/styles.js +52 -37
  20. package/lib/Checkbox/types.js +5 -1
  21. package/lib/CloseButton/index.js +27 -16
  22. package/lib/Divider/Divider.js +23 -13
  23. package/lib/Divider/Divider.styles.d.ts +16 -19
  24. package/lib/Divider/Divider.styles.js +24 -11
  25. package/lib/Divider/Divider.types.js +5 -1
  26. package/lib/Divider/index.js +16 -1
  27. package/lib/Dropdown/Content/DropdownInput.js +20 -8
  28. package/lib/Dropdown/Content/DropdownItem.js +29 -21
  29. package/lib/Dropdown/Content/DropdownSeparator.js +19 -7
  30. package/lib/Dropdown/Content/index.js +38 -3
  31. package/lib/Dropdown/Dropdown.js +89 -85
  32. package/lib/Dropdown/Dropdown.styles.d.ts +37 -34
  33. package/lib/Dropdown/Dropdown.styles.js +62 -43
  34. package/lib/Dropdown/Dropdown.types.js +5 -1
  35. package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +30 -20
  36. package/lib/Dropdown/Triggers/DropdownLinkTrigger.js +29 -19
  37. package/lib/Dropdown/Triggers/InputTrigger.js +18 -10
  38. package/lib/Dropdown/Triggers/SelectTrigger.js +19 -12
  39. package/lib/Dropdown/Triggers/hooks.js +18 -14
  40. package/lib/Dropdown/Triggers/index.js +60 -5
  41. package/lib/Dropdown/Triggers/types.js +5 -1
  42. package/lib/Dropdown/index.js +49 -4
  43. package/lib/Flexbox/Flexbox.d.ts +31 -17
  44. package/lib/Flexbox/Flexbox.js +36 -16
  45. package/lib/Flexbox/index.js +16 -1
  46. package/lib/Group/Group.js +17 -8
  47. package/lib/Group/Group.styles.d.ts +8 -10
  48. package/lib/Group/Group.styles.js +17 -7
  49. package/lib/Group/Group.types.js +5 -1
  50. package/lib/Group/index.js +16 -1
  51. package/lib/Icon/Icon.js +24 -14
  52. package/lib/Icon/Icon.styles.d.ts +9 -11
  53. package/lib/Icon/Icon.styles.js +39 -44
  54. package/lib/Icon/Icon.types.js +5 -1
  55. package/lib/Icon/index.js +16 -1
  56. package/lib/IconAndText/IconAndText.js +33 -21
  57. package/lib/IconAndText/IconAndText.styles.d.ts +8 -10
  58. package/lib/IconAndText/IconAndText.styles.js +20 -10
  59. package/lib/IconAndText/IconAndText.types.js +5 -1
  60. package/lib/IconAndText/index.js +16 -1
  61. package/lib/Icons/Chevrons.js +53 -41
  62. package/lib/Icons/CodacyIcon.js +17 -8
  63. package/lib/Icons/Messages.js +54 -35
  64. package/lib/Icons/Search.js +16 -7
  65. package/lib/Icons/Severities.js +117 -106
  66. package/lib/Icons/Sorting.js +23 -13
  67. package/lib/Icons/Spinner.js +19 -10
  68. package/lib/Icons/Symbols.js +73 -58
  69. package/lib/Icons/index.js +93 -8
  70. package/lib/Img/Img.js +44 -37
  71. package/lib/Img/Img.styles.d.ts +12 -11
  72. package/lib/Img/Img.styles.js +37 -32
  73. package/lib/Img/Img.types.js +5 -1
  74. package/lib/Img/index.js +16 -1
  75. package/lib/InlineMessage/InlineMessage.js +47 -34
  76. package/lib/InlineMessage/index.js +16 -1
  77. package/lib/InlineMessage/types.js +5 -1
  78. package/lib/Input/Input.js +148 -126
  79. package/lib/Input/hooks.js +149 -178
  80. package/lib/Input/index.js +27 -2
  81. package/lib/Input/styles.d.ts +55 -104
  82. package/lib/Input/styles.js +85 -54
  83. package/lib/Input/types.js +5 -1
  84. package/lib/Labeled/Labeled.js +34 -22
  85. package/lib/Labeled/index.js +16 -1
  86. package/lib/Labeled/styles.d.ts +16 -12
  87. package/lib/Labeled/styles.js +27 -11
  88. package/lib/Labeled/types.js +5 -1
  89. package/lib/LeftMenu/LeftMenu.js +20 -11
  90. package/lib/LeftMenu/LeftMenu.styles.d.ts +8 -10
  91. package/lib/LeftMenu/LeftMenu.styles.js +20 -10
  92. package/lib/LeftMenu/LeftMenu.types.js +5 -1
  93. package/lib/LeftMenu/index.js +16 -1
  94. package/lib/Link/Link.js +43 -33
  95. package/lib/Link/Link.styles.d.ts +4 -1
  96. package/lib/Link/Link.styles.js +21 -11
  97. package/lib/Link/Link.types.js +5 -1
  98. package/lib/Link/index.js +38 -3
  99. package/lib/Message/Message.js +32 -24
  100. package/lib/Message/Message.styles.d.ts +8 -10
  101. package/lib/Message/Message.styles.js +17 -7
  102. package/lib/Message/Message.types.js +5 -1
  103. package/lib/Message/index.js +16 -1
  104. package/lib/Modal/ConfirmationModal.js +65 -39
  105. package/lib/Modal/Modal.js +120 -107
  106. package/lib/Modal/index.js +27 -2
  107. package/lib/Modal/styles.d.ts +44 -61
  108. package/lib/Modal/styles.js +97 -85
  109. package/lib/Modal/types.d.ts +1 -0
  110. package/lib/Modal/types.js +5 -1
  111. package/lib/MoreInfo/MoreInfo.js +45 -39
  112. package/lib/MoreInfo/index.js +16 -1
  113. package/lib/MoreInfo/types.js +5 -1
  114. package/lib/Panel/Panel.js +18 -9
  115. package/lib/Panel/Panel.styles.d.ts +8 -11
  116. package/lib/Panel/Panel.styles.js +15 -5
  117. package/lib/Panel/Panel.types.js +5 -1
  118. package/lib/Panel/index.js +27 -2
  119. package/lib/PillLabel/PillLabel.js +28 -21
  120. package/lib/PillLabel/PillLabel.styles.d.ts +8 -10
  121. package/lib/PillLabel/PillLabel.styles.js +25 -16
  122. package/lib/PillLabel/PillLabel.types.js +5 -1
  123. package/lib/PillLabel/index.js +16 -1
  124. package/lib/Popup/Popup.js +55 -45
  125. package/lib/Popup/index.js +16 -1
  126. package/lib/Popup/styles.d.ts +12 -11
  127. package/lib/Popup/styles.js +21 -8
  128. package/lib/Popup/types.js +5 -1
  129. package/lib/ProgressBar/ProgressBar.js +30 -20
  130. package/lib/ProgressBar/index.js +27 -2
  131. package/lib/ProgressBar/styles.d.ts +24 -28
  132. package/lib/ProgressBar/styles.js +30 -14
  133. package/lib/ProgressBar/types.js +5 -1
  134. package/lib/Radio/Radio.js +53 -48
  135. package/lib/Radio/index.js +16 -1
  136. package/lib/Radio/styles.d.ts +25 -22
  137. package/lib/Radio/styles.js +49 -30
  138. package/lib/Radio/types.js +5 -1
  139. package/lib/ScrollableContent/ScrollableContent.js +35 -24
  140. package/lib/ScrollableContent/ScrollableContent.styles.d.ts +9 -11
  141. package/lib/ScrollableContent/ScrollableContent.styles.js +23 -13
  142. package/lib/ScrollableContent/ScrollableContent.types.js +5 -1
  143. package/lib/ScrollableContent/index.js +27 -2
  144. package/lib/ScrollableContent/useScrollContainer.js +29 -24
  145. package/lib/Select/Select.js +31 -20
  146. package/lib/Select/index.js +16 -1
  147. package/lib/Select/types.js +5 -1
  148. package/lib/Skeleton/Skeleton.js +30 -25
  149. package/lib/Skeleton/Skeleton.styles.d.ts +8 -10
  150. package/lib/Skeleton/Skeleton.styles.js +21 -14
  151. package/lib/Skeleton/Skeleton.types.js +5 -1
  152. package/lib/Skeleton/index.js +20 -2
  153. package/lib/Stepper/Stepper.js +49 -40
  154. package/lib/Stepper/Stepper.styles.d.ts +24 -29
  155. package/lib/Stepper/Stepper.styles.js +35 -19
  156. package/lib/Stepper/Stepper.types.js +5 -1
  157. package/lib/Stepper/index.js +16 -1
  158. package/lib/Switcher/Switcher.js +32 -23
  159. package/lib/Switcher/Switcher.styles.d.ts +13 -13
  160. package/lib/Switcher/Switcher.styles.js +27 -15
  161. package/lib/Switcher/Switcher.types.js +5 -1
  162. package/lib/Switcher/index.js +16 -1
  163. package/lib/Tab/Tab.js +31 -23
  164. package/lib/Tab/Tab.styles.d.ts +13 -12
  165. package/lib/Tab/Tab.styles.js +30 -21
  166. package/lib/Tab/Tab.types.js +5 -1
  167. package/lib/Tab/index.js +16 -1
  168. package/lib/Table/NewSelectableTable.js +77 -56
  169. package/lib/Table/SelectableTable.js +138 -118
  170. package/lib/Table/Table.js +126 -111
  171. package/lib/Table/Table.styles.d.ts +32 -16
  172. package/lib/Table/Table.styles.js +79 -59
  173. package/lib/Table/Table.types.js +5 -1
  174. package/lib/Table/index.js +27 -2
  175. package/lib/TagsInput/TagsInput.js +44 -33
  176. package/lib/TagsInput/index.js +16 -1
  177. package/lib/TagsInput/style.d.ts +16 -19
  178. package/lib/TagsInput/style.js +22 -9
  179. package/lib/TagsInput/types.js +5 -1
  180. package/lib/Textarea/Textarea.js +75 -58
  181. package/lib/Textarea/Textarea.styles.d.ts +28 -22
  182. package/lib/Textarea/Textarea.styles.js +55 -32
  183. package/lib/Textarea/Textarea.types.js +5 -1
  184. package/lib/Textarea/index.js +16 -1
  185. package/lib/ThemeProvider/ThemeProvider.d.ts +5 -2
  186. package/lib/ThemeProvider/ThemeProvider.js +48 -30
  187. package/lib/ThemeProvider/index.js +16 -1
  188. package/lib/Toast/Toast.js +56 -53
  189. package/lib/Toast/index.js +16 -1
  190. package/lib/Toast/styles.d.ts +4 -2
  191. package/lib/Toast/styles.js +13 -3
  192. package/lib/Toast/types.js +5 -1
  193. package/lib/Toggle/Toggle.js +59 -50
  194. package/lib/Toggle/index.js +16 -1
  195. package/lib/Toggle/styles.d.ts +21 -14
  196. package/lib/Toggle/styles.js +51 -34
  197. package/lib/Toggle/types.js +5 -1
  198. package/lib/Tooltip/Tooltip.js +100 -102
  199. package/lib/Tooltip/index.js +16 -1
  200. package/lib/Tooltip/styles.d.ts +14 -8
  201. package/lib/Tooltip/styles.js +33 -25
  202. package/lib/Tooltip/types.js +5 -1
  203. package/lib/Typography/Typography.js +96 -85
  204. package/lib/Typography/Typography.styles.d.ts +48 -54
  205. package/lib/Typography/Typography.styles.js +70 -45
  206. package/lib/Typography/Typography.types.js +5 -1
  207. package/lib/Typography/index.js +38 -3
  208. package/lib/emotion.d.js +3 -0
  209. package/lib/hooks/index.js +38 -3
  210. package/lib/hooks/useForwardedRef.js +11 -6
  211. package/lib/hooks/useInfiniteScroll.js +24 -20
  212. package/lib/hooks/useStatefulRef.js +18 -14
  213. package/lib/index.js +489 -44
  214. package/lib/system-props/color.js +8 -2
  215. package/lib/system-props/index.js +27 -2
  216. package/lib/system-props/types.js +5 -1
  217. package/lib/theme/ColorSchemes/codacy.js +11 -4
  218. package/lib/theme/ColorSchemes/pulse.js +17 -9
  219. package/lib/theme/index.js +38 -3
  220. package/lib/theme/theme.js +42 -69
  221. package/lib/types.js +5 -1
  222. package/lib/utils/hash.js +8 -6
  223. package/lib/utils/reactNodeToText.js +13 -14
  224. package/package.json +32 -32
@@ -1,38 +1,44 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Avatar = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _ = require("../");
12
+ var _gravatar = require("./gravatar");
13
+ var _theme = require("../theme");
14
+ var _jsxRuntime = require("react/jsx-runtime");
2
15
  var _excluded = ["email", "src", "size"];
3
- import React from 'react';
4
- import { Img } from '../';
5
- import { getGravatarUrl } from './gravatar';
6
- import { theme } from '../theme';
7
16
  /**
8
17
  * Description for Avatar
9
18
  */
10
-
11
- var Avatar = function Avatar(_ref) {
19
+ var Avatar = exports.Avatar = function Avatar(_ref) {
12
20
  var email = _ref.email,
13
- src = _ref.src,
14
- _ref$size = _ref.size,
15
- size = _ref$size === void 0 ? 'md' : _ref$size,
16
- props = _objectWithoutProperties(_ref, _excluded);
17
-
21
+ src = _ref.src,
22
+ _ref$size = _ref.size,
23
+ size = _ref$size === void 0 ? 'md' : _ref$size,
24
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
18
25
  var dimensions = {
19
26
  xs: 1,
20
27
  sm: 2,
21
28
  md: 3,
22
29
  lg: 4,
23
30
  xl: 8
24
- }; //So we can have a higher quality in the image, we are fetching double the actual size of the avatar in the ui
31
+ };
25
32
 
26
- var image = !!email ? getGravatarUrl(email, {
33
+ //So we can have a higher quality in the image, we are fetching double the actual size of the avatar in the ui
34
+ var image = !!email ? (0, _gravatar.getGravatarUrl)(email, {
27
35
  "default": 'identicon',
28
- size: dimensions[size] * theme.remScale * 2
36
+ size: dimensions[size] * _theme.theme.remScale * 2
29
37
  }) : src;
30
- return /*#__PURE__*/React.createElement(Img, Object.assign({
38
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Img, (0, _objectSpread2["default"])({
31
39
  src: image,
32
40
  width: "".concat(dimensions[size], "rem"),
33
41
  height: "".concat(dimensions[size], "rem"),
34
42
  rounded: true
35
43
  }, props));
36
- };
37
-
38
- export { Avatar };
44
+ };
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,19 +1,23 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getGravatarUrl = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
+ var _queryString = require("query-string");
11
+ var _md = _interopRequireDefault(require("md5"));
3
12
  var _excluded = ["default", "defaultUrl"];
4
- import { stringify } from 'query-string';
5
- import md5 from 'md5';
6
- export var getGravatarUrl = function getGravatarUrl(email) {
13
+ var getGravatarUrl = exports.getGravatarUrl = function getGravatarUrl(email) {
7
14
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8
-
9
15
  var optionDefault = options["default"],
10
- defaultUrl = options.defaultUrl,
11
- otherOptions = _objectWithoutProperties(options, _excluded);
12
-
13
- var query = _objectSpread(_objectSpread({}, otherOptions), {}, {
16
+ defaultUrl = options.defaultUrl,
17
+ otherOptions = (0, _objectWithoutProperties2["default"])(options, _excluded);
18
+ var query = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, otherOptions), {}, {
14
19
  "default": defaultUrl || optionDefault
15
20
  });
16
-
17
- var emailHash = md5(email);
18
- return "https://www.gravatar.com/avatar/".concat(emailHash, "?").concat(stringify(query));
21
+ var emailHash = (0, _md["default"])(email);
22
+ return "https://www.gravatar.com/avatar/".concat(emailHash, "?").concat((0, _queryString.stringify)(query));
19
23
  };
@@ -1 +1,16 @@
1
- export * from './Avatar';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Avatar = require("./Avatar");
7
+ Object.keys(_Avatar).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Avatar[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Avatar[key];
14
+ }
15
+ });
16
+ });
@@ -1,42 +1,55 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- var _excluded = ["title", "icon", "description", "onDismiss"];
3
- import React from 'react';
4
- import { StyledBanner, StyledCloseButton } from './Banner.styles';
5
- import { Box } from '../Flexbox';
6
- import { Icon } from '../Icon';
7
- import { RocketIcon } from '../Icons/Symbols';
8
- import { Paragraph, Subheader } from '../Typography';
9
- import { useTheme } from 'emotion-theming';
1
+ "use strict";
10
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Banner = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _Banner = require("./Banner.styles");
12
+ var _Flexbox = require("../Flexbox");
13
+ var _Icon = require("../Icon");
14
+ var _Symbols = require("../Icons/Symbols");
15
+ var _Typography = require("../Typography");
16
+ var _react2 = require("@emotion/react");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ var _excluded = ["title", "icon", "description", "onDismiss"];
11
19
  /**
12
20
  * Description for Banner
13
21
  */
14
- export var Banner = function Banner(_ref) {
22
+ var Banner = exports.Banner = function Banner(_ref) {
15
23
  var title = _ref.title,
16
- icon = _ref.icon,
17
- description = _ref.description,
18
- onDismiss = _ref.onDismiss,
19
- props = _objectWithoutProperties(_ref, _excluded);
20
-
21
- var theme = useTheme();
22
- return /*#__PURE__*/React.createElement(StyledBanner, Object.assign({
24
+ icon = _ref.icon,
25
+ description = _ref.description,
26
+ onDismiss = _ref.onDismiss,
27
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
28
+ var theme = (0, _react2.useTheme)();
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Banner.StyledBanner, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
23
30
  p: 5,
24
31
  pl: 6
25
- }, props, {
32
+ }, props), {}, {
26
33
  width: "100%",
27
- position: "relative"
28
- }), /*#__PURE__*/React.createElement(Box, {
29
- mr: 4
30
- }, /*#__PURE__*/React.createElement(Icon, {
31
- icon: icon || RocketIcon,
32
- size: "lg",
33
- color: "text-secondary"
34
- })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Subheader, {
35
- size: "lg",
36
- mb: 1
37
- }, title), description && typeof description === 'string' ? /*#__PURE__*/React.createElement(Paragraph, {
38
- color: theme.colors['black-400']
39
- }, description) : description), onDismiss && /*#__PURE__*/React.createElement(StyledCloseButton, {
40
- onClick: onDismiss
34
+ position: "relative",
35
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Flexbox.Box, {
36
+ mr: 4,
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
38
+ icon: icon || _Symbols.RocketIcon,
39
+ size: "lg",
40
+ color: "text-secondary"
41
+ })
42
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Flexbox.Box, {
43
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.Subheader, {
44
+ size: "lg",
45
+ mb: 1,
46
+ children: title
47
+ }), description && typeof description === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.Paragraph, {
48
+ color: theme.colors['black-400'],
49
+ children: description
50
+ }) : description]
51
+ }), onDismiss && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Banner.StyledCloseButton, {
52
+ onClick: onDismiss
53
+ })]
41
54
  }));
42
55
  };
@@ -1,13 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { CodacyTheme } from '../theme';
3
- import { FlexProps } from '../Flexbox';
4
- export declare const StyledBanner: import("@emotion/styled-base").StyledComponent<Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Pick<import("..").ColorProps & import("..").LayoutProps & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
5
- fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, CodacyTheme> | undefined;
6
- }, "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "as" | keyof import("..").ColorProps | keyof import("..").LayoutProps | keyof import("..").SpaceProps | keyof import("..").BorderProps | keyof import("..").PositionProps | keyof import("..").ShadowProps> & {
7
- theme?: object | undefined;
8
- }, "key" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "as" | "theme" | keyof import("react").HTMLAttributes<HTMLDivElement> | keyof import("..").ColorProps | keyof import("..").LayoutProps | keyof import("..").SpaceProps | keyof import("..").BorderProps | keyof import("..").PositionProps | keyof import("..").ShadowProps> & {
9
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
- } & Pick<FlexProps, "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "as" | keyof import("..").ColorProps | keyof import("..").LayoutProps | keyof import("..").SpaceProps | keyof import("..").BorderProps | keyof import("..").PositionProps | keyof import("..").ShadowProps | keyof import("..").FlexboxProps> & {
11
- theme?: object | undefined;
12
- }, FlexProps, CodacyTheme>;
13
- export declare const StyledCloseButton: import("@emotion/styled-base").StyledComponent<import("react").HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>, Pick<import("react").HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>, keyof import("react").HTMLAttributes<HTMLButtonElement>>, object>;
2
+ export declare const StyledBanner: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
6
+ fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, import("../theme").CodacyTheme> | undefined;
7
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
8
+ theme?: import("@emotion/react").Theme | undefined;
9
+ } & import("..").FlexboxProps, {}, {}>;
10
+ export declare const StyledCloseButton: import("@emotion/styled").StyledComponent<import("react").HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement> & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ }, {}, {}>;
@@ -1,14 +1,22 @@
1
- import _styled from "@emotion/styled-base";
1
+ "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.StyledCloseButton = exports.StyledBanner = void 0;
8
+ var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
+ var _Flexbox = require("../Flexbox");
10
+ var _CloseButton = require("../CloseButton");
3
11
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
4
-
5
- import { Flex } from '../Flexbox';
6
- import { CloseButton } from '../CloseButton';
7
- export var StyledBanner = /*#__PURE__*/_styled(Flex, {
8
- target: "e1opnk9v0"
12
+ var StyledBanner = exports.StyledBanner = /*#__PURE__*/(0, _base["default"])(_Flexbox.Flex, process.env.NODE_ENV === "production" ? {
13
+ target: "e1opnk9v1"
14
+ } : {
15
+ target: "e1opnk9v1",
16
+ label: "codacy"
9
17
  })("background:", function (_ref) {
10
18
  var theme = _ref.theme,
11
- backgroundColor = _ref.backgroundColor;
19
+ backgroundColor = _ref.backgroundColor;
12
20
  return theme.colors[backgroundColor || 'black-50'];
13
21
  }, ";border:1px solid ", function (_ref2) {
14
22
  var theme = _ref2.theme;
@@ -16,15 +24,18 @@ export var StyledBanner = /*#__PURE__*/_styled(Flex, {
16
24
  }, ";border-radius:", function (_ref3) {
17
25
  var theme = _ref3.theme;
18
26
  return theme.radii[1];
19
- }, ";position:relative;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9CYW5uZXIvQmFubmVyLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLZ0UiLCJmaWxlIjoiLi4vLi4vc3JjL0Jhbm5lci9CYW5uZXIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBDb2RhY3lUaGVtZSwgQ29sb3IgfSBmcm9tICcuLi90aGVtZSdcbmltcG9ydCB7IEZsZXgsIEZsZXhQcm9wcyB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBDbG9zZUJ1dHRvbiB9IGZyb20gJy4uL0Nsb3NlQnV0dG9uJ1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQmFubmVyID0gc3R5bGVkKEZsZXgpPEZsZXhQcm9wcywgQ29kYWN5VGhlbWU+YFxuICBiYWNrZ3JvdW5kOiAkeyh7IHRoZW1lLCBiYWNrZ3JvdW5kQ29sb3IgfSkgPT4gdGhlbWUuY29sb3JzWyhiYWNrZ3JvdW5kQ29sb3IgfHwgJ2JsYWNrLTUwJykgYXMgQ29sb3JdfTtcbiAgYm9yZGVyOiAxcHggc29saWQgJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ3VpLWJvcmRlciddfTtcbiAgYm9yZGVyLXJhZGl1czogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5yYWRpaVsxXX07XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbmBcblxuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2xvc2VCdXR0b24gPSBzdHlsZWQoQ2xvc2VCdXR0b24pYFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMXJlbTtcbiAgcmlnaHQ6IDFyZW07XG5gIl19 */"));
20
- export var StyledCloseButton = /*#__PURE__*/_styled(CloseButton, {
21
- target: "e1opnk9v1"
27
+ }, ";position:relative;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9CYW5uZXIvQmFubmVyLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLbUQiLCJmaWxlIjoiLi4vLi4vc3JjL0Jhbm5lci9CYW5uZXIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBDb2xvciB9IGZyb20gJy4uL3RoZW1lJ1xuaW1wb3J0IHsgRmxleCwgRmxleFByb3BzIH0gZnJvbSAnLi4vRmxleGJveCdcbmltcG9ydCB7IENsb3NlQnV0dG9uIH0gZnJvbSAnLi4vQ2xvc2VCdXR0b24nXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRCYW5uZXIgPSBzdHlsZWQoRmxleCk8RmxleFByb3BzPmBcbiAgYmFja2dyb3VuZDogJHsoeyB0aGVtZSwgYmFja2dyb3VuZENvbG9yIH0pID0+IHRoZW1lLmNvbG9yc1soYmFja2dyb3VuZENvbG9yIHx8ICdibGFjay01MCcpIGFzIENvbG9yXX07XG4gIGJvcmRlcjogMXB4IHNvbGlkICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuY29sb3JzWyd1aS1ib3JkZXInXX07XG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUucmFkaWlbMV19O1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG5gXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDbG9zZUJ1dHRvbiA9IHN0eWxlZChDbG9zZUJ1dHRvbilgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAxcmVtO1xuICByaWdodDogMXJlbTtcbmBcbiJdfQ== */"));
28
+ var StyledCloseButton = exports.StyledCloseButton = /*#__PURE__*/(0, _base["default"])(_CloseButton.CloseButton, process.env.NODE_ENV === "production" ? {
29
+ target: "e1opnk9v0"
30
+ } : {
31
+ target: "e1opnk9v0",
32
+ label: "codacy"
22
33
  })(process.env.NODE_ENV === "production" ? {
23
- name: "191u8kx",
24
- styles: "position:absolute;top:1rem;right:1rem;"
34
+ name: "nd2ame",
35
+ styles: "position:absolute;top:1rem;right:1rem"
25
36
  } : {
26
- name: "191u8kx",
27
- styles: "position:absolute;top:1rem;right:1rem;",
28
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9CYW5uZXIvQmFubmVyLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhb0QiLCJmaWxlIjoiLi4vLi4vc3JjL0Jhbm5lci9CYW5uZXIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBDb2RhY3lUaGVtZSwgQ29sb3IgfSBmcm9tICcuLi90aGVtZSdcbmltcG9ydCB7IEZsZXgsIEZsZXhQcm9wcyB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBDbG9zZUJ1dHRvbiB9IGZyb20gJy4uL0Nsb3NlQnV0dG9uJ1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQmFubmVyID0gc3R5bGVkKEZsZXgpPEZsZXhQcm9wcywgQ29kYWN5VGhlbWU+YFxuICBiYWNrZ3JvdW5kOiAkeyh7IHRoZW1lLCBiYWNrZ3JvdW5kQ29sb3IgfSkgPT4gdGhlbWUuY29sb3JzWyhiYWNrZ3JvdW5kQ29sb3IgfHwgJ2JsYWNrLTUwJykgYXMgQ29sb3JdfTtcbiAgYm9yZGVyOiAxcHggc29saWQgJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ3VpLWJvcmRlciddfTtcbiAgYm9yZGVyLXJhZGl1czogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5yYWRpaVsxXX07XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbmBcblxuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2xvc2VCdXR0b24gPSBzdHlsZWQoQ2xvc2VCdXR0b24pYFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMXJlbTtcbiAgcmlnaHQ6IDFyZW07XG5gIl19 */",
37
+ name: "nd2ame",
38
+ styles: "position:absolute;top:1rem;right:1rem",
39
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9CYW5uZXIvQmFubmVyLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZb0QiLCJmaWxlIjoiLi4vLi4vc3JjL0Jhbm5lci9CYW5uZXIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBDb2xvciB9IGZyb20gJy4uL3RoZW1lJ1xuaW1wb3J0IHsgRmxleCwgRmxleFByb3BzIH0gZnJvbSAnLi4vRmxleGJveCdcbmltcG9ydCB7IENsb3NlQnV0dG9uIH0gZnJvbSAnLi4vQ2xvc2VCdXR0b24nXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRCYW5uZXIgPSBzdHlsZWQoRmxleCk8RmxleFByb3BzPmBcbiAgYmFja2dyb3VuZDogJHsoeyB0aGVtZSwgYmFja2dyb3VuZENvbG9yIH0pID0+IHRoZW1lLmNvbG9yc1soYmFja2dyb3VuZENvbG9yIHx8ICdibGFjay01MCcpIGFzIENvbG9yXX07XG4gIGJvcmRlcjogMXB4IHNvbGlkICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuY29sb3JzWyd1aS1ib3JkZXInXX07XG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUucmFkaWlbMV19O1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG5gXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDbG9zZUJ1dHRvbiA9IHN0eWxlZChDbG9zZUJ1dHRvbilgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAxcmVtO1xuICByaWdodDogMXJlbTtcbmBcbiJdfQ== */",
29
40
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
41
  });
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,2 +1,27 @@
1
- export * from './Banner';
2
- export * from './Banner.types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Banner = require("./Banner");
7
+ Object.keys(_Banner).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Banner[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Banner[key];
14
+ }
15
+ });
16
+ });
17
+ var _Banner2 = require("./Banner.types");
18
+ Object.keys(_Banner2).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _Banner2[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _Banner2[key];
25
+ }
26
+ });
27
+ });
@@ -1,60 +1,60 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- var _excluded = ["children", "id", "disabled", "size", "btnType", "variant", "color", "isLoading", "leftIcon", "rightIcon"];
3
- import React, { useMemo } from 'react';
4
- import { StyledButton, StyledButtonContents } from './styles';
5
- import { Icon } from '../Icon';
6
- import { SpinnerIcon } from '../Icons';
1
+ "use strict";
7
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Button = void 0;
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _styles = require("./styles");
13
+ var _Icon = require("../Icon");
14
+ var _Icons = require("../Icons");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ var _excluded = ["children", "id", "disabled", "size", "btnType", "variant", "color", "isLoading", "leftIcon", "rightIcon"];
8
17
  /**
9
18
  * Basic button
10
19
  */
11
- var Button = React.forwardRef(function (_ref, ref) {
20
+ var Button = exports.Button = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
12
21
  var children = _ref.children,
13
- id = _ref.id,
14
- _ref$disabled = _ref.disabled,
15
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
16
- _ref$size = _ref.size,
17
- size = _ref$size === void 0 ? 'md' : _ref$size,
18
- btnType = _ref.btnType,
19
- variant = _ref.variant,
20
- color = _ref.color,
21
- _ref$isLoading = _ref.isLoading,
22
- isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
23
- leftIcon = _ref.leftIcon,
24
- rightIcon = _ref.rightIcon,
25
- props = _objectWithoutProperties(_ref, _excluded);
26
-
27
- var leftIconComponent = useMemo(function () {
28
- return leftIcon && (leftIcon.hasOwnProperty('icon') ? /*#__PURE__*/React.createElement(Icon, Object.assign({}, leftIcon, {
22
+ id = _ref.id,
23
+ _ref$disabled = _ref.disabled,
24
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
25
+ _ref$size = _ref.size,
26
+ size = _ref$size === void 0 ? 'md' : _ref$size,
27
+ btnType = _ref.btnType,
28
+ variant = _ref.variant,
29
+ color = _ref.color,
30
+ _ref$isLoading = _ref.isLoading,
31
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
32
+ leftIcon = _ref.leftIcon,
33
+ rightIcon = _ref.rightIcon,
34
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
35
+ var leftIconComponent = (0, _react.useMemo)(function () {
36
+ return leftIcon && (leftIcon.hasOwnProperty('icon') ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, leftIcon), {}, {
29
37
  size: size
30
- })) : /*#__PURE__*/React.createElement(Icon, {
38
+ })) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
31
39
  icon: leftIcon,
32
40
  size: size
33
41
  }));
34
42
  }, [leftIcon, size]);
35
- var rightIconComponent = useMemo(function () {
36
- return rightIcon && (rightIcon.hasOwnProperty('icon') ? /*#__PURE__*/React.createElement(Icon, Object.assign({}, rightIcon, {
43
+ var rightIconComponent = (0, _react.useMemo)(function () {
44
+ return rightIcon && (rightIcon.hasOwnProperty('icon') ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, rightIcon), {}, {
37
45
  size: size
38
- })) : /*#__PURE__*/React.createElement(Icon, {
46
+ })) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
39
47
  icon: rightIcon,
40
48
  size: size
41
49
  }));
42
50
  }, [rightIcon, size]);
43
-
44
51
  var _variant = variant || btnType || 'default';
45
-
46
- var invert = ['link', 'default', 'flat',
47
- /** DEPRECATED ---> */
48
- 'subtle'].includes(_variant);
49
- var hideBorder = ['link',
50
- /** DEPRECATED ---> */
51
- 'subtle'].includes(_variant);
52
- var hideShadows = ['link', 'flat', 'primaryFlat',
53
- /** DEPRECATED ---> */
54
- 'subtle'].includes(_variant);
52
+ var invert = ['link', 'default', 'flat', /** DEPRECATED ---> */'subtle'].includes(_variant);
53
+ var hideBorder = ['link', /** DEPRECATED ---> */'subtle'].includes(_variant);
54
+ var hideShadows = ['link', 'flat', 'primaryFlat', /** DEPRECATED ---> */'subtle'].includes(_variant);
55
55
  var isDisabled = disabled || isLoading;
56
56
  var colorScheme = color || (['link', 'default', 'flat', 'primaryFlat'].includes(_variant) ? 'primary' : _variant) || 'primary';
57
- return /*#__PURE__*/React.createElement(StyledButton, Object.assign({
57
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledButton, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
58
58
  id: id,
59
59
  disabled: isDisabled,
60
60
  size: size,
@@ -62,15 +62,18 @@ var Button = React.forwardRef(function (_ref, ref) {
62
62
  border: !hideBorder,
63
63
  invert: invert,
64
64
  shadows: !hideShadows
65
- }, props, {
66
- ref: ref
67
- }), /*#__PURE__*/React.createElement(StyledButtonContents, {
68
- size: size
69
- }, isLoading && /*#__PURE__*/React.createElement(Icon, {
70
- icon: SpinnerIcon,
71
- spin: true,
72
- size: size,
73
- title: "spinner-icon"
74
- }), !isLoading && leftIconComponent, children && /*#__PURE__*/React.createElement("span", null, children), rightIconComponent));
75
- });
76
- export { Button };
65
+ }, props), {}, {
66
+ ref: ref,
67
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.StyledButtonContents, {
68
+ size: size,
69
+ children: [isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
70
+ icon: _Icons.SpinnerIcon,
71
+ spin: true,
72
+ size: size,
73
+ title: "spinner-icon"
74
+ }), !isLoading && leftIconComponent, children && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
75
+ children: children
76
+ }), rightIconComponent]
77
+ })
78
+ }));
79
+ });
@@ -1,2 +1,27 @@
1
- export * from './Button';
2
- export { ButtonGroup } from './styles';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ ButtonGroup: true
8
+ };
9
+ Object.defineProperty(exports, "ButtonGroup", {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _styles.ButtonGroup;
13
+ }
14
+ });
15
+ var _Button = require("./Button");
16
+ Object.keys(_Button).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
+ if (key in exports && exports[key] === _Button[key]) return;
20
+ Object.defineProperty(exports, key, {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _Button[key];
24
+ }
25
+ });
26
+ });
27
+ var _styles = require("./styles");
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { CodacyTheme } from '../theme';
3
3
  import { ButtonSize, ButtonColorScheme } from './types';
4
- import { FlexProps } from '../Flexbox';
5
4
  export interface StyledButtonProps {
6
5
  size: ButtonSize;
7
6
  scheme: ButtonColorScheme;
@@ -10,16 +9,21 @@ export interface StyledButtonProps {
10
9
  shadows: boolean;
11
10
  disabled: boolean;
12
11
  }
13
- export declare const StyledButton: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledButtonProps, CodacyTheme>;
14
- export declare const StyledButtonContents: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
12
+ export declare const StyledButton: import("@emotion/styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any> | undefined;
15
+ } & StyledButtonProps, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
16
+ export declare const StyledButtonContents: import("@emotion/styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ } & {
15
20
  size: ButtonSize;
16
- }, CodacyTheme>;
17
- export declare const ButtonGroup: import("@emotion/styled-base").StyledComponent<Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Pick<import("..").ColorProps & import("..").LayoutProps & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
21
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
+ export declare const ButtonGroup: import("@emotion/styled").StyledComponent<{
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ as?: import("react").ElementType<any> | undefined;
25
+ } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
18
26
  fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, CodacyTheme> | undefined;
19
- }, "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "as" | keyof import("..").ColorProps | keyof import("..").LayoutProps | keyof import("..").SpaceProps | keyof import("..").BorderProps | keyof import("..").PositionProps | keyof import("..").ShadowProps> & {
20
- theme?: object | undefined;
21
- }, "key" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "as" | "theme" | keyof import("react").HTMLAttributes<HTMLDivElement> | keyof import("..").ColorProps | keyof import("..").LayoutProps | keyof import("..").SpaceProps | keyof import("..").BorderProps | keyof import("..").PositionProps | keyof import("..").ShadowProps> & {
22
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
23
- } & Pick<FlexProps, "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "as" | keyof import("..").ColorProps | keyof import("..").LayoutProps | keyof import("..").SpaceProps | keyof import("..").BorderProps | keyof import("..").PositionProps | keyof import("..").ShadowProps | keyof import("..").FlexboxProps> & {
24
- theme?: object | undefined;
25
- }, FlexProps, CodacyTheme>;
27
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
28
+ theme?: import("@emotion/react").Theme | undefined;
29
+ } & import("..").FlexboxProps, {}, {}>;