panelui-native 0.16.0 → 0.20.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/lib/module/components/bottom-sheet/index.js +38 -10
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/checkbox/index.js +24 -11
- package/lib/module/components/checkbox/index.js.map +1 -1
- package/lib/module/components/field/index.js +337 -0
- package/lib/module/components/field/index.js.map +1 -0
- package/lib/module/components/flow/flow-paths.js +378 -0
- package/lib/module/components/flow/flow-paths.js.map +1 -0
- package/lib/module/components/flow/index.js +1598 -0
- package/lib/module/components/flow/index.js.map +1 -0
- package/lib/module/components/form/index.js +77 -0
- package/lib/module/components/form/index.js.map +1 -0
- package/lib/module/components/form/use-field.js +50 -0
- package/lib/module/components/form/use-field.js.map +1 -0
- package/lib/module/components/form/use-form.js +217 -0
- package/lib/module/components/form/use-form.js.map +1 -0
- package/lib/module/components/frame/index.js +124 -22
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/otp-input/index.js +303 -0
- package/lib/module/components/otp-input/index.js.map +1 -0
- package/lib/module/components/rating/index.js +339 -0
- package/lib/module/components/rating/index.js.map +1 -0
- package/lib/module/components/signature/index.js +500 -0
- package/lib/module/components/signature/index.js.map +1 -0
- package/lib/module/components/slider/index.js +14 -1
- package/lib/module/components/slider/index.js.map +1 -1
- package/lib/module/icons/index.js +247 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +7 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +15 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkbox/index.d.ts +8 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/field/index.d.ts +94 -0
- package/lib/typescript/src/components/field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/flow/flow-paths.d.ts +89 -0
- package/lib/typescript/src/components/flow/flow-paths.d.ts.map +1 -0
- package/lib/typescript/src/components/flow/index.d.ts +310 -0
- package/lib/typescript/src/components/flow/index.d.ts.map +1 -0
- package/lib/typescript/src/components/form/index.d.ts +64 -0
- package/lib/typescript/src/components/form/index.d.ts.map +1 -0
- package/lib/typescript/src/components/form/use-field.d.ts +16 -0
- package/lib/typescript/src/components/form/use-field.d.ts.map +1 -0
- package/lib/typescript/src/components/form/use-form.d.ts +37 -0
- package/lib/typescript/src/components/form/use-form.d.ts.map +1 -0
- package/lib/typescript/src/components/frame/index.d.ts +39 -2
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/otp-input/index.d.ts +141 -0
- package/lib/typescript/src/components/otp-input/index.d.ts.map +1 -0
- package/lib/typescript/src/components/rating/index.d.ts +122 -0
- package/lib/typescript/src/components/rating/index.d.ts.map +1 -0
- package/lib/typescript/src/components/signature/index.d.ts +254 -0
- package/lib/typescript/src/components/signature/index.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/index.d.ts +6 -0
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +25 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +9 -1
- package/src/components/bottom-sheet/index.tsx +50 -12
- package/src/components/checkbox/index.tsx +40 -12
- package/src/components/field/index.tsx +329 -0
- package/src/components/flow/flow-paths.ts +348 -0
- package/src/components/flow/index.tsx +1924 -0
- package/src/components/form/index.tsx +85 -0
- package/src/components/form/use-field.ts +65 -0
- package/src/components/form/use-form.ts +252 -0
- package/src/components/frame/index.tsx +162 -14
- package/src/components/otp-input/index.tsx +396 -0
- package/src/components/rating/index.tsx +416 -0
- package/src/components/signature/index.tsx +681 -0
- package/src/components/slider/index.tsx +20 -1
- package/src/icons/index.tsx +185 -0
- package/src/index.ts +78 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Rating — a row of stars you can read or set.
|
|
5
|
+
*
|
|
6
|
+
* A rating is two jobs wearing one shape. Read-only, it is a compact way to
|
|
7
|
+
* *show* a score — four-and-a-half stars next to a product. Interactive, it is
|
|
8
|
+
* an *input*: tap a star to pick a whole value, or with `precision={0.5}` press
|
|
9
|
+
* the left half of a star for a half. Either way the fill is the truth, so the
|
|
10
|
+
* two modes look identical and only differ in whether a finger changes them.
|
|
11
|
+
*
|
|
12
|
+
* Partial fills are drawn by clipping a filled star over an empty one of the
|
|
13
|
+
* same geometry — the filled layer's width is a fraction of the star's, so a
|
|
14
|
+
* half star is exactly half and any precision in between is honest. That fill
|
|
15
|
+
* is animated on the UI thread: setting a value springs the stars to it rather
|
|
16
|
+
* than snapping, and a drag follows the finger with no spring so it never lags.
|
|
17
|
+
*
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Rating defaultValue={3} onValueChange={setScore} />
|
|
20
|
+
*
|
|
21
|
+
* <Rating value={4.5} precision={0.5} readOnly />
|
|
22
|
+
*
|
|
23
|
+
* <Rating label="Rate your stay" showValue color="warning" defaultValue={0} />
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Works controlled (`value` + `onValueChange`) or uncontrolled (`defaultValue`).
|
|
27
|
+
*/
|
|
28
|
+
import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
29
|
+
import { View } from 'react-native';
|
|
30
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
31
|
+
import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
|
|
32
|
+
import { tv } from 'tailwind-variants';
|
|
33
|
+
import { useCSSVariable } from 'uniwind';
|
|
34
|
+
import { StarIcon } from "../../icons/index.js";
|
|
35
|
+
import { Text } from "../../primitives/text.js";
|
|
36
|
+
import { cn } from "../../utils/cn.js";
|
|
37
|
+
import { selectionTick } from "../../utils/haptics.js";
|
|
38
|
+
|
|
39
|
+
/** Springs the fill onto its resting value after a tap or the end of a drag. */
|
|
40
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
41
|
+
const SPRING = {
|
|
42
|
+
damping: 18,
|
|
43
|
+
stiffness: 220,
|
|
44
|
+
mass: 0.6
|
|
45
|
+
};
|
|
46
|
+
const ratingVariants = tv({
|
|
47
|
+
slots: {
|
|
48
|
+
root: 'gap-2',
|
|
49
|
+
header: 'flex-row items-center justify-between gap-3',
|
|
50
|
+
label: 'text-sm font-medium text-foreground',
|
|
51
|
+
value: 'text-sm text-muted-foreground',
|
|
52
|
+
row: 'flex-row items-center self-start'
|
|
53
|
+
},
|
|
54
|
+
variants: {
|
|
55
|
+
size: {
|
|
56
|
+
sm: {
|
|
57
|
+
row: 'gap-0.5'
|
|
58
|
+
},
|
|
59
|
+
md: {
|
|
60
|
+
row: 'gap-1'
|
|
61
|
+
},
|
|
62
|
+
lg: {
|
|
63
|
+
row: 'gap-1.5'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
disabled: {
|
|
67
|
+
true: {
|
|
68
|
+
root: 'opacity-50'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
size: 'md'
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
/** Star pixel size per size token — the whole control scales from this. */
|
|
77
|
+
const STAR_SIZE = {
|
|
78
|
+
sm: 18,
|
|
79
|
+
md: 24,
|
|
80
|
+
lg: 32
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** The CSS token each colour paints its filled stars with. */
|
|
84
|
+
const FILL_VAR = {
|
|
85
|
+
warning: '--color-warning',
|
|
86
|
+
primary: '--color-primary',
|
|
87
|
+
success: '--color-success',
|
|
88
|
+
destructive: '--color-destructive',
|
|
89
|
+
info: '--color-info',
|
|
90
|
+
foreground: '--color-foreground'
|
|
91
|
+
};
|
|
92
|
+
function clampJS(value, min, max) {
|
|
93
|
+
return Math.min(Math.max(value, min), max);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Rounds `value` up to the nearest `precision`, so any touch fills at least it. */
|
|
97
|
+
function snap(value, precision, max) {
|
|
98
|
+
const stepped = Math.ceil(value / precision) * precision;
|
|
99
|
+
// Guard the float drift that `ceil` on fractional steps can leave behind.
|
|
100
|
+
return clampJS(Math.round(stepped / precision) * precision, 0, max);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* One star: an empty outline with a filled copy clipped over it. The clip width
|
|
104
|
+
* is driven by the shared `display` value on the UI thread, so the fill of this
|
|
105
|
+
* star animates and drags without a React render.
|
|
106
|
+
*/
|
|
107
|
+
function Star({
|
|
108
|
+
index,
|
|
109
|
+
display,
|
|
110
|
+
size,
|
|
111
|
+
gap,
|
|
112
|
+
fillColor,
|
|
113
|
+
emptyColor
|
|
114
|
+
}) {
|
|
115
|
+
// Clamped inline rather than through a helper: this body runs on the UI
|
|
116
|
+
// thread, which can only reach worklets, not module-scope functions.
|
|
117
|
+
const clipStyle = useAnimatedStyle(() => ({
|
|
118
|
+
width: Math.min(Math.max(display.value - index, 0), 1) * size
|
|
119
|
+
}));
|
|
120
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
121
|
+
style: {
|
|
122
|
+
width: size,
|
|
123
|
+
height: size,
|
|
124
|
+
marginRight: gap
|
|
125
|
+
},
|
|
126
|
+
children: [/*#__PURE__*/_jsx(StarIcon, {
|
|
127
|
+
size: size,
|
|
128
|
+
color: emptyColor
|
|
129
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
130
|
+
style: [{
|
|
131
|
+
position: 'absolute',
|
|
132
|
+
left: 0,
|
|
133
|
+
top: 0,
|
|
134
|
+
overflow: 'hidden'
|
|
135
|
+
}, clipStyle],
|
|
136
|
+
children: /*#__PURE__*/_jsx(StarIcon, {
|
|
137
|
+
size: size,
|
|
138
|
+
color: fillColor,
|
|
139
|
+
filled: true
|
|
140
|
+
})
|
|
141
|
+
})]
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
export const Rating = /*#__PURE__*/forwardRef(({
|
|
145
|
+
className,
|
|
146
|
+
headerClassName,
|
|
147
|
+
rowClassName,
|
|
148
|
+
value: valueProp,
|
|
149
|
+
defaultValue = 0,
|
|
150
|
+
max = 5,
|
|
151
|
+
precision = 1,
|
|
152
|
+
onValueChange,
|
|
153
|
+
onValueCommit,
|
|
154
|
+
readOnly = false,
|
|
155
|
+
disabled = false,
|
|
156
|
+
allowClear = false,
|
|
157
|
+
color = 'warning',
|
|
158
|
+
size = 'md',
|
|
159
|
+
label,
|
|
160
|
+
showValue = false,
|
|
161
|
+
formatValue,
|
|
162
|
+
haptics = false
|
|
163
|
+
}, ref) => {
|
|
164
|
+
const isControlled = valueProp !== undefined;
|
|
165
|
+
const [internal, setInternal] = useState(defaultValue);
|
|
166
|
+
const value = clampJS(isControlled ? valueProp : internal, 0, max);
|
|
167
|
+
const interactive = !readOnly && !disabled;
|
|
168
|
+
const slots = ratingVariants({
|
|
169
|
+
size,
|
|
170
|
+
disabled
|
|
171
|
+
});
|
|
172
|
+
const starSize = STAR_SIZE[size ?? 'md'];
|
|
173
|
+
const gap = size === 'sm' ? 2 : size === 'lg' ? 6 : 4;
|
|
174
|
+
|
|
175
|
+
// SVG paints with real colour strings, not classes — resolve the tokens.
|
|
176
|
+
const fillColor = useCSSVariable(FILL_VAR[color]);
|
|
177
|
+
const emptyColor = useCSSVariable('--color-border');
|
|
178
|
+
const fill = typeof fillColor === 'string' ? fillColor : '#f59e0b';
|
|
179
|
+
const empty = typeof emptyColor === 'string' ? emptyColor : '#d4d4d4';
|
|
180
|
+
|
|
181
|
+
// Drives every star's clipped fill on the UI thread.
|
|
182
|
+
const display = useSharedValue(value);
|
|
183
|
+
const rowWidth = useSharedValue(0);
|
|
184
|
+
|
|
185
|
+
// Keep the change/commit handlers reachable from the gesture without
|
|
186
|
+
// rebuilding it on every render.
|
|
187
|
+
const changeRef = useRef(onValueChange);
|
|
188
|
+
changeRef.current = onValueChange;
|
|
189
|
+
const commitRef = useRef(onValueCommit);
|
|
190
|
+
commitRef.current = onValueCommit;
|
|
191
|
+
// The last whole star a drag crossed, so haptics tick once per star.
|
|
192
|
+
const lastStep = useRef(Math.ceil(value));
|
|
193
|
+
const emitChange = useCallback(next => {
|
|
194
|
+
if (!isControlled) setInternal(next);
|
|
195
|
+
changeRef.current?.(next);
|
|
196
|
+
}, [isControlled]);
|
|
197
|
+
|
|
198
|
+
// Follow a controlled value that changes elsewhere, springing to it.
|
|
199
|
+
useEffect(() => {
|
|
200
|
+
display.value = withSpring(value, SPRING);
|
|
201
|
+
}, [value, display]);
|
|
202
|
+
const onRowLayout = event => {
|
|
203
|
+
rowWidth.value = event.nativeEvent.layout.width;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// Maps an x within the row to a snapped rating. Runs on JS off the worklet.
|
|
207
|
+
const valueFromX = useCallback((x, width) => {
|
|
208
|
+
if (width <= 0) return value;
|
|
209
|
+
const raw = clampJS(x / width, 0, 1) * max;
|
|
210
|
+
return snap(raw, precision, max);
|
|
211
|
+
}, [max, precision, value]);
|
|
212
|
+
const applyLive = useCallback((x, width) => {
|
|
213
|
+
let next = valueFromX(x, width);
|
|
214
|
+
if (allowClear && next === value && Math.ceil(next) === lastStep.current) {
|
|
215
|
+
next = 0;
|
|
216
|
+
}
|
|
217
|
+
display.value = next;
|
|
218
|
+
if (haptics && Math.ceil(next) !== lastStep.current) {
|
|
219
|
+
lastStep.current = Math.ceil(next);
|
|
220
|
+
selectionTick();
|
|
221
|
+
}
|
|
222
|
+
emitChange(next);
|
|
223
|
+
}, [valueFromX, allowClear, value, display, haptics, emitChange]);
|
|
224
|
+
|
|
225
|
+
// Resets the haptic step to where the touch started, then applies the first
|
|
226
|
+
// position. Runs on JS: a ref cannot be written from a gesture worklet.
|
|
227
|
+
const begin = useCallback((x, width) => {
|
|
228
|
+
lastStep.current = Math.ceil(value);
|
|
229
|
+
applyLive(x, width);
|
|
230
|
+
}, [value, applyLive]);
|
|
231
|
+
const commit = useCallback((x, width) => {
|
|
232
|
+
let next = valueFromX(x, width);
|
|
233
|
+
if (allowClear && next === value) next = 0;
|
|
234
|
+
display.value = withSpring(next, SPRING);
|
|
235
|
+
lastStep.current = Math.ceil(next);
|
|
236
|
+
emitChange(next);
|
|
237
|
+
commitRef.current?.(next);
|
|
238
|
+
}, [valueFromX, allowClear, value, display, emitChange]);
|
|
239
|
+
const pan = Gesture.Pan().enabled(interactive).onBegin(event => {
|
|
240
|
+
runOnJS(begin)(event.x, rowWidth.value);
|
|
241
|
+
}).onUpdate(event => {
|
|
242
|
+
runOnJS(applyLive)(event.x, rowWidth.value);
|
|
243
|
+
}).onFinalize(event => {
|
|
244
|
+
runOnJS(commit)(event.x, rowWidth.value);
|
|
245
|
+
});
|
|
246
|
+
const tap = Gesture.Tap().enabled(interactive).maxDuration(250).onEnd(event => {
|
|
247
|
+
runOnJS(commit)(event.x, rowWidth.value);
|
|
248
|
+
});
|
|
249
|
+
const gesture = Gesture.Race(tap, pan);
|
|
250
|
+
|
|
251
|
+
// VoiceOver / TalkBack move by a single precision step.
|
|
252
|
+
const nudge = dir => {
|
|
253
|
+
const next = clampJS(Math.round((value + dir * precision) / precision) * precision, 0, max);
|
|
254
|
+
if (next === value) return;
|
|
255
|
+
display.value = withSpring(next, SPRING);
|
|
256
|
+
lastStep.current = Math.ceil(next);
|
|
257
|
+
emitChange(next);
|
|
258
|
+
commitRef.current?.(next);
|
|
259
|
+
};
|
|
260
|
+
const onAccessibilityAction = event => {
|
|
261
|
+
if (event.nativeEvent.actionName === 'increment') nudge(1);else if (event.nativeEvent.actionName === 'decrement') nudge(-1);
|
|
262
|
+
};
|
|
263
|
+
const shown = formatValue ? formatValue(value) : String(value);
|
|
264
|
+
const a11yLabel = label ?? `Rating, ${shown} out of ${max}`;
|
|
265
|
+
const stars = /*#__PURE__*/_jsx(View, {
|
|
266
|
+
className: slots.row({
|
|
267
|
+
className: rowClassName
|
|
268
|
+
}),
|
|
269
|
+
onLayout: onRowLayout
|
|
270
|
+
// The row is measured for the touch math, so it must not collapse.
|
|
271
|
+
,
|
|
272
|
+
collapsable: false,
|
|
273
|
+
children: Array.from({
|
|
274
|
+
length: max
|
|
275
|
+
}, (_, i) => /*#__PURE__*/_jsx(Star, {
|
|
276
|
+
index: i,
|
|
277
|
+
display: display,
|
|
278
|
+
size: starSize
|
|
279
|
+
// No trailing gap after the last star, so the row width is honest.
|
|
280
|
+
,
|
|
281
|
+
gap: i === max - 1 ? 0 : gap,
|
|
282
|
+
fillColor: fill,
|
|
283
|
+
emptyColor: empty
|
|
284
|
+
}, i))
|
|
285
|
+
});
|
|
286
|
+
const header = label || showValue ? /*#__PURE__*/_jsxs(View, {
|
|
287
|
+
className: slots.header({
|
|
288
|
+
className: headerClassName
|
|
289
|
+
}),
|
|
290
|
+
children: [label ? /*#__PURE__*/_jsx(Text, {
|
|
291
|
+
className: slots.label(),
|
|
292
|
+
children: label
|
|
293
|
+
}) : /*#__PURE__*/_jsx(View, {}), showValue ? /*#__PURE__*/_jsx(Text, {
|
|
294
|
+
className: slots.value(),
|
|
295
|
+
children: shown
|
|
296
|
+
}) : null]
|
|
297
|
+
}) : null;
|
|
298
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
299
|
+
ref: ref,
|
|
300
|
+
className: cn(slots.root({
|
|
301
|
+
className
|
|
302
|
+
})),
|
|
303
|
+
children: [header, interactive ? /*#__PURE__*/_jsx(GestureDetector, {
|
|
304
|
+
gesture: gesture,
|
|
305
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
306
|
+
accessible: true,
|
|
307
|
+
accessibilityRole: "adjustable",
|
|
308
|
+
accessibilityLabel: a11yLabel,
|
|
309
|
+
accessibilityState: {
|
|
310
|
+
disabled
|
|
311
|
+
},
|
|
312
|
+
accessibilityValue: {
|
|
313
|
+
min: 0,
|
|
314
|
+
max,
|
|
315
|
+
now: value,
|
|
316
|
+
text: shown
|
|
317
|
+
},
|
|
318
|
+
accessibilityActions: [{
|
|
319
|
+
name: 'increment'
|
|
320
|
+
}, {
|
|
321
|
+
name: 'decrement'
|
|
322
|
+
}],
|
|
323
|
+
onAccessibilityAction: onAccessibilityAction
|
|
324
|
+
// Hold the stars in a self-starting box so the gesture area is
|
|
325
|
+
// exactly the stars, not the full width of the parent.
|
|
326
|
+
,
|
|
327
|
+
className: "self-start",
|
|
328
|
+
children: stars
|
|
329
|
+
})
|
|
330
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
331
|
+
accessible: true,
|
|
332
|
+
accessibilityRole: "image",
|
|
333
|
+
accessibilityLabel: a11yLabel,
|
|
334
|
+
children: stars
|
|
335
|
+
})]
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
Rating.displayName = 'Rating';
|
|
339
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useCallback","useEffect","useRef","useState","View","Gesture","GestureDetector","Animated","runOnJS","useAnimatedStyle","useSharedValue","withSpring","tv","useCSSVariable","StarIcon","Text","cn","selectionTick","jsx","_jsx","jsxs","_jsxs","SPRING","damping","stiffness","mass","ratingVariants","slots","root","header","label","value","row","variants","size","sm","md","lg","disabled","true","defaultVariants","STAR_SIZE","FILL_VAR","warning","primary","success","destructive","info","foreground","clampJS","min","max","Math","snap","precision","stepped","ceil","round","Star","index","display","gap","fillColor","emptyColor","clipStyle","width","style","height","marginRight","children","color","position","left","top","overflow","filled","Rating","className","headerClassName","rowClassName","valueProp","defaultValue","onValueChange","onValueCommit","readOnly","allowClear","showValue","formatValue","haptics","ref","isControlled","undefined","internal","setInternal","interactive","starSize","fill","empty","rowWidth","changeRef","current","commitRef","lastStep","emitChange","next","onRowLayout","event","nativeEvent","layout","valueFromX","x","raw","applyLive","begin","commit","pan","Pan","enabled","onBegin","onUpdate","onFinalize","tap","Tap","maxDuration","onEnd","gesture","Race","nudge","dir","onAccessibilityAction","actionName","shown","String","a11yLabel","stars","onLayout","collapsable","Array","from","length","_","i","accessible","accessibilityRole","accessibilityLabel","accessibilityState","accessibilityValue","now","text","accessibilityActions","name","displayName"],"sourceRoot":"../../../../src","sources":["components/rating/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SACEC,IAAI,QAGC,cAAc;AACrB,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,OAAOC,QAAQ,IACbC,OAAO,EACPC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QAEL,yBAAyB;AAChC,SAASC,EAAE,QAA2B,mBAAmB;AACzD,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,IAAI,QAAQ,0BAAuB;AAC5C,SAASC,EAAE,QAAQ,mBAAgB;AACnC,SAASC,aAAa,QAAQ,wBAAqB;;AAEnD;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,MAAM,GAAG;EAAEC,OAAO,EAAE,EAAE;EAAEC,SAAS,EAAE,GAAG;EAAEC,IAAI,EAAE;AAAI,CAAU;AAElE,MAAMC,cAAc,GAAGd,EAAE,CAAC;EACxBe,KAAK,EAAE;IACLC,IAAI,EAAE,OAAO;IACbC,MAAM,EAAE,6CAA6C;IACrDC,KAAK,EAAE,qCAAqC;IAC5CC,KAAK,EAAE,+BAA+B;IACtCC,GAAG,EAAE;EACP,CAAC;EACDC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE;QAAEH,GAAG,EAAE;MAAU,CAAC;MACtBI,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