UNPKG

@ark-ui/vue

Version:

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

46 lines (43 loc) 1.85 kB
import { defineComponent, resolveComponent, createElementBlock, createBlock, openBlock, Fragment, renderSlot, createTextVNode, toDisplayString, resolveDynamicComponent, withCtx, renderList } from 'vue'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "json-tree-view-value-node", props: { node: {} }, setup(__props) { return (_ctx, _cache) => { const _component_JsonTreeViewValueNode = resolveComponent("JsonTreeViewValueNode", true); return _ctx.node.type === "text" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ _ctx.$slots.renderValue ? renderSlot(_ctx.$slots, "renderValue", { key: 0, node: _ctx.node }, () => [ createTextVNode(toDisplayString(_ctx.node.value), 1) ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createTextVNode(toDisplayString(_ctx.node.value), 1) ], 64)) ], 64)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.node.tagName), { key: 1, "data-root": _ctx.node.properties.root ? "" : void 0, "data-type": _ctx.node.properties.nodeType, "data-kind": _ctx.node.properties.kind }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.children, (child, index) => { return openBlock(), createBlock(_component_JsonTreeViewValueNode, { key: index, node: child }, { renderValue: withCtx(({ node: childNode }) => [ renderSlot(_ctx.$slots, "renderValue", { node: childNode }) ]), _: 2 }, 1032, ["node"]); }), 128)) ]), _: 3 }, 8, ["data-root", "data-type", "data-kind"])); }; } }); export { _sfc_main as default };