@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
56 lines (51 loc) • 1.89 kB
JavaScript
'use strict';
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const useRenderStrategy = require('../../utils/use-render-strategy.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const useDialog = require('./use-dialog.cjs');
const useDialogContext = require('./use-dialog-context.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "dialog-root",
props: /* @__PURE__ */ vue.mergeDefaults({
"aria-label": {},
closeOnEscape: { type: Boolean },
closeOnInteractOutside: { type: Boolean },
defaultOpen: { type: Boolean },
finalFocusEl: { type: Function },
id: {},
ids: {},
initialFocusEl: { type: Function },
modal: { type: Boolean },
open: { type: Boolean },
persistentElements: {},
preventScroll: { type: Boolean },
restoreFocus: { type: Boolean },
role: {},
trapFocus: { type: Boolean },
lazyMount: { type: Boolean },
unmountOnExit: { type: Boolean }
}, {
closeOnEscape: void 0,
closeOnInteractOutside: void 0,
defaultOpen: void 0,
modal: void 0,
open: void 0,
preventScroll: void 0,
restoreFocus: void 0,
trapFocus: void 0
}),
emits: ["escapeKeyDown", "focusOutside", "interactOutside", "openChange", "pointerDownOutside", "update:open"],
setup(__props, { emit: __emit }) {
const props = __props;
const emits = __emit;
const dialog = useDialog.useDialog(props, emits);
useDialogContext.DialogProvider(dialog);
useRenderStrategy.RenderStrategyPropsProvider(vue.computed(() => ({ lazyMount: props.lazyMount, unmountOnExit: props.unmountOnExit })));
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.renderSlot(_ctx.$slots, "default");
};
}
});
exports.default = _sfc_main;