@mrmeg/expo-ui 0.25.1 → 0.26.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/CHANGELOG.md +86 -0
- package/LLM_USAGE.md +1 -1
- package/README.md +70 -17
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet.js +28 -51
- package/dist/components/DropdownMenu.js +1 -1
- package/dist/components/Icon.d.ts +24 -22
- package/dist/components/Icon.js +26 -3
- package/dist/components/Notification.js +3 -3
- package/dist/components/Popover.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/StatCard.d.ts +1 -1
- package/dist/components/TextInput.js +24 -11
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/iconRegistry.generated.d.ts +148 -0
- package/dist/components/iconRegistry.generated.js +296 -0
- package/dist/components/keyboardFocusRegistry.d.ts +10 -2
- package/dist/components/keyboardFocusRegistry.js +13 -5
- package/dist/components/nativeTextField.android.d.ts +3 -0
- package/dist/components/nativeTextField.android.js +226 -0
- package/dist/components/nativeTextField.d.ts +14 -0
- package/dist/components/nativeTextField.js +14 -0
- package/dist/design-system.json +151 -2
- package/dist/hooks/useResources.d.ts +5 -18
- package/dist/hooks/useResources.js +5 -43
- package/llms-full.md +3 -3
- package/package.json +4 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useCallback, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { StyleSheet, TextInput as RNTextInput, Platform, View, Pressable, } from "react-native";
|
|
4
|
-
import { Host,
|
|
4
|
+
import { Host, useNativeState, } from "@expo/ui";
|
|
5
|
+
import { NativeTextField } from "./nativeTextField";
|
|
5
6
|
import { useTheme } from "../hooks/useTheme.js";
|
|
6
7
|
import { spacing } from "../constants/spacing.js";
|
|
7
8
|
import { useFontStyle } from "../hooks/useFontStyle.js";
|
|
@@ -179,17 +180,28 @@ function WebTextInput({ variant = "outline", size = "md", label, helperText, err
|
|
|
179
180
|
}, accessibilityLabel: "Clear input", accessibilityRole: "button", children: _jsx(Icon, { name: "x", size: spacing.iconSm, color: "textDim", decorative: true }) })), showClearButton && rightElement && !hasSecureToggle && (_jsxs(View, { style: styles.rightElements, children: [_jsx(Pressable, { onPress: () => {
|
|
180
181
|
hapticLight();
|
|
181
182
|
onChangeText?.("");
|
|
182
|
-
}, accessibilityLabel: "Clear input", accessibilityRole: "button", children: _jsx(Icon, { name: "x", size: spacing.iconSm, color: "textDim", decorative: true }) }), rightElement] })), !showClearButton && rightElement && !hasSecureToggle && (_jsx(View, { style: styles.rightElement, children: rightElement })), secureTextEntry && showSecureEntryToggle && (_jsx(Pressable, { style: styles.passwordToggle, onPress: togglePasswordVisible, accessibilityLabel: passwordVisible ? "Hide password" : "Show password", accessibilityRole: "button", children: _jsx(Icon, { name: passwordVisible ? "eye-off" : "eye", size: spacing.iconSm + 4, color: "textDim" }) })), showErrorIcon && (_jsx(View, { style: [styles.errorIcon, { pointerEvents: "none" }], accessibilityLabel: "Error", children: _jsx(Icon, { name: "alert
|
|
183
|
+
}, accessibilityLabel: "Clear input", accessibilityRole: "button", children: _jsx(Icon, { name: "x", size: spacing.iconSm, color: "textDim", decorative: true }) }), rightElement] })), !showClearButton && rightElement && !hasSecureToggle && (_jsx(View, { style: styles.rightElement, children: rightElement })), secureTextEntry && showSecureEntryToggle && (_jsx(Pressable, { style: styles.passwordToggle, onPress: togglePasswordVisible, accessibilityLabel: passwordVisible ? "Hide password" : "Show password", accessibilityRole: "button", children: _jsx(Icon, { name: passwordVisible ? "eye-off" : "eye", size: spacing.iconSm + 4, color: "textDim" }) })), showErrorIcon && (_jsx(View, { style: [styles.errorIcon, { pointerEvents: "none" }], accessibilityLabel: "Error", children: _jsx(Icon, { name: "circle-alert", size: spacing.iconSm, color: "destructive", decorative: true }) }))] }), !!(helperText || errorText) && (_jsx(StyledText, { selectable: false, size: "sm", style: [
|
|
183
184
|
styles.helperText,
|
|
184
185
|
hasError && styles.errorText,
|
|
185
186
|
], children: errorText || helperText }))] }));
|
|
186
187
|
}
|
|
187
188
|
/**
|
|
188
|
-
* Native (iOS / Android) implementation backed by
|
|
189
|
-
*
|
|
190
|
-
* `
|
|
191
|
-
*
|
|
192
|
-
*
|
|
189
|
+
* Native (iOS / Android) implementation backed by a native text field rendered
|
|
190
|
+
* inside an `@expo/ui` `Host`. The text buffer lives natively (via
|
|
191
|
+
* `useNativeState`), so typing never round-trips through React state —
|
|
192
|
+
* eliminating the cursor flicker seen on controlled RN inputs.
|
|
193
|
+
*
|
|
194
|
+
* The field comes from `./nativeTextField`, a platform-split module. iOS gets
|
|
195
|
+
* `@expo/ui`'s universal TextInput (SwiftUI `TextField`/`SecureField`, which
|
|
196
|
+
* already reports a password field to the keyboard). Android gets a
|
|
197
|
+
* package-owned port of that universal field built on
|
|
198
|
+
* `@expo/ui/jetpack-compose`'s `BasicTextField` (`nativeTextField.android.tsx`),
|
|
199
|
+
* because the universal Android field maps `secureTextEntry` to a masking
|
|
200
|
+
* transformation only and offers no way to set Compose's `KeyboardType.Password`
|
|
201
|
+
* — the IME saw a plain text field, kept its suggestion strip and learned the
|
|
202
|
+
* password. The port declares a password keyboard for secure fields and keeps it
|
|
203
|
+
* across the eye toggle, so revealing the text never restarts the IME. Metro
|
|
204
|
+
* picks the platform file; TypeScript types both through the default file.
|
|
193
205
|
*
|
|
194
206
|
* This path supports label / helper / error text and a password visibility
|
|
195
207
|
* toggle laid out beside the native Host. Clear buttons, left/right elements,
|
|
@@ -293,9 +305,10 @@ leftElement, rightElement, clearable, focusedStyle, style, ...rest }) {
|
|
|
293
305
|
if (Platform.OS === "ios" && secure !== activeSecureRef.current)
|
|
294
306
|
return;
|
|
295
307
|
isFocusedRef.current = true;
|
|
296
|
-
// Register the field's own blur handle for tap-away dismissal
|
|
297
|
-
// BottomSheet
|
|
298
|
-
// ref also targets the actual field inside a native
|
|
308
|
+
// Register the field's own blur handle for tap-away dismissal
|
|
309
|
+
// (`DismissKeyboard`, `BottomSheet.Content`). RN supports Expo-hosted field
|
|
310
|
+
// interop; this direct ref also targets the actual field inside a native
|
|
311
|
+
// sheet's window.
|
|
299
312
|
setKeyboardFocusedInput(focusRegistryToken, blurAll);
|
|
300
313
|
if (handoffRef.current) {
|
|
301
314
|
// The incoming view took first responder; the parent never saw focus leave.
|
|
@@ -475,7 +488,7 @@ leftElement, rightElement, clearable, focusedStyle, style, ...rest }) {
|
|
|
475
488
|
? hasSecureToggle
|
|
476
489
|
? styles.nativeHostFlex
|
|
477
490
|
: styles.nativeHost
|
|
478
|
-
: styles.nativeHostHandoff, pointerEvents: inLayout ? "auto" : "none", accessibilityElementsHidden: !inLayout, importantForAccessibility: inLayout ? "auto" : "no-hide-descendants", children: _jsx(
|
|
491
|
+
: styles.nativeHostHandoff, pointerEvents: inLayout ? "auto" : "none", accessibilityElementsHidden: !inLayout, importantForAccessibility: inLayout ? "auto" : "no-hide-descendants", children: _jsx(NativeTextField, { ...rest, autoFocus: rest.autoFocus || (handoff != null && active), ref: Platform.OS === "android" ? androidRef : secure ? secureRef : plainRef, value: state, defaultValue: defaultValue, onChangeText: handleChangeText, onFocus: () => handleFocus(secure), onBlur: () => handleBlur(secure), editable: editable, multiline: multiline, rows: rows, inputMode: inputMode, secureTextEntry: secure, placeholderTextColor: theme.colors.textDim, style: boxStyle, textStyle: textStyle }) }, Platform.OS === "android"
|
|
479
492
|
? "android"
|
|
480
493
|
: secure
|
|
481
494
|
? `secure-${generationRef.current.secure}`
|
|
@@ -71,7 +71,7 @@ function TooltipContent({ side = "top", align = "center", sideOffset = 4, portal
|
|
|
71
71
|
...getShadowStyle("soft"),
|
|
72
72
|
},
|
|
73
73
|
]) ?? undefined;
|
|
74
|
-
return (_jsx(TooltipPrimitive.Portal, { hostName: portalHost, children: _jsx(FullWindowOverlay, { children: _jsx(TooltipPrimitive.Overlay, { style: Platform.select({ native: StyleSheet.absoluteFill }), children: _jsx(AnimatedView, { type: "fade", enterDuration: 150, children: _jsx(TextColorContext.Provider, { value: colors.text, children: _jsx(TextClassContext.Provider, { value: "", children: _jsx(TextSelectabilityContext.Provider, { value: false, children: _jsx(TooltipPrimitive.Content, { side: side, align: align, sideOffset: sideOffset, style: contentStyle, ...props }) }) }) }) }) }) }) }));
|
|
74
|
+
return (_jsx(TooltipPrimitive.Portal, { hostName: portalHost, children: _jsx(FullWindowOverlay, { children: _jsx(TooltipPrimitive.Overlay, { style: Platform.select({ native: StyleSheet.absoluteFill }), children: _jsx(AnimatedView, { type: "fade", enterDuration: 150, style: StyleSheet.absoluteFill, pointerEvents: "box-none", children: _jsx(TextColorContext.Provider, { value: colors.text, children: _jsx(TextClassContext.Provider, { value: "", children: _jsx(TextSelectabilityContext.Provider, { value: false, children: _jsx(TooltipPrimitive.Content, { side: side, align: align, sideOffset: sideOffset, style: contentStyle, ...props }) }) }) }) }) }) }) }));
|
|
75
75
|
}
|
|
76
76
|
function TooltipBody({ children, style, ...props }) {
|
|
77
77
|
return (_jsx(View, { style: [
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
export declare const ICONS: {
|
|
2
|
+
readonly archive: import("lucide-react-native").LucideIcon;
|
|
3
|
+
readonly "arrow-down": import("lucide-react-native").LucideIcon;
|
|
4
|
+
readonly "arrow-left": import("lucide-react-native").LucideIcon;
|
|
5
|
+
readonly "arrow-right": import("lucide-react-native").LucideIcon;
|
|
6
|
+
readonly "arrow-up": import("lucide-react-native").LucideIcon;
|
|
7
|
+
readonly award: import("lucide-react-native").LucideIcon;
|
|
8
|
+
readonly beer: import("lucide-react-native").LucideIcon;
|
|
9
|
+
readonly bell: import("lucide-react-native").LucideIcon;
|
|
10
|
+
readonly "bell-off": import("lucide-react-native").LucideIcon;
|
|
11
|
+
readonly bold: import("lucide-react-native").LucideIcon;
|
|
12
|
+
readonly bookmark: import("lucide-react-native").LucideIcon;
|
|
13
|
+
readonly box: import("lucide-react-native").LucideIcon;
|
|
14
|
+
readonly briefcase: import("lucide-react-native").LucideIcon;
|
|
15
|
+
readonly calendar: import("lucide-react-native").LucideIcon;
|
|
16
|
+
readonly "calendar-check": import("lucide-react-native").LucideIcon;
|
|
17
|
+
readonly camera: import("lucide-react-native").LucideIcon;
|
|
18
|
+
readonly "camera-off": import("lucide-react-native").LucideIcon;
|
|
19
|
+
readonly "chart-no-axes-column": import("lucide-react-native").LucideIcon;
|
|
20
|
+
readonly check: import("lucide-react-native").LucideIcon;
|
|
21
|
+
readonly "chevron-down": import("lucide-react-native").LucideIcon;
|
|
22
|
+
readonly "chevron-left": import("lucide-react-native").LucideIcon;
|
|
23
|
+
readonly "chevron-right": import("lucide-react-native").LucideIcon;
|
|
24
|
+
readonly "chevron-up": import("lucide-react-native").LucideIcon;
|
|
25
|
+
readonly "circle-alert": import("lucide-react-native").LucideIcon;
|
|
26
|
+
readonly "circle-check-big": import("lucide-react-native").LucideIcon;
|
|
27
|
+
readonly "circle-plus": import("lucide-react-native").LucideIcon;
|
|
28
|
+
readonly "circle-question-mark": import("lucide-react-native").LucideIcon;
|
|
29
|
+
readonly "circle-stop": import("lucide-react-native").LucideIcon;
|
|
30
|
+
readonly "circle-x": import("lucide-react-native").LucideIcon;
|
|
31
|
+
readonly clock: import("lucide-react-native").LucideIcon;
|
|
32
|
+
readonly cloud: import("lucide-react-native").LucideIcon;
|
|
33
|
+
readonly "cloud-off": import("lucide-react-native").LucideIcon;
|
|
34
|
+
readonly code: import("lucide-react-native").LucideIcon;
|
|
35
|
+
readonly coffee: import("lucide-react-native").LucideIcon;
|
|
36
|
+
readonly compass: import("lucide-react-native").LucideIcon;
|
|
37
|
+
readonly copy: import("lucide-react-native").LucideIcon;
|
|
38
|
+
readonly "credit-card": import("lucide-react-native").LucideIcon;
|
|
39
|
+
readonly crosshair: import("lucide-react-native").LucideIcon;
|
|
40
|
+
readonly database: import("lucide-react-native").LucideIcon;
|
|
41
|
+
readonly "dollar-sign": import("lucide-react-native").LucideIcon;
|
|
42
|
+
readonly download: import("lucide-react-native").LucideIcon;
|
|
43
|
+
readonly droplet: import("lucide-react-native").LucideIcon;
|
|
44
|
+
readonly "ellipsis-vertical": import("lucide-react-native").LucideIcon;
|
|
45
|
+
readonly "external-link": import("lucide-react-native").LucideIcon;
|
|
46
|
+
readonly eye: import("lucide-react-native").LucideIcon;
|
|
47
|
+
readonly "eye-off": import("lucide-react-native").LucideIcon;
|
|
48
|
+
readonly "face-slightly-smiling": import("lucide-react-native").LucideIcon;
|
|
49
|
+
readonly file: import("lucide-react-native").LucideIcon;
|
|
50
|
+
readonly "file-text": import("lucide-react-native").LucideIcon;
|
|
51
|
+
readonly folder: import("lucide-react-native").LucideIcon;
|
|
52
|
+
readonly gift: import("lucide-react-native").LucideIcon;
|
|
53
|
+
readonly "git-branch": import("lucide-react-native").LucideIcon;
|
|
54
|
+
readonly "git-pull-request": import("lucide-react-native").LucideIcon;
|
|
55
|
+
readonly globe: import("lucide-react-native").LucideIcon;
|
|
56
|
+
readonly "grid-3x3": import("lucide-react-native").LucideIcon;
|
|
57
|
+
readonly hash: import("lucide-react-native").LucideIcon;
|
|
58
|
+
readonly heart: import("lucide-react-native").LucideIcon;
|
|
59
|
+
readonly hexagon: import("lucide-react-native").LucideIcon;
|
|
60
|
+
readonly house: import("lucide-react-native").LucideIcon;
|
|
61
|
+
readonly image: import("lucide-react-native").LucideIcon;
|
|
62
|
+
readonly inbox: import("lucide-react-native").LucideIcon;
|
|
63
|
+
readonly info: import("lucide-react-native").LucideIcon;
|
|
64
|
+
readonly italic: import("lucide-react-native").LucideIcon;
|
|
65
|
+
readonly key: import("lucide-react-native").LucideIcon;
|
|
66
|
+
readonly layers: import("lucide-react-native").LucideIcon;
|
|
67
|
+
readonly "layout-grid": import("lucide-react-native").LucideIcon;
|
|
68
|
+
readonly link: import("lucide-react-native").LucideIcon;
|
|
69
|
+
readonly "link-2": import("lucide-react-native").LucideIcon;
|
|
70
|
+
readonly list: import("lucide-react-native").LucideIcon;
|
|
71
|
+
readonly loader: import("lucide-react-native").LucideIcon;
|
|
72
|
+
readonly lock: import("lucide-react-native").LucideIcon;
|
|
73
|
+
readonly "lock-open": import("lucide-react-native").LucideIcon;
|
|
74
|
+
readonly "log-in": import("lucide-react-native").LucideIcon;
|
|
75
|
+
readonly "log-out": import("lucide-react-native").LucideIcon;
|
|
76
|
+
readonly mail: import("lucide-react-native").LucideIcon;
|
|
77
|
+
readonly map: import("lucide-react-native").LucideIcon;
|
|
78
|
+
readonly "map-pin": import("lucide-react-native").LucideIcon;
|
|
79
|
+
readonly maximize: import("lucide-react-native").LucideIcon;
|
|
80
|
+
readonly "maximize-2": import("lucide-react-native").LucideIcon;
|
|
81
|
+
readonly menu: import("lucide-react-native").LucideIcon;
|
|
82
|
+
readonly "message-circle": import("lucide-react-native").LucideIcon;
|
|
83
|
+
readonly "message-square": import("lucide-react-native").LucideIcon;
|
|
84
|
+
readonly mic: import("lucide-react-native").LucideIcon;
|
|
85
|
+
readonly "mic-off": import("lucide-react-native").LucideIcon;
|
|
86
|
+
readonly minus: import("lucide-react-native").LucideIcon;
|
|
87
|
+
readonly monitor: import("lucide-react-native").LucideIcon;
|
|
88
|
+
readonly moon: import("lucide-react-native").LucideIcon;
|
|
89
|
+
readonly music: import("lucide-react-native").LucideIcon;
|
|
90
|
+
readonly navigation: import("lucide-react-native").LucideIcon;
|
|
91
|
+
readonly package: import("lucide-react-native").LucideIcon;
|
|
92
|
+
readonly "panel-left": import("lucide-react-native").LucideIcon;
|
|
93
|
+
readonly "panels-top-left": import("lucide-react-native").LucideIcon;
|
|
94
|
+
readonly "party-popper": import("lucide-react-native").LucideIcon;
|
|
95
|
+
readonly pen: import("lucide-react-native").LucideIcon;
|
|
96
|
+
readonly "pen-line": import("lucide-react-native").LucideIcon;
|
|
97
|
+
readonly pencil: import("lucide-react-native").LucideIcon;
|
|
98
|
+
readonly percent: import("lucide-react-native").LucideIcon;
|
|
99
|
+
readonly phone: import("lucide-react-native").LucideIcon;
|
|
100
|
+
readonly play: import("lucide-react-native").LucideIcon;
|
|
101
|
+
readonly plus: import("lucide-react-native").LucideIcon;
|
|
102
|
+
readonly printer: import("lucide-react-native").LucideIcon;
|
|
103
|
+
readonly radio: import("lucide-react-native").LucideIcon;
|
|
104
|
+
readonly "refresh-cw": import("lucide-react-native").LucideIcon;
|
|
105
|
+
readonly repeat: import("lucide-react-native").LucideIcon;
|
|
106
|
+
readonly "rotate-cw": import("lucide-react-native").LucideIcon;
|
|
107
|
+
readonly search: import("lucide-react-native").LucideIcon;
|
|
108
|
+
readonly send: import("lucide-react-native").LucideIcon;
|
|
109
|
+
readonly server: import("lucide-react-native").LucideIcon;
|
|
110
|
+
readonly settings: import("lucide-react-native").LucideIcon;
|
|
111
|
+
readonly share: import("lucide-react-native").LucideIcon;
|
|
112
|
+
readonly "share-2": import("lucide-react-native").LucideIcon;
|
|
113
|
+
readonly shield: import("lucide-react-native").LucideIcon;
|
|
114
|
+
readonly "shield-off": import("lucide-react-native").LucideIcon;
|
|
115
|
+
readonly "shopping-bag": import("lucide-react-native").LucideIcon;
|
|
116
|
+
readonly "shopping-cart": import("lucide-react-native").LucideIcon;
|
|
117
|
+
readonly shuffle: import("lucide-react-native").LucideIcon;
|
|
118
|
+
readonly slash: import("lucide-react-native").LucideIcon;
|
|
119
|
+
readonly "sliders-horizontal": import("lucide-react-native").LucideIcon;
|
|
120
|
+
readonly "sliders-vertical": import("lucide-react-native").LucideIcon;
|
|
121
|
+
readonly smartphone: import("lucide-react-native").LucideIcon;
|
|
122
|
+
readonly square: import("lucide-react-native").LucideIcon;
|
|
123
|
+
readonly "square-check-big": import("lucide-react-native").LucideIcon;
|
|
124
|
+
readonly "square-pen": import("lucide-react-native").LucideIcon;
|
|
125
|
+
readonly star: import("lucide-react-native").LucideIcon;
|
|
126
|
+
readonly sun: import("lucide-react-native").LucideIcon;
|
|
127
|
+
readonly tag: import("lucide-react-native").LucideIcon;
|
|
128
|
+
readonly terminal: import("lucide-react-native").LucideIcon;
|
|
129
|
+
readonly "thumbs-up": import("lucide-react-native").LucideIcon;
|
|
130
|
+
readonly trash: import("lucide-react-native").LucideIcon;
|
|
131
|
+
readonly "trending-down": import("lucide-react-native").LucideIcon;
|
|
132
|
+
readonly "trending-up": import("lucide-react-native").LucideIcon;
|
|
133
|
+
readonly "triangle-alert": import("lucide-react-native").LucideIcon;
|
|
134
|
+
readonly truck: import("lucide-react-native").LucideIcon;
|
|
135
|
+
readonly underline: import("lucide-react-native").LucideIcon;
|
|
136
|
+
readonly upload: import("lucide-react-native").LucideIcon;
|
|
137
|
+
readonly user: import("lucide-react-native").LucideIcon;
|
|
138
|
+
readonly "user-check": import("lucide-react-native").LucideIcon;
|
|
139
|
+
readonly "user-minus": import("lucide-react-native").LucideIcon;
|
|
140
|
+
readonly "user-plus": import("lucide-react-native").LucideIcon;
|
|
141
|
+
readonly users: import("lucide-react-native").LucideIcon;
|
|
142
|
+
readonly video: import("lucide-react-native").LucideIcon;
|
|
143
|
+
readonly "wifi-off": import("lucide-react-native").LucideIcon;
|
|
144
|
+
readonly wrench: import("lucide-react-native").LucideIcon;
|
|
145
|
+
readonly x: import("lucide-react-native").LucideIcon;
|
|
146
|
+
readonly zap: import("lucide-react-native").LucideIcon;
|
|
147
|
+
};
|
|
148
|
+
export type IconName = keyof typeof ICONS;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// GENERATED FILE - do not edit. Rebuild with `bun run ui:icons`.
|
|
3
|
+
// Source: icon-names.json (145 icons). Each icon is a
|
|
4
|
+
// per-glyph subpath import so consumers bundle only the names listed there.
|
|
5
|
+
import Archive from "lucide-react-native/icons/archive";
|
|
6
|
+
import ArrowDown from "lucide-react-native/icons/arrow-down";
|
|
7
|
+
import ArrowLeft from "lucide-react-native/icons/arrow-left";
|
|
8
|
+
import ArrowRight from "lucide-react-native/icons/arrow-right";
|
|
9
|
+
import ArrowUp from "lucide-react-native/icons/arrow-up";
|
|
10
|
+
import Award from "lucide-react-native/icons/award";
|
|
11
|
+
import Beer from "lucide-react-native/icons/beer";
|
|
12
|
+
import Bell from "lucide-react-native/icons/bell";
|
|
13
|
+
import BellOff from "lucide-react-native/icons/bell-off";
|
|
14
|
+
import Bold from "lucide-react-native/icons/bold";
|
|
15
|
+
import Bookmark from "lucide-react-native/icons/bookmark";
|
|
16
|
+
import Box from "lucide-react-native/icons/box";
|
|
17
|
+
import Briefcase from "lucide-react-native/icons/briefcase";
|
|
18
|
+
import Calendar from "lucide-react-native/icons/calendar";
|
|
19
|
+
import CalendarCheck from "lucide-react-native/icons/calendar-check";
|
|
20
|
+
import Camera from "lucide-react-native/icons/camera";
|
|
21
|
+
import CameraOff from "lucide-react-native/icons/camera-off";
|
|
22
|
+
import ChartNoAxesColumn from "lucide-react-native/icons/chart-no-axes-column";
|
|
23
|
+
import Check from "lucide-react-native/icons/check";
|
|
24
|
+
import ChevronDown from "lucide-react-native/icons/chevron-down";
|
|
25
|
+
import ChevronLeft from "lucide-react-native/icons/chevron-left";
|
|
26
|
+
import ChevronRight from "lucide-react-native/icons/chevron-right";
|
|
27
|
+
import ChevronUp from "lucide-react-native/icons/chevron-up";
|
|
28
|
+
import CircleAlert from "lucide-react-native/icons/circle-alert";
|
|
29
|
+
import CircleCheckBig from "lucide-react-native/icons/circle-check-big";
|
|
30
|
+
import CirclePlus from "lucide-react-native/icons/circle-plus";
|
|
31
|
+
import CircleQuestionMark from "lucide-react-native/icons/circle-question-mark";
|
|
32
|
+
import CircleStop from "lucide-react-native/icons/circle-stop";
|
|
33
|
+
import CircleX from "lucide-react-native/icons/circle-x";
|
|
34
|
+
import Clock from "lucide-react-native/icons/clock";
|
|
35
|
+
import Cloud from "lucide-react-native/icons/cloud";
|
|
36
|
+
import CloudOff from "lucide-react-native/icons/cloud-off";
|
|
37
|
+
import Code from "lucide-react-native/icons/code";
|
|
38
|
+
import Coffee from "lucide-react-native/icons/coffee";
|
|
39
|
+
import Compass from "lucide-react-native/icons/compass";
|
|
40
|
+
import Copy from "lucide-react-native/icons/copy";
|
|
41
|
+
import CreditCard from "lucide-react-native/icons/credit-card";
|
|
42
|
+
import Crosshair from "lucide-react-native/icons/crosshair";
|
|
43
|
+
import Database from "lucide-react-native/icons/database";
|
|
44
|
+
import DollarSign from "lucide-react-native/icons/dollar-sign";
|
|
45
|
+
import Download from "lucide-react-native/icons/download";
|
|
46
|
+
import Droplet from "lucide-react-native/icons/droplet";
|
|
47
|
+
import EllipsisVertical from "lucide-react-native/icons/ellipsis-vertical";
|
|
48
|
+
import ExternalLink from "lucide-react-native/icons/external-link";
|
|
49
|
+
import Eye from "lucide-react-native/icons/eye";
|
|
50
|
+
import EyeOff from "lucide-react-native/icons/eye-off";
|
|
51
|
+
import FaceSlightlySmiling from "lucide-react-native/icons/face-slightly-smiling";
|
|
52
|
+
import File from "lucide-react-native/icons/file";
|
|
53
|
+
import FileText from "lucide-react-native/icons/file-text";
|
|
54
|
+
import Folder from "lucide-react-native/icons/folder";
|
|
55
|
+
import Gift from "lucide-react-native/icons/gift";
|
|
56
|
+
import GitBranch from "lucide-react-native/icons/git-branch";
|
|
57
|
+
import GitPullRequest from "lucide-react-native/icons/git-pull-request";
|
|
58
|
+
import Globe from "lucide-react-native/icons/globe";
|
|
59
|
+
import Grid3x3 from "lucide-react-native/icons/grid-3x3";
|
|
60
|
+
import Hash from "lucide-react-native/icons/hash";
|
|
61
|
+
import Heart from "lucide-react-native/icons/heart";
|
|
62
|
+
import Hexagon from "lucide-react-native/icons/hexagon";
|
|
63
|
+
import House from "lucide-react-native/icons/house";
|
|
64
|
+
import Image from "lucide-react-native/icons/image";
|
|
65
|
+
import Inbox from "lucide-react-native/icons/inbox";
|
|
66
|
+
import Info from "lucide-react-native/icons/info";
|
|
67
|
+
import Italic from "lucide-react-native/icons/italic";
|
|
68
|
+
import Key from "lucide-react-native/icons/key";
|
|
69
|
+
import Layers from "lucide-react-native/icons/layers";
|
|
70
|
+
import LayoutGrid from "lucide-react-native/icons/layout-grid";
|
|
71
|
+
import Link from "lucide-react-native/icons/link";
|
|
72
|
+
import Link2 from "lucide-react-native/icons/link-2";
|
|
73
|
+
import List from "lucide-react-native/icons/list";
|
|
74
|
+
import Loader from "lucide-react-native/icons/loader";
|
|
75
|
+
import Lock from "lucide-react-native/icons/lock";
|
|
76
|
+
import LockOpen from "lucide-react-native/icons/lock-open";
|
|
77
|
+
import LogIn from "lucide-react-native/icons/log-in";
|
|
78
|
+
import LogOut from "lucide-react-native/icons/log-out";
|
|
79
|
+
import Mail from "lucide-react-native/icons/mail";
|
|
80
|
+
import Map from "lucide-react-native/icons/map";
|
|
81
|
+
import MapPin from "lucide-react-native/icons/map-pin";
|
|
82
|
+
import Maximize from "lucide-react-native/icons/maximize";
|
|
83
|
+
import Maximize2 from "lucide-react-native/icons/maximize-2";
|
|
84
|
+
import Menu from "lucide-react-native/icons/menu";
|
|
85
|
+
import MessageCircle from "lucide-react-native/icons/message-circle";
|
|
86
|
+
import MessageSquare from "lucide-react-native/icons/message-square";
|
|
87
|
+
import Mic from "lucide-react-native/icons/mic";
|
|
88
|
+
import MicOff from "lucide-react-native/icons/mic-off";
|
|
89
|
+
import Minus from "lucide-react-native/icons/minus";
|
|
90
|
+
import Monitor from "lucide-react-native/icons/monitor";
|
|
91
|
+
import Moon from "lucide-react-native/icons/moon";
|
|
92
|
+
import Music from "lucide-react-native/icons/music";
|
|
93
|
+
import Navigation from "lucide-react-native/icons/navigation";
|
|
94
|
+
import Package from "lucide-react-native/icons/package";
|
|
95
|
+
import PanelLeft from "lucide-react-native/icons/panel-left";
|
|
96
|
+
import PanelsTopLeft from "lucide-react-native/icons/panels-top-left";
|
|
97
|
+
import PartyPopper from "lucide-react-native/icons/party-popper";
|
|
98
|
+
import Pen from "lucide-react-native/icons/pen";
|
|
99
|
+
import PenLine from "lucide-react-native/icons/pen-line";
|
|
100
|
+
import Pencil from "lucide-react-native/icons/pencil";
|
|
101
|
+
import Percent from "lucide-react-native/icons/percent";
|
|
102
|
+
import Phone from "lucide-react-native/icons/phone";
|
|
103
|
+
import Play from "lucide-react-native/icons/play";
|
|
104
|
+
import Plus from "lucide-react-native/icons/plus";
|
|
105
|
+
import Printer from "lucide-react-native/icons/printer";
|
|
106
|
+
import Radio from "lucide-react-native/icons/radio";
|
|
107
|
+
import RefreshCw from "lucide-react-native/icons/refresh-cw";
|
|
108
|
+
import Repeat from "lucide-react-native/icons/repeat";
|
|
109
|
+
import RotateCw from "lucide-react-native/icons/rotate-cw";
|
|
110
|
+
import Search from "lucide-react-native/icons/search";
|
|
111
|
+
import Send from "lucide-react-native/icons/send";
|
|
112
|
+
import Server from "lucide-react-native/icons/server";
|
|
113
|
+
import Settings from "lucide-react-native/icons/settings";
|
|
114
|
+
import Share from "lucide-react-native/icons/share";
|
|
115
|
+
import Share2 from "lucide-react-native/icons/share-2";
|
|
116
|
+
import Shield from "lucide-react-native/icons/shield";
|
|
117
|
+
import ShieldOff from "lucide-react-native/icons/shield-off";
|
|
118
|
+
import ShoppingBag from "lucide-react-native/icons/shopping-bag";
|
|
119
|
+
import ShoppingCart from "lucide-react-native/icons/shopping-cart";
|
|
120
|
+
import Shuffle from "lucide-react-native/icons/shuffle";
|
|
121
|
+
import Slash from "lucide-react-native/icons/slash";
|
|
122
|
+
import SlidersHorizontal from "lucide-react-native/icons/sliders-horizontal";
|
|
123
|
+
import SlidersVertical from "lucide-react-native/icons/sliders-vertical";
|
|
124
|
+
import Smartphone from "lucide-react-native/icons/smartphone";
|
|
125
|
+
import Square from "lucide-react-native/icons/square";
|
|
126
|
+
import SquareCheckBig from "lucide-react-native/icons/square-check-big";
|
|
127
|
+
import SquarePen from "lucide-react-native/icons/square-pen";
|
|
128
|
+
import Star from "lucide-react-native/icons/star";
|
|
129
|
+
import Sun from "lucide-react-native/icons/sun";
|
|
130
|
+
import Tag from "lucide-react-native/icons/tag";
|
|
131
|
+
import Terminal from "lucide-react-native/icons/terminal";
|
|
132
|
+
import ThumbsUp from "lucide-react-native/icons/thumbs-up";
|
|
133
|
+
import Trash from "lucide-react-native/icons/trash";
|
|
134
|
+
import TrendingDown from "lucide-react-native/icons/trending-down";
|
|
135
|
+
import TrendingUp from "lucide-react-native/icons/trending-up";
|
|
136
|
+
import TriangleAlert from "lucide-react-native/icons/triangle-alert";
|
|
137
|
+
import Truck from "lucide-react-native/icons/truck";
|
|
138
|
+
import Underline from "lucide-react-native/icons/underline";
|
|
139
|
+
import Upload from "lucide-react-native/icons/upload";
|
|
140
|
+
import User from "lucide-react-native/icons/user";
|
|
141
|
+
import UserCheck from "lucide-react-native/icons/user-check";
|
|
142
|
+
import UserMinus from "lucide-react-native/icons/user-minus";
|
|
143
|
+
import UserPlus from "lucide-react-native/icons/user-plus";
|
|
144
|
+
import Users from "lucide-react-native/icons/users";
|
|
145
|
+
import Video from "lucide-react-native/icons/video";
|
|
146
|
+
import WifiOff from "lucide-react-native/icons/wifi-off";
|
|
147
|
+
import Wrench from "lucide-react-native/icons/wrench";
|
|
148
|
+
import X from "lucide-react-native/icons/x";
|
|
149
|
+
import Zap from "lucide-react-native/icons/zap";
|
|
150
|
+
export const ICONS = {
|
|
151
|
+
"archive": Archive,
|
|
152
|
+
"arrow-down": ArrowDown,
|
|
153
|
+
"arrow-left": ArrowLeft,
|
|
154
|
+
"arrow-right": ArrowRight,
|
|
155
|
+
"arrow-up": ArrowUp,
|
|
156
|
+
"award": Award,
|
|
157
|
+
"beer": Beer,
|
|
158
|
+
"bell": Bell,
|
|
159
|
+
"bell-off": BellOff,
|
|
160
|
+
"bold": Bold,
|
|
161
|
+
"bookmark": Bookmark,
|
|
162
|
+
"box": Box,
|
|
163
|
+
"briefcase": Briefcase,
|
|
164
|
+
"calendar": Calendar,
|
|
165
|
+
"calendar-check": CalendarCheck,
|
|
166
|
+
"camera": Camera,
|
|
167
|
+
"camera-off": CameraOff,
|
|
168
|
+
"chart-no-axes-column": ChartNoAxesColumn,
|
|
169
|
+
"check": Check,
|
|
170
|
+
"chevron-down": ChevronDown,
|
|
171
|
+
"chevron-left": ChevronLeft,
|
|
172
|
+
"chevron-right": ChevronRight,
|
|
173
|
+
"chevron-up": ChevronUp,
|
|
174
|
+
"circle-alert": CircleAlert,
|
|
175
|
+
"circle-check-big": CircleCheckBig,
|
|
176
|
+
"circle-plus": CirclePlus,
|
|
177
|
+
"circle-question-mark": CircleQuestionMark,
|
|
178
|
+
"circle-stop": CircleStop,
|
|
179
|
+
"circle-x": CircleX,
|
|
180
|
+
"clock": Clock,
|
|
181
|
+
"cloud": Cloud,
|
|
182
|
+
"cloud-off": CloudOff,
|
|
183
|
+
"code": Code,
|
|
184
|
+
"coffee": Coffee,
|
|
185
|
+
"compass": Compass,
|
|
186
|
+
"copy": Copy,
|
|
187
|
+
"credit-card": CreditCard,
|
|
188
|
+
"crosshair": Crosshair,
|
|
189
|
+
"database": Database,
|
|
190
|
+
"dollar-sign": DollarSign,
|
|
191
|
+
"download": Download,
|
|
192
|
+
"droplet": Droplet,
|
|
193
|
+
"ellipsis-vertical": EllipsisVertical,
|
|
194
|
+
"external-link": ExternalLink,
|
|
195
|
+
"eye": Eye,
|
|
196
|
+
"eye-off": EyeOff,
|
|
197
|
+
"face-slightly-smiling": FaceSlightlySmiling,
|
|
198
|
+
"file": File,
|
|
199
|
+
"file-text": FileText,
|
|
200
|
+
"folder": Folder,
|
|
201
|
+
"gift": Gift,
|
|
202
|
+
"git-branch": GitBranch,
|
|
203
|
+
"git-pull-request": GitPullRequest,
|
|
204
|
+
"globe": Globe,
|
|
205
|
+
"grid-3x3": Grid3x3,
|
|
206
|
+
"hash": Hash,
|
|
207
|
+
"heart": Heart,
|
|
208
|
+
"hexagon": Hexagon,
|
|
209
|
+
"house": House,
|
|
210
|
+
"image": Image,
|
|
211
|
+
"inbox": Inbox,
|
|
212
|
+
"info": Info,
|
|
213
|
+
"italic": Italic,
|
|
214
|
+
"key": Key,
|
|
215
|
+
"layers": Layers,
|
|
216
|
+
"layout-grid": LayoutGrid,
|
|
217
|
+
"link": Link,
|
|
218
|
+
"link-2": Link2,
|
|
219
|
+
"list": List,
|
|
220
|
+
"loader": Loader,
|
|
221
|
+
"lock": Lock,
|
|
222
|
+
"lock-open": LockOpen,
|
|
223
|
+
"log-in": LogIn,
|
|
224
|
+
"log-out": LogOut,
|
|
225
|
+
"mail": Mail,
|
|
226
|
+
"map": Map,
|
|
227
|
+
"map-pin": MapPin,
|
|
228
|
+
"maximize": Maximize,
|
|
229
|
+
"maximize-2": Maximize2,
|
|
230
|
+
"menu": Menu,
|
|
231
|
+
"message-circle": MessageCircle,
|
|
232
|
+
"message-square": MessageSquare,
|
|
233
|
+
"mic": Mic,
|
|
234
|
+
"mic-off": MicOff,
|
|
235
|
+
"minus": Minus,
|
|
236
|
+
"monitor": Monitor,
|
|
237
|
+
"moon": Moon,
|
|
238
|
+
"music": Music,
|
|
239
|
+
"navigation": Navigation,
|
|
240
|
+
"package": Package,
|
|
241
|
+
"panel-left": PanelLeft,
|
|
242
|
+
"panels-top-left": PanelsTopLeft,
|
|
243
|
+
"party-popper": PartyPopper,
|
|
244
|
+
"pen": Pen,
|
|
245
|
+
"pen-line": PenLine,
|
|
246
|
+
"pencil": Pencil,
|
|
247
|
+
"percent": Percent,
|
|
248
|
+
"phone": Phone,
|
|
249
|
+
"play": Play,
|
|
250
|
+
"plus": Plus,
|
|
251
|
+
"printer": Printer,
|
|
252
|
+
"radio": Radio,
|
|
253
|
+
"refresh-cw": RefreshCw,
|
|
254
|
+
"repeat": Repeat,
|
|
255
|
+
"rotate-cw": RotateCw,
|
|
256
|
+
"search": Search,
|
|
257
|
+
"send": Send,
|
|
258
|
+
"server": Server,
|
|
259
|
+
"settings": Settings,
|
|
260
|
+
"share": Share,
|
|
261
|
+
"share-2": Share2,
|
|
262
|
+
"shield": Shield,
|
|
263
|
+
"shield-off": ShieldOff,
|
|
264
|
+
"shopping-bag": ShoppingBag,
|
|
265
|
+
"shopping-cart": ShoppingCart,
|
|
266
|
+
"shuffle": Shuffle,
|
|
267
|
+
"slash": Slash,
|
|
268
|
+
"sliders-horizontal": SlidersHorizontal,
|
|
269
|
+
"sliders-vertical": SlidersVertical,
|
|
270
|
+
"smartphone": Smartphone,
|
|
271
|
+
"square": Square,
|
|
272
|
+
"square-check-big": SquareCheckBig,
|
|
273
|
+
"square-pen": SquarePen,
|
|
274
|
+
"star": Star,
|
|
275
|
+
"sun": Sun,
|
|
276
|
+
"tag": Tag,
|
|
277
|
+
"terminal": Terminal,
|
|
278
|
+
"thumbs-up": ThumbsUp,
|
|
279
|
+
"trash": Trash,
|
|
280
|
+
"trending-down": TrendingDown,
|
|
281
|
+
"trending-up": TrendingUp,
|
|
282
|
+
"triangle-alert": TriangleAlert,
|
|
283
|
+
"truck": Truck,
|
|
284
|
+
"underline": Underline,
|
|
285
|
+
"upload": Upload,
|
|
286
|
+
"user": User,
|
|
287
|
+
"user-check": UserCheck,
|
|
288
|
+
"user-minus": UserMinus,
|
|
289
|
+
"user-plus": UserPlus,
|
|
290
|
+
"users": Users,
|
|
291
|
+
"video": Video,
|
|
292
|
+
"wifi-off": WifiOff,
|
|
293
|
+
"wrench": Wrench,
|
|
294
|
+
"x": X,
|
|
295
|
+
"zap": Zap,
|
|
296
|
+
};
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* This package registry supplies a window-independent native blur handle and
|
|
6
6
|
* focus presence even when keyboard-controller cannot observe the keyboard
|
|
7
7
|
* (for example, in an isolated native sheet window). The package `TextInput`
|
|
8
|
-
* registers on focus; tap-away dismissal (`keyboardDismiss.ts
|
|
9
|
-
* `BottomSheet`
|
|
8
|
+
* registers on focus; tap-away dismissal (`keyboardDismiss.ts`, mounted by
|
|
9
|
+
* `DismissKeyboard` and `BottomSheet.Content`) resigns the field through that
|
|
10
|
+
* handle.
|
|
10
11
|
*/
|
|
11
12
|
export type KeyboardFocusedInputToken = object;
|
|
12
13
|
/**
|
|
@@ -23,5 +24,12 @@ export declare function hasKeyboardFocusedInput(): boolean;
|
|
|
23
24
|
/**
|
|
24
25
|
* Resign the currently-focused native field, dismissing its keyboard. Returns
|
|
25
26
|
* `true` if a field was focused and a blur handle was available.
|
|
27
|
+
*
|
|
28
|
+
* Presence is cleared here, in the same call, rather than left to the field's
|
|
29
|
+
* later `onBlur`: consumers call `dismissKeyboard()` from submit handlers and
|
|
30
|
+
* the native blur callback is not guaranteed to arrive (isolated sheet window,
|
|
31
|
+
* iOS secure/plain handoff), which used to leave a stale registration behind.
|
|
32
|
+
* The clear is token-guarded, so a field that takes focus synchronously during
|
|
33
|
+
* `blur()` keeps its registration; the field's own later clear is idempotent.
|
|
26
34
|
*/
|
|
27
35
|
export declare function dismissKeyboardFocusedInput(): boolean;
|
|
@@ -38,11 +38,19 @@ export function hasKeyboardFocusedInput() {
|
|
|
38
38
|
/**
|
|
39
39
|
* Resign the currently-focused native field, dismissing its keyboard. Returns
|
|
40
40
|
* `true` if a field was focused and a blur handle was available.
|
|
41
|
+
*
|
|
42
|
+
* Presence is cleared here, in the same call, rather than left to the field's
|
|
43
|
+
* later `onBlur`: consumers call `dismissKeyboard()` from submit handlers and
|
|
44
|
+
* the native blur callback is not guaranteed to arrive (isolated sheet window,
|
|
45
|
+
* iOS secure/plain handoff), which used to leave a stale registration behind.
|
|
46
|
+
* The clear is token-guarded, so a field that takes focus synchronously during
|
|
47
|
+
* `blur()` keeps its registration; the field's own later clear is idempotent.
|
|
41
48
|
*/
|
|
42
49
|
export function dismissKeyboardFocusedInput() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
const entry = focusedInput;
|
|
51
|
+
if (!entry)
|
|
52
|
+
return false;
|
|
53
|
+
entry.blur();
|
|
54
|
+
clearKeyboardFocusedInput(entry.token);
|
|
55
|
+
return true;
|
|
48
56
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TextInputProps } from "@expo/ui";
|
|
2
|
+
export type NativeTextFieldProps = TextInputProps;
|
|
3
|
+
export declare function NativeTextField({ ref, value, onChangeText, placeholder, autoFocus, editable: editableProp, multiline, keyboardType: keyboardTypeProp, autoCapitalize, autoCorrect, returnKeyType: returnKeyTypeProp, onSubmitEditing, onFocus, onBlur, cursorColor, textAlign, readOnly, inputMode, enterKeyHint, defaultValue, numberOfLines: numberOfLinesProp, rows, testID, placeholderTextColor, textStyle, style, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selectionHandleColor, selection, onSelectionChange, selectTextOnFocus, modifiers: userModifiers, }: NativeTextFieldProps): import("react").JSX.Element;
|