react-native-earl-accessory-view 1.0.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/LICENSE +21 -0
- package/README.md +453 -0
- package/dist/AccessoryView.d.ts +33 -0
- package/dist/AccessoryView.d.ts.map +1 -0
- package/dist/AccessoryView.js +321 -0
- package/dist/AccessoryView.js.map +1 -0
- package/dist/ActionButton.d.ts +22 -0
- package/dist/ActionButton.d.ts.map +1 -0
- package/dist/ActionButton.js +81 -0
- package/dist/ActionButton.js.map +1 -0
- package/dist/CharacterCounter.d.ts +8 -0
- package/dist/CharacterCounter.d.ts.map +1 -0
- package/dist/CharacterCounter.js +78 -0
- package/dist/CharacterCounter.js.map +1 -0
- package/dist/DismissButton.d.ts +10 -0
- package/dist/DismissButton.d.ts.map +1 -0
- package/dist/DismissButton.js +73 -0
- package/dist/DismissButton.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.d.ts +173 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +184 -0
- package/dist/styles.js.map +1 -0
- package/dist/types.d.ts +229 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/useKeyboardAccessory.d.ts +18 -0
- package/dist/useKeyboardAccessory.d.ts.map +1 -0
- package/dist/useKeyboardAccessory.js +102 -0
- package/dist/useKeyboardAccessory.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ACCESSORY_VIEW_NATIVE_ID = exports.AccessoryView = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_native_1 = require("react-native");
|
|
39
|
+
const useKeyboardAccessory_1 = require("./useKeyboardAccessory");
|
|
40
|
+
const DismissButton_1 = require("./DismissButton");
|
|
41
|
+
const ActionButton_1 = require("./ActionButton");
|
|
42
|
+
const CharacterCounter_1 = require("./CharacterCounter");
|
|
43
|
+
const styles_1 = require("./styles");
|
|
44
|
+
// Unique nativeID for iOS InputAccessoryView
|
|
45
|
+
const ACCESSORY_NATIVE_ID = "earl-accessory-view-native";
|
|
46
|
+
exports.ACCESSORY_VIEW_NATIVE_ID = ACCESSORY_NATIVE_ID;
|
|
47
|
+
/**
|
|
48
|
+
* AccessoryView — a keyboard input preview bar for React Native.
|
|
49
|
+
*
|
|
50
|
+
* Shows a live preview of what the user is typing above the keyboard,
|
|
51
|
+
* so the input is always visible even when the text field is obscured.
|
|
52
|
+
* The preview is interactive — paste directly or edit the text right
|
|
53
|
+
* in the bar. Changes sync back via onValueChange.
|
|
54
|
+
*
|
|
55
|
+
* Works on iOS, Android, and Web.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* const [text, setText] = useState('');
|
|
60
|
+
*
|
|
61
|
+
* <TextInput value={text} onChangeText={setText} />
|
|
62
|
+
* <AccessoryView value={text} onValueChange={setText} />
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
const AccessoryView = ({
|
|
66
|
+
// Preview content
|
|
67
|
+
value, placeholder = "Type something...", valueStyle, placeholderStyle, editable = true, onValueChange, onPress, label, labelStyle, textPosition = "left", textStyle, children,
|
|
68
|
+
// Action buttons
|
|
69
|
+
actionButtons,
|
|
70
|
+
// Dismiss button
|
|
71
|
+
showDismissButton, dismissButtonPosition = "auto", onDismiss, dismissButtonContent, dismissButtonStyle, dismissButtonTextStyle, dismissButtonHitSlop = 10,
|
|
72
|
+
// Character counter
|
|
73
|
+
charCount, maxCharCount, charCountPosition = "right", charCountStyle, charCountContainerStyle, charCountWarningThreshold = 0.9, charCountWarningColor = "#FF9800", charCountErrorColor = "#F44336", charCountDefaultColor = "#999999", charCountFormatLabel,
|
|
74
|
+
// Appearance
|
|
75
|
+
backgroundColor = "#FFFFFF", containerStyle, contentContainerStyle, height = 44, borderTopWidth = react_native_1.StyleSheet.hairlineWidth, borderTopColor = "#E0E0E0", elevation = 4,
|
|
76
|
+
// Behavior
|
|
77
|
+
alwaysVisible = false, safeAreaEnabled = true,
|
|
78
|
+
// Animation
|
|
79
|
+
animationEnabled = true, animationDuration = 250,
|
|
80
|
+
// Callbacks
|
|
81
|
+
onKeyboardShow, onKeyboardHide, onAccessoryShow, onAccessoryHide,
|
|
82
|
+
// Accessibility
|
|
83
|
+
accessibilityLabel = "Input preview bar", testID = "earl-accessory-view", }) => {
|
|
84
|
+
const { keyboardVisible, keyboardHeight } = (0, useKeyboardAccessory_1.useKeyboardAccessory)({
|
|
85
|
+
onKeyboardShow: (0, react_1.useCallback)((kbHeight) => {
|
|
86
|
+
onKeyboardShow === null || onKeyboardShow === void 0 ? void 0 : onKeyboardShow(kbHeight);
|
|
87
|
+
onAccessoryShow === null || onAccessoryShow === void 0 ? void 0 : onAccessoryShow();
|
|
88
|
+
}, [onKeyboardShow, onAccessoryShow]),
|
|
89
|
+
onKeyboardHide: (0, react_1.useCallback)(() => {
|
|
90
|
+
onKeyboardHide === null || onKeyboardHide === void 0 ? void 0 : onKeyboardHide();
|
|
91
|
+
onAccessoryHide === null || onAccessoryHide === void 0 ? void 0 : onAccessoryHide();
|
|
92
|
+
}, [onKeyboardHide, onAccessoryHide]),
|
|
93
|
+
});
|
|
94
|
+
const shouldShow = alwaysVisible || keyboardVisible;
|
|
95
|
+
// ─── Animation ───────────────────────────────────────────────
|
|
96
|
+
const animValue = (0, react_1.useRef)(new react_native_1.Animated.Value(shouldShow ? 1 : 0)).current;
|
|
97
|
+
const [mounted, setMounted] = (0, react_1.useState)(shouldShow);
|
|
98
|
+
const lastKeyboardHeight = (0, react_1.useRef)(keyboardHeight);
|
|
99
|
+
if (keyboardVisible && keyboardHeight > 0) {
|
|
100
|
+
lastKeyboardHeight.current = keyboardHeight;
|
|
101
|
+
}
|
|
102
|
+
(0, react_1.useEffect)(() => {
|
|
103
|
+
if (shouldShow) {
|
|
104
|
+
setMounted(true);
|
|
105
|
+
if (animationEnabled) {
|
|
106
|
+
react_native_1.Animated.timing(animValue, {
|
|
107
|
+
toValue: 1,
|
|
108
|
+
duration: animationDuration,
|
|
109
|
+
useNativeDriver: true,
|
|
110
|
+
}).start();
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
animValue.setValue(1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
if (animationEnabled) {
|
|
118
|
+
react_native_1.Animated.timing(animValue, {
|
|
119
|
+
toValue: 0,
|
|
120
|
+
duration: animationDuration,
|
|
121
|
+
useNativeDriver: true,
|
|
122
|
+
}).start(({ finished }) => {
|
|
123
|
+
if (finished) {
|
|
124
|
+
setMounted(false);
|
|
125
|
+
lastKeyboardHeight.current = 0;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
animValue.setValue(0);
|
|
131
|
+
setMounted(false);
|
|
132
|
+
lastKeyboardHeight.current = 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
136
|
+
}, [shouldShow, animationEnabled, animationDuration]);
|
|
137
|
+
const animatedBarStyle = (0, react_1.useMemo)(() => react_native_1.Platform.OS === "ios"
|
|
138
|
+
? { opacity: animValue }
|
|
139
|
+
: {
|
|
140
|
+
opacity: animValue,
|
|
141
|
+
transform: [
|
|
142
|
+
{
|
|
143
|
+
translateY: animValue.interpolate({
|
|
144
|
+
inputRange: [0, 1],
|
|
145
|
+
outputRange: [height + 20, 0],
|
|
146
|
+
}),
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
}, [animValue, height]);
|
|
150
|
+
// Resolve whether dismiss is shown:
|
|
151
|
+
// - If user explicitly sets showDismissButton, respect that
|
|
152
|
+
// - If actionButtons are provided and showDismissButton is not set, hide dismiss
|
|
153
|
+
// - Otherwise default to true
|
|
154
|
+
const effectiveShowDismiss = showDismissButton !== undefined
|
|
155
|
+
? showDismissButton
|
|
156
|
+
: !actionButtons || actionButtons.length === 0;
|
|
157
|
+
// Split action buttons by position
|
|
158
|
+
const leftButtons = (0, react_1.useMemo)(() => (actionButtons !== null && actionButtons !== void 0 ? actionButtons : []).filter((b) => b.position === "left"), [actionButtons]);
|
|
159
|
+
const rightButtons = (0, react_1.useMemo)(() => (actionButtons !== null && actionButtons !== void 0 ? actionButtons : []).filter((b) => !b.position || b.position === "right"), [actionButtons]);
|
|
160
|
+
// Resolve dismiss button position
|
|
161
|
+
const resolvedDismissPosition = (0, react_1.useMemo)(() => {
|
|
162
|
+
if (dismissButtonPosition === "auto") {
|
|
163
|
+
return textPosition === "left" ? "right" : "left";
|
|
164
|
+
}
|
|
165
|
+
return dismissButtonPosition;
|
|
166
|
+
}, [dismissButtonPosition, textPosition]);
|
|
167
|
+
// Whether the row layout should reverse
|
|
168
|
+
const isRowReversed = (0, react_1.useMemo)(() => {
|
|
169
|
+
if (children)
|
|
170
|
+
return false;
|
|
171
|
+
return textPosition === "right";
|
|
172
|
+
}, [textPosition, children]);
|
|
173
|
+
// Handle dismiss
|
|
174
|
+
const handleDismiss = (0, react_1.useCallback)(() => {
|
|
175
|
+
if (onDismiss) {
|
|
176
|
+
onDismiss();
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
react_native_1.Keyboard.dismiss();
|
|
180
|
+
}
|
|
181
|
+
}, [onDismiss]);
|
|
182
|
+
// Handle preview text change (paste / direct edit)
|
|
183
|
+
const handleTextChange = (0, react_1.useCallback)((newText) => {
|
|
184
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(newText);
|
|
185
|
+
}, [onValueChange]);
|
|
186
|
+
// Handle preview tap (only used in non-editable mode)
|
|
187
|
+
const handlePress = (0, react_1.useCallback)(() => {
|
|
188
|
+
onPress === null || onPress === void 0 ? void 0 : onPress();
|
|
189
|
+
}, [onPress]);
|
|
190
|
+
// Shadow / elevation styles
|
|
191
|
+
const shadowStyle = (0, react_1.useMemo)(() => {
|
|
192
|
+
if (react_native_1.Platform.OS === "android") {
|
|
193
|
+
return { elevation };
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
shadowColor: "#000000",
|
|
197
|
+
shadowOffset: { width: 0, height: -2 },
|
|
198
|
+
shadowOpacity: Math.min(elevation * 0.02, 0.15),
|
|
199
|
+
shadowRadius: elevation,
|
|
200
|
+
};
|
|
201
|
+
}, [elevation]);
|
|
202
|
+
// Show character counter?
|
|
203
|
+
const showCharCounter = charCount !== undefined &&
|
|
204
|
+
maxCharCount !== undefined &&
|
|
205
|
+
maxCharCount > 0;
|
|
206
|
+
// Is value empty?
|
|
207
|
+
const hasValue = value !== undefined && value.length > 0;
|
|
208
|
+
// ─── Render Nothing ──────────────────────────────────────────────
|
|
209
|
+
if (!mounted) {
|
|
210
|
+
if (react_native_1.Platform.OS === "ios") {
|
|
211
|
+
return (<react_native_1.InputAccessoryView nativeID={ACCESSORY_NATIVE_ID}>
|
|
212
|
+
<react_native_1.View />
|
|
213
|
+
</react_native_1.InputAccessoryView>);
|
|
214
|
+
}
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
// ─── Content ─────────────────────────────────────────────────────
|
|
218
|
+
const renderContent = () => {
|
|
219
|
+
// Custom children override everything
|
|
220
|
+
if (children) {
|
|
221
|
+
return <react_native_1.View style={styles_1.styles.childrenContainer}>{children}</react_native_1.View>;
|
|
222
|
+
}
|
|
223
|
+
// Default layout: action buttons (left) + label + value preview + action buttons (right) + dismiss
|
|
224
|
+
return (<>
|
|
225
|
+
{/* Left action buttons */}
|
|
226
|
+
{leftButtons.map((btn) => (<ActionButton_1.ActionButton key={btn.id} {...btn}/>))}
|
|
227
|
+
|
|
228
|
+
{/* Optional label */}
|
|
229
|
+
{label !== undefined && (<react_native_1.Text style={[styles_1.styles.label, labelStyle]} numberOfLines={1}>
|
|
230
|
+
{label}
|
|
231
|
+
</react_native_1.Text>)}
|
|
232
|
+
|
|
233
|
+
{/* Preview area */}
|
|
234
|
+
{editable ? (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} keyboardShouldPersistTaps="always" contentContainerStyle={styles_1.styles.previewScrollContent} style={styles_1.styles.previewScroll}>
|
|
235
|
+
<react_native_1.TextInput style={[
|
|
236
|
+
styles_1.styles.previewInput,
|
|
237
|
+
isRowReversed && styles_1.styles.textRight,
|
|
238
|
+
textStyle,
|
|
239
|
+
hasValue ? valueStyle : placeholderStyle,
|
|
240
|
+
]} value={value || ""} placeholder={placeholder} placeholderTextColor="#AAAAAA" onChangeText={handleTextChange} multiline={false} scrollEnabled={false} testID={`${testID}-input`}/>
|
|
241
|
+
</react_native_1.ScrollView>) : (<react_native_1.TouchableOpacity activeOpacity={0.6} onPress={handlePress} style={styles_1.styles.previewScroll}>
|
|
242
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles_1.styles.previewScrollContent}>
|
|
243
|
+
<react_native_1.Text style={[
|
|
244
|
+
hasValue
|
|
245
|
+
? styles_1.styles.previewValue
|
|
246
|
+
: styles_1.styles.previewPlaceholder,
|
|
247
|
+
isRowReversed && styles_1.styles.textRight,
|
|
248
|
+
textStyle,
|
|
249
|
+
hasValue ? valueStyle : placeholderStyle,
|
|
250
|
+
]}>
|
|
251
|
+
{hasValue ? value : placeholder}
|
|
252
|
+
</react_native_1.Text>
|
|
253
|
+
</react_native_1.ScrollView>
|
|
254
|
+
</react_native_1.TouchableOpacity>)}
|
|
255
|
+
|
|
256
|
+
{/* Right action buttons */}
|
|
257
|
+
{rightButtons.map((btn) => (<ActionButton_1.ActionButton key={btn.id} {...btn}/>))}
|
|
258
|
+
|
|
259
|
+
<DismissButton_1.DismissButton visible={effectiveShowDismiss} onPress={handleDismiss} style={[
|
|
260
|
+
dismissButtonStyle,
|
|
261
|
+
resolvedDismissPosition === "left" &&
|
|
262
|
+
styles_1.styles.dismissButtonLeft,
|
|
263
|
+
]} textStyle={dismissButtonTextStyle} hitSlop={dismissButtonHitSlop}>
|
|
264
|
+
{dismissButtonContent}
|
|
265
|
+
</DismissButton_1.DismissButton>
|
|
266
|
+
</>);
|
|
267
|
+
};
|
|
268
|
+
// ─── Character Counter ───────────────────────────────────────────
|
|
269
|
+
const renderCharCounter = () => {
|
|
270
|
+
if (!showCharCounter)
|
|
271
|
+
return null;
|
|
272
|
+
return (<CharacterCounter_1.CharacterCounter current={charCount} max={maxCharCount} position={charCountPosition} style={charCountStyle} containerStyle={charCountContainerStyle} warningThreshold={charCountWarningThreshold} warningColor={charCountWarningColor} errorColor={charCountErrorColor} defaultColor={charCountDefaultColor} formatLabel={charCountFormatLabel}/>);
|
|
273
|
+
};
|
|
274
|
+
// ─── Inner Accessory Bar ─────────────────────────────────────────
|
|
275
|
+
const bottomOffset = react_native_1.Platform.OS === "android"
|
|
276
|
+
? keyboardVisible
|
|
277
|
+
? keyboardHeight
|
|
278
|
+
: lastKeyboardHeight.current
|
|
279
|
+
: 0;
|
|
280
|
+
const accessoryBar = (<react_native_1.Animated.View style={[
|
|
281
|
+
styles_1.styles.outerContainer,
|
|
282
|
+
react_native_1.Platform.OS === "android" && { bottom: bottomOffset },
|
|
283
|
+
react_native_1.Platform.OS === "ios" && styles_1.styles.iosContainer,
|
|
284
|
+
animatedBarStyle,
|
|
285
|
+
]} pointerEvents={shouldShow ? "auto" : "none"} accessibilityLabel={accessibilityLabel} accessibilityRole="toolbar" testID={testID}>
|
|
286
|
+
<react_native_1.View style={[
|
|
287
|
+
styles_1.styles.container,
|
|
288
|
+
{
|
|
289
|
+
backgroundColor,
|
|
290
|
+
borderTopWidth,
|
|
291
|
+
borderTopColor,
|
|
292
|
+
},
|
|
293
|
+
shadowStyle,
|
|
294
|
+
containerStyle,
|
|
295
|
+
]}>
|
|
296
|
+
<react_native_1.View style={[
|
|
297
|
+
styles_1.styles.contentContainer,
|
|
298
|
+
{ minHeight: height },
|
|
299
|
+
isRowReversed && styles_1.styles.contentContainerReverse,
|
|
300
|
+
contentContainerStyle,
|
|
301
|
+
]}>
|
|
302
|
+
{renderContent()}
|
|
303
|
+
</react_native_1.View>
|
|
304
|
+
|
|
305
|
+
{renderCharCounter()}
|
|
306
|
+
</react_native_1.View>
|
|
307
|
+
|
|
308
|
+
{/* Safe area bottom spacer for notched devices */}
|
|
309
|
+
{safeAreaEnabled && react_native_1.Platform.OS === "ios" && (<react_native_1.View style={[styles_1.styles.safeAreaSpacer, { backgroundColor }]}/>)}
|
|
310
|
+
</react_native_1.Animated.View>);
|
|
311
|
+
// ─── iOS InputAccessoryView Wrapper ──────────────────────────────
|
|
312
|
+
if (react_native_1.Platform.OS === "ios") {
|
|
313
|
+
return (<react_native_1.InputAccessoryView nativeID={ACCESSORY_NATIVE_ID}>
|
|
314
|
+
{accessoryBar}
|
|
315
|
+
</react_native_1.InputAccessoryView>);
|
|
316
|
+
}
|
|
317
|
+
// ─── Android / Web / Other ───────────────────────────────────────
|
|
318
|
+
return accessoryBar;
|
|
319
|
+
};
|
|
320
|
+
exports.AccessoryView = AccessoryView;
|
|
321
|
+
//# sourceMappingURL=AccessoryView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessoryView.js","sourceRoot":"","sources":["../src/AccessoryView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAMe;AACf,+CAWsB;AAEtB,iEAA8D;AAC9D,mDAAgD;AAChD,iDAA8C;AAC9C,yDAAsD;AACtD,qCAAkC;AAElC,6CAA6C;AAC7C,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AA6bzB,uDAAwB;AA3bxD;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,aAAa,GAAiC,CAAC;AAC3D,kBAAkB;AAClB,KAAK,EACL,WAAW,GAAG,mBAAmB,EACjC,UAAU,EACV,gBAAgB,EAChB,QAAQ,GAAG,IAAI,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,UAAU,EACV,YAAY,GAAG,MAAM,EACrB,SAAS,EACT,QAAQ;AAER,iBAAiB;AACjB,aAAa;AAEb,iBAAiB;AACjB,iBAAiB,EACjB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ZxB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AccessoryActionButton } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* A versatile action button for the keyboard accessory bar.
|
|
5
|
+
*
|
|
6
|
+
* Renders custom content (icons, text, or any React element) and
|
|
7
|
+
* fires the provided `onPress` callback when tapped.
|
|
8
|
+
*
|
|
9
|
+
* Use this for send buttons, input switchers, formatting toggles,
|
|
10
|
+
* attachment pickers, or any custom action.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ActionButton
|
|
15
|
+
* id="send"
|
|
16
|
+
* onPress={handleSend}
|
|
17
|
+
* content={<SendIcon size={20} />}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const ActionButton: React.FC<AccessoryActionButton>;
|
|
22
|
+
//# sourceMappingURL=ActionButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../src/ActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyDxD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ActionButton = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_native_1 = require("react-native");
|
|
39
|
+
const styles_1 = require("./styles");
|
|
40
|
+
/**
|
|
41
|
+
* A versatile action button for the keyboard accessory bar.
|
|
42
|
+
*
|
|
43
|
+
* Renders custom content (icons, text, or any React element) and
|
|
44
|
+
* fires the provided `onPress` callback when tapped.
|
|
45
|
+
*
|
|
46
|
+
* Use this for send buttons, input switchers, formatting toggles,
|
|
47
|
+
* attachment pickers, or any custom action.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <ActionButton
|
|
52
|
+
* id="send"
|
|
53
|
+
* onPress={handleSend}
|
|
54
|
+
* content={<SendIcon size={20} />}
|
|
55
|
+
* />
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
const ActionButton = ({ id, onPress, content, position = "right", disabled = false, style, textStyle, accessibilityLabel, testID, }) => {
|
|
59
|
+
const [pressed, setPressed] = (0, react_1.useState)(false);
|
|
60
|
+
const handlePress = (0, react_1.useCallback)((_event) => {
|
|
61
|
+
if (!disabled) {
|
|
62
|
+
onPress();
|
|
63
|
+
}
|
|
64
|
+
}, [onPress, disabled]);
|
|
65
|
+
const isString = typeof content === "string";
|
|
66
|
+
return (<react_native_1.TouchableOpacity onPress={handlePress} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} activeOpacity={0.7} disabled={disabled} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} accessibilityRole="button" accessibilityLabel={accessibilityLabel || (isString ? content : id)} accessibilityState={{ disabled }} testID={testID || `earl-accessory-action-${id}`} style={[
|
|
67
|
+
styles_1.styles.actionButton,
|
|
68
|
+
position === "left"
|
|
69
|
+
? styles_1.styles.actionButtonLeft
|
|
70
|
+
: styles_1.styles.actionButtonRight,
|
|
71
|
+
pressed && styles_1.styles.actionButtonPressed,
|
|
72
|
+
disabled && styles_1.styles.actionButtonDisabled,
|
|
73
|
+
style,
|
|
74
|
+
]}>
|
|
75
|
+
{isString ? (<react_native_1.Text style={[styles_1.styles.actionButtonText, textStyle]}>
|
|
76
|
+
{content}
|
|
77
|
+
</react_native_1.Text>) : (<react_native_1.View>{content}</react_native_1.View>)}
|
|
78
|
+
</react_native_1.TouchableOpacity>);
|
|
79
|
+
};
|
|
80
|
+
exports.ActionButton = ActionButton;
|
|
81
|
+
//# sourceMappingURL=ActionButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButton.js","sourceRoot":"","sources":["../src/ActionButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;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AAE,CAAC,CACjC,MAAM,CAAC,CAAC,MAAM,IAAI,yBAAyB,EAAE,EAAE,CAAC,CAChD,KAAK,CAAC,CAAC;YACN,eAAM,CAAC,YAAY;YACnB,QAAQ,KAAK,MAAM;gBAClB,CAAC,CAAC,eAAM,CAAC,gBAAgB;gBACzB,CAAC,CAAC,eAAM,CAAC,iBAAiB;YAC3B,OAAO,IAAI,eAAM,CAAC,mBAAmB;YACrC,QAAQ,IAAI,eAAM,CAAC,oBAAoB;YACvC,KAAK;SACL,CAAC,CAEF;GAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACX,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,CAAC,eAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,CACjD;KAAA,CAAC,OAAO,CACT;IAAA,EAAE,mBAAI,CAAC,CACP,CAAC,CAAC,CAAC,CACH,CAAC,mBAAI,CAAC,CAAC,OAAO,CAAC,EAAE,mBAAI,CAAC,CACtB,CACF;EAAA,EAAE,+BAAgB,CAAC,CACnB,CAAC;AACH,CAAC,CAAC;AAzDW,QAAA,YAAY,gBAyDvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CharacterCounterProps } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* A character counter component that displays current/max count
|
|
5
|
+
* with automated color changes at warning and error thresholds.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CharacterCounter: React.FC<CharacterCounterProps>;
|
|
8
|
+
//# sourceMappingURL=CharacterCounter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterCounter.d.ts","sourceRoot":"","sources":["../src/CharacterCounter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsD5D,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CharacterCounter = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_native_1 = require("react-native");
|
|
39
|
+
const styles_1 = require("./styles");
|
|
40
|
+
/**
|
|
41
|
+
* A character counter component that displays current/max count
|
|
42
|
+
* with automated color changes at warning and error thresholds.
|
|
43
|
+
*/
|
|
44
|
+
const CharacterCounter = ({ current, max, position = "right", style, containerStyle, warningThreshold = 0.9, warningColor = "#FF9800", errorColor = "#F44336", defaultColor = "#999999", formatLabel, testID = "earl-accessory-char-counter", }) => {
|
|
45
|
+
const ratio = max > 0 ? current / max : 0;
|
|
46
|
+
const isOverLimit = current > max;
|
|
47
|
+
const isWarning = ratio >= warningThreshold && !isOverLimit;
|
|
48
|
+
const color = (0, react_1.useMemo)(() => {
|
|
49
|
+
if (isOverLimit)
|
|
50
|
+
return errorColor;
|
|
51
|
+
if (isWarning)
|
|
52
|
+
return warningColor;
|
|
53
|
+
return defaultColor;
|
|
54
|
+
}, [isOverLimit, isWarning, errorColor, warningColor, defaultColor]);
|
|
55
|
+
const label = (0, react_1.useMemo)(() => {
|
|
56
|
+
if (formatLabel)
|
|
57
|
+
return formatLabel(current, max);
|
|
58
|
+
return `${current} / ${max}`;
|
|
59
|
+
}, [current, max, formatLabel]);
|
|
60
|
+
const positionStyle = (0, react_1.useMemo)(() => {
|
|
61
|
+
switch (position) {
|
|
62
|
+
case "left":
|
|
63
|
+
return styles_1.styles.charCountContainerLeft;
|
|
64
|
+
case "center":
|
|
65
|
+
return styles_1.styles.charCountContainerCenter;
|
|
66
|
+
case "right":
|
|
67
|
+
default:
|
|
68
|
+
return styles_1.styles.charCountContainerRight;
|
|
69
|
+
}
|
|
70
|
+
}, [position]);
|
|
71
|
+
return (<react_native_1.View style={[styles_1.styles.charCountContainer, positionStyle, containerStyle]} testID={testID}>
|
|
72
|
+
<react_native_1.Text style={[styles_1.styles.charCountText, { color }, style]} accessibilityLabel={`${current} of ${max} characters`} accessibilityRole="text">
|
|
73
|
+
{label}
|
|
74
|
+
</react_native_1.Text>
|
|
75
|
+
</react_native_1.View>);
|
|
76
|
+
};
|
|
77
|
+
exports.CharacterCounter = CharacterCounter;
|
|
78
|
+
//# sourceMappingURL=CharacterCounter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterCounter.js","sourceRoot":"","sources":["../src/CharacterCounter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,+CAA0C;AAE1C,qCAAkC;AAElC;;;GAGG;AACI,MAAM,gBAAgB,GAAoC,CAAC,EACjE,OAAO,EACP,GAAG,EACH,QAAQ,GAAG,OAAO,EAClB,KAAK,EACL,cAAc,EACd,gBAAgB,GAAG,GAAG,EACtB,YAAY,GAAG,SAAS,EACxB,UAAU,GAAG,SAAS,EACtB,YAAY,GAAG,SAAS,EACxB,WAAW,EACX,MAAM,GAAG,6BAA6B,GACtC,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,OAAO,GAAG,GAAG,CAAC;IAClC,MAAM,SAAS,GAAG,KAAK,IAAI,gBAAgB,IAAI,CAAC,WAAW,CAAC;IAE5D,MAAM,KAAK,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC1B,IAAI,WAAW;YAAE,OAAO,UAAU,CAAC;QACnC,IAAI,SAAS;YAAE,OAAO,YAAY,CAAC;QACnC,OAAO,YAAY,CAAC;IACrB,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;IAErE,MAAM,KAAK,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC1B,IAAI,WAAW;YAAE,OAAO,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAClD,OAAO,GAAG,OAAO,MAAM,GAAG,EAAE,CAAC;IAC9B,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;IAEhC,MAAM,aAAa,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAClC,QAAQ,QAAQ,EAAE,CAAC;YAClB,KAAK,MAAM;gBACV,OAAO,eAAM,CAAC,sBAAsB,CAAC;YACtC,KAAK,QAAQ;gBACZ,OAAO,eAAM,CAAC,wBAAwB,CAAC;YACxC,KAAK,OAAO,CAAC;YACb;gBACC,OAAO,eAAM,CAAC,uBAAuB,CAAC;QACxC,CAAC;IACF,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACN,CAAC,mBAAI,CACJ,KAAK,CAAC,CAAC,CAAC,eAAM,CAAC,kBAAkB,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC,CAClE,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;GAAA,CAAC,mBAAI,CACJ,KAAK,CAAC,CAAC,CAAC,eAAM,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC,CAChD,kBAAkB,CAAC,CAAC,GAAG,OAAO,OAAO,GAAG,aAAa,CAAC,CACtD,iBAAiB,CAAC,MAAM,CAExB;IAAA,CAAC,KAAK,CACP;GAAA,EAAE,mBAAI,CACP;EAAA,EAAE,mBAAI,CAAC,CACP,CAAC;AACH,CAAC,CAAC;AAtDW,QAAA,gBAAgB,oBAsD3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DismissButtonProps } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* A touchable dismiss button for the keyboard accessory view.
|
|
5
|
+
*
|
|
6
|
+
* Renders a × icon by default, or any custom children.
|
|
7
|
+
* Fully accessible with proper role and label.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DismissButton: React.FC<DismissButtonProps>;
|
|
10
|
+
//# sourceMappingURL=DismissButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DismissButton.d.ts","sourceRoot":"","sources":["../src/DismissButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuDtD,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DismissButton = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_native_1 = require("react-native");
|
|
39
|
+
const styles_1 = require("./styles");
|
|
40
|
+
/**
|
|
41
|
+
* A touchable dismiss button for the keyboard accessory view.
|
|
42
|
+
*
|
|
43
|
+
* Renders a × icon by default, or any custom children.
|
|
44
|
+
* Fully accessible with proper role and label.
|
|
45
|
+
*/
|
|
46
|
+
const DismissButton = ({ visible = true, onPress, children, style, textStyle, hitSlop = 10, accessibilityLabel = "Dismiss keyboard", testID = "earl-accessory-dismiss-btn", }) => {
|
|
47
|
+
const [pressed, setPressed] = (0, react_1.useState)(false);
|
|
48
|
+
const handlePress = (0, react_1.useCallback)((_event) => {
|
|
49
|
+
if (onPress) {
|
|
50
|
+
onPress();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
react_native_1.Keyboard.dismiss();
|
|
54
|
+
}
|
|
55
|
+
}, [onPress]);
|
|
56
|
+
if (!visible) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return (<react_native_1.TouchableOpacity onPress={handlePress} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} activeOpacity={0.7} hitSlop={{
|
|
60
|
+
top: hitSlop,
|
|
61
|
+
bottom: hitSlop,
|
|
62
|
+
left: hitSlop,
|
|
63
|
+
right: hitSlop,
|
|
64
|
+
}} accessibilityRole="button" accessibilityLabel={accessibilityLabel} testID={testID} style={[
|
|
65
|
+
styles_1.styles.dismissButton,
|
|
66
|
+
pressed && styles_1.styles.dismissButtonPressed,
|
|
67
|
+
style,
|
|
68
|
+
]}>
|
|
69
|
+
{children ? (<react_native_1.View>{children}</react_native_1.View>) : (<react_native_1.Text style={[styles_1.styles.dismissButtonText, textStyle]}>✕</react_native_1.Text>)}
|
|
70
|
+
</react_native_1.TouchableOpacity>);
|
|
71
|
+
};
|
|
72
|
+
exports.DismissButton = DismissButton;
|
|
73
|
+
//# sourceMappingURL=DismissButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DismissButton.js","sourceRoot":"","sources":["../src/DismissButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,+CAMsB;AAEtB,qCAAkC;AAElC;;;;;GAKG;AACI,MAAM,aAAa,GAAiC,CAAC,EAC3D,OAAO,GAAG,IAAI,EACd,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,kBAAkB,GAAG,kBAAkB,EACvC,MAAM,GAAG,4BAA4B,GACrC,EAAE,EAAE;IACJ,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,WAAW,GAAG,IAAA,mBAAW,EAC9B,CAAC,MAA8B,EAAE,EAAE;QAClC,IAAI,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;QACX,CAAC;aAAM,CAAC;YACP,uBAAQ,CAAC,OAAO,EAAE,CAAC;QACpB,CAAC;IACF,CAAC,EACD,CAAC,OAAO,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,CAAC,+BAAgB,CAChB,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAClC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CACpC,aAAa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