flowbite-svelte 0.9.1 → 0.9.4
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 +31 -34
- package/accordions/AccordionItem.svelte.d.ts +6 -16
- package/buttongroups/ButtonGroup.svelte +8 -21
- package/buttongroups/ButtonGroup.svelte.d.ts +1 -1
- package/buttongroups/ButtonGroupOutline.svelte +8 -21
- package/buttongroups/ButtonGroupOutline.svelte.d.ts +1 -1
- package/cards/CtaCard.svelte +8 -19
- package/cards/CtaCard.svelte.d.ts +2 -2
- package/cards/EcommerceCard.svelte +1 -1
- package/cards/EcommerceCard.svelte.d.ts +2 -2
- package/cards/HorizontalCard.svelte +21 -24
- package/cards/HorizontalCard.svelte.d.ts +9 -22
- package/cards/InteractiveCard.svelte +96 -110
- package/cards/InteractiveCard.svelte.d.ts +10 -50
- package/darkmode/DarkMode.svelte +60 -69
- package/darkmode/DarkMode.svelte.d.ts +5 -12
- package/footer/LogoFooter.svelte +32 -48
- package/footer/LogoFooter.svelte.d.ts +11 -46
- package/footer/SimpleFooter.svelte +20 -33
- package/footer/SimpleFooter.svelte.d.ts +8 -36
- package/footer/SitemapFooter.svelte +43 -112
- package/footer/SitemapFooter.svelte.d.ts +13 -59
- package/footer/SocialMediaFooter.svelte +59 -106
- package/footer/SocialMediaFooter.svelte.d.ts +14 -66
- package/modals/ExtraLargeModal.svelte +187 -191
- package/modals/ExtraLargeModal.svelte.d.ts +9 -27
- package/modals/LargeModal.svelte +188 -191
- package/modals/LargeModal.svelte.d.ts +9 -27
- package/modals/MediumModal.svelte +191 -200
- package/modals/MediumModal.svelte.d.ts +9 -27
- package/modals/ModalButton.svelte +40 -35
- package/modals/ModalButton.svelte.d.ts +7 -17
- package/modals/SignInModal.svelte +151 -160
- package/modals/SignInModal.svelte.d.ts +10 -24
- package/modals/SmallModal.svelte +188 -191
- package/modals/SmallModal.svelte.d.ts +9 -27
- package/modals/modalStores.d.ts +2 -1
- package/modals/modalStores.js +1 -2
- package/navbar/DropdownNavbar.svelte +117 -202
- package/navbar/DropdownNavbar.svelte.d.ts +8 -52
- package/navbar/Navbar.svelte +68 -99
- package/navbar/Navbar.svelte.d.ts +8 -26
- package/package.json +1 -2
- package/spinners/Spinner.svelte +63 -57
- package/spinners/Spinner.svelte.d.ts +8 -17
- package/spinners/SpinnerButton.svelte +31 -31
- package/spinners/SpinnerButton.svelte.d.ts +6 -15
- package/tabs/DefaultTabs.svelte +13 -39
- package/tabs/DefaultTabs.svelte.d.ts +7 -23
- package/tabs/InteractiveTabs.svelte +33 -63
- package/tabs/InteractiveTabs.svelte.d.ts +7 -35
- package/tabs/PillTabs.svelte +12 -34
- package/tabs/PillTabs.svelte.d.ts +7 -21
- package/tooltips/LightTooltip.svelte +112 -114
- package/tooltips/LightTooltip.svelte.d.ts +6 -21
- package/tooltips/Tooltip.svelte +113 -114
- package/tooltips/Tooltip.svelte.d.ts +6 -21
- package/types.d.ts +55 -7
|
@@ -1,210 +1,125 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let activeDropdown = undefined;
|
|
7
|
-
const handleDropdown = (dropdown) => {
|
|
8
|
-
console.log("dropdown.id", dropdown.id);
|
|
1
|
+
<script >import { page } from '$app/stores';
|
|
2
|
+
let hidden = true;
|
|
3
|
+
let block = false;
|
|
4
|
+
let activeDropdown = undefined;
|
|
5
|
+
const handleDropdown = (id) => {
|
|
9
6
|
hidden = !hidden;
|
|
10
7
|
block = !block;
|
|
11
|
-
activeDropdown =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let barHidden = true;
|
|
16
|
-
const handleClickbtn = () => {
|
|
8
|
+
activeDropdown = id;
|
|
9
|
+
};
|
|
10
|
+
let barHidden = true;
|
|
11
|
+
const handleClickbtn = () => {
|
|
17
12
|
barHidden = !barHidden;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export let menus = [
|
|
25
|
-
{
|
|
26
|
-
id: 1,
|
|
27
|
-
name: "Home",
|
|
28
|
-
link: "/",
|
|
29
|
-
rel: undefined,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 2,
|
|
33
|
-
name: "Alerts compoenents",
|
|
34
|
-
link: "/alerts",
|
|
35
|
-
rel: undefined,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 3,
|
|
39
|
-
name: "Component 1",
|
|
40
|
-
link: "/",
|
|
41
|
-
rel: undefined,
|
|
42
|
-
child: [
|
|
43
|
-
{
|
|
44
|
-
id: 4,
|
|
45
|
-
name: "Modals compoenents",
|
|
46
|
-
link: "/modals",
|
|
47
|
-
rel: undefined,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 5,
|
|
51
|
-
name: "Navbar compoenents",
|
|
52
|
-
link: "/navbar",
|
|
53
|
-
rel: undefined,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 6,
|
|
57
|
-
name: "Tabs",
|
|
58
|
-
link: "/tabs",
|
|
59
|
-
rel: undefined,
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: 7,
|
|
65
|
-
name: "Component 2",
|
|
66
|
-
link: "/",
|
|
67
|
-
rel: undefined,
|
|
68
|
-
child: [
|
|
69
|
-
{
|
|
70
|
-
id: 8,
|
|
71
|
-
name: "Modals",
|
|
72
|
-
link: "/modals",
|
|
73
|
-
rel: undefined,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: 9,
|
|
77
|
-
name: "Navbar",
|
|
78
|
-
link: "/navbar",
|
|
79
|
-
rel: undefined,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 10,
|
|
83
|
-
name: "Tabs",
|
|
84
|
-
link: "/tabs",
|
|
85
|
-
rel: undefined,
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 11,
|
|
91
|
-
name: "List Group",
|
|
92
|
-
link: "/list-group",
|
|
93
|
-
rel: undefined,
|
|
94
|
-
},
|
|
95
|
-
];
|
|
13
|
+
};
|
|
14
|
+
export let sitename = 'Svelte Flow';
|
|
15
|
+
export let logo = '/images/mkdir-logo.png';
|
|
16
|
+
export let alt;
|
|
17
|
+
export let textsize = 'text-sm';
|
|
18
|
+
export let menus;
|
|
96
19
|
</script>
|
|
97
20
|
|
|
98
|
-
<nav
|
|
99
|
-
|
|
100
|
-
>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
>{name}</a
|
|
198
|
-
>
|
|
199
|
-
</li>
|
|
200
|
-
{/if}
|
|
201
|
-
{/each}
|
|
202
|
-
</ul>
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
21
|
+
<nav class="px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700">
|
|
22
|
+
<div class="container flex flex-wrap justify-between items-center mx-auto">
|
|
23
|
+
<a href="/" class="flex">
|
|
24
|
+
<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
|
+
>
|
|
29
|
+
</a>
|
|
30
|
+
<button
|
|
31
|
+
on:click={handleClickbtn}
|
|
32
|
+
type="button"
|
|
33
|
+
class="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"
|
|
34
|
+
aria-controls="mobile-menu-2"
|
|
35
|
+
aria-expanded="false"
|
|
36
|
+
>
|
|
37
|
+
<span class="sr-only">Open main menu</span>
|
|
38
|
+
<svg
|
|
39
|
+
class="w-6 h-6"
|
|
40
|
+
fill="currentColor"
|
|
41
|
+
viewBox="0 0 20 20"
|
|
42
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
43
|
+
><path
|
|
44
|
+
fill-rule="evenodd"
|
|
45
|
+
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
46
|
+
clip-rule="evenodd"
|
|
47
|
+
/></svg
|
|
48
|
+
>
|
|
49
|
+
<svg
|
|
50
|
+
class="hidden w-6 h-6"
|
|
51
|
+
fill="currentColor"
|
|
52
|
+
viewBox="0 0 20 20"
|
|
53
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
54
|
+
><path
|
|
55
|
+
fill-rule="evenodd"
|
|
56
|
+
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"
|
|
57
|
+
clip-rule="evenodd"
|
|
58
|
+
/></svg
|
|
59
|
+
>
|
|
60
|
+
</button>
|
|
61
|
+
<div class="w-full md:block md:w-auto" class:hidden={barHidden} id="mobile-menu">
|
|
62
|
+
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
|
|
63
|
+
{#each menus as { id, name, href, rel, child }}
|
|
64
|
+
{#if child}
|
|
65
|
+
<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"
|
|
69
|
+
>{name}
|
|
70
|
+
<svg
|
|
71
|
+
class="ml-1 w-4 h-4"
|
|
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="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"
|
|
78
|
+
clip-rule="evenodd"
|
|
79
|
+
/></svg
|
|
80
|
+
></button
|
|
81
|
+
>
|
|
82
|
+
{#if activeDropdown === id}
|
|
83
|
+
<!-- Dropdown menu -->
|
|
84
|
+
<div
|
|
85
|
+
class:hidden
|
|
86
|
+
class:block
|
|
87
|
+
class="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"
|
|
88
|
+
style="position: absolute; margin: 0px;"
|
|
89
|
+
>
|
|
90
|
+
<ul class="py-1" aria-labelledby="dropdownLargeButton">
|
|
91
|
+
{#each child as item}
|
|
92
|
+
<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
|
+
>
|
|
99
|
+
</li>
|
|
100
|
+
{/each}
|
|
101
|
+
</ul>
|
|
102
|
+
</div>
|
|
103
|
+
{/if}
|
|
104
|
+
</li>
|
|
105
|
+
{:else}
|
|
106
|
+
<li>
|
|
107
|
+
<a
|
|
108
|
+
class:active={$page.url.pathname === href}
|
|
109
|
+
{href}
|
|
110
|
+
{rel}
|
|
111
|
+
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}"
|
|
112
|
+
>{name}</a
|
|
113
|
+
>
|
|
114
|
+
</li>
|
|
115
|
+
{/if}
|
|
116
|
+
{/each}
|
|
117
|
+
</ul>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
205
120
|
</nav>
|
|
206
121
|
|
|
207
122
|
<style>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
123
|
+
#mobile-menu .active {
|
|
124
|
+
color: #fab534;
|
|
125
|
+
}</style>
|
|
@@ -1,65 +1,21 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} DropdownNavbarProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} DropdownNavbarEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} DropdownNavbarSlots */
|
|
4
|
-
export default class DropdownNavbar extends SvelteComponentTyped<{
|
|
5
|
-
alt: any;
|
|
6
|
-
sitename?: string;
|
|
7
|
-
logo?: string;
|
|
8
|
-
textsize?: string;
|
|
9
|
-
menus?: ({
|
|
10
|
-
id: number;
|
|
11
|
-
name: string;
|
|
12
|
-
link: string;
|
|
13
|
-
rel: any;
|
|
14
|
-
child?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
id: number;
|
|
17
|
-
name: string;
|
|
18
|
-
link: string;
|
|
19
|
-
rel: any;
|
|
20
|
-
child: {
|
|
21
|
-
id: number;
|
|
22
|
-
name: string;
|
|
23
|
-
link: string;
|
|
24
|
-
rel: any;
|
|
25
|
-
}[];
|
|
26
|
-
})[];
|
|
27
|
-
}, {
|
|
28
|
-
[evt: string]: CustomEvent<any>;
|
|
29
|
-
}, {}> {
|
|
30
|
-
}
|
|
31
|
-
export type DropdownNavbarProps = typeof __propDef.props;
|
|
32
|
-
export type DropdownNavbarEvents = typeof __propDef.events;
|
|
33
|
-
export type DropdownNavbarSlots = typeof __propDef.slots;
|
|
34
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { NavbarType } from '../types';
|
|
35
3
|
declare const __propDef: {
|
|
36
4
|
props: {
|
|
37
|
-
alt: any;
|
|
38
5
|
sitename?: string;
|
|
39
6
|
logo?: string;
|
|
7
|
+
alt: string;
|
|
40
8
|
textsize?: string;
|
|
41
|
-
menus
|
|
42
|
-
id: number;
|
|
43
|
-
name: string;
|
|
44
|
-
link: string;
|
|
45
|
-
rel: any;
|
|
46
|
-
child?: undefined;
|
|
47
|
-
} | {
|
|
48
|
-
id: number;
|
|
49
|
-
name: string;
|
|
50
|
-
link: string;
|
|
51
|
-
rel: any;
|
|
52
|
-
child: {
|
|
53
|
-
id: number;
|
|
54
|
-
name: string;
|
|
55
|
-
link: string;
|
|
56
|
-
rel: any;
|
|
57
|
-
}[];
|
|
58
|
-
})[];
|
|
9
|
+
menus: NavbarType[];
|
|
59
10
|
};
|
|
60
11
|
events: {
|
|
61
12
|
[evt: string]: CustomEvent<any>;
|
|
62
13
|
};
|
|
63
14
|
slots: {};
|
|
64
15
|
};
|
|
16
|
+
export declare type DropdownNavbarProps = typeof __propDef.props;
|
|
17
|
+
export declare type DropdownNavbarEvents = typeof __propDef.events;
|
|
18
|
+
export declare type DropdownNavbarSlots = typeof __propDef.slots;
|
|
19
|
+
export default class DropdownNavbar extends SvelteComponentTyped<DropdownNavbarProps, DropdownNavbarEvents, DropdownNavbarSlots> {
|
|
20
|
+
}
|
|
65
21
|
export {};
|
package/navbar/Navbar.svelte
CHANGED
|
@@ -1,105 +1,74 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let barHidden = true;
|
|
9
|
-
const handleClickbtn = () => {
|
|
1
|
+
<script >import { page } from '$app/stores';
|
|
2
|
+
export let sitename = 'Svelte Flow';
|
|
3
|
+
export let logo = '/images/mkdir-logo.png';
|
|
4
|
+
export let alt = 'Svelte Flow';
|
|
5
|
+
export let textsize = 'text-sm';
|
|
6
|
+
let barHidden = true;
|
|
7
|
+
const handleClickbtn = () => {
|
|
10
8
|
barHidden = !barHidden;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
name: "Home",
|
|
15
|
-
link: "/",
|
|
16
|
-
rel: undefined,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: "About",
|
|
20
|
-
link: "/about",
|
|
21
|
-
rel: undefined,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: "Profile",
|
|
25
|
-
link: "/profile",
|
|
26
|
-
rel: undefined,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "GitHub",
|
|
30
|
-
link: "/#",
|
|
31
|
-
rel: undefined,
|
|
32
|
-
},
|
|
33
|
-
];
|
|
9
|
+
};
|
|
10
|
+
export let menus;
|
|
34
11
|
</script>
|
|
35
12
|
|
|
36
|
-
<nav
|
|
37
|
-
|
|
38
|
-
>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
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}"
|
|
93
|
-
>{name}</a
|
|
94
|
-
>
|
|
95
|
-
</li>
|
|
96
|
-
{/each}
|
|
97
|
-
</ul>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
13
|
+
<nav class="px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700">
|
|
14
|
+
<div class="container flex flex-wrap justify-between items-center mx-auto">
|
|
15
|
+
<a href="/" class="flex">
|
|
16
|
+
<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
|
+
>
|
|
21
|
+
</a>
|
|
22
|
+
<button
|
|
23
|
+
on:click={handleClickbtn}
|
|
24
|
+
type="button"
|
|
25
|
+
class="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"
|
|
26
|
+
aria-controls="mobile-menu-2"
|
|
27
|
+
aria-expanded="false"
|
|
28
|
+
>
|
|
29
|
+
<span class="sr-only">Open main menu</span>
|
|
30
|
+
<svg
|
|
31
|
+
class="w-6 h-6"
|
|
32
|
+
fill="currentColor"
|
|
33
|
+
viewBox="0 0 20 20"
|
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
+
><path
|
|
36
|
+
fill-rule="evenodd"
|
|
37
|
+
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
38
|
+
clip-rule="evenodd"
|
|
39
|
+
/></svg
|
|
40
|
+
>
|
|
41
|
+
<svg
|
|
42
|
+
class="hidden 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="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"
|
|
49
|
+
clip-rule="evenodd"
|
|
50
|
+
/></svg
|
|
51
|
+
>
|
|
52
|
+
</button>
|
|
53
|
+
<div class:hidden={barHidden} class="hidden w-full md:block md:w-auto" id="mobile-menu">
|
|
54
|
+
<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, href, rel }}
|
|
56
|
+
<li>
|
|
57
|
+
<a
|
|
58
|
+
class:active={$page.url.pathname === href}
|
|
59
|
+
{href}
|
|
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
|
|
63
|
+
>
|
|
64
|
+
</li>
|
|
65
|
+
{/each}
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
100
69
|
</nav>
|
|
101
70
|
|
|
102
71
|
<style>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
#mobile-menu .active {
|
|
73
|
+
color: #fab534;
|
|
74
|
+
}</style>
|
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} NavbarProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} NavbarEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} NavbarSlots */
|
|
4
|
-
export default class Navbar extends SvelteComponentTyped<{
|
|
5
|
-
alt?: string;
|
|
6
|
-
sitename?: string;
|
|
7
|
-
logo?: string;
|
|
8
|
-
textsize?: string;
|
|
9
|
-
menus?: {
|
|
10
|
-
name: string;
|
|
11
|
-
link: string;
|
|
12
|
-
rel: any;
|
|
13
|
-
}[];
|
|
14
|
-
}, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}> {
|
|
17
|
-
}
|
|
18
|
-
export type NavbarProps = typeof __propDef.props;
|
|
19
|
-
export type NavbarEvents = typeof __propDef.events;
|
|
20
|
-
export type NavbarSlots = typeof __propDef.slots;
|
|
21
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { LinkType } from '../types';
|
|
22
3
|
declare const __propDef: {
|
|
23
4
|
props: {
|
|
24
|
-
alt?: string;
|
|
25
5
|
sitename?: string;
|
|
26
6
|
logo?: string;
|
|
7
|
+
alt?: string;
|
|
27
8
|
textsize?: string;
|
|
28
|
-
menus
|
|
29
|
-
name: string;
|
|
30
|
-
link: string;
|
|
31
|
-
rel: any;
|
|
32
|
-
}[];
|
|
9
|
+
menus: LinkType[];
|
|
33
10
|
};
|
|
34
11
|
events: {
|
|
35
12
|
[evt: string]: CustomEvent<any>;
|
|
36
13
|
};
|
|
37
14
|
slots: {};
|
|
38
15
|
};
|
|
16
|
+
export declare type NavbarProps = typeof __propDef.props;
|
|
17
|
+
export declare type NavbarEvents = typeof __propDef.events;
|
|
18
|
+
export declare type NavbarSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Navbar extends SvelteComponentTyped<NavbarProps, NavbarEvents, NavbarSlots> {
|
|
20
|
+
}
|
|
39
21
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Shinichi Okada",
|
|
@@ -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",
|