flowbite-svelte 0.11.0 → 0.12.1

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 (61) hide show
  1. package/README.md +24 -4
  2. package/alerts/Alert.svelte +24 -1
  3. package/alerts/Alert.svelte.d.ts +3 -0
  4. package/badges/BadgeIcon.svelte +1 -1
  5. package/index.d.ts +16 -0
  6. package/index.js +25 -1
  7. package/modals/ExtraLargeModal.svelte +2 -2
  8. package/modals/ExtraLargeModal.svelte.d.ts +2 -1
  9. package/modals/LargeModal.svelte +2 -2
  10. package/modals/LargeModal.svelte.d.ts +2 -1
  11. package/modals/MediumModal.svelte +2 -2
  12. package/modals/MediumModal.svelte.d.ts +2 -1
  13. package/modals/SignInModal.svelte +4 -3
  14. package/modals/SignInModal.svelte.d.ts +3 -1
  15. package/modals/SmallModal.svelte +2 -2
  16. package/modals/SmallModal.svelte.d.ts +2 -1
  17. package/navbar/DropdownNavbar.svelte +10 -42
  18. package/navbar/NavDropdown.svelte +41 -0
  19. package/navbar/NavDropdown.svelte.d.ts +22 -0
  20. package/navbar/Navbar.svelte +2 -2
  21. package/navbar/Navbar.svelte.d.ts +1 -1
  22. package/package.json +21 -1
  23. package/paginations/Next.svelte +28 -0
  24. package/paginations/Next.svelte.d.ts +19 -0
  25. package/paginations/Pagination.svelte +67 -0
  26. package/paginations/Pagination.svelte.d.ts +27 -0
  27. package/paginations/Previous.svelte +28 -0
  28. package/paginations/Previous.svelte.d.ts +19 -0
  29. package/paginations/TableData.svelte +28 -0
  30. package/paginations/TableData.svelte.d.ts +25 -0
  31. package/sidebars/Sidebar.svelte +54 -0
  32. package/sidebars/Sidebar.svelte.d.ts +19 -0
  33. package/sidebars/SidebarDropdown.svelte +50 -0
  34. package/sidebars/SidebarDropdown.svelte.d.ts +17 -0
  35. package/tabs/InteractiveTabHead.svelte +53 -0
  36. package/tabs/InteractiveTabHead.svelte.d.ts +37 -0
  37. package/tabs/InteractiveTabs.svelte +7 -3
  38. package/tabs/TabContent.svelte +32 -0
  39. package/tabs/TabContent.svelte.d.ts +36 -0
  40. package/tabs/tabStore.d.ts +2 -0
  41. package/tabs/tabStore.js +2 -0
  42. package/timelines/Activity.svelte +6 -0
  43. package/timelines/Activity.svelte.d.ts +18 -0
  44. package/timelines/ActivityItem.svelte +29 -0
  45. package/timelines/ActivityItem.svelte.d.ts +17 -0
  46. package/timelines/Group.svelte +11 -0
  47. package/timelines/Group.svelte.d.ts +20 -0
  48. package/timelines/GroupItem.svelte +49 -0
  49. package/timelines/GroupItem.svelte.d.ts +17 -0
  50. package/timelines/Timeline.svelte +6 -0
  51. package/timelines/Timeline.svelte.d.ts +18 -0
  52. package/timelines/TimelineHorizontal.svelte +6 -0
  53. package/timelines/TimelineHorizontal.svelte.d.ts +18 -0
  54. package/timelines/TimelineItem.svelte +37 -0
  55. package/timelines/TimelineItem.svelte.d.ts +17 -0
  56. package/timelines/TimelineItemHorizontal.svelte +38 -0
  57. package/timelines/TimelineItemHorizontal.svelte.d.ts +17 -0
  58. package/timelines/TimelineItemVertical.svelte +54 -0
  59. package/timelines/TimelineItemVertical.svelte.d.ts +17 -0
  60. package/toasts/Toast.svelte +0 -1
  61. package/types.d.ts +59 -2
@@ -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 {};
@@ -1,5 +1,4 @@
1
1
  <script >import { fade, blur, fly, slide } from 'svelte/transition';
2
- import { quintOut } from 'svelte/easing';
3
2
  let visible = true;
4
3
  const handleHide = () => {
5
4
  visible = !visible;
package/types.d.ts CHANGED
@@ -46,7 +46,11 @@ export interface TabType {
46
46
  export interface InteractiveTabType {
47
47
  name: string;
48
48
  id: number;
49
- content: string;
49
+ content: string | typeof SvelteComponent;
50
+ }
51
+ export interface TabHeadType {
52
+ name: string;
53
+ id: number;
50
54
  }
51
55
  export interface PillTabType {
52
56
  name: string;
@@ -54,7 +58,6 @@ export interface PillTabType {
54
58
  href: string;
55
59
  }
56
60
  export interface NavbarType {
57
- id: number;
58
61
  name: string;
59
62
  href: string;
60
63
  rel?: string;
@@ -83,6 +86,19 @@ export interface AuthFieldType {
83
86
  required?: boolean;
84
87
  placeholder?: string;
85
88
  }
89
+ export declare type SidebarType = {
90
+ id: number;
91
+ name: string;
92
+ href?: string;
93
+ icon?: typeof SvelteComponent;
94
+ rel?: string;
95
+ children?: SidebarType[];
96
+ subtext?: HTMLElement;
97
+ };
98
+ export declare type SidebarCtaType = {
99
+ label: string;
100
+ text: HTMLElement;
101
+ };
86
102
  export declare type SelectOptionType = {
87
103
  name: string;
88
104
  value: string;
@@ -97,3 +113,44 @@ export interface AvatarType {
97
113
  text?: string;
98
114
  }
99
115
  export declare type TransitionTypes = 'fade' | 'fly' | 'slide' | 'blur';
116
+ export interface TimelineItemType {
117
+ date: Date | string;
118
+ title: string;
119
+ icon?: typeof SvelteComponent;
120
+ href?: string;
121
+ linkname?: string;
122
+ text?: HTMLElement | string;
123
+ }
124
+ export interface TimelineItemVerticalType {
125
+ date: Date | string;
126
+ title: string;
127
+ icon?: typeof SvelteComponent;
128
+ href?: string;
129
+ linkname?: string;
130
+ text?: HTMLElement | string;
131
+ }
132
+ export interface TimelineItemHorizontalType {
133
+ date: Date | string;
134
+ title: string;
135
+ icon?: typeof SvelteComponent;
136
+ text?: HTMLElement | string;
137
+ }
138
+ export interface ActivityType {
139
+ title: HTMLElement | string;
140
+ date: Date | string;
141
+ src: string;
142
+ alt: string;
143
+ text?: HTMLElement | string;
144
+ }
145
+ export interface GroupTimelineType {
146
+ title: string | HTMLElement;
147
+ src: string;
148
+ alt: string;
149
+ href?: string;
150
+ isPrivate?: boolean;
151
+ comment?: string | HTMLElement;
152
+ }
153
+ export interface PageType {
154
+ pageNum: number;
155
+ href: string;
156
+ }