Skip to content

Commit 3356c7b

Browse files
authored
Merge pull request #3068 from gluestack/feat/update-npm-v
Feat/update npm v
2 parents 3ebd728 + 0c697df commit 3356c7b

File tree

15 files changed

+194
-41
lines changed

15 files changed

+194
-41
lines changed

PREVIEW_DEPLOYMENT.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/starter-kit-expo/components/ui/alert/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import React from 'react';
1010
import { cssInterop } from 'nativewind';
1111
import type { VariantProps } from '@gluestack-ui-nightly/utils/nativewind-utils';
12-
import { PrimitiveIcon, UIIcon } from '@/components/ui/icon/creator';
12+
import { PrimitiveIcon, UIIcon } from '@gluestack-ui-nightly/core/icon/creator';
1313

1414
const SCOPE = 'ALERT';
1515

apps/starter-kit-expo/components/ui/badge/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22
import React from 'react';
33
import { Text, View } from 'react-native';
4-
import { PrimitiveIcon, UIIcon } from '@/components/ui/icon/creator';
4+
import { PrimitiveIcon, UIIcon } from '@gluestack-ui-nightly/core/icon/creator';
55
import { tva } from '@gluestack-ui-nightly/utils/nativewind-utils';
66
import {
77
withStyleContext,

apps/starter-kit-expo/components/ui/icon/index.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const UIIcon = createIcon({
1818
>;
1919

2020
const iconStyle = tva({
21-
base: 'text-typography-950 fill-none pointer-events-none',
21+
base: 'text-typography-950 fill-none stroke-current pointer-events-none',
2222
variants: {
2323
size: {
2424
'2xs': 'h-3 w-3',
@@ -38,7 +38,7 @@ cssInterop(UIIcon, {
3838
height: true,
3939
width: true,
4040
fill: true,
41-
color: 'classNameColor',
41+
color: true,
4242
stroke: true,
4343
},
4444
},
@@ -50,11 +50,17 @@ type IIConProps = IPrimitiveIcon &
5050

5151
const Icon = React.forwardRef<React.ComponentRef<typeof UIIcon>, IIConProps>(
5252
function Icon({ size = 'md', className, ...props }, ref) {
53+
const iconProps = {
54+
fill: 'none',
55+
stroke: 'currentColor',
56+
...props,
57+
};
58+
5359
if (typeof size === 'number') {
5460
return (
5561
<UIIcon
5662
ref={ref}
57-
{...props}
63+
{...iconProps}
5864
className={iconStyle({ class: className })}
5965
size={size}
6066
/>
@@ -66,15 +72,15 @@ const Icon = React.forwardRef<React.ComponentRef<typeof UIIcon>, IIConProps>(
6672
return (
6773
<UIIcon
6874
ref={ref}
69-
{...props}
75+
{...iconProps}
7076
className={iconStyle({ class: className })}
7177
/>
7278
);
7379
}
7480
return (
7581
<UIIcon
7682
ref={ref}
77-
{...props}
83+
{...iconProps}
7884
className={iconStyle({ size, class: className })}
7985
/>
8086
);
@@ -103,10 +109,16 @@ const createIconUI = ({ ...props }: ParameterTypes) => {
103109
React.ComponentPropsWithoutRef<typeof UIIconCreateIcon>,
104110
ref
105111
) {
112+
const iconProps = {
113+
fill: 'none',
114+
stroke: 'currentColor',
115+
...inComingProps,
116+
};
117+
106118
return (
107119
<UIIconCreateIcon
108120
ref={ref}
109-
{...inComingProps}
121+
{...iconProps}
110122
className={iconStyle({ size, class: className })}
111123
/>
112124
);

apps/starter-kit-expo/components/ui/link/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use client';
2-
import { createLink } from './creator';
2+
import { createLink } from '@gluestack-ui-nightly/core/link/creator';
33
import { Pressable } from 'react-native';
44
import { Text } from 'react-native';
55

apps/starter-kit-next/components/ui/alert/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import React from 'react';
1010
import { cssInterop } from 'nativewind';
1111
import type { VariantProps } from '@gluestack-ui-nightly/utils/nativewind-utils';
12-
import { PrimitiveIcon, UIIcon } from '@/components/ui/icon/creator';
12+
import { PrimitiveIcon, UIIcon } from '@gluestack-ui-nightly/core/icon/creator';
1313

1414
const SCOPE = 'ALERT';
1515

apps/starter-kit-next/components/ui/badge/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22
import React from 'react';
33
import { Text, View } from 'react-native';
4-
import { PrimitiveIcon, UIIcon } from '@/components/ui/icon/creator';
4+
import { PrimitiveIcon, UIIcon } from '@gluestack-ui-nightly/core/icon/creator';
55
import { tva } from '@gluestack-ui-nightly/utils/nativewind-utils';
66
import {
77
withStyleContext,

apps/starter-kit-next/components/ui/gluestack-ui-provider/index.web.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// This is a Next.js 15 compatible version of the GluestackUIProvider
21
'use client';
32
import React, { useEffect, useLayoutEffect } from 'react';
43
import { config } from './config';
@@ -7,6 +6,8 @@ import { ToastProvider } from '@gluestack-ui-nightly/core/toast/creator';
76
import { setFlushStyles } from '@gluestack-ui-nightly/utils/nativewind-utils';
87
import { script } from './script';
98

9+
export type ModeType = 'light' | 'dark' | 'system';
10+
1011
const variableStyleTagId = 'nativewind-style';
1112
const createStyle = (styleTagId: string) => {
1213
const style = document.createElement('style');
@@ -22,7 +23,7 @@ export function GluestackUIProvider({
2223
mode = 'light',
2324
...props
2425
}: {
25-
mode?: 'light' | 'dark' | 'system';
26+
mode?: ModeType;
2627
children?: React.ReactNode;
2728
}) {
2829
let cssVariablesWithMode = ``;
@@ -80,8 +81,16 @@ export function GluestackUIProvider({
8081
}, []);
8182

8283
return (
83-
<OverlayProvider>
84-
<ToastProvider>{props.children}</ToastProvider>
85-
</OverlayProvider>
84+
<>
85+
<script
86+
suppressHydrationWarning
87+
dangerouslySetInnerHTML={{
88+
__html: `(${script.toString()})('${mode}')`,
89+
}}
90+
/>
91+
<OverlayProvider>
92+
<ToastProvider>{props.children}</ToastProvider>
93+
</OverlayProvider>
94+
</>
8695
);
8796
}

apps/starter-kit-next/components/ui/icon/index.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const UIIcon = createIcon({
1818
>;
1919

2020
const iconStyle = tva({
21-
base: 'text-typography-950 fill-none pointer-events-none',
21+
base: 'text-typography-950 fill-none stroke-current pointer-events-none',
2222
variants: {
2323
size: {
2424
'2xs': 'h-3 w-3',
@@ -38,7 +38,7 @@ cssInterop(UIIcon, {
3838
height: true,
3939
width: true,
4040
fill: true,
41-
color: 'classNameColor',
41+
color: true,
4242
stroke: true,
4343
},
4444
},
@@ -50,11 +50,17 @@ type IIConProps = IPrimitiveIcon &
5050

5151
const Icon = React.forwardRef<React.ComponentRef<typeof UIIcon>, IIConProps>(
5252
function Icon({ size = 'md', className, ...props }, ref) {
53+
const iconProps = {
54+
fill: 'none',
55+
stroke: 'currentColor',
56+
...props,
57+
};
58+
5359
if (typeof size === 'number') {
5460
return (
5561
<UIIcon
5662
ref={ref}
57-
{...props}
63+
{...iconProps}
5864
className={iconStyle({ class: className })}
5965
size={size}
6066
/>
@@ -66,15 +72,15 @@ const Icon = React.forwardRef<React.ComponentRef<typeof UIIcon>, IIConProps>(
6672
return (
6773
<UIIcon
6874
ref={ref}
69-
{...props}
75+
{...iconProps}
7076
className={iconStyle({ class: className })}
7177
/>
7278
);
7379
}
7480
return (
7581
<UIIcon
7682
ref={ref}
77-
{...props}
83+
{...iconProps}
7884
className={iconStyle({ size, class: className })}
7985
/>
8086
);
@@ -103,10 +109,16 @@ const createIconUI = ({ ...props }: ParameterTypes) => {
103109
React.ComponentPropsWithoutRef<typeof UIIconCreateIcon>,
104110
ref
105111
) {
112+
const iconProps = {
113+
fill: 'none',
114+
stroke: 'currentColor',
115+
...inComingProps,
116+
};
117+
106118
return (
107119
<UIIconCreateIcon
108120
ref={ref}
109-
{...inComingProps}
121+
{...iconProps}
110122
className={iconStyle({ size, class: className })}
111123
/>
112124
);

apps/starter-kit-next/components/ui/link/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use client';
2-
import { createLink } from './creator';
2+
import { createLink } from '@gluestack-ui-nightly/core/link/creator';
33
import { Pressable } from 'react-native';
44
import { Text } from 'react-native';
55

0 commit comments

Comments
 (0)