UNPKG

@oruga-ui/oruga-next

Version:

UI components for Vue.js and CSS framework agnostic

1 lines 1.76 kB
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import type { App, Plugin } from \"vue\";\nimport type { OrugaOptions } from \"./types\";\n\nimport * as plugins from \"./components/plugins\";\n\nimport { ConfigProgrammatic, OrugaConfig } from \"./utils/config\";\nimport { registerPlugin, registerComponentProgrammatic } from \"./utils/plugins\";\n\n// export all types\nexport * from \"./types\";\nexport * from \"./components/types\";\n\n// export all helper functions\nexport * from \"./utils/helpers\";\n\n// export all vue components\nexport * from \"./components\";\n// export all components as vue plugin\nexport * from \"./components/plugins\";\n\n// export programmatic config\nexport { OrugaConfig, ConfigProgrammatic };\n\n// export programmatic composable\nexport { useOruga, type OrugaProgrammatic } from \"./utils/programmatic\";\n\n// main oruga vue plugin\nconst plugin: Plugin = {\n install(app: App, options: OrugaOptions = {}) {\n // initialise config with options\n app.use(OrugaConfig, options);\n\n // add all components\n for (const componentKey in plugins) {\n registerPlugin(app, plugins[componentKey]);\n }\n\n // add programmatic config component\n registerComponentProgrammatic(app, \"config\", ConfigProgrammatic);\n },\n};\n\n// export default oruga vue plugin\nexport { plugin as Oruga };\nexport default plugin;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,SAAiB;AAAA,EACnB,QAAQ,KAAU,UAAwB,IAAI;AAEtC,QAAA,IAAI,aAAa,OAAO;AAG5B,eAAW,gBAAgB,SAAS;AACjB,qBAAA,KAAK,QAAQ,YAAY,CAAC;AAAA,IAAA;AAIf,kCAAA,KAAK,UAAU,kBAAkB;AAAA,EAAA;AAEvE;"}