sprintify-ui 0.2.28 → 0.2.30
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/README.md +17 -2
- package/dist/sprintify-ui.es.js +511 -493
- package/dist/types/src/types/TimelineItem.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/BaseTimeline.stories.js +2 -0
- package/src/components/BaseTimeline.vue +4 -1
- package/src/components/BaseTimelineItem.vue +23 -2
- package/src/stories/PageShow.vue +1 -1
- package/src/types/TimelineItem.ts +2 -0
package/package.json
CHANGED
|
@@ -29,6 +29,8 @@ const items = [
|
|
|
29
29
|
'Lorem nostrud quis aute elit ea Lorem magna eiusmod ipsum. Eu ipsum eiusmod ad minim adipisicing irure. Fugiat ut adipisicing consequat dolor.',
|
|
30
30
|
color: 'danger',
|
|
31
31
|
date: null,
|
|
32
|
+
onEdit: () => alert('edit'),
|
|
33
|
+
onDelete: () => alert('delete'),
|
|
32
34
|
},
|
|
33
35
|
{
|
|
34
36
|
title: 'Advanced to phone screening by Bethany Blake',
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
v-for="(item, index) in items"
|
|
9
9
|
:key="index"
|
|
10
10
|
>
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
class="relative"
|
|
13
|
+
:class="[!item.onEdit && !item.onDelete ? 'pb-8' : 'pb-3']"
|
|
14
|
+
>
|
|
12
15
|
<span
|
|
13
16
|
v-if="index != items.length - 1"
|
|
14
17
|
class="absolute top-4 left-4 -ml-px h-full w-0.5 bg-slate-300"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative flex space-x-3">
|
|
2
|
+
<div class="relative group flex space-x-3">
|
|
3
3
|
<div>
|
|
4
4
|
<span
|
|
5
5
|
:class="[
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:style="colorStyle"
|
|
9
9
|
>
|
|
10
10
|
<BaseIcon
|
|
11
|
-
class="h-
|
|
11
|
+
class="h-[18px] w-[18px]"
|
|
12
12
|
aria-hidden="true"
|
|
13
13
|
:icon="item.icon"
|
|
14
14
|
/>
|
|
@@ -28,6 +28,26 @@
|
|
|
28
28
|
>
|
|
29
29
|
{{ item.description }}
|
|
30
30
|
</p>
|
|
31
|
+
<p
|
|
32
|
+
class="empty:hidden"
|
|
33
|
+
>
|
|
34
|
+
<button
|
|
35
|
+
v-if="item.onEdit"
|
|
36
|
+
type="button"
|
|
37
|
+
class="text-slate-900 opacity-0 group-hover:opacity-100 transition-opacity duration-50 inline underline text-xs mr-3"
|
|
38
|
+
@click="item.onEdit"
|
|
39
|
+
>
|
|
40
|
+
{{ t('sui.edit') }}
|
|
41
|
+
</button>
|
|
42
|
+
<button
|
|
43
|
+
v-if="item.onDelete"
|
|
44
|
+
type="button"
|
|
45
|
+
class="text-slate-500 opacity-0 group-hover:opacity-100 transition-opacity duration-50 inline underline text-xs"
|
|
46
|
+
@click="item.onDelete"
|
|
47
|
+
>
|
|
48
|
+
{{ t('sui.delete') }}
|
|
49
|
+
</button>
|
|
50
|
+
</p>
|
|
31
51
|
</div>
|
|
32
52
|
<div
|
|
33
53
|
v-if="item.date"
|
|
@@ -44,6 +64,7 @@ import { TimelineItem } from '../types/TimelineItem';
|
|
|
44
64
|
import { PropType } from 'vue';
|
|
45
65
|
import { Icon as BaseIcon } from '@iconify/vue';
|
|
46
66
|
import { getColorConfig } from '@/utils/colors';
|
|
67
|
+
import { t } from '@/i18n';
|
|
47
68
|
|
|
48
69
|
const props = defineProps({
|
|
49
70
|
item: {
|
package/src/stories/PageShow.vue
CHANGED
|
@@ -388,7 +388,7 @@ const timelineItems = [
|
|
|
388
388
|
title: 'Order placed',
|
|
389
389
|
description: 'Philippe Lamarche placed this order on Online Store (checkout #36886026060090).',
|
|
390
390
|
icon: 'heroicons:inbox-solid',
|
|
391
|
-
color:
|
|
391
|
+
color: 'success',
|
|
392
392
|
date: '1:56 PM',
|
|
393
393
|
},
|
|
394
394
|
{
|