UNPKG

@ark-ui/vue

Version:

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

32 lines (29 loc) 1.22 kB
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, createElementBlock, Fragment, renderList, toDisplayString } from 'vue'; import { ark } from '../factory.js'; import { useDatePickerContext } from './use-date-picker-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; const _hoisted_1 = ["value"]; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "date-picker-month-select", props: { asChild: { type: Boolean } }, setup(__props) { const datePicker = useDatePickerContext(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).select, mergeProps(unref(datePicker).getMonthSelectProps(), { "as-child": __props.asChild }), { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(datePicker).getMonths(), (month) => { return openBlock(), createElementBlock("option", { key: month.value, value: month.value }, toDisplayString(month.label), 9, _hoisted_1); }), 128)) ]), _: 1 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };