flowbite-svelte 0.24.5 → 0.24.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 +7 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +3 -1
- package/ratings/RatingComment.svelte.d.ts +1 -1
- package/ratings/Review.svelte +72 -0
- package/ratings/Review.svelte.d.ts +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.24.6](https://github.com/themesberg/flowbite-svelte/compare/v0.24.5...v0.24.6) (2022-08-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add Review component ([d41b11d](https://github.com/themesberg/flowbite-svelte/commit/d41b11d4ef00d1d6d0d824d4fcdc9c964a78a7d2))
|
|
11
|
+
|
|
5
12
|
### [0.24.5](https://github.com/themesberg/flowbite-svelte/compare/v0.24.4...v0.24.5) (2022-08-11)
|
|
6
13
|
|
|
7
14
|
|
package/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export { default as Rating } from './ratings/Rating.svelte';
|
|
|
65
65
|
export { default as AdvancedRating } from './ratings/AdvancedRating.svelte';
|
|
66
66
|
export { default as ScoreRating } from './ratings/ScoreRating.svelte';
|
|
67
67
|
export { default as RatingComment } from './ratings/RatingComment.svelte';
|
|
68
|
+
export { default as Review } from './ratings/Review.svelte';
|
|
68
69
|
export { default as Sidebar } from './sidebars/Sidebar.svelte';
|
|
69
70
|
export { default as SidebarItem } from './sidebars/SidebarItem.svelte';
|
|
70
71
|
export { default as SidebarBrand } from './sidebars/SidebarBrand.svelte';
|
package/index.js
CHANGED
|
@@ -88,6 +88,7 @@ export { default as Rating } from './ratings/Rating.svelte';
|
|
|
88
88
|
export { default as AdvancedRating } from './ratings/AdvancedRating.svelte';
|
|
89
89
|
export { default as ScoreRating } from './ratings/ScoreRating.svelte';
|
|
90
90
|
export { default as RatingComment } from './ratings/RatingComment.svelte';
|
|
91
|
+
export { default as Review } from './ratings/Review.svelte';
|
|
91
92
|
// Sidebar
|
|
92
93
|
export { default as Sidebar } from './sidebars/Sidebar.svelte';
|
|
93
94
|
export { default as SidebarItem } from './sidebars/SidebarItem.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.6",
|
|
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-flag-icons": "^0.1.0",
|
|
33
34
|
"svelte-heros": "^2.3.3",
|
|
34
35
|
"svelte-preprocess": "^4.10.7",
|
|
35
36
|
"svelte-sidebar-menu": "^0.8.4",
|
|
@@ -171,6 +172,7 @@
|
|
|
171
172
|
"./ratings/AdvancedRating.svelte": "./ratings/AdvancedRating.svelte",
|
|
172
173
|
"./ratings/Rating.svelte": "./ratings/Rating.svelte",
|
|
173
174
|
"./ratings/RatingComment.svelte": "./ratings/RatingComment.svelte",
|
|
175
|
+
"./ratings/Review.svelte": "./ratings/Review.svelte",
|
|
174
176
|
"./ratings/ScoreRating.svelte": "./ratings/ScoreRating.svelte",
|
|
175
177
|
"./sidebars/Sidebar.svelte": "./sidebars/Sidebar.svelte",
|
|
176
178
|
"./sidebars/SidebarBrand.svelte": "./sidebars/SidebarBrand.svelte",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let review;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<article class="md:gap-8 md:grid md:grid-cols-3">
|
|
6
|
+
<div>
|
|
7
|
+
<div class="flex items-center mb-6 space-x-4">
|
|
8
|
+
<img class="w-10 h-10 rounded-full" src={review.imgSrc} alt={review.imgAlt} />
|
|
9
|
+
<div class="space-y-1 font-medium dark:text-white">
|
|
10
|
+
<p>{review.name}</p>
|
|
11
|
+
{#if review.address}
|
|
12
|
+
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
|
|
13
|
+
{#if review.addressIcon}
|
|
14
|
+
<svelte:component this={review.addressIcon} />
|
|
15
|
+
{/if}
|
|
16
|
+
{review.address}
|
|
17
|
+
</div>
|
|
18
|
+
{/if}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
{#if review.item || review.option1 || review.option2}
|
|
22
|
+
<ul class="space-y-4 text-sm text-gray-500 dark:text-gray-400">
|
|
23
|
+
{#if review.item}
|
|
24
|
+
<li class="flex items-center">
|
|
25
|
+
{#if review.itemIcon}
|
|
26
|
+
<svelte:component this={review.addressIcon} />
|
|
27
|
+
{/if}
|
|
28
|
+
{review.item}
|
|
29
|
+
</li>
|
|
30
|
+
{/if}
|
|
31
|
+
{#if review.option1}
|
|
32
|
+
<li class="flex items-center">
|
|
33
|
+
{#if review.option1Icon}
|
|
34
|
+
<svelte:component this={review.option1Icon} />
|
|
35
|
+
{/if}
|
|
36
|
+
{review.option1}
|
|
37
|
+
</li>
|
|
38
|
+
{/if}
|
|
39
|
+
{#if review.option2}
|
|
40
|
+
<li class="flex items-center">
|
|
41
|
+
{#if review.option2Icon}
|
|
42
|
+
<svelte:component this={review.option2Icon} />
|
|
43
|
+
{/if}
|
|
44
|
+
{review.option2}
|
|
45
|
+
</li>
|
|
46
|
+
{/if}
|
|
47
|
+
</ul>
|
|
48
|
+
{/if}
|
|
49
|
+
</div>
|
|
50
|
+
<div class="col-span-2 mt-6 md:mt-0">
|
|
51
|
+
<div class="flex items-start mb-5">
|
|
52
|
+
<div class="pr-4">
|
|
53
|
+
{#if review.date}
|
|
54
|
+
<footer>
|
|
55
|
+
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400">
|
|
56
|
+
Reviewed: {review.date}
|
|
57
|
+
</p>
|
|
58
|
+
</footer>
|
|
59
|
+
{/if}
|
|
60
|
+
<h4 class="text-xl font-bold text-gray-900 dark:text-white">
|
|
61
|
+
{review.title}
|
|
62
|
+
</h4>
|
|
63
|
+
</div>
|
|
64
|
+
<p
|
|
65
|
+
class="bg-blue-700 text-white text-sm font-semibold inline-flex items-center p-1.5 rounded"
|
|
66
|
+
>
|
|
67
|
+
{review.rating}
|
|
68
|
+
</p>
|
|
69
|
+
</div>
|
|
70
|
+
<slot />
|
|
71
|
+
</div>
|
|
72
|
+
</article>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { SvelteComponent } from 'svelte';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
review: {
|
|
6
|
+
name: string;
|
|
7
|
+
imgSrc: string;
|
|
8
|
+
imgAlt: string;
|
|
9
|
+
address: string;
|
|
10
|
+
addressIcon: typeof SvelteComponent;
|
|
11
|
+
reviewDate: string;
|
|
12
|
+
title: string;
|
|
13
|
+
rating: number;
|
|
14
|
+
item: string;
|
|
15
|
+
itemIcon: typeof SvelteComponent;
|
|
16
|
+
option1: string;
|
|
17
|
+
option1Icon: typeof SvelteComponent;
|
|
18
|
+
option2: string;
|
|
19
|
+
option2Icon: typeof SvelteComponent;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
events: {
|
|
23
|
+
[evt: string]: CustomEvent<any>;
|
|
24
|
+
};
|
|
25
|
+
slots: {
|
|
26
|
+
default: {};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare type ReviewProps = typeof __propDef.props;
|
|
30
|
+
export declare type ReviewEvents = typeof __propDef.events;
|
|
31
|
+
export declare type ReviewSlots = typeof __propDef.slots;
|
|
32
|
+
export default class Review extends SvelteComponentTyped<ReviewProps, ReviewEvents, ReviewSlots> {
|
|
33
|
+
}
|
|
34
|
+
export {};
|