@ntbjs/react-components 1.3.0-rc.59 → 1.3.0-rc.6-patch.1
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 +8 -7
- package/{ActionButton-b2345555.js → ActionButton-dea072f4.js} +16 -19
- package/{Alert-d69a3f95.js → Alert-347a66eb.js} +24 -20
- package/{AssetAction-9622c4f9.js → AssetGallery-f24a8bb1.js} +651 -606
- package/AssetPreviewTopBar-b64d4665.js +99 -0
- package/{Badge-e984e6f5.js → Badge-b5d734ce.js} +49 -28
- package/{Button-090fb526.js → Button-211d92ec.js} +85 -94
- package/{Checkbox-ad9c9e54.js → Checkbox-b6f6fabf.js} +35 -30
- package/{CompactAutocompleteSelect-26949125.js → CompactAutocompleteSelect-15a10abb.js} +114 -82
- package/{CompactStarRating-65bf27e5.js → CompactStarRating-821494e0.js} +94 -83
- package/{CompactTextInput-60edc635.js → CompactTextInput-ca8a67af.js} +106 -110
- package/{ContextMenu-4eb8fdc5.js → ContextMenu-d269f2b4.js} +6 -6
- package/{ContextMenuItem-c536b460.js → ContextMenuItem-960e1acf.js} +26 -22
- package/{InputGroup-a89a0ea3.js → InputGroup-b5ebae07.js} +6 -6
- package/{Instructions-dbd4514c.js → Instructions-6bfa0f6e.js} +81 -97
- package/{MultiLevelCheckboxSelect-3d5d5f2c.js → MultiLevelCheckboxSelect-b145322d.js} +164 -102
- package/{MultiSelect-cdfe6ffa.js → MultiSelect-b2459602.js} +101 -71
- package/{Popover-52d29ca6.js → Popover-ec433aaf.js} +40 -41
- package/{Radio-55db4781.js → Radio-2ab61f91.js} +22 -21
- package/{SectionSeparator-af8dc1ce.js → SectionSeparator-a28c6af2.js} +6 -6
- package/{Switch-04ecd8d0.js → Switch-e3289575.js} +27 -25
- package/{Tab-e43241f0.js → Tab-91278790.js} +7 -7
- package/{Tabs-cfc08c6b.js → Tabs-2a0f1d84.js} +43 -39
- package/{TextArea-44b4d3c4.js → TextArea-8c8757d9.js} +125 -93
- package/{TextInput-c3c71881.js → TextInput-4cac4342.js} +50 -48
- package/{Tooltip-a68a7e49.js → Tooltip-978b6cdd.js} +13 -13
- package/{VerificationStatusIcon-7b0e23fe.js → VerificationStatusIcon-ad0159e3.js} +30 -20
- package/{close-1751121a.js → close-ebf2f3cf.js} +12 -8
- 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-cd01e6c2.js → defaultTheme-44832997.js} +261 -213
- package/edit-note-c47d292e.js +41 -0
- package/{expand-more-d74e2bd2.js → expand-more-94585605.js} +12 -8
- 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 +1 -2
- package/{react-select-creatable.esm-383b1e78.js → react-select-creatable.esm-2f23d6c6.js} +1285 -1414
- package/{shift-away-subtle-631cd794.js → shift-away-subtle-22739ae8.js} +1 -1
- package/ssr/index.js +3 -1
- package/styles/config.scss +2 -2
- package/warning-circle-24522402.js +41 -0
- package/widgets/AssetGallery/index.js +32 -34
- 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 +17 -16
- package/widgets/index.js +35 -37
- package/AssetPreviewTopBar-b1fe3188.js +0 -104
- package/edit-note-cefe2215.js +0 -37
|
@@ -2,201 +2,271 @@
|
|
|
2
2
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
4
|
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
function _createForOfIteratorHelper(r, e) {
|
|
17
|
-
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
18
|
-
if (!t) {
|
|
19
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
20
|
-
t && (r = t);
|
|
21
|
-
var n = 0,
|
|
22
|
-
F = function () {};
|
|
23
|
-
return {
|
|
24
|
-
s: F,
|
|
25
|
-
n: function () {
|
|
26
|
-
return n >= r.length ? {
|
|
27
|
-
done: !0
|
|
28
|
-
} : {
|
|
29
|
-
done: !1,
|
|
30
|
-
value: r[n++]
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
e: function (r) {
|
|
34
|
-
throw r;
|
|
35
|
-
},
|
|
36
|
-
f: F
|
|
37
|
-
};
|
|
5
|
+
function ownKeys(object, enumerableOnly) {
|
|
6
|
+
var keys = Object.keys(object);
|
|
7
|
+
|
|
8
|
+
if (Object.getOwnPropertySymbols) {
|
|
9
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
10
|
+
|
|
11
|
+
if (enumerableOnly) {
|
|
12
|
+
symbols = symbols.filter(function (sym) {
|
|
13
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14
|
+
});
|
|
38
15
|
}
|
|
39
|
-
|
|
16
|
+
|
|
17
|
+
keys.push.apply(keys, symbols);
|
|
40
18
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
u = !1;
|
|
44
|
-
return {
|
|
45
|
-
s: function () {
|
|
46
|
-
t = t.call(r);
|
|
47
|
-
},
|
|
48
|
-
n: function () {
|
|
49
|
-
var r = t.next();
|
|
50
|
-
return a = r.done, r;
|
|
51
|
-
},
|
|
52
|
-
e: function (r) {
|
|
53
|
-
u = !0, o = r;
|
|
54
|
-
},
|
|
55
|
-
f: function () {
|
|
56
|
-
try {
|
|
57
|
-
a || null == t.return || t.return();
|
|
58
|
-
} finally {
|
|
59
|
-
if (u) throw o;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function _defineProperty(e, r, t) {
|
|
65
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
66
|
-
value: t,
|
|
67
|
-
enumerable: !0,
|
|
68
|
-
configurable: !0,
|
|
69
|
-
writable: !0
|
|
70
|
-
}) : e[r] = t, e;
|
|
71
|
-
}
|
|
72
|
-
function _extends() {
|
|
73
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
74
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
75
|
-
var t = arguments[e];
|
|
76
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
77
|
-
}
|
|
78
|
-
return n;
|
|
79
|
-
}, _extends.apply(null, arguments);
|
|
80
|
-
}
|
|
81
|
-
function _iterableToArray(r) {
|
|
82
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
19
|
+
|
|
20
|
+
return keys;
|
|
83
21
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
} catch (r) {
|
|
100
|
-
o = !0, n = r;
|
|
101
|
-
} finally {
|
|
102
|
-
try {
|
|
103
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
104
|
-
} finally {
|
|
105
|
-
if (o) throw n;
|
|
106
|
-
}
|
|
22
|
+
|
|
23
|
+
function _objectSpread2(target) {
|
|
24
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
25
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
26
|
+
|
|
27
|
+
if (i % 2) {
|
|
28
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
|
29
|
+
_defineProperty(target, key, source[key]);
|
|
30
|
+
});
|
|
31
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
32
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
33
|
+
} else {
|
|
34
|
+
ownKeys(Object(source)).forEach(function (key) {
|
|
35
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
36
|
+
});
|
|
107
37
|
}
|
|
108
|
-
return a;
|
|
109
38
|
}
|
|
39
|
+
|
|
40
|
+
return target;
|
|
110
41
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
})), t.push.apply(t, o);
|
|
42
|
+
|
|
43
|
+
function _typeof(obj) {
|
|
44
|
+
"@babel/helpers - typeof";
|
|
45
|
+
|
|
46
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
47
|
+
_typeof = function (obj) {
|
|
48
|
+
return typeof obj;
|
|
49
|
+
};
|
|
50
|
+
} else {
|
|
51
|
+
_typeof = function (obj) {
|
|
52
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
53
|
+
};
|
|
124
54
|
}
|
|
125
|
-
|
|
55
|
+
|
|
56
|
+
return _typeof(obj);
|
|
126
57
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
58
|
+
|
|
59
|
+
function _defineProperty(obj, key, value) {
|
|
60
|
+
if (key in obj) {
|
|
61
|
+
Object.defineProperty(obj, key, {
|
|
62
|
+
value: value,
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true
|
|
134
66
|
});
|
|
67
|
+
} else {
|
|
68
|
+
obj[key] = value;
|
|
135
69
|
}
|
|
136
|
-
|
|
70
|
+
|
|
71
|
+
return obj;
|
|
137
72
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
73
|
+
|
|
74
|
+
function _extends() {
|
|
75
|
+
_extends = Object.assign || function (target) {
|
|
76
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
77
|
+
var source = arguments[i];
|
|
78
|
+
|
|
79
|
+
for (var key in source) {
|
|
80
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
81
|
+
target[key] = source[key];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return target;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return _extends.apply(this, arguments);
|
|
148
90
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
91
|
+
|
|
92
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
93
|
+
if (source == null) return {};
|
|
94
|
+
var target = {};
|
|
95
|
+
var sourceKeys = Object.keys(source);
|
|
96
|
+
var key, i;
|
|
97
|
+
|
|
98
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
99
|
+
key = sourceKeys[i];
|
|
100
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
101
|
+
target[key] = source[key];
|
|
155
102
|
}
|
|
156
|
-
|
|
103
|
+
|
|
104
|
+
return target;
|
|
157
105
|
}
|
|
158
|
-
|
|
159
|
-
|
|
106
|
+
|
|
107
|
+
function _objectWithoutProperties(source, excluded) {
|
|
108
|
+
if (source == null) return {};
|
|
109
|
+
|
|
110
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
111
|
+
|
|
112
|
+
var key, i;
|
|
113
|
+
|
|
114
|
+
if (Object.getOwnPropertySymbols) {
|
|
115
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
116
|
+
|
|
117
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
118
|
+
key = sourceSymbolKeys[i];
|
|
119
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
120
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
121
|
+
target[key] = source[key];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return target;
|
|
160
126
|
}
|
|
161
|
-
|
|
162
|
-
|
|
127
|
+
|
|
128
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
129
|
+
if (!raw) {
|
|
130
|
+
raw = strings.slice(0);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
163
134
|
raw: {
|
|
164
|
-
value: Object.freeze(
|
|
135
|
+
value: Object.freeze(raw)
|
|
165
136
|
}
|
|
166
137
|
}));
|
|
167
138
|
}
|
|
168
|
-
|
|
169
|
-
|
|
139
|
+
|
|
140
|
+
function _slicedToArray(arr, i) {
|
|
141
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function _toConsumableArray(arr) {
|
|
145
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function _arrayWithoutHoles(arr) {
|
|
149
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function _arrayWithHoles(arr) {
|
|
153
|
+
if (Array.isArray(arr)) return arr;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function _iterableToArray(iter) {
|
|
157
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
170
158
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
159
|
+
|
|
160
|
+
function _iterableToArrayLimit(arr, i) {
|
|
161
|
+
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
162
|
+
|
|
163
|
+
if (_i == null) return;
|
|
164
|
+
var _arr = [];
|
|
165
|
+
var _n = true;
|
|
166
|
+
var _d = false;
|
|
167
|
+
|
|
168
|
+
var _s, _e;
|
|
169
|
+
|
|
170
|
+
try {
|
|
171
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
172
|
+
_arr.push(_s.value);
|
|
173
|
+
|
|
174
|
+
if (i && _arr.length === i) break;
|
|
175
|
+
}
|
|
176
|
+
} catch (err) {
|
|
177
|
+
_d = true;
|
|
178
|
+
_e = err;
|
|
179
|
+
} finally {
|
|
180
|
+
try {
|
|
181
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
182
|
+
} finally {
|
|
183
|
+
if (_d) throw _e;
|
|
184
|
+
}
|
|
178
185
|
}
|
|
179
|
-
|
|
186
|
+
|
|
187
|
+
return _arr;
|
|
180
188
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
189
|
+
|
|
190
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
191
|
+
if (!o) return;
|
|
192
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
193
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
194
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
195
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
196
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
184
197
|
}
|
|
185
|
-
function _typeof(o) {
|
|
186
|
-
"@babel/helpers - typeof";
|
|
187
198
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
function _arrayLikeToArray(arr, len) {
|
|
200
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
201
|
+
|
|
202
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
203
|
+
|
|
204
|
+
return arr2;
|
|
193
205
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
206
|
+
|
|
207
|
+
function _nonIterableSpread() {
|
|
208
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function _nonIterableRest() {
|
|
212
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
216
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
217
|
+
|
|
218
|
+
if (!it) {
|
|
219
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
220
|
+
if (it) o = it;
|
|
221
|
+
var i = 0;
|
|
222
|
+
|
|
223
|
+
var F = function () {};
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
s: F,
|
|
227
|
+
n: function () {
|
|
228
|
+
if (i >= o.length) return {
|
|
229
|
+
done: true
|
|
230
|
+
};
|
|
231
|
+
return {
|
|
232
|
+
done: false,
|
|
233
|
+
value: o[i++]
|
|
234
|
+
};
|
|
235
|
+
},
|
|
236
|
+
e: function (e) {
|
|
237
|
+
throw e;
|
|
238
|
+
},
|
|
239
|
+
f: F
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
199
244
|
}
|
|
245
|
+
|
|
246
|
+
var normalCompletion = true,
|
|
247
|
+
didErr = false,
|
|
248
|
+
err;
|
|
249
|
+
return {
|
|
250
|
+
s: function () {
|
|
251
|
+
it = it.call(o);
|
|
252
|
+
},
|
|
253
|
+
n: function () {
|
|
254
|
+
var step = it.next();
|
|
255
|
+
normalCompletion = step.done;
|
|
256
|
+
return step;
|
|
257
|
+
},
|
|
258
|
+
e: function (e) {
|
|
259
|
+
didErr = true;
|
|
260
|
+
err = e;
|
|
261
|
+
},
|
|
262
|
+
f: function () {
|
|
263
|
+
try {
|
|
264
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
265
|
+
} finally {
|
|
266
|
+
if (didErr) throw err;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
200
270
|
}
|
|
201
271
|
|
|
202
272
|
var propTypes = {exports: {}};
|
|
@@ -507,8 +577,6 @@ var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
507
577
|
|
|
508
578
|
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
509
579
|
|
|
510
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
511
|
-
|
|
512
580
|
/**
|
|
513
581
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
514
582
|
*
|
|
@@ -521,7 +589,7 @@ var printWarning$1 = function() {};
|
|
|
521
589
|
if (process.env.NODE_ENV !== 'production') {
|
|
522
590
|
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
523
591
|
var loggedTypeFailures = {};
|
|
524
|
-
var has$1 =
|
|
592
|
+
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
525
593
|
|
|
526
594
|
printWarning$1 = function(text) {
|
|
527
595
|
var message = 'Warning: ' + text;
|
|
@@ -533,7 +601,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
533
601
|
// This error was thrown as a convenience so that you can use this stack
|
|
534
602
|
// to find the callsite that caused this warning to fire.
|
|
535
603
|
throw new Error(message);
|
|
536
|
-
} catch (x) {
|
|
604
|
+
} catch (x) {}
|
|
537
605
|
};
|
|
538
606
|
}
|
|
539
607
|
|
|
@@ -562,8 +630,7 @@ function checkPropTypes$1(typeSpecs, values, location, componentName, getStack)
|
|
|
562
630
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
563
631
|
var err = Error(
|
|
564
632
|
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
565
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
566
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
633
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
567
634
|
);
|
|
568
635
|
err.name = 'Invariant Violation';
|
|
569
636
|
throw err;
|
|
@@ -622,9 +689,9 @@ var ReactIs$1 = reactIs.exports;
|
|
|
622
689
|
var assign = objectAssign;
|
|
623
690
|
|
|
624
691
|
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
625
|
-
var has = has$2;
|
|
626
692
|
var checkPropTypes = checkPropTypes_1;
|
|
627
693
|
|
|
694
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
628
695
|
var printWarning = function() {};
|
|
629
696
|
|
|
630
697
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -725,7 +792,6 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
725
792
|
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
726
793
|
var ReactPropTypes = {
|
|
727
794
|
array: createPrimitiveTypeChecker('array'),
|
|
728
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
729
795
|
bool: createPrimitiveTypeChecker('boolean'),
|
|
730
796
|
func: createPrimitiveTypeChecker('function'),
|
|
731
797
|
number: createPrimitiveTypeChecker('number'),
|
|
@@ -771,9 +837,8 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
771
837
|
* is prohibitively expensive if they are created too often, such as what
|
|
772
838
|
* happens in oneOfType() for any type before the one that matched.
|
|
773
839
|
*/
|
|
774
|
-
function PropTypeError(message
|
|
840
|
+
function PropTypeError(message) {
|
|
775
841
|
this.message = message;
|
|
776
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
777
842
|
this.stack = '';
|
|
778
843
|
}
|
|
779
844
|
// Make `instanceof Error` still work for returned errors.
|
|
@@ -808,7 +873,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
808
873
|
) {
|
|
809
874
|
printWarning(
|
|
810
875
|
'You are manually calling a React.PropTypes validation ' +
|
|
811
|
-
'function for the `' + propFullName + '` prop on `' + componentName
|
|
876
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
812
877
|
'and will throw in the standalone `prop-types` package. ' +
|
|
813
878
|
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
814
879
|
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
@@ -847,10 +912,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
847
912
|
// 'of type `object`'.
|
|
848
913
|
var preciseType = getPreciseType(propValue);
|
|
849
914
|
|
|
850
|
-
return new PropTypeError(
|
|
851
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
852
|
-
{expectedType: expectedType}
|
|
853
|
-
);
|
|
915
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
854
916
|
}
|
|
855
917
|
return null;
|
|
856
918
|
}
|
|
@@ -994,19 +1056,14 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
994
1056
|
}
|
|
995
1057
|
|
|
996
1058
|
function validate(props, propName, componentName, location, propFullName) {
|
|
997
|
-
var expectedTypes = [];
|
|
998
1059
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
999
1060
|
var checker = arrayOfTypeCheckers[i];
|
|
1000
|
-
|
|
1001
|
-
if (checkerResult == null) {
|
|
1061
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1) == null) {
|
|
1002
1062
|
return null;
|
|
1003
1063
|
}
|
|
1004
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
1005
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
1006
|
-
}
|
|
1007
1064
|
}
|
|
1008
|
-
|
|
1009
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '
|
|
1065
|
+
|
|
1066
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
1010
1067
|
}
|
|
1011
1068
|
return createChainableTypeChecker(validate);
|
|
1012
1069
|
}
|
|
@@ -1021,13 +1078,6 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
1021
1078
|
return createChainableTypeChecker(validate);
|
|
1022
1079
|
}
|
|
1023
1080
|
|
|
1024
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1025
|
-
return new PropTypeError(
|
|
1026
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
1027
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
1028
|
-
);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
1081
|
function createShapeTypeChecker(shapeTypes) {
|
|
1032
1082
|
function validate(props, propName, componentName, location, propFullName) {
|
|
1033
1083
|
var propValue = props[propName];
|
|
@@ -1037,8 +1087,8 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
1037
1087
|
}
|
|
1038
1088
|
for (var key in shapeTypes) {
|
|
1039
1089
|
var checker = shapeTypes[key];
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1090
|
+
if (!checker) {
|
|
1091
|
+
continue;
|
|
1042
1092
|
}
|
|
1043
1093
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1044
1094
|
if (error) {
|
|
@@ -1057,18 +1107,16 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
1057
1107
|
if (propType !== 'object') {
|
|
1058
1108
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1059
1109
|
}
|
|
1060
|
-
// We need to check all keys in case some are required but missing from
|
|
1110
|
+
// We need to check all keys in case some are required but missing from
|
|
1111
|
+
// props.
|
|
1061
1112
|
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1062
1113
|
for (var key in allKeys) {
|
|
1063
1114
|
var checker = shapeTypes[key];
|
|
1064
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
1065
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1066
|
-
}
|
|
1067
1115
|
if (!checker) {
|
|
1068
1116
|
return new PropTypeError(
|
|
1069
1117
|
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1070
1118
|
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1071
|
-
'\nValid keys: ' +
|
|
1119
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1072
1120
|
);
|
|
1073
1121
|
}
|
|
1074
1122
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
@@ -1253,7 +1301,6 @@ var factoryWithThrowingShims = function() {
|
|
|
1253
1301
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1254
1302
|
var ReactPropTypes = {
|
|
1255
1303
|
array: shim,
|
|
1256
|
-
bigint: shim,
|
|
1257
1304
|
bool: shim,
|
|
1258
1305
|
func: shim,
|
|
1259
1306
|
number: shim,
|
|
@@ -1331,11 +1378,10 @@ function styleInject(css, ref) {
|
|
|
1331
1378
|
}
|
|
1332
1379
|
}
|
|
1333
1380
|
|
|
1334
|
-
var css_248z = "/**\n * Colors\n
|
|
1335
|
-
var importedColors = {"orange-500":"#
|
|
1381
|
+
var css_248z = "/**\n * Colors\n */\n";
|
|
1382
|
+
var importedColors = {"orange-500":"#ff5120","orange-400":"#ffa88f","emerald-500":"#30826a","emerald-400":"#64b49d","emerald-300":"#bfe0d5","emerald-200":"#f3f9f7","gray-900":"#141313","gray-800":"#272727","gray-700":"#323232","gray-600":"#505050","gray-500":"#767676","gray-400":"#b0b6b9","gray-300":"#d9dce0","gray-200":"#eff1f4","gray-100":"#f7f8f9","cercise-500":"#5f1031","cercise-400":"#854962","cercise-300":"#d099b0","cercise-100":"#f9f3f5","red-600":"#7f1b1b","red-500":"#d83000","red-200":"#fbeae6","brown-500":"#634e01","signal-yellow-500":"#f4e21e","signal-yellow-400":"#fff36c","signal-green-500":"#00bd98","signal-green-400":"#a3ffe0","black":"#202435","white":"#ffffff"};
|
|
1336
1383
|
styleInject(css_248z);
|
|
1337
1384
|
|
|
1338
|
-
var _excluded = ["theme"];
|
|
1339
1385
|
var _templateObject;
|
|
1340
1386
|
var defaultTheme = {
|
|
1341
1387
|
getColor: function getColor(name) {
|
|
@@ -1346,15 +1392,18 @@ var defaultTheme = {
|
|
|
1346
1392
|
secondaryFontFamily: "'Overpass', sans-serif",
|
|
1347
1393
|
themeProp: themeProp
|
|
1348
1394
|
};
|
|
1395
|
+
|
|
1349
1396
|
function themeProp(property, darkMode, lightMode) {
|
|
1350
1397
|
var specificity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;
|
|
1351
1398
|
var specificityString = Array(specificity).fill("&").join("");
|
|
1352
1399
|
return styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body.dark-theme ", " {\n ", ": ", ";\n }\n\n body.light-theme ", " {\n ", ": ", ";\n }\n\n body:not(.light-theme):not(.dark-theme) ", " {\n ", ": ", ";\n\n @media (prefers-color-scheme: dark) {\n ", ": ", ";\n }\n }\n "])), specificityString, property, darkMode, specificityString, property, lightMode, specificityString, property, lightMode, property, darkMode);
|
|
1353
1400
|
}
|
|
1401
|
+
|
|
1354
1402
|
function applyDefaultTheme(_ref) {
|
|
1355
1403
|
var _ref$theme = _ref.theme,
|
|
1356
|
-
|
|
1357
|
-
|
|
1404
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme,
|
|
1405
|
+
props = _objectWithoutProperties(_ref, ["theme"]);
|
|
1406
|
+
|
|
1358
1407
|
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1359
1408
|
theme: Object.assign({}, defaultTheme, theme)
|
|
1360
1409
|
});
|
|
@@ -1370,5 +1419,4 @@ exports._taggedTemplateLiteral = _taggedTemplateLiteral;
|
|
|
1370
1419
|
exports._toConsumableArray = _toConsumableArray;
|
|
1371
1420
|
exports._typeof = _typeof;
|
|
1372
1421
|
exports.applyDefaultTheme = applyDefaultTheme;
|
|
1373
|
-
exports.reactIs = reactIs;
|
|
1374
1422
|
exports.styleInject = styleInject;
|