flowbite-svelte 0.24.2 → 0.24.3
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 +20 -0
- package/datepicker/Datepicker.svelte +1 -2
- package/forms/FloatingLabelInput.svelte +0 -2
- package/forms/FloatingLabelInput.svelte.d.ts +0 -1
- package/forms/Iconinput.svelte +52 -9
- package/forms/Iconinput.svelte.d.ts +2 -1
- package/forms/Input.svelte +0 -2
- package/forms/Input.svelte.d.ts +0 -1
- package/forms/Textarea.svelte +0 -2
- package/forms/Textarea.svelte.d.ts +0 -1
- package/package.json +2 -3
- package/paginations/TableData.svelte +1 -1
- package/paginations/TableData.svelte.d.ts +2 -2
- package/utils/OptsButton.svelte +0 -18
- package/utils/OptsButton.svelte.d.ts +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.24.3](https://github.com/themesberg/flowbite-svelte/compare/v0.24.2...v0.24.3) (2022-08-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add size to Iconinput component ([f041953](https://github.com/themesberg/flowbite-svelte/commit/f04195350a179d55a7315a127d5b116deaac1f41))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* add rel=external and / to links to form page ([a237d18](https://github.com/themesberg/flowbite-svelte/commit/a237d1811eb1d6d6f3af545f109c71b8cadbd014))
|
|
16
|
+
* breadcrumb and add rel=external to pages in the forms dir. ([509d72a](https://github.com/themesberg/flowbite-svelte/commit/509d72ae703a0d844653da87aea9119a90cc1018))
|
|
17
|
+
* change package.json>engines>node to 16.0.0 since Verce does not accept. But use local node v16.16.0 for playwright test ([08130e9](https://github.com/themesberg/flowbite-svelte/commit/08130e988c1243b6a248737ed604223c694d5981))
|
|
18
|
+
* clean up ref ([9e8427b](https://github.com/themesberg/flowbite-svelte/commit/9e8427bdbe7ee397a8c5c123a75e48abca298781))
|
|
19
|
+
* done type check for all pages ([d91b018](https://github.com/themesberg/flowbite-svelte/commit/d91b018c3a66a6ac4cef2317651e1821083ab033))
|
|
20
|
+
* remove utils/OptsButton ([04ebd83](https://github.com/themesberg/flowbite-svelte/commit/04ebd83aae8a3f3efabac8f3f144b65fabb04da1))
|
|
21
|
+
* Toggle props and typo update ([9a40224](https://github.com/themesberg/flowbite-svelte/commit/9a40224fc26bfefd9d28ec5d364bf4d7430da6f0))
|
|
22
|
+
* type and layout footer padding fix ([999d291](https://github.com/themesberg/flowbite-svelte/commit/999d29158fde736dbf4e19c9545fff6ba41dc7e7))
|
|
23
|
+
* typo ([ec6f019](https://github.com/themesberg/flowbite-svelte/commit/ec6f019501acf4ba2fb105b8cc04a6d347d0dcf1))
|
|
24
|
+
|
|
5
25
|
### [0.24.2](https://github.com/themesberg/flowbite-svelte/compare/v0.24.1...v0.24.2) (2022-08-07)
|
|
6
26
|
|
|
7
27
|
|
|
@@ -7,7 +7,6 @@ export let size = 'default';
|
|
|
7
7
|
export let color = 'base';
|
|
8
8
|
export let value = '';
|
|
9
9
|
export let label = '';
|
|
10
|
-
export let ref = null;
|
|
11
10
|
const divClasses = {
|
|
12
11
|
filled: 'relative',
|
|
13
12
|
outlined: 'relative',
|
|
@@ -83,7 +82,6 @@ function setType(node) {
|
|
|
83
82
|
on:mouseleave
|
|
84
83
|
on:mouseover
|
|
85
84
|
on:paste
|
|
86
|
-
bind:this={ref}
|
|
87
85
|
use:setType
|
|
88
86
|
placeholder=" "
|
|
89
87
|
class={classNames(
|
package/forms/Iconinput.svelte
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
export let type = 'text';
|
|
3
3
|
export let value = '';
|
|
4
|
+
export let size = 'md';
|
|
4
5
|
export let icon;
|
|
5
6
|
export let noBorder = false;
|
|
6
|
-
export let inputClass = 'rounded-none rounded-r-lg bg-gray-50 border border-gray-300 text-gray-900 focus:ring-blue-500 focus:border-blue-500 block flex-1 min-w-0 w-full
|
|
7
|
+
export let inputClass = 'rounded-none rounded-r-lg bg-gray-50 border border-gray-300 text-gray-900 focus:ring-blue-500 focus:border-blue-500 block flex-1 min-w-0 w-full border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
|
|
7
8
|
export let spanClass = 'inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 rounded-l-md border border-r-0 border-gray-300 dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600';
|
|
8
|
-
export let noBorderInputClass = 'bg-gray-50 border border-gray-300 text-gray-900
|
|
9
|
+
export let noBorderInputClass = 'bg-gray-50 border border-gray-300 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
|
|
9
10
|
export let noBorderDivClass = 'flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none';
|
|
10
|
-
export let iconClass = '
|
|
11
|
-
export let iconSize
|
|
11
|
+
export let iconClass = 'mr-2';
|
|
12
|
+
export let iconSize;
|
|
12
13
|
function setType(node) {
|
|
13
14
|
node.type = type;
|
|
14
15
|
}
|
|
@@ -16,21 +17,63 @@ function setType(node) {
|
|
|
16
17
|
|
|
17
18
|
{#if noBorder}
|
|
18
19
|
<div class="relative">
|
|
19
|
-
<div
|
|
20
|
-
|
|
20
|
+
<div
|
|
21
|
+
class={classNames(noBorderDivClass, {
|
|
22
|
+
'p-2 sm:text-xs': size === 'sm',
|
|
23
|
+
'p-2.5 text-sm': size === 'md',
|
|
24
|
+
'sm:text-md p-4': size === 'lg'
|
|
25
|
+
})}
|
|
26
|
+
>
|
|
27
|
+
<svelte:component
|
|
28
|
+
this={icon}
|
|
29
|
+
size={classNames({
|
|
30
|
+
16: size === 'sm',
|
|
31
|
+
18: size === 'md',
|
|
32
|
+
20: size === 'lg'
|
|
33
|
+
})}
|
|
34
|
+
class={iconClass}
|
|
35
|
+
/>
|
|
21
36
|
</div>
|
|
22
37
|
<input
|
|
23
38
|
{...$$restProps}
|
|
24
39
|
bind:value
|
|
25
40
|
use:setType
|
|
26
|
-
class={classNames(
|
|
41
|
+
class={classNames(
|
|
42
|
+
noBorderInputClass,
|
|
43
|
+
{
|
|
44
|
+
'p-2 sm:text-xs': size === 'sm',
|
|
45
|
+
'p-2.5 text-sm': size === 'md',
|
|
46
|
+
'sm:text-md p-4': size === 'lg'
|
|
47
|
+
},
|
|
48
|
+
$$props.class
|
|
49
|
+
)}
|
|
27
50
|
/>
|
|
28
51
|
</div>
|
|
29
52
|
{:else}
|
|
30
53
|
<div class="flex">
|
|
31
54
|
<span class={spanClass}>
|
|
32
|
-
<svelte:component
|
|
55
|
+
<svelte:component
|
|
56
|
+
this={icon}
|
|
57
|
+
size={classNames({
|
|
58
|
+
16: size === 'sm',
|
|
59
|
+
18: size === 'md',
|
|
60
|
+
20: size === 'lg'
|
|
61
|
+
})}
|
|
62
|
+
class={iconClass}
|
|
63
|
+
/>
|
|
33
64
|
</span>
|
|
34
|
-
<input
|
|
65
|
+
<input
|
|
66
|
+
{...$$restProps}
|
|
67
|
+
{type}
|
|
68
|
+
class={classNames(
|
|
69
|
+
inputClass,
|
|
70
|
+
{
|
|
71
|
+
'p-2 sm:text-xs': size === 'sm',
|
|
72
|
+
'p-2.5 text-sm': size === 'md',
|
|
73
|
+
'sm:text-md p-4': size === 'lg'
|
|
74
|
+
},
|
|
75
|
+
$$props.class
|
|
76
|
+
)}
|
|
77
|
+
/>
|
|
35
78
|
</div>
|
|
36
79
|
{/if}
|
|
@@ -6,6 +6,7 @@ declare const __propDef: {
|
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
type?: InputType;
|
|
8
8
|
value?: string;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
9
10
|
icon: typeof SvelteComponent;
|
|
10
11
|
noBorder?: boolean;
|
|
11
12
|
inputClass?: string;
|
|
@@ -13,7 +14,7 @@ declare const __propDef: {
|
|
|
13
14
|
noBorderInputClass?: string;
|
|
14
15
|
noBorderDivClass?: string;
|
|
15
16
|
iconClass?: string;
|
|
16
|
-
iconSize
|
|
17
|
+
iconSize: string;
|
|
17
18
|
};
|
|
18
19
|
events: {
|
|
19
20
|
[evt: string]: CustomEvent<any>;
|
package/forms/Input.svelte
CHANGED
|
@@ -5,7 +5,6 @@ export let value = '';
|
|
|
5
5
|
export let size = 'md';
|
|
6
6
|
export let inputClass = 'block w-full border disabled:cursor-not-allowed disabled:opacity-50 rounded-lg';
|
|
7
7
|
export let color = 'base';
|
|
8
|
-
export let ref = null;
|
|
9
8
|
const colorClasses = {
|
|
10
9
|
base: 'bg-gray-50 border-gray-300 text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500',
|
|
11
10
|
green: 'border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500',
|
|
@@ -22,7 +21,6 @@ function setType(node) {
|
|
|
22
21
|
<input
|
|
23
22
|
{...$$restProps}
|
|
24
23
|
bind:value
|
|
25
|
-
bind:this={ref}
|
|
26
24
|
on:blur
|
|
27
25
|
on:change
|
|
28
26
|
on:click
|
package/forms/Input.svelte.d.ts
CHANGED
package/forms/Textarea.svelte
CHANGED
|
@@ -4,7 +4,6 @@ export let id = generateId();
|
|
|
4
4
|
export let name = 'message';
|
|
5
5
|
export let label = 'Your message';
|
|
6
6
|
export let rows = 4;
|
|
7
|
-
export let ref = null;
|
|
8
7
|
export let placeholder = 'Leave a comment...';
|
|
9
8
|
export let labelClass = 'block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400';
|
|
10
9
|
export let textareaClass = 'block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
|
|
@@ -15,7 +14,6 @@ export let helperClass = 'mt-2 text-sm text-gray-500 dark:text-gray-400';
|
|
|
15
14
|
<label for={id} class={labelClass}>{label}</label>
|
|
16
15
|
<textarea
|
|
17
16
|
bind:value
|
|
18
|
-
bind:this={ref}
|
|
19
17
|
on:blur
|
|
20
18
|
on:change
|
|
21
19
|
on:click
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.3",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"npm": ">=7.0.0",
|
|
89
|
-
"node": ">=16.
|
|
89
|
+
"node": ">=16.0.0"
|
|
90
90
|
},
|
|
91
91
|
"contributors": [
|
|
92
92
|
"Zoltán Szőgyényi <zoltan@themesberg.com>",
|
|
@@ -218,7 +218,6 @@
|
|
|
218
218
|
"./tooltips/Tooltip.svelte": "./tooltips/Tooltip.svelte",
|
|
219
219
|
"./types": "./types.js",
|
|
220
220
|
"./utils/CloseButton.svelte": "./utils/CloseButton.svelte",
|
|
221
|
-
"./utils/OptsButton.svelte": "./utils/OptsButton.svelte",
|
|
222
221
|
"./utils/clickOutside": "./utils/clickOutside.js",
|
|
223
222
|
"./utils/focusTrap": "./utils/focusTrap.js",
|
|
224
223
|
"./utils/generateId": "./utils/generateId.js"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
export let helper;
|
|
2
|
+
export let helper = undefined;
|
|
3
3
|
export let btnPreClass = 'py-2 px-4 text-sm font-medium text-white bg-gray-800 rounded-l hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
4
4
|
export let btnNextClass = 'py-2 px-4 text-sm font-medium text-white bg-gray-800 rounded-r border-0 border-l border-gray-700 hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
|
|
5
5
|
const dispatch = createEventDispatcher();
|
package/utils/OptsButton.svelte
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import CloseButton from './CloseButton.svelte';
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<CloseButton on:click {...$$props}>
|
|
6
|
-
<span class="sr-only">Open options</span>
|
|
7
|
-
<svg
|
|
8
|
-
class="w-6 h-6"
|
|
9
|
-
aria-hidden="true"
|
|
10
|
-
fill="currentColor"
|
|
11
|
-
viewBox="0 0 20 20"
|
|
12
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
-
>
|
|
14
|
-
<path
|
|
15
|
-
d="M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"
|
|
16
|
-
/>
|
|
17
|
-
</svg>
|
|
18
|
-
</CloseButton>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} OptsButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} OptsButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} OptsButtonSlots */
|
|
4
|
-
export default class OptsButton extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
}, {
|
|
7
|
-
click: MouseEvent;
|
|
8
|
-
} & {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {}> {
|
|
11
|
-
}
|
|
12
|
-
export type OptsButtonProps = typeof __propDef.props;
|
|
13
|
-
export type OptsButtonEvents = typeof __propDef.events;
|
|
14
|
-
export type OptsButtonSlots = typeof __propDef.slots;
|
|
15
|
-
import { SvelteComponentTyped } from "svelte";
|
|
16
|
-
declare const __propDef: {
|
|
17
|
-
props: {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
click: MouseEvent;
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
};
|
|
25
|
-
slots: {};
|
|
26
|
-
};
|
|
27
|
-
export {};
|