flowbite-svelte 1.30.0 → 1.31.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 +5 -4
- package/dist/accordion/AccordionItem.svelte +4 -4
- package/dist/alert/Alert.svelte +1 -1
- package/dist/avatar/Avatar.svelte +1 -1
- package/dist/badge/Badge.svelte +7 -3
- package/dist/banner/Banner.svelte +7 -3
- package/dist/bottom-navigation/BottomNav.svelte +7 -3
- package/dist/bottom-navigation/BottomNavHeader.svelte +7 -3
- package/dist/bottom-navigation/BottomNavHeaderItem.svelte +1 -1
- package/dist/bottom-navigation/BottomNavItem.svelte +7 -3
- package/dist/breadcrumb/Breadcrumb.svelte +7 -3
- package/dist/breadcrumb/BreadcrumbItem.svelte +1 -1
- package/dist/button-group/ButtonGroup.svelte +1 -1
- package/dist/buttons/Button.svelte +1 -1
- package/dist/buttons/GradientButton.svelte +1 -1
- package/dist/card/Card.svelte +7 -3
- package/dist/carousel/Carousel.svelte +7 -3
- package/dist/carousel/CarouselIndicators.svelte +1 -1
- package/dist/carousel/ControlButton.svelte +1 -1
- package/dist/carousel/Controls.svelte +1 -1
- package/dist/carousel/Slide.svelte +1 -1
- package/dist/carousel/Thumbnail.svelte +1 -1
- package/dist/carousel/Thumbnails.svelte +1 -1
- package/dist/clipboard/Clipboard.svelte +1 -1
- package/dist/clipboard-manager/ClipboardManager.svelte +1 -1
- package/dist/command-palette/CommandPalette.svelte +2 -2
- package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
- package/dist/context.d.ts +4 -1
- package/dist/context.js +0 -1
- package/dist/darkmode/DarkMode.svelte +1 -1
- package/dist/datepicker/Datepicker.svelte +1 -1
- package/dist/device-mockups/Android.svelte +2 -2
- package/dist/device-mockups/DefaultMockup.svelte +2 -2
- package/dist/device-mockups/Desktop.svelte +6 -2
- package/dist/device-mockups/Ios.svelte +2 -2
- package/dist/device-mockups/Laptop.svelte +2 -2
- package/dist/device-mockups/Smartwatch.svelte +2 -2
- package/dist/device-mockups/Tablet.svelte +2 -2
- package/dist/drawer/Drawer.svelte +1 -1
- package/dist/drawer/DrawerHandle.svelte +1 -1
- package/dist/drawer/Drawerhead.svelte +7 -3
- package/dist/dropdown/Dropdown.svelte +1 -1
- package/dist/dropdown/DropdownDivider.svelte +1 -1
- package/dist/dropdown/DropdownGroup.svelte +1 -1
- package/dist/dropdown/DropdownHeader.svelte +1 -1
- package/dist/dropdown/DropdownItem.svelte +7 -3
- package/dist/footer/Footer.svelte +1 -1
- package/dist/footer/FooterBrand.svelte +1 -1
- package/dist/footer/FooterCopyright.svelte +7 -3
- package/dist/footer/FooterIcon.svelte +1 -1
- package/dist/footer/FooterLink.svelte +7 -3
- package/dist/footer/FooterLinkGroup.svelte +1 -1
- package/dist/forms/button-toggle/ButtonToggle.svelte +7 -3
- package/dist/forms/button-toggle/ButtonToggleGroup.svelte +1 -1
- package/dist/forms/checkbox/Checkbox.svelte +7 -3
- package/dist/forms/checkbox/CheckboxButton.svelte +1 -1
- package/dist/forms/dropzone/Dropzone.svelte +1 -1
- package/dist/forms/fileupload/Fileupload.svelte +7 -3
- package/dist/forms/floating-label/FloatingLabelInput.svelte +3 -3
- package/dist/forms/helper/Helper.svelte +1 -1
- package/dist/forms/input-field/Input.svelte +3 -4
- package/dist/forms/label/Label.svelte +1 -1
- package/dist/forms/phoneinput/PhoneInput.svelte +1 -1
- package/dist/forms/radio/Radio.svelte +7 -3
- package/dist/forms/radio/RadioButton.svelte +1 -1
- package/dist/forms/range/Range.svelte +1 -1
- package/dist/forms/search/Search.svelte +7 -3
- package/dist/forms/select/MultiSelect.svelte +13 -6
- package/dist/forms/select/Select.svelte +7 -3
- package/dist/forms/tags/Tags.svelte +7 -4
- package/dist/forms/textarea/Textarea.svelte +3 -3
- package/dist/forms/timepicker/Timepicker.svelte +1 -1
- package/dist/forms/toggle/Toggle.svelte +7 -3
- package/dist/gallery/Gallery.svelte +7 -3
- package/dist/indicator/Indicator.svelte +1 -1
- package/dist/kanban/KanbanBoard.svelte +1 -1
- package/dist/kanban/KanbanCard.svelte +2 -2
- package/dist/kanban/KanbanCard.svelte.d.ts +1 -1
- package/dist/kbd/Kbd.svelte +1 -1
- package/dist/list-group/Listgroup.svelte +1 -1
- package/dist/list-group/ListgroupItem.svelte +1 -1
- package/dist/mega-menu/MegaMenu.svelte +7 -3
- package/dist/modal/Modal.svelte +7 -3
- package/dist/navbar/NavBrand.svelte +1 -1
- package/dist/navbar/NavContainer.svelte +1 -1
- package/dist/navbar/NavHamburger.svelte +7 -3
- package/dist/navbar/NavLi.svelte +1 -1
- package/dist/navbar/NavUl.svelte +7 -3
- package/dist/navbar/Navbar.svelte +1 -1
- package/dist/pagination/Pagination.svelte +1 -1
- package/dist/pagination/PaginationButton.svelte +1 -1
- package/dist/pagination/PaginationItem.svelte +1 -1
- package/dist/pagination/PaginationNav.svelte +7 -3
- package/dist/popover/Popover.svelte +7 -3
- package/dist/progress/Progressbar.svelte +1 -1
- package/dist/progress/Progressradial.svelte +1 -1
- package/dist/rating/AdvancedRating.svelte +3 -3
- package/dist/rating/Rating.svelte +7 -3
- package/dist/rating/Review.svelte +3 -3
- package/dist/rating/ScoreRating.svelte +1 -1
- package/dist/scroll-spy/ScrollSpy.svelte +2 -2
- package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
- package/dist/sidebar/Sidebar.svelte +7 -3
- package/dist/sidebar/SidebarBrand.svelte +7 -3
- package/dist/sidebar/SidebarButton.svelte +1 -1
- package/dist/sidebar/SidebarCta.svelte +7 -3
- package/dist/sidebar/SidebarDropdownWrapper.svelte +7 -3
- package/dist/skeleton/CardPlaceholder.svelte +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte +1 -1
- package/dist/skeleton/ListPlaceholder.svelte +1 -1
- package/dist/skeleton/Skeleton.svelte +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte +1 -1
- package/dist/skeleton/TextPlaceholder.svelte +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte +1 -1
- package/dist/speed-dial/SpeedDial.svelte +7 -4
- package/dist/speed-dial/SpeedDialButton.svelte +7 -4
- package/dist/spinner/Spinner.svelte +1 -1
- package/dist/split-pane/Divider.svelte +4 -4
- 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 +2 -2
- package/dist/split-pane/SplitPane.svelte.d.ts +1 -1
- package/dist/step-indicator/StepIndicator.svelte +1 -1
- package/dist/stepper/BreadcrumbStepper.svelte +1 -1
- package/dist/stepper/DetailedStepper.svelte +1 -1
- package/dist/stepper/ProgressStepper.svelte +1 -1
- package/dist/stepper/Stepper.svelte +1 -1
- package/dist/stepper/TimelineStepper.svelte +1 -1
- package/dist/stepper/VerticalStepper.svelte +1 -1
- package/dist/table/Table.svelte +7 -3
- package/dist/table/TableBodyCell.svelte +1 -1
- package/dist/table/TableBodyRow.svelte +1 -1
- package/dist/table/TableHead.svelte +1 -1
- package/dist/table/TableHeadCell.svelte +1 -1
- package/dist/table/TableSearch.svelte +3 -3
- package/dist/tabs/TabItem.svelte +1 -1
- package/dist/tabs/Tabs.svelte +7 -3
- package/dist/theme/ThemeProvider.svelte +11 -6
- package/dist/theme/themeUtils.js +4 -2
- package/dist/timeline/Activity.svelte +1 -1
- package/dist/timeline/ActivityItem.svelte +3 -3
- package/dist/timeline/Group.svelte +3 -3
- package/dist/timeline/GroupItem.svelte +3 -3
- package/dist/timeline/Timeline.svelte +3 -5
- package/dist/timeline/TimelineItem.svelte +9 -5
- package/dist/timeline/TimelineItem.svelte.d.ts +1 -0
- package/dist/timeline/theme.d.ts +3 -0
- package/dist/timeline/theme.js +2 -1
- package/dist/toast/Toast.svelte +4 -4
- 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 +1 -1
- package/dist/toolbar/ToolbarButton.svelte +1 -1
- package/dist/toolbar/ToolbarGroup.svelte +1 -1
- package/dist/tooltip/Tooltip.svelte +1 -1
- package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
- package/dist/tour/Tour.svelte +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/typography/a/A.svelte +2 -2
- package/dist/typography/a/A.svelte.d.ts +1 -1
- package/dist/typography/blockquote/Blockquote.svelte +2 -2
- package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
- package/dist/typography/descriptionlist/DescriptionList.svelte +2 -2
- package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
- package/dist/typography/heading/Heading.svelte +2 -2
- package/dist/typography/heading/Heading.svelte.d.ts +1 -1
- package/dist/typography/hr/Hr.svelte +3 -3
- package/dist/typography/img/Img.svelte +4 -4
- package/dist/typography/img/Img.svelte.d.ts +1 -1
- package/dist/typography/layout/Layout.svelte +2 -2
- package/dist/typography/layout/Layout.svelte.d.ts +1 -1
- package/dist/typography/list/Li.svelte +1 -1
- package/dist/typography/list/Li.svelte.d.ts +1 -1
- package/dist/typography/list/List.svelte +2 -2
- package/dist/typography/list/List.svelte.d.ts +1 -1
- package/dist/typography/mark/Mark.svelte +2 -2
- package/dist/typography/mark/Mark.svelte.d.ts +1 -1
- package/dist/typography/paragraph/P.svelte +2 -2
- package/dist/typography/paragraph/P.svelte.d.ts +1 -1
- package/dist/typography/secondary/Secondary.svelte +2 -2
- package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
- package/dist/typography/span/Span.svelte +2 -2
- 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 +1 -1
- package/dist/utils/Popper.svelte.d.ts +1 -1
- package/dist/video/Video.svelte +2 -2
- 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
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
import { setAccordionContext } from "../context";
|
|
6
6
|
import { accordion } from "./theme";
|
|
7
7
|
import { createSingleSelectionContext } from "../utils/singleselection.svelte";
|
|
8
|
+
import { untrack } from "svelte";
|
|
8
9
|
|
|
9
10
|
let { children, flush, activeClass, inactiveClass, multiple = false, class: className, transitionType, ...restProps }: AccordionProps = $props();
|
|
10
11
|
|
|
11
|
-
const theme = getTheme("accordion");
|
|
12
|
+
const theme = $derived(getTheme("accordion"));
|
|
12
13
|
|
|
13
14
|
// Simple reactive state object
|
|
14
15
|
const reactiveCtx: AccordionContextType = {
|
|
@@ -29,9 +30,9 @@
|
|
|
29
30
|
// Set context during initialization
|
|
30
31
|
setAccordionContext(reactiveCtx);
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
// Create selection context synchronously for proper nesting
|
|
34
|
+
// Use untrack to explicitly capture only the initial value
|
|
35
|
+
createSingleSelectionContext(untrack(() => multiple));
|
|
35
36
|
|
|
36
37
|
const base = $derived(accordion({ flush, class: clsx(theme, className) }));
|
|
37
38
|
</script>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { getAccordionContext } from "../context";
|
|
7
7
|
import { slide } from "svelte/transition";
|
|
8
8
|
import { accordionItem } from "./theme";
|
|
9
|
+
import { untrack } from "svelte";
|
|
9
10
|
|
|
10
11
|
let {
|
|
11
12
|
children,
|
|
@@ -23,15 +24,14 @@
|
|
|
23
24
|
contentClass
|
|
24
25
|
}: AccordionItemProps = $props();
|
|
25
26
|
|
|
26
|
-
// svelte-ignore state_referenced_locally
|
|
27
27
|
warnThemeDeprecation(
|
|
28
28
|
"AccordionItem",
|
|
29
|
-
{
|
|
29
|
+
untrack(() => ({
|
|
30
30
|
headerClass,
|
|
31
31
|
contentClass,
|
|
32
32
|
activeClass,
|
|
33
33
|
inactiveClass
|
|
34
|
-
},
|
|
34
|
+
})),
|
|
35
35
|
{
|
|
36
36
|
headerClass: "button",
|
|
37
37
|
contentClass: "content",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
const useTransition = $derived(transitionType === "none" ? false : ctxTransitionType === "none" ? false : true);
|
|
51
51
|
|
|
52
52
|
// Theme context
|
|
53
|
-
const theme = getTheme("accordionItem");
|
|
53
|
+
const theme = $derived(getTheme("accordionItem"));
|
|
54
54
|
|
|
55
55
|
// single selection
|
|
56
56
|
const self = Symbol("accordion-item");
|
package/dist/alert/Alert.svelte
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
let { children, indicator, src, href, target, cornerStyle = "circular", border = false, stacked = false, dot, class: className, alt, size = "md", onclick, ...restProps }: AvatarProps = $props();
|
|
9
9
|
|
|
10
10
|
// Theme context
|
|
11
|
-
const theme = getTheme("avatar");
|
|
11
|
+
const theme = $derived(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
|
|
package/dist/badge/Badge.svelte
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { fade } from "svelte/transition";
|
|
7
7
|
import { badge } from "./theme";
|
|
8
8
|
import { createDismissableContext } from "../utils/dismissable";
|
|
9
|
+
import { untrack } from "svelte";
|
|
9
10
|
|
|
10
11
|
let {
|
|
11
12
|
children,
|
|
@@ -26,13 +27,16 @@
|
|
|
26
27
|
...restProps
|
|
27
28
|
}: BadgeProps = $props();
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
warnThemeDeprecation(
|
|
31
|
+
"Badge",
|
|
32
|
+
untrack(() => ({ aClass })),
|
|
33
|
+
{ aClass: "linkClass" }
|
|
34
|
+
);
|
|
31
35
|
|
|
32
36
|
const styling = $derived(classes ?? { linkClass: aClass });
|
|
33
37
|
|
|
34
38
|
// Theme context
|
|
35
|
-
const theme = getTheme("badge");
|
|
39
|
+
const theme = $derived(getTheme("badge"));
|
|
36
40
|
|
|
37
41
|
const { base, linkClass } = $derived(badge({ color, size: large ? "large" : "small", rounded, border }));
|
|
38
42
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import CloseButton from "../utils/CloseButton.svelte";
|
|
7
7
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
8
8
|
import { createDismissableContext } from "../utils/dismissable";
|
|
9
|
+
import { untrack } from "svelte";
|
|
9
10
|
|
|
10
11
|
let {
|
|
11
12
|
children,
|
|
@@ -24,13 +25,16 @@
|
|
|
24
25
|
...restProps
|
|
25
26
|
}: BannerProps = $props();
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
warnThemeDeprecation(
|
|
29
|
+
"Banner",
|
|
30
|
+
untrack(() => ({ innerClass, closeClass })),
|
|
31
|
+
{ innerClass: "insideDiv", closeClass: "dismissable" }
|
|
32
|
+
);
|
|
29
33
|
|
|
30
34
|
const styling = $derived(classes ?? { insideDiv: innerClass, dismissable: closeClass });
|
|
31
35
|
|
|
32
36
|
// Theme context
|
|
33
|
-
const theme = getTheme("banner");
|
|
37
|
+
const theme = $derived(getTheme("banner"));
|
|
34
38
|
|
|
35
39
|
const { base, insideDiv, dismissable: dismissableClass } = $derived(banner({ type, color }));
|
|
36
40
|
|
|
@@ -5,16 +5,20 @@
|
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { setBottomNavContext } from "../context";
|
|
7
7
|
import { bottomNav } from "./theme";
|
|
8
|
+
import { untrack } from "svelte";
|
|
8
9
|
|
|
9
10
|
let { children, header, position = "fixed", navType = "default", class: className, classes, outerClass, innerClass, activeClass, activeUrl = "", ...restProps }: BottomNavProps = $props();
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
warnThemeDeprecation(
|
|
13
|
+
"BottomNav",
|
|
14
|
+
untrack(() => ({ innerClass, outerClass })),
|
|
15
|
+
{ innerClass: "inner", outerClass: "class" }
|
|
16
|
+
);
|
|
13
17
|
|
|
14
18
|
const styling = $derived(classes ?? { inner: innerClass });
|
|
15
19
|
|
|
16
20
|
// Theme context
|
|
17
|
-
const theme = getTheme("bottomNav");
|
|
21
|
+
const theme = $derived(getTheme("bottomNav"));
|
|
18
22
|
|
|
19
23
|
const activeCls = $derived(cn("text-primary-700 dark:text-primary-700 hover:text-primary-900 dark:hover:text-primary-900", activeClass));
|
|
20
24
|
|
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import type { BottomNavHeaderProps } from "..";
|
|
5
5
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, outerClass, innerClass, ...restProps }: BottomNavHeaderProps = $props();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
warnThemeDeprecation(
|
|
11
|
+
"BottomNavHeader",
|
|
12
|
+
untrack(() => ({ innerClass, outerClass })),
|
|
13
|
+
{ innerClass: "inner", outerClass: "class" }
|
|
14
|
+
);
|
|
11
15
|
|
|
12
16
|
const styling = $derived(classes ?? { innerDiv: innerClass });
|
|
13
17
|
|
|
14
18
|
// Theme context
|
|
15
|
-
const theme = getTheme("bottomNavHeader");
|
|
19
|
+
const theme = $derived(getTheme("bottomNavHeader"));
|
|
16
20
|
|
|
17
21
|
const { innerDiv, base } = $derived(bottomNavHeader());
|
|
18
22
|
</script>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
let { itemName, active, class: className, ...restProps }: BottomNavHeaderItemProps = $props();
|
|
8
8
|
|
|
9
9
|
// Theme context
|
|
10
|
-
const theme = getTheme("bottomNavHeaderItem");
|
|
10
|
+
const theme = $derived(getTheme("bottomNavHeaderItem"));
|
|
11
11
|
|
|
12
12
|
let base = $derived(bottomNavHeaderItem({ active, class: clsx(theme, className) }));
|
|
13
13
|
</script>
|
|
@@ -5,16 +5,20 @@
|
|
|
5
5
|
import { getBottomNavContext } from "../context";
|
|
6
6
|
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
7
7
|
import { bottomNavItem } from "./theme";
|
|
8
|
+
import { untrack } from "svelte";
|
|
8
9
|
|
|
9
10
|
let { children, btnName, appBtnPosition = "middle", activeClass, class: className, classes, btnClass, spanClass, active: manualActive, ...restProps }: BottomNavItemProps = $props();
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
warnThemeDeprecation(
|
|
13
|
+
"BottomNavItem",
|
|
14
|
+
untrack(() => ({ spanClass, btnClass })),
|
|
15
|
+
{ spanClass: "span", btnClass: "class" }
|
|
16
|
+
);
|
|
13
17
|
|
|
14
18
|
const styling = $derived(classes ?? { span: spanClass });
|
|
15
19
|
|
|
16
20
|
// Theme context
|
|
17
|
-
const theme = getTheme("bottomNavItem");
|
|
21
|
+
const theme = $derived(getTheme("bottomNavItem"));
|
|
18
22
|
|
|
19
23
|
const context = getBottomNavContext();
|
|
20
24
|
|
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import type { BreadcrumbProps } from "..";
|
|
5
5
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, solid = false, class: className, classes, olClass, ariaLabel = "Breadcrumb", ...restProps }: BreadcrumbProps = $props();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
warnThemeDeprecation(
|
|
11
|
+
"Breadcrumb",
|
|
12
|
+
untrack(() => ({ olClass })),
|
|
13
|
+
{ olClass: "list" }
|
|
14
|
+
);
|
|
11
15
|
|
|
12
16
|
const styling = $derived(classes ?? { list: olClass });
|
|
13
17
|
|
|
14
|
-
const theme = getTheme("breadcrumb");
|
|
18
|
+
const theme = $derived(getTheme("breadcrumb"));
|
|
15
19
|
|
|
16
20
|
const { base, list } = $derived(breadcrumb({ solid }));
|
|
17
21
|
let classNav = $derived(base({ class: clsx(theme?.base, className) }));
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
let { children, size = "md", disabled, class: className, ...restProps }: ButtonGroupProps = $props();
|
|
9
9
|
|
|
10
|
-
const theme = getTheme("buttonGroup");
|
|
10
|
+
const theme = $derived(getTheme("buttonGroup"));
|
|
11
11
|
|
|
12
12
|
let groupClass = $derived(buttonGroup({ size, class: clsx(theme, className) }));
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
...restProps
|
|
26
26
|
}: ButtonProps = $props();
|
|
27
27
|
|
|
28
|
-
const theme = getTheme("button");
|
|
28
|
+
const theme = $derived(getTheme("button"));
|
|
29
29
|
|
|
30
30
|
let actualSize = $derived(group ? "sm" : size);
|
|
31
31
|
let actualColor = $derived(color ?? (group ? (outline ? "dark" : "alternative") : "primary"));
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
let { children, outline, pill, color = "blue", shadow, class: className, href, disabled, size, btnClass, ...restProps }: GradientButtonProps = $props();
|
|
12
12
|
|
|
13
|
-
const theme = getTheme("gradientButton");
|
|
13
|
+
const theme = $derived(getTheme("gradientButton"));
|
|
14
14
|
|
|
15
15
|
const { base, outlineWrapper } = $derived(gradientButton({ color, outline, pill, shadow, disabled, size, group: !!group }));
|
|
16
16
|
</script>
|
package/dist/card/Card.svelte
CHANGED
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { card } from "./theme";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, color = "gray", horizontal = false, shadow = "md", reverse = false, img, size = "sm", class: className, classes, imgClass, ...restProps }: CardProps = $props();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
warnThemeDeprecation(
|
|
11
|
+
"Card",
|
|
12
|
+
untrack(() => ({ imgClass })),
|
|
13
|
+
{ imgClass: "image" }
|
|
14
|
+
);
|
|
11
15
|
|
|
12
16
|
const styling = $derived(classes ?? { image: imgClass });
|
|
13
17
|
|
|
14
|
-
const theme = getTheme("card");
|
|
18
|
+
const theme = $derived(getTheme("card"));
|
|
15
19
|
|
|
16
20
|
const { base, image } = $derived(
|
|
17
21
|
card({
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { setCarouselContext } from "../context";
|
|
8
8
|
import { canChangeSlide } from "./CarouselSlide";
|
|
9
9
|
import { carousel } from "./theme";
|
|
10
|
+
import { untrack } from "svelte";
|
|
10
11
|
|
|
11
12
|
const SLIDE_DURATION_RATIO = 0.25;
|
|
12
13
|
|
|
@@ -29,13 +30,16 @@
|
|
|
29
30
|
...restProps
|
|
30
31
|
}: CarouselProps = $props();
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
warnThemeDeprecation(
|
|
34
|
+
"Carousel",
|
|
35
|
+
untrack(() => ({ imgClass })),
|
|
36
|
+
{ imgClass: "slide" }
|
|
37
|
+
);
|
|
34
38
|
|
|
35
39
|
const styling = $derived(classes ?? { slide: imgClass });
|
|
36
40
|
|
|
37
41
|
// Theme context
|
|
38
|
-
const theme = getTheme("carousel");
|
|
42
|
+
const theme = $derived(getTheme("carousel"));
|
|
39
43
|
|
|
40
44
|
let { base, slide: slideCls } = $derived(carousel());
|
|
41
45
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
let { children, activeClass, inactiveClass, position = "bottom", class: className, ...restProps }: IndicatorsProps = $props();
|
|
10
10
|
|
|
11
|
-
const theme = getTheme("carouselIndicators");
|
|
11
|
+
const theme = $derived(getTheme("carouselIndicators"));
|
|
12
12
|
|
|
13
13
|
const _state = getCarouselContext();
|
|
14
14
|
const { base, indicator } = $derived(carouselIndicators({ position }));
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
const { base, span } = $derived(controlButton({ forward }));
|
|
10
10
|
|
|
11
|
-
const theme = getTheme("controlButton");
|
|
11
|
+
const theme = $derived(getTheme("controlButton"));
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<button type="button" class={base({ class: clsx(className, theme) })} {...restProps}>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
let { image, transition, fit, class: className, ...restProps }: SlideProps = $props();
|
|
12
12
|
|
|
13
|
-
const theme = getTheme("slide");
|
|
13
|
+
const theme = $derived(getTheme("slide"));
|
|
14
14
|
|
|
15
15
|
let transitionSlideIn = $derived({
|
|
16
16
|
x: _state?.forward ? "100%" : "-100%",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
let { selected, class: className, ...restProps }: ThumbnailProps = $props();
|
|
8
8
|
|
|
9
|
-
const theme = getTheme("thumbnail");
|
|
9
|
+
const theme = $derived(getTheme("thumbnail"));
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<img {...restProps} class={thumbnail({ selected, class: clsx(theme, className) })} />
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
let { children, images = [], index = $bindable(), ariaLabel = "Click to view image", imgClass, throttleDelay = 650, class: className }: ThumbnailsProps = $props();
|
|
9
9
|
|
|
10
|
-
const theme = getTheme("thumbnails");
|
|
10
|
+
const theme = $derived(getTheme("thumbnails"));
|
|
11
11
|
|
|
12
12
|
// Initialize so the first click is never throttled
|
|
13
13
|
let lastClickedAt = -Infinity;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
let { children, embedded = false, value = $bindable(""), success = $bindable(false), onclick, class: className = "", ...restProps }: ClipboardProps = $props();
|
|
10
10
|
|
|
11
|
-
const theme = getTheme("clipboard");
|
|
11
|
+
const theme = $derived(getTheme("clipboard"));
|
|
12
12
|
|
|
13
13
|
const copyToClipboard: MouseEventHandler<HTMLButtonElement> = async (ev) => {
|
|
14
14
|
onclick?.(ev);
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
...restProps
|
|
22
22
|
}: CommandPaletteProps = $props();
|
|
23
23
|
|
|
24
|
-
const theme = getTheme("commandPalette");
|
|
24
|
+
const theme = $derived(getTheme("commandPalette"));
|
|
25
25
|
|
|
26
26
|
let search = $state("");
|
|
27
27
|
let selectedIndex = $state(0);
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
@component
|
|
195
195
|
[Go to docs](https://flowbite-svelte.com/)
|
|
196
196
|
## Type
|
|
197
|
-
[CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
197
|
+
[CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2313)
|
|
198
198
|
## Props
|
|
199
199
|
@prop open = $bindable(false)
|
|
200
200
|
@prop items = []
|
|
@@ -2,7 +2,7 @@ import type { CommandPaletteProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [CommandPaletteProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2313)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop open = $bindable(false)
|
|
8
8
|
* @prop items = []
|
package/dist/context.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ declare const getListContext: () => ListContextType | undefined, setListContext:
|
|
|
19
19
|
export { getListContext, setListContext };
|
|
20
20
|
declare const getToolbarContext: () => ToolbarContextType | undefined, setToolbarContext: (context: ToolbarContextType) => ToolbarContextType;
|
|
21
21
|
export { getToolbarContext, setToolbarContext };
|
|
22
|
-
|
|
22
|
+
type ThemeContextValue = ThemeConfig | {
|
|
23
|
+
value?: ThemeConfig;
|
|
24
|
+
};
|
|
25
|
+
declare const getThemeContext: () => ThemeContextValue | undefined, setThemeContext: (context: ThemeContextValue) => ThemeContextValue;
|
|
23
26
|
export { getThemeContext, setThemeContext };
|
|
24
27
|
declare const getListGroupContext: () => ListGroupContextType | undefined, setListGroupContext: (context: ListGroupContextType) => ListGroupContextType;
|
|
25
28
|
export { getListGroupContext, setListGroupContext };
|
package/dist/context.js
CHANGED
|
@@ -42,7 +42,6 @@ export { getListContext, setListContext };
|
|
|
42
42
|
// Toolbar
|
|
43
43
|
const [getToolbarContext, setToolbarContext] = createSafeContext();
|
|
44
44
|
export { getToolbarContext, setToolbarContext };
|
|
45
|
-
// Theme
|
|
46
45
|
const [getThemeContext, setThemeContext] = createSafeContext();
|
|
47
46
|
export { getThemeContext, setThemeContext };
|
|
48
47
|
// ListGroup
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// const THEME_PREFERENCE_KEY = 'color-theme';
|
|
8
8
|
let { class: className, lightIcon, darkIcon, size = "md", ariaLabel = "Dark mode", ...restProps }: DarkmodeProps = $props();
|
|
9
9
|
|
|
10
|
-
const theme = getTheme("darkmode");
|
|
10
|
+
const theme = $derived(getTheme("darkmode"));
|
|
11
11
|
|
|
12
12
|
const sizes = {
|
|
13
13
|
sm: "w-4 h-4",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
inputProps = {}
|
|
46
46
|
}: DatepickerProps = $props();
|
|
47
47
|
|
|
48
|
-
const theme = getTheme("datepicker");
|
|
48
|
+
const theme = $derived(getTheme("datepicker"));
|
|
49
49
|
|
|
50
50
|
// If translationLocale is not explicitly provided, it will default to the value of locale. This ensures reactivity as both are directly exposed as props.
|
|
51
51
|
const finalTranslationLocale = $derived(translationLocale ?? locale);
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { android } from "./theme";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, div5Class, div6Class, div7Class, ...restProps }: AndroidProps = $props();
|
|
8
9
|
|
|
9
|
-
// svelte-ignore state_referenced_locally
|
|
10
10
|
warnThemeDeprecation(
|
|
11
11
|
"Android",
|
|
12
|
-
{ divClass, div2Class, div3Class, div4Class, div5Class, div6Class, div7Class },
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class, div5Class, div6Class, div7Class })),
|
|
13
13
|
{ divClass: "class", div2Class: "top", div3Class: "leftTop", div4Class: "leftMid", div5Class: "leftBot", div6Class: "right", div7Class: "slot" }
|
|
14
14
|
);
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { defaultMockup } from "./theme";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, div5Class, div6Class, ...restProps }: DefaultMockupProps = $props();
|
|
8
9
|
|
|
9
|
-
// svelte-ignore state_referenced_locally
|
|
10
10
|
warnThemeDeprecation(
|
|
11
11
|
"DefaultMockup",
|
|
12
|
-
{ divClass, div2Class, div3Class, div4Class, div5Class, div6Class },
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class, div5Class, div6Class })),
|
|
13
13
|
{ divClass: "class", div2Class: "top", div3Class: "leftTop", div4Class: "leftBot", div5Class: "right", div6Class: "slot" }
|
|
14
14
|
);
|
|
15
15
|
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { desktop } from "./theme";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, ...restProps }: DesktopProps = $props();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
warnThemeDeprecation(
|
|
11
|
+
"Desktop",
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class })),
|
|
13
|
+
{ divClass: "class", div2Class: "inner", div3Class: "bot", div4Class: "botUnder" }
|
|
14
|
+
);
|
|
11
15
|
|
|
12
16
|
const styling = $derived(
|
|
13
17
|
classes ?? {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import type { IosProps } from "..";
|
|
4
4
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, div5Class, div6Class, ...restProps }: IosProps = $props();
|
|
8
9
|
|
|
9
|
-
// svelte-ignore state_referenced_locally
|
|
10
10
|
warnThemeDeprecation(
|
|
11
11
|
"Ios",
|
|
12
|
-
{ divClass, div2Class, div3Class, div4Class, div5Class, div6Class },
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class, div5Class, div6Class })),
|
|
13
13
|
{ divClass: "class", div2Class: "top", div3Class: "lefttop", div4Class: "leftBot", div5Class: "right", div6Class: "slot" }
|
|
14
14
|
);
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { laptop } from "./theme";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, ...restProps }: LaptopProps = $props();
|
|
8
9
|
|
|
9
|
-
// svelte-ignore state_referenced_locally
|
|
10
10
|
warnThemeDeprecation(
|
|
11
11
|
"Laptop",
|
|
12
|
-
{ divClass, div2Class, div3Class, div4Class },
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class })),
|
|
13
13
|
{ divClass: "class", div2Class: "top", div3Class: "lefttop", div4Class: "leftBot", div5Class: "right", div6Class: "slot" }
|
|
14
14
|
);
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { smartwatch } from "./theme";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, div5Class, div6Class, ...restProps }: SmartwatchProps = $props();
|
|
8
9
|
|
|
9
|
-
// svelte-ignore state_referenced_locally
|
|
10
10
|
warnThemeDeprecation(
|
|
11
11
|
"Smartwatch",
|
|
12
|
-
{ divClass, div2Class, div3Class, div4Class, div5Class, div6Class },
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class, div5Class, div6Class })),
|
|
13
13
|
{ divClass: "class", div2Class: "top", div3Class: "rightTop", div4Class: "rightBot", div5Class: "bot", div6Class: "slot" }
|
|
14
14
|
);
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import type { TabletProps } from "..";
|
|
4
4
|
import { warnThemeDeprecation } from "../theme/themeUtils";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
+
import { untrack } from "svelte";
|
|
6
7
|
|
|
7
8
|
let { children, class: className, classes, divClass, div2Class, div3Class, div4Class, div5Class, div6Class, ...restProps }: TabletProps = $props();
|
|
8
9
|
|
|
9
|
-
// svelte-ignore state_referenced_locally
|
|
10
10
|
warnThemeDeprecation(
|
|
11
11
|
"Tablet",
|
|
12
|
-
{ divClass, div2Class, div3Class, div4Class, div5Class, div6Class },
|
|
12
|
+
untrack(() => ({ divClass, div2Class, div3Class, div4Class, div5Class, div6Class })),
|
|
13
13
|
{ divClass: "class", div2Class: "leftTop", div3Class: "leftMid", div4Class: "leftBot", div5Class: "right", div6Class: "slot" }
|
|
14
14
|
);
|
|
15
15
|
|