@jamsrui/table 0.0.12 → 0.0.14

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.
Files changed (71) hide show
  1. package/dist/index.d.mts +31 -13
  2. package/dist/index.mjs +1 -1
  3. package/dist/styles.mjs +1 -0
  4. package/dist/{table-COowFxBr.d.mts → table-YS-M_mfN.d.mts} +9 -9
  5. package/dist/table-body.mjs +1 -0
  6. package/dist/table-cell.mjs +1 -0
  7. package/dist/table-column.mjs +1 -0
  8. package/dist/table-config.d.mts +11 -12
  9. package/dist/table-config.mjs +1 -1
  10. package/dist/{primitive/table-context.d.mts → table-context.d.mts} +1 -1
  11. package/dist/table-context.mjs +1 -0
  12. package/dist/table-empty-state.mjs +1 -0
  13. package/dist/table-footer.mjs +1 -0
  14. package/dist/table-header.mjs +1 -0
  15. package/dist/table-root.mjs +1 -0
  16. package/dist/table-row.mjs +1 -0
  17. package/dist/table-table.mjs +1 -0
  18. package/dist/table-wrapper.mjs +1 -0
  19. package/dist/table.d.mts +11 -19
  20. package/dist/table.mjs +1 -1
  21. package/dist/{primitive/table.d.mts → use-table.d.mts} +3 -3
  22. package/dist/use-table.mjs +1 -0
  23. package/package.json +4 -4
  24. package/dist/chunk-2F5JM5AO.mjs +0 -1
  25. package/dist/chunk-2UOENW6T.mjs +0 -1
  26. package/dist/chunk-64OJE7BG.mjs +0 -1
  27. package/dist/chunk-6TH4QLR4.mjs +0 -1
  28. package/dist/chunk-BHSFC5BI.mjs +0 -1
  29. package/dist/chunk-EALHLWMO.mjs +0 -1
  30. package/dist/chunk-F5AMPC53.mjs +0 -1
  31. package/dist/chunk-G56JYZMX.mjs +0 -1
  32. package/dist/chunk-GSDCBY3X.mjs +0 -1
  33. package/dist/chunk-HZMKIGNF.mjs +0 -0
  34. package/dist/chunk-IPKE7YHM.mjs +0 -1
  35. package/dist/chunk-J4ZX6AQY.mjs +0 -1
  36. package/dist/chunk-NO7Q6M3H.mjs +0 -1
  37. package/dist/chunk-RJDA7IF5.mjs +0 -1
  38. package/dist/chunk-VJMTZ2OI.mjs +0 -1
  39. package/dist/chunk-VV6AJGJT.mjs +0 -1
  40. package/dist/chunk-XPEMMX4W.mjs +0 -1
  41. package/dist/chunk-YJQDUGSR.mjs +0 -1
  42. package/dist/primitive/index.d.mts +0 -18
  43. package/dist/primitive/index.mjs +0 -1
  44. package/dist/primitive/styles.mjs +0 -1
  45. package/dist/primitive/table-body.mjs +0 -1
  46. package/dist/primitive/table-cell.mjs +0 -1
  47. package/dist/primitive/table-column.mjs +0 -1
  48. package/dist/primitive/table-config.d.mts +0 -26
  49. package/dist/primitive/table-config.mjs +0 -1
  50. package/dist/primitive/table-context.mjs +0 -1
  51. package/dist/primitive/table-empty-state.mjs +0 -1
  52. package/dist/primitive/table-footer.mjs +0 -1
  53. package/dist/primitive/table-header.mjs +0 -1
  54. package/dist/primitive/table-root.mjs +0 -1
  55. package/dist/primitive/table-row.mjs +0 -1
  56. package/dist/primitive/table-table.mjs +0 -1
  57. package/dist/primitive/table-wrapper.mjs +0 -1
  58. package/dist/primitive/table.mjs +0 -1
  59. package/dist/primitive/use-table.d.mts +0 -13
  60. package/dist/primitive/use-table.mjs +0 -1
  61. /package/dist/{primitive/styles.d.mts → styles.d.mts} +0 -0
  62. /package/dist/{primitive/table-body.d.mts → table-body.d.mts} +0 -0
  63. /package/dist/{primitive/table-cell.d.mts → table-cell.d.mts} +0 -0
  64. /package/dist/{primitive/table-column.d.mts → table-column.d.mts} +0 -0
  65. /package/dist/{primitive/table-empty-state.d.mts → table-empty-state.d.mts} +0 -0
  66. /package/dist/{primitive/table-footer.d.mts → table-footer.d.mts} +0 -0
  67. /package/dist/{primitive/table-header.d.mts → table-header.d.mts} +0 -0
  68. /package/dist/{primitive/table-root.d.mts → table-root.d.mts} +0 -0
  69. /package/dist/{primitive/table-row.d.mts → table-row.d.mts} +0 -0
  70. /package/dist/{primitive/table-table.d.mts → table-table.d.mts} +0 -0
  71. /package/dist/{primitive/table-wrapper.d.mts → table-wrapper.d.mts} +0 -0
package/dist/index.d.mts CHANGED
@@ -1,16 +1,34 @@
1
- export { TableBody } from './primitive/table-body.mjs';
2
- export { TableCell } from './primitive/table-cell.mjs';
3
- export { TableColumn } from './primitive/table-column.mjs';
4
- export { TableFooter } from './primitive/table-footer.mjs';
5
- export { TableHeader } from './primitive/table-header.mjs';
6
- export { TableRow } from './primitive/table-row.mjs';
7
- export { Table } from './table.mjs';
1
+ import * as react from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { T as Table$1 } from './table-YS-M_mfN.mjs';
4
+ import { TableBody } from './table-body.mjs';
5
+ import { TableCell } from './table-cell.mjs';
6
+ import { TableColumn } from './table-column.mjs';
7
+ import { TableFooter } from './table-footer.mjs';
8
+ import { TableHeader } from './table-header.mjs';
9
+ import { TableRow } from './table-row.mjs';
10
+ import { TableTable } from './table-table.mjs';
11
+ import { TableWrapper } from './table-wrapper.mjs';
8
12
  export { TableConfig, useTableConfig } from './table-config.mjs';
9
- import 'react';
10
13
  import '@jamsrui/utils';
11
- import 'react/jsx-runtime';
12
- import './table-COowFxBr.mjs';
13
- import './primitive/styles.mjs';
14
- import './primitive/table-root.mjs';
15
- import './primitive/table-wrapper.mjs';
14
+ import './styles.mjs';
15
+ import './table-root.mjs';
16
16
  import '@jamsrui/core';
17
+
18
+ declare const Table: ((props: Table$1.Props) => react_jsx_runtime.JSX.Element) & {
19
+ Root: (props: Table$1.Props) => react_jsx_runtime.JSX.Element;
20
+ Body: (props: TableBody.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
21
+ Cell: (props: TableCell.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
22
+ Footer: (props: TableFooter.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
23
+ Header: (props: TableHeader.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
24
+ Row: (props: TableRow.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
25
+ Table: (props: TableTable.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
26
+ Wrapper: (props: TableWrapper.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
27
+ Column: (props: TableColumn.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
28
+ };
29
+ declare namespace Table {
30
+ interface Props extends Table$1.Props {
31
+ }
32
+ }
33
+
34
+ export { Table, TableBody, TableCell, TableColumn, TableFooter, TableHeader, TableRow, TableTable, TableWrapper };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{a as t}from"./chunk-J4ZX6AQY.mjs";import{a as r,b as f}from"./chunk-G56JYZMX.mjs";import"./chunk-HZMKIGNF.mjs";import"./chunk-GSDCBY3X.mjs";import"./chunk-RJDA7IF5.mjs";import"./chunk-BHSFC5BI.mjs";import"./chunk-6TH4QLR4.mjs";import{a as b}from"./chunk-YJQDUGSR.mjs";import{a as T}from"./chunk-F5AMPC53.mjs";import"./chunk-NO7Q6M3H.mjs";import"./chunk-VV6AJGJT.mjs";import"./chunk-64OJE7BG.mjs";import{a as o}from"./chunk-2UOENW6T.mjs";import"./chunk-EALHLWMO.mjs";import{a as l}from"./chunk-IPKE7YHM.mjs";import{a as e}from"./chunk-VJMTZ2OI.mjs";import{a}from"./chunk-XPEMMX4W.mjs";import"./chunk-2F5JM5AO.mjs";export{t as Table,o as TableBody,e as TableCell,a as TableColumn,r as TableConfig,b as TableFooter,T as TableHeader,l as TableRow,f as useTableConfig};
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};
@@ -0,0 +1 @@
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};
@@ -1,14 +1,14 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
3
- import { TableVariantProps, TableSlots } from './primitive/styles.mjs';
4
- import { TableBody } from './primitive/table-body.mjs';
5
- import { TableCell } from './primitive/table-cell.mjs';
6
- import { TableColumn } from './primitive/table-column.mjs';
7
- import { TableFooter } from './primitive/table-footer.mjs';
8
- import { TableHeader } from './primitive/table-header.mjs';
9
- import { TableRoot } from './primitive/table-root.mjs';
10
- import { TableRow } from './primitive/table-row.mjs';
11
- import { TableWrapper } from './primitive/table-wrapper.mjs';
3
+ import { TableVariantProps, TableSlots } from './styles.mjs';
4
+ import { TableBody } from './table-body.mjs';
5
+ import { TableCell } from './table-cell.mjs';
6
+ import { TableColumn } from './table-column.mjs';
7
+ import { TableFooter } from './table-footer.mjs';
8
+ import { TableHeader } from './table-header.mjs';
9
+ import { TableRoot } from './table-root.mjs';
10
+ import { TableRow } from './table-row.mjs';
11
+ import { TableWrapper } from './table-wrapper.mjs';
12
12
 
13
13
  declare const useTable: (props: useTable.Props) => {
14
14
  getRootProps: PropGetter<TableRoot.Props>;
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -1,18 +1,17 @@
1
- import './primitive/table-body.mjs';
2
- import './primitive/table-cell.mjs';
3
- import './primitive/table-column.mjs';
4
- import './primitive/table-footer.mjs';
5
- import './primitive/table-header.mjs';
6
- import './primitive/table-row.mjs';
7
- import { Table } from './table.mjs';
8
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
2
  import { GlobalConfigProps } from '@jamsrui/core';
10
- import 'react';
3
+ import { T as Table } from './table-YS-M_mfN.mjs';
11
4
  import '@jamsrui/utils';
12
- import './table-COowFxBr.mjs';
13
- import './primitive/styles.mjs';
14
- import './primitive/table-root.mjs';
15
- import './primitive/table-wrapper.mjs';
5
+ import './styles.mjs';
6
+ import './table-body.mjs';
7
+ import 'react';
8
+ import './table-cell.mjs';
9
+ import './table-column.mjs';
10
+ import './table-footer.mjs';
11
+ import './table-header.mjs';
12
+ import './table-root.mjs';
13
+ import './table-row.mjs';
14
+ import './table-wrapper.mjs';
16
15
 
17
16
  declare const useTableConfig: () => TableConfig.Props;
18
17
  declare const TableConfig: (props: Omit<Partial<TableConfig.Props>, "children"> & {
@@ -1 +1 @@
1
- import{a,b}from"./chunk-G56JYZMX.mjs";export{a as TableConfig,b as useTableConfig};
1
+ "use client";import{createConfigContext as e}from"@jamsrui/utils";const[r,a]=e({displayName:"TableConfig"});export{r as TableConfig,a as useTableConfig};
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { u as useTable } from '../table-COowFxBr.mjs';
2
+ import { u as useTable } from './table-YS-M_mfN.mjs';
3
3
  import 'react/jsx-runtime';
4
4
  import '@jamsrui/utils';
5
5
  import './styles.mjs';
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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.d.mts CHANGED
@@ -1,21 +1,13 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { u as useTable } from './table-COowFxBr.mjs';
1
+ import 'react/jsx-runtime';
2
+ export { T as Table } from './table-YS-M_mfN.mjs';
3
3
  import '@jamsrui/utils';
4
- import './primitive/styles.mjs';
5
- import './primitive/table-body.mjs';
4
+ import './styles.mjs';
5
+ import './table-body.mjs';
6
6
  import 'react';
7
- import './primitive/table-cell.mjs';
8
- import './primitive/table-column.mjs';
9
- import './primitive/table-footer.mjs';
10
- import './primitive/table-header.mjs';
11
- import './primitive/table-root.mjs';
12
- import './primitive/table-row.mjs';
13
- import './primitive/table-wrapper.mjs';
14
-
15
- declare const Table: (props: Table.Props) => react_jsx_runtime.JSX.Element;
16
- declare namespace Table {
17
- interface Props extends useTable.Props {
18
- }
19
- }
20
-
21
- export { Table };
7
+ import './table-cell.mjs';
8
+ import './table-column.mjs';
9
+ import './table-footer.mjs';
10
+ import './table-header.mjs';
11
+ import './table-root.mjs';
12
+ import './table-row.mjs';
13
+ import './table-wrapper.mjs';
package/dist/table.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-J4ZX6AQY.mjs";import"./chunk-G56JYZMX.mjs";import"./chunk-HZMKIGNF.mjs";import"./chunk-GSDCBY3X.mjs";import"./chunk-RJDA7IF5.mjs";import"./chunk-BHSFC5BI.mjs";import"./chunk-6TH4QLR4.mjs";import"./chunk-YJQDUGSR.mjs";import"./chunk-F5AMPC53.mjs";import"./chunk-NO7Q6M3H.mjs";import"./chunk-VV6AJGJT.mjs";import"./chunk-64OJE7BG.mjs";import"./chunk-2UOENW6T.mjs";import"./chunk-EALHLWMO.mjs";import"./chunk-IPKE7YHM.mjs";import"./chunk-VJMTZ2OI.mjs";import"./chunk-XPEMMX4W.mjs";import"./chunk-2F5JM5AO.mjs";export{a as Table};
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};
@@ -1,9 +1,7 @@
1
- import 'react/jsx-runtime';
2
- export { T as Table } from '../table-COowFxBr.mjs';
3
1
  import '@jamsrui/utils';
4
2
  import './styles.mjs';
3
+ export { u as useTable } from './table-YS-M_mfN.mjs';
5
4
  import './table-body.mjs';
6
- import 'react';
7
5
  import './table-cell.mjs';
8
6
  import './table-column.mjs';
9
7
  import './table-footer.mjs';
@@ -11,3 +9,5 @@ import './table-header.mjs';
11
9
  import './table-root.mjs';
12
10
  import './table-row.mjs';
13
11
  import './table-wrapper.mjs';
12
+ import 'react/jsx-runtime';
13
+ import 'react';
@@ -0,0 +1 @@
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.12",
3
+ "version": "0.0.14",
4
4
  "peerDependencies": {
5
5
  "react": ">=19"
6
6
  },
7
7
  "dependencies": {
8
- "@jamsrui/core": "^0.0.10",
9
- "@jamsrui/hooks": "^0.0.12",
10
- "@jamsrui/utils": "^0.0.12"
8
+ "@jamsrui/core": "^0.0.12",
9
+ "@jamsrui/hooks": "^0.0.14",
10
+ "@jamsrui/utils": "^0.0.14"
11
11
  },
12
12
  "exports": {
13
13
  ".": {
@@ -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};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-EALHLWMO.mjs";import{b as e}from"./chunk-2F5JM5AO.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};
@@ -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};
@@ -1 +0,0 @@
1
- import{createConfigContext as o}from"@jamsrui/utils";var[r,a]=o({displayName:"TableConfig"});export{r as a,a as b};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-64OJE7BG.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};
@@ -1 +0,0 @@
1
- import{a as l}from"./chunk-IPKE7YHM.mjs";import{a as e}from"./chunk-VJMTZ2OI.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};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var n=r=>{let{getHeaderProps:t}=e();return o("thead",{props:[t(r)]})};export{n as a};
@@ -1 +0,0 @@
1
- import{createConfigContext as o}from"@jamsrui/utils";var[r,a]=o({displayName:"TableConfig"});export{r as a,a as b};
@@ -1 +0,0 @@
1
- import{a as b}from"./chunk-RJDA7IF5.mjs";import{a as m}from"./chunk-BHSFC5BI.mjs";import{b as t}from"./chunk-6TH4QLR4.mjs";import{a as l}from"./chunk-NO7Q6M3H.mjs";import{a as p}from"./chunk-VV6AJGJT.mjs";import{a}from"./chunk-2F5JM5AO.mjs";import{mergeConfigProps as f}from"@jamsrui/utils";import{jsx as e}from"react/jsx-runtime";var d=o=>{let{children:T}=o,r=t(),n=f(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};
File without changes
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.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};
@@ -1 +0,0 @@
1
- import{b as n}from"./chunk-G56JYZMX.mjs";import{a as b}from"./chunk-RJDA7IF5.mjs";import{a as T}from"./chunk-BHSFC5BI.mjs";import{a as t}from"./chunk-NO7Q6M3H.mjs";import{a as l}from"./chunk-VV6AJGJT.mjs";import{a as r}from"./chunk-2F5JM5AO.mjs";import{mergeConfigProps as m}from"@jamsrui/utils";import{jsx as e}from"react/jsx-runtime";var g=o=>{let{children:p}=o,a=n(),s=m(a,a,o),c=T(s);return e(r,{value:c,children:e(t,{children:e(b,{children:e(l,{children:p})})})})};export{g as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=o=>{let{getRootProps:r}=e();return t("div",{props:[r(o)]})};export{m as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var a=r=>{let{getWrapperProps:p}=e();return t("div",{props:[p(r)]})};export{a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var n=r=>{let{getCellProps:t}=e();return o("td",{props:[t(r)]})};export{n as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var l=r=>{let{getTableProps:t}=e();return o("table",{props:[t(r)]})};export{l as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var s=r=>{let{getColumnProps:o}=e();return t("th",{props:[o(r)]})};export{s as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk-2F5JM5AO.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var m=o=>{let{getFooterProps:r}=e();return t("tfoot",{props:[r(o)]})};export{m as a};
@@ -1,18 +0,0 @@
1
- export { T as Table, u as useTable } from '../table-COowFxBr.mjs';
2
- export { TableBody } from './table-body.mjs';
3
- export { TableCell } from './table-cell.mjs';
4
- export { TableColumn } from './table-column.mjs';
5
- export { TableConfig, useTableConfig } from './table-config.mjs';
6
- export { TableContext, useTableContext } from './table-context.mjs';
7
- export { TableEmptyState } from './table-empty-state.mjs';
8
- export { TableFooter } from './table-footer.mjs';
9
- export { TableHeader } from './table-header.mjs';
10
- export { TableRoot } from './table-root.mjs';
11
- export { TableRow } from './table-row.mjs';
12
- export { TableTable } from './table-table.mjs';
13
- export { TableWrapper } from './table-wrapper.mjs';
14
- export { TableSlots, TableVariantProps, tableVariants } from './styles.mjs';
15
- import 'react/jsx-runtime';
16
- import '@jamsrui/utils';
17
- import 'react';
18
- import '@jamsrui/core';
@@ -1 +0,0 @@
1
- import"../chunk-HZMKIGNF.mjs";import{a as j}from"../chunk-GSDCBY3X.mjs";import{a as g}from"../chunk-RJDA7IF5.mjs";import{a as i}from"../chunk-BHSFC5BI.mjs";import{a,b}from"../chunk-6TH4QLR4.mjs";import{a as p}from"../chunk-YJQDUGSR.mjs";import{a as q}from"../chunk-F5AMPC53.mjs";import{a as e}from"../chunk-NO7Q6M3H.mjs";import{a as f}from"../chunk-VV6AJGJT.mjs";import{a as h}from"../chunk-64OJE7BG.mjs";import{a as n}from"../chunk-2UOENW6T.mjs";import{a as m}from"../chunk-EALHLWMO.mjs";import{a as l}from"../chunk-IPKE7YHM.mjs";import{a as k}from"../chunk-VJMTZ2OI.mjs";import{a as o}from"../chunk-XPEMMX4W.mjs";import{a as c,b as d}from"../chunk-2F5JM5AO.mjs";export{j as Table,n as TableBody,k as TableCell,o as TableColumn,a as TableConfig,c as TableContext,m as TableEmptyState,p as TableFooter,q as TableHeader,e as TableRoot,l as TableRow,f as TableTable,g as TableWrapper,h as tableVariants,i as useTable,b as useTableConfig,d as useTableContext};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-64OJE7BG.mjs";export{a as tableVariants};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-2UOENW6T.mjs";import"../chunk-EALHLWMO.mjs";import"../chunk-IPKE7YHM.mjs";import"../chunk-VJMTZ2OI.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableBody};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-VJMTZ2OI.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableCell};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-XPEMMX4W.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableColumn};
@@ -1,26 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { GlobalConfigProps } from '@jamsrui/core';
3
- import { T as Table } from '../table-COowFxBr.mjs';
4
- import '@jamsrui/utils';
5
- import './styles.mjs';
6
- import './table-body.mjs';
7
- import 'react';
8
- import './table-cell.mjs';
9
- import './table-column.mjs';
10
- import './table-footer.mjs';
11
- import './table-header.mjs';
12
- import './table-root.mjs';
13
- import './table-row.mjs';
14
- import './table-wrapper.mjs';
15
-
16
- declare const useTableConfig: () => TableConfig.Props;
17
- declare const TableConfig: (props: Omit<Partial<TableConfig.Props>, "children"> & {
18
- merge?: boolean;
19
- children: React.ReactNode;
20
- }) => react_jsx_runtime.JSX.Element;
21
- declare namespace TableConfig {
22
- interface Props extends Table.Props, GlobalConfigProps<Table.Props> {
23
- }
24
- }
25
-
26
- export { TableConfig, useTableConfig };
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-6TH4QLR4.mjs";export{a as TableConfig,b as useTableConfig};
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-2F5JM5AO.mjs";export{a as TableContext,b as useTableContext};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-EALHLWMO.mjs";import"../chunk-IPKE7YHM.mjs";import"../chunk-VJMTZ2OI.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableEmptyState};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-YJQDUGSR.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableFooter};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-F5AMPC53.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableHeader};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-NO7Q6M3H.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableRoot};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-IPKE7YHM.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableRow};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-VV6AJGJT.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableTable};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-RJDA7IF5.mjs";import"../chunk-2F5JM5AO.mjs";export{a as TableWrapper};
@@ -1 +0,0 @@
1
- import{a}from"../chunk-GSDCBY3X.mjs";import"../chunk-RJDA7IF5.mjs";import"../chunk-BHSFC5BI.mjs";import"../chunk-6TH4QLR4.mjs";import"../chunk-NO7Q6M3H.mjs";import"../chunk-VV6AJGJT.mjs";import"../chunk-64OJE7BG.mjs";import"../chunk-2F5JM5AO.mjs";export{a as Table};
@@ -1,13 +0,0 @@
1
- import '@jamsrui/utils';
2
- import './styles.mjs';
3
- export { u as useTable } from '../table-COowFxBr.mjs';
4
- import './table-body.mjs';
5
- import './table-cell.mjs';
6
- import './table-column.mjs';
7
- import './table-footer.mjs';
8
- import './table-header.mjs';
9
- import './table-root.mjs';
10
- import './table-row.mjs';
11
- import './table-wrapper.mjs';
12
- import 'react/jsx-runtime';
13
- import 'react';
@@ -1 +0,0 @@
1
- import{a}from"../chunk-BHSFC5BI.mjs";import"../chunk-64OJE7BG.mjs";export{a as useTable};
File without changes