flowbite-svelte 0.12.1 → 0.12.2
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/cards/InteractiveCard.svelte +3 -3
- package/index.d.ts +3 -0
- package/index.js +4 -3
- package/package.json +4 -1
- package/tabs/FullWidthTabs.svelte +31 -0
- package/tabs/FullWidthTabs.svelte.d.ts +18 -0
- package/tabs/IconTabs.svelte +24 -0
- package/tabs/IconTabs.svelte.d.ts +18 -0
- package/tabs/UnderlineTabs.svelte +20 -0
- package/tabs/UnderlineTabs.svelte.d.ts +18 -0
- package/types.d.ts +7 -0
|
@@ -51,11 +51,11 @@ else {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<div class={divClass}>
|
|
54
|
-
<div class="flex justify-end px-4 pt-4">
|
|
54
|
+
<div class="flex justify-end px-4 pt-4 relative">
|
|
55
55
|
<button
|
|
56
56
|
id="dropdownButton"
|
|
57
57
|
on:click={toggleDropdown}
|
|
58
|
-
class="sm:inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5"
|
|
58
|
+
class="hidden sm:inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5"
|
|
59
59
|
type="button"
|
|
60
60
|
>
|
|
61
61
|
<svg
|
|
@@ -73,7 +73,7 @@ else {
|
|
|
73
73
|
id="dropdown"
|
|
74
74
|
class:hidden={isOpen}
|
|
75
75
|
class:block={!isOpen}
|
|
76
|
-
class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute"
|
|
76
|
+
class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute top-16 -right-16"
|
|
77
77
|
>
|
|
78
78
|
<ul class="py-1" aria-labelledby="dropdownButton">
|
|
79
79
|
{#each dropdownLinks as { href, name, rel }}
|
package/index.d.ts
CHANGED
|
@@ -62,8 +62,11 @@ export { default as SpinnerButton } from "./spinners/SpinnerButton.svelte";
|
|
|
62
62
|
export { default as InteractiveTabHead } from "./tabs/InteractiveTabHead.svelte";
|
|
63
63
|
export { default as InteractiveTabs } from "./tabs/InteractiveTabs.svelte";
|
|
64
64
|
export { default as DefaultTabs } from "./tabs/DefaultTabs.svelte";
|
|
65
|
+
export { default as FullWidthTabs } from "./tabs/FullWidthTabs.svelte";
|
|
66
|
+
export { default as IconTabs } from "./tabs/IconTabs.svelte";
|
|
65
67
|
export { default as PillTabs } from "./tabs/PillTabs.svelte";
|
|
66
68
|
export { default as TabContent } from "./tabs/TabContent.svelte";
|
|
69
|
+
export { default as UnderlineTabs } from "./tabs/UnderlineTabs.svelte";
|
|
67
70
|
export { default as Group } from "./timelines/Group.svelte";
|
|
68
71
|
export { default as GroupItem } from "./timelines/GroupItem.svelte";
|
|
69
72
|
export { default as Activity } from "./timelines/Activity.svelte";
|
package/index.js
CHANGED
|
@@ -98,9 +98,12 @@ export { default as SpinnerButton } from'./spinners/SpinnerButton.svelte'
|
|
|
98
98
|
// Tabs
|
|
99
99
|
export { default as InteractiveTabHead } from './tabs/InteractiveTabHead.svelte'
|
|
100
100
|
export { default as InteractiveTabs } from'./tabs/InteractiveTabs.svelte'
|
|
101
|
-
export { default as DefaultTabs } from'./tabs/DefaultTabs.svelte'
|
|
101
|
+
export { default as DefaultTabs } from './tabs/DefaultTabs.svelte'
|
|
102
|
+
export { default as FullWidthTabs } from './tabs/FullWidthTabs.svelte'
|
|
103
|
+
export { default as IconTabs } from './tabs/IconTabs.svelte'
|
|
102
104
|
export { default as PillTabs } from './tabs/PillTabs.svelte'
|
|
103
105
|
export { default as TabContent } from './tabs/TabContent.svelte'
|
|
106
|
+
export { default as UnderlineTabs } from './tabs/UnderlineTabs.svelte'
|
|
104
107
|
|
|
105
108
|
// Timeline
|
|
106
109
|
export { default as Group } from './timelines/Group.svelte'
|
|
@@ -113,8 +116,6 @@ export { default as TimelineHorizontal } from './timelines/TimelineHorizontal.sv
|
|
|
113
116
|
export { default as TimelineItemHorizontal } from './timelines/TimelineItemHorizontal.svelte'
|
|
114
117
|
export { default as TimelineItemVertical } from './timelines/TimelineItemVertical.svelte'
|
|
115
118
|
|
|
116
|
-
|
|
117
|
-
|
|
118
119
|
// Toast
|
|
119
120
|
export { default as Toast } from './toasts/Toast.svelte'
|
|
120
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -137,10 +137,13 @@
|
|
|
137
137
|
"./spinners/SpinnerButton.svelte": "./spinners/SpinnerButton.svelte",
|
|
138
138
|
"./tables/Table.svelte": "./tables/Table.svelte",
|
|
139
139
|
"./tabs/DefaultTabs.svelte": "./tabs/DefaultTabs.svelte",
|
|
140
|
+
"./tabs/FullWidthTabs.svelte": "./tabs/FullWidthTabs.svelte",
|
|
141
|
+
"./tabs/IconTabs.svelte": "./tabs/IconTabs.svelte",
|
|
140
142
|
"./tabs/InteractiveTabHead.svelte": "./tabs/InteractiveTabHead.svelte",
|
|
141
143
|
"./tabs/InteractiveTabs.svelte": "./tabs/InteractiveTabs.svelte",
|
|
142
144
|
"./tabs/PillTabs.svelte": "./tabs/PillTabs.svelte",
|
|
143
145
|
"./tabs/TabContent.svelte": "./tabs/TabContent.svelte",
|
|
146
|
+
"./tabs/UnderlineTabs.svelte": "./tabs/UnderlineTabs.svelte",
|
|
144
147
|
"./tabs/tabStore": "./tabs/tabStore.js",
|
|
145
148
|
"./timelines/Activity.svelte": "./timelines/Activity.svelte",
|
|
146
149
|
"./timelines/ActivityItem.svelte": "./timelines/ActivityItem.svelte",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script >export let tabs;
|
|
2
|
+
export let tabLabel;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class="sm:hidden">
|
|
6
|
+
<label for="tabs" class="sr-only">{tabLabel}</label>
|
|
7
|
+
<select
|
|
8
|
+
id="tabs"
|
|
9
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 sm: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"
|
|
10
|
+
>
|
|
11
|
+
{#each tabs as { name }}
|
|
12
|
+
<option>{name}</option>
|
|
13
|
+
{/each}
|
|
14
|
+
</select>
|
|
15
|
+
</div>
|
|
16
|
+
<ul
|
|
17
|
+
class="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"
|
|
18
|
+
>
|
|
19
|
+
{#each tabs as { name, href, rel, active }}
|
|
20
|
+
<li class="w-full">
|
|
21
|
+
<a
|
|
22
|
+
{href}
|
|
23
|
+
{rel}
|
|
24
|
+
class={active
|
|
25
|
+
? 'inline-block p-4 w-full text-gray-900 bg-gray-100 rounded-l-lg focus:ring-4 focus:ring-blue-300 active focus:outline-none dark:bg-gray-700 dark:text-white'
|
|
26
|
+
: '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'}
|
|
27
|
+
aria-current="page">{name}</a
|
|
28
|
+
>
|
|
29
|
+
</li>
|
|
30
|
+
{/each}
|
|
31
|
+
</ul>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { TabType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
tabs: TabType[];
|
|
6
|
+
tabLabel: string;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type FullWidthTabsProps = typeof __propDef.props;
|
|
14
|
+
export declare type FullWidthTabsEvents = typeof __propDef.events;
|
|
15
|
+
export declare type FullWidthTabsSlots = typeof __propDef.slots;
|
|
16
|
+
export default class FullWidthTabs extends SvelteComponentTyped<FullWidthTabsProps, FullWidthTabsEvents, FullWidthTabsSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script >export let tabs;
|
|
2
|
+
export let iconClass = 'mr-2 w-5 h-5 text-gray-400 group-hover:text-gray-500 dark:text-gray-500 dark:group-hover:text-gray-300';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class="border-b border-gray-200 dark:border-gray-700">
|
|
6
|
+
<ul
|
|
7
|
+
class="flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500 dark:text-gray-400"
|
|
8
|
+
>
|
|
9
|
+
{#each tabs as { name, active, href, rel, icon }}
|
|
10
|
+
<li class="mr-2">
|
|
11
|
+
<a
|
|
12
|
+
{href}
|
|
13
|
+
{rel}
|
|
14
|
+
class={active
|
|
15
|
+
? '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'
|
|
16
|
+
: ' 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 '}
|
|
17
|
+
>
|
|
18
|
+
<svelte:component this={icon} className={iconClass} />
|
|
19
|
+
{name}
|
|
20
|
+
</a>
|
|
21
|
+
</li>
|
|
22
|
+
{/each}
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { IconTabType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
tabs: IconTabType[];
|
|
6
|
+
iconClass?: string;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type IconTabsProps = typeof __propDef.props;
|
|
14
|
+
export declare type IconTabsEvents = typeof __propDef.events;
|
|
15
|
+
export declare type IconTabsSlots = typeof __propDef.slots;
|
|
16
|
+
export default class IconTabs extends SvelteComponentTyped<IconTabsProps, IconTabsEvents, IconTabsSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script >export let divClass = 'text-sm font-medium text-center text-gray-500 border-b border-gray-200 dark:text-gray-400 dark:border-gray-700';
|
|
2
|
+
export let tabs;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class={divClass}>
|
|
6
|
+
<ul class="flex flex-wrap -mb-px">
|
|
7
|
+
{#each tabs as { name, active, href, rel }}
|
|
8
|
+
<li class="mr-2">
|
|
9
|
+
<a
|
|
10
|
+
{href}
|
|
11
|
+
{rel}
|
|
12
|
+
class={active
|
|
13
|
+
? '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'
|
|
14
|
+
: ' 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 '}
|
|
15
|
+
>{name}</a
|
|
16
|
+
>
|
|
17
|
+
</li>
|
|
18
|
+
{/each}
|
|
19
|
+
</ul>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { TabType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
divClass?: string;
|
|
6
|
+
tabs: TabType[];
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type UnderlineTabsProps = typeof __propDef.props;
|
|
14
|
+
export declare type UnderlineTabsEvents = typeof __propDef.events;
|
|
15
|
+
export declare type UnderlineTabsSlots = typeof __propDef.slots;
|
|
16
|
+
export default class UnderlineTabs extends SvelteComponentTyped<UnderlineTabsProps, UnderlineTabsEvents, UnderlineTabsSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/types.d.ts
CHANGED
|
@@ -43,6 +43,13 @@ export interface TabType {
|
|
|
43
43
|
href: string;
|
|
44
44
|
rel?: string;
|
|
45
45
|
}
|
|
46
|
+
export interface IconTabType {
|
|
47
|
+
name: string;
|
|
48
|
+
active: boolean;
|
|
49
|
+
href: string;
|
|
50
|
+
rel?: string;
|
|
51
|
+
icon?: typeof SvelteComponent;
|
|
52
|
+
}
|
|
46
53
|
export interface InteractiveTabType {
|
|
47
54
|
name: string;
|
|
48
55
|
id: number;
|