flowbite-svelte 0.21.3 → 0.21.6
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 +28 -0
- package/alerts/Alert.svelte +3 -3
- package/avatar/Avatar.svelte +35 -19
- package/avatar/Avatar.svelte.d.ts +13 -5
- package/avatar/Dot.svelte +32 -0
- package/avatar/Dot.svelte.d.ts +22 -0
- package/avatar/Placeholder.svelte +15 -0
- package/avatar/Placeholder.svelte.d.ts +16 -0
- package/buttons/Button.svelte +5 -5
- package/forms/Fileupload.svelte +8 -9
- package/forms/Fileupload.svelte.d.ts +1 -4
- package/forms/FloatingLabelInput.svelte +1 -3
- package/forms/FloatingLabelInput.svelte.d.ts +1 -2
- package/forms/Input.svelte +0 -4
- package/forms/Radio.svelte +1 -1
- package/forms/Range.svelte +1 -5
- package/forms/Range.svelte.d.ts +0 -1
- package/forms/Search.svelte +14 -2
- package/forms/Select.svelte +2 -8
- package/forms/Select.svelte.d.ts +1 -4
- package/forms/SimpleSearch.svelte +1 -1
- package/forms/VoiceSearch.svelte +1 -1
- package/package.json +3 -1
- package/sidebars/Sidebar.svelte +1 -1
- package/sidebars/SidebarBrand.svelte +1 -1
- package/sidebars/SidebarCta.svelte +1 -1
- package/sidebars/SidebarDropdownItem.svelte +1 -1
- package/sidebars/SidebarDropdownWrapper.svelte +1 -1
- package/sidebars/SidebarGroup.svelte +1 -1
- package/sidebars/SidebarItem.svelte +1 -2
- package/sidebars/SidebarItem.svelte.d.ts +0 -1
- package/sidebars/SidebarWrapper.svelte +1 -1
- package/types.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.21.6](https://github.com/themesberg/flowbite-svelte/compare/v0.21.5...v0.21.6) (2022-07-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* links in form index ([1149aa2](https://github.com/themesberg/flowbite-svelte/commit/1149aa2f7411ceb9a3e29ce3c6c3d446634f09a9))
|
|
11
|
+
* sidebars and forms {...$$restProps} position updates ([d983225](https://github.com/themesberg/flowbite-svelte/commit/d983225a4e4c7526bf7bee3a7cd51ecc6035bba8))
|
|
12
|
+
|
|
13
|
+
### [0.21.5](https://github.com/themesberg/flowbite-svelte/compare/v0.21.4...v0.21.5) (2022-07-16)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* alerts more functions, changed API ([a2306fb](https://github.com/themesberg/flowbite-svelte/commit/a2306fb2a980a140da51f4f36ac299a5ce33c1c8))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* add href prop to jjagielka avatars and fix doc ([ea97577](https://github.com/themesberg/flowbite-svelte/commit/ea975779365d8a9d8b6fd2fe22e36d94636957f2))
|
|
24
|
+
* buttons - update sizes and force round ([22284ad](https://github.com/themesberg/flowbite-svelte/commit/22284ada79396136f8dce288de87112e74e6f82a))
|
|
25
|
+
|
|
26
|
+
### [0.21.4](https://github.com/themesberg/flowbite-svelte/compare/v0.21.3...v0.21.4) (2022-07-14)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* alerts dismissable button color ([779e863](https://github.com/themesberg/flowbite-svelte/commit/779e863a6b321ea84ae65484b05ed6cd7d73ccd9))
|
|
32
|
+
|
|
5
33
|
### [0.21.3](https://github.com/themesberg/flowbite-svelte/compare/v0.21.2...v0.21.3) (2022-07-14)
|
|
6
34
|
|
|
7
35
|
### [0.21.2](https://github.com/themesberg/flowbite-svelte/compare/v0.21.1...v0.21.2) (2022-07-13)
|
package/alerts/Alert.svelte
CHANGED
|
@@ -54,12 +54,12 @@ $: textColor = textColors[color] ?? textColors.blue;
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<div id={$$props.id} class:hidden class={divClass} role="alert">
|
|
57
|
-
<div class="flex items-center">
|
|
57
|
+
<div class="flex items-center {textColor}">
|
|
58
58
|
{#if icon}
|
|
59
|
-
<svelte:component this={icon} class="flex-shrink-0 w-5 h-5
|
|
59
|
+
<svelte:component this={icon} class="flex-shrink-0 w-5 h-5 mr-3" />
|
|
60
60
|
{/if}
|
|
61
61
|
|
|
62
|
-
<div class="text-sm
|
|
62
|
+
<div class="text-sm">
|
|
63
63
|
<slot />
|
|
64
64
|
</div>
|
|
65
65
|
|
package/avatar/Avatar.svelte
CHANGED
|
@@ -1,22 +1,38 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export let
|
|
5
|
-
export let
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
import AvatarPlaceholder from './Placeholder.svelte';
|
|
3
|
+
import Dot from './Dot.svelte';
|
|
4
|
+
export let src = '';
|
|
5
|
+
export let href = '#';
|
|
6
|
+
export let rounded = false;
|
|
7
|
+
export let border = false;
|
|
8
|
+
export let stacked = false;
|
|
9
|
+
export let dot = { top: false, color: 'bg-gray-300 dark:bg-gray-500' };
|
|
10
|
+
export let alt = '';
|
|
11
|
+
export let size = 'md';
|
|
12
|
+
// export let ring: string = 'ring-gray-300 dark:ring-gray-500';
|
|
13
|
+
const sizes = {
|
|
14
|
+
xs: 'w-6 h-6',
|
|
15
|
+
sm: 'w-8 h-8',
|
|
16
|
+
md: 'w-10 h-10',
|
|
17
|
+
lg: 'w-20 h-20',
|
|
18
|
+
xl: 'w-36 h-36'
|
|
19
|
+
};
|
|
20
|
+
let avatarClass;
|
|
21
|
+
$: avatarClass = classNames(rounded ? 'rounded' : 'rounded-full', border && 'p-1 ring-2 ring-gray-300 dark:ring-gray-500', sizes[size], stacked && 'border-2 -ml-4 border-white dark:border-gray-800', $$props.class);
|
|
6
22
|
</script>
|
|
7
23
|
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
<Dot show={$$props.dot} {rounded} {...dot} {size}>
|
|
25
|
+
{#if src}
|
|
26
|
+
<img class={avatarClass} {alt} {src} />
|
|
27
|
+
{:else if $$slots.default}
|
|
28
|
+
<a
|
|
29
|
+
class="flex justify-center items-center {avatarClass} text-xs font-medium text-white bg-gray-700 hover:bg-gray-600"
|
|
30
|
+
{href}
|
|
31
|
+
><slot />
|
|
32
|
+
</a>
|
|
33
|
+
{:else}
|
|
34
|
+
<div class={avatarClass}>
|
|
35
|
+
<AvatarPlaceholder {rounded} />
|
|
18
36
|
</div>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<img class={avatarClass} alt={avatar.alt} src={avatar.src} />
|
|
22
|
-
{/if}
|
|
37
|
+
{/if}
|
|
38
|
+
</Dot>
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DotType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
src?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
rounded?: boolean;
|
|
9
|
+
border?: boolean;
|
|
10
|
+
stacked?: boolean;
|
|
11
|
+
dot?: DotType;
|
|
12
|
+
alt?: string;
|
|
13
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
14
|
};
|
|
9
15
|
events: {
|
|
10
16
|
[evt: string]: CustomEvent<any>;
|
|
11
17
|
};
|
|
12
|
-
slots: {
|
|
18
|
+
slots: {
|
|
19
|
+
default: {};
|
|
20
|
+
};
|
|
13
21
|
};
|
|
14
22
|
export declare type AvatarProps = typeof __propDef.props;
|
|
15
23
|
export declare type AvatarEvents = typeof __propDef.events;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let show = false;
|
|
3
|
+
export let top = false;
|
|
4
|
+
export let color = 'bg-gray-300 dark:bg-gray-500';
|
|
5
|
+
export let rounded = false;
|
|
6
|
+
export let size = 'md';
|
|
7
|
+
const sizes = {
|
|
8
|
+
xs: 'w-2.5 h-2.5',
|
|
9
|
+
sm: 'w-3 h-3',
|
|
10
|
+
md: 'w-3.5 h-3.5',
|
|
11
|
+
lg: 'w-6 h-6',
|
|
12
|
+
xl: 'w-10 h-10'
|
|
13
|
+
};
|
|
14
|
+
const offsets = {
|
|
15
|
+
xs: ['left-4', 'left-5'],
|
|
16
|
+
sm: ['left-6', 'left-6'],
|
|
17
|
+
md: ['left-7', 'left-8'],
|
|
18
|
+
lg: ['left-14', 'left-16'],
|
|
19
|
+
xl: ['left-24', 'left-32']
|
|
20
|
+
};
|
|
21
|
+
let dotClass;
|
|
22
|
+
$: dotClass = classNames('absolute rounded-full border-white dark:border-gray-800 border-2', sizes[size], offsets[size][+rounded], top ? 'top-0' : 'bottom-0', rounded && top && 'transform -translate-y-1/2', rounded && !top && 'transform translate-y-1/4', color);
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
{#if show}
|
|
26
|
+
<div class="relative">
|
|
27
|
+
<slot />
|
|
28
|
+
<span class={dotClass} />
|
|
29
|
+
</div>
|
|
30
|
+
{:else}
|
|
31
|
+
<slot />
|
|
32
|
+
{/if}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
show?: boolean;
|
|
5
|
+
top?: boolean;
|
|
6
|
+
color?: string;
|
|
7
|
+
rounded?: boolean;
|
|
8
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare type DotProps = typeof __propDef.props;
|
|
18
|
+
export declare type DotEvents = typeof __propDef.events;
|
|
19
|
+
export declare type DotSlots = typeof __propDef.slots;
|
|
20
|
+
export default class Dot extends SvelteComponentTyped<DotProps, DotEvents, DotSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>export let rounded = false;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
class="text-gray-400 bg-gray-200 dark:bg-gray-600 {rounded ? 'rounded' : 'rounded-full'}"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
viewBox="0 0 16 16"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
fill-rule="evenodd"
|
|
12
|
+
d="M8 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
|
|
13
|
+
clip-rule="evenodd"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
rounded?: boolean;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export declare type PlaceholderProps = typeof __propDef.props;
|
|
12
|
+
export declare type PlaceholderEvents = typeof __propDef.events;
|
|
13
|
+
export declare type PlaceholderSlots = typeof __propDef.slots;
|
|
14
|
+
export default class Placeholder extends SvelteComponentTyped<PlaceholderProps, PlaceholderEvents, PlaceholderSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
package/buttons/Button.svelte
CHANGED
|
@@ -51,11 +51,11 @@ const outlineClasses = {
|
|
|
51
51
|
purple: 'text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 focus:ring-purple-300 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500 dark:focus:ring-purple-900'
|
|
52
52
|
};
|
|
53
53
|
const sizeClasses = {
|
|
54
|
-
xs: '
|
|
55
|
-
sm: '
|
|
56
|
-
md: '
|
|
57
|
-
lg: '
|
|
58
|
-
xl: '
|
|
54
|
+
xs: 'px-3 py-2 text-xs',
|
|
55
|
+
sm: 'px-3 py-2 text-sm',
|
|
56
|
+
md: 'px-5 py-2.5 text-sm',
|
|
57
|
+
lg: 'px-5 py-3 text-base',
|
|
58
|
+
xl: 'px-6 py-3.5 text-base'
|
|
59
59
|
};
|
|
60
60
|
let buttonClass;
|
|
61
61
|
$: buttonClass = classNames('group text-center font-medium focus:ring-4 focus:outline-none', outline && gradient ? 'p-0.5' : 'inline-flex items-center justify-center ' + sizeClasses[size], gradient ? gradientClasses[color] : outline ? outlineClasses[color] : colorClasses[color], pill ? 'rounded-full' : 'rounded-lg', shadow && coloredShadowClasses[shadow], $$props.disabled && 'cursor-not-allowed opacity-50', $$props.class);
|
package/forms/Fileupload.svelte
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script>export let value = '';
|
|
2
2
|
export let id = 'user_avatar';
|
|
3
|
-
export let label = 'Upload file';
|
|
4
|
-
export let labelClass = 'block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300" for="user_avatar';
|
|
5
3
|
export let inputClass = 'block w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 cursor-pointer dark:text-gray-400 focus:outline-none focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400';
|
|
6
|
-
export let divClass = 'mt-1 text-sm text-gray-500 dark:text-gray-300';
|
|
7
|
-
export let helper = '';
|
|
8
4
|
</script>
|
|
9
5
|
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
6
|
+
<input
|
|
7
|
+
{...$$restProps}
|
|
8
|
+
bind:value
|
|
9
|
+
class={inputClass}
|
|
10
|
+
aria-describedby="{id}_help"
|
|
11
|
+
{id}
|
|
12
|
+
type="file"
|
|
13
|
+
/>
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
+
[x: string]: any;
|
|
4
5
|
value?: string;
|
|
5
6
|
id?: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
labelClass?: string;
|
|
8
7
|
inputClass?: string;
|
|
9
|
-
divClass?: string;
|
|
10
|
-
helper?: string;
|
|
11
8
|
};
|
|
12
9
|
events: {
|
|
13
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
export let id = generateId();
|
|
3
3
|
export let type;
|
|
4
4
|
export let value = '';
|
|
5
|
-
export let name = '';
|
|
6
5
|
export let label = '';
|
|
7
|
-
export let required = false;
|
|
8
6
|
export let divClass = 'relative z-0 mb-6 w-full group';
|
|
9
7
|
export let inputClass = 'block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer';
|
|
10
8
|
export let labelClass = 'absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6';
|
|
@@ -14,6 +12,6 @@ function setType(node) {
|
|
|
14
12
|
</script>
|
|
15
13
|
|
|
16
14
|
<div class={divClass}>
|
|
17
|
-
<input bind:value use:setType
|
|
15
|
+
<input {...$$restProps} bind:value use:setType class={inputClass} placeholder=" " />
|
|
18
16
|
<label for={id} class={labelClass}>{label}</label>
|
|
19
17
|
</div>
|
|
@@ -2,12 +2,11 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { InputType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
id?: string;
|
|
6
7
|
type: InputType;
|
|
7
8
|
value?: string;
|
|
8
|
-
name?: string;
|
|
9
9
|
label?: string;
|
|
10
|
-
required?: boolean;
|
|
11
10
|
divClass?: string;
|
|
12
11
|
inputClass?: string;
|
|
13
12
|
labelClass?: string;
|
package/forms/Input.svelte
CHANGED
|
@@ -25,10 +25,6 @@ function setType(node) {
|
|
|
25
25
|
inputClass,
|
|
26
26
|
colorClasses[color],
|
|
27
27
|
{
|
|
28
|
-
// 'pl-10': icon !== null,
|
|
29
|
-
// 'rounded-lg': !($$slots.addon || addon),
|
|
30
|
-
// 'rounded-r-lg': $$slots.addon || addon,
|
|
31
|
-
// 'shadow-sm dark:shadow-sm-light': shadow,
|
|
32
28
|
'p-2 sm:text-xs': size === 'sm',
|
|
33
29
|
'p-2.5 text-sm': size === 'md',
|
|
34
30
|
'sm:text-md p-4': size === 'lg'
|
package/forms/Radio.svelte
CHANGED
|
@@ -42,6 +42,7 @@ else {
|
|
|
42
42
|
<div class="flex">
|
|
43
43
|
<div class={divHelperClass}>
|
|
44
44
|
<input
|
|
45
|
+
{...$$restProps}
|
|
45
46
|
bind:group
|
|
46
47
|
{id}
|
|
47
48
|
type="radio"
|
|
@@ -51,7 +52,6 @@ else {
|
|
|
51
52
|
aria-labelledby={id}
|
|
52
53
|
aria-describedby={id}
|
|
53
54
|
{disabled}
|
|
54
|
-
{...$$restProps}
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
<div class="ml-2 text-sm">
|
package/forms/Range.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>export let id = 'range';
|
|
2
|
-
export let label = 'Range';
|
|
3
2
|
export let min;
|
|
4
3
|
export let max;
|
|
5
4
|
export let value;
|
|
@@ -17,10 +16,8 @@ else {
|
|
|
17
16
|
}
|
|
18
17
|
</script>
|
|
19
18
|
|
|
20
|
-
<label for={id} class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
21
|
-
>{label}</label
|
|
22
|
-
>
|
|
23
19
|
<input
|
|
20
|
+
{...$$restProps}
|
|
24
21
|
{id}
|
|
25
22
|
name={id}
|
|
26
23
|
type="range"
|
|
@@ -29,5 +26,4 @@ else {
|
|
|
29
26
|
bind:value
|
|
30
27
|
{step}
|
|
31
28
|
class={inputClass}
|
|
32
|
-
{...$$restProps}
|
|
33
29
|
/>
|
package/forms/Range.svelte.d.ts
CHANGED
package/forms/Search.svelte
CHANGED
|
@@ -9,9 +9,21 @@ export let placeholder = 'Search';
|
|
|
9
9
|
<label for={id} class={labelClass}>Search</label>
|
|
10
10
|
<div class="relative">
|
|
11
11
|
<div class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
|
|
12
|
-
<svg
|
|
12
|
+
<svg
|
|
13
|
+
class="w-5 h-5 text-gray-500 dark:text-gray-400"
|
|
14
|
+
fill="none"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
><path
|
|
19
|
+
stroke-linecap="round"
|
|
20
|
+
stroke-linejoin="round"
|
|
21
|
+
stroke-width="2"
|
|
22
|
+
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
23
|
+
/></svg
|
|
24
|
+
>
|
|
13
25
|
</div>
|
|
14
|
-
<input type="search" {id} class={inputClass} {placeholder}
|
|
26
|
+
<input {...$$restProps} type="search" {id} class={inputClass} {placeholder} />
|
|
15
27
|
<button type="submit" class={btnClass}>Search</button>
|
|
16
28
|
</div>
|
|
17
29
|
</form>
|
package/forms/Select.svelte
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let value;
|
|
3
|
-
export let id = generateId();
|
|
4
|
-
export let name = '';
|
|
5
|
-
export let label = '';
|
|
6
|
-
export let labelClass = 'block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400';
|
|
1
|
+
<script>export let value;
|
|
7
2
|
export let selectClass = 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
|
|
8
3
|
</script>
|
|
9
4
|
|
|
10
|
-
<
|
|
11
|
-
<select bind:value {id} {name} class={selectClass} on:change>
|
|
5
|
+
<select {...$$restProps} bind:value class={selectClass} on:change>
|
|
12
6
|
<slot />
|
|
13
7
|
</select>
|
package/forms/Select.svelte.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export let placeholder = 'Search';
|
|
|
23
23
|
/></svg
|
|
24
24
|
>
|
|
25
25
|
</div>
|
|
26
|
-
<input type="text" {id} class={inputClass} {placeholder}
|
|
26
|
+
<input {...$$restProps} type="text" {id} class={inputClass} {placeholder} />
|
|
27
27
|
</div>
|
|
28
28
|
<button type="submit" class={btnClass}
|
|
29
29
|
><svg
|
package/forms/VoiceSearch.svelte
CHANGED
|
@@ -30,7 +30,7 @@ const handleVoiceBtn = () => {
|
|
|
30
30
|
/></svg
|
|
31
31
|
>
|
|
32
32
|
</div>
|
|
33
|
-
<input type="text" {id} class={inputClass} {placeholder}
|
|
33
|
+
<input {...$$restProps} type="text" {id} class={inputClass} {placeholder} />
|
|
34
34
|
<button type="button" class={voiceBtnClass} on:click={handleVoiceBtn}>
|
|
35
35
|
<svg
|
|
36
36
|
class={voiceIconClass}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.6",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -97,6 +97,8 @@
|
|
|
97
97
|
"./accordions/AccordionItem.svelte": "./accordions/AccordionItem.svelte",
|
|
98
98
|
"./alerts/Alert.svelte": "./alerts/Alert.svelte",
|
|
99
99
|
"./avatar/Avatar.svelte": "./avatar/Avatar.svelte",
|
|
100
|
+
"./avatar/Dot.svelte": "./avatar/Dot.svelte",
|
|
101
|
+
"./avatar/Placeholder.svelte": "./avatar/Placeholder.svelte",
|
|
100
102
|
"./badges/Badge.svelte": "./badges/Badge.svelte",
|
|
101
103
|
"./breadcrumbs/Breadcrumb.svelte": "./breadcrumbs/Breadcrumb.svelte",
|
|
102
104
|
"./breadcrumbs/BreadcrumbItem.svelte": "./breadcrumbs/BreadcrumbItem.svelte",
|
package/sidebars/Sidebar.svelte
CHANGED
|
@@ -5,7 +5,7 @@ export let imgClass = 'h-6 mr-3 sm:h-7';
|
|
|
5
5
|
export let spanClass = 'self-center text-xl font-semibold whitespace-nowrap dark:text-white';
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<a href={site.href} class={classNames(aClass, $$props.class)}
|
|
8
|
+
<a {...$$restProps} href={site.href} class={classNames(aClass, $$props.class)}>
|
|
9
9
|
<img src={site.img} class={imgClass} alt={site.name} />
|
|
10
10
|
<span class={spanClass}>{site.name}</span>
|
|
11
11
|
</a>
|
|
@@ -15,10 +15,10 @@ const handleDropdown = () => {
|
|
|
15
15
|
|
|
16
16
|
<li>
|
|
17
17
|
<button
|
|
18
|
+
{...$$restProps}
|
|
18
19
|
on:click={() => handleDropdown()}
|
|
19
20
|
type="button"
|
|
20
21
|
class={classNames(btnClass, $$props.class)}
|
|
21
|
-
{...$$restProps}
|
|
22
22
|
aria-controls="sidebar-dropdown"
|
|
23
23
|
>
|
|
24
24
|
<svelte:component
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
export let aClass = 'flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700';
|
|
3
3
|
export let href = '';
|
|
4
|
-
export let rel = '';
|
|
5
4
|
export let label = '';
|
|
6
5
|
export let spanClass = 'ml-3';
|
|
7
6
|
export let icon;
|
|
8
7
|
</script>
|
|
9
8
|
|
|
10
9
|
<li>
|
|
11
|
-
<a {
|
|
10
|
+
<a {...$$restProps} {href} class={classNames(aClass, $$props.class)}>
|
|
12
11
|
<svelte:component
|
|
13
12
|
this={icon.name}
|
|
14
13
|
size={icon.size}
|
package/types.d.ts
CHANGED
|
@@ -62,6 +62,10 @@ export declare type CrumbType = {
|
|
|
62
62
|
label: string;
|
|
63
63
|
href: string;
|
|
64
64
|
};
|
|
65
|
+
export interface DotType {
|
|
66
|
+
top?: boolean;
|
|
67
|
+
color?: string;
|
|
68
|
+
}
|
|
65
69
|
export declare type DropdownColorType = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
|
|
66
70
|
export interface DropdownType {
|
|
67
71
|
name: string;
|