@indielayer/ui 1.9.0 → 1.9.1
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/table/usage.vue +5 -1
- package/docs/pages/component/table/virtual.vue +1 -1
- package/docs/pages/typography.vue +14 -12
- package/lib/components/accordion/Accordion.vue.d.ts +4 -4
- package/lib/components/accordion/AccordionItem.vue.d.ts +6 -6
- package/lib/components/accordion/AccordionItem.vue.js +51 -51
- package/lib/components/alert/Alert.vue.d.ts +8 -8
- package/lib/components/alert/Alert.vue2.js +20 -20
- package/lib/components/avatar/Avatar.vue.d.ts +4 -4
- package/lib/components/badge/Badge.vue.d.ts +4 -4
- package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +4 -4
- package/lib/components/button/Button.vue.d.ts +5 -5
- package/lib/components/button/ButtonGroup.vue.d.ts +4 -4
- package/lib/components/card/Card.vue.d.ts +4 -4
- package/lib/components/carousel/Carousel.vue.d.ts +7 -7
- package/lib/components/carousel/CarouselSlide.vue.d.ts +4 -4
- package/lib/components/checkbox/Checkbox.vue.d.ts +6 -6
- package/lib/components/checkbox/Checkbox.vue2.js +60 -60
- package/lib/components/container/Container.vue.d.ts +4 -4
- package/lib/components/datepicker/Datepicker.vue.d.ts +6 -6
- package/lib/components/datepicker/Datepicker.vue.js +3 -3
- package/lib/components/divider/Divider.vue.d.ts +4 -4
- package/lib/components/drawer/Drawer.vue.d.ts +6 -6
- package/lib/components/drawer/Drawer.vue.js +1 -1
- package/lib/components/form/Form.vue.d.ts +5 -5
- package/lib/components/formGroup/FormGroup.vue.d.ts +6 -6
- package/lib/components/formGroup/FormGroup.vue.js +7 -7
- package/lib/components/icon/Icon.vue.d.ts +4 -4
- package/lib/components/image/Image.vue.d.ts +3 -3
- package/lib/components/input/Input.vue.d.ts +6 -6
- package/lib/components/inputFooter/InputFooter.vue.d.ts +3 -3
- package/lib/components/label/Label.vue.d.ts +4 -4
- package/lib/components/link/Link.vue.d.ts +4 -4
- package/lib/components/loader/Loader.vue.d.ts +4 -4
- package/lib/components/menu/Menu.vue.d.ts +5 -5
- package/lib/components/menu/MenuItem.vue.d.ts +5 -5
- package/lib/components/menu/MenuItem.vue2.js +1 -1
- package/lib/components/modal/Modal.vue.d.ts +6 -6
- package/lib/components/modal/Modal.vue.js +1 -1
- package/lib/components/notifications/Notifications.vue.d.ts +5 -5
- package/lib/components/pagination/Pagination.vue.d.ts +5 -5
- package/lib/components/pagination/Pagination.vue.js +41 -41
- package/lib/components/pagination/PaginationItem.vue.d.ts +6 -6
- package/lib/components/popover/Popover.vue.d.ts +8 -8
- package/lib/components/popover/Popover.vue.js +1 -1
- package/lib/components/popover/PopoverContainer.vue.d.ts +4 -4
- package/lib/components/progress/Progress.vue.d.ts +4 -4
- package/lib/components/qrCode/QrCode.vue.d.ts +4 -4
- package/lib/components/radio/Radio.vue.d.ts +6 -6
- package/lib/components/radio/Radio.vue2.js +63 -63
- package/lib/components/scroll/Scroll.vue.d.ts +6 -6
- package/lib/components/scroll/Scroll.vue2.js +1 -1
- package/lib/components/select/Select.vue.d.ts +6 -6
- package/lib/components/select/Select.vue.js +1 -1
- package/lib/components/skeleton/Skeleton.vue.d.ts +4 -4
- package/lib/components/skeleton/Skeleton.vue.js +17 -17
- package/lib/components/slider/Slider.vue.d.ts +6 -6
- package/lib/components/spacer/Spacer.d.ts +1 -1
- package/lib/components/spinner/Spinner.vue.d.ts +4 -4
- package/lib/components/stepper/Stepper.vue.d.ts +5 -5
- package/lib/components/tab/Tab.vue.d.ts +5 -5
- package/lib/components/tab/Tab.vue.js +1 -1
- package/lib/components/tab/TabGroup.vue.d.ts +5 -5
- package/lib/components/tab/TabGroup.vue.js +2 -2
- package/lib/components/table/Table.vue.d.ts +32 -24
- package/lib/components/table/Table.vue.js +119 -115
- package/lib/components/table/TableBody.d.ts +1 -1
- package/lib/components/table/TableCell.vue.d.ts +4 -4
- package/lib/components/table/TableHead.vue.d.ts +4 -4
- package/lib/components/table/TableHeader.vue.d.ts +4 -4
- package/lib/components/table/TableHeader.vue.js +39 -39
- package/lib/components/table/TableRow.vue.d.ts +8 -4
- package/lib/components/table/TableRow.vue.js +3 -2
- package/lib/components/table/theme/TableRow.base.theme.js +1 -1
- package/lib/components/tag/Tag.vue.d.ts +5 -5
- package/lib/components/textarea/Textarea.vue.d.ts +6 -6
- package/lib/components/textarea/Textarea.vue.js +6 -6
- package/lib/components/themeProvider/ThemeProvider.vue.d.ts +3 -3
- package/lib/components/toggle/Toggle.vue.d.ts +6 -6
- package/lib/components/tooltip/ToggleTip.vue.d.ts +3 -3
- package/lib/components/tooltip/Tooltip.vue.d.ts +4 -4
- package/lib/components/tooltip/Tooltip.vue.js +1 -1
- package/lib/composables/useInputtable.d.ts +26 -6
- package/lib/composables/useVirtualList.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.js +4 -4
- package/lib/node_modules/.pnpm/{@vueuse_core@10.2.0_vue@3.3.9_typescript@5.2.2_ → @vueuse_core@10.2.0_vue@3.5.10_typescript@5.2.2_}/node_modules/@vueuse/core/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/components/table/Table.vue +9 -4
- package/src/components/table/TableRow.vue +1 -0
- package/src/components/table/theme/TableRow.base.theme.ts +4 -0
- package/src/version.ts +1 -1
- /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@8.3.2_vue@3.3.9_typescript@5.2.2_ → @vuepic_vue-datepicker@8.3.2_vue@3.5.10_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css.js +0 -0
- /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@8.3.2_vue@3.3.9_typescript@5.2.2_ → @vuepic_vue-datepicker@8.3.2_vue@3.5.10_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +0 -0
- /package/lib/node_modules/.pnpm/{@vueuse_shared@10.2.0_vue@3.3.9_typescript@5.2.2_ → @vueuse_shared@10.2.0_vue@3.5.10_typescript@5.2.2_}/node_modules/@vueuse/shared/index.js +0 -0
- /package/lib/node_modules/.pnpm/{floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.3.9_typescript@5.2.2_ → floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.5.10_typescript@5.2.2_}/node_modules/floating-vue/dist/floating-vue.js +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { useVirtualList as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as K, mergeModels as N, useModel as Q, computed as S, ref as R, watch as U, openBlock as l, createElementBlock as r, mergeProps as C, unref as n, renderSlot as p, createElementVNode as f, normalizeStyle as H, normalizeClass as m, createVNode as y, withCtx as c, createBlock as g, createCommentVNode as $, Fragment as k, renderList as h, createTextVNode as I, toDisplayString as O } from "vue";
|
|
2
|
+
import { useTheme as Y } from "../../composables/useTheme.js";
|
|
3
|
+
import { useVirtualList as Z } from "../../composables/useVirtualList.js";
|
|
4
|
+
import j from "./TableHead.vue.js";
|
|
5
|
+
import T from "./TableHeader.vue.js";
|
|
6
|
+
import ee from "./TableBody.js";
|
|
7
|
+
import z from "./TableRow.vue.js";
|
|
8
8
|
import _ from "./TableCell.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { chevronDownIcon as
|
|
13
|
-
const
|
|
9
|
+
import te from "../spinner/Spinner.vue.js";
|
|
10
|
+
import se from "../skeleton/Skeleton.vue.js";
|
|
11
|
+
import le from "../icon/Icon.vue.js";
|
|
12
|
+
import { chevronDownIcon as oe } 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: () => []
|
|
@@ -54,103 +54,106 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
54
54
|
type: Number,
|
|
55
55
|
default: 5
|
|
56
56
|
}
|
|
57
|
-
},
|
|
58
|
-
...
|
|
59
|
-
props: {
|
|
60
|
-
...
|
|
57
|
+
}, ce = { name: "XTable" }, Le = /* @__PURE__ */ K({
|
|
58
|
+
...ce,
|
|
59
|
+
props: /* @__PURE__ */ N({
|
|
60
|
+
...pe,
|
|
61
61
|
items: {
|
|
62
62
|
type: Array,
|
|
63
63
|
default: () => []
|
|
64
64
|
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
}, {
|
|
66
|
+
selected: {},
|
|
67
|
+
selectedModifiers: {}
|
|
68
|
+
}),
|
|
69
|
+
emits: /* @__PURE__ */ N(["update:sort", "click-row"], ["update:selected"]),
|
|
70
|
+
setup(B, { emit: A }) {
|
|
71
|
+
const a = B, L = Q(B, "selected"), V = S(() => typeof L.value == "number");
|
|
72
|
+
function P(e) {
|
|
70
73
|
try {
|
|
71
74
|
return JSON.parse(JSON.stringify(e));
|
|
72
75
|
} catch {
|
|
73
76
|
return [];
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
|
-
const b =
|
|
79
|
+
const b = S(() => a.items), { list: M, containerProps: D, wrapperProps: E } = Z(
|
|
77
80
|
b,
|
|
78
81
|
{
|
|
79
|
-
disabled: !
|
|
80
|
-
itemHeight:
|
|
81
|
-
topOffset:
|
|
82
|
-
bottomOffset:
|
|
83
|
-
overscan:
|
|
82
|
+
disabled: !a.virtualList,
|
|
83
|
+
itemHeight: a.virtualListItemHeight || 54,
|
|
84
|
+
topOffset: a.virtualListOffsetTop || 0,
|
|
85
|
+
bottomOffset: a.virtualListOffsetBottom || 0,
|
|
86
|
+
overscan: a.virtualListOverscan
|
|
84
87
|
}
|
|
85
|
-
), v =
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
), v = R([]);
|
|
89
|
+
U(b, (e) => {
|
|
90
|
+
a.expandable && (v.value = P(e));
|
|
88
91
|
}, { immediate: !0 });
|
|
89
|
-
const
|
|
90
|
-
function
|
|
92
|
+
const J = A;
|
|
93
|
+
function X(e, o) {
|
|
91
94
|
if (e)
|
|
92
95
|
for (let t = 0; t < o.length; t++) {
|
|
93
|
-
const { 0:
|
|
94
|
-
if (e ===
|
|
96
|
+
const { 0: i, 1: s } = o[t].split(",");
|
|
97
|
+
if (e === i)
|
|
95
98
|
return parseInt(s) > 0 ? 1 : -1;
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
function
|
|
99
|
-
const o =
|
|
101
|
+
function F(e) {
|
|
102
|
+
const o = a.sort.slice(0);
|
|
100
103
|
let t = !1;
|
|
101
|
-
for (let
|
|
102
|
-
const { 0: s, 1:
|
|
104
|
+
for (let i = 0; i < o.length; i++) {
|
|
105
|
+
const { 0: s, 1: d } = o[i].split(",");
|
|
103
106
|
if (s === e.value) {
|
|
104
|
-
if (t = !0,
|
|
105
|
-
o.splice(
|
|
107
|
+
if (t = !0, d === "-1") {
|
|
108
|
+
o.splice(i, 1, `${e.value},1`);
|
|
106
109
|
break;
|
|
107
|
-
} else if (
|
|
108
|
-
o.splice(
|
|
110
|
+
} else if (d === "1") {
|
|
111
|
+
o.splice(i, 1);
|
|
109
112
|
break;
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
|
-
t || o.push(`${e.value},-1`),
|
|
116
|
+
t || o.push(`${e.value},-1`), J("update:sort", o);
|
|
114
117
|
}
|
|
115
|
-
function
|
|
118
|
+
function W(e, o) {
|
|
116
119
|
if (!o)
|
|
117
120
|
return "";
|
|
118
121
|
const t = Array.isArray(o) ? o : o.match(/([^[.\]])+/g);
|
|
119
|
-
return (t == null ? void 0 : t.reduce((s,
|
|
122
|
+
return (t == null ? void 0 : t.reduce((s, d) => s && s[d], e)) ?? "";
|
|
120
123
|
}
|
|
121
|
-
const { styles:
|
|
122
|
-
return (e, o) => (
|
|
123
|
-
class: [n(
|
|
124
|
-
}, n(
|
|
124
|
+
const { styles: q, classes: w, className: G } = Y("Table", {}, a);
|
|
125
|
+
return (e, o) => (l(), r("div", C({
|
|
126
|
+
class: [n(G), n(w).wrapper]
|
|
127
|
+
}, n(D)), [
|
|
125
128
|
p(e.$slots, "title"),
|
|
126
129
|
p(e.$slots, "actions"),
|
|
127
|
-
|
|
130
|
+
f("div", C(n(E), {
|
|
128
131
|
class: {
|
|
129
|
-
"!h-auto":
|
|
132
|
+
"!h-auto": a.loading
|
|
130
133
|
}
|
|
131
134
|
}), [
|
|
132
|
-
|
|
133
|
-
style:
|
|
134
|
-
class:
|
|
135
|
+
f("table", {
|
|
136
|
+
style: H(n(q)),
|
|
137
|
+
class: m(n(w).table)
|
|
135
138
|
}, [
|
|
136
|
-
y(
|
|
137
|
-
default:
|
|
138
|
-
e.expandable ? (
|
|
139
|
+
y(j, { "sticky-header": e.stickyHeader }, {
|
|
140
|
+
default: c(() => [
|
|
141
|
+
e.expandable ? (l(), g(T, {
|
|
139
142
|
key: 0,
|
|
140
143
|
width: "48",
|
|
141
144
|
class: "!p-0"
|
|
142
145
|
})) : $("", !0),
|
|
143
|
-
(
|
|
144
|
-
key:
|
|
146
|
+
(l(!0), r(k, null, h(e.headers, (t, i) => (l(), g(T, {
|
|
147
|
+
key: i,
|
|
145
148
|
"text-align": t.align,
|
|
146
|
-
sort:
|
|
149
|
+
sort: X(t.value, e.sort),
|
|
147
150
|
sortable: t.sortable,
|
|
148
151
|
width: t.width,
|
|
149
|
-
onClick: (s) => t.sortable ?
|
|
152
|
+
onClick: (s) => t.sortable ? F(t) : null
|
|
150
153
|
}, {
|
|
151
|
-
default:
|
|
154
|
+
default: c(() => [
|
|
152
155
|
p(e.$slots, `header-${t.value}`, { header: t }, () => [
|
|
153
|
-
|
|
156
|
+
I(O(t.text), 1)
|
|
154
157
|
])
|
|
155
158
|
]),
|
|
156
159
|
_: 2
|
|
@@ -158,24 +161,24 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
158
161
|
]),
|
|
159
162
|
_: 3
|
|
160
163
|
}, 8, ["sticky-header"]),
|
|
161
|
-
y(n(
|
|
162
|
-
default:
|
|
163
|
-
e.loading ? (
|
|
164
|
-
key:
|
|
164
|
+
y(n(ee), null, {
|
|
165
|
+
default: c(() => [
|
|
166
|
+
e.loading ? (l(!0), r(k, { key: 0 }, h(Number(e.loadingLines), (t, i) => (l(), g(z, {
|
|
167
|
+
key: i,
|
|
165
168
|
striped: e.striped
|
|
166
169
|
}, {
|
|
167
|
-
default:
|
|
168
|
-
(
|
|
169
|
-
key:
|
|
170
|
+
default: c(() => [
|
|
171
|
+
(l(!0), r(k, null, h(e.headers, (s, d) => (l(), g(_, {
|
|
172
|
+
key: d,
|
|
170
173
|
"text-align": s.align,
|
|
171
174
|
width: s.width,
|
|
172
175
|
dense: e.dense,
|
|
173
176
|
fixed: e.fixed
|
|
174
177
|
}, {
|
|
175
|
-
default:
|
|
178
|
+
default: c(() => [
|
|
176
179
|
p(e.$slots, `loading-${s.value}`, { item: t }, () => [
|
|
177
|
-
y(
|
|
178
|
-
class:
|
|
180
|
+
y(se, {
|
|
181
|
+
class: m(["max-w-[60%]", {
|
|
179
182
|
"mx-auto": s.align === "center",
|
|
180
183
|
"ml-auto": s.align === "right"
|
|
181
184
|
}]),
|
|
@@ -187,80 +190,81 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
187
190
|
}, 1032, ["text-align", "width", "dense", "fixed"]))), 128))
|
|
188
191
|
]),
|
|
189
192
|
_: 2
|
|
190
|
-
}, 1032, ["striped"]))), 128)) : e.error ? (
|
|
191
|
-
|
|
193
|
+
}, 1032, ["striped"]))), 128)) : e.error ? (l(), r("tr", ie, [
|
|
194
|
+
f("td", ae, [
|
|
192
195
|
p(e.$slots, "error")
|
|
193
196
|
])
|
|
194
|
-
])) : !b.value || b.value.length === 0 ? (
|
|
195
|
-
|
|
197
|
+
])) : !b.value || b.value.length === 0 ? (l(), r("tr", re, [
|
|
198
|
+
f("td", ne, [
|
|
196
199
|
p(e.$slots, "empty")
|
|
197
200
|
])
|
|
198
|
-
])) : (
|
|
199
|
-
var s,
|
|
200
|
-
return
|
|
201
|
-
y(
|
|
201
|
+
])) : (l(!0), r(k, { key: 3 }, h(n(M), (t, i) => {
|
|
202
|
+
var s, d;
|
|
203
|
+
return l(), r(k, { key: i }, [
|
|
204
|
+
y(z, {
|
|
202
205
|
pointer: e.pointer,
|
|
203
206
|
striped: e.striped,
|
|
204
|
-
|
|
207
|
+
selected: V.value ? L.value === t.index : void 0,
|
|
208
|
+
onClick: (u) => e.$emit("click-row", t.data, t.index)
|
|
205
209
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
e.expandable ? (
|
|
210
|
+
default: c(() => [
|
|
211
|
+
e.expandable ? (l(), g(_, {
|
|
208
212
|
key: 0,
|
|
209
213
|
width: "48",
|
|
210
214
|
class: "!p-1"
|
|
211
215
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
var
|
|
216
|
+
default: c(() => {
|
|
217
|
+
var u;
|
|
214
218
|
return [
|
|
215
|
-
|
|
219
|
+
f("button", {
|
|
216
220
|
type: "button",
|
|
217
|
-
class:
|
|
218
|
-
onClick: (
|
|
221
|
+
class: m(["px-3 p-2", [e.dense ? "p-0.5" : "px-3 py-2"]]),
|
|
222
|
+
onClick: (x) => v.value[t.index].__expanded = !v.value[t.index].__expanded
|
|
219
223
|
}, [
|
|
220
|
-
y(
|
|
221
|
-
icon: n(
|
|
224
|
+
y(le, {
|
|
225
|
+
icon: n(oe),
|
|
222
226
|
size: e.dense ? "xs" : "md",
|
|
223
|
-
class:
|
|
224
|
-
"rotate-180": (
|
|
227
|
+
class: m(["transition-transform", {
|
|
228
|
+
"rotate-180": (u = v.value[t.index]) == null ? void 0 : u.__expanded
|
|
225
229
|
}])
|
|
226
230
|
}, null, 8, ["icon", "size", "class"])
|
|
227
|
-
], 10,
|
|
231
|
+
], 10, de)
|
|
228
232
|
];
|
|
229
233
|
}),
|
|
230
234
|
_: 2
|
|
231
235
|
}, 1024)) : $("", !0),
|
|
232
|
-
(
|
|
233
|
-
key:
|
|
234
|
-
"text-align":
|
|
235
|
-
truncate:
|
|
236
|
-
width:
|
|
236
|
+
(l(!0), r(k, null, h(e.headers, (u, x) => (l(), g(_, {
|
|
237
|
+
key: x,
|
|
238
|
+
"text-align": u.align,
|
|
239
|
+
truncate: u.truncate,
|
|
240
|
+
width: u.width,
|
|
237
241
|
dense: e.dense,
|
|
238
|
-
style:
|
|
239
|
-
height: `${
|
|
240
|
-
maxHeight: `${
|
|
242
|
+
style: H([a.virtualList ? {
|
|
243
|
+
height: `${a.virtualListItemHeight}px`,
|
|
244
|
+
maxHeight: `${a.virtualListItemHeight}px`,
|
|
241
245
|
overflow: "hidden",
|
|
242
246
|
whiteSpace: "nowrap"
|
|
243
247
|
} : {}])
|
|
244
248
|
}, {
|
|
245
|
-
default:
|
|
246
|
-
p(e.$slots, `item-${
|
|
249
|
+
default: c(() => [
|
|
250
|
+
p(e.$slots, `item-${u.value}`, {
|
|
247
251
|
item: t.data
|
|
248
252
|
}, () => [
|
|
249
|
-
|
|
253
|
+
I(O(W(t.data, u.value)), 1)
|
|
250
254
|
])
|
|
251
255
|
]),
|
|
252
256
|
_: 2
|
|
253
257
|
}, 1032, ["text-align", "truncate", "width", "dense", "style"]))), 128))
|
|
254
258
|
]),
|
|
255
259
|
_: 2
|
|
256
|
-
}, 1032, ["pointer", "striped", "onClick"]),
|
|
257
|
-
e.expandable ? (
|
|
260
|
+
}, 1032, ["pointer", "striped", "selected", "onClick"]),
|
|
261
|
+
e.expandable ? (l(), r("tr", {
|
|
258
262
|
key: 0,
|
|
259
|
-
class:
|
|
263
|
+
class: m({ hidden: !((s = v.value[t.index]) != null && s.__expanded) })
|
|
260
264
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
class:
|
|
265
|
+
f("td", ue, [
|
|
266
|
+
f("div", {
|
|
267
|
+
class: m(["overflow-hidden transition-opacity", [(d = v.value[t.index]) != null && d.__expanded ? "" : "opacity-0 max-h-0"]])
|
|
264
268
|
}, [
|
|
265
269
|
p(e.$slots, "expanded-row", {
|
|
266
270
|
item: t.data
|
|
@@ -273,11 +277,11 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
273
277
|
]),
|
|
274
278
|
_: 3
|
|
275
279
|
}),
|
|
276
|
-
e.loading ? (
|
|
280
|
+
e.loading ? (l(), r("div", {
|
|
277
281
|
key: 0,
|
|
278
|
-
class:
|
|
282
|
+
class: m(n(w).loadingWrapper)
|
|
279
283
|
}, [
|
|
280
|
-
y(
|
|
284
|
+
y(te, { size: "lg" })
|
|
281
285
|
], 2)) : $("", !0)
|
|
282
286
|
], 6)
|
|
283
287
|
], 16)
|
|
@@ -285,5 +289,5 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
285
289
|
}
|
|
286
290
|
});
|
|
287
291
|
export {
|
|
288
|
-
|
|
292
|
+
Le as default
|
|
289
293
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -24,7 +24,7 @@ export type TableCellProps = ExtractPublicPropTypes<typeof tableCellProps>;
|
|
|
24
24
|
type InternalClasses = 'wrapper';
|
|
25
25
|
export interface TableCellTheme extends ThemeComponent<TableCellProps, InternalClasses> {
|
|
26
26
|
}
|
|
27
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
28
28
|
textAlign: {
|
|
29
29
|
type: PropType<"left" | "right" | "center" | "justify" | null>;
|
|
30
30
|
validator: (value: string) => boolean;
|
|
@@ -37,7 +37,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
37
37
|
default: string;
|
|
38
38
|
validator: (value: string) => boolean;
|
|
39
39
|
};
|
|
40
|
-
}
|
|
40
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
41
|
textAlign: {
|
|
42
42
|
type: PropType<"left" | "right" | "center" | "justify" | null>;
|
|
43
43
|
validator: (value: string) => boolean;
|
|
@@ -50,11 +50,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
50
50
|
default: string;
|
|
51
51
|
validator: (value: string) => boolean;
|
|
52
52
|
};
|
|
53
|
-
}
|
|
53
|
+
}>> & Readonly<{}>, {
|
|
54
54
|
dense: boolean;
|
|
55
55
|
truncate: boolean;
|
|
56
56
|
verticalAlign: "top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null;
|
|
57
|
-
}, {}>, {
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
58
58
|
default?(_: {}): any;
|
|
59
59
|
}>;
|
|
60
60
|
export default _default;
|
|
@@ -7,13 +7,13 @@ export type TableHeadProps = ExtractPublicPropTypes<typeof tableHeadProps>;
|
|
|
7
7
|
type InternalClasses = 'thead' | 'row';
|
|
8
8
|
export interface TableHeadTheme extends ThemeComponent<TableHeadProps, InternalClasses> {
|
|
9
9
|
}
|
|
10
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
11
11
|
stickyHeader: BooleanConstructor;
|
|
12
|
-
}
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
stickyHeader: BooleanConstructor;
|
|
14
|
-
}
|
|
14
|
+
}>> & Readonly<{}>, {
|
|
15
15
|
stickyHeader: boolean;
|
|
16
|
-
}, {}>, {
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
17
17
|
default?(_: {}): any;
|
|
18
18
|
}>;
|
|
19
19
|
export default _default;
|
|
@@ -22,7 +22,7 @@ export type TableHeaderProps = ExtractPublicPropTypes<typeof tableHeaderProps>;
|
|
|
22
22
|
type InternalClasses = 'th' | 'sortIcon';
|
|
23
23
|
export interface TableHeaderTheme extends ThemeComponent<TableHeaderProps, InternalClasses> {
|
|
24
24
|
}
|
|
25
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
26
26
|
sort: {
|
|
27
27
|
type: PropType<1 | -1 | undefined>;
|
|
28
28
|
validator: (value: number) => boolean;
|
|
@@ -33,7 +33,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
33
33
|
default: string;
|
|
34
34
|
validator: (value: string) => boolean;
|
|
35
35
|
};
|
|
36
|
-
}
|
|
36
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
37
|
sort: {
|
|
38
38
|
type: PropType<1 | -1 | undefined>;
|
|
39
39
|
validator: (value: number) => boolean;
|
|
@@ -44,10 +44,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
44
44
|
default: string;
|
|
45
45
|
validator: (value: string) => boolean;
|
|
46
46
|
};
|
|
47
|
-
}
|
|
47
|
+
}>> & Readonly<{}>, {
|
|
48
48
|
textAlign: "left" | "right" | "center" | "justify";
|
|
49
49
|
sortable: boolean;
|
|
50
|
-
}, {}>, {
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
51
51
|
default?(_: {}): any;
|
|
52
52
|
}>;
|
|
53
53
|
export default _default;
|
|
@@ -1,47 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
const
|
|
4
|
-
x1: "12",
|
|
5
|
-
y1: "5",
|
|
6
|
-
x2: "12",
|
|
7
|
-
y2: "19"
|
|
8
|
-
}, null, -1), v = /* @__PURE__ */ n("polyline", { points: "19 12 12 19 5 12" }, null, -1), k = /* @__PURE__ */ n("line", {
|
|
9
|
-
x1: "12",
|
|
10
|
-
y1: "19",
|
|
11
|
-
x2: "12",
|
|
12
|
-
y2: "5"
|
|
13
|
-
}, null, -1), b = /* @__PURE__ */ n("polyline", { points: "5 12 12 5 19 12" }, null, -1), x = {
|
|
1
|
+
import { defineComponent as f, openBlock as l, createElementBlock as r, normalizeStyle as g, unref as s, normalizeClass as u, renderSlot as v, Fragment as d, createElementVNode as n, createCommentVNode as k } from "vue";
|
|
2
|
+
import { useTheme as b } from "../../composables/useTheme.js";
|
|
3
|
+
const c = {
|
|
14
4
|
key: 2,
|
|
15
5
|
d: "m3 9l4-4l4 4M7 5v14m14-4l-4 4l-4-4m4 4V5"
|
|
16
|
-
},
|
|
6
|
+
}, i = {
|
|
17
7
|
sort: [1, -1, void 0],
|
|
18
8
|
textAlign: ["left", "center", "right", "justify"]
|
|
19
|
-
},
|
|
9
|
+
}, h = {
|
|
20
10
|
sort: {
|
|
21
11
|
type: Number,
|
|
22
|
-
validator: (
|
|
12
|
+
validator: (o) => i.sort.includes(o)
|
|
23
13
|
},
|
|
24
14
|
sortable: Boolean,
|
|
25
15
|
textAlign: {
|
|
26
16
|
type: String,
|
|
27
17
|
default: "left",
|
|
28
|
-
validator: (
|
|
18
|
+
validator: (o) => i.textAlign.includes(o)
|
|
29
19
|
}
|
|
30
|
-
},
|
|
31
|
-
...
|
|
32
|
-
props:
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
return (
|
|
36
|
-
style:
|
|
37
|
-
class:
|
|
20
|
+
}, x = { name: "XTableHeader", validators: i }, N = /* @__PURE__ */ f({
|
|
21
|
+
...x,
|
|
22
|
+
props: h,
|
|
23
|
+
setup(o) {
|
|
24
|
+
const p = o, { styles: m, classes: a, className: y } = b("TableHeader", {}, p);
|
|
25
|
+
return (t, e) => (l(), r("th", {
|
|
26
|
+
style: g(s(m)),
|
|
27
|
+
class: u([s(y), s(a).th, "group/th"])
|
|
38
28
|
}, [
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
v(t.$slots, "default"),
|
|
30
|
+
t.sortable ? (l(), r("svg", {
|
|
41
31
|
key: 0,
|
|
42
|
-
class:
|
|
43
|
-
s(
|
|
44
|
-
[
|
|
32
|
+
class: u([
|
|
33
|
+
s(a).sortIcon,
|
|
34
|
+
[t.sort && [1, -1].includes(t.sort) ? "" : "invisible group-hover/th:visible"]
|
|
45
35
|
]),
|
|
46
36
|
width: "24",
|
|
47
37
|
height: "24",
|
|
@@ -52,17 +42,27 @@ const g = /* @__PURE__ */ n("line", {
|
|
|
52
42
|
fill: "none",
|
|
53
43
|
role: "presentation"
|
|
54
44
|
}, [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
t.sort === -1 ? (l(), r(d, { key: 0 }, [
|
|
46
|
+
e[0] || (e[0] = n("line", {
|
|
47
|
+
x1: "12",
|
|
48
|
+
y1: "5",
|
|
49
|
+
x2: "12",
|
|
50
|
+
y2: "19"
|
|
51
|
+
}, null, -1)),
|
|
52
|
+
e[1] || (e[1] = n("polyline", { points: "19 12 12 19 5 12" }, null, -1))
|
|
53
|
+
], 64)) : t.sort === 1 ? (l(), r(d, { key: 1 }, [
|
|
54
|
+
e[2] || (e[2] = n("line", {
|
|
55
|
+
x1: "12",
|
|
56
|
+
y1: "19",
|
|
57
|
+
x2: "12",
|
|
58
|
+
y2: "5"
|
|
59
|
+
}, null, -1)),
|
|
60
|
+
e[3] || (e[3] = n("polyline", { points: "5 12 12 5 19 12" }, null, -1))
|
|
61
|
+
], 64)) : (l(), r("path", c))
|
|
62
|
+
], 2)) : k("", !0)
|
|
63
63
|
], 6));
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
N as default
|
|
68
68
|
};
|
|
@@ -3,6 +3,7 @@ import { type ThemeComponent } from '../../composables/useTheme';
|
|
|
3
3
|
declare const tableRowProps: {
|
|
4
4
|
pointer: BooleanConstructor;
|
|
5
5
|
striped: BooleanConstructor;
|
|
6
|
+
selected: BooleanConstructor;
|
|
6
7
|
verticalAlign: {
|
|
7
8
|
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top">;
|
|
8
9
|
default: string;
|
|
@@ -13,27 +14,30 @@ export type TableRowProps = ExtractPublicPropTypes<typeof tableRowProps>;
|
|
|
13
14
|
type InternalClasses = 'row';
|
|
14
15
|
export interface TableRowTheme extends ThemeComponent<TableRowProps, InternalClasses> {
|
|
15
16
|
}
|
|
16
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
18
|
pointer: BooleanConstructor;
|
|
18
19
|
striped: BooleanConstructor;
|
|
20
|
+
selected: BooleanConstructor;
|
|
19
21
|
verticalAlign: {
|
|
20
22
|
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top">;
|
|
21
23
|
default: string;
|
|
22
24
|
validator: (value: string) => boolean;
|
|
23
25
|
};
|
|
24
|
-
}
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
27
|
pointer: BooleanConstructor;
|
|
26
28
|
striped: BooleanConstructor;
|
|
29
|
+
selected: BooleanConstructor;
|
|
27
30
|
verticalAlign: {
|
|
28
31
|
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top">;
|
|
29
32
|
default: string;
|
|
30
33
|
validator: (value: string) => boolean;
|
|
31
34
|
};
|
|
32
|
-
}
|
|
35
|
+
}>> & Readonly<{}>, {
|
|
36
|
+
selected: boolean;
|
|
33
37
|
striped: boolean;
|
|
34
38
|
pointer: boolean;
|
|
35
39
|
verticalAlign: "top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top";
|
|
36
|
-
}, {}>, {
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
37
41
|
default?(_: {}): any;
|
|
38
42
|
}>;
|
|
39
43
|
export default _default;
|
|
@@ -5,12 +5,13 @@ const o = {
|
|
|
5
5
|
}, v = {
|
|
6
6
|
pointer: Boolean,
|
|
7
7
|
striped: Boolean,
|
|
8
|
+
selected: Boolean,
|
|
8
9
|
verticalAlign: {
|
|
9
10
|
type: String,
|
|
10
11
|
default: "top",
|
|
11
12
|
validator: (t) => o.verticalAlign.includes(t)
|
|
12
13
|
}
|
|
13
|
-
}, A = { name: "XTableRow", validators: o },
|
|
14
|
+
}, A = { name: "XTableRow", validators: o }, w = /* @__PURE__ */ c({
|
|
14
15
|
...A,
|
|
15
16
|
props: v,
|
|
16
17
|
setup(t) {
|
|
@@ -24,5 +25,5 @@ const o = {
|
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
w as default
|
|
28
29
|
};
|
|
@@ -2,7 +2,7 @@ const s = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
row: ({ props: r }) => {
|
|
4
4
|
const e = [];
|
|
5
|
-
return 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;
|
|
5
|
+
return r.selected && e.push("shadow-[inset_3px_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;
|