@teppen/react-ui 1.5.0 → 1.5.1
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/cjs/src/table/constant.js +1 -1
- package/dist/cjs/src/table/constant.js.map +1 -1
- package/dist/cjs/src/table/header/header.js +1 -1
- package/dist/esm/src/table/constant.js +1 -1
- package/dist/esm/src/table/constant.js.map +1 -1
- package/dist/esm/src/table/header/header.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.DEFAULT_COL_WIDTH=
|
|
1
|
+
"use strict";exports.DEFAULT_COL_WIDTH=200,exports.DEFAULT_MIN_COL_WIDTH=50;
|
|
2
2
|
//# sourceMappingURL=constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant.js","sources":["../../../../src/table/constant.ts"],"sourcesContent":["export const DEFAULT_MIN_COL_WIDTH = 50;\nexport const DEFAULT_COL_WIDTH =
|
|
1
|
+
{"version":3,"file":"constant.js","sources":["../../../../src/table/constant.ts"],"sourcesContent":["export const DEFAULT_MIN_COL_WIDTH = 50;\nexport const DEFAULT_COL_WIDTH = 200;\n"],"names":[],"mappings":"uCACiC,kCADI"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),i=require("react");require("../filter/provider.js");var
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),i=require("react");require("../filter/provider.js");var t=require("../filter/components.js"),r=require("../sheet/providers.js"),s=require("../sort/components.js");require("../sort/provider.js");var l=require("./resize-col-width-hook.js");exports.TableHeaderElement=function(n){var o=r.useColumnContext(n.columnKey),a=l.useResizeColWidthHook({initialWidth:o.initialWidth,minWidth:o.minWidth}),d=a.colWidth,c=a.onMouseDownResizeWidth,u=i.useRef(null),h=u.current?d-u.current.clientWidth:d;return e.jsxs("th",{id:n.id,className:"relative",style:{width:d,maxWidth:d,minWidth:d},children:[e.jsxs("div",{className:"flex justify-between items-center bg-gray-200 text-gray-600 h-[32px]",children:[e.jsx("div",{className:"px-2",style:{maxWidth:h},children:o.label&&e.jsx("p",{className:"text-left font-bold text-nowrap overflow-hidden text-ellipsis",children:o.label})}),e.jsxs("div",{ref:u,className:"flex items-center w-fit shrink-0 gap-1 px-1",children:[!o.disableSort&&e.jsx(s.SortButton,{columnKey:n.columnKey}),!o.disableFilter&&e.jsx(t.TableFilter,{columnKey:n.columnKey})]})]}),e.jsx("div",{className:"absolute top-0 right-0 grid place-items-end py-1 w-[4px] h-full cursor-col-resize",onMouseDown:c,children:e.jsx("div",{className:"w-[1px] h-full bg-white"})})]})};
|
|
3
3
|
//# sourceMappingURL=header.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var r=50,a=
|
|
1
|
+
var r=50,a=200;export{a as DEFAULT_COL_WIDTH,r as DEFAULT_MIN_COL_WIDTH};
|
|
2
2
|
//# sourceMappingURL=constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant.js","sources":["../../../../src/table/constant.ts"],"sourcesContent":["export const DEFAULT_MIN_COL_WIDTH = 50;\nexport const DEFAULT_COL_WIDTH =
|
|
1
|
+
{"version":3,"file":"constant.js","sources":["../../../../src/table/constant.ts"],"sourcesContent":["export const DEFAULT_MIN_COL_WIDTH = 50;\nexport const DEFAULT_COL_WIDTH = 200;\n"],"names":["DEFAULT_MIN_COL_WIDTH","DEFAULT_COL_WIDTH"],"mappings":"AAAO,IAAMA,EAAwB,GACxBC,EAAoB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useRef as t}from"react";import"../filter/provider.js";import{TableFilter as r}from"../filter/components.js";import{useColumnContext as l}from"../sheet/providers.js";import{SortButton as o}from"../sort/components.js";import"../sort/provider.js";import{useResizeColWidthHook as s}from"./resize-col-width-hook.js";function n(n){var m=l(n.columnKey),d=s({initialWidth:m.initialWidth,minWidth:m.minWidth}),c=d.colWidth,a=d.onMouseDownResizeWidth,h=t(null),p=h.current?c-h.current.clientWidth:c;return e("th",{id:n.id,className:"relative",style:{width:c,maxWidth:c},children:[e("div",{className:"flex justify-between items-center bg-gray-200 text-gray-600 h-[32px]",children:[i("div",{className:"px-2",style:{maxWidth:p},children:m.label&&i("p",{className:"text-left font-bold text-nowrap overflow-hidden text-ellipsis",children:m.label})}),e("div",{ref:h,className:"flex items-center w-fit shrink-0 gap-1 px-1",children:[!m.disableSort&&i(o,{columnKey:n.columnKey}),!m.disableFilter&&i(r,{columnKey:n.columnKey})]})]}),i("div",{className:"absolute top-0 right-0 grid place-items-end py-1 w-[4px] h-full cursor-col-resize",onMouseDown:a,children:i("div",{className:"w-[1px] h-full bg-white"})})]})}export{n as TableHeaderElement};
|
|
2
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useRef as t}from"react";import"../filter/provider.js";import{TableFilter as r}from"../filter/components.js";import{useColumnContext as l}from"../sheet/providers.js";import{SortButton as o}from"../sort/components.js";import"../sort/provider.js";import{useResizeColWidthHook as s}from"./resize-col-width-hook.js";function n(n){var m=l(n.columnKey),d=s({initialWidth:m.initialWidth,minWidth:m.minWidth}),c=d.colWidth,a=d.onMouseDownResizeWidth,h=t(null),p=h.current?c-h.current.clientWidth:c;return e("th",{id:n.id,className:"relative",style:{width:c,maxWidth:c,minWidth:c},children:[e("div",{className:"flex justify-between items-center bg-gray-200 text-gray-600 h-[32px]",children:[i("div",{className:"px-2",style:{maxWidth:p},children:m.label&&i("p",{className:"text-left font-bold text-nowrap overflow-hidden text-ellipsis",children:m.label})}),e("div",{ref:h,className:"flex items-center w-fit shrink-0 gap-1 px-1",children:[!m.disableSort&&i(o,{columnKey:n.columnKey}),!m.disableFilter&&i(r,{columnKey:n.columnKey})]})]}),i("div",{className:"absolute top-0 right-0 grid place-items-end py-1 w-[4px] h-full cursor-col-resize",onMouseDown:a,children:i("div",{className:"w-[1px] h-full bg-white"})})]})}export{n as TableHeaderElement};
|
|
3
3
|
//# sourceMappingURL=header.js.map
|