flowbite-svelte 0.13.1 → 0.13.4

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,4 +2,16 @@
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.13.4](https://github.com/shinokada/flowbite-svelte/compare/v0.13.2...v0.13.4) (2022-04-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add sitemap footer darkmode ([72fe322](https://github.com/shinokada/flowbite-svelte/commit/72fe3227e472187101c12ef89e10ada77624fc25))
11
+ * enable scrolling in modals (fixes [#23](https://github.com/shinokada/flowbite-svelte/issues/23)) ([8e60319](https://github.com/shinokada/flowbite-svelte/commit/8e603198988a3a03a56414f4e26143bb54ff0c92))
12
+ * removed prismjs from package.json and layouts ([dd9ad11](https://github.com/shinokada/flowbite-svelte/commit/dd9ad110193e176ad8127f9c556105d3da854b26))
13
+ * sidebar menu covers screen and it doesn't allow to click any links ([879c886](https://github.com/shinokada/flowbite-svelte/commit/879c886b5134908f1e4e9365c13df9bae372acd0))
14
+ * update sidebar menu to close after clicking a link ([ae9a36c](https://github.com/shinokada/flowbite-svelte/commit/ae9a36c2d9705c664de91a6870b7603ccffbece2))
15
+ * update sidebar menu to close it when you click outside of the sidebar ([30c6026](https://github.com/shinokada/flowbite-svelte/commit/30c6026f8f5fec945e97de18585f5665ca6ddbae))
16
+
5
17
  ### [0.12.6](https://github.com/shinokada/flowbite-svelte/compare/v0.12.5...v0.12.6) (2022-04-05)
package/README.md CHANGED
@@ -123,6 +123,10 @@
123
123
  - [Multiple Interactive Tabs](https://flowbite-svelte.vercel.app/tabs/multiple-interactive-tabs)
124
124
  - [Pill Tabs](https://flowbite-svelte.vercel.app/tabs/pilltabs)
125
125
 
126
+ ## Table components
127
+
128
+ - [Tables](https://flowbite-svelte.vercel.app/tables)
129
+
126
130
  ## Timeline components
127
131
 
128
132
  - [Default timeline](https://flowbite-svelte.vercel.app/timelines/default)
@@ -140,3 +144,10 @@
140
144
  - [Default Tooltip](https://flowbite-svelte.vercel.app/tooltips/default)
141
145
  - [Light Tooltip](https://flowbite-svelte.vercel.app/tooltips/light)
142
146
 
147
+ ## Tests
148
+
149
+ Run:
150
+
151
+ ```sh
152
+ npm run test
153
+ ```
@@ -1,4 +1,4 @@
1
- <script >export let avatar;
1
+ <script >export let avatar = {};
2
2
  let isCircle = avatar.round ? 'rounded-full' : 'rounded';
3
3
  let isBorder = avatar.border ? 'p-1 ring-2 ring-gray-300 dark:ring-gray-500' : '';
4
4
  export let avatarClass = `w-${avatar.size} h-${avatar.size} ${isCircle} ${isBorder}`;
@@ -2,7 +2,7 @@ import { SvelteComponentTyped } from "svelte";
2
2
  import type { AvatarType } from '../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
- avatar: AvatarType;
5
+ avatar?: AvatarType;
6
6
  avatarClass?: string;
7
7
  placehoder?: boolean;
8
8
  };
@@ -1,11 +1,11 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { DropdownType, Colors } from '../types';
2
+ import type { DropdownType, DropdownColorType } from '../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  label?: string;
6
6
  rounded?: boolean;
7
7
  textSize?: string;
8
- color?: Colors;
8
+ color?: DropdownColorType;
9
9
  items: DropdownType[];
10
10
  };
11
11
  events: {
@@ -1,45 +1,45 @@
1
1
  <script >export let site;
2
2
  export let links;
3
3
  export let socialMedia;
4
- export let footerClass = 'bg-gray-800';
4
+ export let footerClass = 'bg-white dark:bg-gray-800';
5
5
  export let linksClass = 'grid grid-cols-2 gap-8 py-8 px-6 md:grid-cols-4';
6
- export let parentClass = 'mb-6 text-sm font-semibold text-gray-400 uppercase';
7
- export let ulClass = 'text-gray-300';
6
+ export let parentClass = 'mb-6 text-sm font-semibold dark:text-gray-400 uppercase';
7
+ export let ulClass = 'text-gray-900 dark:text-gray-300';
8
8
  export let linkClass = 'hover:underline';
9
- export let copyrightDivClass = 'py-6 px-4 bg-gray-700 md:flex md:items-center md:justify-between';
10
- export let copyrightClass = 'text-sm text-gray-300 sm:text-center';
9
+ export let copyrightDivClass = 'py-6 px-4 text-gray-900 dark:bg-gray-700 md:flex md:items-center md:justify-between';
10
+ export let copyrightClass = 'text-sm text-gray-900 dark:text-gray-300 sm:text-center';
11
11
  export let socialMediaDivClass = 'flex mt-4 space-x-6 sm:justify-center md:mt-0';
12
- export let socialMediaLinkClass = 'text-gray-400 hover:text-white';
12
+ export let socialMediaLinkClass = 'text-gray-900 dark:text-gray-400 hover:text-gray-300 dark:hover:text-white';
13
13
  export let iconClass = 'h-5 w-5 mr-2';
14
14
  export let copyrightYear = '© 2022';
15
15
  export let allRightsReserved = 'All Rights Reserved.';
16
16
  </script>
17
17
 
18
18
  <footer class="{footerClass} {$$props.class}">
19
- <div class={linksClass}>
20
- {#each links as { parent, children }}
21
- <div>
22
- <h2 class={parentClass}>
23
- {parent}
24
- </h2>
25
- <ul class={ulClass}>
26
- {#each children as { name, href }}
27
- <li class="mb-4">
28
- <a {href} class={linkClass}>{name}</a>
29
- </li>
30
- {/each}
31
- </ul>
32
- </div>
33
- {/each}
34
- </div>
35
- <div class={copyrightDivClass}>
36
- <span class={copyrightClass}>{copyrightYear} <a href={site.href}>{site.name}</a>. {allRightsReserved} </span>
37
- <div class={socialMediaDivClass}>
38
- {#each socialMedia as { href, icon }}
39
- <a {href} class={socialMediaLinkClass}>
40
- <svelte:component this={icon} className={iconClass} />
41
- </a>
42
- {/each}
43
- </div>
44
- </div>
19
+ <div class={linksClass}>
20
+ {#each links as { parent, children }}
21
+ <div>
22
+ <h2 class={parentClass}>
23
+ {parent}
24
+ </h2>
25
+ <ul class={ulClass}>
26
+ {#each children as { name, href }}
27
+ <li class="mb-4">
28
+ <a {href} class={linkClass}>{name}</a>
29
+ </li>
30
+ {/each}
31
+ </ul>
32
+ </div>
33
+ {/each}
34
+ </div>
35
+ <div class={copyrightDivClass}>
36
+ <span class={copyrightClass}>{copyrightYear} <a href={site.href}>{site.name}</a>. {allRightsReserved} </span>
37
+ <div class={socialMediaDivClass}>
38
+ {#each socialMedia as { href, icon }}
39
+ <a {href} class={socialMediaLinkClass}>
40
+ <svelte:component this={icon} className={iconClass} />
41
+ </a>
42
+ {/each}
43
+ </div>
44
+ </div>
45
45
  </footer>
@@ -139,8 +139,17 @@ else {
139
139
  </script>
140
140
 
141
141
  {#if showModalId === id}
142
- <div {id} role="dialog" aria-modal="true" class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center">
143
- <div class="relative px-4 w-full max-w-7xl h-full md:h-auto">
142
+ <div
143
+ on:click={closeModal}
144
+ class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
145
+ >
146
+ <!-- Main modal -->
147
+ <div
148
+ on:click|stopPropagation={() => {}}
149
+ role="dialog"
150
+ aria-modal="true"
151
+ class="mx-auto my-20 px-4 w-full max-w-7xl h-full md:h-auto"
152
+ >
144
153
  <!-- Modal content -->
145
154
  <div class={divClass}>
146
155
  <!-- Modal header -->
@@ -170,6 +179,4 @@ else {
170
179
  </div>
171
180
  </div>
172
181
  </div>
173
-
174
- <div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
175
182
  {/if}
@@ -140,8 +140,16 @@ else {
140
140
 
141
141
  {#if showModalId === id}
142
142
  <!-- Large Modal -->
143
- <div {id} role="dialog" aria-modal="true" class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center">
144
- <div class="relative px-4 w-full max-w-4xl h-full md:h-auto">
143
+ <div
144
+ on:click={closeModal}
145
+ class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
146
+ >
147
+ <div
148
+ on:click|stopPropagation={() => {}}
149
+ role="dialog"
150
+ aria-modal="true"
151
+ class="mx-auto my-20 px-4 w-full max-w-4xl h-full md:h-auto"
152
+ >
145
153
  <!-- Modal content -->
146
154
  <div class={divClass}>
147
155
  <!-- Modal header -->
@@ -171,6 +179,4 @@ else {
171
179
  </div>
172
180
  </div>
173
181
  </div>
174
-
175
- <div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
176
182
  {/if}
@@ -140,9 +140,17 @@ else {
140
140
  </script>
141
141
 
142
142
  {#if showModalId === id}
143
- <!-- Main modal -->
144
- <div {id} role="dialog" aria-modal="true" class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center">
145
- <div class="relative px-4 w-full max-w-2xl h-full md:h-auto">
143
+ <!-- Medium modal -->
144
+ <div
145
+ on:click={closeModal}
146
+ class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
147
+ >
148
+ <div
149
+ on:click|stopPropagation={() => {}}
150
+ role="dialog"
151
+ aria-modal="true"
152
+ class="mx-auto my-20 px-4 w-full max-w-2xl h-full md:h-auto"
153
+ >
146
154
  <!-- Modal content -->
147
155
  <div class={divClass}>
148
156
  <!-- Modal header -->
@@ -174,6 +182,4 @@ else {
174
182
  </div>
175
183
  </div>
176
184
  </div>
177
-
178
- <div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
179
185
  {/if}
@@ -45,9 +45,18 @@ else {
45
45
  </script>
46
46
 
47
47
  {#if showModalId === id}
48
- <div {id} role="dialog" aria-modal="true" class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center">
49
- <div class="relative px-4 w-full max-w-md h-full md:h-auto">
50
- <div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
48
+ <div
49
+ on:click={closeModal}
50
+ class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
51
+ >
52
+ <!-- Main modal -->
53
+ <div
54
+ on:click|stopPropagation={() => {}}
55
+ role="dialog"
56
+ aria-modal="true"
57
+ class="mx-auto my-20 px-4 w-full max-w-md h-full md:h-auto"
58
+ >
59
+ <div class="bg-white rounded-lg shadow dark:bg-gray-700">
51
60
  <div class="flex justify-end p-2">
52
61
  <button type="button" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white" on:click={closeModal}>
53
62
  <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
@@ -90,5 +99,4 @@ else {
90
99
  </div>
91
100
  </div>
92
101
  </div>
93
- <div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
94
102
  {/if}
@@ -140,8 +140,16 @@ else {
140
140
 
141
141
  {#if showModalId === id}
142
142
  <!-- Small Modal Component -->
143
- <div {id} role="dialog" aria-modal="true" class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center">
144
- <div class="relative px-4 w-full max-w-md h-full md:h-auto">
143
+ <div
144
+ on:click={closeModal}
145
+ class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full overflow-auto"
146
+ >
147
+ <div
148
+ on:click|stopPropagation={() => {}}
149
+ role="dialog"
150
+ aria-modal="true"
151
+ class="mx-auto my-20 px-4 w-full max-w-md h-full md:h-auto"
152
+ >
145
153
  <!-- Modal content -->
146
154
  <div class={divClass}>
147
155
  <!-- Modal header -->
@@ -171,6 +179,4 @@ else {
171
179
  </div>
172
180
  </div>
173
181
  </div>
174
-
175
- <div on:click={closeModal} class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full" />
176
182
  {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.13.1",
3
+ "version": "0.13.4",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "./package/index.js",
6
6
  "author": {
@@ -12,7 +12,7 @@
12
12
  "homepage": "https://github.com/shinokada/flowbite-svelte",
13
13
  "license": "MIT",
14
14
  "devDependencies": {
15
- "@codewithshin/svelte-sidebar": "^0.4.2",
15
+ "@codewithshin/svelte-sidebar": "^0.4.7",
16
16
  "@codewithshin/svelte-simpleicons": "^0.2.2",
17
17
  "@codewithshin/svelte-utterances": "^0.1.2",
18
18
  "@playwright/test": "^1.19.1",
@@ -30,7 +30,6 @@
30
30
  "prettier": "^2.5.1",
31
31
  "prettier-plugin-svelte": "^2.5.0",
32
32
  "prism-themes": "^1.9.0",
33
- "prismjs": "^1.27.0",
34
33
  "svelte": "^3.44.0",
35
34
  "svelte-check": "^2.2.6",
36
35
  "svelte-preprocess": "^4.10.1",
@@ -48,15 +47,25 @@
48
47
  "ui",
49
48
  "accordion",
50
49
  "alert",
50
+ "avatar",
51
51
  "badges",
52
+ "button-groups",
52
53
  "buttons",
53
54
  "cards",
54
55
  "darkmode",
55
56
  "footer",
57
+ "forms",
58
+ "list group",
56
59
  "modals",
57
60
  "navbar",
61
+ "paginations",
62
+ "progress bars",
63
+ "sidebars",
58
64
  "spinners",
65
+ "tables",
59
66
  "tabs",
67
+ "timelines",
68
+ "toasts",
60
69
  "tooltip"
61
70
  ],
62
71
  "repository": {
@@ -137,6 +146,8 @@
137
146
  "./spinners/Spinner.svelte": "./spinners/Spinner.svelte",
138
147
  "./spinners/SpinnerButton.svelte": "./spinners/SpinnerButton.svelte",
139
148
  "./tables/Table.svelte": "./tables/Table.svelte",
149
+ "./tables/TableCheckbox.svelte": "./tables/TableCheckbox.svelte",
150
+ "./tables/TableCheckboxRow.svelte": "./tables/TableCheckboxRow.svelte",
140
151
  "./tables/TableDefaultRow.svelte": "./tables/TableDefaultRow.svelte",
141
152
  "./tabs/DefaultTabs.svelte": "./tabs/DefaultTabs.svelte",
142
153
  "./tabs/FullWidthTabs.svelte": "./tabs/FullWidthTabs.svelte",
@@ -5,18 +5,18 @@ export let theadClass = 'text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray
5
5
  </script>
6
6
 
7
7
  <div class={divClass}>
8
- <table class={tableClass}>
9
- <thead class={theadClass}>
10
- <tr>
11
- {#each header as column}
12
- <th scope="col" class="px-6 py-3">
13
- {column}
14
- </th>
15
- {/each}
16
- </tr>
17
- </thead>
18
- <tbody>
19
- <slot />
20
- </tbody>
21
- </table>
8
+ <table class={tableClass}>
9
+ <thead class={theadClass}>
10
+ <tr>
11
+ {#each header as column}
12
+ <th scope="col" class="px-6 py-3">
13
+ {column}
14
+ </th>
15
+ {/each}
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <slot />
20
+ </tbody>
21
+ </table>
22
22
  </div>
@@ -0,0 +1,28 @@
1
+ <script >export let header;
2
+ export let divClass = 'relative overflow-x-auto shadow-md sm:rounded-lg';
3
+ export let tableClass = 'w-full text-sm text-left text-gray-500 dark:text-gray-400';
4
+ export let theadClass = 'text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400';
5
+ </script>
6
+
7
+ <div class={divClass}>
8
+ <table class={tableClass}>
9
+ <thead class={theadClass}>
10
+ <tr>
11
+ <th scope="col" class="p-4">
12
+ <div class="flex items-center">
13
+ <input id="checkbox-all" type="checkbox" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
14
+ <label for="checkbox-all" class="sr-only">checkbox</label>
15
+ </div>
16
+ </th>
17
+ {#each header as column}
18
+ <th scope="col" class="px-6 py-3">
19
+ {column}
20
+ </th>
21
+ {/each}
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <slot />
26
+ </tbody>
27
+ </table>
28
+ </div>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ header: Array<string>;
5
+ divClass?: string;
6
+ tableClass?: string;
7
+ theadClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type TableCheckboxProps = typeof __propDef.props;
17
+ export declare type TableCheckboxEvents = typeof __propDef.events;
18
+ export declare type TableCheckboxSlots = typeof __propDef.slots;
19
+ export default class TableCheckbox extends SvelteComponentTyped<TableCheckboxProps, TableCheckboxEvents, TableCheckboxSlots> {
20
+ }
21
+ export {};
File without changes
@@ -0,0 +1,19 @@
1
+ /** @typedef {typeof __propDef.props} TableCheckboxRowProps */
2
+ /** @typedef {typeof __propDef.events} TableCheckboxRowEvents */
3
+ /** @typedef {typeof __propDef.slots} TableCheckboxRowSlots */
4
+ export default class TableCheckboxRow extends SvelteComponentTyped<{}, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> {
7
+ }
8
+ export type TableCheckboxRowProps = typeof __propDef.props;
9
+ export type TableCheckboxRowEvents = typeof __propDef.events;
10
+ export type TableCheckboxRowSlots = typeof __propDef.slots;
11
+ import { SvelteComponentTyped } from "svelte";
12
+ declare const __propDef: {
13
+ props: {};
14
+ events: {
15
+ [evt: string]: CustomEvent<any>;
16
+ };
17
+ slots: {};
18
+ };
19
+ export {};
@@ -1,15 +1,14 @@
1
1
  <script >export let items;
2
+ export let html = false;
2
3
  export let rowState = undefined;
3
4
  let trClass;
4
5
  let trLastClass;
5
6
  if (rowState === 'striped') {
6
- trClass =
7
- 'border-b dark:bg-gray-800 dark:border-gray-700 odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700';
7
+ trClass = 'border-b dark:bg-gray-800 dark:border-gray-700 odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700';
8
8
  trLastClass = 'odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700';
9
9
  }
10
10
  else if (rowState === 'hover') {
11
- trClass =
12
- 'bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600';
11
+ trClass = 'bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600';
13
12
  trLastClass = 'bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-600';
14
13
  }
15
14
  else {
@@ -19,39 +18,49 @@ else {
19
18
  </script>
20
19
 
21
20
  {#each items as item, i}
22
- {#if i === items.length - 1}
23
- <tr class={trLastClass}>
24
- {#each item as cell, j}
25
- {#if j === 0}
26
- <th
27
- scope="row"
28
- class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap"
29
- >
30
- {@html cell}
31
- </th>
32
- {:else}
33
- <td class="px-6 py-4">
34
- {@html cell}
35
- </td>
36
- {/if}
37
- {/each}
38
- </tr>
39
- {:else}
40
- <tr class={trClass}>
41
- {#each item as cell, j}
42
- {#if j === 0}
43
- <th
44
- scope="row"
45
- class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap"
46
- >
47
- {@html cell}
48
- </th>
49
- {:else}
50
- <td class="px-6 py-4">
51
- {@html cell}
52
- </td>
53
- {/if}
54
- {/each}
55
- </tr>
56
- {/if}
21
+ {#if i === items.length - 1}
22
+ <tr class={trLastClass}>
23
+ {#each item as cell, j}
24
+ {#if j === 0}
25
+ <th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
26
+ {#if html}
27
+ {@html cell}
28
+ {:else}
29
+ {cell}
30
+ {/if}
31
+ </th>
32
+ {:else}
33
+ <td class="px-6 py-4">
34
+ {#if html}
35
+ {@html cell}
36
+ {:else}
37
+ {cell}
38
+ {/if}
39
+ </td>
40
+ {/if}
41
+ {/each}
42
+ </tr>
43
+ {:else}
44
+ <tr class={trClass}>
45
+ {#each item as cell, j}
46
+ {#if j === 0}
47
+ <th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
48
+ {#if html}
49
+ {@html cell}
50
+ {:else}
51
+ {cell}
52
+ {/if}
53
+ </th>
54
+ {:else}
55
+ <td class="px-6 py-4">
56
+ {#if html}
57
+ {@html cell}
58
+ {:else}
59
+ {cell}
60
+ {/if}
61
+ </td>
62
+ {/if}
63
+ {/each}
64
+ </tr>
65
+ {/if}
57
66
  {/each}
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  items: Array<Array<string>>;
5
+ html?: boolean;
5
6
  rowState?: 'striped' | 'hover' | undefined;
6
7
  };
7
8
  events: {
package/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { SvelteComponent } from 'svelte';
2
2
  export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink';
3
+ export declare type DropdownColorType = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
3
4
  export declare type Buttontypes = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
4
5
  export declare type Buttonshadows = 'blue' | 'green' | 'cyan' | 'teal' | 'lime' | 'red' | 'pink' | 'purple';
5
6
  export declare type Gradientduotones = 'purple2blue' | 'cyan2blue' | 'green2blue' | 'purple2pink' | 'pink2orange' | 'teal2lime' | 'red2yellow';