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