@fluentui/react-checkbox 9.0.0-beta.2 → 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 +331 -1
- package/CHANGELOG.md +75 -2
- package/Spec.md +25 -115
- package/dist/react-checkbox.d.ts +37 -46
- 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 +29 -34
- package/lib/components/Checkbox/renderCheckbox.d.ts +1 -1
- package/lib/components/Checkbox/renderCheckbox.js +11 -10
- package/lib/components/Checkbox/renderCheckbox.js.map +1 -1
- package/lib/components/Checkbox/useCheckbox.d.ts +5 -9
- package/lib/components/Checkbox/useCheckbox.js +99 -68
- package/lib/components/Checkbox/useCheckbox.js.map +1 -1
- package/lib/components/Checkbox/useCheckboxStyles.d.ts +2 -1
- package/lib/components/Checkbox/useCheckboxStyles.js +216 -159
- 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 +29 -34
- 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 -15
- package/lib-commonjs/components/Checkbox/renderCheckbox.js.map +1 -1
- package/lib-commonjs/components/Checkbox/useCheckbox.d.ts +5 -9
- package/lib-commonjs/components/Checkbox/useCheckbox.js +113 -73
- package/lib-commonjs/components/Checkbox/useCheckbox.js.map +1 -1
- package/lib-commonjs/components/Checkbox/useCheckboxStyles.d.ts +2 -1
- package/lib-commonjs/components/Checkbox/useCheckboxStyles.js +228 -163
- 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 -11
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
+
|
|
4
9
|
tslib_1.__exportStar(require("./Checkbox"), exports);
|
|
10
|
+
|
|
5
11
|
tslib_1.__exportStar(require("./Checkbox.types"), exports);
|
|
12
|
+
|
|
6
13
|
tslib_1.__exportStar(require("./renderCheckbox"), exports);
|
|
14
|
+
|
|
7
15
|
tslib_1.__exportStar(require("./useCheckbox"), exports);
|
|
16
|
+
|
|
8
17
|
tslib_1.__exportStar(require("./useCheckboxStyles"), exports);
|
|
9
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
|
|
@@ -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,18 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.renderCheckbox_unstable = void 0;
|
|
7
|
+
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
|
+
|
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
|
+
|
|
12
|
+
const renderCheckbox_unstable = state => {
|
|
13
|
+
const {
|
|
14
|
+
slots,
|
|
15
|
+
slotProps
|
|
16
|
+
} = react_utilities_1.getSlots(state);
|
|
17
|
+
return React.createElement(slots.root, { ...slotProps.root
|
|
18
|
+
}, state.labelPosition === 'before' && slots.label && React.createElement(slots.label, { ...slotProps.label
|
|
19
|
+
}), React.createElement(slots.indicator, { ...slotProps.indicator
|
|
20
|
+
}), React.createElement(slots.input, { ...slotProps.input
|
|
21
|
+
}), state.labelPosition === 'after' && slots.label && React.createElement(slots.label, { ...slotProps.label
|
|
22
|
+
}));
|
|
16
23
|
};
|
|
17
|
-
|
|
24
|
+
|
|
25
|
+
exports.renderCheckbox_unstable = renderCheckbox_unstable;
|
|
18
26
|
//# sourceMappingURL=renderCheckbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/renderCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;AAC9D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,aAAN,KAAwB,QAAxB,IAAoC,KAAK,CAAC,KAA1C,IAAmD,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,IAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJrD,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourceRoot":""}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { CheckboxProps,
|
|
3
|
-
/**
|
|
4
|
-
* Array of all shorthand properties listed as the keys of CheckboxSlots
|
|
5
|
-
*/
|
|
6
|
-
export declare const checkboxShorthandProps: Array<keyof CheckboxSlots>;
|
|
2
|
+
import { CheckboxProps, CheckboxState } from './Checkbox.types';
|
|
7
3
|
/**
|
|
8
4
|
* Create the state required to render Checkbox.
|
|
9
5
|
*
|
|
10
|
-
* The returned state can be modified with hooks such as
|
|
11
|
-
* before being passed to
|
|
6
|
+
* The returned state can be modified with hooks such as useCheckboxStyles_unstable,
|
|
7
|
+
* before being passed to renderCheckbox_unstable.
|
|
12
8
|
*
|
|
13
9
|
* @param props - props from this instance of Checkbox
|
|
14
|
-
* @param ref - reference to
|
|
10
|
+
* @param ref - reference to `<input>` element of Checkbox
|
|
15
11
|
*/
|
|
16
|
-
export declare const
|
|
12
|
+
export declare const useCheckbox_unstable: (props: CheckboxProps, ref: React.Ref<HTMLInputElement>) => CheckboxState;
|
|
@@ -1,84 +1,124 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useCheckbox_unstable = void 0;
|
|
7
|
+
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
|
+
|
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
|
+
|
|
12
|
+
const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
|
13
|
+
|
|
14
|
+
const react_label_1 = /*#__PURE__*/require("@fluentui/react-label");
|
|
13
15
|
/**
|
|
14
16
|
* Create the state required to render Checkbox.
|
|
15
17
|
*
|
|
16
|
-
* The returned state can be modified with hooks such as
|
|
17
|
-
* before being passed to
|
|
18
|
+
* The returned state can be modified with hooks such as useCheckboxStyles_unstable,
|
|
19
|
+
* before being passed to renderCheckbox_unstable.
|
|
18
20
|
*
|
|
19
21
|
* @param props - props from this instance of Checkbox
|
|
20
|
-
* @param ref - reference to
|
|
22
|
+
* @param ref - reference to `<input>` element of Checkbox
|
|
21
23
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
root: react_utilities_1.getNativeElementProps('div', tslib_1.__assign({ ref: ref }, props)),
|
|
54
|
-
};
|
|
55
|
-
state.input.checked = checked === true;
|
|
56
|
-
state.checked = checked ? checked : false;
|
|
57
|
-
if (state.indicator && !state.indicator.children) {
|
|
58
|
-
if (state.size === 'medium') {
|
|
59
|
-
state.indicator.children = checked === 'mixed' ? React.createElement(DefaultIcons_1.Mixed12Regular, null) : React.createElement(DefaultIcons_1.Checkmark12Regular, null);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
state.indicator.children = checked === 'mixed' ? React.createElement(DefaultIcons_1.Mixed16Regular, null) : React.createElement(DefaultIcons_1.Checkmark16Regular, null);
|
|
63
|
-
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const useCheckbox_unstable = (props, ref) => {
|
|
27
|
+
const {
|
|
28
|
+
disabled,
|
|
29
|
+
required,
|
|
30
|
+
circular = false,
|
|
31
|
+
size = 'medium',
|
|
32
|
+
labelPosition = 'after',
|
|
33
|
+
onChange
|
|
34
|
+
} = props;
|
|
35
|
+
const [checked, setChecked] = react_utilities_1.useControllableState({
|
|
36
|
+
defaultState: props.defaultChecked,
|
|
37
|
+
state: props.checked,
|
|
38
|
+
initialState: false
|
|
39
|
+
});
|
|
40
|
+
const nativeProps = react_utilities_1.getPartitionedNativeProps({
|
|
41
|
+
props,
|
|
42
|
+
primarySlotTagName: 'input',
|
|
43
|
+
excludedPropNames: ['checked', 'defaultChecked', 'size', 'onChange']
|
|
44
|
+
});
|
|
45
|
+
const mixed = checked === 'mixed';
|
|
46
|
+
const id = react_utilities_1.useId('checkbox-', nativeProps.primary.id);
|
|
47
|
+
let checkmarkIcon;
|
|
48
|
+
|
|
49
|
+
if (mixed) {
|
|
50
|
+
if (circular) {
|
|
51
|
+
checkmarkIcon = size === 'large' ? React.createElement(react_icons_1.Circle16Filled, null) : React.createElement(react_icons_1.Circle12Filled, null);
|
|
52
|
+
} else {
|
|
53
|
+
checkmarkIcon = size === 'large' ? React.createElement(react_icons_1.Square16Filled, null) : React.createElement(react_icons_1.Square12Filled, null);
|
|
64
54
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
55
|
+
} else {
|
|
56
|
+
checkmarkIcon = size === 'large' ? React.createElement(react_icons_1.Checkmark16Filled, null) : React.createElement(react_icons_1.Checkmark12Filled, null);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const state = {
|
|
60
|
+
circular,
|
|
61
|
+
checked,
|
|
62
|
+
size,
|
|
63
|
+
labelPosition,
|
|
64
|
+
components: {
|
|
65
|
+
root: 'span',
|
|
66
|
+
input: 'input',
|
|
67
|
+
indicator: 'div',
|
|
68
|
+
label: react_label_1.Label
|
|
69
|
+
},
|
|
70
|
+
root: react_utilities_1.resolveShorthand(props.root, {
|
|
71
|
+
required: true,
|
|
72
|
+
defaultProps: nativeProps.root
|
|
73
|
+
}),
|
|
74
|
+
input: react_utilities_1.resolveShorthand(props.input, {
|
|
75
|
+
required: true,
|
|
76
|
+
defaultProps: {
|
|
77
|
+
type: 'checkbox',
|
|
78
|
+
id,
|
|
79
|
+
ref,
|
|
80
|
+
checked: checked === true,
|
|
81
|
+
...nativeProps.primary
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
84
|
+
label: react_utilities_1.resolveShorthand(props.label, {
|
|
85
|
+
required: false,
|
|
86
|
+
defaultProps: {
|
|
87
|
+
htmlFor: id,
|
|
88
|
+
disabled,
|
|
89
|
+
required,
|
|
90
|
+
size: 'medium' // Even if the checkbox itself is large
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
indicator: react_utilities_1.resolveShorthand(props.indicator, {
|
|
95
|
+
required: true,
|
|
96
|
+
defaultProps: {
|
|
97
|
+
'aria-hidden': true,
|
|
98
|
+
children: checkmarkIcon
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
};
|
|
102
|
+
state.input.onChange = react_utilities_1.useEventCallback(ev => {
|
|
103
|
+
const val = ev.currentTarget.indeterminate ? 'mixed' : ev.currentTarget.checked;
|
|
104
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
|
|
105
|
+
checked: val
|
|
72
106
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
107
|
+
setChecked(val);
|
|
108
|
+
}); // Create a ref object for the input element so we can use it to set the indeterminate prop.
|
|
109
|
+
// Use useMergedRefs, since the ref might be undefined or a function-ref (no .current)
|
|
110
|
+
|
|
111
|
+
const inputRef = react_utilities_1.useMergedRefs(state.input.ref);
|
|
112
|
+
state.input.ref = inputRef; // Set the <input> element's checked and indeterminate properties based on our tri-state property.
|
|
113
|
+
// Since indeterminate can only be set via javascript, it has to be done in a layout effect.
|
|
114
|
+
|
|
115
|
+
react_utilities_1.useIsomorphicLayoutEffect(() => {
|
|
116
|
+
if (inputRef.current) {
|
|
117
|
+
inputRef.current.indeterminate = mixed;
|
|
118
|
+
}
|
|
119
|
+
}, [inputRef, mixed]);
|
|
120
|
+
return state;
|
|
82
121
|
};
|
|
83
|
-
|
|
122
|
+
|
|
123
|
+
exports.useCheckbox_unstable = useCheckbox_unstable;
|
|
84
124
|
//# sourceMappingURL=useCheckbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/useCheckbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAUA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAQA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAA0E;AAC5G,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA,QAAZ;AAAsB,IAAA,QAAQ,GAAG,KAAjC;AAAwC,IAAA,IAAI,GAAG,QAA/C;AAAyD,IAAA,aAAa,GAAG,OAAzE;AAAkF,IAAA;AAAlF,MAA+F,KAArG;AAEA,QAAM,CAAC,OAAD,EAAU,UAAV,IAAwB,iBAAA,CAAA,oBAAA,CAAqB;AACjD,IAAA,YAAY,EAAE,KAAK,CAAC,cA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CAAiB,aAAjB,GAAiC,OAAjC,GAA2C,EAAE,CAAC,aAAH,CAAiB,OAAxE;AACA,IAAA,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;AAAE,MAAA,OAAO,EAAE;AAAX,KAAP,CAAR;AACA,IAAA,UAAU,CAAC,GAAD,CAAV;AACD,GAJsB,CAAvB,CAxE4G,CA8E5G;AACA;;AACA,QAAM,QAAQ,GAAG,iBAAA,CAAA,aAAA,CAAc,KAAK,CAAC,KAAN,CAAY,GAA1B,CAAjB;AACA,EAAA,KAAK,CAAC,KAAN,CAAY,GAAZ,GAAkB,QAAlB,CAjF4G,CAmF5G;AACA;;AACA,EAAA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;AAC7B,QAAI,QAAQ,CAAC,OAAb,EAAsB;AACpB,MAAA,QAAQ,CAAC,OAAT,CAAiB,aAAjB,GAAiC,KAAjC;AACD;AACF,GAJD,EAIG,CAAC,QAAD,EAAW,KAAX,CAJH;AAMA,SAAO,KAAP;AACD,CA5FM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourceRoot":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CheckboxState } from './Checkbox.types';
|
|
2
|
+
export declare const checkboxClassName = "fui-Checkbox";
|
|
2
3
|
/**
|
|
3
4
|
* Apply styling to the Checkbox slots based on the state
|
|
4
5
|
*/
|
|
5
|
-
export declare const
|
|
6
|
+
export declare const useCheckboxStyles_unstable: (state: CheckboxState) => CheckboxState;
|