@abgov/react-components 6.10.0-dev.9 → 6.10.0-next.1
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.js +1 -1
- package/experimental.mjs +2 -2
- package/{icon-CK55b563.js → icon-B3p90m2x.js} +21 -26
- package/icon-B3p90m2x.js.map +1 -0
- package/{icon-CoYGOp1V.mjs → icon-CCNDGfBO.mjs} +22 -27
- package/icon-CCNDGfBO.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +331 -759
- package/index.js.map +1 -1
- package/index.mjs +330 -757
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +6 -5
- package/lib/app-header/app-header.d.ts +6 -4
- package/lib/app-header-menu/app-header-menu.d.ts +3 -3
- package/lib/badge/badge.d.ts +3 -3
- package/lib/block/block.d.ts +3 -3
- package/lib/button/button.d.ts +6 -5
- package/lib/button-group/button-group.d.ts +3 -3
- package/lib/calendar/calendar.d.ts +6 -5
- package/lib/callout/callout.d.ts +3 -3
- package/lib/card/card-actions.d.ts +3 -2
- package/lib/card/card-content.d.ts +3 -2
- package/lib/card/card-group.d.ts +3 -2
- package/lib/card/card-image.d.ts +3 -2
- package/lib/card/card.d.ts +3 -3
- package/lib/checkbox/checkbox.d.ts +6 -5
- package/lib/chip/chip.d.ts +6 -5
- package/lib/common/extract-props.d.ts +32 -0
- package/lib/container/container.d.ts +3 -3
- package/lib/data-grid/data-grid.d.ts +21 -0
- package/lib/date-picker/date-picker.d.ts +6 -5
- package/lib/details/details.d.ts +3 -3
- package/lib/dropdown/dropdown.d.ts +6 -5
- package/lib/file-upload-card/file-upload-card.d.ts +6 -5
- package/lib/file-upload-input/file-upload-input.d.ts +6 -5
- package/lib/filter-chip/filter-chip.d.ts +6 -5
- package/lib/footer/footer.d.ts +3 -2
- package/lib/footer-meta-section/footer-meta-section.d.ts +3 -2
- package/lib/footer-nav-section/footer-nav-section.d.ts +3 -2
- package/lib/form/fieldset.d.ts +7 -6
- package/lib/form/public-form-page.d.ts +6 -5
- package/lib/form/public-form-summary.d.ts +3 -3
- package/lib/form/public-form.d.ts +6 -5
- package/lib/form/public-subform-index.d.ts +3 -4
- package/lib/form/public-subform.d.ts +6 -5
- package/lib/form/task-list.d.ts +3 -3
- package/lib/form/task.d.ts +4 -4
- package/lib/form-item/form-item.d.ts +3 -3
- package/lib/icon/icon.d.ts +3 -14
- package/lib/icon-button/icon-button.d.ts +6 -5
- package/lib/input/input.d.ts +6 -5
- package/lib/link/link.d.ts +3 -3
- package/lib/link-button/link-button.d.ts +3 -3
- package/lib/menu-button/menu-action.d.ts +3 -3
- package/lib/menu-button/menu-button.d.ts +3 -3
- package/lib/popover/popover.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +6 -5
- package/lib/tab/tab.d.ts +3 -1
- package/lib/table/table-sort-header.d.ts +3 -3
- package/lib/tabs/tabs.d.ts +4 -2
- package/lib/temporary-notification-ctrl/temporary-notification-ctrl.d.ts +6 -5
- package/lib/text/text.d.ts +3 -3
- package/lib/textarea/textarea.d.ts +6 -5
- package/lib/tooltip/tooltip.d.ts +3 -3
- package/package.json +1 -1
- package/icon-CK55b563.js.map +0 -1
- package/icon-CoYGOp1V.mjs.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactNode, JSX } from 'react';
|
|
2
|
-
import { GoabAccordionHeadingSize, GoabAccordionIconPosition, Margins } from '@abgov/ui-components-common';
|
|
2
|
+
import { GoabAccordionHeadingSize, GoabAccordionIconPosition, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
5
4
|
open?: string;
|
|
6
5
|
headingsize?: GoabAccordionHeadingSize;
|
|
7
6
|
heading: string;
|
|
@@ -14,11 +13,13 @@ interface WCProps extends Margins {
|
|
|
14
13
|
declare module "react" {
|
|
15
14
|
namespace JSX {
|
|
16
15
|
interface IntrinsicElements {
|
|
17
|
-
"goa-accordion": WCProps & React.HTMLAttributes<HTMLElement
|
|
16
|
+
"goa-accordion": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
17
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
18
|
+
};
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
export interface GoabAccordionProps extends Margins {
|
|
22
|
+
export interface GoabAccordionProps extends Margins, DataAttributes {
|
|
22
23
|
open?: boolean;
|
|
23
24
|
headingSize?: GoabAccordionHeadingSize;
|
|
24
25
|
secondaryText?: string;
|
|
@@ -30,5 +31,5 @@ export interface GoabAccordionProps extends Margins {
|
|
|
30
31
|
onChange?: (open: boolean) => void;
|
|
31
32
|
children?: ReactNode;
|
|
32
33
|
}
|
|
33
|
-
export declare function GoabAccordion({ open,
|
|
34
|
+
export declare function GoabAccordion({ open, onChange, headingContent, children, ...rest }: GoabAccordionProps): JSX.Element;
|
|
34
35
|
export default GoabAccordion;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
import { DataAttributes } from '@abgov/ui-components-common';
|
|
2
3
|
interface WCProps {
|
|
3
4
|
heading?: string;
|
|
4
5
|
url?: string;
|
|
5
6
|
maxcontentwidth?: string;
|
|
6
7
|
fullmenubreakpoint?: number;
|
|
7
8
|
hasmenuclickhandler?: string;
|
|
8
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
9
9
|
testid?: string;
|
|
10
10
|
}
|
|
11
11
|
declare module "react" {
|
|
12
12
|
namespace JSX {
|
|
13
13
|
interface IntrinsicElements {
|
|
14
|
-
"goa-app-header": WCProps & React.HTMLAttributes<HTMLElement
|
|
14
|
+
"goa-app-header": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
15
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
16
|
+
};
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
|
-
export interface GoabAppHeaderProps {
|
|
20
|
+
export interface GoabAppHeaderProps extends DataAttributes {
|
|
19
21
|
heading?: string;
|
|
20
22
|
url?: string;
|
|
21
23
|
maxContentWidth?: string;
|
|
@@ -24,5 +26,5 @@ export interface GoabAppHeaderProps {
|
|
|
24
26
|
onMenuClick?: () => void;
|
|
25
27
|
testId?: string;
|
|
26
28
|
}
|
|
27
|
-
export declare function GoabAppHeader({
|
|
29
|
+
export declare function GoabAppHeader({ onMenuClick, children, ...rest }: GoabAppHeaderProps): JSX.Element;
|
|
28
30
|
export default GoabAppHeader;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { GoabIconType } from '@abgov/ui-components-common';
|
|
2
|
+
import { DataAttributes, GoabIconType } from '@abgov/ui-components-common';
|
|
3
3
|
interface WCProps {
|
|
4
4
|
heading: string;
|
|
5
5
|
leadingicon?: GoabIconType;
|
|
6
6
|
testid?: string;
|
|
7
7
|
}
|
|
8
|
-
export interface GoabAppHeaderMenuProps {
|
|
8
|
+
export interface GoabAppHeaderMenuProps extends DataAttributes {
|
|
9
9
|
heading: string;
|
|
10
10
|
leadingIcon?: GoabIconType;
|
|
11
11
|
testId?: string;
|
|
@@ -18,5 +18,5 @@ declare module "react" {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
export declare function GoabAppHeaderMenu(
|
|
21
|
+
export declare function GoabAppHeaderMenu({ children, ...rest }: GoabAppHeaderMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export default GoabAppHeaderMenu;
|
package/lib/badge/badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataAttributes, GoabBadgeType, GoabIconType, Margins } from '@abgov/ui-components-common';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
4
|
type: GoabBadgeType;
|
|
@@ -15,7 +15,7 @@ declare module "react" {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export interface GoabBadgeProps extends Margins {
|
|
18
|
+
export interface GoabBadgeProps extends Margins, DataAttributes {
|
|
19
19
|
type: GoabBadgeType;
|
|
20
20
|
icon?: boolean;
|
|
21
21
|
content?: string;
|
|
@@ -23,7 +23,7 @@ export interface GoabBadgeProps extends Margins {
|
|
|
23
23
|
ariaLabel?: string;
|
|
24
24
|
iconType?: GoabIconType;
|
|
25
25
|
}
|
|
26
|
-
export declare function GoabBadge({
|
|
26
|
+
export declare function GoabBadge({ icon, iconType, ...rest }: GoabBadgeProps): JSX.Element;
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated
|
|
29
29
|
*/
|
package/lib/block/block.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoabBlockAlignment, GoabBlockDirection, Margins, Spacing } from '@abgov/ui-components-common';
|
|
1
|
+
import { GoabBlockAlignment, GoabBlockDirection, Margins, DataAttributes, Spacing } from '@abgov/ui-components-common';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export interface WCProps extends Margins {
|
|
4
4
|
gap?: Spacing;
|
|
@@ -16,7 +16,7 @@ declare module "react" {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export interface GoabBlockProps extends Margins {
|
|
19
|
+
export interface GoabBlockProps extends Margins, DataAttributes {
|
|
20
20
|
gap?: Spacing;
|
|
21
21
|
direction?: GoabBlockDirection;
|
|
22
22
|
alignment?: GoabBlockAlignment;
|
|
@@ -26,4 +26,4 @@ export interface GoabBlockProps extends Margins {
|
|
|
26
26
|
testId?: string;
|
|
27
27
|
children?: ReactNode;
|
|
28
28
|
}
|
|
29
|
-
export declare function GoabBlock(
|
|
29
|
+
export declare function GoabBlock({ testId, children, ...rest }: GoabBlockProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/button/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, JSX } from 'react';
|
|
2
|
-
import { GoabButtonSize, GoabButtonType, GoabButtonVariant, GoabIconType, Margins } from '@abgov/ui-components-common';
|
|
2
|
+
import { GoabButtonSize, GoabButtonType, GoabButtonVariant, GoabIconType, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
4
|
type?: GoabButtonType;
|
|
5
5
|
size?: GoabButtonSize;
|
|
@@ -12,16 +12,17 @@ interface WCProps extends Margins {
|
|
|
12
12
|
action?: string;
|
|
13
13
|
actionArgs?: string;
|
|
14
14
|
actionArg?: string;
|
|
15
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
16
15
|
}
|
|
17
16
|
declare module "react" {
|
|
18
17
|
namespace JSX {
|
|
19
18
|
interface IntrinsicElements {
|
|
20
|
-
"goa-button": WCProps & React.HTMLAttributes<HTMLElement
|
|
19
|
+
"goa-button": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
20
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
21
|
+
};
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
export interface GoabButtonProps extends Margins {
|
|
25
|
+
export interface GoabButtonProps extends Margins, DataAttributes {
|
|
25
26
|
type?: GoabButtonType;
|
|
26
27
|
size?: GoabButtonSize;
|
|
27
28
|
variant?: GoabButtonVariant;
|
|
@@ -36,5 +37,5 @@ export interface GoabButtonProps extends Margins {
|
|
|
36
37
|
actionArg?: string;
|
|
37
38
|
children?: ReactNode;
|
|
38
39
|
}
|
|
39
|
-
export declare function GoabButton({ disabled,
|
|
40
|
+
export declare function GoabButton({ disabled, onClick, actionArgs, actionArg, children, ...rest }: GoabButtonProps): JSX.Element;
|
|
40
41
|
export default GoabButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoabButtonGroupAlignment, GoabButtonGroupGap, Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { GoabButtonGroupAlignment, GoabButtonGroupGap, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
4
|
alignment: GoabButtonGroupAlignment;
|
|
@@ -12,11 +12,11 @@ declare module "react" {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
export interface GoabButtonGroupProps extends Margins {
|
|
15
|
+
export interface GoabButtonGroupProps extends Margins, DataAttributes {
|
|
16
16
|
alignment: GoabButtonGroupAlignment;
|
|
17
17
|
gap?: GoabButtonGroupGap;
|
|
18
18
|
testId?: string;
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
}
|
|
21
|
-
export declare function GoabButtonGroup({
|
|
21
|
+
export declare function GoabButtonGroup({ children, ...rest }: GoabButtonGroupProps): JSX.Element;
|
|
22
22
|
export default GoabButtonGroup;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { GoabCalendarOnChangeDetail, Margins } from '@abgov/ui-components-common';
|
|
2
|
+
import { DataAttributes, GoabCalendarOnChangeDetail, Margins } from '@abgov/ui-components-common';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
5
4
|
name?: string;
|
|
6
5
|
value?: string;
|
|
7
6
|
min?: string;
|
|
@@ -11,11 +10,13 @@ interface WCProps extends Margins {
|
|
|
11
10
|
declare module "react" {
|
|
12
11
|
namespace JSX {
|
|
13
12
|
interface IntrinsicElements {
|
|
14
|
-
"goa-calendar": WCProps & React.HTMLAttributes<HTMLElement
|
|
13
|
+
"goa-calendar": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
14
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
15
|
+
};
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
export interface GoabCalendarProps extends Margins {
|
|
19
|
+
export interface GoabCalendarProps extends Margins, DataAttributes {
|
|
19
20
|
name?: string;
|
|
20
21
|
value?: string;
|
|
21
22
|
min?: string;
|
|
@@ -23,5 +24,5 @@ export interface GoabCalendarProps extends Margins {
|
|
|
23
24
|
testId?: string;
|
|
24
25
|
onChange: (details: GoabCalendarOnChangeDetail) => void;
|
|
25
26
|
}
|
|
26
|
-
export declare function GoabCalendar({
|
|
27
|
+
export declare function GoabCalendar({ min, max, onChange, name, ...rest }: GoabCalendarProps): JSX.Element;
|
|
27
28
|
export default GoabCalendar;
|
package/lib/callout/callout.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoabCalloutAriaLive, GoabCalloutSize, GoabCalloutType, GoabCalloutIconTheme, Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { GoabCalloutAriaLive, GoabCalloutSize, GoabCalloutType, GoabCalloutIconTheme, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
2
2
|
interface WCProps extends Margins {
|
|
3
3
|
heading?: string;
|
|
4
4
|
type?: GoabCalloutType;
|
|
@@ -15,7 +15,7 @@ declare module "react" {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export interface GoabCalloutProps extends Margins {
|
|
18
|
+
export interface GoabCalloutProps extends Margins, DataAttributes {
|
|
19
19
|
heading?: string;
|
|
20
20
|
type?: GoabCalloutType;
|
|
21
21
|
size?: GoabCalloutSize;
|
|
@@ -25,5 +25,5 @@ export interface GoabCalloutProps extends Margins {
|
|
|
25
25
|
ariaLive?: GoabCalloutAriaLive;
|
|
26
26
|
children?: React.ReactNode;
|
|
27
27
|
}
|
|
28
|
-
export declare const GoabCallout: ({
|
|
28
|
+
export declare const GoabCallout: ({ type, iconTheme, size, ariaLive, children, ...rest }: GoabCalloutProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export default GoabCallout;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
import { DataAttributes } from '@abgov/ui-components-common';
|
|
2
3
|
declare module "react" {
|
|
3
4
|
namespace JSX {
|
|
4
5
|
interface IntrinsicElements {
|
|
@@ -6,8 +7,8 @@ declare module "react" {
|
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
export interface GoabCardActionsProps {
|
|
10
|
+
export interface GoabCardActionsProps extends DataAttributes {
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export declare function GoabCardActions({ children }: GoabCardActionsProps): JSX.Element;
|
|
13
|
+
export declare function GoabCardActions({ children, ...rest }: GoabCardActionsProps): JSX.Element;
|
|
13
14
|
export default GoabCardActions;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
import { DataAttributes } from '@abgov/ui-components-common';
|
|
2
3
|
declare module "react" {
|
|
3
4
|
namespace JSX {
|
|
4
5
|
interface IntrinsicElements {
|
|
@@ -6,8 +7,8 @@ declare module "react" {
|
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
export interface GoabCardContentProps {
|
|
10
|
+
export interface GoabCardContentProps extends DataAttributes {
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export declare function GoabCardContent({ children }: GoabCardContentProps): JSX.Element;
|
|
13
|
+
export declare function GoabCardContent({ children, ...rest }: GoabCardContentProps): JSX.Element;
|
|
13
14
|
export default GoabCardContent;
|
package/lib/card/card-group.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
import { DataAttributes } from '@abgov/ui-components-common';
|
|
2
3
|
declare module "react" {
|
|
3
4
|
namespace JSX {
|
|
4
5
|
interface IntrinsicElements {
|
|
@@ -6,8 +7,8 @@ declare module "react" {
|
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
export interface GoabCardGroupProps {
|
|
10
|
+
export interface GoabCardGroupProps extends DataAttributes {
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export declare function GoabCardGroup({ children }: GoabCardGroupProps): JSX.Element;
|
|
13
|
+
export declare function GoabCardGroup({ children, ...rest }: GoabCardGroupProps): JSX.Element;
|
|
13
14
|
export default GoabCardGroup;
|
package/lib/card/card-image.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
import { DataAttributes } from '@abgov/ui-components-common';
|
|
2
3
|
interface WCProps {
|
|
3
4
|
src: string;
|
|
4
5
|
height: string;
|
|
@@ -10,9 +11,9 @@ declare module "react" {
|
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
export interface GoabCardImageProps {
|
|
14
|
+
export interface GoabCardImageProps extends DataAttributes {
|
|
14
15
|
src: string;
|
|
15
16
|
height: string;
|
|
16
17
|
}
|
|
17
|
-
export declare function GoabCardImage(
|
|
18
|
+
export declare function GoabCardImage(props: GoabCardImageProps): JSX.Element;
|
|
18
19
|
export default GoabCardImage;
|
package/lib/card/card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { DataAttributes, Margins } from '@abgov/ui-components-common';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
4
|
elevation?: number;
|
|
@@ -13,11 +13,11 @@ declare module "react" {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
export interface GoabCardProps extends Margins {
|
|
16
|
+
export interface GoabCardProps extends Margins, DataAttributes {
|
|
17
17
|
elevation?: number;
|
|
18
18
|
width?: string;
|
|
19
19
|
testId?: string;
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
}
|
|
22
|
-
export declare function GoabCard({
|
|
22
|
+
export declare function GoabCard({ children, ...rest }: GoabCardProps): JSX.Element;
|
|
23
23
|
export default GoabCard;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { GoabCheckboxOnChangeDetail, Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { DataAttributes, GoabCheckboxOnChangeDetail, Margins } from '@abgov/ui-components-common';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
3
|
declare module "react" {
|
|
4
4
|
namespace JSX {
|
|
5
5
|
interface IntrinsicElements {
|
|
6
|
-
"goa-checkbox": WCProps & React.HTMLAttributes<HTMLElement
|
|
6
|
+
"goa-checkbox": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
7
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
8
|
+
};
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
}
|
|
10
12
|
interface WCProps extends Margins {
|
|
11
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
12
13
|
id?: string;
|
|
13
14
|
name: string;
|
|
14
15
|
checked?: string;
|
|
@@ -24,7 +25,7 @@ interface WCProps extends Margins {
|
|
|
24
25
|
maxwidth?: string;
|
|
25
26
|
testid?: string;
|
|
26
27
|
}
|
|
27
|
-
export interface GoabCheckboxProps extends Margins {
|
|
28
|
+
export interface GoabCheckboxProps extends Margins, DataAttributes {
|
|
28
29
|
id?: string;
|
|
29
30
|
name: string;
|
|
30
31
|
checked?: boolean;
|
|
@@ -43,5 +44,5 @@ export interface GoabCheckboxProps extends Margins {
|
|
|
43
44
|
onChange?: (detail: GoabCheckboxOnChangeDetail) => void;
|
|
44
45
|
}
|
|
45
46
|
export type Props = GoabCheckboxProps;
|
|
46
|
-
export declare function GoabCheckbox({
|
|
47
|
+
export declare function GoabCheckbox({ error, checked, indeterminate, disabled, value, description, reveal, onChange, name, children, ...rest }: GoabCheckboxProps): JSX.Element;
|
|
47
48
|
export default GoabCheckbox;
|
package/lib/chip/chip.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { GoabChipTheme, GoabChipVariant, Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { DataAttributes, GoabChipTheme, GoabChipVariant, Margins } from '@abgov/ui-components-common';
|
|
2
2
|
interface WCProps extends Margins {
|
|
3
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
4
3
|
leadingicon?: string;
|
|
5
4
|
icontheme?: GoabChipTheme;
|
|
6
5
|
error?: string;
|
|
@@ -12,11 +11,13 @@ interface WCProps extends Margins {
|
|
|
12
11
|
declare module "react" {
|
|
13
12
|
namespace JSX {
|
|
14
13
|
interface IntrinsicElements {
|
|
15
|
-
"goa-chip": WCProps & React.HTMLAttributes<HTMLElement
|
|
14
|
+
"goa-chip": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
15
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
16
|
+
};
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
export interface GoabChipProps extends Margins {
|
|
20
|
+
export interface GoabChipProps extends Margins, DataAttributes {
|
|
20
21
|
onClick?: () => void;
|
|
21
22
|
deletable?: boolean;
|
|
22
23
|
leadingIcon?: string;
|
|
@@ -26,5 +27,5 @@ export interface GoabChipProps extends Margins {
|
|
|
26
27
|
variant?: GoabChipVariant;
|
|
27
28
|
testId?: string;
|
|
28
29
|
}
|
|
29
|
-
export declare const GoabChip: ({
|
|
30
|
+
export declare const GoabChip: ({ error, deletable, onClick, ...rest }: GoabChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export default GoabChip;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transform function type for converting prop names to attribute names.
|
|
3
|
+
*/
|
|
4
|
+
export type TransformFn = (input: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Converts a camelCase string to lowercase (e.g., "headingSize" -> "headingsize")
|
|
7
|
+
*/
|
|
8
|
+
export declare const lowercase: TransformFn;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a camelCase string to kebab-case (e.g., "verticalPosition" -> "vertical-position")
|
|
11
|
+
*/
|
|
12
|
+
export declare const kebab: TransformFn;
|
|
13
|
+
/**
|
|
14
|
+
* Transforms React props to web component attributes.
|
|
15
|
+
* Use object destructuring to extract props that need special handling,
|
|
16
|
+
* then pass the rest through this function.
|
|
17
|
+
*
|
|
18
|
+
* @param props - The remaining props after destructuring
|
|
19
|
+
* @param transform - Transform function (lowercase or kebab), defaults to lowercase
|
|
20
|
+
* @returns Converted props ready to spread on the web component
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* export function GoabAccordion({open, onChange, headingContent, children, ...rest}: GoabAccordionProps) {
|
|
24
|
+
* const _props = transformProps<WCProps>(rest, lowercase);
|
|
25
|
+
* return (
|
|
26
|
+
* <goa-accordion open={open ? "true" : undefined} {..._props}>
|
|
27
|
+
* {children}
|
|
28
|
+
* </goa-accordion>
|
|
29
|
+
* );
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
export declare function transformProps<WC = Record<string, unknown>>(props: object, transform?: TransformFn): WC;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoabContainerAccent, GoabContainerPadding, GoabContainerType, GoabContainerWidth, Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { GoabContainerAccent, GoabContainerPadding, GoabContainerType, GoabContainerWidth, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
2
2
|
import { ReactNode, JSX } from 'react';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
4
|
type?: GoabContainerType;
|
|
@@ -17,7 +17,7 @@ declare module "react" {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
export interface GoabContainerProps extends Margins {
|
|
20
|
+
export interface GoabContainerProps extends Margins, DataAttributes {
|
|
21
21
|
accent?: GoabContainerAccent;
|
|
22
22
|
type?: GoabContainerType;
|
|
23
23
|
heading?: ReactNode;
|
|
@@ -31,5 +31,5 @@ export interface GoabContainerProps extends Margins {
|
|
|
31
31
|
maxHeight?: string;
|
|
32
32
|
testId?: string;
|
|
33
33
|
}
|
|
34
|
-
export declare function GoabContainer({
|
|
34
|
+
export declare function GoabContainer({ heading, title, actions, children, ...rest }: GoabContainerProps): JSX.Element;
|
|
35
35
|
export default GoabContainer;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface WCProps {
|
|
3
|
+
"keyboard-icon-visibility"?: "visible" | "hidden";
|
|
4
|
+
"keyboard-icon-position"?: "left" | "right";
|
|
5
|
+
"keyboard-nav"?: "layout" | "table";
|
|
6
|
+
}
|
|
7
|
+
declare module "react" {
|
|
8
|
+
namespace JSX {
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
"goa-data-grid": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export interface GoabDataGridProps {
|
|
15
|
+
keyboardIconVisibility?: "visible" | "hidden";
|
|
16
|
+
keyboardIconPosition?: "left" | "right";
|
|
17
|
+
keyboardNav: "layout" | "table";
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare function GoabDataGrid({ keyboardIconVisibility, keyboardIconPosition, keyboardNav, children, }: GoabDataGridProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default GoabDataGrid;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { GoabDatePickerInputType, GoabDatePickerOnChangeDetail, Margins } from '@abgov/ui-components-common';
|
|
2
|
+
import { GoabDatePickerInputType, GoabDatePickerOnChangeDetail, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
5
4
|
name?: string;
|
|
6
5
|
value?: string;
|
|
7
6
|
error?: string;
|
|
@@ -16,11 +15,13 @@ interface WCProps extends Margins {
|
|
|
16
15
|
declare module "react" {
|
|
17
16
|
namespace JSX {
|
|
18
17
|
interface IntrinsicElements {
|
|
19
|
-
"goa-date-picker": WCProps & React.HTMLAttributes<HTMLElement
|
|
18
|
+
"goa-date-picker": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
19
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
20
|
+
};
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
export interface GoabDatePickerProps extends Margins {
|
|
24
|
+
export interface GoabDatePickerProps extends Margins, DataAttributes {
|
|
24
25
|
name?: string;
|
|
25
26
|
value?: Date | string | undefined;
|
|
26
27
|
error?: boolean;
|
|
@@ -36,5 +37,5 @@ export interface GoabDatePickerProps extends Margins {
|
|
|
36
37
|
width?: string;
|
|
37
38
|
onChange?: (detail: GoabDatePickerOnChangeDetail) => void;
|
|
38
39
|
}
|
|
39
|
-
export declare function GoabDatePicker({
|
|
40
|
+
export declare function GoabDatePicker({ value, error, min, max, disabled, relative, onChange, ...rest }: GoabDatePickerProps): JSX.Element;
|
|
40
41
|
export default GoabDatePicker;
|
package/lib/details/details.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
4
|
heading: string;
|
|
@@ -13,12 +13,12 @@ declare module "react" {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
export interface GoabDetailsProps extends Margins {
|
|
16
|
+
export interface GoabDetailsProps extends Margins, DataAttributes {
|
|
17
17
|
heading: string;
|
|
18
18
|
open?: boolean;
|
|
19
19
|
maxWidth?: string;
|
|
20
20
|
testId?: string;
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export declare function GoabDetails(
|
|
23
|
+
export declare function GoabDetails({ open, children, ...rest }: GoabDetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export default GoabDetails;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { GoabDropdownOnChangeDetail, GoabIconType, Margins } from '@abgov/ui-components-common';
|
|
1
|
+
import { GoabDropdownOnChangeDetail, GoabIconType, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
2
2
|
import { JSX } from 'react';
|
|
3
3
|
interface WCProps extends Margins {
|
|
4
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
5
4
|
arialabel?: string;
|
|
6
5
|
arialabelledby?: string;
|
|
7
6
|
disabled?: string;
|
|
@@ -24,11 +23,13 @@ interface WCProps extends Margins {
|
|
|
24
23
|
declare module "react" {
|
|
25
24
|
namespace JSX {
|
|
26
25
|
interface IntrinsicElements {
|
|
27
|
-
"goa-dropdown": WCProps & React.HTMLAttributes<HTMLElement
|
|
26
|
+
"goa-dropdown": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
27
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
28
|
+
};
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
export interface GoabDropdownProps extends Margins {
|
|
32
|
+
export interface GoabDropdownProps extends Margins, DataAttributes {
|
|
32
33
|
name?: string;
|
|
33
34
|
value?: string[] | string;
|
|
34
35
|
onChange?: (detail: GoabDropdownOnChangeDetail) => void;
|
|
@@ -53,5 +54,5 @@ export interface GoabDropdownProps extends Margins {
|
|
|
53
54
|
*/
|
|
54
55
|
relative?: boolean;
|
|
55
56
|
}
|
|
56
|
-
export declare function GoabDropdown(
|
|
57
|
+
export declare function GoabDropdown({ value, onChange, disabled, error, filterable, multiselect, native, relative, children, ...rest }: GoabDropdownProps): JSX.Element;
|
|
57
58
|
export default GoabDropdown;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { GoabFileUploadOnCancelDetail, GoabFileUploadOnDeleteDetail } from '@abgov/ui-components-common';
|
|
1
|
+
import { DataAttributes, GoabFileUploadOnCancelDetail, GoabFileUploadOnDeleteDetail } from '@abgov/ui-components-common';
|
|
2
2
|
interface WCProps {
|
|
3
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
4
3
|
filename: string;
|
|
5
4
|
size: number;
|
|
6
5
|
type?: string;
|
|
@@ -11,11 +10,13 @@ interface WCProps {
|
|
|
11
10
|
declare module "react" {
|
|
12
11
|
namespace JSX {
|
|
13
12
|
interface IntrinsicElements {
|
|
14
|
-
"goa-file-upload-card": WCProps & React.HTMLAttributes<HTMLElement
|
|
13
|
+
"goa-file-upload-card": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
14
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
15
|
+
};
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
export interface GoabFileUploadCardProps {
|
|
19
|
+
export interface GoabFileUploadCardProps extends DataAttributes {
|
|
19
20
|
filename: string;
|
|
20
21
|
size: number;
|
|
21
22
|
type?: string;
|
|
@@ -25,5 +26,5 @@ export interface GoabFileUploadCardProps {
|
|
|
25
26
|
onDelete?: (detail: GoabFileUploadOnDeleteDetail) => void;
|
|
26
27
|
onCancel?: (detail: GoabFileUploadOnCancelDetail) => void;
|
|
27
28
|
}
|
|
28
|
-
export declare function GoabFileUploadCard({
|
|
29
|
+
export declare function GoabFileUploadCard({ onDelete, onCancel, filename, ...rest }: GoabFileUploadCardProps): import("react/jsx-runtime").JSX.Element;
|
|
29
30
|
export default GoabFileUploadCard;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { GoabFileUploadInputOnSelectFileDetail, GoabFileUploadInputVariant } from '@abgov/ui-components-common';
|
|
1
|
+
import { DataAttributes, GoabFileUploadInputOnSelectFileDetail, GoabFileUploadInputVariant } from '@abgov/ui-components-common';
|
|
2
2
|
interface WCProps {
|
|
3
|
-
ref: React.RefObject<HTMLElement | null>;
|
|
4
3
|
variant?: GoabFileUploadInputVariant;
|
|
5
4
|
accept?: string;
|
|
6
5
|
maxfilesize?: string;
|
|
@@ -9,16 +8,18 @@ interface WCProps {
|
|
|
9
8
|
declare module "react" {
|
|
10
9
|
namespace JSX {
|
|
11
10
|
interface IntrinsicElements {
|
|
12
|
-
"goa-file-upload-input": WCProps & React.HTMLAttributes<HTMLElement
|
|
11
|
+
"goa-file-upload-input": WCProps & React.HTMLAttributes<HTMLElement> & {
|
|
12
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
13
|
+
};
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
export interface GoabFileUploadInputProps {
|
|
17
|
+
export interface GoabFileUploadInputProps extends DataAttributes {
|
|
17
18
|
variant?: GoabFileUploadInputVariant;
|
|
18
19
|
accept?: string;
|
|
19
20
|
maxFileSize?: string;
|
|
20
21
|
testId?: string;
|
|
21
22
|
onSelectFile: (detail: GoabFileUploadInputOnSelectFileDetail) => void;
|
|
22
23
|
}
|
|
23
|
-
export declare function GoabFileUploadInput({
|
|
24
|
+
export declare function GoabFileUploadInput({ onSelectFile, ...rest }: GoabFileUploadInputProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export default GoabFileUploadInput;
|