reykit 1.0.192 → 1.0.193

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/index.js CHANGED
@@ -49304,7 +49304,7 @@ function sk({
49304
49304
  ] }),
49305
49305
  /* @__PURE__ */ E.jsx(Ys, { align: "start", className: "w-auto", children: /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
49306
49306
  (V = typeof C == "function" ? C(T) : C).options && V.options.map(
49307
- ({ name: _, fn: H }, P) => /* @__PURE__ */ E.jsx(
49307
+ ({ name: _, exe: H }, P) => /* @__PURE__ */ E.jsx(
49308
49308
  cc,
49309
49309
  {
49310
49310
  onClick: () => {
@@ -49318,7 +49318,7 @@ function sk({
49318
49318
  ),
49319
49319
  V.options && V.destructiveOptions && /* @__PURE__ */ E.jsx(M0, {}),
49320
49320
  V.destructiveOptions && V.destructiveOptions.map(
49321
- ({ name: _, fn: H }, P) => /* @__PURE__ */ E.jsx(
49321
+ ({ name: _, exe: H }, P) => /* @__PURE__ */ E.jsx(
49322
49322
  cc,
49323
49323
  {
49324
49324
  variant: "destructive",
@@ -49752,11 +49752,11 @@ function uk({
49752
49752
  ), children: /* @__PURE__ */ E.jsx(U5, {}) }),
49753
49753
  /* @__PURE__ */ E.jsxs(Ys, { align: "end", className: "w-auto", children: [
49754
49754
  (R = typeof g == "function" ? g(N) : g).options && R.options.map(
49755
- ({ name: M, fn: w }, z) => /* @__PURE__ */ E.jsx(
49755
+ ({ name: M, exe: w }, z) => /* @__PURE__ */ E.jsx(
49756
49756
  cc,
49757
49757
  {
49758
49758
  onClick: () => {
49759
- w && w(N);
49759
+ typeof w == "string" || w && w(N);
49760
49760
  },
49761
49761
  disabled: w === null,
49762
49762
  children: /* @__PURE__ */ E.jsx("span", { className: "whitespace-nowrap", children: M })
@@ -49766,7 +49766,7 @@ function uk({
49766
49766
  ),
49767
49767
  R.options && R.destructiveOptions && /* @__PURE__ */ E.jsx(M0, {}),
49768
49768
  R.destructiveOptions && R.destructiveOptions.map(
49769
- ({ name: M, fn: w }, z) => /* @__PURE__ */ E.jsx(
49769
+ ({ name: M, exe: w }, z) => /* @__PURE__ */ E.jsx(
49770
49770
  cc,
49771
49771
  {
49772
49772
  variant: "destructive",
@@ -16,28 +16,28 @@ export type TableButtonOption = {
16
16
  name: ReactNode;
17
17
  method: () => void;
18
18
  }[];
19
- export type TableOptionName = ReactNode;
20
- export type RowOptionItem<Row extends Record<string, any>> = {
19
+ export type TableRowOptionItemLink = string;
20
+ export type TableRowOptionItem<Row extends Record<string, any>> = {
21
21
  name: ReactNode;
22
- fn: ((row: Row) => void) | null;
22
+ exe: ((row: Row) => void) | TableRowOptionItemLink | null;
23
23
  };
24
24
  export type TableRowOption<Row extends Record<string, any>> = {
25
- options?: RowOptionItem<Row>[];
26
- destructiveOptions?: RowOptionItem<Row>[];
25
+ options?: TableRowOptionItem<Row>[];
26
+ destructiveOptions?: TableRowOptionItem<Row>[];
27
27
  } | ((row: Row) => {
28
- options?: RowOptionItem<Row>[];
29
- destructiveOptions?: RowOptionItem<Row>[];
28
+ options?: TableRowOptionItem<Row>[];
29
+ destructiveOptions?: TableRowOptionItem<Row>[];
30
30
  });
31
- export type SelectRowsOptionItem<Row extends Record<string, any>> = {
31
+ export type TableSelectRowsOptionItem<Row extends Record<string, any>> = {
32
32
  name: ReactNode;
33
- fn: ((selectRows: Row[]) => void) | null;
33
+ exe: ((selectRows: Row[]) => void) | null;
34
34
  };
35
35
  export type TableSelectRowsOption<Row extends Record<string, any>> = {
36
- options?: SelectRowsOptionItem<Row>[];
37
- destructiveOptions?: SelectRowsOptionItem<Row>[];
36
+ options?: TableSelectRowsOptionItem<Row>[];
37
+ destructiveOptions?: TableSelectRowsOptionItem<Row>[];
38
38
  } | ((selectRows: Row[]) => {
39
- options?: SelectRowsOptionItem<Row>[];
40
- destructiveOptions?: SelectRowsOptionItem<Row>[];
39
+ options?: TableSelectRowsOptionItem<Row>[];
40
+ destructiveOptions?: TableSelectRowsOptionItem<Row>[];
41
41
  });
42
42
  /**
43
43
  * Table component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.192",
3
+ "version": "1.0.193",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [