@abgov/react-components 3.4.0-beta.63 → 3.4.0-beta.64
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/{experimental/app-version-header → app-version-header}/app-version-header.component.d.ts +0 -0
- package/experimental/{experimental/badge → badge}/badge.component.d.ts +0 -0
- package/experimental/{experimental/button → button}/button.d.ts +0 -0
- package/experimental/{experimental/card → card}/card.component.d.ts +0 -0
- package/{lib/_common/input.d.ts → experimental/common.d.ts} +3 -0
- package/experimental/{experimental/flex → flex}/index.d.ts +0 -0
- package/experimental/{experimental/flex → flex}/row.d.ts +0 -0
- package/experimental/{experimental/form → form}/form.actions.component.d.ts +0 -0
- package/experimental/{experimental/form → form}/form.component.d.ts +0 -0
- package/experimental/{experimental/form → form}/form.item.component.d.ts +0 -0
- package/experimental/{experimental/form → form}/index.d.ts +0 -0
- package/experimental/{experimental/form → form}/validators.d.ts +0 -0
- package/experimental/{experimental/icons → icons}/icon.component.d.ts +14 -1
- package/experimental/{experimental/icons → icons}/iconButton.component.d.ts +0 -0
- package/experimental/{experimental/icons → icons}/index.d.ts +0 -0
- package/experimental/{experimental/index.d.ts → index.d.ts} +0 -0
- package/experimental/{experimental/input → input}/input.component.d.ts +1 -1
- package/experimental/{experimental/modal → modal}/modal.component.d.ts +0 -0
- package/experimental/package.json +1 -1
- package/experimental/react-components.esm.js +552 -614
- package/experimental/react-components.umd.js +879 -910
- package/experimental/{experimental/scrollable → scrollable}/scrollable.component.d.ts +0 -0
- package/experimental/{experimental/textarea → textarea}/textarea.component.d.ts +1 -1
- package/experimental/{experimental/transitions → transitions}/index.d.ts +0 -0
- package/experimental/{experimental/transitions → transitions}/transition.d.ts +0 -0
- package/experimental/{experimental/transitions → transitions}/transitionSequence.d.ts +0 -0
- package/package.json +4 -3
- package/react-components.esm.js +934 -992
- package/react-components.umd.js +946 -936
- package/experimental/experimental/common.d.ts +0 -3
|
@@ -1,972 +1,941 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}(this, (function (exports,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('classnames'), require('react')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'classnames', 'react'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactComponents = {}, global.jsxRuntime, global.classnames, global.React));
|
|
5
|
+
})(this, (function (exports, jsxRuntime, classnames, React) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
|
|
12
|
+
/*! *****************************************************************************
|
|
13
|
+
Copyright (c) Microsoft Corporation.
|
|
14
|
+
|
|
15
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
16
|
+
purpose with or without fee is hereby granted.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
19
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
20
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
21
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
22
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
23
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
24
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
25
|
+
***************************************************************************** */
|
|
26
|
+
|
|
27
|
+
var __assign = function() {
|
|
28
|
+
__assign = Object.assign || function __assign(t) {
|
|
29
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
30
|
+
s = arguments[i];
|
|
31
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
32
|
+
}
|
|
33
|
+
return t;
|
|
34
|
+
};
|
|
35
|
+
return __assign.apply(this, arguments);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function __rest(s, e) {
|
|
39
|
+
var t = {};
|
|
40
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
41
|
+
t[p] = s[p];
|
|
42
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
43
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
44
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
45
|
+
t[p[i]] = s[p[i]];
|
|
46
|
+
}
|
|
47
|
+
return t;
|
|
48
|
+
}
|
|
9
49
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
50
|
+
function styleInject(css, ref) {
|
|
51
|
+
if ( ref === void 0 ) ref = {};
|
|
52
|
+
var insertAt = ref.insertAt;
|
|
13
53
|
|
|
14
|
-
|
|
54
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
15
55
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
56
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
57
|
+
var style = document.createElement('style');
|
|
58
|
+
style.type = 'text/css';
|
|
19
59
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
60
|
+
if (insertAt === 'top') {
|
|
61
|
+
if (head.firstChild) {
|
|
62
|
+
head.insertBefore(style, head.firstChild);
|
|
63
|
+
} else {
|
|
64
|
+
head.appendChild(style);
|
|
65
|
+
}
|
|
23
66
|
} else {
|
|
24
67
|
head.appendChild(style);
|
|
25
68
|
}
|
|
26
|
-
} else {
|
|
27
|
-
head.appendChild(style);
|
|
28
|
-
}
|
|
29
69
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var css_248z = ":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";
|
|
38
|
-
var styles = {"goa-badge":"badge-module_goa-badge__3F6Ve","goa-badge-content":"badge-module_goa-badge-content__3UN-3","badge-information":"badge-module_badge-information__2r_Eq","badge-success":"badge-module_badge-success__18wcm","badge-warning":"badge-module_badge-warning__20BNM","badge-emergency":"badge-module_badge-emergency__E4mHn","badge-dark":"badge-module_badge-dark__1thw-","badge-midtone":"badge-module_badge-midtone__1Gt4T","badge-light":"badge-module_badge-light__B8ZMt","badge-inactive":"badge-module_badge-inactive__35PEw"};
|
|
39
|
-
styleInject(css_248z);
|
|
40
|
-
|
|
41
|
-
var css_248z$1 = ".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";
|
|
42
|
-
styleInject(css_248z$1);
|
|
43
|
-
|
|
44
|
-
function GoAIcon(_ref) {
|
|
45
|
-
var type = _ref.type,
|
|
46
|
-
_ref$style = _ref.style,
|
|
47
|
-
style = _ref$style === void 0 ? 'outline' : _ref$style,
|
|
48
|
-
_ref$size = _ref.size,
|
|
49
|
-
size = _ref$size === void 0 ? 'medium' : _ref$size;
|
|
50
|
-
|
|
51
|
-
var _size = getSize(size);
|
|
52
|
-
|
|
53
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
54
|
-
style: {
|
|
55
|
-
width: _size
|
|
56
|
-
},
|
|
57
|
-
className: "goa-icon",
|
|
58
|
-
"data-testid": "icon-".concat(type)
|
|
59
|
-
}, /*#__PURE__*/React__default.createElement("ion-icon", {
|
|
60
|
-
style: {
|
|
61
|
-
fontSize: _size
|
|
62
|
-
},
|
|
63
|
-
name: style === 'filled' ? type : "".concat(type, "-").concat(style)
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function getSize(size) {
|
|
68
|
-
switch (size) {
|
|
69
|
-
case 'small':
|
|
70
|
-
return "14px";
|
|
71
|
-
|
|
72
|
-
case 'medium':
|
|
73
|
-
return "18px";
|
|
74
|
-
|
|
75
|
-
case 'large':
|
|
76
|
-
return "24px";
|
|
77
|
-
|
|
78
|
-
case 'xlarge':
|
|
79
|
-
return "32px";
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function GoAIconButton(_ref) {
|
|
84
|
-
var type = _ref.type,
|
|
85
|
-
disabled = _ref.disabled,
|
|
86
|
-
_ref$variant = _ref.variant,
|
|
87
|
-
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
88
|
-
onClick = _ref.onClick,
|
|
89
|
-
_ref$size = _ref.size,
|
|
90
|
-
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
91
|
-
title = _ref.title,
|
|
92
|
-
testId = _ref.testId;
|
|
93
|
-
return /*#__PURE__*/React__default.createElement("button", {
|
|
94
|
-
title: title,
|
|
95
|
-
disabled: disabled,
|
|
96
|
-
className: "goa-icon-button goa-icon-button-".concat(variant),
|
|
97
|
-
"data-testid": testId,
|
|
98
|
-
onClick: onClick
|
|
99
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
100
|
-
type: type,
|
|
101
|
-
size: size
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
var GoABadge = function GoABadge(_ref) {
|
|
106
|
-
var type = _ref.type,
|
|
107
|
-
content = _ref.content,
|
|
108
|
-
icon = _ref.icon,
|
|
109
|
-
testId = _ref.testId;
|
|
110
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
111
|
-
"data-testid": testId,
|
|
112
|
-
className: classnames(styles['goa-badge'], styles["badge-".concat(type)])
|
|
113
|
-
}, icon && /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
114
|
-
type: icon
|
|
115
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
116
|
-
className: classnames(styles['goa-badge-content'])
|
|
117
|
-
}, content));
|
|
118
|
-
};
|
|
119
|
-
var GoAInfoBadge = function GoAInfoBadge(_ref2) {
|
|
120
|
-
var content = _ref2.content,
|
|
121
|
-
testId = _ref2.testId;
|
|
122
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
123
|
-
"data-testid": testId,
|
|
124
|
-
className: classnames(styles['goa-badge'], styles["badge-information"])
|
|
125
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
126
|
-
type: "information-circle"
|
|
127
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
128
|
-
className: classnames(styles['goa-badge-content'])
|
|
129
|
-
}, content));
|
|
130
|
-
};
|
|
131
|
-
var GoASuccessBadge = function GoASuccessBadge(_ref3) {
|
|
132
|
-
var content = _ref3.content,
|
|
133
|
-
testId = _ref3.testId;
|
|
134
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
135
|
-
"data-testid": testId,
|
|
136
|
-
className: classnames(styles['goa-badge'], styles["badge-success"])
|
|
137
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
138
|
-
type: "checkmark-circle"
|
|
139
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
140
|
-
className: classnames(styles['goa-badge-content'])
|
|
141
|
-
}, content));
|
|
142
|
-
};
|
|
143
|
-
var GoAWarningBadge = function GoAWarningBadge(_ref4) {
|
|
144
|
-
var content = _ref4.content,
|
|
145
|
-
testId = _ref4.testId;
|
|
146
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
147
|
-
"data-testid": testId,
|
|
148
|
-
className: classnames(styles['goa-badge'], styles["badge-warning"])
|
|
149
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
150
|
-
type: "warning"
|
|
151
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
152
|
-
className: classnames(styles['goa-badge-content'])
|
|
153
|
-
}, content));
|
|
154
|
-
};
|
|
155
|
-
var GoAEmergencyBadge = function GoAEmergencyBadge(_ref5) {
|
|
156
|
-
var content = _ref5.content,
|
|
157
|
-
testId = _ref5.testId;
|
|
158
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
159
|
-
"data-testid": testId,
|
|
160
|
-
className: classnames(styles['goa-badge'], styles["badge-emergency"])
|
|
161
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
162
|
-
type: "alert-circle"
|
|
163
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
164
|
-
className: classnames(styles['goa-badge-content'])
|
|
165
|
-
}, content));
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
function _defineProperty(obj, key, value) {
|
|
169
|
-
if (key in obj) {
|
|
170
|
-
Object.defineProperty(obj, key, {
|
|
171
|
-
value: value,
|
|
172
|
-
enumerable: true,
|
|
173
|
-
configurable: true,
|
|
174
|
-
writable: true
|
|
175
|
-
});
|
|
176
|
-
} else {
|
|
177
|
-
obj[key] = value;
|
|
70
|
+
if (style.styleSheet) {
|
|
71
|
+
style.styleSheet.cssText = css;
|
|
72
|
+
} else {
|
|
73
|
+
style.appendChild(document.createTextNode(css));
|
|
74
|
+
}
|
|
178
75
|
}
|
|
179
76
|
|
|
180
|
-
|
|
181
|
-
|
|
77
|
+
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\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\n.goa-badge-icon {\n font-size: var(--fs-sm);\n}\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\n.badge-module_goa-badge__3F6Ve + .badge-module_goa-badge__3F6Ve {\n margin-left: 0.25rem;\n}\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\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\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\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\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\n.badge-module_goa-badge__3F6Ve.badge-module_badge-dark__1thw- {\n background-color: var(--color-black);\n color: var(--color-white);\n}\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\n.badge-module_goa-badge__3F6Ve.badge-module_badge-light__B8ZMt {\n background-color: var(--color-white);\n color: var(--color-black);\n}\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-inactive__35PEw {\n background-color: var(--color-white);\n color: var(--color-black);\n}";
|
|
78
|
+
var styles$2 = {"goa-badge":"badge-module_goa-badge__3F6Ve","goa-badge-content":"badge-module_goa-badge-content__3UN-3","badge-information":"badge-module_badge-information__2r_Eq","badge-success":"badge-module_badge-success__18wcm","badge-warning":"badge-module_badge-warning__20BNM","badge-emergency":"badge-module_badge-emergency__E4mHn","badge-dark":"badge-module_badge-dark__1thw-","badge-midtone":"badge-module_badge-midtone__1Gt4T","badge-light":"badge-module_badge-light__B8ZMt","badge-inactive":"badge-module_badge-inactive__35PEw"};
|
|
79
|
+
styleInject(css_248z$b);
|
|
182
80
|
|
|
183
|
-
|
|
184
|
-
|
|
81
|
+
var css_248z$a = ".goa-icon {\n display: flex;\n}\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\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\n.goa-icon-button-primary:active {\n transform: scale(0.9);\n}\n\n.goa-icon-button-primary:hover {\n background-color: var(--color-blue-100);\n}\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\n.goa-icon-button-secondary:active {\n transform: scale(0.9);\n}\n\n.goa-icon-button-secondary:hover {\n background: rgba(0, 0, 0, 0.1);\n color: #000;\n fill: #000;\n}\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\n.goa-icon-button-tertiary:active {\n transform: scale(0.9);\n}\n\n.goa-icon-button-tertiary:hover {\n color: #000;\n fill: #000;\n}";
|
|
82
|
+
styleInject(css_248z$a);
|
|
185
83
|
|
|
186
|
-
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
84
|
+
function GoAIcon(_a) {
|
|
85
|
+
var type = _a.type,
|
|
86
|
+
_b = _a.style,
|
|
87
|
+
style = _b === void 0 ? 'outline' : _b,
|
|
88
|
+
_c = _a.size,
|
|
89
|
+
size = _c === void 0 ? 'medium' : _c;
|
|
90
|
+
|
|
91
|
+
var _size = getSize(size);
|
|
92
|
+
|
|
93
|
+
return jsxRuntime.jsx("div", __assign({
|
|
94
|
+
style: {
|
|
95
|
+
width: _size
|
|
96
|
+
},
|
|
97
|
+
className: "goa-icon",
|
|
98
|
+
"data-testid": "icon-" + type
|
|
99
|
+
}, {
|
|
100
|
+
children: jsxRuntime.jsx("ion-icon", {
|
|
101
|
+
style: {
|
|
102
|
+
fontSize: _size
|
|
103
|
+
},
|
|
104
|
+
name: style === 'filled' ? type : type + "-" + style
|
|
105
|
+
}, void 0)
|
|
106
|
+
}), void 0);
|
|
192
107
|
}
|
|
193
108
|
|
|
194
|
-
|
|
195
|
-
|
|
109
|
+
function getSize(size) {
|
|
110
|
+
switch (size) {
|
|
111
|
+
case 'small':
|
|
112
|
+
return "14px";
|
|
196
113
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
114
|
+
case 'medium':
|
|
115
|
+
return "18px";
|
|
200
116
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
207
|
-
} else {
|
|
208
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
209
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
210
|
-
});
|
|
117
|
+
case 'large':
|
|
118
|
+
return "24px";
|
|
119
|
+
|
|
120
|
+
case 'xlarge':
|
|
121
|
+
return "32px";
|
|
211
122
|
}
|
|
212
123
|
}
|
|
213
124
|
|
|
214
|
-
|
|
215
|
-
|
|
125
|
+
function GoAIconButton(_a) {
|
|
126
|
+
var type = _a.type,
|
|
127
|
+
disabled = _a.disabled,
|
|
128
|
+
_b = _a.variant,
|
|
129
|
+
variant = _b === void 0 ? 'primary' : _b,
|
|
130
|
+
onClick = _a.onClick,
|
|
131
|
+
_c = _a.size,
|
|
132
|
+
size = _c === void 0 ? 'medium' : _c,
|
|
133
|
+
title = _a.title,
|
|
134
|
+
testId = _a.testId;
|
|
135
|
+
return jsxRuntime.jsx("button", __assign({
|
|
136
|
+
title: title,
|
|
137
|
+
disabled: disabled,
|
|
138
|
+
className: "goa-icon-button goa-icon-button-" + variant,
|
|
139
|
+
"data-testid": testId,
|
|
140
|
+
onClick: onClick
|
|
141
|
+
}, {
|
|
142
|
+
children: jsxRuntime.jsx(GoAIcon, {
|
|
143
|
+
type: type,
|
|
144
|
+
size: size
|
|
145
|
+
}, void 0)
|
|
146
|
+
}), void 0);
|
|
147
|
+
}
|
|
216
148
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
149
|
+
var GoABadge = function GoABadge(_a) {
|
|
150
|
+
var type = _a.type,
|
|
151
|
+
content = _a.content,
|
|
152
|
+
icon = _a.icon,
|
|
153
|
+
testId = _a.testId;
|
|
154
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
155
|
+
"data-testid": testId,
|
|
156
|
+
className: classnames__default["default"](styles$2['goa-badge'], styles$2["badge-" + type])
|
|
157
|
+
}, {
|
|
158
|
+
children: [icon && jsxRuntime.jsx(GoAIcon, {
|
|
159
|
+
type: icon
|
|
160
|
+
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
161
|
+
className: classnames__default["default"](styles$2['goa-badge-content'])
|
|
162
|
+
}, {
|
|
163
|
+
children: content
|
|
164
|
+
}), void 0)]
|
|
165
|
+
}), void 0);
|
|
166
|
+
};
|
|
167
|
+
var GoAInfoBadge = function GoAInfoBadge(_a) {
|
|
168
|
+
var content = _a.content,
|
|
169
|
+
testId = _a.testId;
|
|
170
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
171
|
+
"data-testid": testId,
|
|
172
|
+
className: classnames__default["default"](styles$2['goa-badge'], styles$2["badge-information"])
|
|
173
|
+
}, {
|
|
174
|
+
children: [jsxRuntime.jsx(GoAIcon, {
|
|
175
|
+
type: "information-circle"
|
|
176
|
+
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
177
|
+
className: classnames__default["default"](styles$2['goa-badge-content'])
|
|
178
|
+
}, {
|
|
179
|
+
children: content
|
|
180
|
+
}), void 0)]
|
|
181
|
+
}), void 0);
|
|
182
|
+
};
|
|
183
|
+
var GoASuccessBadge = function GoASuccessBadge(_a) {
|
|
184
|
+
var content = _a.content,
|
|
185
|
+
testId = _a.testId;
|
|
186
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
187
|
+
"data-testid": testId,
|
|
188
|
+
className: classnames__default["default"](styles$2['goa-badge'], styles$2["badge-success"])
|
|
189
|
+
}, {
|
|
190
|
+
children: [jsxRuntime.jsx(GoAIcon, {
|
|
191
|
+
type: "checkmark-circle"
|
|
192
|
+
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
193
|
+
className: classnames__default["default"](styles$2['goa-badge-content'])
|
|
194
|
+
}, {
|
|
195
|
+
children: content
|
|
196
|
+
}), void 0)]
|
|
197
|
+
}), void 0);
|
|
198
|
+
};
|
|
199
|
+
var GoAWarningBadge = function GoAWarningBadge(_a) {
|
|
200
|
+
var content = _a.content,
|
|
201
|
+
testId = _a.testId;
|
|
202
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
203
|
+
"data-testid": testId,
|
|
204
|
+
className: classnames__default["default"](styles$2['goa-badge'], styles$2["badge-warning"])
|
|
205
|
+
}, {
|
|
206
|
+
children: [jsxRuntime.jsx(GoAIcon, {
|
|
207
|
+
type: "warning"
|
|
208
|
+
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
209
|
+
className: classnames__default["default"](styles$2['goa-badge-content'])
|
|
210
|
+
}, {
|
|
211
|
+
children: content
|
|
212
|
+
}), void 0)]
|
|
213
|
+
}), void 0);
|
|
214
|
+
};
|
|
215
|
+
var GoAEmergencyBadge = function GoAEmergencyBadge(_a) {
|
|
216
|
+
var content = _a.content,
|
|
217
|
+
testId = _a.testId;
|
|
218
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
219
|
+
"data-testid": testId,
|
|
220
|
+
className: classnames__default["default"](styles$2['goa-badge'], styles$2["badge-emergency"])
|
|
221
|
+
}, {
|
|
222
|
+
children: [jsxRuntime.jsx(GoAIcon, {
|
|
223
|
+
type: "alert-circle"
|
|
224
|
+
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
225
|
+
className: classnames__default["default"](styles$2['goa-badge-content'])
|
|
226
|
+
}, {
|
|
227
|
+
children: content
|
|
228
|
+
}), void 0)]
|
|
229
|
+
}), void 0);
|
|
230
|
+
};
|
|
222
231
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
var css_248z$9 = ".button-module_goa-button__fikCc {\n border-radius: 0.25rem;\n border: 2px solid var(--color-blue-500);\n box-sizing: border-box;\n cursor: pointer;\n font-size: 18px;\n font-weight: 700;\n line-height: 1em;\n padding: 0 0.75rem;\n transition: transform 0.1s ease-in-out, background-color 0.2s ease-in-out;\n transform: scale(1);\n}\n.button-module_goa-button__fikCc:disabled {\n pointer-events: none;\n color: var(--color-gray-700);\n background-color: var(--color-gray-100);\n border-color: var(--color-gray-100);\n}\n.button-module_goa-button__fikCc:active {\n transform: scale(0.98);\n}\n\n.button-module_goa-button--primary__2V_nV {\n border: 2px solid var(--color-blue-500);\n background: var(--color-blue-500);\n color: var(--color-white);\n}\n.button-module_goa-button--primary__2V_nV:hover {\n border-color: var(--color-blue-600);\n background: var(--color-blue-600);\n}\n.button-module_goa-button--primary__2V_nV:focus, .button-module_goa-button--primary__2V_nV:active {\n border-color: var(--color-blue-600);\n box-shadow: 0 0 0 3px var(--color-orange-500);\n background: var(--color-blue-600);\n outline: none;\n}\n\n.button-module_goa-button--secondary__3_OjG {\n border: 2px solid var(--color-blue-500);\n background: var(--color-white);\n color: var(--color-blue-500);\n}\n.button-module_goa-button--secondary__3_OjG:hover {\n border-color: var(--color-blue-600);\n color: var(--color-blue-600);\n}\n.button-module_goa-button--secondary__3_OjG:focus, .button-module_goa-button--secondary__3_OjG:active {\n border-color: var(--color-blue-600);\n color: var(--color-blue-600);\n box-shadow: 0 0 0 3px var(--color-orange-500);\n outline: none;\n}\n\n.button-module_goa-button--tertiary__3mvRP {\n border-color: var(--color-gray-200);\n background: var(--color-white);\n color: var(--color-blue-500);\n}\n.button-module_goa-button--tertiary__3mvRP:hover {\n color: var(--color-blue-600);\n}\n.button-module_goa-button--tertiary__3mvRP:focus, .button-module_goa-button--tertiary__3mvRP:active {\n border-color: var(--color-blue-600);\n color: var(--color-blue-600);\n box-shadow: 0 0 0 3px var(--color-orange-500);\n outline: none;\n}\n\n.button-module_goa-button--borderless__2PWz1 {\n background: none;\n color: var(--color-blue-500);\n border: none;\n}\n.button-module_goa-button--borderless__2PWz1:hover {\n background-color: var(--color-blue-100);\n color: var(--color-blue-500);\n}\n.button-module_goa-button--borderless__2PWz1:focus, .button-module_goa-button--borderless__2PWz1:active {\n outline: none;\n box-shadow: none;\n background-color: var(--color-blue-100);\n}\n\n.button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa {\n color: var(--color-white);\n background: var(--color-red-500);\n border-color: var(--color-red-500);\n}\n.button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa:hover {\n background: var(--color-red-600);\n border-color: var(--color-red-600);\n}\n.button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa:active {\n background: var(--color-red-600);\n border-color: var(--color-red-600);\n}\n\n.button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa {\n color: var(--color-red-500);\n border-color: var(--color-red-500);\n}\n.button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa:hover {\n border-color: var(--color-red-600);\n color: var(--color-red-600);\n}\n.button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa:active {\n color: var(--color-red-600);\n border-color: var(--color-red-600);\n}\n\n.button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa {\n color: var(--color-red-500);\n border-color: var(--color-gray-200);\n}\n.button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa:hover {\n border-color: var(--color-red-600);\n color: var(--color-red-600);\n}\n.button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa:active {\n color: var(--color-red-600);\n border-color: var(--color-red-600);\n}\n\n.button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa {\n color: var(--color-red-500);\n}\n.button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa:hover {\n background: var(--color-red-100);\n color: var(--color-red-500);\n}\n.button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa:active {\n background: var(--color-red-100);\n color: var(--color-red-500);\n}\n\n.button-module_goa-button--large__1iRt7 {\n font-size: var(--fs-lg);\n line-height: 3rem;\n}\n\n.button-module_goa-button--large__1iRt7.button-module_goa-button--borderless__2PWz1 {\n line-height: calc(3rem + 4px);\n}\n\n.button-module_goa-button--medium__1xeCJ {\n font-size: var(--fs-base);\n line-height: 2.375rem;\n}\n\n.button-module_goa-button--medium__1xeCJ.button-module_goa-button--borderless__2PWz1 {\n line-height: calc(2.375rem + 4px);\n}\n\n.button-module_goa-button--small__1sl63 {\n font-size: var(--fs-sm);\n line-height: 1.75rem;\n}\n\n.button-module_goa-button--small__1sl63.button-module_goa-button--borderless__2PWz1 {\n line-height: calc(1.75rem + 4px);\n}\n\n.button-module_goa-button__fikCc {\n min-width: 100%;\n}\n\n.button-module_goa-button__fikCc + .button-module_goa-button__fikCc {\n margin: 0;\n margin-top: 0.5rem;\n}\n\n@media (min-width: 480px) {\n .button-module_goa-button__fikCc {\n min-width: 4rem;\n }\n\n .button-module_goa-button__fikCc + .button-module_goa-button__fikCc {\n margin: 0;\n margin-left: 0.5rem;\n }\n}";
|
|
233
|
+
var styles$1 = {"goa-button":"button-module_goa-button__fikCc","goa-button--primary":"button-module_goa-button--primary__2V_nV","goa-button--secondary":"button-module_goa-button--secondary__3_OjG","goa-button--tertiary":"button-module_goa-button--tertiary__3mvRP","goa-button--borderless":"button-module_goa-button--borderless__2PWz1","goa-button--danger":"button-module_goa-button--danger__2jXqa","goa-button--large":"button-module_goa-button--large__1iRt7","goa-button--medium":"button-module_goa-button--medium__1xeCJ","goa-button--small":"button-module_goa-button--small__1sl63"};
|
|
234
|
+
styleInject(css_248z$9);
|
|
235
|
+
|
|
236
|
+
var GoAButton = function GoAButton(_a) {
|
|
237
|
+
var _b = _a.type,
|
|
238
|
+
type = _b === void 0 ? 'primary' : _b,
|
|
239
|
+
_c = _a.size,
|
|
240
|
+
size = _c === void 0 ? 'medium' : _c,
|
|
241
|
+
_d = _a.variant,
|
|
242
|
+
variant = _d === void 0 ? 'default' : _d,
|
|
243
|
+
title = _a.title,
|
|
244
|
+
children = _a.children,
|
|
245
|
+
onClick = _a.onClick,
|
|
246
|
+
props = __rest(_a, ["type", "size", "variant", "title", "children", "onClick"]);
|
|
247
|
+
|
|
248
|
+
var css = [styles$1["goa-button--" + type], styles$1["goa-button--" + size], styles$1["goa-button--" + variant], styles$1['goa-button']].join(' ');
|
|
249
|
+
var buttonRef = React.useRef();
|
|
250
|
+
return jsxRuntime.jsx("button", __assign({
|
|
251
|
+
className: css,
|
|
252
|
+
ref: buttonRef,
|
|
253
|
+
title: title,
|
|
254
|
+
onClick: onClick
|
|
255
|
+
}, props, {
|
|
256
|
+
children: children
|
|
257
|
+
}), void 0);
|
|
258
|
+
};
|
|
228
259
|
|
|
229
|
-
|
|
230
|
-
|
|
260
|
+
var css_248z$8 = "/* Palette */\n/* Semantic usages */\n.app-version-header-module_goa-app-version-header__3ngyf {\n display: flex;\n justify-content: center;\n background-color: #dcdcdc;\n}\n.app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd {\n display: flex;\n flex: 1 1 auto;\n margin: 0 24px;\n max-width: 1200px;\n}\n@media (min-width: 768px) {\n .app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd {\n margin: 0 72px;\n }\n}\n.app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd .app-version-header-module_environment-and-version__1-GPd {\n display: flex;\n flex: 1 1 auto;\n justify-content: center;\n padding-left: 20px;\n}\n.app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd .app-version-header-module_close__1beXI {\n margin-left: auto;\n width: 20px;\n text-align: right;\n font-weight: bold;\n font-size: small;\n align-self: center;\n cursor: pointer;\n display: flex;\n}\n.app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd .app-version-header-module_close__1beXI svg {\n color: #0070c4;\n}";
|
|
261
|
+
var styles = {"goa-app-version-header":"app-version-header-module_goa-app-version-header__3ngyf","content-wrapper":"app-version-header-module_content-wrapper__15exd","environment-and-version":"app-version-header-module_environment-and-version__1-GPd","close":"app-version-header-module_close__1beXI"};
|
|
262
|
+
styleInject(css_248z$8);
|
|
263
|
+
|
|
264
|
+
var GoAAppVersionHeader = function GoAAppVersionHeader(_a) {
|
|
265
|
+
var isProdEnvironment = _a.isProdEnvironment,
|
|
266
|
+
environment = _a.environment,
|
|
267
|
+
version = _a.version;
|
|
268
|
+
|
|
269
|
+
var _b = React.useState(false),
|
|
270
|
+
closed = _b[0],
|
|
271
|
+
setClosed = _b[1];
|
|
272
|
+
|
|
273
|
+
if (closed || isProdEnvironment) return null;
|
|
274
|
+
return jsxRuntime.jsx("div", __assign({
|
|
275
|
+
className: classnames__default["default"](styles['goa-app-version-header'])
|
|
276
|
+
}, {
|
|
277
|
+
children: jsxRuntime.jsxs("span", __assign({
|
|
278
|
+
className: classnames__default["default"](styles['content-wrapper']),
|
|
279
|
+
"data-testid": 'content-wrapper'
|
|
280
|
+
}, {
|
|
281
|
+
children: [jsxRuntime.jsxs("span", __assign({
|
|
282
|
+
className: classnames__default["default"](styles['environment-and-version'])
|
|
283
|
+
}, {
|
|
284
|
+
children: [environment, " ", version]
|
|
285
|
+
}), void 0), jsxRuntime.jsx("span", __assign({
|
|
286
|
+
className: classnames__default["default"](styles['close']),
|
|
287
|
+
"data-testid": 'close',
|
|
288
|
+
onClick: function () {
|
|
289
|
+
return setClosed(true);
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
292
|
+
children: jsxRuntime.jsx(GoAIcon, {
|
|
293
|
+
type: "close"
|
|
294
|
+
}, void 0)
|
|
295
|
+
}), void 0)]
|
|
296
|
+
}), void 0)
|
|
297
|
+
}), void 0);
|
|
298
|
+
};
|
|
231
299
|
|
|
232
|
-
|
|
233
|
-
|
|
300
|
+
var css_248z$7 = ":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\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\nh1:first-child,\nh2:first-child,\nh3:first-child {\n margin-top: 0;\n}\n\n/* Base header margins */\nh1,\nh2,\nh3,\nh4 {\n margin-bottom: 1rem;\n}\n\n/* Font sizes */\nh1 {\n font-size: var(--fs-3xl);\n line-height: var(--lh-2xl);\n font-weight: var(--fw-bold);\n}\n\nh2 {\n font-size: var(--fs-2xl);\n line-height: var(--lh-xl);\n font-weight: var(--fw-regular);\n}\n\nh3 {\n font-size: var(--fs-xl);\n line-height: var(--lh-lg);\n font-weight: var(--fw-regular);\n}\n\nh4,\nh5,\nh6 {\n font-size: var(--fs-base);\n line-height: var(--lh-base);\n font-weight: var(--fw-bold);\n}\n\n/* Set top margin to subsequent headers */\nh1 + h2,\nh1 + h3,\nh1 + h4,\nh2 + h3,\nh2 + h4,\nh3 + h4 {\n margin-top: 2rem;\n}\n\np {\n margin-bottom: 1rem;\n font-size: var(--fs-base);\n}\n\nhr + h1,\nhr + h2,\nhr + h3 {\n margin-top: 0;\n}\n\nem {\n font-size: var(--fs-xs);\n line-height: var(--lh-sm);\n color: var(--color-gray);\n}\n\nsmall {\n font-size: var(--fs-xs);\n font-style: normal;\n color: var(--color-gray);\n}\n\n.card-module_goa-card__OjjJX {\n --card-spacing: 1rem;\n --card-child-spacing: 0.5rem;\n box-sizing: border-box;\n background: var(--color-white);\n transition: opacity 300ms ease-in-out;\n border-radius: var(--border-radius);\n}\n.card-module_goa-card__OjjJX a:hover {\n color: var(--color-blue-600);\n text-decoration: none;\n}\n.card-module_goa-card__OjjJX a:focus {\n outline: 3px solid var(--color-orange);\n outline-offset: 0;\n}\n.card-module_goa-card__OjjJX h6 {\n font-size: var(--fs-xs);\n line-height: var(--lh-sm);\n font-weight: var(--fw-base);\n color: var(--color-gray);\n margin: 0;\n padding: 0;\n}\n\n.card-module_goa-card--tertiary__1BV7k {\n border-radius: var(--border-radius-sm);\n}\n\n.card-module_goa-card-top__RM4IA {\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n min-height: 0.5rem;\n}\n\n.card-module_goa-card-top--primary__g2XEU {\n background-color: var(--color-tealblue-500);\n}\n\n.card-module_goa-card-top--secondary__mSrLl {\n background-color: var(--color-gray-200);\n}\n\n.card-module_goa-card-top--tertiary__2fG-A {\n display: none;\n}\n\n.card-module_goa-card__OjjJX .card-module_goa-card__OjjJX .card-module_goa-card-top--primary__g2XEU,\n.card-module_goa-card__OjjJX .card-module_goa-card__OjjJX .card-module_goa-card-top--secondary__mSrLl {\n min-height: 0.2rem;\n}\n\n.card-module_goa-card-details__4KtfS > .card-module_goa-card__OjjJX:first-child {\n margin-top: 0;\n}\n\n.card-module_goa-card-details__4KtfS > .card-module_goa-card__OjjJX h3 {\n font-size: var(--fs-lg);\n}\n\n.card-module_goa-card-details__4KtfS > .card-module_goa-card__OjjJX {\n margin-top: 1rem;\n}\n\n.card-module_goa-card-content__3gE5R {\n padding: var(--card-spacing);\n border-top-width: 0;\n border: 1px solid var(--color-gray-200);\n border-bottom-left-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n}\n\n.card-module_goa-card-content--tertiary__1dbYr {\n border-radius: var(--border-radius-sm);\n padding: calc(var(--card-spacing) / 2);\n}\n\n.card-module_goa-card-details__4KtfS ul {\n margin-left: var(--card-spacing);\n}";
|
|
301
|
+
var css = {"goa-card":"card-module_goa-card__OjjJX","goa-card--tertiary":"card-module_goa-card--tertiary__1BV7k","goa-card-top":"card-module_goa-card-top__RM4IA","goa-card-top--primary":"card-module_goa-card-top--primary__g2XEU","goa-card-top--secondary":"card-module_goa-card-top--secondary__mSrLl","goa-card-top--tertiary":"card-module_goa-card-top--tertiary__2fG-A","goa-card-details":"card-module_goa-card-details__4KtfS","goa-card-content":"card-module_goa-card-content__3gE5R","goa-card-content--tertiary":"card-module_goa-card-content--tertiary__1dbYr"};
|
|
302
|
+
styleInject(css_248z$7);
|
|
303
|
+
|
|
304
|
+
var GoACard = function GoACard(_a) {
|
|
305
|
+
var title = _a.title,
|
|
306
|
+
children = _a.children,
|
|
307
|
+
_b = _a.type,
|
|
308
|
+
type = _b === void 0 ? 'primary' : _b,
|
|
309
|
+
_c = _a.minWidth,
|
|
310
|
+
minWidth = _c === void 0 ? 'auto' : _c,
|
|
311
|
+
_d = _a.maxWidth,
|
|
312
|
+
maxWidth = _d === void 0 ? 'auto' : _d,
|
|
313
|
+
other = __rest(_a, ["title", "children", "type", "minWidth", "maxWidth"]);
|
|
314
|
+
|
|
315
|
+
var dataProps = Object.entries(other).filter(function (item) {
|
|
316
|
+
return item[0].startsWith('data-');
|
|
317
|
+
}).reduce(function (previous, current) {
|
|
318
|
+
var _a;
|
|
319
|
+
|
|
320
|
+
return __assign(__assign({}, previous), (_a = {}, _a[current[0]] = current[1], _a));
|
|
321
|
+
}, {});
|
|
322
|
+
return jsxRuntime.jsxs("div", __assign({}, dataProps, {
|
|
323
|
+
className: classnames__default["default"](css['goa-card'], css["goa-card--" + type]),
|
|
324
|
+
"data-testid": 'card-container',
|
|
325
|
+
style: {
|
|
326
|
+
minWidth: minWidth,
|
|
327
|
+
maxWidth: maxWidth
|
|
328
|
+
}
|
|
329
|
+
}, {
|
|
330
|
+
children: [jsxRuntime.jsx("div", {
|
|
331
|
+
className: classnames__default["default"](css['goa-card-top'], css["goa-card-top--" + type])
|
|
332
|
+
}, void 0), jsxRuntime.jsxs("div", __assign({
|
|
333
|
+
className: classnames__default["default"](css['goa-card-content'], css["goa-card-content--" + type])
|
|
334
|
+
}, {
|
|
335
|
+
children: [title && jsxRuntime.jsx("h3", __assign({
|
|
336
|
+
className: css['goa-card-title']
|
|
337
|
+
}, {
|
|
338
|
+
children: title
|
|
339
|
+
}), void 0), jsxRuntime.jsx("div", __assign({
|
|
340
|
+
className: css['goa-card-details'],
|
|
341
|
+
"data-testid": 'card-content'
|
|
342
|
+
}, {
|
|
343
|
+
children: children
|
|
344
|
+
}), void 0)]
|
|
345
|
+
}), void 0)]
|
|
346
|
+
}), void 0);
|
|
347
|
+
};
|
|
234
348
|
|
|
235
|
-
var
|
|
349
|
+
var css_248z$6 = ".goa-flex-row {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: top;\n margin-bottom: 1.5rem;\n}\n.goa-flex-row *:last-child {\n margin-bottom: 0;\n}\n\n.goa-flex-row > * {\n flex: 1 1 30ch;\n}";
|
|
350
|
+
styleInject(css_248z$6);
|
|
351
|
+
|
|
352
|
+
var GoAFlexRow = function GoAFlexRow(_a) {
|
|
353
|
+
var gap = _a.gap,
|
|
354
|
+
minWidth = _a.minWidth,
|
|
355
|
+
children = _a.children;
|
|
356
|
+
var style = {
|
|
357
|
+
gap: gap === 'small' ? '1rem' : gap === 'medium' ? '2rem' : gap === 'large' ? '3rem' : '0'
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
var getChildren = function getChildren() {
|
|
361
|
+
return React__default["default"].Children.map(children, function (child) {
|
|
362
|
+
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
363
|
+
style: __assign({
|
|
364
|
+
flexBasis: minWidth
|
|
365
|
+
}, child.props.style)
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
return jsxRuntime.jsx("div", __assign({
|
|
371
|
+
className: "goa-flex-row",
|
|
372
|
+
style: style
|
|
373
|
+
}, {
|
|
374
|
+
children: getChildren()
|
|
375
|
+
}), void 0);
|
|
376
|
+
};
|
|
236
377
|
|
|
237
|
-
var
|
|
378
|
+
var GoAFormItem = function GoAFormItem(_a) {
|
|
379
|
+
var children = _a.children,
|
|
380
|
+
helpText = _a.helpText,
|
|
381
|
+
error = _a.error;
|
|
382
|
+
var className = error ? "goa-form-item goa-state--error" : "goa-form-item";
|
|
383
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
384
|
+
className: className
|
|
385
|
+
}, {
|
|
386
|
+
children: [children, error && jsxRuntime.jsx("div", __assign({
|
|
387
|
+
className: "error-msg"
|
|
388
|
+
}, {
|
|
389
|
+
children: error
|
|
390
|
+
}), void 0), helpText && jsxRuntime.jsx("div", __assign({
|
|
391
|
+
id: "helpText",
|
|
392
|
+
className: "help-msg"
|
|
393
|
+
}, {
|
|
394
|
+
children: helpText
|
|
395
|
+
}), void 0)]
|
|
396
|
+
}), void 0);
|
|
397
|
+
};
|
|
238
398
|
|
|
239
|
-
|
|
240
|
-
var
|
|
399
|
+
var GoAFormActions = function GoAFormActions(_a) {
|
|
400
|
+
var _b = _a.alignment,
|
|
401
|
+
alignment = _b === void 0 ? 'left' : _b,
|
|
402
|
+
children = _a.children;
|
|
403
|
+
return jsxRuntime.jsx("div", __assign({
|
|
404
|
+
className: "goa-form-actions goa-form-actions--" + alignment
|
|
405
|
+
}, {
|
|
406
|
+
children: children
|
|
407
|
+
}), void 0);
|
|
408
|
+
};
|
|
241
409
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
245
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
246
|
-
target[key] = source[key];
|
|
247
|
-
}
|
|
248
|
-
}
|
|
410
|
+
var css_248z$5 = ":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\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\n.goa-form {\n box-sizing: border-box;\n}\n\n.goa-form *,\n.goa-form *:before,\n.goa-form *:after {\n box-sizing: inherit;\n}\n\n.goa-form-row {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n@media screen and (min-width: 640px) {\n .goa-form-row {\n gap: 1.75rem;\n flex-direction: row;\n }\n}\n.goa-form-item {\n flex: 1 1 auto;\n margin-bottom: 1rem;\n}\n.goa-form-item label {\n display: block;\n font-weight: bold;\n color: #333;\n font-size: var(--fs-base);\n line-height: calc(var(--fs-base) + 1rem);\n}\n.goa-form-item label em {\n color: var(--color-gray-700);\n font-weight: var(--fw-regular);\n font-size: var(--fs-sm);\n}\n.goa-form-item input,\n.goa-form-item textarea {\n display: block;\n width: 100%;\n font-size: var(--fs-base);\n}\n.goa-form-item.goa-state--error .error-msg {\n font-size: var(--fs-sm);\n line-height: calc(var(--fs-sm) + 0.5rem);\n color: var(--color-red);\n}\n\n.help-msg {\n font-size: var(--fs-sm);\n color: var(--color-gray-900);\n line-height: calc(var(--fs-sm) + 0.5rem);\n}\n\n.goa-form-actions {\n display: flex;\n flex-wrap: wrap;\n margin-top: 2rem;\n}\n.goa-form-actions button,\n.goa-form-actions .goa-link-button {\n margin: 0;\n}\n@media (max-width: 639px) {\n .goa-form-actions button,\n.goa-form-actions .goa-link-button {\n width: 100%;\n }\n .goa-form-actions button + button,\n.goa-form-actions button + .goa-link-button,\n.goa-form-actions .goa-link-button + button,\n.goa-form-actions .goa-link-button + .goa-link-button {\n margin-top: 0.5rem;\n }\n}\n@media (min-width: 640px) {\n .goa-form-actions button,\n.goa-form-actions .goa-link-button {\n min-width: 6rem;\n }\n .goa-form-actions button + button,\n.goa-form-actions button + .goa-link-button,\n.goa-form-actions .goa-link-button + button,\n.goa-form-actions .goa-link-button + .goa-link-button {\n margin-left: 0.5rem;\n }\n}\n\n.goa-form-actions--left {\n justify-content: flex-start;\n}\n\n.goa-form-actions--right {\n justify-content: flex-end;\n}";
|
|
411
|
+
styleInject(css_248z$5);
|
|
249
412
|
|
|
250
|
-
|
|
251
|
-
|
|
413
|
+
var GoAForm = function GoAForm(_a) {
|
|
414
|
+
var children = _a.children;
|
|
415
|
+
return jsxRuntime.jsx("div", __assign({
|
|
416
|
+
className: "goa-form"
|
|
417
|
+
}, {
|
|
418
|
+
children: children
|
|
419
|
+
}), void 0);
|
|
420
|
+
};
|
|
252
421
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
422
|
+
var css_248z$4 = ":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\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\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}\n.goa-input:hover {\n border-color: var(--color-blue-600);\n}\n.goa-input:active, .goa-input:focus, .goa-input:focus-within {\n box-shadow: 0 0 0 3px var(--color-orange);\n}\n.goa-input:disabled {\n border-color: var(--color-gray-500);\n}\n.goa-input:disabled:hover {\n border-color: var(--color-gray-500);\n}\n.goa-input:disabled:focus {\n box-shadow: none;\n}\n\n.goa-input-leading-icon {\n display: flex;\n align-items: center;\n}\n\n.goa-input-leading-icon ~ input {\n padding-left: 0.25rem;\n}\n\n.goa-input-trailing-icon {\n display: flex;\n align-items: center;\n}\n\n.goa-input-trailing-icon > .goa-icon-button {\n margin-right: -0.5rem;\n}\n\ninput.input--goa {\n display: block;\n border: none;\n flex: 1 1 auto;\n}\n\ninput.input--goa::-webkit-calendar-picker-indicator {\n display: none;\n}\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\n.goa-input--disabled {\n opacity: 0.5;\n cursor: default;\n border-color: var(--color-black);\n}\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}\n.goa-input--disabled input:hover {\n cursor: default !important;\n}\n\n.goa-input .input--bare {\n border: none;\n}\n\n.goa-state--error .goa-input {\n border: 2px solid var(--color-red);\n}";
|
|
423
|
+
styleInject(css_248z$4);
|
|
424
|
+
|
|
425
|
+
var GoAInput = function GoAInput(_a) {
|
|
426
|
+
var _b;
|
|
427
|
+
|
|
428
|
+
var name = _a.name,
|
|
429
|
+
onTrailingIconClick = _a.onTrailingIconClick,
|
|
430
|
+
onChange = _a.onChange,
|
|
431
|
+
leadingIcon = _a.leadingIcon,
|
|
432
|
+
trailingIcon = _a.trailingIcon,
|
|
433
|
+
_c = _a.variant,
|
|
434
|
+
variant = _c === void 0 ? 'goa' : _c,
|
|
435
|
+
focused = _a.focused,
|
|
436
|
+
disabled = _a.disabled,
|
|
437
|
+
readonly = _a.readonly,
|
|
438
|
+
other = __rest(_a, ["name", "onTrailingIconClick", "onChange", "leadingIcon", "trailingIcon", "variant", "focused", "disabled", "readonly"]);
|
|
439
|
+
|
|
440
|
+
var inputRef = React__default["default"].useRef(null);
|
|
441
|
+
React.useEffect(function () {
|
|
442
|
+
var _a, _b;
|
|
443
|
+
|
|
444
|
+
if (focused) {
|
|
445
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
446
|
+
} else {
|
|
447
|
+
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
448
|
+
}
|
|
449
|
+
}, [focused, inputRef]);
|
|
450
|
+
var rootCss = classnames__default["default"]({
|
|
451
|
+
'goa-input': true,
|
|
452
|
+
'goa-input--disabled': disabled
|
|
453
|
+
});
|
|
454
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
455
|
+
className: rootCss
|
|
456
|
+
}, {
|
|
457
|
+
children: [leadingIcon && jsxRuntime.jsx("div", __assign({
|
|
458
|
+
className: "goa-input-leading-icon"
|
|
459
|
+
}, {
|
|
460
|
+
children: jsxRuntime.jsx(GoAIcon, {
|
|
461
|
+
type: leadingIcon
|
|
462
|
+
}, void 0)
|
|
463
|
+
}), void 0), jsxRuntime.jsx("input", __assign({
|
|
464
|
+
ref: inputRef,
|
|
465
|
+
className: classnames__default["default"]((_b = {}, _b["input--" + variant] = true, _b['input--leading-icon'] = leadingIcon, _b)),
|
|
466
|
+
readOnly: readonly,
|
|
467
|
+
disabled: disabled,
|
|
468
|
+
onChange: function (e) {
|
|
469
|
+
return onChange(name, e.target.value);
|
|
470
|
+
}
|
|
471
|
+
}, other), void 0), trailingIcon && !onTrailingIconClick && jsxRuntime.jsx("div", __assign({
|
|
472
|
+
className: "goa-input-trailing-icon"
|
|
473
|
+
}, {
|
|
474
|
+
children: jsxRuntime.jsx(GoAIcon, {
|
|
475
|
+
size: "medium",
|
|
476
|
+
type: trailingIcon
|
|
477
|
+
}, void 0)
|
|
478
|
+
}), void 0), trailingIcon && onTrailingIconClick && jsxRuntime.jsx("div", __assign({
|
|
479
|
+
onClick: onTrailingIconClick,
|
|
480
|
+
className: "goa-input-trailing-icon"
|
|
481
|
+
}, {
|
|
482
|
+
children: jsxRuntime.jsx(GoAIconButton, {
|
|
483
|
+
variant: "tertiary",
|
|
484
|
+
onClick: onTrailingIconClick,
|
|
485
|
+
disabled: disabled,
|
|
486
|
+
size: "medium",
|
|
487
|
+
type: trailingIcon,
|
|
488
|
+
testId: name + "-input-trailing-button"
|
|
489
|
+
}, void 0)
|
|
490
|
+
}), void 0)]
|
|
491
|
+
}), void 0);
|
|
492
|
+
};
|
|
493
|
+
var GoAInputText = function GoAInputText(props) {
|
|
494
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
495
|
+
type: "text"
|
|
496
|
+
}), void 0);
|
|
497
|
+
};
|
|
498
|
+
var GoAInputPassword = function GoAInputPassword(props) {
|
|
499
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
500
|
+
type: "password"
|
|
501
|
+
}), void 0);
|
|
502
|
+
};
|
|
503
|
+
var GoAInputDate = function GoAInputDate(props) {
|
|
504
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
505
|
+
type: "date",
|
|
506
|
+
trailingIcon: "calendar"
|
|
507
|
+
}), void 0);
|
|
508
|
+
};
|
|
509
|
+
var GoAInputTime = function GoAInputTime(props) {
|
|
510
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
511
|
+
type: "time"
|
|
512
|
+
}), void 0);
|
|
513
|
+
};
|
|
514
|
+
var GoAInputDateTime = function GoAInputDateTime(props) {
|
|
515
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
516
|
+
type: "datetime-local",
|
|
517
|
+
trailingIcon: "calendar"
|
|
518
|
+
}), void 0);
|
|
519
|
+
};
|
|
520
|
+
var GoAInputEmail = function GoAInputEmail(props) {
|
|
521
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
522
|
+
type: "email"
|
|
523
|
+
}), void 0);
|
|
524
|
+
};
|
|
525
|
+
var GoAInputSearch = function GoAInputSearch(props) {
|
|
526
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
527
|
+
type: "text",
|
|
528
|
+
trailingIcon: "search"
|
|
529
|
+
}), void 0);
|
|
530
|
+
};
|
|
531
|
+
var GoAInputUrl = function GoAInputUrl(props) {
|
|
532
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
533
|
+
type: "url"
|
|
534
|
+
}), void 0);
|
|
535
|
+
};
|
|
536
|
+
var GoAInputTel = function GoAInputTel(props) {
|
|
537
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
538
|
+
type: "tel"
|
|
539
|
+
}), void 0);
|
|
540
|
+
};
|
|
541
|
+
var GoAInputFile = function GoAInputFile(props) {
|
|
542
|
+
return jsxRuntime.jsx("input", {
|
|
543
|
+
id: props.id,
|
|
544
|
+
name: props.name,
|
|
545
|
+
type: "file",
|
|
546
|
+
onChange: function (e) {
|
|
547
|
+
return props.onChange(e.target.name, e.target.value);
|
|
548
|
+
},
|
|
549
|
+
style: {
|
|
550
|
+
backgroundColor: 'revert'
|
|
551
|
+
}
|
|
552
|
+
}, void 0);
|
|
553
|
+
};
|
|
554
|
+
var GoAInputMonth = function GoAInputMonth(props) {
|
|
555
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
556
|
+
type: "month",
|
|
557
|
+
trailingIcon: "calendar"
|
|
558
|
+
}), void 0);
|
|
559
|
+
};
|
|
560
|
+
var GoAInputNumber = function GoAInputNumber(props) {
|
|
561
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
562
|
+
type: "number"
|
|
563
|
+
}), void 0);
|
|
564
|
+
};
|
|
565
|
+
var GoAInputRange = function GoAInputRange(_a) {
|
|
566
|
+
_a.step;
|
|
567
|
+
var props = __rest(_a, ["step"]);
|
|
568
|
+
|
|
569
|
+
return jsxRuntime.jsx("input", __assign({}, props, {
|
|
570
|
+
type: "range",
|
|
571
|
+
onChange: function (e) {
|
|
572
|
+
return props.onChange(e.target.name, e.target.value);
|
|
573
|
+
}
|
|
574
|
+
}), void 0);
|
|
575
|
+
};
|
|
256
576
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
577
|
+
var css_248z$3 = ".goa-scrollable {\n scroll-behavior: smooth;\n}\n\n.goa-scrollable::-webkit-scrollbar {\n width: 6px;\n}\n\n.goa-scrollable::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.goa-scrollable::-webkit-scrollbar-thumb {\n background: #888;\n}\n\n.goa-scrollable::-webkit-scrollbar-thumb:hover {\n background: #555;\n}";
|
|
578
|
+
styleInject(css_248z$3);
|
|
579
|
+
|
|
580
|
+
var GoAScrollable = function GoAScrollable(_a) {
|
|
581
|
+
var vertical = _a.vertical,
|
|
582
|
+
horizontal = _a.horizontal,
|
|
583
|
+
hPadding = _a.hPadding,
|
|
584
|
+
vPadding = _a.vPadding,
|
|
585
|
+
height = _a.height,
|
|
586
|
+
children = _a.children,
|
|
587
|
+
testId = _a.testId;
|
|
588
|
+
var style = {
|
|
589
|
+
overflowY: vertical ? 'auto' : 'hidden',
|
|
590
|
+
overflowX: horizontal ? 'auto' : 'hidden',
|
|
591
|
+
maxHeight: height !== null && height !== void 0 ? height : '100%',
|
|
592
|
+
padding: (vPadding !== null && vPadding !== void 0 ? vPadding : 0) + "rem " + (hPadding !== null && hPadding !== void 0 ? hPadding : 0) + "rem"
|
|
593
|
+
};
|
|
594
|
+
return jsxRuntime.jsx("div", __assign({
|
|
595
|
+
className: 'goa-scrollable',
|
|
596
|
+
style: style,
|
|
597
|
+
"data-testid": testId
|
|
598
|
+
}, {
|
|
599
|
+
children: children
|
|
600
|
+
}), void 0);
|
|
601
|
+
};
|
|
260
602
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
|
|
603
|
+
var css_248z$2 = "/* Fade in */\n.fade-in-init {\n display: none;\n}\n\n.fade-in-start {\n display: block;\n opacity: 0;\n transition: opacity 200ms ease-in;\n}\n\n.fade-in-active {\n opacity: 1;\n}\n\n/* Fade out */\n.fade-out-init {\n display: block;\n}\n\n.fade-out-start {\n display: block;\n opacity: 1;\n transition: opacity 200ms ease-in;\n}\n\n.fade-out-active {\n opacity: 0;\n}\n\n/* ======= Slide in/out Up */\n/* Slide in up */\n.slide-in-up-init {\n transition: translateY(0);\n display: none;\n}\n\n.slide-in-up-start {\n display: block;\n transform: translateY(100vh);\n transition: transform 300ms ease-out;\n}\n\n.slide-in-up-active {\n transform: translateY(0);\n}\n\n/* Slide out up */\n.slide-out-up-init {\n transform: translateY(0);\n display: block;\n}\n\n.slide-out-up-start {\n transition: transform 300ms ease-in;\n}\n\n.slide-out-up-active {\n transform: translateY(-100vh);\n}\n\n/* ======= Slide in/out Down */\n/* Slide in down */\n.slide-in-down-init {\n transition: translateY(0);\n display: none;\n}\n\n.slide-in-down-start {\n display: block;\n transform: translateY(-100vh);\n transition: transform 300ms ease-out;\n}\n\n.slide-in-down-active {\n transform: translateY(0);\n}\n\n/* Slide out down */\n.slide-out-down-init {\n transform: translateY(0);\n display: block;\n}\n\n.slide-out-down-start {\n transform: translateY(0);\n transition: transform 300ms ease-in;\n}\n\n.slide-out-down-active {\n transform: translateY(100vh);\n}\n\n/* ======= Slide in/out Left */\n/* Slide in left */\n.slide-in-left-init {\n transition: translateX(0);\n display: none;\n}\n\n.slide-in-left-start {\n display: block;\n transform: translateX(-100vw);\n transition: transform 300ms ease-out;\n}\n\n.slide-in-left-active {\n transform: translateX(0);\n}\n\n/* Slide out left */\n.slide-out-left-init {\n transform: translateX(0);\n display: block;\n}\n\n.slide-out-left-start {\n transform: translateX(0);\n transition: transform 300ms ease-in;\n}\n\n.slide-out-left-active {\n transform: translateX(-100vw);\n}\n\n/* ======= Slide in/out Right */\n/* Slide in left */\n.slide-in-right-init {\n transition: translateX(0);\n display: none;\n}\n\n.slide-in-right-start {\n display: block;\n transform: translateX(100vw);\n transition: transform 300ms ease-out;\n}\n\n.slide-in-right-active {\n transform: translateX(0);\n}\n\n/* Slide out right */\n.slide-out-right-init {\n transform: translateX(0);\n display: block;\n}\n\n.slide-out-right-start {\n transform: translateX(0);\n transition: transform 300ms ease-in;\n}\n\n.slide-out-right-active {\n transform: translateX(100vw);\n}";
|
|
604
|
+
styleInject(css_248z$2);
|
|
605
|
+
|
|
606
|
+
var GoATransition = function GoATransition(_a) {
|
|
607
|
+
var name = _a.name,
|
|
608
|
+
active = _a.active,
|
|
609
|
+
onComplete = _a.onComplete,
|
|
610
|
+
children = _a.children;
|
|
611
|
+
|
|
612
|
+
var _b = React.useState('init'),
|
|
613
|
+
state = _b[0],
|
|
614
|
+
setState = _b[1];
|
|
615
|
+
|
|
616
|
+
React.useEffect(function () {
|
|
617
|
+
if (active) {
|
|
618
|
+
setState('start');
|
|
619
|
+
setTimeout(function () {
|
|
620
|
+
return setState('active');
|
|
621
|
+
}, 100);
|
|
622
|
+
setTimeout(function () {
|
|
623
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete();
|
|
624
|
+
}, 500);
|
|
625
|
+
} else {
|
|
626
|
+
setState('init');
|
|
627
|
+
}
|
|
628
|
+
}, [active]); // `onComplete` in the dependencies results in an animation stutter
|
|
267
629
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
630
|
+
function getCss() {
|
|
631
|
+
switch (state) {
|
|
632
|
+
case 'init':
|
|
633
|
+
return name + "-init";
|
|
271
634
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
} catch (err) {
|
|
275
|
-
_d = true;
|
|
276
|
-
_e = err;
|
|
277
|
-
} finally {
|
|
278
|
-
try {
|
|
279
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
280
|
-
} finally {
|
|
281
|
-
if (_d) throw _e;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
635
|
+
case 'start':
|
|
636
|
+
return name + "-start";
|
|
284
637
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
289
|
-
if (!o) return;
|
|
290
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
291
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
292
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
293
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
294
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
function _arrayLikeToArray(arr, len) {
|
|
298
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
299
|
-
|
|
300
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
301
|
-
|
|
302
|
-
return arr2;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
function _nonIterableRest() {
|
|
306
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
var css_248z$2 = ".button-module_goa-button__fikCc {\n border-radius: 0.25rem;\n border: 2px solid var(--color-blue-500);\n box-sizing: border-box;\n cursor: pointer;\n font-size: 18px;\n font-weight: 700;\n line-height: 1em;\n padding: 0 0.75rem;\n transition: transform 0.1s ease-in-out, background-color 0.2s ease-in-out;\n transform: scale(1); }\n .button-module_goa-button__fikCc:disabled {\n pointer-events: none;\n color: var(--color-gray-700);\n background-color: var(--color-gray-100);\n border-color: var(--color-gray-100); }\n .button-module_goa-button__fikCc:active {\n transform: scale(0.98); }\n\n.button-module_goa-button--primary__2V_nV {\n border: 2px solid var(--color-blue-500);\n background: var(--color-blue-500);\n color: var(--color-white); }\n .button-module_goa-button--primary__2V_nV:hover {\n border-color: var(--color-blue-600);\n background: var(--color-blue-600); }\n .button-module_goa-button--primary__2V_nV:focus, .button-module_goa-button--primary__2V_nV:active {\n border-color: var(--color-blue-600);\n box-shadow: 0 0 0 3px var(--color-orange-500);\n background: var(--color-blue-600);\n outline: none; }\n\n.button-module_goa-button--secondary__3_OjG {\n border: 2px solid var(--color-blue-500);\n background: var(--color-white);\n color: var(--color-blue-500); }\n .button-module_goa-button--secondary__3_OjG:hover {\n border-color: var(--color-blue-600);\n color: var(--color-blue-600); }\n .button-module_goa-button--secondary__3_OjG:focus, .button-module_goa-button--secondary__3_OjG:active {\n border-color: var(--color-blue-600);\n color: var(--color-blue-600);\n box-shadow: 0 0 0 3px var(--color-orange-500);\n outline: none; }\n\n.button-module_goa-button--tertiary__3mvRP {\n border-color: var(--color-gray-200);\n background: var(--color-white);\n color: var(--color-blue-500); }\n .button-module_goa-button--tertiary__3mvRP:hover {\n color: var(--color-blue-600); }\n .button-module_goa-button--tertiary__3mvRP:focus, .button-module_goa-button--tertiary__3mvRP:active {\n border-color: var(--color-blue-600);\n color: var(--color-blue-600);\n box-shadow: 0 0 0 3px var(--color-orange-500);\n outline: none; }\n\n.button-module_goa-button--borderless__2PWz1 {\n background: none;\n color: var(--color-blue-500);\n border: none; }\n .button-module_goa-button--borderless__2PWz1:hover {\n background-color: var(--color-blue-100);\n color: var(--color-blue-500); }\n .button-module_goa-button--borderless__2PWz1:focus, .button-module_goa-button--borderless__2PWz1:active {\n outline: none;\n box-shadow: none;\n background-color: var(--color-blue-100); }\n\n.button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa {\n color: var(--color-white);\n background: var(--color-red-500);\n border-color: var(--color-red-500); }\n .button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa:hover {\n background: var(--color-red-600);\n border-color: var(--color-red-600); }\n .button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--primary__2V_nV.button-module_goa-button--danger__2jXqa:active {\n background: var(--color-red-600);\n border-color: var(--color-red-600); }\n\n.button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa {\n color: var(--color-red-500);\n border-color: var(--color-red-500); }\n .button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa:hover {\n border-color: var(--color-red-600);\n color: var(--color-red-600); }\n .button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--secondary__3_OjG.button-module_goa-button--danger__2jXqa:active {\n color: var(--color-red-600);\n border-color: var(--color-red-600); }\n\n.button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa {\n color: var(--color-red-500);\n border-color: var(--color-gray-200); }\n .button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa:hover {\n border-color: var(--color-red-600);\n color: var(--color-red-600); }\n .button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--tertiary__3mvRP.button-module_goa-button--danger__2jXqa:active {\n color: var(--color-red-600);\n border-color: var(--color-red-600); }\n\n.button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa {\n color: var(--color-red-500); }\n .button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa:hover {\n background: var(--color-red-100);\n color: var(--color-red-500); }\n .button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa:focus, .button-module_goa-button--borderless__2PWz1.button-module_goa-button--danger__2jXqa:active {\n background: var(--color-red-100);\n color: var(--color-red-500); }\n\n.button-module_goa-button--large__1iRt7 {\n font-size: var(--fs-lg);\n line-height: 3rem; }\n\n.button-module_goa-button--large__1iRt7.button-module_goa-button--borderless__2PWz1 {\n line-height: calc(3rem + 4px); }\n\n.button-module_goa-button--medium__1xeCJ {\n font-size: var(--fs-base);\n line-height: 2.375rem; }\n\n.button-module_goa-button--medium__1xeCJ.button-module_goa-button--borderless__2PWz1 {\n line-height: calc(2.375rem + 4px); }\n\n.button-module_goa-button--small__1sl63 {\n font-size: var(--fs-sm);\n line-height: 1.75rem; }\n\n.button-module_goa-button--small__1sl63.button-module_goa-button--borderless__2PWz1 {\n line-height: calc(1.75rem + 4px); }\n\n.button-module_goa-button__fikCc {\n min-width: 100%; }\n\n.button-module_goa-button__fikCc + .button-module_goa-button__fikCc {\n margin: 0;\n margin-top: 0.5rem; }\n\n@media (min-width: 480px) {\n .button-module_goa-button__fikCc {\n min-width: 4rem; }\n .button-module_goa-button__fikCc + .button-module_goa-button__fikCc {\n margin: 0;\n margin-left: 0.5rem; } }\n";
|
|
310
|
-
var styles$1 = {"goa-button":"button-module_goa-button__fikCc","goa-button--primary":"button-module_goa-button--primary__2V_nV","goa-button--secondary":"button-module_goa-button--secondary__3_OjG","goa-button--tertiary":"button-module_goa-button--tertiary__3mvRP","goa-button--borderless":"button-module_goa-button--borderless__2PWz1","goa-button--danger":"button-module_goa-button--danger__2jXqa","goa-button--large":"button-module_goa-button--large__1iRt7","goa-button--medium":"button-module_goa-button--medium__1xeCJ","goa-button--small":"button-module_goa-button--small__1sl63"};
|
|
311
|
-
styleInject(css_248z$2);
|
|
312
|
-
|
|
313
|
-
var GoAButton = function GoAButton(_ref) {
|
|
314
|
-
var _ref$type = _ref.type,
|
|
315
|
-
type = _ref$type === void 0 ? 'primary' : _ref$type,
|
|
316
|
-
_ref$size = _ref.size,
|
|
317
|
-
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
318
|
-
_ref$variant = _ref.variant,
|
|
319
|
-
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
320
|
-
title = _ref.title,
|
|
321
|
-
children = _ref.children,
|
|
322
|
-
onClick = _ref.onClick,
|
|
323
|
-
props = _objectWithoutProperties(_ref, ["type", "size", "variant", "title", "children", "onClick"]);
|
|
324
|
-
|
|
325
|
-
var css = [styles$1["goa-button--".concat(type)], styles$1["goa-button--".concat(size)], styles$1["goa-button--".concat(variant)], styles$1['goa-button']].join(' ');
|
|
326
|
-
var buttonRef = React.useRef();
|
|
327
|
-
return /*#__PURE__*/React__default.createElement("button", Object.assign({
|
|
328
|
-
className: css,
|
|
329
|
-
ref: buttonRef,
|
|
330
|
-
title: title,
|
|
331
|
-
onClick: onClick
|
|
332
|
-
}, props), children);
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
var css_248z$3 = "/* Palette */\n/* Semantic usages */\n.app-version-header-module_goa-app-version-header__3ngyf {\n display: flex;\n justify-content: center;\n background-color: #dcdcdc; }\n .app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd {\n display: flex;\n flex: 1 1 auto;\n margin: 0 24px;\n max-width: 1200px; }\n @media (min-width: 768px) {\n .app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd {\n margin: 0 72px; } }\n .app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd .app-version-header-module_environment-and-version__1-GPd {\n display: flex;\n flex: 1 1 auto;\n justify-content: center;\n padding-left: 20px; }\n .app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd .app-version-header-module_close__1beXI {\n margin-left: auto;\n width: 20px;\n text-align: right;\n font-weight: bold;\n font-size: small;\n align-self: center;\n cursor: pointer;\n display: flex; }\n .app-version-header-module_goa-app-version-header__3ngyf .app-version-header-module_content-wrapper__15exd .app-version-header-module_close__1beXI svg {\n color: #0070c4; }\n";
|
|
336
|
-
var styles$2 = {"goa-app-version-header":"app-version-header-module_goa-app-version-header__3ngyf","content-wrapper":"app-version-header-module_content-wrapper__15exd","environment-and-version":"app-version-header-module_environment-and-version__1-GPd","close":"app-version-header-module_close__1beXI"};
|
|
337
|
-
styleInject(css_248z$3);
|
|
338
|
-
|
|
339
|
-
var GoAAppVersionHeader = function GoAAppVersionHeader(_ref) {
|
|
340
|
-
var isProdEnvironment = _ref.isProdEnvironment,
|
|
341
|
-
environment = _ref.environment,
|
|
342
|
-
version = _ref.version;
|
|
343
|
-
|
|
344
|
-
var _useState = React.useState(false),
|
|
345
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
346
|
-
closed = _useState2[0],
|
|
347
|
-
setClosed = _useState2[1];
|
|
348
|
-
|
|
349
|
-
if (closed || isProdEnvironment) return null;
|
|
350
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
351
|
-
className: classnames(styles$2['goa-app-version-header'])
|
|
352
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
353
|
-
className: classnames(styles$2['content-wrapper']),
|
|
354
|
-
"data-testid": "content-wrapper"
|
|
355
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
356
|
-
className: classnames(styles$2['environment-and-version'])
|
|
357
|
-
}, environment, " ", version), /*#__PURE__*/React__default.createElement("span", {
|
|
358
|
-
className: classnames(styles$2['close']),
|
|
359
|
-
"data-testid": "close",
|
|
360
|
-
onClick: function onClick() {
|
|
361
|
-
return setClosed(true);
|
|
638
|
+
case 'active':
|
|
639
|
+
return name + "-start " + name + "-active";
|
|
640
|
+
}
|
|
362
641
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
type = _ref$type === void 0 ? 'primary' : _ref$type,
|
|
377
|
-
_ref$minWidth = _ref.minWidth,
|
|
378
|
-
minWidth = _ref$minWidth === void 0 ? 'auto' : _ref$minWidth,
|
|
379
|
-
_ref$maxWidth = _ref.maxWidth,
|
|
380
|
-
maxWidth = _ref$maxWidth === void 0 ? 'auto' : _ref$maxWidth,
|
|
381
|
-
other = _objectWithoutProperties(_ref, ["title", "children", "type", "minWidth", "maxWidth"]);
|
|
382
|
-
|
|
383
|
-
var dataProps = Object.entries(other).filter(function (item) {
|
|
384
|
-
return item[0].startsWith('data-');
|
|
385
|
-
}).reduce(function (previous, current) {
|
|
386
|
-
return _objectSpread2(_objectSpread2({}, previous), {}, _defineProperty({}, current[0], current[1]));
|
|
387
|
-
}, {});
|
|
388
|
-
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, dataProps, {
|
|
389
|
-
className: classnames(css['goa-card'], css["goa-card--".concat(type)]),
|
|
390
|
-
"data-testid": "card-container",
|
|
391
|
-
style: {
|
|
392
|
-
minWidth: minWidth,
|
|
393
|
-
maxWidth: maxWidth
|
|
642
|
+
|
|
643
|
+
return jsxRuntime.jsx("div", __assign({
|
|
644
|
+
className: getCss()
|
|
645
|
+
}, {
|
|
646
|
+
children: children
|
|
647
|
+
}), void 0);
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
var GoATransitionSequence = function GoATransitionSequence(props) {
|
|
651
|
+
function createTransition(props, children) {
|
|
652
|
+
return jsxRuntime.jsx(GoATransition, __assign({}, props, {
|
|
653
|
+
children: children
|
|
654
|
+
}), void 0);
|
|
394
655
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}, children)));
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
var css_248z$5 = ".goa-flex-row {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: top;\n margin-bottom: 1.5rem; }\n .goa-flex-row *:last-child {\n margin-bottom: 0; }\n\n.goa-flex-row > * {\n flex: 1 1 30ch; }\n";
|
|
408
|
-
styleInject(css_248z$5);
|
|
409
|
-
|
|
410
|
-
var GoAFlexRow = function GoAFlexRow(_ref) {
|
|
411
|
-
var gap = _ref.gap,
|
|
412
|
-
minWidth = _ref.minWidth,
|
|
413
|
-
children = _ref.children;
|
|
414
|
-
var style = {
|
|
415
|
-
gap: gap === 'small' ? '1rem' : gap === 'medium' ? '2rem' : gap === 'large' ? '3rem' : '0'
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
var getChildren = function getChildren() {
|
|
419
|
-
return React__default.Children.map(children, function (child) {
|
|
420
|
-
return React__default.cloneElement(child, {
|
|
421
|
-
style: _objectSpread2({
|
|
422
|
-
flexBasis: minWidth
|
|
423
|
-
}, child.props.style)
|
|
656
|
+
|
|
657
|
+
return props.transitions // create components for the transitions
|
|
658
|
+
.map(function (state, index) {
|
|
659
|
+
return createTransition({
|
|
660
|
+
active: props.transitionIndex % (props.transitions.length + 1) > index,
|
|
661
|
+
name: state,
|
|
662
|
+
onComplete: function () {
|
|
663
|
+
return props === null || props === void 0 ? void 0 : props.onTransitionComplete(index, index === props.transitions.length - 1);
|
|
664
|
+
}
|
|
424
665
|
});
|
|
425
|
-
})
|
|
666
|
+
}) // on `reduce` we need to start with the innermost child
|
|
667
|
+
.reverse() // create parent/child relationship between components
|
|
668
|
+
.reduce(function (child, parent) {
|
|
669
|
+
if (!child) {
|
|
670
|
+
// the original children (user defined content to be transitioned)
|
|
671
|
+
return /*#__PURE__*/React__default["default"].cloneElement(parent, {
|
|
672
|
+
children: props.children
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
return /*#__PURE__*/React__default["default"].cloneElement(parent, {
|
|
677
|
+
children: child
|
|
678
|
+
});
|
|
679
|
+
}, null);
|
|
426
680
|
};
|
|
427
681
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
454
|
-
className: "goa-form-actions goa-form-actions--".concat(alignment)
|
|
455
|
-
}, children);
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
var css_248z$6 = ":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-form {\n box-sizing: border-box; }\n\n.goa-form *,\n.goa-form *:before,\n.goa-form *:after {\n box-sizing: inherit; }\n\n.goa-form-row {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n\n@media screen and (min-width: 640px) {\n .goa-form-row {\n gap: 1.75rem;\n flex-direction: row; } }\n\n.goa-form-item {\n flex: 1 1 auto;\n margin-bottom: 1rem; }\n .goa-form-item label {\n display: block;\n font-weight: bold;\n color: #333;\n font-size: var(--fs-base);\n line-height: calc(var(--fs-base) + 1rem); }\n .goa-form-item label em {\n color: var(--color-gray-700);\n font-weight: var(--fw-regular);\n font-size: var(--fs-sm); }\n .goa-form-item input,\n .goa-form-item textarea {\n display: block;\n width: 100%;\n font-size: var(--fs-base); }\n .goa-form-item.goa-state--error .error-msg {\n font-size: var(--fs-sm);\n line-height: calc(var(--fs-sm) + 0.5rem);\n color: var(--color-red); }\n\n.help-msg {\n font-size: var(--fs-sm);\n color: var(--color-gray-900);\n line-height: calc(var(--fs-sm) + 0.5rem); }\n\n.goa-form-actions {\n display: flex;\n flex-wrap: wrap;\n margin-top: 2rem; }\n .goa-form-actions button,\n .goa-form-actions .goa-link-button {\n margin: 0; }\n @media (max-width: 639px) {\n .goa-form-actions button,\n .goa-form-actions .goa-link-button {\n width: 100%; }\n .goa-form-actions button + button,\n .goa-form-actions button + .goa-link-button,\n .goa-form-actions .goa-link-button + button,\n .goa-form-actions .goa-link-button + .goa-link-button {\n margin-top: 0.5rem; } }\n @media (min-width: 640px) {\n .goa-form-actions button,\n .goa-form-actions .goa-link-button {\n min-width: 6rem; }\n .goa-form-actions button + button,\n .goa-form-actions button + .goa-link-button,\n .goa-form-actions .goa-link-button + button,\n .goa-form-actions .goa-link-button + .goa-link-button {\n margin-left: 0.5rem; } }\n\n.goa-form-actions--left {\n justify-content: flex-start; }\n\n.goa-form-actions--right {\n justify-content: flex-end; }\n";
|
|
459
|
-
styleInject(css_248z$6);
|
|
460
|
-
|
|
461
|
-
var GoAForm = function GoAForm(_ref) {
|
|
462
|
-
var children = _ref.children;
|
|
463
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
464
|
-
className: "goa-form"
|
|
465
|
-
}, children);
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
var css_248z$7 = ":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";
|
|
469
|
-
styleInject(css_248z$7);
|
|
470
|
-
|
|
471
|
-
var GoAInput = function GoAInput(_ref) {
|
|
472
|
-
var _classNames;
|
|
473
|
-
|
|
474
|
-
var name = _ref.name,
|
|
475
|
-
onTrailingIconClick = _ref.onTrailingIconClick,
|
|
476
|
-
_onChange = _ref.onChange,
|
|
477
|
-
leadingIcon = _ref.leadingIcon,
|
|
478
|
-
trailingIcon = _ref.trailingIcon,
|
|
479
|
-
_ref$variant = _ref.variant,
|
|
480
|
-
variant = _ref$variant === void 0 ? 'goa' : _ref$variant,
|
|
481
|
-
focused = _ref.focused,
|
|
482
|
-
disabled = _ref.disabled,
|
|
483
|
-
readonly = _ref.readonly,
|
|
484
|
-
other = _objectWithoutProperties(_ref, ["name", "onTrailingIconClick", "onChange", "leadingIcon", "trailingIcon", "variant", "focused", "disabled", "readonly"]);
|
|
485
|
-
|
|
486
|
-
var inputRef = React__default.useRef(null);
|
|
487
|
-
React.useEffect(function () {
|
|
488
|
-
if (focused) {
|
|
489
|
-
var _inputRef$current;
|
|
490
|
-
|
|
491
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
492
|
-
} else {
|
|
493
|
-
var _inputRef$current2;
|
|
682
|
+
var css_248z$1 = "/* Root ============================================================================== */\n.modal-root {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n --modal-spacing: 1.75rem;\n --button-min-width: 5rem;\n}\n\n/* Modal ============================================================================== */\n.modal {\n position: relative;\n background: #fff;\n z-index: 1002;\n box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n}\n\n@media (max-width: 639px) {\n .modal {\n width: 90%;\n max-height: 90%;\n }\n}\n@media (min-width: 640px) {\n .modal {\n margin: 1rem;\n max-height: 80%;\n min-width: 60ch;\n }\n}\n/* Modal Container =========================================================================== */\n.modal-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* Modal Actions ============================================================================== */\n.modal-actions {\n text-align: right;\n margin: var(--modal-spacing);\n flex: 0 0 auto;\n}\n\n.modal-actions button {\n min-width: var(--button-min-width);\n}\n\n@media (max-width: 639px) {\n .modal-actions button + button {\n margin-top: 0.5rem;\n }\n\n .modal-actions button {\n display: block;\n width: 100%;\n }\n}\n@media (min-width: 640px) {\n .modal-actions > button {\n margin-right: 0;\n }\n\n .modal-actions > button + button {\n margin-left: 0.5rem;\n }\n}\n/* Modal Title ============================================================================ */\n.modal-title {\n font-size: var(--fs-xl);\n padding: 1rem var(--modal-spacing);\n margin-right: 40px;\n /* close icon spacing */\n flex: 0 0 auto;\n}\n\n/* Modal Background ======================================================================= */\n.modal-background {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n}\n\n/* Modal Close Icon ======================================================================= */\n.modal-close {\n position: absolute;\n top: 1rem;\n right: 1rem;\n}";
|
|
683
|
+
styleInject(css_248z$1);
|
|
684
|
+
|
|
685
|
+
var TRANSITION_INIT = 0;
|
|
686
|
+
var TRANSITION_VISIBLE = 1;
|
|
687
|
+
var TRANSITION_HIDDEN = 2;
|
|
688
|
+
var GoAModal = function GoAModal(_a) {
|
|
689
|
+
var children = _a.children,
|
|
690
|
+
isOpen = _a.isOpen,
|
|
691
|
+
onClose = _a.onClose,
|
|
692
|
+
testId = _a.testId,
|
|
693
|
+
backgroundTestId = _a.backgroundTestId;
|
|
694
|
+
|
|
695
|
+
var _b = React.useState(TRANSITION_INIT),
|
|
696
|
+
transitionIndex = _b[0],
|
|
697
|
+
setTransitionIndex = _b[1];
|
|
698
|
+
|
|
699
|
+
React.useEffect(function () {
|
|
700
|
+
if (isOpen) {
|
|
701
|
+
show();
|
|
702
|
+
} else if (transitionIndex !== 0) {
|
|
703
|
+
// don't hide() on the when in the init state
|
|
704
|
+
hide();
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
494
707
|
|
|
495
|
-
(
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}, leadingIcon && /*#__PURE__*/React__default.createElement("div", {
|
|
505
|
-
className: "goa-input-leading-icon"
|
|
506
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
507
|
-
type: leadingIcon
|
|
508
|
-
})), /*#__PURE__*/React__default.createElement("input", Object.assign({
|
|
509
|
-
ref: inputRef,
|
|
510
|
-
className: classnames((_classNames = {}, _defineProperty(_classNames, "input--".concat(variant), true), _defineProperty(_classNames, 'input--leading-icon', leadingIcon), _classNames)),
|
|
511
|
-
readOnly: readonly,
|
|
512
|
-
disabled: disabled,
|
|
513
|
-
onChange: function onChange(e) {
|
|
514
|
-
return _onChange(name, e.target.value);
|
|
515
|
-
}
|
|
516
|
-
}, other)), trailingIcon && !onTrailingIconClick && /*#__PURE__*/React__default.createElement("div", {
|
|
517
|
-
className: "goa-input-trailing-icon"
|
|
518
|
-
}, /*#__PURE__*/React__default.createElement(GoAIcon, {
|
|
519
|
-
size: "medium",
|
|
520
|
-
type: trailingIcon
|
|
521
|
-
})), trailingIcon && onTrailingIconClick && /*#__PURE__*/React__default.createElement("div", {
|
|
522
|
-
onClick: onTrailingIconClick,
|
|
523
|
-
className: "goa-input-trailing-icon"
|
|
524
|
-
}, /*#__PURE__*/React__default.createElement(GoAIconButton, {
|
|
525
|
-
variant: "tertiary",
|
|
526
|
-
onClick: onTrailingIconClick,
|
|
527
|
-
disabled: disabled,
|
|
528
|
-
size: "medium",
|
|
529
|
-
type: trailingIcon,
|
|
530
|
-
testId: "".concat(name, "-input-trailing-button")
|
|
531
|
-
})));
|
|
532
|
-
};
|
|
533
|
-
var GoAInputText = function GoAInputText(props) {
|
|
534
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
535
|
-
type: "text"
|
|
536
|
-
}));
|
|
537
|
-
};
|
|
538
|
-
var GoAInputPassword = function GoAInputPassword(props) {
|
|
539
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
540
|
-
type: "password"
|
|
541
|
-
}));
|
|
542
|
-
};
|
|
543
|
-
var GoAInputDate = function GoAInputDate(props) {
|
|
544
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
545
|
-
type: "date",
|
|
546
|
-
trailingIcon: "calendar"
|
|
547
|
-
}));
|
|
548
|
-
};
|
|
549
|
-
var GoAInputTime = function GoAInputTime(props) {
|
|
550
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
551
|
-
type: "time"
|
|
552
|
-
}));
|
|
553
|
-
};
|
|
554
|
-
var GoAInputDateTime = function GoAInputDateTime(props) {
|
|
555
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
556
|
-
type: "datetime-local",
|
|
557
|
-
trailingIcon: "calendar"
|
|
558
|
-
}));
|
|
559
|
-
};
|
|
560
|
-
var GoAInputEmail = function GoAInputEmail(props) {
|
|
561
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
562
|
-
type: "email"
|
|
563
|
-
}));
|
|
564
|
-
};
|
|
565
|
-
var GoAInputSearch = function GoAInputSearch(props) {
|
|
566
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
567
|
-
type: "text",
|
|
568
|
-
trailingIcon: "search"
|
|
569
|
-
}));
|
|
570
|
-
};
|
|
571
|
-
var GoAInputUrl = function GoAInputUrl(props) {
|
|
572
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
573
|
-
type: "url"
|
|
574
|
-
}));
|
|
575
|
-
};
|
|
576
|
-
var GoAInputTel = function GoAInputTel(props) {
|
|
577
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
578
|
-
type: "tel"
|
|
579
|
-
}));
|
|
580
|
-
};
|
|
581
|
-
var GoAInputFile = function GoAInputFile(props) {
|
|
582
|
-
return /*#__PURE__*/React__default.createElement("input", {
|
|
583
|
-
id: props.id,
|
|
584
|
-
name: props.name,
|
|
585
|
-
type: "file",
|
|
586
|
-
onChange: function onChange(e) {
|
|
587
|
-
return props.onChange(e.target.name, e.target.value);
|
|
588
|
-
},
|
|
589
|
-
style: {
|
|
590
|
-
backgroundColor: 'revert'
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
var GoAInputMonth = function GoAInputMonth(props) {
|
|
595
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
596
|
-
type: "month",
|
|
597
|
-
trailingIcon: "calendar"
|
|
598
|
-
}));
|
|
599
|
-
};
|
|
600
|
-
var GoAInputNumber = function GoAInputNumber(props) {
|
|
601
|
-
return /*#__PURE__*/React__default.createElement(GoAInput, Object.assign({}, props, {
|
|
602
|
-
type: "number"
|
|
603
|
-
}));
|
|
604
|
-
};
|
|
605
|
-
var GoAInputRange = function GoAInputRange(_ref2) {
|
|
606
|
-
var _ref2$step = _ref2.step,
|
|
607
|
-
props = _objectWithoutProperties(_ref2, ["step"]);
|
|
608
|
-
|
|
609
|
-
return /*#__PURE__*/React__default.createElement("input", Object.assign({}, props, {
|
|
610
|
-
type: "range",
|
|
611
|
-
onChange: function onChange(e) {
|
|
612
|
-
return props.onChange(e.target.name, e.target.value);
|
|
708
|
+
if (isOpen) {
|
|
709
|
+
return hide;
|
|
710
|
+
}
|
|
711
|
+
}, [isOpen]);
|
|
712
|
+
|
|
713
|
+
function hideScrollbars() {
|
|
714
|
+
var scrollbarWidth = calculateScrollbarWidth();
|
|
715
|
+
document.body.style.overflow = 'hidden';
|
|
716
|
+
document.body.style.paddingRight = scrollbarWidth + 'px';
|
|
613
717
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
var css_248z$8 = ".goa-scrollable {\n scroll-behavior: smooth; }\n\n.goa-scrollable::-webkit-scrollbar {\n width: 6px; }\n\n.goa-scrollable::-webkit-scrollbar-track {\n background: #f1f1f1; }\n\n.goa-scrollable::-webkit-scrollbar-thumb {\n background: #888; }\n\n.goa-scrollable::-webkit-scrollbar-thumb:hover {\n background: #555; }\n";
|
|
618
|
-
styleInject(css_248z$8);
|
|
619
|
-
|
|
620
|
-
var GoAScrollable = function GoAScrollable(_ref) {
|
|
621
|
-
var vertical = _ref.vertical,
|
|
622
|
-
horizontal = _ref.horizontal,
|
|
623
|
-
hPadding = _ref.hPadding,
|
|
624
|
-
vPadding = _ref.vPadding,
|
|
625
|
-
height = _ref.height,
|
|
626
|
-
children = _ref.children,
|
|
627
|
-
testId = _ref.testId;
|
|
628
|
-
var style = {
|
|
629
|
-
overflowY: vertical ? 'auto' : 'hidden',
|
|
630
|
-
overflowX: horizontal ? 'auto' : 'hidden',
|
|
631
|
-
maxHeight: height !== null && height !== void 0 ? height : '100%',
|
|
632
|
-
padding: "".concat(vPadding !== null && vPadding !== void 0 ? vPadding : 0, "rem ").concat(hPadding !== null && hPadding !== void 0 ? hPadding : 0, "rem")
|
|
633
|
-
};
|
|
634
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
635
|
-
className: "goa-scrollable",
|
|
636
|
-
style: style,
|
|
637
|
-
"data-testid": testId
|
|
638
|
-
}, children);
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
var css_248z$9 = "/* 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";
|
|
642
|
-
styleInject(css_248z$9);
|
|
643
|
-
|
|
644
|
-
var GoATransition = function GoATransition(_ref) {
|
|
645
|
-
var name = _ref.name,
|
|
646
|
-
active = _ref.active,
|
|
647
|
-
onComplete = _ref.onComplete,
|
|
648
|
-
children = _ref.children;
|
|
649
|
-
|
|
650
|
-
var _useState = React.useState('init'),
|
|
651
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
652
|
-
state = _useState2[0],
|
|
653
|
-
setState = _useState2[1];
|
|
654
|
-
|
|
655
|
-
React.useEffect(function () {
|
|
656
|
-
if (active) {
|
|
657
|
-
setState('start');
|
|
658
|
-
setTimeout(function () {
|
|
659
|
-
return setState('active');
|
|
660
|
-
}, 100);
|
|
718
|
+
|
|
719
|
+
function resetScrollbars() {
|
|
720
|
+
// need to perform on the next render cycle to allow the css transitions to take place
|
|
661
721
|
setTimeout(function () {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
setState('init');
|
|
722
|
+
document.body.style.overflow = '';
|
|
723
|
+
document.body.style.paddingRight = '0';
|
|
724
|
+
}, 300); // 300ms allows for any close animations to complete
|
|
666
725
|
}
|
|
667
|
-
}, [active]); // `onComplete` in the dependencies results in an animation stutter
|
|
668
726
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
return "".concat(name, "-init");
|
|
673
|
-
|
|
674
|
-
case 'start':
|
|
675
|
-
return "".concat(name, "-start");
|
|
676
|
-
|
|
677
|
-
case 'active':
|
|
678
|
-
return "".concat(name, "-start ").concat(name, "-active");
|
|
727
|
+
function show() {
|
|
728
|
+
setTransitionIndex(TRANSITION_VISIBLE);
|
|
729
|
+
hideScrollbars();
|
|
679
730
|
}
|
|
680
|
-
}
|
|
681
731
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
732
|
+
function hide() {
|
|
733
|
+
setTransitionIndex(TRANSITION_HIDDEN);
|
|
734
|
+
resetScrollbars();
|
|
735
|
+
} // allows the current state to be easily determined within tests
|
|
686
736
|
|
|
687
|
-
var GoATransitionSequence = function GoATransitionSequence(props) {
|
|
688
|
-
function createTransition(props, children) {
|
|
689
|
-
return /*#__PURE__*/React__default.createElement(GoATransition, props, children);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
return props.transitions // create components for the transitions
|
|
693
|
-
.map(function (state, index) {
|
|
694
|
-
return createTransition({
|
|
695
|
-
active: props.transitionIndex % (props.transitions.length + 1) > index,
|
|
696
|
-
name: state,
|
|
697
|
-
onComplete: function onComplete() {
|
|
698
|
-
return props === null || props === void 0 ? void 0 : props.onTransitionComplete(index, index === props.transitions.length - 1);
|
|
699
|
-
}
|
|
700
|
-
});
|
|
701
|
-
}) // on `reduce` we need to start with the innermost child
|
|
702
|
-
.reverse() // create parent/child relationship between components
|
|
703
|
-
.reduce(function (child, parent) {
|
|
704
|
-
if (!child) {
|
|
705
|
-
// the original children (user defined content to be transitioned)
|
|
706
|
-
return React__default.cloneElement(parent, {
|
|
707
|
-
children: props.children
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
737
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
});
|
|
714
|
-
}, null);
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
var css_248z$a = "/* Root ============================================================================== */\n.modal-root {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n --modal-spacing: 1.75rem;\n --button-min-width: 5rem; }\n\n/* Modal ============================================================================== */\n.modal {\n position: relative;\n background: #fff;\n z-index: 1002;\n box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.2);\n border-radius: 4px; }\n\n@media (max-width: 639px) {\n .modal {\n width: 90%;\n max-height: 90%; } }\n\n@media (min-width: 640px) {\n .modal {\n margin: 1rem;\n max-height: 80%;\n width: 600px; } }\n\n@media (min-width: 1024px) {\n .modal {\n width: 65ch; } }\n\n/* Modal Container =========================================================================== */\n.modal-container {\n display: flex;\n flex-direction: column;\n height: 100%; }\n\n/* Modal Actions ============================================================================== */\n.modal-actions {\n text-align: right;\n margin: var(--modal-spacing);\n flex: 0 0 auto; }\n\n.modal-actions button {\n min-width: var(--button-min-width); }\n\n@media (max-width: 639px) {\n .modal-actions button + button {\n margin-top: 0.5rem; }\n .modal-actions button {\n display: block;\n width: 100%; } }\n\n@media (min-width: 640px) {\n .modal-actions > button {\n margin-right: 0; }\n .modal-actions > button + button {\n margin-left: 0.5rem; } }\n\n/* Modal Title ============================================================================ */\n.modal-title {\n font-size: var(--fs-xl);\n padding: 1rem var(--modal-spacing);\n margin-right: 40px;\n /* close icon spacing */\n flex: 0 0 auto; }\n\n/* Modal Background ======================================================================= */\n.modal-background {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001; }\n\n/* Modal Close Icon ======================================================================= */\n.modal-close {\n position: absolute;\n top: 1rem;\n right: 1rem; }\n";
|
|
718
|
-
styleInject(css_248z$a);
|
|
719
|
-
|
|
720
|
-
/**
|
|
721
|
-
* Modal - Main Component
|
|
722
|
-
*/
|
|
723
|
-
|
|
724
|
-
var TRANSITION_INIT = 0;
|
|
725
|
-
var TRANSITION_VISIBLE = 1;
|
|
726
|
-
var TRANSITION_HIDDEN = 2;
|
|
727
|
-
var GoAModal = function GoAModal(_ref) {
|
|
728
|
-
var children = _ref.children,
|
|
729
|
-
isOpen = _ref.isOpen,
|
|
730
|
-
onClose = _ref.onClose,
|
|
731
|
-
testId = _ref.testId,
|
|
732
|
-
backgroundTestId = _ref.backgroundTestId;
|
|
733
|
-
|
|
734
|
-
var _useState = React.useState(TRANSITION_INIT),
|
|
735
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
736
|
-
transitionIndex = _useState2[0],
|
|
737
|
-
setTransitionIndex = _useState2[1];
|
|
738
|
-
|
|
739
|
-
React.useEffect(function () {
|
|
740
|
-
if (isOpen) {
|
|
741
|
-
show();
|
|
742
|
-
} else if (transitionIndex !== 0) {
|
|
743
|
-
// don't hide() on the when in the init state
|
|
744
|
-
hide();
|
|
745
|
-
return;
|
|
738
|
+
function getState() {
|
|
739
|
+
return ['init', 'visible', 'hidden'][transitionIndex];
|
|
746
740
|
}
|
|
747
741
|
|
|
748
|
-
|
|
749
|
-
|
|
742
|
+
return jsxRuntime.jsx(GoATransitionSequence, __assign({
|
|
743
|
+
transitions: ['fade-in', 'fade-out'],
|
|
744
|
+
transitionIndex: transitionIndex,
|
|
745
|
+
onTransitionComplete: function (_index, done) {
|
|
746
|
+
return done && setTransitionIndex(0);
|
|
747
|
+
}
|
|
748
|
+
}, {
|
|
749
|
+
children: jsxRuntime.jsxs("div", __assign({
|
|
750
|
+
className: "modal-root",
|
|
751
|
+
"data-testid": testId,
|
|
752
|
+
"data-state": getState()
|
|
753
|
+
}, {
|
|
754
|
+
children: [jsxRuntime.jsx(Container, __assign({
|
|
755
|
+
onClick: onClose
|
|
756
|
+
}, {
|
|
757
|
+
children: children
|
|
758
|
+
}), void 0), jsxRuntime.jsx(Background, {
|
|
759
|
+
onClick: function () {
|
|
760
|
+
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
761
|
+
},
|
|
762
|
+
testId: backgroundTestId
|
|
763
|
+
}, void 0)]
|
|
764
|
+
}), void 0)
|
|
765
|
+
}), void 0);
|
|
766
|
+
};
|
|
767
|
+
// Public Child Components
|
|
768
|
+
// ******************************************************************************
|
|
769
|
+
// ***************
|
|
770
|
+
// GoAModalActions
|
|
771
|
+
// ***************
|
|
772
|
+
|
|
773
|
+
var GoAModalActions = function GoAModalActions(_a) {
|
|
774
|
+
var children = _a.children;
|
|
775
|
+
return jsxRuntime.jsx("div", __assign({
|
|
776
|
+
className: "modal-actions"
|
|
777
|
+
}, {
|
|
778
|
+
children: children
|
|
779
|
+
}), void 0);
|
|
780
|
+
};
|
|
781
|
+
var GoAModalContent = function GoAModalContent(_a) {
|
|
782
|
+
var disableScroll = _a.disableScroll,
|
|
783
|
+
children = _a.children,
|
|
784
|
+
testId = _a.testId;
|
|
785
|
+
|
|
786
|
+
if (disableScroll) {
|
|
787
|
+
return jsxRuntime.jsx("div", __assign({
|
|
788
|
+
"data-testid": testId,
|
|
789
|
+
style: {
|
|
790
|
+
padding: "0 1.75rem"
|
|
791
|
+
}
|
|
792
|
+
}, {
|
|
793
|
+
children: children
|
|
794
|
+
}), void 0);
|
|
750
795
|
}
|
|
751
|
-
}, [isOpen]);
|
|
752
796
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
797
|
+
return jsxRuntime.jsx(GoAScrollable, __assign({
|
|
798
|
+
testId: testId,
|
|
799
|
+
vertical: true,
|
|
800
|
+
hPadding: 1.75
|
|
801
|
+
}, {
|
|
802
|
+
children: children
|
|
803
|
+
}), void 0);
|
|
804
|
+
}; // *************
|
|
805
|
+
// GoAModalTitle
|
|
806
|
+
// *************
|
|
807
|
+
|
|
808
|
+
var GoAModalTitle = function GoAModalTitle(_a) {
|
|
809
|
+
var children = _a.children,
|
|
810
|
+
testId = _a.testId;
|
|
811
|
+
return jsxRuntime.jsx("div", __assign({
|
|
812
|
+
"data-testid": testId,
|
|
813
|
+
className: "modal-title"
|
|
814
|
+
}, {
|
|
815
|
+
children: children
|
|
816
|
+
}), void 0);
|
|
817
|
+
};
|
|
758
818
|
|
|
759
|
-
function
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
},
|
|
765
|
-
|
|
819
|
+
var Container = function Container(_a) {
|
|
820
|
+
var children = _a.children,
|
|
821
|
+
onClick = _a.onClick;
|
|
822
|
+
return jsxRuntime.jsxs("div", __assign({
|
|
823
|
+
className: "modal"
|
|
824
|
+
}, {
|
|
825
|
+
children: [onClick && jsxRuntime.jsx("div", __assign({
|
|
826
|
+
className: "modal-close"
|
|
827
|
+
}, {
|
|
828
|
+
children: jsxRuntime.jsx(GoAIconButton, {
|
|
829
|
+
type: 'close',
|
|
830
|
+
onClick: onClick
|
|
831
|
+
}, void 0)
|
|
832
|
+
}), void 0), jsxRuntime.jsx("div", __assign({
|
|
833
|
+
className: "modal-container"
|
|
834
|
+
}, {
|
|
835
|
+
children: children
|
|
836
|
+
}), void 0), onClick && jsxRuntime.jsx("div", {
|
|
837
|
+
style: {
|
|
838
|
+
minHeight: '1.75rem'
|
|
839
|
+
}
|
|
840
|
+
}, void 0)]
|
|
841
|
+
}), void 0);
|
|
842
|
+
};
|
|
766
843
|
|
|
767
|
-
function
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
844
|
+
var Background = function Background(_a) {
|
|
845
|
+
var onClick = _a.onClick,
|
|
846
|
+
testId = _a.testId;
|
|
847
|
+
return jsxRuntime.jsx("div", {
|
|
848
|
+
className: "modal-background",
|
|
849
|
+
onClick: onClick,
|
|
850
|
+
"data-testid": testId
|
|
851
|
+
}, void 0);
|
|
852
|
+
}; // *******
|
|
853
|
+
// Helpers
|
|
854
|
+
// *******
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Based on the an invisible container and the window width it calculates the scrollbar width
|
|
858
|
+
*/
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
function calculateScrollbarWidth() {
|
|
862
|
+
// no scrollbars present
|
|
863
|
+
if (document.body.clientHeight <= document.documentElement.clientHeight) {
|
|
864
|
+
return 0;
|
|
865
|
+
}
|
|
771
866
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
867
|
+
var outer = document.createElement('div');
|
|
868
|
+
outer.style.visibility = 'hidden';
|
|
869
|
+
outer.style.overflow = 'scroll';
|
|
870
|
+
document.body.appendChild(outer); // Creating inner element and placing it in the container
|
|
776
871
|
|
|
872
|
+
var inner = document.createElement('div');
|
|
873
|
+
outer.appendChild(inner); // Calculating difference between container's full width and the child width
|
|
777
874
|
|
|
778
|
-
|
|
779
|
-
return ['init', 'visible', 'hidden'][transitionIndex];
|
|
780
|
-
}
|
|
875
|
+
var scrollbarWidth = outer.offsetWidth - inner.offsetWidth; // Removing temporary elements from the DOM
|
|
781
876
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
transitionIndex: transitionIndex,
|
|
785
|
-
onTransitionComplete: function onTransitionComplete(_index, done) {
|
|
786
|
-
return done && setTransitionIndex(0);
|
|
787
|
-
}
|
|
788
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
789
|
-
className: "modal-root",
|
|
790
|
-
"data-testid": testId,
|
|
791
|
-
"data-state": getState()
|
|
792
|
-
}, /*#__PURE__*/React__default.createElement(Container, {
|
|
793
|
-
onClick: onClose
|
|
794
|
-
}, children), /*#__PURE__*/React__default.createElement(Background, {
|
|
795
|
-
onClick: function onClick() {
|
|
796
|
-
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
797
|
-
},
|
|
798
|
-
testId: backgroundTestId
|
|
799
|
-
})));
|
|
800
|
-
};
|
|
801
|
-
// Public Child Components
|
|
802
|
-
// ******************************************************************************
|
|
803
|
-
// ***************
|
|
804
|
-
// GoAModalActions
|
|
805
|
-
// ***************
|
|
806
|
-
|
|
807
|
-
var GoAModalActions = function GoAModalActions(_ref2) {
|
|
808
|
-
var children = _ref2.children;
|
|
809
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
810
|
-
className: "modal-actions"
|
|
811
|
-
}, children);
|
|
812
|
-
}; // ***************
|
|
813
|
-
// GoAModalContent
|
|
814
|
-
// ***************
|
|
815
|
-
|
|
816
|
-
var GoAModalContent = function GoAModalContent(_ref3) {
|
|
817
|
-
var disableScroll = _ref3.disableScroll,
|
|
818
|
-
children = _ref3.children,
|
|
819
|
-
testId = _ref3.testId;
|
|
820
|
-
|
|
821
|
-
if (disableScroll) {
|
|
822
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
823
|
-
"data-testid": testId,
|
|
824
|
-
style: {
|
|
825
|
-
padding: "0 1.75rem"
|
|
826
|
-
}
|
|
827
|
-
}, children);
|
|
877
|
+
outer.parentNode.removeChild(outer);
|
|
878
|
+
return scrollbarWidth;
|
|
828
879
|
}
|
|
829
880
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
// Container - Contains all the content items
|
|
851
|
-
// ******************************************
|
|
852
|
-
|
|
853
|
-
var Container = function Container(_ref5) {
|
|
854
|
-
var children = _ref5.children,
|
|
855
|
-
onClick = _ref5.onClick;
|
|
856
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
857
|
-
className: "modal"
|
|
858
|
-
}, onClick && /*#__PURE__*/React__default.createElement("div", {
|
|
859
|
-
className: "modal-close"
|
|
860
|
-
}, /*#__PURE__*/React__default.createElement(GoAIconButton, {
|
|
861
|
-
type: "close",
|
|
862
|
-
onClick: onClick
|
|
863
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
864
|
-
className: "modal-container"
|
|
865
|
-
}, children), onClick && /*#__PURE__*/React__default.createElement("div", {
|
|
866
|
-
style: {
|
|
867
|
-
minHeight: '1.75rem'
|
|
868
|
-
}
|
|
869
|
-
}));
|
|
870
|
-
}; // ****************
|
|
871
|
-
// Background
|
|
872
|
-
// ****************
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
var Background = function Background(_ref6) {
|
|
876
|
-
var onClick = _ref6.onClick,
|
|
877
|
-
testId = _ref6.testId;
|
|
878
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
879
|
-
className: "modal-background",
|
|
880
|
-
onClick: onClick,
|
|
881
|
-
"data-testid": testId
|
|
882
|
-
});
|
|
883
|
-
}; // *******
|
|
884
|
-
// Helpers
|
|
885
|
-
// *******
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* Based on the an invisible container and the window width it calculates the scrollbar width
|
|
889
|
-
*/
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
function calculateScrollbarWidth() {
|
|
893
|
-
// no scrollbars present
|
|
894
|
-
if (document.body.clientHeight <= document.documentElement.clientHeight) {
|
|
895
|
-
return 0;
|
|
896
|
-
}
|
|
881
|
+
var css_248z = ":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\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\n/* Forms */\n.goa-textarea {\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: block;\n width: 100%;\n}\n.goa-textarea:hover {\n border-color: var(--color-blue-600);\n}\n.goa-textarea:active, .goa-textarea:focus, .goa-textarea:focus-within {\n box-shadow: 0 0 0 3px var(--color-orange);\n}\n.goa-textarea:disabled {\n border-color: var(--color-gray-500);\n}\n.goa-textarea:disabled:hover {\n border-color: var(--color-gray-500);\n}\n.goa-textarea:disabled:focus {\n box-shadow: none;\n}\n\n.goa-state--error textarea,\n.goa-state--error textarea:hover {\n border: 2px solid var(--color-red);\n}";
|
|
882
|
+
styleInject(css_248z);
|
|
883
|
+
|
|
884
|
+
var GoATextArea = function GoATextArea(_a) {
|
|
885
|
+
var id = _a.id,
|
|
886
|
+
name = _a.name,
|
|
887
|
+
value = _a.value,
|
|
888
|
+
placeholder = _a.placeholder,
|
|
889
|
+
onChange = _a.onChange;
|
|
890
|
+
return jsxRuntime.jsx("textarea", {
|
|
891
|
+
id: id,
|
|
892
|
+
name: name,
|
|
893
|
+
className: "goa-textarea",
|
|
894
|
+
placeholder: placeholder,
|
|
895
|
+
onChange: function (e) {
|
|
896
|
+
return onChange(name, e.target.value);
|
|
897
|
+
},
|
|
898
|
+
value: value
|
|
899
|
+
}, void 0);
|
|
900
|
+
};
|
|
897
901
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
exports.GoAFlexRow = GoAFlexRow;
|
|
939
|
-
exports.GoAForm = GoAForm;
|
|
940
|
-
exports.GoAFormActions = GoAFormActions;
|
|
941
|
-
exports.GoAFormItem = GoAFormItem;
|
|
942
|
-
exports.GoAIcon = GoAIcon;
|
|
943
|
-
exports.GoAIconButton = GoAIconButton;
|
|
944
|
-
exports.GoAInfoBadge = GoAInfoBadge;
|
|
945
|
-
exports.GoAInput = GoAInput;
|
|
946
|
-
exports.GoAInputDate = GoAInputDate;
|
|
947
|
-
exports.GoAInputDateTime = GoAInputDateTime;
|
|
948
|
-
exports.GoAInputEmail = GoAInputEmail;
|
|
949
|
-
exports.GoAInputFile = GoAInputFile;
|
|
950
|
-
exports.GoAInputMonth = GoAInputMonth;
|
|
951
|
-
exports.GoAInputNumber = GoAInputNumber;
|
|
952
|
-
exports.GoAInputPassword = GoAInputPassword;
|
|
953
|
-
exports.GoAInputRange = GoAInputRange;
|
|
954
|
-
exports.GoAInputSearch = GoAInputSearch;
|
|
955
|
-
exports.GoAInputTel = GoAInputTel;
|
|
956
|
-
exports.GoAInputText = GoAInputText;
|
|
957
|
-
exports.GoAInputTime = GoAInputTime;
|
|
958
|
-
exports.GoAInputUrl = GoAInputUrl;
|
|
959
|
-
exports.GoAModal = GoAModal;
|
|
960
|
-
exports.GoAModalActions = GoAModalActions;
|
|
961
|
-
exports.GoAModalContent = GoAModalContent;
|
|
962
|
-
exports.GoAModalTitle = GoAModalTitle;
|
|
963
|
-
exports.GoAScrollable = GoAScrollable;
|
|
964
|
-
exports.GoASuccessBadge = GoASuccessBadge;
|
|
965
|
-
exports.GoATextArea = GoATextArea;
|
|
966
|
-
exports.GoATransition = GoATransition;
|
|
967
|
-
exports.GoATransitionSequence = GoATransitionSequence;
|
|
968
|
-
exports.GoAWarningBadge = GoAWarningBadge;
|
|
969
|
-
|
|
970
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
971
|
-
|
|
972
|
-
})));
|
|
902
|
+
exports.GoAAppVersionHeader = GoAAppVersionHeader;
|
|
903
|
+
exports.GoABadge = GoABadge;
|
|
904
|
+
exports.GoAButton = GoAButton;
|
|
905
|
+
exports.GoACard = GoACard;
|
|
906
|
+
exports.GoAEmergencyBadge = GoAEmergencyBadge;
|
|
907
|
+
exports.GoAFlexRow = GoAFlexRow;
|
|
908
|
+
exports.GoAForm = GoAForm;
|
|
909
|
+
exports.GoAFormActions = GoAFormActions;
|
|
910
|
+
exports.GoAFormItem = GoAFormItem;
|
|
911
|
+
exports.GoAIcon = GoAIcon;
|
|
912
|
+
exports.GoAIconButton = GoAIconButton;
|
|
913
|
+
exports.GoAInfoBadge = GoAInfoBadge;
|
|
914
|
+
exports.GoAInput = GoAInput;
|
|
915
|
+
exports.GoAInputDate = GoAInputDate;
|
|
916
|
+
exports.GoAInputDateTime = GoAInputDateTime;
|
|
917
|
+
exports.GoAInputEmail = GoAInputEmail;
|
|
918
|
+
exports.GoAInputFile = GoAInputFile;
|
|
919
|
+
exports.GoAInputMonth = GoAInputMonth;
|
|
920
|
+
exports.GoAInputNumber = GoAInputNumber;
|
|
921
|
+
exports.GoAInputPassword = GoAInputPassword;
|
|
922
|
+
exports.GoAInputRange = GoAInputRange;
|
|
923
|
+
exports.GoAInputSearch = GoAInputSearch;
|
|
924
|
+
exports.GoAInputTel = GoAInputTel;
|
|
925
|
+
exports.GoAInputText = GoAInputText;
|
|
926
|
+
exports.GoAInputTime = GoAInputTime;
|
|
927
|
+
exports.GoAInputUrl = GoAInputUrl;
|
|
928
|
+
exports.GoAModal = GoAModal;
|
|
929
|
+
exports.GoAModalActions = GoAModalActions;
|
|
930
|
+
exports.GoAModalContent = GoAModalContent;
|
|
931
|
+
exports.GoAModalTitle = GoAModalTitle;
|
|
932
|
+
exports.GoAScrollable = GoAScrollable;
|
|
933
|
+
exports.GoASuccessBadge = GoASuccessBadge;
|
|
934
|
+
exports.GoATextArea = GoATextArea;
|
|
935
|
+
exports.GoATransition = GoATransition;
|
|
936
|
+
exports.GoATransitionSequence = GoATransitionSequence;
|
|
937
|
+
exports.GoAWarningBadge = GoAWarningBadge;
|
|
938
|
+
|
|
939
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
940
|
+
|
|
941
|
+
}));
|