flowbite-svelte 0.47.0 → 0.47.1
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/README.md +1 -1
- package/dist/avatar/Avatar.svelte.d.ts +6 -6
- package/dist/datepicker/Datepicker.svelte +5 -4
- package/dist/drawer/Drawer.svelte.d.ts +2 -2
- package/dist/dropdown/DropdownItem.svelte.d.ts +6 -6
- package/dist/navbar/NavLi.svelte.d.ts +6 -6
- package/dist/pagination/PaginationItem.svelte.d.ts +6 -6
- package/dist/types.d.ts +0 -11
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -174,7 +174,7 @@ For full documentation, visit [flowbite-svelte.com](https://flowbite-svelte.com/
|
|
|
174
174
|
</a>
|
|
175
175
|
</td>
|
|
176
176
|
<td width="33.3333%">
|
|
177
|
-
<a href="https://flowbite-svelte.com/docs/
|
|
177
|
+
<a href="https://flowbite-svelte.com/docs/components/datepicker">
|
|
178
178
|
<img alt="Svelte Datepicker" src="https://flowbite.s3.amazonaws.com/github/svelte/datepicker.jpg">
|
|
179
179
|
</a>
|
|
180
180
|
</td>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import type { HTMLAttributes, HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
5
|
href?: string;
|
|
6
6
|
src?: string;
|
|
7
7
|
rounded?: boolean;
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
dot?: object | undefined;
|
|
11
11
|
alt?: string;
|
|
12
12
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "none";
|
|
13
|
-
};
|
|
13
|
+
} & (HTMLAnchorAttributes | HTMLAttributes<HTMLDivElement>);
|
|
14
14
|
events: {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
16
|
};
|
|
@@ -18,7 +18,8 @@ declare const __propDef: {
|
|
|
18
18
|
default: {};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type AvatarProps_ = typeof __propDef.props;
|
|
22
|
+
export { AvatarProps_ as AvatarProps };
|
|
22
23
|
export type AvatarEvents = typeof __propDef.events;
|
|
23
24
|
export type AvatarSlots = typeof __propDef.slots;
|
|
24
25
|
/**
|
|
@@ -33,6 +34,5 @@ export type AvatarSlots = typeof __propDef.slots;
|
|
|
33
34
|
* @prop export let alt: $$Props['alt'] = '';
|
|
34
35
|
* @prop export let size: NonNullable<$$Props['size']> = 'md';
|
|
35
36
|
*/
|
|
36
|
-
export default class Avatar extends SvelteComponentTyped<
|
|
37
|
+
export default class Avatar extends SvelteComponentTyped<AvatarProps_, AvatarEvents, AvatarSlots> {
|
|
37
38
|
}
|
|
38
|
-
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script>import { createEventDispatcher, onMount } from "svelte";
|
|
2
2
|
import { fade } from "svelte/transition";
|
|
3
3
|
import { Button } from "..";
|
|
4
|
-
import { ChevronLeftOutline, ChevronRightOutline, CalendarMonthSolid } from "flowbite-svelte-icons";
|
|
5
4
|
export let value = null;
|
|
6
5
|
export let defaultDate = null;
|
|
7
6
|
export let range = false;
|
|
@@ -215,7 +214,9 @@ function handleApply() {
|
|
|
215
214
|
<div class="relative">
|
|
216
215
|
<input bind:this={inputElement} type="text" class="w-full px-4 py-2 text-sm border rounded-md focus:outline-none dark:bg-gray-700 dark:text-white dark:border-gray-600 {getFocusRingClass(color)} {inputClass}" {placeholder} value={range ? `${formatDate(rangeFrom)} - ${formatDate(rangeTo)}` : formatDate(value)} on:focus={() => (isOpen = true)} on:input={handleInputChange} on:keydown={handleInputKeydown} {disabled} {required} aria-haspopup="dialog" />
|
|
217
216
|
<button type="button" class="absolute inset-y-0 right-0 flex items-center px-3 text-gray-500 dark:text-gray-400 focus:outline-none" on:click={() => (isOpen = !isOpen)} {disabled} aria-label={isOpen ? 'Close date picker' : 'Open date picker'}>
|
|
218
|
-
<
|
|
217
|
+
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
|
218
|
+
<path d="M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"></path>
|
|
219
|
+
</svg>
|
|
219
220
|
</button>
|
|
220
221
|
</div>
|
|
221
222
|
{/if}
|
|
@@ -236,13 +237,13 @@ function handleApply() {
|
|
|
236
237
|
{/if}
|
|
237
238
|
<div class="flex items-center justify-between mb-4">
|
|
238
239
|
<Button on:click={() => changeMonth(-1)} {color} size="sm" aria-label="Previous month">
|
|
239
|
-
<
|
|
240
|
+
<svg class="w-3 h-3 rtl:rotate-180 text-white dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5H1m0 0 4 4M1 5l4-4"></path></svg>
|
|
240
241
|
</Button>
|
|
241
242
|
<h3 class="text-lg font-semibold dark:text-white" aria-live="polite">
|
|
242
243
|
{currentMonth.toLocaleString(locale, { month: 'long', year: 'numeric' })}
|
|
243
244
|
</h3>
|
|
244
245
|
<Button on:click={() => changeMonth(1)} {color} size="sm" aria-label="Next month">
|
|
245
|
-
<
|
|
246
|
+
<svg class="w-3 h-3 rtl:rotate-180 text-white dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"></path></svg>
|
|
246
247
|
</Button>
|
|
247
248
|
</div>
|
|
248
249
|
<div class="grid grid-cols-7 gap-1" role="grid">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { drawerTransitionParamTypes,
|
|
2
|
+
import type { drawerTransitionParamTypes, TransitionTypes } from '../types';
|
|
3
3
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: HTMLAttributes<HTMLElement> & {
|
|
@@ -18,7 +18,7 @@ declare const __propDef: {
|
|
|
18
18
|
id?: string;
|
|
19
19
|
divClass?: string;
|
|
20
20
|
transitionParams?: drawerTransitionParamTypes;
|
|
21
|
-
transitionType?:
|
|
21
|
+
transitionType?: TransitionTypes;
|
|
22
22
|
};
|
|
23
23
|
events: {
|
|
24
24
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLButtonAttributes, HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
5
|
defaultClass?: string;
|
|
6
6
|
href?: string;
|
|
7
7
|
activeClass?: string;
|
|
8
|
-
};
|
|
8
|
+
} & (HTMLAnchorAttributes | HTMLButtonAttributes);
|
|
9
9
|
events: {
|
|
10
10
|
click: MouseEvent;
|
|
11
11
|
change: Event;
|
|
@@ -22,7 +22,8 @@ declare const __propDef: {
|
|
|
22
22
|
default: {};
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
type DropdownItemProps_ = typeof __propDef.props;
|
|
26
|
+
export { DropdownItemProps_ as DropdownItemProps };
|
|
26
27
|
export type DropdownItemEvents = typeof __propDef.events;
|
|
27
28
|
export type DropdownItemSlots = typeof __propDef.slots;
|
|
28
29
|
/**
|
|
@@ -33,6 +34,5 @@ export type DropdownItemSlots = typeof __propDef.slots;
|
|
|
33
34
|
* @prop export let activeClass: $$Props['activeClass'] = undefined;
|
|
34
35
|
* @prop export let active: boolean = false;
|
|
35
36
|
*/
|
|
36
|
-
export default class DropdownItem extends SvelteComponentTyped<
|
|
37
|
+
export default class DropdownItem extends SvelteComponentTyped<DropdownItemProps_, DropdownItemEvents, DropdownItemSlots> {
|
|
37
38
|
}
|
|
38
|
-
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import type { HTMLAttributes, HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
5
|
href?: string;
|
|
6
6
|
activeClass?: string;
|
|
7
7
|
nonActiveClass?: string;
|
|
8
|
-
};
|
|
8
|
+
} & (HTMLAnchorAttributes | HTMLAttributes<HTMLDivElement>);
|
|
9
9
|
events: {
|
|
10
10
|
blur: FocusEvent;
|
|
11
11
|
change: Event;
|
|
@@ -24,7 +24,8 @@ declare const __propDef: {
|
|
|
24
24
|
default: {};
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
type NavLiProps_ = typeof __propDef.props;
|
|
28
|
+
export { NavLiProps_ as NavLiProps };
|
|
28
29
|
export type NavLiEvents = typeof __propDef.events;
|
|
29
30
|
export type NavLiSlots = typeof __propDef.slots;
|
|
30
31
|
/**
|
|
@@ -34,6 +35,5 @@ export type NavLiSlots = typeof __propDef.slots;
|
|
|
34
35
|
* @prop export let activeClass: $$Props['activeClass'] = undefined;
|
|
35
36
|
* @prop export let nonActiveClass: $$Props['nonActiveClass'] = undefined;
|
|
36
37
|
*/
|
|
37
|
-
export default class NavLi extends SvelteComponentTyped<
|
|
38
|
+
export default class NavLi extends SvelteComponentTyped<NavLiProps_, NavLiEvents, NavLiSlots> {
|
|
38
39
|
}
|
|
39
|
-
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLButtonAttributes, HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
5
|
href?: string;
|
|
6
6
|
active?: boolean;
|
|
7
7
|
activeClass?: string;
|
|
8
8
|
normalClass?: string;
|
|
9
9
|
large?: boolean;
|
|
10
|
-
};
|
|
10
|
+
} & (HTMLAnchorAttributes | HTMLButtonAttributes);
|
|
11
11
|
events: {
|
|
12
12
|
blur: FocusEvent;
|
|
13
13
|
change: Event;
|
|
@@ -26,7 +26,8 @@ declare const __propDef: {
|
|
|
26
26
|
default: {};
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
type PaginationItemProps_ = typeof __propDef.props;
|
|
30
|
+
export { PaginationItemProps_ as PaginationItemProps };
|
|
30
31
|
export type PaginationItemEvents = typeof __propDef.events;
|
|
31
32
|
export type PaginationItemSlots = typeof __propDef.slots;
|
|
32
33
|
/**
|
|
@@ -38,6 +39,5 @@ export type PaginationItemSlots = typeof __propDef.slots;
|
|
|
38
39
|
* @prop export let normalClass: $$Props['normalClass'] = 'text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
39
40
|
* @prop export let large: $$Props['large'] = false;
|
|
40
41
|
*/
|
|
41
|
-
export default class PaginationItem extends SvelteComponentTyped<
|
|
42
|
+
export default class PaginationItem extends SvelteComponentTyped<PaginationItemProps_, PaginationItemEvents, PaginationItemSlots> {
|
|
42
43
|
}
|
|
43
|
-
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
2
2
|
export type BlockQuoteType = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
|
|
3
|
-
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
4
3
|
export type ButtonColorType = 'alternative' | 'blue' | 'dark' | 'green' | 'light' | 'primary' | 'purple' | 'red' | 'yellow' | 'none';
|
|
5
4
|
export type CheckboxItem = {
|
|
6
5
|
value: string;
|
|
@@ -8,7 +7,6 @@ export type CheckboxItem = {
|
|
|
8
7
|
isChecked?: boolean;
|
|
9
8
|
};
|
|
10
9
|
export type ColorVariant = 'dark' | 'red' | 'yellow' | 'green' | 'indigo' | 'purple' | 'pink' | 'blue' | 'primary' | 'none';
|
|
11
|
-
export type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink' | 'white' | 'custom' | 'primary' | 'secondary';
|
|
12
10
|
export type ImgType = {
|
|
13
11
|
src: string;
|
|
14
12
|
alt?: string;
|
|
@@ -16,14 +14,11 @@ export type ImgType = {
|
|
|
16
14
|
export type IndicatorColorType = 'gray' | 'dark' | 'blue' | 'green' | 'red' | 'purple' | 'indigo' | 'yellow' | 'teal' | 'none';
|
|
17
15
|
export type IndicatorPlacementType = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | undefined;
|
|
18
16
|
export type InputType = 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'reset' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | 'search';
|
|
19
|
-
export type drawerTransitionTypes = 'fade' | 'fly' | 'slide' | 'blur' | 'in:fly' | 'out:fly' | 'in:slide' | 'out:slide' | 'in:fade' | 'out:fade' | 'in:blur' | 'out:blur' | undefined;
|
|
20
17
|
export type FormColorType = 'blue' | 'red' | 'green' | 'purple' | 'teal' | 'yellow' | 'orange' | 'primary' | 'secondary';
|
|
21
18
|
export type ModalPlacementType = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
22
19
|
export type PsizeType = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
|
|
23
20
|
export type PweightType = 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
|
|
24
21
|
export type TableColorType = 'blue' | 'green' | 'red' | 'yellow' | 'purple' | 'indigo' | 'pink' | 'default' | 'custom';
|
|
25
|
-
export type ToolbarColorType = 'gray' | 'red' | 'yellow' | 'green' | 'indigo' | 'purple' | 'pink' | 'blue' | 'dark' | 'none';
|
|
26
|
-
export type ToolbarButtonType = 'dark' | 'default' | 'gray' | 'red' | 'yellow' | 'green' | 'indigo' | 'purple' | 'pink' | 'blue';
|
|
27
22
|
export declare const xs = "xs";
|
|
28
23
|
export declare const sm = "sm";
|
|
29
24
|
export declare const md = "md";
|
|
@@ -90,12 +85,6 @@ export interface LinkType {
|
|
|
90
85
|
rel?: string;
|
|
91
86
|
active?: boolean;
|
|
92
87
|
}
|
|
93
|
-
export interface NavbarType {
|
|
94
|
-
name: string;
|
|
95
|
-
href: string;
|
|
96
|
-
rel?: string;
|
|
97
|
-
child?: NavbarType[];
|
|
98
|
-
}
|
|
99
88
|
export interface SiteType {
|
|
100
89
|
name: string;
|
|
101
90
|
href: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"@changesets/cli": "2.27.9",
|
|
16
16
|
"@docsearch/css": "^3.6.2",
|
|
17
17
|
"@docsearch/js": "^3.6.2",
|
|
18
|
-
"@playwright/test": "^1.48.
|
|
18
|
+
"@playwright/test": "^1.48.1",
|
|
19
19
|
"@sveltejs/adapter-vercel": "^5.4.5",
|
|
20
|
-
"@sveltejs/kit": "^2.
|
|
20
|
+
"@sveltejs/kit": "^2.7.1",
|
|
21
21
|
"@sveltejs/package": "2.3.2",
|
|
22
22
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
23
|
-
"@svitejs/changesets-changelog-github-compact": "^1.
|
|
23
|
+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
24
24
|
"@types/eslint": "^8.56.12",
|
|
25
25
|
"autoprefixer": "^10.4.20",
|
|
26
26
|
"dayjs": "^1.11.13",
|
|
27
27
|
"esbuild": "0.23.1",
|
|
28
28
|
"eslint": "^9.12.0",
|
|
29
29
|
"eslint-config-prettier": "^9.1.0",
|
|
30
|
-
"eslint-plugin-svelte": "^2.45.
|
|
31
|
-
"flowbite-svelte-icons": "^1.6.
|
|
30
|
+
"eslint-plugin-svelte": "^2.45.1",
|
|
31
|
+
"flowbite-svelte-icons": "^1.6.2",
|
|
32
32
|
"globals": "^15.11.0",
|
|
33
33
|
"mdsvex": "^0.12.3",
|
|
34
34
|
"mdsvexamples": "^0.4.1",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"prism-themes": "^1.9.0",
|
|
39
39
|
"publint": "^0.2.11",
|
|
40
40
|
"svelte": "^4.2.19",
|
|
41
|
-
"svelte-check": "^4.0.
|
|
41
|
+
"svelte-check": "^4.0.5",
|
|
42
42
|
"svelte-lib-helpers": "^0.4.16",
|
|
43
43
|
"svelte-meta-tags": "^3.1.4",
|
|
44
44
|
"svelte-preprocess": "^6.0.3",
|
|
45
|
-
"svelte2tsx": "^0.7.
|
|
45
|
+
"svelte2tsx": "^0.7.22",
|
|
46
46
|
"tailwind-merge": "^1.13.1",
|
|
47
|
-
"tailwindcss": "^3.4.
|
|
48
|
-
"tslib": "^2.
|
|
47
|
+
"tailwindcss": "^3.4.14",
|
|
48
|
+
"tslib": "^2.8.0",
|
|
49
49
|
"typescript": "^5.6.3",
|
|
50
50
|
"typescript-eslint": "8.4.0",
|
|
51
|
-
"vite": "^5.4.
|
|
51
|
+
"vite": "^5.4.9",
|
|
52
52
|
"vitest": "^1.6.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@floating-ui/dom": "^1.6.11",
|
|
102
|
-
"apexcharts": "^3.54.
|
|
102
|
+
"apexcharts": "^3.54.1",
|
|
103
103
|
"flowbite": "^2.5.2",
|
|
104
|
-
"tailwind-merge": "^2.5.
|
|
104
|
+
"tailwind-merge": "^2.5.4"
|
|
105
105
|
},
|
|
106
106
|
"engines": {
|
|
107
107
|
"pnpm": ">=8.0.0",
|