flowbite-svelte 0.26.6 → 0.26.9
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 +45 -0
- package/buttons/Button.svelte +18 -19
- package/drawer/Drawer.svelte +54 -0
- package/drawer/Drawer.svelte.d.ts +30 -0
- package/dropdowns/Dropdown.svelte +28 -34
- package/dropdowns/Dropdown.svelte.d.ts +1 -2
- package/dropdowns/DropdownItem.svelte +2 -2
- package/dropdowns/DropdownItem.svelte.d.ts +1 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/navbar/NavLi.svelte +4 -4
- package/package.json +5 -2
- package/popover/Popover.svelte +13 -15
- package/popover/Popover.svelte.d.ts +1 -0
- package/tooltips/Tooltip.svelte +14 -9
- package/tooltips/Tooltip.svelte.d.ts +0 -1
- package/typography/A.svelte +3 -3
- package/typography/A.svelte.d.ts +2 -2
- package/typography/Blockquote.svelte +2 -0
- package/typography/Blockquote.svelte.d.ts +1 -0
- package/typography/DescriptionList.svelte +2 -1
- package/typography/DescriptionList.svelte.d.ts +1 -0
- package/typography/Heading.svelte +4 -2
- package/typography/Heading.svelte.d.ts +2 -1
- package/typography/Hr.svelte +8 -7
- package/typography/Hr.svelte.d.ts +1 -0
- package/typography/Img.svelte +15 -10
- package/typography/Img.svelte.d.ts +1 -0
- package/typography/Layout.svelte +11 -0
- package/typography/Layout.svelte.d.ts +21 -0
- package/typography/Li.svelte +2 -1
- package/typography/Li.svelte.d.ts +1 -0
- package/typography/List.svelte +2 -1
- package/typography/List.svelte.d.ts +1 -0
- package/typography/Mark.svelte +4 -3
- package/typography/Mark.svelte.d.ts +2 -1
- package/typography/P.svelte +7 -4
- package/typography/P.svelte.d.ts +4 -1
- package/typography/Secondary.svelte +4 -3
- package/typography/Secondary.svelte.d.ts +2 -1
- package/typography/Span.svelte +2 -1
- package/typography/Span.svelte.d.ts +1 -0
- package/typography/Ul.svelte +2 -1
- package/typography/Ul.svelte.d.ts +1 -0
- package/utils/Chevron.svelte +23 -0
- package/utils/Chevron.svelte.d.ts +19 -0
- package/utils/Frame.svelte +21 -12
- package/utils/Frame.svelte.d.ts +13 -4
- package/utils/Popper.svelte +13 -13
- package/utils/Popper.svelte.d.ts +0 -1
- package/utils/backdrop.d.ts +6 -0
- package/utils/backdrop.js +90 -0
- package/typography/Underline.svelte +0 -7
- package/typography/Underline.svelte.d.ts +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,51 @@
|
|
|
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.26.9](https://github.com/themesberg/flowbite-svelte/compare/v0.26.8...v0.26.9) (2022-09-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add id to typograpy components ([64cbe1b](https://github.com/themesberg/flowbite-svelte/commit/64cbe1b6f2cbe43fdf5cb71a0d82e3a5caad1586))
|
|
11
|
+
* add placement to Drawer component ([1b91e52](https://github.com/themesberg/flowbite-svelte/commit/1b91e52618da8935b326a69161d01f0cc7739158))
|
|
12
|
+
* working on drawer ([07a8e02](https://github.com/themesberg/flowbite-svelte/commit/07a8e02ceac450e7e7ceeb2ad9b98bfac7c7c1cf))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* folder names without s and update tests ([4e9c9ce](https://github.com/themesberg/flowbite-svelte/commit/4e9c9ce69e06b1a8e4394c3920c75606894c06d3))
|
|
18
|
+
* no dropdown docs ([4f92d9b](https://github.com/themesberg/flowbite-svelte/commit/4f92d9b56a53677bed7264b6f044e64a10c42c7e))
|
|
19
|
+
* update Htwo using scroll-mt-20 ([2006490](https://github.com/themesberg/flowbite-svelte/commit/200649069a05c6df4ed0e269d3479526092afe01))
|
|
20
|
+
|
|
21
|
+
### [0.26.8](https://github.com/themesberg/flowbite-svelte/compare/v0.26.7...v0.26.8) (2022-09-03)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* dropdown button ([f6347f2](https://github.com/themesberg/flowbite-svelte/commit/f6347f280cbfc552d001aa22128026174b46a6f3))
|
|
27
|
+
* more Frame inheritance ([bb72d69](https://github.com/themesberg/flowbite-svelte/commit/bb72d6952386bd0f6dec4711795e3591a6837c02))
|
|
28
|
+
* popover finalization ([c71481e](https://github.com/themesberg/flowbite-svelte/commit/c71481ec18e2850488d86cfdb583587eae4a19b2))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* missing 683restProps ([0d52fd1](https://github.com/themesberg/flowbite-svelte/commit/0d52fd1b4168c8cc707c174dc2c18f532cf2e93c))
|
|
34
|
+
* no triggers error ([83075e1](https://github.com/themesberg/flowbite-svelte/commit/83075e1a969bdf93a520bd9e35b339e36bf4f325))
|
|
35
|
+
* remove unused imports ([acb58b9](https://github.com/themesberg/flowbite-svelte/commit/acb58b9144948feeb3c1c14b41a71d2122187340))
|
|
36
|
+
|
|
37
|
+
### [0.26.7](https://github.com/themesberg/flowbite-svelte/compare/v0.26.6...v0.26.7) (2022-09-03)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* add Layout component ([2204586](https://github.com/themesberg/flowbite-svelte/commit/22045861703bf3e46cc7900e15c4db64d5246c50))
|
|
43
|
+
* add paragraphs page ([db973a3](https://github.com/themesberg/flowbite-svelte/commit/db973a3929bfdc8c4dd48338cc114bdc2c808fb8))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Bug Fixes
|
|
47
|
+
|
|
48
|
+
* add html block to text page ([37e910a](https://github.com/themesberg/flowbite-svelte/commit/37e910ae269099865865580d419b8dd05dccb7a8))
|
|
49
|
+
|
|
5
50
|
### [0.26.6](https://github.com/themesberg/flowbite-svelte/compare/v0.26.5...v0.26.6) (2022-09-02)
|
|
6
51
|
|
|
7
52
|
|
package/buttons/Button.svelte
CHANGED
|
@@ -77,7 +77,7 @@ const hasBorder = () => outline || color === 'alternative' || color === 'light';
|
|
|
77
77
|
let buttonClass;
|
|
78
78
|
$: buttonClass = btnClass
|
|
79
79
|
? btnClass
|
|
80
|
-
: classNames('
|
|
80
|
+
: classNames('text-center font-medium', group ? 'focus:ring-2' : 'focus:ring-4', group && 'focus:z-10', !group || color === 'alternative' || (outline && color === 'dark') || 'focus:outline-none', outline && gradient
|
|
81
81
|
? 'p-0.5'
|
|
82
82
|
: 'inline-flex items-center justify-center ' + sizeClasses[size], gradient ? gradientClasses[color] : outline ? outlineClasses[color] : colorClasses[color], color === 'alternative' &&
|
|
83
83
|
(background
|
|
@@ -93,24 +93,23 @@ $: gradientOutlineClass = classNames('inline-flex items-center justify-center',
|
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<svelte:element
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<!-- Trick to prentend outline without using border
|
|
96
|
+
this={href ? 'a' : 'button'}
|
|
97
|
+
type={href ? undefined : type}
|
|
98
|
+
{href}
|
|
99
|
+
{...$$restProps}
|
|
100
|
+
class={buttonClass}
|
|
101
|
+
on:click
|
|
102
|
+
on:change
|
|
103
|
+
on:keydown
|
|
104
|
+
on:keyup
|
|
105
|
+
on:mouseenter
|
|
106
|
+
on:mouseleave>
|
|
107
|
+
{#if outline && gradient}
|
|
108
|
+
<!-- Trick to prentend outline without using border
|
|
110
109
|
This has a limitation of no supporting transparency as
|
|
111
110
|
background is set to bg-white dark:bg-gray-900 -->
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
<span class={gradientOutlineClass}><slot /></span>
|
|
112
|
+
{:else}
|
|
113
|
+
<slot />
|
|
114
|
+
{/if}
|
|
116
115
|
</svelte:element>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
import { fly, slide, blur, fade } from 'svelte/transition';
|
|
3
|
+
import { clickOutside } from '../utils/clickOutside';
|
|
4
|
+
export let hidden = true;
|
|
5
|
+
export let position = 'fixed';
|
|
6
|
+
export let width = 'w-80';
|
|
7
|
+
export let backdrop = true;
|
|
8
|
+
export let placement = 'left';
|
|
9
|
+
export let id = 'drawer-example';
|
|
10
|
+
export let divClass = 'overflow-y-auto z-50 p-4 bg-white dark:bg-gray-800';
|
|
11
|
+
export let transitionParams = {};
|
|
12
|
+
export let transitionType = 'fly';
|
|
13
|
+
function multiple(node, params) {
|
|
14
|
+
switch (transitionType) {
|
|
15
|
+
case 'slide':
|
|
16
|
+
return slide(node, params);
|
|
17
|
+
case 'blur':
|
|
18
|
+
return blur(node, params);
|
|
19
|
+
case 'fly':
|
|
20
|
+
return fly(node, params);
|
|
21
|
+
case 'fade':
|
|
22
|
+
return fade(node, params);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const placements = {
|
|
26
|
+
left: 'inset-y-0 left-0',
|
|
27
|
+
right: 'inset-y-0 right-0',
|
|
28
|
+
top: 'inset-x-0 top-0',
|
|
29
|
+
bottom: 'inset-x-0 bottom-0'
|
|
30
|
+
};
|
|
31
|
+
const handleDrawer = () => {
|
|
32
|
+
hidden = !hidden;
|
|
33
|
+
console.log('clicked');
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
{#if !hidden}
|
|
38
|
+
{#if backdrop}
|
|
39
|
+
<div
|
|
40
|
+
class="fixed top-0 left-0 z-50 w-full h-full bg-gray-900/70"
|
|
41
|
+
on:click={() => !hidden && handleDrawer()} />
|
|
42
|
+
{/if}
|
|
43
|
+
<div
|
|
44
|
+
use:clickOutside={() => !hidden && handleDrawer()}
|
|
45
|
+
{id}
|
|
46
|
+
{...$$restProps}
|
|
47
|
+
class={classNames(divClass, width, position, placements[placement], $$props.class)}
|
|
48
|
+
transition:multiple={transitionParams}
|
|
49
|
+
tabindex="-1"
|
|
50
|
+
aria-controls={id}
|
|
51
|
+
aria-labelledby={id}>
|
|
52
|
+
<slot {hidden} />
|
|
53
|
+
</div>
|
|
54
|
+
{/if}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { drawerTransitionParamTypes, drawerTransitionTypes } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
hidden?: boolean;
|
|
7
|
+
position?: 'fixed' | 'absolute';
|
|
8
|
+
width?: string;
|
|
9
|
+
backdrop?: boolean;
|
|
10
|
+
placement?: 'left' | 'right' | 'top' | 'bottom';
|
|
11
|
+
id?: string;
|
|
12
|
+
divClass?: string;
|
|
13
|
+
transitionParams?: drawerTransitionParamTypes;
|
|
14
|
+
transitionType?: drawerTransitionTypes;
|
|
15
|
+
};
|
|
16
|
+
events: {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
};
|
|
19
|
+
slots: {
|
|
20
|
+
default: {
|
|
21
|
+
hidden: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare type DrawerProps = typeof __propDef.props;
|
|
26
|
+
export declare type DrawerEvents = typeof __propDef.events;
|
|
27
|
+
export declare type DrawerSlots = typeof __propDef.slots;
|
|
28
|
+
export default class Drawer extends SvelteComponentTyped<DrawerProps, DrawerEvents, DrawerSlots> {
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
import Button from '../buttons/Button.svelte';
|
|
3
3
|
import Popper from '../utils/Popper.svelte';
|
|
4
|
-
import
|
|
5
|
-
import ChevronUp from '../utils/ChevronUp.svelte';
|
|
6
|
-
import ChevronRight from '../utils/ChevronRight.svelte';
|
|
7
|
-
import ChevronDown from '../utils/ChevronDown.svelte';
|
|
8
|
-
import ChevronLeft from '../utils/ChevronLeft.svelte';
|
|
4
|
+
import Chevron from '../utils/Chevron.svelte';
|
|
9
5
|
export let label = '';
|
|
10
6
|
export let inline = false;
|
|
11
7
|
export let arrowIcon = true;
|
|
12
8
|
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';
|
|
13
9
|
export let placement = 'bottom';
|
|
14
10
|
export let open = false;
|
|
15
|
-
export let triggeredBy = undefined;
|
|
16
|
-
const icons = {
|
|
17
|
-
top: ChevronUp,
|
|
18
|
-
right: ChevronRight,
|
|
19
|
-
bottom: ChevronDown,
|
|
20
|
-
left: ChevronLeft
|
|
21
|
-
};
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
$: icon = icons[placement.split('-')[0]];
|
|
24
11
|
let popoverClass;
|
|
25
12
|
$: popoverClass = classNames('outline-none', $$props.class);
|
|
26
13
|
</script>
|
|
@@ -28,33 +15,40 @@ $: popoverClass = classNames('outline-none', $$props.class);
|
|
|
28
15
|
{#if label}
|
|
29
16
|
<slot name="trigger">
|
|
30
17
|
{#if inline}
|
|
31
|
-
<button class={labelClass}
|
|
32
|
-
<slot name="label">{label}</slot>
|
|
18
|
+
<button class={labelClass}>
|
|
33
19
|
{#if arrowIcon}
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
<Chevron {placement}><slot name="label">{label}</slot></Chevron>
|
|
21
|
+
{:else}
|
|
22
|
+
<slot name="label">{label}</slot>
|
|
37
23
|
{/if}
|
|
38
24
|
</button>
|
|
39
25
|
{:else}
|
|
40
|
-
<Button
|
|
41
|
-
<slot name="label">{label}</slot>
|
|
26
|
+
<Button>
|
|
42
27
|
{#if arrowIcon}
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
<Chevron {placement}><slot name="label">{label}</slot></Chevron>
|
|
29
|
+
{:else}
|
|
30
|
+
<slot name="label">{label}</slot>
|
|
46
31
|
{/if}
|
|
47
32
|
</Button>
|
|
48
33
|
{/if}
|
|
49
34
|
</slot>
|
|
50
35
|
{/if}
|
|
51
36
|
|
|
52
|
-
<Popper
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
37
|
+
<Popper
|
|
38
|
+
rounded
|
|
39
|
+
border
|
|
40
|
+
shadow
|
|
41
|
+
activeContent
|
|
42
|
+
arrow={false}
|
|
43
|
+
{placement}
|
|
44
|
+
trigger="click"
|
|
45
|
+
{...$$restProps}
|
|
46
|
+
class={popoverClass}
|
|
47
|
+
on:show
|
|
48
|
+
bind:open>
|
|
49
|
+
<slot name="content">
|
|
50
|
+
<ul class="py-1">
|
|
51
|
+
<slot />
|
|
52
|
+
</ul>
|
|
53
|
+
</slot>
|
|
60
54
|
</Popper>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
export let liClass = 'block font-medium cursor-pointer py-2 px-4 text-sm hover:bg-gray-100 dark:hover:bg-gray-600';
|
|
3
3
|
export let color = 'default';
|
|
4
|
+
export let tabindex = 0;
|
|
4
5
|
const colors = {
|
|
5
6
|
default: 'text-gray-700 dark:text-gray-200 dark:hover:text-white',
|
|
6
7
|
red: 'text-red-600 dark:text-red-500'
|
|
@@ -18,7 +19,6 @@ const colors = {
|
|
|
18
19
|
on:blur
|
|
19
20
|
on:mouseenter
|
|
20
21
|
on:mouseleave
|
|
21
|
-
tabindex
|
|
22
|
-
>
|
|
22
|
+
{tabindex}>
|
|
23
23
|
<slot />
|
|
24
24
|
</li>
|
package/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { default as Carousel } from './carousels/Carousel.svelte';
|
|
|
11
11
|
export { default as CarouselTransition } from './carousels/CarouselTransition.svelte';
|
|
12
12
|
export { default as DarkMode } from './darkmode/DarkMode.svelte';
|
|
13
13
|
export { default as Datepicker } from './datepicker/Datepicker.svelte';
|
|
14
|
+
export { default as Drawer } from './drawer/Drawer.svelte';
|
|
14
15
|
export { default as Dropdown } from './dropdowns/Dropdown.svelte';
|
|
15
16
|
export { default as DropdownDivider } from './dropdowns/DropdownDivider.svelte';
|
|
16
17
|
export { default as DropdownHeader } from './dropdowns/DropdownHeader.svelte';
|
|
@@ -112,6 +113,7 @@ export { default as DescriptionList } from './typography/DescriptionList.svelte'
|
|
|
112
113
|
export { default as Heading } from './typography/Heading.svelte';
|
|
113
114
|
export { default as Hr } from './typography/Hr.svelte';
|
|
114
115
|
export { default as Img } from './typography/Img.svelte';
|
|
116
|
+
export { default as Layout } from './typography/Layout.svelte';
|
|
115
117
|
export { default as Li } from './typography/Li.svelte';
|
|
116
118
|
export { default as Mark } from './typography/Mark.svelte';
|
|
117
119
|
export { default as List } from './typography/List.svelte';
|
package/index.js
CHANGED
|
@@ -22,6 +22,8 @@ export { default as CarouselTransition } from './carousels/CarouselTransition.sv
|
|
|
22
22
|
export { default as DarkMode } from './darkmode/DarkMode.svelte';
|
|
23
23
|
// Datepicker
|
|
24
24
|
export { default as Datepicker } from './datepicker/Datepicker.svelte';
|
|
25
|
+
// Drawer
|
|
26
|
+
export { default as Drawer } from './drawer/Drawer.svelte';
|
|
25
27
|
// Dropdown
|
|
26
28
|
export { default as Dropdown } from './dropdowns/Dropdown.svelte';
|
|
27
29
|
export { default as DropdownDivider } from './dropdowns/DropdownDivider.svelte';
|
|
@@ -145,6 +147,7 @@ export { default as DescriptionList } from './typography/DescriptionList.svelte'
|
|
|
145
147
|
export { default as Heading } from './typography/Heading.svelte';
|
|
146
148
|
export { default as Hr } from './typography/Hr.svelte';
|
|
147
149
|
export { default as Img } from './typography/Img.svelte';
|
|
150
|
+
export { default as Layout } from './typography/Layout.svelte';
|
|
148
151
|
export { default as Li } from './typography/Li.svelte';
|
|
149
152
|
export { default as Mark } from './typography/Mark.svelte';
|
|
150
153
|
export { default as List } from './typography/List.svelte';
|
package/navbar/NavLi.svelte
CHANGED
|
@@ -7,7 +7,8 @@ $: aClass = active ? activeClass : nonActiveClass;
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<li>
|
|
10
|
-
<
|
|
10
|
+
<svelte:element
|
|
11
|
+
this={href ? 'a' : 'div'}
|
|
11
12
|
{href}
|
|
12
13
|
{...$$restProps}
|
|
13
14
|
on:blur
|
|
@@ -20,8 +21,7 @@ $: aClass = active ? activeClass : nonActiveClass;
|
|
|
20
21
|
on:mouseenter
|
|
21
22
|
on:mouseleave
|
|
22
23
|
on:mouseover
|
|
23
|
-
class={classNames(aClass, $$props.class)}
|
|
24
|
-
>
|
|
24
|
+
class={classNames(aClass, $$props.class)}>
|
|
25
25
|
<slot />
|
|
26
|
-
</
|
|
26
|
+
</svelte:element>
|
|
27
27
|
</li>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.9",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
"./darkmode/DarkMode.svelte": "./darkmode/DarkMode.svelte",
|
|
119
119
|
"./datepicker/Calender.svelte": "./datepicker/Calender.svelte",
|
|
120
120
|
"./datepicker/Datepicker.svelte": "./datepicker/Datepicker.svelte",
|
|
121
|
+
"./drawer/Drawer.svelte": "./drawer/Drawer.svelte",
|
|
121
122
|
"./dropdowns/Dropdown.svelte": "./dropdowns/Dropdown.svelte",
|
|
122
123
|
"./dropdowns/DropdownDivider.svelte": "./dropdowns/DropdownDivider.svelte",
|
|
123
124
|
"./dropdowns/DropdownHeader.svelte": "./dropdowns/DropdownHeader.svelte",
|
|
@@ -224,6 +225,7 @@
|
|
|
224
225
|
"./typography/Heading.svelte": "./typography/Heading.svelte",
|
|
225
226
|
"./typography/Hr.svelte": "./typography/Hr.svelte",
|
|
226
227
|
"./typography/Img.svelte": "./typography/Img.svelte",
|
|
228
|
+
"./typography/Layout.svelte": "./typography/Layout.svelte",
|
|
227
229
|
"./typography/Li.svelte": "./typography/Li.svelte",
|
|
228
230
|
"./typography/List.svelte": "./typography/List.svelte",
|
|
229
231
|
"./typography/Mark.svelte": "./typography/Mark.svelte",
|
|
@@ -231,7 +233,7 @@
|
|
|
231
233
|
"./typography/Secondary.svelte": "./typography/Secondary.svelte",
|
|
232
234
|
"./typography/Span.svelte": "./typography/Span.svelte",
|
|
233
235
|
"./typography/Ul.svelte": "./typography/Ul.svelte",
|
|
234
|
-
"./
|
|
236
|
+
"./utils/Chevron.svelte": "./utils/Chevron.svelte",
|
|
235
237
|
"./utils/ChevronDown.svelte": "./utils/ChevronDown.svelte",
|
|
236
238
|
"./utils/ChevronLeft.svelte": "./utils/ChevronLeft.svelte",
|
|
237
239
|
"./utils/ChevronRight.svelte": "./utils/ChevronRight.svelte",
|
|
@@ -242,6 +244,7 @@
|
|
|
242
244
|
"./utils/Popper.svelte": "./utils/Popper.svelte",
|
|
243
245
|
"./utils/UserCircle.svelte": "./utils/UserCircle.svelte",
|
|
244
246
|
"./utils/Wrapper.svelte": "./utils/Wrapper.svelte",
|
|
247
|
+
"./utils/backdrop": "./utils/backdrop.js",
|
|
245
248
|
"./utils/clickOutside": "./utils/clickOutside.js",
|
|
246
249
|
"./utils/createEventDispatcher": "./utils/createEventDispatcher.js",
|
|
247
250
|
"./utils/focusTrap": "./utils/focusTrap.js",
|
package/popover/Popover.svelte
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
<script>import Popper from '../utils/Popper.svelte';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
2
|
export let title = '';
|
|
4
|
-
let
|
|
5
|
-
$: popoverClass = classNames('rounded-lg shadow-sm', 'bg-white dark:bg-gray-800', 'text-gray-500 dark:text-gray-400', 'border border-gray-200 dark:border-gray-700', $$props.class);
|
|
3
|
+
export let defaultClass = 'py-2 px-3';
|
|
6
4
|
</script>
|
|
7
5
|
|
|
8
|
-
<Popper activeContent
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
<Popper activeContent border shadow rounded {...$$restProps} class={$$props.class} on:show>
|
|
7
|
+
{#if $$slots.title || title}
|
|
8
|
+
<div
|
|
9
|
+
class="py-2 px-3 bg-gray-100 rounded-t-lg border-b border-gray-200 dark:border-gray-600 dark:bg-gray-700">
|
|
10
|
+
<slot name="title">
|
|
11
|
+
<h3 class="font-semibold text-gray-900 dark:text-white">{title}</h3>
|
|
12
|
+
</slot>
|
|
13
|
+
</div>
|
|
14
|
+
{/if}
|
|
15
|
+
<div class={defaultClass}>
|
|
16
|
+
<slot />
|
|
17
|
+
</div>
|
|
20
18
|
</Popper>
|
package/tooltips/Tooltip.svelte
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
<script>import Popper from '../utils/Popper.svelte';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
export let color = '';
|
|
4
|
-
export let style = '
|
|
5
|
-
export let tipClass = 'py-2 px-3 text-sm font-medium
|
|
6
|
-
export let triggeredBy;
|
|
3
|
+
export let color = 'custom';
|
|
4
|
+
export let style = 'auto';
|
|
5
|
+
export let tipClass = 'py-2 px-3 text-sm font-medium';
|
|
7
6
|
const colors = {
|
|
8
|
-
dark: 'border
|
|
9
|
-
light: 'border
|
|
10
|
-
auto: 'border
|
|
11
|
-
custom: color
|
|
7
|
+
dark: 'border-gray-800 bg-gray-900 text-white dark:bg-gray-700 dark:border-gray-600',
|
|
8
|
+
light: 'border-gray-200 bg-white text-gray-900',
|
|
9
|
+
auto: 'border-gray-200 bg-white text-gray-900 dark:bg-gray-700 dark:text-white dark:border-gray-600 '
|
|
12
10
|
};
|
|
13
11
|
let toolTipClass;
|
|
14
12
|
$: toolTipClass = classNames(tipClass, colors[style], $$props.class);
|
|
15
13
|
</script>
|
|
16
14
|
|
|
17
|
-
<Popper
|
|
15
|
+
<Popper
|
|
16
|
+
rounded
|
|
17
|
+
border
|
|
18
|
+
shadow
|
|
19
|
+
color={style === 'custom' ? color : 'none'}
|
|
20
|
+
{...$$restProps}
|
|
21
|
+
class={toolTipClass}
|
|
22
|
+
on:show>
|
|
18
23
|
<slot />
|
|
19
24
|
</Popper>
|
package/typography/A.svelte
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
+
export let id;
|
|
2
3
|
export let href = '#';
|
|
3
|
-
export let
|
|
4
|
+
export let color = 'text-blue-600 dark:text-blue-500';
|
|
4
5
|
export let aClass = 'inline-flex items-center hover:underline';
|
|
5
|
-
export let textSize = 'text-lg';
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<a {href} class={classNames(aClass,
|
|
8
|
+
<a {href} {id} class={classNames(aClass, color, $$props.class)}>
|
|
9
9
|
<slot />
|
|
10
10
|
</a>
|
package/typography/A.svelte.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
+
id: string;
|
|
5
6
|
href?: string;
|
|
6
|
-
|
|
7
|
+
color?: string;
|
|
7
8
|
aClass?: string;
|
|
8
|
-
textSize?: string;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
+
export let id;
|
|
2
3
|
export let border = false;
|
|
3
4
|
export let italic = true;
|
|
4
5
|
export let borderClass = 'border-l-4 border-gray-300 dark:border-gray-500';
|
|
@@ -30,6 +31,7 @@ const sizes = {
|
|
|
30
31
|
</script>
|
|
31
32
|
|
|
32
33
|
<blockquote
|
|
34
|
+
{id}
|
|
33
35
|
class={classNames(
|
|
34
36
|
baseClass,
|
|
35
37
|
alignmentClasses[alignment],
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
+
export let id;
|
|
2
3
|
export let tag;
|
|
3
4
|
export let dtClass = 'text-gray-500 md:text-lg dark:text-gray-400';
|
|
4
5
|
export let ddClass = 'text-lg font-semibold';
|
|
5
6
|
let classDesc = classNames(tag === 'dt' ? dtClass : ddClass, $$props.class);
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
|
-
<svelte:element this={tag} class={classDesc}>
|
|
9
|
+
<svelte:element this={tag} {id} class={classDesc}>
|
|
9
10
|
<slot />
|
|
10
11
|
</svelte:element>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
export let tag = 'h1';
|
|
3
|
-
export let
|
|
3
|
+
export let color = 'text-gray-900 dark:text-white';
|
|
4
4
|
export let customSize;
|
|
5
|
+
export let id;
|
|
5
6
|
const textSizes = {
|
|
6
7
|
h1: 'text-5xl font-extrabold',
|
|
7
8
|
h2: 'text-4xl font-bold',
|
|
@@ -14,6 +15,7 @@ const textSizes = {
|
|
|
14
15
|
|
|
15
16
|
<svelte:element
|
|
16
17
|
this={tag}
|
|
17
|
-
|
|
18
|
+
{id}
|
|
19
|
+
class={classNames(customSize ? customSize : textSizes[tag], color, 'w-full', $$props.class)}>
|
|
18
20
|
<slot />
|
|
19
21
|
</svelte:element>
|
package/typography/Hr.svelte
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
+
export let id;
|
|
2
3
|
export let icon = false;
|
|
3
4
|
export let width = 'w-full';
|
|
4
5
|
export let height = 'h-px';
|
|
@@ -13,12 +14,12 @@ let middleClass = classNames(middleBgColor, icon ? iconDivClass : textSpanClass)
|
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
{#if $$slots}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
<div class={classDiv} {id}>
|
|
18
|
+
<hr class={horizontalClass} />
|
|
19
|
+
<div class={middleClass}>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
22
23
|
{:else}
|
|
23
|
-
|
|
24
|
+
<hr class={horizontalClass} />
|
|
24
25
|
{/if}
|