@indielayer/ui 1.9.0 → 1.9.2
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 +6 -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 +41 -24
- package/lib/components/table/Table.vue.js +123 -116
- 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 +10 -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 S, useModel as Q, computed as x, ref as R, watch as U, openBlock as l, createElementBlock as i, 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
|
+
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 I from "./TableHeader.vue.js";
|
|
6
|
+
import ee from "./TableBody.js";
|
|
7
|
+
import T 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 re = { key: 1 }, ae = { colspan: "999" }, ie = { key: 2 }, ne = { colspan: "999" }, de = ["onClick"], ue = { colspan: "999" }, pe = {
|
|
14
14
|
headers: {
|
|
15
15
|
type: Array,
|
|
16
16
|
default: () => []
|
|
@@ -53,104 +53,108 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
53
53
|
virtualListOverscan: {
|
|
54
54
|
type: Number,
|
|
55
55
|
default: 5
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
},
|
|
57
|
+
keyProp: String
|
|
58
|
+
}, ce = { name: "XTable" }, Le = /* @__PURE__ */ K({
|
|
59
|
+
...ce,
|
|
60
|
+
props: /* @__PURE__ */ S({
|
|
61
|
+
...pe,
|
|
61
62
|
items: {
|
|
62
63
|
type: Array,
|
|
63
64
|
default: () => []
|
|
64
65
|
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
}, {
|
|
67
|
+
selected: {},
|
|
68
|
+
selectedModifiers: {}
|
|
69
|
+
}),
|
|
70
|
+
emits: /* @__PURE__ */ S(["update:sort", "click-row"], ["update:selected"]),
|
|
71
|
+
setup(B, { emit: z }) {
|
|
72
|
+
const a = B, L = Q(B, "selected"), A = x(() => typeof L.value == "number");
|
|
73
|
+
function V(e) {
|
|
70
74
|
try {
|
|
71
75
|
return JSON.parse(JSON.stringify(e));
|
|
72
76
|
} catch {
|
|
73
77
|
return [];
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
|
-
const b =
|
|
80
|
+
const b = x(() => a.items), { list: M, containerProps: D, wrapperProps: E } = Z(
|
|
77
81
|
b,
|
|
78
82
|
{
|
|
79
|
-
disabled: !
|
|
80
|
-
itemHeight:
|
|
81
|
-
topOffset:
|
|
82
|
-
bottomOffset:
|
|
83
|
-
overscan:
|
|
83
|
+
disabled: !a.virtualList,
|
|
84
|
+
itemHeight: a.virtualListItemHeight || 54,
|
|
85
|
+
topOffset: a.virtualListOffsetTop || 0,
|
|
86
|
+
bottomOffset: a.virtualListOffsetBottom || 0,
|
|
87
|
+
overscan: a.virtualListOverscan
|
|
84
88
|
}
|
|
85
|
-
),
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
), y = R([]);
|
|
90
|
+
U(b, (e) => {
|
|
91
|
+
a.expandable && (y.value = V(e));
|
|
88
92
|
}, { immediate: !0 });
|
|
89
|
-
const
|
|
90
|
-
function
|
|
93
|
+
const J = z;
|
|
94
|
+
function X(e, o) {
|
|
91
95
|
if (e)
|
|
92
96
|
for (let t = 0; t < o.length; t++) {
|
|
93
|
-
const { 0:
|
|
94
|
-
if (e ===
|
|
97
|
+
const { 0: r, 1: s } = o[t].split(",");
|
|
98
|
+
if (e === r)
|
|
95
99
|
return parseInt(s) > 0 ? 1 : -1;
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
|
-
function
|
|
99
|
-
const o =
|
|
102
|
+
function F(e) {
|
|
103
|
+
const o = a.sort.slice(0);
|
|
100
104
|
let t = !1;
|
|
101
|
-
for (let
|
|
102
|
-
const { 0: s, 1:
|
|
105
|
+
for (let r = 0; r < o.length; r++) {
|
|
106
|
+
const { 0: s, 1: d } = o[r].split(",");
|
|
103
107
|
if (s === e.value) {
|
|
104
|
-
if (t = !0,
|
|
105
|
-
o.splice(
|
|
108
|
+
if (t = !0, d === "-1") {
|
|
109
|
+
o.splice(r, 1, `${e.value},1`);
|
|
106
110
|
break;
|
|
107
|
-
} else if (
|
|
108
|
-
o.splice(
|
|
111
|
+
} else if (d === "1") {
|
|
112
|
+
o.splice(r, 1);
|
|
109
113
|
break;
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
|
-
t || o.push(`${e.value},-1`),
|
|
117
|
+
t || o.push(`${e.value},-1`), J("update:sort", o);
|
|
114
118
|
}
|
|
115
|
-
function
|
|
119
|
+
function W(e, o) {
|
|
116
120
|
if (!o)
|
|
117
121
|
return "";
|
|
118
122
|
const t = Array.isArray(o) ? o : o.match(/([^[.\]])+/g);
|
|
119
|
-
return (t == null ? void 0 : t.reduce((s,
|
|
123
|
+
return (t == null ? void 0 : t.reduce((s, d) => s && s[d], e)) ?? "";
|
|
120
124
|
}
|
|
121
|
-
const { styles:
|
|
122
|
-
return (e, o) => (
|
|
123
|
-
class: [n(
|
|
124
|
-
}, n(
|
|
125
|
+
const { styles: q, classes: w, className: G } = Y("Table", {}, a);
|
|
126
|
+
return (e, o) => (l(), i("div", C({
|
|
127
|
+
class: [n(G), n(w).wrapper]
|
|
128
|
+
}, n(D)), [
|
|
125
129
|
p(e.$slots, "title"),
|
|
126
130
|
p(e.$slots, "actions"),
|
|
127
|
-
|
|
131
|
+
f("div", C(n(E), {
|
|
128
132
|
class: {
|
|
129
|
-
"!h-auto":
|
|
133
|
+
"!h-auto": a.loading
|
|
130
134
|
}
|
|
131
135
|
}), [
|
|
132
|
-
|
|
133
|
-
style:
|
|
134
|
-
class:
|
|
136
|
+
f("table", {
|
|
137
|
+
style: H(n(q)),
|
|
138
|
+
class: m(n(w).table)
|
|
135
139
|
}, [
|
|
136
|
-
|
|
137
|
-
default:
|
|
138
|
-
e.expandable ? (
|
|
140
|
+
v(j, { "sticky-header": e.stickyHeader }, {
|
|
141
|
+
default: c(() => [
|
|
142
|
+
e.expandable ? (l(), g(I, {
|
|
139
143
|
key: 0,
|
|
140
144
|
width: "48",
|
|
141
145
|
class: "!p-0"
|
|
142
146
|
})) : $("", !0),
|
|
143
|
-
(
|
|
144
|
-
key:
|
|
147
|
+
(l(!0), i(k, null, h(e.headers, (t, r) => (l(), g(I, {
|
|
148
|
+
key: r,
|
|
145
149
|
"text-align": t.align,
|
|
146
|
-
sort:
|
|
150
|
+
sort: X(t.value, e.sort),
|
|
147
151
|
sortable: t.sortable,
|
|
148
152
|
width: t.width,
|
|
149
|
-
onClick: (s) => t.sortable ?
|
|
153
|
+
onClick: (s) => t.sortable ? F(t) : null
|
|
150
154
|
}, {
|
|
151
|
-
default:
|
|
155
|
+
default: c(() => [
|
|
152
156
|
p(e.$slots, `header-${t.value}`, { header: t }, () => [
|
|
153
|
-
|
|
157
|
+
O(P(t.text), 1)
|
|
154
158
|
])
|
|
155
159
|
]),
|
|
156
160
|
_: 2
|
|
@@ -158,24 +162,24 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
158
162
|
]),
|
|
159
163
|
_: 3
|
|
160
164
|
}, 8, ["sticky-header"]),
|
|
161
|
-
|
|
162
|
-
default:
|
|
163
|
-
e.loading ? (
|
|
164
|
-
key:
|
|
165
|
+
v(n(ee), null, {
|
|
166
|
+
default: c(() => [
|
|
167
|
+
e.loading ? (l(!0), i(k, { key: 0 }, h(Number(e.loadingLines), (t, r) => (l(), g(T, {
|
|
168
|
+
key: r,
|
|
165
169
|
striped: e.striped
|
|
166
170
|
}, {
|
|
167
|
-
default:
|
|
168
|
-
(
|
|
169
|
-
key:
|
|
171
|
+
default: c(() => [
|
|
172
|
+
(l(!0), i(k, null, h(e.headers, (s, d) => (l(), g(_, {
|
|
173
|
+
key: d,
|
|
170
174
|
"text-align": s.align,
|
|
171
175
|
width: s.width,
|
|
172
176
|
dense: e.dense,
|
|
173
177
|
fixed: e.fixed
|
|
174
178
|
}, {
|
|
175
|
-
default:
|
|
179
|
+
default: c(() => [
|
|
176
180
|
p(e.$slots, `loading-${s.value}`, { item: t }, () => [
|
|
177
|
-
|
|
178
|
-
class:
|
|
181
|
+
v(se, {
|
|
182
|
+
class: m(["max-w-[60%]", {
|
|
179
183
|
"mx-auto": s.align === "center",
|
|
180
184
|
"ml-auto": s.align === "right"
|
|
181
185
|
}]),
|
|
@@ -187,80 +191,83 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
187
191
|
}, 1032, ["text-align", "width", "dense", "fixed"]))), 128))
|
|
188
192
|
]),
|
|
189
193
|
_: 2
|
|
190
|
-
}, 1032, ["striped"]))), 128)) : e.error ? (
|
|
191
|
-
|
|
194
|
+
}, 1032, ["striped"]))), 128)) : e.error ? (l(), i("tr", re, [
|
|
195
|
+
f("td", ae, [
|
|
192
196
|
p(e.$slots, "error")
|
|
193
197
|
])
|
|
194
|
-
])) : !b.value || b.value.length === 0 ? (
|
|
195
|
-
|
|
198
|
+
])) : !b.value || b.value.length === 0 ? (l(), i("tr", ie, [
|
|
199
|
+
f("td", ne, [
|
|
196
200
|
p(e.$slots, "empty")
|
|
197
201
|
])
|
|
198
|
-
])) : (
|
|
199
|
-
var s,
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
+
])) : (l(!0), i(k, { key: 3 }, h(n(M), (t, r) => {
|
|
203
|
+
var s, d;
|
|
204
|
+
return l(), i(k, {
|
|
205
|
+
key: e.keyProp ?? r
|
|
206
|
+
}, [
|
|
207
|
+
v(T, {
|
|
202
208
|
pointer: e.pointer,
|
|
203
209
|
striped: e.striped,
|
|
204
|
-
|
|
210
|
+
selected: A.value ? L.value === (e.keyProp ? t.data[e.keyProp] : t.index) : void 0,
|
|
211
|
+
onClick: (u) => e.$emit("click-row", t.data, t.index)
|
|
205
212
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
e.expandable ? (
|
|
213
|
+
default: c(() => [
|
|
214
|
+
e.expandable ? (l(), g(_, {
|
|
208
215
|
key: 0,
|
|
209
216
|
width: "48",
|
|
210
217
|
class: "!p-1"
|
|
211
218
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
var
|
|
219
|
+
default: c(() => {
|
|
220
|
+
var u;
|
|
214
221
|
return [
|
|
215
|
-
|
|
222
|
+
f("button", {
|
|
216
223
|
type: "button",
|
|
217
|
-
class:
|
|
218
|
-
onClick: (
|
|
224
|
+
class: m(["px-3 p-2", [e.dense ? "p-0.5" : "px-3 py-2"]]),
|
|
225
|
+
onClick: (N) => y.value[t.index].__expanded = !y.value[t.index].__expanded
|
|
219
226
|
}, [
|
|
220
|
-
|
|
221
|
-
icon: n(
|
|
227
|
+
v(le, {
|
|
228
|
+
icon: n(oe),
|
|
222
229
|
size: e.dense ? "xs" : "md",
|
|
223
|
-
class:
|
|
224
|
-
"rotate-180": (
|
|
230
|
+
class: m(["transition-transform", {
|
|
231
|
+
"rotate-180": (u = y.value[t.index]) == null ? void 0 : u.__expanded
|
|
225
232
|
}])
|
|
226
233
|
}, null, 8, ["icon", "size", "class"])
|
|
227
|
-
], 10,
|
|
234
|
+
], 10, de)
|
|
228
235
|
];
|
|
229
236
|
}),
|
|
230
237
|
_: 2
|
|
231
238
|
}, 1024)) : $("", !0),
|
|
232
|
-
(
|
|
233
|
-
key:
|
|
234
|
-
"text-align":
|
|
235
|
-
truncate:
|
|
236
|
-
width:
|
|
239
|
+
(l(!0), i(k, null, h(e.headers, (u, N) => (l(), g(_, {
|
|
240
|
+
key: N,
|
|
241
|
+
"text-align": u.align,
|
|
242
|
+
truncate: u.truncate,
|
|
243
|
+
width: u.width,
|
|
237
244
|
dense: e.dense,
|
|
238
|
-
style:
|
|
239
|
-
height: `${
|
|
240
|
-
maxHeight: `${
|
|
245
|
+
style: H([a.virtualList ? {
|
|
246
|
+
height: `${a.virtualListItemHeight}px`,
|
|
247
|
+
maxHeight: `${a.virtualListItemHeight}px`,
|
|
241
248
|
overflow: "hidden",
|
|
242
249
|
whiteSpace: "nowrap"
|
|
243
250
|
} : {}])
|
|
244
251
|
}, {
|
|
245
|
-
default:
|
|
246
|
-
p(e.$slots, `item-${
|
|
252
|
+
default: c(() => [
|
|
253
|
+
p(e.$slots, `item-${u.value}`, {
|
|
247
254
|
item: t.data
|
|
248
255
|
}, () => [
|
|
249
|
-
|
|
256
|
+
O(P(W(t.data, u.value)), 1)
|
|
250
257
|
])
|
|
251
258
|
]),
|
|
252
259
|
_: 2
|
|
253
260
|
}, 1032, ["text-align", "truncate", "width", "dense", "style"]))), 128))
|
|
254
261
|
]),
|
|
255
262
|
_: 2
|
|
256
|
-
}, 1032, ["pointer", "striped", "onClick"]),
|
|
257
|
-
e.expandable ? (
|
|
263
|
+
}, 1032, ["pointer", "striped", "selected", "onClick"]),
|
|
264
|
+
e.expandable ? (l(), i("tr", {
|
|
258
265
|
key: 0,
|
|
259
|
-
class:
|
|
266
|
+
class: m({ hidden: !((s = y.value[t.index]) != null && s.__expanded) })
|
|
260
267
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
class:
|
|
268
|
+
f("td", ue, [
|
|
269
|
+
f("div", {
|
|
270
|
+
class: m(["overflow-hidden transition-opacity", [(d = y.value[t.index]) != null && d.__expanded ? "" : "opacity-0 max-h-0"]])
|
|
264
271
|
}, [
|
|
265
272
|
p(e.$slots, "expanded-row", {
|
|
266
273
|
item: t.data
|
|
@@ -273,11 +280,11 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
273
280
|
]),
|
|
274
281
|
_: 3
|
|
275
282
|
}),
|
|
276
|
-
e.loading ? (
|
|
283
|
+
e.loading ? (l(), i("div", {
|
|
277
284
|
key: 0,
|
|
278
|
-
class:
|
|
285
|
+
class: m(n(w).loadingWrapper)
|
|
279
286
|
}, [
|
|
280
|
-
|
|
287
|
+
v(te, { size: "lg" })
|
|
281
288
|
], 2)) : $("", !0)
|
|
282
289
|
], 6)
|
|
283
290
|
], 16)
|
|
@@ -285,5 +292,5 @@ const te = { key: 1 }, se = { colspan: "999" }, ie = { key: 2 }, oe = { colspan:
|
|
|
285
292
|
}
|
|
286
293
|
});
|
|
287
294
|
export {
|
|
288
|
-
|
|
295
|
+
Le as default
|
|
289
296
|
};
|
|
@@ -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;
|