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

Commit 4bf2a10

Browse files
Merge pull request #99 from chakra-ui/feat/input
feat: input components
2 parents 60e270d + 829cb3c commit 4bf2a10

File tree

347 files changed

+7204
-4168
lines changed

Some content is hidden

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

347 files changed

+7204
-4168
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ parserOptions:
1515
sourceType: module
1616
plugins:
1717
- '@typescript-eslint'
18-
rules:
18+
rules:
1919
'@typescript-eslint/member-delimiter-style':
2020
- error
2121
- multiline:

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ lerna-debug.log*
1818
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1919

2020
# Runtime data
21-
pids
21+
pids
2222
*.pid
2323
*.seed
2424
*.pid.lock
@@ -107,4 +107,5 @@ website/.vite-ssg-temp
107107
.npmrc
108108

109109
# Cypress screenshots generated
110-
cypress/screenshots
110+
cypress/screenshots
111+
# playground/build/components.json

.prettierrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# .prettierrc or .prettierrc.yaml
2-
trailingComma: "es5"
2+
trailingComma: 'es5'
33
tabWidth: 2
44
semi: false
5-
singleQuote: true
5+
singleQuote: false

components.d.ts

Lines changed: 199 additions & 141 deletions
Large diffs are not rendered by default.

examples/vue-ssr/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
"dependencies": {
1111
"@chakra-ui/vue-system": "^0.1.0-alpha.4",
1212
"@vueuse/head": "^0.6.0",
13-
"vite-plugin-components": "^0.12.2",
13+
"unplugin-vue-components": "^0.14.0",
1414
"vite-plugin-pages": "^0.14.9",
1515
"vite-ssr": "^0.10.6",
1616
"vue": "3",
1717
"vue-router": "4"
1818
},
1919
"devDependencies": {
20-
"@vitejs/plugin-vue": "^1.2.4",
20+
"@vitejs/plugin-vue": "^1.10.2",
2121
"@vue/compiler-sfc": "^3.0.5",
2222
"typescript": "^4.1.3",
23-
"vite": "^2.4.0",
23+
"vite": "^2.6.13",
2424
"vue-tsc": "^0.0.24"
2525
}
2626
}

examples/vue-ssr/src/main.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import App from './App.vue'
2-
import viteSSR from 'vite-ssr'
3-
import { createHead } from '@vueuse/head'
4-
import routes from 'virtual:generated-pages'
5-
import Chakra, { chakra } from '@chakra-ui/vue-next'
6-
import { hydrate } from '@emotion/css'
7-
import { domElements } from '@chakra-ui/vue-system'
8-
import { extractCritical } from '@emotion/server'
1+
import App from "./App.vue"
2+
import viteSSR from "vite-ssr"
3+
import { createHead } from "@vueuse/head"
4+
import routes from "virtual:generated-pages"
5+
import Chakra, { chakra } from "@chakra-ui/vue-next"
6+
import { hydrate } from "@emotion/css"
7+
import { domElements } from "@chakra-ui/vue-system"
8+
import { extractCritical } from "@emotion/server"
99

1010
/**
1111
*
@@ -16,12 +16,12 @@ import { extractCritical } from '@emotion/server'
1616
const injectCritical = (html: string, ids: string[], css: string) =>
1717
html
1818
.replace(
19-
'</title>\n',
19+
"</title>\n",
2020
`</title>\n<script>window.$emotionSSRIds=${JSON.stringify(
2121
ids
2222
)}</script>\n`
2323
)
24-
.replace('</head>\n', `<style>${css}</style>\n</head>\n`)
24+
.replace("</head>\n", `<style>${css}</style>\n</head>\n`)
2525

2626
export default viteSSR(App, { routes }, ({ app, isClient }) => {
2727
/* custom logic */

examples/vue-ssr/src/shims-vue.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
declare module '*.vue' {
2-
import { DefineComponent } from 'vue'
1+
declare module "*.vue" {
2+
import { DefineComponent } from "vue"
33
const component: DefineComponent<{}, {}, any>
44
export default component
55
}
66

7-
declare module 'virtual:generated-pages' {
8-
import { RouteRecordRaw } from 'vue-router'
7+
declare module "virtual:generated-pages" {
8+
import { RouteRecordRaw } from "vue-router"
99
const routes: RouteRecordRaw[]
1010
export default routes
1111
}

examples/vue-ssr/vite.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { defineConfig } from 'vite'
2-
import vue from '@vitejs/plugin-vue'
3-
import viteSSR from 'vite-ssr/plugin.js'
4-
import Pages from 'vite-plugin-pages'
5-
import Components from 'vite-plugin-components'
6-
import { componentResolver } from '@chakra-ui/vue-auto-import'
1+
import { defineConfig } from "vite"
2+
import vue from "@vitejs/plugin-vue"
3+
import viteSSR from "vite-ssr/plugin.js"
4+
import Pages from "vite-plugin-pages"
5+
import Components from "unplugin-vue-components"
6+
import { componentResolver } from "@chakra-ui/vue-auto-import"
77

88
// https://vitejs.dev/config/
99
export default defineConfig({
1010
plugins: [
1111
vue(),
1212
viteSSR(),
1313
Pages({
14-
pagesDir: 'src/pages',
15-
extensions: ['vue', 'ts', 'tsx'],
14+
pagesDir: "src/pages",
15+
extensions: ["vue", "ts", "tsx"],
1616
}),
1717
Components({
1818
customComponentResolvers: [componentResolver],

package.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,21 @@
1616
"clean": "yarn workspaces run clean",
1717
"prebuild": "yarn clean",
1818
"build": "yarn preconstruct build",
19-
"postbuild": "yarn size-limit",
19+
"build:types": "ts-node scripts/generate-global-types.ts",
20+
"postbuild": "yarn build:types && yarn size-limit",
2021
"start": "preconstruct watch",
2122
"csb:install": "yarn && yarn bootstrap",
2223
"bootstrap": "yarn run lerna bootstrap",
2324
"scaffold": "hygen generator",
2425
"release": "yarn changeset publish",
26+
"preplaygound:dev": "node ./scripts/dev.js",
2527
"playground:dev": "NODE_ENV=development vite serve playground --config ./vite.config.ts --open",
28+
"preplaygound:build": "node ./scripts/dev.js",
2629
"playground:build": "yarn install && yarn build && NODE_ENV=production vite build playground --config ./vite.config.ts",
2730
"cy:open": "cypress open-ct",
2831
"cy:run": "cypress run-ct --quiet",
2932
"test:component": "yarn cy:run",
30-
"test": "jest && yarn cy:run",
33+
"test": "jest",
3134
"test:unit": "cross-env NODE_ENV=test jest --config jest.config.js",
3235
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
3336
"docs:dev:legacy": "vitepress dev docs",
@@ -57,7 +60,7 @@
5760
"@commitlint/config-conventional": "^11.0.0",
5861
"@cypress/snapshot": "^2.1.7",
5962
"@cypress/vite-dev-server": "^1.2.6",
60-
"@cypress/vue": "^3.0.1",
63+
"@cypress/vue": "^3.0.3",
6164
"@docusaurus/utils": "^2.0.0-beta.3",
6265
"@emotion/css": "^11.1.3",
6366
"@emotion/server": "^11.0.0",
@@ -82,7 +85,7 @@
8285
"@types/uuid": "^8.3.1",
8386
"@typescript-eslint/eslint-plugin": "^2.34.0",
8487
"@typescript-eslint/parser": "4.0.1",
85-
"@vitejs/plugin-vue": "^1.2.1",
88+
"@vitejs/plugin-vue": "^1.10.2",
8689
"@vitejs/plugin-vue-jsx": "^1.1.6",
8790
"@vue/babel-plugin-jsx": "^1.0.3",
8891
"@vue/compiler-sfc": "^3.1.4",
@@ -92,7 +95,7 @@
9295
"@vuedx/typecheck": "^0.4.1",
9396
"@vuedx/typescript-plugin-vue": "^0.4.1",
9497
"@vueuse/core": "4.9.1",
95-
"@vueuse/head": "^0.6.0",
98+
"@vueuse/head": "^0.7.4",
9699
"@vueuse/integrations": "^4.8.1",
97100
"@vueuse/motion": "^1.5.4",
98101
"aria-hidden": "^1.1.2",
@@ -102,7 +105,7 @@
102105
"change-case": "^4.1.1",
103106
"chokidar": "^3.5.1",
104107
"concurrently": "^5.3.0",
105-
"consola": "^2.15.0",
108+
"consola": "^2.15.3",
106109
"cross-env": "^7.0.2",
107110
"css-get-unit": "^1.0.1",
108111
"csstype": "^3.0.5",
@@ -111,7 +114,7 @@
111114
"cypress-plugin-tab": "^1.0.5",
112115
"dequal": "^2.0.2",
113116
"dom-focus-lock": "^1.0.4",
114-
"esbuild": "^0.12.12",
117+
"esbuild": "0.13.4",
115118
"esbuild-jest": "0.4.0",
116119
"esbuild-plugin-babel": "^0.2.3",
117120
"eslint": "^7.0.0",
@@ -147,18 +150,18 @@
147150
"tinycolor2": "^1.4.2",
148151
"ts-jest": "^26.5.0",
149152
"ts-node": "^9.0.0",
150-
"typescript": "^4.1.3",
151-
"vite": "^2.4.0",
153+
"typescript": "^4.5.4",
152154
"unplugin-vue-components": "^0.14.0",
155+
"vite": "^2.7.4",
153156
"vite-plugin-mdx-vue": "^1.1.3",
154-
"vite-plugin-pages": "^0.9.2",
157+
"vite-plugin-pages": "^0.18.2",
155158
"vite-plugin-vue-layouts": "^0.3.1",
156-
"vite-ssg": "^0.11.4",
157-
"vitepress": "^0.20.0",
158-
"vue": "^3.1.4",
159+
"vite-ssg": "^0.17.2",
160+
"vitepress": "^0.12.0",
161+
"vue": "^3.2.24",
159162
"vue-jest": "^5.0.0-alpha.7",
160163
"vue-prism-editor": "^2.0.0-alpha.2",
161-
"vue-router": "^4.0.10",
164+
"vue-router": "^4.0.12",
162165
"vue3-perfect-scrollbar": "^1.5.5"
163166
},
164167
"preconstruct": {

packages/c-accordion/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './src'
1+
export * from "./src"

0 commit comments

Comments
 (0)