diff --git a/.commitlintrc b/.commitlintrc
new file mode 100644
index 00000000..0df1d253
--- /dev/null
+++ b/.commitlintrc
@@ -0,0 +1,5 @@
+{
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+}
diff --git a/.eslintignore b/.eslintignore
index 55f99cea..ac10b969 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,2 +1,6 @@
-node_modules/
-docs/
\ No newline at end of file
+node_modules
+lib
+.next
+
+# Temporary
+apps
\ No newline at end of file
diff --git a/.eslintrc b/.eslintrc
index 4d13ce62..f6f026d3 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,8 +1,9 @@
{
- "extends": ["@react-native-community", "prettier"],
+ "extends": "@react-native",
"rules": {
"@typescript-eslint/no-unused-vars": ["off", { "argsIgnorePattern": "^_" }],
"no-unused-vars": "off",
- "react-hooks/exhaustive-deps": "off"
+ "react-hooks/exhaustive-deps": "off",
+ "react-in-jsx-scope": "off"
}
}
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 412b08c9..1a9ac648 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -12,7 +12,7 @@ runs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
- version: 8
+ version: 9
- name: Cache dependencies
id: pnpm-cache
@@ -27,6 +27,5 @@ runs:
- name: Install dependencies
if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: |
- pnpm install -C example --frozen-lockfile
pnpm install --frozen-lockfile
shell: bash
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 17d9fca8..6ff5f713 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,7 +33,9 @@ jobs:
uses: ./.github/actions/setup
- name: Run unit tests
- run: pnpm test -- --maxWorkers=2 --coverage
+ run: |
+ cd ./packages/react-native-ficus-ui
+ pnpm test -- --maxWorkers=2 --coverage
build:
runs-on: ubuntu-latest
diff --git a/.gitignore b/.gitignore
index 91375bff..d5d5150c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,4 +69,4 @@ android/keystores/debug.keystore
# generated by bob
lib/
-docs/.next
+apps/docs/.next
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..a1bbffe1
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,7 @@
+{
+ "singleQuote": true,
+ "tabWidth": 2,
+ "trailingComma": "es5",
+ "useTabs": false,
+ "printWidth": 80
+}
diff --git a/.prettierrc.js b/.prettierrc.js
deleted file mode 100644
index 2d944ee6..00000000
--- a/.prettierrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- singleQuote: true,
- tabWidth: 2,
- trailingComma: 'es5',
- useTabs: false,
- printWidth: 80,
-};
diff --git a/.watchmanconfig b/.watchmanconfig
deleted file mode 100644
index 9e26dfee..00000000
--- a/.watchmanconfig
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 96ff3088..e63845a1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,6 +4,16 @@ Contributions are always welcome, no matter how large or small!
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md).
+## Architecture
+The project is split in 2 folders.
+
+`apps/`:
+- `docs/`: The documentation website of the library
+- `examples/`: A small expo app to test your changes while developping
+
+`packages/`:
+- `react-native-ficus-ui`: The main librairy along with its components, hooks and theme.
+- ... other configuration and helper packages.
## Development workflow
To get started with the project, run `pnpm install` in the root directory to install the required dependencies for each package:
@@ -12,32 +22,42 @@ To get started with the project, run `pnpm install` in the root directory to ins
pnpm install
```
-While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
+### Development
+While developing, you can run the [example app](/example/) to test your changes.
+
+To build the packages:
+
+```sh
+pnpm prepack
+```
-To start the packager:
+> [!NOTE]
+> ⚠️ Your changes in the library will be repercuted in the example app. But if you change the library's exports, you will need to rebuild the package.
+To start the example app:
```sh
-pnpm example start
+pnpm dev
```
To run the example app on Android:
```sh
-pnpm example android
+pnpm dev android
```
To run the example app on iOS:
```sh
-pnpm example ios
+pnpm dev ios
```
To run the example app on Web:
```sh
-pnpm example web
+pnpm dev web
```
+### Code quality
Make sure your code passes TypeScript and ESLint. Run the following to verify:
```sh
@@ -54,7 +74,37 @@ pnpm lint --fix
Remember to add tests for your change if possible. Run the unit tests by:
```sh
-pnpm test
+pnpm test:components
+```
+
+To test if all the CI steps are working all at once, you can use:
+```sh
+pnpm run ci
+```
+
+### Run the Documentation (To improve)
+
+To run the documentation in local development, there is a small workaround to properly resolve react-native dependencies.
+From the project root, you need to run:
+
+```sh
+pnpm -C ./apps/docs install
+```
+
+Then, you will be able to run:
+
+```sh
+pnpm docs:dev
+```
+
+If you want to be able to run the example app after running `pnpm -C ./apps/docs install`, you might need to clean your node_modules.
+
+### Clean
+
+To clean all node_modules and cache folders:
+
+```sh
+pnpm clean
```
@@ -95,10 +145,10 @@ The `package.json` file contains various scripts for common tasks:
- `pnpm typecheck`: type-check files with TypeScript.
- `pnpm lint`: lint files with ESLint.
-- `pnpm test`: run unit tests with Jest.
-- `pnpm example start`: start the Metro server for the example app.
-- `pnpm example android`: run the example app on Android.
-- `pnpm example ios`: run the example app on iOS.
+- `pnpm test:components`: run the library's components unit tests with Jest.
+- `pnpm examples start`: start the Metro server for the example app.
+- `pnpm examples android`: run the example app on Android.
+- `pnpm examples ios`: run the example app on iOS.
### Sending a pull request
diff --git a/docs/.eslintrc.json b/apps/docs/.eslintrc.json
similarity index 100%
rename from docs/.eslintrc.json
rename to apps/docs/.eslintrc.json
diff --git a/apps/docs/.npmrc b/apps/docs/.npmrc
new file mode 100644
index 00000000..ff16c131
--- /dev/null
+++ b/apps/docs/.npmrc
@@ -0,0 +1,2 @@
+# This is to ensure that the docs app has isolated node_modules to avoid dependency conflicts
+node-linker=isolated
\ No newline at end of file
diff --git a/docs/README.md b/apps/docs/README.md
similarity index 100%
rename from docs/README.md
rename to apps/docs/README.md
diff --git a/docs/components/authors.jsx b/apps/docs/components/authors.jsx
similarity index 100%
rename from docs/components/authors.jsx
rename to apps/docs/components/authors.jsx
diff --git a/docs/components/code-editor.jsx b/apps/docs/components/code-editor.jsx
similarity index 100%
rename from docs/components/code-editor.jsx
rename to apps/docs/components/code-editor.jsx
diff --git a/docs/components/demos/card.js b/apps/docs/components/demos/card.js
similarity index 100%
rename from docs/components/demos/card.js
rename to apps/docs/components/demos/card.js
diff --git a/docs/components/demos/responsive.js b/apps/docs/components/demos/responsive.js
similarity index 100%
rename from docs/components/demos/responsive.js
rename to apps/docs/components/demos/responsive.js
diff --git a/docs/components/demos/theme.js b/apps/docs/components/demos/theme.js
similarity index 100%
rename from docs/components/demos/theme.js
rename to apps/docs/components/demos/theme.js
diff --git a/docs/components/diagrams/cache.jsx b/apps/docs/components/diagrams/cache.jsx
similarity index 100%
rename from docs/components/diagrams/cache.jsx
rename to apps/docs/components/diagrams/cache.jsx
diff --git a/docs/components/diagrams/infinite.jsx b/apps/docs/components/diagrams/infinite.jsx
similarity index 100%
rename from docs/components/diagrams/infinite.jsx
rename to apps/docs/components/diagrams/infinite.jsx
diff --git a/docs/components/diagrams/pagination.jsx b/apps/docs/components/diagrams/pagination.jsx
similarity index 100%
rename from docs/components/diagrams/pagination.jsx
rename to apps/docs/components/diagrams/pagination.jsx
diff --git a/docs/components/diagrams/use-draw.js b/apps/docs/components/diagrams/use-draw.js
similarity index 100%
rename from docs/components/diagrams/use-draw.js
rename to apps/docs/components/diagrams/use-draw.js
diff --git a/docs/components/diagrams/welcome.jsx b/apps/docs/components/diagrams/welcome.jsx
similarity index 100%
rename from docs/components/diagrams/welcome.jsx
rename to apps/docs/components/diagrams/welcome.jsx
diff --git a/docs/components/expo-demo.jsx b/apps/docs/components/expo-demo.jsx
similarity index 100%
rename from docs/components/expo-demo.jsx
rename to apps/docs/components/expo-demo.jsx
diff --git a/docs/components/external.mdx b/apps/docs/components/external.mdx
similarity index 100%
rename from docs/components/external.mdx
rename to apps/docs/components/external.mdx
diff --git a/docs/components/iframe.jsx b/apps/docs/components/iframe.jsx
similarity index 100%
rename from docs/components/iframe.jsx
rename to apps/docs/components/iframe.jsx
diff --git a/docs/components/remote-utils.js b/apps/docs/components/remote-utils.js
similarity index 100%
rename from docs/components/remote-utils.js
rename to apps/docs/components/remote-utils.js
diff --git a/docs/components/video.jsx b/apps/docs/components/video.jsx
similarity index 100%
rename from docs/components/video.jsx
rename to apps/docs/components/video.jsx
diff --git a/docs/license.md b/apps/docs/license.md
similarity index 100%
rename from docs/license.md
rename to apps/docs/license.md
diff --git a/docs/middleware.js b/apps/docs/middleware.js
similarity index 100%
rename from docs/middleware.js
rename to apps/docs/middleware.js
diff --git a/docs/next-env.d.ts b/apps/docs/next-env.d.ts
similarity index 100%
rename from docs/next-env.d.ts
rename to apps/docs/next-env.d.ts
diff --git a/docs/next.config.mjs b/apps/docs/next.config.mjs
similarity index 100%
rename from docs/next.config.mjs
rename to apps/docs/next.config.mjs
diff --git a/docs/package.json b/apps/docs/package.json
similarity index 73%
rename from docs/package.json
rename to apps/docs/package.json
index 9b3b1ef1..1e461d5e 100644
--- a/docs/package.json
+++ b/apps/docs/package.json
@@ -1,7 +1,7 @@
{
+ "private": true,
"name": "react-native-ficus-ui-docs",
"author": "Nicolas Torion",
- "private": true,
"main": "index.js",
"scripts": {
"build": "next build",
@@ -26,9 +26,19 @@
"react-intersection-observer": "^8.26.2",
"react-live": "^4.1.7",
"react-native": "0.76.0",
- "react-native-ficus-ui": "1.3.0",
+ "react-native-ficus-ui": "workspace:*",
"react-native-vector-icons": "^10.2.0",
- "react-native-web": "^0.19.12"
+ "react-native-web": "^0.19.12",
+ "@gorhom/bottom-sheet": "5.0.4",
+ "@react-native-community/slider": "4.5.5",
+ "@shopify/flash-list": "1.7.1",
+ "react-native-animatable": "1.3.3",
+ "react-native-confirmation-code-field": "7.4.0",
+ "react-native-modal": "13.0.1",
+ "react-native-pager-view": "6.5.1",
+ "react-native-reanimated": "3.16.1",
+ "react-native-tab-view": "3.5.2",
+ "react-native-toast-message": "2.1.6"
},
"dependenciesMeta": {
"nextra": {
diff --git a/docs/pages/404.mdx b/apps/docs/pages/404.mdx
similarity index 100%
rename from docs/pages/404.mdx
rename to apps/docs/pages/404.mdx
diff --git a/docs/pages/500.mdx b/apps/docs/pages/500.mdx
similarity index 100%
rename from docs/pages/500.mdx
rename to apps/docs/pages/500.mdx
diff --git a/docs/pages/_app.mdx b/apps/docs/pages/_app.mdx
similarity index 100%
rename from docs/pages/_app.mdx
rename to apps/docs/pages/_app.mdx
diff --git a/docs/pages/_document.jsx b/apps/docs/pages/_document.jsx
similarity index 100%
rename from docs/pages/_document.jsx
rename to apps/docs/pages/_document.jsx
diff --git a/docs/pages/_meta.en-US.json b/apps/docs/pages/_meta.en-US.json
similarity index 100%
rename from docs/pages/_meta.en-US.json
rename to apps/docs/pages/_meta.en-US.json
diff --git a/docs/pages/demo.en-US.mdx b/apps/docs/pages/demo.en-US.mdx
similarity index 100%
rename from docs/pages/demo.en-US.mdx
rename to apps/docs/pages/demo.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/_meta.en-US.json b/apps/docs/pages/docs/Components/Inputs/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/Components/Inputs/_meta.en-US.json
rename to apps/docs/pages/docs/Components/Inputs/_meta.en-US.json
diff --git a/docs/pages/docs/Components/Inputs/checkbox.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/checkbox.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/checkbox.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/checkbox.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/input.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/input.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/input.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/input.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/pininput.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/pininput.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/pininput.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/pininput.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/radio.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/radio.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/radio.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/radio.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/select.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/select.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/select.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/select.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/slider.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/slider.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/slider.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/slider.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/switch.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/switch.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/switch.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/switch.en-US.mdx
diff --git a/docs/pages/docs/Components/Inputs/textarea.en-US.mdx b/apps/docs/pages/docs/Components/Inputs/textarea.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Inputs/textarea.en-US.mdx
rename to apps/docs/pages/docs/Components/Inputs/textarea.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/_meta.en-US.json b/apps/docs/pages/docs/Components/Layout/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/Components/Layout/_meta.en-US.json
rename to apps/docs/pages/docs/Components/Layout/_meta.en-US.json
diff --git a/docs/pages/docs/Components/Layout/box.en-US.mdx b/apps/docs/pages/docs/Components/Layout/box.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/box.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/box.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/center.en-US.mdx b/apps/docs/pages/docs/Components/Layout/center.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/center.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/center.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/flex.en-US.mdx b/apps/docs/pages/docs/Components/Layout/flex.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/flex.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/flex.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/hstack.en-US.mdx b/apps/docs/pages/docs/Components/Layout/hstack.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/hstack.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/hstack.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/safeareabox.en-US.mdx b/apps/docs/pages/docs/Components/Layout/safeareabox.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/safeareabox.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/safeareabox.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/scrollbox.en-US.mdx b/apps/docs/pages/docs/Components/Layout/scrollbox.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/scrollbox.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/scrollbox.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/stack.en-US.mdx b/apps/docs/pages/docs/Components/Layout/stack.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/stack.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/stack.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/tabs.en-US.mdx b/apps/docs/pages/docs/Components/Layout/tabs.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/tabs.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/tabs.en-US.mdx
diff --git a/docs/pages/docs/Components/Layout/vstack.en-US.mdx b/apps/docs/pages/docs/Components/Layout/vstack.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Layout/vstack.en-US.mdx
rename to apps/docs/pages/docs/Components/Layout/vstack.en-US.mdx
diff --git a/docs/pages/docs/Components/Lists/_meta.en-US.json b/apps/docs/pages/docs/Components/Lists/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/Components/Lists/_meta.en-US.json
rename to apps/docs/pages/docs/Components/Lists/_meta.en-US.json
diff --git a/docs/pages/docs/Components/Lists/flashlist.en-US.mdx b/apps/docs/pages/docs/Components/Lists/flashlist.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Lists/flashlist.en-US.mdx
rename to apps/docs/pages/docs/Components/Lists/flashlist.en-US.mdx
diff --git a/docs/pages/docs/Components/Lists/list.en-US.mdx b/apps/docs/pages/docs/Components/Lists/list.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Lists/list.en-US.mdx
rename to apps/docs/pages/docs/Components/Lists/list.en-US.mdx
diff --git a/docs/pages/docs/Components/Lists/sectionlist.en-US.mdx b/apps/docs/pages/docs/Components/Lists/sectionlist.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Lists/sectionlist.en-US.mdx
rename to apps/docs/pages/docs/Components/Lists/sectionlist.en-US.mdx
diff --git a/docs/pages/docs/Components/Touchables/_meta.en-US.json b/apps/docs/pages/docs/Components/Touchables/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/Components/Touchables/_meta.en-US.json
rename to apps/docs/pages/docs/Components/Touchables/_meta.en-US.json
diff --git a/docs/pages/docs/Components/Touchables/button.en-US.mdx b/apps/docs/pages/docs/Components/Touchables/button.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Touchables/button.en-US.mdx
rename to apps/docs/pages/docs/Components/Touchables/button.en-US.mdx
diff --git a/docs/pages/docs/Components/Touchables/icon-button.en-US.mdx b/apps/docs/pages/docs/Components/Touchables/icon-button.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Touchables/icon-button.en-US.mdx
rename to apps/docs/pages/docs/Components/Touchables/icon-button.en-US.mdx
diff --git a/docs/pages/docs/Components/Touchables/pressable.en-US.mdx b/apps/docs/pages/docs/Components/Touchables/pressable.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Touchables/pressable.en-US.mdx
rename to apps/docs/pages/docs/Components/Touchables/pressable.en-US.mdx
diff --git a/docs/pages/docs/Components/Touchables/touchable-highlight.en-US.mdx b/apps/docs/pages/docs/Components/Touchables/touchable-highlight.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Touchables/touchable-highlight.en-US.mdx
rename to apps/docs/pages/docs/Components/Touchables/touchable-highlight.en-US.mdx
diff --git a/docs/pages/docs/Components/Touchables/touchable-opacity.en-US.mdx b/apps/docs/pages/docs/Components/Touchables/touchable-opacity.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Touchables/touchable-opacity.en-US.mdx
rename to apps/docs/pages/docs/Components/Touchables/touchable-opacity.en-US.mdx
diff --git a/docs/pages/docs/Components/Touchables/touchable-without-feedback.en-US.mdx b/apps/docs/pages/docs/Components/Touchables/touchable-without-feedback.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/Touchables/touchable-without-feedback.en-US.mdx
rename to apps/docs/pages/docs/Components/Touchables/touchable-without-feedback.en-US.mdx
diff --git a/docs/pages/docs/Components/_meta.en-US.json b/apps/docs/pages/docs/Components/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/Components/_meta.en-US.json
rename to apps/docs/pages/docs/Components/_meta.en-US.json
diff --git a/docs/pages/docs/Components/avatar.en-US.mdx b/apps/docs/pages/docs/Components/avatar.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/avatar.en-US.mdx
rename to apps/docs/pages/docs/Components/avatar.en-US.mdx
diff --git a/docs/pages/docs/Components/badge.en-US.mdx b/apps/docs/pages/docs/Components/badge.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/badge.en-US.mdx
rename to apps/docs/pages/docs/Components/badge.en-US.mdx
diff --git a/docs/pages/docs/Components/divider.en-US.mdx b/apps/docs/pages/docs/Components/divider.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/divider.en-US.mdx
rename to apps/docs/pages/docs/Components/divider.en-US.mdx
diff --git a/docs/pages/docs/Components/draggable-modal.en-US.mdx b/apps/docs/pages/docs/Components/draggable-modal.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/draggable-modal.en-US.mdx
rename to apps/docs/pages/docs/Components/draggable-modal.en-US.mdx
diff --git a/docs/pages/docs/Components/icon.en-US.mdx b/apps/docs/pages/docs/Components/icon.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/icon.en-US.mdx
rename to apps/docs/pages/docs/Components/icon.en-US.mdx
diff --git a/docs/pages/docs/Components/image.en-US.mdx b/apps/docs/pages/docs/Components/image.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/image.en-US.mdx
rename to apps/docs/pages/docs/Components/image.en-US.mdx
diff --git a/docs/pages/docs/Components/modal.en-US.mdx b/apps/docs/pages/docs/Components/modal.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/modal.en-US.mdx
rename to apps/docs/pages/docs/Components/modal.en-US.mdx
diff --git a/docs/pages/docs/Components/spinner.en-US.mdx b/apps/docs/pages/docs/Components/spinner.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/spinner.en-US.mdx
rename to apps/docs/pages/docs/Components/spinner.en-US.mdx
diff --git a/docs/pages/docs/Components/text.en-US.mdx b/apps/docs/pages/docs/Components/text.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Components/text.en-US.mdx
rename to apps/docs/pages/docs/Components/text.en-US.mdx
diff --git a/docs/pages/docs/Hooks/_meta.en-US.json b/apps/docs/pages/docs/Hooks/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/Hooks/_meta.en-US.json
rename to apps/docs/pages/docs/Hooks/_meta.en-US.json
diff --git a/docs/pages/docs/Hooks/useDisclosure.en-US.mdx b/apps/docs/pages/docs/Hooks/useDisclosure.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Hooks/useDisclosure.en-US.mdx
rename to apps/docs/pages/docs/Hooks/useDisclosure.en-US.mdx
diff --git a/docs/pages/docs/Hooks/useMediaQuery.en-US.mdx b/apps/docs/pages/docs/Hooks/useMediaQuery.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Hooks/useMediaQuery.en-US.mdx
rename to apps/docs/pages/docs/Hooks/useMediaQuery.en-US.mdx
diff --git a/docs/pages/docs/Hooks/useTheme.en-US.mdx b/apps/docs/pages/docs/Hooks/useTheme.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Hooks/useTheme.en-US.mdx
rename to apps/docs/pages/docs/Hooks/useTheme.en-US.mdx
diff --git a/docs/pages/docs/Hooks/useToast.en-US.mdx b/apps/docs/pages/docs/Hooks/useToast.en-US.mdx
similarity index 100%
rename from docs/pages/docs/Hooks/useToast.en-US.mdx
rename to apps/docs/pages/docs/Hooks/useToast.en-US.mdx
diff --git a/docs/pages/docs/_meta.en-US.json b/apps/docs/pages/docs/_meta.en-US.json
similarity index 100%
rename from docs/pages/docs/_meta.en-US.json
rename to apps/docs/pages/docs/_meta.en-US.json
diff --git a/docs/pages/docs/customization.en-US.mdx b/apps/docs/pages/docs/customization.en-US.mdx
similarity index 100%
rename from docs/pages/docs/customization.en-US.mdx
rename to apps/docs/pages/docs/customization.en-US.mdx
diff --git a/docs/pages/docs/getting-started.en-US.mdx b/apps/docs/pages/docs/getting-started.en-US.mdx
similarity index 100%
rename from docs/pages/docs/getting-started.en-US.mdx
rename to apps/docs/pages/docs/getting-started.en-US.mdx
diff --git a/docs/pages/docs/responsive.en-US.mdx b/apps/docs/pages/docs/responsive.en-US.mdx
similarity index 100%
rename from docs/pages/docs/responsive.en-US.mdx
rename to apps/docs/pages/docs/responsive.en-US.mdx
diff --git a/docs/pages/index.en-US.mdx b/apps/docs/pages/index.en-US.mdx
similarity index 100%
rename from docs/pages/index.en-US.mdx
rename to apps/docs/pages/index.en-US.mdx
diff --git a/docs/postcss.config.js b/apps/docs/postcss.config.js
similarity index 100%
rename from docs/postcss.config.js
rename to apps/docs/postcss.config.js
diff --git a/docs/public/favicon/browserconfig.xml b/apps/docs/public/favicon/browserconfig.xml
similarity index 100%
rename from docs/public/favicon/browserconfig.xml
rename to apps/docs/public/favicon/browserconfig.xml
diff --git a/docs/public/favicon/favicon.ico b/apps/docs/public/favicon/favicon.ico
similarity index 100%
rename from docs/public/favicon/favicon.ico
rename to apps/docs/public/favicon/favicon.ico
diff --git a/docs/public/favicon/site.webmanifest b/apps/docs/public/favicon/site.webmanifest
similarity index 100%
rename from docs/public/favicon/site.webmanifest
rename to apps/docs/public/favicon/site.webmanifest
diff --git a/docs/public/ficus-logo.svg b/apps/docs/public/ficus-logo.svg
similarity index 100%
rename from docs/public/ficus-logo.svg
rename to apps/docs/public/ficus-logo.svg
diff --git a/docs/public/fonts/AntDesign.ttf b/apps/docs/public/fonts/AntDesign.ttf
similarity index 100%
rename from docs/public/fonts/AntDesign.ttf
rename to apps/docs/public/fonts/AntDesign.ttf
diff --git a/docs/public/fonts/Entypo.ttf b/apps/docs/public/fonts/Entypo.ttf
similarity index 100%
rename from docs/public/fonts/Entypo.ttf
rename to apps/docs/public/fonts/Entypo.ttf
diff --git a/docs/public/fonts/EvilIcons.ttf b/apps/docs/public/fonts/EvilIcons.ttf
similarity index 100%
rename from docs/public/fonts/EvilIcons.ttf
rename to apps/docs/public/fonts/EvilIcons.ttf
diff --git a/docs/public/fonts/Feather.ttf b/apps/docs/public/fonts/Feather.ttf
similarity index 100%
rename from docs/public/fonts/Feather.ttf
rename to apps/docs/public/fonts/Feather.ttf
diff --git a/docs/public/fonts/FontAwesome.ttf b/apps/docs/public/fonts/FontAwesome.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome.ttf
rename to apps/docs/public/fonts/FontAwesome.ttf
diff --git a/docs/public/fonts/FontAwesome5_Brands.ttf b/apps/docs/public/fonts/FontAwesome5_Brands.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome5_Brands.ttf
rename to apps/docs/public/fonts/FontAwesome5_Brands.ttf
diff --git a/docs/public/fonts/FontAwesome5_Regular.ttf b/apps/docs/public/fonts/FontAwesome5_Regular.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome5_Regular.ttf
rename to apps/docs/public/fonts/FontAwesome5_Regular.ttf
diff --git a/docs/public/fonts/FontAwesome5_Solid.ttf b/apps/docs/public/fonts/FontAwesome5_Solid.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome5_Solid.ttf
rename to apps/docs/public/fonts/FontAwesome5_Solid.ttf
diff --git a/docs/public/fonts/FontAwesome6_Brands.ttf b/apps/docs/public/fonts/FontAwesome6_Brands.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome6_Brands.ttf
rename to apps/docs/public/fonts/FontAwesome6_Brands.ttf
diff --git a/docs/public/fonts/FontAwesome6_Regular.ttf b/apps/docs/public/fonts/FontAwesome6_Regular.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome6_Regular.ttf
rename to apps/docs/public/fonts/FontAwesome6_Regular.ttf
diff --git a/docs/public/fonts/FontAwesome6_Solid.ttf b/apps/docs/public/fonts/FontAwesome6_Solid.ttf
similarity index 100%
rename from docs/public/fonts/FontAwesome6_Solid.ttf
rename to apps/docs/public/fonts/FontAwesome6_Solid.ttf
diff --git a/docs/public/fonts/Fontisto.ttf b/apps/docs/public/fonts/Fontisto.ttf
similarity index 100%
rename from docs/public/fonts/Fontisto.ttf
rename to apps/docs/public/fonts/Fontisto.ttf
diff --git a/docs/public/fonts/Foundation.ttf b/apps/docs/public/fonts/Foundation.ttf
similarity index 100%
rename from docs/public/fonts/Foundation.ttf
rename to apps/docs/public/fonts/Foundation.ttf
diff --git a/docs/public/fonts/Ionicons.ttf b/apps/docs/public/fonts/Ionicons.ttf
similarity index 100%
rename from docs/public/fonts/Ionicons.ttf
rename to apps/docs/public/fonts/Ionicons.ttf
diff --git a/docs/public/fonts/MaterialCommunityIcons.ttf b/apps/docs/public/fonts/MaterialCommunityIcons.ttf
similarity index 100%
rename from docs/public/fonts/MaterialCommunityIcons.ttf
rename to apps/docs/public/fonts/MaterialCommunityIcons.ttf
diff --git a/docs/public/fonts/MaterialIcons.ttf b/apps/docs/public/fonts/MaterialIcons.ttf
similarity index 100%
rename from docs/public/fonts/MaterialIcons.ttf
rename to apps/docs/public/fonts/MaterialIcons.ttf
diff --git a/docs/public/fonts/Octicons.ttf b/apps/docs/public/fonts/Octicons.ttf
similarity index 100%
rename from docs/public/fonts/Octicons.ttf
rename to apps/docs/public/fonts/Octicons.ttf
diff --git a/docs/public/fonts/SimpleLineIcons.ttf b/apps/docs/public/fonts/SimpleLineIcons.ttf
similarity index 100%
rename from docs/public/fonts/SimpleLineIcons.ttf
rename to apps/docs/public/fonts/SimpleLineIcons.ttf
diff --git a/docs/public/fonts/Zocial.ttf b/apps/docs/public/fonts/Zocial.ttf
similarity index 100%
rename from docs/public/fonts/Zocial.ttf
rename to apps/docs/public/fonts/Zocial.ttf
diff --git a/docs/public/img/banner.png b/apps/docs/public/img/banner.png
similarity index 100%
rename from docs/public/img/banner.png
rename to apps/docs/public/img/banner.png
diff --git a/docs/public/img/bearstudio-yellow.png b/apps/docs/public/img/bearstudio-yellow.png
similarity index 100%
rename from docs/public/img/bearstudio-yellow.png
rename to apps/docs/public/img/bearstudio-yellow.png
diff --git a/docs/public/img/bearstudio.png b/apps/docs/public/img/bearstudio.png
similarity index 100%
rename from docs/public/img/bearstudio.png
rename to apps/docs/public/img/bearstudio.png
diff --git a/docs/public/img/chakra.png b/apps/docs/public/img/chakra.png
similarity index 100%
rename from docs/public/img/chakra.png
rename to apps/docs/public/img/chakra.png
diff --git a/docs/public/stork.wasm b/apps/docs/public/stork.wasm
similarity index 100%
rename from docs/public/stork.wasm
rename to apps/docs/public/stork.wasm
diff --git a/docs/static/img/banner.png b/apps/docs/static/img/banner.png
similarity index 100%
rename from docs/static/img/banner.png
rename to apps/docs/static/img/banner.png
diff --git a/docs/styles.css b/apps/docs/styles.css
similarity index 100%
rename from docs/styles.css
rename to apps/docs/styles.css
diff --git a/docs/tailwind.config.js b/apps/docs/tailwind.config.js
similarity index 100%
rename from docs/tailwind.config.js
rename to apps/docs/tailwind.config.js
diff --git a/docs/theme.config.tsx b/apps/docs/theme.config.tsx
similarity index 100%
rename from docs/theme.config.tsx
rename to apps/docs/theme.config.tsx
diff --git a/docs/tsconfig.json b/apps/docs/tsconfig.json
similarity index 82%
rename from docs/tsconfig.json
rename to apps/docs/tsconfig.json
index ac1771d4..7d76c2d4 100644
--- a/docs/tsconfig.json
+++ b/apps/docs/tsconfig.json
@@ -16,7 +16,10 @@
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
- "@components/*": ["./components/*"]
+ "@components/*": ["./components/*"],
+ "react-native-ficus-ui": [
+ "../../packages/react-native-ficus-ui/src/index"
+ ]
},
"plugins": [
{
diff --git a/apps/examples/.gitignore b/apps/examples/.gitignore
new file mode 100644
index 00000000..c9d575d7
--- /dev/null
+++ b/apps/examples/.gitignore
@@ -0,0 +1,38 @@
+# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
+
+# dependencies
+node_modules/
+
+# Expo
+.expo/
+dist/
+web-build/
+expo-env.d.ts
+
+# Native
+*.orig.*
+*.jks
+*.p8
+*.p12
+*.key
+*.mobileprovision
+
+# Metro
+.metro-health-check*
+
+# debug
+npm-debug.*
+yarn-debug.*
+yarn-error.*
+
+# macOS
+.DS_Store
+*.pem
+
+# local env files
+.env*.local
+
+# typescript
+*.tsbuildinfo
+
+app-example
diff --git a/apps/examples/.npmrc b/apps/examples/.npmrc
new file mode 100644
index 00000000..d67f3748
--- /dev/null
+++ b/apps/examples/.npmrc
@@ -0,0 +1 @@
+node-linker=hoisted
diff --git a/example/README.md b/apps/examples/README.md
similarity index 100%
rename from example/README.md
rename to apps/examples/README.md
diff --git a/example/app.json b/apps/examples/app.json
similarity index 59%
rename from example/app.json
rename to apps/examples/app.json
index bba484af..af267362 100644
--- a/example/app.json
+++ b/apps/examples/app.json
@@ -1,17 +1,13 @@
{
"expo": {
- "name": "update-example",
- "slug": "update-example",
+ "name": "examples",
+ "slug": "examples",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
- "scheme": "ficus-ui-example",
+ "scheme": "myapp",
"userInterfaceStyle": "automatic",
- "splash": {
- "image": "./assets/images/splash.png",
- "resizeMode": "contain",
- "backgroundColor": "#ffffff"
- },
+ "newArchEnabled": true,
"ios": {
"supportsTablet": true
},
@@ -26,7 +22,18 @@
"output": "static",
"favicon": "./assets/images/favicon.png"
},
- "plugins": ["expo-router"],
+ "plugins": [
+ "expo-router",
+ [
+ "expo-splash-screen",
+ {
+ "image": "./assets/images/splash-icon.png",
+ "imageWidth": 200,
+ "resizeMode": "contain",
+ "backgroundColor": "#ffffff"
+ }
+ ]
+ ],
"experiments": {
"typedRoutes": true
}
diff --git a/example/app/_layout.tsx b/apps/examples/app/_layout.tsx
similarity index 100%
rename from example/app/_layout.tsx
rename to apps/examples/app/_layout.tsx
diff --git a/example/app/components/Avatar.tsx b/apps/examples/app/components/Avatar.tsx
similarity index 93%
rename from example/app/components/Avatar.tsx
rename to apps/examples/app/components/Avatar.tsx
index fccb1c27..e0db92d1 100644
--- a/example/app/components/Avatar.tsx
+++ b/apps/examples/app/components/Avatar.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { SafeAreaView } from 'react-native';
import {
Avatar,
@@ -99,10 +98,10 @@ const AvatarComponent = () => {
name="Omar Borji"
src="https://avatars.githubusercontent.com/u/80390318?s=60&v=4"
>
-
+
-
+
@@ -120,10 +119,10 @@ const AvatarComponent = () => {
name="Omar Borji"
src="https://avatars.githubusercontent.com/u/80390318?s=60&v=4"
>
-
+
-
+
diff --git a/example/app/components/Badge.tsx b/apps/examples/app/components/Badge.tsx
similarity index 89%
rename from example/app/components/Badge.tsx
rename to apps/examples/app/components/Badge.tsx
index 25ba7dc4..361c3dd7 100644
--- a/example/app/components/Badge.tsx
+++ b/apps/examples/app/components/Badge.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Badge, ScrollBox, Text, VStack } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView } from "react-native";
+import { Badge, ScrollBox, Text, VStack } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const BadgeComponent = () => {
return (
diff --git a/example/app/components/Box.tsx b/apps/examples/app/components/Box.tsx
similarity index 93%
rename from example/app/components/Box.tsx
rename to apps/examples/app/components/Box.tsx
index fdd58bd9..b4befc9b 100644
--- a/example/app/components/Box.tsx
+++ b/apps/examples/app/components/Box.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView, TouchableOpacity } from 'react-native';
-import { Box, ScrollBox, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView, TouchableOpacity } from "react-native";
+import { Box, ScrollBox, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const BoxComponent = () => {
return (
@@ -234,20 +233,13 @@ const BoxComponent = () => {
borderRadius="md"
h={150}
bgImg={{
- uri:
- 'https://venngage-wordpress.s3.amazonaws.com/uploads/2018/09/Monochrome-Type-Simple-Background-Image.jpg',
+ uri: "https://venngage-wordpress.s3.amazonaws.com/uploads/2018/09/Monochrome-Type-Simple-Background-Image.jpg",
}}
/>
-
+
Style any RN component with Ficus UI with "as" prop !
diff --git a/example/app/components/Button.tsx b/apps/examples/app/components/Button.tsx
similarity index 92%
rename from example/app/components/Button.tsx
rename to apps/examples/app/components/Button.tsx
index 0a500f70..3fc1cc28 100644
--- a/example/app/components/Button.tsx
+++ b/apps/examples/app/components/Button.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView, ScrollView } from 'react-native';
-import { Button, Icon, Text, HStack, VStack } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView, ScrollView } from "react-native";
+import { Button, Icon, Text, HStack, VStack } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const ButtonComponent = () => {
return (
@@ -12,7 +11,7 @@ const ButtonComponent = () => {
-
+
diff --git a/example/app/components/Center.tsx b/apps/examples/app/components/Center.tsx
similarity index 83%
rename from example/app/components/Center.tsx
rename to apps/examples/app/components/Center.tsx
index 3282541f..595c81ff 100644
--- a/example/app/components/Center.tsx
+++ b/apps/examples/app/components/Center.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Box, Center, ScrollBox, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView } from "react-native";
+import { Box, Center, ScrollBox, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const CenterComponent = () => {
return (
diff --git a/example/app/components/Checkbox.tsx b/apps/examples/app/components/Checkbox.tsx
similarity index 83%
rename from example/app/components/Checkbox.tsx
rename to apps/examples/app/components/Checkbox.tsx
index 5f6e1d6c..fa5b4f0b 100644
--- a/example/app/components/Checkbox.tsx
+++ b/apps/examples/app/components/Checkbox.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Box, Checkbox, CheckboxGroup, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView } from "react-native";
+import { Box, Checkbox, CheckboxGroup, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const CheckboxComponent = () => {
return (
@@ -50,17 +49,17 @@ const CheckboxComponent = () => {
- {['Option 1', 'Option 2', 'Option 3'].map((item) => (
+ {["Option 1", "Option 2", "Option 3"].map((item) => (
{({ isChecked }) => (
- {item}
+ {item}
)}
diff --git a/example/app/components/Divider.tsx b/apps/examples/app/components/Divider.tsx
similarity index 98%
rename from example/app/components/Divider.tsx
rename to apps/examples/app/components/Divider.tsx
index fb0b64be..05625546 100644
--- a/example/app/components/Divider.tsx
+++ b/apps/examples/app/components/Divider.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { SafeAreaView } from 'react-native';
import { Divider, Box, Text } from 'react-native-ficus-ui';
import ExampleSection from '@/src/ExampleSection';
diff --git a/example/app/components/DraggableModal.tsx b/apps/examples/app/components/DraggableModal.tsx
similarity index 74%
rename from example/app/components/DraggableModal.tsx
rename to apps/examples/app/components/DraggableModal.tsx
index 83ce5535..4f14ddd2 100644
--- a/example/app/components/DraggableModal.tsx
+++ b/apps/examples/app/components/DraggableModal.tsx
@@ -1,12 +1,11 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
+import { SafeAreaView } from "react-native";
import {
Button,
DraggableModal,
Text,
useDisclosure,
-} from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+} from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const DraggableModalComponent = () => {
const { isOpen, onOpen, onClose } = useDisclosure();
@@ -17,7 +16,7 @@ const DraggableModalComponent = () => {
diff --git a/example/app/components/FlashList.tsx b/apps/examples/app/components/FlashList.tsx
similarity index 63%
rename from example/app/components/FlashList.tsx
rename to apps/examples/app/components/FlashList.tsx
index 5048b5aa..214a876e 100644
--- a/example/app/components/FlashList.tsx
+++ b/apps/examples/app/components/FlashList.tsx
@@ -1,21 +1,20 @@
/* eslint-disable react-native/no-inline-styles */
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Box, Flex, FlashList, Text } from 'react-native-ficus-ui';
+import { SafeAreaView } from "react-native";
+import { Box, Flex, FlashList, Text } from "react-native-ficus-ui";
const FlashListComponent = () => {
const DATA = [
{
- id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba',
- title: 'First Item',
+ id: "bd7acbea-c1b1-46c2-aed5-3ad53abb28ba",
+ title: "First Item",
},
{
- id: '3ac68afc-c605-48d3-a4f8-fbd91aa97f63',
- title: 'Second Item',
+ id: "3ac68afc-c605-48d3-a4f8-fbd91aa97f63",
+ title: "Second Item",
},
{
- id: '58694a0f-3da1-471f-bd96-145571e29d72',
- title: 'Third Item',
+ id: "58694a0f-3da1-471f-bd96-145571e29d72",
+ title: "Third Item",
},
];
return (
diff --git a/example/app/components/Flex.tsx b/apps/examples/app/components/Flex.tsx
similarity index 66%
rename from example/app/components/Flex.tsx
rename to apps/examples/app/components/Flex.tsx
index a5b03cf2..ff478bc4 100644
--- a/example/app/components/Flex.tsx
+++ b/apps/examples/app/components/Flex.tsx
@@ -1,6 +1,5 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Flex, Text } from 'react-native-ficus-ui';
+import { SafeAreaView } from "react-native";
+import { Flex, Text } from "react-native-ficus-ui";
const FlexComponent = () => {
return (
diff --git a/example/app/components/Icon.tsx b/apps/examples/app/components/Icon.tsx
similarity index 87%
rename from example/app/components/Icon.tsx
rename to apps/examples/app/components/Icon.tsx
index ec111833..94740384 100644
--- a/example/app/components/Icon.tsx
+++ b/apps/examples/app/components/Icon.tsx
@@ -1,7 +1,6 @@
-import ExampleSection from '@/src/ExampleSection';
-import React from 'react';
-import { SafeAreaView, ScrollView } from 'react-native';
-import { Icon, HStack, Text } from 'react-native-ficus-ui';
+import ExampleSection from "@/src/ExampleSection";
+import { SafeAreaView, ScrollView } from "react-native";
+import { Icon, HStack, Text } from "react-native-ficus-ui";
const IconComponent = () => {
return (
diff --git a/example/app/components/IconButton.tsx b/apps/examples/app/components/IconButton.tsx
similarity index 93%
rename from example/app/components/IconButton.tsx
rename to apps/examples/app/components/IconButton.tsx
index e2189ff5..2a87cbda 100644
--- a/example/app/components/IconButton.tsx
+++ b/apps/examples/app/components/IconButton.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView, ScrollView } from 'react-native';
-import { IconButton, Icon, Text, HStack, VStack } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView, ScrollView } from "react-native";
+import { IconButton, Icon, Text, HStack, VStack } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const IconButtonComponent = () => {
return (
diff --git a/example/app/components/Image.tsx b/apps/examples/app/components/Image.tsx
similarity index 78%
rename from example/app/components/Image.tsx
rename to apps/examples/app/components/Image.tsx
index f299a33d..74a94657 100644
--- a/example/app/components/Image.tsx
+++ b/apps/examples/app/components/Image.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { SafeAreaView } from 'react-native';
import { Box, Image, Text } from 'react-native-ficus-ui';
@@ -14,8 +13,7 @@ const ImageComponent = () => {
w={300}
borderRadius={10}
source={{
- uri:
- 'https://www.picturethisai.com/wiki-image/1080/153400456440184865.jpeg',
+ uri: 'https://www.picturethisai.com/wiki-image/1080/153400456440184865.jpeg',
}}
/>
diff --git a/example/app/components/Input.tsx b/apps/examples/app/components/Input.tsx
similarity index 90%
rename from example/app/components/Input.tsx
rename to apps/examples/app/components/Input.tsx
index e4b1311b..a98130a9 100644
--- a/example/app/components/Input.tsx
+++ b/apps/examples/app/components/Input.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Icon, Input, Textarea, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView } from "react-native";
+import { Icon, Input, Textarea, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const InputComponent = () => {
return (
diff --git a/example/app/components/List.tsx b/apps/examples/app/components/List.tsx
similarity index 61%
rename from example/app/components/List.tsx
rename to apps/examples/app/components/List.tsx
index 8eef817e..3250db0c 100644
--- a/example/app/components/List.tsx
+++ b/apps/examples/app/components/List.tsx
@@ -1,21 +1,20 @@
/* eslint-disable react-native/no-inline-styles */
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Box, Flex, List, Text } from 'react-native-ficus-ui';
+import { SafeAreaView } from "react-native";
+import { Box, Flex, List, Text } from "react-native-ficus-ui";
const ListComponent = () => {
const DATA = [
{
- id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba',
- title: 'First Item',
+ id: "bd7acbea-c1b1-46c2-aed5-3ad53abb28ba",
+ title: "First Item",
},
{
- id: '3ac68afc-c605-48d3-a4f8-fbd91aa97f63',
- title: 'Second Item',
+ id: "3ac68afc-c605-48d3-a4f8-fbd91aa97f63",
+ title: "Second Item",
},
{
- id: '58694a0f-3da1-471f-bd96-145571e29d72',
- title: 'Third Item',
+ id: "58694a0f-3da1-471f-bd96-145571e29d72",
+ title: "Third Item",
},
];
return (
diff --git a/example/app/components/Modal.tsx b/apps/examples/app/components/Modal.tsx
similarity index 97%
rename from example/app/components/Modal.tsx
rename to apps/examples/app/components/Modal.tsx
index 07caa476..eefd5bca 100644
--- a/example/app/components/Modal.tsx
+++ b/apps/examples/app/components/Modal.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { SafeAreaView } from 'react-native';
import {
Button,
diff --git a/example/app/components/PinInput.tsx b/apps/examples/app/components/PinInput.tsx
similarity index 78%
rename from example/app/components/PinInput.tsx
rename to apps/examples/app/components/PinInput.tsx
index 146409e1..0c09e40b 100644
--- a/example/app/components/PinInput.tsx
+++ b/apps/examples/app/components/PinInput.tsx
@@ -4,11 +4,11 @@ import { PinInput, ScrollBox, Text } from 'react-native-ficus-ui';
import ExampleSection from '@/src/ExampleSection';
const PinInputComponent = () => {
- const [pinValue, setPinValue] = useState(null);
- const [pinValue2, setPinValue2] = useState(null);
- const [pinValue3, setPinValue3] = useState(null);
- const [pinValue4, setPinValue4] = useState(null);
- const [pinValue5, setPinValue5] = useState(null);
+ const [pinValue, setPinValue] = useState();
+ const [pinValue2, setPinValue2] = useState();
+ const [pinValue3, setPinValue3] = useState();
+ const [pinValue4, setPinValue4] = useState();
+ const [pinValue5, setPinValue5] = useState();
return (
@@ -19,6 +19,7 @@ const PinInputComponent = () => {
<>>}
onChangeText={setPinValue}
keyboardType="number-pad"
w={250}
@@ -28,6 +29,7 @@ const PinInputComponent = () => {
<>>}
onChangeText={setPinValue2}
keyboardType="number-pad"
cellCount={6}
@@ -36,6 +38,7 @@ const PinInputComponent = () => {
<>>}
value={pinValue3}
onChangeText={setPinValue3}
keyboardType="number-pad"
@@ -46,6 +49,7 @@ const PinInputComponent = () => {
<>>}
value={pinValue4}
onChangeText={setPinValue4}
keyboardType="number-pad"
@@ -54,6 +58,7 @@ const PinInputComponent = () => {
/>
<>>}
value={pinValue5}
onChangeText={setPinValue5}
keyboardType="number-pad"
diff --git a/example/app/components/Pressable.tsx b/apps/examples/app/components/Pressable.tsx
similarity index 95%
rename from example/app/components/Pressable.tsx
rename to apps/examples/app/components/Pressable.tsx
index c36e0743..2e3e1073 100644
--- a/example/app/components/Pressable.tsx
+++ b/apps/examples/app/components/Pressable.tsx
@@ -1,4 +1,3 @@
-import React from 'react';
import { SafeAreaView } from 'react-native';
import { Box, Pressable, Text } from 'react-native-ficus-ui';
diff --git a/example/app/components/Radio.tsx b/apps/examples/app/components/Radio.tsx
similarity index 69%
rename from example/app/components/Radio.tsx
rename to apps/examples/app/components/Radio.tsx
index a3c348de..3328abc1 100644
--- a/example/app/components/Radio.tsx
+++ b/apps/examples/app/components/Radio.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Badge, Box, Radio, RadioGroup, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView } from "react-native";
+import { Badge, Box, Radio, RadioGroup, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const RadioComponent = () => {
return (
@@ -11,19 +10,33 @@ const RadioComponent = () => {
-
-
-
-
-
+ Label
+
+ Label
+
+
+ Label
+
+
+ Label
+
+
+ Label
+
- Option 1} />
- Option 2} />
- Option 3} />
+ Option 1}>
+ Label
+
+ Option 2}>
+ Label
+
+ Option 3}>
+ Label
+
@@ -44,9 +57,9 @@ const RadioComponent = () => {
- {({ isChecked }: { isChecked: boolean }) => (
+ {({ isChecked }) => (
{
)}
- {({ isChecked }: { isChecked: boolean }) => (
+ {({ isChecked }) => (
{
)}
- {({ isChecked }: { isChecked: boolean }) => (
+ {({ isChecked }) => (
{
return (
diff --git a/example/app/components/ScrollBox.tsx b/apps/examples/app/components/ScrollBox.tsx
similarity index 94%
rename from example/app/components/ScrollBox.tsx
rename to apps/examples/app/components/ScrollBox.tsx
index 44a8719f..f70a2d89 100644
--- a/example/app/components/ScrollBox.tsx
+++ b/apps/examples/app/components/ScrollBox.tsx
@@ -1,7 +1,6 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Box, ScrollBox, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import { SafeAreaView } from "react-native";
+import { Box, ScrollBox, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
const ScrollBoxComponent = () => {
return (
diff --git a/example/app/components/SectionList.tsx b/apps/examples/app/components/SectionList.tsx
similarity index 68%
rename from example/app/components/SectionList.tsx
rename to apps/examples/app/components/SectionList.tsx
index 3a61de6b..6e0f088e 100644
--- a/example/app/components/SectionList.tsx
+++ b/apps/examples/app/components/SectionList.tsx
@@ -1,20 +1,19 @@
-import React from 'react';
-import { SafeAreaView } from 'react-native';
-import { Box, Flex, SectionList, Text } from 'react-native-ficus-ui';
+import { SafeAreaView } from "react-native";
+import { Box, Flex, SectionList, Text } from "react-native-ficus-ui";
const SectionListComponent = () => {
const DATA = [
{
- title: 'Main dishes',
- data: ['Pizza', 'Burger', 'Risotto'],
+ title: "Main dishes",
+ data: ["Pizza", "Burger", "Risotto"],
},
{
- title: 'Sides',
- data: ['French Fries', 'Onion Rings', 'Fried Shrimps'],
+ title: "Sides",
+ data: ["French Fries", "Onion Rings", "Fried Shrimps"],
},
{
- title: 'Drinks',
- data: ['Water', 'Coke', 'Beer'],
+ title: "Drinks",
+ data: ["Water", "Coke", "Beer"],
},
];
return (
diff --git a/example/app/components/Select.tsx b/apps/examples/app/components/Select.tsx
similarity index 82%
rename from example/app/components/Select.tsx
rename to apps/examples/app/components/Select.tsx
index 9d807726..53b91956 100644
--- a/example/app/components/Select.tsx
+++ b/apps/examples/app/components/Select.tsx
@@ -1,15 +1,16 @@
-import React, { useState } from 'react';
-import { SafeAreaView } from 'react-native';
-import { Button, Select, Option, Text } from 'react-native-ficus-ui';
-import ExampleSection from '@/src/ExampleSection';
+import React, { useState } from "react";
+import { SafeAreaView } from "react-native";
+import { Button, Select, Option, Text } from "react-native-ficus-ui";
+import ExampleSection from "@/src/ExampleSection";
+import { SelectRef } from "react-native-ficus-ui/lib/typescript/src/components/select/select.type";
const SelectComponent = () => {
const [selectValue, setSelectedValue] = useState(null);
const [selectMultiValue, setSelectedMultiValue] = useState([]);
const [selectSubmitValue, setSelectedSubmitValue] = useState(null);
- const selectRef = React.createRef();
- const selectMultiRef = React.createRef();
- const selectSubmitRef = React.createRef();
+ const selectRef = React.createRef();
+ const selectMultiRef = React.createRef();
+ const selectSubmitRef = React.createRef();
return (
@@ -26,7 +27,7 @@ const SelectComponent = () => {
}
}}
>
- {selectValue ? selectValue.toString() : 'Select'}
+ {selectValue ? selectValue : "Select"}