@retray-dev/ui-kit 9.0.0 → 9.2.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.
Files changed (57) hide show
  1. package/COMPONENTS.md +178 -7
  2. package/CONSUMER.md +247 -0
  3. package/DESIGN.md +668 -0
  4. package/EXAMPLES.md +19 -12
  5. package/FONTS.md +107 -0
  6. package/README.md +3 -3
  7. package/dist/AlertBanner.d.mts +3 -1
  8. package/dist/AlertBanner.d.ts +3 -1
  9. package/dist/AlertBanner.js +18 -2
  10. package/dist/AlertBanner.mjs +1 -1
  11. package/dist/ConfirmDialog.d.mts +3 -1
  12. package/dist/ConfirmDialog.d.ts +3 -1
  13. package/dist/ConfirmDialog.js +3 -0
  14. package/dist/ConfirmDialog.mjs +1 -1
  15. package/dist/CurrencyInput.d.mts +3 -1
  16. package/dist/CurrencyInput.d.ts +3 -1
  17. package/dist/CurrencyInput.js +31 -4
  18. package/dist/CurrencyInput.mjs +2 -2
  19. package/dist/ImageUpload.d.mts +27 -0
  20. package/dist/ImageUpload.d.ts +27 -0
  21. package/dist/ImageUpload.js +399 -0
  22. package/dist/ImageUpload.mjs +9 -0
  23. package/dist/Input.d.mts +3 -1
  24. package/dist/Input.d.ts +3 -1
  25. package/dist/Input.js +27 -2
  26. package/dist/Input.mjs +1 -1
  27. package/dist/ListItem.d.mts +3 -1
  28. package/dist/ListItem.d.ts +3 -1
  29. package/dist/ListItem.js +2 -1
  30. package/dist/ListItem.mjs +1 -1
  31. package/dist/SheetSelect.d.mts +25 -0
  32. package/dist/SheetSelect.d.ts +25 -0
  33. package/dist/SheetSelect.js +440 -0
  34. package/dist/SheetSelect.mjs +9 -0
  35. package/dist/{chunk-M6ZXVBTK.mjs → chunk-6MKGPAR2.mjs} +21 -5
  36. package/dist/{chunk-7QHVVCB3.mjs → chunk-FZZLPJ6B.mjs} +3 -0
  37. package/dist/{chunk-MAC465BB.mjs → chunk-KNSENOV4.mjs} +5 -3
  38. package/dist/{chunk-756RAKE4.mjs → chunk-LVYEU5ZK.mjs} +27 -2
  39. package/dist/{chunk-BNP626TY.mjs → chunk-T4I5WVHA.mjs} +2 -1
  40. package/dist/chunk-URI2WBIV.mjs +147 -0
  41. package/dist/chunk-Y4GL2MHX.mjs +112 -0
  42. package/dist/index.d.mts +26 -1
  43. package/dist/index.d.ts +26 -1
  44. package/dist/index.js +327 -8
  45. package/dist/index.mjs +51 -12
  46. package/package.json +18 -5
  47. package/src/components/AlertBanner/AlertBanner.tsx +21 -3
  48. package/src/components/ConfirmDialog/ConfirmDialog.tsx +5 -0
  49. package/src/components/CurrencyInput/CurrencyInput.tsx +4 -0
  50. package/src/components/ImageUpload/ImageUpload.tsx +158 -0
  51. package/src/components/ImageUpload/index.ts +1 -0
  52. package/src/components/Input/Input.tsx +51 -23
  53. package/src/components/ListItem/ListItem.tsx +4 -1
  54. package/src/components/SheetSelect/SheetSelect.tsx +192 -0
  55. package/src/components/SheetSelect/index.ts +1 -0
  56. package/src/hooks/useConfirmDialog.ts +67 -0
  57. package/src/index.ts +6 -0
@@ -0,0 +1,440 @@
1
+ 'use strict';
2
+
3
+ var React3 = require('react');
4
+ var reactNative = require('react-native');
5
+ var reactNativeEase = require('react-native-ease');
6
+ var reactNativeSizeMatters = require('react-native-size-matters');
7
+ var AntDesign = require('@expo/vector-icons/AntDesign');
8
+ var Entypo = require('@expo/vector-icons/Entypo');
9
+ var Feather = require('@expo/vector-icons/Feather');
10
+ var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
11
+ var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
12
+ var Ionicons = require('@expo/vector-icons/Ionicons');
13
+ var reactNativeReanimated = require('react-native-reanimated');
14
+ var pressto = require('pressto');
15
+
16
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
+
18
+ var React3__default = /*#__PURE__*/_interopDefault(React3);
19
+ var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
20
+ var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
21
+ var Feather__default = /*#__PURE__*/_interopDefault(Feather);
22
+ var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
23
+ var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
24
+ var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
25
+
26
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
27
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
28
+ }) : x)(function(x) {
29
+ if (typeof require !== "undefined") return require.apply(this, arguments);
30
+ throw Error('Dynamic require of "' + x + '" is not supported');
31
+ });
32
+ var _haptics = null;
33
+ var _hapticsLoaded = false;
34
+ async function getHaptics() {
35
+ if (reactNative.Platform.OS === "web") return null;
36
+ if (!_hapticsLoaded) {
37
+ _hapticsLoaded = true;
38
+ try {
39
+ _haptics = await import('expo-haptics');
40
+ } catch {
41
+ _haptics = null;
42
+ }
43
+ }
44
+ return _haptics;
45
+ }
46
+ var _pulsar = null;
47
+ var _pulsarChecked = false;
48
+ var _pulsarAvailable = false;
49
+ function isPulsarNativeRegistered() {
50
+ try {
51
+ const g = globalThis;
52
+ if (typeof g.__turboModuleProxy === "function") {
53
+ return g.__turboModuleProxy("RNPulsar") != null;
54
+ }
55
+ return reactNative.NativeModules?.RNPulsar != null;
56
+ } catch {
57
+ return false;
58
+ }
59
+ }
60
+ function getPulsar() {
61
+ if (reactNative.Platform.OS === "web") return null;
62
+ if (!_pulsarChecked) {
63
+ _pulsarChecked = true;
64
+ try {
65
+ if (isPulsarNativeRegistered()) {
66
+ _pulsar = __require("react-native-pulsar");
67
+ _pulsarAvailable = true;
68
+ }
69
+ } catch {
70
+ _pulsar = null;
71
+ _pulsarAvailable = false;
72
+ }
73
+ }
74
+ return _pulsarAvailable ? _pulsar : null;
75
+ }
76
+ function selectionAsync() {
77
+ if (reactNative.Platform.OS === "web") return;
78
+ getHaptics().then((h) => {
79
+ if (h) {
80
+ h.selectionAsync();
81
+ } else {
82
+ getPulsar()?.Presets.System.selection();
83
+ }
84
+ });
85
+ }
86
+
87
+ // src/theme/colorUtils.ts
88
+ function hexToRgb(hex) {
89
+ const clean = hex.replace("#", "");
90
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
91
+ if (full.length !== 6) return null;
92
+ return {
93
+ r: parseInt(full.slice(0, 2), 16),
94
+ g: parseInt(full.slice(2, 4), 16),
95
+ b: parseInt(full.slice(4, 6), 16)
96
+ };
97
+ }
98
+ function componentToHex(c) {
99
+ return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
100
+ }
101
+ function rgbToHex(r, g, b) {
102
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
103
+ }
104
+ function withAlphaOnWhite(hex, alpha) {
105
+ const rgb = hexToRgb(hex);
106
+ if (!rgb) return hex;
107
+ const r = rgb.r * alpha + 255 * (1 - alpha);
108
+ const g = rgb.g * alpha + 255 * (1 - alpha);
109
+ const b = rgb.b * alpha + 255 * (1 - alpha);
110
+ return rgbToHex(r, g, b);
111
+ }
112
+ function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
113
+ const rgb = hexToRgb(hex);
114
+ const bg = hexToRgb(bgHex);
115
+ if (!rgb || !bg) return hex;
116
+ const r = rgb.r * alpha + bg.r * (1 - alpha);
117
+ const g = rgb.g * alpha + bg.g * (1 - alpha);
118
+ const b = rgb.b * alpha + bg.b * (1 - alpha);
119
+ return rgbToHex(r, g, b);
120
+ }
121
+ function mixWithBackground(fgHex, bgHex, opacity) {
122
+ const fg = hexToRgb(fgHex);
123
+ const bg = hexToRgb(bgHex);
124
+ if (!fg || !bg) return fgHex;
125
+ const r = fg.r * opacity + bg.r * (1 - opacity);
126
+ const g = fg.g * opacity + bg.g * (1 - opacity);
127
+ const b = fg.b * opacity + bg.b * (1 - opacity);
128
+ return rgbToHex(r, g, b);
129
+ }
130
+ function lighten(hex, amount) {
131
+ return withAlphaOnWhite(hex, 1 - amount);
132
+ }
133
+ function darken(hex, amount) {
134
+ const rgb = hexToRgb(hex);
135
+ if (!rgb) return hex;
136
+ return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
137
+ }
138
+
139
+ // src/theme/colors.ts
140
+ var defaultLight = {
141
+ background: "#ffffff",
142
+ foreground: "#1a1a1a",
143
+ card: "#ffffff",
144
+ primary: "#1a1a1a",
145
+ primaryForeground: "#ffffff",
146
+ // AUDIT FIX: brand accent — was undefined; falls back to primary when omitted
147
+ accent: "#d4561d",
148
+ accentForeground: "#ffffff",
149
+ border: "#dddddd",
150
+ // AUDIT FIX: was #e53935 (4.22:1 on white — fails AA); #c72828 = 5.59:1 ✓
151
+ destructive: "#c72828",
152
+ destructiveForeground: "#ffffff",
153
+ success: "#1a7a45",
154
+ successForeground: "#ffffff",
155
+ // AUDIT FIX: was #e67e00 (2.86:1 — severe fail); #9a5200 = 5.86:1 ✓ AAA-near
156
+ warning: "#9a5200",
157
+ warningForeground: "#ffffff"
158
+ };
159
+ function deriveColors(t, scheme) {
160
+ const dark = scheme === "dark";
161
+ const bg = t.background;
162
+ const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
163
+ const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
164
+ const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
165
+ const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
166
+ const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
167
+ const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
168
+ const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
169
+ const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
170
+ const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
171
+ const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
172
+ return {
173
+ ...t,
174
+ foregroundSubtle,
175
+ foregroundMuted,
176
+ surface,
177
+ surfaceStrong,
178
+ destructiveTint,
179
+ destructiveBorder,
180
+ successTint,
181
+ successBorder,
182
+ warningTint,
183
+ warningBorder,
184
+ overlay: t.overlay ?? "rgba(0,0,0,0.45)",
185
+ accentResolved: t.accent ?? t.primary,
186
+ accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
187
+ ring: t.accent ?? t.primary,
188
+ input: t.border,
189
+ separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
190
+ };
191
+ }
192
+
193
+ // src/theme/ThemeProvider.tsx
194
+ var ThemeContext = React3.createContext({
195
+ colors: deriveColors(defaultLight, "light"),
196
+ colorScheme: "light"
197
+ });
198
+ function useTheme() {
199
+ const context = React3.useContext(ThemeContext);
200
+ if (!context) {
201
+ throw new Error("useTheme must be used within a ThemeProvider");
202
+ }
203
+ return context;
204
+ }
205
+ var isWeb = reactNative.Platform.OS === "web";
206
+ var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
207
+ var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
208
+ var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
209
+ var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
210
+ var glyphMapOf = (mod) => mod.glyphMap ?? {};
211
+ var ALL_FAMILIES = [
212
+ { name: "Ionicons", component: Ionicons__default.default, getGlyphMap: () => glyphMapOf(Ionicons__default.default) },
213
+ { name: "MaterialIcons", component: MaterialIcons__default.default, getGlyphMap: () => glyphMapOf(MaterialIcons__default.default) },
214
+ { name: "FontAwesome5", component: FontAwesome5__default.default, getGlyphMap: () => glyphMapOf(FontAwesome5__default.default) },
215
+ { name: "Entypo", component: Entypo__default.default, getGlyphMap: () => glyphMapOf(Entypo__default.default) },
216
+ { name: "AntDesign", component: AntDesign__default.default, getGlyphMap: () => glyphMapOf(AntDesign__default.default) },
217
+ { name: "Feather", component: Feather__default.default, getGlyphMap: () => glyphMapOf(Feather__default.default) }
218
+ ];
219
+ var activeFamilies = ALL_FAMILIES;
220
+ var resolvedCache = null;
221
+ function buildCache() {
222
+ const cache = /* @__PURE__ */ new Map();
223
+ for (const family of activeFamilies) {
224
+ const glyphMap = family.getGlyphMap();
225
+ for (const iconName of Object.keys(glyphMap)) {
226
+ cache.set(iconName, family);
227
+ }
228
+ }
229
+ return cache;
230
+ }
231
+ function resolveFamily(name) {
232
+ if (!resolvedCache) {
233
+ resolvedCache = buildCache();
234
+ }
235
+ return resolvedCache.get(name) ?? null;
236
+ }
237
+ function Icon({ name, size, color, family }) {
238
+ let resolved = null;
239
+ if (family) {
240
+ resolved = ALL_FAMILIES.find((f) => f.name === family) ?? null;
241
+ } else {
242
+ resolved = resolveFamily(name);
243
+ }
244
+ if (!resolved) return null;
245
+ const Component = resolved.component;
246
+ return React3__default.default.createElement(Component, { name, size, color });
247
+ }
248
+ function renderIcon(name, size, color) {
249
+ return React3__default.default.createElement(Icon, { name, size, color });
250
+ }
251
+ var TIMINGS = {
252
+ /** Color/opacity transitions on toggles, checkboxes, switches. */
253
+ state: { duration: 160 }};
254
+ ({
255
+ /** Material-style ease-out — natural deceleration for state changes. */
256
+ standard: reactNativeReanimated.Easing.bezier(0.2, 0, 0, 1),
257
+ /** Strong ease-out for expanding surfaces (Accordion open). */
258
+ expand: reactNativeReanimated.Easing.bezier(0.23, 1, 0.32, 1),
259
+ /** Quick ease-in for collapsing. */
260
+ collapse: reactNativeReanimated.Easing.in(reactNativeReanimated.Easing.ease)
261
+ });
262
+ var COLOR_TRANSITION = {
263
+ type: "timing",
264
+ duration: TIMINGS.state.duration,
265
+ easing: [0.2, 0, 0, 1]
266
+ };
267
+ var PRESS_SCALE = {
268
+ button: 0.95,
269
+ card: 0.98,
270
+ row: 0.97,
271
+ chip: 0.94
272
+ };
273
+ pressto.createAnimatedPressable((progress) => {
274
+ "worklet";
275
+ const scale2 = 1 - (1 - PRESS_SCALE.button) * progress;
276
+ return { transform: [{ scale: scale2 }] };
277
+ });
278
+ pressto.createAnimatedPressable((progress) => {
279
+ "worklet";
280
+ const scale2 = 1 - (1 - PRESS_SCALE.card) * progress;
281
+ return { transform: [{ scale: scale2 }] };
282
+ });
283
+ pressto.createAnimatedPressable((progress) => {
284
+ "worklet";
285
+ const scale2 = 1 - (1 - PRESS_SCALE.row) * progress;
286
+ return { transform: [{ scale: scale2 }] };
287
+ });
288
+ var PressableChip = pressto.createAnimatedPressable((progress) => {
289
+ "worklet";
290
+ const scale2 = 1 - (1 - PRESS_SCALE.chip) * progress;
291
+ return { transform: [{ scale: scale2 }] };
292
+ });
293
+ pressto.createAnimatedPressable((progress) => {
294
+ "worklet";
295
+ const scale2 = 1 - (1 - PRESS_SCALE.button) * progress;
296
+ return { transform: [{ scale: scale2 }] };
297
+ });
298
+
299
+ // src/tokens.ts
300
+ var RADIUS = {
301
+ full: 9999
302
+ };
303
+
304
+ // src/components/SheetSelect/SheetSelect.tsx
305
+ function SheetSelectChip({
306
+ option,
307
+ selected,
308
+ onPress
309
+ }) {
310
+ const { colors } = useTheme();
311
+ const handlePress = () => {
312
+ selectionAsync();
313
+ onPress();
314
+ };
315
+ const iconColor = selected ? colors.primaryForeground : colors.foreground;
316
+ const resolvedIcon = option.iconName ? renderIcon(option.iconName, ms(13), iconColor) : null;
317
+ return /* @__PURE__ */ React3__default.default.createElement(
318
+ PressableChip,
319
+ {
320
+ onPress: option.disabled ? void 0 : handlePress,
321
+ rippleColor: "transparent",
322
+ touchSoundDisabled: true,
323
+ accessibilityRole: "button",
324
+ accessibilityLabel: option.disabled ? `${option.label}, unavailable` : option.label,
325
+ accessibilityState: { selected, disabled: option.disabled }
326
+ },
327
+ /* @__PURE__ */ React3__default.default.createElement(
328
+ reactNativeEase.EaseView,
329
+ {
330
+ style: [styles.chip, option.disabled && styles.chipDisabled],
331
+ animate: {
332
+ backgroundColor: selected ? colors.primary : colors.surface,
333
+ borderColor: selected ? colors.primary : colors.border
334
+ },
335
+ transition: COLOR_TRANSITION
336
+ },
337
+ resolvedIcon ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.chipIcon }, resolvedIcon) : null,
338
+ /* @__PURE__ */ React3__default.default.createElement(
339
+ reactNative.Text,
340
+ {
341
+ style: [styles.chipLabel, { color: selected ? colors.primaryForeground : colors.foreground }],
342
+ allowFontScaling: true
343
+ },
344
+ option.label
345
+ )
346
+ )
347
+ );
348
+ }
349
+ function SheetSelect({
350
+ options,
351
+ value,
352
+ onValueChange,
353
+ multiSelect = false,
354
+ label,
355
+ error,
356
+ wrap = false,
357
+ style,
358
+ accessibilityLabel
359
+ }) {
360
+ const { colors } = useTheme();
361
+ const isSelected = (optionValue) => {
362
+ if (Array.isArray(value)) return value.includes(optionValue);
363
+ return optionValue === value;
364
+ };
365
+ const handlePress = (optionValue) => {
366
+ if (!multiSelect) {
367
+ onValueChange?.(optionValue);
368
+ return;
369
+ }
370
+ const currentArray = Array.isArray(value) ? value : value != null ? [value] : [];
371
+ const alreadySelected = currentArray.includes(optionValue);
372
+ const newArray = alreadySelected ? currentArray.filter((v) => v !== optionValue) : [...currentArray, optionValue];
373
+ onValueChange?.(newArray);
374
+ };
375
+ const chips = options.map((opt) => /* @__PURE__ */ React3__default.default.createElement(
376
+ SheetSelectChip,
377
+ {
378
+ key: opt.value,
379
+ option: opt,
380
+ selected: isSelected(opt.value),
381
+ onPress: () => handlePress(opt.value)
382
+ }
383
+ ));
384
+ return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.container, style], accessibilityLabel }, label ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, wrap ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.wrapContainer }, chips) : /* @__PURE__ */ React3__default.default.createElement(
385
+ reactNative.ScrollView,
386
+ {
387
+ horizontal: true,
388
+ showsHorizontalScrollIndicator: false,
389
+ contentContainerStyle: styles.scrollContent
390
+ },
391
+ chips
392
+ ), error ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.error, { color: colors.destructive }], allowFontScaling: true, accessibilityLiveRegion: "polite" }, error) : null);
393
+ }
394
+ var styles = reactNative.StyleSheet.create({
395
+ container: {
396
+ gap: vs(8)
397
+ },
398
+ label: {
399
+ fontFamily: "Sohne-Medium",
400
+ fontSize: ms(14)
401
+ },
402
+ scrollContent: {
403
+ flexDirection: "row",
404
+ gap: s(8)
405
+ },
406
+ wrapContainer: {
407
+ flexDirection: "row",
408
+ flexWrap: "wrap",
409
+ gap: s(8)
410
+ },
411
+ chip: {
412
+ borderRadius: RADIUS.full,
413
+ paddingHorizontal: s(14),
414
+ paddingVertical: vs(10),
415
+ minHeight: 44,
416
+ borderWidth: 1,
417
+ alignItems: "center",
418
+ justifyContent: "center",
419
+ flexDirection: "row",
420
+ gap: s(5)
421
+ },
422
+ chipDisabled: {
423
+ opacity: 0.4
424
+ },
425
+ chipIcon: {
426
+ alignItems: "center",
427
+ justifyContent: "center"
428
+ },
429
+ chipLabel: {
430
+ fontFamily: "Sohne-Medium",
431
+ fontSize: ms(13),
432
+ lineHeight: mvs(18)
433
+ },
434
+ error: {
435
+ fontFamily: "Sohne-Regular",
436
+ fontSize: ms(13)
437
+ }
438
+ });
439
+
440
+ exports.SheetSelect = SheetSelect;
@@ -0,0 +1,9 @@
1
+ export { SheetSelect } from './chunk-URI2WBIV.mjs';
2
+ import './chunk-3DKJ2GIC.mjs';
3
+ import './chunk-EJ7ZPXOH.mjs';
4
+ import './chunk-DVK4G2GT.mjs';
5
+ import './chunk-QY3X2UYR.mjs';
6
+ import './chunk-T7XZ7H7Y.mjs';
7
+ import './chunk-SOYNZDVY.mjs';
8
+ import './chunk-2CE3TQVY.mjs';
9
+ import './chunk-Y6FXYEAI.mjs';
@@ -1,12 +1,12 @@
1
1
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
2
2
  import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
3
3
  import { useTheme } from './chunk-SOYNZDVY.mjs';
4
- import { ms, vs, s } from './chunk-2CE3TQVY.mjs';
4
+ import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
5
5
  import React from 'react';
6
- import { StyleSheet, View, Text } from 'react-native';
7
- import { FontAwesome5, MaterialIcons, Entypo } from '@expo/vector-icons';
6
+ import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
7
+ import { FontAwesome5, MaterialIcons, Entypo, Feather } from '@expo/vector-icons';
8
8
 
9
- function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
9
+ function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, onDismiss, style }) {
10
10
  const { colors, colorScheme } = useTheme();
11
11
  const isDark = colorScheme === "dark";
12
12
  const accentColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : variant === "warning" ? colors.warning : colors.foreground;
@@ -32,7 +32,18 @@ function AlertBanner({ title, description, variant = "default", icon, iconName,
32
32
  accessibilityLabel: a11yLabel
33
33
  },
34
34
  /* @__PURE__ */ React.createElement(View, { style: styles.iconSlot }, effectiveIcon),
35
- /* @__PURE__ */ React.createElement(View, { style: styles.content }, /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foreground, opacity: 0.85 }], allowFontScaling: true }, description) : null)
35
+ /* @__PURE__ */ React.createElement(View, { style: styles.content }, /* @__PURE__ */ React.createElement(Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title), description ? /* @__PURE__ */ React.createElement(Text, { style: [styles.description, { color: colors.foreground, opacity: 0.85 }], allowFontScaling: true }, description) : null),
36
+ onDismiss ? /* @__PURE__ */ React.createElement(
37
+ TouchableOpacity,
38
+ {
39
+ onPress: onDismiss,
40
+ style: styles.dismissButton,
41
+ activeOpacity: 0.6,
42
+ accessibilityRole: "button",
43
+ accessibilityLabel: "Dismiss"
44
+ },
45
+ /* @__PURE__ */ React.createElement(Feather, { name: "x", size: ms(16), color: colors.foregroundMuted })
46
+ ) : null
36
47
  );
37
48
  }
38
49
  var styles = StyleSheet.create({
@@ -58,6 +69,11 @@ var styles = StyleSheet.create({
58
69
  description: {
59
70
  fontFamily: "Sohne-Regular",
60
71
  fontSize: ms(12)
72
+ },
73
+ dismissButton: {
74
+ padding: s(4),
75
+ marginTop: vs(-2),
76
+ marginRight: -s(4)
61
77
  }
62
78
  });
63
79
 
@@ -14,6 +14,7 @@ function ConfirmDialog({
14
14
  confirmLabel = "Confirm",
15
15
  cancelLabel = "Cancel",
16
16
  confirmVariant = "primary",
17
+ loading = false,
17
18
  onConfirm,
18
19
  onCancel
19
20
  }) {
@@ -53,6 +54,8 @@ function ConfirmDialog({
53
54
  label: confirmLabel,
54
55
  variant: confirmVariant,
55
56
  fullWidth: true,
57
+ loading,
58
+ disabled: loading,
56
59
  onPress: () => {
57
60
  notificationSuccess();
58
61
  onConfirm();
@@ -1,4 +1,4 @@
1
- import { Input } from './chunk-756RAKE4.mjs';
1
+ import { Input } from './chunk-LVYEU5ZK.mjs';
2
2
  import { ms, vs } from './chunk-2CE3TQVY.mjs';
3
3
  import React from 'react';
4
4
 
@@ -20,7 +20,8 @@ function CurrencyInput({
20
20
  placeholder,
21
21
  editable,
22
22
  containerStyle,
23
- style
23
+ style,
24
+ sheetMode
24
25
  }) {
25
26
  const handleChange = (text) => {
26
27
  const withoutPrefix = prefix && text.startsWith(prefix) ? text.slice(prefix.length) : text;
@@ -53,7 +54,8 @@ function CurrencyInput({
53
54
  prefixStyle,
54
55
  containerStyle,
55
56
  inputWrapperStyle: isLarge ? { paddingVertical: vs(16), minHeight: 72 } : void 0,
56
- style: [inputStyle, style]
57
+ style: [inputStyle, style],
58
+ sheetMode
57
59
  }
58
60
  );
59
61
  }
@@ -5,11 +5,12 @@ import { useTheme } from './chunk-SOYNZDVY.mjs';
5
5
  import { ms, s, vs } from './chunk-2CE3TQVY.mjs';
6
6
  import React, { useState } from 'react';
7
7
  import { Platform, StyleSheet, TouchableOpacity, View, Text, TextInput } from 'react-native';
8
+ import { BottomSheetTextInput } from '@gorhom/bottom-sheet';
8
9
  import Animated, { useAnimatedStyle, interpolate, interpolateColor } from 'react-native-reanimated';
9
10
  import { AntDesign } from '@expo/vector-icons';
10
11
 
11
12
  var webInputResetStyle = Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
12
- function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, inputWrapperStyle, style, onFocus, onBlur, secureTextEntry, editable, accessibilityLabel, ...props }) {
13
+ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, inputWrapperStyle, sheetMode = false, style, onFocus, onBlur, secureTextEntry, editable, accessibilityLabel, ...props }) {
13
14
  const { colors } = useTheme();
14
15
  const [focused, setFocused] = useState(false);
15
16
  const [showPassword, setShowPassword] = useState(false);
@@ -46,7 +47,31 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
46
47
  },
47
48
  /* @__PURE__ */ React.createElement(Animated.View, { style: [styles.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
48
49
  effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React.createElement(Text, { style: [styles.prefixText, { color: colors.foregroundMuted }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React.createElement(View, { style: styles.prefixContainer }, effectivePrefix) : null,
49
- /* @__PURE__ */ React.createElement(
50
+ sheetMode ? /* @__PURE__ */ React.createElement(
51
+ BottomSheetTextInput,
52
+ {
53
+ style: [
54
+ styles.input,
55
+ { color: colors.foreground },
56
+ webInputResetStyle,
57
+ style
58
+ ],
59
+ onFocus: (e) => {
60
+ setFocused(true);
61
+ onFocus?.(e);
62
+ },
63
+ onBlur: (e) => {
64
+ setFocused(false);
65
+ onBlur?.(e);
66
+ },
67
+ placeholderTextColor: colors.foregroundMuted,
68
+ allowFontScaling: true,
69
+ secureTextEntry: effectiveSecure,
70
+ editable: isDisabled ? false : editable,
71
+ accessibilityLabel: accessibilityLabel ?? label,
72
+ ...props
73
+ }
74
+ ) : /* @__PURE__ */ React.createElement(
50
75
  TextInput,
51
76
  {
52
77
  style: [
@@ -28,6 +28,7 @@ function ListItemBase({
28
28
  style,
29
29
  titleStyle,
30
30
  subtitleStyle,
31
+ subtitleNumberOfLines = 2,
31
32
  captionStyle,
32
33
  accessibilityLabel
33
34
  }) {
@@ -62,7 +63,7 @@ function ListItemBase({
62
63
  Text,
63
64
  {
64
65
  style: [styles.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
65
- numberOfLines: 2,
66
+ numberOfLines: subtitleNumberOfLines,
66
67
  allowFontScaling: true
67
68
  },
68
69
  subtitle