odj-svelte-ui 0.4.2 → 0.4.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/README.md +1 -0
- package/dist/table/Table.svelte +3 -2
- package/dist/table/Table.svelte.d.ts +1 -0
- package/dist/table/theme.d.ts +21 -0
- package/dist/table/theme.js +11 -8
- package/dist/table/type.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ This is a fork from [Flowbite for Svelte 5 with Runes](https://svelte-5-ui-lib.c
|
|
|
36
36
|
- `Card` can be a button now adding `clickable` prop;
|
|
37
37
|
- `Accordion` has a new design and 4 options to the new prop `accordionStyle`: `none`, `flush`, `outlined` and `cards`;
|
|
38
38
|
- New `MultiSelect` input.
|
|
39
|
+
- `Table` can be rounded with `rounded` prop.
|
|
39
40
|
|
|
40
41
|
## Installation
|
|
41
42
|
|
package/dist/table/Table.svelte
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { type TableProps as Props, table as tableCls, type TableCtxType, TableHead, TableBody, type HeadItemType } from ".";
|
|
4
4
|
|
|
5
|
-
let { children, footerSlot, captionSlot, tableItems, divClass = "relative overflow-x-auto", striped, hoverable, noborder, shadow, color = "default", class: className, ...restProps }: Props = $props();
|
|
5
|
+
let { children, footerSlot, captionSlot, tableItems, divClass = "relative overflow-x-auto", striped, hoverable, noborder, shadow, rounded, color = "default", class: className, ...restProps }: Props = $props();
|
|
6
6
|
|
|
7
|
-
const { base, table } = $derived(tableCls({ color, shadow }));
|
|
7
|
+
const { base, table } = $derived(tableCls({ color, shadow, rounded }));
|
|
8
8
|
|
|
9
9
|
let tableCtx: TableCtxType = {
|
|
10
10
|
get striped() {
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
@props:hoverable: any;
|
|
61
61
|
@props:noborder: any;
|
|
62
62
|
@props:shadow: any;
|
|
63
|
+
@props:rounded: any;
|
|
63
64
|
@props:color: any = "default";
|
|
64
65
|
@props:class: string;
|
|
65
66
|
-->
|
package/dist/table/theme.d.ts
CHANGED
|
@@ -69,6 +69,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
69
69
|
base: string;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
+
rounded: {
|
|
73
|
+
true: string;
|
|
74
|
+
};
|
|
72
75
|
}, {
|
|
73
76
|
base: string;
|
|
74
77
|
table: string;
|
|
@@ -143,6 +146,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
143
146
|
base: string;
|
|
144
147
|
};
|
|
145
148
|
};
|
|
149
|
+
rounded: {
|
|
150
|
+
true: string;
|
|
151
|
+
};
|
|
146
152
|
}, {
|
|
147
153
|
color: {
|
|
148
154
|
default: {
|
|
@@ -214,6 +220,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
214
220
|
base: string;
|
|
215
221
|
};
|
|
216
222
|
};
|
|
223
|
+
rounded: {
|
|
224
|
+
true: string;
|
|
225
|
+
};
|
|
217
226
|
}>, {
|
|
218
227
|
color: {
|
|
219
228
|
default: {
|
|
@@ -285,6 +294,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
285
294
|
base: string;
|
|
286
295
|
};
|
|
287
296
|
};
|
|
297
|
+
rounded: {
|
|
298
|
+
true: string;
|
|
299
|
+
};
|
|
288
300
|
}, {
|
|
289
301
|
base: string;
|
|
290
302
|
table: string;
|
|
@@ -359,6 +371,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
359
371
|
base: string;
|
|
360
372
|
};
|
|
361
373
|
};
|
|
374
|
+
rounded: {
|
|
375
|
+
true: string;
|
|
376
|
+
};
|
|
362
377
|
}, {
|
|
363
378
|
base: string;
|
|
364
379
|
table: string;
|
|
@@ -433,6 +448,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
433
448
|
base: string;
|
|
434
449
|
};
|
|
435
450
|
};
|
|
451
|
+
rounded: {
|
|
452
|
+
true: string;
|
|
453
|
+
};
|
|
436
454
|
}, {
|
|
437
455
|
color: {
|
|
438
456
|
default: {
|
|
@@ -504,6 +522,9 @@ export declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
504
522
|
base: string;
|
|
505
523
|
};
|
|
506
524
|
};
|
|
525
|
+
rounded: {
|
|
526
|
+
true: string;
|
|
527
|
+
};
|
|
507
528
|
}>, unknown, unknown, undefined>>;
|
|
508
529
|
export declare const tablebodyrow: import("tailwind-variants").TVReturnType<{
|
|
509
530
|
color: {
|
package/dist/table/theme.js
CHANGED
|
@@ -7,7 +7,7 @@ export const table = tv({
|
|
|
7
7
|
variants: {
|
|
8
8
|
color: {
|
|
9
9
|
// default, primary, secondary, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
10
|
-
default: { table: "text-
|
|
10
|
+
default: { table: "text-light-surface-500 dark:text-dark-surface-400" },
|
|
11
11
|
primary: { table: "text-primary-100 dark:text-primary-100" },
|
|
12
12
|
secondary: { table: "text-secondary-100 dark:text-secondary-100" },
|
|
13
13
|
gray: { table: "text-gray-100 dark:text-gray-100" },
|
|
@@ -31,6 +31,9 @@ export const table = tv({
|
|
|
31
31
|
},
|
|
32
32
|
shadow: {
|
|
33
33
|
true: { base: "shadow-md sm:rounded-lg" }
|
|
34
|
+
},
|
|
35
|
+
rounded: {
|
|
36
|
+
true: "rounded-lg"
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
});
|
|
@@ -38,7 +41,7 @@ export const tablebodyrow = tv({
|
|
|
38
41
|
base: "",
|
|
39
42
|
variants: {
|
|
40
43
|
color: {
|
|
41
|
-
default: "bg-white dark:bg-
|
|
44
|
+
default: "bg-white dark:bg-dark-surface-800 dark:border-dark-surface-700",
|
|
42
45
|
primary: "bg-white bg-primary-500 border-primary-400",
|
|
43
46
|
secondary: "bg-white bg-secondary-500 border-secondary-400",
|
|
44
47
|
gray: "bg-gray-500 border-gray-400",
|
|
@@ -74,7 +77,7 @@ export const tablebodyrow = tv({
|
|
|
74
77
|
{
|
|
75
78
|
hoverable: true,
|
|
76
79
|
color: "default",
|
|
77
|
-
class: "hover:bg-
|
|
80
|
+
class: "hover:bg-light-surface-50 dark:hover:bg-dark-surface-600"
|
|
78
81
|
},
|
|
79
82
|
{
|
|
80
83
|
hoverable: true,
|
|
@@ -89,7 +92,7 @@ export const tablebodyrow = tv({
|
|
|
89
92
|
{
|
|
90
93
|
hoverable: true,
|
|
91
94
|
color: "gray",
|
|
92
|
-
class: "hover:bg-
|
|
95
|
+
class: "hover:bg-light-surface-400 dark:hover:bg-gray-400"
|
|
93
96
|
},
|
|
94
97
|
{
|
|
95
98
|
hoverable: true,
|
|
@@ -179,7 +182,7 @@ export const tablebodyrow = tv({
|
|
|
179
182
|
{
|
|
180
183
|
striped: true,
|
|
181
184
|
color: "default",
|
|
182
|
-
class: "odd:bg-white even:bg-
|
|
185
|
+
class: "odd:bg-white even:bg-light-surface-50 dark:odd:bg-dark-surface-800 dark:even:bg-dark-surface-700"
|
|
183
186
|
},
|
|
184
187
|
{
|
|
185
188
|
striped: true,
|
|
@@ -289,10 +292,10 @@ export const tablehead = tv({
|
|
|
289
292
|
variants: {
|
|
290
293
|
color: {
|
|
291
294
|
// default, primary, secondary, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
|
|
292
|
-
default: "text-
|
|
295
|
+
default: "text-light-surface-700 dark:text-dark-surface-400 bg-light-surface-50 dark:bg-dark-surface-700",
|
|
293
296
|
primary: "text-white dark:text-white bg-primary-700 dark:bg-primary-700",
|
|
294
297
|
secondary: "text-white dark:text-white bg-secondary-700 dark:bg-secondary-700",
|
|
295
|
-
gray: "text-white dark:text-white bg-
|
|
298
|
+
gray: "text-white dark:text-white bg-light-surface-700 dark:bg-gray-700",
|
|
296
299
|
red: "text-white dark:text-white bg-red-700 dark:bg-red-700",
|
|
297
300
|
orange: "text-white dark:text-white bg-orange-700 dark:bg-orange-700",
|
|
298
301
|
amber: "text-white dark:text-white bg-amber-700 dark:bg-amber-700",
|
|
@@ -329,7 +332,7 @@ export const tablehead = tv({
|
|
|
329
332
|
{
|
|
330
333
|
color: "default",
|
|
331
334
|
striped: true,
|
|
332
|
-
class: "bg-transparent dark:bg-transparent border-
|
|
335
|
+
class: "bg-transparent dark:bg-transparent border-light-surface-700"
|
|
333
336
|
},
|
|
334
337
|
{
|
|
335
338
|
striped: true,
|
package/dist/table/type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odj-svelte-ui",
|
|
3
3
|
"author": "orbitadajogatina",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.4",
|
|
5
5
|
"description": "This is a fork from Flowbite Svelte 5 with Runes. I just made some changes that fits better my taste.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|