@fluentui/react-migration-v8-v9 9.7.13 → 9.8.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/CHANGELOG.md +20 -2
- package/lib/components/Checkbox/shimCheckboxProps.js +1 -1
- package/lib/components/Checkbox/shimCheckboxProps.js.map +1 -1
- package/lib-commonjs/components/Checkbox/shimCheckboxProps.js +1 -1
- package/lib-commonjs/components/Checkbox/shimCheckboxProps.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v8-v9
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 13 Jun 2025 12:30:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.8.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.8.1)
|
|
8
|
+
|
|
9
|
+
Fri, 13 Jun 2025 12:30:20 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.8.0..@fluentui/react-migration-v8-v9_v9.8.1)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-components to v9.66.1 ([PR #34639](https://github.com/microsoft/fluentui/pull/34639) by beachball)
|
|
15
|
+
|
|
16
|
+
## [9.8.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.8.0)
|
|
17
|
+
|
|
18
|
+
Thu, 12 Jun 2025 09:43:31 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.7.13..@fluentui/react-migration-v8-v9_v9.8.0)
|
|
20
|
+
|
|
21
|
+
### Minor changes
|
|
22
|
+
|
|
23
|
+
- Bump @fluentui/react-components to v9.66.0 ([PR #34456](https://github.com/microsoft/fluentui/pull/34456) by beachball)
|
|
24
|
+
|
|
7
25
|
## [9.7.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.7.13)
|
|
8
26
|
|
|
9
|
-
Wed, 11 Jun 2025 22:
|
|
27
|
+
Wed, 11 Jun 2025 22:31:57 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.7.12..@fluentui/react-migration-v8-v9_v9.7.13)
|
|
11
29
|
|
|
12
30
|
### Patches
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useControllableValue } from '@fluentui/react-hooks';
|
|
3
3
|
import { getHTMLAttributes } from '../utils';
|
|
4
|
-
// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--
|
|
4
|
+
// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--docs [Link of the fluent v9 migration guide]
|
|
5
5
|
// https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v8 checkbox types definition]
|
|
6
6
|
// https://github.com/microsoft/fluentui/blob/103b8977f8d5f8dd8c430bab46ff5308a2c76371/packages/react-components/react-checkbox/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v9 checkbox types definition]
|
|
7
7
|
const CHECKBOX_PROPS_V8 = new Set([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Checkbox/shimCheckboxProps.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { ICheckboxProps } from '@fluentui/react';\nimport { CheckboxProps, CheckboxOnChangeData } from '@fluentui/react-components';\nimport { useControllableValue } from '@fluentui/react-hooks';\nimport { getHTMLAttributes } from '../utils';\n\n// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--
|
|
1
|
+
{"version":3,"sources":["../src/components/Checkbox/shimCheckboxProps.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { ICheckboxProps } from '@fluentui/react';\nimport { CheckboxProps, CheckboxOnChangeData } from '@fluentui/react-components';\nimport { useControllableValue } from '@fluentui/react-hooks';\nimport { getHTMLAttributes } from '../utils';\n\n// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--docs [Link of the fluent v9 migration guide]\n// https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v8 checkbox types definition]\n// https://github.com/microsoft/fluentui/blob/103b8977f8d5f8dd8c430bab46ff5308a2c76371/packages/react-components/react-checkbox/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v9 checkbox types definition]\n\nconst CHECKBOX_PROPS_V8: Set<string> = new Set([\n 'ariaDescribedBy',\n 'ariaLabel',\n 'ariaLabelledBy',\n 'ariaPositionInSet',\n 'ariaSetSize',\n 'boxSide',\n 'checked',\n 'checkmarkIconProps', // one case used this\n 'className',\n 'componentRef',\n 'defaultChecked',\n 'defaultIndeterminate',\n 'disabled',\n 'indeterminate',\n 'inputProps',\n 'label',\n 'name',\n 'onChange',\n 'onRenderLabel',\n 'required',\n 'styles',\n 'theme',\n 'title',\n]);\n\nexport const useCheckboxProps = (props: ICheckboxProps): CheckboxProps => {\n const {\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n ariaPositionInSet,\n ariaSetSize,\n boxSide,\n checked: checkedV8,\n indeterminate,\n defaultChecked,\n defaultIndeterminate,\n disabled,\n inputProps,\n name,\n required,\n title,\n onChange: onChangeV8,\n } = props;\n\n const [checked, setChecked] = useControllableValue(checkedV8, defaultChecked);\n const [mixed, setMixed] = React.useState(indeterminate || defaultIndeterminate);\n\n const onChange = React.useCallback(\n (event: React.ChangeEvent<HTMLElement>, data: CheckboxOnChangeData): void => {\n let val: boolean | undefined = checked !== undefined ? (data.checked as boolean) : undefined;\n // Ensure the checkbox is controlled\n if (checked !== undefined) {\n if (mixed) {\n val = checkedV8 !== undefined ? checkedV8 : defaultChecked !== undefined ? defaultChecked : val;\n }\n }\n\n if (mixed) {\n setMixed(mixed && !indeterminate ? false : mixed);\n }\n\n setChecked(val);\n onChangeV8?.(event, data.checked as boolean);\n },\n [setChecked, checked, onChangeV8, mixed, indeterminate, checkedV8, defaultChecked],\n );\n\n const v9Props: Partial<CheckboxProps> = {\n checked: mixed ? 'mixed' : checked,\n defaultChecked: mixed ? 'mixed' : defaultChecked,\n labelPosition: boxSide === 'end' ? 'before' : 'after',\n disabled,\n required,\n title,\n name,\n onChange,\n };\n\n return {\n ...inputProps, // This inputProps is specific for the input element, and the html attributes are also used here instead of props.\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-posinset': ariaPositionInSet,\n 'aria-setsize': ariaSetSize,\n ...v9Props,\n ...getHTMLAttributes(props, CHECKBOX_PROPS_V8),\n } as CheckboxProps;\n};\n"],"names":["React","useControllableValue","getHTMLAttributes","CHECKBOX_PROPS_V8","Set","useCheckboxProps","props","ariaDescribedBy","ariaLabel","ariaLabelledBy","ariaPositionInSet","ariaSetSize","boxSide","checked","checkedV8","indeterminate","defaultChecked","defaultIndeterminate","disabled","inputProps","name","required","title","onChange","onChangeV8","setChecked","mixed","setMixed","useState","useCallback","event","data","val","undefined","v9Props","labelPosition"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,gJAAgJ;AAChJ,+JAA+J;AAC/J,2NAA2N;AAE3N,MAAMC,oBAAiC,IAAIC,IAAI;IAC7C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;I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12,7 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _reacthooks = require("@fluentui/react-hooks");
|
|
14
14
|
const _utils = require("../utils");
|
|
15
|
-
// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--
|
|
15
|
+
// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--docs [Link of the fluent v9 migration guide]
|
|
16
16
|
// https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v8 checkbox types definition]
|
|
17
17
|
// https://github.com/microsoft/fluentui/blob/103b8977f8d5f8dd8c430bab46ff5308a2c76371/packages/react-components/react-checkbox/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v9 checkbox types definition]
|
|
18
18
|
const CHECKBOX_PROPS_V8 = new Set([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Checkbox/shimCheckboxProps.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { ICheckboxProps } from '@fluentui/react';\nimport { CheckboxProps, CheckboxOnChangeData } from '@fluentui/react-components';\nimport { useControllableValue } from '@fluentui/react-hooks';\nimport { getHTMLAttributes } from '../utils';\n\n// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--
|
|
1
|
+
{"version":3,"sources":["../src/components/Checkbox/shimCheckboxProps.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { ICheckboxProps } from '@fluentui/react';\nimport { CheckboxProps, CheckboxOnChangeData } from '@fluentui/react-components';\nimport { useControllableValue } from '@fluentui/react-hooks';\nimport { getHTMLAttributes } from '../utils';\n\n// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--docs [Link of the fluent v9 migration guide]\n// https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v8 checkbox types definition]\n// https://github.com/microsoft/fluentui/blob/103b8977f8d5f8dd8c430bab46ff5308a2c76371/packages/react-components/react-checkbox/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v9 checkbox types definition]\n\nconst CHECKBOX_PROPS_V8: Set<string> = new Set([\n 'ariaDescribedBy',\n 'ariaLabel',\n 'ariaLabelledBy',\n 'ariaPositionInSet',\n 'ariaSetSize',\n 'boxSide',\n 'checked',\n 'checkmarkIconProps', // one case used this\n 'className',\n 'componentRef',\n 'defaultChecked',\n 'defaultIndeterminate',\n 'disabled',\n 'indeterminate',\n 'inputProps',\n 'label',\n 'name',\n 'onChange',\n 'onRenderLabel',\n 'required',\n 'styles',\n 'theme',\n 'title',\n]);\n\nexport const useCheckboxProps = (props: ICheckboxProps): CheckboxProps => {\n const {\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n ariaPositionInSet,\n ariaSetSize,\n boxSide,\n checked: checkedV8,\n indeterminate,\n defaultChecked,\n defaultIndeterminate,\n disabled,\n inputProps,\n name,\n required,\n title,\n onChange: onChangeV8,\n } = props;\n\n const [checked, setChecked] = useControllableValue(checkedV8, defaultChecked);\n const [mixed, setMixed] = React.useState(indeterminate || defaultIndeterminate);\n\n const onChange = React.useCallback(\n (event: React.ChangeEvent<HTMLElement>, data: CheckboxOnChangeData): void => {\n let val: boolean | undefined = checked !== undefined ? (data.checked as boolean) : undefined;\n // Ensure the checkbox is controlled\n if (checked !== undefined) {\n if (mixed) {\n val = checkedV8 !== undefined ? checkedV8 : defaultChecked !== undefined ? defaultChecked : val;\n }\n }\n\n if (mixed) {\n setMixed(mixed && !indeterminate ? false : mixed);\n }\n\n setChecked(val);\n onChangeV8?.(event, data.checked as boolean);\n },\n [setChecked, checked, onChangeV8, mixed, indeterminate, checkedV8, defaultChecked],\n );\n\n const v9Props: Partial<CheckboxProps> = {\n checked: mixed ? 'mixed' : checked,\n defaultChecked: mixed ? 'mixed' : defaultChecked,\n labelPosition: boxSide === 'end' ? 'before' : 'after',\n disabled,\n required,\n title,\n name,\n onChange,\n };\n\n return {\n ...inputProps, // This inputProps is specific for the input element, and the html attributes are also used here instead of props.\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-posinset': ariaPositionInSet,\n 'aria-setsize': ariaSetSize,\n ...v9Props,\n ...getHTMLAttributes(props, CHECKBOX_PROPS_V8),\n } as CheckboxProps;\n};\n"],"names":["useCheckboxProps","CHECKBOX_PROPS_V8","Set","props","ariaDescribedBy","ariaLabel","ariaLabelledBy","ariaPositionInSet","ariaSetSize","boxSide","checked","checkedV8","indeterminate","defaultChecked","defaultIndeterminate","disabled","inputProps","name","required","title","onChange","onChangeV8","setChecked","useControllableValue","mixed","setMixed","React","useState","useCallback","event","data","val","undefined","v9Props","labelPosition","getHTMLAttributes"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqCaA;;;eAAAA;;;;iEArCU;4BAIc;uBACH;AAElC,gJAAgJ;AAChJ,+JAA+J;AAC/J,2NAA2N;AAE3N,MAAMC,oBAAiC,IAAIC,IAAI;IAC7C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAEM,MAAMF,mBAAmB,CAACG;IAC/B,MAAM,EACJC,eAAe,EACfC,SAAS,EACTC,cAAc,EACdC,iBAAiB,EACjBC,WAAW,EACXC,OAAO,EACPC,SAASC,SAAS,EAClBC,aAAa,EACbC,cAAc,EACdC,oBAAoB,EACpBC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACLC,UAAUC,UAAU,EACrB,GAAGlB;IAEJ,MAAM,CAACO,SAASY,WAAW,GAAGC,IAAAA,gCAAAA,EAAqBZ,WAAWE;IAC9D,MAAM,CAACW,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAACf,iBAAiBE;IAE1D,MAAMM,WAAWM,OAAME,WAAW,CAChC,CAACC,OAAuCC;QACtC,IAAIC,MAA2BrB,YAAYsB,YAAaF,KAAKpB,OAAO,GAAesB;QACnF,oCAAoC;QACpC,IAAItB,YAAYsB,WAAW;YACzB,IAAIR,OAAO;gBACTO,MAAMpB,cAAcqB,YAAYrB,YAAYE,mBAAmBmB,YAAYnB,iBAAiBkB;YAC9F;QACF;QAEA,IAAIP,OAAO;YACTC,SAASD,SAAS,CAACZ,gBAAgB,QAAQY;QAC7C;QAEAF,WAAWS;QACXV,eAAAA,QAAAA,eAAAA,KAAAA,IAAAA,KAAAA,IAAAA,WAAaQ,OAAOC,KAAKpB,OAAO;IAClC,GACA;QAACY;QAAYZ;QAASW;QAAYG;QAAOZ;QAAeD;QAAWE;KAAe;IAGpF,MAAMoB,UAAkC;QACtCvB,SAASc,QAAQ,UAAUd;QAC3BG,gBAAgBW,QAAQ,UAAUX;QAClCqB,eAAezB,YAAY,QAAQ,WAAW;QAC9CM;QACAG;QACAC;QACAF;QACAG;IACF;IAEA,OAAO;QACL,GAAGJ,UAAU;QACb,oBAAoBZ;QACpB,cAAcC;QACd,mBAAmBC;QACnB,iBAAiBC;QACjB,gBAAgBC;QAChB,GAAGyB,OAAO;QACV,GAAGE,IAAAA,wBAAAA,EAAkBhC,OAAOF,kBAAkB;IAChD;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-migration-v8-v9",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.8.1",
|
|
4
4
|
"description": "Migration shim components and methods for hybrid v8/v9 applications building on Fluent UI React.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@ctrl/tinycolor": "^3.3.4",
|
|
22
22
|
"@fluentui/fluent2-theme": "^8.107.137",
|
|
23
23
|
"@fluentui/react": "^8.123.0",
|
|
24
|
-
"@fluentui/react-components": "^9.
|
|
24
|
+
"@fluentui/react-components": "^9.66.1",
|
|
25
25
|
"@fluentui/react-icons": "^2.0.245",
|
|
26
26
|
"@fluentui/react-hooks": "^8.8.19",
|
|
27
27
|
"@griffel/react": "^1.5.22",
|