@thewhileloop/whileui 2.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +135 -70
  2. package/dist/blocks/commerce/metric-card.d.ts +9 -29
  3. package/dist/blocks/datepicker/date-range-picker-modal.d.ts +1 -1
  4. package/dist/blocks/datepicker/date-range-picker-modal.js +6 -14
  5. package/dist/blocks/datepicker/datepicker-modal.d.ts +1 -1
  6. package/dist/blocks/datepicker/datepicker-modal.js +6 -12
  7. package/dist/blocks/datepicker/index.d.ts +1 -0
  8. package/dist/blocks/datepicker/index.js +1 -0
  9. package/dist/blocks/datepicker/time-picker-modal.d.ts +43 -0
  10. package/dist/blocks/datepicker/time-picker-modal.js +187 -0
  11. package/dist/blocks/layout/smart-input.d.ts +3 -2
  12. package/dist/blocks/layout/smart-input.js +33 -18
  13. package/dist/blocks/media/smart-image.d.ts +39 -98
  14. package/dist/blocks/navigation/drawer-menu.js +88 -72
  15. package/dist/components/alert/alert.d.ts +23 -55
  16. package/dist/components/alert/alert.js +1 -1
  17. package/dist/components/alert-dialog/alert-dialog.js +1 -4
  18. package/dist/components/avatar/avatar.d.ts +18 -45
  19. package/dist/components/avatar/avatar.js +1 -1
  20. package/dist/components/badge/badge.d.ts +84 -212
  21. package/dist/components/button/button.d.ts +69 -188
  22. package/dist/components/card/card.d.ts +29 -73
  23. package/dist/components/card/card.js +1 -1
  24. package/dist/components/container/container.d.ts +24 -96
  25. package/dist/components/data-row/data-row.d.ts +18 -38
  26. package/dist/components/data-row/data-row.js +1 -1
  27. package/dist/components/fab/fab.d.ts +87 -0
  28. package/dist/components/fab/fab.js +59 -0
  29. package/dist/components/fab/index.d.ts +1 -0
  30. package/dist/components/fab/index.js +1 -0
  31. package/dist/components/form-field/form-field.d.ts +31 -87
  32. package/dist/components/form-field/form-field.js +1 -1
  33. package/dist/components/hover-card/hover-card.d.ts +3 -2
  34. package/dist/components/input/input.d.ts +18 -31
  35. package/dist/components/input/input.js +20 -8
  36. package/dist/components/label/label.d.ts +3 -3
  37. package/dist/components/labeled-field/labeled-field.d.ts +3 -2
  38. package/dist/components/numeric-input/numeric-input.d.ts +27 -82
  39. package/dist/components/numeric-input/numeric-input.js +79 -80
  40. package/dist/components/otp-input/otp-input.d.ts +21 -65
  41. package/dist/components/popover/popover.d.ts +4 -3
  42. package/dist/components/pressable/pressable.d.ts +3 -3
  43. package/dist/components/progress/progress.d.ts +15 -39
  44. package/dist/components/row/row.d.ts +63 -163
  45. package/dist/components/segmented-control/segmented-control.d.ts +69 -241
  46. package/dist/components/select/select.d.ts +10 -22
  47. package/dist/components/select/select.js +2 -7
  48. package/dist/components/separator/separator.d.ts +3 -3
  49. package/dist/components/skeleton/skeleton.d.ts +9 -29
  50. package/dist/components/spinner/spinner.d.ts +12 -36
  51. package/dist/components/stack/stack.d.ts +63 -163
  52. package/dist/components/tabs/tabs.d.ts +9 -29
  53. package/dist/components/text/text.d.ts +51 -131
  54. package/dist/components/textarea/textarea.d.ts +15 -39
  55. package/dist/components/textarea/textarea.js +3 -3
  56. package/dist/components/toast/toast.d.ts +12 -36
  57. package/dist/components/toggle/toggle.d.ts +42 -138
  58. package/dist/components/toggle-group/toggle-group.d.ts +42 -138
  59. package/dist/components/tooltip/tooltip.d.ts +3 -2
  60. package/dist/components/view/view.d.ts +3 -3
  61. package/dist/index.d.ts +2 -1
  62. package/dist/index.js +2 -1
  63. package/dist/lib/focus-ring.d.ts +10 -0
  64. package/dist/lib/focus-ring.js +10 -0
  65. package/dist/lib/interaction-tokens.d.ts +24 -1
  66. package/dist/lib/interaction-tokens.js +26 -44
  67. package/dist/lib/motion-policy.js +2 -2
  68. package/dist/lib/ref-types.d.ts +3 -0
  69. package/dist/lib/ref-types.js +1 -0
  70. package/dist/lib/theme-bridge.d.ts +4 -2
  71. package/dist/lib/theme-bridge.js +13 -9
  72. package/dist/lib/theme-presets.d.ts +26 -0
  73. package/dist/lib/theme-presets.js +28 -0
  74. package/package.json +29 -28
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { View, Pressable, Platform, Modal, I18nManager, ScrollView, useWindowDimensions, StyleSheet, } from 'react-native';
3
+ import { View, Pressable, Platform, Modal, I18nManager, SectionList, useWindowDimensions, StyleSheet, } from 'react-native';
4
4
  import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing, interpolate, } from 'react-native-reanimated';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { Text } from '../../components/text';
@@ -12,43 +12,35 @@ import { shadowStyle, surfaceRadius } from '../../lib/recipes';
12
12
  import { useMotionPolicy } from '../../lib/motion-policy';
13
13
  import { useTapOnly } from '../../lib/tap-only';
14
14
  import { useFrostedSurface, useFrostedBackdrop, } from '../../lib/frosted-surface';
15
- export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted = false, blurIntensity, blurTintToken, }) {
16
- const insets = useSafeAreaInsets();
17
- const colors = useThemeColors();
18
- const interaction = useInteractionTokens();
19
- const visual = useVisualTokens();
20
- const motion = useMotionPolicy();
21
- const backdropPress = useTapOnly(onClose);
22
- const frostedSurface = useFrostedSurface({
23
- frosted,
24
- blurIntensity,
25
- blurTintToken,
26
- defaultTintToken: 'surfaceTranslucent',
27
- defaultBlurPreset: 'medium',
28
- });
29
- const frostedBackdrop = useFrostedBackdrop({
30
- frosted,
31
- blurIntensity: typeof blurIntensity === 'number' && Number.isFinite(blurIntensity)
32
- ? blurIntensity * visual.frostedBackdropBlurScale
33
- : undefined,
34
- tintColor: colors.overlay,
35
- });
36
- const { width: screenWidth } = useWindowDimensions();
37
- const rawWidth = screenWidth * visual.drawerWidthRatio;
38
- const effectiveMaxWidth = maxWidth ?? (Platform.OS === 'web' ? visual.drawerMaxWidthWeb : undefined);
39
- const drawerWidth = effectiveMaxWidth != null ? Math.min(rawWidth, effectiveMaxWidth) : rawWidth;
40
- const frostedInset = frosted ? visual.drawerFrostedInset : 0;
41
- const cornerRadius = frosted ? visual.drawerFrostedRadius : surfaceRadius(visual, 'xl');
42
- const useFloatingFrostedDrawer = frosted && frostedInset > 0;
43
- const contentTopPadding = insets.top + visual.drawerContentTopPadding;
15
+ function DrawerItemRow({ item, active, onSelect, interaction, visual }) {
16
+ const handlePress = React.useCallback(() => onSelect(item.key), [item.key, onSelect]);
17
+ const pressStyle = React.useMemo(() => withInteractivePressableStyle({
18
+ borderRadius: visual.radiusLg,
19
+ paddingHorizontal: visual.controlPaddingXDefault,
20
+ paddingVertical: visual.controlPaddingYDefault,
21
+ minHeight: visual.touchTargetMinSize,
22
+ }, interaction, { pressedVariant: 'default' }), [interaction, visual]);
23
+ return (_jsxs(Pressable, { accessibilityRole: "button", onPress: handlePress, className: cn('flex-row items-center gap-3 mx-1 transition-colors', active && 'bg-primary-soft-subtle'), style: pressStyle, children: [item.icon, _jsx(Text, { className: cn('flex-1 font-semibold tracking-tight', item.destructive ? 'text-destructive' : active ? 'text-primary' : 'text-foreground'), style: { fontSize: visual.drawerItemFontSize }, children: item.label }), item.badge === undefined ? null : (_jsx(View, { className: "bg-primary px-2 py-0.5 items-center", style: { minWidth: visual.drawerBadgeMinWidth, borderRadius: visual.badgeRadius }, children: _jsx(Text, { className: "font-semibold text-primary-foreground", style: { fontSize: visual.navItemBadgeFontSize }, children: item.badge }) }))] }));
24
+ }
25
+ function DrawerSectionGap() {
26
+ return _jsx(View, { className: "mb-4" });
27
+ }
28
+ function DrawerItemGap() {
29
+ return _jsx(View, { className: "h-0.5" });
30
+ }
31
+ function DrawerSectionList({ sections, activeKey, onSelect, interaction, visual, }) {
32
+ const data = React.useMemo(() => sections.map((section) => ({ title: section.title, data: section.items })), [sections]);
33
+ const renderItem = React.useCallback(({ item }) => (_jsx(DrawerItemRow, { item: item, active: activeKey === item.key, onSelect: onSelect, interaction: interaction, visual: visual })), [activeKey, interaction, onSelect, visual]);
34
+ const renderSectionHeader = React.useCallback(({ section }) => section.title ? (_jsx(Text, { accessibilityRole: "header", className: "font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", style: { fontSize: visual.navSectionTitleFontSize }, children: section.title })) : null, [visual.navSectionTitleFontSize]);
35
+ return (_jsx(SectionList, { sections: data, keyExtractor: (item) => item.key, className: "flex-1 px-3", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, renderSectionHeader: renderSectionHeader, renderSectionFooter: DrawerSectionGap, ItemSeparatorComponent: DrawerItemGap, renderItem: renderItem }));
36
+ }
37
+ function useDrawerAnimation({ visible, drawerWidth, interaction, motion }) {
44
38
  const progress = useSharedValue(0);
45
39
  const [mounted, setMounted] = React.useState(visible);
46
40
  const closeTimerRef = React.useRef(null);
47
- // Mounting has to happen in the same commit that `visible` flips, or the drawer's
48
- // entrance animation loses its first frame. React's documented way to do that is to
49
- // adjust state during render on a props change rather than in an effect; the close
50
- // path is the asymmetric one and stays below, on a timer, so the exit can finish.
51
41
  const [prevVisible, setPrevVisible] = React.useState(visible);
42
+ // Open in the prop-change render so the first animation frame has a mounted panel;
43
+ // closing stays mounted on the timer until the exit animation finishes.
52
44
  if (prevVisible !== visible) {
53
45
  setPrevVisible(visible);
54
46
  if (visible)
@@ -69,14 +61,10 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
69
61
  progress.value = withTiming(visible ? 1 : 0, {
70
62
  duration,
71
63
  reduceMotion: motion.reanimatedReduceMotion,
72
- easing: visible
73
- ? Easing.bezier(0.2, 0.8, 0.2, 1) // Swift, decelerating entrance
74
- : Easing.bezier(0.4, 0, 1, 1), // Accelerating, sharp exit
64
+ easing: visible ? Easing.bezier(0.2, 0.8, 0.2, 1) : Easing.bezier(0.4, 0, 1, 1),
75
65
  });
76
66
  if (!visible) {
77
- closeTimerRef.current = setTimeout(() => {
78
- setMounted(false);
79
- }, duration);
67
+ closeTimerRef.current = setTimeout(() => setMounted(false), duration);
80
68
  }
81
69
  return () => {
82
70
  if (closeTimerRef.current) {
@@ -98,8 +86,7 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
98
86
  opacity: progress.value,
99
87
  pointerEvents: progress.value > 0 ? 'auto' : 'none',
100
88
  }));
101
- // React Native swaps `left` for `right` under RTL, so the panel already sits on the
102
- // trailing edge; the translate has to start off-screen on that same side.
89
+ // RN mirrors the anchored edge in RTL, so the off-screen translation mirrors too.
103
90
  const offscreenX = I18nManager.isRTL ? drawerWidth : -drawerWidth;
104
91
  const drawerStyle = useAnimatedStyle(() => ({
105
92
  transform: [{ translateX: interpolate(progress.value, [0, 1], [offscreenX, 0]) }],
@@ -107,9 +94,57 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
107
94
  const containerStyle = useAnimatedStyle(() => ({
108
95
  pointerEvents: progress.value > 0 ? 'auto' : 'none',
109
96
  }));
110
- const handleItemPress = (key) => {
97
+ return { mounted, backdropStyle, drawerStyle, containerStyle };
98
+ }
99
+ function resolveDrawerLayout(screenWidth, maxWidth, frosted, visual) {
100
+ const rawWidth = screenWidth * visual.drawerWidthRatio;
101
+ const effectiveMaxWidth = maxWidth ?? (Platform.OS === 'web' ? visual.drawerMaxWidthWeb : undefined);
102
+ const width = effectiveMaxWidth == null ? rawWidth : Math.min(rawWidth, effectiveMaxWidth);
103
+ const inset = frosted ? visual.drawerFrostedInset : 0;
104
+ const radius = frosted ? visual.drawerFrostedRadius : surfaceRadius(visual, 'xl');
105
+ return { width, inset, radius, floating: frosted && inset > 0 };
106
+ }
107
+ function resolveBackdropBlur(blurIntensity, scale) {
108
+ return typeof blurIntensity === 'number' && Number.isFinite(blurIntensity)
109
+ ? blurIntensity * scale
110
+ : undefined;
111
+ }
112
+ function drawerPanelClassName(frosted, className) {
113
+ return cn(frosted
114
+ ? 'border border-border relative overflow-hidden'
115
+ : 'border-r border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background', className);
116
+ }
117
+ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted = false, blurIntensity, blurTintToken, }) {
118
+ const insets = useSafeAreaInsets();
119
+ const colors = useThemeColors();
120
+ const interaction = useInteractionTokens();
121
+ const visual = useVisualTokens();
122
+ const motion = useMotionPolicy();
123
+ const backdropPress = useTapOnly(onClose);
124
+ const frostedSurface = useFrostedSurface({
125
+ frosted,
126
+ blurIntensity,
127
+ blurTintToken,
128
+ defaultTintToken: 'surfaceTranslucent',
129
+ defaultBlurPreset: 'medium',
130
+ });
131
+ const frostedBackdrop = useFrostedBackdrop({
132
+ frosted,
133
+ blurIntensity: resolveBackdropBlur(blurIntensity, visual.frostedBackdropBlurScale),
134
+ tintColor: colors.overlay,
135
+ });
136
+ const { width: screenWidth } = useWindowDimensions();
137
+ const layout = resolveDrawerLayout(screenWidth, maxWidth, frosted, visual);
138
+ const contentTopPadding = insets.top + visual.drawerContentTopPadding;
139
+ const { mounted, backdropStyle, drawerStyle, containerStyle } = useDrawerAnimation({
140
+ visible,
141
+ drawerWidth: layout.width,
142
+ interaction,
143
+ motion,
144
+ });
145
+ const handleItemPress = React.useCallback((key) => {
111
146
  onSelect?.(key);
112
- };
147
+ }, [onSelect]);
113
148
  if (!mounted)
114
149
  return null;
115
150
  const drawerTree = (_jsxs(Animated.View, { style: [StyleSheet.absoluteFill, containerStyle], children: [_jsxs(Animated.View, { style: [
@@ -119,39 +154,20 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
119
154
  ], children: [frostedBackdrop, _jsx(Pressable, { accessible: false, importantForAccessibility: "no", style: StyleSheet.absoluteFill, ...backdropPress })] }), _jsxs(Animated.View, { style: [
120
155
  {
121
156
  position: 'absolute',
122
- top: frostedInset,
123
- bottom: frostedInset,
124
- left: frostedInset,
125
- width: Math.max(drawerWidth - frostedInset, 0),
126
- borderTopRightRadius: cornerRadius,
127
- borderBottomRightRadius: cornerRadius,
128
- borderTopLeftRadius: useFloatingFrostedDrawer ? cornerRadius : 0,
129
- borderBottomLeftRadius: useFloatingFrostedDrawer ? cornerRadius : 0,
157
+ top: layout.inset,
158
+ bottom: layout.inset,
159
+ left: layout.inset,
160
+ width: Math.max(layout.width - layout.inset, 0),
161
+ borderTopRightRadius: layout.radius,
162
+ borderBottomRightRadius: layout.radius,
163
+ borderTopLeftRadius: layout.floating ? layout.radius : 0,
164
+ borderBottomLeftRadius: layout.floating ? layout.radius : 0,
130
165
  },
131
166
  shadowStyle(visual, colors, frosted ? 'lg' : 'md'),
132
167
  drawerStyle,
133
168
  frostedSurface.surfaceStyle,
134
169
  style,
135
- ], className: cn(frosted
136
- ? 'border border-border relative overflow-hidden'
137
- : 'border-r border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background', className), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-1 pb-8", style: { paddingTop: contentTopPadding }, children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(ScrollView, { className: "flex-1 px-3", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, children: sections.map((section, sectionIndex) => (_jsxs(View, { className: "mb-4", children: [section.title && (_jsx(Text, { className: "font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", style: { fontSize: visual.navSectionTitleFontSize }, children: section.title })), _jsx(View, { className: "gap-0.5", children: section.items.map((item) => {
138
- const isActive = activeKey === item.key;
139
- return (_jsxs(Pressable, { accessibilityRole: "button", onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3 mx-1 transition-colors', isActive && 'bg-primary-soft-subtle'), style: withInteractivePressableStyle({
140
- borderRadius: visual.radiusLg,
141
- paddingHorizontal: visual.controlPaddingXDefault,
142
- paddingVertical: visual.controlPaddingYDefault,
143
- minHeight: visual.touchTargetMinSize,
144
- }, interaction, {
145
- pressedVariant: 'default',
146
- }), children: [item.icon, _jsx(Text, { className: cn('flex-1 font-semibold tracking-tight', item.destructive
147
- ? 'text-destructive'
148
- : isActive
149
- ? 'text-primary'
150
- : 'text-foreground'), style: { fontSize: visual.drawerItemFontSize }, children: item.label }), item.badge !== undefined && (_jsx(View, { className: "bg-primary px-2 py-0.5 items-center", style: {
151
- minWidth: visual.drawerBadgeMinWidth,
152
- borderRadius: visual.badgeRadius,
153
- }, children: _jsx(Text, { className: "font-semibold text-primary-foreground", style: { fontSize: visual.navItemBadgeFontSize }, children: item.badge }) }))] }, item.key));
154
- }) })] }, sectionIndex))) }), footer && _jsx(View, { className: "px-5 py-4 mt-auto border-t border-border", children: footer })] })] })] }));
170
+ ], className: drawerPanelClassName(frosted, className), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-1 pb-8", style: { paddingTop: contentTopPadding }, children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(DrawerSectionList, { sections: sections, activeKey: activeKey, onSelect: handleItemPress, interaction: interaction, visual: visual }), footer && _jsx(View, { className: "px-5 py-4 mt-auto border-t border-border", children: footer })] })] })] }));
155
171
  if (Platform.OS !== 'android')
156
172
  return drawerTree;
157
173
  return (_jsx(Modal, { visible: mounted, transparent: true, animationType: "none", onRequestClose: onClose, statusBarTranslucent: true, navigationBarTranslucent: true, presentationStyle: "overFullScreen", children: drawerTree }));
@@ -1,70 +1,38 @@
1
- import React from 'react';
2
- import { View, Text, type ViewProps, type TextProps } from 'react-native';
1
+ import { type ViewInstance, type ViewProps, type TextInstance, type TextProps } from 'react-native';
3
2
  import { type VariantProps } from '../../lib/tv';
3
+ import type { ForwardRefComponent } from '../../lib/ref-types';
4
4
  declare const alertVariants: import("tailwind-variants").TVReturnType<{
5
5
  variant: {
6
- default: string;
7
- destructive: string;
8
- success: string;
9
- warning: string;
10
- info: string;
6
+ default: "border-border bg-background";
7
+ destructive: "border-destructive-soft-border bg-destructive-soft";
8
+ success: "border-success-soft-border bg-success-soft";
9
+ warning: "border-warning-soft-border bg-warning-soft";
10
+ info: "border-info-soft-border bg-info-soft";
11
11
  };
12
- }, undefined, "w-full border", import("tailwind-variants/dist/config.js").TVConfig<{
12
+ }, undefined, "w-full border", {
13
13
  variant: {
14
- default: string;
15
- destructive: string;
16
- success: string;
17
- warning: string;
18
- info: string;
14
+ default: "border-border bg-background";
15
+ destructive: "border-destructive-soft-border bg-destructive-soft";
16
+ success: "border-success-soft-border bg-success-soft";
17
+ warning: "border-warning-soft-border bg-warning-soft";
18
+ info: "border-info-soft-border bg-info-soft";
19
19
  };
20
- }, {
20
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
21
21
  variant: {
22
- default: string;
23
- destructive: string;
24
- success: string;
25
- warning: string;
26
- info: string;
22
+ default: "border-border bg-background";
23
+ destructive: "border-destructive-soft-border bg-destructive-soft";
24
+ success: "border-success-soft-border bg-success-soft";
25
+ warning: "border-warning-soft-border bg-warning-soft";
26
+ info: "border-info-soft-border bg-info-soft";
27
27
  };
28
- }>, {
29
- variant: {
30
- default: string;
31
- destructive: string;
32
- success: string;
33
- warning: string;
34
- info: string;
35
- };
36
- }, undefined, import("tailwind-variants").TVReturnType<{
37
- variant: {
38
- default: string;
39
- destructive: string;
40
- success: string;
41
- warning: string;
42
- info: string;
43
- };
44
- }, undefined, "w-full border", import("tailwind-variants/dist/config.js").TVConfig<{
45
- variant: {
46
- default: string;
47
- destructive: string;
48
- success: string;
49
- warning: string;
50
- info: string;
51
- };
52
- }, {
53
- variant: {
54
- default: string;
55
- destructive: string;
56
- success: string;
57
- warning: string;
58
- info: string;
59
- };
60
- }>, unknown, unknown, undefined>>;
28
+ }, undefined>>;
61
29
  export interface AlertProps extends ViewProps, VariantProps<typeof alertVariants> {
62
30
  }
63
- declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<View>>;
31
+ declare const Alert: ForwardRefComponent<ViewInstance, AlertProps>;
64
32
  export interface AlertTitleProps extends TextProps {
65
33
  }
66
- declare const AlertTitle: React.ForwardRefExoticComponent<AlertTitleProps & React.RefAttributes<Text>>;
34
+ declare const AlertTitle: ForwardRefComponent<TextInstance, AlertTitleProps>;
67
35
  export interface AlertDescriptionProps extends TextProps {
68
36
  }
69
- declare const AlertDescription: React.ForwardRefExoticComponent<AlertDescriptionProps & React.RefAttributes<Text>>;
37
+ declare const AlertDescription: ForwardRefComponent<TextInstance, AlertDescriptionProps>;
70
38
  export { Alert, AlertTitle, AlertDescription, alertVariants };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { View, Text } from 'react-native';
3
+ import { View, Text, } from 'react-native';
4
4
  import { cn } from '../../lib/cn';
5
5
  import { tv } from '../../lib/tv';
6
6
  import { useVisualTokens } from '../../lib/visual-tokens';
@@ -229,10 +229,7 @@ function AlertDialogContent({ className, children, presentation = 'modal', frost
229
229
  if (!open) {
230
230
  return (_jsx(View, { pointerEvents: "none", style: nativeHiddenStyle, collapsable: false, importantForAccessibility: "no-hide-descendants", children: children }));
231
231
  }
232
- return (_jsx(View, { pointerEvents: "box-none", style: [
233
- StyleSheet.absoluteFill,
234
- { zIndex: 100, elevation: Platform.OS === 'android' ? 24 : undefined },
235
- ], children: themedBody }));
232
+ return (_jsx(View, { pointerEvents: "box-none", style: [StyleSheet.absoluteFill, { zIndex: 100 }], children: themedBody }));
236
233
  }
237
234
  return (_jsx(Modal, { visible: open, transparent: true, animationType: "fade", presentationStyle: Platform.OS === 'ios' ? 'overFullScreen' : undefined, statusBarTranslucent: Platform.OS === 'android', navigationBarTranslucent: Platform.OS === 'android', onRequestClose: () => setOpen(false), children: themedBody }));
238
235
  }
@@ -1,56 +1,29 @@
1
1
  import React from 'react';
2
- import { View, type ViewProps, type ImageProps } from 'react-native';
2
+ import { type ViewInstance, type ViewProps, type ImageProps } from 'react-native';
3
3
  import { type VariantProps } from '../../lib/tv';
4
+ import type { ForwardRefComponent } from '../../lib/ref-types';
4
5
  declare const avatarVariants: import("tailwind-variants").TVReturnType<{
5
6
  size: {
6
- default: string;
7
- sm: string;
8
- lg: string;
9
- xl: string;
7
+ default: "h-10 w-10";
8
+ sm: "h-8 w-8";
9
+ lg: "h-12 w-12";
10
+ xl: "h-16 w-16";
10
11
  };
11
- }, undefined, "relative flex shrink-0 overflow-hidden rounded-full", import("tailwind-variants/dist/config.js").TVConfig<{
12
+ }, undefined, "relative flex shrink-0 overflow-hidden rounded-full", {
12
13
  size: {
13
- default: string;
14
- sm: string;
15
- lg: string;
16
- xl: string;
14
+ default: "h-10 w-10";
15
+ sm: "h-8 w-8";
16
+ lg: "h-12 w-12";
17
+ xl: "h-16 w-16";
17
18
  };
18
- }, {
19
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
19
20
  size: {
20
- default: string;
21
- sm: string;
22
- lg: string;
23
- xl: string;
21
+ default: "h-10 w-10";
22
+ sm: "h-8 w-8";
23
+ lg: "h-12 w-12";
24
+ xl: "h-16 w-16";
24
25
  };
25
- }>, {
26
- size: {
27
- default: string;
28
- sm: string;
29
- lg: string;
30
- xl: string;
31
- };
32
- }, undefined, import("tailwind-variants").TVReturnType<{
33
- size: {
34
- default: string;
35
- sm: string;
36
- lg: string;
37
- xl: string;
38
- };
39
- }, undefined, "relative flex shrink-0 overflow-hidden rounded-full", import("tailwind-variants/dist/config.js").TVConfig<{
40
- size: {
41
- default: string;
42
- sm: string;
43
- lg: string;
44
- xl: string;
45
- };
46
- }, {
47
- size: {
48
- default: string;
49
- sm: string;
50
- lg: string;
51
- xl: string;
52
- };
53
- }>, unknown, unknown, undefined>>;
26
+ }, undefined>>;
54
27
  export interface AvatarProps extends ViewProps, VariantProps<typeof avatarVariants> {
55
28
  className?: string;
56
29
  }
@@ -61,7 +34,7 @@ export interface AvatarImageProps extends Omit<ImageProps, 'style'> {
61
34
  export interface AvatarFallbackProps extends ViewProps {
62
35
  className?: string;
63
36
  }
64
- declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<View>>;
37
+ declare const Avatar: ForwardRefComponent<ViewInstance, AvatarProps>;
65
38
  declare function AvatarImage({ className, onLoadingStatusChange, ...props }: AvatarImageProps): React.JSX.Element;
66
39
  declare namespace AvatarImage {
67
40
  var displayName: string;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { useMemo, useState } from 'react';
3
- import { View, Image, Text } from 'react-native';
3
+ import { View, Image, Text, } from 'react-native';
4
4
  import { cn } from '../../lib/cn';
5
5
  import { tv } from '../../lib/tv';
6
6
  import { useVisualTokens } from '../../lib/visual-tokens';