Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": ["@babel/preset-env"]
}
"presets": [
[
"@babel/preset-env",
{
"exclude": ["@babel/plugin-transform-regenerator"]
}
]
]
}
3 changes: 0 additions & 3 deletions .browserslistrc

This file was deleted.

10 changes: 9 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# default
dist
types/**/*.d.ts
docs

# docs
docs/.nuxt
docs/docs
docs/static

# example
example/dist
16 changes: 3 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
root: true,
env: {
node: true
node: true,
jest: true
},
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'],
parserOptions: {
Expand All @@ -10,16 +11,5 @@ module.exports = {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}
}
2 changes: 1 addition & 1 deletion dist/VueFinalModal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/VueFinalModal.umd.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/components/examples/basic/VDynamicAdvanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script>
import VContent from '../VContent.vue'
import VDescription from '../VDescription.vue'

export default {
methods: {
Expand Down Expand Up @@ -48,7 +48,7 @@ export default {
}
},
default: {
component: VContent,
component: VDescription,
bind: {
content: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
}
Expand Down
3 changes: 0 additions & 3 deletions example/.browserslistrc

This file was deleted.

1 change: 0 additions & 1 deletion example/.eslintignore

This file was deleted.

14 changes: 0 additions & 14 deletions example/.eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions example/.prettierrc.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions example/babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue Final Modal</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
33 changes: 7 additions & 26 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,18 @@
"version": "0.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"dependencies": {
"core-js": "^3.6.5",
"tailwindcss": "^1.4.6",
"vue": "^2.6.11",
"vue-final-modal": "link:.."
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"raw-loader": "^4.0.1",
"vue-template-compiler": "^2.6.11"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint"
]
"vite": "^2.1.5",
"vite-plugin-components": "^0.8.3",
"vite-plugin-vue2": "^1.4.3",
"vite-plugin-windicss": "^0.12.5"
},
"repository": {
"type": "git",
Expand Down
3 changes: 0 additions & 3 deletions example/postcss.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions example/public/index.html

This file was deleted.

2 changes: 0 additions & 2 deletions example/public/robots.txt

This file was deleted.

18 changes: 4 additions & 14 deletions example/src/components/basic/BasicOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@
>
<template v-slot:title># Hello, world!</template>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting
industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</p>
</v-modal>

<button class="vfm-btn" @click="showModal = true">Open Modal</button>

<h3>Prop Options:</h3>

<div
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 p-4 border rounded"
>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 p-4 border rounded">
<label class="flex items-center space-x-2">
<span>value:</span>
<input v-model="showModal" type="checkbox" />
Expand Down Expand Up @@ -76,11 +73,7 @@
</label>
<label class="flex items-center space-x-2">
<span>zIndexBase:</span>
<input
v-model="zIndexBase"
class="w-20 pl-2 dark:text-black rounded focus:outline-none"
type="number"
/>
<input v-model="zIndexBase" class="w-20 pl-2 dark:text-black rounded focus:outline-none" type="number" />
</label>
<div class="flex items-center space-x-2">
<label class="flex items-center space-x-2">
Expand Down Expand Up @@ -111,10 +104,7 @@
<button class="vfm-btn" @click="reset">reset</button>
</div>
<h4>Attach area:</h4>
<div
id="attach"
class="relative w-full h-64 mt-8 p-4 border rounded dark:bg-gray-700"
>
<div id="attach" class="relative w-full h-64 mt-8 p-4 border rounded dark:bg-gray-700">
<button class="vfm-btn" @click="openAttach">
Attach to here and open modal
</button>
Expand Down
4 changes: 1 addition & 3 deletions example/src/components/basic/BasicPlainStyleCodepen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
allowfullscreen="true"
>
See the Pen
<a href="https://codepen.io/hunterliu1003/pen/ZEWoYeE"
>Plain style - Vue Final Modal</a
>
<a href="https://codepen.io/hunterliu1003/pen/ZEWoYeE">Plain style - Vue Final Modal</a>
by Hunter (<a href="https://codepen.io/hunterliu1003">@hunterliu1003</a>) on
<a href="https://codepen.io">CodePen</a>.
</iframe>
Expand Down
10 changes: 2 additions & 8 deletions example/src/components/basic/VAccessibility.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<template>
<div>
<v-modal
v-model="show"
@confirm="show = false"
@cancel="show = false"
focus-trap
>
<v-modal v-model="show" @confirm="show = false" @cancel="show = false" focus-trap>
<template v-slot:title>Hello, vue-final-modal</template>
<p>
Vue Final Modal is a renderless, stackable, detachable and lightweight
modal component.
Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.
</p>
</v-modal>

Expand Down
9 changes: 2 additions & 7 deletions example/src/components/basic/VActionButtons.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<template>
<div>
<vue-final-modal
v-model="showModal"
classes="modal-container"
content-class="modal-content"
>
<vue-final-modal v-model="showModal" classes="modal-container" content-class="modal-content">
<button class="modal__close" @click="showModal = false">
<mdi-close></mdi-close>
</button>
<span class="modal__title">Hello, vue-final-modal</span>
<div class="modal__content">
<p v-for="i in 100" :key="i">
Vue Final Modal is a renderless, stackable, detachable and lightweight
modal component.
Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.
</p>
</div>
<div class="modal__action">
Expand Down
12 changes: 2 additions & 10 deletions example/src/components/basic/VApiShow.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<template>
<div>
<v-modal
v-model="showModal"
name="VApiShow"
@confirm="showModal = false"
@cancel="showModal = false"
>
<v-modal v-model="showModal" name="VApiShow" @confirm="showModal = false" @cancel="showModal = false">
<template v-slot="{ params }"> Hi {{ params.userName }} </template>
<template v-slot:title>$vfm.show</template>
</v-modal>
<button
class="vfm-btn"
@click="$vfm.show('VApiShow', { userName: 'vue-final-modal' })"
>
<button class="vfm-btn" @click="$vfm.show('VApiShow', { userName: 'vue-final-modal' })">
Open modal
</button>
</div>
Expand Down
6 changes: 1 addition & 5 deletions example/src/components/basic/VCentered.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template>
<div>
<vue-final-modal
v-model="showModal"
classes="modal-container"
content-class="modal-content"
>
<vue-final-modal v-model="showModal" classes="modal-container" content-class="modal-content">
<span class="modal__title">Hello, vue-final-modal</span>
</vue-final-modal>
<button class="vfm-btn" @click="showModal = true">Open modal</button>
Expand Down
9 changes: 2 additions & 7 deletions example/src/components/basic/VCloseButton.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<template>
<div>
<vue-final-modal
v-model="showModal"
classes="modal-container"
content-class="modal-content"
>
<vue-final-modal v-model="showModal" classes="modal-container" content-class="modal-content">
<button class="modal__close" @click="showModal = false">
<mdi-close></mdi-close>
</button>
<span class="modal__title">Hello, vue-final-modal</span>
<div class="modal__content">
<p>
Vue Final Modal is a renderless, stackable, detachable and lightweight
modal component.
Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.
</p>
</div>
</vue-final-modal>
Expand Down
9 changes: 2 additions & 7 deletions example/src/components/basic/VContent.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<template>
<div>
<vue-final-modal
v-model="showModal"
classes="modal-container"
content-class="modal-content"
>
<vue-final-modal v-model="showModal" classes="modal-container" content-class="modal-content">
<span class="modal__title">Hello, vue-final-modal</span>
<div class="modal__content">
<p>
Vue Final Modal is a renderless, stackable, detachable and lightweight
modal component.
Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.
</p>
</div>
</vue-final-modal>
Expand Down
7 changes: 3 additions & 4 deletions example/src/components/basic/VDynamicAdvanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script>
import VContent from '../VContent.vue'
import VDescription from '../VDescription.vue'

export default {
methods: {
Expand Down Expand Up @@ -48,10 +48,9 @@ export default {
}
},
default: {
component: VContent,
component: VDescription,
bind: {
content:
'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
content: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
}
}
}
Expand Down
Loading