@ntbjs/react-components 1.2.0-rc.16 → 1.2.0-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{AssetGallery-aa04a849.js → AssetGallery-80f249a7.js} +2 -2
- package/{CompactTextInput-eab4869f.js → CompactTextInput-ed824ca9.js} +10 -7
- package/{Instructions-92d9cb6f.js → Instructions-f848fad0.js} +1 -1
- package/{TextArea-b0125a43.js → TextArea-4e84d4e7.js} +116 -90
- package/inputs/CompactTextInput/index.js +1 -1
- package/inputs/TextArea/index.js +13 -1
- package/inputs/index.js +2 -2
- package/package.json +1 -1
- package/widgets/AssetGallery/index.js +3 -3
- package/widgets/Instructions/index.js +13 -2
- package/widgets/index.js +4 -4
|
@@ -21,10 +21,10 @@ require('./Button-c38d56a0.js');
|
|
|
21
21
|
require('./Checkbox-68dc38a8.js');
|
|
22
22
|
require('./CompactAutocompleteSelect-43e79e21.js');
|
|
23
23
|
require('./CompactStarRating-9c81ca6e.js');
|
|
24
|
-
require('./CompactTextInput-
|
|
24
|
+
require('./CompactTextInput-ed824ca9.js');
|
|
25
25
|
require('./MultiSelect-4b8d3d0d.js');
|
|
26
26
|
require('./Radio-32d0513a.js');
|
|
27
|
-
require('./TextArea-
|
|
27
|
+
require('./TextArea-4e84d4e7.js');
|
|
28
28
|
require('./TextInput-0d109708.js');
|
|
29
29
|
require('./Switch-4a41585f.js');
|
|
30
30
|
var ContextMenu = require('./ContextMenu-4ec3d9f3.js');
|
|
@@ -186,7 +186,8 @@ var CompactTextInput = React__default['default'].forwardRef(function CompactText
|
|
|
186
186
|
disabled = _ref.disabled,
|
|
187
187
|
edit = _ref.edit,
|
|
188
188
|
type = _ref.type,
|
|
189
|
-
|
|
189
|
+
descriptionToolTip = _ref.descriptionToolTip,
|
|
190
|
+
displayDescriptionToolTip = _ref.displayDescriptionToolTip,
|
|
190
191
|
bold = _ref.bold,
|
|
191
192
|
hidden = _ref.hidden,
|
|
192
193
|
onChangeProp = _ref.onChange,
|
|
@@ -194,7 +195,7 @@ var CompactTextInput = React__default['default'].forwardRef(function CompactText
|
|
|
194
195
|
onBlurProp = _ref.onBlur,
|
|
195
196
|
loadingIcon = _ref.loadingIcon,
|
|
196
197
|
successIcon = _ref.successIcon,
|
|
197
|
-
props = defaultTheme._objectWithoutProperties(_ref, ["label", "inputType", "name", "defaultValue", "value", "placeholder", "link", "linkTarget", "linkHandler", "activeLinkHandler", "autoSelect", "readOnly", "disabled", "edit", "type", "
|
|
198
|
+
props = defaultTheme._objectWithoutProperties(_ref, ["label", "inputType", "name", "defaultValue", "value", "placeholder", "link", "linkTarget", "linkHandler", "activeLinkHandler", "autoSelect", "readOnly", "disabled", "edit", "type", "descriptionToolTip", "displayDescriptionToolTip", "bold", "hidden", "onChange", "onFocus", "onBlur", "loadingIcon", "successIcon"]);
|
|
198
199
|
|
|
199
200
|
var _useState = React.useState(nanoid.nanoid()),
|
|
200
201
|
_useState2 = defaultTheme._slicedToArray(_useState, 1),
|
|
@@ -254,8 +255,8 @@ var CompactTextInput = React__default['default'].forwardRef(function CompactText
|
|
|
254
255
|
disabled: disabled
|
|
255
256
|
}, label, React__default['default'].createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon)), React__default['default'].createElement(InputContainer, {
|
|
256
257
|
$hasLabel: !lodash.isEmpty(label)
|
|
257
|
-
}, !
|
|
258
|
-
content:
|
|
258
|
+
}, !descriptionToolTip && !link && input(), descriptionToolTip && displayDescriptionToolTip && React__default['default'].createElement(Tooltip.Tooltip, {
|
|
259
|
+
content: descriptionToolTip,
|
|
259
260
|
key: "tooltip1",
|
|
260
261
|
placement: "bottom-end",
|
|
261
262
|
visible: true,
|
|
@@ -276,7 +277,7 @@ var CompactTextInput = React__default['default'].forwardRef(function CompactText
|
|
|
276
277
|
placement: "bottom-start",
|
|
277
278
|
zIndex: 999999,
|
|
278
279
|
interactive: true
|
|
279
|
-
}, input())), !
|
|
280
|
+
}, input())), !descriptionToolTip && link && readOnly && input(), !readOnly && !disabled && React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(InputIconContainer, {
|
|
280
281
|
type: type
|
|
281
282
|
}, React__default['default'].createElement(editNote.SvgEditNote, null)), lodash.isEmpty(label) && React__default['default'].createElement(InputSuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon))));
|
|
282
283
|
});
|
|
@@ -303,7 +304,8 @@ CompactTextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
303
304
|
onFocus: defaultTheme.PropTypes.func,
|
|
304
305
|
onBlur: defaultTheme.PropTypes.func,
|
|
305
306
|
type: defaultTheme.PropTypes.oneOf(['', 'error', 'warning', 'loading', 'success']),
|
|
306
|
-
|
|
307
|
+
descriptionToolTip: defaultTheme.PropTypes.string,
|
|
308
|
+
displayDescriptionToolTip: defaultTheme.PropTypes.bool,
|
|
307
309
|
loadingIcon: defaultTheme.PropTypes.element,
|
|
308
310
|
successIcon: defaultTheme.PropTypes.element
|
|
309
311
|
} : {};
|
|
@@ -313,7 +315,8 @@ CompactTextInput.defaultProps = {
|
|
|
313
315
|
linkTarget: '_self',
|
|
314
316
|
bold: false,
|
|
315
317
|
readOnly: false,
|
|
316
|
-
|
|
318
|
+
descriptionToolTip: '',
|
|
319
|
+
displayDescriptionToolTip: false,
|
|
317
320
|
edit: false,
|
|
318
321
|
hidden: false,
|
|
319
322
|
type: '',
|
|
@@ -5,7 +5,7 @@ var lodash = require('lodash');
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var warningCircle = require('./warning-circle-24522402.js');
|
|
7
7
|
var CompactAutocompleteSelect = require('./CompactAutocompleteSelect-43e79e21.js');
|
|
8
|
-
var TextArea = require('./TextArea-
|
|
8
|
+
var TextArea = require('./TextArea-4e84d4e7.js');
|
|
9
9
|
var styled = require('styled-components');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -4,6 +4,13 @@ var defaultTheme = require('./defaultTheme-ea44e34a.js');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var useMergedRefs = require('./useMergedRefs-b6d2f8fc.js');
|
|
6
6
|
var nanoid = require('nanoid');
|
|
7
|
+
require('./Alert-13b75102.js');
|
|
8
|
+
require('./Badge-aec841c8.js');
|
|
9
|
+
require('./Popover-e4ecb887.js');
|
|
10
|
+
require('./Tab-f499ecbc.js');
|
|
11
|
+
require('./Tabs-4d7742bc.js');
|
|
12
|
+
var Tooltip = require('./Tooltip-6b6f0b0a.js');
|
|
13
|
+
require('./VerificationStatusIcon-b574fd21.js');
|
|
7
14
|
var editNote = require('./edit-note-c47d292e.js');
|
|
8
15
|
var styled = require('styled-components');
|
|
9
16
|
|
|
@@ -12,7 +19,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
20
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
21
|
|
|
15
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44;
|
|
22
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45;
|
|
16
23
|
var fadeInCheck = styled.keyframes(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n"])));
|
|
17
24
|
var fadeOutCheck = styled.keyframes(_templateObject2 || (_templateObject2 = defaultTheme._taggedTemplateLiteral(["\n from {\n opacity: 1\n }\n to {\n opacity: 0\n }\n"])));
|
|
18
25
|
var activeLabel = styled.css(_templateObject3 || (_templateObject3 = defaultTheme._taggedTemplateLiteral(["\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\n"])));
|
|
@@ -28,7 +35,7 @@ var InputIconContainer = styled__default['default'].div.attrs(defaultTheme.apply
|
|
|
28
35
|
}, function (props) {
|
|
29
36
|
return props.disabled && styled.css(_templateObject6 || (_templateObject6 = defaultTheme._taggedTemplateLiteral(["\n display: none;\n "])));
|
|
30
37
|
});
|
|
31
|
-
var TextInputField = styled__default['default'].textarea.attrs(defaultTheme.applyDefaultTheme)(_templateObject7 || (_templateObject7 = defaultTheme._taggedTemplateLiteral(["\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n border-radius: 2px;\n padding: 5px 10px;\n resize: vertical;\n z-index: 0;\n border-radius: 3px;\n box-sizing: border-box;\n appearance: none;\n border: 1px solid;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", "\n\n transition: height 550ms ease-in-out; border-color 350ms;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n \n ", "\n \n ", "\n\n ", "\n \n\n ", "\n \n\n ", "\n\n ", " \n ", "\n\n &&:hover:not(:focus) {\n ", ";\n }\n\n ", " \n\n ", " \n ", "\n ", ";\n\n ", ";\n\n ", ";\n\n &&:hover:not(:focus) {\n ", ";\n transition: background 350ms;\n & + ", " {\n opacity: 1;\n ", ";\n transition: opacity 350ms;\n }\n }\n\n ", "\n ", "\n ", "\n\n &::placeholder {\n ", "\n\n ", "\n }\n\n &&:focus {\n outline: none;\n ", "\n\n ", ";\n\n ", "\n ", "\n }\n\n &&:not(:hover):not(:focus) {\n ", ";\n\n ", ";\n }\n"])), function (props) {
|
|
38
|
+
var TextInputField = styled__default['default'].textarea.attrs(defaultTheme.applyDefaultTheme)(_templateObject7 || (_templateObject7 = defaultTheme._taggedTemplateLiteral(["\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n border-radius: 2px;\n padding: 5px 10px;\n resize: vertical;\n z-index: 0;\n border-radius: 3px;\n box-sizing: border-box;\n appearance: none;\n border: 1px solid;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", "\n\n transition: height 550ms ease-in-out; border-color 350ms;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n \n ", "\n \n ", "\n\n ", "\n \n\n ", "\n \n\n ", "\n\n ", " \n ", "\n\n ", "\n\n &&:hover:not(:focus) {\n ", ";\n }\n\n ", " \n\n ", " \n ", "\n ", ";\n\n ", ";\n\n ", ";\n\n &&:hover:not(:focus) {\n ", ";\n transition: background 350ms;\n & + ", " {\n opacity: 1;\n ", ";\n transition: opacity 350ms;\n }\n }\n\n ", "\n ", "\n ", "\n\n &::placeholder {\n ", "\n\n ", "\n }\n\n &&:focus {\n outline: none;\n ", "\n\n ", ";\n\n ", "\n ", "\n }\n\n &&:not(:hover):not(:focus) {\n ", ";\n\n ", ";\n }\n"])), function (props) {
|
|
32
39
|
return props.padding === 'small' && styled.css(_templateObject8 || (_templateObject8 = defaultTheme._taggedTemplateLiteral(["\n padding: 5px 10px;\n "])));
|
|
33
40
|
}, function (props) {
|
|
34
41
|
return props.padding === 'medium' && styled.css(_templateObject9 || (_templateObject9 = defaultTheme._taggedTemplateLiteral(["\n padding: 13px 15px;\n "])));
|
|
@@ -59,17 +66,19 @@ var TextInputField = styled__default['default'].textarea.attrs(defaultTheme.appl
|
|
|
59
66
|
}, function (props) {
|
|
60
67
|
return props.noBorder && styled.css(_templateObject17 || (_templateObject17 = defaultTheme._taggedTemplateLiteral(["\n border-color: transparent !important;\n "])));
|
|
61
68
|
}, function (props) {
|
|
62
|
-
return props.type === 'error-border' && styled.css(_templateObject18 || (_templateObject18 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('border-color', props.theme.getColor('red-
|
|
69
|
+
return props.type === 'error-border' && styled.css(_templateObject18 || (_templateObject18 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('border-color', props.theme.getColor('red-500'), props.theme.getColor('red-500')));
|
|
70
|
+
}, function (props) {
|
|
71
|
+
return props.type === 'warning-border' && styled.css(_templateObject19 || (_templateObject19 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('border-color', props.theme.getColor('orange-500'), props.theme.getColor('orange-500')));
|
|
63
72
|
}, function (props) {
|
|
64
73
|
return !props.readOnly && props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
65
74
|
}, function (props) {
|
|
66
|
-
return props.type === 'warning' && styled.css(
|
|
67
|
-
return props.disabled && styled.css(
|
|
75
|
+
return props.type === 'warning' && styled.css(_templateObject20 || (_templateObject20 = defaultTheme._taggedTemplateLiteral(["\n padding: 13px 15px 13px 10px;\n ", "\n ", "\n &&:hover:not(:focus) {\n ", "\n ", "\n }\n &&:read-only:hover {\n ", "\n }\n "])), props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')), props.theme.themeProp('background', '#634E01 ', props.theme.getColor('signal-yellow-400')), function (props) {
|
|
76
|
+
return props.disabled && styled.css(_templateObject21 || (_templateObject21 = defaultTheme._taggedTemplateLiteral(["\n background: none !important;\n "])));
|
|
68
77
|
}, props.theme.themeProp('background', '#816600', '#F4E21E'), props.theme.themeProp('background', props.theme.getColor('signal-yellow-500'), props.theme.getColor('signal-yellow-400')));
|
|
69
78
|
}, function (props) {
|
|
70
|
-
return props.type === 'error' && styled.css(
|
|
79
|
+
return props.type === 'error' && styled.css(_templateObject22 || (_templateObject22 = defaultTheme._taggedTemplateLiteral(["\n padding: 13px 15px 13px 10px;\n background: ", " !important;\n ", "\n :focus {\n background: white !important;\n }\n &&:hover:not(:focus) {\n background: #f7d5d0 !important;\n }\n &&:read-only:hover {\n background: ", " !important;\n }\n "])), props.theme.getColor('red-200'), props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900')), props.theme.getColor('red-200'));
|
|
71
80
|
}, function (props) {
|
|
72
|
-
return props.lightBackground && styled.css(
|
|
81
|
+
return props.lightBackground && styled.css(_templateObject23 || (_templateObject23 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n &&:hover {\n ", "\n }\n "])), props.theme.themeProp('background', '#FFFDDE', '#fffde8'), props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900')), props.theme.themeProp('background', 'white', 'white'));
|
|
73
82
|
}, function (props) {
|
|
74
83
|
return props.edit && props.theme.themeProp('background', '#505050', '#eff1f4');
|
|
75
84
|
}, function (props) {
|
|
@@ -79,13 +88,13 @@ var TextInputField = styled__default['default'].textarea.attrs(defaultTheme.appl
|
|
|
79
88
|
}, function (props) {
|
|
80
89
|
return props.noBorder && !props.readOnly && props.type != 'warning' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')) : 'background: transparent';
|
|
81
90
|
}, InputIconContainer, function (props) {
|
|
82
|
-
return props.type === 'success' && styled.css(
|
|
91
|
+
return props.type === 'success' && styled.css(_templateObject24 || (_templateObject24 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0;\n "])));
|
|
83
92
|
}, function (props) {
|
|
84
|
-
return props.type === 'warning' && styled.css(
|
|
93
|
+
return props.type === 'warning' && styled.css(_templateObject25 || (_templateObject25 = defaultTheme._taggedTemplateLiteral(["\n border-color: ", ";\n "])), props.theme.getColor('orange-500'));
|
|
85
94
|
}, function (props) {
|
|
86
|
-
return props.type === 'error' && styled.css(
|
|
95
|
+
return props.type === 'error' && styled.css(_templateObject26 || (_templateObject26 = defaultTheme._taggedTemplateLiteral(["\n border-color: ", ";\n "])), props.theme.getColor('red-500'));
|
|
87
96
|
}, function (props) {
|
|
88
|
-
return props.hasIcon && styled.css(
|
|
97
|
+
return props.hasIcon && styled.css(_templateObject27 || (_templateObject27 = defaultTheme._taggedTemplateLiteral(["\n padding-left: 55px;\n padding-right: 25px;\n "])));
|
|
89
98
|
}, function (props) {
|
|
90
99
|
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'), 1);
|
|
91
100
|
}, function (props) {
|
|
@@ -95,56 +104,56 @@ var TextInputField = styled__default['default'].textarea.attrs(defaultTheme.appl
|
|
|
95
104
|
}, function (props) {
|
|
96
105
|
return props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
97
106
|
}, function (props) {
|
|
98
|
-
return props.type === 'warning' && styled.css(
|
|
107
|
+
return props.type === 'warning' && styled.css(_templateObject28 || (_templateObject28 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n "])), props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900')));
|
|
99
108
|
}, function (props) {
|
|
100
|
-
return props.type === 'error' && styled.css(
|
|
109
|
+
return props.type === 'error' && styled.css(_templateObject29 || (_templateObject29 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n "])), props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900')));
|
|
101
110
|
}, function (props) {
|
|
102
111
|
return props.edit && props.theme.themeProp('background', '#505050', '#eff1f4');
|
|
103
112
|
}, function (props) {
|
|
104
113
|
return props.edit && props.type === 'warning' && props.theme.themeProp('background', '#AD8800', '#FFF3A7');
|
|
105
114
|
});
|
|
106
|
-
var TextInputLabel = styled__default['default'].label.attrs(defaultTheme.applyDefaultTheme)(
|
|
115
|
+
var TextInputLabel = styled__default['default'].label.attrs(defaultTheme.applyDefaultTheme)(_templateObject30 || (_templateObject30 = defaultTheme._taggedTemplateLiteral(["\n position: absolute;\n top: 13px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n margin-botton: 50px;\n\n ", ";\n\n ", "\n\n ", "\n\n ", "\n content: \"\";\n\n ", "\n"])), placeholderBaseStyle, function (props) {
|
|
107
116
|
return props.theme.themeProp('background', "linear-gradient(0deg, ".concat(props.theme.getColor('gray-900'), " calc(50% + 1px), transparent 50%)"), "linear-gradient(0deg, ".concat(props.theme.getColor('white'), " calc(50% + 1px), transparent 50%)"));
|
|
108
117
|
}, function (props) {
|
|
109
|
-
return !props.inputIsEmpty && styled.css(
|
|
118
|
+
return !props.inputIsEmpty && styled.css(_templateObject31 || (_templateObject31 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), activeLabel);
|
|
110
119
|
}, function (props) {
|
|
111
|
-
return props.hasPlaceholder && styled.css(
|
|
120
|
+
return props.hasPlaceholder && styled.css(_templateObject32 || (_templateObject32 = defaultTheme._taggedTemplateLiteral(["\n ", ";\n "])), activeLabel);
|
|
112
121
|
}, function (props) {
|
|
113
|
-
return props.hasIcon && styled.css(
|
|
122
|
+
return props.hasIcon && styled.css(_templateObject33 || (_templateObject33 = defaultTheme._taggedTemplateLiteral(["\n left: 55px;\n "])));
|
|
114
123
|
});
|
|
115
|
-
var TextInputFieldIcon = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(
|
|
116
|
-
var TextInputFieldIconAlert = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(
|
|
124
|
+
var TextInputFieldIcon = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject34 || (_templateObject34 = defaultTheme._taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n"])));
|
|
125
|
+
var TextInputFieldIconAlert = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject35 || (_templateObject35 = defaultTheme._taggedTemplateLiteral(["\n position: absolute;\n top: 2.8px;\n height: 2.625rem;\n display: flex;\n padding: 0 10px 0 30px;\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n margin-top: -3px;\n ", "\n }\n"])), function (props) {
|
|
117
126
|
return props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-600'));
|
|
118
127
|
});
|
|
119
|
-
var TextInput = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(
|
|
120
|
-
return props.readOnly && styled.css(
|
|
128
|
+
var TextInput = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject36 || (_templateObject36 = defaultTheme._taggedTemplateLiteral(["\n position: relative;\n\n ", "\n\n ", "\n\n &:focus-within {\n ", " {\n ", ";\n }\n\n ", " {\n svg {\n opacity: 1;\n }\n }\n }\n\n ", ":not(:placeholder-shown) + ", " {\n ", ";\n ", "\n }\n }\n"])), function (props) {
|
|
129
|
+
return props.readOnly && styled.css(_templateObject37 || (_templateObject37 = defaultTheme._taggedTemplateLiteral(["\n pointer-events: none;\n "])));
|
|
121
130
|
}, function (props) {
|
|
122
|
-
return props.disabled && styled.css(
|
|
131
|
+
return props.disabled && styled.css(_templateObject38 || (_templateObject38 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n "])));
|
|
123
132
|
}, TextInputLabel, activeLabel, TextInputFieldIcon, TextInputField, TextInputLabel, activeLabel, function (props) {
|
|
124
133
|
return props.type === 'error' && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'));
|
|
125
134
|
});
|
|
126
|
-
var Description = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(
|
|
135
|
+
var Description = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject39 || (_templateObject39 = defaultTheme._taggedTemplateLiteral(["\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ", ";\n\n ", "\n\n ", "\n"])), function (props) {
|
|
127
136
|
return props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'));
|
|
128
137
|
}, function (props) {
|
|
129
|
-
return (props.type === 'warning-border' || props.type === 'warning') && styled.css(
|
|
138
|
+
return (props.type === 'warning-border' || props.type === 'warning') && styled.css(_templateObject40 || (_templateObject40 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500')));
|
|
130
139
|
}, function (props) {
|
|
131
|
-
return (props.type === 'error-border' || props.type === 'error') && styled.css(
|
|
140
|
+
return (props.type === 'error-border' || props.type === 'error') && styled.css(_templateObject41 || (_templateObject41 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
132
141
|
});
|
|
133
|
-
var SuccessContainer = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(
|
|
142
|
+
var SuccessContainer = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject42 || (_templateObject42 = defaultTheme._taggedTemplateLiteral(["\n opacity: 1;\n pointer-events: none;\n opacity: ", ";\n animation: ", " 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n position: absolute;\n margin-top: -35px;\n margin-left: 5px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ", "\n\n > svg {\n width: 15px;\n }\n"])), function (props) {
|
|
134
143
|
return props.fadeIn ? 0 : 1;
|
|
135
144
|
}, function (props) {
|
|
136
145
|
return props.fadeIn ? fadeOutCheck : fadeInCheck;
|
|
137
146
|
}, function (props) {
|
|
138
147
|
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500'));
|
|
139
148
|
});
|
|
140
|
-
var ShowMoreText = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(
|
|
141
|
-
return props.expanded && styled.css(
|
|
149
|
+
var ShowMoreText = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject43 || (_templateObject43 = defaultTheme._taggedTemplateLiteral(["\n margin-top: -18px;\n margin-bottom: 0;\n display: block;\n position: absolute;\n font-size: 0.875rem;\n cursor: pointer;\n padding: 2px 10px;\n margin-right: 10px;\n margin-top: -26px;\n ", "\n transition: margin-top 550ms ease-in-out;\n -webkit-mask-image: linear-gradient(180deg, transparent 1px, white 7px);\n ", "\n\n ", ";\n\n ", "\n"])), function (props) {
|
|
150
|
+
return props.expanded && styled.css(_templateObject44 || (_templateObject44 = defaultTheme._taggedTemplateLiteral(["\n margin-top: 0px;\n "])));
|
|
142
151
|
}, function (props) {
|
|
143
152
|
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
144
153
|
}, function (props) {
|
|
145
154
|
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('emerald-500'));
|
|
146
155
|
}, function (props) {
|
|
147
|
-
return props.type === 'error' && styled.css(
|
|
156
|
+
return props.type === 'error' && styled.css(_templateObject45 || (_templateObject45 = defaultTheme._taggedTemplateLiteral(["\n content: 'error';\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
148
157
|
});
|
|
149
158
|
|
|
150
159
|
var TextArea = React__default['default'].forwardRef(function TextArea(_ref, forwardedRef) {
|
|
@@ -177,7 +186,9 @@ var TextArea = React__default['default'].forwardRef(function TextArea(_ref, forw
|
|
|
177
186
|
loadingIcon = _ref.loadingIcon,
|
|
178
187
|
successIcon = _ref.successIcon,
|
|
179
188
|
padding = _ref.padding,
|
|
180
|
-
|
|
189
|
+
descriptionToolTip = _ref.descriptionToolTip,
|
|
190
|
+
displayDescriptionToolTip = _ref.displayDescriptionToolTip,
|
|
191
|
+
rest = defaultTheme._objectWithoutProperties(_ref, ["value", "defaultValue", "name", "label", "placeholder", "required", "disabled", "hidden", "readOnly", "edit", "showMore", "showMoreText", "showLessText", "autoComplete", "description", "type", "icon", "rows", "className", "style", "onChange", "onBlur", "lightBackground", "noBorder", "instructionsTextArea", "isExpanded", "loadingIcon", "successIcon", "padding", "descriptionToolTip", "displayDescriptionToolTip"]);
|
|
181
192
|
|
|
182
193
|
var textInputDomNode = React.useRef(null);
|
|
183
194
|
var textInputRef = useMergedRefs.useMergedRefs(forwardedRef, textInputDomNode);
|
|
@@ -248,65 +259,76 @@ var TextArea = React__default['default'].forwardRef(function TextArea(_ref, forw
|
|
|
248
259
|
event.stopPropagation();
|
|
249
260
|
}
|
|
250
261
|
}, []);
|
|
251
|
-
if (hidden) return null;
|
|
252
|
-
return React__default['default'].createElement(TextInput, {
|
|
253
|
-
disabled: disabled,
|
|
254
|
-
readOnly: readOnly,
|
|
255
|
-
type: type,
|
|
256
|
-
className: className,
|
|
257
|
-
style: style
|
|
258
|
-
}, React__default['default'].createElement(TextInputFieldIconAlert, null, icon), React__default['default'].createElement(TextInputField, defaultTheme._extends({
|
|
259
|
-
ref: textInputRef,
|
|
260
|
-
rows: rows,
|
|
261
|
-
expanded: expanded,
|
|
262
|
-
defaultHeight: defaultHeight,
|
|
263
|
-
maxHeight: maxHeight,
|
|
264
|
-
value: value,
|
|
265
|
-
defaultValue: defaultValue,
|
|
266
|
-
name: name,
|
|
267
|
-
placeholder: placeholder || ' ',
|
|
268
|
-
required: required,
|
|
269
|
-
readOnly: readOnly,
|
|
270
|
-
disabled: disabled,
|
|
271
|
-
edit: edit,
|
|
272
|
-
instructionsTextArea: instructionsTextArea,
|
|
273
|
-
showMore: showMore,
|
|
274
|
-
type: type,
|
|
275
|
-
autoComplete: autoComplete,
|
|
276
|
-
hasIcon: Boolean(icon),
|
|
277
|
-
icon: icon,
|
|
278
|
-
id: "text-input-".concat(uniqueId),
|
|
279
|
-
lightBackground: lightBackground,
|
|
280
|
-
padding: padding,
|
|
281
|
-
onChange: function onChange(e) {
|
|
282
|
-
if (e.target.value) {
|
|
283
|
-
setInputIsEmpty(false);
|
|
284
|
-
} else {
|
|
285
|
-
setInputIsEmpty(true);
|
|
286
|
-
}
|
|
287
262
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
263
|
+
var input = function input() {
|
|
264
|
+
return React__default['default'].createElement(TextInput, {
|
|
265
|
+
disabled: disabled,
|
|
266
|
+
readOnly: readOnly,
|
|
267
|
+
type: type,
|
|
268
|
+
className: className,
|
|
269
|
+
style: style
|
|
270
|
+
}, React__default['default'].createElement(TextInputFieldIconAlert, null, icon), React__default['default'].createElement(TextInputField, defaultTheme._extends({
|
|
271
|
+
ref: textInputRef,
|
|
272
|
+
rows: rows,
|
|
273
|
+
expanded: expanded,
|
|
274
|
+
defaultHeight: defaultHeight,
|
|
275
|
+
maxHeight: maxHeight,
|
|
276
|
+
value: value,
|
|
277
|
+
defaultValue: defaultValue,
|
|
278
|
+
name: name,
|
|
279
|
+
placeholder: placeholder || ' ',
|
|
280
|
+
required: required,
|
|
281
|
+
readOnly: readOnly,
|
|
282
|
+
disabled: disabled,
|
|
283
|
+
edit: edit,
|
|
284
|
+
instructionsTextArea: instructionsTextArea,
|
|
285
|
+
showMore: showMore,
|
|
286
|
+
type: type,
|
|
287
|
+
autoComplete: autoComplete,
|
|
288
|
+
hasIcon: Boolean(icon),
|
|
289
|
+
icon: icon,
|
|
290
|
+
id: "text-input-".concat(uniqueId),
|
|
291
|
+
lightBackground: lightBackground,
|
|
292
|
+
padding: padding,
|
|
293
|
+
onChange: function onChange(e) {
|
|
294
|
+
if (e.target.value) {
|
|
295
|
+
setInputIsEmpty(false);
|
|
296
|
+
} else {
|
|
297
|
+
setInputIsEmpty(true);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
_onChange(e);
|
|
301
|
+
},
|
|
302
|
+
onKeyDown: onKeyDown,
|
|
303
|
+
onBlur: onBlur,
|
|
304
|
+
noBorder: noBorder
|
|
305
|
+
}, rest, {
|
|
306
|
+
onClick: showMore ? handleTextAreaChange : undefined
|
|
307
|
+
})), (type === 'loading' || type === 'success') && React__default['default'].createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default['default'].createElement(InputIconContainer, {
|
|
308
|
+
disabled: disabled
|
|
309
|
+
}, React__default['default'].createElement(editNote.SvgEditNote, {
|
|
310
|
+
className: padding === 'small' && 'smallPadingIcon'
|
|
311
|
+
})), label && React__default['default'].createElement(TextInputLabel, {
|
|
312
|
+
htmlFor: "text-input-".concat(uniqueId),
|
|
313
|
+
hasPlaceholder: Boolean(placeholder),
|
|
314
|
+
hasIcon: Boolean(icon),
|
|
315
|
+
inputIsEmpty: inputIsEmpty
|
|
316
|
+
}, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default['default'].createElement(Description, {
|
|
317
|
+
type: type
|
|
318
|
+
}, description), maxContentRows > rows && showMore && React__default['default'].createElement(ShowMoreText, {
|
|
319
|
+
onClick: showMore ? handleTextAreaShowLess : undefined,
|
|
320
|
+
expanded: expanded
|
|
321
|
+
}, !expanded ? showMoreText : showLessText));
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
if (hidden) return null;
|
|
325
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null, !descriptionToolTip && !displayDescriptionToolTip && input(), descriptionToolTip && displayDescriptionToolTip && React__default['default'].createElement(Tooltip.Tooltip, {
|
|
326
|
+
content: descriptionToolTip,
|
|
327
|
+
key: "tooltip1",
|
|
328
|
+
placement: "bottom-end",
|
|
329
|
+
visible: true,
|
|
330
|
+
zIndex: 999999
|
|
331
|
+
}, input()));
|
|
310
332
|
});
|
|
311
333
|
TextArea.defaultProps = {
|
|
312
334
|
rows: 4,
|
|
@@ -320,6 +342,8 @@ TextArea.defaultProps = {
|
|
|
320
342
|
type: '',
|
|
321
343
|
padding: 'medium',
|
|
322
344
|
instructionsTextArea: false,
|
|
345
|
+
descriptionToolTip: '',
|
|
346
|
+
displayDescriptionToolTip: false,
|
|
323
347
|
isExpanded: function isExpanded() {}
|
|
324
348
|
};
|
|
325
349
|
TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -350,10 +374,12 @@ TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
350
374
|
onBlur: defaultTheme.PropTypes.func,
|
|
351
375
|
noBorder: defaultTheme.PropTypes.bool,
|
|
352
376
|
isExpanded: defaultTheme.PropTypes.func,
|
|
353
|
-
type: defaultTheme.PropTypes.oneOf(['', 'error', 'error-border', 'warning', 'loading', 'success']),
|
|
377
|
+
type: defaultTheme.PropTypes.oneOf(['', 'error', 'error-border', 'warning-border', 'warning', 'loading', 'success']),
|
|
354
378
|
instructionsTextArea: defaultTheme.PropTypes.bool,
|
|
355
379
|
loadingIcon: defaultTheme.PropTypes.element,
|
|
356
|
-
successIcon: defaultTheme.PropTypes.element
|
|
380
|
+
successIcon: defaultTheme.PropTypes.element,
|
|
381
|
+
descriptionToolTip: defaultTheme.PropTypes.string,
|
|
382
|
+
displayDescriptionToolTip: defaultTheme.PropTypes.bool
|
|
357
383
|
} : {};
|
|
358
384
|
|
|
359
385
|
exports.TextArea = TextArea;
|
package/inputs/TextArea/index.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var TextArea = require('../../TextArea-
|
|
3
|
+
var TextArea = require('../../TextArea-4e84d4e7.js');
|
|
4
4
|
require('../../defaultTheme-ea44e34a.js');
|
|
5
5
|
require('styled-components');
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../useMergedRefs-b6d2f8fc.js');
|
|
8
8
|
require('nanoid');
|
|
9
|
+
require('../../Alert-13b75102.js');
|
|
10
|
+
require('lodash');
|
|
11
|
+
require('../../Badge-aec841c8.js');
|
|
12
|
+
require('../../Popover-e4ecb887.js');
|
|
13
|
+
require('polished');
|
|
14
|
+
require('@tippyjs/react');
|
|
15
|
+
require('../../shift-away-subtle-0bed9a3c.js');
|
|
16
|
+
require('popper-max-size-modifier');
|
|
17
|
+
require('../../Tab-f499ecbc.js');
|
|
18
|
+
require('../../Tabs-4d7742bc.js');
|
|
19
|
+
require('../../Tooltip-6b6f0b0a.js');
|
|
20
|
+
require('../../VerificationStatusIcon-b574fd21.js');
|
|
9
21
|
require('../../edit-note-c47d292e.js');
|
|
10
22
|
|
|
11
23
|
|
package/inputs/index.js
CHANGED
|
@@ -7,10 +7,10 @@ var Button = require('../Button-c38d56a0.js');
|
|
|
7
7
|
var Checkbox = require('../Checkbox-68dc38a8.js');
|
|
8
8
|
var CompactAutocompleteSelect = require('../CompactAutocompleteSelect-43e79e21.js');
|
|
9
9
|
var CompactStarRating = require('../CompactStarRating-9c81ca6e.js');
|
|
10
|
-
var CompactTextInput = require('../CompactTextInput-
|
|
10
|
+
var CompactTextInput = require('../CompactTextInput-ed824ca9.js');
|
|
11
11
|
var MultiSelect = require('../MultiSelect-4b8d3d0d.js');
|
|
12
12
|
var Radio = require('../Radio-32d0513a.js');
|
|
13
|
-
var TextArea = require('../TextArea-
|
|
13
|
+
var TextArea = require('../TextArea-4e84d4e7.js');
|
|
14
14
|
var TextInput = require('../TextInput-0d109708.js');
|
|
15
15
|
var Switch = require('../Switch-4a41585f.js');
|
|
16
16
|
var MultiLevelCheckboxSelect = require('../MultiLevelCheckboxSelect-4d9d84cd.js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var AssetGallery = require('../../AssetGallery-
|
|
3
|
+
var AssetGallery = require('../../AssetGallery-80f249a7.js');
|
|
4
4
|
require('../../defaultTheme-ea44e34a.js');
|
|
5
5
|
require('styled-components');
|
|
6
6
|
require('lodash');
|
|
@@ -38,10 +38,10 @@ require('react-select-async-paginate');
|
|
|
38
38
|
require('../../react-select-creatable.esm-2f23d6c6.js');
|
|
39
39
|
require('react-dom');
|
|
40
40
|
require('../../CompactStarRating-9c81ca6e.js');
|
|
41
|
-
require('../../CompactTextInput-
|
|
41
|
+
require('../../CompactTextInput-ed824ca9.js');
|
|
42
42
|
require('../../MultiSelect-4b8d3d0d.js');
|
|
43
43
|
require('../../Radio-32d0513a.js');
|
|
44
|
-
require('../../TextArea-
|
|
44
|
+
require('../../TextArea-4e84d4e7.js');
|
|
45
45
|
require('../../Switch-4a41585f.js');
|
|
46
46
|
require('../../ContextMenuItem-1fe17ed5.js');
|
|
47
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Instructions = require('../../Instructions-
|
|
3
|
+
var Instructions = require('../../Instructions-f848fad0.js');
|
|
4
4
|
require('../../defaultTheme-ea44e34a.js');
|
|
5
5
|
require('styled-components');
|
|
6
6
|
require('lodash');
|
|
@@ -14,8 +14,19 @@ require('../../react-select-creatable.esm-2f23d6c6.js');
|
|
|
14
14
|
require('react-dom');
|
|
15
15
|
require('../../close-ebf2f3cf.js');
|
|
16
16
|
require('../../expand-more-94585605.js');
|
|
17
|
-
require('../../TextArea-
|
|
17
|
+
require('../../TextArea-4e84d4e7.js');
|
|
18
18
|
require('../../useMergedRefs-b6d2f8fc.js');
|
|
19
|
+
require('../../Alert-13b75102.js');
|
|
20
|
+
require('../../Badge-aec841c8.js');
|
|
21
|
+
require('../../Popover-e4ecb887.js');
|
|
22
|
+
require('polished');
|
|
23
|
+
require('@tippyjs/react');
|
|
24
|
+
require('../../shift-away-subtle-0bed9a3c.js');
|
|
25
|
+
require('popper-max-size-modifier');
|
|
26
|
+
require('../../Tab-f499ecbc.js');
|
|
27
|
+
require('../../Tabs-4d7742bc.js');
|
|
28
|
+
require('../../Tooltip-6b6f0b0a.js');
|
|
29
|
+
require('../../VerificationStatusIcon-b574fd21.js');
|
|
19
30
|
require('../../edit-note-c47d292e.js');
|
|
20
31
|
|
|
21
32
|
|
package/widgets/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var AssetGallery = require('../AssetGallery-
|
|
5
|
+
var AssetGallery = require('../AssetGallery-80f249a7.js');
|
|
6
6
|
var ContextMenu = require('../ContextMenu-4ec3d9f3.js');
|
|
7
7
|
var AssetPreviewTopBar = require('../AssetPreviewTopBar-c28715f7.js');
|
|
8
|
-
var Instructions = require('../Instructions-
|
|
8
|
+
var Instructions = require('../Instructions-f848fad0.js');
|
|
9
9
|
require('../defaultTheme-ea44e34a.js');
|
|
10
10
|
require('styled-components');
|
|
11
11
|
require('lodash');
|
|
@@ -42,10 +42,10 @@ require('react-select-async-paginate');
|
|
|
42
42
|
require('../react-select-creatable.esm-2f23d6c6.js');
|
|
43
43
|
require('react-dom');
|
|
44
44
|
require('../CompactStarRating-9c81ca6e.js');
|
|
45
|
-
require('../CompactTextInput-
|
|
45
|
+
require('../CompactTextInput-ed824ca9.js');
|
|
46
46
|
require('../MultiSelect-4b8d3d0d.js');
|
|
47
47
|
require('../Radio-32d0513a.js');
|
|
48
|
-
require('../TextArea-
|
|
48
|
+
require('../TextArea-4e84d4e7.js');
|
|
49
49
|
require('../Switch-4a41585f.js');
|
|
50
50
|
require('../ContextMenuItem-1fe17ed5.js');
|
|
51
51
|
|