@momo-webplatform/mobase 0.0.3 → 0.0.4

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -12
  3. package/package.json +3 -10
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Shu Ding
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,23 +1,94 @@
1
- # Nextra Docs Template
1
+ <p align="center">
2
+ <a href="https://momo.vn/">
3
+ <img width="100%" src="https://homepage.momocdn.net/img/momo-upload-api-240307154531-638454231312111578.jpeg" alt="Mobase UI library" />
4
+ </a>
5
+ </p>
2
6
 
3
- This is a template for creating documentation with [Nextra](https://nextra.site).
7
+ # Mobase
4
8
 
5
- [**Live Demo →**](https://nextra-docs-template.vercel.app)
9
+ [![](https://img.shields.io/npm/v/@momo-webplatform/mobase?style=plastic)](https://www.npmjs.com/package/@momo-webplatform/mobase)
10
+ [![](https://img.shields.io/npm/dw/@momo-webplatform/mobase?style=plastic)](https://www.npmjs.com/package/@momo-webplatform/mobase)
6
11
 
7
- [![](.github/screenshot.png)](https://nextra-docs-template.vercel.app)
12
+ Mobase is MoMo website design system, a collection of guidelines, components and tools for creating intuitive, user-first experiences.
8
13
 
9
- ## Quick Start
14
+ With Mobase, you get a range of pre-built, customizable components that are easy to use and integrate into your React projects. It also comes with full TypeScript support, ensuring type safety and developer-friendly experience.
10
15
 
11
- Click the button to clone this repository and deploy it on Vercel:
16
+ <a href="https://dev1.momo.vn:3000/"><strong>Get Started with Mobase &rarr;</strong></a>
12
17
 
13
- [![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false)
18
+ ## Getting Started
14
19
 
15
- ## Local Development
20
+ Visit <a href="https://dev1.momo.vn:3000/" target="_blank">Mobase Docs</a> to get started.
16
21
 
17
- First, run `pnpm i` to install the dependencies.
22
+ ### Setup Tailwind CSS
18
23
 
19
- Then, run `pnpm dev` to start the development server and visit localhost:3000.
24
+ Install Tailwind CSS:
20
25
 
21
- ## License
26
+ ```bash
27
+ pnpm i autoprefixer postcss tailwindcss
28
+ pnpm tailwindcss init -p
29
+ ```
22
30
 
23
- This project is licensed under the MIT License.
31
+ Point Tailwind CSS to files you have `className=".."` in:
32
+
33
+ ```javascript
34
+ module.exports = {
35
+ content: ["./src/**/*.{js,jsx,ts,tsx}" /* src folder, for example */],
36
+ theme: {
37
+ extend: {},
38
+ },
39
+ plugins: [],
40
+ };
41
+ ```
42
+
43
+ Add Tailwind CSS to a CSS file:
44
+
45
+ ```css
46
+ @tailwind base;
47
+ @tailwind components;
48
+ @tailwind utilities;
49
+ ```
50
+
51
+ ### Install Mobase React
52
+
53
+ 1. Run the following command to install `@momo-webplatform/mobase`:
54
+
55
+ ```bash
56
+ npm i @momo-webplatform/mobase
57
+ ```
58
+
59
+ 2. Add the Mobase plugin to `tailwind.config.js`, and include content from `@momo-webplatform/mobase`:
60
+
61
+ ```js
62
+ /** @type {import('tailwindcss').Config} */
63
+ export default {
64
+ content: [
65
+ // ...
66
+ "node_modules/@momo-webplatform/mobase/lib/esm/**/*.js",
67
+ ],
68
+ plugins: [
69
+ // ...
70
+ ],
71
+ };
72
+ ```
73
+
74
+ ### Try it out
75
+
76
+ How you use Mobase React depends on your project setup. In general, you can just import the components you want to use from `@momo-webplatform/mobase` and use them in a React `.jsx` file:
77
+
78
+ ```tsx
79
+ import { Button } from "@momo-webplatform/mobase";
80
+
81
+ export default function MyPage() {
82
+ return (
83
+ <div>
84
+ <Button>Click me</Button>
85
+ </div>
86
+ );
87
+ }
88
+ ```
89
+
90
+ ## Figma
91
+
92
+ If you need the Figma files for the components you can check out our website for more information:
93
+
94
+ 🎨 [Get access to the Figma design files](https://dev1.momo.vn:3000/figma/)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momo-webplatform/mobase",
3
- "version": "0.0.3",
4
- "description": "Nextra docs template",
3
+ "version": "0.0.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
  "scripts": {
6
6
  "dev": "next dev",
7
7
  "build": "next build",
@@ -13,10 +13,6 @@
13
13
  "build-storybook": "storybook build",
14
14
  "release": "standard-version -a"
15
15
  },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/shuding/nextra-docs-template.git"
19
- },
20
16
  "publishConfig": {
21
17
  "access": "public"
22
18
  },
@@ -26,10 +22,7 @@
26
22
  ],
27
23
  "author": "MoMo - Front-end dev",
28
24
  "license": "MIT",
29
- "bugs": {
30
- "url": "https://github.com/shuding/nextra-docs-template/issues"
31
- },
32
- "homepage": "https://github.com/shuding/nextra-docs-template#readme",
25
+ "homepage": "https://momo.vn/",
33
26
  "dependencies": {
34
27
  "@floating-ui/react": "^0.26.2",
35
28
  "@heroicons/react": "1.0.6",