@maxischmaxi/maxforms-embed 0.0.15 → 0.0.17
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/FileUpload.d.ts.map +1 -1
- package/dist/components/Form.d.ts +1 -33
- package/dist/components/Form.d.ts.map +1 -1
- package/dist/components/blocks/DividerBlock.d.ts.map +1 -1
- package/dist/components/blocks/HeadingBlock.d.ts +0 -2
- package/dist/components/blocks/HeadingBlock.d.ts.map +1 -1
- package/dist/components/blocks/RowBlock.d.ts +0 -2
- package/dist/components/blocks/RowBlock.d.ts.map +1 -1
- package/dist/components/blocks/TextBlock.d.ts +0 -1
- package/dist/components/blocks/TextBlock.d.ts.map +1 -1
- package/dist/components/ui/alert.d.ts +5 -4
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +6 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +4 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +1 -2
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +4 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +4 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/hooks/useMaxForm.d.ts.map +1 -1
- package/dist/hooks/usePreviewForm.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/dateFormat.d.ts +47 -0
- package/dist/lib/dateFormat.d.ts.map +1 -0
- package/dist/lib/sanitize.d.ts +2 -0
- package/dist/lib/sanitize.d.ts.map +1 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/validation.d.ts.map +1 -1
- package/dist/maxforms-embed.css +0 -0
- package/dist/maxforms-embed.js +18374 -17329
- package/dist/maxforms-embed.js.map +1 -1
- package/dist/maxforms-embed.umd.cjs +822 -68
- package/dist/maxforms-embed.umd.cjs.map +1 -1
- package/dist/theme.d.ts +253 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../src/components/FileUpload.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../src/components/FileUpload.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AA0JD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,GACT,EAAE,eAAe,2CAoPjB"}
|
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { FormProps } from '../types';
|
|
3
|
-
|
|
4
|
-
* MaxForms embed form component with Zod validation and React Hook Form.
|
|
5
|
-
*
|
|
6
|
-
* Supports custom rendering for all field types and layout blocks through
|
|
7
|
-
* render props. If no custom renderer is provided, shadcn/ui components are used.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* // Basic usage
|
|
12
|
-
* <Form formId="abc123" apiKey="your-api-key" />
|
|
13
|
-
*
|
|
14
|
-
* // Preview mode (no API key needed, submission disabled)
|
|
15
|
-
* <Form
|
|
16
|
-
* formId="abc123"
|
|
17
|
-
* previewMode={true}
|
|
18
|
-
* previewData={formData}
|
|
19
|
-
* />
|
|
20
|
-
*
|
|
21
|
-
* // With custom renderers
|
|
22
|
-
* <Form
|
|
23
|
-
* formId="abc123"
|
|
24
|
-
* apiKey="your-api-key"
|
|
25
|
-
* renderInput={({ field, register, error }) => (
|
|
26
|
-
* <div>
|
|
27
|
-
* <input {...register(field.name)} className="my-input" />
|
|
28
|
-
* {error && <span className="error">{error.message}</span>}
|
|
29
|
-
* </div>
|
|
30
|
-
* )}
|
|
31
|
-
* />
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function Form({ formId, apiKey, baseUrl, onSubmit, onError, className, previewMode, previewData, renderInput, renderTextarea, renderSelect, renderCheckbox, renderRadio, renderEmail, renderNumber, renderDate, renderFile, renderHeading, renderTextBlock, renderDivider, renderRow, renderSubmit, renderFormError, renderFieldError, renderLoading, renderSuccess, renderFieldWrapper, }: FormProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Form({ formId, apiKey, baseUrl, onSubmit, onError, className, previewMode, previewData, forceValidation, hidePreviewBanner, theme: themeMode, renderInput, renderTextarea, renderSelect, renderCheckbox, renderRadio, renderEmail, renderNumber, renderDate, renderFile, renderHeading, renderTextBlock, renderDivider, renderRow, renderSubmit, renderFormError, renderFieldError, renderLoading, renderSuccess, renderFieldWrapper, }: FormProps): import("react/jsx-runtime").JSX.Element | null;
|
|
35
3
|
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/components/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/components/Form.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,SAAS,EAIV,MAAM,UAAU,CAAC;AAuSlB,wBAAgB,IAAI,CAAC,EACnB,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,SAAc,EACd,WAAmB,EACnB,WAAW,EACX,eAAuB,EACvB,iBAAyB,EACzB,KAAK,EAAE,SAAmB,EAC1B,WAAW,EACX,cAAc,EACd,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,eAAe,EACf,aAAa,EACb,SAAS,EACT,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,kBAAkB,GACnB,EAAE,SAAS,kDAsbX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DividerBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/DividerBlock.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DividerBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/DividerBlock.tsx"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAgB,YAAY,4CAE3B"}
|
|
@@ -4,8 +4,6 @@ export interface HeadingBlockProps {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Renders a heading block (H1, H2, or H3).
|
|
7
|
-
* The heading level is determined by block.level (defaults to 2).
|
|
8
|
-
* HTML tags in content are stripped since headings should be plain text.
|
|
9
7
|
*/
|
|
10
8
|
export declare function HeadingBlock({ block }: HeadingBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
11
9
|
//# sourceMappingURL=HeadingBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/HeadingBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadingBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/HeadingBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,SAAS,CAAC;CAClB;AAiCD;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAcxD"}
|
|
@@ -2,12 +2,10 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { FormBlock } from '@maxischmaxi/maxforms-api-client';
|
|
3
3
|
export interface RowBlockProps {
|
|
4
4
|
block: FormBlock;
|
|
5
|
-
/** Function to render a child block */
|
|
6
5
|
renderChild: (child: FormBlock) => ReactNode;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
9
8
|
* Renders a row block with multiple columns.
|
|
10
|
-
* The number of columns is determined by block.columns (defaults to 2).
|
|
11
9
|
*/
|
|
12
10
|
export declare function RowBlock({ block, renderChild }: RowBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
13
11
|
//# sourceMappingURL=RowBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/RowBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"RowBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/RowBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC;CAC9C;AAgBD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,aAAa,2CAa7D"}
|
|
@@ -4,7 +4,6 @@ export interface TextBlockProps {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Renders a text/paragraph block.
|
|
7
|
-
* The content can contain HTML from the rich text editor.
|
|
8
7
|
*/
|
|
9
8
|
export declare function TextBlock({ block }: TextBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
//# sourceMappingURL=TextBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/TextBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"TextBlock.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/TextBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIlE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,CAAC;CAClB;AAwCD;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,2CAUlD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type AlertVariant = "default" | "destructive" | "success" | "warning";
|
|
3
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
variant?: AlertVariant;
|
|
5
|
+
}
|
|
6
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
7
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
8
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
9
|
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AA0EtE,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/D,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,QAAA,MAAM,KAAK,mFAIV,CAAC;AAGF,QAAA,MAAM,UAAU,uHAG4C,CAAC;AAG7D,QAAA,MAAM,gBAAgB,yHAG4C,CAAC;AAGnE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
type ButtonVariant = "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
3
|
+
type ButtonSize = "default" | "sm" | "lg" | "icon";
|
|
4
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
8
7
|
asChild?: boolean;
|
|
9
8
|
}
|
|
10
9
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export { Button
|
|
10
|
+
export { Button };
|
|
12
11
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,aAAa,GACd,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AACX,KAAK,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAqHnD,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAUX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,QAAA,MAAM,IAAI,6GAG4C,CAAC;AAGvD,QAAA,MAAM,UAAU,6GAG4C,CAAC;AAG7D,QAAA,MAAM,SAAS,6GAG4C,CAAC;AAG5D,QAAA,MAAM,eAAe,6GAG4C,CAAC;AAGlE,QAAA,MAAM,WAAW,6GAG4C,CAAC;AAG9D,QAAA,MAAM,UAAU,6GAG4C,CAAC;AAG7D,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AA0C9D,QAAA,MAAM,QAAQ,iKASZ,CAAC;AAIH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
interface InputProps extends React.ComponentProps<"input"> {
|
|
3
|
+
$error?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
6
|
export { Input };
|
|
4
7
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsD/B,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,kGAIV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> &
|
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
4
|
export { Label };
|
|
6
5
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAexD,QAAA,MAAM,KAAK,yJAG4C,CAAC;AAIxD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AA+CnE,QAAA,MAAM,UAAU,+JAG4C,CAAC;AAG7D,QAAA,MAAM,cAAc,yKASlB,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -3,7 +3,10 @@ import * as SelectPrimitive from "@radix-ui/react-select";
|
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
4
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
-
|
|
6
|
+
interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
|
|
7
|
+
$error?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
10
|
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
11
|
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
12
|
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AACpC,QAAA,MAAM,WAAW,yGAAwB,CAAC;AAC1C,QAAA,MAAM,WAAW,0GAAwB,CAAC;AAoJ1C,UAAU,kBAAmB,SAAQ,KAAK,CAAC,wBAAwB,CACjE,OAAO,eAAe,CAAC,OAAO,CAC/B;IACC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,aAAa,8FAUjB,CAAC;AAGH,QAAA,MAAM,oBAAoB,qKAOxB,CAAC;AAGH,QAAA,MAAM,sBAAsB,uKAO1B,CAAC;AAGH,QAAA,MAAM,aAAa,8JAWjB,CAAC;AAGH,QAAA,MAAM,WAAW,4JAGsC,CAAC;AAGxD,QAAA,MAAM,UAAU,2JAYd,CAAC;AAGH,QAAA,MAAM,eAAe,gKAGsC,CAAC;AAG5D,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
interface TextareaProps extends React.ComponentProps<"textarea"> {
|
|
3
|
+
$error?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
3
6
|
export { Textarea };
|
|
4
7
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8C/B,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,QAAQ,wGAIb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMaxForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useMaxForm.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAY,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useMaxForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useMaxForm.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAY,MAAM,UAAU,CAAC;AAsB9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAoNvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreviewForm.d.ts","sourceRoot":"","sources":["../../src/hooks/usePreviewForm.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAGhB,eAAe,EAChB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"usePreviewForm.d.ts","sourceRoot":"","sources":["../../src/hooks/usePreviewForm.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAGhB,eAAe,EAChB,MAAM,UAAU,CAAC;AAYlB,UAAU,qBAAqB;IAC7B,WAAW,EAAE,eAAe,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,qBAAqB,GAC7B,gBAAgB,CAoKlB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Form } from './components/Form';
|
|
2
2
|
import { FileUpload, FileUploadProps } from './components/FileUpload';
|
|
3
3
|
import { useMaxForm } from './hooks/useMaxForm';
|
|
4
|
-
export type { FormProps, FormData, FormSettingsData, PreviewModeData, FieldRenderContext, FileFieldRenderContext, RenderInputFn, RenderTextareaFn, RenderSelectFn, RenderCheckboxFn, RenderRadioFn, RenderEmailFn, RenderNumberFn, RenderDateFn, RenderFileFn, RenderHeadingFn, RenderTextBlockFn, RenderDividerFn, RenderRowFn, RenderSubmitFn, RenderFormErrorFn, RenderFieldErrorFn, RenderLoadingFn, RenderSuccessFn, RenderFieldWrapperFn, SubmitRenderProps, UseMaxFormOptions, UseMaxFormReturn, } from './types';
|
|
4
|
+
export type { FormProps, FormData, FormSettingsData, PreviewModeData, ThemeMode, FieldRenderContext, FileFieldRenderContext, RenderInputFn, RenderTextareaFn, RenderSelectFn, RenderCheckboxFn, RenderRadioFn, RenderEmailFn, RenderNumberFn, RenderDateFn, RenderFileFn, RenderHeadingFn, RenderTextBlockFn, RenderDividerFn, RenderRowFn, RenderSubmitFn, RenderFormErrorFn, RenderFieldErrorFn, RenderLoadingFn, RenderSuccessFn, RenderFieldWrapperFn, SubmitRenderProps, UseMaxFormOptions, UseMaxFormReturn, } from './types';
|
|
5
5
|
export { Form };
|
|
6
6
|
export { FileUpload, type FileUploadProps };
|
|
7
7
|
export { useMaxForm };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,cAAc,CAAC;AAGtB,YAAY,EACV,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB,OAAO,EACL,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,MAAM,GAAG,WAAW,EAC9B,OAAO,EAAE,aAAa,GACrB,IAAI,CA0BN"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,cAAc,CAAC;AAGtB,YAAY,EACV,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB,OAAO,EACL,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,MAAM,GAAG,WAAW,EAC9B,OAAO,EAAE,aAAa,GACrB,IAAI,CA0BN"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date Format Utilities
|
|
3
|
+
* Handles parsing and formatting dates in various formats
|
|
4
|
+
*/
|
|
5
|
+
export type DateFormatType = "browser" | "YYYY-MM-DD" | "DD/MM/YYYY" | "MM/DD/YYYY" | "DD.MM.YYYY" | "DD-MM-YYYY" | "YYYY/MM/DD";
|
|
6
|
+
export interface DateFormatOption {
|
|
7
|
+
value: DateFormatType;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DateFormatConfig {
|
|
11
|
+
placeholder: string;
|
|
12
|
+
regex: RegExp;
|
|
13
|
+
parse: (value: string) => Date | null;
|
|
14
|
+
format: (date: Date) => string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Available date format options for dropdown
|
|
18
|
+
*/
|
|
19
|
+
export declare const DATE_FORMATS: DateFormatOption[];
|
|
20
|
+
/**
|
|
21
|
+
* Configuration for each date format (excluding browser locale)
|
|
22
|
+
*/
|
|
23
|
+
export declare const DATE_FORMAT_CONFIG: Record<Exclude<DateFormatType, "browser">, DateFormatConfig>;
|
|
24
|
+
/**
|
|
25
|
+
* Convert a value from a custom format to ISO (YYYY-MM-DD)
|
|
26
|
+
* Returns the original value if conversion fails
|
|
27
|
+
*/
|
|
28
|
+
export declare function toISO(value: string, format: DateFormatType): string;
|
|
29
|
+
/**
|
|
30
|
+
* Convert an ISO date (YYYY-MM-DD) to a custom format
|
|
31
|
+
* Returns the original value if conversion fails
|
|
32
|
+
*/
|
|
33
|
+
export declare function fromISO(isoValue: string, format: DateFormatType): string;
|
|
34
|
+
/**
|
|
35
|
+
* Check if a value matches the expected format
|
|
36
|
+
*/
|
|
37
|
+
export declare function isValidFormat(value: string, format: DateFormatType): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Parse a date value from any supported format
|
|
40
|
+
* Returns null if parsing fails
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseDate(value: string, format: DateFormatType): Date | null;
|
|
43
|
+
/**
|
|
44
|
+
* Get the placeholder for a date format
|
|
45
|
+
*/
|
|
46
|
+
export declare function getPlaceholder(format: DateFormatType): string;
|
|
47
|
+
//# sourceMappingURL=dateFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateFormat.d.ts","sourceRoot":"","sources":["../../src/lib/dateFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,EAQ1C,CAAC;AA2BF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC,EAClC,gBAAgB,CAkGjB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAYnE;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAaxE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAgB5E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAY5E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAI7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/lib/sanitize.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/lib/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/lib/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,kCAAkC,CAAC;AAQ7E;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,CAAC,CAAC,OAAO,CAiC5D;AAmUD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,EAAE,GAClB,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAQxC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,CAAC,CAAC,OAAO,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAiBA"}
|
|
File without changes
|