panelui-native 0.44.0 → 0.49.0
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/README.md +6 -1
- package/lib/module/components/accordion/index.js +32 -4
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/button/index.js +83 -15
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/button-group/index.js +186 -0
- package/lib/module/components/button-group/index.js.map +1 -0
- package/lib/module/components/color-picker/index.js +110 -1
- package/lib/module/components/color-picker/index.js.map +1 -1
- package/lib/module/components/combobox/index.js +7 -1
- package/lib/module/components/combobox/index.js.map +1 -1
- package/lib/module/components/date-time-picker/index.js +272 -0
- package/lib/module/components/date-time-picker/index.js.map +1 -0
- package/lib/module/components/fab/index.js +514 -0
- package/lib/module/components/fab/index.js.map +1 -0
- package/lib/module/components/grid-item/index.js +486 -0
- package/lib/module/components/grid-item/index.js.map +1 -0
- package/lib/module/components/{kpi-chart → kpi}/index.js +62 -62
- package/lib/module/components/kpi/index.js.map +1 -0
- package/lib/module/components/line-chart/index.js +92 -10
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/markdown-editor/index.js +406 -0
- package/lib/module/components/markdown-editor/index.js.map +1 -0
- package/lib/module/components/markdown-editor/markdown-transforms.js +243 -0
- package/lib/module/components/markdown-editor/markdown-transforms.js.map +1 -0
- package/lib/module/components/pie-chart/index.js +625 -0
- package/lib/module/components/pie-chart/index.js.map +1 -0
- package/lib/module/components/questionnaire/index.js +1312 -0
- package/lib/module/components/questionnaire/index.js.map +1 -0
- package/lib/module/components/scatter-chart/index.js +1173 -0
- package/lib/module/components/scatter-chart/index.js.map +1 -0
- package/lib/module/components/tabs/index.js +359 -41
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/time-picker/index.js +34 -6
- package/lib/module/components/time-picker/index.js.map +1 -1
- package/lib/module/components/tree/index.js +500 -0
- package/lib/module/components/tree/index.js.map +1 -0
- package/lib/module/icons/index.js +217 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +11 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/chart.js +81 -0
- package/lib/module/utils/chart.js.map +1 -1
- package/lib/typescript/src/components/accordion/index.d.ts +21 -0
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +21 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button-group/index.d.ts +212 -0
- package/lib/typescript/src/components/button-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/color-picker/index.d.ts +82 -1
- package/lib/typescript/src/components/color-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/combobox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/date-time-picker/index.d.ts +127 -0
- package/lib/typescript/src/components/date-time-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/components/fab/index.d.ts +285 -0
- package/lib/typescript/src/components/fab/index.d.ts.map +1 -0
- package/lib/typescript/src/components/grid-item/index.d.ts +292 -0
- package/lib/typescript/src/components/grid-item/index.d.ts.map +1 -0
- package/lib/typescript/src/components/{kpi-chart → kpi}/index.d.ts +65 -65
- package/lib/typescript/src/components/kpi/index.d.ts.map +1 -0
- package/lib/typescript/src/components/line-chart/index.d.ts +25 -1
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/markdown-editor/index.d.ts +102 -0
- package/lib/typescript/src/components/markdown-editor/index.d.ts.map +1 -0
- package/lib/typescript/src/components/markdown-editor/markdown-transforms.d.ts +76 -0
- package/lib/typescript/src/components/markdown-editor/markdown-transforms.d.ts.map +1 -0
- package/lib/typescript/src/components/pie-chart/index.d.ts +245 -0
- package/lib/typescript/src/components/pie-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/questionnaire/index.d.ts +336 -0
- package/lib/typescript/src/components/questionnaire/index.d.ts.map +1 -0
- package/lib/typescript/src/components/scatter-chart/index.d.ts +309 -0
- package/lib/typescript/src/components/scatter-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/tabs/index.d.ts +29 -2
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/time-picker/index.d.ts +19 -1
- package/lib/typescript/src/components/time-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tree/index.d.ts +125 -0
- package/lib/typescript/src/components/tree/index.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +22 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +14 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/chart.d.ts +34 -0
- package/lib/typescript/src/utils/chart.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/index.tsx +48 -6
- package/src/components/button/index.tsx +97 -15
- package/src/components/button-group/index.tsx +199 -0
- package/src/components/color-picker/index.tsx +140 -3
- package/src/components/combobox/index.tsx +7 -1
- package/src/components/date-time-picker/index.tsx +411 -0
- package/src/components/fab/index.tsx +583 -0
- package/src/components/grid-item/index.tsx +515 -0
- package/src/components/{kpi-chart → kpi}/index.tsx +85 -85
- package/src/components/line-chart/index.tsx +98 -8
- package/src/components/markdown-editor/index.tsx +526 -0
- package/src/components/markdown-editor/markdown-transforms.ts +228 -0
- package/src/components/pie-chart/index.tsx +863 -0
- package/src/components/questionnaire/index.tsx +1615 -0
- package/src/components/scatter-chart/index.tsx +1401 -0
- package/src/components/tabs/index.tsx +392 -50
- package/src/components/time-picker/index.tsx +42 -6
- package/src/components/tree/index.tsx +564 -0
- package/src/icons/index.tsx +154 -0
- package/src/index.ts +142 -18
- package/src/utils/chart.ts +110 -0
- package/lib/module/components/kpi-chart/index.js.map +0 -1
- package/lib/typescript/src/components/kpi-chart/index.d.ts.map +0 -1
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Fab — the floating action button: one screen, one thing it is mostly for.
|
|
5
|
+
*
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <Fab icon={<PlusIcon size={24} />} accessibilityLabel="New note" onPress={compose} />
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* ## It floats, which is the whole problem with it
|
|
11
|
+
*
|
|
12
|
+
* A button pinned over the content is a button covering some of it, and the
|
|
13
|
+
* bottom-right corner of a scrolling list is exactly where the last row goes. So
|
|
14
|
+
* a Fab is right when a screen has *one* action worth that trade and wrong when
|
|
15
|
+
* it has three — a corner with three buttons in it is a toolbar that has been
|
|
16
|
+
* put in the wrong place. Where a screen has several, the honest shapes are a
|
|
17
|
+
* `ButtonGroup` in a bar or, if one of them really does lead, this with a
|
|
18
|
+
* `Fab.Group` behind it.
|
|
19
|
+
*
|
|
20
|
+
* It positions itself absolutely against its nearest positioned ancestor, which
|
|
21
|
+
* on a screen means the screen. Give the content below it enough bottom padding
|
|
22
|
+
* to scroll clear — this cannot know how tall your list is, and a Fab sitting on
|
|
23
|
+
* the last row forever is the failure people actually hit.
|
|
24
|
+
*
|
|
25
|
+
* ## Extended, and when to bother
|
|
26
|
+
*
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Fab extended icon={<PencilIcon size={20} />}>Write</Fab>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* A lone glyph is a guess unless the glyph is a plus. `extended` spells the
|
|
32
|
+
* action out, costs the width, and is worth it for anything a plus would not
|
|
33
|
+
* have said.
|
|
34
|
+
*
|
|
35
|
+
* ## The speed dial
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Fab.Group icon={<PlusIcon size={24} />} accessibilityLabel="Add">
|
|
39
|
+
* <Fab.Action icon={<ImageIcon size={18} />} label="Photo" onPress={addPhoto} />
|
|
40
|
+
* <Fab.Action icon={<FileIcon size={18} />} label="File" onPress={addFile} />
|
|
41
|
+
* </Fab.Group>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* The actions come out of the button one after another rather than together —
|
|
45
|
+
* a stagger of a few frames each, which is enough to read as a list unfolding
|
|
46
|
+
* instead of a menu appearing. Every action carries its label beside it, because
|
|
47
|
+
* a column of unlabelled circles is a quiz.
|
|
48
|
+
*
|
|
49
|
+
* Opening also drops a scrim over the screen. Not for looks: an open dial is
|
|
50
|
+
* modal — the next tap either picks something or closes it — and a scrim is what
|
|
51
|
+
* says so, as well as what catches the tap that closes it.
|
|
52
|
+
*
|
|
53
|
+
* A group draws itself through a portal, above everything else — the scrim and
|
|
54
|
+
* the buttons together, so the backdrop cannot end up on top of the dial it is
|
|
55
|
+
* behind. That means its `offset` is measured from the screen's edges rather
|
|
56
|
+
* than from whatever it is written inside, which is what lets it be declared
|
|
57
|
+
* next to the content it belongs to instead of at the root of the screen.
|
|
58
|
+
*/
|
|
59
|
+
import { Children, createContext, forwardRef, isValidElement, useCallback, useContext, useMemo, useState } from 'react';
|
|
60
|
+
import { Pressable, StyleSheet, View } from 'react-native';
|
|
61
|
+
import Animated, { interpolate, useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';
|
|
62
|
+
import { tv } from 'tailwind-variants';
|
|
63
|
+
import { useCSSVariable } from 'uniwind';
|
|
64
|
+
import { IconColorProvider } from "../../icons/index.js";
|
|
65
|
+
import { AnimatedPressable } from "../../primitives/animated-pressable.js";
|
|
66
|
+
import { Portal } from "../../primitives/portal.js";
|
|
67
|
+
import { Scrim } from "../../primitives/scrim.js";
|
|
68
|
+
import { Text } from "../../primitives/text.js";
|
|
69
|
+
import { cn } from "../../utils/cn.js";
|
|
70
|
+
import { selectionTick } from "../../utils/haptics.js";
|
|
71
|
+
|
|
72
|
+
/** Which corner the button sits in. */
|
|
73
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
74
|
+
/** How far from the edges a floating button sits, in points. */
|
|
75
|
+
const DEFAULT_OFFSET = 16;
|
|
76
|
+
|
|
77
|
+
/** How long the dial takes to open, and how much each action lags the one above it. */
|
|
78
|
+
const OPEN_DURATION = 220;
|
|
79
|
+
const STAGGER = 45;
|
|
80
|
+
|
|
81
|
+
/** How far an action starts below its resting place, in points. */
|
|
82
|
+
const ACTION_TRAVEL = 12;
|
|
83
|
+
|
|
84
|
+
/** A quarter turn on the trigger while the dial is open — a plus becomes a cross. */
|
|
85
|
+
const OPEN_ROTATION = 45;
|
|
86
|
+
const fabVariants = tv({
|
|
87
|
+
slots: {
|
|
88
|
+
root: 'flex-row items-center justify-center gap-2 rounded-full bg-primary shadow-lg',
|
|
89
|
+
label: 'font-medium text-primary-foreground'
|
|
90
|
+
},
|
|
91
|
+
variants: {
|
|
92
|
+
size: {
|
|
93
|
+
sm: {
|
|
94
|
+
root: 'h-11 min-w-11',
|
|
95
|
+
label: 'text-sm'
|
|
96
|
+
},
|
|
97
|
+
md: {
|
|
98
|
+
root: 'h-14 min-w-14',
|
|
99
|
+
label: 'text-base'
|
|
100
|
+
},
|
|
101
|
+
lg: {
|
|
102
|
+
root: 'h-16 min-w-16',
|
|
103
|
+
label: 'text-lg'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
/* An icon-only button is a circle, so its width is its height and it takes
|
|
107
|
+
no padding. Extended, it is a stadium and the padding is what makes it
|
|
108
|
+
one. */
|
|
109
|
+
extended: {
|
|
110
|
+
true: {},
|
|
111
|
+
false: {}
|
|
112
|
+
},
|
|
113
|
+
variant: {
|
|
114
|
+
primary: {
|
|
115
|
+
root: 'bg-primary',
|
|
116
|
+
label: 'text-primary-foreground'
|
|
117
|
+
},
|
|
118
|
+
secondary: {
|
|
119
|
+
root: 'bg-secondary',
|
|
120
|
+
label: 'text-secondary-foreground'
|
|
121
|
+
},
|
|
122
|
+
surface: {
|
|
123
|
+
root: 'border border-border bg-popover',
|
|
124
|
+
label: 'text-foreground'
|
|
125
|
+
},
|
|
126
|
+
destructive: {
|
|
127
|
+
root: 'bg-destructive',
|
|
128
|
+
label: 'text-white'
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
disabled: {
|
|
132
|
+
true: {
|
|
133
|
+
root: 'opacity-[0.64] shadow-none'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
compoundVariants: [{
|
|
138
|
+
extended: true,
|
|
139
|
+
size: 'sm',
|
|
140
|
+
class: {
|
|
141
|
+
root: 'px-4'
|
|
142
|
+
}
|
|
143
|
+
}, {
|
|
144
|
+
extended: true,
|
|
145
|
+
size: 'md',
|
|
146
|
+
class: {
|
|
147
|
+
root: 'px-5'
|
|
148
|
+
}
|
|
149
|
+
}, {
|
|
150
|
+
extended: true,
|
|
151
|
+
size: 'lg',
|
|
152
|
+
class: {
|
|
153
|
+
root: 'px-6'
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
extended: false,
|
|
157
|
+
size: 'sm',
|
|
158
|
+
class: {
|
|
159
|
+
root: 'w-11'
|
|
160
|
+
}
|
|
161
|
+
}, {
|
|
162
|
+
extended: false,
|
|
163
|
+
size: 'md',
|
|
164
|
+
class: {
|
|
165
|
+
root: 'w-14'
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
extended: false,
|
|
169
|
+
size: 'lg',
|
|
170
|
+
class: {
|
|
171
|
+
root: 'w-16'
|
|
172
|
+
}
|
|
173
|
+
}],
|
|
174
|
+
defaultVariants: {
|
|
175
|
+
size: 'md',
|
|
176
|
+
variant: 'primary',
|
|
177
|
+
extended: false
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
/** How big the button is. */
|
|
182
|
+
|
|
183
|
+
/** What the button is drawn in. */
|
|
184
|
+
|
|
185
|
+
/** The theme token each variant's icon reads against. */
|
|
186
|
+
const CONTENT_COLOR_VAR = {
|
|
187
|
+
primary: '--color-primary-foreground',
|
|
188
|
+
secondary: '--color-secondary-foreground',
|
|
189
|
+
surface: '--color-foreground'
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/** Where a floating button parks itself, given its offset. */
|
|
193
|
+
function anchor(placement, offset) {
|
|
194
|
+
const base = {
|
|
195
|
+
position: 'absolute',
|
|
196
|
+
bottom: offset
|
|
197
|
+
};
|
|
198
|
+
if (placement === 'bottom-left') return {
|
|
199
|
+
...base,
|
|
200
|
+
left: offset
|
|
201
|
+
};
|
|
202
|
+
if (placement === 'bottom-center') return {
|
|
203
|
+
...base,
|
|
204
|
+
alignSelf: 'center'
|
|
205
|
+
};
|
|
206
|
+
return {
|
|
207
|
+
...base,
|
|
208
|
+
right: offset
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* -------------------------------------------------------------------------- *
|
|
213
|
+
* Fab
|
|
214
|
+
* -------------------------------------------------------------------------- */
|
|
215
|
+
|
|
216
|
+
const FabRoot = /*#__PURE__*/forwardRef(({
|
|
217
|
+
className,
|
|
218
|
+
icon,
|
|
219
|
+
children,
|
|
220
|
+
extended = false,
|
|
221
|
+
placement,
|
|
222
|
+
offset = DEFAULT_OFFSET,
|
|
223
|
+
size,
|
|
224
|
+
variant,
|
|
225
|
+
disabled = false,
|
|
226
|
+
haptics = false,
|
|
227
|
+
onPress,
|
|
228
|
+
style,
|
|
229
|
+
...props
|
|
230
|
+
}, ref) => {
|
|
231
|
+
const {
|
|
232
|
+
root,
|
|
233
|
+
label
|
|
234
|
+
} = fabVariants({
|
|
235
|
+
size,
|
|
236
|
+
variant,
|
|
237
|
+
extended: extended && !!children,
|
|
238
|
+
disabled
|
|
239
|
+
});
|
|
240
|
+
const themed = useCSSVariable(CONTENT_COLOR_VAR[variant === 'destructive' ? 'primary' : variant ?? 'primary']);
|
|
241
|
+
const contentColor = variant === 'destructive' ? '#ffffff' : typeof themed === 'string' ? themed : undefined;
|
|
242
|
+
const handlePress = useCallback(() => {
|
|
243
|
+
if (haptics) selectionTick();
|
|
244
|
+
onPress?.();
|
|
245
|
+
}, [haptics, onPress]);
|
|
246
|
+
return /*#__PURE__*/_jsx(IconColorProvider, {
|
|
247
|
+
color: contentColor,
|
|
248
|
+
children: /*#__PURE__*/_jsxs(AnimatedPressable, {
|
|
249
|
+
ref: ref,
|
|
250
|
+
accessibilityRole: "button",
|
|
251
|
+
accessibilityState: {
|
|
252
|
+
disabled
|
|
253
|
+
},
|
|
254
|
+
disabled: disabled,
|
|
255
|
+
onPress: handlePress,
|
|
256
|
+
className: root({
|
|
257
|
+
className
|
|
258
|
+
}),
|
|
259
|
+
style: [placement ? anchor(placement, offset) : null, style],
|
|
260
|
+
...props,
|
|
261
|
+
children: [icon, extended && children ? /*#__PURE__*/_jsx(Text, {
|
|
262
|
+
className: label(),
|
|
263
|
+
children: children
|
|
264
|
+
}) : null]
|
|
265
|
+
})
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
FabRoot.displayName = 'Fab';
|
|
269
|
+
|
|
270
|
+
/* -------------------------------------------------------------------------- *
|
|
271
|
+
* Group — the speed dial
|
|
272
|
+
* -------------------------------------------------------------------------- */
|
|
273
|
+
|
|
274
|
+
const FabGroupContext = /*#__PURE__*/createContext(null);
|
|
275
|
+
function useFabGroup(part) {
|
|
276
|
+
const ctx = useContext(FabGroupContext);
|
|
277
|
+
if (!ctx) throw new Error(`${part} must be used inside <Fab.Group>.`);
|
|
278
|
+
return ctx;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* A trigger with actions behind it.
|
|
282
|
+
*
|
|
283
|
+
* The scrim goes through a portal so it covers the screen rather than the
|
|
284
|
+
* group's own corner of it; the actions do not, because they belong to the
|
|
285
|
+
* button and have to stay above the scrim in the same coordinate space as the
|
|
286
|
+
* trigger they unfold from.
|
|
287
|
+
*/
|
|
288
|
+
const FabGroup = /*#__PURE__*/forwardRef(({
|
|
289
|
+
className,
|
|
290
|
+
icon,
|
|
291
|
+
label,
|
|
292
|
+
children,
|
|
293
|
+
open: openProp,
|
|
294
|
+
onOpenChange,
|
|
295
|
+
placement = 'bottom-right',
|
|
296
|
+
offset = DEFAULT_OFFSET,
|
|
297
|
+
size = 'md',
|
|
298
|
+
variant,
|
|
299
|
+
disabled = false,
|
|
300
|
+
haptics = false,
|
|
301
|
+
blur = false,
|
|
302
|
+
rotateOnOpen = true,
|
|
303
|
+
accessibilityLabel,
|
|
304
|
+
style,
|
|
305
|
+
...props
|
|
306
|
+
}, ref) => {
|
|
307
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
308
|
+
const open = openProp ?? internalOpen;
|
|
309
|
+
const setOpen = useCallback(next => {
|
|
310
|
+
if (openProp === undefined) setInternalOpen(next);
|
|
311
|
+
onOpenChange?.(next);
|
|
312
|
+
}, [openProp, onOpenChange]);
|
|
313
|
+
const actions = Children.toArray(children).filter(isValidElement);
|
|
314
|
+
/*
|
|
315
|
+
* The count, pulled out as a plain number before any worklet sees it.
|
|
316
|
+
*
|
|
317
|
+
* A worklet captures every variable it *references*, whole — so reading
|
|
318
|
+
* `actions.length` inside one would drag the array of React elements onto
|
|
319
|
+
* the UI thread with it, and an element holds a fibre, which cannot be
|
|
320
|
+
* serialised. The error that produces names neither this file nor this
|
|
321
|
+
* line, so: never reach through an object into a worklet.
|
|
322
|
+
*/
|
|
323
|
+
const actionCount = actions.length;
|
|
324
|
+
|
|
325
|
+
/*
|
|
326
|
+
* One shared value for the whole dial rather than one per action.
|
|
327
|
+
*
|
|
328
|
+
* The stagger is a function of the action's index, applied on the UI
|
|
329
|
+
* thread inside each action's own style — so opening is a single timing
|
|
330
|
+
* driving every row, and there is no chain of JavaScript timeouts to get
|
|
331
|
+
* out of step with itself when the dial is closed halfway through opening.
|
|
332
|
+
*/
|
|
333
|
+
const progress = useDerivedValue(() => withTiming(open ? 1 : 0, {
|
|
334
|
+
duration: OPEN_DURATION + STAGGER * actionCount
|
|
335
|
+
}), [open, actionCount]);
|
|
336
|
+
const rotation = useAnimatedStyle(() => ({
|
|
337
|
+
transform: [{
|
|
338
|
+
rotate: `${interpolate(progress.value, [0, 1], [0, OPEN_ROTATION])}deg`
|
|
339
|
+
}]
|
|
340
|
+
}));
|
|
341
|
+
const close = useCallback(() => setOpen(false), [setOpen]);
|
|
342
|
+
const context = useMemo(() => ({
|
|
343
|
+
progress,
|
|
344
|
+
count: actionCount,
|
|
345
|
+
size,
|
|
346
|
+
close
|
|
347
|
+
}), [progress, actionCount, size, close]);
|
|
348
|
+
const toggle = useCallback(() => {
|
|
349
|
+
if (haptics) selectionTick();
|
|
350
|
+
setOpen(!open);
|
|
351
|
+
}, [haptics, open, setOpen]);
|
|
352
|
+
|
|
353
|
+
/*
|
|
354
|
+
* The scrim and the buttons go through the same portal, in that order.
|
|
355
|
+
*
|
|
356
|
+
* They have to travel together. Portalled content is drawn above
|
|
357
|
+
* everything in the ordinary tree, so a portalled scrim over an
|
|
358
|
+
* in-place trigger covers the trigger and its actions — the dial opens
|
|
359
|
+
* and immediately disappears behind its own backdrop. One portal, scrim
|
|
360
|
+
* first, keeps the stacking honest: within it they are siblings, and the
|
|
361
|
+
* later sibling wins.
|
|
362
|
+
*
|
|
363
|
+
* The provider goes inside the portalled subtree for the same reason
|
|
364
|
+
* every other overlay here re-provides its context — the portal renders
|
|
365
|
+
* its children at the host, which is nowhere below this component, so a
|
|
366
|
+
* `Fab.Action` looking for the dial would not find it.
|
|
367
|
+
*
|
|
368
|
+
* One consequence worth knowing: `offset` is measured from the screen's
|
|
369
|
+
* edges rather than from whatever this is written inside. That is what a
|
|
370
|
+
* floating button wants, and it is why a group can be declared next to
|
|
371
|
+
* the content it belongs to instead of at the root of the screen.
|
|
372
|
+
*/
|
|
373
|
+
return /*#__PURE__*/_jsxs(Portal, {
|
|
374
|
+
children: [open ?
|
|
375
|
+
/*#__PURE__*/
|
|
376
|
+
// Catches the tap that closes the dial, and says it is modal.
|
|
377
|
+
_jsx(Pressable, {
|
|
378
|
+
accessibilityRole: "button",
|
|
379
|
+
accessibilityLabel: "Close",
|
|
380
|
+
onPress: close,
|
|
381
|
+
style: StyleSheet.absoluteFill,
|
|
382
|
+
children: /*#__PURE__*/_jsx(Scrim, {
|
|
383
|
+
blur: blur,
|
|
384
|
+
dimClassName: "bg-black/32"
|
|
385
|
+
})
|
|
386
|
+
}) : null, /*#__PURE__*/_jsx(FabGroupContext.Provider, {
|
|
387
|
+
value: context,
|
|
388
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
389
|
+
ref: ref,
|
|
390
|
+
className: cn('items-end gap-3', className),
|
|
391
|
+
style: [anchor(placement, offset), style],
|
|
392
|
+
...props,
|
|
393
|
+
children: [open ? actions.map((action, index) => /*#__PURE__*/_jsx(FabActionSlot, {
|
|
394
|
+
index: index,
|
|
395
|
+
children: action
|
|
396
|
+
}, index)) : null, /*#__PURE__*/_jsx(FabRoot, {
|
|
397
|
+
icon: rotateOnOpen ? /*#__PURE__*/_jsx(Animated.View, {
|
|
398
|
+
style: rotation,
|
|
399
|
+
children: icon
|
|
400
|
+
}) : icon,
|
|
401
|
+
extended: !!label && !open,
|
|
402
|
+
size: size,
|
|
403
|
+
variant: variant,
|
|
404
|
+
disabled: disabled,
|
|
405
|
+
accessibilityLabel: accessibilityLabel,
|
|
406
|
+
accessibilityState: {
|
|
407
|
+
disabled,
|
|
408
|
+
expanded: open
|
|
409
|
+
},
|
|
410
|
+
onPress: toggle,
|
|
411
|
+
children: label
|
|
412
|
+
})]
|
|
413
|
+
})
|
|
414
|
+
})]
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
FabGroup.displayName = 'Fab.Group';
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* One action's slot in the unfolding.
|
|
421
|
+
*
|
|
422
|
+
* The stagger runs bottom-up: the action nearest the trigger arrives first,
|
|
423
|
+
* which is the order a hand travelling away from the button meets them in.
|
|
424
|
+
*/
|
|
425
|
+
function FabActionSlot({
|
|
426
|
+
index,
|
|
427
|
+
children
|
|
428
|
+
}) {
|
|
429
|
+
const {
|
|
430
|
+
progress,
|
|
431
|
+
count
|
|
432
|
+
} = useFabGroup('Fab.Action');
|
|
433
|
+
const style = useAnimatedStyle(() => {
|
|
434
|
+
const steps = Math.max(1, count);
|
|
435
|
+
const from = (count - 1 - index) / (steps + 1);
|
|
436
|
+
const to = from + 1 / (steps + 1) + 0.35;
|
|
437
|
+
const t = interpolate(progress.value, [from, Math.min(1, to)], [0, 1], 'clamp');
|
|
438
|
+
return {
|
|
439
|
+
opacity: t,
|
|
440
|
+
transform: [{
|
|
441
|
+
translateY: interpolate(t, [0, 1], [ACTION_TRAVEL, 0])
|
|
442
|
+
}]
|
|
443
|
+
};
|
|
444
|
+
});
|
|
445
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
446
|
+
style: style,
|
|
447
|
+
children: children
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* -------------------------------------------------------------------------- *
|
|
452
|
+
* Action
|
|
453
|
+
* -------------------------------------------------------------------------- */
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* One choice in an open dial: a small round button with its name beside it.
|
|
457
|
+
*
|
|
458
|
+
* The label is a chip of its own rather than text on the background, because
|
|
459
|
+
* the background is whatever the screen behind the scrim happens to be and
|
|
460
|
+
* plain text over it is legible on some screens and not others.
|
|
461
|
+
*
|
|
462
|
+
* Pressing one closes the dial before running the action. Leaving it open over
|
|
463
|
+
* whatever the action just did is the wrong default: the dial is a menu, and a
|
|
464
|
+
* menu that stays up after a choice reads as the choice not having registered.
|
|
465
|
+
*/
|
|
466
|
+
const FabAction = /*#__PURE__*/forwardRef(({
|
|
467
|
+
className,
|
|
468
|
+
icon,
|
|
469
|
+
label,
|
|
470
|
+
onPress,
|
|
471
|
+
disabled = false,
|
|
472
|
+
destructive = false,
|
|
473
|
+
labelClassName,
|
|
474
|
+
...props
|
|
475
|
+
}, ref) => {
|
|
476
|
+
const {
|
|
477
|
+
size,
|
|
478
|
+
close
|
|
479
|
+
} = useFabGroup('Fab.Action');
|
|
480
|
+
const handlePress = useCallback(() => {
|
|
481
|
+
close();
|
|
482
|
+
onPress?.();
|
|
483
|
+
}, [close, onPress]);
|
|
484
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
485
|
+
className: "flex-row items-center justify-end gap-3",
|
|
486
|
+
...props,
|
|
487
|
+
children: [label ? /*#__PURE__*/_jsx(View, {
|
|
488
|
+
className: "rounded-lg bg-popover px-2.5 py-1 shadow-sm",
|
|
489
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
490
|
+
size: "sm",
|
|
491
|
+
className: cn('text-foreground', labelClassName),
|
|
492
|
+
children: label
|
|
493
|
+
})
|
|
494
|
+
}) : null, /*#__PURE__*/_jsx(FabRoot, {
|
|
495
|
+
ref: ref,
|
|
496
|
+
icon: icon
|
|
497
|
+
// A step down from the trigger, so the trigger stays the one that
|
|
498
|
+
// leads even while the dial it opened is on screen.
|
|
499
|
+
,
|
|
500
|
+
size: size === 'lg' ? 'md' : 'sm',
|
|
501
|
+
variant: destructive ? 'destructive' : 'surface',
|
|
502
|
+
disabled: disabled,
|
|
503
|
+
accessibilityLabel: label,
|
|
504
|
+
onPress: handlePress,
|
|
505
|
+
className: className
|
|
506
|
+
})]
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
FabAction.displayName = 'Fab.Action';
|
|
510
|
+
export const Fab = Object.assign(FabRoot, {
|
|
511
|
+
Group: FabGroup,
|
|
512
|
+
Action: FabAction
|
|
513
|
+
});
|
|
514
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Children","createContext","forwardRef","isValidElement","useCallback","useContext","useMemo","useState","Pressable","StyleSheet","View","Animated","interpolate","useAnimatedStyle","useDerivedValue","withTiming","tv","useCSSVariable","IconColorProvider","AnimatedPressable","Portal","Scrim","Text","cn","selectionTick","jsx","_jsx","jsxs","_jsxs","DEFAULT_OFFSET","OPEN_DURATION","STAGGER","ACTION_TRAVEL","OPEN_ROTATION","fabVariants","slots","root","label","variants","size","sm","md","lg","extended","true","false","variant","primary","secondary","surface","destructive","disabled","compoundVariants","class","defaultVariants","CONTENT_COLOR_VAR","anchor","placement","offset","base","position","bottom","left","alignSelf","right","FabRoot","className","icon","children","haptics","onPress","style","props","ref","themed","contentColor","undefined","handlePress","color","accessibilityRole","accessibilityState","displayName","FabGroupContext","useFabGroup","part","ctx","Error","FabGroup","open","openProp","onOpenChange","blur","rotateOnOpen","accessibilityLabel","internalOpen","setInternalOpen","setOpen","next","actions","toArray","filter","actionCount","length","progress","duration","rotation","transform","rotate","value","close","context","count","toggle","absoluteFill","dimClassName","Provider","map","action","index","FabActionSlot","expanded","steps","Math","max","from","to","t","min","opacity","translateY","FabAction","labelClassName","Fab","Object","assign","Group","Action"],"sourceRoot":"../../../../src","sources":["components/fab/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;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,aAAa,EACbC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,OAAO,EACPC,QAAQ,QAEH,OAAO;AACd,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAwB,cAAc;AAC1E,OAAOC,QAAQ,IACbC,WAAW,EACXC,gBAAgB,EAChBC,eAAe,EACfC,UAAU,QAEL,yBAAyB;AAChC,SAASC,EAAE,QAA2B,mBAAmB;AACzD,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,iBAAiB,QAAQ,sBAAa;AAC/C,SAASC,iBAAiB,QAAQ,wCAAqC;AACvE,SAASC,MAAM,QAAQ,4BAAyB;AAChD,SAASC,KAAK,QAAQ,2BAAwB;AAC9C,SAASC,IAAI,QAAQ,0BAAuB;AAC5C,SAASC,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