@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
37 lines (32 loc) • 1.67 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const useLocaleContext = require('../../providers/locale/use-locale-context.cjs');
const factory = require('../factory.cjs');
const useColorPickerChannelPropsContext = require('./use-color-picker-channel-props-context.cjs');
const useColorPickerContext = require('./use-color-picker-context.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "color-picker-channel-slider-value-text",
props: {
asChild: { type: Boolean }
},
setup(__props) {
const colorPicker = useColorPickerContext.useColorPickerContext();
const channelProps = useColorPickerChannelPropsContext.useColorPickerChannelPropsContext();
const slots = vue.useSlots();
const localeContext = useLocaleContext.useLocaleContext(useLocaleContext.DEFAULT_LOCALE);
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).span, vue.mergeProps(vue.unref(colorPicker).getChannelSliderValueTextProps(vue.unref(channelProps)), { "as-child": _ctx.asChild }), {
default: vue.withCtx(() => [
vue.renderSlot(_ctx.$slots, "default", {}, () => [
vue.createTextVNode(vue.toDisplayString(slots.default?.() || vue.unref(colorPicker).getChannelValueText(vue.unref(channelProps).channel, vue.unref(localeContext).locale)), 1)
])
]),
_: 3
}, 16, ["as-child"]);
};
}
});
exports.default = _sfc_main;