@recursica/mui-adapter 0.22.0 → 0.23.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.
@@ -1,8 +1,352 @@
1
- import React from "react";
2
- import "./FileUpload.module.css";
1
+ import React, { forwardRef, useEffect, useRef, useState } from "react";
2
+ import {
3
+ filterStylingProps,
4
+ type RecursicaOverStyled,
5
+ } from "../../utils/filterStylingProps";
6
+ import { Button } from "../Button/Button";
7
+ import { Chip } from "../Chip/Chip";
8
+ import {
9
+ FormControlWrapper,
10
+ type RecursicaFormControlWrapperProps,
11
+ } from "../FormControlWrapper/FormControlWrapper";
12
+ import styles from "./FileUpload.module.css";
3
13
 
4
- export type FileUploadProps = React.HTMLAttributes<HTMLDivElement>;
14
+ import {
15
+ fileMatchesAccept,
16
+ type RecursicaFileUploadItem,
17
+ type RecursicaFileUploadProps as BaseRecursicaFileUploadProps,
18
+ } from "@recursica/adapter-common";
19
+ export type { RecursicaFileUploadItem };
5
20
 
6
- export const FileUpload: React.FC<FileUploadProps> = (props) => {
7
- return <div {...props}>FileUpload</div>;
8
- };
21
+ export interface RecursicaFileUploadProps
22
+ extends Omit<
23
+ React.HTMLAttributes<HTMLDivElement>,
24
+ "children" | "onDrop" | "onChange"
25
+ >,
26
+ Omit<
27
+ RecursicaFormControlWrapperProps,
28
+ "controlMaxWidth" | "controlMinWidth"
29
+ >,
30
+ BaseRecursicaFileUploadProps {
31
+ /** Visually forces the mandatory asterisk. Accepted for API parity with other adapters; MUI's own `required` already renders the asterisk, so this has no separate effect here. */
32
+ withAsterisk?: boolean;
33
+ }
34
+
35
+ export type FileUploadProps = RecursicaOverStyled<RecursicaFileUploadProps>;
36
+
37
+ function UploadIcon() {
38
+ return (
39
+ <svg
40
+ xmlns="http://www.w3.org/2000/svg"
41
+ viewBox="0 0 24 24"
42
+ fill="none"
43
+ stroke="currentColor"
44
+ strokeWidth="2"
45
+ strokeLinecap="round"
46
+ strokeLinejoin="round"
47
+ aria-hidden
48
+ >
49
+ <path d="M12 3v12" />
50
+ <path d="M7 8l5-5 5 5" />
51
+ <path d="M4 21h16" />
52
+ </svg>
53
+ );
54
+ }
55
+
56
+ /**
57
+ * A dropzone for uploading files, with a native browse-button fallback and a
58
+ * removable-chip list of the currently selected files.
59
+ *
60
+ * @example
61
+ * <FileUpload
62
+ * label="Upload Files"
63
+ * assistiveText="Max file size 5MB"
64
+ * files={files}
65
+ * onFilesAdded={(added) => setFiles((f) => [...f, ...added.map((file) => ({ file }))])}
66
+ * onFileRemove={(id) => setFiles((f) => f.filter((item) => (item.id ?? item.file.name) !== id))}
67
+ * />
68
+ */
69
+ export const FileUpload = forwardRef<HTMLDivElement, FileUploadProps>(
70
+ function FileUpload(props, ref) {
71
+ const {
72
+ overStyled = false,
73
+ formLayout = "stacked",
74
+
75
+ // Label & Wrapper Maps
76
+ labelSize,
77
+ labelAlignment,
78
+ labelOptionalText,
79
+ labelWithEditIcon,
80
+ labelActionArea,
81
+ onLabelEditClick,
82
+
83
+ label,
84
+ assistiveText,
85
+ assistiveWithIcon,
86
+ error,
87
+ required,
88
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
89
+ withAsterisk,
90
+ id,
91
+ className,
92
+ style,
93
+ disabled,
94
+ readOnly,
95
+
96
+ files,
97
+ onFilesAdded,
98
+ onFileRemove,
99
+ accept,
100
+ multiple = true,
101
+ maxSize,
102
+ maxFiles,
103
+ onFilesRejected,
104
+ invalidFileTypeMessage = "File type not accepted",
105
+ maxFilesMessage = `Maximum of ${maxFiles} files allowed`,
106
+ icon,
107
+ dropzoneLabel = "Drag and drop files here to upload",
108
+ browseButtonLabel = "Browse files",
109
+ removeFileLabel = "Remove",
110
+ ...rest
111
+ } = props;
112
+
113
+ const sanitizedProps = filterStylingProps(rest, overStyled);
114
+ const restRecord = sanitizedProps as Record<string, unknown>;
115
+
116
+ const inputRef = useRef<HTMLInputElement>(null);
117
+
118
+ // Whether the most recent drop/pick attempt included a file that failed the `accept` check —
119
+ // surfaced as the control's error state (see `effectiveError` below) rather than left for the
120
+ // integrator to wire up themselves.
121
+ const [invalidTypeRejected, setInvalidTypeRejected] = useState(false);
122
+ // Whether the most recent drop/pick attempt included a file that would have pushed the total
123
+ // past `maxFiles` — surfaced the same way as `invalidTypeRejected` (see `effectiveError`).
124
+ const [tooManyFilesRejected, setTooManyFilesRejected] = useState(false);
125
+
126
+ const handleFiles = (incoming: FileList | File[]) => {
127
+ if (disabled) return;
128
+ const list = Array.from(incoming);
129
+ if (list.length === 0) return;
130
+
131
+ const currentCount = files?.length ?? 0;
132
+ const accepted: File[] = [];
133
+ const rejected: File[] = [];
134
+ let hasInvalidType = false;
135
+ let hasTooMany = false;
136
+ for (const file of list) {
137
+ const isInvalidType = !fileMatchesAccept(file, accept);
138
+ if (isInvalidType) hasInvalidType = true;
139
+ const isTooLarge = maxSize !== undefined && file.size > maxSize;
140
+ const wouldExceedMax =
141
+ maxFiles !== undefined && currentCount + accepted.length >= maxFiles;
142
+ if (wouldExceedMax) hasTooMany = true;
143
+ const isRejected = isInvalidType || isTooLarge || wouldExceedMax;
144
+ (isRejected ? rejected : accepted).push(file);
145
+ }
146
+ setInvalidTypeRejected(hasInvalidType);
147
+ setTooManyFilesRejected(hasTooMany);
148
+ if (accepted.length > 0) onFilesAdded?.(accepted);
149
+ if (rejected.length > 0) onFilesRejected?.(rejected);
150
+ };
151
+
152
+ // Counts nested dragenter/dragleave pairs (they fire for every child element the pointer
153
+ // crosses, not just the dropzone itself) so the drag-over visual state only clears once the
154
+ // pointer has actually left the dropzone, not just moved between its children.
155
+ const dragCounterRef = useRef(0);
156
+ const [isDragging, setIsDragging] = useState(false);
157
+
158
+ const handleDragEnter = (event: React.DragEvent<HTMLDivElement>) => {
159
+ event.preventDefault();
160
+ dragCounterRef.current += 1;
161
+ setIsDragging(true);
162
+ };
163
+
164
+ const handleDragLeave = (event: React.DragEvent<HTMLDivElement>) => {
165
+ event.preventDefault();
166
+ dragCounterRef.current -= 1;
167
+ if (dragCounterRef.current <= 0) {
168
+ dragCounterRef.current = 0;
169
+ setIsDragging(false);
170
+ }
171
+ };
172
+
173
+ const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {
174
+ // Required so the browser treats this element as a valid drop target.
175
+ event.preventDefault();
176
+ };
177
+
178
+ const handleDrop = (event: React.DragEvent<HTMLDivElement>) => {
179
+ event.preventDefault();
180
+ dragCounterRef.current = 0;
181
+ setIsDragging(false);
182
+ handleFiles(event.dataTransfer.files);
183
+ };
184
+
185
+ const openFilePicker = () => {
186
+ if (disabled) return;
187
+ inputRef.current?.click();
188
+ };
189
+
190
+ const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
191
+ if (event.target.files) handleFiles(event.target.files);
192
+ // Reset so picking the same file again still fires a change event.
193
+ event.target.value = "";
194
+ };
195
+
196
+ // Roving tabindex across the file chip list: only the "active" chip's remove icon is a tab
197
+ // stop (Tab lands on the first chip), and Left/Right/Up/Down move it — see
198
+ // FILEUPLOAD_IMPLEMENTATION_NOTES.md.
199
+ const [activeChipIndex, setActiveChipIndex] = useState(0);
200
+ const removeIconRefs = useRef<Array<HTMLSpanElement | null>>([]);
201
+ const prevFileCountRef = useRef(files?.length ?? 0);
202
+
203
+ useEffect(() => {
204
+ const count = files?.length ?? 0;
205
+ // A chip was removed (via keyboard or otherwise) — keep focus in the list, clamped to the
206
+ // new length, rather than letting it fall back to the document body.
207
+ if (count > 0 && count < prevFileCountRef.current) {
208
+ const nextIndex = Math.min(activeChipIndex, count - 1);
209
+ setActiveChipIndex(nextIndex);
210
+ removeIconRefs.current[nextIndex]?.focus();
211
+ }
212
+ prevFileCountRef.current = count;
213
+ // Only react to the file list itself shrinking/growing, not to activeChipIndex changes.
214
+ // eslint-disable-next-line react-hooks/exhaustive-deps
215
+ }, [files]);
216
+
217
+ const handleFileListKeyDown = (
218
+ event: React.KeyboardEvent<HTMLDivElement>,
219
+ ) => {
220
+ const count = files?.length ?? 0;
221
+ if (count === 0) return;
222
+ let nextIndex: number | undefined;
223
+ if (event.key === "ArrowRight" || event.key === "ArrowDown") {
224
+ nextIndex = (activeChipIndex + 1) % count;
225
+ } else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
226
+ nextIndex = (activeChipIndex - 1 + count) % count;
227
+ }
228
+ if (nextIndex === undefined) return;
229
+ event.preventDefault();
230
+ setActiveChipIndex(nextIndex);
231
+ removeIconRefs.current[nextIndex]?.focus();
232
+ };
233
+
234
+ // The built-in `accept`-mismatch message is only shown when the integrator hasn't supplied
235
+ // their own `error` — an explicit error always wins.
236
+ const effectiveError =
237
+ error ??
238
+ (invalidTypeRejected
239
+ ? invalidFileTypeMessage
240
+ : tooManyFilesRejected
241
+ ? maxFilesMessage
242
+ : undefined);
243
+
244
+ const wrapperClass = className
245
+ ? `${styles.layoutOverride} ${className}`
246
+ : styles.layoutOverride;
247
+
248
+ return (
249
+ <FormControlWrapper
250
+ overStyled={overStyled}
251
+ className={wrapperClass}
252
+ style={style}
253
+ formLayout={formLayout}
254
+ labelSize={labelSize}
255
+ labelAlignment={labelAlignment}
256
+ labelOptionalText={labelOptionalText}
257
+ labelWithEditIcon={labelWithEditIcon}
258
+ labelActionArea={labelActionArea}
259
+ onLabelEditClick={onLabelEditClick}
260
+ label={label}
261
+ assistiveText={assistiveText}
262
+ assistiveWithIcon={assistiveWithIcon}
263
+ error={effectiveError}
264
+ required={required}
265
+ disabled={disabled}
266
+ id={id}
267
+ >
268
+ <div
269
+ ref={ref}
270
+ className={styles.root}
271
+ data-disabled={disabled ? "true" : undefined}
272
+ data-error={effectiveError ? "true" : undefined}
273
+ {...restRecord}
274
+ >
275
+ {!readOnly && (
276
+ <div
277
+ className={styles.dropzone}
278
+ data-dragging={isDragging ? "true" : undefined}
279
+ onDragEnter={disabled ? undefined : handleDragEnter}
280
+ onDragLeave={disabled ? undefined : handleDragLeave}
281
+ onDragOver={disabled ? undefined : handleDragOver}
282
+ onDrop={disabled ? undefined : handleDrop}
283
+ >
284
+ <span className={styles.uploadIcon}>
285
+ {icon ?? <UploadIcon />}
286
+ </span>
287
+ <span className={styles.dropzoneText}>{dropzoneLabel}</span>
288
+ <Button
289
+ variant="outline"
290
+ disabled={disabled}
291
+ onClick={openFilePicker}
292
+ >
293
+ {browseButtonLabel}
294
+ </Button>
295
+ <input
296
+ ref={inputRef}
297
+ type="file"
298
+ hidden
299
+ accept={accept}
300
+ multiple={multiple}
301
+ disabled={disabled}
302
+ onChange={handleInputChange}
303
+ />
304
+ </div>
305
+ )}
306
+
307
+ {files &&
308
+ files.length > 0 &&
309
+ (readOnly ? (
310
+ <div className={styles.fileList}>
311
+ {files.map((item: RecursicaFileUploadItem) => {
312
+ const itemId = item.id ?? item.file.name;
313
+ return (
314
+ <Chip key={itemId} tabIndex={-1}>
315
+ {item.file.name}
316
+ </Chip>
317
+ );
318
+ })}
319
+ </div>
320
+ ) : (
321
+ <div
322
+ className={styles.fileList}
323
+ onKeyDown={handleFileListKeyDown}
324
+ >
325
+ {files.map((item: RecursicaFileUploadItem, index) => {
326
+ const itemId = item.id ?? item.file.name;
327
+ return (
328
+ <Chip
329
+ key={itemId}
330
+ tabIndex={-1}
331
+ removeLabel={removeFileLabel}
332
+ removeTabIndex={index === activeChipIndex ? 0 : -1}
333
+ removeIconRef={(el) => {
334
+ removeIconRefs.current[index] = el;
335
+ }}
336
+ onRemove={
337
+ disabled ? undefined : () => onFileRemove?.(itemId)
338
+ }
339
+ >
340
+ {item.file.name}
341
+ </Chip>
342
+ );
343
+ })}
344
+ </div>
345
+ ))}
346
+ </div>
347
+ </FormControlWrapper>
348
+ );
349
+ },
350
+ );
351
+
352
+ FileUpload.displayName = "FileUpload";
@@ -14,15 +14,29 @@ import { FileUpload } from "@recursica/mui-adapter";
14
14
 
15
15
  ## 2. Basic Example
16
16
 
17
+ `FileUpload` is a **controlled** component: it never stores the selected files itself. `onFilesAdded` reports newly dropped/picked files, `onFileRemove` reports which file was removed, and you own the `files` array in between.
18
+
17
19
  ```tsx
18
- import React from "react";
20
+ import React, { useState } from "react";
19
21
  import { FileUpload } from "@recursica/mui-adapter";
22
+ import { type RecursicaFileUploadItem } from "@recursica/adapter-common";
20
23
 
21
24
  export default function Demo() {
25
+ const [files, setFiles] = useState<RecursicaFileUploadItem[]>([]);
26
+
22
27
  return (
23
28
  <FileUpload
24
- label="Drop files here"
25
- onDrop={(files) => console.log(files)}
29
+ label="Upload Files"
30
+ assistiveText="Max file size 5MB"
31
+ files={files}
32
+ onFilesAdded={(added) =>
33
+ setFiles((prev) => [...prev, ...added.map((file) => ({ file }))])
34
+ }
35
+ onFileRemove={(id) =>
36
+ setFiles((prev) =>
37
+ prev.filter((item) => (item.id ?? item.file.name) !== id),
38
+ )
39
+ }
26
40
  />
27
41
  );
28
42
  }
@@ -30,12 +44,156 @@ export default function Demo() {
30
44
 
31
45
  ---
32
46
 
33
- ## 3. Design System Integration
47
+ ## 3. Props Reference
48
+
49
+ | Prop | Type | Description |
50
+ | ------------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
51
+ | `files` | `RecursicaFileUploadItem[]` | Files currently selected, rendered as removable chips below the dropzone. Each item is `{ file: File; id?: string }`. |
52
+ | `onFilesAdded` | `(files: File[]) => void` | Called with newly dropped/picked files. Only the new files — merge them into `files` yourself. |
53
+ | `onFileRemove` | `(id: string) => void` | Called with a file's `id` (or `file.name` if no `id` was given) when its remove (X) icon is activated. |
54
+ | `accept` | `string` | Native `accept` attribute (e.g. `".pdf,.png"` or `"image/*"`) — constrains the picker dialog, and is also enforced against dropped files (via `onFilesRejected`), since the browser never applies `accept` to a `drop` event itself. |
55
+ | `multiple` | `boolean` | Whether more than one file can be selected/dropped at once. Defaults to `true`. |
56
+ | `maxSize` | `number` | Maximum size per file, in bytes. Oversized files go to `onFilesRejected` instead of `onFilesAdded`. |
57
+ | `maxFiles` | `number` | Maximum total number of files allowed in `files`. Files that would exceed it go to `onFilesRejected` instead of `onFilesAdded`. |
58
+ | `onFilesRejected` | `(files: File[]) => void` | Called with files rejected for exceeding `maxSize`/`maxFiles` or not matching `accept`. |
59
+ | `invalidFileTypeMessage` | `React.ReactNode` | Error message shown when a file is rejected for not matching `accept`. Defaults to `"File type not accepted"`. An explicit `error` prop always takes priority over this. |
60
+ | `maxFilesMessage` | `React.ReactNode` | Error message shown when a file is rejected for exceeding `maxFiles`. Defaults to `"Maximum of {maxFiles} files allowed"`. An explicit `error` prop always takes priority over this. |
61
+ | `icon` | `React.ReactNode` | Icon shown above the dropzone label. Defaults to the built-in upload icon. |
62
+ | `dropzoneLabel` | `React.ReactNode` | Text shown inside the dropzone. Defaults to `"Drag and drop files here to upload"`. |
63
+ | `browseButtonLabel` | `React.ReactNode` | Label for the button that opens the native file picker. Defaults to `"Browse files"`. |
64
+ | `removeFileLabel` | `string` | Screen-reader label for each file chip's remove button. Defaults to `"Remove"`. |
65
+ | `disabled` | `boolean` | Disables the dropzone, browse button, and every file chip's remove icon. |
66
+ | `readOnly` | `boolean` | Renders `files` as a static chip list with no remove icon, and omits the dropzone/browse button entirely. |
67
+
68
+ `FileUpload` also accepts the standard Recursica form-control props (`label`, `assistiveText`, `error`, `required`, `withAsterisk`, `formLayout`, `labelSize`, `labelAlignment`, `labelOptionalText`, `labelWithEditIcon`, `onLabelEditClick`) — see [FormControlWrapper's USAGE.md](../FormControlWrapper/USAGE.md) for how these behave.
69
+
70
+ ---
71
+
72
+ ## 4. Rejecting Oversized Files
73
+
74
+ ```tsx
75
+ <FileUpload
76
+ label="Upload Files"
77
+ assistiveText="Max file size 5MB"
78
+ maxSize={5 * 1024 * 1024}
79
+ files={files}
80
+ onFilesAdded={(added) =>
81
+ setFiles((prev) => [...prev, ...added.map((file) => ({ file }))])
82
+ }
83
+ onFilesRejected={(rejected) =>
84
+ setError(`${rejected.length} file(s) exceeded the 5MB limit.`)
85
+ }
86
+ onFileRemove={(id) =>
87
+ setFiles((prev) =>
88
+ prev.filter((item) => (item.id ?? item.file.name) !== id),
89
+ )
90
+ }
91
+ />
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 5. Rejecting Files by Extension/MIME Type
97
+
98
+ ```tsx
99
+ <FileUpload
100
+ label="Upload Files"
101
+ assistiveText="Only .pdf and .png files are accepted"
102
+ accept=".pdf,.png"
103
+ files={files}
104
+ onFilesAdded={(added) =>
105
+ setFiles((prev) => [...prev, ...added.map((file) => ({ file }))])
106
+ }
107
+ onFileRemove={(id) =>
108
+ setFiles((prev) =>
109
+ prev.filter((item) => (item.id ?? item.file.name) !== id),
110
+ )
111
+ }
112
+ />
113
+ ```
114
+
115
+ This applies equally to a file picked via "Browse files" and one dragged directly onto the
116
+ dropzone — the browser's own `accept` filtering never covers drag-and-drop, so `FileUpload`
117
+ re-validates it itself before calling `onFilesAdded`/`onFilesRejected`.
118
+
119
+ A mismatched file automatically puts the control into its error state with the message
120
+ `"File type not accepted"` — no need to wire `onFilesRejected` into your own `error` prop just to
121
+ show something. Override the message with `invalidFileTypeMessage`, or pass your own `error` prop
122
+ to take over the error state entirely:
123
+
124
+ ```tsx
125
+ <FileUpload
126
+ label="Upload Files"
127
+ accept=".pdf,.png"
128
+ invalidFileTypeMessage="Only PDF and PNG files are supported"
129
+ files={files}
130
+ onFilesAdded={(added) =>
131
+ setFiles((prev) => [...prev, ...added.map((file) => ({ file }))])
132
+ }
133
+ onFileRemove={(id) =>
134
+ setFiles((prev) =>
135
+ prev.filter((item) => (item.id ?? item.file.name) !== id),
136
+ )
137
+ }
138
+ />
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 6. Limiting the Number of Files
144
+
145
+ ```tsx
146
+ <FileUpload
147
+ label="Upload Files"
148
+ assistiveText="Up to 2 files allowed"
149
+ maxFiles={2}
150
+ files={files}
151
+ onFilesAdded={(added) =>
152
+ setFiles((prev) => [...prev, ...added.map((file) => ({ file }))])
153
+ }
154
+ onFileRemove={(id) =>
155
+ setFiles((prev) =>
156
+ prev.filter((item) => (item.id ?? item.file.name) !== id),
157
+ )
158
+ }
159
+ />
160
+ ```
161
+
162
+ Once `files` reaches `maxFiles`, further dropped/picked files are rejected the same way an
163
+ `accept` mismatch is — automatically switching the control into its error state with the default
164
+ `maxFilesMessage` ("Maximum of 2 files allowed" for the example above). Override the message with
165
+ `maxFilesMessage`, or pass your own `error` prop to take over the error state entirely.
166
+
167
+ ---
168
+
169
+ ## 7. Read-only Mode
170
+
171
+ ```tsx
172
+ <FileUpload label="Uploaded Files" readOnly files={files} />
173
+ ```
174
+
175
+ Renders `files` as a plain, non-removable chip list with no dropzone or Browse button — for
176
+ displaying files that were already submitted and can no longer be changed. `onFilesAdded`/
177
+ `onFileRemove` aren't called in this mode since there's nothing to add or remove.
178
+
179
+ ---
180
+
181
+ ## 8. Keyboard Navigation of the File List
182
+
183
+ Once files are selected, their chips form a single roving-tabindex group, not one tab stop per
184
+ chip: `Tab` lands on the first chip's remove icon, `Enter`/`Space` removes the focused chip, and
185
+ `ArrowLeft`/`ArrowRight`/`ArrowUp`/`ArrowDown` move focus between chips (wrapping at both ends).
186
+ This is a group-level pattern, not an option on `Chip` used standalone elsewhere. (Not applicable
187
+ in `readOnly` mode, which has no remove icons to navigate to.)
188
+
189
+ ---
190
+
191
+ ## 9. Design System Integration
34
192
 
35
193
  All Recursica components in the `@recursica/mui-adapter` package adhere strictly to design system spacing, scaling, and behavior patterns.
36
194
 
37
195
  > [!IMPORTANT]
38
196
  >
39
- > - **Anti-override protection**: Rogues style injections (like inline `style` or arbitrary `className`) are automatically blocked by our prop layer unless `overStyled={true}` is explicitly provided.
197
+ > - **Anti-override protection**: Rogue style injections (like inline `style` or arbitrary `className`) are automatically blocked by our prop layer unless `overStyled={true}` is explicitly provided.
40
198
  > - **No Direct Layers**: Do not pass a `layer` prop to this component. To place it on a specific visual layer, wrap it in a `<Layer layer={0|1|2|3}>` component natively.
41
199
  > - **Variables and Theming**: Styling is entirely determined by local CSS variables defined in `recursica_variables_scoped.css` and mapped in the component's CSS module.
package/src/index.ts CHANGED
@@ -14,7 +14,6 @@ export const Stack = rawComponents.Stack;
14
14
  export const Container = rawComponents.Container;
15
15
  export const Typography = rawComponents.Typography;
16
16
  export const FileInput = rawComponents.FileInput;
17
- export const FileUpload = rawComponents.FileUpload;
18
17
 
19
18
  // Statically wrap and export components to inject overStyled visual highlight in dev mode
20
19
  export const Accordion = wrapComponent(
@@ -65,6 +64,9 @@ export const DatePicker = wrapComponent(
65
64
  export const Dropdown = wrapComponent(
66
65
  rawComponents.Dropdown,
67
66
  ) as typeof rawComponents.Dropdown;
67
+ export const FileUpload = wrapComponent(
68
+ rawComponents.FileUpload,
69
+ ) as typeof rawComponents.FileUpload;
68
70
  export const FormControlLayout = wrapComponent(
69
71
  rawComponents.FormControlLayout,
70
72
  ) as typeof rawComponents.FormControlLayout;