@fluentui/react-radio 9.1.6 → 9.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +44 -11
- package/CHANGELOG.md +20 -8
- 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 +6 -6
package/CHANGELOG.json
CHANGED
@@ -2,34 +2,67 @@
|
|
2
2
|
"name": "@fluentui/react-radio",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Thu,
|
6
|
-
"tag": "@fluentui/react-radio_v9.1.
|
7
|
-
"version": "9.1.
|
5
|
+
"date": "Thu, 06 Apr 2023 23:59:50 GMT",
|
6
|
+
"tag": "@fluentui/react-radio_v9.1.8",
|
7
|
+
"version": "9.1.8",
|
8
8
|
"comments": {
|
9
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",
|
33
|
+
"tag": "@fluentui/react-radio_v9.1.7",
|
34
|
+
"version": "9.1.7",
|
35
|
+
"comments": {
|
36
|
+
"patch": [
|
37
|
+
{
|
38
|
+
"author": "beachball",
|
39
|
+
"package": "@fluentui/react-radio",
|
40
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.16",
|
41
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
42
|
+
},
|
10
43
|
{
|
11
44
|
"author": "beachball",
|
12
45
|
"package": "@fluentui/react-radio",
|
13
|
-
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.
|
14
|
-
"commit": "
|
46
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.29",
|
47
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
15
48
|
},
|
16
49
|
{
|
17
50
|
"author": "beachball",
|
18
51
|
"package": "@fluentui/react-radio",
|
19
|
-
"comment": "Bump @fluentui/react-label to v9.1.
|
20
|
-
"commit": "
|
52
|
+
"comment": "Bump @fluentui/react-label to v9.1.7",
|
53
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
21
54
|
},
|
22
55
|
{
|
23
56
|
"author": "beachball",
|
24
57
|
"package": "@fluentui/react-radio",
|
25
|
-
"comment": "Bump @fluentui/react-
|
26
|
-
"commit": "
|
58
|
+
"comment": "Bump @fluentui/react-tabster to v9.6.3",
|
59
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
27
60
|
},
|
28
61
|
{
|
29
62
|
"author": "beachball",
|
30
63
|
"package": "@fluentui/react-radio",
|
31
|
-
"comment": "Bump @fluentui/react-
|
32
|
-
"commit": "
|
64
|
+
"comment": "Bump @fluentui/react-utilities to v9.7.3",
|
65
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
33
66
|
}
|
34
67
|
]
|
35
68
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,20 +1,32 @@
|
|
1
1
|
# Change Log - @fluentui/react-radio
|
2
2
|
|
3
|
-
This log was last generated on Thu,
|
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.
|
7
|
+
## [9.1.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.8)
|
8
8
|
|
9
|
-
Thu,
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.
|
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
11
|
|
12
12
|
### Patches
|
13
13
|
|
14
|
-
-
|
15
|
-
-
|
16
|
-
- Bump @fluentui/react-
|
17
|
-
|
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
|
+
|
18
|
+
## [9.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.7)
|
19
|
+
|
20
|
+
Tue, 04 Apr 2023 18:44:50 GMT
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.5..@fluentui/react-radio_v9.1.7)
|
22
|
+
|
23
|
+
### Patches
|
24
|
+
|
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)
|
18
30
|
|
19
31
|
## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.5)
|
20
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",
|
@@ -32,14 +32,14 @@
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-context-selector": "^9.1.
|
36
|
-
"@fluentui/react-field": "9.0.0-
|
35
|
+
"@fluentui/react-context-selector": "^9.1.16",
|
36
|
+
"@fluentui/react-field": "9.0.0-beta.1",
|
37
37
|
"@fluentui/react-icons": "^2.0.196",
|
38
|
-
"@fluentui/react-label": "^9.1.
|
38
|
+
"@fluentui/react-label": "^9.1.7",
|
39
39
|
"@fluentui/react-shared-contexts": "^9.3.3",
|
40
|
-
"@fluentui/react-tabster": "^9.6.
|
40
|
+
"@fluentui/react-tabster": "^9.6.3",
|
41
41
|
"@fluentui/react-theme": "^9.1.7",
|
42
|
-
"@fluentui/react-utilities": "^9.7.
|
42
|
+
"@fluentui/react-utilities": "^9.7.3",
|
43
43
|
"@griffel/react": "^1.5.2",
|
44
44
|
"@swc/helpers": "^0.4.14"
|
45
45
|
},
|