panelui-native 0.32.0 → 0.35.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +2 -1
  2. package/lib/module/components/button/index.js +106 -11
  3. package/lib/module/components/button/index.js.map +1 -1
  4. package/lib/module/components/drawer/index.js +477 -0
  5. package/lib/module/components/drawer/index.js.map +1 -0
  6. package/lib/module/components/panelside/index.js +1024 -0
  7. package/lib/module/components/panelside/index.js.map +1 -0
  8. package/lib/module/components/progress/index.js +64 -24
  9. package/lib/module/components/progress/index.js.map +1 -1
  10. package/lib/module/components/select/index.js +14 -3
  11. package/lib/module/components/select/index.js.map +1 -1
  12. package/lib/module/components/swipe/index.js +537 -0
  13. package/lib/module/components/swipe/index.js.map +1 -0
  14. package/lib/module/icons/index.js +20 -0
  15. package/lib/module/icons/index.js.map +1 -1
  16. package/lib/module/index.js +4 -1
  17. package/lib/module/index.js.map +1 -1
  18. package/lib/module/native/index.js +30 -0
  19. package/lib/module/native/index.js.map +1 -1
  20. package/lib/typescript/src/components/button/index.d.ts +22 -1
  21. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  22. package/lib/typescript/src/components/drawer/index.d.ts +146 -0
  23. package/lib/typescript/src/components/drawer/index.d.ts.map +1 -0
  24. package/lib/typescript/src/components/panelside/index.d.ts +354 -0
  25. package/lib/typescript/src/components/panelside/index.d.ts.map +1 -0
  26. package/lib/typescript/src/components/progress/index.d.ts +25 -4
  27. package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
  28. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  29. package/lib/typescript/src/components/swipe/index.d.ts +206 -0
  30. package/lib/typescript/src/components/swipe/index.d.ts.map +1 -0
  31. package/lib/typescript/src/icons/index.d.ts +1 -0
  32. package/lib/typescript/src/icons/index.d.ts.map +1 -1
  33. package/lib/typescript/src/index.d.ts +4 -1
  34. package/lib/typescript/src/index.d.ts.map +1 -1
  35. package/lib/typescript/src/native/index.d.ts +20 -0
  36. package/lib/typescript/src/native/index.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/src/components/button/index.tsx +140 -8
  39. package/src/components/drawer/index.tsx +662 -0
  40. package/src/components/panelside/index.tsx +1358 -0
  41. package/src/components/progress/index.tsx +93 -25
  42. package/src/components/select/index.tsx +23 -3
  43. package/src/components/swipe/index.tsx +687 -0
  44. package/src/icons/index.tsx +14 -0
  45. package/src/index.ts +42 -0
  46. package/src/native/index.ts +51 -0
@@ -0,0 +1,537 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Swipe — a row that slides aside to reveal the things you can do to it.
5
+ *
6
+ * It is the one list interaction a phone has that a page does not: the actions
7
+ * are not on screen taking up room, they are behind the row, and the gesture
8
+ * that reveals them is the same one everywhere else in the OS. An inbox, a
9
+ * task list, a settings screen — all of them want it, and all of them
10
+ * otherwise end up with a trailing button too small to hit.
11
+ *
12
+ * ```tsx
13
+ * <Swipe>
14
+ * <Swipe.End>
15
+ * <Swipe.Action icon={<TrashIcon />} label="Delete" color="destructive" onPress={remove} />
16
+ * </Swipe.End>
17
+ * <Item variant="outline">
18
+ * <Item.Content><Item.Title>Invoice.pdf</Item.Title></Item.Content>
19
+ * </Item>
20
+ * </Swipe>
21
+ * ```
22
+ *
23
+ * The sides are `start` and `end` rather than left and right, because the
24
+ * gesture mirrors with the reading direction: in a right-to-left app the row
25
+ * that opened toward the right has to open toward the left, and a caller
26
+ * should not have to write that twice. Yoga mirrors where the panels sit; the
27
+ * drag is measured in raw pixels and cannot be mirrored for us, so it reads
28
+ * the direction and turns itself around.
29
+ *
30
+ * Everything that moves runs on the UI thread. A row being dragged does not
31
+ * re-render — the only React work in a swipe is the callback at the end of it.
32
+ */
33
+ import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useImperativeHandle, useMemo, useRef } from 'react';
34
+ import { View } from 'react-native';
35
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
36
+ import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
37
+ import { useCSSVariable } from 'uniwind';
38
+ import { tv } from 'tailwind-variants';
39
+ import { useDirectionSign } from "../../hooks/use-direction.js";
40
+ import { IconColorProvider } from "../../icons/index.js";
41
+ import { AnimatedPressable } from "../../primitives/animated-pressable.js";
42
+ import { Text } from "../../primitives/text.js";
43
+ import { cn } from "../../utils/cn.js";
44
+ import { selectionTick } from "../../utils/haptics.js";
45
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
46
+ const SPRING = {
47
+ damping: 22,
48
+ stiffness: 220,
49
+ mass: 0.7
50
+ };
51
+
52
+ /**
53
+ * Past its own width a panel has nothing left to reveal, so the row is let go
54
+ * of gradually rather than stopped dead. 8 is where the rubber band reads as
55
+ * resistance rather than as something broken.
56
+ */
57
+ const OVERSHOOT_FRICTION = 8;
58
+
59
+ /** How far past the panel a drag has to reach before a release fires an action. */
60
+ const FULL_SWIPE_RATIO = 1.6;
61
+
62
+ /** Fraction of the panel a release has to clear for the row to stay open. */
63
+ const OPEN_RATIO = 0.5;
64
+
65
+ /** How much of a fling to count as distance already travelled, in seconds. */
66
+ const VELOCITY_LOOKAHEAD = 0.12;
67
+
68
+ /** The side a row is open on, or `null` while it is closed. */
69
+
70
+ const SwipeContext = /*#__PURE__*/createContext(null);
71
+
72
+ /* -------------------------------------------------------------------------- */
73
+ /* Action */
74
+ /* -------------------------------------------------------------------------- */
75
+
76
+ /**
77
+ * A tile is a filled block of colour with its content laid over it, which
78
+ * settles both halves of how it is coloured:
79
+ *
80
+ * - The fill is the status colour at full strength, never a tint of it. A tile
81
+ * only exists while the row is out of the way, so it has to be legible in the
82
+ * moment it appears; a 6%-alpha wash of the row's own background is not a
83
+ * tile at all, it is a hole with a glyph floating in it.
84
+ * - The content is white, because the status colours are chosen to be carried
85
+ * at full strength with white over them. The `-foreground` token of a status
86
+ * is the *darker text* form of that hue, meant for a neutral surface — laid
87
+ * over the fill it is the same hue twice and the label all but disappears.
88
+ *
89
+ * `default` and `primary` are the two that cannot take white. `primary`
90
+ * inverts with the theme and owns a true on-primary token, so it uses it;
91
+ * `default` is a mid grey in every theme, and takes the background colour,
92
+ * which is the neutral furthest from it in whichever direction the theme runs.
93
+ */
94
+ const actionVariants = tv({
95
+ slots: {
96
+ root: 'h-full min-w-[80px] items-center justify-center gap-1.5 px-4',
97
+ label: 'text-center text-xs font-semibold'
98
+ },
99
+ variants: {
100
+ color: {
101
+ default: {
102
+ root: 'bg-muted-foreground',
103
+ label: 'text-background'
104
+ },
105
+ primary: {
106
+ root: 'bg-primary',
107
+ label: 'text-primary-foreground'
108
+ },
109
+ success: {
110
+ root: 'bg-success',
111
+ label: 'text-white'
112
+ },
113
+ warning: {
114
+ root: 'bg-warning',
115
+ label: 'text-white'
116
+ },
117
+ info: {
118
+ root: 'bg-info',
119
+ label: 'text-white'
120
+ },
121
+ destructive: {
122
+ root: 'bg-destructive',
123
+ label: 'text-white'
124
+ }
125
+ }
126
+ },
127
+ defaultVariants: {
128
+ color: 'default'
129
+ }
130
+ });
131
+ /**
132
+ * The fill a panel takes behind its tiles, so that dragging past the tiles
133
+ * extends the outermost action's colour instead of opening a hole.
134
+ */
135
+ const PANEL_FILL = {
136
+ default: 'bg-muted-foreground',
137
+ primary: 'bg-primary',
138
+ success: 'bg-success',
139
+ warning: 'bg-warning',
140
+ info: 'bg-info',
141
+ destructive: 'bg-destructive'
142
+ };
143
+ /**
144
+ * One tile behind the row. Sized by its own content down to a minimum wide
145
+ * enough to hit, so a one-word action and a two-word one still line up.
146
+ */
147
+ const SwipeAction = /*#__PURE__*/forwardRef(({
148
+ className,
149
+ labelClassName,
150
+ color = 'default',
151
+ label,
152
+ icon,
153
+ onPress,
154
+ keepOpen = false,
155
+ ...props
156
+ }, ref) => {
157
+ const context = useContext(SwipeContext);
158
+ const slots = actionVariants({
159
+ color
160
+ });
161
+ const tint = useActionTint(color);
162
+ return /*#__PURE__*/_jsxs(AnimatedPressable, {
163
+ ref: ref,
164
+ accessibilityRole: "button",
165
+ accessibilityLabel: label,
166
+ onPress: () => {
167
+ if (!keepOpen) context?.close();
168
+ onPress?.();
169
+ },
170
+ className: slots.root({
171
+ className
172
+ }),
173
+ ...props,
174
+ children: [icon ? /*#__PURE__*/_jsx(IconColorProvider, {
175
+ color: tint,
176
+ children: sizeIcon(icon)
177
+ }) : null, /*#__PURE__*/_jsx(Text, {
178
+ className: slots.label({
179
+ className: labelClassName
180
+ }),
181
+ numberOfLines: 1,
182
+ children: label
183
+ })]
184
+ });
185
+ });
186
+ SwipeAction.displayName = 'Swipe.Action';
187
+
188
+ /**
189
+ * How big a glyph is drawn on a tile. The icons default to the 16 that suits
190
+ * them inline in a row of text, which is too small here: a tile is 80 wide and
191
+ * mostly empty, and the icon is the part of it read first — at 16 it looks
192
+ * like a mistake rather than a target.
193
+ */
194
+ const ICON_SIZE = 22;
195
+
196
+ /**
197
+ * The icon at tile size, unless the caller asked for one. Sizing it here rather
198
+ * than asking every call site to is what keeps two tiles beside each other
199
+ * matching, which is the whole reason a panel of them reads as a set.
200
+ */
201
+ function sizeIcon(icon) {
202
+ if (! /*#__PURE__*/isValidElement(icon)) return icon;
203
+ if (icon.props.size !== undefined) return icon;
204
+ return /*#__PURE__*/cloneElement(icon, {
205
+ size: ICON_SIZE
206
+ });
207
+ }
208
+
209
+ /**
210
+ * The colour a tile's glyph is drawn in — the same colour as its label, so the
211
+ * two read as one thing. Resolved from the theme rather than written down as a
212
+ * hex wherever the theme has an answer, since a hex stops being right the
213
+ * moment the theme inverts; white is the exception, because a status fill is
214
+ * the same saturated colour in every theme and white is what it carries.
215
+ *
216
+ * Both tokens are resolved on every render because a hook cannot be called for
217
+ * one branch only. They are variable lookups, not work.
218
+ */
219
+ function useActionTint(color) {
220
+ const background = useCSSVariable('--color-background');
221
+ const primary = useCSSVariable('--color-primary-foreground');
222
+ if (color === 'default') return typeof background === 'string' ? background : undefined;
223
+ if (color === 'primary') return typeof primary === 'string' ? primary : undefined;
224
+ return '#ffffff';
225
+ }
226
+
227
+ /* -------------------------------------------------------------------------- */
228
+ /* Panels */
229
+ /* -------------------------------------------------------------------------- */
230
+
231
+ /**
232
+ * The panels are markers rather than renderers: the root lifts their children
233
+ * out and lays them out itself, because it is the root that knows how wide the
234
+ * gap behind the row currently is. Declaring them as elements is still how a
235
+ * caller says which side an action belongs to, and it keeps both sides
236
+ * readable in source rather than hidden inside two render props.
237
+ */
238
+ const SwipeStart = /*#__PURE__*/forwardRef(() => null);
239
+ SwipeStart.displayName = 'Swipe.Start';
240
+ const SwipeEnd = /*#__PURE__*/forwardRef(() => null);
241
+ SwipeEnd.displayName = 'Swipe.End';
242
+
243
+ /* -------------------------------------------------------------------------- */
244
+ /* Reading the declared actions */
245
+ /* -------------------------------------------------------------------------- */
246
+
247
+ /**
248
+ * The actions a panel declared, in source order. Only direct `Swipe.Action`
249
+ * children count — anything else in a panel is decoration, and calling a
250
+ * stranger's `onPress` because it happened to have one would be worse than
251
+ * ignoring it.
252
+ */
253
+ function collectActions(node) {
254
+ const found = [];
255
+ for (const child of Children.toArray(node)) {
256
+ if (! /*#__PURE__*/isValidElement(child) || child.type !== SwipeAction) continue;
257
+ const {
258
+ label,
259
+ color,
260
+ onPress
261
+ } = child.props;
262
+ found.push({
263
+ label,
264
+ color: color ?? 'default',
265
+ onPress
266
+ });
267
+ }
268
+ return found;
269
+ }
270
+
271
+ /* -------------------------------------------------------------------------- */
272
+ /* Root */
273
+ /* -------------------------------------------------------------------------- */
274
+
275
+ /**
276
+ * A row that opens sideways.
277
+ *
278
+ * The panels sit behind the row rather than beside it, so nothing about the
279
+ * layout changes when one opens: the row is the only thing that moves, and it
280
+ * moves as a transform. Each panel stretches to exactly the gap the row has
281
+ * left behind, which is what keeps an overshoot showing the outermost action's
282
+ * colour rather than a hole through to the screen underneath.
283
+ */
284
+ const SwipeRoot = /*#__PURE__*/forwardRef(({
285
+ className,
286
+ contentClassName,
287
+ children,
288
+ fullSwipe = true,
289
+ disabled = false,
290
+ haptics = false,
291
+ onOpenChange,
292
+ ...props
293
+ }, ref) => {
294
+ const sign = useDirectionSign();
295
+
296
+ /** Logical offset of the row in points; positive reveals the start side. */
297
+ const offset = useSharedValue(0);
298
+ /**
299
+ * Where the offset stood when this drag began. A pan reports translation
300
+ * from the touch down, so without it a row that is already open snaps shut
301
+ * the instant a second drag starts.
302
+ */
303
+ const origin = useSharedValue(0);
304
+ /** Natural width of each panel's tiles, measured once and then only read. */
305
+ const startWidth = useSharedValue(0);
306
+ const endWidth = useSharedValue(0);
307
+ /** Whether a full swipe is currently armed, so the tick fires just once. */
308
+ const armed = useSharedValue(false);
309
+ const {
310
+ startNode,
311
+ endNode,
312
+ row
313
+ } = useMemo(() => {
314
+ let start = null;
315
+ let end = null;
316
+ const rest = [];
317
+ for (const child of Children.toArray(children)) {
318
+ if (/*#__PURE__*/isValidElement(child) && child.type === SwipeStart) {
319
+ start = child.props.children;
320
+ } else if (/*#__PURE__*/isValidElement(child) && child.type === SwipeEnd) {
321
+ end = child.props.children;
322
+ } else {
323
+ rest.push(child);
324
+ }
325
+ }
326
+ return {
327
+ startNode: start,
328
+ endNode: end,
329
+ row: rest
330
+ };
331
+ }, [children]);
332
+ const startActions = useMemo(() => collectActions(startNode), [startNode]);
333
+ const endActions = useMemo(() => collectActions(endNode), [endNode]);
334
+ const hasStart = startNode != null;
335
+ const hasEnd = endNode != null;
336
+
337
+ /**
338
+ * The side the row is open on, held in a ref rather than in state: nothing
339
+ * here renders from it, and a row that re-rendered every time a drag
340
+ * settled would be paying for the one thing this component exists to
341
+ * avoid.
342
+ */
343
+ const openSide = useRef(null);
344
+
345
+ /**
346
+ * Only a genuine change is reported. The gesture cannot know whether the
347
+ * row was already closed when it settles it closed, so the comparison has
348
+ * to happen here rather than at each call site.
349
+ *
350
+ * The comparison and the callback both have to sit outside React's state,
351
+ * because `onOpenChange` is the caller's and will usually set state of its
352
+ * own. Run from inside a state updater — which React is free to call while
353
+ * rendering — that lands as a set during another component's render, and
354
+ * React says so.
355
+ */
356
+ const reportOpen = useCallback(side => {
357
+ if (openSide.current === side) return;
358
+ openSide.current = side;
359
+ onOpenChange?.(side);
360
+ }, [onOpenChange]);
361
+ const close = useCallback(() => {
362
+ offset.value = withSpring(0, SPRING);
363
+ reportOpen(null);
364
+ }, [offset, reportOpen]);
365
+ useImperativeHandle(ref, () => ({
366
+ open: side => {
367
+ const width = side === 'start' ? startWidth.value : endWidth.value;
368
+ if (width === 0) return;
369
+ offset.value = withSpring(side === 'start' ? width : -width, SPRING);
370
+ reportOpen(side);
371
+ },
372
+ close
373
+ }), [offset, startWidth, endWidth, reportOpen, close]);
374
+
375
+ /**
376
+ * The action a full swipe fires: the one furthest from the row, since that
377
+ * is the one the gesture travelled all the way to. The panels pack their
378
+ * tiles against the row, so on the start side that is the first declared
379
+ * and on the end side the last.
380
+ */
381
+ const fire = useCallback(side => {
382
+ const action = side === 'start' ? startActions[0] : endActions[endActions.length - 1];
383
+ action?.onPress?.();
384
+ }, [startActions, endActions]);
385
+ const tick = useCallback(() => selectionTick(), []);
386
+
387
+ /**
388
+ * The drag has to lose to a scroll, or a list of swipeable rows could not
389
+ * be scrolled without rows twitching open under the finger.
390
+ * `activeOffsetX` makes it wait for clearly horizontal intent, and
391
+ * `failOffsetY` hands the touch to the scroller outright the moment the
392
+ * finger commits vertically.
393
+ */
394
+ const pan = useMemo(() => Gesture.Pan().enabled(!disabled && (hasStart || hasEnd)).activeOffsetX([-12, 12]).failOffsetY([-14, 14]).onBegin(() => {
395
+ origin.value = offset.value;
396
+ armed.value = false;
397
+ }).onUpdate(event => {
398
+ // The gesture is raw pixels and the offset is logical, so a
399
+ // right-to-left subtree runs all of this backwards.
400
+ const next = origin.value + event.translationX * sign;
401
+ const limit = next > 0 ? startWidth.value : endWidth.value;
402
+ if (limit === 0) {
403
+ // Nothing to reveal on this side: hold the row at rest rather
404
+ // than letting it drift open over an empty panel.
405
+ offset.value = 0;
406
+ return;
407
+ }
408
+ const beyond = Math.abs(next) - limit;
409
+ offset.value = beyond > 0 ? Math.sign(next) * (limit + beyond / OVERSHOOT_FRICTION) : next;
410
+ if (!fullSwipe) return;
411
+ const reached = Math.abs(offset.value) > limit * FULL_SWIPE_RATIO;
412
+ if (reached !== armed.value) {
413
+ armed.value = reached;
414
+ if (reached && haptics) runOnJS(tick)();
415
+ }
416
+ }).onEnd(event => {
417
+ const current = offset.value;
418
+ const toStart = current > 0;
419
+ const side = toStart ? 'start' : 'end';
420
+ const limit = toStart ? startWidth.value : endWidth.value;
421
+ if (limit === 0) {
422
+ offset.value = withSpring(0, SPRING);
423
+ return;
424
+ }
425
+ if (fullSwipe && armed.value) {
426
+ armed.value = false;
427
+ offset.value = withSpring(0, SPRING);
428
+ runOnJS(fire)(side);
429
+ runOnJS(reportOpen)(null);
430
+ return;
431
+ }
432
+
433
+ // Part of the fling counts as distance already covered, so a short
434
+ // flick opens the row where a slow drag to the same point does not.
435
+ const projected = Math.abs(current + event.velocityX * sign * VELOCITY_LOOKAHEAD);
436
+ if (projected > limit * OPEN_RATIO) {
437
+ offset.value = withSpring(toStart ? limit : -limit, SPRING);
438
+ runOnJS(reportOpen)(side);
439
+ } else {
440
+ offset.value = withSpring(0, SPRING);
441
+ runOnJS(reportOpen)(null);
442
+ }
443
+ }), [disabled, hasStart, hasEnd, sign, fullSwipe, haptics, offset, origin, armed, startWidth, endWidth, fire, tick, reportOpen]);
444
+ const contentStyle = useAnimatedStyle(() => ({
445
+ transform: [{
446
+ translateX: offset.value * sign
447
+ }]
448
+ }));
449
+
450
+ /**
451
+ * A panel is exactly the gap the row has left behind — no wider, so it can
452
+ * never paint over the row, and no narrower, so an overshoot extends the
453
+ * outermost action's colour instead of opening a hole onto the screen
454
+ * underneath. At rest both are zero wide and neither is on screen at all.
455
+ */
456
+ const startStyle = useAnimatedStyle(() => ({
457
+ width: Math.max(offset.value, 0)
458
+ }));
459
+ const endStyle = useAnimatedStyle(() => ({
460
+ width: Math.max(-offset.value, 0)
461
+ }));
462
+
463
+ /**
464
+ * Measured from the tiles rather than from the panel around them. The panel
465
+ * is as wide as the gesture has made it, which is the number being derived
466
+ * here — reading it back off the panel would only ever report the animation
467
+ * to itself, and the width would stay at the zero it starts from.
468
+ */
469
+ const measure = target => event => {
470
+ target.value = event.nativeEvent.layout.width;
471
+ };
472
+
473
+ /**
474
+ * A swipe is invisible to a screen reader, so every action is offered as an
475
+ * accessibility action on the row as well. That is the whole of the
476
+ * alternative path: there is no other way to reach a tile that stays off
477
+ * screen until a gesture nobody announced has been performed.
478
+ */
479
+ const allActions = useMemo(() => [...startActions, ...endActions], [startActions, endActions]);
480
+ const a11yActions = useMemo(() => allActions.map(({
481
+ label
482
+ }) => ({
483
+ name: label,
484
+ label
485
+ })), [allActions]);
486
+ const context = useMemo(() => ({
487
+ close
488
+ }), [close]);
489
+ return /*#__PURE__*/_jsx(SwipeContext.Provider, {
490
+ value: context,
491
+ children: /*#__PURE__*/_jsxs(View, {
492
+ accessibilityActions: a11yActions.length > 0 ? a11yActions : undefined,
493
+ onAccessibilityAction: event => {
494
+ allActions.find(({
495
+ label
496
+ }) => label === event.nativeEvent.actionName)?.onPress?.();
497
+ },
498
+ className: cn('relative w-full overflow-hidden', className),
499
+ ...props,
500
+ children: [hasStart ?
501
+ /*#__PURE__*/
502
+ // Yoga puts the panel on the edge text begins at and mirrors it for
503
+ // us; only the transform above had to be turned around.
504
+ _jsx(Animated.View, {
505
+ className: cn('absolute bottom-0 start-0 top-0 overflow-hidden', PANEL_FILL[startActions[0]?.color ?? 'default']),
506
+ style: startStyle,
507
+ children: /*#__PURE__*/_jsx(View, {
508
+ className: "absolute bottom-0 end-0 top-0 flex-row items-stretch",
509
+ onLayout: measure(startWidth),
510
+ children: startNode
511
+ })
512
+ }) : null, hasEnd ? /*#__PURE__*/_jsx(Animated.View, {
513
+ className: cn('absolute bottom-0 end-0 top-0 overflow-hidden', PANEL_FILL[endActions[endActions.length - 1]?.color ?? 'default']),
514
+ style: endStyle,
515
+ children: /*#__PURE__*/_jsx(View, {
516
+ className: "absolute bottom-0 start-0 top-0 flex-row items-stretch",
517
+ onLayout: measure(endWidth),
518
+ children: endNode
519
+ })
520
+ }) : null, /*#__PURE__*/_jsx(GestureDetector, {
521
+ gesture: pan,
522
+ children: /*#__PURE__*/_jsx(Animated.View, {
523
+ style: contentStyle,
524
+ className: cn('w-full', contentClassName),
525
+ children: row
526
+ })
527
+ })]
528
+ })
529
+ });
530
+ });
531
+ SwipeRoot.displayName = 'Swipe';
532
+ export const Swipe = Object.assign(SwipeRoot, {
533
+ Start: SwipeStart,
534
+ End: SwipeEnd,
535
+ Action: SwipeAction
536
+ });
537
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Children","cloneElement","createContext","forwardRef","isValidElement","useCallback","useContext","useImperativeHandle","useMemo","useRef","View","Gesture","GestureDetector","Animated","runOnJS","useAnimatedStyle","useSharedValue","withSpring","useCSSVariable","tv","useDirectionSign","IconColorProvider","AnimatedPressable","Text","cn","selectionTick","jsx","_jsx","jsxs","_jsxs","SPRING","damping","stiffness","mass","OVERSHOOT_FRICTION","FULL_SWIPE_RATIO","OPEN_RATIO","VELOCITY_LOOKAHEAD","SwipeContext","actionVariants","slots","root","label","variants","color","default","primary","success","warning","info","destructive","defaultVariants","PANEL_FILL","SwipeAction","className","labelClassName","icon","onPress","keepOpen","props","ref","context","tint","useActionTint","accessibilityRole","accessibilityLabel","close","children","sizeIcon","numberOfLines","displayName","ICON_SIZE","size","undefined","background","SwipeStart","SwipeEnd","collectActions","node","found","child","toArray","type","push","SwipeRoot","contentClassName","fullSwipe","disabled","haptics","onOpenChange","sign","offset","origin","startWidth","endWidth","armed","startNode","endNode","row","start","end","rest","startActions","endActions","hasStart","hasEnd","openSide","reportOpen","side","current","value","open","width","fire","action","length","tick","pan","Pan","enabled","activeOffsetX","failOffsetY","onBegin","onUpdate","event","next","translationX","limit","beyond","Math","abs","reached","onEnd","toStart","projected","velocityX","contentStyle","transform","translateX","startStyle","max","endStyle","measure","target","nativeEvent","layout","allActions","a11yActions","map","name","Provider","accessibilityActions","onAccessibilityAction","find","actionName","style","onLayout","gesture","Swipe","Object","assign","Start","End","Action"],"sourceRoot":"../../../../src","sources":["components/swipe/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;AACA;AACA;AACA;AACA;AACA,SACEA,QAAQ,EACRC,YAAY,EACZC,aAAa,EACbC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QAGD,OAAO;AACd,SAASC,IAAI,QAAgD,cAAc;AAC3E,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,OAAOC,QAAQ,IACbC,OAAO,EACPC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QAEL,yBAAyB;AAChC,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,EAAE,QAA2B,mBAAmB;AACzD,SAASC,gBAAgB,QAAQ,8BAA2B;AAC5D,SAASC,iBAAiB,QAAQ,sBAAa;AAC/C,SAASC,iBAAiB,QAAQ,wCAAqC;AACvE,SAASC,IAAI,QAAQ,0BAAuB;AAC5C,SAASC,EAAE,QAAQ,mBAAgB;AACnC,SAASC,aAAa,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpD,MAAMC,MAAM,GAAG;EAAEC,OAAO,EAAE,EAAE;EAAEC,SAAS,EAAE,GAAG;EAAEC,IAAI,EAAE;AAAI,CAAU;;AAElE;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,CAAC;;AAE5B;AACA,MAAMC,gBAAgB,GAAG,GAAG;;AAE5B;AACA,MAAMC,UAAU,GAAG,GAAG;;AAEtB;AACA,MA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ACpBlF,SAAS,EAAE9B,EAAE,CAAC,QAAQ,EAAE6D,gBAAgB,CAAE;UAAAlB,QAAA,EAEzC+B;QAAG,CACS;MAAC,CACD,CAAC;IAAA,CACd;EAAC,CACc,CAAC;AAE5B,CACF,CAAC;AACDd,SAAS,CAACd,WAAW,GAAG,OAAO;AAE/B,OAAO,MAAMwF,KAAK,GAAGC,MAAM,CAACC,MAAM,CAAC5E,SAAS,EAAE;EAC5C6E,KAAK,EAAEtF,UAAU;EACjBuF,GAAG,EAAEtF,QAAQ;EACbuF,MAAM,EAAE9G;AACV,CAAC,CAAC","ignoreList":[]}
@@ -294,6 +294,26 @@ export function EllipsisIcon({
294
294
  })]
295
295
  });
296
296
  }
297
+ export function MenuIcon({
298
+ size = 20,
299
+ color,
300
+ ...props
301
+ }) {
302
+ const resolved = useResolvedColor(color, '#737373');
303
+ return /*#__PURE__*/_jsx(Svg, {
304
+ width: size,
305
+ height: size,
306
+ viewBox: "0 0 24 24",
307
+ fill: "none",
308
+ ...props,
309
+ children: /*#__PURE__*/_jsx(Path, {
310
+ d: "M4 6h16M4 12h16M4 18h16",
311
+ stroke: resolved,
312
+ strokeWidth: 2,
313
+ strokeLinecap: "round"
314
+ })
315
+ });
316
+ }
297
317
  export function XIcon({
298
318
  size = 16,
299
319
  color,