@momo-webplatform/mobase 0.2.93 → 0.2.94
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 +65 -1
- package/package.json +22 -31
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ import { mobaseTW } from "@momo-webplatform/mobase";
|
|
|
36
36
|
const config = {
|
|
37
37
|
content: [
|
|
38
38
|
// ...
|
|
39
|
-
|
|
39
|
+
"node_modules/@momo-webplatform/mobase/dist/esm/**/*.js",
|
|
40
40
|
],
|
|
41
41
|
darkMode: ["class"],
|
|
42
42
|
plugins: [mobaseTW()],
|
|
@@ -63,6 +63,7 @@ const nextConfig = {
|
|
|
63
63
|
}
|
|
64
64
|
export default nextConfig;
|
|
65
65
|
```
|
|
66
|
+
|
|
66
67
|
### Install Mobase React
|
|
67
68
|
|
|
68
69
|
1. Run the following command to install `@momo-webplatform/mobase`:
|
|
@@ -107,3 +108,66 @@ export default function MyPage() {
|
|
|
107
108
|
If you need the Figma files for the components you can check out our website for more information:
|
|
108
109
|
|
|
109
110
|
🎨 [Get access to the Figma design files](https://dev1.momo.vn:3000/figma/)
|
|
111
|
+
|
|
112
|
+
## Dependencies
|
|
113
|
+
|
|
114
|
+
### `peerDependencies`
|
|
115
|
+
|
|
116
|
+
`peerDependencies` are dependencies which must be installed and have their versions controlled by the user of `mobase` in order for them to work correctly.
|
|
117
|
+
|
|
118
|
+
There are three types of `peerDependencies` in `mobase`:
|
|
119
|
+
|
|
120
|
+
#### 1. Framework
|
|
121
|
+
|
|
122
|
+
These dependencies are the environment in which `mobase` runs. The list of dependencies of this type are:
|
|
123
|
+
|
|
124
|
+
- `react`
|
|
125
|
+
- `next`
|
|
126
|
+
|
|
127
|
+
#### 2. User-Configurable Libraries
|
|
128
|
+
|
|
129
|
+
These dependencies require configuration or data directly from the user.
|
|
130
|
+
To prevent issues from breaking changes, it is essential that the versions used by `mobase` and the user are identical.
|
|
131
|
+
This is particularly important for internal changes not covered by official documentation (e.g., `react-hook-form`).
|
|
132
|
+
|
|
133
|
+
- `embla-carousel`: the base package for `embla-carousel-react`.
|
|
134
|
+
|
|
135
|
+
- `embla-carousel-react`:
|
|
136
|
+
|
|
137
|
+
Check the implementation of [`Carousel` component](./src/components/Carousel/Carousel.tsx). The user may pass their `opts` or `plugins` into this component for customizing.
|
|
138
|
+
|
|
139
|
+
- `react-hook-form`:
|
|
140
|
+
|
|
141
|
+
Check the implementation of [form-related components](./src/components/Form/Form.tsx). The user need to pass properties created by `useForm` on their side to make use of these components (`Form` component of `mobase` is `FormProvider` of `react-hook-form`).
|
|
142
|
+
|
|
143
|
+
- `react-day-picker`:
|
|
144
|
+
|
|
145
|
+
Check the implementation of [`Calendar` component](./src/components/Calendar/Calendar.tsx). The user can customize this component by passing props of `DayPicker` component from `react-day-picker`.
|
|
146
|
+
|
|
147
|
+
#### 3. Related Libraries
|
|
148
|
+
|
|
149
|
+
These dependencies are required by the user-configurable libraries listed above.
|
|
150
|
+
|
|
151
|
+
- `@hookform/resolvers`: A dependency of `react-hook-form`.
|
|
152
|
+
|
|
153
|
+
- `zod`: A dependency of `@hookform/resolvers`.
|
|
154
|
+
|
|
155
|
+
- `embla-carousel-autoplay`: A dependency of `embla-carousel`.
|
|
156
|
+
|
|
157
|
+
Please refer to this [JIRA ticket](https://atlassiansuite.mservice.com.vn:8443/browse/WP-1303) for additional context.
|
|
158
|
+
|
|
159
|
+
### `overrides` (`npm`, `pnpm`)/`resolutions` (`yarn`)
|
|
160
|
+
|
|
161
|
+
> **Important:** Use the following instructions with caution.
|
|
162
|
+
> Installing package versions not specified in `mobase`'s `package.json` may lead to unexpected errors, crashes, or other malfunctions.
|
|
163
|
+
> The `mobase` development team cannot guarantee support for issues resulting from such modifications.
|
|
164
|
+
|
|
165
|
+
To override a package version, you can utilize the `overrides`/`resolutions` feature of your package manager. This is useful in situations where the `mobase` team may have missed a peer dependency that conflicts with your project's version of the same package.
|
|
166
|
+
|
|
167
|
+
Consult the official documentation for more information:
|
|
168
|
+
|
|
169
|
+
- **`npm`/`pnpm`**: [doc](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#overrides).
|
|
170
|
+
|
|
171
|
+
- **`yarn` (legacy)**: [doc](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/).
|
|
172
|
+
|
|
173
|
+
- **`yarn` (modern)**: [doc](https://yarnpkg.com/configuration/manifest#resolutions).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-webplatform/mobase",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.94",
|
|
4
4
|
"description": "Mobase is the UI framework upon we build product experiences at MoMo.vn, base on Radix primitives, and Tailwind CSS.",
|
|
5
5
|
"author": "MoMo - Front-end dev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,49 +29,56 @@
|
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"devDependencies": {
|
|
32
|
+
"@hookform/resolvers": "^3.9.0",
|
|
32
33
|
"@swc/core": "^1.4.0",
|
|
33
34
|
"@turbo/gen": "^1.12.4",
|
|
34
35
|
"@types/color": "^3.0.6",
|
|
35
36
|
"@types/eslint": "^8.56.5",
|
|
36
|
-
"@types/lodash.omit": "^4.5.9",
|
|
37
37
|
"@types/node": "^20.11.24",
|
|
38
38
|
"@types/react": "^18.2.61",
|
|
39
39
|
"@types/react-dom": "^18.2.19",
|
|
40
40
|
"concurrently": "^8.2.2",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"embla-carousel": "^8.3.0",
|
|
42
|
+
"embla-carousel-autoplay": "^8.3.0",
|
|
43
|
+
"embla-carousel-react": "^8.3.0",
|
|
44
|
+
"eslint": "^8.57.1",
|
|
45
|
+
"next": "^13.0.0",
|
|
43
46
|
"react": "^18.2.0",
|
|
47
|
+
"react-day-picker": "^8.10.1",
|
|
48
|
+
"react-hook-form": "^7.53.1",
|
|
44
49
|
"tsup": "^8.0.2",
|
|
45
50
|
"typescript": "^5.3.3",
|
|
51
|
+
"zod": "^3.23.8",
|
|
46
52
|
"@repo/eslint-config": "0.0.0",
|
|
47
53
|
"@repo/typescript-config": "0.0.0"
|
|
48
54
|
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@hookform/resolvers": "^3.9.0",
|
|
57
|
+
"embla-carousel": "^8.3.0",
|
|
58
|
+
"embla-carousel-autoplay": "^8.3.0",
|
|
59
|
+
"embla-carousel-react": "^8.3.0",
|
|
60
|
+
"next": "^13.0.0",
|
|
61
|
+
"react": "^18.2.0",
|
|
62
|
+
"react-day-picker": "^8.10.1",
|
|
63
|
+
"react-hook-form": "^7.53.1",
|
|
64
|
+
"zod": "^3.23.8"
|
|
65
|
+
},
|
|
49
66
|
"dependencies": {
|
|
50
67
|
"@artsy/fresnel": "^8.0.1",
|
|
51
68
|
"@heroicons/react": "^2.1.1",
|
|
52
|
-
"@hookform/resolvers": "^3.9.0",
|
|
53
|
-
"@radix-ui/primitive": "^1.0.1",
|
|
54
69
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
55
70
|
"@radix-ui/react-alert-dialog": "^1.0.5",
|
|
56
71
|
"@radix-ui/react-aspect-ratio": "^1.0.3",
|
|
57
|
-
"@radix-ui/react-avatar": "^1.0.4",
|
|
58
72
|
"@radix-ui/react-checkbox": "^1.0.4",
|
|
59
|
-
"@radix-ui/react-collapsible": "^1.0.3",
|
|
60
|
-
"@radix-ui/react-compose-refs": "^1.0.1",
|
|
61
|
-
"@radix-ui/react-context": "^1.0.1",
|
|
62
73
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
63
74
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
64
|
-
"@radix-ui/react-hover-card": "^1.0.7",
|
|
65
75
|
"@radix-ui/react-icons": "^1.3.0",
|
|
66
76
|
"@radix-ui/react-label": "^2.1.0",
|
|
67
|
-
"@radix-ui/react-menubar": "^1.0.4",
|
|
68
77
|
"@radix-ui/react-navigation-menu": "^1.1.4",
|
|
69
78
|
"@radix-ui/react-popover": "^1.0.7",
|
|
70
|
-
"@radix-ui/react-presence": "^1.0.1",
|
|
71
79
|
"@radix-ui/react-primitive": "^1.0.3",
|
|
72
80
|
"@radix-ui/react-progress": "^1.0.3",
|
|
73
81
|
"@radix-ui/react-radio-group": "^1.1.3",
|
|
74
|
-
"@radix-ui/react-roving-focus": "^1.0.4",
|
|
75
82
|
"@radix-ui/react-select": "~2.1.0",
|
|
76
83
|
"@radix-ui/react-slider": "^1.1.2",
|
|
77
84
|
"@radix-ui/react-slot": "^1.1.0",
|
|
@@ -79,42 +86,26 @@
|
|
|
79
86
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
80
87
|
"@radix-ui/react-toast": "^1.1.5",
|
|
81
88
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
82
|
-
"@radix-ui/react-use-previous": "^1.0.1",
|
|
83
|
-
"@radix-ui/react-use-size": "^1.0.1",
|
|
84
|
-
"add": "^2.0.6",
|
|
85
89
|
"class-variance-authority": "^0.7.0",
|
|
86
90
|
"clsx": "^2.1.0",
|
|
87
91
|
"cmdk": "^0.2.1",
|
|
88
92
|
"color": "^4.2.3",
|
|
89
|
-
"color2k": "^2.0.3",
|
|
90
|
-
"cva": "1.0.0-beta.1",
|
|
91
93
|
"date-fns": "^3.6.0",
|
|
92
|
-
"deepmerge": "^4.3.1",
|
|
93
|
-
"embla-carousel-autoplay": "^8.3.0",
|
|
94
|
-
"embla-carousel-react": "^8.3.0",
|
|
95
94
|
"flat": "6.0.1",
|
|
96
95
|
"html-react-parser": "^5.1.10",
|
|
97
96
|
"html-to-image": "^1.11.13",
|
|
98
97
|
"input-otp": "^1.4.2",
|
|
99
98
|
"lodash": "^4.17.21",
|
|
100
|
-
"lodash-es": "^4.17.21",
|
|
101
|
-
"lodash.foreach": "^4.5.0",
|
|
102
|
-
"lodash.omit": "^4.5.0",
|
|
103
99
|
"lucide-react": "^0.307.0",
|
|
104
100
|
"lunisolar": "^2.5.0",
|
|
105
101
|
"motion": "^12.6.3",
|
|
106
|
-
"next": "^13.0.0",
|
|
107
102
|
"qrcode.react": "4.2.0",
|
|
108
|
-
"react-day-picker": "8.10.1",
|
|
109
|
-
"react-hook-form": "^7.53.1",
|
|
110
103
|
"react-use": "^17.5.0",
|
|
111
104
|
"react-use-measure": "^2.1.7",
|
|
112
|
-
"swiper": "^8.4.4",
|
|
113
105
|
"tailwind-merge": "2.4.0",
|
|
114
106
|
"tailwindcss": "*",
|
|
115
107
|
"ua-parser-js": "^1.0.38",
|
|
116
|
-
"vaul": "^1.1.2"
|
|
117
|
-
"zod": "^3.23.8"
|
|
108
|
+
"vaul": "^1.1.2"
|
|
118
109
|
},
|
|
119
110
|
"scripts": {
|
|
120
111
|
"build:cjs": "tsup --format cjs --external react",
|