@jamsrui/table 0.0.2

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 (90) hide show
  1. package/README.md +40 -0
  2. package/dist/chunk-33TE2BHZ.js +1 -0
  3. package/dist/chunk-3DEGOO53.js +1 -0
  4. package/dist/chunk-4HKO3A5Q.js +1 -0
  5. package/dist/chunk-AE6FXOJG.mjs +1 -0
  6. package/dist/chunk-AOUQYQBM.js +1 -0
  7. package/dist/chunk-BNDB4QJQ.mjs +1 -0
  8. package/dist/chunk-C226J2M3.mjs +1 -0
  9. package/dist/chunk-CUSCOOCX.mjs +1 -0
  10. package/dist/chunk-E66GNLTH.mjs +1 -0
  11. package/dist/chunk-FCXZ6T4U.mjs +1 -0
  12. package/dist/chunk-G56JYZMX.mjs +1 -0
  13. package/dist/chunk-GKIPZGG6.js +1 -0
  14. package/dist/chunk-GYUJBPIW.mjs +1 -0
  15. package/dist/chunk-IUKUUQL4.js +1 -0
  16. package/dist/chunk-J4IKCIFW.js +1 -0
  17. package/dist/chunk-NTBPFXNE.js +1 -0
  18. package/dist/chunk-QMFUPHXA.js +1 -0
  19. package/dist/chunk-SDQMNVG7.mjs +1 -0
  20. package/dist/chunk-TUDBCRW7.js +1 -0
  21. package/dist/chunk-TYYVDMZS.mjs +1 -0
  22. package/dist/chunk-U734EP46.js +1 -0
  23. package/dist/chunk-VOSLASEC.js +1 -0
  24. package/dist/chunk-VVMX3GVS.mjs +1 -0
  25. package/dist/chunk-WKT355RZ.mjs +1 -0
  26. package/dist/chunk-YRMO4O4W.mjs +1 -0
  27. package/dist/chunk-ZEQXYD6G.js +1 -0
  28. package/dist/index.d.mts +14 -0
  29. package/dist/index.d.ts +14 -0
  30. package/dist/index.js +1 -0
  31. package/dist/index.mjs +1 -0
  32. package/dist/styles.d.mts +210 -0
  33. package/dist/styles.d.ts +210 -0
  34. package/dist/styles.js +1 -0
  35. package/dist/styles.mjs +1 -0
  36. package/dist/table-2IVtRYPc.d.ts +45 -0
  37. package/dist/table-body.d.mts +10 -0
  38. package/dist/table-body.d.ts +10 -0
  39. package/dist/table-body.js +1 -0
  40. package/dist/table-body.mjs +1 -0
  41. package/dist/table-cell.d.mts +10 -0
  42. package/dist/table-cell.d.ts +10 -0
  43. package/dist/table-cell.js +1 -0
  44. package/dist/table-cell.mjs +1 -0
  45. package/dist/table-column.d.mts +10 -0
  46. package/dist/table-column.d.ts +10 -0
  47. package/dist/table-column.js +1 -0
  48. package/dist/table-column.mjs +1 -0
  49. package/dist/table-config.d.mts +24 -0
  50. package/dist/table-config.d.ts +24 -0
  51. package/dist/table-config.js +1 -0
  52. package/dist/table-config.mjs +1 -0
  53. package/dist/table-context.d.mts +21 -0
  54. package/dist/table-context.d.ts +21 -0
  55. package/dist/table-context.js +1 -0
  56. package/dist/table-context.mjs +1 -0
  57. package/dist/table-empty-state.d.mts +5 -0
  58. package/dist/table-empty-state.d.ts +5 -0
  59. package/dist/table-empty-state.js +1 -0
  60. package/dist/table-empty-state.mjs +1 -0
  61. package/dist/table-footer.d.mts +10 -0
  62. package/dist/table-footer.d.ts +10 -0
  63. package/dist/table-footer.js +1 -0
  64. package/dist/table-footer.mjs +1 -0
  65. package/dist/table-header.d.mts +10 -0
  66. package/dist/table-header.d.ts +10 -0
  67. package/dist/table-header.js +1 -0
  68. package/dist/table-header.mjs +1 -0
  69. package/dist/table-kjrxrR3X.d.mts +45 -0
  70. package/dist/table-root.d.mts +10 -0
  71. package/dist/table-root.d.ts +10 -0
  72. package/dist/table-root.js +1 -0
  73. package/dist/table-root.mjs +1 -0
  74. package/dist/table-row.d.mts +10 -0
  75. package/dist/table-row.d.ts +10 -0
  76. package/dist/table-row.js +1 -0
  77. package/dist/table-row.mjs +1 -0
  78. package/dist/table-wrapper.d.mts +10 -0
  79. package/dist/table-wrapper.d.ts +10 -0
  80. package/dist/table-wrapper.js +1 -0
  81. package/dist/table-wrapper.mjs +1 -0
  82. package/dist/table.d.mts +12 -0
  83. package/dist/table.d.ts +12 -0
  84. package/dist/table.js +1 -0
  85. package/dist/table.mjs +1 -0
  86. package/dist/use-table.d.mts +12 -0
  87. package/dist/use-table.d.ts +12 -0
  88. package/dist/use-table.js +1 -0
  89. package/dist/use-table.mjs +1 -0
  90. package/package.json +48 -0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # 🚀 **JamsrUI**
2
+
3
+ **A comprehensive React UI component library designed for developers, with Tailwind CSS integration for seamless styling.**
4
+
5
+
6
+ ## 📖 **Overview**
7
+
8
+ [JamsrUI](https://jamsr-ui.jamsrworld.com) is designed to help developers build modern, fast and visually appealing web applications with ease.
9
+
10
+ ## 🚀 Getting Started
11
+
12
+ Boost & Build your websites using [JamsrUI](https://jamsr-ui.jamsrworld.com).
13
+
14
+ ## ✨ Features
15
+
16
+ - 🚀 **Production-Ready**: Optimized for modern React projects.
17
+ - 🎨 **Customizable**: Easily override styles and themes.
18
+ - 🛠️ **Reusable Components**: Save time with prebuilt, efficient UI elements.
19
+ - ⚡ **Developer-Friendly**: Simple API and well-documented usage.
20
+ - 📦 **Lightweight**: Minimal dependencies for fast performance.
21
+ - 🖥️ **Modern Design**: Clean, responsive, and user-friendly components.
22
+
23
+ ## 🌱 Community
24
+
25
+ We’re thrilled to see the community actively engage with **JamsrUI**! Whether you're sharing feedback, reporting bugs, requesting features, or showcasing projects built with JamsrUI, your involvement helps us grow and improve.
26
+
27
+ ### How to Engage
28
+
29
+ - 💬 **Report Bugs**: [GitHub Issues](https://github.com/jamsrworld/jamsr-ui/issues)
30
+ - 🚀 **Request Features**: Share ideas for new components.
31
+ - 🤝 **Showcase Projects**: Let us know how you use JamsrUI.
32
+
33
+ ## Contributing
34
+
35
+ We welcome contributions from developers of all skill levels!
36
+
37
+ ## ⭐ Support the Project
38
+
39
+ If you find **JamsrUI** helpful, consider giving it a ⭐ on [GitHub](https://github.com/jamsrworld/jamsr-ui).
40
+
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var a=r=>{let{getWrapperProps:p}=_chunkGKIPZGG6js.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "div",{props:[p(r)]})};exports.a = a;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var l=r=>{let{getTableProps:t}=_chunkGKIPZGG6js.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "table",{props:[t(r)]})};exports.a = l;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var m=r=>{let{getRowProps:o}=_chunkGKIPZGG6js.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "tr",{props:[o(r)]})};exports.a = m;
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-TYYVDMZS.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};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var n=r=>{let{getHeaderProps:t}=_chunkGKIPZGG6js.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "thead",{props:[t(r)]})};exports.a = n;
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-GYUJBPIW.mjs";import{b as o}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var c=e=>{let{children:t}=e,{getBodyProps:n}=o(),s=t??React.createElement(r,null);return p("tbody",{props:[n(e),{children:s}]})};export{c as a};
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-TYYVDMZS.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};
@@ -0,0 +1 @@
1
+ import{a as p}from"./chunk-SDQMNVG7.mjs";import{a as s}from"./chunk-WKT355RZ.mjs";import{a}from"./chunk-FCXZ6T4U.mjs";import{b as t}from"./chunk-G56JYZMX.mjs";import{a as n}from"./chunk-TYYVDMZS.mjs";import{useRenderElement as T}from"@jamsrui/hooks";import{mergeConfigProps as f}from"@jamsrui/utils";var v=e=>{let{children:l}=e,o=t(),m=f(o,o,e),r=a(m),{getRootProps:c}=r,i=React.createElement(s,null,React.createElement(p,null,l)),b=T("div",{props:[c({}),{children:i}]});return React.createElement(n,{value:r},b)};export{v as a};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
1
+ import{b as c}from"./chunk-YRMO4O4W.mjs";import{useCallback as r,useMemo as C}from"react";import{cn as l,dataAttrDev as s,mapPropsVariants as g,mergeProps as p}from"@jamsrui/utils";var B=u=>{let[m,h]=g(u,c.variantKeys),{classNames:o,slotProps:e,...b}=m,t=c(h),P=r(()=>({...b,"data-slot":s("root"),"data-component":s("table"),className:t.root({className:l(o?.root,m.className)})}),[m.className,o?.root,b,t]),d=r(a=>({...p(e?.wrapper,a),"data-slot":s("wrapper"),className:t.wrapper({className:l(e?.wrapper?.className,o?.wrapper,a.className)})}),[o?.wrapper,e?.wrapper,t]),N=r(a=>({...p(e?.table,a),"data-slot":s("table"),className:t.table({className:l(e?.table?.className,o?.table,a.className)})}),[o?.table,e?.table,t]),n=r(a=>({...p(e?.header,a),"data-slot":s("header"),className:t.thead({className:l(e?.header?.className,o?.thead,a.className)})}),[o?.thead,e?.header,t]),T=r(a=>({...p(e?.column,a),"data-slot":s("column"),className:t.th({className:l(e?.column,o?.th,a.className)})}),[o?.th,e?.column,t]),y=r(a=>({...p(e?.body,a),"data-slot":s("body"),className:t.tbody({className:l(e?.body?.className,o?.tbody,a.className)})}),[o?.tbody,e?.body,t]),f=r(a=>({...p(e?.row,a),"data-slot":s("row"),className:t.tr({className:l(e?.row?.className,o?.tr,a.className)})}),[o?.tr,e?.row,t]),i=r(a=>({...p(e?.cell,a),"data-slot":s("cell"),className:t.td({className:l(e?.cell?.className,o?.td,a.className)})}),[o?.td,e?.cell,t]),w=r(a=>({...p(e?.footer,a),"data-slot":s("footer"),className:t.tfoot({className:l(e?.footer?.className,o?.tfoot,a.className)})}),[o?.tfoot,e?.footer,t]);return C(()=>({getRootProps:P,getTableProps:N,getHeaderProps:n,getColumnProps:T,getBodyProps:y,getRowProps:f,getCellProps:i,getFooterProps:w,getWrapperProps:d}),[y,i,T,w,n,P,f,N,d])};export{B as a};
@@ -0,0 +1 @@
1
+ import{createConfigContext as o}from"@jamsrui/utils";var[r,a]=o({displayName:"TableConfig"});export{r as a,a as b};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var n=_react.createContext.call(void 0, null),s= exports.b =()=>{let e=_react.use.call(void 0, n);if(!e)throw new Error("useTableContext must be used within TableContext");return e};exports.a = n; exports.b = s;
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-E66GNLTH.mjs";import{a as e}from"./chunk-AE6FXOJG.mjs";var o=()=>React.createElement(t,null,React.createElement(e,{className:"text-center py-12",colSpan:100},"No data found"));export{o as a};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4HKO3A5Qjs = require('./chunk-4HKO3A5Q.js');var _chunkNTBPFXNEjs = require('./chunk-NTBPFXNE.js');var o=()=>React.createElement(_chunk4HKO3A5Qjs.a,null,React.createElement(_chunkNTBPFXNEjs.a,{className:"text-center py-12",colSpan:100},"No data found"));exports.a = o;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkTUDBCRW7js = require('./chunk-TUDBCRW7.js');var _react = require('react');var _utils = require('@jamsrui/utils');var B=u=>{let[m,h]=_utils.mapPropsVariants.call(void 0, u,_chunkTUDBCRW7js.b.variantKeys),{classNames:o,slotProps:e,...b}=m,t=_chunkTUDBCRW7js.b.call(void 0, h),P=_react.useCallback.call(void 0, ()=>({...b,"data-slot":_utils.dataAttrDev.call(void 0, "root"),"data-component":_utils.dataAttrDev.call(void 0, "table"),className:t.root({className:_utils.cn.call(void 0, _optionalChain([o, 'optionalAccess', _ => _.root]),m.className)})}),[m.className,_optionalChain([o, 'optionalAccess', _2 => _2.root]),b,t]),d=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _3 => _3.wrapper]),a),"data-slot":_utils.dataAttrDev.call(void 0, "wrapper"),className:t.wrapper({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _4 => _4.wrapper, 'optionalAccess', _5 => _5.className]),_optionalChain([o, 'optionalAccess', _6 => _6.wrapper]),a.className)})}),[_optionalChain([o, 'optionalAccess', _7 => _7.wrapper]),_optionalChain([e, 'optionalAccess', _8 => _8.wrapper]),t]),N=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _9 => _9.table]),a),"data-slot":_utils.dataAttrDev.call(void 0, "table"),className:t.table({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _10 => _10.table, 'optionalAccess', _11 => _11.className]),_optionalChain([o, 'optionalAccess', _12 => _12.table]),a.className)})}),[_optionalChain([o, 'optionalAccess', _13 => _13.table]),_optionalChain([e, 'optionalAccess', _14 => _14.table]),t]),n=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _15 => _15.header]),a),"data-slot":_utils.dataAttrDev.call(void 0, "header"),className:t.thead({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _16 => _16.header, 'optionalAccess', _17 => _17.className]),_optionalChain([o, 'optionalAccess', _18 => _18.thead]),a.className)})}),[_optionalChain([o, 'optionalAccess', _19 => _19.thead]),_optionalChain([e, 'optionalAccess', _20 => _20.header]),t]),T=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _21 => _21.column]),a),"data-slot":_utils.dataAttrDev.call(void 0, "column"),className:t.th({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _22 => _22.column]),_optionalChain([o, 'optionalAccess', _23 => _23.th]),a.className)})}),[_optionalChain([o, 'optionalAccess', _24 => _24.th]),_optionalChain([e, 'optionalAccess', _25 => _25.column]),t]),y=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _26 => _26.body]),a),"data-slot":_utils.dataAttrDev.call(void 0, "body"),className:t.tbody({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _27 => _27.body, 'optionalAccess', _28 => _28.className]),_optionalChain([o, 'optionalAccess', _29 => _29.tbody]),a.className)})}),[_optionalChain([o, 'optionalAccess', _30 => _30.tbody]),_optionalChain([e, 'optionalAccess', _31 => _31.body]),t]),f=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _32 => _32.row]),a),"data-slot":_utils.dataAttrDev.call(void 0, "row"),className:t.tr({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _33 => _33.row, 'optionalAccess', _34 => _34.className]),_optionalChain([o, 'optionalAccess', _35 => _35.tr]),a.className)})}),[_optionalChain([o, 'optionalAccess', _36 => _36.tr]),_optionalChain([e, 'optionalAccess', _37 => _37.row]),t]),i=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _38 => _38.cell]),a),"data-slot":_utils.dataAttrDev.call(void 0, "cell"),className:t.td({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _39 => _39.cell, 'optionalAccess', _40 => _40.className]),_optionalChain([o, 'optionalAccess', _41 => _41.td]),a.className)})}),[_optionalChain([o, 'optionalAccess', _42 => _42.td]),_optionalChain([e, 'optionalAccess', _43 => _43.cell]),t]),w=_react.useCallback.call(void 0, a=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _44 => _44.footer]),a),"data-slot":_utils.dataAttrDev.call(void 0, "footer"),className:t.tfoot({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _45 => _45.footer, 'optionalAccess', _46 => _46.className]),_optionalChain([o, 'optionalAccess', _47 => _47.tfoot]),a.className)})}),[_optionalChain([o, 'optionalAccess', _48 => _48.tfoot]),_optionalChain([e, 'optionalAccess', _49 => _49.footer]),t]);return _react.useMemo.call(void 0, ()=>({getRootProps:P,getTableProps:N,getHeaderProps:n,getColumnProps:T,getBodyProps:y,getRowProps:f,getCellProps:i,getFooterProps:w,getWrapperProps:d}),[y,i,T,w,n,P,f,N,d])};exports.a = B;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var n=r=>{let{getCellProps:t}=_chunkGKIPZGG6js.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "td",{props:[t(r)]})};exports.a = n;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var[r,a]=_utils.createConfigContext.call(void 0, {displayName:"TableConfig"});exports.a = r; exports.b = a;
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-TYYVDMZS.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};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var o="",a= exports.b =_utils.tv.call(void 0, {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 whitespace-nowrap px-3 text-left text-sm",tbody:"",tr:"group/tr",td:"overflow-hidden whitespace-nowrap px-3 text-sm",tfoot:"",sortIcon:"",emptyWrapper:"",loadingWrapper:""},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-stroke-secondary",td:"border-b border-divider",root:"bg-surface"}},radius:_utils.radiusVariant.call(void 0, "root"),density:{compact:{td:"py-2"},standard:{td:"py-4"},comfortable:{td:"py-6"}},isHeaderSticky:{true:{thead:"sticky top-0 z-10 bg-surface [&>tr]:shadow-sm",wrapper:"flex max-h-[400px] flex-col overflow-auto"}},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:"solid",radius:"md"}});exports.a = o; exports.b = a;
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3DEGOO53js = require('./chunk-3DEGOO53.js');var _chunk33TE2BHZjs = require('./chunk-33TE2BHZ.js');var _chunkJ4IKCIFWjs = require('./chunk-J4IKCIFW.js');var _chunkQMFUPHXAjs = require('./chunk-QMFUPHXA.js');var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var _utils = require('@jamsrui/utils');var v=e=>{let{children:l}=e,o=_chunkQMFUPHXAjs.b.call(void 0, ),m=_utils.mergeConfigProps.call(void 0, o,o,e),r=_chunkJ4IKCIFWjs.a.call(void 0, m),{getRootProps:c}=r,i=React.createElement(_chunk33TE2BHZjs.a,null,React.createElement(_chunk3DEGOO53js.a,null,l)),b=_hooks.useRenderElement.call(void 0, "div",{props:[c({}),{children:i}]});return React.createElement(_chunkGKIPZGG6js.a,{value:r},b)};exports.a = v;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkIUKUUQL4js = require('./chunk-IUKUUQL4.js');var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var c=e=>{let{children:t}=e,{getBodyProps:n}=_chunkGKIPZGG6js.b.call(void 0, ),s=_nullishCoalesce(t, () => (React.createElement(_chunkIUKUUQL4js.a,null)));return _hooks.useRenderElement.call(void 0, "tbody",{props:[n(e),{children:s}]})};exports.a = c;
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-TYYVDMZS.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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
1
+ import{radiusVariant as r,tv as t}from"@jamsrui/utils";var o="",a=t({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 whitespace-nowrap px-3 text-left text-sm",tbody:"",tr:"group/tr",td:"overflow-hidden whitespace-nowrap px-3 text-sm",tfoot:"",sortIcon:"",emptyWrapper:"",loadingWrapper:""},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-stroke-secondary",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 bg-surface [&>tr]:shadow-sm",wrapper:"flex max-h-[400px] flex-col overflow-auto"}},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:"solid",radius:"md"}});export{o as a,a as b};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGKIPZGG6js = require('./chunk-GKIPZGG6.js');var _hooks = require('@jamsrui/hooks');var s=r=>{let{getColumnProps:o}=_chunkGKIPZGG6js.b.call(void 0, );return _hooks.useRenderElement.call(void 0, "th",{props:[o(r)]})};exports.a = s;
@@ -0,0 +1,14 @@
1
+ export { T as Table } from './table-kjrxrR3X.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 { TableHeader } from './table-header.mjs';
7
+ export { TableRow } from './table-row.mjs';
8
+ import 'react';
9
+ import '@jamsrui/utils';
10
+ import './styles.mjs';
11
+ import 'tailwind-variants';
12
+ import './table-footer.mjs';
13
+ import './table-wrapper.mjs';
14
+ import '@jamsrui/core';
@@ -0,0 +1,14 @@
1
+ export { T as Table } from './table-2IVtRYPc.js';
2
+ export { TableBody } from './table-body.js';
3
+ export { TableCell } from './table-cell.js';
4
+ export { TableColumn } from './table-column.js';
5
+ export { TableConfig, useTableConfig } from './table-config.js';
6
+ export { TableHeader } from './table-header.js';
7
+ export { TableRow } from './table-row.js';
8
+ import 'react';
9
+ import '@jamsrui/utils';
10
+ import './styles.js';
11
+ import 'tailwind-variants';
12
+ import './table-footer.js';
13
+ import './table-wrapper.js';
14
+ import '@jamsrui/core';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkAOUQYQBMjs = require('./chunk-AOUQYQBM.js');var _chunkU734EP46js = require('./chunk-U734EP46.js');require('./chunk-3DEGOO53.js');require('./chunk-33TE2BHZ.js');require('./chunk-J4IKCIFW.js');require('./chunk-TUDBCRW7.js');var _chunkVOSLASECjs = require('./chunk-VOSLASEC.js');var _chunkZEQXYD6Gjs = require('./chunk-ZEQXYD6G.js');var _chunkQMFUPHXAjs = require('./chunk-QMFUPHXA.js');require('./chunk-IUKUUQL4.js');var _chunk4HKO3A5Qjs = require('./chunk-4HKO3A5Q.js');var _chunkNTBPFXNEjs = require('./chunk-NTBPFXNE.js');require('./chunk-GKIPZGG6.js');exports.Table = _chunkU734EP46js.a; exports.TableBody = _chunkVOSLASECjs.a; exports.TableCell = _chunkNTBPFXNEjs.a; exports.TableColumn = _chunkZEQXYD6Gjs.a; exports.TableConfig = _chunkQMFUPHXAjs.a; exports.TableHeader = _chunkAOUQYQBMjs.a; exports.TableRow = _chunk4HKO3A5Qjs.a; exports.useTableConfig = _chunkQMFUPHXAjs.b;
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ "use client";import{a as m}from"./chunk-C226J2M3.mjs";import{a as r}from"./chunk-CUSCOOCX.mjs";import"./chunk-SDQMNVG7.mjs";import"./chunk-WKT355RZ.mjs";import"./chunk-FCXZ6T4U.mjs";import"./chunk-YRMO4O4W.mjs";import{a as f}from"./chunk-BNDB4QJQ.mjs";import{a as b}from"./chunk-VVMX3GVS.mjs";import{a as e,b as o}from"./chunk-G56JYZMX.mjs";import"./chunk-GYUJBPIW.mjs";import{a}from"./chunk-E66GNLTH.mjs";import{a as l}from"./chunk-AE6FXOJG.mjs";import"./chunk-TYYVDMZS.mjs";export{r as Table,f as TableBody,l as TableCell,b as TableColumn,e as TableConfig,m as TableHeader,a as TableRow,o as useTableConfig};
@@ -0,0 +1,210 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from '@jamsrui/utils';
3
+
4
+ declare const test = "";
5
+ declare const tableVariants: tailwind_variants.TVReturnType<{
6
+ variant: {
7
+ solid: {
8
+ th: string;
9
+ root: string;
10
+ };
11
+ bordered: {
12
+ th: string;
13
+ td: string;
14
+ root: string;
15
+ };
16
+ };
17
+ radius: {
18
+ sm: {};
19
+ md: {};
20
+ lg: {};
21
+ xl: {};
22
+ "2xl": {};
23
+ "3xl": {};
24
+ full: {};
25
+ none: {};
26
+ };
27
+ density: {
28
+ compact: {
29
+ td: string;
30
+ };
31
+ standard: {
32
+ td: string;
33
+ };
34
+ comfortable: {
35
+ td: string;
36
+ };
37
+ };
38
+ isHeaderSticky: {
39
+ true: {
40
+ thead: string;
41
+ wrapper: string;
42
+ };
43
+ };
44
+ allowHover: {
45
+ true: {
46
+ td: string;
47
+ };
48
+ false: {
49
+ td: string;
50
+ };
51
+ };
52
+ separateRows: {
53
+ true: {
54
+ tr: string;
55
+ td: string;
56
+ root: string;
57
+ };
58
+ };
59
+ }, {
60
+ root: string;
61
+ wrapper: string;
62
+ table: string;
63
+ thead: string;
64
+ th: string;
65
+ tbody: string;
66
+ tr: string;
67
+ td: string;
68
+ tfoot: string;
69
+ sortIcon: string;
70
+ emptyWrapper: string;
71
+ loadingWrapper: string;
72
+ }, undefined, {
73
+ variant: {
74
+ solid: {
75
+ th: string;
76
+ root: string;
77
+ };
78
+ bordered: {
79
+ th: string;
80
+ td: string;
81
+ root: string;
82
+ };
83
+ };
84
+ radius: {
85
+ sm: {};
86
+ md: {};
87
+ lg: {};
88
+ xl: {};
89
+ "2xl": {};
90
+ "3xl": {};
91
+ full: {};
92
+ none: {};
93
+ };
94
+ density: {
95
+ compact: {
96
+ td: string;
97
+ };
98
+ standard: {
99
+ td: string;
100
+ };
101
+ comfortable: {
102
+ td: string;
103
+ };
104
+ };
105
+ isHeaderSticky: {
106
+ true: {
107
+ thead: string;
108
+ wrapper: string;
109
+ };
110
+ };
111
+ allowHover: {
112
+ true: {
113
+ td: string;
114
+ };
115
+ false: {
116
+ td: string;
117
+ };
118
+ };
119
+ separateRows: {
120
+ true: {
121
+ tr: string;
122
+ td: string;
123
+ root: string;
124
+ };
125
+ };
126
+ }, {
127
+ root: string;
128
+ wrapper: string;
129
+ table: string;
130
+ thead: string;
131
+ th: string;
132
+ tbody: string;
133
+ tr: string;
134
+ td: string;
135
+ tfoot: string;
136
+ sortIcon: string;
137
+ emptyWrapper: string;
138
+ loadingWrapper: string;
139
+ }, tailwind_variants.TVReturnType<{
140
+ variant: {
141
+ solid: {
142
+ th: string;
143
+ root: string;
144
+ };
145
+ bordered: {
146
+ th: string;
147
+ td: string;
148
+ root: string;
149
+ };
150
+ };
151
+ radius: {
152
+ sm: {};
153
+ md: {};
154
+ lg: {};
155
+ xl: {};
156
+ "2xl": {};
157
+ "3xl": {};
158
+ full: {};
159
+ none: {};
160
+ };
161
+ density: {
162
+ compact: {
163
+ td: string;
164
+ };
165
+ standard: {
166
+ td: string;
167
+ };
168
+ comfortable: {
169
+ td: string;
170
+ };
171
+ };
172
+ isHeaderSticky: {
173
+ true: {
174
+ thead: string;
175
+ wrapper: string;
176
+ };
177
+ };
178
+ allowHover: {
179
+ true: {
180
+ td: string;
181
+ };
182
+ false: {
183
+ td: string;
184
+ };
185
+ };
186
+ separateRows: {
187
+ true: {
188
+ tr: string;
189
+ td: string;
190
+ root: string;
191
+ };
192
+ };
193
+ }, {
194
+ root: string;
195
+ wrapper: string;
196
+ table: string;
197
+ thead: string;
198
+ th: string;
199
+ tbody: string;
200
+ tr: string;
201
+ td: string;
202
+ tfoot: string;
203
+ sortIcon: string;
204
+ emptyWrapper: string;
205
+ loadingWrapper: string;
206
+ }, undefined, unknown, unknown, undefined>>;
207
+ type TableVariantProps = VariantProps<typeof tableVariants>;
208
+ type TableSlots = keyof ReturnType<typeof tableVariants>;
209
+
210
+ export { type TableSlots, type TableVariantProps, tableVariants, test };
@@ -0,0 +1,210 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from '@jamsrui/utils';
3
+
4
+ declare const test = "";
5
+ declare const tableVariants: tailwind_variants.TVReturnType<{
6
+ variant: {
7
+ solid: {
8
+ th: string;
9
+ root: string;
10
+ };
11
+ bordered: {
12
+ th: string;
13
+ td: string;
14
+ root: string;
15
+ };
16
+ };
17
+ radius: {
18
+ sm: {};
19
+ md: {};
20
+ lg: {};
21
+ xl: {};
22
+ "2xl": {};
23
+ "3xl": {};
24
+ full: {};
25
+ none: {};
26
+ };
27
+ density: {
28
+ compact: {
29
+ td: string;
30
+ };
31
+ standard: {
32
+ td: string;
33
+ };
34
+ comfortable: {
35
+ td: string;
36
+ };
37
+ };
38
+ isHeaderSticky: {
39
+ true: {
40
+ thead: string;
41
+ wrapper: string;
42
+ };
43
+ };
44
+ allowHover: {
45
+ true: {
46
+ td: string;
47
+ };
48
+ false: {
49
+ td: string;
50
+ };
51
+ };
52
+ separateRows: {
53
+ true: {
54
+ tr: string;
55
+ td: string;
56
+ root: string;
57
+ };
58
+ };
59
+ }, {
60
+ root: string;
61
+ wrapper: string;
62
+ table: string;
63
+ thead: string;
64
+ th: string;
65
+ tbody: string;
66
+ tr: string;
67
+ td: string;
68
+ tfoot: string;
69
+ sortIcon: string;
70
+ emptyWrapper: string;
71
+ loadingWrapper: string;
72
+ }, undefined, {
73
+ variant: {
74
+ solid: {
75
+ th: string;
76
+ root: string;
77
+ };
78
+ bordered: {
79
+ th: string;
80
+ td: string;
81
+ root: string;
82
+ };
83
+ };
84
+ radius: {
85
+ sm: {};
86
+ md: {};
87
+ lg: {};
88
+ xl: {};
89
+ "2xl": {};
90
+ "3xl": {};
91
+ full: {};
92
+ none: {};
93
+ };
94
+ density: {
95
+ compact: {
96
+ td: string;
97
+ };
98
+ standard: {
99
+ td: string;
100
+ };
101
+ comfortable: {
102
+ td: string;
103
+ };
104
+ };
105
+ isHeaderSticky: {
106
+ true: {
107
+ thead: string;
108
+ wrapper: string;
109
+ };
110
+ };
111
+ allowHover: {
112
+ true: {
113
+ td: string;
114
+ };
115
+ false: {
116
+ td: string;
117
+ };
118
+ };
119
+ separateRows: {
120
+ true: {
121
+ tr: string;
122
+ td: string;
123
+ root: string;
124
+ };
125
+ };
126
+ }, {
127
+ root: string;
128
+ wrapper: string;
129
+ table: string;
130
+ thead: string;
131
+ th: string;
132
+ tbody: string;
133
+ tr: string;
134
+ td: string;
135
+ tfoot: string;
136
+ sortIcon: string;
137
+ emptyWrapper: string;
138
+ loadingWrapper: string;
139
+ }, tailwind_variants.TVReturnType<{
140
+ variant: {
141
+ solid: {
142
+ th: string;
143
+ root: string;
144
+ };
145
+ bordered: {
146
+ th: string;
147
+ td: string;
148
+ root: string;
149
+ };
150
+ };
151
+ radius: {
152
+ sm: {};
153
+ md: {};
154
+ lg: {};
155
+ xl: {};
156
+ "2xl": {};
157
+ "3xl": {};
158
+ full: {};
159
+ none: {};
160
+ };
161
+ density: {
162
+ compact: {
163
+ td: string;
164
+ };
165
+ standard: {
166
+ td: string;
167
+ };
168
+ comfortable: {
169
+ td: string;
170
+ };
171
+ };
172
+ isHeaderSticky: {
173
+ true: {
174
+ thead: string;
175
+ wrapper: string;
176
+ };
177
+ };
178
+ allowHover: {
179
+ true: {
180
+ td: string;
181
+ };
182
+ false: {
183
+ td: string;
184
+ };
185
+ };
186
+ separateRows: {
187
+ true: {
188
+ tr: string;
189
+ td: string;
190
+ root: string;
191
+ };
192
+ };
193
+ }, {
194
+ root: string;
195
+ wrapper: string;
196
+ table: string;
197
+ thead: string;
198
+ th: string;
199
+ tbody: string;
200
+ tr: string;
201
+ td: string;
202
+ tfoot: string;
203
+ sortIcon: string;
204
+ emptyWrapper: string;
205
+ loadingWrapper: string;
206
+ }, undefined, unknown, unknown, undefined>>;
207
+ type TableVariantProps = VariantProps<typeof tableVariants>;
208
+ type TableSlots = keyof ReturnType<typeof tableVariants>;
209
+
210
+ export { type TableSlots, type TableVariantProps, tableVariants, test };
package/dist/styles.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTUDBCRW7js = require('./chunk-TUDBCRW7.js');exports.tableVariants = _chunkTUDBCRW7js.b; exports.test = _chunkTUDBCRW7js.a;
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-YRMO4O4W.mjs";export{b as tableVariants,a as test};
@@ -0,0 +1,45 @@
1
+ import * as react from 'react';
2
+ import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
3
+ import { TableVariantProps, TableSlots } from './styles.js';
4
+ import { TableBody } from './table-body.js';
5
+ import { TableCell } from './table-cell.js';
6
+ import { TableColumn } from './table-column.js';
7
+ import { TableFooter } from './table-footer.js';
8
+ import { TableHeader } from './table-header.js';
9
+ import { TableRow } from './table-row.js';
10
+ import { TableWrapper } from './table-wrapper.js';
11
+
12
+ declare const useTable: (props: useTable.Props) => {
13
+ getRootProps: PropGetter<Table.Props>;
14
+ getTableProps: PropGetter<Table.Props>;
15
+ getHeaderProps: PropGetter<TableHeader.Props>;
16
+ getColumnProps: PropGetter<TableColumn.Props>;
17
+ getBodyProps: PropGetter<TableBody.Props>;
18
+ getRowProps: PropGetter<TableRow.Props>;
19
+ getCellProps: PropGetter<TableCell.Props>;
20
+ getFooterProps: PropGetter<TableFooter.Props>;
21
+ getWrapperProps: PropGetter<TableWrapper.Props>;
22
+ };
23
+ declare namespace useTable {
24
+ interface Props extends UIProps<"table">, TableVariantProps {
25
+ classNames?: SlotsToClassNames<TableSlots>;
26
+ slotProps?: {
27
+ table?: Table.Props;
28
+ header?: TableHeader.Props;
29
+ column?: TableColumn.Props;
30
+ body?: TableBody.Props;
31
+ row?: TableRow.Props;
32
+ cell?: TableCell.Props;
33
+ footer?: TableFooter.Props;
34
+ wrapper?: TableWrapper.Props;
35
+ };
36
+ }
37
+ }
38
+
39
+ declare const Table: (props: Table.Props) => react.JSX.Element;
40
+ declare namespace Table {
41
+ interface Props extends useTable.Props {
42
+ }
43
+ }
44
+
45
+ export { Table as T, useTable as u };