flowbite-svelte 1.10.6 → 1.10.7
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 +1 -1
- package/dist/accordion/Accordion.svelte.d.ts +1 -1
- package/dist/accordion/AccordionItem.svelte +16 -11
- package/dist/accordion/AccordionItem.svelte.d.ts +2 -1
- package/dist/accordion/theme.d.ts +4 -0
- package/dist/alert/Alert.svelte +1 -1
- package/dist/alert/Alert.svelte.d.ts +1 -1
- package/dist/avatar/Avatar.svelte +1 -1
- package/dist/avatar/Avatar.svelte.d.ts +1 -1
- package/dist/avatar/theme.d.ts +2 -0
- package/dist/badge/Badge.svelte +11 -6
- package/dist/badge/Badge.svelte.d.ts +2 -1
- package/dist/badge/theme.d.ts +3 -2
- package/dist/banner/Banner.svelte +9 -5
- package/dist/banner/Banner.svelte.d.ts +2 -1
- package/dist/banner/theme.d.ts +2 -1
- package/dist/bottom-navigation/BottomNav.svelte +16 -11
- package/dist/bottom-navigation/BottomNav.svelte.d.ts +3 -1
- package/dist/bottom-navigation/BottomNavHeader.svelte +11 -6
- package/dist/bottom-navigation/BottomNavHeader.svelte.d.ts +3 -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 +25 -27
- package/dist/bottom-navigation/BottomNavItem.svelte.d.ts +3 -3
- package/dist/bottom-navigation/theme.d.ts +54 -48
- package/dist/bottom-navigation/theme.js +16 -16
- package/dist/breadcrumb/Breadcrumb.svelte +1 -1
- 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 +1 -1
- package/dist/button-group/ButtonGroup.svelte.d.ts +1 -1
- package/dist/buttons/Button.svelte +1 -1
- package/dist/buttons/Button.svelte.d.ts +1 -1
- package/dist/buttons/GradientButton.svelte +1 -1
- package/dist/buttons/GradientButton.svelte.d.ts +1 -1
- package/dist/card/Card.svelte +1 -1
- package/dist/card/Card.svelte.d.ts +1 -1
- package/dist/carousel/Carousel.svelte +1 -1
- package/dist/carousel/Carousel.svelte.d.ts +1 -1
- package/dist/carousel/CarouselIndicators.svelte +1 -1
- package/dist/carousel/CarouselIndicators.svelte.d.ts +1 -1
- package/dist/carousel/ControlButton.svelte +1 -1
- package/dist/carousel/ControlButton.svelte.d.ts +1 -1
- package/dist/carousel/Controls.svelte +1 -1
- package/dist/carousel/Controls.svelte.d.ts +1 -1
- package/dist/carousel/Slide.svelte +1 -1
- 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/darkmode/DarkMode.svelte +1 -1
- package/dist/darkmode/DarkMode.svelte.d.ts +1 -1
- package/dist/datepicker/Datepicker.svelte +1 -1
- package/dist/datepicker/Datepicker.svelte.d.ts +1 -1
- package/dist/device-mockups/Android.svelte +1 -1
- package/dist/device-mockups/Android.svelte.d.ts +1 -1
- package/dist/device-mockups/DefaultMockup.svelte +1 -1
- package/dist/device-mockups/DefaultMockup.svelte.d.ts +1 -1
- package/dist/device-mockups/Desktop.svelte +1 -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 +1 -1
- package/dist/device-mockups/Ios.svelte.d.ts +1 -1
- package/dist/device-mockups/Laptop.svelte +1 -1
- package/dist/device-mockups/Laptop.svelte.d.ts +1 -1
- package/dist/device-mockups/Smartwatch.svelte +1 -1
- package/dist/device-mockups/Smartwatch.svelte.d.ts +1 -1
- package/dist/device-mockups/Tablet.svelte +1 -1
- package/dist/device-mockups/Tablet.svelte.d.ts +1 -1
- package/dist/drawer/Drawer.svelte +1 -1
- package/dist/drawer/Drawer.svelte.d.ts +1 -1
- package/dist/drawer/Drawerhead.svelte +1 -1
- package/dist/drawer/Drawerhead.svelte.d.ts +1 -1
- package/dist/dropdown/Dropdown.svelte +1 -1
- 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 +1 -1
- package/dist/dropdown/DropdownItem.svelte.d.ts +1 -1
- 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 +1 -1
- 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 +1 -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/forms/button-toggle/ButtonToggle.svelte +1 -1
- package/dist/forms/button-toggle/ButtonToggle.svelte.d.ts +1 -1
- package/dist/forms/button-toggle/CheckIcon.svelte +1 -1
- package/dist/forms/button-toggle/CheckIcon.svelte.d.ts +1 -1
- package/dist/forms/checkbox/CheckboxButton.svelte +1 -1
- package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +1 -1
- package/dist/forms/dropzone/Dropzone.svelte +21 -30
- package/dist/forms/dropzone/Dropzone.svelte.d.ts +4 -1
- package/dist/forms/fileupload/Fileupload.svelte +1 -1
- package/dist/forms/fileupload/Fileupload.svelte.d.ts +1 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +1 -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 +1 -1
- package/dist/forms/input-addon/InputAddon.svelte.d.ts +1 -1
- package/dist/forms/label/Label.svelte +1 -1
- package/dist/forms/label/Label.svelte.d.ts +1 -1
- package/dist/forms/range/Range.svelte +1 -1
- package/dist/forms/range/Range.svelte.d.ts +1 -1
- package/dist/forms/search/Search.svelte +1 -1
- package/dist/forms/search/Search.svelte.d.ts +1 -1
- package/dist/forms/tags/Tags.svelte +1 -1
- package/dist/forms/tags/Tags.svelte.d.ts +1 -1
- package/dist/forms/textarea/Textarea.svelte +1 -1
- package/dist/forms/textarea/Textarea.svelte.d.ts +1 -1
- package/dist/forms/timepicker/Timepicker.svelte +1 -1
- package/dist/forms/timepicker/Timepicker.svelte.d.ts +1 -1
- package/dist/forms/toggle/Toggle.svelte +1 -1
- package/dist/forms/toggle/Toggle.svelte.d.ts +1 -1
- package/dist/gallery/Gallery.svelte +1 -1
- package/dist/gallery/Gallery.svelte.d.ts +1 -1
- package/dist/indicator/Indicator.svelte +1 -1
- package/dist/indicator/Indicator.svelte.d.ts +1 -1
- package/dist/kbd/Kbd.svelte +1 -1
- package/dist/kbd/Kbd.svelte.d.ts +1 -1
- package/dist/list-group/Listgroup.svelte +1 -1
- package/dist/list-group/Listgroup.svelte.d.ts +1 -1
- package/dist/list-group/ListgroupItem.svelte +1 -1
- package/dist/list-group/ListgroupItem.svelte.d.ts +1 -1
- package/dist/mega-menu/MegaMenu.svelte +1 -1
- package/dist/mega-menu/MegaMenu.svelte.d.ts +1 -1
- package/dist/modal/Modal.svelte +1 -1
- package/dist/modal/Modal.svelte.d.ts +1 -1
- package/dist/navbar/Menu.svelte +1 -1
- 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 +1 -1
- package/dist/navbar/NavHamburger.svelte.d.ts +1 -1
- package/dist/navbar/NavLi.svelte +1 -1
- package/dist/navbar/NavLi.svelte.d.ts +1 -1
- package/dist/navbar/NavUl.svelte +1 -1
- package/dist/navbar/NavUl.svelte.d.ts +1 -1
- package/dist/navbar/Navbar.svelte +1 -1
- package/dist/navbar/Navbar.svelte.d.ts +1 -1
- package/dist/pagination/Pagination.svelte +1 -1
- package/dist/pagination/Pagination.svelte.d.ts +1 -1
- package/dist/pagination/PaginationButton.svelte +1 -1
- package/dist/pagination/PaginationButton.svelte.d.ts +1 -1
- package/dist/pagination/PaginationItem.svelte +1 -1
- package/dist/pagination/PaginationItem.svelte.d.ts +1 -1
- package/dist/pagination/PaginationNav.svelte +1 -1
- package/dist/pagination/PaginationNav.svelte.d.ts +1 -1
- package/dist/popover/Popover.svelte +1 -1
- package/dist/popover/Popover.svelte.d.ts +1 -1
- package/dist/progress/Progressbar.svelte +1 -1
- package/dist/progress/Progressbar.svelte.d.ts +1 -1
- package/dist/progress/Progressradial.svelte +1 -1
- package/dist/progress/Progressradial.svelte.d.ts +1 -1
- package/dist/rating/AdvancedRating.svelte +1 -1
- package/dist/rating/AdvancedRating.svelte.d.ts +1 -1
- package/dist/rating/CustomIcon.svelte +1 -1
- package/dist/rating/CustomIcon.svelte.d.ts +1 -1
- package/dist/rating/Heart.svelte +1 -1
- package/dist/rating/Heart.svelte.d.ts +1 -1
- package/dist/rating/Rating.svelte +1 -1
- 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 +1 -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 +1 -1
- package/dist/rating/Star.svelte.d.ts +1 -1
- package/dist/rating/Thumbup.svelte +1 -1
- package/dist/rating/Thumbup.svelte.d.ts +1 -1
- package/dist/sidebar/Sidebar.svelte +1 -1
- package/dist/sidebar/Sidebar.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarBrand.svelte +1 -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 +1 -1
- package/dist/sidebar/SidebarCta.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarDropdownWrapper.svelte +1 -1
- 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 +1 -1
- package/dist/sidebar/SidebarItem.svelte.d.ts +1 -1
- package/dist/sidebar/theme.d.ts +3 -3
- 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 +1 -1
- package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDialButton.svelte +1 -1
- 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/stepindicator/StepIndicator.svelte +1 -1
- package/dist/stepindicator/StepIndicator.svelte.d.ts +1 -1
- package/dist/stepper/BreadcrumbStepper.svelte +1 -1
- package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
- package/dist/stepper/DetailedStepper.svelte +1 -1
- package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
- package/dist/stepper/ProgressStepper.svelte +1 -1
- package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
- package/dist/stepper/Stepper.svelte +1 -1
- package/dist/stepper/Stepper.svelte.d.ts +1 -1
- package/dist/stepper/TimelineStepper.svelte +1 -1
- package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
- package/dist/stepper/VerticalStepper.svelte +1 -1
- package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
- package/dist/table/Table.svelte +1 -1
- 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 +1 -1
- package/dist/table/TableBodyRow.svelte.d.ts +1 -1
- package/dist/table/TableHead.svelte +1 -1
- 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 +1 -1
- package/dist/table/TableSearch.svelte.d.ts +1 -1
- package/dist/tabs/TabItem.svelte +1 -1
- package/dist/tabs/TabItem.svelte.d.ts +1 -1
- package/dist/tabs/Tabs.svelte +1 -1
- package/dist/tabs/Tabs.svelte.d.ts +1 -1
- package/dist/theme/themeUtils.d.ts +13 -0
- package/dist/theme/themeUtils.js +9 -1
- package/dist/timeline/Activity.svelte +1 -1
- package/dist/timeline/Activity.svelte.d.ts +1 -1
- package/dist/timeline/ActivityItem.svelte +1 -1
- package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
- package/dist/timeline/Group.svelte +1 -1
- package/dist/timeline/Group.svelte.d.ts +1 -1
- package/dist/timeline/GroupItem.svelte +1 -1
- package/dist/timeline/GroupItem.svelte.d.ts +1 -1
- package/dist/timeline/Timeline.svelte +1 -1
- package/dist/timeline/Timeline.svelte.d.ts +1 -1
- package/dist/timeline/TimelineItem.svelte +1 -1
- package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
- package/dist/timeline/theme.d.ts +12 -12
- package/dist/toast/Toast.svelte +1 -1
- package/dist/toast/Toast.svelte.d.ts +1 -1
- package/dist/toolbar/Toolbar.svelte +1 -1
- package/dist/toolbar/Toolbar.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarButton.svelte +1 -1
- package/dist/toolbar/ToolbarButton.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarGroup.svelte +1 -1
- 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/types.d.ts +17 -41
- package/dist/types.js +0 -1
- package/dist/typography/anchor/A.svelte +1 -1
- package/dist/typography/anchor/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 +1 -1
- package/dist/typography/hr/Hr.svelte.d.ts +1 -1
- package/dist/typography/img/EnhancedImg.svelte +1 -1
- package/dist/typography/img/EnhancedImg.svelte.d.ts +1 -1
- package/dist/typography/img/Img.svelte +1 -1
- package/dist/typography/img/Img.svelte.d.ts +1 -1
- package/dist/typography/layout/Layout.svelte +1 -1
- package/dist/typography/layout/Layout.svelte.d.ts +1 -1
- package/dist/typography/list/Li.svelte +1 -1
- package/dist/typography/list/Li.svelte.d.ts +1 -1
- package/dist/typography/list/List.svelte +1 -1
- 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/CloseButton.svelte +1 -1
- package/dist/utils/CloseButton.svelte.d.ts +1 -1
- package/dist/utils/Popper.svelte +1 -1
- 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/package.json +1 -1
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
@component
|
|
31
31
|
[Go to docs](https://flowbite-svelte.com/)
|
|
32
32
|
## Type
|
|
33
|
-
[AccordionProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
33
|
+
[AccordionProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L159)
|
|
34
34
|
## Props
|
|
35
35
|
@prop children
|
|
36
36
|
@prop flush
|
|
@@ -2,7 +2,7 @@ import { type AccordionProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [AccordionProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [AccordionProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L159)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop flush
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { type AccordionCtxType, type AccordionItemProps, type ParamsType } from "..";
|
|
3
|
+
import { getTheme, themeDeprecated } from "../theme/themeUtils";
|
|
4
|
+
import clsx from "clsx";
|
|
3
5
|
import { getContext } from "svelte";
|
|
4
6
|
import { writable } from "svelte/store";
|
|
5
|
-
import
|
|
7
|
+
import { slide } from "svelte/transition";
|
|
6
8
|
import { accordionItem, type AccordionItemTheme } from ".";
|
|
7
|
-
import { type AccordionCtxType, type AccordionItemProps, type ParamsType } from "..";
|
|
8
|
-
import { getTheme } from "../theme/themeUtils";
|
|
9
9
|
|
|
10
|
-
let { children, header, arrowup, arrowdown, open = $bindable(false), activeClass, inactiveClass, transitionType = slide, transitionParams, class: className, headerClass, contentClass }: AccordionItemProps = $props();
|
|
10
|
+
let { children, header, arrowup, arrowdown, open = $bindable(false), activeClass, inactiveClass, transitionType = slide, transitionParams, class: className, classes, headerClass, contentClass }: AccordionItemProps = $props();
|
|
11
|
+
|
|
12
|
+
themeDeprecated("AccordionItem", { headerClass, contentClass, activeClass, inactiveClass });
|
|
13
|
+
|
|
14
|
+
let styling: typeof classes = $derived(classes ?? { button: headerClass, content: contentClass, active: activeClass, inactive: inactiveClass });
|
|
11
15
|
|
|
12
16
|
const ctxTransitionType = getContext("ctxTransitionType");
|
|
13
17
|
// Check if transitionType is explicitly set to undefined in props
|
|
@@ -30,11 +34,11 @@
|
|
|
30
34
|
|
|
31
35
|
const { base, button, content, active, inactive } = $derived(accordionItem({ flush: ctx.flush, open }));
|
|
32
36
|
|
|
33
|
-
let buttonClass = $derived(clsx(open && !ctx.flush && (
|
|
37
|
+
let buttonClass = $derived(clsx(open && !ctx.flush && (styling.active || ctx.activeClass || active()), !open && !ctx.flush && (styling.inactive || ctx.inactiveClass || inactive())));
|
|
34
38
|
</script>
|
|
35
39
|
|
|
36
|
-
<h2 class={base({ class: clsx((theme as AccordionItemTheme)?.base,
|
|
37
|
-
<button type="button" onclick={handleToggle} class={button({ class: clsx(buttonClass, (theme as AccordionItemTheme)?.button,
|
|
40
|
+
<h2 class={base({ class: clsx((theme as AccordionItemTheme)?.base, className) })}>
|
|
41
|
+
<button type="button" onclick={handleToggle} class={button({ class: clsx(buttonClass, (theme as AccordionItemTheme)?.button, styling.button) })} aria-expanded={open}>
|
|
38
42
|
{#if header}
|
|
39
43
|
{@render header()}
|
|
40
44
|
{#if open}
|
|
@@ -59,14 +63,14 @@
|
|
|
59
63
|
{#if useTransition}
|
|
60
64
|
{#if open && transitionType !== "none"}
|
|
61
65
|
<div transition:transitionType={transitionParams as ParamsType}>
|
|
62
|
-
<div class={content({ class: clsx((theme as AccordionItemTheme)?.content,
|
|
66
|
+
<div class={content({ class: clsx((theme as AccordionItemTheme)?.content, styling.content) })}>
|
|
63
67
|
{@render children()}
|
|
64
68
|
</div>
|
|
65
69
|
</div>
|
|
66
70
|
{/if}
|
|
67
71
|
{:else}
|
|
68
72
|
<div class={open ? "block" : "hidden"}>
|
|
69
|
-
<div class={content({ class: clsx(
|
|
73
|
+
<div class={content({ class: clsx((theme as AccordionItemTheme)?.content, styling.content) })}>
|
|
70
74
|
{@render children()}
|
|
71
75
|
</div>
|
|
72
76
|
</div>
|
|
@@ -76,7 +80,7 @@
|
|
|
76
80
|
@component
|
|
77
81
|
[Go to docs](https://flowbite-svelte.com/)
|
|
78
82
|
## Type
|
|
79
|
-
[AccordionItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
83
|
+
[AccordionItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L167)
|
|
80
84
|
## Props
|
|
81
85
|
@prop children
|
|
82
86
|
@prop header
|
|
@@ -88,6 +92,7 @@
|
|
|
88
92
|
@prop transitionType = slide
|
|
89
93
|
@prop transitionParams
|
|
90
94
|
@prop class: className
|
|
95
|
+
@prop classes
|
|
91
96
|
@prop headerClass
|
|
92
97
|
@prop contentClass
|
|
93
98
|
-->
|
|
@@ -2,7 +2,7 @@ import { type AccordionItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [AccordionItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [AccordionItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L167)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
@@ -14,6 +14,7 @@ import { type AccordionItemProps } from "..";
|
|
|
14
14
|
* @prop transitionType = slide
|
|
15
15
|
* @prop transitionParams
|
|
16
16
|
* @prop class: className
|
|
17
|
+
* @prop classes
|
|
17
18
|
* @prop headerClass
|
|
18
19
|
* @prop contentClass
|
|
19
20
|
*/
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import type { Classes } from "../theme/themeUtils";
|
|
1
2
|
import type { ClassValue } from "svelte/elements";
|
|
3
|
+
import { type VariantProps } from "tailwind-variants";
|
|
4
|
+
export type AccordionVariants = VariantProps<typeof accordion>;
|
|
5
|
+
export type AccordionItemVariants = VariantProps<typeof accordionItem> & Classes<typeof accordionItem>;
|
|
2
6
|
export declare const accordion: import("tailwind-variants").TVReturnType<{
|
|
3
7
|
color: {
|
|
4
8
|
primary: string;
|
package/dist/alert/Alert.svelte
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
@component
|
|
53
53
|
[Go to docs](https://flowbite-svelte.com/)
|
|
54
54
|
## Type
|
|
55
|
-
[AlertProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
55
|
+
[AlertProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L181)
|
|
56
56
|
## Props
|
|
57
57
|
@prop children
|
|
58
58
|
@prop icon
|
|
@@ -2,7 +2,7 @@ import { type AlertProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [AlertProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [AlertProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L181)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop icon
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
@component
|
|
49
49
|
[Go to docs](https://flowbite-svelte.com/)
|
|
50
50
|
## Type
|
|
51
|
-
[AvatarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
51
|
+
[AvatarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L192)
|
|
52
52
|
## Props
|
|
53
53
|
@prop children
|
|
54
54
|
@prop indicator
|
|
@@ -2,7 +2,7 @@ import { type AvatarProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [AvatarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [AvatarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L192)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop indicator
|
package/dist/avatar/theme.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ClassValue } from "svelte/elements";
|
|
2
|
+
import { type VariantProps } from "tailwind-variants";
|
|
3
|
+
export type AvatarVariants = VariantProps<typeof avatar>;
|
|
2
4
|
declare const avatar: import("tailwind-variants").TVReturnType<{
|
|
3
5
|
cornerStyle: {
|
|
4
6
|
rounded: string;
|
package/dist/badge/Badge.svelte
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { type BadgeProps, CloseButton, type ParamsType } from "..";
|
|
3
|
+
import { getTheme, themeDeprecated } from "../theme/themeUtils";
|
|
3
4
|
import clsx from "clsx";
|
|
4
5
|
import { fade } from "svelte/transition";
|
|
5
|
-
import {
|
|
6
|
-
|
|
6
|
+
import { badge, type BadgeTheme } from ".";
|
|
7
|
+
|
|
8
|
+
let { children, icon, badgeStatus = $bindable(true), color = "primary", large = false, dismissable = false, class: className, classes, border, href, target, rounded, transition = fade, params, aClass, onclose, ...restProps }: BadgeProps = $props();
|
|
9
|
+
|
|
10
|
+
themeDeprecated("Badge", { aClass });
|
|
7
11
|
|
|
8
|
-
let
|
|
12
|
+
let styling = $derived(classes ?? { linkClass: aClass });
|
|
9
13
|
|
|
10
14
|
// Theme context
|
|
11
15
|
const theme = getTheme("badge");
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
{#if badgeStatus}
|
|
22
26
|
<div {...restProps} transition:transition={params as ParamsType} class={base({ class: clsx((theme as BadgeTheme)?.base, className) })}>
|
|
23
27
|
{#if href}
|
|
24
|
-
<a {href} {target} class={linkClass({ class: clsx((theme as BadgeTheme)?.linkClass,
|
|
28
|
+
<a {href} {target} class={linkClass({ class: clsx((theme as BadgeTheme)?.linkClass, styling.linkClass) })}>
|
|
25
29
|
{@render children()}
|
|
26
30
|
</a>
|
|
27
31
|
{:else}
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
@component
|
|
46
50
|
[Go to docs](https://flowbite-svelte.com/)
|
|
47
51
|
## Type
|
|
48
|
-
[BadgeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
52
|
+
[BadgeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L204)
|
|
49
53
|
## Props
|
|
50
54
|
@prop children
|
|
51
55
|
@prop icon
|
|
@@ -54,6 +58,7 @@
|
|
|
54
58
|
@prop large = false
|
|
55
59
|
@prop dismissable = false
|
|
56
60
|
@prop class: className
|
|
61
|
+
@prop classes
|
|
57
62
|
@prop border
|
|
58
63
|
@prop href
|
|
59
64
|
@prop target
|
|
@@ -2,7 +2,7 @@ import { type BadgeProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BadgeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BadgeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L204)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop icon
|
|
@@ -11,6 +11,7 @@ import { type BadgeProps } from "..";
|
|
|
11
11
|
* @prop large = false
|
|
12
12
|
* @prop dismissable = false
|
|
13
13
|
* @prop class: className
|
|
14
|
+
* @prop classes
|
|
14
15
|
* @prop border
|
|
15
16
|
* @prop href
|
|
16
17
|
* @prop target
|
package/dist/badge/theme.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Classes } from "../theme/themeUtils";
|
|
2
2
|
import type { ClassValue } from "svelte/elements";
|
|
3
|
-
|
|
3
|
+
import { type VariantProps } from "tailwind-variants";
|
|
4
|
+
type BadgeVariants = VariantProps<typeof badge> & Classes<typeof badge>;
|
|
4
5
|
declare const badge: import("tailwind-variants").TVReturnType<{
|
|
5
6
|
color: {
|
|
6
7
|
primary: {
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
import { banner, type BannerTheme } from ".";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { type ParamsType, type BannerProps, CloseButton } from "..";
|
|
6
|
-
import { getTheme } from "../theme/themeUtils";
|
|
6
|
+
import { getTheme, themeDeprecated } from "../theme/themeUtils";
|
|
7
7
|
|
|
8
|
-
let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, innerClass, transition = fade, params, closeClass, ...restProps }: BannerProps = $props();
|
|
8
|
+
let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, classes, innerClass, transition = fade, params, closeClass, ...restProps }: BannerProps = $props();
|
|
9
|
+
|
|
10
|
+
themeDeprecated("Banner", { innerClass, closeClass });
|
|
11
|
+
let styling = $derived(classes ?? { insideDiv: innerClass, dismissable: closeClass });
|
|
9
12
|
|
|
10
13
|
// Theme context
|
|
11
14
|
const theme = getTheme("banner");
|
|
@@ -15,14 +18,14 @@
|
|
|
15
18
|
|
|
16
19
|
{#if open}
|
|
17
20
|
<div tabindex="-1" class={base({ class: clsx((theme as BannerTheme)?.base, className) })} {...restProps} transition:transition={params as ParamsType}>
|
|
18
|
-
<div class={insideDiv({ class: clsx((theme as BannerTheme)?.insideDiv,
|
|
21
|
+
<div class={insideDiv({ class: clsx((theme as BannerTheme)?.insideDiv, styling.insideDiv) })}>
|
|
19
22
|
{@render children?.()}
|
|
20
23
|
</div>
|
|
21
24
|
|
|
22
25
|
{#if dismissable}
|
|
23
26
|
<div class="flex items-center justify-end">
|
|
24
27
|
<CloseButton
|
|
25
|
-
class={dismissableClass({ class: clsx((theme as BannerTheme)?.dismissable,
|
|
28
|
+
class={dismissableClass({ class: clsx((theme as BannerTheme)?.dismissable, styling.dismissable) })}
|
|
26
29
|
{color}
|
|
27
30
|
ariaLabel="Remove banner"
|
|
28
31
|
onclick={() => {
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
@component
|
|
39
42
|
[Go to docs](https://flowbite-svelte.com/)
|
|
40
43
|
## Type
|
|
41
|
-
[BannerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
44
|
+
[BannerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L219)
|
|
42
45
|
## Props
|
|
43
46
|
@prop children
|
|
44
47
|
@prop header
|
|
@@ -47,6 +50,7 @@
|
|
|
47
50
|
@prop color = "gray"
|
|
48
51
|
@prop type
|
|
49
52
|
@prop class: className
|
|
53
|
+
@prop classes
|
|
50
54
|
@prop innerClass
|
|
51
55
|
@prop transition = fade
|
|
52
56
|
@prop params
|
|
@@ -2,7 +2,7 @@ import { type BannerProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BannerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BannerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L219)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
@@ -11,6 +11,7 @@ import { type BannerProps } from "..";
|
|
|
11
11
|
* @prop color = "gray"
|
|
12
12
|
* @prop type
|
|
13
13
|
* @prop class: className
|
|
14
|
+
* @prop classes
|
|
14
15
|
* @prop innerClass
|
|
15
16
|
* @prop transition = fade
|
|
16
17
|
* @prop params
|
package/dist/banner/theme.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
2
|
import type { ClassValue } from "svelte/elements";
|
|
3
|
-
|
|
3
|
+
import type { Classes } from "../theme/themeUtils";
|
|
4
|
+
export type BannerVariants = VariantProps<typeof banner> & Classes<typeof banner>;
|
|
4
5
|
declare const banner: import("tailwind-variants").TVReturnType<{
|
|
5
6
|
type: {
|
|
6
7
|
top: {
|
|
@@ -4,33 +4,36 @@
|
|
|
4
4
|
import { bottomNav } from ".";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { type BottomNavProps, type BottomNavContextType, cn, type BottomNavTheme } from "..";
|
|
7
|
-
import { getTheme } from "../theme/themeUtils";
|
|
7
|
+
import { getTheme, themeDeprecated } from "../theme/themeUtils";
|
|
8
8
|
|
|
9
|
-
let { children, header, position = "fixed", navType = "default", outerClass, innerClass, activeClass, activeUrl = "", ...restProps }: BottomNavProps = $props();
|
|
9
|
+
let { children, header, position = "fixed", navType = "default", class: className, classes, outerClass, innerClass, activeClass, activeUrl = "", ...restProps }: BottomNavProps = $props();
|
|
10
|
+
|
|
11
|
+
themeDeprecated("BottomNav", { innerClass, outerClass });
|
|
12
|
+
let styling = $derived(classes ?? { inner: innerClass });
|
|
10
13
|
|
|
11
14
|
// Theme context
|
|
12
15
|
const theme = getTheme("bottomNav");
|
|
13
16
|
|
|
14
17
|
const activeCls = cn("text-primary-700 dark:text-primary-700 hover:text-primary-900 dark:hover:text-primary-900", activeClass);
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
setContext("
|
|
18
|
-
setContext("navType", navType);
|
|
19
|
-
setContext<BottomNavContextType>("bottomNavType", { activeClass: activeCls });
|
|
19
|
+
let context: BottomNavContextType = $state({ activeClass: activeCls, activeUrl, navType });
|
|
20
|
+
setContext<BottomNavContextType>("bottomNavType", context);
|
|
20
21
|
|
|
21
|
-
const {
|
|
22
|
+
const { base, inner } = $derived(bottomNav({ position, navType }));
|
|
22
23
|
|
|
23
24
|
$effect(() => {
|
|
24
|
-
|
|
25
|
+
context.activeUrl = activeUrl;
|
|
26
|
+
context.navType = navType;
|
|
27
|
+
context.activeClass = activeCls;
|
|
25
28
|
});
|
|
26
29
|
</script>
|
|
27
30
|
|
|
28
|
-
<div {...restProps} class={
|
|
31
|
+
<div {...restProps} class={base({ class: clsx((theme as BottomNavTheme)?.base, className ?? outerClass) })}>
|
|
29
32
|
{#if header}
|
|
30
33
|
{@render header()}
|
|
31
34
|
{/if}
|
|
32
35
|
|
|
33
|
-
<div class={inner({ class: clsx((theme as BottomNavTheme)?.inner,
|
|
36
|
+
<div class={inner({ class: clsx((theme as BottomNavTheme)?.inner, styling.inner) })}>
|
|
34
37
|
{@render children()}
|
|
35
38
|
</div>
|
|
36
39
|
</div>
|
|
@@ -39,12 +42,14 @@
|
|
|
39
42
|
@component
|
|
40
43
|
[Go to docs](https://flowbite-svelte.com/)
|
|
41
44
|
## Type
|
|
42
|
-
[BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
45
|
+
[BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L238)
|
|
43
46
|
## Props
|
|
44
47
|
@prop children
|
|
45
48
|
@prop header
|
|
46
49
|
@prop position = "fixed"
|
|
47
50
|
@prop navType = "default"
|
|
51
|
+
@prop class: className
|
|
52
|
+
@prop classes
|
|
48
53
|
@prop outerClass
|
|
49
54
|
@prop innerClass
|
|
50
55
|
@prop activeClass
|
|
@@ -2,12 +2,14 @@ import { type BottomNavProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L238)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
9
9
|
* @prop position = "fixed"
|
|
10
10
|
* @prop navType = "default"
|
|
11
|
+
* @prop class: className
|
|
12
|
+
* @prop classes
|
|
11
13
|
* @prop outerClass
|
|
12
14
|
* @prop innerClass
|
|
13
15
|
* @prop activeClass
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
import { bottomNavHeader } from ".";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { type BottomNavHeaderProps, type BottomNavHeaderTheme } from "..";
|
|
5
|
-
import { getTheme } from "../theme/themeUtils";
|
|
5
|
+
import { getTheme, themeDeprecated } from "../theme/themeUtils";
|
|
6
6
|
|
|
7
|
-
let { children, outerClass, innerClass, ...restProps }: BottomNavHeaderProps = $props();
|
|
7
|
+
let { children, class: className, classes, outerClass, innerClass, ...restProps }: BottomNavHeaderProps = $props();
|
|
8
|
+
|
|
9
|
+
themeDeprecated("BottomNavHeader", { innerClass, outerClass });
|
|
10
|
+
let styling = $derived(classes ?? { innerDiv: innerClass });
|
|
8
11
|
|
|
9
12
|
// Theme context
|
|
10
13
|
const theme = getTheme("bottomNavHeader");
|
|
11
14
|
|
|
12
|
-
const { innerDiv,
|
|
15
|
+
const { innerDiv, base } = $derived(bottomNavHeader());
|
|
13
16
|
</script>
|
|
14
17
|
|
|
15
|
-
<div {...restProps} class={
|
|
16
|
-
<div class={innerDiv({ class: clsx((theme as BottomNavHeaderTheme)?.innerDiv,
|
|
18
|
+
<div {...restProps} class={base({ class: clsx((theme as BottomNavHeaderTheme)?.base, className ?? outerClass) })}>
|
|
19
|
+
<div class={innerDiv({ class: clsx((theme as BottomNavHeaderTheme)?.innerDiv, styling.innerDiv) })} role="group">
|
|
17
20
|
{@render children()}
|
|
18
21
|
</div>
|
|
19
22
|
</div>
|
|
@@ -22,9 +25,11 @@
|
|
|
22
25
|
@component
|
|
23
26
|
[Go to docs](https://flowbite-svelte.com/)
|
|
24
27
|
## Type
|
|
25
|
-
[BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
28
|
+
[BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L278)
|
|
26
29
|
## Props
|
|
27
30
|
@prop children
|
|
31
|
+
@prop class: className
|
|
32
|
+
@prop classes
|
|
28
33
|
@prop outerClass
|
|
29
34
|
@prop innerClass
|
|
30
35
|
@prop ...restProps
|
|
@@ -2,9 +2,11 @@ import { type BottomNavHeaderProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L278)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
|
+
* @prop class: className
|
|
9
|
+
* @prop classes
|
|
8
10
|
* @prop outerClass
|
|
9
11
|
* @prop innerClass
|
|
10
12
|
* @prop ...restProps
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
@component
|
|
21
21
|
[Go to docs](https://flowbite-svelte.com/)
|
|
22
22
|
## Type
|
|
23
|
-
[BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
23
|
+
[BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L284)
|
|
24
24
|
## Props
|
|
25
25
|
@prop itemName
|
|
26
26
|
@prop active
|
|
@@ -2,7 +2,7 @@ import { type BottomNavHeaderItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavHeaderItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L284)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop itemName
|
|
8
8
|
* @prop active
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { type BottomNavContextType, type BottomNavItemProps } from "..";
|
|
3
|
+
import { getTheme, themeDeprecated } from "../theme/themeUtils";
|
|
4
|
+
import clsx from "clsx";
|
|
2
5
|
import { getContext } from "svelte";
|
|
3
|
-
import type {
|
|
6
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
4
7
|
import { bottomNavItem, type BottomNavItemTheme } from ".";
|
|
5
|
-
import clsx from "clsx";
|
|
6
|
-
import { type BottomNavItemProps, type BottomNavContextType, type BottomNavVariantType } from "..";
|
|
7
|
-
import { getTheme } from "../theme/themeUtils";
|
|
8
8
|
|
|
9
|
-
let { children, btnName, appBtnPosition = "middle",
|
|
9
|
+
let { children, btnName, appBtnPosition = "middle", activeClass, class: className, classes, btnClass, spanClass, active: manualActive, ...restProps }: BottomNavItemProps = $props();
|
|
10
|
+
|
|
11
|
+
themeDeprecated("BottomNavItem", { spanClass, btnClass });
|
|
12
|
+
let styling = $derived(classes ?? { span: spanClass });
|
|
10
13
|
|
|
11
14
|
// Theme context
|
|
12
15
|
const theme = getTheme("bottomNavItem");
|
|
13
16
|
|
|
14
|
-
const navType: BottomNavVariantType = getContext("navType");
|
|
15
17
|
const context = getContext<BottomNavContextType>("bottomNavType") ?? {};
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let navUrl = $state("");
|
|
20
|
-
activeUrlStore.subscribe((value) => {
|
|
21
|
-
navUrl = value;
|
|
22
|
-
});
|
|
19
|
+
let navUrl = $derived(context.activeUrl || "");
|
|
23
20
|
|
|
24
|
-
const { base, span } = $derived(bottomNavItem({ navType, appBtnPosition }));
|
|
21
|
+
const { base, span } = $derived(bottomNavItem({ navType: context.navType, appBtnPosition }));
|
|
25
22
|
|
|
26
23
|
// Determine active state based on manual prop or URL matching
|
|
27
|
-
let isActive = $derived
|
|
24
|
+
let isActive = $derived.by(() => {
|
|
25
|
+
const href = restProps.href ?? "";
|
|
26
|
+
return manualActive !== undefined ? !!manualActive : navUrl ? (href === "/" ? navUrl === "/" : href && (navUrl === href || navUrl.startsWith(href + "/") || (href !== "/" && navUrl.replace(/^https?:\/\/[^/]+/, "").startsWith(href)))) : false;
|
|
27
|
+
});
|
|
28
28
|
|
|
29
29
|
function getCommonClass() {
|
|
30
|
-
return base({ class: clsx(isActive && (activeClass ?? context.activeClass), (theme as BottomNavItemTheme)?.base, btnClass) });
|
|
30
|
+
return base({ class: clsx(isActive && (activeClass ?? context.activeClass), (theme as BottomNavItemTheme)?.base, className ?? btnClass) });
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function getSpanClass() {
|
|
34
|
-
return span({ class: clsx(isActive && (activeClass ?? context.activeClass), (theme as BottomNavItemTheme)?.span,
|
|
34
|
+
return span({ class: clsx(isActive && (activeClass ?? context.activeClass), (theme as BottomNavItemTheme)?.span, styling.span) });
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
const anchorProps: HTMLAnchorAttributes = $derived({
|
|
45
|
-
...commonProps
|
|
46
|
-
href,
|
|
47
|
-
target
|
|
45
|
+
...commonProps
|
|
48
46
|
});
|
|
49
47
|
|
|
50
48
|
const buttonProps: HTMLButtonAttributes = $derived({
|
|
@@ -53,30 +51,30 @@
|
|
|
53
51
|
});
|
|
54
52
|
</script>
|
|
55
53
|
|
|
56
|
-
{#if
|
|
57
|
-
<
|
|
54
|
+
{#if restProps.href === undefined}
|
|
55
|
+
<button {...buttonProps}>
|
|
58
56
|
{@render children()}
|
|
59
57
|
<span class={getSpanClass()}>{btnName}</span>
|
|
60
|
-
</
|
|
58
|
+
</button>
|
|
61
59
|
{:else}
|
|
62
|
-
<
|
|
60
|
+
<a {...anchorProps}>
|
|
63
61
|
{@render children()}
|
|
64
62
|
<span class={getSpanClass()}>{btnName}</span>
|
|
65
|
-
</
|
|
63
|
+
</a>
|
|
66
64
|
{/if}
|
|
67
65
|
|
|
68
66
|
<!--
|
|
69
67
|
@component
|
|
70
68
|
[Go to docs](https://flowbite-svelte.com/)
|
|
71
69
|
## Type
|
|
72
|
-
[BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
70
|
+
[BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L247)
|
|
73
71
|
## Props
|
|
74
72
|
@prop children
|
|
75
73
|
@prop btnName
|
|
76
74
|
@prop appBtnPosition = "middle"
|
|
77
|
-
@prop target
|
|
78
75
|
@prop activeClass
|
|
79
|
-
@prop
|
|
76
|
+
@prop class: className
|
|
77
|
+
@prop classes
|
|
80
78
|
@prop btnClass
|
|
81
79
|
@prop spanClass
|
|
82
80
|
@prop active: manualActive
|
|
@@ -2,14 +2,14 @@ import { type BottomNavItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L247)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop btnName
|
|
9
9
|
* @prop appBtnPosition = "middle"
|
|
10
|
-
* @prop target
|
|
11
10
|
* @prop activeClass
|
|
12
|
-
* @prop
|
|
11
|
+
* @prop class: className
|
|
12
|
+
* @prop classes
|
|
13
13
|
* @prop btnClass
|
|
14
14
|
* @prop spanClass
|
|
15
15
|
* @prop active: manualActive
|