edvoyui-component-library-test-flight 0.0.168 → 0.0.170
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 +10 -3
- package/src/App.vue +0 -16
- package/src/assets/svg/CheckTick.vue +0 -21
- package/src/assets/svg/ChevronBigDown.vue +0 -22
- package/src/assets/svg/ChevronDownSolid.vue +0 -19
- package/src/assets/svg/ChevronDownStroke.vue +0 -22
- package/src/assets/svg/ChevronDownStrokeSolid.vue +0 -19
- package/src/assets/svg/SearchBigZoomIn.vue +0 -21
- package/src/assets/svg/SortArrow.vue +0 -24
- package/src/assets/svg/Student.vue +0 -30
- package/src/assets/svg/partner.vue +0 -33
- package/src/assets/svg/people.vue +0 -25
- package/src/components/HelloWorld.vue +0 -1974
- package/src/components/accordion/EUIAccordion.vue +0 -152
- package/src/components/alerts/EUIAlerts.vue +0 -194
- package/src/components/avatar/EUIAvatar.vue +0 -96
- package/src/components/breadcrumb/EUIBreadcrumb.vue +0 -59
- package/src/components/button/EUIButton.vue +0 -154
- package/src/components/button/EUIButtonGroup.vue +0 -287
- package/src/components/button/buttonAnimateTab.vue +0 -74
- package/src/components/checkbox/EUICheckbox.vue +0 -110
- package/src/components/datepicker/EUIDatepicker.vue +0 -295
- package/src/components/delete.vue +0 -262
- package/src/components/dragModal/EUIDrag.vue +0 -179
- package/src/components/dropdown/EUIMultiDropdown.vue +0 -174
- package/src/components/errorMessage/EUIErrorMessage.vue +0 -25
- package/src/components/input/EUIInput.vue +0 -223
- package/src/components/input/EUINumberInput.vue +0 -250
- package/src/components/loader/EUICircleLoader.vue +0 -31
- package/src/components/loader/EUICubeLoader.vue +0 -237
- package/src/components/loader/EUILoader.vue +0 -17
- package/src/components/loader/EUISquareLoader.vue +0 -47
- package/src/components/modal/EUIModal.vue +0 -224
- package/src/components/pillSelect/EUIPillSelect.vue +0 -149
- package/src/components/popover/EUIPopover.vue +0 -297
- package/src/components/radio/EUIRadio.vue +0 -75
- package/src/components/searchInput/EUISearch.vue +0 -223
- package/src/components/searchTagSelect/EUISearchTagSelect.vue +0 -642
- package/src/components/searchTagSelect/SearchInput.vue +0 -167
- package/src/components/searchexpand/EUISearchExpand.vue +0 -148
- package/src/components/searchexpand/EUISearchToggle.vue +0 -86
- package/src/components/select/EUISelect.vue +0 -1092
- package/src/components/selectSearch/EUISelectSearch.vue +0 -23
- package/src/components/slideover/EUISlideover.vue +0 -207
- package/src/components/stepperTimeline/EUIStepperHorizontal.vue +0 -242
- package/src/components/stepperTimeline/EUIStepperTimeline.vue +0 -16
- package/src/components/stepperTimeline/EUIStepperVertical.vue +0 -112
- package/src/components/table/ColumnResizeTable.vue +0 -740
- package/src/components/table/EUIDashboardTable.vue +0 -514
- package/src/components/table/EUIPageLimit.vue +0 -66
- package/src/components/table/EUIPagination.vue +0 -175
- package/src/components/table/EUIStudentPagination.vue +0 -172
- package/src/components/table/EUITable.vue +0 -559
- package/src/components/table/EUITableCheckbox.vue +0 -98
- package/src/components/table/GrowthTable.vue +0 -575
- package/src/components/table/GrowthTableView.vue +0 -108
- package/src/components/table/ResizeTableview.vue +0 -198
- package/src/components/table/UCheckbox.vue +0 -169
- package/src/components/table/UTable.vue +0 -611
- package/src/components/table/UTableview.vue +0 -189
- package/src/components/tabs/EUITabOutline.vue +0 -263
- package/src/components/tabs/EUITabs.vue +0 -226
- package/src/components/tag/EUITag.vue +0 -88
- package/src/components/telephone/EUITelephone.vue +0 -299
- package/src/components/textArea/EUITextArea.vue +0 -155
- package/src/components/timeLine/EUITimeLine.vue +0 -148
- package/src/components/toggle/EUIToggle.vue +0 -101
- package/src/components/tooltip/EUITooltip.vue +0 -111
- package/src/components/uidemo/select-com.vue +0 -120
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div
|
|
4
|
-
:class="[
|
|
5
|
-
accordionStyle === 'grouped'
|
|
6
|
-
? 'p-2 bg-gray-50 rounded-xl'
|
|
7
|
-
: 'space-y-3',
|
|
8
|
-
'max-w-full transition-all duration-100 ease-in-out',
|
|
9
|
-
]"
|
|
10
|
-
>
|
|
11
|
-
<details
|
|
12
|
-
v-for="(item, index) in datas"
|
|
13
|
-
:key="`accordion-${index}`"
|
|
14
|
-
:open="openAccordions[index]"
|
|
15
|
-
@click.prevent="onClick(index)"
|
|
16
|
-
:class="[
|
|
17
|
-
accordionStyle === 'grouped'
|
|
18
|
-
? 'rounded-lg hover:bg-gray-100 open:bg-gray-100 open:mb-4 open:last:mb-0'
|
|
19
|
-
: 'bg-white px-8 py-4 rounded-2xl hover:ring-2 hover:ring-purple-500 open:ring-2 ring-purple-700 open:shadow-lg open:shadow-purple-100',
|
|
20
|
-
'box-border relative mx-auto my-0 text-base font-normal transition-colors duration-150 ease-in-out group',
|
|
21
|
-
className, item?.className,
|
|
22
|
-
]"
|
|
23
|
-
>
|
|
24
|
-
<summary
|
|
25
|
-
:class="[
|
|
26
|
-
accordionStyle === 'grouped'
|
|
27
|
-
? 'p-4'
|
|
28
|
-
: 'group-open:pb-4 gap-6 group-open:border-b group-open:border-gray-200',
|
|
29
|
-
'flex items-center font-semibold list-none cursor-pointer select-none focus:outline-none max-w-full justify-between',
|
|
30
|
-
]"
|
|
31
|
-
:aria-expanded="openAccordions[index]"
|
|
32
|
-
>
|
|
33
|
-
<div
|
|
34
|
-
:class="[
|
|
35
|
-
accordionStyle === 'grouped' ? 'w-11/12' : 'flex-initial w-[calc(75%-1.5rem)]',
|
|
36
|
-
'text-gray-700 transition-all duration-200 ease-in-out faq-title group-hover:text-gray-900 group-open:text-gray-900',
|
|
37
|
-
]"
|
|
38
|
-
>
|
|
39
|
-
<slot name="title" :item="item">
|
|
40
|
-
{{ item.title }}
|
|
41
|
-
</slot>
|
|
42
|
-
</div>
|
|
43
|
-
<svg
|
|
44
|
-
v-if="accordionStyle === 'grouped'"
|
|
45
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
46
|
-
class="absolute text-gray-700 transition-all duration-150 ease-out pointer-events-none expand-icon group-open:text-gray-900 right-4 group-open:rotate-90"
|
|
47
|
-
width="24"
|
|
48
|
-
height="24"
|
|
49
|
-
viewBox="0 0 24 24"
|
|
50
|
-
stroke-width="2"
|
|
51
|
-
stroke="currentColor"
|
|
52
|
-
fill="none"
|
|
53
|
-
stroke-linecap="round"
|
|
54
|
-
stroke-linejoin="round"
|
|
55
|
-
>
|
|
56
|
-
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
57
|
-
<path d="M9 6l6 6l-6 6"></path>
|
|
58
|
-
</svg>
|
|
59
|
-
<div v-else class="flex-1 max-w-[25%] flex items-center justify-end gap-3" @click.stop>
|
|
60
|
-
<slot name="right-icon" :item="item"></slot>
|
|
61
|
-
</div>
|
|
62
|
-
</summary>
|
|
63
|
-
<div
|
|
64
|
-
:class="[
|
|
65
|
-
accordionStyle === 'grouped' ? 'p-4 pt-1 ' : 'pt-3',
|
|
66
|
-
'font-light text-gray-600',
|
|
67
|
-
]"
|
|
68
|
-
>
|
|
69
|
-
<slot name="content" :item="item">
|
|
70
|
-
{{ item.content }}
|
|
71
|
-
</slot>
|
|
72
|
-
</div>
|
|
73
|
-
</details>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
77
|
-
|
|
78
|
-
<script setup lang="ts">
|
|
79
|
-
import { onMounted, PropType, ref, watch } from "vue";
|
|
80
|
-
|
|
81
|
-
const props = defineProps({
|
|
82
|
-
datas: {
|
|
83
|
-
type: Array as PropType<any[]>,
|
|
84
|
-
required: true,
|
|
85
|
-
default: () => [],
|
|
86
|
-
},
|
|
87
|
-
defaultOpen: {
|
|
88
|
-
type: Array as PropType<number[]>,
|
|
89
|
-
default: () => [0],
|
|
90
|
-
},
|
|
91
|
-
collapse: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
default: false,
|
|
94
|
-
},
|
|
95
|
-
accordionStyle: {
|
|
96
|
-
type: String as PropType<"grouped" | "separated">,
|
|
97
|
-
default: "grouped",
|
|
98
|
-
},
|
|
99
|
-
className: {
|
|
100
|
-
type: String,
|
|
101
|
-
required: false,
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
const openAccordions = ref<boolean[]>(Array(props.datas.length).fill(false));
|
|
106
|
-
|
|
107
|
-
const initializeOpenAccordions = () => {
|
|
108
|
-
openAccordions.value = props.datas.map((_, index) =>
|
|
109
|
-
props.defaultOpen.includes(index)
|
|
110
|
-
);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
watch(
|
|
114
|
-
() => props.defaultOpen,
|
|
115
|
-
() => {
|
|
116
|
-
initializeOpenAccordions();
|
|
117
|
-
},
|
|
118
|
-
{ immediate: true }
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
onMounted(() => {
|
|
122
|
-
props.defaultOpen.forEach((index: number) => {
|
|
123
|
-
if (index >= 0 && index < openAccordions.value.length) {
|
|
124
|
-
openAccordions.value[index] = true; // Open specified accordions
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
const emit = defineEmits(['update:activeItem']);
|
|
130
|
-
const onClick = (index: number) => {
|
|
131
|
-
// openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
|
|
132
|
-
if (props.collapse) {
|
|
133
|
-
openAccordions.value = openAccordions.value.map((_, i) => i === index);
|
|
134
|
-
} else {
|
|
135
|
-
openAccordions.value = openAccordions.value.map((isOpen, i) =>
|
|
136
|
-
i === index ? !isOpen : isOpen
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Emit active index accessible from parent component
|
|
141
|
-
const activeItems = openAccordions.value.map((isOpen, i) => (isOpen ? i : null)).filter((i) => i !== null);
|
|
142
|
-
emit('update:activeItem', activeItems);
|
|
143
|
-
};
|
|
144
|
-
</script>
|
|
145
|
-
|
|
146
|
-
<style lang="scss" scoped>
|
|
147
|
-
summary {
|
|
148
|
-
&::-webkit-details-marker {
|
|
149
|
-
display: none;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
</style>
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<transition
|
|
3
|
-
enter-active-class="transition duration-300 ease-out transform"
|
|
4
|
-
enter-from-class="translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2"
|
|
5
|
-
enter-to-class="translate-y-0 opacity-100 sm:translate-x-0"
|
|
6
|
-
leave-active-class="transition duration-100 ease-in"
|
|
7
|
-
leave-from-class="opacity-100"
|
|
8
|
-
leave-to-class="opacity-0"
|
|
9
|
-
>
|
|
10
|
-
<div v-if="showAlert" :class="['p-4 rounded-md', alertsClass.bgColor]">
|
|
11
|
-
<div
|
|
12
|
-
:class="[closeIcon && !textMessage ? 'items-center pr-2 flex' : 'flex items-start']"
|
|
13
|
-
>
|
|
14
|
-
<div class="shrink-0">
|
|
15
|
-
<slot name="icon">
|
|
16
|
-
<component
|
|
17
|
-
:is="alertIcon || alertsClass.leftIcon?.icon"
|
|
18
|
-
:class="['size-5', alertsClass.leftIcon?.color]"
|
|
19
|
-
aria-hidden="true"
|
|
20
|
-
/>
|
|
21
|
-
</slot>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="ml-3">
|
|
24
|
-
<h3 :class="['text-sm font-medium', alertsClass.titleColor]">
|
|
25
|
-
<slot name="title">{{ heading || "Alert Title" }}</slot>
|
|
26
|
-
</h3>
|
|
27
|
-
|
|
28
|
-
<slot name="content">
|
|
29
|
-
<div v-if="textMessage" :class="['mt-2 text-sm', alertsClass.textColor]">
|
|
30
|
-
{{ textMessage || "your description here..." }}
|
|
31
|
-
</div>
|
|
32
|
-
</slot>
|
|
33
|
-
|
|
34
|
-
<slot name="actionButtons">
|
|
35
|
-
<div v-if="actionItems" class="mt-4">
|
|
36
|
-
<div class="-mx-2 -my-1.5 flex">
|
|
37
|
-
<button
|
|
38
|
-
type="button"
|
|
39
|
-
:class="[
|
|
40
|
-
'rounded-md px-3 py-1.5 text-sm font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2',
|
|
41
|
-
alertsClass.btnPrimary,
|
|
42
|
-
]"
|
|
43
|
-
@click="onAction"
|
|
44
|
-
>
|
|
45
|
-
View status
|
|
46
|
-
</button>
|
|
47
|
-
<button
|
|
48
|
-
type="button"
|
|
49
|
-
:class="[
|
|
50
|
-
'ml-3 rounded-md px-3 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2',
|
|
51
|
-
alertsClass.btnTertiary,
|
|
52
|
-
]"
|
|
53
|
-
@click="onClose"
|
|
54
|
-
>
|
|
55
|
-
Dismiss
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</slot>
|
|
60
|
-
</div>
|
|
61
|
-
<div v-if="closeIcon" class="ms-auto ps-3">
|
|
62
|
-
<slot name="xclose">
|
|
63
|
-
<div class="-mx-1.5 -my-1.5 pt-1">
|
|
64
|
-
<button
|
|
65
|
-
type="button"
|
|
66
|
-
:class="[
|
|
67
|
-
'inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2',
|
|
68
|
-
alertsClass.btnClose,
|
|
69
|
-
]"
|
|
70
|
-
@click="onClose()"
|
|
71
|
-
>
|
|
72
|
-
<span class="sr-only">Dismiss</span>
|
|
73
|
-
<XMarkIcon class="size-5" aria-hidden="true" />
|
|
74
|
-
</button>
|
|
75
|
-
</div>
|
|
76
|
-
</slot>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</transition>
|
|
81
|
-
</template>
|
|
82
|
-
|
|
83
|
-
<script setup lang="ts">
|
|
84
|
-
import { computed, toRefs, type PropType } from "vue";
|
|
85
|
-
import {
|
|
86
|
-
ExclamationTriangleIcon,
|
|
87
|
-
CheckCircleIcon,
|
|
88
|
-
XCircleIcon,
|
|
89
|
-
XMarkIcon,
|
|
90
|
-
} from "@heroicons/vue/24/solid";
|
|
91
|
-
|
|
92
|
-
const props = defineProps({
|
|
93
|
-
showAlert: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: true,
|
|
96
|
-
},
|
|
97
|
-
heading: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: "",
|
|
100
|
-
},
|
|
101
|
-
textMessage: {
|
|
102
|
-
type: String,
|
|
103
|
-
default: "",
|
|
104
|
-
},
|
|
105
|
-
alertType: {
|
|
106
|
-
type: String as PropType<"Default" | "Warning" | "Success" | "Error">,
|
|
107
|
-
default: "Default",
|
|
108
|
-
},
|
|
109
|
-
alertIcon: {
|
|
110
|
-
type: [String, Object, Function],
|
|
111
|
-
default: "",
|
|
112
|
-
},
|
|
113
|
-
actionItems: Boolean,
|
|
114
|
-
closeIcon: Boolean,
|
|
115
|
-
});
|
|
116
|
-
const { showAlert } = toRefs(props);
|
|
117
|
-
const emits = defineEmits(["update:showAlert", "alertAction", "alertDismiss"]);
|
|
118
|
-
const onAction = () => {
|
|
119
|
-
emits("alertAction", true);
|
|
120
|
-
emits("update:showAlert", false);
|
|
121
|
-
};
|
|
122
|
-
const onClose = () => {
|
|
123
|
-
emits("alertDismiss", false);
|
|
124
|
-
emits("update:showAlert", false);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
const alertsClass = computed(() => {
|
|
128
|
-
const iconClasses = {
|
|
129
|
-
Default: {
|
|
130
|
-
bgColor: "bg-blue-50",
|
|
131
|
-
leftIcon: {
|
|
132
|
-
icon: CheckCircleIcon,
|
|
133
|
-
color: "text-blue-400",
|
|
134
|
-
},
|
|
135
|
-
titleColor: "text-blue-800",
|
|
136
|
-
textColor: "text-blue-700",
|
|
137
|
-
btnPrimary:
|
|
138
|
-
"bg-blue-700 hover:bg-blue-800 focus:ring-blue-600 focus:ring-offset-blue-50",
|
|
139
|
-
btnTertiary:
|
|
140
|
-
"text-blue-500 bg-blue-50 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",
|
|
141
|
-
btnClose:
|
|
142
|
-
"bg-blue-50 text-blue-500 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",
|
|
143
|
-
},
|
|
144
|
-
Warning: {
|
|
145
|
-
bgColor: "bg-yellow-50",
|
|
146
|
-
leftIcon: {
|
|
147
|
-
icon: ExclamationTriangleIcon,
|
|
148
|
-
color: "text-yellow-400",
|
|
149
|
-
},
|
|
150
|
-
titleColor: "text-yellow-800",
|
|
151
|
-
textColor: "text-yellow-700",
|
|
152
|
-
btnPrimary:
|
|
153
|
-
"bg-yellow-700 hover:bg-yellow-800 focus:ring-yellow-600 focus:ring-offset-yellow-50",
|
|
154
|
-
btnTertiary:
|
|
155
|
-
"text-yellow-500 bg-yellow-50 hover:bg-yellow-100 focus:ring-yellow-600 focus:ring-offset-yellow-50",
|
|
156
|
-
btnClose:
|
|
157
|
-
"bg-yellow-50 text-yellow-500 hover:bg-yellow-100 focus:ring-yellow-600 focus:ring-offset-yellow-50",
|
|
158
|
-
},
|
|
159
|
-
Success: {
|
|
160
|
-
bgColor: "bg-green-50",
|
|
161
|
-
leftIcon: {
|
|
162
|
-
icon: CheckCircleIcon,
|
|
163
|
-
color: "text-green-400",
|
|
164
|
-
},
|
|
165
|
-
titleColor: "text-green-800",
|
|
166
|
-
textColor: "text-green-700",
|
|
167
|
-
btnPrimary:
|
|
168
|
-
"bg-green-700 hover:bg-green-800 focus:ring-green-600 focus:ring-offset-green-50",
|
|
169
|
-
btnTertiary:
|
|
170
|
-
"text-green-500 bg-green-50 hover:bg-green-100 focus:ring-green-600 focus:ring-offset-green-50",
|
|
171
|
-
btnClose:
|
|
172
|
-
"bg-green-50 text-green-500 hover:bg-green-100 focus:ring-green-600 focus:ring-offset-green-50",
|
|
173
|
-
},
|
|
174
|
-
Error: {
|
|
175
|
-
bgColor: "bg-red-50",
|
|
176
|
-
leftIcon: {
|
|
177
|
-
icon: XCircleIcon,
|
|
178
|
-
color: "text-red-400",
|
|
179
|
-
},
|
|
180
|
-
titleColor: "text-red-800",
|
|
181
|
-
textColor: "text-red-700",
|
|
182
|
-
btnPrimary:
|
|
183
|
-
"bg-red-700 hover:bg-red-800 focus:ring-red-600 focus:ring-offset-red-50",
|
|
184
|
-
btnTertiary:
|
|
185
|
-
"text-red-500 bg-red-50 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",
|
|
186
|
-
btnClose:
|
|
187
|
-
"bg-red-50 text-red-500 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",
|
|
188
|
-
},
|
|
189
|
-
};
|
|
190
|
-
return iconClasses[props.alertType] || "";
|
|
191
|
-
});
|
|
192
|
-
</script>
|
|
193
|
-
|
|
194
|
-
<style scoped></style>
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="group">
|
|
3
|
-
<div class="flex items-center">
|
|
4
|
-
<div :class="['relative inline-block flex-none', avatarSize]">
|
|
5
|
-
<img
|
|
6
|
-
v-if="imageUrl"
|
|
7
|
-
:class="['group-hover:ring-2 ring-offset-2 ring-gray-300', rounded ? 'rounded-full' : 'rounded-md', avatarSize]"
|
|
8
|
-
:src="imageUrl"
|
|
9
|
-
alt=""
|
|
10
|
-
/>
|
|
11
|
-
<span
|
|
12
|
-
v-else
|
|
13
|
-
:class="['flex items-center justify-center mx-auto text-white capitalize', rounded ? 'rounded-full':'rounded-md', avatarSize]"
|
|
14
|
-
:style="{background:profileColor}">
|
|
15
|
-
{{ fullName && fullName.charAt(0) }}
|
|
16
|
-
</span>
|
|
17
|
-
<span
|
|
18
|
-
v-if="showStatus"
|
|
19
|
-
:class="['absolute bottom-0 right-0 block rounded-full ring-2 ring-white',checkStatus === 'Online'?'bg-green-500':'bg-gray-400',
|
|
20
|
-
size === 'xs' ? 'size-1.5' : size === 'sm' ? 'size-2' : 'size-3']"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
<div v-if="profile" class="flex-1 ms-2">
|
|
24
|
-
<div class="text-base font-semibold text-gray-600 capitalize group-hover:text-gray-900">
|
|
25
|
-
<slot name="name" :profileData="profileData">{{ profileData?.name }}</slot>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="text-sm font-medium text-gray-500 group-hover:text-gray-700">
|
|
28
|
-
<slot name="designation" :profileData="profileData">{{ profileData?.designation }}</slot>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script setup lang="ts">
|
|
36
|
-
import { computed, PropType, reactive } from "vue";
|
|
37
|
-
|
|
38
|
-
interface ProfileData {
|
|
39
|
-
name: string;
|
|
40
|
-
designation: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const props = defineProps({
|
|
45
|
-
imageUrl: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: "",
|
|
48
|
-
required: true
|
|
49
|
-
},
|
|
50
|
-
fullName: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: "",
|
|
53
|
-
required: false,
|
|
54
|
-
},
|
|
55
|
-
profile: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
required: false,
|
|
58
|
-
},
|
|
59
|
-
size: {
|
|
60
|
-
type: String as PropType<"xs" | "sm" | "md" | "lg" | "xl">,
|
|
61
|
-
default: "md",
|
|
62
|
-
},
|
|
63
|
-
rounded: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: true,
|
|
66
|
-
},
|
|
67
|
-
showStatus: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: false,
|
|
70
|
-
},
|
|
71
|
-
status: {
|
|
72
|
-
type: String as PropType<"Online" | "Offline">,
|
|
73
|
-
default: "Online",
|
|
74
|
-
},
|
|
75
|
-
profileData: {
|
|
76
|
-
type: Object as PropType<ProfileData>,
|
|
77
|
-
default: () => ({ name: "", designation: "" }),
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
const sizes = reactive({
|
|
82
|
-
xs: "size-6", // 24
|
|
83
|
-
sm: "size-8", // 32
|
|
84
|
-
md: "size-10", // 40
|
|
85
|
-
lg: "size-12", // 48
|
|
86
|
-
xl: "size-16", // 48
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
const avatarSize = computed(() => sizes[props.size] || "")
|
|
90
|
-
const checkStatus = computed(() => props.status);
|
|
91
|
-
const profileColor = computed(() => colors[Math.floor(Math.random() * colors.length)])
|
|
92
|
-
|
|
93
|
-
const colors = ['#6366F1','#F97316','#65A30D','#E11D48','#4B5563','#059669','#1D4ED8','#7C3AED','#FB923C','#fe4ca9']
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<style scoped></style>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav aria-label="breadcrumb" class="my-2">
|
|
3
|
-
<ol
|
|
4
|
-
role="list"
|
|
5
|
-
class="flex items-center justify-start max-w-full space-x-1"
|
|
6
|
-
>
|
|
7
|
-
<li
|
|
8
|
-
v-for="(page, index) in pages"
|
|
9
|
-
:key="page.name"
|
|
10
|
-
class="flex flex-row items-center justify-start space-x-1"
|
|
11
|
-
>
|
|
12
|
-
<a
|
|
13
|
-
:href="page.href"
|
|
14
|
-
class="inline-flex items-center gap-2 text-sm font-medium font-inter"
|
|
15
|
-
:class="
|
|
16
|
-
pages.length - 1 !== index
|
|
17
|
-
? 'text-gray-600 hover:text-gray-700'
|
|
18
|
-
: 'text-gray-500'
|
|
19
|
-
"
|
|
20
|
-
:aria-current="page.current ? 'page' : undefined"
|
|
21
|
-
>
|
|
22
|
-
<component
|
|
23
|
-
v-if="page?.showIcon"
|
|
24
|
-
:is="page?.showIcon"
|
|
25
|
-
class="text-current size-4"
|
|
26
|
-
/>
|
|
27
|
-
{{ page.name }}</a
|
|
28
|
-
>
|
|
29
|
-
<ChevronDownStroke
|
|
30
|
-
v-if="pages.length - 1 !== index"
|
|
31
|
-
class="flex-shrink-0 w-5 h-5 text-gray-400 transform -rotate-90"
|
|
32
|
-
aria-hidden="true"
|
|
33
|
-
/>
|
|
34
|
-
</li>
|
|
35
|
-
</ol>
|
|
36
|
-
</nav>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script setup lang="ts">
|
|
40
|
-
import { toRefs, type PropType } from "vue";
|
|
41
|
-
import ChevronDownStroke from "../../assets/svg/ChevronDownStroke.vue";
|
|
42
|
-
|
|
43
|
-
interface BreadcrumbPage {
|
|
44
|
-
name: string;
|
|
45
|
-
href?: string;
|
|
46
|
-
current?: boolean;
|
|
47
|
-
showIcon?: {};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const props = defineProps({
|
|
51
|
-
pages: {
|
|
52
|
-
type: Array as PropType<BreadcrumbPage[]>,
|
|
53
|
-
default: [],
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
const { pages } = toRefs(props);
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<style scoped></style>
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
:type="type"
|
|
4
|
-
:size="size"
|
|
5
|
-
:color="color"
|
|
6
|
-
:iconType="iconType"
|
|
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-all duration-200 ease-in-out active:translate-y-0.5 focus-within:outline-purple-500', rounded ?'rounded-full':'rounded-lg', btnClass]"
|
|
9
|
-
:disabled="disabled"
|
|
10
|
-
:loading="loading"
|
|
11
|
-
:icon="icon"
|
|
12
|
-
@click="handleClick()"
|
|
13
|
-
>
|
|
14
|
-
<component
|
|
15
|
-
:is="icon"
|
|
16
|
-
v-if="iconType === 'icon' || iconType === 'startIcon'"
|
|
17
|
-
:class="[iconWidth]"
|
|
18
|
-
/>
|
|
19
|
-
<slot />
|
|
20
|
-
<component :is="icon" v-if="iconType === 'endIcon'" :class="[iconWidth]" />
|
|
21
|
-
<svg
|
|
22
|
-
v-if="loading"
|
|
23
|
-
class="animate-spin"
|
|
24
|
-
:class="[iconWidth]"
|
|
25
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
-
fill="none"
|
|
27
|
-
viewBox="0 0 24 24"
|
|
28
|
-
>
|
|
29
|
-
<circle
|
|
30
|
-
class="opacity-25"
|
|
31
|
-
cx="12"
|
|
32
|
-
cy="12"
|
|
33
|
-
r="10"
|
|
34
|
-
stroke="currentColor"
|
|
35
|
-
stroke-width="4"
|
|
36
|
-
/>
|
|
37
|
-
<path
|
|
38
|
-
class="opacity-75"
|
|
39
|
-
fill="currentColor"
|
|
40
|
-
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"
|
|
41
|
-
/>
|
|
42
|
-
</svg>
|
|
43
|
-
</button>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<script setup lang="ts">
|
|
47
|
-
import { reactive, computed, PropType } from "vue";
|
|
48
|
-
|
|
49
|
-
const emit = defineEmits(["click"]);
|
|
50
|
-
const handleClick = () => [emit("click")];
|
|
51
|
-
|
|
52
|
-
const props = defineProps({
|
|
53
|
-
type: {
|
|
54
|
-
type: String as PropType<"button" | "submit" | "reset">,
|
|
55
|
-
default: "button",
|
|
56
|
-
},
|
|
57
|
-
size: {
|
|
58
|
-
type: String as PropType<"xs" | "sm" | "md" | "lg">,
|
|
59
|
-
default: "md",
|
|
60
|
-
},
|
|
61
|
-
color: {
|
|
62
|
-
type: String as PropType<
|
|
63
|
-
"danger" | "success" | "black" | "white" | "purple" | 'primary' | 'secondary' | 'tertiary'>,
|
|
64
|
-
default: "purple",
|
|
65
|
-
},
|
|
66
|
-
iconType: {
|
|
67
|
-
type: String as PropType<"startIcon" | "endIcon" | "icon">,
|
|
68
|
-
default: "",
|
|
69
|
-
},
|
|
70
|
-
icon: {
|
|
71
|
-
type: [String, Object, Function],
|
|
72
|
-
default: "",
|
|
73
|
-
},
|
|
74
|
-
rounded:Boolean,
|
|
75
|
-
loading: Boolean,
|
|
76
|
-
disabled: Boolean,
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
const sizeClasses = reactive({
|
|
80
|
-
xs: "text-xs font-medium leading-[normal]", // 24
|
|
81
|
-
sm: "text-sm font-medium", // 32
|
|
82
|
-
md: "text-base font-semibold", // 40
|
|
83
|
-
lg: "text-base font-semibold", // 48
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const btnClass = computed(() => {
|
|
87
|
-
const btnDisabled = props.disabled;
|
|
88
|
-
const btnColor = {
|
|
89
|
-
black: btnDisabled
|
|
90
|
-
? "bg-opacity-60 cursor-not-allowed text-gray-200 bg-gray-800"
|
|
91
|
-
: "text-white bg-gray-900 hover:bg-gray-800 active:bg-black cursor-pointer active:shadow-black/50",
|
|
92
|
-
white: btnDisabled
|
|
93
|
-
? "bg-opacity-80 cursor-not-allowed text-gray-400 bg-gray-200"
|
|
94
|
-
: "bg-white hover:bg-gray-100 text-black cursor-pointer active:shadow-white/50 active:bg-transparent",
|
|
95
|
-
danger: btnDisabled
|
|
96
|
-
? "bg-opacity-60 cursor-not-allowed text-gray-200 bg-red-500"
|
|
97
|
-
: "bg-red-500 hover:bg-red-600 active:bg-red-500 text-white cursor-pointer active:shadow-red-500/50",
|
|
98
|
-
success: btnDisabled
|
|
99
|
-
? "bg-opacity-60 cursor-not-allowed text-gray-200 bg-green-600"
|
|
100
|
-
: "bg-green-600 hover:bg-green-700 active:bg-green-600 text-white cursor-pointer active:shadow-green-500/50",
|
|
101
|
-
purple: btnDisabled
|
|
102
|
-
? "bg-opacity-60 cursor-not-allowed text-gray-200 bg-purple-500"
|
|
103
|
-
: "bg-purple-700 hover:bg-purple-800 active:bg-purple-700 text-white cursor-pointer active:shadow-purple-500/50",
|
|
104
|
-
primary: btnDisabled
|
|
105
|
-
? "bg-opacity-60 cursor-not-allowed text-gray-200 bg-purple-500"
|
|
106
|
-
: "primary-btn text-white cursor-pointer active:shadow-purple-500/50",
|
|
107
|
-
secondary: btnDisabled
|
|
108
|
-
? "bg-opacity-75 cursor-not-allowed text-gray-400 bg-purple-50"
|
|
109
|
-
: "bg-purple-100 hover:bg-purple-50 active:bg-purple-100 cursor-pointer text-gray-700 active:shadow-purple-200",
|
|
110
|
-
tertiary: btnDisabled
|
|
111
|
-
? "bg-opacity-75 cursor-not-allowed text-gray-400 bg-gray-50 ring-1 ring-gray-100"
|
|
112
|
-
: "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",
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// background: linear-gradient(107.63deg, #321386 0%, #9C20D7 100%, #9C20D7 100%);
|
|
116
|
-
const iconClasses = {
|
|
117
|
-
lg: props.iconType === "icon" ? "p-3" : "px-6 py-3",
|
|
118
|
-
md: props.iconType === "icon" ? "p-2" : "px-4 py-2",
|
|
119
|
-
sm: props.iconType === "icon" ? "p-1.5" : "px-4 py-1.5",
|
|
120
|
-
xs: props.iconType === "icon" ? "p-1" : "px-3 py-1",
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
const colorClass = btnColor[props.color] || "";
|
|
124
|
-
const sizeClass = sizeClasses[props.size] || "";
|
|
125
|
-
const typeClass = iconClasses[props.size] || "";
|
|
126
|
-
const disabledClass =
|
|
127
|
-
props.disabled === true
|
|
128
|
-
? "active:!translate-y-0 active:!scale-100 active:!shadow-none"
|
|
129
|
-
: "";
|
|
130
|
-
return `${colorClass} ${sizeClass} ${typeClass} ${disabledClass}`;
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
const iconWidthClasses = reactive({
|
|
134
|
-
xs: "w-4 h-4 text-current",
|
|
135
|
-
sm: "w-5 h-5 text-current",
|
|
136
|
-
md: "w-6 h-6 text-current",
|
|
137
|
-
lg: "w-6 h-6 text-current",
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
const iconWidth = computed(() => {
|
|
141
|
-
const iconClass = iconWidthClasses[props.size] || "";
|
|
142
|
-
return iconClass;
|
|
143
|
-
});
|
|
144
|
-
</script>
|
|
145
|
-
|
|
146
|
-
<style lang="scss">
|
|
147
|
-
.primary-btn {
|
|
148
|
-
background: linear-gradient(107.63deg, #321386 0%, #9C20D7 100%, #9C20D7 100%);
|
|
149
|
-
@apply bg-[#321386] hover:opacity-90;
|
|
150
|
-
&:active {
|
|
151
|
-
background: linear-gradient(-135deg,#321386 0%, #9c20d7 100%, #9c20d7 100%);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
</style>
|