@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
34 lines (29 loc) • 1.66 kB
JavaScript
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const factory = require('../factory.cjs');
const useSignaturePadContext = require('./use-signature-pad-context.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "signature-pad-segment",
props: {
asChild: { type: Boolean }
},
setup(__props) {
const signaturePad = useSignaturePadContext.useSignaturePadContext();
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).svg, vue.mergeProps(vue.unref(signaturePad).getSegmentProps(), { "as-child": _ctx.asChild }), {
default: vue.withCtx(() => [
_cache[0] || (_cache[0] = vue.createElementVNode("title", null, "Signature", -1)),
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(signaturePad).paths, (path, i) => {
return vue.openBlock(), vue.createElementBlock("path", vue.mergeProps({ key: i }, { ref_for: true }, vue.unref(signaturePad).getSegmentPathProps({ path })), null, 16);
}), 128)),
vue.unref(signaturePad).currentPath ? (vue.openBlock(), vue.createElementBlock("path", vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.unref(signaturePad).getSegmentPathProps({ path: vue.unref(signaturePad).currentPath }))), null, 16)) : vue.createCommentVNode("", true)
]),
_: 1
}, 16, ["as-child"]);
};
}
});
exports.default = _sfc_main;
;