panelui-native 0.9.0 → 0.12.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 +5 -3
- package/lib/module/components/bottom-sheet/index.js +38 -2
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/button/index.js +19 -1
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/frame/index.js +128 -15
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/input/index.js +107 -15
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/popover/index.js +22 -11
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/progress/index.js +52 -2
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js +34 -7
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/section-rail/index.js +355 -0
- package/lib/module/components/section-rail/index.js.map +1 -0
- package/lib/module/components/select/index.js +245 -56
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/slider/index.js +355 -0
- package/lib/module/components/slider/index.js.map +1 -0
- package/lib/module/components/switch/index.js +10 -1
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +186 -16
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js +297 -0
- package/lib/module/components/toggle-button/index.js.map +1 -0
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-keyboard-avoidance.js +57 -8
- package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
- package/lib/module/hooks/use-scroll-sections.js +89 -0
- package/lib/module/hooks/use-scroll-sections.js.map +1 -0
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/index.js.map +1 -1
- package/lib/module/primitives/keyboard-avoider.js +2 -0
- package/lib/module/primitives/keyboard-avoider.js.map +1 -1
- package/lib/module/utils/haptics.js +57 -0
- package/lib/module/utils/haptics.js.map +1 -0
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +9 -4
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/frame/index.d.ts +47 -7
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts +113 -2
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/popover/index.d.ts +7 -1
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress/index.d.ts +33 -0
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radio-group/index.d.ts +7 -0
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/section-rail/index.d.ts +115 -0
- package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -0
- package/lib/typescript/src/components/select/index.d.ts +46 -7
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/index.d.ts +203 -0
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts +46 -4
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts +244 -0
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +10 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts +31 -0
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/index.d.ts +16 -1
- package/lib/typescript/src/native/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts +8 -1
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
- package/lib/typescript/src/utils/haptics.d.ts +12 -0
- package/lib/typescript/src/utils/haptics.d.ts.map +1 -0
- package/package.json +5 -1
- package/src/components/bottom-sheet/index.tsx +38 -2
- package/src/components/button/index.tsx +26 -5
- package/src/components/frame/index.tsx +175 -29
- package/src/components/input/index.tsx +122 -16
- package/src/components/popover/index.tsx +49 -24
- package/src/components/progress/index.tsx +81 -1
- package/src/components/radio-group/index.tsx +55 -8
- package/src/components/section-rail/index.tsx +459 -0
- package/src/components/select/index.tsx +265 -52
- package/src/components/slider/index.tsx +371 -0
- package/src/components/switch/index.tsx +8 -1
- package/src/components/tabs/index.tsx +208 -28
- package/src/components/toggle-button/index.tsx +374 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-keyboard-avoidance.ts +73 -7
- package/src/hooks/use-scroll-sections.ts +127 -0
- package/src/index.ts +37 -6
- package/src/native/index.ts +13 -1
- package/src/primitives/keyboard-avoider.tsx +9 -1
- package/src/utils/haptics.ts +63 -0
- package/theme.css +6 -2
- package/lib/module/components/inline-select/index.js +0 -284
- package/lib/module/components/inline-select/index.js.map +0 -1
- package/lib/typescript/src/components/inline-select/index.d.ts +0 -48
- package/lib/typescript/src/components/inline-select/index.d.ts.map +0 -1
- package/src/components/inline-select/index.tsx +0 -332
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
* </Animated.View>
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
import { useCallback } from 'react';
|
|
36
|
+
import { useCallback, useEffect } from 'react';
|
|
37
37
|
import { useWindowDimensions } from 'react-native';
|
|
38
|
-
import { useAnimatedKeyboard, useAnimatedRef, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
38
|
+
import { measure, useAnimatedKeyboard, useAnimatedReaction, useAnimatedRef, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
39
39
|
/**
|
|
40
40
|
* Resolved once, at module load, so the hook below always calls the same
|
|
41
41
|
* underlying hook — swapping between them per render would break the rules of
|
|
@@ -73,6 +73,7 @@ export function hasKeyboardController() {
|
|
|
73
73
|
}
|
|
74
74
|
export function useKeyboardAvoidance({
|
|
75
75
|
enabled = true,
|
|
76
|
+
active = true,
|
|
76
77
|
offset = 16
|
|
77
78
|
} = {}) {
|
|
78
79
|
const ref = useAnimatedRef();
|
|
@@ -83,20 +84,68 @@ export function useKeyboardAvoidance({
|
|
|
83
84
|
|
|
84
85
|
/** Window-space bottom edge of the element with no translation applied. */
|
|
85
86
|
const restingBottom = useSharedValue(0);
|
|
86
|
-
|
|
87
|
+
|
|
88
|
+
// `active` is a plain prop and the reaction below is a worklet, so it is
|
|
89
|
+
// mirrored rather than closed over — written in an effect, because touching
|
|
90
|
+
// a shared value during render is a Reanimated strict-mode violation.
|
|
91
|
+
const isActive = useSharedValue(active && enabled);
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
isActive.value = active && enabled;
|
|
94
|
+
}, [active, enabled, isActive]);
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* The resting position is taken the moment this element becomes the one that
|
|
98
|
+
* should move, on the UI thread, rather than once at layout time.
|
|
99
|
+
*
|
|
100
|
+
* Measuring at layout is wrong in two ways that both show up as "avoidance
|
|
101
|
+
* does nothing". A field inside an overlay is laid out before the overlay
|
|
102
|
+
* knows where it goes — it is parked off-screen at that point, so the stored
|
|
103
|
+
* position is a large negative number that is nonetheless non-zero, and the
|
|
104
|
+
* arithmetic below happily concludes there is no overlap. And a field that
|
|
105
|
+
* has scrolled since it was laid out is measured where it used to be.
|
|
106
|
+
*
|
|
107
|
+
* Keying off "active and the keyboard is up" rather than off the keyboard
|
|
108
|
+
* alone matters for the second field you tap: moving straight from one field
|
|
109
|
+
* to another never closes the keyboard, so there is no opening to react to,
|
|
110
|
+
* and a hook watching only the keyboard would never measure it.
|
|
111
|
+
*
|
|
112
|
+
* At the instant it becomes active the element has no translation applied,
|
|
113
|
+
* so what is measured then is the honest resting position.
|
|
114
|
+
*/
|
|
115
|
+
useAnimatedReaction(() => isActive.value && Math.abs(rawHeight.value) > 0, (shouldLift, wasLifting) => {
|
|
116
|
+
if (shouldLift === wasLifting) return;
|
|
117
|
+
if (!shouldLift) {
|
|
118
|
+
// Forget it, so the next time round measures wherever the element has
|
|
119
|
+
// got to in the meantime.
|
|
120
|
+
restingBottom.value = 0;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const frame = measure(ref);
|
|
124
|
+
if (frame && frame.height > 0 && frame.pageY >= 0) {
|
|
125
|
+
restingBottom.value = frame.pageY + frame.height;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const seed = useCallback(() => {
|
|
129
|
+
// Skipped only when a position is already known and the keyboard is up —
|
|
130
|
+
// the element is lifted then, and this would store the lifted position as
|
|
131
|
+
// the resting one. With no position yet there is no translation to undo,
|
|
132
|
+
// so measuring is safe whatever the keyboard is doing.
|
|
133
|
+
if (restingBottom.value !== 0 && Math.abs(rawHeight.value) > 0) return;
|
|
87
134
|
ref.current?.measureInWindow((_x, y, _width, height) => {
|
|
88
|
-
if (height > 0) restingBottom.value = y + height;
|
|
135
|
+
if (height > 0 && y >= 0) restingBottom.value = y + height;
|
|
89
136
|
});
|
|
90
|
-
}, [ref, restingBottom]);
|
|
137
|
+
}, [ref, rawHeight, restingBottom]);
|
|
91
138
|
const onLayout = useCallback(_event => {
|
|
139
|
+
// Covers the case the reaction above cannot: a keyboard that is already
|
|
140
|
+
// up when this element mounts, where there is no transition to react to.
|
|
92
141
|
// measureInWindow is only meaningful once the view is attached and
|
|
93
142
|
// positioned, which is a frame later than onLayout on both platforms.
|
|
94
|
-
requestAnimationFrame(
|
|
95
|
-
}, [
|
|
143
|
+
requestAnimationFrame(seed);
|
|
144
|
+
}, [seed]);
|
|
96
145
|
const animatedStyle = useAnimatedStyle(() => {
|
|
97
146
|
// Both sources are normalised to a positive height here.
|
|
98
147
|
const keyboardHeight = Math.abs(rawHeight.value);
|
|
99
|
-
if (!
|
|
148
|
+
if (!isActive.value || keyboardHeight === 0 || restingBottom.value === 0) {
|
|
100
149
|
return {
|
|
101
150
|
transform: [{
|
|
102
151
|
translateY: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWindowDimensions","useAnimatedKeyboard","useAnimatedRef","useAnimatedStyle","useSharedValue","useKeyboardHeight","controller","require","useReanimatedKeyboardAnimation","height","hasKeyboardController","useKeyboardAvoidance","enabled","offset","ref","rawHeight","screenHeight","restingBottom","
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useWindowDimensions","measure","useAnimatedKeyboard","useAnimatedReaction","useAnimatedRef","useAnimatedStyle","useSharedValue","useKeyboardHeight","controller","require","useReanimatedKeyboardAnimation","height","hasKeyboardController","useKeyboardAvoidance","enabled","active","offset","ref","rawHeight","screenHeight","restingBottom","isActive","value","Math","abs","shouldLift","wasLifting","frame","pageY","seed","current","measureInWindow","_x","y","_width","onLayout","_event","requestAnimationFrame","animatedStyle","keyboardHeight","transform","translateY","keyboardTop","overlap"],"sourceRoot":"../../../src","sources":["hooks/use-keyboard-avoidance.ts"],"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,SAASA,WAAW,EAAEC,SAAS,QAAQ,OAAO;AAC9C,SAASC,mBAAmB,QAA2C,cAAc;AACrF,SACEC,OAAO,EACPC,mBAAmB,EACnBC,mBAAmB,EACnBC,cAAc,EACdC,gBAAgB,EAChBC,cAAc,QAGT,yBAAyB;AA6BhC;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAqC,GAAG,CAAC,MAAM;EACnD,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M;IAC3C;IACA,MAAMkC,cAAc,GAAGhB,IAAI,CAACC,GAAG,CAACN,SAAS,CAACI,KAAK,CAAC;IAEhD,IAAI,CAACD,QAAQ,CAACC,KAAK,IAAIiB,cAAc,KAAK,CAAC,IAAInB,aAAa,CAACE,KAAK,KAAK,CAAC,EAAE;MACxE,OAAO;QAAEkB,SAAS,EAAE,CAAC;UAAEC,UAAU,EAAE;QAAE,CAAC;MAAE,CAAC;IAC3C;IAEA,MAAMC,WAAW,GAAGvB,YAAY,GAAGoB,cAAc;IACjD,MAAMI,OAAO,GAAGvB,aAAa,CAACE,KAAK,GAAGN,MAAM,GAAG0B,WAAW;IAE1D,OAAO;MAAEF,SAAS,EAAE,CAAC;QAAEC,UAAU,EAAEE,OAAO,GAAG,CAAC,GAAG,CAACA,OAAO,GAAG;MAAE,CAAC;IAAE,CAAC;EACpE,CAAC,CAAC;EAEF,OAAO;IAAE1B,GAAG;IAAEkB,QAAQ;IAAEG;EAAc,CAAC;AACzC","ignoreList":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* useScrollSections — tracks which section of a scroll view you are reading.
|
|
5
|
+
*
|
|
6
|
+
* The active section is the last one whose top has passed a reading line a
|
|
7
|
+
* little way down the viewport, so the heading you have just scrolled past
|
|
8
|
+
* still counts as the one you are in.
|
|
9
|
+
*
|
|
10
|
+
* That rule alone has a hole at the end, and it is the hole every hand-rolled
|
|
11
|
+
* scrollspy has: the final section's top may never reach the reading line,
|
|
12
|
+
* because the content runs out first. Its bar then only lights up if you
|
|
13
|
+
* over-scroll past the bottom. So being at the bottom of the scroll view is
|
|
14
|
+
* treated as being in the last section outright — there is no more scrolling
|
|
15
|
+
* left with which to get there.
|
|
16
|
+
*
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const sections = useScrollSections({ ids: SECTIONS.map((s) => s.id) });
|
|
19
|
+
*
|
|
20
|
+
* <ScrollView ref={sections.ref} {...sections.scrollProps}>
|
|
21
|
+
* {SECTIONS.map((section) => (
|
|
22
|
+
* <View key={section.id} onLayout={sections.measure(section.id)}>…</View>
|
|
23
|
+
* ))}
|
|
24
|
+
* </ScrollView>
|
|
25
|
+
*
|
|
26
|
+
* <SectionRail value={sections.active} onValueChange={sections.scrollTo}>…</SectionRail>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
30
|
+
export function useScrollSections({
|
|
31
|
+
ids,
|
|
32
|
+
offset = 120,
|
|
33
|
+
endThreshold = 24,
|
|
34
|
+
scrollPadding = 0
|
|
35
|
+
}) {
|
|
36
|
+
const ref = useRef(null);
|
|
37
|
+
const offsets = useRef({});
|
|
38
|
+
const [active, setActive] = useState(ids[0]);
|
|
39
|
+
|
|
40
|
+
// Read inside the scroll handler, which must not be re-created on every
|
|
41
|
+
// render — a new handler each frame would defeat the throttle.
|
|
42
|
+
const idsRef = useRef(ids);
|
|
43
|
+
idsRef.current = ids;
|
|
44
|
+
const measure = useCallback(id => event => {
|
|
45
|
+
offsets.current[id] = event.nativeEvent.layout.y;
|
|
46
|
+
}, []);
|
|
47
|
+
const onScroll = useCallback(event => {
|
|
48
|
+
const {
|
|
49
|
+
contentOffset,
|
|
50
|
+
layoutMeasurement,
|
|
51
|
+
contentSize
|
|
52
|
+
} = event.nativeEvent;
|
|
53
|
+
const list = idsRef.current;
|
|
54
|
+
if (!list.length) return;
|
|
55
|
+
const atEnd = contentOffset.y + layoutMeasurement.height >= contentSize.height - endThreshold;
|
|
56
|
+
if (atEnd) {
|
|
57
|
+
setActive(list[list.length - 1]);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const line = contentOffset.y + offset;
|
|
61
|
+
let current = list[0];
|
|
62
|
+
for (const id of list) {
|
|
63
|
+
const top = offsets.current[id];
|
|
64
|
+
if (top !== undefined && top <= line) current = id;
|
|
65
|
+
}
|
|
66
|
+
setActive(current);
|
|
67
|
+
}, [offset, endThreshold]);
|
|
68
|
+
const scrollTo = useCallback(id => {
|
|
69
|
+
const top = offsets.current[id];
|
|
70
|
+
if (top === undefined) return;
|
|
71
|
+
setActive(id);
|
|
72
|
+
ref.current?.scrollTo({
|
|
73
|
+
y: Math.max(top - scrollPadding, 0),
|
|
74
|
+
animated: true
|
|
75
|
+
});
|
|
76
|
+
}, [scrollPadding]);
|
|
77
|
+
const scrollProps = useMemo(() => ({
|
|
78
|
+
onScroll,
|
|
79
|
+
scrollEventThrottle: 16
|
|
80
|
+
}), [onScroll]);
|
|
81
|
+
return {
|
|
82
|
+
ref,
|
|
83
|
+
active,
|
|
84
|
+
scrollProps,
|
|
85
|
+
measure,
|
|
86
|
+
scrollTo
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=use-scroll-sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","useRef","useState","useScrollSections","ids","offset","endThreshold","scrollPadding","ref","offsets","active","setActive","idsRef","current","measure","id","event","nativeEvent","layout","y","onScroll","contentOffset","layoutMeasurement","contentSize","list","length","atEnd","height","line","top","undefined","scrollTo","Math","max","animated","scrollProps","scrollEventThrottle"],"sourceRoot":"../../../src","sources":["hooks/use-scroll-sections.ts"],"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,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAsC9D,OAAO,SAASC,iBAAiBA,CAAC;EAChCC,GAAG;EACHC,MAAM,GAAG,GAAG;EACZC,YAAY,GAAG,EAAE;EACjBC,aAAa,GAAG;AACQ,CAAC,EAA2B;EACpD,MAAMC,GAAG,GAAGP,MAAM,CAAoB,IAAI,CAAC;EAC3C,MAAMQ,OAAO,GAAGR,MAA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,MAAM,EAAEC,YAAY,CACvB,CAAC;EAED,MAAMyB,QAAQ,GAAGhC,WAAW,CACzBgB,EAAU,IAAK;IACd,MAAMc,GAAG,GAAGpB,OAAO,CAACI,OAAO,CAACE,EAAE,CAAC;IAC/B,IAAIc,GAAG,KAAKC,SAAS,EAAE;IACvBnB,SAAS,CAACI,EAAE,CAAC;IACbP,GAAG,CAACK,OAAO,EAAEkB,QAAQ,CAAC;MAAEZ,CAAC,EAAEa,IAAI,CAACC,GAAG,CAACJ,GAAG,GAAGtB,aAAa,EAAE,CAAC,CAAC;MAAE2B,QAAQ,EAAE;IAAK,CAAC,CAAC;EAChF,CAAC,EACD,CAAC3B,aAAa,CAChB,CAAC;EAED,MAAM4B,WAAW,GAAGnC,OAAO,CACzB,OAAO;IAAEoB,QAAQ;IAAEgB,mBAAmB,EAAE;EAAG,CAAC,CAAC,EAC7C,CAAChB,QAAQ,CACX,CAAC;EAED,OAAO;IAAEZ,GAAG;IAAEE,MAAM;IAAEyB,WAAW;IAAErB,OAAO;IAAEiB;EAAS,CAAC;AACxD","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { AnimatedPressable } from "./primitives/animated-pressable.js";
|
|
|
14
14
|
|
|
15
15
|
// Native UI bridge
|
|
16
16
|
export { hasNativeUI } from "./native/index.js";
|
|
17
|
+
export { hasHaptics, selectionTick } from "./utils/haptics.js";
|
|
17
18
|
|
|
18
19
|
// Components
|
|
19
20
|
export { Accordion } from "./components/accordion/index.js";
|
|
@@ -23,10 +24,11 @@ export { Attachment } from "./components/attachment/index.js";
|
|
|
23
24
|
export { Badge } from "./components/badge/index.js";
|
|
24
25
|
export { BottomSheet } from "./components/bottom-sheet/index.js";
|
|
25
26
|
export { Button } from "./components/button/index.js";
|
|
27
|
+
export { ToggleButton, ToggleButtonGroup, useToggleButton } from "./components/toggle-button/index.js";
|
|
26
28
|
export { Dialog } from "./components/dialog/index.js";
|
|
27
29
|
export { Frame } from "./components/frame/index.js";
|
|
28
|
-
export { InlineSelect } from "./components/inline-select/index.js";
|
|
29
30
|
export { Select } from "./components/select/index.js";
|
|
31
|
+
export { SectionRail } from "./components/section-rail/index.js";
|
|
30
32
|
export { Tabs } from "./components/tabs/index.js";
|
|
31
33
|
export { Card } from "./components/card/index.js";
|
|
32
34
|
export { Checkbox } from "./components/checkbox/index.js";
|
|
@@ -46,6 +48,7 @@ export { ScrollFade } from "./components/scroll-fade/index.js";
|
|
|
46
48
|
export { Separator } from "./components/separator/index.js";
|
|
47
49
|
export { Shimmer } from "./components/shimmer/index.js";
|
|
48
50
|
export { Skeleton } from "./components/skeleton/index.js";
|
|
51
|
+
export { Slider } from "./components/slider/index.js";
|
|
49
52
|
export { Spinner } from "./components/spinner/index.js";
|
|
50
53
|
export { Steps } from "./components/steps/index.js";
|
|
51
54
|
export { Surface } from "./components/surface/index.js";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PanelUIProvider","useTheme","useThemeMode","PANEL_THEMES","PANEL_THEME_NAMES","PANEL_EXTRA_THEMES","Portal","PortalHost","PortalProvider","Text","KeyboardAvoider","AnimatedPressable","hasNativeUI","Accordion","Alert","Avatar","Attachment","Badge","BottomSheet","Button","Dialog","Frame","
|
|
1
|
+
{"version":3,"names":["PanelUIProvider","useTheme","useThemeMode","PANEL_THEMES","PANEL_THEME_NAMES","PANEL_EXTRA_THEMES","Portal","PortalHost","PortalProvider","Text","KeyboardAvoider","AnimatedPressable","hasNativeUI","hasHaptics","selectionTick","Accordion","Alert","Avatar","Attachment","Badge","BottomSheet","Button","ToggleButton","ToggleButtonGroup","useToggleButton","Dialog","Frame","Select","SectionRail","Tabs","Card","Checkbox","EmptyState","Input","InputGroup","Item","Label","LineChart","useLineChart","Marker","MessageScroller","useMessageScroller","useMessageScrollerVisibility","Message","Popover","Progress","RadioGroup","ScrollFade","Separator","Shimmer","Skeleton","Slider","Spinner","Steps","Surface","Switch","Timeline","Toast","ToastViewport","toast","useToast","Typography","AlertTriangleIcon","AppleIcon","ArrowUpRightIcon","BellIcon","CardIcon","CheckCircleIcon","CheckIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","FacebookIcon","FileIcon","GoogleIcon","IconColorProvider","InfoIcon","ImageIcon","MoonIcon","PackageIcon","PaperclipIcon","PlusSquareIcon","ReceiptIcon","SearchIcon","SendIcon","ShareNodesIcon","ShieldAlertIcon","ShieldCheckIcon","SunIcon","XIcon","useIconColor","cn"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,SAASA,eAAe,QAAmC,kCAA+B;;AAE1F;AACA,SACEC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,iBAAiB,EACjBC,kBAAkB,QAKb,sBAAmB;;AAE1B;AACA,SAASC,MAAM,EAAEC,UAAU,EAAEC,cAAc,QAAQ,wBAAqB;AACxE,SAASC,IAAI,QAAwB,sBAAmB;AACxD,SACEC,eAAe,QAEV,kCAA+B;AACtC,SACEC,iBAAiB,QAEZ,oCAAiC;;AAExC;AACA,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,UAAU,EAAEC,aAAa,QAAQ,oBAAiB;;AAE3D;AACA,SACEC,SAAS,QAQJ,iCAAwB;AAC/B,SACEC,KAAK,QAGA,6BAAoB;AAC3B,SACEC,MAAM,QAGD,8BAAqB;AAC5B,SACEC,UAAU,QAUL,kCAAyB;AAChC,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,WAAW,QAGN,oCAA2B;AAClC,SAASC,MAAM,QAA0B,8BAAqB;AAC9D,SACEC,YAAY,EACZC,iBAAiB,EACjBC,eAAe,QAOV,qCAA4B;AACnC,SACEC,MAAM,QAGD,8BAAqB;AAC5B,SACEC,KAAK,QAOA,6BAAoB;AAC3B,SACEC,MAAM,QAID,8BAAqB;AAC5B,SACEC,WAAW,QAQN,oCAA2B;AAClC,SACEC,IAAI,QAKC,4BAAmB;AAC1B,SAASC,IAAI,QAA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C,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,OAAO,EACPC,KAAK,EACLC,YAAY,QAEP,kBAAS;;AAEhB;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASC,EAAE,QAAQ,eAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","resolved","module","getNativeUI","OS","require","hasNativeUI"],"sourceRoot":"../../../src","sources":["native/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["Platform","resolved","module","getNativeUI","OS","require","hasNativeUI"],"sourceRoot":"../../../src","sources":["native/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;AAwCvC,IAAIC,QAAQ,GAAG,KAAK;AACpB,IAAIC,MAA6B,GAAG,IAAI;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAA,EAA0B;EACnD,IAAIF,QAAQ,EAAE,OAAOC,MAAM;EAC3BD,QAAQ,GAAG,IAAI;;EAEf;EACA;EACA,IAAID,QAAQ,CAACI,EAAE,KAAK,KAAK,EAAE,OAAO,IAAI;EAEtC,IAAI;IACF;IACAF,MAAM,GAAGG,OAAO,CAAC,UAAU,CAAmB;EAChD,CAAC,CAAC,MAAM;IACNH,MAAM,GAAG,IAAI;EACf;EAEA,OAAOA,MAAM;AACf;;AAEA;AACA,OAAO,SAASI,WAAWA,CAAA,EAAY;EACrC,OAAOH,WAAW,CAAC,CAAC,KAAK,IAAI;AAC/B","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
export function KeyboardAvoider({
|
|
15
15
|
className,
|
|
16
16
|
enabled = true,
|
|
17
|
+
active = true,
|
|
17
18
|
offset = 16,
|
|
18
19
|
children,
|
|
19
20
|
style,
|
|
@@ -22,6 +23,7 @@ export function KeyboardAvoider({
|
|
|
22
23
|
}) {
|
|
23
24
|
const avoidance = useKeyboardAvoidance({
|
|
24
25
|
enabled,
|
|
26
|
+
active,
|
|
25
27
|
offset
|
|
26
28
|
});
|
|
27
29
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Animated","useKeyboardAvoidance","jsx","_jsx","KeyboardAvoider","className","enabled","offset","children","style","onLayout","props","avoidance","View","ref","event","animatedStyle","displayName"],"sourceRoot":"../../../src","sources":["primitives/keyboard-avoider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,oBAAoB,QAAQ,oCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["Animated","useKeyboardAvoidance","jsx","_jsx","KeyboardAvoider","className","enabled","active","offset","children","style","onLayout","props","avoidance","View","ref","event","animatedStyle","displayName"],"sourceRoot":"../../../src","sources":["primitives/keyboard-avoider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,oBAAoB,QAAQ,oCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAkBvE,OAAO,SAASC,eAAeA,CAAC;EAC9BC,SAAS;EACTC,OAAO,GAAG,IAAI;EACdC,MAAM,GAAG,IAAI;EACbC,MAAM,GAAG,EAAE;EACXC,QAAQ;EACRC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACiB,CAAC,EAAE;EACvB,MAAMC,SAAS,GAAGZ,oBAAoB,CAAC;IAAEK,OAAO;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC;EAEnE,oBACEL,IAAA,CAACH,QAAQ,CAACc,IAAI;IAAA,GACRF,KAAK;IACTG,GAAG,EAAEF,SAAS,CAACE,GAAI;IACnBJ,QAAQ,EAAGK,KAAK,IAAK;MACnBH,SAAS,CAACF,QAAQ,CAACK,KAAK,CAAC;MACzBL,QAAQ,GAAGK,KAAK,CAAC;IACnB,CAAE;IACFX,SAAS,EAAEA,SAAU;IACrBK,KAAK,EAAE,CAACA,KAAK,EAAEG,SAAS,CAACI,aAAa,CAAE;IAAAR,QAAA,EAEvCA;EAAQ,CACI,CAAC;AAEpB;AAEAL,eAAe,CAACc,WAAW,GAAG,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Optional bridge to the platform's haptic engine.
|
|
5
|
+
*
|
|
6
|
+
* A tick under the finger is the difference between a control that responds
|
|
7
|
+
* and one that merely updates — but it is also the kind of thing that has to
|
|
8
|
+
* be free to ignore. `expo-haptics` is resolved lazily and every caller falls
|
|
9
|
+
* back to doing nothing, so a component with `haptics` set is silent rather
|
|
10
|
+
* than broken when the package is absent.
|
|
11
|
+
*
|
|
12
|
+
* ```sh
|
|
13
|
+
* npx expo install expo-haptics
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import { Platform } from 'react-native';
|
|
17
|
+
let resolved = false;
|
|
18
|
+
let module = null;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The haptics module, or null when it is not installed or the platform has no
|
|
22
|
+
* engine behind it. Resolved once and cached — a failed require is not retried
|
|
23
|
+
* on every keystroke.
|
|
24
|
+
*/
|
|
25
|
+
function getHaptics() {
|
|
26
|
+
if (resolved) return module;
|
|
27
|
+
resolved = true;
|
|
28
|
+
|
|
29
|
+
// Web has no haptic engine; the Vibration API is a different thing and a
|
|
30
|
+
// worse one — a buzz where a tick was meant.
|
|
31
|
+
if (Platform.OS === 'web') return null;
|
|
32
|
+
try {
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
34
|
+
module = require('expo-haptics');
|
|
35
|
+
} catch {
|
|
36
|
+
module = null;
|
|
37
|
+
}
|
|
38
|
+
return module;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Whether a haptic will actually be felt. */
|
|
42
|
+
export function hasHaptics() {
|
|
43
|
+
return getHaptics() !== null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The light tick for moving between options — a segmented control, a picker,
|
|
48
|
+
* a section marker. Deliberately not an impact: selection is the lightest of
|
|
49
|
+
* the feedbacks, and anything heavier gets tiring when it fires on scroll.
|
|
50
|
+
*
|
|
51
|
+
* Fire-and-forget. A rejected haptic is not worth an unhandled rejection, and
|
|
52
|
+
* there is nothing useful to do about one.
|
|
53
|
+
*/
|
|
54
|
+
export function selectionTick() {
|
|
55
|
+
void getHaptics()?.selectionAsync().catch(() => {});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=haptics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","resolved","module","getHaptics","OS","require","hasHaptics","selectionTick","selectionAsync","catch"],"sourceRoot":"../../../src","sources":["utils/haptics.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;AAQvC,IAAIC,QAAQ,GAAG,KAAK;AACpB,IAAIC,MAA4B,GAAG,IAAI;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAA,EAAyB;EAC1C,IAAIF,QAAQ,EAAE,OAAOC,MAAM;EAC3BD,QAAQ,GAAG,IAAI;;EAEf;EACA;EACA,IAAID,QAAQ,CAACI,EAAE,KAAK,KAAK,EAAE,OAAO,IAAI;EAEtC,IAAI;IACF;IACAF,MAAM,GAAGG,OAAO,CAAC,cAAc,CAAkB;EACnD,CAAC,CAAC,MAAM;IACNH,MAAM,GAAG,IAAI;EACf;EAEA,OAAOA,MAAM;AACf;;AAEA;AACA,OAAO,SAASI,UAAUA,CAAA,EAAY;EACpC,OAAOH,UAAU,CAAC,CAAC,KAAK,IAAI;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,aAAaA,CAAA,EAAS;EACpC,KAAKJ,UAAU,CAAC,CAAC,EAAEK,cAAc,CAAC,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAuCpF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAC9E;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAw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AW;;;CAGtB,CAAC"}
|
|
@@ -215,10 +215,15 @@ export interface ButtonProps extends Omit<AnimatedPressableProps, 'children' | '
|
|
|
215
215
|
* optional `@expo/ui` package; without it this prop does nothing.
|
|
216
216
|
*
|
|
217
217
|
* **Theme tokens do not apply** — the platform draws the button, so
|
|
218
|
-
* `className`, `
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
218
|
+
* `className`, `fullWidth`, `startContent`, `endContent` and `loading` are
|
|
219
|
+
* all ignored. `variant` maps onto the nearest platform style:
|
|
220
|
+
* `primary`/`destructive` → filled, `outline` → outlined, everything else
|
|
221
|
+
* → text; `size` sets the height.
|
|
222
|
+
*
|
|
223
|
+
* A native button **fills the width it is given**, because the host is told
|
|
224
|
+
* its size rather than left to measure the platform's content — which is
|
|
225
|
+
* what made it collapse and then jump on first press. Put it in a row to
|
|
226
|
+
* share the width, or in a narrower parent to shrink it.
|
|
222
227
|
*/
|
|
223
228
|
native?: boolean;
|
|
224
229
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wCAAqC,CAAC;AAM7C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiCd,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAA7E,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAA7E,6EAA6E;;;;;;;;;;;;;;;;;;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AQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,UAAU,CAAC,EAC3D,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,wCAAwC;IACxC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA+BD,eAAO,MAAM,MAAM,8FA4FlB,CAAC"}
|
|
@@ -15,18 +15,30 @@
|
|
|
15
15
|
* </Frame.Header>
|
|
16
16
|
* <Frame.Panel>
|
|
17
17
|
* <Frame.Row>…</Frame.Row>
|
|
18
|
-
* <Frame.Row
|
|
18
|
+
* <Frame.Row>…</Frame.Row>
|
|
19
19
|
* </Frame.Panel>
|
|
20
20
|
* <Frame.Footer>Updated 2 minutes ago</Frame.Footer>
|
|
21
21
|
* </Frame>
|
|
22
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* The panel draws the hairlines between its own rows. React Native has no
|
|
25
|
+
* `:first-child`, so the alternative is every caller writing
|
|
26
|
+
* `divided={index > 0}` on every row and getting it wrong once.
|
|
23
27
|
*/
|
|
24
28
|
import { type ReactNode } from 'react';
|
|
25
|
-
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
29
|
+
import { View, type PressableProps, type Text as RNText, type ViewProps } from 'react-native';
|
|
26
30
|
import { type TextProps } from '../../primitives/text.js';
|
|
31
|
+
export type FrameVariant = 'default' | 'plain';
|
|
27
32
|
export interface FrameProps extends ViewProps {
|
|
28
33
|
className?: string;
|
|
29
34
|
}
|
|
35
|
+
export interface FrameRootProps extends FrameProps {
|
|
36
|
+
/**
|
|
37
|
+
* `plain` drops the outer shell so the panel is the widget — for a Frame
|
|
38
|
+
* inside a container that already draws its own border.
|
|
39
|
+
*/
|
|
40
|
+
variant?: FrameVariant;
|
|
41
|
+
}
|
|
30
42
|
export interface FrameHeaderProps extends FrameProps {
|
|
31
43
|
children?: ReactNode;
|
|
32
44
|
}
|
|
@@ -34,22 +46,50 @@ export interface FrameActionProps extends FrameProps {
|
|
|
34
46
|
children?: ReactNode;
|
|
35
47
|
}
|
|
36
48
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
49
|
+
* Marks the parts that take part in the panel's own divider bookkeeping —
|
|
50
|
+
* a Row draws a line above itself, a Section draws one above its heading.
|
|
51
|
+
* Anything else the panel is given is left alone.
|
|
39
52
|
*/
|
|
40
|
-
|
|
53
|
+
interface Dividable {
|
|
54
|
+
divided?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface FramePanelProps extends FrameProps {
|
|
57
|
+
/**
|
|
58
|
+
* Set false to place the hairlines by hand instead — for a panel whose rows
|
|
59
|
+
* are generated somewhere the divider order is not obvious.
|
|
60
|
+
*/
|
|
61
|
+
dividers?: boolean;
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
export interface FrameRowProps extends Omit<PressableProps, 'children'>, Dividable {
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Draw a hairline above this row. `Frame.Panel` sets it for you; pass it
|
|
68
|
+
* explicitly to override the panel's decision either way.
|
|
69
|
+
*/
|
|
70
|
+
divided?: boolean;
|
|
71
|
+
/** Trailing chevron marking the row as leading somewhere. */
|
|
72
|
+
chevron?: boolean;
|
|
73
|
+
children?: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
export interface FrameSectionProps extends FrameProps, Dividable {
|
|
76
|
+
/** Heading above the rows. Strings are wrapped for you. */
|
|
77
|
+
title?: ReactNode;
|
|
41
78
|
divided?: boolean;
|
|
79
|
+
children?: ReactNode;
|
|
42
80
|
}
|
|
43
81
|
export interface FrameFooterProps extends FrameProps {
|
|
44
82
|
children?: ReactNode;
|
|
45
83
|
}
|
|
46
|
-
export declare const Frame: import("react").ForwardRefExoticComponent<
|
|
84
|
+
export declare const Frame: import("react").ForwardRefExoticComponent<FrameRootProps & import("react").RefAttributes<View>> & {
|
|
47
85
|
Header: import("react").ForwardRefExoticComponent<FrameHeaderProps & import("react").RefAttributes<View>>;
|
|
48
86
|
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
49
87
|
Action: import("react").ForwardRefExoticComponent<FrameActionProps & import("react").RefAttributes<View>>;
|
|
50
88
|
Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
51
|
-
Panel: import("react").ForwardRefExoticComponent<
|
|
89
|
+
Panel: import("react").ForwardRefExoticComponent<FramePanelProps & import("react").RefAttributes<View>>;
|
|
90
|
+
Section: import("react").ForwardRefExoticComponent<FrameSectionProps & import("react").RefAttributes<View>>;
|
|
52
91
|
Row: import("react").ForwardRefExoticComponent<FrameRowProps & import("react").RefAttributes<View>>;
|
|
53
92
|
Footer: import("react").ForwardRefExoticComponent<FrameFooterProps & import("react").RefAttributes<View>>;
|
|
54
93
|
};
|
|
94
|
+
export {};
|
|
55
95
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/frame/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/frame/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAEL,IAAI,EACJ,KAAK,cAAc,EACnB,KAAK,IAAI,IAAI,MAAM,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,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"}
|
|
@@ -1,16 +1,126 @@
|
|
|
1
1
|
import { TextInput, type TextInputProps } from 'react-native';
|
|
2
|
-
|
|
2
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
3
|
+
declare const inputVariants: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
outline: {
|
|
6
|
+
field: string;
|
|
7
|
+
};
|
|
8
|
+
filled: {
|
|
9
|
+
field: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
sm: {
|
|
14
|
+
field: string;
|
|
15
|
+
};
|
|
16
|
+
md: {
|
|
17
|
+
field: string;
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
field: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
multiline: {
|
|
24
|
+
true: {
|
|
25
|
+
field: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
true: {
|
|
30
|
+
field: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
container: string;
|
|
35
|
+
field: string;
|
|
36
|
+
description: string;
|
|
37
|
+
error: string;
|
|
38
|
+
}, undefined, {
|
|
39
|
+
variant: {
|
|
40
|
+
outline: {
|
|
41
|
+
field: string;
|
|
42
|
+
};
|
|
43
|
+
filled: {
|
|
44
|
+
field: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
size: {
|
|
48
|
+
sm: {
|
|
49
|
+
field: string;
|
|
50
|
+
};
|
|
51
|
+
md: {
|
|
52
|
+
field: string;
|
|
53
|
+
};
|
|
54
|
+
lg: {
|
|
55
|
+
field: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
multiline: {
|
|
59
|
+
true: {
|
|
60
|
+
field: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
disabled: {
|
|
64
|
+
true: {
|
|
65
|
+
field: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
container: string;
|
|
70
|
+
field: string;
|
|
71
|
+
description: string;
|
|
72
|
+
error: string;
|
|
73
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
74
|
+
variant: {
|
|
75
|
+
outline: {
|
|
76
|
+
field: string;
|
|
77
|
+
};
|
|
78
|
+
filled: {
|
|
79
|
+
field: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
size: {
|
|
83
|
+
sm: {
|
|
84
|
+
field: string;
|
|
85
|
+
};
|
|
86
|
+
md: {
|
|
87
|
+
field: string;
|
|
88
|
+
};
|
|
89
|
+
lg: {
|
|
90
|
+
field: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
multiline: {
|
|
94
|
+
true: {
|
|
95
|
+
field: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
disabled: {
|
|
99
|
+
true: {
|
|
100
|
+
field: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}, {
|
|
104
|
+
container: string;
|
|
105
|
+
field: string;
|
|
106
|
+
description: string;
|
|
107
|
+
error: string;
|
|
108
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
109
|
+
type InputVariantProps = VariantProps<typeof inputVariants>;
|
|
110
|
+
export interface InputProps extends TextInputProps, Omit<InputVariantProps, 'disabled' | 'multiline'> {
|
|
3
111
|
className?: string;
|
|
4
112
|
containerClassName?: string;
|
|
5
113
|
label?: string;
|
|
6
114
|
description?: string;
|
|
7
115
|
/** Error message. When set, the field renders in its invalid state. */
|
|
8
116
|
errorMessage?: string;
|
|
117
|
+
/** Marks the field required — an asterisk on the label, and the a11y state. */
|
|
118
|
+
isRequired?: boolean;
|
|
9
119
|
disabled?: boolean;
|
|
10
120
|
/**
|
|
11
121
|
* Lift the field above the software keyboard when it would otherwise be
|
|
12
122
|
* covered. Moves by exactly the overlap, and not at all when the field is
|
|
13
|
-
* already clear.
|
|
123
|
+
* already clear — or when the keyboard belongs to a different field.
|
|
14
124
|
*
|
|
15
125
|
* Install `react-native-keyboard-controller` for this to behave on Android.
|
|
16
126
|
*
|
|
@@ -22,4 +132,5 @@ export interface InputProps extends TextInputProps {
|
|
|
22
132
|
keyboardOffset?: number;
|
|
23
133
|
}
|
|
24
134
|
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<TextInput>>;
|
|
135
|
+
export {};
|
|
25
136
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAQ,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAOpE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAS1D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAgCjB,CAAC;AAEH,KAAK,iBAAiB,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5D,MAAM,WAAW,UACf,SAAQ,cAAc,EACpB,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAID,eAAO,MAAM,KAAK,kGA4IjB,CAAC"}
|