flowbite-svelte 0.14.13 → 0.14.16
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 +21 -0
- package/LICENSE +22 -0
- package/README.md +11 -0
- package/accordions/AccordionDefault.svelte +1 -1
- package/accordions/AccordionItem.svelte +1 -1
- package/alerts/Alert.svelte +1 -1
- package/alerts/BorderAlert.svelte +1 -1
- package/alerts/InfoAlert.svelte +1 -1
- package/auth/Confirm.svelte +1 -1
- package/auth/ForgotPassword.svelte +1 -1
- package/auth/Login.svelte +1 -1
- package/auth/Register.svelte +1 -1
- package/auth/Reset.svelte +1 -1
- package/avatar/Avatar.svelte +1 -1
- package/badges/Badge.svelte +1 -1
- package/badges/BadgeIcon.svelte +1 -1
- package/badges/BadgeLink.svelte +1 -1
- package/breadcrumbs/Breadcrumb.svelte +1 -1
- package/buttongroups/ButtonGroup.svelte +1 -1
- package/buttongroups/ButtonGroupOutline.svelte +1 -1
- package/buttons/Button.svelte +1 -1
- package/buttons/ColorShadowButton.svelte +1 -1
- package/buttons/GradientDuotoneButton.svelte +1 -1
- package/buttons/GradientMonochromeButton.svelte +1 -1
- package/buttons/GradientOutlineButton.svelte +1 -1
- package/cards/Card.svelte +1 -1
- package/cards/CtaCard.svelte +1 -1
- package/cards/EcommerceCard.svelte +1 -1
- package/cards/HorizontalCard.svelte +1 -1
- package/cards/InteractiveCard.svelte +1 -1
- package/cards/ListCard.svelte +1 -1
- package/cards/SignInCard.svelte +1 -1
- package/carousels/Caption.svelte +1 -1
- package/carousels/Carousel.svelte +16 -60
- package/carousels/Carousel.svelte.d.ts +2 -0
- package/carousels/CarouselTransition.svelte +16 -60
- package/carousels/CarouselTransition.svelte.d.ts +2 -0
- package/carousels/Indicator.svelte +1 -1
- package/carousels/Slide.svelte +1 -1
- package/carousels/Thumbnail.svelte +1 -1
- package/darkmode/DarkMode.svelte +1 -1
- package/dropdowns/DropdownDefault.svelte +1 -1
- package/dropdowns/ImgDropdown.svelte +1 -1
- package/footer/LogoFooter.svelte +1 -1
- package/footer/SimpleFooter.svelte +1 -1
- package/footer/SitemapFooter.svelte +1 -1
- package/footer/SocialMediaFooter.svelte +1 -1
- package/forms/Checkbox.svelte +1 -1
- package/forms/Fileupload.svelte +1 -1
- package/forms/FloatingLabelInput.svelte +1 -1
- package/forms/Iconinput.svelte +1 -1
- package/forms/Input.svelte +1 -1
- package/forms/Radio.svelte +1 -1
- package/forms/Select.svelte +1 -1
- package/forms/SingleCheckbox.svelte +1 -1
- package/forms/Textarea.svelte +1 -1
- package/forms/Toggle.svelte +1 -1
- package/index.js +5 -0
- package/list-group/List.svelte +1 -1
- package/modals/ExtraLargeModal.svelte +1 -1
- package/modals/LargeModal.svelte +1 -1
- package/modals/MediumModal.svelte +1 -1
- package/modals/ModalButton.svelte +1 -1
- package/modals/SignInModal.svelte +1 -1
- package/modals/SmallModal.svelte +1 -1
- package/navbar/DropdownNavbar.svelte +1 -1
- package/navbar/NavDropdown.svelte +1 -1
- package/navbar/Navbar.svelte +1 -1
- package/package.json +7 -2
- package/paginations/Next.svelte +1 -1
- package/paginations/Pagination.svelte +1 -1
- package/paginations/Previous.svelte +1 -1
- package/paginations/TableData.svelte +1 -1
- package/progressbars/Progressbar.svelte +1 -1
- package/ratings/AdvancedRating.svelte +24 -0
- package/ratings/AdvancedRating.svelte.d.ts +28 -0
- package/ratings/Rating.svelte +25 -0
- package/ratings/Rating.svelte.d.ts +23 -0
- package/ratings/RatingComment.svelte +30 -0
- package/ratings/RatingComment.svelte.d.ts +28 -0
- package/ratings/ScoreRating.svelte +52 -0
- package/ratings/ScoreRating.svelte.d.ts +36 -0
- package/sidebars/Sidebar.svelte +1 -1
- package/sidebars/SidebarDropdown.svelte +1 -1
- package/spinners/Spinner.svelte +1 -1
- package/spinners/SpinnerButton.svelte +1 -1
- package/tables/Table.svelte +1 -1
- package/tables/TableCheckbox.svelte +1 -1
- package/tables/TableDefaultRow.svelte +1 -1
- package/tables/TableSearch.svelte +1 -1
- package/tabs/DefaultTabs.svelte +1 -1
- package/tabs/FullWidthTabs.svelte +1 -1
- package/tabs/IconTabs.svelte +1 -1
- package/tabs/InteractiveTabHead.svelte +1 -1
- package/tabs/InteractiveTabs.svelte +1 -1
- package/tabs/PillTabs.svelte +1 -1
- package/tabs/TabContent.svelte +1 -1
- package/tabs/UnderlineTabs.svelte +1 -1
- package/timelines/Activity.svelte +1 -1
- package/timelines/ActivityItem.svelte +1 -1
- package/timelines/Group.svelte +1 -1
- package/timelines/GroupItem.svelte +1 -1
- package/timelines/Timeline.svelte +1 -1
- package/timelines/TimelineHorizontal.svelte +1 -1
- package/timelines/TimelineItem.svelte +1 -1
- package/timelines/TimelineItemHorizontal.svelte +1 -1
- package/timelines/TimelineItemVertical.svelte +1 -1
- package/toasts/Toast.svelte +1 -1
- package/tooltips/LightTooltip.svelte +1 -1
- package/tooltips/Tooltip.svelte +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.14.16](https://github.com/themesberg/flowbite-svelte/compare/v0.14.15...v0.14.16) (2022-04-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* update svelte to 3.47.0 ([2c51f1c](https://github.com/themesberg/flowbite-svelte/commit/2c51f1c21907f7a977249e3dfe7c2fe46dd85553))
|
|
11
|
+
|
|
12
|
+
### [0.14.15](https://github.com/themesberg/flowbite-svelte/compare/v0.14.14...v0.14.15) (2022-04-23)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add loop to carousel components ([0ae0d66](https://github.com/themesberg/flowbite-svelte/commit/0ae0d66aaf74c7b588978ce88ab7c5117ee4a4e2))
|
|
18
|
+
|
|
19
|
+
### [0.14.14](https://github.com/themesberg/flowbite-svelte/compare/v0.14.13...v0.14.14) (2022-04-21)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* add Rating, AdvancedRating, and ScoreRating components ([8c91712](https://github.com/themesberg/flowbite-svelte/commit/8c91712d703364948b00c387a2b3f1d42be6159f))
|
|
25
|
+
|
|
5
26
|
### [0.14.13](https://github.com/themesberg/flowbite-svelte/compare/v0.14.12...v0.14.13) (2022-04-20)
|
|
6
27
|
|
|
7
28
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Shinichi Okada
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# FLOWBITE-SVELTE
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/flowbite-svelte)
|
|
4
|
+
[](https://www.npmjs.com/package/flowbite-svelte)
|
|
5
|
+
[](https://github.com/themesberg/flowbite-svelte/releases)
|
|
6
|
+
[](https://github.com/themesberg/flowbite-svelte/releases)
|
|
7
|
+
[](https://github.com/shinokada/svelte-feathericons/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
[Flowbite-Svelte](https://flowbite-svelte.vercel.app/) is an official Flowbite component library for Svelte. All interactivities are handled by Svelte.
|
|
4
15
|
|
|
5
16
|
## Installation
|
package/alerts/Alert.svelte
CHANGED
package/alerts/InfoAlert.svelte
CHANGED
package/auth/Confirm.svelte
CHANGED
package/auth/Login.svelte
CHANGED
package/auth/Register.svelte
CHANGED
package/auth/Reset.svelte
CHANGED
package/avatar/Avatar.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>export let avatar = {};
|
|
2
2
|
let isCircle = avatar.round ? 'rounded-full' : 'rounded';
|
|
3
3
|
let isBorder = avatar.border ? 'p-1 ring-2 ring-gray-300 dark:ring-gray-500' : '';
|
|
4
4
|
export let avatarClass = `w-${avatar.size} h-${avatar.size} ${isCircle} ${isBorder}`;
|
package/badges/Badge.svelte
CHANGED
package/badges/BadgeIcon.svelte
CHANGED
package/badges/BadgeLink.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>export let crumbs = [];
|
|
2
2
|
export let homeClass = 'inline-flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white';
|
|
3
3
|
export let crumbClass = 'ml-1 text-sm font-medium text-gray-700 hover:text-gray-900 md:ml-2 dark:text-gray-400 dark:hover:text-white';
|
|
4
4
|
export let solid = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>export let buttons;
|
|
2
2
|
let btnLength = buttons.length;
|
|
3
3
|
let classFirst = 'inline-flex relative items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-l-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white';
|
|
4
4
|
let classMiddle = 'inline-flex relative items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white border-t border-b border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>export let buttons;
|
|
2
2
|
let btnLength = buttons.length;
|
|
3
3
|
let classFirst = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent rounded-l-lg border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700';
|
|
4
4
|
let classMiddle = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent border-t border-b border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700';
|
package/buttons/Button.svelte
CHANGED
package/cards/Card.svelte
CHANGED
package/cards/CtaCard.svelte
CHANGED
package/cards/ListCard.svelte
CHANGED
package/cards/SignInCard.svelte
CHANGED
package/carousels/Caption.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>import Slide from './Slide.svelte';
|
|
2
2
|
import Thumbnail from './Thumbnail.svelte';
|
|
3
3
|
import Caption from './Caption.svelte';
|
|
4
4
|
import Indicator from './Indicator.svelte';
|
|
@@ -7,6 +7,8 @@ export let showCaptions = true;
|
|
|
7
7
|
export let showThumbs = true;
|
|
8
8
|
export let images;
|
|
9
9
|
export let slideControls = true;
|
|
10
|
+
export let loop = false;
|
|
11
|
+
export let duration = 2000;
|
|
10
12
|
// Carousel
|
|
11
13
|
export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
|
|
12
14
|
export let indicatorDivClass = 'flex absolute bottom-5 left-1/2 z-30 space-x-3 -translate-x-1/2';
|
|
@@ -37,6 +39,11 @@ const prevSlide = () => {
|
|
|
37
39
|
};
|
|
38
40
|
const goToSlide = (number) => (imageShowingIndex = number);
|
|
39
41
|
let thumbWidth = 100 / images.length;
|
|
42
|
+
if (loop) {
|
|
43
|
+
setInterval(() => {
|
|
44
|
+
nextSlide();
|
|
45
|
+
}, duration);
|
|
46
|
+
}
|
|
40
47
|
</script>
|
|
41
48
|
|
|
42
49
|
<div id="default-carousel" class="relative">
|
|
@@ -47,64 +54,21 @@ let thumbWidth = 100 / images.length;
|
|
|
47
54
|
<!-- Slider indicators -->
|
|
48
55
|
<div class={indicatorDivClass}>
|
|
49
56
|
{#each images as { id, imgurl, name, attribution }}
|
|
50
|
-
<Indicator
|
|
51
|
-
{name}
|
|
52
|
-
selected={imageShowingIndex === id}
|
|
53
|
-
on:click={() => goToSlide(id)}
|
|
54
|
-
{indicatorClass}
|
|
55
|
-
/>
|
|
57
|
+
<Indicator {name} selected={imageShowingIndex === id} on:click={() => goToSlide(id)} {indicatorClass} />
|
|
56
58
|
{/each}
|
|
57
59
|
</div>
|
|
58
60
|
{/if}
|
|
59
61
|
{#if slideControls}
|
|
60
62
|
<!-- Slider controls -->
|
|
61
|
-
<button
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
|
|
65
|
-
data-carousel-prev
|
|
66
|
-
>
|
|
67
|
-
<span
|
|
68
|
-
class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
|
|
69
|
-
>
|
|
70
|
-
<svg
|
|
71
|
-
class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
|
|
72
|
-
fill="none"
|
|
73
|
-
stroke="currentColor"
|
|
74
|
-
viewBox="0 0 24 24"
|
|
75
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
76
|
-
><path
|
|
77
|
-
stroke-linecap="round"
|
|
78
|
-
stroke-linejoin="round"
|
|
79
|
-
stroke-width="2"
|
|
80
|
-
d="M15 19l-7-7 7-7"
|
|
81
|
-
/></svg
|
|
82
|
-
>
|
|
63
|
+
<button on:click={prevSlide} type="button" class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-prev>
|
|
64
|
+
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
65
|
+
<svg class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" /></svg>
|
|
83
66
|
<span class="hidden">Previous</span>
|
|
84
67
|
</span>
|
|
85
68
|
</button>
|
|
86
|
-
<button
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
|
|
90
|
-
data-carousel-next
|
|
91
|
-
>
|
|
92
|
-
<span
|
|
93
|
-
class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
|
|
94
|
-
>
|
|
95
|
-
<svg
|
|
96
|
-
class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
|
|
97
|
-
fill="none"
|
|
98
|
-
stroke="currentColor"
|
|
99
|
-
viewBox="0 0 24 24"
|
|
100
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
101
|
-
><path
|
|
102
|
-
stroke-linecap="round"
|
|
103
|
-
stroke-linejoin="round"
|
|
104
|
-
stroke-width="2"
|
|
105
|
-
d="M9 5l7 7-7 7"
|
|
106
|
-
/></svg
|
|
107
|
-
>
|
|
69
|
+
<button on:click={nextSlide} type="button" class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-next>
|
|
70
|
+
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
71
|
+
<svg class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" /></svg>
|
|
108
72
|
<span class="hidden">Next</span>
|
|
109
73
|
</span>
|
|
110
74
|
</button>
|
|
@@ -118,15 +82,7 @@ let thumbWidth = 100 / images.length;
|
|
|
118
82
|
{#if showThumbs}
|
|
119
83
|
<div class="flex flex-row justify-center bg-gray-100">
|
|
120
84
|
{#each images as { id, imgurl, name, attribution }}
|
|
121
|
-
<Thumbnail
|
|
122
|
-
{thumbWidth}
|
|
123
|
-
thumbImg={imgurl}
|
|
124
|
-
altTag={name}
|
|
125
|
-
titleLink={attribution}
|
|
126
|
-
{id}
|
|
127
|
-
selected={imageShowingIndex === id}
|
|
128
|
-
on:click={() => goToSlide(id)}
|
|
129
|
-
/>
|
|
85
|
+
<Thumbnail {thumbWidth} thumbImg={imgurl} altTag={name} titleLink={attribution} {id} selected={imageShowingIndex === id} on:click={() => goToSlide(id)} />
|
|
130
86
|
{/each}
|
|
131
87
|
</div>
|
|
132
88
|
{/if}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>import { fade, blur, fly, slide } from 'svelte/transition';
|
|
2
2
|
import Slide from './Slide.svelte';
|
|
3
3
|
import Thumbnail from './Thumbnail.svelte';
|
|
4
4
|
import Caption from './Caption.svelte';
|
|
@@ -10,6 +10,8 @@ export let images;
|
|
|
10
10
|
export let slideControls = true;
|
|
11
11
|
export let transitionType;
|
|
12
12
|
export let transitionParams = {};
|
|
13
|
+
export let loop = false;
|
|
14
|
+
export let duration = 2000;
|
|
13
15
|
// have a custom transition function that returns the desired transition
|
|
14
16
|
function multiple(node, params) {
|
|
15
17
|
switch (transitionType) {
|
|
@@ -53,6 +55,11 @@ const prevSlide = () => {
|
|
|
53
55
|
};
|
|
54
56
|
const goToSlide = (number) => (imageShowingIndex = number);
|
|
55
57
|
let thumbWidth = 100 / images.length;
|
|
58
|
+
if (loop) {
|
|
59
|
+
setInterval(() => {
|
|
60
|
+
nextSlide();
|
|
61
|
+
}, duration);
|
|
62
|
+
}
|
|
56
63
|
</script>
|
|
57
64
|
|
|
58
65
|
<div id="default-carousel" class="relative">
|
|
@@ -70,64 +77,21 @@ let thumbWidth = 100 / images.length;
|
|
|
70
77
|
<!-- Slider indicators -->
|
|
71
78
|
<div class={indicatorDivClass}>
|
|
72
79
|
{#each images as { id, imgurl, name, attribution }}
|
|
73
|
-
<Indicator
|
|
74
|
-
{name}
|
|
75
|
-
selected={imageShowingIndex === id}
|
|
76
|
-
on:click={() => goToSlide(id)}
|
|
77
|
-
{indicatorClass}
|
|
78
|
-
/>
|
|
80
|
+
<Indicator {name} selected={imageShowingIndex === id} on:click={() => goToSlide(id)} {indicatorClass} />
|
|
79
81
|
{/each}
|
|
80
82
|
</div>
|
|
81
83
|
{/if}
|
|
82
84
|
{#if slideControls}
|
|
83
85
|
<!-- Slider controls -->
|
|
84
|
-
<button
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
|
|
88
|
-
data-carousel-prev
|
|
89
|
-
>
|
|
90
|
-
<span
|
|
91
|
-
class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
|
|
92
|
-
>
|
|
93
|
-
<svg
|
|
94
|
-
class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
|
|
95
|
-
fill="none"
|
|
96
|
-
stroke="currentColor"
|
|
97
|
-
viewBox="0 0 24 24"
|
|
98
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
99
|
-
><path
|
|
100
|
-
stroke-linecap="round"
|
|
101
|
-
stroke-linejoin="round"
|
|
102
|
-
stroke-width="2"
|
|
103
|
-
d="M15 19l-7-7 7-7"
|
|
104
|
-
/></svg
|
|
105
|
-
>
|
|
86
|
+
<button on:click={prevSlide} type="button" class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-prev>
|
|
87
|
+
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
88
|
+
<svg class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" /></svg>
|
|
106
89
|
<span class="hidden">Previous</span>
|
|
107
90
|
</span>
|
|
108
91
|
</button>
|
|
109
|
-
<button
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
|
|
113
|
-
data-carousel-next
|
|
114
|
-
>
|
|
115
|
-
<span
|
|
116
|
-
class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
|
|
117
|
-
>
|
|
118
|
-
<svg
|
|
119
|
-
class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
|
|
120
|
-
fill="none"
|
|
121
|
-
stroke="currentColor"
|
|
122
|
-
viewBox="0 0 24 24"
|
|
123
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
124
|
-
><path
|
|
125
|
-
stroke-linecap="round"
|
|
126
|
-
stroke-linejoin="round"
|
|
127
|
-
stroke-width="2"
|
|
128
|
-
d="M9 5l7 7-7 7"
|
|
129
|
-
/></svg
|
|
130
|
-
>
|
|
92
|
+
<button on:click={nextSlide} type="button" class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-next>
|
|
93
|
+
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
94
|
+
<svg class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" /></svg>
|
|
131
95
|
<span class="hidden">Next</span>
|
|
132
96
|
</span>
|
|
133
97
|
</button>
|
|
@@ -141,15 +105,7 @@ let thumbWidth = 100 / images.length;
|
|
|
141
105
|
{#if showThumbs}
|
|
142
106
|
<div class="flex flex-row justify-center bg-gray-100">
|
|
143
107
|
{#each images as { id, imgurl, name, attribution }}
|
|
144
|
-
<Thumbnail
|
|
145
|
-
{thumbWidth}
|
|
146
|
-
thumbImg={imgurl}
|
|
147
|
-
altTag={name}
|
|
148
|
-
titleLink={attribution}
|
|
149
|
-
{id}
|
|
150
|
-
selected={imageShowingIndex === id}
|
|
151
|
-
on:click={() => goToSlide(id)}
|
|
152
|
-
/>
|
|
108
|
+
<Thumbnail {thumbWidth} thumbImg={imgurl} altTag={name} titleLink={attribution} {id} selected={imageShowingIndex === id} on:click={() => goToSlide(id)} />
|
|
153
109
|
{/each}
|
|
154
110
|
</div>
|
|
155
111
|
{/if}
|
package/carousels/Slide.svelte
CHANGED
package/darkmode/DarkMode.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>import { onMount } from 'svelte';
|
|
2
2
|
export let btnClass = '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-2.5 fixed left-0 top-8 z-50';
|
|
3
3
|
let mode;
|
|
4
4
|
const toggleTheme = () => {
|
package/footer/LogoFooter.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>export let site;
|
|
2
2
|
export let links;
|
|
3
3
|
export let footerClass = 'p-4 bg-white rounded-lg shadow md:flex md:items-center md:justify-between md:p-6 dark:bg-gray-800';
|
|
4
4
|
export let siteNameClass = 'text-sm text-gray-500 sm:text-center dark:text-gray-400';
|
package/forms/Checkbox.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script>export let legend = 'Checkbox variants';
|
|
2
2
|
export let divClass = 'flex items-center mb-4';
|
|
3
3
|
export let inputClass = 'w-4 h-4 text-blue-600 bg-gray-100 rounded border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600';
|
|
4
4
|
export let labelClass = 'ml-3 text-sm font-medium text-gray-900 dark:text-gray-300';
|
package/forms/Fileupload.svelte
CHANGED