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

Commit 2024423

Browse files
Merge pull request #91 from chakra-ui/feat/form-control
feat: add `CFormControl` component
2 parents 874ce27 + 17dafd6 commit 2024423

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1069
-185
lines changed

.DS_Store

-6 KB
Binary file not shown.

.changeset/dry-mayflies-deny.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
'@chakra-ui/c-accordion': minor
3+
'@chakra-ui/c-alert': minor
4+
'@chakra-ui/c-breadcrumb': minor
5+
'@chakra-ui/c-button': minor
6+
'@chakra-ui/c-close-button': minor
7+
'@chakra-ui/c-code': minor
8+
'@chakra-ui/c-color-mode': minor
9+
'@chakra-ui/c-flex': minor
10+
'@chakra-ui/c-focus-lock': minor
11+
'@chakra-ui/c-form-control': minor
12+
'@chakra-ui/c-icon': minor
13+
'@chakra-ui/c-modal': minor
14+
'@chakra-ui/c-motion': minor
15+
'@chakra-ui/c-popper': minor
16+
'@chakra-ui/c-portal': minor
17+
'@chakra-ui/c-reset': minor
18+
'@chakra-ui/c-scroll-lock': minor
19+
'@chakra-ui/c-spinner': minor
20+
'@chakra-ui/c-theme-provider': minor
21+
'@chakra-ui/c-visually-hidden': minor
22+
'@chakra-ui/vue-next': minor
23+
'@chakra-ui/vue-layout': minor
24+
'@chakra-ui/nuxt-next': minor
25+
'@chakra-ui/vue-system': minor
26+
'@chakra-ui/vue-test-utils': minor
27+
'@chakra-ui/vue-theme': minor
28+
'@chakra-ui/vue-theme-tools': minor
29+
'@chakra-ui/vue-utils': minor
30+
'@chakra-ui/vue-a11y': minor
31+
'@chakra-ui/vue-composables': minor
32+
'@chakra-ui/vue-auto-import': minor
33+
'@chakra-ui/vue-docs': minor
34+
---
35+
36+
Create `CFormControl` component

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ dist
44
yarn-error.log
55
test-vite-project
66

7+
.DS_Store
8+
79
# Logs
810
logs
911
*.log
@@ -97,6 +99,12 @@ dist
9799

98100
# vscode history extension
99101
.history
102+
103+
# SSG
100104
website/.vite-ssg-temp
105+
106+
# npmrc
101107
.npmrc
108+
109+
# Cypress screenshots generated
102110
cypress/screenshots

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@ The official working repository for V1 of Chakra UI Vue with Vue 3 support.
99
yarn install
1010
```
1111

12-
### Build components
12+
### Watch components
1313
```bash
14-
yarn build
15-
```
16-
17-
### Bootstrap and link packages
18-
```bash
19-
yarn bootstrap
14+
yarn start
2015
```
2116

2217
### Component playground (based on vite)
2318
```bash
24-
yarn dev
19+
# In one background terminal (Only needs to be run once)
20+
yarn start
21+
22+
# In another terminal
23+
yarn playground:dev
2524
```
2625

2726
## Development Guide
2827
### Major todos:
29-
- [ ] Documentation
30-
- [ ] Accessibility JS hooks (Documented in Roadmap)
28+
- [-] Documentation (WIP)
29+
- [-] Accessibility JS hooks (WIP, Documented in Roadmap)
3130

3231
### Creating a new commit message
3332
The commits follow the [conventional commit format](https://www.conventionalcommits.org/). Husky is setup to lint your commit messages to match this format.

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

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
55
{
66
"name": "<%= '@chakra-ui/' + h.changeCase.paramCase(name)%>",
77
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.sentence(description) + ' component'%>",
8-
"version": "1.0.0",
9-
"main": "dist/cjs/index.js",
10-
"module": "dist/esm/index.js",
8+
"version": "0.0.0-alpha.0",
9+
"main": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
10+
"module": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>",
1111
"author": "Jonathan Bakebwa <codebender828@gmail.com>",
1212
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
1313
"license": "MIT",
@@ -16,13 +16,10 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
1616
],
1717
"exports": {
1818
".": {
19-
"require": "./dist/cjs/index.js",
20-
"default": "./dist/esm/index.js"
19+
"require": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
20+
"default": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>"
2121
}
2222
},
23-
"publishConfig": {
24-
"access": "public"
25-
},
2623
"repository": {
2724
"type": "git",
2825
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
@@ -31,22 +28,19 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
3128
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
3229
},
3330
"sideEffects": false,
34-
"scripts": {
35-
"build": "rimraf ./dist && concurrently yarn:build:*",
36-
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps",
37-
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps",
38-
"build:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
39-
"watch": "concurrently yarn:watch:*",
40-
"watch:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps --watch",
41-
"watch:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps --watch",
42-
"watch:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch --incremental"
31+
"scripts": {
32+
"clean": "rimraf dist"
4333
},
4434
"dependencies": {
45-
"@chakra-ui/styled-system": "^1.9.0",
46-
"@chakra-ui/vue-system": "*",
47-
"@chakra-ui/vue-utils": "*"
35+
"@chakra-ui/vue-system": "0.1.0-alpha.5"
36+
},
37+
"devDependencies": {
38+
"vue": "^3.1.4"
4839
},
4940
"peerDependencies": {
50-
"vue": ">=3.0.5"
41+
"vue": "^3.1.4"
42+
},
43+
"publishConfig": {
44+
"access": "public"
5145
}
5246
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
44

55
{
66
"name": "<%= '@chakra-ui/' + h.changeCase.paramCase(name)%>",
7-
"version": "1.0.0",
8-
"main": "dist/cjs/index.js",
9-
"module": "dist/esm/index.js",
7+
"version": "0.0.0-alpha.0",
8+
"main": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
9+
"module": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>",
1010
"files": [
1111
"dist"
1212
],
1313
"exports": {
1414
".": {
15-
"require": "./dist/cjs/index.js",
16-
"default": "./dist/esm/index.js"
15+
"require": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
16+
"default": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>"
1717
}
1818
},
1919
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.pascalCase(name) + ' module'%>",

docs/guides/component-guide.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,11 @@ start building, here's what you need to do:
7070
# 1. * Fixes all dependency resolutions in the respository*
7171
yarn pkgs:fix
7272
73-
# 2. * Build core package with export from new component
74-
yarn core build
73+
# 2. Watch packages
74+
yarn start
7575
76-
# 3. Start watching for changes in
77-
yarn pkg chakra-ui/COMPONENT_NAME watch
78-
79-
# 4. Starts development server
80-
yarn dev
76+
# 3. In second terminal, Starts development environment
77+
yarn playground:dev
8178
```
8279

8380

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@babel/preset-env": "^7.15.0",
5151
"@babel/preset-typescript": "^7.12.7",
5252
"@chakra-ui/styled-system": "^1.10.0",
53-
"@chakra-ui/utils": "1.8.2",
53+
"@chakra-ui/utils": "^1.8.2",
5454
"@changesets/changelog-github": "^0.3.0",
5555
"@changesets/cli": "^2.14.1",
5656
"@commitlint/cli": "^11.0.0",

packages/c-breadcrumb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"dependencies": {
3131
"@chakra-ui/styled-system": "^1.10.0",
32-
"@chakra-ui/utils": "1.8.2",
32+
"@chakra-ui/utils": "^1.8.2",
3333
"@chakra-ui/vue-system": "0.1.0-alpha.5",
3434
"@chakra-ui/vue-utils": "0.1.0-alpha.5"
3535
},

0 commit comments

Comments
 (0)