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 +5 -5
- package/dist/src/component/Table.d.ts +13 -13
- package/package.json +1 -1
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: _,
|
|
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: _,
|
|
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,
|
|
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,
|
|
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
|
|
20
|
-
export type
|
|
19
|
+
export type TableRowOptionItemLink = string;
|
|
20
|
+
export type TableRowOptionItem<Row extends Record<string, any>> = {
|
|
21
21
|
name: ReactNode;
|
|
22
|
-
|
|
22
|
+
exe: ((row: Row) => void) | TableRowOptionItemLink | null;
|
|
23
23
|
};
|
|
24
24
|
export type TableRowOption<Row extends Record<string, any>> = {
|
|
25
|
-
options?:
|
|
26
|
-
destructiveOptions?:
|
|
25
|
+
options?: TableRowOptionItem<Row>[];
|
|
26
|
+
destructiveOptions?: TableRowOptionItem<Row>[];
|
|
27
27
|
} | ((row: Row) => {
|
|
28
|
-
options?:
|
|
29
|
-
destructiveOptions?:
|
|
28
|
+
options?: TableRowOptionItem<Row>[];
|
|
29
|
+
destructiveOptions?: TableRowOptionItem<Row>[];
|
|
30
30
|
});
|
|
31
|
-
export type
|
|
31
|
+
export type TableSelectRowsOptionItem<Row extends Record<string, any>> = {
|
|
32
32
|
name: ReactNode;
|
|
33
|
-
|
|
33
|
+
exe: ((selectRows: Row[]) => void) | null;
|
|
34
34
|
};
|
|
35
35
|
export type TableSelectRowsOption<Row extends Record<string, any>> = {
|
|
36
|
-
options?:
|
|
37
|
-
destructiveOptions?:
|
|
36
|
+
options?: TableSelectRowsOptionItem<Row>[];
|
|
37
|
+
destructiveOptions?: TableSelectRowsOptionItem<Row>[];
|
|
38
38
|
} | ((selectRows: Row[]) => {
|
|
39
|
-
options?:
|
|
40
|
-
destructiveOptions?:
|
|
39
|
+
options?: TableSelectRowsOptionItem<Row>[];
|
|
40
|
+
destructiveOptions?: TableSelectRowsOptionItem<Row>[];
|
|
41
41
|
});
|
|
42
42
|
/**
|
|
43
43
|
* Table component.
|