@fluentui/react-radio 9.0.4 → 9.0.5

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,84 @@
2
2
  "name": "@fluentui/react-radio",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 03 Aug 2022 16:00:24 GMT",
5
+ "date": "Thu, 15 Sep 2022 09:44:39 GMT",
6
+ "tag": "@fluentui/react-radio_v9.0.5",
7
+ "version": "9.0.5",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "behowell@microsoft.com",
12
+ "package": "@fluentui/react-radio",
13
+ "commit": "22de26fac5b939224884052b0bf86cecc5f22fee",
14
+ "comment": "docs: Clarify the documentation of RadioGroup's required prop"
15
+ },
16
+ {
17
+ "author": "martinhochel@microsoft.com",
18
+ "package": "@fluentui/react-radio",
19
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
20
+ "comment": "chore: update package scaffold"
21
+ }
22
+ ],
23
+ "patch": [
24
+ {
25
+ "author": "behowell@microsoft.com",
26
+ "package": "@fluentui/react-radio",
27
+ "commit": "e598325b985cad3e5057f00893e0176416edd292",
28
+ "comment": "refactor: Replace useMergedEventCallbacks utility with mergeCallbacks"
29
+ },
30
+ {
31
+ "author": "lingfangao@hotmail.com",
32
+ "package": "@fluentui/react-radio",
33
+ "commit": "a606fbedcf7d618d1a48706a5e15c26c4cd85ba6",
34
+ "comment": "chore: fix no-context-default-value lint violations for cxe"
35
+ },
36
+ {
37
+ "author": "olfedias@microsoft.com",
38
+ "package": "@fluentui/react-radio",
39
+ "commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
40
+ "comment": "chore: Update Griffel to latest version"
41
+ },
42
+ {
43
+ "author": "beachball",
44
+ "package": "@fluentui/react-radio",
45
+ "comment": "Bump @fluentui/react-context-selector to v9.0.3",
46
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
47
+ },
48
+ {
49
+ "author": "beachball",
50
+ "package": "@fluentui/react-radio",
51
+ "comment": "Bump @fluentui/react-label to v9.0.5",
52
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
53
+ },
54
+ {
55
+ "author": "beachball",
56
+ "package": "@fluentui/react-radio",
57
+ "comment": "Bump @fluentui/react-tabster to v9.1.1",
58
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
59
+ },
60
+ {
61
+ "author": "beachball",
62
+ "package": "@fluentui/react-radio",
63
+ "comment": "Bump @fluentui/react-theme to v9.1.0",
64
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
65
+ },
66
+ {
67
+ "author": "beachball",
68
+ "package": "@fluentui/react-radio",
69
+ "comment": "Bump @fluentui/react-utilities to v9.1.0",
70
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
71
+ },
72
+ {
73
+ "author": "beachball",
74
+ "package": "@fluentui/react-radio",
75
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
76
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
77
+ }
78
+ ]
79
+ }
80
+ },
81
+ {
82
+ "date": "Wed, 03 Aug 2022 16:03:57 GMT",
6
83
  "tag": "@fluentui/react-radio_v9.0.4",
7
84
  "version": "9.0.4",
8
85
  "comments": {
@@ -37,19 +114,19 @@
37
114
  "author": "beachball",
38
115
  "package": "@fluentui/react-radio",
39
116
  "comment": "Bump @fluentui/react-label to v9.0.4",
40
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
117
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
41
118
  },
42
119
  {
43
120
  "author": "beachball",
44
121
  "package": "@fluentui/react-radio",
45
122
  "comment": "Bump @fluentui/react-tabster to v9.1.0",
46
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
123
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
47
124
  },
48
125
  {
49
126
  "author": "beachball",
50
127
  "package": "@fluentui/react-radio",
51
128
  "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
52
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
129
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
53
130
  }
54
131
  ]
55
132
  }
package/CHANGELOG.md CHANGED
@@ -1,21 +1,38 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Wed, 03 Aug 2022 16:00:24 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 15 Sep 2022 09:44:39 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.5)
8
+
9
+ Thu, 15 Sep 2022 09:44:39 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.4..@fluentui/react-radio_v9.0.5)
11
+
12
+ ### Patches
13
+
14
+ - refactor: Replace useMergedEventCallbacks utility with mergeCallbacks ([PR #24152](https://github.com/microsoft/fluentui/pull/24152) by behowell@microsoft.com)
15
+ - chore: fix no-context-default-value lint violations for cxe ([PR #24277](https://github.com/microsoft/fluentui/pull/24277) by lingfangao@hotmail.com)
16
+ - chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
17
+ - Bump @fluentui/react-context-selector to v9.0.3 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
18
+ - Bump @fluentui/react-label to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
20
+ - Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
21
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
22
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
23
+
7
24
  ## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.4)
8
25
 
9
- Wed, 03 Aug 2022 16:00:24 GMT
26
+ Wed, 03 Aug 2022 16:03:57 GMT
10
27
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.3..@fluentui/react-radio_v9.0.4)
11
28
 
12
29
  ### Patches
13
30
 
14
31
  - refactor: use `useFocusWithin` hook for :focus-within styles ([PR #24154](https://github.com/microsoft/fluentui/pull/24154) by lingfangao@hotmail.com)
15
32
  - chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
16
- - Bump @fluentui/react-label to v9.0.4 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
17
- - Bump @fluentui/react-tabster to v9.1.0 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
18
- - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
33
+ - Bump @fluentui/react-label to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
34
+ - Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
35
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
19
36
 
20
37
  ## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.3)
21
38
 
package/dist/index.d.ts CHANGED
@@ -76,7 +76,7 @@ export declare type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlot
76
76
  */
77
77
  disabled?: boolean;
78
78
  /**
79
- * Require all Radio items in this group.
79
+ * Require a selection in this group. Adds the `required` prop to all child Radio items.
80
80
  */
81
81
  required?: boolean;
82
82
  };
@@ -1,9 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { CircleFilled } from '@fluentui/react-icons';
3
3
  import { Label } from '@fluentui/react-label';
4
- import { getPartitionedNativeProps, resolveShorthand, useId, useMergedEventCallbacks } from '@fluentui/react-utilities';
5
- import { RadioGroupContext } from '../../contexts/RadioGroupContext';
6
- import { useContextSelector } from '@fluentui/react-context-selector';
4
+ import { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';
5
+ import { useRadioGroupContext_unstable } from '../../contexts/RadioGroupContext';
7
6
  import { useFocusWithin } from '@fluentui/react-tabster';
8
7
  /**
9
8
  * Create the state required to render Radio.
@@ -16,12 +15,12 @@ import { useFocusWithin } from '@fluentui/react-tabster';
16
15
  */
17
16
 
18
17
  export const useRadio_unstable = (props, ref) => {
19
- const nameGroup = useContextSelector(RadioGroupContext, ctx => ctx.name);
20
- const value = useContextSelector(RadioGroupContext, ctx => ctx.value);
21
- const defaultValue = useContextSelector(RadioGroupContext, ctx => ctx.defaultValue);
22
- const disabledGroup = useContextSelector(RadioGroupContext, ctx => ctx.disabled);
23
- const layout = useContextSelector(RadioGroupContext, ctx => ctx.layout);
24
- const requiredGroup = useContextSelector(RadioGroupContext, ctx => ctx.required);
18
+ const nameGroup = useRadioGroupContext_unstable(ctx => ctx.name);
19
+ const value = useRadioGroupContext_unstable(ctx => ctx.value);
20
+ const defaultValue = useRadioGroupContext_unstable(ctx => ctx.defaultValue);
21
+ const disabledGroup = useRadioGroupContext_unstable(ctx => ctx.disabled);
22
+ const layout = useRadioGroupContext_unstable(ctx => ctx.layout);
23
+ const requiredGroup = useRadioGroupContext_unstable(ctx => ctx.required);
25
24
  const {
26
25
  name = nameGroup,
27
26
  checked = value !== undefined ? value === props.value : undefined,
@@ -57,7 +56,7 @@ export const useRadio_unstable = (props, ref) => {
57
56
  ...nativeProps.primary
58
57
  }
59
58
  });
60
- input.onChange = useMergedEventCallbacks(input.onChange, ev => onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
59
+ input.onChange = mergeCallbacks(input.onChange, ev => onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
61
60
  value: ev.currentTarget.value
62
61
  }));
63
62
  const label = resolveShorthand(props.label, {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Radio/useRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,uBAA7B;AACA,SAAS,KAAT,QAAsB,uBAAtB;AACA,SAAS,yBAAT,EAAoC,gBAApC,EAAsD,KAAtD,EAA6D,uBAA7D,QAA4F,2BAA5F;AACA,SAAS,iBAAT,QAAkC,kCAAlC;AACA,SAAS,kBAAT,QAAmC,kCAAnC;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;EACnG,MAAM,SAAS,GAAG,kBAAkB,CAAC,iBAAD,EAAoB,GAAG,IAAI,GAAG,CAAC,IAA/B,CAApC;EACA,MAAM,KAAK,GAAG,kBAAkB,CAAC,iBAAD,EAAoB,GAAG,IAAI,GAAG,CAAC,KAA/B,CAAhC;EACA,MAAM,YAAY,GAAG,kBAAkB,CAAC,iBAAD,EAAoB,GAAG,IAAI,GAAG,CAAC,YAA/B,CAAvC;EACA,MAAM,aAAa,GAAG,kBAAkB,CAAC,iBAAD,EAAoB,GAAG,IAAI,GAAG,CAAC,QAA/B,CAAxC;EACA,MAAM,MAAM,GAAG,kBAAkB,CAAC,iBAAD,EAAoB,GAAG,IAAI,GAAG,CAAC,MAA/B,CAAjC;EACA,MAAM,aAAa,GAAG,kBAAkB,CAAC,iBAAD,EAAoB,GAAG,IAAI,GAAG,CAAC,QAA/B,CAAxC;EAEA,MAAM;IACJ,IAAI,GAAG,SADH;IAEJ,OAAO,GAAG,KAAK,KAAK,SAAV,GAAsB,KAAK,KAAK,KAAK,CAAC,KAAtC,GAA8C,SAFpD;IAGJ,cAAc,G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1C,YAAY,EAAE;MACZ,OAAO,EAAE,KAAK,CAAC,EADH;MAEZ;IAFY;EAD4B,CAAd,CAA9B;EAOA,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB;IAClD,QAAQ,EAAE,IADwC;IAElD,YAAY,EAAE;MACZ,eAAe,IADH;MAEZ,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,YAAD,EAAa,IAAb;IAFE;EAFoC,CAAlB,CAAlC;EAQA,OAAO;IACL,aADK;IAEL,UAAU,EAAE;MACV,IAAI,EAAE,MADI;MAEV,KAAK,EAAE,OAFG;MAGV,KAAK,EAAE,KAHG;MAIV,SAAS,EAAE;IAJD,CAFP;IAQL,IARK;IASL,KATK;IAUL,KAVK;IAWL;EAXK,CAAP;AAaD,CA7EM","sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, resolveShorthand, useId, useMergedEventCallbacks } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { useContextSelector } from '@fluentui/react-context-selector';\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 = useContextSelector(RadioGroupContext, ctx => ctx.name);\n const value = useContextSelector(RadioGroupContext, ctx => ctx.value);\n const defaultValue = useContextSelector(RadioGroupContext, ctx => ctx.defaultValue);\n const disabledGroup = useContextSelector(RadioGroupContext, ctx => ctx.disabled);\n const layout = useContextSelector(RadioGroupContext, ctx => ctx.layout);\n const requiredGroup = useContextSelector(RadioGroupContext, 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 = useMergedEventCallbacks(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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Radio/useRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,uBAA7B;AACA,SAAS,KAAT,QAAsB,uBAAtB;AACA,SAAS,yBAAT,EAAoC,cAApC,EAAoD,gBAApD,EAAsE,KAAtE,QAAmF,2BAAnF;AACA,SAAS,6BAAT,QAA8C,kCAA9C;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;EACnG,MAAM,SAAS,GAAG,6B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E1C,YAAY,EAAE;MACZ,GADY;MAEZ,IAAI,EAAE,OAFM;MAGZ,EAAE,EAAE,KAAK,CAAC,QAAD,EAAW,WAAW,CAAC,OAAZ,CAAoB,EAA/B,CAHG;MAIZ,IAJY;MAKZ,OALY;MAMZ,cANY;MAOZ,QAPY;MAQZ,QARY;MASZ,GAAG,WAAW,CAAC;IATH;EAF4B,CAAd,CAA9B;EAeA,KAAK,CAAC,QAAN,GAAiB,cAAc,CAAC,KAAK,CAAC,QAAP,EAAiB,EAAE,IAAI,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;IAAE,KAAK,EAAE,EAAE,CAAC,aAAH,CAAiB;EAA1B,CAAP,CAA/B,CAA/B;EAEA,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAP,EAAc;IAC1C,YAAY,EAAE;MACZ,OAAO,EAAE,KAAK,CAAC,EADH;MAEZ;IAFY;EAD4B,CAAd,CAA9B;EAOA,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB;IAClD,QAAQ,EAAE,IADwC;IAElD,YAAY,EAAE;MACZ,eAAe,IADH;MAEZ,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,YAAD,EAAa,IAAb;IAFE;EAFoC,CAAlB,CAAlC;EAQA,OAAO;IACL,aADK;IAEL,UAAU,EAAE;MACV,IAAI,EAAE,MADI;MAEV,KAAK,EAAE,OAFG;MAGV,KAAK,EAAE,KAHG;MAIV,SAAS,EAAE;IAJD,CAFP;IAQL,IARK;IASL,KATK;IAUL,KAVK;IAWL;EAXK,CAAP;AAaD,CA7EM","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"],"sourceRoot":"../src/"}
@@ -29,37 +29,37 @@ const useRootStyles = /*#__PURE__*/__styles({
29
29
  "focusIndicator": {
30
30
  "Brovlpu": "ftqa4ok",
31
31
  "B486eqv": "f2hkw1w",
32
- "Bgobo1x": "fo4ocm0",
33
- "Jo8lrp": ["f1uvj27t", "fecisja"],
34
- "Bpke50p": "f1rzrqo7",
35
- "aty7ik": ["fecisja", "f1uvj27t"],
36
- "hm6prv": "f1g7kvsv",
37
- "Bjex43u": "fzrlbma",
38
- "sr5bkg": "fj7d4uc",
39
- "F8og5": "f1l6kybf",
40
- "Bvc59ag": "f1p3v545",
41
- "od54ob": ["f18ooxnm", "for8r4m"],
42
- "Bi136el": "f1dek44a",
43
- "B3l1rvm": ["for8r4m", "f18ooxnm"],
44
- "e0acac": "fo0rwiw",
45
- "vp2hgr": ["f1y3sdd5", "f1xpp2ec"],
46
- "h2c9ne": "f10zrybh",
47
- "Bvfpqjq": ["f1xpp2ec", "f1y3sdd5"],
48
- "Bd8parj": ["ft333ue", "f16uznis"],
49
- "c00pmh": ["f16uznis", "ft333ue"],
50
- "Bvs3b7t": ["f1sbsurx", "f1d2cokh"],
51
- "Bnhloe": ["f1d2cokh", "f1sbsurx"],
52
- "Hpy7w9": "fxx05f1",
53
- "Bmdll0j": ["f1ph57ev", "fiz0wg0"],
54
- "w8a68g": "f1tu679n",
55
- "w65o9e": ["fiz0wg0", "f1ph57ev"],
56
- "Bnvy6ax": "fi7ex6y",
57
- "y8tio2": "f17j406i",
58
- "Fgxkz8": ["fbegtek", "f21ipxl"],
59
- "Bpakkmj": ["f21ipxl", "fbegtek"]
32
+ "Brlowmp": "fck78tx",
33
+ "Fxwv4m": ["f8gneoz", "f14g6lul"],
34
+ "Bkrqzay": "f1tc23yq",
35
+ "Bg2fdrq": ["f14g6lul", "f8gneoz"],
36
+ "Bhpuztq": "ffjpq3d",
37
+ "Hxt1dp": "fo0h4cx",
38
+ "Fwynku": "f1vef9e5",
39
+ "nwv0sh": "fob2zhe",
40
+ "sewbek": "ftqc7yw",
41
+ "Bmcqtu5": ["fbod6wy", "f4eroa4"],
42
+ "Iuyy0o": "flecwt7",
43
+ "B1jyaxe": ["f4eroa4", "fbod6wy"],
44
+ "Gic0m5": "fzb327l",
45
+ "B8s345i": ["f1s2knrb", "f6wuwpp"],
46
+ "Btrf9ny": "f1g8ecfq",
47
+ "Bz0zc98": ["f6wuwpp", "f1s2knrb"],
48
+ "Bdowj5x": ["f1hnqdjl", "fk9eigt"],
49
+ "zit2e2": ["fk9eigt", "f1hnqdjl"],
50
+ "xdtxim": ["f1g8yfuc", "f1kv2i3z"],
51
+ "mjwzc8": ["f1kv2i3z", "f1g8yfuc"],
52
+ "Bdlkd80": "ffthsbc",
53
+ "mrk28m": ["f1nq9gk1", "f1pmlwz5"],
54
+ "Byzfkqq": "f1naw2e2",
55
+ "Bnh9nsd": ["f1pmlwz5", "f1nq9gk1"],
56
+ "r9zwrz": "fmtt8yl",
57
+ "B4yg94n": "fr8phvc",
58
+ "glb4xk": ["f5m5r8m", "f1bizo4j"],
59
+ "mla9w6": ["f1bizo4j", "f5m5r8m"]
60
60
  }
61
61
  }, {
62
- "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fui-FluentProvider .fo4ocm0.fui-focus-within:focus-within{border-top-color:transparent;}", ".fui-FluentProvider .f1uvj27t.fui-focus-within:focus-within{border-right-color:transparent;}", ".fui-FluentProvider .fecisja.fui-focus-within:focus-within{border-left-color:transparent;}", ".fui-FluentProvider .f1rzrqo7.fui-focus-within:focus-within{border-bottom-color:transparent;}", ".fui-FluentProvider .f1g7kvsv.fui-focus-within:focus-within::after{content:\"\";}", ".fui-FluentProvider .fzrlbma.fui-focus-within:focus-within::after{position:absolute;}", ".fui-FluentProvider .fj7d4uc.fui-focus-within:focus-within::after{pointer-events:none;}", ".fui-FluentProvider .f1l6kybf.fui-focus-within:focus-within::after{z-index:1;}", ".fui-FluentProvider .f1p3v545.fui-focus-within:focus-within::after{border-top-style:solid;}", ".fui-FluentProvider .f18ooxnm.fui-focus-within:focus-within::after{border-right-style:solid;}", ".fui-FluentProvider .for8r4m.fui-focus-within:focus-within::after{border-left-style:solid;}", ".fui-FluentProvider .f1dek44a.fui-focus-within:focus-within::after{border-bottom-style:solid;}", ".fui-FluentProvider .fo0rwiw.fui-focus-within:focus-within::after{border-top-width:2px;}", ".fui-FluentProvider .f1y3sdd5.fui-focus-within:focus-within::after{border-right-width:2px;}", ".fui-FluentProvider .f1xpp2ec.fui-focus-within:focus-within::after{border-left-width:2px;}", ".fui-FluentProvider .f10zrybh.fui-focus-within:focus-within::after{border-bottom-width:2px;}", ".fui-FluentProvider .ft333ue.fui-focus-within:focus-within::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .f16uznis.fui-focus-within:focus-within::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .f1sbsurx.fui-focus-within:focus-within::after{border-top-right-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .f1d2cokh.fui-focus-within:focus-within::after{border-top-left-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .fxx05f1.fui-focus-within:focus-within::after{border-top-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .f1ph57ev.fui-focus-within:focus-within::after{border-right-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .fiz0wg0.fui-focus-within:focus-within::after{border-left-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .f1tu679n.fui-focus-within:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .fi7ex6y.fui-focus-within:focus-within::after{top:-2px;}", ".fui-FluentProvider .f17j406i.fui-focus-within:focus-within::after{bottom:-2px;}", ".fui-FluentProvider .fbegtek.fui-focus-within:focus-within::after{left:-2px;}", ".fui-FluentProvider .f21ipxl.fui-focus-within:focus-within::after{right:-2px;}"],
62
+ "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fck78tx.fui-focus-within:focus-within{border-top-color:transparent;}", ".f8gneoz.fui-focus-within:focus-within{border-right-color:transparent;}", ".f14g6lul.fui-focus-within:focus-within{border-left-color:transparent;}", ".f1tc23yq.fui-focus-within:focus-within{border-bottom-color:transparent;}", ".ffjpq3d.fui-focus-within:focus-within::after{content:\"\";}", ".fo0h4cx.fui-focus-within:focus-within::after{position:absolute;}", ".f1vef9e5.fui-focus-within:focus-within::after{pointer-events:none;}", ".fob2zhe.fui-focus-within:focus-within::after{z-index:1;}", ".ftqc7yw.fui-focus-within:focus-within::after{border-top-style:solid;}", ".fbod6wy.fui-focus-within:focus-within::after{border-right-style:solid;}", ".f4eroa4.fui-focus-within:focus-within::after{border-left-style:solid;}", ".flecwt7.fui-focus-within:focus-within::after{border-bottom-style:solid;}", ".fzb327l.fui-focus-within:focus-within::after{border-top-width:2px;}", ".f1s2knrb.fui-focus-within:focus-within::after{border-right-width:2px;}", ".f6wuwpp.fui-focus-within:focus-within::after{border-left-width:2px;}", ".f1g8ecfq.fui-focus-within:focus-within::after{border-bottom-width:2px;}", ".f1hnqdjl.fui-focus-within:focus-within::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".fk9eigt.fui-focus-within:focus-within::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1g8yfuc.fui-focus-within:focus-within::after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1kv2i3z.fui-focus-within:focus-within::after{border-top-left-radius:var(--borderRadiusMedium);}", ".ffthsbc.fui-focus-within:focus-within::after{border-top-color:var(--colorStrokeFocus2);}", ".f1nq9gk1.fui-focus-within:focus-within::after{border-right-color:var(--colorStrokeFocus2);}", ".f1pmlwz5.fui-focus-within:focus-within::after{border-left-color:var(--colorStrokeFocus2);}", ".f1naw2e2.fui-focus-within:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}", ".fmtt8yl.fui-focus-within:focus-within::after{top:-2px;}", ".fr8phvc.fui-focus-within:focus-within::after{bottom:-2px;}", ".f5m5r8m.fui-focus-within:focus-within::after{left:-2px;}", ".f1bizo4j.fui-focus-within:focus-within::after{right:-2px;}"],
63
63
  "f": [".ftqa4ok:focus{outline-style:none;}"],
64
64
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
65
65
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.types.js","sourceRoot":"../src/","sources":["components/RadioGroup/RadioGroup.types.ts"],"names":[],"mappings":"","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 all Radio items in this group.\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"]}
1
+ {"version":3,"file":"RadioGroup.types.js","sourceRoot":"../src/","sources":["components/RadioGroup/RadioGroup.types.ts"],"names":[],"mappings":"","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"]}
@@ -2,9 +2,9 @@ import { createContext, useContextSelector } from '@fluentui/react-context-selec
2
2
  /**
3
3
  * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.
4
4
  */
5
- // eslint-disable-next-line @fluentui/no-context-default-value
6
5
 
7
- export const RadioGroupContext = /*#__PURE__*/createContext({});
6
+ export const RadioGroupContext = /*#__PURE__*/createContext(undefined);
7
+ const radioGroupContextDefaultValue = {};
8
8
  export const RadioGroupProvider = RadioGroupContext.Provider;
9
- export const useRadioGroupContext_unstable = selector => useContextSelector(RadioGroupContext, selector);
9
+ export const useRadioGroupContext_unstable = selector => useContextSelector(RadioGroupContext, (ctx = radioGroupContextDefaultValue) => selector(ctx));
10
10
  //# sourceMappingURL=RadioGroupContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["contexts/RadioGroupContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAmE,kCAAnE;AAIA;;AAEG;AACH;;AACA,OAAO,MAAM,iBAAiB,gBAAoC,aAAa,CAAC,EAAD,CAAxE;AAEP,OAAO,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,QAA7C;AAEP,OAAO,MAAM,6BAA6B,GAAO,QAAJ,IAC3C,kBAAkB,CAAC,iBAAD,EAAoB,QAApB,CADb","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 */\n// eslint-disable-next-line @fluentui/no-context-default-value\nexport const RadioGroupContext: Context<RadioGroupContextValue> = createContext({});\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\nexport const useRadioGroupContext_unstable = <T>(selector: ContextSelector<RadioGroupContextValue, T>): T =>\n useContextSelector(RadioGroupContext, selector);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["contexts/RadioGroupContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAmE,kCAAnE;AAIA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,gBAAoC,aAAa,CAC7E,SAD6E,CAAxE;AAIP,MAAM,6BAA6B,GAA2B,EAA9D;AAEA,OAAO,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,QAA7C;AAEP,OAAO,MAAM,6BAA6B,GAAO,QAAJ,IAC3C,kBAAkB,CAAC,iBAAD,EAAoB,CAAC,GAAG,GAAG,6BAAP,KAAyC,QAAQ,CAAC,GAAD,CAArE,CADb","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"],"sourceRoot":"../src/"}
@@ -15,8 +15,6 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
15
15
 
16
16
  const RadioGroupContext_1 = /*#__PURE__*/require("../../contexts/RadioGroupContext");
17
17
 
18
- const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
19
-
20
18
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
21
19
  /**
22
20
  * Create the state required to render Radio.
@@ -30,12 +28,12 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
30
28
 
31
29
 
32
30
  const useRadio_unstable = (props, ref) => {
33
- const nameGroup = react_context_selector_1.useContextSelector(RadioGroupContext_1.RadioGroupContext, ctx => ctx.name);
34
- const value = react_context_selector_1.useContextSelector(RadioGroupContext_1.RadioGroupContext, ctx => ctx.value);
35
- const defaultValue = react_context_selector_1.useContextSelector(RadioGroupContext_1.RadioGroupContext, ctx => ctx.defaultValue);
36
- const disabledGroup = react_context_selector_1.useContextSelector(RadioGroupContext_1.RadioGroupContext, ctx => ctx.disabled);
37
- const layout = react_context_selector_1.useContextSelector(RadioGroupContext_1.RadioGroupContext, ctx => ctx.layout);
38
- const requiredGroup = react_context_selector_1.useContextSelector(RadioGroupContext_1.RadioGroupContext, ctx => ctx.required);
31
+ const nameGroup = RadioGroupContext_1.useRadioGroupContext_unstable(ctx => ctx.name);
32
+ const value = RadioGroupContext_1.useRadioGroupContext_unstable(ctx => ctx.value);
33
+ const defaultValue = RadioGroupContext_1.useRadioGroupContext_unstable(ctx => ctx.defaultValue);
34
+ const disabledGroup = RadioGroupContext_1.useRadioGroupContext_unstable(ctx => ctx.disabled);
35
+ const layout = RadioGroupContext_1.useRadioGroupContext_unstable(ctx => ctx.layout);
36
+ const requiredGroup = RadioGroupContext_1.useRadioGroupContext_unstable(ctx => ctx.required);
39
37
  const {
40
38
  name = nameGroup,
41
39
  checked = value !== undefined ? value === props.value : undefined,
@@ -71,7 +69,7 @@ const useRadio_unstable = (props, ref) => {
71
69
  ...nativeProps.primary
72
70
  }
73
71
  });
74
- input.onChange = react_utilities_1.useMergedEventCallbacks(input.onChange, ev => onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
72
+ input.onChange = react_utilities_1.mergeCallbacks(input.onChange, ev => onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
75
73
  value: ev.currentTarget.value
76
74
  }));
77
75
  const label = react_utilities_1.resolveShorthand(props.label, {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Radio/useRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;EACnG,MAAM,SAAS,GAAG,wBAAA,CAAA,kBAAA,CAAmB,mBAAA,CAAA,iBAAnB,EAAsC,GAAG,IAAI,GAAG,CAAC,IAAjD,CAAlB;EACA,MAAM,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KAAK,EAAE,aAAA,CAAA,KAHG;MAIV,SAAS,EAAE;IAJD,CAFP;IAQL,IARK;IASL,KATK;IAUL,KAVK;IAWL;EAXK,CAAP;AAaD,CA7EM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, resolveShorthand, useId, useMergedEventCallbacks } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { useContextSelector } from '@fluentui/react-context-selector';\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 = useContextSelector(RadioGroupContext, ctx => ctx.name);\n const value = useContextSelector(RadioGroupContext, ctx => ctx.value);\n const defaultValue = useContextSelector(RadioGroupContext, ctx => ctx.defaultValue);\n const disabledGroup = useContextSelector(RadioGroupContext, ctx => ctx.disabled);\n const layout = useContextSelector(RadioGroupContext, ctx => ctx.layout);\n const requiredGroup = useContextSelector(RadioGroupContext, 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 = useMergedEventCallbacks(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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Radio/useRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;EACnG,MAAM,SAAS,GAAG,mBAAA,CAAA,6BAAA,CAA8B,GAAG,IAAI,GAAG,CAAC,IAAzC,CAAlB;EACA,MAAM,KAAK,GAAG,mBAAA,CAAA,6BAAA,CAA8B,GAAG,IAAI,GAAG,CAAC,KAAzC,CAAd;EACA,MAAM,YAAY,GAAG,mBAAA,CAAA,6BAAA,CAA8B,GAAG,IAAI,GAAG,CAAC,YAAzC,CAArB;EACA,MAAM,aAAa,GAAG,mBAAA,CAAA,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CAHQ;MAIZ,IAJY;MAKZ,OALY;MAMZ,cANY;MAOZ,QAPY;MAQZ,QARY;MASZ,GAAG,WAAW,CAAC;IATH;EAF4B,CAA9B,CAAd;EAeA,KAAK,CAAC,QAAN,GAAiB,iBAAA,CAAA,cAAA,CAAe,KAAK,CAAC,QAArB,EAA+B,EAAE,IAAI,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;IAAE,KAAK,EAAE,EAAE,CAAC,aAAH,CAAiB;EAA1B,CAAP,CAA7C,CAAjB;EAEA,MAAM,KAAK,GAAG,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,KAAvB,EAA8B;IAC1C,YAAY,EAAE;MACZ,OAAO,EAAE,KAAK,CAAC,EADH;MAEZ;IAFY;EAD4B,CAA9B,CAAd;EAOA,MAAM,SAAS,GAAG,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,SAAvB,EAAkC;IAClD,QAAQ,EAAE,IADwC;IAElD,YAAY,EAAE;MACZ,eAAe,IADH;MAEZ,QAAQ,EAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,YAAD,EAAa,IAAb;IAFE;EAFoC,CAAlC,CAAlB;EAQA,OAAO;IACL,aADK;IAEL,UAAU,EAAE;MACV,IAAI,EAAE,MADI;MAEV,KAAK,EAAE,OAFG;MAGV,KAAK,EAAE,aAAA,CAAA,KAHG;MAIV,SAAS,EAAE;IAJD,CAFP;IAQL,IARK;IASL,KATK;IAUL,KAVK;IAWL;EAXK,CAAP;AAaD,CA7EM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","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"],"sourceRoot":"../src/"}
@@ -39,37 +39,37 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
39
39
  "focusIndicator": {
40
40
  "Brovlpu": "ftqa4ok",
41
41
  "B486eqv": "f2hkw1w",
42
- "Bgobo1x": "fo4ocm0",
43
- "Jo8lrp": ["f1uvj27t", "fecisja"],
44
- "Bpke50p": "f1rzrqo7",
45
- "aty7ik": ["fecisja", "f1uvj27t"],
46
- "hm6prv": "f1g7kvsv",
47
- "Bjex43u": "fzrlbma",
48
- "sr5bkg": "fj7d4uc",
49
- "F8og5": "f1l6kybf",
50
- "Bvc59ag": "f1p3v545",
51
- "od54ob": ["f18ooxnm", "for8r4m"],
52
- "Bi136el": "f1dek44a",
53
- "B3l1rvm": ["for8r4m", "f18ooxnm"],
54
- "e0acac": "fo0rwiw",
55
- "vp2hgr": ["f1y3sdd5", "f1xpp2ec"],
56
- "h2c9ne": "f10zrybh",
57
- "Bvfpqjq": ["f1xpp2ec", "f1y3sdd5"],
58
- "Bd8parj": ["ft333ue", "f16uznis"],
59
- "c00pmh": ["f16uznis", "ft333ue"],
60
- "Bvs3b7t": ["f1sbsurx", "f1d2cokh"],
61
- "Bnhloe": ["f1d2cokh", "f1sbsurx"],
62
- "Hpy7w9": "fxx05f1",
63
- "Bmdll0j": ["f1ph57ev", "fiz0wg0"],
64
- "w8a68g": "f1tu679n",
65
- "w65o9e": ["fiz0wg0", "f1ph57ev"],
66
- "Bnvy6ax": "fi7ex6y",
67
- "y8tio2": "f17j406i",
68
- "Fgxkz8": ["fbegtek", "f21ipxl"],
69
- "Bpakkmj": ["f21ipxl", "fbegtek"]
42
+ "Brlowmp": "fck78tx",
43
+ "Fxwv4m": ["f8gneoz", "f14g6lul"],
44
+ "Bkrqzay": "f1tc23yq",
45
+ "Bg2fdrq": ["f14g6lul", "f8gneoz"],
46
+ "Bhpuztq": "ffjpq3d",
47
+ "Hxt1dp": "fo0h4cx",
48
+ "Fwynku": "f1vef9e5",
49
+ "nwv0sh": "fob2zhe",
50
+ "sewbek": "ftqc7yw",
51
+ "Bmcqtu5": ["fbod6wy", "f4eroa4"],
52
+ "Iuyy0o": "flecwt7",
53
+ "B1jyaxe": ["f4eroa4", "fbod6wy"],
54
+ "Gic0m5": "fzb327l",
55
+ "B8s345i": ["f1s2knrb", "f6wuwpp"],
56
+ "Btrf9ny": "f1g8ecfq",
57
+ "Bz0zc98": ["f6wuwpp", "f1s2knrb"],
58
+ "Bdowj5x": ["f1hnqdjl", "fk9eigt"],
59
+ "zit2e2": ["fk9eigt", "f1hnqdjl"],
60
+ "xdtxim": ["f1g8yfuc", "f1kv2i3z"],
61
+ "mjwzc8": ["f1kv2i3z", "f1g8yfuc"],
62
+ "Bdlkd80": "ffthsbc",
63
+ "mrk28m": ["f1nq9gk1", "f1pmlwz5"],
64
+ "Byzfkqq": "f1naw2e2",
65
+ "Bnh9nsd": ["f1pmlwz5", "f1nq9gk1"],
66
+ "r9zwrz": "fmtt8yl",
67
+ "B4yg94n": "fr8phvc",
68
+ "glb4xk": ["f5m5r8m", "f1bizo4j"],
69
+ "mla9w6": ["f1bizo4j", "f5m5r8m"]
70
70
  }
71
71
  }, {
72
- "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fui-FluentProvider .fo4ocm0.fui-focus-within:focus-within{border-top-color:transparent;}", ".fui-FluentProvider .f1uvj27t.fui-focus-within:focus-within{border-right-color:transparent;}", ".fui-FluentProvider .fecisja.fui-focus-within:focus-within{border-left-color:transparent;}", ".fui-FluentProvider .f1rzrqo7.fui-focus-within:focus-within{border-bottom-color:transparent;}", ".fui-FluentProvider .f1g7kvsv.fui-focus-within:focus-within::after{content:\"\";}", ".fui-FluentProvider .fzrlbma.fui-focus-within:focus-within::after{position:absolute;}", ".fui-FluentProvider .fj7d4uc.fui-focus-within:focus-within::after{pointer-events:none;}", ".fui-FluentProvider .f1l6kybf.fui-focus-within:focus-within::after{z-index:1;}", ".fui-FluentProvider .f1p3v545.fui-focus-within:focus-within::after{border-top-style:solid;}", ".fui-FluentProvider .f18ooxnm.fui-focus-within:focus-within::after{border-right-style:solid;}", ".fui-FluentProvider .for8r4m.fui-focus-within:focus-within::after{border-left-style:solid;}", ".fui-FluentProvider .f1dek44a.fui-focus-within:focus-within::after{border-bottom-style:solid;}", ".fui-FluentProvider .fo0rwiw.fui-focus-within:focus-within::after{border-top-width:2px;}", ".fui-FluentProvider .f1y3sdd5.fui-focus-within:focus-within::after{border-right-width:2px;}", ".fui-FluentProvider .f1xpp2ec.fui-focus-within:focus-within::after{border-left-width:2px;}", ".fui-FluentProvider .f10zrybh.fui-focus-within:focus-within::after{border-bottom-width:2px;}", ".fui-FluentProvider .ft333ue.fui-focus-within:focus-within::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .f16uznis.fui-focus-within:focus-within::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .f1sbsurx.fui-focus-within:focus-within::after{border-top-right-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .f1d2cokh.fui-focus-within:focus-within::after{border-top-left-radius:var(--borderRadiusMedium);}", ".fui-FluentProvider .fxx05f1.fui-focus-within:focus-within::after{border-top-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .f1ph57ev.fui-focus-within:focus-within::after{border-right-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .fiz0wg0.fui-focus-within:focus-within::after{border-left-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .f1tu679n.fui-focus-within:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .fi7ex6y.fui-focus-within:focus-within::after{top:-2px;}", ".fui-FluentProvider .f17j406i.fui-focus-within:focus-within::after{bottom:-2px;}", ".fui-FluentProvider .fbegtek.fui-focus-within:focus-within::after{left:-2px;}", ".fui-FluentProvider .f21ipxl.fui-focus-within:focus-within::after{right:-2px;}"],
72
+ "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fck78tx.fui-focus-within:focus-within{border-top-color:transparent;}", ".f8gneoz.fui-focus-within:focus-within{border-right-color:transparent;}", ".f14g6lul.fui-focus-within:focus-within{border-left-color:transparent;}", ".f1tc23yq.fui-focus-within:focus-within{border-bottom-color:transparent;}", ".ffjpq3d.fui-focus-within:focus-within::after{content:\"\";}", ".fo0h4cx.fui-focus-within:focus-within::after{position:absolute;}", ".f1vef9e5.fui-focus-within:focus-within::after{pointer-events:none;}", ".fob2zhe.fui-focus-within:focus-within::after{z-index:1;}", ".ftqc7yw.fui-focus-within:focus-within::after{border-top-style:solid;}", ".fbod6wy.fui-focus-within:focus-within::after{border-right-style:solid;}", ".f4eroa4.fui-focus-within:focus-within::after{border-left-style:solid;}", ".flecwt7.fui-focus-within:focus-within::after{border-bottom-style:solid;}", ".fzb327l.fui-focus-within:focus-within::after{border-top-width:2px;}", ".f1s2knrb.fui-focus-within:focus-within::after{border-right-width:2px;}", ".f6wuwpp.fui-focus-within:focus-within::after{border-left-width:2px;}", ".f1g8ecfq.fui-focus-within:focus-within::after{border-bottom-width:2px;}", ".f1hnqdjl.fui-focus-within:focus-within::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".fk9eigt.fui-focus-within:focus-within::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1g8yfuc.fui-focus-within:focus-within::after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1kv2i3z.fui-focus-within:focus-within::after{border-top-left-radius:var(--borderRadiusMedium);}", ".ffthsbc.fui-focus-within:focus-within::after{border-top-color:var(--colorStrokeFocus2);}", ".f1nq9gk1.fui-focus-within:focus-within::after{border-right-color:var(--colorStrokeFocus2);}", ".f1pmlwz5.fui-focus-within:focus-within::after{border-left-color:var(--colorStrokeFocus2);}", ".f1naw2e2.fui-focus-within:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}", ".fmtt8yl.fui-focus-within:focus-within::after{top:-2px;}", ".fr8phvc.fui-focus-within:focus-within::after{bottom:-2px;}", ".f5m5r8m.fui-focus-within:focus-within::after{left:-2px;}", ".f1bizo4j.fui-focus-within:focus-within::after{right:-2px;}"],
73
73
  "f": [".ftqa4ok:focus{outline-style:none;}"],
74
74
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
75
75
  });
@@ -9,13 +9,13 @@ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-s
9
9
  /**
10
10
  * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.
11
11
  */
12
- // eslint-disable-next-line @fluentui/no-context-default-value
13
12
 
14
13
 
15
- exports.RadioGroupContext = /*#__PURE__*/react_context_selector_1.createContext({});
14
+ exports.RadioGroupContext = /*#__PURE__*/react_context_selector_1.createContext(undefined);
15
+ const radioGroupContextDefaultValue = {};
16
16
  exports.RadioGroupProvider = exports.RadioGroupContext.Provider;
17
17
 
18
- const useRadioGroupContext_unstable = selector => react_context_selector_1.useContextSelector(exports.RadioGroupContext, selector);
18
+ const useRadioGroupContext_unstable = selector => react_context_selector_1.useContextSelector(exports.RadioGroupContext, (ctx = radioGroupContextDefaultValue) => selector(ctx));
19
19
 
20
20
  exports.useRadioGroupContext_unstable = useRadioGroupContext_unstable;
21
21
  //# sourceMappingURL=RadioGroupContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["contexts/RadioGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;AAIA;;AAEG;AACH;;;AACa,OAAA,CAAA,iBAAA,gBAAqD,wBAAA,CAAA,aAAA,CAAc,EAAd,CAArD;AAEA,OAAA,CAAA,kBAAA,GAAqB,OAAA,CAAA,iBAAA,CAAkB,QAAvC;;AAEN,MAAM,6BAA6B,GAAO,QAAJ,IAC3C,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,iBAAnB,EAAsC,QAAtC,CADK;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","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 */\n// eslint-disable-next-line @fluentui/no-context-default-value\nexport const RadioGroupContext: Context<RadioGroupContextValue> = createContext({});\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\nexport const useRadioGroupContext_unstable = <T>(selector: ContextSelector<RadioGroupContextValue, T>): T =>\n useContextSelector(RadioGroupContext, selector);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["contexts/RadioGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,iBAAA,gBAAqD,wBAAA,CAAA,aAAA,CAChE,SADgE,CAArD;AAIb,MAAM,6BAA6B,GAA2B,EAA9D;AAEa,OAAA,CAAA,kBAAA,GAAqB,OAAA,CAAA,iBAAA,CAAkB,QAAvC;;AAEN,MAAM,6BAA6B,GAAO,QAAJ,IAC3C,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,iBAAnB,EAAsC,CAAC,GAAG,GAAG,6BAAP,KAAyC,QAAQ,CAAC,GAAD,CAAvF,CADK;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","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"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-radio",
3
- "version": "9.0.4",
3
+ "version": "9.0.5",
4
4
  "description": "Fluent UI Radio component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -21,23 +21,23 @@
21
21
  "start": "yarn storybook",
22
22
  "test": "jest --passWithNoTests",
23
23
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-radio/src && yarn docs",
25
- "storybook": "node ../../../scripts/storybook/runner",
24
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-radio/src && yarn docs",
25
+ "storybook": "start-storybook",
26
26
  "type-check": "tsc -b tsconfig.json"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "9.0.0-beta.12"
31
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.13"
32
32
  },
33
33
  "dependencies": {
34
- "@fluentui/react-context-selector": "^9.0.2",
34
+ "@fluentui/react-context-selector": "^9.0.3",
35
35
  "@fluentui/react-icons": "^2.0.175",
36
- "@fluentui/react-label": "^9.0.4",
37
- "@fluentui/react-tabster": "^9.1.0",
38
- "@fluentui/react-theme": "^9.0.0",
39
- "@fluentui/react-utilities": "^9.0.2",
40
- "@griffel/react": "^1.2.3",
36
+ "@fluentui/react-label": "^9.0.5",
37
+ "@fluentui/react-tabster": "^9.1.1",
38
+ "@fluentui/react-theme": "^9.1.0",
39
+ "@fluentui/react-utilities": "^9.1.0",
40
+ "@griffel/react": "^1.3.0",
41
41
  "tslib": "^2.1.0"
42
42
  },
43
43
  "peerDependencies": {
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.1"
9
- }
10
- ]
11
- }