reykit 1.0.234 → 1.0.235

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
@@ -49564,7 +49564,7 @@ function Tk({
49564
49564
  ] }),
49565
49565
  /* @__PURE__ */ x.jsx(Gs, { align: "start", className: "w-auto", children: /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
49566
49566
  (V = typeof C == "function" ? C(T) : C).options && V.options.map(
49567
- ({ name: _, exe: H }, P) => /* @__PURE__ */ x.jsx(
49567
+ ({ name: _, method: H }, P) => /* @__PURE__ */ x.jsx(
49568
49568
  $r,
49569
49569
  {
49570
49570
  onClick: () => {
@@ -49578,7 +49578,7 @@ function Tk({
49578
49578
  ),
49579
49579
  V.options && V.destructiveOptions && /* @__PURE__ */ x.jsx(_0, {}),
49580
49580
  V.destructiveOptions && V.destructiveOptions.map(
49581
- ({ name: _, exe: H }, P) => /* @__PURE__ */ x.jsx(
49581
+ ({ name: _, method: H }, P) => /* @__PURE__ */ x.jsx(
49582
49582
  $r,
49583
49583
  {
49584
49584
  variant: "destructive",
@@ -50036,7 +50036,7 @@ function Ck({
50036
50036
  ), children: /* @__PURE__ */ x.jsx(Wj, {}) }),
50037
50037
  /* @__PURE__ */ x.jsxs(Gs, { align: "end", className: "w-auto", children: [
50038
50038
  (R = typeof g == "function" ? g(N) : g).options && R.options.map(
50039
- ({ name: M, exe: O }, z) => typeof O == "string" ? /* @__PURE__ */ x.jsx(
50039
+ ({ name: M, method: O }, z) => typeof O == "string" ? /* @__PURE__ */ x.jsx(
50040
50040
  $r,
50041
50041
  {
50042
50042
  render: /* @__PURE__ */ x.jsx("a", { target: "_blank", href: O }),
@@ -50057,7 +50057,7 @@ function Ck({
50057
50057
  ),
50058
50058
  R.options && R.destructiveOptions && /* @__PURE__ */ x.jsx(_0, {}),
50059
50059
  R.destructiveOptions && R.destructiveOptions.map(
50060
- ({ name: M, exe: O }, z) => typeof O == "string" ? /* @__PURE__ */ x.jsx(
50060
+ ({ name: M, method: O }, z) => typeof O == "string" ? /* @__PURE__ */ x.jsx(
50061
50061
  $r,
50062
50062
  {
50063
50063
  variant: "destructive",
@@ -20,7 +20,7 @@ export type TableButtonOption = {
20
20
  export type TableRowOptionItemLink = string;
21
21
  export type TableRowOptionItem<Row extends Record<string, any>> = {
22
22
  name: ReactNode;
23
- exe: ((row: Row) => void) | TableRowOptionItemLink | null;
23
+ method: ((row: Row) => void) | TableRowOptionItemLink | null;
24
24
  };
25
25
  export type TableRowOption<Row extends Record<string, any>> = {
26
26
  options?: TableRowOptionItem<Row>[];
@@ -31,7 +31,7 @@ export type TableRowOption<Row extends Record<string, any>> = {
31
31
  });
32
32
  export type TableSelectRowsOptionItem<Row extends Record<string, any>> = {
33
33
  name: ReactNode;
34
- exe: ((selectRows: Row[]) => void) | null;
34
+ method: ((selectRows: Row[]) => void) | null;
35
35
  };
36
36
  export type TableSelectRowsOption<Row extends Record<string, any>> = {
37
37
  options?: TableSelectRowsOptionItem<Row>[];
@@ -44,17 +44,34 @@ export type TableSelectRowsOption<Row extends Record<string, any>> = {
44
44
  * Table component.
45
45
  *
46
46
  * @param data - Table data state value.
47
+ * - `Array` : Convert elements to `Badge` component.
47
48
  * @param setData - Function of set table data state value.
48
49
  * @param fieldOption - Header option.
50
+ * - `Attribute key` : Field key.
51
+ * - `Attribute name` : Field show name.
52
+ * - `Attribute isHide` : Whether hide field.
53
+ * - `Attribute isSort` : Whether show sort button.
54
+ * - `Attribute isGroup` : Whether show group button.
55
+ * - `Attribute isGroupSearch` : Whether show search input in group button.
56
+ * - `Attribute sortMethod` : Sort method.
57
+ * - `Attribute defaultValue` : Replace none value.
49
58
  * @param searchOption - Search option.
59
+ * - `Attribute method` : Search method.
60
+ * - `Attribute placeholder` : Search input placeholder.
50
61
  * @param buttonOption - Custom buttons option.
51
- * @param rowOption - Each row option.
62
+ * - `Attribute name` : Button name.
63
+ * - `Attribute method` : Execute method.
64
+ * @param rowOption - Each row buttons option.
65
+ * - `Attribute options` : Normal buttons option.
66
+ * - `Attribute destructiveOptions` : Important buttons option.
52
67
  * @param selectRowsOption - Selected rows option.
68
+ * - `Attribute options` : Normal buttons option.
69
+ * - `Attribute destructiveOptions` : Important buttons option.
53
70
  * @param pageSize - Page rows size.
54
71
  * @param mobilePageSize - Page rows size on mobile devices.
55
72
  * @param language - Language type.
56
73
  */
57
- export declare function Table<Row extends Record<string, any>>({ data, setData, fieldOption, searchOption, buttonOption, rowOption, selectRowsOption, pageSize, mobilePageSize, language }: {
74
+ export declare function Table<Row extends Record<string, ReactNode>>({ data, setData, fieldOption, searchOption, buttonOption, rowOption, selectRowsOption, pageSize, mobilePageSize, language }: {
58
75
  data: Row[];
59
76
  setData: (value: Row[] | ((value: Row[]) => Row[])) => void;
60
77
  fieldOption?: TableFieldOption<Row>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.234",
3
+ "version": "1.0.235",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [