flowbite-svelte 0.24.5 → 0.24.8
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 +24 -0
- package/accordions/AccordionFlush.svelte +2 -2
- package/accordions/AccordionFlush.svelte.d.ts +2 -2
- package/carousels/CarouselTransition.svelte +2 -2
- package/forms/Iconinput.svelte +2 -2
- package/forms/Input.svelte +2 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/megamenu/MegaMenu.svelte +2 -2
- package/modals/Modal.svelte +14 -14
- package/package.json +18 -16
- package/paginations/TableData.svelte +1 -1
- package/paginations/TableData.svelte.d.ts +2 -5
- package/ratings/RatingComment.svelte.d.ts +1 -1
- package/ratings/Review.svelte +68 -0
- package/ratings/Review.svelte.d.ts +28 -0
- package/types.d.ts +21 -0
- package/utils/clickOutside.d.ts +1 -1
- package/utils/clickOutside.js +2 -2
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.24.8](https://github.com/themesberg/flowbite-svelte/compare/v0.24.7...v0.24.8) (2022-08-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* change function clickOutside to arrow function ([71e71e0](https://github.com/themesberg/flowbite-svelte/commit/71e71e0e482ad9939f9d135b1608b5cc8d31d899))
|
|
11
|
+
* update createprops and update props ([0739b92](https://github.com/themesberg/flowbite-svelte/commit/0739b9296caddcba85f849b222e6548a961dbd34))
|
|
12
|
+
|
|
13
|
+
### [0.24.7](https://github.com/themesberg/flowbite-svelte/compare/v0.24.5...v0.24.7) (2022-08-11)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add Review component ([67af517](https://github.com/themesberg/flowbite-svelte/commit/67af517e32dfc19c6079e5d1925a234f0162cc34))
|
|
19
|
+
* add Review component ([d41b11d](https://github.com/themesberg/flowbite-svelte/commit/d41b11d4ef00d1d6d0d824d4fcdc9c964a78a7d2))
|
|
20
|
+
* add Review component, page, and prop ([4446e1e](https://github.com/themesberg/flowbite-svelte/commit/4446e1eba3706e291f0cb3812b4ffb61df48eb46))
|
|
21
|
+
|
|
22
|
+
### [0.24.6](https://github.com/themesberg/flowbite-svelte/compare/v0.24.5...v0.24.6) (2022-08-11)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add Review component ([d41b11d](https://github.com/themesberg/flowbite-svelte/commit/d41b11d4ef00d1d6d0d824d4fcdc9c964a78a7d2))
|
|
28
|
+
|
|
5
29
|
### [0.24.5](https://github.com/themesberg/flowbite-svelte/compare/v0.24.4...v0.24.5) (2022-08-11)
|
|
6
30
|
|
|
7
31
|
|
|
@@ -5,6 +5,8 @@ import { ChevronDown, ChevronUp } from 'svelte-heros';
|
|
|
5
5
|
export let id = '';
|
|
6
6
|
export let btnClass = 'flex justify-between items-center py-5 w-full font-medium text-left text-gray-500 border-b border-gray-200 dark:border-gray-700 dark:text-gray-400';
|
|
7
7
|
export let slotClass = 'py-5 border-b border-gray-200 dark:border-gray-700';
|
|
8
|
+
export let iconSize = 24;
|
|
9
|
+
export let iconClass = 'text-gray-500 sm:w-6 sm:h-6 dark:text-gray-300';
|
|
8
10
|
export let isOpen = false;
|
|
9
11
|
export let icons = {
|
|
10
12
|
up: ChevronUp,
|
|
@@ -18,8 +20,6 @@ onMount(() => {
|
|
|
18
20
|
const handleToggle = (id) => {
|
|
19
21
|
isOpen = !isOpen;
|
|
20
22
|
};
|
|
21
|
-
export let iconSize = 24;
|
|
22
|
-
export let iconClass = 'text-gray-500 sm:w-6 sm:h-6 dark:text-gray-300';
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
25
|
<h2 aria-expanded={isOpen}>
|
|
@@ -6,10 +6,10 @@ declare const __propDef: {
|
|
|
6
6
|
id?: string;
|
|
7
7
|
btnClass?: string;
|
|
8
8
|
slotClass?: string;
|
|
9
|
-
isOpen?: boolean;
|
|
10
|
-
icons?: AccordionIconType;
|
|
11
9
|
iconSize?: number;
|
|
12
10
|
iconClass?: string;
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
icons?: AccordionIconType;
|
|
13
13
|
};
|
|
14
14
|
events: {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -28,7 +28,7 @@ export let captionClass = 'h-10 bg-gray-300 dark:bg-gray-700 dark:text-white p-2
|
|
|
28
28
|
// Indicator
|
|
29
29
|
export let indicatorClass = 'w-3 h-3 rounded-full bg-gray-100 hover:bg-gray-300 opacity-60';
|
|
30
30
|
// have a custom transition function that returns the desired transition
|
|
31
|
-
|
|
31
|
+
const multiple = (node, params) => {
|
|
32
32
|
switch (transitionType) {
|
|
33
33
|
case 'slide':
|
|
34
34
|
return slide(node, params);
|
|
@@ -39,7 +39,7 @@ function multiple(node, params) {
|
|
|
39
39
|
case 'fade':
|
|
40
40
|
return fade(node, params);
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
// Slide
|
|
44
44
|
// export let slideClass: string = 'hidden';
|
|
45
45
|
let imageShowingIndex = 1;
|
package/forms/Iconinput.svelte
CHANGED
|
@@ -9,9 +9,9 @@ export let spanClass = 'inline-flex items-center px-3 text-sm text-gray-900 bg-g
|
|
|
9
9
|
export let noBorderInputClass = 'bg-gray-50 border border-gray-300 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
|
|
10
10
|
export let noBorderDivClass = 'flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none';
|
|
11
11
|
export let iconClass = 'mr-2';
|
|
12
|
-
|
|
12
|
+
const setType = (node) => {
|
|
13
13
|
node.type = type;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
{#if noBorder}
|
package/forms/Input.svelte
CHANGED
|
@@ -13,9 +13,9 @@ const colorClasses = {
|
|
|
13
13
|
// tinted if put in component having its own background
|
|
14
14
|
let background = getContext('background');
|
|
15
15
|
// you need to this to avoid 2-way binding
|
|
16
|
-
|
|
16
|
+
const setType = (node) => {
|
|
17
17
|
node.type = type;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<input
|
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/megamenu/MegaMenu.svelte
CHANGED
|
@@ -7,11 +7,11 @@ let wrapperClass;
|
|
|
7
7
|
$: wrapperClass = classNames('border-gray-100 shadow-md dark:border-gray-700', full ? 'border-y' : 'rounded-lg border', full ? 'bg-white dark:bg-gray-800' : 'bg-white dark:bg-gray-700', $$props.class);
|
|
8
8
|
let ulClass;
|
|
9
9
|
$: ulClass = classNames('grid grid-flow-row gap-y-4 md:gap-x-0 auto-col-max auto-row-max', full && $$slots.extra ? 'grid-cols-2' : 'grid-cols-2 md:grid-cols-3', 'text-sm font-medium', 'text-gray-500 dark:text-gray-400', full && $$slots.extra && 'md:w-2/3');
|
|
10
|
-
|
|
10
|
+
const init = (node) => {
|
|
11
11
|
if (full) {
|
|
12
12
|
node.parentElement.classList.add('inset-x-0');
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<div class={wrapperClass} use:init>
|
package/modals/Modal.svelte
CHANGED
|
@@ -18,7 +18,7 @@ const allPlacementClasses = [
|
|
|
18
18
|
'items-end'
|
|
19
19
|
];
|
|
20
20
|
let backdropEl;
|
|
21
|
-
|
|
21
|
+
const init = (node, _open) => {
|
|
22
22
|
getPlacementClasses().map((c) => node.classList.add(c));
|
|
23
23
|
_open && createBackdrop(node);
|
|
24
24
|
return {
|
|
@@ -31,12 +31,12 @@ function init(node, _open) {
|
|
|
31
31
|
destroyBackdrop(node);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
}
|
|
35
|
-
|
|
34
|
+
};
|
|
35
|
+
const handleEscape = (e) => {
|
|
36
36
|
if (open && e.key === 'Escape')
|
|
37
37
|
open = false;
|
|
38
|
-
}
|
|
39
|
-
|
|
38
|
+
};
|
|
39
|
+
const createBackdrop = (node) => {
|
|
40
40
|
if (!backdropEl) {
|
|
41
41
|
backdropEl = document.createElement('div');
|
|
42
42
|
backdropEl.classList.add(...backdropClasses.split(' '));
|
|
@@ -46,8 +46,8 @@ function createBackdrop(node) {
|
|
|
46
46
|
document.addEventListener('keydown', handleEscape, true);
|
|
47
47
|
}
|
|
48
48
|
dispatch('show', node);
|
|
49
|
-
}
|
|
50
|
-
|
|
49
|
+
};
|
|
50
|
+
const destroyBackdrop = (node) => {
|
|
51
51
|
const body = document.querySelector('body');
|
|
52
52
|
body.style.overflow = 'auto';
|
|
53
53
|
if (backdropEl)
|
|
@@ -55,8 +55,8 @@ function destroyBackdrop(node) {
|
|
|
55
55
|
backdropEl = undefined;
|
|
56
56
|
document.removeEventListener('keydown', handleEscape, true);
|
|
57
57
|
dispatch('hide', node);
|
|
58
|
-
}
|
|
59
|
-
|
|
58
|
+
};
|
|
59
|
+
const getPlacementClasses = () => {
|
|
60
60
|
switch (placement) {
|
|
61
61
|
// top
|
|
62
62
|
case 'top-left':
|
|
@@ -82,7 +82,7 @@ function getPlacementClasses() {
|
|
|
82
82
|
default:
|
|
83
83
|
return ['justify-center', 'items-center'];
|
|
84
84
|
}
|
|
85
|
-
}
|
|
85
|
+
};
|
|
86
86
|
const sizes = {
|
|
87
87
|
xs: 'max-w-md',
|
|
88
88
|
sm: 'max-w-lg',
|
|
@@ -90,13 +90,13 @@ const sizes = {
|
|
|
90
90
|
lg: 'max-w-4xl',
|
|
91
91
|
xl: 'max-w-7xl'
|
|
92
92
|
};
|
|
93
|
-
|
|
93
|
+
const onButtonsClick = ({ target }) => {
|
|
94
94
|
if (autoclose && target.tagName === 'BUTTON')
|
|
95
95
|
open = !open;
|
|
96
|
-
}
|
|
97
|
-
|
|
96
|
+
};
|
|
97
|
+
const hide = () => {
|
|
98
98
|
open = false;
|
|
99
|
-
}
|
|
99
|
+
};
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
102
|
<!-- Main modal -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.8",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -12,32 +12,33 @@
|
|
|
12
12
|
"homepage": "https://flowbite-svelte.com/",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@playwright/test": "^1.
|
|
15
|
+
"@playwright/test": "^1.25.0",
|
|
16
16
|
"@sveltejs/adapter-auto": "next",
|
|
17
17
|
"@sveltejs/kit": "next",
|
|
18
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
19
|
-
"@typescript-eslint/parser": "^5.
|
|
20
|
-
"autoprefixer": "^10.4.
|
|
21
|
-
"createprops": "^0.4.
|
|
22
|
-
"eslint": "^8.
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
|
19
|
+
"@typescript-eslint/parser": "^5.33.0",
|
|
20
|
+
"autoprefixer": "^10.4.8",
|
|
21
|
+
"createprops": "^0.4.9",
|
|
22
|
+
"eslint": "^8.21.0",
|
|
23
23
|
"eslint-config-prettier": "^8.5.0",
|
|
24
24
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
25
25
|
"mdsvex": "^0.10.6",
|
|
26
|
-
"postcss": "^8.4.
|
|
26
|
+
"postcss": "^8.4.16",
|
|
27
27
|
"postcss-load-config": "3.1.4",
|
|
28
28
|
"prettier": "^2.7.1",
|
|
29
29
|
"prettier-plugin-svelte": "^2.7.0",
|
|
30
30
|
"prism-themes": "^1.9.0",
|
|
31
|
-
"svelte": "^3.
|
|
31
|
+
"svelte": "^3.49.0",
|
|
32
32
|
"svelte-check": "^2.8.0",
|
|
33
|
+
"svelte-flag-icons": "^0.1.1",
|
|
33
34
|
"svelte-heros": "^2.3.3",
|
|
34
35
|
"svelte-preprocess": "^4.10.7",
|
|
35
|
-
"svelte-sidebar-menu": "^0.8.
|
|
36
|
-
"svelte2tsx": "^0.5.
|
|
37
|
-
"tailwindcss": "^3.1.
|
|
38
|
-
"tslib": "^2.
|
|
36
|
+
"svelte-sidebar-menu": "^0.8.11",
|
|
37
|
+
"svelte2tsx": "^0.5.13",
|
|
38
|
+
"tailwindcss": "^3.1.8",
|
|
39
|
+
"tslib": "^2.4.0",
|
|
39
40
|
"typescript": "~4.7.4",
|
|
40
|
-
"vite": "^3.0.
|
|
41
|
+
"vite": "^3.0.7"
|
|
41
42
|
},
|
|
42
43
|
"type": "module",
|
|
43
44
|
"keywords": [
|
|
@@ -80,9 +81,9 @@
|
|
|
80
81
|
"url": "https://github.com/themesberg/flowbite-svelte"
|
|
81
82
|
},
|
|
82
83
|
"dependencies": {
|
|
83
|
-
"@floating-ui/dom": "^0.5.
|
|
84
|
+
"@floating-ui/dom": "^0.5.4",
|
|
84
85
|
"classnames": "^2.3.1",
|
|
85
|
-
"flowbite": "^1.
|
|
86
|
+
"flowbite": "^1.5.2"
|
|
86
87
|
},
|
|
87
88
|
"engines": {
|
|
88
89
|
"npm": ">=7.0.0",
|
|
@@ -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",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
export let helper = undefined;
|
|
3
2
|
export let btnPreClass = 'py-2 px-4 text-sm font-medium text-white bg-gray-800 rounded-l hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
4
3
|
export let btnNextClass = 'py-2 px-4 text-sm font-medium text-white bg-gray-800 rounded-r border-0 border-l border-gray-700 hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
4
|
+
export let helper = undefined;
|
|
5
5
|
const dispatch = createEventDispatcher();
|
|
6
6
|
const previous = () => {
|
|
7
7
|
dispatch('previous');
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { TableDataHelperType } from '../types';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
helper?: {
|
|
5
|
-
start: number;
|
|
6
|
-
end: number;
|
|
7
|
-
total: number;
|
|
8
|
-
} | undefined;
|
|
9
5
|
btnPreClass?: string;
|
|
10
6
|
btnNextClass?: string;
|
|
7
|
+
helper?: TableDataHelperType | undefined;
|
|
11
8
|
};
|
|
12
9
|
events: {
|
|
13
10
|
blur: FocusEvent;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let review;
|
|
3
|
+
export let articleClass = 'md:gap-8 md:grid md:grid-cols-3';
|
|
4
|
+
export let divClass = 'flex items-center mb-6 space-x-4';
|
|
5
|
+
export let imgClass = 'w-10 h-10 rounded-full';
|
|
6
|
+
export let ulClass = 'space-y-4 text-sm text-gray-500 dark:text-gray-400';
|
|
7
|
+
export let liClass = 'flex items-center';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<article class={classNames(articleClass, $$props.classArticle)}>
|
|
11
|
+
<div>
|
|
12
|
+
<div class={classNames(divClass, $$props.classDiv)}>
|
|
13
|
+
<img class={classNames(imgClass, $$props.classImg)} src={review.imgSrc} alt={review.imgAlt} />
|
|
14
|
+
<div class="space-y-1 font-medium dark:text-white">
|
|
15
|
+
<p>{review.name}</p>
|
|
16
|
+
{#if review.address}
|
|
17
|
+
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
|
|
18
|
+
{#if review.addressIcon}
|
|
19
|
+
<svelte:component this={review.addressIcon} size="16" class="mr-2" />
|
|
20
|
+
{/if}
|
|
21
|
+
{review.address}
|
|
22
|
+
</div>
|
|
23
|
+
{/if}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
{#if $$slots.item || $$slots.option1 || $$slots.option2}
|
|
27
|
+
<ul class={classNames(ulClass, $$props.classUl)}>
|
|
28
|
+
{#if $$slots.item}
|
|
29
|
+
<li class={classNames(liClass, $$props.classLi)}>
|
|
30
|
+
<slot name="item" />
|
|
31
|
+
</li>
|
|
32
|
+
{/if}
|
|
33
|
+
{#if $$slots.option1}
|
|
34
|
+
<li class={classNames(liClass, $$props.classLi)}>
|
|
35
|
+
<slot name="option1" />
|
|
36
|
+
</li>
|
|
37
|
+
{/if}
|
|
38
|
+
{#if $$slots.option2}
|
|
39
|
+
<li class={classNames(liClass, $$props.classLi)}>
|
|
40
|
+
<slot name="option2" />
|
|
41
|
+
</li>
|
|
42
|
+
{/if}
|
|
43
|
+
</ul>
|
|
44
|
+
{/if}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="col-span-2 mt-6 md:mt-0">
|
|
47
|
+
<div class="flex items-start mb-5">
|
|
48
|
+
<div class="pr-4">
|
|
49
|
+
{#if review.reviewDate}
|
|
50
|
+
<footer>
|
|
51
|
+
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400">
|
|
52
|
+
Reviewed: {review.reviewDate}
|
|
53
|
+
</p>
|
|
54
|
+
</footer>
|
|
55
|
+
{/if}
|
|
56
|
+
<h4 class="text-xl font-bold text-gray-900 dark:text-white">
|
|
57
|
+
{review.title}
|
|
58
|
+
</h4>
|
|
59
|
+
</div>
|
|
60
|
+
<p
|
|
61
|
+
class="bg-blue-700 text-white text-sm font-semibold inline-flex items-center p-1.5 rounded"
|
|
62
|
+
>
|
|
63
|
+
{review.rating}
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
<slot />
|
|
67
|
+
</div>
|
|
68
|
+
</article>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ReviewType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
review: ReviewType;
|
|
7
|
+
articleClass?: string;
|
|
8
|
+
divClass?: string;
|
|
9
|
+
imgClass?: string;
|
|
10
|
+
ulClass?: string;
|
|
11
|
+
liClass?: string;
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {
|
|
17
|
+
item: {};
|
|
18
|
+
option1: {};
|
|
19
|
+
option2: {};
|
|
20
|
+
default: {};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare type ReviewProps = typeof __propDef.props;
|
|
24
|
+
export declare type ReviewEvents = typeof __propDef.events;
|
|
25
|
+
export declare type ReviewSlots = typeof __propDef.slots;
|
|
26
|
+
export default class Review extends SvelteComponentTyped<ReviewProps, ReviewEvents, ReviewSlots> {
|
|
27
|
+
}
|
|
28
|
+
export {};
|
package/types.d.ts
CHANGED
|
@@ -148,6 +148,22 @@ export interface PillTabType {
|
|
|
148
148
|
selected: boolean;
|
|
149
149
|
href: string;
|
|
150
150
|
}
|
|
151
|
+
export declare type ReviewType = {
|
|
152
|
+
name: string;
|
|
153
|
+
imgSrc: string;
|
|
154
|
+
imgAlt: string;
|
|
155
|
+
address: string | undefined;
|
|
156
|
+
addressIcon: typeof SvelteComponent | undefined;
|
|
157
|
+
reviewDate: string | undefined;
|
|
158
|
+
title: string;
|
|
159
|
+
rating: number;
|
|
160
|
+
item: string | undefined;
|
|
161
|
+
itemIcon: typeof SvelteComponent | undefined;
|
|
162
|
+
option1: string | undefined;
|
|
163
|
+
option1Icon: typeof SvelteComponent | undefined;
|
|
164
|
+
option2: string | undefined;
|
|
165
|
+
option2Icon: typeof SvelteComponent | undefined;
|
|
166
|
+
};
|
|
151
167
|
export declare type SelectOptionType = {
|
|
152
168
|
name: string;
|
|
153
169
|
value: string;
|
|
@@ -193,6 +209,11 @@ export interface TabType {
|
|
|
193
209
|
href: string;
|
|
194
210
|
rel?: string;
|
|
195
211
|
}
|
|
212
|
+
export interface TableDataHelperType {
|
|
213
|
+
start: number;
|
|
214
|
+
end: number;
|
|
215
|
+
total: number;
|
|
216
|
+
}
|
|
196
217
|
export declare type Textsize = 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'text-2xl' | 'text-3xl' | 'text-4xl';
|
|
197
218
|
export interface TimelineItemType {
|
|
198
219
|
date: Date | string;
|
package/utils/clickOutside.d.ts
CHANGED
package/utils/clickOutside.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const clickOutside = (node, callback) => {
|
|
2
2
|
const handleClick = (event) => {
|
|
3
3
|
if (!event?.target)
|
|
4
4
|
return;
|
|
@@ -12,4 +12,4 @@ export function clickOutside(node, callback) {
|
|
|
12
12
|
document.removeEventListener('click', handleClick, true);
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
};
|