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

Commit b52d53f

Browse files
authored
Merge branch 'master' into patch-2
2 parents 82cc16a + 5eb20af commit b52d53f

File tree

27 files changed

+79
-26
lines changed

27 files changed

+79
-26
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,15 @@
256256
"code",
257257
"test"
258258
]
259+
},
260+
{
261+
"login": "ejirocodes",
262+
"name": "Ejiro Asiuwhu",
263+
"avatar_url": "https://avatars.githubusercontent.com/u/45228014?v=4",
264+
"profile": "http://linkedin.com/in/ejiro-asiuwhu",
265+
"contributions": [
266+
"doc"
267+
]
259268
}
260269
],
261270
"contributorsPerLine": 7,

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,12 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
218218
<td align="center"><a href="https://github.com/odanado"><img src="https://avatars.githubusercontent.com/u/6040962?v=4?s=50" width="50px;" alt=""/><br /><sub><b>odanado</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=odanado" title="Code">💻</a> <a href="#tool-odanado" title="Tools">🔧</a></td>
219219
</tr>
220220
<tr>
221+
<td align="center"><a href="https://github.com/IHIutch"><img src="https://avatars.githubusercontent.com/u/20825047?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Jonathan Hutchison</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=IHIutch" title="Code">💻</a> <a href="https://github.com/chakra-ui/chakra-ui-vue/issues?q=author%3AIHIutch" title="Bug reports">🐛</a> <a href="#ideas-IHIutch" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=IHIutch" title="Tests">⚠️</a> <a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=IHIutch" title="Documentation">📖</a></td>
221222
<td align="center"><a href="https://jt.houk.space/"><img src="https://avatars.githubusercontent.com/u/23695312?v=4?s=50" width="50px;" alt=""/><br /><sub><b>JT Houk</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=HoukasaurusRex" title="Documentation">📖</a> <a href="#platform-HoukasaurusRex" title="Packaging/porting to new platform">📦</a></td>
222223
<td align="center"><a href="https://github.com/vincentpalma"><img src="https://avatars.githubusercontent.com/u/10133632?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Vincent Palma</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=vincentpalma" title="Documentation">📖</a></td>
223224
<td align="center"><a href="https://github.com/MaySoMusician"><img src="https://avatars.githubusercontent.com/u/34566290?v=4?s=50" width="50px;" alt=""/><br /><sub><b>MaySoMusician</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=MaySoMusician" title="Code">💻</a></td>
224225
<td align="center"><a href="https://github.com/MWFIAE"><img src="https://avatars.githubusercontent.com/u/6072971?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Martin</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=MWFIAE" title="Code">💻</a> <a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=MWFIAE" title="Tests">⚠️</a></td>
226+
<td align="center"><a href="http://linkedin.com/in/ejiro-asiuwhu"><img src="https://avatars.githubusercontent.com/u/45228014?v=4?s=50" width="50px;" alt=""/><br /><sub><b>Ejiro Asiuwhu</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=ejirocodes" title="Documentation">📖</a></td>
225227
</tr>
226228
</table>
227229

packages/chakra-ui-core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## 0.9.2
4+
5+
### Patch Changes
6+
7+
- [`2627e9f`](https://github.com/chakra-ui/chakra-ui-vue/commit/2627e9f833ec62d4bc35703bcb3bb1293d20c391) [#455](https://github.com/chakra-ui/chakra-ui-vue/pull/455) Thanks [@codebender828](https://github.com/codebender828)! -
8+
39
## 0.9.1
410

511
### Patch Changes

packages/chakra-ui-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chakra-ui/vue",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"description": "Build Accessible and Responsive Vue.js websites and applications with speed ⚡️",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm/index.js",

packages/chakra-ui-core/src/CButton/CButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const CButton = {
105105
props: this.$props,
106106
attrs: {
107107
type: this.type,
108-
tabIndex: 0,
108+
tabindex: 0,
109109
disabled: this.isDisabled || this.isLoading,
110110
'aria-disabled': this.isDisabled || this.isLoading,
111111
dataActive: this.isActive ? 'true' : undefined,

packages/chakra-ui-core/src/CEditable/CEditable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const CEditablePreview = {
225225
opacity: !this.hasValue ? 0.6 : undefined
226226
}
227227
},
228-
tabIndex () {
228+
tabindex () {
229229
const { isEditing, isDisabled, isPreviewFocusable } = this.context
230230
if ((!isEditing || !isDisabled) && isPreviewFocusable) {
231231
return 0
@@ -243,7 +243,7 @@ const CEditablePreview = {
243243
class: [this.className],
244244
attrs: {
245245
'aria-disabled': isDisabled,
246-
tabIndex: this.tabIndex,
246+
tabindex: this.tabindex,
247247
...this.computedAttrs
248248
},
249249
on: {

packages/chakra-ui-core/src/CLink/CLink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const CLink = {
6363
...this.isRouterLink && { to: this.to }
6464
},
6565
attrs: {
66-
tabIndex: this.isDisabled ? -1 : undefined,
66+
tabindex: this.isDisabled ? -1 : undefined,
6767
'aria-disabled': this.isDisabled,
6868
...this.externalAttrs,
6969
...this.computedAttrs

packages/chakra-ui-core/src/CMenu/CMenu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ const CMenuList = {
415415
id: menuId,
416416
role: 'menu',
417417
'aria-labelledby': buttonId,
418-
tabIndex: -1,
418+
tabindex: -1,
419419
'data-chakra-component': 'CMenuButton'
420420
},
421421
on: {
@@ -484,7 +484,7 @@ const CMenuItem = {
484484
...this.menuItemStyles({ theme: this.theme, colorMode: this.colorMode }),
485485
...this.$attrs,
486486
role: this.role,
487-
tabIndex: -1,
487+
tabindex: -1,
488488
disabled: this.isDisabled,
489489
'aria-disabled': this.isDisabled,
490490
'data-chakra-component': 'CMenuItem'

packages/chakra-ui-core/src/CMenu/CMenuOption.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const CMenuItemOption = {
113113
alignItems: 'center',
114114
...this.$attrs,
115115
role: this.role,
116-
tabIndex: -1,
116+
tabindex: -1,
117117
'aria-checked': this.isChecked,
118118
disabled: this.isDisabled,
119119
'aria-disabled': this.isDisabled,

packages/chakra-ui-core/src/CModal/CModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ const CModalContent = {
445445
attrs: {
446446
role: 'dialog',
447447
'aria-modal': 'true',
448-
tabIndex: -1,
448+
tabindex: -1,
449449
id: contentId,
450450
...(addAriaDescribedby && { 'aria-describedby': bodyId }),
451451
...(addAriaLabelledby && { 'aria-labelledby': headerId }),

packages/chakra-ui-core/src/CPopover/CPopover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ const CPopoverContent = {
497497
_focus: { outline: 0, shadow: 'outline' },
498498
...this.$attrs,
499499
id: popoverId,
500-
tabIndex: -1,
500+
tabindex: -1,
501501
'aria-labelledby': this.headerId,
502502
'aria-describedby': this.bodyId,
503503
'aria-label': this.ariaLabel,

packages/chakra-ui-core/src/CPopover/CPopover.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ storiesOf('UI | Popover', module)
120120
<CPopover :closeOnBlur="false">
121121
<CPopoverTrigger>
122122
<CBox
123-
tabIndex="0"
123+
tabindex="0"
124124
role="button"
125125
aria-label="Some box"
126126
p="5"

packages/chakra-ui-core/src/CRadioButtonGroup/CRadioButtonGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const CRadioButtonGroup = {
157157
...(!isLastChild && spacingProps)
158158
},
159159
attrs: {
160-
tabIndex: getTabIndex()
160+
tabindex: getTabIndex()
161161
},
162162
nativeOn: {
163163
click: handleClick

packages/chakra-ui-core/src/CSlider/CSlider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ const CSliderThumb = {
456456
...this.computedAttrs,
457457
id: thumbId,
458458
role: 'slider',
459-
tabIndex: isDisabled ? undefined : 0,
459+
tabindex: isDisabled ? undefined : 0,
460460
'aria-disabled': isDisabled,
461461
'aria-valuemin': min,
462462
'aria-valuetext': valueText,

packages/chakra-ui-core/src/CStack/CStack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ const CStack = {
7676
}
7777
},
7878
render (h) {
79-
const children = this.$slots.default.filter(e => e.tag)
79+
const defaultSlot = this.$slots.default || []
80+
const children = defaultSlot.filter(e => e.tag)
8081
const stackables = children.map((node, index) => {
8182
const isLastChild = children.length === index + 1
8283
const spacingProps = this._isInline

packages/chakra-ui-core/src/CStack/tests/CStack.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ it('should render correctly', () => {
2626
expect(asFragment()).toMatchSnapshot()
2727
})
2828

29+
it('should render empty children correctly', () => {
30+
const { asFragment } = renderComponent({
31+
template: '<c-stack></c-stack>'
32+
})
33+
expect(asFragment()).toMatchSnapshot()
34+
})
35+
2936
it('should default to vertical stack', () => {
3037
renderComponent()
3138
const stack = screen.getByTestId('stack')

packages/chakra-ui-core/src/CStack/tests/__snapshots__/CStack.test.js.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@ exports[`should render correctly 1`] = `
147147
</DocumentFragment>
148148
`;
149149

150+
exports[`should render empty children correctly 1`] = `
151+
<DocumentFragment>
152+
<div
153+
class="css-j7qwjs css-0"
154+
data-chakra-component="CStack"
155+
/>
156+
</DocumentFragment>
157+
`;
158+
150159
exports[`should should stack native html elements 1`] = `
151160
<DocumentFragment>
152161
<div

packages/chakra-ui-core/src/CTabs/CTabs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ const CTab = {
373373
class: [this.className],
374374
attrs: {
375375
role: 'tab',
376-
tabIndex: this.isSelected ? 0 : -1,
376+
tabindex: this.isSelected ? 0 : -1,
377377
id: `tab:${this.id}`,
378378
type: 'button',
379379
disabled: this.isDisabled,
@@ -408,7 +408,7 @@ const CTabPanel = {
408408
class: [this.className],
409409
attrs: {
410410
role: 'tabpanel',
411-
tabIndex: -1,
411+
tabindex: -1,
412412
'aria-labelledby': `tab:${this.id}`,
413413
hidden: !this.isSelected,
414414
id: `panel:${this.id}`,
@@ -460,7 +460,7 @@ const CTabPanels = {
460460
return h(this.as, {
461461
class: [this.className],
462462
attrs: {
463-
tabIndex: -1,
463+
tabindex: -1,
464464
...this.computedAttrs
465465
},
466466
on: this.computedListeners

packages/chakra-ui-core/src/CTooltip/CTooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const CTooltip = {
151151
as: 'span'
152152
},
153153
attrs: {
154-
tabIndex: 0,
154+
tabindex: 0,
155155
'x-tooltip-anchor': `${this.tooltipId}`,
156156
...(this.isOpen && { 'aria-describedby': this.tooltipId })
157157
},

packages/chakra-ui-nuxt/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## 0.3.4
4+
5+
### Patch Changes
6+
7+
- [`2627e9f`](https://github.com/chakra-ui/chakra-ui-vue/commit/2627e9f833ec62d4bc35703bcb3bb1293d20c391) [#455](https://github.com/chakra-ui/chakra-ui-vue/pull/455) Thanks [@codebender828](https://github.com/codebender828)! -
8+
9+
- Updated dependencies [[`2627e9f`](https://github.com/chakra-ui/chakra-ui-vue/commit/2627e9f833ec62d4bc35703bcb3bb1293d20c391)]:
10+
- @chakra-ui/vue@0.9.2
11+
312
## 0.3.2
413

514
### Patch Changes

packages/chakra-ui-nuxt/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chakra-ui/nuxt",
3-
"version": "0.3.2",
3+
"version": "0.3.4",
44
"description": "Chakra UI Module for Nuxt.js",
55
"repository": "https://github.com/chakra-ui/chakra-ui-vue",
66
"license": "MIT",
@@ -18,7 +18,7 @@
1818
"test": "jest"
1919
},
2020
"dependencies": {
21-
"@chakra-ui/vue": "^0.9.0",
21+
"@chakra-ui/vue": "^0.9.2",
2222
"chakra-loader": "latest",
2323
"@emotion/css": "^11.0.0"
2424
},

website/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## 0.6.1
4+
5+
### Patch Changes
6+
7+
- [`2627e9f`](https://github.com/chakra-ui/chakra-ui-vue/commit/2627e9f833ec62d4bc35703bcb3bb1293d20c391) [#455](https://github.com/chakra-ui/chakra-ui-vue/pull/455) Thanks [@codebender828](https://github.com/codebender828)! -
8+
9+
- Updated dependencies [[`2627e9f`](https://github.com/chakra-ui/chakra-ui-vue/commit/2627e9f833ec62d4bc35703bcb3bb1293d20c391)]:
10+
- @chakra-ui/vue@0.9.2
11+
312
## 0.6.0
413

514
### Minor Changes

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chakra-ui-docs",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Chakra UI Vue documentation site",
55
"private": true,
66
"scripts": {
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"@chakra-ui/theme-vue": "^0.2.11",
30-
"@chakra-ui/vue": "^0.9.0",
30+
"@chakra-ui/vue": "^0.9.2",
3131
"@emotion/css": "^11.0.0",
3232
"@mdx-js/vue-loader": "^1.6.1",
3333
"@nuxtjs/dotenv": "^1.4.0",

website/pages/accordion.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ Use the style prop `_expanded` to style this state.
171171
The `CAccordionItem` component exposes a scoped slot with two variables: `isExpanded` and `isDisabled`.
172172
In the example below, we change the icon rendered by the `CAccordionIcon` based on the `CAccordionItems` expanded state.
173173

174-
```vue live=true<c-accordion :allow-toggle="true">
174+
```vue live=true
175+
<c-accordion :allow-toggle="true">
175176
<c-accordion-item>
176177
<c-accordion-header>
177178
<c-box flex="1" text-align="left">

website/pages/editable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ props. Here are the custom props:
8383
| onCancel | `function` | | Callback invoked when user cancels input with the `Esc` key. It provides the last confirmed value as argument. |
8484
| onSubmit | `function` | | Callback invoked when user confirms value with `enter` key or by blurring the input. |
8585
| onEdit | `function` | | Callback invoked once the user enters edit mode. |
86-
| isPreviewFocusable | `boolean` | `true` | If `true`, the read only view, has a `tabIndex` set to `0` so it can receive focus via the keyboard or click. |
86+
| isPreviewFocusable | `boolean` | `true` | If `true`, the read only view, has a `tabindex` set to `0` so it can receive focus via the keyboard or click. |
8787
| startWithEditView | `boolean` | | If `true`, the Editable will start with edit mode by default. |
8888
| submitOnBlur | `boolean` | `true` | If `true`, it'll update the value onBlur and turn off the edit mode. |
8989
| selectAllOnFocus | `boolean` | `true` | If `true`, the input's text will be highlighted on focus. |

website/pages/menu.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import SEO from "../components/SEO";
88
# Menu
99

1010
The `CMenu` component is an accessible dropdown menu for the common dropdown menu button design pattern.
11-
Menu uses roving tabIndex for focus management.
11+
Menu uses roving tabindex for focus management.
1212

1313
See `CMenu`'s [accessibility report](https://github.com/chakra-ui/chakra-ui-vue/blob/master/packages/chakra-ui-core/src/CMenu/accessibility.md)
1414

website/pages/tooltip.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Using the `placement` prop you can adjust where your tooltip will be displayed.
9292
| `showDelay` | `number` | | The delay in `ms` for the tooltip to show |
9393
| `hideDelay` | `number` | | The delay in `ms` for the tooltip to hide |
9494
| `closeOnClick` | `boolean` | | If `true` hide the tooltip, when the trigger is clicked. |
95-
| `shouldWrapChildren` | `boolean` | | If `true`, the tooltip will wrap the children in a `span` with `tabIndex=0` |
95+
| `shouldWrapChildren` | `boolean` | | If `true`, the tooltip will wrap the children in a `span` with `tabindex=0` |
9696

9797
### Slots
9898

0 commit comments

Comments
 (0)