@sb1/ffe-form-react 21.1.26 → 22.0.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-form-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "React component for form elements in ffe",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"@sb1/ffe-collapse-react": "^5.1.0",
|
|
30
30
|
"@sb1/ffe-form": "^30.2.0",
|
|
31
31
|
"@sb1/ffe-icons-react": "^11.0.14",
|
|
32
|
-
"@types/uuid": "^9.0.0",
|
|
33
32
|
"classnames": "^2.3.1"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
@@ -44,5 +43,5 @@
|
|
|
44
43
|
"publishConfig": {
|
|
45
44
|
"access": "public"
|
|
46
45
|
},
|
|
47
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "da52d15a74d3dc8ef4674c07bd11b447c245cac2"
|
|
48
47
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TooltipProps } from './Tooltip';
|
|
3
|
+
import { SelectedRadioValue } from './types';
|
|
3
4
|
export interface BaseRadioButtonProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'value'> {
|
|
4
5
|
/** Additional props passed to the label element */
|
|
5
6
|
labelProps?: React.ComponentProps<'label'>;
|
|
6
7
|
/** The selected value of the radio button set */
|
|
7
|
-
selectedValue?:
|
|
8
|
+
selectedValue?: SelectedRadioValue;
|
|
8
9
|
/** The value of the radio button */
|
|
9
|
-
value:
|
|
10
|
+
value: string;
|
|
10
11
|
/** Tooltip providing further detail about the choice */
|
|
11
12
|
tooltip?: string;
|
|
12
13
|
tooltipProps?: TooltipProps;
|
package/types/RadioBlock.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { SelectedRadioValue } from './types';
|
|
2
3
|
export interface RadioBlockProps extends React.ComponentPropsWithoutRef<'input'> {
|
|
3
|
-
/** Whether
|
|
4
|
+
/** Whether the radio block is selected */
|
|
4
5
|
checked?: boolean;
|
|
5
6
|
/** The always visible label of the radio block */
|
|
6
7
|
label: React.ReactNode;
|
|
@@ -9,8 +10,8 @@ export interface RadioBlockProps extends React.ComponentPropsWithoutRef<'input'>
|
|
|
9
10
|
/** The name of the radio button set */
|
|
10
11
|
name: string;
|
|
11
12
|
/** The selected value of the radio button set */
|
|
12
|
-
selectedValue?:
|
|
13
|
-
/** Whether
|
|
13
|
+
selectedValue?: SelectedRadioValue;
|
|
14
|
+
/** Whether children are always visible */
|
|
14
15
|
showChildren?: boolean;
|
|
15
16
|
/** The value of the radio block */
|
|
16
17
|
value: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { SelectedRadioValue } from './types';
|
|
2
3
|
export interface RadioButtonInputGroupProps extends Omit<React.ComponentPropsWithoutRef<'fieldset'>, 'children' | 'onChange'> {
|
|
3
4
|
/**
|
|
4
5
|
* Function receiving props relevant to each radio button as an object
|
|
@@ -9,7 +10,7 @@ export interface RadioButtonInputGroupProps extends Omit<React.ComponentPropsWit
|
|
|
9
10
|
inline?: boolean;
|
|
10
11
|
name: string;
|
|
11
12
|
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
12
|
-
selectedValue?:
|
|
13
|
+
selectedValue?: SelectedRadioValue;
|
|
13
14
|
onColoredBg?: boolean;
|
|
14
15
|
}) => React.ReactNode;
|
|
15
16
|
/** Additional class names applied to the fieldset */
|
|
@@ -41,7 +42,7 @@ export interface RadioButtonInputGroupProps extends Omit<React.ComponentPropsWit
|
|
|
41
42
|
/** Change handler, receives value of selected radio button */
|
|
42
43
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
43
44
|
/** The currently selected value */
|
|
44
|
-
selectedValue?:
|
|
45
|
+
selectedValue?: SelectedRadioValue;
|
|
45
46
|
/**
|
|
46
47
|
* String or Tooltip component with further detail about the radio button
|
|
47
48
|
* set
|
package/types/RadioSwitch.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { SelectedRadioValue } from './types';
|
|
3
3
|
export interface RadioSwitchProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'value'> {
|
|
4
4
|
/** Additional class names applied to both radio buttons */
|
|
5
5
|
className?: string;
|
|
6
6
|
/** The label of the choice to the left */
|
|
7
7
|
leftLabel: string;
|
|
8
8
|
/** The value of the choice to the left */
|
|
9
|
-
leftValue:
|
|
9
|
+
leftValue: string /** Ref-setting function, or ref created by useRef, passed to the input element */;
|
|
10
10
|
/** Ref to left radio */
|
|
11
11
|
leftInnerRef?: React.Ref<HTMLInputElement>;
|
|
12
12
|
/** The label of the choice to the right */
|
|
13
13
|
rightLabel: string;
|
|
14
14
|
/** The value of the choice to the right */
|
|
15
|
-
rightValue:
|
|
15
|
+
rightValue: string;
|
|
16
16
|
/** Ref to right radio */
|
|
17
17
|
rightInnerRef?: React.Ref<HTMLInputElement>;
|
|
18
18
|
/** The selected value of the radio button set */
|
|
19
|
-
selectedValue?:
|
|
19
|
+
selectedValue?: SelectedRadioValue;
|
|
20
20
|
/** Condensed modifier. Use in condensed designs */
|
|
21
21
|
condensed?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export declare const RadioSwitch: React.FC<RadioSwitchProps>;
|
|
24
|
-
export {};
|
package/types/types.d.ts
CHANGED