@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
38 lines (33 loc) • 1.44 kB
JavaScript
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const factory = require('../factory.cjs');
const colorPicker_anatomy = require('./color-picker.anatomy.cjs');
const useColorPickerContext = require('./use-color-picker-context.cjs');
const useColorPickerFormatContext = require('./use-color-picker-format-context.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "color-picker-view",
props: {
format: {},
asChild: { type: Boolean }
},
setup(__props) {
const props = __props;
const colorPicker = useColorPickerContext.useColorPickerContext();
useColorPickerFormatContext.ColorPickerFormatPropsProvider(props);
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.unref(colorPicker).format === _ctx.format ? (vue.openBlock(), vue.createBlock(vue.unref(factory.ark).div, vue.mergeProps({ key: 0 }, vue.unref(colorPicker_anatomy.colorPickerAnatomy).build().view.attrs, {
"data-format": _ctx.format,
"as-child": _ctx.asChild
}), {
default: vue.withCtx(() => [
vue.renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["data-format", "as-child"])) : vue.createCommentVNode("", true);
};
}
});
exports.default = _sfc_main;
;