flowbite-svelte 0.34.4 → 0.34.5

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.
@@ -81,6 +81,7 @@ function setType(node, _type) {
81
81
  on:change
82
82
  on:click
83
83
  on:focus
84
+ on:input
84
85
  on:keydown
85
86
  on:keypress
86
87
  on:keyup
@@ -16,6 +16,7 @@ declare const __propDef: {
16
16
  change: Event;
17
17
  click: MouseEvent;
18
18
  focus: FocusEvent;
19
+ input: Event;
19
20
  keydown: KeyboardEvent;
20
21
  keypress: KeyboardEvent;
21
22
  keyup: KeyboardEvent;
@@ -1,9 +1,17 @@
1
1
  <script>import classNames from 'classnames';
2
- export let outerDivClass = 'grid gap-4';
3
- export let colClass = 'grid-cols-2 md:grid-cols-3';
4
- const divClass = classNames(outerDivClass, colClass);
2
+ import GalleryItem from './GalleryItem.svelte';
3
+ export let items = [];
4
+ $: divClass = classNames('grid', $$props.class);
5
+ function init(node) {
6
+ if (getComputedStyle(node).gap === 'normal')
7
+ node.style.gap = 'inherit';
8
+ }
5
9
  </script>
6
10
 
7
- <div class="{divClass}">
8
- <slot />
9
- </div>
11
+ <div {...$$restProps} class={divClass} use:init>
12
+ {#each items as { src, alt }}
13
+ <GalleryItem {src} {alt} />
14
+ {:else}
15
+ <slot />
16
+ {/each}
17
+ </div>
@@ -1,8 +1,9 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { ImgType } from '../types';
2
3
  declare const __propDef: {
3
4
  props: {
4
- outerDivClass?: string | undefined;
5
- colClass?: string | undefined;
5
+ [x: string]: any;
6
+ items?: ImgType[] | undefined;
6
7
  };
7
8
  events: {
8
9
  [evt: string]: CustomEvent<any>;
@@ -1,8 +1,8 @@
1
- <script>export let src = '';
2
- export let alt = '';
3
- export let imgClass = 'h-auto max-w-full rounded-lg';
1
+ <script>export let src;
2
+ export let alt = undefined;
3
+ export let defaultClass = 'h-auto max-w-full rounded-lg';
4
4
  </script>
5
5
 
6
6
  <div>
7
- <img class="{imgClass}" {src} {alt}>
8
- </div>
7
+ <img class={defaultClass} {src} {alt} />
8
+ </div>
@@ -1,9 +1,9 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- src?: string | undefined;
4
+ src: string;
5
5
  alt?: string | undefined;
6
- imgClass?: string | undefined;
6
+ defaultClass?: string | undefined;
7
7
  };
8
8
  events: {
9
9
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.34.4",
3
+ "version": "0.34.5",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "author": {
6
6
  "name": "Shinichi Okada",