@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
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
var useMergedRefs__default = /*#__PURE__*/_interopDefaultLegacy(useMergedRefs);
|
|
16
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
17
|
-
|
|
18
|
-
const activeLabel = styled.css`
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import React__default, { useRef, useState, useMemo } from 'react';
|
|
3
|
+
import { nanoid } from 'nanoid';
|
|
4
|
+
import { a as applyDefaultTheme, P as PropTypes } from './defaultTheme-1bcc2541.js';
|
|
5
|
+
import useMergedRefs from '@restart/hooks/useMergedRefs';
|
|
6
|
+
import { isBoolean, isEmpty } from 'lodash';
|
|
7
|
+
import { S as SvgEditNote } from './edit-note-283a0e15.js';
|
|
8
|
+
import styled, { css } from 'styled-components';
|
|
9
|
+
|
|
10
|
+
const activeLabel = css`
|
|
19
11
|
font-size: 0.75rem;
|
|
20
12
|
padding: 0 3px;
|
|
21
13
|
top: -7px;
|
|
@@ -23,7 +15,7 @@ const activeLabel = styled.css`
|
|
|
23
15
|
left: 8px !important;
|
|
24
16
|
opacity: 1 !important;
|
|
25
17
|
`;
|
|
26
|
-
const Adornment =
|
|
18
|
+
const Adornment = styled.div.attrs(applyDefaultTheme)`
|
|
27
19
|
flex-shrink: 0;
|
|
28
20
|
font-family: inherit;
|
|
29
21
|
font-size: 0.875rem;
|
|
@@ -35,12 +27,12 @@ const Adornment = styled__default["default"].div.attrs(defaultTheme.applyDefault
|
|
|
35
27
|
border: 1px solid;
|
|
36
28
|
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'))}
|
|
37
29
|
border-radius: 3px;
|
|
38
|
-
${props => props.isPrefix ?
|
|
30
|
+
${props => props.isPrefix ? css`
|
|
39
31
|
padding-right: 10px;
|
|
40
32
|
border-right: 0;
|
|
41
33
|
border-top-right-radius: 0;
|
|
42
34
|
border-bottom-right-radius: 0;
|
|
43
|
-
` :
|
|
35
|
+
` : css`
|
|
44
36
|
padding-left: 0;
|
|
45
37
|
margin-left: -3px;
|
|
46
38
|
border-left: 0;
|
|
@@ -52,14 +44,14 @@ const Adornment = styled__default["default"].div.attrs(defaultTheme.applyDefault
|
|
|
52
44
|
transition: border-color 350ms;
|
|
53
45
|
height: 2.75rem;
|
|
54
46
|
|
|
55
|
-
${props => props.warning &&
|
|
47
|
+
${props => props.warning && css`
|
|
56
48
|
border-color: ${props.theme.getColor('orange-500')} !important;
|
|
57
49
|
`}
|
|
58
|
-
${props => props.error &&
|
|
50
|
+
${props => props.error && css`
|
|
59
51
|
border-color: ${props.theme.getColor('red-500')} !important;
|
|
60
52
|
`}
|
|
61
53
|
`;
|
|
62
|
-
const TextInputWrapper =
|
|
54
|
+
const TextInputWrapper = styled.div.attrs(applyDefaultTheme)`
|
|
63
55
|
display: flex;
|
|
64
56
|
align-content: center;
|
|
65
57
|
|
|
@@ -70,7 +62,7 @@ const TextInputWrapper = styled__default["default"].div.attrs(defaultTheme.apply
|
|
|
70
62
|
}
|
|
71
63
|
}
|
|
72
64
|
`;
|
|
73
|
-
const InputIconContainer =
|
|
65
|
+
const InputIconContainer = styled.div.attrs(applyDefaultTheme)`
|
|
74
66
|
opacity: 0;
|
|
75
67
|
pointer-events: none;
|
|
76
68
|
border-top-right-radius: 3px;
|
|
@@ -93,7 +85,7 @@ const InputIconContainer = styled__default["default"].div.attrs(defaultTheme.app
|
|
|
93
85
|
width: 12px;
|
|
94
86
|
}
|
|
95
87
|
`;
|
|
96
|
-
const TextInputField =
|
|
88
|
+
const TextInputField = styled.input.attrs(applyDefaultTheme)`
|
|
97
89
|
display: block;
|
|
98
90
|
width: 100%;
|
|
99
91
|
font-family: inherit;
|
|
@@ -111,18 +103,18 @@ const TextInputField = styled__default["default"].input.attrs(defaultTheme.apply
|
|
|
111
103
|
border: 1px solid;
|
|
112
104
|
${props => props.noBorder || props.readOnly ? 'border-color: transparent !important' : props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'))};
|
|
113
105
|
|
|
114
|
-
${props => props.readOnly &&
|
|
106
|
+
${props => props.readOnly && css`
|
|
115
107
|
user-select: text;
|
|
116
108
|
cursor: default;
|
|
117
109
|
`}
|
|
118
110
|
|
|
119
|
-
${props => props.warning &&
|
|
111
|
+
${props => props.warning && css`
|
|
120
112
|
border-color: ${props.theme.getColor('orange-500')} !important;
|
|
121
113
|
`}
|
|
122
|
-
${props => props.error &&
|
|
114
|
+
${props => props.error && css`
|
|
123
115
|
border-color: ${props.theme.getColor('red-500')} !important;
|
|
124
116
|
`}
|
|
125
|
-
${props => props.hasIcon &&
|
|
117
|
+
${props => props.hasIcon && css`
|
|
126
118
|
padding-left: 35px;
|
|
127
119
|
`}
|
|
128
120
|
|
|
@@ -145,11 +137,11 @@ const TextInputField = styled__default["default"].input.attrs(defaultTheme.apply
|
|
|
145
137
|
:focus {
|
|
146
138
|
outline: none;
|
|
147
139
|
border-color: ${props => props.theme.getColor('gray-600')} !important
|
|
148
|
-
${props => props.readOnly &&
|
|
140
|
+
${props => props.readOnly && css`
|
|
149
141
|
outline: none;
|
|
150
142
|
`}
|
|
151
143
|
`;
|
|
152
|
-
const TextInputLabel =
|
|
144
|
+
const TextInputLabel = styled.label.attrs(applyDefaultTheme)`
|
|
153
145
|
position: absolute;
|
|
154
146
|
top: 15px;
|
|
155
147
|
left: 11px;
|
|
@@ -163,16 +155,16 @@ const TextInputLabel = styled__default["default"].label.attrs(defaultTheme.apply
|
|
|
163
155
|
|
|
164
156
|
${props => props.theme.themeProp('background', `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`, `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`)}
|
|
165
157
|
|
|
166
|
-
${props => (props.hasPlaceholder || props.hasAdornments) &&
|
|
158
|
+
${props => (props.hasPlaceholder || props.hasAdornments) && css`
|
|
167
159
|
${activeLabel};
|
|
168
160
|
`}
|
|
169
161
|
|
|
170
162
|
|
|
171
|
-
${props => props.hasIcon &&
|
|
163
|
+
${props => props.hasIcon && css`
|
|
172
164
|
left: 35px;
|
|
173
165
|
`}
|
|
174
166
|
`;
|
|
175
|
-
const TextInputFieldIcon =
|
|
167
|
+
const TextInputFieldIcon = styled.div.attrs(applyDefaultTheme)`
|
|
176
168
|
position: absolute;
|
|
177
169
|
top: 0;
|
|
178
170
|
left: 0;
|
|
@@ -186,10 +178,10 @@ const TextInputFieldIcon = styled__default["default"].div.attrs(defaultTheme.app
|
|
|
186
178
|
transition: opacity 250ms;
|
|
187
179
|
}
|
|
188
180
|
`;
|
|
189
|
-
const TextInput$1 =
|
|
181
|
+
const TextInput$1 = styled.div.attrs(applyDefaultTheme)`
|
|
190
182
|
position: relative;
|
|
191
183
|
|
|
192
|
-
${props => props.disabled &&
|
|
184
|
+
${props => props.disabled && css`
|
|
193
185
|
user-select: none;
|
|
194
186
|
opacity: 0.5;
|
|
195
187
|
cursor: not-allowed;
|
|
@@ -214,17 +206,17 @@ const TextInput$1 = styled__default["default"].div.attrs(defaultTheme.applyDefau
|
|
|
214
206
|
${activeLabel};
|
|
215
207
|
${props => props.error && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
216
208
|
|
|
217
|
-
${props => props.error &&
|
|
209
|
+
${props => props.error && css`
|
|
218
210
|
color: ${props.theme.getColor('red-500')};
|
|
219
211
|
`}
|
|
220
|
-
${props => props.warning &&
|
|
212
|
+
${props => props.warning && css`
|
|
221
213
|
color: ${props.theme.getColor('orange-500')};
|
|
222
214
|
`}
|
|
223
215
|
}
|
|
224
216
|
|
|
225
217
|
}
|
|
226
218
|
`;
|
|
227
|
-
const Description =
|
|
219
|
+
const Description = styled.p.attrs(applyDefaultTheme)`
|
|
228
220
|
margin: 8px 0 0 0;
|
|
229
221
|
padding: 0 0.6875rem;
|
|
230
222
|
font-size: 0.75rem;
|
|
@@ -232,16 +224,16 @@ const Description = styled__default["default"].p.attrs(defaultTheme.applyDefault
|
|
|
232
224
|
|
|
233
225
|
${props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'))};
|
|
234
226
|
|
|
235
|
-
${props => props.error &&
|
|
227
|
+
${props => props.error && css`
|
|
236
228
|
${props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
237
229
|
`}
|
|
238
230
|
|
|
239
|
-
${props => props.warning &&
|
|
231
|
+
${props => props.warning && css`
|
|
240
232
|
${props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500'))}
|
|
241
233
|
`}
|
|
242
234
|
`;
|
|
243
235
|
|
|
244
|
-
const TextInput = React__default
|
|
236
|
+
const TextInput = React__default.forwardRef(function TextInput({
|
|
245
237
|
value,
|
|
246
238
|
defaultValue,
|
|
247
239
|
name,
|
|
@@ -264,46 +256,46 @@ const TextInput = React__default["default"].forwardRef(function TextInput({
|
|
|
264
256
|
noBorder,
|
|
265
257
|
...rest
|
|
266
258
|
}, forwardedRef) {
|
|
267
|
-
const textInputDomNode =
|
|
268
|
-
const textInputRef =
|
|
269
|
-
const [uniqueId] =
|
|
270
|
-
const hasError =
|
|
271
|
-
if (
|
|
259
|
+
const textInputDomNode = useRef(null);
|
|
260
|
+
const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);
|
|
261
|
+
const [uniqueId] = useState(nanoid());
|
|
262
|
+
const hasError = useMemo(() => {
|
|
263
|
+
if (isBoolean(error)) {
|
|
272
264
|
return error;
|
|
273
265
|
}
|
|
274
|
-
return !
|
|
266
|
+
return !isEmpty(error);
|
|
275
267
|
}, [error]);
|
|
276
|
-
const hasWarning =
|
|
277
|
-
if (
|
|
268
|
+
const hasWarning = useMemo(() => {
|
|
269
|
+
if (isBoolean(warning)) {
|
|
278
270
|
return warning;
|
|
279
271
|
}
|
|
280
|
-
return !
|
|
272
|
+
return !isEmpty(warning);
|
|
281
273
|
}, [warning]);
|
|
282
|
-
const descriptionText =
|
|
283
|
-
if (!
|
|
274
|
+
const descriptionText = useMemo(() => {
|
|
275
|
+
if (!isEmpty(error)) {
|
|
284
276
|
return error;
|
|
285
277
|
}
|
|
286
|
-
if (!
|
|
278
|
+
if (!isEmpty(warning)) {
|
|
287
279
|
return warning;
|
|
288
280
|
}
|
|
289
|
-
if (!
|
|
281
|
+
if (!isEmpty(description)) {
|
|
290
282
|
return description;
|
|
291
283
|
}
|
|
292
284
|
return null;
|
|
293
285
|
}, [description, error, warning]);
|
|
294
|
-
return React__default
|
|
286
|
+
return React__default.createElement(TextInput$1, {
|
|
295
287
|
error: hasError,
|
|
296
288
|
disabled: disabled,
|
|
297
289
|
warning: hasWarning,
|
|
298
290
|
className: className,
|
|
299
291
|
style: style
|
|
300
|
-
}, typeof icon !== 'undefined' && React__default
|
|
292
|
+
}, typeof icon !== 'undefined' && React__default.createElement(TextInputFieldIcon, null, icon), React__default.createElement(TextInputWrapper, null, typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 && React__default.createElement(Adornment, {
|
|
301
293
|
htmlFor: `text-input-${uniqueId}`,
|
|
302
294
|
error: hasError,
|
|
303
295
|
warning: hasWarning,
|
|
304
296
|
isPrefix: true,
|
|
305
297
|
onClick: () => textInputDomNode.current.focus()
|
|
306
|
-
}, adornments.prefix), React__default
|
|
298
|
+
}, adornments.prefix), React__default.createElement(TextInputField, _extends({
|
|
307
299
|
ref: textInputRef,
|
|
308
300
|
value: value,
|
|
309
301
|
defaultValue: defaultValue,
|
|
@@ -320,21 +312,21 @@ const TextInput = React__default["default"].forwardRef(function TextInput({
|
|
|
320
312
|
onBlur: onBlur,
|
|
321
313
|
readOnly: readOnly,
|
|
322
314
|
noBorder: noBorder
|
|
323
|
-
}, rest)), !readOnly && noBorder && React__default
|
|
315
|
+
}, rest)), !readOnly && noBorder && React__default.createElement(InputIconContainer, {
|
|
324
316
|
error: error,
|
|
325
317
|
warning: warning
|
|
326
|
-
}, React__default
|
|
318
|
+
}, React__default.createElement(SvgEditNote, null)), label && React__default.createElement(TextInputLabel, {
|
|
327
319
|
htmlFor: `text-input-${uniqueId}`,
|
|
328
320
|
hasPlaceholder: Boolean(placeholder),
|
|
329
321
|
hasAdornments: Boolean(typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 || typeof adornments?.suffix === 'string' && adornments.suffix.length > 0),
|
|
330
322
|
hasIcon: Boolean(icon),
|
|
331
323
|
error: hasError
|
|
332
|
-
}, label, required && ' *'), typeof adornments?.suffix === 'string' && adornments.suffix.length > 0 && React__default
|
|
324
|
+
}, label, required && ' *'), typeof adornments?.suffix === 'string' && adornments.suffix.length > 0 && React__default.createElement(Adornment, {
|
|
333
325
|
error: hasError,
|
|
334
326
|
warning: hasWarning,
|
|
335
327
|
isPrefix: false,
|
|
336
328
|
onClick: () => textInputDomNode.current.focus()
|
|
337
|
-
}, adornments.suffix)), typeof descriptionText === 'string' && descriptionText.length > 0 && React__default
|
|
329
|
+
}, adornments.suffix)), typeof descriptionText === 'string' && descriptionText.length > 0 && React__default.createElement(Description, {
|
|
338
330
|
error: hasError,
|
|
339
331
|
warning: hasWarning
|
|
340
332
|
}, descriptionText));
|
|
@@ -344,29 +336,29 @@ TextInput.defaultProps = {
|
|
|
344
336
|
noBorder: false
|
|
345
337
|
};
|
|
346
338
|
TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
347
|
-
value:
|
|
348
|
-
defaultValue:
|
|
349
|
-
name:
|
|
350
|
-
label:
|
|
351
|
-
placeholder:
|
|
352
|
-
type:
|
|
353
|
-
required:
|
|
354
|
-
disabled:
|
|
355
|
-
readOnly:
|
|
356
|
-
autoComplete:
|
|
357
|
-
description:
|
|
358
|
-
error:
|
|
359
|
-
warning:
|
|
360
|
-
icon:
|
|
361
|
-
adornments:
|
|
362
|
-
prefix:
|
|
363
|
-
suffix:
|
|
339
|
+
value: PropTypes.string,
|
|
340
|
+
defaultValue: PropTypes.string,
|
|
341
|
+
name: PropTypes.string,
|
|
342
|
+
label: PropTypes.string,
|
|
343
|
+
placeholder: PropTypes.string,
|
|
344
|
+
type: PropTypes.string,
|
|
345
|
+
required: PropTypes.bool,
|
|
346
|
+
disabled: PropTypes.bool,
|
|
347
|
+
readOnly: PropTypes.bool,
|
|
348
|
+
autoComplete: PropTypes.string,
|
|
349
|
+
description: PropTypes.string,
|
|
350
|
+
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
351
|
+
warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
352
|
+
icon: PropTypes.element,
|
|
353
|
+
adornments: PropTypes.shape({
|
|
354
|
+
prefix: PropTypes.string,
|
|
355
|
+
suffix: PropTypes.string
|
|
364
356
|
}),
|
|
365
|
-
className:
|
|
366
|
-
style:
|
|
367
|
-
onChange:
|
|
368
|
-
onBlur:
|
|
369
|
-
noBorder:
|
|
357
|
+
className: PropTypes.string,
|
|
358
|
+
style: PropTypes.object,
|
|
359
|
+
onChange: PropTypes.func,
|
|
360
|
+
onBlur: PropTypes.func,
|
|
361
|
+
noBorder: PropTypes.bool
|
|
370
362
|
} : {};
|
|
371
363
|
|
|
372
|
-
|
|
364
|
+
export { TextInput as T };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { _ as _extends } from './_rollupPluginBabelHelpers-c245b26a.js';
|
|
2
|
+
import { a as applyDefaultTheme, P as PropTypes } from './defaultTheme-1bcc2541.js';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import TippyTooltip from '@tippyjs/react';
|
|
6
|
+
import './shift-away-subtle-0dd94a03.js';
|
|
7
|
+
|
|
8
|
+
const Tooltip$1 = styled(TippyTooltip).attrs(applyDefaultTheme)`
|
|
9
|
+
font-family: ${props => props.theme.primaryFontFamily};
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
background: ${props => props.theme.getColor('gray-700')};
|
|
13
|
+
border-radius: 3px;
|
|
14
|
+
pointer-events: default !important;
|
|
15
|
+
.tippy-content {
|
|
16
|
+
padding: 9px 12px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.tippy-arrow {
|
|
20
|
+
color: ${props => props.theme.getColor('gray-700')};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
a {
|
|
24
|
+
color: inherit;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
const Tooltip = React__default.forwardRef(function Tooltip({
|
|
29
|
+
content,
|
|
30
|
+
interactive,
|
|
31
|
+
placement,
|
|
32
|
+
duration,
|
|
33
|
+
trigger,
|
|
34
|
+
visible,
|
|
35
|
+
children,
|
|
36
|
+
...props
|
|
37
|
+
}, ref) {
|
|
38
|
+
return React__default.createElement("div", null, React__default.createElement(Tooltip$1, _extends({
|
|
39
|
+
ref: ref,
|
|
40
|
+
content: content,
|
|
41
|
+
interactive: interactive,
|
|
42
|
+
placement: placement,
|
|
43
|
+
duration: duration,
|
|
44
|
+
trigger: trigger,
|
|
45
|
+
visible: visible,
|
|
46
|
+
animation: 'shift-away-subtle'
|
|
47
|
+
}, props), children));
|
|
48
|
+
});
|
|
49
|
+
Tooltip.defaultProps = {
|
|
50
|
+
content: 'Tooltip',
|
|
51
|
+
interactive: false,
|
|
52
|
+
placement: 'top',
|
|
53
|
+
duration: 350
|
|
54
|
+
};
|
|
55
|
+
Tooltip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
56
|
+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
57
|
+
interactive: PropTypes.bool,
|
|
58
|
+
placement: PropTypes.oneOf(['top', 'top-start', 'top-end', 'right', 'right-start', 'right-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'auto', 'auto-start', 'auto-end']),
|
|
59
|
+
duration: PropTypes.number,
|
|
60
|
+
trigger: PropTypes.oneOf(['mouseenter', 'mouseenter focus', 'click', 'focusin', 'mouseenter click', '']),
|
|
61
|
+
visible: PropTypes.bool,
|
|
62
|
+
children: PropTypes.node
|
|
63
|
+
} : {};
|
|
64
|
+
|
|
65
|
+
export { Tooltip as T };
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
|
|
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';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var defaultTheme = require('./defaultTheme-d9a7342e.js');
|
|
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);
|
|
31
|
-
|
|
32
|
-
const VerificationIconWrapper = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)`
|
|
33
|
-
${props => props.background && styled.css`
|
|
7
|
+
const VerificationIconWrapper = styled.div.attrs(applyDefaultTheme)`
|
|
8
|
+
${props => props.background && css`
|
|
34
9
|
background-color: #000 !important;
|
|
35
10
|
width: fit-content;
|
|
36
11
|
padding: 6px 14px 6px 9px;
|
|
@@ -38,7 +13,7 @@ const VerificationIconWrapper = styled__default["default"].div.attrs(defaultThem
|
|
|
38
13
|
}
|
|
39
14
|
`};
|
|
40
15
|
`;
|
|
41
|
-
const VerificationStatusIcon$1 =
|
|
16
|
+
const VerificationStatusIcon$1 = styled.div.attrs(applyDefaultTheme)`
|
|
42
17
|
display: flex;
|
|
43
18
|
position: relative;
|
|
44
19
|
font: normal normal normal 12px/16px Roboto;
|
|
@@ -50,7 +25,7 @@ const VerificationStatusIcon$1 = styled__default["default"].div.attrs(defaultThe
|
|
|
50
25
|
height: ${props => props.iconHeight ?? 15}px;
|
|
51
26
|
}
|
|
52
27
|
`;
|
|
53
|
-
const VerificationStatusColor =
|
|
28
|
+
const VerificationStatusColor = styled.div.attrs(applyDefaultTheme)`
|
|
54
29
|
position: absolute;
|
|
55
30
|
bottom: 0;
|
|
56
31
|
left: ${props => (props.iconHeight ?? 15) * 2 / 3}px;
|
|
@@ -80,41 +55,41 @@ const VerificationStatusColor = styled__default["default"].div.attrs(defaultThem
|
|
|
80
55
|
var _path;
|
|
81
56
|
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); }
|
|
82
57
|
function SvgVerification(props) {
|
|
83
|
-
return /*#__PURE__*/
|
|
58
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
84
59
|
xmlns: "http://www.w3.org/2000/svg",
|
|
85
60
|
viewBox: "-2.5 0 24 24"
|
|
86
|
-
}, props), _path || (_path = /*#__PURE__*/
|
|
61
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
87
62
|
fill: "currentColor",
|
|
88
63
|
d: "M9.3 12.662q-1.698 0-2.864-1.166T5.27 8.632q0-1.697 1.166-2.864T9.3 4.602q1.698 0 2.864 1.166t1.166 2.864q0 1.698-1.166 2.864T9.3 12.662zm0-1.86q.925 0 1.548-.622.622-.622.622-1.548t-.622-1.547q-.623-.623-1.548-.623t-1.548.623q-.622.622-.622 1.547t.622 1.548q.623.622 1.548.622zm0 12.686q-4.023-1.097-6.661-4.735Q0 15.113 0 10.616V3.482L9.3 0l9.3 3.482v7.134q0 4.498-2.639 8.137-2.638 3.639-6.661 4.735zm0-11.744zm0-9.765L1.86 4.757v5.86q0 1.769.507 3.421.507 1.653 1.408 3.083 1.254-.639 2.626-.999 1.373-.36 2.899-.36t2.898.36q1.373.36 2.627 1 .901-1.431 1.408-3.084.507-1.652.507-3.422V4.757L9.3 1.98zm0 15.643q-1.2 0-2.307.26-1.108.26-2.093.73.923 1.025 2.03 1.773 1.109.747 2.37 1.143 1.262-.395 2.363-1.143 1.102-.748 2.025-1.773-.985-.47-2.087-.73-1.102-.26-2.301-.26z"
|
|
89
64
|
})));
|
|
90
65
|
}
|
|
91
66
|
|
|
92
|
-
const VerificationStatusIcon = React__default
|
|
67
|
+
const VerificationStatusIcon = React__default.forwardRef(function VerificationStatusIcon({
|
|
93
68
|
status,
|
|
94
69
|
iconHeight,
|
|
95
70
|
background,
|
|
96
71
|
...props
|
|
97
72
|
}, forwardedRef) {
|
|
98
|
-
return React__default
|
|
73
|
+
return React__default.createElement(VerificationIconWrapper, {
|
|
99
74
|
background: background
|
|
100
|
-
}, React__default
|
|
75
|
+
}, React__default.createElement(VerificationStatusIcon$1, _extends$1({
|
|
101
76
|
iconHeight: iconHeight,
|
|
102
77
|
background: background,
|
|
103
78
|
ref: forwardedRef
|
|
104
|
-
}, props), React__default
|
|
79
|
+
}, props), React__default.createElement(SvgVerification, null), React__default.createElement(VerificationStatusColor, {
|
|
105
80
|
iconHeight: iconHeight,
|
|
106
81
|
status: status,
|
|
107
82
|
background: background
|
|
108
83
|
})));
|
|
109
84
|
});
|
|
110
85
|
VerificationStatusIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
111
|
-
status:
|
|
112
|
-
iconHeight:
|
|
113
|
-
background:
|
|
86
|
+
status: PropTypes.oneOf(['verified', 'pending', 'rejected', 'mixed']).isRequired,
|
|
87
|
+
iconHeight: PropTypes.number,
|
|
88
|
+
background: PropTypes.bool
|
|
114
89
|
} : {};
|
|
115
90
|
VerificationStatusIcon.defaultProps = {
|
|
116
91
|
iconHeight: 15,
|
|
117
92
|
background: false
|
|
118
93
|
};
|
|
119
94
|
|
|
120
|
-
|
|
95
|
+
export { VerificationStatusIcon as V };
|
package/build/{_rollupPluginBabelHelpers-4b342fad.js → _rollupPluginBabelHelpers-c245b26a.js}
RENAMED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
function _extends() {
|
|
4
2
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
5
3
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -10,4 +8,4 @@ function _extends() {
|
|
|
10
8
|
}, _extends.apply(null, arguments);
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
export { _extends as _ };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
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); }
|
|
5
|
+
function SvgArrowForward(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 16 16"
|
|
9
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
className: "arrow-forward_svg__st0",
|
|
11
|
+
d: "M12.2 9H0V7h12.2L6.6 1.4 8 0l8 8-8 8-1.4-1.4L12.2 9z"
|
|
12
|
+
})));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SvgArrowForward as S };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
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); }
|
|
5
|
+
function SvgClose(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 27.3 27.3"
|
|
9
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M2.1 27.3L0 25.2l11.55-11.55L0 2.1 2.1 0l11.55 11.55L25.2 0l2.1 2.1-11.55 11.55L27.3 25.2l-2.1 2.1-11.55-11.55L2.1 27.3z"
|
|
12
|
+
})));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SvgClose as S };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require('styled-components');
|
|
8
|
-
require('lodash');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
module.exports = Alert.Alert;
|
|
1
|
+
export { A as default } from '../../Alert-e6847a22.js';
|
|
2
|
+
import '../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../../defaultTheme-1bcc2541.js';
|
|
5
|
+
import 'styled-components';
|
|
6
|
+
import 'lodash';
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
require('styled-components');
|
|
7
|
-
require('react');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
module.exports = Badge.Badge;
|
|
1
|
+
export { B as default } from '../../Badge-d93586a9.js';
|
|
2
|
+
import '../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
3
|
+
import '../../defaultTheme-1bcc2541.js';
|
|
4
|
+
import 'styled-components';
|
|
5
|
+
import 'react';
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
require('../../shift-away-subtle-158617af.js');
|
|
12
|
-
require('popper-max-size-modifier');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
module.exports = Popover.Popover;
|
|
1
|
+
export { P as default } from '../../Popover-20050b91.js';
|
|
2
|
+
import '../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
3
|
+
import 'lodash';
|
|
4
|
+
import '../../defaultTheme-1bcc2541.js';
|
|
5
|
+
import 'styled-components';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'polished';
|
|
8
|
+
import '@tippyjs/react';
|
|
9
|
+
import '../../shift-away-subtle-0dd94a03.js';
|
|
10
|
+
import 'popper-max-size-modifier';
|
package/build/data/Tab/index.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
require('styled-components');
|
|
7
|
-
require('react');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
module.exports = Tab.Tab;
|
|
1
|
+
export { T as default } from '../../Tab-04d435c3.js';
|
|
2
|
+
import '../../_rollupPluginBabelHelpers-c245b26a.js';
|
|
3
|
+
import '../../defaultTheme-1bcc2541.js';
|
|
4
|
+
import 'styled-components';
|
|
5
|
+
import 'react';
|