bootstrap-vue-next
Version:
BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.
1 lines • 1.16 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../src/plugins/rtl/index.ts"],"sourcesContent":["import {type Plugin, ref} from 'vue'\nimport {rtlRegistryKey} from '../../utils/keys'\nimport type {BootstrapVueOptions} from '../../types/BootstrapVueOptions'\n\nexport const rtlPlugin: Plugin = {\n install(app, options: BootstrapVueOptions) {\n const rtlDefault = false\n const localeDefault = undefined\n\n const rtlInitial =\n typeof options?.rtl === 'boolean' ? rtlDefault : (options?.rtl?.rtlInitial ?? rtlDefault)\n\n const localeInitial =\n typeof options?.rtl === 'boolean'\n ? localeDefault\n : (options?.rtl?.localeInitial ?? localeDefault)\n\n const isRtl = ref(rtlInitial)\n const locale = ref(localeInitial)\n\n app.provide(rtlRegistryKey, {isRtl, locale})\n },\n}\n"],"names":[],"mappings":";;AAIO,MAAM,YAAoB;AAAA,EAC/B,QAAQ,KAAK,SAA8B;AACzC,UAAM,aAAa;AACnB,UAAM,gBAAgB;AAEtB,UAAM,aACJ,OAAO,SAAS,QAAQ,YAAY,aAAc,SAAS,KAAK,cAAc;AAEhF,UAAM,gBACJ,OAAO,SAAS,QAAQ,YACpB,gBACC,SAAS,KAAK,iBAAiB;AAEtC,UAAM,QAAQ,IAAI,UAAU;AAC5B,UAAM,SAAS,IAAI,aAAa;AAEhC,QAAI,QAAQ,gBAAgB,EAAC,OAAO,QAAO;AAAA,EAC7C;AACF;"}