flowbite-svelte 2.0.0-next.0 → 2.0.0-next.2
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/theme.js +1 -1
- package/dist/command-palette/CommandPalette.svelte +1 -1
- package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
- package/dist/context.d.ts +3 -1
- package/dist/context.js +3 -0
- package/dist/datepicker/Datepicker.svelte +6 -2
- package/dist/datepicker/theme.js +5 -5
- package/dist/footer/theme.js +1 -1
- package/dist/forms/floating-label/FloatingLabelInput.svelte +6 -3
- package/dist/forms/input-addon/InputAddon.svelte +1 -1
- package/dist/forms/input-addon/InputAddon.svelte.d.ts +1 -1
- package/dist/forms/input-field/Input.svelte +14 -33
- package/dist/forms/label/Label.svelte +1 -1
- package/dist/forms/label/Label.svelte.d.ts +1 -1
- package/dist/forms/radio/Radio.svelte +4 -15
- package/dist/forms/range/Range.svelte +1 -1
- package/dist/forms/range/Range.svelte.d.ts +1 -1
- package/dist/forms/search/Search.svelte +8 -21
- package/dist/forms/search/Search.svelte.d.ts +1 -4
- package/dist/forms/select/MultiSelect.svelte +4 -11
- package/dist/forms/select/Select.svelte +4 -14
- package/dist/forms/tags/Tags.svelte +13 -32
- package/dist/forms/tags/Tags.svelte.d.ts +2 -4
- package/dist/forms/textarea/Textarea.svelte +12 -46
- package/dist/forms/textarea/Textarea.svelte.d.ts +1 -9
- package/dist/forms/timepicker/Timepicker.svelte +4 -4
- package/dist/forms/timepicker/Timepicker.svelte.d.ts +1 -1
- package/dist/forms/toggle/Toggle.svelte +6 -15
- package/dist/forms/toggle/Toggle.svelte.d.ts +1 -3
- package/dist/gallery/Gallery.svelte +5 -13
- package/dist/gallery/Gallery.svelte.d.ts +1 -2
- package/dist/gallery/theme.js +1 -1
- package/dist/indicator/Indicator.svelte +1 -1
- 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 +1 -1
- package/dist/kbd/Kbd.svelte.d.ts +1 -1
- package/dist/list-group/Listgroup.svelte +20 -8
- package/dist/list-group/Listgroup.svelte.d.ts +2 -3
- package/dist/list-group/ListgroupItem.svelte +14 -10
- package/dist/list-group/ListgroupItem.svelte.d.ts +4 -2
- package/dist/list-group/theme.d.ts +87 -29
- package/dist/list-group/theme.js +17 -18
- package/dist/mega-menu/MegaMenu.svelte +7 -16
- package/dist/mega-menu/MegaMenu.svelte.d.ts +1 -3
- package/dist/modal/Modal.svelte +7 -22
- package/dist/modal/Modal.svelte.d.ts +1 -5
- package/dist/modal/theme.d.ts +1 -0
- package/dist/modal/theme.js +2 -1
- package/dist/navbar/Menu.svelte +3 -4
- package/dist/navbar/Menu.svelte.d.ts +1 -2
- 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 +10 -16
- package/dist/navbar/NavHamburger.svelte.d.ts +1 -3
- package/dist/navbar/NavLi.svelte +8 -4
- package/dist/navbar/NavLi.svelte.d.ts +1 -1
- package/dist/navbar/NavUl.svelte +14 -31
- package/dist/navbar/NavUl.svelte.d.ts +1 -4
- package/dist/navbar/Navbar.svelte +9 -5
- package/dist/navbar/Navbar.svelte.d.ts +2 -2
- package/dist/navbar/index.d.ts +1 -0
- package/dist/navbar/index.js +1 -0
- package/dist/navbar/theme.d.ts +32 -1
- package/dist/navbar/theme.js +4 -1
- package/dist/pagination/Pagination.svelte +1 -1
- package/dist/pagination/Pagination.svelte.d.ts +1 -1
- package/dist/pagination/PaginationButton.svelte +1 -1
- package/dist/pagination/PaginationButton.svelte.d.ts +1 -1
- package/dist/pagination/PaginationItem.svelte +1 -1
- package/dist/pagination/PaginationItem.svelte.d.ts +1 -1
- package/dist/pagination/PaginationNav.svelte +10 -25
- package/dist/pagination/PaginationNav.svelte.d.ts +1 -5
- package/dist/popover/Popover.svelte +6 -15
- package/dist/popover/Popover.svelte.d.ts +1 -2
- package/dist/progress/Progressbar.svelte +1 -1
- package/dist/progress/Progressbar.svelte.d.ts +1 -1
- package/dist/progress/Progressradial.svelte +1 -1
- package/dist/progress/Progressradial.svelte.d.ts +1 -1
- package/dist/rating/AdvancedRating.svelte +8 -27
- package/dist/rating/AdvancedRating.svelte.d.ts +1 -6
- package/dist/rating/CustomIcon.svelte +4 -4
- package/dist/rating/CustomIcon.svelte.d.ts +2 -2
- package/dist/rating/Heart.svelte +4 -4
- package/dist/rating/Heart.svelte.d.ts +2 -2
- package/dist/rating/Rating.svelte +5 -13
- package/dist/rating/Rating.svelte.d.ts +1 -2
- package/dist/rating/RatingComment.svelte +1 -1
- package/dist/rating/RatingComment.svelte.d.ts +1 -1
- package/dist/rating/Review.svelte +13 -37
- package/dist/rating/Review.svelte.d.ts +1 -8
- package/dist/rating/ScoreRating.svelte +9 -8
- package/dist/rating/ScoreRating.svelte.d.ts +1 -1
- package/dist/rating/Star.svelte +4 -4
- package/dist/rating/Star.svelte.d.ts +2 -2
- package/dist/rating/Thumbup.svelte +4 -4
- package/dist/rating/Thumbup.svelte.d.ts +2 -2
- package/dist/scroll-spy/ScrollSpy.svelte +1 -1
- package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
- package/dist/sidebar/Sidebar.svelte +9 -31
- package/dist/sidebar/Sidebar.svelte.d.ts +1 -5
- package/dist/sidebar/SidebarBrand.svelte +6 -20
- package/dist/sidebar/SidebarBrand.svelte.d.ts +1 -3
- package/dist/sidebar/SidebarButton.svelte +3 -2
- package/dist/sidebar/SidebarButton.svelte.d.ts +1 -1
- package/dist/sidebar/SidebarCta.svelte +6 -20
- package/dist/sidebar/SidebarCta.svelte.d.ts +1 -3
- package/dist/sidebar/SidebarDropdownWrapper.svelte +9 -44
- package/dist/sidebar/SidebarDropdownWrapper.svelte.d.ts +1 -5
- package/dist/sidebar/SidebarGroup.svelte +3 -4
- package/dist/sidebar/SidebarGroup.svelte.d.ts +1 -2
- package/dist/sidebar/SidebarItem.svelte +12 -10
- package/dist/sidebar/SidebarItem.svelte.d.ts +2 -5
- package/dist/sidebar/index.d.ts +1 -1
- package/dist/sidebar/index.js +1 -1
- package/dist/sidebar/theme.d.ts +41 -0
- package/dist/sidebar/theme.js +23 -3
- package/dist/skeleton/CardPlaceholder.svelte +1 -1
- package/dist/skeleton/CardPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte +1 -1
- package/dist/skeleton/ImagePlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/ListPlaceholder.svelte +1 -1
- package/dist/skeleton/ListPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/Skeleton.svelte +1 -1
- package/dist/skeleton/Skeleton.svelte.d.ts +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte +1 -1
- package/dist/skeleton/TestimonialPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/TextPlaceholder.svelte +1 -1
- package/dist/skeleton/TextPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte +1 -1
- package/dist/skeleton/VideoPlaceholder.svelte.d.ts +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte +1 -1
- package/dist/skeleton/WidgetPlaceholder.svelte.d.ts +1 -1
- package/dist/speed-dial/SpeedDial.svelte +7 -19
- package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -2
- package/dist/speed-dial/SpeedDialButton.svelte +12 -24
- package/dist/speed-dial/SpeedDialButton.svelte.d.ts +3 -4
- 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 +1 -1
- package/dist/split-pane/Pane.svelte.d.ts +1 -1
- package/dist/split-pane/SplitPane.svelte +1 -1
- package/dist/split-pane/SplitPane.svelte.d.ts +1 -1
- package/dist/step-indicator/StepIndicator.svelte +1 -1
- package/dist/step-indicator/StepIndicator.svelte.d.ts +1 -1
- package/dist/stepper/BreadcrumbStepper.svelte +1 -1
- package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
- package/dist/stepper/DetailedStepper.svelte +1 -1
- package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
- package/dist/stepper/ProgressStepper.svelte +1 -1
- package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
- package/dist/stepper/Stepper.svelte +1 -1
- package/dist/stepper/Stepper.svelte.d.ts +1 -1
- package/dist/stepper/TimelineStepper.svelte +1 -1
- package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
- package/dist/stepper/VerticalStepper.svelte +1 -1
- package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
- package/dist/table/Table.svelte +6 -17
- package/dist/table/Table.svelte.d.ts +1 -2
- package/dist/table/TableBody.svelte +1 -1
- package/dist/table/TableBody.svelte.d.ts +1 -1
- package/dist/table/TableBodyCell.svelte +1 -1
- package/dist/table/TableBodyCell.svelte.d.ts +1 -1
- package/dist/table/TableBodyRow.svelte +1 -1
- package/dist/table/TableBodyRow.svelte.d.ts +1 -1
- package/dist/table/TableHead.svelte +1 -1
- package/dist/table/TableHead.svelte.d.ts +1 -1
- package/dist/table/TableHeadCell.svelte +1 -1
- package/dist/table/TableHeadCell.svelte.d.ts +1 -1
- package/dist/table/TableSearch.svelte +10 -41
- package/dist/table/TableSearch.svelte.d.ts +1 -8
- package/dist/tabs/TabItem.svelte +1 -1
- package/dist/tabs/TabItem.svelte.d.ts +1 -1
- package/dist/tabs/Tabs.svelte +8 -15
- package/dist/tabs/Tabs.svelte.d.ts +1 -3
- package/dist/theme/themeUtils.d.ts +0 -10
- package/dist/theme/themeUtils.js +0 -67
- package/dist/theme/themes.d.ts +1 -1
- package/dist/theme/themes.js +1 -1
- package/dist/timeline/Activity.svelte +1 -1
- package/dist/timeline/Activity.svelte.d.ts +1 -1
- package/dist/timeline/ActivityItem.svelte +12 -46
- package/dist/timeline/ActivityItem.svelte.d.ts +1 -9
- package/dist/timeline/Group.svelte +7 -24
- package/dist/timeline/Group.svelte.d.ts +1 -4
- package/dist/timeline/GroupItem.svelte +11 -36
- package/dist/timeline/GroupItem.svelte.d.ts +1 -6
- package/dist/timeline/Timeline.svelte +1 -1
- package/dist/timeline/Timeline.svelte.d.ts +1 -1
- package/dist/timeline/TimelineItem.svelte +13 -60
- package/dist/timeline/TimelineItem.svelte.d.ts +1 -8
- package/dist/toast/Toast.svelte +6 -25
- package/dist/toast/Toast.svelte.d.ts +1 -3
- package/dist/toast/ToastContainer.svelte +1 -1
- package/dist/toast/ToastContainer.svelte.d.ts +1 -1
- package/dist/toolbar/Toolbar.svelte +1 -1
- package/dist/toolbar/Toolbar.svelte.d.ts +1 -1
- package/dist/toolbar/ToolbarButton.svelte +5 -4
- package/dist/toolbar/ToolbarButton.svelte.d.ts +2 -1
- package/dist/toolbar/ToolbarGroup.svelte +1 -1
- package/dist/toolbar/ToolbarGroup.svelte.d.ts +1 -1
- package/dist/toolbar/theme.js +1 -1
- package/dist/tooltip/Tooltip.svelte +1 -1
- package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
- package/dist/types.d.ts +9 -144
- 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 +11 -29
- package/dist/typography/hr/Hr.svelte.d.ts +2 -3
- package/dist/typography/img/Img.svelte +6 -21
- package/dist/typography/img/Img.svelte.d.ts +1 -3
- package/dist/typography/layout/Layout.svelte +1 -1
- package/dist/typography/layout/Layout.svelte.d.ts +1 -1
- package/dist/typography/list/Li.svelte +1 -1
- package/dist/typography/list/Li.svelte.d.ts +1 -1
- package/dist/typography/list/List.svelte +1 -1
- package/dist/typography/list/List.svelte.d.ts +1 -1
- package/dist/typography/mark/Mark.svelte +1 -1
- package/dist/typography/mark/Mark.svelte.d.ts +1 -1
- package/dist/typography/paragraph/P.svelte +1 -1
- package/dist/typography/paragraph/P.svelte.d.ts +1 -1
- package/dist/typography/secondary/Secondary.svelte +1 -1
- package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
- package/dist/typography/span/Span.svelte +1 -1
- package/dist/typography/span/Span.svelte.d.ts +1 -1
- package/dist/utils/Arrow.svelte +1 -1
- package/dist/utils/Arrow.svelte.d.ts +1 -1
- package/dist/utils/Popper.svelte +33 -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/package.json +9 -7
package/dist/navbar/NavUl.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getTheme
|
|
2
|
+
import { getTheme } from "../theme/themeUtils";
|
|
3
3
|
import type { NavUlProps } from "../types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { sineIn } from "svelte/easing";
|
|
@@ -7,33 +7,15 @@
|
|
|
7
7
|
import { fade, fly, scale, slide } from "svelte/transition";
|
|
8
8
|
import { navbarUl } from "./theme";
|
|
9
9
|
import { getNavbarStateContext, getNavbarBreakpointContext } from "../context";
|
|
10
|
-
import { untrack } from "svelte";
|
|
11
10
|
|
|
12
11
|
let navState = getNavbarStateContext();
|
|
13
|
-
let navBreakpoint = getNavbarBreakpointContext();
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
activeUrl = $bindable(),
|
|
18
|
-
ulClass,
|
|
19
|
-
slideParams,
|
|
20
|
-
transition = slide,
|
|
21
|
-
transitionParams,
|
|
22
|
-
activeClass,
|
|
23
|
-
nonActiveClass,
|
|
24
|
-
respectMotionPreference = true,
|
|
25
|
-
class: className,
|
|
26
|
-
classes,
|
|
27
|
-
...restProps
|
|
28
|
-
}: NavUlProps = $props();
|
|
13
|
+
// Reactively get the breakpoint - use $derived to ensure it updates
|
|
14
|
+
let navBreakpoint = $derived(getNavbarBreakpointContext());
|
|
29
15
|
|
|
30
|
-
|
|
31
|
-
"NavUl",
|
|
32
|
-
untrack(() => ({ ulClass, activeClass, nonActiveClass })),
|
|
33
|
-
{ ulClass: "ul", activeClass: "active", nonActiveClass: "nonActive" }
|
|
34
|
-
);
|
|
16
|
+
let { children, activeUrl = $bindable(), slideParams, transition = slide, transitionParams, respectMotionPreference = true, class: className, classes, ...restProps }: NavUlProps = $props();
|
|
35
17
|
|
|
36
|
-
const styling = $derived(classes
|
|
18
|
+
const styling = $derived(classes);
|
|
37
19
|
|
|
38
20
|
const theme = $derived(getTheme("navbarUl"));
|
|
39
21
|
|
|
@@ -58,19 +40,23 @@
|
|
|
58
40
|
return finalParams;
|
|
59
41
|
});
|
|
60
42
|
|
|
61
|
-
|
|
43
|
+
// Use $derived.by for proper reactivity tracking across component boundaries
|
|
44
|
+
let hidden: boolean = $derived.by(() => {
|
|
45
|
+
if (!navState) return true;
|
|
46
|
+
return navState.hidden;
|
|
47
|
+
});
|
|
62
48
|
|
|
63
49
|
let { base, ul, active, nonActive } = $derived(navbarUl({ hidden, breakpoint: navBreakpoint ?? "md" }));
|
|
64
50
|
|
|
65
51
|
$effect(() => {
|
|
66
52
|
if (!navState) return;
|
|
67
|
-
navState.activeClass = active({ class: clsx(theme?.active, styling
|
|
68
|
-
navState.nonActiveClass = nonActive({ class: clsx(theme?.nonActive, styling
|
|
53
|
+
navState.activeClass = active({ class: clsx(theme?.active, styling?.active) });
|
|
54
|
+
navState.nonActiveClass = nonActive({ class: clsx(theme?.nonActive, styling?.nonActive) });
|
|
69
55
|
navState.activeUrl = activeUrl;
|
|
70
56
|
});
|
|
71
57
|
|
|
72
58
|
let divCls: string = $derived(base({ class: clsx(theme?.base, className) }));
|
|
73
|
-
let ulCls: string = $derived(ul({ class: clsx(theme?.ul, styling
|
|
59
|
+
let ulCls: string = $derived(ul({ class: clsx(theme?.ul, styling?.ul) }));
|
|
74
60
|
</script>
|
|
75
61
|
|
|
76
62
|
{#if !hidden}
|
|
@@ -91,16 +77,13 @@
|
|
|
91
77
|
@component
|
|
92
78
|
[Go to docs](https://flowbite-svelte.com/)
|
|
93
79
|
## Type
|
|
94
|
-
[NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
80
|
+
[NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1097)
|
|
95
81
|
## Props
|
|
96
82
|
@prop children
|
|
97
83
|
@prop activeUrl = $bindable()
|
|
98
|
-
@prop ulClass
|
|
99
84
|
@prop slideParams
|
|
100
85
|
@prop transition = slide
|
|
101
86
|
@prop transitionParams
|
|
102
|
-
@prop activeClass
|
|
103
|
-
@prop nonActiveClass
|
|
104
87
|
@prop respectMotionPreference = true
|
|
105
88
|
@prop class: className
|
|
106
89
|
@prop classes
|
|
@@ -2,16 +2,13 @@ import type { NavUlProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1097)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop activeUrl = $bindable()
|
|
9
|
-
* @prop ulClass
|
|
10
9
|
* @prop slideParams
|
|
11
10
|
* @prop transition = slide
|
|
12
11
|
* @prop transitionParams
|
|
13
|
-
* @prop activeClass
|
|
14
|
-
* @prop nonActiveClass
|
|
15
12
|
* @prop respectMotionPreference = true
|
|
16
13
|
* @prop class: className
|
|
17
14
|
* @prop classes
|
|
@@ -6,13 +6,17 @@
|
|
|
6
6
|
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
import { setNavbarStateContext, setNavbarBreakpointContext } from "../context";
|
|
8
8
|
|
|
9
|
-
let { children, fluid,
|
|
9
|
+
let { children, fluid, class: className, classes, closeOnClickOutside = true, breakpoint = "md", ...restProps }: NavbarProps = $props();
|
|
10
10
|
|
|
11
|
+
const styling = $derived(classes);
|
|
11
12
|
const theme = $derived(getTheme("navbar"));
|
|
12
13
|
|
|
14
|
+
let { base, container: navContainerClass } = $derived(navbar());
|
|
15
|
+
|
|
13
16
|
let navState = $state<NavbarState>({ hidden: true });
|
|
14
17
|
setNavbarStateContext(navState);
|
|
15
18
|
|
|
19
|
+
// Update context when breakpoint prop changes
|
|
16
20
|
$effect(() => {
|
|
17
21
|
setNavbarBreakpointContext(breakpoint);
|
|
18
22
|
});
|
|
@@ -36,8 +40,8 @@
|
|
|
36
40
|
<svelte:document onclick={handleDocumentClick} />
|
|
37
41
|
|
|
38
42
|
<nav bind:this={navbarElement}>
|
|
39
|
-
<div {...restProps} class={
|
|
40
|
-
<NavContainer {fluid} class={clsx(
|
|
43
|
+
<div {...restProps} class={base({ class: clsx(theme?.base, className) })}>
|
|
44
|
+
<NavContainer {fluid} class={navContainerClass({ class: clsx(theme?.container, styling?.container) })}>
|
|
41
45
|
{@render children({ hidden: navState.hidden, toggle, NavContainer })}
|
|
42
46
|
</NavContainer>
|
|
43
47
|
</div>
|
|
@@ -47,12 +51,12 @@
|
|
|
47
51
|
@component
|
|
48
52
|
[Go to docs](https://flowbite-svelte.com/)
|
|
49
53
|
## Type
|
|
50
|
-
[NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
54
|
+
[NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1079)
|
|
51
55
|
## Props
|
|
52
56
|
@prop children
|
|
53
57
|
@prop fluid
|
|
54
|
-
@prop navContainerClass
|
|
55
58
|
@prop class: className
|
|
59
|
+
@prop classes
|
|
56
60
|
@prop closeOnClickOutside = true
|
|
57
61
|
@prop breakpoint = "md"
|
|
58
62
|
@prop ...restProps
|
|
@@ -2,12 +2,12 @@ import type { NavbarProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1079)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop fluid
|
|
9
|
-
* @prop navContainerClass
|
|
10
9
|
* @prop class: className
|
|
10
|
+
* @prop classes
|
|
11
11
|
* @prop closeOnClickOutside = true
|
|
12
12
|
* @prop breakpoint = "md"
|
|
13
13
|
* @prop ...restProps
|
package/dist/navbar/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export { default as NavLi } from "./NavLi.svelte";
|
|
|
4
4
|
export { default as NavUl } from "./NavUl.svelte";
|
|
5
5
|
export { default as NavHamburger } from "./NavHamburger.svelte";
|
|
6
6
|
export { default as NavContainer } from "./NavContainer.svelte";
|
|
7
|
+
export { default as Menu } from "./Menu.svelte";
|
|
7
8
|
export { navbar, navbarUl, navbarBrand, navbarLi, navbarHamburger, navbarContainer } from "./theme";
|
package/dist/navbar/index.js
CHANGED
|
@@ -4,4 +4,5 @@ export { default as NavLi } from "./NavLi.svelte";
|
|
|
4
4
|
export { default as NavUl } from "./NavUl.svelte";
|
|
5
5
|
export { default as NavHamburger } from "./NavHamburger.svelte";
|
|
6
6
|
export { default as NavContainer } from "./NavContainer.svelte";
|
|
7
|
+
export { default as Menu } from "./Menu.svelte";
|
|
7
8
|
export { navbar, navbarUl, navbarBrand, navbarLi, navbarHamburger, navbarContainer } from "./theme";
|
package/dist/navbar/theme.d.ts
CHANGED
|
@@ -3,7 +3,38 @@ import type { Classes } from "../theme/themeUtils";
|
|
|
3
3
|
export type NavbarBreakpoint = "sm" | "md" | "lg" | "xl";
|
|
4
4
|
export type NavbarUlVariants = VariantProps<typeof navbarUl> & Classes<typeof navbarUl>;
|
|
5
5
|
export type NavbarHamburgerVariants = VariantProps<typeof navbarHamburger> & Classes<typeof navbarHamburger>;
|
|
6
|
-
export
|
|
6
|
+
export type NavbarVariants = VariantProps<typeof navbar> & Classes<typeof navbar>;
|
|
7
|
+
export declare const navbar: import("tailwind-variants").TVReturnType<{
|
|
8
|
+
[key: string]: {
|
|
9
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
10
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
11
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
[x: string]: {
|
|
16
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
17
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
18
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | {}, {
|
|
22
|
+
base: string;
|
|
23
|
+
container: string;
|
|
24
|
+
}, undefined, {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
27
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
28
|
+
container?: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {}, {
|
|
32
|
+
base: string;
|
|
33
|
+
container: string;
|
|
34
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
35
|
+
base: string;
|
|
36
|
+
container: string;
|
|
37
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
7
38
|
export declare const navbarBrand: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "flex items-center", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "flex items-center", unknown, unknown, undefined>>;
|
|
8
39
|
export declare const navbarContainer: import("tailwind-variants").TVReturnType<{
|
|
9
40
|
fluid: {
|
package/dist/navbar/theme.js
CHANGED
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
@component
|
|
68
68
|
[Go to docs](https://flowbite-svelte.com/)
|
|
69
69
|
## Type
|
|
70
|
-
[PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
70
|
+
[PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1177)
|
|
71
71
|
## Props
|
|
72
72
|
@prop pages = []
|
|
73
73
|
@prop previous
|
|
@@ -2,7 +2,7 @@ import type { PaginationProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1177)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop pages = []
|
|
8
8
|
* @prop previous
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
@component
|
|
63
63
|
[Go to docs](https://flowbite-svelte.com/)
|
|
64
64
|
## Type
|
|
65
|
-
[PaginationButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
65
|
+
[PaginationButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1145)
|
|
66
66
|
## Props
|
|
67
67
|
@prop children
|
|
68
68
|
@prop size
|
|
@@ -2,7 +2,7 @@ import type { PaginationButtonProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PaginationButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PaginationButtonProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1145)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop size
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
@component
|
|
42
42
|
[Go to docs](https://flowbite-svelte.com/)
|
|
43
43
|
## Type
|
|
44
|
-
[PaginationItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
44
|
+
[PaginationItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1173)
|
|
45
45
|
## Props
|
|
46
46
|
@prop children
|
|
47
47
|
@prop size
|
|
@@ -2,7 +2,7 @@ import type { PaginationItemProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PaginationItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PaginationItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1173)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop size
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import { paginationNav } from "./theme";
|
|
4
4
|
import type { PaginationNavProps, PaginationContextType } from "..";
|
|
5
5
|
import PaginationButton from "./PaginationButton.svelte";
|
|
6
|
-
import { getTheme
|
|
6
|
+
import { getTheme } from "../theme/themeUtils";
|
|
7
7
|
import { setPaginationContext } from "../context";
|
|
8
|
-
import { untrack } from "svelte";
|
|
9
8
|
|
|
10
9
|
function paginationRange(start: number, end: number): number[] {
|
|
11
10
|
return Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
@@ -18,8 +17,6 @@
|
|
|
18
17
|
onPageChange,
|
|
19
18
|
prevContent,
|
|
20
19
|
nextContent,
|
|
21
|
-
prevClass,
|
|
22
|
-
nextClass,
|
|
23
20
|
layout = "pagination",
|
|
24
21
|
nextLabel = "Next",
|
|
25
22
|
previousLabel = "Previous",
|
|
@@ -27,18 +24,10 @@
|
|
|
27
24
|
size = "default",
|
|
28
25
|
class: className,
|
|
29
26
|
classes,
|
|
30
|
-
spanClass,
|
|
31
|
-
tableDivClass,
|
|
32
27
|
...restProps
|
|
33
28
|
}: PaginationNavProps = $props();
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
"PaginationNav",
|
|
37
|
-
untrack(() => ({ prevClass, nextClass, spanClass, tableDivClass })),
|
|
38
|
-
{ prevClass: "prev", nextClass: "next", spanClass: "span", tableDivClass: "tableDiv" }
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
const styling = $derived(classes ?? { prev: prevClass, next: nextClass, span: spanClass, tableDiv: tableDivClass });
|
|
30
|
+
const styling = $derived(classes);
|
|
42
31
|
|
|
43
32
|
const theme = $derived(getTheme("paginationNav"));
|
|
44
33
|
|
|
@@ -83,17 +72,17 @@
|
|
|
83
72
|
|
|
84
73
|
<nav aria-label={ariaLabel} {...restProps}>
|
|
85
74
|
{#if layout === "table"}
|
|
86
|
-
<div class={tableDiv({ class: clsx(theme?.tableDiv, styling
|
|
87
|
-
Showing <span class={span({ class: clsx(theme?.span, styling
|
|
75
|
+
<div class={tableDiv({ class: clsx(theme?.tableDiv, styling?.tableDiv) })}>
|
|
76
|
+
Showing <span class={span({ class: clsx(theme?.span, styling?.span) })}>{currentPage}</span>
|
|
88
77
|
of
|
|
89
|
-
<span class={span({ class: clsx(theme?.span, styling
|
|
78
|
+
<span class={span({ class: clsx(theme?.span, styling?.span) })}>{totalPages}</span>
|
|
90
79
|
Entries
|
|
91
80
|
</div>
|
|
92
81
|
{/if}
|
|
93
82
|
|
|
94
83
|
<ul class={base({ class: clsx(theme?.base, className) })}>
|
|
95
|
-
<li
|
|
96
|
-
<PaginationButton onclick={goToPreviousPage} disabled={currentPage === 1} class={prev({ class: clsx(theme?.prev, styling
|
|
84
|
+
<li>
|
|
85
|
+
<PaginationButton onclick={goToPreviousPage} disabled={currentPage === 1} class={prev({ class: clsx(theme?.prev, styling?.prev) })}>
|
|
97
86
|
{#if prevContent}
|
|
98
87
|
{@render prevContent()}
|
|
99
88
|
{:else}
|
|
@@ -110,8 +99,8 @@
|
|
|
110
99
|
</li>
|
|
111
100
|
{/each}
|
|
112
101
|
{/if}
|
|
113
|
-
<li
|
|
114
|
-
<PaginationButton onclick={goToNextPage} disabled={currentPage === totalPages} class={next({ class: clsx(theme?.next, styling
|
|
102
|
+
<li>
|
|
103
|
+
<PaginationButton onclick={goToNextPage} disabled={currentPage === totalPages} class={next({ class: clsx(theme?.next, styling?.next) })}>
|
|
115
104
|
{#if nextContent}
|
|
116
105
|
{@render nextContent()}
|
|
117
106
|
{:else}
|
|
@@ -126,7 +115,7 @@
|
|
|
126
115
|
@component
|
|
127
116
|
[Go to docs](https://flowbite-svelte.com/)
|
|
128
117
|
## Type
|
|
129
|
-
[PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
118
|
+
[PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1151)
|
|
130
119
|
## Props
|
|
131
120
|
@prop currentPage = 1
|
|
132
121
|
@prop totalPages = 1
|
|
@@ -134,8 +123,6 @@
|
|
|
134
123
|
@prop onPageChange
|
|
135
124
|
@prop prevContent
|
|
136
125
|
@prop nextContent
|
|
137
|
-
@prop prevClass
|
|
138
|
-
@prop nextClass
|
|
139
126
|
@prop layout = "pagination"
|
|
140
127
|
@prop nextLabel = "Next"
|
|
141
128
|
@prop previousLabel = "Previous"
|
|
@@ -143,7 +130,5 @@
|
|
|
143
130
|
@prop size = "default"
|
|
144
131
|
@prop class: className
|
|
145
132
|
@prop classes
|
|
146
|
-
@prop spanClass
|
|
147
|
-
@prop tableDivClass
|
|
148
133
|
@prop ...restProps
|
|
149
134
|
-->
|
|
@@ -2,7 +2,7 @@ import type { PaginationNavProps } from "..";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PaginationNavProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1151)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop currentPage = 1
|
|
8
8
|
* @prop totalPages = 1
|
|
@@ -10,8 +10,6 @@ import type { PaginationNavProps } from "..";
|
|
|
10
10
|
* @prop onPageChange
|
|
11
11
|
* @prop prevContent
|
|
12
12
|
* @prop nextContent
|
|
13
|
-
* @prop prevClass
|
|
14
|
-
* @prop nextClass
|
|
15
13
|
* @prop layout = "pagination"
|
|
16
14
|
* @prop nextLabel = "Next"
|
|
17
15
|
* @prop previousLabel = "Previous"
|
|
@@ -19,8 +17,6 @@ import type { PaginationNavProps } from "..";
|
|
|
19
17
|
* @prop size = "default"
|
|
20
18
|
* @prop class: className
|
|
21
19
|
* @prop classes
|
|
22
|
-
* @prop spanClass
|
|
23
|
-
* @prop tableDivClass
|
|
24
20
|
* @prop ...restProps
|
|
25
21
|
*/
|
|
26
22
|
declare const PaginationNav: import("svelte").Component<PaginationNavProps, {}, "">;
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
import Popper from "../utils/Popper.svelte";
|
|
4
4
|
import { popover } from "./theme";
|
|
5
5
|
import type { PopoverProps } from "../types";
|
|
6
|
-
import { getTheme
|
|
7
|
-
import { untrack } from "svelte";
|
|
6
|
+
import { getTheme } from "../theme/themeUtils";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
title: titleSlot,
|
|
11
10
|
color = "default",
|
|
12
11
|
trigger = "hover",
|
|
13
|
-
defaultClass,
|
|
14
12
|
arrow = true,
|
|
15
13
|
children,
|
|
16
14
|
placement = "top",
|
|
@@ -20,13 +18,7 @@
|
|
|
20
18
|
...restProps
|
|
21
19
|
}: PopoverProps = $props();
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
"Popover",
|
|
25
|
-
untrack(() => ({ defaultClass })),
|
|
26
|
-
{ defaultClass: "content" }
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const styling = $derived(classes ?? { content: defaultClass });
|
|
21
|
+
const styling = $derived(classes);
|
|
30
22
|
|
|
31
23
|
const theme = $derived(getTheme("popover"));
|
|
32
24
|
|
|
@@ -35,13 +27,13 @@
|
|
|
35
27
|
|
|
36
28
|
<Popper {...restProps} bind:isOpen {placement} {trigger} {arrow} class={base({ class: clsx(theme?.base, className) })}>
|
|
37
29
|
{#if typeof titleSlot === "string"}
|
|
38
|
-
<div class={title({ class: clsx(theme?.title,
|
|
39
|
-
<h3 class={h3({ class: clsx(theme?.h3,
|
|
30
|
+
<div class={title({ class: clsx(theme?.title, styling?.title) })}>
|
|
31
|
+
<h3 class={h3({ class: clsx(theme?.h3, styling?.h3) })}>{titleSlot}</h3>
|
|
40
32
|
</div>
|
|
41
33
|
{:else if titleSlot}
|
|
42
34
|
{@render titleSlot()}
|
|
43
35
|
{/if}
|
|
44
|
-
<div class={content({ class: clsx(theme?.content, styling
|
|
36
|
+
<div class={content({ class: clsx(theme?.content, styling?.content) })}>
|
|
45
37
|
{@render children()}
|
|
46
38
|
</div>
|
|
47
39
|
</Popper>
|
|
@@ -50,12 +42,11 @@
|
|
|
50
42
|
@component
|
|
51
43
|
[Go to docs](https://flowbite-svelte.com/)
|
|
52
44
|
## Type
|
|
53
|
-
[PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
45
|
+
[PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1187)
|
|
54
46
|
## Props
|
|
55
47
|
@prop title: titleSlot
|
|
56
48
|
@prop color = "default"
|
|
57
49
|
@prop trigger = "hover"
|
|
58
|
-
@prop defaultClass
|
|
59
50
|
@prop arrow = true
|
|
60
51
|
@prop children
|
|
61
52
|
@prop placement = "top"
|
|
@@ -2,12 +2,11 @@ import type { PopoverProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [PopoverProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1187)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop title: titleSlot
|
|
8
8
|
* @prop color = "default"
|
|
9
9
|
* @prop trigger = "hover"
|
|
10
|
-
* @prop defaultClass
|
|
11
10
|
* @prop arrow = true
|
|
12
11
|
* @prop children
|
|
13
12
|
* @prop placement = "top"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
@component
|
|
69
69
|
[Go to docs](https://flowbite-svelte.com/)
|
|
70
70
|
## Type
|
|
71
|
-
[ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
71
|
+
[ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1196)
|
|
72
72
|
## Props
|
|
73
73
|
@prop progress = "45"
|
|
74
74
|
@prop precision = 0
|
|
@@ -2,7 +2,7 @@ import type { ProgressbarProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ProgressbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1196)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop progress = "45"
|
|
8
8
|
* @prop precision = 0
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
@component
|
|
94
94
|
[Go to docs](https://flowbite-svelte.com/)
|
|
95
95
|
## Type
|
|
96
|
-
[ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
96
|
+
[ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1207)
|
|
97
97
|
## Props
|
|
98
98
|
@prop progress = 45
|
|
99
99
|
@prop radius = 42
|
|
@@ -2,7 +2,7 @@ import type { ProgressradialProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ProgressradialProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1207)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop progress = 45
|
|
8
8
|
* @prop radius = 42
|
|
@@ -2,25 +2,11 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { advancedRating } from "./theme";
|
|
4
4
|
import type { AdvancedRatingProps } from "../types";
|
|
5
|
-
import { getTheme
|
|
6
|
-
import { untrack } from "svelte";
|
|
5
|
+
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
|
-
let { rating, globalText, ratings,
|
|
7
|
+
let { rating, globalText, ratings, class: className, classes, unit }: AdvancedRatingProps = $props();
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
"AdvancedRating",
|
|
12
|
-
untrack(() => ({ divClass, spanClass, div2Class, div3Class, span2Class })),
|
|
13
|
-
{ divClass: "class", spanClass: "span", div2Class: "div2", div3Class: "div3", span2Class: "span2" }
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
const styling = $derived(
|
|
17
|
-
classes ?? {
|
|
18
|
-
span: spanClass,
|
|
19
|
-
div2: div2Class,
|
|
20
|
-
div3: div3Class,
|
|
21
|
-
span2: span2Class
|
|
22
|
-
}
|
|
23
|
-
);
|
|
9
|
+
const styling = $derived(classes);
|
|
24
10
|
|
|
25
11
|
const theme = $derived(getTheme("advancedRating"));
|
|
26
12
|
|
|
@@ -35,11 +21,11 @@
|
|
|
35
21
|
{/if}
|
|
36
22
|
{#each ratings as { label, rating }, i (label ?? i)}
|
|
37
23
|
<div class={base({ class: clsx(theme?.base, className) })}>
|
|
38
|
-
<span class={span({ class: clsx(theme?.span, styling
|
|
39
|
-
<div class={div2({ class: clsx(theme?.div2, styling
|
|
40
|
-
<div class={div3({ class: clsx(theme?.div3, styling
|
|
24
|
+
<span class={span({ class: clsx(theme?.span, styling?.span) })}>{label}</span>
|
|
25
|
+
<div class={div2({ class: clsx(theme?.div2, styling?.div2) })}>
|
|
26
|
+
<div class={div3({ class: clsx(theme?.div3, styling?.div3) })} style="width: {rating}%"></div>
|
|
41
27
|
</div>
|
|
42
|
-
<span class={span2({ class: clsx(theme?.span2, styling
|
|
28
|
+
<span class={span2({ class: clsx(theme?.span2, styling?.span2) })}>{rating}{unit}</span>
|
|
43
29
|
</div>
|
|
44
30
|
{/each}
|
|
45
31
|
|
|
@@ -47,16 +33,11 @@
|
|
|
47
33
|
@component
|
|
48
34
|
[Go to docs](https://flowbite-svelte.com/)
|
|
49
35
|
## Type
|
|
50
|
-
[AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
36
|
+
[AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1224)
|
|
51
37
|
## Props
|
|
52
38
|
@prop rating
|
|
53
39
|
@prop globalText
|
|
54
40
|
@prop ratings
|
|
55
|
-
@prop divClass
|
|
56
|
-
@prop spanClass
|
|
57
|
-
@prop div2Class
|
|
58
|
-
@prop div3Class
|
|
59
|
-
@prop span2Class
|
|
60
41
|
@prop class: className
|
|
61
42
|
@prop classes
|
|
62
43
|
@prop unit
|
|
@@ -2,16 +2,11 @@ import type { AdvancedRatingProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [AdvancedRatingProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1224)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop rating
|
|
8
8
|
* @prop globalText
|
|
9
9
|
* @prop ratings
|
|
10
|
-
* @prop divClass
|
|
11
|
-
* @prop spanClass
|
|
12
|
-
* @prop div2Class
|
|
13
|
-
* @prop div3Class
|
|
14
|
-
* @prop span2Class
|
|
15
10
|
* @prop class: className
|
|
16
11
|
* @prop classes
|
|
17
12
|
* @prop unit
|