@kanso-labs/react-native-kanso-ui 0.0.0-stage → 0.1.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/LICENSE.md +20 -0
- package/README.md +205 -2
- package/dist/button/index.d.ts +56 -0
- package/dist/button/index.js +169 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/palettes.js +47 -0
- package/dist/button/palettes.js.map +1 -0
- package/dist/chip/index.js +194 -0
- package/dist/chip/index.js.map +1 -0
- package/dist/chip/styles.js +36 -0
- package/dist/chip/styles.js.map +1 -0
- package/dist/clipboard/index.js +58 -0
- package/dist/clipboard/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +82 -0
- package/dist/components/avatar/index.js +62 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/button/index.d.ts +87 -0
- package/dist/components/button/index.js +377 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/index.d.ts +78 -0
- package/dist/components/card/index.js +315 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +76 -0
- package/dist/components/checkbox/index.js +360 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/chip/index.d.ts +84 -0
- package/dist/components/chip/index.js +257 -0
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/chip-group/index.d.ts +143 -0
- package/dist/components/chip-group/index.js +669 -0
- package/dist/components/chip-group/index.js.map +1 -0
- package/dist/components/copy-field/index.d.ts +60 -0
- package/dist/components/copy-field/index.js +277 -0
- package/dist/components/copy-field/index.js.map +1 -0
- package/dist/components/currency/index.d.ts +69 -0
- package/dist/components/currency/index.js +162 -0
- package/dist/components/currency/index.js.map +1 -0
- package/dist/components/form/index.d.ts +84 -0
- package/dist/components/form/index.js +95 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/icon-button/index.d.ts +68 -0
- package/dist/components/icon-button/index.js +289 -0
- package/dist/components/icon-button/index.js.map +1 -0
- package/dist/components/link/index.d.ts +59 -0
- package/dist/components/link/index.js +191 -0
- package/dist/components/link/index.js.map +1 -0
- package/dist/components/number-field/index.d.ts +151 -0
- package/dist/components/number-field/index.js +832 -0
- package/dist/components/number-field/index.js.map +1 -0
- package/dist/components/product-icon/index.d.ts +70 -0
- package/dist/components/product-icon/index.js +60 -0
- package/dist/components/product-icon/index.js.map +1 -0
- package/dist/components/radio-group/index.d.ts +105 -0
- package/dist/components/radio-group/index.js +597 -0
- package/dist/components/radio-group/index.js.map +1 -0
- package/dist/components/search-field/index.d.ts +98 -0
- package/dist/components/search-field/index.js +521 -0
- package/dist/components/search-field/index.js.map +1 -0
- package/dist/components/segmented-button/index.d.ts +113 -0
- package/dist/components/segmented-button/index.js +937 -0
- package/dist/components/segmented-button/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +45 -0
- package/dist/components/separator/index.js +109 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/stack/index.d.ts +70 -0
- package/dist/components/stack/index.js +107 -0
- package/dist/components/stack/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +76 -0
- package/dist/components/switch/index.js +591 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/text/index.d.ts +44 -0
- package/dist/components/text/index.js +78 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +146 -0
- package/dist/components/text-field/index.js +228 -0
- package/dist/components/text-field/index.js.map +1 -0
- package/dist/control/index.js +117 -0
- package/dist/control/index.js.map +1 -0
- package/dist/control/styles.js +36 -0
- package/dist/control/styles.js.map +1 -0
- package/dist/field/index.d.ts +13 -0
- package/dist/field/index.js +1007 -0
- package/dist/field/index.js.map +1 -0
- package/dist/field/styles.js +131 -0
- package/dist/field/styles.js.map +1 -0
- package/dist/form/index.d.ts +24 -0
- package/dist/form/index.js +209 -0
- package/dist/form/index.js.map +1 -0
- package/dist/glyphs/icon-style.d.ts +25 -0
- package/dist/glyphs/icon-style.js +22 -0
- package/dist/glyphs/icon-style.js.map +1 -0
- package/dist/glyphs/index.js +170 -0
- package/dist/glyphs/index.js.map +1 -0
- package/dist/glyphs/styles.js +7 -0
- package/dist/glyphs/styles.js.map +1 -0
- package/dist/hooks/useWindowSizeClass.d.ts +25 -0
- package/dist/hooks/useWindowSizeClass.js +39 -0
- package/dist/hooks/useWindowSizeClass.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +27 -0
- package/dist/mark/image.js +61 -0
- package/dist/mark/image.js.map +1 -0
- package/dist/mark/index.d.ts +9 -0
- package/dist/mark/index.js +234 -0
- package/dist/mark/index.js.map +1 -0
- package/dist/mark/initials.js +65 -0
- package/dist/mark/initials.js.map +1 -0
- package/dist/mark/styles.d.ts +1 -0
- package/dist/mark/styles.js +73 -0
- package/dist/mark/styles.js.map +1 -0
- package/dist/number/parser.js +321 -0
- package/dist/number/parser.js.map +1 -0
- package/dist/number/state.js +235 -0
- package/dist/number/state.js.map +1 -0
- package/dist/overlay/host.js +111 -0
- package/dist/overlay/host.js.map +1 -0
- package/dist/press/index.js +350 -0
- package/dist/press/index.js.map +1 -0
- package/dist/press/styles.js +31 -0
- package/dist/press/styles.js.map +1 -0
- package/dist/router/index.d.ts +28 -0
- package/dist/router/index.js +82 -0
- package/dist/router/index.js.map +1 -0
- package/dist/theme/color.js +25 -0
- package/dist/theme/color.js.map +1 -0
- package/dist/theme/resolve.d.ts +6 -0
- package/dist/theme/resolve.js +310 -0
- package/dist/theme/resolve.js.map +1 -0
- package/dist/theme/scope.d.ts +42 -0
- package/dist/theme/scope.js +80 -0
- package/dist/theme/scope.js.map +1 -0
- package/dist/theme/styles.js +39 -0
- package/dist/theme/styles.js.map +1 -0
- package/dist/theme-scope.d.ts +56 -0
- package/dist/theme-scope.js +127 -0
- package/dist/theme-scope.js.map +1 -0
- package/dist/tokens/defaults.d.ts +407 -0
- package/dist/tokens/defaults.js +403 -0
- package/dist/tokens/defaults.js.map +1 -0
- package/dist/typography/fonts.js +84 -0
- package/dist/typography/fonts.js.map +1 -0
- package/dist/typography/roles.d.ts +10 -0
- package/dist/typography/roles.js +82 -0
- package/dist/typography/roles.js.map +1 -0
- package/package.json +132 -4
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { useTheme } from "../../theme/scope.js";
|
|
2
|
+
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { useTypeRole } from "../../typography/roles.js";
|
|
4
|
+
import { withOpacity } from "../../theme/color.js";
|
|
5
|
+
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
6
|
+
import { controlStylesOf } from "../../control/styles.js";
|
|
7
|
+
import { ControlLabel, ControlMessage, describedBy, messageOf } from "../../control/index.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
10
|
+
import { createContext, use, useId } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import Animated, { Easing, useAnimatedStyle, useReducedMotion, withTiming } from "react-native-reanimated";
|
|
13
|
+
import { useRadioGroupState } from "react-stately/useRadioGroupState";
|
|
14
|
+
//#region src/components/radio-group/index.tsx
|
|
15
|
+
const RING_SIZE = 20;
|
|
16
|
+
const RING_RULE = 2;
|
|
17
|
+
const DOT_SIZE = 10;
|
|
18
|
+
const LAYERS = {
|
|
19
|
+
selected: {
|
|
20
|
+
hover: "primary",
|
|
21
|
+
pressed: "onSurface"
|
|
22
|
+
},
|
|
23
|
+
unselected: {
|
|
24
|
+
hover: "onSurface",
|
|
25
|
+
pressed: "primary"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const RadioGroupContext = createContext(null);
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
dot: {
|
|
31
|
+
height: DOT_SIZE,
|
|
32
|
+
width: DOT_SIZE
|
|
33
|
+
},
|
|
34
|
+
ring: {
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
borderWidth: RING_RULE,
|
|
37
|
+
height: RING_SIZE,
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
width: RING_SIZE
|
|
40
|
+
},
|
|
41
|
+
shrink: { flexShrink: 1 }
|
|
42
|
+
});
|
|
43
|
+
const groupStylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) => StyleSheet.create({
|
|
44
|
+
dot: { borderRadius: radii.circle },
|
|
45
|
+
items: { flexDirection: "column" },
|
|
46
|
+
itemsHorizontal: {
|
|
47
|
+
columnGap: spacing.lg,
|
|
48
|
+
flexDirection: "row",
|
|
49
|
+
flexWrap: "wrap"
|
|
50
|
+
},
|
|
51
|
+
label: { color: colors.onSurfaceVariant },
|
|
52
|
+
labelDisabled: { color: withOpacity(colors.onSurface, stateLayerOpacity.disabledContent) },
|
|
53
|
+
labelError: { color: colors.error },
|
|
54
|
+
message: { color: colors.onSurfaceVariant },
|
|
55
|
+
messageError: { color: colors.error },
|
|
56
|
+
messageLine: { marginTop: spacing.xs },
|
|
57
|
+
ring: { borderRadius: radii.circle },
|
|
58
|
+
root: {
|
|
59
|
+
flexDirection: "column",
|
|
60
|
+
rowGap: spacing.xs
|
|
61
|
+
}
|
|
62
|
+
}));
|
|
63
|
+
/**
|
|
64
|
+
* The colour the ring and the dot are drawn in. Hover, press and focus darken
|
|
65
|
+
* only an unselected ring, and only one a press can change.
|
|
66
|
+
*/
|
|
67
|
+
function colorOf({ colors, stateLayerOpacity }, { active, isDisabled, isSelected }) {
|
|
68
|
+
if (isDisabled) return withOpacity(colors.onSurface, stateLayerOpacity.disabledContent);
|
|
69
|
+
if (isSelected) return colors.primary;
|
|
70
|
+
return active ? colors.onSurface : colors.onSurfaceVariant;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* How the group is described by the line under it. On the web it points at
|
|
74
|
+
* the line with `aria-describedby`, as web's group does. iOS and Android
|
|
75
|
+
* focus the buttons rather than the group, so there the line is left where a
|
|
76
|
+
* screen reader reaches it in order, after the last button.
|
|
77
|
+
*/
|
|
78
|
+
function lineOf(id, message) {
|
|
79
|
+
return Platform.OS === "web" && message !== void 0 ? { "aria-describedby": id } : void 0;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* One option of a `RadioGroup`, with its label and optionally a description
|
|
83
|
+
* under it. It names the entry it stands for with `value`; the selection is
|
|
84
|
+
* the group's, so a `Radio` is only ever drawn inside one.
|
|
85
|
+
*
|
|
86
|
+
* A screen reader hears it as a radio button named by its label, checked or
|
|
87
|
+
* not, followed by the line under it. A press anywhere on the button or the
|
|
88
|
+
* label selects it, and the row takes presses over the 48dp target the page
|
|
89
|
+
* asks of the button. `style`, `ref` and `testID` land on the view holding
|
|
90
|
+
* the row and the line under it, which is the element a layout positions.
|
|
91
|
+
*/
|
|
92
|
+
function Radio(t0) {
|
|
93
|
+
const $ = c(104);
|
|
94
|
+
let ariaLabel;
|
|
95
|
+
let children;
|
|
96
|
+
let description;
|
|
97
|
+
let props;
|
|
98
|
+
let style;
|
|
99
|
+
let t1;
|
|
100
|
+
let value;
|
|
101
|
+
if ($[0] !== t0) {
|
|
102
|
+
({"aria-label": ariaLabel, children, description, isDisabled: t1, style, value, ...props} = t0);
|
|
103
|
+
$[0] = t0;
|
|
104
|
+
$[1] = ariaLabel;
|
|
105
|
+
$[2] = children;
|
|
106
|
+
$[3] = description;
|
|
107
|
+
$[4] = props;
|
|
108
|
+
$[5] = style;
|
|
109
|
+
$[6] = t1;
|
|
110
|
+
$[7] = value;
|
|
111
|
+
} else {
|
|
112
|
+
ariaLabel = $[1];
|
|
113
|
+
children = $[2];
|
|
114
|
+
description = $[3];
|
|
115
|
+
props = $[4];
|
|
116
|
+
style = $[5];
|
|
117
|
+
t1 = $[6];
|
|
118
|
+
value = $[7];
|
|
119
|
+
}
|
|
120
|
+
const ownDisabled = t1 === void 0 ? false : t1;
|
|
121
|
+
const theme = useTheme();
|
|
122
|
+
const group = use(RadioGroupContext);
|
|
123
|
+
const messageId = useId();
|
|
124
|
+
if (group === null) throw new Error("A Radio is drawn inside a RadioGroup, which holds its selection.");
|
|
125
|
+
const { colors, radii } = theme;
|
|
126
|
+
const { horizontal, state } = group;
|
|
127
|
+
const isDisabled = ownDisabled || state.isDisabled;
|
|
128
|
+
const isSelected = state.selectedValue === value;
|
|
129
|
+
const interactive = !isDisabled && !state.isReadOnly;
|
|
130
|
+
const tone = isSelected ? "selected" : "unselected";
|
|
131
|
+
const t2 = colors[LAYERS[tone].hover];
|
|
132
|
+
let t3;
|
|
133
|
+
if ($[8] !== radii.circle) {
|
|
134
|
+
t3 = { borderRadius: radii.circle };
|
|
135
|
+
$[8] = radii.circle;
|
|
136
|
+
$[9] = t3;
|
|
137
|
+
} else t3 = $[9];
|
|
138
|
+
const t4 = !interactive;
|
|
139
|
+
const t5 = colors[LAYERS[tone].pressed];
|
|
140
|
+
let t6;
|
|
141
|
+
if ($[10] !== t2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
|
|
142
|
+
t6 = {
|
|
143
|
+
color: t2,
|
|
144
|
+
corners: t3,
|
|
145
|
+
disabled: t4,
|
|
146
|
+
disc: 40,
|
|
147
|
+
pressedColor: t5
|
|
148
|
+
};
|
|
149
|
+
$[10] = t2;
|
|
150
|
+
$[11] = t3;
|
|
151
|
+
$[12] = t4;
|
|
152
|
+
$[13] = t5;
|
|
153
|
+
$[14] = t6;
|
|
154
|
+
} else t6 = $[14];
|
|
155
|
+
const feedback = usePressFeedback(t6);
|
|
156
|
+
const active = feedback.hovered || feedback.pressed || feedback.ring !== void 0;
|
|
157
|
+
let t7;
|
|
158
|
+
if ($[15] !== active || $[16] !== isDisabled || $[17] !== isSelected || $[18] !== theme) {
|
|
159
|
+
t7 = colorOf(theme, {
|
|
160
|
+
active,
|
|
161
|
+
isDisabled,
|
|
162
|
+
isSelected
|
|
163
|
+
});
|
|
164
|
+
$[15] = active;
|
|
165
|
+
$[16] = isDisabled;
|
|
166
|
+
$[17] = isSelected;
|
|
167
|
+
$[18] = theme;
|
|
168
|
+
$[19] = t7;
|
|
169
|
+
} else t7 = $[19];
|
|
170
|
+
const color = t7;
|
|
171
|
+
const ring = useRingColor(color);
|
|
172
|
+
let T0;
|
|
173
|
+
let T1;
|
|
174
|
+
let T2;
|
|
175
|
+
let T3;
|
|
176
|
+
let t10;
|
|
177
|
+
let t11;
|
|
178
|
+
let t12;
|
|
179
|
+
let t13;
|
|
180
|
+
let t14;
|
|
181
|
+
let t15;
|
|
182
|
+
let t16;
|
|
183
|
+
let t17;
|
|
184
|
+
let t18;
|
|
185
|
+
let t19;
|
|
186
|
+
let t20;
|
|
187
|
+
let t21;
|
|
188
|
+
let t22;
|
|
189
|
+
let t8;
|
|
190
|
+
let t9;
|
|
191
|
+
if ($[20] !== ariaLabel || $[21] !== color || $[22] !== description || $[23] !== feedback.handlers || $[24] !== feedback.layer || $[25] !== feedback.ring || $[26] !== horizontal || $[27] !== isDisabled || $[28] !== isSelected || $[29] !== messageId || $[30] !== props || $[31] !== ring || $[32] !== state || $[33] !== style || $[34] !== theme || $[35] !== value) {
|
|
192
|
+
const own = groupStylesOf(theme);
|
|
193
|
+
T3 = View;
|
|
194
|
+
t21 = props;
|
|
195
|
+
const t23 = horizontal ? styles.shrink : void 0;
|
|
196
|
+
if ($[55] !== style || $[56] !== t23) {
|
|
197
|
+
t22 = composeStyles(t23, style);
|
|
198
|
+
$[55] = style;
|
|
199
|
+
$[56] = t23;
|
|
200
|
+
$[57] = t22;
|
|
201
|
+
} else t22 = $[57];
|
|
202
|
+
T2 = Pressable;
|
|
203
|
+
t12 = isSelected;
|
|
204
|
+
t13 = ariaLabel;
|
|
205
|
+
t14 = "radio";
|
|
206
|
+
if ($[58] !== description || $[59] !== messageId) {
|
|
207
|
+
t15 = describedBy(messageId, messageOf(description, void 0));
|
|
208
|
+
$[58] = description;
|
|
209
|
+
$[59] = messageId;
|
|
210
|
+
$[60] = t15;
|
|
211
|
+
} else t15 = $[60];
|
|
212
|
+
t16 = feedback.handlers;
|
|
213
|
+
t17 = isDisabled;
|
|
214
|
+
if ($[61] === Symbol.for("react.memo_cache_sentinel")) {
|
|
215
|
+
t18 = hitSlop(40, 40);
|
|
216
|
+
$[61] = t18;
|
|
217
|
+
} else t18 = $[61];
|
|
218
|
+
if ($[62] !== state || $[63] !== value) {
|
|
219
|
+
t19 = selectOf(state, value);
|
|
220
|
+
$[62] = state;
|
|
221
|
+
$[63] = value;
|
|
222
|
+
$[64] = t19;
|
|
223
|
+
} else t19 = $[64];
|
|
224
|
+
let t24;
|
|
225
|
+
if ($[65] !== theme) {
|
|
226
|
+
t24 = controlStylesOf(theme);
|
|
227
|
+
$[65] = theme;
|
|
228
|
+
$[66] = t24;
|
|
229
|
+
} else t24 = $[66];
|
|
230
|
+
t20 = t24.row;
|
|
231
|
+
T1 = View;
|
|
232
|
+
if ($[67] !== feedback.ring || $[68] !== theme) {
|
|
233
|
+
t10 = composeStyles(controlStylesOf(theme).disc, feedback.ring);
|
|
234
|
+
$[67] = feedback.ring;
|
|
235
|
+
$[68] = theme;
|
|
236
|
+
$[69] = t10;
|
|
237
|
+
} else t10 = $[69];
|
|
238
|
+
t11 = feedback.layer;
|
|
239
|
+
T0 = Animated.View;
|
|
240
|
+
t8 = composeStyles(styles.ring, own.ring, ring);
|
|
241
|
+
t9 = isSelected ? /* @__PURE__ */ jsx(View, { style: composeStyles(styles.dot, own.dot, { backgroundColor: color }) }) : null;
|
|
242
|
+
$[20] = ariaLabel;
|
|
243
|
+
$[21] = color;
|
|
244
|
+
$[22] = description;
|
|
245
|
+
$[23] = feedback.handlers;
|
|
246
|
+
$[24] = feedback.layer;
|
|
247
|
+
$[25] = feedback.ring;
|
|
248
|
+
$[26] = horizontal;
|
|
249
|
+
$[27] = isDisabled;
|
|
250
|
+
$[28] = isSelected;
|
|
251
|
+
$[29] = messageId;
|
|
252
|
+
$[30] = props;
|
|
253
|
+
$[31] = ring;
|
|
254
|
+
$[32] = state;
|
|
255
|
+
$[33] = style;
|
|
256
|
+
$[34] = theme;
|
|
257
|
+
$[35] = value;
|
|
258
|
+
$[36] = T0;
|
|
259
|
+
$[37] = T1;
|
|
260
|
+
$[38] = T2;
|
|
261
|
+
$[39] = T3;
|
|
262
|
+
$[40] = t10;
|
|
263
|
+
$[41] = t11;
|
|
264
|
+
$[42] = t12;
|
|
265
|
+
$[43] = t13;
|
|
266
|
+
$[44] = t14;
|
|
267
|
+
$[45] = t15;
|
|
268
|
+
$[46] = t16;
|
|
269
|
+
$[47] = t17;
|
|
270
|
+
$[48] = t18;
|
|
271
|
+
$[49] = t19;
|
|
272
|
+
$[50] = t20;
|
|
273
|
+
$[51] = t21;
|
|
274
|
+
$[52] = t22;
|
|
275
|
+
$[53] = t8;
|
|
276
|
+
$[54] = t9;
|
|
277
|
+
} else {
|
|
278
|
+
T0 = $[36];
|
|
279
|
+
T1 = $[37];
|
|
280
|
+
T2 = $[38];
|
|
281
|
+
T3 = $[39];
|
|
282
|
+
t10 = $[40];
|
|
283
|
+
t11 = $[41];
|
|
284
|
+
t12 = $[42];
|
|
285
|
+
t13 = $[43];
|
|
286
|
+
t14 = $[44];
|
|
287
|
+
t15 = $[45];
|
|
288
|
+
t16 = $[46];
|
|
289
|
+
t17 = $[47];
|
|
290
|
+
t18 = $[48];
|
|
291
|
+
t19 = $[49];
|
|
292
|
+
t20 = $[50];
|
|
293
|
+
t21 = $[51];
|
|
294
|
+
t22 = $[52];
|
|
295
|
+
t8 = $[53];
|
|
296
|
+
t9 = $[54];
|
|
297
|
+
}
|
|
298
|
+
let t23;
|
|
299
|
+
if ($[70] !== T0 || $[71] !== t8 || $[72] !== t9) {
|
|
300
|
+
t23 = /* @__PURE__ */ jsx(T0, {
|
|
301
|
+
style: t8,
|
|
302
|
+
children: t9
|
|
303
|
+
});
|
|
304
|
+
$[70] = T0;
|
|
305
|
+
$[71] = t8;
|
|
306
|
+
$[72] = t9;
|
|
307
|
+
$[73] = t23;
|
|
308
|
+
} else t23 = $[73];
|
|
309
|
+
let t24;
|
|
310
|
+
if ($[74] !== T1 || $[75] !== t10 || $[76] !== t11 || $[77] !== t23) {
|
|
311
|
+
t24 = /* @__PURE__ */ jsxs(T1, {
|
|
312
|
+
style: t10,
|
|
313
|
+
children: [t11, t23]
|
|
314
|
+
});
|
|
315
|
+
$[74] = T1;
|
|
316
|
+
$[75] = t10;
|
|
317
|
+
$[76] = t11;
|
|
318
|
+
$[77] = t23;
|
|
319
|
+
$[78] = t24;
|
|
320
|
+
} else t24 = $[78];
|
|
321
|
+
let t25;
|
|
322
|
+
if ($[79] !== children || $[80] !== isDisabled) {
|
|
323
|
+
t25 = /* @__PURE__ */ jsx(ControlLabel, {
|
|
324
|
+
isDisabled,
|
|
325
|
+
children
|
|
326
|
+
});
|
|
327
|
+
$[79] = children;
|
|
328
|
+
$[80] = isDisabled;
|
|
329
|
+
$[81] = t25;
|
|
330
|
+
} else t25 = $[81];
|
|
331
|
+
let t26;
|
|
332
|
+
if ($[82] !== T2 || $[83] !== t12 || $[84] !== t13 || $[85] !== t14 || $[86] !== t15 || $[87] !== t16 || $[88] !== t17 || $[89] !== t18 || $[90] !== t19 || $[91] !== t20 || $[92] !== t24 || $[93] !== t25) {
|
|
333
|
+
t26 = /* @__PURE__ */ jsxs(T2, {
|
|
334
|
+
"aria-checked": t12,
|
|
335
|
+
"aria-label": t13,
|
|
336
|
+
role: t14,
|
|
337
|
+
...t15,
|
|
338
|
+
...t16,
|
|
339
|
+
disabled: t17,
|
|
340
|
+
hitSlop: t18,
|
|
341
|
+
onPress: t19,
|
|
342
|
+
style: t20,
|
|
343
|
+
children: [t24, t25]
|
|
344
|
+
});
|
|
345
|
+
$[82] = T2;
|
|
346
|
+
$[83] = t12;
|
|
347
|
+
$[84] = t13;
|
|
348
|
+
$[85] = t14;
|
|
349
|
+
$[86] = t15;
|
|
350
|
+
$[87] = t16;
|
|
351
|
+
$[88] = t17;
|
|
352
|
+
$[89] = t18;
|
|
353
|
+
$[90] = t19;
|
|
354
|
+
$[91] = t20;
|
|
355
|
+
$[92] = t24;
|
|
356
|
+
$[93] = t25;
|
|
357
|
+
$[94] = t26;
|
|
358
|
+
} else t26 = $[94];
|
|
359
|
+
let t27;
|
|
360
|
+
if ($[95] !== description || $[96] !== messageId) {
|
|
361
|
+
t27 = /* @__PURE__ */ jsx(ControlMessage, {
|
|
362
|
+
description,
|
|
363
|
+
id: messageId
|
|
364
|
+
});
|
|
365
|
+
$[95] = description;
|
|
366
|
+
$[96] = messageId;
|
|
367
|
+
$[97] = t27;
|
|
368
|
+
} else t27 = $[97];
|
|
369
|
+
let t28;
|
|
370
|
+
if ($[98] !== T3 || $[99] !== t21 || $[100] !== t22 || $[101] !== t26 || $[102] !== t27) {
|
|
371
|
+
t28 = /* @__PURE__ */ jsxs(T3, {
|
|
372
|
+
...t21,
|
|
373
|
+
style: t22,
|
|
374
|
+
children: [t26, t27]
|
|
375
|
+
});
|
|
376
|
+
$[98] = T3;
|
|
377
|
+
$[99] = t21;
|
|
378
|
+
$[100] = t22;
|
|
379
|
+
$[101] = t26;
|
|
380
|
+
$[102] = t27;
|
|
381
|
+
$[103] = t28;
|
|
382
|
+
} else t28 = $[103];
|
|
383
|
+
return t28;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* A labelled set of radio buttons with one selected value between them. The
|
|
387
|
+
* value is React Stately's, as web's is: pass `value` with `onChange` to
|
|
388
|
+
* control it, or `defaultValue` to let the group keep its own, and each
|
|
389
|
+
* `Radio` inside names the entry it stands for. Disabled, read-only and the
|
|
390
|
+
* error state reach every button from here, and `orientation="horizontal"`
|
|
391
|
+
* lays the buttons along a line.
|
|
392
|
+
*
|
|
393
|
+
* ```tsx
|
|
394
|
+
* <RadioGroup defaultValue="first" label="Label">
|
|
395
|
+
* <Radio value="first">First item</Radio>
|
|
396
|
+
* <Radio value="second">Second item</Radio>
|
|
397
|
+
* </RadioGroup>
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* A screen reader hears it as a radio group named by its label. On the web
|
|
401
|
+
* the line under it describes the group, as web's does; on iOS and Android
|
|
402
|
+
* it is read after the buttons, where it sits. `style`, `ref` and `testID`
|
|
403
|
+
* land on the group as a whole, which is the element a layout positions.
|
|
404
|
+
*/
|
|
405
|
+
function RadioGroup(t0) {
|
|
406
|
+
const $ = c(52);
|
|
407
|
+
let children;
|
|
408
|
+
let defaultValue;
|
|
409
|
+
let description;
|
|
410
|
+
let error;
|
|
411
|
+
let label;
|
|
412
|
+
let onChange;
|
|
413
|
+
let props;
|
|
414
|
+
let style;
|
|
415
|
+
let t1;
|
|
416
|
+
let t2;
|
|
417
|
+
let t3;
|
|
418
|
+
let value;
|
|
419
|
+
if ($[0] !== t0) {
|
|
420
|
+
({children, defaultValue, description, error, isDisabled: t1, isReadOnly: t2, label, onChange, orientation: t3, style, value, ...props} = t0);
|
|
421
|
+
$[0] = t0;
|
|
422
|
+
$[1] = children;
|
|
423
|
+
$[2] = defaultValue;
|
|
424
|
+
$[3] = description;
|
|
425
|
+
$[4] = error;
|
|
426
|
+
$[5] = label;
|
|
427
|
+
$[6] = onChange;
|
|
428
|
+
$[7] = props;
|
|
429
|
+
$[8] = style;
|
|
430
|
+
$[9] = t1;
|
|
431
|
+
$[10] = t2;
|
|
432
|
+
$[11] = t3;
|
|
433
|
+
$[12] = value;
|
|
434
|
+
} else {
|
|
435
|
+
children = $[1];
|
|
436
|
+
defaultValue = $[2];
|
|
437
|
+
description = $[3];
|
|
438
|
+
error = $[4];
|
|
439
|
+
label = $[5];
|
|
440
|
+
onChange = $[6];
|
|
441
|
+
props = $[7];
|
|
442
|
+
style = $[8];
|
|
443
|
+
t1 = $[9];
|
|
444
|
+
t2 = $[10];
|
|
445
|
+
t3 = $[11];
|
|
446
|
+
value = $[12];
|
|
447
|
+
}
|
|
448
|
+
const isDisabled = t1 === void 0 ? false : t1;
|
|
449
|
+
const isReadOnly = t2 === void 0 ? false : t2;
|
|
450
|
+
const orientation = t3 === void 0 ? "vertical" : t3;
|
|
451
|
+
const theme = useTheme();
|
|
452
|
+
let t4;
|
|
453
|
+
if ($[13] !== defaultValue || $[14] !== isDisabled || $[15] !== isReadOnly || $[16] !== onChange || $[17] !== orientation || $[18] !== value) {
|
|
454
|
+
t4 = {
|
|
455
|
+
defaultValue,
|
|
456
|
+
isDisabled,
|
|
457
|
+
isReadOnly,
|
|
458
|
+
onChange,
|
|
459
|
+
orientation,
|
|
460
|
+
value
|
|
461
|
+
};
|
|
462
|
+
$[13] = defaultValue;
|
|
463
|
+
$[14] = isDisabled;
|
|
464
|
+
$[15] = isReadOnly;
|
|
465
|
+
$[16] = onChange;
|
|
466
|
+
$[17] = orientation;
|
|
467
|
+
$[18] = value;
|
|
468
|
+
$[19] = t4;
|
|
469
|
+
} else t4 = $[19];
|
|
470
|
+
const state = useRadioGroupState(t4);
|
|
471
|
+
const labelId = useId();
|
|
472
|
+
const messageId = useId();
|
|
473
|
+
const labelRole = useTypeRole("labelLarge");
|
|
474
|
+
const messageRole = useTypeRole("bodySmall");
|
|
475
|
+
let t5;
|
|
476
|
+
if ($[20] !== children || $[21] !== description || $[22] !== error || $[23] !== isDisabled || $[24] !== label || $[25] !== labelId || $[26] !== labelRole || $[27] !== messageId || $[28] !== messageRole || $[29] !== orientation || $[30] !== props || $[31] !== state || $[32] !== style || $[33] !== theme) {
|
|
477
|
+
const own = groupStylesOf(theme);
|
|
478
|
+
const horizontal = orientation === "horizontal";
|
|
479
|
+
let t6;
|
|
480
|
+
if ($[35] !== horizontal || $[36] !== state) {
|
|
481
|
+
t6 = {
|
|
482
|
+
horizontal,
|
|
483
|
+
state
|
|
484
|
+
};
|
|
485
|
+
$[35] = horizontal;
|
|
486
|
+
$[36] = state;
|
|
487
|
+
$[37] = t6;
|
|
488
|
+
} else t6 = $[37];
|
|
489
|
+
const context = t6;
|
|
490
|
+
const invalid = error !== void 0;
|
|
491
|
+
let T0;
|
|
492
|
+
let message;
|
|
493
|
+
let t10;
|
|
494
|
+
let t7;
|
|
495
|
+
let t8;
|
|
496
|
+
let t9;
|
|
497
|
+
if ($[38] !== description || $[39] !== error || $[40] !== labelId || $[41] !== messageId || $[42] !== props) {
|
|
498
|
+
message = messageOf(description, error);
|
|
499
|
+
T0 = View;
|
|
500
|
+
t7 = props;
|
|
501
|
+
t8 = labelId;
|
|
502
|
+
t9 = "radiogroup";
|
|
503
|
+
t10 = lineOf(messageId, message);
|
|
504
|
+
$[38] = description;
|
|
505
|
+
$[39] = error;
|
|
506
|
+
$[40] = labelId;
|
|
507
|
+
$[41] = messageId;
|
|
508
|
+
$[42] = props;
|
|
509
|
+
$[43] = T0;
|
|
510
|
+
$[44] = message;
|
|
511
|
+
$[45] = t10;
|
|
512
|
+
$[46] = t7;
|
|
513
|
+
$[47] = t8;
|
|
514
|
+
$[48] = t9;
|
|
515
|
+
} else {
|
|
516
|
+
T0 = $[43];
|
|
517
|
+
message = $[44];
|
|
518
|
+
t10 = $[45];
|
|
519
|
+
t7 = $[46];
|
|
520
|
+
t8 = $[47];
|
|
521
|
+
t9 = $[48];
|
|
522
|
+
}
|
|
523
|
+
let t11;
|
|
524
|
+
if ($[49] !== children || $[50] !== context) {
|
|
525
|
+
t11 = /* @__PURE__ */ jsx(RadioGroupContext, {
|
|
526
|
+
value: context,
|
|
527
|
+
children
|
|
528
|
+
});
|
|
529
|
+
$[49] = children;
|
|
530
|
+
$[50] = context;
|
|
531
|
+
$[51] = t11;
|
|
532
|
+
} else t11 = $[51];
|
|
533
|
+
t5 = /* @__PURE__ */ jsxs(T0, {
|
|
534
|
+
...t7,
|
|
535
|
+
"aria-labelledby": t8,
|
|
536
|
+
role: t9,
|
|
537
|
+
...t10,
|
|
538
|
+
style: composeStyles(own.root, style),
|
|
539
|
+
children: [
|
|
540
|
+
/* @__PURE__ */ jsx(Text, {
|
|
541
|
+
id: labelId,
|
|
542
|
+
style: composeStyles(labelRole, own.label, isDisabled ? own.labelDisabled : void 0, invalid ? own.labelError : void 0),
|
|
543
|
+
children: label
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ jsx(View, {
|
|
546
|
+
style: composeStyles(own.items, horizontal ? own.itemsHorizontal : void 0),
|
|
547
|
+
children: t11
|
|
548
|
+
}),
|
|
549
|
+
message === void 0 ? null : /* @__PURE__ */ jsx(View, {
|
|
550
|
+
style: own.messageLine,
|
|
551
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
552
|
+
id: messageId,
|
|
553
|
+
style: composeStyles(messageRole, own.message, invalid ? own.messageError : void 0),
|
|
554
|
+
children: message
|
|
555
|
+
})
|
|
556
|
+
})
|
|
557
|
+
]
|
|
558
|
+
});
|
|
559
|
+
$[20] = children;
|
|
560
|
+
$[21] = description;
|
|
561
|
+
$[22] = error;
|
|
562
|
+
$[23] = isDisabled;
|
|
563
|
+
$[24] = label;
|
|
564
|
+
$[25] = labelId;
|
|
565
|
+
$[26] = labelRole;
|
|
566
|
+
$[27] = messageId;
|
|
567
|
+
$[28] = messageRole;
|
|
568
|
+
$[29] = orientation;
|
|
569
|
+
$[30] = props;
|
|
570
|
+
$[31] = state;
|
|
571
|
+
$[32] = style;
|
|
572
|
+
$[33] = theme;
|
|
573
|
+
$[34] = t5;
|
|
574
|
+
} else t5 = $[34];
|
|
575
|
+
return t5;
|
|
576
|
+
}
|
|
577
|
+
function selectOf(state, value) {
|
|
578
|
+
return () => {
|
|
579
|
+
state.setSelectedValue(value);
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
function useRingColor(color) {
|
|
583
|
+
const { motion } = useTheme();
|
|
584
|
+
const reduceMotion = useReducedMotion();
|
|
585
|
+
const timing = {
|
|
586
|
+
duration: motion.durationShort2,
|
|
587
|
+
easing: Easing.bezier(...motion.easingStandard)
|
|
588
|
+
};
|
|
589
|
+
return useAnimatedStyle(() => {
|
|
590
|
+
"worklet";
|
|
591
|
+
return { borderColor: reduceMotion ? color : withTiming(color, timing) };
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
595
|
+
export { Radio, RadioGroup };
|
|
596
|
+
|
|
597
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","Ref","StyleProp","TextStyle","ViewProps","ViewStyle","AnimatedStyle","RadioGroupState","createContext","use","useId","useMemo","Text","NativeText","Platform","Pressable","StyleSheet","View","Animated","Easing","useAnimatedStyle","useReducedMotion","withTiming","useRadioGroupState","ResolvedTheme","ControlLabel","ControlMessage","describedBy","LAYER_SIZE","messageOf","controlStylesOf","hitSlop","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","useTypeRole","RadioGroupContextValue","horizontal","state","RadioGroupOrientation","RadioGroupProps","Omit","children","defaultValue","description","error","isDisabled","isReadOnly","label","onChange","value","orientation","ref","style","RadioProps","Tone","RING_SIZE","RING_RULE","DOT_SIZE","LAYERS","Readonly","Record","hover","pressed","selected","unselected","RadioGroupContext","styles","create","dot","height","width","ring","alignItems","borderWidth","justifyContent","shrink","flexShrink","groupStylesOf","colors","radii","spacing","stateLayerOpacity","borderRadius","circle","items","flexDirection","itemsHorizontal","columnGap","lg","flexWrap","color","onSurfaceVariant","labelDisabled","onSurface","disabledContent","labelError","message","messageError","messageLine","marginTop","xs","root","rowGap","colorOf","active","isSelected","primary","lineOf","id","OS","undefined","Radio","t0","$","_c","ariaLabel","props","t1","ownDisabled","theme","group","messageId","Error","selectedValue","interactive","tone","t2","t3","t4","t5","t6","corners","disabled","disc","pressedColor","feedback","hovered","t7","useRingColor","T0","T1","T2","T3","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t8","t9","handlers","layer","own","t23","Symbol","for","selectOf","t24","row","backgroundColor","t25","t26","t27","t28","RadioGroup","labelId","labelRole","messageRole","context","invalid","setSelectedValue","motion","reduceMotion","timing","duration","durationShort2","easing","bezier","easingStandard","borderColor","_c","NativeText"],"sources":["../../../src/components/radio-group/index.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react'\nimport type { StyleProp, TextStyle, ViewProps, ViewStyle } from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { RadioGroupState } from 'react-stately/useRadioGroupState'\n\nimport { createContext, use, useId, useMemo } from 'react'\nimport {\n Text as NativeText,\n Platform,\n Pressable,\n StyleSheet,\n View,\n} from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n withTiming,\n} from 'react-native-reanimated'\nimport { useRadioGroupState } from 'react-stately/useRadioGroupState'\n\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport {\n ControlLabel,\n ControlMessage,\n describedBy,\n LAYER_SIZE,\n messageOf,\n} from '../../control'\nimport { controlStylesOf } from '../../control/styles'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The radio button page, as kanso-ui's Radio draws it: a 20dp ring inside a\n// 40dp state layer, with a 48dp target. Unselected, the ring is 2dp of on\n// surface variant that turns on surface while hovered, pressed or focused;\n// selected, the ring and the 10dp dot inside it are primary. Disabled is on\n// surface at the disabled opacity for both. The state layer is on surface over\n// an unselected button and primary over a selected one while hovered, and the\n// two swap once pressed. The page draws no error state for the button itself:\n// an invalid group says so through its label and message, and the buttons\n// keep their colours.\n//\n// The ring eases between its colours over the motion tokens' short duration\n// on the standard curve, as web's transition does, and at once for a reader\n// who asks the device for reduced motion. The dot arrives with the selection,\n// as web's does.\n//\n// Two components from one module, since neither means anything without the\n// other: a radio button is a member of a group, and the group is what holds\n// the value. The group hands its React Stately state to its buttons through\n// context. Each button's row, label and the line under it are src/control's,\n// as Checkbox's are.\n//\n// The group is a column: its label in label large, the buttons, and the line\n// under them, 4dp apart, with the line a further 4dp down, as web's field\n// chrome sets them out. The label is on surface variant, error while the\n// group has one, and on surface at the disabled opacity while disabled.\n\ntype RadioGroupContextValue = {\n readonly horizontal: boolean\n readonly state: RadioGroupState\n}\n\n/** Which way a `RadioGroup` lays out its buttons. */\ntype RadioGroupOrientation = 'horizontal' | 'vertical'\n\ntype RadioGroupProps = Omit<ViewProps, 'children' | 'style'> & {\n /** The radio buttons, each with a `value` of its own. */\n readonly children?: ReactNode\n /** The value selected at first, when the group keeps its own state. */\n readonly defaultValue?: null | string\n /**\n * A hint under the group. Replaced by `error` when there is one, so the\n * two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current selection, in words. Its presence is what\n * puts the group in its error state: the message and the label's colour\n * both follow from it.\n */\n readonly error?: string\n /**\n * Draws every button disabled, and takes no presses.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Shows the selection without letting a press change it.\n * @default false\n */\n readonly isReadOnly?: boolean\n /**\n * What the group is for. Required rather than optional: a set of radio\n * buttons with no name is a set a screen reader cannot introduce.\n */\n readonly label: string\n /** Called with the newly selected value whenever a press changes it. */\n readonly onChange?: (value: string) => void\n /**\n * Lays the buttons one under another, or along a line that wraps.\n * @default 'vertical'\n */\n readonly orientation?: RadioGroupOrientation\n readonly ref?: Ref<View>\n readonly style?: StyleProp<ViewStyle>\n /**\n * The selected value, for a call site holding the state itself with\n * `onChange`. `null` selects nothing.\n */\n readonly value?: null | string\n}\n\ntype RadioProps = Omit<ViewProps, 'children' | 'style'> & {\n /**\n * The label, beside the button. A button that a row labels some other way\n * leaves it out and passes `aria-label` instead.\n */\n readonly children?: ReactNode\n /** A hint under the label, read with the button. */\n readonly description?: string\n /**\n * Draws this button disabled, and takes no presses on it.\n * @default false\n */\n readonly isDisabled?: boolean\n readonly ref?: Ref<View>\n readonly style?: StyleProp<ViewStyle>\n /** The entry this button stands for, which the group reports when chosen. */\n readonly value: string\n}\n\ntype Tone = 'selected' | 'unselected'\n\n// The ring's side and rule, and the dot's side, from the page.\nconst RING_SIZE = 20\nconst RING_RULE = 2\nconst DOT_SIZE = 10\n\n// The state layer's colour roles, hovered or focused and pressed. The two\n// swap once pressed.\nconst LAYERS: Readonly<\n Record<\n Tone,\n {\n readonly hover: keyof ResolvedTheme['colors']\n readonly pressed: keyof ResolvedTheme['colors']\n }\n >\n> = {\n selected: { hover: 'primary', pressed: 'onSurface' },\n unselected: { hover: 'onSurface', pressed: 'primary' },\n}\n\nconst RadioGroupContext = createContext<null | RadioGroupContextValue>(null)\n\nconst styles = StyleSheet.create({\n dot: {\n height: DOT_SIZE,\n width: DOT_SIZE,\n },\n ring: {\n alignItems: 'center',\n borderWidth: RING_RULE,\n height: RING_SIZE,\n justifyContent: 'center',\n width: RING_SIZE,\n },\n // A button along a line gives up width before it widens the line, so a\n // label longer than the line breaks inside it.\n shrink: {\n flexShrink: 1,\n },\n})\n\nconst groupStylesOf = themedStyles(\n ({ colors, radii, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n dot: {\n borderRadius: radii.circle,\n },\n // The group's buttons, one under another.\n items: {\n flexDirection: 'column',\n },\n // Along a line instead, 16dp apart, wrapping when the line runs out.\n itemsHorizontal: {\n columnGap: spacing.lg,\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n label: {\n color: colors.onSurfaceVariant,\n },\n labelDisabled: {\n color: withOpacity(colors.onSurface, stateLayerOpacity.disabledContent),\n },\n labelError: {\n color: colors.error,\n },\n message: {\n color: colors.onSurfaceVariant,\n },\n messageError: {\n color: colors.error,\n },\n messageLine: {\n marginTop: spacing.xs,\n },\n ring: {\n borderRadius: radii.circle,\n },\n root: {\n flexDirection: 'column',\n rowGap: spacing.xs,\n },\n }),\n)\n\n/**\n * The colour the ring and the dot are drawn in. Hover, press and focus darken\n * only an unselected ring, and only one a press can change.\n */\nfunction colorOf(\n { colors, stateLayerOpacity }: ResolvedTheme,\n {\n active,\n isDisabled,\n isSelected,\n }: {\n readonly active: boolean\n readonly isDisabled: boolean\n readonly isSelected: boolean\n },\n) {\n if (isDisabled) {\n return withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n }\n\n if (isSelected) {\n return colors.primary\n }\n\n return active ? colors.onSurface : colors.onSurfaceVariant\n}\n\n/**\n * How the group is described by the line under it. On the web it points at\n * the line with `aria-describedby`, as web's group does. iOS and Android\n * focus the buttons rather than the group, so there the line is left where a\n * screen reader reaches it in order, after the last button.\n */\nfunction lineOf(id: string, message: string | undefined) {\n return Platform.OS === 'web' && message !== undefined\n ? { 'aria-describedby': id }\n : undefined\n}\n\n/**\n * One option of a `RadioGroup`, with its label and optionally a description\n * under it. It names the entry it stands for with `value`; the selection is\n * the group's, so a `Radio` is only ever drawn inside one.\n *\n * A screen reader hears it as a radio button named by its label, checked or\n * not, followed by the line under it. A press anywhere on the button or the\n * label selects it, and the row takes presses over the 48dp target the page\n * asks of the button. `style`, `ref` and `testID` land on the view holding\n * the row and the line under it, which is the element a layout positions.\n */\nfunction Radio({\n 'aria-label': ariaLabel,\n children,\n description,\n isDisabled: ownDisabled = false,\n style,\n value,\n ...props\n}: RadioProps) {\n const theme = useTheme()\n const group = use(RadioGroupContext)\n const messageId = useId()\n\n if (group === null) {\n throw new Error(\n 'A Radio is drawn inside a RadioGroup, which holds its selection.',\n )\n }\n\n const { colors, radii } = theme\n const { horizontal, state } = group\n const isDisabled = ownDisabled || state.isDisabled\n const isSelected = state.selectedValue === value\n const interactive = !isDisabled && !state.isReadOnly\n const tone: Tone = isSelected ? 'selected' : 'unselected'\n\n const feedback = usePressFeedback({\n color: colors[LAYERS[tone].hover],\n corners: { borderRadius: radii.circle },\n disabled: !interactive,\n disc: LAYER_SIZE,\n pressedColor: colors[LAYERS[tone].pressed],\n })\n const active =\n feedback.hovered || feedback.pressed || feedback.ring !== undefined\n const color = colorOf(theme, { active, isDisabled, isSelected })\n const ring = useRingColor(color)\n const own = groupStylesOf(theme)\n\n return (\n <View\n {...props}\n style={composeStyles<ViewStyle>(\n horizontal ? styles.shrink : undefined,\n style,\n )}\n >\n <Pressable\n aria-checked={isSelected}\n aria-label={ariaLabel}\n role=\"radio\"\n {...describedBy(messageId, messageOf(description, undefined))}\n {...feedback.handlers}\n disabled={isDisabled}\n hitSlop={hitSlop(LAYER_SIZE, LAYER_SIZE)}\n onPress={selectOf(state, value)}\n style={controlStylesOf(theme).row}\n >\n <View\n style={composeStyles<ViewStyle>(\n controlStylesOf(theme).disc,\n feedback.ring,\n )}\n >\n {feedback.layer}\n <Animated.View\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.ring,\n own.ring,\n ring,\n )}\n >\n {isSelected ? (\n <View\n style={composeStyles<ViewStyle>(styles.dot, own.dot, {\n backgroundColor: color,\n })}\n />\n ) : null}\n </Animated.View>\n </View>\n <ControlLabel isDisabled={isDisabled}>{children}</ControlLabel>\n </Pressable>\n <ControlMessage description={description} id={messageId} />\n </View>\n )\n}\n\n/**\n * A labelled set of radio buttons with one selected value between them. The\n * value is React Stately's, as web's is: pass `value` with `onChange` to\n * control it, or `defaultValue` to let the group keep its own, and each\n * `Radio` inside names the entry it stands for. Disabled, read-only and the\n * error state reach every button from here, and `orientation=\"horizontal\"`\n * lays the buttons along a line.\n *\n * ```tsx\n * <RadioGroup defaultValue=\"first\" label=\"Label\">\n * <Radio value=\"first\">First item</Radio>\n * <Radio value=\"second\">Second item</Radio>\n * </RadioGroup>\n * ```\n *\n * A screen reader hears it as a radio group named by its label. On the web\n * the line under it describes the group, as web's does; on iOS and Android\n * it is read after the buttons, where it sits. `style`, `ref` and `testID`\n * land on the group as a whole, which is the element a layout positions.\n */\nfunction RadioGroup({\n children,\n defaultValue,\n description,\n error,\n isDisabled = false,\n isReadOnly = false,\n label,\n onChange,\n orientation = 'vertical',\n style,\n value,\n ...props\n}: RadioGroupProps) {\n const theme = useTheme()\n const state = useRadioGroupState({\n defaultValue,\n isDisabled,\n isReadOnly,\n onChange,\n orientation,\n value,\n })\n const labelId = useId()\n const messageId = useId()\n const labelRole = useTypeRole('labelLarge')\n const messageRole = useTypeRole('bodySmall')\n\n const own = groupStylesOf(theme)\n const horizontal = orientation === 'horizontal'\n const context = useMemo(() => ({ horizontal, state }), [horizontal, state])\n const invalid = error !== undefined\n const message = messageOf(description, error)\n\n return (\n <View\n {...props}\n aria-labelledby={labelId}\n role=\"radiogroup\"\n {...lineOf(messageId, message)}\n style={composeStyles<ViewStyle>(own.root, style)}\n >\n <NativeText\n id={labelId}\n style={composeStyles<TextStyle>(\n labelRole,\n own.label,\n isDisabled ? own.labelDisabled : undefined,\n invalid ? own.labelError : undefined,\n )}\n >\n {label}\n </NativeText>\n <View\n style={composeStyles<ViewStyle>(\n own.items,\n horizontal ? own.itemsHorizontal : undefined,\n )}\n >\n <RadioGroupContext value={context}>{children}</RadioGroupContext>\n </View>\n {message === undefined ? null : (\n <View style={own.messageLine}>\n <NativeText\n id={messageId}\n style={composeStyles<TextStyle>(\n messageRole,\n own.message,\n invalid ? own.messageError : undefined,\n )}\n >\n {message}\n </NativeText>\n </View>\n )}\n </View>\n )\n}\n\n// A press's selection. Built by a call rather than declared in the\n// component, which is what react-perf's jsx-no-new-function-as-prop is after;\n// the React Compiler memoises the result on its inputs.\nfunction selectOf(state: RadioGroupState, value: string) {\n return () => {\n state.setSelectedValue(value)\n }\n}\n\n// The ring's colour, eased to as the state changes.\nfunction useRingColor(color: string) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const timing = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n return useAnimatedStyle(() => {\n 'worklet'\n return {\n borderColor: reduceMotion ? color : withTiming(color, timing),\n }\n })\n}\n\nexport { Radio, RadioGroup }\nexport type { RadioGroupOrientation, RadioGroupProps, RadioProps }\n"],"mappings":";;;;;;;;;;;;;;AA4IA,MAAM0D,YAAY;AAClB,MAAMC,YAAY;AAClB,MAAMC,WAAW;AAIjB,MAAMC,SAQF;CACFK,UAAU;EAAEF,OAAO;EAAWC,SAAS;CAAY;CACnDE,YAAY;EAAEH,OAAO;EAAaC,SAAS;CAAU;AACvD;AAEA,MAAMG,oBAAoB5D,cAA6C,IAAI;AAE3E,MAAM6D,SAASrD,WAAWsD,OAAO;CAC/BC,KAAK;EACHC,QAAQZ;EACRa,OAAOb;CACT;CACAc,MAAM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