panelui-native 0.46.0 → 0.51.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/README.md +12 -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/date-time-picker/index.js +23 -5
- package/lib/module/components/date-time-picker/index.js.map +1 -1
- package/lib/module/components/fab/index.js +514 -0
- package/lib/module/components/fab/index.js.map +1 -0
- 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/questionnaire/index.js +1312 -0
- package/lib/module/components/questionnaire/index.js.map +1 -0
- package/lib/module/components/sortable/index.js +806 -0
- package/lib/module/components/sortable/index.js.map +1 -0
- package/lib/module/components/swipe/index.js +140 -5
- package/lib/module/components/swipe/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +94 -18
- 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 +246 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +8 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/haptics.js +19 -0
- package/lib/module/utils/haptics.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/date-time-picker/index.d.ts +7 -1
- package/lib/typescript/src/components/date-time-picker/index.d.ts.map +1 -1
- 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/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/questionnaire/index.d.ts +336 -0
- package/lib/typescript/src/components/questionnaire/index.d.ts.map +1 -0
- package/lib/typescript/src/components/sortable/index.d.ts +238 -0
- package/lib/typescript/src/components/sortable/index.d.ts.map +1 -0
- package/lib/typescript/src/components/swipe/index.d.ts +35 -0
- package/lib/typescript/src/components/swipe/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts +9 -0
- 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 +30 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +10 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/haptics.d.ts +14 -0
- package/lib/typescript/src/utils/haptics.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/date-time-picker/index.tsx +39 -3
- package/src/components/fab/index.tsx +583 -0
- package/src/components/markdown-editor/index.tsx +526 -0
- package/src/components/markdown-editor/markdown-transforms.ts +228 -0
- package/src/components/questionnaire/index.tsx +1615 -0
- package/src/components/sortable/index.tsx +1080 -0
- package/src/components/swipe/index.tsx +165 -3
- package/src/components/tabs/index.tsx +100 -28
- package/src/components/time-picker/index.tsx +42 -6
- package/src/components/tree/index.tsx +564 -0
- package/src/icons/index.tsx +176 -0
- package/src/index.ts +89 -1
- package/src/utils/haptics.ts +21 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tree — a hierarchy you can open a level at a time.
|
|
5
|
+
*
|
|
6
|
+
* The shape behind a file browser, a folder of settings, a category picker, a
|
|
7
|
+
* table of contents: rows that contain other rows, where a parent's children
|
|
8
|
+
* only exist on screen once you ask for them. Accordion is the one-level
|
|
9
|
+
* version of this and stops there — its items cannot hold items. A tree's can,
|
|
10
|
+
* to any depth, and everything that follows from that is what this component
|
|
11
|
+
* owns: which node a row sits under, how far in it is drawn, whether it is a
|
|
12
|
+
* branch at all, and which of its ancestors are open.
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Tree defaultExpanded={['src']} selectionMode="single">
|
|
16
|
+
* <Tree.Item value="src">
|
|
17
|
+
* <Tree.Trigger>
|
|
18
|
+
* <Tree.Indicator />
|
|
19
|
+
* <Tree.Label>src</Tree.Label>
|
|
20
|
+
* </Tree.Trigger>
|
|
21
|
+
* <Tree.Group>
|
|
22
|
+
* <Tree.Item value="src/index.ts">
|
|
23
|
+
* <Tree.Trigger>
|
|
24
|
+
* <Tree.Indicator />
|
|
25
|
+
* <Tree.Label>index.ts</Tree.Label>
|
|
26
|
+
* </Tree.Trigger>
|
|
27
|
+
* </Tree.Item>
|
|
28
|
+
* </Tree.Group>
|
|
29
|
+
* </Tree.Item>
|
|
30
|
+
* </Tree>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* A closed branch renders nothing below it — the subtree is unmounted, not
|
|
34
|
+
* hidden — so the cost of a tree is what is open in it rather than what is in
|
|
35
|
+
* it. A folder of ten thousand files that nobody has opened costs one row.
|
|
36
|
+
*
|
|
37
|
+
* An item is a branch because it holds a `Tree.Group`, not because it was
|
|
38
|
+
* declared one, so there is no second fact to keep true. The exception is a
|
|
39
|
+
* branch whose children have not been fetched yet: it has no group to be
|
|
40
|
+
* detected by, so it says `hasChildren` and gets its chevron, and the fetch
|
|
41
|
+
* hangs off `onExpandedChange`.
|
|
42
|
+
*
|
|
43
|
+
* Expansion and selection are separate pieces of state because they answer
|
|
44
|
+
* separate questions — which parts of the hierarchy are open, and which row is
|
|
45
|
+
* the chosen one — and a tree commonly needs one without the other. Either can
|
|
46
|
+
* be controlled or left alone.
|
|
47
|
+
*/
|
|
48
|
+
import { Children, createContext, forwardRef, isValidElement, useCallback, useContext, useMemo, useState } from 'react';
|
|
49
|
+
import { Pressable, View } from 'react-native';
|
|
50
|
+
import Animated, { LinearTransition, useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';
|
|
51
|
+
import { tv } from 'tailwind-variants';
|
|
52
|
+
import { useCSSVariable } from 'uniwind';
|
|
53
|
+
import { ChevronRightIcon, IconColorProvider } from "../../icons/index.js";
|
|
54
|
+
import { useDirection } from "../../hooks/use-direction.js";
|
|
55
|
+
import { Text } from "../../primitives/text.js";
|
|
56
|
+
|
|
57
|
+
/** `none` makes the rows expanders only — nothing is ever the chosen one. */
|
|
58
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
59
|
+
/** How far one level is drawn in from its parent, in points. */
|
|
60
|
+
const DEFAULT_INDENT = 16;
|
|
61
|
+
|
|
62
|
+
/** Matches the disclosure and layout timings the rest of the library uses. */
|
|
63
|
+
const TRANSITION_DURATION = 200;
|
|
64
|
+
const treeVariants = tv({
|
|
65
|
+
slots: {
|
|
66
|
+
root: 'w-full',
|
|
67
|
+
item: '',
|
|
68
|
+
trigger: 'flex-row items-center gap-2 rounded-lg',
|
|
69
|
+
indicator: 'items-center justify-center',
|
|
70
|
+
icon: 'items-center justify-center',
|
|
71
|
+
label: 'flex-1 text-foreground',
|
|
72
|
+
actions: 'flex-row items-center gap-1',
|
|
73
|
+
// The colour is set unconditionally and the width is not: `showLines` puts
|
|
74
|
+
// a border on the start edge, and a colour with no width draws nothing.
|
|
75
|
+
group: 'border-border'
|
|
76
|
+
},
|
|
77
|
+
variants: {
|
|
78
|
+
size: {
|
|
79
|
+
sm: {
|
|
80
|
+
trigger: 'px-1.5 py-1',
|
|
81
|
+
indicator: 'h-4 w-4',
|
|
82
|
+
icon: 'h-4 w-4',
|
|
83
|
+
label: 'text-xs'
|
|
84
|
+
},
|
|
85
|
+
default: {
|
|
86
|
+
trigger: 'px-2 py-1.5',
|
|
87
|
+
indicator: 'h-5 w-5',
|
|
88
|
+
icon: 'h-5 w-5',
|
|
89
|
+
label: 'text-sm'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
isSelected: {
|
|
93
|
+
true: {
|
|
94
|
+
trigger: 'bg-accent',
|
|
95
|
+
label: 'font-medium text-accent-foreground'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
isDisabled: {
|
|
99
|
+
true: {
|
|
100
|
+
trigger: 'opacity-50'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
defaultVariants: {
|
|
105
|
+
size: 'default'
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
const TreeContext = /*#__PURE__*/createContext(null);
|
|
109
|
+
const TreeItemContext = /*#__PURE__*/createContext(null);
|
|
110
|
+
function useTree(component) {
|
|
111
|
+
const context = useContext(TreeContext);
|
|
112
|
+
if (!context) throw new Error(`${component} must be used within a <Tree>`);
|
|
113
|
+
return context;
|
|
114
|
+
}
|
|
115
|
+
function useTreeItem(component) {
|
|
116
|
+
const context = useContext(TreeItemContext);
|
|
117
|
+
if (!context) throw new Error(`${component} must be used within a <Tree.Item>`);
|
|
118
|
+
return context;
|
|
119
|
+
}
|
|
120
|
+
const toArray = value => value === undefined ? [] : Array.isArray(value) ? value : [value];
|
|
121
|
+
const TreeRoot = /*#__PURE__*/forwardRef(({
|
|
122
|
+
className,
|
|
123
|
+
size = 'default',
|
|
124
|
+
selectionMode = 'none',
|
|
125
|
+
value,
|
|
126
|
+
defaultValue,
|
|
127
|
+
onValueChange,
|
|
128
|
+
expanded,
|
|
129
|
+
defaultExpanded,
|
|
130
|
+
onExpandedChange,
|
|
131
|
+
expandOnPress = true,
|
|
132
|
+
showLines = false,
|
|
133
|
+
indent = DEFAULT_INDENT,
|
|
134
|
+
children,
|
|
135
|
+
...props
|
|
136
|
+
}, ref) => {
|
|
137
|
+
const [internalExpanded, setInternalExpanded] = useState(() => defaultExpanded ?? []);
|
|
138
|
+
const isExpandedControlled = expanded !== undefined;
|
|
139
|
+
const expandedValues = isExpandedControlled ? expanded : internalExpanded;
|
|
140
|
+
const [internalSelected, setInternalSelected] = useState(() => toArray(defaultValue));
|
|
141
|
+
const isSelectionControlled = value !== undefined;
|
|
142
|
+
const selected = isSelectionControlled ? toArray(value) : internalSelected;
|
|
143
|
+
const toggleExpanded = useCallback(itemValue => {
|
|
144
|
+
const next = expandedValues.includes(itemValue) ? expandedValues.filter(entry => entry !== itemValue) : [...expandedValues, itemValue];
|
|
145
|
+
if (!isExpandedControlled) setInternalExpanded(next);
|
|
146
|
+
onExpandedChange?.(next);
|
|
147
|
+
}, [expandedValues, isExpandedControlled, onExpandedChange]);
|
|
148
|
+
const select = useCallback(itemValue => {
|
|
149
|
+
if (selectionMode === 'none') return;
|
|
150
|
+
const next = selectionMode === 'single' ? [itemValue] : selected.includes(itemValue) ? selected.filter(entry => entry !== itemValue) : [...selected, itemValue];
|
|
151
|
+
if (!isSelectionControlled) setInternalSelected(next);
|
|
152
|
+
// Hand back the shape the caller gave us, as Accordion does.
|
|
153
|
+
onValueChange?.(selectionMode === 'single' ? next[0] ?? '' : next);
|
|
154
|
+
}, [selected, selectionMode, isSelectionControlled, onValueChange]);
|
|
155
|
+
const context = useMemo(() => ({
|
|
156
|
+
expanded: expandedValues,
|
|
157
|
+
toggleExpanded,
|
|
158
|
+
selected,
|
|
159
|
+
select,
|
|
160
|
+
selectionMode,
|
|
161
|
+
expandOnPress,
|
|
162
|
+
showLines,
|
|
163
|
+
indent,
|
|
164
|
+
size
|
|
165
|
+
}), [expandedValues, toggleExpanded, selected, select, selectionMode, expandOnPress, showLines, indent, size]);
|
|
166
|
+
const {
|
|
167
|
+
root
|
|
168
|
+
} = treeVariants({
|
|
169
|
+
size
|
|
170
|
+
});
|
|
171
|
+
return /*#__PURE__*/_jsx(TreeContext.Provider, {
|
|
172
|
+
value: context,
|
|
173
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
174
|
+
ref: ref,
|
|
175
|
+
layout: LinearTransition.duration(TRANSITION_DURATION),
|
|
176
|
+
accessibilityRole: "list",
|
|
177
|
+
className: root({
|
|
178
|
+
className
|
|
179
|
+
}),
|
|
180
|
+
...props,
|
|
181
|
+
children: children
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
TreeRoot.displayName = 'Tree';
|
|
186
|
+
/**
|
|
187
|
+
* One node. Whether it is a branch or a leaf is read off its children rather
|
|
188
|
+
* than declared: an item holding a `Tree.Group` is a branch, and anything else
|
|
189
|
+
* is a leaf that renders a chevron-sized gap in place of the chevron so its
|
|
190
|
+
* label still lines up with its siblings'.
|
|
191
|
+
*/
|
|
192
|
+
const TreeItem = /*#__PURE__*/forwardRef(({
|
|
193
|
+
className,
|
|
194
|
+
value,
|
|
195
|
+
isDisabled = false,
|
|
196
|
+
hasChildren,
|
|
197
|
+
children,
|
|
198
|
+
...props
|
|
199
|
+
}, ref) => {
|
|
200
|
+
const {
|
|
201
|
+
expanded,
|
|
202
|
+
selected
|
|
203
|
+
} = useTree('Tree.Item');
|
|
204
|
+
const parent = useContext(TreeItemContext);
|
|
205
|
+
const {
|
|
206
|
+
item
|
|
207
|
+
} = treeVariants();
|
|
208
|
+
const isBranch = hasChildren ?? Children.toArray(children).some(child => /*#__PURE__*/isValidElement(child) && child.type === TreeGroup);
|
|
209
|
+
const context = useMemo(() => ({
|
|
210
|
+
value,
|
|
211
|
+
level: parent ? parent.level + 1 : 0,
|
|
212
|
+
isExpanded: expanded.includes(value),
|
|
213
|
+
isSelected: selected.includes(value),
|
|
214
|
+
isDisabled,
|
|
215
|
+
isBranch
|
|
216
|
+
}), [value, parent, expanded, selected, isDisabled, isBranch]);
|
|
217
|
+
return /*#__PURE__*/_jsx(TreeItemContext.Provider, {
|
|
218
|
+
value: context,
|
|
219
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
220
|
+
ref: ref,
|
|
221
|
+
layout: LinearTransition.duration(TRANSITION_DURATION),
|
|
222
|
+
className: item({
|
|
223
|
+
className
|
|
224
|
+
}),
|
|
225
|
+
...props,
|
|
226
|
+
children: children
|
|
227
|
+
})
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
TreeItem.displayName = 'Tree.Item';
|
|
231
|
+
/**
|
|
232
|
+
* The node's row: everything you see on one line, and the thing you press.
|
|
233
|
+
*
|
|
234
|
+
* `aria-level` is set from the item's depth, but the role stays `button`.
|
|
235
|
+
* React Native has no tree role that any platform screen reader implements, so
|
|
236
|
+
* announcing the row as what it behaves like — a button that opens something,
|
|
237
|
+
* with its expanded and selected state attached — is the description that
|
|
238
|
+
* actually survives to the user.
|
|
239
|
+
*/
|
|
240
|
+
const TreeTrigger = /*#__PURE__*/forwardRef(({
|
|
241
|
+
className,
|
|
242
|
+
onPress,
|
|
243
|
+
children,
|
|
244
|
+
...props
|
|
245
|
+
}, ref) => {
|
|
246
|
+
const {
|
|
247
|
+
toggleExpanded,
|
|
248
|
+
select,
|
|
249
|
+
selectionMode,
|
|
250
|
+
expandOnPress,
|
|
251
|
+
size
|
|
252
|
+
} = useTree('Tree.Trigger');
|
|
253
|
+
const {
|
|
254
|
+
value,
|
|
255
|
+
level,
|
|
256
|
+
isExpanded,
|
|
257
|
+
isSelected,
|
|
258
|
+
isDisabled,
|
|
259
|
+
isBranch
|
|
260
|
+
} = useTreeItem('Tree.Trigger');
|
|
261
|
+
const {
|
|
262
|
+
trigger
|
|
263
|
+
} = treeVariants({
|
|
264
|
+
size,
|
|
265
|
+
isSelected,
|
|
266
|
+
isDisabled
|
|
267
|
+
});
|
|
268
|
+
const accentForeground = useCSSVariable('--color-accent-foreground');
|
|
269
|
+
const selectedColor = typeof accentForeground === 'string' ? accentForeground : undefined;
|
|
270
|
+
const handlePress = () => {
|
|
271
|
+
if (isBranch && expandOnPress) toggleExpanded(value);
|
|
272
|
+
select(value);
|
|
273
|
+
onPress?.();
|
|
274
|
+
};
|
|
275
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
276
|
+
ref: ref,
|
|
277
|
+
accessibilityRole: "button",
|
|
278
|
+
accessibilityState: {
|
|
279
|
+
expanded: isBranch ? isExpanded : undefined,
|
|
280
|
+
selected: selectionMode === 'none' ? undefined : isSelected,
|
|
281
|
+
disabled: isDisabled
|
|
282
|
+
},
|
|
283
|
+
"aria-level": level + 1,
|
|
284
|
+
disabled: isDisabled,
|
|
285
|
+
onPress: handlePress,
|
|
286
|
+
className: trigger({
|
|
287
|
+
className
|
|
288
|
+
}),
|
|
289
|
+
...props,
|
|
290
|
+
children: /*#__PURE__*/_jsx(IconColorProvider, {
|
|
291
|
+
color: isSelected ? selectedColor : undefined,
|
|
292
|
+
children: children
|
|
293
|
+
})
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
TreeTrigger.displayName = 'Tree.Trigger';
|
|
297
|
+
/**
|
|
298
|
+
* The chevron, and the second way to open a branch.
|
|
299
|
+
*
|
|
300
|
+
* It is pressable in its own right, and because a press is consumed by the
|
|
301
|
+
* innermost target that handles it, hitting the chevron opens the branch
|
|
302
|
+
* without also selecting the row — which is the only way to look inside a
|
|
303
|
+
* folder without choosing it when `expandOnPress` is off.
|
|
304
|
+
*
|
|
305
|
+
* On a leaf it becomes an empty box of the same size rather than disappearing,
|
|
306
|
+
* so a leaf's label starts where its siblings' labels do.
|
|
307
|
+
*/
|
|
308
|
+
const TreeIndicator = /*#__PURE__*/forwardRef(({
|
|
309
|
+
className,
|
|
310
|
+
children,
|
|
311
|
+
...props
|
|
312
|
+
}, ref) => {
|
|
313
|
+
const {
|
|
314
|
+
toggleExpanded,
|
|
315
|
+
size
|
|
316
|
+
} = useTree('Tree.Indicator');
|
|
317
|
+
const {
|
|
318
|
+
value,
|
|
319
|
+
isExpanded,
|
|
320
|
+
isDisabled,
|
|
321
|
+
isBranch
|
|
322
|
+
} = useTreeItem('Tree.Indicator');
|
|
323
|
+
const {
|
|
324
|
+
indicator
|
|
325
|
+
} = treeVariants({
|
|
326
|
+
size
|
|
327
|
+
});
|
|
328
|
+
const direction = useDirection();
|
|
329
|
+
|
|
330
|
+
/*
|
|
331
|
+
* The glyph already points along the reading direction — it is drawn
|
|
332
|
+
* mirrored in a right-to-left subtree — so the quarter turn that makes it
|
|
333
|
+
* point downwards has to follow it round, or an open branch in Arabic
|
|
334
|
+
* would have its chevron pointing at the ceiling.
|
|
335
|
+
*/
|
|
336
|
+
const openRotation = direction === 'rtl' ? -90 : 90;
|
|
337
|
+
const rotation = useDerivedValue(() => withTiming(isExpanded ? openRotation : 0, {
|
|
338
|
+
duration: TRANSITION_DURATION
|
|
339
|
+
}), [isExpanded, openRotation]);
|
|
340
|
+
const rotationStyle = useAnimatedStyle(() => ({
|
|
341
|
+
transform: [{
|
|
342
|
+
rotate: `${rotation.value}deg`
|
|
343
|
+
}]
|
|
344
|
+
}));
|
|
345
|
+
|
|
346
|
+
// After the hooks, never before them: a leaf still runs every one of them.
|
|
347
|
+
if (!isBranch) {
|
|
348
|
+
return /*#__PURE__*/_jsx(View, {
|
|
349
|
+
ref: ref,
|
|
350
|
+
className: indicator({
|
|
351
|
+
className
|
|
352
|
+
}),
|
|
353
|
+
...props
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
357
|
+
ref: ref,
|
|
358
|
+
accessibilityRole: "button",
|
|
359
|
+
accessibilityState: {
|
|
360
|
+
expanded: isExpanded,
|
|
361
|
+
disabled: isDisabled
|
|
362
|
+
},
|
|
363
|
+
disabled: isDisabled,
|
|
364
|
+
onPress: () => toggleExpanded(value),
|
|
365
|
+
className: indicator({
|
|
366
|
+
className
|
|
367
|
+
}),
|
|
368
|
+
...props,
|
|
369
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
370
|
+
style: rotationStyle,
|
|
371
|
+
children: children ?? /*#__PURE__*/_jsx(ChevronRightIcon, {
|
|
372
|
+
size: size === 'sm' ? 14 : 16
|
|
373
|
+
})
|
|
374
|
+
})
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
TreeIndicator.displayName = 'Tree.Indicator';
|
|
378
|
+
/** The leading glyph, between the chevron and the label. */
|
|
379
|
+
const TreeIcon = /*#__PURE__*/forwardRef(({
|
|
380
|
+
className,
|
|
381
|
+
...props
|
|
382
|
+
}, ref) => {
|
|
383
|
+
const {
|
|
384
|
+
size
|
|
385
|
+
} = useTree('Tree.Icon');
|
|
386
|
+
const {
|
|
387
|
+
icon
|
|
388
|
+
} = treeVariants({
|
|
389
|
+
size
|
|
390
|
+
});
|
|
391
|
+
return /*#__PURE__*/_jsx(View, {
|
|
392
|
+
ref: ref,
|
|
393
|
+
className: icon({
|
|
394
|
+
className
|
|
395
|
+
}),
|
|
396
|
+
...props
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
TreeIcon.displayName = 'Tree.Icon';
|
|
400
|
+
|
|
401
|
+
/** The row's text. Takes the selected colour with the rest of the row. */
|
|
402
|
+
const TreeLabel = /*#__PURE__*/forwardRef(({
|
|
403
|
+
className,
|
|
404
|
+
...props
|
|
405
|
+
}, ref) => {
|
|
406
|
+
const {
|
|
407
|
+
size
|
|
408
|
+
} = useTree('Tree.Label');
|
|
409
|
+
const {
|
|
410
|
+
isSelected
|
|
411
|
+
} = useTreeItem('Tree.Label');
|
|
412
|
+
const {
|
|
413
|
+
label
|
|
414
|
+
} = treeVariants({
|
|
415
|
+
size,
|
|
416
|
+
isSelected
|
|
417
|
+
});
|
|
418
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
419
|
+
ref: ref,
|
|
420
|
+
numberOfLines: 1,
|
|
421
|
+
className: label({
|
|
422
|
+
className
|
|
423
|
+
}),
|
|
424
|
+
...props
|
|
425
|
+
});
|
|
426
|
+
});
|
|
427
|
+
TreeLabel.displayName = 'Tree.Label';
|
|
428
|
+
/** The trailing slot: a count, a badge, a menu button for the node. */
|
|
429
|
+
const TreeActions = /*#__PURE__*/forwardRef(({
|
|
430
|
+
className,
|
|
431
|
+
...props
|
|
432
|
+
}, ref) => {
|
|
433
|
+
const {
|
|
434
|
+
actions
|
|
435
|
+
} = treeVariants();
|
|
436
|
+
return /*#__PURE__*/_jsx(View, {
|
|
437
|
+
ref: ref,
|
|
438
|
+
className: actions({
|
|
439
|
+
className
|
|
440
|
+
}),
|
|
441
|
+
...props
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
TreeActions.displayName = 'Tree.Actions';
|
|
445
|
+
/**
|
|
446
|
+
* The rows inside a branch, and the reason its item is a branch at all.
|
|
447
|
+
*
|
|
448
|
+
* It unmounts when the branch is closed, so a subtree nobody has opened has
|
|
449
|
+
* never rendered and a tree costs what is open in it rather than what is in it.
|
|
450
|
+
* The item's layout transition animates the height the group's rows take up,
|
|
451
|
+
* the same way `Accordion` animates a panel.
|
|
452
|
+
*
|
|
453
|
+
* The indent is `paddingStart`, not `paddingLeft`, and the guide line is a
|
|
454
|
+
* start-edge border: an indent that always fell on the left would run the wrong
|
|
455
|
+
* way in a right-to-left subtree and put every level further from its parent.
|
|
456
|
+
*/
|
|
457
|
+
const TreeGroup = /*#__PURE__*/forwardRef(({
|
|
458
|
+
className,
|
|
459
|
+
children,
|
|
460
|
+
...props
|
|
461
|
+
}, ref) => {
|
|
462
|
+
const {
|
|
463
|
+
showLines,
|
|
464
|
+
indent
|
|
465
|
+
} = useTree('Tree.Group');
|
|
466
|
+
const {
|
|
467
|
+
isExpanded
|
|
468
|
+
} = useTreeItem('Tree.Group');
|
|
469
|
+
const {
|
|
470
|
+
group
|
|
471
|
+
} = treeVariants();
|
|
472
|
+
if (!isExpanded) return null;
|
|
473
|
+
return /*#__PURE__*/_jsx(View, {
|
|
474
|
+
ref: ref,
|
|
475
|
+
style: {
|
|
476
|
+
// Split in half when there is a line to put between the halves, so a
|
|
477
|
+
// level is indented by the same amount either way and the hairline
|
|
478
|
+
// lands midway rather than adding a step of its own.
|
|
479
|
+
marginStart: showLines ? indent / 2 : 0,
|
|
480
|
+
paddingStart: showLines ? indent / 2 : indent,
|
|
481
|
+
borderStartWidth: showLines ? 1 : 0
|
|
482
|
+
},
|
|
483
|
+
className: group({
|
|
484
|
+
className
|
|
485
|
+
}),
|
|
486
|
+
...props,
|
|
487
|
+
children: children
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
TreeGroup.displayName = 'Tree.Group';
|
|
491
|
+
export const Tree = Object.assign(TreeRoot, {
|
|
492
|
+
Item: TreeItem,
|
|
493
|
+
Trigger: TreeTrigger,
|
|
494
|
+
Indicator: TreeIndicator,
|
|
495
|
+
Icon: TreeIcon,
|
|
496
|
+
Label: TreeLabel,
|
|
497
|
+
Actions: TreeActions,
|
|
498
|
+
Group: TreeGroup
|
|
499
|
+
});
|
|
500
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Children","createContext","forwardRef","isValidElement","useCallback","useContext","useMemo","useState","Pressable","View","Animated","LinearTransition","useAnimatedStyle","useDerivedValue","withTiming","tv","useCSSVariable","ChevronRightIcon","IconColorProvider","useDirection","Text","jsx","_jsx","DEFAULT_INDENT","TRANSITION_DURATION","treeVariants","slots","root","item","trigger","indicator","icon","label","actions","group","variants","size","sm","default","isSelected","true","isDisabled","defaultVariants","TreeContext","TreeItemContext","useTree","component","context","Error","useTreeItem","toArray","value","undefined","Array","isArray","TreeRoot","className","selectionMode","defaultValue","onValueChange","expanded","defaultExpanded","onExpandedChange","expandOnPress","showLines","indent","children","props","ref","internalExpanded","setInternalExpanded","isExpandedControlled","expandedValues","internalSelected","setInternalSelected","isSelectionControlled","selected","toggleExpanded","itemValue","next","includes","filter","entry","select","Provider","layout","duration","accessibilityRole","displayName","TreeItem","hasChildren","parent","isBranch","some","child","type","TreeGroup","level","isExpanded","TreeTrigger","onPress","accentForeground","selectedColor","handlePress","accessibilityState","disabled","color","TreeIndicator","direction","openRotation","rotation","rotationStyle","transform","rotate","style","TreeIcon","TreeLabel","numberOfLines","TreeActions","marginStart","paddingStart","borderStartWidth","Tree","Object","assign","Item","Trigger","Indicator","Icon","Label","Actions","Group"],"sourceRoot":"../../../../src","sources":["components/tree/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,SACEA,QAAQ,EACRC,aAAa,EACbC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,OAAO,EACPC,QAAQ,QAEH,OAAO;AACd,SAASC,SAAS,EAAEC,IAAI,QAA6C,cAAc;AACnF,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,UAAU,QACL,yBAAyB;AAChC,SAASC,EAAE,QAAQ,mBAAmB;AACtC,SAASC,cAAc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