reykit 1.0.178 → 1.0.180
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 +8 -8
- package/dist/src/component/Table.d.ts +17 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49288,8 +49288,8 @@ function sk({
|
|
|
49288
49288
|
}[N]
|
|
49289
49289
|
] }),
|
|
49290
49290
|
/* @__PURE__ */ E.jsx(rc, { align: "start", className: "w-auto", children: /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
|
|
49291
|
-
(U = typeof b == "function" ? b(C) : b).options &&
|
|
49292
|
-
(
|
|
49291
|
+
(U = typeof b == "function" ? b(C) : b).options && U.options.map(
|
|
49292
|
+
({ name: _, fn: V }, H) => /* @__PURE__ */ E.jsx(
|
|
49293
49293
|
Kf,
|
|
49294
49294
|
{
|
|
49295
49295
|
onClick: () => {
|
|
@@ -49302,8 +49302,8 @@ function sk({
|
|
|
49302
49302
|
)
|
|
49303
49303
|
),
|
|
49304
49304
|
U.options && U.destructiveOptions && /* @__PURE__ */ E.jsx(JE, {}),
|
|
49305
|
-
U.destructiveOptions &&
|
|
49306
|
-
(
|
|
49305
|
+
U.destructiveOptions && U.destructiveOptions.map(
|
|
49306
|
+
({ name: _, fn: V }, H) => /* @__PURE__ */ E.jsx(
|
|
49307
49307
|
Kf,
|
|
49308
49308
|
{
|
|
49309
49309
|
variant: "destructive",
|
|
@@ -49690,8 +49690,8 @@ function uk({
|
|
|
49690
49690
|
}
|
|
49691
49691
|
), children: /* @__PURE__ */ E.jsx(Tj, {}) }),
|
|
49692
49692
|
/* @__PURE__ */ E.jsxs(rc, { align: "end", className: "w-auto", children: [
|
|
49693
|
-
(T = typeof g == "function" ? g(N) : g).options &&
|
|
49694
|
-
(
|
|
49693
|
+
(T = typeof g == "function" ? g(N) : g).options && T.options.map(
|
|
49694
|
+
({ name: M, fn: w }, z) => /* @__PURE__ */ E.jsx(
|
|
49695
49695
|
Kf,
|
|
49696
49696
|
{
|
|
49697
49697
|
onClick: () => {
|
|
@@ -49704,8 +49704,8 @@ function uk({
|
|
|
49704
49704
|
)
|
|
49705
49705
|
),
|
|
49706
49706
|
T.options && T.destructiveOptions && /* @__PURE__ */ E.jsx(JE, {}),
|
|
49707
|
-
T.destructiveOptions &&
|
|
49708
|
-
(
|
|
49707
|
+
T.destructiveOptions && T.destructiveOptions.map(
|
|
49708
|
+
({ name: M, fn: w }, z) => /* @__PURE__ */ E.jsx(
|
|
49709
49709
|
Kf,
|
|
49710
49710
|
{
|
|
49711
49711
|
variant: "destructive",
|
|
@@ -15,20 +15,28 @@ export type ButtonOption = {
|
|
|
15
15
|
name: ReactNode;
|
|
16
16
|
method: () => void;
|
|
17
17
|
}[];
|
|
18
|
-
export type OptionName =
|
|
18
|
+
export type OptionName = ReactNode;
|
|
19
|
+
export type RowOptionItem<Row extends Record<string, any>> = {
|
|
20
|
+
name: ReactNode;
|
|
21
|
+
fn: ((row: Row) => void) | null;
|
|
22
|
+
};
|
|
19
23
|
export type RowOption<Row extends Record<string, any>> = {
|
|
20
|
-
options?:
|
|
21
|
-
destructiveOptions?:
|
|
24
|
+
options?: RowOptionItem<Row>[];
|
|
25
|
+
destructiveOptions?: RowOptionItem<Row>[];
|
|
22
26
|
} | ((row: Row) => {
|
|
23
|
-
options?:
|
|
24
|
-
destructiveOptions?:
|
|
27
|
+
options?: RowOptionItem<Row>[];
|
|
28
|
+
destructiveOptions?: RowOptionItem<Row>[];
|
|
25
29
|
});
|
|
30
|
+
export type SelectRowsOptionItem<Row extends Record<string, any>> = {
|
|
31
|
+
name: ReactNode;
|
|
32
|
+
fn: ((selectRows: Row[]) => void) | null;
|
|
33
|
+
};
|
|
26
34
|
export type SelectRowsOption<Row extends Record<string, any>> = {
|
|
27
|
-
options?:
|
|
28
|
-
destructiveOptions?:
|
|
35
|
+
options?: SelectRowsOptionItem<Row>[];
|
|
36
|
+
destructiveOptions?: SelectRowsOptionItem<Row>[];
|
|
29
37
|
} | ((selectRows: Row[]) => {
|
|
30
|
-
options?:
|
|
31
|
-
destructiveOptions?:
|
|
38
|
+
options?: SelectRowsOptionItem<Row>[];
|
|
39
|
+
destructiveOptions?: SelectRowsOptionItem<Row>[];
|
|
32
40
|
});
|
|
33
41
|
/**
|
|
34
42
|
* Table component.
|