flowbite-svelte 0.26.15 → 0.26.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,43 @@
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.26.18](https://github.com/themesberg/flowbite-svelte/compare/v0.26.17...v0.26.18) (2022-09-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * [#281](https://github.com/themesberg/flowbite-svelte/issues/281) ([5f79a5e](https://github.com/themesberg/flowbite-svelte/commit/5f79a5e27e23f568ae8e82d3ee974eea93eaccab))
11
+ * use relative paths instead of $lib alias inside of lib ([96e9d6b](https://github.com/themesberg/flowbite-svelte/commit/96e9d6bacb81761a26b0e43215c53ae24deffc73))
12
+
13
+ ### [0.26.17](https://github.com/themesberg/flowbite-svelte/compare/v0.26.16...v0.26.17) (2022-09-11)
14
+
15
+
16
+ ### Features
17
+
18
+ * add active to SidebarItem component and an example in the page ([af80c2b](https://github.com/themesberg/flowbite-svelte/commit/af80c2b7c1d81e711bba0faca959e6501b31257c))
19
+ * add md files in components folder ([8d7e05a](https://github.com/themesberg/flowbite-svelte/commit/8d7e05a0098437ac7ddd3f9122a2c23f481e54cd))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * Drawer placement right ([4fe9283](https://github.com/themesberg/flowbite-svelte/commit/4fe928380f4bb95c59e311e7ccc3a8ae49fda89d))
25
+ * remove Datepicker from index ([f08230c](https://github.com/themesberg/flowbite-svelte/commit/f08230c84d29f172f1a30a6194e2694eb65f3e3e))
26
+ * remove Toc from layout since it needs to be updated ([2ea41a0](https://github.com/themesberg/flowbite-svelte/commit/2ea41a0c82bb8a7f583a001c1c5f598ac5855102))
27
+
28
+ ### [0.26.16](https://github.com/themesberg/flowbite-svelte/compare/v0.26.15...v0.26.16) (2022-09-06)
29
+
30
+
31
+ ### Features
32
+
33
+ * add offset position props to Drawer and example in the drawer page ([680d358](https://github.com/themesberg/flowbite-svelte/commit/680d358ef3d55df202ae2bcaf5deb9c3e6834c18))
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * [#273](https://github.com/themesberg/flowbite-svelte/issues/273) remove number from select value type ([529510b](https://github.com/themesberg/flowbite-svelte/commit/529510bc50e561b544175a350390d7f32291727c))
39
+ * [#274](https://github.com/themesberg/flowbite-svelte/issues/274) change the links to singular for blocks components ([7378935](https://github.com/themesberg/flowbite-svelte/commit/73789353f4d598722db88cecb595303e8d60ac31))
40
+ * index blocks names, e.g. Tooltips to Tooltip ([5f902b2](https://github.com/themesberg/flowbite-svelte/commit/5f902b22043838a3e3413679632c9516ea81b906))
41
+
5
42
  ### [0.26.15](https://github.com/themesberg/flowbite-svelte/compare/v0.26.14...v0.26.15) (2022-09-06)
6
43
 
7
44
 
@@ -3,6 +3,10 @@ import { fly, slide, blur, fade } from 'svelte/transition';
3
3
  import { clickOutside } from '../utils/clickOutside';
4
4
  export let hidden = true;
5
5
  export let position = 'fixed';
6
+ export let leftOffset = 'inset-y-0 left-0';
7
+ export let rightOffset = 'inset-y-0 right-0';
8
+ export let topOffset = 'inset-x-0 top-0';
9
+ export let bottomOffset = 'inset-x-0 bottom-0';
6
10
  export let width = 'w-80';
7
11
  export let backdrop = true;
8
12
  export let bgColor = 'bg-gray-900';
@@ -25,10 +29,10 @@ function multiple(node, params) {
25
29
  }
26
30
  }
27
31
  const placements = {
28
- left: 'inset-y-0 left-0',
29
- right: 'inset-y-0 right-0',
30
- top: 'inset-x-0 top-0',
31
- bottom: 'inset-x-0 bottom-0'
32
+ left: leftOffset,
33
+ right: rightOffset,
34
+ top: topOffset,
35
+ bottom: bottomOffset
32
36
  };
33
37
  const handleDrawer = () => {
34
38
  hidden = !hidden;
@@ -5,6 +5,10 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  hidden?: boolean;
7
7
  position?: 'fixed' | 'absolute';
8
+ leftOffset?: string;
9
+ rightOffset?: string;
10
+ topOffset?: string;
11
+ bottomOffset?: string;
8
12
  width?: string;
9
13
  backdrop?: boolean;
10
14
  bgColor?: string;
@@ -17,9 +17,9 @@ $: selectClass = classNames(common, underline ? underlineClass : defaultClass, s
17
17
  </script>
18
18
 
19
19
  <select {...$$restProps} bind:value class={selectClass} on:change on:input>
20
- <option disabled selected value="">{placeholder}</option>
20
+ <option disabled selected value="">{placeholder}</option>
21
21
 
22
- {#each items as { value, name }}
23
- <option {value}>{name}</option>
24
- {/each}
22
+ {#each items as { value, name }}
23
+ <option {value}>{name}</option>
24
+ {/each}
25
25
  </select>
@@ -4,7 +4,7 @@ declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
6
  items?: SelectOptionType[];
7
- value: string | number;
7
+ value: string;
8
8
  placeholder?: string;
9
9
  underline?: boolean;
10
10
  size?: 'sm' | 'md' | 'lg';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.26.15",
3
+ "version": "0.26.18",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -3,26 +3,28 @@ export let aClass = 'flex items-center p-2 text-base font-normal text-gray-900 r
3
3
  export let href = '';
4
4
  export let label = '';
5
5
  export let spanClass = 'ml-3';
6
+ export let activeClass = 'flex items-center p-2 text-base font-normal text-gray-900 bg-gray-200 dark:bg-gray-700 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700';
7
+ export let active = false;
6
8
  </script>
7
9
 
8
10
  <li>
9
- <a
10
- {...$$restProps}
11
- {href}
12
- on:blur
13
- on:click
14
- on:focus
15
- on:keydown
16
- on:keypress
17
- on:keyup
18
- on:mouseenter
19
- on:mouseleave
20
- on:mouseover
21
- class={classNames(aClass, $$props.class)}>
22
- <slot name="icon" />
23
- <span class={spanClass}>{label}</span>
24
- {#if $$slots.subtext}
25
- <slot name="subtext" />
26
- {/if}
27
- </a>
11
+ <a
12
+ {...$$restProps}
13
+ {href}
14
+ on:blur
15
+ on:click
16
+ on:focus
17
+ on:keydown
18
+ on:keypress
19
+ on:keyup
20
+ on:mouseenter
21
+ on:mouseleave
22
+ on:mouseover
23
+ class={classNames(active ? activeClass : aClass, $$props.class)}>
24
+ <slot name="icon" />
25
+ <span class={spanClass}>{label}</span>
26
+ {#if $$slots.subtext}
27
+ <slot name="subtext" />
28
+ {/if}
29
+ </a>
28
30
  </li>
@@ -6,6 +6,8 @@ declare const __propDef: {
6
6
  href?: string;
7
7
  label?: string;
8
8
  spanClass?: string;
9
+ activeClass?: string;
10
+ active?: boolean;
9
11
  };
10
12
  events: {
11
13
  blur: FocusEvent;