@ntbjs/react-components 1.2.0-rc.7 → 1.2.0-rc.71
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/ActionButton-46735b89.js +61 -0
- package/Alert-13b75102.js +117 -0
- package/AssetGallery-12ff227b.js +1923 -0
- package/{AssetPreviewTopBar-d4e976ab.js → AssetPreviewTopBar-c28715f7.js} +15 -15
- package/Badge-aec841c8.js +221 -0
- package/{Button-f1f783e2.js → Button-49f82b31.js} +3 -3
- package/{Checkbox-0cb45351.js → Checkbox-68dc38a8.js} +1 -1
- package/{CompactAutocompleteSelect-ad337fac.js → CompactAutocompleteSelect-5982dcf2.js} +110 -79
- package/{CompactStarRating-147445be.js → CompactStarRating-a754fc6f.js} +77 -44
- package/{CompactTextInput-88e90e94.js → CompactTextInput-baf13d5c.js} +73 -46
- package/{ContextMenu-8c9d90a1.js → ContextMenu-4ec3d9f3.js} +1 -1
- package/ContextMenuItem-ba2b697e.js +110 -0
- package/{InputGroup-53a44ae6.js → InputGroup-49fbc423.js} +1 -1
- package/{Instructions-580e2b8a.js → Instructions-ae40a489.js} +23 -10
- package/{MultiLevelCheckboxSelect-26a0024b.js → MultiLevelCheckboxSelect-24c88aaa.js} +58 -87
- package/{MultiSelect-7e865f37.js → MultiSelect-4b8d3d0d.js} +2 -2
- package/{Popover-209357df.js → Popover-569cd272.js} +33 -7
- package/{Radio-a6ba38ed.js → Radio-32d0513a.js} +1 -1
- package/{SectionSeparator-961ec4de.js → SectionSeparator-259a22ed.js} +1 -1
- package/{Switch-9e68deb2.js → Switch-4a41585f.js} +1 -1
- package/{Tab-3580786b.js → Tab-f499ecbc.js} +1 -1
- package/{Tabs-511523e0.js → Tabs-ea48ce3e.js} +48 -44
- package/TextArea-1c89fe55.js +490 -0
- package/{TextInput-97f7da4d.js → TextInput-0d109708.js} +1 -1
- package/{Tooltip-5ccdfe34.js → Tooltip-66daf6e3.js} +4 -4
- package/VerificationStatusIcon-6fe95a92.js +118 -0
- package/data/Alert/index.js +3 -2
- package/data/Badge/index.js +2 -2
- package/data/Popover/index.js +4 -3
- package/data/Tab/index.js +2 -2
- package/data/Tabs/index.js +3 -3
- package/data/Tooltip/index.js +3 -3
- package/data/index.js +11 -8
- package/{defaultTheme-0dd58df6.js → defaultTheme-ea44e34a.js} +1 -1
- package/icons/add.svg +3 -0
- package/icons/album.svg +3 -0
- package/icons/check-rectangle-filled.svg +3 -0
- package/icons/corporate.svg +3 -0
- package/icons/download.svg +3 -3
- package/icons/index.js +77 -0
- package/icons/layers.svg +3 -0
- package/icons/play.svg +3 -3
- package/icons/shopping_cart_add.svg +3 -0
- package/icons/verification.svg +3 -0
- package/inputs/ActionButton/index.js +3 -2
- package/inputs/Button/index.js +6 -5
- package/inputs/Checkbox/index.js +2 -2
- package/inputs/CompactAutocompleteSelect/index.js +14 -4
- package/inputs/CompactStarRating/index.js +14 -3
- package/inputs/CompactTextInput/index.js +11 -10
- package/inputs/MultiSelect/index.js +3 -3
- package/inputs/Radio/index.js +2 -2
- package/inputs/Switch/index.js +2 -2
- package/inputs/TextArea/index.js +14 -3
- package/inputs/TextInput/index.js +2 -2
- package/inputs/index.js +27 -26
- package/layout/InputGroup/index.js +2 -2
- package/layout/SectionSeparator/index.js +2 -2
- package/layout/index.js +3 -3
- package/package.json +2 -1
- package/{react-select-creatable.esm-4c3da560.js → react-select-creatable.esm-2f23d6c6.js} +3 -3
- package/shift-away-subtle-0bed9a3c.js +9 -0
- package/styles/config.scss +3 -1
- package/widgets/AssetGallery/index.js +32 -30
- package/widgets/AssetPreview/AssetPreviewTopBar/index.js +2 -2
- package/widgets/ContextMenu/ContextMenuItem/index.js +5 -105
- package/widgets/ContextMenu/ContextMenuItemsGroup/index.js +1 -1
- package/widgets/ContextMenu/index.js +2 -2
- package/widgets/Instructions/index.js +16 -6
- package/widgets/index.js +35 -32
- package/ActionButton-f150aedb.js +0 -43
- package/Alert-d7863c58.js +0 -62
- package/AssetGallery-8ad205c8.js +0 -1396
- package/Badge-fa8f327e.js +0 -154
- package/TextArea-4fe22aee.js +0 -348
- package/check-555d831b.js +0 -213
- package/shift-away-subtle-3cede45b.js +0 -9
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defaultTheme = require('./defaultTheme-ea44e34a.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var useMergedRefs = require('./useMergedRefs-b6d2f8fc.js');
|
|
6
|
+
var nanoid = require('nanoid');
|
|
7
|
+
require('./Alert-13b75102.js');
|
|
8
|
+
require('./Badge-aec841c8.js');
|
|
9
|
+
require('./Popover-569cd272.js');
|
|
10
|
+
require('./Tab-f499ecbc.js');
|
|
11
|
+
require('./Tabs-ea48ce3e.js');
|
|
12
|
+
var Tooltip = require('./Tooltip-66daf6e3.js');
|
|
13
|
+
require('./VerificationStatusIcon-6fe95a92.js');
|
|
14
|
+
var editNote = require('./edit-note-c47d292e.js');
|
|
15
|
+
var styled = require('styled-components');
|
|
16
|
+
|
|
17
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
+
|
|
19
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
21
|
+
|
|
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, _templateObject46;
|
|
23
|
+
var fadeInCheck = styled.keyframes(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n"])));
|
|
24
|
+
var fadeOutCheck = styled.keyframes(_templateObject2 || (_templateObject2 = defaultTheme._taggedTemplateLiteral(["\n from {\n opacity: 1\n }\n to {\n opacity: 0\n }\n"])));
|
|
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"])));
|
|
26
|
+
var placeholderBaseStyle = styled.css(_templateObject4 || (_templateObject4 = defaultTheme._taggedTemplateLiteral(["\n ", "\n\n ", "\n"])), function (props) {
|
|
27
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'));
|
|
28
|
+
}, function (props) {
|
|
29
|
+
return props.theme.themeProp('opacity', 0.6, 0.5);
|
|
30
|
+
});
|
|
31
|
+
var InputIconContainer = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject5 || (_templateObject5 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n display: flex;\n align-items: flex-start;\n position: absolute;\n right: 15px;\n top: 10px;\n bottom: 0;\n > .smallPadingIcon {\n padding: 4px;\n width: 15px;\n height: 15px;\n border-radius: 5px;\n opacity: 1;\n margin-top: -5px;\n ", "\n }\n svg {\n width: 15px;\n opacity: 0.7;\n transition: opacity 250ms;\n ", "\n ", "\n }\n"])), function (props) {
|
|
32
|
+
return props.theme.themeProp('background-color', props.theme.getColor('gray-900'), props.theme.getColor('gray-300'), '!important');
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-900'), '!important');
|
|
35
|
+
}, function (props) {
|
|
36
|
+
return props.disabled && styled.css(_templateObject6 || (_templateObject6 = defaultTheme._taggedTemplateLiteral(["\n display: none;\n "])));
|
|
37
|
+
});
|
|
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 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 ", " \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 transition: background 350ms;\n & + ", " {\n opacity: 1;\n ", ";\n transition: opacity 350ms;\n }\n }\n\n &::placeholder {\n ", "\n\n ", "\n }\n\n &&:focus {\n outline: none;\n ", "\n\n ", ";\n\n \n ", " \n \n ", "\n\n }\n\n &&:not(:hover):not(:focus) {\n ", ";\n\n ", ";\n\n ", ";\n }\n"])), function (props) {
|
|
39
|
+
return props.padding === 'small' && styled.css(_templateObject8 || (_templateObject8 = defaultTheme._taggedTemplateLiteral(["\n padding: 5px 10px;\n "])));
|
|
40
|
+
}, function (props) {
|
|
41
|
+
return props.padding === 'medium' && styled.css(_templateObject9 || (_templateObject9 = defaultTheme._taggedTemplateLiteral(["\n padding: 13px 15px;\n "])));
|
|
42
|
+
}, function (props) {
|
|
43
|
+
return props.padding === 'large' && styled.css(_templateObject10 || (_templateObject10 = defaultTheme._taggedTemplateLiteral(["\n padding: 15px 55px;\n "])));
|
|
44
|
+
}, function (props) {
|
|
45
|
+
return props.showMore && !props.expanded && styled.css(_templateObject11 || (_templateObject11 = defaultTheme._taggedTemplateLiteral(["\n -webkit-mask-image: linear-gradient(0deg, transparent 5px, white 45px);\n "])));
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return props.theme.themeProp('color', 'white', 'black');
|
|
48
|
+
}, function (props) {
|
|
49
|
+
return props.readOnly && styled.css(_templateObject12 || (_templateObject12 = defaultTheme._taggedTemplateLiteral(["\n cursor: default;\n border-color: transparent !important;\n "])));
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return props.disabled && styled.css(_templateObject13 || (_templateObject13 = defaultTheme._taggedTemplateLiteral(["\n cursor: not-allowed;\n "])));
|
|
52
|
+
}, function (props) {
|
|
53
|
+
return props.readOnly && styled.css(_templateObject14 || (_templateObject14 = defaultTheme._taggedTemplateLiteral(["\n padding: 12px 10px; ;\n "])));
|
|
54
|
+
}, function (props) {
|
|
55
|
+
return props.showMore && styled.css(_templateObject15 || (_templateObject15 = defaultTheme._taggedTemplateLiteral(["\n overflow: hidden;\n "])));
|
|
56
|
+
}, function (props) {
|
|
57
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'));
|
|
58
|
+
}, function (props) {
|
|
59
|
+
return (props.state === 'warning' || props.state === 'error') && props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900'));
|
|
60
|
+
}, function (props) {
|
|
61
|
+
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
62
|
+
}, function (props) {
|
|
63
|
+
return props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'));
|
|
64
|
+
}, function (props) {
|
|
65
|
+
return props.noBorder && styled.css(_templateObject16 || (_templateObject16 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
66
|
+
return props.theme.themeProp('border-color', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
67
|
+
});
|
|
68
|
+
}, function (props) {
|
|
69
|
+
return props.type === 'warning' && styled.css(_templateObject17 || (_templateObject17 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), props.theme.themeProp('color', 'white', 'black'), props.theme.themeProp('background', '#634E01', '#FFFDE8'), props.theme.themeProp('border-color', '#634E01 ', '#FFFDE8'));
|
|
70
|
+
}, function (props) {
|
|
71
|
+
return props.type === 'instructions-warning' && styled.css(_templateObject18 || (_templateObject18 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), props.theme.themeProp('color', 'white', 'black'), props.theme.themeProp('background', '#634E01', '#FFF36C'), props.theme.themeProp('border-color', '#634E01 ', '#FFF36C'));
|
|
72
|
+
}, function (props) {
|
|
73
|
+
return props.type === 'error' && styled.css(_templateObject19 || (_templateObject19 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), props.theme.themeProp('color', 'white', 'black'), props.theme.themeProp('background', '#7f1b1b', '#FBEAE6'), props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6'));
|
|
74
|
+
}, function (props) {
|
|
75
|
+
return props.noBorder && props.type === 'instructions-warning' && styled.css(_templateObject20 || (_templateObject20 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
76
|
+
return props.theme.themeProp('border-color', '#634E01', '#FFF36C');
|
|
77
|
+
});
|
|
78
|
+
}, function (props) {
|
|
79
|
+
return props.noBorder && props.type === 'warning' && styled.css(_templateObject21 || (_templateObject21 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
80
|
+
return props.theme.themeProp('border-color', '#634E01', '#FFFDE8');
|
|
81
|
+
});
|
|
82
|
+
}, function (props) {
|
|
83
|
+
return props.noBorder && props.type === 'error' && styled.css(_templateObject22 || (_templateObject22 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
84
|
+
return props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6');
|
|
85
|
+
});
|
|
86
|
+
}, function (props) {
|
|
87
|
+
return props.type === 'warning-border' && styled.css(_templateObject23 || (_templateObject23 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('border-color', props.theme.getColor('red-200'), props.theme.getColor('orange-500')));
|
|
88
|
+
}, function (props) {
|
|
89
|
+
return props.type === 'error-border' && styled.css(_templateObject24 || (_templateObject24 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('border-color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
90
|
+
}, function (props) {
|
|
91
|
+
return props.lightBackground && styled.css(_templateObject25 || (_templateObject25 = 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'));
|
|
92
|
+
}, function (props) {
|
|
93
|
+
return props.edit && props.theme.themeProp('background', '#505050', '#eff1f4');
|
|
94
|
+
}, function (props) {
|
|
95
|
+
return props.edit && !props.type === 'warning' && props.theme.themeProp('background', '#505050', '#eff1f4');
|
|
96
|
+
}, function (props) {
|
|
97
|
+
return props.edit && props.type === 'warning' && props.theme.themeProp('background', '#AD8800', '#FFF3A7');
|
|
98
|
+
}, function (props) {
|
|
99
|
+
return props.edit && props.type === 'instructions-warning' && props.theme.themeProp('background', '#AD8800 ', '#FFF3A7');
|
|
100
|
+
}, function (props) {
|
|
101
|
+
return props.hasIcon && styled.css(_templateObject26 || (_templateObject26 = defaultTheme._taggedTemplateLiteral(["\n padding-left: 55px;\n padding-right: 25px;\n "])));
|
|
102
|
+
}, function (props) {
|
|
103
|
+
return !props.readOnly && !props.disabled && props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
104
|
+
}, function (props) {
|
|
105
|
+
return props.type === 'instructions-warning' && props.theme.themeProp('background', '#806403', '#F4E21E');
|
|
106
|
+
}, function (props) {
|
|
107
|
+
return props.noBorder && props.type === 'instructions-warning' && styled.css(_templateObject27 || (_templateObject27 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
108
|
+
return props.theme.themeProp('border-color', '#806403', '#F4E21E');
|
|
109
|
+
});
|
|
110
|
+
}, function (props) {
|
|
111
|
+
return props.type === 'warning' && props.theme.themeProp('background', '#806403', '#FFFEBF');
|
|
112
|
+
}, function (props) {
|
|
113
|
+
return props.type === 'error' && props.theme.themeProp('background', '#F7D5D0', '#F7D5D0');
|
|
114
|
+
}, function (props) {
|
|
115
|
+
return props.noBorder && !props.readOnly && props.type != 'warning' && props.type != 'error' && props.type != 'instructions-warning' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')) : 'background: transparent';
|
|
116
|
+
}, InputIconContainer, function (props) {
|
|
117
|
+
return props.type === 'success' && styled.css(_templateObject28 || (_templateObject28 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0;\n "])));
|
|
118
|
+
}, function (props) {
|
|
119
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'), 1);
|
|
120
|
+
}, function (props) {
|
|
121
|
+
return props.theme.themeProp('opacity', 0.6, 0.5, 1);
|
|
122
|
+
}, function (props) {
|
|
123
|
+
return props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-600'));
|
|
124
|
+
}, function (props) {
|
|
125
|
+
return props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('white'));
|
|
126
|
+
}, function (props) {
|
|
127
|
+
return props.type === 'warning' && styled.css(_templateObject29 || (_templateObject29 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
128
|
+
return props.theme.themeProp('border-color', '#F4E21E', '#F4E21E');
|
|
129
|
+
}, props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black'));
|
|
130
|
+
}, function (props) {
|
|
131
|
+
return props.type === 'error' && styled.css(_templateObject30 || (_templateObject30 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
132
|
+
return props.theme.themeProp('border-color', '#D83018', '#D83018');
|
|
133
|
+
}, props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black'));
|
|
134
|
+
}, function (props) {
|
|
135
|
+
return props.edit && props.theme.themeProp('background', '#505050', '#eff1f4');
|
|
136
|
+
}, function (props) {
|
|
137
|
+
return props.edit && props.type === 'warning' && props.theme.themeProp('background', '#AD8800', '#FFF3A7');
|
|
138
|
+
}, function (props) {
|
|
139
|
+
return props.edit && props.type === 'instructions-warning' && props.theme.themeProp('background', '#AD8800 ', '#FFF3A7');
|
|
140
|
+
});
|
|
141
|
+
var TextInputLabel = styled__default['default'].label.attrs(defaultTheme.applyDefaultTheme)(_templateObject31 || (_templateObject31 = 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) {
|
|
142
|
+
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%)"));
|
|
143
|
+
}, function (props) {
|
|
144
|
+
return !props.inputIsEmpty && styled.css(_templateObject32 || (_templateObject32 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), activeLabel);
|
|
145
|
+
}, function (props) {
|
|
146
|
+
return props.hasPlaceholder && styled.css(_templateObject33 || (_templateObject33 = defaultTheme._taggedTemplateLiteral(["\n ", ";\n "])), activeLabel);
|
|
147
|
+
}, function (props) {
|
|
148
|
+
return props.hasIcon && styled.css(_templateObject34 || (_templateObject34 = defaultTheme._taggedTemplateLiteral(["\n left: 55px;\n "])));
|
|
149
|
+
});
|
|
150
|
+
var TextInputFieldIcon = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject35 || (_templateObject35 = 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"])));
|
|
151
|
+
var TextInputFieldIconAlert = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject36 || (_templateObject36 = 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) {
|
|
152
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-600'));
|
|
153
|
+
});
|
|
154
|
+
var TextInput = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject37 || (_templateObject37 = 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) {
|
|
155
|
+
return props.readOnly && styled.css(_templateObject38 || (_templateObject38 = defaultTheme._taggedTemplateLiteral(["\n pointer-events: none;\n "])));
|
|
156
|
+
}, function (props) {
|
|
157
|
+
return props.disabled && styled.css(_templateObject39 || (_templateObject39 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n "])));
|
|
158
|
+
}, TextInputLabel, activeLabel, TextInputFieldIcon, TextInputField, TextInputLabel, activeLabel, function (props) {
|
|
159
|
+
return props.type === 'error' && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'));
|
|
160
|
+
});
|
|
161
|
+
var Description = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject40 || (_templateObject40 = 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) {
|
|
162
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'));
|
|
163
|
+
}, function (props) {
|
|
164
|
+
return (props.type === 'warning-border' || props.type === 'warning') && styled.css(_templateObject41 || (_templateObject41 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500')));
|
|
165
|
+
}, function (props) {
|
|
166
|
+
return (props.type === 'error-border' || props.type === 'error') && styled.css(_templateObject42 || (_templateObject42 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
167
|
+
});
|
|
168
|
+
var SuccessContainer = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject43 || (_templateObject43 = 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) {
|
|
169
|
+
return props.fadeIn ? 0 : 1;
|
|
170
|
+
}, function (props) {
|
|
171
|
+
return props.fadeIn ? fadeOutCheck : fadeInCheck;
|
|
172
|
+
}, function (props) {
|
|
173
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500'));
|
|
174
|
+
});
|
|
175
|
+
var ShowMoreText = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject44 || (_templateObject44 = 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) {
|
|
176
|
+
return props.expanded && styled.css(_templateObject45 || (_templateObject45 = defaultTheme._taggedTemplateLiteral(["\n margin-top: 0px;\n "])));
|
|
177
|
+
}, function (props) {
|
|
178
|
+
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
179
|
+
}, function (props) {
|
|
180
|
+
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('emerald-500'));
|
|
181
|
+
}, function (props) {
|
|
182
|
+
return props.type === 'error' && styled.css(_templateObject46 || (_templateObject46 = defaultTheme._taggedTemplateLiteral(["\n content: 'error';\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
var TextArea = React__default['default'].forwardRef(function TextArea(_ref, forwardedRef) {
|
|
186
|
+
var value = _ref.value,
|
|
187
|
+
defaultValue = _ref.defaultValue,
|
|
188
|
+
name = _ref.name,
|
|
189
|
+
label = _ref.label,
|
|
190
|
+
placeholder = _ref.placeholder,
|
|
191
|
+
required = _ref.required,
|
|
192
|
+
disabled = _ref.disabled,
|
|
193
|
+
hidden = _ref.hidden,
|
|
194
|
+
readOnly = _ref.readOnly,
|
|
195
|
+
edit = _ref.edit,
|
|
196
|
+
showMore = _ref.showMore,
|
|
197
|
+
showMoreText = _ref.showMoreText,
|
|
198
|
+
showLessText = _ref.showLessText,
|
|
199
|
+
autoComplete = _ref.autoComplete,
|
|
200
|
+
description = _ref.description,
|
|
201
|
+
type = _ref.type,
|
|
202
|
+
icon = _ref.icon,
|
|
203
|
+
rows = _ref.rows,
|
|
204
|
+
className = _ref.className,
|
|
205
|
+
style = _ref.style,
|
|
206
|
+
_onChange = _ref.onChange,
|
|
207
|
+
onBlur = _ref.onBlur,
|
|
208
|
+
lightBackground = _ref.lightBackground,
|
|
209
|
+
noBorder = _ref.noBorder,
|
|
210
|
+
instructionsTextArea = _ref.instructionsTextArea,
|
|
211
|
+
isExpanded = _ref.isExpanded,
|
|
212
|
+
loadingIcon = _ref.loadingIcon,
|
|
213
|
+
successIcon = _ref.successIcon,
|
|
214
|
+
padding = _ref.padding,
|
|
215
|
+
descriptionToolTip = _ref.descriptionToolTip,
|
|
216
|
+
resetExpansion = _ref.resetExpansion,
|
|
217
|
+
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", "resetExpansion"]);
|
|
218
|
+
|
|
219
|
+
var textInputDomNode = React.useRef(null);
|
|
220
|
+
var textInputRef = useMergedRefs.useMergedRefs(forwardedRef, textInputDomNode);
|
|
221
|
+
|
|
222
|
+
var _useState = React.useState(!(value || defaultValue)),
|
|
223
|
+
_useState2 = defaultTheme._slicedToArray(_useState, 2),
|
|
224
|
+
inputIsEmpty = _useState2[0],
|
|
225
|
+
setInputIsEmpty = _useState2[1];
|
|
226
|
+
|
|
227
|
+
var _useState3 = React.useState(value || defaultValue),
|
|
228
|
+
_useState4 = defaultTheme._slicedToArray(_useState3, 2),
|
|
229
|
+
defaultInput = _useState4[0],
|
|
230
|
+
setDefaultInput = _useState4[1];
|
|
231
|
+
|
|
232
|
+
var _useState5 = React.useState(''),
|
|
233
|
+
_useState6 = defaultTheme._slicedToArray(_useState5, 2),
|
|
234
|
+
maxContentRows = _useState6[0],
|
|
235
|
+
setMaxContentRows = _useState6[1];
|
|
236
|
+
|
|
237
|
+
var _useState7 = React.useState(false),
|
|
238
|
+
_useState8 = defaultTheme._slicedToArray(_useState7, 2),
|
|
239
|
+
expanded = _useState8[0],
|
|
240
|
+
setExpanded = _useState8[1];
|
|
241
|
+
|
|
242
|
+
var _useState9 = React.useState(''),
|
|
243
|
+
_useState10 = defaultTheme._slicedToArray(_useState9, 2),
|
|
244
|
+
maxHeight = _useState10[0],
|
|
245
|
+
setMaxHeight = _useState10[1];
|
|
246
|
+
|
|
247
|
+
var _useState11 = React.useState(''),
|
|
248
|
+
_useState12 = defaultTheme._slicedToArray(_useState11, 2),
|
|
249
|
+
defaultHeight = _useState12[0],
|
|
250
|
+
setDefaultHeight = _useState12[1];
|
|
251
|
+
|
|
252
|
+
var _useState13 = React.useState(false),
|
|
253
|
+
_useState14 = defaultTheme._slicedToArray(_useState13, 2),
|
|
254
|
+
autoFocus = _useState14[0],
|
|
255
|
+
setAutoFocus = _useState14[1];
|
|
256
|
+
|
|
257
|
+
var _useState15 = React.useState(false),
|
|
258
|
+
_useState16 = defaultTheme._slicedToArray(_useState15, 2),
|
|
259
|
+
scrollHeightExceedsRows = _useState16[0],
|
|
260
|
+
setScrollHeightExceedsRows = _useState16[1];
|
|
261
|
+
|
|
262
|
+
var initialHeightRef = React.useRef(null);
|
|
263
|
+
|
|
264
|
+
var _useState17 = React.useState(nanoid.nanoid()),
|
|
265
|
+
_useState18 = defaultTheme._slicedToArray(_useState17, 1),
|
|
266
|
+
uniqueId = _useState18[0];
|
|
267
|
+
|
|
268
|
+
var memoizedDescriptionToolTip = React.useMemo(function () {
|
|
269
|
+
return descriptionToolTip;
|
|
270
|
+
}, [descriptionToolTip]);
|
|
271
|
+
React.useEffect(function () {
|
|
272
|
+
setExpanded(false);
|
|
273
|
+
setDefaultInput(value || defaultValue);
|
|
274
|
+
}, [resetExpansion]);
|
|
275
|
+
React.useEffect(function () {
|
|
276
|
+
isExpanded(expanded);
|
|
277
|
+
}, [expanded]);
|
|
278
|
+
React.useLayoutEffect(function () {
|
|
279
|
+
calculateRows();
|
|
280
|
+
setAutoFocus(false);
|
|
281
|
+
|
|
282
|
+
if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length || (value === null || value === void 0 ? void 0 : value.length) != (defaultInput === null || defaultInput === void 0 ? void 0 : defaultInput.length)) {
|
|
283
|
+
calculateHeight();
|
|
284
|
+
setExpanded(true);
|
|
285
|
+
}
|
|
286
|
+
}, [value, defaultValue, rows]);
|
|
287
|
+
React.useEffect(function () {
|
|
288
|
+
setAutoFocus(false);
|
|
289
|
+
initialHeightRef.current = null;
|
|
290
|
+
}, [rows]);
|
|
291
|
+
|
|
292
|
+
var handleTextAreaClick = function handleTextAreaClick() {
|
|
293
|
+
var textareaRefCurrent = textInputDomNode.current;
|
|
294
|
+
|
|
295
|
+
if (textareaRefCurrent !== null) {
|
|
296
|
+
textareaRefCurrent.style.height = "".concat(textareaRefCurrent.scrollHeight, "px");
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (!expanded) {
|
|
300
|
+
setExpanded(true);
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
var handleTextAreaShowLess = function handleTextAreaShowLess() {
|
|
305
|
+
var textareaRefCurrent = textInputDomNode.current;
|
|
306
|
+
|
|
307
|
+
if (textareaRefCurrent !== null) {
|
|
308
|
+
textareaRefCurrent.style.height = expanded ? "".concat(rows * 16, "px") : "".concat(textareaRefCurrent.scrollHeight, "px");
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
setExpanded(!expanded);
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
var calculateRows = function calculateRows() {
|
|
315
|
+
var textareaRefCurrent = textInputDomNode.current;
|
|
316
|
+
|
|
317
|
+
if (textareaRefCurrent !== null) {
|
|
318
|
+
var textAreaHeight = textareaRefCurrent.scrollHeight;
|
|
319
|
+
var lineHeight = 16;
|
|
320
|
+
var calculatedRows = Math.floor(textAreaHeight / lineHeight);
|
|
321
|
+
var defaultRowsHeight = rows * lineHeight;
|
|
322
|
+
setMaxContentRows(calculatedRows);
|
|
323
|
+
|
|
324
|
+
if (calculatedRows > rows) {
|
|
325
|
+
setDefaultHeight(defaultRowsHeight);
|
|
326
|
+
setMaxHeight(textAreaHeight);
|
|
327
|
+
} else {
|
|
328
|
+
setMaxHeight('');
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
var calculateHeight = function calculateHeight() {
|
|
334
|
+
var textareaRefCurrent = textInputDomNode === null || textInputDomNode === void 0 ? void 0 : textInputDomNode.current;
|
|
335
|
+
|
|
336
|
+
if (textareaRefCurrent !== null) {
|
|
337
|
+
textareaRefCurrent.style.height = 'auto';
|
|
338
|
+
var newHeight = textareaRefCurrent.scrollHeight;
|
|
339
|
+
textareaRefCurrent.style.height = "".concat(newHeight, "px");
|
|
340
|
+
|
|
341
|
+
if (initialHeightRef.current === null) {
|
|
342
|
+
initialHeightRef.current = newHeight;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
setScrollHeightExceedsRows(newHeight > (initialHeightRef.current || 0));
|
|
346
|
+
setExpanded(newHeight > (initialHeightRef.current || 0));
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
var onKeyDown = React.useCallback(function (event) {
|
|
351
|
+
if (event.key === 'Enter') {
|
|
352
|
+
event.stopPropagation();
|
|
353
|
+
}
|
|
354
|
+
}, []);
|
|
355
|
+
|
|
356
|
+
var input = function input() {
|
|
357
|
+
return React__default['default'].createElement(TextInput, {
|
|
358
|
+
disabled: disabled,
|
|
359
|
+
readOnly: readOnly,
|
|
360
|
+
type: type,
|
|
361
|
+
className: className,
|
|
362
|
+
style: style
|
|
363
|
+
}, React__default['default'].createElement(TextInputFieldIconAlert, null, icon), React__default['default'].createElement(TextInputField, defaultTheme._extends({
|
|
364
|
+
autoFocus: autoFocus,
|
|
365
|
+
ref: textInputRef,
|
|
366
|
+
rows: rows,
|
|
367
|
+
expanded: expanded,
|
|
368
|
+
defaultHeight: defaultHeight,
|
|
369
|
+
maxHeight: maxHeight,
|
|
370
|
+
value: value,
|
|
371
|
+
defaultValue: defaultValue,
|
|
372
|
+
name: name,
|
|
373
|
+
placeholder: placeholder || ' ',
|
|
374
|
+
required: required,
|
|
375
|
+
readOnly: readOnly,
|
|
376
|
+
disabled: disabled,
|
|
377
|
+
edit: edit,
|
|
378
|
+
instructionsTextArea: instructionsTextArea,
|
|
379
|
+
showMore: showMore,
|
|
380
|
+
scrollHeightExceedsRows: scrollHeightExceedsRows,
|
|
381
|
+
type: type,
|
|
382
|
+
autoComplete: autoComplete,
|
|
383
|
+
hasIcon: Boolean(icon),
|
|
384
|
+
icon: icon,
|
|
385
|
+
id: "text-input-".concat(uniqueId),
|
|
386
|
+
key: uniqueId,
|
|
387
|
+
lightBackground: lightBackground,
|
|
388
|
+
padding: padding,
|
|
389
|
+
onChange: function onChange(e) {
|
|
390
|
+
if (e.target.value) {
|
|
391
|
+
setInputIsEmpty(false);
|
|
392
|
+
|
|
393
|
+
if (!autoFocus) {
|
|
394
|
+
setAutoFocus(true);
|
|
395
|
+
}
|
|
396
|
+
} else {
|
|
397
|
+
setInputIsEmpty(true);
|
|
398
|
+
|
|
399
|
+
if (!autoFocus) {
|
|
400
|
+
setAutoFocus(true);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
_onChange(e);
|
|
405
|
+
},
|
|
406
|
+
onKeyDown: onKeyDown,
|
|
407
|
+
onBlur: onBlur,
|
|
408
|
+
noBorder: noBorder
|
|
409
|
+
}, rest, {
|
|
410
|
+
onClick: handleTextAreaClick
|
|
411
|
+
})), (type === 'loading' || type === 'success') && React__default['default'].createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default['default'].createElement(InputIconContainer, {
|
|
412
|
+
disabled: disabled
|
|
413
|
+
}, React__default['default'].createElement(editNote.SvgEditNote, {
|
|
414
|
+
className: padding === 'small' ? 'smallPadingIcon' : undefined
|
|
415
|
+
})), label && React__default['default'].createElement(TextInputLabel, {
|
|
416
|
+
htmlFor: "text-input-".concat(uniqueId),
|
|
417
|
+
hasPlaceholder: Boolean(placeholder),
|
|
418
|
+
hasIcon: Boolean(icon),
|
|
419
|
+
inputIsEmpty: inputIsEmpty
|
|
420
|
+
}, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default['default'].createElement(Description, {
|
|
421
|
+
type: type
|
|
422
|
+
}, description), maxContentRows > rows && showMore && React__default['default'].createElement(ShowMoreText, {
|
|
423
|
+
onClick: showMore ? handleTextAreaShowLess : undefined,
|
|
424
|
+
expanded: expanded
|
|
425
|
+
}, !expanded ? showMoreText : expanded ? showLessText : null));
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
if (hidden) return null;
|
|
429
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null, !memoizedDescriptionToolTip && input(), memoizedDescriptionToolTip && React__default['default'].createElement("div", null, React__default['default'].createElement(Tooltip.Tooltip, {
|
|
430
|
+
content: memoizedDescriptionToolTip,
|
|
431
|
+
key: "tooltipTextArea1",
|
|
432
|
+
placement: "bottom-end",
|
|
433
|
+
trigger: 'mouseenter',
|
|
434
|
+
zIndex: 999999
|
|
435
|
+
}, input())));
|
|
436
|
+
});
|
|
437
|
+
TextArea.defaultProps = {
|
|
438
|
+
rows: 4,
|
|
439
|
+
noBorder: false,
|
|
440
|
+
readOnly: false,
|
|
441
|
+
edit: false,
|
|
442
|
+
hidden: false,
|
|
443
|
+
showMore: false,
|
|
444
|
+
showMoreText: '',
|
|
445
|
+
showLessText: '',
|
|
446
|
+
type: '',
|
|
447
|
+
padding: 'medium',
|
|
448
|
+
instructionsTextArea: false,
|
|
449
|
+
descriptionToolTip: '',
|
|
450
|
+
isExpanded: function isExpanded() {},
|
|
451
|
+
onChange: function onChange() {},
|
|
452
|
+
resetExpansion: ''
|
|
453
|
+
};
|
|
454
|
+
TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
455
|
+
value: defaultTheme.PropTypes.string,
|
|
456
|
+
defaultValue: defaultTheme.PropTypes.string,
|
|
457
|
+
name: defaultTheme.PropTypes.string,
|
|
458
|
+
label: defaultTheme.PropTypes.string,
|
|
459
|
+
placeholder: defaultTheme.PropTypes.string,
|
|
460
|
+
required: defaultTheme.PropTypes.bool,
|
|
461
|
+
disabled: defaultTheme.PropTypes.bool,
|
|
462
|
+
hidden: defaultTheme.PropTypes.bool,
|
|
463
|
+
readOnly: defaultTheme.PropTypes.bool,
|
|
464
|
+
showMore: defaultTheme.PropTypes.bool,
|
|
465
|
+
showMoreText: defaultTheme.PropTypes.string,
|
|
466
|
+
showLessText: defaultTheme.PropTypes.string,
|
|
467
|
+
edit: defaultTheme.PropTypes.bool,
|
|
468
|
+
autoComplete: defaultTheme.PropTypes.string,
|
|
469
|
+
description: defaultTheme.PropTypes.string,
|
|
470
|
+
error: defaultTheme.PropTypes.oneOfType([defaultTheme.PropTypes.bool, defaultTheme.PropTypes.string]),
|
|
471
|
+
warning: defaultTheme.PropTypes.oneOfType([defaultTheme.PropTypes.bool, defaultTheme.PropTypes.string]),
|
|
472
|
+
icon: defaultTheme.PropTypes.element,
|
|
473
|
+
rows: defaultTheme.PropTypes.oneOfType([defaultTheme.PropTypes.number, defaultTheme.PropTypes.string]),
|
|
474
|
+
className: defaultTheme.PropTypes.string,
|
|
475
|
+
style: defaultTheme.PropTypes.object,
|
|
476
|
+
padding: defaultTheme.PropTypes.oneOf(['', 'small', 'medium', 'large']),
|
|
477
|
+
lightBackground: defaultTheme.PropTypes.bool,
|
|
478
|
+
onChange: defaultTheme.PropTypes.func,
|
|
479
|
+
onBlur: defaultTheme.PropTypes.func,
|
|
480
|
+
noBorder: defaultTheme.PropTypes.bool,
|
|
481
|
+
isExpanded: defaultTheme.PropTypes.func,
|
|
482
|
+
type: defaultTheme.PropTypes.oneOf(['', 'error', 'error-border', 'warning-border', 'warning', 'instructions-warning', 'loading', 'success']),
|
|
483
|
+
instructionsTextArea: defaultTheme.PropTypes.bool,
|
|
484
|
+
loadingIcon: defaultTheme.PropTypes.element,
|
|
485
|
+
successIcon: defaultTheme.PropTypes.element,
|
|
486
|
+
descriptionToolTip: defaultTheme.PropTypes.string,
|
|
487
|
+
resetExpansion: defaultTheme.PropTypes.string
|
|
488
|
+
} : {};
|
|
489
|
+
|
|
490
|
+
exports.TextArea = TextArea;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var defaultTheme = require('./defaultTheme-
|
|
3
|
+
var defaultTheme = require('./defaultTheme-ea44e34a.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
var TippyTooltip = require('@tippyjs/react');
|
|
7
|
-
require('./shift-away-subtle-
|
|
7
|
+
require('./shift-away-subtle-0bed9a3c.js');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
@@ -31,7 +31,7 @@ var Tooltip = React__default['default'].forwardRef(function Tooltip(_ref, ref) {
|
|
|
31
31
|
children = _ref.children,
|
|
32
32
|
props = defaultTheme._objectWithoutProperties(_ref, ["content", "interactive", "placement", "duration", "trigger", "visible", "children"]);
|
|
33
33
|
|
|
34
|
-
return React__default['default'].createElement(Tooltip$1, defaultTheme._extends({
|
|
34
|
+
return React__default['default'].createElement("div", null, React__default['default'].createElement(Tooltip$1, defaultTheme._extends({
|
|
35
35
|
ref: ref,
|
|
36
36
|
content: content,
|
|
37
37
|
interactive: interactive,
|
|
@@ -40,7 +40,7 @@ var Tooltip = React__default['default'].forwardRef(function Tooltip(_ref, ref) {
|
|
|
40
40
|
trigger: trigger,
|
|
41
41
|
visible: visible,
|
|
42
42
|
animation: 'shift-away-subtle'
|
|
43
|
-
}, props), children);
|
|
43
|
+
}, props), children));
|
|
44
44
|
});
|
|
45
45
|
Tooltip.defaultProps = {
|
|
46
46
|
content: 'Tooltip',
|