radix-native-ui 0.1.1 → 0.1.2
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/dist/index.cjs +5 -3
- package/dist/index.d.cts +20 -16
- package/dist/index.d.mts +20 -16
- package/dist/index.mjs +5 -3
- package/package.json +15 -11
package/dist/index.cjs
CHANGED
|
@@ -3961,10 +3961,10 @@ AnimatedPressable.displayName = "AnimatedPressable";
|
|
|
3961
3961
|
//#endregion
|
|
3962
3962
|
//#region src/components/layout/Box.tsx
|
|
3963
3963
|
const areEqual$12 = (prevProps, nextProps) => {
|
|
3964
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.display === nextProps.display && prevProps.flexDirection === nextProps.flexDirection && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
|
|
3964
|
+
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.display === nextProps.display && prevProps.flexDirection === nextProps.flexDirection && prevProps.flex === nextProps.flex && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
|
|
3965
3965
|
return false;
|
|
3966
3966
|
};
|
|
3967
|
-
const Box = react.default.memo(react.default.forwardRef(({ asChild = false, children, style, backgroundColor, radius, display, flexDirection, justifyContent, alignItems, flexWrap, flexGrow, flexShrink, flexBasis, alignSelf, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, margin, marginTop, marginBottom, marginLeft, marginRight, marginHorizontal, marginVertical, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingHorizontal, paddingVertical, borderWidth, borderRadius: borderRadiusProp, borderColor, opacity, elevation, ...rest }, ref) => {
|
|
3967
|
+
const Box = react.default.memo(react.default.forwardRef(({ asChild = false, children, style, backgroundColor, radius, display, flexDirection, justifyContent, alignItems, flexWrap, flex, flexGrow, flexShrink, flexBasis, alignSelf, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, margin, marginTop, marginBottom, marginLeft, marginRight, marginHorizontal, marginVertical, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingHorizontal, paddingVertical, borderWidth, borderRadius: borderRadiusProp, borderColor, opacity, elevation, ...rest }, ref) => {
|
|
3968
3968
|
const theme = useTheme$1();
|
|
3969
3969
|
const colors = theme.colors.gray;
|
|
3970
3970
|
const radii = theme.radii;
|
|
@@ -3988,6 +3988,7 @@ const Box = react.default.memo(react.default.forwardRef(({ asChild = false, chil
|
|
|
3988
3988
|
justifyContent,
|
|
3989
3989
|
alignItems,
|
|
3990
3990
|
flexWrap,
|
|
3991
|
+
flex,
|
|
3991
3992
|
flexGrow,
|
|
3992
3993
|
flexShrink,
|
|
3993
3994
|
flexBasis,
|
|
@@ -4030,6 +4031,7 @@ const Box = react.default.memo(react.default.forwardRef(({ asChild = false, chil
|
|
|
4030
4031
|
justifyContent,
|
|
4031
4032
|
alignItems,
|
|
4032
4033
|
flexWrap,
|
|
4034
|
+
flex,
|
|
4033
4035
|
flexGrow,
|
|
4034
4036
|
flexShrink,
|
|
4035
4037
|
flexBasis,
|
|
@@ -11946,7 +11948,7 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
|
|
|
11946
11948
|
const backgroundColor = isDark ? grayAlpha["2"] : grayAlpha["1"];
|
|
11947
11949
|
const defaultKeyExtractor = (item, index) => {
|
|
11948
11950
|
if (keyExtractor) return keyExtractor(item, index);
|
|
11949
|
-
if ("id" in item) return String(item.id);
|
|
11951
|
+
if (item && typeof item === "object" && "id" in item) return String(item.id);
|
|
11950
11952
|
return String(index);
|
|
11951
11953
|
};
|
|
11952
11954
|
const renderListItem = (info) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactElement, ReactNode } from "react";
|
|
2
2
|
import * as react_native0 from "react-native";
|
|
3
|
-
import { AccessibilityRole, ActivityIndicator, ActivityIndicatorProps as ActivityIndicatorProps$1, DimensionValue, FlatList, FlatListProps as FlatListProps$1, GestureResponderEvent, Image, ImageProps as ImageProps$1, ImageStyle, KeyboardTypeOptions, PressableProps as PressableProps$1, ScrollView, ScrollViewProps as ScrollViewProps$1, StyleProp, Text as Text$1, TextInput, TextInputProps as TextInputProps$1, TextProps as TextProps$2, TextStyle,
|
|
3
|
+
import { AccessibilityRole, ActivityIndicator, ActivityIndicatorProps as ActivityIndicatorProps$1, Animated, DimensionValue, FlatList, FlatListProps as FlatListProps$1, GestureResponderEvent, Image, ImageProps as ImageProps$1, ImageStyle, KeyboardTypeOptions, PressableProps as PressableProps$1, ScrollView, ScrollViewProps as ScrollViewProps$1, StyleProp, Text as Text$1, TextInput, TextInputProps as TextInputProps$1, TextProps as TextProps$2, TextStyle, TouchableHighlightProps as TouchableHighlightProps$1, TouchableOpacityProps as TouchableOpacityProps$1, View, ViewProps as ViewProps$1, ViewStyle } from "react-native";
|
|
4
4
|
|
|
5
5
|
//#region src/components/primitives/View.d.ts
|
|
6
6
|
interface ViewProps extends ViewProps$1 {
|
|
@@ -27,15 +27,15 @@ interface PressableProps extends PressableProps$1 {
|
|
|
27
27
|
*/
|
|
28
28
|
enableHover?: boolean;
|
|
29
29
|
}
|
|
30
|
-
declare const RnPressable: React$1.NamedExoticComponent<PressableProps & React$1.RefAttributes<
|
|
30
|
+
declare const RnPressable: React$1.NamedExoticComponent<PressableProps & React$1.RefAttributes<react_native0.View>>;
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/components/primitives/TouchableOpacity.d.ts
|
|
33
33
|
interface TouchableOpacityProps extends TouchableOpacityProps$1 {}
|
|
34
|
-
declare const RnTouchableOpacity: React$1.NamedExoticComponent<TouchableOpacityProps & React$1.RefAttributes<
|
|
34
|
+
declare const RnTouchableOpacity: React$1.NamedExoticComponent<TouchableOpacityProps & React$1.RefAttributes<react_native0.View>>;
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/components/primitives/TouchableHighlight.d.ts
|
|
37
37
|
interface TouchableHighlightProps extends TouchableHighlightProps$1 {}
|
|
38
|
-
declare const RnTouchableHighlight: React$1.NamedExoticComponent<TouchableHighlightProps & React$1.RefAttributes<
|
|
38
|
+
declare const RnTouchableHighlight: React$1.NamedExoticComponent<TouchableHighlightProps & React$1.RefAttributes<react_native0.View>>;
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/components/primitives/Image.d.ts
|
|
41
41
|
interface ImageProps extends ImageProps$1 {
|
|
@@ -83,7 +83,7 @@ interface AnimatedPressableProps extends PressableProps {
|
|
|
83
83
|
*/
|
|
84
84
|
hapticFeedback?: boolean;
|
|
85
85
|
}
|
|
86
|
-
declare const AnimatedPressable: React$1.NamedExoticComponent<AnimatedPressableProps & React$1.RefAttributes<
|
|
86
|
+
declare const AnimatedPressable: React$1.NamedExoticComponent<AnimatedPressableProps & React$1.RefAttributes<react_native0.View | Animated.LegacyRef<react_native0.View>>>;
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/theme/types.d.ts
|
|
89
89
|
interface BaseColorScale {
|
|
@@ -1170,6 +1170,10 @@ interface BoxProps {
|
|
|
1170
1170
|
* Flex wrap
|
|
1171
1171
|
*/
|
|
1172
1172
|
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
1173
|
+
/**
|
|
1174
|
+
* Flex shorthand (maps to React Native's style `flex`)
|
|
1175
|
+
*/
|
|
1176
|
+
flex?: number;
|
|
1173
1177
|
/**
|
|
1174
1178
|
* Flex grow
|
|
1175
1179
|
*/
|
|
@@ -2255,7 +2259,7 @@ interface LinkProps {
|
|
|
2255
2259
|
accessibilityLabel?: string;
|
|
2256
2260
|
}
|
|
2257
2261
|
type StyleProp$4<T> = T | T[];
|
|
2258
|
-
declare const Link: React$1.ForwardRefExoticComponent<LinkProps & React$1.RefAttributes<
|
|
2262
|
+
declare const Link: React$1.ForwardRefExoticComponent<LinkProps & React$1.RefAttributes<react_native0.View>>;
|
|
2259
2263
|
//#endregion
|
|
2260
2264
|
//#region src/components/typography/Blockquote.d.ts
|
|
2261
2265
|
interface BlockquoteProps {
|
|
@@ -2453,7 +2457,7 @@ interface IconButtonProps {
|
|
|
2453
2457
|
*/
|
|
2454
2458
|
hapticFeedback?: boolean;
|
|
2455
2459
|
}
|
|
2456
|
-
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<
|
|
2460
|
+
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2457
2461
|
//#endregion
|
|
2458
2462
|
//#region src/components/forms/TextField.d.ts
|
|
2459
2463
|
interface TextFieldProps extends TextInputProps$1 {
|
|
@@ -2752,7 +2756,7 @@ interface CheckboxProps {
|
|
|
2752
2756
|
*/
|
|
2753
2757
|
hapticFeedback?: boolean;
|
|
2754
2758
|
}
|
|
2755
|
-
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<
|
|
2759
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2756
2760
|
//#endregion
|
|
2757
2761
|
//#region src/components/forms/CheckboxGroup.d.ts
|
|
2758
2762
|
interface CheckboxItem {
|
|
@@ -2922,7 +2926,7 @@ interface CheckboxCardsItemProps {
|
|
|
2922
2926
|
accessibilityHint?: string;
|
|
2923
2927
|
}
|
|
2924
2928
|
declare const CheckboxCardsRoot: React$1.ForwardRefExoticComponent<CheckboxCardsRootProps & React$1.RefAttributes<react_native0.View>>;
|
|
2925
|
-
declare const CheckboxCardsItem: React$1.ForwardRefExoticComponent<CheckboxCardsItemProps & React$1.RefAttributes<
|
|
2929
|
+
declare const CheckboxCardsItem: React$1.ForwardRefExoticComponent<CheckboxCardsItemProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2926
2930
|
interface CheckboxCardsCompoundComponent {
|
|
2927
2931
|
Root: typeof CheckboxCardsRoot;
|
|
2928
2932
|
Item: typeof CheckboxCardsItem;
|
|
@@ -2991,7 +2995,7 @@ interface RadioProps {
|
|
|
2991
2995
|
*/
|
|
2992
2996
|
hapticFeedback?: boolean;
|
|
2993
2997
|
}
|
|
2994
|
-
declare const Radio: React$1.ForwardRefExoticComponent<RadioProps & React$1.RefAttributes<
|
|
2998
|
+
declare const Radio: React$1.ForwardRefExoticComponent<RadioProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2995
2999
|
//#endregion
|
|
2996
3000
|
//#region src/components/forms/RadioGroup.d.ts
|
|
2997
3001
|
interface RadioGroupContextValue {
|
|
@@ -3069,10 +3073,10 @@ interface RadioGroupItemProps extends Omit<RadioProps, 'selected' | 'onSelect'>
|
|
|
3069
3073
|
*/
|
|
3070
3074
|
children?: ReactNode;
|
|
3071
3075
|
}
|
|
3072
|
-
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<
|
|
3076
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<View | react_native0.Animated.LegacyRef<View>>>;
|
|
3073
3077
|
declare const RadioGroup: {
|
|
3074
3078
|
Root: React$1.ForwardRefExoticComponent<RadioGroupRootProps & React$1.RefAttributes<View>>;
|
|
3075
|
-
Item: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<
|
|
3079
|
+
Item: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<View | react_native0.Animated.LegacyRef<View>>>;
|
|
3076
3080
|
};
|
|
3077
3081
|
//#endregion
|
|
3078
3082
|
//#region src/components/forms/RadioCards.d.ts
|
|
@@ -3181,7 +3185,7 @@ interface RadioCardsItemProps {
|
|
|
3181
3185
|
accessibilityHint?: string;
|
|
3182
3186
|
}
|
|
3183
3187
|
declare const RadioCardsRoot: React$1.ForwardRefExoticComponent<RadioCardsRootProps & React$1.RefAttributes<react_native0.View>>;
|
|
3184
|
-
declare const RadioCardsItem: React$1.ForwardRefExoticComponent<RadioCardsItemProps & React$1.RefAttributes<
|
|
3188
|
+
declare const RadioCardsItem: React$1.ForwardRefExoticComponent<RadioCardsItemProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
3185
3189
|
interface RadioCardsCompoundComponent {
|
|
3186
3190
|
Root: typeof RadioCardsRoot;
|
|
3187
3191
|
Item: typeof RadioCardsItem;
|
|
@@ -3251,7 +3255,7 @@ interface SwitchProps {
|
|
|
3251
3255
|
*/
|
|
3252
3256
|
hapticFeedback?: boolean;
|
|
3253
3257
|
}
|
|
3254
|
-
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<
|
|
3258
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<react_native0.View | Animated.LegacyRef<react_native0.View>>>;
|
|
3255
3259
|
//#endregion
|
|
3256
3260
|
//#region src/hooks/useAnchorPosition.d.ts
|
|
3257
3261
|
interface AnchorPosition {
|
|
@@ -5181,7 +5185,7 @@ interface FancyListProps<T = any> {
|
|
|
5181
5185
|
ListFooterComponent?: any;
|
|
5182
5186
|
}
|
|
5183
5187
|
declare const FancyList: {
|
|
5184
|
-
<T extends
|
|
5188
|
+
<T extends unknown>({
|
|
5185
5189
|
data,
|
|
5186
5190
|
renderItem,
|
|
5187
5191
|
keyExtractor,
|
|
@@ -5856,7 +5860,7 @@ interface AccordionTriggerProps {
|
|
|
5856
5860
|
*/
|
|
5857
5861
|
hapticFeedback?: boolean;
|
|
5858
5862
|
}
|
|
5859
|
-
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<
|
|
5863
|
+
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<react_native0.View | Animated.LegacyRef<react_native0.View>>>;
|
|
5860
5864
|
interface AccordionContentProps {
|
|
5861
5865
|
/**
|
|
5862
5866
|
* Content to show/hide
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactElement, ReactNode } from "react";
|
|
2
2
|
import * as react_native0 from "react-native";
|
|
3
|
-
import { AccessibilityRole, ActivityIndicator, ActivityIndicatorProps as ActivityIndicatorProps$1, DimensionValue, FlatList, FlatListProps as FlatListProps$1, GestureResponderEvent, Image, ImageProps as ImageProps$1, ImageStyle, KeyboardTypeOptions, PressableProps as PressableProps$1, ScrollView, ScrollViewProps as ScrollViewProps$1, StyleProp, Text as Text$1, TextInput, TextInputProps as TextInputProps$1, TextProps as TextProps$2, TextStyle,
|
|
3
|
+
import { AccessibilityRole, ActivityIndicator, ActivityIndicatorProps as ActivityIndicatorProps$1, Animated, DimensionValue, FlatList, FlatListProps as FlatListProps$1, GestureResponderEvent, Image, ImageProps as ImageProps$1, ImageStyle, KeyboardTypeOptions, PressableProps as PressableProps$1, ScrollView, ScrollViewProps as ScrollViewProps$1, StyleProp, Text as Text$1, TextInput, TextInputProps as TextInputProps$1, TextProps as TextProps$2, TextStyle, TouchableHighlightProps as TouchableHighlightProps$1, TouchableOpacityProps as TouchableOpacityProps$1, View, ViewProps as ViewProps$1, ViewStyle } from "react-native";
|
|
4
4
|
|
|
5
5
|
//#region src/components/primitives/View.d.ts
|
|
6
6
|
interface ViewProps extends ViewProps$1 {
|
|
@@ -27,15 +27,15 @@ interface PressableProps extends PressableProps$1 {
|
|
|
27
27
|
*/
|
|
28
28
|
enableHover?: boolean;
|
|
29
29
|
}
|
|
30
|
-
declare const RnPressable: React$1.NamedExoticComponent<PressableProps & React$1.RefAttributes<
|
|
30
|
+
declare const RnPressable: React$1.NamedExoticComponent<PressableProps & React$1.RefAttributes<react_native0.View>>;
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/components/primitives/TouchableOpacity.d.ts
|
|
33
33
|
interface TouchableOpacityProps extends TouchableOpacityProps$1 {}
|
|
34
|
-
declare const RnTouchableOpacity: React$1.NamedExoticComponent<TouchableOpacityProps & React$1.RefAttributes<
|
|
34
|
+
declare const RnTouchableOpacity: React$1.NamedExoticComponent<TouchableOpacityProps & React$1.RefAttributes<react_native0.View>>;
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/components/primitives/TouchableHighlight.d.ts
|
|
37
37
|
interface TouchableHighlightProps extends TouchableHighlightProps$1 {}
|
|
38
|
-
declare const RnTouchableHighlight: React$1.NamedExoticComponent<TouchableHighlightProps & React$1.RefAttributes<
|
|
38
|
+
declare const RnTouchableHighlight: React$1.NamedExoticComponent<TouchableHighlightProps & React$1.RefAttributes<react_native0.View>>;
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/components/primitives/Image.d.ts
|
|
41
41
|
interface ImageProps extends ImageProps$1 {
|
|
@@ -83,7 +83,7 @@ interface AnimatedPressableProps extends PressableProps {
|
|
|
83
83
|
*/
|
|
84
84
|
hapticFeedback?: boolean;
|
|
85
85
|
}
|
|
86
|
-
declare const AnimatedPressable: React$1.NamedExoticComponent<AnimatedPressableProps & React$1.RefAttributes<
|
|
86
|
+
declare const AnimatedPressable: React$1.NamedExoticComponent<AnimatedPressableProps & React$1.RefAttributes<react_native0.View | Animated.LegacyRef<react_native0.View>>>;
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/theme/types.d.ts
|
|
89
89
|
interface BaseColorScale {
|
|
@@ -1170,6 +1170,10 @@ interface BoxProps {
|
|
|
1170
1170
|
* Flex wrap
|
|
1171
1171
|
*/
|
|
1172
1172
|
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
1173
|
+
/**
|
|
1174
|
+
* Flex shorthand (maps to React Native's style `flex`)
|
|
1175
|
+
*/
|
|
1176
|
+
flex?: number;
|
|
1173
1177
|
/**
|
|
1174
1178
|
* Flex grow
|
|
1175
1179
|
*/
|
|
@@ -2255,7 +2259,7 @@ interface LinkProps {
|
|
|
2255
2259
|
accessibilityLabel?: string;
|
|
2256
2260
|
}
|
|
2257
2261
|
type StyleProp$4<T> = T | T[];
|
|
2258
|
-
declare const Link: React$1.ForwardRefExoticComponent<LinkProps & React$1.RefAttributes<
|
|
2262
|
+
declare const Link: React$1.ForwardRefExoticComponent<LinkProps & React$1.RefAttributes<react_native0.View>>;
|
|
2259
2263
|
//#endregion
|
|
2260
2264
|
//#region src/components/typography/Blockquote.d.ts
|
|
2261
2265
|
interface BlockquoteProps {
|
|
@@ -2453,7 +2457,7 @@ interface IconButtonProps {
|
|
|
2453
2457
|
*/
|
|
2454
2458
|
hapticFeedback?: boolean;
|
|
2455
2459
|
}
|
|
2456
|
-
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<
|
|
2460
|
+
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2457
2461
|
//#endregion
|
|
2458
2462
|
//#region src/components/forms/TextField.d.ts
|
|
2459
2463
|
interface TextFieldProps extends TextInputProps$1 {
|
|
@@ -2752,7 +2756,7 @@ interface CheckboxProps {
|
|
|
2752
2756
|
*/
|
|
2753
2757
|
hapticFeedback?: boolean;
|
|
2754
2758
|
}
|
|
2755
|
-
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<
|
|
2759
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2756
2760
|
//#endregion
|
|
2757
2761
|
//#region src/components/forms/CheckboxGroup.d.ts
|
|
2758
2762
|
interface CheckboxItem {
|
|
@@ -2922,7 +2926,7 @@ interface CheckboxCardsItemProps {
|
|
|
2922
2926
|
accessibilityHint?: string;
|
|
2923
2927
|
}
|
|
2924
2928
|
declare const CheckboxCardsRoot: React$1.ForwardRefExoticComponent<CheckboxCardsRootProps & React$1.RefAttributes<react_native0.View>>;
|
|
2925
|
-
declare const CheckboxCardsItem: React$1.ForwardRefExoticComponent<CheckboxCardsItemProps & React$1.RefAttributes<
|
|
2929
|
+
declare const CheckboxCardsItem: React$1.ForwardRefExoticComponent<CheckboxCardsItemProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2926
2930
|
interface CheckboxCardsCompoundComponent {
|
|
2927
2931
|
Root: typeof CheckboxCardsRoot;
|
|
2928
2932
|
Item: typeof CheckboxCardsItem;
|
|
@@ -2991,7 +2995,7 @@ interface RadioProps {
|
|
|
2991
2995
|
*/
|
|
2992
2996
|
hapticFeedback?: boolean;
|
|
2993
2997
|
}
|
|
2994
|
-
declare const Radio: React$1.ForwardRefExoticComponent<RadioProps & React$1.RefAttributes<
|
|
2998
|
+
declare const Radio: React$1.ForwardRefExoticComponent<RadioProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
2995
2999
|
//#endregion
|
|
2996
3000
|
//#region src/components/forms/RadioGroup.d.ts
|
|
2997
3001
|
interface RadioGroupContextValue {
|
|
@@ -3069,10 +3073,10 @@ interface RadioGroupItemProps extends Omit<RadioProps, 'selected' | 'onSelect'>
|
|
|
3069
3073
|
*/
|
|
3070
3074
|
children?: ReactNode;
|
|
3071
3075
|
}
|
|
3072
|
-
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<
|
|
3076
|
+
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<View | react_native0.Animated.LegacyRef<View>>>;
|
|
3073
3077
|
declare const RadioGroup: {
|
|
3074
3078
|
Root: React$1.ForwardRefExoticComponent<RadioGroupRootProps & React$1.RefAttributes<View>>;
|
|
3075
|
-
Item: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<
|
|
3079
|
+
Item: React$1.ForwardRefExoticComponent<RadioGroupItemProps & React$1.RefAttributes<View | react_native0.Animated.LegacyRef<View>>>;
|
|
3076
3080
|
};
|
|
3077
3081
|
//#endregion
|
|
3078
3082
|
//#region src/components/forms/RadioCards.d.ts
|
|
@@ -3181,7 +3185,7 @@ interface RadioCardsItemProps {
|
|
|
3181
3185
|
accessibilityHint?: string;
|
|
3182
3186
|
}
|
|
3183
3187
|
declare const RadioCardsRoot: React$1.ForwardRefExoticComponent<RadioCardsRootProps & React$1.RefAttributes<react_native0.View>>;
|
|
3184
|
-
declare const RadioCardsItem: React$1.ForwardRefExoticComponent<RadioCardsItemProps & React$1.RefAttributes<
|
|
3188
|
+
declare const RadioCardsItem: React$1.ForwardRefExoticComponent<RadioCardsItemProps & React$1.RefAttributes<react_native0.View | react_native0.Animated.LegacyRef<react_native0.View>>>;
|
|
3185
3189
|
interface RadioCardsCompoundComponent {
|
|
3186
3190
|
Root: typeof RadioCardsRoot;
|
|
3187
3191
|
Item: typeof RadioCardsItem;
|
|
@@ -3251,7 +3255,7 @@ interface SwitchProps {
|
|
|
3251
3255
|
*/
|
|
3252
3256
|
hapticFeedback?: boolean;
|
|
3253
3257
|
}
|
|
3254
|
-
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<
|
|
3258
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<react_native0.View | Animated.LegacyRef<react_native0.View>>>;
|
|
3255
3259
|
//#endregion
|
|
3256
3260
|
//#region src/hooks/useAnchorPosition.d.ts
|
|
3257
3261
|
interface AnchorPosition {
|
|
@@ -5181,7 +5185,7 @@ interface FancyListProps<T = any> {
|
|
|
5181
5185
|
ListFooterComponent?: any;
|
|
5182
5186
|
}
|
|
5183
5187
|
declare const FancyList: {
|
|
5184
|
-
<T extends
|
|
5188
|
+
<T extends unknown>({
|
|
5185
5189
|
data,
|
|
5186
5190
|
renderItem,
|
|
5187
5191
|
keyExtractor,
|
|
@@ -5856,7 +5860,7 @@ interface AccordionTriggerProps {
|
|
|
5856
5860
|
*/
|
|
5857
5861
|
hapticFeedback?: boolean;
|
|
5858
5862
|
}
|
|
5859
|
-
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<
|
|
5863
|
+
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<AccordionTriggerProps & React$1.RefAttributes<react_native0.View | Animated.LegacyRef<react_native0.View>>>;
|
|
5860
5864
|
interface AccordionContentProps {
|
|
5861
5865
|
/**
|
|
5862
5866
|
* Content to show/hide
|
package/dist/index.mjs
CHANGED
|
@@ -3932,10 +3932,10 @@ AnimatedPressable.displayName = "AnimatedPressable";
|
|
|
3932
3932
|
//#endregion
|
|
3933
3933
|
//#region src/components/layout/Box.tsx
|
|
3934
3934
|
const areEqual$12 = (prevProps, nextProps) => {
|
|
3935
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.display === nextProps.display && prevProps.flexDirection === nextProps.flexDirection && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
|
|
3935
|
+
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.display === nextProps.display && prevProps.flexDirection === nextProps.flexDirection && prevProps.flex === nextProps.flex && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
|
|
3936
3936
|
return false;
|
|
3937
3937
|
};
|
|
3938
|
-
const Box = React.memo(React.forwardRef(({ asChild = false, children, style, backgroundColor, radius, display, flexDirection, justifyContent, alignItems, flexWrap, flexGrow, flexShrink, flexBasis, alignSelf, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, margin, marginTop, marginBottom, marginLeft, marginRight, marginHorizontal, marginVertical, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingHorizontal, paddingVertical, borderWidth, borderRadius: borderRadiusProp, borderColor, opacity, elevation, ...rest }, ref) => {
|
|
3938
|
+
const Box = React.memo(React.forwardRef(({ asChild = false, children, style, backgroundColor, radius, display, flexDirection, justifyContent, alignItems, flexWrap, flex, flexGrow, flexShrink, flexBasis, alignSelf, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, margin, marginTop, marginBottom, marginLeft, marginRight, marginHorizontal, marginVertical, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingHorizontal, paddingVertical, borderWidth, borderRadius: borderRadiusProp, borderColor, opacity, elevation, ...rest }, ref) => {
|
|
3939
3939
|
const theme = useTheme$1();
|
|
3940
3940
|
const colors = theme.colors.gray;
|
|
3941
3941
|
const radii = theme.radii;
|
|
@@ -3959,6 +3959,7 @@ const Box = React.memo(React.forwardRef(({ asChild = false, children, style, bac
|
|
|
3959
3959
|
justifyContent,
|
|
3960
3960
|
alignItems,
|
|
3961
3961
|
flexWrap,
|
|
3962
|
+
flex,
|
|
3962
3963
|
flexGrow,
|
|
3963
3964
|
flexShrink,
|
|
3964
3965
|
flexBasis,
|
|
@@ -4001,6 +4002,7 @@ const Box = React.memo(React.forwardRef(({ asChild = false, children, style, bac
|
|
|
4001
4002
|
justifyContent,
|
|
4002
4003
|
alignItems,
|
|
4003
4004
|
flexWrap,
|
|
4005
|
+
flex,
|
|
4004
4006
|
flexGrow,
|
|
4005
4007
|
flexShrink,
|
|
4006
4008
|
flexBasis,
|
|
@@ -11917,7 +11919,7 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
|
|
|
11917
11919
|
const backgroundColor = isDark ? grayAlpha["2"] : grayAlpha["1"];
|
|
11918
11920
|
const defaultKeyExtractor = (item, index) => {
|
|
11919
11921
|
if (keyExtractor) return keyExtractor(item, index);
|
|
11920
|
-
if ("id" in item) return String(item.id);
|
|
11922
|
+
if (item && typeof item === "object" && "id" in item) return String(item.id);
|
|
11921
11923
|
return String(index);
|
|
11922
11924
|
};
|
|
11923
11925
|
const renderListItem = (info) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "radix-native-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A React Native component library inspired by the Radix Themes design system",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
21
|
"files": [
|
|
@@ -23,14 +28,13 @@
|
|
|
23
28
|
"react-native": ">=0.70"
|
|
24
29
|
},
|
|
25
30
|
"devDependencies": {
|
|
26
|
-
"@react-native/babel-preset": "^0.
|
|
27
|
-
"@testing-library/
|
|
28
|
-
"@
|
|
29
|
-
"@types/react": "^19.0.2",
|
|
31
|
+
"@react-native/babel-preset": "^0.81.5",
|
|
32
|
+
"@testing-library/react-native": "^13.3.3",
|
|
33
|
+
"@types/react": "^19.2.10",
|
|
30
34
|
"jest": "^29.6.0",
|
|
31
|
-
"react": "^
|
|
32
|
-
"react-native": "^0.
|
|
33
|
-
"react-test-renderer": "^
|
|
35
|
+
"react": "^19.1.0",
|
|
36
|
+
"react-native": "^0.81.5",
|
|
37
|
+
"react-test-renderer": "^19.1.0",
|
|
34
38
|
"tsdown": "^0.20.1",
|
|
35
39
|
"typescript": "^5.1.0"
|
|
36
40
|
},
|