@indielayer/ui 1.12.1 → 1.13.0
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/docs/pages/component/datepicker/usage.vue +1 -0
- package/docs/pages/component/select/multiple.vue +4 -2
- package/docs/pages/component/select/usage.vue +1 -0
- package/docs/pages/component/table/usage.vue +1 -1
- package/lib/components/datepicker/Datepicker.vue.d.ts +12 -12
- package/lib/components/datepicker/Datepicker.vue.js +6 -6
- package/lib/components/select/Select.vue.d.ts +5 -1
- package/lib/components/select/Select.vue.js +261 -244
- package/lib/components/select/theme/Select.base.theme.js +11 -10
- package/lib/components/table/Table.vue.d.ts +1 -0
- package/lib/components/table/Table.vue.js +51 -50
- package/lib/components/table/TableHeader.vue.d.ts +3 -0
- package/lib/components/table/TableHeader.vue.js +58 -49
- package/lib/components/table/theme/TableHead.base.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.base.theme.js +3 -3
- package/lib/components/table/theme/TableRow.base.theme.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.js +4 -4
- package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.10_typescript@5.2.2_/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +5210 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/components/datepicker/Datepicker.vue +1 -1
- package/src/components/select/Select.vue +26 -7
- package/src/components/select/theme/Select.base.theme.ts +17 -6
- package/src/components/table/Table.vue +2 -0
- package/src/components/table/TableHeader.vue +36 -28
- package/src/components/table/theme/TableHead.base.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
- package/src/components/table/theme/TableRow.base.theme.ts +1 -1
- package/src/version.ts +1 -1
- package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.1_vue@3.5.10_typescript@5.2.2_/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +0 -5199
- /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@11.0.1_vue@3.5.10_typescript@5.2.2_ → @vuepic_vue-datepicker@11.0.2_vue@3.5.10_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css.js +0 -0
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "",
|
|
4
|
-
box: ({ props: e, data:
|
|
5
|
-
const r = ["w-full border border-secondary-300 dark:border-secondary-700
|
|
6
|
-
return !
|
|
4
|
+
box: ({ props: e, data: t }) => {
|
|
5
|
+
const r = ["w-full border border-secondary-300 dark:border-secondary-700 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out rounded-md shadow-sm"];
|
|
6
|
+
return !t.errorInternal && !e.disabled && r.push("hover:border-secondary-400 dark:hover:border-secondary-500"), e.size === "xs" ? r.push("px-2 py-1 text-xs") : e.size === "sm" ? r.push("px-2 py-1.5 text-sm") : e.size === "lg" ? r.push("px-4 py-3 text-lg") : e.size === "xl" ? r.push("px-5 py-4 text-xl") : r.push("px-3 py-2"), e.disabled ? r.push("bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed") : r.push("bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200"), t.errorInternal ? r.push("border-error-500 dark:border-error-400 group-focus:outline-error-500") : e.disabled || r.push("group-focus:outline-[color:var(--x-select-border)]"), !e.multiple && !e.multipleCheckbox && r.push("truncate"), e.clearable ? r.push("pr-14") : r.push("pr-8"), r;
|
|
7
7
|
},
|
|
8
8
|
truncateCounter: "absolute right-0 cursor-pointer hover:bg-secondary-200 bg-secondary-100 text-secondary-800 rounded px-1 py-0.5 text-xs",
|
|
9
9
|
content: "p-1",
|
|
10
10
|
search: "p-1 mb-0.5",
|
|
11
11
|
contentBody: "overflow-y-auto max-h-64 min-w-[280px]",
|
|
12
|
-
iconWrapper: "
|
|
12
|
+
iconWrapper: "absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none",
|
|
13
|
+
clearButton: "absolute top-1/2 -translate-y-1/2 right-5 flex items-center p-2",
|
|
13
14
|
icon: ({ props: e }) => {
|
|
14
|
-
const
|
|
15
|
-
return e.size === "sm" || e.size === "xs" ?
|
|
15
|
+
const t = [];
|
|
16
|
+
return e.size === "sm" || e.size === "xs" ? t.push("h-3 w-3") : e.size === "lg" || e.size === "xl" ? t.push("h-5 w-5") : t.push("h-4 w-4"), e.disabled ? t.push("text-secondary-300 dark:text-secondary-500") : t.push("text-secondary-500 dark:text-secondary-400"), t;
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
|
-
styles: ({ colors: e, css:
|
|
19
|
+
styles: ({ colors: e, css: t }) => {
|
|
19
20
|
const r = e.getPalette("primary");
|
|
20
|
-
return
|
|
21
|
+
return t.get("border", r[500]);
|
|
21
22
|
}
|
|
22
|
-
}, o =
|
|
23
|
+
}, o = s;
|
|
23
24
|
export {
|
|
24
25
|
o as default
|
|
25
26
|
};
|
|
@@ -57,6 +57,7 @@ export type TableHeader = {
|
|
|
57
57
|
width?: string | number;
|
|
58
58
|
truncate?: boolean;
|
|
59
59
|
skeletonShape?: SkeletonShape;
|
|
60
|
+
tooltip?: string;
|
|
60
61
|
};
|
|
61
62
|
export type TableProps = ExtractPublicPropTypes<typeof tableProps>;
|
|
62
63
|
type InternalClasses = 'wrapper' | 'table' | 'loadingWrapper';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, mergeModels as S, useModel as Q, computed as x, ref as R, watch as U, openBlock as
|
|
1
|
+
import { defineComponent as K, mergeModels as S, useModel as Q, computed as x, ref as R, watch as U, openBlock as o, createElementBlock as r, mergeProps as C, unref as n, renderSlot as p, createElementVNode as f, normalizeStyle as H, normalizeClass as m, createVNode as v, withCtx as c, createBlock as g, createCommentVNode as $, Fragment as k, renderList as h, createTextVNode as O, toDisplayString as P } from "vue";
|
|
2
2
|
import { useTheme as Y } from "../../composables/useTheme.js";
|
|
3
3
|
import { useVirtualList as Z } from "../../composables/useVirtualList.js";
|
|
4
4
|
import j from "./TableHead.vue.js";
|
|
@@ -8,9 +8,9 @@ import T from "./TableRow.vue.js";
|
|
|
8
8
|
import _ from "./TableCell.vue.js";
|
|
9
9
|
import te from "../spinner/Spinner.vue.js";
|
|
10
10
|
import se from "../skeleton/Skeleton.vue.js";
|
|
11
|
-
import
|
|
12
|
-
import { chevronDownIcon as
|
|
13
|
-
const
|
|
11
|
+
import oe from "../icon/Icon.vue.js";
|
|
12
|
+
import { chevronDownIcon as le } from "../../common/icons.js";
|
|
13
|
+
const ie = { key: 1 }, ae = { colspan: "999" }, re = { key: 2 }, ne = { colspan: "999" }, de = ["onClick"], ue = { colspan: "999" }, pe = {
|
|
14
14
|
headers: {
|
|
15
15
|
type: Array,
|
|
16
16
|
default: () => []
|
|
@@ -69,7 +69,7 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
69
69
|
}),
|
|
70
70
|
emits: /* @__PURE__ */ S(["update:sort", "click-row"], ["update:selected"]),
|
|
71
71
|
setup(B, { emit: z }) {
|
|
72
|
-
const
|
|
72
|
+
const a = B, L = Q(B, "selected"), A = x(() => typeof L.value < "u");
|
|
73
73
|
function V(e) {
|
|
74
74
|
try {
|
|
75
75
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -77,60 +77,60 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
77
77
|
return [];
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
const b = x(() =>
|
|
80
|
+
const b = x(() => a.items), { list: M, containerProps: D, wrapperProps: E } = Z(
|
|
81
81
|
b,
|
|
82
82
|
{
|
|
83
|
-
disabled: !
|
|
84
|
-
itemHeight:
|
|
85
|
-
topOffset:
|
|
86
|
-
bottomOffset:
|
|
87
|
-
overscan:
|
|
83
|
+
disabled: !a.virtualList,
|
|
84
|
+
itemHeight: a.virtualListItemHeight || 54,
|
|
85
|
+
topOffset: a.virtualListOffsetTop || 0,
|
|
86
|
+
bottomOffset: a.virtualListOffsetBottom || 0,
|
|
87
|
+
overscan: a.virtualListOverscan
|
|
88
88
|
}
|
|
89
89
|
), y = R([]);
|
|
90
90
|
U(b, (e) => {
|
|
91
|
-
|
|
91
|
+
a.expandable && (y.value = V(e));
|
|
92
92
|
}, { immediate: !0 });
|
|
93
93
|
const J = z;
|
|
94
|
-
function X(e,
|
|
94
|
+
function X(e, l) {
|
|
95
95
|
if (e)
|
|
96
|
-
for (let t = 0; t <
|
|
97
|
-
const { 0:
|
|
98
|
-
if (e ===
|
|
96
|
+
for (let t = 0; t < l.length; t++) {
|
|
97
|
+
const { 0: i, 1: s } = l[t].split(",");
|
|
98
|
+
if (e === i)
|
|
99
99
|
return parseInt(s) > 0 ? 1 : -1;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
function F(e) {
|
|
103
|
-
const
|
|
103
|
+
const l = a.sort.slice(0);
|
|
104
104
|
let t = !1;
|
|
105
|
-
for (let
|
|
106
|
-
const { 0: s, 1: d } =
|
|
105
|
+
for (let i = 0; i < l.length; i++) {
|
|
106
|
+
const { 0: s, 1: d } = l[i].split(",");
|
|
107
107
|
if (s === e.value) {
|
|
108
108
|
if (t = !0, d === "-1") {
|
|
109
|
-
|
|
109
|
+
l.splice(i, 1, `${e.value},1`);
|
|
110
110
|
break;
|
|
111
111
|
} else if (d === "1") {
|
|
112
|
-
|
|
112
|
+
l.splice(i, 1);
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
t ||
|
|
117
|
+
t || l.push(`${e.value},-1`), J("update:sort", l);
|
|
118
118
|
}
|
|
119
|
-
function W(e,
|
|
120
|
-
if (!
|
|
119
|
+
function W(e, l) {
|
|
120
|
+
if (!l)
|
|
121
121
|
return "";
|
|
122
|
-
const t = Array.isArray(
|
|
122
|
+
const t = Array.isArray(l) ? l : l.match(/([^[.\]])+/g);
|
|
123
123
|
return (t == null ? void 0 : t.reduce((s, d) => s && s[d], e)) ?? "";
|
|
124
124
|
}
|
|
125
|
-
const { styles: q, classes: w, className: G } = Y("Table", {},
|
|
126
|
-
return (e,
|
|
125
|
+
const { styles: q, classes: w, className: G } = Y("Table", {}, a);
|
|
126
|
+
return (e, l) => (o(), r("div", C({
|
|
127
127
|
class: [n(G), n(w).wrapper]
|
|
128
128
|
}, n(D)), [
|
|
129
129
|
p(e.$slots, "title"),
|
|
130
130
|
p(e.$slots, "actions"),
|
|
131
131
|
f("div", C(n(E), {
|
|
132
132
|
class: {
|
|
133
|
-
"!h-auto":
|
|
133
|
+
"!h-auto": a.loading
|
|
134
134
|
}
|
|
135
135
|
}), [
|
|
136
136
|
f("table", {
|
|
@@ -139,17 +139,18 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
139
139
|
}, [
|
|
140
140
|
v(j, { "sticky-header": e.stickyHeader }, {
|
|
141
141
|
default: c(() => [
|
|
142
|
-
e.expandable ? (
|
|
142
|
+
e.expandable ? (o(), g(I, {
|
|
143
143
|
key: 0,
|
|
144
144
|
width: "48",
|
|
145
145
|
class: "!p-0"
|
|
146
146
|
})) : $("", !0),
|
|
147
|
-
(
|
|
148
|
-
key:
|
|
147
|
+
(o(!0), r(k, null, h(e.headers, (t, i) => (o(), g(I, {
|
|
148
|
+
key: i,
|
|
149
149
|
"text-align": t.align,
|
|
150
150
|
sort: X(t.value, e.sort),
|
|
151
151
|
sortable: t.sortable,
|
|
152
152
|
width: t.width,
|
|
153
|
+
tooltip: t.tooltip,
|
|
153
154
|
onClick: (s) => t.sortable ? F(t) : null
|
|
154
155
|
}, {
|
|
155
156
|
default: c(() => [
|
|
@@ -158,18 +159,18 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
158
159
|
])
|
|
159
160
|
]),
|
|
160
161
|
_: 2
|
|
161
|
-
}, 1032, ["text-align", "sort", "sortable", "width", "onClick"]))), 128))
|
|
162
|
+
}, 1032, ["text-align", "sort", "sortable", "width", "tooltip", "onClick"]))), 128))
|
|
162
163
|
]),
|
|
163
164
|
_: 3
|
|
164
165
|
}, 8, ["sticky-header"]),
|
|
165
166
|
v(n(ee), null, {
|
|
166
167
|
default: c(() => [
|
|
167
|
-
e.loading ? (
|
|
168
|
-
key:
|
|
168
|
+
e.loading ? (o(!0), r(k, { key: 0 }, h(Number(e.loadingLines), (t, i) => (o(), g(T, {
|
|
169
|
+
key: i,
|
|
169
170
|
striped: e.striped
|
|
170
171
|
}, {
|
|
171
172
|
default: c(() => [
|
|
172
|
-
(
|
|
173
|
+
(o(!0), r(k, null, h(e.headers, (s, d) => (o(), g(_, {
|
|
173
174
|
key: d,
|
|
174
175
|
"text-align": s.align,
|
|
175
176
|
width: s.width,
|
|
@@ -191,18 +192,18 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
191
192
|
}, 1032, ["text-align", "width", "dense", "fixed"]))), 128))
|
|
192
193
|
]),
|
|
193
194
|
_: 2
|
|
194
|
-
}, 1032, ["striped"]))), 128)) : e.error ? (
|
|
195
|
-
f("td",
|
|
195
|
+
}, 1032, ["striped"]))), 128)) : e.error ? (o(), r("tr", ie, [
|
|
196
|
+
f("td", ae, [
|
|
196
197
|
p(e.$slots, "error")
|
|
197
198
|
])
|
|
198
|
-
])) : !b.value || b.value.length === 0 ? (
|
|
199
|
+
])) : !b.value || b.value.length === 0 ? (o(), r("tr", re, [
|
|
199
200
|
f("td", ne, [
|
|
200
201
|
p(e.$slots, "empty")
|
|
201
202
|
])
|
|
202
|
-
])) : (
|
|
203
|
+
])) : (o(!0), r(k, { key: 3 }, h(n(M), (t, i) => {
|
|
203
204
|
var s, d;
|
|
204
|
-
return
|
|
205
|
-
key: e.keyProp ??
|
|
205
|
+
return o(), r(k, {
|
|
206
|
+
key: e.keyProp ?? i
|
|
206
207
|
}, [
|
|
207
208
|
v(T, {
|
|
208
209
|
pointer: e.pointer,
|
|
@@ -211,7 +212,7 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
211
212
|
onClick: (u) => e.$emit("click-row", t.data, t.index)
|
|
212
213
|
}, {
|
|
213
214
|
default: c(() => [
|
|
214
|
-
e.expandable ? (
|
|
215
|
+
e.expandable ? (o(), g(_, {
|
|
215
216
|
key: 0,
|
|
216
217
|
width: "48",
|
|
217
218
|
class: "!p-1"
|
|
@@ -224,8 +225,8 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
224
225
|
class: m(["px-3 p-2", [e.dense ? "p-0.5" : "px-3 py-2"]]),
|
|
225
226
|
onClick: (N) => y.value[t.index].__expanded = !y.value[t.index].__expanded
|
|
226
227
|
}, [
|
|
227
|
-
v(
|
|
228
|
-
icon: n(
|
|
228
|
+
v(oe, {
|
|
229
|
+
icon: n(le),
|
|
229
230
|
size: e.dense ? "xs" : "md",
|
|
230
231
|
class: m(["transition-transform", {
|
|
231
232
|
"rotate-180": (u = y.value[t.index]) == null ? void 0 : u.__expanded
|
|
@@ -236,15 +237,15 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
236
237
|
}),
|
|
237
238
|
_: 2
|
|
238
239
|
}, 1024)) : $("", !0),
|
|
239
|
-
(
|
|
240
|
+
(o(!0), r(k, null, h(e.headers, (u, N) => (o(), g(_, {
|
|
240
241
|
key: N,
|
|
241
242
|
"text-align": u.align,
|
|
242
243
|
truncate: u.truncate,
|
|
243
244
|
width: u.width,
|
|
244
245
|
dense: e.dense,
|
|
245
|
-
style: H([
|
|
246
|
-
height: `${
|
|
247
|
-
maxHeight: `${
|
|
246
|
+
style: H([a.virtualList ? {
|
|
247
|
+
height: `${a.virtualListItemHeight}px`,
|
|
248
|
+
maxHeight: `${a.virtualListItemHeight}px`,
|
|
248
249
|
overflow: "hidden",
|
|
249
250
|
whiteSpace: "nowrap"
|
|
250
251
|
} : {}])
|
|
@@ -261,7 +262,7 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
261
262
|
]),
|
|
262
263
|
_: 2
|
|
263
264
|
}, 1032, ["pointer", "striped", "selected", "onClick"]),
|
|
264
|
-
e.expandable ? (
|
|
265
|
+
e.expandable ? (o(), r("tr", {
|
|
265
266
|
key: 0,
|
|
266
267
|
class: m({ hidden: !((s = y.value[t.index]) != null && s.__expanded) })
|
|
267
268
|
}, [
|
|
@@ -280,7 +281,7 @@ const ae = { key: 1 }, ie = { colspan: "999" }, re = { key: 2 }, ne = { colspan:
|
|
|
280
281
|
]),
|
|
281
282
|
_: 3
|
|
282
283
|
}),
|
|
283
|
-
e.loading ? (
|
|
284
|
+
e.loading ? (o(), r("div", {
|
|
284
285
|
key: 0,
|
|
285
286
|
class: m(n(w).loadingWrapper)
|
|
286
287
|
}, [
|
|
@@ -15,6 +15,7 @@ declare const tableHeaderProps: {
|
|
|
15
15
|
default: string;
|
|
16
16
|
validator: (value: string) => boolean;
|
|
17
17
|
};
|
|
18
|
+
tooltip: StringConstructor;
|
|
18
19
|
};
|
|
19
20
|
export type TableHeaderSort = typeof validators.sort[number];
|
|
20
21
|
export type TableHeaderAlign = typeof validators.textAlign[number];
|
|
@@ -33,6 +34,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
33
34
|
default: string;
|
|
34
35
|
validator: (value: string) => boolean;
|
|
35
36
|
};
|
|
37
|
+
tooltip: StringConstructor;
|
|
36
38
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
39
|
sort: {
|
|
38
40
|
type: PropType<1 | -1 | undefined>;
|
|
@@ -44,6 +46,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
44
46
|
default: string;
|
|
45
47
|
validator: (value: string) => boolean;
|
|
46
48
|
};
|
|
49
|
+
tooltip: StringConstructor;
|
|
47
50
|
}>> & Readonly<{}>, {
|
|
48
51
|
textAlign: "left" | "right" | "center" | "justify";
|
|
49
52
|
sortable: boolean;
|
|
@@ -1,68 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, openBlock as o, createElementBlock as n, normalizeStyle as k, unref as s, normalizeClass as p, createElementVNode as r, renderSlot as c, createBlock as v, createCommentVNode as d, Fragment as u } from "vue";
|
|
2
2
|
import { useTheme as b } from "../../composables/useTheme.js";
|
|
3
|
-
|
|
3
|
+
import h from "../tooltip/ToggleTip.vue.js";
|
|
4
|
+
const B = { class: "flex items-center gap-1 select-none" }, C = {
|
|
4
5
|
key: 2,
|
|
5
6
|
d: "m3 9l4-4l4 4M7 5v14m14-4l-4 4l-4-4m4 4V5"
|
|
6
7
|
}, i = {
|
|
7
8
|
sort: [1, -1, void 0],
|
|
8
9
|
textAlign: ["left", "center", "right", "justify"]
|
|
9
|
-
},
|
|
10
|
+
}, N = {
|
|
10
11
|
sort: {
|
|
11
12
|
type: Number,
|
|
12
|
-
validator: (
|
|
13
|
+
validator: (l) => i.sort.includes(l)
|
|
13
14
|
},
|
|
14
15
|
sortable: Boolean,
|
|
15
16
|
textAlign: {
|
|
16
17
|
type: String,
|
|
17
18
|
default: "left",
|
|
18
|
-
validator: (
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
validator: (l) => i.textAlign.includes(l)
|
|
20
|
+
},
|
|
21
|
+
tooltip: String
|
|
22
|
+
}, S = { name: "XTableHeader", validators: i }, T = /* @__PURE__ */ g({
|
|
23
|
+
...S,
|
|
24
|
+
props: N,
|
|
25
|
+
setup(l) {
|
|
26
|
+
const m = l, { styles: y, classes: a, className: f } = b("TableHeader", {}, m);
|
|
27
|
+
return (e, t) => (o(), n("th", {
|
|
28
|
+
style: k(s(y)),
|
|
29
|
+
class: p([s(f), s(a).th, "group/th"])
|
|
28
30
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
31
|
+
r("div", B, [
|
|
32
|
+
c(e.$slots, "default"),
|
|
33
|
+
e.tooltip ? (o(), v(h, {
|
|
34
|
+
key: 0,
|
|
35
|
+
content: e.tooltip
|
|
36
|
+
}, null, 8, ["content"])) : d("", !0),
|
|
37
|
+
e.sortable ? (o(), n("svg", {
|
|
38
|
+
key: 1,
|
|
39
|
+
class: p(["shrink-0", [
|
|
40
|
+
s(a).sortIcon,
|
|
41
|
+
[e.sort && [1, -1].includes(e.sort) ? "" : "invisible group-hover/th:visible"],
|
|
42
|
+
[e.sort !== -1 && e.sort !== 1 ? "text-secondary-400" : "text-primary-700"]
|
|
43
|
+
]]),
|
|
44
|
+
width: "24",
|
|
45
|
+
height: "24",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
stroke: "currentColor",
|
|
48
|
+
"stroke-linejoin": "round",
|
|
49
|
+
"stroke-linecap": "round",
|
|
50
|
+
fill: "none",
|
|
51
|
+
role: "presentation"
|
|
52
|
+
}, [
|
|
53
|
+
e.sort === -1 ? (o(), n(u, { key: 0 }, [
|
|
54
|
+
t[0] || (t[0] = r("line", {
|
|
55
|
+
x1: "12",
|
|
56
|
+
y1: "5",
|
|
57
|
+
x2: "12",
|
|
58
|
+
y2: "19"
|
|
59
|
+
}, null, -1)),
|
|
60
|
+
t[1] || (t[1] = r("polyline", { points: "19 12 12 19 5 12" }, null, -1))
|
|
61
|
+
], 64)) : e.sort === 1 ? (o(), n(u, { key: 1 }, [
|
|
62
|
+
t[2] || (t[2] = r("line", {
|
|
63
|
+
x1: "12",
|
|
64
|
+
y1: "19",
|
|
65
|
+
x2: "12",
|
|
66
|
+
y2: "5"
|
|
67
|
+
}, null, -1)),
|
|
68
|
+
t[3] || (t[3] = r("polyline", { points: "5 12 12 5 19 12" }, null, -1))
|
|
69
|
+
], 64)) : (o(), n("path", C))
|
|
70
|
+
], 2)) : d("", !0)
|
|
71
|
+
])
|
|
63
72
|
], 6));
|
|
64
73
|
}
|
|
65
74
|
});
|
|
66
75
|
export {
|
|
67
|
-
|
|
76
|
+
T as default
|
|
68
77
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const s = {
|
|
2
2
|
classes: {
|
|
3
3
|
thead: ({ props: t }) => {
|
|
4
|
-
const e = ["align-bottom bg-secondary-
|
|
4
|
+
const e = ["align-bottom bg-secondary-100 dark:bg-secondary-700"];
|
|
5
5
|
return t.stickyHeader && e.push("sticky top-0 z-10"), e;
|
|
6
6
|
},
|
|
7
7
|
row: "text-sm text-secondary-700 dark:text-secondary-200 border-b"
|
|
@@ -4,9 +4,9 @@ const s = {
|
|
|
4
4
|
const t = ["relative p-2.5 font-medium"];
|
|
5
5
|
return e.sortable && t.push("cursor-pointer hover:text-secondary-800 dark:hover:text-secondary-300 transition-colors duration-150 ease-in-out"), 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
6
|
},
|
|
7
|
-
sortIcon: ({ props: e }) => ["
|
|
7
|
+
sortIcon: ({ props: e }) => ["stroke-2 w-3 h-3"]
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, n = s;
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
n as default
|
|
12
12
|
};
|
|
@@ -2,7 +2,7 @@ const s = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
row: ({ props: r }) => {
|
|
4
4
|
const e = [];
|
|
5
|
-
return r.selected && e.push("shadow-[
|
|
5
|
+
return r.selected && e.push("shadow-[inset_2px_0] shadow-primary-500"), r.striped ? e.push("even:bg-secondary-50 dark:even:bg-secondary-700") : e.push("border-b border-secondary-200 dark:border-secondary-700"), r.pointer && e.push("hover:bg-secondary-50 dark:hover:bg-secondary-700 cursor-pointer"), e;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}, o = s;
|