flowbite-svelte 0.26.5 → 0.26.6

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,21 @@
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.6](https://github.com/themesberg/flowbite-svelte/compare/v0.26.5...v0.26.6) (2022-09-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * add highlight to Span component and update heading page ([d47121b](https://github.com/themesberg/flowbite-svelte/commit/d47121ba47e6c6e3dfdd366128f51da77a966e0f))
11
+ * add Text decoration examples to text page ([fe074cd](https://github.com/themesberg/flowbite-svelte/commit/fe074cd2a36d780333444f276de69edec51649d5))
12
+ * add underline and decoratio class to Span ([f3b11a9](https://github.com/themesberg/flowbite-svelte/commit/f3b11a92b3782c27e09f25c894a81402661b73d3))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * header blocking anchor links ([af6d2d6](https://github.com/themesberg/flowbite-svelte/commit/af6d2d6eb9bb630e58e76fd214f8a14f0435dc2f))
18
+ * remove TextGradient and Underline ([cb7b2d7](https://github.com/themesberg/flowbite-svelte/commit/cb7b2d753f110cad4677f990d60a11154e38ac93))
19
+
5
20
  ### [0.26.5](https://github.com/themesberg/flowbite-svelte/compare/v0.26.4...v0.26.5) (2022-09-02)
6
21
 
7
22
 
package/index.d.ts CHANGED
@@ -110,7 +110,6 @@ export { default as A } from './typography/A.svelte';
110
110
  export { default as Blockquote } from './typography/Blockquote.svelte';
111
111
  export { default as DescriptionList } from './typography/DescriptionList.svelte';
112
112
  export { default as Heading } from './typography/Heading.svelte';
113
- export { default as Highlight } from './typography/Highlight.svelte';
114
113
  export { default as Hr } from './typography/Hr.svelte';
115
114
  export { default as Img } from './typography/Img.svelte';
116
115
  export { default as Li } from './typography/Li.svelte';
@@ -119,8 +118,6 @@ export { default as List } from './typography/List.svelte';
119
118
  export { default as P } from './typography/P.svelte';
120
119
  export { default as Secondary } from './typography/Secondary.svelte';
121
120
  export { default as Span } from './typography/Span.svelte';
122
- export { default as TextGradient } from './typography/TextGradient.svelte';
123
- export { default as Underline } from './typography/Underline.svelte';
124
121
  export { default as CloseButton } from './utils/CloseButton.svelte';
125
122
  export { default as ChevronDown } from './utils/ChevronDown.svelte';
126
123
  export { default as ChevronLeft } from './utils/ChevronLeft.svelte';
package/index.js CHANGED
@@ -143,7 +143,6 @@ export { default as A } from './typography/A.svelte';
143
143
  export { default as Blockquote } from './typography/Blockquote.svelte';
144
144
  export { default as DescriptionList } from './typography/DescriptionList.svelte';
145
145
  export { default as Heading } from './typography/Heading.svelte';
146
- export { default as Highlight } from './typography/Highlight.svelte';
147
146
  export { default as Hr } from './typography/Hr.svelte';
148
147
  export { default as Img } from './typography/Img.svelte';
149
148
  export { default as Li } from './typography/Li.svelte';
@@ -152,8 +151,6 @@ export { default as List } from './typography/List.svelte';
152
151
  export { default as P } from './typography/P.svelte';
153
152
  export { default as Secondary } from './typography/Secondary.svelte';
154
153
  export { default as Span } from './typography/Span.svelte';
155
- export { default as TextGradient } from './typography/TextGradient.svelte';
156
- export { default as Underline } from './typography/Underline.svelte';
157
154
  // utils
158
155
  export { default as CloseButton } from './utils/CloseButton.svelte';
159
156
  export { default as ChevronDown } from './utils/ChevronDown.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.26.5",
3
+ "version": "0.26.6",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -222,7 +222,6 @@
222
222
  "./typography/Blockquote.svelte": "./typography/Blockquote.svelte",
223
223
  "./typography/DescriptionList.svelte": "./typography/DescriptionList.svelte",
224
224
  "./typography/Heading.svelte": "./typography/Heading.svelte",
225
- "./typography/Highlight.svelte": "./typography/Highlight.svelte",
226
225
  "./typography/Hr.svelte": "./typography/Hr.svelte",
227
226
  "./typography/Img.svelte": "./typography/Img.svelte",
228
227
  "./typography/Li.svelte": "./typography/Li.svelte",
@@ -231,7 +230,6 @@
231
230
  "./typography/P.svelte": "./typography/P.svelte",
232
231
  "./typography/Secondary.svelte": "./typography/Secondary.svelte",
233
232
  "./typography/Span.svelte": "./typography/Span.svelte",
234
- "./typography/TextGradient.svelte": "./typography/TextGradient.svelte",
235
233
  "./typography/Ul.svelte": "./typography/Ul.svelte",
236
234
  "./typography/Underline.svelte": "./typography/Underline.svelte",
237
235
  "./utils/ChevronDown.svelte": "./utils/ChevronDown.svelte",
@@ -11,24 +11,33 @@ let alignmentClasses = {
11
11
  center: 'text-center',
12
12
  right: 'text-right'
13
13
  };
14
- export let size = 'xl';
15
- let sizeClasses = {
14
+ export let size = 'lg';
15
+ const sizes = {
16
+ xs: 'text-xs',
17
+ sm: 'text-sm',
18
+ base: 'text-base',
16
19
  lg: 'text-lg',
17
20
  xl: 'text-xl',
18
- xxl: 'text-2xl'
21
+ '2xl': 'text-2xl',
22
+ '3xl': 'text-3xl',
23
+ '4xl': 'text-4xl',
24
+ '5xl': 'text-5xl',
25
+ '6xl': 'text-6xl',
26
+ '7xl': 'text-7xl',
27
+ '8xl': 'text-8xl',
28
+ '9xl': 'text-9xl'
19
29
  };
20
30
  </script>
21
31
 
22
32
  <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 />
33
+ class={classNames(
34
+ baseClass,
35
+ alignmentClasses[alignment],
36
+ sizes[size],
37
+ bg && bgClass,
38
+ border && borderClass,
39
+ italic && 'italic',
40
+ $$props.class
41
+ )}>
42
+ <slot />
34
43
  </blockquote>
@@ -9,7 +9,7 @@ declare const __propDef: {
9
9
  bg?: boolean;
10
10
  baseClass?: string;
11
11
  alignment?: 'left' | 'center' | 'right';
12
- size?: 'lg' | 'xl' | 'xxl';
12
+ size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
13
13
  };
14
14
  events: {
15
15
  [evt: string]: CustomEvent<any>;
@@ -1,9 +1,75 @@
1
1
  <script>import classNames from 'classnames';
2
- export let textColor = 'text-gray-500 dark:text-gray-400';
3
- export let size = 'text-lg';
4
- export let pClass = 'font-normal';
2
+ export let color = 'text-gray-900 dark:text-white';
3
+ export let height = 'normal';
4
+ export let align = 'left';
5
+ export let justify = false;
6
+ export let italic = false;
7
+ export let opacity = 100;
8
+ export let whitespace = 'normal';
9
+ export let size = 'lg';
10
+ export let space;
11
+ export let weight;
12
+ const sizes = {
13
+ xs: 'text-xs',
14
+ sm: 'text-sm',
15
+ base: 'text-base',
16
+ lg: 'text-lg',
17
+ xl: 'text-xl',
18
+ '2xl': 'text-2xl',
19
+ '3xl': 'text-3xl',
20
+ '4xl': 'text-4xl',
21
+ '5xl': 'text-5xl',
22
+ '6xl': 'text-6xl',
23
+ '7xl': 'text-7xl',
24
+ '8xl': 'text-8xl',
25
+ '9xl': 'text-9xl'
26
+ };
27
+ const weights = {
28
+ thin: 'font-thin',
29
+ extralight: 'font-extralight',
30
+ light: 'font-light',
31
+ normal: 'font-normal',
32
+ medium: 'font-medium',
33
+ semibold: 'font-semibold',
34
+ bold: 'font-bold',
35
+ extrabold: 'font-extrabold',
36
+ black: 'font-black'
37
+ };
38
+ const spaces = {
39
+ tighter: 'tracking-tighter',
40
+ tight: 'tracking-tight',
41
+ normal: 'tracking-normal',
42
+ wide: 'tracking-wide',
43
+ wider: 'tracking-wider',
44
+ widest: 'tracking-widest'
45
+ };
46
+ const heights = {
47
+ normal: 'leading-normal',
48
+ relaxed: 'leading-relaxed',
49
+ loose: 'leading-loose'
50
+ };
51
+ const aligns = {
52
+ left: 'text-left',
53
+ center: 'text-center',
54
+ right: 'text-right'
55
+ };
56
+ const whitespaces = {
57
+ normal: 'whitespace-normal',
58
+ nowrap: 'whitespace-nowrap',
59
+ pre: 'whitespace-pre',
60
+ preline: 'whitespace-pre-line',
61
+ prewrap: 'whitespace-pre-wrap'
62
+ };
63
+ let colorAndopacity = color
64
+ .split(' ')
65
+ .map((element) => element.trim())
66
+ .map((element) => element + '/' + String(opacity))
67
+ .join(' ');
68
+ // console.log('colorArr', colorAndopacity);
69
+ // console.log(typeof colorAndopacity);
70
+ 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', whitespace && whitespaces[whitespace], $$props.class);
5
71
  </script>
6
72
 
7
- <p class={classNames(pClass, size, textColor, $$props.class)}>
8
- <slot />
73
+ <p class={classP}>
74
+ <slot />
9
75
  </p>
@@ -2,9 +2,16 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- textColor?: string;
6
- size?: string;
7
- pClass?: string;
5
+ color?: string;
6
+ height?: 'normal' | 'relaxed' | 'loose';
7
+ align?: 'left' | 'center' | 'right';
8
+ justify?: boolean;
9
+ italic?: boolean;
10
+ opacity?: number;
11
+ whitespace?: 'normal' | 'nowrap' | 'pre' | 'preline' | 'prewrap';
12
+ size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
13
+ space: 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
14
+ weight: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
8
15
  };
9
16
  events: {
10
17
  [evt: string]: CustomEvent<any>;
@@ -1,5 +1,15 @@
1
1
  <script>import classNames from 'classnames';
2
- export let classSpan = classNames('font-semibold text-gray-900 dark:text-white', $$props.class);
2
+ export let italic = false;
3
+ export let underline = false;
4
+ export let linethrough = false;
5
+ export let uppercase = false;
6
+ export let gradient = false;
7
+ export let highlight = false;
8
+ export let highlightClass = 'text-blue-600 dark:text-blue-500';
9
+ export let decorationClass = 'decoration-2 decoration-blue-400 dark:decoration-blue-600';
10
+ export let gradientClass = 'text-transparent bg-clip-text bg-gradient-to-r to-emerald-600 from-sky-400';
11
+ let underlineClass = classNames('underline', decorationClass);
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);
3
13
  </script>
4
14
 
5
15
  <span class={classSpan}>
@@ -2,7 +2,15 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- classSpan?: string;
5
+ italic?: boolean;
6
+ underline?: boolean;
7
+ linethrough?: boolean;
8
+ uppercase?: boolean;
9
+ gradient?: boolean;
10
+ highlight?: boolean;
11
+ highlightClass?: string;
12
+ decorationClass?: string;
13
+ gradientClass?: string;
6
14
  };
7
15
  events: {
8
16
  [evt: string]: CustomEvent<any>;
@@ -1,7 +1,7 @@
1
1
  <script>import classNames from 'classnames';
2
- export let underlineClass = 'underline underline-offset-3 decoration-8 decoration-blue-400 dark:decoration-blue-600';
2
+ export let underlineClass = 'underline decoration-8 decoration-blue-400 dark:decoration-blue-600';
3
3
  </script>
4
4
 
5
5
  <span class={classNames(underlineClass, $$props.class)}>
6
- <slot />
6
+ <slot />
7
7
  </span>
@@ -1,7 +0,0 @@
1
- <script>import classNames from 'classnames';
2
- export let textColor = 'text-blue-600 dark:text-blue-500';
3
- </script>
4
-
5
- <span class={classNames(textColor, $$props.class)}>
6
- <slot />
7
- </span>
@@ -1,19 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- [x: string]: any;
5
- textColor?: string;
6
- };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {
11
- default: {};
12
- };
13
- };
14
- export declare type HighlightProps = typeof __propDef.props;
15
- export declare type HighlightEvents = typeof __propDef.events;
16
- export declare type HighlightSlots = typeof __propDef.slots;
17
- export default class Highlight extends SvelteComponentTyped<HighlightProps, HighlightEvents, HighlightSlots> {
18
- }
19
- export {};
@@ -1,7 +0,0 @@
1
- <script>import classNames from 'classnames';
2
- export let gradientClass = 'text-transparent bg-clip-text bg-gradient-to-r to-emerald-600 from-sky-400';
3
- </script>
4
-
5
- <span class={classNames(gradientClass, $$props.class)}>
6
- <slot />
7
- </span>
@@ -1,19 +0,0 @@
1
- import { SvelteComponentTyped } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- [x: string]: any;
5
- gradientClass?: string;
6
- };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {
11
- default: {};
12
- };
13
- };
14
- export declare type TextGradientProps = typeof __propDef.props;
15
- export declare type TextGradientEvents = typeof __propDef.events;
16
- export declare type TextGradientSlots = typeof __propDef.slots;
17
- export default class TextGradient extends SvelteComponentTyped<TextGradientProps, TextGradientEvents, TextGradientSlots> {
18
- }
19
- export {};