@fluentui-react-native/radio-group 0.16.40 → 0.16.42
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 +91 -1
- package/CHANGELOG.md +28 -2
- package/package.json +7 -7
- package/lib/RadioButton.d.ts +0 -4
- package/lib/RadioButton.d.ts.map +0 -1
- package/lib/RadioButton.js +0 -108
- package/lib/RadioButton.js.map +0 -1
- package/lib/RadioButton.macos.d.ts +0 -4
- package/lib/RadioButton.macos.d.ts.map +0 -1
- package/lib/RadioButton.macos.js +0 -61
- package/lib/RadioButton.macos.js.map +0 -1
- package/lib/RadioButton.settings.d.ts +0 -5
- package/lib/RadioButton.settings.d.ts.map +0 -1
- package/lib/RadioButton.settings.js +0 -95
- package/lib/RadioButton.settings.js.map +0 -1
- package/lib/RadioButton.test.d.ts +0 -2
- package/lib/RadioButton.test.d.ts.map +0 -1
- package/lib/RadioButton.test.js +0 -10
- package/lib/RadioButton.test.js.map +0 -1
- package/lib/RadioButton.types.d.ts +0 -62
- package/lib/RadioButton.types.d.ts.map +0 -1
- package/lib/RadioButton.types.js +0 -2
- package/lib/RadioButton.types.js.map +0 -1
- package/lib/RadioButtonGroup.test.d.ts +0 -2
- package/lib/RadioButtonGroup.test.d.ts.map +0 -1
- package/lib/RadioButtonGroup.test.js +0 -20
- package/lib/RadioButtonGroup.test.js.map +0 -1
- package/lib/RadioGroup.d.ts +0 -7
- package/lib/RadioGroup.d.ts.map +0 -1
- package/lib/RadioGroup.js +0 -113
- package/lib/RadioGroup.js.map +0 -1
- package/lib/RadioGroup.settings.d.ts +0 -4
- package/lib/RadioGroup.settings.d.ts.map +0 -1
- package/lib/RadioGroup.settings.js +0 -25
- package/lib/RadioGroup.settings.js.map +0 -1
- package/lib/RadioGroup.types.d.ts +0 -70
- package/lib/RadioGroup.types.d.ts.map +0 -1
- package/lib/RadioGroup.types.js +0 -2
- package/lib/RadioGroup.types.js.map +0 -1
- package/lib/index.d.ts +0 -7
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -5
- package/lib/index.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,97 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/radio-group",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Sat, 18 Mar 2023 17:18:20 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/radio-group_v0.16.42",
|
|
7
|
+
"version": "0.16.42",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/radio-group",
|
|
13
|
+
"comment": "Bump @uifabricshared/foundation-compose to v1.13.7",
|
|
14
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/radio-group",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/focus-zone to v0.11.38",
|
|
20
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui-react-native/radio-group",
|
|
25
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.26",
|
|
26
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui-react-native/radio-group",
|
|
31
|
+
"comment": "Bump @fluentui-react-native/pressable to v0.9.65",
|
|
32
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui-react-native/radio-group",
|
|
37
|
+
"comment": "Bump @fluentui-react-native/text to v0.19.28",
|
|
38
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui-react-native/radio-group",
|
|
43
|
+
"comment": "Bump @fluentui-react-native/tokens to v0.20.13",
|
|
44
|
+
"commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Tue, 14 Mar 2023 20:50:45 GMT",
|
|
51
|
+
"tag": "@fluentui-react-native/radio-group_v0.16.41",
|
|
52
|
+
"version": "0.16.41",
|
|
53
|
+
"comments": {
|
|
54
|
+
"patch": [
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui-react-native/radio-group",
|
|
58
|
+
"comment": "Bump @uifabricshared/foundation-compose to v1.13.6",
|
|
59
|
+
"commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui-react-native/radio-group",
|
|
64
|
+
"comment": "Bump @fluentui-react-native/focus-zone to v0.11.37",
|
|
65
|
+
"commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@fluentui-react-native/radio-group",
|
|
70
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.25",
|
|
71
|
+
"commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "beachball",
|
|
75
|
+
"package": "@fluentui-react-native/radio-group",
|
|
76
|
+
"comment": "Bump @fluentui-react-native/pressable to v0.9.64",
|
|
77
|
+
"commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui-react-native/radio-group",
|
|
82
|
+
"comment": "Bump @fluentui-react-native/text to v0.19.27",
|
|
83
|
+
"commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui-react-native/radio-group",
|
|
88
|
+
"comment": "Bump @fluentui-react-native/tokens to v0.20.12",
|
|
89
|
+
"commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"date": "Tue, 07 Mar 2023 20:54:15 GMT",
|
|
6
96
|
"tag": "@fluentui-react-native/radio-group_v0.16.40",
|
|
7
97
|
"version": "0.16.40",
|
|
8
98
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/radio-group
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.16.42
|
|
8
|
+
|
|
9
|
+
Sat, 18 Mar 2023 17:18:20 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @uifabricshared/foundation-compose to v1.13.7
|
|
14
|
+
- Bump @fluentui-react-native/focus-zone to v0.11.38
|
|
15
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.22.26
|
|
16
|
+
- Bump @fluentui-react-native/pressable to v0.9.65
|
|
17
|
+
- Bump @fluentui-react-native/text to v0.19.28
|
|
18
|
+
- Bump @fluentui-react-native/tokens to v0.20.13
|
|
19
|
+
|
|
20
|
+
## 0.16.41
|
|
21
|
+
|
|
22
|
+
Tue, 14 Mar 2023 20:50:45 GMT
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- Bump @uifabricshared/foundation-compose to v1.13.6
|
|
27
|
+
- Bump @fluentui-react-native/focus-zone to v0.11.37
|
|
28
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.22.25
|
|
29
|
+
- Bump @fluentui-react-native/pressable to v0.9.64
|
|
30
|
+
- Bump @fluentui-react-native/text to v0.19.27
|
|
31
|
+
- Bump @fluentui-react-native/tokens to v0.20.12
|
|
32
|
+
|
|
7
33
|
## 0.16.40
|
|
8
34
|
|
|
9
|
-
Tue, 07 Mar 2023 20:
|
|
35
|
+
Tue, 07 Mar 2023 20:54:15 GMT
|
|
10
36
|
|
|
11
37
|
### Patches
|
|
12
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/radio-group",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.42",
|
|
4
4
|
"description": "A cross-platform Radio Group component using the Fluent Design System",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"directory": "packages/components/RadioGroup"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@uifabricshared/foundation-compose": "^1.13.
|
|
25
|
+
"@uifabricshared/foundation-compose": "^1.13.7",
|
|
26
26
|
"@fluentui-react-native/adapters": ">=0.10.2 <1.0.0",
|
|
27
27
|
"@fluentui-react-native/component-cache": "^1.4.4",
|
|
28
|
-
"@fluentui-react-native/focus-zone": ">=0.11.
|
|
29
|
-
"@fluentui-react-native/interactive-hooks": ">=0.22.
|
|
30
|
-
"@fluentui-react-native/pressable": ">=0.9.
|
|
31
|
-
"@fluentui-react-native/text": ">=0.19.
|
|
32
|
-
"@fluentui-react-native/tokens": ">=0.20.
|
|
28
|
+
"@fluentui-react-native/focus-zone": ">=0.11.38 <1.0.0",
|
|
29
|
+
"@fluentui-react-native/interactive-hooks": ">=0.22.26 <1.0.0",
|
|
30
|
+
"@fluentui-react-native/pressable": ">=0.9.65 <1.0.0",
|
|
31
|
+
"@fluentui-react-native/text": ">=0.19.28 <1.0.0",
|
|
32
|
+
"@fluentui-react-native/tokens": ">=0.20.13 <1.0.0",
|
|
33
33
|
"@uifabricshared/foundation-composable": ">=0.11.3 <1.0.0",
|
|
34
34
|
"@uifabricshared/foundation-settings": ">=0.12.3 <1.0.0"
|
|
35
35
|
},
|
package/lib/RadioButton.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IRadioButtonProps, IRadioButtonSlotProps } from './RadioButton.types';
|
|
2
|
-
export declare const RadioButton: import("@uifabricshared/foundation-compose").IComposeReturnType<IRadioButtonProps, IRadioButtonSlotProps, import("./RadioButton.types").IRadioButtonTokens, object, object>;
|
|
3
|
-
export default RadioButton;
|
|
4
|
-
//# sourceMappingURL=RadioButton.d.ts.map
|
package/lib/RadioButton.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../src/RadioButton.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAoB,iBAAiB,EAAE,qBAAqB,EAA0B,MAAM,qBAAqB,CAAC;AAI9H,eAAO,MAAM,WAAW,6KAqHtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/lib/RadioButton.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/** @jsx withSlots */
|
|
2
|
-
'use strict';
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
import * as React from 'react';
|
|
26
|
-
import { View } from 'react-native';
|
|
27
|
-
import { filterViewProps } from '@fluentui-react-native/adapters';
|
|
28
|
-
import { useAsPressable, useOnPressWithFocus, useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
|
|
29
|
-
import { Text } from '@fluentui-react-native/text';
|
|
30
|
-
import { foregroundColorTokens, textTokens, borderTokens, backgroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens';
|
|
31
|
-
import { withSlots } from '@uifabricshared/foundation-composable';
|
|
32
|
-
import { compose } from '@uifabricshared/foundation-compose';
|
|
33
|
-
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
34
|
-
import { settings, radioButtonSelectActionLabel } from './RadioButton.settings';
|
|
35
|
-
import { radioButtonName } from './RadioButton.types';
|
|
36
|
-
import { RadioGroupContext } from './RadioGroup';
|
|
37
|
-
export var RadioButton = compose({
|
|
38
|
-
displayName: radioButtonName,
|
|
39
|
-
usePrepareProps: function (userProps, useStyling) {
|
|
40
|
-
var _a, _b, _c;
|
|
41
|
-
var defaultComponentRef = React.useRef(null);
|
|
42
|
-
var content = userProps.content, buttonKey = userProps.buttonKey, disabled = userProps.disabled, accessibilityLabel = userProps.accessibilityLabel, ariaLabel = userProps.ariaLabel, _d = userProps.componentRef, componentRef = _d === void 0 ? defaultComponentRef : _d, accessibilityPositionInSet = userProps.accessibilityPositionInSet, ariaPosInSet = userProps.ariaPosInSet, accessibilitySetSize = userProps.accessibilitySetSize, ariaSetSize = userProps.ariaSetSize, rest = __rest(userProps, ["content", "buttonKey", "disabled", "accessibilityLabel", "ariaLabel", "componentRef", "accessibilityPositionInSet", "ariaPosInSet", "accessibilitySetSize", "ariaSetSize"]);
|
|
43
|
-
// Grabs the context information from RadioGroup (currently selected button and client's onChange callback)
|
|
44
|
-
var info = React.useContext(RadioGroupContext);
|
|
45
|
-
var buttonRef = useViewCommandFocus(componentRef);
|
|
46
|
-
/* We don't want to call the user's onChange multiple times on the same selection. */
|
|
47
|
-
var changeSelection = function () {
|
|
48
|
-
if (buttonKey != info.selectedKey) {
|
|
49
|
-
info.onChange && info.onChange(buttonKey);
|
|
50
|
-
info.updateSelectedButtonRef && componentRef && info.updateSelectedButtonRef(componentRef);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
/* We use the componentRef of the currently selected button to maintain the default tabbable
|
|
54
|
-
element in a RadioGroup. Since the componentRef isn't generated until after initial render,
|
|
55
|
-
we must update it once here. */
|
|
56
|
-
React.useEffect(function () {
|
|
57
|
-
if (buttonKey == info.selectedKey) {
|
|
58
|
-
info.updateSelectedButtonRef && componentRef && info.updateSelectedButtonRef(componentRef);
|
|
59
|
-
}
|
|
60
|
-
}, []);
|
|
61
|
-
// Ensure focus is placed on button after click
|
|
62
|
-
var changeSelectionWithFocus = useOnPressWithFocus(componentRef, changeSelection);
|
|
63
|
-
/* RadioButton changes selection when focus is moved between each RadioButton and on a click */
|
|
64
|
-
var pressable = useAsPressable(__assign(__assign({}, rest), { onPress: changeSelectionWithFocus, onFocus: changeSelection }));
|
|
65
|
-
// Used when creating accessibility properties in mergeSettings below
|
|
66
|
-
var onAccessibilityAction = React.useCallback(function (event) {
|
|
67
|
-
switch (event.nativeEvent.actionName) {
|
|
68
|
-
case 'Select':
|
|
69
|
-
changeSelection();
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
}, [info, buttonKey]);
|
|
73
|
-
var state = __assign(__assign({}, pressable.state), { selected: info.selectedKey === userProps.buttonKey, disabled: disabled || false });
|
|
74
|
-
// Grab the styling information from the userProps, referencing the state as well as the props.
|
|
75
|
-
var styleProps = useStyling(userProps, function (override) { return state[override] || userProps[override]; });
|
|
76
|
-
var slotProps = mergeSettings(styleProps, {
|
|
77
|
-
root: __assign(__assign(__assign(__assign({}, rest), { ref: buttonRef }), pressable.props), { accessibilityRole: 'radio', accessibilityLabel: (_a = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : ariaLabel) !== null && _a !== void 0 ? _a : content, accessibilityState: { disabled: state.disabled, selected: state.selected }, accessibilityActions: [{ name: 'Select', label: radioButtonSelectActionLabel }], accessibilityPositionInSet: (_b = accessibilityPositionInSet !== null && accessibilityPositionInSet !== void 0 ? accessibilityPositionInSet : ariaPosInSet) !== null && _b !== void 0 ? _b : info.buttonKeys.findIndex(function (x) { return x == buttonKey; }) + 1, accessibilitySetSize: (_c = accessibilitySetSize !== null && accessibilitySetSize !== void 0 ? accessibilitySetSize : ariaSetSize) !== null && _c !== void 0 ? _c : info.buttonKeys.length, focusable: !state.disabled, onAccessibilityAction: onAccessibilityAction }),
|
|
78
|
-
content: { children: content },
|
|
79
|
-
});
|
|
80
|
-
return { slotProps: slotProps };
|
|
81
|
-
},
|
|
82
|
-
render: function (Slots, _renderData) {
|
|
83
|
-
var children = [];
|
|
84
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
85
|
-
children[_i - 2] = arguments[_i];
|
|
86
|
-
}
|
|
87
|
-
return (withSlots(Slots.root, null,
|
|
88
|
-
withSlots(Slots.button, null,
|
|
89
|
-
withSlots(Slots.innerCircle, null)),
|
|
90
|
-
withSlots(Slots.content, null),
|
|
91
|
-
children));
|
|
92
|
-
},
|
|
93
|
-
settings: settings,
|
|
94
|
-
slots: {
|
|
95
|
-
root: View,
|
|
96
|
-
button: { slotType: View, filter: filterViewProps },
|
|
97
|
-
innerCircle: { slotType: View, filter: filterViewProps },
|
|
98
|
-
content: Text,
|
|
99
|
-
},
|
|
100
|
-
styles: {
|
|
101
|
-
root: [],
|
|
102
|
-
button: [borderTokens],
|
|
103
|
-
innerCircle: [backgroundColorTokens],
|
|
104
|
-
content: [foregroundColorTokens, textTokens, [{ source: 'textBorderColor', lookup: getPaletteFromTheme, target: 'borderColor' }]],
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
export default RadioButton;
|
|
108
|
-
//# sourceMappingURL=RadioButton.js.map
|
package/lib/RadioButton.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../src/RadioButton.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;AACb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpH,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAE5I,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,MAAM,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WAAW,EAAE,CAAC,qBAAqB,CAAC;QACpC,OAAO,EAAE,CAAC,qBAAqB,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;KAClI;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { IRadioButtonProps, IRadioButtonSlotProps } from './RadioButton.types';
|
|
2
|
-
export declare const RadioButton: import("@uifabricshared/foundation-compose").IComposeReturnType<IRadioButtonProps, IRadioButtonSlotProps, import("./RadioButton.types").IRadioButtonTokens, object, object>;
|
|
3
|
-
export default RadioButton;
|
|
4
|
-
//# sourceMappingURL=RadioButton.macos.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.macos.d.ts","sourceRoot":"","sources":["../src/RadioButton.macos.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAoB,MAAM,qBAAqB,CAAC;AAMtG,eAAO,MAAM,WAAW,6KAqDtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/lib/RadioButton.macos.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/** @jsx withSlots */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
|
|
4
|
-
import { withSlots } from '@uifabricshared/foundation-composable';
|
|
5
|
-
import { compose } from '@uifabricshared/foundation-compose';
|
|
6
|
-
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
7
|
-
import { radioButtonName } from './RadioButton.types';
|
|
8
|
-
import { RadioGroupContext } from './RadioGroup';
|
|
9
|
-
var NativeRadioButtonView = ensureNativeComponent('FRNRadioButtonView');
|
|
10
|
-
export var RadioButton = compose({
|
|
11
|
-
displayName: radioButtonName,
|
|
12
|
-
usePrepareProps: function (userProps, useStyling) {
|
|
13
|
-
var defaultComponentRef = React.useRef(null);
|
|
14
|
-
var content = userProps.content, buttonKey = userProps.buttonKey, disabled = userProps.disabled, _a = userProps.componentRef, componentRef = _a === void 0 ? defaultComponentRef : _a;
|
|
15
|
-
var info = React.useContext(RadioGroupContext);
|
|
16
|
-
// Reroute the native component's onPress event to RadioGroup's onChange
|
|
17
|
-
var onPressRerouted = function () {
|
|
18
|
-
// Prevent calls to RadioGroup's onChange on the currently selected button
|
|
19
|
-
if (buttonKey != info.selectedKey) {
|
|
20
|
-
info.onChange && info.onChange(buttonKey);
|
|
21
|
-
info.updateSelectedButtonRef && componentRef && info.updateSelectedButtonRef(componentRef);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
/* We use the componentRef of the currently selected button to maintain the default tabbable
|
|
25
|
-
element in a RadioGroup. Since the componentRef isn't generated until after initial render,
|
|
26
|
-
we must update it once here. */
|
|
27
|
-
React.useEffect(function () {
|
|
28
|
-
if (buttonKey === info.selectedKey) {
|
|
29
|
-
info.updateSelectedButtonRef && componentRef && info.updateSelectedButtonRef(componentRef);
|
|
30
|
-
}
|
|
31
|
-
}, []);
|
|
32
|
-
var styleProps = useStyling(userProps);
|
|
33
|
-
var isSelected = info.selectedKey === buttonKey;
|
|
34
|
-
var slotProps = mergeSettings(styleProps, {
|
|
35
|
-
root: {
|
|
36
|
-
ref: componentRef,
|
|
37
|
-
buttonKey: buttonKey,
|
|
38
|
-
content: content,
|
|
39
|
-
disabled: disabled,
|
|
40
|
-
onPress: onPressRerouted,
|
|
41
|
-
selected: isSelected,
|
|
42
|
-
style: {
|
|
43
|
-
minWidth: '100%',
|
|
44
|
-
minHeight: 20,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
return { slotProps: slotProps };
|
|
49
|
-
},
|
|
50
|
-
slots: {
|
|
51
|
-
root: NativeRadioButtonView,
|
|
52
|
-
},
|
|
53
|
-
styles: {
|
|
54
|
-
root: [],
|
|
55
|
-
},
|
|
56
|
-
render: function (Slots) {
|
|
57
|
-
return withSlots(Slots.root, null);
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
export default RadioButton;
|
|
61
|
-
//# sourceMappingURL=RadioButton.macos.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.macos.js","sourceRoot":"","sources":["../src/RadioButton.macos.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,IAAM,qBAAqB,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;AAE1E,MAAM,CAAC,IAAM,WAAW,GAAG,OAAO,CAAmB;IACnD,WAAW,EAAE,eAAe;IAC5B,eAAe,EAAE,UAAC,SAA4B,EAAE,UAAgD;QAC9F,IAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,IAAA,OAAO,GAA8D,SAAS,QAAvE,EAAE,SAAS,GAAmD,SAAS,UAA5D,EAAE,QAAQ,GAAyC,SAAS,SAAlD,EAAE,KAAuC,SAAS,aAAd,EAAlC,YAAY,mBAAG,mBAAmB,KAAA,CAAe;QACvF,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;QAEjD,wEAAwE;QACxE,IAAM,eAAe,GAAG;YACtB,0EAA0E;YAC1E,IAAI,SAAS,IAAI,IAAI,CAAC,WAAW,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adioButtonType } from './RadioButton.types';
|
|
3
|
-
export declare const radioButtonSelectActionLabel = "Select a RadioButton";
|
|
4
|
-
export declare const settings: IComposeSettings<IRadioButtonType>;
|
|
5
|
-
//# sourceMappingURL=RadioButton.settings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.settings.d.ts","sourceRoot":"","sources":["../src/RadioButton.settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAS5D,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE,eAAO,MAAM,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAuFvD,CAAC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { radioButtonName } from './RadioButton.types';
|
|
2
|
-
var radioButtonSize = 20;
|
|
3
|
-
var radioButtonRadius = radioButtonSize / 2;
|
|
4
|
-
var radioButtonInnerCircleSize = 10;
|
|
5
|
-
var radioButtonInnerCircleRadius = radioButtonInnerCircleSize / 2;
|
|
6
|
-
export var radioButtonSelectActionLabel = 'Select a RadioButton';
|
|
7
|
-
export var settings = [
|
|
8
|
-
{
|
|
9
|
-
tokens: {
|
|
10
|
-
borderColor: 'menuItemText',
|
|
11
|
-
color: 'menuItemText',
|
|
12
|
-
backgroundColor: 'menuItemText',
|
|
13
|
-
textBorderColor: 'transparent',
|
|
14
|
-
},
|
|
15
|
-
root: {
|
|
16
|
-
accessible: true,
|
|
17
|
-
focusable: true,
|
|
18
|
-
accessibilityRole: 'radio',
|
|
19
|
-
style: {
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
flexDirection: 'row',
|
|
23
|
-
minHeight: 20,
|
|
24
|
-
marginTop: 0,
|
|
25
|
-
position: 'relative',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
button: {
|
|
29
|
-
style: {
|
|
30
|
-
backgroundColor: 'transparent',
|
|
31
|
-
width: radioButtonSize,
|
|
32
|
-
height: radioButtonSize,
|
|
33
|
-
top: 0,
|
|
34
|
-
left: 0,
|
|
35
|
-
borderWidth: 1,
|
|
36
|
-
borderStyle: 'solid',
|
|
37
|
-
borderRadius: radioButtonRadius,
|
|
38
|
-
marginTop: 4,
|
|
39
|
-
marginRight: 6,
|
|
40
|
-
marginBottom: 6,
|
|
41
|
-
marginLeft: 6,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
innerCircle: {
|
|
45
|
-
style: {
|
|
46
|
-
position: 'relative',
|
|
47
|
-
opacity: 0,
|
|
48
|
-
borderRadius: radioButtonInnerCircleRadius,
|
|
49
|
-
height: radioButtonInnerCircleSize,
|
|
50
|
-
width: radioButtonInnerCircleSize,
|
|
51
|
-
left: 4,
|
|
52
|
-
top: 4,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
content: {
|
|
56
|
-
variant: 'subheaderStandard',
|
|
57
|
-
style: {
|
|
58
|
-
marginTop: 2,
|
|
59
|
-
borderStyle: 'solid',
|
|
60
|
-
borderWidth: 2,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
_precedence: ['disabled', 'hovered', 'focused', 'selected'],
|
|
64
|
-
_overrides: {
|
|
65
|
-
selected: {
|
|
66
|
-
innerCircle: {
|
|
67
|
-
style: {
|
|
68
|
-
opacity: 1,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
focused: {
|
|
73
|
-
tokens: {
|
|
74
|
-
textBorderColor: 'focusBorder',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
hovered: {
|
|
78
|
-
innerCircle: {
|
|
79
|
-
style: {
|
|
80
|
-
opacity: 0.5,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
disabled: {
|
|
85
|
-
tokens: {
|
|
86
|
-
borderColor: 'buttonBorderDisabled',
|
|
87
|
-
color: 'disabledBodyText',
|
|
88
|
-
backgroundColor: 'background',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
radioButtonName,
|
|
94
|
-
];
|
|
95
|
-
//# sourceMappingURL=RadioButton.settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.settings.js","sourceRoot":"","sources":["../src/RadioButton.settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,IAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,IAAM,iBAAiB,GAAG,eAAe,GAAG,CAAC,CAAC;AAE9C,IAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,IAAM,4BAA4B,GAAG,0BAA0B,GAAG,CAAC,CAAC;AAEpE,MAAM,CAAC,IAAM,4BAA4B,GAAG,sBAAsB,CAAC;AAEnE,MAAM,CAAC,IAAM,QAAQ,GAAuC;IAC1D;QACE,MAAM,EAAE;YACN,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,cAAc;YACrB,eAAe,EAAE,cAAc;YAC/B,eAAe,EAAE,aAAa;SAC/B;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,IAAI;YACf,iBAAiB,EAAE,OAAO;YAC1B,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,aAAa,EAAE,KAAK;gBACpB,SAAS,EAAE,EAAE;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,UAAU;aACrB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,eAAe,EAAE,aAAa;gBAC9B,KAAK,EAAE,eAAe;gBACtB,MAAM,EAAE,eAAe;gBACvB,GAAG,EAAE,CAAC;gBACN,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,CAAC;gBACd,WAAW,EAAE,OAAO;gBACpB,YAAY,EAAE,iBAAiB;gBAC/B,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;gBACf,UAAU,EAAE,CAAC;aACd;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,OAAO,EAAE,CAAC;gBACV,YAAY,EAAE,4BAA4B;gBAC1C,MAAM,EAAE,0BAA0B;gBAClC,KAAK,EAAE,0BAA0B;gBACjC,IAAI,EAAE,CAAC;gBACP,GAAG,EAAE,CAAC;aACP;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE,mBAAmB;YAC5B,KAAK,EAAE;gBACL,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,OAAO;gBACpB,WAAW,EAAE,CAAC;aACf;SACF;QACD,WAAW,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC;QAC3D,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,WAAW,EAAE;oBACX,KAAK,EAAE;wBACL,OAAO,EAAE,CAAC;qBACX;iBACF;aACF;YACD,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,eAAe,EAAE,aAAa;iBAC/B;aACF;YACD,OAAO,EAAE;gBACP,WAAW,EAAE;oBACX,KAAK,EAAE;wBACL,OAAO,EAAE,GAAG;qBACb;iBACF;aACF;YACD,QAAQ,EAAE;gBACR,MAAM,EAAE;oBACN,WAAW,EAAE,sBAAsB;oBACnC,KAAK,EAAE,kBAAkB;oBACzB,eAAe,EAAE,YAAY;iBAC9B;aACF;SACF;KACF;IACD,eAAe;CAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.test.d.ts","sourceRoot":"","sources":["../src/RadioButton.test.tsx"],"names":[],"mappings":""}
|
package/lib/RadioButton.test.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as renderer from 'react-test-renderer';
|
|
3
|
-
import { RadioButton } from './RadioButton';
|
|
4
|
-
describe('RadioButton component tests', function () {
|
|
5
|
-
it('RadioButton default', function () {
|
|
6
|
-
var tree = renderer.create(React.createElement(RadioButton, { buttonKey: "key1", content: "Default Button" })).toJSON();
|
|
7
|
-
expect(tree).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=RadioButton.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.test.js","sourceRoot":"","sources":["../src/RadioButton.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,QAAQ,CAAC,6BAA6B,EAAE;IACtC,EAAE,CAAC,qBAAqB,EAAE;QACxB,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,WAAW,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;QACjG,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
|
-
import type { ViewProps } from 'react-native';
|
|
3
|
-
import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
|
|
4
|
-
import type { IPressableProps } from '@fluentui-react-native/pressable';
|
|
5
|
-
import type { ITextProps } from '@fluentui-react-native/text';
|
|
6
|
-
import type { FontTokens, IForegroundColorTokens, IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
|
|
7
|
-
import type { IViewWin32Props } from '@office-iss/react-native-win32';
|
|
8
|
-
import type { IRenderData } from '@uifabricshared/foundation-composable';
|
|
9
|
-
export declare const radioButtonName = "RadioButton";
|
|
10
|
-
export interface IRadioButtonProps extends IPressableProps {
|
|
11
|
-
/**
|
|
12
|
-
* The text string for the option
|
|
13
|
-
*/
|
|
14
|
-
content: string;
|
|
15
|
-
/**
|
|
16
|
-
* A unique key-identifier for each option
|
|
17
|
-
*/
|
|
18
|
-
buttonKey: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether or not the radio button is selectable
|
|
21
|
-
*/
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* An optional string for the Narrator to read for each RadioButton. If not provided, this will be set to the button's content.
|
|
25
|
-
* @deprecated Use accessibilityLabel instead.
|
|
26
|
-
*/
|
|
27
|
-
ariaLabel?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Defines the current radio button's position in the radio group for accessibility purposes. It's recommended to set this value
|
|
30
|
-
* if radio buttons are not direct children of radio group. This value is auto-generated if radio buttons are direct children of
|
|
31
|
-
* radio group.
|
|
32
|
-
* @deprecated Use accessibilityPositionInSet instead.
|
|
33
|
-
*/
|
|
34
|
-
ariaPosInSet?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Defines the number of radio buttons in the group for accessibility purposes.It's recommended to set this value if radio
|
|
37
|
-
* buttons are not direct children of radio group. This value is auto-generated if radio buttons are direct children of
|
|
38
|
-
* radio group.
|
|
39
|
-
* @deprecated Use accessibilitySetSize instead.
|
|
40
|
-
*/
|
|
41
|
-
ariaSetSize?: number;
|
|
42
|
-
/**
|
|
43
|
-
* A RefObject to access the IFocusable interface. Use this to access the public methods and properties of the component.
|
|
44
|
-
*/
|
|
45
|
-
componentRef?: React.RefObject<IFocusable>;
|
|
46
|
-
}
|
|
47
|
-
export interface IRadioButtonTokens extends FontTokens, IForegroundColorTokens, IBackgroundColorTokens, IBorderTokens {
|
|
48
|
-
textBorderColor?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface IRadioButtonSlotProps {
|
|
51
|
-
root: React.PropsWithRef<IViewWin32Props>;
|
|
52
|
-
button: ViewProps;
|
|
53
|
-
innerCircle: ViewProps;
|
|
54
|
-
content: ITextProps;
|
|
55
|
-
}
|
|
56
|
-
export type IRadioButtonRenderData = IRenderData<IRadioButtonSlotProps>;
|
|
57
|
-
export interface IRadioButtonType {
|
|
58
|
-
props: IRadioButtonProps;
|
|
59
|
-
tokens: IRadioButtonTokens;
|
|
60
|
-
slotProps: IRadioButtonSlotProps;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=RadioButton.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.types.d.ts","sourceRoot":"","sources":["../src/RadioButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC/H,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,aAAa;IACnH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAC1C,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;AAExE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,SAAS,EAAE,qBAAqB,CAAC;CAClC"}
|
package/lib/RadioButton.types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.types.js","sourceRoot":"","sources":["../src/RadioButton.types.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,IAAM,eAAe,GAAG,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonGroup.test.d.ts","sourceRoot":"","sources":["../src/RadioButtonGroup.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import * as renderer from 'react-test-renderer';
|
|
4
|
-
import { RadioGroup, RadioButton } from '.';
|
|
5
|
-
describe('RadioButton component tests', function () {
|
|
6
|
-
it('RadioButton default', function () {
|
|
7
|
-
var tree = renderer.create(React.createElement(RadioGroup, { label: "Uncontrolled RadioGroup", defaultSelectedKey: "key2" },
|
|
8
|
-
React.createElement(RadioButton, { buttonKey: "key1", content: "RadioButton1" }),
|
|
9
|
-
React.createElement(RadioButton, { buttonKey: "key2", content: "RadioButton2" })));
|
|
10
|
-
expect(tree).toMatchSnapshot();
|
|
11
|
-
});
|
|
12
|
-
it('RadioButton not direct child of radio group', function () {
|
|
13
|
-
var tree = renderer.create(React.createElement(RadioGroup, { label: "Uncontrolled RadioGroup", defaultSelectedKey: "key2" },
|
|
14
|
-
React.createElement(View, null,
|
|
15
|
-
React.createElement(RadioButton, { buttonKey: "key1", content: "RadioButton1", accessibilityPositionInSet: 1, accessibilitySetSize: 2 }),
|
|
16
|
-
React.createElement(RadioButton, { buttonKey: "key2", content: "RadioButton2", accessibilityPositionInSet: 2, accessibilitySetSize: 2 }))));
|
|
17
|
-
expect(tree).toMatchSnapshot();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=RadioButtonGroup.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonGroup.test.js","sourceRoot":"","sources":["../src/RadioButtonGroup.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAE5C,QAAQ,CAAC,6BAA6B,EAAE;IACtC,EAAE,CAAC,qBAAqB,EAAE;QACxB,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAC1B,oBAAC,UAAU,IAAC,KAAK,EAAC,yBAAyB,EAAC,kBAAkB,EAAC,MAAM;YACnE,oBAAC,WAAW,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,GAAG;YACvD,oBAAC,WAAW,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,GAAG,CAC5C,CACd,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE;QAChD,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAC1B,oBAAC,UAAU,IAAC,KAAK,EAAC,yBAAyB,EAAC,kBAAkB,EAAC,MAAM;YACnE,oBAAC,IAAI;gBACH,oBAAC,WAAW,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,EAAC,0BAA0B,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,GAAI;gBAC/G,oBAAC,WAAW,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,EAAC,0BAA0B,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,GAAI,CAC1G,CACI,CACd,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/lib/RadioGroup.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/** @jsx withSlots */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import type { IRadioGroupProps, IRadioGroupState, IRadioGroupSlotProps, IRadioGroupContext } from './RadioGroup.types';
|
|
4
|
-
export declare const RadioGroupContext: React.Context<IRadioGroupContext>;
|
|
5
|
-
export declare const RadioGroup: import("@uifabricshared/foundation-compose").IComposeReturnType<IRadioGroupProps, IRadioGroupSlotProps, import("./RadioGroup.types").IRadioGroupTokens, IRadioGroupState, object>;
|
|
6
|
-
export default RadioGroup;
|
|
7
|
-
//# sourceMappingURL=RadioGroup.d.ts.map
|
package/lib/RadioGroup.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,KAAK,EAEV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,iBAAiB,mCAS5B,CAAC;AAEH,eAAO,MAAM,UAAU,mLA+ErB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
package/lib/RadioGroup.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
/** @jsx withSlots */
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import { View } from 'react-native';
|
|
26
|
-
import { FocusZone } from '@fluentui-react-native/focus-zone';
|
|
27
|
-
import { useSelectedKey } from '@fluentui-react-native/interactive-hooks';
|
|
28
|
-
import { Text } from '@fluentui-react-native/text';
|
|
29
|
-
import { foregroundColorTokens, textTokens } from '@fluentui-react-native/tokens';
|
|
30
|
-
import { withSlots } from '@uifabricshared/foundation-composable';
|
|
31
|
-
import { compose } from '@uifabricshared/foundation-compose';
|
|
32
|
-
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
33
|
-
import { settings } from './RadioGroup.settings';
|
|
34
|
-
import { radioGroupName } from './RadioGroup.types';
|
|
35
|
-
export var RadioGroupContext = React.createContext({
|
|
36
|
-
selectedKey: null,
|
|
37
|
-
onChange: function ( /* key: string */) {
|
|
38
|
-
return;
|
|
39
|
-
},
|
|
40
|
-
updateSelectedButtonRef: function ( /* ref: React.RefObject<any>*/) {
|
|
41
|
-
return;
|
|
42
|
-
},
|
|
43
|
-
buttonKeys: [],
|
|
44
|
-
});
|
|
45
|
-
export var RadioGroup = compose({
|
|
46
|
-
displayName: radioGroupName,
|
|
47
|
-
usePrepareProps: function (userProps, useStyling) {
|
|
48
|
-
var _a;
|
|
49
|
-
var label = userProps.label, ariaLabel = userProps.ariaLabel, accessibilityLabel = userProps.accessibilityLabel, selectedKey = userProps.selectedKey, defaultSelectedKey = userProps.defaultSelectedKey, rest = __rest(userProps, ["label", "ariaLabel", "accessibilityLabel", "selectedKey", "defaultSelectedKey"]);
|
|
50
|
-
// This hook updates the Selected Button and calls the customer's onClick function. This gets called after a button is pressed.
|
|
51
|
-
var data = useSelectedKey(selectedKey || defaultSelectedKey || null, userProps.onChange);
|
|
52
|
-
var _b = React.useState(React.useRef(null)), selectedButtonRef = _b[0], setSelectedButtonRef = _b[1];
|
|
53
|
-
var onSelectButtonRef = React.useCallback(function (ref) {
|
|
54
|
-
setSelectedButtonRef(ref);
|
|
55
|
-
}, [setSelectedButtonRef]);
|
|
56
|
-
var state = {
|
|
57
|
-
context: {
|
|
58
|
-
selectedKey: selectedKey !== null && selectedKey !== void 0 ? selectedKey : data.selectedKey,
|
|
59
|
-
onChange: data.onKeySelect,
|
|
60
|
-
updateSelectedButtonRef: onSelectButtonRef,
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
var styleProps = useStyling(userProps, function (override) { return state[override] || userProps[override]; });
|
|
64
|
-
var slotProps = mergeSettings(styleProps, {
|
|
65
|
-
root: __assign({ accessibilityLabel: (_a = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : ariaLabel) !== null && _a !== void 0 ? _a : label, accessibilityRole: 'radiogroup' }, rest),
|
|
66
|
-
label: { children: label },
|
|
67
|
-
container: { isCircularNavigation: true, defaultTabbableElement: selectedButtonRef },
|
|
68
|
-
});
|
|
69
|
-
return { slotProps: slotProps, state: state };
|
|
70
|
-
},
|
|
71
|
-
render: function (Slots, renderData) {
|
|
72
|
-
var children = [];
|
|
73
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
74
|
-
children[_i - 2] = arguments[_i];
|
|
75
|
-
}
|
|
76
|
-
if (renderData.state == undefined) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
// Populate the buttonKeys array
|
|
80
|
-
if (children) {
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
82
|
-
// @ts-ignore - TODO, fix typing error
|
|
83
|
-
renderData.state.context.buttonKeys = React.Children.map(children, function (child) {
|
|
84
|
-
if (React.isValidElement(child)) {
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
86
|
-
// @ts-ignore - TODO, fix typing error
|
|
87
|
-
return child.props.buttonKey;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
return (withSlots(RadioGroupContext.Provider
|
|
92
|
-
// Passes in the selected key and a hook function to update the newly selected button and call the client's onChange callback
|
|
93
|
-
, {
|
|
94
|
-
// Passes in the selected key and a hook function to update the newly selected button and call the client's onChange callback
|
|
95
|
-
value: renderData.state.context },
|
|
96
|
-
withSlots(Slots.root, null,
|
|
97
|
-
withSlots(Slots.label, null),
|
|
98
|
-
withSlots(Slots.container, null, children))));
|
|
99
|
-
},
|
|
100
|
-
settings: settings,
|
|
101
|
-
slots: {
|
|
102
|
-
root: View,
|
|
103
|
-
label: Text,
|
|
104
|
-
container: FocusZone,
|
|
105
|
-
},
|
|
106
|
-
styles: {
|
|
107
|
-
root: [],
|
|
108
|
-
label: [foregroundColorTokens, textTokens],
|
|
109
|
-
container: [],
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
export default RadioGroup;
|
|
113
|
-
//# sourceMappingURL=RadioGroup.js.map
|
package/lib/RadioGroup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AASjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAqB;IACvE,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,WAAC,iBAAiB;QAC1B,OAAO;IACT,CAAC;IACD,uBAAuB,EAAE,WAAC,8BAA8B;QACtD,OAAO;I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L,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,SAAS;KACrB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,CAAC,qBAAqB,EAAE,UAAU,CAAC;QAC1C,SAAS,EAAE,EAAE;KACd;CACF,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.settings.d.ts","sourceRoot":"","sources":["../src/RadioGroup.settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,eAAO,MAAM,QAAQ,EAAE,gBAAgB,CAAC,eAAe,CAsBtD,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { radioGroupName } from './RadioGroup.types';
|
|
2
|
-
export var settings = [
|
|
3
|
-
{
|
|
4
|
-
tokens: {
|
|
5
|
-
color: 'menuItemText',
|
|
6
|
-
},
|
|
7
|
-
root: {
|
|
8
|
-
accessible: true,
|
|
9
|
-
accessibilityRole: 'radio',
|
|
10
|
-
style: {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
alignItems: 'flex-start',
|
|
13
|
-
flexDirection: 'column',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
label: {
|
|
17
|
-
style: {
|
|
18
|
-
fontSize: 16,
|
|
19
|
-
fontWeight: '600',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
radioGroupName,
|
|
24
|
-
];
|
|
25
|
-
//# sourceMappingURL=RadioGroup.settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.settings.js","sourceRoot":"","sources":["../src/RadioGroup.settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,QAAQ,GAAsC;IACzD;QACE,MAAM,EAAE;YACN,KAAK,EAAE,cAAc;SACtB;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,IAAI;YAChB,iBAAiB,EAAE,OAAO;YAC1B,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,YAAY;gBACxB,aAAa,EAAE,QAAQ;aACxB;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,KAAK;aAClB;SACF;KACF;IACD,cAAc;CACf,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
|
-
import type { FocusZoneProps } from '@fluentui-react-native/focus-zone';
|
|
3
|
-
import type { ITextProps } from '@fluentui-react-native/text';
|
|
4
|
-
import type { IForegroundColorTokens, FontTokens } from '@fluentui-react-native/tokens';
|
|
5
|
-
import type { IViewWin32Props } from '@office-iss/react-native-win32';
|
|
6
|
-
import type { IRenderData } from '@uifabricshared/foundation-composable';
|
|
7
|
-
export declare const radioGroupName = "RadioGroup";
|
|
8
|
-
export interface IRadioGroupContext {
|
|
9
|
-
/**
|
|
10
|
-
* The currently selected RadioButton's key
|
|
11
|
-
*/
|
|
12
|
-
selectedKey: string | null;
|
|
13
|
-
/**
|
|
14
|
-
* Updates the selected button and calls the client’s onChange callback
|
|
15
|
-
*/
|
|
16
|
-
onChange?: (key: string) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Updates the selected button's ref to set as the default tabbable element
|
|
19
|
-
*/
|
|
20
|
-
updateSelectedButtonRef?: (ref: React.RefObject<any>) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Array of radio button keys in the group
|
|
23
|
-
*/
|
|
24
|
-
buttonKeys?: string[];
|
|
25
|
-
}
|
|
26
|
-
export interface IRadioGroupState {
|
|
27
|
-
context: IRadioGroupContext;
|
|
28
|
-
}
|
|
29
|
-
export interface IRadioGroupProps {
|
|
30
|
-
/**
|
|
31
|
-
* Descriptive label for the RadioGroup. This will be displayed as the title of the radio group to the user.
|
|
32
|
-
*/
|
|
33
|
-
label: string;
|
|
34
|
-
/**
|
|
35
|
-
* The key of the RadioButton that will initially be selected
|
|
36
|
-
*/
|
|
37
|
-
defaultSelectedKey?: string;
|
|
38
|
-
/**
|
|
39
|
-
* A label for screen readers. If not provided, it will be set to the label of the radio group.
|
|
40
|
-
* @deprecated Use accessibilityLabel instead.
|
|
41
|
-
*/
|
|
42
|
-
ariaLabel?: string;
|
|
43
|
-
accessibilityLabel?: string;
|
|
44
|
-
/**
|
|
45
|
-
* The key of the selected option. If you provide this, you must maintain selection state by observing
|
|
46
|
-
* onChange events and passing a new value in when changed. This overrides defaultSelectedKey
|
|
47
|
-
* and makes the RadioGroup a controlled component.
|
|
48
|
-
*/
|
|
49
|
-
selectedKey?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Callback for receiving a notification when the choice has been changed
|
|
52
|
-
*/
|
|
53
|
-
onChange?: (key: string) => void;
|
|
54
|
-
testID?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface IRadioGroupTokens extends IForegroundColorTokens, FontTokens {
|
|
57
|
-
}
|
|
58
|
-
export interface IRadioGroupSlotProps {
|
|
59
|
-
root: React.PropsWithRef<IViewWin32Props>;
|
|
60
|
-
label: ITextProps;
|
|
61
|
-
container: FocusZoneProps;
|
|
62
|
-
}
|
|
63
|
-
export type IRadioGroupRenderData = IRenderData<IRadioGroupSlotProps, IRadioGroupState>;
|
|
64
|
-
export interface IRadioGroupType {
|
|
65
|
-
props: IRadioGroupProps;
|
|
66
|
-
tokens: IRadioGroupTokens;
|
|
67
|
-
slotProps: IRadioGroupSlotProps;
|
|
68
|
-
state: IRadioGroupState;
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=RadioGroup.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.types.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AM,WAAW,iBAAkB,SAAQ,sBAAsB,EAAE,UAAU;CAAG;AAEhF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAC1C,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;AAExF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,oBAAoB,CAAC;IAChC,KAAK,EAAE,gBAAgB,CAAC;CACzB"}
|
package/lib/RadioGroup.types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.types.js","sourceRoot":"","sources":["../src/RadioGroup.types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,IAAM,cAAc,GAAG,YAAY,CAAC"}
|
package/lib/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { RadioButton } from './RadioButton';
|
|
2
|
-
export { radioButtonName } from './RadioButton.types';
|
|
3
|
-
export type { IRadioButtonProps, IRadioButtonRenderData, IRadioButtonSlotProps, IRadioButtonTokens, IRadioButtonType, } from './RadioButton.types';
|
|
4
|
-
export { RadioGroup, RadioGroupContext } from './RadioGroup';
|
|
5
|
-
export { radioGroupName } from './RadioGroup.types';
|
|
6
|
-
export type { IRadioGroupContext, IRadioGroupProps, IRadioGroupRenderData, IRadioGroupSlotProps, IRadioGroupState, IRadioGroupTokens, IRadioGroupType, } from './RadioGroup.types';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EACV,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
package/lib/index.js
DELETED
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQtD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|