classcard-ui 0.2.420 → 0.2.421

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.420",
3
+ "version": "0.2.421",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -22,10 +22,12 @@
22
22
  "core-js": "^3.18.0",
23
23
  "dayjs": "^1.10.7",
24
24
  "filestack-js": "^3.25.0",
25
+ "focus-trap-vue": "^1.1.1",
25
26
  "gridjs-selection": "^3.4.0",
26
27
  "gridjs-vue": "^3.4.0",
27
28
  "lodash-es": "^4.17.21",
28
29
  "v-calendar": "^2.3.2",
30
+ "v-scroll-lock": "^1.3.1",
29
31
  "vue": "^2.6.14",
30
32
  "vue-good-table": "^2.21.8",
31
33
  "vue-multiselect": "^2.1.6",
@@ -1,80 +1,88 @@
1
1
  <template>
2
- <div class="fixed z-10 inset-0 overflow-y-auto">
3
- <div
4
- class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
5
- @click="$emit('close')"
6
- >
7
- <transition
8
- enter-active-class="ease-out duration-300"
9
- enter-class="opacity-0"
10
- enter-to-class="opacity-100"
11
- leave-active-class="ease-in duration-200"
12
- leave-class="opacity-100"
13
- leave-to-class="opacity-0"
2
+ <focus-trap :active="true" :escapeDeactivates="false">
3
+ <div v-scroll-lock="true" class="z-100 fixed inset-0 overflow-y-auto">
4
+ <div
5
+ class="flex min-h-screen items-end justify-center px-4 pt-4 pb-20 text-center sm:block sm:p-0"
6
+ @click="$emit('close')"
14
7
  >
15
- <div class="fixed inset-0 transition-opacity" aria-hidden="true">
16
- <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
17
- </div>
18
- </transition>
8
+ <transition
9
+ enter-active-class="ease-out duration-300"
10
+ enter-class="opacity-0"
11
+ enter-to-class="opacity-100"
12
+ leave-active-class="ease-in duration-200"
13
+ leave-class="opacity-100"
14
+ leave-to-class="opacity-0"
15
+ >
16
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
17
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
18
+ </div>
19
+ </transition>
19
20
 
20
- <!-- This element is to trick the browser into centering the modal contents. -->
21
- <span
22
- class="hidden sm:inline-block sm:align-middle sm:h-screen"
23
- aria-hidden="true"
24
- >&#8203;</span
25
- >
26
- <transition
27
- enter-active-class="ease-out duration-300"
28
- enter-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
29
- enter-to-class="opacity-100 translate-y-0 sm:scale-100"
30
- leave-active-class="ease-in duration-200"
31
- leave-class="opacity-100 translate-y-0 sm:scale-100"
32
- leave-to-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
33
- >
34
- <div
35
- class="inline-block md:max-w-2xl align-bottom bg-white rounded-lg text-left overflow-y-visible shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm sm:w-full"
36
- role="dialog"
37
- aria-modal="true"
38
- aria-labelledby="modal-headline"
39
- @click.stop
21
+ <!-- This element is to trick the browser into centering the modal contents. -->
22
+ <span
23
+ class="hidden sm:inline-block sm:h-screen sm:align-middle"
24
+ aria-hidden="true"
25
+ >&#8203;</span
40
26
  >
41
- <div class="bg-white shadow sm:rounded-lg">
42
- <div class="px-4 py-5 sm:p-6">
43
- <h3 class="text-lg leading-6 font-medium text-gray-900">
44
- {{ title }}
45
- </h3>
46
- <div class="mt-2 max-w-xl text-sm text-gray-500">
47
- <p>{{ message }}</p>
48
- </div>
49
- <div class="mt-5 flex justify-end space-x-2">
50
- <c-button
51
- @action="$emit('action-one')"
52
- :type="actionOneType"
53
- :label="actionOneLabel"
54
- ></c-button>
55
- <c-button
56
- @action="$emit('action-two')"
57
- :type="actionTwoType"
58
- :label="actionTwoLabel"
59
- :isLoading="loadButton"
60
- :disabled="loadButton"
61
- ></c-button>
27
+ <transition
28
+ enter-active-class="ease-out duration-300"
29
+ enter-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
30
+ enter-to-class="opacity-100 translate-y-0 sm:scale-100"
31
+ leave-active-class="ease-in duration-200"
32
+ leave-class="opacity-100 translate-y-0 sm:scale-100"
33
+ leave-to-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
34
+ >
35
+ <div
36
+ class="inline-block transform overflow-y-visible rounded-lg bg-white text-left align-bottom shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:align-middle md:max-w-2xl"
37
+ role="dialog"
38
+ aria-modal="true"
39
+ aria-labelledby="modal-headline"
40
+ @click.stop
41
+ >
42
+ <div class="bg-white shadow sm:rounded-lg">
43
+ <div class="px-4 py-5 sm:p-6">
44
+ <h3 class="text-lg font-medium leading-6 text-gray-900">
45
+ {{ title }}
46
+ </h3>
47
+ <div class="mt-2 max-w-xl text-sm text-gray-500">
48
+ <p>{{ message }}</p>
49
+ </div>
50
+ <div class="mt-5 flex justify-end space-x-2">
51
+ <c-button
52
+ @action="$emit('action-one')"
53
+ :type="actionOneType"
54
+ :label="actionOneLabel"
55
+ ></c-button>
56
+ <c-button
57
+ @action="$emit('action-two')"
58
+ :type="actionTwoType"
59
+ :label="actionTwoLabel"
60
+ :isLoading="loadButton"
61
+ :disabled="loadButton"
62
+ ></c-button>
63
+ </div>
62
64
  </div>
63
65
  </div>
64
66
  </div>
65
- </div>
66
- </transition>
67
+ </transition>
68
+ </div>
67
69
  </div>
68
- </div>
70
+ </focus-trap>
69
71
  </template>
70
72
 
71
73
  <script>
72
74
  import CButton from "../CButton";
75
+ import { FocusTrap } from "focus-trap-vue";
76
+ import VScrollLock from "v-scroll-lock";
77
+ import Vue from "vue";
78
+
79
+ Vue.use(VScrollLock);
73
80
 
74
- export default {
81
+ export default Vue.extend({
75
82
  name: "CConfirmActionModal",
76
83
  components: {
77
84
  CButton,
85
+ FocusTrap,
78
86
  },
79
87
  props: {
80
88
  title: {
@@ -106,7 +114,7 @@ export default {
106
114
  default: false,
107
115
  },
108
116
  },
109
- };
117
+ });
110
118
  </script>
111
119
 
112
120
  <style>