@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.
@@ -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 = (F, U) => {
42093
- f(U), h && h(U, m);
42094
- }, C = (F) => {
42095
- const U = parseInt(F.target.value, 10);
42096
- x(U), f(0), h && h(0, U);
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 w = (F) => {
42102
- !b || b.key !== F ? T({ key: F, direction: "asc" }) : T({
42103
- key: F,
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
- }, A = () => {
42107
- const F = "data:text/csv;charset=utf-8," + t.map((I) => I.label).join(",") + `
42108
- ` + e.map((I) => t.map((O) => I[O.key]).join(",")).join(`
42109
- `), U = encodeURI(F), D = document.createElement("a");
42110
- D.setAttribute("href", U), D.setAttribute("download", "table_data.csv"), document.body.appendChild(D), D.click();
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((F) => /* @__PURE__ */ te.jsx(
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) === F.key,
42132
- direction: (b == null ? void 0 : b.key) === F.key ? b.direction : "asc",
42133
- onClick: () => w(F.key),
42134
- children: F.label
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
- ) : F.label
42136
+ ) : D.label
42137
42137
  },
42138
- F.key
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((F, U) => /* @__PURE__ */ te.jsx(Da, { selected: F.id === c, children: t.map((D, I) => /* @__PURE__ */ te.jsx(
42150
- lo,
42149
+ ) }) }) : e.length > 0 ? e.map((D, I) => /* @__PURE__ */ te.jsx(
42150
+ Da,
42151
42151
  {
42152
- onClick: () => {
42153
- n && n(F[D.key], F);
42152
+ selected: D.id === c,
42153
+ onClick: () => C(I),
42154
+ sx: {
42155
+ backgroundColor: k === I ? "#F5F6FACC" : "inherit"
42154
42156
  },
42155
- sx: { width: `${100 / t.length}%` },
42156
- children: D.renderCell ? D.renderCell(F[D.key], F) : F[D.key]
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
- `${U}-${I}`
42159
- )) }, U)) : /* @__PURE__ */ te.jsx(Da, { children: /* @__PURE__ */ te.jsx(lo, { colSpan: t.length, sx: { borderBottom: 0 }, children: /* @__PURE__ */ te.jsx(
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: A,
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: k,
42229
- onRowsPerPageChange: C,
42239
+ onPageChange: w,
42240
+ onRowsPerPageChange: A,
42230
42241
  sx: {
42231
42242
  ...SK(y)
42232
42243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/storybook.components",
3
- "version": "0.2.70",
3
+ "version": "0.2.71",
4
4
  "main": "dist/storybook.components.mjs",
5
5
  "types": "dist/build/index.d.ts",
6
6
  "files": [