flowbite-svelte 0.26.10 → 0.26.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 +18 -0
- package/forms/Range.svelte +11 -23
- package/forms/Range.svelte.d.ts +1 -5
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/package.json +3 -2
- package/typography/A.svelte +1 -2
- package/typography/A.svelte.d.ts +0 -1
- package/typography/Blockquote.svelte +1 -2
- package/typography/Blockquote.svelte.d.ts +0 -1
- package/typography/DescriptionList.svelte +1 -2
- package/typography/DescriptionList.svelte.d.ts +0 -1
- package/typography/Heading.svelte +1 -2
- package/typography/Heading.svelte.d.ts +0 -1
- package/typography/Hr.svelte +1 -2
- package/typography/Hr.svelte.d.ts +0 -1
- package/typography/Img.svelte +1 -2
- package/typography/Img.svelte.d.ts +0 -1
- package/typography/Layout.svelte +1 -2
- package/typography/Layout.svelte.d.ts +1 -1
- package/typography/Li.svelte +1 -2
- package/typography/Li.svelte.d.ts +0 -1
- package/typography/List.svelte +1 -2
- package/typography/List.svelte.d.ts +0 -1
- package/typography/Mark.svelte +1 -2
- package/typography/Mark.svelte.d.ts +0 -1
- package/typography/P.svelte +1 -2
- package/typography/P.svelte.d.ts +0 -1
- package/typography/Secondary.svelte +1 -2
- package/typography/Secondary.svelte.d.ts +0 -1
- package/typography/Span.svelte +1 -2
- package/typography/Span.svelte.d.ts +0 -1
- package/typography/Ul.svelte +1 -2
- package/typography/Ul.svelte.d.ts +0 -1
- package/video/Video.svelte +18 -0
- package/video/Video.svelte.d.ts +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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.11](https://github.com/themesberg/flowbite-svelte/compare/v0.26.10...v0.26.11) (2022-09-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* range - clean up ([79d35ca](https://github.com/themesberg/flowbite-svelte/commit/79d35ca127094efb20e12ad3e14635cf607edddc))
|
|
11
|
+
* video component and page ([27cd7df](https://github.com/themesberg/flowbite-svelte/commit/27cd7df226dde37e8a598b6693ae8278671d5782))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* [#266](https://github.com/themesberg/flowbite-svelte/issues/266) change {id} to {...$$restProps} ([b02822f](https://github.com/themesberg/flowbite-svelte/commit/b02822f273fe5b14613ec77e39285078a740cda0))
|
|
17
|
+
* github issue template ([b6b8fd4](https://github.com/themesberg/flowbite-svelte/commit/b6b8fd46aa7491e29935fe62ca5dc617513ee5ee))
|
|
18
|
+
* github issue template 2 ([343c102](https://github.com/themesberg/flowbite-svelte/commit/343c102ee1901c8d14fc75ab06a0fe28ac594a98))
|
|
19
|
+
* github issue template 3 ([e8c6a1b](https://github.com/themesberg/flowbite-svelte/commit/e8c6a1b7d148d0137ca0e395bf5904e3a2ed408c))
|
|
20
|
+
* github issue template 4 ([5565625](https://github.com/themesberg/flowbite-svelte/commit/5565625e343c197bd4d903878a2955eaae08b788))
|
|
21
|
+
* video component and page ([cc8dcb5](https://github.com/themesberg/flowbite-svelte/commit/cc8dcb54843ecff1f9aacc82d9139aedf7d6e0c1))
|
|
22
|
+
|
|
5
23
|
### [0.26.10](https://github.com/themesberg/flowbite-svelte/compare/v0.26.9...v0.26.10) (2022-09-05)
|
|
6
24
|
|
|
7
25
|
|
package/forms/Range.svelte
CHANGED
|
@@ -1,34 +1,22 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let min;
|
|
3
|
-
export let max;
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
4
2
|
export let value;
|
|
5
|
-
export let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
inputClass += 'h-2 mb-6';
|
|
16
|
-
}
|
|
3
|
+
export let size = 'md';
|
|
4
|
+
const sizes = {
|
|
5
|
+
sm: 'h-1 range-sm',
|
|
6
|
+
md: 'h-2',
|
|
7
|
+
lg: 'h-3 range-lg'
|
|
8
|
+
};
|
|
9
|
+
let inputClass;
|
|
10
|
+
$: inputClass = classNames('w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700', sizes[size] ?? sizes.md, $$props.class);
|
|
17
11
|
</script>
|
|
18
12
|
|
|
19
13
|
<input
|
|
20
|
-
{...$$restProps}
|
|
21
|
-
{id}
|
|
22
|
-
name={id}
|
|
23
14
|
type="range"
|
|
24
|
-
{min}
|
|
25
|
-
{max}
|
|
26
15
|
bind:value
|
|
27
|
-
{
|
|
16
|
+
{...$$restProps}
|
|
28
17
|
class={inputClass}
|
|
29
18
|
on:change
|
|
30
19
|
on:click
|
|
31
20
|
on:keydown
|
|
32
21
|
on:keypress
|
|
33
|
-
on:keyup
|
|
34
|
-
/>
|
|
22
|
+
on:keyup />
|
package/forms/Range.svelte.d.ts
CHANGED
|
@@ -2,12 +2,8 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
id?: string;
|
|
6
|
-
min: number;
|
|
7
|
-
max: number;
|
|
8
5
|
value: number;
|
|
9
|
-
|
|
10
|
-
size: 'small' | 'large';
|
|
6
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
7
|
};
|
|
12
8
|
events: {
|
|
13
9
|
change: Event;
|
package/index.d.ts
CHANGED
|
@@ -127,3 +127,4 @@ export { default as ChevronUp } from './utils/ChevronUp.svelte';
|
|
|
127
127
|
export { default as Chevron } from './utils/Chevron.svelte';
|
|
128
128
|
export { default as InformationCircle } from './utils/InformationCircle.svelte';
|
|
129
129
|
export { default as UserCircle } from './utils/UserCircle.svelte';
|
|
130
|
+
export { default as Video } from './video/Video.svelte';
|
package/index.js
CHANGED
|
@@ -162,3 +162,5 @@ export { default as ChevronUp } from './utils/ChevronUp.svelte';
|
|
|
162
162
|
export { default as Chevron } from './utils/Chevron.svelte';
|
|
163
163
|
export { default as InformationCircle } from './utils/InformationCircle.svelte';
|
|
164
164
|
export { default as UserCircle } from './utils/UserCircle.svelte';
|
|
165
|
+
// video
|
|
166
|
+
export { default as Video } from './video/Video.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.11",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -248,7 +248,8 @@
|
|
|
248
248
|
"./utils/clickOutside": "./utils/clickOutside.js",
|
|
249
249
|
"./utils/createEventDispatcher": "./utils/createEventDispatcher.js",
|
|
250
250
|
"./utils/focusTrap": "./utils/focusTrap.js",
|
|
251
|
-
"./utils/generateId": "./utils/generateId.js"
|
|
251
|
+
"./utils/generateId": "./utils/generateId.js",
|
|
252
|
+
"./video/Video.svelte": "./video/Video.svelte"
|
|
252
253
|
},
|
|
253
254
|
"svelte": "./index.js"
|
|
254
255
|
}
|
package/typography/A.svelte
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let href = '#';
|
|
4
3
|
export let color = 'text-blue-600 dark:text-blue-500';
|
|
5
4
|
export let aClass = 'inline-flex items-center hover:underline';
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
|
-
<a {
|
|
7
|
+
<a {...$$restProps} {href} class={classNames(aClass, color, $$props.class)}>
|
|
9
8
|
<slot />
|
|
10
9
|
</a>
|
package/typography/A.svelte.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let border = false;
|
|
4
3
|
export let italic = true;
|
|
5
4
|
export let borderClass = 'border-l-4 border-gray-300 dark:border-gray-500';
|
|
@@ -31,7 +30,7 @@ const sizes = {
|
|
|
31
30
|
</script>
|
|
32
31
|
|
|
33
32
|
<blockquote
|
|
34
|
-
{
|
|
33
|
+
{...$$restProps}
|
|
35
34
|
class={classNames(
|
|
36
35
|
baseClass,
|
|
37
36
|
alignmentClasses[alignment],
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let tag;
|
|
4
3
|
export let dtClass = 'text-gray-500 md:text-lg dark:text-gray-400';
|
|
5
4
|
export let ddClass = 'text-lg font-semibold';
|
|
6
5
|
let classDesc = classNames(tag === 'dt' ? dtClass : ddClass, $$props.class);
|
|
7
6
|
</script>
|
|
8
7
|
|
|
9
|
-
<svelte:element this={tag} {
|
|
8
|
+
<svelte:element this={tag} {...$$restProps} class={classDesc}>
|
|
10
9
|
<slot />
|
|
11
10
|
</svelte:element>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
export let tag = 'h1';
|
|
3
3
|
export let color = 'text-gray-900 dark:text-white';
|
|
4
4
|
export let customSize;
|
|
5
|
-
export let id;
|
|
6
5
|
const textSizes = {
|
|
7
6
|
h1: 'text-5xl font-extrabold',
|
|
8
7
|
h2: 'text-4xl font-bold',
|
|
@@ -15,7 +14,7 @@ const textSizes = {
|
|
|
15
14
|
|
|
16
15
|
<svelte:element
|
|
17
16
|
this={tag}
|
|
18
|
-
{
|
|
17
|
+
{...$$restProps}
|
|
19
18
|
class={classNames(customSize ? customSize : textSizes[tag], color, 'w-full', $$props.class)}>
|
|
20
19
|
<slot />
|
|
21
20
|
</svelte:element>
|
package/typography/Hr.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let icon = false;
|
|
4
3
|
export let width = 'w-full';
|
|
5
4
|
export let height = 'h-px';
|
|
@@ -14,7 +13,7 @@ let middleClass = classNames(middleBgColor, icon ? iconDivClass : textSpanClass)
|
|
|
14
13
|
</script>
|
|
15
14
|
|
|
16
15
|
{#if $$slots}
|
|
17
|
-
<div class={classDiv}
|
|
16
|
+
<div {...$$restProps} class={classDiv}>
|
|
18
17
|
<hr class={horizontalClass} />
|
|
19
18
|
<div class={middleClass}>
|
|
20
19
|
<slot />
|
package/typography/Img.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let caption = undefined;
|
|
4
3
|
export let src = undefined;
|
|
5
4
|
export let srcset = undefined;
|
|
@@ -23,7 +22,7 @@ export let captionClass = 'mt-2 text-sm text-center text-gray-500 dark:text-gray
|
|
|
23
22
|
</figure>
|
|
24
23
|
{:else}
|
|
25
24
|
<img
|
|
26
|
-
{
|
|
25
|
+
{...$$restProps}
|
|
27
26
|
class={classNames(imgClass, size, alignment, effect, $$props.class)}
|
|
28
27
|
{src}
|
|
29
28
|
{srcset}
|
package/typography/Layout.svelte
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let divClass = 'grid';
|
|
4
3
|
export let cols = 'grid-cols-1 sm:grid-cols-2';
|
|
5
4
|
export let gap;
|
|
6
5
|
let classDiv = classNames(divClass, 'gap-' + String(gap), cols);
|
|
7
6
|
</script>
|
|
8
7
|
|
|
9
|
-
<div {
|
|
8
|
+
<div {...$$restProps} class={classDiv}>
|
|
10
9
|
<slot />
|
|
11
10
|
</div>
|
package/typography/Li.svelte
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let icon = false;
|
|
4
3
|
export let liClass = '';
|
|
5
4
|
let classLi = classNames(liClass, icon && 'flex items-center', $$props.class);
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
|
-
<li {
|
|
7
|
+
<li {...$$restProps} class={classLi}>
|
|
9
8
|
<slot />
|
|
10
9
|
</li>
|
package/typography/List.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let tag = 'ul';
|
|
4
3
|
export let list = 'disc';
|
|
5
4
|
export let position = 'inside';
|
|
@@ -19,6 +18,6 @@ let positions = {
|
|
|
19
18
|
let classList = classNames(color, tag === 'ul' ? ulClass : 'ol' ? olClass : dlClass, lists[list], positions[position], $$props.class);
|
|
20
19
|
</script>
|
|
21
20
|
|
|
22
|
-
<svelte:element this={tag} {
|
|
21
|
+
<svelte:element this={tag} {...$$restProps} class={classList}>
|
|
23
22
|
<slot />
|
|
24
23
|
</svelte:element>
|
package/typography/Mark.svelte
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let color = 'text-white dark:bg-blue-500';
|
|
4
3
|
export let bgColor = 'bg-blue-600';
|
|
5
4
|
export let markClass = 'px-2 rounded';
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
|
-
<mark {
|
|
7
|
+
<mark {...$$restProps} class={classNames(markClass, bgColor, color, $$props.class)}>
|
|
9
8
|
<slot />
|
|
10
9
|
</mark>
|
package/typography/P.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let color = 'text-gray-900 dark:text-white';
|
|
4
3
|
export let height = 'normal';
|
|
5
4
|
export let align = 'left';
|
|
@@ -73,6 +72,6 @@ let colorAndopacity = color
|
|
|
73
72
|
let classP = classNames(size && sizes[size], (opacity && colorAndopacity) || (color && color), height && heights[height], weight && weights[weight], space && spaces[space], align && aligns[align], justify && 'text-justify', italic && 'italic', firstupper && upperClass, whitespace && whitespaces[whitespace], $$props.class);
|
|
74
73
|
</script>
|
|
75
74
|
|
|
76
|
-
<p {
|
|
75
|
+
<p {...$$restProps} class={classP}>
|
|
77
76
|
<slot />
|
|
78
77
|
</p>
|
package/typography/P.svelte.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let color = 'text-gray-500 dark:text-gray-400';
|
|
4
3
|
export let secondaryClass = 'font-semibold';
|
|
5
4
|
</script>
|
|
6
5
|
|
|
7
|
-
<small {
|
|
6
|
+
<small {...$$restProps} class={classNames(color, secondaryClass, $$props.class)}>
|
|
8
7
|
<slot />
|
|
9
8
|
</small>
|
package/typography/Span.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let italic = false;
|
|
4
3
|
export let underline = false;
|
|
5
4
|
export let linethrough = false;
|
|
@@ -13,6 +12,6 @@ let underlineClass = classNames('underline', decorationClass);
|
|
|
13
12
|
let classSpan = classNames(italic && 'italic', underline && underlineClass, linethrough && 'line-through', uppercase && 'uppercase', gradient ? gradientClass : 'font-semibold text-gray-900 dark:text-white', highlight && highlightClass, $$props.class);
|
|
14
13
|
</script>
|
|
15
14
|
|
|
16
|
-
<span {
|
|
15
|
+
<span {...$$restProps} class={classSpan}>
|
|
17
16
|
<slot />
|
|
18
17
|
</span>
|
package/typography/Ul.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let id;
|
|
3
2
|
export let list = 'disc';
|
|
4
3
|
export let position = 'inside';
|
|
5
4
|
export let ulClass = 'max-w-md text-gray-500 dark:text-gray-400';
|
|
@@ -16,6 +15,6 @@ let classUl = classNames(ulClass, lists[list], positions[position], $$props.clas
|
|
|
16
15
|
console.log('list', list);
|
|
17
16
|
</script>
|
|
18
17
|
|
|
19
|
-
<ul {
|
|
18
|
+
<ul {...$$restProps} class={classUl} {list}>
|
|
20
19
|
<slot />
|
|
21
20
|
</ul>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
// export let width;
|
|
3
|
+
// export let controls: boolean = true;
|
|
4
|
+
// export let autoplay: boolean = false;
|
|
5
|
+
export let src;
|
|
6
|
+
export let type = 'video/mp4';
|
|
7
|
+
// export let attribute = '';
|
|
8
|
+
let videoClass = classNames($$props.class);
|
|
9
|
+
// const setAttribute = (node, params) => {
|
|
10
|
+
// node.setAttribute(params, '');
|
|
11
|
+
// };
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<video {...$$restProps} class={videoClass}>
|
|
15
|
+
<source {src} {type} />
|
|
16
|
+
<slot />
|
|
17
|
+
Your browser does not support the video tag.
|
|
18
|
+
</video>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
src: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare type VideoProps = typeof __propDef.props;
|
|
16
|
+
export declare type VideoEvents = typeof __propDef.events;
|
|
17
|
+
export declare type VideoSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Video extends SvelteComponentTyped<VideoProps, VideoEvents, VideoSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|