flowbite-svelte 0.9.3 → 0.9.6
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/accordions/AccordionItem.svelte +1 -1
- package/accordions/AccordionItem.svelte.d.ts +1 -1
- package/auth/Confirm.svelte +23 -0
- package/auth/Confirm.svelte.d.ts +19 -0
- package/auth/ForgotPassword.svelte +57 -0
- package/auth/ForgotPassword.svelte.d.ts +21 -0
- package/auth/Login.svelte +128 -0
- package/auth/Login.svelte.d.ts +25 -0
- package/auth/Register.svelte +116 -0
- package/auth/Register.svelte.d.ts +25 -0
- package/auth/Reset.svelte +57 -0
- package/auth/Reset.svelte.d.ts +22 -0
- package/buttongroups/ButtonGroup.svelte +7 -7
- package/buttongroups/ButtonGroupOutline.svelte +7 -7
- package/buttons/Button.svelte +16 -15
- package/buttons/Button.svelte.d.ts +3 -2
- package/buttons/ColorShadowButton.svelte +2 -1
- package/buttons/ColorShadowButton.svelte.d.ts +2 -1
- package/buttons/GradientDuotoneButton.svelte +2 -1
- package/buttons/GradientDuotoneButton.svelte.d.ts +2 -1
- package/buttons/GradientMonochromeButton.svelte +2 -1
- package/buttons/GradientMonochromeButton.svelte.d.ts +2 -1
- package/buttons/GradientOutlineButton.svelte +2 -1
- package/buttons/GradientOutlineButton.svelte.d.ts +2 -1
- package/cards/Card.svelte +6 -7
- package/cards/Card.svelte.d.ts +5 -4
- package/cards/CtaCard.svelte +4 -5
- package/cards/CtaCard.svelte.d.ts +1 -0
- package/cards/EcommerceCard.svelte +3 -2
- package/cards/EcommerceCard.svelte.d.ts +2 -1
- package/cards/HorizontalCard.svelte +14 -17
- package/cards/HorizontalCard.svelte.d.ts +8 -3
- package/cards/InteractiveCard.svelte +6 -7
- package/cards/InteractiveCard.svelte.d.ts +3 -2
- package/cards/ListCard.svelte +43 -79
- package/cards/ListCard.svelte.d.ts +9 -40
- package/cards/SignInCard.svelte +114 -111
- package/cards/SignInCard.svelte.d.ts +9 -32
- package/dropdowns/DropdownDefault.svelte +84 -93
- package/dropdowns/DropdownDefault.svelte.d.ts +7 -35
- package/footer/LogoFooter.svelte +4 -4
- package/footer/SimpleFooter.svelte +3 -3
- package/footer/SitemapFooter.svelte +5 -5
- package/footer/SitemapFooter.svelte.d.ts +2 -2
- package/footer/SocialMediaFooter.svelte +59 -106
- package/footer/SocialMediaFooter.svelte.d.ts +9 -61
- package/index.d.ts +6 -1
- package/index.js +14 -0
- package/list-group/List.svelte +42 -74
- package/list-group/List.svelte.d.ts +7 -23
- package/navbar/DropdownNavbar.svelte +16 -19
- package/navbar/DropdownNavbar.svelte.d.ts +7 -0
- package/navbar/Navbar.svelte +11 -14
- package/navbar/Navbar.svelte.d.ts +4 -0
- package/package.json +7 -3
- package/spinners/Spinner.svelte +1 -1
- package/spinners/Spinner.svelte.d.ts +1 -1
- package/spinners/SpinnerButton.svelte +1 -1
- package/types.d.ts +20 -7
|
@@ -1,110 +1,63 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
name: "Flowbite",
|
|
24
|
-
link: "/",
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
parent: "LEGAL",
|
|
30
|
-
children: [
|
|
31
|
-
{ name: "Privacy Policy", link: "/" },
|
|
32
|
-
{
|
|
33
|
-
name: "Terms & Conditions",
|
|
34
|
-
link: "/",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
export let socialMedia = [
|
|
40
|
-
{
|
|
41
|
-
link: "/",
|
|
42
|
-
icon: "",
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
export let footerClass = "p-4 bg-white sm:p-6 dark:bg-gray-800";
|
|
46
|
-
export let divClass = "md:flex md:justify-between";
|
|
47
|
-
export let divClass2 = "mb-6 md:mb-0";
|
|
48
|
-
export let siteLinkClass = "flex items-center";
|
|
49
|
-
export let siteNameSpanClass =
|
|
50
|
-
"self-center text-2xl font-semibold whitespace-nowrap dark:text-white";
|
|
51
|
-
export let imgClass = "mr-3 h-8";
|
|
52
|
-
export let linksDivClass = "grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3";
|
|
53
|
-
export let parentClass =
|
|
54
|
-
"mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white";
|
|
55
|
-
export let ulClass = "text-gray-600 dark:text-gray-400";
|
|
56
|
-
export let linkClass = "hover:underline";
|
|
57
|
-
export let hrClass =
|
|
58
|
-
"my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8";
|
|
59
|
-
export let copyrightDivClass = "sm:flex sm:items-center sm:justify-between";
|
|
60
|
-
export let copyrightClass =
|
|
61
|
-
"text-sm text-gray-500 sm:text-center dark:text-gray-400";
|
|
62
|
-
export let socialMediaDivClass =
|
|
63
|
-
"flex mt-4 space-x-6 sm:justify-center sm:mt-0";
|
|
64
|
-
export let socialMediaLinkClass =
|
|
65
|
-
"text-gray-500 hover:text-gray-900 dark:hover:text-white";
|
|
66
|
-
export let iconClass = "h-5 w-5 mr-2";
|
|
67
|
-
export let copyrightYear = "© 2022";
|
|
68
|
-
export let allRightsReserved = "All Rights Reserved.";
|
|
1
|
+
<script >export let site;
|
|
2
|
+
export let links;
|
|
3
|
+
export let socialMedia;
|
|
4
|
+
export let footerClass = 'p-4 bg-white sm:p-6 dark:bg-gray-800';
|
|
5
|
+
export let divClass = 'md:flex md:justify-between';
|
|
6
|
+
export let divClass2 = 'mb-6 md:mb-0';
|
|
7
|
+
export let siteLinkClass = 'flex items-center';
|
|
8
|
+
export let siteNameSpanClass = 'self-center text-2xl font-semibold whitespace-nowrap dark:text-white';
|
|
9
|
+
export let imgClass = 'mr-3 h-8';
|
|
10
|
+
export let linksDivClass = 'grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3';
|
|
11
|
+
export let parentClass = 'mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white';
|
|
12
|
+
export let ulClass = 'text-gray-600 dark:text-gray-400';
|
|
13
|
+
export let linkClass = 'hover:underline';
|
|
14
|
+
export let hrClass = 'my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8';
|
|
15
|
+
export let copyrightDivClass = 'sm:flex sm:items-center sm:justify-between';
|
|
16
|
+
export let copyrightClass = 'text-sm text-gray-500 sm:text-center dark:text-gray-400';
|
|
17
|
+
export let socialMediaDivClass = 'flex mt-4 space-x-6 sm:justify-center sm:mt-0';
|
|
18
|
+
export let socialMediaLinkClass = 'text-gray-500 hover:text-gray-900 dark:hover:text-white';
|
|
19
|
+
export let iconClass = 'h-5 w-5 mr-2';
|
|
20
|
+
export let copyrightYear = '© 2022';
|
|
21
|
+
export let allRightsReserved = 'All Rights Reserved.';
|
|
69
22
|
</script>
|
|
70
23
|
|
|
71
24
|
<footer class={footerClass}>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
25
|
+
<div class={divClass}>
|
|
26
|
+
<div class={divClass2}>
|
|
27
|
+
<a href={site.href} class={siteLinkClass}>
|
|
28
|
+
<img src={site.img} class={imgClass} alt={site.name} />
|
|
29
|
+
<span class={siteNameSpanClass}>{site.name}</span>
|
|
30
|
+
</a>
|
|
31
|
+
</div>
|
|
32
|
+
<div class={linksDivClass}>
|
|
33
|
+
{#each links as { parent, children }}
|
|
34
|
+
<div>
|
|
35
|
+
<h2 class={parentClass}>
|
|
36
|
+
{parent}
|
|
37
|
+
</h2>
|
|
38
|
+
<ul class={ulClass}>
|
|
39
|
+
{#each children as { name, href }}
|
|
40
|
+
<li class="mb-4">
|
|
41
|
+
<a {href} class={linkClass}>{name}</a>
|
|
42
|
+
</li>
|
|
43
|
+
{/each}
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
{/each}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<hr class={hrClass} />
|
|
50
|
+
<div class={copyrightDivClass}>
|
|
51
|
+
<span class={copyrightClass}
|
|
52
|
+
>{copyrightYear}
|
|
53
|
+
<a href={site.href} class="hover:underline">{site.name}</a>. {allRightsReserved}
|
|
54
|
+
</span>
|
|
55
|
+
<div class={socialMediaDivClass}>
|
|
56
|
+
{#each socialMedia as { href, icon }}
|
|
57
|
+
<a {href} class={socialMediaLinkClass}>
|
|
58
|
+
<svelte:component this={icon} className={iconClass} />
|
|
59
|
+
</a>
|
|
60
|
+
{/each}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
110
63
|
</footer>
|
|
@@ -1,67 +1,10 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SocialMediaFooterProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SocialMediaFooterEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SocialMediaFooterSlots */
|
|
4
|
-
export default class SocialMediaFooter extends SvelteComponentTyped<{
|
|
5
|
-
site?: {
|
|
6
|
-
link: string;
|
|
7
|
-
name: string;
|
|
8
|
-
img: string;
|
|
9
|
-
};
|
|
10
|
-
links?: {
|
|
11
|
-
parent: string;
|
|
12
|
-
children: {
|
|
13
|
-
name: string;
|
|
14
|
-
link: string;
|
|
15
|
-
}[];
|
|
16
|
-
}[];
|
|
17
|
-
socialMedia?: {
|
|
18
|
-
link: string;
|
|
19
|
-
icon: string;
|
|
20
|
-
}[];
|
|
21
|
-
footerClass?: string;
|
|
22
|
-
divClass?: string;
|
|
23
|
-
divClass2?: string;
|
|
24
|
-
siteLinkClass?: string;
|
|
25
|
-
siteNameSpanClass?: string;
|
|
26
|
-
imgClass?: string;
|
|
27
|
-
linksDivClass?: string;
|
|
28
|
-
parentClass?: string;
|
|
29
|
-
ulClass?: string;
|
|
30
|
-
linkClass?: string;
|
|
31
|
-
hrClass?: string;
|
|
32
|
-
copyrightDivClass?: string;
|
|
33
|
-
copyrightClass?: string;
|
|
34
|
-
socialMediaDivClass?: string;
|
|
35
|
-
socialMediaLinkClass?: string;
|
|
36
|
-
iconClass?: string;
|
|
37
|
-
copyrightYear?: string;
|
|
38
|
-
allRightsReserved?: string;
|
|
39
|
-
}, {
|
|
40
|
-
[evt: string]: CustomEvent<any>;
|
|
41
|
-
}, {}> {
|
|
42
|
-
}
|
|
43
|
-
export type SocialMediaFooterProps = typeof __propDef.props;
|
|
44
|
-
export type SocialMediaFooterEvents = typeof __propDef.events;
|
|
45
|
-
export type SocialMediaFooterSlots = typeof __propDef.slots;
|
|
46
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { SocialMediaLinkType, SocialMediaType, SiteType } from '../types';
|
|
47
3
|
declare const __propDef: {
|
|
48
4
|
props: {
|
|
49
|
-
site
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
img: string;
|
|
53
|
-
};
|
|
54
|
-
links?: {
|
|
55
|
-
parent: string;
|
|
56
|
-
children: {
|
|
57
|
-
name: string;
|
|
58
|
-
link: string;
|
|
59
|
-
}[];
|
|
60
|
-
}[];
|
|
61
|
-
socialMedia?: {
|
|
62
|
-
link: string;
|
|
63
|
-
icon: string;
|
|
64
|
-
}[];
|
|
5
|
+
site: SiteType;
|
|
6
|
+
links: SocialMediaLinkType[];
|
|
7
|
+
socialMedia: SocialMediaType[];
|
|
65
8
|
footerClass?: string;
|
|
66
9
|
divClass?: string;
|
|
67
10
|
divClass2?: string;
|
|
@@ -86,4 +29,9 @@ declare const __propDef: {
|
|
|
86
29
|
};
|
|
87
30
|
slots: {};
|
|
88
31
|
};
|
|
32
|
+
export declare type SocialMediaFooterProps = typeof __propDef.props;
|
|
33
|
+
export declare type SocialMediaFooterEvents = typeof __propDef.events;
|
|
34
|
+
export declare type SocialMediaFooterSlots = typeof __propDef.slots;
|
|
35
|
+
export default class SocialMediaFooter extends SvelteComponentTyped<SocialMediaFooterProps, SocialMediaFooterEvents, SocialMediaFooterSlots> {
|
|
36
|
+
}
|
|
89
37
|
export {};
|
package/index.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ import AccordionItem from "./accordions/AccordionItem.svelte";
|
|
|
3
3
|
import Alert from "./alerts/Alert.svelte";
|
|
4
4
|
import BorderAlert from "./alerts/BorderAlert.svelte";
|
|
5
5
|
import InfoAlert from "./alerts/InfoAlert.svelte";
|
|
6
|
+
import Confirm from "./auth/Confirm.svelte";
|
|
7
|
+
import ForgotPassword from "./auth/ForgotPassword.svelte";
|
|
8
|
+
import Login from "./auth/Login.svelte";
|
|
9
|
+
import Register from "./auth/Register.svelte";
|
|
10
|
+
import Reset from "./auth/Reset.svelte";
|
|
6
11
|
import Badge from "./badges/Badge.svelte";
|
|
7
12
|
import BadgeIcon from "./badges/BadgeIcon.svelte";
|
|
8
13
|
import BadgeLink from "./badges/BadgeLink.svelte";
|
|
@@ -43,4 +48,4 @@ import DefaultTabs from "./tabs/DefaultTabs.svelte";
|
|
|
43
48
|
import PillTabs from "./tabs/PillTabs.svelte";
|
|
44
49
|
import Tooltip from "./tooltips/Tooltip.svelte";
|
|
45
50
|
import LightTooltip from "./tooltips/LightTooltip.svelte";
|
|
46
|
-
export { Accordion, AccordionItem, Alert, BorderAlert, InfoAlert, Badge, BadgeIcon, BadgeLink, Button, ColorShadowButton, GradientDuotoneButton, GradientMonochromeButton, GradientOutlineButton, ButtonGroup, ButtonGroupOutline, Card, HorizontalCard, InteractiveCard, ListCard, CtaCard, EcommerceCard, SignInCard, DarkMode, Dropdown, SimpleFooter, LogoFooter, SocialMediaFooter, SitemapFooter, List, modalIdStore, ExtraLargeModal, LargeModal, MediumModal, ModalButton, SignInModal, SmallModal, Navbar, DropdownNavbar, Spinner, SpinnerButton, InteractiveTabs, DefaultTabs, PillTabs, Tooltip, LightTooltip };
|
|
51
|
+
export { Accordion, AccordionItem, Alert, BorderAlert, InfoAlert, Confirm, ForgotPassword, Login, Register, Reset, Badge, BadgeIcon, BadgeLink, Button, ColorShadowButton, GradientDuotoneButton, GradientMonochromeButton, GradientOutlineButton, ButtonGroup, ButtonGroupOutline, Card, HorizontalCard, InteractiveCard, ListCard, CtaCard, EcommerceCard, SignInCard, DarkMode, Dropdown, SimpleFooter, LogoFooter, SocialMediaFooter, SitemapFooter, List, modalIdStore, ExtraLargeModal, LargeModal, MediumModal, ModalButton, SignInModal, SmallModal, Navbar, DropdownNavbar, Spinner, SpinnerButton, InteractiveTabs, DefaultTabs, PillTabs, Tooltip, LightTooltip };
|
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// Accordion
|
|
1
2
|
import Accordion from './accordions/AccordionDefault.svelte'
|
|
2
3
|
import AccordionItem from './accordions/AccordionItem.svelte'
|
|
3
4
|
|
|
@@ -6,6 +7,13 @@ import Alert from './alerts/Alert.svelte'
|
|
|
6
7
|
import BorderAlert from './alerts/BorderAlert.svelte'
|
|
7
8
|
import InfoAlert from './alerts/InfoAlert.svelte'
|
|
8
9
|
|
|
10
|
+
// Auth
|
|
11
|
+
import Confirm from './auth/Confirm.svelte'
|
|
12
|
+
import ForgotPassword from './auth/ForgotPassword.svelte'
|
|
13
|
+
import Login from './auth/Login.svelte'
|
|
14
|
+
import Register from './auth/Register.svelte'
|
|
15
|
+
import Reset from './auth/Reset.svelte'
|
|
16
|
+
|
|
9
17
|
// Badges
|
|
10
18
|
import Badge from './badges/Badge.svelte'
|
|
11
19
|
import BadgeIcon from './badges/BadgeIcon.svelte'
|
|
@@ -80,6 +88,12 @@ export {
|
|
|
80
88
|
Alert,
|
|
81
89
|
BorderAlert,
|
|
82
90
|
InfoAlert,
|
|
91
|
+
// auth
|
|
92
|
+
Confirm,
|
|
93
|
+
ForgotPassword,
|
|
94
|
+
Login,
|
|
95
|
+
Register,
|
|
96
|
+
Reset,
|
|
83
97
|
// Badges
|
|
84
98
|
Badge,
|
|
85
99
|
BadgeIcon,
|
package/list-group/List.svelte
CHANGED
|
@@ -1,79 +1,47 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
link: "/profile",
|
|
7
|
-
rel: "",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
title: "Settings",
|
|
11
|
-
icon: "",
|
|
12
|
-
link: "/settings",
|
|
13
|
-
rel: "",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
title: "Messages",
|
|
17
|
-
icon: "",
|
|
18
|
-
link: "/message",
|
|
19
|
-
rel: "",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: "Download",
|
|
23
|
-
icon: "",
|
|
24
|
-
link: "/download",
|
|
25
|
-
rel: "",
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
// let len = count($lists);
|
|
29
|
-
// top rounded-t-lg border-b border-gray-200
|
|
30
|
-
// middle border-b border-gray-200
|
|
31
|
-
// bottom rounded-b-lg
|
|
32
|
-
const common =
|
|
33
|
-
"inline-flex relative items-center py-2 px-4 w-full text-sm font-medium hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:ring-gray-500 dark:focus:text-white";
|
|
34
|
-
const topClass = `${common} rounded-t-lg border-b border-gray-200`;
|
|
35
|
-
const bottomClass = `${common} rounded-b-lg`;
|
|
36
|
-
const middleClass = `${common} border-b border-gray-200`;
|
|
37
|
-
let listClass;
|
|
1
|
+
<script >export let lists;
|
|
2
|
+
const common = 'inline-flex relative items-center py-2 px-4 w-full text-sm font-medium hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:ring-gray-500 dark:focus:text-white';
|
|
3
|
+
const topClass = `${common} rounded-t-lg border-b border-gray-200`;
|
|
4
|
+
const bottomClass = `${common} rounded-b-lg`;
|
|
5
|
+
const middleClass = `${common} border-b border-gray-200`;
|
|
38
6
|
</script>
|
|
39
7
|
|
|
40
8
|
<div
|
|
41
|
-
|
|
9
|
+
class="w-48 text-gray-900 bg-white rounded-lg border border-gray-200 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
|
|
42
10
|
>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
11
|
+
{#each lists as { name, icon, href, rel }, i}
|
|
12
|
+
{#if i === 0}
|
|
13
|
+
<button type="button" class={topClass}>
|
|
14
|
+
{#if icon}
|
|
15
|
+
<svelte:component this={icon} className="h-4 w-4 mr-2" />
|
|
16
|
+
{/if}
|
|
17
|
+
{#if href}
|
|
18
|
+
<a {href} {rel}>{name}</a>
|
|
19
|
+
{:else}
|
|
20
|
+
{name} here
|
|
21
|
+
{/if}
|
|
22
|
+
</button>
|
|
23
|
+
{:else if i === lists.length - 1}
|
|
24
|
+
<button type="button" class={bottomClass}>
|
|
25
|
+
{#if icon}
|
|
26
|
+
<svelte:component this={icon} className="h-4 w-4 mr-2" />
|
|
27
|
+
{/if}
|
|
28
|
+
{#if href}
|
|
29
|
+
<a {href} {rel}>{name}</a>
|
|
30
|
+
{:else}
|
|
31
|
+
{name}
|
|
32
|
+
{/if}
|
|
33
|
+
</button>
|
|
34
|
+
{:else}
|
|
35
|
+
<button type="button" class={middleClass}>
|
|
36
|
+
{#if icon}
|
|
37
|
+
<svelte:component this={icon} className="h-4 w-4 mr-2" />
|
|
38
|
+
{/if}
|
|
39
|
+
{#if href}
|
|
40
|
+
<a {href} {rel}>{name}</a>
|
|
41
|
+
{:else}
|
|
42
|
+
{name}
|
|
43
|
+
{/if}
|
|
44
|
+
</button>
|
|
45
|
+
{/if}
|
|
46
|
+
{/each}
|
|
79
47
|
</div>
|
|
@@ -1,33 +1,17 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ListProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ListEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ListSlots */
|
|
4
|
-
export default class List extends SvelteComponentTyped<{
|
|
5
|
-
lists?: {
|
|
6
|
-
title: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
link: string;
|
|
9
|
-
rel: string;
|
|
10
|
-
}[];
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}> {
|
|
14
|
-
}
|
|
15
|
-
export type ListProps = typeof __propDef.props;
|
|
16
|
-
export type ListEvents = typeof __propDef.events;
|
|
17
|
-
export type ListSlots = typeof __propDef.slots;
|
|
18
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ButtonGroupType } from '../types';
|
|
19
3
|
declare const __propDef: {
|
|
20
4
|
props: {
|
|
21
|
-
lists
|
|
22
|
-
title: string;
|
|
23
|
-
icon: string;
|
|
24
|
-
link: string;
|
|
25
|
-
rel: string;
|
|
26
|
-
}[];
|
|
5
|
+
lists: ButtonGroupType[];
|
|
27
6
|
};
|
|
28
7
|
events: {
|
|
29
8
|
[evt: string]: CustomEvent<any>;
|
|
30
9
|
};
|
|
31
10
|
slots: {};
|
|
32
11
|
};
|
|
12
|
+
export declare type ListProps = typeof __propDef.props;
|
|
13
|
+
export declare type ListEvents = typeof __propDef.events;
|
|
14
|
+
export declare type ListSlots = typeof __propDef.slots;
|
|
15
|
+
export default class List extends SvelteComponentTyped<ListProps, ListEvents, ListSlots> {
|
|
16
|
+
}
|
|
33
17
|
export {};
|
|
@@ -16,21 +16,26 @@ export let logo = '/images/mkdir-logo.png';
|
|
|
16
16
|
export let alt;
|
|
17
17
|
export let textsize = 'text-sm';
|
|
18
18
|
export let menus;
|
|
19
|
+
export let navClass = 'px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700';
|
|
20
|
+
const navDivClass = 'container flex flex-wrap justify-between items-center mx-auto';
|
|
21
|
+
export let spanClass = 'self-center text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white';
|
|
22
|
+
export let buttonClass = 'inline-flex justify-center items-center ml-3 text-gray-400 rounded-lg md:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500';
|
|
23
|
+
export let dropdownDiv = 'z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 dark:divide-gray-600';
|
|
24
|
+
export let dropdownLinkClassWithChild = `block py-2 px-4 ${textsize} text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400 dark:hover:text-white`;
|
|
25
|
+
export let dropdownLinkClassWithoutChild = `block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent ${textsize}`;
|
|
26
|
+
export let liButtonClass = `flex justify-between items-center py-2 pr-4 pl-3 w-full ${textsize} font-medium text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 md:w-auto dark:text-gray-400 dark:hover:text-white dark:focus:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent`;
|
|
19
27
|
</script>
|
|
20
28
|
|
|
21
|
-
<nav class=
|
|
22
|
-
<div class=
|
|
29
|
+
<nav class={navClass}>
|
|
30
|
+
<div class={navDivClass}>
|
|
23
31
|
<a href="/" class="flex">
|
|
24
32
|
<img src={logo} {alt} />
|
|
25
|
-
<span
|
|
26
|
-
class="self-center text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white"
|
|
27
|
-
>{sitename}</span
|
|
28
|
-
>
|
|
33
|
+
<span class={spanClass}>{sitename}</span>
|
|
29
34
|
</a>
|
|
30
35
|
<button
|
|
31
36
|
on:click={handleClickbtn}
|
|
32
37
|
type="button"
|
|
33
|
-
class=
|
|
38
|
+
class={buttonClass}
|
|
34
39
|
aria-controls="mobile-menu-2"
|
|
35
40
|
aria-expanded="false"
|
|
36
41
|
>
|
|
@@ -63,9 +68,7 @@ export let menus;
|
|
|
63
68
|
{#each menus as { id, name, href, rel, child }}
|
|
64
69
|
{#if child}
|
|
65
70
|
<li>
|
|
66
|
-
<button
|
|
67
|
-
on:click={() => handleDropdown(id)}
|
|
68
|
-
class="flex justify-between items-center py-2 pr-4 pl-3 w-full {textsize} font-medium text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 md:w-auto dark:text-gray-400 dark:hover:text-white dark:focus:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent"
|
|
71
|
+
<button on:click={() => handleDropdown(id)} class={liButtonClass}
|
|
69
72
|
>{name}
|
|
70
73
|
<svg
|
|
71
74
|
class="ml-1 w-4 h-4"
|
|
@@ -84,18 +87,13 @@ export let menus;
|
|
|
84
87
|
<div
|
|
85
88
|
class:hidden
|
|
86
89
|
class:block
|
|
87
|
-
class=
|
|
90
|
+
class={dropdownDiv}
|
|
88
91
|
style="position: absolute; margin: 0px;"
|
|
89
92
|
>
|
|
90
93
|
<ul class="py-1" aria-labelledby="dropdownLargeButton">
|
|
91
94
|
{#each child as item}
|
|
92
95
|
<li>
|
|
93
|
-
<a
|
|
94
|
-
href={item.href}
|
|
95
|
-
{rel}
|
|
96
|
-
class="block py-2 px-4 text-{textsize} text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400 dark:hover:text-white"
|
|
97
|
-
>{item.name}</a
|
|
98
|
-
>
|
|
96
|
+
<a href={item.href} {rel} class={dropdownLinkClassWithChild}>{item.name}</a>
|
|
99
97
|
</li>
|
|
100
98
|
{/each}
|
|
101
99
|
</ul>
|
|
@@ -108,8 +106,7 @@ export let menus;
|
|
|
108
106
|
class:active={$page.url.pathname === href}
|
|
109
107
|
{href}
|
|
110
108
|
{rel}
|
|
111
|
-
class=
|
|
112
|
-
>{name}</a
|
|
109
|
+
class={dropdownLinkClassWithoutChild}>{name}</a
|
|
113
110
|
>
|
|
114
111
|
</li>
|
|
115
112
|
{/if}
|
|
@@ -7,6 +7,13 @@ declare const __propDef: {
|
|
|
7
7
|
alt: string;
|
|
8
8
|
textsize?: string;
|
|
9
9
|
menus: NavbarType[];
|
|
10
|
+
navClass?: string;
|
|
11
|
+
spanClass?: string;
|
|
12
|
+
buttonClass?: string;
|
|
13
|
+
dropdownDiv?: string;
|
|
14
|
+
dropdownLinkClassWithChild?: string;
|
|
15
|
+
dropdownLinkClassWithoutChild?: string;
|
|
16
|
+
liButtonClass?: string;
|
|
10
17
|
};
|
|
11
18
|
events: {
|
|
12
19
|
[evt: string]: CustomEvent<any>;
|
package/navbar/Navbar.svelte
CHANGED
|
@@ -8,21 +8,23 @@ const handleClickbtn = () => {
|
|
|
8
8
|
barHidden = !barHidden;
|
|
9
9
|
};
|
|
10
10
|
export let menus;
|
|
11
|
+
export let navClass = 'px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700';
|
|
12
|
+
const navDivClass = 'container flex flex-wrap justify-between items-center mx-auto';
|
|
13
|
+
export let spanClass = 'self-center text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white';
|
|
14
|
+
export let buttonClass = 'inline-flex justify-center items-center ml-3 text-gray-400 rounded-lg md:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500';
|
|
15
|
+
export let liLinkClass = `block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent ${textsize}`;
|
|
11
16
|
</script>
|
|
12
17
|
|
|
13
|
-
<nav class=
|
|
14
|
-
<div class=
|
|
18
|
+
<nav class={navClass}>
|
|
19
|
+
<div class={navDivClass}>
|
|
15
20
|
<a href="/" class="flex">
|
|
16
21
|
<img src={logo} {alt} />
|
|
17
|
-
<span
|
|
18
|
-
class="self-center text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white"
|
|
19
|
-
>{sitename}</span
|
|
20
|
-
>
|
|
22
|
+
<span class={spanClass}>{sitename}</span>
|
|
21
23
|
</a>
|
|
22
24
|
<button
|
|
23
25
|
on:click={handleClickbtn}
|
|
24
26
|
type="button"
|
|
25
|
-
class=
|
|
27
|
+
class={buttonClass}
|
|
26
28
|
aria-controls="mobile-menu-2"
|
|
27
29
|
aria-expanded="false"
|
|
28
30
|
>
|
|
@@ -52,14 +54,9 @@ export let menus;
|
|
|
52
54
|
</button>
|
|
53
55
|
<div class:hidden={barHidden} class="hidden w-full md:block md:w-auto" id="mobile-menu">
|
|
54
56
|
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
|
|
55
|
-
{#each menus as { name,
|
|
57
|
+
{#each menus as { name, href, rel }}
|
|
56
58
|
<li>
|
|
57
|
-
<a
|
|
58
|
-
class:active={$page.url.pathname === link}
|
|
59
|
-
href={link}
|
|
60
|
-
{rel}
|
|
61
|
-
class="block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent {textsize}"
|
|
62
|
-
>{name}</a
|
|
59
|
+
<a class:active={$page.url.pathname === href} {href} {rel} class={liLinkClass}>{name}</a
|
|
63
60
|
>
|
|
64
61
|
</li>
|
|
65
62
|
{/each}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Shinichi Okada",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"homepage": "https://github.com/shinokada/flowbite-svelte",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@codewithshin/svelte-sidebar": "^0.2
|
|
14
|
+
"@codewithshin/svelte-sidebar": "^0.4.2",
|
|
15
15
|
"@codewithshin/svelte-simpleicons": "^0.2.2",
|
|
16
16
|
"@codewithshin/svelte-utterances": "^0.1.2",
|
|
17
17
|
"@playwright/test": "^1.19.1",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"eslint": "^7.32.0",
|
|
24
24
|
"eslint-config-prettier": "^8.3.0",
|
|
25
25
|
"eslint-plugin-svelte3": "^3.2.1",
|
|
26
|
-
"flowbite-svelte": "^0.9.0",
|
|
27
26
|
"mdsvex": "^0.10.5",
|
|
28
27
|
"postcss": "^8.4.5",
|
|
29
28
|
"postcss-load-config": "^3.1.1",
|
|
@@ -75,6 +74,11 @@
|
|
|
75
74
|
"./alerts/Alert.svelte": "./alerts/Alert.svelte",
|
|
76
75
|
"./alerts/BorderAlert.svelte": "./alerts/BorderAlert.svelte",
|
|
77
76
|
"./alerts/InfoAlert.svelte": "./alerts/InfoAlert.svelte",
|
|
77
|
+
"./auth/Confirm.svelte": "./auth/Confirm.svelte",
|
|
78
|
+
"./auth/ForgotPassword.svelte": "./auth/ForgotPassword.svelte",
|
|
79
|
+
"./auth/Login.svelte": "./auth/Login.svelte",
|
|
80
|
+
"./auth/Register.svelte": "./auth/Register.svelte",
|
|
81
|
+
"./auth/Reset.svelte": "./auth/Reset.svelte",
|
|
78
82
|
"./badges/Badge.svelte": "./badges/Badge.svelte",
|
|
79
83
|
"./badges/BadgeIcon.svelte": "./badges/BadgeIcon.svelte",
|
|
80
84
|
"./badges/BadgeLink.svelte": "./badges/BadgeLink.svelte",
|