diff --git a/example/storybook-nativewind/.storybook/preview.js b/example/storybook-nativewind/.storybook/preview.js index 8201d81410..693855c586 100644 --- a/example/storybook-nativewind/.storybook/preview.js +++ b/example/storybook-nativewind/.storybook/preview.js @@ -31,11 +31,13 @@ export const parameters = { method: '', order: [ 'Overview', - ['Introduction'], + ['Introduction', 'All Components'], 'Getting Started', - ['Installation', 'Tooling Setup'], + ['Installation', 'Tooling Setup', 'Figma UI Kit'], 'Core Concepts', ['Accessibility', 'Universal'], + 'Theme Configuration', + ['Default Tokens', 'Customizing Theme'], 'Components', [ 'Typography', diff --git a/example/storybook-nativewind/babel.config.js b/example/storybook-nativewind/babel.config.js index 8f54b5c7e2..ac70512697 100644 --- a/example/storybook-nativewind/babel.config.js +++ b/example/storybook-nativewind/babel.config.js @@ -95,6 +95,18 @@ module.exports = function (api) { __dirname, '../../packages/nativewind/utils/' ), + '@gluestack-ui/overlay': path.join( + __dirname, + '../../packages/unstyled/overlay/src' + ), + '@gluestack-ui/toast': path.join( + __dirname, + '../../packages/unstyled/toast/src' + ), + 'tailwind.config': path.join( + __dirname, + '../../example/storybook-nativewind/tailwind.config.js' + ), }, }, ], diff --git a/example/storybook-nativewind/package.json b/example/storybook-nativewind/package.json index ce1f7a3088..b41039fbe9 100644 --- a/example/storybook-nativewind/package.json +++ b/example/storybook-nativewind/package.json @@ -29,7 +29,7 @@ "@geometricpanda/storybook-addon-iframe": "^0.2.2", "@gluestack-style/react": "^1.0.52", "@gluestack-ui/config": "^1.1.17", - "@gluestack-ui/themed": "^1.1.17", + "@gluestack-ui/themed": "^1.1.19", "@gluestack/design-system": "^0.5.36", "@legendapp/motion": "^2.2.0", "@react-aria/button": "^3.7.0", diff --git a/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx index f39f378e5e..1d9bdfdbce 100644 --- a/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx @@ -61,6 +61,7 @@ import { AddIcon, InfoIcon, Alert, + Tabs } from '@gluestack/design-system'; import {Platform, KeyboardAvoidingView,} from 'react-native'; import {CreditCardIcon} from 'lucide-react-native'; @@ -134,6 +135,28 @@ function App(){ ## Installation + + + + CLI + + + Manual + + + + +<> + +### Run the following command: + ```bash + npx gluestack-ui add actionsheet + ``` + + + +<> + ### Step 1: Install the following dependencies: ```bash npm i @gluestack-ui/actionsheet @@ -146,6 +169,12 @@ npm i @gluestack-ui/actionsheet ``` +### Step 3: Update the import paths to match your project setup. + + + + + ## API Reference To use this component in your project, include the following import statement in your file. diff --git a/example/storybook-nativewind/src/components/AlertDialog/index.nw.stories.mdx b/example/storybook-nativewind/src/components/AlertDialog/index.nw.stories.mdx index 1944349bce..22357afaa2 100644 --- a/example/storybook-nativewind/src/components/AlertDialog/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/AlertDialog/index.nw.stories.mdx @@ -385,22 +385,6 @@ It inherits all the properties of React Native's [View](https://reactnative.dev/ {`If true, the keyboard can dismiss the AlertDialog`} - - - - animationPreset - - - - slide | fade - - - slide - - - {`Specifies the animation preset for the AlertDialog`} - - diff --git a/example/storybook-nativewind/src/components/AlertDialog/index.themed.stories.mdx b/example/storybook-nativewind/src/components/AlertDialog/index.themed.stories.mdx index 6b748bcf6b..1c6863e222 100644 --- a/example/storybook-nativewind/src/components/AlertDialog/index.themed.stories.mdx +++ b/example/storybook-nativewind/src/components/AlertDialog/index.themed.stories.mdx @@ -391,22 +391,6 @@ It inherits all the properties of React Native's [View](https://reactnative.dev/ {`If true, the keyboard can dismiss the AlertDialog`} - - - - animationPreset - - - - slide | fade - - - slide - - - {`Specifies the animation preset for the AlertDialog`} - - diff --git a/example/storybook-nativewind/src/components/Box/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Box/index.nw.stories.mdx index edc75b6fac..43e0117682 100644 --- a/example/storybook-nativewind/src/components/Box/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Box/index.nw.stories.mdx @@ -80,7 +80,7 @@ This is an illustration of **Box** component. <> -### Step 1: Copy and paste the following code into your project. +### Step 1: Copy and paste the following code into index.tsx in your project. ```jsx @@ -88,7 +88,25 @@ This is an illustration of **Box** component. ``` -### Step 2: Update the import paths to match your project setup. +> Note: **This Step is (optional) and only required if you want to add support for [React Server Components](https://vercel.com/blog/understanding-react-server-components), You can skip this and jump to Step 3 directly if you don't have this requirement.** + +### Step 2: Copy and paste the following code into index.web.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/box/index.web.tsx --%% +``` + + +### Step 3: Copy and paste the following code into styles.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/box/styles.tsx --%% +``` + + +### Step 4: Update the import paths to match your project setup. diff --git a/example/storybook-nativewind/src/components/Card/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Card/index.nw.stories.mdx index f012b808bd..5d168ed347 100644 --- a/example/storybook-nativewind/src/components/Card/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Card/index.nw.stories.mdx @@ -112,7 +112,7 @@ This is an illustration of a **Card** component. <> -### Step 1: Copy and paste the following code into your project. +### Step 1: Copy and paste the following code into index.tsx in your project. ```jsx @@ -120,7 +120,25 @@ This is an illustration of a **Card** component. ``` -### Step 2: Update the import paths to match your project setup. +> Note: **This Step is (optional) and only required if you want to add support for [React Server Components](https://vercel.com/blog/understanding-react-server-components), You can skip this and jump to Step 3 directly if you don't have this requirement.** + +### Step 2: Copy and paste the following code into index.web.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/card/index.web.tsx --%% +``` + + +### Step 3: Copy and paste the following code into styles.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/card/styles.tsx --%% +``` + + +### Step 4: Update the import paths to match your project setup. diff --git a/example/storybook-nativewind/src/components/Center/Center.tsx b/example/storybook-nativewind/src/components/Center/Center.tsx index 7f9e782225..d61ff5a691 100644 --- a/example/storybook-nativewind/src/components/Center/Center.tsx +++ b/example/storybook-nativewind/src/components/Center/Center.tsx @@ -4,10 +4,8 @@ import React from 'react'; const CenterBasic = () => { return ( -
- - This is the center. - +
+ This is the center.
); }; diff --git a/example/storybook-nativewind/src/components/Center/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Center/index.nw.stories.mdx index ba511a920d..dc015ed490 100644 --- a/example/storybook-nativewind/src/components/Center/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Center/index.nw.stories.mdx @@ -78,7 +78,7 @@ This is an illustration of **Center** component. <> -### Step 1: Copy and paste the following code into your project. +### Step 1: Copy and paste the following code into index.tsx in your project. ```jsx @@ -86,7 +86,25 @@ This is an illustration of **Center** component. ``` -### Step 2: Update the import paths to match your project setup. +> Note: **This Step is (optional) and only required if you want to add support for [React Server Components](https://vercel.com/blog/understanding-react-server-components), You can skip this and jump to Step 3 directly if you don't have this requirement.** + +### Step 2: Copy and paste the following code into index.web.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/center/index.web.tsx --%% +``` + + +### Step 3: Copy and paste the following code into styles.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/center/styles.tsx --%% +``` + + +### Step 4: Update the import paths to match your project setup. diff --git a/example/storybook-nativewind/src/components/HStack/index.nw.stories.mdx b/example/storybook-nativewind/src/components/HStack/index.nw.stories.mdx index 8b33e504c4..e8cc4f07fc 100644 --- a/example/storybook-nativewind/src/components/HStack/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/HStack/index.nw.stories.mdx @@ -89,7 +89,7 @@ This is an illustration of **HStack** component. <> -### Step 1: Copy and paste the following code into your project. +### Step 1: Copy and paste the following code into index.tsx in your project. ```jsx @@ -97,7 +97,25 @@ This is an illustration of **HStack** component. ``` -### Step 2: Update the import paths to match your project setup. +> Note: **This Step is (optional) and only required if you want to add support for [React Server Components](https://vercel.com/blog/understanding-react-server-components), You can skip this and jump to Step 3 directly if you don't have this requirement.** + +### Step 2: Copy and paste the following code into index.web.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/hstack/index.web.tsx --%% +``` + + +### Step 3: Copy and paste the following code into styles.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/hstack/styles.tsx --%% +``` + + +### Step 4: Update the import paths to match your project setup. diff --git a/example/storybook-nativewind/src/components/Heading/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Heading/index.nw.stories.mdx index bcc4d18453..35aa8d1153 100644 --- a/example/storybook-nativewind/src/components/Heading/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Heading/index.nw.stories.mdx @@ -77,20 +77,33 @@ This is an illustration of **Heading** component. <> -### Step 1: Install the following dependencies: -```bash -npm i @expo/html-elements +### Step 1: Copy and paste the following code into index.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/heading/index.tsx --%% ``` + + +> Note: **This Step is (optional) and only required if you want to add support for [React Server Components](https://vercel.com/blog/understanding-react-server-components), You can skip this and jump to Step 3 directly if you don't have this requirement.** -### Step 2: Copy and paste the following code into your project. +### Step 2: Copy and paste the following code into index.web.tsx in your project. ```jsx -%%-- File: core-components/nativewind/heading/index.tsx --%% +%%-- File: core-components/nativewind/heading/index.web.tsx --%% +``` + + +### Step 3: Copy and paste the following code into styles.tsx in your project. + + +```jsx +%%-- File: core-components/nativewind/heading/styles.tsx --%% ``` -### Step 3: Update the import paths to match your project setup. +### Step 4: Update the import paths to match your project setup. diff --git a/example/storybook-nativewind/src/components/Modal/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Modal/index.nw.stories.mdx index f5691c007c..0b7e088316 100644 --- a/example/storybook-nativewind/src/components/Modal/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Modal/index.nw.stories.mdx @@ -82,7 +82,7 @@ This is an illustration of **Modal** component. Engage with Modals - @@ -762,7 +762,7 @@ A versatile modal component offering different sizes to accommodate various cont Delete Folder - diff --git a/example/storybook-nativewind/src/components/Select/Select.tsx b/example/storybook-nativewind/src/components/Select/Select.tsx index 99dcc38fa5..20fba565d9 100644 --- a/example/storybook-nativewind/src/components/Select/Select.tsx +++ b/example/storybook-nativewind/src/components/Select/Select.tsx @@ -1,7 +1,6 @@ import React from 'react'; - -import { Center, ChevronDownIcon, Icon } from '@gluestack-ui/themed'; - +import { Center } from '@/components/ui/center'; +import { Icon, ChevronDownIcon } from '@/components/ui/icon'; import { Select, SelectIcon, @@ -20,11 +19,7 @@ const SelectBasic = ({ size = 'md', variant = 'outline', ...props }: any) => { ; + React.ForwardRefExoticComponent< + React.RefAttributes & Root & IInputFieldProps + > & { + Icon: React.ForwardRefExoticComponent & Icon>; + Slot: React.ForwardRefExoticComponent & Slot>; + Input: React.ForwardRefExoticComponent< + React.RefAttributes & Input & IInputProps + >; }; // export type InputProps = Partial; diff --git a/packages/unstyled/link/CHANGELOG.md b/packages/unstyled/link/CHANGELOG.md index b67ef139da..8c07540ec3 100644 --- a/packages/unstyled/link/CHANGELOG.md +++ b/packages/unstyled/link/CHANGELOG.md @@ -1,5 +1,11 @@ # @gluestack-ui/link +## 0.1.20 + +### Patch Changes + +- fix: ref typing issue + ## 0.1.19 ### Patch Changes diff --git a/packages/unstyled/link/package.json b/packages/unstyled/link/package.json index 7a62eeec39..2048dbf4ad 100644 --- a/packages/unstyled/link/package.json +++ b/packages/unstyled/link/package.json @@ -1,6 +1,6 @@ { "name": "@gluestack-ui/link", - "version": "0.1.19", + "version": "0.1.20", "main": "lib/commonjs/index", "module": "lib/module/index", "types": "lib/typescript/index.d.ts", diff --git a/packages/unstyled/link/src/types.ts b/packages/unstyled/link/src/types.ts index b158069468..b91144442e 100644 --- a/packages/unstyled/link/src/types.ts +++ b/packages/unstyled/link/src/types.ts @@ -1,4 +1,5 @@ import type { MutableRefObject } from 'react'; +import React from 'react'; import type { GestureResponderEvent, ViewProps } from 'react-native'; export interface InterfaceLinkProps extends ViewProps { @@ -29,5 +30,7 @@ export type IUseLinkProp = { export type ILinkComponentType = React.ForwardRefExoticComponent & { - Text: React.ForwardRefExoticComponent; + Text: React.ForwardRefExoticComponent< + TextProps & React.RefAttributes + >; }; diff --git a/packages/unstyled/menu/CHANGELOG.md b/packages/unstyled/menu/CHANGELOG.md index 94c4800446..48a15bad50 100644 --- a/packages/unstyled/menu/CHANGELOG.md +++ b/packages/unstyled/menu/CHANGELOG.md @@ -1,5 +1,11 @@ # @gluestack-ui/menu +## 0.2.33 + +### Patch Changes + +- fix: ref typing issue + ## 0.2.32 ### Patch Changes diff --git a/packages/unstyled/menu/package.json b/packages/unstyled/menu/package.json index 7796623e57..48bb5b1827 100644 --- a/packages/unstyled/menu/package.json +++ b/packages/unstyled/menu/package.json @@ -15,7 +15,7 @@ "ios", "nextjs" ], - "version": "0.2.32", + "version": "0.2.33", "main": "lib/commonjs/index", "module": "lib/module/index", "types": "lib/typescript/index.d.ts", diff --git a/packages/unstyled/menu/src/types.ts b/packages/unstyled/menu/src/types.ts index 36a8915f8d..5c200f070f 100644 --- a/packages/unstyled/menu/src/types.ts +++ b/packages/unstyled/menu/src/types.ts @@ -99,7 +99,13 @@ export interface IItemProp { export type IMenuProps = InterfaceMenuProps; export type IMenuComponentType = - React.ForwardRefExoticComponent & { - Item: React.ForwardRefExoticComponent & IItemProp>; - ItemLabel: React.ForwardRefExoticComponent