onecart-ui 1.0.4 → 1.0.6
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/README.md +27 -0
- package/package.json +13 -8
package/README.md
CHANGED
|
@@ -362,6 +362,33 @@ yarn add onecart-ui
|
|
|
362
362
|
|
|
363
363
|
This package includes all the components, tokens, and utilities needed to build consistent UIs across React and React Native applications.
|
|
364
364
|
|
|
365
|
+
### React Version Compatibility
|
|
366
|
+
|
|
367
|
+
This package is compatible with React versions from 16.8.0 through the latest versions (including React 17, 18, and 19).
|
|
368
|
+
|
|
369
|
+
### React Native Compatibility
|
|
370
|
+
|
|
371
|
+
This library is designed to work with React Native versions from 0.60.0 through the latest versions (including 0.70.x, 0.71.x, 0.72.x and 0.73.x). When using with React Native, make sure to follow these steps:
|
|
372
|
+
|
|
373
|
+
1. Install the required dependencies:
|
|
374
|
+
```bash
|
|
375
|
+
npm install onecart-ui react-native-web
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
2. For Expo projects, no additional configuration is needed.
|
|
379
|
+
|
|
380
|
+
3. For bare React Native projects, ensure your Metro config includes the package:
|
|
381
|
+
```javascript
|
|
382
|
+
// metro.config.js
|
|
383
|
+
module.exports = {
|
|
384
|
+
resolver: {
|
|
385
|
+
extraNodeModules: {
|
|
386
|
+
'onecart-ui': path.resolve(__dirname, 'node_modules/onecart-ui'),
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
```
|
|
391
|
+
|
|
365
392
|
### Usage in Your Project
|
|
366
393
|
|
|
367
394
|
After installation, you can import components and use them in your application:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onecart-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Cross-platform React and React Native component library with white-label support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -35,10 +35,14 @@
|
|
|
35
35
|
"author": "",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0
|
|
39
|
-
"react-native": ">=0.60.0"
|
|
38
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
39
|
+
"react-native": ">=0.60.0 || >=0.70.0 || >=0.71.0 || >=0.72.0 || 0.73.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@babel/core": "7.28.0",
|
|
43
|
+
"@babel/preset-env": "7.28.0",
|
|
44
|
+
"@babel/preset-react": "7.27.1",
|
|
45
|
+
"@babel/preset-typescript": "7.27.1",
|
|
42
46
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
43
47
|
"@rollup/plugin-json": "6.1.0",
|
|
44
48
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
@@ -48,16 +52,17 @@
|
|
|
48
52
|
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
49
53
|
"@storybook/react-webpack5": "^9.0.4",
|
|
50
54
|
"@types/jest": "^29.5.14",
|
|
51
|
-
"@types/react": "^
|
|
52
|
-
"@types/react-dom": "^
|
|
55
|
+
"@types/react": "^18.2.0",
|
|
56
|
+
"@types/react-dom": "^18.2.0",
|
|
53
57
|
"@types/react-native": "^0.72.8",
|
|
54
58
|
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
55
59
|
"@typescript-eslint/parser": "^8.33.0",
|
|
56
60
|
"eslint": "^9.28.0",
|
|
57
61
|
"eslint-plugin-storybook": "^9.0.4",
|
|
58
62
|
"jest": "^29.7.0",
|
|
59
|
-
"react": "
|
|
60
|
-
"react
|
|
63
|
+
"metro-react-native-babel-preset": "0.76.8",
|
|
64
|
+
"react": "^18.3.1",
|
|
65
|
+
"react-dom": "^18.3.1",
|
|
61
66
|
"rollup": "^2.79.2",
|
|
62
67
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
63
68
|
"rollup-plugin-terser": "^7.0.2",
|
|
@@ -67,7 +72,7 @@
|
|
|
67
72
|
},
|
|
68
73
|
"dependencies": {
|
|
69
74
|
"figma-token-engine": "^0.3.0",
|
|
70
|
-
"react-native-web": "^0.
|
|
75
|
+
"react-native-web": "^0.19.10",
|
|
71
76
|
"style-dictionary": "^4.4.0"
|
|
72
77
|
}
|
|
73
78
|
}
|