flowbite-svelte 0.42.0 → 0.43.2
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/dist/accordion/AccordionItem.svelte +2 -16
- package/dist/accordion/AccordionItem.svelte.d.ts.map +1 -1
- package/dist/bottom-nav/BottomNavHeaderItem.svelte +1 -11
- package/dist/bottom-nav/BottomNavItem.svelte +3 -2
- package/dist/bottom-nav/BottomNavItem.svelte.d.ts +1 -0
- package/dist/bottom-nav/BottomNavItem.svelte.d.ts.map +1 -1
- package/dist/buttons/Button.svelte +1 -1
- package/dist/buttons/GradientButton.svelte +1 -13
- package/dist/carousels/Carousel.svelte +18 -5
- package/dist/carousels/Carousel.svelte.d.ts +5 -1
- package/dist/carousels/Carousel.svelte.d.ts.map +1 -1
- package/dist/carousels/CarouselTransition.svelte +25 -6
- package/dist/carousels/CarouselTransition.svelte.d.ts +8 -1
- package/dist/carousels/CarouselTransition.svelte.d.ts.map +1 -1
- package/dist/carousels/Slide.svelte +4 -1
- package/dist/carousels/Slide.svelte.d.ts +1 -0
- package/dist/carousels/Slide.svelte.d.ts.map +1 -1
- package/dist/carousels/Thumbnail.svelte +2 -1
- package/dist/carousels/Thumbnail.svelte.d.ts +1 -0
- package/dist/carousels/Thumbnail.svelte.d.ts.map +1 -1
- package/dist/darkmode/DarkMode.svelte +2 -5
- package/dist/dropdowns/Dropdown.svelte +7 -0
- package/dist/dropdowns/Dropdown.svelte.d.ts +3 -0
- package/dist/dropdowns/Dropdown.svelte.d.ts.map +1 -1
- package/dist/dropdowns/DropdownItem.svelte +6 -2
- package/dist/dropdowns/DropdownItem.svelte.d.ts +2 -0
- package/dist/dropdowns/DropdownItem.svelte.d.ts.map +1 -1
- package/dist/forms/Dropzone.svelte +1 -12
- package/dist/forms/FloatingLabelInput.svelte +1 -24
- package/dist/forms/FloatingLabelInput.svelte.d.ts.map +1 -1
- package/dist/forms/Input.svelte +1 -18
- package/dist/forms/Search.svelte +1 -1
- package/dist/forms/Textarea.svelte.d.ts.map +1 -1
- package/dist/forms/Toggle.svelte.d.ts.map +1 -1
- package/dist/list-group/Listgroup.svelte +2 -4
- package/dist/list-group/ListgroupItem.svelte +1 -15
- package/dist/modals/Modal.svelte +1 -5
- package/dist/speed-dial/SpeedDial.svelte.d.ts.map +1 -1
- package/dist/utils/Popper.svelte +12 -19
- package/dist/utils/Popper.svelte.d.ts.map +1 -1
- package/package.json +10 -14
- package/dist/utils/Chevron.svelte +0 -33
- package/dist/utils/Chevron.svelte.d.ts +0 -26
- package/dist/utils/Chevron.svelte.d.ts.map +0 -1
|
@@ -47,22 +47,8 @@ onMount(() => {
|
|
|
47
47
|
});
|
|
48
48
|
const handleToggle = (_) => selected.set(open ? {} : self);
|
|
49
49
|
let buttonClass;
|
|
50
|
-
$: buttonClass = twMerge([
|
|
51
|
-
|
|
52
|
-
ctx.flush || borderClass,
|
|
53
|
-
borderBottomClass,
|
|
54
|
-
borderSharedClass,
|
|
55
|
-
ctx.flush ? paddingFlush : paddingDefault,
|
|
56
|
-
open && (ctx.flush ? textFlushOpen : activeCls || ctx.activeClass),
|
|
57
|
-
!open && (ctx.flush ? textFlushDefault : inactiveCls || ctx.inactiveClass),
|
|
58
|
-
$$props.class
|
|
59
|
-
]);
|
|
60
|
-
$: contentClass = twMerge([
|
|
61
|
-
ctx.flush ? paddingFlush : paddingDefault,
|
|
62
|
-
ctx.flush ? '' : borderOpenClass,
|
|
63
|
-
borderBottomClass,
|
|
64
|
-
borderSharedClass
|
|
65
|
-
]);
|
|
50
|
+
$: buttonClass = twMerge([defaultClass, ctx.flush || borderClass, borderBottomClass, borderSharedClass, ctx.flush ? paddingFlush : paddingDefault, open && (ctx.flush ? textFlushOpen : activeCls || ctx.activeClass), !open && (ctx.flush ? textFlushDefault : inactiveCls || ctx.inactiveClass), $$props.class]);
|
|
51
|
+
$: contentClass = twMerge([ctx.flush ? paddingFlush : paddingDefault, ctx.flush ? '' : borderOpenClass, borderBottomClass, borderSharedClass]);
|
|
66
52
|
</script>
|
|
67
53
|
|
|
68
54
|
<h2 class="group">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/accordion/AccordionItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAKD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AccordionItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/accordion/AccordionItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAKD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA0GtE,QAAA,MAAM,SAAS;;;;sBADqhB,MAAM,GAAG,SAAS;wBAAkB,MAAM,GAAG,SAAS;;;;;;;;;;;;sBAA6T,MAAM,GAAG,SAAS;wBAAkB,MAAM,GAAG,SAAS;;;;;;;;;;;CAC/3B,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;CAC3H"}
|
|
@@ -6,17 +6,7 @@ export let activeClass = 'px-5 py-1.5 text-xs font-medium text-white bg-gray-900
|
|
|
6
6
|
$: btnClass = active ? activeClass : defaultClass;
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<button
|
|
10
|
-
class={twMerge(btnClass, $$props.class)}
|
|
11
|
-
{...$$restProps}
|
|
12
|
-
on:click
|
|
13
|
-
on:change
|
|
14
|
-
on:keydown
|
|
15
|
-
on:keyup
|
|
16
|
-
on:focus
|
|
17
|
-
on:blur
|
|
18
|
-
on:mouseenter
|
|
19
|
-
on:mouseleave>
|
|
9
|
+
<button class={twMerge(btnClass, $$props.class)} {...$$restProps} on:click on:change on:keydown on:keyup on:focus on:blur on:mouseenter on:mouseleave>
|
|
20
10
|
{itemName}
|
|
21
11
|
</button>
|
|
22
12
|
|
|
@@ -4,6 +4,7 @@ export let btnName = '';
|
|
|
4
4
|
export let appBtnPosition = 'middle';
|
|
5
5
|
export let activeClass = undefined;
|
|
6
6
|
export let active = false;
|
|
7
|
+
export let href;
|
|
7
8
|
const navType = getContext('navType');
|
|
8
9
|
const context = getContext('bottomNavType') ?? {};
|
|
9
10
|
const btnClasses = {
|
|
@@ -37,10 +38,10 @@ let spanClass;
|
|
|
37
38
|
$: spanClass = twMerge(spanClasses[navType], active && (activeClass ?? context.activeClass), $$props.spanClass);
|
|
38
39
|
</script>
|
|
39
40
|
|
|
40
|
-
<button {...$$restProps} class={btnClass}
|
|
41
|
+
<svelte:element this={href ? 'a' : 'button'} aria-label={btnName} {href} role={href ? 'link' : 'button'} {...$$restProps} class={btnClass} on:click on:change on:keydown on:keyup on:focus on:blur on:mouseenter on:mouseleave>
|
|
41
42
|
<slot />
|
|
42
43
|
<span class={spanClass}>{btnName}</span>
|
|
43
|
-
</
|
|
44
|
+
</svelte:element>
|
|
44
45
|
|
|
45
46
|
<!--
|
|
46
47
|
@component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomNavItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/bottom-nav/BottomNavItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"BottomNavItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/bottom-nav/BottomNavItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAgED,QAAA,MAAM,SAAS;;;;;sBADgM,MAAM,GAAG,SAAS;;cAA0B,MAAM;;;;;;;;;;;;;;;;;CACnL,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;CAC3H"}
|
|
@@ -68,7 +68,7 @@ let buttonClass;
|
|
|
68
68
|
$: buttonClass = twMerge('text-center font-medium', group ? 'focus:ring-2' : 'focus:ring-4', group && 'focus:z-10', group || 'focus:outline-none', 'inline-flex items-center justify-center ' + sizeClasses[size], outline ? outlineClasses[color] : colorClasses[color], color === 'alternative' && (group ? 'dark:bg-gray-700 dark:text-white dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-600' : 'dark:bg-transparent dark:border-gray-600 dark:hover:border-gray-700'), outline && color === 'dark' && (group ? 'dark:text-white dark:border-white' : 'dark:text-gray-400 dark:border-gray-700'), coloredFocusClasses[color], hasBorder() && group && 'border-l-0 first:border-l', group ? (pill && 'first:rounded-l-full last:rounded-r-full') || 'first:rounded-l-lg last:rounded-r-lg' : (pill && 'rounded-full') || 'rounded-lg', shadow && 'shadow-lg', shadow && coloredShadowClasses[color], $$props.disabled && 'cursor-not-allowed opacity-50', $$props.class);
|
|
69
69
|
</script>
|
|
70
70
|
|
|
71
|
-
<svelte:element this={href ? 'a' : 'button'} type={href ? undefined : type} {href} {...$$restProps} class={buttonClass} on:click on:change on:keydown on:keyup on:touchstart on:touchend on:touchcancel on:mouseenter on:mouseleave
|
|
71
|
+
<svelte:element this={href ? 'a' : 'button'} type={href ? undefined : type} {href} role={href ? 'link' : 'button'} {...$$restProps} class={buttonClass} on:click on:change on:keydown on:keyup on:touchstart on:touchend on:touchcancel on:mouseenter on:mouseleave>
|
|
72
72
|
<slot />
|
|
73
73
|
</svelte:element>
|
|
74
74
|
|
|
@@ -50,19 +50,7 @@ $: divClass = twMerge($$props.outline && 'p-0.5', gradientClasses[color], shadow
|
|
|
50
50
|
<!-- Trick to prentend outline without using border
|
|
51
51
|
This has a limitation of no supporting transparency as
|
|
52
52
|
is set to bg-white dark:bg-gray-900 -->
|
|
53
|
-
<Button
|
|
54
|
-
{...$$restProps}
|
|
55
|
-
color="none"
|
|
56
|
-
class={gradientOutlineClass}
|
|
57
|
-
on:click
|
|
58
|
-
on:change
|
|
59
|
-
on:keydown
|
|
60
|
-
on:keyup
|
|
61
|
-
on:touchstart
|
|
62
|
-
on:touchend
|
|
63
|
-
on:touchcancel
|
|
64
|
-
on:mouseenter
|
|
65
|
-
on:mouseleave><slot /></Button>
|
|
53
|
+
<Button {...$$restProps} color="none" class={gradientOutlineClass} on:click on:change on:keydown on:keyup on:touchstart on:touchend on:touchcancel on:mouseenter on:mouseleave><slot /></Button>
|
|
66
54
|
</div>
|
|
67
55
|
{:else}
|
|
68
56
|
<Button {...$$restProps} color="none" class={divClass} on:click on:change on:keydown on:keyup on:touchstart on:touchend on:touchcancel on:mouseenter on:mouseleave>
|
|
@@ -11,7 +11,6 @@ export let images;
|
|
|
11
11
|
export let slideControls = true;
|
|
12
12
|
export let loop = false;
|
|
13
13
|
export let duration = 2000;
|
|
14
|
-
export let thumbClass = 'opacity-40';
|
|
15
14
|
// Carousel
|
|
16
15
|
export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
|
|
17
16
|
let divCls = twMerge(divClass, $$props.classDiv);
|
|
@@ -24,7 +23,21 @@ let captionCls = twMerge(captionClass, $$props.classCaption);
|
|
|
24
23
|
export let indicatorClass = 'w-3 h-3 rounded-full bg-gray-100 hover:bg-gray-300 opacity-60';
|
|
25
24
|
let indicatorCls = twMerge(indicatorClass, $$props.classIndicator);
|
|
26
25
|
// Slide
|
|
27
|
-
export let slideClass = '';
|
|
26
|
+
export let slideClass = 'flex items-center justify-center h-full w-full';
|
|
27
|
+
let slideCls = twMerge(slideClass, $$props.classSlide);
|
|
28
|
+
// Img
|
|
29
|
+
export let imgFit = 'cover';
|
|
30
|
+
export let imgClass = `object-${imgFit} ${imgFit === 'cover' && 'w-full'} h-full`;
|
|
31
|
+
let imgCls = twMerge(imgClass, $$props.classImg);
|
|
32
|
+
// Thumbnail
|
|
33
|
+
export let thumbClass = 'opacity-40';
|
|
34
|
+
let thumbCls = twMerge(thumbClass, $$props.classThumb);
|
|
35
|
+
// Thumbnail Container
|
|
36
|
+
export let thumbDivClass = 'flex flex-row justify-center bg-gray-100 w-full';
|
|
37
|
+
let thumbDivCls = twMerge(thumbDivClass, $$props.classThumbDiv);
|
|
38
|
+
// Thumbnail Img Btn Div
|
|
39
|
+
export let thumbBtnClass = '';
|
|
40
|
+
let thumbBtnCls = twMerge(thumbBtnClass, $$props.classBtnThumb);
|
|
28
41
|
let imageShowingIndex = 0;
|
|
29
42
|
$: image = images[imageShowingIndex];
|
|
30
43
|
const nextSlide = () => {
|
|
@@ -53,7 +66,7 @@ if (loop) {
|
|
|
53
66
|
|
|
54
67
|
<div {id} class="relative">
|
|
55
68
|
<div class={divCls}>
|
|
56
|
-
<Slide image={image.imgurl} altTag={image.name} attr={image.attribution} {
|
|
69
|
+
<Slide image={image.imgurl} altTag={image.name} attr={image.attribution} slideClass={slideCls} imgClass={imgCls} />
|
|
57
70
|
</div>
|
|
58
71
|
{#if showIndicators}
|
|
59
72
|
<!-- Slider indicators -->
|
|
@@ -97,9 +110,9 @@ if (loop) {
|
|
|
97
110
|
{/if}
|
|
98
111
|
|
|
99
112
|
{#if showThumbs}
|
|
100
|
-
<div class=
|
|
113
|
+
<div class={thumbDivCls}>
|
|
101
114
|
{#each images as { id, imgurl, name, attribution }}
|
|
102
|
-
<Thumbnail {
|
|
115
|
+
<Thumbnail thumbClass={thumbCls} thumbBtnClass={thumbBtnCls} thumbImg={imgurl} altTag={name} titleLink={attribution} {id} selected={imageShowingIndex === id} on:click={() => goToSlide(id)} />
|
|
103
116
|
{/each}
|
|
104
117
|
</div>
|
|
105
118
|
{/if}
|
|
@@ -10,12 +10,16 @@ declare const __propDef: {
|
|
|
10
10
|
slideControls?: boolean | undefined;
|
|
11
11
|
loop?: boolean | undefined;
|
|
12
12
|
duration?: number | undefined;
|
|
13
|
-
thumbClass?: string | undefined;
|
|
14
13
|
divClass?: string | undefined;
|
|
15
14
|
indicatorDivClass?: string | undefined;
|
|
16
15
|
captionClass?: string | undefined;
|
|
17
16
|
indicatorClass?: string | undefined;
|
|
18
17
|
slideClass?: string | undefined;
|
|
18
|
+
imgFit?: "none" | "cover" | "contain" | "fill" | "scale-down" | undefined;
|
|
19
|
+
imgClass?: string | undefined;
|
|
20
|
+
thumbClass?: string | undefined;
|
|
21
|
+
thumbDivClass?: string | undefined;
|
|
22
|
+
thumbBtnClass?: string | undefined;
|
|
19
23
|
};
|
|
20
24
|
events: {
|
|
21
25
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/Carousel.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Carousel.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/Carousel.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AA+ID,QAAA,MAAM,SAAS;;;;;;;gBADoiB,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAC1e,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
|
@@ -4,6 +4,7 @@ import Slide from './Slide.svelte';
|
|
|
4
4
|
import Thumbnail from './Thumbnail.svelte';
|
|
5
5
|
import Caption from './Caption.svelte';
|
|
6
6
|
import Indicator from './Indicator.svelte';
|
|
7
|
+
export let id = 'default-transition-carousel';
|
|
7
8
|
export let showIndicators = true;
|
|
8
9
|
export let showCaptions = true;
|
|
9
10
|
export let showThumbs = true;
|
|
@@ -13,7 +14,6 @@ export let transitionType = 'fade';
|
|
|
13
14
|
export let transitionParams = {};
|
|
14
15
|
export let loop = false;
|
|
15
16
|
export let duration = 2000;
|
|
16
|
-
export let thumbClass = 'opacity-40';
|
|
17
17
|
// Carousel
|
|
18
18
|
export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
|
|
19
19
|
let divCls = twMerge(divClass, $$props.classDiv);
|
|
@@ -25,6 +25,25 @@ let captionCls = twMerge(captionClass, $$props.classCaption);
|
|
|
25
25
|
// Indicator
|
|
26
26
|
export let indicatorClass = 'w-3 h-3 rounded-full bg-gray-100 hover:bg-gray-300 opacity-60';
|
|
27
27
|
let indicatorCls = twMerge(indicatorClass, $$props.classIndicator);
|
|
28
|
+
// Slide
|
|
29
|
+
export let slideClass = '';
|
|
30
|
+
let slideCls = twMerge(slideClass, $$props.classSlide);
|
|
31
|
+
// Transition Div
|
|
32
|
+
export let transitionDivClass = 'h-full w-full';
|
|
33
|
+
let transitionDivCls = twMerge(transitionDivClass, $$props.classTransitionDiv);
|
|
34
|
+
// Img
|
|
35
|
+
export let imgFit = 'cover';
|
|
36
|
+
export let imgClass = `object-${imgFit} ${imgFit === 'cover' && 'w-full'} h-full`;
|
|
37
|
+
let imgCls = twMerge(imgClass, $$props.classImg);
|
|
38
|
+
// Thumbnail
|
|
39
|
+
export let thumbClass = 'opacity-40';
|
|
40
|
+
let thumbCls = twMerge(thumbClass, $$props.classThumb);
|
|
41
|
+
// Thumbnail Container
|
|
42
|
+
export let thumbDivClass = 'flex flex-row justify-center bg-gray-100 w-full';
|
|
43
|
+
let thumbDivCls = twMerge(thumbDivClass, $$props.classThumbDiv);
|
|
44
|
+
// Thumbnail Img Btn Div
|
|
45
|
+
export let thumbBtnClass = '';
|
|
46
|
+
let thumbBtnCls = twMerge(thumbBtnClass, $$props.classBtnThumb);
|
|
28
47
|
// have a custom transition function that returns the desired transition
|
|
29
48
|
const multiple = (node, params) => {
|
|
30
49
|
switch (transitionType) {
|
|
@@ -66,12 +85,12 @@ if (loop) {
|
|
|
66
85
|
}
|
|
67
86
|
</script>
|
|
68
87
|
|
|
69
|
-
<div id
|
|
88
|
+
<div {id} class="relative">
|
|
70
89
|
<div class={divCls}>
|
|
71
90
|
{#each images as { id, imgurl, name, attribution }}
|
|
72
91
|
{#if imageShowingIndex === id}
|
|
73
|
-
<div transition:multiple={transitionParams}>
|
|
74
|
-
<Slide image={imgurl} altTag={name} attr={attribution} />
|
|
92
|
+
<div transition:multiple={transitionParams} class={transitionDivCls}>
|
|
93
|
+
<Slide image={imgurl} altTag={name} attr={attribution} slideClass={slideCls} imgClass={imgCls} />
|
|
75
94
|
</div>
|
|
76
95
|
{/if}
|
|
77
96
|
{/each}
|
|
@@ -119,9 +138,9 @@ if (loop) {
|
|
|
119
138
|
{/if}
|
|
120
139
|
|
|
121
140
|
{#if showThumbs}
|
|
122
|
-
<div class=
|
|
141
|
+
<div class={thumbDivCls}>
|
|
123
142
|
{#each images as { id, imgurl, name, attribution }}
|
|
124
|
-
<Thumbnail {
|
|
143
|
+
<Thumbnail thumbClass={thumbCls} thumbBtnClass={thumbBtnCls} thumbImg={imgurl} altTag={name} titleLink={attribution} {id} selected={imageShowingIndex === id} on:click={() => goToSlide(id)} />
|
|
125
144
|
{/each}
|
|
126
145
|
</div>
|
|
127
146
|
{/if}
|
|
@@ -3,6 +3,7 @@ import type { TransitionTypes, TransitionParamTypes } from '../types';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
+
id?: string | undefined;
|
|
6
7
|
showIndicators?: boolean | undefined;
|
|
7
8
|
showCaptions?: boolean | undefined;
|
|
8
9
|
showThumbs?: boolean | undefined;
|
|
@@ -12,11 +13,17 @@ declare const __propDef: {
|
|
|
12
13
|
transitionParams?: TransitionParamTypes | undefined;
|
|
13
14
|
loop?: boolean | undefined;
|
|
14
15
|
duration?: number | undefined;
|
|
15
|
-
thumbClass?: string | undefined;
|
|
16
16
|
divClass?: string | undefined;
|
|
17
17
|
indicatorDivClass?: string | undefined;
|
|
18
18
|
captionClass?: string | undefined;
|
|
19
19
|
indicatorClass?: string | undefined;
|
|
20
|
+
slideClass?: string | undefined;
|
|
21
|
+
transitionDivClass?: string | undefined;
|
|
22
|
+
imgFit?: "none" | "cover" | "contain" | "fill" | "scale-down" | undefined;
|
|
23
|
+
imgClass?: string | undefined;
|
|
24
|
+
thumbClass?: string | undefined;
|
|
25
|
+
thumbDivClass?: string | undefined;
|
|
26
|
+
thumbBtnClass?: string | undefined;
|
|
20
27
|
};
|
|
21
28
|
events: {
|
|
22
29
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselTransition.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/CarouselTransition.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAGD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CarouselTransition.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/CarouselTransition.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAGD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA6KtE,QAAA,MAAM,SAAS;;;;;;;gBADmpB,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CACzlB,CAAC;AAC/E,MAAM,MAAM,uBAAuB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAC7D,MAAM,MAAM,wBAAwB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAC/D,MAAM,MAAM,uBAAuB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,oBAAoB,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,uBAAuB,CAAC;CAC/I"}
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
export let altTag = '';
|
|
3
3
|
export let attr = '';
|
|
4
4
|
export let slideClass = '';
|
|
5
|
+
export let imgClass = '';
|
|
5
6
|
</script>
|
|
6
7
|
|
|
7
8
|
<div class={slideClass}>
|
|
8
|
-
|
|
9
|
+
{#key image}
|
|
10
|
+
<img src={image} alt={altTag} title={attr} class={imgClass} />
|
|
11
|
+
{/key}
|
|
9
12
|
</div>
|
|
10
13
|
|
|
11
14
|
<!--
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/Slide.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Slide.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/Slide.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAmBD,QAAA,MAAM,SAAS;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,oBAAoB,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;CAC3F"}
|
|
@@ -5,10 +5,11 @@ export let id;
|
|
|
5
5
|
export let thumbWidth = 100;
|
|
6
6
|
export let selected = false;
|
|
7
7
|
export let thumbClass = '';
|
|
8
|
+
export let thumbBtnClass = '';
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
11
|
-
<button on:click aria-label="Click to view image">
|
|
12
|
+
<button on:click aria-label="Click to view image" class={thumbBtnClass}>
|
|
12
13
|
<img class={thumbClass} class:active={selected} id={id.toString()} src={thumbImg} alt={altTag} title="Image from {titleLink}" width="{thumbWidth}%" />
|
|
13
14
|
</button>
|
|
14
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thumbnail.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/Thumbnail.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Thumbnail.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/carousels/Thumbnail.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAuBD,QAAA,MAAM,SAAS;;;;;YAD6O,MAAM;;;;;;;;;;;;CAC3M,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,oBAAoB,CAAC,cAAc,EAAE,eAAe,EAAE,cAAc,CAAC;CAC3G"}
|
|
@@ -16,13 +16,10 @@ const toggleTheme = () => {
|
|
|
16
16
|
<script>
|
|
17
17
|
if ('color-theme' in localStorage) {
|
|
18
18
|
// explicit preference - overrides author's choice
|
|
19
|
-
localStorage.getItem('color-theme') === 'dark'
|
|
20
|
-
? window.document.documentElement.classList.add('dark')
|
|
21
|
-
: window.document.documentElement.classList.remove('dark');
|
|
19
|
+
localStorage.getItem('color-theme') === 'dark' ? window.document.documentElement.classList.add('dark') : window.document.documentElement.classList.remove('dark');
|
|
22
20
|
} else {
|
|
23
21
|
// browser preference - does not overrides
|
|
24
|
-
if (window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
25
|
-
window.document.documentElement.classList.add('dark');
|
|
22
|
+
if (window.matchMedia('(prefers-color-scheme: dark)').matches) window.document.documentElement.classList.add('dark');
|
|
26
23
|
}
|
|
27
24
|
</script>
|
|
28
25
|
</svelte:head>
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
<script context="module">export {};
|
|
2
|
+
</script>
|
|
3
|
+
|
|
1
4
|
<script>import { twMerge } from 'tailwind-merge';
|
|
2
5
|
import Popper from '../utils/Popper.svelte';
|
|
6
|
+
import { setContext } from 'svelte';
|
|
3
7
|
export let open = false;
|
|
4
8
|
export let containerClass = 'divide-y z-50';
|
|
5
9
|
export let headerClass = 'py-1 overflow-hidden rounded-t-lg';
|
|
6
10
|
export let footerClass = 'py-1 overflow-hidden rounded-b-lg';
|
|
11
|
+
export let activeClass = 'text-primary-700 dark:text-primary-700 hover:text-primary-900 dark:hover:text-primary-900';
|
|
12
|
+
let activeCls = twMerge(activeClass, $$props.classActive);
|
|
13
|
+
setContext('DropdownType', { activeClass: activeCls });
|
|
7
14
|
let containerCls = twMerge(containerClass, $$props.classContainer);
|
|
8
15
|
let headerCls = twMerge(headerClass, $$props.classHeader);
|
|
9
16
|
let ulCls = twMerge('py-1', $$props.class);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/dropdowns/Dropdown.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/dropdowns/Dropdown.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAoEJ,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<script>import Wrapper from '../utils/Wrapper.svelte';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { getContext } from 'svelte';
|
|
3
4
|
export let defaultClass = 'font-medium py-2 px-4 text-sm hover:bg-gray-100 dark:hover:bg-gray-600';
|
|
4
5
|
export let href = undefined;
|
|
6
|
+
export let activeClass = undefined;
|
|
7
|
+
export let active = false;
|
|
8
|
+
const context = getContext('DropdownType') ?? {};
|
|
5
9
|
let liClass;
|
|
6
|
-
$: liClass = twMerge(defaultClass, href ? 'block' : 'w-full text-left', $$props.class);
|
|
10
|
+
$: liClass = twMerge(defaultClass, href ? 'block' : 'w-full text-left', active && (activeClass ?? context.activeClass), $$props.class);
|
|
7
11
|
let wrap = true;
|
|
8
12
|
function init(node) {
|
|
9
13
|
wrap = node.parentElement?.tagName === 'UL';
|
|
@@ -11,7 +15,7 @@ function init(node) {
|
|
|
11
15
|
</script>
|
|
12
16
|
|
|
13
17
|
<Wrapper tag="li" show={wrap} use={init}>
|
|
14
|
-
<svelte:element this={href ? 'a' : 'button'} {href} type={href ? undefined : 'button'} {...$$restProps} class={liClass} on:click on:change on:keydown on:keyup on:focus on:blur on:mouseenter on:mouseleave
|
|
18
|
+
<svelte:element this={href ? 'a' : 'button'} {href} type={href ? undefined : 'button'} role={href ? 'link' : 'button'} {...$$restProps} class={liClass} on:click on:change on:keydown on:keyup on:focus on:blur on:mouseenter on:mouseleave>
|
|
15
19
|
<slot />
|
|
16
20
|
</svelte:element>
|
|
17
21
|
</Wrapper>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/dropdowns/DropdownItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"DropdownItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/dropdowns/DropdownItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAsCD,QAAA,MAAM,SAAS;;;;eADyH,MAAM,GAAG,SAAS;sBAAgB,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;CAC9G,CAAC;AAC/E,MAAM,MAAM,iBAAiB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACvD,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,oBAAoB,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;CACvH"}
|
|
@@ -11,18 +11,7 @@ function keydown(ev) {
|
|
|
11
11
|
}
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
|
-
<button
|
|
15
|
-
class={twMerge(defaultClass, $$props.class)}
|
|
16
|
-
on:keydown={keydown}
|
|
17
|
-
on:focus
|
|
18
|
-
on:blur
|
|
19
|
-
on:mouseenter
|
|
20
|
-
on:mouseleave
|
|
21
|
-
on:mouseover
|
|
22
|
-
on:dragenter
|
|
23
|
-
on:dragleave
|
|
24
|
-
on:dragover
|
|
25
|
-
on:drop>
|
|
14
|
+
<button class={twMerge(defaultClass, $$props.class)} on:keydown={keydown} on:focus on:blur on:mouseenter on:mouseleave on:mouseover on:dragenter on:dragleave on:dragover on:drop type="button">
|
|
26
15
|
<label class="flex flex-col items-center" tabIndex="0">
|
|
27
16
|
<slot />
|
|
28
17
|
<input {...$$restProps} bind:value bind:files bind:this={input} on:change on:click type="file" class="hidden" />
|
|
@@ -63,30 +63,7 @@ const labelColorClasses = {
|
|
|
63
63
|
</script>
|
|
64
64
|
|
|
65
65
|
<div class={twMerge(divClasses[style], $$props.classDiv)}>
|
|
66
|
-
<input
|
|
67
|
-
{id}
|
|
68
|
-
{...$$restProps}
|
|
69
|
-
bind:value
|
|
70
|
-
on:blur
|
|
71
|
-
on:change
|
|
72
|
-
on:click
|
|
73
|
-
on:focus
|
|
74
|
-
on:input
|
|
75
|
-
on:keydown
|
|
76
|
-
on:keypress
|
|
77
|
-
on:keyup
|
|
78
|
-
on:mouseenter
|
|
79
|
-
on:mouseleave
|
|
80
|
-
on:mouseover
|
|
81
|
-
on:paste
|
|
82
|
-
{...{ type }}
|
|
83
|
-
placeholder=" "
|
|
84
|
-
class={twMerge(
|
|
85
|
-
inputClasses[style],
|
|
86
|
-
inputColorClasses[color],
|
|
87
|
-
inputSizes[style][size],
|
|
88
|
-
$$props.classInput
|
|
89
|
-
)} />
|
|
66
|
+
<input {id} {...$$restProps} bind:value on:blur on:change on:click on:focus on:input on:keydown on:keypress on:keyup on:mouseenter on:mouseleave on:mouseover on:paste {...{ type }} placeholder=" " class={twMerge(inputClasses[style], inputColorClasses[color], inputSizes[style][size], $$props.classInput)} />
|
|
90
67
|
|
|
91
68
|
<label for={id} class={twMerge(labelClasses[style], labelColorClasses[color], labelSizes[style][size], $$props.classLabel)}>
|
|
92
69
|
{label}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingLabelInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/FloatingLabelInput.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAGD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingLabelInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/FloatingLabelInput.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAGD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAwF1C,QAAA,MAAM,SAAS;;;;;;;;gBADqP,GAAG;;;;;;;;;;;;;;;;;;;;CACzL,CAAC;AAC/E,MAAM,MAAM,uBAAuB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAC7D,MAAM,MAAM,wBAAwB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAC/D,MAAM,MAAM,uBAAuB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,oBAAoB,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,uBAAuB,CAAC;CAC/I"}
|
package/dist/forms/Input.svelte
CHANGED
|
@@ -51,24 +51,7 @@ $: {
|
|
|
51
51
|
</div>
|
|
52
52
|
{/if}
|
|
53
53
|
<slot props={{ ...$$restProps, class: inputClass }}>
|
|
54
|
-
<input
|
|
55
|
-
{...$$restProps}
|
|
56
|
-
bind:value
|
|
57
|
-
on:blur
|
|
58
|
-
on:change
|
|
59
|
-
on:click
|
|
60
|
-
on:contextmenu
|
|
61
|
-
on:focus
|
|
62
|
-
on:keydown
|
|
63
|
-
on:keypress
|
|
64
|
-
on:keyup
|
|
65
|
-
on:mouseover
|
|
66
|
-
on:mouseenter
|
|
67
|
-
on:mouseleave
|
|
68
|
-
on:paste
|
|
69
|
-
on:input
|
|
70
|
-
{...{ type }}
|
|
71
|
-
class={inputClass} />
|
|
54
|
+
<input {...$$restProps} bind:value on:blur on:change on:click on:contextmenu on:focus on:keydown on:keypress on:keyup on:mouseover on:mouseenter on:mouseleave on:paste on:input {...{ type }} class={inputClass} />
|
|
72
55
|
</slot>
|
|
73
56
|
{#if $$slots.right}
|
|
74
57
|
<div class="{twMerge(floatClass, $$props.classRight)} right-0 pr-2.5"><slot name="right" /></div>
|
package/dist/forms/Search.svelte
CHANGED
|
@@ -24,7 +24,7 @@ const sizes = {
|
|
|
24
24
|
Due to that we need the below slot and Wrapper around
|
|
25
25
|
-->
|
|
26
26
|
{#if $$slots.default}
|
|
27
|
-
<div class="flex absolute inset-y-0 right-0 items-center
|
|
27
|
+
<div class="flex absolute inset-y-0 right-0 items-center text-gray-500 dark:text-gray-400">
|
|
28
28
|
<slot />
|
|
29
29
|
</div>
|
|
30
30
|
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/Textarea.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Textarea.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/Textarea.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAmDD,QAAA,MAAM,SAAS;;;gBADiI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CACrE,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/Toggle.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Toggle.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/Toggle.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAwDD,QAAA,MAAM,SAAS;;;;;;kBAD6M,OAAO,GAAG,SAAS;;;;;;;;;;;;CACjK,CAAC;AAC/E,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;CAC/F"}
|
|
@@ -14,11 +14,9 @@ $: groupClass = twMerge(defaultClass, $$props.class);
|
|
|
14
14
|
<Frame tag={active ? 'div' : 'ul'} {...$$restProps} rounded border class={groupClass}>
|
|
15
15
|
{#each items as item, index}
|
|
16
16
|
{#if typeof item === 'object'}
|
|
17
|
-
<ListgroupItem {active} {...item} {index} on:click={() => dispatch('click', item)}
|
|
18
|
-
><slot {item} {index} /></ListgroupItem>
|
|
17
|
+
<ListgroupItem {active} {...item} {index} on:click={() => dispatch('click', item)}><slot {item} {index} /></ListgroupItem>
|
|
19
18
|
{:else}
|
|
20
|
-
<ListgroupItem {active} {index} on:click={() => dispatch('click', item)}
|
|
21
|
-
><slot {item} {index} /></ListgroupItem>
|
|
19
|
+
<ListgroupItem {active} {index} on:click={() => dispatch('click', item)}><slot {item} {index} /></ListgroupItem>
|
|
22
20
|
{/if}
|
|
23
21
|
{:else}
|
|
24
22
|
<slot item={items[0]} />
|
|
@@ -30,21 +30,7 @@ $: itemClass = twMerge(itemDefaultClass, states[state], active && state === 'dis
|
|
|
30
30
|
<slot item={$$props} />
|
|
31
31
|
</a>
|
|
32
32
|
{:else}
|
|
33
|
-
<button
|
|
34
|
-
type="button"
|
|
35
|
-
class="flex items-center text-left {itemClass}"
|
|
36
|
-
{disabled}
|
|
37
|
-
on:blur
|
|
38
|
-
on:change
|
|
39
|
-
on:click
|
|
40
|
-
on:focus
|
|
41
|
-
on:keydown
|
|
42
|
-
on:keypress
|
|
43
|
-
on:keyup
|
|
44
|
-
on:mouseenter
|
|
45
|
-
on:mouseleave
|
|
46
|
-
on:mouseover
|
|
47
|
-
aria-current={current}>
|
|
33
|
+
<button type="button" class="flex items-center text-left {itemClass}" {disabled} on:blur on:change on:click on:focus on:keydown on:keypress on:keyup on:mouseenter on:mouseleave on:mouseover aria-current={current}>
|
|
48
34
|
<slot item={$$props} />
|
|
49
35
|
</button>
|
|
50
36
|
{/if}
|
package/dist/modals/Modal.svelte
CHANGED
|
@@ -105,11 +105,7 @@ function handleKeys(e) {
|
|
|
105
105
|
<CloseButton name="Close modal" class="absolute top-3 right-2.5" on:click={hide} color={$$restProps.color} />
|
|
106
106
|
{/if}
|
|
107
107
|
<!-- Modal body -->
|
|
108
|
-
<div
|
|
109
|
-
class={twMerge('p-6 space-y-6 flex-1 overflow-y-auto overscroll-contain', $$props.bodyClass)}
|
|
110
|
-
on:keydown|stopPropagation={handleKeys}
|
|
111
|
-
role="document"
|
|
112
|
-
on:wheel|stopPropagation|passive>
|
|
108
|
+
<div class={twMerge('p-6 space-y-6 flex-1 overflow-y-auto overscroll-contain', $$props.bodyClass)} on:keydown|stopPropagation={handleKeys} role="document" on:wheel|stopPropagation|passive>
|
|
113
109
|
<slot />
|
|
114
110
|
</div>
|
|
115
111
|
<!-- Modal footer -->
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeedDial.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/speed-dial/SpeedDial.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"SpeedDial.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/speed-dial/SpeedDial.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB;AAsEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,oBAAoB,CAAC,cAAc,EAAE,eAAe,EAAE,cAAc,CAAC;CAC3G"}
|
package/dist/utils/Popper.svelte
CHANGED
|
@@ -61,16 +61,9 @@ const oppositeSideMap = {
|
|
|
61
61
|
top: 'bottom'
|
|
62
62
|
};
|
|
63
63
|
let middleware;
|
|
64
|
-
$: middleware = [
|
|
65
|
-
dom.flip(),
|
|
66
|
-
dom.shift(),
|
|
67
|
-
dom.offset(+offset),
|
|
68
|
-
arrowEl && dom.arrow({ element: arrowEl, padding: 10 })
|
|
69
|
-
];
|
|
64
|
+
$: middleware = [dom.flip(), dom.shift(), dom.offset(+offset), arrowEl && dom.arrow({ element: arrowEl, padding: 10 })];
|
|
70
65
|
function updatePosition() {
|
|
71
|
-
dom
|
|
72
|
-
.computePosition(referenceEl, floatingEl, { placement, strategy, middleware })
|
|
73
|
-
.then(({ x, y, middlewareData, placement, strategy }) => {
|
|
66
|
+
dom.computePosition(referenceEl, floatingEl, { placement, strategy, middleware }).then(({ x, y, middlewareData, placement, strategy }) => {
|
|
74
67
|
floatingEl.style.position = strategy;
|
|
75
68
|
floatingEl.style.left = yOnly ? '0' : px(x);
|
|
76
69
|
floatingEl.style.top = px(y);
|
|
@@ -122,6 +115,11 @@ onMount(() => {
|
|
|
122
115
|
if (referenceEl === document.body) {
|
|
123
116
|
console.error(`Popup reference not found: '${reference}'`);
|
|
124
117
|
}
|
|
118
|
+
else {
|
|
119
|
+
referenceEl.addEventListener('focusout', hideHandler);
|
|
120
|
+
if (!clickable)
|
|
121
|
+
referenceEl.addEventListener('mouseleave', hideHandler);
|
|
122
|
+
}
|
|
125
123
|
}
|
|
126
124
|
else {
|
|
127
125
|
referenceEl = triggerEls[0];
|
|
@@ -133,6 +131,10 @@ onMount(() => {
|
|
|
133
131
|
element.removeEventListener(name, handler);
|
|
134
132
|
}
|
|
135
133
|
});
|
|
134
|
+
if (referenceEl) {
|
|
135
|
+
referenceEl.addEventListener('focusout', hideHandler);
|
|
136
|
+
referenceEl.addEventListener('mouseleave', hideHandler);
|
|
137
|
+
}
|
|
136
138
|
};
|
|
137
139
|
});
|
|
138
140
|
function optional(pred, func) {
|
|
@@ -155,16 +157,7 @@ function initArrow(node) {
|
|
|
155
157
|
{/if}
|
|
156
158
|
|
|
157
159
|
{#if open && referenceEl}
|
|
158
|
-
<Frame
|
|
159
|
-
use={init}
|
|
160
|
-
options={referenceEl}
|
|
161
|
-
role="tooltip"
|
|
162
|
-
tabindex={activeContent ? -1 : undefined}
|
|
163
|
-
on:focusin={optional(activeContent, showHandler)}
|
|
164
|
-
on:focusout={optional(activeContent, hideHandler)}
|
|
165
|
-
on:mouseenter={optional(activeContent && !clickable, showHandler)}
|
|
166
|
-
on:mouseleave={optional(activeContent && !clickable, hideHandler)}
|
|
167
|
-
{...$$restProps}>
|
|
160
|
+
<Frame use={init} options={referenceEl} role="tooltip" tabindex={activeContent ? -1 : undefined} on:focusin={optional(activeContent, showHandler)} on:focusout={optional(activeContent, hideHandler)} on:mouseenter={optional(activeContent && !clickable, showHandler)} on:mouseleave={optional(activeContent && !clickable, hideHandler)} {...$$restProps}>
|
|
168
161
|
<slot />
|
|
169
162
|
{#if arrow}<div use:initArrow class={arrowClass} />{/if}
|
|
170
163
|
</Frame>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Popper.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACD,OAAO,KAAK,EAAqC,SAAS,EAAQ,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popper.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Popper.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACD,OAAO,KAAK,EAAqC,SAAS,EAAQ,MAAM,kBAAkB,CAAC;AA0M3F,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;CAC/F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.2",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@docsearch/js": "^3.5.1",
|
|
34
|
-
"@playwright/test": "^1.
|
|
34
|
+
"@playwright/test": "^1.37.0",
|
|
35
35
|
"@sveltejs/adapter-vercel": "^3.0.3",
|
|
36
|
-
"@sveltejs/kit": "^1.22.
|
|
36
|
+
"@sveltejs/kit": "^1.22.6",
|
|
37
37
|
"@sveltejs/package": "2.1.0",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
39
39
|
"@typescript-eslint/parser": "^5.62.0",
|
|
40
|
-
"autoprefixer": "^10.4.
|
|
40
|
+
"autoprefixer": "^10.4.15",
|
|
41
41
|
"createprops": "^0.5.5",
|
|
42
42
|
"esbuild": "0.18.10",
|
|
43
|
-
"eslint": "^8.
|
|
43
|
+
"eslint": "^8.47.0",
|
|
44
44
|
"eslint-config-prettier": "^8.10.0",
|
|
45
45
|
"eslint-plugin-svelte": "^2.32.4",
|
|
46
|
-
"flowbite-svelte-icons": "^0.3.
|
|
46
|
+
"flowbite-svelte-icons": "^0.3.6",
|
|
47
47
|
"mdsvex": "^0.11.0",
|
|
48
48
|
"mdsvexamples": "^0.3.4",
|
|
49
49
|
"postcss": "^8.4.27",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"prettier-plugin-svelte": "^2.10.1",
|
|
53
53
|
"prism-themes": "^1.9.0",
|
|
54
54
|
"publint": "^0.1.16",
|
|
55
|
-
"svelte": "^4.
|
|
56
|
-
"svelte-check": "^3.
|
|
55
|
+
"svelte": "^4.2.0",
|
|
56
|
+
"svelte-check": "^3.5.0",
|
|
57
57
|
"svelte-meta-tags": "^2.8.0",
|
|
58
58
|
"svelte-preprocess": "^5.0.4",
|
|
59
|
-
"svelte2tsx": "^0.6.
|
|
59
|
+
"svelte2tsx": "^0.6.20",
|
|
60
60
|
"tailwind-merge": "^1.13.1",
|
|
61
61
|
"tailwindcss": "^3.3.3",
|
|
62
62
|
"tslib": "^2.6.1",
|
|
63
63
|
"typescript": "^5.1.6",
|
|
64
|
-
"vite": "^4.4.
|
|
64
|
+
"vite": "^4.4.9",
|
|
65
65
|
"vitest": "^0.32.4"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
@@ -708,10 +708,6 @@
|
|
|
708
708
|
"types": "./dist/typography/Span.svelte.d.ts",
|
|
709
709
|
"svelte": "./dist/typography/Span.svelte"
|
|
710
710
|
},
|
|
711
|
-
"./Chevron.svelte": {
|
|
712
|
-
"types": "./dist/utils/Chevron.svelte.d.ts",
|
|
713
|
-
"svelte": "./dist/utils/Chevron.svelte"
|
|
714
|
-
},
|
|
715
711
|
"./CloseButton.svelte": {
|
|
716
712
|
"types": "./dist/utils/CloseButton.svelte.d.ts",
|
|
717
713
|
"svelte": "./dist/utils/CloseButton.svelte"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<script>import ChevronDown from './ChevronDown.svelte';
|
|
2
|
-
import ChevronLeft from './ChevronLeft.svelte';
|
|
3
|
-
import ChevronUp from './ChevronUp.svelte';
|
|
4
|
-
import ChevronRight from './ChevronRight.svelte';
|
|
5
|
-
import Wrapper from './Wrapper.svelte';
|
|
6
|
-
export let placement = 'bottom';
|
|
7
|
-
export let aligned = false;
|
|
8
|
-
const icons = {
|
|
9
|
-
top: ChevronUp,
|
|
10
|
-
right: ChevronRight,
|
|
11
|
-
bottom: ChevronDown,
|
|
12
|
-
left: ChevronLeft
|
|
13
|
-
};
|
|
14
|
-
let icon;
|
|
15
|
-
$: icon = icons[placement.split('-')[0]] ?? ChevronDown;
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<Wrapper class="flex items-center justify-between" show={aligned}>
|
|
19
|
-
{#if placement.split('-')[0] === 'left'}
|
|
20
|
-
<ChevronLeft class="h-4 w-4 mr-2" />
|
|
21
|
-
<slot />
|
|
22
|
-
{:else}
|
|
23
|
-
<slot />
|
|
24
|
-
<svelte:component this={icon} class="h-4 w-4 ml-2" />
|
|
25
|
-
{/if}
|
|
26
|
-
</Wrapper>
|
|
27
|
-
|
|
28
|
-
<!--
|
|
29
|
-
@component
|
|
30
|
-
## Props
|
|
31
|
-
@prop placement: Placement = 'bottom';
|
|
32
|
-
@prop aligned: boolean = false;
|
|
33
|
-
-->
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Placement } from '@floating-ui/dom';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
placement?: Placement | undefined;
|
|
6
|
-
aligned?: boolean | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {
|
|
12
|
-
default: {};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type ChevronProps = typeof __propDef.props;
|
|
16
|
-
export type ChevronEvents = typeof __propDef.events;
|
|
17
|
-
export type ChevronSlots = typeof __propDef.slots;
|
|
18
|
-
/**
|
|
19
|
-
* ## Props
|
|
20
|
-
* @prop placement: Placement = 'bottom';
|
|
21
|
-
* @prop aligned: boolean = false;
|
|
22
|
-
*/
|
|
23
|
-
export default class Chevron extends SvelteComponentTyped<ChevronProps, ChevronEvents, ChevronSlots> {
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=Chevron.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Chevron.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACD,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,kBAAkB,CAAC;AA4CxD,QAAA,MAAM,SAAS;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAClD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,oBAAoB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;CACnG"}
|