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

Commit a3b0095

Browse files
committed
fix: checkbox icon
1 parent 9ed4f53 commit a3b0095

Some content is hidden

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

58 files changed

+405
-260
lines changed

@types/components.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* Typescript support for @chakra-ui/vue-next2.0.0-beta.0 auto-imported
2+
* Typescript support for @chakra-ui/vue-next2.0.0-beta.1 auto-imported
33
* components using `unplugin-vue-components,`
44
*
55
* @see: https://github.com/antfu/unplugin-vue-components/#typescript
66
*
77
* This is a generated file. Do not edit it's contents.
88
*
9-
* This file was generated on 2023-01-24T13:16:48.745Z
9+
* This file was generated on 2023-01-26T01:35:24.938Z
1010
*/
1111

1212
import { ChakraProps, chakra } from "@chakra-ui/vue-system"
@@ -57,8 +57,6 @@ declare module "@vue/runtime-core" {
5757
/* Global component types for Volar auto-complete */
5858
export interface GlobalComponents {
5959
chakra: typeof import("@chakra-ui/vue-next")["chakra"]
60-
CDarkMode: typeof import("@chakra-ui/vue-next")["CDarkMode"]
61-
CLightMode: typeof import("@chakra-ui/vue-next")["CLightMode"]
6260
CAccordion: typeof import("@chakra-ui/vue-next")["CAccordion"]
6361
CAccordionButton: typeof import("@chakra-ui/vue-next")["CAccordionButton"]
6462
CAccordionIcon: typeof import("@chakra-ui/vue-next")["CAccordionIcon"]
@@ -79,9 +77,12 @@ declare module "@vue/runtime-core" {
7977
CIconButton: typeof import("@chakra-ui/vue-next")["CIconButton"]
8078
CCheckbox: typeof import("@chakra-ui/vue-next")["CCheckbox"]
8179
CCheckboxGroup: typeof import("@chakra-ui/vue-next")["CCheckboxGroup"]
80+
CDarkMode: typeof import("@chakra-ui/vue-next")["CDarkMode"]
81+
CLightMode: typeof import("@chakra-ui/vue-next")["CLightMode"]
8282
CFocusLock: typeof import("@chakra-ui/vue-next")["CFocusLock"]
8383
CFormErrorIcon: typeof import("@chakra-ui/vue-next")["CFormErrorIcon"]
8484
CFormErrorMessage: typeof import("@chakra-ui/vue-next")["CFormErrorMessage"]
85+
CFormHelperText: typeof import("@chakra-ui/vue-next")["CFormHelperText"]
8586
CFormLabel: typeof import("@chakra-ui/vue-next")["CFormLabel"]
8687
CRequiredIndicator: typeof import("@chakra-ui/vue-next")["CRequiredIndicator"]
8788
CIcon: typeof import("@chakra-ui/vue-next")["CIcon"]
@@ -152,6 +153,7 @@ declare module "@vue/runtime-core" {
152153
CPortal: typeof import("@chakra-ui/vue-next")["CPortal"]
153154
CSkipNavContent: typeof import("@chakra-ui/vue-next")["CSkipNavContent"]
154155
CSkipNavLink: typeof import("@chakra-ui/vue-next")["CSkipNavLink"]
156+
CSpinner: typeof import("@chakra-ui/vue-next")["CSpinner"]
155157
CScrollLock: typeof import("@chakra-ui/vue-next")["CScrollLock"]
156158
CVisuallyHidden: typeof import("@chakra-ui/vue-next")["CVisuallyHidden"]
157159
CVisuallyHiddenInput: typeof import("@chakra-ui/vue-next")["CVisuallyHiddenInput"]

components.d.ts

Lines changed: 6 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* Typescript support for @chakra-ui/vue-next2.0.0-beta.0 auto-imported
2+
* Typescript support for @chakra-ui/vue-next2.0.0-beta.1 auto-imported
33
* components using `unplugin-vue-components,`
44
*
55
* @see: https://github.com/antfu/unplugin-vue-components/#typescript
66
*
77
* This is a generated file. Do not edit it's contents.
88
*
9-
* This file was generated on 2023-01-24T13:16:48.745Z
9+
* This file was generated on 2023-01-26T01:35:24.938Z
1010
*/
1111

1212
import { ChakraProps, chakra } from "@chakra-ui/vue-system"
@@ -55,11 +55,8 @@ type JsxComponentCustomProps = {
5555

5656
declare module "@vue/runtime-core" {
5757
/* Global component types for Volar auto-complete */
58-
5958
export interface GlobalComponents {
6059
chakra: typeof import("@chakra-ui/vue-next")["chakra"]
61-
CDarkMode: typeof import("@chakra-ui/vue-next")["CDarkMode"]
62-
CLightMode: typeof import("@chakra-ui/vue-next")["CLightMode"]
6360
CAccordion: typeof import("@chakra-ui/vue-next")["CAccordion"]
6461
CAccordionButton: typeof import("@chakra-ui/vue-next")["CAccordionButton"]
6562
CAccordionIcon: typeof import("@chakra-ui/vue-next")["CAccordionIcon"]
@@ -80,9 +77,12 @@ declare module "@vue/runtime-core" {
8077
CIconButton: typeof import("@chakra-ui/vue-next")["CIconButton"]
8178
CCheckbox: typeof import("@chakra-ui/vue-next")["CCheckbox"]
8279
CCheckboxGroup: typeof import("@chakra-ui/vue-next")["CCheckboxGroup"]
80+
CDarkMode: typeof import("@chakra-ui/vue-next")["CDarkMode"]
81+
CLightMode: typeof import("@chakra-ui/vue-next")["CLightMode"]
8382
CFocusLock: typeof import("@chakra-ui/vue-next")["CFocusLock"]
8483
CFormErrorIcon: typeof import("@chakra-ui/vue-next")["CFormErrorIcon"]
8584
CFormErrorMessage: typeof import("@chakra-ui/vue-next")["CFormErrorMessage"]
85+
CFormHelperText: typeof import("@chakra-ui/vue-next")["CFormHelperText"]
8686
CFormLabel: typeof import("@chakra-ui/vue-next")["CFormLabel"]
8787
CRequiredIndicator: typeof import("@chakra-ui/vue-next")["CRequiredIndicator"]
8888
CIcon: typeof import("@chakra-ui/vue-next")["CIcon"]
@@ -153,6 +153,7 @@ declare module "@vue/runtime-core" {
153153
CPortal: typeof import("@chakra-ui/vue-next")["CPortal"]
154154
CSkipNavContent: typeof import("@chakra-ui/vue-next")["CSkipNavContent"]
155155
CSkipNavLink: typeof import("@chakra-ui/vue-next")["CSkipNavLink"]
156+
CSpinner: typeof import("@chakra-ui/vue-next")["CSpinner"]
156157
CScrollLock: typeof import("@chakra-ui/vue-next")["CScrollLock"]
157158
CVisuallyHidden: typeof import("@chakra-ui/vue-next")["CVisuallyHidden"]
158159
CVisuallyHiddenInput: typeof import("@chakra-ui/vue-next")["CVisuallyHiddenInput"]
@@ -266,52 +267,4 @@ declare module "@vue/runtime-core" {
266267
}
267268
}
268269

269-
declare module "vue" {
270-
interface ComponentCustomProps extends ChakraProps {
271-
id?: string
272-
role?: string
273-
tabindex?: number
274-
role?: string
275-
tabindex?: number | string
276-
value?: unknown
277-
// should be removed after Vue supported component events typing
278-
// see: https://github.com/vuejs/vue-next/issues/1553
279-
// https://github.com/vuejs/vue-next/issues/3029
280-
onBlur?: EventHandler
281-
onOpen?: EventHandler
282-
onEdit?: EventHandler
283-
onLoad?: EventHandler
284-
onClose?: EventHandler
285-
onFocus?: EventHandler
286-
onInput?: EventHandler
287-
onClick?: EventHandler
288-
onPress?: EventHandler
289-
onCancel?: EventHandler
290-
onChange?: EventHandler
291-
onDelete?: EventHandler
292-
onScroll?: EventHandler
293-
onSubmit?: EventHandler
294-
onSelect?: EventHandler
295-
onConfirm?: EventHandler
296-
onPreview?: EventHandler
297-
onKeypress?: EventHandler
298-
onTouchend?: EventHandler
299-
onTouchmove?: EventHandler
300-
onTouchstart?: EventHandler
301-
onTouchcancel?: EventHandler
302-
onMouseenter?: EventHandler
303-
onMouseleave?: EventHandler
304-
onMousemove?: EventHandler
305-
onKeydown?: EventHandler
306-
onKeyup?: EventHandler
307-
onDeselect?: EventHandler
308-
onClear?: EventHandler
309-
}
310-
311-
interface HTMLAttributes {
312-
onTouchmovePassive?: EventHandler
313-
onTouchstartPassive?: EventHandler
314-
}
315-
}
316-
317270
export {}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"prebuild": "pnpm clean",
2121
"build": "turbo run build --filter=!./examples/* --filter=!{./packages/test-utils}",
2222
"build:dev": "turbo run build:fast --filter=!./examples/* --filter=!{./packages/test-utils}",
23-
"build:types": "ts-node scripts/generate-global-types.ts",
23+
"build:types": "jiti scripts/generate-global-types.ts",
2424
"postbuild": "pnpm build:types && pnpm size",
2525
"start": "preconstruct watch",
2626
"csb:install": "pnpm && pnpm bootstrap",
@@ -53,7 +53,7 @@
5353
"pkg": "manypkg run",
5454
"pkgs:check": "manypkg check",
5555
"pkgs:fix": "manypkg fix",
56-
"size": "echo `TODO: Analyze build sizes`",
56+
"size": "echo TODO: Analyze build sizes",
5757
"analyze": "size-limit --why",
5858
"vitest": "vitest",
5959
"coverage": "vitest run --coverage"

packages/c-accordion/examples/allow-multiple.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ import {
4242
CAccordionButton,
4343
CAccordionPanel,
4444
CAccordionIcon,
45-
} from "../dist"
45+
} from "../src"
46+
import { chakra } from "@chakra-ui/vue-next"
4647
</script>

packages/c-accordion/examples/allow-toggle.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ import {
4242
CAccordionItem,
4343
CAccordionButton,
4444
CAccordionPanel,
45-
} from "@chakra-ui/c-accordion"
45+
} from "../src"
46+
import { chakra } from "@chakra-ui/vue-next"
4647
import { useToggle } from "@vueuse/core"
4748
const [isToggle] = useToggle(true)
4849
</script>

packages/c-accordion/examples/simple-accordion.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import {
3838
CAccordionItem,
3939
CAccordionButton,
4040
CAccordionPanel,
41-
} from "@chakra-ui/c-accordion"
41+
} from "../src"
42+
import { chakra } from "@chakra-ui/vue-next"
4243
import { useId, useIds } from "@chakra-ui/vue-composables"
4344
import { watchEffect } from "vue"
4445
@@ -49,8 +50,8 @@ const data = [
4950
]
5051
5152
const id = useId()
52-
const idWithName = useId("with-name")
53-
const ids = useIds("accordion", "button", "panel", "item")
53+
const idWithName = useId()
54+
const ids = useIds(`accordion-${id}`, "button", "panel", "item")
5455
5556
watchEffect(() => {
5657
console.log("id", id.value)

packages/c-accordion/tsup.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from "tsup"
2+
import EsbuildPluginJSX from "unplugin-vue-jsx/esbuild"
23

34
export default defineConfig({
45
clean: true,
@@ -8,6 +9,12 @@ export default defineConfig({
89
js: `.${format}.js`,
910
}
1011
},
12+
esbuildPlugins: [
13+
// @ts-expect-error `EsbuildPluginJSX` does not extend `tsup.Plugin` type.
14+
EsbuildPluginJSX({
15+
include: [/.[jt]sx?$/],
16+
}),
17+
],
1118
format: ["esm", "cjs"],
1219
entry: {
1320
"chakra-ui-c-accordion": "src/index.tsx",

packages/c-alert/tsup.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from "tsup"
2+
import EsbuildPluginJSX from "unplugin-vue-jsx/esbuild"
23

34
export default defineConfig({
45
clean: true,
@@ -8,6 +9,12 @@ export default defineConfig({
89
js: `.${format}.js`,
910
}
1011
},
12+
esbuildPlugins: [
13+
// @ts-expect-error `EsbuildPluginJSX` does not extend `tsup.Plugin` type.
14+
EsbuildPluginJSX({
15+
include: [/.[jt]sx?$/],
16+
}),
17+
],
1118
format: ["esm", "cjs"],
1219
entry: {
1320
"chakra-ui-c-alert": "src/index.tsx",

packages/c-avatar/examples/badge-c-avatar.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
</c-h-stack>
116116
</c-stack>
117117
</template>
118-
<script setup>
118+
<script setup lang="ts">
119119
import { CAvatar, CAvatarBadge } from "../src"
120+
import { chakra } from "@chakra-ui/vue-next"
120121
</script>

packages/c-avatar/src/c-avatar.tsx

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -223,29 +223,32 @@ export const CAvatar = defineComponent({
223223
isLoaded: computed(() => isLoaded.value),
224224
})
225225

226-
return () => (
227-
<chakra.span
228-
__label="avatar"
229-
data-loaded={dataAttr(isLoaded.value)}
230-
__css={avatarStyles.value}
231-
{...attrs}
232-
>
233-
<CAvatarImage
234-
src={props.src}
235-
srcSet={props.srcSet}
236-
loading={props.loading}
237-
onLoad={handleLoaded}
238-
onError={(e) => emit("error", e)}
239-
initials={props.initials}
240-
name={props.name}
241-
// @ts-ignore
242-
borderRadius={props.borderRadius}
243-
iconLabel={props.iconLabel}
244-
ignoreFallback={props.ignoreFallback}
245-
{...extractedAttrs.value.imgAttrs}
246-
/>
247-
{slots?.default?.()}
248-
</chakra.span>
249-
)
226+
return () => {
227+
console.log("render c-avatar", chakra.span)
228+
return (
229+
<chakra.span
230+
__label="avatar"
231+
data-loaded={dataAttr(isLoaded.value)}
232+
__css={avatarStyles.value}
233+
{...attrs}
234+
>
235+
<CAvatarImage
236+
src={props.src}
237+
srcSet={props.srcSet}
238+
loading={props.loading}
239+
onLoad={handleLoaded}
240+
onError={(e) => emit("error", e)}
241+
initials={props.initials}
242+
name={props.name}
243+
// @ts-ignore
244+
borderRadius={props.borderRadius}
245+
iconLabel={props.iconLabel}
246+
ignoreFallback={props.ignoreFallback}
247+
{...extractedAttrs.value.imgAttrs}
248+
/>
249+
{slots?.default?.()}
250+
</chakra.span>
251+
)
252+
}
250253
},
251254
}) as any as ComponentWithProps<CAvatarProps>

0 commit comments

Comments
 (0)