flowbite-svelte 0.15.14 → 0.15.17
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/CHANGELOG.md +25 -0
- package/accordions/AccordionItem.svelte +15 -22
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.15.17](https://github.com/themesberg/flowbite-svelte/compare/v0.15.16...v0.15.17) (2022-05-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* remove svelte-collapse from Accordion component ([7b8a642](https://github.com/themesberg/flowbite-svelte/commit/7b8a642284947c7b8c6bbabecad2ddb2cc1f3d04))
|
|
11
|
+
* update svelte-sidebar-menu to 0.8.4 ([3b07355](https://github.com/themesberg/flowbite-svelte/commit/3b073553c392f4adb47254beb49769d4e150eaa4))
|
|
12
|
+
|
|
13
|
+
### [0.15.16](https://github.com/themesberg/flowbite-svelte/compare/v0.15.15...v0.15.16) (2022-05-09)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* remove __layout from pages dir ([7224e31](https://github.com/themesberg/flowbite-svelte/commit/7224e31b66009bd6fcf207e8da1f69ccec159728))
|
|
19
|
+
* remove rel=external from __layout since it doesn't show the sidemenu ([a0cee08](https://github.com/themesberg/flowbite-svelte/commit/a0cee08e3312a66bdc1a4e070ca45abb0fdc7a84))
|
|
20
|
+
* update svelte-sidebar-menu ([59b37b5](https://github.com/themesberg/flowbite-svelte/commit/59b37b5a8f3bea06ecd8b8fdf5cc5ac5967dd149))
|
|
21
|
+
* update svelte-sidebar-menu and __layout ([9314f7a](https://github.com/themesberg/flowbite-svelte/commit/9314f7ac55204505f4cffe2e166b36c474a92985))
|
|
22
|
+
|
|
23
|
+
### [0.15.15](https://github.com/themesberg/flowbite-svelte/compare/v0.15.14...v0.15.15) (2022-05-07)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* update svelte-sidebar-menu ([f6fb17f](https://github.com/themesberg/flowbite-svelte/commit/f6fb17f3ea37ea0fd0a489dc3e167849d372e367))
|
|
29
|
+
|
|
5
30
|
### [0.15.14](https://github.com/themesberg/flowbite-svelte/compare/v0.15.13...v0.15.14) (2022-05-06)
|
|
6
31
|
|
|
7
32
|
|
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import collapse from 'svelte-collapse';
|
|
1
|
+
<script>import { slide } from 'svelte/transition';
|
|
3
2
|
import { ChevronDownSolid, ChevronUpSolid } from 'svelte-heros';
|
|
4
3
|
export let id = '';
|
|
5
4
|
export let btnClass = 'flex items-center focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 justify-between p-5 w-full font-medium border border-gray-200 dark:border-gray-700 text-left text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800';
|
|
6
5
|
export let slotClass = 'p-5 border border-t-0 border-gray-200 dark:border-gray-700';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
const handleToggle = () => {
|
|
14
|
-
if (params.open) {
|
|
15
|
-
store.update((s) => Object.assign(s, { id: null }));
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
store.update((s) => Object.assign(s, { id }));
|
|
19
|
-
}
|
|
6
|
+
let isOpen = false;
|
|
7
|
+
let activeDropdown = undefined;
|
|
8
|
+
const handleToggle = (id) => {
|
|
9
|
+
isOpen = !isOpen;
|
|
10
|
+
activeDropdown = id;
|
|
20
11
|
};
|
|
21
12
|
</script>
|
|
22
13
|
|
|
23
|
-
<h2 aria-expanded={
|
|
24
|
-
<button on:click={handleToggle} type="button" class:rounded-t-xl={id === '1'} class:border-t-0={id !== '1'} class={btnClass}>
|
|
14
|
+
<h2 aria-expanded={isOpen}>
|
|
15
|
+
<button on:click={() => handleToggle(id)} type="button" class:rounded-t-xl={id === '1'} class:border-t-0={id !== '1'} class={btnClass}>
|
|
25
16
|
<span><slot name="header" /></span>
|
|
26
|
-
{#if
|
|
17
|
+
{#if isOpen}
|
|
27
18
|
<ChevronUpSolid />
|
|
28
19
|
{:else}
|
|
29
20
|
<ChevronDownSolid />
|
|
30
21
|
{/if}
|
|
31
22
|
</button>
|
|
32
23
|
</h2>
|
|
33
|
-
|
|
34
|
-
<div
|
|
35
|
-
<
|
|
24
|
+
{#if isOpen}
|
|
25
|
+
<div transition:slide={{ duration: 500 }}>
|
|
26
|
+
<div class={slotClass}>
|
|
27
|
+
<slot name="body" />
|
|
28
|
+
</div>
|
|
36
29
|
</div>
|
|
37
|
-
|
|
30
|
+
{/if}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.17",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"svelte-check": "^2.2.6",
|
|
34
34
|
"svelte-feathers": "^0.1.15",
|
|
35
35
|
"svelte-preprocess": "^4.10.5",
|
|
36
|
-
"svelte-sidebar-menu": "^0.
|
|
36
|
+
"svelte-sidebar-menu": "^0.8.4",
|
|
37
37
|
"svelte-simples": "^0.3.1",
|
|
38
38
|
"svelte2tsx": "^0.5.9",
|
|
39
39
|
"tailwindcss": "^3.0.23",
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"flowbite": "^1.4.2",
|
|
82
|
-
"svelte-collapse": "^0.0.4",
|
|
83
82
|
"svelte-heros": "^2.0.0"
|
|
84
83
|
},
|
|
85
84
|
"exports": {
|