@indielayer/ui 0.0.0-dev-20240125104319 → 0.0.0-dev-20240129122517
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/lib/common/icons.d.ts +2 -1
- package/lib/common/icons.js +3 -2
- package/lib/components/icon/theme/Icon.carbon.theme.js +7 -4
- package/lib/components/index.js +1 -1
- package/lib/components/link/Link.vue.js +2 -2
- package/lib/components/link/Link.vue2.js +1 -1
- package/lib/components/link/theme/Link.base.theme.js +4 -4
- package/lib/components/link/theme/Link.carbon.theme.js +23 -3
- package/lib/components/menu/MenuItem.vue.js +2 -2
- package/lib/components/menu/MenuItem.vue2.js +1 -1
- package/lib/components/select/Select.vue.js +49 -47
- package/lib/components/select/theme/Select.base.theme.js +10 -10
- package/lib/components/select/theme/Select.carbon.theme.js +4 -4
- package/lib/components/skeleton/Skeleton.vue.d.ts +19 -1
- package/lib/components/skeleton/Skeleton.vue.js +25 -15
- package/lib/components/skeleton/theme/Skeleton.base.theme.js +7 -4
- package/lib/components/table/Table.vue.d.ts +115 -9
- package/lib/components/table/Table.vue.js +209 -98
- package/lib/components/table/TableCell.vue.d.ts +4 -5
- package/lib/components/table/TableCell.vue.js +21 -22
- package/lib/components/table/TableHead.vue.d.ts +16 -0
- package/lib/components/table/TableHead.vue.js +21 -0
- package/lib/components/table/TableHead.vue2.js +4 -0
- package/lib/components/table/TableHeader.vue.d.ts +4 -0
- package/lib/components/table/TableHeader.vue.js +45 -54
- package/lib/components/table/TableRow.vue.d.ts +15 -1
- package/lib/components/table/TableRow.vue.js +21 -25
- package/lib/components/table/index.d.ts +4 -2
- package/lib/components/table/theme/Table.base.theme.js +7 -6
- package/lib/components/table/theme/Table.carbon.theme.js +11 -3
- package/lib/components/table/theme/TableCell.base.theme.js +3 -3
- package/lib/components/table/theme/TableCell.carbon.theme.js +9 -3
- package/lib/components/table/theme/TableHead.base.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHead.base.theme.js +9 -0
- package/lib/components/table/theme/TableHead.carbon.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHead.carbon.theme.js +9 -0
- package/lib/components/table/theme/TableHeader.base.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHeader.base.theme.js +12 -0
- package/lib/components/table/theme/TableHeader.carbon.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHeader.carbon.theme.js +12 -0
- package/lib/components/table/theme/TableRow.base.theme.d.ts +3 -0
- package/lib/components/table/theme/TableRow.base.theme.js +11 -0
- package/lib/components/table/theme/TableRow.carbon.theme.d.ts +3 -0
- package/lib/components/table/theme/TableRow.carbon.theme.js +11 -0
- package/lib/components/tag/Tag.vue.d.ts +1 -1
- package/lib/components/tag/Tag.vue.js +17 -17
- package/lib/components/tag/theme/Tag.base.theme.js +14 -13
- package/lib/components/tag/theme/Tag.carbon.theme.js +14 -14
- package/lib/index.js +2 -2
- package/lib/index.umd.js +3 -3
- package/lib/theme.d.ts +4 -1
- package/lib/themes/base/components.d.ts +3 -0
- package/lib/themes/base/components.js +44 -38
- package/lib/themes/carbon/components.d.ts +3 -0
- package/lib/themes/carbon/components.js +44 -38
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/common/icons.ts +2 -1
- package/src/components/icon/theme/Icon.carbon.theme.ts +9 -1
- package/src/components/link/Link.vue +1 -1
- package/src/components/link/theme/Link.carbon.theme.ts +23 -2
- package/src/components/menu/MenuItem.vue +1 -1
- package/src/components/select/Select.vue +6 -4
- package/src/components/select/theme/Select.base.theme.ts +1 -1
- package/src/components/select/theme/Select.carbon.theme.ts +1 -1
- package/src/components/skeleton/Skeleton.vue +18 -2
- package/src/components/skeleton/theme/Skeleton.base.theme.ts +8 -1
- package/src/components/table/Table.vue +123 -27
- package/src/components/table/TableCell.vue +5 -6
- package/src/components/table/TableHead.vue +25 -0
- package/src/components/table/TableHeader.vue +35 -56
- package/src/components/table/TableRow.vue +19 -17
- package/src/components/table/index.ts +4 -2
- package/src/components/table/theme/Table.base.theme.ts +9 -7
- package/src/components/table/theme/Table.carbon.theme.ts +18 -2
- package/src/components/table/theme/TableCell.base.theme.ts +1 -1
- package/src/components/table/theme/TableCell.carbon.theme.ts +24 -2
- package/src/components/table/theme/TableHead.base.theme.ts +10 -0
- package/src/components/table/theme/TableHead.carbon.theme.ts +10 -0
- package/src/components/table/theme/TableHeader.base.theme.ts +28 -0
- package/src/components/table/theme/TableHeader.carbon.theme.ts +28 -0
- package/src/components/table/theme/TableRow.base.theme.ts +21 -0
- package/src/components/table/theme/TableRow.carbon.theme.ts +21 -0
- package/src/components/tag/Tag.vue +4 -4
- package/src/components/tag/theme/Tag.base.theme.ts +4 -4
- package/src/components/tag/theme/Tag.carbon.theme.ts +5 -6
- package/src/theme.ts +6 -0
- package/src/themes/base/components.ts +3 -0
- package/src/themes/carbon/components.ts +3 -0
- package/src/version.ts +1 -1
- package/lib/components/table/TableHead.d.ts +0 -2
- package/lib/components/table/TableHead.js +0 -19
- package/src/components/table/TableHead.tsx +0 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExtractPublicPropTypes, type PropType } from 'vue';
|
|
2
2
|
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
3
|
declare const validators: {
|
|
4
4
|
textAlign: readonly [null, "left", "center", "right", "justify"];
|
|
@@ -11,7 +11,7 @@ declare const tableCellProps: {
|
|
|
11
11
|
};
|
|
12
12
|
truncate: BooleanConstructor;
|
|
13
13
|
dense: BooleanConstructor;
|
|
14
|
-
|
|
14
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
15
15
|
verticalAlign: {
|
|
16
16
|
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null>;
|
|
17
17
|
default: string;
|
|
@@ -31,7 +31,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
31
31
|
};
|
|
32
32
|
truncate: BooleanConstructor;
|
|
33
33
|
dense: BooleanConstructor;
|
|
34
|
-
|
|
34
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
35
35
|
verticalAlign: {
|
|
36
36
|
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null>;
|
|
37
37
|
default: string;
|
|
@@ -44,14 +44,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
44
44
|
};
|
|
45
45
|
truncate: BooleanConstructor;
|
|
46
46
|
dense: BooleanConstructor;
|
|
47
|
-
|
|
47
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
48
48
|
verticalAlign: {
|
|
49
49
|
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null>;
|
|
50
50
|
default: string;
|
|
51
51
|
validator: (value: string) => boolean;
|
|
52
52
|
};
|
|
53
53
|
}>>, {
|
|
54
|
-
fixed: boolean;
|
|
55
54
|
dense: boolean;
|
|
56
55
|
truncate: boolean;
|
|
57
56
|
verticalAlign: "top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null;
|
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as d, computed as c, openBlock as m, createElementBlock as u, normalizeStyle as p, unref as n, normalizeClass as f, renderSlot as h } from "vue";
|
|
2
|
+
import { useTheme as g } from "../../composables/useTheme.js";
|
|
3
|
+
const o = {
|
|
4
4
|
textAlign: [null, "left", "center", "right", "justify"],
|
|
5
5
|
verticalAlign: [null, "baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
|
|
6
|
-
},
|
|
6
|
+
}, v = {
|
|
7
7
|
textAlign: {
|
|
8
8
|
type: String,
|
|
9
|
-
validator: (e) =>
|
|
9
|
+
validator: (e) => o.textAlign.includes(e)
|
|
10
10
|
},
|
|
11
11
|
truncate: Boolean,
|
|
12
12
|
dense: Boolean,
|
|
13
|
-
|
|
13
|
+
width: [String, Number],
|
|
14
14
|
verticalAlign: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: "middle",
|
|
17
|
-
validator: (e) =>
|
|
17
|
+
validator: (e) => o.verticalAlign.includes(e)
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, b = {
|
|
20
20
|
name: "XTableCell",
|
|
21
|
-
validators:
|
|
22
|
-
},
|
|
23
|
-
...
|
|
24
|
-
props:
|
|
21
|
+
validators: o
|
|
22
|
+
}, w = /* @__PURE__ */ d({
|
|
23
|
+
...b,
|
|
24
|
+
props: v,
|
|
25
25
|
setup(e) {
|
|
26
|
-
const t = e;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
l(a).wrapper
|
|
26
|
+
const t = e, l = c(() => typeof t.width == "number" ? `${t.width}px` : t.width), { styles: a, classes: i, className: r } = g("TableCell", {}, t);
|
|
27
|
+
return (s, x) => (m(), u("td", {
|
|
28
|
+
style: p([n(a), { width: l.value, minWidth: l.value, maxWidth: l.value }]),
|
|
29
|
+
class: f([
|
|
30
|
+
"relative",
|
|
31
|
+
n(r),
|
|
32
|
+
n(i).wrapper
|
|
34
33
|
])
|
|
35
34
|
}, [
|
|
36
|
-
|
|
35
|
+
h(s.$slots, "default")
|
|
37
36
|
], 6));
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
w as default
|
|
42
41
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
|
+
declare const tableHeadProps: {};
|
|
4
|
+
export type TableHeadProps = ExtractPublicPropTypes<typeof tableHeadProps>;
|
|
5
|
+
type InternalClasses = 'thead' | 'row';
|
|
6
|
+
export interface TableHeadTheme extends ThemeComponent<TableHeadProps, InternalClasses> {
|
|
7
|
+
}
|
|
8
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as n, createElementBlock as c, normalizeClass as s, unref as e, normalizeStyle as m, createElementVNode as d, renderSlot as _ } from "vue";
|
|
2
|
+
import { useTheme as f } from "../../composables/useTheme.js";
|
|
3
|
+
const p = { name: "XTableHead" }, T = /* @__PURE__ */ r({
|
|
4
|
+
...p,
|
|
5
|
+
setup(u) {
|
|
6
|
+
const { styles: a, classes: t, className: l } = f("TableHead", {}, {});
|
|
7
|
+
return (o, i) => (n(), c("thead", {
|
|
8
|
+
class: s([e(l), e(t).thead]),
|
|
9
|
+
style: m(e(a))
|
|
10
|
+
}, [
|
|
11
|
+
d("tr", {
|
|
12
|
+
class: s(e(t).row)
|
|
13
|
+
}, [
|
|
14
|
+
_(o.$slots, "default")
|
|
15
|
+
], 2)
|
|
16
|
+
], 6));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
T as default
|
|
21
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
|
+
import { type ThemeComponent } from '../../composables/useTheme';
|
|
2
3
|
declare const validators: {
|
|
3
4
|
sort: readonly [1, -1, undefined];
|
|
4
5
|
textAlign: readonly ["left", "center", "right", "justify"];
|
|
@@ -19,6 +20,9 @@ declare const tableHeaderProps: {
|
|
|
19
20
|
export type TableHeaderSort = typeof validators.sort[number];
|
|
20
21
|
export type TableHeaderAlign = typeof validators.textAlign[number];
|
|
21
22
|
export type TableHeaderProps = ExtractPublicPropTypes<typeof tableHeaderProps>;
|
|
23
|
+
type InternalClasses = 'th' | 'sortIcon';
|
|
24
|
+
export interface TableHeaderTheme extends ThemeComponent<TableHeaderProps, InternalClasses> {
|
|
25
|
+
}
|
|
22
26
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
23
27
|
sort: {
|
|
24
28
|
type: PropType<1 | -1 | undefined>;
|
|
@@ -1,78 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class: "relative inline-block"
|
|
5
|
-
}, p = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "absolute stroke-2 w-3 h-3 ml-0.5 -right-3 top-0.5",
|
|
8
|
-
width: "24",
|
|
9
|
-
height: "24",
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
"stroke-linejoin": "round",
|
|
13
|
-
"stroke-linecap": "round",
|
|
14
|
-
fill: "none",
|
|
15
|
-
role: "presentation"
|
|
16
|
-
}, y = /* @__PURE__ */ s("line", {
|
|
1
|
+
import { defineComponent as m, openBlock as o, createElementBlock as l, normalizeStyle as h, unref as s, normalizeClass as a, renderSlot as y, Fragment as d, createCommentVNode as f, createElementVNode as n } from "vue";
|
|
2
|
+
import { useTheme as _ } from "../../composables/useTheme.js";
|
|
3
|
+
const g = /* @__PURE__ */ n("line", {
|
|
17
4
|
x1: "12",
|
|
18
5
|
y1: "5",
|
|
19
6
|
x2: "12",
|
|
20
7
|
y2: "19"
|
|
21
|
-
}, null, -1),
|
|
8
|
+
}, null, -1), k = /* @__PURE__ */ n("polyline", { points: "19 12 12 19 5 12" }, null, -1), v = /* @__PURE__ */ n("line", {
|
|
22
9
|
x1: "12",
|
|
23
10
|
y1: "19",
|
|
24
11
|
x2: "12",
|
|
25
12
|
y2: "5"
|
|
26
|
-
}, null, -1),
|
|
13
|
+
}, null, -1), b = /* @__PURE__ */ n("polyline", { points: "5 12 12 5 19 12" }, null, -1), B = {
|
|
14
|
+
key: 2,
|
|
15
|
+
d: "m3 9l4-4l4 4M7 5v14m14-4l-4 4l-4-4m4 4V5"
|
|
16
|
+
}, r = {
|
|
27
17
|
sort: [1, -1, void 0],
|
|
28
18
|
textAlign: ["left", "center", "right", "justify"]
|
|
29
|
-
},
|
|
19
|
+
}, x = {
|
|
30
20
|
sort: {
|
|
31
21
|
type: Number,
|
|
32
|
-
validator: (
|
|
22
|
+
validator: (t) => r.sort.includes(t)
|
|
33
23
|
},
|
|
34
24
|
sortable: Boolean,
|
|
35
25
|
textAlign: {
|
|
36
26
|
type: String,
|
|
37
27
|
default: "left",
|
|
38
|
-
validator: (
|
|
28
|
+
validator: (t) => r.textAlign.includes(t)
|
|
39
29
|
},
|
|
40
30
|
stickyHeader: Boolean
|
|
41
|
-
},
|
|
42
|
-
...
|
|
43
|
-
props:
|
|
44
|
-
setup(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"cursor-pointer hover:text-gray-800 dark:hover:text-gray-300 transition-colors duration-150 ease-in-out": e.sortable,
|
|
50
|
-
// stickyHeader
|
|
51
|
-
"sticky top-0": e.stickyHeader,
|
|
52
|
-
// textAlign
|
|
53
|
-
"text-left": e.textAlign === "left",
|
|
54
|
-
"text-right": e.textAlign === "right",
|
|
55
|
-
"text-center": e.textAlign === "center",
|
|
56
|
-
"text-justify": e.textAlign === "justify"
|
|
57
|
-
}
|
|
58
|
-
]])
|
|
31
|
+
}, C = { name: "XTableHeader", validators: r }, S = /* @__PURE__ */ m({
|
|
32
|
+
...C,
|
|
33
|
+
props: x,
|
|
34
|
+
setup(t) {
|
|
35
|
+
const c = t, { styles: u, classes: i, className: p } = _("TableHeader", {}, c);
|
|
36
|
+
return (e, H) => (o(), l("th", {
|
|
37
|
+
style: h(s(u)),
|
|
38
|
+
class: a([s(p), s(i).th, "group/th"])
|
|
59
39
|
}, [
|
|
60
|
-
e
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
40
|
+
y(e.$slots, "default"),
|
|
41
|
+
e.sortable ? (o(), l("svg", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: a([
|
|
44
|
+
s(i).sortIcon,
|
|
45
|
+
[e.sort && [1, -1].includes(e.sort) ? "" : "invisible group-hover/th:visible"]
|
|
46
|
+
]),
|
|
47
|
+
width: "24",
|
|
48
|
+
height: "24",
|
|
49
|
+
viewBox: "0 0 24 24",
|
|
50
|
+
stroke: "currentColor",
|
|
51
|
+
"stroke-linejoin": "round",
|
|
52
|
+
"stroke-linecap": "round",
|
|
53
|
+
fill: "none",
|
|
54
|
+
role: "presentation"
|
|
55
|
+
}, [
|
|
56
|
+
e.sort === -1 ? (o(), l(d, { key: 0 }, [
|
|
57
|
+
g,
|
|
58
|
+
k
|
|
59
|
+
], 64)) : e.sort === 1 ? (o(), l(d, { key: 1 }, [
|
|
60
|
+
v,
|
|
61
|
+
b
|
|
62
|
+
], 64)) : (o(), l("path", B))
|
|
63
|
+
], 2)) : f("", !0)
|
|
64
|
+
], 6));
|
|
74
65
|
}
|
|
75
66
|
});
|
|
76
67
|
export {
|
|
77
|
-
|
|
68
|
+
S as default
|
|
78
69
|
};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
1
|
+
import { type PropType, type ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
|
+
declare const tableRowProps: {
|
|
4
|
+
pointer: BooleanConstructor;
|
|
5
|
+
striped: BooleanConstructor;
|
|
6
|
+
verticalAlign: {
|
|
7
|
+
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top">;
|
|
8
|
+
default: string;
|
|
9
|
+
validator: (value: string) => boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type TableRowProps = ExtractPublicPropTypes<typeof tableRowProps>;
|
|
13
|
+
type InternalClasses = 'row';
|
|
14
|
+
export interface TableRowTheme extends ThemeComponent<TableRowProps, InternalClasses> {
|
|
15
|
+
}
|
|
2
16
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
17
|
pointer: BooleanConstructor;
|
|
4
18
|
striped: BooleanConstructor;
|
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as c, computed as m, openBlock as p, createElementBlock as u, normalizeStyle as d, unref as l, normalizeClass as g, renderSlot as f } from "vue";
|
|
2
|
+
import { useTheme as b } from "../../composables/useTheme.js";
|
|
3
|
+
const o = {
|
|
3
4
|
verticalAlign: ["baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
|
|
4
|
-
},
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
}, v = {
|
|
6
|
+
pointer: Boolean,
|
|
7
|
+
striped: Boolean,
|
|
8
|
+
verticalAlign: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "top",
|
|
11
|
+
validator: (t) => o.verticalAlign.includes(t)
|
|
12
|
+
}
|
|
13
|
+
}, A = { name: "XTableRow", validators: o }, y = /* @__PURE__ */ c({
|
|
14
|
+
...A,
|
|
15
|
+
props: v,
|
|
15
16
|
setup(t) {
|
|
16
|
-
const e = t,
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
"hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer": t.pointer
|
|
22
|
-
},
|
|
23
|
-
l.value
|
|
24
|
-
])
|
|
17
|
+
const e = t, n = m(() => e.verticalAlign === "baseline" ? "align-baseline" : e.verticalAlign === "bottom" ? "align-bottom" : e.verticalAlign === "middle" ? "align-middle" : e.verticalAlign === "text-bottom" ? "align-text-bottom" : e.verticalAlign === "text-top" ? "align-text-top" : e.verticalAlign === "top" ? "align-top" : ""), { styles: i, classes: r, className: a } = b("TableRow", {}, e);
|
|
18
|
+
return (s, x) => (p(), u("tr", {
|
|
19
|
+
style: d(l(i)),
|
|
20
|
+
class: g([l(a), l(r).row, n.value])
|
|
25
21
|
}, [
|
|
26
|
-
|
|
27
|
-
],
|
|
22
|
+
f(s.$slots, "default")
|
|
23
|
+
], 6));
|
|
28
24
|
}
|
|
29
25
|
});
|
|
30
26
|
export {
|
|
31
|
-
|
|
27
|
+
y as default
|
|
32
28
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { default as XTable } from './Table.vue';
|
|
2
2
|
export { default as XTableBody } from './TableBody';
|
|
3
3
|
export { default as XTableCell } from './TableCell.vue';
|
|
4
|
-
export { default as XTableHead } from './TableHead';
|
|
4
|
+
export { default as XTableHead } from './TableHead.vue';
|
|
5
5
|
export { default as XTableHeader } from './TableHeader.vue';
|
|
6
6
|
export { default as XTableRow } from './TableRow.vue';
|
|
7
7
|
export type { TableProps, TableHeader, TableTheme } from './Table.vue';
|
|
8
|
-
export type {
|
|
8
|
+
export type { TableHeadProps, TableHeadTheme } from './TableHead.vue';
|
|
9
|
+
export type { TableRowProps, TableRowTheme } from './TableRow.vue';
|
|
10
|
+
export type { TableHeaderProps, TableHeaderAlign, TableHeaderSort, TableHeaderTheme } from './TableHeader.vue';
|
|
9
11
|
export type { TableCellProps, TableCellTextAlign, TableCellVerticalAlign, TableCellTheme } from './TableCell.vue';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper:
|
|
3
|
+
wrapper: "w-full h-full overflow-x-auto",
|
|
4
|
+
table: ({ props: l }) => {
|
|
4
5
|
const e = ["w-full relative"];
|
|
5
|
-
return
|
|
6
|
+
return l.scrollable && e.push("overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal"), l.stickyHeader && e.push("relative"), l.fixed && e.push("md:table-fixed"), e;
|
|
6
7
|
},
|
|
7
|
-
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-gray-300 dark:bg-gray-600 rounded opacity-
|
|
8
|
+
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-gray-300 dark:bg-gray-600 rounded opacity-30"
|
|
8
9
|
}
|
|
9
|
-
},
|
|
10
|
+
}, t = a;
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
t as default
|
|
12
13
|
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const t = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: "w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-gray-800",
|
|
4
|
+
table: ({ props: a }) => {
|
|
5
|
+
const e = ["w-full relative"];
|
|
6
|
+
return a.scrollable && e.push("overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal"), a.stickyHeader && e.push("relative"), a.fixed && e.push("md:table-fixed"), e;
|
|
7
|
+
},
|
|
8
|
+
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-gray-300 dark:bg-gray-600 rounded opacity-30"
|
|
9
|
+
}
|
|
10
|
+
}, l = t;
|
|
3
11
|
export {
|
|
4
|
-
|
|
12
|
+
l as default
|
|
5
13
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const i = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: ({ props:
|
|
4
|
-
const
|
|
5
|
-
return
|
|
3
|
+
wrapper: ({ props: e }) => {
|
|
4
|
+
const t = ["last:pr-0 px-3"];
|
|
5
|
+
return t.push(e.dense ? "py-2" : "py-4"), e.textAlign === "left" ? t.push("text-left") : e.textAlign === "center" ? t.push("text-center") : e.textAlign === "right" ? t.push("text-right") : e.textAlign === "justify" && t.push("text-justify"), e.verticalAlign === "baseline" ? t.push("align-baseline") : e.verticalAlign === "bottom" ? t.push("align-bottom") : e.verticalAlign === "middle" ? t.push("align-middle") : e.verticalAlign === "text-bottom" ? t.push("align-text-bottom") : e.verticalAlign === "text-top" ? t.push("align-text-top") : e.verticalAlign === "top" && t.push("align-top"), e.truncate && t.push("truncate"), t;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}, l = i;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const i = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: e }) => {
|
|
4
|
+
const t = ["last:pr-0 px-3"];
|
|
5
|
+
return t.push(e.dense ? "py-2" : "py-4"), e.textAlign === "left" ? t.push("text-left") : e.textAlign === "center" ? t.push("text-center") : e.textAlign === "right" ? t.push("text-right") : e.textAlign === "justify" && t.push("text-justify"), e.verticalAlign === "baseline" ? t.push("align-baseline") : e.verticalAlign === "bottom" ? t.push("align-bottom") : e.verticalAlign === "middle" ? t.push("align-middle") : e.verticalAlign === "text-bottom" ? t.push("align-text-bottom") : e.verticalAlign === "text-top" ? t.push("align-text-top") : e.verticalAlign === "top" && t.push("align-top"), e.truncate && t.push("truncate"), t;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}, l = i;
|
|
3
9
|
export {
|
|
4
|
-
|
|
10
|
+
l as default
|
|
5
11
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
classes: {
|
|
3
|
+
th: ({ props: e }) => {
|
|
4
|
+
const t = ["relative py-2 font-semibold tracking-widest uppercase text-xs px-3"];
|
|
5
|
+
return e.sortable && t.push("cursor-pointer hover:text-gray-800 dark:hover:text-gray-300 transition-colors duration-150 ease-in-out"), e.stickyHeader && t.push("sticky top-0"), e.textAlign === "left" && t.push("text-left"), e.textAlign === "right" && t.push("text-right"), e.textAlign === "center" && t.push("text-center"), e.textAlign === "justify" && t.push("text-justify"), t;
|
|
6
|
+
},
|
|
7
|
+
sortIcon: ({ props: e }) => ["absolute stroke-2 w-3 h-3 top-2.5 right-0.5"]
|
|
8
|
+
}
|
|
9
|
+
}, i = s;
|
|
10
|
+
export {
|
|
11
|
+
i as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
classes: {
|
|
3
|
+
th: ({ props: e }) => {
|
|
4
|
+
const t = ["relative py-3.5 font-semibold text-sm px-3 bg-gray-200 dark:bg-gray-700 select-none"];
|
|
5
|
+
return e.sortable && t.push("cursor-pointer hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-150 ease-in-out pr-5"), e.stickyHeader && t.push("sticky top-0"), e.textAlign === "left" && t.push("text-left"), e.textAlign === "right" && t.push("text-right"), e.textAlign === "center" && t.push("text-center"), e.textAlign === "justify" && t.push("text-justify"), t;
|
|
6
|
+
},
|
|
7
|
+
sortIcon: ({ props: e }) => ["absolute stroke-2 w-4 h-4 top-4 right-2"]
|
|
8
|
+
}
|
|
9
|
+
}, r = s;
|
|
10
|
+
export {
|
|
11
|
+
r as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
classes: {
|
|
3
|
+
row: ({ props: e }) => {
|
|
4
|
+
const r = [];
|
|
5
|
+
return e.striped ? r.push("odd:bg-gray-50 dark:odd:bg-gray-800") : r.push("border-b border-gray-200 dark:border-gray-700"), e.pointer && r.push("hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer"), r;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}, o = s;
|
|
9
|
+
export {
|
|
10
|
+
o as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
classes: {
|
|
3
|
+
row: ({ props: e }) => {
|
|
4
|
+
const r = [];
|
|
5
|
+
return e.striped ? r.push("odd:bg-gray-50 dark:odd:bg-gray-800") : r.push("border-b border-gray-200 dark:border-gray-700"), e.pointer && r.push("hover:bg-gray-50 dark:hover:bg-gray-600 cursor-pointer"), r;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}, o = s;
|
|
9
|
+
export {
|
|
10
|
+
o as default
|
|
11
|
+
};
|
|
@@ -19,7 +19,7 @@ declare const tagProps: {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export type TagProps = ExtractPublicPropTypes<typeof tagProps>;
|
|
22
|
-
type InternalClasses = 'wrapper'
|
|
22
|
+
type InternalClasses = 'wrapper';
|
|
23
23
|
export interface TagTheme extends ThemeComponent<TagProps, InternalClasses> {
|
|
24
24
|
}
|
|
25
25
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|