diff --git a/packages/components/avatar/package.json b/packages/components/avatar/package.json index ed7915019..420a6ffe6 100644 --- a/packages/components/avatar/package.json +++ b/packages/components/avatar/package.json @@ -35,7 +35,7 @@ "dependencies": { "@oku-ui/primitive": "workspace:^", "@oku-ui/provide": "workspace:^", - "@oku-ui/use-callback-ref": "workspace:^", + "@oku-ui/use-composable": "workspace:^", "@oku-ui/utils": "workspace:^" }, "devDependencies": { diff --git a/packages/components/avatar/src/avatar.ts b/packages/components/avatar/src/avatar.ts index 7a06bb472..d059e81bf 100644 --- a/packages/components/avatar/src/avatar.ts +++ b/packages/components/avatar/src/avatar.ts @@ -4,7 +4,7 @@ import type { ElementType, MergeProps, PrimitiveProps, RefElement } from '@oku-u import { Primitive } from '@oku-ui/primitive' import type { Scope } from '@oku-ui/provide' import { createProvideScope } from '@oku-ui/provide' -import { useCallbackRef } from '@oku-ui/use-callback-ref' +import { useCallbackRef } from '@oku-ui/use-composable' function useImageLoadingStatus(src?: string) { const loadingStatus = ref('idle') diff --git a/packages/components/checkbox/package.json b/packages/components/checkbox/package.json index 51b4f48bd..c090d7089 100644 --- a/packages/components/checkbox/package.json +++ b/packages/components/checkbox/package.json @@ -33,12 +33,9 @@ "vue": "^3.3.1" }, "dependencies": { - "@oku-ui/compose-refs": "workspace:^", "@oku-ui/primitive": "workspace:^", "@oku-ui/provide": "workspace:^", - "@oku-ui/use-controllable-ref": "workspace:^", - "@oku-ui/use-previous": "workspace:^", - "@oku-ui/use-size": "workspace:^", + "@oku-ui/use-composable": "workspace:^", "@oku-ui/utils": "workspace:^" }, "devDependencies": { diff --git a/packages/components/checkbox/src/checkbox.ts b/packages/components/checkbox/src/checkbox.ts index d9900aa2c..094b1e834 100644 --- a/packages/components/checkbox/src/checkbox.ts +++ b/packages/components/checkbox/src/checkbox.ts @@ -2,10 +2,8 @@ import { createProvideScope } from '@oku-ui/provide' import type { PropType, Ref } from 'vue' import { Transition, computed, defineComponent, h, onMounted, ref, watchEffect } from 'vue' -import { useControllableRef } from '@oku-ui/use-controllable-ref' import { composeEventHandlers } from '@oku-ui/utils' -import { usePrevious } from '@oku-ui/use-previous' -import { useSize } from '@oku-ui/use-size' +import { useControllableRef, usePrevious, useSize } from '@oku-ui/use-composable' import { Primitive } from '@oku-ui/primitive' // import { useComposedRefs } from '@oku-ui/compose-refs' @@ -216,8 +214,10 @@ const Checkbox = defineComponent({ } }), }, - slots.default?.(), - ), isFormControl && h( + { + default: () => slots.default?.(), + }), + isFormControl && h( BubbleInput, { control: _button.value, @@ -277,7 +277,9 @@ const CheckboxIndicator = defineComponent({ ...indicatorProps, 'style': { pointerEvents: 'none', ...attrs.style as any }, }, - slots.default?.(), + { + default: () => slots.default?.(), + }, ) : null, ]) diff --git a/packages/components/checkbox/src/stories/CheckboxDemo.vue b/packages/components/checkbox/src/stories/CheckboxDemo.vue index 0c4bd195b..efd960e52 100644 --- a/packages/components/checkbox/src/stories/CheckboxDemo.vue +++ b/packages/components/checkbox/src/stories/CheckboxDemo.vue @@ -2,6 +2,7 @@