@torq-north/react-tools 1.4.4 → 1.4.6
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/index.cjs +43 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +43 -19
- package/dist/index.es.js.map +1 -1
- package/dist/src/Form/Components/RadioFormField.d.ts +1 -1
- package/dist/src/Form/Types/commonFieldProps.d.ts +2 -1
- package/dist/src/Form/Utilities/renderSelectOptions.d.ts +5 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { FieldProps } from "react-final-form";
|
|
|
4
4
|
import { CommonFieldProps } from "../Types";
|
|
5
5
|
export interface RadioFormFieldOption {
|
|
6
6
|
value: string | number;
|
|
7
|
-
text?:
|
|
7
|
+
text?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export interface RadioFormFieldProps extends CommonFieldProps<{
|
|
10
10
|
radio?: RadioProps;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UseFieldConfig } from "react-final-form";
|
|
2
2
|
import { FieldWrapperProps } from "../Components";
|
|
3
3
|
import type { Validator } from "./Validator";
|
|
4
|
+
import React from "react";
|
|
4
5
|
export interface CommonFieldProps<AdditionalSlotProps = {}> extends Omit<FieldWrapperProps, "children"> {
|
|
5
6
|
name: string;
|
|
6
|
-
label?:
|
|
7
|
+
label?: React.ReactNode;
|
|
7
8
|
required?: boolean;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
helperText?: string;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export interface SelectFormFieldOption {
|
|
2
3
|
value?: number | string;
|
|
3
4
|
text: React.ReactNode;
|
|
4
|
-
subText?:
|
|
5
|
+
subText?: React.ReactNode;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface GroupedSelectFormFieldOptions {
|
|
8
|
-
group?:
|
|
9
|
+
group?: React.ReactNode;
|
|
9
10
|
options: (SelectFormFieldOption | string)[];
|
|
10
11
|
}
|
|
11
12
|
export declare function isGroup(o: SelectFormFieldOption | GroupedSelectFormFieldOptions | string): o is GroupedSelectFormFieldOptions;
|
|
12
|
-
export declare function renderSelectOptions(options: (SelectFormFieldOption | GroupedSelectFormFieldOptions | string)[]): (string | number | bigint | boolean |
|
|
13
|
-
export declare function renderCheckboxSelectOptions(options: (SelectFormFieldOption | GroupedSelectFormFieldOptions | string)[], values: (string | number | undefined)[]): (string | number | bigint | boolean |
|
|
13
|
+
export declare function renderSelectOptions(options: (SelectFormFieldOption | GroupedSelectFormFieldOptions | string)[]): (string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined)[];
|
|
14
|
+
export declare function renderCheckboxSelectOptions(options: (SelectFormFieldOption | GroupedSelectFormFieldOptions | string)[], values: (string | number | undefined)[]): (string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined)[];
|
|
14
15
|
export declare function buildCheckboxOption(option: string | SelectFormFieldOption | GroupedSelectFormFieldOptions, values: (string | number | undefined)[]): React.ReactNode | React.ReactNode[];
|