@retray-dev/ui-kit 9.2.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.
- package/COMPONENTS.md +2 -1
- package/dist/CurrencyInput.js +21 -35
- package/dist/CurrencyInput.mjs +2 -3
- package/dist/Input.js +21 -35
- package/dist/Input.mjs +1 -2
- package/dist/ListItem.d.mts +7 -2
- package/dist/ListItem.d.ts +7 -2
- package/dist/ListItem.js +7 -1
- package/dist/ListItem.mjs +1 -1
- package/dist/Textarea.mjs +1 -2
- package/dist/{chunk-EH745HE5.mjs → chunk-CZCQZHG6.mjs} +13 -4
- package/dist/{chunk-KNSENOV4.mjs → chunk-JUXSWN54.mjs} +1 -1
- package/dist/{chunk-T4I5WVHA.mjs → chunk-OHBNABL5.mjs} +8 -2
- package/dist/{chunk-LVYEU5ZK.mjs → chunk-ZUR7AU5R.mjs} +11 -18
- package/dist/fonts.d.mts +32 -0
- package/dist/fonts.d.ts +32 -0
- package/dist/fonts.js +44 -0
- package/dist/fonts.mjs +37 -0
- package/dist/index.js +98 -98
- package/dist/index.mjs +8 -9
- package/package.json +7 -3
- package/src/components/Input/Input.tsx +13 -30
- package/src/components/ListItem/ListItem.tsx +19 -3
- package/src/fonts.ts +30 -29
- package/dist/chunk-26BCI223.mjs +0 -14
package/COMPONENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @retray-dev/ui-kit — Component Reference (v9.
|
|
1
|
+
# @retray-dev/ui-kit — Component Reference (v9.3.0)
|
|
2
2
|
|
|
3
3
|
This file is the AI reference for this package. Add all three lines below to your project's `CLAUDE.md` to give Claude full context — components, setup guide, and usage examples:
|
|
4
4
|
|
|
@@ -2647,6 +2647,7 @@ dismiss(id)
|
|
|
2647
2647
|
| title | `string` | required | Primary text |
|
|
2648
2648
|
| subtitle | `string` | — | Secondary line below title |
|
|
2649
2649
|
| caption | `string` | — | Tertiary line below subtitle |
|
|
2650
|
+
| imageSource | `ImageSourcePropType` | — | Image for left slot (40×40, radius 8). Takes precedence over `leftRender`/`leftIcon` |
|
|
2650
2651
|
| leftRender | `ReactNode` | — | Content in the fixed 44×44pt left slot |
|
|
2651
2652
|
| rightRender | `string \| ReactNode` | — | Content on the right edge. Strings auto-styled as muted text |
|
|
2652
2653
|
| leftIcon | `string` | — | Icon name for left slot. Takes precedence over `leftRender` |
|
package/dist/CurrencyInput.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React3 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var bottomSheet = require('@gorhom/bottom-sheet');
|
|
6
|
-
var
|
|
6
|
+
var reactNativeEase = require('react-native-ease');
|
|
7
7
|
var vectorIcons = require('@expo/vector-icons');
|
|
8
8
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
9
9
|
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
@@ -12,11 +12,11 @@ var Feather = require('@expo/vector-icons/Feather');
|
|
|
12
12
|
var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
|
|
13
13
|
var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
|
|
14
14
|
var Ionicons = require('@expo/vector-icons/Ionicons');
|
|
15
|
+
var reactNativeReanimated = require('react-native-reanimated');
|
|
15
16
|
|
|
16
17
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
|
|
18
19
|
var React3__default = /*#__PURE__*/_interopDefault(React3);
|
|
19
|
-
var Animated__default = /*#__PURE__*/_interopDefault(Animated);
|
|
20
20
|
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
21
21
|
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
22
22
|
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
@@ -191,38 +191,27 @@ function renderIcon(name, size, color) {
|
|
|
191
191
|
}
|
|
192
192
|
var TIMINGS = {
|
|
193
193
|
/** Color/opacity transitions on toggles, checkboxes, switches. */
|
|
194
|
-
state: { duration: 160 }
|
|
195
|
-
|
|
196
|
-
focusIn: { duration: 140 },
|
|
197
|
-
focusOut: { duration: 100 }};
|
|
198
|
-
var EASINGS = {
|
|
194
|
+
state: { duration: 160 }};
|
|
195
|
+
({
|
|
199
196
|
/** Material-style ease-out — natural deceleration for state changes. */
|
|
200
|
-
standard:
|
|
197
|
+
standard: reactNativeReanimated.Easing.bezier(0.2, 0, 0, 1),
|
|
201
198
|
/** Strong ease-out for expanding surfaces (Accordion open). */
|
|
202
|
-
expand:
|
|
199
|
+
expand: reactNativeReanimated.Easing.bezier(0.23, 1, 0.32, 1),
|
|
203
200
|
/** Quick ease-in for collapsing. */
|
|
204
|
-
collapse:
|
|
201
|
+
collapse: reactNativeReanimated.Easing.in(reactNativeReanimated.Easing.ease)
|
|
202
|
+
});
|
|
203
|
+
var COLOR_TRANSITION = {
|
|
204
|
+
type: "timing",
|
|
205
|
+
duration: TIMINGS.state.duration,
|
|
206
|
+
easing: [0.2, 0, 0, 1]
|
|
205
207
|
};
|
|
206
208
|
|
|
207
|
-
// src/utils/useColorTransition.ts
|
|
208
|
-
function useColorTransition(active, options = {}) {
|
|
209
|
-
const { duration = TIMINGS.state.duration } = options;
|
|
210
|
-
const progress = Animated.useSharedValue(active ? 1 : 0);
|
|
211
|
-
React3.useEffect(() => {
|
|
212
|
-
progress.value = Animated.withTiming(active ? 1 : 0, { duration, easing: EASINGS.standard });
|
|
213
|
-
}, [active, duration, progress]);
|
|
214
|
-
return progress;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
209
|
// src/components/Input/Input.tsx
|
|
218
210
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
219
211
|
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 }) {
|
|
220
212
|
const { colors } = useTheme();
|
|
221
213
|
const [focused, setFocused] = React3.useState(false);
|
|
222
214
|
const [showPassword, setShowPassword] = React3.useState(false);
|
|
223
|
-
const focusProgress = useColorTransition(focused, {
|
|
224
|
-
duration: focused ? TIMINGS.focusIn.duration : TIMINGS.focusOut.duration
|
|
225
|
-
});
|
|
226
215
|
const isDisabled = disabled || editable === false;
|
|
227
216
|
const isPassword = type === "password";
|
|
228
217
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
@@ -238,20 +227,19 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
238
227
|
},
|
|
239
228
|
/* @__PURE__ */ React3__default.default.createElement(vectorIcons.AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })
|
|
240
229
|
) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.foregroundMuted) : suffix;
|
|
241
|
-
const
|
|
242
|
-
borderColor: error ? colors.destructive : Animated.interpolateColor(focusProgress.value, [0, 1], [colors.border, colors.primary]),
|
|
243
|
-
borderWidth: error ? 2 : Animated.interpolate(focusProgress.value, [0, 1], [1, 2])
|
|
244
|
-
}));
|
|
230
|
+
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
245
231
|
return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.container, isDisabled && styles.containerDisabled, containerStyle] }, label ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React3__default.default.createElement(
|
|
246
|
-
|
|
232
|
+
reactNativeEase.EaseView,
|
|
247
233
|
{
|
|
248
234
|
style: [
|
|
249
235
|
styles.inputWrapper,
|
|
250
236
|
{ backgroundColor: isDisabled ? colors.surface : colors.background },
|
|
237
|
+
error && styles.inputWrapperError,
|
|
251
238
|
inputWrapperStyle
|
|
252
|
-
]
|
|
239
|
+
],
|
|
240
|
+
animate: { borderColor },
|
|
241
|
+
transition: COLOR_TRANSITION
|
|
253
242
|
},
|
|
254
|
-
/* @__PURE__ */ React3__default.default.createElement(Animated__default.default.View, { style: [styles.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
|
|
255
243
|
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.prefixText, { color: colors.foregroundMuted }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.prefixContainer }, effectivePrefix) : null,
|
|
256
244
|
sheetMode ? /* @__PURE__ */ React3__default.default.createElement(
|
|
257
245
|
bottomSheet.BottomSheetTextInput,
|
|
@@ -327,16 +315,14 @@ var styles = reactNative.StyleSheet.create({
|
|
|
327
315
|
inputWrapper: {
|
|
328
316
|
flexDirection: "row",
|
|
329
317
|
alignItems: "center",
|
|
330
|
-
// Border lives on borderOverlay (absolute) so its 1px→2px focus change
|
|
331
|
-
// never resizes this box. Wrapper itself carries no border.
|
|
332
318
|
borderRadius: 8,
|
|
319
|
+
borderWidth: 1,
|
|
333
320
|
paddingHorizontal: s(14),
|
|
334
321
|
paddingVertical: vs(11),
|
|
335
322
|
minHeight: 48
|
|
336
323
|
},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
borderRadius: 8
|
|
324
|
+
inputWrapperError: {
|
|
325
|
+
borderWidth: 2
|
|
340
326
|
},
|
|
341
327
|
input: {
|
|
342
328
|
fontFamily: "Sohne-Regular",
|
package/dist/CurrencyInput.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { CurrencyInput } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-26BCI223.mjs';
|
|
1
|
+
export { CurrencyInput } from './chunk-JUXSWN54.mjs';
|
|
2
|
+
import './chunk-ZUR7AU5R.mjs';
|
|
4
3
|
import './chunk-DVK4G2GT.mjs';
|
|
5
4
|
import './chunk-T7XZ7H7Y.mjs';
|
|
6
5
|
import './chunk-SOYNZDVY.mjs';
|
package/dist/Input.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React3 = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var bottomSheet = require('@gorhom/bottom-sheet');
|
|
6
|
-
var
|
|
6
|
+
var reactNativeEase = require('react-native-ease');
|
|
7
7
|
var vectorIcons = require('@expo/vector-icons');
|
|
8
8
|
var reactNativeSizeMatters = require('react-native-size-matters');
|
|
9
9
|
var AntDesign = require('@expo/vector-icons/AntDesign');
|
|
@@ -12,11 +12,11 @@ var Feather = require('@expo/vector-icons/Feather');
|
|
|
12
12
|
var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
|
|
13
13
|
var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
|
|
14
14
|
var Ionicons = require('@expo/vector-icons/Ionicons');
|
|
15
|
+
var reactNativeReanimated = require('react-native-reanimated');
|
|
15
16
|
|
|
16
17
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
|
|
18
19
|
var React3__default = /*#__PURE__*/_interopDefault(React3);
|
|
19
|
-
var Animated__default = /*#__PURE__*/_interopDefault(Animated);
|
|
20
20
|
var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
|
|
21
21
|
var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
|
|
22
22
|
var Feather__default = /*#__PURE__*/_interopDefault(Feather);
|
|
@@ -191,38 +191,27 @@ function renderIcon(name, size, color) {
|
|
|
191
191
|
}
|
|
192
192
|
var TIMINGS = {
|
|
193
193
|
/** Color/opacity transitions on toggles, checkboxes, switches. */
|
|
194
|
-
state: { duration: 160 }
|
|
195
|
-
|
|
196
|
-
focusIn: { duration: 140 },
|
|
197
|
-
focusOut: { duration: 100 }};
|
|
198
|
-
var EASINGS = {
|
|
194
|
+
state: { duration: 160 }};
|
|
195
|
+
({
|
|
199
196
|
/** Material-style ease-out — natural deceleration for state changes. */
|
|
200
|
-
standard:
|
|
197
|
+
standard: reactNativeReanimated.Easing.bezier(0.2, 0, 0, 1),
|
|
201
198
|
/** Strong ease-out for expanding surfaces (Accordion open). */
|
|
202
|
-
expand:
|
|
199
|
+
expand: reactNativeReanimated.Easing.bezier(0.23, 1, 0.32, 1),
|
|
203
200
|
/** Quick ease-in for collapsing. */
|
|
204
|
-
collapse:
|
|
201
|
+
collapse: reactNativeReanimated.Easing.in(reactNativeReanimated.Easing.ease)
|
|
202
|
+
});
|
|
203
|
+
var COLOR_TRANSITION = {
|
|
204
|
+
type: "timing",
|
|
205
|
+
duration: TIMINGS.state.duration,
|
|
206
|
+
easing: [0.2, 0, 0, 1]
|
|
205
207
|
};
|
|
206
208
|
|
|
207
|
-
// src/utils/useColorTransition.ts
|
|
208
|
-
function useColorTransition(active, options = {}) {
|
|
209
|
-
const { duration = TIMINGS.state.duration } = options;
|
|
210
|
-
const progress = Animated.useSharedValue(active ? 1 : 0);
|
|
211
|
-
React3.useEffect(() => {
|
|
212
|
-
progress.value = Animated.withTiming(active ? 1 : 0, { duration, easing: EASINGS.standard });
|
|
213
|
-
}, [active, duration, progress]);
|
|
214
|
-
return progress;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
209
|
// src/components/Input/Input.tsx
|
|
218
210
|
var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
219
211
|
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 }) {
|
|
220
212
|
const { colors } = useTheme();
|
|
221
213
|
const [focused, setFocused] = React3.useState(false);
|
|
222
214
|
const [showPassword, setShowPassword] = React3.useState(false);
|
|
223
|
-
const focusProgress = useColorTransition(focused, {
|
|
224
|
-
duration: focused ? TIMINGS.focusIn.duration : TIMINGS.focusOut.duration
|
|
225
|
-
});
|
|
226
215
|
const isDisabled = disabled || editable === false;
|
|
227
216
|
const isPassword = type === "password";
|
|
228
217
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
@@ -238,20 +227,19 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
238
227
|
},
|
|
239
228
|
/* @__PURE__ */ React3__default.default.createElement(vectorIcons.AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })
|
|
240
229
|
) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.foregroundMuted) : suffix;
|
|
241
|
-
const
|
|
242
|
-
borderColor: error ? colors.destructive : Animated.interpolateColor(focusProgress.value, [0, 1], [colors.border, colors.primary]),
|
|
243
|
-
borderWidth: error ? 2 : Animated.interpolate(focusProgress.value, [0, 1], [1, 2])
|
|
244
|
-
}));
|
|
230
|
+
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
245
231
|
return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.container, isDisabled && styles.containerDisabled, containerStyle] }, label ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React3__default.default.createElement(
|
|
246
|
-
|
|
232
|
+
reactNativeEase.EaseView,
|
|
247
233
|
{
|
|
248
234
|
style: [
|
|
249
235
|
styles.inputWrapper,
|
|
250
236
|
{ backgroundColor: isDisabled ? colors.surface : colors.background },
|
|
237
|
+
error && styles.inputWrapperError,
|
|
251
238
|
inputWrapperStyle
|
|
252
|
-
]
|
|
239
|
+
],
|
|
240
|
+
animate: { borderColor },
|
|
241
|
+
transition: COLOR_TRANSITION
|
|
253
242
|
},
|
|
254
|
-
/* @__PURE__ */ React3__default.default.createElement(Animated__default.default.View, { style: [styles.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
|
|
255
243
|
effectivePrefix ? typeof effectivePrefix === "string" ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.prefixText, { color: colors.foregroundMuted }, prefixStyle], allowFontScaling: true }, effectivePrefix) : /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.prefixContainer }, effectivePrefix) : null,
|
|
256
244
|
sheetMode ? /* @__PURE__ */ React3__default.default.createElement(
|
|
257
245
|
bottomSheet.BottomSheetTextInput,
|
|
@@ -327,16 +315,14 @@ var styles = reactNative.StyleSheet.create({
|
|
|
327
315
|
inputWrapper: {
|
|
328
316
|
flexDirection: "row",
|
|
329
317
|
alignItems: "center",
|
|
330
|
-
// Border lives on borderOverlay (absolute) so its 1px→2px focus change
|
|
331
|
-
// never resizes this box. Wrapper itself carries no border.
|
|
332
318
|
borderRadius: 8,
|
|
319
|
+
borderWidth: 1,
|
|
333
320
|
paddingHorizontal: s(14),
|
|
334
321
|
paddingVertical: vs(11),
|
|
335
322
|
minHeight: 48
|
|
336
323
|
},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
borderRadius: 8
|
|
324
|
+
inputWrapperError: {
|
|
325
|
+
borderWidth: 2
|
|
340
326
|
},
|
|
341
327
|
input: {
|
|
342
328
|
fontFamily: "Sohne-Regular",
|
package/dist/Input.mjs
CHANGED
package/dist/ListItem.d.mts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
+
import { ImageSourcePropType, ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type ListItemVariant = 'plain' | 'card';
|
|
5
5
|
interface ListItemProps {
|
|
6
|
+
/**
|
|
7
|
+
* Image source for the left slot. If provided, renders an Image (40×40, borderRadius 8).
|
|
8
|
+
* Takes precedence over `leftRender` and `leftIcon`.
|
|
9
|
+
*/
|
|
10
|
+
imageSource?: ImageSourcePropType;
|
|
6
11
|
/**
|
|
7
12
|
* Arbitrary content rendered on the left (avatar, icon, image, etc.).
|
|
8
13
|
* Rendered inside a 44×44 aligned container.
|
|
@@ -60,7 +65,7 @@ interface ListItemProps {
|
|
|
60
65
|
/** Accessibility label override. Defaults to the title. */
|
|
61
66
|
accessibilityLabel?: string;
|
|
62
67
|
}
|
|
63
|
-
declare function ListItemBase({ leftRender, rightRender, trailing, icon, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, }: ListItemProps): React.JSX.Element;
|
|
68
|
+
declare function ListItemBase({ imageSource, leftRender, rightRender, trailing, icon, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, }: ListItemProps): React.JSX.Element;
|
|
64
69
|
declare const ListItem: React.MemoExoticComponent<typeof ListItemBase>;
|
|
65
70
|
|
|
66
71
|
export { ListItem, type ListItemProps };
|
package/dist/ListItem.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
+
import { ImageSourcePropType, ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type ListItemVariant = 'plain' | 'card';
|
|
5
5
|
interface ListItemProps {
|
|
6
|
+
/**
|
|
7
|
+
* Image source for the left slot. If provided, renders an Image (40×40, borderRadius 8).
|
|
8
|
+
* Takes precedence over `leftRender` and `leftIcon`.
|
|
9
|
+
*/
|
|
10
|
+
imageSource?: ImageSourcePropType;
|
|
6
11
|
/**
|
|
7
12
|
* Arbitrary content rendered on the left (avatar, icon, image, etc.).
|
|
8
13
|
* Rendered inside a 44×44 aligned container.
|
|
@@ -60,7 +65,7 @@ interface ListItemProps {
|
|
|
60
65
|
/** Accessibility label override. Defaults to the title. */
|
|
61
66
|
accessibilityLabel?: string;
|
|
62
67
|
}
|
|
63
|
-
declare function ListItemBase({ leftRender, rightRender, trailing, icon, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, }: ListItemProps): React.JSX.Element;
|
|
68
|
+
declare function ListItemBase({ imageSource, leftRender, rightRender, trailing, icon, leftIcon, rightIcon, leftIconColor, rightIconColor, title, subtitle, caption, variant, showChevron, showSeparator, onPress, disabled, style, titleStyle, subtitleStyle, subtitleNumberOfLines, captionStyle, accessibilityLabel, }: ListItemProps): React.JSX.Element;
|
|
64
69
|
declare const ListItem: React.MemoExoticComponent<typeof ListItemBase>;
|
|
65
70
|
|
|
66
71
|
export { ListItem, type ListItemProps };
|
package/dist/ListItem.js
CHANGED
|
@@ -294,6 +294,7 @@ pressto.createAnimatedPressable((progress) => {
|
|
|
294
294
|
|
|
295
295
|
// src/components/ListItem/ListItem.tsx
|
|
296
296
|
function ListItemBase({
|
|
297
|
+
imageSource,
|
|
297
298
|
leftRender,
|
|
298
299
|
rightRender,
|
|
299
300
|
trailing,
|
|
@@ -322,7 +323,7 @@ function ListItemBase({
|
|
|
322
323
|
selectionAsync();
|
|
323
324
|
onPress?.();
|
|
324
325
|
};
|
|
325
|
-
const effectiveLeft = leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
|
|
326
|
+
const effectiveLeft = imageSource ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Image, { source: imageSource, style: styles.image }) : leftIcon ? renderIcon(leftIcon, 24, leftIconColor ?? colors.foreground) : leftRender ?? icon;
|
|
326
327
|
const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted) : rightRender ?? trailing;
|
|
327
328
|
const cardStyle = variant === "card" ? {
|
|
328
329
|
backgroundColor: colors.card,
|
|
@@ -403,6 +404,11 @@ var styles = reactNative.StyleSheet.create({
|
|
|
403
404
|
justifyContent: "center",
|
|
404
405
|
flexShrink: 0
|
|
405
406
|
},
|
|
407
|
+
image: {
|
|
408
|
+
width: s(40),
|
|
409
|
+
height: s(40),
|
|
410
|
+
borderRadius: 8
|
|
411
|
+
},
|
|
406
412
|
content: {
|
|
407
413
|
flex: 1,
|
|
408
414
|
gap: vs(4)
|
package/dist/ListItem.mjs
CHANGED
package/dist/Textarea.mjs
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TIMINGS } from './chunk-DVK4G2GT.mjs';
|
|
1
|
+
import { TIMINGS, EASINGS } from './chunk-DVK4G2GT.mjs';
|
|
3
2
|
import { renderIcon } from './chunk-T7XZ7H7Y.mjs';
|
|
4
3
|
import { useTheme } from './chunk-SOYNZDVY.mjs';
|
|
5
4
|
import { vs, ms, s } from './chunk-2CE3TQVY.mjs';
|
|
6
|
-
import React, { useState } from 'react';
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
7
6
|
import { Platform, StyleSheet, View, Text, TextInput } from 'react-native';
|
|
8
|
-
import Animated, { useAnimatedStyle, interpolate, interpolateColor } from 'react-native-reanimated';
|
|
7
|
+
import Animated, { useAnimatedStyle, interpolate, interpolateColor, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
9
8
|
|
|
9
|
+
function useColorTransition(active, options = {}) {
|
|
10
|
+
const { duration = TIMINGS.state.duration } = options;
|
|
11
|
+
const progress = useSharedValue(active ? 1 : 0);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
progress.value = withTiming(active ? 1 : 0, { duration, easing: EASINGS.standard });
|
|
14
|
+
}, [active, duration, progress]);
|
|
15
|
+
return progress;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/components/Textarea/Textarea.tsx
|
|
10
19
|
var webInputResetStyle = Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
11
20
|
function Textarea({
|
|
12
21
|
label,
|
|
@@ -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,
|
|
@@ -37,7 +38,7 @@ function ListItemBase({
|
|
|
37
38
|
selectionAsync();
|
|
38
39
|
onPress?.();
|
|
39
40
|
};
|
|
40
|
-
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;
|
|
41
42
|
const effectiveRight = rightIcon ? renderIcon(rightIcon, 24, rightIconColor ?? colors.foregroundMuted) : rightRender ?? trailing;
|
|
42
43
|
const cardStyle = variant === "card" ? {
|
|
43
44
|
backgroundColor: colors.card,
|
|
@@ -118,6 +119,11 @@ var styles = StyleSheet.create({
|
|
|
118
119
|
justifyContent: "center",
|
|
119
120
|
flexShrink: 0
|
|
120
121
|
},
|
|
122
|
+
image: {
|
|
123
|
+
width: s(40),
|
|
124
|
+
height: s(40),
|
|
125
|
+
borderRadius: 8
|
|
126
|
+
},
|
|
121
127
|
content: {
|
|
122
128
|
flex: 1,
|
|
123
129
|
gap: vs(4)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
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
7
|
import { BottomSheetTextInput } from '@gorhom/bottom-sheet';
|
|
9
|
-
import
|
|
8
|
+
import { EaseView } from 'react-native-ease';
|
|
10
9
|
import { AntDesign } from '@expo/vector-icons';
|
|
11
10
|
|
|
12
11
|
var webInputResetStyle = Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
|
|
@@ -14,9 +13,6 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
14
13
|
const { colors } = useTheme();
|
|
15
14
|
const [focused, setFocused] = useState(false);
|
|
16
15
|
const [showPassword, setShowPassword] = useState(false);
|
|
17
|
-
const focusProgress = useColorTransition(focused, {
|
|
18
|
-
duration: focused ? TIMINGS.focusIn.duration : TIMINGS.focusOut.duration
|
|
19
|
-
});
|
|
20
16
|
const isDisabled = disabled || editable === false;
|
|
21
17
|
const isPassword = type === "password";
|
|
22
18
|
const effectiveSecure = isPassword ? !showPassword : secureTextEntry;
|
|
@@ -32,20 +28,19 @@ function Input({ label, error, hint, disabled, prefix, suffix, prefixStyle, suff
|
|
|
32
28
|
},
|
|
33
29
|
/* @__PURE__ */ React.createElement(AntDesign, { name: showPassword ? "eye" : "eye-invisible", size: 20, color: colors.foregroundMuted })
|
|
34
30
|
) : suffixIcon ? renderIcon(suffixIcon, 20, suffixIconColor ?? colors.foregroundMuted) : suffix;
|
|
35
|
-
const
|
|
36
|
-
borderColor: error ? colors.destructive : interpolateColor(focusProgress.value, [0, 1], [colors.border, colors.primary]),
|
|
37
|
-
borderWidth: error ? 2 : interpolate(focusProgress.value, [0, 1], [1, 2])
|
|
38
|
-
}));
|
|
31
|
+
const borderColor = error ? colors.destructive : focused ? colors.primary : colors.border;
|
|
39
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(
|
|
40
|
-
|
|
33
|
+
EaseView,
|
|
41
34
|
{
|
|
42
35
|
style: [
|
|
43
36
|
styles.inputWrapper,
|
|
44
37
|
{ backgroundColor: isDisabled ? colors.surface : colors.background },
|
|
38
|
+
error && styles.inputWrapperError,
|
|
45
39
|
inputWrapperStyle
|
|
46
|
-
]
|
|
40
|
+
],
|
|
41
|
+
animate: { borderColor },
|
|
42
|
+
transition: COLOR_TRANSITION
|
|
47
43
|
},
|
|
48
|
-
/* @__PURE__ */ React.createElement(Animated.View, { style: [styles.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
|
|
49
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,
|
|
50
45
|
sheetMode ? /* @__PURE__ */ React.createElement(
|
|
51
46
|
BottomSheetTextInput,
|
|
@@ -121,16 +116,14 @@ var styles = StyleSheet.create({
|
|
|
121
116
|
inputWrapper: {
|
|
122
117
|
flexDirection: "row",
|
|
123
118
|
alignItems: "center",
|
|
124
|
-
// Border lives on borderOverlay (absolute) so its 1px→2px focus change
|
|
125
|
-
// never resizes this box. Wrapper itself carries no border.
|
|
126
119
|
borderRadius: 8,
|
|
120
|
+
borderWidth: 1,
|
|
127
121
|
paddingHorizontal: s(14),
|
|
128
122
|
paddingVertical: vs(11),
|
|
129
123
|
minHeight: 48
|
|
130
124
|
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
borderRadius: 8
|
|
125
|
+
inputWrapperError: {
|
|
126
|
+
borderWidth: 2
|
|
134
127
|
},
|
|
135
128
|
input: {
|
|
136
129
|
fontFamily: "Sohne-Regular",
|
package/dist/fonts.d.mts
ADDED
|
@@ -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.d.ts
ADDED
|
@@ -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;
|