@gv-tech/ui-native 2.23.3 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__contracts.d.ts +2 -0
- package/dist/__contracts.d.ts.map +1 -0
- package/dist/accordion.d.ts +4 -4
- package/dist/accordion.d.ts.map +1 -1
- package/dist/alert-dialog.d.ts +6 -6
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/avatar.d.ts +3 -3
- package/dist/avatar.d.ts.map +1 -1
- package/dist/button.d.ts +2 -2
- package/dist/button.d.ts.map +1 -1
- package/dist/calendar.d.ts +111 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/combobox.d.ts +17 -10
- package/dist/combobox.d.ts.map +1 -1
- package/dist/dialog.d.ts +4 -4
- package/dist/dialog.d.ts.map +1 -1
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/form.d.ts +3 -1
- package/dist/form.d.ts.map +1 -1
- package/dist/hooks/use-theme.d.ts +1 -1
- package/dist/sheet.d.ts +4 -4
- package/dist/sheet.d.ts.map +1 -1
- package/dist/theme-toggle.d.ts.map +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/ui-native.cjs +2 -2
- package/dist/ui-native.esm.js +1086 -945
- package/package.json +2 -1
- package/src/__contracts.ts +880 -0
- package/src/accordion.tsx +10 -10
- package/src/alert-dialog.tsx +12 -12
- package/src/alert.tsx +3 -3
- package/src/avatar.tsx +6 -6
- package/src/button.tsx +5 -1
- package/src/calendar.tsx +52 -3
- package/src/card.tsx +6 -6
- package/src/carousel.tsx +2 -2
- package/src/checkbox.tsx +1 -1
- package/src/combobox.tsx +190 -27
- package/src/context-menu.tsx +9 -9
- package/src/dialog.tsx +76 -29
- package/src/drawer.tsx +12 -12
- package/src/dropdown-menu.tsx +11 -11
- package/src/form.tsx +6 -6
- package/src/hover-card.tsx +1 -1
- package/src/input.tsx +1 -1
- package/src/label.tsx +1 -1
- package/src/menubar.tsx +17 -17
- package/src/navigation-menu.tsx +8 -8
- package/src/popover.tsx +4 -4
- package/src/progress.tsx +1 -1
- package/src/radio-group.tsx +2 -2
- package/src/search.tsx +1 -1
- package/src/select.tsx +7 -7
- package/src/separator.tsx +1 -1
- package/src/sheet.tsx +4 -4
- package/src/switch.tsx +1 -1
- package/src/table.tsx +8 -8
- package/src/tabs.tsx +4 -4
- package/src/text.tsx +1 -1
- package/src/textarea.tsx +1 -1
- package/src/theme-toggle.tsx +16 -13
- package/src/toast.tsx +5 -5
- package/src/toggle-group.tsx +2 -2
- package/src/toggle.tsx +1 -1
- package/src/tooltip.tsx +2 -2
package/src/navigation-menu.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
|
|
|
16
16
|
import { cn } from './lib/utils';
|
|
17
17
|
|
|
18
18
|
export const NavigationMenu = React.forwardRef<
|
|
19
|
-
React.
|
|
19
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Root>,
|
|
20
20
|
NavigationMenuBaseProps
|
|
21
21
|
>(
|
|
22
22
|
(
|
|
@@ -41,7 +41,7 @@ export const NavigationMenu = React.forwardRef<
|
|
|
41
41
|
NavigationMenu.displayName = 'NavigationMenu';
|
|
42
42
|
|
|
43
43
|
export const NavigationMenuList = React.forwardRef<
|
|
44
|
-
React.
|
|
44
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.List>,
|
|
45
45
|
NavigationMenuListBaseProps
|
|
46
46
|
>(({ className, children, ...props }, ref) => {
|
|
47
47
|
return (
|
|
@@ -57,7 +57,7 @@ export const NavigationMenuList = React.forwardRef<
|
|
|
57
57
|
NavigationMenuList.displayName = 'NavigationMenuList';
|
|
58
58
|
|
|
59
59
|
export const NavigationMenuItem = React.forwardRef<
|
|
60
|
-
React.
|
|
60
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Item>,
|
|
61
61
|
NavigationMenuItemBaseProps
|
|
62
62
|
>(({ className, children, value, ...props }, ref) => {
|
|
63
63
|
return (
|
|
@@ -69,7 +69,7 @@ export const NavigationMenuItem = React.forwardRef<
|
|
|
69
69
|
NavigationMenuItem.displayName = 'NavigationMenuItem';
|
|
70
70
|
|
|
71
71
|
export const NavigationMenuTrigger = React.forwardRef<
|
|
72
|
-
React.
|
|
72
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Trigger>,
|
|
73
73
|
NavigationMenuTriggerBaseProps
|
|
74
74
|
>(({ className, children, disabled, ...props }, ref) => {
|
|
75
75
|
return (
|
|
@@ -93,7 +93,7 @@ export const NavigationMenuTrigger = React.forwardRef<
|
|
|
93
93
|
NavigationMenuTrigger.displayName = 'NavigationMenuTrigger';
|
|
94
94
|
|
|
95
95
|
export const NavigationMenuContent = React.forwardRef<
|
|
96
|
-
React.
|
|
96
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Content>,
|
|
97
97
|
NavigationMenuContentBaseProps
|
|
98
98
|
>(({ className, children, forceMount, ...props }, ref) => {
|
|
99
99
|
return (
|
|
@@ -113,7 +113,7 @@ export const NavigationMenuContent = React.forwardRef<
|
|
|
113
113
|
NavigationMenuContent.displayName = 'NavigationMenuContent';
|
|
114
114
|
|
|
115
115
|
export const NavigationMenuLink = React.forwardRef<
|
|
116
|
-
React.
|
|
116
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Link>,
|
|
117
117
|
NavigationMenuLinkBaseProps & { onPress?: () => void }
|
|
118
118
|
>(({ className, children, active, onSelect, onPress, href, ...props }, ref) => {
|
|
119
119
|
const handlePress = (e: GestureResponderEvent) => {
|
|
@@ -144,7 +144,7 @@ export const NavigationMenuLink = React.forwardRef<
|
|
|
144
144
|
NavigationMenuLink.displayName = 'NavigationMenuLink';
|
|
145
145
|
|
|
146
146
|
export const NavigationMenuViewport = React.forwardRef<
|
|
147
|
-
React.
|
|
147
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Viewport>,
|
|
148
148
|
NavigationMenuViewportBaseProps
|
|
149
149
|
>(({ className, forceMount, ...props }, ref) => {
|
|
150
150
|
return (
|
|
@@ -163,7 +163,7 @@ export const NavigationMenuViewport = React.forwardRef<
|
|
|
163
163
|
NavigationMenuViewport.displayName = 'NavigationMenuViewport';
|
|
164
164
|
|
|
165
165
|
export const NavigationMenuIndicator = React.forwardRef<
|
|
166
|
-
React.
|
|
166
|
+
React.ComponentRef<typeof NavigationMenuPrimitive.Indicator>,
|
|
167
167
|
NavigationMenuIndicatorBaseProps
|
|
168
168
|
>(({ className, forceMount, ...props }, ref) => {
|
|
169
169
|
return (
|
package/src/popover.tsx
CHANGED
|
@@ -18,7 +18,7 @@ const PopoverContext = React.createContext<{
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const Popover = React.forwardRef<
|
|
21
|
-
React.
|
|
21
|
+
React.ComponentRef<typeof View>,
|
|
22
22
|
React.ComponentPropsWithoutRef<typeof View> & PopoverBaseProps
|
|
23
23
|
>(({ children, open, onOpenChange, ...props }, ref) => {
|
|
24
24
|
const [internalOpen, setInternalOpen] = React.useState(false);
|
|
@@ -37,7 +37,7 @@ const Popover = React.forwardRef<
|
|
|
37
37
|
Popover.displayName = 'Popover';
|
|
38
38
|
|
|
39
39
|
const PopoverTrigger = React.forwardRef<
|
|
40
|
-
React.
|
|
40
|
+
React.ComponentRef<typeof Pressable>,
|
|
41
41
|
React.ComponentPropsWithoutRef<typeof Pressable> & PopoverTriggerBaseProps
|
|
42
42
|
>(({ children, ...props }, ref) => {
|
|
43
43
|
const { setOpen } = React.useContext(PopoverContext);
|
|
@@ -51,13 +51,13 @@ const PopoverTrigger = React.forwardRef<
|
|
|
51
51
|
PopoverTrigger.displayName = 'PopoverTrigger';
|
|
52
52
|
|
|
53
53
|
const PopoverAnchor = React.forwardRef<
|
|
54
|
-
React.
|
|
54
|
+
React.ComponentRef<typeof View>,
|
|
55
55
|
React.ComponentPropsWithoutRef<typeof View> & PopoverAnchorBaseProps
|
|
56
56
|
>(({ ...props }, ref) => <View ref={ref} {...props} />);
|
|
57
57
|
PopoverAnchor.displayName = 'PopoverAnchor';
|
|
58
58
|
|
|
59
59
|
const PopoverContent = React.forwardRef<
|
|
60
|
-
React.
|
|
60
|
+
React.ComponentRef<typeof View>,
|
|
61
61
|
React.ComponentPropsWithoutRef<typeof View> & PopoverContentBaseProps
|
|
62
62
|
>(({ className, children, ...props }, ref) => {
|
|
63
63
|
const { open, setOpen } = React.useContext(PopoverContext);
|
package/src/progress.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { View } from 'react-native';
|
|
|
5
5
|
import { cn } from './lib/utils';
|
|
6
6
|
|
|
7
7
|
const Progress = React.forwardRef<
|
|
8
|
-
React.
|
|
8
|
+
React.ComponentRef<typeof View>,
|
|
9
9
|
React.ComponentPropsWithoutRef<typeof View> & ProgressBaseProps
|
|
10
10
|
>(({ className, value, ...props }, ref) => (
|
|
11
11
|
<View
|
package/src/radio-group.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { cn } from './lib/utils';
|
|
|
8
8
|
export interface RadioGroupProps
|
|
9
9
|
extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}
|
|
10
10
|
|
|
11
|
-
const RadioGroup = React.forwardRef<React.
|
|
11
|
+
const RadioGroup = React.forwardRef<React.ComponentRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(
|
|
12
12
|
({ className, ...props }, ref) => {
|
|
13
13
|
return <RadioGroupPrimitive.Root className={cn('web:grid gap-2', className)} {...props} ref={ref} />;
|
|
14
14
|
},
|
|
@@ -18,7 +18,7 @@ RadioGroup.displayName = RadioGroupPrimitive.Root?.displayName || 'RadioGroup';
|
|
|
18
18
|
export interface RadioGroupItemProps
|
|
19
19
|
extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, 'disabled'>, RadioGroupItemBaseProps {}
|
|
20
20
|
|
|
21
|
-
const RadioGroupItem = React.forwardRef<React.
|
|
21
|
+
const RadioGroupItem = React.forwardRef<React.ComponentRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(
|
|
22
22
|
({ className, ...props }, ref) => {
|
|
23
23
|
return (
|
|
24
24
|
<RadioGroupPrimitive.Item
|
package/src/search.tsx
CHANGED
|
@@ -34,7 +34,7 @@ export function Search({ children, open: customOpen, onOpenChange }: SearchProps
|
|
|
34
34
|
export interface SearchTriggerProps
|
|
35
35
|
extends Omit<React.ComponentPropsWithoutRef<typeof Button>, 'variant'>, SearchTriggerBaseProps {}
|
|
36
36
|
|
|
37
|
-
export const SearchTrigger = React.forwardRef<React.
|
|
37
|
+
export const SearchTrigger = React.forwardRef<React.ComponentRef<typeof Button>, SearchTriggerProps>(
|
|
38
38
|
({ className, placeholder, variant = 'default', responsive = false, ...props }, ref) => {
|
|
39
39
|
const defaultPlaceholder = variant === 'compact' ? 'Search...' : 'Search docs...';
|
|
40
40
|
const activePlaceholder = placeholder || defaultPlaceholder;
|
package/src/select.tsx
CHANGED
|
@@ -43,7 +43,7 @@ export interface SelectTriggerProps
|
|
|
43
43
|
Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'children' | 'disabled'>,
|
|
44
44
|
SelectTriggerBaseProps {}
|
|
45
45
|
|
|
46
|
-
const SelectTrigger = React.forwardRef<React.
|
|
46
|
+
const SelectTrigger = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(
|
|
47
47
|
({ className, children, ...props }, ref) => (
|
|
48
48
|
<SelectPrimitive.Trigger
|
|
49
49
|
ref={ref}
|
|
@@ -65,7 +65,7 @@ export interface SelectScrollUpButtonProps
|
|
|
65
65
|
extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>, SelectScrollUpButtonBaseProps {}
|
|
66
66
|
|
|
67
67
|
const SelectScrollUpButton = React.forwardRef<
|
|
68
|
-
React.
|
|
68
|
+
React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
69
69
|
SelectScrollUpButtonProps
|
|
70
70
|
>(({ className, ...props }, ref) => (
|
|
71
71
|
<SelectPrimitive.ScrollUpButton
|
|
@@ -85,7 +85,7 @@ export interface SelectScrollDownButtonProps
|
|
|
85
85
|
extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>, SelectScrollDownButtonBaseProps {}
|
|
86
86
|
|
|
87
87
|
const SelectScrollDownButton = React.forwardRef<
|
|
88
|
-
React.
|
|
88
|
+
React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
89
89
|
SelectScrollDownButtonProps
|
|
90
90
|
>(({ className, ...props }, ref) => (
|
|
91
91
|
<SelectPrimitive.ScrollDownButton
|
|
@@ -109,7 +109,7 @@ export interface SelectContentProps
|
|
|
109
109
|
overlayStyle?: ViewStyle;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const SelectContent = React.forwardRef<React.
|
|
112
|
+
const SelectContent = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Content>, SelectContentProps>(
|
|
113
113
|
({ className, children, position = 'popper', portalHost, overlayClassName, overlayStyle, ...props }, ref) => {
|
|
114
114
|
const { open } = SelectPrimitive.useRootContext();
|
|
115
115
|
|
|
@@ -151,7 +151,7 @@ SelectContent.displayName = SelectPrimitive.Content?.displayName || 'SelectConte
|
|
|
151
151
|
export interface SelectLabelProps
|
|
152
152
|
extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>, SelectLabelBaseProps {}
|
|
153
153
|
|
|
154
|
-
const SelectLabel = React.forwardRef<React.
|
|
154
|
+
const SelectLabel = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Label>, SelectLabelProps>(
|
|
155
155
|
({ className, ...props }, ref) => (
|
|
156
156
|
<SelectPrimitive.Label
|
|
157
157
|
ref={ref}
|
|
@@ -169,7 +169,7 @@ export interface SelectItemProps
|
|
|
169
169
|
label?: string;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
const SelectItem = React.forwardRef<React.
|
|
172
|
+
const SelectItem = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Item>, SelectItemProps>(
|
|
173
173
|
({ className, children, label, ...props }, ref) => {
|
|
174
174
|
const itemLabel = label || (typeof children === 'string' ? children : '');
|
|
175
175
|
return (
|
|
@@ -204,7 +204,7 @@ SelectItem.displayName = SelectPrimitive.Item?.displayName || 'SelectItem';
|
|
|
204
204
|
export interface SelectSeparatorProps
|
|
205
205
|
extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>, SelectSeparatorBaseProps {}
|
|
206
206
|
|
|
207
|
-
const SelectSeparator = React.forwardRef<React.
|
|
207
|
+
const SelectSeparator = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Separator>, SelectSeparatorProps>(
|
|
208
208
|
({ className, ...props }, ref) => (
|
|
209
209
|
<SelectPrimitive.Separator
|
|
210
210
|
ref={ref}
|
package/src/separator.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { cn } from './lib/utils';
|
|
5
5
|
|
|
6
6
|
const Separator = React.forwardRef<
|
|
7
|
-
React.
|
|
7
|
+
React.ComponentRef<typeof SeparatorPrimitive.Root>,
|
|
8
8
|
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
9
9
|
>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (
|
|
10
10
|
<SeparatorPrimitive.Root
|
package/src/sheet.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const SheetClose = DialogPrimitive.Close;
|
|
|
16
16
|
|
|
17
17
|
const SheetPortal = DialogPrimitive.Portal;
|
|
18
18
|
|
|
19
|
-
export type SheetOverlayRef = React.
|
|
19
|
+
export type SheetOverlayRef = React.ComponentRef<typeof DialogPrimitive.Overlay>;
|
|
20
20
|
export type SheetOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
21
21
|
const SheetOverlay: React.ForwardRefExoticComponent<SheetOverlayProps & React.RefAttributes<SheetOverlayRef>> =
|
|
22
22
|
React.forwardRef<SheetOverlayRef, SheetOverlayProps>(({ className, ...props }, ref) => {
|
|
@@ -37,7 +37,7 @@ const SheetOverlay: React.ForwardRefExoticComponent<SheetOverlayProps & React.Re
|
|
|
37
37
|
});
|
|
38
38
|
SheetOverlay.displayName = DialogPrimitive.Overlay?.displayName || 'SheetOverlay';
|
|
39
39
|
|
|
40
|
-
export type SheetContentRef = React.
|
|
40
|
+
export type SheetContentRef = React.ComponentRef<typeof DialogPrimitive.Content>;
|
|
41
41
|
export type SheetContentProps = DialogContentProps & {
|
|
42
42
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
43
43
|
overlayClassName?: string;
|
|
@@ -99,7 +99,7 @@ const SheetFooter = ({ className, ...props }: React.ComponentPropsWithoutRef<typ
|
|
|
99
99
|
);
|
|
100
100
|
SheetFooter.displayName = 'SheetFooter';
|
|
101
101
|
|
|
102
|
-
export type SheetTitleRef = React.
|
|
102
|
+
export type SheetTitleRef = React.ComponentRef<typeof DialogPrimitive.Title>;
|
|
103
103
|
export type SheetTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
104
104
|
const SheetTitle: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAttributes<SheetTitleRef>> =
|
|
105
105
|
React.forwardRef<SheetTitleRef, SheetTitleProps>(({ className, ...props }, ref) => (
|
|
@@ -107,7 +107,7 @@ const SheetTitle: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAtt
|
|
|
107
107
|
));
|
|
108
108
|
SheetTitle.displayName = DialogPrimitive.Title?.displayName || 'SheetTitle';
|
|
109
109
|
|
|
110
|
-
export type SheetDescriptionRef = React.
|
|
110
|
+
export type SheetDescriptionRef = React.ComponentRef<typeof DialogPrimitive.Description>;
|
|
111
111
|
export type SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
112
112
|
const SheetDescription: React.ForwardRefExoticComponent<
|
|
113
113
|
SheetDescriptionProps & React.RefAttributes<SheetDescriptionRef>
|
package/src/switch.tsx
CHANGED
|
@@ -9,7 +9,7 @@ export interface SwitchProps
|
|
|
9
9
|
Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, 'checked' | 'onCheckedChange'>,
|
|
10
10
|
SwitchBaseProps {}
|
|
11
11
|
|
|
12
|
-
const Switch = React.forwardRef<React.
|
|
12
|
+
const Switch = React.forwardRef<React.ComponentRef<typeof SwitchPrimitive.Root>, SwitchProps>(
|
|
13
13
|
({ className, checked, onCheckedChange, ...props }, ref) => (
|
|
14
14
|
<SwitchPrimitive.Root
|
|
15
15
|
className={cn(
|
package/src/table.tsx
CHANGED
|
@@ -4,31 +4,31 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { cn } from './lib/utils';
|
|
5
5
|
import { Text } from './text';
|
|
6
6
|
|
|
7
|
-
const Table = React.forwardRef<React.
|
|
7
|
+
const Table = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
8
8
|
({ className, ...props }, ref) => (
|
|
9
9
|
<View ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
|
|
10
10
|
),
|
|
11
11
|
);
|
|
12
12
|
Table.displayName = 'Table';
|
|
13
13
|
|
|
14
|
-
const TableHeader = React.forwardRef<React.
|
|
14
|
+
const TableHeader = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
15
15
|
({ className, ...props }, ref) => <View ref={ref} className={cn('border-border border-b', className)} {...props} />,
|
|
16
16
|
);
|
|
17
17
|
TableHeader.displayName = 'TableHeader';
|
|
18
18
|
|
|
19
|
-
const TableBody = React.forwardRef<React.
|
|
19
|
+
const TableBody = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
20
20
|
({ className, ...props }, ref) => <View ref={ref} className={cn('flex-1', className)} {...props} />,
|
|
21
21
|
);
|
|
22
22
|
TableBody.displayName = 'TableBody';
|
|
23
23
|
|
|
24
|
-
const TableFooter = React.forwardRef<React.
|
|
24
|
+
const TableFooter = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
25
25
|
({ className, ...props }, ref) => (
|
|
26
26
|
<View ref={ref} className={cn('bg-muted/50 font-medium [&>tr]:last:border-b-0', className)} {...props} />
|
|
27
27
|
),
|
|
28
28
|
);
|
|
29
29
|
TableFooter.displayName = 'TableFooter';
|
|
30
30
|
|
|
31
|
-
const TableRow = React.forwardRef<React.
|
|
31
|
+
const TableRow = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
32
32
|
({ className, ...props }, ref) => (
|
|
33
33
|
<View
|
|
34
34
|
ref={ref}
|
|
@@ -42,7 +42,7 @@ const TableRow = React.forwardRef<React.ElementRef<typeof View>, React.Component
|
|
|
42
42
|
);
|
|
43
43
|
TableRow.displayName = 'TableRow';
|
|
44
44
|
|
|
45
|
-
const TableHead = React.forwardRef<React.
|
|
45
|
+
const TableHead = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
46
46
|
({ className, ...props }, ref) => (
|
|
47
47
|
<Text
|
|
48
48
|
ref={ref}
|
|
@@ -56,14 +56,14 @@ const TableHead = React.forwardRef<React.ElementRef<typeof Text>, React.Componen
|
|
|
56
56
|
);
|
|
57
57
|
TableHead.displayName = 'TableHead';
|
|
58
58
|
|
|
59
|
-
const TableCell = React.forwardRef<React.
|
|
59
|
+
const TableCell = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
60
60
|
({ className, ...props }, ref) => (
|
|
61
61
|
<Text ref={ref} className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)} {...props} />
|
|
62
62
|
),
|
|
63
63
|
);
|
|
64
64
|
TableCell.displayName = 'TableCell';
|
|
65
65
|
|
|
66
|
-
const TableCaption = React.forwardRef<React.
|
|
66
|
+
const TableCaption = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
67
67
|
({ className, ...props }, ref) => (
|
|
68
68
|
<Text ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />
|
|
69
69
|
),
|
package/src/tabs.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { cn } from './lib/utils';
|
|
6
6
|
import { TextClassContext } from './text';
|
|
7
7
|
|
|
8
|
-
const Tabs = React.forwardRef<React.
|
|
8
|
+
const Tabs = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Root>, TabsProps>((props, ref) => (
|
|
9
9
|
<TabsPrimitive.Root ref={ref} {...props} />
|
|
10
10
|
));
|
|
11
11
|
Tabs.displayName = 'Tabs';
|
|
@@ -20,7 +20,7 @@ export interface TabsTriggerProps
|
|
|
20
20
|
export interface TabsContentProps
|
|
21
21
|
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, TabsContentBaseProps {}
|
|
22
22
|
|
|
23
|
-
const TabsList = React.forwardRef<React.
|
|
23
|
+
const TabsList = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.List>, TabsListProps>(
|
|
24
24
|
({ className, ...props }, ref) => (
|
|
25
25
|
<TabsPrimitive.List
|
|
26
26
|
ref={ref}
|
|
@@ -34,7 +34,7 @@ const TabsList = React.forwardRef<React.ElementRef<typeof TabsPrimitive.List>, T
|
|
|
34
34
|
);
|
|
35
35
|
TabsList.displayName = TabsPrimitive.List?.displayName || 'TabsList';
|
|
36
36
|
|
|
37
|
-
const TabsTrigger = React.forwardRef<React.
|
|
37
|
+
const TabsTrigger = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Trigger>, TabsTriggerProps>(
|
|
38
38
|
({ className, ...props }, ref) => {
|
|
39
39
|
const { value } = TabsPrimitive.useRootContext();
|
|
40
40
|
return (
|
|
@@ -60,7 +60,7 @@ const TabsTrigger = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigg
|
|
|
60
60
|
);
|
|
61
61
|
TabsTrigger.displayName = TabsPrimitive.Trigger?.displayName || 'TabsTrigger';
|
|
62
62
|
|
|
63
|
-
const TabsContent = React.forwardRef<React.
|
|
63
|
+
const TabsContent = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Content>, TabsContentProps>(
|
|
64
64
|
({ className, ...props }, ref) => (
|
|
65
65
|
<TabsPrimitive.Content
|
|
66
66
|
ref={ref}
|
package/src/text.tsx
CHANGED
|
@@ -29,7 +29,7 @@ const textVariants = cva('text-foreground', {
|
|
|
29
29
|
export interface TextProps
|
|
30
30
|
extends React.ComponentPropsWithoutRef<typeof RNText>, VariantProps<typeof textVariants>, TextBaseProps {}
|
|
31
31
|
|
|
32
|
-
const Text = React.forwardRef<React.
|
|
32
|
+
const Text = React.forwardRef<React.ComponentRef<typeof RNText>, TextProps>(
|
|
33
33
|
({ className, variant = 'body', children, ...props }, ref) => {
|
|
34
34
|
return (
|
|
35
35
|
<RNText ref={ref} className={cn(textVariants({ variant, className }))} {...props}>
|
package/src/textarea.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { cn } from './lib/utils';
|
|
|
5
5
|
|
|
6
6
|
export type TextareaProps = React.ComponentPropsWithoutRef<typeof TextInput>;
|
|
7
7
|
|
|
8
|
-
const Textarea = React.forwardRef<React.
|
|
8
|
+
const Textarea = React.forwardRef<React.ComponentRef<typeof TextInput>, TextareaProps>(
|
|
9
9
|
({ className, placeholderClassName, ...props }, ref) => {
|
|
10
10
|
return (
|
|
11
11
|
<TextInput
|
package/src/theme-toggle.tsx
CHANGED
|
@@ -33,28 +33,31 @@ export function ThemeToggle({ variant = 'binary', onThemeChange, customTheme, cl
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const IconToggle = () => (
|
|
36
|
-
<View className="flex items-center justify-center">
|
|
37
|
-
<
|
|
38
|
-
size={18}
|
|
36
|
+
<View className="flex h-6 w-6 items-center justify-center">
|
|
37
|
+
<View
|
|
39
38
|
className={cn(
|
|
40
|
-
'
|
|
39
|
+
'items-center justify-center transition-all',
|
|
41
40
|
!isSystem && !isDark ? 'scale-100 rotate-0 opacity-100' : 'absolute scale-0 -rotate-90 opacity-0',
|
|
42
41
|
)}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
>
|
|
43
|
+
<Sun size={18} className="text-foreground" />
|
|
44
|
+
</View>
|
|
45
|
+
<View
|
|
46
46
|
className={cn(
|
|
47
|
-
'
|
|
47
|
+
'items-center justify-center transition-all',
|
|
48
48
|
!isSystem && isDark ? 'scale-100 rotate-0 opacity-100' : 'absolute scale-0 rotate-90 opacity-0',
|
|
49
49
|
)}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
>
|
|
51
|
+
<Moon size={18} className="text-foreground" />
|
|
52
|
+
</View>
|
|
53
|
+
<View
|
|
53
54
|
className={cn(
|
|
54
|
-
'
|
|
55
|
+
'items-center justify-center transition-all',
|
|
55
56
|
isSystem ? 'scale-100 rotate-0 opacity-100' : 'absolute scale-0 rotate-90 opacity-0',
|
|
56
57
|
)}
|
|
57
|
-
|
|
58
|
+
>
|
|
59
|
+
<SunMoon size={18} className="text-foreground" />
|
|
60
|
+
</View>
|
|
58
61
|
</View>
|
|
59
62
|
);
|
|
60
63
|
|
package/src/toast.tsx
CHANGED
|
@@ -11,7 +11,7 @@ const ToastProvider = ({ children }: { children: React.ReactNode }) => <>{childr
|
|
|
11
11
|
const ToastViewport = () => null;
|
|
12
12
|
|
|
13
13
|
const Toast = React.forwardRef<
|
|
14
|
-
React.
|
|
14
|
+
React.ComponentRef<typeof ToastPrimitive.Root>,
|
|
15
15
|
React.ComponentPropsWithoutRef<typeof ToastPrimitive.Root> & { variant?: 'default' | 'destructive' }
|
|
16
16
|
>(({ className, variant = 'default', ...props }, ref) => {
|
|
17
17
|
return (
|
|
@@ -33,7 +33,7 @@ const Toast = React.forwardRef<
|
|
|
33
33
|
Toast.displayName = ToastPrimitive.Root?.displayName || 'Toast';
|
|
34
34
|
|
|
35
35
|
const ToastTitle = React.forwardRef<
|
|
36
|
-
React.
|
|
36
|
+
React.ComponentRef<typeof ToastPrimitive.Title>,
|
|
37
37
|
React.ComponentPropsWithoutRef<typeof ToastPrimitive.Title>
|
|
38
38
|
>(({ className, ...props }, ref) => (
|
|
39
39
|
<ToastPrimitive.Title ref={ref} className={cn('text-foreground text-sm font-semibold', className)} {...props} />
|
|
@@ -41,7 +41,7 @@ const ToastTitle = React.forwardRef<
|
|
|
41
41
|
ToastTitle.displayName = ToastPrimitive.Title?.displayName || 'ToastTitle';
|
|
42
42
|
|
|
43
43
|
const ToastDescription = React.forwardRef<
|
|
44
|
-
React.
|
|
44
|
+
React.ComponentRef<typeof ToastPrimitive.Description>,
|
|
45
45
|
React.ComponentPropsWithoutRef<typeof ToastPrimitive.Description>
|
|
46
46
|
>(({ className, ...props }, ref) => (
|
|
47
47
|
<ToastPrimitive.Description
|
|
@@ -53,7 +53,7 @@ const ToastDescription = React.forwardRef<
|
|
|
53
53
|
ToastDescription.displayName = ToastPrimitive.Description?.displayName || 'ToastDescription';
|
|
54
54
|
|
|
55
55
|
const ToastClose = React.forwardRef<
|
|
56
|
-
React.
|
|
56
|
+
React.ComponentRef<typeof ToastPrimitive.Close>,
|
|
57
57
|
React.ComponentPropsWithoutRef<typeof ToastPrimitive.Close>
|
|
58
58
|
>(({ className, ...props }, ref) => (
|
|
59
59
|
<ToastPrimitive.Close
|
|
@@ -70,7 +70,7 @@ const ToastClose = React.forwardRef<
|
|
|
70
70
|
ToastClose.displayName = ToastPrimitive.Close?.displayName || 'ToastClose';
|
|
71
71
|
|
|
72
72
|
const ToastAction = React.forwardRef<
|
|
73
|
-
React.
|
|
73
|
+
React.ComponentRef<typeof ToastPrimitive.Action>,
|
|
74
74
|
React.ComponentPropsWithoutRef<typeof ToastPrimitive.Action>
|
|
75
75
|
>(({ className, ...props }, ref) => (
|
|
76
76
|
<ToastPrimitive.Action
|
package/src/toggle-group.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export interface ToggleGroupProps
|
|
|
17
17
|
Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>, 'value' | 'onValueChange' | 'type'>,
|
|
18
18
|
ToggleGroupBaseProps {}
|
|
19
19
|
|
|
20
|
-
const ToggleGroup = React.forwardRef<React.
|
|
20
|
+
const ToggleGroup = React.forwardRef<React.ComponentRef<typeof ToggleGroupPrimitive.Root>, ToggleGroupProps>(
|
|
21
21
|
({ className, variant, size, children, type, value, onValueChange, ...props }, ref) => (
|
|
22
22
|
<ToggleGroupPrimitive.Root
|
|
23
23
|
ref={ref}
|
|
@@ -41,7 +41,7 @@ export interface ToggleGroupItemProps
|
|
|
41
41
|
Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>, 'children' | 'disabled'>,
|
|
42
42
|
ToggleGroupItemBaseProps {}
|
|
43
43
|
|
|
44
|
-
const ToggleGroupItem = React.forwardRef<React.
|
|
44
|
+
const ToggleGroupItem = React.forwardRef<React.ComponentRef<typeof ToggleGroupPrimitive.Item>, ToggleGroupItemProps>(
|
|
45
45
|
({ className, children, variant, size, value, ...props }, ref) => {
|
|
46
46
|
const context = React.useContext(ToggleGroupContext);
|
|
47
47
|
|
package/src/toggle.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export interface ToggleProps
|
|
|
10
10
|
Omit<React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, 'pressed' | 'onPressedChange' | 'children'>,
|
|
11
11
|
ToggleBaseProps {}
|
|
12
12
|
|
|
13
|
-
const Toggle = React.forwardRef<React.
|
|
13
|
+
const Toggle = React.forwardRef<React.ComponentRef<typeof TogglePrimitive.Root>, ToggleProps>(
|
|
14
14
|
({ className, variant, size, ...props }, ref) => (
|
|
15
15
|
<TextClassContext.Provider
|
|
16
16
|
value={cn(
|
package/src/tooltip.tsx
CHANGED
|
@@ -12,10 +12,10 @@ const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
|
12
12
|
|
|
13
13
|
const TooltipContent: React.ForwardRefExoticComponent<
|
|
14
14
|
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & { portalHost?: string } & React.RefAttributes<
|
|
15
|
-
React.
|
|
15
|
+
React.ComponentRef<typeof TooltipPrimitive.Content>
|
|
16
16
|
>
|
|
17
17
|
> = React.forwardRef<
|
|
18
|
-
React.
|
|
18
|
+
React.ComponentRef<typeof TooltipPrimitive.Content>,
|
|
19
19
|
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
20
20
|
portalHost?: string;
|
|
21
21
|
}
|