@codacy/ui-components 0.66.25 → 0.66.26
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 +20 -28
- package/lib/Avatar/Avatar.types.js +1 -5
- package/lib/Avatar/gravatar.js +14 -22
- package/lib/Avatar/index.js +1 -16
- package/lib/Banner/Banner.js +33 -50
- package/lib/Banner/Banner.styles.d.ts +1 -1
- package/lib/Banner/Banner.styles.js +11 -20
- package/lib/Banner/Banner.types.js +1 -5
- package/lib/Banner/index.js +2 -27
- package/lib/Bannerol/Bannerol.js +44 -61
- package/lib/Bannerol/Bannerol.styles.js +9 -18
- package/lib/Bannerol/Bannerol.types.js +1 -5
- package/lib/Bannerol/index.js +3 -38
- package/lib/BigTabs/BigTabs.js +39 -54
- package/lib/BigTabs/BigTabs.styles.js +79 -107
- package/lib/BigTabs/BigTabs.types.js +1 -5
- package/lib/BigTabs/index.js +1 -16
- package/lib/Button/Button.js +45 -67
- package/lib/Button/index.js +2 -27
- package/lib/Button/styles.js +101 -130
- package/lib/Button/types.js +1 -5
- package/lib/Checkbox/Checkbox.js +55 -68
- package/lib/Checkbox/CheckboxFilterList.js +33 -66
- package/lib/Checkbox/index.js +3 -38
- package/lib/Checkbox/styles.js +64 -86
- package/lib/Checkbox/types.js +1 -5
- package/lib/CloseButton/index.d.ts +1 -1
- package/lib/CloseButton/index.js +24 -36
- package/lib/Divider/Divider.js +14 -25
- package/lib/Divider/Divider.styles.d.ts +1 -1
- package/lib/Divider/Divider.styles.js +24 -38
- package/lib/Divider/Divider.types.js +1 -5
- package/lib/Divider/index.js +1 -16
- package/lib/Dropdown/Content/DropdownInput.js +10 -20
- package/lib/Dropdown/Content/DropdownItem.js +22 -36
- package/lib/Dropdown/Content/DropdownSeparator.js +8 -19
- package/lib/Dropdown/Content/DropdownTitle.js +8 -22
- package/lib/Dropdown/Content/index.js +4 -49
- package/lib/Dropdown/Dropdown.js +74 -102
- package/lib/Dropdown/Dropdown.styles.d.ts +1 -1
- package/lib/Dropdown/Dropdown.styles.js +60 -82
- package/lib/Dropdown/Dropdown.types.js +1 -5
- package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +19 -32
- package/lib/Dropdown/Triggers/DropdownItemTrigger.js +18 -30
- package/lib/Dropdown/Triggers/FilterTrigger.js +66 -93
- package/lib/Dropdown/Triggers/InputTrigger.js +15 -24
- package/lib/Dropdown/Triggers/SelectTrigger.js +12 -21
- package/lib/Dropdown/Triggers/hooks.js +17 -26
- package/lib/Dropdown/Triggers/index.js +6 -71
- package/lib/Dropdown/Triggers/types.js +1 -5
- package/lib/Dropdown/index.js +4 -49
- package/lib/ExpandableBox/ExpandableBox.js +28 -43
- package/lib/ExpandableBox/ExpandableBox.styles.d.ts +2 -2
- package/lib/ExpandableBox/ExpandableBox.styles.js +27 -40
- package/lib/ExpandableBox/ExpandableBox.types.js +1 -5
- package/lib/ExpandableBox/index.js +1 -16
- package/lib/Flexbox/Flexbox.js +14 -21
- package/lib/Flexbox/index.js +1 -16
- package/lib/Group/Group.js +7 -18
- package/lib/Group/Group.styles.js +8 -16
- package/lib/Group/Group.types.js +1 -5
- package/lib/Group/index.js +1 -16
- package/lib/Icon/Icon.js +15 -26
- package/lib/Icon/Icon.styles.d.ts +1 -1
- package/lib/Icon/Icon.styles.js +57 -50
- package/lib/Icon/Icon.types.js +1 -5
- package/lib/Icon/index.js +1 -16
- package/lib/IconAndText/IconAndText.js +23 -36
- package/lib/IconAndText/IconAndText.styles.js +19 -29
- package/lib/IconAndText/IconAndText.types.js +1 -5
- package/lib/IconAndText/index.js +1 -16
- package/lib/Icons/Chevrons.js +45 -65
- package/lib/Icons/CodacyIcon.js +9 -20
- package/lib/Icons/Ellipsis.js +18 -29
- package/lib/Icons/Messages.js +58 -79
- package/lib/Icons/Search.js +8 -19
- package/lib/Icons/Severities.js +113 -149
- package/lib/Icons/Sorting.js +15 -29
- package/lib/Icons/Spinner.js +11 -22
- package/lib/Icons/Symbols.js +67 -90
- package/lib/Icons/index.js +8 -93
- package/lib/Img/Img.js +26 -45
- package/lib/Img/Img.styles.d.ts +2 -2
- package/lib/Img/Img.styles.js +21 -29
- package/lib/Img/Img.types.js +1 -5
- package/lib/Img/index.js +1 -16
- package/lib/InlineMessage/InlineMessage.js +43 -70
- package/lib/InlineMessage/index.js +1 -16
- package/lib/InlineMessage/types.js +1 -5
- package/lib/Input/Input.js +115 -143
- package/lib/Input/hooks.js +107 -208
- package/lib/Input/index.js +2 -27
- package/lib/Input/styles.d.ts +2 -2
- package/lib/Input/styles.js +116 -151
- package/lib/Input/types.js +1 -5
- package/lib/Labeled/Labeled.js +22 -35
- package/lib/Labeled/index.js +1 -16
- package/lib/Labeled/styles.js +23 -37
- package/lib/Labeled/types.js +1 -5
- package/lib/LeftMenu/LeftMenu.js +10 -21
- package/lib/LeftMenu/LeftMenu.styles.js +25 -43
- package/lib/LeftMenu/LeftMenu.types.js +1 -5
- package/lib/LeftMenu/index.js +1 -16
- package/lib/Link/Link.js +32 -50
- package/lib/Link/Link.styles.js +11 -23
- package/lib/Link/Link.types.js +1 -5
- package/lib/Link/index.js +3 -38
- package/lib/Message/Message.js +31 -42
- package/lib/Message/Message.styles.js +18 -31
- package/lib/Message/Message.types.js +1 -5
- package/lib/Message/index.js +1 -16
- package/lib/Modal/ConfirmationModal.js +40 -67
- package/lib/Modal/Modal.js +107 -137
- package/lib/Modal/index.js +2 -27
- package/lib/Modal/styles.js +44 -62
- package/lib/Modal/types.js +1 -5
- package/lib/MoreInfo/MoreInfo.js +41 -53
- package/lib/MoreInfo/index.js +1 -16
- package/lib/MoreInfo/types.js +1 -5
- package/lib/MultiSlider/MultiSlider.js +17 -31
- package/lib/MultiSlider/index.js +1 -16
- package/lib/MultiSlider/styles.js +18 -34
- package/lib/MultiSlider/types.js +1 -5
- package/lib/Panel/Panel.js +9 -19
- package/lib/Panel/Panel.styles.js +15 -26
- package/lib/Panel/Panel.types.js +1 -5
- package/lib/Panel/index.js +2 -27
- package/lib/PillLabel/PillLabel.js +35 -49
- package/lib/PillLabel/PillLabel.styles.js +33 -44
- package/lib/PillLabel/PillLabel.types.js +1 -5
- package/lib/PillLabel/index.js +1 -16
- package/lib/Popup/Popup.js +43 -61
- package/lib/Popup/index.js +1 -16
- package/lib/Popup/styles.js +22 -37
- package/lib/Popup/types.js +1 -5
- package/lib/ProgressBar/ProgressBar.js +19 -34
- package/lib/ProgressBar/index.js +2 -27
- package/lib/ProgressBar/styles.js +21 -35
- package/lib/ProgressBar/types.js +1 -5
- package/lib/Radio/Radio.js +47 -59
- package/lib/Radio/index.js +1 -16
- package/lib/Radio/styles.js +48 -72
- package/lib/Radio/types.js +1 -5
- package/lib/ScrollableContent/ScrollableContent.js +27 -40
- package/lib/ScrollableContent/ScrollableContent.styles.js +22 -39
- package/lib/ScrollableContent/ScrollableContent.types.js +1 -5
- package/lib/ScrollableContent/index.js +2 -27
- package/lib/ScrollableContent/useScrollContainer.js +35 -50
- package/lib/Skeleton/Skeleton.js +25 -45
- package/lib/Skeleton/Skeleton.styles.js +28 -25
- package/lib/Skeleton/Skeleton.types.js +1 -5
- package/lib/Skeleton/index.js +2 -20
- package/lib/Slider/Slider.js +32 -56
- package/lib/Slider/index.js +1 -16
- package/lib/Slider/styles.js +41 -60
- package/lib/Slider/types.js +1 -5
- package/lib/StepNumber/StepNumber.js +26 -40
- package/lib/StepNumber/index.js +1 -16
- package/lib/StepNumber/styles.js +13 -24
- package/lib/StepNumber/types.js +1 -5
- package/lib/Stepper/Stepper.js +45 -62
- package/lib/Stepper/Stepper.styles.js +27 -44
- package/lib/Stepper/Stepper.types.js +1 -5
- package/lib/Stepper/index.js +1 -16
- package/lib/Switcher/Switcher.js +22 -34
- package/lib/Switcher/Switcher.styles.js +27 -42
- package/lib/Switcher/Switcher.types.js +1 -5
- package/lib/Switcher/index.js +1 -16
- package/lib/Tab/Tab.js +21 -33
- package/lib/Tab/Tab.styles.js +34 -50
- package/lib/Tab/Tab.types.js +1 -5
- package/lib/Tab/index.js +1 -16
- package/lib/Table/NewSelectableTable.js +59 -97
- package/lib/Table/SelectableTable.js +142 -189
- package/lib/Table/Table.js +110 -155
- package/lib/Table/Table.styles.js +67 -90
- package/lib/Table/Table.types.js +1 -5
- package/lib/Table/index.js +2 -27
- package/lib/TagsInput/TagsInput.js +32 -46
- package/lib/TagsInput/index.js +1 -16
- package/lib/TagsInput/style.js +45 -71
- package/lib/TagsInput/types.js +1 -5
- package/lib/Textarea/Textarea.js +52 -71
- package/lib/Textarea/Textarea.styles.js +91 -126
- package/lib/Textarea/Textarea.types.js +1 -5
- package/lib/Textarea/index.js +1 -16
- package/lib/ThemeProvider/ThemeProvider.js +41 -65
- package/lib/ThemeProvider/index.js +1 -16
- package/lib/Toast/Toast.js +53 -68
- package/lib/Toast/index.js +1 -16
- package/lib/Toast/styles.js +29 -49
- package/lib/Toast/types.js +1 -5
- package/lib/Toggle/Toggle.js +48 -65
- package/lib/Toggle/index.js +1 -16
- package/lib/Toggle/styles.d.ts +1 -1
- package/lib/Toggle/styles.js +66 -101
- package/lib/Toggle/types.js +1 -5
- package/lib/Tooltip/Tooltip.js +84 -121
- package/lib/Tooltip/index.js +2 -27
- package/lib/Tooltip/styles.js +61 -91
- package/lib/Tooltip/types.js +1 -5
- package/lib/Typography/Typography.js +78 -116
- package/lib/Typography/Typography.styles.js +61 -78
- package/lib/Typography/Typography.types.js +1 -5
- package/lib/Typography/index.js +3 -38
- package/lib/emotion.d.js +1 -3
- package/lib/hooks/index.js +3 -38
- package/lib/hooks/useForwardedRef.js +5 -11
- package/lib/hooks/useInfiniteScroll.js +13 -25
- package/lib/hooks/useStatefulRef.js +10 -23
- package/lib/index.js +49 -544
- package/lib/system-props/color.js +3 -9
- package/lib/system-props/index.js +2 -27
- package/lib/system-props/types.js +1 -5
- package/lib/theme/ColorSchemes/components/alerts.js +30 -38
- package/lib/theme/ColorSchemes/components/button.js +89 -97
- package/lib/theme/ColorSchemes/components/cards.js +16 -24
- package/lib/theme/ColorSchemes/components/charts.js +93 -101
- package/lib/theme/ColorSchemes/components/checkbox-input.js +13 -21
- package/lib/theme/ColorSchemes/components/divider.js +4 -12
- package/lib/theme/ColorSchemes/components/drawer.js +21 -29
- package/lib/theme/ColorSchemes/components/effects.js +5 -13
- package/lib/theme/ColorSchemes/components/filters.js +12 -20
- package/lib/theme/ColorSchemes/components/index.js +23 -258
- package/lib/theme/ColorSchemes/components/input.js +38 -46
- package/lib/theme/ColorSchemes/components/issues.js +27 -35
- package/lib/theme/ColorSchemes/components/label.js +33 -41
- package/lib/theme/ColorSchemes/components/list-orb.js +8 -16
- package/lib/theme/ColorSchemes/components/loading.js +4 -12
- package/lib/theme/ColorSchemes/components/logo.js +6 -14
- package/lib/theme/ColorSchemes/components/modals.js +6 -14
- package/lib/theme/ColorSchemes/components/navigation.js +17 -25
- package/lib/theme/ColorSchemes/components/progress-bar.js +5 -13
- package/lib/theme/ColorSchemes/components/selector.js +20 -28
- package/lib/theme/ColorSchemes/components/stepper.js +9 -17
- package/lib/theme/ColorSchemes/components/tables.js +12 -20
- package/lib/theme/ColorSchemes/components/tabs.js +13 -21
- package/lib/theme/ColorSchemes/components/tooltip.js +6 -14
- package/lib/theme/ColorSchemes/components/utils.js +1 -11
- package/lib/theme/ColorSchemes/dark/background.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/background.js +42 -50
- package/lib/theme/ColorSchemes/dark/border.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/border.js +37 -45
- package/lib/theme/ColorSchemes/dark/data.js +18 -24
- package/lib/theme/ColorSchemes/dark/icon.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/icon.js +40 -48
- package/lib/theme/ColorSchemes/dark/illustration.js +11 -17
- package/lib/theme/ColorSchemes/dark/index.js +60 -31
- package/lib/theme/ColorSchemes/dark/text.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/text.js +47 -54
- package/lib/theme/ColorSchemes/index.js +4 -49
- package/lib/theme/ColorSchemes/light/background.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/background.js +42 -50
- package/lib/theme/ColorSchemes/light/border.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/border.js +37 -45
- package/lib/theme/ColorSchemes/light/data.js +18 -24
- package/lib/theme/ColorSchemes/light/icon.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/icon.js +40 -48
- package/lib/theme/ColorSchemes/light/illustration.js +11 -17
- package/lib/theme/ColorSchemes/light/index.d.ts +54 -54
- package/lib/theme/ColorSchemes/light/index.js +43 -19
- package/lib/theme/ColorSchemes/light/text.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/text.js +47 -54
- package/lib/theme/ColorSchemes/primitives/blue.js +1 -7
- package/lib/theme/ColorSchemes/primitives/green.js +1 -7
- package/lib/theme/ColorSchemes/primitives/grey.js +1 -7
- package/lib/theme/ColorSchemes/primitives/index.d.ts +9 -9
- package/lib/theme/ColorSchemes/primitives/index.js +20 -18
- package/lib/theme/ColorSchemes/primitives/magenta.js +1 -7
- package/lib/theme/ColorSchemes/primitives/orange.js +1 -7
- package/lib/theme/ColorSchemes/primitives/purple.js +1 -7
- package/lib/theme/ColorSchemes/primitives/red.js +1 -7
- package/lib/theme/ColorSchemes/primitives/teal.js +1 -7
- package/lib/theme/ColorSchemes/primitives/yellow.js +1 -7
- package/lib/theme/ColorSchemes/semantics.js +7 -13
- package/lib/theme/index.js +2 -27
- package/lib/theme/theme.js +68 -77
- package/lib/types.js +1 -5
- package/lib/utils/hash.js +3 -9
- package/lib/utils/reactNodeToText.js +9 -17
- package/package.json +21 -11
package/lib/Icons/Symbols.js
CHANGED
|
@@ -1,93 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { useTheme } from '@emotion/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
className: "ionicon",
|
|
6
|
+
viewBox: "0 0 512 512"
|
|
7
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
8
|
+
strokeLinecap: "round",
|
|
9
|
+
strokeLinejoin: "round",
|
|
10
|
+
d: "M416 128L192 384l-96-96",
|
|
11
|
+
className: "ionicon-fill-none ionicon-stroke-width"
|
|
12
|
+
}));
|
|
13
|
+
export const MinusIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
className: "ionicon",
|
|
16
|
+
viewBox: "0 0 512 512"
|
|
17
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
d: "M400 256H112",
|
|
21
|
+
className: "ionicon-fill-none ionicon-stroke-width"
|
|
22
|
+
}));
|
|
23
|
+
export const CloseIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
24
|
+
className: "ionicon close-icon",
|
|
25
|
+
viewBox: "0 0 512 512"
|
|
26
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
strokeLinecap: "round",
|
|
28
|
+
strokeLinejoin: "round",
|
|
29
|
+
d: "M368 368L144 144M368 144L144 368",
|
|
30
|
+
className: "ionicon-fill-none ionicon-stroke-width"
|
|
31
|
+
}));
|
|
32
|
+
export const DangerIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
34
|
+
className: "ionicon",
|
|
35
|
+
viewBox: "0 0 512 512"
|
|
36
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
37
|
+
d: "M85.57 446.25h340.86a32 32 0 0028.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0028.17 47.17z",
|
|
38
|
+
strokeLinecap: "round",
|
|
39
|
+
strokeLinejoin: "round",
|
|
40
|
+
className: "ionicon-fill-none ionicon-stroke-width"
|
|
41
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
42
|
+
d: "M250.26 195.39l5.74 122 5.73-121.95a5.74 5.74 0 00-5.79-6h0a5.74 5.74 0 00-5.68 5.95z",
|
|
43
|
+
strokeLinecap: "round",
|
|
44
|
+
strokeLinejoin: "round",
|
|
45
|
+
className: "ionicon-fill-none ionicon-stroke-width"
|
|
46
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
47
|
+
d: "M256 397.25a20 20 0 1120-20 20 20 0 01-20 20z"
|
|
48
|
+
}));
|
|
49
|
+
export const RocketIcon = ({
|
|
50
|
+
color = 'icon-attention'
|
|
51
|
+
}) => {
|
|
52
|
+
const theme = useTheme();
|
|
53
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
13
54
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
55
|
className: "ionicon",
|
|
15
|
-
viewBox: "0 0 512 512"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
30
|
-
strokeLinecap: "round",
|
|
31
|
-
strokeLinejoin: "round",
|
|
32
|
-
d: "M400 256H112",
|
|
33
|
-
className: "ionicon-fill-none ionicon-stroke-width"
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
var CloseIcon = exports.CloseIcon = function CloseIcon() {
|
|
38
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
39
|
-
className: "ionicon close-icon",
|
|
40
|
-
viewBox: "0 0 512 512",
|
|
41
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
42
|
-
strokeLinecap: "round",
|
|
43
|
-
strokeLinejoin: "round",
|
|
44
|
-
d: "M368 368L144 144M368 144L144 368",
|
|
45
|
-
className: "ionicon-fill-none ionicon-stroke-width"
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
var DangerIcon = exports.DangerIcon = function DangerIcon() {
|
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
51
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
52
|
-
className: "ionicon",
|
|
53
|
-
viewBox: "0 0 512 512",
|
|
54
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
55
|
-
d: "M85.57 446.25h340.86a32 32 0 0028.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0028.17 47.17z",
|
|
56
|
-
strokeLinecap: "round",
|
|
57
|
-
strokeLinejoin: "round",
|
|
58
|
-
className: "ionicon-fill-none ionicon-stroke-width"
|
|
59
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
60
|
-
d: "M250.26 195.39l5.74 122 5.73-121.95a5.74 5.74 0 00-5.79-6h0a5.74 5.74 0 00-5.68 5.95z",
|
|
61
|
-
strokeLinecap: "round",
|
|
62
|
-
strokeLinejoin: "round",
|
|
63
|
-
className: "ionicon-fill-none ionicon-stroke-width"
|
|
64
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
65
|
-
d: "M256 397.25a20 20 0 1120-20 20 20 0 01-20 20z"
|
|
66
|
-
})]
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
var RocketIcon = exports.RocketIcon = function RocketIcon(_ref) {
|
|
70
|
-
var _ref$color = _ref.color,
|
|
71
|
-
color = _ref$color === void 0 ? 'icon-attention' : _ref$color;
|
|
72
|
-
var theme = (0, _react.useTheme)();
|
|
73
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
74
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
75
|
-
className: "ionicon",
|
|
76
|
-
viewBox: "0 0 512 512",
|
|
77
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
|
|
78
|
-
children: "Rocket"
|
|
79
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
80
|
-
d: "M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z",
|
|
81
|
-
strokeLinecap: "round",
|
|
82
|
-
strokeLinejoin: "round",
|
|
83
|
-
className: "ionicon-fill-none ionicon-stroke-width",
|
|
84
|
-
stroke: theme.colors[color]
|
|
85
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
86
|
-
d: "M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32",
|
|
87
|
-
strokeLinecap: "round",
|
|
88
|
-
strokeLinejoin: "round",
|
|
89
|
-
className: "ionicon-fill-none ionicon-stroke-width",
|
|
90
|
-
stroke: theme.colors[color]
|
|
91
|
-
})]
|
|
92
|
-
});
|
|
56
|
+
viewBox: "0 0 512 512"
|
|
57
|
+
}, /*#__PURE__*/React.createElement("title", null, "Rocket"), /*#__PURE__*/React.createElement("path", {
|
|
58
|
+
d: "M461.81 53.81a4.4 4.4 0 00-3.3-3.39c-54.38-13.3-180 34.09-248.13 102.17a294.9 294.9 0 00-33.09 39.08c-21-1.9-42-.3-59.88 7.5-50.49 22.2-65.18 80.18-69.28 105.07a9 9 0 009.8 10.4l81.07-8.9a180.29 180.29 0 001.1 18.3 18.15 18.15 0 005.3 11.09l31.39 31.39a18.15 18.15 0 0011.1 5.3 179.91 179.91 0 0018.19 1.1l-8.89 81a9 9 0 0010.39 9.79c24.9-4 83-18.69 105.07-69.17 7.8-17.9 9.4-38.79 7.6-59.69a293.91 293.91 0 0039.19-33.09c68.38-68 115.47-190.86 102.37-247.95zM298.66 213.67a42.7 42.7 0 1160.38 0 42.65 42.65 0 01-60.38 0z",
|
|
59
|
+
strokeLinecap: "round",
|
|
60
|
+
strokeLinejoin: "round",
|
|
61
|
+
className: "ionicon-fill-none ionicon-stroke-width",
|
|
62
|
+
stroke: theme.colors[color]
|
|
63
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
64
|
+
d: "M109.64 352a45.06 45.06 0 00-26.35 12.84C65.67 382.52 64 448 64 448s65.52-1.67 83.15-19.31A44.73 44.73 0 00160 402.32",
|
|
65
|
+
strokeLinecap: "round",
|
|
66
|
+
strokeLinejoin: "round",
|
|
67
|
+
className: "ionicon-fill-none ionicon-stroke-width",
|
|
68
|
+
stroke: theme.colors[color]
|
|
69
|
+
}));
|
|
93
70
|
};
|
package/lib/Icons/index.js
CHANGED
|
@@ -1,93 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (key in exports && exports[key] === _Search[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Search[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _Spinner = require("./Spinner");
|
|
18
|
-
Object.keys(_Spinner).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _Spinner[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _Spinner[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _Chevrons = require("./Chevrons");
|
|
29
|
-
Object.keys(_Chevrons).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _Chevrons[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _Chevrons[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _Sorting = require("./Sorting");
|
|
40
|
-
Object.keys(_Sorting).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _Sorting[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function get() {
|
|
46
|
-
return _Sorting[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _Symbols = require("./Symbols");
|
|
51
|
-
Object.keys(_Symbols).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _Symbols[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _Symbols[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _Messages = require("./Messages");
|
|
62
|
-
Object.keys(_Messages).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _Messages[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function get() {
|
|
68
|
-
return _Messages[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _Severities = require("./Severities");
|
|
73
|
-
Object.keys(_Severities).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _Severities[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function get() {
|
|
79
|
-
return _Severities[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _CodacyIcon = require("./CodacyIcon");
|
|
84
|
-
Object.keys(_CodacyIcon).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _CodacyIcon[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function get() {
|
|
90
|
-
return _CodacyIcon[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
1
|
+
export * from './Search';
|
|
2
|
+
export * from './Spinner';
|
|
3
|
+
export * from './Chevrons';
|
|
4
|
+
export * from './Sorting';
|
|
5
|
+
export * from './Symbols';
|
|
6
|
+
export * from './Messages';
|
|
7
|
+
export * from './Severities';
|
|
8
|
+
export * from './CodacyIcon';
|
package/lib/Img/Img.js
CHANGED
|
@@ -1,55 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useState, useCallback } from 'react';
|
|
3
|
+
import { ImgWrapper, StyledImg } from './Img.styles';
|
|
2
4
|
|
|
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.Img = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var _Img = require("./Img.styles");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _excluded = ["src", "alt", "ratio", "fallbackImage", "rounded", "transparent", "fit"];
|
|
16
5
|
/**
|
|
17
6
|
* Description for Img
|
|
18
7
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fit = _ref$fit === void 0 ? 'cover' : _ref$fit,
|
|
32
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
33
|
-
var _useState = (0, _react.useState)(src),
|
|
34
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
35
|
-
imgSrc = _useState2[0],
|
|
36
|
-
setImgSrc = _useState2[1];
|
|
37
|
-
var handleError = (0, _react.useCallback)(function () {
|
|
8
|
+
const Img = ({
|
|
9
|
+
src = null,
|
|
10
|
+
alt,
|
|
11
|
+
ratio,
|
|
12
|
+
fallbackImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=',
|
|
13
|
+
rounded = false,
|
|
14
|
+
transparent = false,
|
|
15
|
+
fit = 'cover',
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const [imgSrc, setImgSrc] = useState(src);
|
|
19
|
+
const handleError = useCallback(() => {
|
|
38
20
|
if (fallbackImage && imgSrc !== fallbackImage) {
|
|
39
21
|
setImgSrc(fallbackImage);
|
|
40
22
|
}
|
|
41
23
|
}, [imgSrc, fallbackImage]);
|
|
42
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement(ImgWrapper, _extends({
|
|
43
25
|
ratio: ratio
|
|
44
|
-
}, props),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
fit: fit
|
|
53
|
-
})
|
|
26
|
+
}, props), /*#__PURE__*/React.createElement(StyledImg, {
|
|
27
|
+
src: imgSrc || fallbackImage,
|
|
28
|
+
alt: alt,
|
|
29
|
+
ratio: ratio,
|
|
30
|
+
onError: handleError,
|
|
31
|
+
rounded: rounded,
|
|
32
|
+
transparent: transparent,
|
|
33
|
+
fit: fit
|
|
54
34
|
}));
|
|
55
|
-
};
|
|
35
|
+
};
|
|
36
|
+
export { Img };
|
package/lib/Img/Img.styles.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export declare const ImgWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
7
7
|
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
8
8
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
9
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
} & import("..").FlexboxProps & import("..").GridboxProps & Pick<ImgProps, "
|
|
10
|
+
} & import("..").FlexboxProps & import("..").GridboxProps & Pick<ImgProps, "height" | "ratio">, {}, {}>;
|
|
11
11
|
export declare const StyledImg: import("@emotion/styled").StyledComponent<{
|
|
12
12
|
theme?: import("@emotion/react").Theme | undefined;
|
|
13
13
|
as?: import("react").ElementType<any> | undefined;
|
|
14
|
-
} & Pick<ImgProps, "transparent" | "
|
|
14
|
+
} & Pick<ImgProps, "transparent" | "rounded" | "ratio" | "fit">, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
package/lib/Img/Img.styles.js
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.StyledImg = exports.ImgWrapper = void 0;
|
|
8
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _Flexbox = require("../Flexbox");
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
11
2
|
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)."; }
|
|
12
|
-
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { Box } from '../Flexbox';
|
|
5
|
+
export const ImgWrapper = /*#__PURE__*/_styled(Box, process.env.NODE_ENV === "production" ? {
|
|
13
6
|
target: "e1ncn53j1"
|
|
14
7
|
} : {
|
|
15
8
|
target: "e1ncn53j1",
|
|
16
9
|
label: "codacy"
|
|
17
|
-
})("position:relative;display:block;",
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
})("position:relative;display:block;", ({
|
|
11
|
+
ratio,
|
|
12
|
+
height
|
|
13
|
+
}) => {
|
|
20
14
|
if (!!ratio) {
|
|
21
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/css("padding-top:", 1 / ratio * 100, "%;" + (process.env.NODE_ENV === "production" ? "" : ";label:codacy;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9JbWcvSW1nLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXZ0IiLCJmaWxlIjoiLi4vLi4vc3JjL0ltZy9JbWcuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IEJveCB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBJbWdQcm9wcyB9IGZyb20gJy4vSW1nLnR5cGVzJ1xuXG5leHBvcnQgY29uc3QgSW1nV3JhcHBlciA9IHN0eWxlZChCb3gpPFBpY2s8SW1nUHJvcHMsICdyYXRpbycgfCAnaGVpZ2h0Jz4+YFxuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGRpc3BsYXk6IGJsb2NrO1xuXG4gICR7KHsgcmF0aW8sIGhlaWdodCB9KSA9PiB7XG4gICAgaWYgKCEhcmF0aW8pIHtcbiAgICAgIHJldHVybiBjc3NgXG4gICAgICAgIHBhZGRpbmctdG9wOiAkeygxIC8gcmF0aW8pICogMTAwfSU7XG4gICAgICBgXG4gICAgfSBlbHNlIGlmICghIWhlaWdodCkge1xuICAgICAgcmV0dXJuIGNzc2BcbiAgICAgICAgJiA+IGltZyB7XG4gICAgICAgICAgaGVpZ2h0OiAke2hlaWdodH0gIWltcG9ydGFudDtcbiAgICAgICAgfVxuICAgICAgYFxuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gJydcbiAgICB9XG4gIH19XG5gXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbWcgPSBzdHlsZWQuaW1nPFBpY2s8SW1nUHJvcHMsICdyYXRpbycgfCAncm91bmRlZCcgfCAndHJhbnNwYXJlbnQnIHwgJ2ZpdCc+PmBcbiAgZGlzcGxheTogYmxvY2s7XG4gIHdpZHRoOiAxMDAlO1xuICBtYXgtd2lkdGg6IDEwMCU7XG4gIG9iamVjdC1maXQ6ICR7KHsgZml0IH0pID0+IGZpdH07XG5cbiAgYmFja2dyb3VuZC1jb2xvcjogJHsoeyB0cmFuc3BhcmVudCwgdGhlbWUgfSkgPT4gKHRyYW5zcGFyZW50ID8gJ3RyYW5zcGFyZW50JyA6IHRoZW1lLmNvbG9yc1snYmFja2dyb3VuZC1zZWNvbmRhcnknXSl9O1xuXG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgcm91bmRlZCB9KSA9PiAocm91bmRlZCA/ICcxMDAlJyA6ICcwJyl9O1xuXG4gICR7KHsgcmF0aW8gfSkgPT4ge1xuICAgIGlmICghIXJhdGlvKSB7XG4gICAgICByZXR1cm4gY3NzYFxuICAgICAgICBoZWlnaHQ6IDEwMCU7XG5cbiAgICAgICAgYm90dG9tOiAwO1xuICAgICAgICBsZWZ0OiAwO1xuICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgIHJpZ2h0OiAwO1xuICAgICAgICB0b3A6IDA7XG4gICAgICBgXG4gICAgfVxuXG4gICAgcmV0dXJuIGNzc2BcbiAgICAgIGhlaWdodDogYXV0bztcbiAgICBgXG4gIH19O1xuYFxuIl19 */");
|
|
22
16
|
} else if (!!height) {
|
|
23
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/css("&>img{height:", height, "!important;}" + (process.env.NODE_ENV === "production" ? "" : ";label:codacy;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9JbWcvSW1nLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlZ0IiLCJmaWxlIjoiLi4vLi4vc3JjL0ltZy9JbWcuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IEJveCB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBJbWdQcm9wcyB9IGZyb20gJy4vSW1nLnR5cGVzJ1xuXG5leHBvcnQgY29uc3QgSW1nV3JhcHBlciA9IHN0eWxlZChCb3gpPFBpY2s8SW1nUHJvcHMsICdyYXRpbycgfCAnaGVpZ2h0Jz4+YFxuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGRpc3BsYXk6IGJsb2NrO1xuXG4gICR7KHsgcmF0aW8sIGhlaWdodCB9KSA9PiB7XG4gICAgaWYgKCEhcmF0aW8pIHtcbiAgICAgIHJldHVybiBjc3NgXG4gICAgICAgIHBhZGRpbmctdG9wOiAkeygxIC8gcmF0aW8pICogMTAwfSU7XG4gICAgICBgXG4gICAgfSBlbHNlIGlmICghIWhlaWdodCkge1xuICAgICAgcmV0dXJuIGNzc2BcbiAgICAgICAgJiA+IGltZyB7XG4gICAgICAgICAgaGVpZ2h0OiAke2hlaWdodH0gIWltcG9ydGFudDtcbiAgICAgICAgfVxuICAgICAgYFxuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gJydcbiAgICB9XG4gIH19XG5gXG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbWcgPSBzdHlsZWQuaW1nPFBpY2s8SW1nUHJvcHMsICdyYXRpbycgfCAncm91bmRlZCcgfCAndHJhbnNwYXJlbnQnIHwgJ2ZpdCc+PmBcbiAgZGlzcGxheTogYmxvY2s7XG4gIHdpZHRoOiAxMDAlO1xuICBtYXgtd2lkdGg6IDEwMCU7XG4gIG9iamVjdC1maXQ6ICR7KHsgZml0IH0pID0+IGZpdH07XG5cbiAgYmFja2dyb3VuZC1jb2xvcjogJHsoeyB0cmFuc3BhcmVudCwgdGhlbWUgfSkgPT4gKHRyYW5zcGFyZW50ID8gJ3RyYW5zcGFyZW50JyA6IHRoZW1lLmNvbG9yc1snYmFja2dyb3VuZC1zZWNvbmRhcnknXSl9O1xuXG4gIGJvcmRlci1yYWRpdXM6ICR7KHsgcm91bmRlZCB9KSA9PiAocm91bmRlZCA/ICcxMDAlJyA6ICcwJyl9O1xuXG4gICR7KHsgcmF0aW8gfSkgPT4ge1xuICAgIGlmICghIXJhdGlvKSB7XG4gICAgICByZXR1cm4gY3NzYFxuICAgICAgICBoZWlnaHQ6IDEwMCU7XG5cbiAgICAgICAgYm90dG9tOiAwO1xuICAgICAgICBsZWZ0OiAwO1xuICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgIHJpZ2h0OiAwO1xuICAgICAgICB0b3A6IDA7XG4gICAgICBgXG4gICAgfVxuXG4gICAgcmV0dXJuIGNzc2BcbiAgICAgIGhlaWdodDogYXV0bztcbiAgICBgXG4gIH19O1xuYFxuIl19 */");
|
|
24
18
|
} else {
|
|
25
19
|
return '';
|
|
26
20
|
}
|
|
@@ -43,23 +37,21 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
43
37
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9JbWcvSW1nLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQ2dCIiwiZmlsZSI6Ii4uLy4uL3NyYy9JbWcvSW1nLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgeyBCb3ggfSBmcm9tICcuLi9GbGV4Ym94J1xuaW1wb3J0IHsgSW1nUHJvcHMgfSBmcm9tICcuL0ltZy50eXBlcydcblxuZXhwb3J0IGNvbnN0IEltZ1dyYXBwZXIgPSBzdHlsZWQoQm94KTxQaWNrPEltZ1Byb3BzLCAncmF0aW8nIHwgJ2hlaWdodCc+PmBcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBkaXNwbGF5OiBibG9jaztcblxuICAkeyh7IHJhdGlvLCBoZWlnaHQgfSkgPT4ge1xuICAgIGlmICghIXJhdGlvKSB7XG4gICAgICByZXR1cm4gY3NzYFxuICAgICAgICBwYWRkaW5nLXRvcDogJHsoMSAvIHJhdGlvKSAqIDEwMH0lO1xuICAgICAgYFxuICAgIH0gZWxzZSBpZiAoISFoZWlnaHQpIHtcbiAgICAgIHJldHVybiBjc3NgXG4gICAgICAgICYgPiBpbWcge1xuICAgICAgICAgIGhlaWdodDogJHtoZWlnaHR9ICFpbXBvcnRhbnQ7XG4gICAgICAgIH1cbiAgICAgIGBcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuICcnXG4gICAgfVxuICB9fVxuYFxuXG5leHBvcnQgY29uc3QgU3R5bGVkSW1nID0gc3R5bGVkLmltZzxQaWNrPEltZ1Byb3BzLCAncmF0aW8nIHwgJ3JvdW5kZWQnIHwgJ3RyYW5zcGFyZW50JyB8ICdmaXQnPj5gXG4gIGRpc3BsYXk6IGJsb2NrO1xuICB3aWR0aDogMTAwJTtcbiAgbWF4LXdpZHRoOiAxMDAlO1xuICBvYmplY3QtZml0OiAkeyh7IGZpdCB9KSA9PiBmaXR9O1xuXG4gIGJhY2tncm91bmQtY29sb3I6ICR7KHsgdHJhbnNwYXJlbnQsIHRoZW1lIH0pID0+ICh0cmFuc3BhcmVudCA/ICd0cmFuc3BhcmVudCcgOiB0aGVtZS5jb2xvcnNbJ2JhY2tncm91bmQtc2Vjb25kYXJ5J10pfTtcblxuICBib3JkZXItcmFkaXVzOiAkeyh7IHJvdW5kZWQgfSkgPT4gKHJvdW5kZWQgPyAnMTAwJScgOiAnMCcpfTtcblxuICAkeyh7IHJhdGlvIH0pID0+IHtcbiAgICBpZiAoISFyYXRpbykge1xuICAgICAgcmV0dXJuIGNzc2BcbiAgICAgICAgaGVpZ2h0OiAxMDAlO1xuXG4gICAgICAgIGJvdHRvbTogMDtcbiAgICAgICAgbGVmdDogMDtcbiAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICByaWdodDogMDtcbiAgICAgICAgdG9wOiAwO1xuICAgICAgYFxuICAgIH1cblxuICAgIHJldHVybiBjc3NgXG4gICAgICBoZWlnaHQ6IGF1dG87XG4gICAgYFxuICB9fTtcbmBcbiJdfQ== */",
|
|
44
38
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
45
39
|
};
|
|
46
|
-
|
|
40
|
+
export const StyledImg = /*#__PURE__*/_styled("img", process.env.NODE_ENV === "production" ? {
|
|
47
41
|
target: "e1ncn53j0"
|
|
48
42
|
} : {
|
|
49
43
|
target: "e1ncn53j0",
|
|
50
44
|
label: "codacy"
|
|
51
|
-
})("display:block;width:100%;max-width:100%;object-fit:",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, ";
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, ";", function (_ref7) {
|
|
62
|
-
var ratio = _ref7.ratio;
|
|
45
|
+
})("display:block;width:100%;max-width:100%;object-fit:", ({
|
|
46
|
+
fit
|
|
47
|
+
}) => fit, ";background-color:", ({
|
|
48
|
+
transparent,
|
|
49
|
+
theme
|
|
50
|
+
}) => transparent ? 'transparent' : theme.colors['background-secondary'], ";border-radius:", ({
|
|
51
|
+
rounded
|
|
52
|
+
}) => rounded ? '100%' : '0', ";", ({
|
|
53
|
+
ratio
|
|
54
|
+
}) => {
|
|
63
55
|
if (!!ratio) {
|
|
64
56
|
return _ref2;
|
|
65
57
|
}
|
package/lib/Img/Img.types.js
CHANGED
package/lib/Img/index.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Img = require("./Img");
|
|
7
|
-
Object.keys(_Img).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Img[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Img[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
export * from './Img';
|
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color: "alerts-success-icon"
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
info: function info() {
|
|
22
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icons.InfoIcon, {
|
|
23
|
-
color: "alerts-info-icon"
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
warning: function warning() {
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icons.WarningIcon, {
|
|
28
|
-
color: "alerts-warning-icon"
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
error: function error() {
|
|
32
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icons.ErrorIcon, {
|
|
33
|
-
color: "alerts-danger-icon"
|
|
34
|
-
});
|
|
35
|
-
}
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SuccessIcon, InfoIcon, WarningIcon, ErrorIcon } from '../Icons';
|
|
4
|
+
import { IconAndText, Paragraph, Tooltip } from '../';
|
|
5
|
+
const statuses = {
|
|
6
|
+
success: () => /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
7
|
+
color: "alerts-success-icon"
|
|
8
|
+
}),
|
|
9
|
+
info: () => /*#__PURE__*/React.createElement(InfoIcon, {
|
|
10
|
+
color: "alerts-info-icon"
|
|
11
|
+
}),
|
|
12
|
+
warning: () => /*#__PURE__*/React.createElement(WarningIcon, {
|
|
13
|
+
color: "alerts-warning-icon"
|
|
14
|
+
}),
|
|
15
|
+
error: () => /*#__PURE__*/React.createElement(ErrorIcon, {
|
|
16
|
+
color: "alerts-danger-icon"
|
|
17
|
+
})
|
|
36
18
|
};
|
|
37
|
-
|
|
19
|
+
const scales = {
|
|
38
20
|
xs: 1.1,
|
|
39
21
|
sm: 1.1,
|
|
40
22
|
md: 1.2,
|
|
@@ -44,38 +26,29 @@ var scales = {
|
|
|
44
26
|
/**
|
|
45
27
|
* Basic Inline Message
|
|
46
28
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
children: children
|
|
73
|
-
})
|
|
74
|
-
}));
|
|
75
|
-
};
|
|
76
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
77
|
-
children: tooltipProps ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Tooltip, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, tooltipProps), {}, {
|
|
78
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InlineMessageContent, {})
|
|
79
|
-
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(InlineMessageContent, {})
|
|
80
|
-
});
|
|
29
|
+
export const InlineMessage = /*#__PURE__*/React.forwardRef(({
|
|
30
|
+
children,
|
|
31
|
+
id,
|
|
32
|
+
status,
|
|
33
|
+
size = 'sm',
|
|
34
|
+
toRight = false,
|
|
35
|
+
tooltipProps,
|
|
36
|
+
...props
|
|
37
|
+
}, ref) => {
|
|
38
|
+
const InlineMessageContent = () => /*#__PURE__*/React.createElement(Paragraph, _extends({
|
|
39
|
+
id: id,
|
|
40
|
+
color: "alerts-secondary-text",
|
|
41
|
+
size: size
|
|
42
|
+
}, props, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
as: "div"
|
|
45
|
+
}), /*#__PURE__*/React.createElement(IconAndText, {
|
|
46
|
+
icon: statuses[status],
|
|
47
|
+
iconProps: {
|
|
48
|
+
size: 'md',
|
|
49
|
+
scale: scales[size]
|
|
50
|
+
},
|
|
51
|
+
toRight: toRight
|
|
52
|
+
}, children));
|
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, tooltipProps ? /*#__PURE__*/React.createElement(Tooltip, tooltipProps, /*#__PURE__*/React.createElement(InlineMessageContent, null)) : /*#__PURE__*/React.createElement(InlineMessageContent, null));
|
|
81
54
|
});
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _InlineMessage = require("./InlineMessage");
|
|
7
|
-
Object.keys(_InlineMessage).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _InlineMessage[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _InlineMessage[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
export * from './InlineMessage';
|