flowbite-svelte 1.10.22 → 1.11.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 (192) hide show
  1. package/dist/alert/Alert.svelte +16 -5
  2. package/dist/alert/Alert.svelte.d.ts +1 -1
  3. package/dist/badge/Badge.svelte +12 -7
  4. package/dist/banner/Banner.svelte +13 -10
  5. package/dist/banner/Banner.svelte.d.ts +1 -0
  6. package/dist/drawer/Drawer.svelte +13 -4
  7. package/dist/drawer/Drawer.svelte.d.ts +1 -1
  8. package/dist/forms/fileupload/Fileupload.svelte +4 -1
  9. package/dist/forms/floating-label/FloatingLabelInput.svelte +4 -1
  10. package/dist/forms/input-field/Input.svelte +4 -1
  11. package/dist/forms/search/Search.svelte +4 -1
  12. package/dist/forms/select/MultiSelect.svelte +4 -1
  13. package/dist/forms/select/Select.svelte +4 -1
  14. package/dist/forms/textarea/Textarea.svelte +4 -1
  15. package/dist/modal/Modal.svelte +17 -4
  16. package/dist/navbar/Menu.svelte +1 -1
  17. package/dist/navbar/Menu.svelte.d.ts +1 -1
  18. package/dist/navbar/NavBrand.svelte +1 -1
  19. package/dist/navbar/NavBrand.svelte.d.ts +1 -1
  20. package/dist/navbar/NavContainer.svelte +1 -1
  21. package/dist/navbar/NavContainer.svelte.d.ts +1 -1
  22. package/dist/navbar/NavHamburger.svelte +1 -1
  23. package/dist/navbar/NavHamburger.svelte.d.ts +1 -1
  24. package/dist/navbar/NavLi.svelte +1 -1
  25. package/dist/navbar/NavLi.svelte.d.ts +1 -1
  26. package/dist/navbar/NavUl.svelte +1 -1
  27. package/dist/navbar/NavUl.svelte.d.ts +1 -1
  28. package/dist/navbar/Navbar.svelte +1 -1
  29. package/dist/navbar/Navbar.svelte.d.ts +1 -1
  30. package/dist/pagination/Pagination.svelte +1 -1
  31. package/dist/pagination/Pagination.svelte.d.ts +1 -1
  32. package/dist/pagination/PaginationButton.svelte +1 -1
  33. package/dist/pagination/PaginationButton.svelte.d.ts +1 -1
  34. package/dist/pagination/PaginationItem.svelte +1 -1
  35. package/dist/pagination/PaginationItem.svelte.d.ts +1 -1
  36. package/dist/pagination/PaginationNav.svelte +1 -1
  37. package/dist/pagination/PaginationNav.svelte.d.ts +1 -1
  38. package/dist/popover/Popover.svelte +1 -1
  39. package/dist/popover/Popover.svelte.d.ts +1 -1
  40. package/dist/progress/Progressbar.svelte +1 -1
  41. package/dist/progress/Progressbar.svelte.d.ts +1 -1
  42. package/dist/progress/Progressradial.svelte +1 -1
  43. package/dist/progress/Progressradial.svelte.d.ts +1 -1
  44. package/dist/rating/AdvancedRating.svelte +1 -1
  45. package/dist/rating/AdvancedRating.svelte.d.ts +1 -1
  46. package/dist/rating/CustomIcon.svelte +1 -1
  47. package/dist/rating/CustomIcon.svelte.d.ts +1 -1
  48. package/dist/rating/Heart.svelte +1 -1
  49. package/dist/rating/Heart.svelte.d.ts +1 -1
  50. package/dist/rating/Rating.svelte +1 -1
  51. package/dist/rating/Rating.svelte.d.ts +1 -1
  52. package/dist/rating/RatingComment.svelte +1 -1
  53. package/dist/rating/RatingComment.svelte.d.ts +1 -1
  54. package/dist/rating/Review.svelte +1 -1
  55. package/dist/rating/Review.svelte.d.ts +1 -1
  56. package/dist/rating/ScoreRating.svelte +1 -1
  57. package/dist/rating/ScoreRating.svelte.d.ts +1 -1
  58. package/dist/rating/Star.svelte +1 -1
  59. package/dist/rating/Star.svelte.d.ts +1 -1
  60. package/dist/rating/Thumbup.svelte +1 -1
  61. package/dist/rating/Thumbup.svelte.d.ts +1 -1
  62. package/dist/sidebar/Sidebar.svelte +1 -1
  63. package/dist/sidebar/Sidebar.svelte.d.ts +1 -1
  64. package/dist/sidebar/SidebarBrand.svelte +1 -1
  65. package/dist/sidebar/SidebarBrand.svelte.d.ts +1 -1
  66. package/dist/sidebar/SidebarButton.svelte +1 -1
  67. package/dist/sidebar/SidebarButton.svelte.d.ts +1 -1
  68. package/dist/sidebar/SidebarCta.svelte +1 -1
  69. package/dist/sidebar/SidebarCta.svelte.d.ts +1 -1
  70. package/dist/sidebar/SidebarDropdownWrapper.svelte +1 -1
  71. package/dist/sidebar/SidebarDropdownWrapper.svelte.d.ts +1 -1
  72. package/dist/sidebar/SidebarGroup.svelte +1 -1
  73. package/dist/sidebar/SidebarGroup.svelte.d.ts +1 -1
  74. package/dist/sidebar/SidebarItem.svelte +1 -1
  75. package/dist/sidebar/SidebarItem.svelte.d.ts +1 -1
  76. package/dist/skeleton/CardPlaceholder.svelte +1 -1
  77. package/dist/skeleton/CardPlaceholder.svelte.d.ts +1 -1
  78. package/dist/skeleton/ImagePlaceholder.svelte +1 -1
  79. package/dist/skeleton/ImagePlaceholder.svelte.d.ts +1 -1
  80. package/dist/skeleton/ListPlaceholder.svelte +1 -1
  81. package/dist/skeleton/ListPlaceholder.svelte.d.ts +1 -1
  82. package/dist/skeleton/Skeleton.svelte +1 -1
  83. package/dist/skeleton/Skeleton.svelte.d.ts +1 -1
  84. package/dist/skeleton/TestimonialPlaceholder.svelte +1 -1
  85. package/dist/skeleton/TestimonialPlaceholder.svelte.d.ts +1 -1
  86. package/dist/skeleton/TextPlaceholder.svelte +1 -1
  87. package/dist/skeleton/TextPlaceholder.svelte.d.ts +1 -1
  88. package/dist/skeleton/VideoPlaceholder.svelte +1 -1
  89. package/dist/skeleton/VideoPlaceholder.svelte.d.ts +1 -1
  90. package/dist/skeleton/WidgetPlaceholder.svelte +1 -1
  91. package/dist/skeleton/WidgetPlaceholder.svelte.d.ts +1 -1
  92. package/dist/speed-dial/SpeedDial.svelte +1 -1
  93. package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -1
  94. package/dist/speed-dial/SpeedDialButton.svelte +1 -1
  95. package/dist/speed-dial/SpeedDialButton.svelte.d.ts +1 -1
  96. package/dist/speed-dial/SpeedDialTrigger.svelte +1 -1
  97. package/dist/speed-dial/SpeedDialTrigger.svelte.d.ts +1 -1
  98. package/dist/spinner/Spinner.svelte +1 -1
  99. package/dist/spinner/Spinner.svelte.d.ts +1 -1
  100. package/dist/stepindicator/StepIndicator.svelte +1 -1
  101. package/dist/stepindicator/StepIndicator.svelte.d.ts +1 -1
  102. package/dist/stepper/BreadcrumbStepper.svelte +1 -1
  103. package/dist/stepper/BreadcrumbStepper.svelte.d.ts +1 -1
  104. package/dist/stepper/DetailedStepper.svelte +1 -1
  105. package/dist/stepper/DetailedStepper.svelte.d.ts +1 -1
  106. package/dist/stepper/ProgressStepper.svelte +1 -1
  107. package/dist/stepper/ProgressStepper.svelte.d.ts +1 -1
  108. package/dist/stepper/Stepper.svelte +1 -1
  109. package/dist/stepper/Stepper.svelte.d.ts +1 -1
  110. package/dist/stepper/TimelineStepper.svelte +1 -1
  111. package/dist/stepper/TimelineStepper.svelte.d.ts +1 -1
  112. package/dist/stepper/VerticalStepper.svelte +1 -1
  113. package/dist/stepper/VerticalStepper.svelte.d.ts +1 -1
  114. package/dist/table/Table.svelte +1 -1
  115. package/dist/table/Table.svelte.d.ts +1 -1
  116. package/dist/table/TableBody.svelte +1 -1
  117. package/dist/table/TableBody.svelte.d.ts +1 -1
  118. package/dist/table/TableBodyCell.svelte +1 -1
  119. package/dist/table/TableBodyCell.svelte.d.ts +1 -1
  120. package/dist/table/TableBodyRow.svelte +1 -1
  121. package/dist/table/TableBodyRow.svelte.d.ts +1 -1
  122. package/dist/table/TableHead.svelte +1 -1
  123. package/dist/table/TableHead.svelte.d.ts +1 -1
  124. package/dist/table/TableHeadCell.svelte +1 -1
  125. package/dist/table/TableHeadCell.svelte.d.ts +1 -1
  126. package/dist/table/TableSearch.svelte +1 -1
  127. package/dist/table/TableSearch.svelte.d.ts +1 -1
  128. package/dist/tabs/TabItem.svelte +1 -1
  129. package/dist/tabs/TabItem.svelte.d.ts +1 -1
  130. package/dist/tabs/Tabs.svelte +1 -1
  131. package/dist/tabs/Tabs.svelte.d.ts +1 -1
  132. package/dist/timeline/Activity.svelte +1 -1
  133. package/dist/timeline/Activity.svelte.d.ts +1 -1
  134. package/dist/timeline/ActivityItem.svelte +1 -1
  135. package/dist/timeline/ActivityItem.svelte.d.ts +1 -1
  136. package/dist/timeline/Group.svelte +1 -1
  137. package/dist/timeline/Group.svelte.d.ts +1 -1
  138. package/dist/timeline/GroupItem.svelte +1 -1
  139. package/dist/timeline/GroupItem.svelte.d.ts +1 -1
  140. package/dist/timeline/Timeline.svelte +1 -1
  141. package/dist/timeline/Timeline.svelte.d.ts +1 -1
  142. package/dist/timeline/TimelineItem.svelte +1 -1
  143. package/dist/timeline/TimelineItem.svelte.d.ts +1 -1
  144. package/dist/toast/Toast.svelte +18 -10
  145. package/dist/toast/Toast.svelte.d.ts +1 -1
  146. package/dist/toolbar/Toolbar.svelte +1 -1
  147. package/dist/toolbar/Toolbar.svelte.d.ts +1 -1
  148. package/dist/toolbar/ToolbarButton.svelte +1 -1
  149. package/dist/toolbar/ToolbarButton.svelte.d.ts +1 -1
  150. package/dist/toolbar/ToolbarGroup.svelte +1 -1
  151. package/dist/toolbar/ToolbarGroup.svelte.d.ts +1 -1
  152. package/dist/tooltip/Tooltip.svelte +1 -1
  153. package/dist/tooltip/Tooltip.svelte.d.ts +1 -1
  154. package/dist/typography/anchor/A.svelte +1 -1
  155. package/dist/typography/anchor/A.svelte.d.ts +1 -1
  156. package/dist/typography/blockquote/Blockquote.svelte +1 -1
  157. package/dist/typography/blockquote/Blockquote.svelte.d.ts +1 -1
  158. package/dist/typography/descriptionlist/DescriptionList.svelte +1 -1
  159. package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +1 -1
  160. package/dist/typography/heading/Heading.svelte +1 -1
  161. package/dist/typography/heading/Heading.svelte.d.ts +1 -1
  162. package/dist/typography/hr/Hr.svelte +1 -1
  163. package/dist/typography/hr/Hr.svelte.d.ts +1 -1
  164. package/dist/typography/img/EnhancedImg.svelte +1 -1
  165. package/dist/typography/img/EnhancedImg.svelte.d.ts +1 -1
  166. package/dist/typography/img/Img.svelte +1 -1
  167. package/dist/typography/img/Img.svelte.d.ts +1 -1
  168. package/dist/typography/layout/Layout.svelte +1 -1
  169. package/dist/typography/layout/Layout.svelte.d.ts +1 -1
  170. package/dist/typography/list/Li.svelte +1 -1
  171. package/dist/typography/list/Li.svelte.d.ts +1 -1
  172. package/dist/typography/list/List.svelte +1 -1
  173. package/dist/typography/list/List.svelte.d.ts +1 -1
  174. package/dist/typography/mark/Mark.svelte +1 -1
  175. package/dist/typography/mark/Mark.svelte.d.ts +1 -1
  176. package/dist/typography/paragraph/P.svelte +1 -1
  177. package/dist/typography/paragraph/P.svelte.d.ts +1 -1
  178. package/dist/typography/secondary/Secondary.svelte +1 -1
  179. package/dist/typography/secondary/Secondary.svelte.d.ts +1 -1
  180. package/dist/typography/span/Span.svelte +1 -1
  181. package/dist/typography/span/Span.svelte.d.ts +1 -1
  182. package/dist/utils/Arrow.svelte +1 -1
  183. package/dist/utils/Arrow.svelte.d.ts +1 -1
  184. package/dist/utils/CloseButton.svelte +11 -2
  185. package/dist/utils/CloseButton.svelte.d.ts +1 -1
  186. package/dist/utils/Popper.svelte +1 -1
  187. package/dist/utils/Popper.svelte.d.ts +1 -1
  188. package/dist/utils/dismissable.svelte.d.ts +9 -0
  189. package/dist/utils/dismissable.svelte.js +16 -0
  190. package/dist/video/Video.svelte +1 -1
  191. package/dist/video/Video.svelte.d.ts +1 -1
  192. package/package.json +1 -1
@@ -4,8 +4,9 @@
4
4
  import clsx from "clsx";
5
5
  import { type AlertProps, type ParamsType, CloseButton } from "..";
6
6
  import { getTheme } from "../theme/themeUtils";
7
+ import { createDismissableContext } from "../utils/dismissable.svelte";
7
8
 
8
- let { children, icon, alertStatus = $bindable(true), closeIcon: CloseIcon, color = "primary", rounded = true, border, class: className, dismissable, transition = fade, params, onclick = () => (alertStatus = false), ...restProps }: AlertProps = $props();
9
+ let { children, icon, alertStatus = $bindable(true), closeIcon: CloseIcon, color = "primary", rounded = true, border, class: className, dismissable, transition = fade, params, onclose, ...restProps }: AlertProps = $props();
9
10
 
10
11
  // Theme context
11
12
  const theme = getTheme("alert");
@@ -20,10 +21,20 @@
20
21
  class: clsx(theme, className)
21
22
  })
22
23
  );
24
+
25
+ let ref: HTMLDivElement | undefined = $state(undefined);
26
+
27
+ function close(event: MouseEvent) {
28
+ if (ref?.dispatchEvent(new Event("close", { bubbles: true, cancelable: true }))) {
29
+ alertStatus = false;
30
+ }
31
+ }
32
+
33
+ createDismissableContext(close);
23
34
  </script>
24
35
 
25
36
  {#if alertStatus}
26
- <div role="alert" {...restProps} transition:transition={params as ParamsType} class={divCls}>
37
+ <div role="alert" bind:this={ref} {...restProps} {onclose} transition:transition={params as ParamsType} class={divCls}>
27
38
  {#if icon}
28
39
  {@render icon()}
29
40
  {/if}
@@ -38,11 +49,11 @@
38
49
 
39
50
  {#if dismissable}
40
51
  {#if CloseIcon}
41
- <CloseButton class="-my-1.5 ms-auto -me-1.5 dark:hover:bg-gray-700" {color} ariaLabel="Remove alert" {onclick}>
52
+ <CloseButton class="-my-1.5 ms-auto -me-1.5" {color} ariaLabel="Remove alert">
42
53
  <CloseIcon />
43
54
  </CloseButton>
44
55
  {:else}
45
- <CloseButton class="-my-1.5 ms-auto -me-1.5 dark:hover:bg-gray-700" {color} ariaLabel="Remove alert" {onclick} />
56
+ <CloseButton class="-my-1.5 ms-auto -me-1.5" {color} ariaLabel="Remove alert" />
46
57
  {/if}
47
58
  {/if}
48
59
  </div>
@@ -65,6 +76,6 @@
65
76
  @prop dismissable
66
77
  @prop transition = fade
67
78
  @prop params
68
- @prop onclick = ()
79
+ @prop onclose
69
80
  @prop ...restProps
70
81
  -->
@@ -15,7 +15,7 @@ import { type AlertProps } from "..";
15
15
  * @prop dismissable
16
16
  * @prop transition = fade
17
17
  * @prop params
18
- * @prop onclick = ()
18
+ * @prop onclose
19
19
  * @prop ...restProps
20
20
  */
21
21
  declare const Alert: import("svelte").Component<AlertProps, {}, "alertStatus">;
@@ -4,6 +4,7 @@
4
4
  import clsx from "clsx";
5
5
  import { fade } from "svelte/transition";
6
6
  import { badge } from ".";
7
+ import { createDismissableContext } from "../utils/dismissable.svelte";
7
8
 
8
9
  let { children, icon, badgeStatus = $bindable(true), color = "primary", large = false, dismissable = false, class: className, classes, border, href, target, rounded, transition = fade, params, aClass, onclose, ...restProps }: BadgeProps = $props();
9
10
 
@@ -16,14 +17,19 @@
16
17
 
17
18
  const { base, linkClass } = $derived(badge({ color, size: large ? "large" : "small", rounded, border }));
18
19
 
20
+ let ref: HTMLDivElement | undefined = $state(undefined);
21
+
19
22
  const close = (ev: MouseEvent) => {
20
- onclose?.(ev);
21
- if (!ev.defaultPrevented) badgeStatus = false;
23
+ if (ref?.dispatchEvent(new Event("close", { bubbles: true, cancelable: true }))) {
24
+ badgeStatus = false;
25
+ }
22
26
  };
27
+
28
+ createDismissableContext(close);
23
29
  </script>
24
30
 
25
31
  {#if badgeStatus}
26
- <div {...restProps} transition:transition={params as ParamsType} class={base({ class: clsx(theme?.base, className) })}>
32
+ <div {...restProps} bind:this={ref} transition:transition={params as ParamsType} {onclose} class={base({ class: clsx(theme?.base, className) })}>
27
33
  {#if href}
28
34
  <a {href} {target} class={linkClass({ class: clsx(theme?.linkClass, styling.linkClass) })}>
29
35
  {@render children()}
@@ -34,12 +40,11 @@
34
40
 
35
41
  {#if dismissable}
36
42
  {#if icon}
37
- <button type="button" class="text-primary-500 hover:bg-primary-200 focus:ring-primary-400 dark:hover:bg-primary-800 dark:hover:text-primary-300 m-0.5 ms-1.5 -me-1.5 rounded-sm p-0.5 whitespace-normal focus:ring-1 focus:outline-hidden" aria-label="Remove badge" onclick={close}>
38
- <span class="sr-only">Remove badge</span>
43
+ <CloseButton class="ms-1.5 -me-1.5" {color} size={large ? "sm" : "xs"} ariaLabel="Remove badge">
39
44
  {@render icon()}
40
- </button>
45
+ </CloseButton>
41
46
  {:else}
42
- <CloseButton class="ms-1.5 -me-1.5" {color} size={large ? "sm" : "xs"} ariaLabel="Remove badge" onclick={close} />
47
+ <CloseButton class="ms-1.5 -me-1.5" {color} size={large ? "sm" : "xs"} ariaLabel="Remove badge" />
43
48
  {/if}
44
49
  {/if}
45
50
  </div>
@@ -4,8 +4,9 @@
4
4
  import clsx from "clsx";
5
5
  import { type ParamsType, type BannerProps, CloseButton } from "..";
6
6
  import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
7
+ import { createDismissableContext } from "../utils/dismissable.svelte";
7
8
 
8
- let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, classes, innerClass, transition = fade, params, closeClass, ...restProps }: BannerProps = $props();
9
+ let { children, header, open = $bindable(true), dismissable = true, color = "gray", type, class: className, classes, innerClass, transition = fade, params, closeClass, onclose, ...restProps }: BannerProps = $props();
9
10
 
10
11
  warnThemeDeprecation("Banner", { innerClass, closeClass }, { innerClass: "insideDiv", closeClass: "dismissable" });
11
12
 
@@ -15,24 +16,25 @@
15
16
  const theme = getTheme("banner");
16
17
 
17
18
  const { base, insideDiv, dismissable: dismissableClass } = $derived(banner({ type, color }));
19
+
20
+ let ref: HTMLDivElement | undefined = $state(undefined);
21
+ function close(event: MouseEvent) {
22
+ if (ref?.dispatchEvent(new Event("close", { bubbles: true, cancelable: true }))) {
23
+ open = false;
24
+ }
25
+ }
26
+ createDismissableContext(close);
18
27
  </script>
19
28
 
20
29
  {#if open}
21
- <div tabindex="-1" class={base({ class: clsx(theme?.base, className) })} {...restProps} transition:transition={params as ParamsType}>
30
+ <div tabindex="-1" bind:this={ref} {onclose} class={base({ class: clsx(theme?.base, className) })} {...restProps} transition:transition={params as ParamsType}>
22
31
  <div class={insideDiv({ class: clsx(theme?.insideDiv, styling.insideDiv) })}>
23
32
  {@render children?.()}
24
33
  </div>
25
34
 
26
35
  {#if dismissable}
27
36
  <div class="flex items-center justify-end">
28
- <CloseButton
29
- class={dismissableClass({ class: clsx(theme?.dismissable, styling.dismissable) })}
30
- {color}
31
- ariaLabel="Remove banner"
32
- onclick={() => {
33
- open = false;
34
- }}
35
- />
37
+ <CloseButton class={dismissableClass({ class: clsx(theme?.dismissable, styling.dismissable) })} {color} ariaLabel="Remove banner" />
36
38
  </div>
37
39
  {/if}
38
40
  </div>
@@ -56,5 +58,6 @@
56
58
  @prop transition = fade
57
59
  @prop params
58
60
  @prop closeClass
61
+ @prop onclose
59
62
  @prop ...restProps
60
63
  -->
@@ -16,6 +16,7 @@ import { type BannerProps } from "..";
16
16
  * @prop transition = fade
17
17
  * @prop params
18
18
  * @prop closeClass
19
+ * @prop onclose
19
20
  * @prop ...restProps
20
21
  */
21
22
  declare const Banner: import("svelte").Component<BannerProps, {}, "open">;
@@ -5,8 +5,9 @@
5
5
  import { sineIn } from "svelte/easing";
6
6
  import { drawer } from ".";
7
7
  import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
8
+ import { createDismissableContext } from "../utils/dismissable.svelte";
8
9
 
9
- let { children, hidden = $bindable(), closeDrawer = () => (hidden = true), activateClickOutside = true, position, width, backdrop = true, backdropClass, placement = "left", class: className, classes, transitionParams, transitionType = fly, bodyScrolling = false, ...restProps }: DrawerProps = $props();
10
+ let { children, hidden = $bindable(), activateClickOutside = true, position, width, backdrop = true, backdropClass, placement = "left", class: className, classes, transitionParams, transitionType = fly, bodyScrolling = false, onclose, ...restProps }: DrawerProps = $props();
10
11
 
11
12
  warnThemeDeprecation("Drawer", { backdropClass }, { backdropClass: "backdrop" });
12
13
  const styling = $derived(classes ?? { backdrop: backdropClass });
@@ -29,13 +30,21 @@
29
30
  let y = $derived(placement === "top" ? -100 : placement === "bottom" ? innerHeight + 100 : undefined);
30
31
 
31
32
  let transition_params = $derived(Object.assign({}, { x, y, duration: 200, easing: sineIn }));
33
+
34
+ let ref: HTMLDivElement | undefined = $state(undefined);
35
+ function close(ev: MouseEvent) {
36
+ if (ref?.dispatchEvent(new Event("close", { bubbles: true, cancelable: true }))) {
37
+ hidden = true;
38
+ }
39
+ }
40
+ createDismissableContext(close);
32
41
  </script>
33
42
 
34
43
  <svelte:window bind:innerWidth bind:innerHeight />
35
44
 
36
45
  {#if !hidden}
37
- <div role="presentation" class={backdropCls({ class: clsx(theme?.backdrop, styling.backdrop) })} onclick={activateClickOutside ? closeDrawer : undefined} style={bodyScrolling ? "pointer-events: none;" : ""}></div>
38
- <div use:trapFocus={{ onEscape: closeDrawer }} {...restProps} class={base({ class: clsx(theme?.base, className) })} transition:transitionType={transitionParams ? transitionParams : (transition_params as ParamsType)} tabindex="-1">
46
+ <div role="presentation" bind:this={ref} {onclose} class={backdropCls({ class: clsx(theme?.backdrop, styling.backdrop) })} onclick={activateClickOutside ? close : undefined} style={bodyScrolling ? "pointer-events: none;" : ""}></div>
47
+ <div use:trapFocus={{ onEscape: close as () => void }} {...restProps} class={base({ class: clsx(theme?.base, className) })} transition:transitionType={transitionParams ? transitionParams : (transition_params as ParamsType)} tabindex="-1">
39
48
  {@render children?.()}
40
49
  </div>
41
50
  {/if}
@@ -48,7 +57,6 @@
48
57
  ## Props
49
58
  @prop children
50
59
  @prop hidden = $bindable()
51
- @prop closeDrawer = ()
52
60
  @prop activateClickOutside = true
53
61
  @prop position
54
62
  @prop width
@@ -60,5 +68,6 @@
60
68
  @prop transitionParams
61
69
  @prop transitionType = fly
62
70
  @prop bodyScrolling = false
71
+ @prop onclose
63
72
  @prop ...restProps
64
73
  -->
@@ -6,7 +6,6 @@ import { type DrawerProps } from "..";
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop hidden = $bindable()
9
- * @prop closeDrawer = ()
10
9
  * @prop activateClickOutside = true
11
10
  * @prop position
12
11
  * @prop width
@@ -18,6 +17,7 @@ import { type DrawerProps } from "..";
18
17
  * @prop transitionParams
19
18
  * @prop transitionType = fly
20
19
  * @prop bodyScrolling = false
20
+ * @prop onclose
21
21
  * @prop ...restProps
22
22
  */
23
23
  declare const Drawer: import("svelte").Component<DrawerProps, {}, "hidden">;
@@ -3,6 +3,7 @@
3
3
  import clsx from "clsx";
4
4
  import { CloseButton, type FileuploadProps } from "../..";
5
5
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
6
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
6
7
 
7
8
  let { files = $bindable(), size = "md", clearable = false, elementRef = $bindable(), class: className, classes, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, wrapperClass, ...restProps }: FileuploadProps = $props();
8
9
 
@@ -20,12 +21,14 @@
20
21
  }
21
22
  if (clearableOnClick) clearableOnClick();
22
23
  };
24
+
25
+ createDismissableContext(clearAll);
23
26
  </script>
24
27
 
25
28
  <div class={wrapper({ class: clsx(theme?.wrapper, styling.wrapper) })}>
26
29
  <input type="file" bind:files bind:this={elementRef} {...restProps} class={base({ size, class: clsx(theme?.base, className) })} />
27
30
  {#if files && files.length > 0 && clearable}
28
- <CloseButton onclick={clearAll} class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear selected files" svgClass={clsx(styling.svg)} />
31
+ <CloseButton class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear selected files" svgClass={clsx(styling.svg)} />
29
32
  {/if}
30
33
  </div>
31
34
 
@@ -4,6 +4,7 @@
4
4
  import clsx from "clsx";
5
5
  import { type FloatingLabelInputProps, CloseButton } from "../..";
6
6
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
7
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
7
8
 
8
9
  let { children, id = idGenerator(), value = $bindable(), elementRef = $bindable(), "aria-describedby": ariaDescribedby, variant = "standard", size = "default", color = "default", class: className, classes, inputClass, labelClass, clearable, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, data = [], maxSuggestions = 5, onSelect, comboClass, ...restProps }: FloatingLabelInputProps = $props();
9
10
 
@@ -134,6 +135,8 @@
134
135
  selectedIndex = -1;
135
136
  elementRef?.focus();
136
137
  }
138
+
139
+ createDismissableContext(clearAll);
137
140
  </script>
138
141
 
139
142
  {#if clearable}
@@ -143,7 +146,7 @@
143
146
  <div class={base({ class: clsx(isCombobox ? "relative" : "", theme?.base, className) })}>
144
147
  <input {id} placeholder=" " bind:value bind:this={elementRef} {...restProps} aria-describedby={ariaDescribedby} class={input({ class: clsx(theme?.input, styling.input) })} oninput={handleInput} onfocus={handleFocus} onblur={handleBlur} onkeydown={handleKeydown} />
145
148
  {#if value !== undefined && value !== "" && clearable}
146
- <CloseButton onclick={clearAll} class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
149
+ <CloseButton class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
147
150
  {/if}
148
151
  <label for={id} class={label({ class: clsx(theme?.label, styling.label) })}>
149
152
  {@render children()}
@@ -4,6 +4,7 @@
4
4
  import { CloseButton, type SizeType, type InputProps, type InputValue } from "../..";
5
5
  import { input, clampSize } from ".";
6
6
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
7
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
7
8
 
8
9
  let { children, left, right, value = $bindable(), elementRef = $bindable(), clearable = false, size, color = "default", class: className, classes, wrapperClass, leftClass, rightClass, divClass, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, data = [], maxSuggestions = 5, onSelect, comboClass, comboItemClass, onInput, onFocus, onBlur, onKeydown, oninput, onfocus, onblur, onkeydown, ...restProps }: InputProps<InputValue> = $props();
9
10
 
@@ -56,6 +57,8 @@
56
57
  if (clearableOnClick) clearableOnClick();
57
58
  };
58
59
 
60
+ createDismissableContext(clearAll);
61
+
59
62
  // Combobox functionality
60
63
  let isFocused = $state(false);
61
64
  let filteredSuggestions: string[] = $state([]);
@@ -254,7 +257,7 @@
254
257
  {:else}
255
258
  <input {...restProps} bind:value bind:this={elementRef} oninput={handleInput} onfocus={handleFocus} onblur={handleBlur} onkeydown={handleKeydown} class={inputCls({ class: clsx(theme?.input, className) })} />
256
259
  {#if value !== undefined && value !== "" && clearable}
257
- <CloseButton onclick={clearAll} class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
260
+ <CloseButton class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
258
261
  {/if}
259
262
  {/if}
260
263
  {#if right}
@@ -3,6 +3,7 @@
3
3
  import clsx from "clsx";
4
4
  import { CloseButton, type SearchProps } from "../..";
5
5
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
6
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
6
7
 
7
8
  let { children, inputClass, size, placeholder = "Search", value = $bindable(), elementRef = $bindable(), clearable = false, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, class: className, classes, ...restProps }: SearchProps = $props();
8
9
 
@@ -20,6 +21,8 @@
20
21
  }
21
22
  if (clearableOnClick) clearableOnClick();
22
23
  };
24
+
25
+ createDismissableContext(clearAll);
23
26
  </script>
24
27
 
25
28
  <div class={base({ class: clsx(theme?.base, className) })}>
@@ -35,7 +38,7 @@
35
38
  </div>
36
39
  {/if}
37
40
  {#if value !== undefined && value !== "" && clearable}
38
- <CloseButton onclick={clearAll} class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
41
+ <CloseButton class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
39
42
  {/if}
40
43
  </div>
41
44
 
@@ -4,6 +4,7 @@
4
4
  import { multiSelect } from ".";
5
5
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
6
6
  import { onMount } from "svelte";
7
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
7
8
 
8
9
  // Consider reusing that component - https://svelecte.vercel.app/
9
10
 
@@ -74,6 +75,8 @@
74
75
  }
75
76
  };
76
77
 
78
+ createDismissableContext(clearAll);
79
+
77
80
  const clearThisOption = (select: SelectOptionType<any>) => {
78
81
  if (disabled) return;
79
82
 
@@ -216,7 +219,7 @@
216
219
  </span>
217
220
  <div class="ms-auto flex items-center gap-2">
218
221
  {#if selectItems.length}
219
- <CloseButton {size} onclick={clearAll} color="none" class={close({ class: clsx(theme?.close, classes?.close) })} {disabled} />
222
+ <CloseButton {size} color="none" class={close({ class: clsx(theme?.close, classes?.close) })} {disabled} />
220
223
  {/if}
221
224
 
222
225
  <svg class={clsx(svg(), disabled && "cursor-not-allowed", classes?.svg)} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
@@ -3,6 +3,7 @@
3
3
  import clsx from "clsx";
4
4
  import { type SelectProps, CloseButton } from "../..";
5
5
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
6
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
6
7
 
7
8
  let { children, items, value = $bindable(), elementRef = $bindable(), underline, size = "md", disabled, placeholder = "Choose option ...", clearable, clearableColor = "none", clearableOnClick, onClear, clearableSvgClass, clearableClass, selectClass, class: className, classes, ...restProps }: SelectProps<T> = $props();
8
9
 
@@ -29,6 +30,8 @@
29
30
  // remove this in next major version
30
31
  if (clearableOnClick) clearableOnClick();
31
32
  };
33
+
34
+ createDismissableContext(clearAll);
32
35
  </script>
33
36
 
34
37
  <div class={base({ class: clsx(theme?.base, className) })}>
@@ -48,6 +51,6 @@
48
51
  {/if}
49
52
  </select>
50
53
  {#if value !== undefined && value !== "" && clearable}
51
- <CloseButton onclick={clearAll} class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} {disabled} />
54
+ <CloseButton class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} {disabled} />
52
55
  {/if}
53
56
  </div>
@@ -3,6 +3,7 @@
3
3
  import clsx from "clsx";
4
4
  import { type TextareaProps, CloseButton } from "../..";
5
5
  import { getTheme, warnThemeDeprecation } from "../../theme/themeUtils";
6
+ import { createDismissableContext } from "../../utils/dismissable.svelte";
6
7
 
7
8
  let { header, footer, addon, value = $bindable(), elementRef = $bindable(), divClass, innerClass, headerClass, footerClass, addonClass, disabled, class: className, classes, clearable, clearableSvgClass, clearableColor = "none", clearableClass, clearableOnClick, textareaClass, ...restProps }: TextareaProps = $props();
8
9
 
@@ -36,6 +37,8 @@
36
37
  }
37
38
  if (clearableOnClick) clearableOnClick();
38
39
  };
40
+
41
+ createDismissableContext(clearAll);
39
42
  </script>
40
43
 
41
44
  <div class={div({ class: clsx(theme?.div, styling.div) })}>
@@ -64,7 +67,7 @@
64
67
  </div>
65
68
  {/if}
66
69
  {#if value !== undefined && value !== "" && clearable}
67
- <CloseButton onclick={clearAll} class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
70
+ <CloseButton class={close({ class: clsx(theme?.close, styling.close) })} color={clearableColor} aria-label="Clear search value" svgClass={clsx(styling.svg)} />
68
71
  {/if}
69
72
  </div>
70
73
 
@@ -5,6 +5,7 @@
5
5
  import { fade } from "svelte/transition";
6
6
  import { modal as modalStyle } from ".";
7
7
  import { getTheme, warnThemeDeprecation } from "../theme/themeUtils";
8
+ import { createDismissableContext } from "../utils/dismissable.svelte";
8
9
 
9
10
  let { children, onaction = () => true, oncancel, onsubmit, ontoggle, form = false, modal = true, autoclose = false, focustrap = false, header, footer, title, open = $bindable(false), permanent = false, dismissable = true, closeBtnClass, headerClass, bodyClass, footerClass, outsideclose = true, size = "md", placement, class: className, classes, params, transition = fade, fullscreen = false, ...restProps }: ModalProps = $props();
10
11
 
@@ -83,7 +84,19 @@
83
84
  }
84
85
 
85
86
  const focusTrap = (node: HTMLElement) => (focustrap ? trapFocus(node) : undefined);
86
- const close_handler = (pred: boolean) => (pred ? undefined : () => (open = false));
87
+
88
+ let ref: HTMLDialogElement | undefined = $state(undefined);
89
+
90
+ function close_handler(ev: MouseEvent) {
91
+ if (form) {
92
+ // dialog/form mechanism will close the dialog
93
+ return;
94
+ }
95
+
96
+ ref?.dispatchEvent(new Event("cancel", { bubbles: true, cancelable: true }));
97
+ }
98
+
99
+ createDismissableContext(close_handler);
87
100
  </script>
88
101
 
89
102
  {#snippet content()}
@@ -92,7 +105,7 @@
92
105
  {#if title}
93
106
  <h3>{title}</h3>
94
107
  {#if dismissable && !permanent}
95
- <CloseButton type="submit" formnovalidate onclick={close_handler(form)} class={clsx(styling.close)} />
108
+ <CloseButton type="submit" formnovalidate class={clsx(styling.close)} />
96
109
  {/if}
97
110
  {:else if header}
98
111
  {@render header()}
@@ -108,12 +121,12 @@
108
121
  </div>
109
122
  {/if}
110
123
  {#if dismissable && !permanent && !title}
111
- <CloseButton type="submit" formnovalidate onclick={close_handler(form)} class={closeCls({ class: clsx(theme?.close, styling.close) })} />
124
+ <CloseButton type="submit" formnovalidate class={closeCls({ class: clsx(theme?.close, styling.close) })} />
112
125
  {/if}
113
126
  {/snippet}
114
127
 
115
128
  {#if open}
116
- <dialog {@attach init} use:focusTrap class={base({ fullscreen, class: clsx(theme?.base, className) })} tabindex="-1" onsubmit={_onsubmit} oncancel={_oncancel} onclick={_onclick} ontoggle={_ontoggle} transition:transition|global={paramsOptions as ParamsType} {...restProps}>
129
+ <dialog {@attach init} bind:this={ref} use:focusTrap class={base({ fullscreen, class: clsx(theme?.base, className) })} tabindex="-1" onsubmit={_onsubmit} oncancel={_oncancel} onclick={_onclick} ontoggle={_ontoggle} transition:transition|global={paramsOptions as ParamsType} {...restProps}>
117
130
  {#if form}
118
131
  <form method="dialog" class={formCls({ class: clsx(theme?.form) })}>
119
132
  {@render content()}
@@ -33,7 +33,7 @@
33
33
  @component
34
34
  [Go to docs](https://flowbite-svelte.com/)
35
35
  ## Type
36
- [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1079)
36
+ [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1078)
37
37
  ## Props
38
38
  @prop size = "24"
39
39
  @prop color = "currentColor"
@@ -2,7 +2,7 @@ import type { MenuProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1079)
5
+ * [MenuProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1078)
6
6
  * ## Props
7
7
  * @prop size = "24"
8
8
  * @prop color = "currentColor"
@@ -17,7 +17,7 @@
17
17
  @component
18
18
  [Go to docs](https://flowbite-svelte.com/)
19
19
  ## Type
20
- [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1099)
20
+ [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1098)
21
21
  ## Props
22
22
  @prop children
23
23
  @prop class: className
@@ -2,7 +2,7 @@ import type { NavBrandProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1099)
5
+ * [NavBrandProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1098)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop class: className
@@ -17,7 +17,7 @@
17
17
  @component
18
18
  [Go to docs](https://flowbite-svelte.com/)
19
19
  ## Type
20
- [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1101)
20
+ [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1100)
21
21
  ## Props
22
22
  @prop children
23
23
  @prop fluid
@@ -2,7 +2,7 @@ import type { NavContainerProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1101)
5
+ * [NavContainerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1100)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop fluid
@@ -31,7 +31,7 @@
31
31
  @component
32
32
  [Go to docs](https://flowbite-svelte.com/)
33
33
  ## Type
34
- [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1105)
34
+ [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1104)
35
35
  ## Props
36
36
  @prop children
37
37
  @prop onclick
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * [Go to docs](https://flowbite-svelte.com/)
3
3
  * ## Type
4
- * [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1105)
4
+ * [NavHamburgerProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1104)
5
5
  * ## Props
6
6
  * @prop children
7
7
  * @prop onclick
@@ -38,7 +38,7 @@
38
38
  @component
39
39
  [Go to docs](https://flowbite-svelte.com/)
40
40
  ## Type
41
- [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1126)
41
+ [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1125)
42
42
  ## Props
43
43
  @prop children
44
44
  @prop activeClass
@@ -2,7 +2,7 @@ import type { NavLiProps } from "../types";
2
2
  /**
3
3
  * [Go to docs](https://flowbite-svelte.com/)
4
4
  * ## Type
5
- * [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1126)
5
+ * [NavLiProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1125)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop activeClass
@@ -77,7 +77,7 @@
77
77
  @component
78
78
  [Go to docs](https://flowbite-svelte.com/)
79
79
  ## Type
80
- [NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1111)
80
+ [NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1110)
81
81
  ## Props
82
82
  @prop children
83
83
  @prop activeUrl
@@ -2,7 +2,7 @@ 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#L1111)
5
+ * [NavUlProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1110)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop activeUrl
@@ -45,7 +45,7 @@
45
45
  @component
46
46
  [Go to docs](https://flowbite-svelte.com/)
47
47
  ## Type
48
- [NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1092)
48
+ [NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1091)
49
49
  ## Props
50
50
  @prop children
51
51
  @prop fluid
@@ -2,7 +2,7 @@ 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#L1092)
5
+ * [NavbarProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1091)
6
6
  * ## Props
7
7
  * @prop children
8
8
  * @prop fluid
@@ -54,7 +54,7 @@
54
54
  @component
55
55
  [Go to docs](https://flowbite-svelte.com/)
56
56
  ## Type
57
- [PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1191)
57
+ [PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1190)
58
58
  ## Props
59
59
  @prop pages = []
60
60
  @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#L1191)
5
+ * [PaginationProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1190)
6
6
  * ## Props
7
7
  * @prop pages = []
8
8
  * @prop previous