@nolwenture/formik-jsonschema-form 1.3.7 → 1.3.8
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/cjs/Form/fields/FilesUploadField/FilesUploadFieldInput.js +15 -13
- package/dist/cjs/Form/fields/FilesUploadField/styledComponents.js +11 -3
- package/dist/cjs/Form/fields/ObjectField/styledComponents.js +8 -1
- package/dist/esm/Form/fields/FilesUploadField/FilesUploadFieldInput.js +15 -13
- package/dist/esm/Form/fields/FilesUploadField/styledComponents.js +11 -3
- package/dist/esm/Form/fields/ObjectField/styledComponents.js +8 -1
- package/dist/types/Form/components/index.d.ts +3 -1
- package/dist/types/Form/fields/FilesUploadField/index.d.ts +3 -1
- package/dist/types/Form/fields/FilesUploadField/styledComponents.d.ts +3 -1
- package/dist/types/Form/fields/index.d.ts +3 -1
- package/package.json +2 -2
|
@@ -104,7 +104,9 @@ const FilesUploadFieldInput = ({ acceptedFiletypes, className, deleteFileAriaLab
|
|
|
104
104
|
if (!allowMultipleFiles && files.length > 1) {
|
|
105
105
|
files = [files[0]];
|
|
106
106
|
}
|
|
107
|
-
else if (!allowMultipleFiles &&
|
|
107
|
+
else if (!allowMultipleFiles &&
|
|
108
|
+
uploadedFiles.length > 0 &&
|
|
109
|
+
files.length >= 1) {
|
|
108
110
|
files = [];
|
|
109
111
|
}
|
|
110
112
|
if (files.length === 0) {
|
|
@@ -115,9 +117,9 @@ const FilesUploadFieldInput = ({ acceptedFiletypes, className, deleteFileAriaLab
|
|
|
115
117
|
if (Array.isArray(acceptedFiletypes)) {
|
|
116
118
|
acceptedTypes = acceptedFiletypes;
|
|
117
119
|
}
|
|
118
|
-
else if (typeof acceptedFiletypes ===
|
|
120
|
+
else if (typeof acceptedFiletypes === "string") {
|
|
119
121
|
acceptedTypes = acceptedFiletypes
|
|
120
|
-
.split(
|
|
122
|
+
.split(",")
|
|
121
123
|
.map((type) => type.trim())
|
|
122
124
|
.filter(Boolean);
|
|
123
125
|
}
|
|
@@ -151,23 +153,23 @@ const FilesUploadFieldInput = ({ acceptedFiletypes, className, deleteFileAriaLab
|
|
|
151
153
|
e.dataTransfer.clearData();
|
|
152
154
|
}
|
|
153
155
|
};
|
|
154
|
-
const defaultRenderFile = (file, progress, onDelete) => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: progress === 100 ? ((0, jsx_runtime_1.jsxs)(UploadedFileItemContainer, { "$readOnly": readOnly, children: [(0, jsx_runtime_1.jsxs)(UploadedFileInfoContainer, { children: [!hideFileTypeIcon && ((0, jsx_runtime_1.jsx)(FileTypeIcon, { children: getFileIcon(file.mimeType ?? "") })), (0, jsx_runtime_1.jsxs)(UploadedFileName, { children: [file.name, !hideFileSize && ((0, jsx_runtime_1.jsx)(FileSize, { children: ` | ${file.size ? (file.size / (1024 * 1024)).toFixed(3) : "?"} MB` }))] })] }), !hideRemoveButton && !readOnly && file.id && ((0, jsx_runtime_1.jsx)(RemoveButton, { "aria-label": deleteFileAriaLabel ?? "Delete file", type: "button", onClick: () => onDelete(), ...removeButton?.props, children: removeButton?.content ?? (0, jsx_runtime_1.jsx)(RemoveButtonIcon, {}) }))] })) : ((0, jsx_runtime_1.jsxs)(FileItemContainer, { children: [(0, jsx_runtime_1.jsx)(UploadingFileName, { children: file.name }), (0, jsx_runtime_1.jsx)(ProgressBarContainer, { children: (0, jsx_runtime_1.jsx)(ProgressBar, { "$progress": progress }) })] })) }));
|
|
156
|
+
const defaultRenderFile = (file, progress, onDelete) => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: progress === 100 ? ((0, jsx_runtime_1.jsxs)(UploadedFileItemContainer, { "$readOnly": readOnly, children: [(0, jsx_runtime_1.jsxs)(UploadedFileInfoContainer, { "$readOnly": readOnly, children: [!hideFileTypeIcon && ((0, jsx_runtime_1.jsx)(FileTypeIcon, { children: getFileIcon(file.mimeType ?? "") })), (0, jsx_runtime_1.jsxs)(UploadedFileName, { children: [file.name, !hideFileSize && ((0, jsx_runtime_1.jsx)(FileSize, { children: ` | ${file.size ? (file.size / (1024 * 1024)).toFixed(3) : "?"} MB` }))] })] }), !hideRemoveButton && !readOnly && file.id && ((0, jsx_runtime_1.jsx)(RemoveButton, { "aria-label": deleteFileAriaLabel ?? "Delete file", type: "button", onClick: () => onDelete(), ...removeButton?.props, children: removeButton?.content ?? (0, jsx_runtime_1.jsx)(RemoveButtonIcon, {}) }))] })) : ((0, jsx_runtime_1.jsxs)(FileItemContainer, { children: [(0, jsx_runtime_1.jsx)(UploadingFileName, { children: file.name }), (0, jsx_runtime_1.jsx)(ProgressBarContainer, { children: (0, jsx_runtime_1.jsx)(ProgressBar, { "$progress": progress }) })] })) }));
|
|
155
157
|
const uploadedFile = renderFile ?? defaultRenderFile;
|
|
156
158
|
const fileTypes = acceptedFiletypes ? { accept: acceptedFiletypes } : {};
|
|
157
|
-
const hideUpload = !allowMultipleFiles && uploadedFiles.length > 0 || readOnly;
|
|
159
|
+
const hideUpload = (!allowMultipleFiles && uploadedFiles.length > 0) || readOnly;
|
|
158
160
|
const acceptedFiletypesValue = react_1.default.useMemo(() => {
|
|
159
161
|
if (!acceptedFiletypes)
|
|
160
162
|
return undefined;
|
|
161
163
|
return Array.isArray(acceptedFiletypes)
|
|
162
|
-
? acceptedFiletypes.join(
|
|
164
|
+
? acceptedFiletypes.join(",")
|
|
163
165
|
: acceptedFiletypes;
|
|
164
166
|
}, [acceptedFiletypes]);
|
|
165
|
-
return ((0, jsx_runtime_1.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
return ((0, jsx_runtime_1.jsxs)(FileUploadFieldContainer, { "$readOnly": readOnly, className: className, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, children: [isDragging && !hideUpload && ((0, jsx_runtime_1.jsx)(DragOverlay, { children: allowMultipleFiles ? infoText : infoTextSingle })), Array.isArray(uploadedFiles) &&
|
|
168
|
+
uploadedFiles.map((file) => ((0, jsx_runtime_1.jsx)(UploadedFileWrapper, { children: uploadedFile(file, uploadProgress[file.progressId], () => handleRemoveFile(file, setFieldValue)) }, file.progressId))), !uploadedFiles || uploadedFiles.length === 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!hideUploadIcon && (0, jsx_runtime_1.jsx)(UploadIcon, {}), infoText && ((0, jsx_runtime_1.jsx)(InfoText, { children: allowMultipleFiles ? infoText : infoTextSingle })), (0, jsx_runtime_1.jsx)(Divider, { children: (0, jsx_runtime_1.jsx)(DividerText, { children: orText ?? "or" }) }), (0, jsx_runtime_1.jsx)(FileUploadButton, { "aria-label": uploadButtonText ?? "Browse files", type: "button", disabled: readOnly, onClick: () => !readOnly && document.getElementById(name)?.click(), children: uploadButtonText ?? "Browse files" }), fileInfoText && (0, jsx_runtime_1.jsx)(FileInfoText, { children: fileInfoText })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [infoText && !hideUpload && ((0, jsx_runtime_1.jsxs)(InfoText, { children: [`${infoText} ${orText ?? "or"} `, (0, jsx_runtime_1.jsx)(FileUploadText, { "aria-label": uploadButtonText ?? "Browse files", onClick: () => !readOnly && document.getElementById(name)?.click(), children: uploadButtonText ?? "Browse files" })] })), fileInfoText && !hideUpload && ((0, jsx_runtime_1.jsx)(FileInfoTextMinimized, { children: fileInfoText }))] })), !hideUpload && ((0, jsx_runtime_1.jsx)(HiddenFileInput, { ...(allowMultipleFiles && { multiple: true }), accept: acceptedFiletypesValue, id: name, name: name, type: "file", disabled: readOnly, onChange: (event) => {
|
|
169
|
+
const files = event.target.files;
|
|
170
|
+
if (files) {
|
|
171
|
+
handleFileUpload(files, setFieldValue);
|
|
172
|
+
}
|
|
173
|
+
} }))] }));
|
|
172
174
|
};
|
|
173
175
|
exports.FilesUploadFieldInput = FilesUploadFieldInput;
|
|
@@ -105,7 +105,7 @@ exports.FileItemContainer = styled_components_1.default.div `
|
|
|
105
105
|
width: 100%;
|
|
106
106
|
`;
|
|
107
107
|
exports.UploadedFileItemContainer = styled_components_1.default.div `
|
|
108
|
-
align-items: center;
|
|
108
|
+
align-items: ${(props) => (props.$readOnly ? "center" : "flex-start")};
|
|
109
109
|
background-color: ${(props) => props.$readOnly ? "transparent" : props.theme.color.background.default};
|
|
110
110
|
border: ${(props) => props.$readOnly
|
|
111
111
|
? "none"
|
|
@@ -116,15 +116,18 @@ exports.UploadedFileItemContainer = styled_components_1.default.div `
|
|
|
116
116
|
gap: ${(props) => props.theme.spacing.m};
|
|
117
117
|
justify-content: space-between;
|
|
118
118
|
margin: 0;
|
|
119
|
+
min-width: 0;
|
|
119
120
|
padding: ${(props) => props.$readOnly
|
|
120
121
|
? "0"
|
|
121
122
|
: `${props.theme.spacing.m} ${props.theme.spacing.l}`};
|
|
122
123
|
width: 100%;
|
|
123
124
|
`;
|
|
124
125
|
exports.UploadedFileInfoContainer = styled_components_1.default.div `
|
|
125
|
-
align-items: center;
|
|
126
|
+
align-items: ${(props) => (props.$readOnly ? "center" : "flex-start")};
|
|
126
127
|
display: flex;
|
|
127
128
|
gap: ${(props) => props.theme.spacing.xs};
|
|
129
|
+
flex: 1;
|
|
130
|
+
min-width: 0;
|
|
128
131
|
`;
|
|
129
132
|
exports.UploadedFileWrapper = styled_components_1.default.div `
|
|
130
133
|
display: flex;
|
|
@@ -142,16 +145,21 @@ exports.FileTypeIcon = styled_components_1.default.div `
|
|
|
142
145
|
`;
|
|
143
146
|
exports.UploadingFileName = styled_components_1.default.div `
|
|
144
147
|
color: ${(props) => props.theme.color.text.default};
|
|
145
|
-
display:
|
|
148
|
+
display: flex;
|
|
146
149
|
font-family: ${(props) => props.theme.typography.fontFamily.base};
|
|
147
150
|
font-size: ${(props) => props.theme.typography.size.base};
|
|
148
151
|
margin-bottom: 0;
|
|
152
|
+
min-width: 0;
|
|
153
|
+
overflow-wrap: anywhere;
|
|
154
|
+
word-break: break-word;
|
|
149
155
|
`;
|
|
150
156
|
exports.UploadedFileName = styled_components_1.default.div `
|
|
151
157
|
color: ${(props) => props.theme.color.text.default};
|
|
152
158
|
font-family: ${(props) => props.theme.typography.fontFamily.base};
|
|
153
159
|
font-size: ${(props) => props.theme.typography.size.base};
|
|
154
160
|
margin-bottom: 0;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
overflow-wrap: anywhere;
|
|
155
163
|
word-break: break-word;
|
|
156
164
|
`;
|
|
157
165
|
exports.FileSize = styled_components_1.default.span `
|
|
@@ -28,6 +28,9 @@ exports.ObjectFieldDownButton = (0, styled_components_1.styled)(exports.ObjectFi
|
|
|
28
28
|
exports.ObjectFieldRemoveButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
|
|
29
29
|
exports.ObjectFieldAddButton = (0, styled_components_1.styled)(exports.ObjectFieldButton) ``;
|
|
30
30
|
exports.ObjectFieldSectionWrapper = styled_components_1.styled.fieldset `
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: ${(props) => props.theme.spacing.m};
|
|
31
34
|
padding: ${(props) => props.theme.spacing.s}
|
|
32
35
|
${(props) => props.theme.spacing.l} ${(props) => props.theme.spacing.s}
|
|
33
36
|
${(props) => props.theme.spacing.s};
|
|
@@ -40,4 +43,8 @@ exports.ObjectFieldSectionTitle = styled_components_1.styled.legend `
|
|
|
40
43
|
margin: 0;
|
|
41
44
|
justify-content: space-between;
|
|
42
45
|
`;
|
|
43
|
-
exports.ObjectFieldSectionChildrenWrapper = styled_components_1.styled.div
|
|
46
|
+
exports.ObjectFieldSectionChildrenWrapper = styled_components_1.styled.div `
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: ${(props) => props.theme.spacing.m};
|
|
50
|
+
`;
|
|
@@ -68,7 +68,9 @@ export const FilesUploadFieldInput = ({ acceptedFiletypes, className, deleteFile
|
|
|
68
68
|
if (!allowMultipleFiles && files.length > 1) {
|
|
69
69
|
files = [files[0]];
|
|
70
70
|
}
|
|
71
|
-
else if (!allowMultipleFiles &&
|
|
71
|
+
else if (!allowMultipleFiles &&
|
|
72
|
+
uploadedFiles.length > 0 &&
|
|
73
|
+
files.length >= 1) {
|
|
72
74
|
files = [];
|
|
73
75
|
}
|
|
74
76
|
if (files.length === 0) {
|
|
@@ -79,9 +81,9 @@ export const FilesUploadFieldInput = ({ acceptedFiletypes, className, deleteFile
|
|
|
79
81
|
if (Array.isArray(acceptedFiletypes)) {
|
|
80
82
|
acceptedTypes = acceptedFiletypes;
|
|
81
83
|
}
|
|
82
|
-
else if (typeof acceptedFiletypes ===
|
|
84
|
+
else if (typeof acceptedFiletypes === "string") {
|
|
83
85
|
acceptedTypes = acceptedFiletypes
|
|
84
|
-
.split(
|
|
86
|
+
.split(",")
|
|
85
87
|
.map((type) => type.trim())
|
|
86
88
|
.filter(Boolean);
|
|
87
89
|
}
|
|
@@ -115,22 +117,22 @@ export const FilesUploadFieldInput = ({ acceptedFiletypes, className, deleteFile
|
|
|
115
117
|
e.dataTransfer.clearData();
|
|
116
118
|
}
|
|
117
119
|
};
|
|
118
|
-
const defaultRenderFile = (file, progress, onDelete) => (_jsx(_Fragment, { children: progress === 100 ? (_jsxs(UploadedFileItemContainer, { "$readOnly": readOnly, children: [_jsxs(UploadedFileInfoContainer, { children: [!hideFileTypeIcon && (_jsx(FileTypeIcon, { children: getFileIcon(file.mimeType ?? "") })), _jsxs(UploadedFileName, { children: [file.name, !hideFileSize && (_jsx(FileSize, { children: ` | ${file.size ? (file.size / (1024 * 1024)).toFixed(3) : "?"} MB` }))] })] }), !hideRemoveButton && !readOnly && file.id && (_jsx(RemoveButton, { "aria-label": deleteFileAriaLabel ?? "Delete file", type: "button", onClick: () => onDelete(), ...removeButton?.props, children: removeButton?.content ?? _jsx(RemoveButtonIcon, {}) }))] })) : (_jsxs(FileItemContainer, { children: [_jsx(UploadingFileName, { children: file.name }), _jsx(ProgressBarContainer, { children: _jsx(ProgressBar, { "$progress": progress }) })] })) }));
|
|
120
|
+
const defaultRenderFile = (file, progress, onDelete) => (_jsx(_Fragment, { children: progress === 100 ? (_jsxs(UploadedFileItemContainer, { "$readOnly": readOnly, children: [_jsxs(UploadedFileInfoContainer, { "$readOnly": readOnly, children: [!hideFileTypeIcon && (_jsx(FileTypeIcon, { children: getFileIcon(file.mimeType ?? "") })), _jsxs(UploadedFileName, { children: [file.name, !hideFileSize && (_jsx(FileSize, { children: ` | ${file.size ? (file.size / (1024 * 1024)).toFixed(3) : "?"} MB` }))] })] }), !hideRemoveButton && !readOnly && file.id && (_jsx(RemoveButton, { "aria-label": deleteFileAriaLabel ?? "Delete file", type: "button", onClick: () => onDelete(), ...removeButton?.props, children: removeButton?.content ?? _jsx(RemoveButtonIcon, {}) }))] })) : (_jsxs(FileItemContainer, { children: [_jsx(UploadingFileName, { children: file.name }), _jsx(ProgressBarContainer, { children: _jsx(ProgressBar, { "$progress": progress }) })] })) }));
|
|
119
121
|
const uploadedFile = renderFile ?? defaultRenderFile;
|
|
120
122
|
const fileTypes = acceptedFiletypes ? { accept: acceptedFiletypes } : {};
|
|
121
|
-
const hideUpload = !allowMultipleFiles && uploadedFiles.length > 0 || readOnly;
|
|
123
|
+
const hideUpload = (!allowMultipleFiles && uploadedFiles.length > 0) || readOnly;
|
|
122
124
|
const acceptedFiletypesValue = React.useMemo(() => {
|
|
123
125
|
if (!acceptedFiletypes)
|
|
124
126
|
return undefined;
|
|
125
127
|
return Array.isArray(acceptedFiletypes)
|
|
126
|
-
? acceptedFiletypes.join(
|
|
128
|
+
? acceptedFiletypes.join(",")
|
|
127
129
|
: acceptedFiletypes;
|
|
128
130
|
}, [acceptedFiletypes]);
|
|
129
|
-
return (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
return (_jsxs(FileUploadFieldContainer, { "$readOnly": readOnly, className: className, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, children: [isDragging && !hideUpload && (_jsx(DragOverlay, { children: allowMultipleFiles ? infoText : infoTextSingle })), Array.isArray(uploadedFiles) &&
|
|
132
|
+
uploadedFiles.map((file) => (_jsx(UploadedFileWrapper, { children: uploadedFile(file, uploadProgress[file.progressId], () => handleRemoveFile(file, setFieldValue)) }, file.progressId))), !uploadedFiles || uploadedFiles.length === 0 ? (_jsxs(_Fragment, { children: [!hideUploadIcon && _jsx(UploadIcon, {}), infoText && (_jsx(InfoText, { children: allowMultipleFiles ? infoText : infoTextSingle })), _jsx(Divider, { children: _jsx(DividerText, { children: orText ?? "or" }) }), _jsx(FileUploadButton, { "aria-label": uploadButtonText ?? "Browse files", type: "button", disabled: readOnly, onClick: () => !readOnly && document.getElementById(name)?.click(), children: uploadButtonText ?? "Browse files" }), fileInfoText && _jsx(FileInfoText, { children: fileInfoText })] })) : (_jsxs(_Fragment, { children: [infoText && !hideUpload && (_jsxs(InfoText, { children: [`${infoText} ${orText ?? "or"} `, _jsx(FileUploadText, { "aria-label": uploadButtonText ?? "Browse files", onClick: () => !readOnly && document.getElementById(name)?.click(), children: uploadButtonText ?? "Browse files" })] })), fileInfoText && !hideUpload && (_jsx(FileInfoTextMinimized, { children: fileInfoText }))] })), !hideUpload && (_jsx(HiddenFileInput, { ...(allowMultipleFiles && { multiple: true }), accept: acceptedFiletypesValue, id: name, name: name, type: "file", disabled: readOnly, onChange: (event) => {
|
|
133
|
+
const files = event.target.files;
|
|
134
|
+
if (files) {
|
|
135
|
+
handleFileUpload(files, setFieldValue);
|
|
136
|
+
}
|
|
137
|
+
} }))] }));
|
|
136
138
|
};
|
|
@@ -99,7 +99,7 @@ export const FileItemContainer = styled.div `
|
|
|
99
99
|
width: 100%;
|
|
100
100
|
`;
|
|
101
101
|
export const UploadedFileItemContainer = styled.div `
|
|
102
|
-
align-items: center;
|
|
102
|
+
align-items: ${(props) => (props.$readOnly ? "center" : "flex-start")};
|
|
103
103
|
background-color: ${(props) => props.$readOnly ? "transparent" : props.theme.color.background.default};
|
|
104
104
|
border: ${(props) => props.$readOnly
|
|
105
105
|
? "none"
|
|
@@ -110,15 +110,18 @@ export const UploadedFileItemContainer = styled.div `
|
|
|
110
110
|
gap: ${(props) => props.theme.spacing.m};
|
|
111
111
|
justify-content: space-between;
|
|
112
112
|
margin: 0;
|
|
113
|
+
min-width: 0;
|
|
113
114
|
padding: ${(props) => props.$readOnly
|
|
114
115
|
? "0"
|
|
115
116
|
: `${props.theme.spacing.m} ${props.theme.spacing.l}`};
|
|
116
117
|
width: 100%;
|
|
117
118
|
`;
|
|
118
119
|
export const UploadedFileInfoContainer = styled.div `
|
|
119
|
-
align-items: center;
|
|
120
|
+
align-items: ${(props) => (props.$readOnly ? "center" : "flex-start")};
|
|
120
121
|
display: flex;
|
|
121
122
|
gap: ${(props) => props.theme.spacing.xs};
|
|
123
|
+
flex: 1;
|
|
124
|
+
min-width: 0;
|
|
122
125
|
`;
|
|
123
126
|
export const UploadedFileWrapper = styled.div `
|
|
124
127
|
display: flex;
|
|
@@ -136,16 +139,21 @@ export const FileTypeIcon = styled.div `
|
|
|
136
139
|
`;
|
|
137
140
|
export const UploadingFileName = styled.div `
|
|
138
141
|
color: ${(props) => props.theme.color.text.default};
|
|
139
|
-
display:
|
|
142
|
+
display: flex;
|
|
140
143
|
font-family: ${(props) => props.theme.typography.fontFamily.base};
|
|
141
144
|
font-size: ${(props) => props.theme.typography.size.base};
|
|
142
145
|
margin-bottom: 0;
|
|
146
|
+
min-width: 0;
|
|
147
|
+
overflow-wrap: anywhere;
|
|
148
|
+
word-break: break-word;
|
|
143
149
|
`;
|
|
144
150
|
export const UploadedFileName = styled.div `
|
|
145
151
|
color: ${(props) => props.theme.color.text.default};
|
|
146
152
|
font-family: ${(props) => props.theme.typography.fontFamily.base};
|
|
147
153
|
font-size: ${(props) => props.theme.typography.size.base};
|
|
148
154
|
margin-bottom: 0;
|
|
155
|
+
min-width: 0;
|
|
156
|
+
overflow-wrap: anywhere;
|
|
149
157
|
word-break: break-word;
|
|
150
158
|
`;
|
|
151
159
|
export const FileSize = styled.span `
|
|
@@ -25,6 +25,9 @@ export const ObjectFieldDownButton = styled(ObjectFieldButton) ``;
|
|
|
25
25
|
export const ObjectFieldRemoveButton = styled(ObjectFieldButton) ``;
|
|
26
26
|
export const ObjectFieldAddButton = styled(ObjectFieldButton) ``;
|
|
27
27
|
export const ObjectFieldSectionWrapper = styled.fieldset `
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: ${(props) => props.theme.spacing.m};
|
|
28
31
|
padding: ${(props) => props.theme.spacing.s}
|
|
29
32
|
${(props) => props.theme.spacing.l} ${(props) => props.theme.spacing.s}
|
|
30
33
|
${(props) => props.theme.spacing.s};
|
|
@@ -37,4 +40,8 @@ export const ObjectFieldSectionTitle = styled.legend `
|
|
|
37
40
|
margin: 0;
|
|
38
41
|
justify-content: space-between;
|
|
39
42
|
`;
|
|
40
|
-
export const ObjectFieldSectionChildrenWrapper = styled.div
|
|
43
|
+
export const ObjectFieldSectionChildrenWrapper = styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: ${(props) => props.theme.spacing.m};
|
|
47
|
+
`;
|
|
@@ -203,7 +203,9 @@ export declare const components: {
|
|
|
203
203
|
UploadedFileItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
204
204
|
$readOnly?: boolean;
|
|
205
205
|
}>> & string;
|
|
206
|
-
UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
206
|
+
UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
207
|
+
$readOnly?: boolean;
|
|
208
|
+
}>> & string;
|
|
207
209
|
UploadedFileWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
208
210
|
FileTypeIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
209
211
|
UploadingFileName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -17,7 +17,9 @@ declare const components: {
|
|
|
17
17
|
UploadedFileItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
18
18
|
$readOnly?: boolean;
|
|
19
19
|
}>> & string;
|
|
20
|
-
UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
20
|
+
UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
21
|
+
$readOnly?: boolean;
|
|
22
|
+
}>> & string;
|
|
21
23
|
UploadedFileWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
24
|
FileTypeIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
23
25
|
UploadingFileName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -15,7 +15,9 @@ export declare const FileItemContainer: import("styled-components/dist/types").I
|
|
|
15
15
|
export declare const UploadedFileItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
16
16
|
$readOnly?: boolean;
|
|
17
17
|
}>> & string;
|
|
18
|
-
export declare const UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
18
|
+
export declare const UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
19
|
+
$readOnly?: boolean;
|
|
20
|
+
}>> & string;
|
|
19
21
|
export declare const UploadedFileWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
20
22
|
export declare const FileTypeIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
23
|
export declare const UploadingFileName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -124,7 +124,9 @@ export declare const fieldComponents: {
|
|
|
124
124
|
UploadedFileItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
125
125
|
$readOnly?: boolean;
|
|
126
126
|
}>> & string;
|
|
127
|
-
UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
127
|
+
UploadedFileInfoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
128
|
+
$readOnly?: boolean;
|
|
129
|
+
}>> & string;
|
|
128
130
|
UploadedFileWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
129
131
|
FileTypeIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
130
132
|
UploadingFileName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nolwenture/formik-jsonschema-form",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "Formik form generation from json schema",
|
|
5
5
|
"author": "anttivikman <antti.vikman@nolwenture.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -125,4 +125,4 @@
|
|
|
125
125
|
"last 1 safari version"
|
|
126
126
|
]
|
|
127
127
|
}
|
|
128
|
-
}
|
|
128
|
+
}
|