@zendeskgarden/react-forms 8.47.2 → 8.48.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.
@@ -33,4 +33,4 @@ export interface IMultiThumbRangeProps extends Omit<HTMLAttributes<HTMLDivElemen
33
33
  /**
34
34
  * @extends HTMLAttributes<HTMLDivElement>
35
35
  */
36
- export declare const MultiThumbRange: React.FC<IMultiThumbRangeProps>;
36
+ export declare const MultiThumbRange: React.ForwardRefExoticComponent<IMultiThumbRangeProps & React.RefAttributes<HTMLDivElement>>;
@@ -5,6 +5,9 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React, { HTMLAttributes } from 'react';
8
+ /**
9
+ * @deprecated
10
+ */
8
11
  export interface IFieldProps extends HTMLAttributes<HTMLDivElement> {
9
12
  /** Sets the field ID and the prefix for the generated label, input, and hint IDs */
10
13
  id?: string;
@@ -12,4 +15,4 @@ export interface IFieldProps extends HTMLAttributes<HTMLDivElement> {
12
15
  /**
13
16
  * @extends HTMLAttributes<HTMLDivElement>
14
17
  */
15
- export declare const Field: React.ForwardRefExoticComponent<IFieldProps & React.RefAttributes<HTMLDivElement>>;
18
+ export declare const Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -4,7 +4,7 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { RefAttributes, PropsWithoutRef, FieldsetHTMLAttributes, ForwardRefExoticComponent } from 'react';
7
+ import React, { FieldsetHTMLAttributes } from 'react';
8
8
  import { Legend } from './Legend';
9
9
  export interface IFieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
10
10
  /**
@@ -12,11 +12,9 @@ export interface IFieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetEleme
12
12
  */
13
13
  isCompact?: boolean;
14
14
  }
15
- interface IStaticFieldsetExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
16
- Legend: typeof Legend;
17
- }
18
15
  /**
19
16
  * @extends FieldsetHTMLAttributes<HTMLFieldSetElement>
20
17
  */
21
- export declare const Fieldset: IStaticFieldsetExport<HTMLFieldSetElement, IFieldsetProps>;
22
- export {};
18
+ export declare const Fieldset: React.ForwardRefExoticComponent<IFieldsetProps & React.RefAttributes<HTMLFieldSetElement>> & {
19
+ Legend: typeof Legend;
20
+ };
@@ -4,21 +4,20 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { HTMLAttributes, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
8
- import { VALIDATION } from '../utils/validation';
7
+ import React, { HTMLAttributes } from 'react';
8
+ import { VALIDATION } from '../../utils/validation';
9
+ import { StartIcon } from './components/StartIcon';
10
+ import { EndIcon } from './components/EndIcon';
11
+ /**
12
+ * @deprecated use IFauxInputStartIconProps or IFauxInputEndIconProps instead
13
+ */
9
14
  export interface IIconProps extends HTMLAttributes<HTMLElement> {
10
15
  isHovered?: boolean;
11
- isFocused?: boolean;
12
- isDisabled?: boolean;
13
- isRotated?: boolean;
16
+ isFocused: boolean;
17
+ isDisabled: boolean;
18
+ isRotated: boolean;
14
19
  children: any;
15
20
  }
16
- declare const StartIcon: (props: IIconProps) => JSX.Element;
17
- declare const EndIcon: (props: IIconProps) => JSX.Element;
18
- export interface IStaticFauxInputExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
19
- StartIcon: typeof StartIcon;
20
- EndIcon: typeof EndIcon;
21
- }
22
21
  export interface IFauxInputProps extends HTMLAttributes<HTMLDivElement> {
23
22
  /** Applies compact styling */
24
23
  isCompact?: boolean;
@@ -40,5 +39,7 @@ export interface IFauxInputProps extends HTMLAttributes<HTMLDivElement> {
40
39
  /**
41
40
  * @extends HTMLAttributes<HTMLDivElement>
42
41
  */
43
- export declare const FauxInput: IStaticFauxInputExport<HTMLDivElement, IFauxInputProps>;
44
- export {};
42
+ export declare const FauxInput: React.ForwardRefExoticComponent<IFauxInputProps & React.RefAttributes<HTMLDivElement>> & {
43
+ EndIcon: typeof EndIcon;
44
+ StartIcon: typeof StartIcon;
45
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { SVGAttributes } from 'react';
8
+ export interface IFauxInputEndIconProps extends SVGAttributes<SVGElement> {
9
+ /** Applies hover styling */
10
+ isHovered?: boolean;
11
+ /** Applies focus styling */
12
+ isFocused?: boolean;
13
+ /** Applies disabled styling */
14
+ isDisabled?: boolean;
15
+ /** Rotates icon 180 degrees */
16
+ isRotated?: boolean;
17
+ }
18
+ /**
19
+ * @extends SVGAttributes<SVGElement>
20
+ */
21
+ export declare const EndIcon: {
22
+ (props: IFauxInputEndIconProps): JSX.Element;
23
+ displayName: string;
24
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { SVGAttributes } from 'react';
8
+ export interface IFauxInputStartIconProps extends SVGAttributes<SVGElement> {
9
+ /** Applies hover styling */
10
+ isHovered?: boolean;
11
+ /** Applies focus styling */
12
+ isFocused?: boolean;
13
+ /** Applies disabled styling */
14
+ isDisabled?: boolean;
15
+ /** Rotates icon 180 degrees */
16
+ isRotated?: boolean;
17
+ }
18
+ /**
19
+ * @extends SVGAttributes<SVGElement>
20
+ */
21
+ export declare const StartIcon: {
22
+ (props: IFauxInputStartIconProps): JSX.Element;
23
+ displayName: string;
24
+ };
@@ -4,13 +4,11 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React, { RefAttributes, PropsWithoutRef, ForwardRefExoticComponent } from 'react';
7
+ import React from 'react';
8
8
  import { Item } from './components/Item';
9
- interface IStaticFileListExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
10
- Item: typeof Item;
11
- }
12
9
  /**
13
10
  * @extends HTMLAttributes<HTMLUListElement>
14
11
  */
15
- export declare const FileList: IStaticFileListExport<HTMLUListElement, React.HTMLAttributes<HTMLUListElement>>;
16
- export {};
12
+ export declare const FileList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLUListElement> & React.RefAttributes<HTMLUListElement>> & {
13
+ Item: typeof Item;
14
+ };
@@ -4,7 +4,7 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { RefAttributes, HTMLAttributes, PropsWithoutRef, ForwardRefExoticComponent } from 'react';
7
+ import React, { HTMLAttributes } from 'react';
8
8
  import { Close } from './Close';
9
9
  import { Delete } from './Delete';
10
10
  import { FILE_TYPE, VALIDATION_TYPE } from '../utils';
@@ -18,12 +18,10 @@ export interface IFileProps extends HTMLAttributes<HTMLDivElement> {
18
18
  /** Applies validation state styling */
19
19
  validation?: VALIDATION_TYPE;
20
20
  }
21
- interface IStaticFileExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
22
- Close: typeof Close;
23
- Delete: typeof Delete;
24
- }
25
21
  /**
26
22
  * @extends HTMLAttributes<HTMLDivElement>
27
23
  */
28
- export declare const File: IStaticFileExport<HTMLDivElement, IFileProps>;
29
- export {};
24
+ export declare const File: React.ForwardRefExoticComponent<IFileProps & React.RefAttributes<HTMLDivElement>> & {
25
+ Close: typeof Close;
26
+ Delete: typeof Delete;
27
+ };
@@ -4,7 +4,7 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { HTMLAttributes, ChangeEventHandler, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
7
+ import React, { HTMLAttributes, ChangeEventHandler } from 'react';
8
8
  import { Tile } from './components/Tile';
9
9
  import { Description } from './components/Description';
10
10
  import { Icon } from './components/Icon';
@@ -19,14 +19,12 @@ export interface ITilesProps extends HTMLAttributes<HTMLDivElement> {
19
19
  /** Centers tile content */
20
20
  isCentered?: boolean;
21
21
  }
22
- interface IStaticTilesExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
23
- Tile: typeof Tile;
24
- Description: typeof Description;
25
- Icon: typeof Icon;
26
- Label: typeof Label;
27
- }
28
22
  /**
29
23
  * @extends HTMLAttributes<HTMLDivElement>
30
24
  */
31
- export declare const Tiles: IStaticTilesExport<HTMLDivElement, ITilesProps>;
32
- export {};
25
+ export declare const Tiles: React.ForwardRefExoticComponent<ITilesProps & React.RefAttributes<HTMLDivElement>> & {
26
+ Description: typeof Description;
27
+ Icon: typeof Icon;
28
+ Label: typeof Label;
29
+ Tile: typeof Tile;
30
+ };
@@ -6,6 +6,6 @@
6
6
  */
7
7
  import React from 'react';
8
8
  /**
9
- * Accepts all `<span>` attributes
9
+ * @extends HTMLAttributes<HTMLSpanElement>
10
10
  */
11
11
  export declare const Description: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
@@ -6,6 +6,6 @@
6
6
  */
7
7
  import React from 'react';
8
8
  /**
9
- * Accepts all `<span>` attributes
9
+ * @extends HTMLAttributes<HTMLSpanElement>
10
10
  */
11
11
  export declare const Icon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
@@ -6,6 +6,6 @@
6
6
  */
7
7
  import React from 'react';
8
8
  /**
9
- * Accepts all `<span>` attributes
9
+ * @extends HTMLAttributes<HTMLSpanElement>
10
10
  */
11
11
  export declare const Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
@@ -4,15 +4,14 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React from 'react';
8
- interface ITileProps {
7
+ import React, { HTMLAttributes } from 'react';
8
+ export interface ITilesTileProps extends HTMLAttributes<HTMLLabelElement> {
9
9
  /** Sets the value of the input */
10
10
  value?: string;
11
11
  /** Indicates that the element is not interactive */
12
12
  disabled?: boolean;
13
13
  }
14
14
  /**
15
- * Accepts all `<label>` attributes
15
+ * @extends HTMLAttributes<HTMLLabelElement>
16
16
  */
17
- export declare const Tile: React.ForwardRefExoticComponent<ITileProps & React.HTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>;
18
- export {};
17
+ export declare const Tile: React.ForwardRefExoticComponent<ITilesTileProps & React.RefAttributes<HTMLLabelElement>>;
@@ -34,6 +34,7 @@ export type { IMultiThumbRangeProps } from './elements/MultiThumbRange';
34
34
  /** Tiles */
35
35
  export { Tiles } from './elements/tiles/Tiles';
36
36
  export type { ITilesProps } from './elements/tiles/Tiles';
37
+ export type { ITilesTileProps } from './elements/tiles/components/Tile';
37
38
  /** Input Group */
38
39
  export { InputGroup } from './elements/input-group/InputGroup';
39
40
  export type { IInputGroupProps } from './elements/input-group/InputGroup';
@@ -45,7 +46,9 @@ export { FileList } from './elements/file-list/FileList';
45
46
  export { File } from './elements/file-list/components/File';
46
47
  export type { IFileProps } from './elements/file-list/components/File';
47
48
  /** Other */
48
- export { FauxInput } from './elements/FauxInput';
49
- export type { IFauxInputProps, IStaticFauxInputExport, IIconProps } from './elements/FauxInput';
49
+ export { FauxInput } from './elements/faux-input/FauxInput';
50
+ export type { IFauxInputProps, IIconProps } from './elements/faux-input/FauxInput';
51
+ export type { IFauxInputStartIconProps } from './elements/faux-input/components/StartIcon';
52
+ export type { IFauxInputEndIconProps } from './elements/faux-input/components/EndIcon';
50
53
  export { MediaInput } from './elements/MediaInput';
51
54
  export type { IMediaInputProps } from './elements/MediaInput';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-forms",
3
- "version": "8.47.2",
3
+ "version": "8.48.0",
4
4
  "description": "Components relating to form elements in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/lodash.debounce": "4.0.6",
39
- "@zendeskgarden/react-theming": "^8.47.2",
39
+ "@zendeskgarden/react-theming": "^8.48.0",
40
40
  "@zendeskgarden/svg-icons": "6.30.2",
41
41
  "react-dropzone": "11.4.2"
42
42
  },
@@ -50,5 +50,5 @@
50
50
  "access": "public"
51
51
  },
52
52
  "zendeskgarden:src": "src/index.ts",
53
- "gitHead": "41cb43f285760417ae2145e47eca0e4a600455ab"
53
+ "gitHead": "75f36aee62043004650c3eb2e1583b98a87d71f8"
54
54
  }