flowbite-svelte 0.46.14 → 0.46.15

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.
@@ -2,6 +2,7 @@
2
2
  import { getContext, onMount } from "svelte";
3
3
  import { writable } from "svelte/store";
4
4
  import { fade, blur, fly, slide } from "svelte/transition";
5
+ export let tag = "h2";
5
6
  export let open = false;
6
7
  export let activeClass = void 0;
7
8
  export let inactiveClass = void 0;
@@ -47,7 +48,7 @@ $: buttonClass = twMerge([defaultClass, ctx.flush || borderClass, borderBottomCl
47
48
  $: contentClass = twMerge([ctx.flush ? paddingFlush : paddingDefault, ctx.flush ? "" : borderOpenClass, borderBottomClass, borderSharedClass]);
48
49
  </script>
49
50
 
50
- <h2 class="group">
51
+ <svelte:element this={tag} class="group">
51
52
  <button on:click={handleToggle} type="button" class={buttonClass} aria-expanded={open}>
52
53
  <slot name="header" />
53
54
  {#if open}
@@ -64,7 +65,7 @@ $: contentClass = twMerge([ctx.flush ? paddingFlush : paddingDefault, ctx.flush
64
65
  </slot>
65
66
  {/if}
66
67
  </button>
67
- </h2>
68
+ </svelte:element>
68
69
  {#if open}
69
70
  <div transition:multiple={transitionParams}>
70
71
  <div class={contentClass}>
@@ -77,6 +78,7 @@ $: contentClass = twMerge([ctx.flush ? paddingFlush : paddingDefault, ctx.flush
77
78
  @component
78
79
  [Go to docs](https://flowbite-svelte.com/)
79
80
  ## Props
81
+ @prop export let tag: string = 'h2';
80
82
  @prop export let open: boolean = false;
81
83
  @prop export let activeClass: string | undefined = undefined;
82
84
  @prop export let inactiveClass: string | undefined = undefined;
@@ -3,6 +3,7 @@ import type { TransitionTypes, TransitionParamTypes } from '../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
+ tag?: string;
6
7
  open?: boolean;
7
8
  activeClass?: string | undefined;
8
9
  inactiveClass?: string | undefined;
@@ -36,6 +37,7 @@ export type AccordionItemSlots = typeof __propDef.slots;
36
37
  /**
37
38
  * [Go to docs](https://flowbite-svelte.com/)
38
39
  * ## Props
40
+ * @prop export let tag: string = 'h2';
39
41
  * @prop export let open: boolean = false;
40
42
  * @prop export let activeClass: string | undefined = undefined;
41
43
  * @prop export let inactiveClass: string | undefined = undefined;
@@ -42,5 +42,5 @@ let background = getContext("background");
42
42
  @prop export let checked: boolean | undefined = undefined;
43
43
  @prop export let spacing: string = $$slots.default ? 'me-2' : '';
44
44
  @prop export let groupLabelClass: string = '';
45
- @prop export let groupInputClass: strixng = '';
45
+ @prop export let groupInputClass: string = '';
46
46
  -->
@@ -14,7 +14,7 @@ declare const __propDef: {
14
14
  checked?: boolean | undefined;
15
15
  spacing?: string;
16
16
  groupLabelClass?: string;
17
- groupInputClass?: any;
17
+ groupInputClass?: string;
18
18
  };
19
19
  events: {
20
20
  keyup: KeyboardEvent;
@@ -51,7 +51,7 @@ export type CheckboxSlots = typeof __propDef.slots;
51
51
  * @prop export let checked: boolean | undefined = undefined;
52
52
  * @prop export let spacing: string = $$slots.default ? 'me-2' : '';
53
53
  * @prop export let groupLabelClass: string = '';
54
- * @prop export let groupInputClass: strixng = '';
54
+ * @prop export let groupInputClass: string = '';
55
55
  */
56
56
  export default class Checkbox extends SvelteComponentTyped<CheckboxProps, CheckboxEvents, CheckboxSlots> {
57
57
  }
@@ -13,10 +13,10 @@ export let defaultClass = "block w-full disabled:cursor-not-allowed disabled:opa
13
13
  export let color = "base";
14
14
  export let floatClass = "flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400";
15
15
  const borderClasses = {
16
- base: "border-gray-300 dark:border-gray-600",
17
- tinted: "border-gray-300 dark:border-gray-500",
18
- green: "border-green-500 dark:border-green-400",
19
- red: "border-red-500 dark:border-red-400"
16
+ base: "border border-gray-300 dark:border-gray-600",
17
+ tinted: "border border-gray-300 dark:border-gray-500",
18
+ green: "border border-green-500 dark:border-green-400",
19
+ red: "border border-red-500 dark:border-red-400"
20
20
  };
21
21
  const ringClasses = {
22
22
  base: "focus:border-primary-500 focus:ring-primary-500 dark:focus:border-primary-500 dark:focus:ring-primary-500",
@@ -1,4 +1,5 @@
1
- <script>import { fade } from "svelte/transition";
1
+ <script>import { createEventDispatcher } from "svelte";
2
+ import { fade } from "svelte/transition";
2
3
  import { twMerge } from "tailwind-merge";
3
4
  import { CloseButton } from "..";
4
5
  export let dismissable = true;
@@ -11,6 +12,7 @@ export let align = true;
11
12
  export let transition = fade;
12
13
  export let params = {};
13
14
  export let toastStatus = true;
15
+ const dispatch = createEventDispatcher();
14
16
  const positions = {
15
17
  "top-left": "absolute top-5 start-5",
16
18
  "top-right": "absolute top-5 end-5",
@@ -69,6 +71,7 @@ const clsBtnExtraClass = "ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:t
69
71
  {color}
70
72
  on:click={() => {
71
73
  toastStatus = false;
74
+ dispatch('close');
72
75
  }}
73
76
  />
74
77
  {/if}
@@ -16,6 +16,8 @@ declare const __propDef: {
16
16
  toastStatus?: boolean;
17
17
  };
18
18
  events: {
19
+ close: CustomEvent<any>;
20
+ } & {
19
21
  [evt: string]: CustomEvent<any>;
20
22
  };
21
23
  slots: {
package/dist/types.d.ts CHANGED
@@ -76,6 +76,7 @@ export interface GroupTimelineType {
76
76
  comment?: string | HTMLElement;
77
77
  }
78
78
  export interface ListGroupItemType {
79
+ name?: string;
79
80
  current?: boolean;
80
81
  disabled?: boolean;
81
82
  href?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.46.14",
3
+ "version": "0.46.15",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "dist/index.js",
6
6
  "author": {
@@ -28,7 +28,7 @@
28
28
  "eslint": "^9.6.0",
29
29
  "eslint-config-prettier": "^9.1.0",
30
30
  "eslint-plugin-svelte": "^2.41.0",
31
- "flowbite-svelte": "^0.46.14",
31
+ "flowbite-svelte": "^0.46.15",
32
32
  "flowbite-svelte-blocks": "^1.1.3",
33
33
  "flowbite-svelte-icons": "^1.6.1",
34
34
  "mdsvex": "^0.11.2",
@@ -53,7 +53,7 @@
53
53
  "vitest": "^1.6.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "svelte": "^3.55.1 || ^4.0.0"
56
+ "svelte": "^3.55.1 || ^4.0.0 || ^5.0.0"
57
57
  },
58
58
  "type": "module",
59
59
  "keywords": [