@abgov/react-components 4.0.0-alpha.16 → 4.0.0-alpha.160

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 (70) hide show
  1. package/README.md +20 -45
  2. package/common/styling.d.ts +9 -0
  3. package/experimental/package.json +2 -1
  4. package/index.d.ts +49 -36
  5. package/lib/accordion/accordion.d.ts +27 -0
  6. package/lib/app-header/app-header.d.ts +8 -4
  7. package/lib/badge/badge.d.ts +23 -10
  8. package/lib/block/block.d.ts +22 -0
  9. package/lib/button/button.d.ts +13 -14
  10. package/lib/button-group/button-group.d.ts +13 -8
  11. package/lib/callout/callout.d.ts +13 -8
  12. package/lib/card/card-actions.d.ts +2 -5
  13. package/lib/card/card-content.d.ts +2 -2
  14. package/lib/card/card-group.d.ts +2 -5
  15. package/lib/card/card-image.d.ts +2 -2
  16. package/lib/card/card.d.ts +10 -6
  17. package/lib/card/index.d.ts +5 -5
  18. package/lib/checkbox/checkbox.d.ts +10 -6
  19. package/lib/chip/chip.d.ts +10 -5
  20. package/lib/circular-progress/circular-progress.d.ts +4 -6
  21. package/lib/container/container.d.ts +17 -11
  22. package/lib/details/details.d.ts +20 -0
  23. package/lib/divider/divider.d.ts +13 -0
  24. package/lib/dropdown/dropdown-item.d.ts +22 -0
  25. package/lib/dropdown/dropdown.d.ts +19 -15
  26. package/lib/file-upload-card/file-upload-card.d.ts +27 -0
  27. package/lib/file-upload-input/file-upload-input.d.ts +23 -0
  28. package/lib/footer/footer.d.ts +18 -0
  29. package/lib/footer-meta-section/footer-meta-section.d.ts +13 -0
  30. package/lib/footer-nav-section/footer-nav-section.d.ts +20 -0
  31. package/lib/form/form-item.d.ts +10 -6
  32. package/lib/form/index.d.ts +1 -1
  33. package/lib/form-step/form-step.d.ts +19 -0
  34. package/lib/form-stepper/form-stepper.d.ts +21 -0
  35. package/lib/grid/grid.d.ts +21 -0
  36. package/lib/hero-banner/hero-banner-actions.d.ts +5 -3
  37. package/lib/hero-banner/hero-banner.d.ts +10 -4
  38. package/lib/icon/icon.d.ts +39 -0
  39. package/lib/icon-button/icon-button.d.ts +31 -0
  40. package/lib/input/input.d.ts +63 -39
  41. package/lib/microsite-header/microsite-header.d.ts +8 -5
  42. package/lib/modal/modal.d.ts +13 -6
  43. package/lib/notification/notification.d.ts +13 -5
  44. package/lib/one-column-layout/one-column-layout.d.ts +13 -0
  45. package/lib/page-block/page-block.d.ts +11 -3
  46. package/lib/pages/pages.d.ts +18 -0
  47. package/lib/pagination/pagination.d.ts +26 -0
  48. package/lib/popover/popover.d.ts +21 -0
  49. package/lib/radio-group/radio-group.d.ts +10 -6
  50. package/lib/radio-group/radio.d.ts +3 -2
  51. package/lib/skeleton/skeleton.d.ts +15 -8
  52. package/lib/spacer/spacer.d.ts +20 -0
  53. package/lib/spinner/spinner.d.ts +3 -4
  54. package/lib/table/table-sort-header.d.ts +20 -0
  55. package/lib/table/table.d.ts +25 -0
  56. package/lib/textarea/textarea.d.ts +7 -4
  57. package/lib/three-column-layout/three-column-layout.d.ts +25 -0
  58. package/lib/two-column-layout/two-column-layout.d.ts +22 -0
  59. package/package.json +6 -6
  60. package/react-components.esm.js +1470 -243
  61. package/react-components.umd.js +2161 -927
  62. package/lib/app-footer/app-footer.d.ts +0 -26
  63. package/lib/app-footer/meta-link.d.ts +0 -20
  64. package/lib/app-footer/navigation-link.d.ts +0 -22
  65. package/lib/dropdown/dropdown-option.d.ts +0 -21
  66. package/lib/flex/index.d.ts +0 -1
  67. package/lib/flex/row.d.ts +0 -16
  68. package/lib/icons/icon-button.d.ts +0 -27
  69. package/lib/icons/icon.d.ts +0 -37
  70. package/lib/icons/index.d.ts +0 -2
@@ -1,23 +1,29 @@
1
- import React, { FC, ReactNode } from 'react';
2
- declare type ContainerVariant = 'primary' | 'info' | 'error' | 'success' | 'warning' | 'default';
3
- declare type HeadingSize = 'large' | 'small' | 'none';
4
- interface WCProps {
5
- variant: ContainerVariant;
6
- headingsize: HeadingSize;
1
+ import React, { FC, ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ declare type ContainerType = "interactive" | "non-interactive" | "info" | "error" | "success" | "important";
4
+ declare type Accent = "thick" | "thin" | "filled";
5
+ declare type ContainerPadding = "relaxed" | "compact";
6
+ interface WCProps extends Margins {
7
+ type?: ContainerType;
8
+ accent?: Accent;
9
+ padding?: ContainerPadding;
7
10
  }
8
11
  declare global {
9
12
  namespace JSX {
10
13
  interface IntrinsicElements {
11
- 'goa-container': WCProps & React.HTMLAttributes<HTMLElement>;
14
+ "goa-container": WCProps & React.HTMLAttributes<HTMLElement>;
12
15
  }
13
16
  }
14
17
  }
15
- interface Props {
16
- headingSize: HeadingSize;
17
- variant?: ContainerVariant;
18
+ interface Props extends Margins {
19
+ accent?: Accent;
20
+ type?: ContainerType;
21
+ heading?: ReactNode;
18
22
  title?: ReactNode;
23
+ padding?: ContainerPadding;
19
24
  actions?: ReactNode;
20
- children: ReactNode;
25
+ children?: ReactNode;
26
+ testId?: string;
21
27
  }
22
28
  export declare const GoAContainer: FC<Props>;
23
29
  export default GoAContainer;
@@ -0,0 +1,20 @@
1
+ import React, { ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ interface WCProps extends Margins {
4
+ heading: string;
5
+ open?: boolean;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-details": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ export interface DetailsProps extends Margins {
15
+ heading: string;
16
+ open?: boolean;
17
+ children: ReactNode;
18
+ }
19
+ export declare function GoADetails(props: DetailsProps): JSX.Element;
20
+ export default GoADetails;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Margins } from "../../common/styling";
3
+ declare global {
4
+ namespace JSX {
5
+ interface IntrinsicElements {
6
+ "goa-divider": Margins & React.HTMLAttributes<HTMLElement>;
7
+ }
8
+ }
9
+ }
10
+ export declare function GoADivider(props: Margins & {
11
+ testId?: string;
12
+ }): JSX.Element;
13
+ export default GoADivider;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ interface WCProps {
3
+ value: string;
4
+ label?: string;
5
+ name?: string;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-dropdown-item": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ interface Props {
15
+ value: string;
16
+ label?: string;
17
+ testId?: string;
18
+ name?: string;
19
+ }
20
+ export declare function GoADropdownOption(props: Props): JSX.Element;
21
+ export declare function GoADropdownItem({ value, label, name, testId }: Props): JSX.Element;
22
+ export {};
@@ -1,37 +1,41 @@
1
1
  import React, { FC } from "react";
2
- import { GoAIconType } from "../icons";
3
- export * from './dropdown-option';
4
- interface WCProps {
2
+ import { Margins } from "../../common/styling";
3
+ import { GoAIconType } from "../icon/icon";
4
+ interface WCProps extends Margins {
5
5
  ref: React.MutableRefObject<HTMLElement | null>;
6
- name: string;
7
- value: string;
8
- leadingicon?: string;
9
- maxheight?: string;
10
- placeholder?: string;
11
- filterable?: boolean;
6
+ arialabel?: string;
12
7
  disabled?: boolean;
13
8
  error?: boolean;
9
+ filterable?: boolean;
10
+ leadingicon?: string;
11
+ maxheight?: string;
14
12
  multiselect?: boolean;
13
+ name?: string;
14
+ native?: boolean;
15
+ placeholder?: string;
16
+ value?: string;
15
17
  width?: string;
16
- testid?: string;
17
18
  }
18
19
  declare global {
19
20
  namespace JSX {
20
21
  interface IntrinsicElements {
21
- 'goa-dropdown': WCProps & React.HTMLAttributes<HTMLElement>;
22
+ "goa-dropdown": WCProps & React.HTMLAttributes<HTMLElement>;
22
23
  }
23
24
  }
24
25
  }
25
- interface Props {
26
- name: string;
27
- value: string[] | string;
26
+ interface Props extends Margins {
27
+ name?: string;
28
+ value?: string[] | string;
28
29
  onChange: (name: string, values: string[] | string) => void;
30
+ ariaLabel?: string;
31
+ children?: React.ReactNode;
29
32
  disabled?: boolean;
33
+ error?: boolean;
30
34
  filterable?: boolean;
31
35
  leadingIcon?: GoAIconType;
32
36
  maxHeight?: string;
33
- error?: boolean;
34
37
  multiselect?: boolean;
38
+ native?: boolean;
35
39
  placeholder?: string;
36
40
  testId?: string;
37
41
  width?: string;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ interface WCProps {
3
+ ref: React.MutableRefObject<HTMLElement | null>;
4
+ filename: string;
5
+ size: number;
6
+ type?: string;
7
+ progress?: number;
8
+ error?: string;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ "goa-file-upload-card": WCProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ interface FileUploadCardProps {
18
+ filename: string;
19
+ size: number;
20
+ type?: string;
21
+ progress?: number;
22
+ error?: string;
23
+ onDelete?: () => void;
24
+ onCancel?: () => void;
25
+ }
26
+ export declare function GoAFileUploadCard({ filename, size, type, progress, error, onDelete, onCancel, }: FileUploadCardProps): JSX.Element;
27
+ export default GoAFileUploadCard;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ declare type Variant = "dragdrop" | "button";
3
+ interface WCProps {
4
+ ref: React.MutableRefObject<HTMLElement | null>;
5
+ variant?: Variant;
6
+ accept?: string;
7
+ maxfilesize?: string;
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ "goa-file-upload-input": WCProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+ interface FileUploadInputProps {
17
+ variant?: Variant;
18
+ accept?: string;
19
+ maxFileSize?: string;
20
+ onSelectFile: (file: File) => void;
21
+ }
22
+ export declare function GoAFileUploadInput({ variant, accept, maxFileSize, onSelectFile, }: FileUploadInputProps): JSX.Element;
23
+ export default GoAFileUploadInput;
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from "react";
2
+ interface WCProps {
3
+ maxcontentwidth?: string;
4
+ }
5
+ declare global {
6
+ namespace JSX {
7
+ interface IntrinsicElements {
8
+ "goa-app-footer": WCProps & React.HTMLAttributes<HTMLElement>;
9
+ }
10
+ }
11
+ }
12
+ export interface FooterProps {
13
+ maxContentWidth?: string;
14
+ children?: ReactNode;
15
+ testId?: string;
16
+ }
17
+ export declare function GoAAppFooter({ maxContentWidth, children, testId, }: FooterProps): JSX.Element;
18
+ export default GoAAppFooter;
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from "react";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "goa-app-footer-meta-section": React.HTMLAttributes<HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export interface FooterMetaSectionProps {
10
+ children?: ReactNode;
11
+ }
12
+ export declare function GoAAppFooterMetaSection({ children }: FooterMetaSectionProps): JSX.Element;
13
+ export default GoAAppFooterMetaSection;
@@ -0,0 +1,20 @@
1
+ import React, { ReactNode } from "react";
2
+ interface WCProps {
3
+ maxcolumncount?: number;
4
+ heading?: string;
5
+ }
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-app-footer-nav-section": WCProps & React.HTMLAttributes<HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ interface FooterNavSectionProps {
14
+ maxColumnCount?: number;
15
+ heading?: string;
16
+ testId?: string;
17
+ children?: ReactNode;
18
+ }
19
+ export declare function GoAAppFooterNavSection({ heading, maxColumnCount, testId, children, }: FooterNavSectionProps): JSX.Element;
20
+ export default GoAAppFooterNavSection;
@@ -1,22 +1,26 @@
1
- import React, { FC } from 'react';
2
- interface WCProps {
1
+ import React, { FC } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ declare type RequirementType = "optional" | "required";
4
+ interface WCProps extends Margins {
3
5
  label: string;
4
- optional?: boolean;
6
+ requirement?: RequirementType;
5
7
  error?: string;
6
8
  helptext?: string;
7
9
  }
8
10
  declare global {
9
11
  namespace JSX {
10
12
  interface IntrinsicElements {
11
- 'goa-form-item': WCProps & React.HTMLAttributes<HTMLElement>;
13
+ "goa-form-item": WCProps & React.HTMLAttributes<HTMLElement>;
12
14
  }
13
15
  }
14
16
  }
15
- interface GoAFormItemProps {
17
+ interface GoAFormItemProps extends Margins {
16
18
  label: string;
17
- optional?: boolean;
19
+ requirement?: RequirementType;
18
20
  error?: string;
19
21
  helpText?: string;
22
+ children?: React.ReactNode;
23
+ testId?: string;
20
24
  }
21
25
  export declare const GoAFormItem: FC<GoAFormItemProps>;
22
26
  export default GoAFormItem;
@@ -1 +1 @@
1
- export { GoAFormItem } from './form-item';
1
+ export { GoAFormItem } from "./form-item";
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ declare type Status = "complete" | "incomplete";
3
+ interface WCProps {
4
+ text: string;
5
+ status?: Status;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-form-step": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ export interface FormStepProps {
15
+ text: string;
16
+ status?: Status;
17
+ }
18
+ export declare function GoAFormStep(props: FormStepProps): JSX.Element;
19
+ export default GoAFormStep;
@@ -0,0 +1,21 @@
1
+ import React, { ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ interface WCProps extends Margins {
4
+ ref?: React.MutableRefObject<HTMLElement | null>;
5
+ step?: number;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-form-stepper": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ export interface FormStepperProps extends Margins {
15
+ step?: number;
16
+ testId: string;
17
+ children?: ReactNode;
18
+ onChange?: (step: number) => void;
19
+ }
20
+ export declare function GoAFormStepper({ testId, step, mt, mb, ml, mr, onChange, children, }: FormStepperProps): JSX.Element;
21
+ export default GoAFormStepper;
@@ -0,0 +1,21 @@
1
+ import React, { FC } from "react";
2
+ import { Margins, Spacing } from "../../common/styling";
3
+ interface WCProps extends Margins {
4
+ gap?: Spacing;
5
+ minchildwidth: string;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-grid": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ interface Props extends Margins {
15
+ gap?: Spacing;
16
+ minChildWidth: string;
17
+ testId?: string;
18
+ children?: React.ReactNode;
19
+ }
20
+ export declare const GoAGrid: FC<Props>;
21
+ export default GoAGrid;
@@ -1,4 +1,6 @@
1
- import { FC } from 'react';
2
- export declare type GoAHeroBannerActionsType = FC;
3
- export declare const GoAHeroBannerActions: GoAHeroBannerActionsType;
1
+ import React, { FC } from "react";
2
+ export declare type GoAHeroBannerActionsType = {
3
+ children?: React.ReactNode;
4
+ };
5
+ export declare const GoAHeroBannerActions: FC<GoAHeroBannerActionsType>;
4
6
  export default GoAHeroBannerActions;
@@ -1,18 +1,24 @@
1
- import React, { FC } from 'react';
1
+ import React, { FC } from "react";
2
2
  interface WCProps {
3
- title: string;
3
+ heading: string;
4
4
  backgroundurl: string;
5
+ minheight?: string;
6
+ maxcontentwidth?: string;
5
7
  }
6
8
  declare global {
7
9
  namespace JSX {
8
10
  interface IntrinsicElements {
9
- 'goa-hero-banner': WCProps & React.HTMLAttributes<HTMLElement>;
11
+ "goa-hero-banner": WCProps & React.HTMLAttributes<HTMLElement>;
10
12
  }
11
13
  }
12
14
  }
13
15
  interface Props {
14
- title: string;
16
+ heading: string;
15
17
  backgroundUrl: string;
18
+ minHeight?: string;
19
+ testId?: string;
20
+ children?: React.ReactNode;
21
+ maxContentWidth?: string;
16
22
  }
17
23
  export declare const GoAHeroBanner: FC<Props>;
18
24
  export default GoAHeroBanner;
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { Margins } from "../../common/styling";
3
+ declare type GoAIconFilledType = `${GoAIconType}-${IconTheme}`;
4
+ interface IonIconProps {
5
+ name: GoAIconType | GoAIconFilledType;
6
+ }
7
+ interface IonIconElement extends HTMLElement {
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ "ion-icon": IonIconProps & React.HTMLAttributes<IonIconElement>;
13
+ }
14
+ }
15
+ }
16
+ declare global {
17
+ namespace JSX {
18
+ interface IntrinsicElements {
19
+ "goa-icon": WCProps & React.HTMLAttributes<IonIconElement>;
20
+ }
21
+ }
22
+ }
23
+ export declare type GoAIconType = "accessibility" | "add-circle" | "add" | "airplane" | "alarm" | "albums" | "alert-circle" | "alert" | "american-football" | "analytics" | "aperture" | "apps" | "archive" | "arrow-back-circle" | "arrow-back" | "arrow-down-circle" | "arrow-down" | "arrow-forward-circle" | "arrow-forward" | "arrow-redo-circle" | "arrow-redo" | "arrow-undo-circle" | "arrow-undo" | "arrow-up-circle" | "arrow-up" | "at-circle" | "at" | "attach" | "backspace" | "bag-add" | "bag-check" | "bag-handle" | "bag" | "bag-remove" | "balloon" | "ban" | "bandage" | "bar-chart" | "barbell" | "barcode" | "baseball" | "basket" | "basketball" | "battery-charging" | "battery-dead" | "battery-full" | "battery-half" | "beaker" | "bed" | "beer" | "bicycle" | "bluetooth" | "boat" | "body" | "bonfire" | "book" | "bookmark" | "bookmarks" | "bowling-ball" | "briefcase" | "browsers" | "brush" | "bug" | "build" | "bulb" | "bus" | "business" | "cafe" | "calculator" | "calendar-clear" | "calendar-number" | "calendar" | "call" | "camera" | "camera-reverse" | "car" | "car-sport" | "card" | "caret-back-circle" | "caret-back" | "caret-down-circle" | "caret-down" | "caret-forward-circle" | "caret-forward" | "caret-up-circle" | "caret-up" | "cart" | "cash" | "cellular" | "chatbox-ellipses" | "chatbox" | "chatbubble-ellipses" | "chatbubble" | "chatbubbles" | "checkbox" | "checkmark-circle" | "checkmark-done-circle" | "checkmark-done" | "checkmark" | "chevron-back-circle" | "chevron-back" | "chevron-down-circle" | "chevron-down" | "chevron-forward-circle" | "chevron-forward" | "chevron-up-circle" | "chevron-up" | "clipboard" | "close-circle" | "close" | "cloud-circle" | "cloud-done" | "cloud-download" | "cloud-offline" | "cloud" | "cloud-upload" | "cloudy-night" | "cloudy" | "code-download" | "code" | "code-slash" | "code-working" | "cog" | "color-fill" | "color-filter" | "color-palette" | "color-wand" | "compass" | "construct" | "contract" | "contrast" | "copy" | "create" | "crop" | "cube" | "cut" | "desktop" | "diamond" | "dice" | "disc" | "document-attach" | "document-lock" | "document" | "document-text" | "documents" | "download" | "duplicate" | "ear" | "earth" | "easel" | "egg" | "ellipse" | "ellipsis-horizontal-circle" | "ellipsis-horizontal" | "ellipsis-vertical-circle" | "ellipsis-vertical" | "enter" | "exit" | "expand" | "extension-puzzle" | "eye-off" | "eye" | "eyedrop" | "fast-food" | "female" | "file-tray-full" | "file-tray" | "file-tray-stacked" | "filenames.ps1" | "film" | "filter-circle" | "filter" | "finger-print" | "fish" | "fitness" | "flag" | "flame" | "flash-off" | "flash" | "flashlight" | "flask" | "flower" | "folder-open" | "folder" | "football" | "footsteps" | "funnel" | "game-controller" | "gift" | "git-branch" | "git-commit" | "git-compare" | "git-merge" | "git-network" | "git-pull-request" | "glasses" | "globe" | "golf" | "grid" | "hammer" | "hand-left" | "hand-right" | "happy" | "hardware-chip" | "headset" | "heart-circle" | "heart-dislike-circle" | "heart-dislike" | "heart-half" | "heart" | "help-buoy" | "help-circle" | "help" | "home" | "hourglass" | "ice-cream" | "id-card" | "image" | "images" | "infinite" | "information-circle" | "information" | "invert-mode" | "journal" | "key" | "keypad" | "language" | "laptop" | "layers" | "leaf" | "library" | "link" | "list-circle" | "list" | "locate" | "location" | "lock-closed" | "lock-open" | "log-in" | "log-out" | "magnet" | "mail-open" | "mail" | "mail-unread" | "male-female" | "male" | "man" | "map" | "medal" | "medical" | "medkit" | "megaphone" | "menu" | "mic-circle" | "mic-off-circle" | "mic-off" | "mic" | "moon" | "move" | "musical-note" | "musical-notes" | "navigate-circle" | "navigate" | "newspaper" | "notifications-circle" | "notifications-off-circle" | "notifications-off" | "notifications" | "nuclear" | "nutrition" | "open" | "options" | "paper-plane" | "partly-sunny" | "pause-circle" | "pause" | "paw" | "pencil" | "people-circle" | "people" | "person-add" | "person-circle" | "person" | "person-remove" | "phone-landscape" | "phone-portrait" | "pie-chart" | "pin" | "pint" | "pizza" | "planet" | "play-back-circle" | "play-back" | "play-circle" | "play-forward-circle" | "play-forward" | "play" | "play-skip-back-circle" | "play-skip-back" | "play-skip-forward-circle" | "play-skip-forward" | "podium" | "power" | "pricetag" | "pricetags" | "print" | "prism" | "pulse" | "push" | "qr-code" | "radio-button-off" | "radio-button-on" | "radio" | "rainy" | "reader" | "receipt" | "recording" | "refresh-circle" | "refresh" | "reload-circle" | "reload" | "remove-circle" | "remove" | "reorder-four" | "reorder-three" | "reorder-two" | "repeat" | "resize" | "restaurant" | "return-down-back" | "return-down-forward" | "return-up-back" | "return-up-forward" | "ribbon" | "rocket" | "rose" | "sad" | "save" | "scale" | "scan-circle" | "scan" | "school" | "search-circle" | "search" | "send" | "server" | "settings" | "shapes" | "share" | "share-social" | "shield-checkmark" | "shield-half" | "shield" | "shirt" | "shuffle" | "skull" | "snow" | "sparkles" | "speedometer" | "square" | "star-half" | "star" | "stats-chart" | "stop-circle" | "stop" | "stopwatch" | "storefront" | "subway" | "sunny" | "swap-horizontal" | "swap-vertical" | "sync-circle" | "sync" | "tablet-landscape" | "tablet-portrait" | "telescope" | "tennisball" | "terminal" | "text" | "thermometer" | "thumbs-down" | "thumbs-up" | "thunderstorm" | "ticket" | "time" | "timer" | "today" | "toggle" | "trail-sign" | "train" | "transgender" | "trash-bin" | "trash" | "trending-down" | "trending-up" | "triangle" | "trophy" | "tv" | "umbrella" | "unlink" | "videocam-off" | "videocam" | "volume-high" | "volume-low" | "volume-medium" | "volume-mute" | "volume-off" | "walk" | "wallet" | "warning" | "watch" | "water" | "wifi" | "wine" | "woman" | "logo-alipay" | "logo-amazon" | "logo-amplify" | "logo-android" | "logo-angular" | "logo-apple" | "logo-apple-appstore" | "logo-apple-ar" | "logo-behance" | "logo-bitbucket" | "logo-bitcoin" | "logo-buffer" | "logo-capacitor" | "logo-chrome" | "logo-closed-captioning" | "logo-codepen" | "logo-css3" | "logo-designernews" | "logo-deviantart" | "logo-discord" | "logo-docker" | "logo-dribbble" | "logo-dropbox" | "logo-edge" | "logo-electron" | "logo-euro" | "logo-facebook" | "logo-figma" | "logo-firebase" | "logo-firefox" | "logo-flickr" | "logo-foursquare" | "logo-github" | "logo-gitlab" | "logo-google" | "logo-google-playstore" | "logo-hackernews" | "logo-html5" | "logo-instagram" | "logo-ionic" | "logo-ionitron" | "logo-javascript" | "logo-laravel" | "logo-linkedin" | "logo-markdown" | "logo-mastodon" | "logo-medium" | "logo-microsoft" | "logo-no-smoking" | "logo-nodejs" | "logo-npm" | "logo-octocat" | "logo-paypal" | "logo-pinterest" | "logo-playstation" | "logo-pwa" | "logo-python" | "logo-react" | "logo-reddit" | "logo-rss" | "logo-sass" | "logo-skype" | "logo-slack" | "logo-snapchat" | "logo-soundcloud" | "logo-stackoverflow" | "logo-steam" | "logo-stencil" | "logo-tableau" | "logo-tiktok" | "logo-tumblr" | "logo-tux" | "logo-twitch" | "logo-twitter" | "logo-usd" | "logo-venmo" | "logo-vercel" | "logo-vimeo" | "logo-vk" | "logo-vue" | "logo-web-component" | "logo-wechat" | "logo-whatsapp" | "logo-windows" | "logo-wordpress" | "logo-xbox" | "logo-xing" | "logo-yahoo" | "logo-yen" | "logo-youtube";
24
+ export declare type IconSize = "small" | "medium" | "large" | "xlarge";
25
+ export declare type IconVariant = "primary" | "secondary" | "tertiary";
26
+ export declare type IconTheme = "outline" | "filled" | "sharp";
27
+ interface Props extends Margins {
28
+ type: GoAIconType;
29
+ size?: IconSize;
30
+ theme?: IconTheme;
31
+ testId?: string;
32
+ }
33
+ interface WCProps extends Margins {
34
+ type: GoAIconType;
35
+ theme?: IconTheme;
36
+ size?: IconSize;
37
+ }
38
+ export declare function GoAIcon({ type, theme, size, mt, mr, mb, ml, testId, }: Props): JSX.Element;
39
+ export {};
@@ -0,0 +1,31 @@
1
+ import React, { FC } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ import { IconSize, GoAIconType } from "../icon/icon";
4
+ export declare type IconButtonVariant = "color" | "nocolor" | "dark" | "destructive";
5
+ interface WCProps extends Margins {
6
+ ref: React.RefObject<HTMLElement>;
7
+ icon: GoAIconType;
8
+ size?: IconSize;
9
+ variant?: IconButtonVariant;
10
+ title?: string;
11
+ disabled?: boolean;
12
+ }
13
+ declare global {
14
+ namespace JSX {
15
+ interface IntrinsicElements {
16
+ "goa-icon-button": WCProps & React.HTMLAttributes<HTMLButtonElement>;
17
+ }
18
+ }
19
+ }
20
+ interface Props extends Margins {
21
+ icon: GoAIconType;
22
+ size?: IconSize;
23
+ variant?: IconButtonVariant;
24
+ title?: string;
25
+ disabled?: boolean;
26
+ children?: React.ReactNode;
27
+ onClick?: () => void;
28
+ testId?: string;
29
+ }
30
+ export declare const GoAIconButton: FC<Props>;
31
+ export {};
@@ -1,11 +1,17 @@
1
- import React, { FC } from 'react';
2
- import { GoAIconType } from '../..';
3
- interface WCProps {
1
+ import React, { FC } from "react";
2
+ import { GoAIconType } from "../..";
3
+ import { Margins } from "../../common/styling";
4
+ export declare type GoADate = Date | string;
5
+ declare type GoAInputType = "text" | "password" | "email" | "number" | "date" | "datetime-local" | "month" | "range" | "search" | "tel" | "time" | "url" | "week";
6
+ declare type GoAAutoCapitalize = "on" | "off" | "none" | "sentences" | "words" | "characters";
7
+ interface WCProps extends Margins {
4
8
  ref?: React.MutableRefObject<HTMLInputElement | null>;
5
- type: string;
9
+ type?: GoAInputType;
6
10
  name: string;
7
11
  value: string;
8
12
  id?: string;
13
+ autocapitalize?: GoAAutoCapitalize;
14
+ debounce?: number;
9
15
  placeholder?: string;
10
16
  leadingicon?: string;
11
17
  trailingicon?: string;
@@ -14,66 +20,84 @@ interface WCProps {
14
20
  error?: boolean;
15
21
  readonly?: boolean;
16
22
  focused?: boolean;
17
- showcounter?: boolean;
18
- maxcharcount?: number;
19
23
  handletrailingiconclick: boolean;
20
24
  width?: string;
21
- testid?: string;
25
+ prefix?: string;
26
+ suffix?: string;
27
+ arialabel?: string;
28
+ min?: string | number;
29
+ max?: string | number;
30
+ step?: number;
31
+ maxlength?: number;
22
32
  }
23
33
  declare global {
24
34
  namespace JSX {
25
35
  interface IntrinsicElements {
26
- 'goa-input': WCProps & React.HTMLAttributes<HTMLInputElement>;
36
+ "goa-input": WCProps & React.HTMLAttributes<HTMLInputElement>;
27
37
  }
28
38
  }
29
39
  }
30
- export interface Props {
40
+ interface BaseProps extends Margins {
31
41
  name: string;
32
- value: string;
33
- onChange: (name: string, value: string) => void;
34
42
  id?: string;
43
+ debounce?: number;
35
44
  disabled?: boolean;
45
+ autoCapitalize?: GoAAutoCapitalize;
36
46
  placeholder?: string;
37
47
  leadingIcon?: GoAIconType;
38
48
  trailingIcon?: GoAIconType;
39
49
  onTrailingIconClick?: () => void;
40
- variant?: 'goa' | 'bare';
50
+ variant?: "goa" | "bare";
41
51
  focused?: boolean;
42
52
  readonly?: boolean;
43
53
  error?: boolean;
44
54
  width?: string;
45
- showCounter?: boolean;
46
- maxCharCount?: number;
55
+ prefix?: string;
56
+ suffix?: string;
47
57
  testId?: string;
58
+ ariaLabel?: string;
59
+ leadingContent?: React.ReactNode;
60
+ trailingContent?: React.ReactNode;
61
+ maxLength?: number;
48
62
  }
49
- export declare const GoAInput: FC<Props & {
50
- type: string;
51
- }>;
52
- export declare const GoAInputText: FC<Props>;
53
- export declare const GoAInputPassword: FC<Props>;
54
- export declare const GoAInputDate: FC<Props & {
55
- min?: string;
56
- max?: string;
57
- }>;
58
- export declare const GoAInputTime: FC<Props>;
59
- export declare const GoAInputDateTime: FC<Props & {
60
- min?: string;
61
- max?: string;
62
- }>;
63
- export declare const GoAInputEmail: FC<Props>;
64
- export declare const GoAInputSearch: FC<Props>;
65
- export declare const GoAInputUrl: FC<Props>;
66
- export declare const GoAInputTel: FC<Props>;
67
- export declare const GoAInputFile: FC<Props>;
68
- export declare const GoAInputMonth: FC<Props>;
69
- export declare const GoAInputNumber: FC<Props & {
70
- min?: number;
71
- max?: number;
63
+ declare type OnChange = (name: string, value: string) => void;
64
+ export interface InputProps extends BaseProps {
65
+ onChange: OnChange;
66
+ value: string;
67
+ min?: number | string;
68
+ max?: number | string;
72
69
  step?: number;
73
- }>;
74
- export declare const GoAInputRange: FC<Props & {
70
+ }
71
+ declare type OnNumberChange = (name: string, value: number) => void;
72
+ interface NumberInputProps extends BaseProps {
73
+ onChange: OnNumberChange;
74
+ value: number;
75
75
  min?: number;
76
76
  max?: number;
77
77
  step?: number;
78
+ }
79
+ declare type OnDateChange = (name: string, value: GoADate) => void;
80
+ interface DateInputProps extends BaseProps {
81
+ onChange: OnDateChange;
82
+ value: GoADate;
83
+ min?: GoADate;
84
+ max?: GoADate;
85
+ step?: number;
86
+ }
87
+ export declare const GoAInput: FC<InputProps & {
88
+ type?: GoAInputType;
78
89
  }>;
90
+ export declare const GoAInputText: FC<InputProps>;
91
+ export declare const GoAInputPassword: FC<InputProps>;
92
+ export declare const GoAInputDate: FC<DateInputProps>;
93
+ export declare const GoAInputTime: FC<InputProps>;
94
+ export declare const GoAInputDateTime: FC<DateInputProps>;
95
+ export declare const GoAInputEmail: FC<InputProps>;
96
+ export declare const GoAInputSearch: FC<InputProps>;
97
+ export declare const GoAInputUrl: FC<InputProps>;
98
+ export declare const GoAInputTel: FC<InputProps>;
99
+ export declare const GoAInputFile: FC<InputProps>;
100
+ export declare const GoAInputMonth: FC<InputProps>;
101
+ export declare const GoAInputNumber: FC<NumberInputProps>;
102
+ export declare const GoAInputRange: FC<InputProps>;
79
103
  export default GoAInput;