UNPKG

@ark-ui/vue

Version:

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

31 lines (28 loc) 1.09 kB
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { ark } from '../factory.js'; import { parts } from './segment-group.anatomy.js'; import { useSegmentGroupContext } from './use-segment-group-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "segment-group-indicator", props: { asChild: { type: Boolean } }, setup(__props) { const segmentGroup = useSegmentGroupContext(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(unref(segmentGroup).getIndicatorProps(), { "as-child": __props.asChild, "data-scope": unref(parts).indicator.attrs["data-scope"], "data-part": unref(parts).indicator.attrs["data-part"] }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child", "data-scope", "data-part"]); }; } }); export { _sfc_main as default };