UNPKG

@ark-ui/vue

Version:

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

31 lines (28 loc) 999 B
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { ark } from '../factory.js'; import { useSliderContext } from './use-slider-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { SliderThumbPropsProvider } from './use-slider-thumb-props-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "slider-thumb", props: { index: {}, name: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const slider = useSliderContext(); SliderThumbPropsProvider(props); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(unref(slider).getThumbProps(props), { "as-child": __props.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };