@retray-dev/ui-kit 9.1.0 → 9.3.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 (64) hide show
  1. package/COMPONENTS.md +166 -4
  2. package/CONSUMER.md +247 -0
  3. package/DESIGN.md +668 -0
  4. package/FONTS.md +107 -0
  5. package/README.md +3 -3
  6. package/dist/AlertBanner.d.mts +3 -1
  7. package/dist/AlertBanner.d.ts +3 -1
  8. package/dist/AlertBanner.js +18 -2
  9. package/dist/AlertBanner.mjs +1 -1
  10. package/dist/ConfirmDialog.d.mts +3 -1
  11. package/dist/ConfirmDialog.d.ts +3 -1
  12. package/dist/ConfirmDialog.js +3 -0
  13. package/dist/ConfirmDialog.mjs +1 -1
  14. package/dist/CurrencyInput.d.mts +3 -1
  15. package/dist/CurrencyInput.d.ts +3 -1
  16. package/dist/CurrencyInput.js +52 -39
  17. package/dist/CurrencyInput.mjs +2 -3
  18. package/dist/ImageUpload.d.mts +27 -0
  19. package/dist/ImageUpload.d.ts +27 -0
  20. package/dist/ImageUpload.js +399 -0
  21. package/dist/ImageUpload.mjs +9 -0
  22. package/dist/Input.d.mts +3 -1
  23. package/dist/Input.d.ts +3 -1
  24. package/dist/Input.js +48 -37
  25. package/dist/Input.mjs +1 -2
  26. package/dist/ListItem.d.mts +9 -2
  27. package/dist/ListItem.d.ts +9 -2
  28. package/dist/ListItem.js +9 -2
  29. package/dist/ListItem.mjs +1 -1
  30. package/dist/SheetSelect.d.mts +25 -0
  31. package/dist/SheetSelect.d.ts +25 -0
  32. package/dist/SheetSelect.js +440 -0
  33. package/dist/SheetSelect.mjs +9 -0
  34. package/dist/Textarea.mjs +1 -2
  35. package/dist/{chunk-M6ZXVBTK.mjs → chunk-6MKGPAR2.mjs} +21 -5
  36. package/dist/{chunk-EH745HE5.mjs → chunk-CZCQZHG6.mjs} +13 -4
  37. package/dist/{chunk-7QHVVCB3.mjs → chunk-FZZLPJ6B.mjs} +3 -0
  38. package/dist/{chunk-MAC465BB.mjs → chunk-JUXSWN54.mjs} +5 -3
  39. package/dist/{chunk-BNP626TY.mjs → chunk-OHBNABL5.mjs} +10 -3
  40. package/dist/chunk-URI2WBIV.mjs +147 -0
  41. package/dist/chunk-Y4GL2MHX.mjs +112 -0
  42. package/dist/{chunk-756RAKE4.mjs → chunk-ZUR7AU5R.mjs} +38 -20
  43. package/dist/fonts.d.mts +32 -0
  44. package/dist/fonts.d.ts +32 -0
  45. package/dist/fonts.js +44 -0
  46. package/dist/fonts.mjs +37 -0
  47. package/dist/index.d.mts +26 -1
  48. package/dist/index.d.ts +26 -1
  49. package/dist/index.js +425 -106
  50. package/dist/index.mjs +55 -17
  51. package/package.json +23 -6
  52. package/src/components/AlertBanner/AlertBanner.tsx +21 -3
  53. package/src/components/ConfirmDialog/ConfirmDialog.tsx +5 -0
  54. package/src/components/CurrencyInput/CurrencyInput.tsx +4 -0
  55. package/src/components/ImageUpload/ImageUpload.tsx +158 -0
  56. package/src/components/ImageUpload/index.ts +1 -0
  57. package/src/components/Input/Input.tsx +64 -53
  58. package/src/components/ListItem/ListItem.tsx +23 -4
  59. package/src/components/SheetSelect/SheetSelect.tsx +192 -0
  60. package/src/components/SheetSelect/index.ts +1 -0
  61. package/src/fonts.ts +30 -29
  62. package/src/hooks/useConfirmDialog.ts +67 -0
  63. package/src/index.ts +6 -0
  64. package/dist/chunk-26BCI223.mjs +0 -14
@@ -5,10 +5,11 @@ import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
5
5
  import { useTheme } from './chunk-SOYNZDVY.mjs';
6
6
  import { ms, s, mvs, vs } from './chunk-2CE3TQVY.mjs';
7
7
  import React from 'react';
8
- import { StyleSheet, View, Text } from 'react-native';
8
+ import { StyleSheet, Image, View, Text } from 'react-native';
9
9
  import { Entypo } from '@expo/vector-icons';
10
10
 
11
11
  function ListItemBase({
12
+ imageSource,
12
13
  leftRender,
13
14
  rightRender,
14
15
  trailing,
@@ -28,6 +29,7 @@ function ListItemBase({
28
29
  style,
29
30
  titleStyle,
30
31
  subtitleStyle,
32
+ subtitleNumberOfLines = 2,
31
33
  captionStyle,
32
34
  accessibilityLabel
33
35
  }) {
@@ -36,7 +38,7 @@ function ListItemBase({
36
38
  selectionAsync();
37
39
  onPress?.();
38
40
  };
39
- const effectiveLeft = leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
41
+ const effectiveLeft = imageSource ? /* @__PURE__ */ React.createElement(Image, { source: imageSource, style: styles.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
40
42
  const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted) : rightRender ?? trailing;
41
43
  const cardStyle = variant === "card" ? {
42
44
  backgroundColor: colors.card,
@@ -62,7 +64,7 @@ function ListItemBase({
62
64
  Text,
63
65
  {
64
66
  style: [styles.subtitle, { color: colors.foregroundMuted }, subtitleStyle],
65
- numberOfLines: 2,
67
+ numberOfLines: subtitleNumberOfLines,
66
68
  allowFontScaling: true
67
69
  },
68
70
  subtitle
@@ -117,6 +119,11 @@ var styles = StyleSheet.create({
117
119
  justifyContent: "center",
118
120
  flexShrink: 0
119
121
  },
122
+ image: {
123
+ width: s(40),
124
+ height: s(40),
125
+ borderRadius: 8
126
+ },
120
127
  content: {
121
128
  flex: 1,
122
129
  gap: vs(4)
@@ -0,0 +1,147 @@
1
+ import { PressableChip } from './chunk-3DKJ2GIC.mjs';
2
+ import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
+ import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
4
+ import { RADIUS } from './chunk-QY3X2UYR.mjs';
5
+ import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
6
+ import { useTheme } from './chunk-SOYNZDVY.mjs';
7
+ import { ms, mvs, s, vs } from './chunk-2CE3TQVY.mjs';
8
+ import React from 'react';
9
+ import { StyleSheet, View, Text, ScrollView } from 'react-native';
10
+ import { EaseView } from 'react-native-ease';
11
+
12
+ function SheetSelectChip({
13
+ option,
14
+ selected,
15
+ onPress
16
+ }) {
17
+ const { colors } = useTheme();
18
+ const handlePress = () => {
19
+ selectionAsync();
20
+ onPress();
21
+ };
22
+ const iconColor = selected ? colors.primaryForeground : colors.foreground;
23
+ const resolvedIcon = option.iconName ? renderIcon(option.iconName, ms(13), iconColor) : null;
24
+ return /* @__PURE__ */ React.createElement(
25
+ PressableChip,
26
+ {
27
+ onPress: option.disabled ? void 0 : handlePress,
28
+ rippleColor: "transparent",
29
+ touchSoundDisabled: true,
30
+ accessibilityRole: "button",
31
+ accessibilityLabel: option.disabled ? `${option.label}, unavailable` : option.label,
32
+ accessibilityState: { selected, disabled: option.disabled }
33
+ },
34
+ /* @__PURE__ */ React.createElement(
35
+ EaseView,
36
+ {
37
+ style: [styles.chip, option.disabled && styles.chipDisabled],
38
+ animate: {
39
+ backgroundColor: selected ? colors.primary : colors.surface,
40
+ borderColor: selected ? colors.primary : colors.border
41
+ },
42
+ transition: COLOR_TRANSITION
43
+ },
44
+ resolvedIcon ? /* @__PURE__ */ React.createElement(View, { style: styles.chipIcon }, resolvedIcon) : null,
45
+ /* @__PURE__ */ React.createElement(
46
+ Text,
47
+ {
48
+ style: [styles.chipLabel, { color: selected ? colors.primaryForeground : colors.foreground }],
49
+ allowFontScaling: true
50
+ },
51
+ option.label
52
+ )
53
+ )
54
+ );
55
+ }
56
+ function SheetSelect({
57
+ options,
58
+ value,
59
+ onValueChange,
60
+ multiSelect = false,
61
+ label,
62
+ error,
63
+ wrap = false,
64
+ style,
65
+ accessibilityLabel
66
+ }) {
67
+ const { colors } = useTheme();
68
+ const isSelected = (optionValue) => {
69
+ if (Array.isArray(value)) return value.includes(optionValue);
70
+ return optionValue === value;
71
+ };
72
+ const handlePress = (optionValue) => {
73
+ if (!multiSelect) {
74
+ onValueChange?.(optionValue);
75
+ return;
76
+ }
77
+ const currentArray = Array.isArray(value) ? value : value != null ? [value] : [];
78
+ const alreadySelected = currentArray.includes(optionValue);
79
+ const newArray = alreadySelected ? currentArray.filter((v) => v !== optionValue) : [...currentArray, optionValue];
80
+ onValueChange?.(newArray);
81
+ };
82
+ const chips = options.map((opt) => /* @__PURE__ */ React.createElement(
83
+ SheetSelectChip,
84
+ {
85
+ key: opt.value,
86
+ option: opt,
87
+ selected: isSelected(opt.value),
88
+ onPress: () => handlePress(opt.value)
89
+ }
90
+ ));
91
+ return /* @__PURE__ */ React.createElement(View, { style: [styles.container, style], accessibilityLabel }, label ? /* @__PURE__ */ React.createElement(Text, { style: [styles.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, wrap ? /* @__PURE__ */ React.createElement(View, { style: styles.wrapContainer }, chips) : /* @__PURE__ */ React.createElement(
92
+ ScrollView,
93
+ {
94
+ horizontal: true,
95
+ showsHorizontalScrollIndicator: false,
96
+ contentContainerStyle: styles.scrollContent
97
+ },
98
+ chips
99
+ ), error ? /* @__PURE__ */ React.createElement(Text, { style: [styles.error, { color: colors.destructive }], allowFontScaling: true, accessibilityLiveRegion: "polite" }, error) : null);
100
+ }
101
+ var styles = StyleSheet.create({
102
+ container: {
103
+ gap: vs(8)
104
+ },
105
+ label: {
106
+ fontFamily: "Sohne-Medium",
107
+ fontSize: ms(14)
108
+ },
109
+ scrollContent: {
110
+ flexDirection: "row",
111
+ gap: s(8)
112
+ },
113
+ wrapContainer: {
114
+ flexDirection: "row",
115
+ flexWrap: "wrap",
116
+ gap: s(8)
117
+ },
118
+ chip: {
119
+ borderRadius: RADIUS.full,
120
+ paddingHorizontal: s(14),
121
+ paddingVertical: vs(10),
122
+ minHeight: 44,
123
+ borderWidth: 1,
124
+ alignItems: "center",
125
+ justifyContent: "center",
126
+ flexDirection: "row",
127
+ gap: s(5)
128
+ },
129
+ chipDisabled: {
130
+ opacity: 0.4
131
+ },
132
+ chipIcon: {
133
+ alignItems: "center",
134
+ justifyContent: "center"
135
+ },
136
+ chipLabel: {
137
+ fontFamily: "Sohne-Medium",
138
+ fontSize: ms(13),
139
+ lineHeight: mvs(18)
140
+ },
141
+ error: {
142
+ fontFamily: "Sohne-Regular",
143
+ fontSize: ms(13)
144
+ }
145
+ });
146
+
147
+ export { SheetSelect };
@@ -0,0 +1,112 @@
1
+ import { Spinner } from './chunk-WBOOUHSS.mjs';
2
+ import { PressableCard } from './chunk-3DKJ2GIC.mjs';
3
+ import { impactLight } from './chunk-EJ7ZPXOH.mjs';
4
+ import { RADIUS } from './chunk-QY3X2UYR.mjs';
5
+ import { useTheme } from './chunk-SOYNZDVY.mjs';
6
+ import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
7
+ import React from 'react';
8
+ import { StyleSheet, Image, View, Text, Platform } from 'react-native';
9
+ import { Feather } from '@expo/vector-icons';
10
+
11
+ function ImageUpload({
12
+ value,
13
+ onChange,
14
+ loading = false,
15
+ placeholder = "Tap to add image",
16
+ width,
17
+ height = 200,
18
+ borderRadius = RADIUS.lg,
19
+ resizeMode = "cover",
20
+ disabled = false,
21
+ style,
22
+ accessibilityLabel
23
+ }) {
24
+ const { colors } = useTheme();
25
+ const handlePress = async () => {
26
+ if (disabled || loading) return;
27
+ impactLight();
28
+ let ImagePicker;
29
+ try {
30
+ ImagePicker = await import('expo-image-picker');
31
+ } catch {
32
+ if (__DEV__) console.warn("[ImageUpload] expo-image-picker not installed. Add it as a dependency.");
33
+ return;
34
+ }
35
+ if (Platform.OS !== "web") {
36
+ const { status } = await ImagePicker.requestMediaLibraryPermissionsAsync();
37
+ if (status !== "granted") return;
38
+ }
39
+ const result = await ImagePicker.launchImageLibraryAsync({
40
+ mediaTypes: ["images"],
41
+ allowsEditing: true,
42
+ quality: 0.8
43
+ });
44
+ if (!result.canceled && result.assets[0]) {
45
+ onChange?.(result.assets[0].uri);
46
+ }
47
+ };
48
+ const containerStyle = {
49
+ width,
50
+ height,
51
+ borderRadius,
52
+ borderWidth: value ? 0 : 1,
53
+ borderStyle: "dashed",
54
+ borderColor: colors.border,
55
+ backgroundColor: value ? "transparent" : colors.surface,
56
+ overflow: "hidden"
57
+ };
58
+ return /* @__PURE__ */ React.createElement(
59
+ PressableCard,
60
+ {
61
+ onPress: handlePress,
62
+ enabled: !disabled && !loading,
63
+ rippleColor: "transparent",
64
+ touchSoundDisabled: true,
65
+ accessibilityRole: "button",
66
+ accessibilityLabel: accessibilityLabel ?? (value ? "Change image" : placeholder),
67
+ accessibilityState: { disabled: disabled || loading },
68
+ style: [containerStyle, style]
69
+ },
70
+ value ? /* @__PURE__ */ React.createElement(
71
+ Image,
72
+ {
73
+ source: { uri: value },
74
+ style: [StyleSheet.absoluteFillObject, { borderRadius }],
75
+ resizeMode
76
+ }
77
+ ) : /* @__PURE__ */ React.createElement(View, { style: styles.placeholder }, /* @__PURE__ */ React.createElement(Feather, { name: "image", size: ms(28), color: colors.foregroundMuted }), /* @__PURE__ */ React.createElement(Text, { style: [styles.placeholderText, { color: colors.foregroundMuted }], allowFontScaling: true }, placeholder)),
78
+ loading ? /* @__PURE__ */ React.createElement(View, { style: [styles.loadingOverlay, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React.createElement(Spinner, { size: "md" })) : null,
79
+ value && !loading ? /* @__PURE__ */ React.createElement(View, { style: styles.editBadge, pointerEvents: "none" }, /* @__PURE__ */ React.createElement(View, { style: [styles.editBadgeInner, { backgroundColor: colors.overlay }] }, /* @__PURE__ */ React.createElement(Feather, { name: "edit-2", size: ms(12), color: "#fff" }))) : null
80
+ );
81
+ }
82
+ var styles = StyleSheet.create({
83
+ placeholder: {
84
+ flex: 1,
85
+ alignItems: "center",
86
+ justifyContent: "center",
87
+ gap: vs(8)
88
+ },
89
+ placeholderText: {
90
+ fontFamily: "Sohne-Regular",
91
+ fontSize: ms(13)
92
+ },
93
+ loadingOverlay: {
94
+ ...StyleSheet.absoluteFillObject,
95
+ alignItems: "center",
96
+ justifyContent: "center"
97
+ },
98
+ editBadge: {
99
+ position: "absolute",
100
+ bottom: vs(8),
101
+ right: s(8)
102
+ },
103
+ editBadgeInner: {
104
+ width: s(28),
105
+ height: s(28),
106
+ borderRadius: 999,
107
+ alignItems: "center",
108
+ justifyContent: "center"
109
+ }
110
+ });
111
+
112
+ export { ImageUpload };
@@ -1,21 +1,18 @@
1
- import { useColorTransition } from './chunk-26BCI223.mjs';
2
- import { TIMINGS } from './chunk-DVK4G2GT.mjs';
1
+ import { COLOR_TRANSITION } from './chunk-DVK4G2GT.mjs';
3
2
  import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
4
3
  import { useTheme } from './chunk-SOYNZDVY.mjs';
5
4
  import { ms, s, vs } from './chunk-2CE3TQVY.mjs';
6
5
  import React, { useState } from 'react';
7
6
  import { Platform, StyleSheet, TouchableOpacity, View, Text, TextInput } from 'react-native';
8
- import Animated, { useAnimatedStyle, interpolate, interpolateColor } from 'react-native-reanimated';
7
+ import { BottomSheetTextInput } from '@gorhom/bottom-sheet';
8
+ import { EaseView } from 'react-native-ease';
9
9
  import { AntDesign } from '@expo/vector-icons';
10
10
 
11
11
  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 }) {
12
+ 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
13
  const { colors } = useTheme();
14
14
  const [focused, setFocused] = useState(false);
15
15
  const [showPassword, setShowPassword] = useState(false);
16
- const focusProgress = useColorTransition(focused, {
17
- duration: focused ? TIMINGS.focusIn.duration : TIMINGS.focusOut.duration
18
- });
19
16
  const isDisabled = disabled || editable === false;
20
17
  const isPassword = type === "password";
21
18
  const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
@@ -31,22 +28,45 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
31
28
  },
32
29
  /* @__PURE__ */ React.createElement(AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })
33
30
  ) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.foregroundMuted) : suffix;
34
- const borderAnimStyle = useAnimatedStyle(() => ({
35
- borderColor: error ? colors.destructive : interpolateColor(focusProgress.value, [0, 1], [colors.border, colors.primary]),
36
- borderWidth: error ? 2 : interpolate(focusProgress.value, [0, 1], [1, 2])
37
- }));
31
+ const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
38
32
  return /* @__PURE__ */ React.createElement(View, { style: [styles.container, isDisabled && styles.containerDisabled, containerStyle] }, label ? /* @__PURE__ */ React.createElement(Text, { style: [styles.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React.createElement(
39
- Animated.View,
33
+ EaseView,
40
34
  {
41
35
  style: [
42
36
  styles.inputWrapper,
43
37
  { backgroundColor: isDisabled ? colors.surface : colors.background },
38
+ error && styles.inputWrapperError,
44
39
  inputWrapperStyle
45
- ]
40
+ ],
41
+ animate: { borderColor },
42
+ transition: COLOR_TRANSITION
46
43
  },
47
- /* @__PURE__ */ React.createElement(Animated.View, { style: [styles.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
48
44
  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(
45
+ sheetMode ? /* @__PURE__ */ React.createElement(
46
+ BottomSheetTextInput,
47
+ {
48
+ style: [
49
+ styles.input,
50
+ { color: colors.foreground },
51
+ webInputResetStyle,
52
+ style
53
+ ],
54
+ onFocus: (e) => {
55
+ setFocused(true);
56
+ onFocus?.(e);
57
+ },
58
+ onBlur: (e) => {
59
+ setFocused(false);
60
+ onBlur?.(e);
61
+ },
62
+ placeholderTextColor: colors.foregroundMuted,
63
+ allowFontScaling: true,
64
+ secureTextEntry: effectiveSecure,
65
+ editable: isDisabled ? false : editable,
66
+ accessibilityLabel: accessibilityLabel ?? label,
67
+ ...props
68
+ }
69
+ ) : /* @__PURE__ */ React.createElement(
50
70
  TextInput,
51
71
  {
52
72
  style: [
@@ -96,16 +116,14 @@ var styles = StyleSheet.create({
96
116
  inputWrapper: {
97
117
  flexDirection: "row",
98
118
  alignItems: "center",
99
- // Border lives on borderOverlay (absolute) so its 1px→2px focus change
100
- // never resizes this box. Wrapper itself carries no border.
101
119
  borderRadius: 8,
120
+ borderWidth: 1,
102
121
  paddingHorizontal: s(14),
103
122
  paddingVertical: vs(11),
104
123
  minHeight: 48
105
124
  },
106
- borderOverlay: {
107
- ...StyleSheet.absoluteFillObject,
108
- borderRadius: 8
125
+ inputWrapperError: {
126
+ borderWidth: 2
109
127
  },
110
128
  input: {
111
129
  fontFamily: "Sohne-Regular",
@@ -0,0 +1,32 @@
1
+ declare const SohneFonts: {
2
+ readonly 'Sohne-ExtraLight': number;
3
+ readonly 'Sohne-ExtraLightItalic': number;
4
+ readonly 'Sohne-Light': number;
5
+ readonly 'Sohne-LightItalic': number;
6
+ readonly 'Sohne-Regular': number;
7
+ readonly 'Sohne-Italic': number;
8
+ readonly 'Sohne-Medium': number;
9
+ readonly 'Sohne-MediumItalic': number;
10
+ readonly 'Sohne-SemiBold': number;
11
+ readonly 'Sohne-SemiBoldItalic': number;
12
+ readonly 'Sohne-Bold': number;
13
+ readonly 'Sohne-BoldItalic': number;
14
+ readonly 'Sohne-ExtraBold': number;
15
+ readonly 'Sohne-ExtraBoldItalic': number;
16
+ readonly 'SohneMono-ExtraLight': number;
17
+ readonly 'SohneMono-ExtraLightItalic': number;
18
+ readonly 'SohneMono-Light': number;
19
+ readonly 'SohneMono-LightItalic': number;
20
+ readonly 'SohneMono-Regular': number;
21
+ readonly 'SohneMono-Italic': number;
22
+ readonly 'SohneMono-Medium': number;
23
+ readonly 'SohneMono-MediumItalic': number;
24
+ readonly 'SohneMono-SemiBold': number;
25
+ readonly 'SohneMono-SemiBoldItalic': number;
26
+ readonly 'SohneMono-Bold': number;
27
+ readonly 'SohneMono-BoldItalic': number;
28
+ readonly 'SohneMono-ExtraBold': number;
29
+ readonly 'SohneMono-ExtraBoldItalic': number;
30
+ };
31
+
32
+ export { SohneFonts };
@@ -0,0 +1,32 @@
1
+ declare const SohneFonts: {
2
+ readonly 'Sohne-ExtraLight': number;
3
+ readonly 'Sohne-ExtraLightItalic': number;
4
+ readonly 'Sohne-Light': number;
5
+ readonly 'Sohne-LightItalic': number;
6
+ readonly 'Sohne-Regular': number;
7
+ readonly 'Sohne-Italic': number;
8
+ readonly 'Sohne-Medium': number;
9
+ readonly 'Sohne-MediumItalic': number;
10
+ readonly 'Sohne-SemiBold': number;
11
+ readonly 'Sohne-SemiBoldItalic': number;
12
+ readonly 'Sohne-Bold': number;
13
+ readonly 'Sohne-BoldItalic': number;
14
+ readonly 'Sohne-ExtraBold': number;
15
+ readonly 'Sohne-ExtraBoldItalic': number;
16
+ readonly 'SohneMono-ExtraLight': number;
17
+ readonly 'SohneMono-ExtraLightItalic': number;
18
+ readonly 'SohneMono-Light': number;
19
+ readonly 'SohneMono-LightItalic': number;
20
+ readonly 'SohneMono-Regular': number;
21
+ readonly 'SohneMono-Italic': number;
22
+ readonly 'SohneMono-Medium': number;
23
+ readonly 'SohneMono-MediumItalic': number;
24
+ readonly 'SohneMono-SemiBold': number;
25
+ readonly 'SohneMono-SemiBoldItalic': number;
26
+ readonly 'SohneMono-Bold': number;
27
+ readonly 'SohneMono-BoldItalic': number;
28
+ readonly 'SohneMono-ExtraBold': number;
29
+ readonly 'SohneMono-ExtraBoldItalic': number;
30
+ };
31
+
32
+ export { SohneFonts };
package/dist/fonts.js ADDED
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+
10
+ // src/fonts.ts
11
+ var SohneFonts = {
12
+ // Sohne base
13
+ "Sohne-ExtraLight": __require("../src/assets/fonts/Sohne-ExtraLight.otf"),
14
+ "Sohne-ExtraLightItalic": __require("../src/assets/fonts/Sohne-ExtraLightItalic.otf"),
15
+ "Sohne-Light": __require("../src/assets/fonts/Sohne-Light.otf"),
16
+ "Sohne-LightItalic": __require("../src/assets/fonts/Sohne-LightItalic.otf"),
17
+ "Sohne-Regular": __require("../src/assets/fonts/Sohne-Regular.otf"),
18
+ "Sohne-Italic": __require("../src/assets/fonts/Sohne-Italic.otf"),
19
+ "Sohne-Medium": __require("../src/assets/fonts/Sohne-Medium.otf"),
20
+ "Sohne-MediumItalic": __require("../src/assets/fonts/Sohne-MediumItalic.otf"),
21
+ "Sohne-SemiBold": __require("../src/assets/fonts/Sohne-SemiBold.otf"),
22
+ "Sohne-SemiBoldItalic": __require("../src/assets/fonts/Sohne-SemiBoldItalic.otf"),
23
+ "Sohne-Bold": __require("../src/assets/fonts/Sohne-Bold.otf"),
24
+ "Sohne-BoldItalic": __require("../src/assets/fonts/Sohne-BoldItalic.otf"),
25
+ "Sohne-ExtraBold": __require("../src/assets/fonts/Sohne-ExtraBold.otf"),
26
+ "Sohne-ExtraBoldItalic": __require("../src/assets/fonts/Sohne-ExtraBoldItalic.otf"),
27
+ // SohneMono
28
+ "SohneMono-ExtraLight": __require("../src/assets/fonts/SohneMono-ExtraLight.otf"),
29
+ "SohneMono-ExtraLightItalic": __require("../src/assets/fonts/SohneMono-ExtraLightItalic.otf"),
30
+ "SohneMono-Light": __require("../src/assets/fonts/SohneMono-Light.otf"),
31
+ "SohneMono-LightItalic": __require("../src/assets/fonts/SohneMono-LightItalic.otf"),
32
+ "SohneMono-Regular": __require("../src/assets/fonts/SohneMono-Regular.otf"),
33
+ "SohneMono-Italic": __require("../src/assets/fonts/SohneMono-Italic.otf"),
34
+ "SohneMono-Medium": __require("../src/assets/fonts/SohneMono-Medium.otf"),
35
+ "SohneMono-MediumItalic": __require("../src/assets/fonts/SohneMono-MediumItalic.otf"),
36
+ "SohneMono-SemiBold": __require("../src/assets/fonts/SohneMono-SemiBold.otf"),
37
+ "SohneMono-SemiBoldItalic": __require("../src/assets/fonts/SohneMono-SemiBoldItalic.otf"),
38
+ "SohneMono-Bold": __require("../src/assets/fonts/SohneMono-Bold.otf"),
39
+ "SohneMono-BoldItalic": __require("../src/assets/fonts/SohneMono-BoldItalic.otf"),
40
+ "SohneMono-ExtraBold": __require("../src/assets/fonts/SohneMono-ExtraBold.otf"),
41
+ "SohneMono-ExtraBoldItalic": __require("../src/assets/fonts/SohneMono-ExtraBoldItalic.otf")
42
+ };
43
+
44
+ exports.SohneFonts = SohneFonts;
package/dist/fonts.mjs ADDED
@@ -0,0 +1,37 @@
1
+ import { __require } from './chunk-Y6FXYEAI.mjs';
2
+
3
+ // src/fonts.ts
4
+ var SohneFonts = {
5
+ // Sohne base
6
+ "Sohne-ExtraLight": __require("../src/assets/fonts/Sohne-ExtraLight.otf"),
7
+ "Sohne-ExtraLightItalic": __require("../src/assets/fonts/Sohne-ExtraLightItalic.otf"),
8
+ "Sohne-Light": __require("../src/assets/fonts/Sohne-Light.otf"),
9
+ "Sohne-LightItalic": __require("../src/assets/fonts/Sohne-LightItalic.otf"),
10
+ "Sohne-Regular": __require("../src/assets/fonts/Sohne-Regular.otf"),
11
+ "Sohne-Italic": __require("../src/assets/fonts/Sohne-Italic.otf"),
12
+ "Sohne-Medium": __require("../src/assets/fonts/Sohne-Medium.otf"),
13
+ "Sohne-MediumItalic": __require("../src/assets/fonts/Sohne-MediumItalic.otf"),
14
+ "Sohne-SemiBold": __require("../src/assets/fonts/Sohne-SemiBold.otf"),
15
+ "Sohne-SemiBoldItalic": __require("../src/assets/fonts/Sohne-SemiBoldItalic.otf"),
16
+ "Sohne-Bold": __require("../src/assets/fonts/Sohne-Bold.otf"),
17
+ "Sohne-BoldItalic": __require("../src/assets/fonts/Sohne-BoldItalic.otf"),
18
+ "Sohne-ExtraBold": __require("../src/assets/fonts/Sohne-ExtraBold.otf"),
19
+ "Sohne-ExtraBoldItalic": __require("../src/assets/fonts/Sohne-ExtraBoldItalic.otf"),
20
+ // SohneMono
21
+ "SohneMono-ExtraLight": __require("../src/assets/fonts/SohneMono-ExtraLight.otf"),
22
+ "SohneMono-ExtraLightItalic": __require("../src/assets/fonts/SohneMono-ExtraLightItalic.otf"),
23
+ "SohneMono-Light": __require("../src/assets/fonts/SohneMono-Light.otf"),
24
+ "SohneMono-LightItalic": __require("../src/assets/fonts/SohneMono-LightItalic.otf"),
25
+ "SohneMono-Regular": __require("../src/assets/fonts/SohneMono-Regular.otf"),
26
+ "SohneMono-Italic": __require("../src/assets/fonts/SohneMono-Italic.otf"),
27
+ "SohneMono-Medium": __require("../src/assets/fonts/SohneMono-Medium.otf"),
28
+ "SohneMono-MediumItalic": __require("../src/assets/fonts/SohneMono-MediumItalic.otf"),
29
+ "SohneMono-SemiBold": __require("../src/assets/fonts/SohneMono-SemiBold.otf"),
30
+ "SohneMono-SemiBoldItalic": __require("../src/assets/fonts/SohneMono-SemiBoldItalic.otf"),
31
+ "SohneMono-Bold": __require("../src/assets/fonts/SohneMono-Bold.otf"),
32
+ "SohneMono-BoldItalic": __require("../src/assets/fonts/SohneMono-BoldItalic.otf"),
33
+ "SohneMono-ExtraBold": __require("../src/assets/fonts/SohneMono-ExtraBold.otf"),
34
+ "SohneMono-ExtraBoldItalic": __require("../src/assets/fonts/SohneMono-ExtraBoldItalic.otf")
35
+ };
36
+
37
+ export { SohneFonts };
package/dist/index.d.mts CHANGED
@@ -49,6 +49,8 @@ export { SelectableGrid, SelectableGridItem, SelectableGridProps } from './Selec
49
49
  export { PricingCard, PricingCardProps, PricingFeature } from './PricingCard.mjs';
50
50
  export { TabBar, TabBarItem, TabBarProps } from './TabBar.mjs';
51
51
  export { ImageViewer, ImageViewerProps } from './ImageViewer.mjs';
52
+ export { SheetSelect, SheetSelectOption, SheetSelectProps } from './SheetSelect.mjs';
53
+ export { ImageUpload, ImageUploadProps } from './ImageUpload.mjs';
52
54
  export { BottomSheetModalProvider, BottomSheetTextInput as SheetTextInput } from '@gorhom/bottom-sheet';
53
55
  export { toast } from 'sonner-native';
54
56
  import 'react-native';
@@ -158,6 +160,29 @@ declare const richHaptics: {
158
160
  rigid: () => void;
159
161
  };
160
162
 
163
+ interface UseConfirmDialogOptions {
164
+ onConfirm: () => void | Promise<void>;
165
+ onCancel?: () => void;
166
+ }
167
+ interface UseConfirmDialogResult<T> {
168
+ /** Pass to ConfirmDialog `visible` prop. */
169
+ visible: boolean;
170
+ /** The value passed to `open()` — available during the confirmation flow. */
171
+ target: T | null;
172
+ /** Whether `onConfirm` is currently executing. Pass to ConfirmDialog `loading` prop. */
173
+ loading: boolean;
174
+ /** Open the dialog, optionally with an associated value (e.g. the item to delete). */
175
+ open: (target?: T) => void;
176
+ /** Handlers to pass directly to ConfirmDialog. */
177
+ dialogProps: {
178
+ visible: boolean;
179
+ loading: boolean;
180
+ onConfirm: () => void;
181
+ onCancel: () => void;
182
+ };
183
+ }
184
+ declare function useConfirmDialog<T = undefined>(options: UseConfirmDialogOptions): UseConfirmDialogResult<T>;
185
+
161
186
  declare const SPACING: {
162
187
  readonly xxs: 2;
163
188
  readonly xs: 4;
@@ -361,4 +386,4 @@ type RadiusKey = keyof Radius;
361
386
  type Typography = typeof TYPOGRAPHY;
362
387
  type TypographyKey = keyof Typography;
363
388
 
364
- export { BREAKPOINTS, ColorScheme, ICON_SIZES, Icon, type IconFamily, type IconProps, type IconSize, type IconSizeKey, RADIUS, type Radius, type RadiusKey, ResolvedColors, SHADOWS, SPACING, type Spacing, type SpacingKey, TYPOGRAPHY, Theme, ThemeColors, ThemeProvider, type ThemeProviderProps, type Typography, type TypographyKey, configureIconFamilies, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, impactHeavy, impactLight, impactMedium, notificationError, notificationSuccess, notificationWarning, renderIcon, richHaptics, selectionAsync, useTheme };
389
+ export { BREAKPOINTS, ColorScheme, ICON_SIZES, Icon, type IconFamily, type IconProps, type IconSize, type IconSizeKey, RADIUS, type Radius, type RadiusKey, ResolvedColors, SHADOWS, SPACING, type Spacing, type SpacingKey, TYPOGRAPHY, Theme, ThemeColors, ThemeProvider, type ThemeProviderProps, type Typography, type TypographyKey, type UseConfirmDialogOptions, type UseConfirmDialogResult, configureIconFamilies, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, impactHeavy, impactLight, impactMedium, notificationError, notificationSuccess, notificationWarning, renderIcon, richHaptics, selectionAsync, useConfirmDialog, useTheme };
package/dist/index.d.ts CHANGED
@@ -49,6 +49,8 @@ export { SelectableGrid, SelectableGridItem, SelectableGridProps } from './Selec
49
49
  export { PricingCard, PricingCardProps, PricingFeature } from './PricingCard.js';
50
50
  export { TabBar, TabBarItem, TabBarProps } from './TabBar.js';
51
51
  export { ImageViewer, ImageViewerProps } from './ImageViewer.js';
52
+ export { SheetSelect, SheetSelectOption, SheetSelectProps } from './SheetSelect.js';
53
+ export { ImageUpload, ImageUploadProps } from './ImageUpload.js';
52
54
  export { BottomSheetModalProvider, BottomSheetTextInput as SheetTextInput } from '@gorhom/bottom-sheet';
53
55
  export { toast } from 'sonner-native';
54
56
  import 'react-native';
@@ -158,6 +160,29 @@ declare const richHaptics: {
158
160
  rigid: () => void;
159
161
  };
160
162
 
163
+ interface UseConfirmDialogOptions {
164
+ onConfirm: () => void | Promise<void>;
165
+ onCancel?: () => void;
166
+ }
167
+ interface UseConfirmDialogResult<T> {
168
+ /** Pass to ConfirmDialog `visible` prop. */
169
+ visible: boolean;
170
+ /** The value passed to `open()` — available during the confirmation flow. */
171
+ target: T | null;
172
+ /** Whether `onConfirm` is currently executing. Pass to ConfirmDialog `loading` prop. */
173
+ loading: boolean;
174
+ /** Open the dialog, optionally with an associated value (e.g. the item to delete). */
175
+ open: (target?: T) => void;
176
+ /** Handlers to pass directly to ConfirmDialog. */
177
+ dialogProps: {
178
+ visible: boolean;
179
+ loading: boolean;
180
+ onConfirm: () => void;
181
+ onCancel: () => void;
182
+ };
183
+ }
184
+ declare function useConfirmDialog<T = undefined>(options: UseConfirmDialogOptions): UseConfirmDialogResult<T>;
185
+
161
186
  declare const SPACING: {
162
187
  readonly xxs: 2;
163
188
  readonly xs: 4;
@@ -361,4 +386,4 @@ type RadiusKey = keyof Radius;
361
386
  type Typography = typeof TYPOGRAPHY;
362
387
  type TypographyKey = keyof Typography;
363
388
 
364
- export { BREAKPOINTS, ColorScheme, ICON_SIZES, Icon, type IconFamily, type IconProps, type IconSize, type IconSizeKey, RADIUS, type Radius, type RadiusKey, ResolvedColors, SHADOWS, SPACING, type Spacing, type SpacingKey, TYPOGRAPHY, Theme, ThemeColors, ThemeProvider, type ThemeProviderProps, type Typography, type TypographyKey, configureIconFamilies, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, impactHeavy, impactLight, impactMedium, notificationError, notificationSuccess, notificationWarning, renderIcon, richHaptics, selectionAsync, useTheme };
389
+ export { BREAKPOINTS, ColorScheme, ICON_SIZES, Icon, type IconFamily, type IconProps, type IconSize, type IconSizeKey, RADIUS, type Radius, type RadiusKey, ResolvedColors, SHADOWS, SPACING, type Spacing, type SpacingKey, TYPOGRAPHY, Theme, ThemeColors, ThemeProvider, type ThemeProviderProps, type Typography, type TypographyKey, type UseConfirmDialogOptions, type UseConfirmDialogResult, configureIconFamilies, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, impactHeavy, impactLight, impactMedium, notificationError, notificationSuccess, notificationWarning, renderIcon, richHaptics, selectionAsync, useConfirmDialog, useTheme };