flowbite-svelte 0.48.2 → 0.48.4

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.
@@ -11,6 +11,7 @@ export let href = "";
11
11
  export let rounded = false;
12
12
  export let transition = fade;
13
13
  export let params = {};
14
+ export let tag = "div";
14
15
  let badgeStatus = true;
15
16
  const colors = {
16
17
  primary: "bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-300",
@@ -57,7 +58,7 @@ $: badgeClass = twMerge(baseClass, large ? "text-sm" : "text-xs", border ? `bord
57
58
  </script>
58
59
 
59
60
  {#if badgeStatus}
60
- <div {...$$restProps} transition:transition={params} class={badgeClass} on:close>
61
+ <svelte:element this={tag} {...$$restProps} transition:transition={params} class={badgeClass} on:close>
61
62
  {#if href}
62
63
  <a {href}>
63
64
  <slot></slot>
@@ -78,7 +79,7 @@ $: badgeClass = twMerge(baseClass, large ? "text-sm" : "text-xs", border ? `bord
78
79
  }} />
79
80
  </slot>
80
81
  {/if}
81
- </div>
82
+ </svelte:element>
82
83
  {/if}
83
84
 
84
85
  <!--
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  rounded?: boolean;
13
13
  transition?: (node: HTMLElement, params: any) => TransitionConfig;
14
14
  params?: object;
15
+ tag?: string;
15
16
  };
16
17
  events: {
17
18
  close: CustomEvent<any>;
@@ -10,6 +10,7 @@ declare const __propDef: {
10
10
  floatClass?: string;
11
11
  classLeft?: string;
12
12
  classRight?: string;
13
+ wrapperClass?: string;
13
14
  } & {
14
15
  files?: FileList | undefined;
15
16
  inputClass?: string;
@@ -16,6 +16,7 @@ export let color = "base";
16
16
  export let floatClass = "flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400";
17
17
  export let classLeft = "";
18
18
  export let classRight = "";
19
+ export let wrapperClass = "relative w-auto";
19
20
  const dispatcher = createEventDispatcher();
20
21
  const borderClasses = {
21
22
  base: "border border-gray-300 dark:border-gray-600",
@@ -53,7 +54,7 @@ const clearAll = (e) => {
53
54
  };
54
55
  </script>
55
56
 
56
- <Wrapper class="relative w-full" show={$$slots.left || $$slots.right || clearable}>
57
+ <Wrapper class={wrapperClass} show={$$slots.left || $$slots.right || !!clearable}>
57
58
  {#if $$slots.left}
58
59
  <div class="{twMerge(floatClass, classLeft)} start-0 ps-2.5 pointer-events-none">
59
60
  <slot name="left" />
@@ -63,12 +64,12 @@ const clearAll = (e) => {
63
64
  <input {...$$restProps} bind:value on:blur on:change on:click on:contextmenu on:focus on:keydown on:keypress on:keyup on:mouseover on:mouseenter on:mouseleave on:paste on:input {...{ type }} class={inputClass} />
64
65
  </slot>
65
66
  {#if $$slots.right}
66
- <div class="{twMerge(floatClass, classRight)} end-0 pe-2.5">
67
- <slot name="right"></slot>
68
- </div>
67
+ <div class="{twMerge(floatClass, classRight)} end-0 pe-2.5">
68
+ <slot name="right"></slot>
69
+ </div>
69
70
  {/if}
70
71
  {#if clearable && value && `${value}`.length > 0}
71
- <CloseButton {size} on:click={clearAll} color="none" class=" {twMerge(floatClass, classRight)} focus:ring-0 end-1 focus:ring-gray-400 dark:text-white" />
72
+ <CloseButton {size} on:click={clearAll} color="none" class="{twMerge(floatClass, classRight)} focus:ring-0 end-1" tabindex={-1} />
72
73
  {/if}
73
74
  </Wrapper>
74
75
 
@@ -14,6 +14,7 @@ declare const __propDef: {
14
14
  floatClass?: string;
15
15
  classLeft?: string;
16
16
  classRight?: string;
17
+ wrapperClass?: string;
17
18
  };
18
19
  events: {
19
20
  blur: FocusEvent;
@@ -10,6 +10,7 @@ declare const __propDef: {
10
10
  floatClass?: string;
11
11
  classLeft?: string;
12
12
  classRight?: string;
13
+ wrapperClass?: string;
13
14
  } & {
14
15
  value?: number;
15
16
  };
@@ -11,6 +11,7 @@ declare const __propDef: {
11
11
  floatClass?: string;
12
12
  classLeft?: string;
13
13
  classRight?: string;
14
+ wrapperClass?: string;
14
15
  } & {
15
16
  size?: FormSizeType;
16
17
  placeholder?: string;
@@ -10,7 +10,7 @@ let ulCls;
10
10
  $: ulCls = twMerge(ulClass, full && $$slots.extra ? "grid-cols-2" : "grid-cols-2 md:grid-cols-3", "text-sm font-medium", full && $$slots.extra && "md:w-2/3", $$props.classUl);
11
11
  </script>
12
12
 
13
- <Popper color={full ? 'default' : 'dropdown'} border={!full} rounded-sm={!full} activeContent arrow={false} trigger="click" placement="bottom" yOnly={full} {...$$restProps} class={wrapperClass} on:show bind:open>
13
+ <Popper color={full ? 'default' : 'dropdown'} border={!full} rounded={!full} activeContent arrow={false} trigger="click" placement="bottom" yOnly={full} {...$$restProps} class={wrapperClass} on:show bind:open>
14
14
  <div class="flex flex-col md:flex-row p-4 max-w-(--breakpoint-md) justify-center mx-auto mt-2">
15
15
  <ul class={ulCls}>
16
16
  {#each items as item, index}
@@ -2,7 +2,7 @@
2
2
  import { getContext } from "svelte";
3
3
  export let color = getContext("color");
4
4
  const colors = {
5
- default: "bg-white dark:bg-gray-800 dark:border-gray-700",
5
+ default: "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",
6
6
  blue: "bg-blue-500 border-blue-400",
7
7
  green: "bg-green-500 border-green-400",
8
8
  red: "bg-red-500 border-red-400",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.48.2",
3
+ "version": "0.48.4",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "dist/index.js",
6
6
  "packageManager": "pnpm@8.15.4",