@conboai/storybook.components 0.2.70 → 0.2.71
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/dist/storybook.components.mjs +42 -31
- package/package.json +1 -1
|
@@ -42089,25 +42089,25 @@ const Xk = {
|
|
|
42089
42089
|
totalRows: v = 0,
|
|
42090
42090
|
variant: y = "light"
|
|
42091
42091
|
}) => {
|
|
42092
|
-
const [p, f] = je(0), [m, x] = je(r[0]), [b, T] = je(null), k = (
|
|
42093
|
-
f(
|
|
42094
|
-
},
|
|
42095
|
-
const
|
|
42096
|
-
x(
|
|
42092
|
+
const [p, f] = je(0), [m, x] = je(r[0]), [b, T] = je(null), [k, C] = je(null), w = (D, I) => {
|
|
42093
|
+
f(I), h && h(I, m);
|
|
42094
|
+
}, A = (D) => {
|
|
42095
|
+
const I = parseInt(D.target.value, 10);
|
|
42096
|
+
x(I), f(0), h && h(0, I);
|
|
42097
42097
|
};
|
|
42098
42098
|
Le(() => {
|
|
42099
42099
|
d && b && d(b.key, b.direction);
|
|
42100
42100
|
}, [b]);
|
|
42101
|
-
const
|
|
42102
|
-
!b || b.key !==
|
|
42103
|
-
key:
|
|
42101
|
+
const F = (D) => {
|
|
42102
|
+
!b || b.key !== D ? T({ key: D, direction: "asc" }) : T({
|
|
42103
|
+
key: D,
|
|
42104
42104
|
direction: b.direction === "asc" ? "desc" : "asc"
|
|
42105
42105
|
});
|
|
42106
|
-
},
|
|
42107
|
-
const
|
|
42108
|
-
` + e.map((
|
|
42109
|
-
`),
|
|
42110
|
-
|
|
42106
|
+
}, U = () => {
|
|
42107
|
+
const D = "data:text/csv;charset=utf-8," + t.map((P) => P.label).join(",") + `
|
|
42108
|
+
` + e.map((P) => t.map((S) => P[S.key]).join(",")).join(`
|
|
42109
|
+
`), I = encodeURI(D), O = document.createElement("a");
|
|
42110
|
+
O.setAttribute("href", I), O.setAttribute("download", "table_data.csv"), document.body.appendChild(O), O.click();
|
|
42111
42111
|
};
|
|
42112
42112
|
return /* @__PURE__ */ te.jsxs(
|
|
42113
42113
|
Fi,
|
|
@@ -42119,7 +42119,7 @@ const Xk = {
|
|
|
42119
42119
|
},
|
|
42120
42120
|
children: [
|
|
42121
42121
|
/* @__PURE__ */ te.jsx(u0, { sx: { flex: 1 }, children: /* @__PURE__ */ te.jsxs(l0, { stickyHeader: !0, children: [
|
|
42122
|
-
/* @__PURE__ */ te.jsx(PE, { children: /* @__PURE__ */ te.jsx(Da, { children: t.map((
|
|
42122
|
+
/* @__PURE__ */ te.jsx(PE, { children: /* @__PURE__ */ te.jsx(Da, { children: t.map((D) => /* @__PURE__ */ te.jsx(
|
|
42123
42123
|
lo,
|
|
42124
42124
|
{
|
|
42125
42125
|
sx: {
|
|
@@ -42128,14 +42128,14 @@ const Xk = {
|
|
|
42128
42128
|
children: s ? /* @__PURE__ */ te.jsx(
|
|
42129
42129
|
_E,
|
|
42130
42130
|
{
|
|
42131
|
-
active: (b == null ? void 0 : b.key) ===
|
|
42132
|
-
direction: (b == null ? void 0 : b.key) ===
|
|
42133
|
-
onClick: () =>
|
|
42134
|
-
children:
|
|
42131
|
+
active: (b == null ? void 0 : b.key) === D.key,
|
|
42132
|
+
direction: (b == null ? void 0 : b.key) === D.key ? b.direction : "asc",
|
|
42133
|
+
onClick: () => F(D.key),
|
|
42134
|
+
children: D.label
|
|
42135
42135
|
}
|
|
42136
|
-
) :
|
|
42136
|
+
) : D.label
|
|
42137
42137
|
},
|
|
42138
|
-
|
|
42138
|
+
D.key
|
|
42139
42139
|
)) }) }),
|
|
42140
42140
|
/* @__PURE__ */ te.jsx(c0, { children: l ? /* @__PURE__ */ te.jsx(Da, { children: /* @__PURE__ */ te.jsx(lo, { colSpan: t.length, sx: { borderBottom: 0 }, children: /* @__PURE__ */ te.jsx(
|
|
42141
42141
|
It,
|
|
@@ -42146,17 +42146,28 @@ const Xk = {
|
|
|
42146
42146
|
minHeight: "270px",
|
|
42147
42147
|
children: /* @__PURE__ */ te.jsx(Jm, { sx: Qk })
|
|
42148
42148
|
}
|
|
42149
|
-
) }) }) : e.length > 0 ? e.map((
|
|
42150
|
-
|
|
42149
|
+
) }) }) : e.length > 0 ? e.map((D, I) => /* @__PURE__ */ te.jsx(
|
|
42150
|
+
Da,
|
|
42151
42151
|
{
|
|
42152
|
-
|
|
42153
|
-
|
|
42152
|
+
selected: D.id === c,
|
|
42153
|
+
onClick: () => C(I),
|
|
42154
|
+
sx: {
|
|
42155
|
+
backgroundColor: k === I ? "#F5F6FACC" : "inherit"
|
|
42154
42156
|
},
|
|
42155
|
-
|
|
42156
|
-
|
|
42157
|
+
children: t.map((O, P) => /* @__PURE__ */ te.jsx(
|
|
42158
|
+
lo,
|
|
42159
|
+
{
|
|
42160
|
+
onClick: () => {
|
|
42161
|
+
n && n(D[O.key], D);
|
|
42162
|
+
},
|
|
42163
|
+
sx: { width: `${100 / t.length}%` },
|
|
42164
|
+
children: O.renderCell ? O.renderCell(D[O.key], D) : D[O.key]
|
|
42165
|
+
},
|
|
42166
|
+
`${I}-${P}`
|
|
42167
|
+
))
|
|
42157
42168
|
},
|
|
42158
|
-
|
|
42159
|
-
))
|
|
42169
|
+
I
|
|
42170
|
+
)) : /* @__PURE__ */ te.jsx(Da, { children: /* @__PURE__ */ te.jsx(lo, { colSpan: t.length, sx: { borderBottom: 0 }, children: /* @__PURE__ */ te.jsx(
|
|
42160
42171
|
It,
|
|
42161
42172
|
{
|
|
42162
42173
|
display: "flex",
|
|
@@ -42183,7 +42194,7 @@ const Xk = {
|
|
|
42183
42194
|
fr,
|
|
42184
42195
|
{
|
|
42185
42196
|
variant: "text",
|
|
42186
|
-
onClick:
|
|
42197
|
+
onClick: U,
|
|
42187
42198
|
disabled: !e.length,
|
|
42188
42199
|
children: /* @__PURE__ */ te.jsxs(
|
|
42189
42200
|
Yt,
|
|
@@ -42225,8 +42236,8 @@ const Xk = {
|
|
|
42225
42236
|
count: v,
|
|
42226
42237
|
rowsPerPage: m,
|
|
42227
42238
|
page: p,
|
|
42228
|
-
onPageChange:
|
|
42229
|
-
onRowsPerPageChange:
|
|
42239
|
+
onPageChange: w,
|
|
42240
|
+
onRowsPerPageChange: A,
|
|
42230
42241
|
sx: {
|
|
42231
42242
|
...SK(y)
|
|
42232
42243
|
}
|