finform-react-builder 1.8.28 → 1.8.29
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/FinForm/inputs/FinCheckboxGroup.d.ts +34 -0
- package/dist/components/FinForm/inputs/FinRadioGroup.d.ts +1 -0
- package/dist/components/FinForm/inputs/index.d.ts +1 -0
- package/dist/components/FinForm/types.d.ts +18 -2
- package/dist/index.es.js +2642 -2380
- package/dist/index.js +36 -36
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FinCheckboxOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
}
|
|
6
|
+
export interface FinCheckboxGroupProps {
|
|
7
|
+
/** Optional section heading above the group */
|
|
8
|
+
labelText?: string;
|
|
9
|
+
/** The inner label for the checkbox group itself (accessible) */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** The currently selected values (array) */
|
|
12
|
+
value: (string | number)[];
|
|
13
|
+
/** The list of options */
|
|
14
|
+
options: FinCheckboxOption[];
|
|
15
|
+
/** Layout: 'row' | 'column' | number (for grid columns, e.g., 2, 3, 4) */
|
|
16
|
+
row?: boolean | number;
|
|
17
|
+
/** Handles change */
|
|
18
|
+
onChange: (values: (string | number)[]) => void;
|
|
19
|
+
/** Top heading or none */
|
|
20
|
+
labelPosition?: 'top' | 'none';
|
|
21
|
+
/** Typography variant for the heading */
|
|
22
|
+
labelVariant?: 'caption' | 'body2' | 'subtitle2' | 'h6';
|
|
23
|
+
/** Optional helper text under the group */
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/** Optional error state */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** Group padding multiplier */
|
|
28
|
+
groupPadding?: number;
|
|
29
|
+
/** Gap between checkbox options */
|
|
30
|
+
itemGap?: number;
|
|
31
|
+
/** Disabled state */
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare const FinCheckboxGroup: React.FC<FinCheckboxGroupProps>;
|
|
@@ -2,6 +2,7 @@ export * from './FinTextField';
|
|
|
2
2
|
export * from './FinSelect';
|
|
3
3
|
export * from './FinAutocomplete';
|
|
4
4
|
export * from './FinCheckbox';
|
|
5
|
+
export * from './FinCheckboxGroup';
|
|
5
6
|
export * from './FinSwitch';
|
|
6
7
|
export * from './FinRadioGroup';
|
|
7
8
|
export * from './FinDateField';
|
|
@@ -29,7 +29,7 @@ export interface BaseField {
|
|
|
29
29
|
title?: string;
|
|
30
30
|
name: string;
|
|
31
31
|
label: string;
|
|
32
|
-
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section' | 'component' | 'finuiHeader' | 'tabs' | 'grid' | 'listcards';
|
|
32
|
+
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'checkboxGroup' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section' | 'component' | 'finuiHeader' | 'tabs' | 'grid' | 'listcards';
|
|
33
33
|
placeholder?: string;
|
|
34
34
|
labelPosition?: 'inner' | 'top' | 'none';
|
|
35
35
|
labelVariant?: 'caption' | 'body2' | 'subtitle2' | 'h6';
|
|
@@ -97,7 +97,23 @@ export interface RadioField extends BaseField {
|
|
|
97
97
|
options: Array<{
|
|
98
98
|
label: string;
|
|
99
99
|
value: string | number;
|
|
100
|
+
description?: string;
|
|
100
101
|
}>;
|
|
102
|
+
row?: boolean;
|
|
103
|
+
groupPadding?: number;
|
|
104
|
+
itemGap?: number;
|
|
105
|
+
helperText?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CheckboxGroupField extends BaseField {
|
|
108
|
+
type: 'checkboxGroup';
|
|
109
|
+
options: Array<{
|
|
110
|
+
label: string;
|
|
111
|
+
value: string | number;
|
|
112
|
+
}>;
|
|
113
|
+
row?: boolean | number;
|
|
114
|
+
groupPadding?: number;
|
|
115
|
+
itemGap?: number;
|
|
116
|
+
helperText?: string;
|
|
101
117
|
}
|
|
102
118
|
export interface SwitchField extends BaseField {
|
|
103
119
|
type: 'switch';
|
|
@@ -298,7 +314,7 @@ export interface ListCardsField extends BaseField {
|
|
|
298
314
|
sx?: any;
|
|
299
315
|
cardSx?: any;
|
|
300
316
|
}
|
|
301
|
-
export type FieldConfig = TextField | NumberField | SelectField | CheckboxField | ToggleField | RadioField | SwitchField | AutocompleteField | DateField | ImageField | TitleField | SectionField | ComponentField | FinUiHeaderField | TabsField | GridField | ListCardsField;
|
|
317
|
+
export type FieldConfig = TextField | NumberField | SelectField | CheckboxField | CheckboxGroupField | ToggleField | RadioField | SwitchField | AutocompleteField | DateField | ImageField | TitleField | SectionField | ComponentField | FinUiHeaderField | TabsField | GridField | ListCardsField;
|
|
302
318
|
export interface FormButton {
|
|
303
319
|
text: string;
|
|
304
320
|
color?: string;
|