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 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
 
@@ -64,6 +64,7 @@ let floatClass = 'flex absolute inset-y-0 items-center pointer-events-none text-
64
64
  on:blur
65
65
  on:change
66
66
  on:click
67
+ on:contextmenu
67
68
  on:focus
68
69
  on:keydown
69
70
  on:keypress
@@ -15,6 +15,7 @@ declare const __propDef: {
15
15
  blur: FocusEvent;
16
16
  change: Event;
17
17
  click: MouseEvent;
18
+ contextmenu: MouseEvent;
18
19
  focus: FocusEvent;
19
20
  keydown: KeyboardEvent;
20
21
  keypress: KeyboardEvent;
@@ -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 }}
@@ -13,6 +13,7 @@ declare const __propDef: {
13
13
  };
14
14
  events: {
15
15
  change: Event;
16
+ contextmenu: MouseEvent;
16
17
  input: Event;
17
18
  } & {
18
19
  [evt: string]: CustomEvent<any>;
@@ -28,6 +28,7 @@ $: innerWrapperClass = classNames('py-2 px-4 bg-white dark:bg-gray-800', $$slots
28
28
  on:blur
29
29
  on:change
30
30
  on:click
31
+ on:contextmenu
31
32
  on:focus
32
33
  on:keydown
33
34
  on:keypress
@@ -8,6 +8,7 @@ declare const __propDef: {
8
8
  blur: FocusEvent;
9
9
  change: Event;
10
10
  click: MouseEvent;
11
+ contextmenu: MouseEvent;
11
12
  focus: FocusEvent;
12
13
  keydown: KeyboardEvent;
13
14
  keypress: KeyboardEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.29.4",
3
+ "version": "0.29.6",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -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 on:click={previous} class={table ? 'rounded-l' : 'rounded-l-lg'}>
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 = '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';
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>
@@ -6,6 +6,7 @@ declare const __propDef: {
6
6
  };
7
7
  events: {
8
8
  click: MouseEvent;
9
+ contextmenu: MouseEvent;
9
10
  } & {
10
11
  [evt: string]: CustomEvent<any>;
11
12
  };
@@ -30,6 +30,7 @@ $: buttonClass = classNames(defaultClass, open ? activeClasses ?? ctx.activeClas
30
30
  on:click={() => (open = true)}
31
31
  on:blur
32
32
  on:click
33
+ on:contextmenu
33
34
  on:focus
34
35
  on:keydown
35
36
  on:keypress
@@ -11,6 +11,7 @@ declare const __propDef: {
11
11
  events: {
12
12
  blur: FocusEvent;
13
13
  click: MouseEvent;
14
+ contextmenu: MouseEvent;
14
15
  focus: FocusEvent;
15
16
  keydown: KeyboardEvent;
16
17
  keypress: KeyboardEvent;