@abgov/react-components 4.17.0-alpha.2 → 4.17.0-alpha.20

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.
Files changed (78) hide show
  1. package/common/styling.d.ts +12 -9
  2. package/index.d.ts +56 -59
  3. package/index.js +23481 -0
  4. package/index.js.map +1 -0
  5. package/index.mjs +23481 -0
  6. package/index.mjs.map +1 -0
  7. package/lib/accordion/accordion.d.ts +28 -28
  8. package/lib/app-header/app-header.d.ts +23 -22
  9. package/lib/app-header-menu/app-header-menu.d.ts +20 -20
  10. package/lib/badge/badge.d.ts +40 -41
  11. package/lib/block/block.d.ts +23 -22
  12. package/lib/button/button.d.ts +38 -35
  13. package/lib/button-group/button-group.d.ts +23 -23
  14. package/lib/calendar/calendar.d.ts +24 -25
  15. package/lib/callout/callout.d.ts +25 -25
  16. package/lib/checkbox/checkbox.d.ts +37 -37
  17. package/lib/chip/chip.d.ts +28 -29
  18. package/lib/circular-progress/circular-progress.d.ts +28 -27
  19. package/lib/container/container.d.ts +29 -29
  20. package/lib/date-picker/date-picker.d.ts +24 -25
  21. package/lib/details/details.d.ts +21 -20
  22. package/lib/divider/divider.d.ts +13 -13
  23. package/lib/dropdown/dropdown-item.d.ts +23 -24
  24. package/lib/dropdown/dropdown.d.ts +49 -50
  25. package/lib/file-upload-card/file-upload-card.d.ts +26 -27
  26. package/lib/file-upload-input/file-upload-input.d.ts +22 -23
  27. package/lib/footer/footer.d.ts +19 -18
  28. package/lib/footer-meta-section/footer-meta-section.d.ts +14 -13
  29. package/lib/footer-nav-section/footer-nav-section.d.ts +20 -20
  30. package/lib/{form → form-item}/form-item.d.ts +30 -30
  31. package/lib/form-step/form-step.d.ts +19 -19
  32. package/lib/form-stepper/form-stepper.d.ts +22 -21
  33. package/lib/grid/grid.d.ts +20 -21
  34. package/lib/hero-banner/hero-banner-actions.d.ts +5 -6
  35. package/lib/hero-banner/hero-banner.d.ts +27 -28
  36. package/lib/icon/icon.d.ts +41 -39
  37. package/lib/icon-button/icon-button.d.ts +31 -31
  38. package/lib/input/input.d.ts +112 -115
  39. package/lib/microsite-header/microsite-header.d.ts +30 -28
  40. package/lib/modal/modal.d.ts +36 -34
  41. package/lib/notification/notification.d.ts +27 -26
  42. package/lib/one-column-layout/one-column-layout.d.ts +14 -13
  43. package/lib/page-block/page-block.d.ts +19 -17
  44. package/lib/pages/pages.d.ts +18 -18
  45. package/lib/pagination/pagination.d.ts +26 -26
  46. package/lib/popover/popover.d.ts +27 -27
  47. package/lib/radio-group/radio-group.d.ts +32 -32
  48. package/lib/radio-group/radio.d.ts +29 -30
  49. package/lib/side-menu/side-menu.d.ts +14 -13
  50. package/lib/side-menu-group/side-menu-group.d.ts +17 -17
  51. package/lib/side-menu-heading/side-menu-heading.d.ts +19 -19
  52. package/lib/skeleton/skeleton.d.ts +27 -26
  53. package/lib/spacer/spacer.d.ts +20 -20
  54. package/lib/spinner/spinner.d.ts +25 -25
  55. package/lib/tab/tab.d.ts +17 -17
  56. package/lib/table/table-sort-header.d.ts +19 -20
  57. package/lib/table/table.d.ts +27 -25
  58. package/lib/tabs/tabs.d.ts +16 -17
  59. package/lib/textarea/textarea.d.ts +41 -39
  60. package/lib/three-column-layout/three-column-layout.d.ts +26 -26
  61. package/lib/tooltip/tooltip.d.ts +25 -23
  62. package/lib/two-column-layout/two-column-layout.d.ts +22 -22
  63. package/package.json +16 -11
  64. package/README.md +0 -34
  65. package/experimental/index.d.ts +0 -0
  66. package/experimental/package.json +0 -11
  67. package/experimental/react-components.esm.js +0 -1
  68. package/experimental/react-components.umd.js +0 -8
  69. package/lib/card/card-actions.d.ts +0 -13
  70. package/lib/card/card-content.d.ts +0 -13
  71. package/lib/card/card-group.d.ts +0 -13
  72. package/lib/card/card-image.d.ts +0 -18
  73. package/lib/card/card.d.ts +0 -22
  74. package/lib/card/index.d.ts +0 -5
  75. package/lib/form/index.d.ts +0 -1
  76. package/lib/form/validators.d.ts +0 -10
  77. package/react-components.esm.js +0 -3383
  78. package/react-components.umd.js +0 -3443
@@ -1,32 +1,32 @@
1
- import React, { FC } from "react";
2
- import { Margins } from "../../common/styling";
3
- export * from "./radio";
4
- interface RadioGroupProps extends Margins {
5
- ref: React.RefObject<HTMLElement>;
6
- name: string;
7
- value?: string;
8
- orientation: string;
9
- disabled: boolean;
10
- error: boolean;
11
- arialabel?: string;
12
- }
13
- declare global {
14
- namespace JSX {
15
- interface IntrinsicElements {
16
- "goa-radio-group": RadioGroupProps & React.HTMLAttributes<HTMLElement>;
17
- }
18
- }
19
- }
20
- interface Props extends Margins {
21
- name: string;
22
- value?: string;
23
- disabled?: boolean;
24
- orientation?: "horizontal" | "vertical";
25
- testId?: string;
26
- error?: boolean;
27
- ariaLabel?: string;
28
- children?: React.ReactNode;
29
- onChange: (name: string, value: string) => void;
30
- }
31
- export declare const GoARadioGroup: FC<Props>;
32
- export default GoARadioGroup;
1
+ import { Margins } from "../../common/styling";
2
+ export * from "./radio";
3
+ export type GoARadioGroupOrientation = "horizontal" | "vertical";
4
+ interface WCProps extends Margins {
5
+ ref: React.RefObject<HTMLElement>;
6
+ name: string;
7
+ value?: string;
8
+ orientation?: GoARadioGroupOrientation;
9
+ disabled?: boolean;
10
+ error?: boolean;
11
+ arialabel?: string;
12
+ }
13
+ declare global {
14
+ namespace JSX {
15
+ interface IntrinsicElements {
16
+ "goa-radio-group": WCProps & React.HTMLAttributes<HTMLElement>;
17
+ }
18
+ }
19
+ }
20
+ export interface GoARadioGroupProps extends Margins {
21
+ name: string;
22
+ value?: string;
23
+ disabled?: boolean;
24
+ orientation?: GoARadioGroupOrientation;
25
+ testId?: string;
26
+ error?: boolean;
27
+ ariaLabel?: string;
28
+ children?: React.ReactNode;
29
+ onChange: (name: string, value: string) => void;
30
+ }
31
+ export declare function GoARadioGroup({ name, value, children, orientation, disabled, error, testId, ariaLabel, mt, mr, mb, ml, onChange, }: GoARadioGroupProps): JSX.Element;
32
+ export default GoARadioGroup;
@@ -1,30 +1,29 @@
1
- import React, { FC } from "react";
2
- interface RadioItemProps {
3
- name?: string;
4
- value: string;
5
- description?: string;
6
- label?: string;
7
- disabled?: boolean;
8
- checked?: boolean;
9
- error?: boolean;
10
- }
11
- declare global {
12
- namespace JSX {
13
- interface IntrinsicElements {
14
- "goa-radio-item": RadioItemProps & React.HTMLAttributes<HTMLElement>;
15
- }
16
- }
17
- }
18
- interface Props {
19
- value: string;
20
- label?: string;
21
- name?: string;
22
- description?: string;
23
- disabled?: boolean;
24
- checked?: boolean;
25
- error?: boolean;
26
- children?: React.ReactNode;
27
- testId?: string;
28
- }
29
- export declare const GoARadioItem: FC<Props>;
30
- export default GoARadioItem;
1
+ interface RadioItemProps {
2
+ name?: string;
3
+ value?: string;
4
+ description?: string | React.ReactNode;
5
+ label?: string;
6
+ disabled?: boolean;
7
+ checked?: boolean;
8
+ error?: boolean;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ "goa-radio-item": RadioItemProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ export interface GoARadioItemProps {
18
+ value?: string;
19
+ label?: string;
20
+ name?: string;
21
+ description?: string | React.ReactNode;
22
+ disabled?: boolean;
23
+ checked?: boolean;
24
+ error?: boolean;
25
+ children?: React.ReactNode;
26
+ testId?: string;
27
+ }
28
+ export declare function GoARadioItem({ name, label, value, description, disabled, checked, error, testId, children, }: GoARadioItemProps): JSX.Element;
29
+ export default GoARadioItem;
@@ -1,13 +1,14 @@
1
- import React, { ReactNode } from "react";
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicElements {
5
- "goa-side-menu": React.HTMLAttributes<HTMLElement>;
6
- }
7
- }
8
- }
9
- export interface SideMenuProps {
10
- children: ReactNode;
11
- }
12
- export declare function GoASideMenu(props: SideMenuProps): JSX.Element;
13
- export default GoASideMenu;
1
+ import { ReactNode } from "react";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "goa-side-menu": React.HTMLAttributes<HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export interface GoASideMenuProps {
10
+ children: ReactNode;
11
+ }
12
+ export type SideMenuProps = GoASideMenuProps;
13
+ export declare function GoASideMenu(props: GoASideMenuProps): JSX.Element;
14
+ export default GoASideMenu;
@@ -1,17 +1,17 @@
1
- import React, { ReactNode } from "react";
2
- interface WCProps {
3
- heading: string;
4
- }
5
- declare global {
6
- namespace JSX {
7
- interface IntrinsicElements {
8
- "goa-side-menu-group": WCProps & React.HTMLAttributes<HTMLElement>;
9
- }
10
- }
11
- }
12
- interface SideMenuGroupProps {
13
- heading: string;
14
- children?: ReactNode;
15
- }
16
- export declare function GoASideMenuGroup(props: SideMenuGroupProps): JSX.Element;
17
- export default GoASideMenuGroup;
1
+ import { ReactNode } from "react";
2
+ interface WCProps {
3
+ heading: string;
4
+ }
5
+ declare global {
6
+ namespace JSX {
7
+ interface IntrinsicElements {
8
+ "goa-side-menu-group": WCProps & React.HTMLAttributes<HTMLElement>;
9
+ }
10
+ }
11
+ }
12
+ export interface GoASideMenuGroupProps {
13
+ heading: string;
14
+ children?: ReactNode;
15
+ }
16
+ export declare function GoASideMenuGroup(props: GoASideMenuGroupProps): JSX.Element;
17
+ export default GoASideMenuGroup;
@@ -1,19 +1,19 @@
1
- import React, { ReactNode } from "react";
2
- import { GoAIconType } from "../icon/icon";
3
- interface WCProps {
4
- icon?: GoAIconType;
5
- }
6
- declare global {
7
- namespace JSX {
8
- interface IntrinsicElements {
9
- "goa-side-menu-heading": WCProps & React.HTMLAttributes<HTMLElement>;
10
- }
11
- }
12
- }
13
- interface SideMenuSectionTitleProps {
14
- meta?: ReactNode;
15
- icon?: GoAIconType;
16
- children?: ReactNode;
17
- }
18
- export declare function GoASideMenuHeading(props: SideMenuSectionTitleProps): JSX.Element;
19
- export default GoASideMenuHeading;
1
+ import { ReactNode } from "react";
2
+ import { GoAIconType } from "../icon/icon";
3
+ interface WCProps {
4
+ icon?: GoAIconType;
5
+ }
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-side-menu-heading": WCProps & React.HTMLAttributes<HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export interface GoASideMenuHeadingProps {
14
+ meta?: ReactNode;
15
+ icon?: GoAIconType;
16
+ children?: ReactNode;
17
+ }
18
+ export declare function GoASideMenuHeading(props: GoASideMenuHeadingProps): import("react/jsx-runtime").JSX.Element;
19
+ export default GoASideMenuHeading;
@@ -1,26 +1,27 @@
1
- import React from "react";
2
- import { Margins } from "../../common/styling";
3
- export declare type SkeletonType = "image" | "text" | "title" | "text-small" | "avatar" | "header" | "paragraph" | "thumbnail" | "card" | "profile" | "article";
4
- declare type SkeletonSize = 1 | 2 | 3 | 4;
5
- interface WCProps extends Margins {
6
- maxwidth?: string;
7
- size?: SkeletonSize;
8
- linecount?: number;
9
- type: SkeletonType;
10
- }
11
- declare global {
12
- namespace JSX {
13
- interface IntrinsicElements {
14
- "goa-skeleton": WCProps & React.HTMLAttributes<HTMLElement>;
15
- }
16
- }
17
- }
18
- export interface SkeletonProps extends Margins {
19
- maxWidth?: string;
20
- size?: SkeletonSize;
21
- lineCount?: number;
22
- type: SkeletonType;
23
- testId?: string;
24
- }
25
- export declare const GoASkeleton: ({ maxWidth, size, lineCount, type, testId, mt, mr, mb, ml, }: SkeletonProps) => JSX.Element;
26
- export default GoASkeleton;
1
+ import { Margins } from "../../common/styling";
2
+ export type GoASkeletonType = "image" | "text" | "title" | "text-small" | "avatar" | "header" | "paragraph" | "thumbnail" | "card" | "profile" | "article";
3
+ export type GoASkeletonSize = 1 | 2 | 3 | 4;
4
+ export type SkeletonType = GoASkeletonType;
5
+ interface WCProps extends Margins {
6
+ maxwidth?: string;
7
+ size?: GoASkeletonSize;
8
+ linecount?: number;
9
+ type: GoASkeletonType;
10
+ }
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ "goa-skeleton": WCProps & React.HTMLAttributes<HTMLElement>;
15
+ }
16
+ }
17
+ }
18
+ export interface GoASkeletonProps extends Margins {
19
+ maxWidth?: string;
20
+ size?: GoASkeletonSize;
21
+ lineCount?: number;
22
+ type: GoASkeletonType;
23
+ testId?: string;
24
+ }
25
+ export type SkeletonProps = GoASkeletonProps;
26
+ export declare const GoASkeleton: ({ maxWidth, size, lineCount, type, testId, mt, mr, mb, ml, }: GoASkeletonProps) => import("react/jsx-runtime").JSX.Element;
27
+ export default GoASkeleton;
@@ -1,20 +1,20 @@
1
- import React from "react";
2
- import { Spacing } from "../../common/styling";
3
- interface WCProps {
4
- hspacing?: Spacing | "fill";
5
- vspacing?: Spacing;
6
- }
7
- declare global {
8
- namespace JSX {
9
- interface IntrinsicElements {
10
- "goa-spacer": WCProps & React.HTMLAttributes<HTMLElement>;
11
- }
12
- }
13
- }
14
- export interface SpacerProps {
15
- hSpacing?: Spacing | "fill";
16
- vSpacing?: Spacing;
17
- testId?: string;
18
- }
19
- export declare function GoASpacer(props: SpacerProps): JSX.Element;
20
- export default GoASpacer;
1
+ import { Spacing } from "../../common/styling";
2
+ interface WCProps {
3
+ hspacing?: Spacing | "fill";
4
+ vspacing?: Spacing;
5
+ }
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-spacer": WCProps & React.HTMLAttributes<HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export interface GoASpacerProps {
14
+ hSpacing?: Spacing | "fill";
15
+ vSpacing?: Spacing;
16
+ testId?: string;
17
+ }
18
+ export type SpacerProps = GoASpacerProps;
19
+ export declare function GoASpacer(props: GoASpacerProps): import("react/jsx-runtime").JSX.Element;
20
+ export default GoASpacer;
@@ -1,25 +1,25 @@
1
- import React from "react";
2
- export declare type SpinnerType = "infinite" | "progress";
3
- export declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
4
- interface WCProps {
5
- size: SpinnerSize;
6
- type: SpinnerType;
7
- invert?: boolean;
8
- progress?: number;
9
- }
10
- declare global {
11
- namespace JSX {
12
- interface IntrinsicElements {
13
- "goa-spinner": WCProps & React.HTMLAttributes<HTMLElement>;
14
- }
15
- }
16
- }
17
- export interface SpinnerProps {
18
- type: SpinnerType;
19
- size: SpinnerSize;
20
- invert?: boolean;
21
- progress?: number;
22
- testId?: string;
23
- }
24
- export declare const GoASpinner: ({ type, size, progress, invert, testId, }: SpinnerProps) => JSX.Element;
25
- export default GoASpinner;
1
+ export type SpinnerType = "infinite" | "progress";
2
+ export type SpinnerSize = "small" | "medium" | "large" | "xlarge";
3
+ interface WCProps {
4
+ size: SpinnerSize;
5
+ type: SpinnerType;
6
+ invert?: boolean;
7
+ progress?: number;
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ "goa-spinner": WCProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+ export interface GoASpinnerProps {
17
+ type: SpinnerType;
18
+ size: SpinnerSize;
19
+ invert?: boolean;
20
+ progress?: number;
21
+ testId?: string;
22
+ }
23
+ export type SpinnerProps = GoASpinnerProps;
24
+ export declare function GoASpinner({ type, size, progress, invert, testId, }: GoASpinnerProps): JSX.Element;
25
+ export default GoASpinner;
package/lib/tab/tab.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import React, { FC } from "react";
2
- interface WCProps {
3
- heading?: React.ReactNode;
4
- }
5
- declare global {
6
- namespace JSX {
7
- interface IntrinsicElements {
8
- "goa-tab": WCProps & React.HTMLAttributes<HTMLElement>;
9
- }
10
- }
11
- }
12
- export interface TabItemProps {
13
- heading?: React.ReactNode;
14
- children?: React.ReactNode;
15
- }
16
- export declare const GoATab: FC<TabItemProps>;
17
- export {};
1
+ interface WCProps {
2
+ heading?: React.ReactNode;
3
+ }
4
+ declare global {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ "goa-tab": WCProps & React.HTMLAttributes<HTMLElement>;
8
+ }
9
+ }
10
+ }
11
+ export interface GoATabItemProps {
12
+ heading?: React.ReactNode;
13
+ children?: React.ReactNode;
14
+ }
15
+ export type TabItemProps = GoATabItemProps;
16
+ export declare function GoATab({ heading, children }: GoATabItemProps): JSX.Element;
17
+ export {};
@@ -1,20 +1,19 @@
1
- import React, { FC } from "react";
2
- export declare type Direction = "asc" | "desc" | "none";
3
- interface WCProps {
4
- name?: string;
5
- direction?: Direction;
6
- }
7
- declare global {
8
- namespace JSX {
9
- interface IntrinsicElements {
10
- "goa-table-sort-header": WCProps & React.HTMLAttributes<HTMLElement>;
11
- }
12
- }
13
- }
14
- interface Props {
15
- name?: string;
16
- direction?: Direction;
17
- children?: React.ReactNode;
18
- }
19
- export declare const GoATableSortHeader: FC<Props>;
20
- export default GoATableSortHeader;
1
+ export type GoATableSortDirection = "asc" | "desc" | "none";
2
+ interface WCProps {
3
+ name?: string;
4
+ direction?: GoATableSortDirection;
5
+ }
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-table-sort-header": WCProps & React.HTMLAttributes<HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export interface GoATableSortProps {
14
+ name?: string;
15
+ direction?: GoATableSortDirection;
16
+ children?: React.ReactNode;
17
+ }
18
+ export declare function GoATableSortHeader({ name, direction, children, }: GoATableSortProps): JSX.Element;
19
+ export default GoATableSortHeader;
@@ -1,25 +1,27 @@
1
- import React, { ReactNode } from "react";
2
- import { Margins } from "../../common/styling";
3
- export declare type TableVariant = "normal" | "relaxed";
4
- interface WCProps extends Margins {
5
- ref?: React.MutableRefObject<HTMLElement | null>;
6
- width?: string;
7
- stickyheader?: boolean;
8
- variant?: TableVariant;
9
- }
10
- declare global {
11
- namespace JSX {
12
- interface IntrinsicElements {
13
- "goa-table": WCProps & React.HTMLAttributes<HTMLElement>;
14
- }
15
- }
16
- }
17
- export interface TableProps extends Margins {
18
- width?: string;
19
- onSort?: (sortBy: string, sortDir: number) => void;
20
- variant?: TableVariant;
21
- testId?: string;
22
- children?: ReactNode;
23
- }
24
- export declare function GoATable(props: TableProps): JSX.Element;
25
- export default GoATable;
1
+ import { ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ export type GoATableVariant = "normal" | "relaxed";
4
+ export type TableVariant = GoATableVariant;
5
+ interface WCProps extends Margins {
6
+ ref?: React.MutableRefObject<HTMLElement | null>;
7
+ width?: string;
8
+ stickyheader?: boolean;
9
+ variant?: GoATableVariant;
10
+ }
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ "goa-table": WCProps & React.HTMLAttributes<HTMLElement>;
15
+ }
16
+ }
17
+ }
18
+ export interface GoATableProps extends Margins {
19
+ width?: string;
20
+ onSort?: (sortBy: string, sortDir: number) => void;
21
+ variant?: GoATableVariant;
22
+ testId?: string;
23
+ children?: ReactNode;
24
+ }
25
+ export type TableProps = GoATableProps;
26
+ export declare function GoATable({ onSort, ...props }: GoATableProps): import("react/jsx-runtime").JSX.Element;
27
+ export default GoATable;
@@ -1,17 +1,16 @@
1
- import React from "react";
2
- interface WCProps {
3
- initialtab?: number;
4
- }
5
- declare global {
6
- namespace JSX {
7
- interface IntrinsicElements {
8
- "goa-tabs": WCProps & React.HTMLAttributes<HTMLElement>;
9
- }
10
- }
11
- }
12
- interface TabsProps {
13
- initialTab?: number;
14
- children?: React.ReactNode;
15
- }
16
- export declare function GoATabs({ initialTab, children }: TabsProps): JSX.Element;
17
- export default GoATabs;
1
+ interface WCProps {
2
+ initialtab?: number;
3
+ }
4
+ declare global {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ "goa-tabs": WCProps & React.HTMLAttributes<HTMLElement>;
8
+ }
9
+ }
10
+ }
11
+ export interface GoATabsProps {
12
+ initialTab?: number;
13
+ children?: React.ReactNode;
14
+ }
15
+ export declare function GoATabs({ initialTab, children }: GoATabsProps): JSX.Element;
16
+ export default GoATabs;
@@ -1,39 +1,41 @@
1
- import React, { FC } from "react";
2
- import { Margins } from "../../common/styling";
3
- interface WCProps extends Margins {
4
- ref: React.Ref<HTMLTextAreaElement>;
5
- name: string;
6
- value: string;
7
- placeholder?: string;
8
- rows?: number;
9
- error?: boolean;
10
- disabled?: boolean;
11
- showcounter?: boolean;
12
- maxcharcount?: number;
13
- width?: string;
14
- arialabel?: string;
15
- }
16
- declare global {
17
- namespace JSX {
18
- interface IntrinsicElements {
19
- "goa-textarea": WCProps & React.HTMLAttributes<HTMLElement>;
20
- }
21
- }
22
- }
23
- interface Props extends Margins {
24
- name: string;
25
- value: string;
26
- id?: string;
27
- placeholder?: string;
28
- rows?: number;
29
- error?: boolean;
30
- disabled?: boolean;
31
- showCounter?: boolean;
32
- maxCharCount?: number;
33
- width?: string;
34
- testId?: string;
35
- ariaLabel?: string;
36
- onChange: (name: string, value: string) => void;
37
- }
38
- export declare const GoATextArea: FC<Props>;
39
- export default GoATextArea;
1
+ import { Margins } from "../../common/styling";
2
+ type CountBy = "character" | "word";
3
+ interface WCProps extends Margins {
4
+ ref: React.Ref<HTMLTextAreaElement>;
5
+ name: string;
6
+ value?: string;
7
+ placeholder?: string;
8
+ rows?: number;
9
+ error?: boolean;
10
+ disabled?: boolean;
11
+ width?: string;
12
+ arialabel?: string;
13
+ countby?: CountBy;
14
+ maxcount?: number;
15
+ }
16
+ declare global {
17
+ namespace JSX {
18
+ interface IntrinsicElements {
19
+ "goa-textarea": WCProps & React.HTMLAttributes<HTMLElement>;
20
+ }
21
+ }
22
+ }
23
+ export interface GoATextAreaProps extends Margins {
24
+ name: string;
25
+ value?: string;
26
+ id?: string;
27
+ placeholder?: string;
28
+ rows?: number;
29
+ error?: boolean;
30
+ disabled?: boolean;
31
+ width?: string;
32
+ testId?: string;
33
+ ariaLabel?: string;
34
+ countBy?: CountBy;
35
+ maxCount?: number;
36
+ onChange: (name: string, value: string) => void;
37
+ onKeyPress?: (name: string, value: string, key: string) => void;
38
+ }
39
+ export declare function GoATextarea({ name, value, placeholder, rows, disabled, countBy, maxCount, width, testId, error, ariaLabel, mt, mr, mb, ml, onChange, onKeyPress, }: GoATextAreaProps): JSX.Element;
40
+ export { GoATextarea as GoATextArea };
41
+ export default GoATextarea;