edvoyui-component-library-test-flight 0.0.152 → 0.0.154
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/{EUIButtonGroup.vue.d.ts → button/EUIButtonGroup.vue.d.ts} +1 -1
- package/dist/button/EUIButtonGroup.vue.d.ts.map +1 -0
- package/dist/library-vue-ts.cjs.js +44 -44
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +4098 -4063
- package/dist/library-vue-ts.umd.js +47 -47
- package/dist/toggle/EUIToggle.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/button/EUIButtonGroup.vue +34 -29
- package/src/components/timeLine/EUITimeLineItem.vue +54 -43
- package/src/components/toggle/EUIToggle.vue +3 -1
- package/dist/EUIButtonGroup.vue.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/toggle/EUIToggle.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
-
import "/Volumes/work/repos/edvoy-ui-v2/src/components/toggle/EUIToggle.vue?vue&type=style&index=0&scoped=
|
|
2
|
+
import "/Volumes/work/repos/edvoy-ui-v2/src/components/toggle/EUIToggle.vue?vue&type=style&index=0&scoped=f3426066&lang.scss";
|
|
3
3
|
declare const _default: any;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=EUIToggle.vue.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
class="inline-flex items-center gap-2 px-2 py-2 overflow-hidden transition-all duration-200 ease-in bg-white shadow-xl w-max shadow-purple-50"
|
|
5
|
+
:class="[rounded ? 'rounded-full' : 'rounded-lg']"
|
|
6
|
+
v-bind="$attrs"
|
|
7
7
|
>
|
|
8
8
|
<slot name="before" />
|
|
9
|
-
<nav
|
|
9
|
+
<nav
|
|
10
|
+
ref="navContainer"
|
|
11
|
+
class="relative z-0 inline-flex flex-row items-center gap-2"
|
|
12
|
+
>
|
|
10
13
|
<div
|
|
11
|
-
|
|
14
|
+
ref="navIndicator"
|
|
15
|
+
class="absolute left-0 top-0 h-full w-auto -z-[1] transition-all duration-350 ease-[cubic-bezier(0.15,0.3,0.25,1)]"
|
|
12
16
|
:class="[
|
|
13
17
|
getBtnClass(activeBtnName),
|
|
14
18
|
rounded ? 'rounded-full' : 'rounded-lg',
|
|
@@ -17,7 +21,7 @@
|
|
|
17
21
|
<button
|
|
18
22
|
v-for="(data, index) in items"
|
|
19
23
|
:key="`data-${index}`"
|
|
20
|
-
|
|
24
|
+
v-bind="buttonAttrs"
|
|
21
25
|
:type="type"
|
|
22
26
|
:size="size"
|
|
23
27
|
:iconType="iconType"
|
|
@@ -99,8 +103,8 @@ const props = defineProps({
|
|
|
99
103
|
default: () => [],
|
|
100
104
|
},
|
|
101
105
|
defaultActive: {
|
|
102
|
-
type:String,
|
|
103
|
-
default:
|
|
106
|
+
type: String,
|
|
107
|
+
default: "",
|
|
104
108
|
},
|
|
105
109
|
type: {
|
|
106
110
|
type: String as PropType<"button" | "submit" | "reset">,
|
|
@@ -139,9 +143,9 @@ const props = defineProps({
|
|
|
139
143
|
});
|
|
140
144
|
|
|
141
145
|
defineOptions({
|
|
142
|
-
inheritAttrs: false,
|
|
143
|
-
})
|
|
144
|
-
const attrs = useAttrs()
|
|
146
|
+
inheritAttrs: false,
|
|
147
|
+
});
|
|
148
|
+
const attrs = useAttrs();
|
|
145
149
|
const buttonAttrs = computed(() => {
|
|
146
150
|
const { class: _class, style: _style, id: _id, ...rest } = attrs;
|
|
147
151
|
return rest;
|
|
@@ -151,45 +155,51 @@ const emit = defineEmits<{
|
|
|
151
155
|
(event: "update:activeButton", activeButton: Item): void;
|
|
152
156
|
}>();
|
|
153
157
|
|
|
158
|
+
const navIndicator = ref<HTMLElement | null>(null);
|
|
159
|
+
const navContainer = ref<HTMLElement | null>(null);
|
|
160
|
+
|
|
154
161
|
const { items, defaultActive } = toRefs(props);
|
|
155
162
|
const activeBtnName = ref(defaultActive.value || items.value[0]?.name || "");
|
|
156
163
|
|
|
157
164
|
const marker = (el: HTMLElement) => {
|
|
158
|
-
const indicator =
|
|
165
|
+
const indicator = navIndicator.value;
|
|
159
166
|
if (indicator && el) {
|
|
160
167
|
indicator.style.left = el.offsetLeft + "px";
|
|
161
168
|
indicator.style.width = el.offsetWidth + "px";
|
|
162
169
|
}
|
|
163
170
|
};
|
|
164
171
|
|
|
172
|
+
const updateMarkerPosition = () => {
|
|
173
|
+
const activeBtn = navContainer.value?.querySelector(
|
|
174
|
+
`button[data-name="${activeBtnName.value}"]`
|
|
175
|
+
);
|
|
176
|
+
if (activeBtn) {
|
|
177
|
+
marker(activeBtn as HTMLElement);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
165
181
|
const handleOnChange = (val: any) => {
|
|
166
182
|
activeBtnName.value = val?.name;
|
|
167
183
|
emit("update:activeButton", val);
|
|
168
184
|
nextTick(() => {
|
|
169
|
-
|
|
170
|
-
`nav button[data-name="${activeBtnName.value}"]`
|
|
171
|
-
);
|
|
172
|
-
if (activeBtn) marker(activeBtn as HTMLElement);
|
|
185
|
+
updateMarkerPosition();
|
|
173
186
|
});
|
|
174
187
|
};
|
|
175
188
|
|
|
176
189
|
onMounted(() => {
|
|
177
190
|
nextTick(() => {
|
|
178
191
|
requestAnimationFrame(() => {
|
|
179
|
-
|
|
180
|
-
`nav button[data-name="${activeBtnName.value}"]`
|
|
181
|
-
);
|
|
182
|
-
if (activeBtn) marker(activeBtn as HTMLElement);
|
|
192
|
+
updateMarkerPosition();
|
|
183
193
|
});
|
|
184
194
|
});
|
|
185
195
|
});
|
|
186
196
|
|
|
187
197
|
// Computed classes for button size
|
|
188
198
|
const sizeClasses = reactive({
|
|
189
|
-
xs: "text-xs font-medium leading-[normal]", //
|
|
190
|
-
sm: "text-sm font-medium", //
|
|
191
|
-
md: "text-base font-semibold", //
|
|
192
|
-
lg: "text-base font-semibold", //
|
|
199
|
+
xs: "text-xs font-medium leading-[normal]", //24
|
|
200
|
+
sm: "text-sm font-medium", //32
|
|
201
|
+
md: "text-base font-semibold", //40
|
|
202
|
+
lg: "text-base font-semibold", //48
|
|
193
203
|
});
|
|
194
204
|
|
|
195
205
|
const btnColors = {
|
|
@@ -261,11 +271,6 @@ const getBtnClass = (btnName: string) => {
|
|
|
261
271
|
</script>
|
|
262
272
|
|
|
263
273
|
<style lang="scss" scoped>
|
|
264
|
-
#nav-indicator {
|
|
265
|
-
transition: all 350ms cubic-bezier(0.15, 0.3, 0.25, 1);
|
|
266
|
-
@apply absolute left-0 w-auto h-full top-0 -z-[1];
|
|
267
|
-
}
|
|
268
|
-
|
|
269
274
|
.bar-indicator {
|
|
270
275
|
@apply relative;
|
|
271
276
|
&::before {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li
|
|
3
3
|
v-for="(item, itemIdx) in data"
|
|
4
|
-
:key="
|
|
4
|
+
:key="`timeline_${itemIdx}`"
|
|
5
5
|
class="relative flex gap-x-4 group"
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
@@ -15,56 +15,67 @@
|
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
17
|
<template v-if="type === 'image'">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
<slot name="image" :data="item" :dataIndex="itemIdx">
|
|
19
|
+
<img
|
|
20
|
+
:src="item.person?.imageUrl"
|
|
21
|
+
alt=""
|
|
22
|
+
class="relative flex-initial flex-shrink-0 rounded-full size-6 bg-gray-50"
|
|
23
|
+
/>
|
|
24
|
+
</slot>
|
|
25
|
+
<slot name="details" :data="item" :dataIndex="itemIdx">
|
|
26
|
+
<div
|
|
27
|
+
class="flex-1 min-w-0 p-3 rounded-md ring-1 ring-inset ring-gray-200"
|
|
28
|
+
>
|
|
29
|
+
<div class="flex justify-between gap-x-4 mb-0.5">
|
|
30
|
+
<div class="text-xs leading-5 text-gray-500">
|
|
31
|
+
<span class="font-medium text-gray-900">{{
|
|
32
|
+
item.person?.name
|
|
33
|
+
}}</span>
|
|
34
|
+
</div>
|
|
35
|
+
<time
|
|
36
|
+
:datetime="item.dateTime"
|
|
37
|
+
class="flex-none text-xs leading-5 text-gray-500"
|
|
38
|
+
>
|
|
39
|
+
{{ item.date + " " + item.dateTime }}
|
|
40
|
+
</time>
|
|
29
41
|
</div>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
<p class="text-sm leading-6 text-gray-500">
|
|
43
|
+
{{ item.comment }}
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
<details
|
|
47
|
+
v-if="showMore"
|
|
48
|
+
:open="itemIdx === 0"
|
|
49
|
+
class="h-6 p-2 mt-2 text-xs text-gray-500 transition-colors duration-100 ease-in-out select-none open:border open:border-gray-100 open:bg-gray-50 open:rounded-md group open:h-auto"
|
|
33
50
|
>
|
|
34
|
-
|
|
35
|
-
|
|
51
|
+
<summary
|
|
52
|
+
class="flex flex-row items-center justify-start text-sm leading-5 text-gray-900 list-none cursor-pointer"
|
|
53
|
+
>
|
|
54
|
+
<slot name="showMoreTitle" :data="item" :open="itemIdx === 0">
|
|
55
|
+
{{ item.showmore?.title || "More Details" }}
|
|
56
|
+
<PlusIcon
|
|
57
|
+
class="ml-auto -mr-1 transition-all duration-300 opacity-75 fill-current size-4 group-open:hidden"
|
|
58
|
+
/>
|
|
59
|
+
<MinusIcon
|
|
60
|
+
class="hidden ml-auto -mr-1 transition-all duration-300 opacity-75 fill-current size-4 group-open:inline-block"
|
|
61
|
+
/>
|
|
62
|
+
</slot>
|
|
63
|
+
</summary>
|
|
64
|
+
<slot name="showMoreContent" :data="item">
|
|
65
|
+
<div>{{ item.showmore?.content }}</div>
|
|
66
|
+
</slot>
|
|
67
|
+
</details>
|
|
36
68
|
</div>
|
|
37
|
-
|
|
38
|
-
{{ item.comment }}
|
|
39
|
-
</p>
|
|
40
|
-
<details
|
|
41
|
-
v-if="showMore"
|
|
42
|
-
:open="itemIdx === 0"
|
|
43
|
-
class="text-gray-500 text-xs select-none open:border open:border-gray-100 open:bg-gray-50 open:rounded-md transition-colors duration-100 ease-in-out mt-2 p-2 group h-6 open:h-auto"
|
|
44
|
-
>
|
|
45
|
-
<summary
|
|
46
|
-
class="text-sm leading-5 text-gray-900 list-none flex items-center justify-start flex-row cursor-pointer"
|
|
47
|
-
>
|
|
48
|
-
{{ item.showmore?.title || "More Details" }}
|
|
49
|
-
<PlusIcon
|
|
50
|
-
class="fill-current opacity-75 size-4 -mr-1 transition-all duration-300 ml-auto group-open:hidden"
|
|
51
|
-
/>
|
|
52
|
-
<MinusIcon
|
|
53
|
-
class="fill-current opacity-75 size-4 -mr-1 transition-all duration-300 ml-auto hidden group-open:inline-block"
|
|
54
|
-
/>
|
|
55
|
-
</summary>
|
|
56
|
-
<div>{{ item.showmore?.content }}</div>
|
|
57
|
-
</details>
|
|
58
|
-
</div>
|
|
69
|
+
</slot>
|
|
59
70
|
</template>
|
|
60
71
|
<template v-else>
|
|
61
72
|
<div
|
|
62
|
-
class="relative flex
|
|
73
|
+
class="relative flex items-center justify-center flex-none bg-white size-6"
|
|
63
74
|
>
|
|
64
75
|
<component
|
|
65
76
|
v-if="type === 'icon'"
|
|
66
77
|
:is="icon || CheckCircleIcon"
|
|
67
|
-
class="
|
|
78
|
+
class="text-green-500 size-6"
|
|
68
79
|
aria-hidden="true"
|
|
69
80
|
/>
|
|
70
81
|
<div
|
|
@@ -97,7 +108,7 @@ interface ITimeLine {
|
|
|
97
108
|
date?: string;
|
|
98
109
|
dateTime?: string;
|
|
99
110
|
showmore?: any;
|
|
100
|
-
command?:string
|
|
111
|
+
command?: string;
|
|
101
112
|
}
|
|
102
113
|
|
|
103
114
|
const props = defineProps({
|
|
@@ -118,7 +129,7 @@ const props = defineProps({
|
|
|
118
129
|
default: false,
|
|
119
130
|
},
|
|
120
131
|
});
|
|
121
|
-
const
|
|
132
|
+
const { data, type, icon, showMore } = toRefs(props);
|
|
122
133
|
</script>
|
|
123
134
|
|
|
124
135
|
<style scoped></style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EUIButtonGroup.vue.d.ts","sourceRoot":"","sources":["../src/components/button/EUIButtonGroup.vue"],"names":[],"mappings":"AACA,cAAc,6GAA6G,CAAC;AAC5H,OAAO,2HAA2H,CAAC;;AAEnI,wBAA0F"}
|