@jamsrui/table 0.0.13 → 0.0.15
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.mjs +1 -1
- package/dist/styles.mjs +1 -1
- package/dist/table-body.mjs +1 -1
- package/dist/table-cell.mjs +1 -1
- package/dist/table-column.mjs +1 -1
- package/dist/table-config.mjs +1 -1
- package/dist/table-context.mjs +1 -1
- package/dist/table-empty-state.mjs +1 -1
- package/dist/table-footer.mjs +1 -1
- package/dist/table-header.mjs +1 -1
- package/dist/table-root.mjs +1 -1
- package/dist/table-row.mjs +1 -1
- package/dist/table-table.mjs +1 -1
- package/dist/table-wrapper.mjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/use-table.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-3P4MZ6BH.mjs +0 -1
- package/dist/chunk-DIUOKLAM.mjs +0 -1
- package/dist/chunk-E66GNLTH.mjs +0 -1
- package/dist/chunk-EEYWNGAV.mjs +0 -1
- package/dist/chunk-FWCSKJXK.mjs +0 -1
- package/dist/chunk-HUU4QJ56.mjs +0 -1
- package/dist/chunk-JDEQKMB2.mjs +0 -1
- package/dist/chunk-K3XNFLMX.mjs +0 -1
- package/dist/chunk-KWUDOLAU.mjs +0 -1
- package/dist/chunk-NMZ5Y6UJ.mjs +0 -1
- package/dist/chunk-SLHAMQVJ.mjs +0 -1
- package/dist/chunk-TYYVDMZS.mjs +0 -1
- package/dist/chunk-USYDSKXB.mjs +0 -1
- package/dist/chunk-WKT355RZ.mjs +0 -1
- package/dist/chunk-ZE4OK6RY.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Table as o}from"./table.mjs";import{TableBody as e}from"./table-body.mjs";import{TableCell as r}from"./table-cell.mjs";import{TableColumn as a}from"./table-column.mjs";import{TableFooter as l}from"./table-footer.mjs";import{TableHeader as t}from"./table-header.mjs";import{TableRow as m}from"./table-row.mjs";import{TableTable as p}from"./table-table.mjs";import{TableWrapper as b}from"./table-wrapper.mjs";import{TableConfig as w,useTableConfig as y}from"./table-config.mjs";const c=Object.assign(o,{Root:o,Body:e,Cell:r,Footer:l,Header:t,Row:m,Table:p,Wrapper:b,Column:a});export{c as Table,e as TableBody,r as TableCell,a as TableColumn,w as TableConfig,l as TableFooter,t as TableHeader,m as TableRow,p as TableTable,b as TableWrapper,y as useTableConfig};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{radiusVariant as r,tv as e}from"@jamsrui/utils";const a=e({slots:{root:"relative flex flex-col gap-2 overflow-hidden",wrapper:"grid w-full gap-2 overflow-x-auto",table:"group/table w-full min-w-full",thead:"h-10",th:["h-10 grow items-center px-3 text-left text-sm font-normal","data-pinned:bg-background/90 data-pinned:backdrop-blur-xl"],tbody:"",tr:"group/tr",td:["overflow-hidden px-3 text-sm","data-pinned:bg-background/90 data-pinned:backdrop-blur-xl"],tfoot:""},variants:{variant:{solid:{th:"bg-surface-secondary first:rounded-l-lg last:rounded-r-lg",root:"rounded-2xl bg-surface p-4"},bordered:{th:"border-b border-b-divider-dark bg-surface-secondary text-foreground-secondary font-normal text-xs",td:"border-b border-divider",root:"bg-surface"}},radius:r("root"),density:{compact:{td:"py-2"},standard:{td:"py-4"},comfortable:{td:"py-6"}},isHeaderSticky:{true:{thead:"sticky top-0 z-10 [&>tr]:shadow-sm",wrapper:"flex max-h-[400px] flex-col overflow-auto",th:" bg-surface-secondary/90 backdrop-blur-xl"}},allowHover:{true:{td:"md:group-hover/tr:bg-surface-secondary"},false:{td:""}},separateRows:{true:{tr:"border-b-2 border-transparent",td:"border-none bg-surface",root:"border-none bg-transparent p-0"}}},defaultVariants:{isHeaderSticky:!1,density:"compact",allowHover:!1,separateRows:!1,variant:"bordered",radius:"md"}});export{a as tableVariants};
|
package/dist/table-body.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as l}from"react/jsx-runtime";import{useRenderElement as n}from"@jamsrui/hooks";import{useTableContext as m}from"./table-context.mjs";import{TableEmptyState as d}from"./table-empty-state.mjs";const b=e=>{const{children:o,emptySlot:t=l(d,{}),...r}=e,{getBodyProps:p}=m(),s=o??t;return n("tbody",{props:[p(r),{children:s}]})};export{b as TableBody};
|
package/dist/table-cell.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as t}from"@jamsrui/hooks";import{useTableContext as o}from"./table-context.mjs";const p=e=>{const{getCellProps:r}=o();return t("td",{props:[r(e)]})};export{p as TableCell};
|
package/dist/table-column.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as o}from"@jamsrui/hooks";import{useTableContext as t}from"./table-context.mjs";const p=e=>{const{getColumnProps:r}=t();return o("th",{props:[r(e)]})};export{p as TableColumn};
|
package/dist/table-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{createConfigContext as e}from"@jamsrui/utils";const[r,a]=e({displayName:"TableConfig"});export{r as TableConfig,a as useTableConfig};
|
package/dist/table-context.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createContext as t,use as o}from"react";const n=t(null),s=()=>{const e=o(n);if(!e)throw new Error("useTableContext must be used within TableContext");return e};export{n as TableContext,s as useTableContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{TableCell as l}from"./table-cell.mjs";import{TableRow as o}from"./table-row.mjs";const p=()=>e(o,{children:e(l,{className:"text-center py-12",colSpan:100,children:"No data found"})});export{p as TableEmptyState};
|
package/dist/table-footer.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as t}from"@jamsrui/hooks";import{useTableContext as r}from"./table-context.mjs";const m=e=>{const{getFooterProps:o}=r();return t("tfoot",{props:[o(e)]})};export{m as TableFooter};
|
package/dist/table-header.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as t}from"@jamsrui/hooks";import{useTableContext as o}from"./table-context.mjs";const a=e=>{const{getHeaderProps:r}=o();return t("thead",{props:[r(e)]})};export{a as TableHeader};
|
package/dist/table-root.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as t}from"@jamsrui/hooks";import{useTableContext as r}from"./table-context.mjs";const m=e=>{const{getRootProps:o}=r();return t("div",{props:[o(e)]})};export{m as TableRoot};
|
package/dist/table-row.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as o}from"@jamsrui/hooks";import{useTableContext as t}from"./table-context.mjs";const m=e=>{const{getRowProps:r}=t();return o("tr",{props:[r(e)]})};export{m as TableRow};
|
package/dist/table-table.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as t}from"@jamsrui/hooks";import{useTableContext as o}from"./table-context.mjs";const p=e=>{const{getTableProps:r}=o();return t("table",{props:[r(e)]})};export{p as TableTable};
|
package/dist/table-wrapper.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useRenderElement as p}from"@jamsrui/hooks";import{useTableContext as t}from"./table-context.mjs";const a=e=>{const{getWrapperProps:r}=t();return p("div",{props:[r(e)]})};export{a as TableWrapper};
|
package/dist/table.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{mergeConfigProps as p}from"@jamsrui/utils";import{useTableConfig as b}from"./table-config.mjs";import{TableContext as m}from"./table-context.mjs";import{TableRoot as T}from"./table-root.mjs";import{TableTable as n}from"./table-table.mjs";import{TableWrapper as s}from"./table-wrapper.mjs";import{useTable as i}from"./use-table.mjs";const d=o=>{const{children:t}=o,r=b(),a=p(r,r,o),l=i(a);return e(m,{value:l,children:e(T,{children:e(s,{children:e(n,{children:t})})})})};export{d as Table};
|
package/dist/use-table.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as s,useMemo as g}from"react";import{cn as r,dataAttrDev as o,mapPropsVariants as w,mergeProps as G}from"@jamsrui/utils";import{tableVariants as i}from"./styles.mjs";const V=y=>{const[f,u]=w(y,i.variantKeys),{classNames:a,...l}=f,t=i(u),m=s(e=>({...e,"data-slot":o("root"),"data-component":o("table"),className:t.root({className:r(a?.root,e.className)})}),[a?.root,t]),p=s(e=>({...e,"data-slot":o("wrapper"),className:t.wrapper({className:r(a?.wrapper,e.className)})}),[a?.wrapper,t]),c=s(e=>({...G(l,e),"data-slot":o("table"),className:t.table({className:r(l.className,a?.table,e.className)})}),[a?.table,l,t]),b=s(e=>({...e,"data-slot":o("header"),className:t.thead({className:r(a?.thead,e.className)})}),[a?.thead,t]),P=s(e=>({...e,"data-slot":o("column"),className:t.th({className:r(a?.th,e.className)})}),[a?.th,t]),n=s(e=>({...e,"data-slot":o("body"),className:t.tbody({className:r(a?.tbody,e.className)})}),[a?.tbody,t]),N=s(e=>({...e,"data-slot":o("row"),className:t.tr({className:r(a?.tr,e.className)})}),[a?.tr,t]),d=s(e=>({...e,"data-slot":o("cell"),className:t.td({className:r(a?.td,e.className)})}),[a?.td,t]),T=s(e=>({...e,"data-slot":o("footer"),className:t.tfoot({className:r(a?.tfoot,e.className)})}),[a?.tfoot,t]);return g(()=>({getRootProps:m,getTableProps:c,getHeaderProps:b,getColumnProps:P,getBodyProps:n,getRowProps:N,getCellProps:d,getFooterProps:T,getWrapperProps:p}),[n,d,P,T,b,m,N,c,p])};export{V as useTable};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/table",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/hooks": "^0.0.
|
|
9
|
-
"@jamsrui/
|
|
10
|
-
"@jamsrui/
|
|
8
|
+
"@jamsrui/hooks": "^0.0.15",
|
|
9
|
+
"@jamsrui/utils": "^0.0.15",
|
|
10
|
+
"@jamsrui/core": "^0.0.13"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
package/dist/chunk-3P4MZ6BH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-KWUDOLAU.mjs";import{useCallback as s,useMemo as g}from"react";import{cn as r,dataAttrDev as o,mapPropsVariants as w,mergeProps as G}from"@jamsrui/utils";var x=y=>{let[f,u]=w(y,m.variantKeys),{classNames:a,...l}=f,t=m(u),p=s(e=>({...e,"data-slot":o("root"),"data-component":o("table"),className:t.root({className:r(a?.root,e.className)})}),[a?.root,t]),c=s(e=>({...e,"data-slot":o("wrapper"),className:t.wrapper({className:r(a?.wrapper,e.className)})}),[a?.wrapper,t]),b=s(e=>({...G(l,e),"data-slot":o("table"),className:t.table({className:r(l.className,a?.table,e.className)})}),[a?.table,l,t]),P=s(e=>({...e,"data-slot":o("header"),className:t.thead({className:r(a?.thead,e.className)})}),[a?.thead,t]),n=s(e=>({...e,"data-slot":o("column"),className:t.th({className:r(a?.th,e.className)})}),[a?.th,t]),N=s(e=>({...e,"data-slot":o("body"),className:t.tbody({className:r(a?.tbody,e.className)})}),[a?.tbody,t]),d=s(e=>({...e,"data-slot":o("row"),className:t.tr({className:r(a?.tr,e.className)})}),[a?.tr,t]),T=s(e=>({...e,"data-slot":o("cell"),className:t.td({className:r(a?.td,e.className)})}),[a?.td,t]),i=s(e=>({...e,"data-slot":o("footer"),className:t.tfoot({className:r(a?.tfoot,e.className)})}),[a?.tfoot,t]);return g(()=>({getRootProps:p,getTableProps:b,getHeaderProps:P,getColumnProps:n,getBodyProps:N,getRowProps:d,getCellProps:T,getFooterProps:i,getWrapperProps:c}),[N,T,n,i,P,p,d,b,c])};export{x as a};
|
package/dist/chunk-DIUOKLAM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as e}from"@jamsrui/utils";var[r,a]=e({displayName:"TableConfig"});export{r as a,a as b};
|
package/dist/chunk-E66GNLTH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=r=>{let{getRowProps:o}=e();return t("tr",{props:[o(r)]})};export{m as a};
|
package/dist/chunk-EEYWNGAV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var p=r=>{let{getColumnProps:o}=e();return t("th",{props:[o(r)]})};export{p as a};
|
package/dist/chunk-FWCSKJXK.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=o=>{let{getFooterProps:t}=e();return r("tfoot",{props:[t(o)]})};export{m as a};
|
package/dist/chunk-HUU4QJ56.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=o=>{let{getRootProps:t}=e();return r("div",{props:[t(o)]})};export{m as a};
|
package/dist/chunk-JDEQKMB2.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-HUU4QJ56.mjs";import{a as p}from"./chunk-ZE4OK6RY.mjs";import{a as b}from"./chunk-WKT355RZ.mjs";import{a as m}from"./chunk-3P4MZ6BH.mjs";import{b as t}from"./chunk-DIUOKLAM.mjs";import{a}from"./chunk-TYYVDMZS.mjs";import{mergeConfigProps as i}from"@jamsrui/utils";import{jsx as e}from"react/jsx-runtime";var d=o=>{let{children:T}=o,r=t(),n=i(r,r,o),s=m(n);return e(a,{value:s,children:e(l,{children:e(b,{children:e(p,{children:T})})})})};export{d as a};
|
package/dist/chunk-K3XNFLMX.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var p=r=>{let{getCellProps:t}=e();return o("td",{props:[t(r)]})};export{p as a};
|
package/dist/chunk-KWUDOLAU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{radiusVariant as r,tv as e}from"@jamsrui/utils";var a=e({slots:{root:"relative flex flex-col gap-2 overflow-hidden",wrapper:"grid w-full gap-2 overflow-x-auto",table:"group/table w-full min-w-full",thead:"h-10",th:["h-10 grow items-center px-3 text-left text-sm font-normal","data-pinned:bg-background/90 data-pinned:backdrop-blur-xl"],tbody:"",tr:"group/tr",td:["overflow-hidden px-3 text-sm","data-pinned:bg-background/90 data-pinned:backdrop-blur-xl"],tfoot:""},variants:{variant:{solid:{th:"bg-surface-secondary first:rounded-l-lg last:rounded-r-lg",root:"rounded-2xl bg-surface p-4"},bordered:{th:"border-b border-b-divider-dark bg-surface-secondary text-foreground-secondary font-normal text-xs",td:"border-b border-divider",root:"bg-surface"}},radius:r("root"),density:{compact:{td:"py-2"},standard:{td:"py-4"},comfortable:{td:"py-6"}},isHeaderSticky:{true:{thead:"sticky top-0 z-10 [&>tr]:shadow-sm",wrapper:"flex max-h-[400px] flex-col overflow-auto",th:" bg-surface-secondary/90 backdrop-blur-xl"}},allowHover:{true:{td:"md:group-hover/tr:bg-surface-secondary"},false:{td:""}},separateRows:{true:{tr:"border-b-2 border-transparent",td:"border-none bg-surface",root:"border-none bg-transparent p-0"}}},defaultVariants:{isHeaderSticky:!1,density:"compact",allowHover:!1,separateRows:!1,variant:"bordered",radius:"md"}});export{a};
|
package/dist/chunk-NMZ5Y6UJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-E66GNLTH.mjs";import{a as e}from"./chunk-K3XNFLMX.mjs";import{jsx as o}from"react/jsx-runtime";var p=()=>o(l,{children:o(e,{className:"text-center py-12",colSpan:100,children:"No data found"})});export{p as a};
|
package/dist/chunk-SLHAMQVJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var a=r=>{let{getHeaderProps:t}=e();return o("thead",{props:[t(r)]})};export{a};
|
package/dist/chunk-TYYVDMZS.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as t,use as o}from"react";var n=t(null),s=()=>{let e=o(n);if(!e)throw new Error("useTableContext must be used within TableContext");return e};export{n as a,s as b};
|
package/dist/chunk-USYDSKXB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-NMZ5Y6UJ.mjs";import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as d}from"@jamsrui/hooks";import{jsx as l}from"react/jsx-runtime";var b=t=>{let{children:r,emptySlot:p=l(o,{}),...s}=t,{getBodyProps:n}=e(),m=r??p;return d("tbody",{props:[n(s),{children:m}]})};export{b as a};
|
package/dist/chunk-WKT355RZ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var a=r=>{let{getWrapperProps:p}=e();return t("div",{props:[p(r)]})};export{a};
|
package/dist/chunk-ZE4OK6RY.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var p=r=>{let{getTableProps:t}=e();return o("table",{props:[t(r)]})};export{p as a};
|