├── close.png
├── .babelrc
├── .gitignore
├── .editorconfig
├── main.js
├── .vscode
└── settings.json
├── main.cdn.js
├── vite.config.js
├── package.json
├── README.md
└── index.vue
/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rop7/vue-window-modal/HEAD/close.png
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", { "modules": false }],
4 | "stage-3"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | yarn-error.log
6 |
7 | # Editor directories and files
8 | .idea
9 | *.suo
10 | *.ntvs*
11 | *.njsproj
12 | *.sln
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | import index from './index.vue'
2 |
3 | const install = (Vue) => {
4 | Vue.mixin({
5 | components: {
6 | vueWindowModal: index
7 | }
8 | })
9 | }
10 |
11 | export default { install }
12 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.exclude": {
3 | "**/.git": true,
4 | "**/.svn": true,
5 | "**/.hg": true,
6 | "**/CVS": true,
7 | "**/.DS_Store": true,
8 | "**/Thumbs.db": true
9 | },
10 | "hide-files.files": []
11 | }
--------------------------------------------------------------------------------
/main.cdn.js:
--------------------------------------------------------------------------------
1 | import VueWindowModal from './index.vue'
2 |
3 | // Exporta o componente para uso global
4 | export default VueWindowModal;
5 |
6 | // Opcional: expõe o componente no escopo global para uso direto via CDN
7 | if (typeof window !== 'undefined' && window.Vue) {
8 | window.Vue.component('VueWindowModal', VueWindowModal);
9 | }
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import { createVuePlugin } from 'vite-plugin-vue2';
3 |
4 | export default defineConfig({
5 | plugins: [createVuePlugin()],
6 | build: {
7 | lib: {
8 | entry: './main.cdn.js',
9 | name: 'VueWindowModal',
10 | fileName: 'vue-window-modal',
11 | formats: ['umd'],
12 | },
13 | rollupOptions: {
14 | external: ['vue'],
15 | output: {
16 | globals: {
17 | vue: 'Vue',
18 | },
19 | },
20 | },
21 | }
22 | });
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-window-modal",
3 | "version": "1.0.0",
4 | "description": "Windows like modal component for Vue.js",
5 | "main": "main.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "Rodolfo Paranhos",
10 | "license": "ISC",
11 | "devDependencies": {
12 | "@babel/core": "^7.0.0",
13 | "@vue/babel-preset-app": "^4.0.0",
14 | "vite": "^5.0.0",
15 | "vite-plugin-vue2": "^1.0.0"
16 | },
17 | "dependencies": {
18 | "vue-template-compiler": "^2.6.14"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # vue-window-modal
3 |
4 | Simple window like modal for Vue.js
5 |
6 | `](https://media.giphy.com/media/63Jv8Vy8bK0OHYURYQ/giphy.gif)
7 |
8 | **Install**
9 |
10 | npm install --save https://github.com/ropbla9/vue-window-modal
11 |
12 | **Init plugin**
13 |
14 | import VueWindowModal from 'vue-window-modal'
15 |
16 | Vue.use(VueWindowModal)
17 |
18 | **Use**
19 |
20 |
21 | FOO TEXT ON DEFAULT SLOT :DDDDD 1
22 |
23 |
24 |
25 | FOO TEXT ON DEFAULT SLOT :DDDDD 2
26 |
27 |
28 |
29 | FOO TEXT ON DEFAULT SLOT :DDDDD 3
30 |
31 |
32 | It's not well written but properly working. Feel free to pull request.
33 |
34 | PS: Since it's not pre-compiled you will need a blunder (webpack) to run into your project.
35 |
--------------------------------------------------------------------------------
/index.vue:
--------------------------------------------------------------------------------
1 |
41 |
42 |
43 |
47 |
51 |
52 |
53 |
54 |
55 |
216 |
--------------------------------------------------------------------------------