edvoyui-component-library-test-flight 0.0.128 → 0.0.132

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/searchexpand/EUISearchToggle.vue?vue&type=script&setup=true&lang.ts";
2
- import "/Volumes/work/repos/edvoy-ui-v2/src/components/searchexpand/EUISearchToggle.vue?vue&type=style&index=0&scoped=69488444&lang.css";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/searchexpand/EUISearchToggle.vue?vue&type=style&index=0&scoped=abcc5c95&lang.css";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUISearchToggle.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EUITextArea.vue.d.ts","sourceRoot":"","sources":["../../src/components/textArea/EUITextArea.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4GAA4G,CAAC;AACnI,cAAc,4GAA4G,CAAC;AAC3H,eAAe,SAAS,CAAC"}
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.128",
4
+ "version": "0.0.132",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -1,39 +1,52 @@
1
1
  <template>
2
- <div class="max-w-screen-xl mx-auto bg-white">
3
- <h1
4
- class="my-10 text-2xl font-bold text-center text-gray-900 underline underline-offset-8 decoration-green-400 decoration-wavy"
5
- >
6
- Edvoy User Interface
7
- </h1>
8
- </div>
9
- <!-- <div class="ml-[200px]">
10
- <EUISearchExpand v-model:model-value="searchInput"
11
- :search-sync="showSearch"
12
- @input="seachStudent($event?.target?.value)"
13
- @update:modelValue="seachStudent($event?.target?.value)"
14
- /></div> -->
15
-
2
+ <div class="max-w-screen-xl mx-auto bg-white">
3
+ <h1
4
+ class="my-10 text-2xl font-bold text-center text-gray-900 underline underline-offset-8 decoration-green-400 decoration-wavy"
5
+ >
6
+ Edvoy User Interface
7
+ </h1>
8
+ </div>
16
9
  </template>
17
10
  <script setup lang="ts">
18
-
19
- // import { ref } from 'vue';
20
-
21
- // import EUISearchExpand from './searchexpand/EUISearchExpand.vue'
22
-
23
- // const searchInput =ref('')
24
- // const showSearch =ref(false)
25
-
26
- // const seachStudent=(e)=>{
27
- // console.log('seachStudent',e)
28
- // }
29
11
  </script>
30
12
  <style lang="scss"></style>
31
13
 
32
14
  <!-- Development code here -->
33
- <!-- <template>
15
+ <!--<template>
34
16
  <div class="h-[clac(100svh-64px)] w-full px-10 py-8 max-w-screen-xl mx-auto">
35
17
  <h1 class="mb-2 font-semibold text-gray-900 tetx-lg">Edvoy UI Componnet</h1>
36
18
 
19
+ <div class="p-8 space-x-6 space-y-12">
20
+ <pre class="text-right">{{ activeDays }}--</pre>
21
+ <div class="inline-flex flex-col items-end w-full">
22
+ <EUIButtonGroup
23
+ activeColor="purple"
24
+ size="sm"
25
+ :rounded="false"
26
+ :items="allDays"
27
+ :defaultActive="activeDays"
28
+ @update:clicked-button="onchangeActiveTab"
29
+ >
30
+ <template #before>
31
+ <div
32
+ class="px-2 text-sm font-normal leading-tight tracking-wide text-black me-4 font-inter"
33
+ >
34
+ Renewals due in
35
+ </div>
36
+ </template>
37
+ </EUIButtonGroup>
38
+ </div>
39
+
40
+ <div class="inline-flex items-center justify-end w-full">
41
+ <EUISearchExpand
42
+ v-model:model-value="searchInput"
43
+ :search-sync="showSearch"
44
+ @input="seachStudent($event?.target?.value)"
45
+ @update:modelValue="seachStudent($event?.target?.value)"
46
+ />
47
+ </div>
48
+ </div>
49
+
37
50
  <div class="grid gap-4 sm:grid-cols-2 place-items-start">
38
51
  <div
39
52
  class="w-full max-w-screen-xl col-span-2 p-4 bg-white border border-gray-200 border-solid rounded-lg hover:ring-2 ring-purple-500 ring-offset-1"
@@ -1060,7 +1073,6 @@
1060
1073
  </div>
1061
1074
  <div>
1062
1075
  <UTableview />
1063
- <Delete />
1064
1076
  <EUIAccordion
1065
1077
  :datas="accordionData"
1066
1078
  :defaultOpen="[1]"
@@ -1121,9 +1133,33 @@ import EUITable from "./table/EUITable.vue";
1121
1133
  import { capitalizeText } from "../utils/lodash";
1122
1134
  import ChevronDownStroke from "../assets/svg/ChevronDownStroke.vue";
1123
1135
  import EUIMultiDropdown from "./dropdown/EUIMultiDropdown.vue";
1124
- import Delete from "./delete.vue";
1136
+ // import Delete from "./delete.vue";
1125
1137
  import UTableview from "./table/UTableview.vue";
1126
1138
  import EUIAlerts from "./alerts/EUIAlerts.vue";
1139
+ import EUIButtonGroup from "./button/EUIButtonGroup.vue";
1140
+ import EUISearchExpand from "./searchexpand/EUISearchExpand.vue";
1141
+
1142
+ const allDays = ref([
1143
+ { name: "7 days", count: 5 },
1144
+ { name: "15 days", count: 10 },
1145
+ { name: "16-30 days", count: 20 },
1146
+ { name: "31-60 days", count: 121 },
1147
+ { name: "61-90 days", count: 40 },
1148
+ ]);
1149
+
1150
+ const activeDays = ref(allDays.value[1].name);
1151
+
1152
+ const onchangeActiveTab = (val: any) => {
1153
+ activeDays.value = val.name;
1154
+ };
1155
+
1156
+ const searchInput = ref("");
1157
+ const showSearch = ref(false);
1158
+
1159
+ const seachStudent = (e) => {
1160
+ console.log("seachStudent", e);
1161
+ };
1162
+
1127
1163
 
1128
1164
  const mobileNumber = ref("+91 8667444951");
1129
1165
  const datepicker = ref(new Date());
@@ -5,7 +5,7 @@
5
5
  :color="color"
6
6
  :iconType="iconType"
7
7
  v-bind="$attrs"
8
- :class="['capitalize box-border border-none inline-flex flex-row gap-x-2 items-center active:scale-[.97] active:shadow-md transition duration-150 ease-in-out active:translate-y-0.5', rounded ?'rounded-full':'rounded-lg', btnClass]"
8
+ :class="['capitalize box-border border-none inline-flex flex-row gap-x-2 items-center active:scale-[.97] active:shadow-md transition-all duration-200 ease-in-out active:translate-y-0.5', rounded ?'rounded-full':'rounded-lg', btnClass]"
9
9
  :disabled="disabled"
10
10
  :loading="loading"
11
11
  :icon="icon"
@@ -0,0 +1,261 @@
1
+ <template>
2
+ <div
3
+ class="inline-flex items-center gap-2 px-2 py-2 overflow-hidden transition-all duration-200 ease-in bg-white rounded-full shadow-xl w-max shadow-purple-50"
4
+ :class="[rounded ? 'rounded-full' : 'rounded-lg']"
5
+ >
6
+ <slot name="before" />
7
+ <nav class="relative z-0 inline-flex flex-row items-center gap-2">
8
+ <div id="nav-indicator" :class="[getBtnClass(activeBtnName), rounded ? 'rounded-full' : 'rounded-lg']"></div>
9
+ <button
10
+ v-for="(data, index) in items"
11
+ :key="`data-${index}`"
12
+ v-bind="$attrs"
13
+ :type="type"
14
+ :size="size"
15
+ :iconType="iconType"
16
+ :data-name="data.name"
17
+ :class="[
18
+ 'capitalize box-border border-none inline-flex flex-row gap-x-2 items-center !bg-transparent',
19
+ rounded ? 'rounded-full' : 'rounded-lg',
20
+ getBtnClass(data.name || ''),
21
+ { 'bar-indicator': data.name !== activeBtnName },
22
+ ]"
23
+ :disabled="disabled"
24
+ :loading="loading"
25
+ :icon="icon"
26
+ @click="handleOnChange(data || '')"
27
+ style="transition: all 350ms cubic-bezier(0.15, 0.3, 0.25, 1)"
28
+ >
29
+ <component
30
+ :is="icon"
31
+ v-if="iconType === 'icon' || iconType === 'startIcon'"
32
+ :class="[iconWidth]"
33
+ />
34
+ <slot :data="data" :activeName="activeBtnName"> {{ data?.name }} </slot>
35
+ <component
36
+ :is="icon"
37
+ v-if="iconType === 'endIcon'"
38
+ :class="[iconWidth]"
39
+ />
40
+ <svg
41
+ v-if="loading"
42
+ class="animate-spin"
43
+ :class="[iconWidth]"
44
+ xmlns="http://www.w3.org/2000/svg"
45
+ fill="none"
46
+ viewBox="0 0 24 24"
47
+ >
48
+ <circle
49
+ class="opacity-25"
50
+ cx="12"
51
+ cy="12"
52
+ r="10"
53
+ stroke="currentColor"
54
+ stroke-width="4"
55
+ />
56
+ <path
57
+ fill="currentColor"
58
+ class="opacity-75"
59
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
60
+ />
61
+ </svg>
62
+ </button>
63
+ </nav>
64
+ <slot name="after" />
65
+ </div>
66
+ </template>
67
+
68
+ <script setup lang="ts">
69
+ import {
70
+ computed,
71
+ nextTick,
72
+ onMounted,
73
+ PropType,
74
+ reactive,
75
+ ref,
76
+ toRefs,
77
+ } from "vue";
78
+
79
+ interface Item {
80
+ name: string;
81
+ [key: string]: any;
82
+ }
83
+
84
+ const props = defineProps({
85
+ items: {
86
+ type: Array as () => Item[],
87
+ default: () => [],
88
+ },
89
+ defaultActive: {
90
+ type: String,
91
+ default: "",
92
+ },
93
+ type: {
94
+ type: String as PropType<"button" | "submit" | "reset">,
95
+ default: "button",
96
+ },
97
+ size: {
98
+ type: String as PropType<"xs" | "sm" | "md" | "lg">,
99
+ default: "md",
100
+ },
101
+ activeColor: {
102
+ type: String as PropType<
103
+ | "danger"
104
+ | "success"
105
+ | "black"
106
+ | "white"
107
+ | "purple"
108
+ | "secondary"
109
+ | "tertiary"
110
+ >,
111
+ default: "white",
112
+ },
113
+ iconType: {
114
+ type: String as PropType<"startIcon" | "endIcon" | "icon">,
115
+ default: "",
116
+ },
117
+ icon: {
118
+ type: [String, Object, Function],
119
+ default: "",
120
+ },
121
+ rounded: {
122
+ type: Boolean,
123
+ default: false,
124
+ },
125
+ loading: Boolean,
126
+ disabled: Boolean,
127
+ });
128
+
129
+ const emit = defineEmits<{
130
+ (event: "update:clickedButton", activeTab: Item): void;
131
+ }>();
132
+
133
+ const { items, defaultActive } = toRefs(props);
134
+ const activeBtnName = ref(defaultActive.value || items.value[0]?.name || "");
135
+
136
+ const marker = (el: HTMLElement) => {
137
+ const indicator = document.querySelector("#nav-indicator") as HTMLElement;
138
+ if (indicator && el) {
139
+ indicator.style.left = el.offsetLeft + "px";
140
+ indicator.style.width = el.offsetWidth + "px";
141
+ }
142
+ };
143
+
144
+ const handleOnChange = (val:any) => {
145
+ activeBtnName.value = val?.name;
146
+ emit("update:clickedButton", val);
147
+ nextTick(() => {
148
+ const activeBtn = document.querySelector(
149
+ `nav button[data-name="${activeBtnName.value}"]`
150
+ );
151
+ if (activeBtn) marker(activeBtn as HTMLElement);
152
+ });
153
+ };
154
+
155
+ onMounted(() => {
156
+ nextTick(() => {
157
+ requestAnimationFrame(() => {
158
+ const activeBtn = document.querySelector(
159
+ `nav button[data-name="${activeBtnName.value}"]`
160
+ );
161
+ if (activeBtn) marker(activeBtn as HTMLElement);
162
+ });
163
+ });
164
+ });
165
+
166
+ // Computed classes for button size
167
+ const sizeClasses = reactive({
168
+ xs: "text-xs font-medium leading-[normal]", // 24
169
+ sm: "text-sm font-medium", // 32
170
+ md: "text-base font-semibold", // 40
171
+ lg: "text-base font-semibold", // 48
172
+ });
173
+
174
+ const btnColors = {
175
+ black: {
176
+ enabled:
177
+ "text-white bg-gray-900 hover:bg-gray-800 active:bg-black cursor-pointer active:shadow-black/50",
178
+ disabled: "bg-opacity-60 cursor-not-allowed text-gray-200 bg-gray-800",
179
+ },
180
+ white: {
181
+ enabled:
182
+ "bg-white hover:bg-gray-100 text-gray-500 hover:text-gray-900 cursor-pointer active:shadow-white/50 active:bg-transparent",
183
+ disabled: "bg-opacity-80 cursor-not-allowed text-gray-400 bg-gray-200",
184
+ },
185
+ danger: {
186
+ enabled:
187
+ "bg-red-500 hover:bg-red-600 active:bg-red-500 text-white cursor-pointer active:shadow-red-500/50",
188
+ disabled: "bg-opacity-60 cursor-not-allowed text-gray-200 bg-red-500",
189
+ },
190
+ success: {
191
+ enabled:
192
+ "bg-green-600 hover:bg-green-700 active:bg-green-600 text-white cursor-pointer active:shadow-green-500/50",
193
+ disabled: "bg-opacity-60 cursor-not-allowed text-gray-200 bg-green-600",
194
+ },
195
+ purple: {
196
+ enabled:
197
+ "bg-purple-700 hover:bg-purple-800 active:bg-purple-700 text-white cursor-pointer active:shadow-purple-500/50",
198
+ disabled: "bg-opacity-60 cursor-not-allowed text-gray-200 bg-purple-500",
199
+ },
200
+ secondary: {
201
+ enabled:
202
+ "bg-purple-100 hover:bg-purple-50 active:bg-purple-100 cursor-pointer text-gray-700 active:shadow-purple-200",
203
+ disabled: "bg-opacity-75 cursor-not-allowed text-gray-400 bg-purple-50",
204
+ },
205
+ tertiary: {
206
+ enabled:
207
+ "bg-gray-100 hover:bg-gray-50 active:bg-gray-100 text-gray-700 cursor-pointer active:shadow-bg-gray-200/50 ring-1 ring-gray-200",
208
+ disabled:
209
+ "bg-opacity-75 cursor-not-allowed text-gray-400 bg-gray-50 ring-1 ring-gray-100",
210
+ },
211
+ };
212
+
213
+ const iconClasses = {
214
+ lg: props.iconType === "icon" ? "p-3" : "px-6 py-3",
215
+ md: props.iconType === "icon" ? "p-2" : "px-4 py-2",
216
+ sm: props.iconType === "icon" ? "p-1.5" : "px-4 py-1.5",
217
+ xs: props.iconType === "icon" ? "p-1" : "px-3 py-1",
218
+ };
219
+
220
+ const iconWidthClasses = reactive({
221
+ xs: "w-4 h-4 text-current",
222
+ sm: "w-5 h-5 text-current",
223
+ md: "w-6 h-6 text-current",
224
+ lg: "w-6 h-6 text-current",
225
+ });
226
+
227
+ const iconWidth = computed(() => {
228
+ return iconWidthClasses[props.size] || "";
229
+ });
230
+
231
+ const getBtnClass = (btnName: string) => {
232
+ const isActive = btnName === activeBtnName.value;
233
+ const colorKey = isActive ? props.activeColor : "white";
234
+ const state = props.disabled ? "disabled" : "enabled";
235
+ const colorClass = btnColors[colorKey] ? btnColors[colorKey][state] : "";
236
+ const sizeClass = sizeClasses[props.size] || "";
237
+ const typeClass = iconClasses[props.size] || "";
238
+ return `${colorClass} ${sizeClass} ${typeClass}`;
239
+ };
240
+ </script>
241
+
242
+ <style lang="scss" scoped>
243
+ #nav-indicator {
244
+ transition: all 350ms cubic-bezier(0.15, 0.3, 0.25, 1);
245
+ @apply absolute left-0 w-auto h-full top-0 -z-[1];
246
+ }
247
+
248
+ .bar-indicator {
249
+ @apply relative;
250
+ &::before {
251
+ content: "";
252
+ transition: 0.4s;
253
+ will-change: opacity;
254
+ @apply absolute -bottom-4 left-0 w-full h-[0.1875rem] rounded-t-xl bg-gray-300 z-[-1] origin-bottom opacity-0;
255
+ }
256
+ }
257
+
258
+ .bar-indicator:hover::before {
259
+ @apply opacity-100 -bottom-2;
260
+ }
261
+ </style>
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <div class="inline-flex flex-col items-end w-full space-y-20">
3
+ <div
4
+ class="inline-flex items-center gap-2 px-3 py-3 transition-colors duration-100 ease-in bg-white rounded-full shadow-xl w-max shadow-purple-50"
5
+ >
6
+ <slot name="before" />
7
+ <nav class="relative inline-flex flex-row items-center gap-2">
8
+ <div id="nav-indicator"></div>
9
+ <EUIBtnGroup
10
+ v-for="(data, index) in allDays"
11
+ :key="`data-${index}`"
12
+ size="sm"
13
+ :data-name="data.name"
14
+ :color="activeDays === data.name ? 'tertiary' : 'white'"
15
+ rounded
16
+ @click="handleOnChange(data.name)"
17
+ >
18
+ {{ data.name }}
19
+ <small class="opacity-75">({{ data.count }})</small></EUIBtnGroup
20
+ >
21
+ </nav>
22
+ <slot name="after" />
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script setup lang="ts">
28
+ import { nextTick, onMounted, ref } from "vue";
29
+ import EUIBtnGroup from "./EUIBtnGroup.vue";
30
+
31
+ const allDays = ref([
32
+ { name: "7 days", count: 5 },
33
+ { name: "15 days", count: 10 },
34
+ { name: "16-30 days", count: 20 },
35
+ { name: "31-60 days", count: 121 },
36
+ { name: "61-90 days", count: 40 },
37
+ ]);
38
+
39
+ const activeDays = ref(allDays.value[0].name);
40
+
41
+ onMounted(() => {
42
+ nextTick(() => {
43
+ const activeBtn = document.querySelector(
44
+ `nav button[data-name="${activeDays.value}"]`
45
+ );
46
+ if (activeBtn) marker(activeBtn as HTMLElement);
47
+ });
48
+ });
49
+
50
+ const marker = (el: HTMLElement) => {
51
+ const indicator = document.querySelector("#nav-indicator") as HTMLElement;
52
+ if (indicator && el) {
53
+ indicator.style.left = el.offsetLeft + "px";
54
+ indicator.style.width = el.offsetWidth + "px";
55
+ }
56
+ };
57
+
58
+ const handleOnChange = (val: string) => {
59
+ activeDays.value = val;
60
+ nextTick(() => {
61
+ const activeBtn = document.querySelector(
62
+ `nav button[data-name="${activeDays.value}"]`
63
+ );
64
+ if (activeBtn) marker(activeBtn as HTMLElement);
65
+ });
66
+ };
67
+ </script>
68
+
69
+ <style lang="scss" scoped>
70
+ #nav-indicator {
71
+ transition: all 350ms cubic-bezier(0.15, 0.3, 0.25, 1);
72
+ @apply absolute w-auto h-1 bg-gray-500 rounded-t-lg -bottom-3;
73
+ }
74
+ </style>
@@ -1,5 +1,7 @@
1
1
  import "../style.scss";
2
2
  export { default as EUIButton } from "./button/EUIButton.vue";
3
+ export { default as EUIButtonGroup } from "./button/EUIButtonGroup.vue";
4
+
3
5
  export { default as EUIInput } from "./input/EUIInput.vue";
4
6
  export { default as EUITelephone } from "./telephone/EUITelephone.vue";
5
7
  export { default as EUITextArea } from "./textArea/EUITextArea.vue";
@@ -1,9 +1,5 @@
1
1
  <template>
2
2
  <div class="relative rounded-full size-12">
3
- <span class="text-[0.625rem] absolute -top-4 left-0 space-x-4">
4
- <span>{{ "searchSync:" + searchSync}}</span>
5
- <span>{{ "isExpanded:" + isExpanded }}</span>
6
- </span>
7
3
  <div class="absolute top-0 right-0">
8
4
  <div
9
5
  ref="componentWrapper"
@@ -1 +0,0 @@
1
- {"version":3,"file":"EUITextArea.vue.d.ts","sourceRoot":"","sources":["../src/components/textArea/EUITextArea.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4GAA4G,CAAC;AACnI,cAAc,4GAA4G,CAAC;AAC3H,eAAe,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"EUIButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/button/EUIButton.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wGAAwG,CAAC;AAC/H,cAAc,wGAAwG,CAAC;AACvH,OAAO,sGAAsG,CAAC;AAC9G,eAAe,SAAS,CAAC"}