@fluentui-react-native/radio-group 0.22.0 → 0.22.3

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.
Files changed (187) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/lib/Radio/Radio.d.ts +2 -7
  3. package/lib/Radio/Radio.ios.d.ts +2 -7
  4. package/lib/Radio/Radio.ios.js +31 -50
  5. package/lib/Radio/Radio.js +31 -46
  6. package/lib/Radio/Radio.styling.d.ts +1 -1
  7. package/lib/Radio/Radio.styling.js +88 -109
  8. package/lib/Radio/Radio.types.d.ts +170 -176
  9. package/lib/Radio/Radio.types.js +1 -1
  10. package/lib/Radio/RadioTokens.android.d.ts +1 -1
  11. package/lib/Radio/RadioTokens.android.js +42 -42
  12. package/lib/Radio/RadioTokens.android.js.map +1 -1
  13. package/lib/Radio/RadioTokens.d.ts +1 -1
  14. package/lib/Radio/RadioTokens.ios.d.ts +1 -1
  15. package/lib/Radio/RadioTokens.ios.js +39 -39
  16. package/lib/Radio/RadioTokens.ios.js.map +1 -1
  17. package/lib/Radio/RadioTokens.js +76 -76
  18. package/lib/Radio/RadioTokens.js.map +1 -1
  19. package/lib/Radio/RadioTokens.win32.d.ts +1 -1
  20. package/lib/Radio/RadioTokens.win32.js +89 -89
  21. package/lib/Radio/RadioTokens.win32.js.map +1 -1
  22. package/lib/Radio/__tests__/RadioExperimental.test.d.ts +1 -1
  23. package/lib/Radio/__tests__/RadioExperimental.test.js +14 -14
  24. package/lib/Radio/useRadio.d.ts +1 -1
  25. package/lib/Radio/useRadio.d.ts.map +1 -1
  26. package/lib/Radio/useRadio.js +72 -91
  27. package/lib/Radio/useRadio.js.map +1 -1
  28. package/lib/Radio/useRadio.win32.d.ts +1 -1
  29. package/lib/Radio/useRadio.win32.d.ts.map +1 -1
  30. package/lib/Radio/useRadio.win32.js +126 -143
  31. package/lib/Radio/useRadio.win32.js.map +1 -1
  32. package/lib/RadioGroup/RadioGroup.d.ts +2 -7
  33. package/lib/RadioGroup/RadioGroup.js +34 -48
  34. package/lib/RadioGroup/RadioGroup.styling.d.ts +1 -1
  35. package/lib/RadioGroup/RadioGroup.styling.js +42 -51
  36. package/lib/RadioGroup/RadioGroup.types.d.ts +117 -117
  37. package/lib/RadioGroup/RadioGroup.types.js +1 -1
  38. package/lib/RadioGroup/RadioGroupTokens.android.d.ts +1 -1
  39. package/lib/RadioGroup/RadioGroupTokens.android.js +1 -1
  40. package/lib/RadioGroup/RadioGroupTokens.d.ts +1 -1
  41. package/lib/RadioGroup/RadioGroupTokens.ios.d.ts +1 -1
  42. package/lib/RadioGroup/RadioGroupTokens.ios.js +1 -1
  43. package/lib/RadioGroup/RadioGroupTokens.js +12 -12
  44. package/lib/RadioGroup/RadioGroupTokens.js.map +1 -1
  45. package/lib/RadioGroup/RadioGroupTokens.mobile.d.ts +1 -1
  46. package/lib/RadioGroup/RadioGroupTokens.mobile.js +13 -13
  47. package/lib/RadioGroup/RadioGroupTokens.mobile.js.map +1 -1
  48. package/lib/RadioGroup/__tests__/RadioGroupExperimental.test.d.ts +1 -1
  49. package/lib/RadioGroup/__tests__/RadioGroupExperimental.test.js +56 -98
  50. package/lib/RadioGroup/radioGroupContext.d.ts +1 -1
  51. package/lib/RadioGroup/radioGroupContext.js +15 -19
  52. package/lib/RadioGroup/useRadioGroup.d.ts +1 -1
  53. package/lib/RadioGroup/useRadioGroup.js +63 -93
  54. package/lib/RadioGroup/useRadioGroupContextValue.d.ts +1 -1
  55. package/lib/RadioGroup/useRadioGroupContextValue.js +2 -2
  56. package/lib/index.d.ts +4 -25
  57. package/lib/index.js +1 -1
  58. package/lib/legacy/MacOSRadioButtonNativeComponent.d.ts +6 -6
  59. package/lib/legacy/MacOSRadioButtonNativeComponent.js +1 -1
  60. package/lib/legacy/RadioButton.d.ts +2 -8
  61. package/lib/legacy/RadioButton.d.ts.map +1 -1
  62. package/lib/legacy/RadioButton.js +82 -96
  63. package/lib/legacy/RadioButton.js.map +1 -1
  64. package/lib/legacy/RadioButton.macos.d.ts +2 -8
  65. package/lib/legacy/RadioButton.macos.d.ts.map +1 -1
  66. package/lib/legacy/RadioButton.macos.js +50 -48
  67. package/lib/legacy/RadioButton.macos.js.map +1 -1
  68. package/lib/legacy/RadioButton.settings.d.ts +2 -2
  69. package/lib/legacy/RadioButton.settings.js +81 -81
  70. package/lib/legacy/RadioButton.types.d.ts +45 -45
  71. package/lib/legacy/RadioButton.types.js +1 -1
  72. package/lib/legacy/RadioButton.win32.d.ts +2 -8
  73. package/lib/legacy/RadioButton.win32.d.ts.map +1 -1
  74. package/lib/legacy/RadioButton.win32.js +136 -151
  75. package/lib/legacy/RadioButton.win32.js.map +1 -1
  76. package/lib/legacy/RadioGroup.d.ts +2 -8
  77. package/lib/legacy/RadioGroup.d.ts.map +1 -1
  78. package/lib/legacy/RadioGroup.js +80 -108
  79. package/lib/legacy/RadioGroup.js.map +1 -1
  80. package/lib/legacy/RadioGroup.settings.d.ts +1 -1
  81. package/lib/legacy/RadioGroup.settings.js +21 -21
  82. package/lib/legacy/RadioGroup.types.d.ts +79 -78
  83. package/lib/legacy/RadioGroup.types.js +1 -1
  84. package/lib/legacy/__tests__/RadioButton.test.d.ts +1 -1
  85. package/lib/legacy/__tests__/RadioButton.test.js +8 -8
  86. package/lib/legacy/__tests__/RadioButtonGroup.test.d.ts +1 -1
  87. package/lib/legacy/__tests__/RadioButtonGroup.test.js +18 -34
  88. package/lib-commonjs/Radio/Radio.d.ts +2 -7
  89. package/lib-commonjs/Radio/Radio.ios.d.ts +2 -7
  90. package/lib-commonjs/Radio/Radio.ios.js +40 -64
  91. package/lib-commonjs/Radio/Radio.js +39 -59
  92. package/lib-commonjs/Radio/Radio.styling.d.ts +1 -1
  93. package/lib-commonjs/Radio/Radio.styling.js +94 -115
  94. package/lib-commonjs/Radio/Radio.types.d.ts +170 -176
  95. package/lib-commonjs/Radio/Radio.types.js +3 -3
  96. package/lib-commonjs/Radio/RadioTokens.android.d.ts +1 -1
  97. package/lib-commonjs/Radio/RadioTokens.android.js +45 -45
  98. package/lib-commonjs/Radio/RadioTokens.android.js.map +1 -1
  99. package/lib-commonjs/Radio/RadioTokens.d.ts +1 -1
  100. package/lib-commonjs/Radio/RadioTokens.ios.d.ts +1 -1
  101. package/lib-commonjs/Radio/RadioTokens.ios.js +42 -42
  102. package/lib-commonjs/Radio/RadioTokens.ios.js.map +1 -1
  103. package/lib-commonjs/Radio/RadioTokens.js +79 -79
  104. package/lib-commonjs/Radio/RadioTokens.js.map +1 -1
  105. package/lib-commonjs/Radio/RadioTokens.win32.d.ts +1 -1
  106. package/lib-commonjs/Radio/RadioTokens.win32.js +92 -92
  107. package/lib-commonjs/Radio/RadioTokens.win32.js.map +1 -1
  108. package/lib-commonjs/Radio/__tests__/RadioExperimental.test.d.ts +1 -1
  109. package/lib-commonjs/Radio/__tests__/RadioExperimental.test.js +48 -65
  110. package/lib-commonjs/Radio/useRadio.d.ts +1 -1
  111. package/lib-commonjs/Radio/useRadio.d.ts.map +1 -1
  112. package/lib-commonjs/Radio/useRadio.js +107 -143
  113. package/lib-commonjs/Radio/useRadio.js.map +1 -1
  114. package/lib-commonjs/Radio/useRadio.win32.d.ts +1 -1
  115. package/lib-commonjs/Radio/useRadio.win32.d.ts.map +1 -1
  116. package/lib-commonjs/Radio/useRadio.win32.js +162 -196
  117. package/lib-commonjs/Radio/useRadio.win32.js.map +1 -1
  118. package/lib-commonjs/RadioGroup/RadioGroup.d.ts +2 -7
  119. package/lib-commonjs/RadioGroup/RadioGroup.js +45 -65
  120. package/lib-commonjs/RadioGroup/RadioGroup.styling.d.ts +1 -1
  121. package/lib-commonjs/RadioGroup/RadioGroup.styling.js +48 -57
  122. package/lib-commonjs/RadioGroup/RadioGroup.types.d.ts +117 -117
  123. package/lib-commonjs/RadioGroup/RadioGroup.types.js +3 -3
  124. package/lib-commonjs/RadioGroup/RadioGroupTokens.android.d.ts +1 -1
  125. package/lib-commonjs/RadioGroup/RadioGroupTokens.android.js +5 -10
  126. package/lib-commonjs/RadioGroup/RadioGroupTokens.d.ts +1 -1
  127. package/lib-commonjs/RadioGroup/RadioGroupTokens.ios.d.ts +1 -1
  128. package/lib-commonjs/RadioGroup/RadioGroupTokens.ios.js +5 -10
  129. package/lib-commonjs/RadioGroup/RadioGroupTokens.js +15 -15
  130. package/lib-commonjs/RadioGroup/RadioGroupTokens.js.map +1 -1
  131. package/lib-commonjs/RadioGroup/RadioGroupTokens.mobile.d.ts +1 -1
  132. package/lib-commonjs/RadioGroup/RadioGroupTokens.mobile.js +16 -16
  133. package/lib-commonjs/RadioGroup/RadioGroupTokens.mobile.js.map +1 -1
  134. package/lib-commonjs/RadioGroup/__tests__/RadioGroupExperimental.test.d.ts +1 -1
  135. package/lib-commonjs/RadioGroup/__tests__/RadioGroupExperimental.test.js +91 -153
  136. package/lib-commonjs/RadioGroup/radioGroupContext.d.ts +1 -1
  137. package/lib-commonjs/RadioGroup/radioGroupContext.js +47 -68
  138. package/lib-commonjs/RadioGroup/useRadioGroup.d.ts +1 -1
  139. package/lib-commonjs/RadioGroup/useRadioGroup.js +97 -144
  140. package/lib-commonjs/RadioGroup/useRadioGroupContextValue.d.ts +1 -1
  141. package/lib-commonjs/RadioGroup/useRadioGroupContextValue.js +4 -4
  142. package/lib-commonjs/index.d.ts +4 -25
  143. package/lib-commonjs/index.js +32 -128
  144. package/lib-commonjs/legacy/MacOSRadioButtonNativeComponent.d.ts +6 -6
  145. package/lib-commonjs/legacy/MacOSRadioButtonNativeComponent.js +7 -9
  146. package/lib-commonjs/legacy/RadioButton.d.ts +2 -8
  147. package/lib-commonjs/legacy/RadioButton.d.ts.map +1 -1
  148. package/lib-commonjs/legacy/RadioButton.js +123 -162
  149. package/lib-commonjs/legacy/RadioButton.js.map +1 -1
  150. package/lib-commonjs/legacy/RadioButton.macos.d.ts +2 -8
  151. package/lib-commonjs/legacy/RadioButton.macos.d.ts.map +1 -1
  152. package/lib-commonjs/legacy/RadioButton.macos.js +90 -107
  153. package/lib-commonjs/legacy/RadioButton.macos.js.map +1 -1
  154. package/lib-commonjs/legacy/RadioButton.settings.d.ts +2 -2
  155. package/lib-commonjs/legacy/RadioButton.settings.js +84 -84
  156. package/lib-commonjs/legacy/RadioButton.types.d.ts +45 -45
  157. package/lib-commonjs/legacy/RadioButton.types.js +3 -3
  158. package/lib-commonjs/legacy/RadioButton.win32.d.ts +2 -8
  159. package/lib-commonjs/legacy/RadioButton.win32.d.ts.map +1 -1
  160. package/lib-commonjs/legacy/RadioButton.win32.js +177 -217
  161. package/lib-commonjs/legacy/RadioButton.win32.js.map +1 -1
  162. package/lib-commonjs/legacy/RadioGroup.d.ts +2 -8
  163. package/lib-commonjs/legacy/RadioGroup.d.ts.map +1 -1
  164. package/lib-commonjs/legacy/RadioGroup.js +121 -168
  165. package/lib-commonjs/legacy/RadioGroup.js.map +1 -1
  166. package/lib-commonjs/legacy/RadioGroup.settings.d.ts +1 -1
  167. package/lib-commonjs/legacy/RadioGroup.settings.js +24 -24
  168. package/lib-commonjs/legacy/RadioGroup.types.d.ts +79 -78
  169. package/lib-commonjs/legacy/RadioGroup.types.js +3 -3
  170. package/lib-commonjs/legacy/__tests__/RadioButton.test.d.ts +1 -1
  171. package/lib-commonjs/legacy/__tests__/RadioButton.test.js +42 -59
  172. package/lib-commonjs/legacy/__tests__/RadioButtonGroup.test.d.ts +1 -1
  173. package/lib-commonjs/legacy/__tests__/RadioButtonGroup.test.js +53 -96
  174. package/package.json +35 -34
  175. package/src/Radio/RadioTokens.android.ts +1 -1
  176. package/src/Radio/RadioTokens.ios.ts +1 -1
  177. package/src/Radio/RadioTokens.ts +1 -1
  178. package/src/Radio/RadioTokens.win32.ts +1 -1
  179. package/src/Radio/useRadio.ts +13 -11
  180. package/src/Radio/useRadio.win32.ts +45 -26
  181. package/src/RadioGroup/RadioGroupTokens.mobile.ts +1 -1
  182. package/src/RadioGroup/RadioGroupTokens.ts +1 -1
  183. package/src/legacy/RadioButton.macos.tsx +10 -8
  184. package/src/legacy/RadioButton.tsx +13 -11
  185. package/src/legacy/RadioButton.win32.tsx +46 -30
  186. package/src/legacy/RadioGroup.tsx +4 -8
  187. package/eslint.config.js +0 -3
@@ -1,155 +1,108 @@
1
- 'use strict';
2
- var __createBinding =
3
- (this && this.__createBinding) ||
4
- (Object.create
5
- ? function (o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = {
10
- enumerable: true,
11
- get: function () {
12
- return m[k];
13
- },
14
- };
15
- }
16
- Object.defineProperty(o, k2, desc);
17
- }
18
- : function (o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- o[k2] = m[k];
21
- });
22
- var __setModuleDefault =
23
- (this && this.__setModuleDefault) ||
24
- (Object.create
25
- ? function (o, v) {
26
- Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
- }
28
- : function (o, v) {
29
- o['default'] = v;
30
- });
31
- var __importStar =
32
- (this && this.__importStar) ||
33
- (function () {
34
- var ownKeys = function (o) {
35
- ownKeys =
36
- Object.getOwnPropertyNames ||
37
- function (o) {
38
- var ar = [];
39
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
- return ar;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
41
24
  };
42
- return ownKeys(o);
25
+ return ownKeys(o);
43
26
  };
44
27
  return function (mod) {
45
- if (mod && mod.__esModule) return mod;
46
- var result = {};
47
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
- __setModuleDefault(result, mod);
49
- return result;
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
50
33
  };
51
- })();
52
- Object.defineProperty(exports, '__esModule', { value: true });
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
53
36
  exports.useRadioGroup = void 0;
54
- const React = __importStar(require('react'));
55
- const framework_1 = require('@fluentui-react-native/framework');
56
- const interactive_hooks_1 = require('@fluentui-react-native/interactive-hooks');
37
+ const React = __importStar(require("react"));
38
+ const framework_1 = require("@fluentui-react-native/framework");
39
+ const interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
57
40
  const useRadioGroup = (props) => {
58
- const {
59
- accessible,
60
- value,
61
- defaultValue,
62
- disabled,
63
- required,
64
- layout,
65
- onChange,
66
- isCircularNavigation,
67
- accessibilityLabel,
68
- label,
69
- accessibilityState,
70
- } = props;
71
- // This hook updates the selected Radio and calls the customer's onClick function. This gets called after a button is pressed.
72
- const data = (0, interactive_hooks_1.useSelectedKey)(value || defaultValue || null, onChange);
73
- const [selectedButtonRef, setSelectedButtonRef] = React.useState(React.useRef(null));
74
- const onSelectButtonRef = React.useCallback(
75
- (ref) => {
76
- setSelectedButtonRef(ref);
77
- },
78
- [setSelectedButtonRef],
79
- );
80
- const [invoked, setInvoked] = React.useState(false);
81
- const onInvoked = React.useCallback(
82
- (check) => {
83
- setInvoked(check);
84
- },
85
- [setInvoked],
86
- );
87
- const [values, setValues] = React.useState([]);
88
- const onAddRadioValue = React.useCallback(
89
- (value) => {
90
- setValues((values) => [...values, value]);
91
- },
92
- [setValues],
93
- );
94
- const onRemoveRadioValue = React.useCallback(
95
- (value) => {
96
- setValues((values) => values.filter((item) => item !== value));
97
- },
98
- [setValues],
99
- );
100
- const [enabledValues, setEnabledValues] = React.useState([]);
101
- const onAddRadioEnabledValue = React.useCallback(
102
- (value) => {
103
- setEnabledValues((enabledValues) => [...enabledValues, value]);
104
- },
105
- [setEnabledValues],
106
- );
107
- const onRemoveRadioEnabledValue = React.useCallback(
108
- (value) => {
109
- setEnabledValues((enabledValues) => enabledValues.filter((item) => item !== value));
110
- },
111
- [setEnabledValues],
112
- );
113
- const state = {
114
- value: data.selectedKey,
115
- required: required || false,
116
- disabled: disabled || false,
117
- layout: layout || 'vertical',
118
- onChange: data.onKeySelect,
119
- updateSelectedButtonRef: onSelectButtonRef,
120
- invoked: invoked,
121
- updateInvoked: onInvoked,
122
- values: values,
123
- enabledValues: enabledValues,
124
- addRadioValue: onAddRadioValue,
125
- removeRadioValue: onRemoveRadioValue,
126
- addRadioEnabledValue: onAddRadioEnabledValue,
127
- removeRadioEnabledValue: onRemoveRadioEnabledValue,
128
- selectedButtonDisabled: values.includes(data.selectedKey) && !enabledValues.includes(data.selectedKey),
129
- };
130
- return {
131
- props: {
132
- ...props,
133
- required,
134
- layout,
135
- accessible: accessible ?? true,
136
- accessibilityRole: 'radiogroup',
137
- accessibilityLabel: accessibilityLabel ?? label,
138
- accessibilityState: getAccessibilityState(state.disabled, state.required, accessibilityState),
139
- defaultTabbableElement: selectedButtonRef,
140
- isCircularNavigation: isCircularNavigation ?? true,
141
- },
142
- state: {
143
- ...state,
144
- },
145
- };
41
+ const { accessible, value, defaultValue, disabled, required, layout, onChange, isCircularNavigation, accessibilityLabel, label, accessibilityState, } = props;
42
+ // This hook updates the selected Radio and calls the customer's onClick function. This gets called after a button is pressed.
43
+ const data = (0, interactive_hooks_1.useSelectedKey)(value || defaultValue || null, onChange);
44
+ const [selectedButtonRef, setSelectedButtonRef] = React.useState(React.useRef(null));
45
+ const onSelectButtonRef = React.useCallback((ref) => {
46
+ setSelectedButtonRef(ref);
47
+ }, [setSelectedButtonRef]);
48
+ const [invoked, setInvoked] = React.useState(false);
49
+ const onInvoked = React.useCallback((check) => {
50
+ setInvoked(check);
51
+ }, [setInvoked]);
52
+ const [values, setValues] = React.useState([]);
53
+ const onAddRadioValue = React.useCallback((value) => {
54
+ setValues((values) => [...values, value]);
55
+ }, [setValues]);
56
+ const onRemoveRadioValue = React.useCallback((value) => {
57
+ setValues((values) => values.filter((item) => item !== value));
58
+ }, [setValues]);
59
+ const [enabledValues, setEnabledValues] = React.useState([]);
60
+ const onAddRadioEnabledValue = React.useCallback((value) => {
61
+ setEnabledValues((enabledValues) => [...enabledValues, value]);
62
+ }, [setEnabledValues]);
63
+ const onRemoveRadioEnabledValue = React.useCallback((value) => {
64
+ setEnabledValues((enabledValues) => enabledValues.filter((item) => item !== value));
65
+ }, [setEnabledValues]);
66
+ const state = {
67
+ value: data.selectedKey,
68
+ required: required || false,
69
+ disabled: disabled || false,
70
+ layout: layout || 'vertical',
71
+ onChange: data.onKeySelect,
72
+ updateSelectedButtonRef: onSelectButtonRef,
73
+ invoked: invoked,
74
+ updateInvoked: onInvoked,
75
+ values: values,
76
+ enabledValues: enabledValues,
77
+ addRadioValue: onAddRadioValue,
78
+ removeRadioValue: onRemoveRadioValue,
79
+ addRadioEnabledValue: onAddRadioEnabledValue,
80
+ removeRadioEnabledValue: onRemoveRadioEnabledValue,
81
+ selectedButtonDisabled: values.includes(data.selectedKey) && !enabledValues.includes(data.selectedKey),
82
+ };
83
+ return {
84
+ props: {
85
+ ...props,
86
+ required,
87
+ layout,
88
+ accessible: accessible ?? true,
89
+ accessibilityRole: 'radiogroup',
90
+ accessibilityLabel: accessibilityLabel ?? label,
91
+ accessibilityState: getAccessibilityState(state.disabled, state.required, accessibilityState),
92
+ defaultTabbableElement: selectedButtonRef,
93
+ isCircularNavigation: isCircularNavigation ?? true,
94
+ },
95
+ state: {
96
+ ...state,
97
+ },
98
+ };
146
99
  };
147
100
  exports.useRadioGroup = useRadioGroup;
148
101
  const getAccessibilityState = (0, framework_1.memoize)(getAccessibilityStateWorker);
149
102
  function getAccessibilityStateWorker(disabled, required, accessibilityState) {
150
- if (accessibilityState) {
151
- return { disabled, required, ...accessibilityState };
152
- }
153
- return { disabled, required };
103
+ if (accessibilityState) {
104
+ return { disabled, required, ...accessibilityState };
105
+ }
106
+ return { disabled, required };
154
107
  }
155
- //# sourceMappingURL=useRadioGroup.js.map
108
+ //# sourceMappingURL=useRadioGroup.js.map
@@ -1,3 +1,3 @@
1
1
  import type { RadioGroupState } from './RadioGroup.types';
2
2
  export declare const useRadioGroupContextValue: (state: RadioGroupState) => RadioGroupState;
3
- //# sourceMappingURL=useRadioGroupContextValue.d.ts.map
3
+ //# sourceMappingURL=useRadioGroupContextValue.d.ts.map
@@ -1,8 +1,8 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useRadioGroupContextValue = void 0;
4
4
  const useRadioGroupContextValue = (state) => {
5
- return { ...state };
5
+ return { ...state };
6
6
  };
7
7
  exports.useRadioGroupContextValue = useRadioGroupContextValue;
8
- //# sourceMappingURL=useRadioGroupContextValue.js.map
8
+ //# sourceMappingURL=useRadioGroupContextValue.js.map
@@ -1,12 +1,5 @@
1
1
  export { RadioGroup as RadioGroupV1 } from './RadioGroup/RadioGroup';
2
- export type {
3
- RadioGroupInfo,
4
- RadioGroupProps,
5
- RadioGroupSlotProps,
6
- RadioGroupState,
7
- RadioGroupTokens,
8
- RadioGroupType,
9
- } from './RadioGroup/RadioGroup.types';
2
+ export type { RadioGroupInfo, RadioGroupProps, RadioGroupSlotProps, RadioGroupState, RadioGroupTokens, RadioGroupType, } from './RadioGroup/RadioGroup.types';
10
3
  export { radioGroupName as radioGroupNameV1 } from './RadioGroup/RadioGroup.types';
11
4
  export type { RadioGroupContextValue } from './RadioGroup/radioGroupContext';
12
5
  export { RadioGroupContext as RadioGroupContextV1, RadioGroupProvider, useRadioGroupContext } from './RadioGroup/radioGroupContext';
@@ -18,22 +11,8 @@ export { radioName } from './Radio/Radio.types';
18
11
  export { useRadio } from './Radio/useRadio';
19
12
  export { RadioButton } from './legacy/RadioButton';
20
13
  export { radioButtonName } from './legacy/RadioButton.types';
21
- export type {
22
- IRadioButtonProps,
23
- IRadioButtonRenderData,
24
- IRadioButtonSlotProps,
25
- IRadioButtonTokens,
26
- IRadioButtonType,
27
- } from './legacy/RadioButton.types';
14
+ export type { IRadioButtonProps, IRadioButtonRenderData, IRadioButtonSlotProps, IRadioButtonTokens, IRadioButtonType, } from './legacy/RadioButton.types';
28
15
  export { RadioGroup, RadioGroupContext } from './legacy/RadioGroup';
29
16
  export { radioGroupName } from './legacy/RadioGroup.types';
30
- export type {
31
- IRadioGroupContext,
32
- IRadioGroupProps,
33
- IRadioGroupRenderData,
34
- IRadioGroupSlotProps,
35
- IRadioGroupState,
36
- IRadioGroupTokens,
37
- IRadioGroupType,
38
- } from './legacy/RadioGroup.types';
39
- //# sourceMappingURL=index.d.ts.map
17
+ export type { IRadioGroupContext, IRadioGroupProps, IRadioGroupRenderData, IRadioGroupSlotProps, IRadioGroupState, IRadioGroupTokens, IRadioGroupType, } from './legacy/RadioGroup.types';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -1,128 +1,32 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
3
- exports.radioGroupName =
4
- exports.RadioGroupContext =
5
- exports.RadioGroup =
6
- exports.radioButtonName =
7
- exports.RadioButton =
8
- exports.useRadio =
9
- exports.radioName =
10
- exports.radioLookup =
11
- exports.Radio =
12
- exports.useRadioGroupContextValue =
13
- exports.useRadioGroup =
14
- exports.useRadioGroupContext =
15
- exports.RadioGroupProvider =
16
- exports.RadioGroupContextV1 =
17
- exports.radioGroupNameV1 =
18
- exports.RadioGroupV1 =
19
- void 0;
20
- const RadioGroup_1 = require('./RadioGroup/RadioGroup');
21
- Object.defineProperty(exports, 'RadioGroupV1', {
22
- enumerable: true,
23
- get: function () {
24
- return RadioGroup_1.RadioGroup;
25
- },
26
- });
27
- const RadioGroup_types_1 = require('./RadioGroup/RadioGroup.types');
28
- Object.defineProperty(exports, 'radioGroupNameV1', {
29
- enumerable: true,
30
- get: function () {
31
- return RadioGroup_types_1.radioGroupName;
32
- },
33
- });
34
- const radioGroupContext_1 = require('./RadioGroup/radioGroupContext');
35
- Object.defineProperty(exports, 'RadioGroupContextV1', {
36
- enumerable: true,
37
- get: function () {
38
- return radioGroupContext_1.RadioGroupContext;
39
- },
40
- });
41
- Object.defineProperty(exports, 'RadioGroupProvider', {
42
- enumerable: true,
43
- get: function () {
44
- return radioGroupContext_1.RadioGroupProvider;
45
- },
46
- });
47
- Object.defineProperty(exports, 'useRadioGroupContext', {
48
- enumerable: true,
49
- get: function () {
50
- return radioGroupContext_1.useRadioGroupContext;
51
- },
52
- });
53
- const useRadioGroup_1 = require('./RadioGroup/useRadioGroup');
54
- Object.defineProperty(exports, 'useRadioGroup', {
55
- enumerable: true,
56
- get: function () {
57
- return useRadioGroup_1.useRadioGroup;
58
- },
59
- });
60
- const useRadioGroupContextValue_1 = require('./RadioGroup/useRadioGroupContextValue');
61
- Object.defineProperty(exports, 'useRadioGroupContextValue', {
62
- enumerable: true,
63
- get: function () {
64
- return useRadioGroupContextValue_1.useRadioGroupContextValue;
65
- },
66
- });
67
- const Radio_1 = require('./Radio/Radio');
68
- Object.defineProperty(exports, 'Radio', {
69
- enumerable: true,
70
- get: function () {
71
- return Radio_1.Radio;
72
- },
73
- });
74
- Object.defineProperty(exports, 'radioLookup', {
75
- enumerable: true,
76
- get: function () {
77
- return Radio_1.radioLookup;
78
- },
79
- });
80
- const Radio_types_1 = require('./Radio/Radio.types');
81
- Object.defineProperty(exports, 'radioName', {
82
- enumerable: true,
83
- get: function () {
84
- return Radio_types_1.radioName;
85
- },
86
- });
87
- const useRadio_1 = require('./Radio/useRadio');
88
- Object.defineProperty(exports, 'useRadio', {
89
- enumerable: true,
90
- get: function () {
91
- return useRadio_1.useRadio;
92
- },
93
- });
94
- const RadioButton_1 = require('./legacy/RadioButton');
95
- Object.defineProperty(exports, 'RadioButton', {
96
- enumerable: true,
97
- get: function () {
98
- return RadioButton_1.RadioButton;
99
- },
100
- });
101
- const RadioButton_types_1 = require('./legacy/RadioButton.types');
102
- Object.defineProperty(exports, 'radioButtonName', {
103
- enumerable: true,
104
- get: function () {
105
- return RadioButton_types_1.radioButtonName;
106
- },
107
- });
108
- const RadioGroup_2 = require('./legacy/RadioGroup');
109
- Object.defineProperty(exports, 'RadioGroup', {
110
- enumerable: true,
111
- get: function () {
112
- return RadioGroup_2.RadioGroup;
113
- },
114
- });
115
- Object.defineProperty(exports, 'RadioGroupContext', {
116
- enumerable: true,
117
- get: function () {
118
- return RadioGroup_2.RadioGroupContext;
119
- },
120
- });
121
- const RadioGroup_types_2 = require('./legacy/RadioGroup.types');
122
- Object.defineProperty(exports, 'radioGroupName', {
123
- enumerable: true,
124
- get: function () {
125
- return RadioGroup_types_2.radioGroupName;
126
- },
127
- });
128
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.radioGroupName = exports.RadioGroupContext = exports.RadioGroup = exports.radioButtonName = exports.RadioButton = exports.useRadio = exports.radioName = exports.radioLookup = exports.Radio = exports.useRadioGroupContextValue = exports.useRadioGroup = exports.useRadioGroupContext = exports.RadioGroupProvider = exports.RadioGroupContextV1 = exports.radioGroupNameV1 = exports.RadioGroupV1 = void 0;
4
+ const RadioGroup_1 = require("./RadioGroup/RadioGroup");
5
+ Object.defineProperty(exports, "RadioGroupV1", { enumerable: true, get: function () { return RadioGroup_1.RadioGroup; } });
6
+ const RadioGroup_types_1 = require("./RadioGroup/RadioGroup.types");
7
+ Object.defineProperty(exports, "radioGroupNameV1", { enumerable: true, get: function () { return RadioGroup_types_1.radioGroupName; } });
8
+ const radioGroupContext_1 = require("./RadioGroup/radioGroupContext");
9
+ Object.defineProperty(exports, "RadioGroupContextV1", { enumerable: true, get: function () { return radioGroupContext_1.RadioGroupContext; } });
10
+ Object.defineProperty(exports, "RadioGroupProvider", { enumerable: true, get: function () { return radioGroupContext_1.RadioGroupProvider; } });
11
+ Object.defineProperty(exports, "useRadioGroupContext", { enumerable: true, get: function () { return radioGroupContext_1.useRadioGroupContext; } });
12
+ const useRadioGroup_1 = require("./RadioGroup/useRadioGroup");
13
+ Object.defineProperty(exports, "useRadioGroup", { enumerable: true, get: function () { return useRadioGroup_1.useRadioGroup; } });
14
+ const useRadioGroupContextValue_1 = require("./RadioGroup/useRadioGroupContextValue");
15
+ Object.defineProperty(exports, "useRadioGroupContextValue", { enumerable: true, get: function () { return useRadioGroupContextValue_1.useRadioGroupContextValue; } });
16
+ const Radio_1 = require("./Radio/Radio");
17
+ Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return Radio_1.Radio; } });
18
+ Object.defineProperty(exports, "radioLookup", { enumerable: true, get: function () { return Radio_1.radioLookup; } });
19
+ const Radio_types_1 = require("./Radio/Radio.types");
20
+ Object.defineProperty(exports, "radioName", { enumerable: true, get: function () { return Radio_types_1.radioName; } });
21
+ const useRadio_1 = require("./Radio/useRadio");
22
+ Object.defineProperty(exports, "useRadio", { enumerable: true, get: function () { return useRadio_1.useRadio; } });
23
+ const RadioButton_1 = require("./legacy/RadioButton");
24
+ Object.defineProperty(exports, "RadioButton", { enumerable: true, get: function () { return RadioButton_1.RadioButton; } });
25
+ const RadioButton_types_1 = require("./legacy/RadioButton.types");
26
+ Object.defineProperty(exports, "radioButtonName", { enumerable: true, get: function () { return RadioButton_types_1.radioButtonName; } });
27
+ const RadioGroup_2 = require("./legacy/RadioGroup");
28
+ Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return RadioGroup_2.RadioGroup; } });
29
+ Object.defineProperty(exports, "RadioGroupContext", { enumerable: true, get: function () { return RadioGroup_2.RadioGroupContext; } });
30
+ const RadioGroup_types_2 = require("./legacy/RadioGroup.types");
31
+ Object.defineProperty(exports, "radioGroupName", { enumerable: true, get: function () { return RadioGroup_types_2.radioGroupName; } });
32
+ //# sourceMappingURL=index.js.map
@@ -6,12 +6,12 @@
6
6
  import type { HostComponent, ViewProps } from 'react-native';
7
7
  import type { BubblingEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
8
8
  export interface NativeProps extends ViewProps {
9
- content?: string;
10
- disabled?: boolean;
11
- buttonKey?: string;
12
- selected?: boolean;
13
- onPress?: BubblingEventHandler<null>;
9
+ content?: string;
10
+ disabled?: boolean;
11
+ buttonKey?: string;
12
+ selected?: boolean;
13
+ onPress?: BubblingEventHandler<null>;
14
14
  }
15
15
  declare const _default: HostComponent<NativeProps>;
16
16
  export default _default;
17
- //# sourceMappingURL=MacOSRadioButtonNativeComponent.d.ts.map
17
+ //# sourceMappingURL=MacOSRadioButtonNativeComponent.d.ts.map
@@ -1,15 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
  /**
3
3
  * Copyright (c) Microsoft Corporation.
4
4
  * Licensed under the MIT License.
5
5
  * @format
6
6
  */
7
- var __importDefault =
8
- (this && this.__importDefault) ||
9
- function (mod) {
10
- return mod && mod.__esModule ? mod : { default: mod };
11
- };
12
- Object.defineProperty(exports, '__esModule', { value: true });
13
- const codegenNativeComponent_1 = __importDefault(require('react-native/Libraries/Utilities/codegenNativeComponent'));
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
14
12
  exports.default = (0, codegenNativeComponent_1.default)('FRNRadioButtonView');
15
- //# sourceMappingURL=MacOSRadioButtonNativeComponent.js.map
13
+ //# sourceMappingURL=MacOSRadioButtonNativeComponent.js.map
@@ -1,10 +1,4 @@
1
1
  import type { IRadioButtonProps, IRadioButtonSlotProps } from './RadioButton.types';
2
- export declare const RadioButton: import('@uifabricshared/foundation-compose').IComposeReturnType<
3
- IRadioButtonProps,
4
- IRadioButtonSlotProps,
5
- import('./RadioButton.types').IRadioButtonTokens,
6
- object,
7
- object
8
- >;
2
+ export declare const RadioButton: import("@uifabricshared/foundation-compose").IComposeReturnType<IRadioButtonProps, IRadioButtonSlotProps, import("./RadioButton.types").IRadioButtonTokens, object, object>;
9
3
  export default RadioButton;
10
- //# sourceMappingURL=RadioButton.d.ts.map
4
+ //# sourceMappingURL=RadioButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../src/legacy/RadioButton.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAoB,iBAAiB,EAAE,qBAAqB,EAA0B,MAAM,qBAAqB,CAAC;AAI9H,eAAO,MAAM,WAAW,6KAqHtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../src/legacy/RadioButton.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAoB,iBAAiB,EAAE,qBAAqB,EAA0B,MAAM,qBAAqB,CAAC;AAI9H,eAAO,MAAM,WAAW,6KAuHtB,CAAC;AAEH,eAAe,WAAW,CAAC"}