@abgov/react-components 3.4.0-alpha.31 → 3.4.0-alpha.34
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/index.d.ts +2 -2
- package/lib/modal/modal.d.ts +8 -6
- package/lib/radio-group/radio-group.d.ts +3 -0
- package/lib/radio-group/radio.d.ts +2 -2
- package/lib/service-level-header/service-level-header.d.ts +2 -0
- package/package.json +1 -1
- package/react-components.esm.js +22 -10
- package/react-components.umd.js +24 -10
package/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { GoAModal } from './lib/modal/modal';
|
|
|
20
20
|
import { GoANotification } from './lib/notification/notification';
|
|
21
21
|
import { GoAPageBlock } from './lib/page-block/page-block';
|
|
22
22
|
import { GoAPageLoader } from './lib/page-loader/page-loader';
|
|
23
|
-
import { GoARadioGroup,
|
|
23
|
+
import { GoARadioGroup, GoARadioItem } from './lib/radio-group/radio-group';
|
|
24
24
|
import { GoAServiceLevelHeader } from './lib/service-level-header/service-level-header';
|
|
25
25
|
import { GoATextArea } from './lib/textarea/textarea';
|
|
26
26
|
import { GoASpinner } from './lib/spinner/spinner';
|
|
@@ -28,4 +28,4 @@ import type { GoAIconType } from './lib/icons';
|
|
|
28
28
|
import type { GoABadgeType } from './lib/badge/badge';
|
|
29
29
|
export type { GoAIconType };
|
|
30
30
|
export type { GoABadgeType };
|
|
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,
|
|
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, GoAServiceLevelHeader, GoASuccessBadge, GoASpinner, GoATextArea, GoAWarningBadge, };
|
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>;
|
|
@@ -10,10 +10,12 @@ export declare type ServiceLevel = 'alpha' | 'beta' | 'live';
|
|
|
10
10
|
interface WebComponentProps {
|
|
11
11
|
level: ServiceLevel;
|
|
12
12
|
version?: string;
|
|
13
|
+
feedbackurl?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface HeaderProps {
|
|
15
16
|
level: ServiceLevel;
|
|
16
17
|
version?: string;
|
|
18
|
+
feedbackUrl?: string;
|
|
17
19
|
}
|
|
18
20
|
export declare const GoAServiceLevelHeader: FC<HeaderProps>;
|
|
19
21
|
export default GoAServiceLevelHeader;
|
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -575,7 +575,8 @@ const GoAModal = ({
|
|
|
575
575
|
title,
|
|
576
576
|
children,
|
|
577
577
|
open,
|
|
578
|
-
|
|
578
|
+
width,
|
|
579
|
+
actions,
|
|
579
580
|
onClose
|
|
580
581
|
}) => {
|
|
581
582
|
const el = useRef(null);
|
|
@@ -595,14 +596,19 @@ const GoAModal = ({
|
|
|
595
596
|
current.removeEventListener('_close', listener);
|
|
596
597
|
};
|
|
597
598
|
}, [el, onClose]);
|
|
598
|
-
return
|
|
599
|
+
return jsxs("goa-modal", Object.assign({
|
|
599
600
|
ref: el,
|
|
600
601
|
title: title,
|
|
601
602
|
open: open,
|
|
602
|
-
closable:
|
|
603
|
-
scrollable: true
|
|
603
|
+
closable: !!onClose,
|
|
604
|
+
scrollable: true,
|
|
605
|
+
width: width
|
|
604
606
|
}, {
|
|
605
|
-
children:
|
|
607
|
+
children: [actions && jsx("div", Object.assign({
|
|
608
|
+
slot: "actions"
|
|
609
|
+
}, {
|
|
610
|
+
children: actions
|
|
611
|
+
}), void 0), children]
|
|
606
612
|
}), void 0);
|
|
607
613
|
};
|
|
608
614
|
|
|
@@ -641,7 +647,7 @@ const GoAPageLoader = ({
|
|
|
641
647
|
}, void 0);
|
|
642
648
|
};
|
|
643
649
|
|
|
644
|
-
const
|
|
650
|
+
const GoARadioItem = ({
|
|
645
651
|
name,
|
|
646
652
|
label,
|
|
647
653
|
value,
|
|
@@ -669,6 +675,8 @@ const GoARadioGroup = ({
|
|
|
669
675
|
value,
|
|
670
676
|
children,
|
|
671
677
|
orientation: _orientation = 'vertical',
|
|
678
|
+
disabled: _disabled = false,
|
|
679
|
+
error: _error = false,
|
|
672
680
|
testId,
|
|
673
681
|
onChange
|
|
674
682
|
}) => {
|
|
@@ -693,7 +701,9 @@ const GoARadioGroup = ({
|
|
|
693
701
|
ref: el,
|
|
694
702
|
name: name,
|
|
695
703
|
value: value,
|
|
696
|
-
orientation: _orientation
|
|
704
|
+
orientation: _orientation,
|
|
705
|
+
disabled: _disabled,
|
|
706
|
+
error: _error
|
|
697
707
|
}, {
|
|
698
708
|
children: children
|
|
699
709
|
}), void 0);
|
|
@@ -701,11 +711,13 @@ const GoARadioGroup = ({
|
|
|
701
711
|
|
|
702
712
|
const GoAServiceLevelHeader = ({
|
|
703
713
|
level,
|
|
704
|
-
version
|
|
714
|
+
version,
|
|
715
|
+
feedbackUrl
|
|
705
716
|
}) => {
|
|
706
717
|
return jsx("goa-service-level-header", {
|
|
707
718
|
level: level,
|
|
708
|
-
version: version
|
|
719
|
+
version: version,
|
|
720
|
+
feedbackurl: feedbackUrl
|
|
709
721
|
}, void 0);
|
|
710
722
|
};
|
|
711
723
|
|
|
@@ -768,4 +780,4 @@ const GoASpinner = ({
|
|
|
768
780
|
}, void 0);
|
|
769
781
|
};
|
|
770
782
|
|
|
771
|
-
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,
|
|
783
|
+
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, GoARadioGroup, GoARadioItem, GoAServiceLevelHeader, GoASpinner, GoASuccessBadge, GoATextArea, GoAWarningBadge };
|
package/react-components.umd.js
CHANGED
|
@@ -586,7 +586,8 @@
|
|
|
586
586
|
var title = _a.title,
|
|
587
587
|
children = _a.children,
|
|
588
588
|
open = _a.open,
|
|
589
|
-
|
|
589
|
+
width = _a.width,
|
|
590
|
+
actions = _a.actions,
|
|
590
591
|
onClose = _a.onClose;
|
|
591
592
|
var el = React.useRef(null);
|
|
592
593
|
React.useEffect(function () {
|
|
@@ -605,14 +606,19 @@
|
|
|
605
606
|
current.removeEventListener('_close', listener);
|
|
606
607
|
};
|
|
607
608
|
}, [el, onClose]);
|
|
608
|
-
return jsxRuntime.
|
|
609
|
+
return jsxRuntime.jsxs("goa-modal", __assign({
|
|
609
610
|
ref: el,
|
|
610
611
|
title: title,
|
|
611
612
|
open: open,
|
|
612
|
-
closable:
|
|
613
|
-
scrollable: true
|
|
613
|
+
closable: !!onClose,
|
|
614
|
+
scrollable: true,
|
|
615
|
+
width: width
|
|
614
616
|
}, {
|
|
615
|
-
children:
|
|
617
|
+
children: [actions && jsxRuntime.jsx("div", __assign({
|
|
618
|
+
slot: "actions"
|
|
619
|
+
}, {
|
|
620
|
+
children: actions
|
|
621
|
+
}), void 0), children]
|
|
616
622
|
}), void 0);
|
|
617
623
|
};
|
|
618
624
|
|
|
@@ -649,7 +655,7 @@
|
|
|
649
655
|
}, void 0);
|
|
650
656
|
};
|
|
651
657
|
|
|
652
|
-
var
|
|
658
|
+
var GoARadioItem = function GoARadioItem(_a) {
|
|
653
659
|
var name = _a.name,
|
|
654
660
|
label = _a.label,
|
|
655
661
|
value = _a.value,
|
|
@@ -677,6 +683,10 @@
|
|
|
677
683
|
children = _a.children,
|
|
678
684
|
_b = _a.orientation,
|
|
679
685
|
orientation = _b === void 0 ? 'vertical' : _b,
|
|
686
|
+
_c = _a.disabled,
|
|
687
|
+
disabled = _c === void 0 ? false : _c,
|
|
688
|
+
_d = _a.error,
|
|
689
|
+
error = _d === void 0 ? false : _d,
|
|
680
690
|
testId = _a.testId,
|
|
681
691
|
onChange = _a.onChange;
|
|
682
692
|
var el = React.useRef(null);
|
|
@@ -700,7 +710,9 @@
|
|
|
700
710
|
ref: el,
|
|
701
711
|
name: name,
|
|
702
712
|
value: value,
|
|
703
|
-
orientation: orientation
|
|
713
|
+
orientation: orientation,
|
|
714
|
+
disabled: disabled,
|
|
715
|
+
error: error
|
|
704
716
|
}, {
|
|
705
717
|
children: children
|
|
706
718
|
}), void 0);
|
|
@@ -708,10 +720,12 @@
|
|
|
708
720
|
|
|
709
721
|
var GoAServiceLevelHeader = function GoAServiceLevelHeader(_a) {
|
|
710
722
|
var level = _a.level,
|
|
711
|
-
version = _a.version
|
|
723
|
+
version = _a.version,
|
|
724
|
+
feedbackUrl = _a.feedbackUrl;
|
|
712
725
|
return jsxRuntime.jsx("goa-service-level-header", {
|
|
713
726
|
level: level,
|
|
714
|
-
version: version
|
|
727
|
+
version: version,
|
|
728
|
+
feedbackurl: feedbackUrl
|
|
715
729
|
}, void 0);
|
|
716
730
|
};
|
|
717
731
|
|
|
@@ -806,8 +820,8 @@
|
|
|
806
820
|
exports.GoANotification = GoANotification;
|
|
807
821
|
exports.GoAPageBlock = GoAPageBlock;
|
|
808
822
|
exports.GoAPageLoader = GoAPageLoader;
|
|
809
|
-
exports.GoARadio = GoARadio;
|
|
810
823
|
exports.GoARadioGroup = GoARadioGroup;
|
|
824
|
+
exports.GoARadioItem = GoARadioItem;
|
|
811
825
|
exports.GoAServiceLevelHeader = GoAServiceLevelHeader;
|
|
812
826
|
exports.GoASpinner = GoASpinner;
|
|
813
827
|
exports.GoASuccessBadge = GoASuccessBadge;
|