flowbite-svelte 1.29.1 → 1.30.0
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/dist/accordion/Accordion.svelte +24 -12
- package/dist/accordion/Accordion.svelte.d.ts +2 -2
- package/dist/accordion/AccordionItem.svelte +10 -8
- package/dist/accordion/AccordionItem.svelte.d.ts +1 -1
- package/dist/alert/Alert.svelte +1 -1
- package/dist/alert/Alert.svelte.d.ts +1 -1
- package/dist/avatar/Avatar.svelte +4 -4
- package/dist/avatar/Avatar.svelte.d.ts +1 -1
- package/dist/badge/Badge.svelte +2 -1
- package/dist/badge/Badge.svelte.d.ts +1 -1
- package/dist/banner/Banner.svelte +2 -1
- package/dist/banner/Banner.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNav.svelte +20 -12
- package/dist/bottom-navigation/BottomNav.svelte.d.ts +2 -2
- package/dist/bottom-navigation/BottomNavHeader.svelte +2 -1
- package/dist/bottom-navigation/BottomNavHeader.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte +1 -1
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavItem.svelte +10 -8
- package/dist/bottom-navigation/BottomNavItem.svelte.d.ts +1 -1
- package/dist/breadcrumb/Breadcrumb.svelte +4 -2
- package/dist/breadcrumb/Breadcrumb.svelte.d.ts +1 -1
- package/dist/breadcrumb/BreadcrumbItem.svelte +1 -1
- package/dist/breadcrumb/BreadcrumbItem.svelte.d.ts +1 -1
- package/dist/button-group/ButtonGroup.svelte +15 -4
- package/dist/button-group/ButtonGroup.svelte.d.ts +1 -1
- package/dist/buttons/Button.svelte +5 -4
- package/dist/buttons/GradientButton.svelte +4 -4
- package/dist/buttons/GradientButton.svelte.d.ts +1 -1
- package/dist/card/Card.svelte +2 -1
- package/dist/card/Card.svelte.d.ts +1 -1
- package/dist/carousel/Carousel.svelte +12 -13
- package/dist/carousel/Carousel.svelte.d.ts +1 -1
- package/dist/carousel/CarouselIndicators.svelte +19 -17
- package/dist/carousel/CarouselIndicators.svelte.d.ts +1 -1
- package/dist/carousel/ControlButton.svelte +2 -2
- package/dist/carousel/ControlButton.svelte.d.ts +1 -1
- package/dist/carousel/Controls.svelte +5 -4
- package/dist/carousel/Controls.svelte.d.ts +1 -1
- package/dist/carousel/Slide.svelte +8 -8
- package/dist/carousel/Slide.svelte.d.ts +1 -1
- package/dist/carousel/Thumbnail.svelte +1 -1
- package/dist/carousel/Thumbnail.svelte.d.ts +1 -1
- package/dist/carousel/Thumbnails.svelte +1 -1
- package/dist/carousel/Thumbnails.svelte.d.ts +1 -1
- package/dist/clipboard/Clipboard.svelte +1 -1
- package/dist/clipboard/Clipboard.svelte.d.ts +1 -1
- package/dist/clipboard-manager/ClipboardManager.svelte +7 -2
- package/dist/command-palette/CommandPalette.svelte +1 -1
- package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
- package/dist/context.d.ts +47 -0
- package/dist/context.js +72 -0
- package/dist/darkmode/DarkMode.svelte +1 -1
- package/dist/darkmode/DarkMode.svelte.d.ts +1 -1
- package/dist/datepicker/Datepicker.svelte +17 -11
- package/dist/device-mockups/Android.svelte +2 -1
- package/dist/device-mockups/Android.svelte.d.ts +1 -1
- package/dist/device-mockups/DefaultMockup.svelte +3 -1
- package/dist/device-mockups/DefaultMockup.svelte.d.ts +1 -1
- package/dist/device-mockups/Desktop.svelte +3 -1
- package/dist/device-mockups/Desktop.svelte.d.ts +1 -1
- package/dist/device-mockups/DeviceMockup.svelte +1 -1
- package/dist/device-mockups/DeviceMockup.svelte.d.ts +1 -1
- package/dist/device-mockups/Ios.svelte +3 -1
- package/dist/device-mockups/Ios.svelte.d.ts +1 -1
- package/dist/device-mockups/Laptop.svelte +3 -1
- package/dist/device-mockups/Laptop.svelte.d.ts +1 -1
- package/dist/device-mockups/Smartwatch.svelte +3 -1
- package/dist/device-mockups/Smartwatch.svelte.d.ts +1 -1
- package/dist/device-mockups/Tablet.svelte +3 -1
- package/dist/device-mockups/Tablet.svelte.d.ts +1 -1
- package/dist/device-mockups/theme.d.ts +12 -12
- package/dist/dialog/Dialog.svelte +1 -1
- package/dist/dialog/Dialog.svelte.d.ts +1 -1
- package/dist/drawer/Drawer.svelte +18 -9
- package/dist/drawer/Drawer.svelte.d.ts +2 -2
- package/dist/drawer/DrawerHandle.svelte +3 -3
- package/dist/drawer/DrawerHandle.svelte.d.ts +1 -1
- package/dist/drawer/Drawerhead.svelte +3 -1
- package/dist/drawer/Drawerhead.svelte.d.ts +1 -1
- package/dist/drawer/theme.d.ts +3 -3
- package/dist/drawer/theme.js +2 -2
- package/dist/dropdown/Dropdown.svelte +10 -7
- package/dist/dropdown/Dropdown.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownDivider.svelte +1 -1
- package/dist/dropdown/DropdownDivider.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownGroup.svelte +1 -1
- package/dist/dropdown/DropdownGroup.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownHeader.svelte +1 -1
- package/dist/dropdown/DropdownHeader.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownItem.svelte +6 -4
- package/dist/dropdown/DropdownItem.svelte.d.ts +1 -1
- package/dist/dropdown/theme.d.ts +3 -3
- package/dist/footer/Footer.svelte +1 -1
- package/dist/footer/Footer.svelte.d.ts +1 -1
- package/dist/footer/FooterBrand.svelte +1 -1
- package/dist/footer/FooterBrand.svelte.d.ts +1 -1
- package/dist/footer/FooterCopyright.svelte +6 -3
- package/dist/footer/FooterCopyright.svelte.d.ts +1 -1
- package/dist/footer/FooterIcon.svelte +1 -1
- package/dist/footer/FooterIcon.svelte.d.ts +1 -1
- package/dist/footer/FooterLink.svelte +3 -1
- package/dist/footer/FooterLink.svelte.d.ts +1 -1
- package/dist/footer/FooterLinkGroup.svelte +1 -1
- package/dist/footer/FooterLinkGroup.svelte.d.ts +1 -1
- package/dist/footer/theme.d.ts +3 -3
- package/dist/forms/button-toggle/ButtonToggle.svelte +29 -13
- package/dist/forms/button-toggle/ButtonToggle.svelte.d.ts +1 -1
- package/dist/forms/button-toggle/ButtonToggleGroup.svelte +32 -20
- package/dist/forms/button-toggle/CheckIcon.svelte +1 -1
- package/dist/forms/button-toggle/CheckIcon.svelte.d.ts +1 -1
- package/dist/forms/checkbox/Checkbox.svelte +2 -0
- package/dist/forms/checkbox/CheckboxButton.svelte +1 -1
- package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +1 -1
- package/dist/forms/dropzone/Dropzone.svelte +1 -1
- package/dist/forms/dropzone/Dropzone.svelte.d.ts +1 -1
- package/dist/forms/fileupload/Fileupload.svelte +3 -1
- package/dist/forms/fileupload/Fileupload.svelte.d.ts +1 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +3 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte.d.ts +1 -1
- package/dist/forms/helper/Helper.svelte +1 -1
- package/dist/forms/helper/Helper.svelte.d.ts +1 -1
- package/dist/forms/input-addon/InputAddon.svelte +18 -16
- package/dist/forms/input-addon/InputAddon.svelte.d.ts +1 -1
- package/dist/forms/input-field/Input.svelte +6 -5
- package/dist/forms/input-field/index.d.ts +1 -1
- package/dist/forms/input-field/theme.js +2 -2
- package/dist/forms/label/Label.svelte +1 -1
- package/dist/forms/label/Label.svelte.d.ts +1 -1
- package/dist/forms/radio/Radio.svelte +2 -0
- package/dist/forms/radio/Radio.svelte.d.ts +2 -2
- package/dist/forms/radio/RadioButton.svelte.d.ts +2 -2
- package/dist/forms/range/Range.svelte +1 -1
- package/dist/forms/range/Range.svelte.d.ts +1 -1
- package/dist/forms/search/Search.svelte +3 -1
- package/dist/forms/search/Search.svelte.d.ts +1 -1
- package/dist/forms/select/MultiSelect.svelte +8 -4
- package/dist/forms/select/Select.svelte +5 -5
- package/dist/forms/tags/Tags.svelte +2 -0
- package/dist/forms/tags/theme.d.ts +3 -3
- package/dist/forms/textarea/Textarea.svelte +3 -1
- package/dist/forms/textarea/Textarea.svelte.d.ts +1 -1
- package/dist/forms/timepicker/Timepicker.svelte +2 -2
- package/dist/forms/timepicker/Timepicker.svelte.d.ts +1 -1
- package/dist/forms/toggle/Toggle.svelte +3 -1
- package/dist/forms/toggle/Toggle.svelte.d.ts +1 -1
- package/dist/gallery/Gallery.svelte +3 -1
- package/dist/gallery/Gallery.svelte.d.ts +1 -1
- package/dist/gallery/theme.d.ts +3 -3
- package/dist/indicator/Indicator.svelte +2 -2
- package/dist/indicator/Indicator.svelte.d.ts +1 -1
- package/dist/kanban/KanbanCard.svelte +1 -1
- package/dist/kanban/KanbanCard.svelte.d.ts +1 -1
- package/dist/kbd/Kbd.svelte +2 -2
- package/dist/kbd/Kbd.svelte.d.ts +1 -1
- package/dist/list-group/Listgroup.svelte +15 -5
- package/dist/list-group/Listgroup.svelte.d.ts +1 -1
- package/dist/list-group/ListgroupItem.svelte +6 -5
- package/dist/list-group/ListgroupItem.svelte.d.ts +1 -1
- package/dist/mega-menu/MegaMenu.svelte +3 -2
- package/dist/mega-menu/MegaMenu.svelte.d.ts +1 -1
- package/dist/modal/Modal.svelte +4 -2
- package/dist/modal/Modal.svelte.d.ts +1 -1
- package/dist/navbar/Menu.svelte +5 -3
- package/dist/navbar/Menu.svelte.d.ts +1 -1
- package/dist/navbar/NavBrand.svelte +1 -1
- package/dist/navbar/NavBrand.svelte.d.ts +1 -1
- package/dist/navbar/NavContainer.svelte +1 -1
- package/dist/navbar/NavContainer.svelte.d.ts +1 -1
- package/dist/navbar/NavHamburger.svelte +9 -6
- package/dist/navbar/NavHamburger.svelte.d.ts +1 -1
- package/dist/navbar/NavLi.svelte +12 -8
- package/dist/navbar/NavLi.svelte.d.ts +1 -1
- package/dist/navbar/NavUl.svelte +10 -7
- package/dist/navbar/NavUl.svelte.d.ts +1 -1
- package/dist/navbar/Navbar.svelte +8 -5
- package/dist/navbar/Navbar.svelte.d.ts +1 -1
- package/dist/pagination/Pagination.svelte +18 -6
- package/dist/pagination/Pagination.svelte.d.ts +1 -1
- package/dist/pagination/PaginationButton.svelte +12 -13
- package/dist/pagination/PaginationButton.svelte.d.ts +1 -1
- package/dist/pagination/PaginationItem.svelte +14 -5
- package/dist/pagination/PaginationItem.svelte.d.ts +1 -1
- package/dist/pagination/PaginationNav.svelte +23 -10
- package/dist/pagination/PaginationNav.svelte.d.ts +1 -1
- package/dist/popover/Popover.svelte +3 -2
- package/dist/popover/Popover.svelte.d.ts +1 -1
- package/dist/progress/Progressbar.svelte +7 -5
- package/dist/progress/Progressbar.svelte.d.ts +1 -1
- package/dist/progress/Progressradial.svelte +8 -6
- package/dist/progress/Progressradial.svelte.d.ts +1 -1
- package/dist/rating/AdvancedRating.svelte +3 -1
- package/dist/rating/AdvancedRating.svelte.d.ts +1 -1
- package/dist/rating/CustomIcon.svelte +2 -2
- package/dist/rating/CustomIcon.svelte.d.ts +1 -1
- package/dist/rating/Heart.svelte +2 -2
- package/dist/rating/Heart.svelte.d.ts +1 -1
- package/dist/rating/Rating.svelte +8 -5
- package/dist/rating/Rating.svelte.d.ts +1 -1
- package/dist/rating/RatingComment.svelte +1 -1
- package/dist/rating/RatingComment.svelte.d.ts +1 -1
- package/dist/rating/Review.svelte +3 -1
- package/dist/rating/Review.svelte.d.ts +1 -1
- package/dist/rating/ScoreRating.svelte +1 -1
- package/dist/rating/ScoreRating.svelte.d.ts +1 -1
- package/dist/rating/Star.svelte +2 -2
- package/dist/rating/Star.svelte.d.ts +1 -1
- package/dist/rating/Thumbup.svelte +2 -2
- package/dist/rating/Thumbup.svelte.d.ts +1 -1
- package/dist/rating/theme.d.ts +6 -6
- package/dist/scroll-spy/ScrollSpy.svelte +5 -2
- package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
- package/dist/sidebar/Sidebar.svelte +24 -13
- package/dist/sidebar/Sidebar.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarBrand.svelte +3 -1
- package/dist/sidebar/SidebarBrand.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarButton.svelte +1 -1
- package/dist/sidebar/SidebarButton.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarCta.svelte +3 -1
- package/dist/sidebar/SidebarCta.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarDropdownWrapper.svelte +6 -9
- package/dist/sidebar/SidebarDropdownWrapper.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarGroup.svelte +1 -1
- package/dist/sidebar/SidebarGroup.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarItem.svelte +8 -8
- package/dist/sidebar/SidebarItem.svelte.d.ts +2 -2
- package/dist/sidebar/theme.d.ts +6 -6
- package/dist/skeleton/CardPlaceholder.svelte +1 -1
- package/dist/skeleton/CardPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/ListPlaceholder.svelte +1 -1
- package/dist/skeleton/ListPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/Skeleton.svelte +1 -1
- package/dist/skeleton/Skeleton.svelte.d.ts +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/TextPlaceholder.svelte +1 -1
- package/dist/skeleton/TextPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDial.svelte +6 -2
- package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDialButton.svelte +4 -2
- package/dist/speed-dial/SpeedDialButton.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDialTrigger.svelte +1 -1
- package/dist/speed-dial/SpeedDialTrigger.svelte.d.ts +1 -1
- package/dist/spinner/Spinner.svelte +1 -1
- package/dist/spinner/Spinner.svelte.d.ts +1 -1
- package/dist/split-pane/Divider.svelte +1 -1
- package/dist/split-pane/Divider.svelte.d.ts +1 -1
- package/dist/split-pane/Pane.svelte +2 -2
- package/dist/split-pane/Pane.svelte.d.ts +1 -1
- package/dist/split-pane/SplitPane.svelte +12 -37
- package/dist/split-pane/SplitPane.svelte.d.ts +1 -14
- package/dist/step-indicator/StepIndicator.svelte +61 -9
- package/dist/step-indicator/StepIndicator.svelte.d.ts +7 -5
- package/dist/stepper/BreadcrumbStepper.svelte +1 -4
- package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
- package/dist/stepper/CheckmarkIcon.svelte +2 -2
- package/dist/stepper/DetailedStepper.svelte +1 -4
- package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
- package/dist/stepper/ProgressStepper.svelte +1 -4
- package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
- package/dist/stepper/Stepper.svelte +1 -4
- package/dist/stepper/Stepper.svelte.d.ts +1 -1
- package/dist/stepper/TimelineStepper.svelte +1 -4
- package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
- package/dist/stepper/VerticalStepper.svelte +1 -4
- package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
- package/dist/table/Table.svelte +7 -5
- package/dist/table/Table.svelte.d.ts +1 -1
- package/dist/table/TableBody.svelte +1 -1
- package/dist/table/TableBody.svelte.d.ts +1 -1
- package/dist/table/TableBodyCell.svelte +1 -1
- package/dist/table/TableBodyCell.svelte.d.ts +1 -1
- package/dist/table/TableBodyRow.svelte +8 -8
- package/dist/table/TableBodyRow.svelte.d.ts +1 -1
- package/dist/table/TableHead.svelte +7 -7
- package/dist/table/TableHead.svelte.d.ts +1 -1
- package/dist/table/TableHeadCell.svelte +1 -1
- package/dist/table/TableHeadCell.svelte.d.ts +1 -1
- package/dist/table/TableSearch.svelte +12 -9
- package/dist/table/TableSearch.svelte.d.ts +1 -1
- package/dist/tabs/TabItem.svelte +14 -8
- package/dist/tabs/TabItem.svelte.d.ts +1 -1
- package/dist/tabs/Tabs.svelte +21 -10
- package/dist/tabs/Tabs.svelte.d.ts +1 -1
- package/dist/theme/ThemeProvider.svelte +8 -6
- package/dist/theme/themeUtils.d.ts +1 -1
- package/dist/theme/themeUtils.js +2 -2
- package/dist/timeline/Activity.svelte +1 -1
- package/dist/timeline/Activity.svelte.d.ts +1 -1
- package/dist/timeline/ActivityItem.svelte +3 -1
- package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
- package/dist/timeline/Group.svelte +3 -1
- package/dist/timeline/Group.svelte.d.ts +1 -1
- package/dist/timeline/GroupItem.svelte +3 -1
- package/dist/timeline/GroupItem.svelte.d.ts +1 -1
- package/dist/timeline/Timeline.svelte +4 -2
- package/dist/timeline/Timeline.svelte.d.ts +1 -1
- package/dist/timeline/TimelineItem.svelte +2 -1
- package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
- package/dist/timeline/theme.d.ts +30 -30
- package/dist/toast/Toast.svelte +3 -1
- package/dist/toast/Toast.svelte.d.ts +1 -1
- package/dist/toast/ToastContainer.svelte +2 -2
- package/dist/toast/ToastContainer.svelte.d.ts +1 -1
- package/dist/toolbar/Toolbar.svelte +15 -3
- package/dist/toolbar/Toolbar.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarButton.svelte +2 -4
- package/dist/toolbar/ToolbarButton.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarGroup.svelte +4 -4
- package/dist/toolbar/ToolbarGroup.svelte.d.ts +1 -1
- package/dist/tooltip/Tooltip.svelte +1 -1
- package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
- package/dist/tour/theme.js +1 -1
- package/dist/types.d.ts +84 -23
- package/dist/typography/a/A.svelte +1 -1
- package/dist/typography/a/A.svelte.d.ts +1 -1
- package/dist/typography/blockquote/Blockquote.svelte +1 -1
- package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
- package/dist/typography/descriptionlist/DescriptionList.svelte +1 -1
- package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
- package/dist/typography/heading/Heading.svelte +1 -1
- package/dist/typography/heading/Heading.svelte.d.ts +1 -1
- package/dist/typography/hr/Hr.svelte +5 -4
- package/dist/typography/img/Img.svelte +5 -4
- package/dist/typography/img/Img.svelte.d.ts +2 -2
- package/dist/typography/layout/Layout.svelte +1 -1
- package/dist/typography/layout/Layout.svelte.d.ts +1 -1
- package/dist/typography/list/Li.svelte +4 -4
- package/dist/typography/list/Li.svelte.d.ts +1 -1
- package/dist/typography/list/List.svelte +12 -4
- package/dist/typography/list/List.svelte.d.ts +1 -1
- package/dist/typography/mark/Mark.svelte +1 -1
- package/dist/typography/mark/Mark.svelte.d.ts +1 -1
- package/dist/typography/paragraph/P.svelte +1 -1
- package/dist/typography/paragraph/P.svelte.d.ts +1 -1
- package/dist/typography/secondary/Secondary.svelte +1 -1
- package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
- package/dist/typography/span/Span.svelte +1 -1
- package/dist/typography/span/Span.svelte.d.ts +1 -1
- package/dist/utils/Arrow.svelte +1 -1
- package/dist/utils/Arrow.svelte.d.ts +1 -1
- package/dist/utils/Popper.svelte +7 -4
- package/dist/utils/Popper.svelte.d.ts +1 -1
- package/dist/video/Video.svelte +1 -1
- package/dist/video/Video.svelte.d.ts +1 -1
- package/dist/virtual-masonry/VirtualMasonry.svelte +1 -1
- package/dist/virtuallist/VirtualList.svelte +1 -1
- package/package.json +13 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { setContext } from "svelte";
|
|
4
3
|
import { paginationNav } from "./theme";
|
|
5
|
-
import type { PaginationNavProps } from "..";
|
|
4
|
+
import type { PaginationNavProps, PaginationContextType } from "..";
|
|
6
5
|
import PaginationButton from "./PaginationButton.svelte";
|
|
7
6
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
7
|
+
import { setPaginationContext } from "../context";
|
|
8
8
|
|
|
9
9
|
function paginationRange(start: number, end: number): number[] {
|
|
10
10
|
return Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
@@ -31,18 +31,31 @@
|
|
|
31
31
|
...restProps
|
|
32
32
|
}: PaginationNavProps = $props();
|
|
33
33
|
|
|
34
|
+
// svelte-ignore state_referenced_locally
|
|
34
35
|
warnThemeDeprecation("PaginationNav", { prevClass, nextClass, spanClass, tableDivClass }, { prevClass: "prev", nextClass: "next", spanClass: "span", tableDivClass: "tableDiv" });
|
|
36
|
+
|
|
35
37
|
const styling = $derived(classes ?? { prev: prevClass, next: nextClass, span: spanClass, tableDiv: tableDivClass });
|
|
36
38
|
|
|
37
39
|
const theme = getTheme("paginationNav");
|
|
38
40
|
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
// Create context object
|
|
42
|
+
const ctx: PaginationContextType = {
|
|
43
|
+
get group() {
|
|
44
|
+
return true;
|
|
45
|
+
},
|
|
46
|
+
get size() {
|
|
47
|
+
return size;
|
|
48
|
+
},
|
|
49
|
+
get table() {
|
|
50
|
+
return layout === "table";
|
|
51
|
+
},
|
|
52
|
+
get activeClasses() {
|
|
53
|
+
return classes?.active;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Set context during initialization
|
|
58
|
+
setPaginationContext(ctx);
|
|
46
59
|
|
|
47
60
|
// Calculate visible pages range using Svelte 5 derived values
|
|
48
61
|
const halfVisiblePages = $derived(Math.floor(visiblePages / 2));
|
|
@@ -109,7 +122,7 @@
|
|
|
109
122
|
@component
|
|
110
123
|
[Go to docs](https://flowbite-svelte.com/)
|
|
111
124
|
## Type
|
|
112
|
-
[PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
125
|
+
[PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1266)
|
|
113
126
|
## Props
|
|
114
127
|
@prop currentPage = 1
|
|
115
128
|
@prop totalPages = 1
|
|
@@ -2,7 +2,7 @@ import type { PaginationNavProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1266)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop currentPage = 1
|
|
8
8
|
* @prop totalPages = 1
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
...restProps
|
|
20
20
|
}: PopoverProps = $props();
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// svelte-ignore state_referenced_locally
|
|
23
23
|
warnThemeDeprecation("Popover", { defaultClass }, { defaultClass: "content" });
|
|
24
|
+
|
|
24
25
|
const styling = $derived(classes ?? { content: defaultClass });
|
|
25
26
|
|
|
26
27
|
const theme = getTheme("popover");
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
@component
|
|
46
47
|
[Go to docs](https://flowbite-svelte.com/)
|
|
47
48
|
## Type
|
|
48
|
-
[PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
49
|
+
[PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1306)
|
|
49
50
|
## Props
|
|
50
51
|
@prop title: titleSlot
|
|
51
52
|
@prop color = "default"
|
|
@@ -2,7 +2,7 @@ import type { PopoverProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1306)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop title: titleSlot
|
|
8
8
|
* @prop color = "default"
|
|
@@ -23,10 +23,12 @@
|
|
|
23
23
|
|
|
24
24
|
const theme = getTheme("progressbar");
|
|
25
25
|
|
|
26
|
-
let _progress =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
let _progress = $derived(
|
|
27
|
+
new Tween(0, {
|
|
28
|
+
duration: animate ? tweenDuration : 0,
|
|
29
|
+
easing
|
|
30
|
+
})
|
|
31
|
+
);
|
|
30
32
|
const {
|
|
31
33
|
base,
|
|
32
34
|
label: labelInsideCls,
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
@component
|
|
67
69
|
[Go to docs](https://flowbite-svelte.com/)
|
|
68
70
|
## Type
|
|
69
|
-
[ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
71
|
+
[ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1316)
|
|
70
72
|
## Props
|
|
71
73
|
@prop progress = "45"
|
|
72
74
|
@prop precision = 0
|
|
@@ -2,7 +2,7 @@ import type { ProgressbarProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1316)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop progress = "45"
|
|
8
8
|
* @prop precision = 0
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
|
|
27
27
|
const theme = getTheme("progressradial");
|
|
28
28
|
|
|
29
|
-
const _progress =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const _progress = $derived(
|
|
30
|
+
new Tween(0, {
|
|
31
|
+
duration: animate ? tweenDuration : 0,
|
|
32
|
+
easing
|
|
33
|
+
})
|
|
34
|
+
);
|
|
33
35
|
|
|
34
36
|
const { base, label, background, foreground, outside, span, progressCls } = $derived(
|
|
35
37
|
progressradial({
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
});
|
|
44
46
|
|
|
45
47
|
// Calculate the circle properties
|
|
46
|
-
let circumference = 2 * Math.PI * radius;
|
|
48
|
+
let circumference = $derived(2 * Math.PI * radius);
|
|
47
49
|
// let strokeDashoffset = $state()
|
|
48
50
|
// Calculate the stroke-dashoffset based on progress
|
|
49
51
|
let strokeDashoffset = $derived(circumference - (_progress.current / 100) * circumference);
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
@component
|
|
92
94
|
[Go to docs](https://flowbite-svelte.com/)
|
|
93
95
|
## Type
|
|
94
|
-
[ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
96
|
+
[ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1327)
|
|
95
97
|
## Props
|
|
96
98
|
@prop progress = 45
|
|
97
99
|
@prop radius = 42
|
|
@@ -2,7 +2,7 @@ import type { ProgressradialProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1327)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop progress = 45
|
|
8
8
|
* @prop radius = 42
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
let { rating, globalText, ratings, divClass, spanClass, div2Class, div3Class, span2Class, class: className, classes, unit }: AdvancedRatingProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation(
|
|
10
11
|
"AdvancedRating",
|
|
11
12
|
{ divClass, spanClass, div2Class, div3Class, span2Class },
|
|
12
13
|
{ divClass: "class", spanClass: "span", div2Class: "div2", div3Class: "div3", span2Class: "span2" }
|
|
13
14
|
);
|
|
15
|
+
|
|
14
16
|
const styling = $derived(
|
|
15
17
|
classes ?? {
|
|
16
18
|
span: spanClass,
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
@component
|
|
46
48
|
[Go to docs](https://flowbite-svelte.com/)
|
|
47
49
|
## Type
|
|
48
|
-
[AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
50
|
+
[AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1344)
|
|
49
51
|
## Props
|
|
50
52
|
@prop rating
|
|
51
53
|
@prop globalText
|
|
@@ -2,7 +2,7 @@ import type { AdvancedRatingProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1344)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop rating
|
|
8
8
|
* @prop globalText
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
...restProps
|
|
17
17
|
}: RatingIconProps = $props();
|
|
18
18
|
|
|
19
|
-
const uniqueId = `${groupId}-${iconIndex}
|
|
19
|
+
const uniqueId = $derived(`${groupId}-${iconIndex}`);
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<svg width={size} height={size} class={clsx(svgClass)} {...restProps} aria-label={ariaLabel} viewBox="0 0 24 24" {role} stroke-width="1.5">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
@component
|
|
42
42
|
[Go to docs](https://flowbite-svelte.com/)
|
|
43
43
|
## Type
|
|
44
|
-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
44
|
+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
45
45
|
## Props
|
|
46
46
|
@prop fillPercent = 100
|
|
47
47
|
@prop fillColor = "#00ff00"
|
|
@@ -2,7 +2,7 @@ import type { RatingIconProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop fillPercent = 100
|
|
8
8
|
* @prop fillColor = "#00ff00"
|
package/dist/rating/Heart.svelte
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
...restProps
|
|
16
16
|
}: RatingIconProps = $props();
|
|
17
17
|
|
|
18
|
-
const uniqueId = `${groupId}-${iconIndex}
|
|
18
|
+
const uniqueId = $derived(`${groupId}-${iconIndex}`);
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<svg width={size} height={size} class={clsx(svgClass)} {...restProps} aria-label={ariaLabel} viewBox="0 0 24 24" {role} stroke-width="1.5" stroke="currentColor" fill="none">
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
@component
|
|
46
46
|
[Go to docs](https://flowbite-svelte.com/)
|
|
47
47
|
## Type
|
|
48
|
-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
48
|
+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
49
49
|
## Props
|
|
50
50
|
@prop fillPercent = 100
|
|
51
51
|
@prop fillColor = "#ff0000"
|
|
@@ -2,7 +2,7 @@ import type { RatingIconProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop fillPercent = 100
|
|
8
8
|
* @prop fillColor = "#ff0000"
|
|
@@ -7,17 +7,20 @@
|
|
|
7
7
|
|
|
8
8
|
let { children, text, class: className, classes, size = 24, total = 5, rating = 4, icon: Icon = Star, count = false, pClass, ...restProps }: RatingProps = $props();
|
|
9
9
|
|
|
10
|
+
// svelte-ignore state_referenced_locally
|
|
10
11
|
warnThemeDeprecation("Rating", { pClass }, { pClass: "p" });
|
|
12
|
+
|
|
11
13
|
const styling = $derived(classes ?? { p: pClass });
|
|
12
14
|
|
|
13
15
|
const theme = getTheme("rating");
|
|
14
16
|
|
|
15
17
|
const { base, p } = $derived(ratingVariants());
|
|
16
18
|
const ratingGroupId = crypto.randomUUID();
|
|
17
|
-
let
|
|
18
|
-
let
|
|
19
|
-
let
|
|
20
|
-
let
|
|
19
|
+
let clampedRating = $derived(Math.max(0, Math.min(rating, total)));
|
|
20
|
+
let fullStars = $derived(Math.floor(clampedRating));
|
|
21
|
+
let rateDifference = $derived(clampedRating - fullStars);
|
|
22
|
+
let percentRating = $derived(Math.round(rateDifference * 100));
|
|
23
|
+
let grayStars = $derived(total - (fullStars + Math.ceil(rateDifference)));
|
|
21
24
|
</script>
|
|
22
25
|
|
|
23
26
|
<div {...restProps} class={base({ class: clsx(theme?.base, className) })}>
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
@component
|
|
48
51
|
[Go to docs](https://flowbite-svelte.com/)
|
|
49
52
|
## Type
|
|
50
|
-
[RatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
53
|
+
[RatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1356)
|
|
51
54
|
## Props
|
|
52
55
|
@prop children
|
|
53
56
|
@prop text
|
|
@@ -2,7 +2,7 @@ import type { RatingProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [RatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [RatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1356)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop text
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
@component
|
|
64
64
|
[Go to docs](https://flowbite-svelte.com/)
|
|
65
65
|
## Type
|
|
66
|
-
[RatingCommentProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
66
|
+
[RatingCommentProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1367)
|
|
67
67
|
## Props
|
|
68
68
|
@prop children
|
|
69
69
|
@prop evaluation
|
|
@@ -2,7 +2,7 @@ import type { RatingCommentProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [RatingCommentProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [RatingCommentProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1367)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop evaluation
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
let { children, address, item1, item2, item3, review, classes, articleClass, divClass, div2Class, div3Class, imgClass, ulClass, liClass }: ReviewProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation(
|
|
10
11
|
"Review",
|
|
11
12
|
{ articleClass, divClass, div2Class, div3Class, imgClass, ulClass, liClass },
|
|
12
13
|
{ articleClass: "article", divClass: "div", div2Class: "div2", div3Class: "div3", imgClass: "img", ulClass: "ul", liClass: "li" }
|
|
13
14
|
);
|
|
15
|
+
|
|
14
16
|
const styling = $derived(
|
|
15
17
|
classes ?? {
|
|
16
18
|
article: articleClass,
|
|
@@ -98,7 +100,7 @@
|
|
|
98
100
|
@component
|
|
99
101
|
[Go to docs](https://flowbite-svelte.com/)
|
|
100
102
|
## Type
|
|
101
|
-
[ReviewProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
103
|
+
[ReviewProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1403)
|
|
102
104
|
## Props
|
|
103
105
|
@prop children
|
|
104
106
|
@prop address
|
|
@@ -2,7 +2,7 @@ import type { ReviewProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ReviewProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ReviewProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1403)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop address
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
@component
|
|
70
70
|
[Go to docs](https://flowbite-svelte.com/)
|
|
71
71
|
## Type
|
|
72
|
-
[ScoreRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
72
|
+
[ScoreRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1419)
|
|
73
73
|
## Props
|
|
74
74
|
@prop ratings
|
|
75
75
|
@prop ratings2
|
|
@@ -2,7 +2,7 @@ import type { ScoreRatingProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ScoreRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ScoreRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1419)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop ratings
|
|
8
8
|
* @prop ratings2
|
package/dist/rating/Star.svelte
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
...restProps
|
|
16
16
|
}: RatingIconProps = $props();
|
|
17
17
|
|
|
18
|
-
const uniqueId = `${groupId}-${iconIndex}
|
|
18
|
+
const uniqueId = $derived(`${groupId}-${iconIndex}`);
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<svg width={size} height={size} {...restProps} class={clsx(svgClass)} aria-label={ariaLabel} viewBox="100 100 120 120" {role}>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
@component
|
|
47
47
|
[Go to docs](https://flowbite-svelte.com/)
|
|
48
48
|
## Type
|
|
49
|
-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
49
|
+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
50
50
|
## Props
|
|
51
51
|
@prop fillPercent = 100
|
|
52
52
|
@prop fillColor = "#F5CA14"
|
|
@@ -2,7 +2,7 @@ import type { RatingIconProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop fillPercent = 100
|
|
8
8
|
* @prop fillColor = "#F5CA14"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
...restProps
|
|
16
16
|
}: RatingIconProps = $props();
|
|
17
17
|
|
|
18
|
-
const uniqueId = `${groupId}-${iconIndex}
|
|
18
|
+
const uniqueId = $derived(`${groupId}-${iconIndex}`);
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<svg width={size} height={size} {...restProps} class={clsx(svgClass)} aria-label={ariaLabel} viewBox="0 0 24 24" {role} stroke-width="1.5" stroke="currentColor" fill="none">
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
@component
|
|
46
46
|
[Go to docs](https://flowbite-svelte.com/)
|
|
47
47
|
## Type
|
|
48
|
-
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
48
|
+
[RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
49
49
|
## Props
|
|
50
50
|
@prop fillPercent = 100
|
|
51
51
|
@prop fillColor = "#00b500"
|
|
@@ -2,7 +2,7 @@ import type { RatingIconProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [RatingIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1430)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop fillPercent = 100
|
|
8
8
|
* @prop fillColor = "#00b500"
|
package/dist/rating/theme.d.ts
CHANGED
|
@@ -87,25 +87,25 @@ export declare const rating: import("tailwind-variants").TVReturnType<{
|
|
|
87
87
|
export declare const review: import("tailwind-variants").TVReturnType<{
|
|
88
88
|
[key: string]: {
|
|
89
89
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
90
|
-
img?: import("tailwind-merge").ClassNameValue;
|
|
91
90
|
article?: import("tailwind-merge").ClassNameValue;
|
|
92
91
|
div?: import("tailwind-merge").ClassNameValue;
|
|
92
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
93
|
+
li?: import("tailwind-merge").ClassNameValue;
|
|
93
94
|
ul?: import("tailwind-merge").ClassNameValue;
|
|
94
95
|
div2?: import("tailwind-merge").ClassNameValue;
|
|
95
96
|
div3?: import("tailwind-merge").ClassNameValue;
|
|
96
|
-
li?: import("tailwind-merge").ClassNameValue;
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
} | {
|
|
100
100
|
[x: string]: {
|
|
101
101
|
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
102
|
-
img?: import("tailwind-merge").ClassNameValue;
|
|
103
102
|
article?: import("tailwind-merge").ClassNameValue;
|
|
104
103
|
div?: import("tailwind-merge").ClassNameValue;
|
|
104
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
105
|
+
li?: import("tailwind-merge").ClassNameValue;
|
|
105
106
|
ul?: import("tailwind-merge").ClassNameValue;
|
|
106
107
|
div2?: import("tailwind-merge").ClassNameValue;
|
|
107
108
|
div3?: import("tailwind-merge").ClassNameValue;
|
|
108
|
-
li?: import("tailwind-merge").ClassNameValue;
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
} | {}, {
|
|
@@ -119,13 +119,13 @@ export declare const review: import("tailwind-variants").TVReturnType<{
|
|
|
119
119
|
}, undefined, {
|
|
120
120
|
[key: string]: {
|
|
121
121
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
122
|
-
img?: import("tailwind-merge").ClassNameValue;
|
|
123
122
|
article?: import("tailwind-merge").ClassNameValue;
|
|
124
123
|
div?: import("tailwind-merge").ClassNameValue;
|
|
124
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
125
|
+
li?: import("tailwind-merge").ClassNameValue;
|
|
125
126
|
ul?: import("tailwind-merge").ClassNameValue;
|
|
126
127
|
div2?: import("tailwind-merge").ClassNameValue;
|
|
127
128
|
div3?: import("tailwind-merge").ClassNameValue;
|
|
128
|
-
li?: import("tailwind-merge").ClassNameValue;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
131
|
} | {}, {
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
// Bottom margin determines how far up the viewport a section must scroll before becoming inactive
|
|
27
27
|
const ROOT_MARGIN_BOTTOM = "-40%";
|
|
28
28
|
|
|
29
|
-
let activeId = $state<string>(
|
|
29
|
+
let activeId = $state<string>("");
|
|
30
|
+
$effect(() => {
|
|
31
|
+
activeId = items.length > 0 ? items[0].id : "";
|
|
32
|
+
});
|
|
30
33
|
let isSticky = $state(false);
|
|
31
34
|
let navElement: HTMLElement | null = $state(null);
|
|
32
35
|
let scrollElement: Window | HTMLElement | null = $state(browser ? window : null);
|
|
@@ -255,7 +258,7 @@
|
|
|
255
258
|
@component
|
|
256
259
|
[Go to docs](https://flowbite-svelte.com/)
|
|
257
260
|
## Type
|
|
258
|
-
[ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
261
|
+
[ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2327)
|
|
259
262
|
## Props
|
|
260
263
|
@prop items
|
|
261
264
|
@prop position = "top"
|
|
@@ -2,7 +2,7 @@ import type { ScrollSpyProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ScrollSpyProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2327)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop items
|
|
8
8
|
* @prop position = "top"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { SidebarContextType, SidebarProps } from "../types";
|
|
3
3
|
import { trapFocus } from "../utils/actions";
|
|
4
4
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import {
|
|
6
|
+
import { setSidebarContext, setActiveUrlContext } from "../context";
|
|
7
7
|
import { sineIn } from "svelte/easing";
|
|
8
8
|
import { writable } from "svelte/store";
|
|
9
9
|
import { fly } from "svelte/transition";
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
...restProps
|
|
34
34
|
}: SidebarProps = $props();
|
|
35
35
|
|
|
36
|
+
// svelte-ignore state_referenced_locally
|
|
36
37
|
warnThemeDeprecation("Sidebar", { backdropClass, divClass, nonActiveClass, activeClass }, { backdropClass: "backdrop", divClass: "div", nonActiveClass: "nonactive", activeClass: "active" });
|
|
38
|
+
|
|
37
39
|
const styling = $derived(
|
|
38
40
|
classes ?? {
|
|
39
41
|
backdrop: backdropClass,
|
|
@@ -56,16 +58,21 @@
|
|
|
56
58
|
let innerWidth: number = $state(-1);
|
|
57
59
|
let isLargeScreen = $derived(disableBreakpoints ? false : alwaysOpen || innerWidth >= breakpointValues[breakpoint]);
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
// Create reactive context for activeUrl using getter
|
|
62
|
+
const activeUrlContext = {
|
|
63
|
+
get value() {
|
|
64
|
+
return activeUrl;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
setActiveUrlContext(activeUrlContext);
|
|
68
|
+
|
|
61
69
|
$effect(() => {
|
|
62
|
-
|
|
70
|
+
if (disableBreakpoints) isOpen = true;
|
|
63
71
|
});
|
|
64
|
-
|
|
65
|
-
if (disableBreakpoints) isOpen = true;
|
|
66
72
|
const { base, active, nonactive, div, backdrop: backdropCls } = $derived(sidebar({ isOpen, breakpoint, position, backdrop, alwaysOpen: alwaysOpen && !disableBreakpoints }));
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
const selectedStore = $derived(isSingle ? writable<object | null>(null) : undefined);
|
|
75
|
+
let sidebarCtx: SidebarContextType = {
|
|
69
76
|
get closeSidebar() {
|
|
70
77
|
return closeSidebar;
|
|
71
78
|
},
|
|
@@ -75,13 +82,17 @@
|
|
|
75
82
|
get nonActiveClass() {
|
|
76
83
|
return nonactive({ class: clsx(theme?.nonactive, styling.nonactive) });
|
|
77
84
|
},
|
|
78
|
-
isSingle
|
|
79
|
-
|
|
85
|
+
get isSingle() {
|
|
86
|
+
return isSingle;
|
|
87
|
+
},
|
|
88
|
+
get selected() {
|
|
89
|
+
return selectedStore;
|
|
90
|
+
}
|
|
80
91
|
};
|
|
81
92
|
|
|
82
|
-
let transitionParams = params ? params : { x: -320, duration: 200, easing: sineIn };
|
|
93
|
+
let transitionParams = $derived(params ? params : { x: -320, duration: 200, easing: sineIn });
|
|
83
94
|
|
|
84
|
-
|
|
95
|
+
setSidebarContext(sidebarCtx);
|
|
85
96
|
|
|
86
97
|
// Handler for Escape key
|
|
87
98
|
const handleEscape = () => {
|
|
@@ -128,7 +139,7 @@
|
|
|
128
139
|
@component
|
|
129
140
|
[Go to docs](https://flowbite-svelte.com/)
|
|
130
141
|
## Type
|
|
131
|
-
[SidebarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
142
|
+
[SidebarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1453)
|
|
132
143
|
## Props
|
|
133
144
|
@prop children
|
|
134
145
|
@prop isOpen = false
|
|
@@ -2,7 +2,7 @@ import type { SidebarProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [SidebarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [SidebarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1453)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop isOpen = false
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
let { children, site, imgClass, spanClass, class: className, classes, ...restProps }: SidebarBrandProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation("SidebarBrand", { imgClass, spanClass }, { imgClass: "img", spanClass: "span" });
|
|
11
|
+
|
|
10
12
|
const styling = $derived(
|
|
11
13
|
classes ?? {
|
|
12
14
|
img: imgClass,
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
@component
|
|
33
35
|
[Go to docs](https://flowbite-svelte.com/)
|
|
34
36
|
## Type
|
|
35
|
-
[SidebarBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
37
|
+
[SidebarBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1490)
|
|
36
38
|
## Props
|
|
37
39
|
@prop children
|
|
38
40
|
@prop site
|