@stackshift-ui/table 1.0.0-beta.4 → 1.0.0-beta.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/table",
3
3
  "description": "A responsive table component.",
4
- "version": "1.0.0-beta.4",
4
+ "version": "1.0.0-beta.6",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -34,15 +34,15 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
- "@stackshift-ui/system": "6.1.0-beta.3",
38
- "@stackshift-ui/scripts": "6.1.0-beta.2"
37
+ "@stackshift-ui/system": "7.0.0-beta.5",
38
+ "@stackshift-ui/scripts": "7.0.0-beta.4"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@types/react": "16.8 - 19",
42
42
  "next": "10 - 14",
43
43
  "react": "16.8 - 19",
44
44
  "react-dom": "16.8 - 19",
45
- "@stackshift-ui/system": ">=6.1.0-beta.3"
45
+ "@stackshift-ui/system": ">=7.0.0-beta.5"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "next": {
@@ -1 +0,0 @@
1
- import{cn as n,DefaultComponent as l,useStackShiftUIComponents as s}from"@stackshift-ui/system";import{jsx as o}from"react/jsx-runtime";var r="Table",c="TableHeader",d="TableBody",p="TableFooter",m="TableRow",i="TableHead",b="TableCell",u="TableCaption";function C({className:t,...e}){let{[r]:a=l}=s();return o(a,{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:o("table",{"data-slot":"table",className:n("w-full caption-bottom text-sm",t),...e})})}C.displayName=r;function N({className:t,...e}){let{[c]:a=l}=s();return o(a,{as:"thead","data-slot":"table-header",className:n("[&_tr]:border-b",t),...e})}N.displayName=c;function y({className:t,...e}){let{[d]:a=l}=s();return o(a,{as:"tbody","data-slot":"table-body",className:n("[&_tr:last-child]:border-0",t),...e})}y.displayName=d;function f({className:t,...e}){let{[p]:a=l}=s();return o(a,{as:"tfoot","data-slot":"table-footer",className:n("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t),...e})}f.displayName=p;function h({className:t,...e}){let{[m]:a=l}=s();return o(a,{as:"tr","data-slot":"table-row",className:n("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...e})}h.displayName=m;function T({className:t,...e}){let{[i]:a=l}=s();return o(a,{as:"th","data-slot":"table-head",className:n("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}T.displayName=i;function x({className:t,...e}){let{[b]:a=l}=s();return o(a,{as:"td","data-slot":"table-cell",className:n("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}x.displayName=b;function R({className:t,...e}){let{[u]:a=l}=s();return o(a,{as:"caption","data-slot":"table-caption",className:n("text-muted-foreground mt-4 text-sm",t),...e})}R.displayName=u;export{C as a,N as b,y as c,f as d,h as e,T as f,x as g,R as h};
@@ -1,134 +0,0 @@
1
- // src/table.tsx
2
- import { cn, DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
3
- import { jsx } from "react/jsx-runtime";
4
- var displayName = "Table";
5
- var displayNameHeader = "TableHeader";
6
- var displayNameBody = "TableBody";
7
- var displayNameFooter = "TableFooter";
8
- var displayNameRow = "TableRow";
9
- var displayNameHead = "TableHead";
10
- var displayNameCell = "TableCell";
11
- var displayNameCaption = "TableCaption";
12
- function Table({ className, ...props }) {
13
- const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
14
- return /* @__PURE__ */ jsx(Component, { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx(
15
- "table",
16
- {
17
- "data-slot": "table",
18
- className: cn("w-full caption-bottom text-sm", className),
19
- ...props
20
- }
21
- ) });
22
- }
23
- Table.displayName = displayName;
24
- function TableHeader({ className, ...props }) {
25
- const { [displayNameHeader]: Component = DefaultComponent } = useStackShiftUIComponents();
26
- return /* @__PURE__ */ jsx(
27
- Component,
28
- {
29
- as: "thead",
30
- "data-slot": "table-header",
31
- className: cn("[&_tr]:border-b", className),
32
- ...props
33
- }
34
- );
35
- }
36
- TableHeader.displayName = displayNameHeader;
37
- function TableBody({ className, ...props }) {
38
- const { [displayNameBody]: Component = DefaultComponent } = useStackShiftUIComponents();
39
- return /* @__PURE__ */ jsx(
40
- Component,
41
- {
42
- as: "tbody",
43
- "data-slot": "table-body",
44
- className: cn("[&_tr:last-child]:border-0", className),
45
- ...props
46
- }
47
- );
48
- }
49
- TableBody.displayName = displayNameBody;
50
- function TableFooter({ className, ...props }) {
51
- const { [displayNameFooter]: Component = DefaultComponent } = useStackShiftUIComponents();
52
- return /* @__PURE__ */ jsx(
53
- Component,
54
- {
55
- as: "tfoot",
56
- "data-slot": "table-footer",
57
- className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
58
- ...props
59
- }
60
- );
61
- }
62
- TableFooter.displayName = displayNameFooter;
63
- function TableRow({ className, ...props }) {
64
- const { [displayNameRow]: Component = DefaultComponent } = useStackShiftUIComponents();
65
- return /* @__PURE__ */ jsx(
66
- Component,
67
- {
68
- as: "tr",
69
- "data-slot": "table-row",
70
- className: cn(
71
- "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
72
- className
73
- ),
74
- ...props
75
- }
76
- );
77
- }
78
- TableRow.displayName = displayNameRow;
79
- function TableHead({ className, ...props }) {
80
- const { [displayNameHead]: Component = DefaultComponent } = useStackShiftUIComponents();
81
- return /* @__PURE__ */ jsx(
82
- Component,
83
- {
84
- as: "th",
85
- "data-slot": "table-head",
86
- className: cn(
87
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
88
- className
89
- ),
90
- ...props
91
- }
92
- );
93
- }
94
- TableHead.displayName = displayNameHead;
95
- function TableCell({ className, ...props }) {
96
- const { [displayNameCell]: Component = DefaultComponent } = useStackShiftUIComponents();
97
- return /* @__PURE__ */ jsx(
98
- Component,
99
- {
100
- as: "td",
101
- "data-slot": "table-cell",
102
- className: cn(
103
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
104
- className
105
- ),
106
- ...props
107
- }
108
- );
109
- }
110
- TableCell.displayName = displayNameCell;
111
- function TableCaption({ className, ...props }) {
112
- const { [displayNameCaption]: Component = DefaultComponent } = useStackShiftUIComponents();
113
- return /* @__PURE__ */ jsx(
114
- Component,
115
- {
116
- as: "caption",
117
- "data-slot": "table-caption",
118
- className: cn("text-muted-foreground mt-4 text-sm", className),
119
- ...props
120
- }
121
- );
122
- }
123
- TableCaption.displayName = displayNameCaption;
124
-
125
- export {
126
- Table,
127
- TableHeader,
128
- TableBody,
129
- TableFooter,
130
- TableRow,
131
- TableHead,
132
- TableCell,
133
- TableCaption
134
- };
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./table";
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";var s=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var k=(a,e)=>{for(var o in e)s(a,o,{get:e[o],enumerable:!0})},v=(a,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of g(e))!H.call(a,l)&&l!==o&&s(a,l,{get:()=>e[l],enumerable:!(r=P(e,l))||r.enumerable});return a};var B=a=>v(s({},"__esModule",{value:!0}),a);var F={};k(F,{Table:()=>N,TableBody:()=>y,TableCaption:()=>w,TableCell:()=>R,TableFooter:()=>h,TableHead:()=>x,TableHeader:()=>f,TableRow:()=>T});module.exports=B(F);var t=require("@stackshift-ui/system"),n=require("react/jsx-runtime"),c="Table",p="TableHeader",d="TableBody",m="TableFooter",i="TableRow",b="TableHead",u="TableCell",C="TableCaption";function N({className:a,...e}){let{[c]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,n.jsx)("table",{"data-slot":"table",className:(0,t.cn)("w-full caption-bottom text-sm",a),...e})})}N.displayName=c;function f({className:a,...e}){let{[p]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"thead","data-slot":"table-header",className:(0,t.cn)("[&_tr]:border-b",a),...e})}f.displayName=p;function y({className:a,...e}){let{[d]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"tbody","data-slot":"table-body",className:(0,t.cn)("[&_tr:last-child]:border-0",a),...e})}y.displayName=d;function h({className:a,...e}){let{[m]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"tfoot","data-slot":"table-footer",className:(0,t.cn)("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",a),...e})}h.displayName=m;function T({className:a,...e}){let{[i]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"tr","data-slot":"table-row",className:(0,t.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",a),...e})}T.displayName=i;function x({className:a,...e}){let{[b]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"th","data-slot":"table-head",className:(0,t.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}x.displayName=b;function R({className:a,...e}){let{[u]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"td","data-slot":"table-cell",className:(0,t.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}R.displayName=u;function w({className:a,...e}){let{[C]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"caption","data-slot":"table-caption",className:(0,t.cn)("text-muted-foreground mt-4 text-sm",a),...e})}w.displayName=C;0&&(module.exports={Table,TableBody,TableCaption,TableCell,TableFooter,TableHead,TableHeader,TableRow});
package/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a as e,b as o,c as r,d as t,e as c,f,g as i,h as l}from"./chunk-2RHJIUD2.mjs";export{e as Table,r as TableBody,l as TableCaption,i as TableCell,t as TableFooter,f as TableHead,o as TableHeader,c as TableRow};
package/dist/table.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import * as React from "react";
2
- declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
3
- declare namespace Table {
4
- var displayName: string;
5
- }
6
- declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
7
- declare namespace TableHeader {
8
- var displayName: string;
9
- }
10
- declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
11
- declare namespace TableBody {
12
- var displayName: string;
13
- }
14
- declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
15
- declare namespace TableFooter {
16
- var displayName: string;
17
- }
18
- declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
19
- declare namespace TableRow {
20
- var displayName: string;
21
- }
22
- declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
23
- declare namespace TableHead {
24
- var displayName: string;
25
- }
26
- declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
27
- declare namespace TableCell {
28
- var displayName: string;
29
- }
30
- declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
31
- declare namespace TableCaption {
32
- var displayName: string;
33
- }
34
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
package/dist/table.js DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";var s=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var k=(a,e)=>{for(var o in e)s(a,o,{get:e[o],enumerable:!0})},v=(a,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of g(e))!H.call(a,l)&&l!==o&&s(a,l,{get:()=>e[l],enumerable:!(r=P(e,l))||r.enumerable});return a};var B=a=>v(s({},"__esModule",{value:!0}),a);var F={};k(F,{Table:()=>N,TableBody:()=>f,TableCaption:()=>w,TableCell:()=>R,TableFooter:()=>h,TableHead:()=>x,TableHeader:()=>y,TableRow:()=>T});module.exports=B(F);var t=require("@stackshift-ui/system"),n=require("react/jsx-runtime"),c="Table",d="TableHeader",p="TableBody",m="TableFooter",i="TableRow",b="TableHead",u="TableCell",C="TableCaption";function N({className:a,...e}){let{[c]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,n.jsx)("table",{"data-slot":"table",className:(0,t.cn)("w-full caption-bottom text-sm",a),...e})})}N.displayName=c;function y({className:a,...e}){let{[d]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"thead","data-slot":"table-header",className:(0,t.cn)("[&_tr]:border-b",a),...e})}y.displayName=d;function f({className:a,...e}){let{[p]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"tbody","data-slot":"table-body",className:(0,t.cn)("[&_tr:last-child]:border-0",a),...e})}f.displayName=p;function h({className:a,...e}){let{[m]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"tfoot","data-slot":"table-footer",className:(0,t.cn)("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",a),...e})}h.displayName=m;function T({className:a,...e}){let{[i]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"tr","data-slot":"table-row",className:(0,t.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",a),...e})}T.displayName=i;function x({className:a,...e}){let{[b]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"th","data-slot":"table-head",className:(0,t.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}x.displayName=b;function R({className:a,...e}){let{[u]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"td","data-slot":"table-cell",className:(0,t.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}R.displayName=u;function w({className:a,...e}){let{[C]:o=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,n.jsx)(o,{as:"caption","data-slot":"table-caption",className:(0,t.cn)("text-muted-foreground mt-4 text-sm",a),...e})}w.displayName=C;0&&(module.exports={Table,TableBody,TableCaption,TableCell,TableFooter,TableHead,TableHeader,TableRow});
package/dist/table.mjs DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a,b,c,d,e,f,g,h}from"./chunk-2RHJIUD2.mjs";export{a as Table,c as TableBody,h as TableCaption,g as TableCell,d as TableFooter,f as TableHead,b as TableHeader,e as TableRow};