flowbite-svelte 0.25.9 → 0.25.12

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 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.25.12](https://github.com/themesberg/flowbite-svelte/compare/v0.25.11...v0.25.12) (2022-08-22)
6
+
7
+
8
+ ### Features
9
+
10
+ * add Hr component and page ([f289c1e](https://github.com/themesberg/flowbite-svelte/commit/f289c1ebd6cfcbcfde87b28ce3108abaf54248ca))
11
+
12
+ ### [0.25.11](https://github.com/themesberg/flowbite-svelte/compare/v0.25.10...v0.25.11) (2022-08-22)
13
+
14
+
15
+ ### Features
16
+
17
+ * add Blockquote ([89cbfbd](https://github.com/themesberg/flowbite-svelte/commit/89cbfbdf56e7beca90b00cf4c9c033789b2a2ba5))
18
+ * add size to Rating component ([7c2784e](https://github.com/themesberg/flowbite-svelte/commit/7c2784efff60877014c14a8acc7760f845671100))
19
+ * add User review, User testimonial, Paragraph context, Blockquote icon to typography/blockquote page ([73143ba](https://github.com/themesberg/flowbite-svelte/commit/73143bad816f6b3249fff3486d3b8569f45fde7f))
20
+
21
+ ### [0.25.10](https://github.com/themesberg/flowbite-svelte/compare/v0.25.9...v0.25.10) (2022-08-22)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * buttons fine tuning ([353f631](https://github.com/themesberg/flowbite-svelte/commit/353f6312557fbef802e4e0b61d3638ab4190d2e3))
27
+ * buttons fine tuning ([9f4c927](https://github.com/themesberg/flowbite-svelte/commit/9f4c927fb8303e7e65163ecd6413cdb834d1a4f3))
28
+
5
29
  ### [0.25.9](https://github.com/themesberg/flowbite-svelte/compare/v0.25.8...v0.25.9) (2022-08-21)
6
30
 
7
31
 
@@ -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>
@@ -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-l', rounded(false), shadow && coloredShadowClasses[shadow], $$props.disabled && 'cursor-not-allowed opacity-50', $$props.class);
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,8 +113,10 @@ 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';
119
+ export { default as Hr } from './typography/Hr.svelte';
117
120
  export { default as Mark } from './typography/Mark.svelte';
118
121
  export { default as P } from './typography/P.svelte';
119
122
  export { default as Secondary } from './typography/Secondary.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,8 +147,10 @@ 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';
153
+ export { default as Hr } from './typography/Hr.svelte';
150
154
  export { default as Mark } from './typography/Mark.svelte';
151
155
  export { default as P } from './typography/P.svelte';
152
156
  export { default as Secondary } from './typography/Secondary.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.25.9",
3
+ "version": "0.25.12",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -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,8 +224,10 @@
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",
230
+ "./typography/Hr.svelte": "./typography/Hr.svelte",
228
231
  "./typography/Mark.svelte": "./typography/Mark.svelte",
229
232
  "./typography/P.svelte": "./typography/P.svelte",
230
233
  "./typography/Secondary.svelte": "./typography/Secondary.svelte",
@@ -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="24" class="text-yellow-300 dark:text-yellow-200" />
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="24" class="text-yellow-300 dark:text-yellow-200" />
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}
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  divClass?: string;
5
+ size?: string;
5
6
  total?: number;
6
7
  rating?: number;
7
8
  ceil?: boolean;
@@ -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 {};
@@ -14,7 +14,7 @@ const textSizes = {
14
14
 
15
15
  <svelte:element
16
16
  this={tag}
17
- class={classNames(customSize ? customSize : textSizes[tag], textColor, $$props.class)}
17
+ class={classNames(customSize ? customSize : textSizes[tag], textColor, 'w-full', $$props.class)}
18
18
  >
19
19
  <slot />
20
20
  </svelte:element>
@@ -0,0 +1,29 @@
1
+ <script>import classNames from 'classnames';
2
+ export let divClass = 'inline-flex justify-center items-center w-full';
3
+ export let hrClass = 'bg-gray-200 rounded border-0 dark:bg-gray-700';
4
+ // bg-gray-200 rounded border-0 dark:bg-gray-700
5
+ export let width = 'w-full';
6
+ export let height = 'h-px';
7
+ export let iconSize = 24;
8
+ export let iconClass = 'text-gray-700 dark:text-gray-300';
9
+ export let icon;
10
+ export let text;
11
+ export let iconDivClass = 'absolute left-1/2 px-4 bg-white -translate-x-1/2 dark:bg-gray-900';
12
+ export let textSpanClass = 'absolute left-1/2 px-3 font-medium text-gray-900 bg-white -translate-x-1/2 dark:text-white dark:bg-gray-900';
13
+ let horizontalClass = classNames(hrClass, width, height, $$props.class);
14
+ </script>
15
+
16
+ {#if icon || text}
17
+ <div class={classNames(divClass, $$props.classDiv)}>
18
+ <hr class={horizontalClass} />
19
+ {#if icon}
20
+ <div class={iconDivClass}>
21
+ <svelte:component this={icon} size={iconSize} class={iconClass} />
22
+ </div>
23
+ {:else}
24
+ <span class={textSpanClass}>or</span>
25
+ {/if}
26
+ </div>
27
+ {:else}
28
+ <hr class={horizontalClass} />
29
+ {/if}
@@ -0,0 +1,27 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { SvelteComponent } from 'svelte';
3
+ declare const __propDef: {
4
+ props: {
5
+ [x: string]: any;
6
+ divClass?: string;
7
+ hrClass?: string;
8
+ width?: string;
9
+ height?: string;
10
+ iconSize?: number;
11
+ iconClass?: string;
12
+ icon: typeof SvelteComponent;
13
+ text: string;
14
+ iconDivClass?: string;
15
+ textSpanClass?: string;
16
+ };
17
+ events: {
18
+ [evt: string]: CustomEvent<any>;
19
+ };
20
+ slots: {};
21
+ };
22
+ export declare type HrProps = typeof __propDef.props;
23
+ export declare type HrEvents = typeof __propDef.events;
24
+ export declare type HrSlots = typeof __propDef.slots;
25
+ export default class Hr extends SvelteComponentTyped<HrProps, HrEvents, HrSlots> {
26
+ }
27
+ export {};