radix-native-ui 0.1.3 → 0.1.4
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 +24 -70
- package/dist/index.d.cts +19 -1
- package/dist/index.d.mts +19 -1
- package/dist/index.mjs +24 -70
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -3960,10 +3960,6 @@ AnimatedPressable.displayName = "AnimatedPressable";
|
|
|
3960
3960
|
|
|
3961
3961
|
//#endregion
|
|
3962
3962
|
//#region src/components/layout/Box.tsx
|
|
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.flex === nextProps.flex && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
|
|
3965
|
-
return false;
|
|
3966
|
-
};
|
|
3967
3963
|
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
3964
|
const theme = useTheme$1();
|
|
3969
3965
|
const colors = theme.colors.gray;
|
|
@@ -4077,7 +4073,7 @@ const Box = react.default.memo(react.default.forwardRef(({ asChild = false, chil
|
|
|
4077
4073
|
...rest,
|
|
4078
4074
|
children
|
|
4079
4075
|
});
|
|
4080
|
-
})
|
|
4076
|
+
}));
|
|
4081
4077
|
Box.displayName = "Box";
|
|
4082
4078
|
|
|
4083
4079
|
//#endregion
|
|
@@ -4127,10 +4123,6 @@ Slot.displayName = "Slot";
|
|
|
4127
4123
|
|
|
4128
4124
|
//#endregion
|
|
4129
4125
|
//#region src/components/layout/Flex.tsx
|
|
4130
|
-
const areEqual$11 = (prevProps, nextProps) => {
|
|
4131
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.direction === nextProps.direction && prevProps.align === nextProps.align && prevProps.justify === nextProps.justify && prevProps.wrap === nextProps.wrap && prevProps.gap === nextProps.gap && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.opacity === nextProps.opacity) return true;
|
|
4132
|
-
return false;
|
|
4133
|
-
};
|
|
4134
4126
|
const Flex = react.default.memo(react.default.forwardRef(({ asChild = false, children, style, direction = "row", align = "stretch", alignContent, justify = "flex-start", wrap = "nowrap", gap, flexGrow, flexShrink, flexBasis, flex, 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, columnGap, rowGap, backgroundColor, borderRadius, opacity, ...rest }, ref) => {
|
|
4135
4127
|
const theme = useTheme$1();
|
|
4136
4128
|
const flexStyle = (0, react.useMemo)(() => ({
|
|
@@ -4228,15 +4220,11 @@ const Flex = react.default.memo(react.default.forwardRef(({ asChild = false, chi
|
|
|
4228
4220
|
...rest,
|
|
4229
4221
|
children
|
|
4230
4222
|
});
|
|
4231
|
-
})
|
|
4223
|
+
}));
|
|
4232
4224
|
Flex.displayName = "Flex";
|
|
4233
4225
|
|
|
4234
4226
|
//#endregion
|
|
4235
4227
|
//#region src/components/layout/Grid.tsx
|
|
4236
|
-
const areEqual$10 = (prevProps, nextProps) => {
|
|
4237
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.columns === nextProps.columns && prevProps.gap === nextProps.gap && prevProps.rowGap === nextProps.rowGap && prevProps.columnGap === nextProps.columnGap && prevProps.align === nextProps.align && prevProps.justify === nextProps.justify && prevProps.columnWidth === nextProps.columnWidth) return true;
|
|
4238
|
-
return false;
|
|
4239
|
-
};
|
|
4240
4228
|
const Grid = react.default.memo(react.default.forwardRef(({ children, style = {}, columns = 1, gap, rowGap, columnGap, align = "stretch", justify = "flex-start", columnWidth, ...rest }, ref) => {
|
|
4241
4229
|
const theme = useTheme$1();
|
|
4242
4230
|
useThemeMode();
|
|
@@ -4272,7 +4260,7 @@ const Grid = react.default.memo(react.default.forwardRef(({ children, style = {}
|
|
|
4272
4260
|
...rest,
|
|
4273
4261
|
children: childrenWithWidth
|
|
4274
4262
|
});
|
|
4275
|
-
})
|
|
4263
|
+
}));
|
|
4276
4264
|
Grid.displayName = "Grid";
|
|
4277
4265
|
|
|
4278
4266
|
//#endregion
|
|
@@ -4283,10 +4271,6 @@ const containerMaxWidths = {
|
|
|
4283
4271
|
3: 640,
|
|
4284
4272
|
4: 896
|
|
4285
4273
|
};
|
|
4286
|
-
const areEqual$9 = (prevProps, nextProps) => {
|
|
4287
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.responsive === nextProps.responsive) return true;
|
|
4288
|
-
return false;
|
|
4289
|
-
};
|
|
4290
4274
|
const Container = react.default.memo(react.default.forwardRef(({ children, style, size = 2, responsive = true, ...rest }, ref) => {
|
|
4291
4275
|
const theme = useTheme$1();
|
|
4292
4276
|
const maxWidth = containerMaxWidths[size];
|
|
@@ -4305,7 +4289,7 @@ const Container = react.default.memo(react.default.forwardRef(({ children, style
|
|
|
4305
4289
|
...rest,
|
|
4306
4290
|
children
|
|
4307
4291
|
});
|
|
4308
|
-
})
|
|
4292
|
+
}));
|
|
4309
4293
|
Container.displayName = "Container";
|
|
4310
4294
|
|
|
4311
4295
|
//#endregion
|
|
@@ -4322,9 +4306,6 @@ const getPaddingStyles = (side, spacing) => {
|
|
|
4322
4306
|
};
|
|
4323
4307
|
return paddingMap[side] ?? paddingMap.all;
|
|
4324
4308
|
};
|
|
4325
|
-
const areEqual$8 = (prevProps, nextProps) => {
|
|
4326
|
-
return prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.side === nextProps.side && prevProps.p === nextProps.p && prevProps.clip === nextProps.clip && prevProps.asChild === nextProps.asChild;
|
|
4327
|
-
};
|
|
4328
4309
|
const Inset = react.default.memo(react.default.forwardRef(({ asChild = false, children, style, side = "all", p: pProp, trim, clip, ...rest }, ref) => {
|
|
4329
4310
|
const theme = useTheme$1();
|
|
4330
4311
|
const paddingSize = pProp ?? trim ?? 4;
|
|
@@ -4344,7 +4325,7 @@ const Inset = react.default.memo(react.default.forwardRef(({ asChild = false, ch
|
|
|
4344
4325
|
...rest,
|
|
4345
4326
|
children
|
|
4346
4327
|
});
|
|
4347
|
-
})
|
|
4328
|
+
}));
|
|
4348
4329
|
Inset.displayName = "Inset";
|
|
4349
4330
|
|
|
4350
4331
|
//#endregion
|
|
@@ -4723,10 +4704,6 @@ AbsoluteCenter.displayName = "AbsoluteCenter";
|
|
|
4723
4704
|
|
|
4724
4705
|
//#endregion
|
|
4725
4706
|
//#region src/components/typography/Text.tsx
|
|
4726
|
-
const areEqual$7 = (prevProps, nextProps) => {
|
|
4727
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.weight === nextProps.weight && prevProps.align === nextProps.align && prevProps.color === nextProps.color && prevProps.truncate === nextProps.truncate && prevProps.numberOfLines === nextProps.numberOfLines && prevProps.fontFamily === nextProps.fontFamily && prevProps.fontStyle === nextProps.fontStyle && prevProps.lineHeight === nextProps.lineHeight && prevProps.letterSpacing === nextProps.letterSpacing && prevProps.textDecorationLine === nextProps.textDecorationLine && prevProps.opacity === nextProps.opacity) return true;
|
|
4728
|
-
return false;
|
|
4729
|
-
};
|
|
4730
4707
|
const TextComponent = react.default.memo(react.default.forwardRef(({ asChild = false, children, style, size = 3, weight, align, color, truncate, numberOfLines, fontFamily, fontStyle, lineHeight, letterSpacing, textDecorationLine, opacity, ...rest }, ref) => {
|
|
4731
4708
|
const theme = useTheme$1();
|
|
4732
4709
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4763,15 +4740,11 @@ const TextComponent = react.default.memo(react.default.forwardRef(({ asChild = f
|
|
|
4763
4740
|
...rest,
|
|
4764
4741
|
children
|
|
4765
4742
|
});
|
|
4766
|
-
})
|
|
4743
|
+
}));
|
|
4767
4744
|
TextComponent.displayName = "Text";
|
|
4768
4745
|
|
|
4769
4746
|
//#endregion
|
|
4770
4747
|
//#region src/components/typography/Heading.tsx
|
|
4771
|
-
const areEqual$6 = (prevProps, nextProps) => {
|
|
4772
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.weight === nextProps.weight && prevProps.align === nextProps.align && prevProps.color === nextProps.color && prevProps.truncate === nextProps.truncate && prevProps.numberOfLines === nextProps.numberOfLines && prevProps.fontFamily === nextProps.fontFamily && prevProps.opacity === nextProps.opacity) return true;
|
|
4773
|
-
return false;
|
|
4774
|
-
};
|
|
4775
4748
|
const Heading = react.default.memo(react.default.forwardRef(({ asChild = false, children, style = {}, size = 4, weight = "bold", align, color, truncate, numberOfLines, fontFamily, opacity, ...rest }, ref) => {
|
|
4776
4749
|
const theme = useTheme$1();
|
|
4777
4750
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4814,15 +4787,11 @@ const Heading = react.default.memo(react.default.forwardRef(({ asChild = false,
|
|
|
4814
4787
|
...rest,
|
|
4815
4788
|
children
|
|
4816
4789
|
});
|
|
4817
|
-
})
|
|
4790
|
+
}));
|
|
4818
4791
|
Heading.displayName = "Heading";
|
|
4819
4792
|
|
|
4820
4793
|
//#endregion
|
|
4821
4794
|
//#region src/components/typography/Strong.tsx
|
|
4822
|
-
const areEqual$5 = (prevProps, nextProps) => {
|
|
4823
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.color === nextProps.color) return true;
|
|
4824
|
-
return false;
|
|
4825
|
-
};
|
|
4826
4795
|
const Strong = react.default.memo(react.default.forwardRef(({ children, style = {}, color, ...rest }, ref) => {
|
|
4827
4796
|
const theme = useTheme$1();
|
|
4828
4797
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4842,15 +4811,11 @@ const Strong = react.default.memo(react.default.forwardRef(({ children, style =
|
|
|
4842
4811
|
...rest,
|
|
4843
4812
|
children
|
|
4844
4813
|
});
|
|
4845
|
-
})
|
|
4814
|
+
}));
|
|
4846
4815
|
Strong.displayName = "Strong";
|
|
4847
4816
|
|
|
4848
4817
|
//#endregion
|
|
4849
4818
|
//#region src/components/typography/Em.tsx
|
|
4850
|
-
const areEqual$4 = (prevProps, nextProps) => {
|
|
4851
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.color === nextProps.color) return true;
|
|
4852
|
-
return false;
|
|
4853
|
-
};
|
|
4854
4819
|
const Em = react.default.memo(react.default.forwardRef(({ children, style = {}, color, ...rest }, ref) => {
|
|
4855
4820
|
const theme = useTheme$1();
|
|
4856
4821
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4870,15 +4835,11 @@ const Em = react.default.memo(react.default.forwardRef(({ children, style = {},
|
|
|
4870
4835
|
...rest,
|
|
4871
4836
|
children
|
|
4872
4837
|
});
|
|
4873
|
-
})
|
|
4838
|
+
}));
|
|
4874
4839
|
Em.displayName = "Em";
|
|
4875
4840
|
|
|
4876
4841
|
//#endregion
|
|
4877
4842
|
//#region src/components/typography/Code.tsx
|
|
4878
|
-
const areEqual$3 = (prevProps, nextProps) => {
|
|
4879
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.color === nextProps.color && prevProps.backgroundColor === nextProps.backgroundColor) return true;
|
|
4880
|
-
return false;
|
|
4881
|
-
};
|
|
4882
4843
|
const Code = react.default.memo(react.default.forwardRef(({ children, style = {}, size = 2, color, backgroundColor, ...rest }, ref) => {
|
|
4883
4844
|
const theme = useTheme$1();
|
|
4884
4845
|
const isDark = useThemeMode$1() === "dark";
|
|
@@ -4907,15 +4868,11 @@ const Code = react.default.memo(react.default.forwardRef(({ children, style = {}
|
|
|
4907
4868
|
...rest,
|
|
4908
4869
|
children
|
|
4909
4870
|
});
|
|
4910
|
-
})
|
|
4871
|
+
}));
|
|
4911
4872
|
Code.displayName = "Code";
|
|
4912
4873
|
|
|
4913
4874
|
//#endregion
|
|
4914
4875
|
//#region src/components/typography/Kbd.tsx
|
|
4915
|
-
const areEqual$2 = (prevProps, nextProps) => {
|
|
4916
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.color === nextProps.color && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.size === nextProps.size) return true;
|
|
4917
|
-
return false;
|
|
4918
|
-
};
|
|
4919
4876
|
const Kbd = react.default.memo(react.default.forwardRef(({ children, style = {}, color, backgroundColor, size = 1, ...rest }, ref) => {
|
|
4920
4877
|
const theme = useTheme$1();
|
|
4921
4878
|
const isDark = useThemeMode$1() === "dark";
|
|
@@ -4961,7 +4918,7 @@ const Kbd = react.default.memo(react.default.forwardRef(({ children, style = {},
|
|
|
4961
4918
|
children
|
|
4962
4919
|
})
|
|
4963
4920
|
});
|
|
4964
|
-
})
|
|
4921
|
+
}));
|
|
4965
4922
|
Kbd.displayName = "Kbd";
|
|
4966
4923
|
|
|
4967
4924
|
//#endregion
|
|
@@ -4999,10 +4956,6 @@ Link.displayName = "Link";
|
|
|
4999
4956
|
|
|
5000
4957
|
//#endregion
|
|
5001
4958
|
//#region src/components/typography/Blockquote.tsx
|
|
5002
|
-
const areEqual$1 = (prevProps, nextProps) => {
|
|
5003
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.textStyle === nextProps.textStyle && prevProps.color === nextProps.color && prevProps.borderColor === nextProps.borderColor && prevProps.quoteColor === nextProps.quoteColor) return true;
|
|
5004
|
-
return false;
|
|
5005
|
-
};
|
|
5006
4959
|
const Blockquote = react.default.memo(react.default.forwardRef(({ children, style, textStyle = {}, color, borderColor, quoteColor, ...rest }, ref) => {
|
|
5007
4960
|
const theme = useTheme$1();
|
|
5008
4961
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -5056,7 +5009,7 @@ const Blockquote = react.default.memo(react.default.forwardRef(({ children, styl
|
|
|
5056
5009
|
]
|
|
5057
5010
|
})
|
|
5058
5011
|
});
|
|
5059
|
-
})
|
|
5012
|
+
}));
|
|
5060
5013
|
Blockquote.displayName = "Blockquote";
|
|
5061
5014
|
|
|
5062
5015
|
//#endregion
|
|
@@ -5090,10 +5043,6 @@ const getIconSize = (size) => {
|
|
|
5090
5043
|
default: return 20;
|
|
5091
5044
|
}
|
|
5092
5045
|
};
|
|
5093
|
-
const areEqual = (prevProps, nextProps) => {
|
|
5094
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.variant === nextProps.variant && prevProps.color === nextProps.color && prevProps.radius === nextProps.radius && prevProps.size === nextProps.size && prevProps.disabled === nextProps.disabled && prevProps.loading === nextProps.loading && prevProps.onPress === nextProps.onPress && prevProps.onLongPress === nextProps.onLongPress && prevProps.delayLongPress === nextProps.delayLongPress && prevProps.width === nextProps.width && prevProps.highContrast === nextProps.highContrast) return true;
|
|
5095
|
-
return false;
|
|
5096
|
-
};
|
|
5097
5046
|
const Button = react.default.memo(react.default.forwardRef(({ children, style, variant = "solid", color, radius, size = 2, disabled, loading, onPress, accessibilityLabel, width, highContrast, hapticFeedback, ...rest }, ref) => {
|
|
5098
5047
|
const theme = useTheme$1();
|
|
5099
5048
|
const mode = useThemeMode$1();
|
|
@@ -5274,7 +5223,7 @@ const Button = react.default.memo(react.default.forwardRef(({ children, style, v
|
|
|
5274
5223
|
rightIcons.map((icon, index) => renderIcon(icon, index))
|
|
5275
5224
|
] })
|
|
5276
5225
|
});
|
|
5277
|
-
})
|
|
5226
|
+
}));
|
|
5278
5227
|
Button.displayName = "Button";
|
|
5279
5228
|
Button.Icon = ButtonIcon;
|
|
5280
5229
|
Button.Label = ButtonLabel;
|
|
@@ -11937,7 +11886,7 @@ const DataList = {
|
|
|
11937
11886
|
|
|
11938
11887
|
//#endregion
|
|
11939
11888
|
//#region src/components/data-display/FancyList.tsx
|
|
11940
|
-
const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true, scrollable = true, itemPadding, ListEmptyComponent, ListHeaderComponent, ListFooterComponent }) => {
|
|
11889
|
+
const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true, scrollable = true, itemPadding, ListEmptyComponent, ListHeaderComponent, ListFooterComponent, ListBackend: Backend = RnFlatList, backendProps }) => {
|
|
11941
11890
|
const theme = useTheme$1();
|
|
11942
11891
|
const isDark = useThemeMode$1() === "dark";
|
|
11943
11892
|
isDark ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -11990,7 +11939,8 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
|
|
|
11990
11939
|
});
|
|
11991
11940
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RnView, {
|
|
11992
11941
|
style: [styles$9.container, style],
|
|
11993
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
11942
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Backend, {
|
|
11943
|
+
...backendProps,
|
|
11994
11944
|
data,
|
|
11995
11945
|
renderItem: renderListItem,
|
|
11996
11946
|
keyExtractor: defaultKeyExtractor,
|
|
@@ -12219,18 +12169,21 @@ const Skeleton = react.default.forwardRef(({ children, loading = true, style, te
|
|
|
12219
12169
|
animation.stop();
|
|
12220
12170
|
};
|
|
12221
12171
|
}, [pulseAnim]);
|
|
12222
|
-
const pulseStyle = {
|
|
12172
|
+
const pulseStyle = { opacity: pulseAnim.interpolate({
|
|
12223
12173
|
inputRange: [0, 1],
|
|
12224
|
-
outputRange: [
|
|
12174
|
+
outputRange: [.55, 1]
|
|
12225
12175
|
}) };
|
|
12176
|
+
const skeletonBackground = { backgroundColor: grayScale[3] };
|
|
12226
12177
|
if (!loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
12227
12178
|
if (!react.default.isValidElement(children) && typeof children === "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Animated.Text, {
|
|
12228
12179
|
ref,
|
|
12229
12180
|
style: [
|
|
12230
|
-
|
|
12181
|
+
styles$6.inlineText,
|
|
12182
|
+
skeletonBackground,
|
|
12231
12183
|
pulseStyle,
|
|
12232
12184
|
width !== void 0 ? { width } : void 0,
|
|
12233
|
-
height !== void 0 ? { height } : void 0
|
|
12185
|
+
height !== void 0 ? { height } : void 0,
|
|
12186
|
+
textStyle
|
|
12234
12187
|
],
|
|
12235
12188
|
accessibilityLabel,
|
|
12236
12189
|
accessibilityRole: "progressbar",
|
|
@@ -12241,6 +12194,7 @@ const Skeleton = react.default.forwardRef(({ children, loading = true, style, te
|
|
|
12241
12194
|
ref,
|
|
12242
12195
|
style: [
|
|
12243
12196
|
styles$6.blockContainer,
|
|
12197
|
+
skeletonBackground,
|
|
12244
12198
|
pulseStyle,
|
|
12245
12199
|
width !== void 0 ? { width } : void 0,
|
|
12246
12200
|
height !== void 0 ? { height } : void 0,
|
package/dist/index.d.cts
CHANGED
|
@@ -5210,6 +5210,22 @@ interface FancyListProps<T = any> {
|
|
|
5210
5210
|
* Footer component
|
|
5211
5211
|
*/
|
|
5212
5212
|
ListFooterComponent?: any;
|
|
5213
|
+
/**
|
|
5214
|
+
* Virtualized list implementation used as the backend.
|
|
5215
|
+
* Defaults to React Native's FlatList. Any FlatList-compatible
|
|
5216
|
+
* component (e.g. LegendList, FlashList v2) can be supplied to
|
|
5217
|
+
* gain true cell recycling at scale — the styling, dividers, and
|
|
5218
|
+
* renderItem contract stay identical. Ignored when `scrollable`
|
|
5219
|
+
* is false (that branch renders no virtualization layer).
|
|
5220
|
+
*/
|
|
5221
|
+
ListBackend?: React$1.ComponentType<any>;
|
|
5222
|
+
/**
|
|
5223
|
+
* Extra props forwarded to the list backend (e.g. `estimatedItemSize`
|
|
5224
|
+
* for LegendList/FlashList). Applied before FancyList's own wiring,
|
|
5225
|
+
* so `data`, `renderItem`, `keyExtractor`, and separators cannot be
|
|
5226
|
+
* clobbered by mistake.
|
|
5227
|
+
*/
|
|
5228
|
+
backendProps?: Record<string, unknown>;
|
|
5213
5229
|
}
|
|
5214
5230
|
declare const FancyList: {
|
|
5215
5231
|
<T extends unknown>({
|
|
@@ -5222,7 +5238,9 @@ declare const FancyList: {
|
|
|
5222
5238
|
itemPadding,
|
|
5223
5239
|
ListEmptyComponent,
|
|
5224
5240
|
ListHeaderComponent,
|
|
5225
|
-
ListFooterComponent
|
|
5241
|
+
ListFooterComponent,
|
|
5242
|
+
ListBackend: Backend,
|
|
5243
|
+
backendProps
|
|
5226
5244
|
}: FancyListProps<T>): React$1.JSX.Element;
|
|
5227
5245
|
displayName: string;
|
|
5228
5246
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -5210,6 +5210,22 @@ interface FancyListProps<T = any> {
|
|
|
5210
5210
|
* Footer component
|
|
5211
5211
|
*/
|
|
5212
5212
|
ListFooterComponent?: any;
|
|
5213
|
+
/**
|
|
5214
|
+
* Virtualized list implementation used as the backend.
|
|
5215
|
+
* Defaults to React Native's FlatList. Any FlatList-compatible
|
|
5216
|
+
* component (e.g. LegendList, FlashList v2) can be supplied to
|
|
5217
|
+
* gain true cell recycling at scale — the styling, dividers, and
|
|
5218
|
+
* renderItem contract stay identical. Ignored when `scrollable`
|
|
5219
|
+
* is false (that branch renders no virtualization layer).
|
|
5220
|
+
*/
|
|
5221
|
+
ListBackend?: React$1.ComponentType<any>;
|
|
5222
|
+
/**
|
|
5223
|
+
* Extra props forwarded to the list backend (e.g. `estimatedItemSize`
|
|
5224
|
+
* for LegendList/FlashList). Applied before FancyList's own wiring,
|
|
5225
|
+
* so `data`, `renderItem`, `keyExtractor`, and separators cannot be
|
|
5226
|
+
* clobbered by mistake.
|
|
5227
|
+
*/
|
|
5228
|
+
backendProps?: Record<string, unknown>;
|
|
5213
5229
|
}
|
|
5214
5230
|
declare const FancyList: {
|
|
5215
5231
|
<T extends unknown>({
|
|
@@ -5222,7 +5238,9 @@ declare const FancyList: {
|
|
|
5222
5238
|
itemPadding,
|
|
5223
5239
|
ListEmptyComponent,
|
|
5224
5240
|
ListHeaderComponent,
|
|
5225
|
-
ListFooterComponent
|
|
5241
|
+
ListFooterComponent,
|
|
5242
|
+
ListBackend: Backend,
|
|
5243
|
+
backendProps
|
|
5226
5244
|
}: FancyListProps<T>): React$1.JSX.Element;
|
|
5227
5245
|
displayName: string;
|
|
5228
5246
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -3931,10 +3931,6 @@ AnimatedPressable.displayName = "AnimatedPressable";
|
|
|
3931
3931
|
|
|
3932
3932
|
//#endregion
|
|
3933
3933
|
//#region src/components/layout/Box.tsx
|
|
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.flex === nextProps.flex && prevProps.opacity === nextProps.opacity && prevProps.radius === nextProps.radius) return true;
|
|
3936
|
-
return false;
|
|
3937
|
-
};
|
|
3938
3934
|
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
3935
|
const theme = useTheme$1();
|
|
3940
3936
|
const colors = theme.colors.gray;
|
|
@@ -4048,7 +4044,7 @@ const Box = React.memo(React.forwardRef(({ asChild = false, children, style, bac
|
|
|
4048
4044
|
...rest,
|
|
4049
4045
|
children
|
|
4050
4046
|
});
|
|
4051
|
-
})
|
|
4047
|
+
}));
|
|
4052
4048
|
Box.displayName = "Box";
|
|
4053
4049
|
|
|
4054
4050
|
//#endregion
|
|
@@ -4098,10 +4094,6 @@ Slot.displayName = "Slot";
|
|
|
4098
4094
|
|
|
4099
4095
|
//#endregion
|
|
4100
4096
|
//#region src/components/layout/Flex.tsx
|
|
4101
|
-
const areEqual$11 = (prevProps, nextProps) => {
|
|
4102
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.direction === nextProps.direction && prevProps.align === nextProps.align && prevProps.justify === nextProps.justify && prevProps.wrap === nextProps.wrap && prevProps.gap === nextProps.gap && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.opacity === nextProps.opacity) return true;
|
|
4103
|
-
return false;
|
|
4104
|
-
};
|
|
4105
4097
|
const Flex = React.memo(React.forwardRef(({ asChild = false, children, style, direction = "row", align = "stretch", alignContent, justify = "flex-start", wrap = "nowrap", gap, flexGrow, flexShrink, flexBasis, flex, 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, columnGap, rowGap, backgroundColor, borderRadius, opacity, ...rest }, ref) => {
|
|
4106
4098
|
const theme = useTheme$1();
|
|
4107
4099
|
const flexStyle = useMemo(() => ({
|
|
@@ -4199,15 +4191,11 @@ const Flex = React.memo(React.forwardRef(({ asChild = false, children, style, di
|
|
|
4199
4191
|
...rest,
|
|
4200
4192
|
children
|
|
4201
4193
|
});
|
|
4202
|
-
})
|
|
4194
|
+
}));
|
|
4203
4195
|
Flex.displayName = "Flex";
|
|
4204
4196
|
|
|
4205
4197
|
//#endregion
|
|
4206
4198
|
//#region src/components/layout/Grid.tsx
|
|
4207
|
-
const areEqual$10 = (prevProps, nextProps) => {
|
|
4208
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.columns === nextProps.columns && prevProps.gap === nextProps.gap && prevProps.rowGap === nextProps.rowGap && prevProps.columnGap === nextProps.columnGap && prevProps.align === nextProps.align && prevProps.justify === nextProps.justify && prevProps.columnWidth === nextProps.columnWidth) return true;
|
|
4209
|
-
return false;
|
|
4210
|
-
};
|
|
4211
4199
|
const Grid = React.memo(React.forwardRef(({ children, style = {}, columns = 1, gap, rowGap, columnGap, align = "stretch", justify = "flex-start", columnWidth, ...rest }, ref) => {
|
|
4212
4200
|
const theme = useTheme$1();
|
|
4213
4201
|
useThemeMode();
|
|
@@ -4243,7 +4231,7 @@ const Grid = React.memo(React.forwardRef(({ children, style = {}, columns = 1, g
|
|
|
4243
4231
|
...rest,
|
|
4244
4232
|
children: childrenWithWidth
|
|
4245
4233
|
});
|
|
4246
|
-
})
|
|
4234
|
+
}));
|
|
4247
4235
|
Grid.displayName = "Grid";
|
|
4248
4236
|
|
|
4249
4237
|
//#endregion
|
|
@@ -4254,10 +4242,6 @@ const containerMaxWidths = {
|
|
|
4254
4242
|
3: 640,
|
|
4255
4243
|
4: 896
|
|
4256
4244
|
};
|
|
4257
|
-
const areEqual$9 = (prevProps, nextProps) => {
|
|
4258
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.responsive === nextProps.responsive) return true;
|
|
4259
|
-
return false;
|
|
4260
|
-
};
|
|
4261
4245
|
const Container = React.memo(React.forwardRef(({ children, style, size = 2, responsive = true, ...rest }, ref) => {
|
|
4262
4246
|
const theme = useTheme$1();
|
|
4263
4247
|
const maxWidth = containerMaxWidths[size];
|
|
@@ -4276,7 +4260,7 @@ const Container = React.memo(React.forwardRef(({ children, style, size = 2, resp
|
|
|
4276
4260
|
...rest,
|
|
4277
4261
|
children
|
|
4278
4262
|
});
|
|
4279
|
-
})
|
|
4263
|
+
}));
|
|
4280
4264
|
Container.displayName = "Container";
|
|
4281
4265
|
|
|
4282
4266
|
//#endregion
|
|
@@ -4293,9 +4277,6 @@ const getPaddingStyles = (side, spacing) => {
|
|
|
4293
4277
|
};
|
|
4294
4278
|
return paddingMap[side] ?? paddingMap.all;
|
|
4295
4279
|
};
|
|
4296
|
-
const areEqual$8 = (prevProps, nextProps) => {
|
|
4297
|
-
return prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.side === nextProps.side && prevProps.p === nextProps.p && prevProps.clip === nextProps.clip && prevProps.asChild === nextProps.asChild;
|
|
4298
|
-
};
|
|
4299
4280
|
const Inset = React.memo(React.forwardRef(({ asChild = false, children, style, side = "all", p: pProp, trim, clip, ...rest }, ref) => {
|
|
4300
4281
|
const theme = useTheme$1();
|
|
4301
4282
|
const paddingSize = pProp ?? trim ?? 4;
|
|
@@ -4315,7 +4296,7 @@ const Inset = React.memo(React.forwardRef(({ asChild = false, children, style, s
|
|
|
4315
4296
|
...rest,
|
|
4316
4297
|
children
|
|
4317
4298
|
});
|
|
4318
|
-
})
|
|
4299
|
+
}));
|
|
4319
4300
|
Inset.displayName = "Inset";
|
|
4320
4301
|
|
|
4321
4302
|
//#endregion
|
|
@@ -4694,10 +4675,6 @@ AbsoluteCenter.displayName = "AbsoluteCenter";
|
|
|
4694
4675
|
|
|
4695
4676
|
//#endregion
|
|
4696
4677
|
//#region src/components/typography/Text.tsx
|
|
4697
|
-
const areEqual$7 = (prevProps, nextProps) => {
|
|
4698
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.weight === nextProps.weight && prevProps.align === nextProps.align && prevProps.color === nextProps.color && prevProps.truncate === nextProps.truncate && prevProps.numberOfLines === nextProps.numberOfLines && prevProps.fontFamily === nextProps.fontFamily && prevProps.fontStyle === nextProps.fontStyle && prevProps.lineHeight === nextProps.lineHeight && prevProps.letterSpacing === nextProps.letterSpacing && prevProps.textDecorationLine === nextProps.textDecorationLine && prevProps.opacity === nextProps.opacity) return true;
|
|
4699
|
-
return false;
|
|
4700
|
-
};
|
|
4701
4678
|
const TextComponent = React.memo(React.forwardRef(({ asChild = false, children, style, size = 3, weight, align, color, truncate, numberOfLines, fontFamily, fontStyle, lineHeight, letterSpacing, textDecorationLine, opacity, ...rest }, ref) => {
|
|
4702
4679
|
const theme = useTheme$1();
|
|
4703
4680
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4734,15 +4711,11 @@ const TextComponent = React.memo(React.forwardRef(({ asChild = false, children,
|
|
|
4734
4711
|
...rest,
|
|
4735
4712
|
children
|
|
4736
4713
|
});
|
|
4737
|
-
})
|
|
4714
|
+
}));
|
|
4738
4715
|
TextComponent.displayName = "Text";
|
|
4739
4716
|
|
|
4740
4717
|
//#endregion
|
|
4741
4718
|
//#region src/components/typography/Heading.tsx
|
|
4742
|
-
const areEqual$6 = (prevProps, nextProps) => {
|
|
4743
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.weight === nextProps.weight && prevProps.align === nextProps.align && prevProps.color === nextProps.color && prevProps.truncate === nextProps.truncate && prevProps.numberOfLines === nextProps.numberOfLines && prevProps.fontFamily === nextProps.fontFamily && prevProps.opacity === nextProps.opacity) return true;
|
|
4744
|
-
return false;
|
|
4745
|
-
};
|
|
4746
4719
|
const Heading = React.memo(React.forwardRef(({ asChild = false, children, style = {}, size = 4, weight = "bold", align, color, truncate, numberOfLines, fontFamily, opacity, ...rest }, ref) => {
|
|
4747
4720
|
const theme = useTheme$1();
|
|
4748
4721
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4785,15 +4758,11 @@ const Heading = React.memo(React.forwardRef(({ asChild = false, children, style
|
|
|
4785
4758
|
...rest,
|
|
4786
4759
|
children
|
|
4787
4760
|
});
|
|
4788
|
-
})
|
|
4761
|
+
}));
|
|
4789
4762
|
Heading.displayName = "Heading";
|
|
4790
4763
|
|
|
4791
4764
|
//#endregion
|
|
4792
4765
|
//#region src/components/typography/Strong.tsx
|
|
4793
|
-
const areEqual$5 = (prevProps, nextProps) => {
|
|
4794
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.color === nextProps.color) return true;
|
|
4795
|
-
return false;
|
|
4796
|
-
};
|
|
4797
4766
|
const Strong = React.memo(React.forwardRef(({ children, style = {}, color, ...rest }, ref) => {
|
|
4798
4767
|
const theme = useTheme$1();
|
|
4799
4768
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4813,15 +4782,11 @@ const Strong = React.memo(React.forwardRef(({ children, style = {}, color, ...re
|
|
|
4813
4782
|
...rest,
|
|
4814
4783
|
children
|
|
4815
4784
|
});
|
|
4816
|
-
})
|
|
4785
|
+
}));
|
|
4817
4786
|
Strong.displayName = "Strong";
|
|
4818
4787
|
|
|
4819
4788
|
//#endregion
|
|
4820
4789
|
//#region src/components/typography/Em.tsx
|
|
4821
|
-
const areEqual$4 = (prevProps, nextProps) => {
|
|
4822
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.color === nextProps.color) return true;
|
|
4823
|
-
return false;
|
|
4824
|
-
};
|
|
4825
4790
|
const Em = React.memo(React.forwardRef(({ children, style = {}, color, ...rest }, ref) => {
|
|
4826
4791
|
const theme = useTheme$1();
|
|
4827
4792
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -4841,15 +4806,11 @@ const Em = React.memo(React.forwardRef(({ children, style = {}, color, ...rest }
|
|
|
4841
4806
|
...rest,
|
|
4842
4807
|
children
|
|
4843
4808
|
});
|
|
4844
|
-
})
|
|
4809
|
+
}));
|
|
4845
4810
|
Em.displayName = "Em";
|
|
4846
4811
|
|
|
4847
4812
|
//#endregion
|
|
4848
4813
|
//#region src/components/typography/Code.tsx
|
|
4849
|
-
const areEqual$3 = (prevProps, nextProps) => {
|
|
4850
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.size === nextProps.size && prevProps.color === nextProps.color && prevProps.backgroundColor === nextProps.backgroundColor) return true;
|
|
4851
|
-
return false;
|
|
4852
|
-
};
|
|
4853
4814
|
const Code = React.memo(React.forwardRef(({ children, style = {}, size = 2, color, backgroundColor, ...rest }, ref) => {
|
|
4854
4815
|
const theme = useTheme$1();
|
|
4855
4816
|
const isDark = useThemeMode$1() === "dark";
|
|
@@ -4878,15 +4839,11 @@ const Code = React.memo(React.forwardRef(({ children, style = {}, size = 2, colo
|
|
|
4878
4839
|
...rest,
|
|
4879
4840
|
children
|
|
4880
4841
|
});
|
|
4881
|
-
})
|
|
4842
|
+
}));
|
|
4882
4843
|
Code.displayName = "Code";
|
|
4883
4844
|
|
|
4884
4845
|
//#endregion
|
|
4885
4846
|
//#region src/components/typography/Kbd.tsx
|
|
4886
|
-
const areEqual$2 = (prevProps, nextProps) => {
|
|
4887
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.color === nextProps.color && prevProps.backgroundColor === nextProps.backgroundColor && prevProps.size === nextProps.size) return true;
|
|
4888
|
-
return false;
|
|
4889
|
-
};
|
|
4890
4847
|
const Kbd = React.memo(React.forwardRef(({ children, style = {}, color, backgroundColor, size = 1, ...rest }, ref) => {
|
|
4891
4848
|
const theme = useTheme$1();
|
|
4892
4849
|
const isDark = useThemeMode$1() === "dark";
|
|
@@ -4932,7 +4889,7 @@ const Kbd = React.memo(React.forwardRef(({ children, style = {}, color, backgrou
|
|
|
4932
4889
|
children
|
|
4933
4890
|
})
|
|
4934
4891
|
});
|
|
4935
|
-
})
|
|
4892
|
+
}));
|
|
4936
4893
|
Kbd.displayName = "Kbd";
|
|
4937
4894
|
|
|
4938
4895
|
//#endregion
|
|
@@ -4970,10 +4927,6 @@ Link.displayName = "Link";
|
|
|
4970
4927
|
|
|
4971
4928
|
//#endregion
|
|
4972
4929
|
//#region src/components/typography/Blockquote.tsx
|
|
4973
|
-
const areEqual$1 = (prevProps, nextProps) => {
|
|
4974
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.textStyle === nextProps.textStyle && prevProps.color === nextProps.color && prevProps.borderColor === nextProps.borderColor && prevProps.quoteColor === nextProps.quoteColor) return true;
|
|
4975
|
-
return false;
|
|
4976
|
-
};
|
|
4977
4930
|
const Blockquote = React.memo(React.forwardRef(({ children, style, textStyle = {}, color, borderColor, quoteColor, ...rest }, ref) => {
|
|
4978
4931
|
const theme = useTheme$1();
|
|
4979
4932
|
const colors = useThemeMode$1() === "dark" ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -5027,7 +4980,7 @@ const Blockquote = React.memo(React.forwardRef(({ children, style, textStyle = {
|
|
|
5027
4980
|
]
|
|
5028
4981
|
})
|
|
5029
4982
|
});
|
|
5030
|
-
})
|
|
4983
|
+
}));
|
|
5031
4984
|
Blockquote.displayName = "Blockquote";
|
|
5032
4985
|
|
|
5033
4986
|
//#endregion
|
|
@@ -5061,10 +5014,6 @@ const getIconSize = (size) => {
|
|
|
5061
5014
|
default: return 20;
|
|
5062
5015
|
}
|
|
5063
5016
|
};
|
|
5064
|
-
const areEqual = (prevProps, nextProps) => {
|
|
5065
|
-
if (prevProps.children === nextProps.children && prevProps.style === nextProps.style && prevProps.variant === nextProps.variant && prevProps.color === nextProps.color && prevProps.radius === nextProps.radius && prevProps.size === nextProps.size && prevProps.disabled === nextProps.disabled && prevProps.loading === nextProps.loading && prevProps.onPress === nextProps.onPress && prevProps.onLongPress === nextProps.onLongPress && prevProps.delayLongPress === nextProps.delayLongPress && prevProps.width === nextProps.width && prevProps.highContrast === nextProps.highContrast) return true;
|
|
5066
|
-
return false;
|
|
5067
|
-
};
|
|
5068
5017
|
const Button = React.memo(React.forwardRef(({ children, style, variant = "solid", color, radius, size = 2, disabled, loading, onPress, accessibilityLabel, width, highContrast, hapticFeedback, ...rest }, ref) => {
|
|
5069
5018
|
const theme = useTheme$1();
|
|
5070
5019
|
const mode = useThemeMode$1();
|
|
@@ -5245,7 +5194,7 @@ const Button = React.memo(React.forwardRef(({ children, style, variant = "solid"
|
|
|
5245
5194
|
rightIcons.map((icon, index) => renderIcon(icon, index))
|
|
5246
5195
|
] })
|
|
5247
5196
|
});
|
|
5248
|
-
})
|
|
5197
|
+
}));
|
|
5249
5198
|
Button.displayName = "Button";
|
|
5250
5199
|
Button.Icon = ButtonIcon;
|
|
5251
5200
|
Button.Label = ButtonLabel;
|
|
@@ -11908,7 +11857,7 @@ const DataList = {
|
|
|
11908
11857
|
|
|
11909
11858
|
//#endregion
|
|
11910
11859
|
//#region src/components/data-display/FancyList.tsx
|
|
11911
|
-
const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true, scrollable = true, itemPadding, ListEmptyComponent, ListHeaderComponent, ListFooterComponent }) => {
|
|
11860
|
+
const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true, scrollable = true, itemPadding, ListEmptyComponent, ListHeaderComponent, ListFooterComponent, ListBackend: Backend = RnFlatList, backendProps }) => {
|
|
11912
11861
|
const theme = useTheme$1();
|
|
11913
11862
|
const isDark = useThemeMode$1() === "dark";
|
|
11914
11863
|
isDark ? theme.colors.gray.dark : theme.colors.gray;
|
|
@@ -11961,7 +11910,8 @@ const FancyList = ({ data, renderItem, keyExtractor, style, showDividers = true,
|
|
|
11961
11910
|
});
|
|
11962
11911
|
return /* @__PURE__ */ jsx(RnView, {
|
|
11963
11912
|
style: [styles$9.container, style],
|
|
11964
|
-
children: /* @__PURE__ */ jsx(
|
|
11913
|
+
children: /* @__PURE__ */ jsx(Backend, {
|
|
11914
|
+
...backendProps,
|
|
11965
11915
|
data,
|
|
11966
11916
|
renderItem: renderListItem,
|
|
11967
11917
|
keyExtractor: defaultKeyExtractor,
|
|
@@ -12190,18 +12140,21 @@ const Skeleton = React.forwardRef(({ children, loading = true, style, textStyle,
|
|
|
12190
12140
|
animation.stop();
|
|
12191
12141
|
};
|
|
12192
12142
|
}, [pulseAnim]);
|
|
12193
|
-
const pulseStyle = {
|
|
12143
|
+
const pulseStyle = { opacity: pulseAnim.interpolate({
|
|
12194
12144
|
inputRange: [0, 1],
|
|
12195
|
-
outputRange: [
|
|
12145
|
+
outputRange: [.55, 1]
|
|
12196
12146
|
}) };
|
|
12147
|
+
const skeletonBackground = { backgroundColor: grayScale[3] };
|
|
12197
12148
|
if (!loading) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
12198
12149
|
if (!React.isValidElement(children) && typeof children === "string") return /* @__PURE__ */ jsx(Animated.Text, {
|
|
12199
12150
|
ref,
|
|
12200
12151
|
style: [
|
|
12201
|
-
|
|
12152
|
+
styles$6.inlineText,
|
|
12153
|
+
skeletonBackground,
|
|
12202
12154
|
pulseStyle,
|
|
12203
12155
|
width !== void 0 ? { width } : void 0,
|
|
12204
|
-
height !== void 0 ? { height } : void 0
|
|
12156
|
+
height !== void 0 ? { height } : void 0,
|
|
12157
|
+
textStyle
|
|
12205
12158
|
],
|
|
12206
12159
|
accessibilityLabel,
|
|
12207
12160
|
accessibilityRole: "progressbar",
|
|
@@ -12212,6 +12165,7 @@ const Skeleton = React.forwardRef(({ children, loading = true, style, textStyle,
|
|
|
12212
12165
|
ref,
|
|
12213
12166
|
style: [
|
|
12214
12167
|
styles$6.blockContainer,
|
|
12168
|
+
skeletonBackground,
|
|
12215
12169
|
pulseStyle,
|
|
12216
12170
|
width !== void 0 ? { width } : void 0,
|
|
12217
12171
|
height !== void 0 ? { height } : void 0,
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "radix-native-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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",
|
|
7
|
+
"sideEffects": false,
|
|
7
8
|
"types": "dist/index.d.mts",
|
|
8
9
|
"type": "module",
|
|
9
10
|
"exports": {
|