Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 3536b9a

Browse files
committed
feat: add css reset component
1 parent d3b064a commit 3536b9a

File tree

12 files changed

+402
-9
lines changed

12 files changed

+402
-9
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,38 @@ yarn install
1414
yarn build
1515
```
1616

17+
### Bootstrap and link packages
18+
```bash
19+
yarn bootstrap
20+
```
21+
1722
### Component playground (based on vite)
1823
```bash
1924
yarn dev
2025
```
2126

27+
## Development Guide
28+
### 1. Creating new components
29+
Chakra UI Vue uses [hygen](https://www.hygen.io/) to generate new components. The component templates can be found in the `_templates/generator/component` directory
30+
31+
```bash
32+
yarn hygen component --name <COMPONENT_NAME> --description="MY_COMPONENT_DESCRIPTION"
33+
```
34+
35+
This creates a new package with the name `<COMPONENT_NAME>` with some basic sanity tests.
36+
37+
After creating your new package, run `yarn workspace @chakra-ui/COMPONENT_NAME && yarn bootstrap` to build and link your component in the monorepo.
38+
39+
Run `yarn dev` to view your new component in the playground.
40+
41+
**Additional notes:**
42+
Add a script for your package workspace in the `package.json` file.
43+
2244
### Major todos:
2345
- [ ] Documentation (to be based on Nuxt 3)
2446
- [ ] Accessibility JS hooks (Documented in Roadmap)
2547

48+
2649
#### Contributors' note:
2750
Hi!
2851

_templates/generator/component/package.json.ejs.t

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
1010
"module": "dist/esm/index.js",
1111
"types": "dist/types/index.d.ts",
1212
"typings": "dist/types/index.d.ts",
13-
"author": "Jonathan Bakebwa <codebender828@gmail.com>",
14-
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
15-
"license": "MIT",
16-
"files": [
17-
"dist"
18-
],
1913
"exports": {
2014
".": {
2115
"require": "./dist/cjs/index.js",
2216
"default": "./dist/esm/index.js"
2317
}
2418
},
19+
"author": "Jonathan Bakebwa <codebender828@gmail.com>",
20+
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
21+
"license": "MIT",
22+
"files": [
23+
"dist"
24+
],
25+
2526
"publishConfig": {
2627
"access": "public"
2728
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"system": "yarn workspace @chakra-ui/vue-system",
2828
"theme": "yarn workspace @chakra-ui/vue-theme",
2929
"nuxt": "yarn workspace @chakra-ui/nuxt-next",
30-
"test-utils": "yarn workspace @chakra-ui/vue-test-utils"
30+
"test-utils": "yarn workspace @chakra-ui/vue-test-utils",
31+
"c-reset": "yarn workspace @chakra-ui/c-reset"
3132
},
3233
"license": "MIT",
3334
"private": true,

packages/c-reset/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# @chakra-ui/c-reset
2+
3+
Chakra ui vue s lobal styles reset component
4+
5+
## Installation
6+
7+
```sh
8+
yarn add @chakra-ui/c-reset
9+
# or
10+
npm i @chakra-ui/c-reset
11+
```

packages/c-reset/package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "@chakra-ui/c-reset",
3+
"description": "Chakra UI Vue | Chakra ui vue s lobal styles reset component component",
4+
"version": "1.0.0",
5+
"main": "dist/cjs/index.js",
6+
"module": "dist/esm/index.js",
7+
"types": "dist/types/index.d.ts",
8+
"typings": "dist/types/index.d.ts",
9+
"exports": {
10+
".": {
11+
"require": "./dist/cjs/index.js",
12+
"default": "./dist/esm/index.js"
13+
}
14+
},
15+
"author": "Jonathan Bakebwa <[email protected]>",
16+
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
17+
"license": "MIT",
18+
"files": [
19+
"dist"
20+
],
21+
"repository": {
22+
"type": "git",
23+
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
24+
},
25+
"bugs": {
26+
"url": "https://github.com/chakra-ui/chakra-ui=vue-next/issues"
27+
},
28+
"scripts": {
29+
"build": "concurrently yarn:build:*",
30+
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts -d dist/esm --source-maps",
31+
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts -d dist/cjs --source-maps",
32+
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
33+
"watch": "concurrently yarn:watch:*",
34+
"watch:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts -d dist/esm --source-maps --watch",
35+
"watch:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts -d dist/cjs --source-maps --watch",
36+
"watch:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch"
37+
},
38+
"dependencies": {
39+
"@chakra-ui/styled-system": "^1.4.1",
40+
"@chakra-ui/vue-system": "*",
41+
"@chakra-ui/vue-utils": "*"
42+
},
43+
"peerDependencies": {
44+
"vue": ">=3.0.5"
45+
}
46+
}

0 commit comments

Comments
 (0)