flowbite-svelte 0.25.8 → 0.25.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 +26 -0
- package/buttongroups/ButtonGroup.svelte +1 -1
- package/buttons/Button.svelte +4 -4
- package/icons/QuoteLeft.svelte +17 -0
- package/icons/QuoteLeft.svelte.d.ts +18 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/package.json +8 -6
- package/ratings/Rating.svelte +3 -2
- package/ratings/Rating.svelte.d.ts +1 -0
- package/typography/Blockquote.svelte +34 -0
- package/typography/Blockquote.svelte.d.ts +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
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.25.11](https://github.com/themesberg/flowbite-svelte/compare/v0.25.10...v0.25.11) (2022-08-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add Blockquote ([89cbfbd](https://github.com/themesberg/flowbite-svelte/commit/89cbfbdf56e7beca90b00cf4c9c033789b2a2ba5))
|
|
11
|
+
* add size to Rating component ([7c2784e](https://github.com/themesberg/flowbite-svelte/commit/7c2784efff60877014c14a8acc7760f845671100))
|
|
12
|
+
* add User review, User testimonial, Paragraph context, Blockquote icon to typography/blockquote page ([73143ba](https://github.com/themesberg/flowbite-svelte/commit/73143bad816f6b3249fff3486d3b8569f45fde7f))
|
|
13
|
+
|
|
14
|
+
### [0.25.10](https://github.com/themesberg/flowbite-svelte/compare/v0.25.9...v0.25.10) (2022-08-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* buttons fine tuning ([353f631](https://github.com/themesberg/flowbite-svelte/commit/353f6312557fbef802e4e0b61d3638ab4190d2e3))
|
|
20
|
+
* buttons fine tuning ([9f4c927](https://github.com/themesberg/flowbite-svelte/commit/9f4c927fb8303e7e65163ecd6413cdb834d1a4f3))
|
|
21
|
+
|
|
22
|
+
### [0.25.9](https://github.com/themesberg/flowbite-svelte/compare/v0.25.8...v0.25.9) (2022-08-21)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* docs for radio ([add38b2](https://github.com/themesberg/flowbite-svelte/commit/add38b26fd4669a591916b7fa42e107868cc90a1))
|
|
28
|
+
* move @floating-ui/dom, classnames, svelte-heros, @popperjs/core from devDpendencies to dependencies ([ee5d31a](https://github.com/themesberg/flowbite-svelte/commit/ee5d31af1b23e00e565c2a60b354b85f2beb54d1))
|
|
29
|
+
* popover html ([d49f808](https://github.com/themesberg/flowbite-svelte/commit/d49f808b8a05bd735a9f90c661710dddfd163cad))
|
|
30
|
+
|
|
5
31
|
### [0.25.8](https://github.com/themesberg/flowbite-svelte/compare/v0.25.7...v0.25.8) (2022-08-21)
|
|
6
32
|
|
|
7
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { setContext } from 'svelte';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
export let divClass = 'inline-flex rounded-lg shadow-sm';
|
|
3
|
+
export let divClass = 'inline-flex rounded-lg shadow-sm w-fit';
|
|
4
4
|
setContext('group', true);
|
|
5
5
|
setContext('background', true);
|
|
6
6
|
</script>
|
package/buttons/Button.svelte
CHANGED
|
@@ -14,7 +14,7 @@ const background = getContext('background');
|
|
|
14
14
|
const colorClasses = {
|
|
15
15
|
blue: 'text-white bg-blue-700 hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800',
|
|
16
16
|
dark: 'text-white bg-gray-800 hover:bg-gray-900 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700',
|
|
17
|
-
alternative: 'text-gray-900 bg-white border border-gray-200 dark:border-gray-600 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-800 dark:text-gray-400 hover:text-blue-700 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700',
|
|
17
|
+
alternative: 'text-gray-900 bg-white border border-gray-200 dark:border-gray-600 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-800 dark:text-gray-400 hover:text-blue-700 focus:text-blue-700 dark:focus:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700',
|
|
18
18
|
light: 'text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700',
|
|
19
19
|
green: 'text-white bg-green-700 hover:bg-green-800 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800',
|
|
20
20
|
red: 'text-white bg-red-700 hover:bg-red-800 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900',
|
|
@@ -50,7 +50,7 @@ const coloredShadowClasses = {
|
|
|
50
50
|
};
|
|
51
51
|
const outlineClasses = {
|
|
52
52
|
blue: 'text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600 dark:focus:ring-blue-800',
|
|
53
|
-
dark: 'text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:ring-gray-300 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800',
|
|
53
|
+
dark: 'text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:bg-gray-900 focus:text-white focus:ring-gray-300 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800',
|
|
54
54
|
green: 'text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-green-300 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800',
|
|
55
55
|
red: 'text-red-700 hover:text-white border border-red-700 hover:bg-red-800 focus:ring-red-300 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600 dark:focus:ring-red-900',
|
|
56
56
|
yellow: 'text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 focus:ring-yellow-300 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400 dark:focus:ring-yellow-900',
|
|
@@ -77,7 +77,7 @@ const hasBorder = () => outline || color === 'alternative' || color === 'light';
|
|
|
77
77
|
let buttonClass;
|
|
78
78
|
$: buttonClass = btnClass
|
|
79
79
|
? btnClass
|
|
80
|
-
: classNames('group text-center font-medium focus:ring-4 focus:outline-none', outline && gradient
|
|
80
|
+
: classNames('group 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
|
|
@@ -86,7 +86,7 @@ $: buttonClass = btnClass
|
|
|
86
86
|
color === 'dark' &&
|
|
87
87
|
(background
|
|
88
88
|
? 'dark:text-white dark:border-white'
|
|
89
|
-
: 'dark:text-gray-400 dark:border-gray-700'), hasBorder() && group && 'border-l-0 first:border
|
|
89
|
+
: 'dark:text-gray-400 dark:border-gray-700'), hasBorder() && group && 'border-l-0 border-r-0 first:border last:border', rounded(false), shadow && coloredShadowClasses[shadow], $$props.disabled && 'cursor-not-allowed opacity-50', $$props.class);
|
|
90
90
|
let gradientOutlineClass;
|
|
91
91
|
$: gradientOutlineClass = classNames('inline-flex items-center justify-center', sizeClasses[size], rounded(true), 'bg-white text-gray-900 dark:bg-gray-900 dark:text-white', // this is limitation - no transparency
|
|
92
92
|
'transition-all duration-75 ease-in group-hover:bg-opacity-0 group-hover:text-inherit');
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>export let size = '24';
|
|
2
|
+
export let color = 'currentColor';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<svg
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
width={size}
|
|
8
|
+
height={size}
|
|
9
|
+
class={$$props.class}
|
|
10
|
+
viewBox="0 0 24 27"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
><path
|
|
14
|
+
d="M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z"
|
|
15
|
+
fill={color}
|
|
16
|
+
/></svg
|
|
17
|
+
>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
size?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type QuoteLeftProps = typeof __propDef.props;
|
|
14
|
+
export declare type QuoteLeftEvents = typeof __propDef.events;
|
|
15
|
+
export declare type QuoteLeftSlots = typeof __propDef.slots;
|
|
16
|
+
export default class QuoteLeft extends SvelteComponentTyped<QuoteLeftProps, QuoteLeftEvents, QuoteLeftSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { default as SimpleSearch } from './forms/SimpleSearch.svelte';
|
|
|
40
40
|
export { default as Textarea } from './forms/Textarea.svelte';
|
|
41
41
|
export { default as Toggle } from './forms/Toggle.svelte';
|
|
42
42
|
export { default as VoiceSearch } from './forms/VoiceSearch.svelte';
|
|
43
|
+
export { default as QuoteLeft } from './icons/QuoteLeft.svelte';
|
|
43
44
|
export { default as Kbd } from './kbd/Kbd.svelte';
|
|
44
45
|
export { default as ArrowKeyDown } from './kbd/ArrowKeyDown.svelte';
|
|
45
46
|
export { default as ArrowKeyLeft } from './kbd/ArrowKeyLeft.svelte';
|
|
@@ -112,6 +113,7 @@ export { default as TimelineItemVertical } from './timelines/TimelineItemVertica
|
|
|
112
113
|
export { default as Toast } from './toasts/Toast.svelte';
|
|
113
114
|
export { default as Tooltip } from './tooltips/Tooltip.svelte';
|
|
114
115
|
export { default as A } from './typography/A.svelte';
|
|
116
|
+
export { default as Blockquote } from './typography/Blockquote.svelte';
|
|
115
117
|
export { default as Heading } from './typography/Heading.svelte';
|
|
116
118
|
export { default as Highlight } from './typography/Highlight.svelte';
|
|
117
119
|
export { default as Mark } from './typography/Mark.svelte';
|
package/index.js
CHANGED
|
@@ -55,6 +55,8 @@ export { default as SimpleSearch } from './forms/SimpleSearch.svelte';
|
|
|
55
55
|
export { default as Textarea } from './forms/Textarea.svelte';
|
|
56
56
|
export { default as Toggle } from './forms/Toggle.svelte';
|
|
57
57
|
export { default as VoiceSearch } from './forms/VoiceSearch.svelte';
|
|
58
|
+
// Icons
|
|
59
|
+
export { default as QuoteLeft } from './icons/QuoteLeft.svelte';
|
|
58
60
|
// Kbd
|
|
59
61
|
export { default as Kbd } from './kbd/Kbd.svelte';
|
|
60
62
|
export { default as ArrowKeyDown } from './kbd/ArrowKeyDown.svelte';
|
|
@@ -145,6 +147,7 @@ export { default as Toast } from './toasts/Toast.svelte';
|
|
|
145
147
|
export { default as Tooltip } from './tooltips/Tooltip.svelte';
|
|
146
148
|
// Typography
|
|
147
149
|
export { default as A } from './typography/A.svelte';
|
|
150
|
+
export { default as Blockquote } from './typography/Blockquote.svelte';
|
|
148
151
|
export { default as Heading } from './typography/Heading.svelte';
|
|
149
152
|
export { default as Highlight } from './typography/Highlight.svelte';
|
|
150
153
|
export { default as Mark } from './typography/Mark.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.11",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -12,16 +12,13 @@
|
|
|
12
12
|
"homepage": "https://flowbite-svelte.com/",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@floating-ui/dom": "^1.0.1",
|
|
16
15
|
"@playwright/test": "^1.25.0",
|
|
17
|
-
"@popperjs/core": "^2.11.6",
|
|
18
16
|
"@sveltejs/adapter-auto": "next",
|
|
19
17
|
"@sveltejs/kit": "1.0.0-next.420",
|
|
20
18
|
"@sveltejs/package": "1.0.0-next.1",
|
|
21
19
|
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
|
22
20
|
"@typescript-eslint/parser": "^5.33.0",
|
|
23
21
|
"autoprefixer": "^10.4.8",
|
|
24
|
-
"classnames": "^2.3.1",
|
|
25
22
|
"createprops": "^0.4.9",
|
|
26
23
|
"eslint": "^8.21.0",
|
|
27
24
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -35,7 +32,6 @@
|
|
|
35
32
|
"svelte": "^3.49.0",
|
|
36
33
|
"svelte-check": "^2.8.0",
|
|
37
34
|
"svelte-flag-icons": "^0.1.1",
|
|
38
|
-
"svelte-heros": "^2.3.3",
|
|
39
35
|
"svelte-preprocess": "^4.10.7",
|
|
40
36
|
"svelte-sidebar-menu": "^0.8.11",
|
|
41
37
|
"svelte2tsx": "^0.5.13",
|
|
@@ -85,7 +81,11 @@
|
|
|
85
81
|
"url": "https://github.com/themesberg/flowbite-svelte"
|
|
86
82
|
},
|
|
87
83
|
"dependencies": {
|
|
88
|
-
"
|
|
84
|
+
"@floating-ui/dom": "^1.0.1",
|
|
85
|
+
"@popperjs/core": "^2.11.6",
|
|
86
|
+
"classnames": "^2.3.1",
|
|
87
|
+
"flowbite": "^1.5.2",
|
|
88
|
+
"svelte-heros": "^2.3.3"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|
|
91
91
|
"npm": ">=7.0.0",
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
"./forms/Textarea.svelte": "./forms/Textarea.svelte",
|
|
150
150
|
"./forms/Toggle.svelte": "./forms/Toggle.svelte",
|
|
151
151
|
"./forms/VoiceSearch.svelte": "./forms/VoiceSearch.svelte",
|
|
152
|
+
"./icons/QuoteLeft.svelte": "./icons/QuoteLeft.svelte",
|
|
152
153
|
".": "./index.js",
|
|
153
154
|
"./kbd/ArrowKeyDown.svelte": "./kbd/ArrowKeyDown.svelte",
|
|
154
155
|
"./kbd/ArrowKeyLeft.svelte": "./kbd/ArrowKeyLeft.svelte",
|
|
@@ -223,6 +224,7 @@
|
|
|
223
224
|
"./tooltips/Tooltip.svelte": "./tooltips/Tooltip.svelte",
|
|
224
225
|
"./types": "./types.js",
|
|
225
226
|
"./typography/A.svelte": "./typography/A.svelte",
|
|
227
|
+
"./typography/Blockquote.svelte": "./typography/Blockquote.svelte",
|
|
226
228
|
"./typography/Heading.svelte": "./typography/Heading.svelte",
|
|
227
229
|
"./typography/Highlight.svelte": "./typography/Highlight.svelte",
|
|
228
230
|
"./typography/Mark.svelte": "./typography/Mark.svelte",
|
package/ratings/Rating.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>import { Star } from 'svelte-heros';
|
|
2
2
|
export let divClass = 'flex items-center';
|
|
3
|
+
export let size = '24';
|
|
3
4
|
export let total = 5;
|
|
4
5
|
export let rating = 4;
|
|
5
6
|
// default is floor
|
|
@@ -11,13 +12,13 @@ let grayStars = total - roundedRating;
|
|
|
11
12
|
|
|
12
13
|
<div class={divClass}>
|
|
13
14
|
{#if count}
|
|
14
|
-
<Star variation="solid" size
|
|
15
|
+
<Star variation="solid" {size} class="text-yellow-300 dark:text-yellow-200" />
|
|
15
16
|
<p class="ml-2 text-sm font-bold text-gray-900 dark:text-white">{rating}</p>
|
|
16
17
|
<slot />
|
|
17
18
|
{:else}
|
|
18
19
|
{#each Array(roundedRating) as _, star}
|
|
19
20
|
<slot name="ratingUp">
|
|
20
|
-
<Star variation="solid" size
|
|
21
|
+
<Star variation="solid" {size} class="text-yellow-300 dark:text-yellow-200" />
|
|
21
22
|
</slot>
|
|
22
23
|
{/each}
|
|
23
24
|
{#each Array(grayStars) as _, star}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let border = false;
|
|
3
|
+
export let italic = true;
|
|
4
|
+
export let borderClass = 'border-l-4 border-gray-300 dark:border-gray-500';
|
|
5
|
+
export let bgClass = 'bg-gray-50 dark:bg-gray-800';
|
|
6
|
+
export let bg = false;
|
|
7
|
+
export let baseClass = 'font-semibold text-gray-900 dark:text-white';
|
|
8
|
+
export let alignment = 'left';
|
|
9
|
+
let alignmentClasses = {
|
|
10
|
+
left: 'text-left',
|
|
11
|
+
center: 'text-center',
|
|
12
|
+
right: 'text-right'
|
|
13
|
+
};
|
|
14
|
+
export let size = 'xl';
|
|
15
|
+
let sizeClasses = {
|
|
16
|
+
lg: 'text-lg',
|
|
17
|
+
xl: 'text-xl',
|
|
18
|
+
xxl: 'text-2xl'
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<blockquote
|
|
23
|
+
class={classNames(
|
|
24
|
+
baseClass,
|
|
25
|
+
alignmentClasses[alignment],
|
|
26
|
+
sizeClasses[size],
|
|
27
|
+
bg && bgClass,
|
|
28
|
+
border && borderClass,
|
|
29
|
+
italic && 'italic',
|
|
30
|
+
$$props.class
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
<slot />
|
|
34
|
+
</blockquote>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
border?: boolean;
|
|
6
|
+
italic?: boolean;
|
|
7
|
+
borderClass?: string;
|
|
8
|
+
bgClass?: string;
|
|
9
|
+
bg?: boolean;
|
|
10
|
+
baseClass?: string;
|
|
11
|
+
alignment?: 'left' | 'center' | 'right';
|
|
12
|
+
size?: 'lg' | 'xl' | 'xxl';
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {
|
|
18
|
+
default: {};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare type BlockquoteProps = typeof __propDef.props;
|
|
22
|
+
export declare type BlockquoteEvents = typeof __propDef.events;
|
|
23
|
+
export declare type BlockquoteSlots = typeof __propDef.slots;
|
|
24
|
+
export default class Blockquote extends SvelteComponentTyped<BlockquoteProps, BlockquoteEvents, BlockquoteSlots> {
|
|
25
|
+
}
|
|
26
|
+
export {};
|