@fluentui/react-checkbox 9.0.21 → 9.0.23

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 CHANGED
@@ -2,7 +2,61 @@
2
2
  "name": "@fluentui/react-checkbox",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 18 Jan 2023 16:30:58 GMT",
5
+ "date": "Thu, 26 Jan 2023 13:27:42 GMT",
6
+ "tag": "@fluentui/react-checkbox_v9.0.23",
7
+ "version": "9.0.23",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "behowell@microsoft.com",
12
+ "package": "@fluentui/react-checkbox",
13
+ "commit": "d6e98c0b5390c5c7e03601537b2026307e01a8d4",
14
+ "comment": "Deprecate CheckboxField_unstable in favor of Field with Checkbox as its child."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-checkbox",
19
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.17",
20
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-checkbox",
25
+ "comment": "Bump @fluentui/react-label to v9.0.18",
26
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-checkbox",
31
+ "comment": "Bump @fluentui/react-tabster to v9.4.1",
32
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-checkbox",
37
+ "comment": "Bump @fluentui/react-utilities to v9.5.0",
38
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Mon, 23 Jan 2023 16:43:12 GMT",
45
+ "tag": "@fluentui/react-checkbox_v9.0.22",
46
+ "version": "9.0.22",
47
+ "comments": {
48
+ "patch": [
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-checkbox",
52
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.16",
53
+ "commit": "828c4260edc4fba07c9ccc8e94f15051c7fd25d3"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "date": "Wed, 18 Jan 2023 16:32:57 GMT",
6
60
  "tag": "@fluentui/react-checkbox_v9.0.21",
7
61
  "version": "9.0.21",
8
62
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,34 @@
1
1
  # Change Log - @fluentui/react-checkbox
2
2
 
3
- This log was last generated on Wed, 18 Jan 2023 16:30:58 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 26 Jan 2023 13:27:42 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.0.23)
8
+
9
+ Thu, 26 Jan 2023 13:27:42 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.0.22..@fluentui/react-checkbox_v9.0.23)
11
+
12
+ ### Patches
13
+
14
+ - Deprecate CheckboxField_unstable in favor of Field with Checkbox as its child. ([PR #26430](https://github.com/microsoft/fluentui/pull/26430) by behowell@microsoft.com)
15
+ - Bump @fluentui/react-field to v9.0.0-alpha.17 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
16
+ - Bump @fluentui/react-label to v9.0.18 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.4.1 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.5.0 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
19
+
20
+ ## [9.0.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.0.22)
21
+
22
+ Mon, 23 Jan 2023 16:43:12 GMT
23
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.0.21..@fluentui/react-checkbox_v9.0.22)
24
+
25
+ ### Patches
26
+
27
+ - Bump @fluentui/react-field to v9.0.0-alpha.16 ([PR #26434](https://github.com/microsoft/fluentui/pull/26434) by beachball)
28
+
7
29
  ## [9.0.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-checkbox_v9.0.21)
8
30
 
9
- Wed, 18 Jan 2023 16:30:58 GMT
31
+ Wed, 18 Jan 2023 16:32:57 GMT
10
32
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-checkbox_v9.0.20..@fluentui/react-checkbox_v9.0.21)
11
33
 
12
34
  ### Patches
package/dist/index.d.ts CHANGED
@@ -2,14 +2,13 @@
2
2
 
3
3
  import { ComponentProps } from '@fluentui/react-utilities';
4
4
  import { ComponentState } from '@fluentui/react-utilities';
5
- import { FieldControl } from '@fluentui/react-field';
6
- import type { FieldProps } from '@fluentui/react-field';
7
- import { FieldSlots } from '@fluentui/react-field';
8
- import { ForwardRefComponent } from '@fluentui/react-utilities';
5
+ import { DeprecatedFieldProps } from '@fluentui/react-field';
6
+ import { FieldProps } from '@fluentui/react-field';
7
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
9
8
  import { Label } from '@fluentui/react-label';
10
9
  import * as React_2 from 'react';
11
10
  import { Slot } from '@fluentui/react-utilities';
12
- import { SlotClassNames } from '@fluentui/react-utilities';
11
+ import type { SlotClassNames } from '@fluentui/react-utilities';
13
12
 
14
13
  /**
15
14
  * Checkboxes give people a way to select one or more items from a group,
@@ -19,20 +18,23 @@ export declare const Checkbox: ForwardRefComponent<CheckboxProps>;
19
18
 
20
19
  export declare const checkboxClassNames: SlotClassNames<CheckboxSlots>;
21
20
 
21
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
22
22
  export declare const CheckboxField_unstable: ForwardRefComponent<CheckboxFieldProps_unstable>;
23
23
 
24
- export declare const checkboxFieldClassNames: SlotClassNames<FieldSlots<FieldControl>>;
24
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
25
+ export declare const checkboxFieldClassNames: {
26
+ control: string;
27
+ root: string;
28
+ label: string;
29
+ validationMessage: string;
30
+ validationMessageIcon: string;
31
+ hint: string;
32
+ };
25
33
 
26
- export declare type CheckboxFieldProps_unstable = Omit<FieldProps<typeof Checkbox>, 'label'> & {
27
- /**
28
- * The Checkbox's label.
29
- */
34
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
35
+ export declare type CheckboxFieldProps_unstable = Omit<DeprecatedFieldProps<CheckboxProps>, 'label'> & {
30
36
  label?: CheckboxProps['label'];
31
- /**
32
- * The label for the CheckboxField, which appears above or before the Checkbox, depending on the `orientation` prop.
33
- * It is recommended to only set the `label` prop, and not `fieldLabel`.
34
- */
35
- fieldLabel?: FieldProps<typeof Checkbox>['label'];
37
+ fieldLabel?: FieldProps['label'];
36
38
  };
37
39
 
38
40
  /**
@@ -1,32 +1,19 @@
1
- import * as React from 'react';
2
- import { getFieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from '@fluentui/react-field';
3
- import { Checkbox } from '../../Checkbox';
4
- export const checkboxFieldClassNames = /*#__PURE__*/getFieldClassNames('CheckboxField');
5
- export const CheckboxField = /*#__PURE__*/React.forwardRef((props, ref) => {
6
- const {
7
- fieldLabel,
8
- required,
9
- label,
10
- control,
11
- ...restOfProps
12
- } = props;
13
- props = {
14
- // Use the fieldLabel prop as the Field's label
15
- label: fieldLabel,
16
- // Use the label prop as the Checkbox's label
1
+ /* eslint-disable deprecation/deprecation */
2
+ import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
3
+ import { Checkbox, checkboxClassNames } from '../../Checkbox';
4
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
5
+ export const checkboxFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(checkboxClassNames.root);
6
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
7
+ export const CheckboxField = /*#__PURE__*/makeDeprecatedField(Checkbox, {
8
+ mapProps: props => ({
9
+ ...props,
10
+ label: props.fieldLabel,
11
+ required: undefined,
17
12
  control: {
18
- label,
19
- required,
20
- ...control
21
- },
22
- ...restOfProps
23
- };
24
- const state = useField_unstable(props, ref, {
25
- component: Checkbox,
26
- classNames: checkboxFieldClassNames
27
- });
28
- useFieldStyles_unstable(state);
29
- return renderField_unstable(state);
13
+ ...props.control,
14
+ required: props.required,
15
+ label: props.label
16
+ }
17
+ })
30
18
  });
31
- CheckboxField.displayName = 'CheckboxField';
32
19
  //# sourceMappingURL=CheckboxField.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC,kBAAkB,EAClBC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,QACZ,uBAAuB;AAG9B,SAASC,QAAQ,QAAQ,gBAAgB;AAezC,OAAO,MAAMC,uBAAuB,gBAAGL,kBAAkB,CAAC,eAAe,CAAC;AAE1E,OAAO,MAAMM,aAAa,gBAA4CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,OAAO;IAAE,GAAGC;EAAW,CAAE,GAAGN,KAAK;EAEtEA,KAAK,GAAG;IACN;IACAI,KAAK,EAAEF,UAAU;IACjB;IACAG,OAAO,EAAE;MAAED,KAAK;MAAED,QAAQ;MAAE,GAAGE;IAAO,CAAE;IACxC,GAAGC;GACJ;EAED,MAAMC,KAAK,GAAGZ,iBAAiB,CAACK,KAAK,EAAEC,GAAG,EAAE;IAAEO,SAAS,EAAEZ,QAAQ;IAAEa,UAAU,EAAEZ;EAAuB,CAAE,CAAC;EACzGH,uBAAuB,CAACa,KAAK,CAAC;EAC9B,OAAOd,oBAAoB,CAACc,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFT,aAAa,CAACY,WAAW,GAAG,eAAe","names":["React","getFieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","Checkbox","checkboxFieldClassNames","CheckboxField","forwardRef","props","ref","fieldLabel","required","label","control","restOfProps","state","component","classNames","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/components/CheckboxField/CheckboxField.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CheckboxProps } from '../../Checkbox';\nimport { Checkbox } from '../../Checkbox';\n\nexport type CheckboxFieldProps = Omit<FieldProps<typeof Checkbox>, 'label'> & {\n /**\n * The Checkbox's label.\n */\n label?: CheckboxProps['label'];\n\n /**\n * The label for the CheckboxField, which appears above or before the Checkbox, depending on the `orientation` prop.\n * It is recommended to only set the `label` prop, and not `fieldLabel`.\n */\n fieldLabel?: FieldProps<typeof Checkbox>['label'];\n};\n\nexport const checkboxFieldClassNames = getFieldClassNames('CheckboxField');\n\nexport const CheckboxField: ForwardRefComponent<CheckboxFieldProps> = React.forwardRef((props, ref) => {\n const { fieldLabel, required, label, control, ...restOfProps } = props;\n\n props = {\n // Use the fieldLabel prop as the Field's label\n label: fieldLabel,\n // Use the label prop as the Checkbox's label\n control: { label, required, ...control },\n ...restOfProps,\n };\n\n const state = useField_unstable(props, ref, { component: Checkbox, classNames: checkboxFieldClassNames });\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nCheckboxField.displayName = 'CheckboxField';\n"]}
1
+ {"version":3,"mappings":"AAAA;AACA,SAGEA,4BAA4B,EAC5BC,mBAAmB,QACd,uBAAuB;AAE9B,SAASC,QAAQ,EAAEC,kBAAkB,QAAuB,gBAAgB;AAQ5E;AACA,OAAO,MAAMC,uBAAuB,gBAAGJ,4BAA4B,CAACG,kBAAkB,CAACE,IAAI,CAAC;AAE5F;AACA,OAAO,MAAMC,aAAa,gBAA4CL,mBAAmB,CAACC,QAAQ,EAAE;EAClGK,QAAQ,EAAGC,KAAyB,KAAM;IACxC,GAAGA,KAAK;IACRC,KAAK,EAAED,KAAK,CAACE,UAAU;IACvBC,QAAQ,EAAEC,SAAS;IACnBC,OAAO,EAAE;MAAE,GAAGL,KAAK,CAACK,OAAO;MAAEF,QAAQ,EAAEH,KAAK,CAACG,QAAQ;MAAEF,KAAK,EAAED,KAAK,CAACC;IAAK;GAC1E;CACF,CAAC","names":["getDeprecatedFieldClassNames","makeDeprecatedField","Checkbox","checkboxClassNames","checkboxFieldClassNames","root","CheckboxField","mapProps","props","label","fieldLabel","required","undefined","control"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/components/CheckboxField/CheckboxField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport {\n DeprecatedFieldProps,\n FieldProps,\n getDeprecatedFieldClassNames,\n makeDeprecatedField,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Checkbox, checkboxClassNames, CheckboxProps } from '../../Checkbox';\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport type CheckboxFieldProps = Omit<DeprecatedFieldProps<CheckboxProps>, 'label'> & {\n label?: CheckboxProps['label'];\n fieldLabel?: FieldProps['label'];\n};\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport const checkboxFieldClassNames = getDeprecatedFieldClassNames(checkboxClassNames.root);\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport const CheckboxField: ForwardRefComponent<CheckboxFieldProps> = makeDeprecatedField(Checkbox, {\n mapProps: (props: CheckboxFieldProps) => ({\n ...props,\n label: props.fieldLabel,\n required: undefined,\n control: { ...props.control, required: props.required, label: props.label },\n }),\n});\n"]}
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { Checkbox, checkboxClassNames, renderCheckbox_unstable, useCheckboxStyles_unstable, useCheckbox_unstable } from './Checkbox';
2
+ // eslint-disable-next-line deprecation/deprecation
2
3
  export { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';
3
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,YAAY;AAGnB,SAASC,aAAa,IAAIC,sBAAsB,EAAEC,uBAAuB,QAAQ,iBAAiB","names":["Checkbox","checkboxClassNames","renderCheckbox_unstable","useCheckboxStyles_unstable","useCheckbox_unstable","CheckboxField","CheckboxField_unstable","checkboxFieldClassNames"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/index.ts"],"sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n\nexport { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';\nexport type { CheckboxFieldProps as CheckboxFieldProps_unstable } from './CheckboxField';\n"]}
1
+ {"version":3,"mappings":"AAAA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,YAAY;AAGnB;AACA,SAASC,aAAa,IAAIC,sBAAsB,EAAEC,uBAAuB,QAAQ,iBAAiB","names":["Checkbox","checkboxClassNames","renderCheckbox_unstable","useCheckboxStyles_unstable","useCheckbox_unstable","CheckboxField","CheckboxField_unstable","checkboxFieldClassNames"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/index.ts"],"sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { CheckboxFieldProps as CheckboxFieldProps_unstable } from './CheckboxField';\n"]}
@@ -1,19 +1,12 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-field", "../../Checkbox"], function (require, exports, tslib_1, React, react_field_1, Checkbox_1) {
1
+ define(["require", "exports", "tslib", "@fluentui/react-field", "../../Checkbox"], function (require, exports, tslib_1, react_field_1, Checkbox_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.CheckboxField = exports.checkboxFieldClassNames = void 0;
5
- exports.checkboxFieldClassNames = react_field_1.getFieldClassNames('CheckboxField');
6
- exports.CheckboxField = React.forwardRef(function (props, ref) {
7
- var fieldLabel = props.fieldLabel, required = props.required, label = props.label, control = props.control, restOfProps = tslib_1.__rest(props, ["fieldLabel", "required", "label", "control"]);
8
- props = tslib_1.__assign({
9
- // Use the fieldLabel prop as the Field's label
10
- label: fieldLabel,
11
- // Use the label prop as the Checkbox's label
12
- control: tslib_1.__assign({ label: label, required: required }, control) }, restOfProps);
13
- var state = react_field_1.useField_unstable(props, ref, { component: Checkbox_1.Checkbox, classNames: exports.checkboxFieldClassNames });
14
- react_field_1.useFieldStyles_unstable(state);
15
- return react_field_1.renderField_unstable(state);
5
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
6
+ exports.checkboxFieldClassNames = react_field_1.getDeprecatedFieldClassNames(Checkbox_1.checkboxClassNames.root);
7
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
8
+ exports.CheckboxField = react_field_1.makeDeprecatedField(Checkbox_1.Checkbox, {
9
+ mapProps: function (props) { return (tslib_1.__assign(tslib_1.__assign({}, props), { label: props.fieldLabel, required: undefined, control: tslib_1.__assign(tslib_1.__assign({}, props.control), { required: props.required, label: props.label }) })); },
16
10
  });
17
- exports.CheckboxField.displayName = 'CheckboxField';
18
11
  });
19
12
  //# sourceMappingURL=CheckboxField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxField.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-checkbox/src/components/CheckboxField/CheckboxField.tsx"],"names":[],"mappings":";;;;IAyBa,QAAA,uBAAuB,GAAG,gCAAkB,CAAC,eAAe,CAAC,CAAC;IAE9D,QAAA,aAAa,GAA4C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACxF,IAAA,UAAU,GAA+C,KAAK,WAApD,EAAE,QAAQ,GAAqC,KAAK,SAA1C,EAAE,KAAK,GAA8B,KAAK,MAAnC,EAAE,OAAO,GAAqB,KAAK,QAA1B,EAAK,WAAW,kBAAK,KAAK,EAAhE,8CAAwD,CAAF,CAAW;QAEvE,KAAK;YACH,+CAA+C;YAC/C,KAAK,EAAE,UAAU;YACjB,6CAA6C;YAC7C,OAAO,qBAAI,KAAK,OAAA,EAAE,QAAQ,UAAA,IAAK,OAAO,KACnC,WAAW,CACf,CAAC;QAEF,IAAM,KAAK,GAAG,+BAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,mBAAQ,EAAE,UAAU,EAAE,+BAAuB,EAAE,CAAC,CAAC;QAC1G,qCAAuB,CAAC,KAAK,CAAC,CAAC;QAC/B,OAAO,kCAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CheckboxProps } from '../../Checkbox';\nimport { Checkbox } from '../../Checkbox';\n\nexport type CheckboxFieldProps = Omit<FieldProps<typeof Checkbox>, 'label'> & {\n /**\n * The Checkbox's label.\n */\n label?: CheckboxProps['label'];\n\n /**\n * The label for the CheckboxField, which appears above or before the Checkbox, depending on the `orientation` prop.\n * It is recommended to only set the `label` prop, and not `fieldLabel`.\n */\n fieldLabel?: FieldProps<typeof Checkbox>['label'];\n};\n\nexport const checkboxFieldClassNames = getFieldClassNames('CheckboxField');\n\nexport const CheckboxField: ForwardRefComponent<CheckboxFieldProps> = React.forwardRef((props, ref) => {\n const { fieldLabel, required, label, control, ...restOfProps } = props;\n\n props = {\n // Use the fieldLabel prop as the Field's label\n label: fieldLabel,\n // Use the label prop as the Checkbox's label\n control: { label, required, ...control },\n ...restOfProps,\n };\n\n const state = useField_unstable(props, ref, { component: Checkbox, classNames: checkboxFieldClassNames });\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nCheckboxField.displayName = 'CheckboxField';\n"]}
1
+ {"version":3,"file":"CheckboxField.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-checkbox/src/components/CheckboxField/CheckboxField.tsx"],"names":[],"mappings":";;;;IAgBA,kFAAkF;IACrE,QAAA,uBAAuB,GAAG,0CAA4B,CAAC,6BAAkB,CAAC,IAAI,CAAC,CAAC;IAE7F,kFAAkF;IACrE,QAAA,aAAa,GAA4C,iCAAmB,CAAC,mBAAQ,EAAE;QAClG,QAAQ,EAAE,UAAC,KAAyB,IAAK,OAAA,uCACpC,KAAK,KACR,KAAK,EAAE,KAAK,CAAC,UAAU,EACvB,QAAQ,EAAE,SAAS,EACnB,OAAO,wCAAO,KAAK,CAAC,OAAO,KAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,OACzE,EALuC,CAKvC;KACH,CAAC,CAAC","sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport {\n DeprecatedFieldProps,\n FieldProps,\n getDeprecatedFieldClassNames,\n makeDeprecatedField,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Checkbox, checkboxClassNames, CheckboxProps } from '../../Checkbox';\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport type CheckboxFieldProps = Omit<DeprecatedFieldProps<CheckboxProps>, 'label'> & {\n label?: CheckboxProps['label'];\n fieldLabel?: FieldProps['label'];\n};\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport const checkboxFieldClassNames = getDeprecatedFieldClassNames(checkboxClassNames.root);\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport const CheckboxField: ForwardRefComponent<CheckboxFieldProps> = makeDeprecatedField(Checkbox, {\n mapProps: (props: CheckboxFieldProps) => ({\n ...props,\n label: props.fieldLabel,\n required: undefined,\n control: { ...props.control, required: props.required, label: props.label },\n }),\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-checkbox/src/index.ts"],"names":[],"mappings":";;;;IACE,oGAAA,QAAQ,OAAA;IACR,8GAAA,kBAAkB,OAAA;IAClB,mHAAA,uBAAuB,OAAA;IACvB,sHAAA,0BAA0B,OAAA;IAC1B,gHAAA,oBAAoB,OAAA;IAIb,uHAAA,aAAa,OAA0B;IAAE,wHAAA,uBAAuB,OAAA","sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n\nexport { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';\nexport type { CheckboxFieldProps as CheckboxFieldProps_unstable } from './CheckboxField';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-checkbox/src/index.ts"],"names":[],"mappings":";;;;IACE,oGAAA,QAAQ,OAAA;IACR,8GAAA,kBAAkB,OAAA;IAClB,mHAAA,uBAAuB,OAAA;IACvB,sHAAA,0BAA0B,OAAA;IAC1B,gHAAA,oBAAoB,OAAA;IAKb,uHAAA,aAAa,OAA0B;IAAE,wHAAA,uBAAuB,OAAA","sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { CheckboxFieldProps as CheckboxFieldProps_unstable } from './CheckboxField';\n"]}
@@ -4,35 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CheckboxField = exports.checkboxFieldClassNames = void 0;
7
- const React = /*#__PURE__*/require("react");
7
+ /* eslint-disable deprecation/deprecation */
8
8
  const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
9
9
  const Checkbox_1 = /*#__PURE__*/require("../../Checkbox");
10
- exports.checkboxFieldClassNames = /*#__PURE__*/react_field_1.getFieldClassNames('CheckboxField');
11
- exports.CheckboxField = /*#__PURE__*/React.forwardRef((props, ref) => {
12
- const {
13
- fieldLabel,
14
- required,
15
- label,
16
- control,
17
- ...restOfProps
18
- } = props;
19
- props = {
20
- // Use the fieldLabel prop as the Field's label
21
- label: fieldLabel,
22
- // Use the label prop as the Checkbox's label
10
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
11
+ exports.checkboxFieldClassNames = /*#__PURE__*/react_field_1.getDeprecatedFieldClassNames(Checkbox_1.checkboxClassNames.root);
12
+ /** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */
13
+ exports.CheckboxField = /*#__PURE__*/react_field_1.makeDeprecatedField(Checkbox_1.Checkbox, {
14
+ mapProps: props => ({
15
+ ...props,
16
+ label: props.fieldLabel,
17
+ required: undefined,
23
18
  control: {
24
- label,
25
- required,
26
- ...control
27
- },
28
- ...restOfProps
29
- };
30
- const state = react_field_1.useField_unstable(props, ref, {
31
- component: Checkbox_1.Checkbox,
32
- classNames: exports.checkboxFieldClassNames
33
- });
34
- react_field_1.useFieldStyles_unstable(state);
35
- return react_field_1.renderField_unstable(state);
19
+ ...props.control,
20
+ required: props.required,
21
+ label: props.label
22
+ }
23
+ })
36
24
  });
37
- exports.CheckboxField.displayName = 'CheckboxField';
38
25
  //# sourceMappingURL=CheckboxField.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAEA;AAQA;AAeaA,+BAAuB,gBAAGC,gCAAkB,CAAC,eAAe,CAAC;AAE7DD,qBAAa,gBAA4CE,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,OAAO;IAAE,GAAGC;EAAW,CAAE,GAAGN,KAAK;EAEtEA,KAAK,GAAG;IACN;IACAI,KAAK,EAAEF,UAAU;IACjB;IACAG,OAAO,EAAE;MAAED,KAAK;MAAED,QAAQ;MAAE,GAAGE;IAAO,CAAE;IACxC,GAAGC;GACJ;EAED,MAAMC,KAAK,GAAGV,+BAAiB,CAACG,KAAK,EAAEC,GAAG,EAAE;IAAEO,SAAS,EAAEC,mBAAQ;IAAEC,UAAU,EAAEd;EAAuB,CAAE,CAAC;EACzGC,qCAAuB,CAACU,KAAK,CAAC;EAC9B,OAAOV,kCAAoB,CAACU,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFX,qBAAa,CAACe,WAAW,GAAG,eAAe","names":["exports","react_field_1","React","forwardRef","props","ref","fieldLabel","required","label","control","restOfProps","state","component","Checkbox_1","classNames","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/components/CheckboxField/CheckboxField.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CheckboxProps } from '../../Checkbox';\nimport { Checkbox } from '../../Checkbox';\n\nexport type CheckboxFieldProps = Omit<FieldProps<typeof Checkbox>, 'label'> & {\n /**\n * The Checkbox's label.\n */\n label?: CheckboxProps['label'];\n\n /**\n * The label for the CheckboxField, which appears above or before the Checkbox, depending on the `orientation` prop.\n * It is recommended to only set the `label` prop, and not `fieldLabel`.\n */\n fieldLabel?: FieldProps<typeof Checkbox>['label'];\n};\n\nexport const checkboxFieldClassNames = getFieldClassNames('CheckboxField');\n\nexport const CheckboxField: ForwardRefComponent<CheckboxFieldProps> = React.forwardRef((props, ref) => {\n const { fieldLabel, required, label, control, ...restOfProps } = props;\n\n props = {\n // Use the fieldLabel prop as the Field's label\n label: fieldLabel,\n // Use the label prop as the Checkbox's label\n control: { label, required, ...control },\n ...restOfProps,\n };\n\n const state = useField_unstable(props, ref, { component: Checkbox, classNames: checkboxFieldClassNames });\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nCheckboxField.displayName = 'CheckboxField';\n"]}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAOA;AAQA;AACaA,+BAAuB,gBAAGC,0CAA4B,CAACC,6BAAkB,CAACC,IAAI,CAAC;AAE5F;AACaH,qBAAa,gBAA4CC,iCAAmB,CAACC,mBAAQ,EAAE;EAClGE,QAAQ,EAAGC,KAAyB,KAAM;IACxC,GAAGA,KAAK;IACRC,KAAK,EAAED,KAAK,CAACE,UAAU;IACvBC,QAAQ,EAAEC,SAAS;IACnBC,OAAO,EAAE;MAAE,GAAGL,KAAK,CAACK,OAAO;MAAEF,QAAQ,EAAEH,KAAK,CAACG,QAAQ;MAAEF,KAAK,EAAED,KAAK,CAACC;IAAK;GAC1E;CACF,CAAC","names":["exports","react_field_1","Checkbox_1","root","mapProps","props","label","fieldLabel","required","undefined","control"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/components/CheckboxField/CheckboxField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport {\n DeprecatedFieldProps,\n FieldProps,\n getDeprecatedFieldClassNames,\n makeDeprecatedField,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Checkbox, checkboxClassNames, CheckboxProps } from '../../Checkbox';\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport type CheckboxFieldProps = Omit<DeprecatedFieldProps<CheckboxProps>, 'label'> & {\n label?: CheckboxProps['label'];\n fieldLabel?: FieldProps['label'];\n};\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport const checkboxFieldClassNames = getDeprecatedFieldClassNames(checkboxClassNames.root);\n\n/** @deprecated Use Field with a Checkbox inside: `<Field><Checkbox /></Field>` */\nexport const CheckboxField: ForwardRefComponent<CheckboxFieldProps> = makeDeprecatedField(Checkbox, {\n mapProps: (props: CheckboxFieldProps) => ({\n ...props,\n label: props.fieldLabel,\n required: undefined,\n control: { ...props.control, required: props.required, label: props.label },\n }),\n});\n"]}
@@ -35,6 +35,7 @@ Object.defineProperty(exports, "useCheckbox_unstable", {
35
35
  return Checkbox_1.useCheckbox_unstable;
36
36
  }
37
37
  });
38
+ // eslint-disable-next-line deprecation/deprecation
38
39
  var CheckboxField_1 = /*#__PURE__*/require("./CheckboxField");
39
40
  Object.defineProperty(exports, "CheckboxField_unstable", {
40
41
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,0BAAQ;EAAA;AAAA;AACRF;EAAAC;EAAAC;IAAA,oCAAkB;EAAA;AAAA;AAClBF;EAAAC;EAAAC;IAAA,yCAAuB;EAAA;AAAA;AACvBF;EAAAC;EAAAC;IAAA,4CAA0B;EAAA;AAAA;AAC1BF;EAAAC;EAAAC;IAAA,sCAAoB;EAAA;AAAA;AAItB;AAASF;EAAAC;EAAAC;IAAA,oCAAa;EAAA;AAAA;AAA4BF;EAAAC;EAAAC;IAAA,8CAAuB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/index.ts"],"sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n\nexport { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';\nexport type { CheckboxFieldProps as CheckboxFieldProps_unstable } from './CheckboxField';\n"]}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,0BAAQ;EAAA;AAAA;AACRF;EAAAC;EAAAC;IAAA,oCAAkB;EAAA;AAAA;AAClBF;EAAAC;EAAAC;IAAA,yCAAuB;EAAA;AAAA;AACvBF;EAAAC;EAAAC;IAAA,4CAA0B;EAAA;AAAA;AAC1BF;EAAAC;EAAAC;IAAA,sCAAoB;EAAA;AAAA;AAItB;AACA;AAASF;EAAAC;EAAAC;IAAA,oCAAa;EAAA;AAAA;AAA4BF;EAAAC;EAAAC;IAAA,8CAAuB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-checkbox/src/index.ts"],"sourcesContent":["export {\n Checkbox,\n checkboxClassNames,\n renderCheckbox_unstable,\n useCheckboxStyles_unstable,\n useCheckbox_unstable,\n} from './Checkbox';\nexport type { CheckboxOnChangeData, CheckboxProps, CheckboxSlots, CheckboxState } from './Checkbox';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { CheckboxField as CheckboxField_unstable, checkboxFieldClassNames } from './CheckboxField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { CheckboxFieldProps as CheckboxFieldProps_unstable } from './CheckboxField';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-checkbox",
3
- "version": "9.0.21",
3
+ "version": "9.0.23",
4
4
  "description": "Fluent UI checkbox component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,12 +32,12 @@
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-field": "9.0.0-alpha.15",
35
+ "@fluentui/react-field": "9.0.0-alpha.17",
36
36
  "@fluentui/react-icons": "^2.0.175",
37
- "@fluentui/react-label": "^9.0.17",
38
- "@fluentui/react-tabster": "^9.4.0",
37
+ "@fluentui/react-label": "^9.0.18",
38
+ "@fluentui/react-tabster": "^9.4.1",
39
39
  "@fluentui/react-theme": "^9.1.5",
40
- "@fluentui/react-utilities": "^9.4.0",
40
+ "@fluentui/react-utilities": "^9.5.0",
41
41
  "@griffel/react": "^1.5.2",
42
42
  "tslib": "^2.1.0"
43
43
  },