@cntrl-site/components 1.0.0 → 1.0.1-alpha.0
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/Form/Form.d.ts +11 -2
- package/dist/index.js +235 -43
- package/dist/index.mjs +1946 -1617
- package/dist/types/SchemaV1.d.ts +18 -4
- package/package.json +1 -1
|
@@ -3,9 +3,10 @@ type FormProps = {
|
|
|
3
3
|
settings: FormSettings;
|
|
4
4
|
content?: unknown;
|
|
5
5
|
isEditor?: boolean;
|
|
6
|
+
activeEvent: string | undefined;
|
|
6
7
|
onUpdateSettings?: (settings: FormSettings) => void;
|
|
7
8
|
} & CommonComponentProps;
|
|
8
|
-
export declare function Form({ settings, isEditor, metadata }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Form({ settings, isEditor, metadata, activeEvent }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export type FormFieldType = 'text' | 'textarea' | 'phone' | 'email';
|
|
10
11
|
export type FormFieldItem = {
|
|
11
12
|
name: string;
|
|
@@ -15,7 +16,7 @@ export type FormFieldItem = {
|
|
|
15
16
|
};
|
|
16
17
|
type TextStyles = {
|
|
17
18
|
fontSettings: {
|
|
18
|
-
fontFamily
|
|
19
|
+
fontFamily?: string;
|
|
19
20
|
fontWeight: number;
|
|
20
21
|
fontStyle: string;
|
|
21
22
|
};
|
|
@@ -36,8 +37,11 @@ type Padding = {
|
|
|
36
37
|
bottom?: number;
|
|
37
38
|
left?: number;
|
|
38
39
|
};
|
|
40
|
+
type ColorKeys = 'inputColor' | 'inputTextColor' | 'inputBorderColor' | 'placeholderColor' | 'buttonColor' | 'buttonTextColor' | 'buttonBorderColor' | 'labelTextColor' | 'successColor' | 'errorColor';
|
|
41
|
+
type StateColorOverrides = Partial<Record<ColorKeys, string>>;
|
|
39
42
|
type FormSettings = {
|
|
40
43
|
type: 'A' | 'B' | 'C';
|
|
44
|
+
fontFamily: string;
|
|
41
45
|
fieldsToShow: number;
|
|
42
46
|
fields: FormFieldItem[];
|
|
43
47
|
buttonLabel?: string;
|
|
@@ -60,5 +64,10 @@ type FormSettings = {
|
|
|
60
64
|
buttonTextColor: string;
|
|
61
65
|
buttonBorderColor: string;
|
|
62
66
|
labelTextColor: string;
|
|
67
|
+
successColor: string;
|
|
68
|
+
errorColor: string;
|
|
69
|
+
successMessage: string;
|
|
70
|
+
errorMessage: string;
|
|
71
|
+
stateOverrides?: Record<string, StateColorOverrides>;
|
|
63
72
|
};
|
|
64
73
|
export {};
|