flowbite-svelte 0.15.2 → 0.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/carousels/Carousel.svelte +10 -3
- package/carousels/Carousel.svelte.d.ts +4 -0
- package/carousels/CarouselTransition.svelte +11 -3
- package/carousels/CarouselTransition.svelte.d.ts +4 -0
- package/forms/Range.svelte +21 -0
- package/forms/Range.svelte.d.ts +23 -0
- package/index.js +1 -0
- package/package.json +2 -1
- package/types.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.15.5](https://github.com/themesberg/flowbite-svelte/compare/v0.15.4...v0.15.5) (2022-04-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add custom slide controllers to carousel ([8a2a329](https://github.com/themesberg/flowbite-svelte/commit/8a2a329da816bd7d5fff357790d584dbce2aec31))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* merge conflicts ([0514548](https://github.com/themesberg/flowbite-svelte/commit/0514548ab7d7ca54337434114ac8f2b9239f5e5d))
|
|
16
|
+
* to original Carousel ([5e979ae](https://github.com/themesberg/flowbite-svelte/commit/5e979ae8b58403cdf91b82b236a8e730f02d9cb1))
|
|
17
|
+
* to original Carousel ([198270f](https://github.com/themesberg/flowbite-svelte/commit/198270f623e4c0806a59cf3f9f5dd89430ddc0db))
|
|
18
|
+
* update range page ([edbf37f](https://github.com/themesberg/flowbite-svelte/commit/edbf37f7b2c6ef0109d15bf1e76dcd52bf2b9b05))
|
|
19
|
+
|
|
20
|
+
### [0.15.4](https://github.com/themesberg/flowbite-svelte/compare/v0.15.3...v0.15.4) (2022-04-26)
|
|
21
|
+
|
|
22
|
+
### [0.15.3](https://github.com/themesberg/flowbite-svelte/compare/v0.15.2...v0.15.3) (2022-04-26)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add range input ([215439f](https://github.com/themesberg/flowbite-svelte/commit/215439fc529856ecc8c72965cd39d7aff12d3eb7))
|
|
28
|
+
|
|
5
29
|
### [0.15.2](https://github.com/themesberg/flowbite-svelte/compare/v0.15.1...v0.15.2) (2022-04-26)
|
|
6
30
|
|
|
7
31
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script>import
|
|
1
|
+
<script>import { ChevronRightOutline, ChevronLeftOutline } from 'svelte-heros';
|
|
2
|
+
import Slide from './Slide.svelte';
|
|
2
3
|
import Thumbnail from './Thumbnail.svelte';
|
|
3
4
|
import Caption from './Caption.svelte';
|
|
4
5
|
import Indicator from './Indicator.svelte';
|
|
@@ -9,6 +10,12 @@ export let images;
|
|
|
9
10
|
export let slideControls = true;
|
|
10
11
|
export let loop = false;
|
|
11
12
|
export let duration = 2000;
|
|
13
|
+
export let icons = {
|
|
14
|
+
next: ChevronRightOutline,
|
|
15
|
+
prev: ChevronLeftOutline
|
|
16
|
+
};
|
|
17
|
+
export let iconSize = 24;
|
|
18
|
+
export let iconClass = 'text-white sm:w-6 sm:h-6 dark:text-gray-300';
|
|
12
19
|
// Carousel
|
|
13
20
|
export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
|
|
14
21
|
export let indicatorDivClass = 'flex absolute bottom-5 left-1/2 z-30 space-x-3 -translate-x-1/2';
|
|
@@ -62,13 +69,13 @@ if (loop) {
|
|
|
62
69
|
<!-- Slider controls -->
|
|
63
70
|
<button on:click={prevSlide} type="button" class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-prev>
|
|
64
71
|
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
65
|
-
<
|
|
72
|
+
<svelte:component this={icons.prev} size={iconSize} class=" {iconClass}" />
|
|
66
73
|
<span class="hidden">Previous</span>
|
|
67
74
|
</span>
|
|
68
75
|
</button>
|
|
69
76
|
<button on:click={nextSlide} type="button" class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-next>
|
|
70
77
|
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
71
|
-
<
|
|
78
|
+
<svelte:component this={icons.next} size={iconSize} class=" {iconClass}" />
|
|
72
79
|
<span class="hidden">Next</span>
|
|
73
80
|
</span>
|
|
74
81
|
</button>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { CarouselIconType } from '../types';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
showIndicators?: boolean;
|
|
@@ -8,6 +9,9 @@ declare const __propDef: {
|
|
|
8
9
|
slideControls?: boolean;
|
|
9
10
|
loop?: boolean;
|
|
10
11
|
duration?: number;
|
|
12
|
+
icons?: CarouselIconType;
|
|
13
|
+
iconSize?: number;
|
|
14
|
+
iconClass?: string;
|
|
11
15
|
divClass?: string;
|
|
12
16
|
indicatorDivClass?: string;
|
|
13
17
|
captionClass?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { ChevronRightOutline, ChevronLeftOutline } from 'svelte-heros';
|
|
2
|
+
import { fade, blur, fly, slide } from 'svelte/transition';
|
|
2
3
|
import Slide from './Slide.svelte';
|
|
3
4
|
import Thumbnail from './Thumbnail.svelte';
|
|
4
5
|
import Caption from './Caption.svelte';
|
|
@@ -28,6 +29,13 @@ function multiple(node, params) {
|
|
|
28
29
|
// Carousel
|
|
29
30
|
export let divClass = 'overflow-hidden relative h-56 rounded-lg sm:h-64 xl:h-80 2xl:h-96';
|
|
30
31
|
export let indicatorDivClass = 'flex absolute bottom-5 left-1/2 z-30 space-x-3 -translate-x-1/2';
|
|
32
|
+
// Slide controllers
|
|
33
|
+
export let icons = {
|
|
34
|
+
next: ChevronRightOutline,
|
|
35
|
+
prev: ChevronLeftOutline
|
|
36
|
+
};
|
|
37
|
+
export let iconSize = 24;
|
|
38
|
+
export let iconClass = 'text-white sm:w-6 sm:h-6 dark:text-gray-300';
|
|
31
39
|
// Caption
|
|
32
40
|
export let captionClass = 'h-10 bg-gray-300 dark:bg-gray-700 dark:text-white p-2 my-2 text-center';
|
|
33
41
|
// Indicator
|
|
@@ -85,13 +93,13 @@ if (loop) {
|
|
|
85
93
|
<!-- Slider controls -->
|
|
86
94
|
<button on:click={prevSlide} type="button" class="flex absolute top-0 left-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-prev>
|
|
87
95
|
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
88
|
-
<
|
|
96
|
+
<svelte:component this={icons.prev} size={iconSize} class=" {iconClass}" />
|
|
89
97
|
<span class="hidden">Previous</span>
|
|
90
98
|
</span>
|
|
91
99
|
</button>
|
|
92
100
|
<button on:click={nextSlide} type="button" class="flex absolute top-0 right-0 z-30 justify-center items-center px-4 h-full cursor-pointer group focus:outline-none" data-carousel-next>
|
|
93
101
|
<span class="inline-flex justify-center items-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none">
|
|
94
|
-
<
|
|
102
|
+
<svelte:component this={icons.next} size={iconSize} class=" {iconClass}" />
|
|
95
103
|
<span class="hidden">Next</span>
|
|
96
104
|
</span>
|
|
97
105
|
</button>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { CarouselIconType } from '../types';
|
|
2
3
|
import type { TransitionTypes, TransitionParamTypes } from '../types';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
@@ -13,6 +14,9 @@ declare const __propDef: {
|
|
|
13
14
|
duration?: number;
|
|
14
15
|
divClass?: string;
|
|
15
16
|
indicatorDivClass?: string;
|
|
17
|
+
icons?: CarouselIconType;
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
iconClass?: string;
|
|
16
20
|
captionClass?: string;
|
|
17
21
|
indicatorClass?: string;
|
|
18
22
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>export let id = 'range';
|
|
2
|
+
export let label = 'Range';
|
|
3
|
+
export let min;
|
|
4
|
+
export let max;
|
|
5
|
+
export let value;
|
|
6
|
+
export let step;
|
|
7
|
+
export let size;
|
|
8
|
+
let inputClass = 'w-full h-2 mb-6 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700';
|
|
9
|
+
if (size === 'small') {
|
|
10
|
+
inputClass = 'w-full h-1 mb-6 bg-gray-200 rounded-lg appearance-none cursor-pointer range-sm dark:bg-gray-700';
|
|
11
|
+
}
|
|
12
|
+
else if (size === 'large') {
|
|
13
|
+
inputClass = 'w-full h-3 bg-gray-200 rounded-lg appearance-none cursor-pointer range-lg dark:bg-gray-700';
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
inputClass = 'w-full h-2 mb-6 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700';
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<label for={id} class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300">{label}</label>
|
|
21
|
+
<input {id} name={id} type="range" {min} {max} bind:value {step} class={inputClass} {...$$restProps} />
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
id?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
min: number;
|
|
8
|
+
max: number;
|
|
9
|
+
value: number;
|
|
10
|
+
step: number;
|
|
11
|
+
size: 'small' | 'large';
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {};
|
|
17
|
+
};
|
|
18
|
+
export declare type RangeProps = typeof __propDef.props;
|
|
19
|
+
export declare type RangeEvents = typeof __propDef.events;
|
|
20
|
+
export declare type RangeSlots = typeof __propDef.slots;
|
|
21
|
+
export default class Range extends SvelteComponentTyped<RangeProps, RangeEvents, RangeSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/index.js
CHANGED
|
@@ -70,6 +70,7 @@ export { default as FloatingLabelInput } from './forms/FloatingLabelInput.svelte
|
|
|
70
70
|
export { default as Iconinput } from './forms/Iconinput.svelte'
|
|
71
71
|
export { default as Input } from './forms/Input.svelte'
|
|
72
72
|
export { default as Radio } from './forms/Radio.svelte'
|
|
73
|
+
export { default as Range } from './forms/Range.svelte'
|
|
73
74
|
export { default as SingleCheckbox } from './forms/SingleCheckbox.svelte'
|
|
74
75
|
export { default as Select } from './forms/Select.svelte'
|
|
75
76
|
export { default as Textarea } from './forms/Textarea.svelte'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
"./forms/Iconinput.svelte": "./forms/Iconinput.svelte",
|
|
136
136
|
"./forms/Input.svelte": "./forms/Input.svelte",
|
|
137
137
|
"./forms/Radio.svelte": "./forms/Radio.svelte",
|
|
138
|
+
"./forms/Range.svelte": "./forms/Range.svelte",
|
|
138
139
|
"./forms/Select.svelte": "./forms/Select.svelte",
|
|
139
140
|
"./forms/SingleCheckbox.svelte": "./forms/SingleCheckbox.svelte",
|
|
140
141
|
"./forms/Textarea.svelte": "./forms/Textarea.svelte",
|
package/types.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ export declare type CardButtonType = {
|
|
|
42
42
|
rel?: string;
|
|
43
43
|
rounded?: boolean;
|
|
44
44
|
};
|
|
45
|
+
export declare type CarouselIconType = {
|
|
46
|
+
next: typeof SvelteComponent;
|
|
47
|
+
prev: typeof SvelteComponent;
|
|
48
|
+
};
|
|
45
49
|
export interface CheckboxType {
|
|
46
50
|
id: string;
|
|
47
51
|
label: string;
|