UNPKG

@ark-ui/vue

Version:

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

24 lines (21 loc) 616 B
import { defineComponent, computed, renderSlot } from 'vue'; import { isRTL } from '@zag-js/i18n-utils'; import { LocaleContextProvider } from './use-locale-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "locale-provider", props: { locale: {} }, setup(__props) { const props = __props; const context = computed(() => ({ locale: props.locale, dir: isRTL(props.locale) ? "rtl" : "ltr" })); LocaleContextProvider(context); return (_ctx, _cache) => { return renderSlot(_ctx.$slots, "default"); }; } }); export { _sfc_main as default };