@fluentui/react-radio 9.1.1 → 9.1.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,52 @@
2
2
  "name": "@fluentui/react-radio",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 10 Mar 2023 07:11:11 GMT",
5
+ "date": "Mon, 13 Mar 2023 08:55:01 GMT",
6
+ "tag": "@fluentui/react-radio_v9.1.2",
7
+ "version": "9.1.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-radio",
13
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e",
14
+ "comment": "fix: stops using instaceof in favor of isHTMLElement"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-radio",
19
+ "comment": "Bump @fluentui/react-context-selector to v9.1.13",
20
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-radio",
25
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.24",
26
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-radio",
31
+ "comment": "Bump @fluentui/react-label to v9.1.2",
32
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-radio",
37
+ "comment": "Bump @fluentui/react-tabster to v9.5.6",
38
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-radio",
43
+ "comment": "Bump @fluentui/react-utilities to v9.7.0",
44
+ "commit": "edf96a6b5d6f13843ada1400480e347b84384b8e"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Fri, 10 Mar 2023 07:14:01 GMT",
6
51
  "tag": "@fluentui/react-radio_v9.1.1",
7
52
  "version": "9.1.1",
8
53
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,26 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Fri, 10 Mar 2023 07:11:11 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 13 Mar 2023 08:55:01 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.2)
8
+
9
+ Mon, 13 Mar 2023 08:55:01 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.1..@fluentui/react-radio_v9.1.2)
11
+
12
+ ### Patches
13
+
14
+ - fix: stops using instaceof in favor of isHTMLElement ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by bernardo.sunderhus@gmail.com)
15
+ - Bump @fluentui/react-context-selector to v9.1.13 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
16
+ - Bump @fluentui/react-field to v9.0.0-alpha.24 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
17
+ - Bump @fluentui/react-label to v9.1.2 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
18
+ - Bump @fluentui/react-tabster to v9.5.6 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.7.0 ([PR #27161](https://github.com/microsoft/fluentui/pull/27161) by beachball)
20
+
7
21
  ## [9.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.1)
8
22
 
9
- Fri, 10 Mar 2023 07:11:11 GMT
23
+ Fri, 10 Mar 2023 07:14:01 GMT
10
24
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.0..@fluentui/react-radio_v9.1.1)
11
25
 
12
26
  ### Patches
@@ -1,4 +1,4 @@
1
- import { getNativeElementProps, useEventCallback, useId } from '@fluentui/react-utilities';
1
+ import { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';
2
2
  /**
3
3
  * Create the state required to render RadioGroup.
4
4
  *
@@ -34,7 +34,9 @@ export const useRadioGroup_unstable = (props, ref) => {
34
34
  role: 'radiogroup',
35
35
  ...getNativeElementProps('div', props, /*excludedPropNames:*/['onChange', 'name']),
36
36
  onChange: useEventCallback(ev => {
37
- if (onChange && ev.target instanceof HTMLInputElement && ev.target.type === 'radio') {
37
+ if (onChange && isHTMLElement(ev.target, {
38
+ constructorName: 'HTMLInputElement'
39
+ }) && ev.target.type === 'radio') {
38
40
  onChange(ev, {
39
41
  value: ev.target.value
40
42
  });
@@ -1 +1 @@
1
- {"version":3,"names":["getNativeElementProps","useEventCallback","useId","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","ev","target","HTMLInputElement","type"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, 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 (onChange && ev.target instanceof HTMLInputElement && ev.target.type === 'radio') {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AAG1F;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA8B,KAAqB;EAChH,MAAMC,aAAa,GAAGJ,KAAK,CAAC,aAAa,CAAC;EAE1C,MAAM;IAAEK,IAAI,GAAGD,aAAa;IAAEE,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM,GAAG,UAAU;IAAEC,QAAQ;IAAEC;EAAQ,CAAE,GAAGT,KAAK;EAE9G,OAAO;IACLO,MAAM;IACNJ,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRG,QAAQ;IACRC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAE;MACJV,GAAG;MACHW,IAAI,EAAE,YAAY;MAClB,GAAGhB,qBAAqB,CAAC,KAAK,EAAEI,KAAK,EAAE,sBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;MACnFQ,QAAQ,EAAEX,gBAAgB,CAACgB,EAAE,IAAG;QAC9B,IAAIL,QAAQ,IAAIK,EAAE,CAACC,MAAM,YAAYC,gBAAgB,IAAIF,EAAE,CAACC,MAAM,CAACE,IAAI,KAAK,OAAO,EAAE;UACnFR,QAAQ,CAACK,EAAE,EAAE;YAAET,KAAK,EAAES,EAAE,CAACC,MAAM,CAACV;UAAK,CAAE,CAAC;;MAE5C,CAAC;;GAEJ;AACH,CAAC"}
1
+ {"version":3,"names":["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/packages/react-components/react-radio/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":"AACA,SAASA,qBAAqB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AAGzG;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA8B,KAAqB;EAChH,MAAMC,aAAa,GAAGJ,KAAK,CAAC,aAAa,CAAC;EAE1C,MAAM;IAAEK,IAAI,GAAGD,aAAa;IAAEE,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM,GAAG,UAAU;IAAEC,QAAQ;IAAEC;EAAQ,CAAE,GAAGT,KAAK;EAE9G,OAAO;IACLO,MAAM;IACNJ,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRG,QAAQ;IACRC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAE;MACJV,GAAG;MACHW,IAAI,EAAE,YAAY;MAClB,GAAGjB,qBAAqB,CAAC,KAAK,EAAEK,KAAK,EAAE,sBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;MACnFQ,QAAQ,EAAEX,gBAAgB,CAACgB,EAAE,IAAG;QAC9B,IACEL,QAAQ,IACRZ,aAAa,CAACiB,EAAE,CAACC,MAAM,EAAE;UAAEC,eAAe,EAAE;QAAkB,CAAE,CAAC,IACjEF,EAAE,CAACC,MAAM,CAACE,IAAI,KAAK,OAAO,EAC1B;UACAR,QAAQ,CAACK,EAAE,EAAE;YAAET,KAAK,EAAES,EAAE,CAACC,MAAM,CAACV;UAAK,CAAE,CAAC;;MAE5C,CAAC;;GAEJ;AACH,CAAC"}
@@ -25,7 +25,9 @@ define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (r
25
25
  root: 'div',
26
26
  },
27
27
  root: tslib_1.__assign(tslib_1.__assign({ ref: ref, role: 'radiogroup' }, react_utilities_1.getNativeElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name'])), { onChange: react_utilities_1.useEventCallback(function (ev) {
28
- if (onChange && ev.target instanceof HTMLInputElement && ev.target.type === 'radio') {
28
+ if (onChange &&
29
+ react_utilities_1.isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&
30
+ ev.target.type === 'radio') {
29
31
  onChange(ev, { value: ev.target.value });
30
32
  }
31
33
  }) }),
@@ -1 +1 @@
1
- {"version":3,"file":"useRadioGroup.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/RadioGroup/useRadioGroup.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,sBAAsB,GAAG,UAAC,KAAsB,EAAE,GAA8B;QAC3F,IAAM,aAAa,GAAG,uBAAK,CAAC,aAAa,CAAC,CAAC;QAEnC,IAAA,KAAiG,KAAK,KAAlF,EAApB,IAAI,mBAAG,aAAa,KAAA,EAAE,KAAK,GAAsE,KAAK,MAA3E,EAAE,YAAY,GAAwD,KAAK,aAA7D,EAAE,QAAQ,GAA8C,KAAK,SAAnD,EAAE,KAA4C,KAAK,OAA9B,EAAnB,MAAM,mBAAG,UAAU,KAAA,EAAE,QAAQ,GAAe,KAAK,SAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;QAE/G,OAAO;YACL,MAAM,QAAA;YACN,IAAI,MAAA;YACJ,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,QAAQ,UAAA;YACR,QAAQ,UAAA;YACR,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,sCACF,GAAG,KAAA,EACH,IAAI,EAAE,YAAY,IACf,uCAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,KACnF,QAAQ,EAAE,kCAAgB,CAAC,UAAA,EAAE;oBAC3B,IAAI,QAAQ,IAAI,EAAE,CAAC,MAAM,YAAY,gBAAgB,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE;wBACnF,QAAQ,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;qBAC1C;gBACH,CAAC,CAAC,GACH;SACF,CAAC;IACJ,CAAC,CAAC;IA1BW,QAAA,sBAAsB,0BA0BjC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, 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 (onChange && ev.target instanceof HTMLInputElement && ev.target.type === 'radio') {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"]}
1
+ {"version":3,"file":"useRadioGroup.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/RadioGroup/useRadioGroup.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,sBAAsB,GAAG,UAAC,KAAsB,EAAE,GAA8B;QAC3F,IAAM,aAAa,GAAG,uBAAK,CAAC,aAAa,CAAC,CAAC;QAEnC,IAAA,KAAiG,KAAK,KAAlF,EAApB,IAAI,mBAAG,aAAa,KAAA,EAAE,KAAK,GAAsE,KAAK,MAA3E,EAAE,YAAY,GAAwD,KAAK,aAA7D,EAAE,QAAQ,GAA8C,KAAK,SAAnD,EAAE,KAA4C,KAAK,OAA9B,EAAnB,MAAM,mBAAG,UAAU,KAAA,EAAE,QAAQ,GAAe,KAAK,SAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;QAE/G,OAAO;YACL,MAAM,QAAA;YACN,IAAI,MAAA;YACJ,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,QAAQ,UAAA;YACR,QAAQ,UAAA;YACR,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,sCACF,GAAG,KAAA,EACH,IAAI,EAAE,YAAY,IACf,uCAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,KACnF,QAAQ,EAAE,kCAAgB,CAAC,UAAA,EAAE;oBAC3B,IACE,QAAQ;wBACR,+BAAa,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC;wBACjE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,EAC1B;wBACA,QAAQ,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;qBAC1C;gBACH,CAAC,CAAC,GACH;SACF,CAAC;IACJ,CAAC,CAAC;IA9BW,QAAA,sBAAsB,0BA8BjC","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"]}
@@ -40,7 +40,9 @@ const useRadioGroup_unstable = (props, ref) => {
40
40
  role: 'radiogroup',
41
41
  ...react_utilities_1.getNativeElementProps('div', props, /*excludedPropNames:*/['onChange', 'name']),
42
42
  onChange: react_utilities_1.useEventCallback(ev => {
43
- if (onChange && ev.target instanceof HTMLInputElement && ev.target.type === 'radio') {
43
+ if (onChange && react_utilities_1.isHTMLElement(ev.target, {
44
+ constructorName: 'HTMLInputElement'
45
+ }) && ev.target.type === 'radio') {
44
46
  onChange(ev, {
45
47
  value: ev.target.value
46
48
  });
@@ -1 +1 @@
1
- {"version":3,"names":["react_utilities_1","require","useRadioGroup_unstable","props","ref","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","target","HTMLInputElement","type","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, 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 (onChange && ev.target instanceof HTMLInputElement && ev.target.type === 'radio') {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;;;;;;;AASO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA8B,KAAqB;EAChH,MAAMC,aAAa,GAAGL,iBAAA,CAAAM,KAAK,CAAC,aAAa,CAAC;EAE1C,MAAM;IAAEC,IAAI,GAAGF,aAAa;IAAEG,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM,GAAG,UAAU;IAAEC,QAAQ;IAAEC;EAAQ,CAAE,GAAGV,KAAK;EAE9G,OAAO;IACLQ,MAAM;IACNJ,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRG,QAAQ;IACRC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAE;MACJX,GAAG;MACHY,IAAI,EAAE,YAAY;MAClB,GAAGhB,iBAAA,CAAAiB,qBAAqB,CAAC,KAAK,EAAEd,KAAK,EAAE,sBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;MACnFS,QAAQ,EAAEZ,iBAAA,CAAAkB,gBAAgB,CAACC,EAAE,IAAG;QAC9B,IAAIP,QAAQ,IAAIO,EAAE,CAACC,MAAM,YAAYC,gBAAgB,IAAIF,EAAE,CAACC,MAAM,CAACE,IAAI,KAAK,OAAO,EAAE;UACnFV,QAAQ,CAACO,EAAE,EAAE;YAAEX,KAAK,EAAEW,EAAE,CAACC,MAAM,CAACZ;UAAK,CAAE,CAAC;;MAE5C,CAAC;;GAEJ;AACH,CAAC;AA1BYe,OAAA,CAAArB,sBAAsB,GAAAA,sBAAA"}
1
+ {"version":3,"names":["react_utilities_1","require","useRadioGroup_unstable","props","ref","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type","exports"],"sources":["../src/packages/react-components/react-radio/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":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;;;;;;;AASO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA8B,KAAqB;EAChH,MAAMC,aAAa,GAAGL,iBAAA,CAAAM,KAAK,CAAC,aAAa,CAAC;EAE1C,MAAM;IAAEC,IAAI,GAAGF,aAAa;IAAEG,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM,GAAG,UAAU;IAAEC,QAAQ;IAAEC;EAAQ,CAAE,GAAGV,KAAK;EAE9G,OAAO;IACLQ,MAAM;IACNJ,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRG,QAAQ;IACRC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAE;MACJX,GAAG;MACHY,IAAI,EAAE,YAAY;MAClB,GAAGhB,iBAAA,CAAAiB,qBAAqB,CAAC,KAAK,EAAEd,KAAK,EAAE,sBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;MACnFS,QAAQ,EAAEZ,iBAAA,CAAAkB,gBAAgB,CAACC,EAAE,IAAG;QAC9B,IACEP,QAAQ,IACRZ,iBAAA,CAAAoB,aAAa,CAACD,EAAE,CAACE,MAAM,EAAE;UAAEC,eAAe,EAAE;QAAkB,CAAE,CAAC,IACjEH,EAAE,CAACE,MAAM,CAACE,IAAI,KAAK,OAAO,EAC1B;UACAX,QAAQ,CAACO,EAAE,EAAE;YAAEX,KAAK,EAAEW,EAAE,CAACE,MAAM,CAACb;UAAK,CAAE,CAAC;;MAE5C,CAAC;;GAEJ;AACH,CAAC;AA9BYgB,OAAA,CAAAtB,sBAAsB,GAAAA,sBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-radio",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
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.12",
36
- "@fluentui/react-field": "9.0.0-alpha.23",
35
+ "@fluentui/react-context-selector": "^9.1.13",
36
+ "@fluentui/react-field": "9.0.0-alpha.24",
37
37
  "@fluentui/react-icons": "^2.0.175",
38
- "@fluentui/react-label": "^9.1.1",
38
+ "@fluentui/react-label": "^9.1.2",
39
39
  "@fluentui/react-shared-contexts": "^9.3.0",
40
- "@fluentui/react-tabster": "^9.5.5",
40
+ "@fluentui/react-tabster": "^9.5.6",
41
41
  "@fluentui/react-theme": "^9.1.5",
42
- "@fluentui/react-utilities": "^9.6.2",
42
+ "@fluentui/react-utilities": "^9.7.0",
43
43
  "@griffel/react": "^1.5.2",
44
44
  "tslib": "^2.1.0"
45
45
  },