@fluentui/react-radio 0.0.0-nightly-20230804-0415.1 → 0.0.0-nightly-20230808-0415.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-radio",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 04 Aug 2023 04:21:55 GMT",
6
- "tag": "@fluentui/react-radio_v0.0.0-nightly-20230804-0415.1",
7
- "version": "0.0.0-nightly-20230804-0415.1",
5
+ "date": "Tue, 08 Aug 2023 04:22:10 GMT",
6
+ "tag": "@fluentui/react-radio_v0.0.0-nightly-20230808-0415.1",
7
+ "version": "0.0.0-nightly-20230808-0415.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,56 +16,107 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-radio",
19
- "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230804-0415.1",
20
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
19
+ "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230808-0415.1",
20
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-radio",
25
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230804-0415.1",
26
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1",
26
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-radio",
31
- "comment": "Bump @fluentui/react-label to v0.0.0-nightly-20230804-0415.1",
32
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
31
+ "comment": "Bump @fluentui/react-label to v0.0.0-nightly-20230808-0415.1",
32
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-radio",
37
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230804-0415.1",
38
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
37
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1",
38
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-radio",
43
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230804-0415.1",
44
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
43
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230808-0415.1",
44
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-radio",
49
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230804-0415.1",
50
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
49
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1",
50
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-radio",
55
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230804-0415.1",
56
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
55
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1",
56
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
57
57
  },
58
58
  {
59
59
  "author": "beachball",
60
60
  "package": "@fluentui/react-radio",
61
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230804-0415.1",
62
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
61
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1",
62
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
63
63
  },
64
64
  {
65
65
  "author": "beachball",
66
66
  "package": "@fluentui/react-radio",
67
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230804-0415.1",
68
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
67
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1",
68
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
69
+ }
70
+ ]
71
+ }
72
+ },
73
+ {
74
+ "date": "Fri, 04 Aug 2023 08:52:58 GMT",
75
+ "tag": "@fluentui/react-radio_v9.1.28",
76
+ "version": "9.1.28",
77
+ "comments": {
78
+ "patch": [
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-radio",
82
+ "comment": "Bump @fluentui/react-field to v9.1.15",
83
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-radio",
88
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13",
89
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-radio",
94
+ "comment": "Bump @fluentui/react-label to v9.1.23",
95
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui/react-radio",
100
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.1",
101
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui/react-radio",
106
+ "comment": "Bump @fluentui/react-tabster to v9.12.0",
107
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-radio",
112
+ "comment": "Bump @fluentui/react-theme to v9.1.10",
113
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/react-radio",
118
+ "comment": "Bump @fluentui/react-utilities to v9.11.0",
119
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
69
120
  }
70
121
  ]
71
122
  }
package/CHANGELOG.md CHANGED
@@ -1,26 +1,41 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Fri, 04 Aug 2023 04:21:55 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 08 Aug 2023 04:22:10 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230804-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v0.0.0-nightly-20230804-0415.1)
7
+ ## [0.0.0-nightly-20230808-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v0.0.0-nightly-20230808-0415.1)
8
8
 
9
- Fri, 04 Aug 2023 04:21:55 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.27..@fluentui/react-radio_v0.0.0-nightly-20230804-0415.1)
9
+ Tue, 08 Aug 2023 04:22:10 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.28..@fluentui/react-radio_v0.0.0-nightly-20230808-0415.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/react-field to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
17
- - Bump @fluentui/react-label to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
19
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
20
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
21
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
22
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
23
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
15
+ - Bump @fluentui/react-field to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
17
+ - Bump @fluentui/react-label to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
20
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
21
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
22
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
23
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
24
+
25
+ ## [9.1.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.28)
26
+
27
+ Fri, 04 Aug 2023 08:52:58 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.27..@fluentui/react-radio_v9.1.28)
29
+
30
+ ### Patches
31
+
32
+ - Bump @fluentui/react-field to v9.1.15 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
33
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
34
+ - Bump @fluentui/react-label to v9.1.23 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
35
+ - Bump @fluentui/react-shared-contexts to v9.7.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
36
+ - Bump @fluentui/react-tabster to v9.12.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
37
+ - Bump @fluentui/react-theme to v9.1.10 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
38
+ - Bump @fluentui/react-utilities to v9.11.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
24
39
 
25
40
  ## [9.1.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.27)
26
41
 
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Radio
5
5
  */ export const renderRadio_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.input, slotProps.input), /*#__PURE__*/ createElement(slots.indicator, slotProps.indicator), slots.label && /*#__PURE__*/ createElement(slots.label, slotProps.label));
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(state.input, null), /*#__PURE__*/ createElement(state.indicator, null), state.label && /*#__PURE__*/ createElement(state.label, null));
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadio.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<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"],"names":["createElement","getSlotsNext","renderRadio_unstable","state","slots","slotProps","root","input","indicator","label"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,QAAsB;IACzD,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAyBE;IAEtD,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,gBAC5B,AAfN,cAeOF,MAAMG,KAAK,EAAKF,UAAUE,KAAK,iBAChC,AAhBN,cAgBOH,MAAMI,SAAS,EAAKH,UAAUG,SAAS,GACvCJ,MAAMK,KAAK,kBAAI,AAjBtB,cAiBuBL,MAAMK,KAAK,EAAKJ,UAAUI,KAAK;AAGtD,EAAE"}
1
+ {"version":3,"sources":["renderRadio.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } 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 assertSlots<RadioSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.indicator />\n {state.label && <state.label />}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderRadio_unstable","state","root","input","indicator","label"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,QAAsB;IACzDF,YAAwBE;IAExB,qBACE,AAdJ,cAcKA,MAAMC,IAAI,sBACT,AAfN,cAeOD,MAAME,KAAK,uBACZ,AAhBN,cAgBOF,MAAMG,SAAS,SACfH,MAAMI,KAAK,kBAAI,AAjBtB,cAiBuBJ,MAAMI,KAAK;AAGlC,EAAE"}
@@ -1,7 +1,7 @@
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, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';
4
+ import { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';
5
5
  import { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';
6
6
  import { useFocusWithin } from '@fluentui/react-tabster';
7
7
  /**
@@ -24,15 +24,14 @@ import { useFocusWithin } from '@fluentui/react-tabster';
24
24
  'onChange'
25
25
  ]
26
26
  });
27
- const root = resolveShorthand(props.root, {
28
- required: true,
27
+ const root = slot.always(props.root, {
29
28
  defaultProps: {
30
29
  ref: useFocusWithin(),
31
30
  ...nativeProps.root
32
- }
31
+ },
32
+ elementType: 'span'
33
33
  });
34
- const input = resolveShorthand(props.input, {
35
- required: true,
34
+ const input = slot.always(props.input, {
36
35
  defaultProps: {
37
36
  ref,
38
37
  type: 'radio',
@@ -44,25 +43,27 @@ import { useFocusWithin } from '@fluentui/react-tabster';
44
43
  required,
45
44
  'aria-describedby': ariaDescribedBy,
46
45
  ...nativeProps.primary
47
- }
46
+ },
47
+ elementType: 'input'
48
48
  });
49
49
  input.onChange = mergeCallbacks(input.onChange, (ev)=>{
50
50
  return onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
51
51
  value: ev.currentTarget.value
52
52
  });
53
53
  });
54
- const label = resolveShorthand(props.label, {
54
+ const label = slot.optional(props.label, {
55
55
  defaultProps: {
56
56
  htmlFor: input.id,
57
57
  disabled: input.disabled
58
- }
58
+ },
59
+ elementType: Label
59
60
  });
60
- const indicator = resolveShorthand(props.indicator, {
61
- required: true,
61
+ const indicator = slot.always(props.indicator, {
62
62
  defaultProps: {
63
63
  'aria-hidden': true,
64
64
  children: /*#__PURE__*/ React.createElement(CircleFilled, null)
65
- }
65
+ },
66
+ elementType: 'div'
66
67
  });
67
68
  return {
68
69
  labelPosition,
@@ -1 +1 @@
1
- {"version":3,"sources":["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 { useRadioGroupContextValue_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 group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\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 'aria-describedby': ariaDescribedBy,\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: input.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"],"names":["React","CircleFilled","Label","getPartitionedNativeProps","mergeCallbacks","resolveShorthand","useId","useRadioGroupContextValue_unstable","useFocusWithin","useRadio_unstable","props","ref","group","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","defaultProps","input","type","id","primary","ev","currentTarget","label","htmlFor","indicator","children","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,yBAAyB,EAAEC,cAAc,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,4BAA4B;AAC/G,SAASC,kCAAkC,QAAQ,mCAAmC;AACtF,SAASC,cAAc,QAAQ,0BAA0B;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC,MAAiD;IACpG,MAAMC,QAAQL;IAEd,MAAM,EACJM,MAAOD,MAAMC,IAAI,CAAA,EACjBC,SAAUF,MAAMG,KAAK,KAAKC,YAAYJ,MAAMG,KAAK,KAAKL,MAAMK,KAAK,GAAGC,SAAS,CAAA,EAC7EC,gBAAiBL,MAAMM,YAAY,KAAKF,YAAYJ,MAAMM,YAAY,KAAKR,MAAMK,KAAK,GAAGC,SAAS,CAAA,EAClGG,eAAgBP,MAAMQ,MAAM,KAAK,uBAAuB,UAAU,OAAO,CAAA,EACzEC,UAAWT,MAAMS,QAAQ,CAAA,EACzBC,UAAWV,MAAMU,QAAQ,CAAA,EACzB,oBAAoBC,kBAAkBX,KAAK,CAAC,mBAAmB,CAAA,EAC/DY,SAAQ,EACT,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAW;YAAkB;SAAW;IAC9D;IAEA,MAAMC,OAAOvB,iBAAiBK,MAAMkB,IAAI,EAAE;QACxCN,UAAU,IAAI;QACdO,cAAc;YACZlB,KAAKH;YACL,GAAGiB,YAAYG,IAAI;QACrB;IACF;IAEA,MAAME,QAAQzB,iBAAiBK,MAAMoB,KAAK,EAAE;QAC1CR,UAAU,IAAI;QACdO,cAAc;YACZlB;YACAoB,MAAM;YACNC,IAAI1B,MAAM,UAAUmB,YAAYQ,OAAO,CAACD,EAAE;YAC1CnB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYQ,OAAO;QACxB;IACF;IAEAH,MAAMN,QAAQ,GAAGpB,eAAe0B,MAAMN,QAAQ,EAAEU,CAAAA;QAAMV,OAAAA,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWU,IAAI;YAAEnB,OAAOmB,GAAGC,aAAa,CAACpB,KAAK;QAAC;;IAErG,MAAMqB,QAAQ/B,iBAAiBK,MAAM0B,KAAK,EAAE;QAC1CP,cAAc;YACZQ,SAASP,MAAME,EAAE;YACjBX,UAAUS,MAAMT,QAAQ;QAC1B;IACF;IAEA,MAAMiB,YAAYjC,iBAAiBK,MAAM4B,SAAS,EAAE;QAClDhB,UAAU,IAAI;QACdO,cAAc;YACZ,eAAe,IAAI;YACnBU,wBAAU,oBAACtC;QACb;IACF;IAEA,OAAO;QACLkB;QACAqB,YAAY;YACVZ,MAAM;YACNE,OAAO;YACPM,OAAOlC;YACPoC,WAAW;QACb;QACAV;QACAE;QACAM;QACAE;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_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 group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n elementType: 'span',\n });\n const input = slot.always(props.input, {\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 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary,\n },\n elementType: 'input',\n });\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: input.id, disabled: input.disabled },\n elementType: Label,\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: { 'aria-hidden': true, children: <CircleFilled /> },\n elementType: 'div',\n });\n return {\n labelPosition,\n components: { root: 'span', input: 'input', label: Label, indicator: 'div' },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"names":["React","CircleFilled","Label","getPartitionedNativeProps","mergeCallbacks","useId","slot","useRadioGroupContextValue_unstable","useFocusWithin","useRadio_unstable","props","ref","group","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","always","defaultProps","elementType","input","type","id","primary","ev","currentTarget","label","optional","htmlFor","indicator","children","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,yBAAyB,EAAEC,cAAc,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACnG,SAASC,kCAAkC,QAAQ,mCAAmC;AACtF,SAASC,cAAc,QAAQ,0BAA0B;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC,MAAiD;IACpG,MAAMC,QAAQL;IAEd,MAAM,EACJM,MAAOD,MAAMC,IAAI,CAAA,EACjBC,SAAUF,MAAMG,KAAK,KAAKC,YAAYJ,MAAMG,KAAK,KAAKL,MAAMK,KAAK,GAAGC,SAAS,CAAA,EAC7EC,gBAAiBL,MAAMM,YAAY,KAAKF,YAAYJ,MAAMM,YAAY,KAAKR,MAAMK,KAAK,GAAGC,SAAS,CAAA,EAClGG,eAAgBP,MAAMQ,MAAM,KAAK,uBAAuB,UAAU,OAAO,CAAA,EACzEC,UAAWT,MAAMS,QAAQ,CAAA,EACzBC,UAAWV,MAAMU,QAAQ,CAAA,EACzB,oBAAoBC,kBAAkBX,KAAK,CAAC,mBAAmB,CAAA,EAC/DY,SAAQ,EACT,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAW;YAAkB;SAAW;IAC9D;IAEA,MAAMC,OAAOtB,KAAKuB,MAAM,CAACnB,MAAMkB,IAAI,EAAE;QACnCE,cAAc;YACZnB,KAAKH;YACL,GAAGiB,YAAYG,IAAI;QACrB;QACAG,aAAa;IACf;IACA,MAAMC,QAAQ1B,KAAKuB,MAAM,CAACnB,MAAMsB,KAAK,EAAE;QACrCF,cAAc;YACZnB;YACAsB,MAAM;YACNC,IAAI7B,MAAM,UAAUoB,YAAYU,OAAO,CAACD,EAAE;YAC1CrB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYU,OAAO;QACxB;QACAJ,aAAa;IACf;IACAC,MAAMR,QAAQ,GAAGpB,eAAe4B,MAAMR,QAAQ,EAAEY,CAAAA;QAAMZ,OAAAA,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWY,IAAI;YAAErB,OAAOqB,GAAGC,aAAa,CAACtB,KAAK;QAAC;;IACrG,MAAMuB,QAAQhC,KAAKiC,QAAQ,CAAC7B,MAAM4B,KAAK,EAAE;QACvCR,cAAc;YAAEU,SAASR,MAAME,EAAE;YAAEb,UAAUW,MAAMX,QAAQ;QAAC;QAC5DU,aAAa7B;IACf;IACA,MAAMuC,YAAYnC,KAAKuB,MAAM,CAACnB,MAAM+B,SAAS,EAAE;QAC7CX,cAAc;YAAE,eAAe,IAAI;YAAEY,wBAAU,oBAACzC;QAAgB;QAChE8B,aAAa;IACf;IACA,OAAO;QACLZ;QACAwB,YAAY;YAAEf,MAAM;YAAQI,OAAO;YAASM,OAAOpC;YAAOuC,WAAW;QAAM;QAC3Eb;QACAI;QACAM;QACAG;IACF;AACF,EAAE"}
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { RadioGroupContext } from '../../contexts/RadioGroupContext';
4
4
  /**
5
5
  * Render the final JSX of RadioGroup
6
6
  */ export const renderRadioGroup_unstable = (state, contextValues)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
7
+ assertSlots(state);
8
8
  return /*#__PURE__*/ createElement(RadioGroupContext.Provider, {
9
9
  value: contextValues.radioGroup
10
- }, /*#__PURE__*/ createElement(slots.root, slotProps.root));
10
+ }, /*#__PURE__*/ createElement(state.root, null));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadioGroup.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <slots.root {...slotProps.root} />\n </RadioGroupContext.Provider>\n );\n};\n"],"names":["createElement","getSlotsNext","RadioGroupContext","renderRadioGroup_unstable","state","contextValues","slots","slotProps","Provider","value","radioGroup","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AACzD,SAASC,iBAAiB,QAAQ,mCAAmC;AAGrE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC,OAAwBC,gBAA2C;IAC3G,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAA8BG;IAE3D,qBACE,AAfJ,cAeKF,kBAAkBM,QAAQ;QAACC,OAAOJ,cAAcK,UAAU;qBACzD,AAhBN,cAgBOJ,MAAMK,IAAI,EAAKJ,UAAUI,IAAI;AAGpC,EAAE"}
1
+ {"version":3,"sources":["renderRadioGroup.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } 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 assertSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <state.root />\n </RadioGroupContext.Provider>\n );\n};\n"],"names":["createElement","assertSlots","RadioGroupContext","renderRadioGroup_unstable","state","contextValues","Provider","value","radioGroup","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AACxD,SAASC,iBAAiB,QAAQ,mCAAmC;AAGrE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC,OAAwBC,gBAA2C;IAC3GJ,YAA6BG;IAE7B,qBACE,AAfJ,cAeKF,kBAAkBI,QAAQ;QAACC,OAAOF,cAAcG,UAAU;qBACzD,AAhBN,cAgBOJ,MAAMK,IAAI;AAGjB,EAAE"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useFieldControlProps_unstable } from '@fluentui/react-field';
3
- import { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';
3
+ import { getNativeElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';
4
4
  /**
5
5
  * Create the state required to render RadioGroup.
6
6
  *
@@ -27,10 +27,12 @@ import { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@
27
27
  root: {
28
28
  ref,
29
29
  role: 'radiogroup',
30
- ...getNativeElementProps('div', props, /*excludedPropNames:*/ [
30
+ ...slot.always(getNativeElementProps('div', props, /*excludedPropNames:*/ [
31
31
  'onChange',
32
32
  'name'
33
- ]),
33
+ ]), {
34
+ elementType: 'div'
35
+ }),
34
36
  onChange: useEventCallback((ev)=>{
35
37
  if (onChange && isHTMLElement(ev.target, {
36
38
  constructorName: 'HTMLInputElement'
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div',\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"names":["React","useFieldControlProps_unstable","getNativeElementProps","isHTMLElement","useEventCallback","useId","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","ev","target","constructorName","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,4BAA4B;AAG1G;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC,MAAoD;IACjH,+CAA+C;IAC/CD,QAAQN,8BAA8BM;IAEtC,MAAME,gBAAgBJ,MAAM;IAE5B,MAAM,EAAEK,MAAOD,cAAa,EAAEE,MAAK,EAAEC,aAAY,EAAEC,SAAQ,EAAEC,QAAS,WAAU,EAAEC,SAAQ,EAAEC,SAAQ,EAAE,GAAGT;IAEzG,OAAO;QACLO;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJV;YACAW,MAAM;YACN,GAAGjB,sBAAsB,OAAOK,OAAO,oBAAoB,GAAG;gBAAC;gBAAY;aAAO,CAAC;YACnFQ,UAAUX,iBAAiBgB,CAAAA,KAAM;gBAC/B,IACEL,YACAZ,cAAciB,GAAGC,MAAM,EAAE;oBAAEC,iBAAiB;gBAAmB,MAC/DF,GAAGC,MAAM,CAACE,IAAI,KAAK,SACnB;oBACAR,SAASK,IAAI;wBAAET,OAAOS,GAAGC,MAAM,CAACV,KAAK;oBAAC;gBACxC,CAAC;YACH;QACF;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div',\n },\n root: {\n ref,\n role: 'radiogroup',\n ...slot.always(getNativeElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']), {\n elementType: 'div',\n }),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"names":["React","useFieldControlProps_unstable","getNativeElementProps","isHTMLElement","useEventCallback","useId","slot","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","always","elementType","ev","target","constructorName","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAGhH;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC,MAAoD;IACjH,+CAA+C;IAC/CD,QAAQP,8BAA8BO;IAEtC,MAAME,gBAAgBL,MAAM;IAE5B,MAAM,EAAEM,MAAOD,cAAa,EAAEE,MAAK,EAAEC,aAAY,EAAEC,SAAQ,EAAEC,QAAS,WAAU,EAAEC,SAAQ,EAAEC,SAAQ,EAAE,GAAGT;IAEzG,OAAO;QACLO;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJV;YACAW,MAAM;YACN,GAAGd,KAAKe,MAAM,CAACnB,sBAAsB,OAAOM,OAAO,oBAAoB,GAAG;gBAAC;gBAAY;aAAO,GAAG;gBAC/Fc,aAAa;YACf,EAAE;YACFN,UAAUZ,iBAAiBmB,CAAAA,KAAM;gBAC/B,IACEP,YACAb,cAAcoB,GAAGC,MAAM,EAAE;oBAAEC,iBAAiB;gBAAmB,MAC/DF,GAAGC,MAAM,CAACE,IAAI,KAAK,SACnB;oBACAV,SAASO,IAAI;wBAAEX,OAAOW,GAAGC,MAAM,CAACZ,KAAK;oBAAC;gBACxC,CAAC;YACH;QACF;IACF;AACF,EAAE"}
@@ -9,6 +9,6 @@ Object.defineProperty(exports, "renderRadio_unstable", {
9
9
  const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderRadio_unstable = (state)=>{
12
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.input, slotProps.input), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.indicator, slotProps.indicator), slots.label && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.label, slotProps.label));
12
+ (0, _reactUtilities.assertSlots)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.input, null), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.indicator, null), state.label && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.label, null));
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadio.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Radio\n */ export const renderRadio_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.input, slotProps.input), /*#__PURE__*/ createElement(slots.indicator, slotProps.indicator), slots.label && /*#__PURE__*/ createElement(slots.label, slotProps.label));\n};\n"],"names":["renderRadio_unstable","state","slots","slotProps","getSlotsNext","createElement","root","input","indicator","label"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,uBAAuB,CAACC,QAAQ;IAC7C,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACH,MAAMK,KAAK,EAAEJ,UAAUI,KAAK,GAAG,WAAW,GAAGF,IAAAA,8BAAa,EAACH,MAAMM,SAAS,EAAEL,UAAUK,SAAS,GAAGN,MAAMO,KAAK,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMO,KAAK,EAAEN,UAAUM,KAAK;AACxQ"}
1
+ {"version":3,"sources":["renderRadio.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Radio\n */ export const renderRadio_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(state.input, null), /*#__PURE__*/ createElement(state.indicator, null), state.label && /*#__PURE__*/ createElement(state.label, null));\n};\n"],"names":["renderRadio_unstable","state","assertSlots","createElement","root","input","indicator","label"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,uBAAuB,CAACC,QAAQ;IAC7CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACF,MAAMI,KAAK,EAAE,IAAI,GAAG,WAAW,GAAGF,IAAAA,8BAAa,EAACF,MAAMK,SAAS,EAAE,IAAI,GAAGL,MAAMM,KAAK,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACF,MAAMM,KAAK,EAAE,IAAI;AACzN"}
@@ -25,15 +25,14 @@ const useRadio_unstable = (props, ref)=>{
25
25
  'onChange'
26
26
  ]
27
27
  });
28
- const root = (0, _reactUtilities.resolveShorthand)(props.root, {
29
- required: true,
28
+ const root = _reactUtilities.slot.always(props.root, {
30
29
  defaultProps: {
31
30
  ref: (0, _reactTabster.useFocusWithin)(),
32
31
  ...nativeProps.root
33
- }
32
+ },
33
+ elementType: 'span'
34
34
  });
35
- const input = (0, _reactUtilities.resolveShorthand)(props.input, {
36
- required: true,
35
+ const input = _reactUtilities.slot.always(props.input, {
37
36
  defaultProps: {
38
37
  ref,
39
38
  type: 'radio',
@@ -45,25 +44,27 @@ const useRadio_unstable = (props, ref)=>{
45
44
  required,
46
45
  'aria-describedby': ariaDescribedBy,
47
46
  ...nativeProps.primary
48
- }
47
+ },
48
+ elementType: 'input'
49
49
  });
50
50
  input.onChange = (0, _reactUtilities.mergeCallbacks)(input.onChange, (ev)=>{
51
51
  return onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
52
52
  value: ev.currentTarget.value
53
53
  });
54
54
  });
55
- const label = (0, _reactUtilities.resolveShorthand)(props.label, {
55
+ const label = _reactUtilities.slot.optional(props.label, {
56
56
  defaultProps: {
57
57
  htmlFor: input.id,
58
58
  disabled: input.disabled
59
- }
59
+ },
60
+ elementType: _reactLabel.Label
60
61
  });
61
- const indicator = (0, _reactUtilities.resolveShorthand)(props.indicator, {
62
- required: true,
62
+ const indicator = _reactUtilities.slot.always(props.indicator, {
63
63
  defaultProps: {
64
64
  'aria-hidden': true,
65
65
  children: /*#__PURE__*/ _react.createElement(_reactIcons.CircleFilled, null)
66
- }
66
+ },
67
+ elementType: 'div'
67
68
  });
68
69
  return {
69
70
  labelPosition,
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadio.js"],"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 { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\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 */ export const useRadio_unstable = (props, ref)=>{\n const group = useRadioGroupContextValue_unstable();\n const { name =group.name , checked =group.value !== undefined ? group.value === props.value : undefined , defaultChecked =group.defaultValue !== undefined ? group.defaultValue === props.value : undefined , labelPosition =group.layout === 'horizontal-stacked' ? 'below' : 'after' , disabled =group.disabled , required =group.required , 'aria-describedby': ariaDescribedBy = group['aria-describedby'] , onChange } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'checked',\n 'defaultChecked',\n 'onChange'\n ]\n });\n const root = resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\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 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary\n }\n });\n input.onChange = mergeCallbacks(input.onChange, (ev)=>{\n return onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n value: ev.currentTarget.value\n });\n });\n const label = resolveShorthand(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled: input.disabled\n }\n });\n const indicator = resolveShorthand(props.indicator, {\n required: true,\n defaultProps: {\n 'aria-hidden': true,\n children: /*#__PURE__*/ React.createElement(CircleFilled, null)\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"],"names":["useRadio_unstable","props","ref","group","useRadioGroupContextValue_unstable","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","root","resolveShorthand","defaultProps","useFocusWithin","input","type","id","useId","primary","mergeCallbacks","ev","currentTarget","label","htmlFor","indicator","children","React","createElement","CircleFilled","components","Label"],"mappings":";;;;+BAciBA;;aAAAA;;;6DAdM;4BACM;4BACP;gCAC6D;mCAChC;8BACpB;AASpB,MAAMA,oBAAoB,CAACC,OAAOC,MAAM;IAC/C,MAAMC,QAAQC,IAAAA,qDAAkC;IAChD,MAAM,EAAEC,MAAMF,MAAME,IAAI,CAAA,EAAGC,SAASH,MAAMI,KAAK,KAAKC,YAAYL,MAAMI,KAAK,KAAKN,MAAMM,KAAK,GAAGC,SAAS,CAAA,EAAGC,gBAAgBN,MAAMO,YAAY,KAAKF,YAAYL,MAAMO,YAAY,KAAKT,MAAMM,KAAK,GAAGC,SAAS,CAAA,EAAGG,eAAeR,MAAMS,MAAM,KAAK,uBAAuB,UAAU,OAAO,CAAA,EAAGC,UAAUV,MAAMU,QAAQ,CAAA,EAAGC,UAAUX,MAAMW,QAAQ,CAAA,EAAG,oBAAoBC,kBAAkBZ,KAAK,CAAC,mBAAmB,CAAA,EAAGa,SAAQ,EAAG,GAAGf;IAC/Z,MAAMgB,cAAcC,IAAAA,yCAAyB,EAAC;QAC1CjB;QACAkB,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;SACH;IACL;IACA,MAAMC,OAAOC,IAAAA,gCAAgB,EAACrB,MAAMoB,IAAI,EAAE;QACtCP,UAAU,IAAI;QACdS,cAAc;YACVrB,KAAKsB,IAAAA,4BAAc;YACnB,GAAGP,YAAYI,IAAI;QACvB;IACJ;IACA,MAAMI,QAAQH,IAAAA,gCAAgB,EAACrB,MAAMwB,KAAK,EAAE;QACxCX,UAAU,IAAI;QACdS,cAAc;YACVrB;YACAwB,MAAM;YACNC,IAAIC,IAAAA,qBAAK,EAAC,UAAUX,YAAYY,OAAO,CAACF,EAAE;YAC1CtB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYY,OAAO;QAC1B;IACJ;IACAJ,MAAMT,QAAQ,GAAGc,IAAAA,8BAAc,EAACL,MAAMT,QAAQ,EAAE,CAACe,KAAK;QAClD,OAAOf,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASe,IAAI;YACpExB,OAAOwB,GAAGC,aAAa,CAACzB,KAAK;QACjC,EAAE;IACN;IACA,MAAM0B,QAAQX,IAAAA,gCAAgB,EAACrB,MAAMgC,KAAK,EAAE;QACxCV,cAAc;YACVW,SAAST,MAAME,EAAE;YACjBd,UAAUY,MAAMZ,QAAQ;QAC5B;IACJ;IACA,MAAMsB,YAAYb,IAAAA,gCAAgB,EAACrB,MAAMkC,SAAS,EAAE;QAChDrB,UAAU,IAAI;QACdS,cAAc;YACV,eAAe,IAAI;YACnBa,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,wBAAY,EAAE,IAAI;QAClE;IACJ;IACA,OAAO;QACH5B;QACA6B,YAAY;YACRnB,MAAM;YACNI,OAAO;YACPQ,OAAOQ,iBAAK;YACZN,WAAW;QACf;QACAd;QACAI;QACAQ;QACAE;IACJ;AACJ"}
1
+ {"version":3,"sources":["useRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\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 */ export const useRadio_unstable = (props, ref)=>{\n const group = useRadioGroupContextValue_unstable();\n const { name =group.name , checked =group.value !== undefined ? group.value === props.value : undefined , defaultChecked =group.defaultValue !== undefined ? group.defaultValue === props.value : undefined , labelPosition =group.layout === 'horizontal-stacked' ? 'below' : 'after' , disabled =group.disabled , required =group.required , 'aria-describedby': ariaDescribedBy = group['aria-describedby'] , onChange } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'checked',\n 'defaultChecked',\n 'onChange'\n ]\n });\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\n },\n elementType: 'span'\n });\n const input = slot.always(props.input, {\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 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary\n },\n elementType: 'input'\n });\n input.onChange = mergeCallbacks(input.onChange, (ev)=>{\n return onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n value: ev.currentTarget.value\n });\n });\n const label = slot.optional(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled: input.disabled\n },\n elementType: Label\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: {\n 'aria-hidden': true,\n children: /*#__PURE__*/ React.createElement(CircleFilled, null)\n },\n elementType: 'div'\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"],"names":["useRadio_unstable","props","ref","group","useRadioGroupContextValue_unstable","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","root","slot","always","defaultProps","useFocusWithin","elementType","input","type","id","useId","primary","mergeCallbacks","ev","currentTarget","label","optional","htmlFor","Label","indicator","children","React","createElement","CircleFilled","components"],"mappings":";;;;+BAciBA;;aAAAA;;;6DAdM;4BACM;4BACP;gCACiD;mCACpB;8BACpB;AASpB,MAAMA,oBAAoB,CAACC,OAAOC,MAAM;IAC/C,MAAMC,QAAQC,IAAAA,qDAAkC;IAChD,MAAM,EAAEC,MAAMF,MAAME,IAAI,CAAA,EAAGC,SAASH,MAAMI,KAAK,KAAKC,YAAYL,MAAMI,KAAK,KAAKN,MAAMM,KAAK,GAAGC,SAAS,CAAA,EAAGC,gBAAgBN,MAAMO,YAAY,KAAKF,YAAYL,MAAMO,YAAY,KAAKT,MAAMM,KAAK,GAAGC,SAAS,CAAA,EAAGG,eAAeR,MAAMS,MAAM,KAAK,uBAAuB,UAAU,OAAO,CAAA,EAAGC,UAAUV,MAAMU,QAAQ,CAAA,EAAGC,UAAUX,MAAMW,QAAQ,CAAA,EAAG,oBAAoBC,kBAAkBZ,KAAK,CAAC,mBAAmB,CAAA,EAAGa,SAAQ,EAAG,GAAGf;IAC/Z,MAAMgB,cAAcC,IAAAA,yCAAyB,EAAC;QAC1CjB;QACAkB,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;SACH;IACL;IACA,MAAMC,OAAOC,oBAAI,CAACC,MAAM,CAACtB,MAAMoB,IAAI,EAAE;QACjCG,cAAc;YACVtB,KAAKuB,IAAAA,4BAAc;YACnB,GAAGR,YAAYI,IAAI;QACvB;QACAK,aAAa;IACjB;IACA,MAAMC,QAAQL,oBAAI,CAACC,MAAM,CAACtB,MAAM0B,KAAK,EAAE;QACnCH,cAAc;YACVtB;YACA0B,MAAM;YACNC,IAAIC,IAAAA,qBAAK,EAAC,UAAUb,YAAYc,OAAO,CAACF,EAAE;YAC1CxB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYc,OAAO;QAC1B;QACAL,aAAa;IACjB;IACAC,MAAMX,QAAQ,GAAGgB,IAAAA,8BAAc,EAACL,MAAMX,QAAQ,EAAE,CAACiB,KAAK;QAClD,OAAOjB,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,IAAI;YACpE1B,OAAO0B,GAAGC,aAAa,CAAC3B,KAAK;QACjC,EAAE;IACN;IACA,MAAM4B,QAAQb,oBAAI,CAACc,QAAQ,CAACnC,MAAMkC,KAAK,EAAE;QACrCX,cAAc;YACVa,SAASV,MAAME,EAAE;YACjBhB,UAAUc,MAAMd,QAAQ;QAC5B;QACAa,aAAaY,iBAAK;IACtB;IACA,MAAMC,YAAYjB,oBAAI,CAACC,MAAM,CAACtB,MAAMsC,SAAS,EAAE;QAC3Cf,cAAc;YACV,eAAe,IAAI;YACnBgB,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,wBAAY,EAAE,IAAI;QAClE;QACAjB,aAAa;IACjB;IACA,OAAO;QACHf;QACAiC,YAAY;YACRvB,MAAM;YACNM,OAAO;YACPQ,OAAOG,iBAAK;YACZC,WAAW;QACf;QACAlB;QACAM;QACAQ;QACAI;IACJ;AACJ"}
@@ -10,8 +10,8 @@ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const _radioGroupContext = require("../../contexts/RadioGroupContext");
12
12
  const renderRadioGroup_unstable = (state, contextValues)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
+ (0, _reactUtilities.assertSlots)(state);
14
14
  return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_radioGroupContext.RadioGroupContext.Provider, {
15
15
  value: contextValues.radioGroup
16
- }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root));
16
+ }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null));
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadioGroup.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\n/**\n * Render the final JSX of RadioGroup\n */ export const renderRadioGroup_unstable = (state, contextValues)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(RadioGroupContext.Provider, {\n value: contextValues.radioGroup\n }, /*#__PURE__*/ createElement(slots.root, slotProps.root));\n};\n"],"names":["renderRadioGroup_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","RadioGroupContext","Provider","value","radioGroup","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACtD;mCACK;AAGvB,MAAMA,4BAA4B,CAACC,OAAOC,gBAAgB;IACjE,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACJ;IAC5C,OAAO,WAAW,GAAGK,IAAAA,8BAAa,EAACC,oCAAiB,CAACC,QAAQ,EAAE;QAC3DC,OAAOP,cAAcQ,UAAU;IACnC,GAAG,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMQ,IAAI,EAAEP,UAAUO,IAAI;AAC7D"}
1
+ {"version":3,"sources":["renderRadioGroup.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\n/**\n * Render the final JSX of RadioGroup\n */ export const renderRadioGroup_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(RadioGroupContext.Provider, {\n value: contextValues.radioGroup\n }, /*#__PURE__*/ createElement(state.root, null));\n};\n"],"names":["renderRadioGroup_unstable","state","contextValues","assertSlots","createElement","RadioGroupContext","Provider","value","radioGroup","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;mCACM;AAGvB,MAAMA,4BAA4B,CAACC,OAAOC,gBAAgB;IACjEC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,oCAAiB,CAACC,QAAQ,EAAE;QAC3DC,OAAOL,cAAcM,UAAU;IACnC,GAAG,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMQ,IAAI,EAAE,IAAI;AACnD"}
@@ -28,10 +28,12 @@ const useRadioGroup_unstable = (props, ref)=>{
28
28
  root: {
29
29
  ref,
30
30
  role: 'radiogroup',
31
- ...(0, _reactUtilities.getNativeElementProps)('div', props, /*excludedPropNames:*/ [
31
+ ..._reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', props, /*excludedPropNames:*/ [
32
32
  'onChange',
33
33
  'name'
34
- ]),
34
+ ]), {
35
+ elementType: 'div'
36
+ }),
35
37
  onChange: (0, _reactUtilities.useEventCallback)((ev)=>{
36
38
  if (onChange && (0, _reactUtilities.isHTMLElement)(ev.target, {
37
39
  constructorName: 'HTMLInputElement'
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */ export const useRadioGroup_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n const generatedName = useId('radiogroup-');\n const { name =generatedName , value , defaultValue , disabled , layout ='vertical' , onChange , required } = props;\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div'\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/ [\n 'onChange',\n 'name'\n ]),\n onChange: useEventCallback((ev)=>{\n if (onChange && isHTMLElement(ev.target, {\n constructorName: 'HTMLInputElement'\n }) && ev.target.type === 'radio') {\n onChange(ev, {\n value: ev.target.value\n });\n }\n })\n }\n };\n};\n"],"names":["useRadioGroup_unstable","props","ref","useFieldControlProps_unstable","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;4BACuB;gCACgC;AASnE,MAAMA,yBAAyB,CAACC,OAAOC,MAAM;IACpD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF;IACtC,MAAMG,gBAAgBC,IAAAA,qBAAK,EAAC;IAC5B,MAAM,EAAEC,MAAMF,cAAa,EAAGG,MAAK,EAAGC,aAAY,EAAGC,SAAQ,EAAGC,QAAQ,WAAU,EAAGC,SAAQ,EAAGC,SAAQ,EAAG,GAAGX;IAC9G,OAAO;QACHS;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACRC,MAAM;QACV;QACAA,MAAM;YACFZ;YACAa,MAAM;YACN,GAAGC,IAAAA,qCAAqB,EAAC,OAAOf,OAAO,oBAAoB,GAAG;gBAC1D;gBACA;aACH,CAAC;YACFU,UAAUM,IAAAA,gCAAgB,EAAC,CAACC,KAAK;gBAC7B,IAAIP,YAAYQ,IAAAA,6BAAa,EAACD,GAAGE,MAAM,EAAE;oBACrCC,iBAAiB;gBACrB,MAAMH,GAAGE,MAAM,CAACE,IAAI,KAAK,SAAS;oBAC9BX,SAASO,IAAI;wBACTX,OAAOW,GAAGE,MAAM,CAACb,KAAK;oBAC1B;gBACJ,CAAC;YACL;QACJ;IACJ;AACJ"}
1
+ {"version":3,"sources":["useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */ export const useRadioGroup_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n const generatedName = useId('radiogroup-');\n const { name =generatedName , value , defaultValue , disabled , layout ='vertical' , onChange , required } = props;\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div'\n },\n root: {\n ref,\n role: 'radiogroup',\n ...slot.always(getNativeElementProps('div', props, /*excludedPropNames:*/ [\n 'onChange',\n 'name'\n ]), {\n elementType: 'div'\n }),\n onChange: useEventCallback((ev)=>{\n if (onChange && isHTMLElement(ev.target, {\n constructorName: 'HTMLInputElement'\n }) && ev.target.type === 'radio') {\n onChange(ev, {\n value: ev.target.value\n });\n }\n })\n }\n };\n};\n"],"names":["useRadioGroup_unstable","props","ref","useFieldControlProps_unstable","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","slot","always","getNativeElementProps","elementType","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;4BACuB;gCACsC;AASzE,MAAMA,yBAAyB,CAACC,OAAOC,MAAM;IACpD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF;IACtC,MAAMG,gBAAgBC,IAAAA,qBAAK,EAAC;IAC5B,MAAM,EAAEC,MAAMF,cAAa,EAAGG,MAAK,EAAGC,aAAY,EAAGC,SAAQ,EAAGC,QAAQ,WAAU,EAAGC,SAAQ,EAAGC,SAAQ,EAAG,GAAGX;IAC9G,OAAO;QACHS;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACRC,MAAM;QACV;QACAA,MAAM;YACFZ;YACAa,MAAM;YACN,GAAGC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAOjB,OAAO,oBAAoB,GAAG;gBACtE;gBACA;aACH,GAAG;gBACAkB,aAAa;YACjB,EAAE;YACFR,UAAUS,IAAAA,gCAAgB,EAAC,CAACC,KAAK;gBAC7B,IAAIV,YAAYW,IAAAA,6BAAa,EAACD,GAAGE,MAAM,EAAE;oBACrCC,iBAAiB;gBACrB,MAAMH,GAAGE,MAAM,CAACE,IAAI,KAAK,SAAS;oBAC9Bd,SAASU,IAAI;wBACTd,OAAOc,GAAGE,MAAM,CAAChB,KAAK;oBAC1B;gBACJ,CAAC;YACL;QACJ;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-radio",
3
- "version": "0.0.0-nightly-20230804-0415.1",
3
+ "version": "0.0.0-nightly-20230808-0415.1",
4
4
  "description": "Fluent UI Radio component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,20 +27,20 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20230804-0415.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230804-0415.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20230808-0415.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230808-0415.1",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "0.0.0-nightly-20230804-0415.1",
36
+ "@fluentui/react-field": "0.0.0-nightly-20230808-0415.1",
37
37
  "@fluentui/react-icons": "^2.0.207",
38
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230804-0415.1",
39
- "@fluentui/react-label": "0.0.0-nightly-20230804-0415.1",
40
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230804-0415.1",
41
- "@fluentui/react-tabster": "0.0.0-nightly-20230804-0415.1",
42
- "@fluentui/react-theme": "0.0.0-nightly-20230804-0415.1",
43
- "@fluentui/react-utilities": "0.0.0-nightly-20230804-0415.1",
38
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230808-0415.1",
39
+ "@fluentui/react-label": "0.0.0-nightly-20230808-0415.1",
40
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230808-0415.1",
41
+ "@fluentui/react-tabster": "0.0.0-nightly-20230808-0415.1",
42
+ "@fluentui/react-theme": "0.0.0-nightly-20230808-0415.1",
43
+ "@fluentui/react-utilities": "0.0.0-nightly-20230808-0415.1",
44
44
  "@griffel/react": "^1.5.7",
45
45
  "@swc/helpers": "^0.4.14"
46
46
  },