@zendeskgarden/react-forms 8.45.0 → 8.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +990 -623
- package/dist/index.esm.js +830 -461
- package/dist/typings/elements/MultiThumbRange.d.ts +1 -2
- package/dist/typings/elements/Range.d.ts +1 -2
- package/dist/typings/elements/file-list/components/Delete.d.ts +11 -0
- package/dist/typings/elements/file-list/components/File.d.ts +5 -1
- package/dist/typings/elements/file-list/utils.d.ts +9 -2
- package/dist/typings/elements/tiles/Tiles.d.ts +1 -1
- package/dist/typings/index.d.ts +3 -1
- package/dist/typings/styled/file-list/StyledFile.d.ts +1 -0
- package/dist/typings/styled/file-list/StyledFileDelete.d.ts +13 -0
- package/dist/typings/styled/file-list/StyledFileIcon.d.ts +1 -1
- package/dist/typings/styled/index.d.ts +1 -0
- package/dist/typings/utils/useFileContext.d.ts +13 -0
- package/package.json +4 -4
|
@@ -30,8 +30,7 @@ export interface IMultiThumbRangeProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
30
30
|
maxValue?: number;
|
|
31
31
|
}) => void;
|
|
32
32
|
}
|
|
33
|
-
declare const _default: React.FunctionComponent<IMultiThumbRangeProps>;
|
|
34
33
|
/**
|
|
35
34
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
36
35
|
*/
|
|
37
|
-
export
|
|
36
|
+
export declare const MultiThumbRange: React.FC<IMultiThumbRangeProps>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React, { InputHTMLAttributes } from 'react';
|
|
8
|
-
interface IRangeProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
8
|
+
export interface IRangeProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
9
9
|
/** @ignore */
|
|
10
10
|
hasLowerTrack?: boolean;
|
|
11
11
|
}
|
|
@@ -13,4 +13,3 @@ interface IRangeProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
13
13
|
* @extends InputHTMLAttributes<HTMLInputElement>
|
|
14
14
|
*/
|
|
15
15
|
export declare const Range: React.ForwardRefExoticComponent<IRangeProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLDivElement>
|
|
10
|
+
*/
|
|
11
|
+
export declare const Delete: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { RefAttributes, HTMLAttributes, PropsWithoutRef, ForwardRefExoticComponent } from 'react';
|
|
8
8
|
import { Close } from './Close';
|
|
9
|
-
import {
|
|
9
|
+
import { Delete } from './Delete';
|
|
10
|
+
import { FILE_TYPE, VALIDATION_TYPE } from '../utils';
|
|
10
11
|
export interface IFileProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
12
|
/** Applies compact styling */
|
|
12
13
|
isCompact?: boolean;
|
|
@@ -14,9 +15,12 @@ export interface IFileProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
15
|
type?: FILE_TYPE;
|
|
15
16
|
/** Applies inset `box-shadow` styling on focus */
|
|
16
17
|
focusInset?: boolean;
|
|
18
|
+
/** Applies validation state styling */
|
|
19
|
+
validation?: VALIDATION_TYPE;
|
|
17
20
|
}
|
|
18
21
|
interface IStaticFileExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
|
|
19
22
|
Close: typeof Close;
|
|
23
|
+
Delete: typeof Delete;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
@@ -11,8 +11,15 @@ export declare enum FileType {
|
|
|
11
11
|
image = "image",
|
|
12
12
|
document = "document",
|
|
13
13
|
spreadsheet = "spreadsheet",
|
|
14
|
-
presentation = "presentation"
|
|
14
|
+
presentation = "presentation",
|
|
15
|
+
generic = "generic"
|
|
16
|
+
}
|
|
17
|
+
export declare enum ValidationType {
|
|
18
|
+
success = "success",
|
|
19
|
+
error = "error"
|
|
15
20
|
}
|
|
16
21
|
export declare type FILE_TYPE = keyof typeof FileType;
|
|
22
|
+
export declare type VALIDATION_TYPE = keyof typeof ValidationType;
|
|
17
23
|
export declare const ARRAY_FILE_TYPE: FILE_TYPE[];
|
|
18
|
-
export declare const
|
|
24
|
+
export declare const fileIconsDefault: Record<FILE_TYPE | VALIDATION_TYPE, React.ReactNode>;
|
|
25
|
+
export declare const fileIconsCompact: Record<FILE_TYPE | VALIDATION_TYPE, React.ReactNode>;
|
|
@@ -9,7 +9,7 @@ import { Tile } from './components/Tile';
|
|
|
9
9
|
import { Description } from './components/Description';
|
|
10
10
|
import { Icon } from './components/Icon';
|
|
11
11
|
import { Label } from './components/Label';
|
|
12
|
-
interface ITilesProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
export interface ITilesProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
13
|
/** Sets the value of the selected radio button */
|
|
14
14
|
value?: string;
|
|
15
15
|
/** Handles radio selection */
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -22,16 +22,18 @@ export type { IInputProps } from './elements/Input';
|
|
|
22
22
|
export { Radio } from './elements/Radio';
|
|
23
23
|
export type { IRadioProps } from './elements/Radio';
|
|
24
24
|
export { Range } from './elements/Range';
|
|
25
|
+
export type { IRangeProps } from './elements/Range';
|
|
25
26
|
export { Textarea } from './elements/Textarea';
|
|
26
27
|
export type { ITextareaProps } from './elements/Textarea';
|
|
27
28
|
export { Toggle } from './elements/Toggle';
|
|
28
29
|
export type { IToggleProps } from './elements/Toggle';
|
|
29
30
|
export { Select } from './elements/Select';
|
|
30
31
|
export type { ISelectProps } from './elements/Select';
|
|
31
|
-
export {
|
|
32
|
+
export { MultiThumbRange } from './elements/MultiThumbRange';
|
|
32
33
|
export type { IMultiThumbRangeProps } from './elements/MultiThumbRange';
|
|
33
34
|
/** Tiles */
|
|
34
35
|
export { Tiles } from './elements/tiles/Tiles';
|
|
36
|
+
export type { ITilesProps } from './elements/tiles/Tiles';
|
|
35
37
|
/** Input Group */
|
|
36
38
|
export { InputGroup } from './elements/input-group/InputGroup';
|
|
37
39
|
export type { IInputGroupProps } from './elements/input-group/InputGroup';
|
|
@@ -8,6 +8,7 @@ import { DefaultTheme } from 'styled-components';
|
|
|
8
8
|
interface IStyledFileProps {
|
|
9
9
|
isCompact?: boolean;
|
|
10
10
|
focusInset?: boolean;
|
|
11
|
+
validation?: 'success' | 'error';
|
|
11
12
|
}
|
|
12
13
|
export declare const StyledFile: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
13
14
|
'data-garden-id': string;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export declare const StyledFileDelete: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
'data-garden-version': string;
|
|
10
|
+
} & {
|
|
11
|
+
'data-garden-id': string;
|
|
12
|
+
'data-garden-version': string;
|
|
13
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
export declare const StyledFileIcon: import("styled-components").StyledComponent<({ children, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>, import("styled-components").DefaultTheme, {
|
|
8
|
+
export declare const StyledFileIcon: import("styled-components").StyledComponent<({ children, isCompact, theme, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>, import("styled-components").DefaultTheme, {
|
|
9
9
|
'data-garden-id': string;
|
|
10
10
|
'data-garden-version': string;
|
|
11
11
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -44,6 +44,7 @@ export * from './file-upload/StyledFileUpload';
|
|
|
44
44
|
*/
|
|
45
45
|
export * from './file-list/StyledFile';
|
|
46
46
|
export * from './file-list/StyledFileClose';
|
|
47
|
+
export * from './file-list/StyledFileDelete';
|
|
47
48
|
export * from './file-list/StyledFileIcon';
|
|
48
49
|
export * from './file-list/StyledFileList';
|
|
49
50
|
export * from './file-list/StyledFileListItem';
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
8
|
+
interface IFileContext {
|
|
9
|
+
isCompact?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const FileContext: import("react").Context<IFileContext | undefined>;
|
|
12
|
+
declare const useFileContext: () => IFileContext | undefined;
|
|
13
|
+
export default useFileContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-forms",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.47.2",
|
|
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>",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-field": "^1.3.6",
|
|
25
|
-
"@zendeskgarden/container-utilities": "^0.
|
|
25
|
+
"@zendeskgarden/container-utilities": "^0.7.0",
|
|
26
26
|
"lodash.debounce": "^4.0.8",
|
|
27
27
|
"polished": "^4.0.0",
|
|
28
28
|
"prop-types": "^15.5.7",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/lodash.debounce": "4.0.6",
|
|
39
|
-
"@zendeskgarden/react-theming": "^8.
|
|
39
|
+
"@zendeskgarden/react-theming": "^8.47.2",
|
|
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": "
|
|
53
|
+
"gitHead": "41cb43f285760417ae2145e47eca0e4a600455ab"
|
|
54
54
|
}
|