UNPKG

@ark-ui/vue

Version:

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

65 lines (60 loc) 1.94 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const vue = require('vue'); const factory = require('../factory.cjs'); const usePinInput = require('./use-pin-input.cjs'); const usePinInputContext = require('./use-pin-input-context.cjs'); const useForwardExpose = require('../../utils/use-forward-expose.cjs'); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "pin-input-root", props: /* @__PURE__ */ vue.mergeDefaults({ autoFocus: { type: Boolean }, blurOnComplete: { type: Boolean }, count: {}, defaultValue: {}, disabled: { type: Boolean }, form: {}, id: {}, ids: {}, invalid: { type: Boolean }, mask: { type: Boolean }, modelValue: {}, name: {}, otp: { type: Boolean }, pattern: {}, placeholder: {}, readOnly: { type: Boolean }, required: { type: Boolean }, selectOnFocus: { type: Boolean }, translations: {}, type: {}, asChild: { type: Boolean } }, { autoFocus: void 0, blurOnComplete: void 0, disabled: void 0, invalid: void 0, mask: void 0, otp: void 0, readOnly: void 0, required: void 0, selectOnFocus: void 0 }), emits: ["valueChange", "valueComplete", "valueInvalid", "update:modelValue"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const pinInput = usePinInput.usePinInput(props, emits); usePinInputContext.PinInputProvider(pinInput); useForwardExpose.useForwardExpose(); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).div, vue.mergeProps(vue.unref(pinInput).getRootProps(), { "as-child": _ctx.asChild }), { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); exports.default = _sfc_main;