@abgov/react-components 3.4.0-beta.7 → 4.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +44 -97
  2. package/experimental/index.d.ts +0 -0
  3. package/experimental/package.json +1 -1
  4. package/experimental/react-components.esm.js +0 -2109
  5. package/experimental/react-components.umd.js +5 -2131
  6. package/index.d.ts +32 -16
  7. package/lib/app-header/app-header.d.ts +18 -0
  8. package/lib/badge/badge.d.ts +28 -0
  9. package/lib/button/button.d.ts +27 -35
  10. package/lib/button-group/button-group.d.ts +18 -0
  11. package/lib/callout/callout.d.ts +14 -23
  12. package/lib/card/card-actions.d.ts +16 -0
  13. package/lib/card/card-content.d.ts +13 -0
  14. package/lib/card/card-group.d.ts +16 -0
  15. package/lib/card/card-image.d.ts +18 -0
  16. package/lib/card/card.d.ts +18 -0
  17. package/lib/card/index.d.ts +5 -0
  18. package/lib/checkbox/checkbox.d.ts +27 -36
  19. package/lib/circular-progress/circular-progress.d.ts +29 -0
  20. package/lib/container/container.d.ts +23 -0
  21. package/lib/dropdown/dropdown-option.d.ts +21 -0
  22. package/lib/dropdown/dropdown.d.ts +37 -0
  23. package/lib/flex/index.d.ts +1 -0
  24. package/lib/flex/row.d.ts +7 -0
  25. package/lib/form/form-item.d.ts +22 -0
  26. package/lib/form/index.d.ts +1 -0
  27. package/lib/form/validators.d.ts +10 -0
  28. package/lib/hero-banner/hero-banner-actions.d.ts +4 -0
  29. package/lib/hero-banner/hero-banner.d.ts +18 -0
  30. package/lib/icons/icon-button.d.ts +27 -0
  31. package/lib/icons/icon.d.ts +37 -0
  32. package/lib/icons/index.d.ts +2 -0
  33. package/lib/input/input.d.ts +73 -0
  34. package/lib/microsite-header/microsite-header.d.ts +21 -0
  35. package/lib/modal/modal.d.ts +25 -0
  36. package/lib/notification/notification.d.ts +14 -35
  37. package/lib/page-block/page-block.d.ts +9 -0
  38. package/lib/radio-group/radio-group.d.ts +21 -44
  39. package/lib/radio-group/radio.d.ts +27 -0
  40. package/lib/skeleton/skeleton.d.ts +19 -0
  41. package/lib/spinner/spinner.d.ts +26 -0
  42. package/lib/textarea/textarea.d.ts +30 -0
  43. package/package.json +5 -4
  44. package/react-components.esm.js +741 -2619
  45. package/react-components.umd.js +775 -2638
  46. package/experimental/experimental/badge/badge.component.d.ts +0 -8
  47. package/experimental/experimental/common.d.ts +0 -3
  48. package/experimental/experimental/element-loader/element-loader.d.ts +0 -18
  49. package/experimental/experimental/form/container/form.button.component.d.ts +0 -7
  50. package/experimental/experimental/form/container/form.container.component.d.ts +0 -7
  51. package/experimental/experimental/form/container/form.item.component.d.ts +0 -18
  52. package/experimental/experimental/form/form.component.d.ts +0 -32
  53. package/experimental/experimental/form/formFieldValidator.d.ts +0 -4
  54. package/experimental/experimental/icons/icons.d.ts +0 -13
  55. package/experimental/experimental/index.d.ts +0 -10
  56. package/experimental/experimental/input/input.component.d.ts +0 -15
  57. package/experimental/experimental/modal/modal.component.d.ts +0 -44
  58. package/experimental/experimental/scrollable/scrollable.component.d.ts +0 -12
  59. package/experimental/experimental/skeleton/skeleton-element.d.ts +0 -8
  60. package/experimental/experimental/skeleton/skeleton-grid-column.d.ts +0 -9
  61. package/experimental/experimental/skeleton/skeleton-image-content.d.ts +0 -9
  62. package/experimental/experimental/skeleton/skeleton-titled-content.d.ts +0 -9
  63. package/lib/card/card.component.d.ts +0 -26
  64. package/lib/card-group/card.group.component.d.ts +0 -24
  65. package/lib/dropdown/dropdown.component.d.ts +0 -59
  66. package/lib/dropdown/dropdown.context.d.ts +0 -17
  67. package/lib/dropdown/option/option.component.d.ts +0 -10
  68. package/lib/dropdown/option-group/option-group.component.d.ts +0 -6
  69. package/lib/header/header.d.ts +0 -10
  70. package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -7
  71. package/lib/hero-banner/hero-banner.component.d.ts +0 -11
  72. package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -8
  73. package/lib/microsite-logo/microsite-logo.d.ts +0 -8
  74. package/lib/page-loader/page-loader.d.ts +0 -43
  75. package/lib/radio-group/radio/radio.d.ts +0 -17
  76. package/lib/radio-group/radio-group.context.d.ts +0 -6
@@ -1,2678 +1,800 @@
1
- import React, { useState, Fragment as Fragment$1, useContext, Children, createContext, useEffect, useRef } from 'react';
2
- import classnames from 'classnames';
3
-
4
- function _defineProperty(obj, key, value) {
5
- if (key in obj) {
6
- Object.defineProperty(obj, key, {
7
- value: value,
8
- enumerable: true,
9
- configurable: true,
10
- writable: true
11
- });
12
- } else {
13
- obj[key] = value;
14
- }
15
-
16
- return obj;
17
- }
18
-
19
- function ownKeys(object, enumerableOnly) {
20
- var keys = Object.keys(object);
21
-
22
- if (Object.getOwnPropertySymbols) {
23
- var symbols = Object.getOwnPropertySymbols(object);
24
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
25
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
26
- });
27
- keys.push.apply(keys, symbols);
28
- }
29
-
30
- return keys;
31
- }
32
-
33
- function _objectSpread2(target) {
34
- for (var i = 1; i < arguments.length; i++) {
35
- var source = arguments[i] != null ? arguments[i] : {};
36
-
37
- if (i % 2) {
38
- ownKeys(Object(source), true).forEach(function (key) {
39
- _defineProperty(target, key, source[key]);
40
- });
41
- } else if (Object.getOwnPropertyDescriptors) {
42
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
43
- } else {
44
- ownKeys(Object(source)).forEach(function (key) {
45
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
46
- });
47
- }
48
- }
49
-
50
- return target;
51
- }
52
-
53
- function _objectWithoutPropertiesLoose(source, excluded) {
54
- if (source == null) return {};
55
- var target = {};
56
- var sourceKeys = Object.keys(source);
57
- var key, i;
58
-
59
- for (i = 0; i < sourceKeys.length; i++) {
60
- key = sourceKeys[i];
61
- if (excluded.indexOf(key) >= 0) continue;
62
- target[key] = source[key];
63
- }
64
-
65
- return target;
66
- }
67
-
68
- function _objectWithoutProperties(source, excluded) {
69
- if (source == null) return {};
70
-
71
- var target = _objectWithoutPropertiesLoose(source, excluded);
72
-
73
- var key, i;
74
-
75
- if (Object.getOwnPropertySymbols) {
76
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
77
-
78
- for (i = 0; i < sourceSymbolKeys.length; i++) {
79
- key = sourceSymbolKeys[i];
80
- if (excluded.indexOf(key) >= 0) continue;
81
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
82
- target[key] = source[key];
83
- }
84
- }
85
-
86
- return target;
87
- }
88
-
89
- function _slicedToArray(arr, i) {
90
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
91
- }
92
-
93
- function _toConsumableArray(arr) {
94
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
95
- }
96
-
97
- function _arrayWithoutHoles(arr) {
98
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
99
- }
100
-
101
- function _arrayWithHoles(arr) {
102
- if (Array.isArray(arr)) return arr;
103
- }
104
-
105
- function _iterableToArray(iter) {
106
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
107
- }
108
-
109
- function _iterableToArrayLimit(arr, i) {
110
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
111
- var _arr = [];
112
- var _n = true;
113
- var _d = false;
114
- var _e = undefined;
115
-
116
- try {
117
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
118
- _arr.push(_s.value);
119
-
120
- if (i && _arr.length === i) break;
121
- }
122
- } catch (err) {
123
- _d = true;
124
- _e = err;
125
- } finally {
126
- try {
127
- if (!_n && _i["return"] != null) _i["return"]();
128
- } finally {
129
- if (_d) throw _e;
130
- }
131
- }
132
-
133
- return _arr;
134
- }
135
-
136
- function _unsupportedIterableToArray(o, minLen) {
137
- if (!o) return;
138
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
139
- var n = Object.prototype.toString.call(o).slice(8, -1);
140
- if (n === "Object" && o.constructor) n = o.constructor.name;
141
- if (n === "Map" || n === "Set") return Array.from(o);
142
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
143
- }
144
-
145
- function _arrayLikeToArray(arr, len) {
146
- if (len == null || len > arr.length) len = arr.length;
147
-
148
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
149
-
150
- return arr2;
151
- }
152
-
153
- function _nonIterableSpread() {
154
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
155
- }
156
-
157
- function _nonIterableRest() {
158
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
159
- }
160
-
161
- function createCommonjsModule(fn, module) {
162
- return module = { exports: {} }, fn(module, module.exports), module.exports;
163
- }
164
-
165
- /** @license React v16.13.1
166
- * react-is.production.min.js
167
- *
168
- * Copyright (c) Facebook, Inc. and its affiliates.
169
- *
170
- * This source code is licensed under the MIT license found in the
171
- * LICENSE file in the root directory of this source tree.
172
- */
173
- 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?
174
- 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;
175
- 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;
176
- 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};
177
- 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};
178
- 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;
179
-
180
- var reactIs_production_min = {
181
- AsyncMode: AsyncMode,
182
- ConcurrentMode: ConcurrentMode,
183
- ContextConsumer: ContextConsumer,
184
- ContextProvider: ContextProvider,
185
- Element: Element,
186
- ForwardRef: ForwardRef,
187
- Fragment: Fragment,
188
- Lazy: Lazy,
189
- Memo: Memo,
190
- Portal: Portal,
191
- Profiler: Profiler,
192
- StrictMode: StrictMode,
193
- Suspense: Suspense,
194
- isAsyncMode: isAsyncMode,
195
- isConcurrentMode: isConcurrentMode,
196
- isContextConsumer: isContextConsumer,
197
- isContextProvider: isContextProvider,
198
- isElement: isElement,
199
- isForwardRef: isForwardRef,
200
- isFragment: isFragment,
201
- isLazy: isLazy,
202
- isMemo: isMemo,
203
- isPortal: isPortal,
204
- isProfiler: isProfiler,
205
- isStrictMode: isStrictMode,
206
- isSuspense: isSuspense,
207
- isValidElementType: isValidElementType,
208
- typeOf: typeOf
209
- };
210
-
211
- var reactIs_development = createCommonjsModule(function (module, exports) {
212
-
213
-
214
-
215
- if (process.env.NODE_ENV !== "production") {
216
- (function() {
217
-
218
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
219
- // nor polyfill, then a plain number is used for performance.
220
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
221
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
222
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
223
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
224
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
225
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
226
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
227
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
228
- // (unstable) APIs that have been removed. Can we remove the symbols?
229
-
230
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
231
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
232
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
233
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
234
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
235
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
236
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
237
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
238
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
239
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
240
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
241
-
242
- function isValidElementType(type) {
243
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
244
- 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);
245
- }
246
-
247
- function typeOf(object) {
248
- if (typeof object === 'object' && object !== null) {
249
- var $$typeof = object.$$typeof;
250
-
251
- switch ($$typeof) {
252
- case REACT_ELEMENT_TYPE:
253
- var type = object.type;
254
-
255
- switch (type) {
256
- case REACT_ASYNC_MODE_TYPE:
257
- case REACT_CONCURRENT_MODE_TYPE:
258
- case REACT_FRAGMENT_TYPE:
259
- case REACT_PROFILER_TYPE:
260
- case REACT_STRICT_MODE_TYPE:
261
- case REACT_SUSPENSE_TYPE:
262
- return type;
263
-
264
- default:
265
- var $$typeofType = type && type.$$typeof;
266
-
267
- switch ($$typeofType) {
268
- case REACT_CONTEXT_TYPE:
269
- case REACT_FORWARD_REF_TYPE:
270
- case REACT_LAZY_TYPE:
271
- case REACT_MEMO_TYPE:
272
- case REACT_PROVIDER_TYPE:
273
- return $$typeofType;
274
-
275
- default:
276
- return $$typeof;
277
- }
278
-
279
- }
280
-
281
- case REACT_PORTAL_TYPE:
282
- return $$typeof;
283
- }
284
- }
285
-
286
- return undefined;
287
- } // AsyncMode is deprecated along with isAsyncMode
288
-
289
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
290
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
291
- var ContextConsumer = REACT_CONTEXT_TYPE;
292
- var ContextProvider = REACT_PROVIDER_TYPE;
293
- var Element = REACT_ELEMENT_TYPE;
294
- var ForwardRef = REACT_FORWARD_REF_TYPE;
295
- var Fragment = REACT_FRAGMENT_TYPE;
296
- var Lazy = REACT_LAZY_TYPE;
297
- var Memo = REACT_MEMO_TYPE;
298
- var Portal = REACT_PORTAL_TYPE;
299
- var Profiler = REACT_PROFILER_TYPE;
300
- var StrictMode = REACT_STRICT_MODE_TYPE;
301
- var Suspense = REACT_SUSPENSE_TYPE;
302
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
303
-
304
- function isAsyncMode(object) {
305
- {
306
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
307
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
308
-
309
- 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.');
310
- }
311
- }
312
-
313
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
314
- }
315
- function isConcurrentMode(object) {
316
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
317
- }
318
- function isContextConsumer(object) {
319
- return typeOf(object) === REACT_CONTEXT_TYPE;
320
- }
321
- function isContextProvider(object) {
322
- return typeOf(object) === REACT_PROVIDER_TYPE;
323
- }
324
- function isElement(object) {
325
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
326
- }
327
- function isForwardRef(object) {
328
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
329
- }
330
- function isFragment(object) {
331
- return typeOf(object) === REACT_FRAGMENT_TYPE;
332
- }
333
- function isLazy(object) {
334
- return typeOf(object) === REACT_LAZY_TYPE;
335
- }
336
- function isMemo(object) {
337
- return typeOf(object) === REACT_MEMO_TYPE;
338
- }
339
- function isPortal(object) {
340
- return typeOf(object) === REACT_PORTAL_TYPE;
341
- }
342
- function isProfiler(object) {
343
- return typeOf(object) === REACT_PROFILER_TYPE;
344
- }
345
- function isStrictMode(object) {
346
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
347
- }
348
- function isSuspense(object) {
349
- return typeOf(object) === REACT_SUSPENSE_TYPE;
350
- }
351
-
352
- exports.AsyncMode = AsyncMode;
353
- exports.ConcurrentMode = ConcurrentMode;
354
- exports.ContextConsumer = ContextConsumer;
355
- exports.ContextProvider = ContextProvider;
356
- exports.Element = Element;
357
- exports.ForwardRef = ForwardRef;
358
- exports.Fragment = Fragment;
359
- exports.Lazy = Lazy;
360
- exports.Memo = Memo;
361
- exports.Portal = Portal;
362
- exports.Profiler = Profiler;
363
- exports.StrictMode = StrictMode;
364
- exports.Suspense = Suspense;
365
- exports.isAsyncMode = isAsyncMode;
366
- exports.isConcurrentMode = isConcurrentMode;
367
- exports.isContextConsumer = isContextConsumer;
368
- exports.isContextProvider = isContextProvider;
369
- exports.isElement = isElement;
370
- exports.isForwardRef = isForwardRef;
371
- exports.isFragment = isFragment;
372
- exports.isLazy = isLazy;
373
- exports.isMemo = isMemo;
374
- exports.isPortal = isPortal;
375
- exports.isProfiler = isProfiler;
376
- exports.isStrictMode = isStrictMode;
377
- exports.isSuspense = isSuspense;
378
- exports.isValidElementType = isValidElementType;
379
- exports.typeOf = typeOf;
380
- })();
381
- }
382
- });
383
- var reactIs_development_1 = reactIs_development.AsyncMode;
384
- var reactIs_development_2 = reactIs_development.ConcurrentMode;
385
- var reactIs_development_3 = reactIs_development.ContextConsumer;
386
- var reactIs_development_4 = reactIs_development.ContextProvider;
387
- var reactIs_development_5 = reactIs_development.Element;
388
- var reactIs_development_6 = reactIs_development.ForwardRef;
389
- var reactIs_development_7 = reactIs_development.Fragment;
390
- var reactIs_development_8 = reactIs_development.Lazy;
391
- var reactIs_development_9 = reactIs_development.Memo;
392
- var reactIs_development_10 = reactIs_development.Portal;
393
- var reactIs_development_11 = reactIs_development.Profiler;
394
- var reactIs_development_12 = reactIs_development.StrictMode;
395
- var reactIs_development_13 = reactIs_development.Suspense;
396
- var reactIs_development_14 = reactIs_development.isAsyncMode;
397
- var reactIs_development_15 = reactIs_development.isConcurrentMode;
398
- var reactIs_development_16 = reactIs_development.isContextConsumer;
399
- var reactIs_development_17 = reactIs_development.isContextProvider;
400
- var reactIs_development_18 = reactIs_development.isElement;
401
- var reactIs_development_19 = reactIs_development.isForwardRef;
402
- var reactIs_development_20 = reactIs_development.isFragment;
403
- var reactIs_development_21 = reactIs_development.isLazy;
404
- var reactIs_development_22 = reactIs_development.isMemo;
405
- var reactIs_development_23 = reactIs_development.isPortal;
406
- var reactIs_development_24 = reactIs_development.isProfiler;
407
- var reactIs_development_25 = reactIs_development.isStrictMode;
408
- var reactIs_development_26 = reactIs_development.isSuspense;
409
- var reactIs_development_27 = reactIs_development.isValidElementType;
410
- var reactIs_development_28 = reactIs_development.typeOf;
411
-
412
- var reactIs = createCommonjsModule(function (module) {
413
-
414
- if (process.env.NODE_ENV === 'production') {
415
- module.exports = reactIs_production_min;
416
- } else {
417
- module.exports = reactIs_development;
418
- }
419
- });
420
-
421
- /*
422
- object-assign
423
- (c) Sindre Sorhus
424
- @license MIT
425
- */
426
- /* eslint-disable no-unused-vars */
427
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
428
- var hasOwnProperty = Object.prototype.hasOwnProperty;
429
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
430
-
431
- function toObject(val) {
432
- if (val === null || val === undefined) {
433
- throw new TypeError('Object.assign cannot be called with null or undefined');
434
- }
435
-
436
- return Object(val);
437
- }
438
-
439
- function shouldUseNative() {
440
- try {
441
- if (!Object.assign) {
442
- return false;
443
- }
444
-
445
- // Detect buggy property enumeration order in older V8 versions.
446
-
447
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
448
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
449
- test1[5] = 'de';
450
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
451
- return false;
452
- }
453
-
454
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
455
- var test2 = {};
456
- for (var i = 0; i < 10; i++) {
457
- test2['_' + String.fromCharCode(i)] = i;
458
- }
459
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
460
- return test2[n];
461
- });
462
- if (order2.join('') !== '0123456789') {
463
- return false;
464
- }
465
-
466
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
467
- var test3 = {};
468
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
469
- test3[letter] = letter;
470
- });
471
- if (Object.keys(Object.assign({}, test3)).join('') !==
472
- 'abcdefghijklmnopqrst') {
473
- return false;
474
- }
475
-
476
- return true;
477
- } catch (err) {
478
- // We don't expect any of the above to throw, but better to be safe.
479
- return false;
480
- }
481
- }
482
-
483
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
484
- var from;
485
- var to = toObject(target);
486
- var symbols;
487
-
488
- for (var s = 1; s < arguments.length; s++) {
489
- from = Object(arguments[s]);
490
-
491
- for (var key in from) {
492
- if (hasOwnProperty.call(from, key)) {
493
- to[key] = from[key];
494
- }
495
- }
496
-
497
- if (getOwnPropertySymbols) {
498
- symbols = getOwnPropertySymbols(from);
499
- for (var i = 0; i < symbols.length; i++) {
500
- if (propIsEnumerable.call(from, symbols[i])) {
501
- to[symbols[i]] = from[symbols[i]];
502
- }
503
- }
504
- }
505
- }
506
-
507
- return to;
508
- };
509
-
510
- /**
511
- * Copyright (c) 2013-present, Facebook, Inc.
512
- *
513
- * This source code is licensed under the MIT license found in the
514
- * LICENSE file in the root directory of this source tree.
515
- */
516
-
517
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
518
-
519
- var ReactPropTypesSecret_1 = ReactPropTypesSecret;
520
-
521
- var printWarning = function() {};
522
-
523
- if (process.env.NODE_ENV !== 'production') {
524
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
525
- var loggedTypeFailures = {};
526
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
527
-
528
- printWarning = function(text) {
529
- var message = 'Warning: ' + text;
530
- if (typeof console !== 'undefined') {
531
- console.error(message);
532
- }
533
- try {
534
- // --- Welcome to debugging React ---
535
- // This error was thrown as a convenience so that you can use this stack
536
- // to find the callsite that caused this warning to fire.
537
- throw new Error(message);
538
- } catch (x) {}
539
- };
540
- }
541
-
542
- /**
543
- * Assert that the values match with the type specs.
544
- * Error messages are memorized and will only be shown once.
545
- *
546
- * @param {object} typeSpecs Map of name to a ReactPropType
547
- * @param {object} values Runtime values that need to be type-checked
548
- * @param {string} location e.g. "prop", "context", "child context"
549
- * @param {string} componentName Name of the component for error messages.
550
- * @param {?Function} getStack Returns the component stack.
551
- * @private
552
- */
553
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
554
- if (process.env.NODE_ENV !== 'production') {
555
- for (var typeSpecName in typeSpecs) {
556
- if (has(typeSpecs, typeSpecName)) {
557
- var error;
558
- // Prop type validation may throw. In case they do, we don't want to
559
- // fail the render phase where it didn't fail before. So we log it.
560
- // After these have been cleaned up, we'll let them throw.
561
- try {
562
- // This is intentionally an invariant that gets caught. It's the same
563
- // behavior as without this statement except with a better message.
564
- if (typeof typeSpecs[typeSpecName] !== 'function') {
565
- var err = Error(
566
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
567
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
568
- );
569
- err.name = 'Invariant Violation';
570
- throw err;
571
- }
572
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
573
- } catch (ex) {
574
- error = ex;
575
- }
576
- if (error && !(error instanceof Error)) {
577
- printWarning(
578
- (componentName || 'React class') + ': type specification of ' +
579
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
580
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
581
- 'You may have forgotten to pass an argument to the type checker ' +
582
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
583
- 'shape all require an argument).'
584
- );
585
- }
586
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
587
- // Only monitor this failure once because there tends to be a lot of the
588
- // same error.
589
- loggedTypeFailures[error.message] = true;
590
-
591
- var stack = getStack ? getStack() : '';
592
-
593
- printWarning(
594
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
595
- );
596
- }
597
- }
598
- }
599
- }
600
- }
601
-
602
- /**
603
- * Resets warning cache when testing.
604
- *
605
- * @private
606
- */
607
- checkPropTypes.resetWarningCache = function() {
608
- if (process.env.NODE_ENV !== 'production') {
609
- loggedTypeFailures = {};
610
- }
611
- };
612
-
613
- var checkPropTypes_1 = checkPropTypes;
614
-
615
- var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
616
- var printWarning$1 = function() {};
617
-
618
- if (process.env.NODE_ENV !== 'production') {
619
- printWarning$1 = function(text) {
620
- var message = 'Warning: ' + text;
621
- if (typeof console !== 'undefined') {
622
- console.error(message);
623
- }
624
- try {
625
- // --- Welcome to debugging React ---
626
- // This error was thrown as a convenience so that you can use this stack
627
- // to find the callsite that caused this warning to fire.
628
- throw new Error(message);
629
- } catch (x) {}
630
- };
631
- }
632
-
633
- function emptyFunctionThatReturnsNull() {
634
- return null;
635
- }
636
-
637
- var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
638
- /* global Symbol */
639
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
640
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
641
-
642
- /**
643
- * Returns the iterator method function contained on the iterable object.
644
- *
645
- * Be sure to invoke the function with the iterable as context:
646
- *
647
- * var iteratorFn = getIteratorFn(myIterable);
648
- * if (iteratorFn) {
649
- * var iterator = iteratorFn.call(myIterable);
650
- * ...
651
- * }
652
- *
653
- * @param {?object} maybeIterable
654
- * @return {?function}
655
- */
656
- function getIteratorFn(maybeIterable) {
657
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
658
- if (typeof iteratorFn === 'function') {
659
- return iteratorFn;
660
- }
661
- }
662
-
663
- /**
664
- * Collection of methods that allow declaration and validation of props that are
665
- * supplied to React components. Example usage:
666
- *
667
- * var Props = require('ReactPropTypes');
668
- * var MyArticle = React.createClass({
669
- * propTypes: {
670
- * // An optional string prop named "description".
671
- * description: Props.string,
672
- *
673
- * // A required enum prop named "category".
674
- * category: Props.oneOf(['News','Photos']).isRequired,
675
- *
676
- * // A prop named "dialog" that requires an instance of Dialog.
677
- * dialog: Props.instanceOf(Dialog).isRequired
678
- * },
679
- * render: function() { ... }
680
- * });
681
- *
682
- * A more formal specification of how these methods are used:
683
- *
684
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
685
- * decl := ReactPropTypes.{type}(.isRequired)?
686
- *
687
- * Each and every declaration produces a function with the same signature. This
688
- * allows the creation of custom validation functions. For example:
689
- *
690
- * var MyLink = React.createClass({
691
- * propTypes: {
692
- * // An optional string or URI prop named "href".
693
- * href: function(props, propName, componentName) {
694
- * var propValue = props[propName];
695
- * if (propValue != null && typeof propValue !== 'string' &&
696
- * !(propValue instanceof URI)) {
697
- * return new Error(
698
- * 'Expected a string or an URI for ' + propName + ' in ' +
699
- * componentName
700
- * );
701
- * }
702
- * }
703
- * },
704
- * render: function() {...}
705
- * });
706
- *
707
- * @internal
708
- */
709
-
710
- var ANONYMOUS = '<<anonymous>>';
711
-
712
- // Important!
713
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
714
- var ReactPropTypes = {
715
- array: createPrimitiveTypeChecker('array'),
716
- bool: createPrimitiveTypeChecker('boolean'),
717
- func: createPrimitiveTypeChecker('function'),
718
- number: createPrimitiveTypeChecker('number'),
719
- object: createPrimitiveTypeChecker('object'),
720
- string: createPrimitiveTypeChecker('string'),
721
- symbol: createPrimitiveTypeChecker('symbol'),
722
-
723
- any: createAnyTypeChecker(),
724
- arrayOf: createArrayOfTypeChecker,
725
- element: createElementTypeChecker(),
726
- elementType: createElementTypeTypeChecker(),
727
- instanceOf: createInstanceTypeChecker,
728
- node: createNodeChecker(),
729
- objectOf: createObjectOfTypeChecker,
730
- oneOf: createEnumTypeChecker,
731
- oneOfType: createUnionTypeChecker,
732
- shape: createShapeTypeChecker,
733
- exact: createStrictShapeTypeChecker,
734
- };
735
-
736
- /**
737
- * inlined Object.is polyfill to avoid requiring consumers ship their own
738
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
739
- */
740
- /*eslint-disable no-self-compare*/
741
- function is(x, y) {
742
- // SameValue algorithm
743
- if (x === y) {
744
- // Steps 1-5, 7-10
745
- // Steps 6.b-6.e: +0 != -0
746
- return x !== 0 || 1 / x === 1 / y;
747
- } else {
748
- // Step 6.a: NaN == NaN
749
- return x !== x && y !== y;
750
- }
751
- }
752
- /*eslint-enable no-self-compare*/
753
-
754
- /**
755
- * We use an Error-like object for backward compatibility as people may call
756
- * PropTypes directly and inspect their output. However, we don't use real
757
- * Errors anymore. We don't inspect their stack anyway, and creating them
758
- * is prohibitively expensive if they are created too often, such as what
759
- * happens in oneOfType() for any type before the one that matched.
760
- */
761
- function PropTypeError(message) {
762
- this.message = message;
763
- this.stack = '';
764
- }
765
- // Make `instanceof Error` still work for returned errors.
766
- PropTypeError.prototype = Error.prototype;
767
-
768
- function createChainableTypeChecker(validate) {
769
- if (process.env.NODE_ENV !== 'production') {
770
- var manualPropTypeCallCache = {};
771
- var manualPropTypeWarningCount = 0;
772
- }
773
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
774
- componentName = componentName || ANONYMOUS;
775
- propFullName = propFullName || propName;
776
-
777
- if (secret !== ReactPropTypesSecret_1) {
778
- if (throwOnDirectAccess) {
779
- // New behavior only for users of `prop-types` package
780
- var err = new Error(
781
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
782
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
783
- 'Read more at http://fb.me/use-check-prop-types'
784
- );
785
- err.name = 'Invariant Violation';
786
- throw err;
787
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
788
- // Old behavior for people using React.PropTypes
789
- var cacheKey = componentName + ':' + propName;
790
- if (
791
- !manualPropTypeCallCache[cacheKey] &&
792
- // Avoid spamming the console because they are often not actionable except for lib authors
793
- manualPropTypeWarningCount < 3
794
- ) {
795
- printWarning$1(
796
- 'You are manually calling a React.PropTypes validation ' +
797
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
798
- 'and will throw in the standalone `prop-types` package. ' +
799
- 'You may be seeing this warning due to a third-party PropTypes ' +
800
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
801
- );
802
- manualPropTypeCallCache[cacheKey] = true;
803
- manualPropTypeWarningCount++;
804
- }
805
- }
806
- }
807
- if (props[propName] == null) {
808
- if (isRequired) {
809
- if (props[propName] === null) {
810
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
811
- }
812
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
813
- }
814
- return null;
815
- } else {
816
- return validate(props, propName, componentName, location, propFullName);
817
- }
818
- }
819
-
820
- var chainedCheckType = checkType.bind(null, false);
821
- chainedCheckType.isRequired = checkType.bind(null, true);
822
-
823
- return chainedCheckType;
824
- }
825
-
826
- function createPrimitiveTypeChecker(expectedType) {
827
- function validate(props, propName, componentName, location, propFullName, secret) {
828
- var propValue = props[propName];
829
- var propType = getPropType(propValue);
830
- if (propType !== expectedType) {
831
- // `propValue` being instance of, say, date/regexp, pass the 'object'
832
- // check, but we can offer a more precise error message here rather than
833
- // 'of type `object`'.
834
- var preciseType = getPreciseType(propValue);
835
-
836
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
837
- }
838
- return null;
839
- }
840
- return createChainableTypeChecker(validate);
841
- }
842
-
843
- function createAnyTypeChecker() {
844
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
845
- }
846
-
847
- function createArrayOfTypeChecker(typeChecker) {
848
- function validate(props, propName, componentName, location, propFullName) {
849
- if (typeof typeChecker !== 'function') {
850
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
851
- }
852
- var propValue = props[propName];
853
- if (!Array.isArray(propValue)) {
854
- var propType = getPropType(propValue);
855
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
856
- }
857
- for (var i = 0; i < propValue.length; i++) {
858
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
859
- if (error instanceof Error) {
860
- return error;
861
- }
862
- }
863
- return null;
864
- }
865
- return createChainableTypeChecker(validate);
866
- }
867
-
868
- function createElementTypeChecker() {
869
- function validate(props, propName, componentName, location, propFullName) {
870
- var propValue = props[propName];
871
- if (!isValidElement(propValue)) {
872
- var propType = getPropType(propValue);
873
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
874
- }
875
- return null;
876
- }
877
- return createChainableTypeChecker(validate);
878
- }
879
-
880
- function createElementTypeTypeChecker() {
881
- function validate(props, propName, componentName, location, propFullName) {
882
- var propValue = props[propName];
883
- if (!reactIs.isValidElementType(propValue)) {
884
- var propType = getPropType(propValue);
885
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
886
- }
887
- return null;
888
- }
889
- return createChainableTypeChecker(validate);
890
- }
891
-
892
- function createInstanceTypeChecker(expectedClass) {
893
- function validate(props, propName, componentName, location, propFullName) {
894
- if (!(props[propName] instanceof expectedClass)) {
895
- var expectedClassName = expectedClass.name || ANONYMOUS;
896
- var actualClassName = getClassName(props[propName]);
897
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
898
- }
899
- return null;
900
- }
901
- return createChainableTypeChecker(validate);
902
- }
903
-
904
- function createEnumTypeChecker(expectedValues) {
905
- if (!Array.isArray(expectedValues)) {
906
- if (process.env.NODE_ENV !== 'production') {
907
- if (arguments.length > 1) {
908
- printWarning$1(
909
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
910
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
911
- );
912
- } else {
913
- printWarning$1('Invalid argument supplied to oneOf, expected an array.');
914
- }
915
- }
916
- return emptyFunctionThatReturnsNull;
917
- }
918
-
919
- function validate(props, propName, componentName, location, propFullName) {
920
- var propValue = props[propName];
921
- for (var i = 0; i < expectedValues.length; i++) {
922
- if (is(propValue, expectedValues[i])) {
923
- return null;
924
- }
925
- }
926
-
927
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
928
- var type = getPreciseType(value);
929
- if (type === 'symbol') {
930
- return String(value);
931
- }
932
- return value;
933
- });
934
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
935
- }
936
- return createChainableTypeChecker(validate);
937
- }
938
-
939
- function createObjectOfTypeChecker(typeChecker) {
940
- function validate(props, propName, componentName, location, propFullName) {
941
- if (typeof typeChecker !== 'function') {
942
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
943
- }
944
- var propValue = props[propName];
945
- var propType = getPropType(propValue);
946
- if (propType !== 'object') {
947
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
948
- }
949
- for (var key in propValue) {
950
- if (has$1(propValue, key)) {
951
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
952
- if (error instanceof Error) {
953
- return error;
954
- }
955
- }
956
- }
957
- return null;
958
- }
959
- return createChainableTypeChecker(validate);
960
- }
961
-
962
- function createUnionTypeChecker(arrayOfTypeCheckers) {
963
- if (!Array.isArray(arrayOfTypeCheckers)) {
964
- process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
965
- return emptyFunctionThatReturnsNull;
966
- }
967
-
968
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
969
- var checker = arrayOfTypeCheckers[i];
970
- if (typeof checker !== 'function') {
971
- printWarning$1(
972
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
973
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
974
- );
975
- return emptyFunctionThatReturnsNull;
976
- }
977
- }
978
-
979
- function validate(props, propName, componentName, location, propFullName) {
980
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
981
- var checker = arrayOfTypeCheckers[i];
982
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
983
- return null;
984
- }
985
- }
986
-
987
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
988
- }
989
- return createChainableTypeChecker(validate);
990
- }
991
-
992
- function createNodeChecker() {
993
- function validate(props, propName, componentName, location, propFullName) {
994
- if (!isNode(props[propName])) {
995
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
996
- }
997
- return null;
998
- }
999
- return createChainableTypeChecker(validate);
1000
- }
1001
-
1002
- function createShapeTypeChecker(shapeTypes) {
1003
- function validate(props, propName, componentName, location, propFullName) {
1004
- var propValue = props[propName];
1005
- var propType = getPropType(propValue);
1006
- if (propType !== 'object') {
1007
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1008
- }
1009
- for (var key in shapeTypes) {
1010
- var checker = shapeTypes[key];
1011
- if (!checker) {
1012
- continue;
1013
- }
1014
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1015
- if (error) {
1016
- return error;
1017
- }
1018
- }
1019
- return null;
1020
- }
1021
- return createChainableTypeChecker(validate);
1022
- }
1023
-
1024
- function createStrictShapeTypeChecker(shapeTypes) {
1025
- function validate(props, propName, componentName, location, propFullName) {
1026
- var propValue = props[propName];
1027
- var propType = getPropType(propValue);
1028
- if (propType !== 'object') {
1029
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1030
- }
1031
- // We need to check all keys in case some are required but missing from
1032
- // props.
1033
- var allKeys = objectAssign({}, props[propName], shapeTypes);
1034
- for (var key in allKeys) {
1035
- var checker = shapeTypes[key];
1036
- if (!checker) {
1037
- return new PropTypeError(
1038
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1039
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1040
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1041
- );
1042
- }
1043
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1044
- if (error) {
1045
- return error;
1046
- }
1047
- }
1048
- return null;
1049
- }
1050
-
1051
- return createChainableTypeChecker(validate);
1052
- }
1053
-
1054
- function isNode(propValue) {
1055
- switch (typeof propValue) {
1056
- case 'number':
1057
- case 'string':
1058
- case 'undefined':
1059
- return true;
1060
- case 'boolean':
1061
- return !propValue;
1062
- case 'object':
1063
- if (Array.isArray(propValue)) {
1064
- return propValue.every(isNode);
1065
- }
1066
- if (propValue === null || isValidElement(propValue)) {
1067
- return true;
1068
- }
1069
-
1070
- var iteratorFn = getIteratorFn(propValue);
1071
- if (iteratorFn) {
1072
- var iterator = iteratorFn.call(propValue);
1073
- var step;
1074
- if (iteratorFn !== propValue.entries) {
1075
- while (!(step = iterator.next()).done) {
1076
- if (!isNode(step.value)) {
1077
- return false;
1078
- }
1079
- }
1080
- } else {
1081
- // Iterator will provide entry [k,v] tuples rather than values.
1082
- while (!(step = iterator.next()).done) {
1083
- var entry = step.value;
1084
- if (entry) {
1085
- if (!isNode(entry[1])) {
1086
- return false;
1087
- }
1088
- }
1089
- }
1090
- }
1091
- } else {
1092
- return false;
1093
- }
1094
-
1095
- return true;
1096
- default:
1097
- return false;
1098
- }
1099
- }
1100
-
1101
- function isSymbol(propType, propValue) {
1102
- // Native Symbol.
1103
- if (propType === 'symbol') {
1104
- return true;
1105
- }
1106
-
1107
- // falsy value can't be a Symbol
1108
- if (!propValue) {
1109
- return false;
1110
- }
1111
-
1112
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1113
- if (propValue['@@toStringTag'] === 'Symbol') {
1114
- return true;
1115
- }
1116
-
1117
- // Fallback for non-spec compliant Symbols which are polyfilled.
1118
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1119
- return true;
1120
- }
1121
-
1122
- return false;
1123
- }
1124
-
1125
- // Equivalent of `typeof` but with special handling for array and regexp.
1126
- function getPropType(propValue) {
1127
- var propType = typeof propValue;
1128
- if (Array.isArray(propValue)) {
1129
- return 'array';
1130
- }
1131
- if (propValue instanceof RegExp) {
1132
- // Old webkits (at least until Android 4.0) return 'function' rather than
1133
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1134
- // passes PropTypes.object.
1135
- return 'object';
1136
- }
1137
- if (isSymbol(propType, propValue)) {
1138
- return 'symbol';
1139
- }
1140
- return propType;
1141
- }
1142
-
1143
- // This handles more types than `getPropType`. Only used for error messages.
1144
- // See `createPrimitiveTypeChecker`.
1145
- function getPreciseType(propValue) {
1146
- if (typeof propValue === 'undefined' || propValue === null) {
1147
- return '' + propValue;
1148
- }
1149
- var propType = getPropType(propValue);
1150
- if (propType === 'object') {
1151
- if (propValue instanceof Date) {
1152
- return 'date';
1153
- } else if (propValue instanceof RegExp) {
1154
- return 'regexp';
1155
- }
1156
- }
1157
- return propType;
1158
- }
1159
-
1160
- // Returns a string that is postfixed to a warning about an invalid type.
1161
- // For example, "undefined" or "of type array"
1162
- function getPostfixForTypeWarning(value) {
1163
- var type = getPreciseType(value);
1164
- switch (type) {
1165
- case 'array':
1166
- case 'object':
1167
- return 'an ' + type;
1168
- case 'boolean':
1169
- case 'date':
1170
- case 'regexp':
1171
- return 'a ' + type;
1172
- default:
1173
- return type;
1174
- }
1175
- }
1176
-
1177
- // Returns class name of the object, if any.
1178
- function getClassName(propValue) {
1179
- if (!propValue.constructor || !propValue.constructor.name) {
1180
- return ANONYMOUS;
1181
- }
1182
- return propValue.constructor.name;
1183
- }
1184
-
1185
- ReactPropTypes.checkPropTypes = checkPropTypes_1;
1186
- ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
1187
- ReactPropTypes.PropTypes = ReactPropTypes;
1188
-
1189
- return ReactPropTypes;
1190
- };
1191
-
1192
- function emptyFunction() {}
1193
- function emptyFunctionWithReset() {}
1194
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1195
-
1196
- var factoryWithThrowingShims = function() {
1197
- function shim(props, propName, componentName, location, propFullName, secret) {
1198
- if (secret === ReactPropTypesSecret_1) {
1199
- // It is still safe when called from React.
1200
- return;
1201
- }
1202
- var err = new Error(
1203
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1204
- 'Use PropTypes.checkPropTypes() to call them. ' +
1205
- 'Read more at http://fb.me/use-check-prop-types'
1206
- );
1207
- err.name = 'Invariant Violation';
1208
- throw err;
1209
- } shim.isRequired = shim;
1210
- function getShim() {
1211
- return shim;
1212
- } // Important!
1213
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1214
- var ReactPropTypes = {
1215
- array: shim,
1216
- bool: shim,
1217
- func: shim,
1218
- number: shim,
1219
- object: shim,
1220
- string: shim,
1221
- symbol: shim,
1222
-
1223
- any: shim,
1224
- arrayOf: getShim,
1225
- element: shim,
1226
- elementType: shim,
1227
- instanceOf: getShim,
1228
- node: shim,
1229
- objectOf: getShim,
1230
- oneOf: getShim,
1231
- oneOfType: getShim,
1232
- shape: getShim,
1233
- exact: getShim,
1234
-
1235
- checkPropTypes: emptyFunctionWithReset,
1236
- resetWarningCache: emptyFunction
1237
- };
1238
-
1239
- ReactPropTypes.PropTypes = ReactPropTypes;
1240
-
1241
- return ReactPropTypes;
1242
- };
1243
-
1244
- var propTypes = createCommonjsModule(function (module) {
1245
- /**
1246
- * Copyright (c) 2013-present, Facebook, Inc.
1247
- *
1248
- * This source code is licensed under the MIT license found in the
1249
- * LICENSE file in the root directory of this source tree.
1250
- */
1251
-
1252
- if (process.env.NODE_ENV !== 'production') {
1253
- var ReactIs = reactIs;
1254
-
1255
- // By explicitly using `prop-types` you are opting into new development behavior.
1256
- // http://fb.me/prop-types-in-prod
1257
- var throwOnDirectAccess = true;
1258
- module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
1259
- } else {
1260
- // By explicitly using `prop-types` you are opting into new production behavior.
1261
- // http://fb.me/prop-types-in-prod
1262
- module.exports = factoryWithThrowingShims();
1263
- }
1264
- });
1265
-
1266
- function styleInject(css, ref) {
1267
- if ( ref === void 0 ) ref = {};
1268
- var insertAt = ref.insertAt;
1269
-
1270
- if (!css || typeof document === 'undefined') { return; }
1271
-
1272
- var head = document.head || document.getElementsByTagName('head')[0];
1273
- var style = document.createElement('style');
1274
- style.type = 'text/css';
1275
-
1276
- if (insertAt === 'top') {
1277
- if (head.firstChild) {
1278
- head.insertBefore(style, head.firstChild);
1279
- } else {
1280
- head.appendChild(style);
1281
- }
1282
- } else {
1283
- head.appendChild(style);
1284
- }
1285
-
1286
- if (style.styleSheet) {
1287
- style.styleSheet.cssText = css;
1288
- } else {
1289
- style.appendChild(document.createTextNode(css));
1290
- }
1291
- }
1292
-
1293
- var css_248z = "/* typekit ***/\n/* This style is from the alberta design system */\n@import url(\"https://p.typekit.net/p.css?s=1&k=nur5yta&ht=tk&f=26036.26037.26044.26046.26047&a=14638192&app=typekit&e=css\");\n@font-face {\n font-family: 'acumin-pro-semi-condensed';\n src: url(\"https://use.typekit.net/af/3f7b4d/00000000000000003b9acb2d/27/l?subset_id=1&fvd=n4&v=3\") format(\"woff2\"), url(\"https://use.typekit.net/af/3f7b4d/00000000000000003b9acb2d/27/d?subset_id=1&fvd=n4&v=3\") format(\"woff\"), url(\"https://use.typekit.net/af/3f7b4d/00000000000000003b9acb2d/27/a?subset_id=1&fvd=n4&v=3\") format(\"opentype\");\n font-style: normal;\n font-weight: 400; }\n\n@font-face {\n font-family: 'acumin-pro-semi-condensed';\n src: url(\"https://use.typekit.net/af/761912/00000000000000003b9acb2e/27/l?subset_id=1&fvd=i4&v=3\") format(\"woff2\"), url(\"https://use.typekit.net/af/761912/00000000000000003b9acb2e/27/d?subset_id=1&fvd=i4&v=3\") format(\"woff\"), url(\"https://use.typekit.net/af/761912/00000000000000003b9acb2e/27/a?subset_id=1&fvd=i4&v=3\") format(\"opentype\");\n font-style: italic;\n font-weight: 400; }\n\n@font-face {\n font-family: 'acumin-pro-semi-condensed';\n src: url(\"https://use.typekit.net/af/ee7f3d/00000000000000003b9acb33/27/l?subset_id=1&fvd=n7&v=3\") format(\"woff2\"), url(\"https://use.typekit.net/af/ee7f3d/00000000000000003b9acb33/27/d?subset_id=1&fvd=n7&v=3\") format(\"woff\"), url(\"https://use.typekit.net/af/ee7f3d/00000000000000003b9acb33/27/a?subset_id=1&fvd=n7&v=3\") format(\"opentype\");\n font-style: normal;\n font-weight: 700; }\n\n@font-face {\n font-family: 'acumin-pro-semi-condensed';\n src: url(\"https://use.typekit.net/af/503f80/00000000000000003b9acb34/27/l?subset_id=1&fvd=i7&v=3\") format(\"woff2\"), url(\"https://use.typekit.net/af/503f80/00000000000000003b9acb34/27/d?subset_id=1&fvd=i7&v=3\") format(\"woff\"), url(\"https://use.typekit.net/af/503f80/00000000000000003b9acb34/27/a?subset_id=1&fvd=i7&v=3\") format(\"opentype\");\n font-style: italic;\n font-weight: 700; }\n\n@font-face {\n font-family: 'acumin-pro-semi-condensed';\n src: url(\"https://use.typekit.net/af/e60e87/00000000000000003b9acb31/27/l?subset_id=1&fvd=n6&v=3\") format(\"woff2\"), url(\"https://use.typekit.net/af/e60e87/00000000000000003b9acb31/27/d?subset_id=1&fvd=n6&v=3\") format(\"woff\"), url(\"https://use.typekit.net/af/e60e87/00000000000000003b9acb31/27/a?subset_id=1&fvd=n6&v=3\") format(\"opentype\");\n font-style: normal;\n font-weight: 600; }\n\n/* This style is from the alberta design system */\nbody,\ninput,\nbutton,\ntextarea {\n background: #fff;\n font-family: acumin-pro-semi-condensed, sans-serif;\n font-weight: 400;\n font-size: 18px;\n line-height: 28px; }\n\nh1 {\n margin: 0;\n padding: 0;\n line-height: 56px;\n font-size: 48px; }\n\nh2 {\n margin: 24px 0 0;\n padding: 0;\n line-height: 44px;\n color: #333;\n font-size: 36px;\n font-weight: 400; }\n\nh3 {\n margin: 24px 0 0;\n padding: 0;\n line-height: 32px;\n color: #333;\n font-size: 24px;\n font-weight: 400; }\n\nh4 {\n margin: 23px 0 0;\n padding: 0;\n line-height: 28px;\n color: #333;\n font-size: 18px;\n font-weight: 700; }\n\nh5 {\n margin: 23px 0 0;\n padding: 0;\n line-height: 28px;\n color: #333;\n font-size: 18px;\n font-weight: 700; }\n\nh6 {\n margin: 23px 0 0;\n padding: 0;\n line-height: 28px;\n color: #333;\n font-size: 18px;\n font-weight: 700; }\n\np {\n margin: 23px 0 0;\n font-size: 18px;\n line-height: 28px; }\n\ndt {\n font-weight: 700; }\n\nli {\n margin: 13px 0 0 28px;\n font-size: 18px;\n line-height: 28px; }\n\nul {\n list-style-type: disc;\n margin-top: 28px; }\n\nul ul {\n list-style-type: disc; }\n\na:link {\n color: #0070c4; }\n\na:visited {\n color: #756693; }\n\na:hover {\n color: #004f84; }\n\na:focus {\n outline-width: thin;\n outline-style: solid;\n outline-color: #004f84;\n outline-offset: 0px; }\n\n/* anchors *******************************************************************/\nhtml:not([dir='rtl']) main a[target='_blank']:after {\n display: inline-block;\n width: 17px;\n height: 16px;\n margin: 0px 0px -2px 5px;\n background: transparent url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='16' viewBox='0 0 22 20.51'%3E%3Cpath fill='%23333' d='M21,19.69a.58.58,0,0,1-.57.57H3.57A.58.58,0,0,1,3,19.69V4.31a.58.58,0,0,1,.57-.57H6.82v-2H3.57A2.58,2.58,0,0,0,1,4.31V19.69a2.58,2.58,0,0,0,2.57,2.57H20.43A2.58,2.58,0,0,0,23,19.69V16.44H21Z' transform='translate(-1 -1.74)'/%3E%3Cpath fill='%23333' d='M22,1.75H14.15a1,1,0,1,0,0,2h5.44l-7.41,7.41a1,1,0,0,0,.71,1.71,1,1,0,0,0,.7-.3L21,5.17V10.6a1,1,0,1,0,2,0V2.75A1,1,0,0,0,22,1.75Z' transform='translate(-1 -1.74)'/%3E%3C/svg%3E\") no-repeat center center;\n content: ''; }\n\na[href$='.pdf']:after,\na[href$='.doc']:after,\na[href$='.docx']:after {\n display: inline-block;\n width: 16px;\n height: 16px;\n margin: 0px 0px -3px 5px;\n background: transparent url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='geometricPrecision'%3E%3Cpath d='M0 16L16 16L16 14L0 14Z M8 14L0 6L4 6L4 0L12 0L12 6L16 6Z' fill='%2336424a'/%3E%3C/svg%3E\") no-repeat center center;\n content: ''; }\n";
1294
- styleInject(css_248z);
1295
-
1296
- var css_248z$1 = "/* Palette */\n/* Semantic usages */\n.goa-callout {\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n width: 100%;\n margin: 24px 0 0;\n padding: 23px 24px 23px 24px;\n border-width: 0;\n border-left-width: 48px;\n border-style: solid;\n border-color: #0070c4;\n background: #f1f1f1;\n /* variants ***/ }\n .goa-callout *:first-child {\n margin-top: 0; }\n .goa-callout *:last-child {\n margin-bottom: 0; }\n .goa-callout.goa--important {\n border-color: #feba35; }\n .goa-callout.goa--emergency {\n border-color: #EC040B; }\n .goa-callout.goa--error {\n border-color: #EC040B; }\n .goa-callout.goa--success {\n border-color: #00853f; }\n .goa-callout:before {\n position: absolute;\n top: 28px;\n left: -36px;\n width: 24px;\n height: 24px;\n content: '';\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23fff' d='M15.16,15.5h-2V9a1,1,0,0,0-1-1H9.82a1,1,0,0,0,0,2h1.36V15.5h-2a1,1,0,1,0,0,2h6a1,1,0,0,0,0-2Z'/%3E%3Cpath fill='%23fff' d='M12,7.33A1.29,1.29,0,1,0,10.73,6,1.29,1.29,0,0,0,12,7.33Z'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-callout.goa--emergency:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M11,9.41v4.52a1,1,0,0,0,2,0V9.41a1,1,0,0,0-2,0Z'/%3E%3Cpath fill='%23fff' d='M12,16.15a1.29,1.29,0,1,0,1.29,1.29A1.29,1.29,0,0,0,12,16.15Z'/%3E%3Cpath fill='%23fff' d='M22.87,20.14l-10-17.32a1,1,0,0,0-1.74,0l-10,17.32a1,1,0,0,0,0,1,1,1,0,0,0,.87.5H22a1,1,0,0,0,.87-.5A1,1,0,0,0,22.87,20.14Zm-19.14-.5L12,5.32l8.27,14.32Z'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-callout.goa--error:before {\n background-image: url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><defs><style>.a{fill:none;}.b{fill:white;}</style></defs><rect class=\"a\" width=\"24\" height=\"24\"/><path class=\"b\" d=\"M48.1,23a11,11,0,1,0-11-11A10.968,10.968,0,0,0,48.1,23Zm0-20a9,9,0,1,1-9,9A8.963,8.963,0,0,1,48.1,3Z\" transform=\"translate(-36)\"/><path class=\"b\" d=\"M43.6,16.4a.967.967,0,0,0,1.4,0l3-3,3,3a.967.967,0,0,0,1.4,0,.967.967,0,0,0,0-1.4l-3-3,3-3A.99.99,0,0,0,51,7.6l-3,3-3-3A.99.99,0,0,0,43.6,9l3,3-3,3A1.2,1.2,0,0,0,43.6,16.4Z\" transform=\"translate(-36)\"/></svg>');\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center; }\n .goa-callout.goa--important:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23000' d='M12,14.46a1,1,0,0,0,1-1V6.57a1,1,0,0,0-2,0v6.89A1,1,0,0,0,12,14.46Z'/%3E%3Cpath fill='%23000' d='M12,15.68A1.29,1.29,0,1,0,13.29,17,1.29,1.29,0,0,0,12,15.68Z'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-callout.goa--event:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.27,22.85H20.73a2.14,2.14,0,0,0,2.14-2.14V5A2.14,2.14,0,0,0,20.73,2.9h-2.1v2h2.1a.14.14,0,0,1,.14.14V8.31H3.13V5a.14.14,0,0,1,.14-.14H5.48V6.28a1,1,0,1,0,2,0V1.85a1,1,0,1,0-2,0v1H3.27A2.14,2.14,0,0,0,1.13,5V20.71A2.14,2.14,0,0,0,3.27,22.85Zm17.6-12.54v10.4a.14.14,0,0,1-.14.14H3.27a.14.14,0,0,1-.14-.14V10.31Z'/%3E%3Cpath fill='%23fff' d='M16.45,7.28a1,1,0,0,0,1-1V1.85a1,1,0,0,0-2,0v1h-1.8v2h1.8V6.28A1,1,0,0,0,16.45,7.28Z'/%3E%3Cpath fill='%23fff' d='M11.47,7.28a1,1,0,0,0,1-1V1.85a1,1,0,1,0-2,0v1H8.66v2h1.81V6.28A1,1,0,0,0,11.47,7.28Z'/%3E%3Crect fill='%23fff' x='6.67' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='11.22' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='15.77' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='3.64' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='8.19' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='12.74' y='15.83' width='2.33' height='2.33'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-callout.goa--event:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.27,22.85H20.73a2.14,2.14,0,0,0,2.14-2.14V5A2.14,2.14,0,0,0,20.73,2.9h-2.1v2h2.1a.14.14,0,0,1,.14.14V8.31H3.13V5a.14.14,0,0,1,.14-.14H5.48V6.28a1,1,0,1,0,2,0V1.85a1,1,0,1,0-2,0v1H3.27A2.14,2.14,0,0,0,1.13,5V20.71A2.14,2.14,0,0,0,3.27,22.85Zm17.6-12.54v10.4a.14.14,0,0,1-.14.14H3.27a.14.14,0,0,1-.14-.14V10.31Z'/%3E%3Cpath fill='%23fff' d='M16.45,7.28a1,1,0,0,0,1-1V1.85a1,1,0,0,0-2,0v1h-1.8v2h1.8V6.28A1,1,0,0,0,16.45,7.28Z'/%3E%3Cpath fill='%23fff' d='M11.47,7.28a1,1,0,0,0,1-1V1.85a1,1,0,1,0-2,0v1H8.66v2h1.81V6.28A1,1,0,0,0,11.47,7.28Z'/%3E%3Crect fill='%23fff' x='6.67' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='11.22' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='15.77' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='3.64' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='8.19' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='12.74' y='15.83' width='2.33' height='2.33'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-callout.goa--success:before {\n background-image: url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><defs><style>.a{fill:none;}.b{fill:white;}</style></defs><g transform=\"translate(-23 -68)\"><rect class=\"a\" width=\"24\" height=\"24\" transform=\"translate(23 68)\"/><path class=\"b\" d=\"M12,23A11,11,0,1,0,1,12,10.968,10.968,0,0,0,12,23ZM12,3a9,9,0,1,1-9,9A8.963,8.963,0,0,1,12,3Z\" transform=\"translate(23 68)\"/><path class=\"b\" d=\"M10.9,16.4a.908.908,0,0,0,.7.3h.1a.842.842,0,0,0,.7-.4L17.6,9a.913.913,0,0,0-.2-1.4,1,1,0,0,0-1.4.3l-4.5,6.3L8,10.5a.99.99,0,0,0-1.4,1.4Z\" transform=\"translate(23 68)\"/></g></svg>');\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center; }\n .goa-callout .messages {\n margin-bottom: 0;\n margin-top: 1em; }\n";
1297
- styleInject(css_248z$1);
1298
-
1299
- var GoACallout = function GoACallout(_ref) {
1300
- var title = _ref.title,
1301
- _ref$type = _ref.type,
1302
- type = _ref$type === void 0 ? "information" : _ref$type,
1303
- content = _ref.content,
1304
- _ref$children = _ref.children,
1305
- children = _ref$children === void 0 ? null : _ref$children,
1306
- props = _objectWithoutProperties(_ref, ["title", "type", "content", "children"]);
1307
-
1308
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
1309
- className: "goa-callout goa--".concat(type)
1310
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
1311
- "data-testid": "callout-title"
1312
- }, title), /*#__PURE__*/React.createElement("div", {
1313
- className: "messages",
1314
- "data-testid": "callout-content"
1315
- }, content || children))));
1316
- };
1317
- GoACallout.propTypes = {
1318
- title: propTypes.string,
1319
- type: propTypes.string.isRequired,
1320
- content: propTypes.string
1321
- };
1322
-
1323
- var css_248z$2 = "/* Palette */\n/* Semantic usages */\n.goa-notification {\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n width: 100%;\n padding-left: 72px;\n padding-right: 72px;\n color: #fff;\n background: #0070c4;\n /* variants ***/ }\n .goa-notification.dismissed {\n display: none; }\n @media screen and (min-width: 768px) and (max-width: 1199px) {\n .goa-notification {\n padding-left: 24px;\n padding-right: 24px; } }\n @media screen and (max-width: 767px) {\n .goa-notification {\n padding-left: 24px;\n padding-right: 24px; } }\n .goa-notification .content {\n box-sizing: border-box;\n display: flex;\n width: 100%;\n margin: 0;\n position: relative;\n padding: 0 36px; }\n .goa-notification .content .message {\n flex: 1 0 0;\n box-sizing: border-box;\n min-height: 56px;\n padding: 28px 0; }\n .goa-notification .content .close {\n flex: 0 1 auto; }\n .goa-notification a {\n color: #fff; }\n .goa-notification a:hover, .goa-notification a:focus {\n color: #fff;\n text-decoration: none; }\n .goa-notification.goa--event {\n background-color: #00853f; }\n .goa-notification.goa--important {\n background-color: #feba35; }\n .goa-notification.goa--important .message {\n color: #333; }\n .goa-notification.goa--important a {\n color: #333; }\n .goa-notification.goa--important a:hover, .goa-notification.goa--important a:focus {\n color: #333; }\n .goa-notification.goa--emergency {\n background-color: #EC040B; }\n .goa-notification .close {\n align-self: center;\n position: absolute;\n right: 12px;\n cursor: pointer; }\n .goa-notification .close svg {\n fill: currentColor; }\n .goa-notification .content:before {\n position: absolute;\n top: 50%;\n left: 6px;\n width: 24px;\n height: 24px;\n margin-top: -12px;\n content: '';\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23fff' d='M15.16,15.5h-2V9a1,1,0,0,0-1-1H9.82a1,1,0,0,0,0,2h1.36V15.5h-2a1,1,0,1,0,0,2h6a1,1,0,0,0,0-2Z'/%3E%3Cpath fill='%23fff' d='M12,7.33A1.29,1.29,0,1,0,10.73,6,1.29,1.29,0,0,0,12,7.33Z'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-notification.goa--emergency .content:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M11,9.41v4.52a1,1,0,0,0,2,0V9.41a1,1,0,0,0-2,0Z'/%3E%3Cpath fill='%23fff' d='M12,16.15a1.29,1.29,0,1,0,1.29,1.29A1.29,1.29,0,0,0,12,16.15Z'/%3E%3Cpath fill='%23fff' d='M22.87,20.14l-10-17.32a1,1,0,0,0-1.74,0l-10,17.32a1,1,0,0,0,0,1,1,1,0,0,0,.87.5H22a1,1,0,0,0,.87-.5A1,1,0,0,0,22.87,20.14Zm-19.14-.5L12,5.32l8.27,14.32Z'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-notification.goa--important .content:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23000' d='M12,14.46a1,1,0,0,0,1-1V6.57a1,1,0,0,0-2,0v6.89A1,1,0,0,0,12,14.46Z'/%3E%3Cpath fill='%23000' d='M12,15.68A1.29,1.29,0,1,0,13.29,17,1.29,1.29,0,0,0,12,15.68Z'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n .goa-notification.goa--event .content:before {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.27,22.85H20.73a2.14,2.14,0,0,0,2.14-2.14V5A2.14,2.14,0,0,0,20.73,2.9h-2.1v2h2.1a.14.14,0,0,1,.14.14V8.31H3.13V5a.14.14,0,0,1,.14-.14H5.48V6.28a1,1,0,1,0,2,0V1.85a1,1,0,1,0-2,0v1H3.27A2.14,2.14,0,0,0,1.13,5V20.71A2.14,2.14,0,0,0,3.27,22.85Zm17.6-12.54v10.4a.14.14,0,0,1-.14.14H3.27a.14.14,0,0,1-.14-.14V10.31Z'/%3E%3Cpath fill='%23fff' d='M16.45,7.28a1,1,0,0,0,1-1V1.85a1,1,0,0,0-2,0v1h-1.8v2h1.8V6.28A1,1,0,0,0,16.45,7.28Z'/%3E%3Cpath fill='%23fff' d='M11.47,7.28a1,1,0,0,0,1-1V1.85a1,1,0,1,0-2,0v1H8.66v2h1.81V6.28A1,1,0,0,0,11.47,7.28Z'/%3E%3Crect fill='%23fff' x='6.67' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='11.22' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='15.77' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='3.64' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='8.19' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='12.74' y='15.83' width='2.33' height='2.33'/%3E%3C/svg%3E\");\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center; }\n";
1324
- styleInject(css_248z$2);
1325
-
1326
- var css_248z$3 = ".goa-notifications .title {\n position: absolute;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n left: -10px;\n width: 1px;\n height: 1px;\n white-space: nowrap; }\n\n.goa-notifications ul {\n box-sizing: border-box;\n display: inline-block;\n width: 100%;\n margin: 0;\n padding: 0;\n list-style-type: none; }\n .goa-notifications ul li {\n box-sizing: border-box;\n display: block;\n width: 100%;\n margin: 0;\n padding: 0; }\n";
1327
- styleInject(css_248z$3);
1328
-
1329
- var GoANotification = function GoANotification(_ref) {
1330
- var title = _ref.title,
1331
- _ref$type = _ref.type,
1332
- type = _ref$type === void 0 ? "information" : _ref$type,
1333
- message = _ref.message,
1334
- notificationUrl = _ref.notificationUrl,
1335
- _ref$isDismissable = _ref.isDismissable,
1336
- isDismissable = _ref$isDismissable === void 0 ? true : _ref$isDismissable,
1337
- _ref$children = _ref.children,
1338
- children = _ref$children === void 0 ? null : _ref$children,
1339
- onDismiss = _ref.onDismiss,
1340
- props = _objectWithoutProperties(_ref, ["title", "type", "message", "notificationUrl", "isDismissable", "children", "onDismiss"]);
1341
-
1342
- var _useState = useState(false),
1343
- _useState2 = _slicedToArray(_useState, 2),
1344
- dismissed = _useState2[0],
1345
- setDismissed = _useState2[1];
1346
-
1347
- var dismissTrigger = function dismissTrigger(dismissAction) {
1348
- setDismissed(dismissAction);
1349
- onDismiss();
1350
- };
1351
-
1352
- if (!dismissed) {
1353
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
1354
- className: "goa-notifications"
1355
- }, /*#__PURE__*/React.createElement("h2", {
1356
- className: "title"
1357
- }, title)), /*#__PURE__*/React.createElement("div", {
1358
- role: "notification",
1359
- className: "goa-notification goa--".concat(type)
1360
- }, /*#__PURE__*/React.createElement("div", {
1361
- className: "content"
1362
- }, notificationUrl ? /*#__PURE__*/React.createElement("a", {
1363
- className: "message",
1364
- role: "url",
1365
- href: notificationUrl
1366
- }, message || children) : /*#__PURE__*/React.createElement("span", {
1367
- className: "message"
1368
- }, message || children), isDismissable && /*#__PURE__*/React.createElement("a", {
1369
- role: "closeBox",
1370
- className: "close",
1371
- title: "Dismiss",
1372
- onClick: function onClick() {
1373
- return dismissTrigger(!dismissed);
1374
- }
1375
- }, /*#__PURE__*/React.createElement("svg", {
1376
- width: "16px",
1377
- height: "16px",
1378
- viewBox: "0 0 16 16"
1379
- }, /*#__PURE__*/React.createElement("path", {
1380
- d: "M 15.99 14.54C 15.99 14.54 14.54 15.99 14.54 15.99 14.54 15.99 8 9.45 8 9.45 8 9.45 1.46 15.99 1.46 15.99 1.46 15.99 0.01 14.54 0.01 14.54 0.01 14.54 6.55 8 6.55 8 6.55 8 0.01 1.46 0.01 1.46 0.01 1.46 1.46 0.01 1.46 0.01 1.46 0.01 8 6.55 8 6.55 8 6.55 14.54 0.01 14.54 0.01 14.54 0.01 15.99 1.46 15.99 1.46 15.99 1.46 9.45 8 9.45 8 9.45 8 15.99 14.54 15.99 14.54Z"
1381
- }))))));
1382
- } else {
1383
- return null;
1384
- }
1385
- };
1386
- GoANotification.propTypes = {
1387
- title: propTypes.string,
1388
- type: propTypes.string.isRequired,
1389
- content: propTypes.string
1390
- };
1391
-
1392
- var css_248z$4 = "/* Palette */\n/* Semantic usages */\n/* Common button colors */\n/* Primary colors */\n/* Secondary colors */\n/* Tertiary colors */\n/* This style is from the alberta design system */\nbutton.goa-button,\ninput[type='button'].goa-button,\ninput[type='submit'].goa-button {\n box-sizing: border-box;\n min-width: 70px;\n padding: 12px;\n border: 2px solid #0070c4;\n border-radius: 4px;\n background: #0070c4;\n cursor: pointer;\n color: #fff;\n font-size: 18px;\n font-weight: 700;\n line-height: 1em; }\n button.goa-button.btn-small,\n input[type='button'].goa-button.btn-small,\n input[type='submit'].goa-button.btn-small {\n font-size: 16px;\n padding: 8px;\n margin: 12px 12px 0 0; }\n button.goa-button:last-of-type,\n input[type='button'].goa-button:last-of-type,\n input[type='submit'].goa-button:last-of-type {\n margin-right: 0; }\n button.goa-button:disabled, button.goa-button:disabled.goa--secondary, button.goa-button:disabled.goa--tertiary,\n input[type='button'].goa-button:disabled,\n input[type='button'].goa-button:disabled.goa--secondary,\n input[type='button'].goa-button:disabled.goa--tertiary,\n input[type='submit'].goa-button:disabled,\n input[type='submit'].goa-button:disabled.goa--secondary,\n input[type='submit'].goa-button:disabled.goa--tertiary {\n pointer-events: none;\n color: #666;\n background-color: #f1f1f1;\n border-color: #f1f1f1; }\n button.goa-button:hover,\n input[type='button'].goa-button:hover,\n input[type='submit'].goa-button:hover {\n border-color: #004f84;\n background: #004f84; }\n button.goa-button:focus, button.goa-button:active,\n input[type='button'].goa-button:focus,\n input[type='button'].goa-button:active,\n input[type='submit'].goa-button:focus,\n input[type='submit'].goa-button:active {\n border-color: #004f84;\n box-shadow: 0 0 0 3px #feba35;\n background: #004f84;\n outline: none; }\n button.goa-button.goa--secondary,\n input[type='button'].goa-button.goa--secondary,\n input[type='submit'].goa-button.goa--secondary {\n border: 2px solid #0070c4;\n background: #fff;\n color: #0070c4; }\n button.goa-button.goa--secondary:hover,\n input[type='button'].goa-button.goa--secondary:hover,\n input[type='submit'].goa-button.goa--secondary:hover {\n border-color: #004f84;\n background: #fff;\n color: #004f84; }\n button.goa-button.goa--secondary:focus, button.goa-button.goa--secondary:active,\n input[type='button'].goa-button.goa--secondary:focus,\n input[type='button'].goa-button.goa--secondary:active,\n input[type='submit'].goa-button.goa--secondary:focus,\n input[type='submit'].goa-button.goa--secondary:active {\n color: #004f84;\n background-color: #fff;\n border: 2px solid #004f84;\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n button.goa-button.goa--tertiary,\n input[type='button'].goa-button.goa--tertiary,\n input[type='submit'].goa-button.goa--tertiary {\n border-color: #dcdcdc;\n background: #fff;\n color: #0070c4; }\n button.goa-button.goa--tertiary:hover,\n input[type='button'].goa-button.goa--tertiary:hover,\n input[type='submit'].goa-button.goa--tertiary:hover {\n background: #fff;\n color: #004f84; }\n button.goa-button.goa--tertiary:focus, button.goa-button.goa--tertiary:active,\n input[type='button'].goa-button.goa--tertiary:focus,\n input[type='button'].goa-button.goa--tertiary:active,\n input[type='submit'].goa-button.goa--tertiary:focus,\n input[type='submit'].goa-button.goa--tertiary:active {\n border: 2px solid #004f84;\n color: #004f84;\n background-color: #fff;\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n";
1393
- styleInject(css_248z$4);
1394
-
1395
- var GoAButton = function GoAButton(_ref) {
1396
- var _ref$buttonType = _ref.buttonType,
1397
- buttonType = _ref$buttonType === void 0 ? 'primary' : _ref$buttonType,
1398
- _ref$buttonSize = _ref.buttonSize,
1399
- buttonSize = _ref$buttonSize === void 0 ? 'normal' : _ref$buttonSize,
1400
- _ref$title = _ref.title,
1401
- title = _ref$title === void 0 ? null : _ref$title,
1402
- _ref$children = _ref.children,
1403
- children = _ref$children === void 0 ? null : _ref$children,
1404
- _ref$onClick = _ref.onClick,
1405
- onClick = _ref$onClick === void 0 ? null : _ref$onClick,
1406
- props = _objectWithoutProperties(_ref, ["buttonType", "buttonSize", "title", "children", "onClick"]);
1407
-
1408
- var btnTypeClass = buttonType === 'primary' ? '' : "goa--".concat(buttonType);
1409
- var btnSize = buttonSize === 'small' ? 'btn-small' : '';
1410
- return /*#__PURE__*/React.createElement("button", Object.assign({
1411
- className: "goa-button ".concat(btnSize, " ").concat(btnTypeClass),
1412
- title: title,
1413
- onClick: onClick
1414
- }, props), children);
1415
- };
1416
- GoAButton.propTypes = {
1417
- buttonSize: propTypes.string,
1418
- buttonType: propTypes.string,
1419
- title: propTypes.string,
1420
- children: propTypes.node,
1421
- onClick: propTypes.func
1422
- };
1423
-
1424
- var css_248z$5 = "/* Palette */\n/* Semantic usages */\n.goa-header {\n display: flex;\n align-items: center;\n padding-left: 28px;\n padding-right: 28px; }\n @media screen and (min-width: 768px) and (max-width: 1199px) {\n .goa-header {\n padding-left: 28px;\n padding-right: 28px; } }\n @media screen and (max-width: 767px) {\n .goa-header {\n padding-left: 28px;\n padding-right: 28px; } }\n .goa-header.goa-microsite-header,\n .goa-header > .goa-microsite-header {\n background-color: #fff;\n top: 0;\n display: flex;\n justify-content: space-between; }\n .goa-header.goa-official-site-header,\n .goa-header > .goa-official-site-header {\n font-size: 12px;\n background-color: #f1f1f1;\n line-height: 22px; }\n .goa-header.goa-official-site-header .site-text,\n .goa-header > .goa-official-site-header .site-text {\n white-space: nowrap;\n padding: 0 4px; }\n .goa-header.goa-official-site-header .service-level,\n .goa-header > .goa-official-site-header .service-level {\n padding: 0 3px;\n font-weight: bold;\n vertical-align: baseline;\n text-transform: capitalize; }\n .goa-header.goa-official-site-header .service-level--alpha,\n .goa-header > .goa-official-site-header .service-level--alpha {\n background-color: #feba35;\n color: #333; }\n .goa-header.goa-official-site-header .service-level--beta,\n .goa-header > .goa-official-site-header .service-level--beta {\n background-color: #0081a2;\n color: #fff; }\n .goa-header.goa-official-site-header .service-level--live,\n .goa-header > .goa-official-site-header .service-level--live {\n height: 16px;\n width: 16px;\n padding: 0;\n color: transparent;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bfill:%2300aad2;%7D.c%7Bclip-path:url(%23a);%7D.d%7Bfill:%23fff;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='14' height='14' transform='translate(-0.345 -0.21)'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg transform='translate(0 -0.135)'%3E%3Ccircle class='b' cx='8' cy='8' r='8' transform='translate(0 0.135)'/%3E%3Cg transform='translate(1.345 1.344)'%3E%3Cg class='c' transform='translate(0 0)'%3E%3Cpath class='d' d='M12.612,13.636a16.24,16.24,0,0,1-1.86-.822,13.436,13.436,0,0,0,1.6-.708,11.312,11.312,0,0,0,.264,1.53M16.032,7.3c-.266-.034-.128.091-.2.442a5.465,5.465,0,0,1-2.8,3.338,16.141,16.141,0,0,1,.249-4.84c.275-1,.6-.813.2-1.022-.427-.22-.887.071-1.258.813A27.247,27.247,0,0,1,7.4,13.522a2.141,2.141,0,0,1-2.918.461c-.206-.174-.282.095-.026.37a2.412,2.412,0,0,0,3.387-.082A32.715,32.715,0,0,0,12.219,7.51a23.541,23.541,0,0,0,.063,3.971,11.464,11.464,0,0,1-1.964.749c-.388.1-.628.26-.635.439-.007.2.253.363.63.541.67.318,2.633,1.246,3.117,1.527.414.24.616.053.739-.207.16-.338-.279-.533-.7-.661a13.175,13.175,0,0,1-.382-2.179,7.143,7.143,0,0,0,2.547-2.454,4.7,4.7,0,0,0,.4-1.133,2.125,2.125,0,0,0,.048-.742s-.007-.054-.048-.059' transform='translate(-3.51 -3.943)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center; }\n .goa-header .web-link {\n color: #0070c4;\n text-align: left; }\n";
1425
- styleInject(css_248z$5);
1426
-
1427
- var css_248z$6 = "a.microsite-link {\n color: inherit;\n text-decoration: none;\n white-space: nowrap;\n display: flex;\n align-items: center;\n height: 66px; }\n a.microsite-link:focus, a.microsite-link:hover, a.microsite-link:active {\n outline: none; }\n a.microsite-link .image-desktop-tablet {\n width: 150px;\n height: 42px;\n display: inline-block;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='149.351' height='42' viewBox='0 0 149.351 42'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bclip-path:url(%23a);%7D.c%7Bfill:%2300aad2;%7D.d%7Bfill:%235f6a72;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='149.351' height='42'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg class='b'%3E%3Crect class='c' width='13.555' height='13.555' transform='translate(135.796 21.524)'/%3E%3Cpath class='d' d='M63.082,33.088c-1.383.138-2.835.277-4.357.346.553-4.357,2.835-10.373,5.671-9.405,1.66.553.761,5.671-1.314,9.059m-3.527,2.974a3.761,3.761,0,0,1-1.245,0,.851.851,0,0,0,.346-.692v-.553c.761,0,1.936-.138,3.389-.277a4.327,4.327,0,0,1-2.49,1.521M76.844,25.688c1.8-1.66,2.7-1.521,2.9-1.106.484.968-1.591,4.357-5.671,6.224a10.328,10.328,0,0,1,2.766-5.118m66.736,1.66c-.207-3.389-3.181-3.942-3.6-2.974-.138.346,1.106.207,1.106,2.628,0,3.942-4.011,9.129-9.129,9.129-5.532,0-6.985-4.357-7.261-6.432-.207-1.452.138-3.458-2.351-3.181-1.729.207-3.25,3.527-5.463,6.362-1.867,2.42-2.7,2.213-2.282.138.553-2.628,2.7-8.714,5.187-9.129,1.176-.207,1.591,1.8,2.075.553s.069-4.011-2.559-4.011c-1.8,0-3.942,1.936-5.74,4.08-1.521,1.936-9.336,13.416-12.656,10.927-1.521-1.176-1.383-5.878-.415-11.411,3.873-1.521,7.123-1.037,8.921-.138.9.415,1.037.346.622-.622-.553-1.452-3.665-3.734-8.575-2.7-.138,0-.207.069-.346.069.415-1.8.83-3.665,1.383-5.463.484-1.66,1.8-4.5-1.729-4.979-1.106-.207-.622.346-1.037,1.867-.692,2.766-1.521,6.362-2.144,10.028a19.745,19.745,0,0,0-7.538,8.091,38.59,38.59,0,0,0,.9-4.772,1.589,1.589,0,0,0-1.245-1.729c-.761-.207-1.729.138-2.628,1.452-2.144,3.043-4.841,7.815-8.99,9.82-2.974,1.452-4.288,0-4.357-2.282a9.869,9.869,0,0,0,1.521-.553c5.394-2.351,7.192-5.947,5.878-8.16-1.314-2.075-4.979-1.452-7.953,1.66a11.175,11.175,0,0,0-2.7,6.5c-1.245.277-2.628.484-4.219.692,2.49-4.08,2.282-9.613-1.383-10.581-4.288-1.106-6.432,3.043-7.331,6.5.346-3.873.9-7.745,1.591-11.549.346-1.66,1.452-4.5-2.075-4.979-1.106-.207-.968.346-.9,1.867.138,2.075-2.144,14.454-.968,19.848-1.521.484-2.144,1.66-.207,2.835,1.383.83,4.357,1.106,7.331-.346a9.3,9.3,0,0,0,2.766-2.144c1.8-.207,3.665-.553,5.394-.83.277,2.42,1.867,4.219,5.463,3.873,5.118-.484,9.682-6.777,11.411-9.82-.346,3.25-2.42,10.373,1.176,10.028,1.383-.138.83-.346.9-1.591.346-4.288,3.873-7.953,7.4-10.166-.622,5.256-.415,9.958,2.006,11.411,4.426,2.766,10.581-4.5,14.039-8.921-1.729,3.942-2.7,8.921-.138,9.682,3.043.9,5.463-4.219,8.3-8.091.346,2.766,2.213,7.607,9.682,7.607,8.022-.069,13.071-4.91,12.863-10.1m-108.3,8.645A66.439,66.439,0,0,1,27.4,32.534a59.168,59.168,0,0,0,6.777-2.974,54.453,54.453,0,0,0,1.106,6.432m20.4,3.873c-.069-.207-.622.069-1.106,0-1.452-.207-3.389-2.213-3.942-5.463-1.037-5.878-.415-11.687,1.314-20.332.346-1.66,1.452-4.5-2.075-5.048-1.106-.138-.553.415-.83,1.867C47.66,17.32,42.4,21.954,37.149,25.066,36.6,17.735,36.8,9.505,38.186,4.526c1.176-4.219,2.559-3.458.83-4.357s-3.734.277-5.325,3.458S24.839,23.89,13.221,35.439C7.273,41.317,1.879,38.274.842,37.375c-.9-.761-1.176.415-.138,1.591,4.772,5.256,11.826,2.282,14.384-.277,7.054-7.054,15.283-22.268,18.6-28.7a98.251,98.251,0,0,0,.277,16.874,50.129,50.129,0,0,1-8.3,3.181c-1.66.415-2.7,1.106-2.7,1.867s1.106,1.521,2.7,2.282c2.835,1.383,11.2,5.256,13.209,6.5,1.729,1.037,2.628.207,3.112-.9.692-1.452-1.176-2.282-2.974-2.766a60.545,60.545,0,0,1-1.66-9.267c4.219-2.628,8.437-6.086,10.788-10.443C47.522,20.916,46,33.3,49.873,38.482a5.451,5.451,0,0,0,4.564,2.213c.968-.069,1.383-.692,1.245-.83' transform='translate(-0.038 0.124)'/%3E%3C/g%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center; }\n @media screen and (max-width: 767px) {\n a.microsite-link .image-desktop-tablet {\n display: none; } }\n @media screen and (min-width: 768px) and (max-width: 1199px) {\n a.microsite-link .image-mobile {\n display: none; } }\n @media screen and (min-width: 1200px) {\n a.microsite-link .image-mobile {\n display: none; } }\n @media screen and (max-width: 767px) {\n a.microsite-link .image-mobile {\n width: 34px;\n height: 34px;\n display: inline-block;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bfill:%2300aad2;%7D.c%7Bclip-path:url(%23a);%7D.d%7Bfill:%23fff;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='14' height='14' transform='translate(-0.345 -0.21)'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg transform='translate(0 -0.135)'%3E%3Ccircle class='b' cx='8' cy='8' r='8' transform='translate(0 0.135)'/%3E%3Cg transform='translate(1.345 1.344)'%3E%3Cg class='c' transform='translate(0 0)'%3E%3Cpath class='d' d='M12.612,13.636a16.24,16.24,0,0,1-1.86-.822,13.436,13.436,0,0,0,1.6-.708,11.312,11.312,0,0,0,.264,1.53M16.032,7.3c-.266-.034-.128.091-.2.442a5.465,5.465,0,0,1-2.8,3.338,16.141,16.141,0,0,1,.249-4.84c.275-1,.6-.813.2-1.022-.427-.22-.887.071-1.258.813A27.247,27.247,0,0,1,7.4,13.522a2.141,2.141,0,0,1-2.918.461c-.206-.174-.282.095-.026.37a2.412,2.412,0,0,0,3.387-.082A32.715,32.715,0,0,0,12.219,7.51a23.541,23.541,0,0,0,.063,3.971,11.464,11.464,0,0,1-1.964.749c-.388.1-.628.26-.635.439-.007.2.253.363.63.541.67.318,2.633,1.246,3.117,1.527.414.24.616.053.739-.207.16-.338-.279-.533-.7-.661a13.175,13.175,0,0,1-.382-2.179,7.143,7.143,0,0,0,2.547-2.454,4.7,4.7,0,0,0,.4-1.133,2.125,2.125,0,0,0,.048-.742s-.007-.054-.048-.059' transform='translate(-3.51 -3.943)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center; } }\n a.microsite-link .name {\n margin-left: 8px;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n @media screen and (min-width: 1200px) {\n a.microsite-link .name {\n margin-left: 28px; } }\n @media screen and (min-width: 768px) and (max-width: 1199px) {\n a.microsite-link .name {\n margin-left: 28px; } }\n";
1428
- styleInject(css_248z$6);
1429
-
1430
- /* eslint-disable-next-line */
1431
-
1432
- var MicrositeLogo = function MicrositeLogo(props) {
1433
- return /*#__PURE__*/React.createElement("a", {
1434
- href: props.serviceHome,
1435
- "aria-label": props.serviceHome,
1436
- className: "microsite-link"
1437
- }, /*#__PURE__*/React.createElement("span", {
1438
- className: "image-desktop-tablet"
1439
- }), /*#__PURE__*/React.createElement("span", {
1440
- className: "image-mobile"
1441
- }), /*#__PURE__*/React.createElement("span", {
1442
- className: "name"
1443
- }, props.serviceName));
1444
- };
1445
-
1446
- var GoAHeader = function GoAHeader(props) {
1447
- var serviceLevelCss = classnames('service-level', "service-level--".concat(props.serviceLevel.toString().toLowerCase()));
1448
-
1449
- function serviceLevelFormatted() {
1450
- return props.serviceLevel.toLowerCase();
1451
- }
1452
-
1453
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("header", {
1454
- className: "goa-header goa-official-site-header"
1455
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1456
- className: serviceLevelCss
1457
- }, serviceLevelFormatted())), props.serviceLevel === 'live' && /*#__PURE__*/React.createElement("div", {
1458
- className: "site-text"
1459
- }, "An official site of the ", /*#__PURE__*/React.createElement("a", {
1460
- href: "https://www.alberta.ca/index.aspx",
1461
- className: "web-link"
1462
- }, "Alberta Government")), props.serviceLevel !== 'live' && /*#__PURE__*/React.createElement("div", {
1463
- className: "site-text"
1464
- }, "This is a new ", /*#__PURE__*/React.createElement("a", {
1465
- href: "https://www.alberta.ca/index.aspx",
1466
- className: "web-link"
1467
- }, "Alberta Government"), " service")), /*#__PURE__*/React.createElement("div", {
1468
- className: "goa-header goa-microsite-header"
1469
- }, /*#__PURE__*/React.createElement(MicrositeLogo, {
1470
- serviceName: props.serviceName,
1471
- serviceHome: props.serviceHome
1472
- }), /*#__PURE__*/React.createElement("div", null, props.children)));
1473
- };
1474
-
1475
- var css_248z$7 = ".goa-hero-banner-content {\n font-size: 18px;\n line-height: 32px;\n margin: 0; }\n @media screen and (min-width: 768px) and (max-width: 1199px) {\n .goa-hero-banner-content {\n width: 80%; } }\n @media screen and (min-width: 1200px) {\n .goa-hero-banner-content {\n width: 40%; } }\n .goa-hero-banner-content:last-of-type {\n margin-bottom: 28px; }\n";
1476
- styleInject(css_248z$7);
1477
-
1478
- var GoAHeroBannerContent = function GoAHeroBannerContent(_ref) {
1479
- var content = _ref.content,
1480
- children = _ref.children;
1481
- return /*#__PURE__*/React.createElement("p", {
1482
- className: "goa-hero-banner-content",
1483
- role: "note"
1484
- }, children || content);
1485
- };
1486
-
1487
- var css_248z$8 = "/* Palette */\n/* Semantic usages */\n/* Palette */\n/* Semantic usages */\n/* Common button colors */\n/* Primary colors */\n/* Secondary colors */\n/* Tertiary colors */\n/* This style is from the alberta design system */\n/* This style is from the alberta design system */\n.goa-link-button.goa-link-button {\n display: inline-block;\n text-decoration: none; }\n .goa-link-button.goa-link-button {\n box-sizing: border-box;\n min-width: 70px;\n padding: 12px;\n border: 2px solid #0070c4;\n border-radius: 4px;\n background: #0070c4;\n cursor: pointer;\n color: #fff;\n font-size: 18px;\n font-weight: 700;\n line-height: 1em; }\n .goa-link-button.goa-link-button.btn-small {\n font-size: 16px;\n padding: 8px;\n margin: 12px 12px 0 0; }\n .goa-link-button.goa-link-button:last-of-type {\n margin-right: 0; }\n .goa-link-button.goa-link-button:disabled, .goa-link-button.goa-link-button:disabled.goa--secondary, .goa-link-button.goa-link-button:disabled.goa--tertiary {\n pointer-events: none;\n color: #666;\n background-color: #f1f1f1;\n border-color: #f1f1f1; }\n .goa-link-button.goa-link-button:hover {\n border-color: #004f84;\n background: #004f84; }\n .goa-link-button.goa-link-button:focus, .goa-link-button.goa-link-button:active {\n border-color: #004f84;\n box-shadow: 0 0 0 3px #feba35;\n background: #004f84;\n outline: none; }\n .goa-link-button.goa-link-button.goa--secondary {\n border: 2px solid #0070c4;\n background: #fff;\n color: #0070c4; }\n .goa-link-button.goa-link-button.goa--secondary:hover {\n border-color: #004f84;\n background: #fff;\n color: #004f84; }\n .goa-link-button.goa-link-button.goa--secondary:focus, .goa-link-button.goa-link-button.goa--secondary:active {\n color: #004f84;\n background-color: #fff;\n border: 2px solid #004f84;\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n .goa-link-button.goa-link-button.goa--tertiary {\n border-color: #dcdcdc;\n background: #fff;\n color: #0070c4; }\n .goa-link-button.goa-link-button.goa--tertiary:hover {\n background: #fff;\n color: #004f84; }\n .goa-link-button.goa-link-button.goa--tertiary:focus, .goa-link-button.goa-link-button.goa--tertiary:active {\n border: 2px solid #004f84;\n color: #004f84;\n background-color: #fff;\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n .goa-link-button.goa-link-button.right-arrow::after {\n margin-left: 8px;\n content: '\\2192'; }\n .goa-link-button.goa-link-button.up-arrow::after {\n margin-left: 8px;\n content: '\\2191'; }\n .goa-link-button.goa-link-button:visited, .goa-link-button.goa-link-button:link {\n color: #fff; }\n";
1488
- styleInject(css_248z$8);
1489
-
1490
- var GoAHeroBannerLink = function GoAHeroBannerLink(_ref) {
1491
- var linkText = _ref.linkText,
1492
- linkUrl = _ref.linkUrl;
1493
- return linkText && linkUrl ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
1494
- className: "goa-link-button right-arrow",
1495
- href: linkUrl,
1496
- role: "link"
1497
- }, linkText)) : /*#__PURE__*/React.createElement(Fragment$1, null);
1498
- };
1499
-
1500
- var css_248z$9 = "/* Palette */\n/* Semantic usages */\n.goa-hero {\n box-sizing: border-box;\n display: flex;\n justify-content: flex-end;\n align-items: stretch;\n flex-direction: column;\n height: 600px;\n border-bottom: 8px solid #0081a2;\n color: #fff;\n background-position: center center;\n width: 100%;\n padding: 56px 28px; }\n .goa-hero h1 {\n margin: 0 0 28px;\n padding: 0;\n font-size: 48px;\n line-height: 56px;\n font-weight: 700; }\n";
1501
- styleInject(css_248z$9);
1502
-
1503
- var GoAHeroBanner = function GoAHeroBanner(_ref) {
1504
- var title = _ref.title,
1505
- backgroundUrl = _ref.backgroundUrl,
1506
- content = _ref.content,
1507
- linkText = _ref.linkText,
1508
- linkUrl = _ref.linkUrl,
1509
- children = _ref.children;
1510
- return /*#__PURE__*/React.createElement("div", {
1511
- className: "goa-hero",
1512
- style: {
1513
- backgroundImage: "linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.40) 40%, rgba(0, 0, 0, 0.6) 100%), url('".concat(backgroundUrl, "')")
1514
- }
1515
- }, /*#__PURE__*/React.createElement("h1", {
1516
- role: "heading",
1517
- "aria-level": 1
1518
- }, title), children || /*#__PURE__*/React.createElement(Fragment$1, null, content && /*#__PURE__*/React.createElement(GoAHeroBannerContent, {
1519
- content: content
1520
- }), linkText && linkUrl && /*#__PURE__*/React.createElement(GoAHeroBannerLink, {
1521
- linkText: linkText,
1522
- linkUrl: linkUrl
1523
- })));
1524
- };
1525
- GoAHeroBanner.defaultProps = {
1526
- content: '',
1527
- linkText: '',
1528
- linkUrl: ''
1529
- };
1530
-
1531
- var css_248z$a = "/* Palette */\n/* Semantic usages */\n@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 border-radius: 4px; }\n\n.skeleton.paragraph {\n width: 100%;\n height: 70px;\n border-radius: 4px; }\n\n.skeleton.title {\n width: 50%;\n height: 20px;\n margin-bottom: 15px;\n border-radius: 4px; }\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 border-radius: 4px; }\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\n.goa-card {\n box-sizing: border-box;\n background: #fff;\n border: 1px solid #dcdcdc;\n transition: opacity 300ms ease-in-out;\n /* size variants ***/ }\n .goa-card .card-content {\n padding: 24px 16px;\n border-top: 8px solid #0081a2; }\n .goa-card .card-content .goa-title,\n .goa-card .card-content .goa-text,\n .goa-card .card-content .goa-content {\n margin-bottom: 28px; }\n .goa-card .card-content .goa-text {\n color: #333;\n font-size: var(--fs-base);\n line-height: 28px; }\n .goa-card .card-content .goa-footer {\n font-size: var(--fs-base); }\n .goa-card .card-content .goa-title {\n font-size: var(--fs-xl);\n font-weight: 400;\n line-height: 32px; }\n .goa-card .goa-poster {\n position: relative;\n display: block;\n padding: 56.25% 0 0;\n overflow: hidden;\n background: #e5e5e5; }\n .goa-card .goa-poster:empty {\n display: none; }\n .goa-card .goa-poster img,\n .goa-card .goa-poster iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none; }\n .goa-card .goa-poster-image img {\n display: block;\n width: 100%;\n -o-object-fit: cover;\n object-fit: cover; }\n .goa-card.card-auto {\n width: auto; }\n .goa-card.card-auto .card {\n flex-basis: auto;\n width: auto; }\n .goa-card a:hover {\n color: #004f84;\n text-decoration: none; }\n .goa-card a:focus {\n outline: 3px solid #feba35;\n outline-offset: 0; }\n\n.goa-card[data-skeleton] .goa-poster-image {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n padding-bottom: 56.25%; }\n .goa-card[data-skeleton] .goa-poster-image img {\n display: none; }\n\n.goa-card[data-skeleton] .goa-title {\n margin-bottom: 1rem; }\n\n.goa-card[data-skeleton] .goa-footer {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n max-height: 1rem; }\n";
1532
- styleInject(css_248z$a);
1533
-
1534
- var GoACard = function GoACard(_ref) {
1535
- var title = _ref.title,
1536
- content = _ref.content,
1537
- _ref$description = _ref.description,
1538
- description = _ref$description === void 0 ? null : _ref$description,
1539
- _ref$cardImageUrl = _ref.cardImageUrl,
1540
- cardImageUrl = _ref$cardImageUrl === void 0 ? null : _ref$cardImageUrl,
1541
- _ref$titleUrl = _ref.titleUrl,
1542
- titleUrl = _ref$titleUrl === void 0 ? null : _ref$titleUrl,
1543
- _ref$children = _ref.children,
1544
- children = _ref$children === void 0 ? null : _ref$children,
1545
- _ref$minWidth = _ref.minWidth,
1546
- minWidth = _ref$minWidth === void 0 ? 'auto' : _ref$minWidth,
1547
- _ref$maxWidth = _ref.maxWidth,
1548
- maxWidth = _ref$maxWidth === void 0 ? 'auto' : _ref$maxWidth,
1549
- other = _objectWithoutProperties(_ref, ["title", "content", "description", "cardImageUrl", "titleUrl", "children", "minWidth", "maxWidth"]);
1550
-
1551
- var _useState = useState(null),
1552
- _useState2 = _slicedToArray(_useState, 2),
1553
- imgHeight = _useState2[0],
1554
- setImgHeight = _useState2[1];
1555
-
1556
- return /*#__PURE__*/React.createElement("div", Object.assign({
1557
- className: "goa-card",
1558
- "data-testid": "card-container",
1559
- style: {
1560
- minWidth: minWidth,
1561
- maxWidth: maxWidth
1562
- }
1563
- }, other), cardImageUrl && /*#__PURE__*/React.createElement("div", {
1564
- className: "goa-poster-image",
1565
- "data-testid": "card-img"
1566
- }, /*#__PURE__*/React.createElement("img", {
1567
- height: imgHeight,
1568
- src: cardImageUrl,
1569
- alt: "Card cardImageUrl"
1570
- })), /*#__PURE__*/React.createElement("div", {
1571
- className: "card-content"
1572
- }, /*#__PURE__*/React.createElement("div", {
1573
- className: "goa-title",
1574
- "data-testid": "card-title"
1575
- }, titleUrl ? /*#__PURE__*/React.createElement("a", {
1576
- href: titleUrl,
1577
- "data-testid": "card-title-link"
1578
- }, title) : /*#__PURE__*/React.createElement("div", null, title)), /*#__PURE__*/React.createElement("p", {
1579
- className: "goa-text",
1580
- "data-testid": "card-content"
1581
- }, content !== null && content !== void 0 ? content : description), children && /*#__PURE__*/React.createElement("div", {
1582
- className: "goa-footer",
1583
- "data-testid": "card-footer"
1584
- }, children)));
1585
- };
1586
-
1587
- var css_248z$b = "/* Palette */\n/* Semantic usages */\n.goa-radio {\n margin-bottom: 10px; }\n .goa-radio input[type='radio'] {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n outline: 0;\n -webkit-appearance: none; }\n .goa-radio .goa-radio-label {\n z-index: 2;\n box-sizing: border-box;\n margin: 0;\n padding: 0 0 0 8px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n .goa-radio.goa-radio-disabled {\n opacity: 30%; }\n .goa-radio.goa-radio-disabled .goa-radio-label {\n cursor: default; }\n .goa-radio.has-error .goa-radio-container {\n border: solid 2px #fc1921;\n color: #fc1921; }\n .goa-radio.has-error .goa-radio-container svg {\n fill: #fc1921; }\n .goa-radio .goa-radio-container {\n z-index: 2;\n box-sizing: border-box;\n margin: 0;\n border: 1px solid #666;\n border-radius: 12px;\n height: 24px;\n width: 24px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 3px; }\n .goa-radio .goa-radio-container svg {\n fill: #fff; }\n .goa-radio .goa-radio-container.goa-radio-selected {\n background-color: #0070c4; }\n .goa-radio .goa-radio-container.goa-radio-selected .goa-radiomark {\n display: block !important; }\n .goa-radio .goa-radio-container:hover:not(.goa-radio-selected) {\n background-color: #f1f1f1; }\n .goa-radio .goa-radio-container:focus-within {\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n .goa-radio.goa-radio-label-before .goa-radio-container {\n order: 1;\n margin-left: 8px;\n margin-right: auto; }\n\n.goa-radio-layout {\n display: flex;\n flex-direction: row;\n align-items: center; }\n\n.goa-radio-inline-block {\n display: inline-block;\n margin-bottom: 5px;\n margin-top: 5px;\n margin-left: 5px; }\n";
1588
- styleInject(css_248z$b);
1589
-
1590
- var GoARadio = function GoARadio(_ref) {
1591
- var name = _ref.name,
1592
- value = _ref.value,
1593
- disabled = _ref.disabled,
1594
- _ref$labelPosition = _ref.labelPosition,
1595
- labelPosition = _ref$labelPosition === void 0 ? 'after' : _ref$labelPosition,
1596
- required = _ref.required,
1597
- children = _ref.children;
1598
- var selectedValue = useContext(RadioContext);
1599
- var updateSelectedValue = useContext(RadioUpdateContext);
1600
-
1601
- function hasError() {
1602
- return required && !selectedValue;
1603
- }
1604
-
1605
- function getSelectedCss() {
1606
- return classnames({
1607
- 'goa-radio-container': true,
1608
- 'goa-radio-selected': isChecked()
1609
- });
1610
- }
1611
-
1612
- function getRootCssClasses() {
1613
- return classnames({
1614
- 'goa-radio': true,
1615
- 'goa-radio-disabled': disabled,
1616
- 'has-error': hasError(),
1617
- 'goa-radio-label-before': labelPosition === 'before'
1618
- });
1619
- }
1620
-
1621
- function isChecked() {
1622
- return selectedValue === value;
1623
- }
1624
-
1625
- function onRadioChange(e) {
1626
- updateSelectedValue(e.target.value);
1627
- }
1628
-
1629
- return /*#__PURE__*/React.createElement("div", {
1630
- className: getRootCssClasses()
1631
- }, /*#__PURE__*/React.createElement("div", {
1632
- className: "goa-radio-inline-block"
1633
- }, /*#__PURE__*/React.createElement("label", {
1634
- className: "goa-radio-layout"
1635
- }, /*#__PURE__*/React.createElement("div", {
1636
- className: getSelectedCss()
1637
- }, /*#__PURE__*/React.createElement("input", {
1638
- type: "radio",
1639
- name: name,
1640
- value: value,
1641
- checked: isChecked(),
1642
- disabled: disabled,
1643
- onChange: onRadioChange
1644
- }), isChecked() && /*#__PURE__*/React.createElement("svg", {
1645
- xmlns: "http://www.w3.org/2000/svg",
1646
- width: "12",
1647
- height: "12",
1648
- viewBox: "0 0 12 12"
1649
- }, /*#__PURE__*/React.createElement("circle", {
1650
- cx: "6",
1651
- cy: "6",
1652
- r: "6",
1653
- fill: "#fff"
1654
- }))), /*#__PURE__*/React.createElement("span", {
1655
- className: "goa-radio-label"
1656
- }, children))));
1
+ import '@abgov/web-components';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import React, { useRef, useEffect } from 'react';
4
+
5
+ const GoAAppHeader = ({
6
+ title,
7
+ url,
8
+ children
9
+ }) => {
10
+ return jsx("goa-app-header", Object.assign({
11
+ title: title,
12
+ url: url
13
+ }, {
14
+ children: children
15
+ }), void 0);
16
+ };
17
+
18
+ const GoABadge = ({
19
+ type,
20
+ content,
21
+ icon,
22
+ testId
23
+ }) => {
24
+ return jsx("goa-badge", {
25
+ type: type,
26
+ content: content,
27
+ icon: icon,
28
+ testid: testId
29
+ }, void 0);
30
+ };
31
+ const GoAInfoBadge = ({
32
+ content,
33
+ testId
34
+ }) => {
35
+ return jsx(GoABadge, {
36
+ type: "information",
37
+ icon: "information-circle",
38
+ content: content,
39
+ testId: testId
40
+ }, void 0);
41
+ };
42
+ const GoASuccessBadge = ({
43
+ content,
44
+ testId
45
+ }) => {
46
+ return jsx(GoABadge, {
47
+ type: "success",
48
+ icon: "checkmark-circle",
49
+ content: content,
50
+ testId: testId
51
+ }, void 0);
52
+ };
53
+ const GoAWarningBadge = ({
54
+ content,
55
+ testId
56
+ }) => {
57
+ return jsx(GoABadge, {
58
+ type: "warning",
59
+ icon: "warning",
60
+ content: content,
61
+ testId: testId
62
+ }, void 0);
63
+ };
64
+ const GoAEmergencyBadge = ({
65
+ content,
66
+ testId
67
+ }) => {
68
+ return jsx(GoABadge, {
69
+ type: "emergency",
70
+ icon: "alert-circle",
71
+ content: content,
72
+ testId: testId
73
+ }, void 0);
1657
74
  };
1658
75
 
1659
- var css_248z$c = "/* Palette */\n/* Semantic usages */\n.goa-radio-group {\n margin-top: 28px; }\n .goa-radio-group.goa-radio-group-disabled.goa-radios {\n opacity: 30%;\n cursor: default; }\n .goa-radio-group .radio-group-title {\n font-size: 18px;\n font-weight: bold;\n color: #333;\n line-height: 28px; }\n .goa-radio-group .helper-text {\n font-size: 14px;\n font-weight: normal;\n color: #333;\n margin-bottom: 20px; }\n .goa-radio-group .required-label {\n margin-left: 8px;\n font-size: 14px;\n color: #666; }\n .goa-radio-group .error-text {\n color: #fc1921;\n font-size: 14px;\n margin-bottom: 20px; }\n";
1660
- styleInject(css_248z$c);
1661
-
1662
- var RadioContext = React.createContext('');
1663
- var RadioUpdateContext = React.createContext( // eslint-disable-next-line @typescript-eslint/no-empty-function
1664
- function () {});
1665
- var GoARadioGroup = function GoARadioGroup(_ref) {
1666
- var helperText = _ref.helperText,
1667
- onChange = _ref.onChange,
1668
- required = _ref.required,
1669
- requiredErrorMessage = _ref.requiredErrorMessage,
1670
- title = _ref.title,
1671
- value = _ref.value,
1672
- items = _ref.items,
1673
- children = _ref.children,
1674
- childAttrs = _objectWithoutProperties(_ref, ["helperText", "onChange", "required", "requiredErrorMessage", "title", "value", "items", "children"]);
1675
-
1676
- var _useState = useState(value),
1677
- _useState2 = _slicedToArray(_useState, 2),
1678
- selectedValue = _useState2[0],
1679
- setSelectedValue = _useState2[1];
1680
-
1681
- function handleOnChange(val) {
1682
- setSelectedValue(val);
1683
- onChange(val);
1684
- }
1685
-
1686
- function hasError() {
1687
- return required && !selectedValue;
1688
- }
1689
-
1690
- function getChildren() {
1691
- if (children) {
1692
- return Children.map(children, function (child) {
1693
- var key = "".concat(childAttrs.name, "-").concat(child.props.value);
1694
- return React.cloneElement(child, _objectSpread2(_objectSpread2({}, childAttrs), {}, {
1695
- key: key,
1696
- required: required
1697
- }));
1698
- });
1699
- }
76
+ function styleInject(css, ref) {
77
+ if ( ref === void 0 ) ref = {};
78
+ var insertAt = ref.insertAt;
1700
79
 
1701
- return items.map(function (item) {
1702
- return /*#__PURE__*/React.createElement(GoARadio, {
1703
- key: "".concat(childAttrs.name, "-").concat(item.value),
1704
- labelPosition: childAttrs.labelPosition,
1705
- name: childAttrs.name,
1706
- disabled: childAttrs.disabled,
1707
- value: item.value,
1708
- children: item.text,
1709
- required: required
1710
- });
1711
- });
1712
- }
80
+ if (!css || typeof document === 'undefined') { return; }
1713
81
 
1714
- return /*#__PURE__*/React.createElement("div", {
1715
- className: "goa-radio-group"
1716
- }, title && /*#__PURE__*/React.createElement("span", {
1717
- className: "radio-group-title"
1718
- }, title), required && /*#__PURE__*/React.createElement("span", {
1719
- className: "required-label"
1720
- }, "(Required)"), helperText && /*#__PURE__*/React.createElement("div", {
1721
- className: "helper-text"
1722
- }, helperText), /*#__PURE__*/React.createElement(RadioContext.Provider, {
1723
- value: selectedValue
1724
- }, /*#__PURE__*/React.createElement(RadioUpdateContext.Provider, {
1725
- value: handleOnChange
1726
- }, /*#__PURE__*/React.createElement("div", {
1727
- className: "goa-radios"
1728
- }, getChildren()))), hasError() && /*#__PURE__*/React.createElement("div", {
1729
- className: "error-text"
1730
- }, requiredErrorMessage));
1731
- };
82
+ var head = document.head || document.getElementsByTagName('head')[0];
83
+ var style = document.createElement('style');
84
+ style.type = 'text/css';
1732
85
 
1733
- var css_248z$d = "/* Palette */\n/* Semantic usages */\n.goa-card-group {\n margin-top: 14px;\n vertical-align: top; }\n .goa-card-group .card-group-title {\n font-size: 28px;\n font-weight: bold;\n color: #333; }\n .goa-card-group .card-group-basic {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: stretch; }\n .goa-card-group .card-group-basic > div {\n margin: 14px 10px; }\n .goa-card-group .card-group-basic-vue > div {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: stretch; }\n .goa-card-group .card-group-basic-vue > div > div {\n margin: 14px 10px; }\n .goa-card-group .card-group-column {\n display: inline-block;\n flex-direction: column;\n -moz-column-count: 3;\n column-count: 3;\n flex-wrap: wrap;\n align-items: stretch; }\n .goa-card-group .card-group-column > div {\n margin: 14px; }\n .goa-card-group .card-group-column-vue > div {\n display: inline-block;\n flex-direction: column;\n -moz-column-count: 3;\n column-count: 3;\n flex-wrap: wrap;\n align-items: stretch; }\n .goa-card-group .card-group-column > div > div {\n margin: 14px; }\n";
1734
- styleInject(css_248z$d);
1735
-
1736
- var GoACardGroup = function GoACardGroup(_ref) {
1737
- var _ref$title = _ref.title,
1738
- title = _ref$title === void 0 ? null : _ref$title,
1739
- _ref$children = _ref.children,
1740
- children = _ref$children === void 0 ? null : _ref$children,
1741
- _ref$layout = _ref.layout,
1742
- layout = _ref$layout === void 0 ? 'basic' : _ref$layout,
1743
- _ref$cardItems = _ref.cardItems,
1744
- cardItems = _ref$cardItems === void 0 ? null : _ref$cardItems;
1745
-
1746
- function getCards() {
1747
- if (children) {
1748
- return children;
86
+ if (insertAt === 'top') {
87
+ if (head.firstChild) {
88
+ head.insertBefore(style, head.firstChild);
89
+ } else {
90
+ head.appendChild(style);
1749
91
  }
1750
-
1751
- return cardItems.map(function (item, index) {
1752
- return /*#__PURE__*/React.createElement(GoACard, Object.assign({}, item, {
1753
- key: index
1754
- }), item.children);
1755
- });
92
+ } else {
93
+ head.appendChild(style);
1756
94
  }
1757
95
 
1758
- return /*#__PURE__*/React.createElement("div", {
1759
- className: "goa-card-group"
1760
- }, /*#__PURE__*/React.createElement("div", {
1761
- className: "card-group-title"
1762
- }, title), /*#__PURE__*/React.createElement("div", {
1763
- className: "card-group-".concat(layout)
1764
- }, getCards()));
1765
- };
1766
-
1767
- /** Used to store the options in the dropdown */
1768
-
1769
- // eslint-disable-next-line @typescript-eslint/naming-convention
1770
- var DropdownContext = createContext({});
1771
-
1772
- var css_248z$e = "/* Palette */\n/* Semantic usages */\n/* This style is from the alberta design system */\n/* Palette */\n/* Semantic usages */\n.dropdown-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n\n.dropdown-menu {\n border: solid 1px #dcdcdc;\n border-radius: 4px;\n background: #fff;\n padding: 0;\n margin-top: 3px;\n width: 100%;\n overflow-y: auto; }\n .dropdown-menu .option-group .option-group-label {\n font-weight: bold;\n padding: 4px 12px; }\n .dropdown-menu .option-group .option {\n font-weight: normal;\n padding: 4px 24px; }\n .dropdown-menu .option {\n padding: 4px 12px;\n color: #0070c4;\n border: 1px solid #f1f1f1; }\n .dropdown-menu .option.selected {\n background-color: #0070c4;\n color: #fff; }\n .dropdown-menu .option.selected.active {\n background-color: #004f84;\n color: #fff; }\n .dropdown-menu .option.active {\n background-color: #f1f1f1;\n color: #333; }\n\n.goa-dropdown {\n position: relative;\n /* add chevron */ }\n .goa-dropdown .dropdown-grouping input[type=text] {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding-right: 30px !important; }\n .goa-dropdown .dropdown-grouping.disabled {\n opacity: 30%; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox {\n /* remove default arrow IE */ }\n .goa-dropdown .dropdown-grouping .dropdown-textbox {\n box-sizing: border-box;\n width: 100%;\n margin: 8px 0 0;\n padding: 12px;\n padding-right: 8px;\n border-radius: 4px;\n border: 1px solid #666;\n font-size: 18px;\n font-weight: 400;\n color: #0070c4;\n /* removes default arrow */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox:disabled {\n opacity: 0.3;\n pointer-events: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox::-ms-expand {\n display: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox:hover {\n border: 1px solid #0070c4; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox:focus {\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox.margin-override {\n margin: 0; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter {\n /* remove default arrow IE */\n font-size: 14px !important;\n border: none !important;\n margin: 0 !important; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter {\n box-sizing: border-box;\n width: 100%;\n margin: 8px 0 0;\n padding: 12px;\n padding-right: 8px;\n border-radius: 4px;\n border: 1px solid #666;\n font-size: 18px;\n font-weight: 400;\n color: #0070c4;\n /* removes default arrow */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter:disabled {\n opacity: 0.3;\n pointer-events: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter::-ms-expand {\n display: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter:hover {\n border: 1px solid #0070c4; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter:focus {\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n .goa-dropdown .dropdown-grouping .dropdown-textbox-filter:focus {\n box-shadow: none !important;\n outline: none; }\n .goa-dropdown i.goa-select-icon {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='' opacity='1' d='M11.29,15.7a1,1,0,0,0,1.41,0l6-6A1,1,0,1,0,17.29,8.3L12,13.58,6.71,8.3a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41Z'/%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center;\n left: auto;\n right: 8px;\n width: 24px;\n height: 24px;\n pointer-events: none;\n position: absolute;\n margin-top: 16px;\n color: #0070c4; }\n .goa-dropdown.disabled i.goa-select-icon {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='' opacity='0.3' d='M11.29,15.7a1,1,0,0,0,1.41,0l6-6A1,1,0,1,0,17.29,8.3L12,13.58,6.71,8.3a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41Z'/%3E%3C/svg%3E%0A\");\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center center; }\n .goa-dropdown.opened i.goa-select-icon {\n transform: rotate(180deg); }\n .goa-dropdown.has-error .dropdown-grouping .dropdown-textbox {\n border: solid 2px #fc1921; }\n .goa-dropdown .dropdown-label {\n font-size: 18px;\n font-weight: bold;\n color: #333; }\n .goa-dropdown .required-label {\n margin-left: 8px;\n font-size: 14px;\n color: #666; }\n .goa-dropdown .helper-text {\n font-size: 14px;\n font-weight: normal;\n color: #333; }\n .goa-dropdown .error-text {\n color: #fc1921;\n font-size: 14px; }\n";
1773
- styleInject(css_248z$e);
1774
-
1775
- var GoAOption = function GoAOption(props) {
1776
- var label = props.label,
1777
- children = props.children,
1778
- selected = props.selected;
1779
-
1780
- var _useState = useState(''),
1781
- _useState2 = _slicedToArray(_useState, 2),
1782
- isActive = _useState2[0],
1783
- setActive = _useState2[1];
1784
-
1785
- var _useContext = useContext(DropdownContext),
1786
- selectionChanged = _useContext.selectionChanged;
1787
-
1788
- function onClick(e) {
1789
- e.stopPropagation(); // Flip the props, since user click it
1790
-
1791
- var selected = !props.selected;
1792
-
1793
- if (selectionChanged) {
1794
- selectionChanged(_objectSpread2(_objectSpread2({}, props), {}, {
1795
- selected: selected
1796
- }));
1797
- }
96
+ if (style.styleSheet) {
97
+ style.styleSheet.cssText = css;
98
+ } else {
99
+ style.appendChild(document.createTextNode(css));
1798
100
  }
101
+ }
1799
102
 
1800
- function rootCss() {
1801
- return classnames({
1802
- option: true,
1803
- selected: selected,
1804
- active: isActive
1805
- });
1806
- }
103
+ var css_248z$1 = "goa-button + goa-button {\n margin-top: 1.5rem;\n}\n\n/* TODO: these margins need to match UI specs */\n@media (min-width: 480px) {\n goa-button + goa-button {\n margin-left: 1rem;\n }\n}\n";
104
+ styleInject(css_248z$1);
1807
105
 
1808
- return /*#__PURE__*/React.createElement("div", {
1809
- role: "listitem",
1810
- className: rootCss(),
1811
- onClick: onClick,
1812
- onMouseEnter: function onMouseEnter() {
1813
- setActive('active');
1814
- },
1815
- onMouseLeave: function onMouseLeave() {
1816
- setActive('');
106
+ const GoAButton = ({
107
+ title,
108
+ disabled: _disabled = false,
109
+ type: _type = 'primary',
110
+ size: _size = 'normal',
111
+ variant: _variant = 'default',
112
+ children,
113
+ onClick
114
+ }) => {
115
+ const el = useRef(null);
116
+ useEffect(() => {
117
+ if (!el.current) {
118
+ return;
1817
119
  }
1818
- }, /*#__PURE__*/React.createElement("div", {
1819
- className: "goa-option"
1820
- }, children || label));
1821
- };
1822
- GoAOption.defaultProps = {
1823
- defaultSelected: false
1824
- };
1825
-
1826
- var GoAOptionGroup = function GoAOptionGroup(_ref) {
1827
- var label = _ref.label,
1828
- children = _ref.children;
1829
120
 
1830
- var _useState = useState([]),
1831
- _useState2 = _slicedToArray(_useState, 2),
1832
- itemLabels = _useState2[0],
1833
- setItemLabels = _useState2[1]; // Load the itemLabes state variable
121
+ const current = el.current;
1834
122
 
123
+ const listener = e => {
124
+ onClick(e);
125
+ };
1835
126
 
1836
- useEffect(function () {
1837
- var allLabels = [];
1838
- Children.forEach(children, function (child) {
1839
- var _child$props, _child$props2;
1840
-
1841
- if ((_child$props = child.props) !== null && _child$props !== void 0 && _child$props.value && (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.label) {
1842
- allLabels.push(child.props.label);
1843
- }
1844
- });
1845
- setItemLabels(allLabels);
1846
- }, []);
1847
- return /*#__PURE__*/React.createElement("div", {
1848
- className: "option-group"
1849
- }, /*#__PURE__*/React.createElement("div", {
1850
- className: "option-group-label"
1851
- }, label), children);
1852
- };
127
+ current.addEventListener('_click', listener);
128
+ return () => {
129
+ current.removeEventListener('_click', listener);
130
+ };
131
+ }, [el, onClick]);
132
+ return jsx("goa-button", Object.assign({
133
+ ref: el,
134
+ role: "button",
135
+ type: _type,
136
+ size: _size,
137
+ variant: _variant,
138
+ disabled: _disabled,
139
+ title: title
140
+ }, {
141
+ children: children
142
+ }), void 0);
143
+ };
144
+
145
+ var css_248z = "goa-button-group > goa-button ~ goa-button {\n margin: 0;\n margin-top: 0.25rem;\n}\n\n@media (min-width: 320px) {\n goa-button-group > goa-button ~ goa-button {\n margin: 0;\n /* margin-left: 0.25rem; */\n }\n}\n";
146
+ styleInject(css_248z);
1853
147
 
1854
- var GoADropdown = function GoADropdown(_ref) {
1855
- var title = _ref.title,
1856
- subTitle = _ref.subTitle,
1857
- menuHeight = _ref.menuHeight,
1858
- multiple = _ref.multiple,
1859
- disabled = _ref.disabled,
1860
- description = _ref.description,
1861
- children = _ref.children,
1862
- errorMessage = _ref.errorMessage,
1863
- display = _ref.display,
1864
- selectionChanged = _ref.selectionChanged,
1865
- key = _ref.key,
1866
- open = _ref.open,
1867
- menuEditable = _ref.menuEditable,
1868
- menuInputChanged = _ref.menuInputChanged,
1869
- rest = _objectWithoutProperties(_ref, ["title", "subTitle", "menuHeight", "multiple", "disabled", "description", "children", "errorMessage", "display", "selectionChanged", "key", "open", "menuEditable", "menuInputChanged"]);
1870
-
1871
- var _useState = useState(false),
1872
- _useState2 = _slicedToArray(_useState, 2),
1873
- isOpen = _useState2[0],
1874
- setIsOpen = _useState2[1];
1875
-
1876
- var _useState3 = useState(0),
1877
- _useState4 = _slicedToArray(_useState3, 2),
1878
- maxMenuHeight = _useState4[0],
1879
- setMaxMenuHeight = _useState4[1];
1880
-
1881
- var menuRef = useRef();
1882
- var overlayRef = useRef();
1883
-
1884
- var toggleOpen = function toggleOpen() {
1885
- if (!disabled) {
1886
- setIsOpen(!isOpen);
148
+ const GoAButtonGroup = ({
149
+ alignment,
150
+ children
151
+ }) => {
152
+ return jsx("goa-button-group", Object.assign({
153
+ alignment: alignment
154
+ }, {
155
+ children: children
156
+ }), void 0);
157
+ };
158
+
159
+ const GoACallout = ({
160
+ title,
161
+ type: _type = "information",
162
+ children
163
+ }) => {
164
+ return jsx("goa-callout", Object.assign({
165
+ title: title,
166
+ type: _type
167
+ }, {
168
+ children: children
169
+ }), void 0);
170
+ };
171
+
172
+ const GoACheckbox = ({
173
+ id,
174
+ name,
175
+ testId,
176
+ error,
177
+ disabled,
178
+ checked,
179
+ value,
180
+ text,
181
+ children,
182
+ onChange
183
+ }) => {
184
+ const el = useRef(null);
185
+ useEffect(() => {
186
+ if (!el.current) {
187
+ return;
1887
188
  }
1888
- };
1889
-
1890
- var rootDropDownCss = function rootDropDownCss() {
1891
- return classnames({
1892
- 'goa-dropdown': true,
1893
- 'single-selection': !multiple,
1894
- 'has-error': errorMessage && errorMessage.length > 0
1895
- });
1896
- };
1897
-
1898
- var dropDownGroupCss = function dropDownGroupCss() {
1899
- return classnames({
1900
- 'dropdown-grouping': true,
1901
- 'disabled': disabled
1902
- });
1903
- };
1904
189
 
1905
- useEffect(function () {
1906
- var _overlayRef$current, _menuRef$current;
190
+ const current = el.current;
1907
191
 
1908
- var height = menuHeight > 0 ? menuHeight : ((_overlayRef$current = overlayRef.current) === null || _overlayRef$current === void 0 ? void 0 : _overlayRef$current.clientHeight) - ((_menuRef$current = menuRef.current) === null || _menuRef$current === void 0 ? void 0 : _menuRef$current.offsetTop) - 20 || 0;
1909
- setMaxMenuHeight(height);
1910
- });
192
+ const listener = e => {
193
+ onChange === null || onChange === void 0 ? void 0 : onChange(name, e.detail.checked, e.detail.value);
194
+ };
1911
195
 
1912
- var canOpen = function canOpen(isOpenState, isOpenProp) {
1913
- // If open property is not provide, default menu toggle will be applied
1914
- if (isOpenProp !== undefined) {
1915
- return isOpenProp;
196
+ current.addEventListener('_change', listener);
197
+ return () => {
198
+ current.removeEventListener('_change', listener);
199
+ };
200
+ }, []);
201
+ return jsx("goa-checkbox", Object.assign({
202
+ "data-testid": testId,
203
+ ref: el,
204
+ id: id,
205
+ name: name,
206
+ error: error,
207
+ checked: checked,
208
+ disabled: disabled,
209
+ text: text,
210
+ value: value
211
+ }, {
212
+ children: children
213
+ }), void 0);
214
+ };
215
+
216
+ const GoACircularProgress = ({
217
+ type,
218
+ visible,
219
+ message,
220
+ progress,
221
+ variant,
222
+ size
223
+ }) => {
224
+ return jsx("goa-circular-progress", {
225
+ type: type,
226
+ visible: visible ? "true" : "false",
227
+ message: message,
228
+ progress: progress,
229
+ variant: variant,
230
+ size: size
231
+ }, void 0);
232
+ };
233
+
234
+ const GoAContainer = ({
235
+ headingSize,
236
+ title,
237
+ children,
238
+ actions,
239
+ variant: _variant = 'default'
240
+ }) => {
241
+ return jsxs("goa-container", Object.assign({
242
+ variant: _variant,
243
+ headingsize: headingSize
244
+ }, {
245
+ children: [title && jsx("div", Object.assign({
246
+ slot: "title"
247
+ }, {
248
+ children: title
249
+ }), void 0), children, actions && jsx("div", Object.assign({
250
+ slot: "actions"
251
+ }, {
252
+ children: actions
253
+ }), void 0)]
254
+ }), void 0);
255
+ };
256
+
257
+ const GoADropdownOption = props => {
258
+ return jsx("goa-dropdown-item", Object.assign({
259
+ "data-testid": props.testId,
260
+ name: props.name,
261
+ value: props.value,
262
+ label: props.label
263
+ }, {
264
+ children: props.children
265
+ }), void 0);
266
+ };
267
+
268
+ const GoADropdown = props => {
269
+ const el = useRef(null);
270
+ useEffect(() => {
271
+ if (!el.current) {
272
+ return;
1916
273
  }
1917
274
 
1918
- return isOpenState;
1919
- };
275
+ const current = el.current;
1920
276
 
1921
- var canMenuEditable = function canMenuEditable(editableProp) {
1922
- if (editableProp !== undefined) {
1923
- return editableProp;
1924
- }
277
+ const handler = state => {
278
+ const {
279
+ name,
280
+ value
281
+ } = state.detail;
282
+ props.onChange(name, value);
283
+ };
1925
284
 
1926
- return true;
285
+ current.addEventListener('_change', handler);
286
+ return () => {
287
+ current.removeEventListener('_change', handler);
288
+ };
289
+ }, [el, props]);
290
+ return jsx("goa-dropdown", Object.assign({
291
+ ref: el,
292
+ name: props.name,
293
+ values: JSON.stringify(props.values),
294
+ leadingicon: props.leadingIcon,
295
+ maxheight: props.maxHeight,
296
+ placeholder: props.placeholder,
297
+ filterable: props.filterable,
298
+ disabled: props.disabled,
299
+ multiselect: props.multiselect,
300
+ error: props.error,
301
+ "data-testid": props.testId
302
+ }, {
303
+ children: props.children
304
+ }), void 0);
305
+ };
306
+
307
+ const GoAFlexRow = ({
308
+ gap,
309
+ minWidth,
310
+ children
311
+ }) => {
312
+ const style = {
313
+ gap: gap === 'small' ? '1rem' : gap === 'medium' ? '2rem' : gap === 'large' ? '3rem' : '0'
1927
314
  };
1928
315
 
1929
- return /*#__PURE__*/React.createElement(DropdownContext.Provider, {
1930
- value: {
1931
- selectionChanged: selectionChanged
1932
- }
1933
- }, /*#__PURE__*/React.createElement("div", {
1934
- className: "dropdown-overlay",
1935
- "data-testid": "dropdown-container",
1936
- ref: overlayRef,
1937
- onClick: toggleOpen
1938
- }), /*#__PURE__*/React.createElement("div", Object.assign({
1939
- className: rootDropDownCss()
1940
- }, rest), /*#__PURE__*/React.createElement("label", {
1941
- className: "dropdown-label",
1942
- htmlFor: "input-for-".concat(title)
1943
- }, title), subTitle && /*#__PURE__*/React.createElement("span", {
1944
- className: "required-label"
1945
- }, subTitle), /*#__PURE__*/React.createElement("div", {
1946
- className: dropDownGroupCss(),
1947
- onClick: toggleOpen
1948
- }, /*#__PURE__*/React.createElement("i", {
1949
- className: "goa-select-icon"
1950
- }), /*#__PURE__*/React.createElement("input", {
1951
- role: "searchbox",
1952
- className: "dropdown-textbox margin-override",
1953
- type: "text",
1954
- "data-testid": "menu-input",
1955
- style: {
1956
- cursor: 'default'
1957
- },
1958
- id: "input-for-".concat(key),
1959
- placeholder: display ? display : description,
1960
- onChange: function onChange(e) {
1961
- menuInputChanged && menuInputChanged(e.target.value);
1962
- },
1963
- readOnly: !canMenuEditable(menuEditable)
1964
- }), canOpen(isOpen, open) && /*#__PURE__*/React.createElement("div", {
1965
- className: "dropdown-menu",
1966
- "data-testid": "dropdown-menu",
1967
- ref: menuRef,
1968
- style: {
1969
- position: 'absolute',
1970
- zIndex: 1000,
1971
- maxHeight: "".concat(maxMenuHeight, "px"),
1972
- overflow: 'auto'
316
+ const getChildren = () => {
317
+ if (!children) {
318
+ return null;
1973
319
  }
1974
- }, children)), !description && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1975
- className: "helper-text"
1976
- }, description)), errorMessage && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1977
- className: "dropdown-label error-text"
1978
- }, errorMessage))));
1979
- };
1980
- GoADropdown.defaultProps = {
1981
- disabled: false,
1982
- description: null
1983
- };
1984
-
1985
- var css_248z$f = "/* Palette */\n/* Semantic usages */\n.goa-checkbox input[type='checkbox'] {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n outline: 0;\n -webkit-appearance: none; }\n\n.goa-checkbox .goa-checkbox-label {\n z-index: 2;\n box-sizing: border-box;\n margin: 0;\n padding: 0 0 0 8px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n height: 46px;\n display: flex;\n align-items: center; }\n\n.goa-checkbox.goa-checkbox-disabled {\n opacity: 30%; }\n .goa-checkbox.goa-checkbox-disabled .goa-checkbox-label {\n cursor: default; }\n\n.goa-checkbox.has-error .goa-checkbox-container {\n border: solid 2px #fc1921;\n color: #fc1921; }\n .goa-checkbox.has-error .goa-checkbox-container svg {\n fill: #fc1921; }\n\n.goa-checkbox .goa-checkbox-container {\n box-sizing: border-box;\n border: 1px solid #666;\n border-radius: 2px;\n height: 24px;\n line-height: 24px;\n width: 24px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 3px; }\n .goa-checkbox .goa-checkbox-container svg {\n display: none;\n flex: 1 1 auto;\n fill: #fff; }\n .goa-checkbox .goa-checkbox-container.goa-checkbox-selected {\n background-color: #0070c4; }\n .goa-checkbox .goa-checkbox-container.goa-checkbox-selected .goa-checkmark {\n display: block !important; }\n .goa-checkbox .goa-checkbox-container.goa-checkbox-selected .goa-indeterminate {\n display: none !important; }\n .goa-checkbox .goa-checkbox-container.goa-checkbox-indeterminate {\n background-color: #0070c4; }\n .goa-checkbox .goa-checkbox-container.goa-checkbox-indeterminate .goa-checkmark {\n display: none; }\n .goa-checkbox .goa-checkbox-container.goa-checkbox-indeterminate .goa-indeterminate {\n display: block; }\n .goa-checkbox .goa-checkbox-container:hover:not(.goa-checkbox-selected):not(.goa-checkbox-indeterminate) {\n background-color: #f1f1f1; }\n .goa-checkbox .goa-checkbox-container:focus-within {\n box-shadow: 0 0 0 3px #feba35;\n outline: none; }\n\n.goa-checkbox.goa-checkbox-label-before .goa-checkbox-container {\n order: 1;\n margin-left: 8px;\n margin-right: auto; }\n\n.goa-checkbox-layout {\n display: inline-flex;\n align-items: center; }\n";
1986
- styleInject(css_248z$f);
1987
-
1988
- var GoACheckbox = function GoACheckbox(_ref) {
1989
- var _ref$checked = _ref.checked,
1990
- checked = _ref$checked === void 0 ? false : _ref$checked,
1991
- _ref$required = _ref.required,
1992
- required = _ref$required === void 0 ? false : _ref$required,
1993
- _ref$disabled = _ref.disabled,
1994
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
1995
- _ref$indeterminate = _ref.indeterminate,
1996
- indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
1997
- _ref$labelPosition = _ref.labelPosition,
1998
- labelPosition = _ref$labelPosition === void 0 ? 'before' : _ref$labelPosition,
1999
- _ref$value = _ref.value,
2000
- value = _ref$value === void 0 ? '' : _ref$value,
2001
- content = _ref.content,
2002
- children = _ref.children,
2003
- selectionChange = _ref.selectionChange;
2004
-
2005
- var hasError = function hasError() {
2006
- return required && !checked;
2007
- };
2008
-
2009
- var rootCss = function rootCss() {
2010
- return classnames({
2011
- 'goa-checkbox': true,
2012
- 'goa-checkbox-disabled': disabled,
2013
- 'has-error': hasError(),
2014
- 'goa-checkbox-label-before': labelPosition === 'before'
2015
- });
2016
- };
2017
320
 
2018
- var checkboxCss = function checkboxCss() {
2019
- return classnames({
2020
- 'goa-checkbox-container': true,
2021
- 'goa-checkbox-selected': !indeterminate && checked,
2022
- 'goa-checkbox-indeterminate': indeterminate && checked
321
+ return React.Children.map(children, child => {
322
+ return /*#__PURE__*/React.cloneElement(child, {
323
+ style: Object.assign({
324
+ flexBasis: minWidth
325
+ }, child.props.style)
326
+ });
2023
327
  });
2024
328
  };
2025
329
 
2026
- return /*#__PURE__*/React.createElement("div", {
2027
- className: rootCss()
2028
- }, /*#__PURE__*/React.createElement("label", {
2029
- className: "goa-checkbox-layout"
2030
- }, /*#__PURE__*/React.createElement("div", {
2031
- className: checkboxCss()
2032
- }, /*#__PURE__*/React.createElement("input", {
2033
- type: "checkbox",
2034
- checked: checked,
2035
- disabled: disabled,
2036
- required: required,
2037
- value: value,
2038
- onChange: function onChange(e) {
2039
- return selectionChange(e.target.checked);
2040
- }
2041
- }), indeterminate && checked && /*#__PURE__*/React.createElement("svg", {
2042
- id: "dashmark",
2043
- xmlns: "http://www.w3.org/2000/svg",
2044
- viewBox: "0 0 15 2",
2045
- className: "goa-indeterminate"
2046
- }, /*#__PURE__*/React.createElement("rect", {
2047
- width: "15",
2048
- height: "2"
2049
- })), !indeterminate && checked && /*#__PURE__*/React.createElement("svg", {
2050
- id: "checkmark",
2051
- xmlns: "http://www.w3.org/2000/svg",
2052
- viewBox: "0 0 16 12.18",
2053
- className: "goa-checkmark"
2054
- }, /*#__PURE__*/React.createElement("path", {
2055
- d: "M5.09,9.64,1.27,5.82,0,7.09l5.09,5.09L16,1.27,14.73,0Z"
2056
- }))), /*#__PURE__*/React.createElement("span", {
2057
- className: "goa-checkbox-label"
2058
- }, content || children)));
2059
- };
2060
-
2061
- var css_248z$g = "/* Palette */\n/* Semantic usages */\n.svg {\n max-width: 100px; }\n\n.svg--small {\n max-width: 65px; }\n\n@-webkit-keyframes circle-animation {\n 0% {\n stroke-dashoffset: 75;\n transform: rotate(0); }\n 100% {\n stroke-dashoffset: 75;\n transform: rotate(360deg); } }\n\n@keyframes circle-animation {\n 0% {\n stroke-dashoffset: 75;\n transform: rotate(0); }\n 100% {\n stroke-dashoffset: 75;\n transform: rotate(360deg); } }\n\n.base-circle {\n display: block;\n fill: transparent;\n stroke: #c8eef9;\n stroke-width: 7px; }\n\n.progress-circle, .progress-circle--infinite {\n display: block;\n fill: transparent;\n stroke: #0070c4;\n stroke-linecap: round;\n stroke-dasharray: 283;\n stroke-dashoffset: 280;\n stroke-width: 7px;\n transform-origin: 50% 50%; }\n .progress-circle--infinite {\n -webkit-animation: circle-animation 1.2s linear infinite;\n animation: circle-animation 1.2s linear infinite; }\n\n.progress-message, .progress-message--large, .progress-message--small {\n font-style: normal;\n font-weight: normal; }\n .progress-message--large {\n margin-top: 32px;\n font-size: 24px;\n color: #000; }\n .progress-message--small {\n margin-top: 18px;\n font-size: 18px;\n color: #000; }\n\n.progress-container, .progress-container--small, .progress-container--large {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: white; }\n .progress-container--large {\n width: 100%;\n height: 100%; }\n";
2062
- styleInject(css_248z$g);
2063
-
2064
- var GoAPageLoader = function GoAPageLoader(_ref) {
2065
- var _ref$type = _ref.type,
2066
- type = _ref$type === void 0 ? 'infinite' : _ref$type,
2067
- _ref$visible = _ref.visible,
2068
- visible = _ref$visible === void 0 ? false : _ref$visible,
2069
- _ref$message = _ref.message,
2070
- message = _ref$message === void 0 ? 'Loading...' : _ref$message,
2071
- _ref$value = _ref.value,
2072
- value = _ref$value === void 0 ? 0 : _ref$value,
2073
- _ref$pagelock = _ref.pagelock,
2074
- pagelock = _ref$pagelock === void 0 ? true : _ref$pagelock,
2075
- _ref$displayType = _ref.displayType,
2076
- displayType = _ref$displayType === void 0 ? 'large' : _ref$displayType;
2077
-
2078
- /**
2079
- * Set defaults
2080
- */
2081
- var progressMaxValue = 283;
2082
- var strokeDashoffset = 0;
2083
- /**
2084
- * Sets the progress if in progress mode.
2085
- * @param progress
2086
- * @returns
2087
- */
2088
-
2089
- function setProgress(progress) {
2090
- if (type !== 'progress') {
2091
- return;
2092
- }
2093
-
2094
- if (progress === 0) {
2095
- strokeDashoffset = progressMaxValue;
2096
- return;
2097
- }
2098
-
2099
- if (progress >= 100) {
330
+ return jsx("div", Object.assign({
331
+ className: "goa-flex-row",
332
+ style: style
333
+ }, {
334
+ children: getChildren()
335
+ }), void 0);
336
+ };
337
+
338
+ const GoAFormItem = ({
339
+ children,
340
+ helpText,
341
+ error,
342
+ optional,
343
+ label
344
+ }) => {
345
+ return jsx("goa-form-item", Object.assign({
346
+ label: label,
347
+ error: error,
348
+ optional: optional,
349
+ helptext: helpText
350
+ }, {
351
+ children: children
352
+ }), void 0);
353
+ };
354
+
355
+ const GoAHeroBanner = ({
356
+ title,
357
+ backgroundUrl,
358
+ children
359
+ }) => {
360
+ return jsx("goa-hero-banner", Object.assign({
361
+ title: title,
362
+ backgroundurl: backgroundUrl
363
+ }, {
364
+ children: children
365
+ }), void 0);
366
+ };
367
+
368
+ const GoAHeroBannerActions = ({
369
+ children
370
+ }) => {
371
+ return jsx("div", Object.assign({
372
+ slot: "actions"
373
+ }, {
374
+ children: children
375
+ }), void 0);
376
+ };
377
+
378
+ function GoAIcon({
379
+ type,
380
+ theme = 'outline',
381
+ size = 'medium'
382
+ }) {
383
+ return jsx("goa-icon", {
384
+ type: type,
385
+ theme: theme,
386
+ size: size
387
+ }, void 0);
388
+ }
389
+
390
+ const GoAIconButton = ({
391
+ type,
392
+ disabled,
393
+ variant: _variant = 'primary',
394
+ onClick,
395
+ size: _size = 'medium',
396
+ title,
397
+ children
398
+ }) => {
399
+ const ref = useRef(null);
400
+ useEffect(() => {
401
+ if (!ref.current) {
2100
402
  return;
2101
403
  }
2102
404
 
2103
- var value = progressMaxValue - Math.round(progressMaxValue * progress / 100);
2104
- strokeDashoffset = value;
2105
- }
405
+ const current = ref.current;
2106
406
 
2107
- if (visible) {
2108
- if (pagelock && displayType !== 'small') {
2109
- document.body.style.height = '100%';
2110
- document.body.style.overflow = 'hidden';
2111
- } else {
2112
- document.body.style.removeProperty('height');
2113
- document.body.style.removeProperty('overflow');
2114
- }
407
+ const listener = e => {
408
+ onClick();
409
+ };
2115
410
 
2116
- if (type === 'progress') {
2117
- setProgress(value);
411
+ current.addEventListener('_click', listener);
412
+ return () => {
413
+ current.removeEventListener('_click', listener);
414
+ };
415
+ }, [ref, onClick]);
416
+ return jsx("goa-icon-button", Object.assign({
417
+ ref: ref,
418
+ type: type,
419
+ disabled: disabled,
420
+ variant: _variant,
421
+ size: _size,
422
+ title: title
423
+ }, {
424
+ children: children
425
+ }), void 0);
426
+ };
427
+
428
+ /*! *****************************************************************************
429
+ Copyright (c) Microsoft Corporation.
430
+
431
+ Permission to use, copy, modify, and/or distribute this software for any
432
+ purpose with or without fee is hereby granted.
433
+
434
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
435
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
436
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
437
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
438
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
439
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
440
+ PERFORMANCE OF THIS SOFTWARE.
441
+ ***************************************************************************** */
442
+
443
+ function __rest(s, e) {
444
+ var t = {};
445
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
446
+ t[p] = s[p];
447
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
448
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
449
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
450
+ t[p[i]] = s[p[i]];
451
+ }
452
+ return t;
453
+ }
454
+
455
+ const GoAInput = ({
456
+ id,
457
+ name,
458
+ type,
459
+ leadingIcon,
460
+ trailingIcon,
461
+ variant: _variant = 'goa',
462
+ focused,
463
+ disabled,
464
+ readonly,
465
+ value,
466
+ placeholder,
467
+ error,
468
+ testId,
469
+ onTrailingIconClick,
470
+ onChange
471
+ }) => {
472
+ const ref = useRef(null);
473
+ useEffect(() => {
474
+ if (!ref.current) {
475
+ return;
2118
476
  }
2119
477
 
2120
- return /*#__PURE__*/React.createElement("div", {
2121
- className: "progress-container--".concat(displayType),
2122
- onKeyDown: function onKeyDown(event) {
2123
- event.preventDefault();
2124
- }
2125
- }, /*#__PURE__*/React.createElement("svg", {
2126
- className: "".concat(displayType === 'large' ? 'svg' : "svg--small"),
2127
- fill: "none",
2128
- viewBox: "0 0 100 100",
2129
- xmlns: "http://www.w3.org/2000/svg"
2130
- }, /*#__PURE__*/React.createElement("circle", {
2131
- className: "base-circle",
2132
- cx: "50",
2133
- cy: "50",
2134
- r: "45"
2135
- }), /*#__PURE__*/React.createElement("circle", {
2136
- className: "".concat(type === 'infinite' ? 'progress-circle--infinite' : 'progress-circle'),
2137
- cx: "50",
2138
- cy: "50",
2139
- r: "45",
2140
- style: {
2141
- strokeDashoffset: strokeDashoffset
2142
- }
2143
- })), /*#__PURE__*/React.createElement("span", {
2144
- className: "progress-message--".concat(displayType)
2145
- }, message));
2146
- } else {
2147
- document.body.style.removeProperty('height');
2148
- document.body.style.removeProperty('overflow');
2149
- return null;
2150
- }
2151
- };
2152
- GoAPageLoader.propTypes = {
2153
- visible: propTypes.bool,
2154
- message: propTypes.string,
2155
- value: propTypes.number,
2156
- type: propTypes.string,
2157
- pagelock: propTypes.bool,
2158
- displayType: propTypes.string
2159
- };
2160
-
2161
- var css_248z$h = "/* Palette */\n/* Semantic usages */\n.goa-badge-icon {\n margin-left: 4px;\n margin-right: 0px;\n position: relative;\n top: -5px;\n height: 14px;\n width: 14px;\n font-size: 14px !important; }\n\n.badge-module_goa-badge__3F6Ve {\n line-height: 24px;\n font-size: 14px;\n font-weight: 400 !important; }\n\n.badge-module_goa-badge__3F6Ve {\n display: inline-block;\n border-radius: 4px;\n padding-top: 4px;\n padding-left: 4px;\n padding-right: 4px;\n height: 20px; }\n .badge-module_goa-badge__3F6Ve * {\n margin-left: 4px;\n margin-right: 4px; }\n .badge-module_goa-badge__3F6Ve .badge-module_goa-badge-content__3UN-3 {\n position: relative;\n top: -5px;\n height: 14px;\n display: inline; }\n .badge-module_goa-badge__3F6Ve mat-icon {\n margin-left: 4px;\n margin-right: 4px;\n position: relative;\n top: -3px;\n height: 14px;\n width: 14px;\n font-size: 14px !important; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-information__2r_Eq {\n background-color: #0070c4;\n color: #fff; }\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: #0070c4;\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";
2162
- 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"};
2163
- styleInject(css_248z$h);
2164
-
2165
- var GoABadge = function GoABadge(_ref) {
2166
- var type = _ref.type,
2167
- content = _ref.content,
2168
- icon = _ref.icon;
2169
- return /*#__PURE__*/React.createElement("div", {
2170
- className: classnames(styles['goa-badge'], styles["badge-".concat(type)])
2171
- }, icon, /*#__PURE__*/React.createElement("span", {
2172
- className: classnames(styles['goa-badge-content'])
2173
- }, content));
2174
- };
2175
- GoABadge.defaultProps = {
2176
- type: 'information'
2177
- };
2178
-
2179
- var css_248z$i = "/* Palette */\n/* Semantic usages */\n/* Palette */\n/* Semantic usages */\n.svg {\n max-width: 100px; }\n\n.svg--small {\n max-width: 65px; }\n\n@-webkit-keyframes circle-animation {\n 0% {\n stroke-dashoffset: 75;\n transform: rotate(0); }\n 100% {\n stroke-dashoffset: 75;\n transform: rotate(360deg); } }\n\n@keyframes circle-animation {\n 0% {\n stroke-dashoffset: 75;\n transform: rotate(0); }\n 100% {\n stroke-dashoffset: 75;\n transform: rotate(360deg); } }\n\n.base-circle {\n display: block;\n fill: transparent;\n stroke: #c8eef9;\n stroke-width: 7px; }\n\n.progress-circle, .progress-circle--infinite {\n display: block;\n fill: transparent;\n stroke: #0070c4;\n stroke-linecap: round;\n stroke-dasharray: 283;\n stroke-dashoffset: 280;\n stroke-width: 7px;\n transform-origin: 50% 50%; }\n .progress-circle--infinite {\n -webkit-animation: circle-animation 1.2s linear infinite;\n animation: circle-animation 1.2s linear infinite; }\n\n.progress-message, .progress-message--large, .progress-message--small {\n font-style: normal;\n font-weight: normal; }\n .progress-message--large {\n margin-top: 32px;\n font-size: 24px;\n color: #000; }\n .progress-message--small {\n margin-top: 18px;\n font-size: 18px;\n color: #000; }\n\n.progress-container, .progress-container--small, .progress-container--large {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: white; }\n .progress-container--large {\n width: 100%;\n height: 100%; }\n\n@-webkit-keyframes rotate {\n 100% {\n transform: rotate(360deg); } }\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg); } }\n\n.circular-loader {\n -webkit-animation: rotate 1s linear infinite;\n animation: rotate 1s linear infinite; }\n";
2180
- styleInject(css_248z$i);
2181
-
2182
- var GoAElementLoader = function GoAElementLoader(_ref) {
2183
- var _ref$visible = _ref.visible,
2184
- visible = _ref$visible === void 0 ? false : _ref$visible,
2185
- _ref$baseColour = _ref.baseColour,
2186
- baseColour = _ref$baseColour === void 0 ? '#c8eef9' : _ref$baseColour,
2187
- _ref$spinnerColour = _ref.spinnerColour,
2188
- spinnerColour = _ref$spinnerColour === void 0 ? '#0070c4' : _ref$spinnerColour,
2189
- _ref$size = _ref.size,
2190
- size = _ref$size === void 0 ? 25 : _ref$size;
2191
- var radius = size;
2192
- var diameter = radius * 2;
2193
-
2194
- var boxView = function boxView() {
2195
- return "0 0 ".concat(diameter, " ").concat(diameter);
2196
- };
2197
- /**
2198
- * Generates the value for an SVG arc.
2199
- * @param current Current value.
2200
- * @param total Maximum value.
2201
- * @param pathRadius Radius of the SVG path.
2202
- * @param elementRadius Radius of the SVG container.
2203
- * @param isSemicircle Whether the element should be a semicircle.
2204
- */
2205
-
2206
-
2207
- function getArc(current, total, pathRadius, elementRadius) {
2208
- var isSemicircle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2209
- var value = Math.max(0, Math.min(current || 0, total));
2210
- var maxAngle = isSemicircle ? 180 : 359.9999;
2211
- var percentage = total === 0 ? maxAngle : value / total * maxAngle;
2212
-
2213
- var start = _polarToCartesian(elementRadius, pathRadius, percentage);
2214
-
2215
- var end = _polarToCartesian(elementRadius, pathRadius, 0);
2216
-
2217
- var arcSweep = percentage <= 180 ? 0 : 1;
2218
- return "M ".concat(start, " A ").concat(pathRadius, " ").concat(pathRadius, " 0 ").concat(arcSweep, " 0 ").concat(end);
2219
- }
2220
-
2221
- var DEGREE_IN_RADIANS = Math.PI / 180;
2222
- /**
2223
- * Converts polar cooradinates to Cartesian.
2224
- * @param elementRadius Radius of the wrapper element.
2225
- * @param pathRadius Radius of the path being described.
2226
- * @param angleInDegrees Degree to be converted.
2227
- */
2228
-
2229
- function _polarToCartesian(elementRadius, pathRadius, angleInDegrees) {
2230
- var angleInRadians = (angleInDegrees - 90) * DEGREE_IN_RADIANS;
2231
- var x = elementRadius + pathRadius * Math.cos(angleInRadians);
2232
- var y = elementRadius + pathRadius * Math.sin(angleInRadians);
2233
- return x + ' ' + y;
2234
- }
2235
-
2236
- return visible && /*#__PURE__*/React.createElement("svg", {
2237
- className: "circular-loader",
2238
- fill: "none",
2239
- viewBox: boxView(),
2240
- width: "".concat(size),
2241
- height: "".concat(size),
2242
- xmlns: "http://www.w3.org/2000/svg"
2243
- }, /*#__PURE__*/React.createElement("circle", {
2244
- cx: "".concat(radius),
2245
- cy: "".concat(radius),
2246
- stroke: "".concat(baseColour),
2247
- strokeWidth: "7",
2248
- r: "".concat(radius - 7 / 2)
2249
- }), /*#__PURE__*/React.createElement("path", {
2250
- d: getArc(75, 100, radius - 7 / 2, radius, false),
2251
- strokeWidth: "7",
2252
- stroke: "".concat(spinnerColour),
2253
- strokeLinecap: "round"
2254
- }));
2255
- };
2256
- GoAElementLoader.propTypes = {
2257
- visible: propTypes.bool,
2258
- baseColour: propTypes.string,
2259
- spinnerColour: propTypes.string,
2260
- size: propTypes.number
2261
- };
478
+ const current = ref.current;
2262
479
 
2263
- var css_248z$j = "/* Palette */\n/* Semantic usages */\n.goa-form {\n margin: auto;\n width: 40.25rem; }\n\n.goa-form-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: stretch;\n -moz-column-gap: 1rem;\n column-gap: 1rem; }\n\n.goa-form-container > div {\n margin: 0;\n flex: 1;\n width: 100%; }\n\n.goa-form-container > div + div {\n margin-left: 1rem; }\n\n@media (max-width: 640px) {\n .goa-form {\n margin: auto;\n width: 95%; }\n .goa-form-container > div {\n min-width: 100%; }\n .goa-form-container > div + div {\n margin-left: 0rem; } }\n\n.goa-form-items {\n margin-bottom: 0.5rem;\n margin-top: 0.5rem; }\n .goa-form-items label {\n display: block;\n font-weight: bold;\n color: #333; }\n .goa-form-items input,\n .goa-form-items textarea {\n display: block;\n width: 100%;\n padding: 0.5rem; }\n\n.goa-form-button {\n margin-top: 2rem; }\n @media (min-width: 640px) {\n .goa-form-button {\n display: flex;\n justify-content: flex-end;\n align-items: flex-end; }\n .goa-form-button button {\n min-width: 6rem; }\n .goa-form-button button + button,\n .goa-form-button button + .goa-link-button,\n .goa-form-button .goa-link-button + button,\n .goa-form-button .goa-link-button + .goa-link-button {\n margin-left: 0.5rem; } }\n .goa-form-button button {\n margin: 0; }\n";
2264
- styleInject(css_248z$j);
2265
-
2266
- var GoAFormItem = function GoAFormItem(_ref) {
2267
- var name = _ref.name,
2268
- _ref$validators = _ref.validators,
2269
- validators = _ref$validators === void 0 ? [] : _ref$validators,
2270
- _ref$onChange = _ref.onChange,
2271
- onChange = _ref$onChange === void 0 ? null : _ref$onChange,
2272
- _ref$children = _ref.children,
2273
- children = _ref$children === void 0 ? null : _ref$children;
2274
-
2275
- var _useContext = useContext(FormContext),
2276
- errors = _useContext.errors,
2277
- navigator = _useContext.navigator,
2278
- setFieldValue = _useContext.setFieldValue,
2279
- registerInput = _useContext.registerInput;
2280
-
2281
- useEffect(function () {
2282
- return registerInput({
2283
- name: name,
2284
- validators: validators
2285
- });
2286
- }, []);
480
+ const changeListener = e => {
481
+ const {
482
+ name,
483
+ value
484
+ } = e.detail;
485
+ onChange(name, value);
486
+ };
2287
487
 
2288
- var handleChange = function handleChange(val) {
2289
- if (typeof val === 'string') {
2290
- setFieldValue(name, val);
2291
- } else {
2292
- setFieldValue(name, val.target.value);
2293
- }
488
+ const clickListener = e => {
489
+ onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
490
+ };
2294
491
 
2295
- if (onChange) {
2296
- onChange(val);
492
+ current.addEventListener('_change', changeListener);
493
+ current.addEventListener('_trailingIconClick', clickListener);
494
+ return () => {
495
+ current.removeEventListener('_change', changeListener);
496
+ current.removeEventListener('_trailingIconClick', clickListener);
497
+ };
498
+ }, [ref, onChange, onTrailingIconClick]);
499
+ return jsx("goa-input", {
500
+ ref: ref,
501
+ focused: focused,
502
+ type: type,
503
+ name: name,
504
+ id: id,
505
+ leadingicon: leadingIcon,
506
+ trailingicon: trailingIcon,
507
+ variant: _variant,
508
+ disabled: disabled,
509
+ readonly: readonly,
510
+ placeholder: placeholder,
511
+ error: error,
512
+ "data-testid": testId,
513
+ value: value,
514
+ handletrailingiconclick: !!onTrailingIconClick
515
+ }, void 0);
516
+ };
517
+ const GoAInputText = props => {
518
+ return jsx(GoAInput, Object.assign({}, props, {
519
+ type: "text"
520
+ }), void 0);
521
+ };
522
+ const GoAInputPassword = props => {
523
+ return jsx(GoAInput, Object.assign({}, props, {
524
+ type: "password"
525
+ }), void 0);
526
+ };
527
+ const GoAInputDate = props => {
528
+ return jsx(GoAInput, Object.assign({}, props, {
529
+ type: "date"
530
+ }), void 0);
531
+ };
532
+ const GoAInputTime = props => {
533
+ return jsx(GoAInput, Object.assign({}, props, {
534
+ type: "time"
535
+ }), void 0);
536
+ };
537
+ const GoAInputDateTime = props => {
538
+ return jsx(GoAInput, Object.assign({}, props, {
539
+ type: "datetime-local"
540
+ }), void 0);
541
+ };
542
+ const GoAInputEmail = props => {
543
+ return jsx(GoAInput, Object.assign({}, props, {
544
+ type: "email"
545
+ }), void 0);
546
+ };
547
+ const GoAInputSearch = props => {
548
+ return jsx(GoAInput, Object.assign({}, props, {
549
+ type: "search",
550
+ trailingIcon: "search"
551
+ }), void 0);
552
+ };
553
+ const GoAInputUrl = props => {
554
+ return jsx(GoAInput, Object.assign({}, props, {
555
+ type: "url"
556
+ }), void 0);
557
+ };
558
+ const GoAInputTel = props => {
559
+ return jsx(GoAInput, Object.assign({}, props, {
560
+ type: "tel"
561
+ }), void 0);
562
+ };
563
+ const GoAInputFile = props => {
564
+ return jsx("input", {
565
+ id: props.id,
566
+ name: props.name,
567
+ type: "file",
568
+ onChange: e => props.onChange(e.target.name, e.target.value),
569
+ style: {
570
+ backgroundColor: 'revert'
571
+ }
572
+ }, void 0);
573
+ };
574
+ const GoAInputMonth = props => {
575
+ return jsx(GoAInput, Object.assign({}, props, {
576
+ type: "month"
577
+ }), void 0);
578
+ };
579
+ const GoAInputNumber = props => {
580
+ return jsx(GoAInput, Object.assign({}, props, {
581
+ type: "number"
582
+ }), void 0);
583
+ };
584
+ const GoAInputRange = _a => {
585
+ var props = __rest(_a, ["step"]);
586
+
587
+ return jsx(GoAInput, Object.assign({}, props, {
588
+ type: "range"
589
+ }), void 0);
590
+ };
591
+
592
+ const GoAMicrositeHeader = ({
593
+ level,
594
+ version,
595
+ feedbackUrl
596
+ }) => {
597
+ return jsx("goa-microsite-header", {
598
+ level: level,
599
+ version: version,
600
+ feedbackurl: feedbackUrl
601
+ }, void 0);
602
+ };
603
+
604
+ const GoAModal = ({
605
+ heading,
606
+ children,
607
+ open,
608
+ width,
609
+ actions,
610
+ onClose
611
+ }) => {
612
+ const el = useRef(null);
613
+ useEffect(() => {
614
+ if (!el.current) {
615
+ return;
2297
616
  }
2298
- };
2299
-
2300
- var message = errors[name] || [];
2301
- var navigateTo = navigator && navigator.name && navigator.name === name;
2302
-
2303
- function renderChildren() {
2304
- return Children.map(children, function (child) {
2305
- if (child.props.originalType !== 'label') {
2306
- return React.cloneElement(child, {
2307
- onChange: handleChange,
2308
- message: message.toString(),
2309
- id: name,
2310
- navigator: navigateTo
2311
- });
2312
- } else {
2313
- return child;
2314
- }
2315
- });
2316
- }
2317
-
2318
- return /*#__PURE__*/React.createElement("div", {
2319
- id: name,
2320
- className: "goa-form-items"
2321
- }, renderChildren());
2322
- };
2323
- GoAFormItem.propTypes = {
2324
- name: propTypes.string,
2325
- onChange: propTypes.func,
2326
- validators: propTypes.array
2327
- };
2328
617
 
2329
- var GoAFormButton = function GoAFormButton(_ref) {
2330
- var _ref$children = _ref.children,
2331
- children = _ref$children === void 0 ? null : _ref$children;
2332
- return /*#__PURE__*/React.createElement("div", {
2333
- className: "goa-form-button"
2334
- }, children);
2335
- };
618
+ const current = el.current;
2336
619
 
2337
- var GoAFormContainer = function GoAFormContainer(_ref) {
2338
- var _ref$children = _ref.children,
2339
- children = _ref$children === void 0 ? null : _ref$children;
2340
- return /*#__PURE__*/React.createElement("div", {
2341
- className: "goa-form-container"
2342
- }, children);
2343
- };
620
+ const listener = e => {
621
+ onClose === null || onClose === void 0 ? void 0 : onClose();
622
+ };
2344
623
 
2345
- var initState = {
2346
- data: {},
2347
- validators: {},
2348
- errors: {},
2349
- navigator: {}
2350
- };
2351
- var FormContext;
2352
-
2353
- var _FormContext = FormContext = React.createContext({}),
2354
- Provider = _FormContext.Provider;
2355
- var GoAForm = function GoAForm(_ref) {
2356
- var _ref$formTitle = _ref.formTitle,
2357
- formTitle = _ref$formTitle === void 0 ? '' : _ref$formTitle,
2358
- _ref$formDescription = _ref.formDescription,
2359
- formDescription = _ref$formDescription === void 0 ? '' : _ref$formDescription,
2360
- onFormSubmit = _ref.onFormSubmit,
2361
- _ref$children = _ref.children,
2362
- children = _ref$children === void 0 ? null : _ref$children,
2363
- props = _objectWithoutProperties(_ref, ["formTitle", "formDescription", "onFormSubmit", "children"]);
2364
-
2365
- var _useState = useState(initState),
2366
- _useState2 = _slicedToArray(_useState, 2),
2367
- formState = _useState2[0],
2368
- setFormState = _useState2[1];
2369
-
2370
- var _useState3 = useState([]),
2371
- _useState4 = _slicedToArray(_useState3, 2),
2372
- formErrors = _useState4[0],
2373
- setFormErrors = _useState4[1];
2374
-
2375
- var onSubmit = function onSubmit(e) {
2376
- e.preventDefault();
2377
-
2378
- if (validate()) {
2379
- onFormSubmit(formState.data);
624
+ current.addEventListener('_close', listener);
625
+ return () => {
626
+ current.removeEventListener('_close', listener);
627
+ };
628
+ }, [el, onClose]);
629
+ return jsxs("goa-modal", Object.assign({
630
+ ref: el,
631
+ heading: heading,
632
+ open: open,
633
+ closable: !!onClose,
634
+ scrollable: true,
635
+ width: width
636
+ }, {
637
+ children: [actions && jsx("div", Object.assign({
638
+ slot: "actions"
639
+ }, {
640
+ children: actions
641
+ }), void 0), children]
642
+ }), void 0);
643
+ };
644
+
645
+ const GoANotification = ({
646
+ type: _type = "information",
647
+ children
648
+ }) => {
649
+ return jsx("goa-notification", Object.assign({
650
+ type: _type
651
+ }, {
652
+ children: children
653
+ }), void 0);
654
+ };
655
+
656
+ const GoAPageBlock = ({
657
+ children
658
+ }) => {
659
+ return jsx("goa-page-block", {
660
+ children: children
661
+ }, void 0);
662
+ };
663
+
664
+ const GoARadioItem = ({
665
+ name,
666
+ label,
667
+ value,
668
+ disabled,
669
+ checked,
670
+ error,
671
+ testId,
672
+ children
673
+ }) => {
674
+ return jsx("goa-radio-item", Object.assign({
675
+ name: name,
676
+ label: label,
677
+ value: value,
678
+ error: error,
679
+ disabled: disabled,
680
+ checked: checked,
681
+ "data-testid": testId
682
+ }, {
683
+ children: children
684
+ }), void 0);
685
+ };
686
+
687
+ const GoARadioGroup = ({
688
+ name,
689
+ value,
690
+ children,
691
+ orientation: _orientation = 'vertical',
692
+ disabled: _disabled = false,
693
+ error: _error = false,
694
+ testId,
695
+ onChange
696
+ }) => {
697
+ const el = useRef(null);
698
+ useEffect(() => {
699
+ if (!el.current) {
700
+ return;
2380
701
  }
2381
- };
2382
-
2383
- var validate = function validate() {
2384
- var validators = formState.validators;
2385
- setFormState(function (state) {
2386
- return _objectSpread2(_objectSpread2({}, state), {}, {
2387
- errors: {}
2388
- });
2389
- });
2390
- var formErrors = Object.entries(validators).reduce(function (errors, _ref2) {
2391
- var _ref3 = _slicedToArray(_ref2, 2),
2392
- name = _ref3[0],
2393
- validators = _ref3[1];
2394
702
 
2395
- var data = formState.data;
2396
-
2397
- if (validators.length > 0) {
2398
- var messages = validators.reduce(function (result, validator) {
2399
- var value = data[name];
2400
- var err = validator(value, data);
2401
- return [].concat(_toConsumableArray(result), _toConsumableArray(err));
2402
- }, []);
2403
-
2404
- if (messages.length > 0) {
2405
- errors[name] = "".concat(messages, " ").concat(name.toLocaleLowerCase());
2406
- }
2407
-
2408
- var errorNames = [];
2409
-
2410
- for (var key in errors) {
2411
- if (errors[key].length > 0) {
2412
- errorNames.push(key);
2413
- }
2414
- }
2415
-
2416
- setFormErrors(errorNames);
703
+ const listener = e => {
704
+ if (!onChange) {
705
+ console.warn("Missing onChange function");
706
+ return;
2417
707
  }
2418
708
 
2419
- return errors;
2420
- }, {});
709
+ onChange(name, e.detail.value);
710
+ };
2421
711
 
2422
- if (Object.keys(formErrors).length === 0) {
2423
- return true;
712
+ const currentEl = el.current;
713
+ currentEl.addEventListener("_change", listener);
714
+ return () => {
715
+ currentEl.removeEventListener("_change", listener);
716
+ };
717
+ }, []);
718
+ return jsx("goa-radio-group", Object.assign({
719
+ "data-testid": testId,
720
+ ref: el,
721
+ name: name,
722
+ value: value,
723
+ orientation: _orientation,
724
+ disabled: _disabled,
725
+ error: _error
726
+ }, {
727
+ children: children
728
+ }), void 0);
729
+ };
730
+
731
+ const GoASkeleton = ({
732
+ type,
733
+ size: _size = 1
734
+ }) => {
735
+ return jsx("goa-skeleton", {
736
+ type: type,
737
+ size: _size
738
+ }, void 0);
739
+ };
740
+
741
+ const GoASpinner = ({
742
+ type,
743
+ size,
744
+ progress,
745
+ invert,
746
+ testId
747
+ }) => {
748
+ return jsx("goa-spinner", {
749
+ type: type,
750
+ size: size,
751
+ progress: progress,
752
+ invert: invert,
753
+ testid: testId
754
+ }, void 0);
755
+ };
756
+
757
+ const GoATextArea = ({
758
+ name,
759
+ value,
760
+ placeholder,
761
+ rows,
762
+ disabled,
763
+ testId,
764
+ error,
765
+ onChange
766
+ }) => {
767
+ const el = useRef(null);
768
+ useEffect(() => {
769
+ if (!el.current) {
770
+ return;
2424
771
  }
2425
772
 
2426
- setFormState(function (state) {
2427
- return _objectSpread2(_objectSpread2({}, state), {}, {
2428
- errors: formErrors
2429
- });
2430
- });
2431
- return false;
2432
- };
2433
-
2434
- var setFieldValue = function setFieldValue(name, value) {
2435
- setFormState(function (state) {
2436
- return _objectSpread2(_objectSpread2({}, state), {}, {
2437
- data: _objectSpread2(_objectSpread2({}, state.data), {}, _defineProperty({}, name, value)),
2438
- errors: _objectSpread2(_objectSpread2({}, state.errors), {}, _defineProperty({}, name, []))
2439
- });
2440
- });
2441
- };
773
+ const current = el.current;
2442
774
 
2443
- var registerInput = function registerInput(_ref4) {
2444
- var name = _ref4.name,
2445
- validators = _ref4.validators;
2446
- setFormState(function (state) {
2447
- return _objectSpread2(_objectSpread2({}, state), {}, {
2448
- validators: _objectSpread2(_objectSpread2({}, state.validators), {}, _defineProperty({}, name, validators || [])),
2449
- errors: _objectSpread2(_objectSpread2({}, state.errors), {}, _defineProperty({}, name, []))
2450
- });
2451
- });
2452
- return function () {
2453
- setFormState(function (state) {
2454
- var _state = _objectSpread2({}, state),
2455
- data = _state.data,
2456
- errors = _state.errors,
2457
- currentValidators = _state.validators,
2458
- navigator = _state.navigator;
2459
-
2460
- delete data[name];
2461
- delete errors[name];
2462
- delete currentValidators[name];
2463
- delete navigator[name];
2464
- return {
2465
- data: data,
2466
- errors: errors,
2467
- validators: currentValidators,
2468
- navigator: navigator
2469
- };
2470
- });
775
+ const listener = e => {
776
+ const {
777
+ name,
778
+ value
779
+ } = e.detail;
780
+ onChange(name, value);
2471
781
  };
2472
- };
2473
-
2474
- var formProviderValue = {
2475
- errors: formState.errors,
2476
- data: formState.data,
2477
- navigator: formState.navigator,
2478
- setFieldValue: setFieldValue,
2479
- registerInput: registerInput
2480
- };
2481
-
2482
- function addNavigator(error) {
2483
- setFormState(function (state) {
2484
- return _objectSpread2(_objectSpread2({}, state), {}, {
2485
- navigator: {
2486
- name: error
2487
- }
2488
- });
2489
- });
2490
- }
2491
-
2492
- var renderErrorList = function renderErrorList() {
2493
- return /*#__PURE__*/React.createElement(GoACallout, {
2494
- type: "emergency",
2495
- title: "Please fix following errors:"
2496
- }, /*#__PURE__*/React.createElement("ul", null, formErrors.map(function (error) {
2497
- return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("a", {
2498
- href: "#".concat(error),
2499
- onClick: function onClick() {
2500
- return addNavigator(error);
2501
- }
2502
- }, error));
2503
- })));
2504
- };
2505
782
 
2506
- return /*#__PURE__*/React.createElement(Provider, {
2507
- value: formProviderValue
2508
- }, /*#__PURE__*/React.createElement("div", {
2509
- className: "goa-form"
2510
- }, /*#__PURE__*/React.createElement("h2", null, formTitle), /*#__PURE__*/React.createElement("p", null, formDescription), onFormSubmit ? /*#__PURE__*/React.createElement("form", {
2511
- onSubmit: onSubmit
2512
- }, children, formErrors.length > 0 && renderErrorList(), /*#__PURE__*/React.createElement(GoAFormButton, null, /*#__PURE__*/React.createElement(GoAButton, {
2513
- buttonType: "tertiary",
2514
- type: "button"
2515
- }, "Cancel"), /*#__PURE__*/React.createElement(GoAButton, {
2516
- buttonType: "primary",
2517
- type: "submit"
2518
- }, "Submit"))) : children));
2519
- };
2520
- GoAForm.propTypes = {
2521
- formTitle: propTypes.string,
2522
- formDescription: propTypes.string,
2523
- onSubmit: propTypes.func,
2524
- children: propTypes.node
2525
- };
2526
-
2527
- var css_248z$k = "/* 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";
2528
- styleInject(css_248z$k);
2529
-
2530
- var GoAInput = function GoAInput(_ref) {
2531
- var _ref$validate = _ref.validate,
2532
- validate = _ref$validate === void 0 ? null : _ref$validate,
2533
- _ref$name = _ref.name,
2534
- name = _ref$name === void 0 ? '' : _ref$name,
2535
- _ref$type = _ref.type,
2536
- type = _ref$type === void 0 ? '' : _ref$type,
2537
- _ref$message = _ref.message,
2538
- message = _ref$message === void 0 ? '' : _ref$message,
2539
- _ref$required = _ref.required,
2540
- required = _ref$required === void 0 ? false : _ref$required,
2541
- _ref$helpText = _ref.helpText,
2542
- helpText = _ref$helpText === void 0 ? '' : _ref$helpText,
2543
- _ref$multiLine = _ref.multiLine,
2544
- multiLine = _ref$multiLine === void 0 ? false : _ref$multiLine,
2545
- _ref$navigator = _ref.navigator,
2546
- navigator = _ref$navigator === void 0 ? false : _ref$navigator,
2547
- onChange = _ref.onChange;
2548
-
2549
- var _useState = useState(true),
2550
- _useState2 = _slicedToArray(_useState, 2),
2551
- valid = _useState2[0],
2552
- setValid = _useState2[1];
2553
-
2554
- var _useState3 = useState(''),
2555
- _useState4 = _slicedToArray(_useState3, 2),
2556
- value = _useState4[0],
2557
- setValue = _useState4[1];
2558
-
2559
- var handleInput = function handleInput(e) {
2560
- var value = e.target.value;
2561
- setValue(value);
2562
-
2563
- if (validate) {
2564
- setValid(validate(value));
2565
- }
2566
-
2567
- onChange(value);
2568
- };
2569
-
2570
- var inputFieldClass = !message ? 'goa-input-field' : !navigator ? 'goa-input-field-error' : 'goa-input-highlight-error';
2571
- return /*#__PURE__*/React.createElement("div", null, multiLine ? /*#__PURE__*/React.createElement("textarea", {
2572
- placeholder: name,
2573
- onChange: handleInput,
2574
- className: inputFieldClass
2575
- }, value) : /*#__PURE__*/React.createElement("input", {
2576
- type: type,
2577
- required: required,
783
+ current.addEventListener('_change', listener);
784
+ return () => {
785
+ current.removeEventListener('_change', listener);
786
+ };
787
+ }, [el, onChange]);
788
+ return jsx("goa-textarea", {
789
+ ref: el,
2578
790
  name: name,
791
+ placeholder: placeholder,
2579
792
  value: value,
2580
- onChange: handleInput,
2581
- className: inputFieldClass,
2582
- placeholder: name
2583
- }), message && /*#__PURE__*/React.createElement("p", {
2584
- className: "goa-input-error-message"
2585
- }, message), helpText && /*#__PURE__*/React.createElement("p", {
2586
- className: "goa-input-help-text-message"
2587
- }, helpText));
2588
- };
2589
- GoAInput.propTypes = {
2590
- validate: propTypes.func,
2591
- name: propTypes.string,
2592
- type: propTypes.string,
2593
- message: propTypes.string,
2594
- required: propTypes.bool,
2595
- helpText: propTypes.string,
2596
- multiLine: propTypes.bool,
2597
- navigator: propTypes.bool,
2598
- onChange: propTypes.func
2599
- };
2600
-
2601
- var css_248z$l = ".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";
2602
- styleInject(css_248z$l);
2603
-
2604
- var css_248z$m = "/* 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 z-index: 1000;\n}\n\n/* Modal ============================================================================== */\n\n.modal {\n position: relative;\n background: #fff;\n transition: opacity 150ms ease-in;\n z-index: 1002;\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: 1001;\n transition: opacity 100ms ease-in;\n}\n";
2605
- styleInject(css_248z$m);
2606
-
2607
- var css_248z$n = ".icon-circular {\n padding: 0.5rem;\n top: 0.5rem;\n right: 0.5rem;\n position: absolute;\n cursor: pointer;\n height: 1.5rem;\n width: 1.5rem;\n border-radius: 999px;\n transition: background 200ms ease-in;\n}\n\n.icon-circular:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n";
2608
- styleInject(css_248z$n);
2609
-
2610
- var css_248z$o = "@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 border-radius: 4px; }\n\n.skeleton.paragraph {\n width: 100%;\n height: 70px;\n border-radius: 4px; }\n\n.skeleton.title {\n width: 50%;\n height: 20px;\n margin-bottom: 15px;\n border-radius: 4px; }\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 border-radius: 4px; }\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";
2611
- styleInject(css_248z$o);
2612
-
2613
- var GoASkeletonElement = function GoASkeletonElement(_ref) {
2614
- var _ref$type = _ref.type,
2615
- type = _ref$type === void 0 ? 'text' : _ref$type;
2616
- var classes = "skeleton ".concat(type);
2617
- return /*#__PURE__*/React.createElement("div", {
2618
- className: classes
2619
- });
2620
- };
2621
-
2622
- var GoASkeletonContent = function GoASkeletonContent(_ref) {
2623
- var _ref$rows = _ref.rows,
2624
- rows = _ref$rows === void 0 ? 1 : _ref$rows;
2625
- var elements = [];
2626
-
2627
- for (var i = 0; i < rows; i++) {
2628
- elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
2629
- type: "text"
2630
- }));
2631
- }
2632
-
2633
- return /*#__PURE__*/React.createElement("div", {
2634
- className: "skeleton-content"
2635
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(GoASkeletonElement, {
2636
- type: "title"
2637
- }), elements));
2638
- };
2639
-
2640
- var GoASkeletonGridColumnContent = function GoASkeletonGridColumnContent(_ref) {
2641
- var _ref$rows = _ref.rows,
2642
- rows = _ref$rows === void 0 ? 1 : _ref$rows;
2643
- var elements = [];
2644
-
2645
- for (var i = 0; i < rows; i++) {
2646
- elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
2647
- type: "text"
2648
- }));
2649
- }
2650
-
2651
- return /*#__PURE__*/React.createElement("div", {
2652
- className: "skeleton-content"
2653
- }, /*#__PURE__*/React.createElement("div", null, elements));
2654
- };
2655
-
2656
- var GoASkeletonImageContent = function GoASkeletonImageContent(_ref) {
2657
- var _ref$rows = _ref.rows,
2658
- rows = _ref$rows === void 0 ? 1 : _ref$rows;
2659
- var elements = [];
2660
-
2661
- for (var i = 0; i < rows; i++) {
2662
- elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
2663
- type: "text"
2664
- }));
2665
- }
2666
-
2667
- return /*#__PURE__*/React.createElement("div", {
2668
- className: "skeleton-image-content"
2669
- }, /*#__PURE__*/React.createElement(GoASkeletonElement, {
2670
- type: "thumbnail"
2671
- }), /*#__PURE__*/React.createElement("div", {
2672
- className: "skeleton-image-content__text"
2673
- }, /*#__PURE__*/React.createElement(GoASkeletonElement, {
2674
- type: "title"
2675
- }), elements));
793
+ rows: rows,
794
+ disabled: disabled,
795
+ error: error,
796
+ "data-testid": testId
797
+ }, void 0);
2676
798
  };
2677
799
 
2678
- export { GoABadge, GoAButton, GoACallout, GoACard, GoACardGroup, GoACheckbox, GoADropdown, GoAElementLoader, GoAForm, GoAFormButton, GoAFormContainer, GoAFormItem, GoAHeader, GoAHeroBanner, GoAHeroBannerContent, GoAHeroBannerLink, GoAInput, MicrositeLogo as GoAMicrositeLogo, GoANotification, GoAOption, GoAOptionGroup, GoAPageLoader, GoARadio, GoARadioGroup, GoASkeletonContent, GoASkeletonGridColumnContent, GoASkeletonImageContent };
800
+ export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoACircularProgress, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAPageBlock, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpinner, GoASuccessBadge, GoATextArea, GoAWarningBadge };