@czxingyu/xycomponents 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -29
- package/README.zh-CN.md +15 -12
- package/dist/anchor/anchor.js +1 -1
- package/dist/anchor/anchor.vue_vue_type_script_setup_true_lang.js +3 -6
- package/dist/descriptions/descriptions.js +1 -1
- package/dist/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +69 -65
- package/dist/index.esm.js +105 -94
- package/dist/index.lite.esm.js +95 -90
- package/dist/index.umd.js +3 -3
- package/dist/package.js +1 -1
- package/dist/steps/steps.js +1 -1
- package/dist/steps/steps.vue_vue_type_script_setup_true_lang.js +22 -18
- package/dist/table/table.js +1 -1
- package/dist/table/table.vue_vue_type_script_setup_true_lang.js +32 -26
- package/dist/xycomponents-lite.css +1 -1
- package/dist/xycomponents.css +1 -1
- package/package.json +3 -2
- package/skills/README.md +64 -0
- package/skills/xycomponents-cli/SKILL.md +101 -0
- package/skills/xycomponents-contribute/SKILL.md +109 -0
- package/skills/xycomponents-maintainer/SKILL.md +118 -0
- package/skills/xycomponents-shared/SKILL.md +100 -0
package/dist/package.js
CHANGED
package/dist/steps/steps.js
CHANGED
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./steps.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region components/steps/steps.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-0975956e"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -231,11 +231,7 @@ var w = ["aria-disabled", "aria-label"], T = ["data-status", "data-step-key"], E
|
|
|
231
231
|
style: h([K.value.item, t.style]),
|
|
232
232
|
"data-status": Y(t, n),
|
|
233
233
|
"data-step-key": t.key
|
|
234
|
-
}, [
|
|
235
|
-
class: m(["xy-steps__tail", G.value.tail]),
|
|
236
|
-
style: h(K.value.tail),
|
|
237
|
-
"aria-hidden": "true"
|
|
238
|
-
}, null, 6), (g(), c(ne(z.value ? "button" : "div"), {
|
|
234
|
+
}, [(g(), c(ne(z.value ? "button" : "div"), {
|
|
239
235
|
class: "xy-steps__main",
|
|
240
236
|
"aria-current": n === R.value ? "step" : void 0,
|
|
241
237
|
"aria-disabled": A.disabled || t.disabled || void 0,
|
|
@@ -268,19 +264,27 @@ var w = ["aria-disabled", "aria-label"], T = ["data-status", "data-step-key"], E
|
|
|
268
264
|
})) : (g(), u("span", D, y(n + 1), 1)), Z(t, n, Y(t, n)) ? (g(), u("span", O, y(H.value) + "% ", 1)) : l("", !0)], !0)], 6), d("span", {
|
|
269
265
|
class: m(["xy-steps__content", G.value.content]),
|
|
270
266
|
style: h(K.value.content)
|
|
271
|
-
}, [d("span", k, [
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
267
|
+
}, [d("span", k, [
|
|
268
|
+
d("span", {
|
|
269
|
+
class: m(["xy-steps__title", G.value.title]),
|
|
270
|
+
style: h(K.value.title)
|
|
271
|
+
}, [v(e.$slots, "title", {
|
|
272
|
+
current: n === R.value,
|
|
273
|
+
index: n,
|
|
274
|
+
item: t,
|
|
275
|
+
status: Y(t, n)
|
|
276
|
+
}, () => [f(b(M), { content: t.title }, null, 8, ["content"])], !0)], 6),
|
|
277
|
+
t.subTitle ? (g(), u("span", {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: m(["xy-steps__subtitle", G.value.subTitle]),
|
|
280
|
+
style: h(K.value.subTitle)
|
|
281
|
+
}, [f(b(M), { content: t.subTitle }, null, 8, ["content"])], 6)) : l("", !0),
|
|
282
|
+
d("span", {
|
|
283
|
+
class: m(["xy-steps__tail", G.value.tail]),
|
|
284
|
+
style: h(K.value.tail),
|
|
285
|
+
"aria-hidden": "true"
|
|
286
|
+
}, null, 6)
|
|
287
|
+
]), t.description || b(ie).description ? (g(), u("span", {
|
|
284
288
|
key: 0,
|
|
285
289
|
class: m(["xy-steps__description", G.value.description]),
|
|
286
290
|
style: h(K.value.description)
|
package/dist/table/table.js
CHANGED
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./table.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region components/table/table.vue
|
|
5
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-90886cf3"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -309,7 +309,7 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
309
309
|
}, { default: () => n }) : n;
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
}), St = s(() => w.dataSource ?? w.data ?? []), O = s(() => me(w.columns)), Ct = s(() => w.orientation === "vertical"), k = s(() => ge(w.resizable)), A = s(() => _e(w.virtual)), wt = s(() => typeof A.value.height == "string" && A.value.height.trim() === "100%"), j = s(() => A.value.enabled && !w.autoHeight && !Ct.value &&
|
|
312
|
+
}), St = s(() => w.dataSource ?? w.data ?? []), O = s(() => me(w.columns)), Ct = s(() => w.orientation === "vertical"), k = s(() => ge(w.resizable)), A = s(() => _e(w.virtual)), wt = s(() => typeof A.value.height == "string" && A.value.height.trim() === "100%"), j = s(() => A.value.enabled && !w.autoHeight && !Ct.value && R.value.length > 0), Tt = s(() => !!w.tree && !Ct.value), M = s(() => !!w.rowSelection && !Ct.value), Et = s(() => k.value.columns || O.value.some((e) => !!e.fixed)), Dt = g(he(w.columnWidths)), N = g(he(w.rowHeights)), Ot = g(null), kt = g({}), At = g(w.pagination ? w.pagination.current ?? 1 : 1), jt = g(w.pagination ? w.pagination.pageSize ?? 10 : 10), Mt = g(w.rowSelection?.defaultSelectedRowKeys ?? []), Nt = g(typeof w.tree == "object" ? w.tree.defaultExpandedRowKeys ?? [] : []), Pt = g(null), Ft = g(), It = g(), Lt = g(), Rt = g();
|
|
313
313
|
De(() => w.columnWidths, (e) => {
|
|
314
314
|
Dt.value = he(e);
|
|
315
315
|
}), De(() => w.rowHeights, (e) => {
|
|
@@ -334,11 +334,11 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
334
334
|
pageSize: Math.max(1, t),
|
|
335
335
|
total: n
|
|
336
336
|
};
|
|
337
|
-
}), L = s(() => w.pagination || void 0), Wt = s(() => w.pagination ? ve(Ut.value, I.value.current, I.value.pageSize) : Ut.value),
|
|
337
|
+
}), L = s(() => w.pagination || void 0), Wt = s(() => w.pagination ? ve(Ut.value, I.value.current, I.value.pageSize) : Ut.value), Gt = s(() => Wt.value.map((e, t) => ({
|
|
338
338
|
index: t,
|
|
339
339
|
key: de(e, (I.value.current - 1) * I.value.pageSize + t, w.rowKey),
|
|
340
340
|
record: e
|
|
341
|
-
}))),
|
|
341
|
+
}))), R = s(() => se(Wt.value, w.rowKey, Tt.value ? w.tree : void 0, Vt.value)), Kt = s(() => Math.max(1, Math.ceil(I.value.total / I.value.pageSize))), z = s(() => new Set(Bt.value)), qt = s(() => R.value.filter((e) => !xn(e.record)).map((e) => e.key)), Jt = s(() => qt.value.length > 0 && qt.value.every((e) => z.value.has(e))), Yt = s(() => qt.value.some((e) => z.value.has(e))), Xt = s(() => !!w.pagination && (!w.pagination || !w.pagination.hideOnSinglePage || I.value.total > I.value.pageSize)), Zt = s(() => (M.value ? gt : 0) + O.value.reduce((e, t) => e + U(t), 0)), Qt = s(() => W(S) + Gt.value.reduce((e, t) => e + W(t.key), 0)), $t = s(() => [M.value ? `${gt}px` : "", ...O.value.map((e) => `${U(e)}px`)].filter(Boolean).join(" ")), en = s(() => ({
|
|
342
342
|
maxHeight: w.autoHeight ? void 0 : a(w.scroll?.y),
|
|
343
343
|
overflowX: w.scroll?.x ? "auto" : void 0,
|
|
344
344
|
overflowY: w.autoHeight || !w.scroll?.y ? void 0 : "auto",
|
|
@@ -362,18 +362,18 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
362
362
|
})), rn = s(() => ({
|
|
363
363
|
bordered: w.bordered,
|
|
364
364
|
columnCount: O.value.length,
|
|
365
|
-
empty:
|
|
365
|
+
empty: R.value.length === 0,
|
|
366
366
|
loading: w.loading,
|
|
367
367
|
orientation: w.orientation,
|
|
368
|
-
rowCount:
|
|
368
|
+
rowCount: R.value.length,
|
|
369
369
|
size: w.size,
|
|
370
370
|
striped: w.striped,
|
|
371
371
|
virtual: j.value
|
|
372
372
|
})), B = s(() => e(w.classNames, rn.value)), V = s(() => t(w.styles, rn.value)), an = ke(s(() => ({
|
|
373
|
-
count:
|
|
373
|
+
count: R.value.length,
|
|
374
374
|
enabled: j.value,
|
|
375
|
-
estimateSize: (e) => cn(
|
|
376
|
-
getItemKey: (e) =>
|
|
375
|
+
estimateSize: (e) => cn(R.value[e]),
|
|
376
|
+
getItemKey: (e) => R.value[e]?.key ?? e,
|
|
377
377
|
getScrollElement: () => Pt.value,
|
|
378
378
|
initialRect: {
|
|
379
379
|
height: ye(A.value.height, 320),
|
|
@@ -384,16 +384,16 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
384
384
|
if (!j.value) return [];
|
|
385
385
|
let e = an.value.getVirtualItems();
|
|
386
386
|
if (e.length > 0) return e;
|
|
387
|
-
let t = ye(A.value.height, 320), n = A.value.rowHeight, r = Math.min(
|
|
387
|
+
let t = ye(A.value.height, 320), n = A.value.rowHeight, r = Math.min(R.value.length, Math.ceil(t / n) + A.value.overscan);
|
|
388
388
|
return Array.from({ length: r }, (e, t) => ({
|
|
389
389
|
end: (t + 1) * n,
|
|
390
390
|
index: t,
|
|
391
|
-
key:
|
|
391
|
+
key: R.value[t]?.key ?? t,
|
|
392
392
|
lane: 0,
|
|
393
|
-
size: cn(
|
|
393
|
+
size: cn(R.value[t]),
|
|
394
394
|
start: t * n
|
|
395
395
|
}));
|
|
396
|
-
}), sn = s(() => j.value ? an.value.getTotalSize() ||
|
|
396
|
+
}), sn = s(() => j.value ? an.value.getTotalSize() || R.value.length * A.value.rowHeight : 0), H;
|
|
397
397
|
function U(e) {
|
|
398
398
|
return oe(ce(e, Dt.value), ye(e.minWidth, k.value.minColumnWidth), e.maxWidth);
|
|
399
399
|
}
|
|
@@ -564,14 +564,14 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
566
|
function Tn(e, t) {
|
|
567
|
-
At.value = Math.min(Math.max(1, e),
|
|
567
|
+
At.value = Math.min(Math.max(1, e), Kt.value), jt.value = t, Sn({ pagination: {
|
|
568
568
|
...I.value,
|
|
569
569
|
current: At.value,
|
|
570
570
|
pageSize: t
|
|
571
571
|
} });
|
|
572
572
|
}
|
|
573
573
|
function En(e) {
|
|
574
|
-
Mt.value = e, T("update:selectedRowKeys", e), w.rowSelection?.onChange?.(e,
|
|
574
|
+
Mt.value = e, T("update:selectedRowKeys", e), w.rowSelection?.onChange?.(e, R.value.filter((t) => e.includes(t.key)).map((e) => e.record));
|
|
575
575
|
}
|
|
576
576
|
function Dn(e, t) {
|
|
577
577
|
let n = pe(Bt.value, e.key, t, w.rowSelection?.type ?? "checkbox");
|
|
@@ -650,7 +650,7 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
650
650
|
H = void 0, Ft.value = void 0, It.value = void 0, Lt.value = void 0, Rt.value = void 0, document.removeEventListener("pointermove", Pn), document.removeEventListener("pointerup", Fn), document.removeEventListener("mousemove", Pn), document.removeEventListener("mouseup", Fn);
|
|
651
651
|
}
|
|
652
652
|
function $(e) {
|
|
653
|
-
return
|
|
653
|
+
return R.value[e.index];
|
|
654
654
|
}
|
|
655
655
|
return Te(Fn), (e, t) => (h(), l("div", {
|
|
656
656
|
class: p(["xy-table", [nn.value, B.value.root]]),
|
|
@@ -663,22 +663,22 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
663
663
|
key: 0,
|
|
664
664
|
class: p(["xy-table__table xy-table__table--vertical", B.value.table]),
|
|
665
665
|
style: m(tn.value)
|
|
666
|
-
}, [
|
|
666
|
+
}, [Gt.value.length ? (h(), l("colgroup", je, [u("col", { style: m({ width: `${W(S)}px` }) }, null, 4), (h(!0), l(o, null, _(Gt.value, (e) => (h(), l("col", {
|
|
667
667
|
key: e.key,
|
|
668
668
|
style: m({ width: `${W(e.key)}px` })
|
|
669
669
|
}, null, 4))), 128))])) : c("", !0), u("tbody", {
|
|
670
670
|
class: p(B.value.body),
|
|
671
671
|
style: m(V.value.body)
|
|
672
|
-
}, [
|
|
672
|
+
}, [Gt.value.length === 0 ? (h(), l("tr", Me, [u("td", {
|
|
673
673
|
class: p(["xy-table__empty", B.value.empty]),
|
|
674
|
-
colspan:
|
|
674
|
+
colspan: Gt.value.length + 1,
|
|
675
675
|
style: m(V.value.empty)
|
|
676
676
|
}, [E.empty ? v(e.$slots, "empty", { key: 0 }, void 0, !0) : (h(), be(te, {
|
|
677
677
|
key: 1,
|
|
678
678
|
title: yt.value
|
|
679
679
|
}, null, 8, ["title"]))], 14, Ne)])) : (h(!0), l(o, { key: 1 }, _(O.value, (n, r) => (h(), l("tr", {
|
|
680
680
|
key: n.key,
|
|
681
|
-
class: p(["xy-table__row", B.value.row]),
|
|
681
|
+
class: p(["xy-table__row", [B.value.row, { "xy-table__row--resize-active": J(n.key) }]]),
|
|
682
682
|
"data-row-key": n.key,
|
|
683
683
|
style: m(dn(n))
|
|
684
684
|
}, [u("th", {
|
|
@@ -720,7 +720,7 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
720
720
|
onMousedown: x((e) => Q(n.key, e), ["stop"]),
|
|
721
721
|
onPointerdown: x((e) => Q(n.key, e), ["stop"])
|
|
722
722
|
}, null, 46, Le)) : c("", !0)
|
|
723
|
-
], 6), (h(!0), l(o, null, _(
|
|
723
|
+
], 6), (h(!0), l(o, null, _(Gt.value, (r) => (h(), l("td", {
|
|
724
724
|
key: r.key,
|
|
725
725
|
class: p(["xy-table__vertical-value", B.value.verticalValue]),
|
|
726
726
|
"data-column-key": r.key,
|
|
@@ -878,7 +878,10 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
878
878
|
})
|
|
879
879
|
}, [(h(!0), l(o, null, _(on.value, (n) => (h(), l("div", {
|
|
880
880
|
key: String(n.key),
|
|
881
|
-
class: p(["xy-table__virtual-row xy-table__row", [B.value.row, {
|
|
881
|
+
class: p(["xy-table__virtual-row xy-table__row", [B.value.row, {
|
|
882
|
+
"xy-table__row--selected": $(n) && z.value.has($(n).key),
|
|
883
|
+
"xy-table__row--resize-active": $(n) && J($(n))
|
|
884
|
+
}]]),
|
|
882
885
|
"data-row-key": $(n)?.key,
|
|
883
886
|
style: m([$(n) ? un($(n)) : {}, {
|
|
884
887
|
gridTemplateColumns: $t.value,
|
|
@@ -894,7 +897,7 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
894
897
|
onClick: t[8] ||= x(() => {}, ["stop"])
|
|
895
898
|
}, [f(i, {
|
|
896
899
|
"aria-label": b(D).table.selectRowAriaLabel($(n).index + 1),
|
|
897
|
-
"model-value":
|
|
900
|
+
"model-value": z.value.has($(n).key),
|
|
898
901
|
disabled: xn($(n).record),
|
|
899
902
|
onChange: (e) => Dn($(n), e)
|
|
900
903
|
}, null, 8, [
|
|
@@ -1094,9 +1097,12 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
1094
1097
|
u("tbody", {
|
|
1095
1098
|
class: p(B.value.body),
|
|
1096
1099
|
style: m(V.value.body)
|
|
1097
|
-
}, [(h(!0), l(o, null, _(
|
|
1100
|
+
}, [(h(!0), l(o, null, _(R.value, (n) => (h(), l("tr", {
|
|
1098
1101
|
key: n.key,
|
|
1099
|
-
class: p(["xy-table__row", [B.value.row, {
|
|
1102
|
+
class: p(["xy-table__row", [B.value.row, {
|
|
1103
|
+
"xy-table__row--selected": z.value.has(n.key),
|
|
1104
|
+
"xy-table__row--resize-active": J(n)
|
|
1105
|
+
}]]),
|
|
1100
1106
|
"data-row-key": n.key,
|
|
1101
1107
|
style: m(un(n)),
|
|
1102
1108
|
onClick: (e) => An(n, e)
|
|
@@ -1106,7 +1112,7 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
1106
1112
|
onClick: t[12] ||= x(() => {}, ["stop"])
|
|
1107
1113
|
}, [f(i, {
|
|
1108
1114
|
"aria-label": b(D).table.selectRowAriaLabel(n.index + 1),
|
|
1109
|
-
"model-value":
|
|
1115
|
+
"model-value": z.value.has(n.key),
|
|
1110
1116
|
disabled: xn(n.record),
|
|
1111
1117
|
onChange: (e) => Dn(n, e)
|
|
1112
1118
|
}, null, 8, [
|
|
@@ -1206,7 +1212,7 @@ var Ae = ["aria-busy"], je = { key: 0 }, Me = { key: 0 }, Ne = ["colspan"], Pe =
|
|
|
1206
1212
|
onMousedown: x((e) => Q(n, e), ["stop"]),
|
|
1207
1213
|
onPointerdown: x((e) => Q(n, e), ["stop"])
|
|
1208
1214
|
}, null, 46, ft)) : c("", !0)
|
|
1209
|
-
], 14, st))), 128))], 14, at))), 128)),
|
|
1215
|
+
], 14, st))), 128))], 14, at))), 128)), R.value.length === 0 ? (h(), l("tr", pt, [u("td", {
|
|
1210
1216
|
class: p(["xy-table__empty", B.value.empty]),
|
|
1211
1217
|
colspan: O.value.length + +!!M.value || 1,
|
|
1212
1218
|
style: m(V.value.empty)
|