@ntbjs/react-components 1.1.13 → 1.1.15
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/.eslintrc +7 -8
- package/{ActionButton-46735b89.js → ActionButton-b2345555.js} +19 -16
- package/{Alert-13b75102.js → Alert-d69a3f95.js} +20 -24
- package/{AssetGallery-f62e16b2.js → AssetAction-2e2d496e.js} +585 -650
- package/AssetPreviewTopBar-b1fe3188.js +104 -0
- package/{Badge-757b0a39.js → Badge-e984e6f5.js} +28 -49
- package/{Button-49f82b31.js → Button-39607724.js} +53 -65
- package/{Checkbox-68dc38a8.js → Checkbox-ad9c9e54.js} +30 -35
- package/{CompactAutocompleteSelect-96137f48.js → CompactAutocompleteSelect-7d05d707.js} +82 -114
- package/{CompactStarRating-15c1b812.js → CompactStarRating-d4cfae17.js} +71 -87
- package/{CompactTextInput-a43aea28.js → CompactTextInput-f89988be.js} +95 -105
- package/{ContextMenu-4ec3d9f3.js → ContextMenu-4eb8fdc5.js} +6 -6
- package/{ContextMenuItem-ba2b697e.js → ContextMenuItem-c536b460.js} +22 -26
- package/{InputGroup-49fbc423.js → InputGroup-a89a0ea3.js} +6 -6
- package/{Instructions-9a0fd247.js → Instructions-c8502398.js} +97 -81
- package/{MultiLevelCheckboxSelect-e6e5cb90.js → MultiLevelCheckboxSelect-6be69491.js} +102 -164
- package/{MultiSelect-efd60232.js → MultiSelect-81e7016c.js} +71 -101
- package/{Popover-569cd272.js → Popover-c5e425a7.js} +19 -21
- package/{Radio-32d0513a.js → Radio-55db4781.js} +21 -22
- package/{SectionSeparator-259a22ed.js → SectionSeparator-af8dc1ce.js} +6 -6
- package/{Switch-4a41585f.js → Switch-04ecd8d0.js} +25 -27
- package/{Tab-f499ecbc.js → Tab-e43241f0.js} +7 -7
- package/{Tabs-116aa951.js → Tabs-cfc08c6b.js} +21 -33
- package/{TextArea-a869b1a9.js → TextArea-6e15b44f.js} +110 -135
- package/{TextInput-0d109708.js → TextInput-9a995449.js} +41 -48
- package/{Tooltip-66daf6e3.js → Tooltip-a68a7e49.js} +13 -13
- package/{VerificationStatusIcon-d5bfb67a.js → VerificationStatusIcon-7b0e23fe.js} +20 -30
- package/{close-ebf2f3cf.js → close-1751121a.js} +8 -12
- package/data/Alert/index.js +2 -2
- package/data/Badge/index.js +2 -2
- package/data/Popover/index.js +3 -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 +9 -9
- package/{defaultTheme-ea44e34a.js → defaultTheme-cd01e6c2.js} +212 -260
- package/edit-note-cefe2215.js +37 -0
- package/{expand-more-94585605.js → expand-more-d74e2bd2.js} +8 -12
- package/inputs/ActionButton/index.js +2 -2
- package/inputs/Button/index.js +6 -6
- package/inputs/Checkbox/index.js +2 -2
- package/inputs/CompactAutocompleteSelect/index.js +13 -13
- package/inputs/CompactStarRating/index.js +10 -10
- package/inputs/CompactTextInput/index.js +11 -11
- package/inputs/MultiSelect/index.js +4 -4
- package/inputs/Radio/index.js +2 -2
- package/inputs/Switch/index.js +2 -2
- package/inputs/TextArea/index.js +11 -11
- package/inputs/TextInput/index.js +3 -3
- package/inputs/index.js +28 -28
- 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-2f23d6c6.js → react-select-creatable.esm-9745dc34.js} +1502 -1281
- package/{shift-away-subtle-0bed9a3c.js → shift-away-subtle-631cd794.js} +1 -1
- package/ssr/index.js +1 -3
- package/widgets/AssetGallery/index.js +34 -32
- package/widgets/AssetPreview/AssetPreviewTopBar/index.js +3 -3
- package/widgets/ContextMenu/ContextMenuItem/index.js +2 -2
- package/widgets/ContextMenu/ContextMenuItemsGroup/index.js +6 -6
- package/widgets/ContextMenu/index.js +2 -2
- package/widgets/Instructions/index.js +16 -17
- package/widgets/index.js +37 -35
- package/AssetPreviewTopBar-912c3469.js +0 -99
- package/edit-note-c47d292e.js +0 -41
- package/warning-circle-24522402.js +0 -41
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var defaultTheme = require('./defaultTheme-
|
|
3
|
+
var defaultTheme = require('./defaultTheme-cd01e6c2.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var lodash = require('lodash');
|
|
6
6
|
var useMergedRefs = require('./useMergedRefs-b6d2f8fc.js');
|
|
7
7
|
var nanoid = require('nanoid');
|
|
8
|
-
require('./Alert-
|
|
9
|
-
require('./Badge-
|
|
10
|
-
require('./Popover-
|
|
11
|
-
require('./Tab-
|
|
12
|
-
require('./Tabs-
|
|
13
|
-
var Tooltip = require('./Tooltip-
|
|
14
|
-
require('./VerificationStatusIcon-
|
|
15
|
-
var editNote = require('./edit-note-
|
|
8
|
+
require('./Alert-d69a3f95.js');
|
|
9
|
+
require('./Badge-e984e6f5.js');
|
|
10
|
+
require('./Popover-c5e425a7.js');
|
|
11
|
+
require('./Tab-e43241f0.js');
|
|
12
|
+
require('./Tabs-cfc08c6b.js');
|
|
13
|
+
var Tooltip = require('./Tooltip-a68a7e49.js');
|
|
14
|
+
require('./VerificationStatusIcon-7b0e23fe.js');
|
|
15
|
+
var editNote = require('./edit-note-cefe2215.js');
|
|
16
16
|
var styled = require('styled-components');
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -20,7 +20,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
21
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
22
22
|
|
|
23
|
-
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 _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;
|
|
24
24
|
var fadeInCheck = styled.keyframes(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n"])));
|
|
25
25
|
var fadeOutCheck = styled.keyframes(_templateObject2 || (_templateObject2 = defaultTheme._taggedTemplateLiteral(["\n from {\n opacity: 1\n }\n to {\n opacity: 0\n }\n"])));
|
|
26
26
|
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"])));
|
|
@@ -29,95 +29,93 @@ var placeholderBaseStyle = styled.css(_templateObject4 || (_templateObject4 = de
|
|
|
29
29
|
}, function (props) {
|
|
30
30
|
return props.theme.themeProp('opacity', 0.6, 0.5);
|
|
31
31
|
});
|
|
32
|
-
var
|
|
33
|
-
|
|
32
|
+
var warningPlaceholder = styled.css(_templateObject5 || (_templateObject5 = defaultTheme._taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
33
|
+
return props.type === 'warning' && props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700'), 1);
|
|
34
|
+
});
|
|
35
|
+
var errorPlaceholder = styled.css(_templateObject6 || (_templateObject6 = defaultTheme._taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
36
|
+
return props.type === 'error' && props.theme.themeProp('color', props.theme.getColor('gray-200'), props.theme.getColor('gray-700'), 1);
|
|
37
|
+
});
|
|
38
|
+
var warningPlaceholderHover = styled.css(_templateObject7 || (_templateObject7 = defaultTheme._taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
39
|
+
return props.type === 'warning' && props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900'), 1);
|
|
40
|
+
});
|
|
41
|
+
var errorPlaceholderHover = styled.css(_templateObject8 || (_templateObject8 = defaultTheme._taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
42
|
+
return props.type === 'error' && props.theme.themeProp('color', props.theme.getColor('red-600'), props.theme.getColor('red-600'), 1);
|
|
43
|
+
});
|
|
44
|
+
var TextAreaContainter = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject9 || (_templateObject9 = defaultTheme._taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
45
|
+
var Label = styled__default["default"].label.attrs(defaultTheme.applyDefaultTheme)(_templateObject10 || (_templateObject10 = defaultTheme._taggedTemplateLiteral(["\n ", ";\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n height: 19px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-top: 13px;\n ", "\n"])), function (props) {
|
|
34
46
|
return props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'));
|
|
35
47
|
}, function (props) {
|
|
36
|
-
return props.disabled && styled.css(
|
|
48
|
+
return props.disabled && styled.css(_templateObject11 || (_templateObject11 = defaultTheme._taggedTemplateLiteral(["\n cursor: not-allowed;\n "])));
|
|
37
49
|
});
|
|
38
|
-
var InputIconContainer = styled__default[
|
|
50
|
+
var InputIconContainer = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject12 || (_templateObject12 = 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\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) {
|
|
39
51
|
return props.theme.themeProp('background-color', props.theme.getColor('gray-900'), props.theme.getColor('gray-300'), '!important');
|
|
40
52
|
}, function (props) {
|
|
41
|
-
return props.disabled && styled.css(
|
|
53
|
+
return props.disabled && styled.css(_templateObject13 || (_templateObject13 = defaultTheme._taggedTemplateLiteral(["\n display: none;\n "])));
|
|
42
54
|
});
|
|
43
|
-
var TextInputField = styled__default[
|
|
44
|
-
return props.borderRadius && styled.css(
|
|
55
|
+
var TextInputField = styled__default["default"].textarea.attrs(defaultTheme.applyDefaultTheme)(_templateObject14 || (_templateObject14 = 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 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 &&:hover:not(:focus) {\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\n &:hover::placeholder {\n ", " \n ", " \n }\n\n &:focus::placeholder {\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) {
|
|
56
|
+
return props.borderRadius && styled.css(_templateObject15 || (_templateObject15 = defaultTheme._taggedTemplateLiteral(["\n border-radius: ", "px;\n "])), props.borderRadius);
|
|
45
57
|
}, function (props) {
|
|
46
58
|
return props.theme.themeProp('color', 'white', 'black');
|
|
47
59
|
}, function (props) {
|
|
48
|
-
return props.readOnly && styled.css(
|
|
60
|
+
return props.readOnly && styled.css(_templateObject16 || (_templateObject16 = defaultTheme._taggedTemplateLiteral(["\n cursor: default;\n border-color: transparent !important;\n padding: 12px 10px; ;\n "])));
|
|
49
61
|
}, function (props) {
|
|
50
|
-
return props.disabled && styled.css(
|
|
51
|
-
}, function (props) {
|
|
52
|
-
return props.readOnly && styled.css(_templateObject14 || (_templateObject14 = defaultTheme._taggedTemplateLiteral(["\n padding: 12px 10px; ;\n "])));
|
|
62
|
+
return props.disabled && styled.css(_templateObject17 || (_templateObject17 = defaultTheme._taggedTemplateLiteral(["\n cursor: not-allowed;\n "])));
|
|
53
63
|
}, function (props) {
|
|
54
64
|
return props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'));
|
|
55
|
-
}, function (props) {
|
|
56
|
-
return (props.state === 'warning' || props.state === 'error') && props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900'));
|
|
57
65
|
}, function (props) {
|
|
58
66
|
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
59
67
|
}, function (props) {
|
|
60
68
|
return props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'));
|
|
61
69
|
}, function (props) {
|
|
62
|
-
return props.noBorder && styled.css(
|
|
70
|
+
return props.noBorder && styled.css(_templateObject18 || (_templateObject18 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
63
71
|
return props.theme.themeProp('border-color', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
64
72
|
});
|
|
65
73
|
}, function (props) {
|
|
66
|
-
return props.type === 'warning' && styled.css(
|
|
74
|
+
return props.type === 'warning' && styled.css(_templateObject19 || (_templateObject19 = 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'));
|
|
67
75
|
}, function (props) {
|
|
68
|
-
return props.type === 'error' && styled.css(
|
|
76
|
+
return props.type === 'error' && styled.css(_templateObject20 || (_templateObject20 = 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'));
|
|
69
77
|
}, function (props) {
|
|
70
|
-
return props.noBorder && props.type === 'warning' && styled.css(
|
|
71
|
-
return props.theme.themeProp('border-color', '#
|
|
78
|
+
return props.noBorder && props.type === 'warning' && styled.css(_templateObject21 || (_templateObject21 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
79
|
+
return props.theme.themeProp('border-color', '#634E01', '#FFFDE8');
|
|
72
80
|
});
|
|
73
81
|
}, function (props) {
|
|
74
|
-
return props.noBorder && props.type === 'error' && styled.css(
|
|
82
|
+
return props.noBorder && props.type === 'error' && styled.css(_templateObject22 || (_templateObject22 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
75
83
|
return props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6');
|
|
76
84
|
});
|
|
77
85
|
}, function (props) {
|
|
78
|
-
return props.type === 'warning-border' && styled.css(
|
|
79
|
-
}, function (props) {
|
|
80
|
-
return props.type === 'error-border' && styled.css(_templateObject21 || (_templateObject21 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('border-color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
86
|
+
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')));
|
|
81
87
|
}, function (props) {
|
|
82
|
-
return props.
|
|
88
|
+
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')));
|
|
83
89
|
}, function (props) {
|
|
84
|
-
return props.
|
|
90
|
+
return props.padding === 'small' && styled.css(_templateObject25 || (_templateObject25 = defaultTheme._taggedTemplateLiteral(["\n padding: 5px 10px;\n "])));
|
|
85
91
|
}, function (props) {
|
|
86
|
-
return props.
|
|
92
|
+
return props.padding === 'medium' && styled.css(_templateObject26 || (_templateObject26 = defaultTheme._taggedTemplateLiteral(["\n padding: 13px 15px;\n "])));
|
|
87
93
|
}, function (props) {
|
|
88
|
-
return props.padding === '
|
|
94
|
+
return props.padding === 'large' && styled.css(_templateObject27 || (_templateObject27 = defaultTheme._taggedTemplateLiteral(["\n padding: 15px 55px;\n "])));
|
|
89
95
|
}, function (props) {
|
|
90
|
-
return props.
|
|
91
|
-
}, function (props) {
|
|
92
|
-
return props.padding === 'large' && styled.css(_templateObject25 || (_templateObject25 = defaultTheme._taggedTemplateLiteral(["\n padding: 15px 55px;\n "])));
|
|
93
|
-
}, function (props) {
|
|
94
|
-
return props.hasIcon && styled.css(_templateObject26 || (_templateObject26 = defaultTheme._taggedTemplateLiteral(["\n padding-left: 55px;\n padding-right: 35px;\n padding-top: 13.5px;\n "])));
|
|
96
|
+
return props.hasIcon && styled.css(_templateObject28 || (_templateObject28 = defaultTheme._taggedTemplateLiteral(["\n padding-left: 55px;\n padding-right: 35px;\n padding-top: 13.5px;\n "])));
|
|
95
97
|
}, function (props) {
|
|
96
98
|
return !props.readOnly && !props.disabled && props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
97
99
|
}, function (props) {
|
|
98
100
|
return props.edit && props.theme.themeProp('border-color', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
99
101
|
}, function (props) {
|
|
100
|
-
return props.type === 'warning' && props.theme.themeProp('background', '#806403', '#
|
|
102
|
+
return props.type === 'warning' && props.theme.themeProp('background', '#806403', '#FFFEBF');
|
|
101
103
|
}, function (props) {
|
|
102
|
-
return props.type === 'error' && props.theme.themeProp('background', '#
|
|
104
|
+
return props.type === 'error' && props.theme.themeProp('background', '#901d1d', '#F7D5D0');
|
|
103
105
|
}, function (props) {
|
|
104
106
|
return props.noBorder && !props.readOnly && props.type != 'warning' && props.type != 'error' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')) : 'background: transparent';
|
|
105
107
|
}, InputIconContainer, function (props) {
|
|
106
|
-
return props.type === 'success' && styled.css(
|
|
107
|
-
}, function (props) {
|
|
108
|
-
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'), 1);
|
|
109
|
-
}, function (props) {
|
|
110
|
-
return props.theme.themeProp('opacity', 0.6, 0.5, 1);
|
|
111
|
-
}, function (props) {
|
|
108
|
+
return props.type === 'success' && styled.css(_templateObject29 || (_templateObject29 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0;\n "])));
|
|
109
|
+
}, placeholderBaseStyle, warningPlaceholder, errorPlaceholder, warningPlaceholderHover, errorPlaceholderHover, warningPlaceholderHover, errorPlaceholderHover, function (props) {
|
|
112
110
|
return props.theme.themeProp('border-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-600'));
|
|
113
111
|
}, function (props) {
|
|
114
112
|
return props.theme.themeProp('background', 'transparent', props.theme.getColor('white'));
|
|
115
113
|
}, function (props) {
|
|
116
|
-
return props.type === 'warning' && styled.css(
|
|
114
|
+
return props.type === 'warning' && styled.css(_templateObject30 || (_templateObject30 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
117
115
|
return props.theme.themeProp('border-color', '#F4E21E', '#F4E21E');
|
|
118
116
|
}, props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black'));
|
|
119
117
|
}, function (props) {
|
|
120
|
-
return props.type === 'error' && styled.css(
|
|
118
|
+
return props.type === 'error' && styled.css(_templateObject31 || (_templateObject31 = defaultTheme._taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
121
119
|
return props.theme.themeProp('border-color', '#D83018', '#D83018');
|
|
122
120
|
}, props.theme.themeProp('background', 'white', 'white'), props.theme.themeProp('color', 'black', 'black'));
|
|
123
121
|
}, function (props) {
|
|
@@ -125,115 +123,99 @@ var TextInputField = styled__default['default'].textarea.attrs(defaultTheme.appl
|
|
|
125
123
|
}, function (props) {
|
|
126
124
|
return props.edit && props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)');
|
|
127
125
|
}, function (props) {
|
|
128
|
-
return props.noBorder && props.edit && styled.css(
|
|
126
|
+
return props.noBorder && props.edit && styled.css(_templateObject32 || (_templateObject32 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
129
127
|
return props.theme.themeProp('border-color', '#27272A', 'rgba(244,244,245, 0.3)');
|
|
130
128
|
});
|
|
131
|
-
}, function (props) {
|
|
132
|
-
return props.edit && props.type === 'warning' && props.theme.themeProp('background', '#2F2402', '#FFF3A7');
|
|
133
129
|
});
|
|
134
|
-
var TextInputLabel = styled__default[
|
|
130
|
+
var TextInputLabel = styled__default["default"].label.attrs(defaultTheme.applyDefaultTheme)(_templateObject33 || (_templateObject33 = 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\n ", "\n content: \"\";\n\n ", "\n"])), function (props) {
|
|
135
131
|
return props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'));
|
|
136
132
|
}, placeholderBaseStyle, function (props) {
|
|
137
133
|
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%)"));
|
|
138
134
|
}, function (props) {
|
|
139
|
-
return !props.inputIsEmpty && styled.css(
|
|
135
|
+
return !props.inputIsEmpty && styled.css(_templateObject34 || (_templateObject34 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), activeLabel);
|
|
140
136
|
}, function (props) {
|
|
141
|
-
return props.hasPlaceholder && styled.css(
|
|
137
|
+
return props.hasPlaceholder && styled.css(_templateObject35 || (_templateObject35 = defaultTheme._taggedTemplateLiteral(["\n ", ";\n "])), activeLabel);
|
|
142
138
|
}, function (props) {
|
|
143
|
-
return props.hasIcon && styled.css(
|
|
139
|
+
return props.hasIcon && styled.css(_templateObject36 || (_templateObject36 = defaultTheme._taggedTemplateLiteral(["\n left: 55px;\n "])));
|
|
144
140
|
});
|
|
145
|
-
var TextInputFieldIcon = styled__default[
|
|
146
|
-
var TextInputFieldIconAlert = styled__default[
|
|
141
|
+
var TextInputFieldIcon = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject37 || (_templateObject37 = 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"])));
|
|
142
|
+
var TextInputFieldIconAlert = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject38 || (_templateObject38 = defaultTheme._taggedTemplateLiteral(["\n position: absolute;\n top: 2.8px;\n display: flex;\n padding: 0 10px 0 30px;\n opacity: 0.6;\n transition: opacity 250ms;\n ", "\n svg {\n margin-top: 12px;\n width: 15px;\n }\n"])), function (props) {
|
|
147
143
|
return props.type === 'warning' && props.theme.themeProp('color', '#EAB308', '#2F2402');
|
|
148
144
|
});
|
|
149
|
-
var TextInput = styled__default[
|
|
145
|
+
var TextInput = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject39 || (_templateObject39 = defaultTheme._taggedTemplateLiteral(["\n position: relative;\n flex-basis: ", ";\n\n ", "\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) {
|
|
150
146
|
return props.$fieldLabel ? '66.66%' : '100%';
|
|
151
147
|
}, function (props) {
|
|
152
|
-
return props.readOnly && styled.css(
|
|
148
|
+
return props.readOnly && styled.css(_templateObject40 || (_templateObject40 = defaultTheme._taggedTemplateLiteral(["\n overflow: auto;\n "])));
|
|
153
149
|
}, function (props) {
|
|
154
|
-
return props.disabled && styled.css(
|
|
150
|
+
return props.disabled && styled.css(_templateObject41 || (_templateObject41 = defaultTheme._taggedTemplateLiteral(["\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n "])));
|
|
155
151
|
}, TextInputLabel, activeLabel, TextInputFieldIcon, TextInputField, TextInputLabel, activeLabel, function (props) {
|
|
156
152
|
return props.type === 'error' && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'));
|
|
157
153
|
});
|
|
158
|
-
var Description = styled__default[
|
|
154
|
+
var Description = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject42 || (_templateObject42 = 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) {
|
|
159
155
|
return props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'));
|
|
160
156
|
}, function (props) {
|
|
161
|
-
return (props.type === 'warning-border' || props.type === 'warning') && styled.css(
|
|
157
|
+
return (props.type === 'warning-border' || props.type === 'warning') && styled.css(_templateObject43 || (_templateObject43 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500')));
|
|
162
158
|
}, function (props) {
|
|
163
|
-
return (props.type === 'error-border' || props.type === 'error') && styled.css(
|
|
159
|
+
return (props.type === 'error-border' || props.type === 'error') && styled.css(_templateObject44 || (_templateObject44 = defaultTheme._taggedTemplateLiteral(["\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
164
160
|
});
|
|
165
|
-
var SuccessContainer = styled__default[
|
|
161
|
+
var SuccessContainer = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject45 || (_templateObject45 = 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) {
|
|
166
162
|
return props.fadeIn ? 0 : 1;
|
|
167
163
|
}, function (props) {
|
|
168
164
|
return props.fadeIn ? fadeOutCheck : fadeInCheck;
|
|
169
165
|
}, function (props) {
|
|
170
166
|
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500'));
|
|
171
167
|
});
|
|
172
|
-
var SuccessContainerLabel = styled__default[
|
|
168
|
+
var SuccessContainerLabel = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject46 || (_templateObject46 = 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 margin-right: 5px;\n margin-top: -7px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ", "\n\n > svg {\n width: 13px;\n }\n"])), function (props) {
|
|
173
169
|
return props.fadeIn ? 0 : 1;
|
|
174
170
|
}, function (props) {
|
|
175
171
|
return props.fadeIn ? fadeOutCheck : fadeInCheck;
|
|
176
172
|
}, function (props) {
|
|
177
173
|
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-500'));
|
|
178
174
|
});
|
|
179
|
-
styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject45 || (_templateObject45 = 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) {
|
|
180
|
-
return props.expanded && styled.css(_templateObject46 || (_templateObject46 = defaultTheme._taggedTemplateLiteral(["\n margin-top: 0px;\n "])));
|
|
181
|
-
}, function (props) {
|
|
182
|
-
return props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'));
|
|
183
|
-
}, function (props) {
|
|
184
|
-
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('emerald-500'));
|
|
185
|
-
}, function (props) {
|
|
186
|
-
return props.type === 'error' && styled.css(_templateObject47 || (_templateObject47 = defaultTheme._taggedTemplateLiteral(["\n content: 'error';\n ", "\n "])), props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500')));
|
|
187
|
-
});
|
|
188
175
|
|
|
189
|
-
var
|
|
176
|
+
var _excluded = ["value", "defaultValue", "name", "label", "placeholder", "required", "disabled", "hidden", "readOnly", "edit", "autoComplete", "description", "type", "icon", "rows", "className", "style", "onChange", "onBlur", "noBorder", "instructionsTextArea", "loadingIcon", "successIcon", "padding", "descriptionToolTip", "borderRadius", "fieldLabel"];
|
|
177
|
+
var TextArea = React__default["default"].forwardRef(function TextArea(_ref, forwardedRef) {
|
|
190
178
|
var value = _ref.value,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
rest = defaultTheme._objectWithoutProperties(_ref, ["value", "defaultValue", "name", "label", "placeholder", "required", "disabled", "hidden", "readOnly", "edit", "autoComplete", "description", "type", "icon", "rows", "className", "style", "onChange", "onBlur", "lightBackground", "noBorder", "instructionsTextArea", "loadingIcon", "successIcon", "padding", "descriptionToolTip", "borderRadius", "fieldLabel"]);
|
|
219
|
-
|
|
179
|
+
defaultValue = _ref.defaultValue,
|
|
180
|
+
name = _ref.name,
|
|
181
|
+
label = _ref.label,
|
|
182
|
+
placeholder = _ref.placeholder,
|
|
183
|
+
required = _ref.required,
|
|
184
|
+
disabled = _ref.disabled,
|
|
185
|
+
hidden = _ref.hidden,
|
|
186
|
+
readOnly = _ref.readOnly,
|
|
187
|
+
edit = _ref.edit,
|
|
188
|
+
autoComplete = _ref.autoComplete,
|
|
189
|
+
description = _ref.description,
|
|
190
|
+
type = _ref.type,
|
|
191
|
+
icon = _ref.icon,
|
|
192
|
+
rows = _ref.rows,
|
|
193
|
+
className = _ref.className,
|
|
194
|
+
style = _ref.style,
|
|
195
|
+
_onChange = _ref.onChange,
|
|
196
|
+
onBlur = _ref.onBlur,
|
|
197
|
+
noBorder = _ref.noBorder,
|
|
198
|
+
instructionsTextArea = _ref.instructionsTextArea,
|
|
199
|
+
loadingIcon = _ref.loadingIcon,
|
|
200
|
+
successIcon = _ref.successIcon,
|
|
201
|
+
padding = _ref.padding,
|
|
202
|
+
descriptionToolTip = _ref.descriptionToolTip,
|
|
203
|
+
borderRadius = _ref.borderRadius,
|
|
204
|
+
fieldLabel = _ref.fieldLabel,
|
|
205
|
+
rest = defaultTheme._objectWithoutProperties(_ref, _excluded);
|
|
220
206
|
var textInputDomNode = React.useRef(null);
|
|
221
207
|
var textInputRef = useMergedRefs.useMergedRefs(forwardedRef, textInputDomNode);
|
|
222
|
-
|
|
223
208
|
var _useState = React.useState(!(value || defaultValue)),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
209
|
+
_useState2 = defaultTheme._slicedToArray(_useState, 2),
|
|
210
|
+
inputIsEmpty = _useState2[0],
|
|
211
|
+
setInputIsEmpty = _useState2[1];
|
|
228
212
|
var _useState3 = React.useState(false),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
213
|
+
_useState4 = defaultTheme._slicedToArray(_useState3, 2),
|
|
214
|
+
autoFocus = _useState4[0],
|
|
215
|
+
setAutoFocus = _useState4[1];
|
|
233
216
|
var _useState5 = React.useState(nanoid.nanoid()),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
217
|
+
_useState6 = defaultTheme._slicedToArray(_useState5, 1),
|
|
218
|
+
uniqueId = _useState6[0];
|
|
237
219
|
var memoizedDescriptionToolTip = React.useMemo(function () {
|
|
238
220
|
return descriptionToolTip;
|
|
239
221
|
}, [descriptionToolTip]);
|
|
@@ -245,21 +227,20 @@ var TextArea = React__default['default'].forwardRef(function TextArea(_ref, forw
|
|
|
245
227
|
event.stopPropagation();
|
|
246
228
|
}
|
|
247
229
|
}, []);
|
|
248
|
-
|
|
249
230
|
var input = function input() {
|
|
250
|
-
return React__default[
|
|
231
|
+
return React__default["default"].createElement(TextAreaContainter, null, fieldLabel && React__default["default"].createElement(Label, {
|
|
251
232
|
htmlFor: uniqueId,
|
|
252
233
|
disabled: disabled
|
|
253
|
-
}, fieldLabel, React__default[
|
|
234
|
+
}, fieldLabel, React__default["default"].createElement(SuccessContainerLabel, null, type === 'loading' && loadingIcon, type === 'success' && successIcon)), React__default["default"].createElement(TextInput, {
|
|
254
235
|
$fieldLabel: !lodash.isEmpty(fieldLabel),
|
|
255
236
|
disabled: disabled,
|
|
256
237
|
readOnly: readOnly,
|
|
257
238
|
type: type,
|
|
258
239
|
className: className,
|
|
259
240
|
style: style
|
|
260
|
-
}, React__default[
|
|
241
|
+
}, React__default["default"].createElement(TextInputFieldIconAlert, {
|
|
261
242
|
type: type
|
|
262
|
-
}, icon), React__default[
|
|
243
|
+
}, icon), React__default["default"].createElement(TextInputField, defaultTheme._extends({
|
|
263
244
|
autoFocus: autoFocus,
|
|
264
245
|
borderRadius: borderRadius,
|
|
265
246
|
ref: textInputRef,
|
|
@@ -279,44 +260,39 @@ var TextArea = React__default['default'].forwardRef(function TextArea(_ref, forw
|
|
|
279
260
|
icon: icon,
|
|
280
261
|
id: "text-input-".concat(uniqueId),
|
|
281
262
|
key: uniqueId,
|
|
282
|
-
lightBackground: lightBackground,
|
|
283
263
|
padding: padding,
|
|
284
264
|
onChange: function onChange(e) {
|
|
285
265
|
if (e.target.value) {
|
|
286
266
|
setInputIsEmpty(false);
|
|
287
|
-
|
|
288
267
|
if (!autoFocus) {
|
|
289
268
|
setAutoFocus(true);
|
|
290
269
|
}
|
|
291
270
|
} else {
|
|
292
271
|
setInputIsEmpty(true);
|
|
293
|
-
|
|
294
272
|
if (!autoFocus) {
|
|
295
273
|
setAutoFocus(true);
|
|
296
274
|
}
|
|
297
275
|
}
|
|
298
|
-
|
|
299
276
|
_onChange(e);
|
|
300
277
|
},
|
|
301
278
|
onKeyDown: onKeyDown,
|
|
302
279
|
onBlur: onBlur,
|
|
303
280
|
noBorder: noBorder
|
|
304
|
-
}, rest)), !fieldLabel && (type === 'loading' || type === 'success') && React__default[
|
|
281
|
+
}, rest)), !fieldLabel && (type === 'loading' || type === 'success') && React__default["default"].createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default["default"].createElement(InputIconContainer, {
|
|
305
282
|
disabled: disabled
|
|
306
|
-
}, React__default[
|
|
283
|
+
}, React__default["default"].createElement(editNote.SvgEditNote, {
|
|
307
284
|
className: padding === 'small' ? 'smallPadingIcon' : undefined
|
|
308
|
-
})), label && React__default[
|
|
285
|
+
})), label && React__default["default"].createElement(TextInputLabel, {
|
|
309
286
|
htmlFor: "text-input-".concat(uniqueId),
|
|
310
287
|
hasPlaceholder: Boolean(placeholder),
|
|
311
288
|
hasIcon: Boolean(icon),
|
|
312
289
|
inputIsEmpty: inputIsEmpty
|
|
313
|
-
}, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default[
|
|
290
|
+
}, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default["default"].createElement(Description, {
|
|
314
291
|
type: type
|
|
315
292
|
}, description)));
|
|
316
293
|
};
|
|
317
|
-
|
|
318
294
|
if (hidden) return null;
|
|
319
|
-
return React__default[
|
|
295
|
+
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, {
|
|
320
296
|
content: memoizedDescriptionToolTip,
|
|
321
297
|
key: "tooltipTextArea1",
|
|
322
298
|
placement: "bottom-end",
|
|
@@ -359,7 +335,6 @@ TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
359
335
|
className: defaultTheme.PropTypes.string,
|
|
360
336
|
style: defaultTheme.PropTypes.object,
|
|
361
337
|
padding: defaultTheme.PropTypes.oneOf(['small', 'medium', 'large']),
|
|
362
|
-
lightBackground: defaultTheme.PropTypes.bool,
|
|
363
338
|
onChange: defaultTheme.PropTypes.func,
|
|
364
339
|
onBlur: defaultTheme.PropTypes.func,
|
|
365
340
|
noBorder: defaultTheme.PropTypes.bool,
|