@zendeskgarden/react-forms 8.44.2 → 8.47.1

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.
@@ -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 { FILE_TYPE } from '../utils';
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 fileIcons: Record<FILE_TYPE, React.ReactNode>;
24
+ export declare const fileIconsDefault: Record<FILE_TYPE | VALIDATION_TYPE, React.ReactNode>;
25
+ export declare const fileIconsCompact: Record<FILE_TYPE | VALIDATION_TYPE, React.ReactNode>;
@@ -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.44.2",
3
+ "version": "8.47.1",
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.44.2",
39
+ "@zendeskgarden/react-theming": "^8.47.1",
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": "179b8d53e7f0a73528ae31c10d8f7e39ab73d7ca"
53
+ "gitHead": "62420ca54dbb5b3b90cd05bf455cd4ba91b4965e"
54
54
  }