@retray-dev/ui-kit 2.5.2 → 2.7.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/COMPONENTS.md +245 -5
- package/README.md +18 -0
- package/dist/index.d.mts +173 -8
- package/dist/index.d.ts +173 -8
- package/dist/index.js +319 -179
- package/dist/index.mjs +259 -132
- package/package.json +1 -1
- package/src/components/AlertBanner/AlertBanner.tsx +14 -2
- package/src/components/Badge/Badge.tsx +16 -2
- package/src/components/Button/Button.tsx +20 -3
- package/src/components/EmptyState/EmptyState.tsx +15 -3
- package/src/components/Input/Input.tsx +29 -8
- package/src/components/ListItem/ListItem.tsx +26 -3
- package/src/components/Toast/Toast.tsx +11 -1
- package/src/components/Toggle/Toggle.tsx +27 -2
- package/src/index.ts +21 -0
- package/src/tokens.ts +69 -0
- package/src/utils/haptics.ts +18 -12
- package/src/utils/icons.ts +73 -0
package/dist/index.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React24 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
6
|
+
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
7
|
+
var Entypo = require('@expo/vector-icons/Entypo');
|
|
8
|
+
var Feather = require('@expo/vector-icons/Feather');
|
|
9
|
+
var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
|
|
10
|
+
var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
|
|
11
|
+
var Ionicons = require('@expo/vector-icons/Ionicons');
|
|
6
12
|
var vectorIcons = require('@expo/vector-icons');
|
|
7
13
|
var expoLinearGradient = require('expo-linear-gradient');
|
|
8
14
|
var Animated10 = require('react-native-reanimated');
|
|
@@ -15,16 +21,17 @@ var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
|
15
21
|
|
|
16
22
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
23
|
|
|
18
|
-
var
|
|
24
|
+
var React24__default = /*#__PURE__*/_interopDefault(React24);
|
|
25
|
+
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
26
|
+
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
27
|
+
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
28
|
+
var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
|
|
29
|
+
var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
|
|
30
|
+
var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
|
|
19
31
|
var Animated10__default = /*#__PURE__*/_interopDefault(Animated10);
|
|
20
32
|
var RNSlider__default = /*#__PURE__*/_interopDefault(RNSlider);
|
|
21
33
|
|
|
22
|
-
|
|
23
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
24
|
-
}) : x)(function(x) {
|
|
25
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
26
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
27
|
-
});
|
|
34
|
+
// src/theme/ThemeProvider.tsx
|
|
28
35
|
|
|
29
36
|
// src/theme/colors.ts
|
|
30
37
|
var defaultLight = {
|
|
@@ -71,48 +78,95 @@ var defaultDark = {
|
|
|
71
78
|
};
|
|
72
79
|
|
|
73
80
|
// src/theme/ThemeProvider.tsx
|
|
74
|
-
var ThemeContext =
|
|
81
|
+
var ThemeContext = React24.createContext({
|
|
75
82
|
colors: defaultLight,
|
|
76
83
|
colorScheme: "light"
|
|
77
84
|
});
|
|
78
85
|
function ThemeProvider({ children, theme, colorScheme = "system" }) {
|
|
79
86
|
const systemScheme = reactNative.useColorScheme() ?? "light";
|
|
80
87
|
const resolvedScheme = colorScheme === "system" ? systemScheme : colorScheme;
|
|
81
|
-
const colors =
|
|
88
|
+
const colors = React24.useMemo(() => {
|
|
82
89
|
const base = resolvedScheme === "dark" ? defaultDark : defaultLight;
|
|
83
90
|
const override = resolvedScheme === "dark" ? theme?.dark : theme?.light;
|
|
84
91
|
return override ? { ...base, ...override } : base;
|
|
85
92
|
}, [resolvedScheme, theme]);
|
|
86
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ React24__default.default.createElement(ThemeContext.Provider, { value: { colors, colorScheme: resolvedScheme } }, children);
|
|
87
94
|
}
|
|
88
95
|
function useTheme() {
|
|
89
|
-
const context =
|
|
96
|
+
const context = React24.useContext(ThemeContext);
|
|
90
97
|
if (!context) {
|
|
91
98
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
92
99
|
}
|
|
93
100
|
return context;
|
|
94
101
|
}
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
var _haptics = null;
|
|
103
|
+
async function getHaptics() {
|
|
104
|
+
if (reactNative.Platform.OS === "web") return null;
|
|
105
|
+
if (!_haptics) {
|
|
106
|
+
_haptics = await import('expo-haptics');
|
|
107
|
+
}
|
|
108
|
+
return _haptics;
|
|
98
109
|
}
|
|
99
110
|
function selectionAsync() {
|
|
100
|
-
|
|
111
|
+
if (reactNative.Platform.OS === "web") return;
|
|
112
|
+
getHaptics().then((h) => h?.selectionAsync());
|
|
101
113
|
}
|
|
102
114
|
function impactLight() {
|
|
103
|
-
|
|
115
|
+
if (reactNative.Platform.OS === "web") return;
|
|
116
|
+
getHaptics().then((h) => h?.impactAsync(h.ImpactFeedbackStyle.Light));
|
|
104
117
|
}
|
|
105
118
|
function notificationSuccess() {
|
|
106
|
-
|
|
119
|
+
if (reactNative.Platform.OS === "web") return;
|
|
120
|
+
getHaptics().then((h) => h?.notificationAsync(h.NotificationFeedbackType.Success));
|
|
107
121
|
}
|
|
108
122
|
function notificationError() {
|
|
109
|
-
|
|
123
|
+
if (reactNative.Platform.OS === "web") return;
|
|
124
|
+
getHaptics().then((h) => h?.notificationAsync(h.NotificationFeedbackType.Error));
|
|
110
125
|
}
|
|
111
126
|
var isWeb = reactNative.Platform.OS === "web";
|
|
112
127
|
var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
|
|
113
128
|
var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
|
|
114
129
|
var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
|
|
115
130
|
var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
|
|
131
|
+
var ICON_FAMILIES = [
|
|
132
|
+
{ name: "Ionicons", component: Ionicons__default.default, glyphMap: Ionicons__default.default.glyphMap },
|
|
133
|
+
{ name: "MaterialIcons", component: MaterialIcons__default.default, glyphMap: MaterialIcons__default.default.glyphMap },
|
|
134
|
+
{ name: "FontAwesome5", component: FontAwesome5__default.default, glyphMap: FontAwesome5__default.default.glyphMap },
|
|
135
|
+
{ name: "Entypo", component: Entypo__default.default, glyphMap: Entypo__default.default.glyphMap },
|
|
136
|
+
{ name: "AntDesign", component: AntDesign__default.default, glyphMap: AntDesign__default.default.glyphMap },
|
|
137
|
+
{ name: "Feather", component: Feather__default.default, glyphMap: Feather__default.default.glyphMap }
|
|
138
|
+
];
|
|
139
|
+
var resolvedCache = null;
|
|
140
|
+
function buildCache() {
|
|
141
|
+
const cache = /* @__PURE__ */ new Map();
|
|
142
|
+
for (const family of ICON_FAMILIES) {
|
|
143
|
+
if (!family.glyphMap) continue;
|
|
144
|
+
for (const iconName of Object.keys(family.glyphMap)) {
|
|
145
|
+
cache.set(iconName, family);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return cache;
|
|
149
|
+
}
|
|
150
|
+
function resolveFamily(name) {
|
|
151
|
+
if (!resolvedCache) {
|
|
152
|
+
resolvedCache = buildCache();
|
|
153
|
+
}
|
|
154
|
+
return resolvedCache.get(name) ?? null;
|
|
155
|
+
}
|
|
156
|
+
function Icon({ name, size, color, family }) {
|
|
157
|
+
let resolved = null;
|
|
158
|
+
if (family) {
|
|
159
|
+
resolved = ICON_FAMILIES.find((f) => f.name === family) ?? null;
|
|
160
|
+
} else {
|
|
161
|
+
resolved = resolveFamily(name);
|
|
162
|
+
}
|
|
163
|
+
if (!resolved) return null;
|
|
164
|
+
const Component = resolved.component;
|
|
165
|
+
return React24__default.default.createElement(Component, { name, size, color });
|
|
166
|
+
}
|
|
167
|
+
function renderIcon(name, size, color) {
|
|
168
|
+
return React24__default.default.createElement(Icon, { name, size, color });
|
|
169
|
+
}
|
|
116
170
|
|
|
117
171
|
// src/components/Button/Button.tsx
|
|
118
172
|
var nativeDriver = reactNative.Platform.OS !== "web";
|
|
@@ -126,6 +180,7 @@ var labelSizeStyles = {
|
|
|
126
180
|
md: { fontSize: ms(17) },
|
|
127
181
|
lg: { fontSize: ms(18) }
|
|
128
182
|
};
|
|
183
|
+
var iconSizeMap = { sm: 16, md: 18, lg: 20 };
|
|
129
184
|
function Button({
|
|
130
185
|
label,
|
|
131
186
|
variant = "primary",
|
|
@@ -133,6 +188,8 @@ function Button({
|
|
|
133
188
|
loading = false,
|
|
134
189
|
fullWidth = false,
|
|
135
190
|
icon,
|
|
191
|
+
iconName,
|
|
192
|
+
iconColor,
|
|
136
193
|
iconPosition = "left",
|
|
137
194
|
disabled,
|
|
138
195
|
style,
|
|
@@ -141,7 +198,7 @@ function Button({
|
|
|
141
198
|
}) {
|
|
142
199
|
const { colors } = useTheme();
|
|
143
200
|
const isDisabled = disabled || loading;
|
|
144
|
-
const scale2 =
|
|
201
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
145
202
|
const handlePressIn = () => {
|
|
146
203
|
if (isDisabled) return;
|
|
147
204
|
reactNative.Animated.spring(scale2, {
|
|
@@ -172,8 +229,9 @@ function Button({
|
|
|
172
229
|
ghost: { color: colors.foreground },
|
|
173
230
|
destructive: { color: colors.destructiveForeground }
|
|
174
231
|
}[variant];
|
|
232
|
+
const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], iconColor ?? labelVariantStyle.color) : typeof icon === "function" ? icon({ label, size, variant }) : icon;
|
|
175
233
|
const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" || variant === "secondary" ? colors.primaryForeground : colors.foreground;
|
|
176
|
-
return /* @__PURE__ */
|
|
234
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [fullWidth && styles.fullWidth, { transform: [{ scale: scale2 }] }] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
177
235
|
reactNative.TouchableOpacity,
|
|
178
236
|
{
|
|
179
237
|
style: [
|
|
@@ -192,7 +250,7 @@ function Button({
|
|
|
192
250
|
onPressOut: handlePressOut,
|
|
193
251
|
...props
|
|
194
252
|
},
|
|
195
|
-
loading ? /* @__PURE__ */
|
|
253
|
+
loading ? /* @__PURE__ */ React24__default.default.createElement(reactNative.ActivityIndicator, { size: "small", color: spinnerColor }) : /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, effectiveIcon), /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0] }, label), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, effectiveIcon))
|
|
196
254
|
));
|
|
197
255
|
}
|
|
198
256
|
var styles = reactNative.StyleSheet.create({
|
|
@@ -226,7 +284,7 @@ var variantStyles = {
|
|
|
226
284
|
function Text2({ variant = "body", color, style, children, ...props }) {
|
|
227
285
|
const { colors } = useTheme();
|
|
228
286
|
const defaultColor = variant === "caption" ? colors.mutedForeground : colors.foreground;
|
|
229
|
-
return /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
230
288
|
reactNative.Text,
|
|
231
289
|
{
|
|
232
290
|
style: [variantStyles[variant], { color: color ?? defaultColor }, style],
|
|
@@ -237,14 +295,15 @@ function Text2({ variant = "body", color, style, children, ...props }) {
|
|
|
237
295
|
);
|
|
238
296
|
}
|
|
239
297
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
240
|
-
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, type = "text", containerStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
298
|
+
function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, prefixIcon, suffixIcon, prefixIconColor, suffixIconColor, type = "text", containerStyle, style, onFocus, onBlur, secureTextEntry, ...props }) {
|
|
241
299
|
const { colors } = useTheme();
|
|
242
|
-
const [focused, setFocused] =
|
|
243
|
-
const [showPassword, setShowPassword] =
|
|
300
|
+
const [focused, setFocused] = React24.useState(false);
|
|
301
|
+
const [showPassword, setShowPassword] = React24.useState(false);
|
|
244
302
|
const isPassword = type === "password";
|
|
245
303
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
246
|
-
const
|
|
247
|
-
|
|
304
|
+
const effectivePrefix = prefixIcon ? renderIcon(prefixIcon, 20, prefixIconColor ?? colors.mutedForeground) : prefix;
|
|
305
|
+
const effectiveSuffix = isPassword && !suffix && !suffixIcon ? /* @__PURE__ */ React24__default.default.createElement(reactNative.TouchableOpacity, { onPress: () => setShowPassword(!showPassword), style: styles2.passwordToggle, activeOpacity: 0.6 }, /* @__PURE__ */ React24__default.default.createElement(vectorIcons.AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.mutedForeground })) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.mutedForeground) : suffix;
|
|
306
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles2.container, containerStyle] }, label ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles2.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React24__default.default.createElement(
|
|
248
307
|
reactNative.View,
|
|
249
308
|
{
|
|
250
309
|
style: [
|
|
@@ -255,8 +314,8 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, t
|
|
|
255
314
|
}
|
|
256
315
|
]
|
|
257
316
|
},
|
|
258
|
-
|
|
259
|
-
/* @__PURE__ */
|
|
317
|
+
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles2.prefixText, { color: colors.mutedForeground }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles2.prefixContainer }, effectivePrefix) : null,
|
|
318
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
260
319
|
reactNative.TextInput,
|
|
261
320
|
{
|
|
262
321
|
style: [
|
|
@@ -281,8 +340,8 @@ function Input({ label, error, hint, prefix, suffix, prefixStyle, suffixStyle, t
|
|
|
281
340
|
...props
|
|
282
341
|
}
|
|
283
342
|
),
|
|
284
|
-
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */
|
|
285
|
-
), error ? /* @__PURE__ */
|
|
343
|
+
effectiveSuffix ? typeof effectiveSuffix === "string" ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles2.suffixText, { color: colors.mutedForeground }, suffixStyle], allowFontScaling: true }, effectiveSuffix) : /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles2.suffixContainer }, effectiveSuffix) : null
|
|
344
|
+
), error ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles2.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles2.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
286
345
|
}
|
|
287
346
|
var styles2 = reactNative.StyleSheet.create({
|
|
288
347
|
container: {
|
|
@@ -341,7 +400,8 @@ var sizeIconGap = {
|
|
|
341
400
|
md: s(6),
|
|
342
401
|
lg: s(6)
|
|
343
402
|
};
|
|
344
|
-
|
|
403
|
+
var sizeIconSize = { sm: 10, md: 12, lg: 14 };
|
|
404
|
+
function Badge({ label, children, variant = "default", size = "md", icon, iconName, iconColor, style }) {
|
|
345
405
|
const { colors } = useTheme();
|
|
346
406
|
const containerStyle = {
|
|
347
407
|
default: { backgroundColor: colors.primary },
|
|
@@ -355,8 +415,9 @@ function Badge({ label, children, variant = "default", size = "md", icon, style
|
|
|
355
415
|
destructive: colors.destructiveForeground,
|
|
356
416
|
outline: colors.foreground
|
|
357
417
|
}[variant];
|
|
418
|
+
const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
|
|
358
419
|
const content = children ?? label;
|
|
359
|
-
return /* @__PURE__ */
|
|
420
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles3.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style] }, effectiveIcon ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles3.iconContainer }, effectiveIcon) : null, typeof content === "string" ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles3.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content);
|
|
360
421
|
}
|
|
361
422
|
var styles3 = reactNative.StyleSheet.create({
|
|
362
423
|
container: {
|
|
@@ -376,7 +437,7 @@ var styles3 = reactNative.StyleSheet.create({
|
|
|
376
437
|
var nativeDriver2 = reactNative.Platform.OS !== "web";
|
|
377
438
|
function Card({ children, variant = "elevated", onPress, style }) {
|
|
378
439
|
const { colors } = useTheme();
|
|
379
|
-
const scale2 =
|
|
440
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
380
441
|
const handlePressIn = () => {
|
|
381
442
|
if (!onPress) return;
|
|
382
443
|
reactNative.Animated.spring(scale2, {
|
|
@@ -423,9 +484,9 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
423
484
|
elevation: 0
|
|
424
485
|
}
|
|
425
486
|
}[variant];
|
|
426
|
-
const cardContent = /* @__PURE__ */
|
|
487
|
+
const cardContent = /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles4.card, variantStyle, style] }, children);
|
|
427
488
|
if (onPress) {
|
|
428
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24__default.default.createElement(
|
|
429
490
|
reactNative.TouchableOpacity,
|
|
430
491
|
{
|
|
431
492
|
onPress: handlePress,
|
|
@@ -440,21 +501,21 @@ function Card({ children, variant = "elevated", onPress, style }) {
|
|
|
440
501
|
return cardContent;
|
|
441
502
|
}
|
|
442
503
|
function CardHeader({ children, style }) {
|
|
443
|
-
return /* @__PURE__ */
|
|
504
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles4.header, style] }, children);
|
|
444
505
|
}
|
|
445
506
|
function CardTitle({ children, style }) {
|
|
446
507
|
const { colors } = useTheme();
|
|
447
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles4.title, { color: colors.cardForeground }, style], allowFontScaling: true }, children);
|
|
448
509
|
}
|
|
449
510
|
function CardDescription({ children, style }) {
|
|
450
511
|
const { colors } = useTheme();
|
|
451
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles4.description, { color: colors.mutedForeground }, style], allowFontScaling: true }, children);
|
|
452
513
|
}
|
|
453
514
|
function CardContent({ children, style }) {
|
|
454
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles4.content, style] }, children);
|
|
455
516
|
}
|
|
456
517
|
function CardFooter({ children, style }) {
|
|
457
|
-
return /* @__PURE__ */
|
|
518
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles4.footer, style] }, children);
|
|
458
519
|
}
|
|
459
520
|
var styles4 = reactNative.StyleSheet.create({
|
|
460
521
|
card: {
|
|
@@ -487,7 +548,7 @@ var styles4 = reactNative.StyleSheet.create({
|
|
|
487
548
|
});
|
|
488
549
|
function Separator({ orientation = "horizontal", style }) {
|
|
489
550
|
const { colors } = useTheme();
|
|
490
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
491
552
|
reactNative.View,
|
|
492
553
|
{
|
|
493
554
|
style: [
|
|
@@ -515,14 +576,14 @@ var sizeMap = {
|
|
|
515
576
|
};
|
|
516
577
|
function Spinner({ size = "md", color, ...props }) {
|
|
517
578
|
const { colors } = useTheme();
|
|
518
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.ActivityIndicator, { size: sizeMap[size], color: color ?? colors.primary, ...props });
|
|
519
580
|
}
|
|
520
581
|
function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
521
582
|
const { colors, colorScheme } = useTheme();
|
|
522
|
-
const shimmerAnim =
|
|
523
|
-
const [containerWidth, setContainerWidth] =
|
|
583
|
+
const shimmerAnim = React24.useRef(new reactNative.Animated.Value(0)).current;
|
|
584
|
+
const [containerWidth, setContainerWidth] = React24.useState(300);
|
|
524
585
|
const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(255,255,255,0.7)";
|
|
525
|
-
|
|
586
|
+
React24.useEffect(() => {
|
|
526
587
|
const animation = reactNative.Animated.loop(
|
|
527
588
|
reactNative.Animated.timing(shimmerAnim, {
|
|
528
589
|
toValue: 1,
|
|
@@ -537,7 +598,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
537
598
|
inputRange: [0, 1],
|
|
538
599
|
outputRange: [-containerWidth, containerWidth]
|
|
539
600
|
});
|
|
540
|
-
return /* @__PURE__ */
|
|
601
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
541
602
|
reactNative.View,
|
|
542
603
|
{
|
|
543
604
|
style: [
|
|
@@ -547,7 +608,7 @@ function Skeleton({ width = "100%", height = 16, borderRadius = 6, style }) {
|
|
|
547
608
|
],
|
|
548
609
|
onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width)
|
|
549
610
|
},
|
|
550
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [reactNative.StyleSheet.absoluteFill, { transform: [{ translateX }] }] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
551
612
|
expoLinearGradient.LinearGradient,
|
|
552
613
|
{
|
|
553
614
|
colors: ["transparent", shimmerHighlight, "transparent"],
|
|
@@ -577,7 +638,7 @@ var fontSizeMap = {
|
|
|
577
638
|
};
|
|
578
639
|
function Avatar({ src, fallback, size = "md", style }) {
|
|
579
640
|
const { colors } = useTheme();
|
|
580
|
-
const [imageError, setImageError] =
|
|
641
|
+
const [imageError, setImageError] = React24.useState(false);
|
|
581
642
|
const dimension = sizeMap2[size];
|
|
582
643
|
const showFallback = !src || imageError;
|
|
583
644
|
const containerStyle = {
|
|
@@ -587,14 +648,14 @@ function Avatar({ src, fallback, size = "md", style }) {
|
|
|
587
648
|
backgroundColor: colors.muted,
|
|
588
649
|
overflow: "hidden"
|
|
589
650
|
};
|
|
590
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles7.base, containerStyle, style] }, !showFallback ? /* @__PURE__ */ React24__default.default.createElement(
|
|
591
652
|
reactNative.Image,
|
|
592
653
|
{
|
|
593
654
|
source: { uri: src },
|
|
594
655
|
style: { width: dimension, height: dimension },
|
|
595
656
|
onError: () => setImageError(true)
|
|
596
657
|
}
|
|
597
|
-
) : /* @__PURE__ */
|
|
658
|
+
) : /* @__PURE__ */ React24__default.default.createElement(
|
|
598
659
|
reactNative.Text,
|
|
599
660
|
{
|
|
600
661
|
style: [styles7.fallback, { color: colors.mutedForeground, fontSize: fontSizeMap[size] }],
|
|
@@ -612,13 +673,14 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
612
673
|
fontWeight: "500"
|
|
613
674
|
}
|
|
614
675
|
});
|
|
615
|
-
function AlertBanner({ title, description, variant = "default", icon, style }) {
|
|
676
|
+
function AlertBanner({ title, description, variant = "default", icon, iconName, iconColor, style }) {
|
|
616
677
|
const { colors } = useTheme();
|
|
617
678
|
const borderColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.border;
|
|
618
679
|
const titleColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.foreground;
|
|
619
680
|
const descColor = variant === "destructive" ? colors.destructive : variant === "success" ? colors.success : colors.mutedForeground;
|
|
620
|
-
const defaultIcon = variant === "success" ? /* @__PURE__ */
|
|
621
|
-
|
|
681
|
+
const defaultIcon = variant === "success" ? /* @__PURE__ */ React24__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: 18, color: titleColor }) : variant === "destructive" ? /* @__PURE__ */ React24__default.default.createElement(vectorIcons.MaterialIcons, { name: "error-outline", size: 20, color: titleColor }) : /* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: 18, color: titleColor });
|
|
682
|
+
const effectiveIcon = iconName ? renderIcon(iconName, 18, iconColor ?? titleColor) : icon ?? defaultIcon;
|
|
683
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles8.container, { backgroundColor: colors.card, borderColor }, style] }, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles8.icon }, effectiveIcon), /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles8.content }, title ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles8.title, { color: titleColor }], allowFontScaling: true }, title) : null, description ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles8.description, { color: descColor }], allowFontScaling: true }, description) : null));
|
|
622
684
|
}
|
|
623
685
|
var styles8 = reactNative.StyleSheet.create({
|
|
624
686
|
container: {
|
|
@@ -653,9 +715,9 @@ var styles8 = reactNative.StyleSheet.create({
|
|
|
653
715
|
function Progress({ value = 0, max = 100, style }) {
|
|
654
716
|
const { colors } = useTheme();
|
|
655
717
|
const percent = Math.min(Math.max(value / max * 100, 0), 100);
|
|
656
|
-
const [trackWidth, setTrackWidth] =
|
|
657
|
-
const animatedWidth =
|
|
658
|
-
|
|
718
|
+
const [trackWidth, setTrackWidth] = React24.useState(0);
|
|
719
|
+
const animatedWidth = React24.useRef(new reactNative.Animated.Value(0)).current;
|
|
720
|
+
React24.useEffect(() => {
|
|
659
721
|
if (trackWidth === 0) return;
|
|
660
722
|
reactNative.Animated.spring(animatedWidth, {
|
|
661
723
|
toValue: percent / 100 * trackWidth,
|
|
@@ -664,13 +726,13 @@ function Progress({ value = 0, max = 100, style }) {
|
|
|
664
726
|
bounciness: 0
|
|
665
727
|
}).start();
|
|
666
728
|
}, [percent, trackWidth]);
|
|
667
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
668
730
|
reactNative.View,
|
|
669
731
|
{
|
|
670
732
|
style: [styles9.track, { backgroundColor: colors.muted }, style],
|
|
671
733
|
onLayout: (e) => setTrackWidth(e.nativeEvent.layout.width)
|
|
672
734
|
},
|
|
673
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
674
736
|
reactNative.Animated.View,
|
|
675
737
|
{
|
|
676
738
|
style: [styles9.indicator, { width: animatedWidth, backgroundColor: colors.primary }]
|
|
@@ -690,10 +752,11 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
690
752
|
borderRadius: 999
|
|
691
753
|
}
|
|
692
754
|
});
|
|
693
|
-
function EmptyState({ icon, title, description, action, size = "default", style }) {
|
|
755
|
+
function EmptyState({ icon, iconName, iconColor, title, description, action, size = "default", style }) {
|
|
694
756
|
const { colors } = useTheme();
|
|
695
757
|
const isCompact = size === "compact";
|
|
696
|
-
|
|
758
|
+
const effectiveIcon = iconName ? renderIcon(iconName, isCompact ? 32 : 48, iconColor ?? colors.mutedForeground) : icon;
|
|
759
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
697
760
|
reactNative.View,
|
|
698
761
|
{
|
|
699
762
|
style: [
|
|
@@ -703,7 +766,7 @@ function EmptyState({ icon, title, description, action, size = "default", style
|
|
|
703
766
|
style
|
|
704
767
|
]
|
|
705
768
|
},
|
|
706
|
-
|
|
769
|
+
effectiveIcon ? /* @__PURE__ */ React24__default.default.createElement(
|
|
707
770
|
reactNative.View,
|
|
708
771
|
{
|
|
709
772
|
style: [
|
|
@@ -712,17 +775,17 @@ function EmptyState({ icon, title, description, action, size = "default", style
|
|
|
712
775
|
{ backgroundColor: colors.muted }
|
|
713
776
|
]
|
|
714
777
|
},
|
|
715
|
-
|
|
778
|
+
effectiveIcon
|
|
716
779
|
) : null,
|
|
717
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles10.textWrapper }, /* @__PURE__ */ React24__default.default.createElement(
|
|
718
781
|
reactNative.Text,
|
|
719
782
|
{
|
|
720
783
|
style: [styles10.title, isCompact && styles10.titleCompact, { color: colors.foreground }],
|
|
721
784
|
allowFontScaling: true
|
|
722
785
|
},
|
|
723
786
|
title
|
|
724
|
-
), description && !isCompact ? /* @__PURE__ */
|
|
725
|
-
action && !isCompact ? /* @__PURE__ */
|
|
787
|
+
), description && !isCompact ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles10.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null),
|
|
788
|
+
action && !isCompact ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles10.action }, action) : null
|
|
726
789
|
);
|
|
727
790
|
}
|
|
728
791
|
var styles10 = reactNative.StyleSheet.create({
|
|
@@ -786,8 +849,8 @@ function Textarea({
|
|
|
786
849
|
...props
|
|
787
850
|
}) {
|
|
788
851
|
const { colors } = useTheme();
|
|
789
|
-
const [focused, setFocused] =
|
|
790
|
-
return /* @__PURE__ */
|
|
852
|
+
const [focused, setFocused] = React24.useState(false);
|
|
853
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles11.container, containerStyle] }, label ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles11.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React24__default.default.createElement(
|
|
791
854
|
reactNative.TextInput,
|
|
792
855
|
{
|
|
793
856
|
multiline: true,
|
|
@@ -816,7 +879,7 @@ function Textarea({
|
|
|
816
879
|
allowFontScaling: true,
|
|
817
880
|
...props
|
|
818
881
|
}
|
|
819
|
-
), error ? /* @__PURE__ */
|
|
882
|
+
), error ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles11.helperText, { color: colors.destructive }], allowFontScaling: true }, error) : null, !error && hint ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles11.helperText, { color: colors.mutedForeground }], allowFontScaling: true }, hint) : null);
|
|
820
883
|
}
|
|
821
884
|
var styles11 = reactNative.StyleSheet.create({
|
|
822
885
|
container: {
|
|
@@ -846,7 +909,7 @@ function Checkbox({
|
|
|
846
909
|
style
|
|
847
910
|
}) {
|
|
848
911
|
const { colors } = useTheme();
|
|
849
|
-
const scale2 =
|
|
912
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
850
913
|
const handlePressIn = () => {
|
|
851
914
|
if (disabled) return;
|
|
852
915
|
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver3, speed: 40, bounciness: 0 }).start();
|
|
@@ -854,7 +917,7 @@ function Checkbox({
|
|
|
854
917
|
const handlePressOut = () => {
|
|
855
918
|
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver3, speed: 40, bounciness: 4 }).start();
|
|
856
919
|
};
|
|
857
|
-
return /* @__PURE__ */
|
|
920
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24__default.default.createElement(
|
|
858
921
|
reactNative.TouchableOpacity,
|
|
859
922
|
{
|
|
860
923
|
style: [styles12.row, style],
|
|
@@ -868,7 +931,7 @@ function Checkbox({
|
|
|
868
931
|
activeOpacity: 1,
|
|
869
932
|
touchSoundDisabled: true
|
|
870
933
|
},
|
|
871
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
872
935
|
reactNative.View,
|
|
873
936
|
{
|
|
874
937
|
style: [
|
|
@@ -880,9 +943,9 @@ function Checkbox({
|
|
|
880
943
|
}
|
|
881
944
|
]
|
|
882
945
|
},
|
|
883
|
-
checked ? /* @__PURE__ */
|
|
946
|
+
checked ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles12.checkmark, { borderColor: colors.primaryForeground }] }) : null
|
|
884
947
|
),
|
|
885
|
-
label ? /* @__PURE__ */
|
|
948
|
+
label ? /* @__PURE__ */ React24__default.default.createElement(
|
|
886
949
|
reactNative.Text,
|
|
887
950
|
{
|
|
888
951
|
style: [styles12.label, { color: disabled ? colors.mutedForeground : colors.foreground }]
|
|
@@ -925,9 +988,9 @@ var THUMB_OFFSET = s(4);
|
|
|
925
988
|
var THUMB_TRAVEL = TRACK_WIDTH - THUMB_SIZE - THUMB_OFFSET * 2;
|
|
926
989
|
function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
927
990
|
const { colors } = useTheme();
|
|
928
|
-
const translateX =
|
|
929
|
-
const trackOpacity =
|
|
930
|
-
|
|
991
|
+
const translateX = React24.useRef(new reactNative.Animated.Value(checked ? THUMB_TRAVEL : 0)).current;
|
|
992
|
+
const trackOpacity = React24.useRef(new reactNative.Animated.Value(checked ? 1 : 0)).current;
|
|
993
|
+
React24.useEffect(() => {
|
|
931
994
|
reactNative.Animated.parallel([
|
|
932
995
|
reactNative.Animated.spring(translateX, {
|
|
933
996
|
toValue: checked ? THUMB_TRAVEL : 0,
|
|
@@ -945,7 +1008,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
945
1008
|
inputRange: [0, 1],
|
|
946
1009
|
outputRange: [colors.muted, colors.primary]
|
|
947
1010
|
});
|
|
948
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [{ opacity: disabled ? 0.45 : 1 }, style] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
949
1012
|
reactNative.TouchableOpacity,
|
|
950
1013
|
{
|
|
951
1014
|
onPress: () => {
|
|
@@ -957,7 +1020,7 @@ function Switch({ checked = false, onCheckedChange, disabled, style }) {
|
|
|
957
1020
|
touchSoundDisabled: true,
|
|
958
1021
|
style: styles13.wrapper
|
|
959
1022
|
},
|
|
960
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [styles13.track, { backgroundColor: trackColor }] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
961
1024
|
reactNative.Animated.View,
|
|
962
1025
|
{
|
|
963
1026
|
style: [
|
|
@@ -996,6 +1059,7 @@ var sizeStyles = {
|
|
|
996
1059
|
md: { paddingHorizontal: s(16), paddingVertical: vs(12), minWidth: s(44), minHeight: vs(44) },
|
|
997
1060
|
lg: { paddingHorizontal: s(20), paddingVertical: vs(14), minWidth: s(48), minHeight: vs(48) }
|
|
998
1061
|
};
|
|
1062
|
+
var iconSizeMap2 = { sm: 16, md: 18, lg: 20 };
|
|
999
1063
|
function Toggle({
|
|
1000
1064
|
pressed = false,
|
|
1001
1065
|
onPressedChange,
|
|
@@ -1004,14 +1068,18 @@ function Toggle({
|
|
|
1004
1068
|
label,
|
|
1005
1069
|
icon,
|
|
1006
1070
|
activeIcon,
|
|
1071
|
+
iconName,
|
|
1072
|
+
activeIconName,
|
|
1073
|
+
iconColor,
|
|
1074
|
+
activeIconColor,
|
|
1007
1075
|
disabled,
|
|
1008
1076
|
style,
|
|
1009
1077
|
...props
|
|
1010
1078
|
}) {
|
|
1011
1079
|
const { colors } = useTheme();
|
|
1012
|
-
const scale2 =
|
|
1013
|
-
const pressAnim =
|
|
1014
|
-
|
|
1080
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
1081
|
+
const pressAnim = React24.useRef(new reactNative.Animated.Value(pressed ? 1 : 0)).current;
|
|
1082
|
+
React24.useEffect(() => {
|
|
1015
1083
|
reactNative.Animated.timing(pressAnim, {
|
|
1016
1084
|
toValue: pressed ? 1 : 0,
|
|
1017
1085
|
duration: 150,
|
|
@@ -1038,6 +1106,7 @@ function Toggle({
|
|
|
1038
1106
|
inputRange: [0, 1],
|
|
1039
1107
|
outputRange: [colors.foreground, colors.primary]
|
|
1040
1108
|
});
|
|
1109
|
+
const iconSize = iconSizeMap2[size];
|
|
1041
1110
|
const LeftIcon = () => {
|
|
1042
1111
|
const renderProp = (prop) => {
|
|
1043
1112
|
if (!prop) return null;
|
|
@@ -1045,15 +1114,17 @@ function Toggle({
|
|
|
1045
1114
|
return prop;
|
|
1046
1115
|
};
|
|
1047
1116
|
if (pressed) {
|
|
1117
|
+
if (activeIconName) return /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, renderIcon(activeIconName, iconSize, activeIconColor ?? colors.primary));
|
|
1048
1118
|
const active = renderProp(activeIcon);
|
|
1049
|
-
if (active) return /* @__PURE__ */
|
|
1050
|
-
return /* @__PURE__ */
|
|
1119
|
+
if (active) return /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, active);
|
|
1120
|
+
return /* @__PURE__ */ React24__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: iconSize, color: colors.primary });
|
|
1051
1121
|
}
|
|
1122
|
+
if (iconName) return /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, renderIcon(iconName, iconSize, iconColor ?? colors.mutedForeground));
|
|
1052
1123
|
const custom = renderProp(icon);
|
|
1053
|
-
if (custom) return /* @__PURE__ */
|
|
1054
|
-
return /* @__PURE__ */
|
|
1124
|
+
if (custom) return /* @__PURE__ */ React24__default.default.createElement(React24__default.default.Fragment, null, custom);
|
|
1125
|
+
return /* @__PURE__ */ React24__default.default.createElement(vectorIcons.FontAwesome5, { name: "circle", size: iconSize, color: colors.mutedForeground });
|
|
1055
1126
|
};
|
|
1056
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles14.disabled, style] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1057
1128
|
reactNative.TouchableOpacity,
|
|
1058
1129
|
{
|
|
1059
1130
|
onPress: () => {
|
|
@@ -1067,7 +1138,7 @@ function Toggle({
|
|
|
1067
1138
|
touchSoundDisabled: true,
|
|
1068
1139
|
...props
|
|
1069
1140
|
},
|
|
1070
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
1071
1142
|
reactNative.Animated.View,
|
|
1072
1143
|
{
|
|
1073
1144
|
style: [
|
|
@@ -1076,7 +1147,7 @@ function Toggle({
|
|
|
1076
1147
|
{ borderColor, backgroundColor, borderWidth: 2 }
|
|
1077
1148
|
]
|
|
1078
1149
|
},
|
|
1079
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles14.inner }, /* @__PURE__ */ React24__default.default.createElement(LeftIcon, null), label ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.Text, { style: [styles14.label, { color: textColor }] }, label) : null)
|
|
1080
1151
|
)
|
|
1081
1152
|
));
|
|
1082
1153
|
}
|
|
@@ -1105,7 +1176,7 @@ function RadioItem({
|
|
|
1105
1176
|
onSelect
|
|
1106
1177
|
}) {
|
|
1107
1178
|
const { colors } = useTheme();
|
|
1108
|
-
const scale2 =
|
|
1179
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
1109
1180
|
const handlePressIn = () => {
|
|
1110
1181
|
if (option.disabled) return;
|
|
1111
1182
|
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver5, speed: 40, bounciness: 0 }).start();
|
|
@@ -1113,7 +1184,7 @@ function RadioItem({
|
|
|
1113
1184
|
const handlePressOut = () => {
|
|
1114
1185
|
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver5, speed: 40, bounciness: 4 }).start();
|
|
1115
1186
|
};
|
|
1116
|
-
return /* @__PURE__ */
|
|
1187
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1117
1188
|
reactNative.TouchableOpacity,
|
|
1118
1189
|
{
|
|
1119
1190
|
style: styles15.row,
|
|
@@ -1129,7 +1200,7 @@ function RadioItem({
|
|
|
1129
1200
|
touchSoundDisabled: true,
|
|
1130
1201
|
disabled: option.disabled
|
|
1131
1202
|
},
|
|
1132
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
1133
1204
|
reactNative.View,
|
|
1134
1205
|
{
|
|
1135
1206
|
style: [
|
|
@@ -1140,9 +1211,9 @@ function RadioItem({
|
|
|
1140
1211
|
}
|
|
1141
1212
|
]
|
|
1142
1213
|
},
|
|
1143
|
-
selected ? /* @__PURE__ */
|
|
1214
|
+
selected ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles15.dot, { backgroundColor: colors.primary }] }) : null
|
|
1144
1215
|
),
|
|
1145
|
-
/* @__PURE__ */
|
|
1216
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
1146
1217
|
reactNative.Text,
|
|
1147
1218
|
{
|
|
1148
1219
|
style: [
|
|
@@ -1161,7 +1232,7 @@ function RadioGroup({
|
|
|
1161
1232
|
orientation = "vertical",
|
|
1162
1233
|
style
|
|
1163
1234
|
}) {
|
|
1164
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles15.container, orientation === "horizontal" && styles15.horizontal, style] }, options.map((option) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1165
1236
|
RadioItem,
|
|
1166
1237
|
{
|
|
1167
1238
|
key: option.value,
|
|
@@ -1210,14 +1281,14 @@ function TabTrigger({
|
|
|
1210
1281
|
onLayout
|
|
1211
1282
|
}) {
|
|
1212
1283
|
const { colors } = useTheme();
|
|
1213
|
-
const scale2 =
|
|
1284
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
1214
1285
|
const handlePressIn = () => {
|
|
1215
1286
|
reactNative.Animated.spring(scale2, { toValue: 0.95, useNativeDriver: nativeDriver6, speed: 40, bounciness: 0 }).start();
|
|
1216
1287
|
};
|
|
1217
1288
|
const handlePressOut = () => {
|
|
1218
1289
|
reactNative.Animated.spring(scale2, { toValue: 1, useNativeDriver: nativeDriver6, speed: 40, bounciness: 4 }).start();
|
|
1219
1290
|
};
|
|
1220
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
1221
1292
|
reactNative.TouchableOpacity,
|
|
1222
1293
|
{
|
|
1223
1294
|
style: styles16.trigger,
|
|
@@ -1228,7 +1299,7 @@ function TabTrigger({
|
|
|
1228
1299
|
activeOpacity: 1,
|
|
1229
1300
|
touchSoundDisabled: true
|
|
1230
1301
|
},
|
|
1231
|
-
/* @__PURE__ */
|
|
1302
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }] } }, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles16.triggerInner }, tab.icon ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles16.triggerIcon }, typeof tab.icon === "function" ? tab.icon(isActive) : tab.icon) : null, /* @__PURE__ */ React24__default.default.createElement(
|
|
1232
1303
|
reactNative.Text,
|
|
1233
1304
|
{
|
|
1234
1305
|
style: [
|
|
@@ -1242,13 +1313,13 @@ function TabTrigger({
|
|
|
1242
1313
|
);
|
|
1243
1314
|
}
|
|
1244
1315
|
function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
1245
|
-
const [internal, setInternal] =
|
|
1316
|
+
const [internal, setInternal] = React24.useState(tabs[0]?.value ?? "");
|
|
1246
1317
|
const { colors } = useTheme();
|
|
1247
1318
|
const active = value ?? internal;
|
|
1248
|
-
const tabLayouts =
|
|
1249
|
-
const pillX =
|
|
1250
|
-
const pillWidth =
|
|
1251
|
-
const initialised =
|
|
1319
|
+
const tabLayouts = React24.useRef({});
|
|
1320
|
+
const pillX = React24.useRef(new reactNative.Animated.Value(0)).current;
|
|
1321
|
+
const pillWidth = React24.useRef(new reactNative.Animated.Value(0)).current;
|
|
1322
|
+
const initialised = React24.useRef(false);
|
|
1252
1323
|
const animatePill = (tabValue, animate) => {
|
|
1253
1324
|
const layout = tabLayouts.current[tabValue];
|
|
1254
1325
|
if (!layout) return;
|
|
@@ -1272,7 +1343,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1272
1343
|
pillWidth.setValue(layout.width);
|
|
1273
1344
|
}
|
|
1274
1345
|
};
|
|
1275
|
-
|
|
1346
|
+
React24.useEffect(() => {
|
|
1276
1347
|
if (initialised.current) {
|
|
1277
1348
|
animatePill(active, true);
|
|
1278
1349
|
}
|
|
@@ -1282,7 +1353,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1282
1353
|
if (!value) setInternal(v);
|
|
1283
1354
|
onValueChange?.(v);
|
|
1284
1355
|
};
|
|
1285
|
-
return /* @__PURE__ */
|
|
1356
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style }, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles16.list, { backgroundColor: colors.muted }] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1286
1357
|
reactNative.Animated.View,
|
|
1287
1358
|
{
|
|
1288
1359
|
style: [
|
|
@@ -1303,7 +1374,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1303
1374
|
}
|
|
1304
1375
|
]
|
|
1305
1376
|
}
|
|
1306
|
-
), tabs.map((tab) => /* @__PURE__ */
|
|
1377
|
+
), tabs.map((tab) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1307
1378
|
TabTrigger,
|
|
1308
1379
|
{
|
|
1309
1380
|
key: tab.value,
|
|
@@ -1323,7 +1394,7 @@ function Tabs({ tabs, value, onValueChange, children, style }) {
|
|
|
1323
1394
|
}
|
|
1324
1395
|
function TabsContent({ value, activeValue, children, style }) {
|
|
1325
1396
|
if (value !== activeValue) return null;
|
|
1326
|
-
return /* @__PURE__ */
|
|
1397
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style }, children);
|
|
1327
1398
|
}
|
|
1328
1399
|
var styles16 = reactNative.StyleSheet.create({
|
|
1329
1400
|
list: {
|
|
@@ -1369,7 +1440,7 @@ function AccordionItemComponent({
|
|
|
1369
1440
|
const { colors } = useTheme();
|
|
1370
1441
|
const isExpanded = Animated10.useSharedValue(isOpen);
|
|
1371
1442
|
const height = Animated10.useSharedValue(0);
|
|
1372
|
-
|
|
1443
|
+
React24__default.default.useEffect(() => {
|
|
1373
1444
|
isExpanded.value = isOpen;
|
|
1374
1445
|
}, [isOpen]);
|
|
1375
1446
|
const derivedHeight = Animated10.useDerivedValue(
|
|
@@ -1391,7 +1462,7 @@ function AccordionItemComponent({
|
|
|
1391
1462
|
const rotationStyle = Animated10.useAnimatedStyle(() => ({
|
|
1392
1463
|
transform: [{ rotate: `${derivedRotation.value * 180}deg` }]
|
|
1393
1464
|
}));
|
|
1394
|
-
return /* @__PURE__ */
|
|
1465
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles17.item, { borderBottomColor: colors.border }] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1395
1466
|
reactNative.Pressable,
|
|
1396
1467
|
{
|
|
1397
1468
|
style: ({ pressed }) => [styles17.trigger, { opacity: pressed ? 0.6 : 1 }],
|
|
@@ -1400,9 +1471,9 @@ function AccordionItemComponent({
|
|
|
1400
1471
|
onToggle();
|
|
1401
1472
|
}
|
|
1402
1473
|
},
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
/* @__PURE__ */
|
|
1405
|
-
), /* @__PURE__ */
|
|
1474
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles17.triggerText, { color: colors.foreground }] }, item.trigger),
|
|
1475
|
+
/* @__PURE__ */ React24__default.default.createElement(Animated10__default.default.View, { style: [styles17.chevron, rotationStyle] }, /* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "chevron-down", size: 20, color: colors.foreground }))
|
|
1476
|
+
), /* @__PURE__ */ React24__default.default.createElement(Animated10__default.default.View, { style: bodyStyle }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1406
1477
|
reactNative.View,
|
|
1407
1478
|
{
|
|
1408
1479
|
style: styles17.content,
|
|
@@ -1414,7 +1485,7 @@ function AccordionItemComponent({
|
|
|
1414
1485
|
)));
|
|
1415
1486
|
}
|
|
1416
1487
|
function Accordion({ items, type = "single", defaultValue, style }) {
|
|
1417
|
-
const [openValues, setOpenValues] =
|
|
1488
|
+
const [openValues, setOpenValues] = React24.useState(() => {
|
|
1418
1489
|
if (!defaultValue) return [];
|
|
1419
1490
|
return Array.isArray(defaultValue) ? defaultValue : [defaultValue];
|
|
1420
1491
|
});
|
|
@@ -1427,7 +1498,7 @@ function Accordion({ items, type = "single", defaultValue, style }) {
|
|
|
1427
1498
|
);
|
|
1428
1499
|
}
|
|
1429
1500
|
};
|
|
1430
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style }, items.map((item) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1431
1502
|
AccordionItemComponent,
|
|
1432
1503
|
{
|
|
1433
1504
|
key: item.value,
|
|
@@ -1478,7 +1549,7 @@ function Slider({
|
|
|
1478
1549
|
style
|
|
1479
1550
|
}) {
|
|
1480
1551
|
const { colors } = useTheme();
|
|
1481
|
-
const lastSteppedValue =
|
|
1552
|
+
const lastSteppedValue = React24.useRef(value);
|
|
1482
1553
|
const handleValueChange = (v) => {
|
|
1483
1554
|
if (step && v !== lastSteppedValue.current) {
|
|
1484
1555
|
lastSteppedValue.current = v;
|
|
@@ -1486,7 +1557,7 @@ function Slider({
|
|
|
1486
1557
|
}
|
|
1487
1558
|
onValueChange?.(v);
|
|
1488
1559
|
};
|
|
1489
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles18.wrapper, style], accessibilityLabel }, label || showValue ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles18.header }, label ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles18.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, showValue ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles18.valueText, { color: colors.mutedForeground }], allowFontScaling: true }, formatValue2(value)) : null) : null, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: disabled ? styles18.disabled : void 0 }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1490
1561
|
RNSlider__default.default,
|
|
1491
1562
|
{
|
|
1492
1563
|
value,
|
|
@@ -1539,8 +1610,8 @@ function Sheet({
|
|
|
1539
1610
|
style
|
|
1540
1611
|
}) {
|
|
1541
1612
|
const { colors } = useTheme();
|
|
1542
|
-
const ref =
|
|
1543
|
-
|
|
1613
|
+
const ref = React24.useRef(null);
|
|
1614
|
+
React24.useEffect(() => {
|
|
1544
1615
|
if (open) {
|
|
1545
1616
|
impactLight();
|
|
1546
1617
|
ref.current?.present();
|
|
@@ -1548,7 +1619,7 @@ function Sheet({
|
|
|
1548
1619
|
ref.current?.dismiss();
|
|
1549
1620
|
}
|
|
1550
1621
|
}, [open]);
|
|
1551
|
-
const renderBackdrop = (props) => /* @__PURE__ */
|
|
1622
|
+
const renderBackdrop = (props) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1552
1623
|
bottomSheet.BottomSheetBackdrop,
|
|
1553
1624
|
{
|
|
1554
1625
|
...props,
|
|
@@ -1557,7 +1628,7 @@ function Sheet({
|
|
|
1557
1628
|
pressBehavior: "close"
|
|
1558
1629
|
}
|
|
1559
1630
|
);
|
|
1560
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
1561
1632
|
bottomSheet.BottomSheetModal,
|
|
1562
1633
|
{
|
|
1563
1634
|
ref,
|
|
@@ -1568,7 +1639,7 @@ function Sheet({
|
|
|
1568
1639
|
handleIndicatorStyle: [styles19.handle, { backgroundColor: colors.border }],
|
|
1569
1640
|
enablePanDownToClose: true
|
|
1570
1641
|
},
|
|
1571
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ React24__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles19.content, style] }, title || description ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles19.header }, title ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles19.title, { color: colors.cardForeground }] }, title) : null, description ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles19.description, { color: colors.mutedForeground }] }, description) : null) : null, children)
|
|
1572
1643
|
);
|
|
1573
1644
|
}
|
|
1574
1645
|
var styles19 = reactNative.StyleSheet.create({
|
|
@@ -1612,10 +1683,10 @@ function Select({
|
|
|
1612
1683
|
style
|
|
1613
1684
|
}) {
|
|
1614
1685
|
const { colors } = useTheme();
|
|
1615
|
-
const scale2 =
|
|
1616
|
-
const [pickerVisible, setPickerVisible] =
|
|
1617
|
-
const [pendingValue, setPendingValue] =
|
|
1618
|
-
const pickerRef =
|
|
1686
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
1687
|
+
const [pickerVisible, setPickerVisible] = React24.useState(false);
|
|
1688
|
+
const [pendingValue, setPendingValue] = React24.useState(value);
|
|
1689
|
+
const pickerRef = React24.useRef(null);
|
|
1619
1690
|
const selected = options.find((o) => o.value === value);
|
|
1620
1691
|
const handlePressIn = () => {
|
|
1621
1692
|
if (disabled) return;
|
|
@@ -1644,7 +1715,7 @@ function Select({
|
|
|
1644
1715
|
}
|
|
1645
1716
|
setPickerVisible(false);
|
|
1646
1717
|
};
|
|
1647
|
-
return /* @__PURE__ */
|
|
1718
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles20.container, style] }, label ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles20.label, { color: colors.foreground }] }, label) : null, !isWeb2 ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: { transform: [{ scale: scale2 }], opacity: disabled ? 0.45 : 1 } }, /* @__PURE__ */ React24__default.default.createElement(
|
|
1648
1719
|
reactNative.TouchableOpacity,
|
|
1649
1720
|
{
|
|
1650
1721
|
style: [
|
|
@@ -1660,7 +1731,7 @@ function Select({
|
|
|
1660
1731
|
activeOpacity: 1,
|
|
1661
1732
|
touchSoundDisabled: true
|
|
1662
1733
|
},
|
|
1663
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ React24__default.default.createElement(
|
|
1664
1735
|
reactNative.Text,
|
|
1665
1736
|
{
|
|
1666
1737
|
style: [
|
|
@@ -1672,8 +1743,8 @@ function Select({
|
|
|
1672
1743
|
},
|
|
1673
1744
|
selected?.label ?? placeholder
|
|
1674
1745
|
),
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
)) : null, isIOS ? /* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "chevron-with-circle-down", size: 20, color: colors.mutedForeground })
|
|
1747
|
+
)) : null, isIOS ? /* @__PURE__ */ React24__default.default.createElement(
|
|
1677
1748
|
reactNative.Modal,
|
|
1678
1749
|
{
|
|
1679
1750
|
visible: pickerVisible,
|
|
@@ -1681,16 +1752,16 @@ function Select({
|
|
|
1681
1752
|
animationType: "slide",
|
|
1682
1753
|
onRequestClose: handleDismiss
|
|
1683
1754
|
},
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
/* @__PURE__ */
|
|
1755
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.TouchableOpacity, { style: styles20.iosBackdrop, activeOpacity: 1, onPress: handleDismiss }),
|
|
1756
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles20.iosSheet, { backgroundColor: colors.card }] }, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles20.iosToolbar, { borderBottomColor: colors.border }] }, label ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles20.iosToolbarTitle, { color: colors.foreground }], allowFontScaling: true }, label) : /* @__PURE__ */ React24__default.default.createElement(reactNative.View, null), /* @__PURE__ */ React24__default.default.createElement(reactNative.TouchableOpacity, { onPress: handleConfirm, style: styles20.iosDoneBtn, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 } }, /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles20.iosDoneBtnText, { color: colors.primary }], allowFontScaling: true }, "Done"))), /* @__PURE__ */ React24__default.default.createElement(
|
|
1686
1757
|
picker.Picker,
|
|
1687
1758
|
{
|
|
1688
1759
|
selectedValue: pendingValue ?? "",
|
|
1689
1760
|
onValueChange: (val) => setPendingValue(val),
|
|
1690
1761
|
itemStyle: { color: colors.foreground }
|
|
1691
1762
|
},
|
|
1692
|
-
!value ? /* @__PURE__ */
|
|
1693
|
-
options.map((o) => /* @__PURE__ */
|
|
1763
|
+
!value ? /* @__PURE__ */ React24__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", color: colors.mutedForeground, enabled: false }) : null,
|
|
1764
|
+
options.map((o) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1694
1765
|
picker.Picker.Item,
|
|
1695
1766
|
{
|
|
1696
1767
|
key: o.value,
|
|
@@ -1701,7 +1772,7 @@ function Select({
|
|
|
1701
1772
|
}
|
|
1702
1773
|
))
|
|
1703
1774
|
))
|
|
1704
|
-
) : null, isAndroid ? /* @__PURE__ */
|
|
1775
|
+
) : null, isAndroid ? /* @__PURE__ */ React24__default.default.createElement(
|
|
1705
1776
|
picker.Picker,
|
|
1706
1777
|
{
|
|
1707
1778
|
ref: pickerRef,
|
|
@@ -1717,8 +1788,8 @@ function Select({
|
|
|
1717
1788
|
prompt: label,
|
|
1718
1789
|
style: styles20.androidHiddenPicker
|
|
1719
1790
|
},
|
|
1720
|
-
!value ? /* @__PURE__ */
|
|
1721
|
-
options.map((o) => /* @__PURE__ */
|
|
1791
|
+
!value ? /* @__PURE__ */ React24__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }) : null,
|
|
1792
|
+
options.map((o) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1722
1793
|
picker.Picker.Item,
|
|
1723
1794
|
{
|
|
1724
1795
|
key: o.value,
|
|
@@ -1727,7 +1798,7 @@ function Select({
|
|
|
1727
1798
|
enabled: !o.disabled
|
|
1728
1799
|
}
|
|
1729
1800
|
))
|
|
1730
|
-
) : null, isWeb2 ? /* @__PURE__ */
|
|
1801
|
+
) : null, isWeb2 ? /* @__PURE__ */ React24__default.default.createElement(
|
|
1731
1802
|
picker.Picker,
|
|
1732
1803
|
{
|
|
1733
1804
|
selectedValue: value ?? "",
|
|
@@ -1747,8 +1818,8 @@ function Select({
|
|
|
1747
1818
|
}
|
|
1748
1819
|
]
|
|
1749
1820
|
},
|
|
1750
|
-
/* @__PURE__ */
|
|
1751
|
-
options.map((o) => /* @__PURE__ */
|
|
1821
|
+
/* @__PURE__ */ React24__default.default.createElement(picker.Picker.Item, { label: placeholder, value: "", enabled: false }),
|
|
1822
|
+
options.map((o) => /* @__PURE__ */ React24__default.default.createElement(
|
|
1752
1823
|
picker.Picker.Item,
|
|
1753
1824
|
{
|
|
1754
1825
|
key: o.value,
|
|
@@ -1757,7 +1828,7 @@ function Select({
|
|
|
1757
1828
|
enabled: !o.disabled
|
|
1758
1829
|
}
|
|
1759
1830
|
))
|
|
1760
|
-
) : null, error ? /* @__PURE__ */
|
|
1831
|
+
) : null, error ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles20.helperText, { color: colors.destructive }] }, error) : null);
|
|
1761
1832
|
}
|
|
1762
1833
|
var styles20 = reactNative.StyleSheet.create({
|
|
1763
1834
|
container: {
|
|
@@ -1832,14 +1903,14 @@ var styles20 = reactNative.StyleSheet.create({
|
|
|
1832
1903
|
fontSize: ms(17)
|
|
1833
1904
|
}
|
|
1834
1905
|
});
|
|
1835
|
-
var ToastContext =
|
|
1906
|
+
var ToastContext = React24.createContext({
|
|
1836
1907
|
toast: () => {
|
|
1837
1908
|
},
|
|
1838
1909
|
dismiss: () => {
|
|
1839
1910
|
}
|
|
1840
1911
|
});
|
|
1841
1912
|
function useToast() {
|
|
1842
|
-
return
|
|
1913
|
+
return React24.useContext(ToastContext);
|
|
1843
1914
|
}
|
|
1844
1915
|
var SWIPE_THRESHOLD = 80;
|
|
1845
1916
|
var VELOCITY_THRESHOLD = 800;
|
|
@@ -1848,7 +1919,7 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
1848
1919
|
const translateY = Animated10.useSharedValue(-80);
|
|
1849
1920
|
const translateX = Animated10.useSharedValue(0);
|
|
1850
1921
|
const opacity = Animated10.useSharedValue(0);
|
|
1851
|
-
|
|
1922
|
+
React24.useEffect(() => {
|
|
1852
1923
|
translateY.value = Animated10.withTiming(0, { duration: 120, easing: Animated10.Easing.out(Animated10.Easing.exp) });
|
|
1853
1924
|
opacity.value = Animated10.withTiming(1, { duration: 100 });
|
|
1854
1925
|
const timer = setTimeout(() => {
|
|
@@ -1887,14 +1958,14 @@ function ToastNotification({ item, onDismiss }) {
|
|
|
1887
1958
|
destructive: colors.destructiveForeground,
|
|
1888
1959
|
success: colors.successForeground
|
|
1889
1960
|
}[item.variant ?? "default"];
|
|
1890
|
-
const defaultIcon = item.variant === "success" ? /* @__PURE__ */
|
|
1891
|
-
const leftIcon = item.icon ?? defaultIcon;
|
|
1892
|
-
return /* @__PURE__ */
|
|
1961
|
+
const defaultIcon = item.variant === "success" ? /* @__PURE__ */ React24__default.default.createElement(vectorIcons.FontAwesome5, { name: "check-circle", size: 22, color: textColor }) : item.variant === "destructive" ? /* @__PURE__ */ React24__default.default.createElement(vectorIcons.MaterialIcons, { name: "error-outline", size: 24, color: textColor }) : /* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "info-with-circle", size: 22, color: textColor });
|
|
1962
|
+
const leftIcon = item.iconName ? renderIcon(item.iconName, 22, item.iconColor ?? textColor) : item.icon ?? defaultIcon;
|
|
1963
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNativeGestureHandler.GestureDetector, { gesture: panGesture }, /* @__PURE__ */ React24__default.default.createElement(Animated10__default.default.View, { style: [styles21.toast, { backgroundColor: bgColor }, animatedStyle] }, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles21.leftIconContainer }, leftIcon), /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles21.toastContent }, item.title ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles21.toastTitle, { color: textColor }] }, item.title) : null, item.description ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles21.toastDescription, { color: textColor, opacity: 0.85 }] }, item.description) : null), /* @__PURE__ */ React24__default.default.createElement(reactNative.TouchableOpacity, { onPress: onDismiss, style: styles21.dismissButton, touchSoundDisabled: true }, /* @__PURE__ */ React24__default.default.createElement(vectorIcons.AntDesign, { name: "close-circle", size: 18, color: textColor }))));
|
|
1893
1964
|
}
|
|
1894
1965
|
function ToastProvider({ children }) {
|
|
1895
|
-
const [toasts, setToasts] =
|
|
1966
|
+
const [toasts, setToasts] = React24.useState([]);
|
|
1896
1967
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
1897
|
-
const toast =
|
|
1968
|
+
const toast = React24.useCallback((item) => {
|
|
1898
1969
|
const id = Math.random().toString(36).slice(2);
|
|
1899
1970
|
if (item.variant === "success") {
|
|
1900
1971
|
notificationSuccess();
|
|
@@ -1905,10 +1976,10 @@ function ToastProvider({ children }) {
|
|
|
1905
1976
|
}
|
|
1906
1977
|
setToasts((prev) => [{ ...item, id }, ...prev].slice(0, 3));
|
|
1907
1978
|
}, []);
|
|
1908
|
-
const dismiss =
|
|
1979
|
+
const dismiss = React24.useCallback((id) => {
|
|
1909
1980
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1910
1981
|
}, []);
|
|
1911
|
-
return /* @__PURE__ */
|
|
1982
|
+
return /* @__PURE__ */ React24__default.default.createElement(ToastContext.Provider, { value: { toast, dismiss } }, children, /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles21.container, reactNative.Platform.OS === "web" && styles21.containerWeb, { top: insets.top + 8 }], pointerEvents: "box-none" }, toasts.map((item) => /* @__PURE__ */ React24__default.default.createElement(ToastNotification, { key: item.id, item, onDismiss: () => dismiss(item.id) }))));
|
|
1912
1983
|
}
|
|
1913
1984
|
var styles21 = reactNative.StyleSheet.create({
|
|
1914
1985
|
container: {
|
|
@@ -1988,7 +2059,7 @@ function CurrencyInput({
|
|
|
1988
2059
|
onChangeValue?.(isNaN(raw) ? 0 : raw);
|
|
1989
2060
|
};
|
|
1990
2061
|
const inputStyle = size === "large" ? { fontSize: ms(36) } : {};
|
|
1991
|
-
return /* @__PURE__ */
|
|
2062
|
+
return /* @__PURE__ */ React24__default.default.createElement(
|
|
1992
2063
|
Input,
|
|
1993
2064
|
{
|
|
1994
2065
|
value,
|
|
@@ -2019,7 +2090,7 @@ function formatValue(value, prefix, showDecimals) {
|
|
|
2019
2090
|
function CurrencyDisplay({ value, prefix = "$", showDecimals = false, textColor, style }) {
|
|
2020
2091
|
const { colors } = useTheme();
|
|
2021
2092
|
const formatted = formatValue(value, prefix, showDecimals);
|
|
2022
|
-
return /* @__PURE__ */
|
|
2093
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles22.container, style] }, /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles22.amount, { color: textColor ?? colors.foreground }], allowFontScaling: true }, formatted));
|
|
2023
2094
|
}
|
|
2024
2095
|
var styles22 = reactNative.StyleSheet.create({
|
|
2025
2096
|
container: {},
|
|
@@ -2034,6 +2105,10 @@ function ListItem({
|
|
|
2034
2105
|
rightRender,
|
|
2035
2106
|
trailing,
|
|
2036
2107
|
icon,
|
|
2108
|
+
leftIcon,
|
|
2109
|
+
rightIcon,
|
|
2110
|
+
leftIconColor,
|
|
2111
|
+
rightIconColor,
|
|
2037
2112
|
title,
|
|
2038
2113
|
subtitle,
|
|
2039
2114
|
caption,
|
|
@@ -2048,7 +2123,7 @@ function ListItem({
|
|
|
2048
2123
|
captionStyle
|
|
2049
2124
|
}) {
|
|
2050
2125
|
const { colors } = useTheme();
|
|
2051
|
-
const scale2 =
|
|
2126
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
2052
2127
|
const handlePressIn = () => {
|
|
2053
2128
|
if (!onPress || disabled) return;
|
|
2054
2129
|
reactNative.Animated.spring(scale2, {
|
|
@@ -2070,8 +2145,8 @@ function ListItem({
|
|
|
2070
2145
|
selectionAsync();
|
|
2071
2146
|
onPress?.();
|
|
2072
2147
|
};
|
|
2073
|
-
const effectiveLeft = leftRender ?? icon;
|
|
2074
|
-
const effectiveRight = rightRender ?? trailing;
|
|
2148
|
+
const effectiveLeft = leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
|
|
2149
|
+
const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.mutedForeground) : rightRender ?? trailing;
|
|
2075
2150
|
const cardStyle = variant === "card" ? {
|
|
2076
2151
|
backgroundColor: colors.card,
|
|
2077
2152
|
borderRadius: 12,
|
|
@@ -2083,7 +2158,7 @@ function ListItem({
|
|
|
2083
2158
|
shadowRadius: 6,
|
|
2084
2159
|
elevation: 2
|
|
2085
2160
|
} : {};
|
|
2086
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [{ transform: [{ scale: scale2 }] }, disabled && styles23.disabled] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
2087
2162
|
reactNative.TouchableOpacity,
|
|
2088
2163
|
{
|
|
2089
2164
|
style: [styles23.container, cardStyle, style],
|
|
@@ -2094,8 +2169,8 @@ function ListItem({
|
|
|
2094
2169
|
activeOpacity: 1,
|
|
2095
2170
|
touchSoundDisabled: true
|
|
2096
2171
|
},
|
|
2097
|
-
effectiveLeft ? /* @__PURE__ */
|
|
2098
|
-
/* @__PURE__ */
|
|
2172
|
+
effectiveLeft ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles23.leftContainer }, effectiveLeft) : null,
|
|
2173
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles23.content }, /* @__PURE__ */ React24__default.default.createElement(
|
|
2099
2174
|
reactNative.Text,
|
|
2100
2175
|
{
|
|
2101
2176
|
style: [styles23.title, { color: colors.foreground }, titleStyle],
|
|
@@ -2103,7 +2178,7 @@ function ListItem({
|
|
|
2103
2178
|
allowFontScaling: true
|
|
2104
2179
|
},
|
|
2105
2180
|
title
|
|
2106
|
-
), subtitle ? /* @__PURE__ */
|
|
2181
|
+
), subtitle ? /* @__PURE__ */ React24__default.default.createElement(
|
|
2107
2182
|
reactNative.Text,
|
|
2108
2183
|
{
|
|
2109
2184
|
style: [styles23.subtitle, { color: colors.mutedForeground }, subtitleStyle],
|
|
@@ -2111,7 +2186,7 @@ function ListItem({
|
|
|
2111
2186
|
allowFontScaling: true
|
|
2112
2187
|
},
|
|
2113
2188
|
subtitle
|
|
2114
|
-
) : null, caption ? /* @__PURE__ */
|
|
2189
|
+
) : null, caption ? /* @__PURE__ */ React24__default.default.createElement(
|
|
2115
2190
|
reactNative.Text,
|
|
2116
2191
|
{
|
|
2117
2192
|
style: [styles23.caption, { color: colors.mutedForeground }, captionStyle],
|
|
@@ -2120,15 +2195,15 @@ function ListItem({
|
|
|
2120
2195
|
},
|
|
2121
2196
|
caption
|
|
2122
2197
|
) : null),
|
|
2123
|
-
effectiveRight !== void 0 ? /* @__PURE__ */
|
|
2198
|
+
effectiveRight !== void 0 ? /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles23.rightContainer }, typeof effectiveRight === "string" ? /* @__PURE__ */ React24__default.default.createElement(
|
|
2124
2199
|
reactNative.Text,
|
|
2125
2200
|
{
|
|
2126
2201
|
style: [styles23.rightText, { color: colors.mutedForeground }],
|
|
2127
2202
|
allowFontScaling: true
|
|
2128
2203
|
},
|
|
2129
2204
|
effectiveRight
|
|
2130
|
-
) : effectiveRight) : showChevron ? /* @__PURE__ */
|
|
2131
|
-
), showSeparator ? /* @__PURE__ */
|
|
2205
|
+
) : effectiveRight) : showChevron ? /* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "chevron-with-circle-right", size: 20, color: colors.mutedForeground }) : null
|
|
2206
|
+
), showSeparator ? /* @__PURE__ */ React24__default.default.createElement(
|
|
2132
2207
|
reactNative.View,
|
|
2133
2208
|
{
|
|
2134
2209
|
style: [
|
|
@@ -2196,9 +2271,9 @@ var styles23 = reactNative.StyleSheet.create({
|
|
|
2196
2271
|
var nativeDriver8 = reactNative.Platform.OS !== "web";
|
|
2197
2272
|
function Chip({ label, selected = false, onPress, style }) {
|
|
2198
2273
|
const { colors } = useTheme();
|
|
2199
|
-
const scale2 =
|
|
2200
|
-
const pressAnim =
|
|
2201
|
-
|
|
2274
|
+
const scale2 = React24.useRef(new reactNative.Animated.Value(1)).current;
|
|
2275
|
+
const pressAnim = React24.useRef(new reactNative.Animated.Value(selected ? 1 : 0)).current;
|
|
2276
|
+
React24.useEffect(() => {
|
|
2202
2277
|
reactNative.Animated.timing(pressAnim, {
|
|
2203
2278
|
toValue: selected ? 1 : 0,
|
|
2204
2279
|
duration: 150,
|
|
@@ -2238,7 +2313,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2238
2313
|
inputRange: [0, 1],
|
|
2239
2314
|
outputRange: [colors.border, colors.primary]
|
|
2240
2315
|
});
|
|
2241
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [styles24.wrapper, { transform: [{ scale: scale2 }] }, style] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
2242
2317
|
reactNative.TouchableOpacity,
|
|
2243
2318
|
{
|
|
2244
2319
|
onPress: handlePress,
|
|
@@ -2247,7 +2322,7 @@ function Chip({ label, selected = false, onPress, style }) {
|
|
|
2247
2322
|
activeOpacity: 1,
|
|
2248
2323
|
touchSoundDisabled: true
|
|
2249
2324
|
},
|
|
2250
|
-
/* @__PURE__ */
|
|
2325
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.View, { style: [styles24.chip, { backgroundColor, borderColor }] }, /* @__PURE__ */ React24__default.default.createElement(reactNative.Animated.Text, { style: [styles24.label, { color: textColor }], allowFontScaling: true }, label))
|
|
2251
2326
|
));
|
|
2252
2327
|
}
|
|
2253
2328
|
function ChipGroup({ options, value, onValueChange, multiSelect = false, style }) {
|
|
@@ -2272,7 +2347,7 @@ function ChipGroup({ options, value, onValueChange, multiSelect = false, style }
|
|
|
2272
2347
|
}
|
|
2273
2348
|
return optionValue === value;
|
|
2274
2349
|
};
|
|
2275
|
-
return /* @__PURE__ */
|
|
2350
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles24.group, style] }, options.map((opt) => /* @__PURE__ */ React24__default.default.createElement(
|
|
2276
2351
|
Chip,
|
|
2277
2352
|
{
|
|
2278
2353
|
key: opt.value,
|
|
@@ -2314,15 +2389,15 @@ function ConfirmDialog({
|
|
|
2314
2389
|
onCancel
|
|
2315
2390
|
}) {
|
|
2316
2391
|
const { colors } = useTheme();
|
|
2317
|
-
return /* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onCancel }, /* @__PURE__ */ React24__default.default.createElement(reactNative.TouchableOpacity, { style: styles25.overlay, activeOpacity: 1, onPress: onCancel }, /* @__PURE__ */ React24__default.default.createElement(
|
|
2318
2393
|
reactNative.View,
|
|
2319
2394
|
{
|
|
2320
2395
|
style: [styles25.dialog, { backgroundColor: colors.card }],
|
|
2321
2396
|
onStartShouldSetResponder: () => true
|
|
2322
2397
|
},
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
description ? /* @__PURE__ */
|
|
2325
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles25.title, { color: colors.cardForeground }], allowFontScaling: true }, title),
|
|
2399
|
+
description ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles25.description, { color: colors.mutedForeground }], allowFontScaling: true }, description) : null,
|
|
2400
|
+
/* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: styles25.actions }, /* @__PURE__ */ React24__default.default.createElement(Button, { label: cancelLabel, variant: "outline", fullWidth: true, onPress: onCancel }), /* @__PURE__ */ React24__default.default.createElement(Button, { label: confirmLabel, variant: confirmVariant, fullWidth: true, onPress: onConfirm }))
|
|
2326
2401
|
)));
|
|
2327
2402
|
}
|
|
2328
2403
|
var styles25 = reactNative.StyleSheet.create({
|
|
@@ -2361,7 +2436,7 @@ var styles25 = reactNative.StyleSheet.create({
|
|
|
2361
2436
|
});
|
|
2362
2437
|
function LabelValue({ label, value, style }) {
|
|
2363
2438
|
const { colors } = useTheme();
|
|
2364
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles26.container, style] }, /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles26.label, { color: colors.mutedForeground }], allowFontScaling: true }, label), typeof value === "string" ? /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles26.value, { color: colors.foreground }], allowFontScaling: true }, value) : value);
|
|
2365
2440
|
}
|
|
2366
2441
|
var styles26 = reactNative.StyleSheet.create({
|
|
2367
2442
|
container: {
|
|
@@ -2413,7 +2488,7 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2413
2488
|
onChange({ month: value.month + 1, year: value.year });
|
|
2414
2489
|
}
|
|
2415
2490
|
};
|
|
2416
|
-
return /* @__PURE__ */
|
|
2491
|
+
return /* @__PURE__ */ React24__default.default.createElement(reactNative.View, { style: [styles27.container, style] }, /* @__PURE__ */ React24__default.default.createElement(
|
|
2417
2492
|
reactNative.TouchableOpacity,
|
|
2418
2493
|
{
|
|
2419
2494
|
style: styles27.arrow,
|
|
@@ -2421,8 +2496,8 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2421
2496
|
activeOpacity: 0.6,
|
|
2422
2497
|
touchSoundDisabled: true
|
|
2423
2498
|
},
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
), /* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "chevron-left", size: 22, color: colors.foreground })
|
|
2500
|
+
), /* @__PURE__ */ React24__default.default.createElement(reactNative.Text, { style: [styles27.label, { color: colors.foreground }], allowFontScaling: true }, MONTH_NAMES[value.month - 1], " ", value.year), /* @__PURE__ */ React24__default.default.createElement(
|
|
2426
2501
|
reactNative.TouchableOpacity,
|
|
2427
2502
|
{
|
|
2428
2503
|
style: styles27.arrow,
|
|
@@ -2430,7 +2505,7 @@ function MonthPicker({ value, onChange, style }) {
|
|
|
2430
2505
|
activeOpacity: 0.6,
|
|
2431
2506
|
touchSoundDisabled: true
|
|
2432
2507
|
},
|
|
2433
|
-
/* @__PURE__ */
|
|
2508
|
+
/* @__PURE__ */ React24__default.default.createElement(vectorIcons.Entypo, { name: "chevron-right", size: 22, color: colors.foreground })
|
|
2434
2509
|
));
|
|
2435
2510
|
}
|
|
2436
2511
|
var styles27 = reactNative.StyleSheet.create({
|
|
@@ -2454,6 +2529,64 @@ var styles27 = reactNative.StyleSheet.create({
|
|
|
2454
2529
|
}
|
|
2455
2530
|
});
|
|
2456
2531
|
|
|
2532
|
+
// src/tokens.ts
|
|
2533
|
+
var SPACING = {
|
|
2534
|
+
xs: 4,
|
|
2535
|
+
sm: 8,
|
|
2536
|
+
md: 12,
|
|
2537
|
+
lg: 16,
|
|
2538
|
+
xl: 24,
|
|
2539
|
+
"2xl": 32,
|
|
2540
|
+
"3xl": 48
|
|
2541
|
+
};
|
|
2542
|
+
var ICON_SIZES = {
|
|
2543
|
+
sm: 14,
|
|
2544
|
+
md: 18,
|
|
2545
|
+
lg: 22,
|
|
2546
|
+
xl: 28,
|
|
2547
|
+
"2xl": 32
|
|
2548
|
+
};
|
|
2549
|
+
var RADIUS = {
|
|
2550
|
+
sm: 4,
|
|
2551
|
+
md: 8,
|
|
2552
|
+
lg: 12,
|
|
2553
|
+
xl: 16,
|
|
2554
|
+
full: 9999
|
|
2555
|
+
};
|
|
2556
|
+
var SHADOWS = {
|
|
2557
|
+
sm: {
|
|
2558
|
+
shadowColor: "#000",
|
|
2559
|
+
shadowOffset: { width: 0, height: 1 },
|
|
2560
|
+
shadowOpacity: 0.08,
|
|
2561
|
+
shadowRadius: 4,
|
|
2562
|
+
elevation: 2
|
|
2563
|
+
},
|
|
2564
|
+
md: {
|
|
2565
|
+
shadowColor: "#000",
|
|
2566
|
+
shadowOffset: { width: 0, height: 3 },
|
|
2567
|
+
shadowOpacity: 0.12,
|
|
2568
|
+
shadowRadius: 8,
|
|
2569
|
+
elevation: 5
|
|
2570
|
+
},
|
|
2571
|
+
lg: {
|
|
2572
|
+
shadowColor: "#000",
|
|
2573
|
+
shadowOffset: { width: 0, height: 6 },
|
|
2574
|
+
shadowOpacity: 0.2,
|
|
2575
|
+
shadowRadius: 16,
|
|
2576
|
+
elevation: 10
|
|
2577
|
+
},
|
|
2578
|
+
xl: {
|
|
2579
|
+
shadowColor: "#000",
|
|
2580
|
+
shadowOffset: { width: 0, height: 12 },
|
|
2581
|
+
shadowOpacity: 0.28,
|
|
2582
|
+
shadowRadius: 24,
|
|
2583
|
+
elevation: 18
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
var BREAKPOINTS = {
|
|
2587
|
+
wide: 700
|
|
2588
|
+
};
|
|
2589
|
+
|
|
2457
2590
|
Object.defineProperty(exports, "BottomSheetModalProvider", {
|
|
2458
2591
|
enumerable: true,
|
|
2459
2592
|
get: function () { return bottomSheet.BottomSheetModalProvider; }
|
|
@@ -2461,6 +2594,7 @@ Object.defineProperty(exports, "BottomSheetModalProvider", {
|
|
|
2461
2594
|
exports.Accordion = Accordion;
|
|
2462
2595
|
exports.AlertBanner = AlertBanner;
|
|
2463
2596
|
exports.Avatar = Avatar;
|
|
2597
|
+
exports.BREAKPOINTS = BREAKPOINTS;
|
|
2464
2598
|
exports.Badge = Badge;
|
|
2465
2599
|
exports.Button = Button;
|
|
2466
2600
|
exports.Card = Card;
|
|
@@ -2477,12 +2611,17 @@ exports.CurrencyDisplay = CurrencyDisplay;
|
|
|
2477
2611
|
exports.CurrencyInput = CurrencyInput;
|
|
2478
2612
|
exports.CurrencyInputLarge = CurrencyInput;
|
|
2479
2613
|
exports.EmptyState = EmptyState;
|
|
2614
|
+
exports.ICON_SIZES = ICON_SIZES;
|
|
2615
|
+
exports.Icon = Icon;
|
|
2480
2616
|
exports.Input = Input;
|
|
2481
2617
|
exports.LabelValue = LabelValue;
|
|
2482
2618
|
exports.ListItem = ListItem;
|
|
2483
2619
|
exports.MonthPicker = MonthPicker;
|
|
2484
2620
|
exports.Progress = Progress;
|
|
2621
|
+
exports.RADIUS = RADIUS;
|
|
2485
2622
|
exports.RadioGroup = RadioGroup;
|
|
2623
|
+
exports.SHADOWS = SHADOWS;
|
|
2624
|
+
exports.SPACING = SPACING;
|
|
2486
2625
|
exports.Select = Select;
|
|
2487
2626
|
exports.Separator = Separator;
|
|
2488
2627
|
exports.Sheet = Sheet;
|
|
@@ -2499,5 +2638,6 @@ exports.ToastProvider = ToastProvider;
|
|
|
2499
2638
|
exports.Toggle = Toggle;
|
|
2500
2639
|
exports.defaultDark = defaultDark;
|
|
2501
2640
|
exports.defaultLight = defaultLight;
|
|
2641
|
+
exports.renderIcon = renderIcon;
|
|
2502
2642
|
exports.useTheme = useTheme;
|
|
2503
2643
|
exports.useToast = useToast;
|