@teppen/react-ui 1.5.9 → 1.5.10

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.
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),i=require("./edit-button.js"),l=require("../hooks.js");exports.TableCell=function(t){var s=l.useCell(t.id,t.row),o=s.type,c=s.component,n=s.onClickCell,r=s.onDoubleClick;return e.jsx("td",{id:t.id,className:"".concat(t.cellFormatClassName),onClick:t.isExistOnClickRow?void 0:n,onDoubleClick:t.isExistOnClickRow?void 0:r,children:e.jsxs("div",{className:"flex items-center gap-3 w-fit p-2 cursor-default",onClick:n,children:["component"===o?c:e.jsx("div",{onDoubleClick:r,children:e.jsx("p",{className:"cell-data text-left whitespace-nowrap",children:c})}),t.editable&&e.jsx(i.EditButton,{})]})})};
2
+ "use strict";var e=require("react/jsx-runtime"),l=require("react"),i=require("../hooks.js");function r(e){return Object.freeze({__proto__:null,default:e})}var t=l.lazy((function(){return Promise.resolve().then((function(){return r(require("./edit-button.js"))}))}));exports.TableCell=function(r){var n=i.useCell(r.id,r.row),c=n.type,o=n.component,s=n.onClickCell,a=n.onDoubleClick;return e.jsx("td",{id:r.id,className:"".concat(r.cellFormatClassName),onClick:r.isExistOnClickRow?void 0:s,onDoubleClick:r.isExistOnClickRow?void 0:a,children:e.jsxs("div",{className:"flex items-center gap-3 w-fit p-2 cursor-default",onClick:s,children:["component"===c?o:e.jsx("div",{onDoubleClick:a,children:e.jsx("p",{className:"cell-data text-left whitespace-nowrap",children:o})}),e.jsx(l.Suspense,{fallback:null,children:r.editable&&e.jsx(t,{})})]})})};
3
3
  //# sourceMappingURL=cell.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var t=require("react/jsx-runtime"),e=require("react"),r=require("../../edit/provider.js"),i=require("../../../icon/edit-icon.js"),n=e.memo((function(){var e=r.useEditActionContext().startEditing;return t.jsx("button",{className:"w-fit h-fit p-1 rounded-full text-gray-500 hover:bg-gray-200",onClick:function(t){t.preventDefault(),e()},children:t.jsx(i.EditIcon,{size:12})})}));exports.EditButton=n;
2
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("../../edit/provider.js"),i=require("../../../icon/edit-icon.js"),n=t.memo((function(){var t=r.useEditActionContext().startEditing;return e.jsx("button",{className:"w-fit h-fit p-1 rounded-full text-gray-500 hover:bg-gray-200",onClick:function(e){e.preventDefault(),t()},children:e.jsx(i.EditIcon,{size:12})})}));module.exports=n;
3
3
  //# sourceMappingURL=edit-button.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{EditButton as o}from"./edit-button.js";import{useCell as l}from"../hooks.js";function t(t){var c=l(t.id,t.row),n=c.type,r=c.component,a=c.onClickCell,s=c.onDoubleClick;return e("td",{id:t.id,className:"".concat(t.cellFormatClassName),onClick:t.isExistOnClickRow?void 0:a,onDoubleClick:t.isExistOnClickRow?void 0:s,children:i("div",{className:"flex items-center gap-3 w-fit p-2 cursor-default",onClick:a,children:["component"===n?r:e("div",{onDoubleClick:s,children:e("p",{className:"cell-data text-left whitespace-nowrap",children:r})}),t.editable&&e(o,{})]})})}export{t as TableCell};
2
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{lazy as o,Suspense as l}from"react";import{useCell as t}from"../hooks.js";var c=o((function(){return import("./edit-button.js")}));function n(o){var n=t(o.id,o.row),r=n.type,a=n.component,s=n.onClickCell,d=n.onDoubleClick;return e("td",{id:o.id,className:"".concat(o.cellFormatClassName),onClick:o.isExistOnClickRow?void 0:s,onDoubleClick:o.isExistOnClickRow?void 0:d,children:i("div",{className:"flex items-center gap-3 w-fit p-2 cursor-default",onClick:s,children:["component"===r?a:e("div",{onDoubleClick:d,children:e("p",{className:"cell-data text-left whitespace-nowrap",children:a})}),e(l,{fallback:null,children:o.editable&&e(c,{})})]})})}export{n as TableCell};
3
3
  //# sourceMappingURL=cell.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as r}from"react/jsx-runtime";import{memo as t}from"react";import{useEditActionContext as i}from"../../edit/provider.js";import{EditIcon as o}from"../../../icon/edit-icon.js";var e=t((function(){var t=i().startEditing;return r("button",{className:"w-fit h-fit p-1 rounded-full text-gray-500 hover:bg-gray-200",onClick:function(r){r.preventDefault(),t()},children:r(o,{size:12})})}));export{e as EditButton};
2
+ import{jsx as r}from"react/jsx-runtime";import{memo as t}from"react";import{useEditActionContext as i}from"../../edit/provider.js";import{EditIcon as e}from"../../../icon/edit-icon.js";var o=t((function(){var t=i().startEditing;return r("button",{className:"w-fit h-fit p-1 rounded-full text-gray-500 hover:bg-gray-200",onClick:function(r){r.preventDefault(),t()},children:r(e,{size:12})})}));export{o as default};
3
3
  //# sourceMappingURL=edit-button.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teppen/react-ui",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "description": "React UI Component",
5
5
  "main": "dist/cjs/src/index.js",
6
6
  "module": "dist/esm/src/index.js",