bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
1 lines • 1.16 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","names":[],"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"],"mappings":";;;AAIA,IAAa,YAAoB,EAC/B,QAAQ,KAAK,SAA8B;CACzC,MAAM,aAAa;CACnB,MAAM,gBAAgB,KAAA;CAEtB,MAAM,aACJ,OAAO,SAAS,QAAQ,YAAY,aAAc,SAAS,KAAK,cAAc;CAEhF,MAAM,gBACJ,OAAO,SAAS,QAAQ,YACpB,gBACC,SAAS,KAAK,iBAAiB;CAEtC,MAAM,QAAQ,IAAI,UAAU;CAC5B,MAAM,SAAS,IAAI,aAAa;CAEhC,IAAI,QAAQ,gBAAgB;EAAC;EAAO;CAAM,CAAC;AAC7C,EACF"}