flowbite-svelte 0.10.11 → 0.12.0

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.
Files changed (45) hide show
  1. package/README.md +12 -0
  2. package/alerts/Alert.svelte +24 -1
  3. package/alerts/Alert.svelte.d.ts +3 -0
  4. package/avatar/Avatar.svelte +40 -0
  5. package/avatar/Avatar.svelte.d.ts +19 -0
  6. package/badges/BadgeIcon.svelte +1 -1
  7. package/buttons/GradientOutlineButton.svelte +1 -1
  8. package/index.d.ts +16 -0
  9. package/index.js +30 -2
  10. package/modals/SignInModal.svelte +2 -1
  11. package/modals/SignInModal.svelte.d.ts +1 -0
  12. package/package.json +18 -1
  13. package/paginations/Next.svelte +28 -0
  14. package/paginations/Next.svelte.d.ts +19 -0
  15. package/paginations/Pagination.svelte +67 -0
  16. package/paginations/Pagination.svelte.d.ts +27 -0
  17. package/paginations/Previous.svelte +28 -0
  18. package/paginations/Previous.svelte.d.ts +19 -0
  19. package/paginations/TableData.svelte +28 -0
  20. package/paginations/TableData.svelte.d.ts +25 -0
  21. package/sidebars/Sidebar.svelte +101 -0
  22. package/sidebars/Sidebar.svelte.d.ts +19 -0
  23. package/tabs/InteractiveTabs.svelte +7 -3
  24. package/timelines/Activity.svelte +6 -0
  25. package/timelines/Activity.svelte.d.ts +18 -0
  26. package/timelines/ActivityItem.svelte +29 -0
  27. package/timelines/ActivityItem.svelte.d.ts +17 -0
  28. package/timelines/Group.svelte +11 -0
  29. package/timelines/Group.svelte.d.ts +20 -0
  30. package/timelines/GroupItem.svelte +49 -0
  31. package/timelines/GroupItem.svelte.d.ts +17 -0
  32. package/timelines/Timeline.svelte +6 -0
  33. package/timelines/Timeline.svelte.d.ts +18 -0
  34. package/timelines/TimelineHorizontal.svelte +6 -0
  35. package/timelines/TimelineHorizontal.svelte.d.ts +18 -0
  36. package/timelines/TimelineItem.svelte +37 -0
  37. package/timelines/TimelineItem.svelte.d.ts +17 -0
  38. package/timelines/TimelineItemHorizontal.svelte +38 -0
  39. package/timelines/TimelineItemHorizontal.svelte.d.ts +17 -0
  40. package/timelines/TimelineItemVertical.svelte +54 -0
  41. package/timelines/TimelineItemVertical.svelte.d.ts +17 -0
  42. package/toasts/Toast.svelte +83 -0
  43. package/toasts/Toast.svelte.d.ts +25 -0
  44. package/types.d.ts +65 -1
  45. package/types.js +0 -7
@@ -0,0 +1,101 @@
1
+ <script >import { slide } from 'svelte/transition';
2
+ export let site;
3
+ export let links;
4
+ export let cta;
5
+ let isOpen = false;
6
+ let activeDropdown = undefined;
7
+ const handleDropdown = (id) => {
8
+ isOpen = !isOpen;
9
+ activeDropdown = id;
10
+ };
11
+ </script>
12
+
13
+ <aside class="w-64" aria-label="Sidebar">
14
+ <div class="overflow-y-auto py-4 px-3 bg-gray-50 rounded dark:bg-gray-800">
15
+ {#if site}
16
+ <a href={site.href} class="flex items-center pl-2.5 mb-5">
17
+ <img src={site.img} class="h-6 mr-3 sm:h-7" alt={site.name} />
18
+ <span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white"
19
+ >{site.name}</span
20
+ >
21
+ </a>
22
+ {/if}
23
+ <ul class="space-y-2">
24
+ {#each links as link (link.id)}
25
+ {#if link.children}
26
+ <li>
27
+ <button
28
+ type="button"
29
+ on:click={() => handleDropdown(link.id)}
30
+ class="flex items-center p-2 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700"
31
+ aria-controls="dropdown"
32
+ data-collapse-toggle="dropdown"
33
+ >
34
+ {#if link.icon}
35
+ <svelte:component this={link.icon} className="h-4 w-4 mr-2" />
36
+ {/if}
37
+ <span class="flex-1 ml-3 text-left whitespace-nowrap" sidebar-toggle-item=""
38
+ >{link.name}</span
39
+ >
40
+ <svg
41
+ sidebar-toggle-item=""
42
+ class="w-6 h-6"
43
+ fill="currentColor"
44
+ viewBox="0 0 20 20"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ ><path
47
+ fill-rule="evenodd"
48
+ d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
49
+ clip-rule="evenodd"
50
+ /></svg
51
+ >
52
+ </button>
53
+ {#if isOpen && link.id == activeDropdown}
54
+ <ul id="dropdown" class="py-2 space-y-2" transition:slide={{ duration: 500 }}>
55
+ {#each link.children as child}
56
+ <li>
57
+ <a
58
+ href={child.href}
59
+ rel={child.rel}
60
+ class="flex items-center p-2 pl-11 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700"
61
+ >{child.name}</a
62
+ >
63
+ </li>
64
+ {/each}
65
+ </ul>
66
+ {/if}
67
+ </li>
68
+ {:else}
69
+ <li>
70
+ <a
71
+ href={link.href}
72
+ rel={link.rel}
73
+ class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"
74
+ >
75
+ {#if link.icon}
76
+ <svelte:component this={link.icon} className="h-4 w-4 mr-2" />
77
+ {/if}
78
+ <span class="ml-3">{link.name}</span>
79
+ {#if link.subtext}
80
+ {@html link.subtext}
81
+ {/if}
82
+ </a>
83
+ </li>
84
+ {/if}
85
+ {/each}
86
+ </ul>
87
+ {#if cta}
88
+ <div id="dropdown-cta" class="p-4 mt-6 bg-blue-50 rounded-lg dark:bg-blue-900" role="alert">
89
+ <div class="flex items-center mb-3">
90
+ <span
91
+ class="bg-orange-100 text-orange-800 text-sm font-semibold mr-2 px-2.5 py-0.5 rounded dark:bg-orange-200 dark:text-orange-900"
92
+ >{cta.label}</span
93
+ >
94
+ </div>
95
+ <p class="mb-3 text-sm text-blue-900 dark:text-blue-400">
96
+ {cta.text}
97
+ </p>
98
+ </div>
99
+ {/if}
100
+ </div>
101
+ </aside>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { SiteType, SidebarType, SidebarCtaType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ site: SiteType;
6
+ links: SidebarType[];
7
+ cta: SidebarCtaType;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {};
13
+ };
14
+ export declare type SidebarProps = typeof __propDef.props;
15
+ export declare type SidebarEvents = typeof __propDef.events;
16
+ export declare type SidebarSlots = typeof __propDef.slots;
17
+ export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
18
+ }
19
+ export {};
@@ -30,9 +30,13 @@ export let tabs;
30
30
  role="tabpanel"
31
31
  aria-labelledby="{name}-tab"
32
32
  >
33
- <p class="text-sm text-gray-500 dark:text-gray-400">
34
- {content}
35
- </p>
33
+ {#if typeof content === 'string'}
34
+ <p class="text-sm text-gray-500 dark:text-gray-400">
35
+ {content}
36
+ </p>
37
+ {:else}
38
+ <svelte:component this={content} />
39
+ {/if}
36
40
  </div>
37
41
  {/if}
38
42
  {/each}
@@ -0,0 +1,6 @@
1
+ <script >export let olClass = 'relative border-l border-gray-200 dark:border-gray-700';
2
+ </script>
3
+
4
+ <ol class={olClass}>
5
+ <slot />
6
+ </ol>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ olClass?: string;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {
10
+ default: {};
11
+ };
12
+ };
13
+ export declare type ActivityProps = typeof __propDef.props;
14
+ export declare type ActivityEvents = typeof __propDef.events;
15
+ export declare type ActivitySlots = typeof __propDef.slots;
16
+ export default class Activity extends SvelteComponentTyped<ActivityProps, ActivityEvents, ActivitySlots> {
17
+ }
18
+ export {};
@@ -0,0 +1,29 @@
1
+ <script >export let activities;
2
+ </script>
3
+
4
+ {#each activities as { title, date, src, alt, text }}
5
+ <li class="mb-10 ml-6">
6
+ <span
7
+ class="flex absolute -left-3 justify-center items-center w-6 h-6 bg-blue-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-blue-900"
8
+ >
9
+ <img class="rounded-full shadow-lg" {src} {alt} />
10
+ </span>
11
+ <div
12
+ class="p-4 bg-white rounded-lg border border-gray-200 shadow-sm dark:bg-gray-700 dark:border-gray-600"
13
+ >
14
+ <div class="justify-between items-center mb-3 sm:flex">
15
+ <time class="mb-1 text-xs font-normal text-gray-400 sm:order-last sm:mb-0">{date}</time>
16
+ <div class="text-sm font-normal text-gray-500 lex dark:text-gray-300">
17
+ {@html title}
18
+ </div>
19
+ </div>
20
+ {#if text}
21
+ <div
22
+ class="p-3 text-xs italic font-normal text-gray-500 bg-gray-50 rounded-lg border border-gray-200 dark:bg-gray-600 dark:border-gray-500 dark:text-gray-300"
23
+ >
24
+ {@html text}
25
+ </div>
26
+ {/if}
27
+ </div>
28
+ </li>
29
+ {/each}
@@ -0,0 +1,17 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { ActivityType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ activities: ActivityType[];
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export declare type ActivityItemProps = typeof __propDef.props;
13
+ export declare type ActivityItemEvents = typeof __propDef.events;
14
+ export declare type ActivityItemSlots = typeof __propDef.slots;
15
+ export default class ActivityItem extends SvelteComponentTyped<ActivityItemProps, ActivityItemEvents, ActivityItemSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,11 @@
1
+ <script >export let divClass = 'p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700';
2
+ export let timeClass = 'text-lg font-semibold text-gray-900 dark:text-white';
3
+ export let date;
4
+ </script>
5
+
6
+ <div class={divClass}>
7
+ <time class={timeClass}>{date}</time>
8
+ <ol class="mt-3 divide-y divider-gray-200 dark:divide-gray-700">
9
+ <slot />
10
+ </ol>
11
+ </div>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ divClass?: string;
5
+ timeClass?: string;
6
+ date: Date | string;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export declare type GroupProps = typeof __propDef.props;
16
+ export declare type GroupEvents = typeof __propDef.events;
17
+ export declare type GroupSlots = typeof __propDef.slots;
18
+ export default class Group extends SvelteComponentTyped<GroupProps, GroupEvents, GroupSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,49 @@
1
+ <script >export let timelines;
2
+ </script>
3
+
4
+ {#each timelines as { title, src, alt, isPrivate, href, comment }}
5
+ <li>
6
+ <a {href} class="block items-center p-3 sm:flex hover:bg-gray-100 dark:hover:bg-gray-700">
7
+ <img class="mr-3 mb-3 w-12 h-12 rounded-full sm:mb-0" {src} {alt} />
8
+ <div class="text-gray-600 dark:text-gray-400">
9
+ <div class="text-base font-normal">
10
+ {@html title}
11
+ </div>
12
+ {#if comment}
13
+ <div class="text-sm font-normal">{comment}</div>
14
+ {/if}
15
+ <span class="inline-flex items-center text-xs font-normal text-gray-500 dark:text-gray-400">
16
+ {#if isPrivate}
17
+ <svg
18
+ class="mr-1 w-3 h-3"
19
+ fill="currentColor"
20
+ viewBox="0 0 20 20"
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ ><path
23
+ fill-rule="evenodd"
24
+ d="M3.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z"
25
+ clip-rule="evenodd"
26
+ /><path
27
+ d="M12.454 16.697L9.75 13.992a4 4 0 01-3.742-3.741L2.335 6.578A9.98 9.98 0 00.458 10c1.274 4.057 5.065 7 9.542 7 .847 0 1.669-.105 2.454-.303z"
28
+ /></svg
29
+ >
30
+ Private
31
+ {:else}
32
+ <svg
33
+ class="mr-1 w-3 h-3"
34
+ fill="currentColor"
35
+ viewBox="0 0 20 20"
36
+ xmlns="http://www.w3.org/2000/svg"
37
+ ><path
38
+ fill-rule="evenodd"
39
+ d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z"
40
+ clip-rule="evenodd"
41
+ /></svg
42
+ >
43
+ Public
44
+ {/if}
45
+ </span>
46
+ </div>
47
+ </a>
48
+ </li>
49
+ {/each}
@@ -0,0 +1,17 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { GroupTimelineType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ timelines: GroupTimelineType[];
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export declare type GroupItemProps = typeof __propDef.props;
13
+ export declare type GroupItemEvents = typeof __propDef.events;
14
+ export declare type GroupItemSlots = typeof __propDef.slots;
15
+ export default class GroupItem extends SvelteComponentTyped<GroupItemProps, GroupItemEvents, GroupItemSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,6 @@
1
+ <script >export let olClass = 'relative border-l border-gray-200 dark:border-gray-700';
2
+ </script>
3
+
4
+ <ol class={olClass}>
5
+ <slot />
6
+ </ol>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ olClass?: string;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {
10
+ default: {};
11
+ };
12
+ };
13
+ export declare type TimelineProps = typeof __propDef.props;
14
+ export declare type TimelineEvents = typeof __propDef.events;
15
+ export declare type TimelineSlots = typeof __propDef.slots;
16
+ export default class Timeline extends SvelteComponentTyped<TimelineProps, TimelineEvents, TimelineSlots> {
17
+ }
18
+ export {};
@@ -0,0 +1,6 @@
1
+ <script >export let olClass = 'items-center sm:flex';
2
+ </script>
3
+
4
+ <ol class={olClass}>
5
+ <slot />
6
+ </ol>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ olClass?: string;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {
10
+ default: {};
11
+ };
12
+ };
13
+ export declare type TimelineHorizontalProps = typeof __propDef.props;
14
+ export declare type TimelineHorizontalEvents = typeof __propDef.events;
15
+ export declare type TimelineHorizontalSlots = typeof __propDef.slots;
16
+ export default class TimelineHorizontal extends SvelteComponentTyped<TimelineHorizontalProps, TimelineHorizontalEvents, TimelineHorizontalSlots> {
17
+ }
18
+ export {};
@@ -0,0 +1,37 @@
1
+ <script >export let timelineItems;
2
+ </script>
3
+
4
+ {#each timelineItems as { date, title, text, href, linkname }}
5
+ <li class="mb-10 ml-4">
6
+ <div
7
+ class="absolute w-3 h-3 bg-gray-200 rounded-full mt-1.5 -left-1.5 border border-white dark:border-gray-900 dark:bg-gray-700"
8
+ />
9
+ <time class="mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500"
10
+ >{date}</time
11
+ >
12
+ <h3 class="text-lg font-semibold text-gray-900 dark:text-white">
13
+ {title}
14
+ </h3>
15
+ <p class="mb-4 text-base font-normal text-gray-500 dark:text-gray-400">
16
+ {text}
17
+ </p>
18
+ {#if href}
19
+ <a
20
+ {href}
21
+ class="inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:outline-none focus:ring-gray-200 focus:text-blue-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700"
22
+ >{linkname}
23
+ <svg
24
+ class="ml-2 w-3 h-3"
25
+ fill="currentColor"
26
+ viewBox="0 0 20 20"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ ><path
29
+ fill-rule="evenodd"
30
+ d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
31
+ clip-rule="evenodd"
32
+ /></svg
33
+ ></a
34
+ >
35
+ {/if}
36
+ </li>
37
+ {/each}
@@ -0,0 +1,17 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { TimelineItemType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ timelineItems: TimelineItemType[];
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export declare type TimelineItemProps = typeof __propDef.props;
13
+ export declare type TimelineItemEvents = typeof __propDef.events;
14
+ export declare type TimelineItemSlots = typeof __propDef.slots;
15
+ export default class TimelineItem extends SvelteComponentTyped<TimelineItemProps, TimelineItemEvents, TimelineItemSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,38 @@
1
+ <script >export let timelineItems;
2
+ </script>
3
+
4
+ {#each timelineItems as { date, title, text, icon }}
5
+ <li class="relative mb-6 sm:mb-0">
6
+ <div class="flex items-center">
7
+ <div
8
+ class="flex z-10 justify-center items-center w-6 h-6 bg-blue-200 rounded-full ring-0 ring-white dark:bg-blue-900 sm:ring-8 dark:ring-gray-900 shrink-0"
9
+ >
10
+ {#if icon}
11
+ <svelte:component this={icon} className="h-4 w-4" />
12
+ {:else}
13
+ <svg
14
+ class="w-3 h-3 text-blue-600 dark:text-blue-300"
15
+ fill="currentColor"
16
+ viewBox="0 0 20 20"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ ><path
19
+ fill-rule="evenodd"
20
+ d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"
21
+ clip-rule="evenodd"
22
+ /></svg
23
+ >
24
+ {/if}
25
+ </div>
26
+ <div class="hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700" />
27
+ </div>
28
+ <div class="mt-3 sm:pr-8">
29
+ <h3 class="text-lg font-semibold text-gray-900 dark:text-white">{title}</h3>
30
+ <time class="block mb-2 text-sm font-normal leading-none text-gray-400 dark:text-gray-500"
31
+ >{date}</time
32
+ >
33
+ <p class="text-base font-normal text-gray-500 dark:text-gray-400">
34
+ {text}
35
+ </p>
36
+ </div>
37
+ </li>
38
+ {/each}
@@ -0,0 +1,17 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { TimelineItemHorizontalType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ timelineItems: TimelineItemHorizontalType[];
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export declare type TimelineItemHorizontalProps = typeof __propDef.props;
13
+ export declare type TimelineItemHorizontalEvents = typeof __propDef.events;
14
+ export declare type TimelineItemHorizontalSlots = typeof __propDef.slots;
15
+ export default class TimelineItemHorizontal extends SvelteComponentTyped<TimelineItemHorizontalProps, TimelineItemHorizontalEvents, TimelineItemHorizontalSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,54 @@
1
+ <script >export let timelineItems;
2
+ </script>
3
+
4
+ {#each timelineItems as { date, title, text, href, linkname, icon }}
5
+ <li class="mb-10 ml-6">
6
+ <span
7
+ class="flex absolute -left-3 justify-center items-center w-6 h-6 bg-blue-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-blue-900"
8
+ >
9
+ {#if icon}
10
+ <svelte:component this={icon} className="h-4 w-4" />
11
+ {:else}
12
+ <svg
13
+ class="w-3 h-3 text-blue-600 dark:text-blue-300"
14
+ fill="currentColor"
15
+ viewBox="0 0 20 20"
16
+ xmlns="http://www.w3.org/2000/svg"
17
+ ><path
18
+ fill-rule="evenodd"
19
+ d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"
20
+ clip-rule="evenodd"
21
+ /></svg
22
+ >
23
+ {/if}
24
+ </span>
25
+
26
+ <h3 class="flex items-center mb-1 text-lg font-semibold text-gray-900 dark:text-white">
27
+ {title}
28
+ </h3>
29
+ <time class="block mb-2 text-sm font-normal leading-none text-gray-400 dark:text-gray-500"
30
+ >{date}</time
31
+ >
32
+ <p class="mb-4 text-base font-normal text-gray-500 dark:text-gray-400">
33
+ {text}
34
+ </p>
35
+ {#if href}
36
+ <a
37
+ {href}
38
+ class="inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:outline-none focus:ring-gray-200 focus:text-blue-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700"
39
+ >{linkname}
40
+ <svg
41
+ class="ml-2 w-3 h-3"
42
+ fill="currentColor"
43
+ viewBox="0 0 20 20"
44
+ xmlns="http://www.w3.org/2000/svg"
45
+ ><path
46
+ fill-rule="evenodd"
47
+ d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
48
+ clip-rule="evenodd"
49
+ /></svg
50
+ ></a
51
+ >
52
+ {/if}
53
+ </li>
54
+ {/each}
@@ -0,0 +1,17 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { TimelineItemVerticalType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ timelineItems: TimelineItemVerticalType[];
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ };
12
+ export declare type TimelineItemVerticalProps = typeof __propDef.props;
13
+ export declare type TimelineItemVerticalEvents = typeof __propDef.events;
14
+ export declare type TimelineItemVerticalSlots = typeof __propDef.slots;
15
+ export default class TimelineItemVertical extends SvelteComponentTyped<TimelineItemVerticalProps, TimelineItemVerticalEvents, TimelineItemVerticalSlots> {
16
+ }
17
+ export {};
@@ -0,0 +1,83 @@
1
+ <script >import { fade, blur, fly, slide } from 'svelte/transition';
2
+ let visible = true;
3
+ const handleHide = () => {
4
+ visible = !visible;
5
+ };
6
+ export let iconColor = 'blue';
7
+ // Export a prop through which you can set a desired transition
8
+ export let transitionType = 'fade';
9
+ // Pass in params
10
+ export let transitionParams = {};
11
+ let iconDivClass;
12
+ export let divClass = 'flex items-center w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800';
13
+ export let textClass = 'ml-3 text-sm font-normal';
14
+ export let btnClass = 'ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700';
15
+ if (iconColor === 'blue') {
16
+ iconDivClass =
17
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-blue-500 bg-blue-100 rounded-lg dark:bg-blue-800 dark:text-blue-200';
18
+ }
19
+ else if (iconColor === 'green') {
20
+ iconDivClass =
21
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200';
22
+ }
23
+ else if (iconColor === 'red') {
24
+ iconDivClass =
25
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200';
26
+ }
27
+ else if (iconColor === 'gray') {
28
+ iconDivClass =
29
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-gray-500 bg-gray-100 rounded-lg dark:bg-gray-800 dark:text-gray-200';
30
+ }
31
+ else if (iconColor === 'purple') {
32
+ iconDivClass =
33
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-purple-500 bg-purple-100 rounded-lg dark:bg-purple-800 dark:text-purple-200';
34
+ }
35
+ else if (iconColor === 'indigo') {
36
+ iconDivClass =
37
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-indigo-500 bg-indigo-100 rounded-lg dark:bg-indigo-800 dark:text-indigo-200';
38
+ }
39
+ else if (iconColor === 'yellow') {
40
+ iconDivClass =
41
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-yellow-500 bg-yellow-100 rounded-lg dark:bg-yellow-800 dark:text-yellow-200';
42
+ }
43
+ else {
44
+ iconDivClass =
45
+ 'inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-blue-500 bg-blue-100 rounded-lg dark:bg-blue-800 dark:text-blue-200';
46
+ }
47
+ // have a custom transition function that returns the desired transition
48
+ function multiple(node, params) {
49
+ switch (transitionType) {
50
+ case 'slide':
51
+ return slide(node, params);
52
+ case 'blur':
53
+ return blur(node, params);
54
+ case 'fly':
55
+ return fly(node, params);
56
+ case 'fade':
57
+ return fade(node, params);
58
+ }
59
+ }
60
+ </script>
61
+
62
+ {#if visible}
63
+ <div transition:multiple={transitionParams} class={divClass} role="alert">
64
+ <div class={iconDivClass}>
65
+ <slot name="icon" />
66
+ </div>
67
+ <div class={textClass}><slot name="text" /></div>
68
+ <button type="button" class={btnClass} on:click={handleHide} aria-label="Close">
69
+ <span class="sr-only">Close</span>
70
+ <svg
71
+ class="w-5 h-5"
72
+ fill="currentColor"
73
+ viewBox="0 0 20 20"
74
+ xmlns="http://www.w3.org/2000/svg"
75
+ ><path
76
+ fill-rule="evenodd"
77
+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
78
+ clip-rule="evenodd"
79
+ /></svg
80
+ >
81
+ </button>
82
+ </div>
83
+ {/if}
@@ -0,0 +1,25 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { Colors, TransitionTypes } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ iconColor?: Colors;
6
+ transitionType?: TransitionTypes;
7
+ transitionParams?: {};
8
+ divClass?: string;
9
+ textClass?: string;
10
+ btnClass?: string;
11
+ };
12
+ events: {
13
+ [evt: string]: CustomEvent<any>;
14
+ };
15
+ slots: {
16
+ icon: {};
17
+ text: {};
18
+ };
19
+ };
20
+ export declare type ToastProps = typeof __propDef.props;
21
+ export declare type ToastEvents = typeof __propDef.events;
22
+ export declare type ToastSlots = typeof __propDef.slots;
23
+ export default class Toast extends SvelteComponentTyped<ToastProps, ToastEvents, ToastSlots> {
24
+ }
25
+ export {};