flowbite-svelte 0.11.1 → 0.12.2
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 +24 -4
- package/cards/InteractiveCard.svelte +3 -3
- package/index.d.ts +15 -1
- package/index.js +18 -2
- package/modals/ExtraLargeModal.svelte +2 -2
- package/modals/ExtraLargeModal.svelte.d.ts +2 -1
- package/modals/LargeModal.svelte +2 -2
- package/modals/LargeModal.svelte.d.ts +2 -1
- package/modals/MediumModal.svelte +2 -2
- package/modals/MediumModal.svelte.d.ts +2 -1
- package/modals/SignInModal.svelte +2 -2
- package/modals/SignInModal.svelte.d.ts +2 -1
- package/modals/SmallModal.svelte +2 -2
- package/modals/SmallModal.svelte.d.ts +2 -1
- package/navbar/DropdownNavbar.svelte +10 -42
- package/navbar/NavDropdown.svelte +41 -0
- package/navbar/NavDropdown.svelte.d.ts +22 -0
- package/navbar/Navbar.svelte +2 -2
- package/navbar/Navbar.svelte.d.ts +1 -1
- package/package.json +17 -1
- package/paginations/Next.svelte +28 -0
- package/paginations/Next.svelte.d.ts +19 -0
- package/paginations/Pagination.svelte +67 -0
- package/paginations/Pagination.svelte.d.ts +27 -0
- package/paginations/Previous.svelte +28 -0
- package/paginations/Previous.svelte.d.ts +19 -0
- package/paginations/TableData.svelte +28 -0
- package/paginations/TableData.svelte.d.ts +25 -0
- package/sidebars/Sidebar.svelte +2 -49
- package/sidebars/SidebarDropdown.svelte +50 -0
- package/sidebars/SidebarDropdown.svelte.d.ts +17 -0
- package/tabs/FullWidthTabs.svelte +31 -0
- package/tabs/FullWidthTabs.svelte.d.ts +18 -0
- package/tabs/IconTabs.svelte +24 -0
- package/tabs/IconTabs.svelte.d.ts +18 -0
- package/tabs/InteractiveTabHead.svelte +53 -0
- package/tabs/InteractiveTabHead.svelte.d.ts +37 -0
- package/tabs/InteractiveTabs.svelte +1 -1
- package/tabs/TabContent.svelte +32 -0
- package/tabs/TabContent.svelte.d.ts +36 -0
- package/tabs/UnderlineTabs.svelte +20 -0
- package/tabs/UnderlineTabs.svelte.d.ts +18 -0
- package/tabs/tabStore.d.ts +2 -0
- package/tabs/tabStore.js +2 -0
- package/timelines/Activity.svelte +6 -0
- package/timelines/Activity.svelte.d.ts +18 -0
- package/timelines/ActivityItem.svelte +29 -0
- package/timelines/ActivityItem.svelte.d.ts +17 -0
- package/timelines/Group.svelte +11 -0
- package/timelines/Group.svelte.d.ts +20 -0
- package/timelines/GroupItem.svelte +49 -0
- package/timelines/GroupItem.svelte.d.ts +17 -0
- package/timelines/TimelineItemHorizontal.svelte +16 -20
- package/timelines/TimelineItemHorizontal.svelte.d.ts +2 -2
- package/timelines/TimelineItemVertical.svelte +15 -1
- package/types.d.ts +37 -2
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
[Accordions](https://flowbite-svelte.vercel.app/accordions)
|
|
12
12
|
|
|
13
|
+
## Avatar components
|
|
14
|
+
|
|
15
|
+
[Avatar](https://flowbite-svelte.vercel.app/avatar)
|
|
16
|
+
|
|
13
17
|
## Alert components
|
|
14
18
|
|
|
15
19
|
[Alerts](https://flowbite-svelte.vercel.app/alerts)
|
|
@@ -30,7 +34,7 @@
|
|
|
30
34
|
|
|
31
35
|
[Cards](https://flowbite-svelte.vercel.app/cards)
|
|
32
36
|
|
|
33
|
-
## Dark mode
|
|
37
|
+
## Dark mode components
|
|
34
38
|
|
|
35
39
|
[Dark mode](https://flowbite-svelte.vercel.app/darkmode)
|
|
36
40
|
|
|
@@ -42,15 +46,15 @@
|
|
|
42
46
|
|
|
43
47
|
[Forms](https://flowbite-svelte.vercel.app/forms)
|
|
44
48
|
|
|
45
|
-
## Footer
|
|
49
|
+
## Footer components
|
|
46
50
|
|
|
47
51
|
[Footer](https://flowbite-svelte.vercel.app/footer)
|
|
48
52
|
|
|
49
|
-
## Icons
|
|
53
|
+
## Icons components
|
|
50
54
|
|
|
51
55
|
[Icons](https://flowbite-svelte.vercel.app/icons)
|
|
52
56
|
|
|
53
|
-
## List group
|
|
57
|
+
## List group components
|
|
54
58
|
|
|
55
59
|
[List group](https://flowbite-svelte.vercel.app/list-group)
|
|
56
60
|
|
|
@@ -62,6 +66,14 @@
|
|
|
62
66
|
|
|
63
67
|
[Navbars](https://flowbite-svelte.vercel.app/navbar)
|
|
64
68
|
|
|
69
|
+
## Pagination components
|
|
70
|
+
|
|
71
|
+
[Pagination](https://flowbite-svelte.vercel.app/paginations)
|
|
72
|
+
|
|
73
|
+
## Sidebar components
|
|
74
|
+
|
|
75
|
+
[Sidebar](https://flowbite-svelte.vercel.app/sidebars)
|
|
76
|
+
|
|
65
77
|
## Spinner components
|
|
66
78
|
|
|
67
79
|
[Spinners](https://flowbite-svelte.vercel.app/spinners)
|
|
@@ -70,6 +82,14 @@
|
|
|
70
82
|
|
|
71
83
|
[Tabs](https://flowbite-svelte.vercel.app/tabs)
|
|
72
84
|
|
|
85
|
+
## Timeline components
|
|
86
|
+
|
|
87
|
+
[Timeline](https://flowbite-svelte.vercel.app/timelines)
|
|
88
|
+
|
|
89
|
+
## Toast components
|
|
90
|
+
|
|
91
|
+
[Toast](https://flowbite-svelte.vercel.app/toasts)
|
|
92
|
+
|
|
73
93
|
## Tooltip components
|
|
74
94
|
|
|
75
95
|
[Tooltips](https://flowbite-svelte.vercel.app/tooltips)
|
|
@@ -51,11 +51,11 @@ else {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<div class={divClass}>
|
|
54
|
-
<div class="flex justify-end px-4 pt-4">
|
|
54
|
+
<div class="flex justify-end px-4 pt-4 relative">
|
|
55
55
|
<button
|
|
56
56
|
id="dropdownButton"
|
|
57
57
|
on:click={toggleDropdown}
|
|
58
|
-
class="sm:inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5"
|
|
58
|
+
class="hidden sm:inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5"
|
|
59
59
|
type="button"
|
|
60
60
|
>
|
|
61
61
|
<svg
|
|
@@ -73,7 +73,7 @@ else {
|
|
|
73
73
|
id="dropdown"
|
|
74
74
|
class:hidden={isOpen}
|
|
75
75
|
class:block={!isOpen}
|
|
76
|
-
class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute"
|
|
76
|
+
class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute top-16 -right-16"
|
|
77
77
|
>
|
|
78
78
|
<ul class="py-1" aria-labelledby="dropdownButton">
|
|
79
79
|
{#each dropdownLinks as { href, name, rel }}
|
package/index.d.ts
CHANGED
|
@@ -52,16 +52,30 @@ export { default as SignInModal } from "./modals/SignInModal.svelte";
|
|
|
52
52
|
export { default as SmallModal } from "./modals/SmallModal.svelte";
|
|
53
53
|
export { default as Navbar } from "./navbar/Navbar.svelte";
|
|
54
54
|
export { default as DropdownNavbar } from "./navbar/DropdownNavbar.svelte";
|
|
55
|
+
export { default as Pagination } from "./paginations/Pagination.svelte";
|
|
56
|
+
export { default as Previous } from "./paginations/Previous.svelte";
|
|
57
|
+
export { default as Next } from "./paginations/Next.svelte";
|
|
58
|
+
export { default as TableData } from "./paginations/TableData.svelte";
|
|
55
59
|
export { default as Sidebar } from "./sidebars/Sidebar.svelte";
|
|
56
60
|
export { default as Spinner } from "./spinners/Spinner.svelte";
|
|
57
61
|
export { default as SpinnerButton } from "./spinners/SpinnerButton.svelte";
|
|
62
|
+
export { default as InteractiveTabHead } from "./tabs/InteractiveTabHead.svelte";
|
|
58
63
|
export { default as InteractiveTabs } from "./tabs/InteractiveTabs.svelte";
|
|
59
64
|
export { default as DefaultTabs } from "./tabs/DefaultTabs.svelte";
|
|
65
|
+
export { default as FullWidthTabs } from "./tabs/FullWidthTabs.svelte";
|
|
66
|
+
export { default as IconTabs } from "./tabs/IconTabs.svelte";
|
|
60
67
|
export { default as PillTabs } from "./tabs/PillTabs.svelte";
|
|
68
|
+
export { default as TabContent } from "./tabs/TabContent.svelte";
|
|
69
|
+
export { default as UnderlineTabs } from "./tabs/UnderlineTabs.svelte";
|
|
70
|
+
export { default as Group } from "./timelines/Group.svelte";
|
|
71
|
+
export { default as GroupItem } from "./timelines/GroupItem.svelte";
|
|
72
|
+
export { default as Activity } from "./timelines/Activity.svelte";
|
|
73
|
+
export { default as ActivityItem } from "./timelines/ActivityItem.svelte";
|
|
61
74
|
export { default as Timeline } from "./timelines/Timeline.svelte";
|
|
62
75
|
export { default as TimelineItem } from "./timelines/TimelineItem.svelte";
|
|
63
|
-
export { default as
|
|
76
|
+
export { default as TimelineHorizontal } from "./timelines/TimelineHorizontal.svelte";
|
|
64
77
|
export { default as TimelineItemHorizontal } from "./timelines/TimelineItemHorizontal.svelte";
|
|
78
|
+
export { default as TimelineItemVertical } from "./timelines/TimelineItemVertical.svelte";
|
|
65
79
|
export { default as Toast } from "./toasts/Toast.svelte";
|
|
66
80
|
export { default as Tooltip } from "./tooltips/Tooltip.svelte";
|
|
67
81
|
export { default as LightTooltip } from "./tooltips/LightTooltip.svelte";
|
package/index.js
CHANGED
|
@@ -82,6 +82,12 @@ export { default as SmallModal } from'./modals/SmallModal.svelte'
|
|
|
82
82
|
export { default as Navbar } from'./navbar/Navbar.svelte'
|
|
83
83
|
export { default as DropdownNavbar } from'./navbar/DropdownNavbar.svelte'
|
|
84
84
|
|
|
85
|
+
// Pagination
|
|
86
|
+
export { default as Pagination } from './paginations/Pagination.svelte'
|
|
87
|
+
export { default as Previous } from './paginations/Previous.svelte'
|
|
88
|
+
export { default as Next } from './paginations/Next.svelte'
|
|
89
|
+
export { default as TableData } from './paginations/TableData.svelte'
|
|
90
|
+
|
|
85
91
|
// Sidebar
|
|
86
92
|
export { default as Sidebar } from './sidebars/Sidebar.svelte'
|
|
87
93
|
|
|
@@ -90,15 +96,25 @@ export { default as Spinner } from'./spinners/Spinner.svelte'
|
|
|
90
96
|
export { default as SpinnerButton } from'./spinners/SpinnerButton.svelte'
|
|
91
97
|
|
|
92
98
|
// Tabs
|
|
99
|
+
export { default as InteractiveTabHead } from './tabs/InteractiveTabHead.svelte'
|
|
93
100
|
export { default as InteractiveTabs } from'./tabs/InteractiveTabs.svelte'
|
|
94
|
-
export { default as DefaultTabs } from'./tabs/DefaultTabs.svelte'
|
|
101
|
+
export { default as DefaultTabs } from './tabs/DefaultTabs.svelte'
|
|
102
|
+
export { default as FullWidthTabs } from './tabs/FullWidthTabs.svelte'
|
|
103
|
+
export { default as IconTabs } from './tabs/IconTabs.svelte'
|
|
95
104
|
export { default as PillTabs } from './tabs/PillTabs.svelte'
|
|
105
|
+
export { default as TabContent } from './tabs/TabContent.svelte'
|
|
106
|
+
export { default as UnderlineTabs } from './tabs/UnderlineTabs.svelte'
|
|
96
107
|
|
|
97
108
|
// Timeline
|
|
109
|
+
export { default as Group } from './timelines/Group.svelte'
|
|
110
|
+
export { default as GroupItem } from './timelines/GroupItem.svelte'
|
|
111
|
+
export { default as Activity } from './timelines/Activity.svelte'
|
|
112
|
+
export { default as ActivityItem } from './timelines/ActivityItem.svelte'
|
|
98
113
|
export { default as Timeline } from './timelines/Timeline.svelte'
|
|
99
114
|
export { default as TimelineItem } from './timelines/TimelineItem.svelte'
|
|
100
|
-
export { default as
|
|
115
|
+
export { default as TimelineHorizontal } from './timelines/TimelineHorizontal.svelte'
|
|
101
116
|
export { default as TimelineItemHorizontal } from './timelines/TimelineItemHorizontal.svelte'
|
|
117
|
+
export { default as TimelineItemVertical } from './timelines/TimelineItemVertical.svelte'
|
|
102
118
|
|
|
103
119
|
// Toast
|
|
104
120
|
export { default as Toast } from './toasts/Toast.svelte'
|
|
@@ -7,10 +7,10 @@ export let textColor = 'gray';
|
|
|
7
7
|
export let title = 'Terms of Service';
|
|
8
8
|
export let btn1;
|
|
9
9
|
export let btn2;
|
|
10
|
-
const closeModal = () => {
|
|
10
|
+
export const closeModal = () => {
|
|
11
11
|
modalIdStore.update((value) => (value = null));
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
let showModalId;
|
|
14
14
|
modalIdStore.subscribe((value) => {
|
|
15
15
|
showModalId = value;
|
|
16
16
|
});
|
|
@@ -8,7 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
btn1: string;
|
|
10
10
|
btn2: string;
|
|
11
|
-
|
|
11
|
+
closeModal?: () => void;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
handlebtn1: CustomEvent<any>;
|
|
@@ -24,5 +24,6 @@ export declare type ExtraLargeModalProps = typeof __propDef.props;
|
|
|
24
24
|
export declare type ExtraLargeModalEvents = typeof __propDef.events;
|
|
25
25
|
export declare type ExtraLargeModalSlots = typeof __propDef.slots;
|
|
26
26
|
export default class ExtraLargeModal extends SvelteComponentTyped<ExtraLargeModalProps, ExtraLargeModalEvents, ExtraLargeModalSlots> {
|
|
27
|
+
get closeModal(): () => void;
|
|
27
28
|
}
|
|
28
29
|
export {};
|
package/modals/LargeModal.svelte
CHANGED
|
@@ -7,10 +7,10 @@ export let textColor = 'gray';
|
|
|
7
7
|
export let title = 'Terms of Service';
|
|
8
8
|
export let btn1;
|
|
9
9
|
export let btn2;
|
|
10
|
-
const closeModal = () => {
|
|
10
|
+
export const closeModal = () => {
|
|
11
11
|
modalIdStore.update((value) => (value = null));
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
let showModalId;
|
|
14
14
|
modalIdStore.subscribe((value) => {
|
|
15
15
|
showModalId = value;
|
|
16
16
|
});
|
|
@@ -8,7 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
btn1: string;
|
|
10
10
|
btn2: string;
|
|
11
|
-
|
|
11
|
+
closeModal?: () => void;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
handlebtn1: CustomEvent<any>;
|
|
@@ -24,5 +24,6 @@ export declare type LargeModalProps = typeof __propDef.props;
|
|
|
24
24
|
export declare type LargeModalEvents = typeof __propDef.events;
|
|
25
25
|
export declare type LargeModalSlots = typeof __propDef.slots;
|
|
26
26
|
export default class LargeModal extends SvelteComponentTyped<LargeModalProps, LargeModalEvents, LargeModalSlots> {
|
|
27
|
+
get closeModal(): () => void;
|
|
27
28
|
}
|
|
28
29
|
export {};
|
|
@@ -8,10 +8,10 @@ export let textColor = 'gray';
|
|
|
8
8
|
export let title = 'Terms of Service';
|
|
9
9
|
export let btn1;
|
|
10
10
|
export let btn2;
|
|
11
|
-
const closeModal = () => {
|
|
11
|
+
export const closeModal = () => {
|
|
12
12
|
modalIdStore.update((value) => (value = null));
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
let showModalId;
|
|
15
15
|
modalIdStore.subscribe((value) => {
|
|
16
16
|
showModalId = value;
|
|
17
17
|
});
|
|
@@ -8,7 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
btn1: string;
|
|
10
10
|
btn2: string;
|
|
11
|
-
|
|
11
|
+
closeModal?: () => void;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
handlebtn1: CustomEvent<any>;
|
|
@@ -24,5 +24,6 @@ export declare type MediumModalProps = typeof __propDef.props;
|
|
|
24
24
|
export declare type MediumModalEvents = typeof __propDef.events;
|
|
25
25
|
export declare type MediumModalSlots = typeof __propDef.slots;
|
|
26
26
|
export default class MediumModal extends SvelteComponentTyped<MediumModalProps, MediumModalEvents, MediumModalSlots> {
|
|
27
|
+
get closeModal(): () => void;
|
|
27
28
|
}
|
|
28
29
|
export {};
|
|
@@ -7,10 +7,10 @@ export let rememberMe = false;
|
|
|
7
7
|
export let signUp;
|
|
8
8
|
export let action;
|
|
9
9
|
export let emailPlaceholder = 'name@company.com';
|
|
10
|
-
const closeModal = () => {
|
|
10
|
+
export const closeModal = () => {
|
|
11
11
|
modalIdStore.update((value) => (value = null));
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
let showModalId;
|
|
14
14
|
modalIdStore.subscribe((value) => {
|
|
15
15
|
showModalId = value;
|
|
16
16
|
});
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
signUp: string;
|
|
11
11
|
action: string;
|
|
12
12
|
emailPlaceholder?: string;
|
|
13
|
-
|
|
13
|
+
closeModal?: () => void;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -21,5 +21,6 @@ export declare type SignInModalProps = typeof __propDef.props;
|
|
|
21
21
|
export declare type SignInModalEvents = typeof __propDef.events;
|
|
22
22
|
export declare type SignInModalSlots = typeof __propDef.slots;
|
|
23
23
|
export default class SignInModal extends SvelteComponentTyped<SignInModalProps, SignInModalEvents, SignInModalSlots> {
|
|
24
|
+
get closeModal(): () => void;
|
|
24
25
|
}
|
|
25
26
|
export {};
|
package/modals/SmallModal.svelte
CHANGED
|
@@ -7,10 +7,10 @@ export let textColor = 'gray';
|
|
|
7
7
|
export let title = 'Terms of Service';
|
|
8
8
|
export let btn1;
|
|
9
9
|
export let btn2;
|
|
10
|
-
const closeModal = () => {
|
|
10
|
+
export const closeModal = () => {
|
|
11
11
|
modalIdStore.update((value) => (value = null));
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
let showModalId;
|
|
14
14
|
modalIdStore.subscribe((value) => {
|
|
15
15
|
showModalId = value;
|
|
16
16
|
});
|
|
@@ -8,7 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
btn1: string;
|
|
10
10
|
btn2: string;
|
|
11
|
-
|
|
11
|
+
closeModal?: () => void;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
handlebtn1: CustomEvent<any>;
|
|
@@ -24,5 +24,6 @@ export declare type SmallModalProps = typeof __propDef.props;
|
|
|
24
24
|
export declare type SmallModalEvents = typeof __propDef.events;
|
|
25
25
|
export declare type SmallModalSlots = typeof __propDef.slots;
|
|
26
26
|
export default class SmallModal extends SvelteComponentTyped<SmallModalProps, SmallModalEvents, SmallModalSlots> {
|
|
27
|
+
get closeModal(): () => void;
|
|
27
28
|
}
|
|
28
29
|
export {};
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
<script >import { page, session } from '$app/stores';
|
|
2
|
-
|
|
3
|
-
let block = false;
|
|
4
|
-
let activeDropdown = undefined;
|
|
5
|
-
const handleDropdown = (id) => {
|
|
6
|
-
hidden = !hidden;
|
|
7
|
-
block = !block;
|
|
8
|
-
activeDropdown = id;
|
|
9
|
-
};
|
|
2
|
+
import NavDropdown from './NavDropdown.svelte';
|
|
10
3
|
let barHidden = true;
|
|
11
4
|
const handleClickbtn = () => {
|
|
12
5
|
barHidden = !barHidden;
|
|
@@ -65,41 +58,16 @@ export let liButtonClass = `flex justify-between items-center py-2 pr-4 pl-3 w-f
|
|
|
65
58
|
</button>
|
|
66
59
|
<div class="w-full md:block md:w-auto" class:hidden={barHidden} id="mobile-menu">
|
|
67
60
|
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
|
|
68
|
-
{#each menus as {
|
|
61
|
+
{#each menus as { name, href, rel, child }}
|
|
69
62
|
{#if child}
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
><path
|
|
79
|
-
fill-rule="evenodd"
|
|
80
|
-
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"
|
|
81
|
-
clip-rule="evenodd"
|
|
82
|
-
/></svg
|
|
83
|
-
></button
|
|
84
|
-
>
|
|
85
|
-
{#if activeDropdown === id}
|
|
86
|
-
<!-- Dropdown menu -->
|
|
87
|
-
<div
|
|
88
|
-
class:hidden
|
|
89
|
-
class:block
|
|
90
|
-
class={dropdownDiv}
|
|
91
|
-
style="position: absolute; margin: 0px;"
|
|
92
|
-
>
|
|
93
|
-
<ul class="py-1" aria-labelledby="dropdownLargeButton">
|
|
94
|
-
{#each child as item}
|
|
95
|
-
<li>
|
|
96
|
-
<a href={item.href} {rel} class={dropdownLinkClassWithChild}>{item.name}</a>
|
|
97
|
-
</li>
|
|
98
|
-
{/each}
|
|
99
|
-
</ul>
|
|
100
|
-
</div>
|
|
101
|
-
{/if}
|
|
102
|
-
</li>
|
|
63
|
+
<NavDropdown
|
|
64
|
+
{liButtonClass}
|
|
65
|
+
{dropdownDiv}
|
|
66
|
+
{name}
|
|
67
|
+
{child}
|
|
68
|
+
{rel}
|
|
69
|
+
{dropdownLinkClassWithChild}
|
|
70
|
+
/>
|
|
103
71
|
{:else}
|
|
104
72
|
<li>
|
|
105
73
|
<a
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script >export let liButtonClass;
|
|
2
|
+
export let name;
|
|
3
|
+
let hidden = true;
|
|
4
|
+
let block = false;
|
|
5
|
+
export let child;
|
|
6
|
+
const handleDropdown = () => {
|
|
7
|
+
hidden = !hidden;
|
|
8
|
+
block = !block;
|
|
9
|
+
};
|
|
10
|
+
export let dropdownDiv;
|
|
11
|
+
export let dropdownLinkClassWithChild;
|
|
12
|
+
export let rel;
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<li>
|
|
16
|
+
<button on:click={() => handleDropdown()} class={liButtonClass}
|
|
17
|
+
>{name}
|
|
18
|
+
<svg
|
|
19
|
+
class="ml-1 w-4 h-4"
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
viewBox="0 0 20 20"
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
><path
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
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"
|
|
26
|
+
clip-rule="evenodd"
|
|
27
|
+
/></svg
|
|
28
|
+
></button
|
|
29
|
+
>
|
|
30
|
+
|
|
31
|
+
<!-- Dropdown menu -->
|
|
32
|
+
<div class:hidden class:block class={dropdownDiv} style="position: absolute; margin: 0px;">
|
|
33
|
+
<ul class="py-1" aria-labelledby="dropdownLargeButton">
|
|
34
|
+
{#each child as item}
|
|
35
|
+
<li>
|
|
36
|
+
<a href={item.href} {rel} class={dropdownLinkClassWithChild}>{item.name}</a>
|
|
37
|
+
</li>
|
|
38
|
+
{/each}
|
|
39
|
+
</ul>
|
|
40
|
+
</div>
|
|
41
|
+
</li>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { NavbarType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
liButtonClass: string;
|
|
6
|
+
name: string;
|
|
7
|
+
child: NavbarType[];
|
|
8
|
+
dropdownDiv: string;
|
|
9
|
+
dropdownLinkClassWithChild: string;
|
|
10
|
+
rel: string;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {};
|
|
16
|
+
};
|
|
17
|
+
export declare type NavDropdownProps = typeof __propDef.props;
|
|
18
|
+
export declare type NavDropdownEvents = typeof __propDef.events;
|
|
19
|
+
export declare type NavDropdownSlots = typeof __propDef.slots;
|
|
20
|
+
export default class NavDropdown extends SvelteComponentTyped<NavDropdownProps, NavDropdownEvents, NavDropdownSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/navbar/Navbar.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script >import { page, session } from '$app/stores';
|
|
2
|
-
export let
|
|
2
|
+
export let name = 'Svelte Flow';
|
|
3
3
|
export let logo = '/images/mkdir-logo.png';
|
|
4
4
|
export let alt = 'Svelte Flow';
|
|
5
5
|
export let textsize = 'text-sm';
|
|
@@ -19,7 +19,7 @@ export let liLinkClass = `block py-2 pr-4 pl-3 text-gray-700 border-b border-gr
|
|
|
19
19
|
<div class={navDivClass}>
|
|
20
20
|
<a href="/" class="flex">
|
|
21
21
|
<img src={logo} {alt} />
|
|
22
|
-
<span class={spanClass}>{
|
|
22
|
+
<span class={spanClass}>{name}</span>
|
|
23
23
|
</a>
|
|
24
24
|
<button
|
|
25
25
|
on:click={handleClickbtn}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -125,14 +125,30 @@
|
|
|
125
125
|
"./modals/SmallModal.svelte": "./modals/SmallModal.svelte",
|
|
126
126
|
"./modals/modalStores": "./modals/modalStores.js",
|
|
127
127
|
"./navbar/DropdownNavbar.svelte": "./navbar/DropdownNavbar.svelte",
|
|
128
|
+
"./navbar/NavDropdown.svelte": "./navbar/NavDropdown.svelte",
|
|
128
129
|
"./navbar/Navbar.svelte": "./navbar/Navbar.svelte",
|
|
130
|
+
"./paginations/Next.svelte": "./paginations/Next.svelte",
|
|
131
|
+
"./paginations/Pagination.svelte": "./paginations/Pagination.svelte",
|
|
132
|
+
"./paginations/Previous.svelte": "./paginations/Previous.svelte",
|
|
133
|
+
"./paginations/TableData.svelte": "./paginations/TableData.svelte",
|
|
129
134
|
"./sidebars/Sidebar.svelte": "./sidebars/Sidebar.svelte",
|
|
135
|
+
"./sidebars/SidebarDropdown.svelte": "./sidebars/SidebarDropdown.svelte",
|
|
130
136
|
"./spinners/Spinner.svelte": "./spinners/Spinner.svelte",
|
|
131
137
|
"./spinners/SpinnerButton.svelte": "./spinners/SpinnerButton.svelte",
|
|
132
138
|
"./tables/Table.svelte": "./tables/Table.svelte",
|
|
133
139
|
"./tabs/DefaultTabs.svelte": "./tabs/DefaultTabs.svelte",
|
|
140
|
+
"./tabs/FullWidthTabs.svelte": "./tabs/FullWidthTabs.svelte",
|
|
141
|
+
"./tabs/IconTabs.svelte": "./tabs/IconTabs.svelte",
|
|
142
|
+
"./tabs/InteractiveTabHead.svelte": "./tabs/InteractiveTabHead.svelte",
|
|
134
143
|
"./tabs/InteractiveTabs.svelte": "./tabs/InteractiveTabs.svelte",
|
|
135
144
|
"./tabs/PillTabs.svelte": "./tabs/PillTabs.svelte",
|
|
145
|
+
"./tabs/TabContent.svelte": "./tabs/TabContent.svelte",
|
|
146
|
+
"./tabs/UnderlineTabs.svelte": "./tabs/UnderlineTabs.svelte",
|
|
147
|
+
"./tabs/tabStore": "./tabs/tabStore.js",
|
|
148
|
+
"./timelines/Activity.svelte": "./timelines/Activity.svelte",
|
|
149
|
+
"./timelines/ActivityItem.svelte": "./timelines/ActivityItem.svelte",
|
|
150
|
+
"./timelines/Group.svelte": "./timelines/Group.svelte",
|
|
151
|
+
"./timelines/GroupItem.svelte": "./timelines/GroupItem.svelte",
|
|
136
152
|
"./timelines/Timeline.svelte": "./timelines/Timeline.svelte",
|
|
137
153
|
"./timelines/TimelineHorizontal.svelte": "./timelines/TimelineHorizontal.svelte",
|
|
138
154
|
"./timelines/TimelineItem.svelte": "./timelines/TimelineItem.svelte",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script >import { createEventDispatcher } from 'svelte';
|
|
2
|
+
export let icon = false;
|
|
3
|
+
const dispatch = createEventDispatcher();
|
|
4
|
+
const next = () => {
|
|
5
|
+
dispatch('next');
|
|
6
|
+
};
|
|
7
|
+
export let nextClass = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-500 bg-white rounded-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
8
|
+
if (!icon) {
|
|
9
|
+
nextClass += ' ml-3';
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<a href="/" on:click|preventDefault={next} class={nextClass}>
|
|
14
|
+
Next
|
|
15
|
+
{#if icon}
|
|
16
|
+
<svg
|
|
17
|
+
class="ml-2 w-5 h-5"
|
|
18
|
+
fill="currentColor"
|
|
19
|
+
viewBox="0 0 20 20"
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
><path
|
|
22
|
+
fill-rule="evenodd"
|
|
23
|
+
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"
|
|
24
|
+
clip-rule="evenodd"
|
|
25
|
+
/></svg
|
|
26
|
+
>
|
|
27
|
+
{/if}
|
|
28
|
+
</a>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
icon?: boolean;
|
|
5
|
+
nextClass?: string;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
next: CustomEvent<any>;
|
|
9
|
+
} & {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type NextProps = typeof __propDef.props;
|
|
15
|
+
export declare type NextEvents = typeof __propDef.events;
|
|
16
|
+
export declare type NextSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Next extends SvelteComponentTyped<NextProps, NextEvents, NextSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script >import { createEventDispatcher } from 'svelte';
|
|
2
|
+
export let icon = false;
|
|
3
|
+
const dispatch = createEventDispatcher();
|
|
4
|
+
const previous = () => {
|
|
5
|
+
dispatch('previous');
|
|
6
|
+
};
|
|
7
|
+
const next = () => {
|
|
8
|
+
dispatch('next');
|
|
9
|
+
};
|
|
10
|
+
export let pages;
|
|
11
|
+
export let ulClass = 'inline-flex -space-x-px items-center';
|
|
12
|
+
export let pageClass = 'py-2 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
13
|
+
export let previousClass = 'py-2 px-3 ml-0 leading-tight text-gray-500 bg-white rounded-l-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
14
|
+
export let nextClass = 'py-2 px-3 leading-tight text-gray-500 bg-white rounded-r-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
15
|
+
export let iconPreviousClass = 'block py-2 px-3 ml-0 leading-tight text-gray-500 bg-white rounded-l-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
16
|
+
export let iconNextClass = 'block py-2 px-3 leading-tight text-gray-500 bg-white rounded-r-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<nav aria-label="Page navigation">
|
|
20
|
+
<ul class={ulClass}>
|
|
21
|
+
<li>
|
|
22
|
+
{#if icon}
|
|
23
|
+
<a href="/" on:click|preventDefault={previous} class={iconPreviousClass}>
|
|
24
|
+
<span class="sr-only">Previous</span>
|
|
25
|
+
<svg
|
|
26
|
+
class="w-5 h-5"
|
|
27
|
+
fill="currentColor"
|
|
28
|
+
viewBox="0 0 20 20"
|
|
29
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
+
><path
|
|
31
|
+
fill-rule="evenodd"
|
|
32
|
+
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
|
33
|
+
clip-rule="evenodd"
|
|
34
|
+
/></svg
|
|
35
|
+
>
|
|
36
|
+
</a>
|
|
37
|
+
{:else}
|
|
38
|
+
<a href="/" on:click|preventDefault={previous} class={previousClass}>Previous</a>
|
|
39
|
+
{/if}
|
|
40
|
+
</li>
|
|
41
|
+
{#each pages as { pageNum, href }}
|
|
42
|
+
<li>
|
|
43
|
+
<a {href} class={pageClass}>{pageNum}</a>
|
|
44
|
+
</li>
|
|
45
|
+
{/each}
|
|
46
|
+
<li>
|
|
47
|
+
{#if icon}
|
|
48
|
+
<a href="/" on:click|preventDefault={next} class={iconNextClass}>
|
|
49
|
+
<span class="sr-only">Next</span>
|
|
50
|
+
<svg
|
|
51
|
+
class="w-5 h-5"
|
|
52
|
+
fill="currentColor"
|
|
53
|
+
viewBox="0 0 20 20"
|
|
54
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
55
|
+
><path
|
|
56
|
+
fill-rule="evenodd"
|
|
57
|
+
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
|
58
|
+
clip-rule="evenodd"
|
|
59
|
+
/></svg
|
|
60
|
+
>
|
|
61
|
+
</a>
|
|
62
|
+
{:else}
|
|
63
|
+
<a href="/" on:click|preventDefault={next} class={nextClass}>Next</a>
|
|
64
|
+
{/if}
|
|
65
|
+
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
</nav>
|