flowbite-svelte 0.26.4 → 0.26.7

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,52 @@
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.7](https://github.com/themesberg/flowbite-svelte/compare/v0.26.6...v0.26.7) (2022-09-03)
6
+
7
+
8
+ ### Features
9
+
10
+ * add Layout component ([2204586](https://github.com/themesberg/flowbite-svelte/commit/22045861703bf3e46cc7900e15c4db64d5246c50))
11
+ * add paragraphs page ([db973a3](https://github.com/themesberg/flowbite-svelte/commit/db973a3929bfdc8c4dd48338cc114bdc2c808fb8))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * add html block to text page ([37e910a](https://github.com/themesberg/flowbite-svelte/commit/37e910ae269099865865580d419b8dd05dccb7a8))
17
+
18
+ ### [0.26.6](https://github.com/themesberg/flowbite-svelte/compare/v0.26.5...v0.26.6) (2022-09-02)
19
+
20
+
21
+ ### Features
22
+
23
+ * add highlight to Span component and update heading page ([d47121b](https://github.com/themesberg/flowbite-svelte/commit/d47121ba47e6c6e3dfdd366128f51da77a966e0f))
24
+ * add Text decoration examples to text page ([fe074cd](https://github.com/themesberg/flowbite-svelte/commit/fe074cd2a36d780333444f276de69edec51649d5))
25
+ * add underline and decoratio class to Span ([f3b11a9](https://github.com/themesberg/flowbite-svelte/commit/f3b11a92b3782c27e09f25c894a81402661b73d3))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * header blocking anchor links ([af6d2d6](https://github.com/themesberg/flowbite-svelte/commit/af6d2d6eb9bb630e58e76fd214f8a14f0435dc2f))
31
+ * remove TextGradient and Underline ([cb7b2d7](https://github.com/themesberg/flowbite-svelte/commit/cb7b2d753f110cad4677f990d60a11154e38ac93))
32
+
33
+ ### [0.26.5](https://github.com/themesberg/flowbite-svelte/compare/v0.26.4...v0.26.5) (2022-09-02)
34
+
35
+
36
+ ### Features
37
+
38
+ * add DescriptionList, List, Span components ([495b61e](https://github.com/themesberg/flowbite-svelte/commit/495b61eb0d81eb9ae06a34fa981dd42a81983ea6))
39
+ * add Ul, Li, Span component ([86d8b66](https://github.com/themesberg/flowbite-svelte/commit/86d8b661f2524f25162a99b6d3b8df761a85b01b))
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * blockquote page formating ([1641d45](https://github.com/themesberg/flowbite-svelte/commit/1641d45bdc032c01cd201967bf362d9f8a19a422))
45
+ * Heading to the original code ([5604da5](https://github.com/themesberg/flowbite-svelte/commit/5604da5f348420f8878e44d591e9a8704b23e4a0))
46
+ * List in cards page to Listgroup ([b8e05f4](https://github.com/themesberg/flowbite-svelte/commit/b8e05f4f97fbbb0236872b2b5f18f0928c34ad55))
47
+ * rebase merge conflict Alert.svelte ([38df84a](https://github.com/themesberg/flowbite-svelte/commit/38df84a21124d3d3c3c1d716ff21bd678b156b09))
48
+ * removed Ol component ([569f2e3](https://github.com/themesberg/flowbite-svelte/commit/569f2e3a51a59abba641c669949b4b5372c56a01))
49
+ * rename List to Listgroup and ListItem to ListgroupItem ([1b70110](https://github.com/themesberg/flowbite-svelte/commit/1b7011062a729452604b3a0dd1ed54f28ab49132))
50
+
5
51
  ### [0.26.4](https://github.com/themesberg/flowbite-svelte/compare/v0.26.3...v0.26.4) (2022-09-02)
6
52
 
7
53
 
@@ -18,27 +18,27 @@ $: divClass = classNames('p-4 text-sm', accent && 'border-t-4 ', hidden && 'hidd
18
18
  </script>
19
19
 
20
20
  <Frame {color} {rounded} {...$$restProps} class={divClass} role="alert">
21
- <div class="flex items-center whitespace-pre-wrap">
22
- {#if $$slots.icon}
23
- <slot name="icon" />
24
- {/if}
21
+ <div class="flex items-center whitespace-pre-wrap">
22
+ {#if $$slots.icon}
23
+ <slot name="icon" />
24
+ {/if}
25
25
 
26
- <slot />
26
+ <slot />
27
27
 
28
- {#if dismissable}
29
- <CloseButton
30
- class="-mx-1.5 -my-1.5"
31
- {color}
32
- on:click={handleHide}
33
- on:click
34
- on:change
35
- on:keydown
36
- on:keyup
37
- on:focus
38
- on:blur
39
- on:mouseenter
40
- on:mouseleave />
41
- {/if}
42
- </div>
43
- <slot name="extra" />
28
+ {#if dismissable}
29
+ <CloseButton
30
+ class="-mx-1.5 -my-1.5"
31
+ {color}
32
+ on:click={handleHide}
33
+ on:click
34
+ on:change
35
+ on:keydown
36
+ on:keyup
37
+ on:focus
38
+ on:blur
39
+ on:mouseenter
40
+ on:mouseleave />
41
+ {/if}
42
+ </div>
43
+ <slot name="extra" />
44
44
  </Frame>
package/index.d.ts CHANGED
@@ -43,8 +43,8 @@ export { default as ArrowKeyDown } from './kbd/ArrowKeyDown.svelte';
43
43
  export { default as ArrowKeyLeft } from './kbd/ArrowKeyLeft.svelte';
44
44
  export { default as ArrowKeyRight } from './kbd/ArrowKeyRight.svelte';
45
45
  export { default as ArrowKeyUp } from './kbd/ArrowKeyUp.svelte';
46
- export { default as List } from './list-group/List.svelte';
47
- export { default as ListItem } from './list-group/ListItem.svelte';
46
+ export { default as Listgroup } from './list-group/Listgroup.svelte';
47
+ export { default as ListgroupItem } from './list-group/ListgroupItem.svelte';
48
48
  export { default as Modal } from './modals/Modal.svelte';
49
49
  export { default as MegaMenu } from './megamenu/MegaMenu.svelte';
50
50
  export { default as Navbar } from './navbar/Navbar.svelte';
@@ -108,15 +108,17 @@ export { default as ToolbarGroup } from './toolbar/ToolbarGroup.svelte';
108
108
  export { default as Tooltip } from './tooltips/Tooltip.svelte';
109
109
  export { default as A } from './typography/A.svelte';
110
110
  export { default as Blockquote } from './typography/Blockquote.svelte';
111
+ export { default as DescriptionList } from './typography/DescriptionList.svelte';
111
112
  export { default as Heading } from './typography/Heading.svelte';
112
- export { default as Highlight } from './typography/Highlight.svelte';
113
113
  export { default as Hr } from './typography/Hr.svelte';
114
114
  export { default as Img } from './typography/Img.svelte';
115
+ export { default as Layout } from './typography/Layout.svelte';
116
+ export { default as Li } from './typography/Li.svelte';
115
117
  export { default as Mark } from './typography/Mark.svelte';
118
+ export { default as List } from './typography/List.svelte';
116
119
  export { default as P } from './typography/P.svelte';
117
120
  export { default as Secondary } from './typography/Secondary.svelte';
118
- export { default as TextGradient } from './typography/TextGradient.svelte';
119
- export { default as Underline } from './typography/Underline.svelte';
121
+ export { default as Span } from './typography/Span.svelte';
120
122
  export { default as CloseButton } from './utils/CloseButton.svelte';
121
123
  export { default as ChevronDown } from './utils/ChevronDown.svelte';
122
124
  export { default as ChevronLeft } from './utils/ChevronLeft.svelte';
package/index.js CHANGED
@@ -59,8 +59,8 @@ export { default as ArrowKeyLeft } from './kbd/ArrowKeyLeft.svelte';
59
59
  export { default as ArrowKeyRight } from './kbd/ArrowKeyRight.svelte';
60
60
  export { default as ArrowKeyUp } from './kbd/ArrowKeyUp.svelte';
61
61
  // List
62
- export { default as List } from './list-group/List.svelte';
63
- export { default as ListItem } from './list-group/ListItem.svelte';
62
+ export { default as Listgroup } from './list-group/Listgroup.svelte';
63
+ export { default as ListgroupItem } from './list-group/ListgroupItem.svelte';
64
64
  // Modals
65
65
  export { default as Modal } from './modals/Modal.svelte';
66
66
  // MegaMenu
@@ -141,15 +141,17 @@ export { default as Tooltip } from './tooltips/Tooltip.svelte';
141
141
  // Typography
142
142
  export { default as A } from './typography/A.svelte';
143
143
  export { default as Blockquote } from './typography/Blockquote.svelte';
144
+ export { default as DescriptionList } from './typography/DescriptionList.svelte';
144
145
  export { default as Heading } from './typography/Heading.svelte';
145
- export { default as Highlight } from './typography/Highlight.svelte';
146
146
  export { default as Hr } from './typography/Hr.svelte';
147
147
  export { default as Img } from './typography/Img.svelte';
148
+ export { default as Layout } from './typography/Layout.svelte';
149
+ export { default as Li } from './typography/Li.svelte';
148
150
  export { default as Mark } from './typography/Mark.svelte';
151
+ export { default as List } from './typography/List.svelte';
149
152
  export { default as P } from './typography/P.svelte';
150
153
  export { default as Secondary } from './typography/Secondary.svelte';
151
- export { default as TextGradient } from './typography/TextGradient.svelte';
152
- export { default as Underline } from './typography/Underline.svelte';
154
+ export { default as Span } from './typography/Span.svelte';
153
155
  // utils
154
156
  export { default as CloseButton } from './utils/CloseButton.svelte';
155
157
  export { default as ChevronDown } from './utils/ChevronDown.svelte';
@@ -1,6 +1,6 @@
1
1
  <script>import { setContext } from 'svelte';
2
2
  import classNames from 'classnames';
3
- import ListItem from './ListItem.svelte';
3
+ import ListgroupItem from './ListgroupItem.svelte';
4
4
  import Frame from '../utils/Frame.svelte';
5
5
  export let items = [];
6
6
  export let active = false;
@@ -10,9 +10,9 @@ $: groupClass = classNames('divide-y divide-gray-200 dark:divide-gray-600', $$pr
10
10
  </script>
11
11
 
12
12
  <Frame tag={active ? 'div' : 'ul'} rounded border class={groupClass}>
13
- {#each items as item, index}
14
- <ListItem {active} {...item} {index} on:click><slot {item} {index} /></ListItem>
15
- {:else}
16
- <slot />
17
- {/each}
13
+ {#each items as item, index}
14
+ <ListgroupItem {active} {...item} {index} on:click><slot {item} {index} /></ListgroupItem>
15
+ {:else}
16
+ <slot />
17
+ {/each}
18
18
  </Frame>
@@ -0,0 +1,23 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { ListGroupItemType } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ [x: string]: any;
6
+ items?: ListGroupItemType[];
7
+ active?: boolean;
8
+ };
9
+ events: {
10
+ click: CustomEvent<any>;
11
+ } & {
12
+ [evt: string]: CustomEvent<any>;
13
+ };
14
+ slots: {
15
+ default: {};
16
+ };
17
+ };
18
+ export declare type ListgroupProps = typeof __propDef.props;
19
+ export declare type ListgroupEvents = typeof __propDef.events;
20
+ export declare type ListgroupSlots = typeof __propDef.slots;
21
+ export default class Listgroup extends SvelteComponentTyped<ListgroupProps, ListgroupEvents, ListgroupSlots> {
22
+ }
23
+ export {};
@@ -27,9 +27,9 @@ declare const __propDef: {
27
27
  };
28
28
  };
29
29
  };
30
- export declare type ListItemProps = typeof __propDef.props;
31
- export declare type ListItemEvents = typeof __propDef.events;
32
- export declare type ListItemSlots = typeof __propDef.slots;
33
- export default class ListItem extends SvelteComponentTyped<ListItemProps, ListItemEvents, ListItemSlots> {
30
+ export declare type ListgroupItemProps = typeof __propDef.props;
31
+ export declare type ListgroupItemEvents = typeof __propDef.events;
32
+ export declare type ListgroupItemSlots = typeof __propDef.slots;
33
+ export default class ListgroupItem extends SvelteComponentTyped<ListgroupItemProps, ListgroupItemEvents, ListgroupItemSlots> {
34
34
  }
35
35
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.26.4",
3
+ "version": "0.26.7",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -151,8 +151,8 @@
151
151
  "./kbd/ArrowKeyRight.svelte": "./kbd/ArrowKeyRight.svelte",
152
152
  "./kbd/ArrowKeyUp.svelte": "./kbd/ArrowKeyUp.svelte",
153
153
  "./kbd/Kbd.svelte": "./kbd/Kbd.svelte",
154
- "./list-group/List.svelte": "./list-group/List.svelte",
155
- "./list-group/ListItem.svelte": "./list-group/ListItem.svelte",
154
+ "./list-group/Listgroup.svelte": "./list-group/Listgroup.svelte",
155
+ "./list-group/ListgroupItem.svelte": "./list-group/ListgroupItem.svelte",
156
156
  "./megamenu/MegaMenu.svelte": "./megamenu/MegaMenu.svelte",
157
157
  "./modals/Modal.svelte": "./modals/Modal.svelte",
158
158
  "./navbar/Menu.svelte": "./navbar/Menu.svelte",
@@ -220,14 +220,18 @@
220
220
  "./types": "./types.js",
221
221
  "./typography/A.svelte": "./typography/A.svelte",
222
222
  "./typography/Blockquote.svelte": "./typography/Blockquote.svelte",
223
+ "./typography/DescriptionList.svelte": "./typography/DescriptionList.svelte",
223
224
  "./typography/Heading.svelte": "./typography/Heading.svelte",
224
- "./typography/Highlight.svelte": "./typography/Highlight.svelte",
225
225
  "./typography/Hr.svelte": "./typography/Hr.svelte",
226
226
  "./typography/Img.svelte": "./typography/Img.svelte",
227
+ "./typography/Layout.svelte": "./typography/Layout.svelte",
228
+ "./typography/Li.svelte": "./typography/Li.svelte",
229
+ "./typography/List.svelte": "./typography/List.svelte",
227
230
  "./typography/Mark.svelte": "./typography/Mark.svelte",
228
231
  "./typography/P.svelte": "./typography/P.svelte",
229
232
  "./typography/Secondary.svelte": "./typography/Secondary.svelte",
230
- "./typography/TextGradient.svelte": "./typography/TextGradient.svelte",
233
+ "./typography/Span.svelte": "./typography/Span.svelte",
234
+ "./typography/Ul.svelte": "./typography/Ul.svelte",
231
235
  "./typography/Underline.svelte": "./typography/Underline.svelte",
232
236
  "./utils/ChevronDown.svelte": "./utils/ChevronDown.svelte",
233
237
  "./utils/ChevronLeft.svelte": "./utils/ChevronLeft.svelte",
@@ -2,9 +2,8 @@
2
2
  export let href = '#';
3
3
  export let textColor = 'text-blue-600 dark:text-blue-500';
4
4
  export let aClass = 'inline-flex items-center hover:underline';
5
- export let textSize = 'text-lg';
6
5
  </script>
7
6
 
8
- <a {href} class={classNames(aClass, textColor, textSize, $$props.class)}>
7
+ <a {href} class={classNames(aClass, textColor, $$props.class)}>
9
8
  <slot />
10
9
  </a>
@@ -5,7 +5,6 @@ declare const __propDef: {
5
5
  href?: string;
6
6
  textColor?: string;
7
7
  aClass?: string;
8
- textSize?: string;
9
8
  };
10
9
  events: {
11
10
  [evt: string]: CustomEvent<any>;
@@ -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>;
@@ -0,0 +1,10 @@
1
+ <script>import classNames from 'classnames';
2
+ export let tag;
3
+ export let dtClass = 'text-gray-500 md:text-lg dark:text-gray-400';
4
+ export let ddClass = 'text-lg font-semibold';
5
+ let classDesc = classNames(tag === 'dt' ? dtClass : ddClass, $$props.class);
6
+ </script>
7
+
8
+ <svelte:element this={tag} class={classDesc}>
9
+ <slot />
10
+ </svelte:element>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ tag: 'dt' | 'dd';
6
+ dtClass?: string;
7
+ ddClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type DescriptionListProps = typeof __propDef.props;
17
+ export declare type DescriptionListEvents = typeof __propDef.events;
18
+ export declare type DescriptionListSlots = typeof __propDef.slots;
19
+ export default class DescriptionList extends SvelteComponentTyped<DescriptionListProps, DescriptionListEvents, DescriptionListSlots> {
20
+ }
21
+ export {};
@@ -13,8 +13,7 @@ const textSizes = {
13
13
  </script>
14
14
 
15
15
  <svelte:element
16
- this={tag}
17
- class={classNames(customSize ? customSize : textSizes[tag], textColor, 'w-full', $$props.class)}
18
- >
19
- <slot />
16
+ this={tag}
17
+ class={classNames(customSize ? customSize : textSizes[tag], textColor, 'w-full', $$props.class)}>
18
+ <slot />
20
19
  </svelte:element>
@@ -0,0 +1,10 @@
1
+ <script>import classNames from 'classnames';
2
+ export let divClass = 'grid';
3
+ export let cols = 'grid-cols-1 sm:grid-cols-2';
4
+ export let gap;
5
+ let classDiv = classNames(divClass, 'gap-' + String(gap), cols);
6
+ </script>
7
+
8
+ <div class={classDiv}>
9
+ <slot />
10
+ </div>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ divClass?: string;
5
+ cols?: string;
6
+ gap: number;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export declare type LayoutProps = typeof __propDef.props;
16
+ export declare type LayoutEvents = typeof __propDef.events;
17
+ export declare type LayoutSlots = typeof __propDef.slots;
18
+ export default class Layout extends SvelteComponentTyped<LayoutProps, LayoutEvents, LayoutSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,9 @@
1
+ <script>import classNames from 'classnames';
2
+ export let icon = false;
3
+ export let liClass = '';
4
+ let classLi = classNames(liClass, icon && 'flex items-center', $$props.class);
5
+ </script>
6
+
7
+ <li class={classLi}>
8
+ <slot />
9
+ </li>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ icon?: boolean;
6
+ liClass?: string;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export declare type LiProps = typeof __propDef.props;
16
+ export declare type LiEvents = typeof __propDef.events;
17
+ export declare type LiSlots = typeof __propDef.slots;
18
+ export default class Li extends SvelteComponentTyped<LiProps, LiEvents, LiSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,23 @@
1
+ <script>import classNames from 'classnames';
2
+ export let tag = 'ul';
3
+ export let list = 'disc';
4
+ export let position = 'inside';
5
+ export let color = 'text-gray-500 dark:text-gray-400';
6
+ export let olClass = 'list-decimal list-inside';
7
+ export let ulClass = 'max-w-md';
8
+ export let dlClass = 'max-w-md divide-y divide-gray-200 dark:divide-gray-700';
9
+ let lists = {
10
+ disc: 'list-disc',
11
+ none: 'list-none',
12
+ decimal: 'list-decimal'
13
+ };
14
+ let positions = {
15
+ inside: 'list-inside',
16
+ outside: 'list-outside'
17
+ };
18
+ let classList = classNames(color, tag === 'ul' ? ulClass : 'ol' ? olClass : dlClass, lists[list], positions[position], $$props.class);
19
+ </script>
20
+
21
+ <svelte:element this={tag} class={classList}>
22
+ <slot />
23
+ </svelte:element>
@@ -1,14 +1,16 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { ListGroupItemType } from '../types';
3
2
  declare const __propDef: {
4
3
  props: {
5
4
  [x: string]: any;
6
- items?: ListGroupItemType[];
7
- active?: boolean;
5
+ tag?: 'ul' | 'ol' | 'dl';
6
+ list?: 'disc' | 'none' | 'decimal';
7
+ position?: 'inside' | 'outside';
8
+ color?: string;
9
+ olClass?: string;
10
+ ulClass?: string;
11
+ dlClass?: string;
8
12
  };
9
13
  events: {
10
- click: CustomEvent<any>;
11
- } & {
12
14
  [evt: string]: CustomEvent<any>;
13
15
  };
14
16
  slots: {
@@ -1,9 +1,77 @@
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 firstupper = false;
8
+ export let upperClass = 'first-line:uppercase first-line:tracking-widest first-letter:text-7xl first-letter:font-bold first-letter:text-gray-900 dark:first-letter:text-gray-100 first-letter:mr-3 first-letter:float-left';
9
+ export let opacity;
10
+ export let whitespace = 'normal';
11
+ export let size = 'base';
12
+ export let space;
13
+ export let weight;
14
+ const sizes = {
15
+ xs: 'text-xs',
16
+ sm: 'text-sm',
17
+ base: 'text-base',
18
+ lg: 'text-lg',
19
+ xl: 'text-xl',
20
+ '2xl': 'text-2xl',
21
+ '3xl': 'text-3xl',
22
+ '4xl': 'text-4xl',
23
+ '5xl': 'text-5xl',
24
+ '6xl': 'text-6xl',
25
+ '7xl': 'text-7xl',
26
+ '8xl': 'text-8xl',
27
+ '9xl': 'text-9xl'
28
+ };
29
+ const weights = {
30
+ thin: 'font-thin',
31
+ extralight: 'font-extralight',
32
+ light: 'font-light',
33
+ normal: 'font-normal',
34
+ medium: 'font-medium',
35
+ semibold: 'font-semibold',
36
+ bold: 'font-bold',
37
+ extrabold: 'font-extrabold',
38
+ black: 'font-black'
39
+ };
40
+ const spaces = {
41
+ tighter: 'tracking-tighter',
42
+ tight: 'tracking-tight',
43
+ normal: 'tracking-normal',
44
+ wide: 'tracking-wide',
45
+ wider: 'tracking-wider',
46
+ widest: 'tracking-widest'
47
+ };
48
+ const heights = {
49
+ normal: 'leading-normal',
50
+ relaxed: 'leading-relaxed',
51
+ loose: 'leading-loose'
52
+ };
53
+ const aligns = {
54
+ left: 'text-left',
55
+ center: 'text-center',
56
+ right: 'text-right'
57
+ };
58
+ const whitespaces = {
59
+ normal: 'whitespace-normal',
60
+ nowrap: 'whitespace-nowrap',
61
+ pre: 'whitespace-pre',
62
+ preline: 'whitespace-pre-line',
63
+ prewrap: 'whitespace-pre-wrap'
64
+ };
65
+ let colorAndopacity = color
66
+ .split(' ')
67
+ .map((element) => element.trim())
68
+ .map((element) => element + '/' + String(opacity))
69
+ .join(' ');
70
+ // console.log('colorArr', colorAndopacity);
71
+ // console.log(typeof colorAndopacity);
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);
5
73
  </script>
6
74
 
7
- <p class={classNames(pClass, size, textColor, $$props.class)}>
8
- <slot />
75
+ <p class={classP}>
76
+ <slot />
9
77
  </p>
@@ -2,9 +2,18 @@ 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
+ firstupper?: boolean;
11
+ upperClass?: string;
12
+ opacity: number;
13
+ whitespace?: 'normal' | 'nowrap' | 'pre' | 'preline' | 'prewrap';
14
+ size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
15
+ space: 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
16
+ weight: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
8
17
  };
9
18
  events: {
10
19
  [evt: string]: CustomEvent<any>;
@@ -0,0 +1,17 @@
1
+ <script>import classNames from 'classnames';
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);
13
+ </script>
14
+
15
+ <span class={classSpan}>
16
+ <slot />
17
+ </span>
@@ -0,0 +1,27 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
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;
14
+ };
15
+ events: {
16
+ [evt: string]: CustomEvent<any>;
17
+ };
18
+ slots: {
19
+ default: {};
20
+ };
21
+ };
22
+ export declare type SpanProps = typeof __propDef.props;
23
+ export declare type SpanEvents = typeof __propDef.events;
24
+ export declare type SpanSlots = typeof __propDef.slots;
25
+ export default class Span extends SvelteComponentTyped<SpanProps, SpanEvents, SpanSlots> {
26
+ }
27
+ export {};
@@ -0,0 +1,20 @@
1
+ <script>import classNames from 'classnames';
2
+ export let list = 'disc';
3
+ export let position = 'inside';
4
+ export let ulClass = 'max-w-md text-gray-500 dark:text-gray-400';
5
+ let lists = {
6
+ disc: 'list-disc',
7
+ none: 'list-none',
8
+ decimal: 'list-decimal'
9
+ };
10
+ let positions = {
11
+ inside: 'list-inside',
12
+ outside: 'list-outside'
13
+ };
14
+ let classUl = classNames(ulClass, lists[list], positions[position], $$props.class);
15
+ console.log('list', list);
16
+ </script>
17
+
18
+ <ul class={classUl} {list}>
19
+ <slot />
20
+ </ul>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ list?: 'disc' | 'none' | 'decimal';
6
+ position?: 'inside' | 'outside';
7
+ ulClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type UlProps = typeof __propDef.props;
17
+ export declare type UlEvents = typeof __propDef.events;
18
+ export declare type UlSlots = typeof __propDef.slots;
19
+ export default class Ul extends SvelteComponentTyped<UlProps, UlEvents, UlSlots> {
20
+ }
21
+ export {};
@@ -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 {};