@gv-tech/ui-native 2.23.1 → 2.23.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gv-tech/ui-native",
3
- "version": "2.23.1",
3
+ "version": "2.23.3",
4
4
  "description": "React Native implementations of the GV Tech design system components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,13 +12,13 @@
12
12
  "exports": {
13
13
  ".": {
14
14
  "types": "./dist/index.d.ts",
15
- "import": "./dist/ui-native.mjs",
15
+ "import": "./dist/ui-native.esm.js",
16
16
  "require": "./dist/ui-native.cjs",
17
- "default": "./dist/ui-native.mjs"
17
+ "default": "./dist/ui-native.esm.js"
18
18
  }
19
19
  },
20
20
  "main": "./dist/ui-native.cjs",
21
- "module": "./dist/ui-native.mjs",
21
+ "module": "./dist/ui-native.esm.js",
22
22
  "react-native": "./src/index.ts",
23
23
  "types": "./dist/index.d.ts",
24
24
  "files": [
@@ -36,7 +36,6 @@
36
36
  "dependencies": {
37
37
  "@gv-tech/design-tokens": "^2.12.0",
38
38
  "@gv-tech/ui-core": "^2.12.0",
39
- "react-hook-form": "^7.71.1",
40
39
  "@rn-primitives/accordion": "^1.2.0",
41
40
  "@rn-primitives/alert-dialog": "^1.2.0",
42
41
  "@rn-primitives/aspect-ratio": "^1.2.0",
@@ -65,7 +64,9 @@
65
64
  "@rn-primitives/toggle-group": "^1.2.0",
66
65
  "@rn-primitives/tooltip": "^1.2.0",
67
66
  "clsx": "^2.1.1",
68
- "nativewind": "^4.2.1",
67
+ "nativewind": "^5.0.0-preview.4",
68
+ "react-hook-form": "^7.71.1",
69
+ "react-native-css-interop": "^0.2.4",
69
70
  "tailwind-merge": "^3.4.1",
70
71
  "tailwindcss": "^4.1.18"
71
72
  },
package/src/button.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { cva, type VariantProps } from 'class-variance-authority';
1
+ import { cva } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  import { Pressable, Text, View } from 'react-native';
4
4
 
@@ -48,7 +48,9 @@ const buttonTextVariants = cva('text-sm font-medium', {
48
48
  },
49
49
  });
50
50
 
51
- export interface ButtonProps extends VariantProps<typeof buttonVariants>, ButtonBaseProps {
51
+ export interface ButtonProps extends ButtonBaseProps {
52
+ variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | null;
53
+ size?: 'default' | 'sm' | 'lg' | 'icon' | null;
52
54
  onPress?: () => void;
53
55
  }
54
56
 
package/src/carousel.tsx CHANGED
@@ -76,7 +76,7 @@ export const Carousel = React.forwardRef<View, CarouselProps>(
76
76
  }
77
77
  }, [setApi, scrollNext, scrollPrev, canScrollNext, canScrollPrev]);
78
78
 
79
- const handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
79
+ const _handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
80
80
  const offsetX = event.nativeEvent.contentOffset.x;
81
81
  const contentWidth = event.nativeEvent.contentSize.width;
82
82
  const layoutWidth = event.nativeEvent.layoutMeasurement.width;
@@ -110,7 +110,7 @@ export const Carousel = React.forwardRef<View, CarouselProps>(
110
110
  Carousel.displayName = 'Carousel';
111
111
 
112
112
  export const CarouselContent = React.forwardRef<ScrollView, CarouselContentBaseProps>(
113
- ({ children, className, ...props }, ref) => {
113
+ ({ children, className, ...props }, _ref) => {
114
114
  const { scrollRef, orientation } = useCarousel();
115
115
 
116
116
  return (
package/src/direction.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { DirectionProviderBaseProps } from '@gv-tech/ui-core';
2
2
 
3
- function DirectionProvider({ children, dir, direction }: DirectionProviderBaseProps) {
3
+ function DirectionProvider({ children }: DirectionProviderBaseProps) {
4
4
  // RN direction is mostly handled via I18nManager
5
5
  return <>{children}</>;
6
6
  }
package/src/index.ts CHANGED
@@ -158,7 +158,8 @@ export {
158
158
  } from './dropdown-menu';
159
159
 
160
160
  // Form
161
- export { Form } from './form';
161
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from './form';
162
+ export type { FormControlProps, FormDescriptionProps, FormItemProps, FormLabelProps, FormMessageProps } from './form';
162
163
 
163
164
  // Hover Card
164
165
  export { HoverCard, HoverCardContent, HoverCardTrigger } from './hover-card';
@@ -0,0 +1,14 @@
1
+ import type { LucideIcon } from 'lucide-react-native';
2
+ import { cssInterop } from 'react-native-css-interop';
3
+
4
+ export function iconWithClassName(icon: LucideIcon) {
5
+ cssInterop(icon, {
6
+ className: {
7
+ target: 'style',
8
+ nativeStyleToProp: {
9
+ color: true,
10
+ opacity: true,
11
+ },
12
+ },
13
+ });
14
+ }
@@ -4,9 +4,14 @@ import { View } from 'react-native';
4
4
  import { Button } from './button';
5
5
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from './dropdown-menu';
6
6
  import { useTheme } from './hooks/use-theme';
7
+ import { iconWithClassName } from './lib/iconWithClassName';
7
8
  import { cn } from './lib/utils';
8
9
  import { Text } from './text';
9
10
 
11
+ iconWithClassName(Sun);
12
+ iconWithClassName(Moon);
13
+ iconWithClassName(SunMoon);
14
+
10
15
  export type ThemeToggleProps = ThemeToggleBaseProps;
11
16
 
12
17
  export function ThemeToggle({ variant = 'binary', onThemeChange, customTheme, className }: ThemeToggleProps) {
@@ -23,7 +28,7 @@ export function ThemeToggle({ variant = 'binary', onThemeChange, customTheme, cl
23
28
  if (onThemeChange) {
24
29
  onThemeChange(newTheme);
25
30
  } else {
26
- setTheme(newTheme);
31
+ setTheme(newTheme as 'light' | 'dark');
27
32
  }
28
33
  };
29
34