@jamsrui/table 0.0.16 → 0.0.17
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.d.mts +24 -5
- package/dist/index.mjs +1 -1
- package/dist/table-config.d.mts +2 -2
- package/dist/table-config.mjs +1 -1
- package/dist/table-context.mjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/use-table.mjs +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -4,31 +4,50 @@ import { T as Table$1 } from './table-YS-M_mfN.mjs';
|
|
|
4
4
|
import { TableBody } from './table-body.mjs';
|
|
5
5
|
import { TableCell } from './table-cell.mjs';
|
|
6
6
|
import { TableColumn } from './table-column.mjs';
|
|
7
|
+
import { TableConfig } from './table-config.mjs';
|
|
8
|
+
export { useTableConfig } from './table-config.mjs';
|
|
9
|
+
export { TableContext, useTableContext } from './table-context.mjs';
|
|
7
10
|
import { TableFooter } from './table-footer.mjs';
|
|
8
11
|
import { TableHeader } from './table-header.mjs';
|
|
9
12
|
import { TableRow } from './table-row.mjs';
|
|
10
13
|
import { TableTable } from './table-table.mjs';
|
|
11
14
|
import { TableWrapper } from './table-wrapper.mjs';
|
|
12
|
-
export {
|
|
15
|
+
export { TableSlots, TableVariantProps, tableVariants } from './styles.mjs';
|
|
13
16
|
import '@jamsrui/utils';
|
|
14
|
-
import './styles.mjs';
|
|
15
17
|
import './table-root.mjs';
|
|
16
18
|
import '@jamsrui/core';
|
|
17
19
|
|
|
18
20
|
declare const Table: ((props: Table$1.Props) => react_jsx_runtime.JSX.Element) & {
|
|
19
|
-
Root: (props: Table$1.Props) => react_jsx_runtime.JSX.Element;
|
|
20
21
|
Body: (props: TableBody.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
21
22
|
Cell: (props: TableCell.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
23
|
+
Column: (props: TableColumn.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
22
24
|
Footer: (props: TableFooter.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
23
25
|
Header: (props: TableHeader.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
24
26
|
Row: (props: TableRow.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
25
27
|
Table: (props: TableTable.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
26
28
|
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
|
};
|
|
29
30
|
declare namespace Table {
|
|
30
31
|
interface Props extends Table$1.Props {
|
|
31
32
|
}
|
|
33
|
+
interface Config extends TableConfig.Props {
|
|
34
|
+
}
|
|
35
|
+
interface Body extends TableBody.Props {
|
|
36
|
+
}
|
|
37
|
+
interface Cell extends TableCell.Props {
|
|
38
|
+
}
|
|
39
|
+
interface Column extends TableColumn.Props {
|
|
40
|
+
}
|
|
41
|
+
interface Footer extends TableFooter.Props {
|
|
42
|
+
}
|
|
43
|
+
interface Header extends TableHeader.Props {
|
|
44
|
+
}
|
|
45
|
+
interface Row extends TableRow.Props {
|
|
46
|
+
}
|
|
47
|
+
interface Table extends TableTable.Props {
|
|
48
|
+
}
|
|
49
|
+
interface Wrapper extends TableWrapper.Props {
|
|
50
|
+
}
|
|
32
51
|
}
|
|
33
52
|
|
|
34
|
-
export { Table, TableBody, TableCell, TableColumn, TableFooter, TableHeader, TableRow, TableTable, TableWrapper };
|
|
53
|
+
export { Table, TableBody, TableCell, TableColumn, TableConfig, TableFooter, TableHeader, TableRow, TableTable, TableWrapper };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Table as
|
|
1
|
+
import{Table as n}from"./table.mjs";import{TableBody as e}from"./table-body.mjs";import{TableCell as o}from"./table-cell.mjs";import{TableColumn as r}from"./table-column.mjs";import{TableConfig as T,useTableConfig as s}from"./table-config.mjs";import{TableContext as i,useTableContext as m}from"./table-context.mjs";import{TableFooter as t}from"./table-footer.mjs";import{TableHeader as a}from"./table-header.mjs";import{TableRow as l}from"./table-row.mjs";import{TableTable as p}from"./table-table.mjs";import{TableWrapper as b}from"./table-wrapper.mjs";import{tableVariants as f}from"./styles.mjs";const V=Object.assign(n,{Body:e,Cell:o,Column:r,Footer:t,Header:a,Row:l,Table:p,Wrapper:b});export{V as Table,e as TableBody,o as TableCell,r as TableColumn,T as TableConfig,i as TableContext,t as TableFooter,a as TableHeader,l as TableRow,p as TableTable,b as TableWrapper,f as tableVariants,s as useTableConfig,m as useTableContext};
|
package/dist/table-config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { WithGlobalConfig } from '@jamsrui/core';
|
|
3
3
|
import { T as Table } from './table-YS-M_mfN.mjs';
|
|
4
4
|
import '@jamsrui/utils';
|
|
5
5
|
import './styles.mjs';
|
|
@@ -19,7 +19,7 @@ declare const TableConfig: (props: Omit<Partial<TableConfig.Props>, "children">
|
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
}) => react_jsx_runtime.JSX.Element;
|
|
21
21
|
declare namespace TableConfig {
|
|
22
|
-
interface Props extends
|
|
22
|
+
interface Props extends WithGlobalConfig<Table.Props> {
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
package/dist/table-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createConfigContext as e}from"@jamsrui/utils";const[
|
|
1
|
+
"use client";import{createConfigContext as e}from"@jamsrui/utils";const[t,a]=e({displayName:"TableConfig"});export{t as TableConfig,a as useTableConfig};
|
package/dist/table-context.mjs
CHANGED
|
@@ -1 +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};
|
|
1
|
+
"use client";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};
|
package/dist/table.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{mergeConfigProps as p}from"@jamsrui/utils";import{tableVariants as m}from"./styles.mjs";import{useTableConfig as b}from"./table-config.mjs";import{TableContext as n}from"./table-context.mjs";import{TableRoot as s}from"./table-root.mjs";import{TableTable as T}from"./table-table.mjs";import{TableWrapper as i}from"./table-wrapper.mjs";import{useTable as f}from"./use-table.mjs";const V=o=>{const{children:r}=o,t=b(),a=p(m.defaultVariants,t,o),l=f(a);return e(n,{value:l,children:e(s,{children:e(i,{children:e(T,{children:r})})})})};export{V as Table};
|
package/dist/use-table.mjs
CHANGED
|
@@ -1 +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};
|
|
1
|
+
"use client";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.17",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/
|
|
9
|
-
"@jamsrui/
|
|
10
|
-
"@jamsrui/
|
|
8
|
+
"@jamsrui/hooks": "^0.0.17",
|
|
9
|
+
"@jamsrui/core": "^0.0.14",
|
|
10
|
+
"@jamsrui/utils": "^0.0.17"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|