UNPKG

@ark-ui/vue

Version:

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

92 lines (87 loc) 3.13 kB
'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 factory = require('../factory.cjs'); const useCombobox = require('./use-combobox.cjs'); const useComboboxContext = require('./use-combobox-context.cjs'); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "combobox-root", props: /* @__PURE__ */ vue.mergeDefaults({ allowCustomValue: { type: Boolean }, alwaysSubmitOnEnter: { type: Boolean }, autoFocus: { type: Boolean }, closeOnSelect: { type: Boolean }, collection: {}, composite: { type: Boolean }, defaultHighlightedValue: {}, defaultInputValue: {}, defaultOpen: { type: Boolean }, defaultValue: {}, disableLayer: { type: Boolean }, disabled: { type: Boolean }, form: {}, highlightedValue: {}, id: {}, ids: {}, inputBehavior: {}, inputValue: {}, invalid: { type: Boolean }, loopFocus: { type: Boolean }, modelValue: {}, multiple: { type: Boolean }, name: {}, navigate: { type: Function }, open: { type: Boolean }, openOnChange: { type: [Boolean, Function] }, openOnClick: { type: Boolean }, openOnKeyPress: { type: Boolean }, placeholder: {}, positioning: {}, readOnly: { type: Boolean }, required: { type: Boolean }, scrollToIndexFn: { type: Function }, selectionBehavior: {}, translations: {}, lazyMount: { type: Boolean }, unmountOnExit: { type: Boolean }, asChild: { type: Boolean } }, { allowCustomValue: void 0, alwaysSubmitOnEnter: void 0, autoFocus: void 0, closeOnSelect: void 0, composite: void 0, defaultOpen: void 0, disabled: void 0, disableLayer: void 0, invalid: void 0, loopFocus: void 0, multiple: void 0, open: void 0, openOnChange: void 0, openOnClick: void 0, openOnKeyPress: void 0, readOnly: void 0, required: void 0 }), emits: ["focusOutside", "highlightChange", "inputValueChange", "interactOutside", "openChange", "pointerDownOutside", "valueChange", "select", "update:modelValue", "update:highlightedValue", "update:inputValue", "update:open"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const combobox = useCombobox.useCombobox(props, emits); useComboboxContext.ComboboxProvider(combobox); useRenderStrategy.RenderStrategyPropsProvider(vue.computed(() => ({ lazyMount: props.lazyMount, unmountOnExit: props.unmountOnExit }))); useForwardExpose.useForwardExpose(); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).div, vue.mergeProps(vue.unref(combobox).getRootProps(), { "as-child": __props.asChild }), { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); exports.default = _sfc_main;