From 3b8719a72cb295dc18ed75e01c6453558ce64954 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 16 Dec 2022 19:39:09 +0400 Subject: [PATCH 1/7] feat: added vertical timeline --- docs/components/timeline.md | 140 ++++++++++++++++-- .../timeline/examples/TimelineExample.vue | 53 ++++++- .../examples/TimelineWithIconsExample.vue | 60 ++++++++ src/components/Timeline/Timeline.vue | 31 +--- src/components/Timeline/TimelineButton.vue | 5 + src/components/Timeline/TimelineContent.vue | 3 + src/components/Timeline/TimelineItem.vue | 5 + src/components/Timeline/TimelinePoint.vue | 24 +++ src/components/Timeline/TimelineTime.vue | 5 + src/components/Timeline/TimelineTitle.vue | 5 + src/index.ts | 6 + 11 files changed, 298 insertions(+), 39 deletions(-) create mode 100644 docs/components/timeline/examples/TimelineWithIconsExample.vue create mode 100644 src/components/Timeline/TimelineButton.vue create mode 100644 src/components/Timeline/TimelineContent.vue create mode 100644 src/components/Timeline/TimelineItem.vue create mode 100644 src/components/Timeline/TimelinePoint.vue create mode 100644 src/components/Timeline/TimelineTime.vue create mode 100644 src/components/Timeline/TimelineTitle.vue diff --git a/docs/components/timeline.md b/docs/components/timeline.md index 6516756..9560561 100644 --- a/docs/components/timeline.md +++ b/docs/components/timeline.md @@ -1,15 +1,137 @@ # Vue Timeline Component - Flowbite -```vue - - -``` +## Default timeline usage + +```vue + + + +``` +## Timeline with icons + + + +```vue + + + +``` diff --git a/docs/components/timeline/examples/TimelineExample.vue b/docs/components/timeline/examples/TimelineExample.vue index 2661e72..652bdf4 100644 --- a/docs/components/timeline/examples/TimelineExample.vue +++ b/docs/components/timeline/examples/TimelineExample.vue @@ -1,8 +1,57 @@ diff --git a/docs/components/timeline/examples/TimelineWithIconsExample.vue b/docs/components/timeline/examples/TimelineWithIconsExample.vue new file mode 100644 index 0000000..a3e47f5 --- /dev/null +++ b/docs/components/timeline/examples/TimelineWithIconsExample.vue @@ -0,0 +1,60 @@ + + diff --git a/src/components/Timeline/Timeline.vue b/src/components/Timeline/Timeline.vue index 6f25935..b030d3f 100644 --- a/src/components/Timeline/Timeline.vue +++ b/src/components/Timeline/Timeline.vue @@ -1,35 +1,10 @@ diff --git a/src/components/Timeline/TimelineTime.vue b/src/components/Timeline/TimelineTime.vue new file mode 100644 index 0000000..03eab9a --- /dev/null +++ b/src/components/Timeline/TimelineTime.vue @@ -0,0 +1,5 @@ + diff --git a/src/components/Timeline/TimelineTitle.vue b/src/components/Timeline/TimelineTitle.vue new file mode 100644 index 0000000..e39664e --- /dev/null +++ b/src/components/Timeline/TimelineTitle.vue @@ -0,0 +1,5 @@ + diff --git a/src/index.ts b/src/index.ts index 9de0f19..c92b24f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,6 +33,12 @@ export { default as Rating } from './components/Rating/Rating.vue' export { default as Sidebar } from './components/Sidebar/Sidebar.vue' export { default as Table } from './components/Table/Table.vue' export { default as Timeline } from './components/Timeline/Timeline.vue' +export { default as TimelineItem } from './components/Timeline/TimelineItem.vue' +export { default as TimelinePoint } from './components/Timeline/TimelinePoint.vue' +export { default as TimelineTime } from './components/Timeline/TimelineTime.vue' +export { default as TimelineTitle } from './components/Timeline/TimelineTitle.vue' +export { default as TimelineContent } from './components/Timeline/TimelineContent.vue' +export { default as TimelineButton } from './components/Timeline/TimelineButton.vue' export { default as Toast } from './components/Toast/Toast.vue' export { default as ToastProvider } from './components/Toast/components/ToastProvider/ToastProvider.vue' export { default as Tooltip } from './components/Tooltip/Tooltip.vue' From 3e0454a50e6f182c63bf55eaa7ce6e40e20a9b3e Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 17 Dec 2022 01:48:31 +0400 Subject: [PATCH 2/7] feat: added horizontal timeline --- docs/components/timeline.md | 216 ++++++++++++------ .../timeline/examples/TimelineExample.vue | 84 ++++--- .../examples/TimelineHorizontalExample.vue | 58 +++++ .../examples/TimelineWithIconsExample.vue | 66 +++--- src/components/Timeline/Timeline.vue | 18 +- src/components/Timeline/TimelineBody.vue | 3 + src/components/Timeline/TimelineContent.vue | 10 +- src/components/Timeline/TimelineItem.vue | 16 +- src/components/Timeline/TimelinePoint.vue | 32 ++- src/index.ts | 3 +- 10 files changed, 340 insertions(+), 166 deletions(-) create mode 100644 docs/components/timeline/examples/TimelineHorizontalExample.vue create mode 100644 src/components/Timeline/TimelineBody.vue diff --git a/docs/components/timeline.md b/docs/components/timeline.md index 9560561..9ef6f68 100644 --- a/docs/components/timeline.md +++ b/docs/components/timeline.md @@ -1,6 +1,7 @@ # Vue Timeline Component - Flowbite @@ -13,62 +14,62 @@ import TimelineWithIconsExample from './timeline/examples/TimelineWithIconsExamp import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton } from 'flowbite-vue' ``` ## Timeline with icons +You can add icons by passing svg icons as slot to `` +
@@ -77,61 +78,126 @@ import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, T import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton } from 'flowbite-vue' + +``` +## Timeline with icons +`horizontal` prop makes timeline horizontal +
+ + + +```vue + + ``` diff --git a/docs/components/timeline/examples/TimelineExample.vue b/docs/components/timeline/examples/TimelineExample.vue index 652bdf4..52ae8a2 100644 --- a/docs/components/timeline/examples/TimelineExample.vue +++ b/docs/components/timeline/examples/TimelineExample.vue @@ -1,57 +1,55 @@ diff --git a/docs/components/timeline/examples/TimelineHorizontalExample.vue b/docs/components/timeline/examples/TimelineHorizontalExample.vue new file mode 100644 index 0000000..dc83df5 --- /dev/null +++ b/docs/components/timeline/examples/TimelineHorizontalExample.vue @@ -0,0 +1,58 @@ + + diff --git a/docs/components/timeline/examples/TimelineWithIconsExample.vue b/docs/components/timeline/examples/TimelineWithIconsExample.vue index a3e47f5..0a28213 100644 --- a/docs/components/timeline/examples/TimelineWithIconsExample.vue +++ b/docs/components/timeline/examples/TimelineWithIconsExample.vue @@ -1,60 +1,58 @@ diff --git a/src/components/Timeline/Timeline.vue b/src/components/Timeline/Timeline.vue index b030d3f..85d11c9 100644 --- a/src/components/Timeline/Timeline.vue +++ b/src/components/Timeline/Timeline.vue @@ -1,14 +1,24 @@ diff --git a/src/components/Timeline/TimelineBody.vue b/src/components/Timeline/TimelineBody.vue new file mode 100644 index 0000000..d9c5bec --- /dev/null +++ b/src/components/Timeline/TimelineBody.vue @@ -0,0 +1,3 @@ + diff --git a/src/components/Timeline/TimelineContent.vue b/src/components/Timeline/TimelineContent.vue index d9c5bec..7c27116 100644 --- a/src/components/Timeline/TimelineContent.vue +++ b/src/components/Timeline/TimelineContent.vue @@ -1,3 +1,11 @@ + + diff --git a/src/components/Timeline/TimelineItem.vue b/src/components/Timeline/TimelineItem.vue index fdd58b5..1d97666 100644 --- a/src/components/Timeline/TimelineItem.vue +++ b/src/components/Timeline/TimelineItem.vue @@ -1,5 +1,19 @@ + + diff --git a/src/components/Timeline/TimelinePoint.vue b/src/components/Timeline/TimelinePoint.vue index 56684a7..175fb18 100644 --- a/src/components/Timeline/TimelinePoint.vue +++ b/src/components/Timeline/TimelinePoint.vue @@ -1,13 +1,16 @@ diff --git a/src/index.ts b/src/index.ts index c92b24f..a40897f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,9 +35,10 @@ export { default as Table } from './components/Table/Table.vue' export { default as Timeline } from './components/Timeline/Timeline.vue' export { default as TimelineItem } from './components/Timeline/TimelineItem.vue' export { default as TimelinePoint } from './components/Timeline/TimelinePoint.vue' +export { default as TimelineContent } from './components/Timeline/TimelineContent.vue' export { default as TimelineTime } from './components/Timeline/TimelineTime.vue' export { default as TimelineTitle } from './components/Timeline/TimelineTitle.vue' -export { default as TimelineContent } from './components/Timeline/TimelineContent.vue' +export { default as TimelineBody } from './components/Timeline/TimelineBody.vue' export { default as TimelineButton } from './components/Timeline/TimelineButton.vue' export { default as Toast } from './components/Toast/Toast.vue' export { default as ToastProvider } from './components/Toast/components/ToastProvider/ToastProvider.vue' From bf9c92f4beca64adb05f511c0fdf4ca38d76afaf Mon Sep 17 00:00:00 2001 From: victor Date: Sun, 18 Dec 2022 02:20:11 +0400 Subject: [PATCH 3/7] feat: added classes system for timeline point --- src/components/Timeline/TimelinePoint.vue | 35 ++++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/components/Timeline/TimelinePoint.vue b/src/components/Timeline/TimelinePoint.vue index 175fb18..61e195f 100644 --- a/src/components/Timeline/TimelinePoint.vue +++ b/src/components/Timeline/TimelinePoint.vue @@ -1,7 +1,7 @@