@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
27 lines (24 loc) • 979 B
JavaScript
import { defineComponent, computed, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString } from 'vue';
import { keyPathToKey } from '@zag-js/json-tree-utils';
const _hoisted_1 = ["data-non-enumerable"];
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "json-tree-view-key-node",
props: {
node: {},
showQuotes: { type: Boolean }
},
setup(__props) {
const props = __props;
const key = computed(() => keyPathToKey(props.node.keyPath));
return (_ctx, _cache) => {
return openBlock(), createElementBlock(Fragment, null, [
createElementVNode("span", {
"data-kind": "key",
"data-non-enumerable": _ctx.node.isNonEnumerable ? "" : void 0
}, toDisplayString(_ctx.showQuotes ? `"${key.value}"` : key.value), 9, _hoisted_1),
_cache[0] || (_cache[0] = createElementVNode("span", { "data-kind": "colon" }, ":", -1))
], 64);
};
}
});
export { _sfc_main as default };