flowbite-svelte 0.26.14 → 0.26.15

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,14 @@
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.15](https://github.com/themesberg/flowbite-svelte/compare/v0.26.14...v0.26.15) (2022-09-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * dropdowns events docs ([a6d86b6](https://github.com/themesberg/flowbite-svelte/commit/a6d86b671a5c481288a20c1fe68cfcfe0faea880))
11
+ * dropdowns tweaks ([ad797ca](https://github.com/themesberg/flowbite-svelte/commit/ad797ca4a4a60abd7723b3b1415e70fb6e1328a6))
12
+
5
13
  ### [0.26.14](https://github.com/themesberg/flowbite-svelte/compare/v0.26.13...v0.26.14) (2022-09-06)
6
14
 
7
15
 
@@ -8,20 +8,26 @@ const colors = {
8
8
  };
9
9
  </script>
10
10
 
11
- <li>
12
- <svelte:element
13
- this={href ? 'a' : 'div'}
14
- {href}
15
- {...$$restProps}
16
- class={classNames(liClass, colors[color] ?? colors.default, $$props.class)}
17
- on:click
18
- on:change
19
- on:keydown
20
- on:keyup
21
- on:focus
22
- on:blur
23
- on:mouseenter
24
- on:mouseleave>
11
+ {#if href}
12
+ <li>
13
+ <svelte:element
14
+ this={href ? 'a' : 'div'}
15
+ {href}
16
+ {...$$restProps}
17
+ class={classNames(liClass, colors[color] ?? colors.default, $$props.class)}
18
+ on:click
19
+ on:change
20
+ on:keydown
21
+ on:keyup
22
+ on:focus
23
+ on:blur
24
+ on:mouseenter
25
+ on:mouseleave>
26
+ <slot />
27
+ </svelte:element>
28
+ </li>
29
+ {:else}
30
+ <li class={classNames(liClass, colors[color] ?? colors.default, $$props.class)}>
25
31
  <slot />
26
- </svelte:element>
27
- </li>
32
+ </li>
33
+ {/if}
@@ -37,7 +37,7 @@ export let value = '';
37
37
  let background = getContext('background');
38
38
  </script>
39
39
 
40
- <Label class={labelClass(inline, $$props.class)} show={!!$$slots.default}>
40
+ <Label class={labelClass(inline, $$props.class)} show={$$slots.default}>
41
41
  <input
42
42
  type="radio"
43
43
  bind:group
@@ -54,6 +54,5 @@ let background = getContext('background');
54
54
  on:paste
55
55
  {value}
56
56
  {...$$restProps}
57
- class={inputClass(custom, color, false, background, $$slots.default || $$props.class)}
58
- /><slot />
57
+ class={inputClass(custom, color, false, background, $$slots.default || $$props.class)} /><slot />
59
58
  </Label>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.26.14",
3
+ "version": "0.26.15",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -61,11 +61,13 @@ function init(node, _triggerEl) {
61
61
  name: 'offset',
62
62
  options: {
63
63
  offset: ({ placement, reference, popper }) => {
64
+ // for full screen mega menu
64
65
  return [yOnly ? popper.width / 2 - reference.width / 2 - reference.x : 0, offset];
65
66
  }
66
67
  }
67
68
  },
68
- { name: 'eventListeners', enabled: open }
69
+ { name: 'eventListeners', enabled: open },
70
+ { name: 'flip', enabled: false }
69
71
  ]
70
72
  });
71
73
  return {
@@ -127,8 +129,7 @@ onMount(() => {
127
129
  on:mouseenter={showHandler}
128
130
  on:mouseleave={activeContent && !clickable ? hideHandler : undefined}
129
131
  {...$$restProps}
130
- class={classNames('z-10', $$props.class)}
131
- style="position: absolute;">
132
+ class={classNames('z-10', $$props.class)}>
132
133
  <slot />
133
134
  {#if arrow}<div data-popper-arrow />{/if}
134
135
  </Frame>