@abgov/react-components 3.4.0-beta.2 → 3.4.0-beta.23
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/experimental/badge/badge.component.d.ts +10 -0
- package/experimental/common.d.ts +3 -0
- package/experimental/form/form.actions.component.d.ts +3 -0
- package/experimental/form/form.component.d.ts +10 -0
- package/experimental/form/form.item.component.d.ts +7 -0
- package/experimental/{experimental/form → form}/formFieldValidator.d.ts +0 -0
- package/experimental/icons/icon.component.d.ts +12 -0
- package/experimental/icons/iconButton.component.d.ts +13 -0
- package/experimental/icons/index.d.ts +2 -0
- package/experimental/index.d.ts +8 -0
- package/experimental/{experimental/input → input}/input.component.d.ts +0 -0
- package/experimental/modal/modal.component.d.ts +18 -0
- package/experimental/react-components.esm.js +1741 -1777
- package/experimental/react-components.umd.js +1744 -1782
- package/experimental/scrollable/scrollable.component.d.ts +12 -0
- package/experimental/transitions/index.d.ts +2 -0
- package/experimental/transitions/transition.d.ts +9 -0
- package/experimental/transitions/transitionSequence.d.ts +9 -0
- package/index.d.ts +13 -6
- package/lib/_common/errorState.d.ts +5 -0
- package/{experimental/experimental → lib}/element-loader/element-loader.d.ts +1 -1
- package/{experimental/experimental → lib}/page-loader/page-loader.d.ts +0 -0
- package/lib/radio-group/radio-group.d.ts +6 -31
- package/lib/radio-group/radio.d.ts +13 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-element.d.ts +0 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-grid-column.d.ts +0 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-image-content.d.ts +0 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-titled-content.d.ts +0 -0
- package/package.json +1 -1
- package/react-components.esm.js +310 -779
- package/react-components.umd.js +308 -783
- package/experimental/experimental/badge/badge.component.d.ts +0 -8
- package/experimental/experimental/form/container/form.button.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.container.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.item.component.d.ts +0 -18
- package/experimental/experimental/form/form.component.d.ts +0 -32
- package/experimental/experimental/icons.d.ts +0 -8
- package/experimental/experimental/index.d.ts +0 -11
- package/experimental/experimental/modal/modal.component.d.ts +0 -40
- package/experimental/experimental/scrollable/scrollable.component.d.ts +0 -13
- package/lib/radio-group/radio/radio.d.ts +0 -17
- package/lib/radio-group/radio-group.context.d.ts +0 -6
|
@@ -34,17 +34,19 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
var css_248z = "/* Palette */\n/* Semantic usages */\n.goa-badge-icon {\n
|
|
37
|
+
var css_248z = "/* Palette */\n/* Semantic usages */\n.goa-badge-icon {\n font-size: 14px; }\n\n.badge-module_goa-badge__3F6Ve {\n display: inline-flex;\n align-items: center;\n border-radius: 4px;\n padding: 0 0.5rem;\n gap: 2px; }\n\n.badge-module_goa-badge-content__3UN-3 {\n font-size: 14px;\n font-weight: 400; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-information__2r_Eq {\n background-color: #f1f1f1;\n color: #005DAA; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-success__18wcm {\n background-color: #00853f;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-warning__20BNM {\n background-color: #feba35;\n color: #333; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-emergency__E4mHn {\n background-color: #ec040b;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-dark__1thw- {\n background-color: #333;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-midtone__1Gt4T {\n background-color: #767676;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-light__B8ZMt {\n background-color: #fff;\n color: #333; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-inactive__35PEw {\n background-color: #fff;\n color: #333; }\n";
|
|
38
38
|
var styles = {"goa-badge":"badge-module_goa-badge__3F6Ve","goa-badge-content":"badge-module_goa-badge-content__3UN-3","badge-information":"badge-module_badge-information__2r_Eq","badge-success":"badge-module_badge-success__18wcm","badge-warning":"badge-module_badge-warning__20BNM","badge-emergency":"badge-module_badge-emergency__E4mHn","badge-dark":"badge-module_badge-dark__1thw-","badge-midtone":"badge-module_badge-midtone__1Gt4T","badge-light":"badge-module_badge-light__B8ZMt","badge-inactive":"badge-module_badge-inactive__35PEw"};
|
|
39
39
|
styleInject(css_248z);
|
|
40
40
|
|
|
41
41
|
var GoABadge = function GoABadge(_ref) {
|
|
42
42
|
var type = _ref.type,
|
|
43
43
|
content = _ref.content,
|
|
44
|
-
icon = _ref.icon
|
|
44
|
+
icon = _ref.icon,
|
|
45
|
+
testId = _ref.testId;
|
|
45
46
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
47
|
+
"data-testid": testId,
|
|
46
48
|
className: classnames(styles['goa-badge'], styles["badge-".concat(type)])
|
|
47
|
-
}, icon, /*#__PURE__*/React__default.createElement("
|
|
49
|
+
}, icon, /*#__PURE__*/React__default.createElement("div", {
|
|
48
50
|
className: classnames(styles['goa-badge-content'])
|
|
49
51
|
}, content));
|
|
50
52
|
};
|
|
@@ -52,1680 +54,1705 @@
|
|
|
52
54
|
type: 'information'
|
|
53
55
|
};
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** @license React v16.13.1
|
|
60
|
-
* react-is.production.min.js
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/
|
|
67
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
68
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
69
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
70
|
-
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
71
|
-
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
72
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
73
|
-
|
|
74
|
-
var reactIs_production_min = {
|
|
75
|
-
AsyncMode: AsyncMode,
|
|
76
|
-
ConcurrentMode: ConcurrentMode,
|
|
77
|
-
ContextConsumer: ContextConsumer,
|
|
78
|
-
ContextProvider: ContextProvider,
|
|
79
|
-
Element: Element,
|
|
80
|
-
ForwardRef: ForwardRef,
|
|
81
|
-
Fragment: Fragment,
|
|
82
|
-
Lazy: Lazy,
|
|
83
|
-
Memo: Memo,
|
|
84
|
-
Portal: Portal,
|
|
85
|
-
Profiler: Profiler,
|
|
86
|
-
StrictMode: StrictMode,
|
|
87
|
-
Suspense: Suspense,
|
|
88
|
-
isAsyncMode: isAsyncMode,
|
|
89
|
-
isConcurrentMode: isConcurrentMode,
|
|
90
|
-
isContextConsumer: isContextConsumer,
|
|
91
|
-
isContextProvider: isContextProvider,
|
|
92
|
-
isElement: isElement,
|
|
93
|
-
isForwardRef: isForwardRef,
|
|
94
|
-
isFragment: isFragment,
|
|
95
|
-
isLazy: isLazy,
|
|
96
|
-
isMemo: isMemo,
|
|
97
|
-
isPortal: isPortal,
|
|
98
|
-
isProfiler: isProfiler,
|
|
99
|
-
isStrictMode: isStrictMode,
|
|
100
|
-
isSuspense: isSuspense,
|
|
101
|
-
isValidElementType: isValidElementType,
|
|
102
|
-
typeOf: typeOf
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
var reactIs_development = createCommonjsModule(function (module, exports) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (process.env.NODE_ENV !== "production") {
|
|
110
|
-
(function() {
|
|
111
|
-
|
|
112
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
113
|
-
// nor polyfill, then a plain number is used for performance.
|
|
114
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
115
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
116
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
117
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
118
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
119
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
120
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
121
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
122
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
123
|
-
|
|
124
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
125
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
126
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
127
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
128
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
129
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
130
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
131
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
132
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
133
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
134
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
135
|
-
|
|
136
|
-
function isValidElementType(type) {
|
|
137
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
138
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function typeOf(object) {
|
|
142
|
-
if (typeof object === 'object' && object !== null) {
|
|
143
|
-
var $$typeof = object.$$typeof;
|
|
144
|
-
|
|
145
|
-
switch ($$typeof) {
|
|
146
|
-
case REACT_ELEMENT_TYPE:
|
|
147
|
-
var type = object.type;
|
|
148
|
-
|
|
149
|
-
switch (type) {
|
|
150
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
151
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
152
|
-
case REACT_FRAGMENT_TYPE:
|
|
153
|
-
case REACT_PROFILER_TYPE:
|
|
154
|
-
case REACT_STRICT_MODE_TYPE:
|
|
155
|
-
case REACT_SUSPENSE_TYPE:
|
|
156
|
-
return type;
|
|
157
|
-
|
|
158
|
-
default:
|
|
159
|
-
var $$typeofType = type && type.$$typeof;
|
|
160
|
-
|
|
161
|
-
switch ($$typeofType) {
|
|
162
|
-
case REACT_CONTEXT_TYPE:
|
|
163
|
-
case REACT_FORWARD_REF_TYPE:
|
|
164
|
-
case REACT_LAZY_TYPE:
|
|
165
|
-
case REACT_MEMO_TYPE:
|
|
166
|
-
case REACT_PROVIDER_TYPE:
|
|
167
|
-
return $$typeofType;
|
|
168
|
-
|
|
169
|
-
default:
|
|
170
|
-
return $$typeof;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
case REACT_PORTAL_TYPE:
|
|
176
|
-
return $$typeof;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return undefined;
|
|
181
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
182
|
-
|
|
183
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
184
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
185
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
186
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
187
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
188
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
189
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
190
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
191
|
-
var Memo = REACT_MEMO_TYPE;
|
|
192
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
193
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
194
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
195
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
196
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
197
|
-
|
|
198
|
-
function isAsyncMode(object) {
|
|
199
|
-
{
|
|
200
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
201
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
202
|
-
|
|
203
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
208
|
-
}
|
|
209
|
-
function isConcurrentMode(object) {
|
|
210
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
211
|
-
}
|
|
212
|
-
function isContextConsumer(object) {
|
|
213
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
214
|
-
}
|
|
215
|
-
function isContextProvider(object) {
|
|
216
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
217
|
-
}
|
|
218
|
-
function isElement(object) {
|
|
219
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
220
|
-
}
|
|
221
|
-
function isForwardRef(object) {
|
|
222
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
223
|
-
}
|
|
224
|
-
function isFragment(object) {
|
|
225
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
226
|
-
}
|
|
227
|
-
function isLazy(object) {
|
|
228
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
229
|
-
}
|
|
230
|
-
function isMemo(object) {
|
|
231
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
232
|
-
}
|
|
233
|
-
function isPortal(object) {
|
|
234
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
235
|
-
}
|
|
236
|
-
function isProfiler(object) {
|
|
237
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
238
|
-
}
|
|
239
|
-
function isStrictMode(object) {
|
|
240
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
241
|
-
}
|
|
242
|
-
function isSuspense(object) {
|
|
243
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
exports.AsyncMode = AsyncMode;
|
|
247
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
248
|
-
exports.ContextConsumer = ContextConsumer;
|
|
249
|
-
exports.ContextProvider = ContextProvider;
|
|
250
|
-
exports.Element = Element;
|
|
251
|
-
exports.ForwardRef = ForwardRef;
|
|
252
|
-
exports.Fragment = Fragment;
|
|
253
|
-
exports.Lazy = Lazy;
|
|
254
|
-
exports.Memo = Memo;
|
|
255
|
-
exports.Portal = Portal;
|
|
256
|
-
exports.Profiler = Profiler;
|
|
257
|
-
exports.StrictMode = StrictMode;
|
|
258
|
-
exports.Suspense = Suspense;
|
|
259
|
-
exports.isAsyncMode = isAsyncMode;
|
|
260
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
261
|
-
exports.isContextConsumer = isContextConsumer;
|
|
262
|
-
exports.isContextProvider = isContextProvider;
|
|
263
|
-
exports.isElement = isElement;
|
|
264
|
-
exports.isForwardRef = isForwardRef;
|
|
265
|
-
exports.isFragment = isFragment;
|
|
266
|
-
exports.isLazy = isLazy;
|
|
267
|
-
exports.isMemo = isMemo;
|
|
268
|
-
exports.isPortal = isPortal;
|
|
269
|
-
exports.isProfiler = isProfiler;
|
|
270
|
-
exports.isStrictMode = isStrictMode;
|
|
271
|
-
exports.isSuspense = isSuspense;
|
|
272
|
-
exports.isValidElementType = isValidElementType;
|
|
273
|
-
exports.typeOf = typeOf;
|
|
274
|
-
})();
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
var reactIs_development_1 = reactIs_development.AsyncMode;
|
|
278
|
-
var reactIs_development_2 = reactIs_development.ConcurrentMode;
|
|
279
|
-
var reactIs_development_3 = reactIs_development.ContextConsumer;
|
|
280
|
-
var reactIs_development_4 = reactIs_development.ContextProvider;
|
|
281
|
-
var reactIs_development_5 = reactIs_development.Element;
|
|
282
|
-
var reactIs_development_6 = reactIs_development.ForwardRef;
|
|
283
|
-
var reactIs_development_7 = reactIs_development.Fragment;
|
|
284
|
-
var reactIs_development_8 = reactIs_development.Lazy;
|
|
285
|
-
var reactIs_development_9 = reactIs_development.Memo;
|
|
286
|
-
var reactIs_development_10 = reactIs_development.Portal;
|
|
287
|
-
var reactIs_development_11 = reactIs_development.Profiler;
|
|
288
|
-
var reactIs_development_12 = reactIs_development.StrictMode;
|
|
289
|
-
var reactIs_development_13 = reactIs_development.Suspense;
|
|
290
|
-
var reactIs_development_14 = reactIs_development.isAsyncMode;
|
|
291
|
-
var reactIs_development_15 = reactIs_development.isConcurrentMode;
|
|
292
|
-
var reactIs_development_16 = reactIs_development.isContextConsumer;
|
|
293
|
-
var reactIs_development_17 = reactIs_development.isContextProvider;
|
|
294
|
-
var reactIs_development_18 = reactIs_development.isElement;
|
|
295
|
-
var reactIs_development_19 = reactIs_development.isForwardRef;
|
|
296
|
-
var reactIs_development_20 = reactIs_development.isFragment;
|
|
297
|
-
var reactIs_development_21 = reactIs_development.isLazy;
|
|
298
|
-
var reactIs_development_22 = reactIs_development.isMemo;
|
|
299
|
-
var reactIs_development_23 = reactIs_development.isPortal;
|
|
300
|
-
var reactIs_development_24 = reactIs_development.isProfiler;
|
|
301
|
-
var reactIs_development_25 = reactIs_development.isStrictMode;
|
|
302
|
-
var reactIs_development_26 = reactIs_development.isSuspense;
|
|
303
|
-
var reactIs_development_27 = reactIs_development.isValidElementType;
|
|
304
|
-
var reactIs_development_28 = reactIs_development.typeOf;
|
|
305
|
-
|
|
306
|
-
var reactIs = createCommonjsModule(function (module) {
|
|
307
|
-
|
|
308
|
-
if (process.env.NODE_ENV === 'production') {
|
|
309
|
-
module.exports = reactIs_production_min;
|
|
310
|
-
} else {
|
|
311
|
-
module.exports = reactIs_development;
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
/*
|
|
316
|
-
object-assign
|
|
317
|
-
(c) Sindre Sorhus
|
|
318
|
-
@license MIT
|
|
319
|
-
*/
|
|
320
|
-
/* eslint-disable no-unused-vars */
|
|
321
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
322
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
323
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
324
|
-
|
|
325
|
-
function toObject(val) {
|
|
326
|
-
if (val === null || val === undefined) {
|
|
327
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
return Object(val);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
function shouldUseNative() {
|
|
334
|
-
try {
|
|
335
|
-
if (!Object.assign) {
|
|
336
|
-
return false;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
340
|
-
|
|
341
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
342
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
343
|
-
test1[5] = 'de';
|
|
344
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
345
|
-
return false;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
349
|
-
var test2 = {};
|
|
350
|
-
for (var i = 0; i < 10; i++) {
|
|
351
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
352
|
-
}
|
|
353
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
354
|
-
return test2[n];
|
|
355
|
-
});
|
|
356
|
-
if (order2.join('') !== '0123456789') {
|
|
357
|
-
return false;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
361
|
-
var test3 = {};
|
|
362
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
363
|
-
test3[letter] = letter;
|
|
364
|
-
});
|
|
365
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
366
|
-
'abcdefghijklmnopqrst') {
|
|
367
|
-
return false;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
return true;
|
|
371
|
-
} catch (err) {
|
|
372
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
373
|
-
return false;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
378
|
-
var from;
|
|
379
|
-
var to = toObject(target);
|
|
380
|
-
var symbols;
|
|
381
|
-
|
|
382
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
383
|
-
from = Object(arguments[s]);
|
|
384
|
-
|
|
385
|
-
for (var key in from) {
|
|
386
|
-
if (hasOwnProperty.call(from, key)) {
|
|
387
|
-
to[key] = from[key];
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
if (getOwnPropertySymbols) {
|
|
392
|
-
symbols = getOwnPropertySymbols(from);
|
|
393
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
394
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
395
|
-
to[symbols[i]] = from[symbols[i]];
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
57
|
+
var css_248z$1 = ".goa-icon {\n display: inline-block;\n}\n\n.goa-icon-button {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n/* GoA */\n.goa-icon-button-goa {\n padding: 0.25rem;\n border: 2px solid var(--color-button-tertiary);\n border-radius: 0.5rem;\n color: var(--color-primary);\n fill: var(--color-primary);\n}\n\n.goa-icon-button-goa:hover {\n background-color: var(--color-button-tertiary);\n}\n\n/* Simple */\n.goa-icon-button-simple {\n padding: 0.4rem;\n border-radius: 999px;\n transition: background 200ms ease-in;\n}\n\n.goa-icon-button-simple:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n";
|
|
58
|
+
styleInject(css_248z$1);
|
|
400
59
|
|
|
401
|
-
|
|
60
|
+
var Icons = {
|
|
61
|
+
barChart: /*#__PURE__*/React__default.createElement("svg", {
|
|
62
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
+
className: "ionicon",
|
|
64
|
+
viewBox: "0 0 512 512"
|
|
65
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Bar Chart"), /*#__PURE__*/React__default.createElement("path", {
|
|
66
|
+
d: "M32 32v432a16 16 0 0016 16h432",
|
|
67
|
+
fill: "none",
|
|
68
|
+
stroke: "currentColor",
|
|
69
|
+
strokeLinecap: "round",
|
|
70
|
+
strokeLinejoin: "round",
|
|
71
|
+
strokeWidth: "32"
|
|
72
|
+
}), /*#__PURE__*/React__default.createElement("rect", {
|
|
73
|
+
x: "96",
|
|
74
|
+
y: "224",
|
|
75
|
+
width: "80",
|
|
76
|
+
height: "192",
|
|
77
|
+
rx: "20",
|
|
78
|
+
ry: "20",
|
|
79
|
+
fill: "none",
|
|
80
|
+
stroke: "currentColor",
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeLinejoin: "round",
|
|
83
|
+
strokeWidth: "32"
|
|
84
|
+
}), /*#__PURE__*/React__default.createElement("rect", {
|
|
85
|
+
x: "240",
|
|
86
|
+
y: "176",
|
|
87
|
+
width: "80",
|
|
88
|
+
height: "240",
|
|
89
|
+
rx: "20",
|
|
90
|
+
ry: "20",
|
|
91
|
+
fill: "none",
|
|
92
|
+
stroke: "currentColor",
|
|
93
|
+
strokeLinecap: "round",
|
|
94
|
+
strokeLinejoin: "round",
|
|
95
|
+
strokeWidth: "32"
|
|
96
|
+
}), /*#__PURE__*/React__default.createElement("rect", {
|
|
97
|
+
x: "383.64",
|
|
98
|
+
y: "112",
|
|
99
|
+
width: "80",
|
|
100
|
+
height: "304",
|
|
101
|
+
rx: "20",
|
|
102
|
+
ry: "20",
|
|
103
|
+
fill: "none",
|
|
104
|
+
stroke: "currentColor",
|
|
105
|
+
strokeLinecap: "round",
|
|
106
|
+
strokeLinejoin: "round",
|
|
107
|
+
strokeWidth: "32"
|
|
108
|
+
})),
|
|
109
|
+
build: /*#__PURE__*/React__default.createElement("svg", {
|
|
110
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
111
|
+
className: "ionicon",
|
|
112
|
+
viewBox: "0 0 512 512"
|
|
113
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Build"), /*#__PURE__*/React__default.createElement("path", {
|
|
114
|
+
d: "M393.87 190a32.1 32.1 0 01-45.25 0l-26.57-26.57a32.09 32.09 0 010-45.26L382.19 58a1 1 0 00-.3-1.64c-38.82-16.64-89.15-8.16-121.11 23.57-30.58 30.35-32.32 76-21.12 115.84a31.93 31.93 0 01-9.06 32.08L64 380a48.17 48.17 0 1068 68l153.86-167a31.93 31.93 0 0131.6-9.13c39.54 10.59 84.54 8.6 114.72-21.19 32.49-32 39.5-88.56 23.75-120.93a1 1 0 00-1.6-.26z",
|
|
115
|
+
fill: "none",
|
|
116
|
+
stroke: "currentColor",
|
|
117
|
+
strokeLinecap: "round",
|
|
118
|
+
strokeMiterlimit: "10",
|
|
119
|
+
strokeWidth: "32"
|
|
120
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
121
|
+
cx: "96",
|
|
122
|
+
cy: "416",
|
|
123
|
+
r: "16"
|
|
124
|
+
})),
|
|
125
|
+
checkmarkCircle: /*#__PURE__*/React__default.createElement("svg", {
|
|
126
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
127
|
+
className: "ionicon",
|
|
128
|
+
viewBox: "0 0 512 512"
|
|
129
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Checkmark Circle"), /*#__PURE__*/React__default.createElement("path", {
|
|
130
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
131
|
+
fill: "none",
|
|
132
|
+
stroke: "currentColor",
|
|
133
|
+
strokeMiterlimit: "10",
|
|
134
|
+
strokeWidth: "32"
|
|
135
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
136
|
+
fill: "none",
|
|
137
|
+
stroke: "currentColor",
|
|
138
|
+
strokeLinecap: "round",
|
|
139
|
+
strokeLinejoin: "round",
|
|
140
|
+
strokeWidth: "32",
|
|
141
|
+
d: "M352 176L217.6 336 160 272"
|
|
142
|
+
})),
|
|
143
|
+
close: /*#__PURE__*/React__default.createElement("svg", {
|
|
144
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
145
|
+
className: "ionicon",
|
|
146
|
+
viewBox: "0 0 512 512"
|
|
147
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Close"), /*#__PURE__*/React__default.createElement("path", {
|
|
148
|
+
fill: "none",
|
|
149
|
+
stroke: "currentColor",
|
|
150
|
+
strokeLinecap: "round",
|
|
151
|
+
strokeLinejoin: "round",
|
|
152
|
+
strokeWidth: "32",
|
|
153
|
+
d: "M368 368L144 144M368 144L144 368"
|
|
154
|
+
})),
|
|
155
|
+
closeCircle: /*#__PURE__*/React__default.createElement("svg", {
|
|
156
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
157
|
+
className: "ionicon",
|
|
158
|
+
viewBox: "0 0 512 512"
|
|
159
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Close Circle"), /*#__PURE__*/React__default.createElement("path", {
|
|
160
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
161
|
+
fill: "none",
|
|
162
|
+
stroke: "currentColor",
|
|
163
|
+
strokeMiterlimit: "10",
|
|
164
|
+
strokeWidth: "32"
|
|
165
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
166
|
+
fill: "none",
|
|
167
|
+
stroke: "currentColor",
|
|
168
|
+
strokeLinecap: "round",
|
|
169
|
+
strokeLinejoin: "round",
|
|
170
|
+
strokeWidth: "32",
|
|
171
|
+
d: "M320 320L192 192M192 320l128-128"
|
|
172
|
+
})),
|
|
173
|
+
create: /*#__PURE__*/React__default.createElement("svg", {
|
|
174
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
175
|
+
className: "ionicon",
|
|
176
|
+
viewBox: "0 0 512 512"
|
|
177
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Create"), /*#__PURE__*/React__default.createElement("path", {
|
|
178
|
+
d: "M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48",
|
|
179
|
+
fill: "none",
|
|
180
|
+
stroke: "currentColor",
|
|
181
|
+
strokeLinecap: "round",
|
|
182
|
+
strokeLinejoin: "round",
|
|
183
|
+
strokeWidth: "32"
|
|
184
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
185
|
+
d: "M459.94 53.25a16.06 16.06 0 00-23.22-.56L424.35 65a8 8 0 000 11.31l11.34 11.32a8 8 0 0011.34 0l12.06-12c6.1-6.09 6.67-16.01.85-22.38zM399.34 90L218.82 270.2a9 9 0 00-2.31 3.93L208.16 299a3.91 3.91 0 004.86 4.86l24.85-8.35a9 9 0 003.93-2.31L422 112.66a9 9 0 000-12.66l-9.95-10a9 9 0 00-12.71 0z"
|
|
186
|
+
})),
|
|
187
|
+
download: /*#__PURE__*/React__default.createElement("svg", {
|
|
188
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
189
|
+
className: "ionicon",
|
|
190
|
+
viewBox: "0 0 512 512"
|
|
191
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Download"), /*#__PURE__*/React__default.createElement("path", {
|
|
192
|
+
d: "M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40",
|
|
193
|
+
fill: "none",
|
|
194
|
+
stroke: "currentColor",
|
|
195
|
+
strokeLinecap: "round",
|
|
196
|
+
strokeLinejoin: "round",
|
|
197
|
+
strokeWidth: "32"
|
|
198
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
199
|
+
fill: "none",
|
|
200
|
+
stroke: "currentColor",
|
|
201
|
+
strokeLinecap: "round",
|
|
202
|
+
strokeLinejoin: "round",
|
|
203
|
+
strokeWidth: "32",
|
|
204
|
+
d: "M176 272l80 80 80-80M256 48v288"
|
|
205
|
+
})),
|
|
206
|
+
pencil: /*#__PURE__*/React__default.createElement("svg", {
|
|
207
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
208
|
+
className: "ionicon",
|
|
209
|
+
viewBox: "0 0 512 512"
|
|
210
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Pencil"), /*#__PURE__*/React__default.createElement("path", {
|
|
211
|
+
fill: "none",
|
|
212
|
+
stroke: "currentColor",
|
|
213
|
+
strokeLinecap: "round",
|
|
214
|
+
strokeLinejoin: "round",
|
|
215
|
+
strokeWidth: "32",
|
|
216
|
+
d: "M364.13 125.25L87 403l-23 45 44.99-23 277.76-277.13-22.62-22.62zM420.69 68.69l-22.62 22.62 22.62 22.63 22.62-22.63a16 16 0 000-22.62h0a16 16 0 00-22.62 0z"
|
|
217
|
+
})),
|
|
218
|
+
eye: /*#__PURE__*/React__default.createElement("svg", {
|
|
219
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
220
|
+
className: "ionicon",
|
|
221
|
+
viewBox: "0 0 512 512"
|
|
222
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Eye"), /*#__PURE__*/React__default.createElement("path", {
|
|
223
|
+
d: "M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 00-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 000-17.47C428.89 172.28 347.8 112 255.66 112z",
|
|
224
|
+
fill: "none",
|
|
225
|
+
stroke: "currentColor",
|
|
226
|
+
strokeLinecap: "round",
|
|
227
|
+
strokeLinejoin: "round",
|
|
228
|
+
strokeWidth: "32"
|
|
229
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
230
|
+
cx: "256",
|
|
231
|
+
cy: "256",
|
|
232
|
+
r: "80",
|
|
233
|
+
fill: "none",
|
|
234
|
+
stroke: "currentColor",
|
|
235
|
+
strokeMiterlimit: "10",
|
|
236
|
+
strokeWidth: "32"
|
|
237
|
+
})),
|
|
238
|
+
eyeOff: /*#__PURE__*/React__default.createElement("svg", {
|
|
239
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
240
|
+
className: "ionicon",
|
|
241
|
+
viewBox: "0 0 512 512"
|
|
242
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Eye Off"), /*#__PURE__*/React__default.createElement("path", {
|
|
243
|
+
d: "M432 448a15.92 15.92 0 01-11.31-4.69l-352-352a16 16 0 0122.62-22.62l352 352A16 16 0 01432 448zM255.66 384c-41.49 0-81.5-12.28-118.92-36.5-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 00.14-2.94L93.5 161.38a2 2 0 00-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 00-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0075.8-12.58 2 2 0 00.77-3.31l-21.58-21.58a4 4 0 00-3.83-1 204.8 204.8 0 01-51.16 6.47zM490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 00-74.89 12.83 2 2 0 00-.75 3.31l21.55 21.55a4 4 0 003.88 1 192.82 192.82 0 0150.21-6.69c40.69 0 80.58 12.43 118.55 37 34.71 22.4 65.74 53.88 89.76 91a.13.13 0 010 .16 310.72 310.72 0 01-64.12 72.73 2 2 0 00-.15 2.95l19.9 19.89a2 2 0 002.7.13 343.49 343.49 0 0068.64-78.48 32.2 32.2 0 00-.1-34.78z"
|
|
244
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
245
|
+
d: "M256 160a95.88 95.88 0 00-21.37 2.4 2 2 0 00-1 3.38l112.59 112.56a2 2 0 003.38-1A96 96 0 00256 160zM165.78 233.66a2 2 0 00-3.38 1 96 96 0 00115 115 2 2 0 001-3.38z"
|
|
246
|
+
})),
|
|
247
|
+
file: /*#__PURE__*/React__default.createElement("svg", {
|
|
248
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
249
|
+
className: "ionicon",
|
|
250
|
+
viewBox: "0 0 512 512"
|
|
251
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Document"), /*#__PURE__*/React__default.createElement("path", {
|
|
252
|
+
d: "M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z",
|
|
253
|
+
fill: "none",
|
|
254
|
+
stroke: "currentColor",
|
|
255
|
+
strokeLinejoin: "round",
|
|
256
|
+
strokeWidth: "32"
|
|
257
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
258
|
+
d: "M256 56v120a32 32 0 0032 32h120",
|
|
259
|
+
fill: "none",
|
|
260
|
+
stroke: "currentColor",
|
|
261
|
+
strokeLinecap: "round",
|
|
262
|
+
strokeLinejoin: "round",
|
|
263
|
+
strokeWidth: "32"
|
|
264
|
+
})),
|
|
265
|
+
fitness: /*#__PURE__*/React__default.createElement("svg", {
|
|
266
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
267
|
+
className: "ionicon",
|
|
268
|
+
viewBox: "0 0 512 512"
|
|
269
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Fitness"), /*#__PURE__*/React__default.createElement("path", {
|
|
270
|
+
d: "M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0018 0c96.26-65.34 184.09-143.09 183-252.42-.54-52.67-42.32-96.81-95.08-96.81z",
|
|
271
|
+
fill: "none",
|
|
272
|
+
stroke: "currentColor",
|
|
273
|
+
strokeLinecap: "round",
|
|
274
|
+
strokeLinejoin: "round",
|
|
275
|
+
strokeWidth: "32"
|
|
276
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
277
|
+
fill: "none",
|
|
278
|
+
stroke: "currentColor",
|
|
279
|
+
strokeLinecap: "round",
|
|
280
|
+
strokeLinejoin: "round",
|
|
281
|
+
strokeWidth: "32",
|
|
282
|
+
d: "M48 256h112l48-96 48 160 48-96 32 64h128"
|
|
283
|
+
})),
|
|
284
|
+
helpCircle: /*#__PURE__*/React__default.createElement("svg", {
|
|
285
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
286
|
+
className: "ionicon",
|
|
287
|
+
viewBox: "0 0 512 512"
|
|
288
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Help Circle"), /*#__PURE__*/React__default.createElement("path", {
|
|
289
|
+
d: "M256 80a176 176 0 10176 176A176 176 0 00256 80z",
|
|
290
|
+
fill: "none",
|
|
291
|
+
stroke: "currentColor",
|
|
292
|
+
strokeMiterlimit: "10",
|
|
293
|
+
strokeWidth: "32"
|
|
294
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
295
|
+
d: "M200 202.29s.84-17.5 19.57-32.57C230.68 160.77 244 158.18 256 158c10.93-.14 20.69 1.67 26.53 4.45 10 4.76 29.47 16.38 29.47 41.09 0 26-17 37.81-36.37 50.8S251 281.43 251 296",
|
|
296
|
+
fill: "none",
|
|
297
|
+
stroke: "currentColor",
|
|
298
|
+
strokeLinecap: "round",
|
|
299
|
+
strokeMiterlimit: "10",
|
|
300
|
+
strokeWidth: "28"
|
|
301
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
302
|
+
cx: "250",
|
|
303
|
+
cy: "348",
|
|
304
|
+
r: "20"
|
|
305
|
+
})),
|
|
306
|
+
home: /*#__PURE__*/React__default.createElement("svg", {
|
|
307
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
308
|
+
className: "ionicon",
|
|
309
|
+
viewBox: "0 0 512 512"
|
|
310
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Home"), /*#__PURE__*/React__default.createElement("path", {
|
|
311
|
+
d: "M80 212v236a16 16 0 0016 16h96V328a24 24 0 0124-24h80a24 24 0 0124 24v136h96a16 16 0 0016-16V212",
|
|
312
|
+
fill: "none",
|
|
313
|
+
stroke: "currentColor",
|
|
314
|
+
strokeLinecap: "round",
|
|
315
|
+
strokeLinejoin: "round",
|
|
316
|
+
strokeWidth: "32"
|
|
317
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
318
|
+
d: "M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256M400 179V64h-48v69",
|
|
319
|
+
fill: "none",
|
|
320
|
+
stroke: "currentColor",
|
|
321
|
+
strokeLinecap: "round",
|
|
322
|
+
strokeLinejoin: "round",
|
|
323
|
+
strokeWidth: "32"
|
|
324
|
+
})),
|
|
325
|
+
hourGlass: /*#__PURE__*/React__default.createElement("svg", {
|
|
326
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
327
|
+
className: "ionicon",
|
|
328
|
+
viewBox: "0 0 512 512"
|
|
329
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Hourglass"), /*#__PURE__*/React__default.createElement("path", {
|
|
330
|
+
d: "M145.61 464h220.78c19.8 0 35.55-16.29 33.42-35.06C386.06 308 304 310 304 256s83.11-51 95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8 0-35.37 16.28-33.41 35.06C124.89 205 208 201 208 256s-82.06 52-95.8 172.94c-2.14 18.77 13.61 35.06 33.41 35.06z",
|
|
331
|
+
fill: "none",
|
|
332
|
+
stroke: "currentColor",
|
|
333
|
+
strokeLinecap: "round",
|
|
334
|
+
strokeLinejoin: "round",
|
|
335
|
+
strokeWidth: "32"
|
|
336
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
337
|
+
d: "M343.3 432H169.13c-15.6 0-20-18-9.06-29.16C186.55 376 240 356.78 240 326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8 6.37-12.8h142.73c8.41 0 10.23 7.43 6.4 12.75C310.82 189 272 204.05 272 224v102c0 30.53 55.71 47 80.4 76.87 9.95 12.04 6.47 29.13-9.1 29.13z"
|
|
338
|
+
})),
|
|
339
|
+
logout: /*#__PURE__*/React__default.createElement("svg", {
|
|
340
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
341
|
+
className: "ionicon",
|
|
342
|
+
viewBox: "0 0 512 512"
|
|
343
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Log Out"), /*#__PURE__*/React__default.createElement("path", {
|
|
344
|
+
d: "M304 336v40a40 40 0 01-40 40H104a40 40 0 01-40-40V136a40 40 0 0140-40h152c22.09 0 48 17.91 48 40v40M368 336l80-80-80-80M176 256h256",
|
|
345
|
+
fill: "none",
|
|
346
|
+
stroke: "currentColor",
|
|
347
|
+
strokeLinecap: "round",
|
|
348
|
+
strokeLinejoin: "round",
|
|
349
|
+
strokeWidth: "32"
|
|
350
|
+
})),
|
|
351
|
+
megaphone: /*#__PURE__*/React__default.createElement("svg", {
|
|
352
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
353
|
+
className: "ionicon",
|
|
354
|
+
viewBox: "0 0 512 512"
|
|
355
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Megaphone"), /*#__PURE__*/React__default.createElement("path", {
|
|
356
|
+
d: "M407.94 52.22S321.3 160 240 160H80a16 16 0 00-16 16v96a16 16 0 0016 16h160c81.3 0 167.94 108.23 167.94 108.23 6.06 8 24.06 2.52 24.06-9.83V62c0-12.31-17-18.82-24.06-9.78zM64 256s-16-6-16-32 16-32 16-32M448 246s16-4.33 16-22-16-22-16-22M256 160v128M112 160v128",
|
|
357
|
+
fill: "none",
|
|
358
|
+
stroke: "currentColor",
|
|
359
|
+
strokeLinecap: "round",
|
|
360
|
+
strokeLinejoin: "round",
|
|
361
|
+
strokeWidth: "32"
|
|
362
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
363
|
+
d: "M144 288v168a8 8 0 008 8h53a16 16 0 0015.29-20.73C211.91 416.39 192 386.08 192 336h16a16 16 0 0016-16v-16a16 16 0 00-16-16h-16",
|
|
364
|
+
fill: "none",
|
|
365
|
+
stroke: "currentColor",
|
|
366
|
+
strokeLinecap: "round",
|
|
367
|
+
strokeLinejoin: "round",
|
|
368
|
+
strokeWidth: "32"
|
|
369
|
+
})),
|
|
370
|
+
menu: /*#__PURE__*/React__default.createElement("svg", {
|
|
371
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
372
|
+
className: "ionicon",
|
|
373
|
+
viewBox: "0 0 512 512"
|
|
374
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Menu"), /*#__PURE__*/React__default.createElement("path", {
|
|
375
|
+
fill: "none",
|
|
376
|
+
stroke: "currentColor",
|
|
377
|
+
strokeLinecap: "round",
|
|
378
|
+
strokeMiterlimit: "10",
|
|
379
|
+
strokeWidth: "32",
|
|
380
|
+
d: "M80 160h352M80 256h352M80 352h352"
|
|
381
|
+
})),
|
|
382
|
+
options: /*#__PURE__*/React__default.createElement("svg", {
|
|
383
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
384
|
+
className: "ionicon",
|
|
385
|
+
viewBox: "0 0 512 512"
|
|
386
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Options"), /*#__PURE__*/React__default.createElement("path", {
|
|
387
|
+
fill: "none",
|
|
388
|
+
stroke: "currentColor",
|
|
389
|
+
strokeLinecap: "round",
|
|
390
|
+
strokeLinejoin: "round",
|
|
391
|
+
strokeWidth: "32",
|
|
392
|
+
d: "M368 128h80M64 128h240M368 384h80M64 384h240M208 256h240M64 256h80"
|
|
393
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
394
|
+
cx: "336",
|
|
395
|
+
cy: "128",
|
|
396
|
+
r: "32",
|
|
397
|
+
fill: "none",
|
|
398
|
+
stroke: "currentColor",
|
|
399
|
+
strokeLinecap: "round",
|
|
400
|
+
strokeLinejoin: "round",
|
|
401
|
+
strokeWidth: "32"
|
|
402
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
403
|
+
cx: "176",
|
|
404
|
+
cy: "256",
|
|
405
|
+
r: "32",
|
|
406
|
+
fill: "none",
|
|
407
|
+
stroke: "currentColor",
|
|
408
|
+
strokeLinecap: "round",
|
|
409
|
+
strokeLinejoin: "round",
|
|
410
|
+
strokeWidth: "32"
|
|
411
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
412
|
+
cx: "336",
|
|
413
|
+
cy: "384",
|
|
414
|
+
r: "32",
|
|
415
|
+
fill: "none",
|
|
416
|
+
stroke: "currentColor",
|
|
417
|
+
strokeLinecap: "round",
|
|
418
|
+
strokeLinejoin: "round",
|
|
419
|
+
strokeWidth: "32"
|
|
420
|
+
})),
|
|
421
|
+
pauseCircle: /*#__PURE__*/React__default.createElement("svg", {
|
|
422
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
423
|
+
className: "ionicon",
|
|
424
|
+
viewBox: "0 0 512 512"
|
|
425
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Pause Circle"), /*#__PURE__*/React__default.createElement("path", {
|
|
426
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
427
|
+
fill: "none",
|
|
428
|
+
stroke: "currentColor",
|
|
429
|
+
strokeMiterlimit: "10",
|
|
430
|
+
strokeWidth: "32"
|
|
431
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
432
|
+
fill: "none",
|
|
433
|
+
stroke: "currentColor",
|
|
434
|
+
strokeLinecap: "round",
|
|
435
|
+
strokeMiterlimit: "10",
|
|
436
|
+
strokeWidth: "32",
|
|
437
|
+
d: "M208 192v128M304 192v128"
|
|
438
|
+
})),
|
|
439
|
+
personCircle: /*#__PURE__*/React__default.createElement("svg", {
|
|
440
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
441
|
+
className: "ionicon",
|
|
442
|
+
viewBox: "0 0 512 512"
|
|
443
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Person Circle"), /*#__PURE__*/React__default.createElement("path", {
|
|
444
|
+
d: "M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1 117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48zm126.42 327.25a4 4 0 01-6.14-.32 124.27 124.27 0 00-32.35-29.59C321.37 329 289.11 320 256 320s-65.37 9-90.83 25.34a124.24 124.24 0 00-32.35 29.58 4 4 0 01-6.14.32A175.32 175.32 0 0180 259c-1.63-97.31 78.22-178.76 175.57-179S432 158.81 432 256a175.32 175.32 0 01-46.68 119.25z"
|
|
445
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
446
|
+
d: "M256 144c-19.72 0-37.55 7.39-50.22 20.82s-19 32-17.57 51.93C191.11 256 221.52 288 256 288s64.83-32 67.79-71.24c1.48-19.74-4.8-38.14-17.68-51.82C293.39 151.44 275.59 144 256 144z"
|
|
447
|
+
})),
|
|
448
|
+
playCircle: /*#__PURE__*/React__default.createElement("svg", {
|
|
449
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
450
|
+
className: "ionicon",
|
|
451
|
+
viewBox: "0 0 512 512"
|
|
452
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Play Circle"), /*#__PURE__*/React__default.createElement("path", {
|
|
453
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
454
|
+
fill: "none",
|
|
455
|
+
stroke: "currentColor",
|
|
456
|
+
strokeMiterlimit: "10",
|
|
457
|
+
strokeWidth: "32"
|
|
458
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
459
|
+
d: "M216.32 334.44l114.45-69.14a10.89 10.89 0 000-18.6l-114.45-69.14a10.78 10.78 0 00-16.32 9.31v138.26a10.78 10.78 0 0016.32 9.31z"
|
|
460
|
+
})),
|
|
461
|
+
pulse: /*#__PURE__*/React__default.createElement("svg", {
|
|
462
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
463
|
+
className: "ionicon",
|
|
464
|
+
viewBox: "0 0 512 512"
|
|
465
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Pulse"), /*#__PURE__*/React__default.createElement("path", {
|
|
466
|
+
fill: "none",
|
|
467
|
+
stroke: "currentColor",
|
|
468
|
+
strokeLinecap: "round",
|
|
469
|
+
strokeLinejoin: "round",
|
|
470
|
+
strokeWidth: "32",
|
|
471
|
+
d: "M48 320h64l64-256 64 384 64-224 32 96h64"
|
|
472
|
+
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
473
|
+
cx: "432",
|
|
474
|
+
cy: "320",
|
|
475
|
+
r: "32",
|
|
476
|
+
fill: "none",
|
|
477
|
+
stroke: "currentColor",
|
|
478
|
+
strokeLinecap: "round",
|
|
479
|
+
strokeLinejoin: "round",
|
|
480
|
+
strokeWidth: "32"
|
|
481
|
+
})),
|
|
482
|
+
receipt: /*#__PURE__*/React__default.createElement("svg", {
|
|
483
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
484
|
+
className: "ionicon",
|
|
485
|
+
viewBox: "0 0 512 512"
|
|
486
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Receipt"), /*#__PURE__*/React__default.createElement("path", {
|
|
487
|
+
fill: "none",
|
|
488
|
+
stroke: "currentColor",
|
|
489
|
+
strokeLinejoin: "round",
|
|
490
|
+
strokeWidth: "32",
|
|
491
|
+
d: "M160 336V48l32 16 32-16 31.94 16 32.37-16L320 64l31.79-16 31.93 16L416 48l32.01 16L480 48v224"
|
|
492
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
493
|
+
d: "M480 272v112a80 80 0 01-80 80h0a80 80 0 01-80-80v-48H48a15.86 15.86 0 00-16 16c0 64 6.74 112 80 112h288",
|
|
494
|
+
fill: "none",
|
|
495
|
+
stroke: "currentColor",
|
|
496
|
+
strokeLinejoin: "round",
|
|
497
|
+
strokeWidth: "32"
|
|
498
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
499
|
+
fill: "none",
|
|
500
|
+
stroke: "currentColor",
|
|
501
|
+
strokeLinecap: "round",
|
|
502
|
+
strokeLinejoin: "round",
|
|
503
|
+
strokeWidth: "32",
|
|
504
|
+
d: "M224 144h192M288 224h128"
|
|
505
|
+
})),
|
|
506
|
+
settings: /*#__PURE__*/React__default.createElement("svg", {
|
|
507
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
508
|
+
className: "ionicon",
|
|
509
|
+
viewBox: "0 0 512 512"
|
|
510
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Settings"), /*#__PURE__*/React__default.createElement("path", {
|
|
511
|
+
d: "M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4zM416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z",
|
|
512
|
+
fill: "none",
|
|
513
|
+
stroke: "currentColor",
|
|
514
|
+
strokeLinecap: "round",
|
|
515
|
+
strokeLinejoin: "round",
|
|
516
|
+
strokeWidth: "32"
|
|
517
|
+
})),
|
|
518
|
+
trash: /*#__PURE__*/React__default.createElement("svg", {
|
|
519
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
520
|
+
className: "ionicon",
|
|
521
|
+
viewBox: "0 0 512 512"
|
|
522
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Trash"), /*#__PURE__*/React__default.createElement("path", {
|
|
523
|
+
d: "M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320",
|
|
524
|
+
fill: "none",
|
|
525
|
+
stroke: "currentColor",
|
|
526
|
+
strokeLinecap: "round",
|
|
527
|
+
strokeLinejoin: "round",
|
|
528
|
+
strokeWidth: "32"
|
|
529
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
530
|
+
stroke: "currentColor",
|
|
531
|
+
strokeLinecap: "round",
|
|
532
|
+
strokeMiterlimit: "10",
|
|
533
|
+
strokeWidth: "32",
|
|
534
|
+
d: "M80 112h352"
|
|
535
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
536
|
+
d: "M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224",
|
|
537
|
+
fill: "none",
|
|
538
|
+
stroke: "currentColor",
|
|
539
|
+
strokeLinecap: "round",
|
|
540
|
+
strokeLinejoin: "round",
|
|
541
|
+
strokeWidth: "32"
|
|
542
|
+
}))
|
|
402
543
|
};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
412
|
-
|
|
413
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
414
|
-
|
|
415
|
-
var printWarning = function() {};
|
|
416
|
-
|
|
417
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
418
|
-
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
419
|
-
var loggedTypeFailures = {};
|
|
420
|
-
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
421
|
-
|
|
422
|
-
printWarning = function(text) {
|
|
423
|
-
var message = 'Warning: ' + text;
|
|
424
|
-
if (typeof console !== 'undefined') {
|
|
425
|
-
console.error(message);
|
|
426
|
-
}
|
|
427
|
-
try {
|
|
428
|
-
// --- Welcome to debugging React ---
|
|
429
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
430
|
-
// to find the callsite that caused this warning to fire.
|
|
431
|
-
throw new Error(message);
|
|
432
|
-
} catch (x) {}
|
|
544
|
+
function GoAIcon(_ref) {
|
|
545
|
+
var type = _ref.type,
|
|
546
|
+
_ref$size = _ref.size,
|
|
547
|
+
size = _ref$size === void 0 ? 'small' : _ref$size;
|
|
548
|
+
var pxSize = getSize(size);
|
|
549
|
+
var styles = {
|
|
550
|
+
width: "".concat(pxSize, "px"),
|
|
551
|
+
height: "".concat(pxSize, "px")
|
|
433
552
|
};
|
|
553
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
554
|
+
className: "goa-icon",
|
|
555
|
+
style: styles,
|
|
556
|
+
"data-testid": "icon-".concat(type)
|
|
557
|
+
}, Icons[type]);
|
|
434
558
|
}
|
|
435
559
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
441
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
442
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
443
|
-
* @param {string} componentName Name of the component for error messages.
|
|
444
|
-
* @param {?Function} getStack Returns the component stack.
|
|
445
|
-
* @private
|
|
446
|
-
*/
|
|
447
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
448
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
449
|
-
for (var typeSpecName in typeSpecs) {
|
|
450
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
451
|
-
var error;
|
|
452
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
453
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
454
|
-
// After these have been cleaned up, we'll let them throw.
|
|
455
|
-
try {
|
|
456
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
457
|
-
// behavior as without this statement except with a better message.
|
|
458
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
459
|
-
var err = Error(
|
|
460
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
461
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
462
|
-
);
|
|
463
|
-
err.name = 'Invariant Violation';
|
|
464
|
-
throw err;
|
|
465
|
-
}
|
|
466
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
|
467
|
-
} catch (ex) {
|
|
468
|
-
error = ex;
|
|
469
|
-
}
|
|
470
|
-
if (error && !(error instanceof Error)) {
|
|
471
|
-
printWarning(
|
|
472
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
473
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
474
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
475
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
476
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
477
|
-
'shape all require an argument).'
|
|
478
|
-
);
|
|
479
|
-
}
|
|
480
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
481
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
482
|
-
// same error.
|
|
483
|
-
loggedTypeFailures[error.message] = true;
|
|
560
|
+
function getSize(size) {
|
|
561
|
+
switch (size) {
|
|
562
|
+
case 'small':
|
|
563
|
+
return 24;
|
|
484
564
|
|
|
485
|
-
|
|
565
|
+
case 'medium':
|
|
566
|
+
return 32;
|
|
486
567
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
568
|
+
case 'large':
|
|
569
|
+
return 48;
|
|
493
570
|
}
|
|
494
571
|
}
|
|
495
572
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
var message = 'Warning: ' + text;
|
|
515
|
-
if (typeof console !== 'undefined') {
|
|
516
|
-
console.error(message);
|
|
517
|
-
}
|
|
518
|
-
try {
|
|
519
|
-
// --- Welcome to debugging React ---
|
|
520
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
521
|
-
// to find the callsite that caused this warning to fire.
|
|
522
|
-
throw new Error(message);
|
|
523
|
-
} catch (x) {}
|
|
524
|
-
};
|
|
573
|
+
function GoAIconButton(_ref) {
|
|
574
|
+
var type = _ref.type,
|
|
575
|
+
_ref$variant = _ref.variant,
|
|
576
|
+
variant = _ref$variant === void 0 ? 'goa' : _ref$variant,
|
|
577
|
+
onClick = _ref.onClick,
|
|
578
|
+
_ref$size = _ref.size,
|
|
579
|
+
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
580
|
+
title = _ref.title,
|
|
581
|
+
testId = _ref.testId;
|
|
582
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
583
|
+
title: title,
|
|
584
|
+
className: "goa-icon-button goa-icon-button-".concat(variant),
|
|
585
|
+
"data-testid": testId,
|
|
586
|
+
onClick: onClick
|
|
587
|
+
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
588
|
+
type: type,
|
|
589
|
+
size: size
|
|
590
|
+
}));
|
|
525
591
|
}
|
|
526
592
|
|
|
527
|
-
function
|
|
528
|
-
return
|
|
593
|
+
function _slicedToArray(arr, i) {
|
|
594
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
529
595
|
}
|
|
530
596
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Returns the iterator method function contained on the iterable object.
|
|
538
|
-
*
|
|
539
|
-
* Be sure to invoke the function with the iterable as context:
|
|
540
|
-
*
|
|
541
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
542
|
-
* if (iteratorFn) {
|
|
543
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
544
|
-
* ...
|
|
545
|
-
* }
|
|
546
|
-
*
|
|
547
|
-
* @param {?object} maybeIterable
|
|
548
|
-
* @return {?function}
|
|
549
|
-
*/
|
|
550
|
-
function getIteratorFn(maybeIterable) {
|
|
551
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
552
|
-
if (typeof iteratorFn === 'function') {
|
|
553
|
-
return iteratorFn;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
559
|
-
* supplied to React components. Example usage:
|
|
560
|
-
*
|
|
561
|
-
* var Props = require('ReactPropTypes');
|
|
562
|
-
* var MyArticle = React.createClass({
|
|
563
|
-
* propTypes: {
|
|
564
|
-
* // An optional string prop named "description".
|
|
565
|
-
* description: Props.string,
|
|
566
|
-
*
|
|
567
|
-
* // A required enum prop named "category".
|
|
568
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
569
|
-
*
|
|
570
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
571
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
572
|
-
* },
|
|
573
|
-
* render: function() { ... }
|
|
574
|
-
* });
|
|
575
|
-
*
|
|
576
|
-
* A more formal specification of how these methods are used:
|
|
577
|
-
*
|
|
578
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
579
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
580
|
-
*
|
|
581
|
-
* Each and every declaration produces a function with the same signature. This
|
|
582
|
-
* allows the creation of custom validation functions. For example:
|
|
583
|
-
*
|
|
584
|
-
* var MyLink = React.createClass({
|
|
585
|
-
* propTypes: {
|
|
586
|
-
* // An optional string or URI prop named "href".
|
|
587
|
-
* href: function(props, propName, componentName) {
|
|
588
|
-
* var propValue = props[propName];
|
|
589
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
590
|
-
* !(propValue instanceof URI)) {
|
|
591
|
-
* return new Error(
|
|
592
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
593
|
-
* componentName
|
|
594
|
-
* );
|
|
595
|
-
* }
|
|
596
|
-
* }
|
|
597
|
-
* },
|
|
598
|
-
* render: function() {...}
|
|
599
|
-
* });
|
|
600
|
-
*
|
|
601
|
-
* @internal
|
|
602
|
-
*/
|
|
603
|
-
|
|
604
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
605
|
-
|
|
606
|
-
// Important!
|
|
607
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
608
|
-
var ReactPropTypes = {
|
|
609
|
-
array: createPrimitiveTypeChecker('array'),
|
|
610
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
611
|
-
func: createPrimitiveTypeChecker('function'),
|
|
612
|
-
number: createPrimitiveTypeChecker('number'),
|
|
613
|
-
object: createPrimitiveTypeChecker('object'),
|
|
614
|
-
string: createPrimitiveTypeChecker('string'),
|
|
615
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
597
|
+
function _arrayWithHoles(arr) {
|
|
598
|
+
if (Array.isArray(arr)) return arr;
|
|
599
|
+
}
|
|
616
600
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
objectOf: createObjectOfTypeChecker,
|
|
624
|
-
oneOf: createEnumTypeChecker,
|
|
625
|
-
oneOfType: createUnionTypeChecker,
|
|
626
|
-
shape: createShapeTypeChecker,
|
|
627
|
-
exact: createStrictShapeTypeChecker,
|
|
628
|
-
};
|
|
601
|
+
function _iterableToArrayLimit(arr, i) {
|
|
602
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
603
|
+
var _arr = [];
|
|
604
|
+
var _n = true;
|
|
605
|
+
var _d = false;
|
|
606
|
+
var _e = undefined;
|
|
629
607
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
608
|
+
try {
|
|
609
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
610
|
+
_arr.push(_s.value);
|
|
611
|
+
|
|
612
|
+
if (i && _arr.length === i) break;
|
|
613
|
+
}
|
|
614
|
+
} catch (err) {
|
|
615
|
+
_d = true;
|
|
616
|
+
_e = err;
|
|
617
|
+
} finally {
|
|
618
|
+
try {
|
|
619
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
620
|
+
} finally {
|
|
621
|
+
if (_d) throw _e;
|
|
644
622
|
}
|
|
645
623
|
}
|
|
646
|
-
/*eslint-enable no-self-compare*/
|
|
647
624
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
651
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
652
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
653
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
654
|
-
*/
|
|
655
|
-
function PropTypeError(message) {
|
|
656
|
-
this.message = message;
|
|
657
|
-
this.stack = '';
|
|
658
|
-
}
|
|
659
|
-
// Make `instanceof Error` still work for returned errors.
|
|
660
|
-
PropTypeError.prototype = Error.prototype;
|
|
625
|
+
return _arr;
|
|
626
|
+
}
|
|
661
627
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
628
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
629
|
+
if (!o) return;
|
|
630
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
631
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
632
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
633
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
634
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
635
|
+
}
|
|
670
636
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
// New behavior only for users of `prop-types` package
|
|
674
|
-
var err = new Error(
|
|
675
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
676
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
677
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
678
|
-
);
|
|
679
|
-
err.name = 'Invariant Violation';
|
|
680
|
-
throw err;
|
|
681
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
682
|
-
// Old behavior for people using React.PropTypes
|
|
683
|
-
var cacheKey = componentName + ':' + propName;
|
|
684
|
-
if (
|
|
685
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
686
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
687
|
-
manualPropTypeWarningCount < 3
|
|
688
|
-
) {
|
|
689
|
-
printWarning$1(
|
|
690
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
691
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
692
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
693
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
694
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
695
|
-
);
|
|
696
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
697
|
-
manualPropTypeWarningCount++;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
if (props[propName] == null) {
|
|
702
|
-
if (isRequired) {
|
|
703
|
-
if (props[propName] === null) {
|
|
704
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
705
|
-
}
|
|
706
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
707
|
-
}
|
|
708
|
-
return null;
|
|
709
|
-
} else {
|
|
710
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
637
|
+
function _arrayLikeToArray(arr, len) {
|
|
638
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
713
639
|
|
|
714
|
-
|
|
715
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
640
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
716
641
|
|
|
717
|
-
|
|
718
|
-
|
|
642
|
+
return arr2;
|
|
643
|
+
}
|
|
719
644
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
var propType = getPropType(propValue);
|
|
724
|
-
if (propType !== expectedType) {
|
|
725
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
726
|
-
// check, but we can offer a more precise error message here rather than
|
|
727
|
-
// 'of type `object`'.
|
|
728
|
-
var preciseType = getPreciseType(propValue);
|
|
645
|
+
function _nonIterableRest() {
|
|
646
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
647
|
+
}
|
|
729
648
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
return createChainableTypeChecker(validate);
|
|
735
|
-
}
|
|
649
|
+
function createCommonjsModule(fn, module) {
|
|
650
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
651
|
+
}
|
|
736
652
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
653
|
+
/** @license React v16.13.1
|
|
654
|
+
* react-is.production.min.js
|
|
655
|
+
*
|
|
656
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
657
|
+
*
|
|
658
|
+
* This source code is licensed under the MIT license found in the
|
|
659
|
+
* LICENSE file in the root directory of this source tree.
|
|
660
|
+
*/
|
|
661
|
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
662
|
+
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
663
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
664
|
+
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
665
|
+
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
666
|
+
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
740
667
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
668
|
+
var reactIs_production_min = {
|
|
669
|
+
AsyncMode: AsyncMode,
|
|
670
|
+
ConcurrentMode: ConcurrentMode,
|
|
671
|
+
ContextConsumer: ContextConsumer,
|
|
672
|
+
ContextProvider: ContextProvider,
|
|
673
|
+
Element: Element,
|
|
674
|
+
ForwardRef: ForwardRef,
|
|
675
|
+
Fragment: Fragment,
|
|
676
|
+
Lazy: Lazy,
|
|
677
|
+
Memo: Memo,
|
|
678
|
+
Portal: Portal,
|
|
679
|
+
Profiler: Profiler,
|
|
680
|
+
StrictMode: StrictMode,
|
|
681
|
+
Suspense: Suspense,
|
|
682
|
+
isAsyncMode: isAsyncMode,
|
|
683
|
+
isConcurrentMode: isConcurrentMode,
|
|
684
|
+
isContextConsumer: isContextConsumer,
|
|
685
|
+
isContextProvider: isContextProvider,
|
|
686
|
+
isElement: isElement,
|
|
687
|
+
isForwardRef: isForwardRef,
|
|
688
|
+
isFragment: isFragment,
|
|
689
|
+
isLazy: isLazy,
|
|
690
|
+
isMemo: isMemo,
|
|
691
|
+
isPortal: isPortal,
|
|
692
|
+
isProfiler: isProfiler,
|
|
693
|
+
isStrictMode: isStrictMode,
|
|
694
|
+
isSuspense: isSuspense,
|
|
695
|
+
isValidElementType: isValidElementType,
|
|
696
|
+
typeOf: typeOf
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
var reactIs_development = createCommonjsModule(function (module, exports) {
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
if (process.env.NODE_ENV !== "production") {
|
|
704
|
+
(function() {
|
|
705
|
+
|
|
706
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
707
|
+
// nor polyfill, then a plain number is used for performance.
|
|
708
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
709
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
710
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
711
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
712
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
713
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
714
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
715
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
716
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
717
|
+
|
|
718
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
719
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
720
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
721
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
722
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
723
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
724
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
725
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
726
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
727
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
728
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
729
|
+
|
|
730
|
+
function isValidElementType(type) {
|
|
731
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
732
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
function typeOf(object) {
|
|
736
|
+
if (typeof object === 'object' && object !== null) {
|
|
737
|
+
var $$typeof = object.$$typeof;
|
|
761
738
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
if (!isValidElement(propValue)) {
|
|
766
|
-
var propType = getPropType(propValue);
|
|
767
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
768
|
-
}
|
|
769
|
-
return null;
|
|
770
|
-
}
|
|
771
|
-
return createChainableTypeChecker(validate);
|
|
772
|
-
}
|
|
739
|
+
switch ($$typeof) {
|
|
740
|
+
case REACT_ELEMENT_TYPE:
|
|
741
|
+
var type = object.type;
|
|
773
742
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
783
|
-
return createChainableTypeChecker(validate);
|
|
784
|
-
}
|
|
743
|
+
switch (type) {
|
|
744
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
745
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
746
|
+
case REACT_FRAGMENT_TYPE:
|
|
747
|
+
case REACT_PROFILER_TYPE:
|
|
748
|
+
case REACT_STRICT_MODE_TYPE:
|
|
749
|
+
case REACT_SUSPENSE_TYPE:
|
|
750
|
+
return type;
|
|
785
751
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
789
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
790
|
-
var actualClassName = getClassName(props[propName]);
|
|
791
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
792
|
-
}
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
|
-
return createChainableTypeChecker(validate);
|
|
796
|
-
}
|
|
752
|
+
default:
|
|
753
|
+
var $$typeofType = type && type.$$typeof;
|
|
797
754
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
);
|
|
806
|
-
} else {
|
|
807
|
-
printWarning$1('Invalid argument supplied to oneOf, expected an array.');
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
return emptyFunctionThatReturnsNull;
|
|
811
|
-
}
|
|
755
|
+
switch ($$typeofType) {
|
|
756
|
+
case REACT_CONTEXT_TYPE:
|
|
757
|
+
case REACT_FORWARD_REF_TYPE:
|
|
758
|
+
case REACT_LAZY_TYPE:
|
|
759
|
+
case REACT_MEMO_TYPE:
|
|
760
|
+
case REACT_PROVIDER_TYPE:
|
|
761
|
+
return $$typeofType;
|
|
812
762
|
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
if (is(propValue, expectedValues[i])) {
|
|
817
|
-
return null;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
763
|
+
default:
|
|
764
|
+
return $$typeof;
|
|
765
|
+
}
|
|
820
766
|
|
|
821
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
822
|
-
var type = getPreciseType(value);
|
|
823
|
-
if (type === 'symbol') {
|
|
824
|
-
return String(value);
|
|
825
767
|
}
|
|
826
|
-
return value;
|
|
827
|
-
});
|
|
828
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
829
|
-
}
|
|
830
|
-
return createChainableTypeChecker(validate);
|
|
831
|
-
}
|
|
832
768
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
if (typeof typeChecker !== 'function') {
|
|
836
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
837
|
-
}
|
|
838
|
-
var propValue = props[propName];
|
|
839
|
-
var propType = getPropType(propValue);
|
|
840
|
-
if (propType !== 'object') {
|
|
841
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
842
|
-
}
|
|
843
|
-
for (var key in propValue) {
|
|
844
|
-
if (has$1(propValue, key)) {
|
|
845
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
846
|
-
if (error instanceof Error) {
|
|
847
|
-
return error;
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
return null;
|
|
769
|
+
case REACT_PORTAL_TYPE:
|
|
770
|
+
return $$typeof;
|
|
852
771
|
}
|
|
853
|
-
return createChainableTypeChecker(validate);
|
|
854
772
|
}
|
|
855
773
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
859
|
-
return emptyFunctionThatReturnsNull;
|
|
860
|
-
}
|
|
774
|
+
return undefined;
|
|
775
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
861
776
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
777
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
778
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
779
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
780
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
781
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
782
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
783
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
784
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
785
|
+
var Memo = REACT_MEMO_TYPE;
|
|
786
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
787
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
788
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
789
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
790
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
872
791
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
return null;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
792
|
+
function isAsyncMode(object) {
|
|
793
|
+
{
|
|
794
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
795
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
880
796
|
|
|
881
|
-
|
|
797
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
882
798
|
}
|
|
883
|
-
return createChainableTypeChecker(validate);
|
|
884
799
|
}
|
|
885
800
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
801
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
802
|
+
}
|
|
803
|
+
function isConcurrentMode(object) {
|
|
804
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
805
|
+
}
|
|
806
|
+
function isContextConsumer(object) {
|
|
807
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
808
|
+
}
|
|
809
|
+
function isContextProvider(object) {
|
|
810
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
811
|
+
}
|
|
812
|
+
function isElement(object) {
|
|
813
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
814
|
+
}
|
|
815
|
+
function isForwardRef(object) {
|
|
816
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
817
|
+
}
|
|
818
|
+
function isFragment(object) {
|
|
819
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
820
|
+
}
|
|
821
|
+
function isLazy(object) {
|
|
822
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
823
|
+
}
|
|
824
|
+
function isMemo(object) {
|
|
825
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
826
|
+
}
|
|
827
|
+
function isPortal(object) {
|
|
828
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
829
|
+
}
|
|
830
|
+
function isProfiler(object) {
|
|
831
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
832
|
+
}
|
|
833
|
+
function isStrictMode(object) {
|
|
834
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
835
|
+
}
|
|
836
|
+
function isSuspense(object) {
|
|
837
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
838
|
+
}
|
|
895
839
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
840
|
+
exports.AsyncMode = AsyncMode;
|
|
841
|
+
exports.ConcurrentMode = ConcurrentMode;
|
|
842
|
+
exports.ContextConsumer = ContextConsumer;
|
|
843
|
+
exports.ContextProvider = ContextProvider;
|
|
844
|
+
exports.Element = Element;
|
|
845
|
+
exports.ForwardRef = ForwardRef;
|
|
846
|
+
exports.Fragment = Fragment;
|
|
847
|
+
exports.Lazy = Lazy;
|
|
848
|
+
exports.Memo = Memo;
|
|
849
|
+
exports.Portal = Portal;
|
|
850
|
+
exports.Profiler = Profiler;
|
|
851
|
+
exports.StrictMode = StrictMode;
|
|
852
|
+
exports.Suspense = Suspense;
|
|
853
|
+
exports.isAsyncMode = isAsyncMode;
|
|
854
|
+
exports.isConcurrentMode = isConcurrentMode;
|
|
855
|
+
exports.isContextConsumer = isContextConsumer;
|
|
856
|
+
exports.isContextProvider = isContextProvider;
|
|
857
|
+
exports.isElement = isElement;
|
|
858
|
+
exports.isForwardRef = isForwardRef;
|
|
859
|
+
exports.isFragment = isFragment;
|
|
860
|
+
exports.isLazy = isLazy;
|
|
861
|
+
exports.isMemo = isMemo;
|
|
862
|
+
exports.isPortal = isPortal;
|
|
863
|
+
exports.isProfiler = isProfiler;
|
|
864
|
+
exports.isStrictMode = isStrictMode;
|
|
865
|
+
exports.isSuspense = isSuspense;
|
|
866
|
+
exports.isValidElementType = isValidElementType;
|
|
867
|
+
exports.typeOf = typeOf;
|
|
868
|
+
})();
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
var reactIs_development_1 = reactIs_development.AsyncMode;
|
|
872
|
+
var reactIs_development_2 = reactIs_development.ConcurrentMode;
|
|
873
|
+
var reactIs_development_3 = reactIs_development.ContextConsumer;
|
|
874
|
+
var reactIs_development_4 = reactIs_development.ContextProvider;
|
|
875
|
+
var reactIs_development_5 = reactIs_development.Element;
|
|
876
|
+
var reactIs_development_6 = reactIs_development.ForwardRef;
|
|
877
|
+
var reactIs_development_7 = reactIs_development.Fragment;
|
|
878
|
+
var reactIs_development_8 = reactIs_development.Lazy;
|
|
879
|
+
var reactIs_development_9 = reactIs_development.Memo;
|
|
880
|
+
var reactIs_development_10 = reactIs_development.Portal;
|
|
881
|
+
var reactIs_development_11 = reactIs_development.Profiler;
|
|
882
|
+
var reactIs_development_12 = reactIs_development.StrictMode;
|
|
883
|
+
var reactIs_development_13 = reactIs_development.Suspense;
|
|
884
|
+
var reactIs_development_14 = reactIs_development.isAsyncMode;
|
|
885
|
+
var reactIs_development_15 = reactIs_development.isConcurrentMode;
|
|
886
|
+
var reactIs_development_16 = reactIs_development.isContextConsumer;
|
|
887
|
+
var reactIs_development_17 = reactIs_development.isContextProvider;
|
|
888
|
+
var reactIs_development_18 = reactIs_development.isElement;
|
|
889
|
+
var reactIs_development_19 = reactIs_development.isForwardRef;
|
|
890
|
+
var reactIs_development_20 = reactIs_development.isFragment;
|
|
891
|
+
var reactIs_development_21 = reactIs_development.isLazy;
|
|
892
|
+
var reactIs_development_22 = reactIs_development.isMemo;
|
|
893
|
+
var reactIs_development_23 = reactIs_development.isPortal;
|
|
894
|
+
var reactIs_development_24 = reactIs_development.isProfiler;
|
|
895
|
+
var reactIs_development_25 = reactIs_development.isStrictMode;
|
|
896
|
+
var reactIs_development_26 = reactIs_development.isSuspense;
|
|
897
|
+
var reactIs_development_27 = reactIs_development.isValidElementType;
|
|
898
|
+
var reactIs_development_28 = reactIs_development.typeOf;
|
|
917
899
|
|
|
918
|
-
|
|
919
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
920
|
-
var propValue = props[propName];
|
|
921
|
-
var propType = getPropType(propValue);
|
|
922
|
-
if (propType !== 'object') {
|
|
923
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
924
|
-
}
|
|
925
|
-
// We need to check all keys in case some are required but missing from
|
|
926
|
-
// props.
|
|
927
|
-
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
928
|
-
for (var key in allKeys) {
|
|
929
|
-
var checker = shapeTypes[key];
|
|
930
|
-
if (!checker) {
|
|
931
|
-
return new PropTypeError(
|
|
932
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
933
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
934
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
935
|
-
);
|
|
936
|
-
}
|
|
937
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
938
|
-
if (error) {
|
|
939
|
-
return error;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
return null;
|
|
943
|
-
}
|
|
900
|
+
var reactIs = createCommonjsModule(function (module) {
|
|
944
901
|
|
|
945
|
-
|
|
946
|
-
|
|
902
|
+
if (process.env.NODE_ENV === 'production') {
|
|
903
|
+
module.exports = reactIs_production_min;
|
|
904
|
+
} else {
|
|
905
|
+
module.exports = reactIs_development;
|
|
906
|
+
}
|
|
907
|
+
});
|
|
947
908
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
if (Array.isArray(propValue)) {
|
|
958
|
-
return propValue.every(isNode);
|
|
959
|
-
}
|
|
960
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
961
|
-
return true;
|
|
962
|
-
}
|
|
909
|
+
/*
|
|
910
|
+
object-assign
|
|
911
|
+
(c) Sindre Sorhus
|
|
912
|
+
@license MIT
|
|
913
|
+
*/
|
|
914
|
+
/* eslint-disable no-unused-vars */
|
|
915
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
916
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
917
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
963
918
|
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
if (iteratorFn !== propValue.entries) {
|
|
969
|
-
while (!(step = iterator.next()).done) {
|
|
970
|
-
if (!isNode(step.value)) {
|
|
971
|
-
return false;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
} else {
|
|
975
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
976
|
-
while (!(step = iterator.next()).done) {
|
|
977
|
-
var entry = step.value;
|
|
978
|
-
if (entry) {
|
|
979
|
-
if (!isNode(entry[1])) {
|
|
980
|
-
return false;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
} else {
|
|
986
|
-
return false;
|
|
987
|
-
}
|
|
919
|
+
function toObject(val) {
|
|
920
|
+
if (val === null || val === undefined) {
|
|
921
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
922
|
+
}
|
|
988
923
|
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
return false;
|
|
992
|
-
}
|
|
993
|
-
}
|
|
924
|
+
return Object(val);
|
|
925
|
+
}
|
|
994
926
|
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
927
|
+
function shouldUseNative() {
|
|
928
|
+
try {
|
|
929
|
+
if (!Object.assign) {
|
|
930
|
+
return false;
|
|
931
|
+
}
|
|
1000
932
|
|
|
1001
|
-
|
|
1002
|
-
if (!propValue) {
|
|
1003
|
-
return false;
|
|
1004
|
-
}
|
|
933
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
1005
934
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
935
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
936
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
937
|
+
test1[5] = 'de';
|
|
938
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
939
|
+
return false;
|
|
940
|
+
}
|
|
1010
941
|
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
942
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
943
|
+
var test2 = {};
|
|
944
|
+
for (var i = 0; i < 10; i++) {
|
|
945
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
946
|
+
}
|
|
947
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
948
|
+
return test2[n];
|
|
949
|
+
});
|
|
950
|
+
if (order2.join('') !== '0123456789') {
|
|
951
|
+
return false;
|
|
952
|
+
}
|
|
1015
953
|
|
|
1016
|
-
|
|
1017
|
-
|
|
954
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
955
|
+
var test3 = {};
|
|
956
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
957
|
+
test3[letter] = letter;
|
|
958
|
+
});
|
|
959
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
960
|
+
'abcdefghijklmnopqrst') {
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
1018
963
|
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
if (propValue instanceof RegExp) {
|
|
1026
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1027
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1028
|
-
// passes PropTypes.object.
|
|
1029
|
-
return 'object';
|
|
1030
|
-
}
|
|
1031
|
-
if (isSymbol(propType, propValue)) {
|
|
1032
|
-
return 'symbol';
|
|
1033
|
-
}
|
|
1034
|
-
return propType;
|
|
1035
|
-
}
|
|
964
|
+
return true;
|
|
965
|
+
} catch (err) {
|
|
966
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
967
|
+
return false;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
1036
970
|
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
return '' + propValue;
|
|
1042
|
-
}
|
|
1043
|
-
var propType = getPropType(propValue);
|
|
1044
|
-
if (propType === 'object') {
|
|
1045
|
-
if (propValue instanceof Date) {
|
|
1046
|
-
return 'date';
|
|
1047
|
-
} else if (propValue instanceof RegExp) {
|
|
1048
|
-
return 'regexp';
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
return propType;
|
|
1052
|
-
}
|
|
971
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
972
|
+
var from;
|
|
973
|
+
var to = toObject(target);
|
|
974
|
+
var symbols;
|
|
1053
975
|
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
function getPostfixForTypeWarning(value) {
|
|
1057
|
-
var type = getPreciseType(value);
|
|
1058
|
-
switch (type) {
|
|
1059
|
-
case 'array':
|
|
1060
|
-
case 'object':
|
|
1061
|
-
return 'an ' + type;
|
|
1062
|
-
case 'boolean':
|
|
1063
|
-
case 'date':
|
|
1064
|
-
case 'regexp':
|
|
1065
|
-
return 'a ' + type;
|
|
1066
|
-
default:
|
|
1067
|
-
return type;
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
976
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
977
|
+
from = Object(arguments[s]);
|
|
1070
978
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
return propValue.constructor.name;
|
|
1077
|
-
}
|
|
979
|
+
for (var key in from) {
|
|
980
|
+
if (hasOwnProperty.call(from, key)) {
|
|
981
|
+
to[key] = from[key];
|
|
982
|
+
}
|
|
983
|
+
}
|
|
1078
984
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
985
|
+
if (getOwnPropertySymbols) {
|
|
986
|
+
symbols = getOwnPropertySymbols(from);
|
|
987
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
988
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
989
|
+
to[symbols[i]] = from[symbols[i]];
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
1082
994
|
|
|
1083
|
-
|
|
995
|
+
return to;
|
|
1084
996
|
};
|
|
1085
997
|
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
998
|
+
/**
|
|
999
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1000
|
+
*
|
|
1001
|
+
* This source code is licensed under the MIT license found in the
|
|
1002
|
+
* LICENSE file in the root directory of this source tree.
|
|
1003
|
+
*/
|
|
1089
1004
|
|
|
1090
|
-
var
|
|
1091
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1092
|
-
if (secret === ReactPropTypesSecret_1) {
|
|
1093
|
-
// It is still safe when called from React.
|
|
1094
|
-
return;
|
|
1095
|
-
}
|
|
1096
|
-
var err = new Error(
|
|
1097
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1098
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1099
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1100
|
-
);
|
|
1101
|
-
err.name = 'Invariant Violation';
|
|
1102
|
-
throw err;
|
|
1103
|
-
} shim.isRequired = shim;
|
|
1104
|
-
function getShim() {
|
|
1105
|
-
return shim;
|
|
1106
|
-
} // Important!
|
|
1107
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1108
|
-
var ReactPropTypes = {
|
|
1109
|
-
array: shim,
|
|
1110
|
-
bool: shim,
|
|
1111
|
-
func: shim,
|
|
1112
|
-
number: shim,
|
|
1113
|
-
object: shim,
|
|
1114
|
-
string: shim,
|
|
1115
|
-
symbol: shim,
|
|
1005
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1116
1006
|
|
|
1117
|
-
|
|
1118
|
-
arrayOf: getShim,
|
|
1119
|
-
element: shim,
|
|
1120
|
-
elementType: shim,
|
|
1121
|
-
instanceOf: getShim,
|
|
1122
|
-
node: shim,
|
|
1123
|
-
objectOf: getShim,
|
|
1124
|
-
oneOf: getShim,
|
|
1125
|
-
oneOfType: getShim,
|
|
1126
|
-
shape: getShim,
|
|
1127
|
-
exact: getShim,
|
|
1007
|
+
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
1128
1008
|
|
|
1129
|
-
|
|
1130
|
-
|
|
1009
|
+
var printWarning = function() {};
|
|
1010
|
+
|
|
1011
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1012
|
+
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
1013
|
+
var loggedTypeFailures = {};
|
|
1014
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1015
|
+
|
|
1016
|
+
printWarning = function(text) {
|
|
1017
|
+
var message = 'Warning: ' + text;
|
|
1018
|
+
if (typeof console !== 'undefined') {
|
|
1019
|
+
console.error(message);
|
|
1020
|
+
}
|
|
1021
|
+
try {
|
|
1022
|
+
// --- Welcome to debugging React ---
|
|
1023
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
1024
|
+
// to find the callsite that caused this warning to fire.
|
|
1025
|
+
throw new Error(message);
|
|
1026
|
+
} catch (x) {}
|
|
1131
1027
|
};
|
|
1028
|
+
}
|
|
1132
1029
|
|
|
1133
|
-
|
|
1030
|
+
/**
|
|
1031
|
+
* Assert that the values match with the type specs.
|
|
1032
|
+
* Error messages are memorized and will only be shown once.
|
|
1033
|
+
*
|
|
1034
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1035
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
1036
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
1037
|
+
* @param {string} componentName Name of the component for error messages.
|
|
1038
|
+
* @param {?Function} getStack Returns the component stack.
|
|
1039
|
+
* @private
|
|
1040
|
+
*/
|
|
1041
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1042
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1043
|
+
for (var typeSpecName in typeSpecs) {
|
|
1044
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
1045
|
+
var error;
|
|
1046
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
1047
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
1048
|
+
// After these have been cleaned up, we'll let them throw.
|
|
1049
|
+
try {
|
|
1050
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
1051
|
+
// behavior as without this statement except with a better message.
|
|
1052
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1053
|
+
var err = Error(
|
|
1054
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1055
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
1056
|
+
);
|
|
1057
|
+
err.name = 'Invariant Violation';
|
|
1058
|
+
throw err;
|
|
1059
|
+
}
|
|
1060
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
|
1061
|
+
} catch (ex) {
|
|
1062
|
+
error = ex;
|
|
1063
|
+
}
|
|
1064
|
+
if (error && !(error instanceof Error)) {
|
|
1065
|
+
printWarning(
|
|
1066
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
1067
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1068
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1069
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
1070
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1071
|
+
'shape all require an argument).'
|
|
1072
|
+
);
|
|
1073
|
+
}
|
|
1074
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1075
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
1076
|
+
// same error.
|
|
1077
|
+
loggedTypeFailures[error.message] = true;
|
|
1134
1078
|
|
|
1135
|
-
|
|
1136
|
-
|
|
1079
|
+
var stack = getStack ? getStack() : '';
|
|
1080
|
+
|
|
1081
|
+
printWarning(
|
|
1082
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1137
1089
|
|
|
1138
|
-
var propTypes = createCommonjsModule(function (module) {
|
|
1139
1090
|
/**
|
|
1140
|
-
*
|
|
1091
|
+
* Resets warning cache when testing.
|
|
1141
1092
|
*
|
|
1142
|
-
*
|
|
1143
|
-
* LICENSE file in the root directory of this source tree.
|
|
1093
|
+
* @private
|
|
1144
1094
|
*/
|
|
1095
|
+
checkPropTypes.resetWarningCache = function() {
|
|
1096
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1097
|
+
loggedTypeFailures = {};
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
var checkPropTypes_1 = checkPropTypes;
|
|
1102
|
+
|
|
1103
|
+
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1104
|
+
var printWarning$1 = function() {};
|
|
1145
1105
|
|
|
1146
1106
|
if (process.env.NODE_ENV !== 'production') {
|
|
1147
|
-
|
|
1107
|
+
printWarning$1 = function(text) {
|
|
1108
|
+
var message = 'Warning: ' + text;
|
|
1109
|
+
if (typeof console !== 'undefined') {
|
|
1110
|
+
console.error(message);
|
|
1111
|
+
}
|
|
1112
|
+
try {
|
|
1113
|
+
// --- Welcome to debugging React ---
|
|
1114
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
1115
|
+
// to find the callsite that caused this warning to fire.
|
|
1116
|
+
throw new Error(message);
|
|
1117
|
+
} catch (x) {}
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1148
1120
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
var throwOnDirectAccess = true;
|
|
1152
|
-
module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
1153
|
-
} else {
|
|
1154
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1155
|
-
// http://fb.me/prop-types-in-prod
|
|
1156
|
-
module.exports = factoryWithThrowingShims();
|
|
1121
|
+
function emptyFunctionThatReturnsNull() {
|
|
1122
|
+
return null;
|
|
1157
1123
|
}
|
|
1158
|
-
});
|
|
1159
1124
|
|
|
1160
|
-
var
|
|
1161
|
-
|
|
1125
|
+
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1126
|
+
/* global Symbol */
|
|
1127
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
1128
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
1162
1129
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1130
|
+
/**
|
|
1131
|
+
* Returns the iterator method function contained on the iterable object.
|
|
1132
|
+
*
|
|
1133
|
+
* Be sure to invoke the function with the iterable as context:
|
|
1134
|
+
*
|
|
1135
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
1136
|
+
* if (iteratorFn) {
|
|
1137
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
1138
|
+
* ...
|
|
1139
|
+
* }
|
|
1140
|
+
*
|
|
1141
|
+
* @param {?object} maybeIterable
|
|
1142
|
+
* @return {?function}
|
|
1143
|
+
*/
|
|
1144
|
+
function getIteratorFn(maybeIterable) {
|
|
1145
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
1146
|
+
if (typeof iteratorFn === 'function') {
|
|
1147
|
+
return iteratorFn;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
1153
|
+
* supplied to React components. Example usage:
|
|
1154
|
+
*
|
|
1155
|
+
* var Props = require('ReactPropTypes');
|
|
1156
|
+
* var MyArticle = React.createClass({
|
|
1157
|
+
* propTypes: {
|
|
1158
|
+
* // An optional string prop named "description".
|
|
1159
|
+
* description: Props.string,
|
|
1160
|
+
*
|
|
1161
|
+
* // A required enum prop named "category".
|
|
1162
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
1163
|
+
*
|
|
1164
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
1165
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
1166
|
+
* },
|
|
1167
|
+
* render: function() { ... }
|
|
1168
|
+
* });
|
|
1169
|
+
*
|
|
1170
|
+
* A more formal specification of how these methods are used:
|
|
1171
|
+
*
|
|
1172
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
1173
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
1174
|
+
*
|
|
1175
|
+
* Each and every declaration produces a function with the same signature. This
|
|
1176
|
+
* allows the creation of custom validation functions. For example:
|
|
1177
|
+
*
|
|
1178
|
+
* var MyLink = React.createClass({
|
|
1179
|
+
* propTypes: {
|
|
1180
|
+
* // An optional string or URI prop named "href".
|
|
1181
|
+
* href: function(props, propName, componentName) {
|
|
1182
|
+
* var propValue = props[propName];
|
|
1183
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
1184
|
+
* !(propValue instanceof URI)) {
|
|
1185
|
+
* return new Error(
|
|
1186
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
1187
|
+
* componentName
|
|
1188
|
+
* );
|
|
1189
|
+
* }
|
|
1190
|
+
* }
|
|
1191
|
+
* },
|
|
1192
|
+
* render: function() {...}
|
|
1193
|
+
* });
|
|
1194
|
+
*
|
|
1195
|
+
* @internal
|
|
1196
|
+
*/
|
|
1197
|
+
|
|
1198
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
1199
|
+
|
|
1200
|
+
// Important!
|
|
1201
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
1202
|
+
var ReactPropTypes = {
|
|
1203
|
+
array: createPrimitiveTypeChecker('array'),
|
|
1204
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
1205
|
+
func: createPrimitiveTypeChecker('function'),
|
|
1206
|
+
number: createPrimitiveTypeChecker('number'),
|
|
1207
|
+
object: createPrimitiveTypeChecker('object'),
|
|
1208
|
+
string: createPrimitiveTypeChecker('string'),
|
|
1209
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
1174
1210
|
|
|
1175
|
-
|
|
1176
|
-
|
|
1211
|
+
any: createAnyTypeChecker(),
|
|
1212
|
+
arrayOf: createArrayOfTypeChecker,
|
|
1213
|
+
element: createElementTypeChecker(),
|
|
1214
|
+
elementType: createElementTypeTypeChecker(),
|
|
1215
|
+
instanceOf: createInstanceTypeChecker,
|
|
1216
|
+
node: createNodeChecker(),
|
|
1217
|
+
objectOf: createObjectOfTypeChecker,
|
|
1218
|
+
oneOf: createEnumTypeChecker,
|
|
1219
|
+
oneOfType: createUnionTypeChecker,
|
|
1220
|
+
shape: createShapeTypeChecker,
|
|
1221
|
+
exact: createStrictShapeTypeChecker,
|
|
1177
1222
|
};
|
|
1223
|
+
|
|
1178
1224
|
/**
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1181
|
-
* @param total Maximum value.
|
|
1182
|
-
* @param pathRadius Radius of the SVG path.
|
|
1183
|
-
* @param elementRadius Radius of the SVG container.
|
|
1184
|
-
* @param isSemicircle Whether the element should be a semicircle.
|
|
1225
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
1226
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
1185
1227
|
*/
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
var arcSweep = percentage <= 180 ? 0 : 1;
|
|
1199
|
-
return "M ".concat(start, " A ").concat(pathRadius, " ").concat(pathRadius, " 0 ").concat(arcSweep, " 0 ").concat(end);
|
|
1228
|
+
/*eslint-disable no-self-compare*/
|
|
1229
|
+
function is(x, y) {
|
|
1230
|
+
// SameValue algorithm
|
|
1231
|
+
if (x === y) {
|
|
1232
|
+
// Steps 1-5, 7-10
|
|
1233
|
+
// Steps 6.b-6.e: +0 != -0
|
|
1234
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
1235
|
+
} else {
|
|
1236
|
+
// Step 6.a: NaN == NaN
|
|
1237
|
+
return x !== x && y !== y;
|
|
1238
|
+
}
|
|
1200
1239
|
}
|
|
1240
|
+
/*eslint-enable no-self-compare*/
|
|
1201
1241
|
|
|
1202
|
-
var DEGREE_IN_RADIANS = Math.PI / 180;
|
|
1203
1242
|
/**
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1243
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
1244
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
1245
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
1246
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
1247
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
1208
1248
|
*/
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
var x = elementRadius + pathRadius * Math.cos(angleInRadians);
|
|
1213
|
-
var y = elementRadius + pathRadius * Math.sin(angleInRadians);
|
|
1214
|
-
return x + ' ' + y;
|
|
1249
|
+
function PropTypeError(message) {
|
|
1250
|
+
this.message = message;
|
|
1251
|
+
this.stack = '';
|
|
1215
1252
|
}
|
|
1253
|
+
// Make `instanceof Error` still work for returned errors.
|
|
1254
|
+
PropTypeError.prototype = Error.prototype;
|
|
1216
1255
|
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
cx: "".concat(radius),
|
|
1226
|
-
cy: "".concat(radius),
|
|
1227
|
-
stroke: "".concat(baseColour),
|
|
1228
|
-
strokeWidth: "7",
|
|
1229
|
-
r: "".concat(radius - 7 / 2)
|
|
1230
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
1231
|
-
d: getArc(75, 100, radius - 7 / 2, radius, false),
|
|
1232
|
-
strokeWidth: "7",
|
|
1233
|
-
stroke: "".concat(spinnerColour),
|
|
1234
|
-
strokeLinecap: "round"
|
|
1235
|
-
}));
|
|
1236
|
-
};
|
|
1237
|
-
GoAElementLoader.propTypes = {
|
|
1238
|
-
visible: propTypes.bool,
|
|
1239
|
-
baseColour: propTypes.string,
|
|
1240
|
-
spinnerColour: propTypes.string,
|
|
1241
|
-
size: propTypes.number
|
|
1242
|
-
};
|
|
1243
|
-
|
|
1244
|
-
function _defineProperty(obj, key, value) {
|
|
1245
|
-
if (key in obj) {
|
|
1246
|
-
Object.defineProperty(obj, key, {
|
|
1247
|
-
value: value,
|
|
1248
|
-
enumerable: true,
|
|
1249
|
-
configurable: true,
|
|
1250
|
-
writable: true
|
|
1251
|
-
});
|
|
1252
|
-
} else {
|
|
1253
|
-
obj[key] = value;
|
|
1254
|
-
}
|
|
1256
|
+
function createChainableTypeChecker(validate) {
|
|
1257
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1258
|
+
var manualPropTypeCallCache = {};
|
|
1259
|
+
var manualPropTypeWarningCount = 0;
|
|
1260
|
+
}
|
|
1261
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
1262
|
+
componentName = componentName || ANONYMOUS;
|
|
1263
|
+
propFullName = propFullName || propName;
|
|
1255
1264
|
|
|
1256
|
-
|
|
1257
|
-
|
|
1265
|
+
if (secret !== ReactPropTypesSecret_1) {
|
|
1266
|
+
if (throwOnDirectAccess) {
|
|
1267
|
+
// New behavior only for users of `prop-types` package
|
|
1268
|
+
var err = new Error(
|
|
1269
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1270
|
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
1271
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
1272
|
+
);
|
|
1273
|
+
err.name = 'Invariant Violation';
|
|
1274
|
+
throw err;
|
|
1275
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
1276
|
+
// Old behavior for people using React.PropTypes
|
|
1277
|
+
var cacheKey = componentName + ':' + propName;
|
|
1278
|
+
if (
|
|
1279
|
+
!manualPropTypeCallCache[cacheKey] &&
|
|
1280
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
1281
|
+
manualPropTypeWarningCount < 3
|
|
1282
|
+
) {
|
|
1283
|
+
printWarning$1(
|
|
1284
|
+
'You are manually calling a React.PropTypes validation ' +
|
|
1285
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
1286
|
+
'and will throw in the standalone `prop-types` package. ' +
|
|
1287
|
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
1288
|
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
1289
|
+
);
|
|
1290
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
1291
|
+
manualPropTypeWarningCount++;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
if (props[propName] == null) {
|
|
1296
|
+
if (isRequired) {
|
|
1297
|
+
if (props[propName] === null) {
|
|
1298
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
1299
|
+
}
|
|
1300
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
1301
|
+
}
|
|
1302
|
+
return null;
|
|
1303
|
+
} else {
|
|
1304
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1258
1307
|
|
|
1259
|
-
|
|
1260
|
-
|
|
1308
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
1309
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1261
1310
|
|
|
1262
|
-
|
|
1263
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1264
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
1265
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1266
|
-
});
|
|
1267
|
-
keys.push.apply(keys, symbols);
|
|
1311
|
+
return chainedCheckType;
|
|
1268
1312
|
}
|
|
1269
1313
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1314
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
1315
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1316
|
+
var propValue = props[propName];
|
|
1317
|
+
var propType = getPropType(propValue);
|
|
1318
|
+
if (propType !== expectedType) {
|
|
1319
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
1320
|
+
// check, but we can offer a more precise error message here rather than
|
|
1321
|
+
// 'of type `object`'.
|
|
1322
|
+
var preciseType = getPreciseType(propValue);
|
|
1276
1323
|
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
});
|
|
1281
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
1282
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1283
|
-
} else {
|
|
1284
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
1285
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1286
|
-
});
|
|
1324
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
1325
|
+
}
|
|
1326
|
+
return null;
|
|
1287
1327
|
}
|
|
1328
|
+
return createChainableTypeChecker(validate);
|
|
1288
1329
|
}
|
|
1289
1330
|
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1294
|
-
if (source == null) return {};
|
|
1295
|
-
var target = {};
|
|
1296
|
-
var sourceKeys = Object.keys(source);
|
|
1297
|
-
var key, i;
|
|
1298
|
-
|
|
1299
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1300
|
-
key = sourceKeys[i];
|
|
1301
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1302
|
-
target[key] = source[key];
|
|
1331
|
+
function createAnyTypeChecker() {
|
|
1332
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1303
1333
|
}
|
|
1304
1334
|
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
target[key] = source[key];
|
|
1335
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
1336
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1337
|
+
if (typeof typeChecker !== 'function') {
|
|
1338
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
1339
|
+
}
|
|
1340
|
+
var propValue = props[propName];
|
|
1341
|
+
if (!Array.isArray(propValue)) {
|
|
1342
|
+
var propType = getPropType(propValue);
|
|
1343
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
1344
|
+
}
|
|
1345
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
1346
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
|
|
1347
|
+
if (error instanceof Error) {
|
|
1348
|
+
return error;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
return null;
|
|
1323
1352
|
}
|
|
1353
|
+
return createChainableTypeChecker(validate);
|
|
1324
1354
|
}
|
|
1325
1355
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
function _arrayWithoutHoles(arr) {
|
|
1338
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
function _arrayWithHoles(arr) {
|
|
1342
|
-
if (Array.isArray(arr)) return arr;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
function _iterableToArray(iter) {
|
|
1346
|
-
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1350
|
-
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
1351
|
-
var _arr = [];
|
|
1352
|
-
var _n = true;
|
|
1353
|
-
var _d = false;
|
|
1354
|
-
var _e = undefined;
|
|
1355
|
-
|
|
1356
|
-
try {
|
|
1357
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
1358
|
-
_arr.push(_s.value);
|
|
1359
|
-
|
|
1360
|
-
if (i && _arr.length === i) break;
|
|
1361
|
-
}
|
|
1362
|
-
} catch (err) {
|
|
1363
|
-
_d = true;
|
|
1364
|
-
_e = err;
|
|
1365
|
-
} finally {
|
|
1366
|
-
try {
|
|
1367
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
1368
|
-
} finally {
|
|
1369
|
-
if (_d) throw _e;
|
|
1356
|
+
function createElementTypeChecker() {
|
|
1357
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1358
|
+
var propValue = props[propName];
|
|
1359
|
+
if (!isValidElement(propValue)) {
|
|
1360
|
+
var propType = getPropType(propValue);
|
|
1361
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1362
|
+
}
|
|
1363
|
+
return null;
|
|
1370
1364
|
}
|
|
1365
|
+
return createChainableTypeChecker(validate);
|
|
1371
1366
|
}
|
|
1372
1367
|
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1368
|
+
function createElementTypeTypeChecker() {
|
|
1369
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1370
|
+
var propValue = props[propName];
|
|
1371
|
+
if (!reactIs.isValidElementType(propValue)) {
|
|
1372
|
+
var propType = getPropType(propValue);
|
|
1373
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1374
|
+
}
|
|
1375
|
+
return null;
|
|
1376
|
+
}
|
|
1377
|
+
return createChainableTypeChecker(validate);
|
|
1378
|
+
}
|
|
1384
1379
|
|
|
1385
|
-
|
|
1386
|
-
|
|
1380
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
1381
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1382
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
1383
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1384
|
+
var actualClassName = getClassName(props[propName]);
|
|
1385
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1386
|
+
}
|
|
1387
|
+
return null;
|
|
1388
|
+
}
|
|
1389
|
+
return createChainableTypeChecker(validate);
|
|
1390
|
+
}
|
|
1387
1391
|
|
|
1388
|
-
|
|
1392
|
+
function createEnumTypeChecker(expectedValues) {
|
|
1393
|
+
if (!Array.isArray(expectedValues)) {
|
|
1394
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1395
|
+
if (arguments.length > 1) {
|
|
1396
|
+
printWarning$1(
|
|
1397
|
+
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1398
|
+
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1399
|
+
);
|
|
1400
|
+
} else {
|
|
1401
|
+
printWarning$1('Invalid argument supplied to oneOf, expected an array.');
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
return emptyFunctionThatReturnsNull;
|
|
1405
|
+
}
|
|
1389
1406
|
|
|
1390
|
-
|
|
1391
|
-
|
|
1407
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1408
|
+
var propValue = props[propName];
|
|
1409
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
1410
|
+
if (is(propValue, expectedValues[i])) {
|
|
1411
|
+
return null;
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1392
1414
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1415
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1416
|
+
var type = getPreciseType(value);
|
|
1417
|
+
if (type === 'symbol') {
|
|
1418
|
+
return String(value);
|
|
1419
|
+
}
|
|
1420
|
+
return value;
|
|
1421
|
+
});
|
|
1422
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1423
|
+
}
|
|
1424
|
+
return createChainableTypeChecker(validate);
|
|
1425
|
+
}
|
|
1396
1426
|
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1427
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
1428
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1429
|
+
if (typeof typeChecker !== 'function') {
|
|
1430
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1431
|
+
}
|
|
1432
|
+
var propValue = props[propName];
|
|
1433
|
+
var propType = getPropType(propValue);
|
|
1434
|
+
if (propType !== 'object') {
|
|
1435
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1436
|
+
}
|
|
1437
|
+
for (var key in propValue) {
|
|
1438
|
+
if (has$1(propValue, key)) {
|
|
1439
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1440
|
+
if (error instanceof Error) {
|
|
1441
|
+
return error;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
return null;
|
|
1446
|
+
}
|
|
1447
|
+
return createChainableTypeChecker(validate);
|
|
1448
|
+
}
|
|
1400
1449
|
|
|
1401
|
-
|
|
1402
|
-
|
|
1450
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1451
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1452
|
+
process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
1453
|
+
return emptyFunctionThatReturnsNull;
|
|
1454
|
+
}
|
|
1403
1455
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
errors = _useContext.errors,
|
|
1415
|
-
navigator = _useContext.navigator,
|
|
1416
|
-
setFieldValue = _useContext.setFieldValue,
|
|
1417
|
-
registerInput = _useContext.registerInput;
|
|
1456
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1457
|
+
var checker = arrayOfTypeCheckers[i];
|
|
1458
|
+
if (typeof checker !== 'function') {
|
|
1459
|
+
printWarning$1(
|
|
1460
|
+
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
1461
|
+
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
1462
|
+
);
|
|
1463
|
+
return emptyFunctionThatReturnsNull;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1418
1466
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1467
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1468
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1469
|
+
var checker = arrayOfTypeCheckers[i];
|
|
1470
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
|
|
1471
|
+
return null;
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1425
1474
|
|
|
1426
|
-
|
|
1427
|
-
if (typeof val === 'string') {
|
|
1428
|
-
setFieldValue(name, val);
|
|
1429
|
-
} else {
|
|
1430
|
-
setFieldValue(name, val.target.value);
|
|
1475
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
1431
1476
|
}
|
|
1477
|
+
return createChainableTypeChecker(validate);
|
|
1478
|
+
}
|
|
1432
1479
|
|
|
1433
|
-
|
|
1434
|
-
|
|
1480
|
+
function createNodeChecker() {
|
|
1481
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1482
|
+
if (!isNode(props[propName])) {
|
|
1483
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
1484
|
+
}
|
|
1485
|
+
return null;
|
|
1435
1486
|
}
|
|
1436
|
-
|
|
1487
|
+
return createChainableTypeChecker(validate);
|
|
1488
|
+
}
|
|
1437
1489
|
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
return React__default.cloneElement(child, {
|
|
1445
|
-
onChange: handleChange,
|
|
1446
|
-
message: message.toString(),
|
|
1447
|
-
id: name,
|
|
1448
|
-
navigator: navigateTo
|
|
1449
|
-
});
|
|
1450
|
-
} else {
|
|
1451
|
-
return child;
|
|
1490
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
1491
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1492
|
+
var propValue = props[propName];
|
|
1493
|
+
var propType = getPropType(propValue);
|
|
1494
|
+
if (propType !== 'object') {
|
|
1495
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1452
1496
|
}
|
|
1453
|
-
|
|
1497
|
+
for (var key in shapeTypes) {
|
|
1498
|
+
var checker = shapeTypes[key];
|
|
1499
|
+
if (!checker) {
|
|
1500
|
+
continue;
|
|
1501
|
+
}
|
|
1502
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1503
|
+
if (error) {
|
|
1504
|
+
return error;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
return null;
|
|
1508
|
+
}
|
|
1509
|
+
return createChainableTypeChecker(validate);
|
|
1454
1510
|
}
|
|
1455
1511
|
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1512
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1513
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1514
|
+
var propValue = props[propName];
|
|
1515
|
+
var propType = getPropType(propValue);
|
|
1516
|
+
if (propType !== 'object') {
|
|
1517
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1518
|
+
}
|
|
1519
|
+
// We need to check all keys in case some are required but missing from
|
|
1520
|
+
// props.
|
|
1521
|
+
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
1522
|
+
for (var key in allKeys) {
|
|
1523
|
+
var checker = shapeTypes[key];
|
|
1524
|
+
if (!checker) {
|
|
1525
|
+
return new PropTypeError(
|
|
1526
|
+
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1527
|
+
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1528
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1529
|
+
);
|
|
1530
|
+
}
|
|
1531
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1532
|
+
if (error) {
|
|
1533
|
+
return error;
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
return null;
|
|
1537
|
+
}
|
|
1466
1538
|
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
children = _ref$children === void 0 ? null : _ref$children;
|
|
1470
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1471
|
-
className: "goa-form-button"
|
|
1472
|
-
}, children);
|
|
1473
|
-
};
|
|
1539
|
+
return createChainableTypeChecker(validate);
|
|
1540
|
+
}
|
|
1474
1541
|
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1542
|
+
function isNode(propValue) {
|
|
1543
|
+
switch (typeof propValue) {
|
|
1544
|
+
case 'number':
|
|
1545
|
+
case 'string':
|
|
1546
|
+
case 'undefined':
|
|
1547
|
+
return true;
|
|
1548
|
+
case 'boolean':
|
|
1549
|
+
return !propValue;
|
|
1550
|
+
case 'object':
|
|
1551
|
+
if (Array.isArray(propValue)) {
|
|
1552
|
+
return propValue.every(isNode);
|
|
1553
|
+
}
|
|
1554
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
1555
|
+
return true;
|
|
1556
|
+
}
|
|
1482
1557
|
|
|
1483
|
-
|
|
1484
|
-
|
|
1558
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
1559
|
+
if (iteratorFn) {
|
|
1560
|
+
var iterator = iteratorFn.call(propValue);
|
|
1561
|
+
var step;
|
|
1562
|
+
if (iteratorFn !== propValue.entries) {
|
|
1563
|
+
while (!(step = iterator.next()).done) {
|
|
1564
|
+
if (!isNode(step.value)) {
|
|
1565
|
+
return false;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
} else {
|
|
1569
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1570
|
+
while (!(step = iterator.next()).done) {
|
|
1571
|
+
var entry = step.value;
|
|
1572
|
+
if (entry) {
|
|
1573
|
+
if (!isNode(entry[1])) {
|
|
1574
|
+
return false;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
} else {
|
|
1580
|
+
return false;
|
|
1581
|
+
}
|
|
1485
1582
|
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
_ref$title = _ref.title,
|
|
1492
|
-
title = _ref$title === void 0 ? null : _ref$title,
|
|
1493
|
-
_ref$children = _ref.children,
|
|
1494
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
1495
|
-
_ref$onClick = _ref.onClick,
|
|
1496
|
-
onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
1497
|
-
props = _objectWithoutProperties(_ref, ["buttonType", "buttonSize", "title", "children", "onClick"]);
|
|
1498
|
-
|
|
1499
|
-
var btnTypeClass = buttonType === 'primary' ? '' : "goa--".concat(buttonType);
|
|
1500
|
-
var btnSize = buttonSize === 'small' ? 'btn-small' : '';
|
|
1501
|
-
return /*#__PURE__*/React__default.createElement("button", Object.assign({
|
|
1502
|
-
className: "goa-button ".concat(btnSize, " ").concat(btnTypeClass),
|
|
1503
|
-
title: title,
|
|
1504
|
-
onClick: onClick
|
|
1505
|
-
}, props), children);
|
|
1506
|
-
};
|
|
1507
|
-
GoAButton.propTypes = {
|
|
1508
|
-
buttonSize: propTypes.string,
|
|
1509
|
-
buttonType: propTypes.string,
|
|
1510
|
-
title: propTypes.string,
|
|
1511
|
-
children: propTypes.node,
|
|
1512
|
-
onClick: propTypes.func
|
|
1513
|
-
};
|
|
1583
|
+
return true;
|
|
1584
|
+
default:
|
|
1585
|
+
return false;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1514
1588
|
|
|
1515
|
-
|
|
1516
|
-
|
|
1589
|
+
function isSymbol(propType, propValue) {
|
|
1590
|
+
// Native Symbol.
|
|
1591
|
+
if (propType === 'symbol') {
|
|
1592
|
+
return true;
|
|
1593
|
+
}
|
|
1517
1594
|
|
|
1518
|
-
|
|
1519
|
-
|
|
1595
|
+
// falsy value can't be a Symbol
|
|
1596
|
+
if (!propValue) {
|
|
1597
|
+
return false;
|
|
1598
|
+
}
|
|
1520
1599
|
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
content = _ref.content,
|
|
1526
|
-
_ref$children = _ref.children,
|
|
1527
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
1528
|
-
props = _objectWithoutProperties(_ref, ["title", "type", "content", "children"]);
|
|
1529
|
-
|
|
1530
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
1531
|
-
className: "goa-callout goa--".concat(type)
|
|
1532
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
|
|
1533
|
-
"data-testid": "callout-title"
|
|
1534
|
-
}, title), /*#__PURE__*/React__default.createElement("div", {
|
|
1535
|
-
className: "messages",
|
|
1536
|
-
"data-testid": "callout-content"
|
|
1537
|
-
}, content || children))));
|
|
1538
|
-
};
|
|
1539
|
-
GoACallout.propTypes = {
|
|
1540
|
-
title: propTypes.string,
|
|
1541
|
-
type: propTypes.string.isRequired,
|
|
1542
|
-
content: propTypes.string
|
|
1543
|
-
};
|
|
1600
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1601
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1602
|
+
return true;
|
|
1603
|
+
}
|
|
1544
1604
|
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
navigator: {}
|
|
1550
|
-
};
|
|
1551
|
-
var FormContext;
|
|
1605
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1606
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1607
|
+
return true;
|
|
1608
|
+
}
|
|
1552
1609
|
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
var GoAForm = function GoAForm(_ref) {
|
|
1556
|
-
var _ref$formTitle = _ref.formTitle,
|
|
1557
|
-
formTitle = _ref$formTitle === void 0 ? '' : _ref$formTitle,
|
|
1558
|
-
_ref$formDescription = _ref.formDescription,
|
|
1559
|
-
formDescription = _ref$formDescription === void 0 ? '' : _ref$formDescription,
|
|
1560
|
-
onFormSubmit = _ref.onFormSubmit,
|
|
1561
|
-
_ref$children = _ref.children,
|
|
1562
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
1563
|
-
props = _objectWithoutProperties(_ref, ["formTitle", "formDescription", "onFormSubmit", "children"]);
|
|
1564
|
-
|
|
1565
|
-
var _useState = React.useState(initState),
|
|
1566
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1567
|
-
formState = _useState2[0],
|
|
1568
|
-
setFormState = _useState2[1];
|
|
1610
|
+
return false;
|
|
1611
|
+
}
|
|
1569
1612
|
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1613
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1614
|
+
function getPropType(propValue) {
|
|
1615
|
+
var propType = typeof propValue;
|
|
1616
|
+
if (Array.isArray(propValue)) {
|
|
1617
|
+
return 'array';
|
|
1618
|
+
}
|
|
1619
|
+
if (propValue instanceof RegExp) {
|
|
1620
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1621
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1622
|
+
// passes PropTypes.object.
|
|
1623
|
+
return 'object';
|
|
1624
|
+
}
|
|
1625
|
+
if (isSymbol(propType, propValue)) {
|
|
1626
|
+
return 'symbol';
|
|
1627
|
+
}
|
|
1628
|
+
return propType;
|
|
1629
|
+
}
|
|
1574
1630
|
|
|
1575
|
-
|
|
1576
|
-
|
|
1631
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
1632
|
+
// See `createPrimitiveTypeChecker`.
|
|
1633
|
+
function getPreciseType(propValue) {
|
|
1634
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1635
|
+
return '' + propValue;
|
|
1636
|
+
}
|
|
1637
|
+
var propType = getPropType(propValue);
|
|
1638
|
+
if (propType === 'object') {
|
|
1639
|
+
if (propValue instanceof Date) {
|
|
1640
|
+
return 'date';
|
|
1641
|
+
} else if (propValue instanceof RegExp) {
|
|
1642
|
+
return 'regexp';
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
return propType;
|
|
1646
|
+
}
|
|
1577
1647
|
|
|
1578
|
-
|
|
1579
|
-
|
|
1648
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1649
|
+
// For example, "undefined" or "of type array"
|
|
1650
|
+
function getPostfixForTypeWarning(value) {
|
|
1651
|
+
var type = getPreciseType(value);
|
|
1652
|
+
switch (type) {
|
|
1653
|
+
case 'array':
|
|
1654
|
+
case 'object':
|
|
1655
|
+
return 'an ' + type;
|
|
1656
|
+
case 'boolean':
|
|
1657
|
+
case 'date':
|
|
1658
|
+
case 'regexp':
|
|
1659
|
+
return 'a ' + type;
|
|
1660
|
+
default:
|
|
1661
|
+
return type;
|
|
1580
1662
|
}
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
var validate = function validate() {
|
|
1584
|
-
var validators = formState.validators;
|
|
1585
|
-
setFormState(function (state) {
|
|
1586
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1587
|
-
errors: {}
|
|
1588
|
-
});
|
|
1589
|
-
});
|
|
1590
|
-
var formErrors = Object.entries(validators).reduce(function (errors, _ref2) {
|
|
1591
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
1592
|
-
name = _ref3[0],
|
|
1593
|
-
validators = _ref3[1];
|
|
1594
|
-
|
|
1595
|
-
var data = formState.data;
|
|
1596
|
-
|
|
1597
|
-
if (validators.length > 0) {
|
|
1598
|
-
var messages = validators.reduce(function (result, validator) {
|
|
1599
|
-
var value = data[name];
|
|
1600
|
-
var err = validator(value, data);
|
|
1601
|
-
return [].concat(_toConsumableArray(result), _toConsumableArray(err));
|
|
1602
|
-
}, []);
|
|
1603
|
-
|
|
1604
|
-
if (messages.length > 0) {
|
|
1605
|
-
errors[name] = "".concat(messages, " ").concat(name.toLocaleLowerCase());
|
|
1606
|
-
}
|
|
1663
|
+
}
|
|
1607
1664
|
|
|
1608
|
-
|
|
1665
|
+
// Returns class name of the object, if any.
|
|
1666
|
+
function getClassName(propValue) {
|
|
1667
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1668
|
+
return ANONYMOUS;
|
|
1669
|
+
}
|
|
1670
|
+
return propValue.constructor.name;
|
|
1671
|
+
}
|
|
1609
1672
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1673
|
+
ReactPropTypes.checkPropTypes = checkPropTypes_1;
|
|
1674
|
+
ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
|
|
1675
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1615
1676
|
|
|
1616
|
-
|
|
1617
|
-
|
|
1677
|
+
return ReactPropTypes;
|
|
1678
|
+
};
|
|
1618
1679
|
|
|
1619
|
-
|
|
1620
|
-
|
|
1680
|
+
function emptyFunction() {}
|
|
1681
|
+
function emptyFunctionWithReset() {}
|
|
1682
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1621
1683
|
|
|
1622
|
-
|
|
1623
|
-
|
|
1684
|
+
var factoryWithThrowingShims = function() {
|
|
1685
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1686
|
+
if (secret === ReactPropTypesSecret_1) {
|
|
1687
|
+
// It is still safe when called from React.
|
|
1688
|
+
return;
|
|
1624
1689
|
}
|
|
1690
|
+
var err = new Error(
|
|
1691
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1692
|
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1693
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
1694
|
+
);
|
|
1695
|
+
err.name = 'Invariant Violation';
|
|
1696
|
+
throw err;
|
|
1697
|
+
} shim.isRequired = shim;
|
|
1698
|
+
function getShim() {
|
|
1699
|
+
return shim;
|
|
1700
|
+
} // Important!
|
|
1701
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1702
|
+
var ReactPropTypes = {
|
|
1703
|
+
array: shim,
|
|
1704
|
+
bool: shim,
|
|
1705
|
+
func: shim,
|
|
1706
|
+
number: shim,
|
|
1707
|
+
object: shim,
|
|
1708
|
+
string: shim,
|
|
1709
|
+
symbol: shim,
|
|
1625
1710
|
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1711
|
+
any: shim,
|
|
1712
|
+
arrayOf: getShim,
|
|
1713
|
+
element: shim,
|
|
1714
|
+
elementType: shim,
|
|
1715
|
+
instanceOf: getShim,
|
|
1716
|
+
node: shim,
|
|
1717
|
+
objectOf: getShim,
|
|
1718
|
+
oneOf: getShim,
|
|
1719
|
+
oneOfType: getShim,
|
|
1720
|
+
shape: getShim,
|
|
1721
|
+
exact: getShim,
|
|
1633
1722
|
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1637
|
-
data: _objectSpread2(_objectSpread2({}, state.data), {}, _defineProperty({}, name, value)),
|
|
1638
|
-
errors: _objectSpread2(_objectSpread2({}, state.errors), {}, _defineProperty({}, name, []))
|
|
1639
|
-
});
|
|
1640
|
-
});
|
|
1723
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
1724
|
+
resetWarningCache: emptyFunction
|
|
1641
1725
|
};
|
|
1642
1726
|
|
|
1643
|
-
|
|
1644
|
-
var name = _ref4.name,
|
|
1645
|
-
validators = _ref4.validators;
|
|
1646
|
-
setFormState(function (state) {
|
|
1647
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1648
|
-
validators: _objectSpread2(_objectSpread2({}, state.validators), {}, _defineProperty({}, name, validators || [])),
|
|
1649
|
-
errors: _objectSpread2(_objectSpread2({}, state.errors), {}, _defineProperty({}, name, []))
|
|
1650
|
-
});
|
|
1651
|
-
});
|
|
1652
|
-
return function () {
|
|
1653
|
-
setFormState(function (state) {
|
|
1654
|
-
var _state = _objectSpread2({}, state),
|
|
1655
|
-
data = _state.data,
|
|
1656
|
-
errors = _state.errors,
|
|
1657
|
-
currentValidators = _state.validators,
|
|
1658
|
-
navigator = _state.navigator;
|
|
1659
|
-
|
|
1660
|
-
delete data[name];
|
|
1661
|
-
delete errors[name];
|
|
1662
|
-
delete currentValidators[name];
|
|
1663
|
-
delete navigator[name];
|
|
1664
|
-
return {
|
|
1665
|
-
data: data,
|
|
1666
|
-
errors: errors,
|
|
1667
|
-
validators: currentValidators,
|
|
1668
|
-
navigator: navigator
|
|
1669
|
-
};
|
|
1670
|
-
});
|
|
1671
|
-
};
|
|
1672
|
-
};
|
|
1727
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1673
1728
|
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
data: formState.data,
|
|
1677
|
-
navigator: formState.navigator,
|
|
1678
|
-
setFieldValue: setFieldValue,
|
|
1679
|
-
registerInput: registerInput
|
|
1680
|
-
};
|
|
1729
|
+
return ReactPropTypes;
|
|
1730
|
+
};
|
|
1681
1731
|
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
});
|
|
1690
|
-
}
|
|
1732
|
+
var propTypes = createCommonjsModule(function (module) {
|
|
1733
|
+
/**
|
|
1734
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1735
|
+
*
|
|
1736
|
+
* This source code is licensed under the MIT license found in the
|
|
1737
|
+
* LICENSE file in the root directory of this source tree.
|
|
1738
|
+
*/
|
|
1691
1739
|
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
type: "emergency",
|
|
1695
|
-
title: "Please fix following errors:"
|
|
1696
|
-
}, /*#__PURE__*/React__default.createElement("ul", null, formErrors.map(function (error) {
|
|
1697
|
-
return /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("a", {
|
|
1698
|
-
href: "#".concat(error),
|
|
1699
|
-
onClick: function onClick() {
|
|
1700
|
-
return addNavigator(error);
|
|
1701
|
-
}
|
|
1702
|
-
}, error));
|
|
1703
|
-
})));
|
|
1704
|
-
};
|
|
1740
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1741
|
+
var ReactIs = reactIs;
|
|
1705
1742
|
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
buttonType: "primary",
|
|
1717
|
-
type: "submit"
|
|
1718
|
-
}, "Submit"))) : children));
|
|
1719
|
-
};
|
|
1720
|
-
GoAForm.propTypes = {
|
|
1721
|
-
formTitle: propTypes.string,
|
|
1722
|
-
formDescription: propTypes.string,
|
|
1723
|
-
onSubmit: propTypes.func,
|
|
1724
|
-
children: propTypes.node
|
|
1725
|
-
};
|
|
1743
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1744
|
+
// http://fb.me/prop-types-in-prod
|
|
1745
|
+
var throwOnDirectAccess = true;
|
|
1746
|
+
module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
1747
|
+
} else {
|
|
1748
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1749
|
+
// http://fb.me/prop-types-in-prod
|
|
1750
|
+
module.exports = factoryWithThrowingShims();
|
|
1751
|
+
}
|
|
1752
|
+
});
|
|
1726
1753
|
|
|
1727
|
-
var css_248z$
|
|
1728
|
-
styleInject(css_248z$
|
|
1754
|
+
var css_248z$2 = "/* Palette */\n/* Semantic usages */\n.goa-input {\n position: relative; }\n\n.goa-input-error-message {\n font-size: var(--fs-sm);\n font-weight: 300;\n color: red;\n margin: 0; }\n\n.goa-input-help-text-message {\n font-size: var(--fs-sm);\n font-weight: 200;\n color: #333;\n margin: 0; }\n\n.goa-input-field {\n border: 1px solid #666666;\n border-radius: 4px; }\n\n.goa-input-field-error {\n border: 1px solid #ec040b;\n border-radius: 4px; }\n\n.goa-input-highlight-error {\n border: 4px solid #ec040b;\n border-radius: 4px; }\n";
|
|
1755
|
+
styleInject(css_248z$2);
|
|
1729
1756
|
|
|
1730
1757
|
var GoAInput = function GoAInput(_ref) {
|
|
1731
1758
|
var _ref$validate = _ref.validate,
|
|
@@ -1798,16 +1825,17 @@
|
|
|
1798
1825
|
onChange: propTypes.func
|
|
1799
1826
|
};
|
|
1800
1827
|
|
|
1801
|
-
var css_248z$
|
|
1802
|
-
styleInject(css_248z$
|
|
1828
|
+
var css_248z$3 = ".goa-scrollable {\n overflow: hidden;\n height: 100%;\n}\n\n.goa-scrollable > div::-webkit-scrollbar {\n width: 6px;\n}\n\n.goa-scrollable > div::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.goa-scrollable > div::-webkit-scrollbar-thumb {\n background: #888;\n}\n\n.goa-scrollable > div::-webkit-scrollbar-thumb:hover {\n background: #555;\n}\n";
|
|
1829
|
+
styleInject(css_248z$3);
|
|
1803
1830
|
|
|
1804
|
-
function GoAScrollable(_ref) {
|
|
1831
|
+
var GoAScrollable = function GoAScrollable(_ref) {
|
|
1805
1832
|
var vertical = _ref.vertical,
|
|
1806
1833
|
horizontal = _ref.horizontal,
|
|
1807
1834
|
hPadding = _ref.hPadding,
|
|
1808
1835
|
vPadding = _ref.vPadding,
|
|
1809
1836
|
height = _ref.height,
|
|
1810
|
-
children = _ref.children
|
|
1837
|
+
children = _ref.children,
|
|
1838
|
+
testId = _ref.testId;
|
|
1811
1839
|
var style = {
|
|
1812
1840
|
overflowY: vertical ? 'auto' : 'hidden',
|
|
1813
1841
|
overflowX: horizontal ? 'auto' : 'hidden',
|
|
@@ -1817,116 +1845,190 @@
|
|
|
1817
1845
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1818
1846
|
className: "goa-scrollable"
|
|
1819
1847
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1820
|
-
style: style
|
|
1848
|
+
style: style,
|
|
1849
|
+
"data-testid": testId
|
|
1821
1850
|
}, children));
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
var css_248z$8 = "/* Root ============================================================================== */\n\n.modal-root {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100vw;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n/* Modal ============================================================================== */\n\n.modal {\n position: relative;\n background: #fff;\n transition: opacity 150ms ease-in;\n z-index: 1001;\n}\n\n@media (max-width: 639px) {\n .modal {\n width: 100vw;\n height: 100vh;\n }\n}\n\n@media (min-width: 640px) {\n .modal {\n box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n margin: 1rem;\n max-height: 80vh;\n width: 600px;\n }\n}\n@media (min-width: 1024px) {\n .modal {\n width: 65ch;\n }\n}\n\n/* Modal Content ============================================================================== */\n\n.modal-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* Modal Actions ============================================================================== */\n\n.modal-actions {\n text-align: right;\n margin: 1rem;\n}\n\n@media (max-width: 639px) {\n .modal-actions button + button {\n margin-top: 0.5rem;\n }\n .modal-actions button {\n display: block;\n width: 100%;\n }\n}\n\n@media (min-width: 640px) {\n .modal-actions > button {\n margin-right: 0;\n }\n .modal-actions > button + button {\n margin-left: 0.5rem;\n }\n}\n\n/* Modal Title ============================================================================ */\n\n.modal-title {\n font-size: var(--fs-xl);\n padding: 1rem;\n margin-right: 40px; /* close icon spacing */\n}\n\n/* Modal Background ======================================================================= */\n\n.modal-background {\n position: fixed;\n inset: 0;\n opacity: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1000;\n transition: opacity 100ms ease-in;\n}\n\n/* Modal Close ============================================================================ */\n\n.modal-close {\n padding: 0.5rem;\n top: 0.5rem;\n right: 0.5rem;\n position: absolute;\n cursor: pointer;\n height: 20px;\n width: 20px;\n border-radius: 999px;\n transition: background 200ms ease-in;\n}\n\n.modal-close:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n";
|
|
1825
|
-
styleInject(css_248z$8);
|
|
1851
|
+
};
|
|
1826
1852
|
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
onClick = _ref.onClick,
|
|
1830
|
-
_ref$size = _ref.size,
|
|
1831
|
-
size = _ref$size === void 0 ? 24 : _ref$size;
|
|
1832
|
-
return /*#__PURE__*/React__default.createElement("svg", {
|
|
1833
|
-
className: className,
|
|
1834
|
-
"data-testid": "icon-close",
|
|
1835
|
-
width: size,
|
|
1836
|
-
height: size,
|
|
1837
|
-
onClick: onClick,
|
|
1838
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1839
|
-
viewBox: "0 0 512 512"
|
|
1840
|
-
}, /*#__PURE__*/React__default.createElement("title", null, "Close"), /*#__PURE__*/React__default.createElement("path", {
|
|
1841
|
-
fill: "none",
|
|
1842
|
-
stroke: "currentColor",
|
|
1843
|
-
strokeLinecap: "round",
|
|
1844
|
-
strokeLinejoin: "round",
|
|
1845
|
-
strokeWidth: "32",
|
|
1846
|
-
d: "M368 368L144 144M368 144L144 368"
|
|
1847
|
-
}));
|
|
1848
|
-
}
|
|
1853
|
+
var css_248z$4 = "/* Fade in */\n.fade-in-init {\n display: none;\n}\n.fade-in-start {\n display: block;\n opacity: 0;\n transition: opacity 200ms ease-in;\n}\n.fade-in-active {\n opacity: 1;\n}\n\n/* Fade out */\n.fade-out-init {\n display: block;\n}\n.fade-out-start {\n display: block;\n opacity: 1;\n transition: opacity 200ms ease-in;\n}\n.fade-out-active {\n opacity: 0;\n}\n\n/* ======= Slide in/out Up */\n\n/* Slide in up */\n.slide-in-up-init {\n transition: translateY(0);\n display: none;\n}\n.slide-in-up-start {\n display: block;\n transform: translateY(100vh);\n transition: transform 300ms ease-out;\n}\n.slide-in-up-active {\n transform: translateY(0);\n}\n\n/* Slide out up */\n.slide-out-up-init {\n transform: translateY(0);\n display: block;\n}\n.slide-out-up-start {\n transition: transform 300ms ease-in;\n}\n.slide-out-up-active {\n transform: translateY(-100vh);\n}\n\n/* ======= Slide in/out Down */\n\n/* Slide in down */\n.slide-in-down-init {\n transition: translateY(0);\n display: none;\n}\n.slide-in-down-start {\n display: block;\n transform: translateY(-100vh);\n transition: transform 300ms ease-out;\n}\n.slide-in-down-active {\n transform: translateY(0);\n}\n\n/* Slide out down */\n.slide-out-down-init {\n transform: translateY(0);\n display: block;\n}\n.slide-out-down-start {\n transform: translateY(0);\n transition: transform 300ms ease-in;\n}\n.slide-out-down-active {\n transform: translateY(100vh);\n}\n/* ======= Slide in/out Left */\n\n/* Slide in left */\n.slide-in-left-init {\n transition: translateX(0);\n display: none;\n}\n.slide-in-left-start {\n display: block;\n transform: translateX(-100vw);\n transition: transform 300ms ease-out;\n}\n.slide-in-left-active {\n transform: translateX(0);\n}\n\n/* Slide out left */\n.slide-out-left-init {\n transform: translateX(0);\n display: block;\n}\n.slide-out-left-start {\n transform: translateX(0);\n transition: transform 300ms ease-in;\n}\n.slide-out-left-active {\n transform: translateX(-100vw);\n}\n\n/* ======= Slide in/out Right */\n\n/* Slide in left */\n.slide-in-right-init {\n transition: translateX(0);\n display: none;\n}\n.slide-in-right-start {\n display: block;\n transform: translateX(100vw);\n transition: transform 300ms ease-out;\n}\n.slide-in-right-active {\n transform: translateX(0);\n}\n\n/* Slide out right */\n.slide-out-right-init {\n transform: translateX(0);\n display: block;\n}\n.slide-out-right-start {\n transform: translateX(0);\n transition: transform 300ms ease-in;\n}\n.slide-out-right-active {\n transform: translateX(100vw);\n}\n";
|
|
1854
|
+
styleInject(css_248z$4);
|
|
1849
1855
|
|
|
1850
|
-
var
|
|
1851
|
-
var
|
|
1852
|
-
|
|
1853
|
-
|
|
1856
|
+
var GoATransition = function GoATransition(_ref) {
|
|
1857
|
+
var name = _ref.name,
|
|
1858
|
+
active = _ref.active,
|
|
1859
|
+
onComplete = _ref.onComplete,
|
|
1860
|
+
children = _ref.children;
|
|
1854
1861
|
|
|
1855
1862
|
var _useState = React.useState('init'),
|
|
1856
1863
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1857
1864
|
state = _useState2[0],
|
|
1858
1865
|
setState = _useState2[1];
|
|
1859
1866
|
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1867
|
+
React.useEffect(function () {
|
|
1868
|
+
if (active) {
|
|
1869
|
+
setState('start');
|
|
1870
|
+
setTimeout(function () {
|
|
1871
|
+
return setState('active');
|
|
1872
|
+
}, 100);
|
|
1873
|
+
setTimeout(function () {
|
|
1874
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete();
|
|
1875
|
+
}, 500);
|
|
1876
|
+
} else {
|
|
1877
|
+
setState('init');
|
|
1878
|
+
}
|
|
1879
|
+
}, [active]); // `onComplete` in the dependencies results in an animation stutter
|
|
1880
|
+
|
|
1881
|
+
function getCss() {
|
|
1882
|
+
switch (state) {
|
|
1883
|
+
case 'init':
|
|
1884
|
+
return "".concat(name, "-init");
|
|
1885
|
+
|
|
1886
|
+
case 'start':
|
|
1887
|
+
return "".concat(name, "-start");
|
|
1888
|
+
|
|
1889
|
+
case 'active':
|
|
1890
|
+
return "".concat(name, "-start ").concat(name, "-active");
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1895
|
+
className: getCss()
|
|
1896
|
+
}, children);
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
var GoATransitionSequence = function GoATransitionSequence(props) {
|
|
1900
|
+
function createTransition(props, children) {
|
|
1901
|
+
return /*#__PURE__*/React__default.createElement(GoATransition, props, children);
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
return props.transitions // create components for the transitions
|
|
1905
|
+
.map(function (state, index) {
|
|
1906
|
+
return createTransition({
|
|
1907
|
+
active: props.transitionIndex % (props.transitions.length + 1) > index,
|
|
1908
|
+
name: state,
|
|
1909
|
+
onComplete: function onComplete() {
|
|
1910
|
+
return props === null || props === void 0 ? void 0 : props.onComplete(index, index === props.transitions.length - 1);
|
|
1911
|
+
}
|
|
1912
|
+
});
|
|
1913
|
+
}) // on `reduce` we need to start with the innermost child
|
|
1914
|
+
.reverse() // create parent/child relationship between components
|
|
1915
|
+
.reduce(function (child, parent) {
|
|
1916
|
+
if (!child) {
|
|
1917
|
+
// the original children (user defined content to be transitioned)
|
|
1918
|
+
return React__default.cloneElement(parent, {
|
|
1919
|
+
children: props.children
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
return React__default.cloneElement(parent, {
|
|
1924
|
+
children: child
|
|
1925
|
+
});
|
|
1926
|
+
}, null);
|
|
1927
|
+
};
|
|
1928
|
+
|
|
1929
|
+
var css_248z$5 = "/* Root ============================================================================== */\n\n.modal-root {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n/* Modal ============================================================================== */\n\n.modal {\n position: relative;\n background: #fff;\n z-index: 1002;\n box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n}\n\n@media (max-width: 639px) {\n .modal {\n width: 90%;\n max-height: 90%;\n }\n}\n\n@media (min-width: 640px) {\n .modal {\n margin: 1rem;\n max-height: 80%;\n width: 600px;\n }\n}\n@media (min-width: 1024px) {\n .modal {\n width: 65ch;\n }\n}\n\n/* Modal Content ============================================================================== */\n\n.modal-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* Modal Actions ============================================================================== */\n\n.modal-actions {\n text-align: right;\n margin: 1rem;\n}\n\n@media (max-width: 639px) {\n .modal-actions button + button {\n margin-top: 0.5rem;\n }\n .modal-actions button {\n display: block;\n width: 100%;\n }\n}\n\n@media (min-width: 640px) {\n .modal-actions > button {\n margin-right: 0;\n }\n .modal-actions > button + button {\n margin-left: 0.5rem;\n }\n}\n\n/* Modal Title ============================================================================ */\n\n.modal-title {\n font-size: var(--fs-xl);\n padding: 1rem;\n margin-right: 40px; /* close icon spacing */\n}\n\n/* Modal Background ======================================================================= */\n\n.modal-background {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n}\n\n/* Modal Close Icon ======================================================================= */\n\n.modal-close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n}\n";
|
|
1930
|
+
styleInject(css_248z$5);
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Modal - Main Component
|
|
1934
|
+
*/
|
|
1935
|
+
|
|
1936
|
+
var TRANSITION_INIT = 0;
|
|
1937
|
+
var TRANSITION_VISIBLE = 1;
|
|
1938
|
+
var TRANSITION_HIDDEN = 2;
|
|
1939
|
+
var GoAModal = function GoAModal(_ref) {
|
|
1940
|
+
var children = _ref.children,
|
|
1941
|
+
isOpen = _ref.isOpen,
|
|
1942
|
+
onClose = _ref.onClose,
|
|
1943
|
+
testId = _ref.testId,
|
|
1944
|
+
backgroundTestId = _ref.backgroundTestId;
|
|
1945
|
+
|
|
1946
|
+
var _useState = React.useState(TRANSITION_INIT),
|
|
1947
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1948
|
+
transitionIndex = _useState2[0],
|
|
1949
|
+
setTransitionIndex = _useState2[1];
|
|
1864
1950
|
|
|
1865
1951
|
React.useEffect(function () {
|
|
1866
1952
|
if (isOpen) {
|
|
1867
1953
|
show();
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
if (!isOpen && state === 'visible') {
|
|
1954
|
+
} else if (transitionIndex !== 0) {
|
|
1955
|
+
// don't hide() on the when in the init state
|
|
1871
1956
|
hide();
|
|
1872
1957
|
}
|
|
1873
|
-
}, [isOpen
|
|
1958
|
+
}, [isOpen]);
|
|
1874
1959
|
|
|
1875
1960
|
function show() {
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
var scrollbarWidth = calculateScrollbarWidth();
|
|
1881
|
-
document.body.style.overflow = 'hidden';
|
|
1882
|
-
document.body.style.paddingRight = scrollbarWidth + 'px';
|
|
1883
|
-
}, 0);
|
|
1961
|
+
setTransitionIndex(TRANSITION_VISIBLE);
|
|
1962
|
+
var scrollbarWidth = calculateScrollbarWidth();
|
|
1963
|
+
document.body.style.overflow = 'hidden';
|
|
1964
|
+
document.body.style.paddingRight = scrollbarWidth + 'px';
|
|
1884
1965
|
}
|
|
1885
1966
|
|
|
1886
1967
|
function hide() {
|
|
1887
|
-
|
|
1968
|
+
setTransitionIndex(TRANSITION_HIDDEN); // need to perform on the next render cycle to allow the css transitions to take place
|
|
1888
1969
|
|
|
1889
1970
|
setTimeout(function () {
|
|
1890
|
-
|
|
1891
|
-
setState('hidden');
|
|
1892
|
-
document.body.style.overflow = 'inherit';
|
|
1971
|
+
document.body.style.overflow = '';
|
|
1893
1972
|
document.body.style.paddingRight = '0';
|
|
1894
1973
|
}, 300); // 300ms allows for any close animations to complete
|
|
1974
|
+
} // allows the current state to be easily determined within tests
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
function getState() {
|
|
1978
|
+
return ['init', 'visible', 'hidden'][transitionIndex];
|
|
1895
1979
|
}
|
|
1896
1980
|
|
|
1897
|
-
return
|
|
1898
|
-
|
|
1981
|
+
return /*#__PURE__*/React__default.createElement(GoATransitionSequence, {
|
|
1982
|
+
transitions: ['fade-in', 'fade-out'],
|
|
1983
|
+
transitionIndex: transitionIndex,
|
|
1984
|
+
onComplete: function onComplete(_index, done) {
|
|
1985
|
+
return done && setTransitionIndex(0);
|
|
1986
|
+
}
|
|
1987
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1988
|
+
className: "modal-root",
|
|
1989
|
+
"data-testid": testId,
|
|
1990
|
+
"data-state": getState()
|
|
1899
1991
|
}, /*#__PURE__*/React__default.createElement(Content, {
|
|
1900
|
-
onClick: onClose
|
|
1901
|
-
visible: state === 'visible'
|
|
1992
|
+
onClick: onClose
|
|
1902
1993
|
}, children), /*#__PURE__*/React__default.createElement(Background, {
|
|
1903
1994
|
onClick: function onClick() {
|
|
1904
1995
|
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1905
1996
|
},
|
|
1906
|
-
|
|
1907
|
-
}));
|
|
1997
|
+
testId: backgroundTestId
|
|
1998
|
+
})));
|
|
1908
1999
|
};
|
|
1909
2000
|
// Public Child Components
|
|
1910
2001
|
// ******************************************************************************
|
|
2002
|
+
// ***************
|
|
2003
|
+
// GoAModalActions
|
|
2004
|
+
// ***************
|
|
1911
2005
|
|
|
1912
2006
|
var GoAModalActions = function GoAModalActions(_ref2) {
|
|
1913
2007
|
var children = _ref2.children;
|
|
1914
2008
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1915
|
-
"data-testid": "modal-actions",
|
|
1916
2009
|
className: "modal-actions"
|
|
1917
2010
|
}, children);
|
|
1918
|
-
};
|
|
2011
|
+
}; // ***************
|
|
2012
|
+
// GoAModalContent
|
|
2013
|
+
// ***************
|
|
2014
|
+
|
|
1919
2015
|
var GoAModalContent = function GoAModalContent(_ref3) {
|
|
1920
|
-
var children = _ref3.children
|
|
2016
|
+
var children = _ref3.children,
|
|
2017
|
+
testId = _ref3.testId;
|
|
1921
2018
|
return /*#__PURE__*/React__default.createElement(GoAScrollable, {
|
|
2019
|
+
testId: testId,
|
|
1922
2020
|
vertical: true,
|
|
1923
2021
|
hPadding: 1
|
|
1924
2022
|
}, children);
|
|
1925
|
-
};
|
|
2023
|
+
}; // *************
|
|
2024
|
+
// GoAModalTitle
|
|
2025
|
+
// *************
|
|
2026
|
+
|
|
1926
2027
|
var GoAModalTitle = function GoAModalTitle(_ref4) {
|
|
1927
|
-
var children = _ref4.children
|
|
2028
|
+
var children = _ref4.children,
|
|
2029
|
+
testId = _ref4.testId;
|
|
1928
2030
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1929
|
-
"data-testid":
|
|
2031
|
+
"data-testid": testId,
|
|
1930
2032
|
className: "modal-title"
|
|
1931
2033
|
}, children);
|
|
1932
2034
|
}; // ******************************************************************************
|
|
@@ -1938,41 +2040,34 @@
|
|
|
1938
2040
|
|
|
1939
2041
|
var Content = function Content(_ref5) {
|
|
1940
2042
|
var children = _ref5.children,
|
|
1941
|
-
onClick = _ref5.onClick
|
|
1942
|
-
visible = _ref5.visible;
|
|
1943
|
-
var opacity = visible ? 1 : 0;
|
|
2043
|
+
onClick = _ref5.onClick;
|
|
1944
2044
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
opacity: opacity
|
|
1952
|
-
}
|
|
1953
|
-
}, onClick && /*#__PURE__*/React__default.createElement(GoACloseIcon, {
|
|
1954
|
-
className: "modal-close",
|
|
2045
|
+
className: "modal"
|
|
2046
|
+
}, onClick && /*#__PURE__*/React__default.createElement("div", {
|
|
2047
|
+
className: "modal-close"
|
|
2048
|
+
}, /*#__PURE__*/React__default.createElement(GoAIconButton, {
|
|
2049
|
+
type: "close",
|
|
2050
|
+
variant: "simple",
|
|
1955
2051
|
onClick: onClick
|
|
1956
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1957
|
-
"data-testid": "modal-content",
|
|
2052
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
1958
2053
|
className: "modal-content"
|
|
1959
|
-
}, children)
|
|
2054
|
+
}, children), onClick && /*#__PURE__*/React__default.createElement("div", {
|
|
2055
|
+
style: {
|
|
2056
|
+
minHeight: '1rem'
|
|
2057
|
+
}
|
|
2058
|
+
}));
|
|
1960
2059
|
}; // ****************
|
|
1961
2060
|
// Background
|
|
1962
2061
|
// ****************
|
|
1963
2062
|
|
|
1964
2063
|
|
|
1965
2064
|
var Background = function Background(_ref6) {
|
|
1966
|
-
var
|
|
1967
|
-
|
|
1968
|
-
var opacity = visible ? 1 : 0;
|
|
2065
|
+
var onClick = _ref6.onClick,
|
|
2066
|
+
testId = _ref6.testId;
|
|
1969
2067
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1970
|
-
"data-testid": "modal-background",
|
|
1971
2068
|
className: "modal-background",
|
|
1972
2069
|
onClick: onClick,
|
|
1973
|
-
|
|
1974
|
-
opacity: opacity
|
|
1975
|
-
}
|
|
2070
|
+
"data-testid": testId
|
|
1976
2071
|
});
|
|
1977
2072
|
}; // *******
|
|
1978
2073
|
// Helpers
|
|
@@ -1984,6 +2079,11 @@
|
|
|
1984
2079
|
|
|
1985
2080
|
|
|
1986
2081
|
function calculateScrollbarWidth() {
|
|
2082
|
+
// no scrollbars present
|
|
2083
|
+
if (document.body.clientHeight <= document.documentElement.clientHeight) {
|
|
2084
|
+
return 0;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
1987
2087
|
var outer = document.createElement('div');
|
|
1988
2088
|
outer.style.visibility = 'hidden';
|
|
1989
2089
|
outer.style.overflow = 'scroll';
|
|
@@ -1998,190 +2098,52 @@
|
|
|
1998
2098
|
return scrollbarWidth;
|
|
1999
2099
|
}
|
|
2000
2100
|
|
|
2001
|
-
var
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
var
|
|
2006
|
-
type = _ref$type === void 0 ? 'infinite' : _ref$type,
|
|
2007
|
-
_ref$visible = _ref.visible,
|
|
2008
|
-
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
2009
|
-
_ref$message = _ref.message,
|
|
2010
|
-
message = _ref$message === void 0 ? 'Loading...' : _ref$message,
|
|
2011
|
-
_ref$value = _ref.value,
|
|
2012
|
-
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
2013
|
-
_ref$pagelock = _ref.pagelock,
|
|
2014
|
-
pagelock = _ref$pagelock === void 0 ? true : _ref$pagelock,
|
|
2015
|
-
_ref$displayType = _ref.displayType,
|
|
2016
|
-
displayType = _ref$displayType === void 0 ? 'large' : _ref$displayType;
|
|
2017
|
-
|
|
2018
|
-
/**
|
|
2019
|
-
* Set defaults
|
|
2020
|
-
*/
|
|
2021
|
-
var progressMaxValue = 283;
|
|
2022
|
-
var strokeDashoffset = 0;
|
|
2023
|
-
/**
|
|
2024
|
-
* Sets the progress if in progress mode.
|
|
2025
|
-
* @param progress
|
|
2026
|
-
* @returns
|
|
2027
|
-
*/
|
|
2028
|
-
|
|
2029
|
-
function setProgress(progress) {
|
|
2030
|
-
if (type !== 'progress') {
|
|
2031
|
-
return;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
if (progress === 0) {
|
|
2035
|
-
strokeDashoffset = progressMaxValue;
|
|
2036
|
-
return;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
if (progress >= 100) {
|
|
2040
|
-
return;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
var value = progressMaxValue - Math.round(progressMaxValue * progress / 100);
|
|
2044
|
-
strokeDashoffset = value;
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
if (visible) {
|
|
2048
|
-
if (pagelock && displayType !== 'small') {
|
|
2049
|
-
document.body.style.height = '100%';
|
|
2050
|
-
document.body.style.overflow = 'hidden';
|
|
2051
|
-
} else {
|
|
2052
|
-
document.body.style.removeProperty('height');
|
|
2053
|
-
document.body.style.removeProperty('overflow');
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
if (type === 'progress') {
|
|
2057
|
-
setProgress(value);
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
2061
|
-
className: "progress-container--".concat(displayType),
|
|
2062
|
-
onKeyDown: function onKeyDown(event) {
|
|
2063
|
-
event.preventDefault();
|
|
2064
|
-
}
|
|
2065
|
-
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
2066
|
-
className: "".concat(displayType === 'large' ? 'svg' : "svg--small"),
|
|
2067
|
-
fill: "none",
|
|
2068
|
-
viewBox: "0 0 100 100",
|
|
2069
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2070
|
-
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
2071
|
-
className: "base-circle",
|
|
2072
|
-
cx: "50",
|
|
2073
|
-
cy: "50",
|
|
2074
|
-
r: "45"
|
|
2075
|
-
}), /*#__PURE__*/React__default.createElement("circle", {
|
|
2076
|
-
className: "".concat(type === 'infinite' ? 'progress-circle--infinite' : 'progress-circle'),
|
|
2077
|
-
cx: "50",
|
|
2078
|
-
cy: "50",
|
|
2079
|
-
r: "45",
|
|
2080
|
-
style: {
|
|
2081
|
-
strokeDashoffset: strokeDashoffset
|
|
2082
|
-
}
|
|
2083
|
-
})), /*#__PURE__*/React__default.createElement("span", {
|
|
2084
|
-
className: "progress-message--".concat(displayType)
|
|
2085
|
-
}, message));
|
|
2086
|
-
} else {
|
|
2087
|
-
document.body.style.removeProperty('height');
|
|
2088
|
-
document.body.style.removeProperty('overflow');
|
|
2089
|
-
return null;
|
|
2090
|
-
}
|
|
2091
|
-
};
|
|
2092
|
-
GoAPageLoader.propTypes = {
|
|
2093
|
-
visible: propTypes.bool,
|
|
2094
|
-
message: propTypes.string,
|
|
2095
|
-
value: propTypes.number,
|
|
2096
|
-
type: propTypes.string,
|
|
2097
|
-
pagelock: propTypes.bool,
|
|
2098
|
-
displayType: propTypes.string
|
|
2099
|
-
};
|
|
2100
|
-
|
|
2101
|
-
var css_248z$a = "@use '../variables/main.css';\n/* Palette */\n/* Semantic usages */\n@-webkit-keyframes pulse {\n 0% {\n opacity: 0.5; }\n 50% {\n opacity: 1; }\n 100% {\n opacity: 0.5; } }\n@keyframes pulse {\n 0% {\n opacity: 0.5; }\n 50% {\n opacity: 1; }\n 100% {\n opacity: 0.5; } }\n\n[data-skeleton] {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n [data-skeleton] * {\n border-color: #ddd !important;\n color: transparent !important; }\n [data-skeleton] p,\n [data-skeleton] a {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n display: inline;\n line-height: 0 !important;\n font-size: 50% !important; }\n [data-skeleton] p::after,\n [data-skeleton] a::after {\n content: '' !important;\n display: block !important;\n margin-bottom: 1rem !important;\n background-size: contain; }\n [data-skeleton] h1,\n [data-skeleton] h2,\n [data-skeleton] h3,\n [data-skeleton] h4,\n [data-skeleton] h5,\n [data-skeleton] h6 {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n margin-bottom: 1rem; }\n [data-skeleton] h1 {\n height: calc(0.6 * var(--fs-3xl)) !important; }\n [data-skeleton] h2 {\n height: calc(0.6 * var(--fs-2xl)) !important; }\n [data-skeleton] h3 {\n height: calc(0.6 * var(--fs-xl)) !important; }\n [data-skeleton] h4 {\n height: calc(0.6 * var(--fs-lg)) !important; }\n [data-skeleton] img {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out; }\n\n/* basic styles */\n.skeleton {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n background: #dcdcdc;\n overflow: hidden;\n margin: 10px 0; }\n\n.skeleton.text {\n width: 100%;\n height: 12px; }\n\n.skeleton.paragraph {\n width: 100%;\n height: 70px; }\n\n.skeleton.title {\n width: 50%;\n height: 20px;\n margin-bottom: 15px; }\n\n.skeleton.avatar {\n width: 100px;\n height: 100px;\n border-radius: 50%; }\n\n.skeleton.thumbnail {\n width: 100px;\n height: 100px; }\n\n/* skeleton image text */\n.skeleton-image-content {\n display: flex;\n flex-direction: row;\n gap: 30px; }\n\n.skeleton-image-content__text {\n flex: 1 1 auto; }\n\n/* skeleton content */\n.skeleton-content {\n display: grid;\n grid-template-columns: 1fr;\n gap: 30px;\n align-items: left; }\n";
|
|
2102
|
-
styleInject(css_248z$a);
|
|
2103
|
-
|
|
2104
|
-
var GoASkeletonElement = function GoASkeletonElement(_ref) {
|
|
2105
|
-
var _ref$type = _ref.type,
|
|
2106
|
-
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
2107
|
-
var classes = "skeleton ".concat(type);
|
|
2108
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
2109
|
-
className: classes
|
|
2110
|
-
});
|
|
2111
|
-
};
|
|
2112
|
-
|
|
2113
|
-
var GoASkeletonContent = function GoASkeletonContent(_ref) {
|
|
2114
|
-
var _ref$rows = _ref.rows,
|
|
2115
|
-
rows = _ref$rows === void 0 ? 1 : _ref$rows;
|
|
2116
|
-
var elements = [];
|
|
2117
|
-
|
|
2118
|
-
for (var i = 0; i < rows; i++) {
|
|
2119
|
-
elements.push( /*#__PURE__*/React__default.createElement(GoASkeletonElement, {
|
|
2120
|
-
type: "text"
|
|
2121
|
-
}));
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2101
|
+
var GoAFormItem = function GoAFormItem(_ref) {
|
|
2102
|
+
var children = _ref.children,
|
|
2103
|
+
helpText = _ref.helpText,
|
|
2104
|
+
error = _ref.error;
|
|
2105
|
+
var className = error ? "goa-form-item error" : "goa-form-item";
|
|
2124
2106
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2125
|
-
className:
|
|
2126
|
-
}, /*#__PURE__*/React__default.createElement("div",
|
|
2127
|
-
|
|
2128
|
-
}),
|
|
2107
|
+
className: className
|
|
2108
|
+
}, children, error && /*#__PURE__*/React__default.createElement("div", {
|
|
2109
|
+
className: "error-msg"
|
|
2110
|
+
}, error), helpText && !error && /*#__PURE__*/React__default.createElement("div", {
|
|
2111
|
+
id: "helpText",
|
|
2112
|
+
className: "help-msg"
|
|
2113
|
+
}, helpText));
|
|
2129
2114
|
};
|
|
2130
2115
|
|
|
2131
|
-
var
|
|
2132
|
-
var
|
|
2133
|
-
rows = _ref$rows === void 0 ? 1 : _ref$rows;
|
|
2134
|
-
var elements = [];
|
|
2135
|
-
|
|
2136
|
-
for (var i = 0; i < rows; i++) {
|
|
2137
|
-
elements.push( /*#__PURE__*/React__default.createElement(GoASkeletonElement, {
|
|
2138
|
-
type: "text"
|
|
2139
|
-
}));
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2116
|
+
var GoAFormActions = function GoAFormActions(_ref) {
|
|
2117
|
+
var children = _ref.children;
|
|
2142
2118
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2143
|
-
className: "
|
|
2144
|
-
},
|
|
2119
|
+
className: "goa-form-actions"
|
|
2120
|
+
}, children);
|
|
2145
2121
|
};
|
|
2146
2122
|
|
|
2147
|
-
var
|
|
2148
|
-
|
|
2149
|
-
rows = _ref$rows === void 0 ? 1 : _ref$rows;
|
|
2150
|
-
var elements = [];
|
|
2151
|
-
|
|
2152
|
-
for (var i = 0; i < rows; i++) {
|
|
2153
|
-
elements.push( /*#__PURE__*/React__default.createElement(GoASkeletonElement, {
|
|
2154
|
-
type: "text"
|
|
2155
|
-
}));
|
|
2156
|
-
}
|
|
2123
|
+
var css_248z$6 = "/* Palette */\n/* Semantic usages */\n.goa-form {\n box-sizing: border-box; }\n\n.goa-form *,\n.goa-form *:before,\n.goa-form *:after {\n box-sizing: inherit; }\n\n.goa-form-item {\n margin-bottom: 0.5rem; }\n .goa-form-item label {\n display: block;\n font-weight: bold;\n color: #333; }\n .goa-form-item input,\n .goa-form-item textarea {\n display: block;\n width: 100%;\n padding: 0.5rem;\n border-radius: 4px;\n border: 1px solid var(--color-gray-600); }\n .goa-form-item.error input,\n .goa-form-item.error textarea {\n border-color: var(--color-red-600); }\n .goa-form-item.error .error-msg {\n color: var(--color-red-600); }\n .goa-form-item .help-msg {\n font-size: var(--fs-sm);\n font-weight: 200;\n color: var(--color-gray-600); }\n\n.goa-form-actions {\n margin-top: 2rem; }\n @media (min-width: 640px) {\n .goa-form-actions {\n display: flex;\n justify-content: flex-end;\n align-items: flex-end; }\n .goa-form-actions button {\n min-width: 6rem; }\n .goa-form-actions button + button,\n .goa-form-actions button + .goa-link-button,\n .goa-form-actions .goa-link-button + button,\n .goa-form-actions .goa-link-button + .goa-link-button {\n margin-left: 0.5rem; } }\n .goa-form-actions button {\n margin: 0; }\n";
|
|
2124
|
+
styleInject(css_248z$6);
|
|
2157
2125
|
|
|
2126
|
+
var GoAForm = function GoAForm(_ref) {
|
|
2127
|
+
var children = _ref.children;
|
|
2158
2128
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2159
|
-
className: "
|
|
2160
|
-
},
|
|
2161
|
-
type: "thumbnail"
|
|
2162
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2163
|
-
className: "skeleton-image-content__text"
|
|
2164
|
-
}, /*#__PURE__*/React__default.createElement(GoASkeletonElement, {
|
|
2165
|
-
type: "title"
|
|
2166
|
-
}), elements));
|
|
2129
|
+
className: "goa-form"
|
|
2130
|
+
}, children);
|
|
2167
2131
|
};
|
|
2168
2132
|
|
|
2169
2133
|
exports.GoABadge = GoABadge;
|
|
2170
|
-
exports.GoAElementLoader = GoAElementLoader;
|
|
2171
2134
|
exports.GoAForm = GoAForm;
|
|
2172
|
-
exports.
|
|
2173
|
-
exports.GoAFormContainer = GoAFormContainer;
|
|
2135
|
+
exports.GoAFormActions = GoAFormActions;
|
|
2174
2136
|
exports.GoAFormItem = GoAFormItem;
|
|
2137
|
+
exports.GoAIcon = GoAIcon;
|
|
2138
|
+
exports.GoAIconButton = GoAIconButton;
|
|
2175
2139
|
exports.GoAInput = GoAInput;
|
|
2176
2140
|
exports.GoAModal = GoAModal;
|
|
2177
2141
|
exports.GoAModalActions = GoAModalActions;
|
|
2178
2142
|
exports.GoAModalContent = GoAModalContent;
|
|
2179
2143
|
exports.GoAModalTitle = GoAModalTitle;
|
|
2180
|
-
exports.GoAPageLoader = GoAPageLoader;
|
|
2181
2144
|
exports.GoAScrollable = GoAScrollable;
|
|
2182
|
-
exports.
|
|
2183
|
-
exports.
|
|
2184
|
-
exports.GoASkeletonImageContent = GoASkeletonImageContent;
|
|
2145
|
+
exports.GoATransition = GoATransition;
|
|
2146
|
+
exports.GoATransitionSequence = GoATransitionSequence;
|
|
2185
2147
|
|
|
2186
2148
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2187
2149
|
|