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.
- package/dist/EUIButton.vue.d.ts.map +1 -0
- package/dist/library-vue-ts.cjs.js +4 -3
- package/dist/library-vue-ts.es.js +3 -8
- package/dist/library-vue-ts.umd.js +4 -3
- package/dist/select/EUISelect.vue.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/App.vue +16 -0
- package/src/assets/fonts/gilroy/GilroyBold/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroyBold/font.woff2 +0 -0
- package/src/assets/fonts/gilroy/GilroyBoldItalic/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroyBoldItalic/font.woff2 +0 -0
- package/src/assets/fonts/gilroy/GilroyExtraBold/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroyExtraBold/font.woff2 +0 -0
- package/src/assets/fonts/gilroy/GilroyExtraBoldItalic/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroyExtraBoldItalic/font.woff2 +0 -0
- package/src/assets/fonts/gilroy/GilroyMedium/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroyMedium/font.woff2 +0 -0
- package/src/assets/fonts/gilroy/GilroyRegular/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroyRegular/font.woff2 +0 -0
- package/src/assets/fonts/gilroy/GilroySemiBold/font.woff +0 -0
- package/src/assets/fonts/gilroy/GilroySemiBold/font.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-Bold.woff +0 -0
- package/src/assets/fonts/inter/Inter-Bold.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-Italic.woff +0 -0
- package/src/assets/fonts/inter/Inter-Italic.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-Medium.woff +0 -0
- package/src/assets/fonts/inter/Inter-Medium.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-MediumItalic.woff +0 -0
- package/src/assets/fonts/inter/Inter-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-Regular.woff +0 -0
- package/src/assets/fonts/inter/Inter-Regular.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-SemiBold.woff +0 -0
- package/src/assets/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/src/assets/fonts/inter/Inter-SemiBoldItalic.woff +0 -0
- package/src/assets/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/src/assets/scss/body.scss +15 -0
- package/src/assets/svg/ChevronDownSolid.vue +19 -0
- package/src/assets/svg/ChevronDownStroke.vue +22 -0
- package/src/assets/svg/SortArrow.vue +24 -0
- package/src/assets/svg/Student.vue +30 -0
- package/src/assets/svg/partner.vue +33 -0
- package/src/assets/svg/people.vue +25 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/HelloWorld.vue +999 -0
- package/src/components/accordion/EUIAccordion.stories.ts +157 -0
- package/src/components/accordion/EUIAccordion.vue +90 -0
- package/src/components/avatar/EUIAvatar.stories.ts +157 -0
- package/src/components/avatar/EUIAvatar.vue +96 -0
- package/src/components/button/EUIButton.stories.ts +252 -0
- package/src/components/button/EUIButton.vue +151 -0
- package/src/components/checkbox/EUICheckbox.stories.ts +58 -0
- package/src/components/checkbox/EUICheckbox.vue +103 -0
- package/src/components/datepicker/EUIDatepicker.stories.ts +236 -0
- package/src/components/datepicker/EUIDatepicker.vue +185 -0
- package/src/components/delete.vue +108 -0
- package/src/components/dropdown/EUIMultiDropdown.stories.ts +187 -0
- package/src/components/dropdown/EUIMultiDropdown.vue +129 -0
- package/src/components/errorMessage/EUIErrorMessage.scss +0 -0
- package/src/components/errorMessage/EUIErrorMessage.stories.ts +41 -0
- package/src/components/errorMessage/EUIErrorMessage.vue +25 -0
- package/src/components/index.ts +46 -0
- package/src/components/input/EUIInput.stories.ts +174 -0
- package/src/components/input/EUIInput.vue +169 -0
- package/src/components/inputNormal/EUIInputNormal.stories.ts +164 -0
- package/src/components/inputNormal/EUIInputNormal.vue +161 -0
- package/src/components/loader/EUICircleLoader.vue +31 -0
- package/src/components/loader/EUICubeLoader.vue +237 -0
- package/src/components/loader/EUILoader.stories.ts +99 -0
- package/src/components/loader/EUILoader.vue +17 -0
- package/src/components/loader/EUISquareLoader.vue +47 -0
- package/src/components/modal/EUIModal.stories.ts +372 -0
- package/src/components/modal/EUIModal.vue +163 -0
- package/src/components/pillSelect/EUIPillSelect.stories.ts +74 -0
- package/src/components/pillSelect/EUIPillSelect.vue +149 -0
- package/src/components/popover/EUIPopover.stories.ts +247 -0
- package/src/components/popover/EUIPopover.vue +159 -0
- package/src/components/radio/EUIRadio.stories.ts +54 -0
- package/src/components/radio/EUIRadio.vue +78 -0
- package/src/components/searchInput/EUISearch.stories.ts +24 -0
- package/src/components/searchInput/EUISearch.vue +215 -0
- package/src/components/select/EUISelect.scss +0 -0
- package/src/components/select/EUISelect.stories.ts +49 -0
- package/src/components/select/EUISelect.vue +682 -0
- package/src/components/selectSearch/EUISelectSearch.vue +23 -0
- package/src/components/slideover/EUISlideover.stories.ts +318 -0
- package/src/components/slideover/EUISlideover.vue +207 -0
- package/src/components/stepperTimeline/EUIStepperHorizontal.vue +112 -0
- package/src/components/stepperTimeline/EUIStepperTimeline.stories.ts +54 -0
- package/src/components/stepperTimeline/EUIStepperTimeline.vue +16 -0
- package/src/components/stepperTimeline/EUIStepperVertical.vue +112 -0
- package/src/components/table/EUIDashboardTable.vue +482 -0
- package/src/components/table/EUIPageLimit.vue +66 -0
- package/src/components/table/EUIPagination.vue +175 -0
- package/src/components/table/EUIStudentPagination.vue +172 -0
- package/src/components/table/EUITable.stories.ts +190 -0
- package/src/components/table/EUITable.vue +508 -0
- package/src/components/table/EUITableCheckbox.vue +97 -0
- package/src/components/tabs/EUITabs.vue +128 -0
- package/src/components/tabs/EUItabs.stories.ts +123 -0
- package/src/components/tag/EUITag.stories.ts +46 -0
- package/src/components/tag/EUITag.vue +46 -0
- package/src/components/telephone/EUITelephone.stories.ts +202 -0
- package/src/components/telephone/EUITelephone.vue +280 -0
- package/src/components/textArea/EUITextArea.stories.ts +82 -0
- package/src/components/textArea/EUITextArea.vue +122 -0
- package/src/components/timeLine/EUITimeLine.stories.ts +247 -0
- package/src/components/timeLine/EUITimeLine.vue +43 -0
- package/src/components/timeLine/EUITimeLineItem.vue +124 -0
- package/src/components/toggle/EUIToggle.stories.ts +63 -0
- package/src/components/toggle/EUIToggle.vue +99 -0
- package/src/components/tooltip/EUITooltip.stories.ts +53 -0
- package/src/components/tooltip/EUITooltip.vue +108 -0
- package/src/data/books.ts +163 -0
- package/src/data/tab.ts +33 -0
- package/src/data/table.ts +5392 -0
- package/src/main.ts +5 -0
- package/src/utils/lodash.ts +9 -0
- package/src/utils/types.ts +9 -0
- package/src/vite-env.d.ts +5 -0
- package/dist/EUISelect.vue.d.ts.map +0 -1
- package/dist/button/EUIButton.vue.d.ts.map +0 -1
- package/dist/library-vue-ts.css +0 -1
- package/dist/style.scss +0 -118
- /package/dist/{button/EUIButton.vue.d.ts → EUIButton.vue.d.ts} +0 -0
- /package/dist/{EUISelect.vue.d.ts → select/EUISelect.vue.d.ts} +0 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
import EUITimeLine from "./EUITimeLine.vue";
|
|
3
|
+
import { ArrowDownCircleIcon } from "@heroicons/vue/24/solid";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Example/TimeLine",
|
|
6
|
+
component: EUITimeLine,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
items: {
|
|
10
|
+
control: "object",
|
|
11
|
+
},
|
|
12
|
+
type: {
|
|
13
|
+
name: "string",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
} satisfies Meta<typeof EUITimeLine>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
// Default story for EUITextarea
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
items: [
|
|
25
|
+
{
|
|
26
|
+
id: 1,
|
|
27
|
+
person: { name: "Alex Curren" },
|
|
28
|
+
date: "2d ago",
|
|
29
|
+
dateTime: "2023-01-24T09:12",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 2,
|
|
33
|
+
person: { name: "Alex Curren" },
|
|
34
|
+
date: "1d ago",
|
|
35
|
+
dateTime: "2023-01-24T09:20",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 3,
|
|
39
|
+
person: { name: "Alex Curren" },
|
|
40
|
+
date: "2d ago",
|
|
41
|
+
dateTime: "2023-01-24T09:12",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 4,
|
|
45
|
+
person: { name: "Alex Curren" },
|
|
46
|
+
date: "1d ago",
|
|
47
|
+
dateTime: "2023-01-24T09:20",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 5,
|
|
51
|
+
person: { name: "Alex Curren" },
|
|
52
|
+
date: "2d ago",
|
|
53
|
+
dateTime: "2023-01-24T09:12",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 6,
|
|
57
|
+
person: { name: "Alex Curren" },
|
|
58
|
+
date: "1d ago",
|
|
59
|
+
dateTime: "2023-01-24T09:20",
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
type: "view",
|
|
63
|
+
},
|
|
64
|
+
render: (args) => ({
|
|
65
|
+
components: { EUITimeLine },
|
|
66
|
+
setup() {
|
|
67
|
+
return { args };
|
|
68
|
+
},
|
|
69
|
+
template: `<div class="max-w-xl"><EUITimeLine v-bind="args" datas="items" type="view"></EUITimeLine></div>`,
|
|
70
|
+
}),
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const TimeLineIcon: Story = {
|
|
74
|
+
args: {
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
id: 1,
|
|
78
|
+
person: { name: "Alex Curren" },
|
|
79
|
+
date: "2d ago",
|
|
80
|
+
dateTime: "2023-01-24T09:12",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 2,
|
|
84
|
+
person: { name: "Alex Curren" },
|
|
85
|
+
date: "1d ago",
|
|
86
|
+
dateTime: "2023-01-24T09:20",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 3,
|
|
90
|
+
person: { name: "Alex Curren" },
|
|
91
|
+
date: "2d ago",
|
|
92
|
+
dateTime: "2023-01-24T09:12",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 4,
|
|
96
|
+
person: { name: "Alex Curren" },
|
|
97
|
+
date: "1d ago",
|
|
98
|
+
dateTime: "2023-01-24T09:20",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 5,
|
|
102
|
+
person: { name: "Alex Curren" },
|
|
103
|
+
date: "2d ago",
|
|
104
|
+
dateTime: "2023-01-24T09:12",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 6,
|
|
108
|
+
person: { name: "Alex Curren" },
|
|
109
|
+
date: "1d ago",
|
|
110
|
+
dateTime: "2023-01-24T09:20",
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
type: "icon",
|
|
114
|
+
icon: ArrowDownCircleIcon,
|
|
115
|
+
},
|
|
116
|
+
render: (args) => ({
|
|
117
|
+
components: { EUITimeLine, ArrowDownCircleIcon },
|
|
118
|
+
setup() {
|
|
119
|
+
return { args };
|
|
120
|
+
},
|
|
121
|
+
template: `<div class="max-w-xl"><EUITimeLine v-bind="args" datas="items" type="icon" timelineIcon="icon">
|
|
122
|
+
</EUITimeLine></div>`,
|
|
123
|
+
}),
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const TimeLineImage: Story = {
|
|
127
|
+
args: {
|
|
128
|
+
items: [
|
|
129
|
+
{
|
|
130
|
+
id: 1,
|
|
131
|
+
person: {
|
|
132
|
+
name: "Chelsea Hagon",
|
|
133
|
+
imageUrl:
|
|
134
|
+
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
|
|
135
|
+
},
|
|
136
|
+
comment:
|
|
137
|
+
"Called client, they reassured me the invoice would be paid by the 25th.",
|
|
138
|
+
date: "3d ago",
|
|
139
|
+
dateTime: "2023-01-23T15:56",
|
|
140
|
+
showmore: {
|
|
141
|
+
title: "More Details",
|
|
142
|
+
content:
|
|
143
|
+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat, dicta quae aliquam provident mollitia nostrum.",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: 2,
|
|
148
|
+
person: {
|
|
149
|
+
name: "Chelsea Hagon",
|
|
150
|
+
imageUrl:
|
|
151
|
+
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
|
|
152
|
+
},
|
|
153
|
+
comment:
|
|
154
|
+
"Called client, they reassured me the invoice would be paid by the 25th.",
|
|
155
|
+
date: "3d ago",
|
|
156
|
+
dateTime: "2023-01-23T15:56",
|
|
157
|
+
showmore: {
|
|
158
|
+
title: "More Details",
|
|
159
|
+
content:
|
|
160
|
+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat, dicta quae aliquam provident mollitia nostrum.",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 3,
|
|
165
|
+
person: {
|
|
166
|
+
name: "Chelsea Hagon",
|
|
167
|
+
imageUrl:
|
|
168
|
+
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
|
|
169
|
+
},
|
|
170
|
+
comment:
|
|
171
|
+
"Called client, they reassured me the invoice would be paid by the 25th.",
|
|
172
|
+
date: "3d ago",
|
|
173
|
+
dateTime: "2023-01-23T15:56",
|
|
174
|
+
showmore: {
|
|
175
|
+
title: "More Details",
|
|
176
|
+
content:
|
|
177
|
+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat, dicta quae aliquam provident mollitia nostrum.",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 4,
|
|
182
|
+
person: {
|
|
183
|
+
name: "Chelsea Hagon",
|
|
184
|
+
imageUrl:
|
|
185
|
+
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
|
|
186
|
+
},
|
|
187
|
+
comment:
|
|
188
|
+
"Called client, they reassured me the invoice would be paid by the 25th.",
|
|
189
|
+
date: "3d ago",
|
|
190
|
+
dateTime: "2023-01-23T15:56",
|
|
191
|
+
showmore: {
|
|
192
|
+
title: "More Details",
|
|
193
|
+
content:
|
|
194
|
+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat, dicta quae aliquam provident mollitia nostrum.",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 5,
|
|
199
|
+
person: {
|
|
200
|
+
name: "Chelsea Hagon",
|
|
201
|
+
imageUrl:
|
|
202
|
+
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
|
|
203
|
+
},
|
|
204
|
+
comment:
|
|
205
|
+
"Called client, they reassured me the invoice would be paid by the 25th.",
|
|
206
|
+
date: "3d ago",
|
|
207
|
+
dateTime: "2023-01-23T15:56",
|
|
208
|
+
showmore: {
|
|
209
|
+
title: "More Details",
|
|
210
|
+
content:
|
|
211
|
+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat, dicta quae aliquam provident mollitia nostrum.",
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: 6,
|
|
216
|
+
person: {
|
|
217
|
+
name: "Chelsea Hagon",
|
|
218
|
+
imageUrl:
|
|
219
|
+
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
|
|
220
|
+
},
|
|
221
|
+
comment:
|
|
222
|
+
"Called client, they reassured me the invoice would be paid by the 25th.",
|
|
223
|
+
date: "3d ago",
|
|
224
|
+
dateTime: "2023-01-23T15:56",
|
|
225
|
+
showmore: {
|
|
226
|
+
title: "More Details",
|
|
227
|
+
content:
|
|
228
|
+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat, dicta quae aliquam provident mollitia nostrum.",
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
type: "image",
|
|
233
|
+
showMore: true,
|
|
234
|
+
},
|
|
235
|
+
render: (args) => ({
|
|
236
|
+
components: { EUITimeLine, ArrowDownCircleIcon },
|
|
237
|
+
setup() {
|
|
238
|
+
return { args };
|
|
239
|
+
},
|
|
240
|
+
template: `<div class="max-w-xl"><EUITimeLine v-bind="args" datas="items" type="image" showmore="true">
|
|
241
|
+
</EUITimeLine></div>`,
|
|
242
|
+
}),
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
// export const TimeLineGroup: Story = {
|
|
246
|
+
// args: {},
|
|
247
|
+
// };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ul role="list" class="space-y-6 p-4">
|
|
4
|
+
<EUITimeLineItem :data="items" :type="type" :timeline-icon="icon" :show-more="showMore" />
|
|
5
|
+
</ul>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { PropType ,toRefs} from 'vue';
|
|
11
|
+
import EUITimeLineItem from './EUITimeLineItem.vue';
|
|
12
|
+
interface ITimeLine {
|
|
13
|
+
id: number | string,
|
|
14
|
+
person: any,
|
|
15
|
+
comment?: string;
|
|
16
|
+
date?: string,
|
|
17
|
+
dateTime?: string,
|
|
18
|
+
showmore?: any
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
items:{
|
|
24
|
+
type:Array<ITimeLine>,
|
|
25
|
+
default:[]
|
|
26
|
+
},
|
|
27
|
+
type: {
|
|
28
|
+
type:String as PropType<"view" | "icon" | "image">,
|
|
29
|
+
default:''
|
|
30
|
+
},
|
|
31
|
+
icon:{
|
|
32
|
+
type:[String , Object],
|
|
33
|
+
default:''
|
|
34
|
+
} ,
|
|
35
|
+
showMore:{
|
|
36
|
+
type:Boolean,
|
|
37
|
+
default:false
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const {items,type,icon,showMore} = toRefs(props)
|
|
42
|
+
</script>
|
|
43
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
v-for="(item, itemIdx) in data"
|
|
4
|
+
:key="item.id"
|
|
5
|
+
class="relative flex gap-x-4 group"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
:class="[
|
|
9
|
+
itemIdx === data.length - 1 ? 'h-6' : '-bottom-6',
|
|
10
|
+
'absolute left-0 top-0 flex w-6 justify-center',
|
|
11
|
+
]"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
:class="[type === 'icon' ? 'w-0.5 bg-green-500' : 'w-px bg-gray-200']"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<template v-if="type === 'image'">
|
|
18
|
+
<img
|
|
19
|
+
:src="item.person?.imageUrl"
|
|
20
|
+
alt=""
|
|
21
|
+
class="relative size-6 flex-none rounded-full bg-gray-50"
|
|
22
|
+
/>
|
|
23
|
+
<div class="flex-auto rounded-md p-3 ring-1 ring-inset ring-gray-200">
|
|
24
|
+
<div class="flex justify-between gap-x-4 mb-0.5">
|
|
25
|
+
<div class="text-xs leading-5 text-gray-500">
|
|
26
|
+
<span class="font-medium text-gray-900">{{
|
|
27
|
+
item.person?.name
|
|
28
|
+
}}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<time
|
|
31
|
+
:datetime="item.dateTime"
|
|
32
|
+
class="flex-none text-xs leading-5 text-gray-500"
|
|
33
|
+
>
|
|
34
|
+
{{ item.date + " " + item.dateTime }}
|
|
35
|
+
</time>
|
|
36
|
+
</div>
|
|
37
|
+
<p class="text-sm leading-6 text-gray-500">
|
|
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>
|
|
59
|
+
</template>
|
|
60
|
+
<template v-else>
|
|
61
|
+
<div
|
|
62
|
+
class="relative flex size-6 flex-none items-center justify-center bg-white"
|
|
63
|
+
>
|
|
64
|
+
<component
|
|
65
|
+
v-if="type === 'icon'"
|
|
66
|
+
:is="icon || CheckCircleIcon"
|
|
67
|
+
class="size-6 text-green-500"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
/>
|
|
70
|
+
<div
|
|
71
|
+
v-else
|
|
72
|
+
class="size-1.5 rounded-full bg-gray-100 ring-1 ring-gray-300 group-hover:bg-purple-200 group-hover:ring-purple-500"
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
<p class="flex-auto py-0.5 text-xs leading-5 text-gray-500">
|
|
76
|
+
<span class="font-medium text-gray-900">{{ item.person?.name }}</span>
|
|
77
|
+
{{ item?.command }}
|
|
78
|
+
</p>
|
|
79
|
+
<time
|
|
80
|
+
:datetime="item.dateTime"
|
|
81
|
+
class="flex-none py-0.5 text-xs leading-5 text-gray-500"
|
|
82
|
+
>{{ item.date + " " + item.dateTime }}</time
|
|
83
|
+
>
|
|
84
|
+
</template>
|
|
85
|
+
</li>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script setup lang="ts">
|
|
89
|
+
import { PropType, toRefs } from "vue";
|
|
90
|
+
import { MinusIcon, PlusIcon } from "@heroicons/vue/24/outline";
|
|
91
|
+
import { CheckCircleIcon } from "@heroicons/vue/24/solid";
|
|
92
|
+
|
|
93
|
+
interface ITimeLine {
|
|
94
|
+
id: number | string;
|
|
95
|
+
person: any;
|
|
96
|
+
comment?: string;
|
|
97
|
+
date?: string;
|
|
98
|
+
dateTime?: string;
|
|
99
|
+
showmore?: any;
|
|
100
|
+
command?:string
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const props = defineProps({
|
|
104
|
+
data: {
|
|
105
|
+
type: Array<ITimeLine>,
|
|
106
|
+
default: [],
|
|
107
|
+
},
|
|
108
|
+
type: {
|
|
109
|
+
type: String as PropType<"view" | "icon" | "image">,
|
|
110
|
+
default: "",
|
|
111
|
+
},
|
|
112
|
+
icon: {
|
|
113
|
+
type: [String, Object],
|
|
114
|
+
default: "",
|
|
115
|
+
},
|
|
116
|
+
showMore: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false,
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
const {data,type,icon,showMore} = toRefs(props)
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<style scoped></style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
|
|
3
|
+
import EUIToggle from "./EUIToggle.vue";
|
|
4
|
+
|
|
5
|
+
// Meta configuration for the component's stories
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Forms/Toggle",
|
|
8
|
+
component: EUIToggle,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
argTypes: {
|
|
11
|
+
modelValue: {
|
|
12
|
+
description: "Controls the switch state of the Toggle",
|
|
13
|
+
control: "boolean",
|
|
14
|
+
},
|
|
15
|
+
label: {
|
|
16
|
+
description: "The label displayed next to the Toggle",
|
|
17
|
+
control: "text",
|
|
18
|
+
},
|
|
19
|
+
name: {
|
|
20
|
+
description: "The name attribute for the switch toggle, useful for forms",
|
|
21
|
+
control: "text",
|
|
22
|
+
},
|
|
23
|
+
errors: {
|
|
24
|
+
description:
|
|
25
|
+
"An object that contains error messages or validation information",
|
|
26
|
+
control: "object",
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
description: "Disables the toggle when set to change",
|
|
30
|
+
control: "boolean",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
} satisfies Meta<typeof EUIToggle>;
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
|
|
38
|
+
// Default story with minimum props
|
|
39
|
+
export const Default: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
label: "Accept Terms & Conditions",
|
|
42
|
+
modelValue: false,
|
|
43
|
+
disabled: false,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Disabled state story
|
|
48
|
+
export const Disabled: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
label: "Disabled Toggle",
|
|
51
|
+
modelValue: false,
|
|
52
|
+
disabled: true,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// Disabled state story
|
|
57
|
+
export const DisabledToggle: Story = {
|
|
58
|
+
args: {
|
|
59
|
+
label: "Disabled Toggle state",
|
|
60
|
+
modelValue: true,
|
|
61
|
+
disabled: true,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<label class="inline-flex items-center cursor-pointer eui-switch">
|
|
4
|
+
<input
|
|
5
|
+
v-model="isChecked"
|
|
6
|
+
type="checkbox"
|
|
7
|
+
class="sr-only peer eui-switch_input"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
@change="toggle($event)"
|
|
10
|
+
/>
|
|
11
|
+
<div
|
|
12
|
+
class="eui-switch_circle relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2 peer-focus:ring-purple-300 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300/10 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-700"
|
|
13
|
+
>
|
|
14
|
+
<span class="eui-switch_icons"></span>
|
|
15
|
+
</div>
|
|
16
|
+
<span v-if="label" class="text-sm font-medium text-gray-900 ms-3 first-letter:capitalize">
|
|
17
|
+
{{ label }}
|
|
18
|
+
</span>
|
|
19
|
+
</label>
|
|
20
|
+
<EUIErrorMessage :errors="errors" :name="name" />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { PropType, ref, watch } from "vue";
|
|
26
|
+
import EUIErrorMessage from "../errorMessage/EUIErrorMessage.vue";
|
|
27
|
+
|
|
28
|
+
// Props declaration
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
errors: { type: Object, required: false, default: () => {} },
|
|
31
|
+
name: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false,
|
|
34
|
+
default: "",
|
|
35
|
+
},
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: Boolean as PropType<boolean>,
|
|
38
|
+
required: true,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
label: { type: String as PropType<string>, required: true, default: "" },
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const emit = defineEmits(["update:modelValue", "toggle"]);
|
|
49
|
+
const isChecked = ref<boolean>(props.modelValue);
|
|
50
|
+
|
|
51
|
+
watch(isChecked, (newValue) => {
|
|
52
|
+
emit("update:modelValue", newValue);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const toggle = ($event: Event) => {
|
|
56
|
+
if($event) {
|
|
57
|
+
emit("toggle", isChecked.value);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
watch(props, (newValue) => {
|
|
62
|
+
isChecked.value = newValue.modelValue;
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style lang="scss" scoped>
|
|
67
|
+
.eui-switch_icons {
|
|
68
|
+
@apply size-5 absolute z-10;
|
|
69
|
+
transform: translateX(0%) !important;
|
|
70
|
+
&::before,
|
|
71
|
+
&::after {
|
|
72
|
+
content: '';
|
|
73
|
+
border-width: 0 2px 2px 0;
|
|
74
|
+
left: 9px;
|
|
75
|
+
@apply absolute border-solid border-red-500 transform size-[5px] ;
|
|
76
|
+
}
|
|
77
|
+
&::after {
|
|
78
|
+
@apply rotate-45 top-2;
|
|
79
|
+
}
|
|
80
|
+
&::before {
|
|
81
|
+
bottom: 3px;
|
|
82
|
+
rotate: 225deg;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.eui-switch_input:checked + .eui-switch_circle {
|
|
87
|
+
.eui-switch_icons {
|
|
88
|
+
transform: translateX(120%) !important;
|
|
89
|
+
&::after {
|
|
90
|
+
width: 5.3px;
|
|
91
|
+
border-width: 0 2.4px 2.4px 0;
|
|
92
|
+
@apply border-green-500 top-1.5 left-1.5 h-2.5;
|
|
93
|
+
}
|
|
94
|
+
&::before {
|
|
95
|
+
@apply hidden;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
import EUITooltip from "./EUITooltip.vue";
|
|
3
|
+
const meta: Meta<typeof EUITooltip> = {
|
|
4
|
+
title: "Example/Tooltip",
|
|
5
|
+
component: EUITooltip,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
placement: {
|
|
9
|
+
control: { type: "select" },
|
|
10
|
+
options: ["top", "left", "bottom", "right", "bottom-start", "bottom-end"],
|
|
11
|
+
description: "Tooltip placement around the target element",
|
|
12
|
+
defaultValue: "left",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
} satisfies Meta<typeof EUITooltip>;
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
export const Default: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
placement: "top",
|
|
23
|
+
},
|
|
24
|
+
render: (args) => ({
|
|
25
|
+
components: { EUITooltip },
|
|
26
|
+
setup() {
|
|
27
|
+
return { args };
|
|
28
|
+
},
|
|
29
|
+
template: `<div class="min-h-72 mx-auto max-w-xl p-6 flex items-center justify-center">
|
|
30
|
+
<EUITooltip v-bind="args">
|
|
31
|
+
<template v-slot:default>
|
|
32
|
+
<button class="px-4 py-2 text-white bg-gray-800 rounded">Hover me</button>
|
|
33
|
+
</template>
|
|
34
|
+
<template v-slot:tooltip>
|
|
35
|
+
Lorem ipsum, dolor sit amet consectetur adipisicing elit.
|
|
36
|
+
</template>
|
|
37
|
+
</EUITooltip></div>`,
|
|
38
|
+
}),
|
|
39
|
+
parameters: {
|
|
40
|
+
docs: {
|
|
41
|
+
source: {
|
|
42
|
+
code: `<EUITooltip v-bind="args">
|
|
43
|
+
<template v-slot:default>
|
|
44
|
+
<button class="px-4 py-2 text-white bg-gray-800 rounded">Hover me</button>
|
|
45
|
+
</template>
|
|
46
|
+
<template v-slot:tooltip>
|
|
47
|
+
Lorem ipsum, dolor sit amet consectetur adipisicing elit.
|
|
48
|
+
</template>
|
|
49
|
+
</EUITooltip></div>`,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|