flowbite-svelte 1.24.1 → 1.26.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.
Files changed (110) hide show
  1. package/dist/command-palette/CommandPalette.svelte +1 -1
  2. package/dist/command-palette/CommandPalette.svelte.d.ts +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +1 -0
  5. package/dist/kanban/KanbanCard.svelte +1 -1
  6. package/dist/kanban/KanbanCard.svelte.d.ts +1 -1
  7. package/dist/scroll-spy/ScrollSpy.svelte +1 -1
  8. package/dist/scroll-spy/ScrollSpy.svelte.d.ts +1 -1
  9. package/dist/spinner/Spinner.svelte +72 -14
  10. package/dist/spinner/Spinner.svelte.d.ts +2 -1
  11. package/dist/spinner/theme.d.ts +23 -2
  12. package/dist/spinner/theme.js +29 -22
  13. package/dist/split-pane/Divider.svelte +3 -2
  14. package/dist/split-pane/Divider.svelte.d.ts +1 -1
  15. package/dist/split-pane/Pane.svelte +1 -1
  16. package/dist/split-pane/Pane.svelte.d.ts +1 -1
  17. package/dist/split-pane/SplitPane.svelte +35 -91
  18. package/dist/split-pane/SplitPane.svelte.d.ts +1 -1
  19. package/dist/step-indicator/StepIndicator.svelte +1 -1
  20. package/dist/step-indicator/StepIndicator.svelte.d.ts +1 -1
  21. package/dist/stepper/BreadcrumbStepper.svelte +1 -1
  22. package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
  23. package/dist/stepper/DetailedStepper.svelte +1 -1
  24. package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
  25. package/dist/stepper/ProgressStepper.svelte +1 -1
  26. package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
  27. package/dist/stepper/Stepper.svelte +1 -1
  28. package/dist/stepper/Stepper.svelte.d.ts +1 -1
  29. package/dist/stepper/TimelineStepper.svelte +1 -1
  30. package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
  31. package/dist/stepper/VerticalStepper.svelte +1 -1
  32. package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
  33. package/dist/table/Table.svelte +1 -1
  34. package/dist/table/Table.svelte.d.ts +1 -1
  35. package/dist/table/TableBody.svelte +1 -1
  36. package/dist/table/TableBody.svelte.d.ts +1 -1
  37. package/dist/table/TableBodyCell.svelte +1 -1
  38. package/dist/table/TableBodyCell.svelte.d.ts +1 -1
  39. package/dist/table/TableBodyRow.svelte +1 -1
  40. package/dist/table/TableBodyRow.svelte.d.ts +1 -1
  41. package/dist/table/TableHead.svelte +1 -1
  42. package/dist/table/TableHead.svelte.d.ts +1 -1
  43. package/dist/table/TableHeadCell.svelte +1 -1
  44. package/dist/table/TableHeadCell.svelte.d.ts +1 -1
  45. package/dist/table/TableSearch.svelte +1 -1
  46. package/dist/table/TableSearch.svelte.d.ts +1 -1
  47. package/dist/tabs/TabItem.svelte +1 -1
  48. package/dist/tabs/TabItem.svelte.d.ts +1 -1
  49. package/dist/tabs/Tabs.svelte +1 -1
  50. package/dist/tabs/Tabs.svelte.d.ts +1 -1
  51. package/dist/theme/themes.d.ts +1 -0
  52. package/dist/theme/themes.js +1 -0
  53. package/dist/timeline/Activity.svelte +1 -1
  54. package/dist/timeline/Activity.svelte.d.ts +1 -1
  55. package/dist/timeline/ActivityItem.svelte +1 -1
  56. package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
  57. package/dist/timeline/Group.svelte +1 -1
  58. package/dist/timeline/Group.svelte.d.ts +1 -1
  59. package/dist/timeline/GroupItem.svelte +1 -1
  60. package/dist/timeline/GroupItem.svelte.d.ts +1 -1
  61. package/dist/timeline/Timeline.svelte +1 -1
  62. package/dist/timeline/Timeline.svelte.d.ts +1 -1
  63. package/dist/timeline/TimelineItem.svelte +1 -1
  64. package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
  65. package/dist/toast/Toast.svelte +1 -1
  66. package/dist/toast/Toast.svelte.d.ts +1 -1
  67. package/dist/tooltip/Tooltip.svelte +1 -1
  68. package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
  69. package/dist/types.d.ts +15 -0
  70. package/dist/typography/a/A.svelte +1 -1
  71. package/dist/typography/a/A.svelte.d.ts +1 -1
  72. package/dist/typography/blockquote/Blockquote.svelte +1 -1
  73. package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
  74. package/dist/typography/descriptionlist/DescriptionList.svelte +1 -1
  75. package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
  76. package/dist/typography/heading/Heading.svelte +1 -1
  77. package/dist/typography/heading/Heading.svelte.d.ts +1 -1
  78. package/dist/typography/img/EnhancedImg.svelte +1 -1
  79. package/dist/typography/img/EnhancedImg.svelte.d.ts +1 -1
  80. package/dist/typography/img/Img.svelte +1 -1
  81. package/dist/typography/img/Img.svelte.d.ts +1 -1
  82. package/dist/typography/layout/Layout.svelte +1 -1
  83. package/dist/typography/layout/Layout.svelte.d.ts +1 -1
  84. package/dist/typography/list/Li.svelte +1 -1
  85. package/dist/typography/list/Li.svelte.d.ts +1 -1
  86. package/dist/typography/list/List.svelte +1 -1
  87. package/dist/typography/list/List.svelte.d.ts +1 -1
  88. package/dist/typography/mark/Mark.svelte +1 -1
  89. package/dist/typography/mark/Mark.svelte.d.ts +1 -1
  90. package/dist/typography/paragraph/P.svelte +1 -1
  91. package/dist/typography/paragraph/P.svelte.d.ts +1 -1
  92. package/dist/typography/secondary/Secondary.svelte +1 -1
  93. package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
  94. package/dist/typography/span/Span.svelte +1 -1
  95. package/dist/typography/span/Span.svelte.d.ts +1 -1
  96. package/dist/utils/Arrow.svelte +1 -1
  97. package/dist/utils/Arrow.svelte.d.ts +1 -1
  98. package/dist/utils/Popper.svelte +1 -1
  99. package/dist/utils/Popper.svelte.d.ts +1 -1
  100. package/dist/utils/nonPassiveTouch.d.ts +3 -0
  101. package/dist/utils/nonPassiveTouch.js +8 -0
  102. package/dist/video/Video.svelte +1 -1
  103. package/dist/video/Video.svelte.d.ts +1 -1
  104. package/dist/virtual-masonry/VirtualMasonry.svelte +185 -0
  105. package/dist/virtual-masonry/VirtualMasonry.svelte.d.ts +44 -0
  106. package/dist/virtual-masonry/index.d.ts +3 -0
  107. package/dist/virtual-masonry/index.js +2 -0
  108. package/dist/virtual-masonry/theme.d.ts +40 -0
  109. package/dist/virtual-masonry/theme.js +18 -0
  110. package/package.json +5 -1
@@ -2,7 +2,7 @@ import type { LiProps } from "../../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [LiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2008)
5
+ * [LiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2009)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop icon
@@ -28,7 +28,7 @@
28
28
  @component
29
29
  [Go to docs](https://flowbite-svelte.com/)
30
30
  ## Type
31
- [ListProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2000)
31
+ [ListProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2001)
32
32
  ## Props
33
33
  @prop children
34
34
  @prop tag = "ul"
@@ -2,7 +2,7 @@ import type { ListProps } from "../../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [ListProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2000)
5
+ * [ListProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2001)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop tag = "ul"
@@ -17,7 +17,7 @@
17
17
  @component
18
18
  [Go to docs](https://flowbite-svelte.com/)
19
19
  ## Type
20
- [MarkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2014)
20
+ [MarkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2015)
21
21
  ## Props
22
22
  @prop children
23
23
  @prop class: className
@@ -2,7 +2,7 @@ import type { MarkProps } from "../../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [MarkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2014)
5
+ * [MarkProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2015)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop class: className
@@ -32,7 +32,7 @@
32
32
  @component
33
33
  [Go to docs](https://flowbite-svelte.com/)
34
34
  ## Type
35
- [ParagraphProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2019)
35
+ [ParagraphProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2020)
36
36
  ## Props
37
37
  @prop children
38
38
  @prop class: className = "text-gray-900 dark:text-white"
@@ -2,7 +2,7 @@ import type { ParagraphProps } from "../../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [ParagraphProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2019)
5
+ * [ParagraphProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2020)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop class: className = "text-gray-900 dark:text-white"
@@ -17,7 +17,7 @@
17
17
  @component
18
18
  [Go to docs](https://flowbite-svelte.com/)
19
19
  ## Type
20
- [SecondaryProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2027)
20
+ [SecondaryProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2028)
21
21
  ## Props
22
22
  @prop children
23
23
  @prop class: className
@@ -2,7 +2,7 @@ import type { SecondaryProps } from "../../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [SecondaryProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2027)
5
+ * [SecondaryProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2028)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop class: className
@@ -34,7 +34,7 @@
34
34
  @component
35
35
  [Go to docs](https://flowbite-svelte.com/)
36
36
  ## Type
37
- [SpanProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2032)
37
+ [SpanProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2033)
38
38
  ## Props
39
39
  @prop children
40
40
  @prop class: className
@@ -2,7 +2,7 @@ import type { SpanProps } from "../../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [SpanProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2032)
5
+ * [SpanProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2033)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop class: className
@@ -50,7 +50,7 @@
50
50
  @component
51
51
  [Go to docs](https://flowbite-svelte.com/)
52
52
  ## Type
53
- [ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2076)
53
+ [ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2077)
54
54
  ## Props
55
55
  @prop placement = "top"
56
56
  @prop cords
@@ -2,7 +2,7 @@ import type { ArrowProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2076)
5
+ * [ArrowProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2077)
6
6
  * ## Props
7
7
  * @prop placement = "top"
8
8
  * @prop cords
@@ -262,7 +262,7 @@
262
262
  @component
263
263
  [Go to docs](https://flowbite-svelte.com/)
264
264
  ## Type
265
- [PopperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2054)
265
+ [PopperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2055)
266
266
  ## Props
267
267
  @prop triggeredBy
268
268
  @prop triggerDelay = DEFAULT_TRIGGER_DELAY
@@ -2,7 +2,7 @@ import type { PopperProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [PopperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2054)
5
+ * [PopperProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2055)
6
6
  * ## Props
7
7
  * @prop triggeredBy
8
8
  * @prop triggerDelay = DEFAULT_TRIGGER_DELAY
@@ -0,0 +1,3 @@
1
+ export declare function nonPassiveTouch(node: HTMLElement, handler: (event: TouchEvent) => void): {
2
+ destroy(): void;
3
+ };
@@ -0,0 +1,8 @@
1
+ export function nonPassiveTouch(node, handler) {
2
+ node.addEventListener("touchstart", handler, { passive: false });
3
+ return {
4
+ destroy() {
5
+ node.removeEventListener("touchstart", handler);
6
+ }
7
+ };
8
+ }
@@ -21,7 +21,7 @@
21
21
  @component
22
22
  [Go to docs](https://flowbite-svelte.com/)
23
23
  ## Type
24
- [VideoProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2041)
24
+ [VideoProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2042)
25
25
  ## Props
26
26
  @prop children
27
27
  @prop type = "video/mp4"
@@ -2,7 +2,7 @@ import type { VideoProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [VideoProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2041)
5
+ * [VideoProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2042)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop type = "video/mp4"
@@ -0,0 +1,185 @@
1
+ <script lang="ts" generics="T">
2
+ import type { VirtualMasonryProps } from "../types";
3
+ import { virtualMasonry } from "./theme";
4
+ import clsx from "clsx";
5
+ import { getTheme } from "../theme/themeUtils";
6
+
7
+ let {
8
+ items = [],
9
+ columns = 3,
10
+ gap = 16,
11
+ height = 600,
12
+ overscan = 200,
13
+ getItemHeight,
14
+ scrollToIndex,
15
+ children,
16
+ ariaLabel = "Virtual masonry grid",
17
+ class: className,
18
+ classes,
19
+ contained = false
20
+ }: VirtualMasonryProps<T> = $props();
21
+
22
+ const theme = getTheme("virtualMasonry");
23
+
24
+ let container: HTMLDivElement | undefined;
25
+ let containerWidth = $state(0);
26
+ let scrollTop = $state(0);
27
+ let rafId: number | undefined;
28
+
29
+ const styles = virtualMasonry({ contained });
30
+
31
+ const containStyle = $derived.by(() => {
32
+ if (!contained) return "";
33
+ const itemClasses = clsx(classes?.item);
34
+ const hasCustomContain = /\[contain:[^\]]+\]/.test(itemClasses);
35
+ return hasCustomContain ? "" : "contain: layout style paint;";
36
+ });
37
+
38
+ // Calculate column width based on container width
39
+ const columnWidth = $derived.by(() => {
40
+ if (containerWidth === 0) return 0;
41
+ return (containerWidth - gap * (columns - 1)) / columns;
42
+ });
43
+
44
+ // Position items in columns
45
+ interface PositionedItem {
46
+ item: T;
47
+ index: number;
48
+ x: number;
49
+ y: number;
50
+ height: number;
51
+ column: number;
52
+ }
53
+
54
+ const positionedItems = $derived.by((): PositionedItem[] => {
55
+ if (columnWidth === 0) return [];
56
+
57
+ const columnHeights = new Array(columns).fill(0);
58
+ const positioned: PositionedItem[] = [];
59
+
60
+ for (let i = 0; i < items.length; i++) {
61
+ // Find shortest column
62
+ const shortestColumn = columnHeights.indexOf(Math.min(...columnHeights));
63
+ const itemHeight = getItemHeight ? getItemHeight(items[i], i) : 200;
64
+
65
+ positioned.push({
66
+ item: items[i],
67
+ index: i,
68
+ x: shortestColumn * (columnWidth + gap),
69
+ y: columnHeights[shortestColumn],
70
+ height: itemHeight,
71
+ column: shortestColumn
72
+ });
73
+
74
+ columnHeights[shortestColumn] += itemHeight + gap;
75
+ }
76
+
77
+ return positioned;
78
+ });
79
+
80
+ // Total height is the tallest column
81
+ const totalHeight = $derived.by(() => {
82
+ if (positionedItems.length === 0) return 0;
83
+ return Math.max(...positionedItems.map((item) => item.y + item.height));
84
+ });
85
+
86
+ // Visible items based on scroll position with overscan
87
+ const visibleItems = $derived.by(() => {
88
+ const viewportTop = scrollTop - overscan;
89
+ const viewportBottom = scrollTop + height + overscan;
90
+
91
+ return positionedItems.filter((item) => {
92
+ const itemTop = item.y;
93
+ const itemBottom = item.y + item.height;
94
+ return itemBottom >= viewportTop && itemTop <= viewportBottom;
95
+ });
96
+ });
97
+
98
+ // Performance optimized scroll handler using RAF
99
+ function handleScroll() {
100
+ if (rafId) cancelAnimationFrame(rafId);
101
+ rafId = requestAnimationFrame(() => {
102
+ if (container) scrollTop = container.scrollTop;
103
+ });
104
+ }
105
+
106
+ // Scroll to specific index
107
+ function scrollToIndexImpl(index: number) {
108
+ if (!container || index < 0 || index >= items.length) return;
109
+ const item = positionedItems[index];
110
+ if (item) {
111
+ container.scrollTop = item.y;
112
+ }
113
+ }
114
+
115
+ // Bind scrollToIndex function to parent component
116
+ $effect(() => {
117
+ if (scrollToIndex) {
118
+ scrollToIndex(scrollToIndexImpl);
119
+ }
120
+ });
121
+
122
+ // Measure container width on mount and resize
123
+ $effect(() => {
124
+ if (!container) return;
125
+
126
+ const resizeObserver = new ResizeObserver((entries) => {
127
+ for (const entry of entries) {
128
+ containerWidth = entry.contentRect.width;
129
+ }
130
+ });
131
+
132
+ resizeObserver.observe(container);
133
+
134
+ return () => {
135
+ resizeObserver.disconnect();
136
+ if (rafId) cancelAnimationFrame(rafId);
137
+ };
138
+ });
139
+ </script>
140
+
141
+ <div
142
+ bind:this={container}
143
+ onscroll={handleScroll}
144
+ role="list"
145
+ aria-label={ariaLabel}
146
+ class={styles.container({ class: clsx(theme?.container, className) })}
147
+ style={`height:${height}px; position:relative;`}
148
+ >
149
+ <div class={styles.spacer({ class: clsx(theme?.spacer, classes?.spacer) })} style={`height:${totalHeight}px;`}>
150
+ <div class={styles.content({ class: clsx(theme?.content, classes?.content) })}>
151
+ {#each visibleItems as { item, index, x, y, height: itemHeight } (index)}
152
+ <div
153
+ role="listitem"
154
+ aria-setsize={items.length}
155
+ aria-posinset={index + 1}
156
+ class={styles.item({ class: clsx(theme?.item, classes?.item) })}
157
+ style={`position:absolute; left:${x}px; top:${y}px; width:${columnWidth}px; height:${itemHeight}px; ${containStyle}`}
158
+ >
159
+ {@render children?.(item, index)}
160
+ </div>
161
+ {/each}
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ <!--
167
+ @component
168
+ VirtualMasonry - Virtualized masonry/pinterest layout for efficient rendering of large image grids
169
+ [Go to docs](https://flowbite-svelte.com/)
170
+ ## Type
171
+ [VirtualMasonryProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts)
172
+ ## Props
173
+ @prop items = []
174
+ @prop columns = 3
175
+ @prop gap = 16
176
+ @prop height = 600
177
+ @prop overscan = 200
178
+ @prop getItemHeight
179
+ @prop scrollToIndex
180
+ @prop children
181
+ @prop ariaLabel = "Virtual masonry grid"
182
+ @prop contained = false
183
+ @prop class: className
184
+ @prop classes
185
+ -->
@@ -0,0 +1,44 @@
1
+ import type { VirtualMasonryProps } from "../types";
2
+ declare function $$render<T>(): {
3
+ props: VirtualMasonryProps<T>;
4
+ exports: {};
5
+ bindings: "";
6
+ slots: {};
7
+ events: {};
8
+ };
9
+ declare class __sveltets_Render<T> {
10
+ props(): ReturnType<typeof $$render<T>>['props'];
11
+ events(): ReturnType<typeof $$render<T>>['events'];
12
+ slots(): ReturnType<typeof $$render<T>>['slots'];
13
+ bindings(): "";
14
+ exports(): {};
15
+ }
16
+ interface $$IsomorphicComponent {
17
+ new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
18
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
19
+ } & ReturnType<__sveltets_Render<T>['exports']>;
20
+ <T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
21
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
22
+ }
23
+ /**
24
+ * VirtualMasonry - Virtualized masonry/pinterest layout for efficient rendering of large image grids
25
+ * [Go to docs](https://flowbite-svelte.com/)
26
+ * ## Type
27
+ * [VirtualMasonryProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts)
28
+ * ## Props
29
+ * @prop items = []
30
+ * @prop columns = 3
31
+ * @prop gap = 16
32
+ * @prop height = 600
33
+ * @prop overscan = 200
34
+ * @prop getItemHeight
35
+ * @prop scrollToIndex
36
+ * @prop children
37
+ * @prop ariaLabel = "Virtual masonry grid"
38
+ * @prop contained = false
39
+ * @prop class: className
40
+ * @prop classes
41
+ */
42
+ declare const VirtualMasonry: $$IsomorphicComponent;
43
+ type VirtualMasonry<T> = InstanceType<typeof VirtualMasonry<T>>;
44
+ export default VirtualMasonry;
@@ -0,0 +1,3 @@
1
+ export { default as VirtualMasonry } from "./VirtualMasonry.svelte";
2
+ export type { VirtualMasonryVariants } from "./theme";
3
+ export { virtualMasonry } from "./theme";
@@ -0,0 +1,2 @@
1
+ export { default as VirtualMasonry } from "./VirtualMasonry.svelte";
2
+ export { virtualMasonry } from "./theme";
@@ -0,0 +1,40 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ import type { Classes } from "../theme/themeUtils";
3
+ export declare const virtualMasonry: import("tailwind-variants").TVReturnType<{
4
+ contained: {
5
+ true: {
6
+ item: string;
7
+ };
8
+ false: {};
9
+ };
10
+ }, {
11
+ container: string;
12
+ spacer: string;
13
+ content: string;
14
+ item: string;
15
+ }, undefined, {
16
+ contained: {
17
+ true: {
18
+ item: string;
19
+ };
20
+ false: {};
21
+ };
22
+ }, {
23
+ container: string;
24
+ spacer: string;
25
+ content: string;
26
+ item: string;
27
+ }, import("tailwind-variants").TVReturnType<{
28
+ contained: {
29
+ true: {
30
+ item: string;
31
+ };
32
+ false: {};
33
+ };
34
+ }, {
35
+ container: string;
36
+ spacer: string;
37
+ content: string;
38
+ item: string;
39
+ }, undefined, unknown, unknown, undefined>>;
40
+ export type VirtualMasonryVariants = VariantProps<typeof virtualMasonry> & Classes<typeof virtualMasonry>;
@@ -0,0 +1,18 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const virtualMasonry = tv({
3
+ slots: {
4
+ container: "overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent",
5
+ spacer: "relative",
6
+ content: "relative w-full",
7
+ item: ""
8
+ },
9
+ variants: {
10
+ contained: {
11
+ true: { item: "[contain:layout_style_paint]" },
12
+ false: {}
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ contained: false
17
+ }
18
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "1.24.1",
3
+ "version": "1.26.0",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "dist/index.js",
6
6
  "author": {
@@ -861,6 +861,10 @@
861
861
  "types": "./dist/video/Video.svelte.d.ts",
862
862
  "svelte": "./dist/video/Video.svelte"
863
863
  },
864
+ "./VirtualMasonry.svelte": {
865
+ "types": "./dist/virtual-masonry/VirtualMasonry.svelte.d.ts",
866
+ "svelte": "./dist/virtual-masonry/VirtualMasonry.svelte"
867
+ },
864
868
  "./VirtualList.svelte": {
865
869
  "types": "./dist/virtuallist/VirtualList.svelte.d.ts",
866
870
  "svelte": "./dist/virtuallist/VirtualList.svelte"