flowbite-svelte 1.29.1 → 1.30.1
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 +26 -13
- package/dist/accordion/Accordion.svelte.d.ts +2 -2
- package/dist/accordion/AccordionItem.svelte +12 -10
- 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 +7 -2
- package/dist/badge/Badge.svelte.d.ts +1 -1
- package/dist/banner/Banner.svelte +7 -2
- package/dist/banner/Banner.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNav.svelte +25 -13
- package/dist/bottom-navigation/BottomNav.svelte.d.ts +2 -2
- package/dist/bottom-navigation/BottomNavHeader.svelte +7 -2
- 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 +15 -9
- package/dist/bottom-navigation/BottomNavItem.svelte.d.ts +1 -1
- package/dist/breadcrumb/Breadcrumb.svelte +9 -3
- 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 +7 -2
- package/dist/card/Card.svelte.d.ts +1 -1
- package/dist/carousel/Carousel.svelte +17 -14
- 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 +3 -2
- package/dist/device-mockups/Android.svelte.d.ts +1 -1
- package/dist/device-mockups/DefaultMockup.svelte +4 -2
- package/dist/device-mockups/DefaultMockup.svelte.d.ts +1 -1
- package/dist/device-mockups/Desktop.svelte +8 -2
- 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 +4 -2
- package/dist/device-mockups/Ios.svelte.d.ts +1 -1
- package/dist/device-mockups/Laptop.svelte +4 -2
- package/dist/device-mockups/Laptop.svelte.d.ts +1 -1
- package/dist/device-mockups/Smartwatch.svelte +4 -2
- package/dist/device-mockups/Smartwatch.svelte.d.ts +1 -1
- package/dist/device-mockups/Tablet.svelte +4 -2
- 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 +8 -2
- 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 +11 -5
- 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 +11 -4
- 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 +8 -2
- 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 +34 -14
- 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 +7 -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 +1 -1
- package/dist/forms/dropzone/Dropzone.svelte.d.ts +1 -1
- package/dist/forms/fileupload/Fileupload.svelte +8 -2
- package/dist/forms/fileupload/Fileupload.svelte.d.ts +1 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +4 -2
- 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 +7 -7
- 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 +7 -1
- 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 +8 -2
- package/dist/forms/search/Search.svelte.d.ts +1 -1
- package/dist/forms/select/MultiSelect.svelte +18 -7
- package/dist/forms/select/Select.svelte +10 -6
- package/dist/forms/tags/Tags.svelte +7 -2
- package/dist/forms/tags/theme.d.ts +3 -3
- package/dist/forms/textarea/Textarea.svelte +4 -2
- 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 +8 -2
- package/dist/forms/toggle/Toggle.svelte.d.ts +1 -1
- package/dist/gallery/Gallery.svelte +8 -2
- 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 +8 -3
- package/dist/mega-menu/MegaMenu.svelte.d.ts +1 -1
- package/dist/modal/Modal.svelte +9 -3
- 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 +14 -7
- 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 +15 -8
- 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 +28 -11
- package/dist/pagination/PaginationNav.svelte.d.ts +1 -1
- package/dist/popover/Popover.svelte +8 -3
- 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 +4 -2
- 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 +13 -6
- 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 +4 -2
- 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 +29 -14
- package/dist/sidebar/Sidebar.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarBrand.svelte +8 -2
- 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 +8 -2
- package/dist/sidebar/SidebarCta.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarDropdownWrapper.svelte +11 -10
- 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 +11 -4
- package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDialButton.svelte +9 -4
- 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 +12 -6
- 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 +13 -10
- 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 +26 -11
- 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 +4 -2
- package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
- package/dist/timeline/Group.svelte +4 -2
- package/dist/timeline/Group.svelte.d.ts +1 -1
- package/dist/timeline/GroupItem.svelte +4 -2
- 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 +3 -3
- package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
- package/dist/timeline/theme.d.ts +30 -30
- package/dist/toast/Toast.svelte +4 -2
- 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 +6 -5
- package/dist/typography/img/Img.svelte +6 -5
- 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 +22 -22
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import type { DrawerheadProps } from "..";
|
|
5
5
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { closeIcon, children, buttonClass, svgClass, class: className, classes, ...restProps }: DrawerheadProps = $props();
|
|
8
9
|
|
|
9
|
-
warnThemeDeprecation(
|
|
10
|
+
warnThemeDeprecation(
|
|
11
|
+
"Drawerhead",
|
|
12
|
+
untrack(() => ({ buttonClass, svgClass })),
|
|
13
|
+
{ buttonClass: "button", svgClass: "svg" }
|
|
14
|
+
);
|
|
15
|
+
|
|
10
16
|
const styling = $derived(classes ?? { button: buttonClass, svg: svgClass });
|
|
11
17
|
|
|
12
18
|
const theme = getTheme("drawer");
|
|
@@ -34,7 +40,7 @@
|
|
|
34
40
|
@component
|
|
35
41
|
[Go to docs](https://flowbite-svelte.com/)
|
|
36
42
|
## Type
|
|
37
|
-
[DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
43
|
+
[DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L686)
|
|
38
44
|
## Props
|
|
39
45
|
@prop closeIcon
|
|
40
46
|
@prop children
|
|
@@ -2,7 +2,7 @@ import type { DrawerheadProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DrawerheadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L686)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop closeIcon
|
|
8
8
|
* @prop children
|
package/dist/drawer/theme.d.ts
CHANGED
|
@@ -63,16 +63,16 @@ export type DrawerheadVariants = VariantProps<typeof drawerhead> & Classes<typeo
|
|
|
63
63
|
export declare const drawerhead: import("tailwind-variants").TVReturnType<{
|
|
64
64
|
[key: string]: {
|
|
65
65
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
66
|
-
button?: import("tailwind-merge").ClassNameValue;
|
|
67
66
|
base?: import("tailwind-merge").ClassNameValue;
|
|
67
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
68
68
|
svg?: import("tailwind-merge").ClassNameValue;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
} | {
|
|
72
72
|
[x: string]: {
|
|
73
73
|
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
74
|
-
button?: import("tailwind-merge").ClassNameValue;
|
|
75
74
|
base?: import("tailwind-merge").ClassNameValue;
|
|
75
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
76
76
|
svg?: import("tailwind-merge").ClassNameValue;
|
|
77
77
|
};
|
|
78
78
|
};
|
|
@@ -83,8 +83,8 @@ export declare const drawerhead: import("tailwind-variants").TVReturnType<{
|
|
|
83
83
|
}, undefined, {
|
|
84
84
|
[key: string]: {
|
|
85
85
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
86
|
-
button?: import("tailwind-merge").ClassNameValue;
|
|
87
86
|
base?: import("tailwind-merge").ClassNameValue;
|
|
87
|
+
button?: import("tailwind-merge").ClassNameValue;
|
|
88
88
|
svg?: import("tailwind-merge").ClassNameValue;
|
|
89
89
|
};
|
|
90
90
|
};
|
package/dist/drawer/theme.js
CHANGED
|
@@ -9,8 +9,8 @@ export const drawer = tv({
|
|
|
9
9
|
placement: {
|
|
10
10
|
left: { base: "me-auto h-full" },
|
|
11
11
|
right: { base: "ms-auto h-full" },
|
|
12
|
-
top: { base: "mb-auto
|
|
13
|
-
bottom: { base: "mt-auto
|
|
12
|
+
top: { base: "mb-auto w-full!" },
|
|
13
|
+
bottom: { base: "mt-auto w-full!" }
|
|
14
14
|
},
|
|
15
15
|
width: {
|
|
16
16
|
default: { base: "w-80" },
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import DropdownGroup from "./DropdownGroup.svelte";
|
|
5
5
|
import { getTheme } from "../theme/themeUtils";
|
|
6
6
|
import clsx from "clsx";
|
|
7
|
-
import {
|
|
7
|
+
import { setDropdownContext } from "../context";
|
|
8
8
|
import { dropdown } from "./theme";
|
|
9
9
|
|
|
10
10
|
let { children, simple = false, placement = "bottom", offset = 2, class: className, activeUrl = "", isOpen = $bindable(false), onclose, ...restProps }: DropdownProps = $props();
|
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
const theme = getTheme("dropdown");
|
|
13
13
|
|
|
14
14
|
const base = $derived(dropdown({ class: clsx(theme, className) }));
|
|
15
|
-
const activeUrlStore = $state({ value: "" });
|
|
16
|
-
setContext("activeUrl", activeUrlStore);
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// Create reactive context using getter
|
|
17
|
+
const context = {
|
|
18
|
+
get activeUrl() {
|
|
19
|
+
return activeUrl ?? "";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
setDropdownContext(context);
|
|
21
24
|
</script>
|
|
22
25
|
|
|
23
26
|
<!-- Dropdown menu -->
|
|
@@ -36,7 +39,7 @@
|
|
|
36
39
|
@component
|
|
37
40
|
[Go to docs](https://flowbite-svelte.com/)
|
|
38
41
|
## Type
|
|
39
|
-
[DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
42
|
+
[DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L693)
|
|
40
43
|
## Props
|
|
41
44
|
@prop children
|
|
42
45
|
@prop simple = false
|
|
@@ -2,7 +2,7 @@ import type { DropdownProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L693)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop simple = false
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@component
|
|
16
16
|
[Go to docs](https://flowbite-svelte.com/)
|
|
17
17
|
## Type
|
|
18
|
-
[DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
18
|
+
[DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L699)
|
|
19
19
|
## Props
|
|
20
20
|
@prop class: className
|
|
21
21
|
@prop ...restProps
|
|
@@ -2,7 +2,7 @@ import type { DropdownDividerProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownDividerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L699)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop class: className
|
|
8
8
|
* @prop ...restProps
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L721)
|
|
21
21
|
## Props
|
|
22
22
|
@prop children
|
|
23
23
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { DropdownGroupProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L721)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L701)
|
|
21
21
|
## Props
|
|
22
22
|
@prop children
|
|
23
23
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { DropdownHeaderProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L701)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { getDropdownContext } from "../context";
|
|
3
3
|
import { dropdownItem } from "./theme";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
6
6
|
import type { DropdownItemProps } from "../types";
|
|
7
|
+
import { untrack } from "svelte";
|
|
7
8
|
|
|
8
9
|
let { aClass, children, activeClass, liClass, classes, class: className, href, onclick, ...restProps }: DropdownItemProps = $props();
|
|
9
10
|
|
|
10
|
-
warnThemeDeprecation(
|
|
11
|
+
warnThemeDeprecation(
|
|
12
|
+
"DropdownItem",
|
|
13
|
+
untrack(() => ({ aClass, activeClass, liClass })),
|
|
14
|
+
{ aClass: "class", activeClass: "active", liClass: "li" }
|
|
15
|
+
);
|
|
16
|
+
|
|
11
17
|
const styling = $derived(classes ?? { active: activeClass, li: liClass });
|
|
12
18
|
|
|
13
19
|
const theme = getTheme("dropdownItem");
|
|
14
20
|
|
|
15
|
-
const
|
|
21
|
+
const ctx = getDropdownContext();
|
|
16
22
|
|
|
17
|
-
let isActive = $derived(activeUrl
|
|
23
|
+
let isActive = $derived(ctx?.activeUrl && href ? href === ctx.activeUrl : false);
|
|
18
24
|
|
|
19
25
|
const { base, active, li } = dropdownItem();
|
|
20
26
|
let finalClass = $derived(isActive ? active({ class: clsx(theme?.active, styling.active) }) : base({ class: clsx(theme?.base, className) }));
|
|
@@ -40,7 +46,7 @@
|
|
|
40
46
|
@component
|
|
41
47
|
[Go to docs](https://flowbite-svelte.com/)
|
|
42
48
|
## Type
|
|
43
|
-
[DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
49
|
+
[DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L705)
|
|
44
50
|
## Props
|
|
45
51
|
@prop aClass
|
|
46
52
|
@prop children
|
|
@@ -2,7 +2,7 @@ import type { DropdownItemProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L705)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop aClass
|
|
8
8
|
* @prop children
|
package/dist/dropdown/theme.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ export declare const dropdownItem: import("tailwind-variants").TVReturnType<{
|
|
|
8
8
|
[key: string]: {
|
|
9
9
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
10
10
|
base?: import("tailwind-merge").ClassNameValue;
|
|
11
|
-
active?: import("tailwind-merge").ClassNameValue;
|
|
12
11
|
li?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
} | {
|
|
16
16
|
[x: string]: {
|
|
17
17
|
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
18
18
|
base?: import("tailwind-merge").ClassNameValue;
|
|
19
|
-
active?: import("tailwind-merge").ClassNameValue;
|
|
20
19
|
li?: import("tailwind-merge").ClassNameValue;
|
|
20
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
} | {}, {
|
|
@@ -28,8 +28,8 @@ export declare const dropdownItem: import("tailwind-variants").TVReturnType<{
|
|
|
28
28
|
[key: string]: {
|
|
29
29
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
30
30
|
base?: import("tailwind-merge").ClassNameValue;
|
|
31
|
-
active?: import("tailwind-merge").ClassNameValue;
|
|
32
31
|
li?: import("tailwind-merge").ClassNameValue;
|
|
32
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
} | {}, {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@component
|
|
20
20
|
[Go to docs](https://flowbite-svelte.com/)
|
|
21
21
|
## Type
|
|
22
|
-
[FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
22
|
+
[FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L728)
|
|
23
23
|
## Props
|
|
24
24
|
@prop children
|
|
25
25
|
@prop footerType = "default"
|
|
@@ -2,7 +2,7 @@ import type { FooterProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L728)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop footerType = "default"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@component
|
|
32
32
|
[Go to docs](https://flowbite-svelte.com/)
|
|
33
33
|
## Type
|
|
34
|
-
[FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
34
|
+
[FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L733)
|
|
35
35
|
## Props
|
|
36
36
|
@prop children
|
|
37
37
|
@prop aClass
|
|
@@ -2,7 +2,7 @@ import type { FooterBrandProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L733)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop aClass
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { SvelteDate } from "svelte/reactivity";
|
|
2
3
|
import { footerCopyright } from "./theme";
|
|
3
4
|
import clsx from "clsx";
|
|
4
5
|
import type { FooterCopyrightProps } from "..";
|
|
5
6
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
7
|
+
import { untrack } from "svelte";
|
|
6
8
|
|
|
7
9
|
let { spanClass, aClass, href, by, copyrightMessage = "All Rights Reserved.", year, bySpanClass, classes, class: className, ...restProps }: FooterCopyrightProps = $props();
|
|
8
10
|
|
|
9
|
-
warnThemeDeprecation(
|
|
11
|
+
warnThemeDeprecation(
|
|
12
|
+
"FooterCopyright",
|
|
13
|
+
untrack(() => ({ aClass, spanClass, bySpanClass })),
|
|
14
|
+
{ aClass: "link", spanClass: "class", bySpanClass: "bySpan" }
|
|
15
|
+
);
|
|
16
|
+
|
|
10
17
|
// link, bySpan
|
|
11
18
|
const styling = $derived(classes ?? { bySpan: bySpanClass, link: aClass });
|
|
12
19
|
|
|
13
20
|
const theme = getTheme("footerCopyright");
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
const effectiveYear = $derived(year ?? new SvelteDate().getFullYear());
|
|
16
23
|
|
|
17
24
|
const { base, link, bySpan } = footerCopyright();
|
|
18
25
|
</script>
|
|
19
26
|
|
|
20
27
|
<span class={base({ class: clsx(theme?.base, className ?? spanClass) })}>
|
|
21
|
-
© {
|
|
28
|
+
© {effectiveYear}
|
|
22
29
|
{#if href}
|
|
23
30
|
<a {...restProps} {href} class={link({ class: clsx(theme?.link, styling.link) })}>
|
|
24
31
|
{by}
|
|
@@ -33,7 +40,7 @@
|
|
|
33
40
|
@component
|
|
34
41
|
[Go to docs](https://flowbite-svelte.com/)
|
|
35
42
|
## Type
|
|
36
|
-
[FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
43
|
+
[FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L744)
|
|
37
44
|
## Props
|
|
38
45
|
@prop spanClass
|
|
39
46
|
@prop aClass
|
|
@@ -2,7 +2,7 @@ import type { FooterCopyrightProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L744)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop spanClass
|
|
8
8
|
* @prop aClass
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@component
|
|
22
22
|
[Go to docs](https://flowbite-svelte.com/)
|
|
23
23
|
## Type
|
|
24
|
-
[FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
24
|
+
[FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L754)
|
|
25
25
|
## Props
|
|
26
26
|
@prop children
|
|
27
27
|
@prop href
|
|
@@ -2,7 +2,7 @@ import type { FooterIconProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L754)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop href
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import type { FooterLinkProps } from "..";
|
|
5
5
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, liClass, aClass, href, classes, class: className, ...restProps }: FooterLinkProps = $props();
|
|
8
9
|
|
|
9
|
-
warnThemeDeprecation(
|
|
10
|
+
warnThemeDeprecation(
|
|
11
|
+
"FooterLink",
|
|
12
|
+
untrack(() => ({ liClass, aClass })),
|
|
13
|
+
{ liClass: "class", aClass: "link" }
|
|
14
|
+
);
|
|
15
|
+
|
|
10
16
|
// link, bySpan
|
|
11
17
|
const styling = $derived(classes ?? { link: aClass });
|
|
12
18
|
|
|
@@ -25,7 +31,7 @@
|
|
|
25
31
|
@component
|
|
26
32
|
[Go to docs](https://flowbite-svelte.com/)
|
|
27
33
|
## Type
|
|
28
|
-
[FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
34
|
+
[FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L764)
|
|
29
35
|
## Props
|
|
30
36
|
@prop children
|
|
31
37
|
@prop liClass
|
|
@@ -2,7 +2,7 @@ import type { FooterLinkProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L764)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop liClass
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L760)
|
|
21
21
|
## Props
|
|
22
22
|
@prop class: className
|
|
23
23
|
@prop children
|
|
@@ -2,7 +2,7 @@ import type { FooterLinkGroupProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FooterLinkGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L760)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop class: className
|
|
8
8
|
* @prop children
|
package/dist/footer/theme.d.ts
CHANGED
|
@@ -30,16 +30,16 @@ export declare const footerBrand: import("tailwind-variants").TVReturnType<{
|
|
|
30
30
|
[key: string]: {
|
|
31
31
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
32
32
|
base?: import("tailwind-merge").ClassNameValue;
|
|
33
|
-
img?: import("tailwind-merge").ClassNameValue;
|
|
34
33
|
span?: import("tailwind-merge").ClassNameValue;
|
|
34
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
} | {
|
|
38
38
|
[x: string]: {
|
|
39
39
|
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
40
40
|
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
-
img?: import("tailwind-merge").ClassNameValue;
|
|
42
41
|
span?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
} | {}, {
|
|
@@ -50,8 +50,8 @@ export declare const footerBrand: import("tailwind-variants").TVReturnType<{
|
|
|
50
50
|
[key: string]: {
|
|
51
51
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
52
52
|
base?: import("tailwind-merge").ClassNameValue;
|
|
53
|
-
img?: import("tailwind-merge").ClassNameValue;
|
|
54
53
|
span?: import("tailwind-merge").ClassNameValue;
|
|
54
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
} | {}, {
|
|
@@ -1,34 +1,54 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getContext } from "svelte";
|
|
3
2
|
import CheckIcon from "./CheckIcon.svelte";
|
|
4
3
|
import { buttonToggle } from "./theme";
|
|
5
|
-
import type {
|
|
4
|
+
import type { VariantProps } from "tailwind-variants";
|
|
6
5
|
import clsx from "clsx";
|
|
7
|
-
import type { ButtonToggleProps
|
|
6
|
+
import type { ButtonToggleProps } from "../..";
|
|
8
7
|
import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
|
|
8
|
+
import { getButtonToggleContext } from "../../context";
|
|
9
|
+
import { untrack } from "svelte";
|
|
9
10
|
|
|
10
11
|
let { value, selected = false, children, iconSlot, color, class: className, iconClass, txtClass, contentClass, classes, ...restProps }: ButtonToggleProps = $props();
|
|
11
12
|
|
|
12
|
-
warnThemeDeprecation(
|
|
13
|
+
warnThemeDeprecation(
|
|
14
|
+
"ButtonToggle",
|
|
15
|
+
untrack(() => ({ iconClass, txtClass, contentClass })),
|
|
16
|
+
{ iconClass: "icon", txtClass: "text", contentClass: "content" }
|
|
17
|
+
);
|
|
18
|
+
|
|
13
19
|
// button(className), content, text, icon
|
|
14
20
|
const styling = $derived(classes ?? { icon: iconClass, text: txtClass, content: contentClass });
|
|
15
21
|
|
|
16
22
|
const theme = getTheme("buttonToggle");
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const roundedSize =
|
|
23
|
-
|
|
24
|
+
// Get context - it will be undefined if used outside ButtonToggleGroup
|
|
25
|
+
const ctx = getButtonToggleContext();
|
|
26
|
+
|
|
27
|
+
// Extract context values with fallbacks
|
|
28
|
+
const { toggleSelected, isSelected, multiSelect, size, roundedSize, ctxIconClass, ctxBtnClass } = {
|
|
29
|
+
toggleSelected: ctx?.toggleSelected ?? (() => {}),
|
|
30
|
+
isSelected: ctx?.isSelected ?? (() => false),
|
|
31
|
+
multiSelect: ctx?.multiSelect ?? false,
|
|
32
|
+
size: ctx?.size,
|
|
33
|
+
roundedSize: ctx?.roundedSize,
|
|
34
|
+
ctxIconClass: ctx?.ctxIconClass,
|
|
35
|
+
ctxBtnClass: ctx?.ctxBtnClass
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Use context color if available, otherwise use prop color, otherwise default to "primary"
|
|
39
|
+
const actualColor = $derived((ctx?.color ?? color ?? "primary") as VariantProps<typeof buttonToggle>["color"]);
|
|
24
40
|
const actualIconClass = ctxIconClass;
|
|
25
|
-
|
|
41
|
+
|
|
42
|
+
// Filter size to only valid buttonToggle sizes (no 'xs')
|
|
43
|
+
const actualSize = (size === "xs" ? "sm" : size) as VariantProps<typeof buttonToggle>["size"];
|
|
44
|
+
// roundedSize is already validated by type system
|
|
45
|
+
const actualRoundedSize = roundedSize as VariantProps<typeof buttonToggle>["roundedSize"];
|
|
26
46
|
|
|
27
47
|
function handleClick() {
|
|
28
48
|
toggleSelected(value);
|
|
29
49
|
}
|
|
30
50
|
|
|
31
|
-
const { button, content, text, icon } = $derived(buttonToggle({ selected, color, size }));
|
|
51
|
+
const { button, content, text, icon } = $derived(buttonToggle({ selected, color: actualColor, size: actualSize }));
|
|
32
52
|
|
|
33
53
|
$effect(() => {
|
|
34
54
|
selected = isSelected(value);
|
|
@@ -37,7 +57,7 @@
|
|
|
37
57
|
|
|
38
58
|
<button
|
|
39
59
|
type="button"
|
|
40
|
-
class={button({ selected, color: actualColor, size, roundedSize, class: clsx(theme?.button, ctxBtnClass, className) })}
|
|
60
|
+
class={button({ selected, color: actualColor, size: actualSize, roundedSize: actualRoundedSize, class: clsx(theme?.button, ctxBtnClass, className) })}
|
|
41
61
|
data-selected={selected}
|
|
42
62
|
onclick={handleClick}
|
|
43
63
|
role={multiSelect ? "checkbox" : "radio"}
|
|
@@ -62,7 +82,7 @@
|
|
|
62
82
|
@component
|
|
63
83
|
[Go to docs](https://flowbite-svelte.com/)
|
|
64
84
|
## Type
|
|
65
|
-
[ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
85
|
+
[ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L441)
|
|
66
86
|
## Props
|
|
67
87
|
@prop value
|
|
68
88
|
@prop selected = false
|
|
@@ -2,7 +2,7 @@ import type { ButtonToggleProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L441)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop value
|
|
8
8
|
* @prop selected = false
|