@codacy/ui-components 0.64.16 → 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.
- package/lib/Avatar/Avatar.js +25 -19
- package/lib/Avatar/Avatar.types.js +5 -1
- package/lib/Avatar/gravatar.js +17 -13
- package/lib/Avatar/index.js +16 -1
- package/lib/Banner/Banner.js +45 -32
- package/lib/Banner/Banner.styles.d.ts +11 -12
- package/lib/Banner/Banner.styles.js +26 -15
- package/lib/Banner/Banner.types.js +5 -1
- package/lib/Banner/index.js +27 -2
- package/lib/Button/Button.js +54 -51
- package/lib/Button/index.js +27 -2
- package/lib/Button/styles.d.ts +16 -12
- package/lib/Button/styles.js +58 -44
- package/lib/Button/types.js +5 -1
- package/lib/Checkbox/Checkbox.js +63 -54
- package/lib/Checkbox/CheckboxFilterList.js +46 -32
- package/lib/Checkbox/index.js +38 -3
- package/lib/Checkbox/styles.d.ts +25 -22
- package/lib/Checkbox/styles.js +52 -37
- package/lib/Checkbox/types.js +5 -1
- package/lib/CloseButton/index.js +27 -16
- package/lib/Divider/Divider.js +23 -13
- package/lib/Divider/Divider.styles.d.ts +16 -19
- package/lib/Divider/Divider.styles.js +24 -11
- package/lib/Divider/Divider.types.js +5 -1
- package/lib/Divider/index.js +16 -1
- package/lib/Dropdown/Content/DropdownInput.js +20 -8
- package/lib/Dropdown/Content/DropdownItem.js +29 -21
- package/lib/Dropdown/Content/DropdownSeparator.js +19 -7
- package/lib/Dropdown/Content/index.js +38 -3
- package/lib/Dropdown/Dropdown.js +89 -85
- package/lib/Dropdown/Dropdown.styles.d.ts +37 -34
- package/lib/Dropdown/Dropdown.styles.js +62 -43
- package/lib/Dropdown/Dropdown.types.js +5 -1
- package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +30 -20
- package/lib/Dropdown/Triggers/DropdownLinkTrigger.js +29 -19
- package/lib/Dropdown/Triggers/InputTrigger.js +18 -10
- package/lib/Dropdown/Triggers/SelectTrigger.js +19 -12
- package/lib/Dropdown/Triggers/hooks.js +18 -14
- package/lib/Dropdown/Triggers/index.js +60 -5
- package/lib/Dropdown/Triggers/types.js +5 -1
- package/lib/Dropdown/index.js +49 -4
- package/lib/Flexbox/Flexbox.d.ts +31 -17
- package/lib/Flexbox/Flexbox.js +36 -16
- package/lib/Flexbox/index.js +16 -1
- package/lib/Group/Group.js +17 -8
- package/lib/Group/Group.styles.d.ts +8 -10
- package/lib/Group/Group.styles.js +17 -7
- package/lib/Group/Group.types.js +5 -1
- package/lib/Group/index.js +16 -1
- package/lib/Icon/Icon.js +24 -14
- package/lib/Icon/Icon.styles.d.ts +9 -11
- package/lib/Icon/Icon.styles.js +39 -44
- package/lib/Icon/Icon.types.js +5 -1
- package/lib/Icon/index.js +16 -1
- package/lib/IconAndText/IconAndText.js +33 -21
- package/lib/IconAndText/IconAndText.styles.d.ts +8 -10
- package/lib/IconAndText/IconAndText.styles.js +20 -10
- package/lib/IconAndText/IconAndText.types.js +5 -1
- package/lib/IconAndText/index.js +16 -1
- package/lib/Icons/Chevrons.js +53 -41
- package/lib/Icons/CodacyIcon.js +17 -8
- package/lib/Icons/Messages.js +54 -35
- package/lib/Icons/Search.js +16 -7
- package/lib/Icons/Severities.js +117 -106
- package/lib/Icons/Sorting.js +23 -13
- package/lib/Icons/Spinner.js +19 -10
- package/lib/Icons/Symbols.js +73 -58
- package/lib/Icons/index.js +93 -8
- package/lib/Img/Img.js +44 -37
- package/lib/Img/Img.styles.d.ts +12 -11
- package/lib/Img/Img.styles.js +37 -32
- package/lib/Img/Img.types.js +5 -1
- package/lib/Img/index.js +16 -1
- package/lib/InlineMessage/InlineMessage.js +47 -34
- package/lib/InlineMessage/index.js +16 -1
- package/lib/InlineMessage/types.js +5 -1
- package/lib/Input/Input.js +148 -126
- package/lib/Input/hooks.js +149 -178
- package/lib/Input/index.js +27 -2
- package/lib/Input/styles.d.ts +55 -104
- package/lib/Input/styles.js +85 -54
- package/lib/Input/types.js +5 -1
- package/lib/Labeled/Labeled.js +34 -22
- package/lib/Labeled/index.js +16 -1
- package/lib/Labeled/styles.d.ts +16 -12
- package/lib/Labeled/styles.js +27 -11
- package/lib/Labeled/types.js +5 -1
- package/lib/LeftMenu/LeftMenu.js +20 -11
- package/lib/LeftMenu/LeftMenu.styles.d.ts +8 -10
- package/lib/LeftMenu/LeftMenu.styles.js +20 -10
- package/lib/LeftMenu/LeftMenu.types.js +5 -1
- package/lib/LeftMenu/index.js +16 -1
- package/lib/Link/Link.js +43 -33
- package/lib/Link/Link.styles.d.ts +4 -1
- package/lib/Link/Link.styles.js +21 -11
- package/lib/Link/Link.types.js +5 -1
- package/lib/Link/index.js +38 -3
- package/lib/Message/Message.js +32 -24
- package/lib/Message/Message.styles.d.ts +8 -10
- package/lib/Message/Message.styles.js +17 -7
- package/lib/Message/Message.types.js +5 -1
- package/lib/Message/index.js +16 -1
- package/lib/Modal/ConfirmationModal.js +64 -40
- package/lib/Modal/Modal.js +120 -107
- package/lib/Modal/index.js +27 -2
- package/lib/Modal/styles.d.ts +44 -61
- package/lib/Modal/styles.js +97 -85
- package/lib/Modal/types.js +5 -1
- package/lib/MoreInfo/MoreInfo.js +45 -39
- package/lib/MoreInfo/index.js +16 -1
- package/lib/MoreInfo/types.js +5 -1
- package/lib/Panel/Panel.js +18 -9
- package/lib/Panel/Panel.styles.d.ts +8 -11
- package/lib/Panel/Panel.styles.js +15 -5
- package/lib/Panel/Panel.types.js +5 -1
- package/lib/Panel/index.js +27 -2
- package/lib/PillLabel/PillLabel.js +28 -21
- package/lib/PillLabel/PillLabel.styles.d.ts +8 -10
- package/lib/PillLabel/PillLabel.styles.js +25 -16
- package/lib/PillLabel/PillLabel.types.js +5 -1
- package/lib/PillLabel/index.js +16 -1
- package/lib/Popup/Popup.js +55 -45
- package/lib/Popup/index.js +16 -1
- package/lib/Popup/styles.d.ts +12 -11
- package/lib/Popup/styles.js +21 -8
- package/lib/Popup/types.js +5 -1
- package/lib/ProgressBar/ProgressBar.js +30 -20
- package/lib/ProgressBar/index.js +27 -2
- package/lib/ProgressBar/styles.d.ts +24 -28
- package/lib/ProgressBar/styles.js +30 -14
- package/lib/ProgressBar/types.js +5 -1
- package/lib/Radio/Radio.js +53 -48
- package/lib/Radio/index.js +16 -1
- package/lib/Radio/styles.d.ts +25 -22
- package/lib/Radio/styles.js +49 -30
- package/lib/Radio/types.js +5 -1
- package/lib/ScrollableContent/ScrollableContent.js +35 -24
- package/lib/ScrollableContent/ScrollableContent.styles.d.ts +9 -11
- package/lib/ScrollableContent/ScrollableContent.styles.js +23 -13
- package/lib/ScrollableContent/ScrollableContent.types.js +5 -1
- package/lib/ScrollableContent/index.js +27 -2
- package/lib/ScrollableContent/useScrollContainer.js +29 -24
- package/lib/Select/Select.js +31 -20
- package/lib/Select/index.js +16 -1
- package/lib/Select/types.js +5 -1
- package/lib/Skeleton/Skeleton.js +30 -25
- package/lib/Skeleton/Skeleton.styles.d.ts +8 -10
- package/lib/Skeleton/Skeleton.styles.js +21 -14
- package/lib/Skeleton/Skeleton.types.js +5 -1
- package/lib/Skeleton/index.js +20 -2
- package/lib/Stepper/Stepper.js +49 -40
- package/lib/Stepper/Stepper.styles.d.ts +24 -29
- package/lib/Stepper/Stepper.styles.js +35 -19
- package/lib/Stepper/Stepper.types.js +5 -1
- package/lib/Stepper/index.js +16 -1
- package/lib/Switcher/Switcher.js +32 -23
- package/lib/Switcher/Switcher.styles.d.ts +13 -13
- package/lib/Switcher/Switcher.styles.js +27 -15
- package/lib/Switcher/Switcher.types.js +5 -1
- package/lib/Switcher/index.js +16 -1
- package/lib/Tab/Tab.js +31 -23
- package/lib/Tab/Tab.styles.d.ts +13 -12
- package/lib/Tab/Tab.styles.js +30 -21
- package/lib/Tab/Tab.types.js +5 -1
- package/lib/Tab/index.js +16 -1
- package/lib/Table/NewSelectableTable.js +77 -56
- package/lib/Table/SelectableTable.js +138 -118
- package/lib/Table/Table.js +126 -111
- package/lib/Table/Table.styles.d.ts +32 -16
- package/lib/Table/Table.styles.js +79 -59
- package/lib/Table/Table.types.js +5 -1
- package/lib/Table/index.js +27 -2
- package/lib/TagsInput/TagsInput.js +44 -33
- package/lib/TagsInput/index.js +16 -1
- package/lib/TagsInput/style.d.ts +16 -19
- package/lib/TagsInput/style.js +22 -9
- package/lib/TagsInput/types.js +5 -1
- package/lib/Textarea/Textarea.js +75 -58
- package/lib/Textarea/Textarea.styles.d.ts +28 -22
- package/lib/Textarea/Textarea.styles.js +55 -32
- package/lib/Textarea/Textarea.types.js +5 -1
- package/lib/Textarea/index.js +16 -1
- package/lib/ThemeProvider/ThemeProvider.d.ts +5 -2
- package/lib/ThemeProvider/ThemeProvider.js +48 -30
- package/lib/ThemeProvider/index.js +16 -1
- package/lib/Toast/Toast.js +56 -53
- package/lib/Toast/index.js +16 -1
- package/lib/Toast/styles.d.ts +4 -2
- package/lib/Toast/styles.js +13 -3
- package/lib/Toast/types.js +5 -1
- package/lib/Toggle/Toggle.js +59 -50
- package/lib/Toggle/index.js +16 -1
- package/lib/Toggle/styles.d.ts +21 -14
- package/lib/Toggle/styles.js +51 -34
- package/lib/Toggle/types.js +5 -1
- package/lib/Tooltip/Tooltip.js +100 -102
- package/lib/Tooltip/index.js +16 -1
- package/lib/Tooltip/styles.d.ts +14 -8
- package/lib/Tooltip/styles.js +33 -25
- package/lib/Tooltip/types.js +5 -1
- package/lib/Typography/Typography.js +96 -85
- package/lib/Typography/Typography.styles.d.ts +48 -54
- package/lib/Typography/Typography.styles.js +70 -45
- package/lib/Typography/Typography.types.js +5 -1
- package/lib/Typography/index.js +38 -3
- package/lib/emotion.d.js +3 -0
- package/lib/hooks/index.js +38 -3
- package/lib/hooks/useForwardedRef.js +11 -6
- package/lib/hooks/useInfiniteScroll.js +24 -20
- package/lib/hooks/useStatefulRef.js +18 -14
- package/lib/index.js +489 -44
- package/lib/system-props/color.js +8 -2
- package/lib/system-props/index.js +27 -2
- package/lib/system-props/types.js +5 -1
- package/lib/theme/ColorSchemes/codacy.js +11 -4
- package/lib/theme/ColorSchemes/pulse.js +17 -9
- package/lib/theme/index.js +38 -3
- package/lib/theme/theme.js +42 -69
- package/lib/types.js +5 -1
- package/lib/utils/hash.js +8 -6
- package/lib/utils/reactNodeToText.js +13 -14
- package/package.json +32 -32
package/lib/Panel/Panel.js
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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),
|
|
22
|
+
}, props), {}, {
|
|
23
|
+
children: children
|
|
24
|
+
}));
|
|
16
25
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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,
|
|
25
|
+
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9QYW5lbC9QYW5lbC5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSWdEIiwiZmlsZSI6Ii4uLy4uL3NyYy9QYW5lbC9QYW5lbC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IENvbG9yIH0gZnJvbSAnLi4vdGhlbWUnXG5pbXBvcnQgeyBCb3gsIEJveFByb3BzIH0gZnJvbSAnLi4vRmxleGJveCdcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFBhbmVsID0gc3R5bGVkKEJveCk8Qm94UHJvcHM+YFxuICBiYWNrZ3JvdW5kOiAkeyh7IHRoZW1lLCBiYWNrZ3JvdW5kQ29sb3IgfSkgPT4gdGhlbWUuY29sb3JzWyhiYWNrZ3JvdW5kQ29sb3IgfHwgJ2JhY2tncm91bmQtcHJpbWFyeScpIGFzIENvbG9yXX07XG4gIGJvcmRlcjogMXB4IHNvbGlkICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuY29sb3JzWyd1aS1ib3JkZXInXX07XG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUucmFkaWlbMV19O1xuYFxuIl19 */"));
|
package/lib/Panel/Panel.types.js
CHANGED
package/lib/Panel/index.js
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
29
|
-
});
|
|
30
|
-
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
30
|
+
size = _ref4.size;
|
|
21
31
|
return theme.space[size === 'md' ? 5 : 4];
|
|
22
|
-
}, "
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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,
|
|
60
|
+
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9QaWxsTGFiZWwvUGlsbExhYmVsLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPMkQiLCJmaWxlIjoiLi4vLi4vc3JjL1BpbGxMYWJlbC9QaWxsTGFiZWwuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29sb3IgfSBmcm9tICcuLi90aGVtZSdcbmltcG9ydCB7IFBpbGxMYWJlbFByb3BzLCBQaWxsTGFiZWxTdGF0dXMgfSBmcm9tICcuL1BpbGxMYWJlbC50eXBlcydcbmltcG9ydCB7IEJveCB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBJY29uQW5kVGV4dFdyYXBwZXIgfSBmcm9tICcuLi9JY29uQW5kVGV4dC9JY29uQW5kVGV4dC5zdHlsZXMnXG5pbXBvcnQgeyBJY29uV3JhcHBlciB9IGZyb20gJy4uL0ljb24vSWNvbi5zdHlsZXMnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcblxuZXhwb3J0IGNvbnN0IFBpbGxMYWJlbFdyYXBwZXIgPSBzdHlsZWQoQm94KTxQaWxsTGFiZWxQcm9wcz5gXG4gIHBhZGRpbmc6IDAgJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5zcGFjZVsyXX07XG4gIGhlaWdodDogJHsoeyB0aGVtZSwgc2l6ZSB9KSA9PiB0aGVtZS5zcGFjZVtzaXplID09PSAnbWQnID8gNSA6IDRdfTtcbiAgbGluZS1oZWlnaHQ6ICR7KHsgdGhlbWUsIHNpemUgfSkgPT4gdGhlbWUuc3BhY2Vbc2l6ZSA9PT0gJ21kJyA/IDUgOiA0XX07XG5cbiAgJHtJY29uQW5kVGV4dFdyYXBwZXJ9LCAke0ljb25XcmFwcGVyfSB7XG4gICAgbGluZS1oZWlnaHQ6ICR7KHsgdGhlbWUsIHNpemUgfSkgPT4gdGhlbWUuc3BhY2Vbc2l6ZSA9PT0gJ21kJyA/IDUgOiA0XX0gIWltcG9ydGFudDtcbiAgfVxuXG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUucmFkaWlbMV19O1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGZvbnQtd2VpZ2h0OiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmZvbnRXZWlnaHRzLmJvbGR9O1xuICBmb250LXNpemU6ICR7KHsgdGhlbWUsIHNpemUgfSkgPT4gdGhlbWUuZm9udFNpemVzW3NpemUgPT09ICdtZCcgPyAxIDogMF19O1xuXG4gIHRleHQtdHJhbnNmb3JtOiAkeyh7IHNpemUgfSkgPT4gKHNpemUgPT09ICdtZCcgPyAnbm9uZScgOiAndXBwZXJjYXNlJyl9O1xuXG4gICR7KHsgc3RhdHVzID0gJ2RlZmF1bHQnLCBpbnZlcnQsIHRoZW1lIH0pID0+IHtcbiAgICAvKiogeyBzdGF0dXM6IFsgbWFpbiwgdGV4dCwgYmFja2dyb3VuZCBdIH0gKi9cbiAgICBjb25zdCBzY2hlbWU6IHsgW2tleSBpbiBQaWxsTGFiZWxTdGF0dXNdOiBbQ29sb3IsIENvbG9yLCBDb2xvcl0gfSA9IHtcbiAgICAgIGRlZmF1bHQ6IFsnYWNjZW50LXN1YnRsZScsICd0ZXh0LXNlY29uZGFyeScsICdiYWNrZ3JvdW5kLW5ldXRyYWwnXSxcbiAgICAgIGF0dGVudGlvbjogWydhY2NlbnQtYXR0ZW50aW9uJywgJ3RleHQtYXR0ZW50aW9uJywgJ2JhY2tncm91bmQtYXR0ZW50aW9uJ10sXG4gICAgICBzdWNjZXNzOiBbJ2FjY2VudC1zdWNjZXNzJywgJ3RleHQtc3VjY2VzcycsICdiYWNrZ3JvdW5kLXN1Y2Nlc3MnXSxcbiAgICAgIGluZm86IFsnYWNjZW50LWluZm8nLCAndGV4dC1pbmZvJywgJ2JhY2tncm91bmQtaW5mbyddLFxuICAgICAgd2FybmluZzogWydhY2NlbnQtd2FybmluZycsICd0ZXh0LXdhcm5pbmcnLCAnYmFja2dyb3VuZC13YXJuaW5nJ10sXG4gICAgICBlcnJvcjogWydhY2NlbnQtZGFuZ2VyJywgJ3RleHQtZGFuZ2VyJywgJ2JhY2tncm91bmQtZGFuZ2VyJ10sXG4gICAgfVxuXG4gICAgcmV0dXJuIGBcbiAgICAgIGNvbG9yOiAke2ludmVydCA/IHRoZW1lLmNvbG9yc1snd2hpdGUnXSA6IHRoZW1lLmNvbG9yc1tzY2hlbWVbc3RhdHVzXVsxXV19O1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtpbnZlcnQgPyB0aGVtZS5jb2xvcnNbc2NoZW1lW3N0YXR1c11bMF1dIDogdGhlbWUuY29sb3JzW3NjaGVtZVtzdGF0dXNdWzJdXX07XG4gICAgYFxuICB9fVxuYFxuIl19 */"));
|
package/lib/PillLabel/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
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
|
+
});
|
package/lib/Popup/Popup.js
CHANGED
|
@@ -1,65 +1,75 @@
|
|
|
1
|
-
|
|
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
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
};
|
|
44
|
+
};
|
|
45
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
46
|
}, []);
|
|
40
|
-
return /*#__PURE__*/
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
59
|
-
return /*#__PURE__*/
|
|
69
|
+
children = _ref2.children;
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.Box, {
|
|
60
71
|
position: "relative",
|
|
61
|
-
display: "inline-block"
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export { Popup, PopupAroundElement };
|
|
72
|
+
display: "inline-block",
|
|
73
|
+
children: [children, popupElement]
|
|
74
|
+
});
|
|
75
|
+
};
|
package/lib/Popup/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
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
|
+
});
|
package/lib/Popup/styles.d.ts
CHANGED
|
@@ -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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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>, {}>;
|
package/lib/Popup/styles.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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,
|
|
21
|
-
|
|
22
|
-
target: "
|
|
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,
|
|
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= */"));
|
package/lib/Popup/types.js
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
};
|