@abgov/react-components 3.4.0-beta.8 → 4.0.0-alpha.2

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 (75) hide show
  1. package/README.md +44 -97
  2. package/experimental/index.d.ts +0 -10
  3. package/experimental/package.json +1 -1
  4. package/experimental/react-components.esm.js +0 -1714
  5. package/experimental/react-components.umd.js +5 -1735
  6. package/index.d.ts +33 -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/chip/chip.d.ts +23 -0
  20. package/lib/circular-progress/circular-progress.d.ts +29 -0
  21. package/lib/container/container.d.ts +23 -0
  22. package/lib/dropdown/dropdown-option.d.ts +21 -0
  23. package/lib/dropdown/dropdown.d.ts +37 -0
  24. package/lib/flex/index.d.ts +1 -0
  25. package/lib/flex/row.d.ts +7 -0
  26. package/lib/form/form-item.d.ts +22 -0
  27. package/lib/form/index.d.ts +1 -0
  28. package/lib/form/validators.d.ts +10 -0
  29. package/lib/hero-banner/hero-banner-actions.d.ts +4 -0
  30. package/lib/hero-banner/hero-banner.d.ts +18 -0
  31. package/lib/icons/icon-button.d.ts +27 -0
  32. package/lib/icons/icon.d.ts +37 -0
  33. package/lib/icons/index.d.ts +2 -0
  34. package/lib/input/input.d.ts +73 -0
  35. package/lib/microsite-header/microsite-header.d.ts +21 -0
  36. package/lib/modal/modal.d.ts +25 -0
  37. package/lib/notification/notification.d.ts +14 -35
  38. package/lib/page-block/page-block.d.ts +9 -0
  39. package/lib/radio-group/radio-group.d.ts +21 -44
  40. package/lib/radio-group/radio.d.ts +27 -0
  41. package/lib/skeleton/skeleton.d.ts +19 -0
  42. package/lib/spinner/spinner.d.ts +26 -0
  43. package/lib/textarea/textarea.d.ts +30 -0
  44. package/package.json +5 -4
  45. package/react-components.esm.js +755 -2355
  46. package/react-components.umd.js +815 -2397
  47. package/experimental/badge/badge.component.d.ts +0 -8
  48. package/experimental/common.d.ts +0 -3
  49. package/experimental/element-loader/element-loader.d.ts +0 -18
  50. package/experimental/form/form.actions.component.d.ts +0 -3
  51. package/experimental/form/form.component.d.ts +0 -10
  52. package/experimental/form/form.item.component.d.ts +0 -7
  53. package/experimental/form/formFieldValidator.d.ts +0 -4
  54. package/experimental/icons/icons.d.ts +0 -13
  55. package/experimental/input/input.component.d.ts +0 -15
  56. package/experimental/modal/modal.component.d.ts +0 -44
  57. package/experimental/scrollable/scrollable.component.d.ts +0 -12
  58. package/experimental/skeleton/skeleton-element.d.ts +0 -8
  59. package/experimental/skeleton/skeleton-grid-column.d.ts +0 -9
  60. package/experimental/skeleton/skeleton-image-content.d.ts +0 -9
  61. package/experimental/skeleton/skeleton-titled-content.d.ts +0 -9
  62. package/lib/card/card.component.d.ts +0 -26
  63. package/lib/card-group/card.group.component.d.ts +0 -24
  64. package/lib/dropdown/dropdown.component.d.ts +0 -59
  65. package/lib/dropdown/dropdown.context.d.ts +0 -17
  66. package/lib/dropdown/option/option.component.d.ts +0 -10
  67. package/lib/dropdown/option-group/option-group.component.d.ts +0 -6
  68. package/lib/header/header.d.ts +0 -10
  69. package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -7
  70. package/lib/hero-banner/hero-banner.component.d.ts +0 -11
  71. package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -8
  72. package/lib/microsite-logo/microsite-logo.d.ts +0 -8
  73. package/lib/page-loader/page-loader.d.ts +0 -43
  74. package/lib/radio-group/radio/radio.d.ts +0 -17
  75. package/lib/radio-group/radio-group.context.d.ts +0 -6
@@ -1,1252 +1,78 @@
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 _arrayWithHoles(arr) {
94
- if (Array.isArray(arr)) return arr;
95
- }
96
-
97
- function _iterableToArrayLimit(arr, i) {
98
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
99
- var _arr = [];
100
- var _n = true;
101
- var _d = false;
102
- var _e = undefined;
103
-
104
- try {
105
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
106
- _arr.push(_s.value);
107
-
108
- if (i && _arr.length === i) break;
109
- }
110
- } catch (err) {
111
- _d = true;
112
- _e = err;
113
- } finally {
114
- try {
115
- if (!_n && _i["return"] != null) _i["return"]();
116
- } finally {
117
- if (_d) throw _e;
118
- }
119
- }
120
-
121
- return _arr;
122
- }
123
-
124
- function _unsupportedIterableToArray(o, minLen) {
125
- if (!o) return;
126
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
127
- var n = Object.prototype.toString.call(o).slice(8, -1);
128
- if (n === "Object" && o.constructor) n = o.constructor.name;
129
- if (n === "Map" || n === "Set") return Array.from(o);
130
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
131
- }
132
-
133
- function _arrayLikeToArray(arr, len) {
134
- if (len == null || len > arr.length) len = arr.length;
135
-
136
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
137
-
138
- return arr2;
139
- }
140
-
141
- function _nonIterableRest() {
142
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
143
- }
144
-
145
- function createCommonjsModule(fn, module) {
146
- return module = { exports: {} }, fn(module, module.exports), module.exports;
147
- }
148
-
149
- /** @license React v16.13.1
150
- * react-is.production.min.js
151
- *
152
- * Copyright (c) Facebook, Inc. and its affiliates.
153
- *
154
- * This source code is licensed under the MIT license found in the
155
- * LICENSE file in the root directory of this source tree.
156
- */
157
- 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?
158
- 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;
159
- 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;
160
- 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};
161
- 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};
162
- 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;
163
-
164
- var reactIs_production_min = {
165
- AsyncMode: AsyncMode,
166
- ConcurrentMode: ConcurrentMode,
167
- ContextConsumer: ContextConsumer,
168
- ContextProvider: ContextProvider,
169
- Element: Element,
170
- ForwardRef: ForwardRef,
171
- Fragment: Fragment,
172
- Lazy: Lazy,
173
- Memo: Memo,
174
- Portal: Portal,
175
- Profiler: Profiler,
176
- StrictMode: StrictMode,
177
- Suspense: Suspense,
178
- isAsyncMode: isAsyncMode,
179
- isConcurrentMode: isConcurrentMode,
180
- isContextConsumer: isContextConsumer,
181
- isContextProvider: isContextProvider,
182
- isElement: isElement,
183
- isForwardRef: isForwardRef,
184
- isFragment: isFragment,
185
- isLazy: isLazy,
186
- isMemo: isMemo,
187
- isPortal: isPortal,
188
- isProfiler: isProfiler,
189
- isStrictMode: isStrictMode,
190
- isSuspense: isSuspense,
191
- isValidElementType: isValidElementType,
192
- typeOf: typeOf
193
- };
194
-
195
- var reactIs_development = createCommonjsModule(function (module, exports) {
196
-
197
-
198
-
199
- if (process.env.NODE_ENV !== "production") {
200
- (function() {
201
-
202
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
203
- // nor polyfill, then a plain number is used for performance.
204
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
205
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
206
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
207
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
208
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
209
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
210
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
211
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
212
- // (unstable) APIs that have been removed. Can we remove the symbols?
213
-
214
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
215
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
216
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
217
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
218
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
219
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
220
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
221
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
222
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
223
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
224
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
225
-
226
- function isValidElementType(type) {
227
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
228
- 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);
229
- }
230
-
231
- function typeOf(object) {
232
- if (typeof object === 'object' && object !== null) {
233
- var $$typeof = object.$$typeof;
234
-
235
- switch ($$typeof) {
236
- case REACT_ELEMENT_TYPE:
237
- var type = object.type;
238
-
239
- switch (type) {
240
- case REACT_ASYNC_MODE_TYPE:
241
- case REACT_CONCURRENT_MODE_TYPE:
242
- case REACT_FRAGMENT_TYPE:
243
- case REACT_PROFILER_TYPE:
244
- case REACT_STRICT_MODE_TYPE:
245
- case REACT_SUSPENSE_TYPE:
246
- return type;
247
-
248
- default:
249
- var $$typeofType = type && type.$$typeof;
250
-
251
- switch ($$typeofType) {
252
- case REACT_CONTEXT_TYPE:
253
- case REACT_FORWARD_REF_TYPE:
254
- case REACT_LAZY_TYPE:
255
- case REACT_MEMO_TYPE:
256
- case REACT_PROVIDER_TYPE:
257
- return $$typeofType;
258
-
259
- default:
260
- return $$typeof;
261
- }
262
-
263
- }
264
-
265
- case REACT_PORTAL_TYPE:
266
- return $$typeof;
267
- }
268
- }
269
-
270
- return undefined;
271
- } // AsyncMode is deprecated along with isAsyncMode
272
-
273
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
274
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
275
- var ContextConsumer = REACT_CONTEXT_TYPE;
276
- var ContextProvider = REACT_PROVIDER_TYPE;
277
- var Element = REACT_ELEMENT_TYPE;
278
- var ForwardRef = REACT_FORWARD_REF_TYPE;
279
- var Fragment = REACT_FRAGMENT_TYPE;
280
- var Lazy = REACT_LAZY_TYPE;
281
- var Memo = REACT_MEMO_TYPE;
282
- var Portal = REACT_PORTAL_TYPE;
283
- var Profiler = REACT_PROFILER_TYPE;
284
- var StrictMode = REACT_STRICT_MODE_TYPE;
285
- var Suspense = REACT_SUSPENSE_TYPE;
286
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
287
-
288
- function isAsyncMode(object) {
289
- {
290
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
291
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
292
-
293
- 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.');
294
- }
295
- }
296
-
297
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
298
- }
299
- function isConcurrentMode(object) {
300
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
301
- }
302
- function isContextConsumer(object) {
303
- return typeOf(object) === REACT_CONTEXT_TYPE;
304
- }
305
- function isContextProvider(object) {
306
- return typeOf(object) === REACT_PROVIDER_TYPE;
307
- }
308
- function isElement(object) {
309
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
310
- }
311
- function isForwardRef(object) {
312
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
313
- }
314
- function isFragment(object) {
315
- return typeOf(object) === REACT_FRAGMENT_TYPE;
316
- }
317
- function isLazy(object) {
318
- return typeOf(object) === REACT_LAZY_TYPE;
319
- }
320
- function isMemo(object) {
321
- return typeOf(object) === REACT_MEMO_TYPE;
322
- }
323
- function isPortal(object) {
324
- return typeOf(object) === REACT_PORTAL_TYPE;
325
- }
326
- function isProfiler(object) {
327
- return typeOf(object) === REACT_PROFILER_TYPE;
328
- }
329
- function isStrictMode(object) {
330
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
331
- }
332
- function isSuspense(object) {
333
- return typeOf(object) === REACT_SUSPENSE_TYPE;
334
- }
335
-
336
- exports.AsyncMode = AsyncMode;
337
- exports.ConcurrentMode = ConcurrentMode;
338
- exports.ContextConsumer = ContextConsumer;
339
- exports.ContextProvider = ContextProvider;
340
- exports.Element = Element;
341
- exports.ForwardRef = ForwardRef;
342
- exports.Fragment = Fragment;
343
- exports.Lazy = Lazy;
344
- exports.Memo = Memo;
345
- exports.Portal = Portal;
346
- exports.Profiler = Profiler;
347
- exports.StrictMode = StrictMode;
348
- exports.Suspense = Suspense;
349
- exports.isAsyncMode = isAsyncMode;
350
- exports.isConcurrentMode = isConcurrentMode;
351
- exports.isContextConsumer = isContextConsumer;
352
- exports.isContextProvider = isContextProvider;
353
- exports.isElement = isElement;
354
- exports.isForwardRef = isForwardRef;
355
- exports.isFragment = isFragment;
356
- exports.isLazy = isLazy;
357
- exports.isMemo = isMemo;
358
- exports.isPortal = isPortal;
359
- exports.isProfiler = isProfiler;
360
- exports.isStrictMode = isStrictMode;
361
- exports.isSuspense = isSuspense;
362
- exports.isValidElementType = isValidElementType;
363
- exports.typeOf = typeOf;
364
- })();
365
- }
366
- });
367
- var reactIs_development_1 = reactIs_development.AsyncMode;
368
- var reactIs_development_2 = reactIs_development.ConcurrentMode;
369
- var reactIs_development_3 = reactIs_development.ContextConsumer;
370
- var reactIs_development_4 = reactIs_development.ContextProvider;
371
- var reactIs_development_5 = reactIs_development.Element;
372
- var reactIs_development_6 = reactIs_development.ForwardRef;
373
- var reactIs_development_7 = reactIs_development.Fragment;
374
- var reactIs_development_8 = reactIs_development.Lazy;
375
- var reactIs_development_9 = reactIs_development.Memo;
376
- var reactIs_development_10 = reactIs_development.Portal;
377
- var reactIs_development_11 = reactIs_development.Profiler;
378
- var reactIs_development_12 = reactIs_development.StrictMode;
379
- var reactIs_development_13 = reactIs_development.Suspense;
380
- var reactIs_development_14 = reactIs_development.isAsyncMode;
381
- var reactIs_development_15 = reactIs_development.isConcurrentMode;
382
- var reactIs_development_16 = reactIs_development.isContextConsumer;
383
- var reactIs_development_17 = reactIs_development.isContextProvider;
384
- var reactIs_development_18 = reactIs_development.isElement;
385
- var reactIs_development_19 = reactIs_development.isForwardRef;
386
- var reactIs_development_20 = reactIs_development.isFragment;
387
- var reactIs_development_21 = reactIs_development.isLazy;
388
- var reactIs_development_22 = reactIs_development.isMemo;
389
- var reactIs_development_23 = reactIs_development.isPortal;
390
- var reactIs_development_24 = reactIs_development.isProfiler;
391
- var reactIs_development_25 = reactIs_development.isStrictMode;
392
- var reactIs_development_26 = reactIs_development.isSuspense;
393
- var reactIs_development_27 = reactIs_development.isValidElementType;
394
- var reactIs_development_28 = reactIs_development.typeOf;
395
-
396
- var reactIs = createCommonjsModule(function (module) {
397
-
398
- if (process.env.NODE_ENV === 'production') {
399
- module.exports = reactIs_production_min;
400
- } else {
401
- module.exports = reactIs_development;
402
- }
403
- });
404
-
405
- /*
406
- object-assign
407
- (c) Sindre Sorhus
408
- @license MIT
409
- */
410
- /* eslint-disable no-unused-vars */
411
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
412
- var hasOwnProperty = Object.prototype.hasOwnProperty;
413
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
414
-
415
- function toObject(val) {
416
- if (val === null || val === undefined) {
417
- throw new TypeError('Object.assign cannot be called with null or undefined');
418
- }
419
-
420
- return Object(val);
421
- }
422
-
423
- function shouldUseNative() {
424
- try {
425
- if (!Object.assign) {
426
- return false;
427
- }
428
-
429
- // Detect buggy property enumeration order in older V8 versions.
430
-
431
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
432
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
433
- test1[5] = 'de';
434
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
435
- return false;
436
- }
437
-
438
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
439
- var test2 = {};
440
- for (var i = 0; i < 10; i++) {
441
- test2['_' + String.fromCharCode(i)] = i;
442
- }
443
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
444
- return test2[n];
445
- });
446
- if (order2.join('') !== '0123456789') {
447
- return false;
448
- }
449
-
450
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
451
- var test3 = {};
452
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
453
- test3[letter] = letter;
454
- });
455
- if (Object.keys(Object.assign({}, test3)).join('') !==
456
- 'abcdefghijklmnopqrst') {
457
- return false;
458
- }
459
-
460
- return true;
461
- } catch (err) {
462
- // We don't expect any of the above to throw, but better to be safe.
463
- return false;
464
- }
465
- }
466
-
467
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
468
- var from;
469
- var to = toObject(target);
470
- var symbols;
471
-
472
- for (var s = 1; s < arguments.length; s++) {
473
- from = Object(arguments[s]);
474
-
475
- for (var key in from) {
476
- if (hasOwnProperty.call(from, key)) {
477
- to[key] = from[key];
478
- }
479
- }
480
-
481
- if (getOwnPropertySymbols) {
482
- symbols = getOwnPropertySymbols(from);
483
- for (var i = 0; i < symbols.length; i++) {
484
- if (propIsEnumerable.call(from, symbols[i])) {
485
- to[symbols[i]] = from[symbols[i]];
486
- }
487
- }
488
- }
489
- }
490
-
491
- return to;
492
- };
493
-
494
- /**
495
- * Copyright (c) 2013-present, Facebook, Inc.
496
- *
497
- * This source code is licensed under the MIT license found in the
498
- * LICENSE file in the root directory of this source tree.
499
- */
500
-
501
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
502
-
503
- var ReactPropTypesSecret_1 = ReactPropTypesSecret;
504
-
505
- var printWarning = function() {};
506
-
507
- if (process.env.NODE_ENV !== 'production') {
508
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
509
- var loggedTypeFailures = {};
510
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
511
-
512
- printWarning = function(text) {
513
- var message = 'Warning: ' + text;
514
- if (typeof console !== 'undefined') {
515
- console.error(message);
516
- }
517
- try {
518
- // --- Welcome to debugging React ---
519
- // This error was thrown as a convenience so that you can use this stack
520
- // to find the callsite that caused this warning to fire.
521
- throw new Error(message);
522
- } catch (x) {}
523
- };
524
- }
525
-
526
- /**
527
- * Assert that the values match with the type specs.
528
- * Error messages are memorized and will only be shown once.
529
- *
530
- * @param {object} typeSpecs Map of name to a ReactPropType
531
- * @param {object} values Runtime values that need to be type-checked
532
- * @param {string} location e.g. "prop", "context", "child context"
533
- * @param {string} componentName Name of the component for error messages.
534
- * @param {?Function} getStack Returns the component stack.
535
- * @private
536
- */
537
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
538
- if (process.env.NODE_ENV !== 'production') {
539
- for (var typeSpecName in typeSpecs) {
540
- if (has(typeSpecs, typeSpecName)) {
541
- var error;
542
- // Prop type validation may throw. In case they do, we don't want to
543
- // fail the render phase where it didn't fail before. So we log it.
544
- // After these have been cleaned up, we'll let them throw.
545
- try {
546
- // This is intentionally an invariant that gets caught. It's the same
547
- // behavior as without this statement except with a better message.
548
- if (typeof typeSpecs[typeSpecName] !== 'function') {
549
- var err = Error(
550
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
551
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
552
- );
553
- err.name = 'Invariant Violation';
554
- throw err;
555
- }
556
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
557
- } catch (ex) {
558
- error = ex;
559
- }
560
- if (error && !(error instanceof Error)) {
561
- printWarning(
562
- (componentName || 'React class') + ': type specification of ' +
563
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
564
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
565
- 'You may have forgotten to pass an argument to the type checker ' +
566
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
567
- 'shape all require an argument).'
568
- );
569
- }
570
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
571
- // Only monitor this failure once because there tends to be a lot of the
572
- // same error.
573
- loggedTypeFailures[error.message] = true;
574
-
575
- var stack = getStack ? getStack() : '';
576
-
577
- printWarning(
578
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
579
- );
580
- }
581
- }
582
- }
583
- }
584
- }
585
-
586
- /**
587
- * Resets warning cache when testing.
588
- *
589
- * @private
590
- */
591
- checkPropTypes.resetWarningCache = function() {
592
- if (process.env.NODE_ENV !== 'production') {
593
- loggedTypeFailures = {};
594
- }
595
- };
596
-
597
- var checkPropTypes_1 = checkPropTypes;
598
-
599
- var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
600
- var printWarning$1 = function() {};
601
-
602
- if (process.env.NODE_ENV !== 'production') {
603
- printWarning$1 = function(text) {
604
- var message = 'Warning: ' + text;
605
- if (typeof console !== 'undefined') {
606
- console.error(message);
607
- }
608
- try {
609
- // --- Welcome to debugging React ---
610
- // This error was thrown as a convenience so that you can use this stack
611
- // to find the callsite that caused this warning to fire.
612
- throw new Error(message);
613
- } catch (x) {}
614
- };
615
- }
616
-
617
- function emptyFunctionThatReturnsNull() {
618
- return null;
619
- }
620
-
621
- var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
622
- /* global Symbol */
623
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
624
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
625
-
626
- /**
627
- * Returns the iterator method function contained on the iterable object.
628
- *
629
- * Be sure to invoke the function with the iterable as context:
630
- *
631
- * var iteratorFn = getIteratorFn(myIterable);
632
- * if (iteratorFn) {
633
- * var iterator = iteratorFn.call(myIterable);
634
- * ...
635
- * }
636
- *
637
- * @param {?object} maybeIterable
638
- * @return {?function}
639
- */
640
- function getIteratorFn(maybeIterable) {
641
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
642
- if (typeof iteratorFn === 'function') {
643
- return iteratorFn;
644
- }
645
- }
646
-
647
- /**
648
- * Collection of methods that allow declaration and validation of props that are
649
- * supplied to React components. Example usage:
650
- *
651
- * var Props = require('ReactPropTypes');
652
- * var MyArticle = React.createClass({
653
- * propTypes: {
654
- * // An optional string prop named "description".
655
- * description: Props.string,
656
- *
657
- * // A required enum prop named "category".
658
- * category: Props.oneOf(['News','Photos']).isRequired,
659
- *
660
- * // A prop named "dialog" that requires an instance of Dialog.
661
- * dialog: Props.instanceOf(Dialog).isRequired
662
- * },
663
- * render: function() { ... }
664
- * });
665
- *
666
- * A more formal specification of how these methods are used:
667
- *
668
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
669
- * decl := ReactPropTypes.{type}(.isRequired)?
670
- *
671
- * Each and every declaration produces a function with the same signature. This
672
- * allows the creation of custom validation functions. For example:
673
- *
674
- * var MyLink = React.createClass({
675
- * propTypes: {
676
- * // An optional string or URI prop named "href".
677
- * href: function(props, propName, componentName) {
678
- * var propValue = props[propName];
679
- * if (propValue != null && typeof propValue !== 'string' &&
680
- * !(propValue instanceof URI)) {
681
- * return new Error(
682
- * 'Expected a string or an URI for ' + propName + ' in ' +
683
- * componentName
684
- * );
685
- * }
686
- * }
687
- * },
688
- * render: function() {...}
689
- * });
690
- *
691
- * @internal
692
- */
693
-
694
- var ANONYMOUS = '<<anonymous>>';
695
-
696
- // Important!
697
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
698
- var ReactPropTypes = {
699
- array: createPrimitiveTypeChecker('array'),
700
- bool: createPrimitiveTypeChecker('boolean'),
701
- func: createPrimitiveTypeChecker('function'),
702
- number: createPrimitiveTypeChecker('number'),
703
- object: createPrimitiveTypeChecker('object'),
704
- string: createPrimitiveTypeChecker('string'),
705
- symbol: createPrimitiveTypeChecker('symbol'),
706
-
707
- any: createAnyTypeChecker(),
708
- arrayOf: createArrayOfTypeChecker,
709
- element: createElementTypeChecker(),
710
- elementType: createElementTypeTypeChecker(),
711
- instanceOf: createInstanceTypeChecker,
712
- node: createNodeChecker(),
713
- objectOf: createObjectOfTypeChecker,
714
- oneOf: createEnumTypeChecker,
715
- oneOfType: createUnionTypeChecker,
716
- shape: createShapeTypeChecker,
717
- exact: createStrictShapeTypeChecker,
718
- };
719
-
720
- /**
721
- * inlined Object.is polyfill to avoid requiring consumers ship their own
722
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
723
- */
724
- /*eslint-disable no-self-compare*/
725
- function is(x, y) {
726
- // SameValue algorithm
727
- if (x === y) {
728
- // Steps 1-5, 7-10
729
- // Steps 6.b-6.e: +0 != -0
730
- return x !== 0 || 1 / x === 1 / y;
731
- } else {
732
- // Step 6.a: NaN == NaN
733
- return x !== x && y !== y;
734
- }
735
- }
736
- /*eslint-enable no-self-compare*/
737
-
738
- /**
739
- * We use an Error-like object for backward compatibility as people may call
740
- * PropTypes directly and inspect their output. However, we don't use real
741
- * Errors anymore. We don't inspect their stack anyway, and creating them
742
- * is prohibitively expensive if they are created too often, such as what
743
- * happens in oneOfType() for any type before the one that matched.
744
- */
745
- function PropTypeError(message) {
746
- this.message = message;
747
- this.stack = '';
748
- }
749
- // Make `instanceof Error` still work for returned errors.
750
- PropTypeError.prototype = Error.prototype;
751
-
752
- function createChainableTypeChecker(validate) {
753
- if (process.env.NODE_ENV !== 'production') {
754
- var manualPropTypeCallCache = {};
755
- var manualPropTypeWarningCount = 0;
756
- }
757
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
758
- componentName = componentName || ANONYMOUS;
759
- propFullName = propFullName || propName;
760
-
761
- if (secret !== ReactPropTypesSecret_1) {
762
- if (throwOnDirectAccess) {
763
- // New behavior only for users of `prop-types` package
764
- var err = new Error(
765
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
766
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
767
- 'Read more at http://fb.me/use-check-prop-types'
768
- );
769
- err.name = 'Invariant Violation';
770
- throw err;
771
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
772
- // Old behavior for people using React.PropTypes
773
- var cacheKey = componentName + ':' + propName;
774
- if (
775
- !manualPropTypeCallCache[cacheKey] &&
776
- // Avoid spamming the console because they are often not actionable except for lib authors
777
- manualPropTypeWarningCount < 3
778
- ) {
779
- printWarning$1(
780
- 'You are manually calling a React.PropTypes validation ' +
781
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
782
- 'and will throw in the standalone `prop-types` package. ' +
783
- 'You may be seeing this warning due to a third-party PropTypes ' +
784
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
785
- );
786
- manualPropTypeCallCache[cacheKey] = true;
787
- manualPropTypeWarningCount++;
788
- }
789
- }
790
- }
791
- if (props[propName] == null) {
792
- if (isRequired) {
793
- if (props[propName] === null) {
794
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
795
- }
796
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
797
- }
798
- return null;
799
- } else {
800
- return validate(props, propName, componentName, location, propFullName);
801
- }
802
- }
803
-
804
- var chainedCheckType = checkType.bind(null, false);
805
- chainedCheckType.isRequired = checkType.bind(null, true);
806
-
807
- return chainedCheckType;
808
- }
809
-
810
- function createPrimitiveTypeChecker(expectedType) {
811
- function validate(props, propName, componentName, location, propFullName, secret) {
812
- var propValue = props[propName];
813
- var propType = getPropType(propValue);
814
- if (propType !== expectedType) {
815
- // `propValue` being instance of, say, date/regexp, pass the 'object'
816
- // check, but we can offer a more precise error message here rather than
817
- // 'of type `object`'.
818
- var preciseType = getPreciseType(propValue);
819
-
820
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
821
- }
822
- return null;
823
- }
824
- return createChainableTypeChecker(validate);
825
- }
826
-
827
- function createAnyTypeChecker() {
828
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
829
- }
830
-
831
- function createArrayOfTypeChecker(typeChecker) {
832
- function validate(props, propName, componentName, location, propFullName) {
833
- if (typeof typeChecker !== 'function') {
834
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
835
- }
836
- var propValue = props[propName];
837
- if (!Array.isArray(propValue)) {
838
- var propType = getPropType(propValue);
839
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
840
- }
841
- for (var i = 0; i < propValue.length; i++) {
842
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
843
- if (error instanceof Error) {
844
- return error;
845
- }
846
- }
847
- return null;
848
- }
849
- return createChainableTypeChecker(validate);
850
- }
851
-
852
- function createElementTypeChecker() {
853
- function validate(props, propName, componentName, location, propFullName) {
854
- var propValue = props[propName];
855
- if (!isValidElement(propValue)) {
856
- var propType = getPropType(propValue);
857
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
858
- }
859
- return null;
860
- }
861
- return createChainableTypeChecker(validate);
862
- }
863
-
864
- function createElementTypeTypeChecker() {
865
- function validate(props, propName, componentName, location, propFullName) {
866
- var propValue = props[propName];
867
- if (!reactIs.isValidElementType(propValue)) {
868
- var propType = getPropType(propValue);
869
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
870
- }
871
- return null;
872
- }
873
- return createChainableTypeChecker(validate);
874
- }
875
-
876
- function createInstanceTypeChecker(expectedClass) {
877
- function validate(props, propName, componentName, location, propFullName) {
878
- if (!(props[propName] instanceof expectedClass)) {
879
- var expectedClassName = expectedClass.name || ANONYMOUS;
880
- var actualClassName = getClassName(props[propName]);
881
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
882
- }
883
- return null;
884
- }
885
- return createChainableTypeChecker(validate);
886
- }
887
-
888
- function createEnumTypeChecker(expectedValues) {
889
- if (!Array.isArray(expectedValues)) {
890
- if (process.env.NODE_ENV !== 'production') {
891
- if (arguments.length > 1) {
892
- printWarning$1(
893
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
894
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
895
- );
896
- } else {
897
- printWarning$1('Invalid argument supplied to oneOf, expected an array.');
898
- }
899
- }
900
- return emptyFunctionThatReturnsNull;
901
- }
902
-
903
- function validate(props, propName, componentName, location, propFullName) {
904
- var propValue = props[propName];
905
- for (var i = 0; i < expectedValues.length; i++) {
906
- if (is(propValue, expectedValues[i])) {
907
- return null;
908
- }
909
- }
910
-
911
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
912
- var type = getPreciseType(value);
913
- if (type === 'symbol') {
914
- return String(value);
915
- }
916
- return value;
917
- });
918
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
919
- }
920
- return createChainableTypeChecker(validate);
921
- }
922
-
923
- function createObjectOfTypeChecker(typeChecker) {
924
- function validate(props, propName, componentName, location, propFullName) {
925
- if (typeof typeChecker !== 'function') {
926
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
927
- }
928
- var propValue = props[propName];
929
- var propType = getPropType(propValue);
930
- if (propType !== 'object') {
931
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
932
- }
933
- for (var key in propValue) {
934
- if (has$1(propValue, key)) {
935
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
936
- if (error instanceof Error) {
937
- return error;
938
- }
939
- }
940
- }
941
- return null;
942
- }
943
- return createChainableTypeChecker(validate);
944
- }
945
-
946
- function createUnionTypeChecker(arrayOfTypeCheckers) {
947
- if (!Array.isArray(arrayOfTypeCheckers)) {
948
- process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
949
- return emptyFunctionThatReturnsNull;
950
- }
951
-
952
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
953
- var checker = arrayOfTypeCheckers[i];
954
- if (typeof checker !== 'function') {
955
- printWarning$1(
956
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
957
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
958
- );
959
- return emptyFunctionThatReturnsNull;
960
- }
961
- }
962
-
963
- function validate(props, propName, componentName, location, propFullName) {
964
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
965
- var checker = arrayOfTypeCheckers[i];
966
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
967
- return null;
968
- }
969
- }
970
-
971
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
972
- }
973
- return createChainableTypeChecker(validate);
974
- }
975
-
976
- function createNodeChecker() {
977
- function validate(props, propName, componentName, location, propFullName) {
978
- if (!isNode(props[propName])) {
979
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
980
- }
981
- return null;
982
- }
983
- return createChainableTypeChecker(validate);
984
- }
985
-
986
- function createShapeTypeChecker(shapeTypes) {
987
- function validate(props, propName, componentName, location, propFullName) {
988
- var propValue = props[propName];
989
- var propType = getPropType(propValue);
990
- if (propType !== 'object') {
991
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
992
- }
993
- for (var key in shapeTypes) {
994
- var checker = shapeTypes[key];
995
- if (!checker) {
996
- continue;
997
- }
998
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
999
- if (error) {
1000
- return error;
1001
- }
1002
- }
1003
- return null;
1004
- }
1005
- return createChainableTypeChecker(validate);
1006
- }
1007
-
1008
- function createStrictShapeTypeChecker(shapeTypes) {
1009
- function validate(props, propName, componentName, location, propFullName) {
1010
- var propValue = props[propName];
1011
- var propType = getPropType(propValue);
1012
- if (propType !== 'object') {
1013
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1014
- }
1015
- // We need to check all keys in case some are required but missing from
1016
- // props.
1017
- var allKeys = objectAssign({}, props[propName], shapeTypes);
1018
- for (var key in allKeys) {
1019
- var checker = shapeTypes[key];
1020
- if (!checker) {
1021
- return new PropTypeError(
1022
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1023
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1024
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1025
- );
1026
- }
1027
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
1028
- if (error) {
1029
- return error;
1030
- }
1031
- }
1032
- return null;
1033
- }
1034
-
1035
- return createChainableTypeChecker(validate);
1036
- }
1037
-
1038
- function isNode(propValue) {
1039
- switch (typeof propValue) {
1040
- case 'number':
1041
- case 'string':
1042
- case 'undefined':
1043
- return true;
1044
- case 'boolean':
1045
- return !propValue;
1046
- case 'object':
1047
- if (Array.isArray(propValue)) {
1048
- return propValue.every(isNode);
1049
- }
1050
- if (propValue === null || isValidElement(propValue)) {
1051
- return true;
1052
- }
1053
-
1054
- var iteratorFn = getIteratorFn(propValue);
1055
- if (iteratorFn) {
1056
- var iterator = iteratorFn.call(propValue);
1057
- var step;
1058
- if (iteratorFn !== propValue.entries) {
1059
- while (!(step = iterator.next()).done) {
1060
- if (!isNode(step.value)) {
1061
- return false;
1062
- }
1063
- }
1064
- } else {
1065
- // Iterator will provide entry [k,v] tuples rather than values.
1066
- while (!(step = iterator.next()).done) {
1067
- var entry = step.value;
1068
- if (entry) {
1069
- if (!isNode(entry[1])) {
1070
- return false;
1071
- }
1072
- }
1073
- }
1074
- }
1075
- } else {
1076
- return false;
1077
- }
1078
-
1079
- return true;
1080
- default:
1081
- return false;
1082
- }
1083
- }
1084
-
1085
- function isSymbol(propType, propValue) {
1086
- // Native Symbol.
1087
- if (propType === 'symbol') {
1088
- return true;
1089
- }
1090
-
1091
- // falsy value can't be a Symbol
1092
- if (!propValue) {
1093
- return false;
1094
- }
1095
-
1096
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1097
- if (propValue['@@toStringTag'] === 'Symbol') {
1098
- return true;
1099
- }
1100
-
1101
- // Fallback for non-spec compliant Symbols which are polyfilled.
1102
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1103
- return true;
1104
- }
1105
-
1106
- return false;
1107
- }
1108
-
1109
- // Equivalent of `typeof` but with special handling for array and regexp.
1110
- function getPropType(propValue) {
1111
- var propType = typeof propValue;
1112
- if (Array.isArray(propValue)) {
1113
- return 'array';
1114
- }
1115
- if (propValue instanceof RegExp) {
1116
- // Old webkits (at least until Android 4.0) return 'function' rather than
1117
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1118
- // passes PropTypes.object.
1119
- return 'object';
1120
- }
1121
- if (isSymbol(propType, propValue)) {
1122
- return 'symbol';
1123
- }
1124
- return propType;
1125
- }
1126
-
1127
- // This handles more types than `getPropType`. Only used for error messages.
1128
- // See `createPrimitiveTypeChecker`.
1129
- function getPreciseType(propValue) {
1130
- if (typeof propValue === 'undefined' || propValue === null) {
1131
- return '' + propValue;
1132
- }
1133
- var propType = getPropType(propValue);
1134
- if (propType === 'object') {
1135
- if (propValue instanceof Date) {
1136
- return 'date';
1137
- } else if (propValue instanceof RegExp) {
1138
- return 'regexp';
1139
- }
1140
- }
1141
- return propType;
1142
- }
1143
-
1144
- // Returns a string that is postfixed to a warning about an invalid type.
1145
- // For example, "undefined" or "of type array"
1146
- function getPostfixForTypeWarning(value) {
1147
- var type = getPreciseType(value);
1148
- switch (type) {
1149
- case 'array':
1150
- case 'object':
1151
- return 'an ' + type;
1152
- case 'boolean':
1153
- case 'date':
1154
- case 'regexp':
1155
- return 'a ' + type;
1156
- default:
1157
- return type;
1158
- }
1159
- }
1160
-
1161
- // Returns class name of the object, if any.
1162
- function getClassName(propValue) {
1163
- if (!propValue.constructor || !propValue.constructor.name) {
1164
- return ANONYMOUS;
1165
- }
1166
- return propValue.constructor.name;
1167
- }
1168
-
1169
- ReactPropTypes.checkPropTypes = checkPropTypes_1;
1170
- ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
1171
- ReactPropTypes.PropTypes = ReactPropTypes;
1172
-
1173
- return ReactPropTypes;
1174
- };
1175
-
1176
- function emptyFunction() {}
1177
- function emptyFunctionWithReset() {}
1178
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1179
-
1180
- var factoryWithThrowingShims = function() {
1181
- function shim(props, propName, componentName, location, propFullName, secret) {
1182
- if (secret === ReactPropTypesSecret_1) {
1183
- // It is still safe when called from React.
1184
- return;
1185
- }
1186
- var err = new Error(
1187
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1188
- 'Use PropTypes.checkPropTypes() to call them. ' +
1189
- 'Read more at http://fb.me/use-check-prop-types'
1190
- );
1191
- err.name = 'Invariant Violation';
1192
- throw err;
1193
- } shim.isRequired = shim;
1194
- function getShim() {
1195
- return shim;
1196
- } // Important!
1197
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1198
- var ReactPropTypes = {
1199
- array: shim,
1200
- bool: shim,
1201
- func: shim,
1202
- number: shim,
1203
- object: shim,
1204
- string: shim,
1205
- symbol: shim,
1206
-
1207
- any: shim,
1208
- arrayOf: getShim,
1209
- element: shim,
1210
- elementType: shim,
1211
- instanceOf: getShim,
1212
- node: shim,
1213
- objectOf: getShim,
1214
- oneOf: getShim,
1215
- oneOfType: getShim,
1216
- shape: getShim,
1217
- exact: getShim,
1218
-
1219
- checkPropTypes: emptyFunctionWithReset,
1220
- resetWarningCache: emptyFunction
1221
- };
1222
-
1223
- ReactPropTypes.PropTypes = ReactPropTypes;
1224
-
1225
- return ReactPropTypes;
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);
1226
74
  };
1227
75
 
1228
- var propTypes = createCommonjsModule(function (module) {
1229
- /**
1230
- * Copyright (c) 2013-present, Facebook, Inc.
1231
- *
1232
- * This source code is licensed under the MIT license found in the
1233
- * LICENSE file in the root directory of this source tree.
1234
- */
1235
-
1236
- if (process.env.NODE_ENV !== 'production') {
1237
- var ReactIs = reactIs;
1238
-
1239
- // By explicitly using `prop-types` you are opting into new development behavior.
1240
- // http://fb.me/prop-types-in-prod
1241
- var throwOnDirectAccess = true;
1242
- module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
1243
- } else {
1244
- // By explicitly using `prop-types` you are opting into new production behavior.
1245
- // http://fb.me/prop-types-in-prod
1246
- module.exports = factoryWithThrowingShims();
1247
- }
1248
- });
1249
-
1250
76
  function styleInject(css, ref) {
1251
77
  if ( ref === void 0 ) ref = {};
1252
78
  var insertAt = ref.insertAt;
@@ -1274,1157 +100,731 @@ function styleInject(css, ref) {
1274
100
  }
1275
101
  }
1276
102
 
1277
- 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";
1278
- styleInject(css_248z);
1279
-
1280
- 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";
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";
1281
104
  styleInject(css_248z$1);
1282
105
 
1283
- var GoACallout = function GoACallout(_ref) {
1284
- var title = _ref.title,
1285
- _ref$type = _ref.type,
1286
- type = _ref$type === void 0 ? "information" : _ref$type,
1287
- content = _ref.content,
1288
- _ref$children = _ref.children,
1289
- children = _ref$children === void 0 ? null : _ref$children,
1290
- props = _objectWithoutProperties(_ref, ["title", "type", "content", "children"]);
1291
-
1292
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
1293
- className: "goa-callout goa--".concat(type)
1294
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
1295
- "data-testid": "callout-title"
1296
- }, title), /*#__PURE__*/React.createElement("div", {
1297
- className: "messages",
1298
- "data-testid": "callout-content"
1299
- }, content || children))));
1300
- };
1301
- GoACallout.propTypes = {
1302
- title: propTypes.string,
1303
- type: propTypes.string.isRequired,
1304
- content: propTypes.string
1305
- };
1306
-
1307
- 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";
1308
- styleInject(css_248z$2);
1309
-
1310
- 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";
1311
- styleInject(css_248z$3);
1312
-
1313
- var GoANotification = function GoANotification(_ref) {
1314
- var title = _ref.title,
1315
- _ref$type = _ref.type,
1316
- type = _ref$type === void 0 ? "information" : _ref$type,
1317
- message = _ref.message,
1318
- notificationUrl = _ref.notificationUrl,
1319
- _ref$isDismissable = _ref.isDismissable,
1320
- isDismissable = _ref$isDismissable === void 0 ? true : _ref$isDismissable,
1321
- _ref$children = _ref.children,
1322
- children = _ref$children === void 0 ? null : _ref$children,
1323
- onDismiss = _ref.onDismiss,
1324
- props = _objectWithoutProperties(_ref, ["title", "type", "message", "notificationUrl", "isDismissable", "children", "onDismiss"]);
1325
-
1326
- var _useState = useState(false),
1327
- _useState2 = _slicedToArray(_useState, 2),
1328
- dismissed = _useState2[0],
1329
- setDismissed = _useState2[1];
1330
-
1331
- var dismissTrigger = function dismissTrigger(dismissAction) {
1332
- setDismissed(dismissAction);
1333
- onDismiss();
1334
- };
1335
-
1336
- if (!dismissed) {
1337
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
1338
- className: "goa-notifications"
1339
- }, /*#__PURE__*/React.createElement("h2", {
1340
- className: "title"
1341
- }, title)), /*#__PURE__*/React.createElement("div", {
1342
- role: "notification",
1343
- className: "goa-notification goa--".concat(type)
1344
- }, /*#__PURE__*/React.createElement("div", {
1345
- className: "content"
1346
- }, notificationUrl ? /*#__PURE__*/React.createElement("a", {
1347
- className: "message",
1348
- role: "url",
1349
- href: notificationUrl
1350
- }, message || children) : /*#__PURE__*/React.createElement("span", {
1351
- className: "message"
1352
- }, message || children), isDismissable && /*#__PURE__*/React.createElement("a", {
1353
- role: "closeBox",
1354
- className: "close",
1355
- title: "Dismiss",
1356
- onClick: function onClick() {
1357
- return dismissTrigger(!dismissed);
1358
- }
1359
- }, /*#__PURE__*/React.createElement("svg", {
1360
- width: "16px",
1361
- height: "16px",
1362
- viewBox: "0 0 16 16"
1363
- }, /*#__PURE__*/React.createElement("path", {
1364
- 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"
1365
- }))))));
1366
- } else {
1367
- return null;
1368
- }
1369
- };
1370
- GoANotification.propTypes = {
1371
- title: propTypes.string,
1372
- type: propTypes.string.isRequired,
1373
- content: propTypes.string
1374
- };
1375
-
1376
- 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";
1377
- styleInject(css_248z$4);
1378
-
1379
- var GoAButton = function GoAButton(_ref) {
1380
- var _ref$buttonType = _ref.buttonType,
1381
- buttonType = _ref$buttonType === void 0 ? 'primary' : _ref$buttonType,
1382
- _ref$buttonSize = _ref.buttonSize,
1383
- buttonSize = _ref$buttonSize === void 0 ? 'normal' : _ref$buttonSize,
1384
- _ref$title = _ref.title,
1385
- title = _ref$title === void 0 ? null : _ref$title,
1386
- _ref$children = _ref.children,
1387
- children = _ref$children === void 0 ? null : _ref$children,
1388
- _ref$onClick = _ref.onClick,
1389
- onClick = _ref$onClick === void 0 ? null : _ref$onClick,
1390
- props = _objectWithoutProperties(_ref, ["buttonType", "buttonSize", "title", "children", "onClick"]);
1391
-
1392
- var btnTypeClass = buttonType === 'primary' ? '' : "goa--".concat(buttonType);
1393
- var btnSize = buttonSize === 'small' ? 'btn-small' : '';
1394
- return /*#__PURE__*/React.createElement("button", Object.assign({
1395
- className: "goa-button ".concat(btnSize, " ").concat(btnTypeClass),
1396
- title: title,
1397
- onClick: onClick
1398
- }, props), children);
1399
- };
1400
- GoAButton.propTypes = {
1401
- buttonSize: propTypes.string,
1402
- buttonType: propTypes.string,
1403
- title: propTypes.string,
1404
- children: propTypes.node,
1405
- onClick: propTypes.func
1406
- };
1407
-
1408
- 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";
1409
- styleInject(css_248z$5);
1410
-
1411
- 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";
1412
- styleInject(css_248z$6);
1413
-
1414
- /* eslint-disable-next-line */
1415
-
1416
- var MicrositeLogo = function MicrositeLogo(props) {
1417
- return /*#__PURE__*/React.createElement("a", {
1418
- href: props.serviceHome,
1419
- "aria-label": props.serviceHome,
1420
- className: "microsite-link"
1421
- }, /*#__PURE__*/React.createElement("span", {
1422
- className: "image-desktop-tablet"
1423
- }), /*#__PURE__*/React.createElement("span", {
1424
- className: "image-mobile"
1425
- }), /*#__PURE__*/React.createElement("span", {
1426
- className: "name"
1427
- }, props.serviceName));
1428
- };
1429
-
1430
- var GoAHeader = function GoAHeader(props) {
1431
- var serviceLevelCss = classnames('service-level', "service-level--".concat(props.serviceLevel.toString().toLowerCase()));
1432
-
1433
- function serviceLevelFormatted() {
1434
- return props.serviceLevel.toLowerCase();
1435
- }
1436
-
1437
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("header", {
1438
- className: "goa-header goa-official-site-header"
1439
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1440
- className: serviceLevelCss
1441
- }, serviceLevelFormatted())), props.serviceLevel === 'live' && /*#__PURE__*/React.createElement("div", {
1442
- className: "site-text"
1443
- }, "An official site of the ", /*#__PURE__*/React.createElement("a", {
1444
- href: "https://www.alberta.ca/index.aspx",
1445
- className: "web-link"
1446
- }, "Alberta Government")), props.serviceLevel !== 'live' && /*#__PURE__*/React.createElement("div", {
1447
- className: "site-text"
1448
- }, "This is a new ", /*#__PURE__*/React.createElement("a", {
1449
- href: "https://www.alberta.ca/index.aspx",
1450
- className: "web-link"
1451
- }, "Alberta Government"), " service")), /*#__PURE__*/React.createElement("div", {
1452
- className: "goa-header goa-microsite-header"
1453
- }, /*#__PURE__*/React.createElement(MicrositeLogo, {
1454
- serviceName: props.serviceName,
1455
- serviceHome: props.serviceHome
1456
- }), /*#__PURE__*/React.createElement("div", null, props.children)));
1457
- };
1458
-
1459
- 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";
1460
- styleInject(css_248z$7);
1461
-
1462
- var GoAHeroBannerContent = function GoAHeroBannerContent(_ref) {
1463
- var content = _ref.content,
1464
- children = _ref.children;
1465
- return /*#__PURE__*/React.createElement("p", {
1466
- className: "goa-hero-banner-content",
1467
- role: "note"
1468
- }, children || content);
1469
- };
1470
-
1471
- 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";
1472
- styleInject(css_248z$8);
1473
-
1474
- var GoAHeroBannerLink = function GoAHeroBannerLink(_ref) {
1475
- var linkText = _ref.linkText,
1476
- linkUrl = _ref.linkUrl;
1477
- return linkText && linkUrl ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
1478
- className: "goa-link-button right-arrow",
1479
- href: linkUrl,
1480
- role: "link"
1481
- }, linkText)) : /*#__PURE__*/React.createElement(Fragment$1, null);
1482
- };
1483
-
1484
- 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";
1485
- styleInject(css_248z$9);
1486
-
1487
- var GoAHeroBanner = function GoAHeroBanner(_ref) {
1488
- var title = _ref.title,
1489
- backgroundUrl = _ref.backgroundUrl,
1490
- content = _ref.content,
1491
- linkText = _ref.linkText,
1492
- linkUrl = _ref.linkUrl,
1493
- children = _ref.children;
1494
- return /*#__PURE__*/React.createElement("div", {
1495
- className: "goa-hero",
1496
- style: {
1497
- 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, "')")
1498
- }
1499
- }, /*#__PURE__*/React.createElement("h1", {
1500
- role: "heading",
1501
- "aria-level": 1
1502
- }, title), children || /*#__PURE__*/React.createElement(Fragment$1, null, content && /*#__PURE__*/React.createElement(GoAHeroBannerContent, {
1503
- content: content
1504
- }), linkText && linkUrl && /*#__PURE__*/React.createElement(GoAHeroBannerLink, {
1505
- linkText: linkText,
1506
- linkUrl: linkUrl
1507
- })));
1508
- };
1509
- GoAHeroBanner.defaultProps = {
1510
- content: '',
1511
- linkText: '',
1512
- linkUrl: ''
1513
- };
1514
-
1515
- 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";
1516
- styleInject(css_248z$a);
1517
-
1518
- var GoACard = function GoACard(_ref) {
1519
- var title = _ref.title,
1520
- content = _ref.content,
1521
- _ref$description = _ref.description,
1522
- description = _ref$description === void 0 ? null : _ref$description,
1523
- _ref$cardImageUrl = _ref.cardImageUrl,
1524
- cardImageUrl = _ref$cardImageUrl === void 0 ? null : _ref$cardImageUrl,
1525
- _ref$titleUrl = _ref.titleUrl,
1526
- titleUrl = _ref$titleUrl === void 0 ? null : _ref$titleUrl,
1527
- _ref$children = _ref.children,
1528
- children = _ref$children === void 0 ? null : _ref$children,
1529
- _ref$minWidth = _ref.minWidth,
1530
- minWidth = _ref$minWidth === void 0 ? 'auto' : _ref$minWidth,
1531
- _ref$maxWidth = _ref.maxWidth,
1532
- maxWidth = _ref$maxWidth === void 0 ? 'auto' : _ref$maxWidth,
1533
- other = _objectWithoutProperties(_ref, ["title", "content", "description", "cardImageUrl", "titleUrl", "children", "minWidth", "maxWidth"]);
1534
-
1535
- var _useState = useState(null),
1536
- _useState2 = _slicedToArray(_useState, 2),
1537
- imgHeight = _useState2[0],
1538
- setImgHeight = _useState2[1];
1539
-
1540
- return /*#__PURE__*/React.createElement("div", Object.assign({
1541
- className: "goa-card",
1542
- "data-testid": "card-container",
1543
- style: {
1544
- minWidth: minWidth,
1545
- maxWidth: maxWidth
1546
- }
1547
- }, other), cardImageUrl && /*#__PURE__*/React.createElement("div", {
1548
- className: "goa-poster-image",
1549
- "data-testid": "card-img"
1550
- }, /*#__PURE__*/React.createElement("img", {
1551
- height: imgHeight,
1552
- src: cardImageUrl,
1553
- alt: "Card cardImageUrl"
1554
- })), /*#__PURE__*/React.createElement("div", {
1555
- className: "card-content"
1556
- }, /*#__PURE__*/React.createElement("div", {
1557
- className: "goa-title",
1558
- "data-testid": "card-title"
1559
- }, titleUrl ? /*#__PURE__*/React.createElement("a", {
1560
- href: titleUrl,
1561
- "data-testid": "card-title-link"
1562
- }, title) : /*#__PURE__*/React.createElement("div", null, title)), /*#__PURE__*/React.createElement("p", {
1563
- className: "goa-text",
1564
- "data-testid": "card-content"
1565
- }, content !== null && content !== void 0 ? content : description), children && /*#__PURE__*/React.createElement("div", {
1566
- className: "goa-footer",
1567
- "data-testid": "card-footer"
1568
- }, children)));
1569
- };
1570
-
1571
- 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";
1572
- styleInject(css_248z$b);
1573
-
1574
- var GoARadio = function GoARadio(_ref) {
1575
- var name = _ref.name,
1576
- value = _ref.value,
1577
- disabled = _ref.disabled,
1578
- _ref$labelPosition = _ref.labelPosition,
1579
- labelPosition = _ref$labelPosition === void 0 ? 'after' : _ref$labelPosition,
1580
- required = _ref.required,
1581
- children = _ref.children;
1582
- var selectedValue = useContext(RadioContext);
1583
- var updateSelectedValue = useContext(RadioUpdateContext);
1584
-
1585
- function hasError() {
1586
- return required && !selectedValue;
1587
- }
1588
-
1589
- function getSelectedCss() {
1590
- return classnames({
1591
- 'goa-radio-container': true,
1592
- 'goa-radio-selected': isChecked()
1593
- });
1594
- }
1595
-
1596
- function getRootCssClasses() {
1597
- return classnames({
1598
- 'goa-radio': true,
1599
- 'goa-radio-disabled': disabled,
1600
- 'has-error': hasError(),
1601
- 'goa-radio-label-before': labelPosition === 'before'
1602
- });
1603
- }
1604
-
1605
- function isChecked() {
1606
- return selectedValue === value;
1607
- }
1608
-
1609
- function onRadioChange(e) {
1610
- updateSelectedValue(e.target.value);
1611
- }
1612
-
1613
- return /*#__PURE__*/React.createElement("div", {
1614
- className: getRootCssClasses()
1615
- }, /*#__PURE__*/React.createElement("div", {
1616
- className: "goa-radio-inline-block"
1617
- }, /*#__PURE__*/React.createElement("label", {
1618
- className: "goa-radio-layout"
1619
- }, /*#__PURE__*/React.createElement("div", {
1620
- className: getSelectedCss()
1621
- }, /*#__PURE__*/React.createElement("input", {
1622
- type: "radio",
1623
- name: name,
1624
- value: value,
1625
- checked: isChecked(),
1626
- disabled: disabled,
1627
- onChange: onRadioChange
1628
- }), isChecked() && /*#__PURE__*/React.createElement("svg", {
1629
- xmlns: "http://www.w3.org/2000/svg",
1630
- width: "12",
1631
- height: "12",
1632
- viewBox: "0 0 12 12"
1633
- }, /*#__PURE__*/React.createElement("circle", {
1634
- cx: "6",
1635
- cy: "6",
1636
- r: "6",
1637
- fill: "#fff"
1638
- }))), /*#__PURE__*/React.createElement("span", {
1639
- className: "goa-radio-label"
1640
- }, children))));
1641
- };
1642
-
1643
- 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";
1644
- styleInject(css_248z$c);
1645
-
1646
- var RadioContext = React.createContext('');
1647
- var RadioUpdateContext = React.createContext( // eslint-disable-next-line @typescript-eslint/no-empty-function
1648
- function () {});
1649
- var GoARadioGroup = function GoARadioGroup(_ref) {
1650
- var helperText = _ref.helperText,
1651
- onChange = _ref.onChange,
1652
- required = _ref.required,
1653
- requiredErrorMessage = _ref.requiredErrorMessage,
1654
- title = _ref.title,
1655
- value = _ref.value,
1656
- items = _ref.items,
1657
- children = _ref.children,
1658
- childAttrs = _objectWithoutProperties(_ref, ["helperText", "onChange", "required", "requiredErrorMessage", "title", "value", "items", "children"]);
1659
-
1660
- var _useState = useState(value),
1661
- _useState2 = _slicedToArray(_useState, 2),
1662
- selectedValue = _useState2[0],
1663
- setSelectedValue = _useState2[1];
1664
-
1665
- function handleOnChange(val) {
1666
- setSelectedValue(val);
1667
- onChange(val);
1668
- }
1669
-
1670
- function hasError() {
1671
- return required && !selectedValue;
1672
- }
1673
-
1674
- function getChildren() {
1675
- if (children) {
1676
- return Children.map(children, function (child) {
1677
- var key = "".concat(childAttrs.name, "-").concat(child.props.value);
1678
- return React.cloneElement(child, _objectSpread2(_objectSpread2({}, childAttrs), {}, {
1679
- key: key,
1680
- required: required
1681
- }));
1682
- });
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;
1683
119
  }
1684
120
 
1685
- return items.map(function (item) {
1686
- return /*#__PURE__*/React.createElement(GoARadio, {
1687
- key: "".concat(childAttrs.name, "-").concat(item.value),
1688
- labelPosition: childAttrs.labelPosition,
1689
- name: childAttrs.name,
1690
- disabled: childAttrs.disabled,
1691
- value: item.value,
1692
- children: item.text,
1693
- required: required
1694
- });
1695
- });
1696
- }
121
+ const current = el.current;
1697
122
 
1698
- return /*#__PURE__*/React.createElement("div", {
1699
- className: "goa-radio-group"
1700
- }, title && /*#__PURE__*/React.createElement("span", {
1701
- className: "radio-group-title"
1702
- }, title), required && /*#__PURE__*/React.createElement("span", {
1703
- className: "required-label"
1704
- }, "(Required)"), helperText && /*#__PURE__*/React.createElement("div", {
1705
- className: "helper-text"
1706
- }, helperText), /*#__PURE__*/React.createElement(RadioContext.Provider, {
1707
- value: selectedValue
1708
- }, /*#__PURE__*/React.createElement(RadioUpdateContext.Provider, {
1709
- value: handleOnChange
1710
- }, /*#__PURE__*/React.createElement("div", {
1711
- className: "goa-radios"
1712
- }, getChildren()))), hasError() && /*#__PURE__*/React.createElement("div", {
1713
- className: "error-text"
1714
- }, requiredErrorMessage));
1715
- };
123
+ const listener = e => {
124
+ onClick(e);
125
+ };
1716
126
 
1717
- 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";
1718
- styleInject(css_248z$d);
1719
-
1720
- var GoACardGroup = function GoACardGroup(_ref) {
1721
- var _ref$title = _ref.title,
1722
- title = _ref$title === void 0 ? null : _ref$title,
1723
- _ref$children = _ref.children,
1724
- children = _ref$children === void 0 ? null : _ref$children,
1725
- _ref$layout = _ref.layout,
1726
- layout = _ref$layout === void 0 ? 'basic' : _ref$layout,
1727
- _ref$cardItems = _ref.cardItems,
1728
- cardItems = _ref$cardItems === void 0 ? null : _ref$cardItems;
1729
-
1730
- function getCards() {
1731
- if (children) {
1732
- return children;
1733
- }
1734
-
1735
- return cardItems.map(function (item, index) {
1736
- return /*#__PURE__*/React.createElement(GoACard, Object.assign({}, item, {
1737
- key: index
1738
- }), item.children);
1739
- });
1740
- }
1741
-
1742
- return /*#__PURE__*/React.createElement("div", {
1743
- className: "goa-card-group"
1744
- }, /*#__PURE__*/React.createElement("div", {
1745
- className: "card-group-title"
1746
- }, title), /*#__PURE__*/React.createElement("div", {
1747
- className: "card-group-".concat(layout)
1748
- }, getCards()));
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);
1749
143
  };
1750
144
 
1751
- /** Used to store the options in the dropdown */
1752
-
1753
- // eslint-disable-next-line @typescript-eslint/naming-convention
1754
- var DropdownContext = createContext({});
1755
-
1756
- 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";
1757
- styleInject(css_248z$e);
1758
-
1759
- var GoAOption = function GoAOption(props) {
1760
- var label = props.label,
1761
- children = props.children,
1762
- selected = props.selected;
1763
-
1764
- var _useState = useState(''),
1765
- _useState2 = _slicedToArray(_useState, 2),
1766
- isActive = _useState2[0],
1767
- setActive = _useState2[1];
1768
-
1769
- var _useContext = useContext(DropdownContext),
1770
- selectionChanged = _useContext.selectionChanged;
1771
-
1772
- function onClick(e) {
1773
- e.stopPropagation(); // Flip the props, since user click it
1774
-
1775
- var selected = !props.selected;
1776
-
1777
- if (selectionChanged) {
1778
- selectionChanged(_objectSpread2(_objectSpread2({}, props), {}, {
1779
- selected: selected
1780
- }));
1781
- }
1782
- }
1783
-
1784
- function rootCss() {
1785
- return classnames({
1786
- option: true,
1787
- selected: selected,
1788
- active: isActive
1789
- });
1790
- }
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);
1791
147
 
1792
- return /*#__PURE__*/React.createElement("div", {
1793
- role: "listitem",
1794
- className: rootCss(),
1795
- onClick: onClick,
1796
- onMouseEnter: function onMouseEnter() {
1797
- setActive('active');
1798
- },
1799
- onMouseLeave: function onMouseLeave() {
1800
- setActive('');
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;
1801
188
  }
1802
- }, /*#__PURE__*/React.createElement("div", {
1803
- className: "goa-option"
1804
- }, children || label));
1805
- };
1806
- GoAOption.defaultProps = {
1807
- defaultSelected: false
1808
- };
1809
-
1810
- var GoAOptionGroup = function GoAOptionGroup(_ref) {
1811
- var label = _ref.label,
1812
- children = _ref.children;
1813
-
1814
- var _useState = useState([]),
1815
- _useState2 = _slicedToArray(_useState, 2),
1816
- itemLabels = _useState2[0],
1817
- setItemLabels = _useState2[1]; // Load the itemLabes state variable
1818
189
 
190
+ const current = el.current;
1819
191
 
1820
- useEffect(function () {
1821
- var allLabels = [];
1822
- Children.forEach(children, function (child) {
1823
- var _child$props, _child$props2;
192
+ const listener = e => {
193
+ onChange === null || onChange === void 0 ? void 0 : onChange(name, e.detail.checked, e.detail.value);
194
+ };
1824
195
 
1825
- 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) {
1826
- allLabels.push(child.props.label);
1827
- }
1828
- });
1829
- setItemLabels(allLabels);
196
+ current.addEventListener('_change', listener);
197
+ return () => {
198
+ current.removeEventListener('_change', listener);
199
+ };
1830
200
  }, []);
1831
- return /*#__PURE__*/React.createElement("div", {
1832
- className: "option-group"
1833
- }, /*#__PURE__*/React.createElement("div", {
1834
- className: "option-group-label"
1835
- }, label), children);
1836
- };
1837
-
1838
- var GoADropdown = function GoADropdown(_ref) {
1839
- var title = _ref.title,
1840
- subTitle = _ref.subTitle,
1841
- menuHeight = _ref.menuHeight,
1842
- multiple = _ref.multiple,
1843
- disabled = _ref.disabled,
1844
- description = _ref.description,
1845
- children = _ref.children,
1846
- errorMessage = _ref.errorMessage,
1847
- display = _ref.display,
1848
- selectionChanged = _ref.selectionChanged,
1849
- key = _ref.key,
1850
- open = _ref.open,
1851
- menuEditable = _ref.menuEditable,
1852
- menuInputChanged = _ref.menuInputChanged,
1853
- rest = _objectWithoutProperties(_ref, ["title", "subTitle", "menuHeight", "multiple", "disabled", "description", "children", "errorMessage", "display", "selectionChanged", "key", "open", "menuEditable", "menuInputChanged"]);
1854
-
1855
- var _useState = useState(false),
1856
- _useState2 = _slicedToArray(_useState, 2),
1857
- isOpen = _useState2[0],
1858
- setIsOpen = _useState2[1];
1859
-
1860
- var _useState3 = useState(0),
1861
- _useState4 = _slicedToArray(_useState3, 2),
1862
- maxMenuHeight = _useState4[0],
1863
- setMaxMenuHeight = _useState4[1];
1864
-
1865
- var menuRef = useRef();
1866
- var overlayRef = useRef();
1867
-
1868
- var toggleOpen = function toggleOpen() {
1869
- if (!disabled) {
1870
- setIsOpen(!isOpen);
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 GoAChip = ({
217
+ leadingIcon: _leadingIcon = "",
218
+ error: _error = false,
219
+ content,
220
+ onDeleteIconClick
221
+ }) => {
222
+ const el = useRef(null);
223
+ useEffect(() => {
224
+ if (!el.current) return;
225
+ if (!onDeleteIconClick) return;
226
+ const current = el.current;
227
+
228
+ const listener = e => {
229
+ onDeleteIconClick();
230
+ };
231
+
232
+ current.addEventListener('_onDeleteIconClick', listener);
233
+ return () => {
234
+ current.removeEventListener('_onDeleteIconClick', listener);
235
+ };
236
+ }, [el, onDeleteIconClick]);
237
+ return jsx("goa-chip", {
238
+ ref: el,
239
+ leadingicon: _leadingIcon,
240
+ error: _error,
241
+ deletable: !!onDeleteIconClick,
242
+ content: content
243
+ }, void 0);
244
+ };
245
+
246
+ const GoACircularProgress = ({
247
+ type,
248
+ visible,
249
+ message,
250
+ progress,
251
+ variant,
252
+ size
253
+ }) => {
254
+ return jsx("goa-circular-progress", {
255
+ type: type,
256
+ visible: visible ? "true" : "false",
257
+ message: message,
258
+ progress: progress,
259
+ variant: variant,
260
+ size: size
261
+ }, void 0);
262
+ };
263
+
264
+ const GoAContainer = ({
265
+ headingSize,
266
+ title,
267
+ children,
268
+ actions,
269
+ variant: _variant = 'default'
270
+ }) => {
271
+ return jsxs("goa-container", Object.assign({
272
+ variant: _variant,
273
+ headingsize: headingSize
274
+ }, {
275
+ children: [title && jsx("div", Object.assign({
276
+ slot: "title"
277
+ }, {
278
+ children: title
279
+ }), void 0), children, actions && jsx("div", Object.assign({
280
+ slot: "actions"
281
+ }, {
282
+ children: actions
283
+ }), void 0)]
284
+ }), void 0);
285
+ };
286
+
287
+ const GoADropdownOption = props => {
288
+ return jsx("goa-dropdown-item", Object.assign({
289
+ "data-testid": props.testId,
290
+ name: props.name,
291
+ value: props.value,
292
+ label: props.label
293
+ }, {
294
+ children: props.children
295
+ }), void 0);
296
+ };
297
+
298
+ const GoADropdown = props => {
299
+ const el = useRef(null);
300
+ useEffect(() => {
301
+ if (!el.current) {
302
+ return;
1871
303
  }
1872
- };
1873
304
 
1874
- var rootDropDownCss = function rootDropDownCss() {
1875
- return classnames({
1876
- 'goa-dropdown': true,
1877
- 'single-selection': !multiple,
1878
- 'has-error': errorMessage && errorMessage.length > 0
1879
- });
1880
- };
1881
-
1882
- var dropDownGroupCss = function dropDownGroupCss() {
1883
- return classnames({
1884
- 'dropdown-grouping': true,
1885
- 'disabled': disabled
1886
- });
305
+ const current = el.current;
306
+
307
+ const handler = state => {
308
+ const {
309
+ name,
310
+ value
311
+ } = state.detail;
312
+ props.onChange(name, value);
313
+ };
314
+
315
+ current.addEventListener('_change', handler);
316
+ return () => {
317
+ current.removeEventListener('_change', handler);
318
+ };
319
+ }, [el, props]);
320
+ return jsx("goa-dropdown", Object.assign({
321
+ ref: el,
322
+ name: props.name,
323
+ values: JSON.stringify(props.values),
324
+ leadingicon: props.leadingIcon,
325
+ maxheight: props.maxHeight,
326
+ placeholder: props.placeholder,
327
+ filterable: props.filterable,
328
+ disabled: props.disabled,
329
+ multiselect: props.multiselect,
330
+ error: props.error,
331
+ "data-testid": props.testId
332
+ }, {
333
+ children: props.children
334
+ }), void 0);
335
+ };
336
+
337
+ const GoAFlexRow = ({
338
+ gap,
339
+ minWidth,
340
+ children
341
+ }) => {
342
+ const style = {
343
+ gap: gap === 'small' ? '1rem' : gap === 'medium' ? '2rem' : gap === 'large' ? '3rem' : '0'
1887
344
  };
1888
345
 
1889
- useEffect(function () {
1890
- var _overlayRef$current, _menuRef$current;
1891
-
1892
- 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;
1893
- setMaxMenuHeight(height);
1894
- });
1895
-
1896
- var canOpen = function canOpen(isOpenState, isOpenProp) {
1897
- // If open property is not provide, default menu toggle will be applied
1898
- if (isOpenProp !== undefined) {
1899
- return isOpenProp;
346
+ const getChildren = () => {
347
+ if (!children) {
348
+ return null;
1900
349
  }
1901
350
 
1902
- return isOpenState;
351
+ return React.Children.map(children, child => {
352
+ return /*#__PURE__*/React.cloneElement(child, {
353
+ style: Object.assign({
354
+ flexBasis: minWidth
355
+ }, child.props.style)
356
+ });
357
+ });
1903
358
  };
1904
359
 
1905
- var canMenuEditable = function canMenuEditable(editableProp) {
1906
- if (editableProp !== undefined) {
1907
- return editableProp;
360
+ return jsx("div", Object.assign({
361
+ className: "goa-flex-row",
362
+ style: style
363
+ }, {
364
+ children: getChildren()
365
+ }), void 0);
366
+ };
367
+
368
+ const GoAFormItem = ({
369
+ children,
370
+ helpText,
371
+ error,
372
+ optional,
373
+ label
374
+ }) => {
375
+ return jsx("goa-form-item", Object.assign({
376
+ label: label,
377
+ error: error,
378
+ optional: optional,
379
+ helptext: helpText
380
+ }, {
381
+ children: children
382
+ }), void 0);
383
+ };
384
+
385
+ const GoAHeroBanner = ({
386
+ title,
387
+ backgroundUrl,
388
+ children
389
+ }) => {
390
+ return jsx("goa-hero-banner", Object.assign({
391
+ title: title,
392
+ backgroundurl: backgroundUrl
393
+ }, {
394
+ children: children
395
+ }), void 0);
396
+ };
397
+
398
+ const GoAHeroBannerActions = ({
399
+ children
400
+ }) => {
401
+ return jsx("div", Object.assign({
402
+ slot: "actions"
403
+ }, {
404
+ children: children
405
+ }), void 0);
406
+ };
407
+
408
+ function GoAIcon({
409
+ type,
410
+ theme = 'outline',
411
+ size = 'medium'
412
+ }) {
413
+ return jsx("goa-icon", {
414
+ type: type,
415
+ theme: theme,
416
+ size: size
417
+ }, void 0);
418
+ }
419
+
420
+ const GoAIconButton = ({
421
+ type,
422
+ disabled,
423
+ variant: _variant = 'primary',
424
+ onClick,
425
+ size: _size = 'medium',
426
+ title,
427
+ children
428
+ }) => {
429
+ const ref = useRef(null);
430
+ useEffect(() => {
431
+ if (!ref.current) {
432
+ return;
1908
433
  }
1909
434
 
1910
- return true;
1911
- };
1912
-
1913
- return /*#__PURE__*/React.createElement(DropdownContext.Provider, {
1914
- value: {
1915
- selectionChanged: selectionChanged
1916
- }
1917
- }, /*#__PURE__*/React.createElement("div", {
1918
- className: "dropdown-overlay",
1919
- "data-testid": "dropdown-container",
1920
- ref: overlayRef,
1921
- onClick: toggleOpen
1922
- }), /*#__PURE__*/React.createElement("div", Object.assign({
1923
- className: rootDropDownCss()
1924
- }, rest), /*#__PURE__*/React.createElement("label", {
1925
- className: "dropdown-label",
1926
- htmlFor: "input-for-".concat(title)
1927
- }, title), subTitle && /*#__PURE__*/React.createElement("span", {
1928
- className: "required-label"
1929
- }, subTitle), /*#__PURE__*/React.createElement("div", {
1930
- className: dropDownGroupCss(),
1931
- onClick: toggleOpen
1932
- }, /*#__PURE__*/React.createElement("i", {
1933
- className: "goa-select-icon"
1934
- }), /*#__PURE__*/React.createElement("input", {
1935
- role: "searchbox",
1936
- className: "dropdown-textbox margin-override",
1937
- type: "text",
1938
- "data-testid": "menu-input",
1939
- style: {
1940
- cursor: 'default'
1941
- },
1942
- id: "input-for-".concat(key),
1943
- placeholder: display ? display : description,
1944
- onChange: function onChange(e) {
1945
- menuInputChanged && menuInputChanged(e.target.value);
1946
- },
1947
- readOnly: !canMenuEditable(menuEditable)
1948
- }), canOpen(isOpen, open) && /*#__PURE__*/React.createElement("div", {
1949
- className: "dropdown-menu",
1950
- "data-testid": "dropdown-menu",
1951
- ref: menuRef,
1952
- style: {
1953
- position: 'absolute',
1954
- zIndex: 1000,
1955
- maxHeight: "".concat(maxMenuHeight, "px"),
1956
- overflow: 'auto'
1957
- }
1958
- }, children)), !description && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1959
- className: "helper-text"
1960
- }, description)), errorMessage && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1961
- className: "dropdown-label error-text"
1962
- }, errorMessage))));
1963
- };
1964
- GoADropdown.defaultProps = {
1965
- disabled: false,
1966
- description: null
1967
- };
435
+ const current = ref.current;
1968
436
 
1969
- 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";
1970
- styleInject(css_248z$f);
1971
-
1972
- var GoACheckbox = function GoACheckbox(_ref) {
1973
- var _ref$checked = _ref.checked,
1974
- checked = _ref$checked === void 0 ? false : _ref$checked,
1975
- _ref$required = _ref.required,
1976
- required = _ref$required === void 0 ? false : _ref$required,
1977
- _ref$disabled = _ref.disabled,
1978
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
1979
- _ref$indeterminate = _ref.indeterminate,
1980
- indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
1981
- _ref$labelPosition = _ref.labelPosition,
1982
- labelPosition = _ref$labelPosition === void 0 ? 'before' : _ref$labelPosition,
1983
- _ref$value = _ref.value,
1984
- value = _ref$value === void 0 ? '' : _ref$value,
1985
- content = _ref.content,
1986
- children = _ref.children,
1987
- selectionChange = _ref.selectionChange;
1988
-
1989
- var hasError = function hasError() {
1990
- return required && !checked;
1991
- };
437
+ const listener = e => {
438
+ onClick();
439
+ };
1992
440
 
1993
- var rootCss = function rootCss() {
1994
- return classnames({
1995
- 'goa-checkbox': true,
1996
- 'goa-checkbox-disabled': disabled,
1997
- 'has-error': hasError(),
1998
- 'goa-checkbox-label-before': labelPosition === 'before'
1999
- });
2000
- };
2001
-
2002
- var checkboxCss = function checkboxCss() {
2003
- return classnames({
2004
- 'goa-checkbox-container': true,
2005
- 'goa-checkbox-selected': !indeterminate && checked,
2006
- 'goa-checkbox-indeterminate': indeterminate && checked
2007
- });
2008
- };
2009
-
2010
- return /*#__PURE__*/React.createElement("div", {
2011
- className: rootCss()
2012
- }, /*#__PURE__*/React.createElement("label", {
2013
- className: "goa-checkbox-layout"
2014
- }, /*#__PURE__*/React.createElement("div", {
2015
- className: checkboxCss()
2016
- }, /*#__PURE__*/React.createElement("input", {
2017
- type: "checkbox",
2018
- checked: checked,
441
+ current.addEventListener('_click', listener);
442
+ return () => {
443
+ current.removeEventListener('_click', listener);
444
+ };
445
+ }, [ref, onClick]);
446
+ return jsx("goa-icon-button", Object.assign({
447
+ ref: ref,
448
+ type: type,
2019
449
  disabled: disabled,
2020
- required: required,
2021
- value: value,
2022
- onChange: function onChange(e) {
2023
- return selectionChange(e.target.checked);
2024
- }
2025
- }), indeterminate && checked && /*#__PURE__*/React.createElement("svg", {
2026
- id: "dashmark",
2027
- xmlns: "http://www.w3.org/2000/svg",
2028
- viewBox: "0 0 15 2",
2029
- className: "goa-indeterminate"
2030
- }, /*#__PURE__*/React.createElement("rect", {
2031
- width: "15",
2032
- height: "2"
2033
- })), !indeterminate && checked && /*#__PURE__*/React.createElement("svg", {
2034
- id: "checkmark",
2035
- xmlns: "http://www.w3.org/2000/svg",
2036
- viewBox: "0 0 16 12.18",
2037
- className: "goa-checkmark"
2038
- }, /*#__PURE__*/React.createElement("path", {
2039
- d: "M5.09,9.64,1.27,5.82,0,7.09l5.09,5.09L16,1.27,14.73,0Z"
2040
- }))), /*#__PURE__*/React.createElement("span", {
2041
- className: "goa-checkbox-label"
2042
- }, content || children)));
2043
- };
2044
-
2045
- 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";
2046
- styleInject(css_248z$g);
2047
-
2048
- var GoAPageLoader = function GoAPageLoader(_ref) {
2049
- var _ref$type = _ref.type,
2050
- type = _ref$type === void 0 ? 'infinite' : _ref$type,
2051
- _ref$visible = _ref.visible,
2052
- visible = _ref$visible === void 0 ? false : _ref$visible,
2053
- _ref$message = _ref.message,
2054
- message = _ref$message === void 0 ? 'Loading...' : _ref$message,
2055
- _ref$value = _ref.value,
2056
- value = _ref$value === void 0 ? 0 : _ref$value,
2057
- _ref$pagelock = _ref.pagelock,
2058
- pagelock = _ref$pagelock === void 0 ? true : _ref$pagelock,
2059
- _ref$displayType = _ref.displayType,
2060
- displayType = _ref$displayType === void 0 ? 'large' : _ref$displayType;
2061
-
2062
- /**
2063
- * Set defaults
2064
- */
2065
- var progressMaxValue = 283;
2066
- var strokeDashoffset = 0;
2067
- /**
2068
- * Sets the progress if in progress mode.
2069
- * @param progress
2070
- * @returns
2071
- */
2072
-
2073
- function setProgress(progress) {
2074
- if (type !== 'progress') {
450
+ variant: _variant,
451
+ size: _size,
452
+ title: title
453
+ }, {
454
+ children: children
455
+ }), void 0);
456
+ };
457
+
458
+ /*! *****************************************************************************
459
+ Copyright (c) Microsoft Corporation.
460
+
461
+ Permission to use, copy, modify, and/or distribute this software for any
462
+ purpose with or without fee is hereby granted.
463
+
464
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
465
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
466
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
467
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
468
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
469
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
470
+ PERFORMANCE OF THIS SOFTWARE.
471
+ ***************************************************************************** */
472
+
473
+ function __rest(s, e) {
474
+ var t = {};
475
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
476
+ t[p] = s[p];
477
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
478
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
479
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
480
+ t[p[i]] = s[p[i]];
481
+ }
482
+ return t;
483
+ }
484
+
485
+ const GoAInput = ({
486
+ id,
487
+ name,
488
+ type,
489
+ leadingIcon,
490
+ trailingIcon,
491
+ variant: _variant = 'goa',
492
+ focused,
493
+ disabled,
494
+ readonly,
495
+ value,
496
+ placeholder,
497
+ error,
498
+ testId,
499
+ onTrailingIconClick,
500
+ onChange
501
+ }) => {
502
+ const ref = useRef(null);
503
+ useEffect(() => {
504
+ if (!ref.current) {
2075
505
  return;
2076
506
  }
2077
507
 
2078
- if (progress === 0) {
2079
- strokeDashoffset = progressMaxValue;
508
+ const current = ref.current;
509
+
510
+ const changeListener = e => {
511
+ const {
512
+ name,
513
+ value
514
+ } = e.detail;
515
+ onChange(name, value);
516
+ };
517
+
518
+ const clickListener = e => {
519
+ onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
520
+ };
521
+
522
+ current.addEventListener('_change', changeListener);
523
+ current.addEventListener('_trailingIconClick', clickListener);
524
+ return () => {
525
+ current.removeEventListener('_change', changeListener);
526
+ current.removeEventListener('_trailingIconClick', clickListener);
527
+ };
528
+ }, [ref, onChange, onTrailingIconClick]);
529
+ return jsx("goa-input", {
530
+ ref: ref,
531
+ focused: focused,
532
+ type: type,
533
+ name: name,
534
+ id: id,
535
+ leadingicon: leadingIcon,
536
+ trailingicon: trailingIcon,
537
+ variant: _variant,
538
+ disabled: disabled,
539
+ readonly: readonly,
540
+ placeholder: placeholder,
541
+ error: error,
542
+ "data-testid": testId,
543
+ value: value,
544
+ handletrailingiconclick: !!onTrailingIconClick
545
+ }, void 0);
546
+ };
547
+ const GoAInputText = props => {
548
+ return jsx(GoAInput, Object.assign({}, props, {
549
+ type: "text"
550
+ }), void 0);
551
+ };
552
+ const GoAInputPassword = props => {
553
+ return jsx(GoAInput, Object.assign({}, props, {
554
+ type: "password"
555
+ }), void 0);
556
+ };
557
+ const GoAInputDate = props => {
558
+ return jsx(GoAInput, Object.assign({}, props, {
559
+ type: "date"
560
+ }), void 0);
561
+ };
562
+ const GoAInputTime = props => {
563
+ return jsx(GoAInput, Object.assign({}, props, {
564
+ type: "time"
565
+ }), void 0);
566
+ };
567
+ const GoAInputDateTime = props => {
568
+ return jsx(GoAInput, Object.assign({}, props, {
569
+ type: "datetime-local"
570
+ }), void 0);
571
+ };
572
+ const GoAInputEmail = props => {
573
+ return jsx(GoAInput, Object.assign({}, props, {
574
+ type: "email"
575
+ }), void 0);
576
+ };
577
+ const GoAInputSearch = props => {
578
+ return jsx(GoAInput, Object.assign({}, props, {
579
+ type: "search",
580
+ trailingIcon: "search"
581
+ }), void 0);
582
+ };
583
+ const GoAInputUrl = props => {
584
+ return jsx(GoAInput, Object.assign({}, props, {
585
+ type: "url"
586
+ }), void 0);
587
+ };
588
+ const GoAInputTel = props => {
589
+ return jsx(GoAInput, Object.assign({}, props, {
590
+ type: "tel"
591
+ }), void 0);
592
+ };
593
+ const GoAInputFile = props => {
594
+ return jsx("input", {
595
+ id: props.id,
596
+ name: props.name,
597
+ type: "file",
598
+ onChange: e => props.onChange(e.target.name, e.target.value),
599
+ style: {
600
+ backgroundColor: 'revert'
601
+ }
602
+ }, void 0);
603
+ };
604
+ const GoAInputMonth = props => {
605
+ return jsx(GoAInput, Object.assign({}, props, {
606
+ type: "month"
607
+ }), void 0);
608
+ };
609
+ const GoAInputNumber = props => {
610
+ return jsx(GoAInput, Object.assign({}, props, {
611
+ type: "number"
612
+ }), void 0);
613
+ };
614
+ const GoAInputRange = _a => {
615
+ var props = __rest(_a, ["step"]);
616
+
617
+ return jsx(GoAInput, Object.assign({}, props, {
618
+ type: "range"
619
+ }), void 0);
620
+ };
621
+
622
+ const GoAMicrositeHeader = ({
623
+ level,
624
+ version,
625
+ feedbackUrl
626
+ }) => {
627
+ return jsx("goa-microsite-header", {
628
+ level: level,
629
+ version: version,
630
+ feedbackurl: feedbackUrl
631
+ }, void 0);
632
+ };
633
+
634
+ const GoAModal = ({
635
+ heading,
636
+ children,
637
+ open,
638
+ width,
639
+ actions,
640
+ onClose
641
+ }) => {
642
+ const el = useRef(null);
643
+ useEffect(() => {
644
+ if (!el.current) {
2080
645
  return;
2081
646
  }
2082
647
 
2083
- if (progress >= 100) {
648
+ const current = el.current;
649
+
650
+ const listener = e => {
651
+ onClose === null || onClose === void 0 ? void 0 : onClose();
652
+ };
653
+
654
+ current.addEventListener('_close', listener);
655
+ return () => {
656
+ current.removeEventListener('_close', listener);
657
+ };
658
+ }, [el, onClose]);
659
+ return jsxs("goa-modal", Object.assign({
660
+ ref: el,
661
+ heading: heading,
662
+ open: open,
663
+ closable: !!onClose,
664
+ scrollable: true,
665
+ width: width
666
+ }, {
667
+ children: [actions && jsx("div", Object.assign({
668
+ slot: "actions"
669
+ }, {
670
+ children: actions
671
+ }), void 0), children]
672
+ }), void 0);
673
+ };
674
+
675
+ const GoANotification = ({
676
+ type: _type = "information",
677
+ children
678
+ }) => {
679
+ return jsx("goa-notification", Object.assign({
680
+ type: _type
681
+ }, {
682
+ children: children
683
+ }), void 0);
684
+ };
685
+
686
+ const GoAPageBlock = ({
687
+ children
688
+ }) => {
689
+ return jsx("goa-page-block", {
690
+ children: children
691
+ }, void 0);
692
+ };
693
+
694
+ const GoARadioItem = ({
695
+ name,
696
+ label,
697
+ value,
698
+ disabled,
699
+ checked,
700
+ error,
701
+ testId,
702
+ children
703
+ }) => {
704
+ return jsx("goa-radio-item", Object.assign({
705
+ name: name,
706
+ label: label,
707
+ value: value,
708
+ error: error,
709
+ disabled: disabled,
710
+ checked: checked,
711
+ "data-testid": testId
712
+ }, {
713
+ children: children
714
+ }), void 0);
715
+ };
716
+
717
+ const GoARadioGroup = ({
718
+ name,
719
+ value,
720
+ children,
721
+ orientation: _orientation = 'vertical',
722
+ disabled: _disabled = false,
723
+ error: _error = false,
724
+ testId,
725
+ onChange
726
+ }) => {
727
+ const el = useRef(null);
728
+ useEffect(() => {
729
+ if (!el.current) {
2084
730
  return;
2085
731
  }
2086
732
 
2087
- var value = progressMaxValue - Math.round(progressMaxValue * progress / 100);
2088
- strokeDashoffset = value;
2089
- }
2090
-
2091
- if (visible) {
2092
- if (pagelock && displayType !== 'small') {
2093
- document.body.style.height = '100%';
2094
- document.body.style.overflow = 'hidden';
2095
- } else {
2096
- document.body.style.removeProperty('height');
2097
- document.body.style.removeProperty('overflow');
2098
- }
2099
-
2100
- if (type === 'progress') {
2101
- setProgress(value);
2102
- }
2103
-
2104
- return /*#__PURE__*/React.createElement("div", {
2105
- className: "progress-container--".concat(displayType),
2106
- onKeyDown: function onKeyDown(event) {
2107
- event.preventDefault();
733
+ const listener = e => {
734
+ if (!onChange) {
735
+ console.warn("Missing onChange function");
736
+ return;
2108
737
  }
2109
- }, /*#__PURE__*/React.createElement("svg", {
2110
- className: "".concat(displayType === 'large' ? 'svg' : "svg--small"),
2111
- fill: "none",
2112
- viewBox: "0 0 100 100",
2113
- xmlns: "http://www.w3.org/2000/svg"
2114
- }, /*#__PURE__*/React.createElement("circle", {
2115
- className: "base-circle",
2116
- cx: "50",
2117
- cy: "50",
2118
- r: "45"
2119
- }), /*#__PURE__*/React.createElement("circle", {
2120
- className: "".concat(type === 'infinite' ? 'progress-circle--infinite' : 'progress-circle'),
2121
- cx: "50",
2122
- cy: "50",
2123
- r: "45",
2124
- style: {
2125
- strokeDashoffset: strokeDashoffset
2126
- }
2127
- })), /*#__PURE__*/React.createElement("span", {
2128
- className: "progress-message--".concat(displayType)
2129
- }, message));
2130
- } else {
2131
- document.body.style.removeProperty('height');
2132
- document.body.style.removeProperty('overflow');
2133
- return null;
2134
- }
2135
- };
2136
- GoAPageLoader.propTypes = {
2137
- visible: propTypes.bool,
2138
- message: propTypes.string,
2139
- value: propTypes.number,
2140
- type: propTypes.string,
2141
- pagelock: propTypes.bool,
2142
- displayType: propTypes.string
2143
- };
2144
-
2145
- 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";
2146
- 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"};
2147
- styleInject(css_248z$h);
2148
-
2149
- var GoABadge = function GoABadge(_ref) {
2150
- var type = _ref.type,
2151
- content = _ref.content,
2152
- icon = _ref.icon;
2153
- return /*#__PURE__*/React.createElement("div", {
2154
- className: classnames(styles['goa-badge'], styles["badge-".concat(type)])
2155
- }, icon, /*#__PURE__*/React.createElement("span", {
2156
- className: classnames(styles['goa-badge-content'])
2157
- }, content));
2158
- };
2159
- GoABadge.defaultProps = {
2160
- type: 'information'
2161
- };
2162
-
2163
- 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";
2164
- styleInject(css_248z$i);
2165
-
2166
- var GoAElementLoader = function GoAElementLoader(_ref) {
2167
- var _ref$visible = _ref.visible,
2168
- visible = _ref$visible === void 0 ? false : _ref$visible,
2169
- _ref$baseColour = _ref.baseColour,
2170
- baseColour = _ref$baseColour === void 0 ? '#c8eef9' : _ref$baseColour,
2171
- _ref$spinnerColour = _ref.spinnerColour,
2172
- spinnerColour = _ref$spinnerColour === void 0 ? '#0070c4' : _ref$spinnerColour,
2173
- _ref$size = _ref.size,
2174
- size = _ref$size === void 0 ? 25 : _ref$size;
2175
- var radius = size;
2176
- var diameter = radius * 2;
2177
-
2178
- var boxView = function boxView() {
2179
- return "0 0 ".concat(diameter, " ").concat(diameter);
2180
- };
2181
- /**
2182
- * Generates the value for an SVG arc.
2183
- * @param current Current value.
2184
- * @param total Maximum value.
2185
- * @param pathRadius Radius of the SVG path.
2186
- * @param elementRadius Radius of the SVG container.
2187
- * @param isSemicircle Whether the element should be a semicircle.
2188
- */
2189
-
2190
-
2191
- function getArc(current, total, pathRadius, elementRadius) {
2192
- var isSemicircle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2193
- var value = Math.max(0, Math.min(current || 0, total));
2194
- var maxAngle = isSemicircle ? 180 : 359.9999;
2195
- var percentage = total === 0 ? maxAngle : value / total * maxAngle;
2196
-
2197
- var start = _polarToCartesian(elementRadius, pathRadius, percentage);
2198
-
2199
- var end = _polarToCartesian(elementRadius, pathRadius, 0);
2200
738
 
2201
- var arcSweep = percentage <= 180 ? 0 : 1;
2202
- return "M ".concat(start, " A ").concat(pathRadius, " ").concat(pathRadius, " 0 ").concat(arcSweep, " 0 ").concat(end);
2203
- }
2204
-
2205
- var DEGREE_IN_RADIANS = Math.PI / 180;
2206
- /**
2207
- * Converts polar cooradinates to Cartesian.
2208
- * @param elementRadius Radius of the wrapper element.
2209
- * @param pathRadius Radius of the path being described.
2210
- * @param angleInDegrees Degree to be converted.
2211
- */
2212
-
2213
- function _polarToCartesian(elementRadius, pathRadius, angleInDegrees) {
2214
- var angleInRadians = (angleInDegrees - 90) * DEGREE_IN_RADIANS;
2215
- var x = elementRadius + pathRadius * Math.cos(angleInRadians);
2216
- var y = elementRadius + pathRadius * Math.sin(angleInRadians);
2217
- return x + ' ' + y;
2218
- }
2219
-
2220
- return visible && /*#__PURE__*/React.createElement("svg", {
2221
- className: "circular-loader",
2222
- fill: "none",
2223
- viewBox: boxView(),
2224
- width: "".concat(size),
2225
- height: "".concat(size),
2226
- xmlns: "http://www.w3.org/2000/svg"
2227
- }, /*#__PURE__*/React.createElement("circle", {
2228
- cx: "".concat(radius),
2229
- cy: "".concat(radius),
2230
- stroke: "".concat(baseColour),
2231
- strokeWidth: "7",
2232
- r: "".concat(radius - 7 / 2)
2233
- }), /*#__PURE__*/React.createElement("path", {
2234
- d: getArc(75, 100, radius - 7 / 2, radius, false),
2235
- strokeWidth: "7",
2236
- stroke: "".concat(spinnerColour),
2237
- strokeLinecap: "round"
2238
- }));
2239
- };
2240
- GoAElementLoader.propTypes = {
2241
- visible: propTypes.bool,
2242
- baseColour: propTypes.string,
2243
- spinnerColour: propTypes.string,
2244
- size: propTypes.number
2245
- };
2246
-
2247
- var css_248z$j = "/* 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";
2248
- styleInject(css_248z$j);
2249
-
2250
- var GoAInput = function GoAInput(_ref) {
2251
- var _ref$validate = _ref.validate,
2252
- validate = _ref$validate === void 0 ? null : _ref$validate,
2253
- _ref$name = _ref.name,
2254
- name = _ref$name === void 0 ? '' : _ref$name,
2255
- _ref$type = _ref.type,
2256
- type = _ref$type === void 0 ? '' : _ref$type,
2257
- _ref$message = _ref.message,
2258
- message = _ref$message === void 0 ? '' : _ref$message,
2259
- _ref$required = _ref.required,
2260
- required = _ref$required === void 0 ? false : _ref$required,
2261
- _ref$helpText = _ref.helpText,
2262
- helpText = _ref$helpText === void 0 ? '' : _ref$helpText,
2263
- _ref$multiLine = _ref.multiLine,
2264
- multiLine = _ref$multiLine === void 0 ? false : _ref$multiLine,
2265
- _ref$navigator = _ref.navigator,
2266
- navigator = _ref$navigator === void 0 ? false : _ref$navigator,
2267
- onChange = _ref.onChange;
2268
-
2269
- var _useState = useState(true),
2270
- _useState2 = _slicedToArray(_useState, 2),
2271
- valid = _useState2[0],
2272
- setValid = _useState2[1];
2273
-
2274
- var _useState3 = useState(''),
2275
- _useState4 = _slicedToArray(_useState3, 2),
2276
- value = _useState4[0],
2277
- setValue = _useState4[1];
2278
-
2279
- var handleInput = function handleInput(e) {
2280
- var value = e.target.value;
2281
- setValue(value);
2282
-
2283
- if (validate) {
2284
- setValid(validate(value));
2285
- }
2286
-
2287
- onChange(value);
2288
- };
739
+ onChange(name, e.detail.value);
740
+ };
2289
741
 
2290
- var inputFieldClass = !message ? 'goa-input-field' : !navigator ? 'goa-input-field-error' : 'goa-input-highlight-error';
2291
- return /*#__PURE__*/React.createElement("div", null, multiLine ? /*#__PURE__*/React.createElement("textarea", {
2292
- placeholder: name,
2293
- onChange: handleInput,
2294
- className: inputFieldClass
2295
- }, value) : /*#__PURE__*/React.createElement("input", {
2296
- type: type,
2297
- required: required,
742
+ const currentEl = el.current;
743
+ currentEl.addEventListener("_change", listener);
744
+ return () => {
745
+ currentEl.removeEventListener("_change", listener);
746
+ };
747
+ }, []);
748
+ return jsx("goa-radio-group", Object.assign({
749
+ "data-testid": testId,
750
+ ref: el,
2298
751
  name: name,
2299
752
  value: value,
2300
- onChange: handleInput,
2301
- className: inputFieldClass,
2302
- placeholder: name
2303
- }), message && /*#__PURE__*/React.createElement("p", {
2304
- className: "goa-input-error-message"
2305
- }, message), helpText && /*#__PURE__*/React.createElement("p", {
2306
- className: "goa-input-help-text-message"
2307
- }, helpText));
2308
- };
2309
- GoAInput.propTypes = {
2310
- validate: propTypes.func,
2311
- name: propTypes.string,
2312
- type: propTypes.string,
2313
- message: propTypes.string,
2314
- required: propTypes.bool,
2315
- helpText: propTypes.string,
2316
- multiLine: propTypes.bool,
2317
- navigator: propTypes.bool,
2318
- onChange: propTypes.func
2319
- };
2320
-
2321
- var css_248z$k = ".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";
2322
- styleInject(css_248z$k);
2323
-
2324
- var css_248z$l = "/* 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";
2325
- styleInject(css_248z$l);
2326
-
2327
- var css_248z$m = ".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";
2328
- styleInject(css_248z$m);
2329
-
2330
- var GoAFormItem = function GoAFormItem(_ref) {
2331
- var children = _ref.children,
2332
- helpText = _ref.helpText,
2333
- error = _ref.error;
2334
- var className = error ? "goa-form-item error" : "goa-form-item";
2335
- return /*#__PURE__*/React.createElement("div", {
2336
- className: className
2337
- }, children, error && /*#__PURE__*/React.createElement("div", {
2338
- className: "error-msg"
2339
- }, error), helpText && !error && /*#__PURE__*/React.createElement("div", {
2340
- id: "helpText",
2341
- className: "help-msg"
2342
- }, helpText));
2343
- };
2344
-
2345
- var GoAFormActions = function GoAFormActions(_ref) {
2346
- var children = _ref.children;
2347
- return /*#__PURE__*/React.createElement("div", {
2348
- className: "goa-form-actions"
2349
- }, children);
2350
- };
2351
-
2352
- var css_248z$n = "/* Palette */\n/* Semantic usages */\n.goa-form {\n box-sizing: border-box; }\n\n.goa-form *,\n.goa-form *:before,\n.goa-form *:after {\n box-sizing: inherit; }\n\n.goa-form-item {\n margin-bottom: 0.5rem; }\n .goa-form-item label {\n display: block;\n font-weight: bold;\n color: #333; }\n .goa-form-item input,\n .goa-form-item textarea {\n display: block;\n width: 100%;\n padding: 0.5rem;\n border-radius: 4px;\n border: 1px solid var(--color-gray-600); }\n .goa-form-item.error input,\n .goa-form-item.error textarea {\n border-color: var(--color-red-600); }\n .goa-form-item.error .error-msg {\n color: var(--color-red-600); }\n .goa-form-item .help-msg {\n font-size: var(--fs-sm);\n font-weight: 200;\n color: var(--color-gray-600); }\n\n.goa-form-actions {\n margin-top: 2rem; }\n @media (min-width: 640px) {\n .goa-form-actions {\n display: flex;\n justify-content: flex-end;\n align-items: flex-end; }\n .goa-form-actions button {\n min-width: 6rem; }\n .goa-form-actions button + button,\n .goa-form-actions button + .goa-link-button,\n .goa-form-actions .goa-link-button + button,\n .goa-form-actions .goa-link-button + .goa-link-button {\n margin-left: 0.5rem; } }\n .goa-form-actions button {\n margin: 0; }\n";
2353
- styleInject(css_248z$n);
2354
-
2355
- var GoAForm = function GoAForm(_ref) {
2356
- var children = _ref.children;
2357
- return /*#__PURE__*/React.createElement("div", {
2358
- className: "goa-form"
2359
- }, children);
2360
- };
2361
-
2362
- 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";
2363
- styleInject(css_248z$o);
2364
-
2365
- var GoASkeletonElement = function GoASkeletonElement(_ref) {
2366
- var _ref$type = _ref.type,
2367
- type = _ref$type === void 0 ? 'text' : _ref$type;
2368
- var classes = "skeleton ".concat(type);
2369
- return /*#__PURE__*/React.createElement("div", {
2370
- className: classes
2371
- });
2372
- };
2373
-
2374
- var GoASkeletonContent = function GoASkeletonContent(_ref) {
2375
- var _ref$rows = _ref.rows,
2376
- rows = _ref$rows === void 0 ? 1 : _ref$rows;
2377
- var elements = [];
2378
-
2379
- for (var i = 0; i < rows; i++) {
2380
- elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
2381
- type: "text"
2382
- }));
2383
- }
2384
-
2385
- return /*#__PURE__*/React.createElement("div", {
2386
- className: "skeleton-content"
2387
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(GoASkeletonElement, {
2388
- type: "title"
2389
- }), elements));
2390
- };
2391
-
2392
- var GoASkeletonGridColumnContent = function GoASkeletonGridColumnContent(_ref) {
2393
- var _ref$rows = _ref.rows,
2394
- rows = _ref$rows === void 0 ? 1 : _ref$rows;
2395
- var elements = [];
2396
-
2397
- for (var i = 0; i < rows; i++) {
2398
- elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
2399
- type: "text"
2400
- }));
2401
- }
2402
-
2403
- return /*#__PURE__*/React.createElement("div", {
2404
- className: "skeleton-content"
2405
- }, /*#__PURE__*/React.createElement("div", null, elements));
2406
- };
753
+ orientation: _orientation,
754
+ disabled: _disabled,
755
+ error: _error
756
+ }, {
757
+ children: children
758
+ }), void 0);
759
+ };
760
+
761
+ const GoASkeleton = ({
762
+ type,
763
+ size: _size = 1
764
+ }) => {
765
+ return jsx("goa-skeleton", {
766
+ type: type,
767
+ size: _size
768
+ }, void 0);
769
+ };
770
+
771
+ const GoASpinner = ({
772
+ type,
773
+ size,
774
+ progress,
775
+ invert,
776
+ testId
777
+ }) => {
778
+ return jsx("goa-spinner", {
779
+ type: type,
780
+ size: size,
781
+ progress: progress,
782
+ invert: invert,
783
+ testid: testId
784
+ }, void 0);
785
+ };
786
+
787
+ const GoATextArea = ({
788
+ name,
789
+ value,
790
+ placeholder,
791
+ rows,
792
+ disabled,
793
+ testId,
794
+ error,
795
+ onChange
796
+ }) => {
797
+ const el = useRef(null);
798
+ useEffect(() => {
799
+ if (!el.current) {
800
+ return;
801
+ }
2407
802
 
2408
- var GoASkeletonImageContent = function GoASkeletonImageContent(_ref) {
2409
- var _ref$rows = _ref.rows,
2410
- rows = _ref$rows === void 0 ? 1 : _ref$rows;
2411
- var elements = [];
803
+ const current = el.current;
2412
804
 
2413
- for (var i = 0; i < rows; i++) {
2414
- elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
2415
- type: "text"
2416
- }));
2417
- }
805
+ const listener = e => {
806
+ const {
807
+ name,
808
+ value
809
+ } = e.detail;
810
+ onChange(name, value);
811
+ };
2418
812
 
2419
- return /*#__PURE__*/React.createElement("div", {
2420
- className: "skeleton-image-content"
2421
- }, /*#__PURE__*/React.createElement(GoASkeletonElement, {
2422
- type: "thumbnail"
2423
- }), /*#__PURE__*/React.createElement("div", {
2424
- className: "skeleton-image-content__text"
2425
- }, /*#__PURE__*/React.createElement(GoASkeletonElement, {
2426
- type: "title"
2427
- }), elements));
813
+ current.addEventListener('_change', listener);
814
+ return () => {
815
+ current.removeEventListener('_change', listener);
816
+ };
817
+ }, [el, onChange]);
818
+ return jsx("goa-textarea", {
819
+ ref: el,
820
+ name: name,
821
+ placeholder: placeholder,
822
+ value: value,
823
+ rows: rows,
824
+ disabled: disabled,
825
+ error: error,
826
+ "data-testid": testId
827
+ }, void 0);
2428
828
  };
2429
829
 
2430
- export { GoABadge, GoAButton, GoACallout, GoACard, GoACardGroup, GoACheckbox, GoADropdown, GoAElementLoader, GoAForm, GoAFormActions, GoAFormItem, GoAHeader, GoAHeroBanner, GoAHeroBannerContent, GoAHeroBannerLink, GoAInput, MicrositeLogo as GoAMicrositeLogo, GoANotification, GoAOption, GoAOptionGroup, GoAPageLoader, GoARadio, GoARadioGroup, GoASkeletonContent, GoASkeletonGridColumnContent, GoASkeletonImageContent };
830
+ export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, 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 };