gantri-components 2.113.0 → 2.115.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/checkbox/checkbox.types.d.ts +5 -2
- package/dist/components/dropdown/dropdown.types.d.ts +3 -0
- package/dist/components/radio/radio.types.d.ts +4 -0
- package/dist/components/text-field/text-field.types.d.ts +3 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusEvent, JSXElementConstructor, MouseEventHandler } from 'react';
|
|
1
|
+
import { FocusEvent, JSXElementConstructor, MouseEventHandler, ReactElement } from 'react';
|
|
2
2
|
import { TextVariant, TypographyColor } from '../typography';
|
|
3
3
|
import { ErrorMessageType, FieldChangeEvent } from '../text-field';
|
|
4
4
|
export type CheckboxVariant = 'primary' | 'alert';
|
|
@@ -24,6 +24,9 @@ export interface CheckboxProps<T = boolean> {
|
|
|
24
24
|
labelPosition?: 'left' | 'right';
|
|
25
25
|
labelText?: string;
|
|
26
26
|
labelTx?: string;
|
|
27
|
+
labelTxComponents?: readonly ReactElement[] | {
|
|
28
|
+
readonly [tagName: string]: ReactElement;
|
|
29
|
+
};
|
|
27
30
|
labelVariant?: TextVariant;
|
|
28
31
|
name?: string;
|
|
29
32
|
onBlur?: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
@@ -34,6 +37,6 @@ export interface CheckboxProps<T = boolean> {
|
|
|
34
37
|
onSelected?: (value: T) => void;
|
|
35
38
|
variant?: CheckboxVariant;
|
|
36
39
|
}
|
|
37
|
-
export interface LabelContentProps extends Pick<CheckboxProps, 'labelText' | 'labelTx' | 'labelVariant' | 'labelColor' | 'Component' | 'labelHtmlText'> {
|
|
40
|
+
export interface LabelContentProps extends Pick<CheckboxProps, 'labelText' | 'labelTx' | 'labelTxComponents' | 'labelVariant' | 'labelColor' | 'Component' | 'labelHtmlText'> {
|
|
38
41
|
isChecked: boolean;
|
|
39
42
|
}
|
|
@@ -21,6 +21,9 @@ export interface DropdownProps<T> extends Omit<DropdownMenuProps<T>, 'items'> {
|
|
|
21
21
|
labelPosition?: LabelPosition;
|
|
22
22
|
labelText?: string;
|
|
23
23
|
labelTx?: string;
|
|
24
|
+
labelTxComponents?: readonly ReactElement[] | {
|
|
25
|
+
readonly [tagName: string]: ReactElement;
|
|
26
|
+
};
|
|
24
27
|
labelVariant?: ResolutionAwareProp<TextVariant>;
|
|
25
28
|
name?: string;
|
|
26
29
|
onBlur?: (event: BlurChangeEvent) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
import { TextVariant } from '../typography';
|
|
2
3
|
export type RadioVariant = 'primary' | 'alert';
|
|
3
4
|
export interface RadioProps {
|
|
@@ -7,6 +8,9 @@ export interface RadioProps {
|
|
|
7
8
|
labelPosition?: 'left' | 'right';
|
|
8
9
|
labelText?: string;
|
|
9
10
|
labelTx?: string;
|
|
11
|
+
labelTxComponents?: readonly ReactElement[] | {
|
|
12
|
+
[tagName: string]: ReactElement;
|
|
13
|
+
};
|
|
10
14
|
labelVariant?: TextVariant;
|
|
11
15
|
name: string;
|
|
12
16
|
onChange?: (event: any) => void;
|
|
@@ -31,6 +31,9 @@ export interface TextFieldProps {
|
|
|
31
31
|
labelPosition?: LabelPosition;
|
|
32
32
|
labelText?: string;
|
|
33
33
|
labelTx?: string;
|
|
34
|
+
labelTxComponents?: readonly ReactElement[] | {
|
|
35
|
+
readonly [tagName: string]: ReactElement;
|
|
36
|
+
};
|
|
34
37
|
labelTxValues?: Record<string, unknown>;
|
|
35
38
|
labelVariant?: ResolutionAwareProp<TextVariant>;
|
|
36
39
|
leftIcon?: ReactElement;
|