flowbite-svelte 0.15.15 → 0.15.18

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 CHANGED
@@ -2,6 +2,26 @@
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.18](https://github.com/themesberg/flowbite-svelte/compare/v0.15.17...v0.15.18) (2022-05-10)
6
+
7
+ ### [0.15.17](https://github.com/themesberg/flowbite-svelte/compare/v0.15.16...v0.15.17) (2022-05-09)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * remove svelte-collapse from Accordion component ([7b8a642](https://github.com/themesberg/flowbite-svelte/commit/7b8a642284947c7b8c6bbabecad2ddb2cc1f3d04))
13
+ * update svelte-sidebar-menu to 0.8.4 ([3b07355](https://github.com/themesberg/flowbite-svelte/commit/3b073553c392f4adb47254beb49769d4e150eaa4))
14
+
15
+ ### [0.15.16](https://github.com/themesberg/flowbite-svelte/compare/v0.15.15...v0.15.16) (2022-05-09)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * remove __layout from pages dir ([7224e31](https://github.com/themesberg/flowbite-svelte/commit/7224e31b66009bd6fcf207e8da1f69ccec159728))
21
+ * remove rel=external from __layout since it doesn't show the sidemenu ([a0cee08](https://github.com/themesberg/flowbite-svelte/commit/a0cee08e3312a66bdc1a4e070ca45abb0fdc7a84))
22
+ * update svelte-sidebar-menu ([59b37b5](https://github.com/themesberg/flowbite-svelte/commit/59b37b5a8f3bea06ecd8b8fdf5cc5ac5967dd149))
23
+ * update svelte-sidebar-menu and __layout ([9314f7a](https://github.com/themesberg/flowbite-svelte/commit/9314f7ac55204505f4cffe2e166b36c474a92985))
24
+
5
25
  ### [0.15.15](https://github.com/themesberg/flowbite-svelte/compare/v0.15.14...v0.15.15) (2022-05-07)
6
26
 
7
27
 
@@ -1,37 +1,30 @@
1
- <script>import { getContext } from 'svelte';
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
- const store = getContext('svelte-collapsible-accordion');
8
- $: params = {
9
- open: $store.id === id,
10
- duration: $store.duration,
11
- easing: $store.easing
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={params.open}>
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 params.open}
17
+ {#if isOpen}
27
18
  <ChevronUpSolid />
28
19
  {:else}
29
20
  <ChevronDownSolid />
30
21
  {/if}
31
22
  </button>
32
23
  </h2>
33
- <div use:collapse={params}>
34
- <div class={slotClass}>
35
- <slot name="body" />
24
+ {#if isOpen}
25
+ <div transition:slide={{ duration: 500 }}>
26
+ <div class={slotClass}>
27
+ <slot name="body" />
28
+ </div>
36
29
  </div>
37
- </div>
30
+ {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.15.15",
3
+ "version": "0.15.18",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "./package/index.js",
6
6
  "author": {
@@ -12,7 +12,6 @@
12
12
  "homepage": "https://flowbite-svelte.com/",
13
13
  "license": "MIT",
14
14
  "devDependencies": {
15
- "@codewithshin/svelte-utterances": "^0.2.2",
16
15
  "@playwright/test": "^1.21.0",
17
16
  "@sveltejs/adapter-auto": "next",
18
17
  "@sveltejs/kit": "next",
@@ -31,10 +30,8 @@
31
30
  "prism-themes": "^1.9.0",
32
31
  "svelte": "^3.47.0",
33
32
  "svelte-check": "^2.2.6",
34
- "svelte-feathers": "^0.1.15",
35
33
  "svelte-preprocess": "^4.10.5",
36
- "svelte-sidebar-menu": "^0.7.5",
37
- "svelte-simples": "^0.3.1",
34
+ "svelte-sidebar-menu": "^0.8.4",
38
35
  "svelte2tsx": "^0.5.9",
39
36
  "tailwindcss": "^3.0.23",
40
37
  "tslib": "^2.3.1",
@@ -79,7 +76,6 @@
79
76
  },
80
77
  "dependencies": {
81
78
  "flowbite": "^1.4.2",
82
- "svelte-collapse": "^0.0.4",
83
79
  "svelte-heros": "^2.0.0"
84
80
  },
85
81
  "exports": {