flowbite-svelte 0.26.24 → 0.26.26
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/CHANGELOG.md +21 -0
- package/alerts/Alert.svelte +11 -8
- package/alerts/Alert.svelte.d.ts +0 -3
- package/buttons/Button.svelte.d.ts +2 -2
- package/forms/FloatingLabelInput.svelte.d.ts +1 -1
- package/forms/Helper.svelte.d.ts +1 -1
- package/forms/Input.svelte.d.ts +1 -1
- package/forms/Label.svelte.d.ts +1 -1
- package/package.json +1 -1
- package/popover/Popover.svelte +1 -1
- package/sidebars/SidebarDropdownWrapper.svelte +12 -1
- package/sidebars/SidebarDropdownWrapper.svelte.d.ts +2 -0
- package/tables/Table.svelte.d.ts +1 -1
- package/tables/TableSearch.svelte.d.ts +1 -1
- package/tooltips/Tooltip.svelte +3 -1
- package/tooltips/Tooltip.svelte.d.ts +1 -1
- package/typography/List.svelte.d.ts +1 -1
- package/utils/Frame.svelte +12 -13
- package/utils/Frame.svelte.d.ts +2 -2
- package/utils/Popper.svelte +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.26.26](https://github.com/themesberg/flowbite-svelte/compare/v0.26.25...v0.26.26) (2022-09-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add $$slots.arrowdown and arrowup for user icons ([3fa53de](https://github.com/themesberg/flowbite-svelte/commit/3fa53de11239fe93e2ae9e28e5bdf3ee3ccc1f69))
|
|
11
|
+
* add ChevronUp to SidebarDropdownWrapper ([032d540](https://github.com/themesberg/flowbite-svelte/commit/032d540b347ab30ddcdcddff8c0963290ce0c904))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* alert more tweaks ([444b340](https://github.com/themesberg/flowbite-svelte/commit/444b340f3a211f02572675b94624da4ae5d90c63))
|
|
17
|
+
* alert tweaks ([0c93b3c](https://github.com/themesberg/flowbite-svelte/commit/0c93b3c27d8911cd4709f78c554f68e524cc06d4))
|
|
18
|
+
|
|
19
|
+
### [0.26.25](https://github.com/themesberg/flowbite-svelte/compare/v0.26.24...v0.26.25) (2022-09-19)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* tooltips/popovers ([d18721c](https://github.com/themesberg/flowbite-svelte/commit/d18721cc4229f5eb1f4dccbbd34dda65f6a07aac))
|
|
25
|
+
|
|
5
26
|
### [0.26.24](https://github.com/themesberg/flowbite-svelte/compare/v0.26.23...v0.26.24) (2022-09-19)
|
|
6
27
|
|
|
7
28
|
|
package/alerts/Alert.svelte
CHANGED
|
@@ -3,32 +3,35 @@ import { createEventDispatcher } from 'svelte';
|
|
|
3
3
|
import CloseButton from '../utils/CloseButton.svelte';
|
|
4
4
|
import Frame from '../utils/Frame.svelte';
|
|
5
5
|
const dispatch = createEventDispatcher();
|
|
6
|
-
export let color = 'blue';
|
|
7
6
|
export let dismissable = false;
|
|
8
|
-
export let rounded = true;
|
|
9
7
|
export let accent = false;
|
|
10
8
|
let hidden = false;
|
|
11
9
|
const handleHide = () => {
|
|
12
10
|
hidden = !hidden;
|
|
13
|
-
dispatch('handleAlert');
|
|
14
11
|
dispatch('close'); // preffered name
|
|
15
12
|
};
|
|
16
13
|
let divClass;
|
|
17
14
|
$: divClass = classNames('p-4 text-sm', accent && 'border-t-4 ', hidden && 'hidden', $$props.class);
|
|
15
|
+
$: {
|
|
16
|
+
// set default values
|
|
17
|
+
$$restProps.color = $$restProps.color ?? 'blue';
|
|
18
|
+
$$restProps.rounded = $$restProps.rounded ?? !accent;
|
|
19
|
+
}
|
|
18
20
|
</script>
|
|
19
21
|
|
|
20
|
-
<Frame {
|
|
21
|
-
<div class="flex items-center
|
|
22
|
+
<Frame {...$$restProps} class={divClass} role="alert">
|
|
23
|
+
<div class="flex items-center">
|
|
22
24
|
{#if $$slots.icon}
|
|
23
25
|
<slot name="icon" />
|
|
24
26
|
{/if}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
<div class:ml-3={$$slots.icon}>
|
|
28
|
+
<slot />
|
|
29
|
+
</div>
|
|
27
30
|
|
|
28
31
|
{#if dismissable}
|
|
29
32
|
<CloseButton
|
|
30
33
|
class="-mx-1.5 -my-1.5"
|
|
31
|
-
{color}
|
|
34
|
+
color={$$restProps.color}
|
|
32
35
|
on:click={handleHide}
|
|
33
36
|
on:click
|
|
34
37
|
on:change
|
package/alerts/Alert.svelte.d.ts
CHANGED
|
@@ -2,9 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
color?: "gray" | "blue" | "red" | "green" | "yellow" | "indigo" | "purple" | "pink" | "dark" | "custom" | undefined;
|
|
6
5
|
dismissable?: boolean | undefined;
|
|
7
|
-
rounded?: boolean | undefined;
|
|
8
6
|
accent?: boolean | undefined;
|
|
9
7
|
};
|
|
10
8
|
events: {
|
|
@@ -16,7 +14,6 @@ declare const __propDef: {
|
|
|
16
14
|
blur: CustomEvent<any>;
|
|
17
15
|
mouseenter: CustomEvent<any>;
|
|
18
16
|
mouseleave: CustomEvent<any>;
|
|
19
|
-
handleAlert: CustomEvent<any>;
|
|
20
17
|
close: CustomEvent<any>;
|
|
21
18
|
} & {
|
|
22
19
|
[evt: string]: CustomEvent<any>;
|
|
@@ -10,8 +10,8 @@ declare const __propDef: {
|
|
|
10
10
|
href?: string | undefined;
|
|
11
11
|
btnClass?: string | undefined;
|
|
12
12
|
type?: ButtonType | undefined;
|
|
13
|
-
color?: "blue" | "
|
|
14
|
-
shadow?: "blue" | "
|
|
13
|
+
color?: "blue" | "dark" | "light" | "green" | "red" | "yellow" | "purple" | "cyan" | "teal" | "lime" | "pink" | "alternative" | "purpleToBlue" | "cyanToBlue" | "greenToBlue" | "purpleToPink" | "pinkToOrange" | "tealToLime" | "redToYellow" | undefined;
|
|
14
|
+
shadow?: "blue" | "green" | "red" | "purple" | "cyan" | "teal" | "lime" | "pink" | null | undefined;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
17
|
click: MouseEvent;
|
|
@@ -7,7 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
style?: "filled" | "outlined" | "standard" | undefined;
|
|
8
8
|
type?: InputType | undefined;
|
|
9
9
|
size?: "default" | "small" | undefined;
|
|
10
|
-
color?: "
|
|
10
|
+
color?: "green" | "red" | "base" | undefined;
|
|
11
11
|
value?: string | undefined;
|
|
12
12
|
label?: string | undefined;
|
|
13
13
|
};
|
package/forms/Helper.svelte.d.ts
CHANGED
package/forms/Input.svelte.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | undefined;
|
|
9
9
|
inputClass?: string | undefined;
|
|
10
|
-
color?: "
|
|
10
|
+
color?: "green" | "red" | "base" | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
blur: FocusEvent;
|
package/forms/Label.svelte.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
color?: "
|
|
5
|
+
color?: "green" | "red" | "gray" | "disabled" | undefined;
|
|
6
6
|
defaultClass?: string | undefined;
|
|
7
7
|
show?: boolean | undefined;
|
|
8
8
|
};
|
package/package.json
CHANGED
package/popover/Popover.svelte
CHANGED
|
@@ -3,7 +3,7 @@ export let title = '';
|
|
|
3
3
|
export let defaultClass = 'py-2 px-3';
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
|
-
<Popper activeContent border shadow rounded {...$$restProps} class={$$props.class} on:show>
|
|
6
|
+
<Popper data-popover activeContent border shadow rounded {...$$restProps} class={$$props.class} on:show>
|
|
7
7
|
{#if $$slots.title || title}
|
|
8
8
|
<div
|
|
9
9
|
class="py-2 px-3 bg-gray-100 rounded-t-lg border-b border-gray-200 dark:border-gray-600 dark:bg-gray-700">
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { slide } from 'svelte/transition';
|
|
3
3
|
import { quintOut } from 'svelte/easing';
|
|
4
4
|
import ChevronDown from '../utils/ChevronDown.svelte';
|
|
5
|
+
import ChevronUp from '../utils/ChevronUp.svelte';
|
|
5
6
|
export let btnClass = 'flex items-center p-2 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700';
|
|
6
7
|
export let label = '';
|
|
7
8
|
export let spanClass = 'flex-1 ml-3 text-left whitespace-nowrap';
|
|
@@ -21,7 +22,17 @@ const handleDropdown = () => {
|
|
|
21
22
|
aria-controls="sidebar-dropdown">
|
|
22
23
|
<slot name="icon" />
|
|
23
24
|
<span class={spanClass} sidebar-toggle-item>{label}</span>
|
|
24
|
-
|
|
25
|
+
{#if isOpen}
|
|
26
|
+
{#if $$slots.arrowup}
|
|
27
|
+
<slot name="arrowup" />
|
|
28
|
+
{:else}
|
|
29
|
+
<ChevronUp />
|
|
30
|
+
{/if}
|
|
31
|
+
{:else if $$slots.arrowdown}
|
|
32
|
+
<slot name="arrowdown" />
|
|
33
|
+
{:else}
|
|
34
|
+
<ChevronDown />
|
|
35
|
+
{/if}
|
|
25
36
|
</button>
|
|
26
37
|
{#if isOpen}
|
|
27
38
|
<ul
|
package/tables/Table.svelte.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
hoverable?: boolean | undefined;
|
|
8
8
|
noborder?: boolean | undefined;
|
|
9
9
|
shadow?: boolean | undefined;
|
|
10
|
-
color?: "default" | "blue" | "
|
|
10
|
+
color?: "default" | "blue" | "green" | "red" | "yellow" | "purple" | "custom" | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -7,7 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
striped?: boolean | undefined;
|
|
8
8
|
hoverable?: boolean | undefined;
|
|
9
9
|
placeholder?: string | undefined;
|
|
10
|
-
color?: "default" | "blue" | "
|
|
10
|
+
color?: "default" | "blue" | "green" | "red" | "yellow" | "purple" | "custom" | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
package/tooltips/Tooltip.svelte
CHANGED
|
@@ -9,10 +9,12 @@ const colors = {
|
|
|
9
9
|
auto: 'border-gray-200 bg-white text-gray-900 dark:bg-gray-700 dark:text-white dark:border-gray-600 '
|
|
10
10
|
};
|
|
11
11
|
let toolTipClass;
|
|
12
|
-
$: toolTipClass = classNames(tipClass, colors[style], $$props.class);
|
|
12
|
+
$: toolTipClass = classNames("tooltip", tipClass, colors[style], $$props.class);
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<Popper
|
|
16
|
+
data-tooltip
|
|
17
|
+
activeContent
|
|
16
18
|
rounded
|
|
17
19
|
border
|
|
18
20
|
shadow
|
|
@@ -2,7 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
tag?: "
|
|
5
|
+
tag?: "dl" | "ol" | "ul" | undefined;
|
|
6
6
|
list?: "none" | "disc" | "decimal" | undefined;
|
|
7
7
|
position?: "inside" | "outside" | undefined;
|
|
8
8
|
color?: string | undefined;
|
package/utils/Frame.svelte
CHANGED
|
@@ -73,22 +73,21 @@ const borderColors = {
|
|
|
73
73
|
};
|
|
74
74
|
// have a custom transition function that returns the desired transition
|
|
75
75
|
let transitionFunc;
|
|
76
|
-
|
|
77
|
-
$: transitionFunc = transition ?? noop;
|
|
76
|
+
$: transitionFunc = transition ?? (() => ({}));
|
|
78
77
|
let divClass;
|
|
79
78
|
$: divClass = classNames(bgColors[color], textColors[color], rounded && 'rounded-lg ', border && 'border', borderColors[color], shadow && 'shadow-md', $$props.class);
|
|
80
79
|
</script>
|
|
81
80
|
|
|
82
81
|
<svelte:element
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
this={tag}
|
|
83
|
+
use:use={options}
|
|
84
|
+
bind:this={node}
|
|
85
|
+
transition:transitionFunc={params}
|
|
86
|
+
{...$$restProps}
|
|
87
|
+
class={divClass}
|
|
88
|
+
on:mouseenter
|
|
89
|
+
on:mouseleave
|
|
90
|
+
on:focusin
|
|
91
|
+
on:focusout>
|
|
92
|
+
<slot />
|
|
94
93
|
</svelte:element>
|
package/utils/Frame.svelte.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ import type { TransitionConfig } from 'svelte/transition';
|
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
tag?:
|
|
7
|
+
tag?: string | undefined;
|
|
8
8
|
color?: string | undefined;
|
|
9
9
|
rounded?: boolean | undefined;
|
|
10
10
|
border?: boolean | undefined;
|
|
11
11
|
shadow?: boolean | undefined;
|
|
12
|
-
transition?: ((node:
|
|
12
|
+
transition?: ((node: HTMLElement, params: any) => TransitionConfig) | undefined;
|
|
13
13
|
params?: object | undefined;
|
|
14
14
|
node?: HTMLElement | undefined;
|
|
15
15
|
use?: Action<HTMLElement, any, Record<never, any>> | undefined;
|
package/utils/Popper.svelte
CHANGED