flowbite-svelte 0.15.37 → 0.15.40
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/CHANGELOG.md +38 -0
- package/README.md +2 -2
- package/accordions/AccordionFlush.svelte +7 -1
- package/accordions/AccordionItem.svelte +12 -6
- package/accordions/AccordionItem.svelte.d.ts +2 -2
- package/alerts/Alert.svelte +35 -11
- package/cards/Card.svelte +27 -9
- package/cards/EcommerceCard.svelte +25 -9
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/navbar/DropdownNavbar.svelte +65 -30
- package/navbar/NavBrand.svelte +6 -0
- package/navbar/NavBrand.svelte.d.ts +19 -0
- package/navbar/NavHamburger.svelte +11 -0
- package/navbar/NavHamburger.svelte.d.ts +16 -0
- package/navbar/NavLi.svelte +12 -0
- package/navbar/NavLi.svelte.d.ts +22 -0
- package/navbar/NavUl.svelte +14 -0
- package/navbar/NavUl.svelte.d.ts +21 -0
- package/navbar/Navbar.svelte +8 -73
- package/navbar/Navbar.svelte.d.ts +5 -11
- package/package.json +10 -2
- package/spinners/Spinner.svelte +1 -1
- package/spinners/Spinner.svelte.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.15.40](https://github.com/themesberg/flowbite-svelte/compare/v0.15.39...v0.15.40) (2022-05-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add transition slide to navbar ([755ae7f](https://github.com/themesberg/flowbite-svelte/commit/755ae7f39823f9cdbcea375722eadabcc80d385a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* add {4126props.class || ''} to Navbar nav ([39a50fe](https://github.com/themesberg/flowbite-svelte/commit/39a50fe2a4296856d9fa97082f1807e6e1ddc0e8))
|
|
16
|
+
* remove transition for navbar ([4f078d0](https://github.com/themesberg/flowbite-svelte/commit/4f078d038b1b1babe216f55e937e0a1e64e2a7a5))
|
|
17
|
+
* remove transition for NavUl ([6a29a1d](https://github.com/themesberg/flowbite-svelte/commit/6a29a1d82ef3e5e6a7afcf68dd953f8830562e05))
|
|
18
|
+
|
|
19
|
+
### [0.15.39](https://github.com/themesberg/flowbite-svelte/compare/v0.15.38...v0.15.39) (2022-05-22)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* add new Navbar with dropdown demo ([d48b42f](https://github.com/themesberg/flowbite-svelte/commit/d48b42f15da7155e396702011fe70e7cb5898eb5))
|
|
25
|
+
* change Navbar component structure ([81b83fb](https://github.com/themesberg/flowbite-svelte/commit/81b83fb6805412b85ecf23186ccf50b4c737bdd4))
|
|
26
|
+
* favicon and logo update ([6c317a9](https://github.com/themesberg/flowbite-svelte/commit/6c317a967d5a0b8acdf19e7d8a74fe059407c34f))
|
|
27
|
+
* update Navbar components ([66170da](https://github.com/themesberg/flowbite-svelte/commit/66170dab34128dbe510131f2cd75a9123e06bdfe))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* add engines node version >=16.0.0 to package.json ([5f859be](https://github.com/themesberg/flowbite-svelte/commit/5f859be127ee5d541a9a49535f71eedbc5ea5137))
|
|
33
|
+
* restucturing Navbar components ([3f4fa07](https://github.com/themesberg/flowbite-svelte/commit/3f4fa076fe3cb5c0ca2a0a3e3b88e47aba7078af))
|
|
34
|
+
* update Navbar components ([57a7205](https://github.com/themesberg/flowbite-svelte/commit/57a7205e3c5db1dcec4f677878b2001fde749c67))
|
|
35
|
+
|
|
36
|
+
### [0.15.38](https://github.com/themesberg/flowbite-svelte/compare/v0.15.37...v0.15.38) (2022-05-19)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* add props.class to Spinner ([3fe4f8b](https://github.com/themesberg/flowbite-svelte/commit/3fe4f8b20d7d89b2230b23904b0671cec900684d))
|
|
42
|
+
|
|
5
43
|
### [0.15.37](https://github.com/themesberg/flowbite-svelte/compare/v0.15.36...v0.15.37) (2022-05-18)
|
|
6
44
|
|
|
7
45
|
|
package/README.md
CHANGED
|
@@ -141,7 +141,7 @@ For full documentation, visit [flowbite-svelte.com](https://flowbite-svelte.com/
|
|
|
141
141
|
</tr>
|
|
142
142
|
<tr>
|
|
143
143
|
<td width="33.3333%">Modals</td>
|
|
144
|
-
<td width="33.3333%">
|
|
144
|
+
<td width="33.3333%">Navbar</td>
|
|
145
145
|
<td width="33.3333%">Pagination</td>
|
|
146
146
|
</tr>
|
|
147
147
|
<tr>
|
|
@@ -151,7 +151,7 @@ For full documentation, visit [flowbite-svelte.com](https://flowbite-svelte.com/
|
|
|
151
151
|
</a>
|
|
152
152
|
</td>
|
|
153
153
|
<td width="33.3333%">
|
|
154
|
-
<a href="https://flowbite-svelte.com/
|
|
154
|
+
<a href="https://flowbite-svelte.com/navbar/">
|
|
155
155
|
<img alt="Tailwind CSS Navbar" src="https://flowbite.s3.amazonaws.com/github/navbar.jpg">
|
|
156
156
|
</a>
|
|
157
157
|
</td>
|
|
@@ -22,7 +22,13 @@ export let iconClass = 'text-gray-500 sm:w-6 sm:h-6 dark:text-gray-300';
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<h2 aria-expanded={isOpen}>
|
|
25
|
-
<button
|
|
25
|
+
<button
|
|
26
|
+
on:click={() => handleToggle(id)}
|
|
27
|
+
type="button"
|
|
28
|
+
class:rounded-t-xl={id === '1'}
|
|
29
|
+
class:border-t-0={id !== '1'}
|
|
30
|
+
class="{btnClass} {$$props.class || ''}"
|
|
31
|
+
>
|
|
26
32
|
<slot name="header" />
|
|
27
33
|
{#if isOpen}
|
|
28
34
|
<svelte:component this={icons.up} size={iconSize} class="mr-2 {iconClass}" />
|
|
@@ -9,14 +9,16 @@ export let icons = {
|
|
|
9
9
|
up: ChevronUpSolid,
|
|
10
10
|
down: ChevronDownSolid
|
|
11
11
|
};
|
|
12
|
+
export let iconSize = 24;
|
|
13
|
+
export let iconClass = 'text-gray-500 sm:w-6 sm:h-6 dark:text-gray-300';
|
|
14
|
+
export let btnClass = 'flex items-center focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 justify-between p-5 w-full font-medium border border-gray-200 dark:border-gray-700 text-left text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800';
|
|
15
|
+
export let colorClass = 'focus:ring-blue-200 dark:focus:ring-blue-800 hover:bg-blue-100 text-blue-500 bg-blue-200 text-blue-700';
|
|
16
|
+
$: btnClass;
|
|
12
17
|
onMount(() => {
|
|
13
18
|
if (isOpen) {
|
|
14
19
|
isOpen = true;
|
|
15
20
|
}
|
|
16
21
|
});
|
|
17
|
-
export let btnClass = 'flex items-center focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 justify-between p-5 w-full font-medium border border-gray-200 dark:border-gray-700 text-left text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800';
|
|
18
|
-
$: btnClass;
|
|
19
|
-
export let colorClass = 'focus:ring-blue-200 dark:focus:ring-blue-800 hover:bg-blue-100 text-blue-500 bg-blue-200 text-blue-700';
|
|
20
22
|
const handleToggle = (id) => {
|
|
21
23
|
isOpen = !isOpen;
|
|
22
24
|
};
|
|
@@ -27,12 +29,16 @@ $: if (color && isOpen) {
|
|
|
27
29
|
else {
|
|
28
30
|
buttonClass = btnClass;
|
|
29
31
|
}
|
|
30
|
-
export let iconSize = 24;
|
|
31
|
-
export let iconClass = 'text-gray-500 sm:w-6 sm:h-6 dark:text-gray-300';
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<h2 aria-expanded={isOpen}>
|
|
35
|
-
<button
|
|
35
|
+
<button
|
|
36
|
+
on:click={() => handleToggle(id)}
|
|
37
|
+
type="button"
|
|
38
|
+
class:rounded-t-xl={id === '1'}
|
|
39
|
+
class:border-t-0={id !== '1'}
|
|
40
|
+
class="{buttonClass} {$$props.class || ''}"
|
|
41
|
+
>
|
|
36
42
|
<slot name="header" />
|
|
37
43
|
{#if isOpen}
|
|
38
44
|
<svelte:component this={icons.up} size={iconSize} class="mr-2 {iconClass}" />
|
|
@@ -8,10 +8,10 @@ declare const __propDef: {
|
|
|
8
8
|
isOpen?: boolean;
|
|
9
9
|
color?: boolean;
|
|
10
10
|
icons?: AccordionIconType;
|
|
11
|
-
btnClass?: string;
|
|
12
|
-
colorClass?: string;
|
|
13
11
|
iconSize?: number;
|
|
14
12
|
iconClass?: string;
|
|
13
|
+
btnClass?: string;
|
|
14
|
+
colorClass?: string;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
17
|
[evt: string]: CustomEvent<any>;
|
package/alerts/Alert.svelte
CHANGED
|
@@ -25,60 +25,68 @@ if (color === 'gray') {
|
|
|
25
25
|
if (borderAccent)
|
|
26
26
|
divClass += 'border-gray-500 dark:bg-gray-200 ';
|
|
27
27
|
contentClass = 'text-gray-700 dark:text-gray-800';
|
|
28
|
-
buttonClass +=
|
|
28
|
+
buttonClass +=
|
|
29
|
+
'bg-gray-100 text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:bg-gray-200 dark:text-gray-600 dark:hover:bg-gray-300';
|
|
29
30
|
}
|
|
30
31
|
else if (color === 'red') {
|
|
31
32
|
divClass += 'bg-red-100 dark:bg-red-200';
|
|
32
33
|
if (borderAccent)
|
|
33
34
|
divClass += 'border-red-500 dark:bg-red-200 ';
|
|
34
35
|
contentClass = 'text-red-700 dark:text-red-800';
|
|
35
|
-
buttonClass +=
|
|
36
|
+
buttonClass +=
|
|
37
|
+
'bg-red-100 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300';
|
|
36
38
|
}
|
|
37
39
|
else if (color === 'yellow') {
|
|
38
40
|
divClass += 'bg-yellow-100 dark:bg-yellow-200 ';
|
|
39
41
|
if (borderAccent)
|
|
40
42
|
divClass += 'border-yellow-500 dark:bg-tellow-200 ';
|
|
41
43
|
contentClass = 'text-yellow-700 dark:text-yellow-800';
|
|
42
|
-
buttonClass +=
|
|
44
|
+
buttonClass +=
|
|
45
|
+
'bg-yellow-100 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300';
|
|
43
46
|
}
|
|
44
47
|
else if (color === 'green') {
|
|
45
48
|
divClass += 'bg-green-100 dark:bg-green-200 ';
|
|
46
49
|
if (borderAccent)
|
|
47
50
|
divClass += 'border-green-500 dark:bg-green-200 ';
|
|
48
51
|
contentClass = 'text-green-700 dark:text-green-800';
|
|
49
|
-
buttonClass +=
|
|
52
|
+
buttonClass +=
|
|
53
|
+
'bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300';
|
|
50
54
|
}
|
|
51
55
|
else if (color === 'indigo') {
|
|
52
56
|
divClass += 'bg-indigo-100 dark:bg-indigo-200 ';
|
|
53
57
|
if (borderAccent)
|
|
54
58
|
divClass += 'border-indigo-500 dark:bg-indigo-200 ';
|
|
55
59
|
contentClass = 'text-indigo-700 dark:text-indigo-800';
|
|
56
|
-
buttonClass +=
|
|
60
|
+
buttonClass +=
|
|
61
|
+
'bg-indigo-100 text-indigo-500 focus:ring-indigo-400 hover:bg-indigo-200 dark:bg-indigo-200 dark:text-indigo-600 dark:hover:bg-indigo-300';
|
|
57
62
|
}
|
|
58
63
|
else if (color === 'purple') {
|
|
59
64
|
divClass += 'bg-purple-100 dark:bg-purple-200 ';
|
|
60
65
|
if (borderAccent)
|
|
61
66
|
divClass += 'border-purple-500 dark:bg-purple-200 ';
|
|
62
67
|
contentClass = 'text-purple-700 dark:text-purple-800';
|
|
63
|
-
buttonClass +=
|
|
68
|
+
buttonClass +=
|
|
69
|
+
'bg-purple-100 text-purple-500 focus:ring-purple-400 hover:bg-purple-200 dark:bg-purple-200 dark:text-purple-600 dark:hover:bg-purple-300';
|
|
64
70
|
}
|
|
65
71
|
else if (color === 'pink') {
|
|
66
72
|
divClass += 'bg-pink-100 dark:bg-pink-200 ';
|
|
67
73
|
if (borderAccent)
|
|
68
74
|
divClass += 'border-pink-500 dark:bg-pink-200 ';
|
|
69
75
|
contentClass = 'text-pink-700 dark:text-pink-800';
|
|
70
|
-
buttonClass +=
|
|
76
|
+
buttonClass +=
|
|
77
|
+
'bg-pink-100 text-pink-500 focus:ring-pink-400 hover:bg-pink-200 dark:bg-pink-200 dark:text-pink-600 dark:hover:bg-pink-300';
|
|
71
78
|
}
|
|
72
79
|
else {
|
|
73
80
|
divClass += 'bg-blue-100 dark:bg-blue-200 ';
|
|
74
81
|
if (borderAccent)
|
|
75
82
|
divClass += 'border-blue-500 dark:bg-blue-200 ';
|
|
76
83
|
contentClass = 'text-blue-700 dark:text-blue-800';
|
|
77
|
-
buttonClass +=
|
|
84
|
+
buttonClass +=
|
|
85
|
+
'bg-blue-100 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-blue-200 dark:text-blue-600 dark:hover:bg-blue-300';
|
|
78
86
|
}
|
|
79
87
|
</script>
|
|
80
88
|
|
|
81
|
-
<div id={$$props.id} class:hidden class="{divClass} {$$props.class
|
|
89
|
+
<div id={$$props.id} class:hidden class="{divClass} {$$props.class || ''}" role="alert">
|
|
82
90
|
<div class="flex">
|
|
83
91
|
{#if icon}
|
|
84
92
|
<svelte:component this={icon} class="flex-shrink-0 w-5 h-5 {contentClass} mr-3" />
|
|
@@ -89,9 +97,25 @@ else {
|
|
|
89
97
|
</div>
|
|
90
98
|
|
|
91
99
|
{#if closeBtn}
|
|
92
|
-
<button
|
|
100
|
+
<button
|
|
101
|
+
on:click={handleHide}
|
|
102
|
+
on:click={handleAlert}
|
|
103
|
+
type="button"
|
|
104
|
+
class={buttonClass}
|
|
105
|
+
aria-label="Close"
|
|
106
|
+
>
|
|
93
107
|
<span class="sr-only">Close</span>
|
|
94
|
-
<svg
|
|
108
|
+
<svg
|
|
109
|
+
class="w-5 h-5"
|
|
110
|
+
fill="currentColor"
|
|
111
|
+
viewBox="0 0 20 20"
|
|
112
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
113
|
+
><path
|
|
114
|
+
fill-rule="evenodd"
|
|
115
|
+
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"
|
|
116
|
+
clip-rule="evenodd"
|
|
117
|
+
/></svg
|
|
118
|
+
>
|
|
95
119
|
</button>
|
|
96
120
|
{/if}
|
|
97
121
|
</div>
|
package/cards/Card.svelte
CHANGED
|
@@ -10,28 +10,36 @@ export let header = '';
|
|
|
10
10
|
export let divClass = 'max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700';
|
|
11
11
|
let buttonClass = 'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white focus:ring-4 ';
|
|
12
12
|
if (btnColor === 'gray') {
|
|
13
|
-
buttonClass +=
|
|
13
|
+
buttonClass +=
|
|
14
|
+
'bg-gray-700 rounded-lg hover:bg-gray-800 focus:ring-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
|
|
14
15
|
}
|
|
15
16
|
else if (btnColor === 'red') {
|
|
16
|
-
buttonClass +=
|
|
17
|
+
buttonClass +=
|
|
18
|
+
'bg-red-700 rounded-lg hover:bg-red-800 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
|
|
17
19
|
}
|
|
18
20
|
else if (btnColor === 'yellow') {
|
|
19
|
-
buttonClass +=
|
|
21
|
+
buttonClass +=
|
|
22
|
+
'bg-yellow-700 rounded-lg hover:bg-yellow-800 focus:ring-yellow-300 dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
|
|
20
23
|
}
|
|
21
24
|
else if (btnColor === 'green') {
|
|
22
|
-
buttonClass +=
|
|
25
|
+
buttonClass +=
|
|
26
|
+
'bg-green-700 rounded-lg hover:bg-green-800 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
|
|
23
27
|
}
|
|
24
28
|
else if (btnColor === 'indigo') {
|
|
25
|
-
buttonClass +=
|
|
29
|
+
buttonClass +=
|
|
30
|
+
'bg-indigo-700 rounded-lg hover:bg-indigo-800 focus:ring-indigo-300 dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
|
|
26
31
|
}
|
|
27
32
|
else if (btnColor === 'purple') {
|
|
28
|
-
buttonClass +=
|
|
33
|
+
buttonClass +=
|
|
34
|
+
'bg-purple-700 rounded-lg hover:bg-purple-800 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
|
|
29
35
|
}
|
|
30
36
|
else if (btnColor === 'pink') {
|
|
31
|
-
buttonClass +=
|
|
37
|
+
buttonClass +=
|
|
38
|
+
'bg-pink-700 rounded-lg hover:bg-pink-800 focus:ring-pink-300 dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
|
|
32
39
|
}
|
|
33
40
|
else {
|
|
34
|
-
buttonClass +=
|
|
41
|
+
buttonClass +=
|
|
42
|
+
'bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
35
43
|
}
|
|
36
44
|
</script>
|
|
37
45
|
|
|
@@ -65,7 +73,17 @@ else {
|
|
|
65
73
|
{#if link && btnLabel}
|
|
66
74
|
<a href={link} {rel} class={buttonClass}>
|
|
67
75
|
{btnLabel}
|
|
68
|
-
<svg
|
|
76
|
+
<svg
|
|
77
|
+
class="ml-2 -mr-1 w-4 h-4"
|
|
78
|
+
fill="currentColor"
|
|
79
|
+
viewBox="0 0 20 20"
|
|
80
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
81
|
+
><path
|
|
82
|
+
fill-rule="evenodd"
|
|
83
|
+
d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
|
|
84
|
+
clip-rule="evenodd"
|
|
85
|
+
/></svg
|
|
86
|
+
>
|
|
69
87
|
</a>
|
|
70
88
|
{/if}
|
|
71
89
|
</div>
|
|
@@ -13,35 +13,43 @@ let spanClass = 'text-xs font-semibold mr-2 px-2.5 py-0.5 rounded ml-3 ';
|
|
|
13
13
|
let linkClass = 'text-white focus:ring-4 font-medium rounded-lg text-sm px-5 py-2.5 text-center ';
|
|
14
14
|
if (btnColor === 'gray') {
|
|
15
15
|
spanClass += 'bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-800';
|
|
16
|
-
linkClass +=
|
|
16
|
+
linkClass +=
|
|
17
|
+
'bg-gray-700 hover:bg-gray-800 focus:ring-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
|
|
17
18
|
}
|
|
18
19
|
else if (btnColor === 'red') {
|
|
19
20
|
spanClass += 'bg-red-100 text-red-800 dark:bg-red-200 dark:text-red-800';
|
|
20
|
-
linkClass +=
|
|
21
|
+
linkClass +=
|
|
22
|
+
'bg-red-700 hover:bg-red-800 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
|
|
21
23
|
}
|
|
22
24
|
else if (btnColor === 'yellow') {
|
|
23
25
|
spanClass += 'bg-yellow-100 text-yellow-800 dark:bg-yellow-200 dark:text-yellow-800';
|
|
24
|
-
linkClass +=
|
|
26
|
+
linkClass +=
|
|
27
|
+
'bg-yellow-700 hover:bg-yellow-800 focus:ring-yellow-300 dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
|
|
25
28
|
}
|
|
26
29
|
else if (btnColor === 'green') {
|
|
27
30
|
spanClass += 'bg-green-100 text-green-800 dark:bg-green-200 dark:text-green-800';
|
|
28
|
-
linkClass +=
|
|
31
|
+
linkClass +=
|
|
32
|
+
'bg-green-700 hover:bg-green-800 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
|
|
29
33
|
}
|
|
30
34
|
else if (btnColor === 'indigo') {
|
|
31
35
|
spanClass += 'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-800';
|
|
32
|
-
linkClass +=
|
|
36
|
+
linkClass +=
|
|
37
|
+
'bg-indigo-700 hover:bg-indigo-800 focus:ring-indigo-300 dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
|
|
33
38
|
}
|
|
34
39
|
else if (btnColor === 'purple') {
|
|
35
40
|
spanClass += 'bg-purple-100 text-purple-800 dark:bg-purple-200 dark:text-purple-800';
|
|
36
|
-
linkClass +=
|
|
41
|
+
linkClass +=
|
|
42
|
+
'bg-purple-700 hover:bg-purple-800 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
|
|
37
43
|
}
|
|
38
44
|
else if (btnColor === 'pink') {
|
|
39
45
|
spanClass += 'bg-pink-100 text-pink-800 dark:bg-pink-200 dark:text-pink-800';
|
|
40
|
-
linkClass +=
|
|
46
|
+
linkClass +=
|
|
47
|
+
'bg-pink-700 hover:bg-pink-800 focus:ring-pink-300 dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
|
|
41
48
|
}
|
|
42
49
|
else {
|
|
43
50
|
spanClass += 'bg-blue-100 text-blue-800 dark:bg-blue-200 dark:text-blue-800';
|
|
44
|
-
linkClass +=
|
|
51
|
+
linkClass +=
|
|
52
|
+
'bg-blue-700 hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
45
53
|
}
|
|
46
54
|
</script>
|
|
47
55
|
|
|
@@ -58,7 +66,15 @@ else {
|
|
|
58
66
|
<div class="flex items-center mt-2.5 mb-5">
|
|
59
67
|
{#if stars}
|
|
60
68
|
{#each { length: stars } as _, i}
|
|
61
|
-
<svg
|
|
69
|
+
<svg
|
|
70
|
+
class="w-5 h-5 text-yellow-300"
|
|
71
|
+
fill="currentColor"
|
|
72
|
+
viewBox="0 0 20 20"
|
|
73
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
74
|
+
><path
|
|
75
|
+
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
|
|
76
|
+
/></svg
|
|
77
|
+
>
|
|
62
78
|
{/each}
|
|
63
79
|
<span class={spanClass}>{stars}</span>
|
|
64
80
|
{/if}
|
package/index.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export { default as ModalButton } from './modals/ModalButton.svelte';
|
|
|
52
52
|
export { default as SignInModal } from './modals/SignInModal.svelte';
|
|
53
53
|
export { default as SmallModal } from './modals/SmallModal.svelte';
|
|
54
54
|
export { default as Navbar } from './navbar/Navbar.svelte';
|
|
55
|
+
export { default as NavBrand } from './navbar/NavBrand.svelte';
|
|
56
|
+
export { default as NavHamburger } from './navbar/NavHamburger.svelte';
|
|
57
|
+
export { default as NavLi } from './navbar/NavLi.svelte';
|
|
58
|
+
export { default as NavUl } from './navbar/NavUl.svelte';
|
|
55
59
|
export { default as DropdownNavbar } from './navbar/DropdownNavbar.svelte';
|
|
56
60
|
export { default as Pagination } from './paginations/Pagination.svelte';
|
|
57
61
|
export { default as Previous } from './paginations/Previous.svelte';
|
package/index.js
CHANGED
|
@@ -68,6 +68,10 @@ export { default as SignInModal } from './modals/SignInModal.svelte';
|
|
|
68
68
|
export { default as SmallModal } from './modals/SmallModal.svelte';
|
|
69
69
|
// Navbar
|
|
70
70
|
export { default as Navbar } from './navbar/Navbar.svelte';
|
|
71
|
+
export { default as NavBrand } from './navbar/NavBrand.svelte';
|
|
72
|
+
export { default as NavHamburger } from './navbar/NavHamburger.svelte';
|
|
73
|
+
export { default as NavLi } from './navbar/NavLi.svelte';
|
|
74
|
+
export { default as NavUl } from './navbar/NavUl.svelte';
|
|
71
75
|
export { default as DropdownNavbar } from './navbar/DropdownNavbar.svelte';
|
|
72
76
|
// Pagination
|
|
73
77
|
export { default as Pagination } from './paginations/Pagination.svelte';
|
|
@@ -26,36 +26,71 @@ export let liButtonClass = `flex justify-between items-center py-2 pr-4 pl-3 w-f
|
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<nav class={navClass}>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
29
|
+
<div class={navDivClass}>
|
|
30
|
+
<a href="/" class="flex">
|
|
31
|
+
<img src={logo} {alt} />
|
|
32
|
+
<span class={spanClass}>{sitename}</span>
|
|
33
|
+
</a>
|
|
34
|
+
<button
|
|
35
|
+
on:click={handleClickbtn}
|
|
36
|
+
type="button"
|
|
37
|
+
class={buttonClass}
|
|
38
|
+
aria-controls="mobile-menu-2"
|
|
39
|
+
aria-expanded="false"
|
|
40
|
+
>
|
|
41
|
+
<span class="sr-only">Open main menu</span>
|
|
42
|
+
<svg
|
|
43
|
+
class="w-6 h-6"
|
|
44
|
+
fill="currentColor"
|
|
45
|
+
viewBox="0 0 20 20"
|
|
46
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
47
|
+
><path
|
|
48
|
+
fill-rule="evenodd"
|
|
49
|
+
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"
|
|
50
|
+
clip-rule="evenodd"
|
|
51
|
+
/></svg
|
|
52
|
+
>
|
|
53
|
+
<svg
|
|
54
|
+
class="hidden w-6 h-6"
|
|
55
|
+
fill="currentColor"
|
|
56
|
+
viewBox="0 0 20 20"
|
|
57
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
58
|
+
><path
|
|
59
|
+
fill-rule="evenodd"
|
|
60
|
+
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"
|
|
61
|
+
clip-rule="evenodd"
|
|
62
|
+
/></svg
|
|
63
|
+
>
|
|
64
|
+
</button>
|
|
65
|
+
<div class="w-full md:block md:w-auto" class:hidden={barHidden} id="mobile-menu">
|
|
66
|
+
<ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
|
|
67
|
+
{#each menus as { name, href, rel, child }}
|
|
68
|
+
{#if child}
|
|
69
|
+
<NavDropdown
|
|
70
|
+
{liButtonClass}
|
|
71
|
+
{dropdownDiv}
|
|
72
|
+
{name}
|
|
73
|
+
{child}
|
|
74
|
+
{rel}
|
|
75
|
+
{dropdownLinkClassWithChild}
|
|
76
|
+
/>
|
|
77
|
+
{:else}
|
|
78
|
+
<li>
|
|
79
|
+
<a class:active={pathname === href} {href} {rel} class={dropdownLinkClassWithoutChild}
|
|
80
|
+
>{name}</a
|
|
81
|
+
>
|
|
82
|
+
</li>
|
|
83
|
+
{/if}
|
|
84
|
+
{/each}
|
|
85
|
+
</ul>
|
|
86
|
+
{#if user}
|
|
87
|
+
<slot name="user" />
|
|
88
|
+
{/if}
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
56
91
|
</nav>
|
|
57
92
|
|
|
58
93
|
<style>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
94
|
+
#mobile-menu .active {
|
|
95
|
+
color: #fab534;
|
|
96
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
href?: string;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare type NavBrandProps = typeof __propDef.props;
|
|
15
|
+
export declare type NavBrandEvents = typeof __propDef.events;
|
|
16
|
+
export declare type NavBrandSlots = typeof __propDef.slots;
|
|
17
|
+
export default class NavBrand extends SvelteComponentTyped<NavBrandProps, NavBrandEvents, NavBrandSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script>import { MenuOutline } from 'svelte-heros';
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<button
|
|
5
|
+
class="ml-3 inline-flex items-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600 md:hidden"
|
|
6
|
+
data-testid="navbar-toggle"
|
|
7
|
+
on:click
|
|
8
|
+
>
|
|
9
|
+
<span class="sr-only">Open main menu</span>
|
|
10
|
+
<MenuOutline class="h-6 w-6 shrink-0" />
|
|
11
|
+
</button>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {};
|
|
4
|
+
events: {
|
|
5
|
+
click: MouseEvent;
|
|
6
|
+
} & {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export declare type NavHamburgerProps = typeof __propDef.props;
|
|
12
|
+
export declare type NavHamburgerEvents = typeof __propDef.events;
|
|
13
|
+
export declare type NavHamburgerSlots = typeof __propDef.slots;
|
|
14
|
+
export default class NavHamburger extends SvelteComponentTyped<NavHamburgerProps, NavHamburgerEvents, NavHamburgerSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>export let href = '';
|
|
2
|
+
export let active = false;
|
|
3
|
+
export let activeClass = 'block py-2 pr-4 pl-3 text-white bg-blue-700 rounded md:bg-transparent md:text-blue-700 md:p-0 dark:text-white';
|
|
4
|
+
export let nonActiveClass = '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 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700';
|
|
5
|
+
let aClass = active ? activeClass : nonActiveClass;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<li>
|
|
9
|
+
<a {href} class="{aClass} {$$props.class || ''}">
|
|
10
|
+
<slot />
|
|
11
|
+
</a>
|
|
12
|
+
</li>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
href?: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
activeClass?: string;
|
|
8
|
+
nonActiveClass?: string;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare type NavLiProps = typeof __propDef.props;
|
|
18
|
+
export declare type NavLiEvents = typeof __propDef.events;
|
|
19
|
+
export declare type NavLiSlots = typeof __propDef.slots;
|
|
20
|
+
export default class NavLi extends SvelteComponentTyped<NavLiProps, NavLiEvents, NavLiSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>import { slide } from 'svelte/transition';
|
|
2
|
+
import { quintOut } from 'svelte/easing';
|
|
3
|
+
export let divClass = 'hidden justify-between items-center w-full md:flex md:w-auto md:order-1';
|
|
4
|
+
export let ulClass = 'flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium';
|
|
5
|
+
export let hidden = true;
|
|
6
|
+
// $: hidden;
|
|
7
|
+
// $: console.log('hidden: ', hidden);
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div class={divClass} class:hidden id="mobile-menu">
|
|
11
|
+
<ul class="{ulClass} {$$props.class || ''}">
|
|
12
|
+
<slot />
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
ulClass?: string;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {
|
|
13
|
+
default: {};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare type NavUlProps = typeof __propDef.props;
|
|
17
|
+
export declare type NavUlEvents = typeof __propDef.events;
|
|
18
|
+
export declare type NavUlSlots = typeof __propDef.slots;
|
|
19
|
+
export default class NavUl extends SvelteComponentTyped<NavUlProps, NavUlEvents, NavUlSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
package/navbar/Navbar.svelte
CHANGED
|
@@ -1,79 +1,14 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let user = '';
|
|
3
|
-
let pathname = '';
|
|
4
|
-
onMount(() => {
|
|
5
|
-
pathname = window.location.pathname;
|
|
6
|
-
// console.log('pathname', pathname);
|
|
7
|
-
});
|
|
8
|
-
export let siteName = 'Svelte Flow';
|
|
9
|
-
export let logo = '/images/flowbite-svelte-logo-30.png';
|
|
10
|
-
export let alt = 'Svelte Flow';
|
|
11
|
-
export let textsize = 'text-sm';
|
|
12
|
-
let barHidden = true;
|
|
13
|
-
const handleClickbtn = () => {
|
|
14
|
-
barHidden = !barHidden;
|
|
15
|
-
};
|
|
16
|
-
export let menus;
|
|
17
|
-
export let navClass = 'px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700';
|
|
1
|
+
<script>export let navClass = 'bg-white border-gray-200 px-2 sm:px-4 py-2.5 rounded dark:bg-gray-800';
|
|
18
2
|
const navDivClass = 'container flex flex-wrap justify-between items-center mx-auto';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
let hidden = true;
|
|
4
|
+
let toggle = () => {
|
|
5
|
+
// console.log('Toggled');
|
|
6
|
+
hidden = !hidden;
|
|
7
|
+
};
|
|
22
8
|
</script>
|
|
23
9
|
|
|
24
|
-
<nav class={navClass}>
|
|
10
|
+
<nav class="{navClass} {$$props.class || ''}">
|
|
25
11
|
<div class={navDivClass}>
|
|
26
|
-
<
|
|
27
|
-
<img src={logo} {alt} />
|
|
28
|
-
<span class={spanClass}>{siteName}</span>
|
|
29
|
-
</a>
|
|
30
|
-
<button
|
|
31
|
-
on:click={handleClickbtn}
|
|
32
|
-
type="button"
|
|
33
|
-
class={buttonClass}
|
|
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:hidden={barHidden} class="hidden w-full md:block md:w-auto" 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 { name, href, rel }}
|
|
64
|
-
<li>
|
|
65
|
-
<a class:active={pathname === href} {href} {rel} class={liLinkClass}>{name}</a>
|
|
66
|
-
</li>
|
|
67
|
-
{/each}
|
|
68
|
-
</ul>
|
|
69
|
-
{#if user}
|
|
70
|
-
<slot name="user" />
|
|
71
|
-
{/if}
|
|
72
|
-
</div>
|
|
12
|
+
<slot {hidden} {toggle} />
|
|
73
13
|
</div>
|
|
74
14
|
</nav>
|
|
75
|
-
|
|
76
|
-
<style>
|
|
77
|
-
#mobile-menu .active {
|
|
78
|
-
color: #fab534;
|
|
79
|
-
}</style>
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { LinkType } from '../types';
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
|
-
|
|
6
|
-
siteName?: string;
|
|
7
|
-
logo?: string;
|
|
8
|
-
alt?: string;
|
|
9
|
-
textsize?: string;
|
|
10
|
-
menus: LinkType[];
|
|
4
|
+
[x: string]: any;
|
|
11
5
|
navClass?: string;
|
|
12
|
-
spanClass?: string;
|
|
13
|
-
buttonClass?: string;
|
|
14
|
-
liLinkClass?: string;
|
|
15
6
|
};
|
|
16
7
|
events: {
|
|
17
8
|
[evt: string]: CustomEvent<any>;
|
|
18
9
|
};
|
|
19
10
|
slots: {
|
|
20
|
-
|
|
11
|
+
default: {
|
|
12
|
+
hidden: boolean;
|
|
13
|
+
toggle: () => void;
|
|
14
|
+
};
|
|
21
15
|
};
|
|
22
16
|
};
|
|
23
17
|
export declare type NavbarProps = typeof __propDef.props;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.40",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
|
19
19
|
"@typescript-eslint/parser": "^5.10.1",
|
|
20
20
|
"autoprefixer": "^10.4.4",
|
|
21
|
-
"createprops": "^0.
|
|
21
|
+
"createprops": "^0.4.4",
|
|
22
22
|
"eslint": "^7.32.0",
|
|
23
23
|
"eslint-config-prettier": "^8.3.0",
|
|
24
24
|
"eslint-plugin-svelte3": "^3.2.1",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"flowbite": "^1.4.2",
|
|
80
80
|
"svelte-heros": "^2.0.0"
|
|
81
81
|
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"npm": ">=7.0.0",
|
|
84
|
+
"node": ">=16.0.0"
|
|
85
|
+
},
|
|
82
86
|
"exports": {
|
|
83
87
|
"./package.json": "./package.json",
|
|
84
88
|
"./.DS_Store": "./.DS_Store",
|
|
@@ -142,7 +146,11 @@
|
|
|
142
146
|
"./modals/SmallModal.svelte": "./modals/SmallModal.svelte",
|
|
143
147
|
"./modals/modalStores": "./modals/modalStores.js",
|
|
144
148
|
"./navbar/DropdownNavbar.svelte": "./navbar/DropdownNavbar.svelte",
|
|
149
|
+
"./navbar/NavBrand.svelte": "./navbar/NavBrand.svelte",
|
|
145
150
|
"./navbar/NavDropdown.svelte": "./navbar/NavDropdown.svelte",
|
|
151
|
+
"./navbar/NavHamburger.svelte": "./navbar/NavHamburger.svelte",
|
|
152
|
+
"./navbar/NavLi.svelte": "./navbar/NavLi.svelte",
|
|
153
|
+
"./navbar/NavUl.svelte": "./navbar/NavUl.svelte",
|
|
146
154
|
"./navbar/Navbar.svelte": "./navbar/Navbar.svelte",
|
|
147
155
|
"./paginations/Next.svelte": "./paginations/Next.svelte",
|
|
148
156
|
"./paginations/Pagination.svelte": "./paginations/Pagination.svelte",
|
package/spinners/Spinner.svelte
CHANGED
|
@@ -37,7 +37,7 @@ else {
|
|
|
37
37
|
}
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
|
-
<svg role="status" class="inline w-{size} h-{size}
|
|
40
|
+
<svg role="status" class="inline w-{size} h-{size} {$$props.class || ''} {bg} animate-spin dark:text-gray-600 {fillColorClass}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
41
41
|
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill={currentFill} />
|
|
42
42
|
<path
|
|
43
43
|
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|