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

Commit 270c6de

Browse files
committed
chore(stack): resolve docs merge conflict
2 parents 659778d + 84714ca commit 270c6de

34 files changed

+2139
-143
lines changed

.all-contributorsrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,28 @@
161161
"name": "Ken Love",
162162
"avatar_url": "https://avatars3.githubusercontent.com/u/15808?v=4",
163163
"profile": "https://github.com/freality",
164+
"contributions": [
165+
"code",
166+
"test"
167+
]
168+
},
169+
{
170+
"login": "gbschalch",
171+
"name": "Guilherme Schalch",
172+
"avatar_url": "https://avatars3.githubusercontent.com/u/13435327?v=4",
173+
"profile": "http://www.linkedin.com/in/schalch",
164174
"contributions": [
165175
"code"
166176
]
177+
},
178+
{
179+
"login": "be-codified",
180+
"name": "Žiga Vukčevič",
181+
"avatar_url": "https://avatars1.githubusercontent.com/u/10107183?v=4",
182+
"profile": "http://www.be-codified.com",
183+
"contributions": [
184+
"doc"
185+
]
167186
}
168187
],
169188
"contributorsPerLine": 7,

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ jobs:
5757
- run: yarn build
5858
- run: yarn publish-ci
5959
env:
60-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6161

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ packages/*/node_modules
3434
lerna-debug.log
3535
.now
3636
config/.env
37-
packages/nuxt-chakra/.github
37+
packages/chakra-ui-nuxt/.github
3838
packages/chakra-ui-docs/static/sw.js

.storybook/components/Canvas.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import {
4848
CBox,
4949
CIconButton,
5050
CColorModeProvider } from '../../packages/chakra-ui-core/src'
51+
5152
export default {
5253
name: 'Canvas',
5354
components: {

.storybook/config.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { configure, addDecorator, addParameters } from '@storybook/vue';
22
import Vue from 'vue'
33
import VueLive from 'vue-live'
44
import Lorem from 'vue-lorem-ipsum'
5-
import Chakra, { CThemeProvider, CColorModeProvider, CReset } from '../packages/chakra-ui-core/src'
5+
import Chakra from '../packages/chakra-ui-core/src'
66
import Canvas from './components/Canvas.vue'
7-
import theme from '../packages/chakra-ui-core/src/lib/theme'
87
import storyBookTheme from './theme'
98

109
import {
@@ -75,16 +74,11 @@ addParameters({
7574

7675
addDecorator(() => ({
7776
template: `
78-
<Canvas :theme="theme">
77+
<Canvas>
7978
<story/>
8079
</Canvas>
8180
`,
82-
data() {
83-
return {
84-
theme,
85-
}
86-
},
87-
components: { CThemeProvider, CColorModeProvider, CReset, Canvas }
81+
components: { Canvas }
8882
}));
8983

9084
// For playground

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
211211
<tr>
212212
<td align="center"><a href="https://github.com/Anmol270900"><img src="https://avatars2.githubusercontent.com/u/43845658?v=4" width="50px;" alt=""/><br /><sub><b>Anmol</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=Anmol270900" title="Documentation">📖</a></td>
213213
<td align="center"><a href="https://github.com/vishnumohanrk"><img src="https://avatars3.githubusercontent.com/u/51525368?v=4" width="50px;" alt=""/><br /><sub><b>Vishnumohan R K</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=vishnumohanrk" title="Documentation">📖</a></td>
214-
<td align="center"><a href="https://github.com/freality"><img src="https://avatars3.githubusercontent.com/u/15808?v=4" width="50px;" alt=""/><br /><sub><b>Ken Love</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=freality" title="Code">💻</a></td>
214+
<td align="center"><a href="https://github.com/freality"><img src="https://avatars3.githubusercontent.com/u/15808?v=4" width="50px;" alt=""/><br /><sub><b>Ken Love</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=freality" title="Code">💻</a> <a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=freality" title="Tests">⚠️</a></td>
215+
<td align="center"><a href="http://www.linkedin.com/in/schalch"><img src="https://avatars3.githubusercontent.com/u/13435327?v=4" width="50px;" alt=""/><br /><sub><b>Guilherme Schalch</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=gbschalch" title="Code">💻</a></td>
216+
<td align="center"><a href="http://www.be-codified.com"><img src="https://avatars1.githubusercontent.com/u/10107183?v=4" width="50px;" alt=""/><br /><sub><b>Žiga Vukčevič</b></sub></a><br /><a href="https://github.com/chakra-ui/chakra-ui-vue/commits?author=be-codified" title="Documentation">📖</a></td>
215217
</tr>
216218
</table>
217219

packages/chakra-ui-core/CHANGELOG.md

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

3+
## 0.6.5
4+
5+
### Patch Changes
6+
7+
- fix style props for @chakra-ui/vue
8+
9+
## 0.6.4
10+
11+
### Patch Changes
12+
13+
- improvements to style props
14+
15+
## 0.6.3
16+
17+
### Patch Changes
18+
19+
- fix: includes missing style props for border-radius and flex-grow style declarations"
20+
321
## 0.6.2
422

523
### 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.6.2",
3+
"version": "0.6.5",
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/CFlex/CFlex.stories.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,19 @@ storiesOf('UI | Flex', module)
2222
</CFlex>
2323
`
2424
}))
25+
.add('Flex grow', () => ({
26+
components: { CFlex, CBox, CText },
27+
template: `
28+
<CFlex w="600px" align="center">
29+
<CBox flex-grow="2" w="10" mr="3" h="10" bg="blue.100">1</CBox>
30+
<CBox rounded-top="lg" w="10" mr="3" h="10" bg="blue.100">1</CBox>
31+
<CBox rounded-right="lg" w="10" mr="3" h="10" bg="blue.100">2</CBox>
32+
<CBox rounded-bottom="lg" w="10" mr="3" h="10" bg="blue.100">3</CBox>
33+
<CBox rounded-right="lg" w="10" mr="3" h="10" bg="blue.100">4</CBox>
34+
<CBox border-top-right-radius="lg" w="10" mr="3" h="10" bg="blue.100">5</CBox>
35+
<CBox border-top-left-radius="lg" w="10" mr="3" h="10" bg="blue.100">6</CBox>
36+
<CBox border-bottom-right-radius="lg" w="10" mr="3" h="10" bg="blue.100">7</CBox>
37+
<CBox border-bottom-left-radius="lg" w="10" h="10" bg="blue.100">8</CBox>
38+
</CFlex>
39+
`
40+
}))

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ const defaultConfig = theme => ({
1515
color: theme.colors.gray[800],
1616
bg: undefined,
1717
borderColor: theme.colors.gray[200],
18-
placeholderColor: theme.colors.gray[400]
18+
placeholderColor: theme.colors.gray[400],
19+
fontFamily: theme.fonts.body
1920
},
2021
dark: {
2122
color: theme.colors.whiteAlpha[900],
2223
bg: theme.colors.gray[800],
2324
borderColor: theme.colors.whiteAlpha[300],
24-
placeholderColor: theme.colors.whiteAlpha[400]
25+
placeholderColor: theme.colors.whiteAlpha[400],
26+
fontFamily: theme.fonts.body
2527
}
2628
})
2729

@@ -51,16 +53,22 @@ const CReset = {
5153
}
5254
},
5355
props: {
54-
config: Function
56+
config: {
57+
type: Function,
58+
validator (value) {
59+
return typeof value === 'function'
60+
}
61+
}
5562
},
5663
created () {
57-
const { color, bg, borderColor, placeholderColor } = this.styleConfig[this.colorMode]
64+
const { color, bg, borderColor, placeholderColor, fontFamily } = this.styleConfig[this.colorMode]
5865
useTailwindPreflight(this.theme)
5966
injectGlobal({
6067
html: {
6168
lineHeight: 1.5,
6269
color,
63-
backgroundColor: bg
70+
backgroundColor: bg,
71+
fontFamily
6472
},
6573

6674
'*, *::before, *::after': {
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import CReset from '../'
2+
import { render } from '@/tests/test-utils'
3+
4+
const renderComponent = (props) => {
5+
const inlineAttrs = (props && props.inlineAttrs) || ''
6+
const base = {
7+
components: { CReset },
8+
template: `<CReset data-testid="reset" ${inlineAttrs} />`,
9+
...props
10+
}
11+
return render(base)
12+
}
13+
14+
describe('CReset.vue', () => {
15+
it('should render correctly', () => {
16+
const { asFragment } = renderComponent()
17+
18+
expect(asFragment()).toMatchSnapshot()
19+
})
20+
21+
it('should inject global styles', () => {
22+
renderComponent()
23+
24+
expect(document.head).toMatchSnapshot()
25+
})
26+
27+
it('should accept config prop', () => {
28+
const inlineAttrs = ':config="cssResetConfig"'
29+
const cssResetConfig = (_, defaults) => {
30+
const { light } = defaults
31+
return {
32+
...defaults, light: { ...light, bg: 'pink', color: 'indigo', fontFamily: "'Comic Sans MS'" }
33+
}
34+
}
35+
36+
renderComponent({ inlineAttrs, methods: { cssResetConfig } })
37+
38+
expect(document.head).toMatchSnapshot()
39+
})
40+
})

0 commit comments

Comments
 (0)