@mage-ui/components 1.0.160 → 1.0.162
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/components/controls/file-input/FileInputMultipleS3.d.mts +19 -0
- package/dist/components/controls/file-input/FileInputMultipleS3.d.mts.map +1 -0
- package/dist/components/controls/file-input/FileInputMultipleS3.mjs +2 -0
- package/dist/components/controls/file-input/FileInputMultipleS3.mjs.map +1 -0
- package/dist/components/controls/file-input/FileInputS3.d.mts +22 -0
- package/dist/components/controls/file-input/FileInputS3.d.mts.map +1 -0
- package/dist/components/controls/file-input/FileInputS3.mjs +2 -0
- package/dist/components/controls/file-input/FileInputS3.mjs.map +1 -0
- package/dist/components/controls/index.d.mts +2 -0
- package/dist/components/data-display/index.d.mts +1 -0
- package/dist/components/data-display/progress/Progress.d.mts +22 -0
- package/dist/components/data-display/progress/Progress.d.mts.map +1 -0
- package/dist/components/data-display/progress/Progress.mjs +2 -0
- package/dist/components/data-display/progress/Progress.mjs.map +1 -0
- package/dist/components/forms/Form.d.mts +30 -0
- package/dist/components/forms/Form.d.mts.map +1 -1
- package/dist/components/forms/Form.mjs +1 -1
- package/dist/components/forms/Form.mjs.map +1 -1
- package/dist/components/forms/controls/FormFileInputMultipleS3.d.mts +25 -0
- package/dist/components/forms/controls/FormFileInputMultipleS3.d.mts.map +1 -0
- package/dist/components/forms/controls/FormFileInputMultipleS3.mjs +2 -0
- package/dist/components/forms/controls/FormFileInputMultipleS3.mjs.map +1 -0
- package/dist/components/forms/controls/FormFileInputS3.d.mts +24 -0
- package/dist/components/forms/controls/FormFileInputS3.d.mts.map +1 -0
- package/dist/components/forms/controls/FormFileInputS3.mjs +2 -0
- package/dist/components/forms/controls/FormFileInputS3.mjs.map +1 -0
- package/dist/components/forms/controls/index.mjs +1 -1
- package/dist/components/forms/controls/index.mjs.map +1 -1
- package/dist/components/forms/controls/register-components.mjs +1 -1
- package/dist/components/forms/controls/register-components.mjs.map +1 -1
- package/dist/components/index.d.mts +3 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { S3InitBody, S3UploadConfig } from "../dropzone/use-s3-upload.mjs";
|
|
2
|
+
import { FileInputMultipleProps } from "./FileInputMultiple.mjs";
|
|
3
|
+
import { UploadedS3File } from "./FileInputS3.mjs";
|
|
4
|
+
import { ReactElement } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/controls/file-input/FileInputMultipleS3.d.ts
|
|
7
|
+
type FileInputMultipleS3Handle = {
|
|
8
|
+
upload: () => Promise<UploadedS3File[] | null>;
|
|
9
|
+
};
|
|
10
|
+
type FileInputMultipleS3Props<TBody extends S3InitBody = S3InitBody> = Omit<FileInputMultipleProps, 'onChange'> & S3UploadConfig<TBody> & {
|
|
11
|
+
autoUpload?: boolean;
|
|
12
|
+
onChange?: (results: UploadedS3File[] | null) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const FileInputMultipleS3: <TBody extends S3InitBody = S3InitBody>(props: FileInputMultipleS3Props<TBody> & {
|
|
15
|
+
ref?: React.Ref<FileInputMultipleS3Handle>;
|
|
16
|
+
}) => ReactElement;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FileInputMultipleS3, FileInputMultipleS3Handle, FileInputMultipleS3Props };
|
|
19
|
+
//# sourceMappingURL=FileInputMultipleS3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInputMultipleS3.d.mts","names":[],"sources":["../../../../src/components/controls/file-input/FileInputMultipleS3.tsx"],"mappings":";;;;;;KAuBY,yBAAA;EACV,MAAA,QAAc,OAAA,CAAQ,cAAA;AAAA;AAAA,KAGZ,wBAAA,eAAuC,UAAA,GAAa,UAAA,IAC9D,IAAA,CAAK,sBAAA,gBACH,cAAA,CAAe,KAAA;EACb,UAAA;EACA,QAAA,IAAY,OAAA,EAAS,cAAA;AAAA;AAAA,cAgFd,mBAAA,iBACG,UAAA,GAAa,UAAA,EAE3B,KAAA,EAAO,wBAAA,CAAyB,KAAA;EAC9B,GAAA,GAAM,KAAA,CAAM,GAAA,CAAI,yBAAA;AAAA,MAEf,YAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{defaultGetErrorMessage as e,useS3Upload as t}from"../dropzone/use-s3-upload.mjs";import{FileInputMultiple as n}from"./FileInputMultiple.mjs";import{jsx as r}from"react/jsx-runtime";import{forwardRef as i,useImperativeHandle as a,useRef as o,useState as s}from"react";function c({onChange:i,autoUpload:c=!0,initUrl:l,buildInitBody:u,register:d,getHeaders:f,getErrorMessage:p=e,resolveUploadedUrl:m,acceptedTypes:h,texts:g,error:_,disabled:v,...y},b){let[x,S]=s(null),[C,w]=s(!1),T=o(null),{upload:E}=t({initUrl:l,buildInitBody:u,register:d,getHeaders:f,getErrorMessage:p,resolveUploadedUrl:m,acceptedTypes:h,texts:g}),D=async e=>{w(!0);try{let t=[];for(let n of e)t.push(await E(n));return i?.(t),t}catch(e){return S(e instanceof Error?e.message:`Upload failed`),null}finally{w(!1)}};a(b,()=>({upload:()=>T.current?D(T.current):Promise.resolve(null)}));let O=async e=>{if(S(null),T.current=e,!e){i?.(null);return}c&&await D(e)};return r(n,{...y,disabled:v??C,error:_??x??void 0,onChange:O})}const l=i(c);export{l as FileInputMultipleS3};
|
|
2
|
+
//# sourceMappingURL=FileInputMultipleS3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInputMultipleS3.mjs","names":[],"sources":["../../../../src/components/controls/file-input/FileInputMultipleS3.tsx"],"sourcesContent":["import {\n forwardRef,\n type ReactElement,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\n\nimport {\n defaultGetErrorMessage,\n type S3InitBody,\n type S3UploadConfig,\n useS3Upload,\n} from '@/components/controls/dropzone/use-s3-upload';\n\nimport {\n FileInputMultiple,\n type FileInputMultipleProps,\n} from './FileInputMultiple';\nimport type { UploadedS3File } from './FileInputS3';\n\nexport type { UploadedS3File };\n\nexport type FileInputMultipleS3Handle = {\n upload: () => Promise<UploadedS3File[] | null>;\n};\n\nexport type FileInputMultipleS3Props<TBody extends S3InitBody = S3InitBody> =\n Omit<FileInputMultipleProps, 'onChange'> &\n S3UploadConfig<TBody> & {\n autoUpload?: boolean;\n onChange?: (results: UploadedS3File[] | null) => void;\n };\n\nfunction FileInputMultipleS3Inner<TBody extends S3InitBody = S3InitBody>(\n {\n onChange,\n autoUpload = true,\n initUrl,\n buildInitBody,\n register,\n getHeaders,\n getErrorMessage = defaultGetErrorMessage,\n resolveUploadedUrl,\n acceptedTypes,\n texts,\n error,\n disabled,\n ...fileInputMultipleProps\n }: FileInputMultipleS3Props<TBody>,\n ref: React.ForwardedRef<FileInputMultipleS3Handle>,\n) {\n const [uploadError, setUploadError] = useState<string | null>(null);\n const [isUploading, setIsUploading] = useState(false);\n const pendingFilesRef = useRef<File[] | null>(null);\n\n const { upload } = useS3Upload<TBody>({\n initUrl,\n buildInitBody,\n register,\n getHeaders,\n getErrorMessage,\n resolveUploadedUrl,\n acceptedTypes,\n texts,\n });\n\n const doUpload = async (files: File[]): Promise<UploadedS3File[] | null> => {\n setIsUploading(true);\n try {\n const results: UploadedS3File[] = [];\n for (const file of files) {\n results.push(await upload(file));\n }\n onChange?.(results);\n return results;\n } catch (e) {\n setUploadError(e instanceof Error ? e.message : 'Upload failed');\n return null;\n } finally {\n setIsUploading(false);\n }\n };\n\n useImperativeHandle(ref, () => ({\n upload: () => {\n if (!pendingFilesRef.current) return Promise.resolve(null);\n return doUpload(pendingFilesRef.current);\n },\n }));\n\n const handleChange = async (files: File[] | null) => {\n setUploadError(null);\n pendingFilesRef.current = files;\n if (!files) {\n onChange?.(null);\n return;\n }\n if (autoUpload) await doUpload(files);\n };\n\n return (\n <FileInputMultiple\n {...fileInputMultipleProps}\n disabled={disabled ?? isUploading}\n error={error ?? uploadError ?? undefined}\n onChange={handleChange}\n />\n );\n}\n\nexport const FileInputMultipleS3 = forwardRef(FileInputMultipleS3Inner) as <\n TBody extends S3InitBody = S3InitBody,\n>(\n props: FileInputMultipleS3Props<TBody> & {\n ref?: React.Ref<FileInputMultipleS3Handle>;\n },\n) => ReactElement;\n"],"mappings":"kRAkCA,SAAS,EACP,CACE,WACA,aAAa,GACb,UACA,gBACA,WACA,aACA,kBAAkB,EAClB,qBACA,gBACA,QACA,QACA,WACA,GAAG,GAEL,EACA,CACA,GAAM,CAAC,EAAa,GAAkB,EAAwB,KAAK,CAC7D,CAAC,EAAa,GAAkB,EAAS,GAAM,CAC/C,EAAkB,EAAsB,KAAK,CAE7C,CAAE,UAAW,EAAmB,CACpC,UACA,gBACA,WACA,aACA,kBACA,qBACA,gBACA,QACD,CAAC,CAEI,EAAW,KAAO,IAAoD,CAC1E,EAAe,GAAK,CACpB,GAAI,CACF,IAAM,EAA4B,EAAE,CACpC,IAAK,IAAM,KAAQ,EACjB,EAAQ,KAAK,MAAM,EAAO,EAAK,CAAC,CAGlC,OADA,IAAW,EAAQ,CACZ,QACA,EAAG,CAEV,OADA,EAAe,aAAa,MAAQ,EAAE,QAAU,gBAAgB,CACzD,YACC,CACR,EAAe,GAAM,GAIzB,EAAoB,OAAY,CAC9B,WACO,EAAgB,QACd,EAAS,EAAgB,QAAQ,CADH,QAAQ,QAAQ,KAAK,CAG7D,EAAE,CAEH,IAAM,EAAe,KAAO,IAAyB,CAGnD,GAFA,EAAe,KAAK,CACpB,EAAgB,QAAU,EACtB,CAAC,EAAO,CACV,IAAW,KAAK,CAChB,OAEE,GAAY,MAAM,EAAS,EAAM,EAGvC,OACE,EAAC,EAAD,CACE,GAAI,EACJ,SAAU,GAAY,EACtB,MAAO,GAAS,GAAe,IAAA,GAC/B,SAAU,EACV,CAAA,CAIN,MAAa,EAAsB,EAAW,EAAyB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { S3InitBody, S3UploadConfig } from "../dropzone/use-s3-upload.mjs";
|
|
2
|
+
import { FileInputProps } from "./FileInput.mjs";
|
|
3
|
+
import { ReactElement } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/controls/file-input/FileInputS3.d.ts
|
|
6
|
+
type UploadedS3File = {
|
|
7
|
+
url: string;
|
|
8
|
+
token?: string;
|
|
9
|
+
};
|
|
10
|
+
type FileInputS3Handle = {
|
|
11
|
+
upload: () => Promise<UploadedS3File | null>;
|
|
12
|
+
};
|
|
13
|
+
type FileInputS3Props<TBody extends S3InitBody = S3InitBody> = Omit<FileInputProps, 'onChange'> & S3UploadConfig<TBody> & {
|
|
14
|
+
autoUpload?: boolean;
|
|
15
|
+
onChange?: (result: UploadedS3File | null) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const FileInputS3: <TBody extends S3InitBody = S3InitBody>(props: FileInputS3Props<TBody> & {
|
|
18
|
+
ref?: React.Ref<FileInputS3Handle>;
|
|
19
|
+
}) => ReactElement;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { FileInputS3, FileInputS3Handle, FileInputS3Props, UploadedS3File };
|
|
22
|
+
//# sourceMappingURL=FileInputS3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInputS3.d.mts","names":[],"sources":["../../../../src/components/controls/file-input/FileInputS3.tsx"],"mappings":";;;;;KAiBY,cAAA;EACV,GAAA;EACA,KAAA;AAAA;AAAA,KAGU,iBAAA;EACV,MAAA,QAAc,OAAA,CAAQ,cAAA;AAAA;AAAA,KAGZ,gBAAA,eAA+B,UAAA,GAAa,UAAA,IAAc,IAAA,CACpE,cAAA,gBAGA,cAAA,CAAe,KAAA;EACb,UAAA;EACA,QAAA,IAAY,MAAA,EAAQ,cAAA;AAAA;AAAA,cA6EX,WAAA,iBACG,UAAA,GAAa,UAAA,EAE3B,KAAA,EAAO,gBAAA,CAAiB,KAAA;EAAW,GAAA,GAAM,KAAA,CAAM,GAAA,CAAI,iBAAA;AAAA,MAChD,YAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{defaultGetErrorMessage as e,useS3Upload as t}from"../dropzone/use-s3-upload.mjs";import{FileInput as n}from"./FileInput.mjs";import{jsx as r}from"react/jsx-runtime";import{forwardRef as i,useImperativeHandle as a,useRef as o,useState as s}from"react";function c({onChange:i,autoUpload:c=!0,initUrl:l,buildInitBody:u,register:d,getHeaders:f,getErrorMessage:p=e,resolveUploadedUrl:m,acceptedTypes:h,texts:g,error:_,disabled:v,...y},b){let[x,S]=s(null),[C,w]=s(!1),T=o(null),{upload:E}=t({initUrl:l,buildInitBody:u,register:d,getHeaders:f,getErrorMessage:p,resolveUploadedUrl:m,acceptedTypes:h,texts:g}),D=async e=>{w(!0);try{let t=await E(e);return i?.(t),t}catch(e){return S(e instanceof Error?e.message:`Upload failed`),null}finally{w(!1)}};a(b,()=>({upload:()=>T.current?D(T.current):Promise.resolve(null)}));let O=async e=>{if(S(null),T.current=e,!e){i?.(null);return}c&&await D(e)};return r(n,{...y,disabled:v??C,error:_??x??void 0,onChange:O})}const l=i(c);export{l as FileInputS3};
|
|
2
|
+
//# sourceMappingURL=FileInputS3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInputS3.mjs","names":[],"sources":["../../../../src/components/controls/file-input/FileInputS3.tsx"],"sourcesContent":["import {\n forwardRef,\n type ReactElement,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\n\nimport {\n defaultGetErrorMessage,\n type S3InitBody,\n type S3UploadConfig,\n useS3Upload,\n} from '@/components/controls/dropzone/use-s3-upload';\n\nimport { FileInput, type FileInputProps } from './FileInput';\n\nexport type UploadedS3File = {\n url: string;\n token?: string;\n};\n\nexport type FileInputS3Handle = {\n upload: () => Promise<UploadedS3File | null>;\n};\n\nexport type FileInputS3Props<TBody extends S3InitBody = S3InitBody> = Omit<\n FileInputProps,\n 'onChange'\n> &\n S3UploadConfig<TBody> & {\n autoUpload?: boolean;\n onChange?: (result: UploadedS3File | null) => void;\n };\n\nfunction FileInputS3Inner<TBody extends S3InitBody = S3InitBody>(\n {\n onChange,\n autoUpload = true,\n initUrl,\n buildInitBody,\n register,\n getHeaders,\n getErrorMessage = defaultGetErrorMessage,\n resolveUploadedUrl,\n acceptedTypes,\n texts,\n error,\n disabled,\n ...fileInputProps\n }: FileInputS3Props<TBody>,\n ref: React.ForwardedRef<FileInputS3Handle>,\n) {\n const [uploadError, setUploadError] = useState<string | null>(null);\n const [isUploading, setIsUploading] = useState(false);\n const pendingFileRef = useRef<File | null>(null);\n\n const { upload } = useS3Upload<TBody>({\n initUrl,\n buildInitBody,\n register,\n getHeaders,\n getErrorMessage,\n resolveUploadedUrl,\n acceptedTypes,\n texts,\n });\n\n const doUpload = async (file: File): Promise<UploadedS3File | null> => {\n setIsUploading(true);\n try {\n const result = await upload(file);\n onChange?.(result);\n return result;\n } catch (e) {\n setUploadError(e instanceof Error ? e.message : 'Upload failed');\n return null;\n } finally {\n setIsUploading(false);\n }\n };\n\n useImperativeHandle(ref, () => ({\n upload: () => {\n if (!pendingFileRef.current) return Promise.resolve(null);\n return doUpload(pendingFileRef.current);\n },\n }));\n\n const handleChange = async (file: File | null) => {\n setUploadError(null);\n pendingFileRef.current = file;\n if (!file) {\n onChange?.(null);\n return;\n }\n if (autoUpload) await doUpload(file);\n };\n\n return (\n <FileInput\n {...fileInputProps}\n disabled={disabled ?? isUploading}\n error={error ?? uploadError ?? undefined}\n onChange={handleChange}\n />\n );\n}\n\nexport const FileInputS3 = forwardRef(FileInputS3Inner) as <\n TBody extends S3InitBody = S3InitBody,\n>(\n props: FileInputS3Props<TBody> & { ref?: React.Ref<FileInputS3Handle> },\n) => ReactElement;\n"],"mappings":"kQAmCA,SAAS,EACP,CACE,WACA,aAAa,GACb,UACA,gBACA,WACA,aACA,kBAAkB,EAClB,qBACA,gBACA,QACA,QACA,WACA,GAAG,GAEL,EACA,CACA,GAAM,CAAC,EAAa,GAAkB,EAAwB,KAAK,CAC7D,CAAC,EAAa,GAAkB,EAAS,GAAM,CAC/C,EAAiB,EAAoB,KAAK,CAE1C,CAAE,UAAW,EAAmB,CACpC,UACA,gBACA,WACA,aACA,kBACA,qBACA,gBACA,QACD,CAAC,CAEI,EAAW,KAAO,IAA+C,CACrE,EAAe,GAAK,CACpB,GAAI,CACF,IAAM,EAAS,MAAM,EAAO,EAAK,CAEjC,OADA,IAAW,EAAO,CACX,QACA,EAAG,CAEV,OADA,EAAe,aAAa,MAAQ,EAAE,QAAU,gBAAgB,CACzD,YACC,CACR,EAAe,GAAM,GAIzB,EAAoB,OAAY,CAC9B,WACO,EAAe,QACb,EAAS,EAAe,QAAQ,CADH,QAAQ,QAAQ,KAAK,CAG5D,EAAE,CAEH,IAAM,EAAe,KAAO,IAAsB,CAGhD,GAFA,EAAe,KAAK,CACpB,EAAe,QAAU,EACrB,CAAC,EAAM,CACT,IAAW,KAAK,CAChB,OAEE,GAAY,MAAM,EAAS,EAAK,EAGtC,OACE,EAAC,EAAD,CACE,GAAI,EACJ,SAAU,GAAY,EACtB,MAAO,GAAS,GAAe,IAAA,GAC/B,SAAU,EACV,CAAA,CAIN,MAAa,EAAc,EAAW,EAAiB"}
|
|
@@ -15,6 +15,8 @@ import { Dropzone, DropzoneProps } from "./dropzone/Dropzone.mjs";
|
|
|
15
15
|
import { DropzoneS3, DropzoneS3Props } from "./dropzone/DropzoneS3.mjs";
|
|
16
16
|
import { FileInput, FileInputProps } from "./file-input/FileInput.mjs";
|
|
17
17
|
import { FileInputMultiple, FileInputMultipleProps } from "./file-input/FileInputMultiple.mjs";
|
|
18
|
+
import { FileInputS3, FileInputS3Handle, FileInputS3Props, UploadedS3File } from "./file-input/FileInputS3.mjs";
|
|
19
|
+
import { FileInputMultipleS3, FileInputMultipleS3Handle, FileInputMultipleS3Props } from "./file-input/FileInputMultipleS3.mjs";
|
|
18
20
|
import { PasswordInput, PasswordInputProps } from "./password-input/PasswordInput.mjs";
|
|
19
21
|
import { PasswordRule, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps } from "./password-input/PasswordStrengthInput.mjs";
|
|
20
22
|
import { PasswordRuleDefinition, usePasswordRules } from "./password-input/usePasswordRules.mjs";
|
|
@@ -31,6 +31,7 @@ import { LoaderOval, LoaderOvalProps } from "./loader-oval/LoaderOval.mjs";
|
|
|
31
31
|
import { LogoImage, LogoImageProps } from "./logos/logo-image/LogoImage.mjs";
|
|
32
32
|
import { LogoSvg, LogoSvgProps } from "./logos/logo-svg/LogoSvg.mjs";
|
|
33
33
|
import { NotificationBanner, NotificationBannerIntent, NotificationBannerProps } from "./notification-banner/NotificationBanner.mjs";
|
|
34
|
+
import { Progress, ProgressClassNames, ProgressProps } from "./progress/Progress.mjs";
|
|
34
35
|
import { RemovableItem, RemovableItemProps } from "./removable-item/RemovableItem.mjs";
|
|
35
36
|
import { ResourceItem, ResourceItemProps } from "./resource-item/ResourceItem.mjs";
|
|
36
37
|
import { Tag, TagProps } from "./tag/Tag.mjs";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/data-display/progress/Progress.d.ts
|
|
4
|
+
type ProgressClassNames = {
|
|
5
|
+
progress?: string;
|
|
6
|
+
wrapper?: string;
|
|
7
|
+
root?: string;
|
|
8
|
+
section?: string;
|
|
9
|
+
};
|
|
10
|
+
type ProgressProps = {
|
|
11
|
+
value: number;
|
|
12
|
+
classNames?: ProgressClassNames;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
declare const Progress: ({
|
|
16
|
+
value,
|
|
17
|
+
classNames,
|
|
18
|
+
children
|
|
19
|
+
}: ProgressProps) => ReactNode;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Progress, ProgressClassNames, ProgressProps };
|
|
22
|
+
//# sourceMappingURL=Progress.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.mts","names":[],"sources":["../../../../src/components/data-display/progress/Progress.tsx"],"mappings":";;;KAWY,kBAAA;EACV,QAAA;EACA,OAAA;EACA,IAAA;EACA,OAAA;AAAA;AAAA,KAGU,aAAA;EACV,KAAA;EACA,UAAA,GAAa,kBAAA;EACb,QAAA,GAAW,SAAA;AAAA;AAAA,cAGA,QAAA;EAAY,KAAA;EAAA,UAAA;EAAA;AAAA,GAItB,aAAA,KAAgB,SAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cx as e}from"@mage-ui/styled-system/css";import{progress as t,progressRoot as n,progressSection as r,progressWrapper as i}from"@mage-ui/styled-system/recipes";import{Progress as a}from"@mantine/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=({value:c,classNames:l,children:u})=>s(`div`,{className:e(l?.progress??t(),l?.wrapper??i()),children:[u,o(a,{value:c,classNames:{root:l?.root??n(),section:l?.section??r()}})]});export{c as Progress};
|
|
2
|
+
//# sourceMappingURL=Progress.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.mjs","names":["Progress","progressRecipe","MantineProgress"],"sources":["../../../../src/components/data-display/progress/Progress.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n progress as progressRecipe,\n progressRoot,\n progressSection,\n progressWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Progress as MantineProgress } from '@mantine/core';\n\nexport type ProgressClassNames = {\n progress?: string;\n wrapper?: string;\n root?: string;\n section?: string;\n};\n\nexport type ProgressProps = {\n value: number;\n classNames?: ProgressClassNames;\n children?: ReactNode;\n};\n\nexport const Progress = ({\n value,\n classNames,\n children,\n}: ProgressProps): ReactNode => {\n return (\n <div\n className={cx(\n classNames?.progress ?? progressRecipe(),\n classNames?.wrapper ?? progressWrapper(),\n )}\n >\n {children}\n <MantineProgress\n value={value}\n classNames={{\n root: classNames?.root ?? progressRoot(),\n section: classNames?.section ?? progressSection(),\n }}\n />\n </div>\n );\n};\n"],"mappings":"iQAwBA,MAAaA,GAAY,CACvB,QACA,aACA,cAGE,EAAC,MAAD,CACE,UAAW,EACT,GAAY,UAAYC,GAAgB,CACxC,GAAY,SAAW,GAAiB,CACzC,UAJH,CAMG,EACD,EAACC,EAAD,CACS,QACP,WAAY,CACV,KAAM,GAAY,MAAQ,GAAc,CACxC,QAAS,GAAY,SAAW,GAAiB,CAClD,CACD,CAAA,CACE"}
|
|
@@ -12,6 +12,8 @@ import { FormDatePickerProps } from "./controls/FormDatePicker.mjs";
|
|
|
12
12
|
import { FormDateTimePickerProps } from "./controls/FormDateTimePicker.mjs";
|
|
13
13
|
import { FormFileInputProps } from "./controls/FormFileInput.mjs";
|
|
14
14
|
import { FormFileInputMultipleProps } from "./controls/FormFileInputMultiple.mjs";
|
|
15
|
+
import { FormFileInputS3Props } from "./controls/FormFileInputS3.mjs";
|
|
16
|
+
import { FormFileInputMultipleS3Props } from "./controls/FormFileInputMultipleS3.mjs";
|
|
15
17
|
import { FormDropzoneProps } from "./controls/FormDropzone.mjs";
|
|
16
18
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
17
19
|
import React, { ReactNode } from "react";
|
|
@@ -215,6 +217,34 @@ declare const Form: {
|
|
|
215
217
|
}: FormFileInputMultipleProps): react_jsx_runtime0.JSX.Element;
|
|
216
218
|
displayName: string;
|
|
217
219
|
};
|
|
220
|
+
FileInputS3: {
|
|
221
|
+
({
|
|
222
|
+
name,
|
|
223
|
+
$rule: _$rule,
|
|
224
|
+
error,
|
|
225
|
+
onChange,
|
|
226
|
+
buildMetadata,
|
|
227
|
+
resolveUploadUrls,
|
|
228
|
+
getHeaders,
|
|
229
|
+
acceptedTypes,
|
|
230
|
+
...fileInputProps
|
|
231
|
+
}: FormFileInputS3Props): react_jsx_runtime0.JSX.Element;
|
|
232
|
+
displayName: string;
|
|
233
|
+
};
|
|
234
|
+
FileInputMultipleS3: {
|
|
235
|
+
({
|
|
236
|
+
name,
|
|
237
|
+
$rule: _$rule,
|
|
238
|
+
error,
|
|
239
|
+
onChange,
|
|
240
|
+
buildMetadata,
|
|
241
|
+
resolveUploadUrls,
|
|
242
|
+
getHeaders,
|
|
243
|
+
acceptedTypes,
|
|
244
|
+
...fileInputMultipleProps
|
|
245
|
+
}: FormFileInputMultipleS3Props): react_jsx_runtime0.JSX.Element;
|
|
246
|
+
displayName: string;
|
|
247
|
+
};
|
|
218
248
|
Dropzone: {
|
|
219
249
|
({
|
|
220
250
|
$rule: _$rule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.mts","names":[],"sources":["../../../src/components/forms/Form.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.mts","names":[],"sources":["../../../src/components/forms/Form.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KA8BK,YAAA;EACH,IAAA;EACA,OAAA;EACA,MAAA;EACA,GAAA;AAAA;AAAA,KAGU,SAAA,WAAoB,WAAA;EAC9B,QAAA,GAAW,MAAA;IAAU,IAAA,EAAM,CAAA;EAAA,MAAQ,OAAA;EACnC,aAAA,IAAiB,QAAA,EAAU,YAAA;EAC3B,eAAA,IAAmB,MAAA;IACjB,OAAA;IACA,QAAA,EAAU,eAAA,CAAgB,CAAA;IAC1B,MAAA;EAAA;EAEF,aAAA;EACA,QAAA,EAAU,SAAA;EACV,MAAA,GAAS,SAAA,CAAU,MAAA,SAAe,UAAA;EAClC,CAAA,IACE,GAAA,UACA,QAAA,GAAW,MAAA,kBACX,QAAA,uBACY,KAAA,CAAM,SAAA;EAEpB,oBAAA;EACA,UAAA;IACE,IAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAYS,IAAA;EAAA,WAAkB,WAAA;IAAW,QAAA;IAAA,aAAA;IAAA,eAAA;IAAA,aAAA;IAAA,QAAA;IAAA,MAAA;IAAA,CAAA;IAAA,oBAAA;IAAA;EAAA,GAUvC,SAAA,CAAU,CAAA,IAAE,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FormAutocomplete as e}from"./controls/FormAutocomplete.mjs";import{FormCheckbox as t}from"./controls/FormCheckbox.mjs";import{FormCheckboxTree as n}from"./controls/FormCheckboxTree.mjs";import{FormCombobox as r}from"./controls/FormCombobox.mjs";import{FormDatePicker as i}from"./controls/FormDatePicker.mjs";import{FormDateTimePicker as a}from"./controls/FormDateTimePicker.mjs";import{FormDropzone as o}from"./controls/FormDropzone.mjs";import{FormS3Context as s}from"./FormS3Context.mjs";import{FormDropzoneS3 as c}from"./controls/FormDropzoneS3.mjs";import{FormFileInput as l}from"./controls/FormFileInput.mjs";import{FormFileInputMultiple as u}from"./controls/FormFileInputMultiple.mjs";import{
|
|
1
|
+
import{FormAutocomplete as e}from"./controls/FormAutocomplete.mjs";import{FormCheckbox as t}from"./controls/FormCheckbox.mjs";import{FormCheckboxTree as n}from"./controls/FormCheckboxTree.mjs";import{FormCombobox as r}from"./controls/FormCombobox.mjs";import{FormDatePicker as i}from"./controls/FormDatePicker.mjs";import{FormDateTimePicker as a}from"./controls/FormDateTimePicker.mjs";import{FormDropzone as o}from"./controls/FormDropzone.mjs";import{FormS3Context as s}from"./FormS3Context.mjs";import{FormDropzoneS3 as c}from"./controls/FormDropzoneS3.mjs";import{FormFileInput as l}from"./controls/FormFileInput.mjs";import{FormFileInputMultiple as u}from"./controls/FormFileInputMultiple.mjs";import{FormFileInputMultipleS3 as d}from"./controls/FormFileInputMultipleS3.mjs";import{FormFileInputS3 as f}from"./controls/FormFileInputS3.mjs";import{FormHidden as p}from"./controls/FormHidden.mjs";import{FormPassword as m}from"./controls/FormPassword.mjs";import{FormSelect as h}from"./controls/FormSelect.mjs";import{FormSubmit as g}from"./controls/FormSubmit.mjs";import{FormTextarea as _}from"./controls/FormTextarea.mjs";import{FormTextInput as v}from"./controls/FormTextInput.mjs";import{FormBase as y}from"./FormBase.mjs";import{FormErrorBox as b}from"./FormErrorBox.mjs";import{form as x,formRoot as S}from"@mage-ui/styled-system/recipes";import{jsx as C}from"react/jsx-runtime";import{useRef as w}from"react";const T=({$fetcher:e,onValidSubmit:t,onInvalidSubmit:n,invalidStatus:r=[],children:i,schema:a,t:o,s3UploadErrorMessage:c,classNames:l})=>{let u=w(new Map),d={registerS3Upload:(e,t)=>{u.current.set(e,t)},unregisterS3Upload:e=>{u.current.delete(e)}},f=async e=>{let t=Array.from(u.current.values());await Promise.all(t.map(t=>t(e)))};return C(s.Provider,{value:d,children:C(y,{onSubmit:async({data:i,setError:a})=>{await e({data:i}).then(async e=>{let n=e;if(n?.statusCode&&n.statusCode>=400)throw n;try{await f(e)}catch(e){console.error(`S3 upload error:`,e),a(`root.serverError`,{type:`s3`,message:c??`Failed to upload files`});return}t?.(e||{})}).catch(e=>{switch(e.statusCode){case 400:case 422:e.cause?.issues&&Object.keys(e.cause.issues).forEach(t=>{a(t,{type:`server`,message:e.cause?.issues?.[t]})}),a(`root.serverError`,{type:`server`,message:e?.message??`Something went wrong`});break;default:if(r.includes(e.statusCode)){n?.({message:e.message,setError:a,status:e.statusCode});break}throw e}})},schema:a,errorBox:b,t:o,classNames:{form:l?.form??x(),root:l?.root??S()},children:i})})};T.displayName=`Form`,T.TextInput=v,T.Textarea=_,T.Submit=g,T.Hidden=p,T.Checkbox=t,T.CheckboxTree=n,T.Password=m,T.Select=h,T.Combobox=r,T.Autocomplete=e,T.DatePicker=i,T.DateTimePicker=a,T.FileInput=l,T.FileInputMultiple=u,T.FileInputS3=f,T.FileInputMultipleS3=d,T.Dropzone=o,T.DropzoneS3=c;export{T as Form};
|
|
2
2
|
//# sourceMappingURL=Form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","names":[],"sources":["../../../src/components/forms/Form.tsx"],"sourcesContent":["import type React from 'react';\nimport type { ReactNode } from 'react';\nimport { useRef } from 'react';\nimport type { FieldValues, UseFormSetError } from 'react-hook-form';\nimport type { ZodObject, ZodTypeAny } from 'zod';\n\nimport { form, formRoot } from '@mage-ui/styled-system/recipes';\n\nimport { FormAutocomplete } from './controls/FormAutocomplete';\nimport { FormCheckbox } from './controls/FormCheckbox';\nimport { FormCheckboxTree } from './controls/FormCheckboxTree';\nimport { FormCombobox } from './controls/FormCombobox';\nimport { FormDatePicker } from './controls/FormDatePicker';\nimport { FormDateTimePicker } from './controls/FormDateTimePicker';\nimport { FormDropzone } from './controls/FormDropzone';\nimport { FormDropzoneS3 } from './controls/FormDropzoneS3';\nimport { FormFileInput } from './controls/FormFileInput';\nimport { FormFileInputMultiple } from './controls/FormFileInputMultiple';\nimport { FormHidden } from './controls/FormHidden';\nimport { FormPassword } from './controls/FormPassword';\nimport { FormSelect } from './controls/FormSelect';\nimport { FormSubmit } from './controls/FormSubmit';\nimport { FormTextarea } from './controls/FormTextarea';\nimport { FormTextInput } from './controls/FormTextInput';\nimport { FormBase } from './FormBase';\nimport { FormErrorBox } from './FormErrorBox';\nimport { FormS3Context, type S3UploadCallback } from './FormS3Context';\n\ntype FormResponse = {\n body?: object;\n details?: string;\n status?: number;\n url?: string;\n};\n\nexport type FormProps<T extends FieldValues> = {\n $fetcher: (params: { data: T }) => Promise<unknown>;\n onValidSubmit?: (response: FormResponse) => void;\n onInvalidSubmit?: (params: {\n message: string;\n setError: UseFormSetError<T>;\n status: number;\n }) => void;\n invalidStatus?: number[];\n children: ReactNode;\n schema?: ZodObject<Record<string, ZodTypeAny>>;\n t?: (\n key: string,\n bindings?: Record<string, string>,\n fallback?: string,\n ) => string | React.ReactNode;\n /** Mensaje mostrado al usuario si falla la subida de archivos a S3 tras el submit. */\n s3UploadErrorMessage?: string;\n classNames?: {\n form?: string;\n root?: string;\n };\n};\n\ntype FormError = {\n statusCode: number;\n message: string;\n cause?: {\n issues: Record<string, string>;\n };\n};\n\nexport const Form = <T extends FieldValues>({\n $fetcher,\n onValidSubmit,\n onInvalidSubmit,\n invalidStatus = [],\n children,\n schema,\n t,\n s3UploadErrorMessage,\n classNames,\n}: FormProps<T>) => {\n const s3CallbacksRef = useRef<Map<string, S3UploadCallback>>(new Map());\n\n const s3ContextValue = {\n registerS3Upload: (name: string, cb: S3UploadCallback) => {\n s3CallbacksRef.current.set(name, cb);\n },\n unregisterS3Upload: (name: string) => {\n s3CallbacksRef.current.delete(name);\n },\n };\n\n const runS3Uploads = async (response: unknown): Promise<void> => {\n const callbacks = Array.from(s3CallbacksRef.current.values());\n await Promise.all(callbacks.map((cb) => cb(response)));\n };\n\n const onSubmit = async ({\n data,\n setError,\n }: {\n data: FieldValues;\n setError: UseFormSetError<FieldValues>;\n }) => {\n await $fetcher({ data: data as T })\n .then(async (response) => {\n const res = response as FormError & FormResponse;\n if (res?.statusCode && res.statusCode >= 400) {\n throw res;\n }\n\n try {\n await runS3Uploads(response);\n } catch (e) {\n console.error('S3 upload error:', e);\n setError('root.serverError', {\n type: 's3',\n message: s3UploadErrorMessage ?? 'Failed to upload files',\n });\n return;\n }\n onValidSubmit?.((response || {}) as FormResponse);\n })\n .catch((error: FormError) => {\n switch (error.statusCode) {\n case 400:\n case 422: {\n if (error.cause?.issues) {\n Object.keys(error.cause.issues).forEach((key) => {\n setError(key, {\n type: 'server',\n message: error.cause?.issues?.[key],\n });\n });\n }\n setError('root.serverError', {\n type: 'server',\n message: error?.message ?? 'Something went wrong',\n });\n break;\n }\n default:\n if (invalidStatus.includes(error.statusCode)) {\n onInvalidSubmit?.({\n message: error.message,\n setError: setError as UseFormSetError<T>,\n status: error.statusCode,\n });\n break;\n }\n throw error;\n }\n });\n };\n\n return (\n <FormS3Context.Provider value={s3ContextValue}>\n <FormBase\n onSubmit={onSubmit}\n schema={schema}\n errorBox={FormErrorBox}\n t={t}\n classNames={{\n form: classNames?.form ?? form(),\n root: classNames?.root ?? formRoot(),\n }}\n >\n {children}\n </FormBase>\n </FormS3Context.Provider>\n );\n};\n\nForm.displayName = 'Form';\nForm.TextInput = FormTextInput;\nForm.Textarea = FormTextarea;\nForm.Submit = FormSubmit;\nForm.Hidden = FormHidden;\nForm.Checkbox = FormCheckbox;\nForm.CheckboxTree = FormCheckboxTree;\nForm.Password = FormPassword;\nForm.Select = FormSelect;\nForm.Combobox = FormCombobox;\nForm.Autocomplete = FormAutocomplete;\nForm.DatePicker = FormDatePicker;\nForm.DateTimePicker = FormDateTimePicker;\nForm.FileInput = FormFileInput;\nForm.FileInputMultiple = FormFileInputMultiple;\nForm.Dropzone = FormDropzone;\nForm.DropzoneS3 = FormDropzoneS3;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.mjs","names":[],"sources":["../../../src/components/forms/Form.tsx"],"sourcesContent":["import type React from 'react';\nimport type { ReactNode } from 'react';\nimport { useRef } from 'react';\nimport type { FieldValues, UseFormSetError } from 'react-hook-form';\nimport type { ZodObject, ZodTypeAny } from 'zod';\n\nimport { form, formRoot } from '@mage-ui/styled-system/recipes';\n\nimport { FormAutocomplete } from './controls/FormAutocomplete';\nimport { FormCheckbox } from './controls/FormCheckbox';\nimport { FormCheckboxTree } from './controls/FormCheckboxTree';\nimport { FormCombobox } from './controls/FormCombobox';\nimport { FormDatePicker } from './controls/FormDatePicker';\nimport { FormDateTimePicker } from './controls/FormDateTimePicker';\nimport { FormDropzone } from './controls/FormDropzone';\nimport { FormDropzoneS3 } from './controls/FormDropzoneS3';\nimport { FormFileInput } from './controls/FormFileInput';\nimport { FormFileInputMultiple } from './controls/FormFileInputMultiple';\nimport { FormFileInputMultipleS3 } from './controls/FormFileInputMultipleS3';\nimport { FormFileInputS3 } from './controls/FormFileInputS3';\nimport { FormHidden } from './controls/FormHidden';\nimport { FormPassword } from './controls/FormPassword';\nimport { FormSelect } from './controls/FormSelect';\nimport { FormSubmit } from './controls/FormSubmit';\nimport { FormTextarea } from './controls/FormTextarea';\nimport { FormTextInput } from './controls/FormTextInput';\nimport { FormBase } from './FormBase';\nimport { FormErrorBox } from './FormErrorBox';\nimport { FormS3Context, type S3UploadCallback } from './FormS3Context';\n\ntype FormResponse = {\n body?: object;\n details?: string;\n status?: number;\n url?: string;\n};\n\nexport type FormProps<T extends FieldValues> = {\n $fetcher: (params: { data: T }) => Promise<unknown>;\n onValidSubmit?: (response: FormResponse) => void;\n onInvalidSubmit?: (params: {\n message: string;\n setError: UseFormSetError<T>;\n status: number;\n }) => void;\n invalidStatus?: number[];\n children: ReactNode;\n schema?: ZodObject<Record<string, ZodTypeAny>>;\n t?: (\n key: string,\n bindings?: Record<string, string>,\n fallback?: string,\n ) => string | React.ReactNode;\n /** Mensaje mostrado al usuario si falla la subida de archivos a S3 tras el submit. */\n s3UploadErrorMessage?: string;\n classNames?: {\n form?: string;\n root?: string;\n };\n};\n\ntype FormError = {\n statusCode: number;\n message: string;\n cause?: {\n issues: Record<string, string>;\n };\n};\n\nexport const Form = <T extends FieldValues>({\n $fetcher,\n onValidSubmit,\n onInvalidSubmit,\n invalidStatus = [],\n children,\n schema,\n t,\n s3UploadErrorMessage,\n classNames,\n}: FormProps<T>) => {\n const s3CallbacksRef = useRef<Map<string, S3UploadCallback>>(new Map());\n\n const s3ContextValue = {\n registerS3Upload: (name: string, cb: S3UploadCallback) => {\n s3CallbacksRef.current.set(name, cb);\n },\n unregisterS3Upload: (name: string) => {\n s3CallbacksRef.current.delete(name);\n },\n };\n\n const runS3Uploads = async (response: unknown): Promise<void> => {\n const callbacks = Array.from(s3CallbacksRef.current.values());\n await Promise.all(callbacks.map((cb) => cb(response)));\n };\n\n const onSubmit = async ({\n data,\n setError,\n }: {\n data: FieldValues;\n setError: UseFormSetError<FieldValues>;\n }) => {\n await $fetcher({ data: data as T })\n .then(async (response) => {\n const res = response as FormError & FormResponse;\n if (res?.statusCode && res.statusCode >= 400) {\n throw res;\n }\n\n try {\n await runS3Uploads(response);\n } catch (e) {\n console.error('S3 upload error:', e);\n setError('root.serverError', {\n type: 's3',\n message: s3UploadErrorMessage ?? 'Failed to upload files',\n });\n return;\n }\n onValidSubmit?.((response || {}) as FormResponse);\n })\n .catch((error: FormError) => {\n switch (error.statusCode) {\n case 400:\n case 422: {\n if (error.cause?.issues) {\n Object.keys(error.cause.issues).forEach((key) => {\n setError(key, {\n type: 'server',\n message: error.cause?.issues?.[key],\n });\n });\n }\n setError('root.serverError', {\n type: 'server',\n message: error?.message ?? 'Something went wrong',\n });\n break;\n }\n default:\n if (invalidStatus.includes(error.statusCode)) {\n onInvalidSubmit?.({\n message: error.message,\n setError: setError as UseFormSetError<T>,\n status: error.statusCode,\n });\n break;\n }\n throw error;\n }\n });\n };\n\n return (\n <FormS3Context.Provider value={s3ContextValue}>\n <FormBase\n onSubmit={onSubmit}\n schema={schema}\n errorBox={FormErrorBox}\n t={t}\n classNames={{\n form: classNames?.form ?? form(),\n root: classNames?.root ?? formRoot(),\n }}\n >\n {children}\n </FormBase>\n </FormS3Context.Provider>\n );\n};\n\nForm.displayName = 'Form';\nForm.TextInput = FormTextInput;\nForm.Textarea = FormTextarea;\nForm.Submit = FormSubmit;\nForm.Hidden = FormHidden;\nForm.Checkbox = FormCheckbox;\nForm.CheckboxTree = FormCheckboxTree;\nForm.Password = FormPassword;\nForm.Select = FormSelect;\nForm.Combobox = FormCombobox;\nForm.Autocomplete = FormAutocomplete;\nForm.DatePicker = FormDatePicker;\nForm.DateTimePicker = FormDateTimePicker;\nForm.FileInput = FormFileInput;\nForm.FileInputMultiple = FormFileInputMultiple;\nForm.FileInputS3 = FormFileInputS3;\nForm.FileInputMultipleS3 = FormFileInputMultipleS3;\nForm.Dropzone = FormDropzone;\nForm.DropzoneS3 = FormDropzoneS3;\n"],"mappings":"24CAqEA,MAAa,GAA+B,CAC1C,WACA,gBACA,kBACA,gBAAgB,EAAE,CAClB,WACA,SACA,IACA,uBACA,gBACkB,CAClB,IAAM,EAAiB,EAAsC,IAAI,IAAM,CAEjE,EAAiB,CACrB,kBAAmB,EAAc,IAAyB,CACxD,EAAe,QAAQ,IAAI,EAAM,EAAG,EAEtC,mBAAqB,GAAiB,CACpC,EAAe,QAAQ,OAAO,EAAK,EAEtC,CAEK,EAAe,KAAO,IAAqC,CAC/D,IAAM,EAAY,MAAM,KAAK,EAAe,QAAQ,QAAQ,CAAC,CAC7D,MAAM,QAAQ,IAAI,EAAU,IAAK,GAAO,EAAG,EAAS,CAAC,CAAC,EA6DxD,OACE,EAAC,EAAc,SAAf,CAAwB,MAAO,WAC7B,EAAC,EAAD,CACY,SA7DC,MAAO,CACtB,OACA,cAII,CACJ,MAAM,EAAS,CAAQ,OAAW,CAAC,CAChC,KAAK,KAAO,IAAa,CACxB,IAAM,EAAM,EACZ,GAAI,GAAK,YAAc,EAAI,YAAc,IACvC,MAAM,EAGR,GAAI,CACF,MAAM,EAAa,EAAS,OACrB,EAAG,CACV,QAAQ,MAAM,mBAAoB,EAAE,CACpC,EAAS,mBAAoB,CAC3B,KAAM,KACN,QAAS,GAAwB,yBAClC,CAAC,CACF,OAEF,IAAiB,GAAY,EAAE,CAAkB,EACjD,CACD,MAAO,GAAqB,CAC3B,OAAQ,EAAM,WAAd,CACE,IAAK,KACL,IAAK,KACC,EAAM,OAAO,QACf,OAAO,KAAK,EAAM,MAAM,OAAO,CAAC,QAAS,GAAQ,CAC/C,EAAS,EAAK,CACZ,KAAM,SACN,QAAS,EAAM,OAAO,SAAS,GAChC,CAAC,EACF,CAEJ,EAAS,mBAAoB,CAC3B,KAAM,SACN,QAAS,GAAO,SAAW,uBAC5B,CAAC,CACF,MAEF,QACE,GAAI,EAAc,SAAS,EAAM,WAAW,CAAE,CAC5C,IAAkB,CAChB,QAAS,EAAM,QACL,WACV,OAAQ,EAAM,WACf,CAAC,CACF,MAEF,MAAM,IAEV,EAOQ,SACR,SAAU,EACP,IACH,WAAY,CACV,KAAM,GAAY,MAAQ,GAAM,CAChC,KAAM,GAAY,MAAQ,GAAU,CACrC,CAEA,WACQ,CAAA,CACY,CAAA,EAI7B,EAAK,YAAc,OACnB,EAAK,UAAY,EACjB,EAAK,SAAW,EAChB,EAAK,OAAS,EACd,EAAK,OAAS,EACd,EAAK,SAAW,EAChB,EAAK,aAAe,EACpB,EAAK,SAAW,EAChB,EAAK,OAAS,EACd,EAAK,SAAW,EAChB,EAAK,aAAe,EACpB,EAAK,WAAa,EAClB,EAAK,eAAiB,EACtB,EAAK,UAAY,EACjB,EAAK,kBAAoB,EACzB,EAAK,YAAc,EACnB,EAAK,oBAAsB,EAC3B,EAAK,SAAW,EAChB,EAAK,WAAa"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { S3FileMeta } from "../../controls/dropzone/use-s3-upload.mjs";
|
|
2
|
+
import { FileInputMultipleProps } from "../../controls/file-input/FileInputMultiple.mjs";
|
|
3
|
+
import { UploadTarget } from "./FormDropzoneS3.mjs";
|
|
4
|
+
//#region src/components/forms/controls/FormFileInputMultipleS3.d.ts
|
|
5
|
+
type FormFileInputMultipleS3Props = Omit<FileInputMultipleProps, 'onChange'> & {
|
|
6
|
+
name: string;
|
|
7
|
+
$rule?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
onChange?: (files: File[] | null) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Convierte cada archivo en los metadatos que se enviarán con el submit.
|
|
12
|
+
* Por defecto: { name, size, mimeType, extension }.
|
|
13
|
+
*/
|
|
14
|
+
buildMetadata?: (file: File, meta: S3FileMeta) => Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Extrae del response del $fetcher las URLs presignadas para este campo.
|
|
17
|
+
* Debe devolver un array en el mismo orden que los archivos añadidos.
|
|
18
|
+
*/
|
|
19
|
+
resolveUploadUrls: (response: unknown) => UploadTarget[]; /** Headers extra para el PUT a S3 (auth, CSRF…). */
|
|
20
|
+
getHeaders?: () => Record<string, string>; /** Map de extensión → MIME para resolución de tipo. */
|
|
21
|
+
acceptedTypes?: Record<string, string>;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { FormFileInputMultipleS3Props };
|
|
25
|
+
//# sourceMappingURL=FormFileInputMultipleS3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFileInputMultipleS3.d.mts","names":[],"sources":["../../../../src/components/forms/controls/FormFileInputMultipleS3.tsx"],"mappings":";;;;KAeY,4BAAA,GAA+B,IAAA,CACzC,sBAAA;EAGA,IAAA;EACA,KAAA;EACA,KAAA;EACA,QAAA,IAAY,KAAA,EAAO,IAAA;;;;;EAMnB,aAAA,IAAiB,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,UAAA,KAAe,MAAA;EAAf;;;;EAMnC,iBAAA,GAAoB,QAAA,cAAsB,YAAA,IAMpB;EAHtB,UAAA,SAAmB,MAAA,kBAtBsB;EAyBzC,aAAA,GAAgB,MAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{resolveMeta as e}from"../../controls/dropzone/use-s3-upload.mjs";import{FileInputMultiple as t}from"../../controls/file-input/FileInputMultiple.mjs";import{useFormS3Context as n}from"../FormS3Context.mjs";import{jsx as r}from"react/jsx-runtime";import{useEffect as i,useRef as a}from"react";import{Controller as o}from"react-hook-form";const s=e=>{if(!e)return{};let t={};for(let[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.join(`,`):String(r);return t},c=({name:c,$rule:l,error:u,onChange:d,buildMetadata:f,resolveUploadUrls:p,getHeaders:m,acceptedTypes:h,...g})=>{let{registerS3Upload:_,unregisterS3Upload:v}=n(),y=a(new Map),b=a(p),x=a(m);b.current=p,x.current=m;let S=t=>{let n=e(t,h),r=f?.(t,n)??{};return{name:t.name,size:t.size,mimeType:n.mimeType,extension:n.extension,...r}};return i(()=>(_(c,async e=>{let t=b.current(e),n=Array.from(y.current.values());if(t.length!==n.length)throw Error(`Form.FileInputMultipleS3 "${c}": resolveUploadUrls returned ${t.length} URL(s) but there are ${n.length} file(s).`);let r=x.current?.()??{};await Promise.all(n.map(async(e,n)=>{let i=t[n];if(!i)return;let{url:a,headers:o}=i,c={...s(o),...r},l=await fetch(a,{method:`PUT`,headers:c,body:e});if(!l.ok)throw Error(`Upload failed for "${e.name}" (${l.status} ${l.statusText})`)}))}),()=>{v(c)}),[c,_,v]),r(o,{name:c,render:({field:{onChange:e,onBlur:n}})=>r(t,{...g,error:u,onBlur:n,onChange:t=>{y.current=new Map((t??[]).map(e=>[e.name,e])),e(t?t.map(S):null),d?.(t)}})})};c.displayName=`Form.FileInputMultipleS3`;export{c as FormFileInputMultipleS3};
|
|
2
|
+
//# sourceMappingURL=FormFileInputMultipleS3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFileInputMultipleS3.mjs","names":[],"sources":["../../../../src/components/forms/controls/FormFileInputMultipleS3.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { Controller } from 'react-hook-form';\n\nimport {\n resolveMeta,\n type S3FileMeta,\n} from '@/components/controls/dropzone/use-s3-upload';\nimport {\n FileInputMultiple,\n type FileInputMultipleProps,\n} from '@/components/controls/file-input/FileInputMultiple';\n\nimport { useFormS3Context } from '../FormS3Context';\nimport type { FileMetadata, UploadTarget } from './FormDropzoneS3';\n\nexport type FormFileInputMultipleS3Props = Omit<\n FileInputMultipleProps,\n 'onChange'\n> & {\n name: string;\n $rule?: string;\n error?: string;\n onChange?: (files: File[] | null) => void;\n\n /**\n * Convierte cada archivo en los metadatos que se enviarán con el submit.\n * Por defecto: { name, size, mimeType, extension }.\n */\n buildMetadata?: (file: File, meta: S3FileMeta) => Record<string, unknown>;\n\n /**\n * Extrae del response del $fetcher las URLs presignadas para este campo.\n * Debe devolver un array en el mismo orden que los archivos añadidos.\n */\n resolveUploadUrls: (response: unknown) => UploadTarget[];\n\n /** Headers extra para el PUT a S3 (auth, CSRF…). */\n getHeaders?: () => Record<string, string>;\n\n /** Map de extensión → MIME para resolución de tipo. */\n acceptedTypes?: Record<string, string>;\n};\n\nconst flattenHeaders = (\n headers: Record<string, string | string[]> | undefined,\n): Record<string, string> => {\n if (!headers) return {};\n const out: Record<string, string> = {};\n for (const [k, v] of Object.entries(headers)) {\n out[k] = Array.isArray(v) ? v.join(',') : String(v);\n }\n return out;\n};\n\nexport const FormFileInputMultipleS3 = ({\n name,\n $rule: _$rule,\n error,\n onChange,\n buildMetadata,\n resolveUploadUrls,\n getHeaders,\n acceptedTypes,\n ...fileInputMultipleProps\n}: FormFileInputMultipleS3Props) => {\n const { registerS3Upload, unregisterS3Upload } = useFormS3Context();\n const rawFilesRef = useRef<Map<string, File>>(new Map());\n const resolveUploadUrlsRef = useRef(resolveUploadUrls);\n const getHeadersRef = useRef(getHeaders);\n\n resolveUploadUrlsRef.current = resolveUploadUrls;\n getHeadersRef.current = getHeaders;\n\n const buildFileMeta = (file: File): FileMetadata => {\n const meta = resolveMeta(file, acceptedTypes);\n const extra = buildMetadata?.(file, meta) ?? {};\n return {\n name: file.name,\n size: file.size,\n mimeType: meta.mimeType,\n extension: meta.extension,\n ...extra,\n };\n };\n\n useEffect(() => {\n registerS3Upload(name, async (response: unknown) => {\n const targets = resolveUploadUrlsRef.current(response);\n const files = Array.from(rawFilesRef.current.values());\n\n if (targets.length !== files.length) {\n throw new Error(\n `Form.FileInputMultipleS3 \"${name}\": resolveUploadUrls returned ${targets.length} URL(s) but there are ${files.length} file(s).`,\n );\n }\n\n const baseHeaders = getHeadersRef.current?.() ?? {};\n\n await Promise.all(\n files.map(async (file, i) => {\n const target = targets[i];\n if (!target) return;\n const { url, headers: s3Headers } = target;\n const merged = {\n ...flattenHeaders(s3Headers),\n ...baseHeaders,\n };\n\n const res = await fetch(url, {\n method: 'PUT',\n headers: merged,\n body: file,\n });\n\n if (!res.ok) {\n throw new Error(\n `Upload failed for \"${file.name}\" (${res.status} ${res.statusText})`,\n );\n }\n }),\n );\n });\n\n return () => {\n unregisterS3Upload(name);\n };\n }, [name, registerS3Upload, unregisterS3Upload]);\n\n return (\n <Controller\n name={name}\n render={({ field: { onChange: fieldOnChange, onBlur } }) => (\n <FileInputMultiple\n {...fileInputMultipleProps}\n error={error}\n onBlur={onBlur}\n onChange={(files) => {\n rawFilesRef.current = new Map(\n (files ?? []).map((f) => [f.name, f]),\n );\n fieldOnChange(files ? files.map(buildFileMeta) : null);\n onChange?.(files);\n }}\n />\n )}\n />\n );\n};\n\nFormFileInputMultipleS3.displayName = 'Form.FileInputMultipleS3';\n"],"mappings":"uVA2CA,MAAM,EACJ,GAC2B,CAC3B,GAAI,CAAC,EAAS,MAAO,EAAE,CACvB,IAAM,EAA8B,EAAE,CACtC,IAAK,GAAM,CAAC,EAAG,KAAM,OAAO,QAAQ,EAAQ,CAC1C,EAAI,GAAK,MAAM,QAAQ,EAAE,CAAG,EAAE,KAAK,IAAI,CAAG,OAAO,EAAE,CAErD,OAAO,GAGI,GAA2B,CACtC,OACA,MAAO,EACP,QACA,WACA,gBACA,oBACA,aACA,gBACA,GAAG,KAC+B,CAClC,GAAM,CAAE,mBAAkB,sBAAuB,GAAkB,CAC7D,EAAc,EAA0B,IAAI,IAAM,CAClD,EAAuB,EAAO,EAAkB,CAChD,EAAgB,EAAO,EAAW,CAExC,EAAqB,QAAU,EAC/B,EAAc,QAAU,EAExB,IAAM,EAAiB,GAA6B,CAClD,IAAM,EAAO,EAAY,EAAM,EAAc,CACvC,EAAQ,IAAgB,EAAM,EAAK,EAAI,EAAE,CAC/C,MAAO,CACL,KAAM,EAAK,KACX,KAAM,EAAK,KACX,SAAU,EAAK,SACf,UAAW,EAAK,UAChB,GAAG,EACJ,EA8CH,OA3CA,OACE,EAAiB,EAAM,KAAO,IAAsB,CAClD,IAAM,EAAU,EAAqB,QAAQ,EAAS,CAChD,EAAQ,MAAM,KAAK,EAAY,QAAQ,QAAQ,CAAC,CAEtD,GAAI,EAAQ,SAAW,EAAM,OAC3B,MAAU,MACR,6BAA6B,EAAK,gCAAgC,EAAQ,OAAO,wBAAwB,EAAM,OAAO,WACvH,CAGH,IAAM,EAAc,EAAc,WAAW,EAAI,EAAE,CAEnD,MAAM,QAAQ,IACZ,EAAM,IAAI,MAAO,EAAM,IAAM,CAC3B,IAAM,EAAS,EAAQ,GACvB,GAAI,CAAC,EAAQ,OACb,GAAM,CAAE,MAAK,QAAS,GAAc,EAC9B,EAAS,CACb,GAAG,EAAe,EAAU,CAC5B,GAAG,EACJ,CAEK,EAAM,MAAM,MAAM,EAAK,CAC3B,OAAQ,MACR,QAAS,EACT,KAAM,EACP,CAAC,CAEF,GAAI,CAAC,EAAI,GACP,MAAU,MACR,sBAAsB,EAAK,KAAK,KAAK,EAAI,OAAO,GAAG,EAAI,WAAW,GACnE,EAEH,CACH,EACD,KAEW,CACX,EAAmB,EAAK,GAEzB,CAAC,EAAM,EAAkB,EAAmB,CAAC,CAG9C,EAAC,EAAD,CACQ,OACN,QAAS,CAAE,MAAO,CAAE,SAAU,EAAe,aAC3C,EAAC,EAAD,CACE,GAAI,EACG,QACC,SACR,SAAW,GAAU,CACnB,EAAY,QAAU,IAAI,KACvB,GAAS,EAAE,EAAE,IAAK,GAAM,CAAC,EAAE,KAAM,EAAE,CAAC,CACtC,CACD,EAAc,EAAQ,EAAM,IAAI,EAAc,CAAG,KAAK,CACtD,IAAW,EAAM,EAEnB,CAAA,CAEJ,CAAA,EAIN,EAAwB,YAAc"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { S3FileMeta } from "../../controls/dropzone/use-s3-upload.mjs";
|
|
2
|
+
import { FileInputProps } from "../../controls/file-input/FileInput.mjs";
|
|
3
|
+
import { UploadTarget } from "./FormDropzoneS3.mjs";
|
|
4
|
+
//#region src/components/forms/controls/FormFileInputS3.d.ts
|
|
5
|
+
type FormFileInputS3Props = Omit<FileInputProps, 'onChange'> & {
|
|
6
|
+
name: string;
|
|
7
|
+
$rule?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
onChange?: (file: File | null) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Convierte el archivo en los metadatos que se enviarán con el submit.
|
|
12
|
+
* Por defecto: { name, size, mimeType, extension }.
|
|
13
|
+
*/
|
|
14
|
+
buildMetadata?: (file: File, meta: S3FileMeta) => Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Extrae del response del $fetcher la URL presignada para este campo.
|
|
17
|
+
*/
|
|
18
|
+
resolveUploadUrls: (response: unknown) => UploadTarget; /** Headers extra para el PUT a S3 (auth, CSRF…). */
|
|
19
|
+
getHeaders?: () => Record<string, string>; /** Map de extensión → MIME para resolución de tipo. */
|
|
20
|
+
acceptedTypes?: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { FormFileInputS3Props };
|
|
24
|
+
//# sourceMappingURL=FormFileInputS3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFileInputS3.d.mts","names":[],"sources":["../../../../src/components/forms/controls/FormFileInputS3.tsx"],"mappings":";;;;KAeY,oBAAA,GAAuB,IAAA,CAAK,cAAA;EACtC,IAAA;EACA,KAAA;EACA,KAAA;EACA,QAAA,IAAY,IAAA,EAAM,IAAA;;;;;EAMlB,aAAA,IAAiB,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,UAAA,KAAe,MAAA;EAAf;;;EAKnC,iBAAA,GAAoB,QAAA,cAAsB,YAAA,EAM1B;EAHhB,UAAA,SAAmB,MAAA,kBAGG;EAAtB,aAAA,GAAgB,MAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{resolveMeta as e}from"../../controls/dropzone/use-s3-upload.mjs";import{FileInput as t}from"../../controls/file-input/FileInput.mjs";import{useFormS3Context as n}from"../FormS3Context.mjs";import{jsx as r}from"react/jsx-runtime";import{useEffect as i,useRef as a}from"react";import{Controller as o}from"react-hook-form";const s=e=>{if(!e)return{};let t={};for(let[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.join(`,`):String(r);return t},c=({name:c,$rule:l,error:u,onChange:d,buildMetadata:f,resolveUploadUrls:p,getHeaders:m,acceptedTypes:h,...g})=>{let{registerS3Upload:_,unregisterS3Upload:v}=n(),y=a(null),b=a(p),x=a(m);b.current=p,x.current=m;let S=t=>{let n=e(t,h),r=f?.(t,n)??{};return{name:t.name,size:t.size,mimeType:n.mimeType,extension:n.extension,...r}};return i(()=>(_(c,async e=>{let t=y.current;if(!t)return;let n=b.current(e),r=x.current?.()??{},i={...s(n.headers),...r},a=await fetch(n.url,{method:`PUT`,headers:i,body:t});if(!a.ok)throw Error(`Upload failed for "${t.name}" (${a.status} ${a.statusText})`)}),()=>{v(c)}),[c,_,v]),r(o,{name:c,render:({field:{onChange:e,onBlur:n}})=>r(t,{...g,error:u,onBlur:n,onChange:t=>{y.current=t,e(t?S(t):null),d?.(t)}})})};c.displayName=`Form.FileInputS3`;export{c as FormFileInputS3};
|
|
2
|
+
//# sourceMappingURL=FormFileInputS3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFileInputS3.mjs","names":[],"sources":["../../../../src/components/forms/controls/FormFileInputS3.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { Controller } from 'react-hook-form';\n\nimport {\n resolveMeta,\n type S3FileMeta,\n} from '@/components/controls/dropzone/use-s3-upload';\nimport {\n FileInput,\n type FileInputProps,\n} from '@/components/controls/file-input/FileInput';\n\nimport { useFormS3Context } from '../FormS3Context';\nimport type { FileMetadata, UploadTarget } from './FormDropzoneS3';\n\nexport type FormFileInputS3Props = Omit<FileInputProps, 'onChange'> & {\n name: string;\n $rule?: string;\n error?: string;\n onChange?: (file: File | null) => void;\n\n /**\n * Convierte el archivo en los metadatos que se enviarán con el submit.\n * Por defecto: { name, size, mimeType, extension }.\n */\n buildMetadata?: (file: File, meta: S3FileMeta) => Record<string, unknown>;\n\n /**\n * Extrae del response del $fetcher la URL presignada para este campo.\n */\n resolveUploadUrls: (response: unknown) => UploadTarget;\n\n /** Headers extra para el PUT a S3 (auth, CSRF…). */\n getHeaders?: () => Record<string, string>;\n\n /** Map de extensión → MIME para resolución de tipo. */\n acceptedTypes?: Record<string, string>;\n};\n\nconst flattenHeaders = (\n headers: Record<string, string | string[]> | undefined,\n): Record<string, string> => {\n if (!headers) return {};\n const out: Record<string, string> = {};\n for (const [k, v] of Object.entries(headers)) {\n out[k] = Array.isArray(v) ? v.join(',') : String(v);\n }\n return out;\n};\n\nexport const FormFileInputS3 = ({\n name,\n $rule: _$rule,\n error,\n onChange,\n buildMetadata,\n resolveUploadUrls,\n getHeaders,\n acceptedTypes,\n ...fileInputProps\n}: FormFileInputS3Props) => {\n const { registerS3Upload, unregisterS3Upload } = useFormS3Context();\n const rawFileRef = useRef<File | null>(null);\n const resolveUploadUrlsRef = useRef(resolveUploadUrls);\n const getHeadersRef = useRef(getHeaders);\n\n resolveUploadUrlsRef.current = resolveUploadUrls;\n getHeadersRef.current = getHeaders;\n\n const buildFileMeta = (file: File): FileMetadata => {\n const meta = resolveMeta(file, acceptedTypes);\n const extra = buildMetadata?.(file, meta) ?? {};\n return {\n name: file.name,\n size: file.size,\n mimeType: meta.mimeType,\n extension: meta.extension,\n ...extra,\n };\n };\n\n useEffect(() => {\n registerS3Upload(name, async (response: unknown) => {\n const file = rawFileRef.current;\n if (!file) return;\n\n const target = resolveUploadUrlsRef.current(response);\n const baseHeaders = getHeadersRef.current?.() ?? {};\n const merged = {\n ...flattenHeaders(target.headers),\n ...baseHeaders,\n };\n\n const res = await fetch(target.url, {\n method: 'PUT',\n headers: merged,\n body: file,\n });\n\n if (!res.ok) {\n throw new Error(\n `Upload failed for \"${file.name}\" (${res.status} ${res.statusText})`,\n );\n }\n });\n\n return () => {\n unregisterS3Upload(name);\n };\n }, [name, registerS3Upload, unregisterS3Upload]);\n\n return (\n <Controller\n name={name}\n render={({ field: { onChange: fieldOnChange, onBlur } }) => (\n <FileInput\n {...fileInputProps}\n error={error}\n onBlur={onBlur}\n onChange={(file) => {\n rawFileRef.current = file;\n fieldOnChange(file ? buildFileMeta(file) : null);\n onChange?.(file);\n }}\n />\n )}\n />\n );\n};\n\nFormFileInputS3.displayName = 'Form.FileInputS3';\n"],"mappings":"uUAuCA,MAAM,EACJ,GAC2B,CAC3B,GAAI,CAAC,EAAS,MAAO,EAAE,CACvB,IAAM,EAA8B,EAAE,CACtC,IAAK,GAAM,CAAC,EAAG,KAAM,OAAO,QAAQ,EAAQ,CAC1C,EAAI,GAAK,MAAM,QAAQ,EAAE,CAAG,EAAE,KAAK,IAAI,CAAG,OAAO,EAAE,CAErD,OAAO,GAGI,GAAmB,CAC9B,OACA,MAAO,EACP,QACA,WACA,gBACA,oBACA,aACA,gBACA,GAAG,KACuB,CAC1B,GAAM,CAAE,mBAAkB,sBAAuB,GAAkB,CAC7D,EAAa,EAAoB,KAAK,CACtC,EAAuB,EAAO,EAAkB,CAChD,EAAgB,EAAO,EAAW,CAExC,EAAqB,QAAU,EAC/B,EAAc,QAAU,EAExB,IAAM,EAAiB,GAA6B,CAClD,IAAM,EAAO,EAAY,EAAM,EAAc,CACvC,EAAQ,IAAgB,EAAM,EAAK,EAAI,EAAE,CAC/C,MAAO,CACL,KAAM,EAAK,KACX,KAAM,EAAK,KACX,SAAU,EAAK,SACf,UAAW,EAAK,UAChB,GAAG,EACJ,EAiCH,OA9BA,OACE,EAAiB,EAAM,KAAO,IAAsB,CAClD,IAAM,EAAO,EAAW,QACxB,GAAI,CAAC,EAAM,OAEX,IAAM,EAAS,EAAqB,QAAQ,EAAS,CAC/C,EAAc,EAAc,WAAW,EAAI,EAAE,CAC7C,EAAS,CACb,GAAG,EAAe,EAAO,QAAQ,CACjC,GAAG,EACJ,CAEK,EAAM,MAAM,MAAM,EAAO,IAAK,CAClC,OAAQ,MACR,QAAS,EACT,KAAM,EACP,CAAC,CAEF,GAAI,CAAC,EAAI,GACP,MAAU,MACR,sBAAsB,EAAK,KAAK,KAAK,EAAI,OAAO,GAAG,EAAI,WAAW,GACnE,EAEH,KAEW,CACX,EAAmB,EAAK,GAEzB,CAAC,EAAM,EAAkB,EAAmB,CAAC,CAG9C,EAAC,EAAD,CACQ,OACN,QAAS,CAAE,MAAO,CAAE,SAAU,EAAe,aAC3C,EAAC,EAAD,CACE,GAAI,EACG,QACC,SACR,SAAW,GAAS,CAClB,EAAW,QAAU,EACrB,EAAc,EAAO,EAAc,EAAK,CAAG,KAAK,CAChD,IAAW,EAAK,EAElB,CAAA,CAEJ,CAAA,EAIN,EAAgB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FormAutocomplete as e}from"./FormAutocomplete.mjs";import{FormCheckbox as t}from"./FormCheckbox.mjs";import{FormCheckboxTree as n}from"./FormCheckboxTree.mjs";import{FormCombobox as r}from"./FormCombobox.mjs";import{FormDatePicker as i}from"./FormDatePicker.mjs";import{FormDateTimePicker as a}from"./FormDateTimePicker.mjs";import{FormDropzone as o}from"./FormDropzone.mjs";import{FormDropzoneS3 as s}from"./FormDropzoneS3.mjs";import{FormFileInput as c}from"./FormFileInput.mjs";import{FormFileInputMultiple as l}from"./FormFileInputMultiple.mjs";import{
|
|
1
|
+
import{FormAutocomplete as e}from"./FormAutocomplete.mjs";import{FormCheckbox as t}from"./FormCheckbox.mjs";import{FormCheckboxTree as n}from"./FormCheckboxTree.mjs";import{FormCombobox as r}from"./FormCombobox.mjs";import{FormDatePicker as i}from"./FormDatePicker.mjs";import{FormDateTimePicker as a}from"./FormDateTimePicker.mjs";import{FormDropzone as o}from"./FormDropzone.mjs";import{FormDropzoneS3 as s}from"./FormDropzoneS3.mjs";import{FormFileInput as c}from"./FormFileInput.mjs";import{FormFileInputMultiple as l}from"./FormFileInputMultiple.mjs";import{FormFileInputMultipleS3 as u}from"./FormFileInputMultipleS3.mjs";import{FormFileInputS3 as d}from"./FormFileInputS3.mjs";import{FormHidden as f}from"./FormHidden.mjs";import{FormPassword as p}from"./FormPassword.mjs";import{FormSelect as m}from"./FormSelect.mjs";import{FormSubmit as h}from"./FormSubmit.mjs";import{FormTextarea as g}from"./FormTextarea.mjs";import{FormTextInput as _}from"./FormTextInput.mjs";const v=[h,_,g,p,f,t,n,m,r,e,i,a,c,l,d,u,o,s];export{v as controls};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/forms/controls/index.ts"],"sourcesContent":["import { FormAutocomplete } from './FormAutocomplete';\nimport { FormCheckbox } from './FormCheckbox';\nimport { FormCheckboxTree } from './FormCheckboxTree';\nimport { FormCombobox } from './FormCombobox';\nimport { FormDatePicker } from './FormDatePicker';\nimport { FormDateTimePicker } from './FormDateTimePicker';\nimport { FormDropzone } from './FormDropzone';\nimport { FormDropzoneS3 } from './FormDropzoneS3';\nimport { FormFileInput } from './FormFileInput';\nimport { FormFileInputMultiple } from './FormFileInputMultiple';\nimport { FormHidden } from './FormHidden';\nimport { FormPassword } from './FormPassword';\nimport { FormSelect } from './FormSelect';\nimport { FormSubmit } from './FormSubmit';\nimport { FormTextarea } from './FormTextarea';\nimport { FormTextInput } from './FormTextInput';\n\nexport const controls = [\n FormSubmit,\n FormTextInput,\n FormTextarea,\n FormPassword,\n FormHidden,\n FormCheckbox,\n FormCheckboxTree,\n FormSelect,\n FormCombobox,\n FormAutocomplete,\n FormDatePicker,\n FormDateTimePicker,\n FormFileInput,\n FormFileInputMultiple,\n FormDropzone,\n FormDropzoneS3,\n] as React.ComponentType[];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/forms/controls/index.ts"],"sourcesContent":["import { FormAutocomplete } from './FormAutocomplete';\nimport { FormCheckbox } from './FormCheckbox';\nimport { FormCheckboxTree } from './FormCheckboxTree';\nimport { FormCombobox } from './FormCombobox';\nimport { FormDatePicker } from './FormDatePicker';\nimport { FormDateTimePicker } from './FormDateTimePicker';\nimport { FormDropzone } from './FormDropzone';\nimport { FormDropzoneS3 } from './FormDropzoneS3';\nimport { FormFileInput } from './FormFileInput';\nimport { FormFileInputMultiple } from './FormFileInputMultiple';\nimport { FormFileInputMultipleS3 } from './FormFileInputMultipleS3';\nimport { FormFileInputS3 } from './FormFileInputS3';\nimport { FormHidden } from './FormHidden';\nimport { FormPassword } from './FormPassword';\nimport { FormSelect } from './FormSelect';\nimport { FormSubmit } from './FormSubmit';\nimport { FormTextarea } from './FormTextarea';\nimport { FormTextInput } from './FormTextInput';\n\nexport const controls = [\n FormSubmit,\n FormTextInput,\n FormTextarea,\n FormPassword,\n FormHidden,\n FormCheckbox,\n FormCheckboxTree,\n FormSelect,\n FormCombobox,\n FormAutocomplete,\n FormDatePicker,\n FormDateTimePicker,\n FormFileInput,\n FormFileInputMultiple,\n FormFileInputS3,\n FormFileInputMultipleS3,\n FormDropzone,\n FormDropzoneS3,\n] as React.ComponentType[];\n"],"mappings":"88BAmBA,MAAa,EAAW,CACtB,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as e,jsx as t}from"react/jsx-runtime";import{Children as n,cloneElement as r,isValidElement as i}from"react";const a=new Set([`Form.Password`,`Form.Checkbox`,`Form.CheckboxTree`,`Form.Select`,`Form.Combobox`,`Form.Autocomplete`,`Form.DatePicker`,`Form.DateTimePicker`,`Form.Hidden`,`Form.FileInput`,`Form.FileInputMultiple`,`Form.Dropzone`,`Form.DropzoneS3`]),o=(e,t,n)=>{if(e)try{let r=JSON.parse(e),i={...r.bindings,attribute:t},a=n?n(r.key,i,r.fallback):r.fallback;return String(a).replace(/{attribute}/g,t)}catch{return e.replace(/{attribute}/g,t)}},s=({children:s,register:c,componentTypes:l,errors:u={},t:d})=>{let f=e=>n.map(e,e=>{if(!i(e))return e;let t=e.props;if(l.some(t=>e.type===t)){let n=t.name,i=u[n??``]?.message?.toString(),s=n?o(i,n,d):void 0,l=e.type.displayName;return r(e,{...n!==void 0&&!a.has(l??``)&&n?c(n):{},error:s})}return t.children?r(e,{children:f(t.children)}):e});return t(e,{children:f(s)})};export{s as RegisteredFormChildren};
|
|
1
|
+
"use client";import{Fragment as e,jsx as t}from"react/jsx-runtime";import{Children as n,cloneElement as r,isValidElement as i}from"react";const a=new Set([`Form.Password`,`Form.Checkbox`,`Form.CheckboxTree`,`Form.Select`,`Form.Combobox`,`Form.Autocomplete`,`Form.DatePicker`,`Form.DateTimePicker`,`Form.Hidden`,`Form.FileInput`,`Form.FileInputMultiple`,`Form.Dropzone`,`Form.DropzoneS3`,`Form.FileInputS3`,`Form.FileInputMultipleS3`]),o=(e,t,n)=>{if(e)try{let r=JSON.parse(e),i={...r.bindings,attribute:t},a=n?n(r.key,i,r.fallback):r.fallback;return String(a).replace(/{attribute}/g,t)}catch{return e.replace(/{attribute}/g,t)}},s=({children:s,register:c,componentTypes:l,errors:u={},t:d})=>{let f=e=>n.map(e,e=>{if(!i(e))return e;let t=e.props;if(l.some(t=>e.type===t)){let n=t.name,i=u[n??``]?.message?.toString(),s=n?o(i,n,d):void 0,l=e.type.displayName;return r(e,{...n!==void 0&&!a.has(l??``)&&n?c(n):{},error:s})}return t.children?r(e,{children:f(t.children)}):e});return t(e,{children:f(s)})};export{s as RegisteredFormChildren};
|
|
2
2
|
//# sourceMappingURL=register-components.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-components.mjs","names":[],"sources":["../../../../src/components/forms/controls/register-components.tsx"],"sourcesContent":["'use client';\n\nimport type React from 'react';\nimport { Children, cloneElement, isValidElement } from 'react';\nimport type { FieldErrors, UseFormRegister } from 'react-hook-form';\n\ninterface TranslationMessage {\n key: string;\n bindings: Record<string, string>;\n fallback: string;\n}\n\nconst controllerDisplayNames = new Set([\n 'Form.Password',\n 'Form.Checkbox',\n 'Form.CheckboxTree',\n 'Form.Select',\n 'Form.Combobox',\n 'Form.Autocomplete',\n 'Form.DatePicker',\n 'Form.DateTimePicker',\n 'Form.Hidden',\n 'Form.FileInput',\n 'Form.FileInputMultiple',\n 'Form.Dropzone',\n 'Form.DropzoneS3',\n]);\n\nconst parseAndTranslate = (\n message: string | undefined,\n fieldName: string,\n t?: (\n key: string,\n bindings?: Record<string, string>,\n fallback?: string,\n ) => string | React.ReactNode,\n): string | undefined => {\n if (!message) return undefined;\n\n try {\n const parsed: TranslationMessage = JSON.parse(message);\n const bindings = { ...parsed.bindings, attribute: fieldName };\n const result = t\n ? t(parsed.key, bindings, parsed.fallback)\n : parsed.fallback;\n return String(result).replace(/{attribute}/g, fieldName);\n } catch {\n return message.replace(/{attribute}/g, fieldName);\n }\n};\n\ninterface RegisteredFormChildrenProps {\n children: React.ReactNode;\n register: UseFormRegister<Record<string, unknown>>;\n componentTypes: React.ComponentType[];\n errors?: FieldErrors<Record<string, unknown>>;\n t?: (\n key: string,\n bindings?: Record<string, string>,\n fallback?: string,\n ) => string | React.ReactNode;\n}\n\nexport const RegisteredFormChildren = ({\n children,\n register,\n componentTypes,\n errors = {},\n t,\n}: RegisteredFormChildrenProps): React.ReactNode => {\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return Children.map(nodes, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const childProps = child.props as {\n name?: string;\n children?: React.ReactNode;\n };\n\n if (\n componentTypes.some((type: React.ComponentType) => child.type === type)\n ) {\n const fieldName = childProps.name;\n const errorMessage = errors[fieldName ?? '']?.message?.toString();\n const translatedError = fieldName\n ? parseAndTranslate(errorMessage, fieldName, t)\n : undefined;\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n ).displayName;\n const shouldRegister =\n fieldName !== undefined &&\n !controllerDisplayNames.has(displayName ?? '');\n const registrationProps =\n shouldRegister && fieldName ? register(fieldName) : {};\n\n return cloneElement(child, {\n ...registrationProps,\n error: translatedError,\n } as Partial<typeof child.props>);\n }\n\n if (childProps.children) {\n return cloneElement(child, {\n children: processChildren(childProps.children),\n } as Partial<typeof child.props>);\n }\n\n return child;\n });\n };\n\n return <>{processChildren(children)}</>;\n};\n"],"mappings":"0IAYA,MAAM,EAAyB,IAAI,IAAI,CACrC,gBACA,gBACA,oBACA,cACA,gBACA,oBACA,kBACA,sBACA,cACA,iBACA,yBACA,gBACA,
|
|
1
|
+
{"version":3,"file":"register-components.mjs","names":[],"sources":["../../../../src/components/forms/controls/register-components.tsx"],"sourcesContent":["'use client';\n\nimport type React from 'react';\nimport { Children, cloneElement, isValidElement } from 'react';\nimport type { FieldErrors, UseFormRegister } from 'react-hook-form';\n\ninterface TranslationMessage {\n key: string;\n bindings: Record<string, string>;\n fallback: string;\n}\n\nconst controllerDisplayNames = new Set([\n 'Form.Password',\n 'Form.Checkbox',\n 'Form.CheckboxTree',\n 'Form.Select',\n 'Form.Combobox',\n 'Form.Autocomplete',\n 'Form.DatePicker',\n 'Form.DateTimePicker',\n 'Form.Hidden',\n 'Form.FileInput',\n 'Form.FileInputMultiple',\n 'Form.Dropzone',\n 'Form.DropzoneS3',\n 'Form.FileInputS3',\n 'Form.FileInputMultipleS3',\n]);\n\nconst parseAndTranslate = (\n message: string | undefined,\n fieldName: string,\n t?: (\n key: string,\n bindings?: Record<string, string>,\n fallback?: string,\n ) => string | React.ReactNode,\n): string | undefined => {\n if (!message) return undefined;\n\n try {\n const parsed: TranslationMessage = JSON.parse(message);\n const bindings = { ...parsed.bindings, attribute: fieldName };\n const result = t\n ? t(parsed.key, bindings, parsed.fallback)\n : parsed.fallback;\n return String(result).replace(/{attribute}/g, fieldName);\n } catch {\n return message.replace(/{attribute}/g, fieldName);\n }\n};\n\ninterface RegisteredFormChildrenProps {\n children: React.ReactNode;\n register: UseFormRegister<Record<string, unknown>>;\n componentTypes: React.ComponentType[];\n errors?: FieldErrors<Record<string, unknown>>;\n t?: (\n key: string,\n bindings?: Record<string, string>,\n fallback?: string,\n ) => string | React.ReactNode;\n}\n\nexport const RegisteredFormChildren = ({\n children,\n register,\n componentTypes,\n errors = {},\n t,\n}: RegisteredFormChildrenProps): React.ReactNode => {\n const processChildren = (nodes: React.ReactNode): React.ReactNode => {\n return Children.map(nodes, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const childProps = child.props as {\n name?: string;\n children?: React.ReactNode;\n };\n\n if (\n componentTypes.some((type: React.ComponentType) => child.type === type)\n ) {\n const fieldName = childProps.name;\n const errorMessage = errors[fieldName ?? '']?.message?.toString();\n const translatedError = fieldName\n ? parseAndTranslate(errorMessage, fieldName, t)\n : undefined;\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n ).displayName;\n const shouldRegister =\n fieldName !== undefined &&\n !controllerDisplayNames.has(displayName ?? '');\n const registrationProps =\n shouldRegister && fieldName ? register(fieldName) : {};\n\n return cloneElement(child, {\n ...registrationProps,\n error: translatedError,\n } as Partial<typeof child.props>);\n }\n\n if (childProps.children) {\n return cloneElement(child, {\n children: processChildren(childProps.children),\n } as Partial<typeof child.props>);\n }\n\n return child;\n });\n };\n\n return <>{processChildren(children)}</>;\n};\n"],"mappings":"0IAYA,MAAM,EAAyB,IAAI,IAAI,CACrC,gBACA,gBACA,oBACA,cACA,gBACA,oBACA,kBACA,sBACA,cACA,iBACA,yBACA,gBACA,kBACA,mBACA,2BACD,CAAC,CAEI,GACJ,EACA,EACA,IAKuB,CAClB,KAEL,GAAI,CACF,IAAM,EAA6B,KAAK,MAAM,EAAQ,CAChD,EAAW,CAAE,GAAG,EAAO,SAAU,UAAW,EAAW,CACvD,EAAS,EACX,EAAE,EAAO,IAAK,EAAU,EAAO,SAAS,CACxC,EAAO,SACX,OAAO,OAAO,EAAO,CAAC,QAAQ,eAAgB,EAAU,MAClD,CACN,OAAO,EAAQ,QAAQ,eAAgB,EAAU,GAgBxC,GAA0B,CACrC,WACA,WACA,iBACA,SAAS,EAAE,CACX,OACkD,CAClD,IAAM,EAAmB,GAChB,EAAS,IAAI,EAAQ,GAAU,CACpC,GAAI,CAAC,EAAe,EAAM,CACxB,OAAO,EAGT,IAAM,EAAa,EAAM,MAKzB,GACE,EAAe,KAAM,GAA8B,EAAM,OAAS,EAAK,CACvE,CACA,IAAM,EAAY,EAAW,KACvB,EAAe,EAAO,GAAa,KAAK,SAAS,UAAU,CAC3D,EAAkB,EACpB,EAAkB,EAAc,EAAW,EAAE,CAC7C,IAAA,GACE,EACJ,EAAM,KACN,YAOF,OAAO,EAAa,EAAO,CACzB,GANA,IAAc,IAAA,IACd,CAAC,EAAuB,IAAI,GAAe,GAAG,EAE5B,EAAY,EAAS,EAAU,CAAG,EAAE,CAItD,MAAO,EACR,CAAgC,CASnC,OANI,EAAW,SACN,EAAa,EAAO,CACzB,SAAU,EAAgB,EAAW,SAAS,CAC/C,CAAgC,CAG5B,GACP,CAGJ,OAAO,EAAA,EAAA,CAAA,SAAG,EAAgB,EAAS,CAAI,CAAA"}
|
|
@@ -39,6 +39,7 @@ import { LoaderOval, LoaderOvalProps } from "./data-display/loader-oval/LoaderOv
|
|
|
39
39
|
import { LogoImage, LogoImageProps } from "./data-display/logos/logo-image/LogoImage.mjs";
|
|
40
40
|
import { LogoSvg, LogoSvgProps } from "./data-display/logos/logo-svg/LogoSvg.mjs";
|
|
41
41
|
import { NotificationBanner, NotificationBannerIntent, NotificationBannerProps } from "./data-display/notification-banner/NotificationBanner.mjs";
|
|
42
|
+
import { Progress, ProgressClassNames, ProgressProps } from "./data-display/progress/Progress.mjs";
|
|
42
43
|
import { RemovableItem, RemovableItemProps } from "./data-display/removable-item/RemovableItem.mjs";
|
|
43
44
|
import { ResourceItem, ResourceItemProps } from "./data-display/resource-item/ResourceItem.mjs";
|
|
44
45
|
import { Tag, TagProps } from "./data-display/tag/Tag.mjs";
|
|
@@ -68,6 +69,8 @@ import { Dropzone, DropzoneProps } from "./controls/dropzone/Dropzone.mjs";
|
|
|
68
69
|
import { DropzoneS3, DropzoneS3Props } from "./controls/dropzone/DropzoneS3.mjs";
|
|
69
70
|
import { FileInput, FileInputProps } from "./controls/file-input/FileInput.mjs";
|
|
70
71
|
import { FileInputMultiple, FileInputMultipleProps } from "./controls/file-input/FileInputMultiple.mjs";
|
|
72
|
+
import { FileInputS3, FileInputS3Handle, FileInputS3Props, UploadedS3File } from "./controls/file-input/FileInputS3.mjs";
|
|
73
|
+
import { FileInputMultipleS3, FileInputMultipleS3Handle, FileInputMultipleS3Props } from "./controls/file-input/FileInputMultipleS3.mjs";
|
|
71
74
|
import { PasswordInput, PasswordInputProps } from "./controls/password-input/PasswordInput.mjs";
|
|
72
75
|
import { PasswordRule, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps } from "./controls/password-input/PasswordStrengthInput.mjs";
|
|
73
76
|
import { PasswordRuleDefinition, usePasswordRules } from "./controls/password-input/usePasswordRules.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -39,6 +39,7 @@ import { LoaderOval, LoaderOvalProps } from "./components/data-display/loader-ov
|
|
|
39
39
|
import { LogoImage, LogoImageProps } from "./components/data-display/logos/logo-image/LogoImage.mjs";
|
|
40
40
|
import { LogoSvg, LogoSvgProps } from "./components/data-display/logos/logo-svg/LogoSvg.mjs";
|
|
41
41
|
import { NotificationBanner, NotificationBannerIntent, NotificationBannerProps } from "./components/data-display/notification-banner/NotificationBanner.mjs";
|
|
42
|
+
import { Progress, ProgressClassNames, ProgressProps } from "./components/data-display/progress/Progress.mjs";
|
|
42
43
|
import { RemovableItem, RemovableItemProps } from "./components/data-display/removable-item/RemovableItem.mjs";
|
|
43
44
|
import { ResourceItem, ResourceItemProps } from "./components/data-display/resource-item/ResourceItem.mjs";
|
|
44
45
|
import { Tag, TagProps } from "./components/data-display/tag/Tag.mjs";
|
|
@@ -68,6 +69,8 @@ import { Dropzone, DropzoneProps } from "./components/controls/dropzone/Dropzone
|
|
|
68
69
|
import { DropzoneS3, DropzoneS3Props } from "./components/controls/dropzone/DropzoneS3.mjs";
|
|
69
70
|
import { FileInput, FileInputProps } from "./components/controls/file-input/FileInput.mjs";
|
|
70
71
|
import { FileInputMultiple, FileInputMultipleProps } from "./components/controls/file-input/FileInputMultiple.mjs";
|
|
72
|
+
import { FileInputS3, FileInputS3Handle, FileInputS3Props, UploadedS3File } from "./components/controls/file-input/FileInputS3.mjs";
|
|
73
|
+
import { FileInputMultipleS3, FileInputMultipleS3Handle, FileInputMultipleS3Props } from "./components/controls/file-input/FileInputMultipleS3.mjs";
|
|
71
74
|
import { PasswordInput, PasswordInputProps } from "./components/controls/password-input/PasswordInput.mjs";
|
|
72
75
|
import { PasswordRule, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps } from "./components/controls/password-input/PasswordStrengthInput.mjs";
|
|
73
76
|
import { PasswordRuleDefinition, usePasswordRules } from "./components/controls/password-input/usePasswordRules.mjs";
|
|
@@ -96,4 +99,4 @@ import { Modals } from "./components/overlays/modal/index.mjs";
|
|
|
96
99
|
import { Toast, ToastIntent, ToastOptions, ToastProviderProps } from "./components/overlays/toast/Toast.mjs";
|
|
97
100
|
import { Tooltip, TooltipProps } from "./components/overlays/tooltip/Tooltip.mjs";
|
|
98
101
|
import { MageUiProvider, MageUiProviderProps } from "./providers/MageUiProvider.mjs";
|
|
99
|
-
export { Autocomplete, AutocompleteProps, Avatar, AvatarDropzone, AvatarDropzoneProps, AvatarDropzoneS3, AvatarDropzoneS3Props, AvatarProps, AvatarUpload, AvatarUploadProps, Badge, BadgeProps, Breadcrumbs, BreadcrumbsBarProps, BreadcrumbsProps, Button, ButtonAction, ButtonActionProps, ButtonIcon, ButtonIconProps, ButtonIconVisual, ButtonIconVisualProps, ButtonLoader, ButtonProps, ButtonVisual, ButtonVisualProps, Calendar, CalendarEvent, CalendarProps, CalendarView, Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardProps, CardRoot, Checkbox, CheckboxProps, CheckboxTree, CheckboxTreeItem, CheckboxTreeProps, ColumnDef, Combobox, ComboboxProps, DEFAULT_DATA_TABLE_LABELS, DataTable, DataTableBottomSlot, DataTableBottomSlotProps, DataTableClassNames, DataTableColumnMeta, DataTableContextProvider, DataTableContextValue, DataTableExpansionConfig, DataTableExtraColumnConfig, DataTableFeedback, DataTableFiltersConfig, DataTableLabels, DataTablePageSize, DataTablePageSizeProps, DataTablePagination, DataTablePaginationConfig, DataTablePaginationProps, DataTableProps, DataTableRecord, DataTableSearchConfig, DataTableSelectionConfig, DataTableSortingConfig, DataTableTableConfig, DataTableTopSlot, DataTableTopSlotProps, DateLocalizer, DatePicker, DatePickerClassNames, DatePickerDate, DatePickerProps, DatePickerValue, DateTimePicker, DateTimePickerClassNames, DateTimePickerDate, DateTimePickerProps, DateTimePickerValue, DescriptionList, DescriptionListClassNames, DescriptionListItemProps, DescriptionListProps, DocumentItem, DocumentItemProps, Dropzone, DropzoneProps, DropzoneS3, DropzoneS3Props, DropzoneS3Texts, ExpandedState, Fieldset, FieldsetProps, FileData, FileIcon, FileIconProps, FileInput, FileInputMultiple, FileInputMultipleProps, FileInputProps, FileMetadata, FluidGrid, FluidGridProps, Form, FormDropzoneS3Props, FormProps, FormS3Context, FormS3ContextValue, Grid, GridClassNames, HorizontalDivider, HorizontalDividerProps, Icon, IconProps, IconRaw, IconRawProps, IconSvg, IconSvgProps, IconWrapped, IconWrappedProps, Indicator, IndicatorProps, LoaderDot, LoaderDotProps, LoaderOval, LoaderOvalProps, LogoImage, LogoImageProps, LogoSvg, LogoSvgProps, MageUiProvider, MageUiProviderProps, Menu, MenuProps, Modal, ModalClassNames, ModalIntent, ModalProps, ModalRegistry, ModalRegistryEntry, ModalRootProps, Modals, NavigationMenu, NavigationMenuProps, NotificationBanner, NotificationBannerIntent, NotificationBannerProps, PASSWORD_RULES, Pagination, PaginationClassNames, PaginationRootProps, PaginationState, PasswordInput, PasswordInputProps, PasswordRule, PasswordRuleDefinition, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps, Radio, RadioProps, RemovableItem, RemovableItemProps, ResourceItem, ResourceItemProps, RowSelectionState, S3FileMeta, S3InitBody, S3InitResponse, S3UploadCallback, ScrollArea, ScrollAreaAutosize, ScrollAreaAutosizeProps, ScrollAreaClassNames, ScrollAreaProps, Select, SelectProps, Sidebar, SidebarClassNames, SidebarProps, SortingState, Switch, SwitchGroup, SwitchGroupProps, SwitchProps, Table, TableBodyProps, TableCaptionProps, TableCellProps, TableClassNames, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, Tag, TagGroup, TagGroupProps, TagProps, TextInput, TextInputProps, Textarea, TextareaProps, Toast, ToastIntent, ToastOptions, ToastProviderProps, Tooltip, TooltipProps, UploadTarget, UploadedFile, UploadedFileDetails, UploadedFileDetailsProps, UploadedFileProps, UploadedFiles, UploadedFilesClassNames, UploadedFilesItemClassNames, UploadedFilesItemProps, UploadedFilesProps, UploadingFiles, UploadingFilesClassNames, UploadingFilesItemClassNames, UploadingFilesItemErrorClassNames, UploadingFilesItemErrorProps, UploadingFilesItemProps, UploadingFilesProps, Virtual, VirtualItem, VirtualPadding, VirtualProps, VisuallyHidden, VisuallyHiddenProps, getFileExtension, useDataTableContext, useFormS3Context, usePasswordRules, z };
|
|
102
|
+
export { Autocomplete, AutocompleteProps, Avatar, AvatarDropzone, AvatarDropzoneProps, AvatarDropzoneS3, AvatarDropzoneS3Props, AvatarProps, AvatarUpload, AvatarUploadProps, Badge, BadgeProps, Breadcrumbs, BreadcrumbsBarProps, BreadcrumbsProps, Button, ButtonAction, ButtonActionProps, ButtonIcon, ButtonIconProps, ButtonIconVisual, ButtonIconVisualProps, ButtonLoader, ButtonProps, ButtonVisual, ButtonVisualProps, Calendar, CalendarEvent, CalendarProps, CalendarView, Card, CardBase, CardBody, CardClassNames, CardFooter, CardHeader, CardProps, CardRoot, Checkbox, CheckboxProps, CheckboxTree, CheckboxTreeItem, CheckboxTreeProps, ColumnDef, Combobox, ComboboxProps, DEFAULT_DATA_TABLE_LABELS, DataTable, DataTableBottomSlot, DataTableBottomSlotProps, DataTableClassNames, DataTableColumnMeta, DataTableContextProvider, DataTableContextValue, DataTableExpansionConfig, DataTableExtraColumnConfig, DataTableFeedback, DataTableFiltersConfig, DataTableLabels, DataTablePageSize, DataTablePageSizeProps, DataTablePagination, DataTablePaginationConfig, DataTablePaginationProps, DataTableProps, DataTableRecord, DataTableSearchConfig, DataTableSelectionConfig, DataTableSortingConfig, DataTableTableConfig, DataTableTopSlot, DataTableTopSlotProps, DateLocalizer, DatePicker, DatePickerClassNames, DatePickerDate, DatePickerProps, DatePickerValue, DateTimePicker, DateTimePickerClassNames, DateTimePickerDate, DateTimePickerProps, DateTimePickerValue, DescriptionList, DescriptionListClassNames, DescriptionListItemProps, DescriptionListProps, DocumentItem, DocumentItemProps, Dropzone, DropzoneProps, DropzoneS3, DropzoneS3Props, DropzoneS3Texts, ExpandedState, Fieldset, FieldsetProps, FileData, FileIcon, FileIconProps, FileInput, FileInputMultiple, FileInputMultipleProps, FileInputMultipleS3, FileInputMultipleS3Handle, FileInputMultipleS3Props, FileInputProps, FileInputS3, FileInputS3Handle, FileInputS3Props, FileMetadata, FluidGrid, FluidGridProps, Form, FormDropzoneS3Props, FormProps, FormS3Context, FormS3ContextValue, Grid, GridClassNames, HorizontalDivider, HorizontalDividerProps, Icon, IconProps, IconRaw, IconRawProps, IconSvg, IconSvgProps, IconWrapped, IconWrappedProps, Indicator, IndicatorProps, LoaderDot, LoaderDotProps, LoaderOval, LoaderOvalProps, LogoImage, LogoImageProps, LogoSvg, LogoSvgProps, MageUiProvider, MageUiProviderProps, Menu, MenuProps, Modal, ModalClassNames, ModalIntent, ModalProps, ModalRegistry, ModalRegistryEntry, ModalRootProps, Modals, NavigationMenu, NavigationMenuProps, NotificationBanner, NotificationBannerIntent, NotificationBannerProps, PASSWORD_RULES, Pagination, PaginationClassNames, PaginationRootProps, PaginationState, PasswordInput, PasswordInputProps, PasswordRule, PasswordRuleDefinition, PasswordSegment, PasswordStrengthInput, PasswordStrengthInputProps, Progress, ProgressClassNames, ProgressProps, Radio, RadioProps, RemovableItem, RemovableItemProps, ResourceItem, ResourceItemProps, RowSelectionState, S3FileMeta, S3InitBody, S3InitResponse, S3UploadCallback, ScrollArea, ScrollAreaAutosize, ScrollAreaAutosizeProps, ScrollAreaClassNames, ScrollAreaProps, Select, SelectProps, Sidebar, SidebarClassNames, SidebarProps, SortingState, Switch, SwitchGroup, SwitchGroupProps, SwitchProps, Table, TableBodyProps, TableCaptionProps, TableCellProps, TableClassNames, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, Tag, TagGroup, TagGroupProps, TagProps, TextInput, TextInputProps, Textarea, TextareaProps, Toast, ToastIntent, ToastOptions, ToastProviderProps, Tooltip, TooltipProps, UploadTarget, UploadedFile, UploadedFileDetails, UploadedFileDetailsProps, UploadedFileProps, UploadedFiles, UploadedFilesClassNames, UploadedFilesItemClassNames, UploadedFilesItemProps, UploadedFilesProps, UploadedS3File, UploadingFiles, UploadingFilesClassNames, UploadingFilesItemClassNames, UploadingFilesItemErrorClassNames, UploadingFilesItemErrorProps, UploadingFilesItemProps, UploadingFilesProps, Virtual, VirtualItem, VirtualPadding, VirtualProps, VisuallyHidden, VisuallyHiddenProps, getFileExtension, useDataTableContext, useFormS3Context, usePasswordRules, z };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as e}from"./components/buttons/button/Button.mjs";import{VisuallyHidden as t}from"./components/misc/visually-hidden/VisuallyHidden.mjs";import{ButtonAction as n}from"./components/buttons/button-action/ButtonAction.mjs";import{ButtonLoader as r}from"./components/buttons/button-action/ButtonLoader.mjs";import{Avatar as i}from"./components/data-display/avatar/Avatar.mjs";import{Badge as a}from"./components/data-display/badge/Badge.mjs";import{Tooltip as o}from"./components/overlays/tooltip/Tooltip.mjs";import{Calendar as s}from"./components/data-display/calendar/Calendar.mjs";import{Virtual as c}from"./components/misc/virtual/Virtual.mjs";import{ScrollArea as l}from"./components/misc/scroll-area/ScrollArea.mjs";import{Table as u}from"./components/data-display/table/Table.mjs";import{IconRaw as d}from"./components/data-display/icons/icon-raw/IconRaw.mjs";import{Icon as f}from"./components/data-display/icons/icon/Icon.mjs";import{DEFAULT_DATA_TABLE_LABELS as p,DataTableContextProvider as m,useDataTableContext as h}from"./components/data-display/datatables/useDataTableContext.mjs";import{Checkbox as g}from"./components/controls/checkbox/Checkbox.mjs";import{DataTable as _}from"./components/data-display/datatables/DataTable.mjs";import{HorizontalDivider as v}from"./components/misc/horizontal-divider/HorizontalDivider.mjs";import{ScrollAreaAutosize as y}from"./components/misc/scroll-area-autosize/ScrollAreaAutosize.mjs";import{TextInput as b}from"./components/controls/text-input/TextInput.mjs";import{IconWrapped as x}from"./components/data-display/icons/icon-wrapped/IconWrapped.mjs";import{Select as S}from"./components/controls/dropdown/select/Select.mjs";import{DataTablePageSize as C}from"./components/data-display/datatables/DataTablePageSize.mjs";import{Pagination as w}from"./components/navigations/pagination/Pagination.mjs";import{DataTablePagination as T}from"./components/data-display/datatables/DataTablePagination.mjs";import{DataTableBottomSlot as E}from"./components/data-display/datatables/DataTableBottomSlot.mjs";import{DataTableFeedback as D}from"./components/data-display/datatables/DataTableFeedback.mjs";import{DataTableTopSlot as O}from"./components/data-display/datatables/DataTableTopSlot.mjs";import{DescriptionList as k}from"./components/data-display/description-list/DescriptionList.mjs";import{FileIcon as A}from"./components/data-display/file-icon/FileIcon.mjs";import{ResourceItem as j}from"./components/data-display/resource-item/ResourceItem.mjs";import{DocumentItem as M}from"./components/data-display/document-item/DocumentItem.mjs";import{IconSvg as N}from"./components/data-display/icons/icon-svg/IconSvg.mjs";import{Indicator as P}from"./components/data-display/indicator/Indicator.mjs";import{LoaderDot as F}from"./components/data-display/loader-dot/LoaderDot.mjs";import{LoaderOval as I}from"./components/data-display/loader-oval/LoaderOval.mjs";import{LogoImage as L}from"./components/data-display/logos/logo-image/LogoImage.mjs";import{LogoSvg as R}from"./components/data-display/logos/logo-svg/LogoSvg.mjs";import{NotificationBanner as z}from"./components/data-display/notification-banner/NotificationBanner.mjs";import{
|
|
1
|
+
import{Button as e}from"./components/buttons/button/Button.mjs";import{VisuallyHidden as t}from"./components/misc/visually-hidden/VisuallyHidden.mjs";import{ButtonAction as n}from"./components/buttons/button-action/ButtonAction.mjs";import{ButtonLoader as r}from"./components/buttons/button-action/ButtonLoader.mjs";import{Avatar as i}from"./components/data-display/avatar/Avatar.mjs";import{Badge as a}from"./components/data-display/badge/Badge.mjs";import{Tooltip as o}from"./components/overlays/tooltip/Tooltip.mjs";import{Calendar as s}from"./components/data-display/calendar/Calendar.mjs";import{Virtual as c}from"./components/misc/virtual/Virtual.mjs";import{ScrollArea as l}from"./components/misc/scroll-area/ScrollArea.mjs";import{Table as u}from"./components/data-display/table/Table.mjs";import{IconRaw as d}from"./components/data-display/icons/icon-raw/IconRaw.mjs";import{Icon as f}from"./components/data-display/icons/icon/Icon.mjs";import{DEFAULT_DATA_TABLE_LABELS as p,DataTableContextProvider as m,useDataTableContext as h}from"./components/data-display/datatables/useDataTableContext.mjs";import{Checkbox as g}from"./components/controls/checkbox/Checkbox.mjs";import{DataTable as _}from"./components/data-display/datatables/DataTable.mjs";import{HorizontalDivider as v}from"./components/misc/horizontal-divider/HorizontalDivider.mjs";import{ScrollAreaAutosize as y}from"./components/misc/scroll-area-autosize/ScrollAreaAutosize.mjs";import{TextInput as b}from"./components/controls/text-input/TextInput.mjs";import{IconWrapped as x}from"./components/data-display/icons/icon-wrapped/IconWrapped.mjs";import{Select as S}from"./components/controls/dropdown/select/Select.mjs";import{DataTablePageSize as C}from"./components/data-display/datatables/DataTablePageSize.mjs";import{Pagination as w}from"./components/navigations/pagination/Pagination.mjs";import{DataTablePagination as T}from"./components/data-display/datatables/DataTablePagination.mjs";import{DataTableBottomSlot as E}from"./components/data-display/datatables/DataTableBottomSlot.mjs";import{DataTableFeedback as D}from"./components/data-display/datatables/DataTableFeedback.mjs";import{DataTableTopSlot as O}from"./components/data-display/datatables/DataTableTopSlot.mjs";import{DescriptionList as k}from"./components/data-display/description-list/DescriptionList.mjs";import{FileIcon as A}from"./components/data-display/file-icon/FileIcon.mjs";import{ResourceItem as j}from"./components/data-display/resource-item/ResourceItem.mjs";import{DocumentItem as M}from"./components/data-display/document-item/DocumentItem.mjs";import{IconSvg as N}from"./components/data-display/icons/icon-svg/IconSvg.mjs";import{Indicator as P}from"./components/data-display/indicator/Indicator.mjs";import{LoaderDot as F}from"./components/data-display/loader-dot/LoaderDot.mjs";import{LoaderOval as I}from"./components/data-display/loader-oval/LoaderOval.mjs";import{LogoImage as L}from"./components/data-display/logos/logo-image/LogoImage.mjs";import{LogoSvg as R}from"./components/data-display/logos/logo-svg/LogoSvg.mjs";import{NotificationBanner as z}from"./components/data-display/notification-banner/NotificationBanner.mjs";import{Progress as B}from"./components/data-display/progress/Progress.mjs";import{RemovableItem as V}from"./components/data-display/removable-item/RemovableItem.mjs";import{TagGroup as H}from"./components/data-display/tag-group/TagGroup.mjs";import{Tag as U}from"./components/data-display/tag/Tag.mjs";import{UploadedFile as W}from"./components/data-display/uploaded-file/UploadedFile.mjs";import{UploadedFileDetails as G}from"./components/data-display/uploaded-file/UploadedFileDetails.mjs";import{UploadedFiles as K}from"./components/data-display/uploaded-files/UploadedFiles.mjs";import{UploadingFiles as q}from"./components/data-display/uploading-files/UploadingFiles.mjs";import{ButtonIcon as J}from"./components/buttons/button-icon/ButtonIcon.mjs";import{ButtonIconVisual as Y}from"./components/buttons/button-icon-visual/ButtonIconVisual.mjs";import{ButtonVisual as X}from"./components/buttons/button-visual/ButtonVisual.mjs";import{Modal as Z}from"./components/overlays/modal/Modal.mjs";import{Modals as Q}from"./components/overlays/modal/index.mjs";import{Toast as $}from"./components/overlays/toast/Toast.mjs";import{AvatarUpload as ee}from"./components/controls/avatar-upload/AvatarUpload.mjs";import{CheckboxTree as te}from"./components/controls/checkbox-tree/CheckboxTree.mjs";import{DatePicker as ne}from"./components/controls/date-picker/DatePicker.mjs";import{DateTimePicker as re}from"./components/controls/date-time-picker/DateTimePicker.mjs";import{Autocomplete as ie}from"./components/controls/dropdown/autocomplete/Autocomplete.mjs";import{Combobox as ae}from"./components/controls/dropdown/combobox/Combobox.mjs";import{AvatarDropzone as oe}from"./components/controls/dropzone/avatar/AvatarDropzone.mjs";import{getFileExtension as se}from"./components/controls/dropzone/use-s3-upload.mjs";import{AvatarDropzoneS3 as ce}from"./components/controls/dropzone/avatar/AvatarDropzoneS3.mjs";import{Dropzone as le}from"./components/controls/dropzone/Dropzone.mjs";import{DropzoneS3 as ue}from"./components/controls/dropzone/DropzoneS3.mjs";import{FileInput as de}from"./components/controls/file-input/FileInput.mjs";import{FileInputMultiple as fe}from"./components/controls/file-input/FileInputMultiple.mjs";import{FileInputMultipleS3 as pe}from"./components/controls/file-input/FileInputMultipleS3.mjs";import{FileInputS3 as me}from"./components/controls/file-input/FileInputS3.mjs";import{PasswordInput as he}from"./components/controls/password-input/PasswordInput.mjs";import{PasswordStrengthInput as ge}from"./components/controls/password-input/PasswordStrengthInput.mjs";import{usePasswordRules as _e}from"./components/controls/password-input/usePasswordRules.mjs";import{Radio as ve}from"./components/controls/radio/Radio.mjs";import{SwitchGroup as ye}from"./components/controls/switch-group/SwitchGroup.mjs";import{Switch as be}from"./components/controls/switch/Switch.mjs";import{Textarea as xe}from"./components/controls/textarea/Textarea.mjs";import{FormS3Context as Se,useFormS3Context as Ce}from"./components/forms/FormS3Context.mjs";import{PASSWORD_RULES as we}from"./components/forms/rules/password-rules.mjs";import{z as Te}from"./components/forms/rules/zod.mjs";import{Form as Ee}from"./components/forms/Form.mjs";import{Fieldset as De}from"./components/forms/layout/Fieldset.mjs";import{Card as Oe,CardBase as ke,CardBody as Ae,CardFooter as je,CardHeader as Me,CardRoot as Ne}from"./components/layouts/card/Card.mjs";import{FluidGrid as Pe}from"./components/layouts/fluid-grid/FluidGrid.mjs";import{Grid as Fe}from"./components/layouts/grid/Grid.mjs";import{Breadcrumbs as Ie}from"./components/navigations/breadcrumbs/Breadcrumbs.mjs";import{Menu as Le}from"./components/navigations/menu/Menu.mjs";import{NavigationMenu as Re}from"./components/navigations/navigation-menu/NavigationMenu.mjs";import{Sidebar as ze}from"./components/navigations/sidebars/sidebar/Sidebar.mjs";import{MageUiProvider as Be}from"./providers/MageUiProvider.mjs";export{ie as Autocomplete,i as Avatar,oe as AvatarDropzone,ce as AvatarDropzoneS3,ee as AvatarUpload,a as Badge,Ie as Breadcrumbs,e as Button,n as ButtonAction,J as ButtonIcon,Y as ButtonIconVisual,r as ButtonLoader,X as ButtonVisual,s as Calendar,Oe as Card,ke as CardBase,Ae as CardBody,je as CardFooter,Me as CardHeader,Ne as CardRoot,g as Checkbox,te as CheckboxTree,ae as Combobox,p as DEFAULT_DATA_TABLE_LABELS,_ as DataTable,E as DataTableBottomSlot,m as DataTableContextProvider,D as DataTableFeedback,C as DataTablePageSize,T as DataTablePagination,O as DataTableTopSlot,ne as DatePicker,re as DateTimePicker,k as DescriptionList,M as DocumentItem,le as Dropzone,ue as DropzoneS3,De as Fieldset,A as FileIcon,de as FileInput,fe as FileInputMultiple,pe as FileInputMultipleS3,me as FileInputS3,Pe as FluidGrid,Ee as Form,Se as FormS3Context,Fe as Grid,v as HorizontalDivider,f as Icon,d as IconRaw,N as IconSvg,x as IconWrapped,P as Indicator,F as LoaderDot,I as LoaderOval,L as LogoImage,R as LogoSvg,Be as MageUiProvider,Le as Menu,Z as Modal,Q as Modals,Re as NavigationMenu,z as NotificationBanner,we as PASSWORD_RULES,w as Pagination,he as PasswordInput,ge as PasswordStrengthInput,B as Progress,ve as Radio,V as RemovableItem,j as ResourceItem,l as ScrollArea,y as ScrollAreaAutosize,S as Select,ze as Sidebar,be as Switch,ye as SwitchGroup,u as Table,U as Tag,H as TagGroup,b as TextInput,xe as Textarea,$ as Toast,o as Tooltip,W as UploadedFile,G as UploadedFileDetails,K as UploadedFiles,q as UploadingFiles,c as Virtual,t as VisuallyHidden,se as getFileExtension,h as useDataTableContext,Ce as useFormS3Context,_e as usePasswordRules,Te as z};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.162",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"rimraf": "^6.1.3",
|
|
26
26
|
"tsdown": "^0.21.4",
|
|
27
27
|
"typescript": "^5.9.3",
|
|
28
|
-
"@mage-ui/preset": "1.0.
|
|
28
|
+
"@mage-ui/preset": "1.0.162",
|
|
29
29
|
"@mage-ui/styled-system": "1.0.8"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|