@fluentui/react-radio 9.0.25 → 9.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.json +91 -1
  2. package/CHANGELOG.md +30 -2
  3. package/lib/components/Radio/Radio.js +5 -0
  4. package/lib/components/Radio/Radio.js.map +1 -1
  5. package/lib/components/Radio/renderRadio.js.map +1 -1
  6. package/lib/components/Radio/useRadio.js.map +1 -1
  7. package/lib/components/Radio/useRadioStyles.js.map +1 -1
  8. package/lib/components/RadioGroup/RadioGroup.js +5 -0
  9. package/lib/components/RadioGroup/RadioGroup.js.map +1 -1
  10. package/lib/components/RadioGroup/renderRadioGroup.js.map +1 -1
  11. package/lib/components/RadioGroup/useRadioGroup.js.map +1 -1
  12. package/lib/components/RadioGroup/useRadioGroupStyles.js.map +1 -1
  13. package/lib/components/RadioGroupField/RadioGroupField.js.map +1 -1
  14. package/lib/contexts/RadioGroupContext.js.map +1 -1
  15. package/lib/contexts/useRadioGroupContextValues.js.map +1 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib-amd/components/Radio/Radio.js +3 -1
  18. package/lib-amd/components/Radio/Radio.js.map +1 -1
  19. package/lib-amd/components/RadioGroup/RadioGroup.js +3 -1
  20. package/lib-amd/components/RadioGroup/RadioGroup.js.map +1 -1
  21. package/lib-commonjs/Radio.js.map +1 -1
  22. package/lib-commonjs/RadioGroup.js.map +1 -1
  23. package/lib-commonjs/RadioGroupField.js.map +1 -1
  24. package/lib-commonjs/components/Radio/Radio.js +5 -0
  25. package/lib-commonjs/components/Radio/Radio.js.map +1 -1
  26. package/lib-commonjs/components/Radio/Radio.types.js.map +1 -1
  27. package/lib-commonjs/components/Radio/index.js.map +1 -1
  28. package/lib-commonjs/components/Radio/renderRadio.js.map +1 -1
  29. package/lib-commonjs/components/Radio/useRadio.js.map +1 -1
  30. package/lib-commonjs/components/Radio/useRadioStyles.js.map +1 -1
  31. package/lib-commonjs/components/RadioGroup/RadioGroup.js +5 -0
  32. package/lib-commonjs/components/RadioGroup/RadioGroup.js.map +1 -1
  33. package/lib-commonjs/components/RadioGroup/RadioGroup.types.js.map +1 -1
  34. package/lib-commonjs/components/RadioGroup/index.js.map +1 -1
  35. package/lib-commonjs/components/RadioGroup/renderRadioGroup.js.map +1 -1
  36. package/lib-commonjs/components/RadioGroup/useRadioGroup.js.map +1 -1
  37. package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.js.map +1 -1
  38. package/lib-commonjs/components/RadioGroupField/RadioGroupField.js.map +1 -1
  39. package/lib-commonjs/components/RadioGroupField/index.js.map +1 -1
  40. package/lib-commonjs/contexts/RadioGroupContext.js.map +1 -1
  41. package/lib-commonjs/contexts/index.js.map +1 -1
  42. package/lib-commonjs/contexts/useRadioGroupContextValues.js.map +1 -1
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/package.json +7 -6
package/CHANGELOG.json CHANGED
@@ -2,7 +2,97 @@
2
2
  "name": "@fluentui/react-radio",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 13 Feb 2023 23:40:50 GMT",
5
+ "date": "Wed, 08 Mar 2023 17:39:09 GMT",
6
+ "tag": "@fluentui/react-radio_v9.1.0",
7
+ "version": "9.1.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "gcox@microsoft.com",
12
+ "package": "@fluentui/react-radio",
13
+ "commit": "0ec3b66bd7f07f3fdb93e373a11cbb543802cc0a",
14
+ "comment": "feat: custom styles"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-radio",
19
+ "comment": "Bump @fluentui/react-context-selector to v9.1.11",
20
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-radio",
25
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.22",
26
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-radio",
31
+ "comment": "Bump @fluentui/react-label to v9.1.0",
32
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-radio",
37
+ "comment": "Bump @fluentui/react-shared-contexts to v9.3.0",
38
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-radio",
43
+ "comment": "Bump @fluentui/react-tabster to v9.5.4",
44
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-radio",
49
+ "comment": "Bump @fluentui/react-utilities to v9.6.1",
50
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Wed, 15 Feb 2023 11:44:52 GMT",
57
+ "tag": "@fluentui/react-radio_v9.0.26",
58
+ "version": "9.0.26",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-radio",
64
+ "comment": "Bump @fluentui/react-context-selector to v9.1.10",
65
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-radio",
70
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.21",
71
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-radio",
76
+ "comment": "Bump @fluentui/react-label to v9.0.22",
77
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-radio",
82
+ "comment": "Bump @fluentui/react-tabster to v9.5.3",
83
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-radio",
88
+ "comment": "Bump @fluentui/react-utilities to v9.6.0",
89
+ "commit": "087d981aab96bef2e332a373069a19bc702a7ca2"
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "date": "Mon, 13 Feb 2023 23:43:14 GMT",
6
96
  "tag": "@fluentui/react-radio_v9.0.25",
7
97
  "version": "9.0.25",
8
98
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,40 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Mon, 13 Feb 2023 23:40:50 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 08 Mar 2023 17:39:09 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.0)
8
+
9
+ Wed, 08 Mar 2023 17:39:09 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.26..@fluentui/react-radio_v9.1.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: custom styles ([PR #27071](https://github.com/microsoft/fluentui/pull/27071) by gcox@microsoft.com)
15
+ - Bump @fluentui/react-context-selector to v9.1.11 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
16
+ - Bump @fluentui/react-field to v9.0.0-alpha.22 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
17
+ - Bump @fluentui/react-label to v9.1.0 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.3.0 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.5.4 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
21
+
22
+ ## [9.0.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.26)
23
+
24
+ Wed, 15 Feb 2023 11:44:52 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.25..@fluentui/react-radio_v9.0.26)
26
+
27
+ ### Patches
28
+
29
+ - Bump @fluentui/react-context-selector to v9.1.10 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
30
+ - Bump @fluentui/react-field to v9.0.0-alpha.21 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
31
+ - Bump @fluentui/react-label to v9.0.22 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
32
+ - Bump @fluentui/react-tabster to v9.5.3 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
33
+ - Bump @fluentui/react-utilities to v9.6.0 ([PR #26845](https://github.com/microsoft/fluentui/pull/26845) by beachball)
34
+
7
35
  ## [9.0.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.25)
8
36
 
9
- Mon, 13 Feb 2023 23:40:50 GMT
37
+ Mon, 13 Feb 2023 23:43:14 GMT
10
38
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.24..@fluentui/react-radio_v9.0.25)
11
39
 
12
40
  ### Patches
@@ -2,12 +2,17 @@ import * as React from 'react';
2
2
  import { renderRadio_unstable } from './renderRadio';
3
3
  import { useRadio_unstable } from './useRadio';
4
4
  import { useRadioStyles_unstable } from './useRadioStyles';
5
+ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
5
6
  /**
6
7
  * Radio component is a wrapper for a radio button with a label.
7
8
  */
8
9
  export const Radio = /*#__PURE__*/React.forwardRef((props, ref) => {
9
10
  const state = useRadio_unstable(props, ref);
10
11
  useRadioStyles_unstable(state);
12
+ const {
13
+ useRadioStyles_unstable: useCustomStyles
14
+ } = useCustomStyleHooks_unstable();
15
+ useCustomStyles(state);
11
16
  return renderRadio_unstable(state);
12
17
  });
13
18
  Radio.displayName = 'Radio';
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,uBAAuB,QAAQ,kBAAkB;AAE1D;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGN,iBAAiB,CAACI,KAAK,EAAEC,GAAG,CAAC;EAE3CJ,uBAAuB,CAACK,KAAK,CAAC;EAC9B,OAAOP,oBAAoB,CAACO,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,KAAK,CAACK,WAAW,GAAG,OAAO","names":["React","renderRadio_unstable","useRadio_unstable","useRadioStyles_unstable","Radio","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"]}
1
+ {"version":3,"names":["React","renderRadio_unstable","useRadio_unstable","useRadioStyles_unstable","useCustomStyleHooks_unstable","Radio","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n\n const { useRadioStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGP,iBAAiB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE3CL,uBAAuB,CAACM,KAAK,CAAC;EAE9B,MAAM;IAAEN,uBAAuB,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACnFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,oBAAoB,CAACQ,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,KAAK,CAACM,WAAW,GAAG,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAaE,KAAK,CAAC;EAExD,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,gBAC5BN,oBAACI,KAAK,CAACG,KAAK;IAAA,GAAKF,SAAS,CAACE;EAAK,EAAI,eACpCP,oBAACI,KAAK,CAACI,SAAS;IAAA,GAAKH,SAAS,CAACG;EAAS,EAAI,EAC3CJ,KAAK,CAACK,KAAK,iBAAIT,oBAACI,KAAK,CAACK,KAAK;IAAA,GAAKJ,SAAS,CAACI;EAAK,EAAI,CACzC;AAEjB,CAAC","names":["React","getSlots","renderRadio_unstable","state","slots","slotProps","root","input","indicator","label"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/renderRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n const { slots, slotProps } = getSlots<RadioSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.indicator {...slotProps.indicator} />\n {slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"]}
1
+ {"version":3,"names":["React","getSlots","renderRadio_unstable","state","slots","slotProps","createElement","root","input","indicator","label"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/renderRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n const { slots, slotProps } = getSlots<RadioSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.indicator {...slotProps.indicator} />\n {slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAA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AAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGU,EAAE,EAAE;IAAErB,KAAK,EAAEqB,EAAE,CAACC,aAAa,CAACtB;EAAK,CAAE,CAAC,CAAC;EAExG,MAAMuB,KAAK,GAAGjC,gBAAgB,CAACK,KAAK,CAAC4B,KAAK,EAAE;IAC1CP,YAAY,EAAE;MACZQ,OAAO,EAAEP,KAAK,CAACE,EAAE;MACjBhB;;GAEH,CAAC;EAEF,MAAMsB,SAAS,GAAGnC,gBAAgB,CAACK,KAAK,CAAC8B,SAAS,EAAE;IAClDnB,QAAQ,EAAE,IAAI;IACdU,YAAY,EAAE;MACZ,aAAa,EAAE,IAAI;MACnBU,QAAQ,eAAEzC,oBAACC,YAAY;;GAE1B,CAAC;EAEF,OAAO;IACLwB,aAAa;IACbiB,UAAU,EAAE;MACVZ,IAAI,EAAE,MAAM;MACZE,KAAK,EAAE,OAAO;MACdM,KAAK,EAAEpC,KAAK;MACZsC,SAAS,EAAE;KACZ;IACDV,IAAI;IACJE,KAAK;IACLM,KAAK;IACLE;GACD;AACH,CAAC","names":["React","CircleFilled","Label","getPartitionedNativeProps","mergeCallbacks","resolveShorthand","useId","useRadioGroupContext_unstable","useFocusWithin","useRadio_unstable","props","ref","nameGroup","ctx","name","value","defaultValue","disabledGroup","disabled","layout","requiredGroup","required","checked","undefined","defaultChecked","labelPosition","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","defaultProps","input","type","id","primary","ev","currentTarget","label","htmlFor","indicator","children","components"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { useRadioGroupContext_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RadioProps, RadioState } from './Radio.types';\n\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const nameGroup = useRadioGroupContext_unstable(ctx => ctx.name);\n const value = useRadioGroupContext_unstable(ctx => ctx.value);\n const defaultValue = useRadioGroupContext_unstable(ctx => ctx.defaultValue);\n const disabledGroup = useRadioGroupContext_unstable(ctx => ctx.disabled);\n const layout = useRadioGroupContext_unstable(ctx => ctx.layout);\n const requiredGroup = useRadioGroupContext_unstable(ctx => ctx.required);\n\n const {\n name = nameGroup,\n checked = value !== undefined ? value === props.value : undefined,\n defaultChecked = defaultValue !== undefined ? defaultValue === props.value : undefined,\n labelPosition = layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = disabledGroup,\n required = requiredGroup,\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n });\n\n const input = resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n ...nativeProps.primary,\n },\n });\n\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n\n const label = resolveShorthand(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled,\n },\n });\n\n const indicator = resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: <CircleFilled />,\n },\n });\n\n return {\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n label: Label,\n indicator: 'div',\n },\n root,\n input,\n label,\n indicator,\n };\n};\n"]}
1
+ {"version":3,"names":["React","CircleFilled","Label","getPartitionedNativeProps","mergeCallbacks","resolveShorthand","useId","useRadioGroupContext_unstable","useFocusWithin","useRadio_unstable","props","ref","nameGroup","ctx","name","value","defaultValue","disabledGroup","disabled","layout","requiredGroup","required","checked","undefined","defaultChecked","labelPosition","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","defaultProps","input","type","id","primary","ev","currentTarget","label","htmlFor","indicator","children","createElement","components"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { useRadioGroupContext_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RadioProps, RadioState } from './Radio.types';\n\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const nameGroup = useRadioGroupContext_unstable(ctx => ctx.name);\n const value = useRadioGroupContext_unstable(ctx => ctx.value);\n const defaultValue = useRadioGroupContext_unstable(ctx => ctx.defaultValue);\n const disabledGroup = useRadioGroupContext_unstable(ctx => ctx.disabled);\n const layout = useRadioGroupContext_unstable(ctx => ctx.layout);\n const requiredGroup = useRadioGroupContext_unstable(ctx => ctx.required);\n\n const {\n name = nameGroup,\n checked = value !== undefined ? value === props.value : undefined,\n defaultChecked = defaultValue !== undefined ? defaultValue === props.value : undefined,\n labelPosition = layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = disabledGroup,\n required = requiredGroup,\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n });\n\n const input = resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n ...nativeProps.primary,\n },\n });\n\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n\n const label = resolveShorthand(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled,\n },\n });\n\n const indicator = resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: <CircleFilled />,\n },\n });\n\n return {\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n label: Label,\n indicator: 'div',\n },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,yBAAyB,EAAEC,cAAc,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AAC9G,SAASC,6BAA6B,QAAQ,kCAAkC;AAChF,SAASC,cAAc,QAAQ,yBAAyB;AAGxD;;;;;;;;;AASA,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,KAAiB,EAAEC,GAAgC,KAAgB;EACnG,MAAMC,SAAS,GAAGL,6BAA6B,CAACM,GAAG,IAAIA,GAAG,CAACC,IAAI,CAAC;EAChE,MAAMC,KAAK,GAAGR,6BAA6B,CAACM,GAAG,IAAIA,GAAG,CAACE,KAAK,CAAC;EAC7D,MAAMC,YAAY,GAAGT,6BAA6B,CAACM,GAAG,IAAIA,GAAG,CAACG,YAAY,CAAC;EAC3E,MAAMC,aAAa,GAAGV,6BAA6B,CAACM,GAAG,IAAIA,G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ACT,KAAK,CAACa,SAAS,GAAGnB,YAAY,CAClCE,eAAe,CAACI,KAAK,EACrBmB,WAAW,CAACC,IAAI,EAChBD,WAAW,CAACT,aAAa,CAAC,EAC1BD,KAAK,CAACT,KAAK,CAACa,SAAS,CACtB;;AAEL,CAAC","names":["createFocusOutlineStyle","tokens","mergeClasses","shorthands","radioClassNames","root","indicator","input","label","indicatorSize","useRootBaseClassName","useRootStyles","useInputBaseClassName","useInputStyles","useIndicatorBaseClassName","useLabelStyles","useRadioStyles_unstable","state","labelPosition","rootBaseClassName","rootStyles","className","vertical","inputBaseClassName","inputStyles","below","indicatorBaseClassName","labelStyles","base"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { RadioSlots, RadioState } from './Radio.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioClassNames: SlotClassNames<RadioSlots> = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label',\n};\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n height: '100%',\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n\n ':enabled': {\n cursor: 'pointer',\n [`& ~ .${radioClassNames.label}`]: {\n cursor: 'pointer',\n },\n },\n\n // When unchecked, hide the circle icon (child of the indicator)\n [`:not(:checked) ~ .${radioClassNames.indicator} > *`]: {\n opacity: '0',\n },\n\n // Colors for the unchecked state\n ':enabled:not(:checked)': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground3,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessible,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n },\n\n // Colors for the checked state\n ':enabled:checked': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStroke,\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokeHover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokePressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n // Colors for the disabled state\n ':disabled': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'default',\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n below: {\n width: '100%',\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n width: indicatorSize,\n height: indicatorSize,\n fontSize: '12px',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n\n border: tokens.strokeWidthThin + ' solid',\n borderRadius: tokens.borderRadiusCircular,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n});\n\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n },\n\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the Radio, but preserves line height if the label wraps.\n marginTop: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n },\n\n below: {\n paddingTop: tokens.spacingVerticalXS,\n textAlign: 'center',\n },\n});\n\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = (state: RadioState) => {\n const { labelPosition } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootBaseClassName,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputBaseClassName,\n labelPosition === 'below' && inputStyles.below,\n state.input.className,\n );\n\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(\n radioClassNames.indicator,\n indicatorBaseClassName,\n state.indicator.className,\n );\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n radioClassNames.label,\n labelStyles.base,\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n};\n"]}
1
+ {"version":3,"names":["createFocusOutlineStyle","tokens","__resetStyles","__styles","mergeClasses","shorthands","radioClassNames","root","indicator","input","label","indicatorSize","useRootBaseClassName","useRootStyles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","after","B6of3ja","jrapky","fsow6f","useRadioStyles_unstable","state","labelPosition","rootBaseClassName","rootStyles","className","inputBaseClassName","inputStyles","indicatorBaseClassName","labelStyles"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { RadioSlots, RadioState } from './Radio.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioClassNames: SlotClassNames<RadioSlots> = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label',\n};\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n height: '100%',\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n\n ':enabled': {\n cursor: 'pointer',\n [`& ~ .${radioClassNames.label}`]: {\n cursor: 'pointer',\n },\n },\n\n // When unchecked, hide the circle icon (child of the indicator)\n [`:not(:checked) ~ .${radioClassNames.indicator} > *`]: {\n opacity: '0',\n },\n\n // Colors for the unchecked state\n ':enabled:not(:checked)': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground3,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessible,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n },\n\n // Colors for the checked state\n ':enabled:checked': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStroke,\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokeHover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokePressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n // Colors for the disabled state\n ':disabled': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'default',\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n below: {\n width: '100%',\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n width: indicatorSize,\n height: indicatorSize,\n fontSize: '12px',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n\n border: tokens.strokeWidthThin + ' solid',\n borderRadius: tokens.borderRadiusCircular,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n});\n\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n },\n\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the Radio, but preserves line height if the label wraps.\n marginTop: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n },\n\n below: {\n paddingTop: tokens.spacingVerticalXS,\n textAlign: 'center',\n },\n});\n\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = (state: RadioState) => {\n const { labelPosition } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootBaseClassName,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputBaseClassName,\n labelPosition === 'below' && inputStyles.below,\n state.input.className,\n );\n\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(\n radioClassNames.indicator,\n indicatorBaseClassName,\n state.indicator.className,\n );\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n radioClassNames.label,\n labelStyles.base,\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n};\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,MAAM,QAAQ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Q,EAChDsB,KAAK,CAAC7B,IAAI,CAACiC,SAAS,CACrB;EAED,MAAMC,kBAAkB,GAAGvB,qBAAqB,EAAE;EAClD,MAAMwB,WAAW,GAAGvB,cAAc,EAAE;EACpCiB,KAAK,CAAC3B,KAAK,CAAC+B,SAAS,GAAGpC,YAAY,CAClCE,eAAe,CAACG,KAAK,EACrBgC,kBAAkB,EAClBJ,aAAa,KAAK,OAAO,IAAIK,WAAW,CAACtB,KAAK,EAC9CgB,KAAK,CAAC3B,KAAK,CAAC+B,SAAS,CACtB;EAED,MAAMG,sBAAsB,GAAGpB,yBAAyB,EAAE;EAC1Da,KAAK,CAAC5B,SAAS,CAACgC,SAAS,GAAGpC,YAAY,CACtCE,eAAe,CAACE,SAAS,EACzBmC,sBAAsB,EACtBP,KAAK,CAAC5B,SAAS,CAACgC,SAAS,CAC1B;EAED,MAAMI,WAAW,GAAGpB,cAAc,EAAE;EACpC,IAAIY,KAAK,CAAC1B,KAAK,EAAE;IACf0B,KAAK,CAAC1B,KAAK,CAAC8B,SAAS,GAAGpC,YAAY,CAClCE,eAAe,CAACI,KAAK,EACrBkC,WAAW,CAACnB,IAAI,EAChBmB,WAAW,CAACP,aAAa,CAAC,EAC1BD,KAAK,CAAC1B,KAAK,CAAC8B,SAAS,CACtB;;AAEL,CAAC"}
@@ -3,6 +3,7 @@ import { renderRadioGroup_unstable } from './renderRadioGroup';
3
3
  import { useRadioGroup_unstable } from './useRadioGroup';
4
4
  import { useRadioGroupStyles_unstable } from './useRadioGroupStyles';
5
5
  import { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';
6
+ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
6
7
  /**
7
8
  * A RadioGroup component presents a set of options where only one option can be selected.
8
9
  */
@@ -10,6 +11,10 @@ export const RadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
10
11
  const state = useRadioGroup_unstable(props, ref);
11
12
  const contextValues = useRadioGroupContextValues(state);
12
13
  useRadioGroupStyles_unstable(state);
14
+ const {
15
+ useRadioGroupStyles_unstable: useCustomStyles
16
+ } = useCustomStyleHooks_unstable();
17
+ useCustomStyles(state);
13
18
  return renderRadioGroup_unstable(state, contextValues);
14
19
  });
15
20
  RadioGroup.displayName = 'RadioGroup';
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,0BAA0B,QAAQ,2CAA2C;AAEtF;;;AAGA,OAAO,MAAMC,UAAU,gBAAyCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGP,sBAAsB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAChD,MAAME,aAAa,GAAGN,0BAA0B,CAACK,KAAK,CAAC;EAEvDN,4BAA4B,CAACM,KAAK,CAAC;EACnC,OAAOR,yBAAyB,CAACQ,KAAK,EAAEC,aAAa,CAAC;AACxD,CAAC,CAAC;AAEFL,UAAU,CAACM,WAAW,GAAG,YAAY","names":["React","renderRadioGroup_unstable","useRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroupContextValues","RadioGroup","forwardRef","props","ref","state","contextValues","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\n\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"]}
1
+ {"version":3,"names":["React","renderRadioGroup_unstable","useRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroupContextValues","useCustomStyleHooks_unstable","RadioGroup","forwardRef","props","ref","state","contextValues","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n\n const { useRadioGroupStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,0BAA0B,QAAQ,2CAA2C;AACtF,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,UAAU,gBAAyCN,KAAK,CAACO,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGR,sBAAsB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAChD,MAAME,aAAa,GAAGP,0BAA0B,CAACM,KAAK,CAAC;EAEvDP,4BAA4B,CAACO,KAAK,CAAC;EAEnC,MAAM;IAAEP,4BAA4B,EAAES;EAAe,CAAE,GAAGP,4BAA4B,EAAE;EACxFO,eAAe,CAACF,KAAK,CAAC;EAEtB,OAAOT,yBAAyB,CAACS,KAAK,EAAEC,aAAa,CAAC;AACxD,CAAC,CAAC;AAEFL,UAAU,CAACO,WAAW,GAAG,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,iBAAiB,QAAQ,kCAAkC;AAGpE;;;AAGA,OAAO,MAAMC,yBAAyB,GAAG,CAACC,KAAsB,EAAEC,aAAsC,KAAI;EAC1G,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,QAAQ,CAAkBG,KAAK,CAAC;EAE7D,oBACEJ,oBAACE,iBAAiB,CAACM,QAAQ;IAACC,KAAK,EAAEJ,aAAa,CAACK;EAAU,gBACzDV,oBAACM,KAAK,CAACK,IAAI;IAAA,GAAKJ,SAAS,CAACI;EAAI,EAAI,CACP;AAEjC,CAAC","names":["React","getSlots","RadioGroupContext","renderRadioGroup_unstable","state","contextValues","slots","slotProps","Provider","value","radioGroup","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/renderRadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n const { slots, slotProps } = getSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <slots.root {...slotProps.root} />\n </RadioGroupContext.Provider>\n );\n};\n"]}
1
+ {"version":3,"names":["React","getSlots","RadioGroupContext","renderRadioGroup_unstable","state","contextValues","slots","slotProps","createElement","Provider","value","radioGroup","root"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/renderRadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n const { slots, slotProps } = getSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <slots.root {...slotProps.root} />\n </RadioGroupContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,iBAAiB,QAAQ,kCAAkC;AAGpE;;;AAGA,OAAO,MAAMC,yBAAyB,GAAGA,CAACC,KAAsB,EAAEC,aAAsC,KAAI;EAC1G,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,QAAQ,CAAkBG,KAAK,CAAC;EAE7D,oBACEJ,KAAA,CAAAQ,aAAA,CAACN,iBAAiB,CAACO,QAAQ;IAACC,KAAK,EAAEL,aAAa,CAACM;EAAU,gBACzDX,KAAA,CAAAQ,aAAA,CAACF,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,CACP;AAEjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AAG1F;;;;;;;;;AASA,OAAO,MAAMC,sBAAsB,GAAG,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","names":["getNativeElementProps","useEventCallback","useId","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","ev","target","HTMLInputElement","type"],"sourceRoot":"../src/","sources":["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"]}
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 +1 @@
1
- {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,QAAQ,gBAAgB;AAIzD,OAAO,MAAMC,oBAAoB,GAAoC;EACnEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAShB;AAEF;;;AAGA,OAAO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAI;EACrE,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGP,YAAY,CACjCC,oBAAoB,CAACC,IAAI,EACzBI,MAAM,CAACJ,IAAI,EACXG,KAAK,CAACG,MAAM,KAAK,UAAU,IAAIF,MAAM,CAACG,QAAQ,EAC9CJ,KAAK,CAACH,IAAI,CAACK,SAAS,CACrB;AACH,CAAC","names":["mergeClasses","radioGroupClassNames","root","useStyles","useRadioGroupStyles_unstable","state","styles","className","layout","vertical"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/useRadioGroupStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioGroupClassNames: SlotClassNames<RadioGroupSlots> = {\n root: 'fui-RadioGroup',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n\n vertical: {\n flexDirection: 'column',\n },\n});\n\n/**\n * Apply styling to the RadioGroup slots based on the state\n */\nexport const useRadioGroupStyles_unstable = (state: RadioGroupState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n radioGroupClassNames.root,\n styles.root,\n state.layout === 'vertical' && styles.vertical,\n state.root.className,\n );\n};\n"]}
1
+ {"version":3,"names":["__styles","mergeClasses","radioGroupClassNames","root","useStyles","mc9l5x","Bt984gj","vertical","Beiy3e4","d","useRadioGroupStyles_unstable","state","styles","className","layout"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/useRadioGroupStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioGroupClassNames: SlotClassNames<RadioGroupSlots> = {\n root: 'fui-RadioGroup',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n\n vertical: {\n flexDirection: 'column',\n },\n});\n\n/**\n * Apply styling to the RadioGroup slots based on the state\n */\nexport const useRadioGroupStyles_unstable = (state: RadioGroupState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n radioGroupClassNames.root,\n styles.root,\n state.layout === 'vertical' && styles.vertical,\n state.root.className,\n );\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AAIzD,OAAO,MAAMC,oBAAoB,GAAoC;EACnEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGJ,QAAA;EAAAG,IAAA;IAAAE,MAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAShB;AAEF;;;AAGA,OAAO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAI;EACrE,MAAMC,MAAM,GAAGR,SAAS,EAAE;EAC1BO,KAAK,CAACR,IAAI,CAACU,SAAS,GAAGZ,YAAY,CACjCC,oBAAoB,CAACC,IAAI,EACzBS,MAAM,CAACT,IAAI,EACXQ,KAAK,CAACG,MAAM,KAAK,UAAU,IAAIF,MAAM,CAACL,QAAQ,EAC9CI,KAAK,CAACR,IAAI,CAACU,SAAS,CACrB;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA;AACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ,uBAAuB;AAE/G,SAASC,UAAU,EAAEC,oBAAoB,QAAyB,kBAAkB;AAIpF;AACA,OAAO,MAAMC,yBAAyB,gBAAGJ,4BAA4B,CAACG,oBAAoB,CAACE,IAAI,CAAC;AAChG;AACA,OAAO,MAAMC,eAAe,gBAA8CL,mBAAmB,CAACC,UAAU,CAAC","names":["getDeprecatedFieldClassNames","makeDeprecatedField","RadioGroup","radioGroupClassNames","radioGroupFieldClassNames","root","RadioGroupField"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroup, radioGroupClassNames, RadioGroupProps } from '../../RadioGroup';\n\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport type RadioGroupFieldProps = DeprecatedFieldProps<RadioGroupProps>;\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const radioGroupFieldClassNames = getDeprecatedFieldClassNames(radioGroupClassNames.root);\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const RadioGroupField: ForwardRefComponent<RadioGroupFieldProps> = makeDeprecatedField(RadioGroup);\n"]}
1
+ {"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","RadioGroup","radioGroupClassNames","radioGroupFieldClassNames","root","RadioGroupField"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroup, radioGroupClassNames, RadioGroupProps } from '../../RadioGroup';\n\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport type RadioGroupFieldProps = DeprecatedFieldProps<RadioGroupProps>;\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const radioGroupFieldClassNames = getDeprecatedFieldClassNames(radioGroupClassNames.root);\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const RadioGroupField: ForwardRefComponent<RadioGroupFieldProps> = makeDeprecatedField(RadioGroup);\n"],"mappings":"AAAA;AACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ,uBAAuB;AAE/G,SAASC,UAAU,EAAEC,oBAAoB,QAAyB,kBAAkB;AAIpF;AACA,OAAO,MAAMC,yBAAyB,gBAAGJ,4BAA4B,CAACG,oBAAoB,CAACE,IAAI,CAAC;AAChG;AACA,OAAO,MAAMC,eAAe,gBAA8CL,mBAAmB,CAACC,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAyB,kCAAkC;AAIrG;;;AAGA,OAAO,MAAMC,iBAAiB,gBAAoCF,aAAa,CAC7EG,SAAS,CACyB;AAEpC,MAAMC,6BAA6B,GAA2B,EAAE;AAEhE,OAAO,MAAMC,kBAAkB,GAAGH,iBAAiB,CAACI,QAAQ;AAE5D,OAAO,MAAMC,6BAA6B,GAAOC,QAAoD,IACnGP,kBAAkB,CAACC,iBAAiB,EAAE,CAACO,GAAG,GAAGL,6BAA6B,KAAKI,QAAQ,CAACC,GAAG,CAAC,CAAC","names":["createContext","useContextSelector","RadioGroupContext","undefined","radioGroupContextDefaultValue","RadioGroupProvider","Provider","useRadioGroupContext_unstable","selector","ctx"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/contexts/RadioGroupContext.ts"],"sourcesContent":["import { createContext, useContextSelector, ContextSelector } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext: Context<RadioGroupContextValue> = createContext<RadioGroupContextValue | undefined>(\n undefined,\n) as Context<RadioGroupContextValue>;\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\nexport const useRadioGroupContext_unstable = <T>(selector: ContextSelector<RadioGroupContextValue, T>): T =>\n useContextSelector(RadioGroupContext, (ctx = radioGroupContextDefaultValue) => selector(ctx));\n"]}
1
+ {"version":3,"names":["createContext","useContextSelector","RadioGroupContext","undefined","radioGroupContextDefaultValue","RadioGroupProvider","Provider","useRadioGroupContext_unstable","selector","ctx"],"sources":["../src/packages/react-components/react-radio/src/contexts/RadioGroupContext.ts"],"sourcesContent":["import { createContext, useContextSelector, ContextSelector } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext: Context<RadioGroupContextValue> = createContext<RadioGroupContextValue | undefined>(\n undefined,\n) as Context<RadioGroupContextValue>;\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\nexport const useRadioGroupContext_unstable = <T>(selector: ContextSelector<RadioGroupContextValue, T>): T =>\n useContextSelector(RadioGroupContext, (ctx = radioGroupContextDefaultValue) => selector(ctx));\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAyB,kCAAkC;AAIrG;;;AAGA,OAAO,MAAMC,iBAAiB,gBAAoCF,aAAa,CAC7EG,SAAS,CACyB;AAEpC,MAAMC,6BAA6B,GAA2B,EAAE;AAEhE,OAAO,MAAMC,kBAAkB,GAAGH,iBAAiB,CAACI,QAAQ;AAE5D,OAAO,MAAMC,6BAA6B,GAAOC,QAAoD,IACnGP,kBAAkB,CAACC,iBAAiB,EAAE,CAACO,GAAG,GAAGL,6BAA6B,KAAKI,QAAQ,CAACC,GAAG,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAEA,OAAO,MAAMA,0BAA0B,GAAIC,KAAsB,IAA6B;EAC5F,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAQ,CAAE,GAAGN,KAAK;EAEvE,MAAMO,UAAU,GAA2B;IACzCN,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRC,MAAM;IACNC;GACD;EAED,OAAO;IAAEC;EAAU,CAAE;AACvB,CAAC","names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","radioGroup"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/contexts/useRadioGroupContextValues.ts"],"sourcesContent":["import type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n\n const radioGroup: RadioGroupContextValue = {\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n };\n\n return { radioGroup };\n};\n"]}
1
+ {"version":3,"names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","radioGroup"],"sources":["../src/packages/react-components/react-radio/src/contexts/useRadioGroupContextValues.ts"],"sourcesContent":["import type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n\n const radioGroup: RadioGroupContextValue = {\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n };\n\n return { radioGroup };\n};\n"],"mappings":"AAEA,OAAO,MAAMA,0BAA0B,GAAIC,KAAsB,IAA6B;EAC5F,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAQ,CAAE,GAAGN,KAAK;EAEvE,MAAMO,UAAU,GAA2B;IACzCN,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRC,MAAM;IACNC;GACD;EAED,OAAO;IAAEC;EAAU,CAAE;AACvB,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,cAAc;AASrB,SAASC,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,SAAS;AAElH,SAASC,kBAAkB,EAAEC,0BAA0B,EAAEC,6BAA6B,QAAQ,kBAAkB;AAEhH;AACA,SAASC,eAAe,IAAIC,wBAAwB,EAAEC,yBAAyB,QAAQ,mBAAmB","names":["RadioGroup","radioGroupClassNames","renderRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroup_unstable","Radio","radioClassNames","renderRadio_unstable","useRadioStyles_unstable","useRadio_unstable","RadioGroupProvider","useRadioGroupContextValues","useRadioGroupContext_unstable","RadioGroupField","RadioGroupField_unstable","radioGroupFieldClassNames"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport { RadioGroupProvider, useRadioGroupContextValues, useRadioGroupContext_unstable } from './contexts/index';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { RadioGroupField as RadioGroupField_unstable, radioGroupFieldClassNames } from './RadioGroupField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { RadioGroupFieldProps as RadioGroupFieldProps_unstable } from './RadioGroupField';\n"]}
1
+ {"version":3,"names":["RadioGroup","radioGroupClassNames","renderRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroup_unstable","Radio","radioClassNames","renderRadio_unstable","useRadioStyles_unstable","useRadio_unstable","RadioGroupProvider","useRadioGroupContextValues","useRadioGroupContext_unstable","RadioGroupField","RadioGroupField_unstable","radioGroupFieldClassNames"],"sources":["../src/packages/react-components/react-radio/src/index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport { RadioGroupProvider, useRadioGroupContextValues, useRadioGroupContext_unstable } from './contexts/index';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { RadioGroupField as RadioGroupField_unstable, radioGroupFieldClassNames } from './RadioGroupField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { RadioGroupFieldProps as RadioGroupFieldProps_unstable } from './RadioGroupField';\n"],"mappings":"AAAA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,cAAc;AASrB,SAASC,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,SAAS;AAElH,SAASC,kBAAkB,EAAEC,0BAA0B,EAAEC,6BAA6B,QAAQ,kBAAkB;AAEhH;AACA,SAASC,eAAe,IAAIC,wBAAwB,EAAEC,yBAAyB,QAAQ,mBAAmB"}
@@ -1,4 +1,4 @@
1
- define(["require", "exports", "react", "./renderRadio", "./useRadio", "./useRadioStyles"], function (require, exports, React, renderRadio_1, useRadio_1, useRadioStyles_1) {
1
+ define(["require", "exports", "react", "./renderRadio", "./useRadio", "./useRadioStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, renderRadio_1, useRadio_1, useRadioStyles_1, react_shared_contexts_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Radio = void 0;
@@ -8,6 +8,8 @@ define(["require", "exports", "react", "./renderRadio", "./useRadio", "./useRadi
8
8
  exports.Radio = React.forwardRef(function (props, ref) {
9
9
  var state = useRadio_1.useRadio_unstable(props, ref);
10
10
  useRadioStyles_1.useRadioStyles_unstable(state);
11
+ var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useRadioStyles_unstable;
12
+ useCustomStyles(state);
11
13
  return renderRadio_1.renderRadio_unstable(state);
12
14
  });
13
15
  exports.Radio.displayName = 'Radio';
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/Radio/Radio.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,KAAK,GAAoC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAChF,IAAM,KAAK,GAAG,4BAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE5C,wCAAuB,CAAC,KAAK,CAAC,CAAC;QAC/B,OAAO,kCAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"]}
1
+ {"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/Radio/Radio.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IACU,QAAA,KAAK,GAAoC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAChF,IAAM,KAAK,GAAG,4BAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE5C,wCAAuB,CAAC,KAAK,CAAC,CAAC;QAEvB,IAAyB,eAAe,GAAK,oDAA4B,EAAE,wBAAnC,CAAoC;QACpF,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,kCAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n\n const { useRadioStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"]}
@@ -1,4 +1,4 @@
1
- define(["require", "exports", "react", "./renderRadioGroup", "./useRadioGroup", "./useRadioGroupStyles", "../../contexts/useRadioGroupContextValues"], function (require, exports, React, renderRadioGroup_1, useRadioGroup_1, useRadioGroupStyles_1, useRadioGroupContextValues_1) {
1
+ define(["require", "exports", "react", "./renderRadioGroup", "./useRadioGroup", "./useRadioGroupStyles", "../../contexts/useRadioGroupContextValues", "@fluentui/react-shared-contexts"], function (require, exports, React, renderRadioGroup_1, useRadioGroup_1, useRadioGroupStyles_1, useRadioGroupContextValues_1, react_shared_contexts_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.RadioGroup = void 0;
@@ -9,6 +9,8 @@ define(["require", "exports", "react", "./renderRadioGroup", "./useRadioGroup",
9
9
  var state = useRadioGroup_1.useRadioGroup_unstable(props, ref);
10
10
  var contextValues = useRadioGroupContextValues_1.useRadioGroupContextValues(state);
11
11
  useRadioGroupStyles_1.useRadioGroupStyles_unstable(state);
12
+ var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useRadioGroupStyles_unstable;
13
+ useCustomStyles(state);
12
14
  return renderRadioGroup_1.renderRadioGroup_unstable(state, contextValues);
13
15
  });
14
16
  exports.RadioGroup.displayName = 'RadioGroup';
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IACU,QAAA,UAAU,GAAyC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC1F,IAAM,KAAK,GAAG,sCAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACjD,IAAM,aAAa,GAAG,uDAA0B,CAAC,KAAK,CAAC,CAAC;QAExD,kDAA4B,CAAC,KAAK,CAAC,CAAC;QACpC,OAAO,4CAAyB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\n\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"]}
1
+ {"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";;;;IASA;;OAEG;IACU,QAAA,UAAU,GAAyC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC1F,IAAM,KAAK,GAAG,sCAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACjD,IAAM,aAAa,GAAG,uDAA0B,CAAC,KAAK,CAAC,CAAC;QAExD,kDAA4B,CAAC,KAAK,CAAC,CAAC;QAE5B,IAA8B,eAAe,GAAK,oDAA4B,EAAE,6BAAnC,CAAoC;QACzF,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,4CAAyB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n\n const { useRadioGroupStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"]}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/Radio.ts"],"sourcesContent":["export * from './components/Radio/index';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/Radio.ts"],"sourcesContent":["export * from './components/Radio/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/RadioGroup.ts"],"sourcesContent":["export * from './components/RadioGroup/index';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/RadioGroup.ts"],"sourcesContent":["export * from './components/RadioGroup/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mCAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/RadioGroupField.ts"],"sourcesContent":["export * from './components/RadioGroupField/index';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/RadioGroupField.ts"],"sourcesContent":["export * from './components/RadioGroupField/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,wCAAAC,OAAA"}
@@ -8,12 +8,17 @@ const React = /*#__PURE__*/require("react");
8
8
  const renderRadio_1 = /*#__PURE__*/require("./renderRadio");
9
9
  const useRadio_1 = /*#__PURE__*/require("./useRadio");
10
10
  const useRadioStyles_1 = /*#__PURE__*/require("./useRadioStyles");
11
+ const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
11
12
  /**
12
13
  * Radio component is a wrapper for a radio button with a label.
13
14
  */
14
15
  exports.Radio = /*#__PURE__*/React.forwardRef((props, ref) => {
15
16
  const state = useRadio_1.useRadio_unstable(props, ref);
16
17
  useRadioStyles_1.useRadioStyles_unstable(state);
18
+ const {
19
+ useRadioStyles_unstable: useCustomStyles
20
+ } = react_shared_contexts_1.useCustomStyleHooks_unstable();
21
+ useCustomStyles(state);
17
22
  return renderRadio_1.renderRadio_unstable(state);
18
23
  });
19
24
  exports.Radio.displayName = 'Radio';
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAGA;AACA;AACA;AAEA;;;AAGaA,aAAK,gBAAoCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGC,4BAAiB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE3CG,wCAAuB,CAACF,KAAK,CAAC;EAC9B,OAAOG,kCAAoB,CAACH,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFL,aAAK,CAACS,WAAW,GAAG,OAAO","names":["exports","React","forwardRef","props","ref","state","useRadio_1","useRadioStyles_1","renderRadio_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"]}
1
+ {"version":3,"names":["React","require","renderRadio_1","useRadio_1","useRadioStyles_1","react_shared_contexts_1","exports","Radio","forwardRef","props","ref","state","useRadio_unstable","useRadioStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderRadio_unstable","displayName"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n\n const { useRadioStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAGA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,UAAA,gBAAAF,OAAA;AACA,MAAAG,gBAAA,gBAAAH,OAAA;AACA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,KAAK,gBAAoCP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGR,UAAA,CAAAS,iBAAiB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE3CN,gBAAA,CAAAS,uBAAuB,CAACF,KAAK,CAAC;EAE9B,MAAM;IAAEE,uBAAuB,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACnFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOT,aAAA,CAAAc,oBAAoB,CAACL,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFL,OAAA,CAAAC,KAAK,CAACU,WAAW,GAAG,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["../src/packages/react-components/react-radio/src/components/Radio/Radio.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioSlots = {\n /**\n * The root element of the Radio.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Radio>`.\n * All other native props will be applied to the primary slot: `input`\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Radio's label.\n */\n label: Slot<typeof Label>;\n\n /**\n * Hidden input that handles the radio's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<Radio>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * A circle outline, with a filled circle icon inside when the Radio is checked.\n */\n indicator: NonNullable<Slot<'div'>>;\n};\n\n/**\n * Radio Props\n */\nexport type RadioProps = Omit<ComponentProps<Partial<RadioSlots>, 'input'>, 'onChange' | 'size'> & {\n /**\n * The value of the RadioGroup when this Radio item is selected.\n */\n value?: string;\n\n /**\n * The position of the label relative to the radio indicator.\n *\n * This defaults to `after` unless the Radio is inside a RadioGroup with `layout=\"horizontalStacked\"`,\n * in which case it defaults to `below`.\n *\n * @defaultvalue after\n */\n labelPosition?: 'after' | 'below';\n\n /**\n * Disable this Radio item.\n */\n disabled?: boolean;\n\n /**\n * Callback when this Radio is selected in its group.\n *\n * **Note:** `onChange` is NOT called when this Radio is deselected.\n * Use RadioGroup's `onChange` event to determine when the selection in the group changes.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: RadioOnChangeData) => void;\n};\n\n/**\n * Data for the onChange event for Radio.\n */\nexport type RadioOnChangeData = {\n /**\n * The value prop of this Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering Radio\n */\nexport type RadioState = ComponentState<RadioSlots> & Required<Pick<RadioProps, 'labelPosition'>>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/index.ts"],"sourcesContent":["export * from './Radio';\nexport * from './Radio.types';\nexport * from './renderRadio';\nexport * from './useRadio';\nexport * from './useRadioStyles';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/index.ts"],"sourcesContent":["export * from './Radio';\nexport * from './Radio.types';\nexport * from './renderRadio';\nexport * from './useRadio';\nexport * from './useRadioStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,aAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,gBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAaH,KAAK,CAAC;EAExD,OACEI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC5BD,oBAACH,KAAK,CAACK,KAAK;IAAA,GAAKJ,SAAS,CAACI;EAAK,EAAI,EACpCF,oBAACH,KAAK,CAACM,SAAS;IAAA,GAAKL,SAAS,CAACK;EAAS,EAAI,EAC3CN,KAAK,CAACO,KAAK,IAAIJ,oBAACH,KAAK,CAACO,KAAK;IAAA,GAAKN,SAAS,CAACM;EAAK,EAAI,CACzC;AAEjB,CAAC;AAVYC,4BAAoB","names":["renderRadio_unstable","state","slots","slotProps","react_utilities_1","React","root","input","indicator","label","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/renderRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n const { slots, slotProps } = getSlots<RadioSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.indicator {...slotProps.indicator} />\n {slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"]}
1
+ {"version":3,"names":["React","require","react_utilities_1","renderRadio_unstable","state","slots","slotProps","getSlots","createElement","root","input","indicator","label","exports"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/renderRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n const { slots, slotProps } = getSlots<RadioSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.indicator {...slotProps.indicator} />\n {slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAaH,KAAK,CAAC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K,CAACE,EAAE;MACjBlB;;GAEH,CAAC;EAEF,MAAMwB,SAAS,GAAGd,kCAAgB,CAACnB,KAAK,CAACiC,SAAS,EAAE;IAClDrB,QAAQ,EAAE,IAAI;IACdW,YAAY,EAAE;MACZ,aAAa,EAAE,IAAI;MACnBW,QAAQ,EAAEC,oBAACC,0BAAY;;GAE1B,CAAC;EAEF,OAAO;IACLpB,aAAa;IACbqB,UAAU,EAAE;MACVf,IAAI,EAAE,MAAM;MACZG,KAAK,EAAE,OAAO;MACdM,KAAK,EAAEO,mBAAK;MACZL,SAAS,EAAE;KACZ;IACDX,IAAI;IACJG,KAAK;IACLM,KAAK;IACLE;GACD;AACH,CAAC;AA7EYM,yBAAiB","names":["useRadio_unstable","props","ref","nameGroup","RadioGroupContext_1","ctx","name","value","defaultValue","disabledGroup","disabled","layout","requiredGroup","required","checked","undefined","defaultChecked","labelPosition","onChange","nativeProps","react_utilities_1","primarySlotTagName","excludedPropNames","root","defaultProps","react_tabster_1","input","type","id","primary","ev","currentTarget","label","htmlFor","indicator","children","React","react_icons_1","components","react_label_1","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { useRadioGroupContext_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RadioProps, RadioState } from './Radio.types';\n\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const nameGroup = useRadioGroupContext_unstable(ctx => ctx.name);\n const value = useRadioGroupContext_unstable(ctx => ctx.value);\n const defaultValue = useRadioGroupContext_unstable(ctx => ctx.defaultValue);\n const disabledGroup = useRadioGroupContext_unstable(ctx => ctx.disabled);\n const layout = useRadioGroupContext_unstable(ctx => ctx.layout);\n const requiredGroup = useRadioGroupContext_unstable(ctx => ctx.required);\n\n const {\n name = nameGroup,\n checked = value !== undefined ? value === props.value : undefined,\n defaultChecked = defaultValue !== undefined ? defaultValue === props.value : undefined,\n labelPosition = layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = disabledGroup,\n required = requiredGroup,\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n });\n\n const input = resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n ...nativeProps.primary,\n },\n });\n\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n\n const label = resolveShorthand(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled,\n },\n });\n\n const indicator = resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: <CircleFilled />,\n },\n });\n\n return {\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n label: Label,\n indicator: 'div',\n },\n root,\n input,\n label,\n indicator,\n };\n};\n"]}
1
+ {"version":3,"names":["React","require","react_icons_1","react_label_1","react_utilities_1","RadioGroupContext_1","react_tabster_1","useRadio_unstable","props","ref","nameGroup","useRadioGroupContext_unstable","ctx","name","value","defaultValue","disabledGroup","disabled","layout","requiredGroup","required","checked","undefined","defaultChecked","labelPosition","onChange","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","root","resolveShorthand","defaultProps","useFocusWithin","input","type","id","useId","primary","mergeCallbacks","ev","currentTarget","label","htmlFor","indicator","children","createElement","CircleFilled","components","Label","exports"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { useRadioGroupContext_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RadioProps, RadioState } from './Radio.types';\n\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const nameGroup = useRadioGroupContext_unstable(ctx => ctx.name);\n const value = useRadioGroupContext_unstable(ctx => ctx.value);\n const defaultValue = useRadioGroupContext_unstable(ctx => ctx.defaultValue);\n const disabledGroup = useRadioGroupContext_unstable(ctx => ctx.disabled);\n const layout = useRadioGroupContext_unstable(ctx => ctx.layout);\n const requiredGroup = useRadioGroupContext_unstable(ctx => ctx.required);\n\n const {\n name = nameGroup,\n checked = value !== undefined ? value === props.value : undefined,\n defaultChecked = defaultValue !== undefined ? defaultValue === props.value : undefined,\n labelPosition = layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = disabledGroup,\n required = requiredGroup,\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n });\n\n const input = resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n ...nativeProps.primary,\n },\n });\n\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n\n const label = resolveShorthand(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled,\n },\n });\n\n const indicator = resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: <CircleFilled />,\n },\n });\n\n return {\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n label: Label,\n indicator: 'div',\n },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AACA,MAAAG,iBAAA,gBAAAH,OAAA;AACA,MAAAI,mBAAA,gBAAAJ,OAAA;AACA,MAAAK,eAAA,gBAAAL,OAAA;AAGA;;;;;;;;;AASO,MAAMM,iBAAiB,GAAGA,CAACC,KAAiB,EAAEC,GAAgC,KAAgB;EACnG,MAAMC,SAAS,GAAGL,mBAAA,CAAAM,6BAA6B,CAACC,GAAG,IAAIA,GAAG,CAACC,IAAI,CAAC;EAChE,MAAMC,KAAK,GAAGT,mBAAA,CAAAM,6BAA6B,CAACC,GAAG,IAAIA,GAAG,CAACE,KAAK,CAAC;EAC7D,MAAMC,YAAY,GAAGV,mBAAA,CAAAM,6BAA6B,CAACC,GAAG,IAAIA,GAAG,CAACG,YAAY,CAAC;EAC3E,MAAMC,aAAa,GAAGX,mBAAA,CAAAM,6BAA6B,CAACC,GAAG,IAAIA,GAAG,CAACK,QAAQ,CAAC;EACxE,MAAMC,MAAM,GAAGb,mBAAA,CAAAM,6BAA6B,CAACC,GAAG,IAAIA,GAAG,CAACM,MAAM,CAAC;EAC/D,MAAMC,aAAa,GAAGd,mBAAA,CAAAM,6BAA6B,CAACC,GAAG,IAAIA,GAAG,CAAC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,oBAAY,CAClCP,uBAAe,CAACI,KAAK,EACrBoB,WAAW,CAACC,IAAI,EAChBD,WAAW,CAACT,aAAa,CAAC,EAC1BD,KAAK,CAACV,KAAK,CAACc,SAAS,CACtB;;AAEL,CAAC;AArCYlB,+BAAuB","names":["exports","root","indicator","input","label","indicatorSize","useRootBaseClassName","react_1","useRootStyles","useInputBaseClassName","useInputStyles","useIndicatorBaseClassName","useLabelStyles","useRadioStyles_unstable","state","labelPosition","rootBaseClassName","rootStyles","className","vertical","inputBaseClassName","inputStyles","below","indicatorBaseClassName","labelStyles","base"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { RadioSlots, RadioState } from './Radio.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioClassNames: SlotClassNames<RadioSlots> = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label',\n};\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n height: '100%',\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n\n ':enabled': {\n cursor: 'pointer',\n [`& ~ .${radioClassNames.label}`]: {\n cursor: 'pointer',\n },\n },\n\n // When unchecked, hide the circle icon (child of the indicator)\n [`:not(:checked) ~ .${radioClassNames.indicator} > *`]: {\n opacity: '0',\n },\n\n // Colors for the unchecked state\n ':enabled:not(:checked)': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground3,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessible,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n },\n\n // Colors for the checked state\n ':enabled:checked': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStroke,\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokeHover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokePressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n // Colors for the disabled state\n ':disabled': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'default',\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n below: {\n width: '100%',\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n width: indicatorSize,\n height: indicatorSize,\n fontSize: '12px',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n\n border: tokens.strokeWidthThin + ' solid',\n borderRadius: tokens.borderRadiusCircular,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n});\n\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n },\n\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the Radio, but preserves line height if the label wraps.\n marginTop: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n },\n\n below: {\n paddingTop: tokens.spacingVerticalXS,\n textAlign: 'center',\n },\n});\n\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = (state: RadioState) => {\n const { labelPosition } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootBaseClassName,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputBaseClassName,\n labelPosition === 'below' && inputStyles.below,\n state.input.className,\n );\n\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(\n radioClassNames.indicator,\n indicatorBaseClassName,\n state.indicator.className,\n );\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n radioClassNames.label,\n labelStyles.base,\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n};\n"]}
1
+ {"version":3,"names":["react_tabster_1","require","react_theme_1","react_1","exports","radioClassNames","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","after","B6of3ja","jrapky","fsow6f","useRadioStyles_unstable","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","labelStyles"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { RadioSlots, RadioState } from './Radio.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioClassNames: SlotClassNames<RadioSlots> = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label',\n};\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n height: '100%',\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n\n ':enabled': {\n cursor: 'pointer',\n [`& ~ .${radioClassNames.label}`]: {\n cursor: 'pointer',\n },\n },\n\n // When unchecked, hide the circle icon (child of the indicator)\n [`:not(:checked) ~ .${radioClassNames.indicator} > *`]: {\n opacity: '0',\n },\n\n // Colors for the unchecked state\n ':enabled:not(:checked)': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground3,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessible,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n },\n\n // Colors for the checked state\n ':enabled:checked': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStroke,\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokeHover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokePressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n // Colors for the disabled state\n ':disabled': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'default',\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n below: {\n width: '100%',\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n width: indicatorSize,\n height: indicatorSize,\n fontSize: '12px',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n\n border: tokens.strokeWidthThin + ' solid',\n borderRadius: tokens.borderRadiusCircular,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n});\n\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n },\n\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the Radio, but preserves line height if the label wraps.\n marginTop: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n },\n\n below: {\n paddingTop: tokens.spacingVerticalXS,\n textAlign: 'center',\n },\n});\n\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = (state: RadioState) => {\n const { labelPosition } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootBaseClassName,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputBaseClassName,\n labelPosition === 'below' && inputStyles.below,\n state.input.className,\n );\n\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(\n radioClassNames.indicator,\n indicatorBaseClassName,\n state.indicator.className,\n );\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n radioClassNames.label,\n labelStyles.base,\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n};\n"],"mappings":";;;;;;AAAA,MAAAA,eAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,OAAA,gBAAAF,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,UAAU,CAACzB,QAAQ,EAChDsB,KAAK,CAAC/B,IAAI,CAACmC,SAAS,CACrB;EAED,MAAME,kBAAkB,GAAGxB,qBAAqB,EAAE;EAClD,MAAMyB,WAAW,GAAGxB,cAAc,EAAE;EACpCiB,KAAK,CAAC7B,KAAK,CAACiC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CAClCtC,OAAA,CAAAC,eAAe,CAACG,KAAK,EACrBmC,kBAAkB,EAClBL,aAAa,KAAK,OAAO,IAAIM,WAAW,CAACvB,KAAK,EAC9CgB,KAAK,CAAC7B,KAAK,CAACiC,SAAS,CACtB;EAED,MAAMI,sBAAsB,GAAGrB,yBAAyB,EAAE;EAC1Da,KAAK,CAAC9B,SAAS,CAACkC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CACtCtC,OAAA,CAAAC,eAAe,CAACE,SAAS,EACzBsC,sBAAsB,EACtBR,KAAK,CAAC9B,SAAS,CAACkC,SAAS,CAC1B;EAED,MAAMK,WAAW,GAAGrB,cAAc,EAAE;EACpC,IAAIY,KAAK,CAAC5B,KAAK,EAAE;IACf4B,KAAK,CAAC5B,KAAK,CAACgC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CAClCtC,OAAA,CAAAC,eAAe,CAACI,KAAK,EACrBqC,WAAW,CAACpB,IAAI,EAChBoB,WAAW,CAACR,aAAa,CAAC,EAC1BD,KAAK,CAAC5B,KAAK,CAACgC,SAAS,CACtB;;AAEL,CAAC;AArCYrC,OAAA,CAAAgC,uBAAuB,GAAAA,uBAAA"}
@@ -9,6 +9,7 @@ const renderRadioGroup_1 = /*#__PURE__*/require("./renderRadioGroup");
9
9
  const useRadioGroup_1 = /*#__PURE__*/require("./useRadioGroup");
10
10
  const useRadioGroupStyles_1 = /*#__PURE__*/require("./useRadioGroupStyles");
11
11
  const useRadioGroupContextValues_1 = /*#__PURE__*/require("../../contexts/useRadioGroupContextValues");
12
+ const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
12
13
  /**
13
14
  * A RadioGroup component presents a set of options where only one option can be selected.
14
15
  */
@@ -16,6 +17,10 @@ exports.RadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
16
17
  const state = useRadioGroup_1.useRadioGroup_unstable(props, ref);
17
18
  const contextValues = useRadioGroupContextValues_1.useRadioGroupContextValues(state);
18
19
  useRadioGroupStyles_1.useRadioGroupStyles_unstable(state);
20
+ const {
21
+ useRadioGroupStyles_unstable: useCustomStyles
22
+ } = react_shared_contexts_1.useCustomStyleHooks_unstable();
23
+ useCustomStyles(state);
19
24
  return renderRadioGroup_1.renderRadioGroup_unstable(state, contextValues);
20
25
  });
21
26
  exports.RadioGroup.displayName = 'RadioGroup';
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAGA;AACA;AACA;AACA;AAEA;;;AAGaA,kBAAU,gBAAyCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGC,sCAAsB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAChD,MAAMG,aAAa,GAAGC,uDAA0B,CAACH,KAAK,CAAC;EAEvDI,kDAA4B,CAACJ,KAAK,CAAC;EACnC,OAAOK,4CAAyB,CAACL,KAAK,EAAEE,aAAa,CAAC;AACxD,CAAC,CAAC;AAEFP,kBAAU,CAACW,WAAW,GAAG,YAAY","names":["exports","React","forwardRef","props","ref","state","useRadioGroup_1","contextValues","useRadioGroupContextValues_1","useRadioGroupStyles_1","renderRadioGroup_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\n\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"]}
1
+ {"version":3,"names":["React","require","renderRadioGroup_1","useRadioGroup_1","useRadioGroupStyles_1","useRadioGroupContextValues_1","react_shared_contexts_1","exports","RadioGroup","forwardRef","props","ref","state","useRadioGroup_unstable","contextValues","useRadioGroupContextValues","useRadioGroupStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderRadioGroup_unstable","displayName"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n\n const { useRadioGroupStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAGA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,eAAA,gBAAAF,OAAA;AACA,MAAAG,qBAAA,gBAAAH,OAAA;AACA,MAAAI,4BAAA,gBAAAJ,OAAA;AACA,MAAAK,uBAAA,gBAAAL,OAAA;AAEA;;;AAGaM,OAAA,CAAAC,UAAU,gBAAyCR,KAAK,CAACS,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGT,eAAA,CAAAU,sBAAsB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAChD,MAAMG,aAAa,GAAGT,4BAAA,CAAAU,0BAA0B,CAACH,KAAK,CAAC;EAEvDR,qBAAA,CAAAY,4BAA4B,CAACJ,KAAK,CAAC;EAEnC,MAAM;IAAEI,4BAA4B,EAAEC;EAAe,CAAE,GAAGX,uBAAA,CAAAY,4BAA4B,EAAE;EACxFD,eAAe,CAACL,KAAK,CAAC;EAEtB,OAAOV,kBAAA,CAAAiB,yBAAyB,CAACP,KAAK,EAAEE,aAAa,CAAC;AACxD,CAAC,CAAC;AAEFP,OAAA,CAAAC,UAAU,CAACY,WAAW,GAAG,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/RadioGroup.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioGroupSlots = {\n /**\n * The radio group root.\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {\n /**\n * The name of this radio group. This name is applied to all Radio items inside this group.\n *\n * If no name is provided, one will be generated so that all of the Radio items have the same name.\n */\n name?: string;\n\n /**\n * The selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n value?: string;\n\n /**\n * The default selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n defaultValue?: string;\n\n /**\n * Callback when the selected Radio item changes.\n */\n onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;\n\n /**\n * How the radio items are laid out in the group.\n *\n * @default vertical\n */\n layout?: 'vertical' | 'horizontal' | 'horizontal-stacked';\n\n /**\n * Disable all Radio items in this group.\n */\n disabled?: boolean;\n\n /**\n * Require a selection in this group. Adds the `required` prop to all child Radio items.\n */\n required?: boolean;\n};\n\n/**\n * Data for the onChange event for RadioGroup.\n */\nexport type RadioGroupOnChangeData = {\n /**\n * The value of the newly selected Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering RadioGroup\n */\nexport type RadioGroupState = ComponentState<RadioGroupSlots> &\n Required<Pick<RadioGroupProps, 'layout'>> &\n Partial<Exclude<RadioGroupProps, 'onChange' | 'layout'>>;\n\nexport type RadioGroupContextValue = Pick<\n RadioGroupProps,\n 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'\n>;\n\nexport type RadioGroupContextValues = {\n radioGroup: RadioGroupContextValue;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/index.ts"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/index.ts"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAGA;;;AAGO,MAAMA,yBAAyB,GAAG,CAACC,KAAsB,EAAEC,aAAsC,KAAI;EAC1G,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAkBJ,KAAK,CAAC;EAE7D,OACEK,oBAACC,qCAAiB,CAACC,QAAQ;IAACC,KAAK,EAAEP,aAAa,CAACQ;EAAU,GACzDJ,oBAACH,KAAK,CAACQ,IAAI;IAAA,GAAKP,SAAS,CAACO;EAAI,EAAI,CACP;AAEjC,CAAC;AARYC,iCAAyB","names":["renderRadioGroup_unstable","state","contextValues","slots","slotProps","react_utilities_1","React","RadioGroupContext_1","Provider","value","radioGroup","root","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/renderRadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n const { slots, slotProps } = getSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <slots.root {...slotProps.root} />\n </RadioGroupContext.Provider>\n );\n};\n"]}
1
+ {"version":3,"names":["React","require","react_utilities_1","RadioGroupContext_1","renderRadioGroup_unstable","state","contextValues","slots","slotProps","getSlots","createElement","RadioGroupContext","Provider","value","radioGroup","root","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/renderRadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n const { slots, slotProps } = getSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <slots.root {...slotProps.root} />\n </RadioGroupContext.Provider>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AAGA;;;AAGO,MAAMG,yBAAyB,GAAGA,CAACC,KAAsB,EAAEC,aAAsC,KAAI;EAC1G,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,iBAAA,CAAAO,QAAQ,CAAkBJ,KAAK,CAAC;EAE7D,OACEL,KAAA,CAAAU,aAAA,CAACP,mBAAA,CAAAQ,iBAAiB,CAACC,QAAQ;IAACC,KAAK,EAAEP,aAAa,CAACQ;EAAU,GACzDd,KAAA,CAAAU,aAAA,CAACH,KAAK,CAACQ,IAAI;IAAA,GAAKP,SAAS,CAACO;EAAI,EAAI,CACP;AAEjC,CAAC;AARYC,OAAA,CAAAZ,yBAAyB,GAAAA,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AACA;AAGA;;;;;;;;;AASO,MAAMA,sBAAsB,GAAG,CAACC,KAAsB,EAAEC,GAA8B,KAAqB;EAChH,MAAMC,aAAa,GAAGC,uBAAK,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,GAAGV,uCAAqB,CAAC,KAAK,EAAEH,KAAK,EAAE,sBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;MACnFS,QAAQ,EAAEN,kCAAgB,CAACW,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;AA1BYa,8BAAsB","names":["useRadioGroup_unstable","props","ref","generatedName","react_utilities_1","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","ev","target","HTMLInputElement","type","exports"],"sourceRoot":"../src/","sources":["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"]}
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,aA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MAAM,KAAK,UAAU,IAAIF,MAAM,CAACG,QAAQ,EAC9CJ,KAAK,CAACJ,IAAI,CAACM,SAAS,CACrB;AACH,CAAC;AARYP,oCAA4B","names":["exports","root","useStyles","react_1","useRadioGroupStyles_unstable","state","styles","className","layout","vertical"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroup/useRadioGroupStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioGroupClassNames: SlotClassNames<RadioGroupSlots> = {\n root: 'fui-RadioGroup',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n\n vertical: {\n flexDirection: 'column',\n },\n});\n\n/**\n * Apply styling to the RadioGroup slots based on the state\n */\nexport const useRadioGroupStyles_unstable = (state: RadioGroupState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n radioGroupClassNames.root,\n styles.root,\n state.layout === 'vertical' && styles.vertical,\n state.root.className,\n );\n};\n"]}
1
+ {"version":3,"names":["react_1","require","exports","radioGroupClassNames","root","useStyles","__styles","mc9l5x","Bt984gj","vertical","Beiy3e4","d","useRadioGroupStyles_unstable","state","styles","className","mergeClasses","layout"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/useRadioGroupStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioGroupClassNames: SlotClassNames<RadioGroupSlots> = {\n root: 'fui-RadioGroup',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n\n vertical: {\n flexDirection: 'column',\n },\n});\n\n/**\n * Apply styling to the RadioGroup slots based on the state\n */\nexport const useRadioGroupStyles_unstable = (state: RadioGroupState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n radioGroupClassNames.root,\n styles.root,\n state.layout === 'vertical' && styles.vertical,\n state.root.className,\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AAIaC,OAAA,CAAAC,oBAAoB,GAAoC;EACnEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGL,OAAA,CAAAM,QAAU;EAAAF,IAAA;IAAAG,MAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAS1B;AAEF;;;AAGO,MAAMC,4BAA4B,GAAIC,KAAsB,IAAI;EACrE,MAAMC,MAAM,GAAGT,SAAS,EAAE;EAC1BQ,KAAK,CAACT,IAAI,CAACW,SAAS,GAAGf,OAAA,CAAAgB,YAAY,CACjCd,OAAA,CAAAC,oBAAoB,CAACC,IAAI,EACzBU,MAAM,CAACV,IAAI,EACXS,KAAK,CAACI,MAAM,KAAK,UAAU,IAAIH,MAAM,CAACL,QAAQ,EAC9CI,KAAK,CAACT,IAAI,CAACW,SAAS,CACrB;AACH,CAAC;AARYb,OAAA,CAAAU,4BAA4B,GAAAA,4BAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAIA;AACaA,iCAAyB,gBAAGC,0CAA4B,CAACC,iCAAoB,CAACC,IAAI,CAAC;AAChG;AACaH,uBAAe,gBAA8CC,iCAAmB,CAACC,uBAAU,CAAC","names":["exports","react_field_1","RadioGroup_1","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroup, radioGroupClassNames, RadioGroupProps } from '../../RadioGroup';\n\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport type RadioGroupFieldProps = DeprecatedFieldProps<RadioGroupProps>;\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const radioGroupFieldClassNames = getDeprecatedFieldClassNames(radioGroupClassNames.root);\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const RadioGroupField: ForwardRefComponent<RadioGroupFieldProps> = makeDeprecatedField(RadioGroup);\n"]}
1
+ {"version":3,"names":["react_field_1","require","RadioGroup_1","exports","radioGroupFieldClassNames","getDeprecatedFieldClassNames","radioGroupClassNames","root","RadioGroupField","makeDeprecatedField","RadioGroup"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroup, radioGroupClassNames, RadioGroupProps } from '../../RadioGroup';\n\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport type RadioGroupFieldProps = DeprecatedFieldProps<RadioGroupProps>;\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const radioGroupFieldClassNames = getDeprecatedFieldClassNames(radioGroupClassNames.root);\n/** @deprecated Use Field with RadioGroup: `<Field><RadioGroup /></Field>` */\nexport const RadioGroupField: ForwardRefComponent<RadioGroupFieldProps> = makeDeprecatedField(RadioGroup);\n"],"mappings":";;;;;;AAAA;AACA,MAAAA,aAAA,gBAAAC,OAAA;AAEA,MAAAC,YAAA,gBAAAD,OAAA;AAIA;AACaE,OAAA,CAAAC,yBAAyB,gBAAGJ,aAAA,CAAAK,4BAA4B,CAACH,YAAA,CAAAI,oBAAoB,CAACC,IAAI,CAAC;AAChG;AACaJ,OAAA,CAAAK,eAAe,gBAA8CR,aAAA,CAAAS,mBAAmB,CAACP,YAAA,CAAAQ,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/components/RadioGroupField/index.ts"],"sourcesContent":["export * from './RadioGroupField';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroupField/index.ts"],"sourcesContent":["export * from './RadioGroupField';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,uBAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAIA;;;AAGaA,yBAAiB,gBAAoCC,sCAAa,CAC7EC,SAAS,CACyB;AAEpC,MAAMC,6BAA6B,GAA2B,EAAE;AAEnDH,0BAAkB,GAAGA,yBAAiB,CAACI,QAAQ;AAErD,MAAMC,6BAA6B,GAAOC,QAAoD,IACnGL,2CAAkB,CAACD,yBAAiB,EAAE,CAACO,GAAG,GAAGJ,6BAA6B,KAAKG,QAAQ,CAACC,GAAG,CAAC,CAAC;AADlFP,qCAA6B","names":["exports","react_context_selector_1","undefined","radioGroupContextDefaultValue","Provider","useRadioGroupContext_unstable","selector","ctx"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/contexts/RadioGroupContext.ts"],"sourcesContent":["import { createContext, useContextSelector, ContextSelector } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext: Context<RadioGroupContextValue> = createContext<RadioGroupContextValue | undefined>(\n undefined,\n) as Context<RadioGroupContextValue>;\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\nexport const useRadioGroupContext_unstable = <T>(selector: ContextSelector<RadioGroupContextValue, T>): T =>\n useContextSelector(RadioGroupContext, (ctx = radioGroupContextDefaultValue) => selector(ctx));\n"]}
1
+ {"version":3,"names":["react_context_selector_1","require","exports","RadioGroupContext","createContext","undefined","radioGroupContextDefaultValue","RadioGroupProvider","Provider","useRadioGroupContext_unstable","selector","useContextSelector","ctx"],"sources":["../src/packages/react-components/react-radio/src/contexts/RadioGroupContext.ts"],"sourcesContent":["import { createContext, useContextSelector, ContextSelector } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext: Context<RadioGroupContextValue> = createContext<RadioGroupContextValue | undefined>(\n undefined,\n) as Context<RadioGroupContextValue>;\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\nexport const useRadioGroupContext_unstable = <T>(selector: ContextSelector<RadioGroupContextValue, T>): T =>\n useContextSelector(RadioGroupContext, (ctx = radioGroupContextDefaultValue) => selector(ctx));\n"],"mappings":";;;;;;AAAA,MAAAA,wBAAA,gBAAAC,OAAA;AAIA;;;AAGaC,OAAA,CAAAC,iBAAiB,gBAAoCH,wBAAA,CAAAI,aAAa,CAC7EC,SAAS,CACyB;AAEpC,MAAMC,6BAA6B,GAA2B,EAAE;AAEnDJ,OAAA,CAAAK,kBAAkB,GAAGL,OAAA,CAAAC,iBAAiB,CAACK,QAAQ;AAErD,MAAMC,6BAA6B,GAAOC,QAAoD,IACnGV,wBAAA,CAAAW,kBAAkB,CAACT,OAAA,CAAAC,iBAAiB,EAAE,CAACS,GAAG,GAAGN,6BAA6B,KAAKI,QAAQ,CAACE,GAAG,CAAC,CAAC;AADlFV,OAAA,CAAAO,6BAA6B,GAAAA,6BAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/contexts/index.ts"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/contexts/index.ts"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kCAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAEO,MAAMA,0BAA0B,GAAIC,KAAsB,IAA6B;EAC5F,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAQ,CAAE,GAAGN,KAAK;EAEvE,MAAMO,UAAU,GAA2B;IACzCN,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRC,MAAM;IACNC;GACD;EAED,OAAO;IAAEC;EAAU,CAAE;AACvB,CAAC;AAbYC,kCAA0B","names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","radioGroup","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/contexts/useRadioGroupContextValues.ts"],"sourcesContent":["import type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n\n const radioGroup: RadioGroupContextValue = {\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n };\n\n return { radioGroup };\n};\n"]}
1
+ {"version":3,"names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","radioGroup","exports"],"sources":["../src/packages/react-components/react-radio/src/contexts/useRadioGroupContextValues.ts"],"sourcesContent":["import type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n\n const radioGroup: RadioGroupContextValue = {\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n };\n\n return { radioGroup };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,0BAA0B,GAAIC,KAAsB,IAA6B;EAC5F,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAQ,CAAE,GAAGN,KAAK;EAEvE,MAAMO,UAAU,GAA2B;IACzCN,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRC,MAAM;IACNC;GACD;EAED,OAAO;IAAEC;EAAU,CAAE;AACvB,CAAC;AAbYC,OAAA,CAAAT,0BAA0B,GAAAA,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,8BAAU;EAAA;AAAA;AACVF;EAAAC;EAAAC;IAAA,wCAAoB;EAAA;AAAA;AACpBF;EAAAC;EAAAC;IAAA,6CAAyB;EAAA;AAAA;AACzBF;EAAAC;EAAAC;IAAA,gDAA4B;EAAA;AAAA;AAC5BF;EAAAC;EAAAC;IAAA,0CAAsB;EAAA;AAAA;AAUxB;AAASF;EAAAC;EAAAC;IAAA,oBAAK;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,8BAAe;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,mCAAoB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,sCAAuB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,gCAAiB;EAAA;AAAA;AAEjG;AAASF;EAAAC;EAAAC;IAAA,iCAAkB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,yCAA0B;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,4CAA6B;EAAA;AAAA;AAEtF;AACA;AAASF;EAAAC;EAAAC;IAAA,wCAAe;EAAA;AAAA;AAA8BF;EAAAC;EAAAC;IAAA,kDAAyB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-radio/src/index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport { RadioGroupProvider, useRadioGroupContextValues, useRadioGroupContext_unstable } from './contexts/index';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { RadioGroupField as RadioGroupField_unstable, radioGroupFieldClassNames } from './RadioGroupField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { RadioGroupFieldProps as RadioGroupFieldProps_unstable } from './RadioGroupField';\n"]}
1
+ {"version":3,"names":["RadioGroup_1","require","Object","defineProperty","exports","enumerable","get","RadioGroup","radioGroupClassNames","renderRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroup_unstable","Radio_1","Radio","radioClassNames","renderRadio_unstable","useRadioStyles_unstable","useRadio_unstable","index_1","RadioGroupProvider","useRadioGroupContextValues","useRadioGroupContext_unstable","RadioGroupField_1","RadioGroupField","radioGroupFieldClassNames"],"sources":["../src/packages/react-components/react-radio/src/index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport { RadioGroupProvider, useRadioGroupContextValues, useRadioGroupContext_unstable } from './contexts/index';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { RadioGroupField as RadioGroupField_unstable, radioGroupFieldClassNames } from './RadioGroupField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { RadioGroupFieldProps as RadioGroupFieldProps_unstable } from './RadioGroupField';\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,gBAAAC,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,YAAA,CAAAO,UAAU;EAAA;AAAA;AACVL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,YAAA,CAAAQ,oBAAoB;EAAA;AAAA;AACpBN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,YAAA,CAAAS,yBAAyB;EAAA;AAAA;AACzBP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,YAAA,CAAAU,4BAA4B;EAAA;AAAA;AAC5BR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,YAAA,CAAAW,sBAAsB;EAAA;AAAA;AAUxB,IAAAC,OAAA,gBAAAX,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,OAAA,CAAAC,KAAK;EAAA;AAAA;AAAEX,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WA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
3
+ "version": "9.1.0",
4
4
  "description": "Fluent UI Radio component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,13 +32,14 @@
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-context-selector": "^9.1.9",
36
- "@fluentui/react-field": "9.0.0-alpha.20",
35
+ "@fluentui/react-context-selector": "^9.1.11",
36
+ "@fluentui/react-field": "9.0.0-alpha.22",
37
37
  "@fluentui/react-icons": "^2.0.175",
38
- "@fluentui/react-label": "^9.0.21",
39
- "@fluentui/react-tabster": "^9.5.2",
38
+ "@fluentui/react-label": "^9.1.0",
39
+ "@fluentui/react-shared-contexts": "^9.3.0",
40
+ "@fluentui/react-tabster": "^9.5.4",
40
41
  "@fluentui/react-theme": "^9.1.5",
41
- "@fluentui/react-utilities": "^9.5.3",
42
+ "@fluentui/react-utilities": "^9.6.1",
42
43
  "@griffel/react": "^1.5.2",
43
44
  "tslib": "^2.1.0"
44
45
  },