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

Commit

Permalink
Merge pull request #280 from chakra-ui/develop
Browse files Browse the repository at this point in the history
release @chakra-ui/[email protected]
  • Loading branch information
codebender828 authored Feb 27, 2023
2 parents 7c452f9 + 4564d8d commit a25addc
Show file tree
Hide file tree
Showing 87 changed files with 1,796 additions and 143 deletions.
34 changes: 34 additions & 0 deletions .changeset/spicy-doors-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"@chakra-ui/vue-composables": minor
"@chakra-ui/c-close-button": minor
"@chakra-ui/c-form-control": minor
"@chakra-ui/c-live-region": minor
"@chakra-ui/c-media-query": minor
"@chakra-ui/c-scroll-lock": minor
"@chakra-ui/c-breadcrumb": minor
"@chakra-ui/c-accordion": minor
"@chakra-ui/c-pin-input": minor
"@chakra-ui/c-checkbox": minor
"@chakra-ui/c-skip-nav": minor
"@chakra-ui/c-textarea": minor
"@chakra-ui/c-spinner": minor
"@chakra-ui/c-avatar": minor
"@chakra-ui/c-button": minor
"@chakra-ui/c-motion": minor
"@chakra-ui/vue-accessibilty": minor
"@chakra-ui/c-alert": minor
"@chakra-ui/c-image": minor
"@chakra-ui/c-input": minor
"@chakra-ui/c-modal": minor
"@chakra-ui/c-table": minor
"@chakra-ui/c-code": minor
"@chakra-ui/c-menu": minor
"@chakra-ui/vue-layout": minor
"@chakra-ui/vue-system": minor
"@chakra-ui/c-tag": minor
"@chakra-ui/vue-utils": minor
"@chakra-ui/vue-next": minor
---

Create Live Region, Textarea and useBreakpoint and useBreakpointValue hooks and
components
14 changes: 12 additions & 2 deletions @types/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Typescript support for @chakra-ui/vue-next2.1.0-beta.2 auto-imported
* Typescript support for @chakra-ui/vue-next2.1.0-beta.3 auto-imported
* components using `unplugin-vue-components,`
*
* @see: https://github.com/antfu/unplugin-vue-components/#typescript
*
* This is a generated file. Do not edit it's contents.
*
* This file was generated on 2023-02-25T17:54:59.918Z
* This file was generated on 2023-02-26T20:07:20.175Z
*/

import { ChakraProps, chakra } from "@chakra-ui/vue-system"
Expand Down Expand Up @@ -155,9 +155,19 @@ declare module "@vue/runtime-core" {
CStack: typeof import("@chakra-ui/vue-next")["CStack"]
CStackDivider: typeof import("@chakra-ui/vue-next")["CStackDivider"]
CStackItem: typeof import("@chakra-ui/vue-next")["CStackItem"]
CTable: typeof import("@chakra-ui/vue-next")["CTable"]
CTableCaption: typeof import("@chakra-ui/vue-next")["CTableCaption"]
CTableContainer: typeof import("@chakra-ui/vue-next")["CTableContainer"]
CTbody: typeof import("@chakra-ui/vue-next")["CTbody"]
CTd: typeof import("@chakra-ui/vue-next")["CTd"]
CText: typeof import("@chakra-ui/vue-next")["CText"]
CTextarea: typeof import("@chakra-ui/vue-next")["CTextarea"]
CTfoot: typeof import("@chakra-ui/vue-next")["CTfoot"]
CTh: typeof import("@chakra-ui/vue-next")["CTh"]
CThead: typeof import("@chakra-ui/vue-next")["CThead"]
CThemeProvider: typeof import("@chakra-ui/vue-next")["CThemeProvider"]
CToastContainer: typeof import("@chakra-ui/vue-next")["CToastContainer"]
CTr: typeof import("@chakra-ui/vue-next")["CTr"]
CUnorderedList: typeof import("@chakra-ui/vue-next")["CUnorderedList"]
CVStack: typeof import("@chakra-ui/vue-next")["CVStack"]
CVisuallyHidden: typeof import("@chakra-ui/vue-next")["CVisuallyHidden"]
Expand Down
11 changes: 6 additions & 5 deletions _templates/generator/component/package.json.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json
{
"name": "<%= '@chakra-ui/' + h.changeCase.paramCase(name)%>",
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.sentence(description) + ' component'%>",
"version": "0.0.0-next.0",
"main": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
"module": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>",
"version": "0.0.0-beta.0",
"author": "Jonathan Bakebwa <codebender828@gmail.com>",
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"require": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
"default": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>"
"require": "./dist/index.js",
"default": "./dist/index.mjs"
}
},
"repository": {
Expand Down
14 changes: 4 additions & 10 deletions _templates/generator/component/tsup.config.ts.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,14 @@ import EsbuildPluginJSX from "unplugin-vue-jsx/esbuild"
export default defineConfig({
clean: true,
target: "es2019",
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
esbuildPlugins: [
// @ts-expect-error `EsbuildPluginJSX` does not extend `tsup.Plugin` type.
EsbuildPluginJSX({
include: [/.[jt]sx?$/],
}),
}) as any,
],
metafile: true,
external: ["lodash.mergewith"],
format: ["esm", "cjs"],
entry: {
"<%=h.changeCase.paramCase(name)%>": "src/index.tsx",
},
entry: ["src/**/*.(ts|tsx)"],
keepNames: true,
})
40 changes: 24 additions & 16 deletions _templates/generator/module/package.json.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,37 @@ to: packages/<%=h.changeCase.paramCase(name)%>/package.json

{
"name": "<%= '@chakra-ui/' + h.changeCase.paramCase(name)%>",
"version": "0.0.0-next.0",
"main": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
"module": "<%= 'dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>",
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.pascalCase(name) + ' module'%>",
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
"author": "Jonathan Bakebwa [email protected]",
"version": "0.0.0-beta.0",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"require": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.cjs.js' %>",
"default": "<%= './dist/chakra-ui-' + h.changeCase.paramCase(name) + '.esm.js' %>"
"require": "./dist/index.js",
"default": "./dist/index.mjs"
}
},
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.pascalCase(name) + ' module'%>",
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
"author": "Jonathan Bakebwa [email protected]",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/chakra-ui/chakra-ui-vue-next.git"
},
"bugs": {
"url": "https://github.com/chakra-ui/chakra-ui-vue-next/issues"
},
"sideEffects": false,
"scripts": {
"build": "rimraf ./dist && concurrently yarn:build:*",
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps",
"watch": "concurrently yarn:watch:*",
"watch:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps --watch",
"watch:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps --watch",
"watch:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch --incremental"
"clean": "rimraf dist .turbo",
"build": "tsup && pnpm build:types",
"build:fast": "tsup",
"build:types": "tsup src --dts-only",
"types:check": "tsc --noEmit",
"dev": "tsup --watch"
}
}
23 changes: 11 additions & 12 deletions _templates/generator/tooling/package.json.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@ to: tooling/<%=h.changeCase.paramCase(name)%>/package.json
{
"name": "<%= '@chakra-ui/' + h.changeCase.paramCase(name)%>",
"version": "1.0.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"require": "./dist/cjs/index.js",
"default": "./dist/esm/index.js"
"require": "./dist/index.js",
"default": "./dist/index.mjs"
}
},
"description": "<%= 'Chakra UI Vue | ' + h.changeCase.pascalCase(name) + ' module'%>",
"repository": "https://github.com/chakra-ui/chakra-ui-vue-next.git",
"author": "Jonathan Bakebwa [email protected]",
"license": "MIT",
"scripts": {
"build": "rimraf ./dist && concurrently yarn:build:*",
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps",
"build:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
"watch": "concurrently yarn:watch:*",
"watch:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps --watch",
"watch:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps --watch",
"watch:types": "cross-env tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch --incremental"
"clean": "rimraf dist .turbo",
"build": "tsup && pnpm build:types",
"build:fast": "tsup",
"build:types": "tsup src --dts-only",
"types:check": "tsc --noEmit",
"dev": "tsup --watch"
}
}
14 changes: 12 additions & 2 deletions components.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Typescript support for @chakra-ui/vue-next2.1.0-beta.2 auto-imported
* Typescript support for @chakra-ui/vue-next2.1.0-beta.3 auto-imported
* components using `unplugin-vue-components,`
*
* @see: https://github.com/antfu/unplugin-vue-components/#typescript
*
* This is a generated file. Do not edit it's contents.
*
* This file was generated on 2023-02-25T17:54:59.918Z
* This file was generated on 2023-02-26T20:07:20.175Z
*/

import { ChakraProps, chakra } from "@chakra-ui/vue-system"
Expand Down Expand Up @@ -155,9 +155,19 @@ declare module "@vue/runtime-core" {
CStack: typeof import("@chakra-ui/vue-next")["CStack"]
CStackDivider: typeof import("@chakra-ui/vue-next")["CStackDivider"]
CStackItem: typeof import("@chakra-ui/vue-next")["CStackItem"]
CTable: typeof import("@chakra-ui/vue-next")["CTable"]
CTableCaption: typeof import("@chakra-ui/vue-next")["CTableCaption"]
CTableContainer: typeof import("@chakra-ui/vue-next")["CTableContainer"]
CTbody: typeof import("@chakra-ui/vue-next")["CTbody"]
CTd: typeof import("@chakra-ui/vue-next")["CTd"]
CText: typeof import("@chakra-ui/vue-next")["CText"]
CTextarea: typeof import("@chakra-ui/vue-next")["CTextarea"]
CTfoot: typeof import("@chakra-ui/vue-next")["CTfoot"]
CTh: typeof import("@chakra-ui/vue-next")["CTh"]
CThead: typeof import("@chakra-ui/vue-next")["CThead"]
CThemeProvider: typeof import("@chakra-ui/vue-next")["CThemeProvider"]
CToastContainer: typeof import("@chakra-ui/vue-next")["CToastContainer"]
CTr: typeof import("@chakra-ui/vue-next")["CTr"]
CUnorderedList: typeof import("@chakra-ui/vue-next")["CUnorderedList"]
CVStack: typeof import("@chakra-ui/vue-next")["CVStack"]
CVisuallyHidden: typeof import("@chakra-ui/vue-next")["CVisuallyHidden"]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@babel/runtime": "^7.20.13",
"@chakra-ui/anatomy": "^2.0.1",
"@chakra-ui/nuxt-next": "workspace:*",
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/theme": "^2.2.5",
"@chakra-ui/theme-tools": "^2.0.17",
"@chakra-ui/theme-utils": "^2.0.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/c-accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*",
"@zag-js/accordion": "0.2.11",
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@zag-js/vue": "^0.2.9"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/c-alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build:types": "tsup src --dts-only"
},
"dependencies": {
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/c-icon": "workspace:*",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/c-avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@chakra-ui/c-icon": "workspace:*",
"@chakra-ui/c-image": "workspace:*",
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/theme-tools": "^2.0.17",
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-layout": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/c-breadcrumb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"build:types": "tsup src --dts-only"
},
"dependencies": {
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/c-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*",
"@chakra-ui/styled-system": "2.5.1"
"@chakra-ui/styled-system": "2.6.1"
},
"peerDependencies": {
"vue": "3.2.47"
Expand Down
2 changes: 1 addition & 1 deletion packages/c-checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build:types": "tsup src --dts-only"
},
"dependencies": {
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/c-form-control": "workspace:*",
"@chakra-ui/c-motion": "workspace:*",
"@chakra-ui/utils": "2.0.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/c-close-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@chakra-ui/c-icon": "workspace:*",
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/c-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"build:types": "tsup src --dts-only"
},
"dependencies": {
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/c-form-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@chakra-ui/vue-composables": "workspace:*",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*",
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"csstype": "^3.1.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/c-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build:types": "tsup src --dts-only"
},
"dependencies": {
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/c-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build:types": "tsup src --dts-only"
},
"dependencies": {
"@chakra-ui/styled-system": "2.5.1",
"@chakra-ui/styled-system": "2.6.1",
"@chakra-ui/utils": "2.0.15",
"@chakra-ui/vue-system": "workspace:*",
"@chakra-ui/vue-utils": "workspace:*",
Expand Down
14 changes: 14 additions & 0 deletions packages/c-live-region/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `@chakra-ui/c-live-region`

Creates a hidden live region with dynamic content based on triggered events to be read out by the screen reader on change of the content

## Installation

```sh
# with pnpm
pnpm add @chakra-ui/c-live-region
# or with Yarn
yarn i @chakra-ui/c-live-region
# or with npm
npm i @chakra-ui/c-live-region
```
9 changes: 9 additions & 0 deletions packages/c-live-region/examples/simple-live-region.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<button @click="region.speak('Filtering categories was successful')">
Click Me
</button>
</template>
<script setup lang="ts">
import { useLiveRegion } from "../src/use-live-region"
const region = useLiveRegion()
</script>
1 change: 1 addition & 0 deletions packages/c-live-region/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./src"
Loading

0 comments on commit a25addc

Please sign in to comment.