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

Commit 748af9c

Browse files
Merge pull request #16 from chakra-ui/develop
feat: merge spinner, visually hidden, and button group components
2 parents f2c7799 + ce8db6e commit 748af9c

Some content is hidden

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

54 files changed

+1095
-474
lines changed

.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ extends:
66
- prettier/@typescript-eslint
77
- plugin:prettier/recommended
88
- plugin:vue/essential
9+
- plugin:vue/vue3-essential
910
- '@vue/typescript'
1011
parser: vue-eslint-parser
1112
parserOptions:

_templates/generator/component/examples.vue.ejs.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ to: packages/<%=h.changeCase.paramCase(name)%>/examples/base-<%=h.changeCase.par
33
---
44

55
<template>
6-
<<%=h.changeCase.pascalCase(name)%>> HELLO <%=h.changeCase.pascalCase(name)%> <<%=h.changeCase.pascalCase(name)%>>
6+
<<%=h.changeCase.paramCase(name)%>> HELLO <%=h.changeCase.pascalCase(name)%> </<%=h.changeCase.paramCase(name)%>>
77
</template>
88

99
<script lang="ts">

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ 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-
"exports": {
14-
".": {
15-
"require": "./dist/cjs/index.js",
16-
"default": "./dist/esm/index.js"
17-
}
18-
},
1913
"author": "Jonathan Bakebwa <codebender828@gmail.com>",
2014
"homepage": "https://github.com/chakra-ui/chakra-ui-vue-next#readme",
2115
"license": "MIT",

nodemon.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
"c-button": "yarn workspace @chakra-ui/c-button",
2626
"c-icon": "yarn workspace @chakra-ui/c-icon",
2727
"system": "yarn workspace @chakra-ui/vue-system",
28+
"utils": "yarn workspace @chakra-ui/vue-utils",
2829
"theme": "yarn workspace @chakra-ui/vue-theme",
2930
"nuxt": "yarn workspace @chakra-ui/nuxt-next",
3031
"test-utils": "yarn workspace @chakra-ui/vue-test-utils",
31-
"c-reset": "yarn workspace @chakra-ui/c-reset"
32+
"c-reset": "yarn workspace @chakra-ui/c-reset",
33+
"c-spinner": "yarn workspace @chakra-ui/c-spinner"
3234
},
3335
"license": "MIT",
3436
"private": true,
@@ -73,7 +75,6 @@
7375
"jest-transform-stub": "^2.0.0",
7476
"lerna": "^3.22.1",
7577
"lint-staged": "^10.5.3",
76-
"nodemon": "^2.0.7",
7778
"prettier": "^2.1.2",
7879
"pretty": "^2.0.0",
7980
"recursive-readdir": "^2.2.2",

packages/c-accordion/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const CAccordion = defineComponent({
99
},
1010
},
1111
setup(props, { slots, attrs }) {
12-
return () => h(chakra(props.as), { ...attrs }, slots)
12+
return () =>
13+
h(chakra(props.as, { label: 'accordion' }), { ...attrs }, slots)
1314
},
1415
})
1516

packages/c-accordion/tests/__snapshots__/c-accordion.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`should render properly 1`] = `
44
<DocumentFragment>
55
<div
6-
class="css-0"
6+
class="chakra-accordion css-0"
77
/>
88
</DocumentFragment>
99
`;

packages/c-alert/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"dependencies": {
2727
"@chakra-ui/styled-system": "^1.4.1",
2828
"@chakra-ui/vue-system": "*",
29+
"@chakra-ui/vue-utils": "*",
2930
"@chakra-ui/c-icon": "*"
3031
}
3132
}

packages/c-alert/src/alert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const CAlert = defineComponent({
9696

9797
return () =>
9898
h(
99-
chakra(props.as, 'alert'),
99+
chakra(props.as, { label: 'alert' }),
100100
{
101101
role: 'alert',
102102
...alertStyles,
@@ -119,7 +119,7 @@ export const CAlertTitle = defineComponent({
119119

120120
return () =>
121121
h(
122-
chakra('div', 'alert__title'),
122+
chakra('div', { label: 'alert__title' }),
123123
{
124124
...styles.title,
125125
...attrs,
@@ -141,7 +141,7 @@ export const CAlertDescription = defineComponent({
141141

142142
return () =>
143143
h(
144-
chakra('div', 'alert__description'),
144+
chakra('div', { label: 'alert__description' }),
145145
{
146146
...styles.description,
147147
...attrs,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<c-button-group variant="outline" is-attached>
3+
<c-button color-scheme="blue">Save</c-button>
4+
<c-button>Cancel</c-button>
5+
</c-button-group>
6+
</template>
7+
8+
<script lang="ts">
9+
import { CButton, CButtonGroup } from '@chakra-ui/c-button/src'
10+
import { defineComponent } from 'vue'
11+
12+
export default defineComponent({
13+
components: { CButton, CButtonGroup },
14+
})
15+
</script>

0 commit comments

Comments
 (0)