flowbite-svelte 0.29.4 → 0.29.6
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 +14 -0
- package/forms/Input.svelte +1 -0
- package/forms/Input.svelte.d.ts +1 -0
- package/forms/Select.svelte +1 -1
- package/forms/Select.svelte.d.ts +1 -0
- package/forms/Textarea.svelte +1 -0
- package/forms/Textarea.svelte.d.ts +1 -0
- package/package.json +1 -1
- package/paginations/Pagination.svelte +8 -3
- package/paginations/Pagination.svelte.d.ts +2 -1
- package/paginations/PaginationItem.svelte +1 -1
- package/tables/TableBodyRow.svelte +1 -1
- package/tables/TableBodyRow.svelte.d.ts +1 -0
- package/tabs/TabItem.svelte +1 -0
- package/tabs/TabItem.svelte.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.29.6](https://github.com/themesberg/flowbite-svelte/compare/v0.29.5...v0.29.6) (2022-12-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add on:contextmenu ([#506](https://github.com/themesberg/flowbite-svelte/issues/506)) ([75ad596](https://github.com/themesberg/flowbite-svelte/commit/75ad59695188e36e0af52487e041c15a7b6fd845))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* pagination for darkmode ([#507](https://github.com/themesberg/flowbite-svelte/issues/507)) ([9175627](https://github.com/themesberg/flowbite-svelte/commit/917562790bc05a1a0679c11266ee7d23531c865f))
|
|
16
|
+
|
|
17
|
+
### [0.29.5](https://github.com/themesberg/flowbite-svelte/compare/v0.29.4...v0.29.5) (2022-12-22)
|
|
18
|
+
|
|
5
19
|
### [0.29.4](https://github.com/themesberg/flowbite-svelte/compare/v0.29.3...v0.29.4) (2022-12-22)
|
|
6
20
|
|
|
7
21
|
|
package/forms/Input.svelte
CHANGED
package/forms/Input.svelte.d.ts
CHANGED
package/forms/Select.svelte
CHANGED
|
@@ -16,7 +16,7 @@ let selectClass;
|
|
|
16
16
|
$: selectClass = classNames(common, underline ? underlineClass : defaultClass, sizes[size], underline && '!px-0', $$restProps.class);
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<select {...$$restProps} bind:value class={selectClass} on:change on:input>
|
|
19
|
+
<select {...$$restProps} bind:value class={selectClass} on:change on:contextmenu on:input>
|
|
20
20
|
<option disabled selected value="">{placeholder}</option>
|
|
21
21
|
|
|
22
22
|
{#each items as { value, name }}
|
package/forms/Select.svelte.d.ts
CHANGED
package/forms/Textarea.svelte
CHANGED
package/package.json
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { createEventDispatcher, setContext } from 'svelte';
|
|
3
3
|
import PaginationItem from './PaginationItem.svelte';
|
|
4
4
|
export let pages = [];
|
|
5
|
+
export let activeClass = 'text-blue-600 border border-gray-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white';
|
|
6
|
+
export let normalClass = 'text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
5
7
|
export let ulClass = 'inline-flex -space-x-px items-center';
|
|
6
8
|
export let table = false;
|
|
7
|
-
export let active = false;
|
|
8
9
|
const dispatch = createEventDispatcher();
|
|
9
10
|
setContext('group', true);
|
|
10
11
|
setContext('table', table);
|
|
@@ -19,7 +20,9 @@ const next = () => {
|
|
|
19
20
|
<nav aria-label="Page navigation">
|
|
20
21
|
<ul class={classNames(ulClass, table && 'divide-x divide-gray-700', $$props.class)}>
|
|
21
22
|
<li>
|
|
22
|
-
<PaginationItem
|
|
23
|
+
<PaginationItem
|
|
24
|
+
on:click={previous}
|
|
25
|
+
class={classNames(normalClass, table ? 'rounded-l' : 'rounded-l-lg')}>
|
|
23
26
|
<slot name="prev">Previous</slot>
|
|
24
27
|
</PaginationItem>
|
|
25
28
|
</li>
|
|
@@ -37,11 +40,13 @@ const next = () => {
|
|
|
37
40
|
on:mouseenter
|
|
38
41
|
on:mouseleave
|
|
39
42
|
on:mouseover
|
|
43
|
+
{activeClass}
|
|
44
|
+
{normalClass}
|
|
40
45
|
{href}>{name}</PaginationItem>
|
|
41
46
|
</li>
|
|
42
47
|
{/each}
|
|
43
48
|
<li>
|
|
44
|
-
<PaginationItem on:click={next} class={table ? 'rounded-r' : 'rounded-r-lg'}>
|
|
49
|
+
<PaginationItem on:click={next} class={classNames(normalClass, table ? 'rounded-r' : 'rounded-r-lg')}>
|
|
45
50
|
<slot name="next">Next</slot>
|
|
46
51
|
</PaginationItem>
|
|
47
52
|
</li>
|
|
@@ -4,9 +4,10 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
pages?: LinkType[] | undefined;
|
|
7
|
+
activeClass?: string | undefined;
|
|
8
|
+
normalClass?: string | undefined;
|
|
7
9
|
ulClass?: string | undefined;
|
|
8
10
|
table?: boolean | undefined;
|
|
9
|
-
active?: boolean | undefined;
|
|
10
11
|
};
|
|
11
12
|
events: {
|
|
12
13
|
blur: FocusEvent;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { getContext, onMount } from 'svelte';
|
|
3
3
|
export let href = undefined;
|
|
4
4
|
export let active = false;
|
|
5
|
-
export let activeClass = '
|
|
5
|
+
export let activeClass = '';
|
|
6
6
|
export let normalClass = 'text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
7
7
|
const group = getContext('group');
|
|
8
8
|
const table = getContext('table');
|
|
@@ -34,6 +34,6 @@ let trClassfinal;
|
|
|
34
34
|
$: trClassfinal = classNames(getContext('noborder') ? 'bg-white dark:bg-gray-800' : trClass, colors[color], getContext('hoverable') && hoverColors[color], getContext('striped') && stripColors[color], $$props.class);
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
|
-
<tr {...$$restProps} class={trClassfinal} on:click>
|
|
37
|
+
<tr {...$$restProps} class={trClassfinal} on:click on:contextmenu>
|
|
38
38
|
<slot />
|
|
39
39
|
</tr>
|
package/tabs/TabItem.svelte
CHANGED