@instructure/ui-file-drop 8.8.1-snapshot.7 → 8.9.1-snapshot.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.
@@ -0,0 +1,212 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import PropTypes from 'prop-types'
26
+
27
+ import { FormPropTypes } from '@instructure/ui-form-field'
28
+ import { ThemeablePropTypes } from '@instructure/emotion'
29
+
30
+ import type { FormMessage } from '@instructure/ui-form-field'
31
+ import type { Spacing, WithStyleProps } from '@instructure/emotion'
32
+ import type { PropValidators } from '@instructure/shared-types'
33
+
34
+ type FileDropOwnProps = {
35
+ id?: string
36
+ renderLabel: ((...args: any[]) => any) | React.ReactNode
37
+ accept?: string | string[]
38
+ messages?: FormMessage[]
39
+ onClick?: (...args: any[]) => any
40
+ onDrop?: (...args: any[]) => any
41
+ onDropAccepted?: (...args: any[]) => any
42
+ onDropRejected?: (...args: any[]) => any
43
+ onDragEnter?: (...args: any[]) => any
44
+ onDragOver?: (...args: any[]) => any
45
+ onDragLeave?: (...args: any[]) => any
46
+ shouldEnablePreview?: boolean
47
+ shouldAllowMultiple?: boolean
48
+ shouldAllowRepeats?: boolean
49
+ maxSize?: number
50
+ minSize?: number
51
+ interaction?: 'enabled' | 'disabled' | 'readonly'
52
+ display?: 'block' | 'inline-block'
53
+ height?: string | number
54
+ width?: string | number
55
+ maxWidth?: string | number
56
+ minWidth?: string | number
57
+ margin?: Spacing
58
+ }
59
+
60
+ type FileDropState = {
61
+ isDragAccepted: boolean
62
+ isDragRejected: boolean
63
+ isFocused: boolean
64
+ isFileBrowserDisplayed: boolean
65
+ }
66
+
67
+ type FileDropStyleProps = {
68
+ functionallyDisabled: boolean
69
+ visuallyDisabled: boolean
70
+ dragRejected: boolean
71
+ dragAccepted: boolean
72
+ }
73
+
74
+ type PropKeys = keyof FileDropOwnProps
75
+
76
+ type AllowedPropKeys = Readonly<Array<PropKeys>>
77
+
78
+ type FileDropProps = FileDropOwnProps & WithStyleProps
79
+
80
+ const propTypes: PropValidators<PropKeys> = {
81
+ /**
82
+ * The id of the input (to link it to its label for a11y)
83
+ */
84
+ id: PropTypes.string,
85
+ /**
86
+ * The content of FileDrop; can be a component or React node.
87
+ * Components receive `isDragAccepted` and `isDragRejected` as props.
88
+ */
89
+ renderLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired,
90
+ /**
91
+ * The mime media type/s or file extension/s allowed to be dropped inside
92
+ */
93
+ accept: PropTypes.oneOfType([
94
+ PropTypes.string,
95
+ PropTypes.arrayOf(PropTypes.string)
96
+ ]),
97
+ /**
98
+ * object with shape: `{
99
+ * text: PropTypes.string,
100
+ * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
101
+ * }`
102
+ */
103
+ messages: PropTypes.arrayOf(FormPropTypes.message),
104
+ /**
105
+ * Called when clicking on drop area to select files to upload
106
+ */
107
+ onClick: PropTypes.func,
108
+ /**
109
+ * Called when dropping files or when file dialog window exits successfully
110
+ */
111
+ onDrop: PropTypes.func,
112
+ /**
113
+ * Called when dropping allowed files
114
+ */
115
+ onDropAccepted: PropTypes.func,
116
+ /**
117
+ * Called when dropping rejected files
118
+ */
119
+ onDropRejected: PropTypes.func,
120
+ /**
121
+ * Called when dragging files
122
+ * and passing through FileDrop's content for the first time
123
+ */
124
+ onDragEnter: PropTypes.func,
125
+ /**
126
+ * Called when dragging files and passing through FileDrop's content
127
+ */
128
+ onDragOver: PropTypes.func,
129
+ /**
130
+ * Called when dragging files and leaving FileDrop's content
131
+ */
132
+ onDragLeave: PropTypes.func,
133
+ /**
134
+ * Flag to use window.URL.createObjectURL for each dropped file and pass it through file.preview
135
+ */
136
+ shouldEnablePreview: PropTypes.bool,
137
+ /**
138
+ * Flag to allow multiple files to drop at once
139
+ */
140
+ shouldAllowMultiple: PropTypes.bool,
141
+ /**
142
+ * Flag to allow upload of the same file more than once
143
+ */
144
+ shouldAllowRepeats: PropTypes.bool,
145
+ /**
146
+ * the maximum file size allowed
147
+ */
148
+ maxSize: PropTypes.number,
149
+ /**
150
+ * the minimum file size allowed
151
+ */
152
+ minSize: PropTypes.number,
153
+ /**
154
+ * Specifies if interaction with the input is enabled, disabled, or readonly.
155
+ */
156
+ interaction: PropTypes.oneOf(['enabled', 'disabled', 'readonly']),
157
+ /**
158
+ * Set the CSS `display` property on FileInput's outermost element
159
+ */
160
+ display: PropTypes.oneOf(['block', 'inline-block']),
161
+ /**
162
+ * Set the CSS `height` property on FileInput's outermost element
163
+ */
164
+ height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
165
+ /**
166
+ * Set the CSS `width` property on FileInput's outermost element
167
+ */
168
+ width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
169
+ /**
170
+ * Set the CSS `maxWidth` property on FileInput's outermost element
171
+ */
172
+ maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
173
+ /**
174
+ * Set the CSS `minWidth` property on FileInput's outermost element
175
+ */
176
+ minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
177
+ /**
178
+ * Valid values are 0, none, auto, xxx-small, xx-small, x-small, small,
179
+ * medium, large, x-large, xx-large. Apply these values via familiar
180
+ * CSS-like shorthand. For example: margin="small auto large".
181
+ */
182
+ margin: ThemeablePropTypes.spacing
183
+ }
184
+
185
+ const allowedProps: AllowedPropKeys = [
186
+ 'id',
187
+ 'renderLabel',
188
+ 'accept',
189
+ 'messages',
190
+ 'onClick',
191
+ 'onDrop',
192
+ 'onDropAccepted',
193
+ 'onDropRejected',
194
+ 'onDragEnter',
195
+ 'onDragOver',
196
+ 'onDragLeave',
197
+ 'shouldEnablePreview',
198
+ 'shouldAllowMultiple',
199
+ 'shouldAllowRepeats',
200
+ 'maxSize',
201
+ 'minSize',
202
+ 'interaction',
203
+ 'display',
204
+ 'height',
205
+ 'width',
206
+ 'maxWidth',
207
+ 'minWidth',
208
+ 'margin'
209
+ ]
210
+
211
+ export type { FileDropProps, FileDropState, FileDropStyleProps }
212
+ export { propTypes, allowedProps }
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { FileDropTheme } from '@instructure/shared-types'
26
- import { FileDropProps, FileDropStyleProps } from './types'
26
+ import { FileDropProps, FileDropStyleProps } from './props'
27
27
 
28
28
  /**
29
29
  * ---
package/src/index.ts CHANGED
@@ -23,4 +23,4 @@
23
23
  */
24
24
 
25
25
  export { FileDrop } from './FileDrop'
26
- export type { FileDropProps } from './FileDrop/types'
26
+ export type { FileDropProps } from './FileDrop/props'
@@ -1,8 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { jsx } from '@instructure/emotion';
5
- import { FileDropProps, FileDropState, FileDropStyleProps } from './types';
4
+ import type { FileDropProps, FileDropState, FileDropStyleProps } from './props';
6
5
  /**
7
6
  ---
8
7
  category: components
@@ -10,112 +9,56 @@ category: components
10
9
  **/
11
10
  declare class FileDrop extends Component<FileDropProps, FileDropState> {
12
11
  static readonly componentId = "FileDrop";
13
- static propTypes: {
14
- /**
15
- * The id of the input (to link it to its label for a11y)
16
- */
17
- id: PropTypes.Requireable<string>;
18
- /**
19
- * The content of FileDrop; can be a component or React node.
20
- * Components receive `isDragAccepted` and `isDragRejected` as props.
21
- */
22
- renderLabel: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
23
- /**
24
- * The mime media type/s or file extension/s allowed to be dropped inside
25
- */
26
- accept: PropTypes.Requireable<string | (string | null | undefined)[]>;
27
- /**
28
- * object with shape: `{
29
- * text: PropTypes.string,
30
- * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
31
- * }`
32
- */
33
- messages: PropTypes.Requireable<(PropTypes.InferProps<{
34
- text: PropTypes.Requireable<string>;
35
- type: PropTypes.Requireable<string>;
36
- }> | null | undefined)[]>;
37
- /**
38
- * Called when clicking on drop area to select files to upload
39
- */
40
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
41
- /**
42
- * Called when dropping files or when file dialog window exits successfully
43
- */
44
- onDrop: PropTypes.Requireable<(...args: any[]) => any>;
45
- /**
46
- * Called when dropping allowed files
47
- */
48
- onDropAccepted: PropTypes.Requireable<(...args: any[]) => any>;
49
- /**
50
- * Called when dropping rejected files
51
- */
52
- onDropRejected: PropTypes.Requireable<(...args: any[]) => any>;
53
- /**
54
- * Called when dragging files
55
- * and passing through FileDrop's content for the first time
56
- */
57
- onDragEnter: PropTypes.Requireable<(...args: any[]) => any>;
58
- /**
59
- * Called when dragging files and passing through FileDrop's content
60
- */
61
- onDragOver: PropTypes.Requireable<(...args: any[]) => any>;
62
- /**
63
- * Called when dragging files and leaving FileDrop's content
64
- */
65
- onDragLeave: PropTypes.Requireable<(...args: any[]) => any>;
66
- /**
67
- * Flag to use window.URL.createObjectURL for each dropped file and pass it through file.preview
68
- */
69
- shouldEnablePreview: PropTypes.Requireable<boolean>;
70
- /**
71
- * Flag to allow multiple files to drop at once
72
- */
73
- shouldAllowMultiple: PropTypes.Requireable<boolean>;
74
- /**
75
- * Flag to allow upload of the same file more than once
76
- */
77
- shouldAllowRepeats: PropTypes.Requireable<boolean>;
78
- /**
79
- * the maximum file size allowed
80
- */
81
- maxSize: PropTypes.Requireable<number>;
82
- /**
83
- * the minimum file size allowed
84
- */
85
- minSize: PropTypes.Requireable<number>;
86
- /**
87
- * Specifies if interaction with the input is enabled, disabled, or readonly.
88
- */
89
- interaction: PropTypes.Requireable<string>;
90
- /**
91
- * Set the CSS `display` property on FileInput's outermost element
92
- */
93
- display: PropTypes.Requireable<string>;
94
- /**
95
- * Set the CSS `height` property on FileInput's outermost element
96
- */
97
- height: PropTypes.Requireable<string | number>;
98
- /**
99
- * Set the CSS `width` property on FileInput's outermost element
100
- */
101
- width: PropTypes.Requireable<string | number>;
102
- /**
103
- * Set the CSS `maxWidth` property on FileInput's outermost element
104
- */
105
- maxWidth: PropTypes.Requireable<string | number>;
106
- /**
107
- * Set the CSS `minWidth` property on FileInput's outermost element
108
- */
109
- minWidth: PropTypes.Requireable<string | number>;
110
- /**
111
- * Valid values are 0, none, auto, xxx-small, xx-small, x-small, small,
112
- * medium, large, x-large, xx-large. Apply these values via familiar
113
- * CSS-like shorthand. For example: margin="small auto large".
114
- */
115
- margin: (props: any, propName: any, componentName: any, location: any) => any;
116
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
117
- styles: PropTypes.Requireable<object>;
118
- };
12
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
13
+ id?: string | undefined;
14
+ renderLabel: import("react").ReactNode | ((...args: any[]) => any);
15
+ accept?: string | string[] | undefined;
16
+ messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
17
+ onClick?: ((...args: any[]) => any) | undefined;
18
+ onDrop?: ((...args: any[]) => any) | undefined;
19
+ onDropAccepted?: ((...args: any[]) => any) | undefined;
20
+ onDropRejected?: ((...args: any[]) => any) | undefined;
21
+ onDragEnter?: ((...args: any[]) => any) | undefined;
22
+ onDragOver?: ((...args: any[]) => any) | undefined;
23
+ onDragLeave?: ((...args: any[]) => any) | undefined;
24
+ shouldEnablePreview?: boolean | undefined;
25
+ shouldAllowMultiple?: boolean | undefined;
26
+ shouldAllowRepeats?: boolean | undefined;
27
+ maxSize?: number | undefined;
28
+ minSize?: number | undefined;
29
+ interaction?: "enabled" | "disabled" | "readonly" | undefined;
30
+ display?: "block" | "inline-block" | undefined;
31
+ height?: string | number | undefined;
32
+ width?: string | number | undefined;
33
+ maxWidth?: string | number | undefined;
34
+ minWidth?: string | number | undefined;
35
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
36
+ }>;
37
+ static allowedProps: readonly (keyof {
38
+ id?: string | undefined;
39
+ renderLabel: import("react").ReactNode | ((...args: any[]) => any);
40
+ accept?: string | string[] | undefined;
41
+ messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
42
+ onClick?: ((...args: any[]) => any) | undefined;
43
+ onDrop?: ((...args: any[]) => any) | undefined;
44
+ onDropAccepted?: ((...args: any[]) => any) | undefined;
45
+ onDropRejected?: ((...args: any[]) => any) | undefined;
46
+ onDragEnter?: ((...args: any[]) => any) | undefined;
47
+ onDragOver?: ((...args: any[]) => any) | undefined;
48
+ onDragLeave?: ((...args: any[]) => any) | undefined;
49
+ shouldEnablePreview?: boolean | undefined;
50
+ shouldAllowMultiple?: boolean | undefined;
51
+ shouldAllowRepeats?: boolean | undefined;
52
+ maxSize?: number | undefined;
53
+ minSize?: number | undefined;
54
+ interaction?: "enabled" | "disabled" | "readonly" | undefined;
55
+ display?: "block" | "inline-block" | undefined;
56
+ height?: string | number | undefined;
57
+ width?: string | number | undefined;
58
+ maxWidth?: string | number | undefined;
59
+ minWidth?: string | number | undefined;
60
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
61
+ })[];
119
62
  static defaultProps: {
120
63
  onClick: (e: any) => void;
121
64
  onDrop: (accepted: any, rejected: any, e: any) => void;
@@ -129,16 +72,8 @@ declare class FileDrop extends Component<FileDropProps, FileDropState> {
129
72
  shouldAllowRepeats: boolean;
130
73
  maxSize: number;
131
74
  minSize: number;
132
- interaction: undefined;
133
75
  messages: never[];
134
- id: undefined;
135
- accept: undefined;
136
76
  display: string;
137
- height: undefined;
138
- width: undefined;
139
- minWidth: undefined;
140
- maxWidth: undefined;
141
- margin: undefined;
142
77
  };
143
78
  constructor(props: FileDropProps);
144
79
  componentDidMount(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FileDrop/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAclC,OAAO,EAAa,GAAG,EAAsB,MAAM,sBAAsB,CAAA;AAGzE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAkB1E;;;;GAIG;AACH,cAEM,QAAS,SAAQ,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAC5D,MAAM,CAAC,QAAQ,CAAC,WAAW,cAAa;IAExC,MAAM,CAAC,SAAS;QACd;;WAEG;;QAEH;;;WAGG;;QAGH;;WAEG;;QAKH;;;;;WAKG;;;;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG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ED,WAAW,MAAO,GAAG,UAapB;IAED,aAAa,MAAO,GAAG,UAgBtB;IAED,WAAW,MAAO,GAAG,UAUpB;IAED,MAAM;CA8EP;AAED,eAAe,QAAQ,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { FormMessage } from '@instructure/ui-form-field';
3
- import type { Spacing } from '@instructure/emotion';
4
- export declare type FileDropProps = {
3
+ import type { Spacing, WithStyleProps } from '@instructure/emotion';
4
+ import type { PropValidators } from '@instructure/shared-types';
5
+ declare type FileDropOwnProps = {
5
6
  id?: string;
6
7
  renderLabel: ((...args: any[]) => any) | React.ReactNode;
7
8
  accept?: string | string[];
@@ -25,19 +26,24 @@ export declare type FileDropProps = {
25
26
  maxWidth?: string | number;
26
27
  minWidth?: string | number;
27
28
  margin?: Spacing;
28
- makeStyles?: (...args: any[]) => any;
29
- styles?: any;
30
29
  };
31
- export declare type FileDropState = {
30
+ declare type FileDropState = {
32
31
  isDragAccepted: boolean;
33
32
  isDragRejected: boolean;
34
33
  isFocused: boolean;
35
34
  isFileBrowserDisplayed: boolean;
36
35
  };
37
- export declare type FileDropStyleProps = {
36
+ declare type FileDropStyleProps = {
38
37
  functionallyDisabled: boolean;
39
38
  visuallyDisabled: boolean;
40
39
  dragRejected: boolean;
41
40
  dragAccepted: boolean;
42
41
  };
43
- //# sourceMappingURL=types.d.ts.map
42
+ declare type PropKeys = keyof FileDropOwnProps;
43
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
44
+ declare type FileDropProps = FileDropOwnProps & WithStyleProps;
45
+ declare const propTypes: PropValidators<PropKeys>;
46
+ declare const allowedProps: AllowedPropKeys;
47
+ export type { FileDropProps, FileDropState, FileDropStyleProps };
48
+ export { propTypes, allowedProps };
49
+ //# sourceMappingURL=props.d.ts.map