edvoyui-component-library-test-flight 0.0.127 → 0.0.129
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/dist/EUITextArea.vue.d.ts +4 -0
- package/dist/EUITextArea.vue.d.ts.map +1 -0
- package/dist/accordion/EUIAccordion.vue.d.ts +2 -2
- package/dist/accordion/EUIAccordion.vue.d.ts.map +1 -1
- package/dist/alerts/EUIAlerts.vue.d.ts +2 -2
- package/dist/alerts/EUIAlerts.vue.d.ts.map +1 -1
- package/dist/avatar/EUIAvatar.vue.d.ts +2 -2
- package/dist/avatar/EUIAvatar.vue.d.ts.map +1 -1
- package/dist/breadcrumb/EUIBreadcrumb.vue.d.ts +2 -2
- package/dist/breadcrumb/EUIBreadcrumb.vue.d.ts.map +1 -1
- package/dist/button/EUIButton.vue.d.ts +5 -0
- package/dist/button/EUIButton.vue.d.ts.map +1 -0
- package/dist/button/EUIButtonGroup.vue.d.ts +5 -0
- package/dist/button/EUIButtonGroup.vue.d.ts.map +1 -0
- package/dist/checkbox/EUICheckbox.vue.d.ts +3 -3
- package/dist/checkbox/EUICheckbox.vue.d.ts.map +1 -1
- package/dist/datepicker/EUIDatepicker.vue.d.ts +3 -3
- package/dist/datepicker/EUIDatepicker.vue.d.ts.map +1 -1
- package/dist/dropdown/EUIMultiDropdown.vue.d.ts +2 -2
- package/dist/dropdown/EUIMultiDropdown.vue.d.ts.map +1 -1
- package/dist/errorMessage/EUIErrorMessage.vue.d.ts +2 -2
- package/dist/errorMessage/EUIErrorMessage.vue.d.ts.map +1 -1
- package/dist/input/EUIInput.vue.d.ts +2 -2
- package/dist/input/EUIInput.vue.d.ts.map +1 -1
- package/dist/library-vue-ts.cjs.js +46 -46
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +6792 -6618
- package/dist/library-vue-ts.umd.js +46 -46
- package/dist/loader/EUICircleLoader.vue.d.ts +1 -1
- package/dist/loader/EUICircleLoader.vue.d.ts.map +1 -1
- package/dist/loader/EUICubeLoader.vue.d.ts +1 -1
- package/dist/loader/EUICubeLoader.vue.d.ts.map +1 -1
- package/dist/loader/EUILoader.vue.d.ts +2 -2
- package/dist/loader/EUILoader.vue.d.ts.map +1 -1
- package/dist/loader/EUISquareLoader.vue.d.ts +1 -1
- package/dist/loader/EUISquareLoader.vue.d.ts.map +1 -1
- package/dist/modal/EUIModal.vue.d.ts +2 -2
- package/dist/modal/EUIModal.vue.d.ts.map +1 -1
- package/dist/pillSelect/EUIPillSelect.vue.d.ts +2 -2
- package/dist/pillSelect/EUIPillSelect.vue.d.ts.map +1 -1
- package/dist/popover/EUIPopover.vue.d.ts +2 -2
- package/dist/popover/EUIPopover.vue.d.ts.map +1 -1
- package/dist/radio/EUIRadio.vue.d.ts +2 -2
- package/dist/radio/EUIRadio.vue.d.ts.map +1 -1
- package/dist/searchInput/EUISearch.vue.d.ts +2 -2
- package/dist/searchInput/EUISearch.vue.d.ts.map +1 -1
- package/dist/searchexpand/EUISearchExpand.vue.d.ts +2 -2
- package/dist/searchexpand/EUISearchExpand.vue.d.ts.map +1 -1
- package/dist/searchexpand/EUISearchToggle.vue.d.ts +2 -2
- package/dist/searchexpand/EUISearchToggle.vue.d.ts.map +1 -1
- package/dist/select/EUISelect.vue.d.ts +3 -3
- package/dist/select/EUISelect.vue.d.ts.map +1 -1
- package/dist/selectSearch/EUISelectSearch.vue.d.ts +2 -2
- package/dist/selectSearch/EUISelectSearch.vue.d.ts.map +1 -1
- package/dist/slideover/EUISlideover.vue.d.ts +2 -2
- package/dist/slideover/EUISlideover.vue.d.ts.map +1 -1
- package/dist/stepperTimeline/EUIStepperHorizontal.vue.d.ts +2 -2
- package/dist/stepperTimeline/EUIStepperHorizontal.vue.d.ts.map +1 -1
- package/dist/stepperTimeline/EUIStepperTimeline.vue.d.ts +2 -2
- package/dist/stepperTimeline/EUIStepperTimeline.vue.d.ts.map +1 -1
- package/dist/stepperTimeline/EUIStepperVertical.vue.d.ts +2 -2
- package/dist/stepperTimeline/EUIStepperVertical.vue.d.ts.map +1 -1
- package/dist/table/EUIDashboardTable.vue.d.ts +2 -2
- package/dist/table/EUIDashboardTable.vue.d.ts.map +1 -1
- package/dist/table/EUIPageLimit.vue.d.ts +2 -2
- package/dist/table/EUIPageLimit.vue.d.ts.map +1 -1
- package/dist/table/EUIPagination.vue.d.ts +2 -2
- package/dist/table/EUIPagination.vue.d.ts.map +1 -1
- package/dist/table/EUIStudentPagination.vue.d.ts +2 -2
- package/dist/table/EUIStudentPagination.vue.d.ts.map +1 -1
- package/dist/table/EUITable.vue.d.ts +2 -2
- package/dist/table/EUITable.vue.d.ts.map +1 -1
- package/dist/table/EUITableCheckbox.vue.d.ts +3 -3
- package/dist/table/EUITableCheckbox.vue.d.ts.map +1 -1
- package/dist/table/GrowthTable.vue.d.ts +2 -2
- package/dist/table/GrowthTable.vue.d.ts.map +1 -1
- package/dist/table/UCheckbox.vue.d.ts +2 -2
- package/dist/table/UCheckbox.vue.d.ts.map +1 -1
- package/dist/table/UTable.vue.d.ts +2 -2
- package/dist/table/UTable.vue.d.ts.map +1 -1
- package/dist/tabs/EUITabs.vue.d.ts +2 -2
- package/dist/tabs/EUITabs.vue.d.ts.map +1 -1
- package/dist/tag/EUITag.vue.d.ts +2 -2
- package/dist/tag/EUITag.vue.d.ts.map +1 -1
- package/dist/telephone/EUITelephone.vue.d.ts +3 -3
- package/dist/telephone/EUITelephone.vue.d.ts.map +1 -1
- package/dist/timeLine/EUITimeLine.vue.d.ts +2 -2
- package/dist/timeLine/EUITimeLine.vue.d.ts.map +1 -1
- package/dist/timeLine/EUITimeLineItem.vue.d.ts +2 -2
- package/dist/timeLine/EUITimeLineItem.vue.d.ts.map +1 -1
- package/dist/toggle/EUIToggle.vue.d.ts +2 -2
- package/dist/toggle/EUIToggle.vue.d.ts.map +1 -1
- package/dist/tooltip/EUITooltip.vue.d.ts +2 -2
- package/dist/tooltip/EUITooltip.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/HelloWorld.vue +64 -28
- package/src/components/button/EUIButton.vue +1 -1
- package/src/components/button/EUIButtonGroup.vue +261 -0
- package/src/components/button/buttonAnimateTab.vue +74 -0
- package/src/components/index.ts +2 -0
- package/src/components/searchexpand/EUISearchToggle.vue +0 -4
- package/src/components/select/EUISelect.vue +23 -4
- package/src/components/table/EUIDashboardTable.vue +2 -2
- package/src/components/tabs/EUITabs.vue +2 -14
- package/dist/EUIButton.vue.d.ts +0 -5
- package/dist/EUIButton.vue.d.ts.map +0 -1
- package/dist/textArea/EUITextArea.vue.d.ts +0 -4
- package/dist/textArea/EUITextArea.vue.d.ts.map +0 -1
- /package/src/components/checkbox/{EUIcheckbox.stories.ts → EUICheckbox.stories.ts} +0 -0
- /package/src/components/modal/{EUImodal.stories.ts → EUIModal.stories.ts} +0 -0
|
@@ -1,39 +1,52 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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-
|
|
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?.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
|
+
count?: number;
|
|
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>
|
package/src/components/index.ts
CHANGED
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- npm version patch -->
|
|
3
|
-
<div :class="
|
|
3
|
+
<div :class="{'isUseCustomSelect':isUseCustomSelect}">
|
|
4
4
|
<label
|
|
5
5
|
v-if="!inputFilled && label"
|
|
6
6
|
:class="[
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
inputFilled ? 'rounded-2xl min-h-14' : 'rounded-md min-h-10',
|
|
36
36
|
'group relative w-full bg-white cursor-pointer overflow-hidden',
|
|
37
37
|
{ 'opacity-75': disabled },
|
|
38
|
+
className
|
|
38
39
|
]"
|
|
39
40
|
:clearable="clearable"
|
|
40
41
|
:no-drop="nodropDown"
|
|
@@ -207,6 +208,11 @@ const props = defineProps({
|
|
|
207
208
|
default: "",
|
|
208
209
|
required: false,
|
|
209
210
|
},
|
|
211
|
+
customHeight: {
|
|
212
|
+
type: String,
|
|
213
|
+
default: "",
|
|
214
|
+
required: false,
|
|
215
|
+
},
|
|
210
216
|
customOffset: {
|
|
211
217
|
type: Array as PropType<any>,
|
|
212
218
|
required: false,
|
|
@@ -382,17 +388,21 @@ const search = (x: string) => {
|
|
|
382
388
|
};
|
|
383
389
|
|
|
384
390
|
const selectWidth = computed(() => props.customWidth);
|
|
391
|
+
const selectMaxHeight = computed(() => props.customHeight);
|
|
385
392
|
const offsetValue = computed(() => props.customOffset);
|
|
386
393
|
|
|
387
394
|
const withPopper = (
|
|
388
395
|
dropdownList: HTMLElement,
|
|
389
396
|
component: { $refs: { toggle: Element | VirtualElement } },
|
|
390
|
-
{ width }: any
|
|
397
|
+
{ width, maxHeight }: any
|
|
391
398
|
) => {
|
|
392
399
|
const newwidth = selectWidth.value || width; //setcustom width '400px'
|
|
400
|
+
const newHeight = selectMaxHeight.value || width; //setcustom maxHeight '600px'
|
|
401
|
+
|
|
393
402
|
const newOffset = offsetValue.value || [0, 7]; //setcustom Offset '[123, -1]'
|
|
394
403
|
const customWidth = isUseCustomSelect.value ? newwidth : width;
|
|
395
404
|
dropdownList.style.width = customWidth;
|
|
405
|
+
dropdownList.style.maxHeight = isUseCustomSelect.value ? newHeight : maxHeight
|
|
396
406
|
const offsetValues = isUseCustomSelect.value ? newOffset : [0, 7];
|
|
397
407
|
const popper = createPopper(component.$refs.toggle, dropdownList, {
|
|
398
408
|
placement: "bottom",
|
|
@@ -405,6 +415,7 @@ const withPopper = (
|
|
|
405
415
|
},
|
|
406
416
|
],
|
|
407
417
|
});
|
|
418
|
+
dropdownList.classList.add('toggle-dropdown');
|
|
408
419
|
return () => popper.destroy();
|
|
409
420
|
};
|
|
410
421
|
|
|
@@ -552,6 +563,9 @@ const open = () => {
|
|
|
552
563
|
};
|
|
553
564
|
</script>
|
|
554
565
|
<style lang="scss">
|
|
566
|
+
:root {
|
|
567
|
+
--vs-dropdown-color: theme('colors.gray.600')
|
|
568
|
+
}
|
|
555
569
|
.scrollbar {
|
|
556
570
|
&--hide {
|
|
557
571
|
@apply overflow-y-auto;
|
|
@@ -581,6 +595,11 @@ const open = () => {
|
|
|
581
595
|
}
|
|
582
596
|
}
|
|
583
597
|
}
|
|
598
|
+
.vs__dropdown-menu.toggle-dropdown {
|
|
599
|
+
border-top-style: solid;
|
|
600
|
+
margin-top: -5px !important;
|
|
601
|
+
border-radius: 6px !important;
|
|
602
|
+
}
|
|
584
603
|
|
|
585
604
|
.vs--single.vs--open .vs__selected,
|
|
586
605
|
.vs--single.vs--loading .vs__selected {
|
|
@@ -599,7 +618,7 @@ const open = () => {
|
|
|
599
618
|
@apply bg-purple-100 text-purple-700;
|
|
600
619
|
}
|
|
601
620
|
&--highlight {
|
|
602
|
-
@apply bg-gray-100 text-
|
|
621
|
+
@apply bg-gray-100 text-gray-900 font-medium;
|
|
603
622
|
}
|
|
604
623
|
}
|
|
605
624
|
&-menu {
|
|
@@ -698,7 +717,7 @@ const open = () => {
|
|
|
698
717
|
@apply bg-purple-100 text-purple-700;
|
|
699
718
|
}
|
|
700
719
|
&--highlight {
|
|
701
|
-
@apply bg-gray-100 text-black font-
|
|
720
|
+
@apply bg-gray-100 text-black font-medium;
|
|
702
721
|
}
|
|
703
722
|
}
|
|
704
723
|
&-menu {
|
|
@@ -471,12 +471,12 @@ watch(() => tableContainer.value?.clientWidth, checkOverflow);
|
|
|
471
471
|
tbody {
|
|
472
472
|
@apply snap-y snap-mandatory snap-always;
|
|
473
473
|
tr:not(.norecords) {
|
|
474
|
-
@apply text-gray-500 transition-all duration-
|
|
474
|
+
@apply text-gray-500 transition-all duration-300 rounded-xl bg-white snap-start ease-in-out snap-x snap-mandatory will-change-transform;
|
|
475
475
|
&:hover {
|
|
476
476
|
@apply shadow-[1px_2px_40px_0px_#03022912] ring-1 ring-gray-100 ring-inset z-30;
|
|
477
477
|
}
|
|
478
478
|
td {
|
|
479
|
-
@apply px-4 py-4 text-sm font-normal last-of-type:rounded-r-xl first-of-type:rounded-l-xl transition-
|
|
479
|
+
@apply px-4 py-4 text-sm font-normal last-of-type:rounded-r-xl first-of-type:rounded-l-xl transition-colors duration-100 ease-in-out border-solid border border-l-0 border-r-0 border-white first:border-s last:border-e will-change-contents;
|
|
480
480
|
&:first-of-type.checkable {
|
|
481
481
|
@apply w-14 text-center sticky left-0 top-0 z-[11] bg-white;
|
|
482
482
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
|
|
4
|
-
<div class=" overflow-hidden overflow-x-scroll">
|
|
5
|
-
<div
|
|
3
|
+
<div
|
|
6
4
|
v-if="tabStyle === 'design'"
|
|
7
5
|
class="inline-flex flex-row items-center justify-start px-[0.25rem] min-h-[34px] mb-0.5 bg-gray-100 rounded-[0.625rem] ring-1 ring-gray-200/75 gap-2"
|
|
8
6
|
>
|
|
@@ -16,7 +14,6 @@
|
|
|
16
14
|
:class="[
|
|
17
15
|
tab?.disabled ? ' cursor-not-allowed ' : '',
|
|
18
16
|
isHighlighedActivetab ? ' rounded-t-lg !bg-[#EDE9FE] ' : '',
|
|
19
|
-
'flex-shrink-0'
|
|
20
17
|
]"
|
|
21
18
|
role="tab"
|
|
22
19
|
tabindex="-1"
|
|
@@ -83,7 +80,6 @@
|
|
|
83
80
|
: 'border-transparent text-gray-500',
|
|
84
81
|
tab?.disabled ? ' cursor-not-allowed ' : '',
|
|
85
82
|
isHighlighedActivetab&&activeTabIndex === tabindex ? ' rounded-t-lg !bg-[#EDE9FE]' : '',
|
|
86
|
-
'flex-shrink-0'
|
|
87
83
|
]"
|
|
88
84
|
@click="selectTab(tabindex)"
|
|
89
85
|
>
|
|
@@ -119,7 +115,6 @@
|
|
|
119
115
|
: 'border-transparent text-gray-500 z-0',
|
|
120
116
|
tab?.disabled ? ' cursor-not-allowed ' : '',
|
|
121
117
|
isHighlighedActivetab&&activeTabIndex === tabindex ? ' rounded-t-lg !bg-[#EDE9FE]' : '',
|
|
122
|
-
'flex-shrink-0'
|
|
123
118
|
]"
|
|
124
119
|
@click="selectTab(tabindex)"
|
|
125
120
|
>
|
|
@@ -133,6 +128,7 @@
|
|
|
133
128
|
</slot>
|
|
134
129
|
</button>
|
|
135
130
|
</div>
|
|
131
|
+
|
|
136
132
|
<div v-else class="flex items-center gap-1 p-2 transition-all duration-100">
|
|
137
133
|
<button
|
|
138
134
|
v-for="(tab, tabindex) in tabs"
|
|
@@ -149,7 +145,6 @@
|
|
|
149
145
|
: 'border-white hover:bg-gray-50 text-gray-700',
|
|
150
146
|
tab?.disabled ? ' cursor-not-allowed ' : '',
|
|
151
147
|
isHighlighedActivetab&&activeTabIndex === tabindex ? ' rounded-t-lg !bg-[#EDE9FE]' : '',
|
|
152
|
-
'flex-shrink-0'
|
|
153
148
|
]"
|
|
154
149
|
@click="selectTab(tabindex)"
|
|
155
150
|
>
|
|
@@ -163,9 +158,6 @@
|
|
|
163
158
|
</slot>
|
|
164
159
|
</button>
|
|
165
160
|
</div>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
|
|
169
161
|
<slot name="content" :active-tab="tabs[activeTabIndex]">
|
|
170
162
|
<div
|
|
171
163
|
:class="[
|
|
@@ -205,14 +197,12 @@ const props = defineProps<{
|
|
|
205
197
|
|
|
206
198
|
const emit = defineEmits<{
|
|
207
199
|
(event: "update:activeTab", activeTab: Tab): void;
|
|
208
|
-
(event: "update:defaultActiveIndex", defaultActiveIndex: number): void;
|
|
209
200
|
}>();
|
|
210
201
|
|
|
211
202
|
const activeTabIndex = ref(props.defaultActiveIndex ?? 0);
|
|
212
203
|
|
|
213
204
|
const selectTab = (index: number) => {
|
|
214
205
|
activeTabIndex.value = index;
|
|
215
|
-
emit("update:defaultActiveIndex", activeTabIndex.value );
|
|
216
206
|
emit("update:activeTab", props.tabs[activeTabIndex.value]);
|
|
217
207
|
};
|
|
218
208
|
|
|
@@ -220,8 +210,6 @@ watch(
|
|
|
220
210
|
() => props.defaultActiveIndex,
|
|
221
211
|
(newIndex) => {
|
|
222
212
|
activeTabIndex.value = newIndex ?? 0;
|
|
223
|
-
},{
|
|
224
|
-
immediate:true
|
|
225
213
|
}
|
|
226
214
|
);
|
|
227
215
|
</script>
|
package/dist/EUIButton.vue.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/button/EUIButton.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
-
export * from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/button/EUIButton.vue?vue&type=script&setup=true&lang.ts";
|
|
3
|
-
import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/button/EUIButton.vue?vue&type=style&index=0&lang.scss";
|
|
4
|
-
export default _sfc_main;
|
|
5
|
-
//# sourceMappingURL=EUIButton.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EUIButton.vue.d.ts","sourceRoot":"","sources":["../src/components/button/EUIButton.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wHAAwH,CAAC;AAC/I,cAAc,wHAAwH,CAAC;AACvI,OAAO,sHAAsH,CAAC;AAC9H,eAAe,SAAS,CAAC"}
|