flowbite-svelte 0.22.1 → 0.22.4
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 +22 -0
- package/dropdowns/Dropdown.svelte +1 -8
- package/forms/Checkbox.svelte +2 -2
- package/forms/FloatingLabelInput.svelte +2 -0
- package/forms/FloatingLabelInput.svelte.d.ts +3 -0
- package/forms/Radio.svelte +2 -2
- package/forms/SimpleSearch.svelte +11 -2
- package/forms/SimpleSearch.svelte.d.ts +1 -0
- package/forms/Toggle.svelte +4 -1
- package/forms/Toggle.svelte.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
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.22.4](https://github.com/themesberg/flowbite-svelte/compare/v0.22.3...v0.22.4) (2022-07-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* [#165](https://github.com/themesberg/flowbite-svelte/issues/165) toggle bind:group bind:checked ([3ca4010](https://github.com/themesberg/flowbite-svelte/commit/3ca40109f13e31afa76e02c96d387ff476880e52))
|
|
11
|
+
* change from # to / for href ([b79fd81](https://github.com/themesberg/flowbite-svelte/commit/b79fd8112d2fb15657058dd0184b113228d8a6aa))
|
|
12
|
+
|
|
13
|
+
### [0.22.3](https://github.com/themesberg/flowbite-svelte/compare/v0.22.2...v0.22.3) (2022-07-21)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* for [#165](https://github.com/themesberg/flowbite-svelte/issues/165) and [#170](https://github.com/themesberg/flowbite-svelte/issues/170) and changed $$restProps.class to $$props.class ([99399b8](https://github.com/themesberg/flowbite-svelte/commit/99399b8aebdec68bc5c52641ed768dc601fe36a2))
|
|
19
|
+
|
|
20
|
+
### [0.22.2](https://github.com/themesberg/flowbite-svelte/compare/v0.22.1...v0.22.2) (2022-07-21)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* update for [#165](https://github.com/themesberg/flowbite-svelte/issues/165) and [#170](https://github.com/themesberg/flowbite-svelte/issues/170) ([ff43f26](https://github.com/themesberg/flowbite-svelte/commit/ff43f265b163d2c3ac7a145772e18a95326c0651))
|
|
26
|
+
|
|
5
27
|
### [0.22.1](https://github.com/themesberg/flowbite-svelte/compare/v0.22.0...v0.22.1) (2022-07-20)
|
|
6
28
|
|
|
7
29
|
|
|
@@ -35,14 +35,7 @@ $: icon = icons[placement.split('-')[0]];
|
|
|
35
35
|
{/if}
|
|
36
36
|
</button>
|
|
37
37
|
{:else}
|
|
38
|
-
<Button
|
|
39
|
-
pill={$$props.pill}
|
|
40
|
-
outline={$$props.outline}
|
|
41
|
-
color={$$props.color}
|
|
42
|
-
size={$$props.size}
|
|
43
|
-
icon={$$props.icon}
|
|
44
|
-
gradient={$$props.gradient}
|
|
45
|
-
>
|
|
38
|
+
<Button {...$$restProps}>
|
|
46
39
|
<slot name="label">{label}</slot>
|
|
47
40
|
{#if arrowIcon}
|
|
48
41
|
<svelte:component this={icon ?? ChevronDown} class="ml-2 h-4 w-4" />
|
package/forms/Checkbox.svelte
CHANGED
|
@@ -30,13 +30,13 @@ $: {
|
|
|
30
30
|
}
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
|
-
<Label class={labelClass(inline, $$
|
|
33
|
+
<Label class={labelClass(inline, $$props.class)} show={!!$$slots.default}>
|
|
34
34
|
<input
|
|
35
35
|
type="checkbox"
|
|
36
36
|
bind:checked
|
|
37
37
|
on:click
|
|
38
38
|
{value}
|
|
39
39
|
{...$$restProps}
|
|
40
|
-
class={inputClass(custom, color, true, tinted, $$slots.default || $$
|
|
40
|
+
class={inputClass(custom, color, true, tinted, $$slots.default || $$props.class)}
|
|
41
41
|
/><slot />
|
|
42
42
|
</Label>
|
package/forms/Radio.svelte
CHANGED
|
@@ -35,13 +35,13 @@ export let group = '';
|
|
|
35
35
|
export let value = '';
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
|
-
<Label class={labelClass(inline, $$
|
|
38
|
+
<Label class={labelClass(inline, $$props.class)} show={!!$$slots.default}>
|
|
39
39
|
<input
|
|
40
40
|
type="radio"
|
|
41
41
|
bind:group
|
|
42
42
|
on:click
|
|
43
43
|
{value}
|
|
44
44
|
{...$$restProps}
|
|
45
|
-
class={inputClass(custom, color, false, tinted, $$slots.default || $$
|
|
45
|
+
class={inputClass(custom, color, false, tinted, $$slots.default || $$props.class)}
|
|
46
46
|
/><slot />
|
|
47
47
|
</Label>
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
export let labelClass = 'sr-only';
|
|
3
3
|
export let iconClass = 'w-5 h-5 text-gray-500 dark:text-gray-400';
|
|
4
4
|
export let iconDivClass = 'flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none';
|
|
5
|
-
export let inputClass = 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5
|
|
5
|
+
export let inputClass = 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
|
|
6
6
|
export let btnClass = 'p-2.5 ml-2 text-sm font-medium text-white bg-blue-700 rounded-lg border border-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
7
7
|
export let placeholder = 'Search';
|
|
8
|
+
export let tinted = false;
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<form class="flex items-center" on:submit>
|
|
@@ -23,7 +24,15 @@ export let placeholder = 'Search';
|
|
|
23
24
|
/></svg
|
|
24
25
|
>
|
|
25
26
|
</div>
|
|
26
|
-
<input
|
|
27
|
+
<input
|
|
28
|
+
{...$$restProps}
|
|
29
|
+
type="text"
|
|
30
|
+
{id}
|
|
31
|
+
class="{tinted
|
|
32
|
+
? 'dark:bg-gray-600 dark:border-gray-500'
|
|
33
|
+
: ' dark:bg-gray-700 dark:border-gray-600'} {inputClass}"
|
|
34
|
+
{placeholder}
|
|
35
|
+
/>
|
|
27
36
|
</div>
|
|
28
37
|
<button type="submit" class={btnClass}
|
|
29
38
|
><svg
|
package/forms/Toggle.svelte
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
import Checkbox from './Checkbox.svelte';
|
|
3
3
|
export let size = 'default';
|
|
4
|
+
export let group = [];
|
|
5
|
+
export let value = '';
|
|
6
|
+
export let checked = undefined;
|
|
4
7
|
const common = "mr-3 bg-gray-200 rounded-full peer-focus:ring-4 dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all dark:border-gray-600";
|
|
5
8
|
const colors = {
|
|
6
9
|
red: 'peer-focus:ring-red-300 dark:peer-focus:ring-red-800 peer-checked:bg-red-600',
|
|
@@ -18,7 +21,7 @@ const sizes = {
|
|
|
18
21
|
};
|
|
19
22
|
</script>
|
|
20
23
|
|
|
21
|
-
<Checkbox custom class="relative {$$
|
|
24
|
+
<Checkbox custom class="relative {$$props.class}" {value} bind:checked bind:group {...$$restProps} on:click>
|
|
22
25
|
<div class={classNames(common, colors[$$restProps.color ?? 'blue'], sizes[size])} />
|
|
23
26
|
<slot />
|
|
24
27
|
</Checkbox>
|
package/forms/Toggle.svelte.d.ts
CHANGED