edvoyui-component-library-test-flight 0.0.91 → 0.0.93

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.
@@ -1,5 +1,5 @@
1
1
  export * from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/modal/EUIModal.vue?vue&type=script&lang.ts";
2
- import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/modal/EUIModal.vue?vue&type=style&index=0&scoped=739e0044&lang.scss";
2
+ import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/modal/EUIModal.vue?vue&type=style&index=0&scoped=03103d67&lang.scss";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUIModal.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EUIModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/modal/EUIModal.vue"],"names":[],"mappings":"AACA,cAAc,2GAA2G,CAAC;AAuF1H,OAAO,oIAAoI,CAAC;;AAE5I,wBAAmH"}
1
+ {"version":3,"file":"EUIModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/modal/EUIModal.vue"],"names":[],"mappings":"AACA,cAAc,2GAA2G,CAAC;AA0F1H,OAAO,oIAAoI,CAAC;;AAE5I,wBAAmH"}
@@ -1,5 +1,5 @@
1
1
  export * from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=script&setup=true&lang.ts";
2
- import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=style&index=0&scoped=4fdb3faa&lang.css";
2
+ import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=style&index=0&scoped=d49443f9&lang.css";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUITabs.vue.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edvoyui-component-library-test-flight",
3
3
  "private": false,
4
- "version": "0.0.91",
4
+ "version": "0.0.93",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Teleport defer to="body">
3
- <Transition name="modal">
3
+ <Transition name="modal" appear>
4
4
  <div
5
5
  v-if="isVisible"
6
6
  class="fixed inset-0 z-50 flex flex-col items-center justify-end sm:justify-center"
@@ -83,7 +83,7 @@
83
83
  </template>
84
84
 
85
85
  <script lang="ts">
86
- import { defineComponent, watchEffect } from "vue";
86
+ import { defineComponent, onMounted, onUnmounted, watch } from "vue";
87
87
 
88
88
  export default defineComponent({
89
89
  name: "Modal",
@@ -108,27 +108,44 @@ export default defineComponent({
108
108
  type: Boolean,
109
109
  default: true,
110
110
  },
111
- },
112
- emits: ["update:isVisible", "confirm"],
113
- methods: {
114
- closeModal() {
115
- this.$emit("update:isVisible", false);
111
+ persistent: {
112
+ type: Boolean,
113
+ default: false,
116
114
  },
117
115
  },
118
- setup(props) {
119
- watchEffect(() => {
120
- if (props.isVisible) {
121
- document.body.style.overflow = "hidden"; // Disable body scroll
122
- } else {
123
- document.body.style.overflow = ""; // Re-enable body scroll
116
+ emits: ["update:isVisible", "confirm"],
117
+ setup(props, { emit }) {
118
+ // Methods
119
+ const closeModal = () => {
120
+ if (!props.persistent) {
121
+ emit("update:isVisible", false);
124
122
  }
123
+ };
124
+ const handleKeydown = (event: KeyboardEvent) => {
125
+ if (event.key === "Escape" && props.isVisible && !props.persistent) {
126
+ closeModal();
127
+ }
128
+ };
129
+ // Watcher for body scroll lock
130
+ watch(
131
+ () => props.isVisible,
132
+ (newVal) => {
133
+ document.body.style.overflow = newVal ? "hidden" : "";
134
+ }
135
+ );
136
+ // Lifecycle hooks
137
+ onMounted(() => {
138
+ window.addEventListener("keydown", handleKeydown);
125
139
  });
126
140
 
127
- return {};
128
- },
129
- beforeUnmount() {
130
- document.body.style.overflow = ""; // Re-enable scroll when component unmounts
131
- },
141
+ onUnmounted(() => {
142
+ document.body.style.overflow = ""; // Reset scroll when modal unmounts
143
+ window.removeEventListener("keydown", handleKeydown);
144
+ });
145
+ return {
146
+ closeModal
147
+ };
148
+ }
132
149
  });
133
150
  </script>
134
151
 
@@ -38,6 +38,12 @@ const meta: Meta<typeof EUIModal> = {
38
38
  action: "confirm",
39
39
  description: "Emits when the confirm button is clicked.",
40
40
  },
41
+ persistent: {
42
+ control: "boolean",
43
+ description:
44
+ "Prevents the modal from being closed by clicking on the backdrop or pressing the Escape key.",
45
+ defaultValue: false,
46
+ },
41
47
  },
42
48
  },
43
49
  parameters: {
@@ -177,9 +177,15 @@
177
177
  "
178
178
  >
179
179
  <div
180
- class="flex items-center justify-center text-xl font-medium text-gray-500 h-[calc(100svh-18rem)] max-w-screen-xl border"
180
+ class="flex items-center justify-center w-[calc(100vw-14rem)]"
181
+ :class="[tableHeight ? tableHeight : 'h-[calc(100svh-12rem)] max-h-[calc(100svh-12rem)]']"
181
182
  >
182
- No matching records found
183
+ <div class="text-center">
184
+ <div class="mx-auto overflow-hidden rounded-md size-56">
185
+ <img src="@/assets/images/search-nodata.png" alt="" class="block object-contain object-center h-auto max-w-full opacity-90" />
186
+ </div>
187
+ <div class="my-2 text-xl font-medium text-gray-500">No matching records found</div>
188
+ </div>
183
189
  </div>
184
190
  </td>
185
191
  </tr>
@@ -1,28 +1,27 @@
1
1
  <template>
2
2
  <div>
3
- <div
4
- v-if="tabStyle === 'design'"
3
+ <div class="overflow-x-scroll">
4
+ <div
5
+ v-if="tabStyle === 'design'"
5
6
  class="flex flex-row items-center justify-between w-full p-2 bg-gray-100 rounded-xl"
6
7
  >
7
8
  <button
8
- v-for="(tab, tabindex) in tabs"
9
+ v-for="(tab, tabindex) in tabs"
9
10
  :key="tabindex"
10
11
  :id="`id-${tab.name}`"
11
12
  type="button"
12
13
  class="[&:not(:focus-visible)]:focus:outline-none relative w-full inline-flex items-center transition-colors duration-100"
13
14
  role="tab"
14
15
  tabindex="-1"
15
- @click="selectTab(tabindex)"
16
+ @click="selectTab(tabindex)"
16
17
  >
17
18
  <div
18
19
  class="pointer-events-none absolute inset-0 transition-transform duration-200 transform z-[1] ease-in-out"
19
20
  :class="{
20
- 'translate-x-full':
21
- tabindex < activeTabIndex,
22
- '-translate-x-full':
23
- tabindex > activeTabIndex,
21
+ 'translate-x-full': tabindex < activeTabIndex,
22
+ '-translate-x-full': tabindex > activeTabIndex,
24
23
  'translate-x-0 rounded-lg bg-gray-600':
25
- activeTabIndex === tabindex
24
+ activeTabIndex === tabindex,
26
25
  }"
27
26
  />
28
27
  <span
@@ -30,59 +29,69 @@
30
29
  'w-full px-4 py-2 text-sm tracking-wide font-medium capitalize z-10',
31
30
  activeTabIndex == tabindex
32
31
  ? ' text-white'
33
- : ' text-gray-500 hover:text-gray-600 rounded-lg bg-transparent z-0 transition-colors duration-300 ease-in origin-center'
32
+ : ' text-gray-500 hover:text-gray-600 rounded-lg bg-transparent z-0 transition-colors duration-300 ease-in origin-center',
34
33
  ]"
35
34
  >
35
+ <slot name="title" :tab="tab">
36
+ {{ tab?.name }}
37
+ </slot>
38
+ </span>
39
+ </button>
40
+ </div>
41
+ <div
42
+ v-else-if="tabStyle === 'border'"
43
+ class="flex items-center gap-1 before:bottom-0 before:left-0 before:absolute before:content-[''] before:h-px before:w-full before:bg-gray-200 relative before:-z-[1] z-0 bg-white"
44
+ :class="[
45
+ tabAlign === 'justify'
46
+ ? 'justify-between'
47
+ : tabAlign === 'end'
48
+ ? 'justify-end'
49
+ : 'justify-start',
50
+ ]"
51
+ >
52
+ <button
53
+ v-for="(tab, tabindex) in tabs"
54
+ :key="tabindex"
55
+ role="tab"
56
+ :id="`id-${tab.name}`"
57
+ :class="[
58
+ 'px-3 py-1 leading-5 transition-all duration-150 ease-in-out hover:text-gray-800',
59
+ tabSize === 'sm'
60
+ ? 'text-sm font-semibold border-b-2'
61
+ : 'text-base font-bold border-b-[3px]',
62
+ activeTabIndex === tabindex
63
+ ? 'border-gray-900 text-gray-900'
64
+ : 'border-transparent text-gray-500',
65
+ ]"
66
+ @click="selectTab(tabindex)"
67
+ >
36
68
  <slot name="title" :tab="tab">
37
69
  {{ tab?.name }}
38
70
  </slot>
39
- </span>
40
71
  </button>
41
72
  </div>
42
-
43
- <div
44
- v-else-if="tabStyle === 'border'"
45
- class="flex items-center gap-1 before:bottom-0 before:left-0 before:absolute before:content-[''] before:h-px before:w-full before:bg-gray-200 relative before:-z-[1] z-0 bg-white"
46
- :class="[tabAlign === 'justify' ? 'justify-between' : tabAlign === 'end' ? 'justify-end' : 'justify-start']"
47
- >
48
- <button
49
- v-for="(tab, tabindex) in tabs"
50
- :key="tabindex"
51
- role="tab"
52
- :id="`id-${tab.name}`"
53
- :class="['px-3 py-1 leading-5 transition-all duration-150 ease-in-out hover:text-gray-800',
54
- tabSize === 'sm' ? 'text-sm font-semibold border-b-2' : 'text-base font-bold border-b-[3px]',
55
- activeTabIndex === tabindex
56
- ? 'border-gray-900 text-gray-900'
57
- : 'border-transparent text-gray-500']"
58
- @click="selectTab(tabindex)"
59
- >
60
- <slot name="title" :tab="tab">
61
- {{ tab?.name }}
62
- </slot>
63
- </button>
64
- </div>
65
- <div
66
- v-else
67
- class="flex items-center gap-1 p-2 transition-all duration-100"
68
- >
69
- <button
70
- v-for="(tab, tabindex) in tabs"
71
- :key="tabindex"
72
- role="tab"
73
- :id="`id-${tab.name}`"
74
- class="px-4 py-1 text-sm font-semibold transition-colors duration-150 ease-in-out border rounded-full"
75
- :class="
76
- activeTabIndex === tabindex
77
- ? 'shadow-lg shadow-gray-100 bg-white border-gray-200 focus-within:border-purple-600 text-gray-900'
78
- : 'border-white hover:bg-gray-50 text-gray-700'
79
- "
80
- @click="selectTab(tabindex)"
73
+ <div
74
+ v-else
75
+ class="flex items-center gap-1 p-2 transition-all duration-100"
81
76
  >
82
- <slot name="title" :tab="tab">
83
- {{ tab?.name }}
84
- </slot>
85
- </button>
77
+ <button
78
+ v-for="(tab, tabindex) in tabs"
79
+ :key="tabindex"
80
+ role="tab"
81
+ :id="`id-${tab.name}`"
82
+ class="px-4 py-1 text-sm font-semibold transition-colors duration-150 ease-in-out border rounded-full"
83
+ :class="
84
+ activeTabIndex === tabindex
85
+ ? 'shadow-lg shadow-gray-100 bg-white border-gray-200 focus-within:border-purple-600 text-gray-900'
86
+ : 'border-white hover:bg-gray-50 text-gray-700'
87
+ "
88
+ @click="selectTab(tabindex)"
89
+ >
90
+ <slot name="title" :tab="tab">
91
+ {{ tab?.name }}
92
+ </slot>
93
+ </button>
94
+ </div>
86
95
  </div>
87
96
  <div :class="['py-2 text-base font-normal text-gray-700', contentClass]">
88
97
  <slot name="content" :active-tab="tabs[activeTabIndex]">
@@ -103,10 +112,10 @@ interface Tab {
103
112
  const props = defineProps<{
104
113
  tabs: Tab[];
105
114
  defaultActiveIndex?: number;
106
- tabStyle: "rounded" | "border" | 'design' ,
107
- contentClass?: string[] | string,
108
- tabSize?: "sm" | "md",
109
- tabAlign?: 'start' | 'justify' | 'end'
115
+ tabStyle: "rounded" | "border" | "design";
116
+ contentClass?: string[] | string;
117
+ tabSize?: "sm" | "md";
118
+ tabAlign?: "start" | "justify" | "end";
110
119
  }>();
111
120
 
112
121
  const emit = defineEmits<{
@@ -124,7 +133,6 @@ watch(
124
133
  () => props.defaultActiveIndex,
125
134
  (newIndex) => {
126
135
  activeTabIndex.value = newIndex ?? 0;
127
-
128
136
  }
129
137
  );
130
138
  </script>