flowbite-svelte 0.30.7 → 0.32.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/dist/bottom-nav/BottomNav.svelte +40 -0
- package/dist/bottom-nav/BottomNav.svelte.d.ts +23 -0
- package/dist/bottom-nav/BottomNavHeader.svelte +10 -0
- package/dist/bottom-nav/BottomNavHeader.svelte.d.ts +20 -0
- package/dist/bottom-nav/BottomNavHeaderItem.svelte +11 -0
- package/dist/bottom-nav/BottomNavHeaderItem.svelte.d.ts +20 -0
- package/dist/bottom-nav/BottomNavItem.svelte +51 -0
- package/dist/bottom-nav/BottomNavItem.svelte.d.ts +31 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script>import { setContext } from 'svelte';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
export let position = 'fixed';
|
|
4
|
+
export let navType = 'default';
|
|
5
|
+
export let outerDefault = 'w-full z-50 border-gray-200 dark:bg-gray-700 dark:border-gray-600';
|
|
6
|
+
export let innerDefault = 'grid h-full max-w-lg mx-auto';
|
|
7
|
+
setContext('navType', navType);
|
|
8
|
+
const outerDivClasses = {
|
|
9
|
+
default: 'bottom-0 left-0 h-16 bg-white border-t',
|
|
10
|
+
border: 'bottom-0 left-0 h-16 bg-white border-t',
|
|
11
|
+
application: 'h-16 max-w-lg -translate-x-1/2 bg-white border rounded-full bottom-4 left-1/2',
|
|
12
|
+
pagination: 'bottom-0 h-16 -translate-x-1/2 bg-white border-t left-1/2',
|
|
13
|
+
group: 'bottom-0 -translate-x-1/2 bg-white border-t left-1/2',
|
|
14
|
+
card: 'bottom-0 left-0 h-16 bg-white border-t',
|
|
15
|
+
meeting: 'bottom-0 left-0 grid h-16 grid-cols-1 px-8 bg-white border-t md:grid-cols-3',
|
|
16
|
+
video: 'bottom-0 left-0 grid h-24 grid-cols-1 px-8 bg-white border-t md:grid-cols-3',
|
|
17
|
+
custom: ''
|
|
18
|
+
};
|
|
19
|
+
const innerDivClasses = {
|
|
20
|
+
default: '',
|
|
21
|
+
border: '',
|
|
22
|
+
application: '',
|
|
23
|
+
pagination: '',
|
|
24
|
+
group: '',
|
|
25
|
+
card: '',
|
|
26
|
+
meeting: 'flex items-center justify-center mx-auto',
|
|
27
|
+
video: 'flex items-center w-full',
|
|
28
|
+
custom: ''
|
|
29
|
+
};
|
|
30
|
+
$: outerClass = classNames(position, outerDefault, outerDivClasses[navType], $$props.outerDiv);
|
|
31
|
+
$: innerClass = classNames(innerDefault, innerDivClasses[navType], $$props.innerDiv);
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
<div class="{outerClass}" {...$$restProps} >
|
|
36
|
+
<slot name="header" />
|
|
37
|
+
<div class="{innerClass}">
|
|
38
|
+
<slot />
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
6
|
+
navType?: "default" | "border" | "custom" | "application" | "pagination" | "group" | "card" | "meeting" | "video" | undefined;
|
|
7
|
+
outerDefault?: string | undefined;
|
|
8
|
+
innerDefault?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
header: {};
|
|
15
|
+
default: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type BottomNavProps = typeof __propDef.props;
|
|
19
|
+
export type BottomNavEvents = typeof __propDef.events;
|
|
20
|
+
export type BottomNavSlots = typeof __propDef.slots;
|
|
21
|
+
export default class BottomNav extends SvelteComponentTyped<BottomNavProps, BottomNavEvents, BottomNavSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script>export let outerClass = "w-full";
|
|
2
|
+
export let innerClass = "grid max-w-xs grid-cols-3 gap-1 p-1 mx-auto my-2 bg-gray-100 rounded-lg dark:bg-gray-600";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
<div class="{outerClass}" {...$$restProps}>
|
|
7
|
+
<div class="{innerClass}" role="group">
|
|
8
|
+
<slot />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
outerClass?: string | undefined;
|
|
6
|
+
innerClass?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type BottomNavHeaderProps = typeof __propDef.props;
|
|
16
|
+
export type BottomNavHeaderEvents = typeof __propDef.events;
|
|
17
|
+
export type BottomNavHeaderSlots = typeof __propDef.slots;
|
|
18
|
+
export default class BottomNavHeader extends SvelteComponentTyped<BottomNavHeaderProps, BottomNavHeaderEvents, BottomNavHeaderSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let itemName = '';
|
|
3
|
+
export let active = false;
|
|
4
|
+
export let defaultClass = "px-5 py-1.5 text-xs font-medium text-gray-900 hover:bg-gray-200 dark:text-white dark:hover:bg-gray-700 rounded-lg";
|
|
5
|
+
export let activeClass = 'px-5 py-1.5 text-xs font-medium text-white bg-gray-900 dark:bg-gray-300 dark:text-gray-900 rounded-lg';
|
|
6
|
+
$: btnClass = classNames(active ? activeClass : defaultClass);
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<button class="{btnClass}" {...$$restProps}>
|
|
10
|
+
{itemName}
|
|
11
|
+
</button>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
itemName?: string | undefined;
|
|
6
|
+
active?: boolean | undefined;
|
|
7
|
+
defaultClass?: string | undefined;
|
|
8
|
+
activeClass?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
export type BottomNavHeaderItemProps = typeof __propDef.props;
|
|
16
|
+
export type BottomNavHeaderItemEvents = typeof __propDef.events;
|
|
17
|
+
export type BottomNavHeaderItemSlots = typeof __propDef.slots;
|
|
18
|
+
export default class BottomNavHeaderItem extends SvelteComponentTyped<BottomNavHeaderItemProps, BottomNavHeaderItemEvents, BottomNavHeaderItemSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
export let btnName = '';
|
|
4
|
+
export let appBtnPosition = 'custom';
|
|
5
|
+
export let btnDefault = '';
|
|
6
|
+
export let spanDefault = '';
|
|
7
|
+
const navType = getContext('navType');
|
|
8
|
+
const btnClasses = {
|
|
9
|
+
default: 'inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
10
|
+
border: 'inline-flex flex-col items-center justify-center px-5 border-gray-200 border-x hover:bg-gray-50 dark:hover:bg-gray-800 group dark:border-gray-600',
|
|
11
|
+
application: '',
|
|
12
|
+
pagination: 'inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
13
|
+
group: 'inline-flex flex-col items-center justify-center p-4 hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
14
|
+
card: 'inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
15
|
+
meeting: '',
|
|
16
|
+
video: '',
|
|
17
|
+
custom: ''
|
|
18
|
+
};
|
|
19
|
+
const spanClasses = {
|
|
20
|
+
default: 'text-sm text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500',
|
|
21
|
+
border: 'text-sm text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500',
|
|
22
|
+
application: 'sr-only',
|
|
23
|
+
pagination: 'sr-only',
|
|
24
|
+
group: 'sr-only',
|
|
25
|
+
card: 'text-sm text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500',
|
|
26
|
+
meeting: '',
|
|
27
|
+
video: '',
|
|
28
|
+
custom: ''
|
|
29
|
+
};
|
|
30
|
+
const appBtnClasses = {
|
|
31
|
+
left: 'inline-flex flex-col items-center justify-center px-5 rounded-l-full hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
32
|
+
middle: 'inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
33
|
+
right: 'inline-flex flex-col items-center justify-center px-5 rounded-r-full hover:bg-gray-50 dark:hover:bg-gray-800 group',
|
|
34
|
+
custom: ''
|
|
35
|
+
};
|
|
36
|
+
$: btnClass = classNames(btnDefault, btnClasses[navType], appBtnClasses[appBtnPosition], $$props.btnClass);
|
|
37
|
+
$: spanClass = classNames(spanDefault, spanClasses[navType], $$props.spanClass);
|
|
38
|
+
</script>
|
|
39
|
+
<button class="{btnClass}" aria-label="{btnName}" {...$$restProps}
|
|
40
|
+
on:click
|
|
41
|
+
on:change
|
|
42
|
+
on:keydown
|
|
43
|
+
on:keyup
|
|
44
|
+
on:focus
|
|
45
|
+
on:blur
|
|
46
|
+
on:mouseenter
|
|
47
|
+
on:mouseleave
|
|
48
|
+
>
|
|
49
|
+
<slot />
|
|
50
|
+
<span class="{spanClass}">{btnName}</span>
|
|
51
|
+
</button>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
btnName?: string | undefined;
|
|
6
|
+
appBtnPosition?: "custom" | "left" | "middle" | "right" | undefined;
|
|
7
|
+
btnDefault?: string | undefined;
|
|
8
|
+
spanDefault?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
click: MouseEvent;
|
|
12
|
+
change: Event;
|
|
13
|
+
keydown: KeyboardEvent;
|
|
14
|
+
keyup: KeyboardEvent;
|
|
15
|
+
focus: FocusEvent;
|
|
16
|
+
blur: FocusEvent;
|
|
17
|
+
mouseenter: MouseEvent;
|
|
18
|
+
mouseleave: MouseEvent;
|
|
19
|
+
} & {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
};
|
|
22
|
+
slots: {
|
|
23
|
+
default: {};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type BottomNavItemProps = typeof __propDef.props;
|
|
27
|
+
export type BottomNavItemEvents = typeof __propDef.events;
|
|
28
|
+
export type BottomNavItemSlots = typeof __propDef.slots;
|
|
29
|
+
export default class BottomNavItem extends SvelteComponentTyped<BottomNavItemProps, BottomNavItemEvents, BottomNavItemSlots> {
|
|
30
|
+
}
|
|
31
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export { default as Alert } from "./alerts/Alert.svelte";
|
|
|
4
4
|
export { default as Avatar } from "./avatar/Avatar.svelte";
|
|
5
5
|
export { default as Badge } from "./badges/Badge.svelte";
|
|
6
6
|
export { default as Banner } from "./banner/Banner.svelte";
|
|
7
|
+
export { default as BottomNav } from "./bottom-nav/BottomNav.svelte";
|
|
8
|
+
export { default as BottomNavItem } from "./bottom-nav/BottomNavItem.svelte";
|
|
9
|
+
export { default as BottomNavHeader } from "./bottom-nav/BottomNavHeader.svelte";
|
|
10
|
+
export { default as BottomNavHeaderItem } from "./bottom-nav/BottomNavHeaderItem.svelte";
|
|
7
11
|
export { default as Breadcrumb } from "./breadcrumbs/Breadcrumb.svelte";
|
|
8
12
|
export { default as BreadcrumbItem } from "./breadcrumbs/BreadcrumbItem.svelte";
|
|
9
13
|
export { default as Button } from "./buttons/Button.svelte";
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,13 @@ export { default as Avatar } from './avatar/Avatar.svelte';
|
|
|
12
12
|
export { default as Badge } from './badges/Badge.svelte';
|
|
13
13
|
|
|
14
14
|
// Banner
|
|
15
|
-
export { default as Banner } from './banner/Banner.svelte'
|
|
15
|
+
export { default as Banner } from './banner/Banner.svelte';
|
|
16
|
+
|
|
17
|
+
// Bottom navigation
|
|
18
|
+
export { default as BottomNav } from './bottom-nav/BottomNav.svelte';
|
|
19
|
+
export { default as BottomNavItem } from './bottom-nav/BottomNavItem.svelte';
|
|
20
|
+
export { default as BottomNavHeader } from './bottom-nav/BottomNavHeader.svelte';
|
|
21
|
+
export { default as BottomNavHeaderItem } from './bottom-nav/BottomNavHeaderItem.svelte'
|
|
16
22
|
|
|
17
23
|
// Breadcrumbs
|
|
18
24
|
export { default as Breadcrumb } from './breadcrumbs/Breadcrumb.svelte';
|
package/dist/types.d.ts
CHANGED
|
@@ -223,5 +223,16 @@ export interface TransitionParamTypes {
|
|
|
223
223
|
tick?: ((t: number, u: number) => void) | undefined;
|
|
224
224
|
}
|
|
225
225
|
type TransitionTypes = "blur" | "fade" | "fly" | "slide" | "in:fly" | "out:fly" | "in:slide" | "out:slide" | "in:fade" | "out:fade" | "in:blur" | "out:blur";
|
|
226
|
+
export interface ButtonClassesTypes {
|
|
227
|
+
default?: string | undefined;
|
|
228
|
+
border?: string | undefined;
|
|
229
|
+
application?: string | undefined;
|
|
230
|
+
pagination?: string | undefined;
|
|
231
|
+
group?: string | undefined;
|
|
232
|
+
card?: string | undefined;
|
|
233
|
+
meeting?: string | undefined;
|
|
234
|
+
video?: string | undefined;
|
|
235
|
+
custom?: string | undefined;
|
|
236
|
+
}
|
|
226
237
|
import { SvelteComponent } from "svelte";
|
|
227
238
|
export {};
|
package/dist/types.js
CHANGED
|
@@ -284,3 +284,15 @@ export interface TransitionParamTypes {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
export type TransitionTypes = 'fade' | 'fly' | 'slide' | 'blur' | 'in:fly' | 'out:fly' | 'in:slide' | 'out:slide' | 'in:fade' | 'out:fade' | 'in:blur' | 'out:blur';
|
|
287
|
+
|
|
288
|
+
export interface ButtonClassesTypes {
|
|
289
|
+
default?: string;
|
|
290
|
+
border?: string;
|
|
291
|
+
application?: string;
|
|
292
|
+
pagination?: string;
|
|
293
|
+
group?: string;
|
|
294
|
+
card?: string;
|
|
295
|
+
meeting?: string;
|
|
296
|
+
video?: string;
|
|
297
|
+
custom?: string;
|
|
298
|
+
}
|