@ntbjs/react-components 2.0.0-rc.26 → 2.0.0-rc.27
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/build/{ActionButton-03dc5f67.js → ActionButton-4db754c3.js} +17 -24
- package/build/{Alert-8a511bdc.js → Alert-e6847a22.js} +29 -36
- package/build/{Badge-aa4cd9c1.js → Badge-d93586a9.js} +35 -42
- package/build/{Button-2e26f5da.js → Button-179a2fe4.js} +83 -90
- package/build/{Checkbox-0b8faf49.js → Checkbox-4a5fd716.js} +45 -52
- package/build/{CompactAutocompleteSelect-797778cb.js → CompactAutocompleteSelect-52c49513.js} +116 -125
- package/build/{CompactStarRating-da21b53f.js → CompactStarRating-9af2f427.js} +76 -101
- package/build/{CompactTextInput-d56aec71.js → CompactTextInput-42ca5d42.js} +104 -129
- package/build/InputGroup-1294d190.js +23 -0
- package/build/{MultiLevelCheckboxSelect-d229cf98.js → MultiLevelCheckboxSelect-d8044c88.js} +139 -167
- package/build/{MultiSelect-d7920eb1.js → MultiSelect-9f497e62.js} +81 -90
- package/build/{Popover-c4be47ea.js → Popover-20050b91.js} +35 -44
- package/build/{Radio-150fb2c9.js → Radio-73ca3ae2.js} +28 -35
- package/build/SectionSeparator-f47760a2.js +31 -0
- package/build/{Switch-d2d6e9ec.js → Switch-ecf3122b.js} +35 -42
- package/build/Tab-04d435c3.js +32 -0
- package/build/{Tabs-b06c0e24.js → Tabs-74d1ea8a.js} +37 -44
- package/build/{TextArea-26d3c8a1.js → TextArea-1e5b9201.js} +105 -113
- package/build/{TextInput-3a567daa.js → TextInput-fab35842.js} +78 -86
- package/build/Tooltip-c1d1199e.js +65 -0
- package/build/{VerificationStatusIcon-9876b68f.js → VerificationStatusIcon-49cb1c1b.js} +19 -44
- package/build/{_rollupPluginBabelHelpers-4b342fad.js → _rollupPluginBabelHelpers-c245b26a.js} +1 -3
- package/build/arrow-forward-ad12c5f3.js +15 -0
- package/build/close-a5d37608.js +15 -0
- package/build/data/Alert/index.js +6 -12
- package/build/data/Badge/index.js +5 -11
- package/build/data/Popover/index.js +10 -16
- package/build/data/Tab/index.js +5 -11
- package/build/data/Tabs/index.js +7 -13
- package/build/data/Tooltip/index.js +7 -13
- package/build/data/index.js +16 -30
- package/build/{defaultTheme-d9a7342e.js → defaultTheme-1bcc2541.js} +3 -7
- package/build/edit-note-283a0e15.js +15 -0
- package/build/expand-more-c5523c46.js +15 -0
- package/build/inputs/ActionButton/index.js +6 -12
- package/build/inputs/Button/index.js +13 -19
- package/build/inputs/Checkbox/index.js +6 -12
- package/build/inputs/CompactAutocompleteSelect/index.js +23 -29
- package/build/inputs/CompactStarRating/index.js +17 -23
- package/build/inputs/CompactTextInput/index.js +19 -25
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +26 -0
- package/build/inputs/MultiSelect/index.js +10 -16
- package/build/inputs/Radio/index.js +7 -13
- package/build/inputs/Switch/index.js +6 -12
- package/build/inputs/TextArea/index.js +20 -26
- package/build/inputs/TextInput/index.js +9 -15
- package/build/inputs/index.js +40 -60
- package/build/layout/InputGroup/index.js +5 -11
- package/build/layout/SectionSeparator/index.js +5 -11
- package/build/layout/index.js +6 -15
- package/build/{shift-away-subtle-158617af.js → shift-away-subtle-0dd94a03.js} +3 -5
- package/build/ssr/index.js +1 -12
- package/build/warning-circle-24f3efcd.js +15 -0
- package/build/{AssetAction-d081e4b7.js → widgets/AssetGallery/AssetGallery.js} +601 -622
- package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +127 -0
- package/build/widgets/ContextMenu/ContextMenu.js +26 -0
- package/build/{ContextMenuItem-3967010d.js → widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js} +23 -48
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +37 -0
- package/build/{InfoCard-d0fdf377.js → widgets/InfoCard/InfoCard.js} +27 -34
- package/build/widgets/Instructions/Instructions.js +255 -0
- package/build/{ProgressBar-2d26c1fb.js → widgets/ProgressBar/ProgressBar.js} +39 -46
- package/package.json +1 -1
- package/build/AssetPreviewTopBar-623cfa18.js +0 -152
- package/build/ContextMenu-82f9d728.js +0 -33
- package/build/InputGroup-8d4a4644.js +0 -30
- package/build/Instructions-af191987.js +0 -274
- package/build/SectionSeparator-e06c7660.js +0 -38
- package/build/Tab-ccbca1f2.js +0 -39
- package/build/Tooltip-d5882b82.js +0 -73
- package/build/arrow-forward-d7c77ae3.js +0 -37
- package/build/close-1751121a.js +0 -37
- package/build/edit-note-cefe2215.js +0 -37
- package/build/expand-more-d74e2bd2.js +0 -37
- package/build/widgets/AssetGallery/index.js +0 -55
- package/build/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -12
- package/build/widgets/ContextMenu/ContextMenuItem/index.js +0 -11
- package/build/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -44
- package/build/widgets/ContextMenu/index.js +0 -11
- package/build/widgets/InfoCard/index.js +0 -12
- package/build/widgets/Instructions/index.js +0 -33
- package/build/widgets/ProgressBar/index.js +0 -12
- package/build/widgets/index.js +0 -65
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { _ as _extends$1 } from '../../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { a as applyDefaultTheme, P as PropTypes } from '../../../defaultTheme-1bcc2541.js';
|
|
5
|
+
import styled, { css } from 'styled-components';
|
|
6
|
+
import { S as SvgClose } from '../../../close-a5d37608.js';
|
|
7
|
+
|
|
8
|
+
var _path;
|
|
9
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
function SvgArrowBack(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
viewBox: "0 0 32 32"
|
|
14
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
d: "M16 32L0 16 16 0l2.1 2.1L5.7 14.5H32v3H5.7l12.4 12.4L16 32z"
|
|
17
|
+
})));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const AssetPreviewTopBar$1 = styled.div.attrs(applyDefaultTheme)`
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
align-items: center;
|
|
23
|
+
border-bottom: ${props => props.border ? `1px solid` : `none`};
|
|
24
|
+
color: inherit;
|
|
25
|
+
display: flex;
|
|
26
|
+
font-family: ${props => props.theme.primaryFontFamily};
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
min-height: 72px;
|
|
29
|
+
padding: 0 24px;
|
|
30
|
+
width: 100%;
|
|
31
|
+
|
|
32
|
+
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-800'), props.theme.getColor('gray-200'))}
|
|
33
|
+
|
|
34
|
+
${props => props.shadow && props.theme.themeProp('box-shadow', '0 -2px 12px #505050', '0 -3px 12px #b0b6b9')}
|
|
35
|
+
|
|
36
|
+
${props => props.disabled && css`
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
`}
|
|
39
|
+
`;
|
|
40
|
+
const BackButtonContainer = styled.a.attrs(applyDefaultTheme)`
|
|
41
|
+
align-items: center;
|
|
42
|
+
display: flex;
|
|
43
|
+
font-size: 1.125rem;
|
|
44
|
+
${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
|
|
45
|
+
|
|
46
|
+
${props => props.disabled && css`
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
`}
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
> svg {
|
|
56
|
+
height: 24px;
|
|
57
|
+
margin-right: 16px;
|
|
58
|
+
width: 24px;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
const BackHoverEffect = styled.div`
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
|
|
65
|
+
> svg {
|
|
66
|
+
height: 24px;
|
|
67
|
+
margin-right: 16px;
|
|
68
|
+
width: 24px;
|
|
69
|
+
transition: transform 0.3s ease-in-out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:hover > svg {
|
|
73
|
+
transform: translateX(-2px);
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
const LeftText = styled.span.attrs(applyDefaultTheme)`
|
|
77
|
+
font-size: 1.125rem;
|
|
78
|
+
margin-left: 16px;
|
|
79
|
+
|
|
80
|
+
${props => props.theme.themeProp('color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'))};
|
|
81
|
+
`;
|
|
82
|
+
const ButtonsContainer = styled.div.attrs(applyDefaultTheme)`
|
|
83
|
+
align-items: center;
|
|
84
|
+
display: flex;
|
|
85
|
+
margin-left: auto;
|
|
86
|
+
|
|
87
|
+
> span {
|
|
88
|
+
margin-left: 16px;
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
const AssetPreviewTopBar = React__default.forwardRef(function AssetPreviewTopBar({
|
|
93
|
+
onBackButtonClick,
|
|
94
|
+
backButtonText,
|
|
95
|
+
backButtonAsClose,
|
|
96
|
+
leftText,
|
|
97
|
+
buttons,
|
|
98
|
+
shadow,
|
|
99
|
+
border,
|
|
100
|
+
disabled,
|
|
101
|
+
...props
|
|
102
|
+
}, forwardedRef) {
|
|
103
|
+
return React__default.createElement(AssetPreviewTopBar$1, _extends$1({
|
|
104
|
+
ref: forwardedRef,
|
|
105
|
+
shadow: shadow,
|
|
106
|
+
border: border,
|
|
107
|
+
disabled: disabled
|
|
108
|
+
}, props), React__default.createElement(BackButtonContainer, {
|
|
109
|
+
onClick: onBackButtonClick,
|
|
110
|
+
disabled: disabled
|
|
111
|
+
}, backButtonAsClose ? React__default.createElement(React__default.Fragment, null, React__default.createElement(SvgClose, null), backButtonText) : React__default.createElement(BackHoverEffect, null, React__default.createElement(SvgArrowBack, null), backButtonText)), leftText && React__default.createElement(LeftText, null, leftText), Array.isArray(buttons) && React__default.createElement(ButtonsContainer, null, buttons.map((button, index) => React__default.createElement("span", {
|
|
112
|
+
key: 'topBarButton-' + index
|
|
113
|
+
}, button))));
|
|
114
|
+
});
|
|
115
|
+
AssetPreviewTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
116
|
+
onBackButtonClick: PropTypes.func.isRequired,
|
|
117
|
+
backButtonText: PropTypes.string.isRequired,
|
|
118
|
+
disabled: PropTypes.bool,
|
|
119
|
+
backButtonAsClose: PropTypes.bool,
|
|
120
|
+
leftText: PropTypes.string,
|
|
121
|
+
shadow: PropTypes.bool,
|
|
122
|
+
border: PropTypes.bool,
|
|
123
|
+
buttons: PropTypes.arrayOf(PropTypes.node)
|
|
124
|
+
} : {};
|
|
125
|
+
AssetPreviewTopBar.defaultProps = {};
|
|
126
|
+
|
|
127
|
+
export { AssetPreviewTopBar as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { _ as _extends } from '../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { a as applyDefaultTheme, P as PropTypes } from '../../defaultTheme-1bcc2541.js';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
|
|
6
|
+
const ContextMenu$1 = styled.div.attrs(applyDefaultTheme)`
|
|
7
|
+
font-family: ${props => props.theme.primaryFontFamily};
|
|
8
|
+
padding: 3px 0;
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
const ContextMenu = React__default.forwardRef(function ContextMenu({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}, forwardedRef) {
|
|
15
|
+
return React__default.createElement(ContextMenu$1, _extends({
|
|
16
|
+
ref: forwardedRef
|
|
17
|
+
}, props, {
|
|
18
|
+
role: "menu"
|
|
19
|
+
}), children);
|
|
20
|
+
});
|
|
21
|
+
ContextMenu.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
22
|
+
children: PropTypes.any
|
|
23
|
+
} : {};
|
|
24
|
+
ContextMenu.defaultProps = {};
|
|
25
|
+
|
|
26
|
+
export { ContextMenu as default };
|
package/build/{ContextMenuItem-3967010d.js → widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js}
RENAMED
|
@@ -1,47 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
function _interopNamespace(e) {
|
|
11
|
-
if (e && e.__esModule) return e;
|
|
12
|
-
var n = Object.create(null);
|
|
13
|
-
if (e) {
|
|
14
|
-
Object.keys(e).forEach(function (k) {
|
|
15
|
-
if (k !== 'default') {
|
|
16
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return e[k]; }
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
n["default"] = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
1
|
+
import { _ as _extends$1 } from '../../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { a as applyDefaultTheme, P as PropTypes } from '../../../defaultTheme-1bcc2541.js';
|
|
5
|
+
import styled, { css } from 'styled-components';
|
|
31
6
|
|
|
32
7
|
var _path;
|
|
33
8
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
34
9
|
function SvgTriangleRight(props) {
|
|
35
|
-
return /*#__PURE__*/
|
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
36
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
37
12
|
viewBox: "0 0 10 20"
|
|
38
|
-
}, props), _path || (_path = /*#__PURE__*/
|
|
13
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
39
14
|
fill: "currentColor",
|
|
40
15
|
d: "M0 20V0l10 10L0 20z"
|
|
41
16
|
})));
|
|
42
17
|
}
|
|
43
18
|
|
|
44
|
-
const ContextMenuItem$1 =
|
|
19
|
+
const ContextMenuItem$1 = styled.span.attrs(applyDefaultTheme)`
|
|
45
20
|
align-items: center;
|
|
46
21
|
cursor: pointer;
|
|
47
22
|
display: flex;
|
|
@@ -56,7 +31,7 @@ const ContextMenuItem$1 = styled__default["default"].span.attrs(defaultTheme.app
|
|
|
56
31
|
|
|
57
32
|
${props => props.theme.themeProp('background-color', props.theme.getColor('gray-700'), '#FEFEFE')}
|
|
58
33
|
|
|
59
|
-
${props => !props.icon &&
|
|
34
|
+
${props => !props.icon && css`
|
|
60
35
|
padding-left: 28px;
|
|
61
36
|
`}
|
|
62
37
|
|
|
@@ -76,19 +51,19 @@ const ContextMenuItem$1 = styled__default["default"].span.attrs(defaultTheme.app
|
|
|
76
51
|
${props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-200'))}
|
|
77
52
|
}
|
|
78
53
|
|
|
79
|
-
${props => props.hoverColors && props.hoverColors[0] && props.hoverColors[1] &&
|
|
54
|
+
${props => props.hoverColors && props.hoverColors[0] && props.hoverColors[1] && css`
|
|
80
55
|
&&:hover {
|
|
81
56
|
${props => props.theme.themeProp('color', props.hoverColors[0], props.hoverColors[1])}
|
|
82
57
|
}
|
|
83
58
|
`}
|
|
84
59
|
|
|
85
|
-
${props => props.hoverBackgroundColors && props.hoverBackgroundColors[0] && props.hoverBackgroundColors[1] &&
|
|
60
|
+
${props => props.hoverBackgroundColors && props.hoverBackgroundColors[0] && props.hoverBackgroundColors[1] && css`
|
|
86
61
|
&&:hover {
|
|
87
62
|
${props => props.theme.themeProp('background-color', props.hoverBackgroundColors[0], props.hoverBackgroundColors[1])}
|
|
88
63
|
}
|
|
89
64
|
`}
|
|
90
65
|
`;
|
|
91
|
-
const IconContainer =
|
|
66
|
+
const IconContainer = styled.span.attrs(applyDefaultTheme)`
|
|
92
67
|
align-items: center;
|
|
93
68
|
display: flex;
|
|
94
69
|
height: fit-content;
|
|
@@ -99,7 +74,7 @@ const IconContainer = styled__default["default"].span.attrs(defaultTheme.applyDe
|
|
|
99
74
|
height: 12px;
|
|
100
75
|
}
|
|
101
76
|
`;
|
|
102
|
-
const SublevelIconContainer =
|
|
77
|
+
const SublevelIconContainer = styled.span.attrs(applyDefaultTheme)`
|
|
103
78
|
align-items: center;
|
|
104
79
|
display: flex;
|
|
105
80
|
height: fit-content;
|
|
@@ -113,7 +88,7 @@ const SublevelIconContainer = styled__default["default"].span.attrs(defaultTheme
|
|
|
113
88
|
}
|
|
114
89
|
`;
|
|
115
90
|
|
|
116
|
-
const ContextMenuItem = React__default
|
|
91
|
+
const ContextMenuItem = React__default.forwardRef(function ContextMenuItem({
|
|
117
92
|
title,
|
|
118
93
|
icon,
|
|
119
94
|
onClickEffect,
|
|
@@ -122,7 +97,7 @@ const ContextMenuItem = React__default["default"].forwardRef(function ContextMen
|
|
|
122
97
|
hoverBackgroundColors,
|
|
123
98
|
...props
|
|
124
99
|
}, forwardedRef) {
|
|
125
|
-
return React__default
|
|
100
|
+
return React__default.createElement(ContextMenuItem$1, _extends$1({
|
|
126
101
|
ref: forwardedRef,
|
|
127
102
|
icon: icon,
|
|
128
103
|
onClick: onClickEffect,
|
|
@@ -132,15 +107,15 @@ const ContextMenuItem = React__default["default"].forwardRef(function ContextMen
|
|
|
132
107
|
className: opensSublevel ? 'context-menu-item opens-sublevel' : 'context-menu-item'
|
|
133
108
|
}, props, {
|
|
134
109
|
role: "menuitem"
|
|
135
|
-
}), icon && React__default
|
|
110
|
+
}), icon && React__default.createElement(IconContainer, null, icon), React__default.createElement("span", null, title), opensSublevel && React__default.createElement(SublevelIconContainer, null, React__default.createElement(SvgTriangleRight, null)));
|
|
136
111
|
});
|
|
137
112
|
ContextMenuItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
138
|
-
title:
|
|
139
|
-
icon:
|
|
140
|
-
onClickEffect:
|
|
141
|
-
opensSublevel:
|
|
142
|
-
hoverColors:
|
|
143
|
-
hoverBackgroundColors:
|
|
113
|
+
title: PropTypes.string.isRequired,
|
|
114
|
+
icon: PropTypes.element,
|
|
115
|
+
onClickEffect: PropTypes.func,
|
|
116
|
+
opensSublevel: PropTypes.bool,
|
|
117
|
+
hoverColors: PropTypes.arrayOf(PropTypes.string),
|
|
118
|
+
hoverBackgroundColors: PropTypes.arrayOf(PropTypes.string)
|
|
144
119
|
} : {};
|
|
145
120
|
ContextMenuItem.defaultProps = {
|
|
146
121
|
icon: undefined,
|
|
@@ -149,4 +124,4 @@ ContextMenuItem.defaultProps = {
|
|
|
149
124
|
opensSublevel: false
|
|
150
125
|
};
|
|
151
126
|
|
|
152
|
-
|
|
127
|
+
export { ContextMenuItem as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { _ as _extends } from '../../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { a as applyDefaultTheme, P as PropTypes } from '../../../defaultTheme-1bcc2541.js';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
|
|
6
|
+
const ContextMenuItemsGroup$1 = styled.div.attrs(applyDefaultTheme)`
|
|
7
|
+
:not(:last-child) {
|
|
8
|
+
border-bottom: 1px solid;
|
|
9
|
+
|
|
10
|
+
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-200'))}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> * {
|
|
14
|
+
border-bottom: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
> *:not(:last-child) {
|
|
18
|
+
height: 32px;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const ContextMenuItemsGroup = React__default.forwardRef(function ContextMenuItemsGroup({
|
|
23
|
+
children,
|
|
24
|
+
...props
|
|
25
|
+
}, forwardedRef) {
|
|
26
|
+
return React__default.createElement(ContextMenuItemsGroup$1, _extends({
|
|
27
|
+
ref: forwardedRef
|
|
28
|
+
}, props, {
|
|
29
|
+
role: "group"
|
|
30
|
+
}), children);
|
|
31
|
+
});
|
|
32
|
+
ContextMenuItemsGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
33
|
+
children: PropTypes.arrayOf(PropTypes.node)
|
|
34
|
+
} : {};
|
|
35
|
+
ContextMenuItemsGroup.defaultProps = {};
|
|
36
|
+
|
|
37
|
+
export { ContextMenuItemsGroup as default };
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { _ as _extends } from '../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import { a as applyDefaultTheme, P as PropTypes } from '../../defaultTheme-1bcc2541.js';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { S as SvgArrowForward } from '../../arrow-forward-ad12c5f3.js';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var defaultTheme = require('./defaultTheme-d9a7342e.js');
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
var arrowForward = require('./arrow-forward-d7c77ae3.js');
|
|
8
|
-
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
13
|
-
|
|
14
|
-
const Container = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)`
|
|
7
|
+
const Container = styled.div.attrs(applyDefaultTheme)`
|
|
15
8
|
font-family: ${props => props.theme.primaryFontFamily};
|
|
16
9
|
font-size: 1rem;
|
|
17
10
|
font-weight: 500;
|
|
@@ -23,7 +16,7 @@ const Container = styled__default["default"].div.attrs(defaultTheme.applyDefault
|
|
|
23
16
|
align-items: center;
|
|
24
17
|
padding: 5px 0;
|
|
25
18
|
`;
|
|
26
|
-
const MetricsContainer =
|
|
19
|
+
const MetricsContainer = styled.div.attrs(applyDefaultTheme)`
|
|
27
20
|
display: flex;
|
|
28
21
|
flex-direction: column;
|
|
29
22
|
justify-content: center;
|
|
@@ -32,31 +25,31 @@ const MetricsContainer = styled__default["default"].div.attrs(defaultTheme.apply
|
|
|
32
25
|
gap: 5px;
|
|
33
26
|
padding-left: 15px;
|
|
34
27
|
`;
|
|
35
|
-
const IconTotalContainer =
|
|
28
|
+
const IconTotalContainer = styled.div.attrs(applyDefaultTheme)`
|
|
36
29
|
display: flex;
|
|
37
30
|
justify-content: center;
|
|
38
31
|
align-items: center;
|
|
39
32
|
gap: 10px;
|
|
40
33
|
`;
|
|
41
|
-
const Total =
|
|
34
|
+
const Total = styled.div.attrs(applyDefaultTheme)`
|
|
42
35
|
font-size: 1.22rem;
|
|
43
36
|
font-weight: 700;
|
|
44
37
|
${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
|
|
45
38
|
`;
|
|
46
|
-
const Label =
|
|
39
|
+
const Label = styled.div.attrs(applyDefaultTheme)`
|
|
47
40
|
font-size: 0.875rem;
|
|
48
41
|
font-weight: 400;
|
|
49
42
|
opacity: 0.8;
|
|
50
43
|
${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-500'))};
|
|
51
44
|
`;
|
|
52
|
-
const IconContainer =
|
|
45
|
+
const IconContainer = styled.div.attrs(applyDefaultTheme)`
|
|
53
46
|
display: flex;
|
|
54
47
|
justify-content: center;
|
|
55
48
|
align-items: center;
|
|
56
49
|
width: 18px;
|
|
57
50
|
margin-top: -0.05rem;
|
|
58
51
|
`;
|
|
59
|
-
const Link =
|
|
52
|
+
const Link = styled.div.attrs(applyDefaultTheme)`
|
|
60
53
|
font-size: 0.875rem;
|
|
61
54
|
font-weight: 400;
|
|
62
55
|
width: 30%;
|
|
@@ -75,7 +68,7 @@ const Link = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme
|
|
|
75
68
|
transform: translateX(2px);
|
|
76
69
|
}
|
|
77
70
|
`;
|
|
78
|
-
const ButtonLink =
|
|
71
|
+
const ButtonLink = styled.div.attrs(applyDefaultTheme)`
|
|
79
72
|
font-size: 0.875rem;
|
|
80
73
|
font-weight: 500;
|
|
81
74
|
height: 100%;
|
|
@@ -86,7 +79,7 @@ const ButtonLink = styled__default["default"].div.attrs(defaultTheme.applyDefaul
|
|
|
86
79
|
transition: color 0.2s ease-in-out;
|
|
87
80
|
${props => props.$isHovered ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
|
|
88
81
|
`;
|
|
89
|
-
const StyledArrowIcon =
|
|
82
|
+
const StyledArrowIcon = styled(SvgArrowForward).attrs(applyDefaultTheme)`
|
|
90
83
|
height: 15px;
|
|
91
84
|
margin-right: 10px;
|
|
92
85
|
opacity: ${props => props.$isHovered ? 1 : 0.8};
|
|
@@ -96,7 +89,7 @@ const StyledArrowIcon = styled__default["default"](arrowForward.SvgArrowForward)
|
|
|
96
89
|
${props => props.$isHovered ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black'))};
|
|
97
90
|
`;
|
|
98
91
|
|
|
99
|
-
const InfoCard = React__default
|
|
92
|
+
const InfoCard = React__default.forwardRef(function InfoCard({
|
|
100
93
|
icon,
|
|
101
94
|
total,
|
|
102
95
|
label,
|
|
@@ -105,28 +98,28 @@ const InfoCard = React__default["default"].forwardRef(function InfoCard({
|
|
|
105
98
|
height,
|
|
106
99
|
...props
|
|
107
100
|
}, forwardedRef) {
|
|
108
|
-
const [isLinkHovered, setIsLinkHovered] =
|
|
101
|
+
const [isLinkHovered, setIsLinkHovered] = useState(false);
|
|
109
102
|
const handleLinkClick = e => onClick(e);
|
|
110
|
-
return React__default
|
|
103
|
+
return React__default.createElement(Container, _extends({
|
|
111
104
|
height: height,
|
|
112
105
|
ref: forwardedRef
|
|
113
|
-
}, props), React__default
|
|
106
|
+
}, props), React__default.createElement(MetricsContainer, null, React__default.createElement(IconTotalContainer, null, React__default.createElement(IconContainer, null, icon), React__default.createElement(Total, null, total)), React__default.createElement(Label, null, label)), linkLabel && onClick && React__default.createElement(Link, {
|
|
114
107
|
onClick: handleLinkClick,
|
|
115
108
|
onMouseEnter: () => setIsLinkHovered(true),
|
|
116
109
|
onMouseLeave: () => setIsLinkHovered(false)
|
|
117
|
-
}, React__default
|
|
110
|
+
}, React__default.createElement(ButtonLink, {
|
|
118
111
|
$isHovered: isLinkHovered
|
|
119
|
-
}, linkLabel), React__default
|
|
112
|
+
}, linkLabel), React__default.createElement(StyledArrowIcon, {
|
|
120
113
|
$isHovered: isLinkHovered
|
|
121
114
|
})));
|
|
122
115
|
});
|
|
123
116
|
InfoCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
124
|
-
icon:
|
|
125
|
-
total:
|
|
126
|
-
label:
|
|
127
|
-
linkLabel:
|
|
128
|
-
onClick:
|
|
129
|
-
height:
|
|
117
|
+
icon: PropTypes.element.isRequired,
|
|
118
|
+
total: PropTypes.number.isRequired,
|
|
119
|
+
label: PropTypes.string.isRequired,
|
|
120
|
+
linkLabel: PropTypes.string,
|
|
121
|
+
onClick: PropTypes.func,
|
|
122
|
+
height: PropTypes.number
|
|
130
123
|
} : {};
|
|
131
124
|
|
|
132
|
-
|
|
125
|
+
export { InfoCard as default };
|