Skip to content

Commit 97318c7

Browse files
committed
v1.3.1
1 parent e73cf5f commit 97318c7

File tree

159 files changed

+260
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+260
-226
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.3.1
4+
5+
### Patch Changes
6+
7+
- feat: add visiblePages to PaginationNav
8+
39
## 1.3.0
410

511
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowbite-svelte",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Flowbite components for Svelte",
55
"main": "dist/index.js",
66
"author": {

src/lib/pagination/Pagination.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
@component
5151
[Go to docs](https://flowbite-svelte.com/)
5252
## Type
53-
[PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1124)
53+
[PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1125)
5454
## Props
5555
@prop pages = []
5656
@prop previous

src/lib/pagination/PaginationItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@component
3030
[Go to docs](https://flowbite-svelte.com/)
3131
## Type
32-
[PaginationItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1120)
32+
[PaginationItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1121)
3333
## Props
3434
@prop children
3535
@prop size

src/lib/pagination/PaginationNav.svelte

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
return Array.from({ length: end - start + 1 }, (_, i) => start + i);
88
}
99
10-
let {
11-
currentPage = 1,
12-
totalPages = 1,
13-
visiblePages = 5, // New prop to control visible pages
14-
onPageChange,
15-
prevContent,
16-
nextContent,
17-
prevClass,
18-
nextClass,
19-
layout = "pagination",
20-
nextLabel = "Next",
21-
previousLabel = "Previous",
22-
ariaLabel = "Page navigation",
23-
size = "default",
24-
class: className,
25-
spanClass,
26-
tableDivClass,
27-
...restProps
10+
let {
11+
currentPage = 1,
12+
totalPages = 1,
13+
visiblePages = 5, // New prop to control visible pages
14+
onPageChange,
15+
prevContent,
16+
nextContent,
17+
prevClass,
18+
nextClass,
19+
layout = "pagination",
20+
nextLabel = "Next",
21+
previousLabel = "Previous",
22+
ariaLabel = "Page navigation",
23+
size = "default",
24+
class: className,
25+
spanClass,
26+
tableDivClass,
27+
...restProps
2828
}: PaginationNavProps = $props();
2929
3030
// Set context values for child components
@@ -34,15 +34,7 @@
3434
3535
// Calculate visible pages range using Svelte 5 derived values
3636
const halfVisiblePages = $derived(Math.floor(visiblePages / 2));
37-
const lastPage = $derived(Math.min(
38-
Math.max(
39-
layout === "pagination"
40-
? currentPage + halfVisiblePages
41-
: currentPage + halfVisiblePages * 2,
42-
visiblePages
43-
),
44-
totalPages
45-
));
37+
const lastPage = $derived(Math.min(Math.max(layout === "pagination" ? currentPage + halfVisiblePages : currentPage + halfVisiblePages * 2, visiblePages), totalPages));
4638
const firstPage = $derived(Math.max(1, lastPage - visiblePages + 1));
4739
4840
// Generate array of page numbers to display
@@ -99,4 +91,29 @@
9991
</PaginationButton>
10092
</li>
10193
</ul>
102-
</nav>
94+
</nav>
95+
96+
<!--
97+
@component
98+
[Go to docs](https://flowbite-svelte.com/)
99+
## Type
100+
[PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1101)
101+
## Props
102+
@prop currentPage = 1
103+
@prop totalPages = 1
104+
@prop visiblePages = 5
105+
@prop onPageChange
106+
@prop prevContent
107+
@prop nextContent
108+
@prop prevClass
109+
@prop nextClass
110+
@prop layout = "pagination"
111+
@prop nextLabel = "Next"
112+
@prop previousLabel = "Previous"
113+
@prop ariaLabel = "Page navigation"
114+
@prop size = "default"
115+
@prop class: className
116+
@prop spanClass
117+
@prop tableDivClass
118+
@prop ...restProps
119+
-->

src/lib/popover/Popover.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
@component
2727
[Go to docs](https://flowbite-svelte.com/)
2828
## Type
29-
[PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1134)
29+
[PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1135)
3030
## Props
3131
@prop title: titleSlot
3232
@prop color = "default"

src/lib/progress/Progressbar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@component
4444
[Go to docs](https://flowbite-svelte.com/)
4545
## Type
46-
[ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1144)
46+
[ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1145)
4747
## Props
4848
@prop progress = "45"
4949
@prop precision = 0

src/lib/progress/Progressradial.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
@component
6363
[Go to docs](https://flowbite-svelte.com/)
6464
## Type
65-
[ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1161)
65+
[ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1162)
6666
## Props
6767
@prop progress = 45
6868
@prop radius = 42

src/lib/rating/AdvancedRating.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@component
2828
[Go to docs](https://flowbite-svelte.com/)
2929
## Type
30-
[AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1185)
30+
[AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1186)
3131
## Props
3232
@prop rating
3333
@prop globalText

src/lib/rating/CustomIcon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@component
2929
[Go to docs](https://flowbite-svelte.com/)
3030
## Type
31-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1271)
31+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1272)
3232
## Props
3333
@prop fillPercent = 100
3434
@prop fillColor = "#00ff00"

src/lib/rating/Heart.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@component
2828
[Go to docs](https://flowbite-svelte.com/)
2929
## Type
30-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1271)
30+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1272)
3131
## Props
3232
@prop fillPercent = 100
3333
@prop fillColor = "#ff0000"

src/lib/rating/Rating.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@component
4242
[Go to docs](https://flowbite-svelte.com/)
4343
## Type
44-
[RatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1197)
44+
[RatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1198)
4545
## Props
4646
@prop children
4747
@prop text

src/lib/rating/RatingComment.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@component
6464
[Go to docs](https://flowbite-svelte.com/)
6565
## Type
66-
[RatingCommentProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1208)
66+
[RatingCommentProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1209)
6767
## Props
6868
@prop children
6969
@prop evaluation

src/lib/rating/Review.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
@component
7979
[Go to docs](https://flowbite-svelte.com/)
8080
## Type
81-
[ReviewProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1244)
81+
[ReviewProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1245)
8282
## Props
8383
@prop children
8484
@prop address

src/lib/rating/ScoreRating.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
@component
6666
[Go to docs](https://flowbite-svelte.com/)
6767
## Type
68-
[ScoreRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1260)
68+
[ScoreRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1261)
6969
## Props
7070
@prop ratings
7171
@prop ratings2

src/lib/rating/Star.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@component
3535
[Go to docs](https://flowbite-svelte.com/)
3636
## Type
37-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1271)
37+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1272)
3838
## Props
3939
@prop fillPercent = 100
4040
@prop fillColor = "#F5CA14"

src/lib/rating/Thumbup.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@component
2828
[Go to docs](https://flowbite-svelte.com/)
2929
## Type
30-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1271)
30+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1272)
3131
## Props
3232
@prop fillPercent = 100
3333
@prop fillColor = "#00b500"

src/lib/sidebar/Sidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
@component
7979
[Go to docs](https://flowbite-svelte.com/)
8080
## Type
81-
[SidebarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1294)
81+
[SidebarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1295)
8282
## Props
8383
@prop children
8484
@prop isOpen = false

src/lib/sidebar/SidebarBrand.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@component
2222
[Go to docs](https://flowbite-svelte.com/)
2323
## Type
24-
[SidebarBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1328)
24+
[SidebarBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1329)
2525
## Props
2626
@prop children
2727
@prop site

src/lib/sidebar/SidebarButton.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@component
1919
[Go to docs](https://flowbite-svelte.com/)
2020
## Type
21-
[SidebarButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1311)
21+
[SidebarButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1312)
2222
## Props
2323
@prop breakpoint = "md"
2424
@prop class: className

src/lib/sidebar/SidebarCta.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@component
2222
[Go to docs](https://flowbite-svelte.com/)
2323
## Type
24-
[SidebarCtaProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1315)
24+
[SidebarCtaProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1316)
2525
## Props
2626
@prop children
2727
@prop icon

src/lib/sidebar/SidebarDropdownWrapper.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
@component
8282
[Go to docs](https://flowbite-svelte.com/)
8383
## Type
84-
[SidebarDropdownWrapperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1334)
84+
[SidebarDropdownWrapperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1335)
8585
## Props
8686
@prop children
8787
@prop arrowup

src/lib/sidebar/SidebarGroup.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@component
1313
[Go to docs](https://flowbite-svelte.com/)
1414
## Type
15-
[SidebarGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1351)
15+
[SidebarGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1352)
1616
## Props
1717
@prop children
1818
@prop class: className = "space-y-2"

src/lib/sidebar/SidebarItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@component
4444
[Go to docs](https://flowbite-svelte.com/)
4545
## Type
46-
[SidebarItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1357)
46+
[SidebarItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1358)
4747
## Props
4848
@prop icon
4949
@prop subtext

src/lib/skeleton/CardPlaceholder.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@component
3333
[Go to docs](https://flowbite-svelte.com/)
3434
## Type
35-
[CardPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1369)
35+
[CardPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1370)
3636
## Props
3737
@prop size = "sm"
3838
@prop class: className

src/lib/skeleton/ImagePlaceholder.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@component
3838
[Go to docs](https://flowbite-svelte.com/)
3939
## Type
40-
[ImagePlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1373)
40+
[ImagePlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1374)
4141
## Props
4242
@prop size = "md"
4343
@prop rounded

src/lib/skeleton/ListPlaceholder.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@component
2929
[Go to docs](https://flowbite-svelte.com/)
3030
## Type
31-
[ListPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1379)
31+
[ListPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1380)
3232
## Props
3333
@prop itemNumber = 5
3434
@prop size = "md"

src/lib/skeleton/Skeleton.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@component
2323
[Go to docs](https://flowbite-svelte.com/)
2424
## Type
25-
[SkeletonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1385)
25+
[SkeletonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1386)
2626
## Props
2727
@prop size = "sm"
2828
@prop class: className

src/lib/skeleton/TextPlaceholder.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
@component
5050
[Go to docs](https://flowbite-svelte.com/)
5151
## Type
52-
[TextPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1389)
52+
[TextPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1390)
5353
## Props
5454
@prop size = "sm"
5555
@prop class: className

src/lib/skeleton/VideoPlaceholder.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@component
1919
[Go to docs](https://flowbite-svelte.com/)
2020
## Type
21-
[VideoPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1393)
21+
[VideoPlaceholderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1394)
2222
## Props
2323
@prop size = "sm"
2424
@prop class: className

src/lib/speed-dial/SpeedDial.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@component
2828
[Go to docs](https://flowbite-svelte.com/)
2929
## Type
30-
[SpeedDialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1427)
30+
[SpeedDialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1428)
3131
## Props
3232
@prop children
3333
@prop popperClass

src/lib/speed-dial/SpeedDialButton.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@component
2828
[Go to docs](https://flowbite-svelte.com/)
2929
## Type
30-
[SpeedDialButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1441)
30+
[SpeedDialButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1442)
3131
## Props
3232
@prop children
3333
@prop name = ""

src/lib/speed-dial/SpeedDialTrigger.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@component
4444
[Go to docs](https://flowbite-svelte.com/)
4545
## Type
46-
[SpeedDialTriggerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1425)
46+
[SpeedDialTriggerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1426)
4747
## Props
4848
@prop children
4949
@prop name = "Open actions menu"

src/lib/spinner/Spinner.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@component
1818
[Go to docs](https://flowbite-svelte.com/)
1919
## Type
20-
[SpinnerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1459)
20+
[SpinnerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1460)
2121
## Props
2222
@prop color = "primary"
2323
@prop size = "8"

src/lib/stepindicator/StepIndicator.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
@component
7373
[Go to docs](https://flowbite-svelte.com/)
7474
## Type
75-
[StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1469)
75+
[StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1470)
7676
## Props
7777
@prop steps = ["Step 1", "Step 2", "Step 3", "Step 4", "Step 5"]
7878
@prop currentStep = 1

0 commit comments

Comments
 (0)