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
|
@@ -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,5 +1,5 @@
|
|
|
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";
|
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
let { aClass, children, activeClass, liClass, classes, class: className, href, onclick, ...restProps }: DropdownItemProps = $props();
|
|
9
9
|
|
|
10
|
+
// svelte-ignore state_referenced_locally
|
|
10
11
|
warnThemeDeprecation("DropdownItem", { aClass, activeClass, liClass }, { aClass: "class", activeClass: "active", liClass: "li" });
|
|
12
|
+
|
|
11
13
|
const styling = $derived(classes ?? { active: activeClass, li: liClass });
|
|
12
14
|
|
|
13
15
|
const theme = getTheme("dropdownItem");
|
|
14
16
|
|
|
15
|
-
const
|
|
17
|
+
const ctx = getDropdownContext();
|
|
16
18
|
|
|
17
|
-
let isActive = $derived(activeUrl
|
|
19
|
+
let isActive = $derived(ctx?.activeUrl && href ? href === ctx.activeUrl : false);
|
|
18
20
|
|
|
19
21
|
const { base, active, li } = dropdownItem();
|
|
20
22
|
let finalClass = $derived(isActive ? active({ class: clsx(theme?.active, styling.active) }) : base({ class: clsx(theme?.base, className) }));
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
@component
|
|
41
43
|
[Go to docs](https://flowbite-svelte.com/)
|
|
42
44
|
## Type
|
|
43
|
-
[DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
45
|
+
[DropdownItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L705)
|
|
44
46
|
## Props
|
|
45
47
|
@prop aClass
|
|
46
48
|
@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,4 +1,5 @@
|
|
|
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 "..";
|
|
@@ -6,19 +7,21 @@
|
|
|
6
7
|
|
|
7
8
|
let { spanClass, aClass, href, by, copyrightMessage = "All Rights Reserved.", year, bySpanClass, classes, class: className, ...restProps }: FooterCopyrightProps = $props();
|
|
8
9
|
|
|
10
|
+
// svelte-ignore state_referenced_locally
|
|
9
11
|
warnThemeDeprecation("FooterCopyright", { aClass, spanClass, bySpanClass }, { aClass: "link", spanClass: "class", bySpanClass: "bySpan" });
|
|
12
|
+
|
|
10
13
|
// link, bySpan
|
|
11
14
|
const styling = $derived(classes ?? { bySpan: bySpanClass, link: aClass });
|
|
12
15
|
|
|
13
16
|
const theme = getTheme("footerCopyright");
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
const effectiveYear = $derived(year ?? new SvelteDate().getFullYear());
|
|
16
19
|
|
|
17
20
|
const { base, link, bySpan } = footerCopyright();
|
|
18
21
|
</script>
|
|
19
22
|
|
|
20
23
|
<span class={base({ class: clsx(theme?.base, className ?? spanClass) })}>
|
|
21
|
-
© {
|
|
24
|
+
© {effectiveYear}
|
|
22
25
|
{#if href}
|
|
23
26
|
<a {...restProps} {href} class={link({ class: clsx(theme?.link, styling.link) })}>
|
|
24
27
|
{by}
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
@component
|
|
34
37
|
[Go to docs](https://flowbite-svelte.com/)
|
|
35
38
|
## Type
|
|
36
|
-
[FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
39
|
+
[FooterCopyrightProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L744)
|
|
37
40
|
## Props
|
|
38
41
|
@prop spanClass
|
|
39
42
|
@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
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
let { children, liClass, aClass, href, classes, class: className, ...restProps }: FooterLinkProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation("FooterLink", { liClass, aClass }, { liClass: "class", aClass: "link" });
|
|
11
|
+
|
|
10
12
|
// link, bySpan
|
|
11
13
|
const styling = $derived(classes ?? { link: aClass });
|
|
12
14
|
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
@component
|
|
26
28
|
[Go to docs](https://flowbite-svelte.com/)
|
|
27
29
|
## Type
|
|
28
|
-
[FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
30
|
+
[FooterLinkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L764)
|
|
29
31
|
## Props
|
|
30
32
|
@prop children
|
|
31
33
|
@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,50 @@
|
|
|
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
9
|
|
|
10
10
|
let { value, selected = false, children, iconSlot, color, class: className, iconClass, txtClass, contentClass, classes, ...restProps }: ButtonToggleProps = $props();
|
|
11
11
|
|
|
12
|
+
// svelte-ignore state_referenced_locally
|
|
12
13
|
warnThemeDeprecation("ButtonToggle", { iconClass, txtClass, contentClass }, { iconClass: "icon", txtClass: "text", contentClass: "content" });
|
|
14
|
+
|
|
13
15
|
// button(className), content, text, icon
|
|
14
16
|
const styling = $derived(classes ?? { icon: iconClass, text: txtClass, content: contentClass });
|
|
15
17
|
|
|
16
18
|
const theme = getTheme("buttonToggle");
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const roundedSize =
|
|
23
|
-
|
|
20
|
+
// Get context - it will be undefined if used outside ButtonToggleGroup
|
|
21
|
+
const ctx = getButtonToggleContext();
|
|
22
|
+
|
|
23
|
+
// Extract context values with fallbacks
|
|
24
|
+
const { toggleSelected, isSelected, multiSelect, size, roundedSize, ctxIconClass, ctxBtnClass } = {
|
|
25
|
+
toggleSelected: ctx?.toggleSelected ?? (() => {}),
|
|
26
|
+
isSelected: ctx?.isSelected ?? (() => false),
|
|
27
|
+
multiSelect: ctx?.multiSelect ?? false,
|
|
28
|
+
size: ctx?.size,
|
|
29
|
+
roundedSize: ctx?.roundedSize,
|
|
30
|
+
ctxIconClass: ctx?.ctxIconClass,
|
|
31
|
+
ctxBtnClass: ctx?.ctxBtnClass
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Use context color if available, otherwise use prop color, otherwise default to "primary"
|
|
35
|
+
const actualColor = $derived((ctx?.color ?? color ?? "primary") as VariantProps<typeof buttonToggle>["color"]);
|
|
24
36
|
const actualIconClass = ctxIconClass;
|
|
25
|
-
|
|
37
|
+
|
|
38
|
+
// Filter size to only valid buttonToggle sizes (no 'xs')
|
|
39
|
+
const actualSize = (size === "xs" ? "sm" : size) as VariantProps<typeof buttonToggle>["size"];
|
|
40
|
+
// roundedSize is already validated by type system
|
|
41
|
+
const actualRoundedSize = roundedSize as VariantProps<typeof buttonToggle>["roundedSize"];
|
|
26
42
|
|
|
27
43
|
function handleClick() {
|
|
28
44
|
toggleSelected(value);
|
|
29
45
|
}
|
|
30
46
|
|
|
31
|
-
const { button, content, text, icon } = $derived(buttonToggle({ selected, color, size }));
|
|
47
|
+
const { button, content, text, icon } = $derived(buttonToggle({ selected, color: actualColor, size: actualSize }));
|
|
32
48
|
|
|
33
49
|
$effect(() => {
|
|
34
50
|
selected = isSelected(value);
|
|
@@ -37,7 +53,7 @@
|
|
|
37
53
|
|
|
38
54
|
<button
|
|
39
55
|
type="button"
|
|
40
|
-
class={button({ selected, color: actualColor, size, roundedSize, class: clsx(theme?.button, ctxBtnClass, className) })}
|
|
56
|
+
class={button({ selected, color: actualColor, size: actualSize, roundedSize: actualRoundedSize, class: clsx(theme?.button, ctxBtnClass, className) })}
|
|
41
57
|
data-selected={selected}
|
|
42
58
|
onclick={handleClick}
|
|
43
59
|
role={multiSelect ? "checkbox" : "radio"}
|
|
@@ -62,7 +78,7 @@
|
|
|
62
78
|
@component
|
|
63
79
|
[Go to docs](https://flowbite-svelte.com/)
|
|
64
80
|
## Type
|
|
65
|
-
[ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
81
|
+
[ButtonToggleProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L441)
|
|
66
82
|
## Props
|
|
67
83
|
@prop value
|
|
68
84
|
@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
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { setContext } from "svelte";
|
|
3
2
|
import clsx from "clsx";
|
|
4
|
-
import type { ButtonToggleGroupProps } from "../..";
|
|
3
|
+
import type { ButtonToggleGroupProps, ButtonToggleContextType } from "../..";
|
|
5
4
|
import { buttonToggleGroup } from "./theme";
|
|
6
5
|
import { getTheme } from "../../theme/themeUtils";
|
|
6
|
+
import { setButtonToggleContext } from "../../context";
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
multiSelect = false,
|
|
10
10
|
name = "toggle-group",
|
|
11
|
-
value
|
|
11
|
+
value,
|
|
12
12
|
color,
|
|
13
13
|
size = "md",
|
|
14
14
|
roundedSize = "md",
|
|
@@ -44,18 +44,13 @@
|
|
|
44
44
|
// Array passed but multiSelect is false - take first item
|
|
45
45
|
return value[0] ?? null;
|
|
46
46
|
} else {
|
|
47
|
-
return value;
|
|
47
|
+
return value ?? null; // Handle undefined case
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
let selectedValues = $state<SelectedValue>(getInitialValue());
|
|
53
53
|
|
|
54
|
-
interface ButtonToggleContext {
|
|
55
|
-
toggleSelected: (toggleValue: string) => void;
|
|
56
|
-
isSelected: (toggleValue: string) => boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
54
|
function toggleSelected(toggleValue: string) {
|
|
60
55
|
if (multiSelect) {
|
|
61
56
|
const currentSelected = [...(selectedValues as string[])];
|
|
@@ -81,19 +76,36 @@
|
|
|
81
76
|
}
|
|
82
77
|
}
|
|
83
78
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
// Create context object with all button toggle related values
|
|
80
|
+
const ctx: ButtonToggleContextType = {
|
|
81
|
+
get toggleSelected() {
|
|
82
|
+
return toggleSelected;
|
|
83
|
+
},
|
|
84
|
+
get isSelected() {
|
|
85
|
+
return isSelected;
|
|
86
|
+
},
|
|
87
|
+
get multiSelect() {
|
|
88
|
+
return multiSelect;
|
|
89
|
+
},
|
|
90
|
+
get color() {
|
|
91
|
+
return color;
|
|
92
|
+
},
|
|
93
|
+
get size() {
|
|
94
|
+
return size;
|
|
95
|
+
},
|
|
96
|
+
get roundedSize() {
|
|
97
|
+
return roundedSize;
|
|
98
|
+
},
|
|
99
|
+
get ctxIconClass() {
|
|
100
|
+
return clsx(ctxIconClass);
|
|
101
|
+
},
|
|
102
|
+
get ctxBtnClass() {
|
|
103
|
+
return clsx(ctxBtnClass);
|
|
104
|
+
}
|
|
87
105
|
};
|
|
88
106
|
|
|
89
|
-
// Set
|
|
90
|
-
|
|
91
|
-
setContext("multiSelect", multiSelect);
|
|
92
|
-
setContext("buttonToggleColor", color);
|
|
93
|
-
setContext("buttonToggleSize", size);
|
|
94
|
-
setContext("buttonToggleRounded", roundedSize);
|
|
95
|
-
setContext("ctxIconClass", clsx(ctxIconClass));
|
|
96
|
-
setContext("ctxBtnClass", clsx(ctxBtnClass));
|
|
107
|
+
// Set context during initialization
|
|
108
|
+
setButtonToggleContext(ctx);
|
|
97
109
|
</script>
|
|
98
110
|
|
|
99
111
|
<div class="inline">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@component
|
|
25
25
|
[Go to docs](https://flowbite-svelte.com/)
|
|
26
26
|
## Type
|
|
27
|
-
[CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
27
|
+
[CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L458)
|
|
28
28
|
## Props
|
|
29
29
|
@prop class: className
|
|
30
30
|
@prop ...restProps
|
|
@@ -2,7 +2,7 @@ import type { CheckIconProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CheckIconProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L458)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop class: className
|
|
8
8
|
* @prop ...restProps
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
...restProps
|
|
25
25
|
}: CheckboxProps = $props();
|
|
26
26
|
|
|
27
|
+
// svelte-ignore state_referenced_locally
|
|
27
28
|
warnThemeDeprecation("Checkbox", { divClass }, { divClass: "div" });
|
|
29
|
+
|
|
28
30
|
const styling = $derived(classes ?? { div: divClass });
|
|
29
31
|
|
|
30
32
|
const theme = getTheme("checkbox");
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@component
|
|
23
23
|
[Go to docs](https://flowbite-svelte.com/)
|
|
24
24
|
## Type
|
|
25
|
-
[CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
25
|
+
[CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L792)
|
|
26
26
|
## Props
|
|
27
27
|
@prop children
|
|
28
28
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { CheckboxButtonProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CheckboxButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L792)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
@component
|
|
53
53
|
[Go to docs](https://flowbite-svelte.com/)
|
|
54
54
|
## Type
|
|
55
|
-
[DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
55
|
+
[DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L802)
|
|
56
56
|
## Props
|
|
57
57
|
@prop children
|
|
58
58
|
@prop files = $bindable<FileList | null>()
|
|
@@ -2,7 +2,7 @@ import type { DropzoneProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [DropzoneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L802)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop files = $bindable<FileList | null>()
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
...restProps
|
|
22
22
|
}: FileuploadProps = $props();
|
|
23
23
|
|
|
24
|
+
// svelte-ignore state_referenced_locally
|
|
24
25
|
warnThemeDeprecation("Fileupload", { wrapperClass, clearableClass, clearableSvgClass }, { wrapperClass: "wrapper", clearableClass: "close", clearableSvgClass: "svg" });
|
|
26
|
+
|
|
25
27
|
const styling = $derived(classes ?? { wrapper: wrapperClass, close: clearableClass, svg: clearableSvgClass });
|
|
26
28
|
|
|
27
29
|
const theme = getTheme("fileupload");
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
@component
|
|
51
53
|
[Go to docs](https://flowbite-svelte.com/)
|
|
52
54
|
## Type
|
|
53
|
-
[FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
55
|
+
[FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L811)
|
|
54
56
|
## Props
|
|
55
57
|
@prop files = $bindable()
|
|
56
58
|
@prop size = "md"
|
|
@@ -2,7 +2,7 @@ import type { FileuploadProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FileuploadProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L811)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop files = $bindable()
|
|
8
8
|
* @prop size = "md"
|
|
@@ -32,11 +32,13 @@
|
|
|
32
32
|
...restProps
|
|
33
33
|
}: FloatingLabelInputProps = $props();
|
|
34
34
|
|
|
35
|
+
// svelte-ignore state_referenced_locally
|
|
35
36
|
warnThemeDeprecation(
|
|
36
37
|
"FloatingLabelInput",
|
|
37
38
|
{ inputClass, labelClass, clearableSvgClass, clearableClass, comboClass },
|
|
38
39
|
{ inputClass: "input", labelClass: "label", clearableSvgClass: "svg", clearableClass: "close", comboClass: "combo" }
|
|
39
40
|
);
|
|
41
|
+
|
|
40
42
|
const styling = $derived(classes ?? { input: inputClass, label: labelClass, svg: clearableSvgClass, close: clearableClass, combo: comboClass });
|
|
41
43
|
|
|
42
44
|
const theme = getTheme("floatingLabelInput");
|
|
@@ -211,7 +213,7 @@
|
|
|
211
213
|
@component
|
|
212
214
|
[Go to docs](https://flowbite-svelte.com/)
|
|
213
215
|
## Type
|
|
214
|
-
[FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
216
|
+
[FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L825)
|
|
215
217
|
## Props
|
|
216
218
|
@prop children
|
|
217
219
|
@prop id = idGenerator()
|
|
@@ -2,7 +2,7 @@ import type { FloatingLabelInputProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [FloatingLabelInputProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L825)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop id = idGenerator()
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@component
|
|
20
20
|
[Go to docs](https://flowbite-svelte.com/)
|
|
21
21
|
## Type
|
|
22
|
-
[HelperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
22
|
+
[HelperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L849)
|
|
23
23
|
## Props
|
|
24
24
|
@prop children
|
|
25
25
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { HelperProps } from "../..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [HelperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [HelperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L849)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|