flowbite-svelte 0.13.2 → 0.13.3
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 +7 -0
- package/modals/ExtraLargeModal.svelte +11 -4
- package/modals/LargeModal.svelte +10 -4
- package/modals/MediumModal.svelte +11 -5
- package/modals/SignInModal.svelte +12 -4
- package/modals/SmallModal.svelte +10 -4
- package/package.json +4 -3
- package/tables/Table.svelte +14 -14
- package/tables/TableCheckbox.svelte +28 -0
- package/tables/TableCheckbox.svelte.d.ts +21 -0
- package/tables/TableCheckboxRow.svelte +0 -0
- package/tables/TableCheckboxRow.svelte.d.ts +19 -0
- package/tables/TableDefaultRow.svelte +45 -45
package/README.md
CHANGED
|
@@ -139,8 +139,17 @@ else {
|
|
|
139
139
|
</script>
|
|
140
140
|
|
|
141
141
|
{#if showModalId === id}
|
|
142
|
-
<div
|
|
143
|
-
|
|
142
|
+
<div
|
|
143
|
+
on:click={closeModal}
|
|
144
|
+
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
|
|
145
|
+
>
|
|
146
|
+
<!-- Main modal -->
|
|
147
|
+
<div
|
|
148
|
+
on:click|stopPropagation={() => {}}
|
|
149
|
+
role="dialog"
|
|
150
|
+
aria-modal="true"
|
|
151
|
+
class="mx-auto my-20 px-4 w-full max-w-7xl h-full md:h-auto"
|
|
152
|
+
>
|
|
144
153
|
<!-- Modal content -->
|
|
145
154
|
<div class={divClass}>
|
|
146
155
|
<!-- Modal header -->
|
|
@@ -170,6 +179,4 @@ else {
|
|
|
170
179
|
</div>
|
|
171
180
|
</div>
|
|
172
181
|
</div>
|
|
173
|
-
|
|
174
|
-
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
175
182
|
{/if}
|
package/modals/LargeModal.svelte
CHANGED
|
@@ -140,8 +140,16 @@ else {
|
|
|
140
140
|
|
|
141
141
|
{#if showModalId === id}
|
|
142
142
|
<!-- Large Modal -->
|
|
143
|
-
<div
|
|
144
|
-
|
|
143
|
+
<div
|
|
144
|
+
on:click={closeModal}
|
|
145
|
+
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
|
|
146
|
+
>
|
|
147
|
+
<div
|
|
148
|
+
on:click|stopPropagation={() => {}}
|
|
149
|
+
role="dialog"
|
|
150
|
+
aria-modal="true"
|
|
151
|
+
class="mx-auto my-20 px-4 w-full max-w-4xl h-full md:h-auto"
|
|
152
|
+
>
|
|
145
153
|
<!-- Modal content -->
|
|
146
154
|
<div class={divClass}>
|
|
147
155
|
<!-- Modal header -->
|
|
@@ -171,6 +179,4 @@ else {
|
|
|
171
179
|
</div>
|
|
172
180
|
</div>
|
|
173
181
|
</div>
|
|
174
|
-
|
|
175
|
-
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
176
182
|
{/if}
|
|
@@ -140,9 +140,17 @@ else {
|
|
|
140
140
|
</script>
|
|
141
141
|
|
|
142
142
|
{#if showModalId === id}
|
|
143
|
-
<!--
|
|
144
|
-
<div
|
|
145
|
-
|
|
143
|
+
<!-- Medium modal -->
|
|
144
|
+
<div
|
|
145
|
+
on:click={closeModal}
|
|
146
|
+
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
on:click|stopPropagation={() => {}}
|
|
150
|
+
role="dialog"
|
|
151
|
+
aria-modal="true"
|
|
152
|
+
class="mx-auto my-20 px-4 w-full max-w-2xl h-full md:h-auto"
|
|
153
|
+
>
|
|
146
154
|
<!-- Modal content -->
|
|
147
155
|
<div class={divClass}>
|
|
148
156
|
<!-- Modal header -->
|
|
@@ -174,6 +182,4 @@ else {
|
|
|
174
182
|
</div>
|
|
175
183
|
</div>
|
|
176
184
|
</div>
|
|
177
|
-
|
|
178
|
-
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
179
185
|
{/if}
|
|
@@ -45,9 +45,18 @@ else {
|
|
|
45
45
|
</script>
|
|
46
46
|
|
|
47
47
|
{#if showModalId === id}
|
|
48
|
-
<div
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
<div
|
|
49
|
+
on:click={closeModal}
|
|
50
|
+
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
|
|
51
|
+
>
|
|
52
|
+
<!-- Main modal -->
|
|
53
|
+
<div
|
|
54
|
+
on:click|stopPropagation={() => {}}
|
|
55
|
+
role="dialog"
|
|
56
|
+
aria-modal="true"
|
|
57
|
+
class="mx-auto my-20 px-4 w-full max-w-md h-full md:h-auto"
|
|
58
|
+
>
|
|
59
|
+
<div class="bg-white rounded-lg shadow dark:bg-gray-700">
|
|
51
60
|
<div class="flex justify-end p-2">
|
|
52
61
|
<button type="button" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white" on:click={closeModal}>
|
|
53
62
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
|
|
@@ -90,5 +99,4 @@ else {
|
|
|
90
99
|
</div>
|
|
91
100
|
</div>
|
|
92
101
|
</div>
|
|
93
|
-
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
94
102
|
{/if}
|
package/modals/SmallModal.svelte
CHANGED
|
@@ -140,8 +140,16 @@ else {
|
|
|
140
140
|
|
|
141
141
|
{#if showModalId === id}
|
|
142
142
|
<!-- Small Modal Component -->
|
|
143
|
-
<div
|
|
144
|
-
|
|
143
|
+
<div
|
|
144
|
+
on:click={closeModal}
|
|
145
|
+
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
|
|
146
|
+
>
|
|
147
|
+
<div
|
|
148
|
+
on:click|stopPropagation={() => {}}
|
|
149
|
+
role="dialog"
|
|
150
|
+
aria-modal="true"
|
|
151
|
+
class="mx-auto my-20 px-4 w-full max-w-md h-full md:h-auto"
|
|
152
|
+
>
|
|
145
153
|
<!-- Modal content -->
|
|
146
154
|
<div class={divClass}>
|
|
147
155
|
<!-- Modal header -->
|
|
@@ -171,6 +179,4 @@ else {
|
|
|
171
179
|
</div>
|
|
172
180
|
</div>
|
|
173
181
|
</div>
|
|
174
|
-
|
|
175
|
-
<div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
|
|
176
182
|
{/if}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"homepage": "https://github.com/shinokada/flowbite-svelte",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@codewithshin/svelte-sidebar": "^0.4.
|
|
15
|
+
"@codewithshin/svelte-sidebar": "^0.4.5",
|
|
16
16
|
"@codewithshin/svelte-simpleicons": "^0.2.2",
|
|
17
17
|
"@codewithshin/svelte-utterances": "^0.1.2",
|
|
18
18
|
"@playwright/test": "^1.19.1",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"prettier": "^2.5.1",
|
|
31
31
|
"prettier-plugin-svelte": "^2.5.0",
|
|
32
32
|
"prism-themes": "^1.9.0",
|
|
33
|
-
"prismjs": "^1.27.0",
|
|
34
33
|
"svelte": "^3.44.0",
|
|
35
34
|
"svelte-check": "^2.2.6",
|
|
36
35
|
"svelte-preprocess": "^4.10.1",
|
|
@@ -137,6 +136,8 @@
|
|
|
137
136
|
"./spinners/Spinner.svelte": "./spinners/Spinner.svelte",
|
|
138
137
|
"./spinners/SpinnerButton.svelte": "./spinners/SpinnerButton.svelte",
|
|
139
138
|
"./tables/Table.svelte": "./tables/Table.svelte",
|
|
139
|
+
"./tables/TableCheckbox.svelte": "./tables/TableCheckbox.svelte",
|
|
140
|
+
"./tables/TableCheckboxRow.svelte": "./tables/TableCheckboxRow.svelte",
|
|
140
141
|
"./tables/TableDefaultRow.svelte": "./tables/TableDefaultRow.svelte",
|
|
141
142
|
"./tabs/DefaultTabs.svelte": "./tabs/DefaultTabs.svelte",
|
|
142
143
|
"./tabs/FullWidthTabs.svelte": "./tabs/FullWidthTabs.svelte",
|
package/tables/Table.svelte
CHANGED
|
@@ -5,18 +5,18 @@ export let theadClass = 'text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<div class={divClass}>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
<table class={tableClass}>
|
|
9
|
+
<thead class={theadClass}>
|
|
10
|
+
<tr>
|
|
11
|
+
{#each header as column}
|
|
12
|
+
<th scope="col" class="px-6 py-3">
|
|
13
|
+
{column}
|
|
14
|
+
</th>
|
|
15
|
+
{/each}
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody>
|
|
19
|
+
<slot />
|
|
20
|
+
</tbody>
|
|
21
|
+
</table>
|
|
22
22
|
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script >export let header;
|
|
2
|
+
export let divClass = 'relative overflow-x-auto shadow-md sm:rounded-lg';
|
|
3
|
+
export let tableClass = 'w-full text-sm text-left text-gray-500 dark:text-gray-400';
|
|
4
|
+
export let theadClass = 'text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400';
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div class={divClass}>
|
|
8
|
+
<table class={tableClass}>
|
|
9
|
+
<thead class={theadClass}>
|
|
10
|
+
<tr>
|
|
11
|
+
<th scope="col" class="p-4">
|
|
12
|
+
<div class="flex items-center">
|
|
13
|
+
<input id="checkbox-all" type="checkbox" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
14
|
+
<label for="checkbox-all" class="sr-only">checkbox</label>
|
|
15
|
+
</div>
|
|
16
|
+
</th>
|
|
17
|
+
{#each header as column}
|
|
18
|
+
<th scope="col" class="px-6 py-3">
|
|
19
|
+
{column}
|
|
20
|
+
</th>
|
|
21
|
+
{/each}
|
|
22
|
+
</tr>
|
|
23
|
+
</thead>
|
|
24
|
+
<tbody>
|
|
25
|
+
<slot />
|
|
26
|
+
</tbody>
|
|
27
|
+
</table>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
header: Array<string>;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
tableClass?: string;
|
|
7
|
+
theadClass?: string;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {
|
|
13
|
+
default: {};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare type TableCheckboxProps = typeof __propDef.props;
|
|
17
|
+
export declare type TableCheckboxEvents = typeof __propDef.events;
|
|
18
|
+
export declare type TableCheckboxSlots = typeof __propDef.slots;
|
|
19
|
+
export default class TableCheckbox extends SvelteComponentTyped<TableCheckboxProps, TableCheckboxEvents, TableCheckboxSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableCheckboxRowProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableCheckboxRowEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableCheckboxRowSlots */
|
|
4
|
+
export default class TableCheckboxRow extends SvelteComponentTyped<{}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> {
|
|
7
|
+
}
|
|
8
|
+
export type TableCheckboxRowProps = typeof __propDef.props;
|
|
9
|
+
export type TableCheckboxRowEvents = typeof __propDef.events;
|
|
10
|
+
export type TableCheckboxRowSlots = typeof __propDef.slots;
|
|
11
|
+
import { SvelteComponentTyped } from "svelte";
|
|
12
|
+
declare const __propDef: {
|
|
13
|
+
props: {};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -18,49 +18,49 @@ else {
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
{#each items as item, i}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
21
|
+
{#if i === items.length - 1}
|
|
22
|
+
<tr class={trLastClass}>
|
|
23
|
+
{#each item as cell, j}
|
|
24
|
+
{#if j === 0}
|
|
25
|
+
<th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
|
|
26
|
+
{#if html}
|
|
27
|
+
{@html cell}
|
|
28
|
+
{:else}
|
|
29
|
+
{cell}
|
|
30
|
+
{/if}
|
|
31
|
+
</th>
|
|
32
|
+
{:else}
|
|
33
|
+
<td class="px-6 py-4">
|
|
34
|
+
{#if html}
|
|
35
|
+
{@html cell}
|
|
36
|
+
{:else}
|
|
37
|
+
{cell}
|
|
38
|
+
{/if}
|
|
39
|
+
</td>
|
|
40
|
+
{/if}
|
|
41
|
+
{/each}
|
|
42
|
+
</tr>
|
|
43
|
+
{:else}
|
|
44
|
+
<tr class={trClass}>
|
|
45
|
+
{#each item as cell, j}
|
|
46
|
+
{#if j === 0}
|
|
47
|
+
<th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
|
|
48
|
+
{#if html}
|
|
49
|
+
{@html cell}
|
|
50
|
+
{:else}
|
|
51
|
+
{cell}
|
|
52
|
+
{/if}
|
|
53
|
+
</th>
|
|
54
|
+
{:else}
|
|
55
|
+
<td class="px-6 py-4">
|
|
56
|
+
{#if html}
|
|
57
|
+
{@html cell}
|
|
58
|
+
{:else}
|
|
59
|
+
{cell}
|
|
60
|
+
{/if}
|
|
61
|
+
</td>
|
|
62
|
+
{/if}
|
|
63
|
+
{/each}
|
|
64
|
+
</tr>
|
|
65
|
+
{/if}
|
|
66
66
|
{/each}
|