edvoyui-component-library-test-flight 0.0.27 → 0.0.29

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/EUIDashboardTable.vue?vue&type=script&setup=true&lang.ts";
2
- import "/Volumes/work/repos/edvoy-ui-v2/src/components/table/EUIDashboardTable.vue?vue&type=style&index=0&scoped=448c7bbf&lang.scss";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/table/EUIDashboardTable.vue?vue&type=style&index=0&scoped=853762cf&lang.scss";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUIDashboardTable.vue.d.ts.map
@@ -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=60a9ff29&lang.scss";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/table/EUITable.vue?vue&type=style&index=0&scoped=c13405e0&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.27",
4
+ "version": "0.0.29",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -39,6 +39,15 @@ const meta = {
39
39
  "Enables date range selection, allowing users to pick a start and end date.",
40
40
  defaultValue: false,
41
41
  },
42
+ multiCalendars: {
43
+ control: "boolean",
44
+ description: "Enables date range selection across multiple calendars.",
45
+ defaultValue: false,
46
+ table: {
47
+ type: { summary: "boolean" }, // Specifies the type in the docs table
48
+ defaultValue: { summary: "false" }, // Default value displayed in the table
49
+ },
50
+ },
42
51
  timePicker: {
43
52
  control: "boolean",
44
53
  description: "Allows time selection in addition to the date if true.",
@@ -64,6 +64,7 @@
64
64
  auto-apply
65
65
  :hide-input-icon="true"
66
66
  position="left"
67
+ :multi-calendars="multiCalendars"
67
68
  />
68
69
  </div>
69
70
  <EUIErrorMessage :errors="errors" :name="name" />
@@ -119,6 +120,7 @@ const props = defineProps({
119
120
  disabled:Boolean,
120
121
  required: Boolean,
121
122
  range:Boolean,
123
+ multiCalendars:Boolean,
122
124
  inputFilled: {
123
125
  type:Boolean,
124
126
  default: false
@@ -170,7 +172,7 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
170
172
  <style lang="scss">
171
173
  .dp__theme_light {
172
174
  --dp-primary-color: rgba(139, 92, 246, 1);
173
- }
175
+ }
174
176
 
175
177
  .eui-datepicker {
176
178
  @apply min-w-56;
@@ -187,7 +189,6 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
187
189
  right: v-bind(clearIconRight);
188
190
  }
189
191
  }
190
-
191
192
  &.normal {
192
193
  .dp__main {
193
194
  .dp__input {
@@ -198,21 +199,24 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
198
199
  }
199
200
  }
200
201
  }
201
-
202
202
  .dp__range_end,
203
203
  .dp__range_start,
204
204
  .dp__active_date {
205
205
  background-color: var(--dp-primary-color);
206
206
  color: #fff;
207
207
  }
208
-
209
208
  .dp__today {
210
209
  border-color: var(--dp-primary-color);
211
210
  }
212
-
213
211
  .dp__action_select:hover {
214
212
  background-color: var(--dp-primary-color);
215
213
  color: #fff;
216
214
  }
217
215
  }
216
+ .dp__calendar_header {
217
+ @apply text-sm font-medium;
218
+ }
219
+ .dp__cell_inner {
220
+ @apply text-sm font-normal;
221
+ }
218
222
  </style>
@@ -21,6 +21,20 @@
21
21
 
22
22
 
23
23
  <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
24
+
25
+ <div>
26
+ <EUIDatepicker
27
+ v-model:modelValue="datepickerRange"
28
+ label="Datepicker Range multi"
29
+ placeholder="Select Date here..."
30
+ :range="true"
31
+ :multi-calendars="true"
32
+ required
33
+ :icon="CalendarIcon"
34
+ iconType="startIcon"
35
+ />
36
+ </div>
37
+
24
38
  <div>
25
39
  <EUIDatepicker
26
40
  v-model:modelValue="datepickerRange"
@@ -3,7 +3,7 @@
3
3
  <div class="relative w-full mx-auto overflow-hidden">
4
4
  <div
5
5
  id="dashboard-table"
6
- class="overflow-auto max-h-[calc(100svh-13rem)] scrollbar--thin overscroll-none"
6
+ :class="['overflow-auto scrollbar--thin overscroll-none', tableHeight ? tableHeight : 'h-[calc(100svh-13rem)] max-h-[calc(100svh-13rem)]']"
7
7
  ref="tableContainer"
8
8
  @scroll="handleScroll"
9
9
  >
@@ -63,7 +63,7 @@
63
63
  <tr class="norecords">
64
64
  <td :colspan="headers.length">
65
65
  <div
66
- class="flex items-center justify-center text-xl font-medium text-gray-500 min-h-96"
66
+ class="flex items-center justify-center min-h-96"
67
67
  >
68
68
  <EUICircleLoader />
69
69
  </div>
@@ -114,10 +114,9 @@
114
114
  <slot name="expanded" :row="row" :rowIndex="rowIndex"></slot>
115
115
  </template>
116
116
  </template>
117
-
118
- <template v-if="computedItems.length === 0">
117
+ <template v-else-if="computedItems.length === 0">
119
118
  <tr class="norecords">
120
- <td :colspan="headers.length">
119
+ <td :colspan="checkable === true ? headers.length + 1 : headers.length">
121
120
  <div
122
121
  class="flex items-center justify-center text-xl font-medium text-gray-500 min-h-96"
123
122
  >
@@ -216,7 +215,12 @@ const props = defineProps({
216
215
  default: () => () => false,
217
216
  },
218
217
  isRowCheckable: { type: Function, default: () => true },
219
- tableLoading: { type: Boolean, default: true },
218
+ tableHeight: {
219
+ type: String,
220
+ required: false,
221
+ default: ""
222
+ },
223
+ tableLoading: { type: Boolean, default: false },
220
224
  });
221
225
  const {
222
226
  defaultSort,
@@ -238,9 +242,7 @@ const currentSortDir = ref(defaultSortDirection.value);
238
242
  const newCheckedRows = ref([...checkedRows.value]);
239
243
  const newCurrentPage = ref(currentPage.value);
240
244
  const lastCheckedRowIndex = ref();
241
-
242
245
  const limit = ref(props.perPage);
243
-
244
246
  const loading = computed(() => props.tableLoading);
245
247
 
246
248
  // Computed Property
@@ -16,7 +16,7 @@ import {
16
16
 
17
17
  // Meta configuration for the EUItabs stories
18
18
  const meta = {
19
- title: "Component/Table",
19
+ title: "Components/Table",
20
20
  component: EUITable,
21
21
  tags: ["autodocs"],
22
22
  argTypes: {
@@ -73,6 +73,11 @@ const meta = {
73
73
  description:
74
74
  "CSS height of the table (e.g., 'h-[calc(100svh-20rem)] max-h-[calc(100svh-20rem)]')",
75
75
  },
76
+ tableLoading: {
77
+ control: "boolean",
78
+ description:
79
+ "Controls the visibility of the table loader. Set to `true` to show the loading state.",
80
+ },
76
81
  },
77
82
  } satisfies Meta<typeof EUITable>;
78
83
 
@@ -88,7 +88,20 @@
88
88
  </tr>
89
89
  </thead>
90
90
  <tbody>
91
+ <template v-if="loading">
92
+ <tr class="norecords">
93
+ <td :colspan="headers.length">
94
+ <div
95
+ class="flex items-center justify-center min-h-96"
96
+ >
97
+ <EUICircleLoader />
98
+ </div>
99
+ </td>
100
+ </tr>
101
+ </template>
102
+
91
103
  <template
104
+ v-else-if="computedItems.length > 0"
92
105
  v-for="(row, rowIndex) in computedItems"
93
106
  :key="`table-row-${rowIndex}`"
94
107
  >
@@ -123,9 +136,8 @@
123
136
  <slot name="expanded" :row="row" :rowIndex="rowIndex"></slot>
124
137
  </template>
125
138
  </template>
126
- </tbody>
127
- <tbody v-if="computedItems.length === 0">
128
- <tr class="norecords">
139
+ <template v-else-if="computedItems.length === 0">
140
+ <tr class="norecords">
129
141
  <td :colspan="checkable === true ? headers.length + 1 : headers.length">
130
142
  <div
131
143
  class="flex items-center justify-center text-xl font-medium text-gray-500 min-h-96"
@@ -134,7 +146,9 @@
134
146
  </div>
135
147
  </td>
136
148
  </tr>
149
+ </template>
137
150
  </tbody>
151
+
138
152
  </table>
139
153
  </div>
140
154
  <div
@@ -179,6 +193,7 @@ import EUITableCheckbox from "./EUITableCheckbox.vue";
179
193
  import EUIPageLimit from "./EUIPageLimit.vue";
180
194
  import EUIStudentPagination from "./EUIStudentPagination.vue";
181
195
  import { capitalizeText } from "../../utils/lodash";
196
+ import EUICircleLoader from "../loader/EUICircleLoader.vue";
182
197
 
183
198
  interface Header {
184
199
  value: string;
@@ -216,6 +231,7 @@ const props = defineProps({
216
231
  required: false,
217
232
  default: ""
218
233
  },
234
+ tableLoading: { type: Boolean, default: false },
219
235
  });
220
236
 
221
237
  const {
@@ -233,14 +249,13 @@ const {
233
249
  customIsChecked,
234
250
  } = toRefs(props);
235
251
 
236
-
237
-
238
252
  const currentSort = ref(defaultSort.value);
239
253
  const currentSortDir = ref(defaultSortDirection.value);
240
254
  const newCheckedRows = ref([...checkedRows.value]);
241
255
  const newCurrentPage = ref(currentPage.value);
242
256
  const lastCheckedRowIndex = ref();
243
257
  const limit = ref(props.perPage);
258
+ const loading = computed(() => props.tableLoading);
244
259
 
245
260
  // Computed Property
246
261
  const filteredItems = computed(() => {