UNPKG

@ark-ui/vue

Version:

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

36 lines (33 loc) 1.33 kB
import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementBlock, Fragment, renderList, createVNode, createTextVNode, toDisplayString } from 'vue'; import { ark } from '../factory.js'; import { useColorPickerContext } from './use-color-picker-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "color-picker-format-select", props: { asChild: { type: Boolean } }, setup(__props) { const colorPicker = useColorPickerContext(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).select, normalizeProps(guardReactiveProps(unref(colorPicker).getFormatSelectProps())), { default: withCtx(() => [ (openBlock(), createElementBlock(Fragment, null, renderList(["rgba", "hsla", "hsba"], (format) => { return createVNode(unref(ark).option, { key: format, value: format }, { default: withCtx(() => [ createTextVNode(toDisplayString(format), 1) ]), _: 2 }, 1032, ["value"]); }), 64)) ]), _: 1 }, 16); }; } }); export { _sfc_main as default };