flowbite-svelte 0.26.4 → 0.26.5

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,24 @@
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.5](https://github.com/themesberg/flowbite-svelte/compare/v0.26.4...v0.26.5) (2022-09-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * add DescriptionList, List, Span components ([495b61e](https://github.com/themesberg/flowbite-svelte/commit/495b61eb0d81eb9ae06a34fa981dd42a81983ea6))
11
+ * add Ul, Li, Span component ([86d8b66](https://github.com/themesberg/flowbite-svelte/commit/86d8b661f2524f25162a99b6d3b8df761a85b01b))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * blockquote page formating ([1641d45](https://github.com/themesberg/flowbite-svelte/commit/1641d45bdc032c01cd201967bf362d9f8a19a422))
17
+ * Heading to the original code ([5604da5](https://github.com/themesberg/flowbite-svelte/commit/5604da5f348420f8878e44d591e9a8704b23e4a0))
18
+ * List in cards page to Listgroup ([b8e05f4](https://github.com/themesberg/flowbite-svelte/commit/b8e05f4f97fbbb0236872b2b5f18f0928c34ad55))
19
+ * rebase merge conflict Alert.svelte ([38df84a](https://github.com/themesberg/flowbite-svelte/commit/38df84a21124d3d3c3c1d716ff21bd678b156b09))
20
+ * removed Ol component ([569f2e3](https://github.com/themesberg/flowbite-svelte/commit/569f2e3a51a59abba641c669949b4b5372c56a01))
21
+ * rename List to Listgroup and ListItem to ListgroupItem ([1b70110](https://github.com/themesberg/flowbite-svelte/commit/1b7011062a729452604b3a0dd1ed54f28ab49132))
22
+
5
23
  ### [0.26.4](https://github.com/themesberg/flowbite-svelte/compare/v0.26.3...v0.26.4) (2022-09-02)
6
24
 
7
25
 
@@ -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,13 +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
113
  export { default as Highlight } from './typography/Highlight.svelte';
113
114
  export { default as Hr } from './typography/Hr.svelte';
114
115
  export { default as Img } from './typography/Img.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';
121
+ export { default as Span } from './typography/Span.svelte';
118
122
  export { default as TextGradient } from './typography/TextGradient.svelte';
119
123
  export { default as Underline } from './typography/Underline.svelte';
120
124
  export { default as CloseButton } from './utils/CloseButton.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,13 +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
146
  export { default as Highlight } from './typography/Highlight.svelte';
146
147
  export { default as Hr } from './typography/Hr.svelte';
147
148
  export { default as Img } from './typography/Img.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';
154
+ export { default as Span } from './typography/Span.svelte';
151
155
  export { default as TextGradient } from './typography/TextGradient.svelte';
152
156
  export { default as Underline } from './typography/Underline.svelte';
153
157
  // utils
@@ -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.5",
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,19 @@
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
225
  "./typography/Highlight.svelte": "./typography/Highlight.svelte",
225
226
  "./typography/Hr.svelte": "./typography/Hr.svelte",
226
227
  "./typography/Img.svelte": "./typography/Img.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",
233
+ "./typography/Span.svelte": "./typography/Span.svelte",
230
234
  "./typography/TextGradient.svelte": "./typography/TextGradient.svelte",
235
+ "./typography/Ul.svelte": "./typography/Ul.svelte",
231
236
  "./typography/Underline.svelte": "./typography/Underline.svelte",
232
237
  "./utils/ChevronDown.svelte": "./utils/ChevronDown.svelte",
233
238
  "./utils/ChevronLeft.svelte": "./utils/ChevronLeft.svelte",
@@ -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,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: {
@@ -0,0 +1,7 @@
1
+ <script>import classNames from 'classnames';
2
+ export let classSpan = classNames('font-semibold text-gray-900 dark:text-white', $$props.class);
3
+ </script>
4
+
5
+ <span class={classSpan}>
6
+ <slot />
7
+ </span>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ classSpan?: string;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export declare type SpanProps = typeof __propDef.props;
15
+ export declare type SpanEvents = typeof __propDef.events;
16
+ export declare type SpanSlots = typeof __propDef.slots;
17
+ export default class Span extends SvelteComponentTyped<SpanProps, SpanEvents, SpanSlots> {
18
+ }
19
+ 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 {};