munza-x-data-grid 3.0.7 → 3.0.9

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.cjs CHANGED
@@ -53,7 +53,7 @@
53
53
  mun:[&::-webkit-scrollbar-track]:bg-stone-100\r
54
54
  mun:[&::-webkit-scrollbar-thumb]:bg-stone-300\r
55
55
  mun:dark:[&::-webkit-scrollbar-track]:bg-neutral-700\r
56
- mun:dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500`,children:(0,u.jsx)(Hg,{items:t,strategy:Rg,children:t.map(t=>{let n=e.getColumn(t);return n?(0,u.jsx)(Qg,{columnId:t,label:typeof n.columnDef.header==`string`?n.columnDef.header:t},t):null})})})]})})};function e_({...e}){return(0,u.jsx)(Cn,{"data-slot":`collapsible`,...e})}function t_({...e}){return(0,u.jsx)(vn,{"data-slot":`collapsible-trigger`,...e})}function n_({...e}){return(0,u.jsx)(bn,{"data-slot":`collapsible-content`,...e})}var r_=({column:e})=>{let t=(0,l.useMemo)(()=>e.getCanFilter()?{id:e.id.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/^./,e=>e.toUpperCase()),uniqueValues:Array.from(e.getFacetedUniqueValues().keys())}:null,[e]),n=e.getFilterValue(),{filterVariant:r}=e.columnDef.meta??{},[i,a]=(0,l.useState)(!1);return(0,u.jsx)(u.Fragment,{children:e.getCanFilter()?(0,u.jsxs)(e_,{open:i,onOpenChange:a,children:[(0,u.jsxs)(t_,{className:`mun:flex mun:whitespace-nowrap mun:items-center mun:gap-2`,children:[(0,u.jsx)(`span`,{className:`mun:size-7 mun:inline-flex mun:items-center mun:justify-center mun:rounded-md mun:transition-all mun:hover:bg-card`,children:i?(0,u.jsx)(mf,{size:16}):(0,u.jsx)(hf,{size:16})}),(0,u.jsx)(`span`,{className:`mun:truncate`,children:t?.id&&t.id.length>20?`${t.id.slice(0,20)}...`:t?.id})]}),(0,u.jsx)(n_,{children:(0,u.jsxs)(`div`,{className:`mun:p-1.5 mun:pr-0`,children:[(0,u.jsx)(`datalist`,{id:e.id+`list`,children:t?.uniqueValues.map((e,t)=>(0,u.jsx)(`option`,{value:e},t))}),(0,u.jsx)(op,{type:`text`,value:n??``,onChange:t=>e.setFilterValue(t),placeholder:`Search... (${e.getFacetedUniqueValues().size})`,list:e.id+`list`,disabled:r===void 0})]})})]}):null})},i_=()=>{let{table:e,globalFilter:t,setGlobalFilter:n}=H();return(0,u.jsxs)(`div`,{className:`mun:flex mun:flex-col mun:gap-1.5 mun:h-full mun:py-1.5`,children:[(0,u.jsx)(`div`,{className:`mun:flex mun:items-center mun:justify-between mun:px-1.5 mun:pb-2.5 mun:border-b mun:border-border`,children:(0,u.jsx)(`h1`,{className:`mun:text-sm mun:font-bold`,children:`Filters`})}),(0,u.jsx)(`div`,{className:`mun:px-1.5`,children:(0,u.jsx)(op,{value:String(t),onChange:e=>{n?.(String(e))},placeholder:`Search all columns...`})}),(0,u.jsx)(`div`,{className:`mun:space-y-2 mun:px-1.5 mun:flex-1 mun:overflow-y-auto mun:[&::-webkit-scrollbar]:w-2\r
56
+ mun:dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500`,children:(0,u.jsx)(Hg,{items:t,strategy:Rg,children:t.map(t=>{let n=e.getColumn(t);return n?(0,u.jsx)(Qg,{columnId:t,label:typeof n.columnDef.header==`string`?n.columnDef.header:t},t):null})})})]})})};function e_({...e}){return(0,u.jsx)(Cn,{"data-slot":`collapsible`,...e})}function t_({...e}){return(0,u.jsx)(vn,{"data-slot":`collapsible-trigger`,...e})}function n_({...e}){return(0,u.jsx)(bn,{"data-slot":`collapsible-content`,...e})}var r_=({column:e})=>{let t=(0,l.useMemo)(()=>e.getCanFilter()?{id:e.id.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/^./,e=>e.toUpperCase()),uniqueValues:Array.from(e.getFacetedUniqueValues().keys())}:null,[e]),n=e.getFilterValue(),{filterVariant:r}=e.columnDef.meta??{},[i,a]=(0,l.useState)(!1);return(0,u.jsx)(u.Fragment,{children:e.getCanFilter()?(0,u.jsxs)(e_,{open:i,onOpenChange:a,children:[(0,u.jsxs)(t_,{className:`mun:flex mun:whitespace-nowrap mun:items-center mun:gap-2`,children:[(0,u.jsx)(`span`,{className:`mun:size-7 mun:inline-flex mun:items-center mun:justify-center mun:rounded-md mun:transition-all mun:hover:bg-card`,children:i?(0,u.jsx)(mf,{size:16}):(0,u.jsx)(hf,{size:16})}),(0,u.jsx)(`span`,{className:`mun:truncate`,children:t?.id&&t.id.length>15?`${t.id.slice(0,15)}...`:t?.id})]}),(0,u.jsx)(n_,{children:(0,u.jsxs)(`div`,{className:`mun:p-1.5 mun:pr-0`,children:[(0,u.jsx)(`datalist`,{id:e.id+`list`,children:t?.uniqueValues.map((e,t)=>(0,u.jsx)(`option`,{value:e},t))}),(0,u.jsx)(op,{type:`text`,value:n??``,onChange:t=>e.setFilterValue(t),placeholder:`Search... (${e.getFacetedUniqueValues().size})`,list:e.id+`list`,disabled:r===void 0})]})})]}):null})},i_=()=>{let{table:e,globalFilter:t,setGlobalFilter:n}=H();return(0,u.jsxs)(`div`,{className:`mun:flex mun:flex-col mun:gap-1.5 mun:h-full mun:py-1.5`,children:[(0,u.jsx)(`div`,{className:`mun:flex mun:items-center mun:justify-between mun:px-1.5 mun:pb-2.5 mun:border-b mun:border-border`,children:(0,u.jsx)(`h1`,{className:`mun:text-sm mun:font-bold`,children:`Filters`})}),(0,u.jsx)(`div`,{className:`mun:px-1.5`,children:(0,u.jsx)(op,{value:String(t),onChange:e=>{n?.(String(e))},placeholder:`Search all columns...`})}),(0,u.jsx)(`div`,{className:`mun:space-y-2 mun:px-1.5 mun:flex-1 mun:overflow-y-auto mun:[&::-webkit-scrollbar]:w-2\r
57
57
  mun:[&::-webkit-scrollbar-track]:bg-stone-100\r
58
58
  mun:[&::-webkit-scrollbar-thumb]:bg-stone-300\r
59
59
  mun:dark:[&::-webkit-scrollbar-track]:bg-neutral-700\r
package/dist/index.js CHANGED
@@ -10842,7 +10842,7 @@ var u_ = ({ column: e }) => {
10842
10842
  children: h(i ? Sf : Cf, { size: 16 })
10843
10843
  }), /* @__PURE__ */ h("span", {
10844
10844
  className: "mun:truncate",
10845
- children: t?.id && t.id.length > 20 ? `${t.id.slice(0, 20)}...` : t?.id
10845
+ children: t?.id && t.id.length > 15 ? `${t.id.slice(0, 15)}...` : t?.id
10846
10846
  })]
10847
10847
  }), /* @__PURE__ */ h(l_, { children: /* @__PURE__ */ g("div", {
10848
10848
  className: "mun:p-1.5 mun:pr-0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "munza-x-data-grid",
3
3
  "private": false,
4
- "version": "3.0.7",
4
+ "version": "3.0.9",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"