@webority/ui-react 0.13.0 → 0.13.3
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.
|
@@ -19,11 +19,16 @@
|
|
|
19
19
|
* @param {string} [props.accept] Defaults to images; pass e.g. "image/*,application/pdf" for mixed.
|
|
20
20
|
* @param {number} [props.maxSizeMb] Defaults to the shared DEFAULT_MAX_SIZE_MB.
|
|
21
21
|
* @param {boolean} [props.optional=false]
|
|
22
|
+
* @param {boolean} [props.validate=true] Check each pick against `accept` and `maxSizeMb` and show
|
|
23
|
+
* the field's own message for a rejected file. Set false when the caller validates the files
|
|
24
|
+
* itself and shows its own message through `error`: every pick then reaches `onChange`, so the
|
|
25
|
+
* person never sees two messages in two voices for one problem. `accept` and `maxSizeMb` still
|
|
26
|
+
* set the picker filter and the hint text.
|
|
22
27
|
* @param {string} [props.error]
|
|
23
28
|
* @param {string} [props.id]
|
|
24
29
|
*/
|
|
25
30
|
export default function AppFileAttachment({ label, value, // File | { url, name } | array | null
|
|
26
|
-
name, onChange, multiple, accept, maxSizeMb, optional, error, // external error, shown alongside internal validation errors
|
|
31
|
+
name, onChange, multiple, accept, maxSizeMb, optional, validate, error, // external error, shown alongside internal validation errors
|
|
27
32
|
id, ...rest }: {
|
|
28
33
|
label?: string;
|
|
29
34
|
value?: File | {
|
|
@@ -39,6 +44,7 @@ id, ...rest }: {
|
|
|
39
44
|
accept?: string;
|
|
40
45
|
maxSizeMb?: number;
|
|
41
46
|
optional?: boolean;
|
|
47
|
+
validate?: boolean;
|
|
42
48
|
error?: string;
|
|
43
49
|
id?: string;
|
|
44
50
|
}): import("react").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export { default as AppDateRangePicker } from "./components/AppDateRangePicker.j
|
|
|
26
26
|
export { default as AppDescriptions } from "./components/AppDescriptions.jsx";
|
|
27
27
|
export { default as AppDropdown } from "./components/AppDropdown.jsx";
|
|
28
28
|
export { default as AppEmptyState } from "./components/AppEmptyState.jsx";
|
|
29
|
-
export { default as AppFeedback } from "./components/AppFeedback.jsx";
|
|
30
29
|
export { default as AppFileAttachment } from "./components/AppFileAttachment.jsx";
|
|
31
30
|
export { default as AppFilePicker } from "./components/AppFilePicker.jsx";
|
|
32
31
|
export { default as AppFloatingDock } from "./components/AppFloatingDock.jsx";
|