flowbite-svelte 0.34.3 → 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>;
@@ -1,7 +1,8 @@
1
1
  <script context="module">export {};
2
2
  </script>
3
3
 
4
- <script>import classNames from 'classnames';
4
+ <script>import { getContext } from 'svelte';
5
+ import classNames from 'classnames';
5
6
  import Button from '../buttons/Button.svelte';
6
7
  import Popper from '../utils/Popper.svelte';
7
8
  import { setContext } from 'svelte';
@@ -13,6 +14,11 @@ export let tooltip = 'left';
13
14
  export let trigger = 'hover';
14
15
  export let textOutside = false;
15
16
  export let id = generateId();
17
+ export let shadow = null;
18
+ export let outline = false;
19
+ const group = getContext('group');
20
+ export let color = group ? (outline ? 'dark' : 'alternative') : 'blue';
21
+ export let gradient = false;
16
22
  setContext('speed-dial', { pill, tooltip, textOutside });
17
23
  let divClass;
18
24
  $: divClass = classNames(defaultClass, 'group', $$props.class);
@@ -21,7 +27,7 @@ $: poperClass = classNames('flex items-center mb-4 gap-2', ['top', 'bottom'].inc
21
27
  </script>
22
28
 
23
29
  <div class={divClass}>
24
- <Button {pill} name="Open actions menu" aria-controls={id} aria-expanded="false" color="blue" class="!p-3">
30
+ <Button {pill} name="Open actions menu" aria-controls={id} aria-expanded="false" {color} {gradient} {outline} {shadow} class="!p-3">
25
31
  <slot name="icon">
26
32
  <svg
27
33
  aria-hidden="true"
@@ -15,6 +15,10 @@ declare const __propDef: {
15
15
  trigger?: "click" | "hover" | undefined;
16
16
  textOutside?: boolean | undefined;
17
17
  id?: string | undefined;
18
+ shadow?: "red" | "green" | "purple" | "pink" | "blue" | "cyan" | "teal" | "lime" | null | undefined;
19
+ outline?: boolean | undefined;
20
+ color?: "red" | "yellow" | "green" | "purple" | "pink" | "blue" | "light" | "dark" | "cyan" | "teal" | "lime" | "alternative" | "primary" | "purpleToBlue" | "cyanToBlue" | "greenToBlue" | "purpleToPink" | "pinkToOrange" | "tealToLime" | "redToYellow" | undefined;
21
+ gradient?: boolean | undefined;
18
22
  };
19
23
  events: {
20
24
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.34.3",
3
+ "version": "0.34.5",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "author": {
6
6
  "name": "Shinichi Okada",