edvoyui-component-library-test-flight 0.0.21 → 0.0.23

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.
Files changed (125) hide show
  1. package/dist/EUIButton.vue.d.ts.map +1 -0
  2. package/dist/library-vue-ts.cjs.js +4 -3
  3. package/dist/library-vue-ts.es.js +3 -8
  4. package/dist/library-vue-ts.umd.js +4 -3
  5. package/dist/select/EUISelect.vue.d.ts.map +1 -0
  6. package/package.json +4 -2
  7. package/src/App.vue +16 -0
  8. package/src/assets/fonts/gilroy/GilroyBold/font.woff +0 -0
  9. package/src/assets/fonts/gilroy/GilroyBold/font.woff2 +0 -0
  10. package/src/assets/fonts/gilroy/GilroyBoldItalic/font.woff +0 -0
  11. package/src/assets/fonts/gilroy/GilroyBoldItalic/font.woff2 +0 -0
  12. package/src/assets/fonts/gilroy/GilroyExtraBold/font.woff +0 -0
  13. package/src/assets/fonts/gilroy/GilroyExtraBold/font.woff2 +0 -0
  14. package/src/assets/fonts/gilroy/GilroyExtraBoldItalic/font.woff +0 -0
  15. package/src/assets/fonts/gilroy/GilroyExtraBoldItalic/font.woff2 +0 -0
  16. package/src/assets/fonts/gilroy/GilroyMedium/font.woff +0 -0
  17. package/src/assets/fonts/gilroy/GilroyMedium/font.woff2 +0 -0
  18. package/src/assets/fonts/gilroy/GilroyRegular/font.woff +0 -0
  19. package/src/assets/fonts/gilroy/GilroyRegular/font.woff2 +0 -0
  20. package/src/assets/fonts/gilroy/GilroySemiBold/font.woff +0 -0
  21. package/src/assets/fonts/gilroy/GilroySemiBold/font.woff2 +0 -0
  22. package/src/assets/fonts/inter/Inter-Bold.woff +0 -0
  23. package/src/assets/fonts/inter/Inter-Bold.woff2 +0 -0
  24. package/src/assets/fonts/inter/Inter-Italic.woff +0 -0
  25. package/src/assets/fonts/inter/Inter-Italic.woff2 +0 -0
  26. package/src/assets/fonts/inter/Inter-Medium.woff +0 -0
  27. package/src/assets/fonts/inter/Inter-Medium.woff2 +0 -0
  28. package/src/assets/fonts/inter/Inter-MediumItalic.woff +0 -0
  29. package/src/assets/fonts/inter/Inter-MediumItalic.woff2 +0 -0
  30. package/src/assets/fonts/inter/Inter-Regular.woff +0 -0
  31. package/src/assets/fonts/inter/Inter-Regular.woff2 +0 -0
  32. package/src/assets/fonts/inter/Inter-SemiBold.woff +0 -0
  33. package/src/assets/fonts/inter/Inter-SemiBold.woff2 +0 -0
  34. package/src/assets/fonts/inter/Inter-SemiBoldItalic.woff +0 -0
  35. package/src/assets/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
  36. package/src/assets/scss/body.scss +15 -0
  37. package/src/assets/svg/ChevronDownSolid.vue +19 -0
  38. package/src/assets/svg/ChevronDownStroke.vue +22 -0
  39. package/src/assets/svg/SortArrow.vue +24 -0
  40. package/src/assets/svg/Student.vue +30 -0
  41. package/src/assets/svg/partner.vue +33 -0
  42. package/src/assets/svg/people.vue +25 -0
  43. package/src/assets/vue.svg +1 -0
  44. package/src/components/HelloWorld.vue +999 -0
  45. package/src/components/accordion/EUIAccordion.stories.ts +157 -0
  46. package/src/components/accordion/EUIAccordion.vue +90 -0
  47. package/src/components/avatar/EUIAvatar.stories.ts +157 -0
  48. package/src/components/avatar/EUIAvatar.vue +96 -0
  49. package/src/components/button/EUIButton.stories.ts +252 -0
  50. package/src/components/button/EUIButton.vue +151 -0
  51. package/src/components/checkbox/EUICheckbox.stories.ts +58 -0
  52. package/src/components/checkbox/EUICheckbox.vue +103 -0
  53. package/src/components/datepicker/EUIDatepicker.stories.ts +236 -0
  54. package/src/components/datepicker/EUIDatepicker.vue +185 -0
  55. package/src/components/delete.vue +108 -0
  56. package/src/components/dropdown/EUIMultiDropdown.stories.ts +187 -0
  57. package/src/components/dropdown/EUIMultiDropdown.vue +129 -0
  58. package/src/components/errorMessage/EUIErrorMessage.scss +0 -0
  59. package/src/components/errorMessage/EUIErrorMessage.stories.ts +41 -0
  60. package/src/components/errorMessage/EUIErrorMessage.vue +25 -0
  61. package/src/components/index.ts +46 -0
  62. package/src/components/input/EUIInput.stories.ts +174 -0
  63. package/src/components/input/EUIInput.vue +169 -0
  64. package/src/components/inputNormal/EUIInputNormal.stories.ts +164 -0
  65. package/src/components/inputNormal/EUIInputNormal.vue +161 -0
  66. package/src/components/loader/EUICircleLoader.vue +31 -0
  67. package/src/components/loader/EUICubeLoader.vue +237 -0
  68. package/src/components/loader/EUILoader.stories.ts +99 -0
  69. package/src/components/loader/EUILoader.vue +17 -0
  70. package/src/components/loader/EUISquareLoader.vue +47 -0
  71. package/src/components/modal/EUIModal.stories.ts +372 -0
  72. package/src/components/modal/EUIModal.vue +163 -0
  73. package/src/components/pillSelect/EUIPillSelect.stories.ts +74 -0
  74. package/src/components/pillSelect/EUIPillSelect.vue +149 -0
  75. package/src/components/popover/EUIPopover.stories.ts +247 -0
  76. package/src/components/popover/EUIPopover.vue +159 -0
  77. package/src/components/radio/EUIRadio.stories.ts +54 -0
  78. package/src/components/radio/EUIRadio.vue +78 -0
  79. package/src/components/searchInput/EUISearch.stories.ts +24 -0
  80. package/src/components/searchInput/EUISearch.vue +215 -0
  81. package/src/components/select/EUISelect.scss +0 -0
  82. package/src/components/select/EUISelect.stories.ts +49 -0
  83. package/src/components/select/EUISelect.vue +682 -0
  84. package/src/components/selectSearch/EUISelectSearch.vue +23 -0
  85. package/src/components/slideover/EUISlideover.stories.ts +318 -0
  86. package/src/components/slideover/EUISlideover.vue +207 -0
  87. package/src/components/stepperTimeline/EUIStepperHorizontal.vue +112 -0
  88. package/src/components/stepperTimeline/EUIStepperTimeline.stories.ts +54 -0
  89. package/src/components/stepperTimeline/EUIStepperTimeline.vue +16 -0
  90. package/src/components/stepperTimeline/EUIStepperVertical.vue +112 -0
  91. package/src/components/table/EUIDashboardTable.vue +482 -0
  92. package/src/components/table/EUIPageLimit.vue +66 -0
  93. package/src/components/table/EUIPagination.vue +175 -0
  94. package/src/components/table/EUIStudentPagination.vue +172 -0
  95. package/src/components/table/EUITable.stories.ts +190 -0
  96. package/src/components/table/EUITable.vue +508 -0
  97. package/src/components/table/EUITableCheckbox.vue +97 -0
  98. package/src/components/tabs/EUITabs.vue +128 -0
  99. package/src/components/tabs/EUItabs.stories.ts +123 -0
  100. package/src/components/tag/EUITag.stories.ts +46 -0
  101. package/src/components/tag/EUITag.vue +46 -0
  102. package/src/components/telephone/EUITelephone.stories.ts +202 -0
  103. package/src/components/telephone/EUITelephone.vue +280 -0
  104. package/src/components/textArea/EUITextArea.stories.ts +82 -0
  105. package/src/components/textArea/EUITextArea.vue +122 -0
  106. package/src/components/timeLine/EUITimeLine.stories.ts +247 -0
  107. package/src/components/timeLine/EUITimeLine.vue +43 -0
  108. package/src/components/timeLine/EUITimeLineItem.vue +124 -0
  109. package/src/components/toggle/EUIToggle.stories.ts +63 -0
  110. package/src/components/toggle/EUIToggle.vue +99 -0
  111. package/src/components/tooltip/EUITooltip.stories.ts +53 -0
  112. package/src/components/tooltip/EUITooltip.vue +108 -0
  113. package/src/data/books.ts +163 -0
  114. package/src/data/tab.ts +33 -0
  115. package/src/data/table.ts +5392 -0
  116. package/src/main.ts +5 -0
  117. package/src/utils/lodash.ts +9 -0
  118. package/src/utils/types.ts +9 -0
  119. package/src/vite-env.d.ts +5 -0
  120. package/dist/EUISelect.vue.d.ts.map +0 -1
  121. package/dist/button/EUIButton.vue.d.ts.map +0 -1
  122. package/dist/library-vue-ts.css +0 -1
  123. package/dist/style.scss +0 -118
  124. /package/dist/{button/EUIButton.vue.d.ts → EUIButton.vue.d.ts} +0 -0
  125. /package/dist/{EUISelect.vue.d.ts → select/EUISelect.vue.d.ts} +0 -0
@@ -0,0 +1,157 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import EUIAccordion from "./EUIAccordion.vue";
3
+
4
+ const meta: Meta<typeof EUIAccordion> = {
5
+ title: "Example/Accordion",
6
+ component: EUIAccordion,
7
+ tags: ["autodocs"],
8
+ argTypes: {
9
+ datas: {
10
+ control: "object",
11
+ description:
12
+ "* The template method allows you to define how content is rendered in the <mark>EUIAccordion</mark> component. \n\n* Named slots <mark>(#title, #content)</mark> enable you to customize the display of titles and content for each accordion item.",
13
+ },
14
+ defaultOpen: {
15
+ control: { type: "object" },
16
+ description: "Accordion default one open [1]",
17
+ },
18
+ collapse: {
19
+ control: "boolean",
20
+ description:
21
+ "Accordion panel default one opened. Next one click close previous another one open",
22
+ },
23
+ },
24
+ } satisfies Meta<typeof EUIAccordion>;
25
+
26
+ export default meta;
27
+ type Story = StoryObj<typeof meta>;
28
+
29
+ export const Default: Story = {
30
+ args: {
31
+ datas: [
32
+ {
33
+ title: "1.How long does the course take?",
34
+ content:
35
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
36
+ },
37
+ {
38
+ title: "2.How long does the course take?",
39
+ content:
40
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
41
+ },
42
+ {
43
+ title: "3.How long does the course take?",
44
+ content:
45
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
46
+ },
47
+ {
48
+ title: "4.How long does the course take?",
49
+ content:
50
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
51
+ },
52
+ ],
53
+ defaultOpen: [1],
54
+ },
55
+ render: (args) => ({
56
+ components: { EUIAccordion },
57
+ setup() {
58
+ return { args };
59
+ },
60
+ template: `<EUIAccordion v-bind="args" />`,
61
+ }),
62
+ };
63
+
64
+ export const AccordionCollopse: Story = {
65
+ args: {
66
+ datas: [
67
+ {
68
+ title: "1.How long does the course take?",
69
+ content:
70
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
71
+ },
72
+ {
73
+ title: "2.How long does the course take?",
74
+ content:
75
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
76
+ },
77
+ {
78
+ title: "3.How long does the course take?",
79
+ content:
80
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
81
+ },
82
+ {
83
+ title: "4.How long does the course take?",
84
+ content:
85
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
86
+ },
87
+ ],
88
+ defaultOpen: [1],
89
+ collapse: true,
90
+ },
91
+ render: (args) => ({
92
+ components: { EUIAccordion },
93
+ setup() {
94
+ return { args };
95
+ },
96
+ template: `<EUIAccordion v-bind="args" />`,
97
+ }),
98
+ };
99
+
100
+ export const UseTemplate: Story = {
101
+ args: {
102
+ datas: [
103
+ {
104
+ name: "How long does the course take?",
105
+ description:
106
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
107
+ },
108
+ ],
109
+ defaultOpen: [0],
110
+ collapse: false,
111
+ },
112
+ render: (args) => ({
113
+ components: { EUIAccordion },
114
+ setup() {
115
+ return { args };
116
+ },
117
+ template: `<EUIAccordion v-bind="args">
118
+ <template #title="{ item }">
119
+ <h3>{{ item.name }}</h3>
120
+ </template>
121
+ <template #content="{ item }">
122
+ <p>{{ item.description }}</p>
123
+ </template>
124
+ </EUIAccordion>`,
125
+ }),
126
+ parameters: {
127
+ docs: {
128
+ description: {
129
+ story:
130
+ "* The template method allows you to define how content is rendered in the <mark>EUIAccordion</mark> component. \n\n* Named slots <mark>(#title, #content)</mark> enable you to customize the display of titles and content for each accordion item.",
131
+ },
132
+ source: {
133
+ code: `<script setup lang="ts">
134
+ const datas = [
135
+ {
136
+ name: "How long does the course take?",
137
+ description:
138
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
139
+ },
140
+ ];
141
+ const defaultOpen = [0]
142
+ </script>
143
+
144
+ <template>
145
+ <EUIAccordion :datas="datas" :defaultOpen="defaultOpen">
146
+ <template #title="{ item }">
147
+ <h3>{{ item.name }}</h3>
148
+ </template>
149
+ <template #content="{ item }">
150
+ <p>{{ item.description }}</p>
151
+ </template>
152
+ </EUIAccordion>
153
+ </template>`,
154
+ },
155
+ },
156
+ },
157
+ };
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <div>
3
+ <div class="max-w-full p-2 bg-gray-50 rounded-xl">
4
+ <details
5
+ v-for="(item, index) in datas"
6
+ :key="`accordion-${index}`"
7
+ :open="openAccordions[index]"
8
+ @click.prevent="onClick(index)"
9
+ class="box-border relative mx-auto my-0 text-base font-normal transition-all duration-150 ease-in-out rounded-lg group hover:bg-gray-100 open:bg-gray-100 open:mb-4 open:last:mb-0"
10
+ >
11
+ <summary class="flex items-center p-4 font-semibold list-none cursor-pointer select-none focus:outline-none">
12
+ <span
13
+ class="w-11/12 text-gray-700 transition-all duration-200 ease-in-out faq-title group-hover:text-gray-900 group-open:text-gray-900">
14
+ <slot name="title" :item="item">
15
+ {{ item.title }}
16
+ </slot>
17
+ </span>
18
+ <svg
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ 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"
21
+ width="24"
22
+ height="24"
23
+ viewBox="0 0 24 24"
24
+ stroke-width="2"
25
+ stroke="currentColor"
26
+ fill="none"
27
+ stroke-linecap="round"
28
+ stroke-linejoin="round"
29
+ >
30
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
31
+ <path d="M9 6l6 6l-6 6"></path>
32
+ </svg>
33
+ </summary>
34
+ <div class="p-4 pt-1 font-light text-gray-600">
35
+ <slot name="content" :item="item">
36
+ {{ item.content }}
37
+ </slot>
38
+ </div>
39
+ </details>
40
+ </div>
41
+ </div>
42
+ </template>
43
+
44
+ <script setup lang="ts">
45
+ import { onMounted, PropType, ref } from 'vue';
46
+
47
+ const props = defineProps({
48
+ datas: {
49
+ type: Array as PropType<any[]>,
50
+ required: true,
51
+ default: () => []
52
+ },
53
+ defaultOpen: {
54
+ type: Array as PropType<number[]>,
55
+ default: () => [0],
56
+ },
57
+ collapse: {
58
+ type: Boolean,
59
+ default: false
60
+ }
61
+ });
62
+
63
+ const openAccordions = ref<boolean[]>(Array(props.datas.length).fill(false));
64
+
65
+ onMounted(() => {
66
+ props.defaultOpen.forEach((index: number) => {
67
+ if (index >= 0 && index < openAccordions.value.length) {
68
+ openAccordions.value[index] = true; // Open specified accordions
69
+ }
70
+ });
71
+ });
72
+
73
+ const onClick = (index: number) => {
74
+ // openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
75
+
76
+ if (props.collapse) {
77
+ openAccordions.value = openAccordions.value.map((_, i) => i === index);
78
+ } else {
79
+ openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
80
+ }
81
+ };
82
+ </script>
83
+
84
+ <style lang="scss" scoped>
85
+ summary {
86
+ &::-webkit-details-marker {
87
+ display: none;
88
+ }
89
+ }
90
+ </style>
@@ -0,0 +1,157 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import EUIAvatar from "./EUIAvatar.vue"; // Adjust the path if necessary
3
+
4
+ const meta = {
5
+ title: "Example/Avatar",
6
+ component: EUIAvatar,
7
+ tags: ["autodocs"],
8
+ argTypes: {
9
+ imageUrl: {
10
+ type: "string",
11
+ description: "Show image URLs",
12
+ },
13
+ fullName: {
14
+ type: "string",
15
+ description: "No image URL show Name FirstLetter",
16
+ },
17
+ size: {
18
+ control: { type: "select", options: ["xs", "sm", "md", "lg", "xl"] },
19
+ description: "Size of the button.",
20
+ },
21
+ showStatus: {
22
+ control: { type: "boolean" },
23
+ description: "Show online/Offline status",
24
+ },
25
+ status: {
26
+ control: { type: "select", options: ["Online", "Offline"] },
27
+ description: "Profile Status",
28
+ },
29
+ profile: {
30
+ control: { type: "boolean" },
31
+ description:
32
+ "Show Profile enable \n\n Name and Designation use \n\n `<template #name></template><template #designation></template>`",
33
+ },
34
+ profileData: {
35
+ control: { type: "object" },
36
+ description: "Profile data send name and Designation or use template",
37
+ },
38
+ },
39
+ } satisfies Meta<typeof EUIAvatar>;
40
+
41
+ export default meta;
42
+ type Story = StoryObj<typeof meta>;
43
+
44
+ // Default button story with default slot content
45
+ export const Default: Story = {
46
+ argTypes: {
47
+ size: {
48
+ control: "select",
49
+ options: ["xs", "sm", "md", "lg", "xl"],
50
+ },
51
+ imageUrl: {
52
+ type: "string",
53
+ },
54
+ status: {
55
+ control: "select",
56
+ options: ["Online", "Offline"],
57
+ },
58
+ },
59
+ args: {
60
+ imageUrl: "https://tinyurl.com/43e5fxh9",
61
+ size: "md",
62
+ showStatus: true,
63
+ status: "Online",
64
+ },
65
+ render: (args) => ({
66
+ components: { EUIAvatar },
67
+ setup() {
68
+ return { args };
69
+ },
70
+ template: `<EUIAvatar v-bind="args"></EUIAvatar>`,
71
+ }),
72
+ };
73
+
74
+ export const FirstLetter: Story = {
75
+ argTypes: {
76
+ size: {
77
+ control: "select",
78
+ options: ["xs", "sm", "md", "lg", "xl"],
79
+ },
80
+ fullName: {
81
+ type: "string",
82
+ },
83
+ status: {
84
+ control: "select",
85
+ options: ["Online", "Offline"],
86
+ },
87
+ },
88
+ args: {
89
+ fullName: "JohnCena",
90
+ size: "md",
91
+ showStatus: true,
92
+ status: "Offline",
93
+ },
94
+ render: (args) => ({
95
+ components: { EUIAvatar },
96
+ setup() {
97
+ return { args };
98
+ },
99
+ template: `<EUIAvatar v-bind="args"></EUIAvatar>`,
100
+ }),
101
+ };
102
+
103
+ export const Profile: Story = {
104
+ argTypes: {
105
+ size: {
106
+ control: "select",
107
+ options: ["xs", "sm", "md", "lg", "xl"],
108
+ },
109
+ imageUrl: { type: "string" },
110
+ status: {
111
+ control: "select",
112
+ options: ["Online", "Offline"],
113
+ },
114
+ profile: { type: "boolean" },
115
+ name: { type: "string" },
116
+ designation: { type: "string" },
117
+ },
118
+ args: {
119
+ imageUrl: "https://tinyurl.com/43e5fxh9",
120
+ size: "sm",
121
+ showStatus: true,
122
+ status: "Online",
123
+ profile: true,
124
+ name: "John Cena",
125
+ designation: "Actor",
126
+ },
127
+ render: (args) => ({
128
+ components: { EUIAvatar },
129
+ setup() {
130
+ return { args };
131
+ },
132
+ template: `<EUIAvatar v-bind="args">
133
+ <template #name>{{args.name}}</template>
134
+ <template #designation>{{ args.designation }}</template>
135
+ </EUIAvatar>`,
136
+ }),
137
+ };
138
+
139
+ export const ProfileData: Story = {
140
+ argTypes: {},
141
+ args: {
142
+ imageUrl: "https://tinyurl.com/43e5fxh9",
143
+ size: "xl",
144
+ profile: true,
145
+ profileData: {
146
+ name: "John Cena",
147
+ designation: "Actor",
148
+ },
149
+ },
150
+ render: (args) => ({
151
+ components: { EUIAvatar },
152
+ setup() {
153
+ return { args };
154
+ },
155
+ template: `<EUIAvatar v-bind="args"></EUIAvatar>`,
156
+ }),
157
+ };
@@ -0,0 +1,96 @@
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>