@fluentui/react-radio 9.1.7 → 9.1.8
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 +33 -6
- package/CHANGELOG.md +18 -7
- package/lib/components/RadioGroup/useRadioGroup.js +3 -0
- package/lib/components/RadioGroup/useRadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/useRadioGroup.js +3 -0
- package/lib-commonjs/components/RadioGroup/useRadioGroup.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,34 @@
|
|
|
2
2
|
"name": "@fluentui/react-radio",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 06 Apr 2023 23:59:50 GMT",
|
|
6
|
+
"tag": "@fluentui/react-radio_v9.1.8",
|
|
7
|
+
"version": "9.1.8",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "behowell@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-radio",
|
|
13
|
+
"commit": "5a8d7a29645b3b500eb7145d2e42ac34fcafc4c6",
|
|
14
|
+
"comment": "chore: Hook up FieldContext for use inside a Field"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "behowell@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-radio",
|
|
19
|
+
"commit": "eee5716e76dc6a5bef9316546a352694bbe5750a",
|
|
20
|
+
"comment": "chore: Update package version of react-field"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-radio",
|
|
25
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-beta.1",
|
|
26
|
+
"commit": "7a46cab3d31a233b89b7188e994b24712af5393c"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Tue, 04 Apr 2023 18:44:50 GMT",
|
|
6
33
|
"tag": "@fluentui/react-radio_v9.1.7",
|
|
7
34
|
"version": "9.1.7",
|
|
8
35
|
"comments": {
|
|
@@ -11,31 +38,31 @@
|
|
|
11
38
|
"author": "beachball",
|
|
12
39
|
"package": "@fluentui/react-radio",
|
|
13
40
|
"comment": "Bump @fluentui/react-context-selector to v9.1.16",
|
|
14
|
-
"commit": "
|
|
41
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
15
42
|
},
|
|
16
43
|
{
|
|
17
44
|
"author": "beachball",
|
|
18
45
|
"package": "@fluentui/react-radio",
|
|
19
46
|
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.29",
|
|
20
|
-
"commit": "
|
|
47
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
21
48
|
},
|
|
22
49
|
{
|
|
23
50
|
"author": "beachball",
|
|
24
51
|
"package": "@fluentui/react-radio",
|
|
25
52
|
"comment": "Bump @fluentui/react-label to v9.1.7",
|
|
26
|
-
"commit": "
|
|
53
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
27
54
|
},
|
|
28
55
|
{
|
|
29
56
|
"author": "beachball",
|
|
30
57
|
"package": "@fluentui/react-radio",
|
|
31
58
|
"comment": "Bump @fluentui/react-tabster to v9.6.3",
|
|
32
|
-
"commit": "
|
|
59
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
33
60
|
},
|
|
34
61
|
{
|
|
35
62
|
"author": "beachball",
|
|
36
63
|
"package": "@fluentui/react-radio",
|
|
37
64
|
"comment": "Bump @fluentui/react-utilities to v9.7.3",
|
|
38
|
-
"commit": "
|
|
65
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
39
66
|
}
|
|
40
67
|
]
|
|
41
68
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-radio
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 23:59:50 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.1.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.8)
|
|
8
|
+
|
|
9
|
+
Thu, 06 Apr 2023 23:59:50 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.7..@fluentui/react-radio_v9.1.8)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: Hook up FieldContext for use inside a Field ([PR #27399](https://github.com/microsoft/fluentui/pull/27399) by behowell@microsoft.com)
|
|
15
|
+
- chore: Update package version of react-field ([PR #27458](https://github.com/microsoft/fluentui/pull/27458) by behowell@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-field to v9.0.0-beta.1 ([PR #27420](https://github.com/microsoft/fluentui/pull/27420) by beachball)
|
|
17
|
+
|
|
7
18
|
## [9.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.7)
|
|
8
19
|
|
|
9
|
-
Tue, 04 Apr 2023 18:
|
|
20
|
+
Tue, 04 Apr 2023 18:44:50 GMT
|
|
10
21
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.5..@fluentui/react-radio_v9.1.7)
|
|
11
22
|
|
|
12
23
|
### Patches
|
|
13
24
|
|
|
14
|
-
- Bump @fluentui/react-context-selector to v9.1.16 ([PR #
|
|
15
|
-
- Bump @fluentui/react-field to v9.0.0-alpha.29 ([PR #
|
|
16
|
-
- Bump @fluentui/react-label to v9.1.7 ([PR #
|
|
17
|
-
- Bump @fluentui/react-tabster to v9.6.3 ([PR #
|
|
18
|
-
- Bump @fluentui/react-utilities to v9.7.3 ([PR #
|
|
25
|
+
- Bump @fluentui/react-context-selector to v9.1.16 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
26
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.29 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
27
|
+
- Bump @fluentui/react-label to v9.1.7 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
28
|
+
- Bump @fluentui/react-tabster to v9.6.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
29
|
+
- Bump @fluentui/react-utilities to v9.7.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
19
30
|
|
|
20
31
|
## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.5)
|
|
21
32
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useFieldControlProps_unstable } from '@fluentui/react-field';
|
|
2
3
|
import { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';
|
|
3
4
|
/**
|
|
4
5
|
* Create the state required to render RadioGroup.
|
|
@@ -10,6 +11,8 @@ import { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@
|
|
|
10
11
|
* @param ref - reference to root HTMLElement of RadioGroup
|
|
11
12
|
*/
|
|
12
13
|
export const useRadioGroup_unstable = (props, ref) => {
|
|
14
|
+
// Merge props from surrounding <Field>, if any
|
|
15
|
+
props = useFieldControlProps_unstable(props);
|
|
13
16
|
const generatedName = useId('radiogroup-');
|
|
14
17
|
const {
|
|
15
18
|
name = generatedName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","getNativeElementProps","isHTMLElement","useEventCallback","useId","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","ev","target","constructorName","type"],"sources":["../../../src/components/RadioGroup/useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div',\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ;AAG9E;;;;;;;;;AASA,OAAO,MAAMC,sBAAA,GAAyBA,CAACC,KAAA,EAAwBC,GAAA,KAAoD;EACjH,
|
|
1
|
+
{"version":3,"names":["React","useFieldControlProps_unstable","getNativeElementProps","isHTMLElement","useEventCallback","useId","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","ev","target","constructorName","type"],"sources":["../../../src/components/RadioGroup/useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div',\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ;AAG9E;;;;;;;;;AASA,OAAO,MAAMC,sBAAA,GAAyBA,CAACC,KAAA,EAAwBC,GAAA,KAAoD;EACjH;EACAD,KAAA,GAAQN,6BAAA,CAA8BM,KAAA;EAEtC,MAAME,aAAA,GAAgBJ,KAAA,CAAM;EAE5B,MAAM;IAAEK,IAAA,GAAOD,aAAA;IAAeE,KAAA;IAAOC,YAAA;IAAcC,QAAA;IAAUC,MAAA,GAAS;IAAYC,QAAA;IAAUC;EAAQ,CAAE,GAAGT,KAAA;EAEzG,OAAO;IACLO,MAAA;IACAJ,IAAA;IACAC,KAAA;IACAC,YAAA;IACAC,QAAA;IACAG,QAAA;IACAC,UAAA,EAAY;MACVC,IAAA,EAAM;IACR;IACAA,IAAA,EAAM;MACJV,GAAA;MACAW,IAAA,EAAM;MACN,GAAGjB,qBAAA,CAAsB,OAAOK,KAAA,EAAO,sBAAuB,CAAC,YAAY,OAAO,CAAC;MACnFQ,QAAA,EAAUX,gBAAA,CAAiBgB,EAAA,IAAM;QAC/B,IACEL,QAAA,IACAZ,aAAA,CAAciB,EAAA,CAAGC,MAAM,EAAE;UAAEC,eAAA,EAAiB;QAAmB,MAC/DF,EAAA,CAAGC,MAAM,CAACE,IAAI,KAAK,SACnB;UACAR,QAAA,CAASK,EAAA,EAAI;YAAET,KAAA,EAAOS,EAAA,CAAGC,MAAM,CAACV;UAAM;QACxC;MACF;IACF;EACF;AACF"}
|
|
@@ -8,8 +8,11 @@ Object.defineProperty(exports, "useRadioGroup_unstable", {
|
|
|
8
8
|
});
|
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _reactField = require("@fluentui/react-field");
|
|
11
12
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
13
|
const useRadioGroup_unstable = (props, ref)=>{
|
|
14
|
+
// Merge props from surrounding <Field>, if any
|
|
15
|
+
props = (0, _reactField.useFieldControlProps_unstable)(props);
|
|
13
16
|
const generatedName = (0, _reactUtilities.useId)('radiogroup-');
|
|
14
17
|
const { name =generatedName , value , defaultValue , disabled , layout ='vertical' , onChange , required } = props;
|
|
15
18
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/RadioGroup/useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props, ref) => {\n const generatedName = useId('radiogroup-');\n const {\n name = generatedName,\n value,\n defaultValue,\n disabled,\n layout = 'vertical',\n onChange,\n required\n } = props;\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div'\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/['onChange', 'name']),\n onChange: useEventCallback(ev => {\n if (onChange && isHTMLElement(ev.target, {\n constructorName: 'HTMLInputElement'\n }) && ev.target.type === 'radio') {\n onChange(ev, {\n value: ev.target.value\n });\n }\n })\n }\n };\n};\n//# sourceMappingURL=useRadioGroup.js.map"],"names":["useRadioGroup_unstable","props","ref","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/RadioGroup/useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props, ref) => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n const generatedName = useId('radiogroup-');\n const {\n name = generatedName,\n value,\n defaultValue,\n disabled,\n layout = 'vertical',\n onChange,\n required\n } = props;\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div'\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/['onChange', 'name']),\n onChange: useEventCallback(ev => {\n if (onChange && isHTMLElement(ev.target, {\n constructorName: 'HTMLInputElement'\n }) && ev.target.type === 'radio') {\n onChange(ev, {\n value: ev.target.value\n });\n }\n })\n }\n };\n};\n//# sourceMappingURL=useRadioGroup.js.map"],"names":["useRadioGroup_unstable","props","ref","useFieldControlProps_unstable","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;4BACuB;gCACgC;AAUvE,MAAMA,yBAAyB,CAACC,OAAOC,MAAQ;IACpD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF;IACtC,MAAMG,gBAAgBC,IAAAA,qBAAK,EAAC;IAC5B,MAAM,EACJC,MAAOF,cAAa,EACpBG,MAAK,EACLC,aAAY,EACZC,SAAQ,EACRC,QAAS,WAAU,EACnBC,SAAQ,EACRC,SAAQ,EACT,GAAGX;IACJ,OAAO;QACLS;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJZ;YACAa,MAAM;YACN,GAAGC,IAAAA,qCAAqB,EAAC,OAAOf,OAAO,oBAAoB,GAAE;gBAAC;gBAAY;aAAO,CAAC;YAClFU,UAAUM,IAAAA,gCAAgB,EAACC,CAAAA,KAAM;gBAC/B,IAAIP,YAAYQ,IAAAA,6BAAa,EAACD,GAAGE,MAAM,EAAE;oBACvCC,iBAAiB;gBACnB,MAAMH,GAAGE,MAAM,CAACE,IAAI,KAAK,SAAS;oBAChCX,SAASO,IAAI;wBACXX,OAAOW,GAAGE,MAAM,CAACb,KAAK;oBACxB;gBACF,CAAC;YACH;QACF;IACF;AACF,GACA,yCAAyC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-radio",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.8",
|
|
4
4
|
"description": "Fluent UI Radio component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@fluentui/react-context-selector": "^9.1.16",
|
|
36
|
-
"@fluentui/react-field": "9.0.0-
|
|
36
|
+
"@fluentui/react-field": "9.0.0-beta.1",
|
|
37
37
|
"@fluentui/react-icons": "^2.0.196",
|
|
38
38
|
"@fluentui/react-label": "^9.1.7",
|
|
39
39
|
"@fluentui/react-shared-contexts": "^9.3.3",
|