flowbite-svelte 0.22.24 → 0.22.27

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,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.27](https://github.com/themesberg/flowbite-svelte/compare/v0.22.26...v0.22.27) (2022-08-01)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * update skeleton components ([6c49370](https://github.com/themesberg/flowbite-svelte/commit/6c49370ef244234373d4b87cb1a60e4aebdbf86f))
11
+ * update Svelte-Heros icon for Rating component ([d1c03fa](https://github.com/themesberg/flowbite-svelte/commit/d1c03fa4a0cb4b2cd4ccfe956d7d36ebd4161ed4))
12
+
13
+ ### [0.22.26](https://github.com/themesberg/flowbite-svelte/compare/v0.22.25...v0.22.26) (2022-07-30)
14
+
15
+
16
+ ### Features
17
+
18
+ * avatar w/tooltip / initials ([6b9a333](https://github.com/themesberg/flowbite-svelte/commit/6b9a333c96f3485b33a2fdeecc113138452acca0))
19
+
20
+ ### [0.22.25](https://github.com/themesberg/flowbite-svelte/compare/v0.22.24...v0.22.25) (2022-07-29)
21
+
22
+
23
+ ### Features
24
+
25
+ * alerts with lists ([5ad5f3c](https://github.com/themesberg/flowbite-svelte/commit/5ad5f3cfb6b8f68464475b11086f85b0d60cc068))
26
+
5
27
  ### [0.22.24](https://github.com/themesberg/flowbite-svelte/compare/v0.22.23...v0.22.24) (2022-07-29)
6
28
 
7
29
 
@@ -50,7 +50,7 @@ const textColors = {
50
50
  dark: 'text-gray-700 dark:text-gray-300'
51
51
  };
52
52
  let divClass;
53
- $: divClass = classNames('flex flex-col p-4 mb-4 gap-2 ', bgClasses[color] ?? bgClasses.blue, accent && (borderAccentClasses[color] ?? borderAccentClasses.blue), rounded && 'rounded-lg ', accent && 'border-t-4 ', textColors[color], $$props.class);
53
+ $: divClass = classNames('flex flex-col p-4 mb-4 gap-2 text-sm', bgClasses[color] ?? bgClasses.blue, accent && (borderAccentClasses[color] ?? borderAccentClasses.blue), rounded && 'rounded-lg ', accent && 'border-t-4 ', textColors[color], $$props.class);
54
54
  </script>
55
55
 
56
56
  <div id={$$props.id} class:hidden class={divClass} role="alert">
@@ -59,7 +59,7 @@ $: divClass = classNames('flex flex-col p-4 mb-4 gap-2 ', bgClasses[color] ?? bg
59
59
  <svelte:component this={icon} class="flex-shrink-0 w-5 h-5 mr-3" />
60
60
  {/if}
61
61
 
62
- <div class="text-sm">
62
+ <div>
63
63
  <slot />
64
64
  </div>
65
65
 
@@ -9,7 +9,6 @@ export let stacked = false;
9
9
  export let dot = { top: false, color: 'bg-gray-300 dark:bg-gray-500' };
10
10
  export let alt = '';
11
11
  export let size = 'md';
12
- // export let ring: string = 'ring-gray-300 dark:ring-gray-500';
13
12
  const sizes = {
14
13
  xs: 'w-6 h-6',
15
14
  sm: 'w-8 h-8',
@@ -18,21 +17,23 @@ const sizes = {
18
17
  xl: 'w-36 h-36'
19
18
  };
20
19
  let avatarClass;
21
- $: avatarClass = classNames(rounded ? 'rounded' : 'rounded-full', border && 'p-1 ring-2 ring-gray-300 dark:ring-gray-500', sizes[size], stacked && 'border-2 -ml-4 border-white dark:border-gray-800', $$props.class);
20
+ $: avatarClass = classNames(rounded ? 'rounded' : 'rounded-full', border && 'p-1 ring-2 ring-gray-300 dark:ring-gray-500', sizes[size], stacked && 'border-2 -ml-4 border-white dark:border-gray-800', 'bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300', $$props.class);
22
21
  </script>
23
22
 
24
23
  <Dot show={$$props.dot} {rounded} {...dot} {size}>
25
24
  {#if src}
26
25
  <img class={avatarClass} {alt} {src} />
27
26
  {:else if $$slots.default}
28
- <a
29
- class="flex justify-center items-center {avatarClass} text-xs font-medium text-white bg-gray-700 hover:bg-gray-600"
27
+ <svelte:element
28
+ this={href ? 'a' : 'div'}
29
+ class="flex justify-center items-center text-xs font-medium {avatarClass}"
30
30
  {href}
31
- ><slot />
32
- </a>
31
+ >
32
+ <slot />
33
+ </svelte:element>
33
34
  {:else}
34
- <div class={avatarClass}>
35
+ <svelte:element this={href ? 'a' : 'div'} class={avatarClass}>
35
36
  <AvatarPlaceholder {rounded} />
36
- </div>
37
+ </svelte:element>
37
38
  {/if}
38
39
  </Dot>
@@ -2,7 +2,7 @@
2
2
  </script>
3
3
 
4
4
  <svg
5
- class="text-gray-400 bg-gray-200 dark:bg-gray-600 {rounded ? 'rounded' : 'rounded-full'}"
5
+ class="text-gray-400 bg-gray-100 dark:bg-gray-600 {rounded ? 'rounded' : 'rounded-full'}"
6
6
  fill="currentColor"
7
7
  viewBox="0 0 16 16"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -37,7 +37,7 @@ const linkColors = {
37
37
  </a>
38
38
  {#if stars}
39
39
  <Rating rating={stars} divClass={spanClass}>
40
- <Badge slot="text" color={btnColor}>5</Badge>
40
+ <Badge slot="text" color={btnColor}>{stars}</Badge>
41
41
  </Rating>
42
42
  {/if}
43
43
  <slot />
@@ -13,19 +13,6 @@ export let transitionType;
13
13
  export let transitionParams = {};
14
14
  export let loop = false;
15
15
  export let duration = 2000;
16
- // have a custom transition function that returns the desired transition
17
- function multiple(node, params) {
18
- switch (transitionType) {
19
- case 'slide':
20
- return slide(node, params);
21
- case 'blur':
22
- return blur(node, params);
23
- case 'fly':
24
- return fly(node, params);
25
- case 'fade':
26
- return fade(node, params);
27
- }
28
- }
29
16
  // Carousel
30
17
  export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
31
18
  export let indicatorDivClass = 'flex absolute bottom-5 left-1/2 z-30 space-x-3 -translate-x-1/2';
@@ -40,6 +27,19 @@ export let iconClass = 'text-white sm:w-6 sm:h-6 dark:text-gray-300';
40
27
  export let captionClass = 'h-10 bg-gray-300 dark:bg-gray-700 dark:text-white p-2 my-2 text-center';
41
28
  // Indicator
42
29
  export let indicatorClass = 'w-3 h-3 rounded-full bg-gray-100 hover:bg-gray-300 opacity-60';
30
+ // have a custom transition function that returns the desired transition
31
+ function multiple(node, params) {
32
+ switch (transitionType) {
33
+ case 'slide':
34
+ return slide(node, params);
35
+ case 'blur':
36
+ return blur(node, params);
37
+ case 'fly':
38
+ return fly(node, params);
39
+ case 'fade':
40
+ return fade(node, params);
41
+ }
42
+ }
43
43
  // Slide
44
44
  // export let slideClass: string = 'hidden';
45
45
  let imageShowingIndex = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.22.24",
3
+ "version": "0.22.27",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -30,6 +30,7 @@
30
30
  "prism-themes": "^1.9.0",
31
31
  "svelte": "^3.47.0",
32
32
  "svelte-check": "^2.8.0",
33
+ "svelte-heros": "^2.3.3",
33
34
  "svelte-preprocess": "^4.10.7",
34
35
  "svelte-sidebar-menu": "^0.8.4",
35
36
  "svelte2tsx": "^0.5.11",
@@ -81,8 +82,7 @@
81
82
  "dependencies": {
82
83
  "@floating-ui/dom": "^0.5.3",
83
84
  "classnames": "^2.3.1",
84
- "flowbite": "^1.4.2",
85
- "svelte-heros": "^2.2.2"
85
+ "flowbite": "^1.4.2"
86
86
  },
87
87
  "engines": {
88
88
  "npm": ">=7.0.0",
@@ -11,12 +11,12 @@ let grayStars = total - roundedRating;
11
11
  <div class={divClass}>
12
12
  {#each Array(roundedRating) as _, star}
13
13
  <slot name="ratingUp">
14
- <Star variation="solid" class="text-yellow-300 dark:text-yellow-200" />
14
+ <Star variation="solid" size="24" class="text-yellow-300 dark:text-yellow-200" />
15
15
  </slot>
16
16
  {/each}
17
17
  {#each Array(grayStars) as _, star}
18
18
  <slot name="ratingDown">
19
- <Star class="text-gray-300 dark:text-gray-500" />
19
+ <Star size="26" class="px-0.5 text-gray-300 dark:text-gray-500" />
20
20
  </slot>
21
21
  {/each}
22
22
  {#if $$slots.text}
@@ -1,10 +1,15 @@
1
+ <script>export let size = '48';
2
+ </script>
3
+
1
4
  <div
2
5
  role="status"
3
6
  class="p-4 max-w-sm rounded border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700"
4
7
  >
5
8
  <div class="flex justify-center items-center mb-4 h-48 bg-gray-300 rounded dark:bg-gray-700">
6
9
  <svg
7
- class="w-12 h-12 text-gray-200 dark:text-gray-600"
10
+ width={size}
11
+ height={size}
12
+ class="text-gray-200 dark:text-gray-600"
8
13
  xmlns="http://www.w3.org/2000/svg"
9
14
  aria-hidden="true"
10
15
  fill="currentColor"
@@ -1,19 +1,16 @@
1
- /** @typedef {typeof __propDef.props} CardPlaceholderProps */
2
- /** @typedef {typeof __propDef.events} CardPlaceholderEvents */
3
- /** @typedef {typeof __propDef.slots} CardPlaceholderSlots */
4
- export default class CardPlaceholder extends SvelteComponentTyped<{}, {
5
- [evt: string]: CustomEvent<any>;
6
- }, {}> {
7
- }
8
- export type CardPlaceholderProps = typeof __propDef.props;
9
- export type CardPlaceholderEvents = typeof __propDef.events;
10
- export type CardPlaceholderSlots = typeof __propDef.slots;
11
1
  import { SvelteComponentTyped } from "svelte";
12
2
  declare const __propDef: {
13
- props: {};
3
+ props: {
4
+ size?: string;
5
+ };
14
6
  events: {
15
7
  [evt: string]: CustomEvent<any>;
16
8
  };
17
9
  slots: {};
18
10
  };
11
+ export declare type CardPlaceholderProps = typeof __propDef.props;
12
+ export declare type CardPlaceholderEvents = typeof __propDef.events;
13
+ export declare type CardPlaceholderSlots = typeof __propDef.slots;
14
+ export default class CardPlaceholder extends SvelteComponentTyped<CardPlaceholderProps, CardPlaceholderEvents, CardPlaceholderSlots> {
15
+ }
19
16
  export {};
@@ -1,3 +1,6 @@
1
+ <script>export let size = '48';
2
+ </script>
3
+
1
4
  <div
2
5
  role="status"
3
6
  class="space-y-8 animate-pulse md:space-y-0 md:space-x-8 md:flex md:items-center"
@@ -6,7 +9,9 @@
6
9
  class="flex justify-center items-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700"
7
10
  >
8
11
  <svg
9
- class="w-12 h-12 text-gray-200"
12
+ width={size}
13
+ height={size}
14
+ class="text-gray-200"
10
15
  xmlns="http://www.w3.org/2000/svg"
11
16
  aria-hidden="true"
12
17
  fill="currentColor"
@@ -1,19 +1,16 @@
1
- /** @typedef {typeof __propDef.props} ImagePlaceholderProps */
2
- /** @typedef {typeof __propDef.events} ImagePlaceholderEvents */
3
- /** @typedef {typeof __propDef.slots} ImagePlaceholderSlots */
4
- export default class ImagePlaceholder extends SvelteComponentTyped<{}, {
5
- [evt: string]: CustomEvent<any>;
6
- }, {}> {
7
- }
8
- export type ImagePlaceholderProps = typeof __propDef.props;
9
- export type ImagePlaceholderEvents = typeof __propDef.events;
10
- export type ImagePlaceholderSlots = typeof __propDef.slots;
11
1
  import { SvelteComponentTyped } from "svelte";
12
2
  declare const __propDef: {
13
- props: {};
3
+ props: {
4
+ size?: string;
5
+ };
14
6
  events: {
15
7
  [evt: string]: CustomEvent<any>;
16
8
  };
17
9
  slots: {};
18
10
  };
11
+ export declare type ImagePlaceholderProps = typeof __propDef.props;
12
+ export declare type ImagePlaceholderEvents = typeof __propDef.events;
13
+ export declare type ImagePlaceholderSlots = typeof __propDef.slots;
14
+ export default class ImagePlaceholder extends SvelteComponentTyped<ImagePlaceholderProps, ImagePlaceholderEvents, ImagePlaceholderSlots> {
15
+ }
19
16
  export {};
@@ -1,9 +1,14 @@
1
+ <script>export let size = '48';
2
+ </script>
3
+
1
4
  <div
2
5
  role="status"
3
6
  class="flex justify-center items-center max-w-sm h-56 bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700"
4
7
  >
5
8
  <svg
6
- class="w-12 h-12 text-gray-200 dark:text-gray-600"
9
+ width={size}
10
+ height={size}
11
+ class="text-gray-200 dark:text-gray-600"
7
12
  xmlns="http://www.w3.org/2000/svg"
8
13
  aria-hidden="true"
9
14
  fill="currentColor"
@@ -1,19 +1,16 @@
1
- /** @typedef {typeof __propDef.props} VideoPlaceholderProps */
2
- /** @typedef {typeof __propDef.events} VideoPlaceholderEvents */
3
- /** @typedef {typeof __propDef.slots} VideoPlaceholderSlots */
4
- export default class VideoPlaceholder extends SvelteComponentTyped<{}, {
5
- [evt: string]: CustomEvent<any>;
6
- }, {}> {
7
- }
8
- export type VideoPlaceholderProps = typeof __propDef.props;
9
- export type VideoPlaceholderEvents = typeof __propDef.events;
10
- export type VideoPlaceholderSlots = typeof __propDef.slots;
11
1
  import { SvelteComponentTyped } from "svelte";
12
2
  declare const __propDef: {
13
- props: {};
3
+ props: {
4
+ size?: string;
5
+ };
14
6
  events: {
15
7
  [evt: string]: CustomEvent<any>;
16
8
  };
17
9
  slots: {};
18
10
  };
11
+ export declare type VideoPlaceholderProps = typeof __propDef.props;
12
+ export declare type VideoPlaceholderEvents = typeof __propDef.events;
13
+ export declare type VideoPlaceholderSlots = typeof __propDef.slots;
14
+ export default class VideoPlaceholder extends SvelteComponentTyped<VideoPlaceholderProps, VideoPlaceholderEvents, VideoPlaceholderSlots> {
15
+ }
19
16
  export {};