@codacy/ui-components 0.64.16 → 0.64.18

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 (223) 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 +64 -40
  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.js +5 -1
  110. package/lib/MoreInfo/MoreInfo.js +45 -39
  111. package/lib/MoreInfo/index.js +16 -1
  112. package/lib/MoreInfo/types.js +5 -1
  113. package/lib/Panel/Panel.js +18 -9
  114. package/lib/Panel/Panel.styles.d.ts +8 -11
  115. package/lib/Panel/Panel.styles.js +15 -5
  116. package/lib/Panel/Panel.types.js +5 -1
  117. package/lib/Panel/index.js +27 -2
  118. package/lib/PillLabel/PillLabel.js +28 -21
  119. package/lib/PillLabel/PillLabel.styles.d.ts +8 -10
  120. package/lib/PillLabel/PillLabel.styles.js +25 -16
  121. package/lib/PillLabel/PillLabel.types.js +5 -1
  122. package/lib/PillLabel/index.js +16 -1
  123. package/lib/Popup/Popup.js +55 -45
  124. package/lib/Popup/index.js +16 -1
  125. package/lib/Popup/styles.d.ts +12 -11
  126. package/lib/Popup/styles.js +21 -8
  127. package/lib/Popup/types.js +5 -1
  128. package/lib/ProgressBar/ProgressBar.js +30 -20
  129. package/lib/ProgressBar/index.js +27 -2
  130. package/lib/ProgressBar/styles.d.ts +24 -28
  131. package/lib/ProgressBar/styles.js +30 -14
  132. package/lib/ProgressBar/types.js +5 -1
  133. package/lib/Radio/Radio.js +53 -48
  134. package/lib/Radio/index.js +16 -1
  135. package/lib/Radio/styles.d.ts +25 -22
  136. package/lib/Radio/styles.js +49 -30
  137. package/lib/Radio/types.js +5 -1
  138. package/lib/ScrollableContent/ScrollableContent.js +35 -24
  139. package/lib/ScrollableContent/ScrollableContent.styles.d.ts +9 -11
  140. package/lib/ScrollableContent/ScrollableContent.styles.js +23 -13
  141. package/lib/ScrollableContent/ScrollableContent.types.js +5 -1
  142. package/lib/ScrollableContent/index.js +27 -2
  143. package/lib/ScrollableContent/useScrollContainer.js +29 -24
  144. package/lib/Select/Select.js +31 -20
  145. package/lib/Select/index.js +16 -1
  146. package/lib/Select/types.js +5 -1
  147. package/lib/Skeleton/Skeleton.js +30 -25
  148. package/lib/Skeleton/Skeleton.styles.d.ts +8 -10
  149. package/lib/Skeleton/Skeleton.styles.js +21 -14
  150. package/lib/Skeleton/Skeleton.types.js +5 -1
  151. package/lib/Skeleton/index.js +20 -2
  152. package/lib/Stepper/Stepper.js +49 -40
  153. package/lib/Stepper/Stepper.styles.d.ts +24 -29
  154. package/lib/Stepper/Stepper.styles.js +35 -19
  155. package/lib/Stepper/Stepper.types.js +5 -1
  156. package/lib/Stepper/index.js +16 -1
  157. package/lib/Switcher/Switcher.js +32 -23
  158. package/lib/Switcher/Switcher.styles.d.ts +13 -13
  159. package/lib/Switcher/Switcher.styles.js +27 -15
  160. package/lib/Switcher/Switcher.types.js +5 -1
  161. package/lib/Switcher/index.js +16 -1
  162. package/lib/Tab/Tab.js +31 -23
  163. package/lib/Tab/Tab.styles.d.ts +13 -12
  164. package/lib/Tab/Tab.styles.js +30 -21
  165. package/lib/Tab/Tab.types.js +5 -1
  166. package/lib/Tab/index.js +16 -1
  167. package/lib/Table/NewSelectableTable.js +77 -56
  168. package/lib/Table/SelectableTable.js +138 -118
  169. package/lib/Table/Table.js +126 -111
  170. package/lib/Table/Table.styles.d.ts +32 -16
  171. package/lib/Table/Table.styles.js +79 -59
  172. package/lib/Table/Table.types.js +5 -1
  173. package/lib/Table/index.js +27 -2
  174. package/lib/TagsInput/TagsInput.js +44 -33
  175. package/lib/TagsInput/index.js +16 -1
  176. package/lib/TagsInput/style.d.ts +16 -19
  177. package/lib/TagsInput/style.js +22 -9
  178. package/lib/TagsInput/types.js +5 -1
  179. package/lib/Textarea/Textarea.js +75 -58
  180. package/lib/Textarea/Textarea.styles.d.ts +28 -22
  181. package/lib/Textarea/Textarea.styles.js +55 -32
  182. package/lib/Textarea/Textarea.types.js +5 -1
  183. package/lib/Textarea/index.js +16 -1
  184. package/lib/ThemeProvider/ThemeProvider.d.ts +5 -2
  185. package/lib/ThemeProvider/ThemeProvider.js +48 -30
  186. package/lib/ThemeProvider/index.js +16 -1
  187. package/lib/Toast/Toast.js +56 -53
  188. package/lib/Toast/index.js +16 -1
  189. package/lib/Toast/styles.d.ts +4 -2
  190. package/lib/Toast/styles.js +13 -3
  191. package/lib/Toast/types.js +5 -1
  192. package/lib/Toggle/Toggle.js +59 -50
  193. package/lib/Toggle/index.js +16 -1
  194. package/lib/Toggle/styles.d.ts +21 -14
  195. package/lib/Toggle/styles.js +51 -34
  196. package/lib/Toggle/types.js +5 -1
  197. package/lib/Tooltip/Tooltip.js +100 -102
  198. package/lib/Tooltip/index.js +16 -1
  199. package/lib/Tooltip/styles.d.ts +14 -8
  200. package/lib/Tooltip/styles.js +33 -25
  201. package/lib/Tooltip/types.js +5 -1
  202. package/lib/Typography/Typography.js +96 -85
  203. package/lib/Typography/Typography.styles.d.ts +48 -54
  204. package/lib/Typography/Typography.styles.js +70 -45
  205. package/lib/Typography/Typography.types.js +5 -1
  206. package/lib/Typography/index.js +38 -3
  207. package/lib/emotion.d.js +3 -0
  208. package/lib/hooks/index.js +38 -3
  209. package/lib/hooks/useForwardedRef.js +11 -6
  210. package/lib/hooks/useInfiniteScroll.js +24 -20
  211. package/lib/hooks/useStatefulRef.js +18 -14
  212. package/lib/index.js +489 -44
  213. package/lib/system-props/color.js +8 -2
  214. package/lib/system-props/index.js +27 -2
  215. package/lib/system-props/types.js +5 -1
  216. package/lib/theme/ColorSchemes/codacy.js +11 -4
  217. package/lib/theme/ColorSchemes/pulse.js +17 -9
  218. package/lib/theme/index.js +38 -3
  219. package/lib/theme/theme.js +42 -69
  220. package/lib/types.js +5 -1
  221. package/lib/utils/hash.js +8 -6
  222. package/lib/utils/reactNodeToText.js +13 -14
  223. package/package.json +32 -32
@@ -1,16 +1,25 @@
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.Panel = 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 _Panel = require("./Panel.styles");
12
+ var _jsxRuntime = require("react/jsx-runtime");
2
13
  var _excluded = ["children"];
3
- import React from 'react';
4
- import { StyledPanel } from './Panel.styles';
5
14
  /**
6
15
  * Description for Panel
7
16
  */
8
-
9
- export var Panel = function Panel(_ref) {
17
+ var Panel = exports.Panel = function Panel(_ref) {
10
18
  var children = _ref.children,
11
- props = _objectWithoutProperties(_ref, _excluded);
12
-
13
- return /*#__PURE__*/React.createElement(StyledPanel, Object.assign({
19
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
20
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Panel.StyledPanel, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
14
21
  p: 5
15
- }, props), children);
22
+ }, props), {}, {
23
+ children: children
24
+ }));
16
25
  };
@@ -1,12 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { CodacyTheme } from '../theme';
3
- import { BoxProps } from '../Flexbox';
4
- export declare const StyledPanel: 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<BoxProps, "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 | keyof import("..").GridboxProps> & {
11
- theme?: object | undefined;
12
- }, BoxProps, CodacyTheme>;
2
+ export declare const StyledPanel: 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 & import("..").GridboxProps, {}, {}>;
@@ -1,10 +1,20 @@
1
- import _styled from "@emotion/styled-base";
2
- import { Box } from '../Flexbox';
3
- export var StyledPanel = /*#__PURE__*/_styled(Box, {
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.StyledPanel = void 0;
8
+ var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
+ var _Flexbox = require("../Flexbox");
10
+ var StyledPanel = exports.StyledPanel = /*#__PURE__*/(0, _base["default"])(_Flexbox.Box, process.env.NODE_ENV === "production" ? {
4
11
  target: "epfbb5r0"
12
+ } : {
13
+ target: "epfbb5r0",
14
+ label: "codacy"
5
15
  })("background:", function (_ref) {
6
16
  var theme = _ref.theme,
7
- backgroundColor = _ref.backgroundColor;
17
+ backgroundColor = _ref.backgroundColor;
8
18
  return theme.colors[backgroundColor || 'background-primary'];
9
19
  }, ";border:1px solid ", function (_ref2) {
10
20
  var theme = _ref2.theme;
@@ -12,4 +22,4 @@ export var StyledPanel = /*#__PURE__*/_styled(Box, {
12
22
  }, ";border-radius:", function (_ref3) {
13
23
  var theme = _ref3.theme;
14
24
  return theme.radii[1];
15
- }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9QYW5lbC9QYW5lbC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSTZEIiwiZmlsZSI6Ii4uLy4uL3NyYy9QYW5lbC9QYW5lbC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IENvZGFjeVRoZW1lLCBDb2xvciB9IGZyb20gJy4uL3RoZW1lJ1xuaW1wb3J0IHsgQm94LCBCb3hQcm9wcyB9IGZyb20gJy4uL0ZsZXhib3gnXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRQYW5lbCA9IHN0eWxlZChCb3gpPEJveFByb3BzLCBDb2RhY3lUaGVtZT5gXG4gIGJhY2tncm91bmQ6ICR7KHsgdGhlbWUsIGJhY2tncm91bmRDb2xvciB9KSA9PiB0aGVtZS5jb2xvcnNbKGJhY2tncm91bmRDb2xvciB8fCAnYmFja2dyb3VuZC1wcmltYXJ5JykgYXMgQ29sb3JdfTtcbiAgYm9yZGVyOiAxcHggc29saWQgJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ3VpLWJvcmRlciddfTtcbiAgYm9yZGVyLXJhZGl1czogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5yYWRpaVsxXX07XG5gXG4iXX0= */"));
25
+ }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9QYW5lbC9QYW5lbC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSWdEIiwiZmlsZSI6Ii4uLy4uL3NyYy9QYW5lbC9QYW5lbC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IENvbG9yIH0gZnJvbSAnLi4vdGhlbWUnXG5pbXBvcnQgeyBCb3gsIEJveFByb3BzIH0gZnJvbSAnLi4vRmxleGJveCdcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFBhbmVsID0gc3R5bGVkKEJveCk8Qm94UHJvcHM+YFxuICBiYWNrZ3JvdW5kOiAkeyh7IHRoZW1lLCBiYWNrZ3JvdW5kQ29sb3IgfSkgPT4gdGhlbWUuY29sb3JzWyhiYWNrZ3JvdW5kQ29sb3IgfHwgJ2JhY2tncm91bmQtcHJpbWFyeScpIGFzIENvbG9yXX07XG4gIGJvcmRlcjogMXB4IHNvbGlkICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuY29sb3JzWyd1aS1ib3JkZXInXX07XG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUucmFkaWlbMV19O1xuYFxuIl19 */"));
@@ -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 './Panel';
2
- export * from './Panel.types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Panel = require("./Panel");
7
+ Object.keys(_Panel).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Panel[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Panel[key];
14
+ }
15
+ });
16
+ });
17
+ var _Panel2 = require("./Panel.types");
18
+ Object.keys(_Panel2).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _Panel2[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _Panel2[key];
25
+ }
26
+ });
27
+ });
@@ -1,30 +1,37 @@
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.PillLabel = 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 _PillLabel = require("./PillLabel.styles");
12
+ var _jsxRuntime = require("react/jsx-runtime");
2
13
  var _excluded = ["children", "status", "inline", "size", "invert"];
3
- import React from 'react';
4
- import { PillLabelWrapper } from './PillLabel.styles';
5
14
  /**
6
15
  * PillLabel Banner
7
16
  */
8
-
9
- var PillLabel = React.forwardRef(function (_ref, ref) {
17
+ var PillLabel = exports.PillLabel = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
10
18
  var children = _ref.children,
11
- _ref$status = _ref.status,
12
- status = _ref$status === void 0 ? 'default' : _ref$status,
13
- _ref$inline = _ref.inline,
14
- inline = _ref$inline === void 0 ? true : _ref$inline,
15
- _ref$size = _ref.size,
16
- size = _ref$size === void 0 ? 'md' : _ref$size,
17
- _ref$invert = _ref.invert,
18
- invert = _ref$invert === void 0 ? false : _ref$invert,
19
- props = _objectWithoutProperties(_ref, _excluded);
20
-
21
- return /*#__PURE__*/React.createElement(PillLabelWrapper, Object.assign({
19
+ _ref$status = _ref.status,
20
+ status = _ref$status === void 0 ? 'default' : _ref$status,
21
+ _ref$inline = _ref.inline,
22
+ inline = _ref$inline === void 0 ? true : _ref$inline,
23
+ _ref$size = _ref.size,
24
+ size = _ref$size === void 0 ? 'md' : _ref$size,
25
+ _ref$invert = _ref.invert,
26
+ invert = _ref$invert === void 0 ? false : _ref$invert,
27
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PillLabel.PillLabelWrapper, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
22
29
  status: status,
23
30
  size: size,
24
31
  display: inline ? 'inline-block' : 'block',
25
32
  invert: invert
26
- }, props, {
27
- ref: ref
28
- }), children);
29
- });
30
- export { PillLabel };
33
+ }, props), {}, {
34
+ ref: ref,
35
+ children: children
36
+ }));
37
+ });
@@ -1,12 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { CodacyTheme } from '../theme';
3
2
  import { PillLabelProps } from './PillLabel.types';
4
- export declare const PillLabelWrapper: 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<import("../Flexbox").BoxProps, "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 | keyof import("..").GridboxProps> & {
11
- theme?: object | undefined;
12
- }, PillLabelProps, CodacyTheme>;
3
+ export declare const PillLabelWrapper: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any> | undefined;
6
+ } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
7
+ fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, import("../theme").CodacyTheme> | undefined;
8
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
9
+ theme?: import("@emotion/react").Theme | undefined;
10
+ } & import("..").FlexboxProps & import("..").GridboxProps & PillLabelProps, {}, {}>;
@@ -1,25 +1,35 @@
1
- import _styled from "@emotion/styled-base";
2
- import { Box } from '../Flexbox';
3
- import { IconAndTextWrapper } from '../IconAndText/IconAndText.styles';
4
- import { IconWrapper } from '../Icon/Icon.styles';
5
- export var PillLabelWrapper = /*#__PURE__*/_styled(Box, {
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.PillLabelWrapper = void 0;
8
+ var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
+ var _Flexbox = require("../Flexbox");
10
+ var _IconAndText = require("../IconAndText/IconAndText.styles");
11
+ var _Icon = require("../Icon/Icon.styles");
12
+ var PillLabelWrapper = exports.PillLabelWrapper = /*#__PURE__*/(0, _base["default"])(_Flexbox.Box, process.env.NODE_ENV === "production" ? {
6
13
  target: "e15p08ax0"
14
+ } : {
15
+ target: "e15p08ax0",
16
+ label: "codacy"
7
17
  })("padding:0 ", function (_ref) {
8
18
  var theme = _ref.theme;
9
19
  return theme.space[2];
10
20
  }, ";height:", function (_ref2) {
11
21
  var theme = _ref2.theme,
12
- size = _ref2.size;
22
+ size = _ref2.size;
13
23
  return theme.space[size === 'md' ? 5 : 4];
14
24
  }, ";line-height:", function (_ref3) {
15
25
  var theme = _ref3.theme,
16
- size = _ref3.size;
26
+ size = _ref3.size;
17
27
  return theme.space[size === 'md' ? 5 : 4];
18
- }, ";", IconAndTextWrapper, ",", IconWrapper, "{line-height:", function (_ref4) {
28
+ }, ";", _IconAndText.IconAndTextWrapper, ",", _Icon.IconWrapper, "{line-height:", function (_ref4) {
19
29
  var theme = _ref4.theme,
20
- size = _ref4.size;
30
+ size = _ref4.size;
21
31
  return theme.space[size === 'md' ? 5 : 4];
22
- }, " !important;}border-radius:", function (_ref5) {
32
+ }, "!important;}border-radius:", function (_ref5) {
23
33
  var theme = _ref5.theme;
24
34
  return theme.radii[1];
25
35
  }, ";text-align:center;font-weight:", function (_ref6) {
@@ -27,17 +37,16 @@ export var PillLabelWrapper = /*#__PURE__*/_styled(Box, {
27
37
  return theme.fontWeights.bold;
28
38
  }, ";font-size:", function (_ref7) {
29
39
  var theme = _ref7.theme,
30
- size = _ref7.size;
40
+ size = _ref7.size;
31
41
  return theme.fontSizes[size === 'md' ? 1 : 0];
32
42
  }, ";text-transform:", function (_ref8) {
33
43
  var size = _ref8.size;
34
44
  return size === 'md' ? 'none' : 'uppercase';
35
45
  }, ";", function (_ref9) {
36
46
  var _ref9$status = _ref9.status,
37
- status = _ref9$status === void 0 ? 'default' : _ref9$status,
38
- invert = _ref9.invert,
39
- theme = _ref9.theme;
40
-
47
+ status = _ref9$status === void 0 ? 'default' : _ref9$status,
48
+ invert = _ref9.invert,
49
+ theme = _ref9.theme;
41
50
  /** { status: [ main, text, background ] } */
42
51
  var scheme = {
43
52
  "default": ['accent-subtle', 'text-secondary', 'background-neutral'],
@@ -48,4 +57,4 @@ export var PillLabelWrapper = /*#__PURE__*/_styled(Box, {
48
57
  error: ['accent-danger', 'text-danger', 'background-danger']
49
58
  };
50
59
  return "\n color: ".concat(invert ? theme.colors['white'] : theme.colors[scheme[status][1]], ";\n background-color: ").concat(invert ? theme.colors[scheme[status][0]] : theme.colors[scheme[status][2]], ";\n ");
51
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9QaWxsTGFiZWwvUGlsbExhYmVsLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPd0UiLCJmaWxlIjoiLi4vLi4vc3JjL1BpbGxMYWJlbC9QaWxsTGFiZWwuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29kYWN5VGhlbWUsIENvbG9yIH0gZnJvbSAnLi4vdGhlbWUnXG5pbXBvcnQgeyBQaWxsTGFiZWxQcm9wcywgUGlsbExhYmVsU3RhdHVzIH0gZnJvbSAnLi9QaWxsTGFiZWwudHlwZXMnXG5pbXBvcnQgeyBCb3ggfSBmcm9tICcuLi9GbGV4Ym94J1xuaW1wb3J0IHsgSWNvbkFuZFRleHRXcmFwcGVyIH0gZnJvbSAnLi4vSWNvbkFuZFRleHQvSWNvbkFuZFRleHQu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HQtc3VjY2VzcycsICdiYWNrZ3JvdW5kLXN1Y2Nlc3MnXSxcbiAgICAgIGluZm86IFsnYWNjZW50LWluZm8nLCAndGV4dC1pbmZvJywgJ2JhY2tncm91bmQtaW5mbyddLFxuICAgICAgd2FybmluZzogWydhY2NlbnQtd2FybmluZycsICd0ZXh0LXdhcm5pbmcnLCAnYmFja2dyb3VuZC13YXJuaW5nJ10sXG4gICAgICBlcnJvcjogWydhY2NlbnQtZGFuZ2VyJywgJ3RleHQtZGFuZ2VyJywgJ2JhY2tncm91bmQtZGFuZ2VyJ10sXG4gICAgfVxuXG4gICAgcmV0dXJuIGBcbiAgICAgIGNvbG9yOiAke2ludmVydCA/IHRoZW1lLmNvbG9yc1snd2hpdGUnXSA6IHRoZW1lLmNvbG9yc1tzY2hlbWVbc3RhdHVzXVsxXV19O1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtpbnZlcnQgPyB0aGVtZS5jb2xvcnNbc2NoZW1lW3N0YXR1c11bMF1dIDogdGhlbWUuY29sb3JzW3NjaGVtZVtzdGF0dXNdWzJdXX07XG4gICAgYFxuICB9fVxuYFxuIl19 */"));
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1 +1,16 @@
1
- export * from './PillLabel';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _PillLabel = require("./PillLabel");
7
+ Object.keys(_PillLabel).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _PillLabel[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _PillLabel[key];
14
+ }
15
+ });
16
+ });
@@ -1,65 +1,75 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- var _excluded = ["id", "title", "children", "onClose", "popoupPosition", "backgroundImage"];
3
- import React, { useEffect } from 'react';
4
- import { CloseButton } from '../CloseButton';
5
- import { StyledPopup, CloseBtnLocation } from './styles';
6
- import { DisclosureContent, useDisclosureState } from 'reakit/Disclosure';
7
- import { Subheader } from '../Typography';
8
- import { Box } from '../';
1
+ "use strict";
9
2
 
10
- var Popup = function Popup(_ref) {
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.PopupAroundElement = exports.Popup = 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 _CloseButton = require("../CloseButton");
13
+ var _styles = require("./styles");
14
+ var _Disclosure = require("reakit/Disclosure");
15
+ var _Typography = require("../Typography");
16
+ var _ = require("../");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ var _excluded = ["id", "title", "children", "onClose", "popoupPosition", "backgroundImage"];
19
+ var Popup = exports.Popup = function Popup(_ref) {
11
20
  var id = _ref.id,
12
- title = _ref.title,
13
- children = _ref.children,
14
- onClose = _ref.onClose,
15
- _ref$popoupPosition = _ref.popoupPosition,
16
- popoupPosition = _ref$popoupPosition === void 0 ? {
17
- right: 0
18
- } : _ref$popoupPosition,
19
- _ref$backgroundImage = _ref.backgroundImage,
20
- backgroundImage = _ref$backgroundImage === void 0 ? '' : _ref$backgroundImage,
21
- props = _objectWithoutProperties(_ref, _excluded);
22
-
23
- var PopupState = useDisclosureState({
21
+ title = _ref.title,
22
+ children = _ref.children,
23
+ onClose = _ref.onClose,
24
+ _ref$popoupPosition = _ref.popoupPosition,
25
+ popoupPosition = _ref$popoupPosition === void 0 ? {
26
+ right: 0
27
+ } : _ref$popoupPosition,
28
+ _ref$backgroundImage = _ref.backgroundImage,
29
+ backgroundImage = _ref$backgroundImage === void 0 ? '' : _ref$backgroundImage,
30
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
31
+ var PopupState = (0, _Disclosure.useDisclosureState)({
24
32
  baseId: id
25
33
  });
26
-
27
34
  var onCloseButtonClick = function onCloseButtonClick() {
28
35
  if (onClose) onClose();
29
36
  PopupState.hide();
30
37
  };
31
-
32
- useEffect(function () {
38
+ (0, _react.useEffect)(function () {
33
39
  var timer = setTimeout(function () {
34
40
  PopupState.show();
35
41
  }, 800);
36
42
  return function () {
37
43
  return clearTimeout(timer);
38
- }; // eslint-disable-next-line react-hooks/exhaustive-deps
44
+ };
45
+ // eslint-disable-next-line react-hooks/exhaustive-deps
39
46
  }, []);
40
- return /*#__PURE__*/React.createElement(DisclosureContent, Object.assign({}, PopupState, props, {
41
- as: StyledPopup,
47
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Disclosure.DisclosureContent, (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, PopupState), props), {}, {
48
+ as: _styles.StyledPopup,
42
49
  id: id,
43
50
  style: popoupPosition,
44
51
  backgroundImage: backgroundImage,
45
- role: "alertdialog"
46
- }), /*#__PURE__*/React.createElement(Box, {
47
- width: "17rem"
48
- }, /*#__PURE__*/React.createElement(Subheader, {
49
- size: "lg",
50
- mb: 4
51
- }, title), children), /*#__PURE__*/React.createElement(CloseBtnLocation, null, /*#__PURE__*/React.createElement(CloseButton, {
52
- onClick: onCloseButtonClick
53
- })));
52
+ role: "alertdialog",
53
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Box, {
54
+ width: "17rem",
55
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.Subheader, {
56
+ size: "lg",
57
+ mb: 4,
58
+ children: title
59
+ }), children]
60
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.CloseBtnLocation, {
61
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
62
+ onClick: onCloseButtonClick
63
+ })
64
+ })]
65
+ }));
54
66
  };
55
-
56
- var PopupAroundElement = function PopupAroundElement(_ref2) {
67
+ var PopupAroundElement = exports.PopupAroundElement = function PopupAroundElement(_ref2) {
57
68
  var popupElement = _ref2.popupElement,
58
- children = _ref2.children;
59
- return /*#__PURE__*/React.createElement(Box, {
69
+ children = _ref2.children;
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Box, {
60
71
  position: "relative",
61
- display: "inline-block"
62
- }, children, popupElement);
63
- };
64
-
65
- export { Popup, PopupAroundElement };
72
+ display: "inline-block",
73
+ children: [children, popupElement]
74
+ });
75
+ };
@@ -1 +1,16 @@
1
- export * from './Popup';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Popup = require("./Popup");
7
+ Object.keys(_Popup).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Popup[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Popup[key];
14
+ }
15
+ });
16
+ });
@@ -1,13 +1,14 @@
1
1
  /// <reference types="react" />
2
- import { CodacyTheme } from '../theme';
3
2
  import { PopupProps } from './types';
4
- export declare const StyledPopup: 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("..").As & {
5
- fontWeight?: import("styled-system").ResponsiveValue<number | import("..").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<import("..").BoxProps, "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 | keyof import("..").GridboxProps> & {
11
- theme?: object | undefined;
12
- }, Pick<PopupProps, "backgroundImage">, CodacyTheme>;
13
- export declare const CloseBtnLocation: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Record<string, unknown>, CodacyTheme>;
3
+ export declare const StyledPopup: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any> | undefined;
6
+ } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("..").As & {
7
+ fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
8
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
9
+ theme?: import("@emotion/react").Theme | undefined;
10
+ } & import("..").FlexboxProps & import("..").GridboxProps & Pick<PopupProps, "backgroundImage">, {}, {}>;
11
+ export declare const CloseBtnLocation: import("@emotion/styled").StyledComponent<{
12
+ theme?: import("@emotion/react").Theme | undefined;
13
+ as?: import("react").ElementType<any> | undefined;
14
+ } & Record<string, unknown>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,7 +1,17 @@
1
- import _styled from "@emotion/styled-base";
2
- import { Box } from '..';
3
- export var StyledPopup = /*#__PURE__*/_styled(Box, {
4
- target: "evoxgzo0"
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.StyledPopup = exports.CloseBtnLocation = void 0;
8
+ var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
+ var _ = require("..");
10
+ var StyledPopup = exports.StyledPopup = /*#__PURE__*/(0, _base["default"])(_.Box, process.env.NODE_ENV === "production" ? {
11
+ target: "evoxgzo1"
12
+ } : {
13
+ target: "evoxgzo1",
14
+ label: "codacy"
5
15
  })("position:absolute;padding:", function (_ref) {
6
16
  var theme = _ref.theme;
7
17
  return theme.space[5];
@@ -17,13 +27,16 @@ export var StyledPopup = /*#__PURE__*/_styled(Box, {
17
27
  }, ";box-shadow:", function (_ref5) {
18
28
  var theme = _ref5.theme;
19
29
  return theme.shadows[3];
20
- }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qb3B1cC9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3dGIiwiZmlsZSI6Ii4uLy4uL3NyYy9Qb3B1cC9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9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naW4tdG9wOiAtMC4zNXJlbTtcbiAgbWFyZ2luLXJpZ2h0OiAtMC4zNXJlbTtcbmBcbiJdfQ== */"));
21
- export var CloseBtnLocation = _styled("div", {
22
- target: "evoxgzo1"
30
+ }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qb3B1cC9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSTJFIiwiZmlsZSI6Ii4uLy4uL3NyYy9Qb3B1cC9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IEJveCB9IGZyb20gJy4uJ1xuaW1wb3J0IHsgUG9wdXBQcm9wcyB9IGZyb20gJy4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRQb3B1cCA9IHN0eWxlZChCb3gpPFBpY2s8UG9wdXBQcm9wcywgJ2JhY2tncm91bmRJbWFnZSc+PmBcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBwYWRkaW5nOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnNwYWNlWzVdfTtcblxuICBiYWNrZ3JvdW5kLWNvbG9yOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmNvbG9yc1snYmxhY2stNTAnXX07XG4gIGJhY2tncm91bmQtaW1hZ2U6ICR7KHsgYmFja2dyb3VuZEltYWdlIH0pID0+IGB1cmwoJHtiYWNrZ3JvdW5kSW1hZ2V9KWB9O1xuICBiYWNrZ3JvdW5kLXJlcGVhdDogbm8tcmVwZWF0O1xuICBiYWNrZ3JvdW5kLXNpemU6IGNvbnRhaW47XG5cbiAgd2lkdGg6IDI0cmVtO1xuICBvdXRsaW5lOiBub25lO1xuICBib3JkZXItcmFkaXVzOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnJhZGlpWzFdfTtcbiAgYm94LXNoYWRvdzogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5zaGFkb3dzWzNdfTtcbmBcbmV4cG9ydCBjb25zdCBDbG9zZUJ0bkxvY2F0aW9uID0gc3R5bGVkLmRpdjxSZWNvcmQ8c3RyaW5nLCB1bmtub3duPj5gXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgcmlnaHQ6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuc3BhY2VbNV19O1xuICB0b3A6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuc3BhY2VbNV19O1xuICBtYXJnaW4tdG9wOiAtMC4zNXJlbTtcbiAgbWFyZ2luLXJpZ2h0OiAtMC4zNXJlbTtcbmBcbiJdfQ== */"));
31
+ var CloseBtnLocation = exports.CloseBtnLocation = /*#__PURE__*/(0, _base["default"])("div", process.env.NODE_ENV === "production" ? {
32
+ target: "evoxgzo0"
33
+ } : {
34
+ target: "evoxgzo0",
35
+ label: "codacy"
23
36
  })("position:absolute;right:", function (_ref6) {
24
37
  var theme = _ref6.theme;
25
38
  return theme.space[5];
26
39
  }, ";top:", function (_ref7) {
27
40
  var theme = _ref7.theme;
28
41
  return theme.space[5];
29
- }, ";margin-top:-0.35rem;margin-right:-0.35rem;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qb3B1cC9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJnRiIsImZpbGUiOiIuLi8uLi9zcmMvUG9wdXAvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBDb2RhY3lUaGVtZSB9IGZyb20gJy4uL3RoZW1lJ1xuaW1wb3J0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uMzVyZW07XG5gXG4iXX0= */"));
42
+ }, ";margin-top:-0.35rem;margin-right:-0.35rem;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Qb3B1cC9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0JtRSIsImZpbGUiOiIuLi8uLi9zcmMvUG9wdXAvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBCb3ggfSBmcm9tICcuLidcbmltcG9ydCB7IFBvcHVwUHJvcHMgfSBmcm9tICcuL3R5cGVzJ1xuXG5leHBvcnQgY29uc3QgU3R5bGVkUG9wdXAgPSBzdHlsZWQoQm94KTxQaWNrPFBvcHVwUHJvcHMsICdiYWNrZ3JvdW5kSW1hZ2UnPj5gXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgcGFkZGluZzogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5zcGFjZVs1XX07XG5cbiAgYmFja2dyb3VuZC1jb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2JsYWNrLTUwJ119O1xuICBiYWNrZ3JvdW5kLWltYWdlOiAkeyh7IGJhY2tncm91bmRJbWFnZSB9KSA9PiBgdXJsKCR7YmFja2dyb3VuZEltYWdlfSlgfTtcbiAgYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDtcbiAgYmFja2dyb3VuZC1zaXplOiBjb250YWluO1xuXG4gIHdpZHRoOiAyNHJlbTtcbiAgb3V0bGluZTogbm9uZTtcbiAgYm9yZGVyLXJhZGl1czogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5yYWRpaVsxXX07XG4gIGJveC1zaGFkb3c6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuc2hhZG93c1szXX07XG5gXG5leHBvcnQgY29uc3QgQ2xvc2VCdG5Mb2NhdGlvbiA9IHN0eWxlZC5kaXY8UmVjb3JkPHN0cmluZywgdW5rbm93bj4+YFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHJpZ2h0OiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnNwYWNlWzVdfTtcbiAgdG9wOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnNwYWNlWzVdfTtcbiAgbWFyZ2luLXRvcDogLTAuMzVyZW07XG4gIG1hcmdpbi1yaWdodDogLTAuMzVyZW07XG5gXG4iXX0= */"));
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,25 +1,35 @@
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.ProgressBar = 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 _styles = require("./styles");
12
+ var _jsxRuntime = require("react/jsx-runtime");
2
13
  var _excluded = ["percentage", "color", "height", "indicatorPercentage"];
3
- import React from 'react';
4
- import { Bar, FilledBar, ProgressIndicator } from './styles';
5
- export var ProgressBar = function ProgressBar(_ref) {
14
+ var ProgressBar = exports.ProgressBar = function ProgressBar(_ref) {
6
15
  var percentage = _ref.percentage,
7
- _ref$color = _ref.color,
8
- color = _ref$color === void 0 ? 'info' : _ref$color,
9
- _ref$height = _ref.height,
10
- height = _ref$height === void 0 ? '0.5rem' : _ref$height,
11
- indicatorPercentage = _ref.indicatorPercentage,
12
- props = _objectWithoutProperties(_ref, _excluded);
13
-
14
- return /*#__PURE__*/React.createElement(Bar, Object.assign({
16
+ _ref$color = _ref.color,
17
+ color = _ref$color === void 0 ? 'info' : _ref$color,
18
+ _ref$height = _ref.height,
19
+ height = _ref$height === void 0 ? '0.5rem' : _ref$height,
20
+ indicatorPercentage = _ref.indicatorPercentage,
21
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Bar, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
15
23
  height: height
16
- }, props), /*#__PURE__*/React.createElement(FilledBar, {
17
- color: color,
18
- percentage: percentage,
19
- height: '100%'
20
- }), indicatorPercentage && /*#__PURE__*/React.createElement(ProgressIndicator, {
21
- belowIndicator: percentage <= indicatorPercentage,
22
- indicatorPercentage: indicatorPercentage,
23
- height: '100%'
24
+ }, props), {}, {
25
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.FilledBar, {
26
+ color: color,
27
+ percentage: percentage,
28
+ height: '100%'
29
+ }), indicatorPercentage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ProgressIndicator, {
30
+ belowIndicator: percentage <= indicatorPercentage,
31
+ indicatorPercentage: indicatorPercentage,
32
+ height: '100%'
33
+ })]
24
34
  }));
25
35
  };