sprintify-ui 0.0.35 → 0.0.36
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/sprintify-ui.es.js +2623 -2394
- package/dist/types/src/components/BaseShortcut.vue.d.ts +67 -0
- package/dist/types/src/components/BaseStatistic.vue.d.ts +56 -0
- package/dist/types/src/components/BaseTimeline.vue.d.ts +14 -0
- package/dist/types/src/components/BaseTimelineItem.vue.d.ts +14 -0
- package/dist/types/src/components/index.d.ts +5 -1
- package/dist/types/src/types/Colors.d.ts +9 -0
- package/dist/types/src/types/TimelineItem.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/BaseShortcut.stories.js +92 -0
- package/src/components/BaseShortcut.vue +153 -0
- package/src/components/BaseStatistic.stories.js +51 -0
- package/src/components/BaseStatistic.vue +98 -0
- package/src/components/BaseTimeline.stories.js +53 -0
- package/src/components/BaseTimeline.vue +29 -0
- package/src/components/BaseTimelineItem.stories.js +78 -0
- package/src/components/BaseTimelineItem.vue +79 -0
- package/src/components/index.ts +8 -0
- package/src/types/Colors.ts +9 -0
- package/src/types/TimelineItem.ts +8 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import BaseTimelineItem from './BaseTimelineItem.vue';
|
|
2
|
+
|
|
3
|
+
const colors = [
|
|
4
|
+
'primary',
|
|
5
|
+
'success',
|
|
6
|
+
'danger',
|
|
7
|
+
'warning',
|
|
8
|
+
'info',
|
|
9
|
+
'grey',
|
|
10
|
+
'black',
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Components/BaseTimelineItem',
|
|
15
|
+
component: BaseTimelineItem,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Template = (args) => ({
|
|
19
|
+
components: { BaseTimelineItem },
|
|
20
|
+
setup() {
|
|
21
|
+
return { args };
|
|
22
|
+
},
|
|
23
|
+
template: `<div class="max-w-md"><BaseTimelineItem v-bind="args"/></div>`,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const ColorsTemplate = (args) => ({
|
|
27
|
+
components: { BaseTimelineItem },
|
|
28
|
+
setup() {
|
|
29
|
+
const items = colors.map((color) => {
|
|
30
|
+
return {
|
|
31
|
+
title: 'Advanced to phone screening by Bethany Blake',
|
|
32
|
+
icon: 'heroicons:shield-check-20-solid',
|
|
33
|
+
description:
|
|
34
|
+
'Lorem nostrud quis aute elit ea Lorem magna eiusmod ipsum. Eu ipsum eiusmod ad minim adipisicing irure. Fugiat ut adipisicing consequat dolor.',
|
|
35
|
+
color: color,
|
|
36
|
+
date: '15 Jan',
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
return { args, items };
|
|
40
|
+
},
|
|
41
|
+
template: `
|
|
42
|
+
<div class="max-w-md">
|
|
43
|
+
<ul role="list" class="-mb-8">
|
|
44
|
+
<li v-for="(item, index) in items" :key="index">
|
|
45
|
+
<p class="text-xs text-slate-600 leading-tight mb-4">{{ item.color }}</p>
|
|
46
|
+
<div class="relative pb-8">
|
|
47
|
+
<BaseTimelineItem :item="item" />
|
|
48
|
+
</div>
|
|
49
|
+
</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</div>
|
|
52
|
+
`,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const Simple = Template.bind({});
|
|
56
|
+
Simple.args = {
|
|
57
|
+
item: {
|
|
58
|
+
title: 'Advanced to phone screening by Bethany Blake',
|
|
59
|
+
icon: 'heroicons:shield-check-20-solid',
|
|
60
|
+
description: '',
|
|
61
|
+
color: 'warning',
|
|
62
|
+
date: '15 Jan',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const WithDescription = Template.bind({});
|
|
67
|
+
WithDescription.args = {
|
|
68
|
+
item: {
|
|
69
|
+
title: 'Advanced to phone screening by Bethany Blake',
|
|
70
|
+
icon: 'heroicons:shield-check-20-solid',
|
|
71
|
+
description:
|
|
72
|
+
'Lorem nostrud quis aute elit ea Lorem magna eiusmod ipsum. Eu ipsum eiusmod ad minim adipisicing irure. Fugiat ut adipisicing consequat dolor.',
|
|
73
|
+
color: 'primary',
|
|
74
|
+
date: '15 Jan',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const Colors = ColorsTemplate.bind({});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative flex space-x-3">
|
|
3
|
+
<div>
|
|
4
|
+
<span
|
|
5
|
+
:class="[
|
|
6
|
+
iconBackgroundClass,
|
|
7
|
+
'flex h-8 w-8 items-center justify-center rounded-full ring-8 ring-white',
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
10
|
+
<BaseIcon
|
|
11
|
+
class="w-5 h-5 text-white"
|
|
12
|
+
aria-hidden="true"
|
|
13
|
+
:icon="item.icon"
|
|
14
|
+
/>
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
class="flex justify-between flex-1 min-w-0 space-x-4"
|
|
19
|
+
:class="{ 'pt-1.5': !item.description }"
|
|
20
|
+
>
|
|
21
|
+
<div>
|
|
22
|
+
<p class="text-sm leading-tight text-slate-600">
|
|
23
|
+
{{ item.title }}
|
|
24
|
+
</p>
|
|
25
|
+
<p
|
|
26
|
+
v-if="item.description"
|
|
27
|
+
class="mt-1 text-xs leading-tight text-slate-500"
|
|
28
|
+
>
|
|
29
|
+
{{ item.description }}
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
v-if="item.date"
|
|
34
|
+
class="text-sm text-right text-gray-500 whitespace-nowrap"
|
|
35
|
+
>
|
|
36
|
+
<time :datetime="item.date">{{ item.date }}</time>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script lang="ts" setup>
|
|
43
|
+
import { TimelineItem } from '../types/TimelineItem';
|
|
44
|
+
import { Colors } from '../types/Colors';
|
|
45
|
+
import { PropType } from 'vue';
|
|
46
|
+
import { BaseIcon } from '.';
|
|
47
|
+
|
|
48
|
+
const props = defineProps({
|
|
49
|
+
item: {
|
|
50
|
+
required: true,
|
|
51
|
+
type: Object as PropType<TimelineItem>,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const iconBackgroundClass = computed((): string => {
|
|
56
|
+
if (props.item.color == Colors.primary) {
|
|
57
|
+
return 'bg-primary-600';
|
|
58
|
+
}
|
|
59
|
+
if (props.item.color == Colors.danger) {
|
|
60
|
+
return 'bg-red-600';
|
|
61
|
+
}
|
|
62
|
+
if (props.item.color == Colors.warning) {
|
|
63
|
+
return 'bg-yellow-600';
|
|
64
|
+
}
|
|
65
|
+
if (props.item.color == Colors.info) {
|
|
66
|
+
return 'bg-blue-500';
|
|
67
|
+
}
|
|
68
|
+
if (props.item.color == Colors.grey) {
|
|
69
|
+
return 'bg-slate-500';
|
|
70
|
+
}
|
|
71
|
+
if (props.item.color == Colors.black) {
|
|
72
|
+
return 'bg-slate-900';
|
|
73
|
+
}
|
|
74
|
+
if (props.item.color == Colors.success) {
|
|
75
|
+
return 'bg-green-500';
|
|
76
|
+
}
|
|
77
|
+
return 'bg-gray-500';
|
|
78
|
+
});
|
|
79
|
+
</script>
|
package/src/components/index.ts
CHANGED
|
@@ -49,9 +49,11 @@ import BaseProgressCircle from './BaseProgressCircle.vue';
|
|
|
49
49
|
import BaseRadioGroup from './BaseRadioGroup.vue';
|
|
50
50
|
import BaseReadMore from './BaseReadMore.vue';
|
|
51
51
|
import BaseSelect from './BaseSelect.vue';
|
|
52
|
+
import BaseShortcut from './BaseShortcut.vue';
|
|
52
53
|
import BaseSideNavigation from './BaseSideNavigation.vue';
|
|
53
54
|
import BaseSideNavigationItem from './BaseSideNavigationItem.vue';
|
|
54
55
|
import BaseSkeleton from './BaseSkeleton.vue';
|
|
56
|
+
import BaseStatistic from './BaseStatistic.vue';
|
|
55
57
|
import BaseSwitch from './BaseSwitch.vue';
|
|
56
58
|
import BaseSystemAlert from './BaseSystemAlert.vue';
|
|
57
59
|
import BaseTabs from './BaseTabs.vue';
|
|
@@ -62,6 +64,8 @@ import BaseTable from './BaseTable.vue';
|
|
|
62
64
|
import BaseTableColumn from './BaseTableColumn.vue';
|
|
63
65
|
import BaseTextarea from './BaseTextarea.vue';
|
|
64
66
|
import BaseTextareaAutoresize from './BaseTextareaAutoresize.vue';
|
|
67
|
+
import BaseTimeline from './BaseTimeline.vue';
|
|
68
|
+
import BaseTimelineItem from './BaseTimelineItem.vue';
|
|
65
69
|
|
|
66
70
|
import BaseLayoutStacked from './BaseLayoutStacked.vue';
|
|
67
71
|
import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
|
|
@@ -120,9 +124,11 @@ export {
|
|
|
120
124
|
BaseRadioGroup,
|
|
121
125
|
BaseReadMore,
|
|
122
126
|
BaseSelect,
|
|
127
|
+
BaseShortcut,
|
|
123
128
|
BaseSideNavigation,
|
|
124
129
|
BaseSideNavigationItem,
|
|
125
130
|
BaseSkeleton,
|
|
131
|
+
BaseStatistic,
|
|
126
132
|
BaseSwitch,
|
|
127
133
|
BaseSystemAlert,
|
|
128
134
|
BaseTabs,
|
|
@@ -133,6 +139,8 @@ export {
|
|
|
133
139
|
BaseTableColumn,
|
|
134
140
|
BaseTextarea,
|
|
135
141
|
BaseTextareaAutoresize,
|
|
142
|
+
BaseTimeline,
|
|
143
|
+
BaseTimelineItem,
|
|
136
144
|
BaseLayoutStacked,
|
|
137
145
|
BaseLayoutStackedConfigurable,
|
|
138
146
|
BaseLayoutSidebar,
|