edvoyui-component-library-test-flight 0.0.33 → 0.0.35

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 "/Volumes/work/repos/edvoy-ui-v2/src/components/table/EUITable.vue?vue&type=script&setup=true&lang.ts";
2
- import "/Volumes/work/repos/edvoy-ui-v2/src/components/table/EUITable.vue?vue&type=style&index=0&scoped=c13405e0&lang.scss";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/table/EUITable.vue?vue&type=style&index=0&scoped=fc4a1467&lang.scss";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUITable.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.33",
4
+ "version": "0.0.35",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -13,3 +13,13 @@ html, body {
13
13
  .eui {
14
14
  @apply font-normal text-base text-purple-600;
15
15
  }
16
+
17
+ .fade-enter-active,
18
+ .fade-leave-active {
19
+ transition: opacity 0.5s ease;
20
+ }
21
+
22
+ .fade-enter-from,
23
+ .fade-leave-to {
24
+ opacity: 0;
25
+ }
@@ -9,11 +9,9 @@
9
9
  <style lang="scss"></style>
10
10
 
11
11
  <!-- Development code here -->
12
- <!-- <template>
12
+ <!-- <template>
13
13
  <div class="h-[clac(100svh-64px)] w-full px-10 py-8 max-w-screen-xl mx-auto">
14
14
  <h1 class="mb-2 font-semibold text-gray-900 tetx-lg">Edvoy UI Componnet</h1>
15
-
16
-
17
15
  <Delete />
18
16
  <div class="grid gap-4 sm:grid-cols-2 place-items-start">
19
17
  <div
@@ -281,7 +279,7 @@
281
279
  </div>
282
280
 
283
281
  <div
284
- class="w-full max-w-xl p-4 bg-white border border-gray-200 border-solid rounded-lg hover:ring-2 ring-purple-500 ring-offset-1"
282
+ class="w-full max-w-xl p-4 bg-white border border-gray-200 border-solid rounded-lg hover:ring-2 ring-purple-500 ring-offset-1 z-[calc(infinity)]"
285
283
  >
286
284
  <span
287
285
  class="px-1 py-1 mb-0 font-mono text-xs leading-none text-gray-500 bg-gray-100 rounded-md"
@@ -294,7 +292,8 @@
294
292
  </pre>
295
293
  <div class="inline-flex items-center gap-4">
296
294
  <EUIMultiDropdown title="dropdown" :menu-items="menubar" />
297
- <EUIMultiDropdown title="dropdown" class-name="px-3 py-2 text-gray-700 hover:text-gray-900 bg-white rounded-md focus:bg-violet-100 group focus:outline-none focus:ring-2 focus:ring-violet-400 focus:ring-opacity-100 hover:bg-gray-100 active:bg-violet-200" @subMenuItem="handleSubMenuItem" @menuItem="handleMenuItem">
295
+
296
+ <EUIMultiDropdown class-name="px-3 py-2 text-gray-700 hover:text-gray-900 bg-white rounded-md focus:bg-violet-100 group focus:outline-none focus:ring-2 focus:ring-violet-400 focus:ring-opacity-100 hover:bg-gray-100 active:bg-violet-200" @subMenuItem="handleSubMenuItem" @menuItem="handleMenuItem" @action-item="addAction">
298
297
  <template #dropdownName="{ open }">
299
298
  <span>My Students</span>
300
299
  <ChevronDownStroke :class="open ? 'text-gray-900 rotate-180' : 'text-gray-500'"
@@ -302,6 +301,9 @@
302
301
  aria-hidden="true"
303
302
  />
304
303
  </template>
304
+ <template #actionName>
305
+ + Add Custom Filter
306
+ </template>
305
307
  </EUIMultiDropdown>
306
308
  </div>
307
309
  </div>
@@ -938,7 +940,7 @@ const onPageChange = (offsetData: number) => {
938
940
  console.log("@changePage:", offsetData);
939
941
  setTimeout(() => {
940
942
  loading.value = false
941
- }, 500);
943
+ }, 800);
942
944
  };
943
945
 
944
946
  // TODO: Multi dropdown menu clicked access
@@ -951,6 +953,10 @@ const handleMenuItem = (item:any) => {
951
953
  console.log('Menu clicked:', item)
952
954
  }
953
955
 
956
+ const addAction = (e:Event) => {
957
+ console.log("Action Item clicked:" + e)
958
+ }
959
+
954
960
  const handleSubMenuItem = (subItem:any) => {
955
961
  console.log("Submenu item clicked:", subItem);
956
962
  }
@@ -195,6 +195,49 @@ const datepickerRange = ref([new Date(), new Date(new Date().setDate(new Date().
195
195
  },
196
196
  };
197
197
 
198
+ export const RangeUsingMultiCalender: Story = {
199
+ args: {
200
+ placeholder: "Choose your date range...",
201
+ label: "Datepicker",
202
+ range: true,
203
+ multiCalendars: true,
204
+ required: true,
205
+ readonly: false,
206
+ disabled: false,
207
+ errors: {
208
+ message: "Enter valid date format",
209
+ },
210
+ },
211
+ render: (args) => ({
212
+ components: { EUIDatepicker },
213
+ setup() {
214
+ const startDate = new Date();
215
+ const endDate = new Date(new Date().setDate(startDate.getDate() + 7));
216
+ const datepicker = ref([startDate, endDate]);
217
+ return { args, datepicker };
218
+ },
219
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" v-model="datepicker" /></div>`,
220
+ }),
221
+ parameters: {
222
+ docs: {
223
+ source: {
224
+ code: `<script lang="ts" setup>
225
+ const datepickerRange = ref([new Date(), new Date(new Date().setDate(new Date().getDate() + 7))]);
226
+ </script>
227
+ <template>
228
+ <EUIDatepicker
229
+ v-model="datepickerRange"
230
+ label="Datepicker"
231
+ placeholder="Select Date here..."
232
+ :range="true"
233
+ :multiCalendars="true"
234
+ />
235
+ </template>`,
236
+ },
237
+ },
238
+ },
239
+ };
240
+
198
241
  export const TimeOnly: Story = {
199
242
  args: {
200
243
  placeholder: "Select your time",
@@ -185,6 +185,8 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
185
185
  <style lang="scss">
186
186
  .dp__theme_light {
187
187
  --dp-primary-color: rgba(139, 92, 246, 1);
188
+ --dp-row-margin: 2px 0;
189
+ --dp-cell-size: 36px;
188
190
  }
189
191
 
190
192
  .eui-datepicker {
@@ -230,6 +232,15 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
230
232
  @apply text-sm font-medium;
231
233
  }
232
234
  .dp__cell_inner {
235
+ height: var(--dp-cell-size);
236
+ width: var(--dp-cell-size);
233
237
  @apply text-sm font-normal;
238
+
239
+ }
240
+ .dp__month_year_wrap {
241
+ @apply text-sm font-semibold;
242
+ }
243
+ .dp__calendar_row {
244
+ margin: var(--dp-row-margin);
234
245
  }
235
246
  </style>
@@ -185,3 +185,109 @@ const handleSubMenuItem = (subItem: any) => {
185
185
  },
186
186
  },
187
187
  });
188
+
189
+ export const UseActionitem = Template.bind({});
190
+ (UseActionitem.args = {
191
+ title: "My Students",
192
+ className:
193
+ "px-3 py-2 text-gray-700 hover:text-gray-900 bg-white rounded-md focus:bg-violet-100 group focus:outline-none focus:ring-2 focus:ring-violet-400 focus:ring-opacity-100 hover:bg-gray-100 active:bg-violet-200",
194
+ menuItems: [
195
+ { text: "All Students" },
196
+ { text: "My Students" },
197
+ { text: "Genie Completed Students" },
198
+ {
199
+ text: "Standard Filter",
200
+ subMenu: [
201
+ { text: "UKI Fair" },
202
+ { text: "Germany Q4' 24" },
203
+ { text: "Edvoy Express" },
204
+ { text: "Q1 2025 Pipeline" },
205
+ ],
206
+ },
207
+ {
208
+ text: "Custom Filter",
209
+ subMenu: [{ text: "Application Intakes" }, { text: "New Students" }],
210
+ enableAction: true,
211
+ },
212
+ ],
213
+ }),
214
+ (UseActionitem.parameters = {
215
+ docs: {
216
+ source: {
217
+ code: `<script lang="ts" setup>
218
+ const menuItems = [
219
+ {
220
+ "text": "All Students"
221
+ },
222
+ {
223
+ "text": "My Students"
224
+ },
225
+ {
226
+ "text": "Genie Completed Students"
227
+ },
228
+ {
229
+ "text": "Standard Filter",
230
+ "subMenu": [
231
+ {
232
+ "text": "UKI Fair"
233
+ },
234
+ {
235
+ "text": "Germany Q4' 24"
236
+ },
237
+ {
238
+ "text": "Edvoy Express"
239
+ },
240
+ {
241
+ "text": "Q1 2025 Pipeline"
242
+ }
243
+ ]
244
+ },
245
+ {
246
+ "text": "Custom Filter",
247
+ "subMenu": [
248
+ {
249
+ "text": "Application Intakes"
250
+ },
251
+ {
252
+ "text": "New Students"
253
+ }
254
+ ]
255
+ }
256
+ ];
257
+
258
+ const handleMenuItem = (item: any) => {
259
+ console.log("Menu clicked:", item);
260
+ };
261
+
262
+ const handleSubMenuItem = (subItem: any) => {
263
+ console.log("Submenu item clicked:", subItem);
264
+ };
265
+
266
+ const addAction = (e:Event) => {
267
+ console.log("Action Item clicked:" + e)
268
+ }
269
+ </script>
270
+ <template>
271
+ <EUIMultiDropdown :menu-items="menuItems" @menuItem="handleMenuItem" @subMenuItem="handleSubMenuItem" @action-item="addAction">
272
+ <template #dropdownName="{ open }">
273
+ <span>{{ title }}</span>
274
+ <ChevronDownStroke
275
+ :class="open ? 'text-gray-900 rotate-180' : 'text-gray-500'"
276
+ class="transition duration-100 ease-in-out transform rotate-0 size-6 group-hover:text-opacity-80"
277
+ aria-hidden="true"
278
+ />
279
+ </template>
280
+ <template #menu="{menuitem}">
281
+ {{menuitem.text}}
282
+ </template>
283
+ <template #actionName>
284
+ + Add Custom Filter
285
+ </template>
286
+ <template #submenu="{subItem}">
287
+ {{subItem.text}}
288
+ </template>
289
+ </EUIMultiDropdown>
290
+ </template>`,
291
+ },
292
+ },
293
+ });
@@ -38,6 +38,9 @@
38
38
  <!-- Sub-menu lists-->
39
39
  <div v-if="item.subMenu && activeMenuItem === item.text" class="absolute top-0 z-10 transition-all duration-300 ease-in-out left-full min-w-36 max-w-64 w-max">
40
40
  <div class="p-2 bg-white border border-gray-200 border-solid rounded-lg shadow-2xl ms-2 shadow-gray-300">
41
+ <div v-if="item.enableAction" class="px-4 py-2 mb-2 -mx-2 -mt-2 text-sm font-medium text-gray-900 bg-purple-100 rounded-t-lg" @click.prevent="$emit('actionItem', 'action')">
42
+ <slot name="actionName">{{ 'Action Name' }}</slot>
43
+ </div>
41
44
  <div
42
45
  v-for="subItem in item.subMenu"
43
46
  :key="subItem.text"
@@ -64,6 +67,7 @@ import ChevronDownStroke from "../../assets/svg/ChevronDownStroke.vue";
64
67
  interface MenuItem {
65
68
  text: string;
66
69
  subMenu?: MenuItem[];
70
+ enableAction?:boolean;
67
71
  }
68
72
 
69
73
  defineProps({
@@ -95,7 +99,8 @@ defineProps({
95
99
  subMenu: [
96
100
  { text: "Application Intakes" },
97
101
  { text: "New Students" }
98
- ]
102
+ ],
103
+ enableAction: true
99
104
  }
100
105
  ]
101
106
  },
@@ -106,7 +111,7 @@ const isOpen = ref(false);
106
111
  const activeMenuItem = ref<string | null>(null);
107
112
  const dropdownButton = ref<HTMLElement | null>(null);
108
113
 
109
- defineEmits(['subMenuItem', 'menuItem'])
114
+ defineEmits(['subMenuItem', 'menuItem', 'actionItem'])
110
115
 
111
116
  const toggleDropdown = () => {
112
117
  isOpen.value = !isOpen.value;
@@ -1,12 +1,11 @@
1
1
  <template>
2
2
  <div>
3
- <template v-if="loading">
4
- <div :class="['overflow-hidden relative z-0 isolate bg-white backdrop-blur border border-gray-200 rounded-xl transition-colors duration-150 ease-in-out', tableHeight ? tableHeight : 'h-[calc(100svh-9rem)] max-h-[calc(100svh-9rem)]']">
5
- <div class="absolute flex items-center z-[calc(infinity)] w-full h-auto pointer-events-none inset-0">
6
- <EUICircleLoader />
7
- </div>
8
- </div>
9
- </template>
3
+ <Transition name="fade" mode="out-in">
4
+ <div v-if="loading" :class="['overflow-hidden relative z-0 isolate bg-white backdrop-blur transition-colors duration-150 ease-in-out rounded-xl border border-gray-50', tableHeight ? tableHeight : 'h-[calc(100svh-9rem)] max-h-[calc(100svh-9rem)]']">
5
+ <div class="absolute flex items-center z-[calc(infinity)] w-full h-auto pointer-events-none inset-0">
6
+ <EUICircleLoader />
7
+ </div>
8
+ </div>
10
9
  <div v-else class="relative w-full mx-auto overflow-hidden">
11
10
  <div
12
11
  id="student-table"
@@ -178,6 +177,7 @@
178
177
  </template>
179
178
  </div>
180
179
  </div>
180
+ </Transition>
181
181
  </div>
182
182
  </template>
183
183