flowbite-svelte 0.24.8 → 0.24.11
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 +36 -0
- package/buttongroups/ButtonGroup.svelte +5 -2
- package/buttons/Button.svelte +28 -10
- package/buttons/Button.svelte.d.ts +2 -0
- package/dropdowns/Dropdown.svelte +2 -0
- package/dropdowns/Dropdown.svelte.d.ts +1 -0
- package/footer/FooterCopyright.svelte +1 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/modals/Modal.svelte +1 -1
- package/package.json +1 -2
- package/skeleton/CardPlaceholder.svelte +4 -5
- package/skeleton/CardPlaceholder.svelte.d.ts +2 -0
- package/skeleton/ImagePlaceholder.svelte +4 -5
- package/skeleton/ImagePlaceholder.svelte.d.ts +2 -0
- package/skeleton/ListPlaceholder.svelte +5 -4
- package/skeleton/ListPlaceholder.svelte.d.ts +9 -11
- package/skeleton/Skeleton.svelte +5 -1
- package/skeleton/Skeleton.svelte.d.ts +9 -11
- package/skeleton/TestimonialPlaceholder.svelte +5 -1
- package/skeleton/TestimonialPlaceholder.svelte.d.ts +9 -11
- package/skeleton/TextPlaceholder.svelte +5 -1
- package/skeleton/TextPlaceholder.svelte.d.ts +9 -11
- package/skeleton/VideoPlaceholder.svelte +4 -5
- package/skeleton/VideoPlaceholder.svelte.d.ts +2 -0
- package/skeleton/WidgetPlaceholder.svelte +6 -4
- package/skeleton/WidgetPlaceholder.svelte.d.ts +10 -11
- package/tooltips/Tooltip.svelte +10 -8
- package/tooltips/Tooltip.svelte.d.ts +1 -0
- package/buttongroups/ButtonGroupItem.svelte +0 -40
- package/buttongroups/ButtonGroupItem.svelte.d.ts +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
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.11](https://github.com/themesberg/flowbite-svelte/compare/v0.24.10...v0.24.11) (2022-08-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add sticky footer, add $$props.class to all skeleton components ([1fad8dc](https://github.com/themesberg/flowbite-svelte/commit/1fad8dc9d8c0bc1428daeada82f44accc5f7e9a0))
|
|
11
|
+
|
|
12
|
+
### [0.24.10](https://github.com/themesberg/flowbite-svelte/compare/v0.24.9...v0.24.10) (2022-08-15)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* modal - crypto ([47cf678](https://github.com/themesberg/flowbite-svelte/commit/47cf678ef2a7bf10c842e367a37e2aedebe7a8fc))
|
|
18
|
+
* modal - crypto + html ([26475ed](https://github.com/themesberg/flowbite-svelte/commit/26475edd98a2c73fbe02580fefb4c8455e25f1bb))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* create Coinbase, Fortmatic, Metamask, OperaWallet, and WalletConnect component ([f8eabc5](https://github.com/themesberg/flowbite-svelte/commit/f8eabc5b23b8c0d9fab75deca393858952406660))
|
|
24
|
+
|
|
25
|
+
### [0.24.9](https://github.com/themesberg/flowbite-svelte/compare/v0.24.8...v0.24.9) (2022-08-15)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* button group ([bb95b98](https://github.com/themesberg/flowbite-svelte/commit/bb95b98c0e4b70f3958c778ac2dc8367c67df8d7))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* dropdown open/close api ([d2aa6f7](https://github.com/themesberg/flowbite-svelte/commit/d2aa6f71e7e804d474eb46e58030097d9bd9962f))
|
|
36
|
+
* dropdown open/close api - docs ([f299c28](https://github.com/themesberg/flowbite-svelte/commit/f299c284a4ef3c9539e17677b815f60dd8d1e6f2))
|
|
37
|
+
* no href on <a> buttons ([ab13df8](https://github.com/themesberg/flowbite-svelte/commit/ab13df85aeac5368383bb708c9cb3146e418066f))
|
|
38
|
+
* window is undefined ([b752882](https://github.com/themesberg/flowbite-svelte/commit/b752882ad0f0f6a7c196223649463903453f48d6))
|
|
39
|
+
* window is undefined/2 ([4c0ca77](https://github.com/themesberg/flowbite-svelte/commit/4c0ca77eddfae2a04d10bc1ea3dc53671864b181))
|
|
40
|
+
|
|
5
41
|
### [0.24.8](https://github.com/themesberg/flowbite-svelte/compare/v0.24.7...v0.24.8) (2022-08-12)
|
|
6
42
|
|
|
7
43
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
|
|
1
|
+
<script>import { setContext } from 'svelte';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
export let divClass = 'inline-flex rounded-lg shadow-sm';
|
|
4
|
+
setContext('group', true);
|
|
5
|
+
setContext('background', true);
|
|
3
6
|
</script>
|
|
4
7
|
|
|
5
8
|
<div {...$$restProps} class={classNames(divClass, $$props.class)} role="group">
|
package/buttons/Button.svelte
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
import { getContext } from 'svelte';
|
|
3
|
+
const group = getContext('group');
|
|
3
4
|
export let pill = false;
|
|
4
5
|
export let outline = false;
|
|
5
6
|
export let gradient = false;
|
|
6
|
-
export let size = 'md';
|
|
7
|
+
export let size = group ? 'sm' : 'md';
|
|
7
8
|
export let href = undefined;
|
|
8
9
|
export let btnClass = undefined;
|
|
9
|
-
export let
|
|
10
|
+
export let type = 'button';
|
|
11
|
+
export let color = group ? (outline ? 'dark' : 'alternative') : 'blue';
|
|
10
12
|
export let shadow = null;
|
|
11
13
|
const background = getContext('background');
|
|
12
14
|
const colorClasses = {
|
|
13
15
|
blue: 'text-white bg-blue-700 hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800',
|
|
14
|
-
dark: 'text-white bg-gray-800 hover:bg-gray-900 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700
|
|
15
|
-
alternative: 'text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-800 dark:text-gray-400
|
|
16
|
+
dark: 'text-white bg-gray-800 hover:bg-gray-900 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700',
|
|
17
|
+
alternative: 'text-gray-900 bg-white border border-gray-200 dark:border-gray-600 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-800 dark:text-gray-400 hover:text-blue-700 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700',
|
|
16
18
|
light: 'text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700',
|
|
17
19
|
green: 'text-white bg-green-700 hover:bg-green-800 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800',
|
|
18
20
|
red: 'text-white bg-red-700 hover:bg-red-800 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900',
|
|
@@ -48,7 +50,7 @@ const coloredShadowClasses = {
|
|
|
48
50
|
};
|
|
49
51
|
const outlineClasses = {
|
|
50
52
|
blue: 'text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600 dark:focus:ring-blue-800',
|
|
51
|
-
dark: 'text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:ring-gray-300 dark:border-gray-600 dark:
|
|
53
|
+
dark: 'text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:ring-gray-300 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800',
|
|
52
54
|
green: 'text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-green-300 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800',
|
|
53
55
|
red: 'text-red-700 hover:text-white border border-red-700 hover:bg-red-800 focus:ring-red-300 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600 dark:focus:ring-red-900',
|
|
54
56
|
yellow: 'text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 focus:ring-yellow-300 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400 dark:focus:ring-yellow-900',
|
|
@@ -56,11 +58,22 @@ const outlineClasses = {
|
|
|
56
58
|
};
|
|
57
59
|
const sizeClasses = {
|
|
58
60
|
xs: 'px-3 py-2 text-xs',
|
|
59
|
-
sm: 'px-
|
|
61
|
+
sm: 'px-4 py-2 text-sm',
|
|
60
62
|
md: 'px-5 py-2.5 text-sm',
|
|
61
63
|
lg: 'px-5 py-3 text-base',
|
|
62
64
|
xl: 'px-6 py-3.5 text-base'
|
|
63
65
|
};
|
|
66
|
+
function rounded(gradientOutline = false) {
|
|
67
|
+
if (group) {
|
|
68
|
+
return pill
|
|
69
|
+
? 'first:rounded-l-full last:rounded-r-full'
|
|
70
|
+
: gradientOutline
|
|
71
|
+
? 'first:rounded-l-md last:rounded-r-md'
|
|
72
|
+
: 'first:rounded-l-lg last:rounded-r-lg';
|
|
73
|
+
}
|
|
74
|
+
return pill ? 'rounded-full' : gradientOutline ? 'rounded-md' : 'rounded-lg';
|
|
75
|
+
}
|
|
76
|
+
const hasBorder = () => outline || color === 'alternative' || color === 'light';
|
|
64
77
|
let buttonClass;
|
|
65
78
|
$: buttonClass = btnClass
|
|
66
79
|
? btnClass
|
|
@@ -68,16 +81,21 @@ $: buttonClass = btnClass
|
|
|
68
81
|
? 'p-0.5'
|
|
69
82
|
: 'inline-flex items-center justify-center ' + sizeClasses[size], gradient ? gradientClasses[color] : outline ? outlineClasses[color] : colorClasses[color], color === 'alternative' &&
|
|
70
83
|
(background
|
|
71
|
-
? 'dark:bg-
|
|
72
|
-
: 'dark:bg-transparent dark:border-gray-800 dark:hover:border-gray-700'),
|
|
84
|
+
? 'dark:bg-gray-700 dark:text-white dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-600'
|
|
85
|
+
: 'dark:bg-transparent dark:border-gray-800 dark:hover:border-gray-700'), outline &&
|
|
86
|
+
color === 'dark' &&
|
|
87
|
+
(background
|
|
88
|
+
? 'dark:text-white dark:border-white'
|
|
89
|
+
: 'dark:text-gray-400 dark:border-gray-700'), hasBorder() && group && 'border-l-0 first:border-l', rounded(false), shadow && coloredShadowClasses[shadow], $$props.disabled && 'cursor-not-allowed opacity-50', $$props.class);
|
|
73
90
|
let gradientOutlineClass;
|
|
74
|
-
$: gradientOutlineClass = classNames('inline-flex items-center justify-center', sizeClasses[size],
|
|
91
|
+
$: gradientOutlineClass = classNames('inline-flex items-center justify-center', sizeClasses[size], rounded(true), 'bg-white text-gray-900 dark:bg-gray-900 dark:text-white', // this is limitation - no transparency
|
|
75
92
|
'transition-all duration-75 ease-in group-hover:bg-opacity-0 group-hover:text-inherit');
|
|
76
93
|
</script>
|
|
77
94
|
|
|
78
95
|
<svelte:element
|
|
79
96
|
this={href ? 'a' : 'button'}
|
|
80
|
-
type={href ? undefined :
|
|
97
|
+
type={href ? undefined : type}
|
|
98
|
+
{href}
|
|
81
99
|
{...$$restProps}
|
|
82
100
|
class={buttonClass}
|
|
83
101
|
on:click
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ButtonType } from '../types';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
[x: string]: any;
|
|
@@ -8,6 +9,7 @@ declare const __propDef: {
|
|
|
8
9
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
10
|
href?: string;
|
|
10
11
|
btnClass?: string;
|
|
12
|
+
type?: ButtonType;
|
|
11
13
|
color?: 'alternative' | 'blue' | 'cyan' | 'dark' | 'light' | 'lime' | 'green' | 'pink' | 'red' | 'teal' | 'yellow' | 'purple' | 'purpleToBlue' | 'cyanToBlue' | 'greenToBlue' | 'purpleToPink' | 'pinkToOrange' | 'tealToLime' | 'redToYellow';
|
|
12
14
|
shadow?: 'blue' | 'green' | 'cyan' | 'teal' | 'lime' | 'red' | 'pink' | 'purple' | null;
|
|
13
15
|
};
|
|
@@ -9,6 +9,7 @@ export let tooltipArrow = false;
|
|
|
9
9
|
export let arrowIcon = true;
|
|
10
10
|
export let labelClass = 'flex items-center justify-between w-full py-2 pl-3 pr-4 font-medium text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 md:w-auto dark:text-gray-400 dark:hover:text-white dark:focus:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent';
|
|
11
11
|
export let placement = 'bottom';
|
|
12
|
+
export let open = false;
|
|
12
13
|
setContext('background', true);
|
|
13
14
|
const icons = {
|
|
14
15
|
top: ChevronUp,
|
|
@@ -27,6 +28,7 @@ $: icon = icons[placement.split('-')[0]];
|
|
|
27
28
|
{placement}
|
|
28
29
|
arrow={tooltipArrow}
|
|
29
30
|
trigger="click"
|
|
31
|
+
bind:open
|
|
30
32
|
>
|
|
31
33
|
<slot name="trigger">
|
|
32
34
|
{#if inline}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let spanClass = 'text-sm text-gray-500 sm:text-center dark:text-gray-400';
|
|
2
|
+
export let spanClass = 'block text-sm text-gray-500 sm:text-center dark:text-gray-400';
|
|
3
3
|
export let aClass = 'hover:underline';
|
|
4
4
|
export let year = new Date().getFullYear();
|
|
5
5
|
export let href = '';
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export { default as Breadcrumb } from './breadcrumbs/Breadcrumb.svelte';
|
|
|
7
7
|
export { default as BreadcrumbItem } from './breadcrumbs/BreadcrumbItem.svelte';
|
|
8
8
|
export { default as Button } from './buttons/Button.svelte';
|
|
9
9
|
export { default as ButtonGroup } from './buttongroups/ButtonGroup.svelte';
|
|
10
|
-
export { default as ButtonGroupItem } from './buttongroups/ButtonGroupItem.svelte';
|
|
11
10
|
export { default as Card } from './cards/Card.svelte';
|
|
12
11
|
export { default as Carousel } from './carousels/Carousel.svelte';
|
|
13
12
|
export { default as CarouselTransition } from './carousels/CarouselTransition.svelte';
|
package/index.js
CHANGED
|
@@ -14,7 +14,6 @@ export { default as BreadcrumbItem } from './breadcrumbs/BreadcrumbItem.svelte';
|
|
|
14
14
|
export { default as Button } from './buttons/Button.svelte';
|
|
15
15
|
// Buttongroups
|
|
16
16
|
export { default as ButtonGroup } from './buttongroups/ButtonGroup.svelte';
|
|
17
|
-
export { default as ButtonGroupItem } from './buttongroups/ButtonGroupItem.svelte';
|
|
18
17
|
// Cards
|
|
19
18
|
export { default as Card } from './cards/Card.svelte';
|
|
20
19
|
// Carousels
|
package/modals/Modal.svelte
CHANGED
|
@@ -119,7 +119,7 @@ const hide = () => {
|
|
|
119
119
|
>
|
|
120
120
|
<!-- Modal header -->
|
|
121
121
|
{#if $$slots.header || title}
|
|
122
|
-
<div class="flex justify-between items-
|
|
122
|
+
<div class="flex justify-between items-center p-4 rounded-t border-b dark:border-gray-600">
|
|
123
123
|
<slot name="header">
|
|
124
124
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white p-0">
|
|
125
125
|
{title}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.11",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -108,7 +108,6 @@
|
|
|
108
108
|
"./breadcrumbs/Breadcrumb.svelte": "./breadcrumbs/Breadcrumb.svelte",
|
|
109
109
|
"./breadcrumbs/BreadcrumbItem.svelte": "./breadcrumbs/BreadcrumbItem.svelte",
|
|
110
110
|
"./buttongroups/ButtonGroup.svelte": "./buttongroups/ButtonGroup.svelte",
|
|
111
|
-
"./buttongroups/ButtonGroupItem.svelte": "./buttongroups/ButtonGroupItem.svelte",
|
|
112
111
|
"./buttons/Button.svelte": "./buttons/Button.svelte",
|
|
113
112
|
"./cards/Card.svelte": "./cards/Card.svelte",
|
|
114
113
|
"./carousels/Caption.svelte": "./carousels/Caption.svelte",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'p-4 max-w-sm rounded border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700';
|
|
3
|
+
export let size = '48';
|
|
2
4
|
</script>
|
|
3
5
|
|
|
4
|
-
<div
|
|
5
|
-
role="status"
|
|
6
|
-
class="p-4 max-w-sm rounded border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700"
|
|
7
|
-
>
|
|
6
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
8
7
|
<div class="flex justify-center items-center mb-4 h-48 bg-gray-300 rounded dark:bg-gray-700">
|
|
9
8
|
<svg
|
|
10
9
|
width={size}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'space-y-8 animate-pulse md:space-y-0 md:space-x-8 md:flex md:items-center';
|
|
3
|
+
export let size = '48';
|
|
2
4
|
</script>
|
|
3
5
|
|
|
4
|
-
<div
|
|
5
|
-
role="status"
|
|
6
|
-
class="space-y-8 animate-pulse md:space-y-0 md:space-x-8 md:flex md:items-center"
|
|
7
|
-
>
|
|
6
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
8
7
|
<div
|
|
9
8
|
class="flex justify-center items-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700"
|
|
10
9
|
>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'p-4 space-y-4 max-w-md rounded border border-gray-200 divide-y divide-gray-200 shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
5
6
|
<div class="flex justify-between items-center">
|
|
6
7
|
<div>
|
|
7
8
|
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5" />
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ListPlaceholderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ListPlaceholderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ListPlaceholderSlots */
|
|
4
|
-
export default class ListPlaceholder extends SvelteComponentTyped<{}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> {
|
|
7
|
-
}
|
|
8
|
-
export type ListPlaceholderProps = typeof __propDef.props;
|
|
9
|
-
export type ListPlaceholderEvents = typeof __propDef.events;
|
|
10
|
-
export type ListPlaceholderSlots = typeof __propDef.slots;
|
|
11
1
|
import { SvelteComponentTyped } from "svelte";
|
|
12
2
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
};
|
|
14
7
|
events: {
|
|
15
8
|
[evt: string]: CustomEvent<any>;
|
|
16
9
|
};
|
|
17
10
|
slots: {};
|
|
18
11
|
};
|
|
12
|
+
export declare type ListPlaceholderProps = typeof __propDef.props;
|
|
13
|
+
export declare type ListPlaceholderEvents = typeof __propDef.events;
|
|
14
|
+
export declare type ListPlaceholderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class ListPlaceholder extends SvelteComponentTyped<ListPlaceholderProps, ListPlaceholderEvents, ListPlaceholderSlots> {
|
|
16
|
+
}
|
|
19
17
|
export {};
|
package/skeleton/Skeleton.svelte
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
<
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'max-w-sm animate-pulse';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
2
6
|
<div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4" />
|
|
3
7
|
<div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px] mb-2.5" />
|
|
4
8
|
<div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5" />
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SkeletonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SkeletonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SkeletonSlots */
|
|
4
|
-
export default class Skeleton extends SvelteComponentTyped<{}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> {
|
|
7
|
-
}
|
|
8
|
-
export type SkeletonProps = typeof __propDef.props;
|
|
9
|
-
export type SkeletonEvents = typeof __propDef.events;
|
|
10
|
-
export type SkeletonSlots = typeof __propDef.slots;
|
|
11
1
|
import { SvelteComponentTyped } from "svelte";
|
|
12
2
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
};
|
|
14
7
|
events: {
|
|
15
8
|
[evt: string]: CustomEvent<any>;
|
|
16
9
|
};
|
|
17
10
|
slots: {};
|
|
18
11
|
};
|
|
12
|
+
export declare type SkeletonProps = typeof __propDef.props;
|
|
13
|
+
export declare type SkeletonEvents = typeof __propDef.events;
|
|
14
|
+
export declare type SkeletonSlots = typeof __propDef.slots;
|
|
15
|
+
export default class Skeleton extends SvelteComponentTyped<SkeletonProps, SkeletonEvents, SkeletonSlots> {
|
|
16
|
+
}
|
|
19
17
|
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
<
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'animate-pulse';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
2
6
|
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 max-w-[640px] mb-2.5 mx-auto" />
|
|
3
7
|
<div class="h-2.5 mx-auto bg-gray-300 rounded-full dark:bg-gray-700 max-w-[540px]" />
|
|
4
8
|
<div class="flex justify-center items-center mt-4">
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} TestimonialPlaceholderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} TestimonialPlaceholderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TestimonialPlaceholderSlots */
|
|
4
|
-
export default class TestimonialPlaceholder extends SvelteComponentTyped<{}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> {
|
|
7
|
-
}
|
|
8
|
-
export type TestimonialPlaceholderProps = typeof __propDef.props;
|
|
9
|
-
export type TestimonialPlaceholderEvents = typeof __propDef.events;
|
|
10
|
-
export type TestimonialPlaceholderSlots = typeof __propDef.slots;
|
|
11
1
|
import { SvelteComponentTyped } from "svelte";
|
|
12
2
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
};
|
|
14
7
|
events: {
|
|
15
8
|
[evt: string]: CustomEvent<any>;
|
|
16
9
|
};
|
|
17
10
|
slots: {};
|
|
18
11
|
};
|
|
12
|
+
export declare type TestimonialPlaceholderProps = typeof __propDef.props;
|
|
13
|
+
export declare type TestimonialPlaceholderEvents = typeof __propDef.events;
|
|
14
|
+
export declare type TestimonialPlaceholderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class TestimonialPlaceholder extends SvelteComponentTyped<TestimonialPlaceholderProps, TestimonialPlaceholderEvents, TestimonialPlaceholderSlots> {
|
|
16
|
+
}
|
|
19
17
|
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
<
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'space-y-2.5 animate-pulse max-w-lg';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
2
6
|
<div class="flex items-center space-x-2 w-full">
|
|
3
7
|
<div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32" />
|
|
4
8
|
<div class="h-2.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24" />
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} TextPlaceholderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} TextPlaceholderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TextPlaceholderSlots */
|
|
4
|
-
export default class TextPlaceholder extends SvelteComponentTyped<{}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> {
|
|
7
|
-
}
|
|
8
|
-
export type TextPlaceholderProps = typeof __propDef.props;
|
|
9
|
-
export type TextPlaceholderEvents = typeof __propDef.events;
|
|
10
|
-
export type TextPlaceholderSlots = typeof __propDef.slots;
|
|
11
1
|
import { SvelteComponentTyped } from "svelte";
|
|
12
2
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
};
|
|
14
7
|
events: {
|
|
15
8
|
[evt: string]: CustomEvent<any>;
|
|
16
9
|
};
|
|
17
10
|
slots: {};
|
|
18
11
|
};
|
|
12
|
+
export declare type TextPlaceholderProps = typeof __propDef.props;
|
|
13
|
+
export declare type TextPlaceholderEvents = typeof __propDef.events;
|
|
14
|
+
export declare type TextPlaceholderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class TextPlaceholder extends SvelteComponentTyped<TextPlaceholderProps, TextPlaceholderEvents, TextPlaceholderSlots> {
|
|
16
|
+
}
|
|
19
17
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'flex justify-center items-center max-w-sm h-56 bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700';
|
|
3
|
+
export let size = '48';
|
|
2
4
|
</script>
|
|
3
5
|
|
|
4
|
-
<div
|
|
5
|
-
role="status"
|
|
6
|
-
class="flex justify-center items-center max-w-sm h-56 bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700"
|
|
7
|
-
>
|
|
6
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
8
7
|
<svg
|
|
9
8
|
width={size}
|
|
10
9
|
height={size}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
>
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let divClass = 'p-4 max-w-sm rounded border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700';
|
|
3
|
+
export let size = '48';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
5
7
|
<div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2.5" />
|
|
6
8
|
<div class="mb-10 w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700" />
|
|
7
9
|
<div class="flex items-baseline mt-4 space-x-6">
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} WidgetPlaceholderProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} WidgetPlaceholderEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} WidgetPlaceholderSlots */
|
|
4
|
-
export default class WidgetPlaceholder extends SvelteComponentTyped<{}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> {
|
|
7
|
-
}
|
|
8
|
-
export type WidgetPlaceholderProps = typeof __propDef.props;
|
|
9
|
-
export type WidgetPlaceholderEvents = typeof __propDef.events;
|
|
10
|
-
export type WidgetPlaceholderSlots = typeof __propDef.slots;
|
|
11
1
|
import { SvelteComponentTyped } from "svelte";
|
|
12
2
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
divClass?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
};
|
|
14
8
|
events: {
|
|
15
9
|
[evt: string]: CustomEvent<any>;
|
|
16
10
|
};
|
|
17
11
|
slots: {};
|
|
18
12
|
};
|
|
13
|
+
export declare type WidgetPlaceholderProps = typeof __propDef.props;
|
|
14
|
+
export declare type WidgetPlaceholderEvents = typeof __propDef.events;
|
|
15
|
+
export declare type WidgetPlaceholderSlots = typeof __propDef.slots;
|
|
16
|
+
export default class WidgetPlaceholder extends SvelteComponentTyped<WidgetPlaceholderProps, WidgetPlaceholderEvents, WidgetPlaceholderSlots> {
|
|
17
|
+
}
|
|
19
18
|
export {};
|
package/tooltips/Tooltip.svelte
CHANGED
|
@@ -10,6 +10,7 @@ export let animation = 'duration-300';
|
|
|
10
10
|
export let arrow = true;
|
|
11
11
|
export let tipClass = 'absolute inline-block rounded-lg py-2 px-3 text-sm font-medium shadow-sm';
|
|
12
12
|
export let tipColor = '';
|
|
13
|
+
export let open = false;
|
|
13
14
|
const tipStyleClasses = {
|
|
14
15
|
dark: 'bg-gray-900 text-white dark:bg-gray-700',
|
|
15
16
|
light: 'border border-gray-200 bg-white text-gray-900',
|
|
@@ -24,7 +25,6 @@ const arrowStyleClasses = {
|
|
|
24
25
|
};
|
|
25
26
|
let toolTipClass;
|
|
26
27
|
$: toolTipClass = classNames(tipClass, animation !== false && `transition-opacity ${animation}`, !open && 'invisible opacity-0', tipStyleClasses[style], $$props.class);
|
|
27
|
-
let open = false;
|
|
28
28
|
const floatingPlacement = (placement) => {
|
|
29
29
|
return placement === 'auto' ? undefined : placement;
|
|
30
30
|
};
|
|
@@ -47,13 +47,15 @@ const updatePosition = () => computePosition(triggerRef, tooltipRef, {
|
|
|
47
47
|
let attachedScroll = false;
|
|
48
48
|
$: tooltipRef && open && updatePosition();
|
|
49
49
|
$: {
|
|
50
|
-
if (
|
|
51
|
-
attachedScroll
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
attachedScroll
|
|
56
|
-
|
|
50
|
+
if (tooltipRef && triggerRef) {
|
|
51
|
+
if (open && !attachedScroll) {
|
|
52
|
+
attachedScroll = true;
|
|
53
|
+
window.addEventListener('scroll', updatePosition, true);
|
|
54
|
+
}
|
|
55
|
+
else if (!open && attachedScroll) {
|
|
56
|
+
attachedScroll = false;
|
|
57
|
+
window.removeEventListener('scroll', updatePosition, true);
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
onDestroy(() => {
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<script>import classNames from 'classnames';
|
|
2
|
-
export let type = 'button';
|
|
3
|
-
export let btnClass = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white first:rounded-l-lg border-t border-b last:rounded-r-md border-l last:border-r border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white';
|
|
4
|
-
export let outlineClass = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent first:rounded-l-lg border-t border-b last:rounded-r-md border-l last:border-r border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700';
|
|
5
|
-
export let outline = false;
|
|
6
|
-
export let href = '';
|
|
7
|
-
if (outline) {
|
|
8
|
-
btnClass = outlineClass;
|
|
9
|
-
}
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
{#if href}
|
|
13
|
-
<a
|
|
14
|
-
{href}
|
|
15
|
-
{...$$restProps}
|
|
16
|
-
class={classNames(btnClass, $$props.class)}
|
|
17
|
-
on:click
|
|
18
|
-
on:change
|
|
19
|
-
on:keydown
|
|
20
|
-
on:keyup
|
|
21
|
-
on:mouseenter
|
|
22
|
-
on:mouseleave><slot /></a
|
|
23
|
-
>
|
|
24
|
-
{:else}
|
|
25
|
-
<button
|
|
26
|
-
{type}
|
|
27
|
-
{...$$restProps}
|
|
28
|
-
class={classNames(btnClass, $$props.class)}
|
|
29
|
-
on:click
|
|
30
|
-
on:change
|
|
31
|
-
on:keydown
|
|
32
|
-
on:keyup
|
|
33
|
-
on:focus
|
|
34
|
-
on:blur
|
|
35
|
-
on:mouseenter
|
|
36
|
-
on:mouseleave
|
|
37
|
-
>
|
|
38
|
-
<slot />
|
|
39
|
-
</button>
|
|
40
|
-
{/if}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { ButtonType } from '../types';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
type?: ButtonType;
|
|
7
|
-
btnClass?: string;
|
|
8
|
-
outlineClass?: string;
|
|
9
|
-
outline?: boolean;
|
|
10
|
-
href?: string;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
click: MouseEvent;
|
|
14
|
-
change: Event;
|
|
15
|
-
keydown: KeyboardEvent;
|
|
16
|
-
keyup: KeyboardEvent;
|
|
17
|
-
mouseenter: MouseEvent;
|
|
18
|
-
mouseleave: MouseEvent;
|
|
19
|
-
focus: FocusEvent;
|
|
20
|
-
blur: FocusEvent;
|
|
21
|
-
} & {
|
|
22
|
-
[evt: string]: CustomEvent<any>;
|
|
23
|
-
};
|
|
24
|
-
slots: {
|
|
25
|
-
default: {};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare type ButtonGroupItemProps = typeof __propDef.props;
|
|
29
|
-
export declare type ButtonGroupItemEvents = typeof __propDef.events;
|
|
30
|
-
export declare type ButtonGroupItemSlots = typeof __propDef.slots;
|
|
31
|
-
export default class ButtonGroupItem extends SvelteComponentTyped<ButtonGroupItemProps, ButtonGroupItemEvents, ButtonGroupItemSlots> {
|
|
32
|
-
}
|
|
33
|
-
export {};
|