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
|
@@ -3,48 +3,24 @@
|
|
|
3
3
|
import type { TableSearchProps, TableContextType } from "../types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { tableSearch } from "./theme";
|
|
6
|
-
import { getTheme
|
|
7
|
-
import { untrack } from "svelte";
|
|
6
|
+
import { getTheme } from "../theme/themeUtils";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
children,
|
|
11
10
|
header,
|
|
12
11
|
footer,
|
|
13
|
-
divClass,
|
|
14
12
|
inputValue = $bindable(),
|
|
15
13
|
striped = false,
|
|
16
14
|
hoverable = false,
|
|
17
15
|
customColor = "",
|
|
18
16
|
color = "default",
|
|
19
|
-
innerDivClass,
|
|
20
|
-
inputClass,
|
|
21
|
-
searchClass,
|
|
22
|
-
svgDivClass,
|
|
23
|
-
svgClass,
|
|
24
|
-
tableClass,
|
|
25
17
|
class: className,
|
|
26
18
|
classes,
|
|
27
19
|
placeholder = "Search",
|
|
28
20
|
...restProps
|
|
29
21
|
}: TableSearchProps = $props();
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
"TableSearch",
|
|
33
|
-
untrack(() => ({ divClass, innerDivClass, inputClass, searchClass, svgDivClass, svgClass, tableClass })),
|
|
34
|
-
{ divClass: "root", innerDivClass: "inner", inputClass: "input", searchClass: "search", svgDivClass: "svgDiv", svgClass: "svg", tableClass: "table" }
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
const styling = $derived(
|
|
38
|
-
classes ?? {
|
|
39
|
-
root: divClass,
|
|
40
|
-
inner: innerDivClass,
|
|
41
|
-
input: inputClass,
|
|
42
|
-
search: searchClass,
|
|
43
|
-
svgDiv: svgDivClass,
|
|
44
|
-
svg: svgClass,
|
|
45
|
-
table: tableClass
|
|
46
|
-
}
|
|
47
|
-
);
|
|
23
|
+
const styling = $derived(classes);
|
|
48
24
|
|
|
49
25
|
const theme = $derived(getTheme("tableSearch"));
|
|
50
26
|
|
|
@@ -52,7 +28,7 @@
|
|
|
52
28
|
|
|
53
29
|
const { root, inner, search, svgDiv, svg, input, table } = $derived(tableSearch({ color: themeColor, striped, hoverable }));
|
|
54
30
|
|
|
55
|
-
const tableCls = $derived(table({ class: clsx(
|
|
31
|
+
const tableCls = $derived(table({ class: clsx(theme?.table, styling?.table) }));
|
|
56
32
|
|
|
57
33
|
// Handle custom color
|
|
58
34
|
const finalTableClass = $derived(color === "custom" && customColor ? clsx(tableCls, customColor) : tableCls);
|
|
@@ -68,16 +44,16 @@
|
|
|
68
44
|
});
|
|
69
45
|
</script>
|
|
70
46
|
|
|
71
|
-
<div class={root({ class: clsx(theme?.root,
|
|
72
|
-
<div class={inner({ class: clsx(theme?.inner, styling
|
|
47
|
+
<div class={root({ class: clsx(theme?.root, className) })}>
|
|
48
|
+
<div class={inner({ class: clsx(theme?.inner, styling?.inner) })}>
|
|
73
49
|
<label for="table-search" class="sr-only">Search</label>
|
|
74
|
-
<div class={search({ class: clsx(theme?.search, styling
|
|
75
|
-
<div class={svgDiv({ class: clsx(theme?.svgDiv, styling
|
|
76
|
-
<svg class={svg({ class: clsx(theme?.svg, styling
|
|
50
|
+
<div class={search({ class: clsx(theme?.search, styling?.search) })}>
|
|
51
|
+
<div class={svgDiv({ class: clsx(theme?.svgDiv, styling?.svgDiv) })}>
|
|
52
|
+
<svg class={svg({ class: clsx(theme?.svg, styling?.svg) })} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
77
53
|
<path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd" />
|
|
78
54
|
</svg>
|
|
79
55
|
</div>
|
|
80
|
-
<input bind:value={inputValue} type="text" id="table-search" class={input({ class: clsx(theme?.input, styling
|
|
56
|
+
<input bind:value={inputValue} type="text" id="table-search" class={input({ class: clsx(theme?.input, styling?.input) })} {placeholder} />
|
|
81
57
|
</div>
|
|
82
58
|
{#if header}
|
|
83
59
|
{@render header()}
|
|
@@ -97,23 +73,16 @@
|
|
|
97
73
|
@component
|
|
98
74
|
[Go to docs](https://flowbite-svelte.com/)
|
|
99
75
|
## Type
|
|
100
|
-
[TableSearchProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
76
|
+
[TableSearchProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1680)
|
|
101
77
|
## Props
|
|
102
78
|
@prop children
|
|
103
79
|
@prop header
|
|
104
80
|
@prop footer
|
|
105
|
-
@prop divClass
|
|
106
81
|
@prop inputValue = $bindable()
|
|
107
82
|
@prop striped = false
|
|
108
83
|
@prop hoverable = false
|
|
109
84
|
@prop customColor = ""
|
|
110
85
|
@prop color = "default"
|
|
111
|
-
@prop innerDivClass
|
|
112
|
-
@prop inputClass
|
|
113
|
-
@prop searchClass
|
|
114
|
-
@prop svgDivClass
|
|
115
|
-
@prop svgClass
|
|
116
|
-
@prop tableClass
|
|
117
86
|
@prop class: className
|
|
118
87
|
@prop classes
|
|
119
88
|
@prop placeholder = "Search"
|
|
@@ -2,23 +2,16 @@ import type { TableSearchProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [TableSearchProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [TableSearchProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1680)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop header
|
|
9
9
|
* @prop footer
|
|
10
|
-
* @prop divClass
|
|
11
10
|
* @prop inputValue = $bindable()
|
|
12
11
|
* @prop striped = false
|
|
13
12
|
* @prop hoverable = false
|
|
14
13
|
* @prop customColor = ""
|
|
15
14
|
* @prop color = "default"
|
|
16
|
-
* @prop innerDivClass
|
|
17
|
-
* @prop inputClass
|
|
18
|
-
* @prop searchClass
|
|
19
|
-
* @prop svgDivClass
|
|
20
|
-
* @prop svgClass
|
|
21
|
-
* @prop tableClass
|
|
22
15
|
* @prop class: className
|
|
23
16
|
* @prop classes
|
|
24
17
|
* @prop placeholder = "Search"
|
package/dist/tabs/TabItem.svelte
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
@component
|
|
70
70
|
[Go to docs](https://flowbite-svelte.com/)
|
|
71
71
|
## Type
|
|
72
|
-
[TabitemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
72
|
+
[TabitemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1700)
|
|
73
73
|
## Props
|
|
74
74
|
@prop children
|
|
75
75
|
@prop titleSlot
|
|
@@ -2,7 +2,7 @@ import type { TabitemProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [TabitemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [TabitemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1700)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop titleSlot
|
package/dist/tabs/Tabs.svelte
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { getTheme
|
|
2
|
+
import { getTheme } from "../theme/themeUtils";
|
|
3
3
|
import type { SelectedTab, TabCtxType, TabsProps } from "../types";
|
|
4
4
|
import { createSingleSelectionContext, useSingleSelection } from "../utils/singleselection.svelte";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { tabs } from "./theme";
|
|
7
7
|
import { setTabsContext } from "../context";
|
|
8
|
-
import { untrack } from "svelte";
|
|
9
8
|
|
|
10
|
-
let { children, selected = $bindable(), tabStyle = "none",
|
|
9
|
+
let { children, selected = $bindable(), tabStyle = "none", divider = true, class: className, classes, ...restProps }: TabsProps = $props();
|
|
11
10
|
|
|
12
11
|
const activeClasses = $derived(typeof classes?.active === "string" ? classes.active : undefined);
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
"Tabs",
|
|
16
|
-
untrack(() => ({ ulClass, contentClass })),
|
|
17
|
-
{ ulClass: "class", contentClass: "content" }
|
|
18
|
-
);
|
|
13
|
+
const styling = $derived(classes);
|
|
19
14
|
|
|
20
15
|
const theme = $derived(getTheme("tabs"));
|
|
21
|
-
|
|
16
|
+
|
|
22
17
|
const { base, content, divider: dividerClass } = $derived(tabs({ tabStyle, hasDivider: divider }));
|
|
23
18
|
|
|
24
19
|
const uuid = $props.id();
|
|
@@ -80,14 +75,14 @@
|
|
|
80
75
|
});
|
|
81
76
|
</script>
|
|
82
77
|
|
|
83
|
-
<ul role="tablist" {...restProps} class={base({ class: clsx(theme?.base, className
|
|
78
|
+
<ul role="tablist" {...restProps} class={base({ class: clsx(theme?.base, className) })}>
|
|
84
79
|
{@render children()}
|
|
85
80
|
</ul>
|
|
86
81
|
{#if dividerBool}
|
|
87
|
-
<div class={dividerClass({ class: clsx(theme?.divider,
|
|
82
|
+
<div class={dividerClass({ class: clsx(theme?.divider, styling?.divider) })}></div>
|
|
88
83
|
{/if}
|
|
89
84
|
|
|
90
|
-
<div id={panelId} class={content({ class: clsx(theme?.content, styling
|
|
85
|
+
<div id={panelId} class={content({ class: clsx(theme?.content, styling?.content) })} role="tabpanel" aria-labelledby={selectedTab.id}>
|
|
91
86
|
{@render selectedTab.snippet?.()}
|
|
92
87
|
</div>
|
|
93
88
|
|
|
@@ -95,13 +90,11 @@
|
|
|
95
90
|
@component
|
|
96
91
|
[Go to docs](https://flowbite-svelte.com/)
|
|
97
92
|
## Type
|
|
98
|
-
[TabsProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
93
|
+
[TabsProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1693)
|
|
99
94
|
## Props
|
|
100
95
|
@prop children
|
|
101
96
|
@prop selected = $bindable()
|
|
102
97
|
@prop tabStyle = "none"
|
|
103
|
-
@prop ulClass
|
|
104
|
-
@prop contentClass
|
|
105
98
|
@prop divider = true
|
|
106
99
|
@prop class: className
|
|
107
100
|
@prop classes
|
|
@@ -2,13 +2,11 @@ import type { TabsProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [TabsProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [TabsProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1693)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop selected = $bindable()
|
|
9
9
|
* @prop tabStyle = "none"
|
|
10
|
-
* @prop ulClass
|
|
11
|
-
* @prop contentClass
|
|
12
10
|
* @prop divider = true
|
|
13
11
|
* @prop class: className
|
|
14
12
|
* @prop classes
|
|
@@ -40,14 +40,4 @@ export type Classes<T extends {
|
|
|
40
40
|
[K in keyof Slots<T>]: ClassValue;
|
|
41
41
|
}>;
|
|
42
42
|
};
|
|
43
|
-
/**
|
|
44
|
-
* Warns about deprecated theme-related props and suggests modern alternatives.
|
|
45
|
-
*
|
|
46
|
-
* Shows the component name, deprecated props, migration hints, and usage location (in dev mode).
|
|
47
|
-
*
|
|
48
|
-
* @param component - Name of the component using deprecated props.
|
|
49
|
-
* @param names - Record of deprecated prop names and their values.
|
|
50
|
-
* @param replacements - Optional map of deprecated keys to their replacements (e.g., "divClass" → "div").
|
|
51
|
-
*/
|
|
52
|
-
export declare function warnThemeDeprecation(component: string, names: Record<string, unknown>, replacements?: Record<string, unknown>): void;
|
|
53
43
|
export {};
|
package/dist/theme/themeUtils.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getThemeContext } from "../context";
|
|
2
|
-
import { DEV } from "esm-env";
|
|
3
2
|
/**
|
|
4
3
|
* Retrieves the theme configuration for a specific component.
|
|
5
4
|
*
|
|
@@ -17,69 +16,3 @@ export function getTheme(componentKey) {
|
|
|
17
16
|
const finalTheme = theme;
|
|
18
17
|
return finalTheme?.[componentKey];
|
|
19
18
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Warns about deprecated theme-related props and suggests modern alternatives.
|
|
22
|
-
*
|
|
23
|
-
* Shows the component name, deprecated props, migration hints, and usage location (in dev mode).
|
|
24
|
-
*
|
|
25
|
-
* @param component - Name of the component using deprecated props.
|
|
26
|
-
* @param names - Record of deprecated prop names and their values.
|
|
27
|
-
* @param replacements - Optional map of deprecated keys to their replacements (e.g., "divClass" → "div").
|
|
28
|
-
*/
|
|
29
|
-
export function warnThemeDeprecation(component, names, replacements) {
|
|
30
|
-
if (!DEV)
|
|
31
|
-
return;
|
|
32
|
-
const nonEmptyNames = Object.keys(names).filter((name) => names[name]);
|
|
33
|
-
if (nonEmptyNames.length === 0)
|
|
34
|
-
return;
|
|
35
|
-
let migrationHint = "";
|
|
36
|
-
const usesClass = nonEmptyNames.some((name) => replacements?.[name] === "class");
|
|
37
|
-
const propText = usesClass ? `"classes" or "class"` : `"classes"`;
|
|
38
|
-
if (replacements) {
|
|
39
|
-
const classProps = [];
|
|
40
|
-
const classesObjectEntries = [];
|
|
41
|
-
for (const name of nonEmptyNames) {
|
|
42
|
-
const newKey = replacements[name];
|
|
43
|
-
const value = names[name];
|
|
44
|
-
if (!newKey || !value)
|
|
45
|
-
continue;
|
|
46
|
-
if (newKey === "class") {
|
|
47
|
-
classProps.push(`class="${value}"`);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
classesObjectEntries.push(`${newKey}: "${value}"`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const hintLines = [];
|
|
54
|
-
if (classProps.length > 0)
|
|
55
|
-
hintLines.push(...classProps);
|
|
56
|
-
if (classesObjectEntries.length > 0) {
|
|
57
|
-
hintLines.push(`classes={{ ${classesObjectEntries.join(", ")} }}`);
|
|
58
|
-
}
|
|
59
|
-
if (hintLines.length > 0) {
|
|
60
|
-
migrationHint = `\nMigration example: ${hintLines.join(" ")}`;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
// Stack trace parsing to find external caller
|
|
64
|
-
const stack = new Error().stack;
|
|
65
|
-
const externalCaller = getExternalCaller(stack);
|
|
66
|
-
console.warn(`⚠️ The following "${component}" props are deprecated: ${nonEmptyNames.map((n) => `"${n}"`).join(", ")}.\n` +
|
|
67
|
-
`💡 Please use the ${propText} prop instead.${migrationHint}\n` +
|
|
68
|
-
(externalCaller ? `🔍 Used at: ${externalCaller}` : ""));
|
|
69
|
-
}
|
|
70
|
-
// Extracts the first file in the stack trace that is NOT the current component file
|
|
71
|
-
function getExternalCaller(stack) {
|
|
72
|
-
if (!stack)
|
|
73
|
-
return null;
|
|
74
|
-
const lines = stack.split("\n").slice(2); // skip "Error" and self-call
|
|
75
|
-
const currentFileMatch = lines[0]?.match(/(?:\()?(.*?\.svelte):\d+:\d+\)?$/);
|
|
76
|
-
const currentFile = currentFileMatch?.[1];
|
|
77
|
-
for (const line of lines) {
|
|
78
|
-
const match = line.match(/(?:\()?(.*?\.svelte):\d+:\d+\)?$/);
|
|
79
|
-
const file = match?.[1];
|
|
80
|
-
if (file && file !== currentFile) {
|
|
81
|
-
return line.trim().replace(/^at /, ""); // Clean format
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
}
|
package/dist/theme/themes.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { pagination, paginationButton, paginationItem, paginationNav } from "../
|
|
|
27
27
|
export { popover } from "../popover";
|
|
28
28
|
export { progressbar, progressradial } from "../progress";
|
|
29
29
|
export { advancedRating, rating, review, scoreRating } from "../rating";
|
|
30
|
-
export { sidebar, sidebarBrand, sidebarButton, sidebarCta, sidebarDropdownWrapper } from "../sidebar";
|
|
30
|
+
export { sidebar, sidebarBrand, sidebarButton, sidebarCta, sidebarItem, sidebarDropdownWrapper } from "../sidebar";
|
|
31
31
|
export { cardPlaceholder, imagePlaceholder, listPlaceholder, skeleton, testimonialPlaceholder, textPlaceholder, videoPlaceholder, widgetPlaceholder } from "../skeleton";
|
|
32
32
|
export { speedDial, speedDialButton } from "../speed-dial";
|
|
33
33
|
export { spinner } from "../spinner";
|
package/dist/theme/themes.js
CHANGED
|
@@ -28,7 +28,7 @@ export { pagination, paginationButton, paginationItem, paginationNav } from "../
|
|
|
28
28
|
export { popover } from "../popover";
|
|
29
29
|
export { progressbar, progressradial } from "../progress";
|
|
30
30
|
export { advancedRating, rating, review, scoreRating } from "../rating";
|
|
31
|
-
export { sidebar, sidebarBrand, sidebarButton, sidebarCta, sidebarDropdownWrapper } from "../sidebar";
|
|
31
|
+
export { sidebar, sidebarBrand, sidebarButton, sidebarCta, sidebarItem, sidebarDropdownWrapper } from "../sidebar";
|
|
32
32
|
export { cardPlaceholder, imagePlaceholder, listPlaceholder, skeleton, testimonialPlaceholder, textPlaceholder, videoPlaceholder, widgetPlaceholder } from "../skeleton";
|
|
33
33
|
export { speedDial, speedDialButton } from "../speed-dial";
|
|
34
34
|
export { spinner } from "../spinner";
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@component
|
|
18
18
|
[Go to docs](https://flowbite-svelte.com/)
|
|
19
19
|
## Type
|
|
20
|
-
[ActivityProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
20
|
+
[ActivityProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1745)
|
|
21
21
|
## Props
|
|
22
22
|
@prop children
|
|
23
23
|
@prop class: className
|
|
@@ -2,7 +2,7 @@ import type { ActivityProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ActivityProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ActivityProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1745)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
8
|
* @prop class: className
|
|
@@ -2,37 +2,11 @@
|
|
|
2
2
|
import { activityItem } from "./theme";
|
|
3
3
|
import type { ActivityItemProps } from "../types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { getTheme
|
|
6
|
-
import { untrack } from "svelte";
|
|
5
|
+
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
|
-
let { activities,
|
|
7
|
+
let { activities, class: className, classes, ...restProps }: ActivityItemProps = $props();
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
"ActivityItem",
|
|
12
|
-
untrack(() => ({ liClass, spanClass, imgClass, outerDivClass, innerDivClass, timeClass, titleClass, textClass })),
|
|
13
|
-
{
|
|
14
|
-
liClass: "class",
|
|
15
|
-
spanClass: "span",
|
|
16
|
-
imgClass: "img",
|
|
17
|
-
outerDivClass: "outer",
|
|
18
|
-
innerDivClass: "inner",
|
|
19
|
-
timeClass: "time",
|
|
20
|
-
titleClass: "title",
|
|
21
|
-
textClass: "text"
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
const styling = $derived(
|
|
26
|
-
classes ?? {
|
|
27
|
-
span: spanClass,
|
|
28
|
-
img: imgClass,
|
|
29
|
-
outer: outerDivClass,
|
|
30
|
-
inner: innerDivClass,
|
|
31
|
-
time: timeClass,
|
|
32
|
-
title: titleClass,
|
|
33
|
-
text: textClass
|
|
34
|
-
}
|
|
35
|
-
);
|
|
9
|
+
const styling = $derived(classes);
|
|
36
10
|
|
|
37
11
|
const theme = $derived(getTheme("activityItem"));
|
|
38
12
|
|
|
@@ -40,19 +14,19 @@
|
|
|
40
14
|
</script>
|
|
41
15
|
|
|
42
16
|
{#each activities as { title: name, date, src, alt, text: activity, id }, index (id ?? src ?? index)}
|
|
43
|
-
<li {...restProps} class={li({ class: clsx(theme?.li, className
|
|
44
|
-
<span class={span({ class: clsx(theme?.span, styling
|
|
45
|
-
<img class={img({ class: clsx(theme?.img, styling
|
|
17
|
+
<li {...restProps} class={li({ class: clsx(theme?.li, className) })}>
|
|
18
|
+
<span class={span({ class: clsx(theme?.span, styling?.span) })}>
|
|
19
|
+
<img class={img({ class: clsx(theme?.img, styling?.img) })} {src} {alt} />
|
|
46
20
|
</span>
|
|
47
|
-
<div class={outer({ class: clsx(theme?.outer, styling
|
|
48
|
-
<div class={inner({ class: clsx(theme?.inner, styling
|
|
49
|
-
<time class={time({ class: clsx(theme?.time, styling
|
|
50
|
-
<div class={title({ class: clsx(theme?.title, styling
|
|
21
|
+
<div class={outer({ class: clsx(theme?.outer, styling?.outer) })}>
|
|
22
|
+
<div class={inner({ class: clsx(theme?.inner, styling?.inner) })}>
|
|
23
|
+
<time class={time({ class: clsx(theme?.time, styling?.time) })}>{date}</time>
|
|
24
|
+
<div class={title({ class: clsx(theme?.title, styling?.title) })}>
|
|
51
25
|
{@html name}
|
|
52
26
|
</div>
|
|
53
27
|
</div>
|
|
54
28
|
{#if activity}
|
|
55
|
-
<div class={text({ class: clsx(theme?.text, styling
|
|
29
|
+
<div class={text({ class: clsx(theme?.text, styling?.text) })}>
|
|
56
30
|
{@html activity}
|
|
57
31
|
</div>
|
|
58
32
|
{/if}
|
|
@@ -64,17 +38,9 @@
|
|
|
64
38
|
@component
|
|
65
39
|
[Go to docs](https://flowbite-svelte.com/)
|
|
66
40
|
## Type
|
|
67
|
-
[ActivityItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
41
|
+
[ActivityItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1749)
|
|
68
42
|
## Props
|
|
69
43
|
@prop activities
|
|
70
|
-
@prop liClass
|
|
71
|
-
@prop spanClass
|
|
72
|
-
@prop imgClass
|
|
73
|
-
@prop outerDivClass
|
|
74
|
-
@prop innerDivClass
|
|
75
|
-
@prop timeClass
|
|
76
|
-
@prop titleClass
|
|
77
|
-
@prop textClass
|
|
78
44
|
@prop class: className
|
|
79
45
|
@prop classes
|
|
80
46
|
@prop ...restProps
|
|
@@ -2,17 +2,9 @@ import type { ActivityItemProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [ActivityItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [ActivityItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1749)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop activities
|
|
8
|
-
* @prop liClass
|
|
9
|
-
* @prop spanClass
|
|
10
|
-
* @prop imgClass
|
|
11
|
-
* @prop outerDivClass
|
|
12
|
-
* @prop innerDivClass
|
|
13
|
-
* @prop timeClass
|
|
14
|
-
* @prop titleClass
|
|
15
|
-
* @prop textClass
|
|
16
8
|
* @prop class: className
|
|
17
9
|
* @prop classes
|
|
18
10
|
* @prop ...restProps
|
|
@@ -2,34 +2,20 @@
|
|
|
2
2
|
import { group } from "./theme";
|
|
3
3
|
import type { GroupProps } from "../types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { getTheme
|
|
6
|
-
import { untrack } from "svelte";
|
|
5
|
+
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
|
-
let { children,
|
|
7
|
+
let { children, date, class: className, classes, ...restProps }: GroupProps = $props();
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
"Group",
|
|
12
|
-
untrack(() => ({ divClass, timeClass, olClass })),
|
|
13
|
-
{
|
|
14
|
-
divClass: "class",
|
|
15
|
-
timeClass: "time",
|
|
16
|
-
olClass: "ol"
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const styling = $derived({
|
|
21
|
-
time: timeClass,
|
|
22
|
-
ol: olClass
|
|
23
|
-
});
|
|
9
|
+
const styling = $derived(classes);
|
|
24
10
|
|
|
25
11
|
const theme = $derived(getTheme("group"));
|
|
26
12
|
|
|
27
13
|
const { div, time, ol } = $derived(group());
|
|
28
14
|
</script>
|
|
29
15
|
|
|
30
|
-
<div class={div({ class: clsx(theme?.div, className
|
|
31
|
-
<time class={time({ class: clsx(theme?.time, styling
|
|
32
|
-
<ol {...restProps} class={ol({ class: clsx(theme?.ol, styling
|
|
16
|
+
<div class={div({ class: clsx(theme?.div, className) })}>
|
|
17
|
+
<time class={time({ class: clsx(theme?.time, styling?.time) })}>{date}</time>
|
|
18
|
+
<ol {...restProps} class={ol({ class: clsx(theme?.ol, styling?.ol) })}>
|
|
33
19
|
{@render children()}
|
|
34
20
|
</ol>
|
|
35
21
|
</div>
|
|
@@ -38,13 +24,10 @@
|
|
|
38
24
|
@component
|
|
39
25
|
[Go to docs](https://flowbite-svelte.com/)
|
|
40
26
|
## Type
|
|
41
|
-
[GroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
27
|
+
[GroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1753)
|
|
42
28
|
## Props
|
|
43
29
|
@prop children
|
|
44
|
-
@prop divClass
|
|
45
|
-
@prop timeClass
|
|
46
30
|
@prop date
|
|
47
|
-
@prop olClass
|
|
48
31
|
@prop class: className
|
|
49
32
|
@prop classes
|
|
50
33
|
@prop ...restProps
|
|
@@ -2,13 +2,10 @@ import type { GroupProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [GroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [GroupProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1753)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop children
|
|
8
|
-
* @prop divClass
|
|
9
|
-
* @prop timeClass
|
|
10
8
|
* @prop date
|
|
11
|
-
* @prop olClass
|
|
12
9
|
* @prop class: className
|
|
13
10
|
* @prop classes
|
|
14
11
|
* @prop ...restProps
|
|
@@ -2,32 +2,12 @@
|
|
|
2
2
|
import { groupItem } from "./theme";
|
|
3
3
|
import type { GroupItemProps } from "../types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { getTheme
|
|
6
|
-
import { untrack } from "svelte";
|
|
5
|
+
import { getTheme } from "../theme/themeUtils";
|
|
7
6
|
|
|
8
|
-
let { timelines,
|
|
7
|
+
let { timelines, class: className, classes, ...restProps }: GroupItemProps = $props();
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
"GroupItem",
|
|
12
|
-
untrack(() => ({ aClass, imgClass, divClass, titleClass, spanClass })),
|
|
13
|
-
{
|
|
14
|
-
aClass: "class",
|
|
15
|
-
imgClass: "img",
|
|
16
|
-
divClass: "div",
|
|
17
|
-
titleClass: "title",
|
|
18
|
-
spanClass: "span"
|
|
19
|
-
}
|
|
20
|
-
);
|
|
9
|
+
const styling = $derived(classes);
|
|
21
10
|
|
|
22
|
-
const styling = $derived(
|
|
23
|
-
classes ?? {
|
|
24
|
-
img: imgClass,
|
|
25
|
-
div: divClass,
|
|
26
|
-
title: titleClass,
|
|
27
|
-
span: spanClass,
|
|
28
|
-
a: aClass
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
11
|
const theme = $derived(getTheme("groupItem"));
|
|
32
12
|
|
|
33
13
|
const { base, a, img, div, title, span, svg } = $derived(groupItem());
|
|
@@ -35,19 +15,19 @@
|
|
|
35
15
|
|
|
36
16
|
{#each timelines as { name, src, alt, isPrivate, href, comment, id }, index (id ?? href ?? name ?? index)}
|
|
37
17
|
<li class={base({ class: clsx(theme?.base, className) })} {...restProps}>
|
|
38
|
-
<a {href} class={a({ class: clsx(theme?.a, styling
|
|
39
|
-
<img class={img({ class: clsx(theme?.img, styling
|
|
40
|
-
<div class={div({ class: clsx(theme?.div, styling
|
|
41
|
-
<div class={title({ class: clsx(theme?.title, styling
|
|
18
|
+
<a {href} class={a({ class: clsx(theme?.a, styling?.a) })}>
|
|
19
|
+
<img class={img({ class: clsx(theme?.img, styling?.img) })} {src} {alt} />
|
|
20
|
+
<div class={div({ class: clsx(theme?.div, styling?.div) })}>
|
|
21
|
+
<div class={title({ class: clsx(theme?.title, styling?.title) })}>
|
|
42
22
|
{@html name}
|
|
43
23
|
</div>
|
|
44
24
|
{#if comment}
|
|
45
25
|
<div class="text-sm font-normal">{comment}</div>
|
|
46
26
|
{/if}
|
|
47
27
|
|
|
48
|
-
<span class={span({ class: clsx(theme?.span, styling
|
|
28
|
+
<span class={span({ class: clsx(theme?.span, styling?.span) })}>
|
|
49
29
|
{#if isPrivate}
|
|
50
|
-
<svg class={svg({ class: clsx(theme?.svg,
|
|
30
|
+
<svg class={svg({ class: clsx(theme?.svg, styling?.svg) })} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
51
31
|
<path
|
|
52
32
|
fill-rule="evenodd"
|
|
53
33
|
d="M3.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z"
|
|
@@ -57,7 +37,7 @@
|
|
|
57
37
|
</svg>
|
|
58
38
|
Private
|
|
59
39
|
{:else}
|
|
60
|
-
<svg class={svg({ class: clsx(theme?.svg,
|
|
40
|
+
<svg class={svg({ class: clsx(theme?.svg, styling?.svg) })} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
61
41
|
<path
|
|
62
42
|
fill-rule="evenodd"
|
|
63
43
|
d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z"
|
|
@@ -76,14 +56,9 @@
|
|
|
76
56
|
@component
|
|
77
57
|
[Go to docs](https://flowbite-svelte.com/)
|
|
78
58
|
## Type
|
|
79
|
-
[GroupItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
59
|
+
[GroupItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1758)
|
|
80
60
|
## Props
|
|
81
61
|
@prop timelines
|
|
82
|
-
@prop aClass
|
|
83
|
-
@prop imgClass
|
|
84
|
-
@prop divClass
|
|
85
|
-
@prop titleClass
|
|
86
|
-
@prop spanClass
|
|
87
62
|
@prop class: className
|
|
88
63
|
@prop classes
|
|
89
64
|
@prop ...restProps
|
|
@@ -2,14 +2,9 @@ import type { GroupItemProps } from "../types";
|
|
|
2
2
|
/**
|
|
3
3
|
* [Go to docs](https://flowbite-svelte.com/)
|
|
4
4
|
* ## Type
|
|
5
|
-
* [GroupItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
5
|
+
* [GroupItemProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1758)
|
|
6
6
|
* ## Props
|
|
7
7
|
* @prop timelines
|
|
8
|
-
* @prop aClass
|
|
9
|
-
* @prop imgClass
|
|
10
|
-
* @prop divClass
|
|
11
|
-
* @prop titleClass
|
|
12
|
-
* @prop spanClass
|
|
13
8
|
* @prop class: className
|
|
14
9
|
* @prop classes
|
|
15
10
|
* @prop ...restProps
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@component
|
|
22
22
|
[Go to docs](https://flowbite-svelte.com/)
|
|
23
23
|
## Type
|
|
24
|
-
[TimelineProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#
|
|
24
|
+
[TimelineProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1774)
|
|
25
25
|
## Props
|
|
26
26
|
@prop children
|
|
27
27
|
@prop order = "default"
|