@gv-tech/ui-native 2.29.0 → 2.29.1

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 (103) hide show
  1. package/dist/__contracts.d.ts +0 -1
  2. package/dist/__contracts.d.ts.map +1 -1
  3. package/dist/aspect-ratio.d.ts.map +1 -1
  4. package/dist/breadcrumb.d.ts.map +1 -1
  5. package/dist/button-group.d.ts +3 -3
  6. package/dist/button-group.d.ts.map +1 -1
  7. package/dist/button.d.ts.map +1 -1
  8. package/dist/calendar.d.ts.map +1 -1
  9. package/dist/carousel.d.ts.map +1 -1
  10. package/dist/collapsible.d.ts.map +1 -1
  11. package/dist/combobox.d.ts +2 -2
  12. package/dist/combobox.d.ts.map +1 -1
  13. package/dist/command.d.ts.map +1 -1
  14. package/dist/direction.d.ts +1 -1
  15. package/dist/empty.d.ts +1 -1
  16. package/dist/empty.d.ts.map +1 -1
  17. package/dist/field.d.ts +1 -1
  18. package/dist/field.d.ts.map +1 -1
  19. package/dist/hooks/use-theme.d.ts.map +1 -1
  20. package/dist/hooks/use-toast.d.ts.map +1 -1
  21. package/dist/input-group.d.ts +2 -2
  22. package/dist/input-group.d.ts.map +1 -1
  23. package/dist/input-otp.d.ts +1 -1
  24. package/dist/input-otp.d.ts.map +1 -1
  25. package/dist/item.d.ts +10 -10
  26. package/dist/item.d.ts.map +1 -1
  27. package/dist/kbd.d.ts.map +1 -1
  28. package/dist/native-select.d.ts +1 -1
  29. package/dist/native-select.d.ts.map +1 -1
  30. package/dist/pagination.d.ts +2 -2
  31. package/dist/pagination.d.ts.map +1 -1
  32. package/dist/scroll-area.d.ts.map +1 -1
  33. package/dist/scroll-to-top.d.ts +6 -5
  34. package/dist/scroll-to-top.d.ts.map +1 -1
  35. package/dist/search.d.ts.map +1 -1
  36. package/dist/sidebar.d.ts +8 -8
  37. package/dist/sidebar.d.ts.map +1 -1
  38. package/dist/skeleton.d.ts.map +1 -1
  39. package/dist/slider.d.ts.map +1 -1
  40. package/dist/sonner.d.ts.map +1 -1
  41. package/dist/spinner.d.ts +1 -1
  42. package/dist/spinner.d.ts.map +1 -1
  43. package/dist/table-of-contents.d.ts +5 -13
  44. package/dist/table-of-contents.d.ts.map +1 -1
  45. package/dist/theme-provider.d.ts.map +1 -1
  46. package/dist/theme-toggle.d.ts +1 -1
  47. package/dist/theme-toggle.d.ts.map +1 -1
  48. package/dist/toaster.d.ts.map +1 -1
  49. package/dist/ui-native.cjs +2 -2
  50. package/dist/ui-native.esm.js +275 -270
  51. package/package.json +18 -18
  52. package/src/__contracts.ts +321 -324
  53. package/src/aspect-ratio.tsx +1 -0
  54. package/src/badge.tsx +3 -3
  55. package/src/breadcrumb.tsx +2 -8
  56. package/src/button-group.tsx +8 -3
  57. package/src/button.tsx +4 -3
  58. package/src/calendar.tsx +8 -5
  59. package/src/card.tsx +1 -1
  60. package/src/carousel.tsx +6 -23
  61. package/src/collapsible.tsx +1 -1
  62. package/src/combobox.tsx +8 -8
  63. package/src/command.tsx +1 -0
  64. package/src/context-menu.tsx +1 -0
  65. package/src/dialog.tsx +1 -1
  66. package/src/drawer.tsx +1 -0
  67. package/src/dropdown-menu.tsx +1 -0
  68. package/src/empty.tsx +6 -1
  69. package/src/field.tsx +2 -1
  70. package/src/form.tsx +9 -9
  71. package/src/hooks/use-theme.ts +1 -0
  72. package/src/hooks/use-toast.ts +1 -0
  73. package/src/hover-card.tsx +1 -0
  74. package/src/input-group.tsx +7 -2
  75. package/src/input-otp.tsx +6 -1
  76. package/src/input.tsx +1 -1
  77. package/src/item.tsx +9 -3
  78. package/src/kbd.tsx +1 -0
  79. package/src/menubar.tsx +1 -0
  80. package/src/native-select.tsx +2 -1
  81. package/src/navigation-menu.tsx +18 -6
  82. package/src/pagination.tsx +5 -2
  83. package/src/popover.tsx +1 -1
  84. package/src/progress.tsx +1 -2
  85. package/src/radio-group.tsx +1 -1
  86. package/src/scroll-area.tsx +1 -0
  87. package/src/scroll-to-top.tsx +10 -9
  88. package/src/search.tsx +2 -1
  89. package/src/select.tsx +1 -1
  90. package/src/sidebar.tsx +20 -19
  91. package/src/skeleton.tsx +4 -2
  92. package/src/slider.tsx +2 -1
  93. package/src/sonner.tsx +1 -0
  94. package/src/spinner.tsx +4 -1
  95. package/src/switch.tsx +1 -1
  96. package/src/table-of-contents.tsx +9 -25
  97. package/src/tabs.tsx +2 -2
  98. package/src/text.tsx +3 -3
  99. package/src/theme-provider.tsx +3 -1
  100. package/src/theme-toggle.tsx +32 -29
  101. package/src/toaster.tsx +1 -0
  102. package/src/toggle-group.tsx +2 -2
  103. package/src/toggle.tsx +3 -2
package/src/badge.tsx CHANGED
@@ -7,9 +7,9 @@ import { cn } from './lib/utils';
7
7
  const badgeVariants = cva('flex-row items-center rounded-md border px-2 py-0.5', {
8
8
  variants: {
9
9
  variant: {
10
- default: 'border-transparent bg-primary',
11
- secondary: 'border-transparent bg-secondary',
12
- destructive: 'border-transparent bg-destructive',
10
+ default: 'bg-primary border-transparent',
11
+ secondary: 'bg-secondary border-transparent',
12
+ destructive: 'bg-destructive border-transparent',
13
13
  outline: 'border-border bg-transparent',
14
14
  },
15
15
  },
@@ -11,6 +11,7 @@ import { Slot } from '@rn-primitives/slot';
11
11
  import { ChevronRight, MoreHorizontal } from 'lucide-react-native';
12
12
  import * as React from 'react';
13
13
  import { Pressable, View } from 'react-native';
14
+
14
15
  import { wrapTextChildren } from './lib/render-native';
15
16
  import { cn } from './lib/utils';
16
17
  import { Text } from './text';
@@ -85,14 +86,7 @@ BreadcrumbLink.displayName = 'BreadcrumbLink';
85
86
  export const BreadcrumbPage = React.forwardRef<View, BreadcrumbPageBaseProps>(
86
87
  ({ className, children, ...props }, ref) => {
87
88
  return (
88
- <View
89
- ref={ref}
90
- role="link"
91
- aria-disabled={true}
92
- aria-current="page"
93
- className={cn('flex flex-row items-center', className)}
94
- {...props}
95
- >
89
+ <View ref={ref} aria-current="page" className={cn('flex flex-row items-center', className)} {...props}>
96
90
  {wrapTextChildren(children, Text, {
97
91
  className: 'text-foreground text-sm font-normal',
98
92
  })}
@@ -1,16 +1,21 @@
1
1
  import type { ButtonGroupBaseProps, ButtonGroupSeparatorBaseProps, ButtonGroupTextBaseProps } from '@gv-tech/ui-core';
2
2
  import * as React from 'react';
3
3
  import { Text, View } from 'react-native';
4
+
4
5
  import { cn } from './lib/utils';
5
6
 
6
7
  // TODO: Implement proper React Native ButtonGroup logic
7
- function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<typeof View> & ButtonGroupBaseProps) {
8
+ function ButtonGroup({
9
+ className,
10
+ orientation: _orientation,
11
+ ...props
12
+ }: React.ComponentProps<typeof View> & ButtonGroupBaseProps) {
8
13
  return <View className={cn('flex flex-row', className)} {...props} />;
9
14
  }
10
15
 
11
16
  function ButtonGroupText({
12
17
  className,
13
- asChild,
18
+ asChild: _asChild,
14
19
  ...props
15
20
  }: React.ComponentProps<typeof Text> & ButtonGroupTextBaseProps) {
16
21
  return <Text className={cn('text-sm font-medium', className)} {...props} />;
@@ -18,7 +23,7 @@ function ButtonGroupText({
18
23
 
19
24
  function ButtonGroupSeparator({
20
25
  className,
21
- orientation,
26
+ orientation: _orientation,
22
27
  ...props
23
28
  }: React.ComponentProps<typeof View> & ButtonGroupSeparatorBaseProps) {
24
29
  return <View className={cn('bg-border h-full w-px', className)} {...props} />;
package/src/button.tsx CHANGED
@@ -1,8 +1,9 @@
1
+ import type { ButtonBaseProps } from '@gv-tech/ui-core';
1
2
  import { cva } from 'class-variance-authority';
2
3
  import * as React from 'react';
3
- import { Pressable, Text, View } from 'react-native';
4
+ import type { View } from 'react-native';
5
+ import { Pressable, Text } from 'react-native';
4
6
 
5
- import type { ButtonBaseProps } from '@gv-tech/ui-core';
6
7
  import { wrapTextChildren } from './lib/render-native';
7
8
  import { cn } from './lib/utils';
8
9
 
@@ -13,7 +14,7 @@ const buttonVariants = cva(
13
14
  variant: {
14
15
  default: 'bg-primary shadow-sm',
15
16
  destructive: 'bg-destructive shadow-sm',
16
- outline: 'border border-input bg-transparent shadow-sm',
17
+ outline: 'border-input border bg-transparent shadow-sm',
17
18
  secondary: 'bg-secondary shadow-sm',
18
19
  ghost: 'bg-transparent',
19
20
  link: 'bg-transparent',
package/src/calendar.tsx CHANGED
@@ -2,6 +2,7 @@ import type { CalendarBaseProps } from '@gv-tech/ui-core';
2
2
  import DateTimePicker from '@react-native-community/datetimepicker';
3
3
  import * as React from 'react';
4
4
  import { View } from 'react-native';
5
+
5
6
  import { cn } from './lib/utils';
6
7
 
7
8
  export type CalendarProps = Omit<
@@ -14,16 +15,18 @@ export type CalendarProps = Omit<
14
15
  };
15
16
 
16
17
  export const Calendar = React.forwardRef<View, CalendarProps>(
17
- ({ className, value, onChange, showOutsideDays, ...props }, ref) => {
18
+ ({ className, value, onChange, showOutsideDays: _showOutsideDays, ...props }, ref) => {
18
19
  // If no value is provided, default to current date so the picker doesn't crash
19
- const [date, setDate] = React.useState<Date>(value || new Date());
20
+ const [date, setDate] = React.useState<Date>(() => value ?? new Date());
21
+ const [prevValue, setPrevValue] = React.useState(value);
20
22
 
21
- // Sync internal state if external value changes
22
- React.useEffect(() => {
23
+ // Sync internal state if external value changes (adjust during render)
24
+ if (value !== prevValue) {
25
+ setPrevValue(value);
23
26
  if (value) {
24
27
  setDate(value);
25
28
  }
26
- }, [value]);
29
+ }
27
30
 
28
31
  const handleValueChange = (event: unknown, selectedDate: Date) => {
29
32
  setDate(selectedDate);
package/src/card.tsx CHANGED
@@ -1,7 +1,7 @@
1
+ import type { CardBaseProps } from '@gv-tech/ui-core';
1
2
  import * as React from 'react';
2
3
  import { Text, View } from 'react-native';
3
4
 
4
- import type { CardBaseProps } from '@gv-tech/ui-core';
5
5
  import { wrapTextChildren } from './lib/render-native';
6
6
  import { cn } from './lib/utils';
7
7
 
package/src/carousel.tsx CHANGED
@@ -7,14 +7,8 @@ import type {
7
7
  } from '@gv-tech/ui-core';
8
8
  import { ArrowLeft, ArrowRight } from 'lucide-react-native';
9
9
  import * as React from 'react';
10
- import {
11
- Dimensions,
12
- ScrollView,
13
- View,
14
- type LayoutChangeEvent,
15
- type NativeScrollEvent,
16
- type NativeSyntheticEvent,
17
- } from 'react-native';
10
+ import { Dimensions, ScrollView, View, type LayoutChangeEvent } from 'react-native';
11
+
18
12
  import { Button } from './button';
19
13
  import { cn } from './lib/utils';
20
14
  type CarouselApi = unknown;
@@ -47,12 +41,12 @@ export type CarouselProps = CarouselBaseProps & {
47
41
  };
48
42
 
49
43
  export const Carousel = React.forwardRef<View, CarouselProps>(
50
- ({ children, className, opts, orientation = 'horizontal', setApi, plugins, ...props }, ref) => {
44
+ ({ children, className, opts: _opts, orientation = 'horizontal', setApi, plugins: _plugins, ...props }, ref) => {
51
45
  const scrollRef = React.useRef<ScrollView>(null) as React.RefObject<ScrollView>;
52
- const [canScrollNext, setCanScrollNext] = React.useState(true);
53
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
46
+ const [canScrollNext] = React.useState(true);
47
+ const [canScrollPrev] = React.useState(false);
54
48
  const [itemWidth, setItemWidth] = React.useState(Dimensions.get('window').width);
55
- const [currentIndex, setCurrentIndex] = React.useState(0);
49
+ const [currentIndex] = React.useState(0);
56
50
 
57
51
  const scrollNext = React.useCallback(() => {
58
52
  scrollRef.current?.scrollTo({ x: (currentIndex + 1) * itemWidth, animated: true });
@@ -76,17 +70,6 @@ export const Carousel = React.forwardRef<View, CarouselProps>(
76
70
  }
77
71
  }, [setApi, scrollNext, scrollPrev, canScrollNext, canScrollPrev]);
78
72
 
79
- const _handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
80
- const offsetX = event.nativeEvent.contentOffset.x;
81
- const contentWidth = event.nativeEvent.contentSize.width;
82
- const layoutWidth = event.nativeEvent.layoutMeasurement.width;
83
-
84
- const newIndex = Math.round(offsetX / itemWidth);
85
- setCurrentIndex(newIndex);
86
- setCanScrollPrev(offsetX > 0);
87
- setCanScrollNext(offsetX + layoutWidth < contentWidth);
88
- };
89
-
90
73
  return (
91
74
  <CarouselContext.Provider
92
75
  value={{
@@ -1,4 +1,4 @@
1
- import { CollapsibleBaseProps, CollapsibleContentBaseProps, CollapsibleTriggerBaseProps } from '@gv-tech/ui-core';
1
+ import type { CollapsibleBaseProps, CollapsibleContentBaseProps, CollapsibleTriggerBaseProps } from '@gv-tech/ui-core';
2
2
  import * as CollapsiblePrimitive from '@rn-primitives/collapsible';
3
3
 
4
4
  const Collapsible: typeof CollapsiblePrimitive.Root = CollapsiblePrimitive.Root;
package/src/combobox.tsx CHANGED
@@ -18,6 +18,7 @@ import type {
18
18
  import { Check, ChevronDown, X } from 'lucide-react-native';
19
19
  import * as React from 'react';
20
20
  import { Pressable, TextInput, View } from 'react-native';
21
+
21
22
  import { Dialog, DialogContent, DialogTrigger } from './dialog';
22
23
  import { wrapTextChildren } from './lib/render-native';
23
24
  import { cn } from './lib/utils';
@@ -116,8 +117,8 @@ function ComboboxClear({
116
117
 
117
118
  function ComboboxInput({
118
119
  className,
119
- showClear,
120
- showTrigger,
120
+ showClear: _showClear,
121
+ showTrigger: _showTrigger,
121
122
  placeholder = 'Search...',
122
123
  ...props
123
124
  }: React.ComponentProps<typeof TextInput> & ComboboxInputBaseProps) {
@@ -130,7 +131,6 @@ function ComboboxInput({
130
131
  placeholderTextColor="#a1a1aa"
131
132
  value={searchQuery}
132
133
  onChangeText={setSearchQuery}
133
- autoFocus
134
134
  {...props}
135
135
  />
136
136
  </View>
@@ -139,11 +139,11 @@ function ComboboxInput({
139
139
 
140
140
  function ComboboxContent({
141
141
  className,
142
- side,
143
- sideOffset,
144
- align,
145
- alignOffset,
146
- anchor,
142
+ side: _side,
143
+ sideOffset: _sideOffset,
144
+ align: _align,
145
+ alignOffset: _alignOffset,
146
+ anchor: _anchor,
147
147
  ...props
148
148
  }: React.ComponentProps<typeof View> & ComboboxContentBaseProps) {
149
149
  return (
package/src/command.tsx CHANGED
@@ -10,6 +10,7 @@ import type {
10
10
  } from '@gv-tech/ui-core';
11
11
  import * as React from 'react';
12
12
  import { View } from 'react-native';
13
+
13
14
  import { wrapTextChildren } from './lib/render-native';
14
15
 
15
16
  export const Command: React.FC<CommandBaseProps> = ({ children, className }) => {
@@ -14,6 +14,7 @@ import { Check, ChevronRight, Circle } from 'lucide-react-native';
14
14
  import * as React from 'react';
15
15
  import { Platform, StyleSheet, View } from 'react-native';
16
16
  import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
17
+
17
18
  import { wrapTextChildren } from './lib/render-native';
18
19
  import { cn } from './lib/utils';
19
20
  import { Text } from './text';
package/src/dialog.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { DialogBaseProps, DialogContentBaseProps } from '@gv-tech/ui-core';
1
+ import type { DialogBaseProps, DialogContentBaseProps } from '@gv-tech/ui-core';
2
2
  import * as DialogPrimitive from '@rn-primitives/dialog';
3
3
  import { X } from 'lucide-react-native';
4
4
  import * as React from 'react';
package/src/drawer.tsx CHANGED
@@ -12,6 +12,7 @@ import * as DialogPrimitive from '@rn-primitives/dialog';
12
12
  import * as React from 'react';
13
13
  import { Platform, View, type StyleProp, type ViewStyle } from 'react-native';
14
14
  import Animated, { FadeIn, FadeOut, SlideInDown, SlideOutDown } from 'react-native-reanimated';
15
+
15
16
  import { wrapTextChildren } from './lib/render-native';
16
17
  import { cn } from './lib/utils';
17
18
 
@@ -15,6 +15,7 @@ import { Check, ChevronRight, Circle } from 'lucide-react-native';
15
15
  import * as React from 'react';
16
16
  import { Platform, StyleSheet, View } from 'react-native';
17
17
  import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
18
+
18
19
  import { wrapTextChildren } from './lib/render-native';
19
20
  import { cn } from './lib/utils';
20
21
  import { Text } from './text';
package/src/empty.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { EmptyBaseProps, EmptyMediaBaseProps } from '@gv-tech/ui-core';
2
2
  import * as React from 'react';
3
3
  import { Text, View } from 'react-native';
4
+
4
5
  import { cn } from './lib/utils';
5
6
 
6
7
  function Empty({ className, ...props }: React.ComponentProps<typeof View> & EmptyBaseProps) {
@@ -19,7 +20,11 @@ function EmptyHeader({ className, ...props }: React.ComponentProps<typeof View>)
19
20
  return <View className={cn('flex flex-col items-center gap-2', className)} {...props} />;
20
21
  }
21
22
 
22
- function EmptyMedia({ className, variant, ...props }: React.ComponentProps<typeof View> & EmptyMediaBaseProps) {
23
+ function EmptyMedia({
24
+ className,
25
+ variant: _variant,
26
+ ...props
27
+ }: React.ComponentProps<typeof View> & EmptyMediaBaseProps) {
23
28
  return <View className={cn('flex items-center justify-center', className)} {...props} />;
24
29
  }
25
30
 
package/src/field.tsx CHANGED
@@ -12,9 +12,10 @@ import type {
12
12
  } from '@gv-tech/ui-core';
13
13
  import * as React from 'react';
14
14
  import { Text, View } from 'react-native';
15
+
15
16
  import { cn } from './lib/utils';
16
17
 
17
- function Field({ className, orientation, ...props }: React.ComponentProps<typeof View> & FieldBaseProps) {
18
+ function Field({ className, orientation: _orientation, ...props }: React.ComponentProps<typeof View> & FieldBaseProps) {
18
19
  return <View className={cn('flex flex-col gap-2', className)} {...props} />;
19
20
  }
20
21
 
package/src/form.tsx CHANGED
@@ -1,3 +1,12 @@
1
+ import type {
2
+ FormControlBaseProps,
3
+ FormDescriptionBaseProps,
4
+ FormItemBaseProps,
5
+ FormLabelBaseProps,
6
+ FormMessageBaseProps,
7
+ } from '@gv-tech/ui-core';
8
+ // Assuming we have Slot from @rn-primitives/slot
9
+ import * as Slot from '@rn-primitives/slot';
1
10
  import * as React from 'react';
2
11
  import {
3
12
  Controller,
@@ -9,17 +18,8 @@ import {
9
18
  } from 'react-hook-form';
10
19
  import { Text, View } from 'react-native';
11
20
 
12
- import {
13
- FormControlBaseProps,
14
- FormDescriptionBaseProps,
15
- FormItemBaseProps,
16
- FormLabelBaseProps,
17
- FormMessageBaseProps,
18
- } from '@gv-tech/ui-core';
19
21
  import { Label } from './label';
20
22
  import { cn } from './lib/utils';
21
- // Assuming we have Slot from @rn-primitives/slot
22
- import * as Slot from '@rn-primitives/slot';
23
23
 
24
24
  const Form = FormProvider;
25
25
 
@@ -1,6 +1,7 @@
1
1
  import { theme as designTokens } from '@gv-tech/design-tokens';
2
2
  import * as React from 'react';
3
3
  import { useColorScheme } from 'react-native';
4
+
4
5
  import { ThemeContext } from '../theme-provider';
5
6
 
6
7
  export function useTheme() {
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+
2
3
  import type { ToastProps } from '../toast';
3
4
 
4
5
  const TOAST_LIMIT = 5;
@@ -1,6 +1,7 @@
1
1
  import type { HoverCardContentBaseProps } from '@gv-tech/ui-core';
2
2
  import * as HoverCardPrimitive from '@rn-primitives/hover-card';
3
3
  import * as React from 'react';
4
+
4
5
  import { cn } from './lib/utils';
5
6
 
6
7
  export const HoverCard = HoverCardPrimitive.Root;
@@ -8,6 +8,7 @@ import type {
8
8
  } from '@gv-tech/ui-core';
9
9
  import * as React from 'react';
10
10
  import { Text, TextInput, View } from 'react-native';
11
+
11
12
  import { Button } from './button';
12
13
  import { cn } from './lib/utils';
13
14
 
@@ -15,13 +16,17 @@ function InputGroup({ className, ...props }: React.ComponentProps<typeof View> &
15
16
  return <View className={cn('border-input flex flex-row items-center rounded-md border', className)} {...props} />;
16
17
  }
17
18
 
18
- function InputGroupAddon({ className, align, ...props }: React.ComponentProps<typeof View> & InputGroupAddonBaseProps) {
19
+ function InputGroupAddon({
20
+ className,
21
+ align: _align,
22
+ ...props
23
+ }: React.ComponentProps<typeof View> & InputGroupAddonBaseProps) {
19
24
  return <View className={cn('p-2', className)} {...props} />;
20
25
  }
21
26
 
22
27
  function InputGroupButton({
23
28
  className,
24
- type,
29
+ type: _type,
25
30
  variant,
26
31
  size,
27
32
  ...props
package/src/input-otp.tsx CHANGED
@@ -6,6 +6,7 @@ import type {
6
6
  } from '@gv-tech/ui-core';
7
7
  import * as React from 'react';
8
8
  import { Text, View } from 'react-native';
9
+
9
10
  import { cn } from './lib/utils';
10
11
 
11
12
  function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof View> & InputOTPBaseProps) {
@@ -23,7 +24,11 @@ function InputOTPGroup({ className, ...props }: React.ComponentProps<typeof View
23
24
  return <View className={className} {...props} />;
24
25
  }
25
26
 
26
- function InputOTPSlot({ className, index, ...props }: React.ComponentProps<typeof View> & InputOTPSlotBaseProps) {
27
+ function InputOTPSlot({
28
+ className,
29
+ index: _index,
30
+ ...props
31
+ }: React.ComponentProps<typeof View> & InputOTPSlotBaseProps) {
27
32
  return <View className={className} {...props} />;
28
33
  }
29
34
 
package/src/input.tsx CHANGED
@@ -1,7 +1,7 @@
1
+ import type { InputBaseProps } from '@gv-tech/ui-core';
1
2
  import * as React from 'react';
2
3
  import { TextInput } from 'react-native';
3
4
 
4
- import type { InputBaseProps } from '@gv-tech/ui-core';
5
5
  import { cn } from './lib/utils';
6
6
 
7
7
  export interface InputProps extends React.ComponentPropsWithoutRef<typeof TextInput>, InputBaseProps {}
package/src/item.tsx CHANGED
@@ -11,10 +11,16 @@ import type {
11
11
  ItemTitleBaseProps,
12
12
  } from '@gv-tech/ui-core';
13
13
  import { View } from 'react-native';
14
+
14
15
  import { cn } from './lib/utils';
15
16
  import { Text } from './text';
16
17
 
17
- function Item({ className, variant, size, ...props }: React.ComponentProps<typeof View> & ItemBaseProps) {
18
+ function Item({
19
+ className,
20
+ variant: _variant,
21
+ size: _size,
22
+ ...props
23
+ }: React.ComponentProps<typeof View> & ItemBaseProps) {
18
24
  return (
19
25
  <View className={cn('flex flex-row flex-wrap items-center gap-2 rounded-lg border p-3', className)} {...props} />
20
26
  );
@@ -44,13 +50,13 @@ function ItemHeader({ className, ...props }: React.ComponentProps<typeof View> &
44
50
  return <View className={cn('flex w-full flex-row items-center justify-between gap-2', className)} {...props} />;
45
51
  }
46
52
 
47
- function ItemMedia({ className, variant, ...props }: React.ComponentProps<typeof View> & ItemMediaBaseProps) {
53
+ function ItemMedia({ className, variant: _variant, ...props }: React.ComponentProps<typeof View> & ItemMediaBaseProps) {
48
54
  return <View className={cn('flex shrink-0 items-center justify-center gap-2', className)} {...props} />;
49
55
  }
50
56
 
51
57
  function ItemSeparator({
52
58
  className,
53
- orientation,
59
+ orientation: _orientation,
54
60
  ...props
55
61
  }: React.ComponentProps<typeof View> & ItemSeparatorBaseProps) {
56
62
  return <View className={cn('bg-border my-2 h-px w-full', className)} {...props} />;
package/src/kbd.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { KbdBaseProps, KbdGroupBaseProps } from '@gv-tech/ui-core';
2
2
  import * as React from 'react';
3
3
  import { Text, View } from 'react-native';
4
+
4
5
  import { cn } from './lib/utils';
5
6
 
6
7
  function Kbd({ className, ...props }: React.ComponentProps<typeof Text> & KbdBaseProps) {
package/src/menubar.tsx CHANGED
@@ -16,6 +16,7 @@ import { Check, ChevronRight, Circle } from 'lucide-react-native';
16
16
  import * as React from 'react';
17
17
  import { Platform, StyleSheet, View } from 'react-native';
18
18
  import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
19
+
19
20
  import { wrapTextChildren } from './lib/render-native';
20
21
  import { cn } from './lib/utils';
21
22
  import { Text } from './text';
@@ -5,9 +5,10 @@ import type {
5
5
  } from '@gv-tech/ui-core';
6
6
  import * as React from 'react';
7
7
  import { Text, View } from 'react-native';
8
+
8
9
  import { cn } from './lib/utils';
9
10
 
10
- function NativeSelect({ className, size, ...props }: React.ComponentProps<typeof View> & NativeSelectBaseProps) {
11
+ function NativeSelect({ className, size: _size, ...props }: React.ComponentProps<typeof View> & NativeSelectBaseProps) {
11
12
  // Native select relies on @react-native-picker/picker, providing shim
12
13
  return (
13
14
  <View className={cn('border-input rounded-md border p-2', className)} {...props}>
@@ -11,8 +11,10 @@ import type {
11
11
  import * as NavigationMenuPrimitive from '@rn-primitives/navigation-menu';
12
12
  import { ChevronDown } from 'lucide-react-native';
13
13
  import * as React from 'react';
14
- import { GestureResponderEvent, View } from 'react-native';
14
+ import type { GestureResponderEvent } from 'react-native';
15
+ import { View } from 'react-native';
15
16
  import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
17
+
16
18
  import { cn } from './lib/utils';
17
19
 
18
20
  export const NavigationMenu = React.forwardRef<
@@ -20,7 +22,17 @@ export const NavigationMenu = React.forwardRef<
20
22
  NavigationMenuBaseProps
21
23
  >(
22
24
  (
23
- { className, children, value, onValueChange, dir, orientation, delayDuration, skipDelayDuration, ...props },
25
+ {
26
+ className,
27
+ children,
28
+ value,
29
+ onValueChange,
30
+ dir: _dir,
31
+ orientation: _orientation,
32
+ delayDuration,
33
+ skipDelayDuration,
34
+ ...props
35
+ },
24
36
  ref,
25
37
  ) => {
26
38
  return (
@@ -95,7 +107,7 @@ NavigationMenuTrigger.displayName = 'NavigationMenuTrigger';
95
107
  export const NavigationMenuContent = React.forwardRef<
96
108
  React.ComponentRef<typeof NavigationMenuPrimitive.Content>,
97
109
  NavigationMenuContentBaseProps
98
- >(({ className, children, forceMount, ...props }, ref) => {
110
+ >(({ className, children, forceMount: _forceMount, ...props }, ref) => {
99
111
  return (
100
112
  <NavigationMenuPrimitive.Portal>
101
113
  <NavigationMenuPrimitive.Content ref={ref} {...props}>
@@ -115,7 +127,7 @@ NavigationMenuContent.displayName = 'NavigationMenuContent';
115
127
  export const NavigationMenuLink = React.forwardRef<
116
128
  React.ComponentRef<typeof NavigationMenuPrimitive.Link>,
117
129
  NavigationMenuLinkBaseProps & { onPress?: () => void }
118
- >(({ className, children, active, onSelect, onPress, href, ...props }, ref) => {
130
+ >(({ className, children, active, onSelect, onPress, href: _href, ...props }, ref) => {
119
131
  const handlePress = (e: GestureResponderEvent) => {
120
132
  if (onPress) {
121
133
  onPress();
@@ -146,7 +158,7 @@ NavigationMenuLink.displayName = 'NavigationMenuLink';
146
158
  export const NavigationMenuViewport = React.forwardRef<
147
159
  React.ComponentRef<typeof NavigationMenuPrimitive.Viewport>,
148
160
  NavigationMenuViewportBaseProps
149
- >(({ className, forceMount, ...props }, ref) => {
161
+ >(({ className, forceMount: _forceMount, ...props }, ref) => {
150
162
  return (
151
163
  <View className="absolute top-full left-0 flex justify-center">
152
164
  <NavigationMenuPrimitive.Viewport
@@ -165,7 +177,7 @@ NavigationMenuViewport.displayName = 'NavigationMenuViewport';
165
177
  export const NavigationMenuIndicator = React.forwardRef<
166
178
  React.ComponentRef<typeof NavigationMenuPrimitive.Indicator>,
167
179
  NavigationMenuIndicatorBaseProps
168
- >(({ className, forceMount, ...props }, ref) => {
180
+ >(({ className, forceMount: _forceMount, ...props }, ref) => {
169
181
  return (
170
182
  <NavigationMenuPrimitive.Indicator
171
183
  ref={ref}
@@ -10,6 +10,7 @@ import type {
10
10
  import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react-native';
11
11
  import * as React from 'react';
12
12
  import { View } from 'react-native';
13
+
13
14
  import { Button } from './button';
14
15
  import { cn } from './lib/utils';
15
16
  import { Text } from './text';
@@ -17,6 +18,8 @@ import { Text } from './text';
17
18
  export const Pagination = ({ className, children, ...props }: PaginationBaseProps) => {
18
19
  return (
19
20
  <View
21
+ // RN has no nav element; `role` targets web parity via react-native-web
22
+ // eslint-disable-next-line jsx-a11y/prefer-tag-over-role
20
23
  role="navigation"
21
24
  aria-label="pagination"
22
25
  className={cn('mx-auto flex w-full flex-row justify-center', className)}
@@ -68,7 +71,7 @@ PaginationLink.displayName = 'PaginationLink';
68
71
 
69
72
  export const PaginationPrevious = ({
70
73
  className,
71
- children,
74
+ children: _children,
72
75
  onPress,
73
76
  ...props
74
77
  }: PaginationPreviousBaseProps & { onPress?: () => void }) => (
@@ -87,7 +90,7 @@ PaginationPrevious.displayName = 'PaginationPrevious';
87
90
 
88
91
  export const PaginationNext = ({
89
92
  className,
90
- children,
93
+ children: _children,
91
94
  onPress,
92
95
  ...props
93
96
  }: PaginationNextBaseProps & { onPress?: () => void }) => (
package/src/popover.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  PopoverAnchorBaseProps,
3
3
  PopoverBaseProps,
4
4
  PopoverContentBaseProps,
package/src/progress.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { ProgressBaseProps } from '@gv-tech/ui-core';
1
+ import type { ProgressBaseProps } from '@gv-tech/ui-core';
2
2
  import * as React from 'react';
3
3
  import { View } from 'react-native';
4
4
 
@@ -12,7 +12,6 @@ const Progress = React.forwardRef<
12
12
  ref={ref}
13
13
  className={cn('bg-muted relative h-2 w-full overflow-hidden rounded-full', className)}
14
14
  accessibilityRole="progressbar"
15
- role="progressbar"
16
15
  {...props}
17
16
  >
18
17
  <View className="bg-primary h-full rounded-full" style={{ width: `${value || 0}%` }} />
@@ -1,4 +1,4 @@
1
- import { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';
1
+ import type { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';
2
2
  import * as RadioGroupPrimitive from '@rn-primitives/radio-group';
3
3
  import { Circle } from 'lucide-react-native';
4
4
  import * as React from 'react';
@@ -1,6 +1,7 @@
1
1
  import type { ScrollAreaBaseProps, ScrollBarBaseProps } from '@gv-tech/ui-core';
2
2
  import * as React from 'react';
3
3
  import { ScrollView, View } from 'react-native';
4
+
4
5
  import { cn } from './lib/utils';
5
6
 
6
7
  export const ScrollArea = React.forwardRef<ScrollView, ScrollAreaBaseProps>(