flowbite-svelte 0.25.17 → 0.25.20

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/breadcrumbs/Breadcrumb.svelte +4 -1
  3. package/breadcrumbs/Breadcrumb.svelte.d.ts +2 -0
  4. package/breadcrumbs/BreadcrumbItem.svelte +43 -35
  5. package/breadcrumbs/BreadcrumbItem.svelte.d.ts +5 -5
  6. package/carousels/Carousel.svelte +39 -22
  7. package/carousels/Carousel.svelte.d.ts +4 -5
  8. package/carousels/CarouselTransition.svelte +39 -23
  9. package/carousels/CarouselTransition.svelte.d.ts +4 -5
  10. package/index.d.ts +0 -12
  11. package/index.js +0 -13
  12. package/package.json +1 -13
  13. package/toasts/Toast.svelte +2 -1
  14. package/typography/Hr.svelte +8 -10
  15. package/typography/Hr.svelte.d.ts +6 -8
  16. package/icons/CodeBracket.svelte +0 -38
  17. package/icons/CodeBracket.svelte.d.ts +0 -22
  18. package/icons/Envelope.svelte +0 -37
  19. package/icons/Envelope.svelte.d.ts +0 -22
  20. package/icons/FaceSmile.svelte +0 -38
  21. package/icons/FaceSmile.svelte.d.ts +0 -22
  22. package/icons/Figma.svelte +0 -34
  23. package/icons/Figma.svelte.d.ts +0 -19
  24. package/icons/Home.svelte +0 -37
  25. package/icons/Home.svelte.d.ts +0 -22
  26. package/icons/Map.svelte +0 -38
  27. package/icons/Map.svelte.d.ts +0 -22
  28. package/icons/MapPin.svelte +0 -37
  29. package/icons/MapPin.svelte.d.ts +0 -22
  30. package/icons/PaperAirplane.svelte +0 -37
  31. package/icons/PaperAirplane.svelte.d.ts +0 -22
  32. package/icons/PaperClip.svelte +0 -38
  33. package/icons/PaperClip.svelte.d.ts +0 -22
  34. package/icons/Photo.svelte +0 -38
  35. package/icons/Photo.svelte.d.ts +0 -22
  36. package/icons/QrCode.svelte +0 -37
  37. package/icons/QrCode.svelte.d.ts +0 -22
  38. package/icons/QuoteLeft.svelte +0 -17
  39. package/icons/QuoteLeft.svelte.d.ts +0 -18
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
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.25.20](https://github.com/themesberg/flowbite-svelte/compare/v0.25.19...v0.25.20) (2022-08-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * index page space ([6ab9a19](https://github.com/themesberg/flowbite-svelte/commit/6ab9a19e004fc19ba3bd696acedbc5bbc0ced966))
11
+ * remove heros from: ([7055f4c](https://github.com/themesberg/flowbite-svelte/commit/7055f4c5ddaa91e15cabaf7d1112a149cf81374d))
12
+ * remove heros icon from Carousel ([2c7d4c9](https://github.com/themesberg/flowbite-svelte/commit/2c7d4c9a6edc1a4dd4005e5dcf46fec8b5dc0a52))
13
+
14
+ ### [0.25.19](https://github.com/themesberg/flowbite-svelte/compare/v0.25.18...v0.25.19) (2022-08-27)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * remove Home icons from all pages ([7ac0e7a](https://github.com/themesberg/flowbite-svelte/commit/7ac0e7aa3edc5486d597a61775a5694c76b4bb35))
20
+ * removed Home icon from BreadcrumbItem ([66f00dd](https://github.com/themesberg/flowbite-svelte/commit/66f00dd9e024d97c2b9766e30b03b775f227c672))
21
+
22
+ ### [0.25.18](https://github.com/themesberg/flowbite-svelte/compare/v0.25.17...v0.25.18) (2022-08-27)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * change BreadcrumbItem home for all pages ([f5f895f](https://github.com/themesberg/flowbite-svelte/commit/f5f895f6157b03e435975c5735329f8dfc984485))
28
+
5
29
  ### [0.25.17](https://github.com/themesberg/flowbite-svelte/compare/v0.25.16...v0.25.17) (2022-08-27)
6
30
 
7
31
 
@@ -1,9 +1,12 @@
1
1
  <script>import classNames from 'classnames';
2
+ export let solid = false;
2
3
  export let navClass = 'flex';
4
+ export let solidClass = 'flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700';
3
5
  export let olClass = 'inline-flex items-center space-x-1 md:space-x-3';
6
+ let classNav = solid ? solidClass : navClass;
4
7
  </script>
5
8
 
6
- <nav aria-label="Breadcrumb" {...$$restProps} class={classNames(navClass, $$props.class)}>
9
+ <nav aria-label="Breadcrumb" {...$$restProps} class={classNames(classNav, $$props.class)}>
7
10
  <ol class={classNames(olClass, $$props.classOl)}>
8
11
  <slot />
9
12
  </ol>
@@ -2,7 +2,9 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
+ solid?: boolean;
5
6
  navClass?: string;
7
+ solidClass?: string;
6
8
  olClass?: string;
7
9
  };
8
10
  events: {
@@ -1,43 +1,51 @@
1
- <script>import { ChevronRight } from 'svelte-heros';
2
- export let icon = null;
3
- export let variation = null;
4
- export let iconSize = 20;
5
- export let iconClass = 'mr-2';
1
+ <script>export let home = false;
2
+ export let linkClass = 'ml-1 text-sm font-medium text-gray-700 hover:text-gray-900 md:ml-2 dark:text-gray-400 dark:hover:text-white';
3
+ export let spanClass = 'ml-1 text-sm font-medium text-gray-500 md:ml-2 dark:text-gray-400';
4
+ export let homeClass = 'inline-flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white';
6
5
  </script>
7
6
 
8
- <li class="group flex items-center" {...$$props}>
9
- <ChevronRight aria-hidden="true" class="mx-1 h-6 w-6 text-gray-400 group-first:hidden md:mx-2" />
10
- {#if $$props.href}
11
- <a
12
- class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
13
- href={$$props.href}
14
- >
15
- {#if icon}
16
- <svelte:component
17
- this={icon}
18
- {variation}
19
- size={iconSize}
20
- aria-hidden="true"
21
- class={iconClass}
22
- />
7
+ <li class="inline-flex items-center" {...$$props}>
8
+ {#if home}
9
+ <a class={homeClass} href={$$props.href}>
10
+ {#if $$slots.icon}
11
+ <slot name="icon" />
12
+ {:else}
13
+ <svg
14
+ class="w-4 h-4 mr-2"
15
+ fill="currentColor"
16
+ viewBox="0 0 20 20"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ ><path
19
+ d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"
20
+ /></svg
21
+ >
23
22
  {/if}
24
23
  <slot />
25
24
  </a>
26
25
  {:else}
27
- <span
28
- class="ml-1 text-sm font-medium text-gray-500 md:ml-2 dark:text-gray-400"
29
- data-testid="breadcrumb-item"
30
- >
31
- {#if icon}
32
- <svelte:component
33
- this={icon}
34
- {variation}
35
- size={iconSize}
36
- aria-hidden="true"
37
- class={iconClass}
38
- />
39
- {/if}
40
- <slot />
41
- </span>
26
+ {#if $$slots.icon}
27
+ <slot name="icon" />
28
+ {:else}
29
+ <svg
30
+ class="w-6 h-6 text-gray-400"
31
+ fill="currentColor"
32
+ viewBox="0 0 20 20"
33
+ xmlns="http://www.w3.org/2000/svg"
34
+ ><path
35
+ fill-rule="evenodd"
36
+ d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
37
+ clip-rule="evenodd"
38
+ /></svg
39
+ >
40
+ {/if}
41
+ {#if $$props.href}
42
+ <a class={linkClass} href={$$props.href}>
43
+ <slot />
44
+ </a>
45
+ {:else}
46
+ <span class={spanClass}>
47
+ <slot />
48
+ </span>
49
+ {/if}
42
50
  {/if}
43
51
  </li>
@@ -1,17 +1,17 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { SvelteComponent } from 'svelte';
3
2
  declare const __propDef: {
4
3
  props: {
5
4
  [x: string]: any;
6
- icon?: typeof SvelteComponent | null;
7
- variation?: 'solid' | null;
8
- iconSize?: number;
9
- iconClass?: string;
5
+ home?: boolean;
6
+ linkClass?: string;
7
+ spanClass?: string;
8
+ homeClass?: string;
10
9
  };
11
10
  events: {
12
11
  [evt: string]: CustomEvent<any>;
13
12
  };
14
13
  slots: {
14
+ icon: {};
15
15
  default: {};
16
16
  };
17
17
  };
@@ -1,5 +1,4 @@
1
- <script>import { ChevronRight, ChevronLeft } from 'svelte-heros';
2
- import Slide from './Slide.svelte';
1
+ <script>import Slide from './Slide.svelte';
3
2
  import Thumbnail from './Thumbnail.svelte';
4
3
  import Caption from './Caption.svelte';
5
4
  import Indicator from './Indicator.svelte';
@@ -10,12 +9,6 @@ export let images;
10
9
  export let slideControls = true;
11
10
  export let loop = false;
12
11
  export let duration = 2000;
13
- export let icons = {
14
- next: ChevronRight,
15
- prev: ChevronLeft
16
- };
17
- export let iconSize = 24;
18
- export let iconClass = 'text-white sm:w-6 sm:h-6 dark:text-gray-300';
19
12
  // Carousel
20
13
  export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
21
14
  export let indicatorDivClass = 'flex absolute bottom-5 left-1/2 z-30 space-x-3 -translate-x-1/2';
@@ -64,8 +57,7 @@ if (loop) {
64
57
  {name}
65
58
  selected={imageShowingIndex === id}
66
59
  on:click={() => goToSlide(id)}
67
- {indicatorClass}
68
- />
60
+ {indicatorClass} />
69
61
  {/each}
70
62
  </div>
71
63
  {/if}
@@ -75,12 +67,25 @@ if (loop) {
75
67
  on:click={prevSlide}
76
68
  type="button"
77
69
  class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
78
- data-carousel-prev
79
- >
70
+ data-carousel-prev>
80
71
  <span
81
- class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
82
- >
83
- <svelte:component this={icons.prev} size={iconSize} class=" {iconClass}" />
72
+ class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
73
+ {#if $$slots.previous}
74
+ <slot name="previous" />
75
+ {:else}
76
+ <svg
77
+ aria-hidden="true"
78
+ class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
79
+ fill="none"
80
+ stroke="currentColor"
81
+ viewBox="0 0 24 24"
82
+ xmlns="http://www.w3.org/2000/svg"
83
+ ><path
84
+ stroke-linecap="round"
85
+ stroke-linejoin="round"
86
+ stroke-width="2"
87
+ d="M15 19l-7-7 7-7" /></svg>
88
+ {/if}
84
89
  <span class="hidden">Previous</span>
85
90
  </span>
86
91
  </button>
@@ -88,12 +93,25 @@ if (loop) {
88
93
  on:click={nextSlide}
89
94
  type="button"
90
95
  class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
91
- data-carousel-next
92
- >
96
+ data-carousel-next>
93
97
  <span
94
- class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
95
- >
96
- <svelte:component this={icons.next} size={iconSize} class=" {iconClass}" />
98
+ class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
99
+ {#if $$slots.next}
100
+ <slot name="next" />
101
+ {:else}
102
+ <svg
103
+ aria-hidden="true"
104
+ class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
105
+ fill="none"
106
+ stroke="currentColor"
107
+ viewBox="0 0 24 24"
108
+ xmlns="http://www.w3.org/2000/svg"
109
+ ><path
110
+ stroke-linecap="round"
111
+ stroke-linejoin="round"
112
+ stroke-width="2"
113
+ d="M9 5l7 7-7 7" /></svg>
114
+ {/if}
97
115
  <span class="hidden">Next</span>
98
116
  </span>
99
117
  </button>
@@ -114,8 +132,7 @@ if (loop) {
114
132
  titleLink={attribution}
115
133
  {id}
116
134
  selected={imageShowingIndex === id}
117
- on:click={() => goToSlide(id)}
118
- />
135
+ on:click={() => goToSlide(id)} />
119
136
  {/each}
120
137
  </div>
121
138
  {/if}
@@ -1,5 +1,4 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { CarouselIconType } from '../types';
3
2
  declare const __propDef: {
4
3
  props: {
5
4
  showIndicators?: boolean;
@@ -9,9 +8,6 @@ declare const __propDef: {
9
8
  slideControls?: boolean;
10
9
  loop?: boolean;
11
10
  duration?: number;
12
- icons?: CarouselIconType;
13
- iconSize?: number;
14
- iconClass?: string;
15
11
  divClass?: string;
16
12
  indicatorDivClass?: string;
17
13
  captionClass?: string;
@@ -21,7 +17,10 @@ declare const __propDef: {
21
17
  events: {
22
18
  [evt: string]: CustomEvent<any>;
23
19
  };
24
- slots: {};
20
+ slots: {
21
+ previous: {};
22
+ next: {};
23
+ };
25
24
  };
26
25
  export declare type CarouselProps = typeof __propDef.props;
27
26
  export declare type CarouselEvents = typeof __propDef.events;
@@ -1,5 +1,4 @@
1
- <script>import { ChevronRight, ChevronLeft } from 'svelte-heros';
2
- import { fade, blur, fly, slide } from 'svelte/transition';
1
+ <script>import { fade, blur, fly, slide } from 'svelte/transition';
3
2
  import Slide from './Slide.svelte';
4
3
  import Thumbnail from './Thumbnail.svelte';
5
4
  import Caption from './Caption.svelte';
@@ -16,13 +15,6 @@ export let duration = 2000;
16
15
  // Carousel
17
16
  export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
18
17
  export let indicatorDivClass = 'flex absolute bottom-5 left-1/2 z-30 space-x-3 -translate-x-1/2';
19
- // Slide controllers
20
- export let icons = {
21
- next: ChevronRight,
22
- prev: ChevronLeft
23
- };
24
- export let iconSize = 24;
25
- export let iconClass = 'text-white sm:w-6 sm:h-6 dark:text-gray-300';
26
18
  // Caption
27
19
  export let captionClass = 'h-10 bg-gray-300 dark:bg-gray-700 dark:text-white p-2 my-2 text-center';
28
20
  // Indicator
@@ -88,8 +80,7 @@ if (loop) {
88
80
  {name}
89
81
  selected={imageShowingIndex === id}
90
82
  on:click={() => goToSlide(id)}
91
- {indicatorClass}
92
- />
83
+ {indicatorClass} />
93
84
  {/each}
94
85
  </div>
95
86
  {/if}
@@ -99,12 +90,25 @@ if (loop) {
99
90
  on:click={prevSlide}
100
91
  type="button"
101
92
  class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
102
- data-carousel-prev
103
- >
93
+ data-carousel-prev>
104
94
  <span
105
- class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
106
- >
107
- <svelte:component this={icons.prev} size={iconSize} class=" {iconClass}" />
95
+ class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
96
+ {#if $$slots.previous}
97
+ <slot name="previous" />
98
+ {:else}
99
+ <svg
100
+ aria-hidden="true"
101
+ class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
102
+ fill="none"
103
+ stroke="currentColor"
104
+ viewBox="0 0 24 24"
105
+ xmlns="http://www.w3.org/2000/svg"
106
+ ><path
107
+ stroke-linecap="round"
108
+ stroke-linejoin="round"
109
+ stroke-width="2"
110
+ d="M15 19l-7-7 7-7" /></svg>
111
+ {/if}
108
112
  <span class="hidden">Previous</span>
109
113
  </span>
110
114
  </button>
@@ -112,12 +116,25 @@ if (loop) {
112
116
  on:click={nextSlide}
113
117
  type="button"
114
118
  class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none"
115
- data-carousel-next
116
- >
119
+ data-carousel-next>
117
120
  <span
118
- class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none"
119
- >
120
- <svelte:component this={icons.next} size={iconSize} class=" {iconClass}" />
121
+ class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
122
+ {#if $$slots.next}
123
+ <slot name="next" />
124
+ {:else}
125
+ <svg
126
+ aria-hidden="true"
127
+ class="w-5 h-5 text-white sm:w-6 sm:h-6 dark:text-gray-300"
128
+ fill="none"
129
+ stroke="currentColor"
130
+ viewBox="0 0 24 24"
131
+ xmlns="http://www.w3.org/2000/svg"
132
+ ><path
133
+ stroke-linecap="round"
134
+ stroke-linejoin="round"
135
+ stroke-width="2"
136
+ d="M9 5l7 7-7 7" /></svg>
137
+ {/if}
121
138
  <span class="hidden">Next</span>
122
139
  </span>
123
140
  </button>
@@ -138,8 +155,7 @@ if (loop) {
138
155
  titleLink={attribution}
139
156
  {id}
140
157
  selected={imageShowingIndex === id}
141
- on:click={() => goToSlide(id)}
142
- />
158
+ on:click={() => goToSlide(id)} />
143
159
  {/each}
144
160
  </div>
145
161
  {/if}
@@ -1,5 +1,4 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { CarouselIconType } from '../types';
3
2
  import type { TransitionTypes, TransitionParamTypes } from '../types';
4
3
  declare const __propDef: {
5
4
  props: {
@@ -14,16 +13,16 @@ declare const __propDef: {
14
13
  duration?: number;
15
14
  divClass?: string;
16
15
  indicatorDivClass?: string;
17
- icons?: CarouselIconType;
18
- iconSize?: number;
19
- iconClass?: string;
20
16
  captionClass?: string;
21
17
  indicatorClass?: string;
22
18
  };
23
19
  events: {
24
20
  [evt: string]: CustomEvent<any>;
25
21
  };
26
- slots: {};
22
+ slots: {
23
+ previous: {};
24
+ next: {};
25
+ };
27
26
  };
28
27
  export declare type CarouselTransitionProps = typeof __propDef.props;
29
28
  export declare type CarouselTransitionEvents = typeof __propDef.events;
package/index.d.ts CHANGED
@@ -38,18 +38,6 @@ export { default as SimpleSearch } from './forms/SimpleSearch.svelte';
38
38
  export { default as Textarea } from './forms/Textarea.svelte';
39
39
  export { default as Toggle } from './forms/Toggle.svelte';
40
40
  export { default as VoiceSearch } from './forms/VoiceSearch.svelte';
41
- export { default as CodeBracket } from './icons/CodeBracket.svelte';
42
- export { default as Envelope } from './icons/Envelope.svelte';
43
- export { default as FaceSmile } from './icons/FaceSmile.svelte';
44
- export { default as Figma } from './icons/Figma.svelte';
45
- export { default as Home } from './icons/Home.svelte';
46
- export { default as Map } from './icons/Map.svelte';
47
- export { default as MapPin } from './icons/MapPin.svelte';
48
- export { default as PaperAirplane } from './icons/PaperAirplane.svelte';
49
- export { default as PaperClip } from './icons/PaperClip.svelte';
50
- export { default as Photo } from './icons/Photo.svelte';
51
- export { default as QrCode } from './icons/QrCode.svelte';
52
- export { default as QuoteLeft } from './icons/QuoteLeft.svelte';
53
41
  export { default as Kbd } from './kbd/Kbd.svelte';
54
42
  export { default as ArrowKeyDown } from './kbd/ArrowKeyDown.svelte';
55
43
  export { default as ArrowKeyLeft } from './kbd/ArrowKeyLeft.svelte';
package/index.js CHANGED
@@ -52,19 +52,6 @@ export { default as SimpleSearch } from './forms/SimpleSearch.svelte';
52
52
  export { default as Textarea } from './forms/Textarea.svelte';
53
53
  export { default as Toggle } from './forms/Toggle.svelte';
54
54
  export { default as VoiceSearch } from './forms/VoiceSearch.svelte';
55
- // Icons
56
- export { default as CodeBracket } from './icons/CodeBracket.svelte';
57
- export { default as Envelope } from './icons/Envelope.svelte';
58
- export { default as FaceSmile } from './icons/FaceSmile.svelte';
59
- export { default as Figma } from './icons/Figma.svelte';
60
- export { default as Home } from './icons/Home.svelte';
61
- export { default as Map } from './icons/Map.svelte';
62
- export { default as MapPin } from './icons/MapPin.svelte';
63
- export { default as PaperAirplane } from './icons/PaperAirplane.svelte';
64
- export { default as PaperClip } from './icons/PaperClip.svelte';
65
- export { default as Photo } from './icons/Photo.svelte';
66
- export { default as QrCode } from './icons/QrCode.svelte';
67
- export { default as QuoteLeft } from './icons/QuoteLeft.svelte';
68
55
  // Kbd
69
56
  export { default as Kbd } from './kbd/Kbd.svelte';
70
57
  export { default as ArrowKeyDown } from './kbd/ArrowKeyDown.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.25.17",
3
+ "version": "0.25.20",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -147,18 +147,6 @@
147
147
  "./forms/Textarea.svelte": "./forms/Textarea.svelte",
148
148
  "./forms/Toggle.svelte": "./forms/Toggle.svelte",
149
149
  "./forms/VoiceSearch.svelte": "./forms/VoiceSearch.svelte",
150
- "./icons/CodeBracket.svelte": "./icons/CodeBracket.svelte",
151
- "./icons/Envelope.svelte": "./icons/Envelope.svelte",
152
- "./icons/FaceSmile.svelte": "./icons/FaceSmile.svelte",
153
- "./icons/Figma.svelte": "./icons/Figma.svelte",
154
- "./icons/Home.svelte": "./icons/Home.svelte",
155
- "./icons/Map.svelte": "./icons/Map.svelte",
156
- "./icons/MapPin.svelte": "./icons/MapPin.svelte",
157
- "./icons/PaperAirplane.svelte": "./icons/PaperAirplane.svelte",
158
- "./icons/PaperClip.svelte": "./icons/PaperClip.svelte",
159
- "./icons/Photo.svelte": "./icons/Photo.svelte",
160
- "./icons/QrCode.svelte": "./icons/QrCode.svelte",
161
- "./icons/QuoteLeft.svelte": "./icons/QuoteLeft.svelte",
162
150
  ".": "./index.js",
163
151
  "./kbd/ArrowKeyDown.svelte": "./kbd/ArrowKeyDown.svelte",
164
152
  "./kbd/ArrowKeyLeft.svelte": "./kbd/ArrowKeyLeft.svelte",
@@ -18,7 +18,8 @@ const colors = {
18
18
  gray: 'text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200',
19
19
  purple: 'text-purple-500 bg-purple-100 dark:bg-purple-800 dark:text-purple-200',
20
20
  indigo: 'text-indigo-500 bg-indigo-100 dark:bg-indigo-800 dark:text-indigo-200',
21
- yellow: 'text-yellow-500 bg-yellow-100 dark:bg-yellow-800 dark:text-yellow-200'
21
+ yellow: 'text-yellow-500 bg-yellow-100 dark:bg-yellow-800 dark:text-yellow-200',
22
+ pink: 'text-pink-500 bg-pink-100 dark:bg-pink-800 dark:text-pink-200'
22
23
  };
23
24
  // have a custom transition function that returns the desired transition
24
25
  let transitionFunc;
@@ -1,27 +1,25 @@
1
1
  <script>import classNames from 'classnames';
2
- export let divClass = 'inline-flex justify-center items-center w-full';
3
- export let hrClass = 'bg-gray-200 rounded border-0 dark:bg-gray-700';
4
- // bg-gray-200 rounded border-0 dark:bg-gray-700
2
+ export let icon = false;
5
3
  export let width = 'w-full';
6
4
  export let height = 'h-px';
7
- export let iconSize = 24;
8
- export let iconClass = 'text-gray-700 dark:text-gray-300';
9
- export let icon;
10
- export let text;
5
+ export let divClass = 'inline-flex justify-center items-center w-full';
6
+ export let hrClass = 'bg-gray-200 rounded border-0 dark:bg-gray-700';
11
7
  export let iconDivClass = 'absolute left-1/2 px-4 bg-white -translate-x-1/2 dark:bg-gray-900';
12
8
  export let textSpanClass = 'absolute left-1/2 px-3 font-medium text-gray-900 bg-white -translate-x-1/2 dark:text-white dark:bg-gray-900';
13
9
  let horizontalClass = classNames(hrClass, width, height, $$props.class);
14
10
  </script>
15
11
 
16
- {#if icon || text}
12
+ {#if $$slots}
17
13
  <div class={classNames(divClass, $$props.classDiv)}>
18
14
  <hr class={horizontalClass} />
19
15
  {#if icon}
20
16
  <div class={iconDivClass}>
21
- <svelte:component this={icon} size={iconSize} class={iconClass} />
17
+ <slot />
22
18
  </div>
23
19
  {:else}
24
- <span class={textSpanClass}>or</span>
20
+ <span class={textSpanClass}>
21
+ <slot />
22
+ </span>
25
23
  {/if}
26
24
  </div>
27
25
  {:else}
@@ -1,23 +1,21 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { SvelteComponent } from 'svelte';
3
2
  declare const __propDef: {
4
3
  props: {
5
4
  [x: string]: any;
6
- divClass?: string;
7
- hrClass?: string;
5
+ icon?: boolean;
8
6
  width?: string;
9
7
  height?: string;
10
- iconSize?: number;
11
- iconClass?: string;
12
- icon: typeof SvelteComponent;
13
- text: string;
8
+ divClass?: string;
9
+ hrClass?: string;
14
10
  iconDivClass?: string;
15
11
  textSpanClass?: string;
16
12
  };
17
13
  events: {
18
14
  [evt: string]: CustomEvent<any>;
19
15
  };
20
- slots: {};
16
+ slots: {
17
+ default: {};
18
+ };
21
19
  };
22
20
  export declare type HrProps = typeof __propDef.props;
23
21
  export declare type HrEvents = typeof __propDef.events;
@@ -1,38 +0,0 @@
1
- <script>// https://github.com/shinokada/svelte-heros-v2
2
- export let size = '24';
3
- export let color = 'currentColor';
4
- export let variation = 'outline';
5
- let viewBox;
6
- let svgpath;
7
- let svgoutline = `<path d="M17.25 6.75L22.5 12L17.25 17.25M6.75 17.25L1.5 12L6.75 6.75M14.25 3.75L9.75 20.25" stroke="${color}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> `;
8
- let svgsolid = `<path fill-rule="evenodd" clip-rule="evenodd" d="M14.4473 3.02662C14.847 3.1356 15.0826 3.54791 14.9736 3.94753L10.4736 20.4475C10.3646 20.8471 9.95228 21.0827 9.55266 20.9738C9.15304 20.8648 8.91744 20.4525 9.02643 20.0529L13.5264 3.55285C13.6354 3.15323 14.0477 2.91763 14.4473 3.02662ZM16.7197 6.21986C17.0126 5.92696 17.4874 5.92696 17.7803 6.21986L23.0303 11.4699C23.3232 11.7628 23.3232 12.2376 23.0303 12.5305L17.7803 17.7805C17.4874 18.0734 17.0126 18.0734 16.7197 17.7805C16.4268 17.4876 16.4268 17.0128 16.7197 16.7199L21.4393 12.0002L16.7197 7.28052C16.4268 6.98762 16.4268 6.51275 16.7197 6.21986ZM7.28033 6.21986C7.57322 6.51275 7.57322 6.98763 7.28033 7.28052L2.56066 12.0002L7.28033 16.7199C7.57322 17.0128 7.57322 17.4876 7.28033 17.7805C6.98744 18.0734 6.51256 18.0734 6.21967 17.7805L0.96967 12.5305C0.676777 12.2376 0.676777 11.7628 0.96967 11.4699L6.21967 6.21986C6.51256 5.92697 6.98744 5.92697 7.28033 6.21986Z" fill="${color}"/> `;
9
- $: switch (variation) {
10
- case 'outline':
11
- svgpath = svgoutline;
12
- viewBox = '0 0 24 24';
13
- break;
14
- case 'solid':
15
- svgpath = svgsolid;
16
- viewBox = '0 0 24 24';
17
- break;
18
- default:
19
- svgpath = svgoutline;
20
- viewBox = '0 0 24 24';
21
- }
22
- export let ariaLabel = 'code bracket';
23
- </script>
24
-
25
- <svg
26
- xmlns="http://www.w3.org/2000/svg"
27
- width={size}
28
- height={size}
29
- class={$$props.class}
30
- {...$$restProps}
31
- aria-label={ariaLabel}
32
- fill="none"
33
- {viewBox}
34
- stroke-width="2"
35
- on:click
36
- >
37
- {@html svgpath}
38
- </svg>
@@ -1,22 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- [x: string]: any;
5
- size?: string;
6
- color?: string;
7
- variation?: 'solid' | 'outline';
8
- ariaLabel?: string;
9
- };
10
- events: {
11
- click: MouseEvent;
12
- } & {
13
- [evt: string]: CustomEvent<any>;
14
- };
15
- slots: {};
16
- };
17
- export declare type CodeBracketProps = typeof __propDef.props;
18
- export declare type CodeBracketEvents = typeof __propDef.events;
19
- export declare type CodeBracketSlots = typeof __propDef.slots;
20
- export default class CodeBracket extends SvelteComponentTyped<CodeBracketProps, CodeBracketEvents, CodeBracketSlots> {
21
- }
22
- export {};