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 +8 -0
- package/dropdowns/DropdownItem.svelte +22 -16
- package/forms/Radio.svelte +2 -3
- package/package.json +1 -1
- package/utils/Popper.svelte +4 -3
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
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
</
|
|
27
|
-
|
|
32
|
+
</li>
|
|
33
|
+
{/if}
|
package/forms/Radio.svelte
CHANGED
|
@@ -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={
|
|
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
package/utils/Popper.svelte
CHANGED
|
@@ -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>
|