UNPKG

@ark-ui/vue

Version:

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

68 lines (63 loc) 2.08 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const vue = require('vue'); const factory = require('../factory.cjs'); const useNumberInput = require('./use-number-input.cjs'); const useNumberInputContext = require('./use-number-input-context.cjs'); const useForwardExpose = require('../../utils/use-forward-expose.cjs'); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "number-input-root", props: /* @__PURE__ */ vue.mergeDefaults({ allowMouseWheel: { type: Boolean }, allowOverflow: { type: Boolean }, clampValueOnBlur: { type: Boolean }, defaultValue: {}, disabled: { type: Boolean }, focusInputOnChange: { type: Boolean }, form: {}, formatOptions: {}, id: {}, ids: {}, inputMode: {}, invalid: { type: Boolean }, locale: {}, max: {}, min: {}, modelValue: {}, name: {}, pattern: {}, readOnly: { type: Boolean }, required: { type: Boolean }, spinOnPress: { type: Boolean }, step: {}, translations: {}, asChild: { type: Boolean } }, { allowMouseWheel: void 0, allowOverflow: void 0, clampValueOnBlur: void 0, disabled: void 0, focusInputOnChange: void 0, invalid: void 0, readOnly: void 0, required: void 0, spinOnPress: void 0 }), emits: ["focusChange", "valueChange", "valueInvalid", "update:modelValue"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const numberInput = useNumberInput.useNumberInput(props, emits); useNumberInputContext.NumberInputProvider(numberInput); useForwardExpose.useForwardExpose(); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).div, vue.mergeProps(vue.unref(numberInput).getRootProps(), { "as-child": _ctx.asChild }), { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); exports.default = _sfc_main;