flowbite-svelte 0.34.4 → 0.34.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/dist/forms/FloatingLabelInput.svelte +1 -0
- package/dist/forms/FloatingLabelInput.svelte.d.ts +1 -0
- package/dist/gallery/Gallery.svelte +14 -6
- package/dist/gallery/Gallery.svelte.d.ts +3 -2
- package/dist/gallery/GalleryItem.svelte +5 -5
- package/dist/gallery/GalleryItem.svelte.d.ts +2 -2
- package/package.json +1 -9
- package/dist/tabs/TabHead.svelte +0 -27
- package/dist/tabs/TabHead.svelte.d.ts +0 -20
- package/dist/tabs/TabHeadItem.svelte +0 -56
- package/dist/tabs/TabHeadItem.svelte.d.ts +0 -34
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
|
|
3
|
-
export let
|
|
4
|
-
|
|
2
|
+
import GalleryItem from './GalleryItem.svelte';
|
|
3
|
+
export let items = [];
|
|
4
|
+
$: divClass = classNames('grid', $$props.class);
|
|
5
|
+
function init(node) {
|
|
6
|
+
if (getComputedStyle(node).gap === 'normal')
|
|
7
|
+
node.style.gap = 'inherit';
|
|
8
|
+
}
|
|
5
9
|
</script>
|
|
6
10
|
|
|
7
|
-
<div class=
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
<div {...$$restProps} class={divClass} use:init>
|
|
12
|
+
{#each items as { src, alt }}
|
|
13
|
+
<GalleryItem {src} {alt} />
|
|
14
|
+
{:else}
|
|
15
|
+
<slot />
|
|
16
|
+
{/each}
|
|
17
|
+
</div>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ImgType } from '../types';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
items?: ImgType[] | undefined;
|
|
6
7
|
};
|
|
7
8
|
events: {
|
|
8
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<script>export let src
|
|
2
|
-
export let alt =
|
|
3
|
-
export let
|
|
1
|
+
<script>export let src;
|
|
2
|
+
export let alt = undefined;
|
|
3
|
+
export let defaultClass = 'h-auto max-w-full rounded-lg';
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<div>
|
|
7
|
-
<img class=
|
|
8
|
-
</div>
|
|
7
|
+
<img class={defaultClass} {src} {alt} />
|
|
8
|
+
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
src
|
|
4
|
+
src: string;
|
|
5
5
|
alt?: string | undefined;
|
|
6
|
-
|
|
6
|
+
defaultClass?: string | undefined;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.6",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Shinichi Okada",
|
|
@@ -550,14 +550,6 @@
|
|
|
550
550
|
"types": "./dist/tables/TableSearch.svelte.d.ts",
|
|
551
551
|
"svelte": "./dist/tables/TableSearch.svelte"
|
|
552
552
|
},
|
|
553
|
-
"./TabHead.svelte": {
|
|
554
|
-
"types": "./dist/tabs/TabHead.svelte.d.ts",
|
|
555
|
-
"svelte": "./dist/tabs/TabHead.svelte"
|
|
556
|
-
},
|
|
557
|
-
"./TabHeadItem.svelte": {
|
|
558
|
-
"types": "./dist/tabs/TabHeadItem.svelte.d.ts",
|
|
559
|
-
"svelte": "./dist/tabs/TabHeadItem.svelte"
|
|
560
|
-
},
|
|
561
553
|
"./TabItem.svelte": {
|
|
562
554
|
"types": "./dist/tabs/TabItem.svelte.d.ts",
|
|
563
555
|
"svelte": "./dist/tabs/TabItem.svelte"
|
package/dist/tabs/TabHead.svelte
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script>export let tabStyle = 'default';
|
|
2
|
-
export let customDivClass = '';
|
|
3
|
-
export let customUlClass = '';
|
|
4
|
-
const border = 'border-b border-gray-200 dark:border-gray-700';
|
|
5
|
-
const divClasses = {
|
|
6
|
-
default: 'mb-4 ' + border,
|
|
7
|
-
full: 'mb-4',
|
|
8
|
-
icon: 'mb-4 ' + border,
|
|
9
|
-
pill: 'mb-4 ',
|
|
10
|
-
underline: 'mb-4 text-sm font-medium text-center text-gray-500 dark:text-gray-400 ' + border,
|
|
11
|
-
custom: customDivClass
|
|
12
|
-
};
|
|
13
|
-
const ulClasses = {
|
|
14
|
-
default: 'flex flex-wrap -mb-px',
|
|
15
|
-
full: 'hidden text-sm font-medium text-center text-gray-500 rounded-lg divide-x divide-gray-200 shadow sm:flex dark:divide-gray-700 dark:text-gray-400 mb-1',
|
|
16
|
-
icon: 'flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500 dark:text-gray-400',
|
|
17
|
-
pill: 'flex flex-wrap',
|
|
18
|
-
underline: 'flex flex-wrap -mb-px',
|
|
19
|
-
custom: customUlClass
|
|
20
|
-
};
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div class={divClasses[tabStyle]}>
|
|
24
|
-
<ul class={ulClasses[tabStyle]} role="tablist">
|
|
25
|
-
<slot />
|
|
26
|
-
</ul>
|
|
27
|
-
</div>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
tabStyle?: "default" | "custom" | "icon" | "pill" | "underline" | "full" | undefined;
|
|
5
|
-
customDivClass?: string | undefined;
|
|
6
|
-
customUlClass?: string | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {
|
|
12
|
-
default: {};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type TabHeadProps = typeof __propDef.props;
|
|
16
|
-
export type TabHeadEvents = typeof __propDef.events;
|
|
17
|
-
export type TabHeadSlots = typeof __propDef.slots;
|
|
18
|
-
export default class TabHead extends SvelteComponentTyped<TabHeadProps, TabHeadEvents, TabHeadSlots> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
|
-
export let tabStyle = 'default';
|
|
4
|
-
export let activeTabValue;
|
|
5
|
-
export let customActiveClass = '';
|
|
6
|
-
export let customInActiveClass = '';
|
|
7
|
-
export let customLiClass = '';
|
|
8
|
-
import { getContext } from 'svelte';
|
|
9
|
-
const ctx = getContext('ctx') ?? {};
|
|
10
|
-
tabStyle = ctx.style;
|
|
11
|
-
const activeClasses = {
|
|
12
|
-
default: 'inline-block py-4 px-4 text-sm font-medium text-center text-blue-600 bg-gray-100 rounded-t-lg active dark:bg-gray-800 dark:text-blue-500',
|
|
13
|
-
full: 'inline-block p-4 w-full text-gray-900 bg-gray-100 focus:ring-4 focus:ring-blue-300 active focus:outline-none dark:bg-gray-700 dark:text-white',
|
|
14
|
-
icon: 'inline-flex p-4 text-blue-600 rounded-t-lg border-b-2 border-blue-600 active dark:text-blue-500 dark:border-blue-500 group',
|
|
15
|
-
pill: 'active inline-block py-3 px-4 text-sm font-medium text-center text-white bg-blue-600 rounded-lg',
|
|
16
|
-
underline: 'inline-block p-4 text-blue-600 rounded-t-lg border-b-2 border-blue-600 active dark:text-blue-500 dark:border-blue-500',
|
|
17
|
-
custom: customActiveClass
|
|
18
|
-
};
|
|
19
|
-
const inactiveClasses = {
|
|
20
|
-
default: 'inline-block py-4 px-4 text-sm font-medium text-center text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300',
|
|
21
|
-
full: 'inline-block p-4 w-full bg-white hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-blue-300 focus:outline-none dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700',
|
|
22
|
-
icon: 'inline-flex p-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 group ',
|
|
23
|
-
pill: 'inline-block py-3 px-4 text-sm font-medium text-center text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white',
|
|
24
|
-
underline: 'inline-block p-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300',
|
|
25
|
-
custom: customInActiveClass
|
|
26
|
-
};
|
|
27
|
-
const liClasses = {
|
|
28
|
-
default: 'mr-2',
|
|
29
|
-
full: 'w-full',
|
|
30
|
-
icon: 'mr-2',
|
|
31
|
-
pill: 'mr-2',
|
|
32
|
-
underline: 'mr-2',
|
|
33
|
-
custom: customLiClass
|
|
34
|
-
};
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<li class={liClasses[tabStyle]} role="presentation">
|
|
38
|
-
<button
|
|
39
|
-
{...$$restProps}
|
|
40
|
-
on:click
|
|
41
|
-
on:blur
|
|
42
|
-
on:click
|
|
43
|
-
on:focus
|
|
44
|
-
on:keydown
|
|
45
|
-
on:keypress
|
|
46
|
-
on:keyup
|
|
47
|
-
on:mouseenter
|
|
48
|
-
on:mouseleave
|
|
49
|
-
on:mouseover
|
|
50
|
-
class={classNames(activeTabValue === id ? activeClasses[tabStyle] : inactiveClasses[tabStyle])}
|
|
51
|
-
id="{id}-tabhead"
|
|
52
|
-
type="button"
|
|
53
|
-
role="tab">
|
|
54
|
-
<slot />
|
|
55
|
-
</button>
|
|
56
|
-
</li>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
id: number;
|
|
6
|
-
tabStyle?: "default" | "custom" | "icon" | "pill" | "underline" | "full" | undefined;
|
|
7
|
-
activeTabValue: number;
|
|
8
|
-
customActiveClass?: string | undefined;
|
|
9
|
-
customInActiveClass?: string | undefined;
|
|
10
|
-
customLiClass?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
click: MouseEvent;
|
|
14
|
-
blur: FocusEvent;
|
|
15
|
-
focus: FocusEvent;
|
|
16
|
-
keydown: KeyboardEvent;
|
|
17
|
-
keypress: KeyboardEvent;
|
|
18
|
-
keyup: KeyboardEvent;
|
|
19
|
-
mouseenter: MouseEvent;
|
|
20
|
-
mouseleave: MouseEvent;
|
|
21
|
-
mouseover: MouseEvent;
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
};
|
|
25
|
-
slots: {
|
|
26
|
-
default: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export type TabHeadItemProps = typeof __propDef.props;
|
|
30
|
-
export type TabHeadItemEvents = typeof __propDef.events;
|
|
31
|
-
export type TabHeadItemSlots = typeof __propDef.slots;
|
|
32
|
-
export default class TabHeadItem extends SvelteComponentTyped<TabHeadItemProps, TabHeadItemEvents, TabHeadItemSlots> {
|
|
33
|
-
}
|
|
34
|
-
export {};
|