@mittwald/flow-react-components 0.2.0-alpha.237 → 0.2.0-alpha.239
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/CHANGELOG.md +12 -0
- package/dist/assets/doc-properties.json +2292 -2195
- package/dist/js/components/src/components/FileDropZone/FileDropZone.mjs +47 -31
- package/dist/js/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
- package/dist/js/components/src/components/FileField/FileField.mjs +24 -11
- package/dist/js/components/src/components/FileField/FileField.mjs.map +1 -1
- package/dist/js/components/src/components/propTypes/index.mjs +1 -0
- package/dist/js/components/src/components/propTypes/index.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs +1 -0
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs +5 -4
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/core/src/file.mjs +12 -0
- package/dist/js/core/src/file.mjs.map +1 -0
- package/dist/js/flr-universal.mjs +1 -0
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/types/components/FileDropZone/FileDropZone.d.ts +4 -1
- package/dist/types/components/FileDropZone/FileDropZone.d.ts.map +1 -1
- package/dist/types/components/FileDropZone/index.d.ts +1 -0
- package/dist/types/components/FileDropZone/index.d.ts.map +1 -1
- package/dist/types/components/FileDropZone/view.d.ts +8 -0
- package/dist/types/components/FileDropZone/view.d.ts.map +1 -0
- package/dist/types/components/FileField/FileField.d.ts +2 -2
- package/dist/types/components/FileField/FileField.d.ts.map +1 -1
- package/dist/types/components/propTypes/index.d.ts +2 -0
- package/dist/types/components/propTypes/index.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
- package/dist/types/lib/propsContext/propsContext.d.ts +2 -0
- package/dist/types/lib/propsContext/propsContext.d.ts.map +1 -1
- package/dist/types/views/FileDropZoneView.d.ts +5 -0
- package/dist/types/views/FileDropZoneView.d.ts.map +1 -0
- package/package.json +6 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import 'react';
|
|
4
|
+
import { useRef } from 'react';
|
|
5
5
|
import * as Aria from 'react-aria-components';
|
|
6
6
|
import { IllustratedMessage } from '../IllustratedMessage/IllustratedMessage.mjs';
|
|
7
7
|
import styles from './FileDropZone.module.scss.mjs';
|
|
@@ -9,40 +9,56 @@ import clsx from 'clsx';
|
|
|
9
9
|
import '../../lib/propsContext/propsContext.mjs';
|
|
10
10
|
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
11
11
|
import { PropsContextProvider } from '../../lib/propsContext/PropsContextProvider.mjs';
|
|
12
|
+
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
12
13
|
|
|
13
|
-
const FileDropZone = (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
FileField: {
|
|
18
|
-
accept,
|
|
14
|
+
const FileDropZone = flowComponent(
|
|
15
|
+
"FileDropZone",
|
|
16
|
+
(props) => {
|
|
17
|
+
const {
|
|
19
18
|
multiple,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
19
|
+
accept,
|
|
20
|
+
className,
|
|
21
|
+
onChange: onChangeDropZone,
|
|
22
|
+
children,
|
|
23
|
+
name
|
|
24
|
+
} = props;
|
|
25
|
+
const fileFieldRef = useRef(null);
|
|
26
|
+
const rootClassName = clsx(styles.fileDropZone, className);
|
|
27
|
+
const propsContext = {
|
|
28
|
+
FileField: {
|
|
29
|
+
name,
|
|
30
|
+
onChange: onChangeDropZone,
|
|
31
|
+
ref: fileFieldRef,
|
|
32
|
+
accept,
|
|
33
|
+
multiple,
|
|
34
|
+
Button: { variant: "outline", color: "dark" }
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const onDropHandler = async (event) => {
|
|
38
|
+
const fileDropItems = event.items.filter(
|
|
39
|
+
(file) => file.kind === "file"
|
|
40
|
+
);
|
|
41
|
+
const files = await Promise.all(
|
|
42
|
+
fileDropItems.filter((f) => !accept || accept?.includes(f.type)).map(async (f) => {
|
|
43
|
+
return await f.getFile();
|
|
44
|
+
})
|
|
45
|
+
);
|
|
46
|
+
if (files.length > 0) {
|
|
47
|
+
const fileTransfer = new DataTransfer();
|
|
48
|
+
for (const file of multiple ? files : [files[0]]) {
|
|
49
|
+
if (file) {
|
|
50
|
+
fileTransfer.items.add(file);
|
|
39
51
|
}
|
|
40
52
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
53
|
+
onChangeDropZone?.(fileTransfer.files);
|
|
54
|
+
if (fileFieldRef.current) {
|
|
55
|
+
fileFieldRef.current.files = fileTransfer.files;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ jsx(Aria.DropZone, { className: rootClassName, onDrop: onDropHandler, children: /* @__PURE__ */ jsx(IllustratedMessage, { color: "dark", children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, mergeInParentContext: true, children }) }) });
|
|
60
|
+
}
|
|
61
|
+
);
|
|
46
62
|
|
|
47
63
|
export { FileDropZone, FileDropZone as default };
|
|
48
64
|
//# sourceMappingURL=FileDropZone.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropZone.mjs","sources":["../../../../../../src/components/FileDropZone/FileDropZone.tsx"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"FileDropZone.mjs","sources":["../../../../../../src/components/FileDropZone/FileDropZone.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, useRef } from \"react\";\nimport React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { IllustratedMessage } from \"@/components/IllustratedMessage\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./FileDropZone.module.scss\";\nimport clsx from \"clsx\";\nimport type { FileInputOnChangeHandler } from \"@/components/FileField/components/FileInput\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { DropEvent, FocusableElement } from \"@react-types/shared\";\n\nexport interface FileDropZoneProps\n extends PropsWithClassName,\n FlowComponentProps<FocusableElement>,\n PropsWithChildren,\n Pick<Aria.InputProps, \"accept\" | \"multiple\" | \"name\"> {\n onChange?: FileInputOnChangeHandler;\n}\n\n/** @flr-generate all */\nexport const FileDropZone: FC<FileDropZoneProps> = flowComponent(\n \"FileDropZone\",\n (props) => {\n const {\n multiple,\n accept,\n className,\n onChange: onChangeDropZone,\n children,\n name,\n } = props;\n\n const fileFieldRef = useRef<HTMLInputElement>(null);\n const rootClassName = clsx(styles.fileDropZone, className);\n\n const propsContext: PropsContext = {\n FileField: {\n name,\n onChange: onChangeDropZone,\n ref: fileFieldRef,\n accept: accept,\n multiple: multiple,\n Button: { variant: \"outline\", color: \"dark\" },\n },\n };\n\n const onDropHandler = async (event: DropEvent) => {\n const fileDropItems = event.items.filter(\n (file) => file.kind === \"file\",\n ) as Aria.FileDropItem[];\n\n const files = await Promise.all(\n fileDropItems\n .filter((f) => !accept || accept?.includes(f.type))\n .map(async (f) => {\n return await f.getFile();\n }),\n );\n\n if (files.length > 0) {\n const fileTransfer = new DataTransfer();\n for (const file of multiple ? files : [files[0]]) {\n if (file) {\n fileTransfer.items.add(file);\n }\n }\n\n onChangeDropZone?.(fileTransfer.files);\n if (fileFieldRef.current) {\n fileFieldRef.current.files = fileTransfer.files;\n }\n }\n };\n\n return (\n <Aria.DropZone className={rootClassName} onDrop={onDropHandler}>\n <IllustratedMessage color=\"dark\">\n <PropsContextProvider props={propsContext} mergeInParentContext>\n {children}\n </PropsContextProvider>\n </IllustratedMessage>\n </Aria.DropZone>\n );\n },\n);\n\nexport default FileDropZone;\n"],"names":[],"mappings":";;;;;;;;;;;AAyBO,MAAM,YAAsC,GAAA,aAAA;AAAA,EACjD,cAAA;AAAA,EACA,CAAC,KAAU,KAAA;AACT,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAU,EAAA,gBAAA;AAAA,MACV,QAAA;AAAA,MACA;AAAA,KACE,GAAA,KAAA;AAEJ,IAAM,MAAA,YAAA,GAAe,OAAyB,IAAI,CAAA;AAClD,IAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,YAAA,EAAc,SAAS,CAAA;AAEzD,IAAA,MAAM,YAA6B,GAAA;AAAA,MACjC,SAAW,EAAA;AAAA,QACT,IAAA;AAAA,QACA,QAAU,EAAA,gBAAA;AAAA,QACV,GAAK,EAAA,YAAA;AAAA,QACL,MAAA;AAAA,QACA,QAAA;AAAA,QACA,MAAQ,EAAA,EAAE,OAAS,EAAA,SAAA,EAAW,OAAO,MAAO;AAAA;AAC9C,KACF;AAEA,IAAM,MAAA,aAAA,GAAgB,OAAO,KAAqB,KAAA;AAChD,MAAM,MAAA,aAAA,GAAgB,MAAM,KAAM,CAAA,MAAA;AAAA,QAChC,CAAC,IAAS,KAAA,IAAA,CAAK,IAAS,KAAA;AAAA,OAC1B;AAEA,MAAM,MAAA,KAAA,GAAQ,MAAM,OAAQ,CAAA,GAAA;AAAA,QAC1B,aACG,CAAA,MAAA,CAAO,CAAC,CAAA,KAAM,CAAC,MAAU,IAAA,MAAA,EAAQ,QAAS,CAAA,CAAA,CAAE,IAAI,CAAC,CACjD,CAAA,GAAA,CAAI,OAAO,CAAM,KAAA;AAChB,UAAO,OAAA,MAAM,EAAE,OAAQ,EAAA;AAAA,SACxB;AAAA,OACL;AAEA,MAAI,IAAA,KAAA,CAAM,SAAS,CAAG,EAAA;AACpB,QAAM,MAAA,YAAA,GAAe,IAAI,YAAa,EAAA;AACtC,QAAA,KAAA,MAAW,QAAQ,QAAW,GAAA,KAAA,GAAQ,CAAC,KAAM,CAAA,CAAC,CAAC,CAAG,EAAA;AAChD,UAAA,IAAI,IAAM,EAAA;AACR,YAAa,YAAA,CAAA,KAAA,CAAM,IAAI,IAAI,CAAA;AAAA;AAC7B;AAGF,QAAA,gBAAA,GAAmB,aAAa,KAAK,CAAA;AACrC,QAAA,IAAI,aAAa,OAAS,EAAA;AACxB,UAAa,YAAA,CAAA,OAAA,CAAQ,QAAQ,YAAa,CAAA,KAAA;AAAA;AAC5C;AACF,KACF;AAEA,IACE,uBAAA,GAAA,CAAC,KAAK,QAAL,EAAA,EAAc,WAAW,aAAe,EAAA,MAAA,EAAQ,eAC/C,QAAC,kBAAA,GAAA,CAAA,kBAAA,EAAA,EAAmB,OAAM,MACxB,EAAA,QAAA,kBAAA,GAAA,CAAC,wBAAqB,KAAO,EAAA,YAAA,EAAc,sBAAoB,IAC5D,EAAA,QAAA,EACH,GACF,CACF,EAAA,CAAA;AAAA;AAGN;;;;"}
|
|
@@ -4,14 +4,15 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import formFieldStyles from '../FormField/FormField.module.scss.mjs';
|
|
5
5
|
import { useFormValidation } from '@react-aria/form';
|
|
6
6
|
import { useFormValidationState } from '@react-stately/form';
|
|
7
|
-
import { useMemo } from 'react';
|
|
8
7
|
import { InputContext, FieldErrorContext } from 'react-aria-components';
|
|
9
8
|
import { FileInput } from './components/FileInput.mjs';
|
|
10
9
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
11
10
|
import '../../lib/propsContext/propsContext.mjs';
|
|
11
|
+
import 'react';
|
|
12
12
|
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
13
13
|
import { PropsContextProvider } from '../../lib/propsContext/PropsContextProvider.mjs';
|
|
14
14
|
import { useObjectRef } from '@react-aria/utils';
|
|
15
|
+
import { addAwaitedArrayBuffer } from '../../../../core/src/file.mjs';
|
|
15
16
|
|
|
16
17
|
const FileField = flowComponent("FileField", (props) => {
|
|
17
18
|
const {
|
|
@@ -31,15 +32,12 @@ const FileField = flowComponent("FileField", (props) => {
|
|
|
31
32
|
isInvalid
|
|
32
33
|
});
|
|
33
34
|
useFormValidation({ validationBehavior }, formValidationState, inputRef);
|
|
34
|
-
const inputProps =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}),
|
|
41
|
-
[formValidationState, isRequired, ...Object.values(restInputProps)]
|
|
42
|
-
);
|
|
35
|
+
const inputProps = {
|
|
36
|
+
...restInputProps,
|
|
37
|
+
ref: inputRef,
|
|
38
|
+
"aria-invalid": formValidationState.displayValidation.isInvalid,
|
|
39
|
+
value: void 0
|
|
40
|
+
};
|
|
43
41
|
const propsContext = {
|
|
44
42
|
Label: {
|
|
45
43
|
className: formFieldStyles.label,
|
|
@@ -52,13 +50,28 @@ const FileField = flowComponent("FileField", (props) => {
|
|
|
52
50
|
className: formFieldStyles.customFieldError
|
|
53
51
|
}
|
|
54
52
|
};
|
|
53
|
+
const handleOnChange = (fileList) => {
|
|
54
|
+
if (fileList && onChange) {
|
|
55
|
+
Promise.all(Array.from(fileList).map(addAwaitedArrayBuffer)).then(
|
|
56
|
+
() => onChange(fileList)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
55
60
|
return /* @__PURE__ */ jsx(InputContext.Provider, { value: inputProps, children: /* @__PURE__ */ jsx(FieldErrorContext.Provider, { value: formValidationState.displayValidation, children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx(
|
|
56
61
|
"div",
|
|
57
62
|
{
|
|
58
63
|
"data-required": !!isRequired || void 0,
|
|
59
64
|
"data-invalid": formValidationState.displayValidation.isInvalid || void 0,
|
|
60
65
|
className: formFieldStyles.formField,
|
|
61
|
-
children: /* @__PURE__ */ jsx(
|
|
66
|
+
children: /* @__PURE__ */ jsx(
|
|
67
|
+
FileInput,
|
|
68
|
+
{
|
|
69
|
+
ref,
|
|
70
|
+
onChange: handleOnChange,
|
|
71
|
+
isDisabled,
|
|
72
|
+
children
|
|
73
|
+
}
|
|
74
|
+
)
|
|
62
75
|
}
|
|
63
76
|
) }) }) });
|
|
64
77
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileField.mjs","sources":["../../../../../../src/components/FileField/FileField.tsx"],"sourcesContent":["import formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFormValidation } from \"@react-aria/form\";\nimport { useFormValidationState } from \"@react-stately/form\";\nimport type { PropsWithChildren } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"FileField.mjs","sources":["../../../../../../src/components/FileField/FileField.tsx"],"sourcesContent":["import formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFormValidation } from \"@react-aria/form\";\nimport { useFormValidationState } from \"@react-stately/form\";\nimport type { PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport { FieldErrorContext, InputContext } from \"react-aria-components\";\nimport type { FileInputOnChangeHandler } from \"@/components/FileField/components/FileInput\";\nimport { FileInput } from \"@/components/FileField/components/FileInput\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { addAwaitedArrayBuffer } from \"@mittwald/flow-core\";\nexport interface FileFieldProps\n extends PropsWithChildren,\n FlowComponentProps<HTMLInputElement>,\n Pick<Aria.InputProps, \"accept\" | \"multiple\" | \"name\">,\n Pick<\n Aria.TextFieldProps,\n \"isRequired\" | \"isInvalid\" | \"validationBehavior\" | \"isDisabled\"\n > {\n /** Handler that is called when the file input changes. */\n onChange?: FileInputOnChangeHandler;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const FileField = flowComponent(\"FileField\", (props) => {\n const {\n children,\n ref,\n isRequired,\n isInvalid,\n isDisabled,\n validationBehavior,\n onChange,\n ...restInputProps\n } = props;\n const inputRef = useObjectRef(ref);\n\n const formValidationState = useFormValidationState({\n value: undefined,\n validationBehavior,\n isInvalid,\n });\n\n useFormValidation({ validationBehavior }, formValidationState, inputRef);\n\n const inputProps = {\n ...restInputProps,\n ref: inputRef,\n \"aria-invalid\": formValidationState.displayValidation.isInvalid,\n value: undefined,\n };\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n },\n };\n\n const handleOnChange: FileInputOnChangeHandler = (fileList) => {\n if (fileList && onChange) {\n Promise.all(Array.from(fileList).map(addAwaitedArrayBuffer)).then(() =>\n onChange(fileList),\n );\n }\n };\n\n return (\n <InputContext.Provider value={inputProps}>\n <FieldErrorContext.Provider value={formValidationState.displayValidation}>\n <PropsContextProvider props={propsContext}>\n <div\n data-required={!!isRequired || undefined}\n data-invalid={\n formValidationState.displayValidation.isInvalid || undefined\n }\n className={formFieldStyles.formField}\n >\n <FileInput\n ref={ref}\n onChange={handleOnChange}\n isDisabled={isDisabled}\n >\n {children}\n </FileInput>\n </div>\n </PropsContextProvider>\n </FieldErrorContext.Provider>\n </InputContext.Provider>\n );\n});\nexport default FileField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA8BO,MAAM,SA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AAb,EAAsB,KAAA,EAAO,YAC5B,QAAC,kBAAA,GAAA,CAAA,iBAAA,CAAkB,QAAlB,EAAA,EAA2B,OAAO,mBAAoB,CAAA,iBAAA,EACrD,QAAC,kBAAA,GAAA,CAAA,oBAAA,EAAA,EAAqB,OAAO,YAC3B,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,eAAA,EAAe,CAAC,CAAC,UAAc,IAAA,MAAA;AAAA,MAC/B,cAAA,EACE,mBAAoB,CAAA,iBAAA,CAAkB,SAAa,IAAA,MAAA;AAAA,MAErD,WAAW,eAAgB,CAAA,SAAA;AAAA,MAE3B,QAAA,kBAAA,GAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,GAAA;AAAA,UACA,QAAU,EAAA,cAAA;AAAA,UACV,UAAA;AAAA,UAEC;AAAA;AAAA;AACH;AAAA,GACF,EACF,GACF,CACF,EAAA,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps, ModalTriggerProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"@/components/Select/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n ModalTrigger: ModalTriggerProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps<Aria.TimeValue>;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n Align: true,\n Badge: true,\n Button: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n Header: true,\n Heading: true,\n Icon: true,\n Image: true,\n Initials: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n ModalTrigger: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AAuJA,MAAM,mCAGF,GAAA;AAAA,EACF,SAAW,EAAA,IAAA;AAAA,EACX,MAAQ,EAAA,IAAA;AAAA,EACR,WAAa,EAAA,IAAA;AAAA,EACb,MAAQ,EAAA,IAAA;AAAA,EACR,KAAO,EAAA,IAAA;AAAA,EACP,UAAY,EAAA,IAAA;AAAA,EACZ,SAAW,EAAA,IAAA;AAAA,EACX,KAAO,EAAA,IAAA;AAAA,EACP,KAAO,EAAA,IAAA;AAAA,EACP,MAAQ,EAAA,IAAA;AAAA,EACR,QAAU,EAAA,IAAA;AAAA,EACV,cAAgB,EAAA,IAAA;AAAA,EAChB,aAAe,EAAA,IAAA;AAAA,EACf,YAAc,EAAA,IAAA;AAAA,EACd,QAAU,EAAA,IAAA;AAAA,EACV,OAAS,EAAA,IAAA;AAAA,EACT,WAAa,EAAA,IAAA;AAAA,EACb,kBAAoB,EAAA,IAAA;AAAA,EACpB,kBAAoB,EAAA,IAAA;AAAA,EACpB,cAAgB,EAAA,IAAA;AAAA,EAChB,qBAAuB,EAAA,IAAA;AAAA,EACvB,UAAY,EAAA,IAAA;AAAA,EACZ,YAAc,EAAA,IAAA;AAAA,EACd,cAAgB,EAAA,IAAA;AAAA,EAChB,UAAY,EAAA,IAAA;AAAA,EACZ,eAAiB,EAAA,IAAA;AAAA,EACjB,gBAAk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AU,EAAA,IAAA;AAAA,EACV,SAAW,EAAA,IAAA;AAAA,EACX,SAAW,EAAA;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAO,CAAA,IAAA;AAAA,EACrD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps, ModalTriggerProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"@/components/Select/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n ModalTrigger: ModalTriggerProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps<Aria.TimeValue>;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n Align: true,\n Badge: true,\n Button: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n Image: true,\n Initials: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n ModalTrigger: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AAyJA,MA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AA;AAAA,EACN,IAAM,EAAA,IAAA;AAAA,EACN,WAAa,EAAA,IAAA;AAAA,EACb,QAAU,EAAA,IAAA;AAAA,EACV,WAAa,EAAA,IAAA;AAAA,EACb,OAAS,EAAA,IAAA;AAAA,EACT,aAAe,EAAA,IAAA;AAAA,EACf,KAAO,EAAA,IAAA;AAAA,EACP,YAAc,EAAA,IAAA;AAAA,EACd,WAAa,EAAA,IAAA;AAAA,EACb,KAAO,EAAA,IAAA;AAAA,EACP,MAAQ,EAAA,IAAA;AAAA,EACR,OAAS,EAAA,IAAA;AAAA,EACT,cAAgB,EAAA,IAAA;AAAA,EAChB,qBAAuB,EAAA,IAAA;AAAA,EACvB,WAAa,EAAA,IAAA;AAAA,EACb,WAAa,EAAA,IAAA;AAAA,EACb,UAAY,EAAA,IAAA;AAAA,EACZ,WAAa,EAAA,IAAA;AAAA,EACb,OAAS,EAAA,IAAA;AAAA,EACT,OAAS,EAAA,IAAA;AAAA,EACT,gBAAkB,EAAA,IAAA;AAAA,EAClB,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,IAAA;AAAA,EACR,MAAQ,EAAA,IAAA;AAAA,EACR,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA,IAAA;AAAA,EACV,aAAe,EAAA,IAAA;AAAA,EACf,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA,IAAA;AAAA,EACV,SAAW,EAAA,IAAA;AAAA,EACX,SAAW,EAAA;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAO,CAAA,IAAA;AAAA,EACrD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithChildren } from \"react\";\nimport {\n useController,\n type ControllerProps,\n type FieldValues,\n type UseFormReturn,\n} from \"react-hook-form\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const controller = useController(props);\n const formContext = useFormContext<T>();\n const value = controller.field.value;\n\n const fieldProps = {\n ...controller.field,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: controller.fieldState.invalid,\n children: dynamic((p) => {\n if (controller.fieldState.invalid) {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }\n\n return p.children;\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: fieldProps,\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[controller.fieldState, controller.field, value]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;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A,IACf,cAAgB,EAAA;AAAA,MACd,GAAG,UAAA;AAAA,MACH,UAAY,EAAA;AAAA,KACd;AAAA,IACA,SAAW,EAAA,UAAA;AAAA,IACX,WAAa,EAAA,UAAA;AAAA,IACb,UAAY,EAAA,UAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,MACN,GAAG,UAAA;AAAA,MACH,UAAY,EAAA;AAAA,KACd;AAAA,IACA,MAAQ,EAAA,UAAA;AAAA,IACR,qBAAuB,EAAA,UAAA;AAAA,IACvB,UAAY,EAAA,UAAA;AAAA,IACZ,eAAiB,EAAA,UAAA;AAAA,IACjB,SAAW,EAAA,UAAA;AAAA,IACX,gBAAkB,EAAA,UAAA;AAAA,IAClB,MAAQ,EAAA;AAAA,MACN,GAAG,UAAA;AAAA,MACH,WAAa,EAAA;AAAA,KACf;AAAA,IACA,QAAU,EAAA;AAAA,MACR,GAAG,sBAAA;AAAA,MACH,WAAa,EAAA;AAAA;AACf,GACF;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,YAAA;AAAA,MACP,cAAc,CAAC,UAAA,CAAW,UAAY,EAAA,UAAA,CAAW,OAAO,KAAK,CAAA;AAAA,MAE5D;AAAA;AAAA,GACH;AAEJ;AAEa,MAAA,UAAA,GAAa,CACxB,WACoB,KAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithChildren } from \"react\";\nimport {\n useController,\n type ControllerProps,\n type FieldValues,\n type UseFormReturn,\n} from \"react-hook-form\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const controller = useController(props);\n const formContext = useFormContext<T>();\n const value = controller.field.value;\n\n const fieldProps = {\n ...controller.field,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: controller.fieldState.invalid,\n children: dynamic((p) => {\n if (controller.fieldState.invalid) {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }\n\n return p.children;\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: fieldProps,\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[controller.fieldState, controller.field, value]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;AAgBO,SAAS,MAA6B,KAAsB,EAAA;AACjE,EAAA,MAAM,EAAE,QAAU,EAAA,IAAA,EAAM,YAAc,EAAA,GAAG,MAAS,GAAA,KAAA;AAElD,EAAM,MAAA,U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IACd,WAAa,EAAA,UAAA;AAAA,IACb,UAAY,EAAA,UAAA;AAAA,IACZ,MAAQ,EAAA;AAAA,MACN,GAAG,UAAA;AAAA,MACH,UAAY,EAAA;AAAA,KACd;AAAA,IACA,MAAQ,EAAA,UAAA;AAAA,IACR,qBAAuB,EAAA,UAAA;AAAA,IACvB,UAAY,EAAA,UAAA;AAAA,IACZ,eAAiB,EAAA,UAAA;AAAA,IACjB,SAAW,EAAA,UAAA;AAAA,IACX,gBAAkB,EAAA,UAAA;AAAA,IAClB,MAAQ,EAAA;AAAA,MACN,GAAG,UAAA;AAAA,MACH,WAAa,EAAA;AAAA,KACf;AAAA,IACA,QAAU,EAAA;AAAA,MACR,GAAG,sBAAA;AAAA,MACH,WAAa,EAAA;AAAA;AACf,GACF;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,YAAA;AAAA,MACP,cAAc,CAAC,UAAA,CAAW,UAAY,EAAA,UAAA,CAAW,OAAO,KAAK,CAAA;AAAA,MAE5D;AAAA;AAAA,GACH;AAEJ;AAEa,MAAA,UAAA,GAAa,CACxB,WACoB,KAAA;;;;"}
|
|
@@ -21,18 +21,19 @@ function Form(props) {
|
|
|
21
21
|
const submitHandlerResultRef = useRef(null);
|
|
22
22
|
const handleOnSubmit = (e) => {
|
|
23
23
|
const { isSubmitting, isValidating } = form.control._formState;
|
|
24
|
-
e
|
|
24
|
+
const formEvent = "nativeEvent" in e ? e : void 0;
|
|
25
|
+
formEvent?.stopPropagation();
|
|
25
26
|
if (isSubmitting || isValidating) {
|
|
26
|
-
|
|
27
|
+
formEvent?.preventDefault();
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
submitHandlerResultRef.current = void 0;
|
|
30
31
|
form.handleSubmit((values) => {
|
|
31
|
-
const result = onSubmit(values,
|
|
32
|
+
const result = onSubmit(values, formEvent);
|
|
32
33
|
isAsyncSubmit.current = result instanceof Promise;
|
|
33
34
|
submitHandlerResultRef.current = result;
|
|
34
35
|
return result;
|
|
35
|
-
})(
|
|
36
|
+
})(formEvent);
|
|
36
37
|
};
|
|
37
38
|
return /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsxs(FormContextProvider, { value: { form, id: formId }, children: [
|
|
38
39
|
/* @__PURE__ */ jsx(SubmitButtonStateProvider, { isAsyncSubmit, children: /* @__PURE__ */ jsx(FormView, { ...formProps, id: formId, onSubmit: handleOnSubmit, children }) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { SubmitButtonStateProvider } from \"@/integrations/react-hook-form/components/ActionGroupWrapper/SubmitButtonStateProvider\";\nimport { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type {\n ComponentProps,\n ComponentType,\n FormEventHandler,\n PropsWithChildren,\n} from \"react\";\nimport { useId, useRef } from \"react\";\nimport type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { AfterFormSubmitEffect } from \"../AfterFormSubmitEffect/AfterFormSubmitEffect\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = Parameters<\n UseFormReturn<F>[\"handleSubmit\"]\n>[0];\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { SubmitButtonStateProvider } from \"@/integrations/react-hook-form/components/ActionGroupWrapper/SubmitButtonStateProvider\";\nimport { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type {\n ComponentProps,\n ComponentType,\n FormEvent,\n FormEventHandler,\n PropsWithChildren,\n} from \"react\";\nimport { useId, useRef } from \"react\";\nimport type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { AfterFormSubmitEffect } from \"../AfterFormSubmitEffect/AfterFormSubmitEffect\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = Parameters<\n UseFormReturn<F>[\"handleSubmit\"]\n>[0];\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FormComponentType;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit,\n formComponent: FormView = DefaultFormComponent,\n ...formProps\n } = props;\n\n const formId = useId();\n const isAsyncSubmit = useRef(false);\n const submitHandlerResultRef = useRef<unknown>(null);\n\n const handleOnSubmit = (e: FormEvent<HTMLFormElement> | F) => {\n const { isSubmitting, isValidating } = form.control._formState;\n const formEvent =\n \"nativeEvent\" in e ? (e as FormEvent<HTMLFormElement>) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n formEvent?.preventDefault();\n return;\n }\n\n submitHandlerResultRef.current = undefined;\n\n form.handleSubmit((values) => {\n const result = onSubmit(values, formEvent);\n isAsyncSubmit.current = result instanceof Promise;\n submitHandlerResultRef.current = result;\n return result;\n })(formEvent);\n };\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider value={{ form, id: formId }}>\n <SubmitButtonStateProvider isAsyncSubmit={isAsyncSubmit}>\n <FormView {...formProps} id={formId} onSubmit={handleOnSubmit}>\n {children}\n </FormView>\n </SubmitButtonStateProvider>\n <AfterFormSubmitEffect\n submitHandlerResultRef={submitHandlerResultRef}\n />\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],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AAA,EAAM,EAAI,EAAA,MAAA,EACtC,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,yBAAA,EAAA,EAA0B,aACzB,EAAA,QAAA,kBAAA,GAAA,CAAC,QAAU,EAAA,EAAA,GAAG,SAAW,EAAA,EAAA,EAAI,MAAQ,EAAA,QAAA,EAAU,cAC5C,EAAA,QAAA,EACH,CACF,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,qBAAA;AAAA,MAAA;AAAA,QACC;AAAA;AAAA;AACF,GAAA,EACF,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import 'invariant';
|
|
4
|
+
|
|
5
|
+
const Key = "mittwald.flow-core.file.awaitedArrayBuffer";
|
|
6
|
+
const addAwaitedArrayBuffer = async (file) => {
|
|
7
|
+
const arrayBuffer = await file.arrayBuffer();
|
|
8
|
+
Object.assign(file, { [Key]: arrayBuffer });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { addAwaitedArrayBuffer };
|
|
12
|
+
//# sourceMappingURL=file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.mjs","sources":["../../../../../core/src/file.ts"],"sourcesContent":["import invariant from \"invariant\";\n\nconst Key = \"mittwald.flow-core.file.awaitedArrayBuffer\";\n\nexport type FileWithAwaitedArrayBuffer = File & {\n [Key]: ArrayBuffer;\n};\n\nfunction isFileWithAwaitedArrayBuffer(\n file: File | FileWithAwaitedArrayBuffer,\n): file is FileWithAwaitedArrayBuffer {\n return Key in file;\n}\n\nexport const addAwaitedArrayBuffer = async (file: File) => {\n const arrayBuffer = await file.arrayBuffer();\n Object.assign(file, { [Key]: arrayBuffer });\n};\n\nexport const getAwaitArrayBuffer = (\n file: File | FileWithAwaitedArrayBuffer,\n) => {\n invariant(\n isFileWithAwaitedArrayBuffer(file),\n \"Could not get awaited ArrayBuffer from file\",\n );\n return file[Key];\n};\n"],"names":[],"mappings":";;AAEA,MAAM,GAAM,GAAA,4CAAA;AAYC,MAAA,qBAAA,GAAwB,OAAO,IAAe,KAAA;AACzD,EAAM,MAAA,WAAA,GAAc,MAAM,IAAA,CAAK,WAAY,EAAA;AAC3C,EAAA,MAAA,CAAO,OAAO,IAAM,EAAA,EAAE,CAAC,GAAG,GAAG,aAAa,CAAA;AAC5C;;;;"}
|
|
@@ -160,6 +160,7 @@ import './components/src/components/FieldDescription/FieldDescription.mjs';
|
|
|
160
160
|
import './components/src/components/FieldError/FieldError.mjs';
|
|
161
161
|
import './components/src/components/FileCard/FileCard.mjs';
|
|
162
162
|
import './components/src/components/FileCardList/FileCardList.mjs';
|
|
163
|
+
import './components/src/components/FileDropZone/FileDropZone.mjs';
|
|
163
164
|
import './components/src/components/FileField/FileField.mjs';
|
|
164
165
|
import './components/src/components/Header/Header.mjs';
|
|
165
166
|
import './components/src/components/Icon/Icon.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
3
|
import { FileInputOnChangeHandler } from '../FileField/components/FileInput';
|
|
4
|
+
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
5
|
+
import { FocusableElement } from '@react-types/shared';
|
|
4
6
|
import * as Aria from "react-aria-components";
|
|
5
|
-
export interface FileDropZoneProps extends PropsWithClassName, PropsWithChildren, Pick<Aria.InputProps, "accept" | "multiple"> {
|
|
7
|
+
export interface FileDropZoneProps extends PropsWithClassName, FlowComponentProps<FocusableElement>, PropsWithChildren, Pick<Aria.InputProps, "accept" | "multiple" | "name"> {
|
|
6
8
|
onChange?: FileInputOnChangeHandler;
|
|
7
9
|
}
|
|
10
|
+
/** @flr-generate all */
|
|
8
11
|
export declare const FileDropZone: FC<FileDropZoneProps>;
|
|
9
12
|
export default FileDropZone;
|
|
10
13
|
//# sourceMappingURL=FileDropZone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropZone.d.ts","sourceRoot":"","sources":["../../../../src/components/FileDropZone/FileDropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"FileDropZone.d.ts","sourceRoot":"","sources":["../../../../src/components/FileDropZone/FileDropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAG5F,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAa,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,MAAM,WAAW,iBACf,SAAQ,kBAAkB,EACxB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,iBAAiB,EACjB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACvD,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACrC;AAED,wBAAwB;AACxB,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAgE9C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FileDropZone/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FileDropZone/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,KAAK,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/components/FileDropZone/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,kBAAkB;QAC1B,YAAY,EAAE,aAAa,CAAC,OAAO,YAAY,CAAC,CAAC;KAClD;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FileInputOnChangeHandler } from './components/FileInput';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
import type * as Aria from "react-aria-components";
|
|
@@ -10,6 +10,6 @@ export interface FileFieldProps extends PropsWithChildren, FlowComponentProps<HT
|
|
|
10
10
|
* @flr-generate all
|
|
11
11
|
* @flr-clear-props-context
|
|
12
12
|
*/
|
|
13
|
-
export declare const FileField:
|
|
13
|
+
export declare const FileField: import('react').FunctionComponent<FileFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
14
14
|
export default FileField;
|
|
15
15
|
//# sourceMappingURL=FileField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileField.d.ts","sourceRoot":"","sources":["../../../../src/components/FileField/FileField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"FileField.d.ts","sourceRoot":"","sources":["../../../../src/components/FileField/FileField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM/E,MAAM,WAAW,cACf,SAAQ,iBAAiB,EACvB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC,EACrD,IAAI,CACF,IAAI,CAAC,cAAc,EACnB,YAAY,GAAG,WAAW,GAAG,oBAAoB,GAAG,YAAY,CACjE;IACH,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,qGAwEpB,CAAC;AACH,eAAe,SAAS,CAAC"}
|
|
@@ -61,6 +61,7 @@ import { AccentBoxProps } from '../AccentBox';
|
|
|
61
61
|
import { ColumnLayoutProps } from '../ColumnLayout';
|
|
62
62
|
import { MenuTriggerProps } from '../OverlayTrigger';
|
|
63
63
|
import { ProgressBarProps } from '../ProgressBar';
|
|
64
|
+
import { FileDropZoneProps } from '../FileDropZone';
|
|
64
65
|
import type * as Aria from "react-aria-components";
|
|
65
66
|
export * from './types';
|
|
66
67
|
export interface FlowComponentPropsTypes {
|
|
@@ -95,6 +96,7 @@ export interface FlowComponentPropsTypes {
|
|
|
95
96
|
FileCard: FileCardProps;
|
|
96
97
|
FileCardList: FileCardListProps;
|
|
97
98
|
FileField: FileFieldProps;
|
|
99
|
+
FileDropZone: FileDropZoneProps;
|
|
98
100
|
Header: HeaderProps;
|
|
99
101
|
Heading: HeadingProps;
|
|
100
102
|
Icon: IconProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/propTypes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,M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AgB,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC;IACtB,cAAc,EAAE,mBAAmB,CAAC;IACpC,qBAAqB,EAAE,0BAA0B,CAAC;IAClD,WAAW,EAAE,gBAAgB,CAAC;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE,eAAe,CAAC;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;CAC3C;AAgFD,eAAO,MAAM,gCAAgC,EAExC,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,CAC/C,SAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACxC,iBAAiB;CAAG;AAExB,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,CAC/C,SAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACxC,iBAAiB;CAAG;AAExB,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,2CA+EhE;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,EAC9C,aAAa,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAC1D,OAAO,KAAK,CAAC,CAAC,CAAU,CAAC;AAE5B,eAAe,KAAK,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
|
3
3
|
export type FormOnSubmitHandler<F extends FieldValues> = Parameters<UseFormReturn<F>["handleSubmit"]>[0];
|
|
4
4
|
type FormComponentType = ComponentType<PropsWithChildren<{
|
|
5
5
|
id: string;
|
|
6
|
-
onSubmit?: FormEventHandler
|
|
6
|
+
onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;
|
|
7
7
|
}>>;
|
|
8
8
|
export interface FormProps<F extends FieldValues> extends Omit<ComponentProps<"form">, "onSubmit">, PropsWithChildren {
|
|
9
9
|
form: UseFormReturn<F>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EAEb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIlE,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI,UAAU,CACjE,aAAa,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CACjC,CAAC,CAAC,CAAC,CAAC;AAEL,KAAK,iBAAiB,GAAG,aAAa,CACpC,iBAAiB,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;CAC1D,CAAC,CACH,CAAC;AAEF,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAC9C,SAAQ,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC9C,iBAAiB;IACnB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC;AAID,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,2CAiD9D;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -31,6 +31,7 @@ export declare const propsContext: import('react').Context<Partial<{
|
|
|
31
31
|
FileCard: import('./types').ComponentPropsContext<"FileCard">;
|
|
32
32
|
FileCardList: import('./types').ComponentPropsContext<"FileCardList">;
|
|
33
33
|
FileField: import('./types').ComponentPropsContext<"FileField">;
|
|
34
|
+
FileDropZone: import('./types').ComponentPropsContext<"FileDropZone">;
|
|
34
35
|
Header: import('./types').ComponentPropsContext<"Header">;
|
|
35
36
|
Heading: import('./types').ComponentPropsContext<"Heading">;
|
|
36
37
|
Icon: import('./types').ComponentPropsContext<"Icon">;
|
|
@@ -104,6 +105,7 @@ export declare const PropsContextProvider: import('react').Provider<Partial<{
|
|
|
104
105
|
FileCard: import('./types').ComponentPropsContext<"FileCard">;
|
|
105
106
|
FileCardList: import('./types').ComponentPropsContext<"FileCardList">;
|
|
106
107
|
FileField: import('./types').ComponentPropsContext<"FileField">;
|
|
108
|
+
FileDropZone: import('./types').ComponentPropsContext<"FileDropZone">;
|
|
107
109
|
Header: import('./types').ComponentPropsContext<"Header">;
|
|
108
110
|
Heading: import('./types').ComponentPropsContext<"Heading">;
|
|
109
111
|
Icon: import('./types').ComponentPropsContext<"Icon">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/propsContext/propsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"propsContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/propsContext/propsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAkC,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwB,CAAC;AAE1D,eAAO,MAAM,eAAe,QAAO,YAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileDropZoneView.d.ts","sourceRoot":"","sources":["../../../src/views/FileDropZoneView.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AACnD,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAGnC,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAG3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|