@ntbjs/react-components 2.0.0-rc.26 → 2.0.0-rc.28
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/{AssetAction-d081e4b7.js → AssetGallery-f67393d4.js} +588 -622
- 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/styles/utils/colors.scss +4 -4
- package/build/warning-circle-24f3efcd.js +15 -0
- package/build/widgets/AssetGallery/AssetGallery.js +45 -0
- 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/build/widgets/index.js +50 -65
- package/package.json +3 -3
- package/styles/utils/colors.scss +4 -4
- 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
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
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, { css } from 'styled-components';
|
|
5
|
+
import { rgba } from 'polished';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var defaultTheme = require('./defaultTheme-d9a7342e.js');
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
var polished = require('polished');
|
|
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 ActionButton$1 = styled__default["default"].button.attrs(defaultTheme.applyDefaultTheme)`
|
|
7
|
+
const ActionButton$1 = styled.button.attrs(applyDefaultTheme)`
|
|
15
8
|
display: inline-flex;
|
|
16
9
|
justify-content: center;
|
|
17
10
|
align-items: center;
|
|
@@ -32,7 +25,7 @@ const ActionButton$1 = styled__default["default"].button.attrs(defaultTheme.appl
|
|
|
32
25
|
transition: background-size 250ms ease;
|
|
33
26
|
cursor: pointer;
|
|
34
27
|
|
|
35
|
-
${props =>
|
|
28
|
+
${props => css`
|
|
36
29
|
${props.active ? '' : ':hover'}:not(:disabled) {
|
|
37
30
|
background-size: 200% 200%;
|
|
38
31
|
|
|
@@ -42,7 +35,7 @@ const ActionButton$1 = styled__default["default"].button.attrs(defaultTheme.appl
|
|
|
42
35
|
}
|
|
43
36
|
`}
|
|
44
37
|
|
|
45
|
-
${props => props.useShadow ? props.theme.themeProp('box-shadow', `0px 3px 6px ${
|
|
38
|
+
${props => props.useShadow ? props.theme.themeProp('box-shadow', `0px 3px 6px ${rgba(props.theme.getColor('black'), 0.7)}`, `0px 3px 6px ${props.theme.getColor('black')}`) : null}
|
|
46
39
|
|
|
47
40
|
&:disabled {
|
|
48
41
|
opacity: 0.5;
|
|
@@ -60,7 +53,7 @@ const ActionButton$1 = styled__default["default"].button.attrs(defaultTheme.appl
|
|
|
60
53
|
}
|
|
61
54
|
`;
|
|
62
55
|
|
|
63
|
-
const ActionButton = React__default
|
|
56
|
+
const ActionButton = React__default.forwardRef(function ActionButton({
|
|
64
57
|
icon,
|
|
65
58
|
disabled,
|
|
66
59
|
active,
|
|
@@ -68,7 +61,7 @@ const ActionButton = React__default["default"].forwardRef(function ActionButton(
|
|
|
68
61
|
actionWidthHeight,
|
|
69
62
|
...props
|
|
70
63
|
}, forwardedRef) {
|
|
71
|
-
return React__default
|
|
64
|
+
return React__default.createElement(ActionButton$1, _extends({
|
|
72
65
|
ref: forwardedRef,
|
|
73
66
|
disabled: disabled,
|
|
74
67
|
active: active,
|
|
@@ -77,16 +70,16 @@ const ActionButton = React__default["default"].forwardRef(function ActionButton(
|
|
|
77
70
|
}, props), icon);
|
|
78
71
|
});
|
|
79
72
|
ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
|
-
icon:
|
|
81
|
-
disabled:
|
|
82
|
-
active:
|
|
83
|
-
onClick:
|
|
84
|
-
backgroundColors:
|
|
85
|
-
actionWidthHeight:
|
|
73
|
+
icon: PropTypes.element.isRequired,
|
|
74
|
+
disabled: PropTypes.bool,
|
|
75
|
+
active: PropTypes.bool,
|
|
76
|
+
onClick: PropTypes.func,
|
|
77
|
+
backgroundColors: PropTypes.arrayOf(PropTypes.string),
|
|
78
|
+
actionWidthHeight: PropTypes.array
|
|
86
79
|
} : {};
|
|
87
80
|
ActionButton.defaultProps = {
|
|
88
81
|
onClick: () => {},
|
|
89
82
|
actionWidthHeight: [40, 40]
|
|
90
83
|
};
|
|
91
84
|
|
|
92
|
-
|
|
85
|
+
export { ActionButton as A };
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
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, { css } from 'styled-components';
|
|
5
|
+
import { isEmpty } from 'lodash';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var defaultTheme = require('./defaultTheme-d9a7342e.js');
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
var lodash = require('lodash');
|
|
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 Alert$1 = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)`
|
|
7
|
+
const Alert$1 = styled.div.attrs(applyDefaultTheme)`
|
|
15
8
|
display: flex;
|
|
16
9
|
flex-direction: column;
|
|
17
10
|
padding: ${props => {
|
|
@@ -22,21 +15,21 @@ const Alert$1 = styled__default["default"].div.attrs(defaultTheme.applyDefaultTh
|
|
|
22
15
|
width: ${props => props.width ? `${props.width}px` : '100%'};
|
|
23
16
|
box-sizing: border-box;
|
|
24
17
|
|
|
25
|
-
${props => props.warning &&
|
|
18
|
+
${props => props.warning && css`
|
|
26
19
|
${props.theme.themeProp('background', '#634E01', props.theme.getColor('signal-yellow-400'))}
|
|
27
20
|
`}
|
|
28
21
|
|
|
29
|
-
${props => props.error &&
|
|
22
|
+
${props => props.error && css`
|
|
30
23
|
${props.theme.themeProp('background', '#7F1B1B', props.theme.getColor('red-200'))}
|
|
31
24
|
`}
|
|
32
25
|
|
|
33
|
-
${props => props.info &&
|
|
26
|
+
${props => props.info && css`
|
|
34
27
|
background: transparent;
|
|
35
28
|
`}
|
|
36
29
|
|
|
37
30
|
text-align: ${props => props.align === 'center' ? 'center' : 'left'};
|
|
38
31
|
`;
|
|
39
|
-
const AlertRender =
|
|
32
|
+
const AlertRender = styled.div.attrs(applyDefaultTheme)`
|
|
40
33
|
display: flex;
|
|
41
34
|
align-items: center;
|
|
42
35
|
word-break: break-word;
|
|
@@ -52,7 +45,7 @@ const AlertRender = styled__default["default"].div.attrs(defaultTheme.applyDefau
|
|
|
52
45
|
span {
|
|
53
46
|
flex: 1;
|
|
54
47
|
padding-left: 5px;
|
|
55
|
-
${props => props.lineClamp ?
|
|
48
|
+
${props => props.lineClamp ? css`
|
|
56
49
|
display: -webkit-box;
|
|
57
50
|
-webkit-line-clamp: ${props.lineClamp};
|
|
58
51
|
-webkit-box-orient: vertical;
|
|
@@ -62,7 +55,7 @@ const AlertRender = styled__default["default"].div.attrs(defaultTheme.applyDefau
|
|
|
62
55
|
}
|
|
63
56
|
`;
|
|
64
57
|
|
|
65
|
-
const Alert = React__default
|
|
58
|
+
const Alert = React__default.forwardRef(function Alert({
|
|
66
59
|
warning,
|
|
67
60
|
error,
|
|
68
61
|
type,
|
|
@@ -80,7 +73,7 @@ const Alert = React__default["default"].forwardRef(function Alert({
|
|
|
80
73
|
let isWarning = false;
|
|
81
74
|
let isError = false;
|
|
82
75
|
let isInfo = true;
|
|
83
|
-
if (!
|
|
76
|
+
if (!isEmpty(type)) {
|
|
84
77
|
if (type === 'warning') {
|
|
85
78
|
isWarning = true;
|
|
86
79
|
} else if (type === 'error') {
|
|
@@ -95,7 +88,7 @@ const Alert = React__default["default"].forwardRef(function Alert({
|
|
|
95
88
|
isInfo = false;
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
|
-
return React__default
|
|
91
|
+
return React__default.createElement(Alert$1, _extends({
|
|
99
92
|
ref: forwardedRef,
|
|
100
93
|
alertMessage: alertMessage,
|
|
101
94
|
warning: isWarning,
|
|
@@ -105,25 +98,25 @@ const Alert = React__default["default"].forwardRef(function Alert({
|
|
|
105
98
|
verticalPadding: verticalPadding,
|
|
106
99
|
horizontalPadding: horizontalPadding,
|
|
107
100
|
width: width
|
|
108
|
-
}, props), React__default
|
|
101
|
+
}, props), React__default.createElement(AlertRender, {
|
|
109
102
|
fontSize: fontSize,
|
|
110
103
|
lineHeight: lineHeight,
|
|
111
104
|
lineClamp: lineClamp
|
|
112
|
-
}, icon, " ", React__default
|
|
105
|
+
}, icon, " ", React__default.createElement("span", null, alertMessage)));
|
|
113
106
|
});
|
|
114
107
|
Alert.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
115
|
-
warning:
|
|
116
|
-
error:
|
|
117
|
-
type:
|
|
118
|
-
icon:
|
|
119
|
-
align:
|
|
120
|
-
alertMessage:
|
|
121
|
-
fontSize:
|
|
122
|
-
lineHeight:
|
|
123
|
-
lineClamp:
|
|
124
|
-
verticalPadding:
|
|
125
|
-
horizontalPadding:
|
|
126
|
-
width:
|
|
108
|
+
warning: PropTypes.bool,
|
|
109
|
+
error: PropTypes.bool,
|
|
110
|
+
type: PropTypes.oneOf(['warning', 'error', 'info']),
|
|
111
|
+
icon: PropTypes.element,
|
|
112
|
+
align: PropTypes.oneOf(['left', 'center']),
|
|
113
|
+
alertMessage: PropTypes.string,
|
|
114
|
+
fontSize: PropTypes.number,
|
|
115
|
+
lineHeight: PropTypes.number,
|
|
116
|
+
lineClamp: PropTypes.number,
|
|
117
|
+
verticalPadding: PropTypes.number,
|
|
118
|
+
horizontalPadding: PropTypes.number,
|
|
119
|
+
width: PropTypes.number
|
|
127
120
|
} : {};
|
|
128
121
|
Alert.defaultProps = {
|
|
129
122
|
warning: false,
|
|
@@ -135,4 +128,4 @@ Alert.defaultProps = {
|
|
|
135
128
|
verticalPadding: 17
|
|
136
129
|
};
|
|
137
130
|
|
|
138
|
-
|
|
131
|
+
export { Alert as A };
|