@abgov/react-components 3.4.0-alpha.4 → 3.4.0-alpha.40
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/README.md +48 -6
- package/index.d.ts +5 -4
- package/lib/app-header/app-header.d.ts +2 -2
- package/lib/badge/badge.d.ts +0 -1
- package/lib/button/button.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +2 -2
- package/lib/container/container.d.ts +3 -3
- package/lib/flex/index.d.ts +1 -1
- package/lib/flex/row.d.ts +0 -1
- package/lib/form/form-item.d.ts +0 -2
- package/lib/form/index.d.ts +1 -1
- package/lib/input/input.d.ts +4 -1
- package/lib/{service-level-header/service-level-header.d.ts → microsite-header/microsite-header.d.ts} +7 -3
- package/lib/modal/modal.d.ts +8 -6
- package/lib/page-block/page-block.d.ts +9 -0
- package/lib/radio-group/radio-group.d.ts +3 -0
- package/lib/radio-group/radio.d.ts +2 -2
- package/lib/spinner/spinner.d.ts +10 -8
- package/lib/textarea/textarea.d.ts +5 -2
- package/package.json +2 -6
- package/react-components.esm.js +104 -99
- package/react-components.umd.js +112 -108
- package/lib/hero-banner/hero-banner-content.d.ts +0 -4
package/README.md
CHANGED
|
@@ -2,16 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
This library contains react components from the Government of Alberta.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Create react app
|
|
6
|
+
```bash
|
|
7
|
+
npm init vite@latest
|
|
8
|
+
```
|
|
6
9
|
|
|
10
|
+
Add Dependencies
|
|
7
11
|
```bash
|
|
8
|
-
npm
|
|
12
|
+
npm i
|
|
13
|
+
npm i @abgov/react-components@3.4.0-alpha.7
|
|
14
|
+
npm i @abgov/styles
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
Link ionicons in app/index.html
|
|
18
|
+
```html
|
|
19
|
+
<!DOCTYPE html>
|
|
20
|
+
<html lang="en">
|
|
21
|
+
<head>
|
|
22
|
+
<meta charset="UTF-8" />
|
|
23
|
+
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
|
24
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
25
|
+
<title>Vite App</title>
|
|
26
|
+
<!-- Ionicons -->
|
|
27
|
+
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
|
|
28
|
+
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
|
|
29
|
+
<!-- -->
|
|
30
|
+
</head>
|
|
31
|
+
<body>
|
|
32
|
+
<div id="root"></div>
|
|
33
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
36
|
+
|
|
37
|
+
```
|
|
12
38
|
|
|
13
|
-
|
|
39
|
+
```typescript
|
|
40
|
+
// App.tsx
|
|
41
|
+
import './App.css'
|
|
14
42
|
|
|
15
|
-
|
|
16
|
-
|
|
43
|
+
import { GoABadge } from '@abgov/react-components';
|
|
44
|
+
|
|
45
|
+
function App() {
|
|
46
|
+
return (
|
|
47
|
+
<GoABadge type="information" content="Some info" icon={true} />
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default App
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Import the styles in the `src/index.css` file
|
|
57
|
+
```css
|
|
58
|
+
@import '@abgov/styles/styles.esm.css';
|
|
17
59
|
```
|
package/index.d.ts
CHANGED
|
@@ -13,18 +13,19 @@ import { GoADropdown, GoADropdownOption } from './lib/dropdown/dropdown';
|
|
|
13
13
|
import { GoAFlexRow } from './lib/flex';
|
|
14
14
|
import { GoAFormItem } from './lib/form';
|
|
15
15
|
import { GoAHeroBanner } from './lib/hero-banner/hero-banner';
|
|
16
|
-
import { GoAHeroBannerContent } from './lib/hero-banner/hero-banner-content';
|
|
17
16
|
import { GoAHeroBannerActions } from './lib/hero-banner/hero-banner-actions';
|
|
18
17
|
import { GoAIcon, GoAIconButton } from './lib/icons';
|
|
19
18
|
import { GoAInput, GoAInputText, GoAInputPassword, GoAInputDate, GoAInputTime, GoAInputDateTime, GoAInputEmail, GoAInputSearch, GoAInputUrl, GoAInputTel, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputRange } from './lib/input/input';
|
|
20
19
|
import { GoAModal } from './lib/modal/modal';
|
|
21
20
|
import { GoANotification } from './lib/notification/notification';
|
|
21
|
+
import { GoAPageBlock } from './lib/page-block/page-block';
|
|
22
22
|
import { GoAPageLoader } from './lib/page-loader/page-loader';
|
|
23
|
-
import { GoARadioGroup,
|
|
24
|
-
import {
|
|
23
|
+
import { GoARadioGroup, GoARadioItem } from './lib/radio-group/radio-group';
|
|
24
|
+
import { GoAMicrositeHeader } from './lib/microsite-header/microsite-header';
|
|
25
25
|
import { GoATextArea } from './lib/textarea/textarea';
|
|
26
|
+
import { GoASpinner } from './lib/spinner/spinner';
|
|
26
27
|
import type { GoAIconType } from './lib/icons';
|
|
27
28
|
import type { GoABadgeType } from './lib/badge/badge';
|
|
28
29
|
export type { GoAIconType };
|
|
29
30
|
export type { GoABadgeType };
|
|
30
|
-
export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner,
|
|
31
|
+
export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAModal, GoANotification, GoAPageBlock, GoAPageLoader, GoARadioItem, GoARadioGroup, GoAMicrositeHeader, GoASuccessBadge, GoASpinner, GoATextArea, GoAWarningBadge, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
interface WCProps {
|
|
3
3
|
title: string;
|
|
4
|
-
url
|
|
4
|
+
url?: string;
|
|
5
5
|
}
|
|
6
6
|
declare global {
|
|
7
7
|
namespace JSX {
|
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
}
|
|
13
13
|
interface Props {
|
|
14
14
|
title: string;
|
|
15
|
-
url
|
|
15
|
+
url?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare const GoAAppHeader: FC<Props>;
|
|
18
18
|
export default GoAAppHeader;
|
package/lib/badge/badge.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { GoAIconType } from '../icons';
|
|
3
|
-
import './badge.scss';
|
|
4
3
|
export declare type GoABadgeType = 'information' | 'success' | 'warning' | 'emergency' | 'dark' | 'midtone' | 'light' | 'inactive';
|
|
5
4
|
interface GoABadgeProps {
|
|
6
5
|
type: GoABadgeType;
|
package/lib/button/button.d.ts
CHANGED
|
@@ -8,19 +8,19 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
interface CheckboxProps {
|
|
10
10
|
ref: React.RefObject<HTMLElement>;
|
|
11
|
+
id?: string;
|
|
11
12
|
name: string;
|
|
12
13
|
checked?: boolean;
|
|
13
14
|
disabled?: boolean;
|
|
14
|
-
indeterminate?: boolean;
|
|
15
15
|
error?: boolean;
|
|
16
16
|
text?: string;
|
|
17
17
|
value?: string | number | boolean;
|
|
18
18
|
}
|
|
19
19
|
export interface Props {
|
|
20
|
+
id?: string;
|
|
20
21
|
name: string;
|
|
21
22
|
checked?: boolean;
|
|
22
23
|
disabled?: boolean;
|
|
23
|
-
indeterminate?: boolean;
|
|
24
24
|
error?: boolean;
|
|
25
25
|
text?: string;
|
|
26
26
|
value?: string | number | boolean;
|
|
@@ -14,9 +14,9 @@ declare global {
|
|
|
14
14
|
}
|
|
15
15
|
interface Props {
|
|
16
16
|
headingSize: HeadingSize;
|
|
17
|
-
variant
|
|
18
|
-
title
|
|
19
|
-
actions
|
|
17
|
+
variant?: ContainerVariant;
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
actions?: ReactNode;
|
|
20
20
|
children: ReactNode;
|
|
21
21
|
}
|
|
22
22
|
export declare const GoAContainer: FC<Props>;
|
package/lib/flex/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { GoAFlexRow } from './row';
|
package/lib/flex/row.d.ts
CHANGED
package/lib/form/form-item.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
interface WCProps {
|
|
3
|
-
name: string;
|
|
4
3
|
label: string;
|
|
5
4
|
optional?: boolean;
|
|
6
5
|
error?: string;
|
|
@@ -14,7 +13,6 @@ declare global {
|
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
interface GoAFormItemProps {
|
|
17
|
-
name: string;
|
|
18
16
|
label: string;
|
|
19
17
|
optional?: boolean;
|
|
20
18
|
error?: string;
|
package/lib/form/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { GoAFormItem } from './form-item';
|
package/lib/input/input.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ interface WCProps {
|
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
error?: string;
|
|
15
15
|
readonly?: boolean;
|
|
16
|
+
focused?: boolean;
|
|
16
17
|
handletrailingiconclick: boolean;
|
|
18
|
+
testid?: string;
|
|
17
19
|
}
|
|
18
20
|
declare global {
|
|
19
21
|
namespace JSX {
|
|
@@ -22,7 +24,7 @@ declare global {
|
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
interface Props {
|
|
27
|
+
export interface Props {
|
|
26
28
|
name: string;
|
|
27
29
|
value: string;
|
|
28
30
|
onChange: (name: string, value: string) => void;
|
|
@@ -36,6 +38,7 @@ interface Props {
|
|
|
36
38
|
focused?: boolean;
|
|
37
39
|
readonly?: boolean;
|
|
38
40
|
error?: string;
|
|
41
|
+
testId?: string;
|
|
39
42
|
}
|
|
40
43
|
export declare const GoAInput: FC<Props & {
|
|
41
44
|
type: string;
|
|
@@ -2,16 +2,20 @@ import React, { FC } from 'react';
|
|
|
2
2
|
declare global {
|
|
3
3
|
namespace JSX {
|
|
4
4
|
interface IntrinsicElements {
|
|
5
|
-
'goa-
|
|
5
|
+
'goa-microsite-header': WebComponentProps & React.HTMLAttributes<HTMLElement>;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
export declare type ServiceLevel = 'alpha' | 'beta' | 'live';
|
|
10
10
|
interface WebComponentProps {
|
|
11
11
|
level: ServiceLevel;
|
|
12
|
+
version?: string;
|
|
13
|
+
feedbackurl?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface HeaderProps {
|
|
14
16
|
level: ServiceLevel;
|
|
17
|
+
version?: string;
|
|
18
|
+
feedbackUrl?: string;
|
|
15
19
|
}
|
|
16
|
-
export declare const
|
|
17
|
-
export default
|
|
20
|
+
export declare const GoAMicrositeHeader: FC<HeaderProps>;
|
|
21
|
+
export default GoAMicrositeHeader;
|
package/lib/modal/modal.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
interface WCProps {
|
|
3
3
|
ref: React.RefObject<HTMLElement>;
|
|
4
|
-
title
|
|
5
|
-
closable: boolean;
|
|
6
|
-
scrollable: boolean;
|
|
4
|
+
title?: string;
|
|
7
5
|
open?: boolean;
|
|
6
|
+
width?: string;
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
scrollable?: boolean;
|
|
8
9
|
}
|
|
9
10
|
declare global {
|
|
10
11
|
namespace JSX {
|
|
@@ -14,10 +15,11 @@ declare global {
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
interface Props {
|
|
17
|
-
title
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
title?: string;
|
|
19
|
+
width?: string;
|
|
20
|
+
actions?: React.ReactElement;
|
|
20
21
|
onClose?: () => void;
|
|
22
|
+
open?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export declare const GoAModal: FC<Props>;
|
|
23
25
|
export default GoAModal;
|
|
@@ -5,6 +5,8 @@ interface RadioGroupProps {
|
|
|
5
5
|
name: string;
|
|
6
6
|
value?: string;
|
|
7
7
|
orientation: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
error: boolean;
|
|
8
10
|
}
|
|
9
11
|
declare global {
|
|
10
12
|
namespace JSX {
|
|
@@ -19,6 +21,7 @@ interface Props {
|
|
|
19
21
|
disabled?: boolean;
|
|
20
22
|
orientation?: 'horizontal' | 'vertical';
|
|
21
23
|
testId?: string;
|
|
24
|
+
error?: boolean;
|
|
22
25
|
onChange: (name: string, value: string) => void;
|
|
23
26
|
}
|
|
24
27
|
export declare const GoARadioGroup: FC<Props>;
|
package/lib/spinner/spinner.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type SpinnerType = "infinite" | "progress";
|
|
3
|
-
declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
|
|
2
|
+
export declare type SpinnerType = "infinite" | "progress";
|
|
3
|
+
export declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
|
|
4
4
|
interface WCProps {
|
|
5
5
|
size: SpinnerSize;
|
|
6
6
|
type: SpinnerType;
|
|
7
|
-
invert
|
|
8
|
-
progress
|
|
7
|
+
invert?: boolean;
|
|
8
|
+
progress?: number;
|
|
9
|
+
testid?: string;
|
|
9
10
|
}
|
|
10
11
|
declare global {
|
|
11
12
|
namespace JSX {
|
|
@@ -16,9 +17,10 @@ declare global {
|
|
|
16
17
|
}
|
|
17
18
|
export interface SpinnerProps {
|
|
18
19
|
type: SpinnerType;
|
|
19
|
-
size
|
|
20
|
-
invert
|
|
21
|
-
progress
|
|
20
|
+
size: SpinnerSize;
|
|
21
|
+
invert?: boolean;
|
|
22
|
+
progress?: number;
|
|
23
|
+
testId?: string;
|
|
22
24
|
}
|
|
23
|
-
export declare const GoASpinner: ({ type, size, progress, invert }: SpinnerProps) => JSX.Element;
|
|
25
|
+
export declare const GoASpinner: ({ type, size, progress, invert, testId }: SpinnerProps) => JSX.Element;
|
|
24
26
|
export default GoASpinner;
|
|
@@ -4,7 +4,8 @@ interface WCProps {
|
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
placeholder?: string;
|
|
7
|
-
rows
|
|
7
|
+
rows?: number;
|
|
8
|
+
error: boolean;
|
|
8
9
|
disabled: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare global {
|
|
@@ -19,8 +20,10 @@ interface Props {
|
|
|
19
20
|
value: string;
|
|
20
21
|
id?: string;
|
|
21
22
|
placeholder?: string;
|
|
22
|
-
rows
|
|
23
|
+
rows?: number;
|
|
24
|
+
error: boolean;
|
|
23
25
|
disabled: boolean;
|
|
26
|
+
testId: string;
|
|
24
27
|
onChange: (name: string, value: string) => void;
|
|
25
28
|
}
|
|
26
29
|
export declare const GoATextArea: FC<Props>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/react-components",
|
|
3
|
-
"version": "3.4.0-alpha.
|
|
3
|
+
"version": "3.4.0-alpha.40",
|
|
4
4
|
"description": "Government of Alberta - UI components for React",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"semantic-release": "semantic-release",
|
|
9
5
|
"bugs": {
|
|
10
6
|
"url": "https://github.com/GovAlta/ui-components/issues"
|
|
11
7
|
},
|
|
@@ -21,7 +17,7 @@
|
|
|
21
17
|
"directory": "libs/react-components"
|
|
22
18
|
},
|
|
23
19
|
"dependencies": {
|
|
24
|
-
"@abgov/web-components": "^0.0.
|
|
20
|
+
"@abgov/web-components": "^1.0.0-alpha.23"
|
|
25
21
|
},
|
|
26
22
|
"peerDependencies": {
|
|
27
23
|
"react": "^17.0.2",
|
package/react-components.esm.js
CHANGED
|
@@ -15,36 +15,6 @@ const GoAAppHeader = ({
|
|
|
15
15
|
}), void 0);
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
function styleInject(css, ref) {
|
|
19
|
-
if ( ref === void 0 ) ref = {};
|
|
20
|
-
var insertAt = ref.insertAt;
|
|
21
|
-
|
|
22
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
23
|
-
|
|
24
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
25
|
-
var style = document.createElement('style');
|
|
26
|
-
style.type = 'text/css';
|
|
27
|
-
|
|
28
|
-
if (insertAt === 'top') {
|
|
29
|
-
if (head.firstChild) {
|
|
30
|
-
head.insertBefore(style, head.firstChild);
|
|
31
|
-
} else {
|
|
32
|
-
head.appendChild(style);
|
|
33
|
-
}
|
|
34
|
-
} else {
|
|
35
|
-
head.appendChild(style);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (style.styleSheet) {
|
|
39
|
-
style.styleSheet.cssText = css;
|
|
40
|
-
} else {
|
|
41
|
-
style.appendChild(document.createTextNode(css));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var css_248z$3 = "goa-badge {\n margin-left: 0.25rem;\n}";
|
|
46
|
-
styleInject(css_248z$3);
|
|
47
|
-
|
|
48
18
|
const GoABadge = ({
|
|
49
19
|
type,
|
|
50
20
|
content,
|
|
@@ -103,8 +73,35 @@ const GoAEmergencyBadge = ({
|
|
|
103
73
|
}, void 0);
|
|
104
74
|
};
|
|
105
75
|
|
|
106
|
-
|
|
107
|
-
|
|
76
|
+
function styleInject(css, ref) {
|
|
77
|
+
if ( ref === void 0 ) ref = {};
|
|
78
|
+
var insertAt = ref.insertAt;
|
|
79
|
+
|
|
80
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
81
|
+
|
|
82
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
83
|
+
var style = document.createElement('style');
|
|
84
|
+
style.type = 'text/css';
|
|
85
|
+
|
|
86
|
+
if (insertAt === 'top') {
|
|
87
|
+
if (head.firstChild) {
|
|
88
|
+
head.insertBefore(style, head.firstChild);
|
|
89
|
+
} else {
|
|
90
|
+
head.appendChild(style);
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
head.appendChild(style);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (style.styleSheet) {
|
|
97
|
+
style.styleSheet.cssText = css;
|
|
98
|
+
} else {
|
|
99
|
+
style.appendChild(document.createTextNode(css));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var css_248z$1 = "goa-button + goa-button {\n margin-top: 1.5rem;\n}\n\n/* TODO: these margins need to match UI specs */\n@media (min-width: 480px) {\n goa-button + goa-button {\n margin-left: 1rem;\n }\n}\n";
|
|
104
|
+
styleInject(css_248z$1);
|
|
108
105
|
|
|
109
106
|
const GoAButton = ({
|
|
110
107
|
title,
|
|
@@ -124,7 +121,7 @@ const GoAButton = ({
|
|
|
124
121
|
const current = el.current;
|
|
125
122
|
|
|
126
123
|
const listener = e => {
|
|
127
|
-
onClick();
|
|
124
|
+
onClick(e);
|
|
128
125
|
};
|
|
129
126
|
|
|
130
127
|
current.addEventListener('_click', listener);
|
|
@@ -144,8 +141,8 @@ const GoAButton = ({
|
|
|
144
141
|
}), void 0);
|
|
145
142
|
};
|
|
146
143
|
|
|
147
|
-
var css_248z
|
|
148
|
-
styleInject(css_248z
|
|
144
|
+
var css_248z = "goa-button-group > goa-button ~ goa-button {\n margin: 0;\n margin-top: 0.25rem;\n}\n\n@media (min-width: 320px) {\n goa-button-group > goa-button ~ goa-button {\n margin: 0;\n /* margin-left: 0.25rem; */\n }\n}\n";
|
|
145
|
+
styleInject(css_248z);
|
|
149
146
|
|
|
150
147
|
const GoAButtonGroup = ({
|
|
151
148
|
alignment,
|
|
@@ -172,13 +169,13 @@ const GoACallout = ({
|
|
|
172
169
|
};
|
|
173
170
|
|
|
174
171
|
const GoACheckbox = ({
|
|
172
|
+
id,
|
|
175
173
|
name,
|
|
176
174
|
testId,
|
|
177
175
|
error,
|
|
178
176
|
disabled,
|
|
179
177
|
checked,
|
|
180
|
-
|
|
181
|
-
value: _value = true,
|
|
178
|
+
value,
|
|
182
179
|
text,
|
|
183
180
|
children,
|
|
184
181
|
onChange
|
|
@@ -203,13 +200,13 @@ const GoACheckbox = ({
|
|
|
203
200
|
return jsx("goa-checkbox", Object.assign({
|
|
204
201
|
"data-testid": testId,
|
|
205
202
|
ref: el,
|
|
203
|
+
id: id,
|
|
206
204
|
name: name,
|
|
207
205
|
error: error,
|
|
208
206
|
checked: checked,
|
|
209
207
|
disabled: disabled,
|
|
210
|
-
indeterminate: indeterminate,
|
|
211
208
|
text: text,
|
|
212
|
-
value:
|
|
209
|
+
value: value
|
|
213
210
|
}, {
|
|
214
211
|
children: children
|
|
215
212
|
}), void 0);
|
|
@@ -220,7 +217,7 @@ const GoAContainer = ({
|
|
|
220
217
|
title,
|
|
221
218
|
children,
|
|
222
219
|
actions,
|
|
223
|
-
variant: _variant = '
|
|
220
|
+
variant: _variant = 'default'
|
|
224
221
|
}) => {
|
|
225
222
|
return jsxs("goa-container", Object.assign({
|
|
226
223
|
variant: _variant,
|
|
@@ -287,9 +284,6 @@ const GoADropdown = props => {
|
|
|
287
284
|
}), void 0);
|
|
288
285
|
};
|
|
289
286
|
|
|
290
|
-
var css_248z = "";
|
|
291
|
-
styleInject(css_248z);
|
|
292
|
-
|
|
293
287
|
const GoAFlexRow = ({
|
|
294
288
|
gap,
|
|
295
289
|
minWidth,
|
|
@@ -321,22 +315,14 @@ const GoAFlexRow = ({
|
|
|
321
315
|
}), void 0);
|
|
322
316
|
};
|
|
323
317
|
|
|
324
|
-
var row = /*#__PURE__*/Object.freeze({
|
|
325
|
-
__proto__: null,
|
|
326
|
-
GoAFlexRow: GoAFlexRow,
|
|
327
|
-
'default': GoAFlexRow
|
|
328
|
-
});
|
|
329
|
-
|
|
330
318
|
const GoAFormItem = ({
|
|
331
319
|
children,
|
|
332
320
|
helpText,
|
|
333
321
|
error,
|
|
334
322
|
optional,
|
|
335
|
-
name,
|
|
336
323
|
label
|
|
337
324
|
}) => {
|
|
338
325
|
return jsx("goa-form-item", Object.assign({
|
|
339
|
-
name: name,
|
|
340
326
|
label: label,
|
|
341
327
|
error: error,
|
|
342
328
|
optional: optional,
|
|
@@ -346,12 +332,6 @@ const GoAFormItem = ({
|
|
|
346
332
|
}), void 0);
|
|
347
333
|
};
|
|
348
334
|
|
|
349
|
-
var formItem = /*#__PURE__*/Object.freeze({
|
|
350
|
-
__proto__: null,
|
|
351
|
-
GoAFormItem: GoAFormItem,
|
|
352
|
-
'default': GoAFormItem
|
|
353
|
-
});
|
|
354
|
-
|
|
355
335
|
const GoAHeroBanner = ({
|
|
356
336
|
title,
|
|
357
337
|
backgroundUrl,
|
|
@@ -365,16 +345,6 @@ const GoAHeroBanner = ({
|
|
|
365
345
|
}), void 0);
|
|
366
346
|
};
|
|
367
347
|
|
|
368
|
-
const GoAHeroBannerContent = ({
|
|
369
|
-
children
|
|
370
|
-
}) => {
|
|
371
|
-
return jsx("div", Object.assign({
|
|
372
|
-
slot: "content"
|
|
373
|
-
}, {
|
|
374
|
-
children: children
|
|
375
|
-
}), void 0);
|
|
376
|
-
};
|
|
377
|
-
|
|
378
348
|
const GoAHeroBannerActions = ({
|
|
379
349
|
children
|
|
380
350
|
}) => {
|
|
@@ -475,6 +445,7 @@ const GoAInput = ({
|
|
|
475
445
|
value,
|
|
476
446
|
placeholder,
|
|
477
447
|
error,
|
|
448
|
+
testId,
|
|
478
449
|
onTrailingIconClick,
|
|
479
450
|
onChange
|
|
480
451
|
}) => {
|
|
@@ -490,32 +461,24 @@ const GoAInput = ({
|
|
|
490
461
|
const {
|
|
491
462
|
name,
|
|
492
463
|
value
|
|
493
|
-
} = e.detail
|
|
464
|
+
} = e.detail;
|
|
494
465
|
onChange(name, value);
|
|
495
|
-
};
|
|
496
|
-
|
|
466
|
+
};
|
|
497
467
|
|
|
498
468
|
const clickListener = e => {
|
|
499
469
|
onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
|
|
500
470
|
};
|
|
501
471
|
|
|
502
|
-
current.addEventListener('_change', changeListener);
|
|
503
|
-
|
|
504
|
-
current.addEventListener('_ontrailingiconclick', clickListener);
|
|
472
|
+
current.addEventListener('_change', changeListener);
|
|
473
|
+
current.addEventListener('_trailingIconClick', clickListener);
|
|
505
474
|
return () => {
|
|
506
475
|
current.removeEventListener('_change', changeListener);
|
|
507
|
-
current.removeEventListener('
|
|
476
|
+
current.removeEventListener('_trailingIconClick', clickListener);
|
|
508
477
|
};
|
|
509
|
-
}, [ref, onChange, onTrailingIconClick]);
|
|
510
|
-
// if (focused) {
|
|
511
|
-
// inputRef.current?.focus();
|
|
512
|
-
// } else {
|
|
513
|
-
// inputRef.current?.blur();
|
|
514
|
-
// }
|
|
515
|
-
// }, [focused, inputRef]);
|
|
516
|
-
|
|
478
|
+
}, [ref, onChange, onTrailingIconClick]);
|
|
517
479
|
return jsx("goa-input", {
|
|
518
480
|
ref: ref,
|
|
481
|
+
focused: focused,
|
|
519
482
|
type: type,
|
|
520
483
|
name: name,
|
|
521
484
|
id: id,
|
|
@@ -526,6 +489,7 @@ const GoAInput = ({
|
|
|
526
489
|
readonly: readonly,
|
|
527
490
|
placeholder: placeholder,
|
|
528
491
|
error: error,
|
|
492
|
+
"data-testid": testId,
|
|
529
493
|
value: value,
|
|
530
494
|
handletrailingiconclick: !!onTrailingIconClick
|
|
531
495
|
}, void 0);
|
|
@@ -600,9 +564,8 @@ const GoAInputNumber = props => {
|
|
|
600
564
|
const GoAInputRange = _a => {
|
|
601
565
|
var props = __rest(_a, ["step"]);
|
|
602
566
|
|
|
603
|
-
return jsx(
|
|
604
|
-
type: "range"
|
|
605
|
-
onChange: e => props.onChange(e.target.name, e.target.value)
|
|
567
|
+
return jsx(GoAInput, Object.assign({}, props, {
|
|
568
|
+
type: "range"
|
|
606
569
|
}), void 0);
|
|
607
570
|
};
|
|
608
571
|
|
|
@@ -610,7 +573,8 @@ const GoAModal = ({
|
|
|
610
573
|
title,
|
|
611
574
|
children,
|
|
612
575
|
open,
|
|
613
|
-
|
|
576
|
+
width,
|
|
577
|
+
actions,
|
|
614
578
|
onClose
|
|
615
579
|
}) => {
|
|
616
580
|
const el = useRef(null);
|
|
@@ -630,14 +594,19 @@ const GoAModal = ({
|
|
|
630
594
|
current.removeEventListener('_close', listener);
|
|
631
595
|
};
|
|
632
596
|
}, [el, onClose]);
|
|
633
|
-
return
|
|
597
|
+
return jsxs("goa-modal", Object.assign({
|
|
634
598
|
ref: el,
|
|
635
599
|
title: title,
|
|
636
600
|
open: open,
|
|
637
|
-
closable:
|
|
638
|
-
scrollable: true
|
|
601
|
+
closable: !!onClose,
|
|
602
|
+
scrollable: true,
|
|
603
|
+
width: width
|
|
639
604
|
}, {
|
|
640
|
-
children:
|
|
605
|
+
children: [actions && jsx("div", Object.assign({
|
|
606
|
+
slot: "actions"
|
|
607
|
+
}, {
|
|
608
|
+
children: actions
|
|
609
|
+
}), void 0), children]
|
|
641
610
|
}), void 0);
|
|
642
611
|
};
|
|
643
612
|
|
|
@@ -652,6 +621,14 @@ const GoANotification = ({
|
|
|
652
621
|
}), void 0);
|
|
653
622
|
};
|
|
654
623
|
|
|
624
|
+
const GoAPageBlock = ({
|
|
625
|
+
children
|
|
626
|
+
}) => {
|
|
627
|
+
return jsx("goa-page-block", {
|
|
628
|
+
children: children
|
|
629
|
+
}, void 0);
|
|
630
|
+
};
|
|
631
|
+
|
|
655
632
|
const GoAPageLoader = ({
|
|
656
633
|
type,
|
|
657
634
|
visible,
|
|
@@ -668,7 +645,7 @@ const GoAPageLoader = ({
|
|
|
668
645
|
}, void 0);
|
|
669
646
|
};
|
|
670
647
|
|
|
671
|
-
const
|
|
648
|
+
const GoARadioItem = ({
|
|
672
649
|
name,
|
|
673
650
|
label,
|
|
674
651
|
value,
|
|
@@ -696,6 +673,8 @@ const GoARadioGroup = ({
|
|
|
696
673
|
value,
|
|
697
674
|
children,
|
|
698
675
|
orientation: _orientation = 'vertical',
|
|
676
|
+
disabled: _disabled = false,
|
|
677
|
+
error: _error = false,
|
|
699
678
|
testId,
|
|
700
679
|
onChange
|
|
701
680
|
}) => {
|
|
@@ -720,17 +699,23 @@ const GoARadioGroup = ({
|
|
|
720
699
|
ref: el,
|
|
721
700
|
name: name,
|
|
722
701
|
value: value,
|
|
723
|
-
orientation: _orientation
|
|
702
|
+
orientation: _orientation,
|
|
703
|
+
disabled: _disabled,
|
|
704
|
+
error: _error
|
|
724
705
|
}, {
|
|
725
706
|
children: children
|
|
726
707
|
}), void 0);
|
|
727
708
|
};
|
|
728
709
|
|
|
729
|
-
const
|
|
730
|
-
level
|
|
710
|
+
const GoAMicrositeHeader = ({
|
|
711
|
+
level,
|
|
712
|
+
version,
|
|
713
|
+
feedbackUrl
|
|
731
714
|
}) => {
|
|
732
|
-
return jsx("goa-
|
|
733
|
-
level: level
|
|
715
|
+
return jsx("goa-microsite-header", {
|
|
716
|
+
level: level,
|
|
717
|
+
version: version,
|
|
718
|
+
feedbackurl: feedbackUrl
|
|
734
719
|
}, void 0);
|
|
735
720
|
};
|
|
736
721
|
|
|
@@ -740,6 +725,8 @@ const GoATextArea = ({
|
|
|
740
725
|
placeholder,
|
|
741
726
|
rows,
|
|
742
727
|
disabled,
|
|
728
|
+
testId,
|
|
729
|
+
error,
|
|
743
730
|
onChange
|
|
744
731
|
}) => {
|
|
745
732
|
const el = useRef(null);
|
|
@@ -754,7 +741,7 @@ const GoATextArea = ({
|
|
|
754
741
|
const {
|
|
755
742
|
name,
|
|
756
743
|
value
|
|
757
|
-
} = e.detail
|
|
744
|
+
} = e.detail;
|
|
758
745
|
onChange(name, value);
|
|
759
746
|
};
|
|
760
747
|
|
|
@@ -769,8 +756,26 @@ const GoATextArea = ({
|
|
|
769
756
|
placeholder: placeholder,
|
|
770
757
|
value: value,
|
|
771
758
|
rows: rows,
|
|
772
|
-
disabled: disabled
|
|
759
|
+
disabled: disabled,
|
|
760
|
+
error: error,
|
|
761
|
+
"data-testid": testId
|
|
762
|
+
}, void 0);
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
const GoASpinner = ({
|
|
766
|
+
type,
|
|
767
|
+
size,
|
|
768
|
+
progress,
|
|
769
|
+
invert,
|
|
770
|
+
testId
|
|
771
|
+
}) => {
|
|
772
|
+
return jsx("goa-spinner", {
|
|
773
|
+
type: type,
|
|
774
|
+
size: size,
|
|
775
|
+
progress: progress,
|
|
776
|
+
invert: invert,
|
|
777
|
+
testid: testId
|
|
773
778
|
}, void 0);
|
|
774
779
|
};
|
|
775
780
|
|
|
776
|
-
export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge,
|
|
781
|
+
export { GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAContainer, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAPageBlock, GoAPageLoader, GoARadioGroup, GoARadioItem, GoASpinner, GoASuccessBadge, GoATextArea, GoAWarningBadge };
|
package/react-components.umd.js
CHANGED
|
@@ -58,36 +58,6 @@
|
|
|
58
58
|
}), void 0);
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
function styleInject(css, ref) {
|
|
62
|
-
if ( ref === void 0 ) ref = {};
|
|
63
|
-
var insertAt = ref.insertAt;
|
|
64
|
-
|
|
65
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
66
|
-
|
|
67
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
68
|
-
var style = document.createElement('style');
|
|
69
|
-
style.type = 'text/css';
|
|
70
|
-
|
|
71
|
-
if (insertAt === 'top') {
|
|
72
|
-
if (head.firstChild) {
|
|
73
|
-
head.insertBefore(style, head.firstChild);
|
|
74
|
-
} else {
|
|
75
|
-
head.appendChild(style);
|
|
76
|
-
}
|
|
77
|
-
} else {
|
|
78
|
-
head.appendChild(style);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (style.styleSheet) {
|
|
82
|
-
style.styleSheet.cssText = css;
|
|
83
|
-
} else {
|
|
84
|
-
style.appendChild(document.createTextNode(css));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
var css_248z$3 = "goa-badge {\n margin-left: 0.25rem;\n}";
|
|
89
|
-
styleInject(css_248z$3);
|
|
90
|
-
|
|
91
61
|
var GoABadge = function GoABadge(_a) {
|
|
92
62
|
var type = _a.type,
|
|
93
63
|
content = _a.content,
|
|
@@ -141,8 +111,35 @@
|
|
|
141
111
|
}, void 0);
|
|
142
112
|
};
|
|
143
113
|
|
|
144
|
-
|
|
145
|
-
|
|
114
|
+
function styleInject(css, ref) {
|
|
115
|
+
if ( ref === void 0 ) ref = {};
|
|
116
|
+
var insertAt = ref.insertAt;
|
|
117
|
+
|
|
118
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
119
|
+
|
|
120
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
121
|
+
var style = document.createElement('style');
|
|
122
|
+
style.type = 'text/css';
|
|
123
|
+
|
|
124
|
+
if (insertAt === 'top') {
|
|
125
|
+
if (head.firstChild) {
|
|
126
|
+
head.insertBefore(style, head.firstChild);
|
|
127
|
+
} else {
|
|
128
|
+
head.appendChild(style);
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
head.appendChild(style);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (style.styleSheet) {
|
|
135
|
+
style.styleSheet.cssText = css;
|
|
136
|
+
} else {
|
|
137
|
+
style.appendChild(document.createTextNode(css));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
var css_248z$1 = "goa-button + goa-button {\n margin-top: 1.5rem;\n}\n\n/* TODO: these margins need to match UI specs */\n@media (min-width: 480px) {\n goa-button + goa-button {\n margin-left: 1rem;\n }\n}\n";
|
|
142
|
+
styleInject(css_248z$1);
|
|
146
143
|
|
|
147
144
|
var GoAButton = function GoAButton(_a) {
|
|
148
145
|
var title = _a.title,
|
|
@@ -165,7 +162,7 @@
|
|
|
165
162
|
var current = el.current;
|
|
166
163
|
|
|
167
164
|
var listener = function listener(e) {
|
|
168
|
-
onClick();
|
|
165
|
+
onClick(e);
|
|
169
166
|
};
|
|
170
167
|
|
|
171
168
|
current.addEventListener('_click', listener);
|
|
@@ -185,8 +182,8 @@
|
|
|
185
182
|
}), void 0);
|
|
186
183
|
};
|
|
187
184
|
|
|
188
|
-
var css_248z
|
|
189
|
-
styleInject(css_248z
|
|
185
|
+
var css_248z = "goa-button-group > goa-button ~ goa-button {\n margin: 0;\n margin-top: 0.25rem;\n}\n\n@media (min-width: 320px) {\n goa-button-group > goa-button ~ goa-button {\n margin: 0;\n /* margin-left: 0.25rem; */\n }\n}\n";
|
|
186
|
+
styleInject(css_248z);
|
|
190
187
|
|
|
191
188
|
var GoAButtonGroup = function GoAButtonGroup(_a) {
|
|
192
189
|
var alignment = _a.alignment,
|
|
@@ -212,14 +209,13 @@
|
|
|
212
209
|
};
|
|
213
210
|
|
|
214
211
|
var GoACheckbox = function GoACheckbox(_a) {
|
|
215
|
-
var
|
|
212
|
+
var id = _a.id,
|
|
213
|
+
name = _a.name,
|
|
216
214
|
testId = _a.testId,
|
|
217
215
|
error = _a.error,
|
|
218
216
|
disabled = _a.disabled,
|
|
219
217
|
checked = _a.checked,
|
|
220
|
-
|
|
221
|
-
_b = _a.value,
|
|
222
|
-
value = _b === void 0 ? true : _b,
|
|
218
|
+
value = _a.value,
|
|
223
219
|
text = _a.text,
|
|
224
220
|
children = _a.children,
|
|
225
221
|
onChange = _a.onChange;
|
|
@@ -243,11 +239,11 @@
|
|
|
243
239
|
return jsxRuntime.jsx("goa-checkbox", __assign({
|
|
244
240
|
"data-testid": testId,
|
|
245
241
|
ref: el,
|
|
242
|
+
id: id,
|
|
246
243
|
name: name,
|
|
247
244
|
error: error,
|
|
248
245
|
checked: checked,
|
|
249
246
|
disabled: disabled,
|
|
250
|
-
indeterminate: indeterminate,
|
|
251
247
|
text: text,
|
|
252
248
|
value: value
|
|
253
249
|
}, {
|
|
@@ -261,7 +257,7 @@
|
|
|
261
257
|
children = _a.children,
|
|
262
258
|
actions = _a.actions,
|
|
263
259
|
_b = _a.variant,
|
|
264
|
-
variant = _b === void 0 ? '
|
|
260
|
+
variant = _b === void 0 ? 'default' : _b;
|
|
265
261
|
return jsxRuntime.jsxs("goa-container", __assign({
|
|
266
262
|
variant: variant,
|
|
267
263
|
headingsize: headingSize
|
|
@@ -326,9 +322,6 @@
|
|
|
326
322
|
}), void 0);
|
|
327
323
|
};
|
|
328
324
|
|
|
329
|
-
var css_248z = "";
|
|
330
|
-
styleInject(css_248z);
|
|
331
|
-
|
|
332
325
|
var GoAFlexRow = function GoAFlexRow(_a) {
|
|
333
326
|
var gap = _a.gap,
|
|
334
327
|
minWidth = _a.minWidth,
|
|
@@ -359,21 +352,13 @@
|
|
|
359
352
|
}), void 0);
|
|
360
353
|
};
|
|
361
354
|
|
|
362
|
-
var row = /*#__PURE__*/Object.freeze({
|
|
363
|
-
__proto__: null,
|
|
364
|
-
GoAFlexRow: GoAFlexRow,
|
|
365
|
-
'default': GoAFlexRow
|
|
366
|
-
});
|
|
367
|
-
|
|
368
355
|
var GoAFormItem = function GoAFormItem(_a) {
|
|
369
356
|
var children = _a.children,
|
|
370
357
|
helpText = _a.helpText,
|
|
371
358
|
error = _a.error,
|
|
372
359
|
optional = _a.optional,
|
|
373
|
-
name = _a.name,
|
|
374
360
|
label = _a.label;
|
|
375
361
|
return jsxRuntime.jsx("goa-form-item", __assign({
|
|
376
|
-
name: name,
|
|
377
362
|
label: label,
|
|
378
363
|
error: error,
|
|
379
364
|
optional: optional,
|
|
@@ -383,12 +368,6 @@
|
|
|
383
368
|
}), void 0);
|
|
384
369
|
};
|
|
385
370
|
|
|
386
|
-
var formItem = /*#__PURE__*/Object.freeze({
|
|
387
|
-
__proto__: null,
|
|
388
|
-
GoAFormItem: GoAFormItem,
|
|
389
|
-
'default': GoAFormItem
|
|
390
|
-
});
|
|
391
|
-
|
|
392
371
|
var GoAHeroBanner = function GoAHeroBanner(_a) {
|
|
393
372
|
var title = _a.title,
|
|
394
373
|
backgroundUrl = _a.backgroundUrl,
|
|
@@ -401,15 +380,6 @@
|
|
|
401
380
|
}), void 0);
|
|
402
381
|
};
|
|
403
382
|
|
|
404
|
-
var GoAHeroBannerContent = function GoAHeroBannerContent(_a) {
|
|
405
|
-
var children = _a.children;
|
|
406
|
-
return jsxRuntime.jsx("div", __assign({
|
|
407
|
-
slot: "content"
|
|
408
|
-
}, {
|
|
409
|
-
children: children
|
|
410
|
-
}), void 0);
|
|
411
|
-
};
|
|
412
|
-
|
|
413
383
|
var GoAHeroBannerActions = function GoAHeroBannerActions(_a) {
|
|
414
384
|
var children = _a.children;
|
|
415
385
|
return jsxRuntime.jsx("div", __assign({
|
|
@@ -478,13 +448,14 @@
|
|
|
478
448
|
leadingIcon = _a.leadingIcon,
|
|
479
449
|
trailingIcon = _a.trailingIcon,
|
|
480
450
|
_b = _a.variant,
|
|
481
|
-
variant = _b === void 0 ? 'goa' : _b
|
|
482
|
-
_a.focused
|
|
483
|
-
|
|
451
|
+
variant = _b === void 0 ? 'goa' : _b,
|
|
452
|
+
focused = _a.focused,
|
|
453
|
+
disabled = _a.disabled,
|
|
484
454
|
readonly = _a.readonly,
|
|
485
455
|
value = _a.value,
|
|
486
456
|
placeholder = _a.placeholder,
|
|
487
457
|
error = _a.error,
|
|
458
|
+
testId = _a.testId,
|
|
488
459
|
onTrailingIconClick = _a.onTrailingIconClick,
|
|
489
460
|
onChange = _a.onChange;
|
|
490
461
|
var ref = React.useRef(null);
|
|
@@ -496,34 +467,26 @@
|
|
|
496
467
|
var current = ref.current;
|
|
497
468
|
|
|
498
469
|
var changeListener = function changeListener(e) {
|
|
499
|
-
var _a = e.detail
|
|
470
|
+
var _a = e.detail,
|
|
500
471
|
name = _a.name,
|
|
501
472
|
value = _a.value;
|
|
502
473
|
onChange(name, value);
|
|
503
|
-
};
|
|
504
|
-
|
|
474
|
+
};
|
|
505
475
|
|
|
506
476
|
var clickListener = function clickListener(e) {
|
|
507
477
|
onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
|
|
508
478
|
};
|
|
509
479
|
|
|
510
|
-
current.addEventListener('_change', changeListener);
|
|
511
|
-
|
|
512
|
-
current.addEventListener('_ontrailingiconclick', clickListener);
|
|
480
|
+
current.addEventListener('_change', changeListener);
|
|
481
|
+
current.addEventListener('_trailingIconClick', clickListener);
|
|
513
482
|
return function () {
|
|
514
483
|
current.removeEventListener('_change', changeListener);
|
|
515
|
-
current.removeEventListener('
|
|
484
|
+
current.removeEventListener('_trailingIconClick', clickListener);
|
|
516
485
|
};
|
|
517
|
-
}, [ref, onChange, onTrailingIconClick]);
|
|
518
|
-
// if (focused) {
|
|
519
|
-
// inputRef.current?.focus();
|
|
520
|
-
// } else {
|
|
521
|
-
// inputRef.current?.blur();
|
|
522
|
-
// }
|
|
523
|
-
// }, [focused, inputRef]);
|
|
524
|
-
|
|
486
|
+
}, [ref, onChange, onTrailingIconClick]);
|
|
525
487
|
return jsxRuntime.jsx("goa-input", {
|
|
526
488
|
ref: ref,
|
|
489
|
+
focused: focused,
|
|
527
490
|
type: type,
|
|
528
491
|
name: name,
|
|
529
492
|
id: id,
|
|
@@ -534,6 +497,7 @@
|
|
|
534
497
|
readonly: readonly,
|
|
535
498
|
placeholder: placeholder,
|
|
536
499
|
error: error,
|
|
500
|
+
"data-testid": testId,
|
|
537
501
|
value: value,
|
|
538
502
|
handletrailingiconclick: !!onTrailingIconClick
|
|
539
503
|
}, void 0);
|
|
@@ -611,11 +575,8 @@
|
|
|
611
575
|
_a.step;
|
|
612
576
|
var props = __rest(_a, ["step"]);
|
|
613
577
|
|
|
614
|
-
return jsxRuntime.jsx(
|
|
615
|
-
type: "range"
|
|
616
|
-
onChange: function (e) {
|
|
617
|
-
return props.onChange(e.target.name, e.target.value);
|
|
618
|
-
}
|
|
578
|
+
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
579
|
+
type: "range"
|
|
619
580
|
}), void 0);
|
|
620
581
|
};
|
|
621
582
|
|
|
@@ -623,7 +584,8 @@
|
|
|
623
584
|
var title = _a.title,
|
|
624
585
|
children = _a.children,
|
|
625
586
|
open = _a.open,
|
|
626
|
-
|
|
587
|
+
width = _a.width,
|
|
588
|
+
actions = _a.actions,
|
|
627
589
|
onClose = _a.onClose;
|
|
628
590
|
var el = React.useRef(null);
|
|
629
591
|
React.useEffect(function () {
|
|
@@ -642,14 +604,19 @@
|
|
|
642
604
|
current.removeEventListener('_close', listener);
|
|
643
605
|
};
|
|
644
606
|
}, [el, onClose]);
|
|
645
|
-
return jsxRuntime.
|
|
607
|
+
return jsxRuntime.jsxs("goa-modal", __assign({
|
|
646
608
|
ref: el,
|
|
647
609
|
title: title,
|
|
648
610
|
open: open,
|
|
649
|
-
closable:
|
|
650
|
-
scrollable: true
|
|
611
|
+
closable: !!onClose,
|
|
612
|
+
scrollable: true,
|
|
613
|
+
width: width
|
|
651
614
|
}, {
|
|
652
|
-
children:
|
|
615
|
+
children: [actions && jsxRuntime.jsx("div", __assign({
|
|
616
|
+
slot: "actions"
|
|
617
|
+
}, {
|
|
618
|
+
children: actions
|
|
619
|
+
}), void 0), children]
|
|
653
620
|
}), void 0);
|
|
654
621
|
};
|
|
655
622
|
|
|
@@ -664,6 +631,13 @@
|
|
|
664
631
|
}), void 0);
|
|
665
632
|
};
|
|
666
633
|
|
|
634
|
+
var GoAPageBlock = function GoAPageBlock(_a) {
|
|
635
|
+
var children = _a.children;
|
|
636
|
+
return jsxRuntime.jsx("goa-page-block", {
|
|
637
|
+
children: children
|
|
638
|
+
}, void 0);
|
|
639
|
+
};
|
|
640
|
+
|
|
667
641
|
var GoAPageLoader = function GoAPageLoader(_a) {
|
|
668
642
|
var type = _a.type,
|
|
669
643
|
visible = _a.visible,
|
|
@@ -679,7 +653,7 @@
|
|
|
679
653
|
}, void 0);
|
|
680
654
|
};
|
|
681
655
|
|
|
682
|
-
var
|
|
656
|
+
var GoARadioItem = function GoARadioItem(_a) {
|
|
683
657
|
var name = _a.name,
|
|
684
658
|
label = _a.label,
|
|
685
659
|
value = _a.value,
|
|
@@ -707,6 +681,10 @@
|
|
|
707
681
|
children = _a.children,
|
|
708
682
|
_b = _a.orientation,
|
|
709
683
|
orientation = _b === void 0 ? 'vertical' : _b,
|
|
684
|
+
_c = _a.disabled,
|
|
685
|
+
disabled = _c === void 0 ? false : _c,
|
|
686
|
+
_d = _a.error,
|
|
687
|
+
error = _d === void 0 ? false : _d,
|
|
710
688
|
testId = _a.testId,
|
|
711
689
|
onChange = _a.onChange;
|
|
712
690
|
var el = React.useRef(null);
|
|
@@ -730,16 +708,22 @@
|
|
|
730
708
|
ref: el,
|
|
731
709
|
name: name,
|
|
732
710
|
value: value,
|
|
733
|
-
orientation: orientation
|
|
711
|
+
orientation: orientation,
|
|
712
|
+
disabled: disabled,
|
|
713
|
+
error: error
|
|
734
714
|
}, {
|
|
735
715
|
children: children
|
|
736
716
|
}), void 0);
|
|
737
717
|
};
|
|
738
718
|
|
|
739
|
-
var
|
|
740
|
-
var level = _a.level
|
|
741
|
-
|
|
742
|
-
|
|
719
|
+
var GoAMicrositeHeader = function GoAMicrositeHeader(_a) {
|
|
720
|
+
var level = _a.level,
|
|
721
|
+
version = _a.version,
|
|
722
|
+
feedbackUrl = _a.feedbackUrl;
|
|
723
|
+
return jsxRuntime.jsx("goa-microsite-header", {
|
|
724
|
+
level: level,
|
|
725
|
+
version: version,
|
|
726
|
+
feedbackurl: feedbackUrl
|
|
743
727
|
}, void 0);
|
|
744
728
|
};
|
|
745
729
|
|
|
@@ -749,6 +733,8 @@
|
|
|
749
733
|
placeholder = _a.placeholder,
|
|
750
734
|
rows = _a.rows,
|
|
751
735
|
disabled = _a.disabled,
|
|
736
|
+
testId = _a.testId,
|
|
737
|
+
error = _a.error,
|
|
752
738
|
onChange = _a.onChange;
|
|
753
739
|
var el = React.useRef(null);
|
|
754
740
|
React.useEffect(function () {
|
|
@@ -759,7 +745,7 @@
|
|
|
759
745
|
var current = el.current;
|
|
760
746
|
|
|
761
747
|
var listener = function listener(e) {
|
|
762
|
-
var _a = e.detail
|
|
748
|
+
var _a = e.detail,
|
|
763
749
|
name = _a.name,
|
|
764
750
|
value = _a.value;
|
|
765
751
|
onChange(name, value);
|
|
@@ -776,7 +762,24 @@
|
|
|
776
762
|
placeholder: placeholder,
|
|
777
763
|
value: value,
|
|
778
764
|
rows: rows,
|
|
779
|
-
disabled: disabled
|
|
765
|
+
disabled: disabled,
|
|
766
|
+
error: error,
|
|
767
|
+
"data-testid": testId
|
|
768
|
+
}, void 0);
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
var GoASpinner = function GoASpinner(_a) {
|
|
772
|
+
var type = _a.type,
|
|
773
|
+
size = _a.size,
|
|
774
|
+
progress = _a.progress,
|
|
775
|
+
invert = _a.invert,
|
|
776
|
+
testId = _a.testId;
|
|
777
|
+
return jsxRuntime.jsx("goa-spinner", {
|
|
778
|
+
type: type,
|
|
779
|
+
size: size,
|
|
780
|
+
progress: progress,
|
|
781
|
+
invert: invert,
|
|
782
|
+
testid: testId
|
|
780
783
|
}, void 0);
|
|
781
784
|
};
|
|
782
785
|
|
|
@@ -790,11 +793,10 @@
|
|
|
790
793
|
exports.GoADropdown = GoADropdown;
|
|
791
794
|
exports.GoADropdownOption = GoADropdownOption;
|
|
792
795
|
exports.GoAEmergencyBadge = GoAEmergencyBadge;
|
|
793
|
-
exports.GoAFlexRow =
|
|
794
|
-
exports.GoAFormItem =
|
|
796
|
+
exports.GoAFlexRow = GoAFlexRow;
|
|
797
|
+
exports.GoAFormItem = GoAFormItem;
|
|
795
798
|
exports.GoAHeroBanner = GoAHeroBanner;
|
|
796
799
|
exports.GoAHeroBannerActions = GoAHeroBannerActions;
|
|
797
|
-
exports.GoAHeroBannerContent = GoAHeroBannerContent;
|
|
798
800
|
exports.GoAIcon = GoAIcon;
|
|
799
801
|
exports.GoAIconButton = GoAIconButton;
|
|
800
802
|
exports.GoAInfoBadge = GoAInfoBadge;
|
|
@@ -812,12 +814,14 @@
|
|
|
812
814
|
exports.GoAInputText = GoAInputText;
|
|
813
815
|
exports.GoAInputTime = GoAInputTime;
|
|
814
816
|
exports.GoAInputUrl = GoAInputUrl;
|
|
817
|
+
exports.GoAMicrositeHeader = GoAMicrositeHeader;
|
|
815
818
|
exports.GoAModal = GoAModal;
|
|
816
819
|
exports.GoANotification = GoANotification;
|
|
820
|
+
exports.GoAPageBlock = GoAPageBlock;
|
|
817
821
|
exports.GoAPageLoader = GoAPageLoader;
|
|
818
|
-
exports.GoARadio = GoARadio;
|
|
819
822
|
exports.GoARadioGroup = GoARadioGroup;
|
|
820
|
-
exports.
|
|
823
|
+
exports.GoARadioItem = GoARadioItem;
|
|
824
|
+
exports.GoASpinner = GoASpinner;
|
|
821
825
|
exports.GoASuccessBadge = GoASuccessBadge;
|
|
822
826
|
exports.GoATextArea = GoATextArea;
|
|
823
827
|
exports.GoAWarningBadge = GoAWarningBadge;
|