@4alldigital/foundation-ui--gamma 1.24.0 → 1.27.0

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 (121) hide show
  1. package/dist/foundation-ui.css +1 -1
  2. package/dist/index.esm.js +205 -187
  3. package/dist/index.js +214 -196
  4. package/dist/types/fui/components/Button/Button.d.ts +1 -1
  5. package/dist/types/fui/components/Button/Button.stories.d.ts +1 -0
  6. package/dist/types/fui/components/Button/Button.types.d.ts +1 -0
  7. package/dist/types/fui/components/Card/Card.d.ts +8 -0
  8. package/dist/types/fui/components/Card/Card.stories.d.ts +6 -0
  9. package/dist/types/fui/components/Card/Card.test.d.ts +1 -0
  10. package/dist/types/fui/components/Card/Card.types.d.ts +27 -0
  11. package/dist/types/fui/components/Card/index.d.ts +1 -0
  12. package/dist/types/fui/components/Card/types/CardBasic/CardBasic.d.ts +8 -0
  13. package/dist/types/fui/components/Card/types/CardBasic/CardBasic.stories.d.ts +6 -0
  14. package/dist/types/fui/components/Card/types/CardBasic/CardBasic.test.d.ts +1 -0
  15. package/dist/types/fui/components/Card/types/CardBasic/CardBasic.types.d.ts +4 -0
  16. package/dist/types/fui/components/Card/types/CardBasic/index.d.ts +1 -0
  17. package/dist/types/fui/components/Card/types/CardMedia/CardMedia.d.ts +8 -0
  18. package/dist/types/fui/components/Card/types/CardMedia/CardMedia.stories.d.ts +6 -0
  19. package/dist/types/fui/components/Card/types/CardMedia/CardMedia.test.d.ts +1 -0
  20. package/dist/types/fui/components/Card/types/CardMedia/CardMedia.types.d.ts +4 -0
  21. package/dist/types/fui/components/Card/types/CardMedia/index.d.ts +1 -0
  22. package/dist/types/fui/components/Card/types/CardVideo/CardVideo.d.ts +8 -0
  23. package/dist/types/fui/components/Card/types/CardVideo/CardVideo.stories.d.ts +6 -0
  24. package/dist/types/fui/components/Card/types/CardVideo/CardVideo.test.d.ts +1 -0
  25. package/dist/types/fui/components/Card/types/CardVideo/CardVideo.types.d.ts +4 -0
  26. package/dist/types/fui/components/Card/types/CardVideo/index.d.ts +1 -0
  27. package/dist/types/fui/components/Checkbox/Checkbox.types.d.ts +4 -1
  28. package/dist/types/fui/components/Container/Container.d.ts +1 -1
  29. package/dist/types/fui/components/Container/Container.types.d.ts +2 -0
  30. package/dist/types/fui/components/ContentPageLayout/ContentPageLayout.types.d.ts +2 -2
  31. package/dist/types/fui/components/ContentRowsLayout/ContentRowsLayout.types.d.ts +2 -2
  32. package/dist/types/fui/components/Copy/Copy.d.ts +1 -1
  33. package/dist/types/fui/components/Copy/Copy.types.d.ts +13 -11
  34. package/dist/types/fui/components/Form/Form.d.ts +1 -1
  35. package/dist/types/fui/components/Form/Form.stories.d.ts +1 -0
  36. package/dist/types/fui/components/Form/Form.types.d.ts +8 -5
  37. package/dist/types/fui/components/FormField/FormField.d.ts +1 -1
  38. package/dist/types/fui/components/FormField/FormField.stories.d.ts +1 -0
  39. package/dist/types/fui/components/FormField/FormField.types.d.ts +10 -8
  40. package/dist/types/fui/components/FormSelect/FormSelect.d.ts +1 -4
  41. package/dist/types/fui/components/FormSelect/FormSelect.types.d.ts +7 -5
  42. package/dist/types/fui/components/Heading/Heading.types.d.ts +6 -6
  43. package/dist/types/fui/components/Label/Label.d.ts +1 -1
  44. package/dist/types/fui/components/Label/Label.types.d.ts +6 -2
  45. package/dist/types/fui/components/Link/Link.types.d.ts +1 -1
  46. package/dist/types/fui/components/Notice/Notice.d.ts +1 -1
  47. package/dist/types/fui/components/Notice/Notice.types.d.ts +1 -1
  48. package/dist/types/fui/components/Radio/Radio.types.d.ts +2 -1
  49. package/dist/types/fui/components/TextInput/TextInput.types.d.ts +2 -1
  50. package/dist/types/fui/components/index.d.ts +23 -0
  51. package/dist/types/fui/features/Search/Search.d.ts +5 -0
  52. package/dist/types/fui/features/Search/Search.stories.d.ts +6 -0
  53. package/dist/types/fui/features/Search/Search.test.d.ts +1 -0
  54. package/dist/types/fui/features/Search/Search.types.d.ts +10 -0
  55. package/dist/types/fui/features/Search/index.d.ts +1 -0
  56. package/dist/types/fui/features/Search/view-helpers/appendClassName.d.ts +1 -0
  57. package/dist/types/fui/features/Search/view-helpers/formatResult.d.ts +3 -0
  58. package/dist/types/fui/features/Search/view-helpers/getFilterValueDisplay.d.ts +1 -0
  59. package/dist/types/fui/features/Search/view-helpers/getUrlSanitizer.d.ts +6 -0
  60. package/dist/types/fui/features/Search/view-helpers/index.d.ts +4 -0
  61. package/dist/types/fui/features/Search/views/Layout/Layout.d.ts +7 -0
  62. package/dist/types/fui/features/Search/views/Layout/Layout.stories.d.ts +6 -0
  63. package/dist/types/fui/features/Search/views/Layout/Layout.test.d.ts +1 -0
  64. package/dist/types/fui/features/Search/views/Layout/Layout.types.d.ts +10 -0
  65. package/dist/types/fui/features/Search/views/Layout/index.d.ts +1 -0
  66. package/dist/types/fui/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.d.ts +7 -0
  67. package/dist/types/fui/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.stories.d.ts +6 -0
  68. package/dist/types/fui/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.test.d.ts +1 -0
  69. package/dist/types/fui/features/Search/views/MultiCheckboxFacet/MultiCheckboxFacet.types.d.ts +4 -0
  70. package/dist/types/fui/features/Search/views/MultiCheckboxFacet/index.d.ts +1 -0
  71. package/dist/types/fui/features/Search/views/Paging/Paging.d.ts +7 -0
  72. package/dist/types/fui/features/Search/views/Paging/Paging.stories.d.ts +6 -0
  73. package/dist/types/fui/features/Search/views/Paging/Paging.test.d.ts +1 -0
  74. package/dist/types/fui/features/Search/views/Paging/Paging.types.d.ts +14 -0
  75. package/dist/types/fui/features/Search/views/Paging/index.d.ts +1 -0
  76. package/dist/types/fui/features/Search/views/PagingInfo/PagingInfo.d.ts +8 -0
  77. package/dist/types/fui/features/Search/views/PagingInfo/PagingInfo.stories.d.ts +6 -0
  78. package/dist/types/fui/features/Search/views/PagingInfo/PagingInfo.test.d.ts +1 -0
  79. package/dist/types/fui/features/Search/views/PagingInfo/PagingInfo.types.d.ts +16 -0
  80. package/dist/types/fui/features/Search/views/PagingInfo/index.d.ts +1 -0
  81. package/dist/types/fui/features/Search/views/Result/Result.d.ts +7 -0
  82. package/dist/types/fui/features/Search/views/Result/Result.stories.d.ts +6 -0
  83. package/dist/types/fui/features/Search/views/Result/Result.test.d.ts +1 -0
  84. package/dist/types/fui/features/Search/views/Result/Result.types.d.ts +22 -0
  85. package/dist/types/fui/features/Search/views/Result/index.d.ts +1 -0
  86. package/dist/types/fui/features/Search/views/Results/Results.d.ts +8 -0
  87. package/dist/types/fui/features/Search/views/Results/Results.stories.d.ts +6 -0
  88. package/dist/types/fui/features/Search/views/Results/Results.test.d.ts +1 -0
  89. package/dist/types/fui/features/Search/views/Results/Results.types.d.ts +19 -0
  90. package/dist/types/fui/features/Search/views/Results/index.d.ts +1 -0
  91. package/dist/types/fui/features/Search/views/ResultsPerPage/ResultsPerPage.d.ts +7 -0
  92. package/dist/types/fui/features/Search/views/ResultsPerPage/ResultsPerPage.stories.d.ts +6 -0
  93. package/dist/types/fui/features/Search/views/ResultsPerPage/ResultsPerPage.test.d.ts +1 -0
  94. package/dist/types/fui/features/Search/views/ResultsPerPage/ResultsPerPage.types.d.ts +17 -0
  95. package/dist/types/fui/features/Search/views/ResultsPerPage/index.d.ts +1 -0
  96. package/dist/types/fui/features/Search/views/SearchBox/SearchBox.d.ts +7 -0
  97. package/dist/types/fui/features/Search/views/SearchBox/SearchBox.stories.d.ts +6 -0
  98. package/dist/types/fui/features/Search/views/SearchBox/SearchBox.test.d.ts +1 -0
  99. package/dist/types/fui/features/Search/views/SearchBox/SearchBox.types.d.ts +6 -0
  100. package/dist/types/fui/features/Search/views/SearchBox/index.d.ts +1 -0
  101. package/dist/types/fui/features/Search/views/Sidebar/Sidebar.d.ts +8 -0
  102. package/dist/types/fui/features/Search/views/Sidebar/Sidebar.stories.d.ts +6 -0
  103. package/dist/types/fui/features/Search/views/Sidebar/Sidebar.test.d.ts +1 -0
  104. package/dist/types/fui/features/Search/views/Sidebar/Sidebar.types.d.ts +3 -0
  105. package/dist/types/fui/features/Search/views/Sidebar/index.d.ts +1 -0
  106. package/dist/types/fui/features/Search/views/SingleLinksFacet/SingleLinksFacet.d.ts +7 -0
  107. package/dist/types/fui/features/Search/views/SingleLinksFacet/SingleLinksFacet.stories.d.ts +6 -0
  108. package/dist/types/fui/features/Search/views/SingleLinksFacet/SingleLinksFacet.test.d.ts +1 -0
  109. package/dist/types/fui/features/Search/views/SingleLinksFacet/SingleLinksFacet.types.d.ts +4 -0
  110. package/dist/types/fui/features/Search/views/SingleLinksFacet/index.d.ts +1 -0
  111. package/dist/types/fui/features/Search/views/SingleSelectFacet/SingleSelectFacet.d.ts +7 -0
  112. package/dist/types/fui/features/Search/views/SingleSelectFacet/SingleSelectFacet.stories.d.ts +6 -0
  113. package/dist/types/fui/features/Search/views/SingleSelectFacet/SingleSelectFacet.test.d.ts +1 -0
  114. package/dist/types/fui/features/Search/views/SingleSelectFacet/SingleSelectFacet.types.d.ts +4 -0
  115. package/dist/types/fui/features/Search/views/SingleSelectFacet/index.d.ts +1 -0
  116. package/dist/types/fui/features/Search/views/Sorting/Sorting.d.ts +7 -0
  117. package/dist/types/fui/features/Search/views/Sorting/Sorting.stories.d.ts +6 -0
  118. package/dist/types/fui/features/Search/views/Sorting/Sorting.test.d.ts +1 -0
  119. package/dist/types/fui/features/Search/views/Sorting/Sorting.types.d.ts +20 -0
  120. package/dist/types/fui/features/Search/views/Sorting/index.d.ts +1 -0
  121. package/package.json +4 -31
@@ -1,6 +1,6 @@
1
1
  import { Props } from './Button.types';
2
2
  declare const Button: {
3
- ({ variant, size, type, wide, rounded, raised, uppercase, children, id, disabled, ariaLabel, onClick, icon, external, iconFirst, outline, testID, className, }: Props): React.ReactElement;
3
+ ({ variant, size, type, wide, rounded, raised, uppercase, children, id, disabled, ariaLabel, onClick, icon, external, iconFirst, outline, testID, className, isLoading, }: Props): React.ReactElement;
4
4
  displayName: string;
5
5
  };
6
6
  export default Button;
@@ -6,3 +6,4 @@ export declare const Default: Story;
6
6
  export default meta;
7
7
  export declare const WithIcon: Story;
8
8
  export declare const IconOnly: Story;
9
+ export declare const LoadingButton: Story;
@@ -33,4 +33,5 @@ export interface Props {
33
33
  id?: string;
34
34
  testID?: string;
35
35
  className?: string;
36
+ isLoading?: boolean;
36
37
  }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Props } from './Card.types';
3
+ declare const Card: {
4
+ ({ variant, className, data, ...rest }: Props): React.ReactElement;
5
+ displayName: string;
6
+ };
7
+ export default Card;
8
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Card from '.';
3
+ declare const meta: Meta<typeof Card>;
4
+ type Story = StoryObj<typeof Card>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ export declare enum CardVariant {
2
+ BASIC = "basic",
3
+ MEDIA = "media",
4
+ VIDEO = "video"
5
+ }
6
+ export interface ImageData {
7
+ src: string;
8
+ alt: string;
9
+ width?: number;
10
+ height?: number;
11
+ }
12
+ export interface CardData {
13
+ id: string;
14
+ title: string;
15
+ description?: string;
16
+ image?: ImageData;
17
+ video?: string;
18
+ link?: string;
19
+ tags?: string[];
20
+ moreTitle?: string;
21
+ onClick?: () => void;
22
+ }
23
+ export interface Props {
24
+ variant?: CardVariant;
25
+ className?: string;
26
+ data: CardData;
27
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Card';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Props } from './CardBasic.types';
3
+ declare const CardBasic: {
4
+ ({ id, title, description, image, className, onClick }: Props): React.ReactElement;
5
+ displayName: string;
6
+ };
7
+ export default CardBasic;
8
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import CardBasic from '.';
3
+ declare const meta: Meta<typeof CardBasic>;
4
+ type Story = StoryObj<typeof CardBasic>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1,4 @@
1
+ import { CardData } from "../../Card.types";
2
+ export interface Props extends CardData {
3
+ className?: string;
4
+ }
@@ -0,0 +1 @@
1
+ export { default } from './CardBasic';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Props } from './CardMedia.types';
3
+ declare const CardMedia: {
4
+ ({ className }: Props): React.ReactElement;
5
+ displayName: string;
6
+ };
7
+ export default CardMedia;
8
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import CardMedia from '.';
3
+ declare const meta: Meta<typeof CardMedia>;
4
+ type Story = StoryObj<typeof CardMedia>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1,4 @@
1
+ import { CardData } from "../../Card.types";
2
+ export interface Props extends CardData {
3
+ className?: string;
4
+ }
@@ -0,0 +1 @@
1
+ export { default } from './CardMedia';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Props } from './CardVideo.types';
3
+ declare const CardVideo: {
4
+ ({ className }: Props): React.ReactElement;
5
+ displayName: string;
6
+ };
7
+ export default CardVideo;
8
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import CardVideo from '.';
3
+ declare const meta: Meta<typeof CardVideo>;
4
+ type Story = StoryObj<typeof CardVideo>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1,4 @@
1
+ import { CardData } from '../../Card.types';
2
+ export interface Props extends CardData {
3
+ className?: string;
4
+ }
@@ -0,0 +1 @@
1
+ export { default } from './CardVideo';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare enum Size {
2
3
  SMALL = "small",
3
4
  MEDIUM = "medium",
@@ -5,8 +6,10 @@ export declare enum Size {
5
6
  }
6
7
  export interface Props {
7
8
  id: string;
8
- label?: string;
9
+ label?: string | React.ReactNode[];
9
10
  required?: boolean;
10
11
  className?: string;
11
12
  disabled?: boolean;
13
+ checked?: boolean;
14
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
12
15
  }
@@ -1,6 +1,6 @@
1
1
  import { Props } from './Container.types';
2
2
  declare const Container: {
3
- ({ children, className, spacing, padded }: Props): React.ReactElement;
3
+ ({ children, className, spacing, padded, isNarrow, isCentered }: Props): React.ReactElement;
4
4
  displayName: string;
5
5
  };
6
6
  export default Container;
@@ -4,4 +4,6 @@ export interface Props {
4
4
  className?: string;
5
5
  spacing?: 'feature' | 'component' | 'module' | 'element' | 'atom' | 'none';
6
6
  padded?: boolean;
7
+ isNarrow?: boolean;
8
+ isCentered?: boolean;
7
9
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare enum SPACING {
2
+ export declare enum CPL_SPACING {
3
3
  NONE = "none",
4
4
  ATOM = "atom",
5
5
  DEFAULT = "default",
@@ -12,6 +12,6 @@ export interface Props {
12
12
  children: React.ReactNode;
13
13
  narrow?: boolean;
14
14
  flush?: boolean;
15
- spacing?: SPACING;
15
+ spacing?: CPL_SPACING;
16
16
  className?: string;
17
17
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare enum SIZE {
2
+ export declare enum CRL_SIZE {
3
3
  NONE = "none",
4
4
  ATOM = "atom",
5
5
  DEFAULT = "default",
@@ -11,5 +11,5 @@ export declare enum SIZE {
11
11
  export interface Props {
12
12
  className?: string;
13
13
  children: React.ReactNode;
14
- size?: SIZE;
14
+ size?: CRL_SIZE;
15
15
  }
@@ -1,6 +1,6 @@
1
1
  import { Props } from './Copy.types';
2
2
  declare const Copy: {
3
- ({ children, as: Tag, size, align, transform, id, testID, }: Props): React.ReactElement;
3
+ ({ children, as: Tag, size, align, transform, id, className, testID, }: Props): React.ReactElement;
4
4
  displayName: string;
5
5
  };
6
6
  export default Copy;
@@ -1,41 +1,43 @@
1
1
  /// <reference types="react" />
2
- export declare enum ALIGN {
2
+ import { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';
3
+ export declare enum COPY_ALIGN {
3
4
  LEFT = "left",
4
5
  CENTER = "center",
5
6
  RIGHT = "right",
6
7
  JUSTIFY = "justify",
7
8
  NOWRAP = "nowrap"
8
9
  }
9
- export declare enum TRANSFORM {
10
+ export declare enum COPY_TRANSFORM {
10
11
  LOWERCASE = "lowercase",
11
12
  UPPERCASE = "uppercase",
12
13
  CAPITALIZE = "capitalize",
13
14
  NORMALCASE = "normal-case"
14
15
  }
15
- export declare enum CONTEXTUAL {
16
+ export declare enum COPY_CONTEXTUAL {
16
17
  INVERTED = "inverted",
17
18
  MUTED = "muted"
18
19
  }
19
- export declare enum SIZE {
20
+ export declare enum COPY_SIZE {
20
21
  SMALL = "small",
21
22
  LARGE = "large",
22
23
  INTRO = "intro"
23
24
  }
24
- export declare enum TAG {
25
+ export declare enum COPY_TAG {
25
26
  P = "p",
26
27
  SPAN = "span",
27
28
  DIV = "div",
28
29
  SMALL = "small"
29
30
  }
30
31
  export interface Props {
31
- children: string | Array<React.ReactNode> | React.ReactNode;
32
- align?: ALIGN;
33
- size?: SIZE;
34
- transform?: TRANSFORM;
35
- contextual?: CONTEXTUAL;
32
+ children: string | Array<React.ReactNode> | React.ReactNode | string | FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;
33
+ align?: COPY_ALIGN;
34
+ size?: COPY_SIZE;
35
+ transform?: COPY_TRANSFORM;
36
+ contextual?: COPY_CONTEXTUAL;
36
37
  inverted?: boolean;
37
38
  maxLength?: boolean;
38
- as?: TAG;
39
+ as?: COPY_TAG;
39
40
  id?: string;
40
41
  testID?: string;
42
+ className?: string;
41
43
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Props } from './Form.types';
3
3
  declare const Form: {
4
- ({ children, className, submit, onSubmit, hideSubmit, ariaSubmitLabel, submitID, initialValues, submitVariant, }: Props): React.ReactElement;
4
+ ({ children, className, submit, onSubmit, onChange, hideSubmit, ariaSubmitLabel, submitID, submitVariant, initialValues, isBoxed, }: Props): React.ReactElement;
5
5
  displayName: string;
6
6
  };
7
7
  export default Form;
@@ -4,4 +4,5 @@ declare const meta: Meta<typeof Form>;
4
4
  type Story = StoryObj<typeof Form>;
5
5
  export declare const Default: Story;
6
6
  export declare const Example: Story;
7
+ export declare const ExampleNoSubmit: Story;
7
8
  export default meta;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { BTN_VARIANTS } from "../Button/Button.types";
2
+ import { BTN_VARIANTS } from '../Button/Button.types';
3
3
  export interface Props {
4
4
  /** The form inputs and content. */
5
5
  children: React.ReactNode;
@@ -8,9 +8,9 @@ export interface Props {
8
8
  /** Disable form inputs validation. */
9
9
  noValidate?: boolean;
10
10
  /** The submit handler that will fire once the form is submitted. */
11
- onSubmit: (values: {
12
- [k: string]: FormDataEntryValue;
13
- }) => void;
11
+ onSubmit?: (values: any) => void;
12
+ /** The on change handler that will fire once the form is updated. */
13
+ onChange?: (values: any) => void;
14
14
  /** The label for the submit button. */
15
15
  submit?: string;
16
16
  /** Hide submit button. */
@@ -21,7 +21,10 @@ export interface Props {
21
21
  submitID?: string;
22
22
  /** Initial form values. */
23
23
  initialValues?: {
24
- [k: string]: FormDataEntryValue;
24
+ [k: string]: any;
25
25
  };
26
+ /** The submit button variant. */
26
27
  submitVariant?: BTN_VARIANTS;
28
+ /** The form is boxed. */
29
+ isBoxed?: boolean;
27
30
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Props } from './FormField.types';
3
3
  declare const FormField: {
4
- ({ name, type, label, required, className, icon, options, disabled, description, showPasswordLabel, hidePasswordLabel, }: Props): React.ReactElement;
4
+ ({ name, type, label, required, className, icon, options, disabled, description, showPasswordLabel, hidePasswordLabel, validations, }: Props): React.ReactElement;
5
5
  displayName: string;
6
6
  };
7
7
  export default FormField;
@@ -4,4 +4,5 @@ declare const meta: Meta<typeof FormField>;
4
4
  type Story = StoryObj<typeof FormField>;
5
5
  export declare const Default: Story;
6
6
  export declare const Example: Story;
7
+ export declare const FieldValidation: Story;
7
8
  export default meta;
@@ -1,4 +1,6 @@
1
- export declare enum FieldTypes {
1
+ /// <reference types="react" />
2
+ import { OptionsType } from "../FormSelect/FormSelect.types";
3
+ export declare enum FIELD_TYPES {
2
4
  TEXT = "text",
3
5
  TEXTAREA = "textarea",
4
6
  SELECT = "select",
@@ -14,21 +16,21 @@ export declare enum FieldTypes {
14
16
  NUMBER = "number",
15
17
  TEL = "tel",
16
18
  URL = "url",
17
- SEARCH = "search"
19
+ SEARCH = "search",
20
+ HIDDEN = "hidden"
18
21
  }
19
22
  export interface Props {
20
- type: FieldTypes;
23
+ type: FIELD_TYPES;
21
24
  name: string;
22
25
  className?: string;
23
- label?: string;
26
+ label?: string | React.ReactNode[];
24
27
  required?: boolean;
25
28
  icon?: string;
26
- options?: {
27
- value: string;
28
- label: string;
29
- }[];
29
+ options?: Array<OptionsType>;
30
30
  disabled?: boolean;
31
31
  description?: string;
32
32
  showPasswordLabel?: string;
33
33
  hidePasswordLabel?: string;
34
+ onChange?: (e: any) => void;
35
+ validations?: any;
34
36
  }
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
2
  import { Props } from './FormSelect.types';
3
- declare const FormSelect: {
4
- ({ id, name, options, required, className, disabled }: Props): React.ReactElement;
5
- displayName: string;
6
- };
3
+ declare const FormSelect: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
7
4
  export default FormSelect;
8
5
  export type { Props };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- type OptionsType = {
3
- value: string;
2
+ import { FilterValue } from "@elastic/search-ui";
3
+ export type OptionsType = {
4
+ value: FilterValue;
4
5
  label: string;
5
6
  /** The selected option's value. */
6
7
  defaultValue?: string;
@@ -8,11 +9,11 @@ type OptionsType = {
8
9
  };
9
10
  export interface Props {
10
11
  /** The selected option's value. */
11
- options: Array<OptionsType>;
12
+ options?: Array<OptionsType>;
12
13
  /** Unique id for the field, required for a11y. */
13
14
  id: string;
14
15
  /** The select visible default label value. */
15
- label?: string;
16
+ label?: string | React.ReactNode[];
16
17
  /** Is field required. */
17
18
  required?: boolean;
18
19
  /** Additional classes. */
@@ -31,6 +32,8 @@ export interface Props {
31
32
  name?: string;
32
33
  /** Is field disabled. */
33
34
  disabled?: boolean;
35
+ /** The selected option's value. */
36
+ onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
34
37
  }
35
38
  export interface ItemProps {
36
39
  children: React.ReactNode;
@@ -38,4 +41,3 @@ export interface ItemProps {
38
41
  itemIcon: string;
39
42
  iconColor?: string;
40
43
  }
41
- export {};
@@ -1,19 +1,19 @@
1
1
  /// <reference types="react" />
2
- export declare enum HeadingTag {
2
+ export declare enum HEADING_TAGS {
3
3
  H1 = "h1",
4
4
  H2 = "h2",
5
5
  H3 = "h3",
6
6
  H4 = "h4",
7
7
  H5 = "h5"
8
8
  }
9
- export declare enum HeadingAlign {
9
+ export declare enum HEADING_ALIGN {
10
10
  LEFT = "left",
11
11
  CENTER = "center",
12
12
  RIGHT = "right",
13
13
  JUSTIFY = "justify",
14
14
  NOWRAP = "nowrap"
15
15
  }
16
- export declare enum HeadingTransform {
16
+ export declare enum HEADING_TRANSFORM {
17
17
  LOWERCASE = "lowercase",
18
18
  UPPERCASE = "uppercase",
19
19
  CAPITALIZE = "capitalize",
@@ -21,9 +21,9 @@ export declare enum HeadingTransform {
21
21
  }
22
22
  export interface Props {
23
23
  children: string | React.ReactNode;
24
- tag: HeadingTag;
25
- align?: HeadingAlign;
26
- transform?: HeadingTransform;
24
+ tag: HEADING_TAGS;
25
+ align?: HEADING_ALIGN;
26
+ transform?: HEADING_TRANSFORM;
27
27
  id?: string;
28
28
  testID?: string;
29
29
  flush?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Props } from './Label.types';
3
3
  declare const Label: {
4
- ({ label, id }: Props): React.ReactElement;
4
+ ({ children, id, transform, className }: Props): React.ReactElement;
5
5
  displayName: string;
6
6
  };
7
7
  export default Label;
@@ -1,4 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { COPY_TRANSFORM } from "../Copy/Copy.types";
1
3
  export interface Props {
2
- label: string;
3
- id: string;
4
+ children: React.ReactNode;
5
+ id?: string;
6
+ className?: string;
7
+ transform?: COPY_TRANSFORM;
4
8
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { History } from 'history';
3
3
  export interface Props {
4
- href: string;
4
+ href?: string;
5
5
  children: React.ReactNode;
6
6
  history?: History;
7
7
  target?: '_self' | '_blank' | '_parent' | '_top';
@@ -1,6 +1,6 @@
1
1
  import { Props } from './Notice.types';
2
2
  declare const Notice: {
3
- ({ foo, id, testID }: Props): React.ReactElement;
3
+ ({ custom, id, testID }: Props): React.ReactElement;
4
4
  displayName: string;
5
5
  };
6
6
  export default Notice;
@@ -1,5 +1,5 @@
1
1
  export interface Props {
2
- foo: string;
2
+ custom: string;
3
3
  id?: string;
4
4
  testID?: string;
5
5
  }
@@ -1,8 +1,9 @@
1
+ /// <reference types="react" />
1
2
  export interface Props {
2
3
  id: string;
3
4
  name: string;
4
5
  icon?: string;
5
- label?: string;
6
+ label?: string | React.ReactNode[];
6
7
  required?: boolean;
7
8
  disabled?: boolean;
8
9
  className?: string;
@@ -13,7 +13,8 @@ export declare enum InputType {
13
13
  MONTH = "month",
14
14
  WEEK = "week",
15
15
  FILE = "file",
16
- TEXTAREA = "textarea"
16
+ TEXTAREA = "textarea",
17
+ HIDDEN = "hidden"
17
18
  }
18
19
  export interface Props {
19
20
  /** Input type. */
@@ -15,3 +15,26 @@ export { default as ContentPageLayout } from './ContentPageLayout';
15
15
  export { default as ContentRowsLayout } from './ContentRowsLayout';
16
16
  export { default as Form } from './Form';
17
17
  export { default as FormField } from './FormField';
18
+ export type { Props as BlockquoteProps } from './Blockquote/Blockquote.types';
19
+ export type { Props as ButtonProps } from './Button/Button.types';
20
+ export { BTN_TYPES, BTN_VARIANTS, BTN_SIZES } from './Button/Button.types';
21
+ export type { Props as CopyProps } from './Copy/Copy.types';
22
+ export { COPY_ALIGN, COPY_TRANSFORM, COPY_CONTEXTUAL, COPY_SIZE, COPY_TAG } from './Copy/Copy.types';
23
+ export type { Props as HeadingProps } from './Heading/Heading.types';
24
+ export { HEADING_TAGS, HEADING_ALIGN, HEADING_TRANSFORM } from './Heading/Heading.types';
25
+ export type { Props as IconProps } from './Icon/Icon.types';
26
+ export type { Props as ImageProps } from './Image/Image.types';
27
+ export type { Props as LinkProps } from './Link/Link.types';
28
+ export type { Props as ListProps, VariantsTypes } from './List/List.types';
29
+ export { Variants, ListTag } from './List/List.types';
30
+ export type { Props as ListItemProps } from './ListItem/ListItem.types';
31
+ export type { Props as NoticeProps } from './Notice/Notice.types';
32
+ export type { Props as LoaderProps } from './Loader/Loader.types';
33
+ export type { Props as ContainerProps } from './Container/Container.types';
34
+ export type { Props as ContentPageLayoutProps } from './ContentPageLayout/ContentPageLayout.types';
35
+ export { CPL_SPACING } from './ContentPageLayout/ContentPageLayout.types';
36
+ export type { Props as ContentRowsLayoutProps } from './ContentRowsLayout/ContentRowsLayout.types';
37
+ export { CRL_SIZE } from './ContentRowsLayout/ContentRowsLayout.types';
38
+ export type { Props as FormProps } from './Form/Form.types';
39
+ export type { Props as FormFieldProps } from './FormField/FormField.types';
40
+ export { FIELD_TYPES } from './FormField/FormField.types';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import '@elastic/eui/dist/eui_theme_light.css';
3
+ import '@elastic/react-search-ui-views/lib/styles/styles.css';
4
+ import { Props } from './Search.types';
5
+ export default function Search({ showOptions, resultAs }: Props): React.ReactElement;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Search from '.';
3
+ declare const meta: Meta<typeof Search>;
4
+ type Story = StoryObj<typeof Search>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export declare enum ResultAsTypes {
2
+ cardBasic = "cardBasic",
3
+ cardMedia = "cardMedia",
4
+ cardVideo = "cardVideo"
5
+ }
6
+ export interface Props {
7
+ custom: string;
8
+ showOptions: number[];
9
+ resultAs: ResultAsTypes;
10
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Search';
@@ -0,0 +1 @@
1
+ export default function appendClassName(baseClassName?: string | string[] | undefined, newClassName?: string | string[] | undefined): string;
@@ -0,0 +1,3 @@
1
+ export declare function getRaw(object: any): any;
2
+ export declare function getEscapedField(maybeObject: any): any;
3
+ export declare function formatResult(result: any): {};
@@ -0,0 +1 @@
1
+ export default function getFilterValueDisplay(filterValue: any): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ *
3
+ * @param {URL} URLParser URL interface provided by browser https://developer.mozilla.org/en-US/docs/Web/API/URL
4
+ * @param {String} currentLocation String representation of the browser's current location
5
+ */
6
+ export default function getUrlSanitizer(URLParser: typeof URL, currentLocation: string): (url: string) => string;