flowbite-svelte 1.29.1 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/Accordion.svelte +24 -12
- package/dist/accordion/Accordion.svelte.d.ts +2 -2
- package/dist/accordion/AccordionItem.svelte +10 -8
- package/dist/accordion/AccordionItem.svelte.d.ts +1 -1
- package/dist/alert/Alert.svelte +1 -1
- package/dist/alert/Alert.svelte.d.ts +1 -1
- package/dist/avatar/Avatar.svelte +4 -4
- package/dist/avatar/Avatar.svelte.d.ts +1 -1
- package/dist/badge/Badge.svelte +2 -1
- package/dist/badge/Badge.svelte.d.ts +1 -1
- package/dist/banner/Banner.svelte +2 -1
- package/dist/banner/Banner.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNav.svelte +20 -12
- package/dist/bottom-navigation/BottomNav.svelte.d.ts +2 -2
- package/dist/bottom-navigation/BottomNavHeader.svelte +2 -1
- package/dist/bottom-navigation/BottomNavHeader.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte +1 -1
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte.d.ts +1 -1
- package/dist/bottom-navigation/BottomNavItem.svelte +10 -8
- package/dist/bottom-navigation/BottomNavItem.svelte.d.ts +1 -1
- package/dist/breadcrumb/Breadcrumb.svelte +4 -2
- package/dist/breadcrumb/Breadcrumb.svelte.d.ts +1 -1
- package/dist/breadcrumb/BreadcrumbItem.svelte +1 -1
- package/dist/breadcrumb/BreadcrumbItem.svelte.d.ts +1 -1
- package/dist/button-group/ButtonGroup.svelte +15 -4
- package/dist/button-group/ButtonGroup.svelte.d.ts +1 -1
- package/dist/buttons/Button.svelte +5 -4
- package/dist/buttons/GradientButton.svelte +4 -4
- package/dist/buttons/GradientButton.svelte.d.ts +1 -1
- package/dist/card/Card.svelte +2 -1
- package/dist/card/Card.svelte.d.ts +1 -1
- package/dist/carousel/Carousel.svelte +12 -13
- package/dist/carousel/Carousel.svelte.d.ts +1 -1
- package/dist/carousel/CarouselIndicators.svelte +19 -17
- package/dist/carousel/CarouselIndicators.svelte.d.ts +1 -1
- package/dist/carousel/ControlButton.svelte +2 -2
- package/dist/carousel/ControlButton.svelte.d.ts +1 -1
- package/dist/carousel/Controls.svelte +5 -4
- package/dist/carousel/Controls.svelte.d.ts +1 -1
- package/dist/carousel/Slide.svelte +8 -8
- package/dist/carousel/Slide.svelte.d.ts +1 -1
- package/dist/carousel/Thumbnail.svelte +1 -1
- package/dist/carousel/Thumbnail.svelte.d.ts +1 -1
- package/dist/carousel/Thumbnails.svelte +1 -1
- package/dist/carousel/Thumbnails.svelte.d.ts +1 -1
- package/dist/clipboard/Clipboard.svelte +1 -1
- package/dist/clipboard/Clipboard.svelte.d.ts +1 -1
- package/dist/clipboard-manager/ClipboardManager.svelte +7 -2
- package/dist/command-palette/CommandPalette.svelte +1 -1
- package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
- package/dist/context.d.ts +47 -0
- package/dist/context.js +72 -0
- package/dist/darkmode/DarkMode.svelte +1 -1
- package/dist/darkmode/DarkMode.svelte.d.ts +1 -1
- package/dist/datepicker/Datepicker.svelte +17 -11
- package/dist/device-mockups/Android.svelte +2 -1
- package/dist/device-mockups/Android.svelte.d.ts +1 -1
- package/dist/device-mockups/DefaultMockup.svelte +3 -1
- package/dist/device-mockups/DefaultMockup.svelte.d.ts +1 -1
- package/dist/device-mockups/Desktop.svelte +3 -1
- package/dist/device-mockups/Desktop.svelte.d.ts +1 -1
- package/dist/device-mockups/DeviceMockup.svelte +1 -1
- package/dist/device-mockups/DeviceMockup.svelte.d.ts +1 -1
- package/dist/device-mockups/Ios.svelte +3 -1
- package/dist/device-mockups/Ios.svelte.d.ts +1 -1
- package/dist/device-mockups/Laptop.svelte +3 -1
- package/dist/device-mockups/Laptop.svelte.d.ts +1 -1
- package/dist/device-mockups/Smartwatch.svelte +3 -1
- package/dist/device-mockups/Smartwatch.svelte.d.ts +1 -1
- package/dist/device-mockups/Tablet.svelte +3 -1
- package/dist/device-mockups/Tablet.svelte.d.ts +1 -1
- package/dist/device-mockups/theme.d.ts +12 -12
- package/dist/dialog/Dialog.svelte +1 -1
- package/dist/dialog/Dialog.svelte.d.ts +1 -1
- package/dist/drawer/Drawer.svelte +18 -9
- package/dist/drawer/Drawer.svelte.d.ts +2 -2
- package/dist/drawer/DrawerHandle.svelte +3 -3
- package/dist/drawer/DrawerHandle.svelte.d.ts +1 -1
- package/dist/drawer/Drawerhead.svelte +3 -1
- package/dist/drawer/Drawerhead.svelte.d.ts +1 -1
- package/dist/drawer/theme.d.ts +3 -3
- package/dist/drawer/theme.js +2 -2
- package/dist/dropdown/Dropdown.svelte +10 -7
- package/dist/dropdown/Dropdown.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownDivider.svelte +1 -1
- package/dist/dropdown/DropdownDivider.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownGroup.svelte +1 -1
- package/dist/dropdown/DropdownGroup.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownHeader.svelte +1 -1
- package/dist/dropdown/DropdownHeader.svelte.d.ts +1 -1
- package/dist/dropdown/DropdownItem.svelte +6 -4
- package/dist/dropdown/DropdownItem.svelte.d.ts +1 -1
- package/dist/dropdown/theme.d.ts +3 -3
- package/dist/footer/Footer.svelte +1 -1
- package/dist/footer/Footer.svelte.d.ts +1 -1
- package/dist/footer/FooterBrand.svelte +1 -1
- package/dist/footer/FooterBrand.svelte.d.ts +1 -1
- package/dist/footer/FooterCopyright.svelte +6 -3
- package/dist/footer/FooterCopyright.svelte.d.ts +1 -1
- package/dist/footer/FooterIcon.svelte +1 -1
- package/dist/footer/FooterIcon.svelte.d.ts +1 -1
- package/dist/footer/FooterLink.svelte +3 -1
- package/dist/footer/FooterLink.svelte.d.ts +1 -1
- package/dist/footer/FooterLinkGroup.svelte +1 -1
- package/dist/footer/FooterLinkGroup.svelte.d.ts +1 -1
- package/dist/footer/theme.d.ts +3 -3
- package/dist/forms/button-toggle/ButtonToggle.svelte +29 -13
- package/dist/forms/button-toggle/ButtonToggle.svelte.d.ts +1 -1
- package/dist/forms/button-toggle/ButtonToggleGroup.svelte +32 -20
- package/dist/forms/button-toggle/CheckIcon.svelte +1 -1
- package/dist/forms/button-toggle/CheckIcon.svelte.d.ts +1 -1
- package/dist/forms/checkbox/Checkbox.svelte +2 -0
- package/dist/forms/checkbox/CheckboxButton.svelte +1 -1
- package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +1 -1
- package/dist/forms/dropzone/Dropzone.svelte +1 -1
- package/dist/forms/dropzone/Dropzone.svelte.d.ts +1 -1
- package/dist/forms/fileupload/Fileupload.svelte +3 -1
- package/dist/forms/fileupload/Fileupload.svelte.d.ts +1 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +3 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte.d.ts +1 -1
- package/dist/forms/helper/Helper.svelte +1 -1
- package/dist/forms/helper/Helper.svelte.d.ts +1 -1
- package/dist/forms/input-addon/InputAddon.svelte +18 -16
- package/dist/forms/input-addon/InputAddon.svelte.d.ts +1 -1
- package/dist/forms/input-field/Input.svelte +6 -5
- package/dist/forms/input-field/index.d.ts +1 -1
- package/dist/forms/input-field/theme.js +2 -2
- package/dist/forms/label/Label.svelte +1 -1
- package/dist/forms/label/Label.svelte.d.ts +1 -1
- package/dist/forms/radio/Radio.svelte +2 -0
- package/dist/forms/radio/Radio.svelte.d.ts +2 -2
- package/dist/forms/radio/RadioButton.svelte.d.ts +2 -2
- package/dist/forms/range/Range.svelte +1 -1
- package/dist/forms/range/Range.svelte.d.ts +1 -1
- package/dist/forms/search/Search.svelte +3 -1
- package/dist/forms/search/Search.svelte.d.ts +1 -1
- package/dist/forms/select/MultiSelect.svelte +8 -4
- package/dist/forms/select/Select.svelte +5 -5
- package/dist/forms/tags/Tags.svelte +2 -0
- package/dist/forms/tags/theme.d.ts +3 -3
- package/dist/forms/textarea/Textarea.svelte +3 -1
- package/dist/forms/textarea/Textarea.svelte.d.ts +1 -1
- package/dist/forms/timepicker/Timepicker.svelte +2 -2
- package/dist/forms/timepicker/Timepicker.svelte.d.ts +1 -1
- package/dist/forms/toggle/Toggle.svelte +3 -1
- package/dist/forms/toggle/Toggle.svelte.d.ts +1 -1
- package/dist/gallery/Gallery.svelte +3 -1
- package/dist/gallery/Gallery.svelte.d.ts +1 -1
- package/dist/gallery/theme.d.ts +3 -3
- package/dist/indicator/Indicator.svelte +2 -2
- package/dist/indicator/Indicator.svelte.d.ts +1 -1
- package/dist/kanban/KanbanCard.svelte +1 -1
- package/dist/kanban/KanbanCard.svelte.d.ts +1 -1
- package/dist/kbd/Kbd.svelte +2 -2
- package/dist/kbd/Kbd.svelte.d.ts +1 -1
- package/dist/list-group/Listgroup.svelte +15 -5
- package/dist/list-group/Listgroup.svelte.d.ts +1 -1
- package/dist/list-group/ListgroupItem.svelte +6 -5
- package/dist/list-group/ListgroupItem.svelte.d.ts +1 -1
- package/dist/mega-menu/MegaMenu.svelte +3 -2
- package/dist/mega-menu/MegaMenu.svelte.d.ts +1 -1
- package/dist/modal/Modal.svelte +4 -2
- package/dist/modal/Modal.svelte.d.ts +1 -1
- package/dist/navbar/Menu.svelte +5 -3
- package/dist/navbar/Menu.svelte.d.ts +1 -1
- package/dist/navbar/NavBrand.svelte +1 -1
- package/dist/navbar/NavBrand.svelte.d.ts +1 -1
- package/dist/navbar/NavContainer.svelte +1 -1
- package/dist/navbar/NavContainer.svelte.d.ts +1 -1
- package/dist/navbar/NavHamburger.svelte +9 -6
- package/dist/navbar/NavHamburger.svelte.d.ts +1 -1
- package/dist/navbar/NavLi.svelte +12 -8
- package/dist/navbar/NavLi.svelte.d.ts +1 -1
- package/dist/navbar/NavUl.svelte +10 -7
- package/dist/navbar/NavUl.svelte.d.ts +1 -1
- package/dist/navbar/Navbar.svelte +8 -5
- package/dist/navbar/Navbar.svelte.d.ts +1 -1
- package/dist/pagination/Pagination.svelte +18 -6
- package/dist/pagination/Pagination.svelte.d.ts +1 -1
- package/dist/pagination/PaginationButton.svelte +12 -13
- package/dist/pagination/PaginationButton.svelte.d.ts +1 -1
- package/dist/pagination/PaginationItem.svelte +14 -5
- package/dist/pagination/PaginationItem.svelte.d.ts +1 -1
- package/dist/pagination/PaginationNav.svelte +23 -10
- package/dist/pagination/PaginationNav.svelte.d.ts +1 -1
- package/dist/popover/Popover.svelte +3 -2
- package/dist/popover/Popover.svelte.d.ts +1 -1
- package/dist/progress/Progressbar.svelte +7 -5
- package/dist/progress/Progressbar.svelte.d.ts +1 -1
- package/dist/progress/Progressradial.svelte +8 -6
- package/dist/progress/Progressradial.svelte.d.ts +1 -1
- package/dist/rating/AdvancedRating.svelte +3 -1
- package/dist/rating/AdvancedRating.svelte.d.ts +1 -1
- package/dist/rating/CustomIcon.svelte +2 -2
- package/dist/rating/CustomIcon.svelte.d.ts +1 -1
- package/dist/rating/Heart.svelte +2 -2
- package/dist/rating/Heart.svelte.d.ts +1 -1
- package/dist/rating/Rating.svelte +8 -5
- package/dist/rating/Rating.svelte.d.ts +1 -1
- package/dist/rating/RatingComment.svelte +1 -1
- package/dist/rating/RatingComment.svelte.d.ts +1 -1
- package/dist/rating/Review.svelte +3 -1
- package/dist/rating/Review.svelte.d.ts +1 -1
- package/dist/rating/ScoreRating.svelte +1 -1
- package/dist/rating/ScoreRating.svelte.d.ts +1 -1
- package/dist/rating/Star.svelte +2 -2
- package/dist/rating/Star.svelte.d.ts +1 -1
- package/dist/rating/Thumbup.svelte +2 -2
- package/dist/rating/Thumbup.svelte.d.ts +1 -1
- package/dist/rating/theme.d.ts +6 -6
- package/dist/scroll-spy/ScrollSpy.svelte +5 -2
- package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
- package/dist/sidebar/Sidebar.svelte +24 -13
- package/dist/sidebar/Sidebar.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarBrand.svelte +3 -1
- package/dist/sidebar/SidebarBrand.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarButton.svelte +1 -1
- package/dist/sidebar/SidebarButton.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarCta.svelte +3 -1
- package/dist/sidebar/SidebarCta.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarDropdownWrapper.svelte +6 -9
- package/dist/sidebar/SidebarDropdownWrapper.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarGroup.svelte +1 -1
- package/dist/sidebar/SidebarGroup.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarItem.svelte +8 -8
- package/dist/sidebar/SidebarItem.svelte.d.ts +2 -2
- package/dist/sidebar/theme.d.ts +6 -6
- package/dist/skeleton/CardPlaceholder.svelte +1 -1
- package/dist/skeleton/CardPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/ListPlaceholder.svelte +1 -1
- package/dist/skeleton/ListPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/Skeleton.svelte +1 -1
- package/dist/skeleton/Skeleton.svelte.d.ts +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/TextPlaceholder.svelte +1 -1
- package/dist/skeleton/TextPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDial.svelte +6 -2
- package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDialButton.svelte +4 -2
- package/dist/speed-dial/SpeedDialButton.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDialTrigger.svelte +1 -1
- package/dist/speed-dial/SpeedDialTrigger.svelte.d.ts +1 -1
- package/dist/spinner/Spinner.svelte +1 -1
- package/dist/spinner/Spinner.svelte.d.ts +1 -1
- package/dist/split-pane/Divider.svelte +1 -1
- package/dist/split-pane/Divider.svelte.d.ts +1 -1
- package/dist/split-pane/Pane.svelte +2 -2
- package/dist/split-pane/Pane.svelte.d.ts +1 -1
- package/dist/split-pane/SplitPane.svelte +12 -37
- package/dist/split-pane/SplitPane.svelte.d.ts +1 -14
- package/dist/step-indicator/StepIndicator.svelte +61 -9
- package/dist/step-indicator/StepIndicator.svelte.d.ts +7 -5
- package/dist/stepper/BreadcrumbStepper.svelte +1 -4
- package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
- package/dist/stepper/CheckmarkIcon.svelte +2 -2
- package/dist/stepper/DetailedStepper.svelte +1 -4
- package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
- package/dist/stepper/ProgressStepper.svelte +1 -4
- package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
- package/dist/stepper/Stepper.svelte +1 -4
- package/dist/stepper/Stepper.svelte.d.ts +1 -1
- package/dist/stepper/TimelineStepper.svelte +1 -4
- package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
- package/dist/stepper/VerticalStepper.svelte +1 -4
- package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
- package/dist/table/Table.svelte +7 -5
- package/dist/table/Table.svelte.d.ts +1 -1
- package/dist/table/TableBody.svelte +1 -1
- package/dist/table/TableBody.svelte.d.ts +1 -1
- package/dist/table/TableBodyCell.svelte +1 -1
- package/dist/table/TableBodyCell.svelte.d.ts +1 -1
- package/dist/table/TableBodyRow.svelte +8 -8
- package/dist/table/TableBodyRow.svelte.d.ts +1 -1
- package/dist/table/TableHead.svelte +7 -7
- package/dist/table/TableHead.svelte.d.ts +1 -1
- package/dist/table/TableHeadCell.svelte +1 -1
- package/dist/table/TableHeadCell.svelte.d.ts +1 -1
- package/dist/table/TableSearch.svelte +12 -9
- package/dist/table/TableSearch.svelte.d.ts +1 -1
- package/dist/tabs/TabItem.svelte +14 -8
- package/dist/tabs/TabItem.svelte.d.ts +1 -1
- package/dist/tabs/Tabs.svelte +21 -10
- package/dist/tabs/Tabs.svelte.d.ts +1 -1
- package/dist/theme/ThemeProvider.svelte +8 -6
- package/dist/theme/themeUtils.d.ts +1 -1
- package/dist/theme/themeUtils.js +2 -2
- package/dist/timeline/Activity.svelte +1 -1
- package/dist/timeline/Activity.svelte.d.ts +1 -1
- package/dist/timeline/ActivityItem.svelte +3 -1
- package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
- package/dist/timeline/Group.svelte +3 -1
- package/dist/timeline/Group.svelte.d.ts +1 -1
- package/dist/timeline/GroupItem.svelte +3 -1
- package/dist/timeline/GroupItem.svelte.d.ts +1 -1
- package/dist/timeline/Timeline.svelte +4 -2
- package/dist/timeline/Timeline.svelte.d.ts +1 -1
- package/dist/timeline/TimelineItem.svelte +2 -1
- package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
- package/dist/timeline/theme.d.ts +30 -30
- package/dist/toast/Toast.svelte +3 -1
- package/dist/toast/Toast.svelte.d.ts +1 -1
- package/dist/toast/ToastContainer.svelte +2 -2
- package/dist/toast/ToastContainer.svelte.d.ts +1 -1
- package/dist/toolbar/Toolbar.svelte +15 -3
- package/dist/toolbar/Toolbar.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarButton.svelte +2 -4
- package/dist/toolbar/ToolbarButton.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarGroup.svelte +4 -4
- package/dist/toolbar/ToolbarGroup.svelte.d.ts +1 -1
- package/dist/tooltip/Tooltip.svelte +1 -1
- package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
- package/dist/tour/theme.js +1 -1
- package/dist/types.d.ts +84 -23
- package/dist/typography/a/A.svelte +1 -1
- package/dist/typography/a/A.svelte.d.ts +1 -1
- package/dist/typography/blockquote/Blockquote.svelte +1 -1
- package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
- package/dist/typography/descriptionlist/DescriptionList.svelte +1 -1
- package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
- package/dist/typography/heading/Heading.svelte +1 -1
- package/dist/typography/heading/Heading.svelte.d.ts +1 -1
- package/dist/typography/hr/Hr.svelte +5 -4
- package/dist/typography/img/Img.svelte +5 -4
- package/dist/typography/img/Img.svelte.d.ts +2 -2
- package/dist/typography/layout/Layout.svelte +1 -1
- package/dist/typography/layout/Layout.svelte.d.ts +1 -1
- package/dist/typography/list/Li.svelte +4 -4
- package/dist/typography/list/Li.svelte.d.ts +1 -1
- package/dist/typography/list/List.svelte +12 -4
- package/dist/typography/list/List.svelte.d.ts +1 -1
- package/dist/typography/mark/Mark.svelte +1 -1
- package/dist/typography/mark/Mark.svelte.d.ts +1 -1
- package/dist/typography/paragraph/P.svelte +1 -1
- package/dist/typography/paragraph/P.svelte.d.ts +1 -1
- package/dist/typography/secondary/Secondary.svelte +1 -1
- package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
- package/dist/typography/span/Span.svelte +1 -1
- package/dist/typography/span/Span.svelte.d.ts +1 -1
- package/dist/utils/Arrow.svelte +1 -1
- package/dist/utils/Arrow.svelte.d.ts +1 -1
- package/dist/utils/Popper.svelte +7 -4
- package/dist/utils/Popper.svelte.d.ts +1 -1
- package/dist/video/Video.svelte +1 -1
- package/dist/video/Video.svelte.d.ts +1 -1
- package/dist/virtual-masonry/VirtualMasonry.svelte +1 -1
- package/dist/virtuallist/VirtualList.svelte +1 -1
- package/package.json +13 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { AccordionContextType, AccordionProps } from "../types";
|
|
3
3
|
import { getTheme } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import {
|
|
5
|
+
import { setAccordionContext } from "../context";
|
|
6
6
|
import { accordion } from "./theme";
|
|
7
7
|
import { createSingleSelectionContext } from "../utils/singleselection.svelte";
|
|
8
8
|
|
|
@@ -10,17 +10,29 @@
|
|
|
10
10
|
|
|
11
11
|
const theme = getTheme("accordion");
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
// Simple reactive state object
|
|
14
|
+
const reactiveCtx: AccordionContextType = {
|
|
15
|
+
get flush() {
|
|
16
|
+
return flush;
|
|
17
|
+
},
|
|
18
|
+
get activeClass() {
|
|
19
|
+
return activeClass;
|
|
20
|
+
},
|
|
21
|
+
get inactiveClass() {
|
|
22
|
+
return inactiveClass;
|
|
23
|
+
},
|
|
24
|
+
get transitionType() {
|
|
25
|
+
return transitionType;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Set context during initialization
|
|
30
|
+
setAccordionContext(reactiveCtx);
|
|
31
|
+
|
|
32
|
+
$effect(() => {
|
|
33
|
+
createSingleSelectionContext(multiple);
|
|
18
34
|
});
|
|
19
35
|
|
|
20
|
-
setContext<AccordionCtxType>("ctx", ctx);
|
|
21
|
-
|
|
22
|
-
createSingleSelectionContext(multiple);
|
|
23
|
-
|
|
24
36
|
const base = $derived(accordion({ flush, class: clsx(theme, className) }));
|
|
25
37
|
</script>
|
|
26
38
|
|
|
@@ -32,7 +44,7 @@
|
|
|
32
44
|
@component
|
|
33
45
|
[Go to docs](https://flowbite-svelte.com/)
|
|
34
46
|
## Type
|
|
35
|
-
[AccordionProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
47
|
+
[AccordionProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L199)
|
|
36
48
|
## Props
|
|
37
49
|
@prop children
|
|
38
50
|
@prop flush
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AccordionProps } from "
|
|
1
|
+
import type { AccordionProps } from "../types";
|
|
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#L199)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop flush
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { AccordionItemProps, ParamsType } from "..";
|
|
3
3
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import { useSingleSelection } from "../utils/singleselection.svelte";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import {
|
|
6
|
+
import { getAccordionContext } from "../context";
|
|
7
7
|
import { slide } from "svelte/transition";
|
|
8
8
|
import { accordionItem } from "./theme";
|
|
9
9
|
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
contentClass
|
|
24
24
|
}: AccordionItemProps = $props();
|
|
25
25
|
|
|
26
|
+
// svelte-ignore state_referenced_locally
|
|
26
27
|
warnThemeDeprecation(
|
|
27
28
|
"AccordionItem",
|
|
28
29
|
{
|
|
@@ -41,11 +42,12 @@
|
|
|
41
42
|
|
|
42
43
|
let styling: typeof classes = $derived(classes ?? { button: headerClass, content: contentClass, active: activeClass, inactive: inactiveClass });
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
// Get context - it will be undefined if used outside Accordion
|
|
46
|
+
const ctx = getAccordionContext();
|
|
45
47
|
|
|
46
|
-
const ctxTransitionType = ctx
|
|
48
|
+
const ctxTransitionType = $derived(ctx?.transitionType ?? transitionType);
|
|
47
49
|
// Check if transitionType is explicitly set to undefined in props
|
|
48
|
-
const useTransition = transitionType === "none" ? false : ctxTransitionType === "none" ? false : true;
|
|
50
|
+
const useTransition = $derived(transitionType === "none" ? false : ctxTransitionType === "none" ? false : true);
|
|
49
51
|
|
|
50
52
|
// Theme context
|
|
51
53
|
const theme = getTheme("accordionItem");
|
|
@@ -63,9 +65,9 @@
|
|
|
63
65
|
open = !open;
|
|
64
66
|
};
|
|
65
67
|
|
|
66
|
-
const { base, button, content, active, inactive } = $derived(accordionItem({ flush: ctx
|
|
68
|
+
const { base, button, content, active, inactive } = $derived(accordionItem({ flush: ctx?.flush, open }));
|
|
67
69
|
|
|
68
|
-
let buttonClass = $derived(clsx(open && !ctx
|
|
70
|
+
let buttonClass = $derived(clsx(open && !ctx?.flush && (styling.active || ctx?.activeClass || active()), !open && !ctx?.flush && (styling.inactive || ctx?.inactiveClass || inactive())));
|
|
69
71
|
</script>
|
|
70
72
|
|
|
71
73
|
<h2 class={base({ class: clsx(theme?.base, className) })}>
|
|
@@ -111,7 +113,7 @@
|
|
|
111
113
|
@component
|
|
112
114
|
[Go to docs](https://flowbite-svelte.com/)
|
|
113
115
|
## Type
|
|
114
|
-
[AccordionItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
116
|
+
[AccordionItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L207)
|
|
115
117
|
## Props
|
|
116
118
|
@prop children
|
|
117
119
|
@prop header
|
|
@@ -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#L207)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
package/dist/alert/Alert.svelte
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
@component
|
|
78
78
|
[Go to docs](https://flowbite-svelte.com/)
|
|
79
79
|
## Type
|
|
80
|
-
[AlertProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
80
|
+
[AlertProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L221)
|
|
81
81
|
## Props
|
|
82
82
|
@prop children
|
|
83
83
|
@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#L221)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop icon
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// Theme context
|
|
11
11
|
const theme = getTheme("avatar");
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
let dotProps = $derived(dot ? { placement: "top-right" as const, color: "gray" as const, size: "lg" as const, ...dot } : undefined);
|
|
14
14
|
|
|
15
15
|
let avatarClass = $derived(
|
|
16
16
|
avatar({
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
<path fill-rule="evenodd" d="M8 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd"></path>
|
|
35
35
|
</svg>
|
|
36
36
|
{/if}
|
|
37
|
-
{#if
|
|
38
|
-
<Indicator border offset={cornerStyle === "circular" ? true : false} {...
|
|
37
|
+
{#if dotProps}
|
|
38
|
+
<Indicator border offset={cornerStyle === "circular" ? true : false} {...dotProps} />
|
|
39
39
|
{/if}
|
|
40
40
|
{#if indicator}
|
|
41
41
|
{@render indicator()}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
@component
|
|
50
50
|
[Go to docs](https://flowbite-svelte.com/)
|
|
51
51
|
## Type
|
|
52
|
-
[AvatarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
52
|
+
[AvatarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L232)
|
|
53
53
|
## Props
|
|
54
54
|
@prop children
|
|
55
55
|
@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#L232)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop indicator
|
package/dist/badge/Badge.svelte
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
...restProps
|
|
27
27
|
}: BadgeProps = $props();
|
|
28
28
|
|
|
29
|
+
// svelte-ignore state_referenced_locally
|
|
29
30
|
warnThemeDeprecation("Badge", { aClass }, { aClass: "linkClass" });
|
|
30
31
|
|
|
31
32
|
const styling = $derived(classes ?? { linkClass: aClass });
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
@component
|
|
73
74
|
[Go to docs](https://flowbite-svelte.com/)
|
|
74
75
|
## Type
|
|
75
|
-
[BadgeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
76
|
+
[BadgeProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L244)
|
|
76
77
|
## Props
|
|
77
78
|
@prop children
|
|
78
79
|
@prop icon
|
|
@@ -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#L244)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop icon
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
...restProps
|
|
25
25
|
}: BannerProps = $props();
|
|
26
26
|
|
|
27
|
+
// svelte-ignore state_referenced_locally
|
|
27
28
|
warnThemeDeprecation("Banner", { innerClass, closeClass }, { innerClass: "insideDiv", closeClass: "dismissable" });
|
|
28
29
|
|
|
29
30
|
const styling = $derived(classes ?? { insideDiv: innerClass, dismissable: closeClass });
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
@component
|
|
62
63
|
[Go to docs](https://flowbite-svelte.com/)
|
|
63
64
|
## Type
|
|
64
|
-
[BannerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
65
|
+
[BannerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L258)
|
|
65
66
|
## Props
|
|
66
67
|
@prop children
|
|
67
68
|
@prop header
|
|
@@ -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#L258)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
@@ -1,31 +1,39 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import type { BottomNavContextType, BottomNavProps } from "../types";
|
|
3
3
|
import { cn } from "../utils";
|
|
4
4
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import {
|
|
6
|
+
import { setBottomNavContext } from "../context";
|
|
7
7
|
import { bottomNav } from "./theme";
|
|
8
8
|
|
|
9
9
|
let { children, header, position = "fixed", navType = "default", class: className, classes, outerClass, innerClass, activeClass, activeUrl = "", ...restProps }: BottomNavProps = $props();
|
|
10
10
|
|
|
11
|
+
// svelte-ignore state_referenced_locally
|
|
11
12
|
warnThemeDeprecation("BottomNav", { innerClass, outerClass }, { innerClass: "inner", outerClass: "class" });
|
|
13
|
+
|
|
12
14
|
const styling = $derived(classes ?? { inner: innerClass });
|
|
13
15
|
|
|
14
16
|
// Theme context
|
|
15
17
|
const theme = getTheme("bottomNav");
|
|
16
18
|
|
|
17
|
-
const activeCls = cn("text-primary-700 dark:text-primary-700 hover:text-primary-900 dark:hover:text-primary-900", activeClass);
|
|
19
|
+
const activeCls = $derived(cn("text-primary-700 dark:text-primary-700 hover:text-primary-900 dark:hover:text-primary-900", activeClass));
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
// Create reactive context using getters
|
|
22
|
+
const reactiveCtx: BottomNavContextType = {
|
|
23
|
+
get activeClass() {
|
|
24
|
+
return activeCls;
|
|
25
|
+
},
|
|
26
|
+
get activeUrl() {
|
|
27
|
+
return activeUrl;
|
|
28
|
+
},
|
|
29
|
+
get navType() {
|
|
30
|
+
return navType;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
setBottomNavContext(reactiveCtx);
|
|
23
35
|
|
|
24
|
-
$
|
|
25
|
-
context.activeUrl = activeUrl;
|
|
26
|
-
context.navType = navType;
|
|
27
|
-
context.activeClass = activeCls;
|
|
28
|
-
});
|
|
36
|
+
const { base, inner } = $derived(bottomNav({ position, navType }));
|
|
29
37
|
</script>
|
|
30
38
|
|
|
31
39
|
<div {...restProps} class={base({ class: clsx(theme?.base, className ?? outerClass) })}>
|
|
@@ -42,7 +50,7 @@
|
|
|
42
50
|
@component
|
|
43
51
|
[Go to docs](https://flowbite-svelte.com/)
|
|
44
52
|
## Type
|
|
45
|
-
[BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
53
|
+
[BottomNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L271)
|
|
46
54
|
## Props
|
|
47
55
|
@prop children
|
|
48
56
|
@prop header
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BottomNavProps } from "../types";
|
|
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#L271)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
let { children, class: className, classes, outerClass, innerClass, ...restProps }: BottomNavHeaderProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation("BottomNavHeader", { innerClass, outerClass }, { innerClass: "inner", outerClass: "class" });
|
|
10
11
|
|
|
11
12
|
const styling = $derived(classes ?? { innerDiv: innerClass });
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
@component
|
|
27
28
|
[Go to docs](https://flowbite-svelte.com/)
|
|
28
29
|
## Type
|
|
29
|
-
[BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
30
|
+
[BottomNavHeaderProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L290)
|
|
30
31
|
## Props
|
|
31
32
|
@prop children
|
|
32
33
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ 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#L290)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -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#L296)
|
|
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#L296)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop itemName
|
|
8
8
|
* @prop active
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { BottomNavItemProps } from "..";
|
|
3
3
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import {
|
|
5
|
+
import { getBottomNavContext } from "../context";
|
|
6
6
|
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
7
7
|
import { bottomNavItem } from "./theme";
|
|
8
8
|
|
|
9
9
|
let { children, btnName, appBtnPosition = "middle", activeClass, class: className, classes, btnClass, spanClass, active: manualActive, ...restProps }: BottomNavItemProps = $props();
|
|
10
10
|
|
|
11
|
+
// svelte-ignore state_referenced_locally
|
|
11
12
|
warnThemeDeprecation("BottomNavItem", { spanClass, btnClass }, { spanClass: "span", btnClass: "class" });
|
|
13
|
+
|
|
12
14
|
const styling = $derived(classes ?? { span: spanClass });
|
|
13
15
|
|
|
14
16
|
// Theme context
|
|
15
17
|
const theme = getTheme("bottomNavItem");
|
|
16
18
|
|
|
17
|
-
const context =
|
|
19
|
+
const context = getBottomNavContext();
|
|
18
20
|
|
|
19
|
-
let navUrl = $derived(context
|
|
21
|
+
let navUrl = $derived(context?.activeUrl || "");
|
|
20
22
|
|
|
21
|
-
const { base, span } = $derived(bottomNavItem({ navType: context
|
|
23
|
+
const { base, span } = $derived(bottomNavItem({ navType: context?.navType, appBtnPosition }));
|
|
22
24
|
|
|
23
25
|
// Determine active state based on manual prop or URL matching
|
|
24
26
|
let isActive = $derived.by(() => {
|
|
@@ -33,11 +35,11 @@
|
|
|
33
35
|
});
|
|
34
36
|
|
|
35
37
|
function getCommonClass() {
|
|
36
|
-
return base({ class: clsx(isActive && (activeClass ?? context
|
|
38
|
+
return base({ class: clsx(isActive && (activeClass ?? context?.activeClass), theme?.base, className ?? btnClass) });
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
function getSpanClass() {
|
|
40
|
-
return span({ class: clsx(isActive && (activeClass ?? context
|
|
42
|
+
return span({ class: clsx(isActive && (activeClass ?? context?.activeClass), theme?.span, styling.span) });
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
@component
|
|
74
76
|
[Go to docs](https://flowbite-svelte.com/)
|
|
75
77
|
## Type
|
|
76
|
-
[BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
78
|
+
[BottomNavItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L280)
|
|
77
79
|
## Props
|
|
78
80
|
@prop children
|
|
79
81
|
@prop btnName
|
|
@@ -2,7 +2,7 @@ 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#L280)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop btnName
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
let { children, solid = false, class: className, classes, olClass, ariaLabel = "Breadcrumb", ...restProps }: BreadcrumbProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation("Breadcrumb", { olClass }, { olClass: "list" });
|
|
11
|
+
|
|
10
12
|
const styling = $derived(classes ?? { list: olClass });
|
|
11
13
|
|
|
12
14
|
const theme = getTheme("breadcrumb");
|
|
13
15
|
|
|
14
|
-
const { base, list } = breadcrumb({ solid });
|
|
16
|
+
const { base, list } = $derived(breadcrumb({ solid }));
|
|
15
17
|
let classNav = $derived(base({ class: clsx(theme?.base, className) }));
|
|
16
18
|
let classList = $derived(list({ class: clsx(theme?.list, styling.list) }));
|
|
17
19
|
</script>
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
@component
|
|
27
29
|
[Go to docs](https://flowbite-svelte.com/)
|
|
28
30
|
## Type
|
|
29
|
-
[BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
31
|
+
[BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L302)
|
|
30
32
|
## Props
|
|
31
33
|
@prop children
|
|
32
34
|
@prop solid = false
|
|
@@ -2,7 +2,7 @@ import type { BreadcrumbProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BreadcrumbProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L302)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop solid = false
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
@component
|
|
59
59
|
[Go to docs](https://flowbite-svelte.com/)
|
|
60
60
|
## Type
|
|
61
|
-
[BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
61
|
+
[BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L309)
|
|
62
62
|
## Props
|
|
63
63
|
@prop children
|
|
64
64
|
@prop icon
|
|
@@ -2,7 +2,7 @@ import type { BreadcrumbItemProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [BreadcrumbItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L309)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop icon
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { setContext } from "svelte";
|
|
3
2
|
import { buttonGroup } from "./theme";
|
|
4
3
|
import clsx from "clsx";
|
|
5
4
|
import type { ButtonGroupProps } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
6
|
+
import { setButtonGroupContext } from "../context";
|
|
7
7
|
|
|
8
8
|
let { children, size = "md", disabled, class: className, ...restProps }: ButtonGroupProps = $props();
|
|
9
9
|
|
|
10
10
|
const theme = getTheme("buttonGroup");
|
|
11
11
|
|
|
12
12
|
let groupClass = $derived(buttonGroup({ size, class: clsx(theme, className) }));
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
// Create a reactive context object
|
|
15
|
+
// The object itself stays the same, but its properties are reactive
|
|
16
|
+
const reactiveCtx = {
|
|
17
|
+
get size() {
|
|
18
|
+
return size;
|
|
19
|
+
},
|
|
20
|
+
get disabled() {
|
|
21
|
+
return disabled;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
setButtonGroupContext(reactiveCtx);
|
|
15
26
|
</script>
|
|
16
27
|
|
|
17
28
|
<div {...restProps} class={groupClass} role="group">
|
|
@@ -22,7 +33,7 @@
|
|
|
22
33
|
@component
|
|
23
34
|
[Go to docs](https://flowbite-svelte.com/)
|
|
24
35
|
## Type
|
|
25
|
-
[ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
36
|
+
[ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L320)
|
|
26
37
|
## Props
|
|
27
38
|
@prop children
|
|
28
39
|
@prop size = "md"
|
|
@@ -2,7 +2,7 @@ import type { ButtonGroupProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ButtonGroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L320)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop size = "md"
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getContext } from "svelte";
|
|
3
2
|
import clsx from "clsx";
|
|
4
3
|
import { Spinner } from "..";
|
|
5
|
-
import type {
|
|
4
|
+
import type { ButtonProps } from "..";
|
|
6
5
|
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
import { button } from "./theme";
|
|
7
|
+
import { getButtonGroupContext } from "../context";
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const groupCtx = getButtonGroupContext();
|
|
10
|
+
const group = groupCtx?.size;
|
|
11
|
+
const ctxDisabled = groupCtx?.disabled;
|
|
11
12
|
|
|
12
13
|
let {
|
|
13
14
|
children,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getContext } from "svelte";
|
|
3
2
|
import { gradientButton } from "./theme";
|
|
4
3
|
import clsx from "clsx";
|
|
5
|
-
import type { GradientButtonProps
|
|
4
|
+
import type { GradientButtonProps } from "..";
|
|
6
5
|
import Button from "./Button.svelte";
|
|
7
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
|
+
import { getButtonGroupContext } from "../context";
|
|
8
8
|
|
|
9
|
-
const group
|
|
9
|
+
const group = getButtonGroupContext()?.size;
|
|
10
10
|
|
|
11
11
|
let { children, outline, pill, color = "blue", shadow, class: className, href, disabled, size, btnClass, ...restProps }: GradientButtonProps = $props();
|
|
12
12
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@component
|
|
32
32
|
[Go to docs](https://flowbite-svelte.com/)
|
|
33
33
|
## Type
|
|
34
|
-
[GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
34
|
+
[GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L340)
|
|
35
35
|
## Props
|
|
36
36
|
@prop children
|
|
37
37
|
@prop outline
|
|
@@ -2,7 +2,7 @@ import type { GradientButtonProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [GradientButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L340)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop outline
|
package/dist/card/Card.svelte
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
let { children, color = "gray", horizontal = false, shadow = "md", reverse = false, img, size = "sm", class: className, classes, imgClass, ...restProps }: CardProps = $props();
|
|
8
8
|
|
|
9
|
+
// svelte-ignore state_referenced_locally
|
|
9
10
|
warnThemeDeprecation("Card", { imgClass }, { imgClass: "image" });
|
|
10
11
|
|
|
11
12
|
const styling = $derived(classes ?? { image: imgClass });
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
@component
|
|
59
60
|
[Go to docs](https://flowbite-svelte.com/)
|
|
60
61
|
## Type
|
|
61
|
-
[CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
62
|
+
[CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L461)
|
|
62
63
|
## Props
|
|
63
64
|
@prop children
|
|
64
65
|
@prop color = "gray"
|
|
@@ -2,7 +2,7 @@ import type { CardProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CardProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L461)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop color = "gray"
|