UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

32 lines (29 loc) 1.17 kB
import { defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { ark } from '../factory.js'; import { useFileUploadContext } from './use-file-upload-context.js'; import { FileUploadItemGroupPropsProvider } from './use-file-upload-item-group-props-context.js'; import { pick } from '@zag-js/utils'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "file-upload-item-group", props: { asChild: { type: Boolean }, type: {} }, setup(__props) { const props = __props; const groupProps = computed(() => pick(props, ["type"])); const fileUpload = useFileUploadContext(); FileUploadItemGroupPropsProvider(groupProps); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).ul, mergeProps(unref(fileUpload).getItemGroupProps(groupProps.value), { "as-child": __props.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };