@fluentui/react-checkbox 9.0.0-beta.5 → 9.0.0-beta.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/CHANGELOG.json +156 -7
- package/CHANGELOG.md +35 -8
- package/Spec.md +25 -115
- package/dist/react-checkbox.d.ts +31 -27
- package/lib/components/Checkbox/Checkbox.d.ts +2 -1
- package/lib/components/Checkbox/Checkbox.js +10 -8
- package/lib/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/Checkbox/Checkbox.types.d.ts +25 -20
- package/lib/components/Checkbox/renderCheckbox.d.ts +1 -1
- package/lib/components/Checkbox/renderCheckbox.js +11 -8
- package/lib/components/Checkbox/renderCheckbox.js.map +1 -1
- package/lib/components/Checkbox/useCheckbox.d.ts +3 -3
- package/lib/components/Checkbox/useCheckbox.js +98 -75
- package/lib/components/Checkbox/useCheckbox.js.map +1 -1
- package/lib/components/Checkbox/useCheckboxStyles.d.ts +1 -1
- package/lib/components/Checkbox/useCheckboxStyles.js +215 -157
- package/lib/components/Checkbox/useCheckboxStyles.js.map +1 -1
- package/lib-commonjs/Checkbox.js +7 -2
- package/lib-commonjs/Checkbox.js.map +1 -1
- package/lib-commonjs/components/Checkbox/Checkbox.d.ts +2 -1
- package/lib-commonjs/components/Checkbox/Checkbox.js +20 -10
- package/lib-commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib-commonjs/components/Checkbox/Checkbox.types.d.ts +25 -20
- package/lib-commonjs/components/Checkbox/Checkbox.types.js +4 -1
- package/lib-commonjs/components/Checkbox/Checkbox.types.js.map +1 -1
- package/lib-commonjs/components/Checkbox/index.js +11 -2
- package/lib-commonjs/components/Checkbox/index.js.map +1 -1
- package/lib-commonjs/components/Checkbox/renderCheckbox.d.ts +1 -1
- package/lib-commonjs/components/Checkbox/renderCheckbox.js +23 -13
- package/lib-commonjs/components/Checkbox/renderCheckbox.js.map +1 -1
- package/lib-commonjs/components/Checkbox/useCheckbox.d.ts +3 -3
- package/lib-commonjs/components/Checkbox/useCheckbox.js +112 -80
- package/lib-commonjs/components/Checkbox/useCheckbox.js.map +1 -1
- package/lib-commonjs/components/Checkbox/useCheckboxStyles.d.ts +1 -1
- package/lib-commonjs/components/Checkbox/useCheckboxStyles.js +227 -161
- package/lib-commonjs/components/Checkbox/useCheckboxStyles.js.map +1 -1
- package/lib-commonjs/index.js +7 -2
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +11 -10
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/Checkbox/DefaultIcons.d.ts +0 -4
- package/lib/components/Checkbox/DefaultIcons.js +0 -10
- package/lib/components/Checkbox/DefaultIcons.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -16
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/Checkbox/DefaultIcons.d.ts +0 -4
- package/lib-commonjs/components/Checkbox/DefaultIcons.js +0 -17
- package/lib-commonjs/components/Checkbox/DefaultIcons.js.map +0 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { Label } from '@fluentui/react-label';
|
|
3
|
+
import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
|
4
|
+
interface CheckboxCommons {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Whether to render the checkbox in a circular shape instead of square.
|
|
7
|
+
* This variant is only recommended to be used in a tasks-style UI (checklist),
|
|
8
|
+
* since it otherwise could be confused for a `RadioItem`.
|
|
9
|
+
* @defaultvalue false
|
|
7
10
|
*/
|
|
8
|
-
circular: boolean
|
|
11
|
+
circular: boolean;
|
|
9
12
|
/**
|
|
10
13
|
* A checkbox's state can be controlled.
|
|
11
14
|
* @defaultvalue false
|
|
@@ -13,19 +16,14 @@ export interface CheckboxCommons {
|
|
|
13
16
|
checked: 'mixed' | boolean;
|
|
14
17
|
/**
|
|
15
18
|
* Checkbox supports two different checkbox sizes.
|
|
16
|
-
* @defaultvalue
|
|
19
|
+
* @defaultvalue medium
|
|
17
20
|
*/
|
|
18
21
|
size: 'medium' | 'large';
|
|
19
22
|
/**
|
|
20
23
|
* Determines whether the label should be positioned before or after the checkbox.
|
|
21
|
-
* @defaultvalue
|
|
24
|
+
* @defaultvalue after
|
|
22
25
|
*/
|
|
23
26
|
labelPosition: 'before' | 'after';
|
|
24
|
-
/**
|
|
25
|
-
* Field required to pass className to container instead of input
|
|
26
|
-
* this will be solved by https://github.com/microsoft/fluentui/pull/18983
|
|
27
|
-
*/
|
|
28
|
-
containerClassName?: string;
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
29
|
* Data for the onChange event for checkbox.
|
|
@@ -35,28 +33,36 @@ export interface CheckboxOnChangeData {
|
|
|
35
33
|
}
|
|
36
34
|
export declare type CheckboxSlots = {
|
|
37
35
|
/**
|
|
38
|
-
* The root element of the
|
|
36
|
+
* The root element of the Checkbox.
|
|
39
37
|
*
|
|
40
38
|
* The root slot receives the `className` and `style` specified directly on the `<Checkbox>`.
|
|
41
39
|
* All other native props will be applied to the primary slot: `input`
|
|
42
40
|
*/
|
|
43
|
-
root:
|
|
41
|
+
root: NonNullable<Slot<'span'>>;
|
|
42
|
+
/**
|
|
43
|
+
* The Checkbox's label.
|
|
44
|
+
*/
|
|
45
|
+
label?: Slot<typeof Label>;
|
|
44
46
|
/**
|
|
45
47
|
* Hidden input that handles the checkbox's functionality.
|
|
46
48
|
*
|
|
47
49
|
* This is the PRIMARY slot: all native properties specified directly on `<Checkbox>` will be applied to this slot,
|
|
48
50
|
* except `className` and `style`, which remain on the root slot.
|
|
49
51
|
*/
|
|
50
|
-
input:
|
|
52
|
+
input: NonNullable<Slot<'input'>>;
|
|
51
53
|
/**
|
|
52
54
|
* Renders the checkbox, with the checkmark icon as its child when checked.
|
|
53
55
|
*/
|
|
54
|
-
indicator:
|
|
56
|
+
indicator: Slot<'div'>;
|
|
55
57
|
};
|
|
56
58
|
/**
|
|
57
59
|
* Checkbox Props
|
|
58
60
|
*/
|
|
59
|
-
export declare type CheckboxProps = Omit<ComponentProps<CheckboxSlots
|
|
61
|
+
export declare type CheckboxProps = Omit<ComponentProps<Partial<CheckboxSlots>, 'input'>, 'size' | 'checked' | 'defaultChecked' | 'onChange'> & Partial<CheckboxCommons> & {
|
|
62
|
+
/**
|
|
63
|
+
* Checkboxes don't support children. To add a label, use the `label` prop.
|
|
64
|
+
*/
|
|
65
|
+
children?: never;
|
|
60
66
|
/**
|
|
61
67
|
* Callback to be called when the checked state value changes.
|
|
62
68
|
*/
|
|
@@ -69,6 +75,5 @@ export declare type CheckboxProps = Omit<ComponentProps<CheckboxSlots, 'input'>,
|
|
|
69
75
|
/**
|
|
70
76
|
* State used in rendering Checkbox
|
|
71
77
|
*/
|
|
72
|
-
export declare type CheckboxState = ComponentState<CheckboxSlots> & CheckboxCommons
|
|
73
|
-
|
|
74
|
-
};
|
|
78
|
+
export declare type CheckboxState = ComponentState<CheckboxSlots> & CheckboxCommons;
|
|
79
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CheckboxState } from './Checkbox.types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const renderCheckbox_unstable: (state: CheckboxState) => JSX.Element;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export const renderCheckbox_unstable = state => {
|
|
4
|
+
const {
|
|
5
|
+
slots,
|
|
6
|
+
slotProps
|
|
7
|
+
} = getSlots(state);
|
|
8
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
9
|
+
}, state.labelPosition === 'before' && slots.label && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
|
|
10
|
+
}), /*#__PURE__*/React.createElement(slots.indicator, { ...slotProps.indicator
|
|
11
|
+
}), /*#__PURE__*/React.createElement(slots.input, { ...slotProps.input
|
|
12
|
+
}), state.labelPosition === 'after' && slots.label && /*#__PURE__*/React.createElement(slots.label, { ...slotProps.label
|
|
13
|
+
}));
|
|
11
14
|
};
|
|
12
15
|
//# sourceMappingURL=renderCheckbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/renderCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAgB,KAAhB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,aAAN,KAAwB,QAAxB,IAAoC,KAAK,CAAC,KAA1C,iBAAmD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADtD,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAhB,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAHF,EAIG,KAAK,CAAC,aAAN,KAAwB,OAAxB,IAAmC,KAAK,CAAC,KAAzC,iBAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJrD,CADF;AAQD,CAXM","sourceRoot":""}
|
|
@@ -3,10 +3,10 @@ import { CheckboxProps, CheckboxState } from './Checkbox.types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render Checkbox.
|
|
5
5
|
*
|
|
6
|
-
* The returned state can be modified with hooks such as
|
|
7
|
-
* before being passed to
|
|
6
|
+
* The returned state can be modified with hooks such as useCheckboxStyles_unstable,
|
|
7
|
+
* before being passed to renderCheckbox_unstable.
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of Checkbox
|
|
10
10
|
* @param ref - reference to `<input>` element of Checkbox
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const useCheckbox_unstable: (props: CheckboxProps, ref: React.Ref<HTMLInputElement>) => CheckboxState;
|
|
@@ -1,88 +1,111 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect, useMergedRefs
|
|
3
|
-
import {
|
|
2
|
+
import { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect, useMergedRefs } from '@fluentui/react-utilities';
|
|
3
|
+
import { Checkmark12Filled, Checkmark16Filled, Square12Filled, Square16Filled, Circle12Filled, Circle16Filled } from '@fluentui/react-icons';
|
|
4
4
|
import { Label } from '@fluentui/react-label';
|
|
5
5
|
/**
|
|
6
6
|
* Create the state required to render Checkbox.
|
|
7
7
|
*
|
|
8
|
-
* The returned state can be modified with hooks such as
|
|
9
|
-
* before being passed to
|
|
8
|
+
* The returned state can be modified with hooks such as useCheckboxStyles_unstable,
|
|
9
|
+
* before being passed to renderCheckbox_unstable.
|
|
10
10
|
*
|
|
11
11
|
* @param props - props from this instance of Checkbox
|
|
12
12
|
* @param ref - reference to `<input>` element of Checkbox
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}),
|
|
44
|
-
input: resolveShorthand(props.input, {
|
|
45
|
-
required: true,
|
|
46
|
-
defaultProps: {
|
|
47
|
-
type: 'checkbox',
|
|
48
|
-
id: useId('checkbox-', nativeProps.primary.id),
|
|
49
|
-
ref,
|
|
50
|
-
checked: checked === true,
|
|
51
|
-
...nativeProps.primary,
|
|
52
|
-
},
|
|
53
|
-
}),
|
|
54
|
-
indicator: resolveShorthand(props.indicator, {
|
|
55
|
-
required: true,
|
|
56
|
-
}),
|
|
57
|
-
};
|
|
58
|
-
// Add the default checkmark icon if none was provided
|
|
59
|
-
if (!state.indicator.children) {
|
|
60
|
-
if (state.size === 'medium') {
|
|
61
|
-
state.indicator.children = checked === 'mixed' ? React.createElement(Mixed12Regular, null) : React.createElement(Checkmark12Regular, null);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
state.indicator.children = checked === 'mixed' ? React.createElement(Mixed16Regular, null) : React.createElement(Checkmark16Regular, null);
|
|
65
|
-
}
|
|
14
|
+
|
|
15
|
+
export const useCheckbox_unstable = (props, ref) => {
|
|
16
|
+
const {
|
|
17
|
+
disabled,
|
|
18
|
+
required,
|
|
19
|
+
circular = false,
|
|
20
|
+
size = 'medium',
|
|
21
|
+
labelPosition = 'after',
|
|
22
|
+
onChange
|
|
23
|
+
} = props;
|
|
24
|
+
const [checked, setChecked] = useControllableState({
|
|
25
|
+
defaultState: props.defaultChecked,
|
|
26
|
+
state: props.checked,
|
|
27
|
+
initialState: false
|
|
28
|
+
});
|
|
29
|
+
const nativeProps = getPartitionedNativeProps({
|
|
30
|
+
props,
|
|
31
|
+
primarySlotTagName: 'input',
|
|
32
|
+
excludedPropNames: ['checked', 'defaultChecked', 'size', 'onChange']
|
|
33
|
+
});
|
|
34
|
+
const mixed = checked === 'mixed';
|
|
35
|
+
const id = useId('checkbox-', nativeProps.primary.id);
|
|
36
|
+
let checkmarkIcon;
|
|
37
|
+
|
|
38
|
+
if (mixed) {
|
|
39
|
+
if (circular) {
|
|
40
|
+
checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Circle16Filled, null) : /*#__PURE__*/React.createElement(Circle12Filled, null);
|
|
41
|
+
} else {
|
|
42
|
+
checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Square16Filled, null) : /*#__PURE__*/React.createElement(Square12Filled, null);
|
|
66
43
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
44
|
+
} else {
|
|
45
|
+
checkmarkIcon = size === 'large' ? /*#__PURE__*/React.createElement(Checkmark16Filled, null) : /*#__PURE__*/React.createElement(Checkmark12Filled, null);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const state = {
|
|
49
|
+
circular,
|
|
50
|
+
checked,
|
|
51
|
+
size,
|
|
52
|
+
labelPosition,
|
|
53
|
+
components: {
|
|
54
|
+
root: 'span',
|
|
55
|
+
input: 'input',
|
|
56
|
+
indicator: 'div',
|
|
57
|
+
label: Label
|
|
58
|
+
},
|
|
59
|
+
root: resolveShorthand(props.root, {
|
|
60
|
+
required: true,
|
|
61
|
+
defaultProps: nativeProps.root
|
|
62
|
+
}),
|
|
63
|
+
input: resolveShorthand(props.input, {
|
|
64
|
+
required: true,
|
|
65
|
+
defaultProps: {
|
|
66
|
+
type: 'checkbox',
|
|
67
|
+
id,
|
|
68
|
+
ref,
|
|
69
|
+
checked: checked === true,
|
|
70
|
+
...nativeProps.primary
|
|
71
|
+
}
|
|
72
|
+
}),
|
|
73
|
+
label: resolveShorthand(props.label, {
|
|
74
|
+
required: false,
|
|
75
|
+
defaultProps: {
|
|
76
|
+
htmlFor: id,
|
|
77
|
+
disabled,
|
|
78
|
+
required,
|
|
79
|
+
size: 'medium' // Even if the checkbox itself is large
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
}),
|
|
83
|
+
indicator: resolveShorthand(props.indicator, {
|
|
84
|
+
required: true,
|
|
85
|
+
defaultProps: {
|
|
86
|
+
'aria-hidden': true,
|
|
87
|
+
children: checkmarkIcon
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
state.input.onChange = useEventCallback(ev => {
|
|
92
|
+
const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;
|
|
93
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
|
|
94
|
+
checked: val
|
|
73
95
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
96
|
+
setChecked(val);
|
|
97
|
+
}); // Create a ref object for the input element so we can use it to set the indeterminate prop.
|
|
98
|
+
// Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)
|
|
99
|
+
|
|
100
|
+
const inputRef = useMergedRefs(state.input.ref);
|
|
101
|
+
state.input.ref = inputRef; // Set the <input> element's checked and indeterminate properties based on our tri-state property.
|
|
102
|
+
// Since indeterminate can only be set via javascript, it has to be done in a layout effect.
|
|
103
|
+
|
|
104
|
+
useIsomorphicLayoutEffect(() => {
|
|
105
|
+
if (inputRef.current) {
|
|
106
|
+
inputRef.current.indeterminate = mixed;
|
|
107
|
+
}
|
|
108
|
+
}, [inputRef, mixed]);
|
|
109
|
+
return state;
|
|
87
110
|
};
|
|
88
111
|
//# sourceMappingURL=useCheckbox.js.map
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Root":""}
|
|
@@ -3,4 +3,4 @@ export declare const checkboxClassName = "fui-Checkbox";
|
|
|
3
3
|
/**
|
|
4
4
|
* Apply styling to the Checkbox slots based on the state
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const useCheckboxStyles_unstable: (state: CheckboxState) => CheckboxState;
|