@atom-learning/components 2.32.2-beta.0 → 2.32.3-beta.0
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/components/data-table/DataTableTable.js +1 -1
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/TableBody.d.ts +1 -3
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableHeader.d.ts +1 -3
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableStickyColumnsContainer.d.ts +1 -1
- package/dist/components/table/TableStickyColumnsContainer.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +1 -1
- package/dist/components/table/useStickyColumnsCss.d.ts +0 -7
- package/dist/components/table/useStickyColumnsCss.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Table as c}from"../table/Table.js";import{DataTable as
|
|
1
|
+
import*as e from"react";import{Table as c}from"../table/Table.js";import{DataTable as t}from"./DataTable.js";import{AsyncDataState as p}from"./DataTable.types.js";import{useDataTable as b}from"./DataTableContext.js";import{DataTableLoading as f}from"./DataTableLoading.js";const u=({sortable:a,striped:r,theme:m,css:o,numberOfStickyColumns:n=0,...s})=>{const{asyncDataState:l}=b(),i=l===p.PENDING;return e.createElement(e.Fragment,null,e.createElement(f,null),e.createElement(c,{...s,numberOfStickyColumns:n,css:{...o,...i&&{opacity:.5,pointerEvents:"none",transition:"opacity 250ms linear 150ms"}}},e.createElement(t.Head,{theme:m,sortable:a}),e.createElement(t.Body,{striped:r})))};export{u as DataTableTable};
|
|
@@ -197,7 +197,7 @@ declare const StyledTable: import("@stitches/react/types/styled-component").Styl
|
|
|
197
197
|
};
|
|
198
198
|
}>>;
|
|
199
199
|
declare type TableProps = React.ComponentProps<typeof StyledTable> & {
|
|
200
|
-
|
|
200
|
+
numberOfStickyColumns?: number;
|
|
201
201
|
};
|
|
202
202
|
export declare const Table: React.FC<TableProps> & TableSubComponents;
|
|
203
203
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{styled as f}from"../../stitches.js";import{TableBody as
|
|
1
|
+
import*as i from"react";import{styled as f}from"../../stitches.js";import{TableBody as b}from"./TableBody.js";import{TableCell as o}from"./TableCell.js";import{TableFooter as p}from"./TableFooter.js";import{TableFooterCell as t}from"./TableFooterCell.js";import{TableHeader as $}from"./TableHeader.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";import{StyledRow as c,TableRow as u}from"./TableRow.js";import{TableStickyColumnsContainer as m}from"./TableStickyColumnsContainer.js";const C=f("table",{borderCollapse:"separate",borderSpacing:0,fontFamily:"$sans",fontSize:"$sm",width:"100%",variants:{size:{md:{[`${o}, ${r}, ${t}`]:{height:"$4"}},lg:{[`${o}, ${r}, ${t}`]:{height:"$5"}}},corners:{round:{[`${r}`]:{"&:first-of-type":{borderTopLeftRadius:"$0"},"&:last-of-type":{borderTopRightRadius:"$0"}},[`${c}:last-child`]:{[`${o}:first-child`]:{borderBottomLeftRadius:"$0"},[`${o}:last-child`]:{borderBottomRightRadius:"$0"}}},square:{}}}}),e=({size:s="md",corners:d="round",numberOfStickyColumns:l=0,...n})=>{const a=i.createElement(C,{size:s,corners:d,...n});return l?i.createElement(m,{numberOfStickyColumns:l},a):a};e.Body=b,e.Cell=o,e.Footer=p,e.FooterCell=t,e.Header=$,e.HeaderCell=r,e.Row=u,e.StickyColumnsContainer=m,e.displayName="Table";export{e as Table};
|
|
@@ -177,8 +177,6 @@ declare const StyledTableBody: import("@stitches/react/types/styled-component").
|
|
|
177
177
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
178
178
|
};
|
|
179
179
|
}>>;
|
|
180
|
-
declare type TableBodyProps = React.ComponentProps<typeof StyledTableBody
|
|
181
|
-
numOfStickyColumns?: number;
|
|
182
|
-
};
|
|
180
|
+
declare type TableBodyProps = React.ComponentProps<typeof StyledTableBody>;
|
|
183
181
|
export declare const TableBody: React.FC<TableBodyProps>;
|
|
184
182
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{styled as i}from"../../stitches.js";import{StyledRow as t}from"./TableRow.js";const l=i("tbody",{variants:{striped:{true:{[`${t}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{[`${t}`]:{bg:"white"}}}}}),e=({striped:o=!0,...d})=>r.createElement(l,{striped:o,...d});e.displayName="TableBody";export{e as TableBody};
|
|
@@ -182,8 +182,6 @@ declare const StyledTableHeader: import("@stitches/react/types/styled-component"
|
|
|
182
182
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
183
183
|
};
|
|
184
184
|
}>>;
|
|
185
|
-
declare type TableHeaderProps = React.ComponentProps<typeof StyledTableHeader
|
|
186
|
-
numOfStickyColumns?: number;
|
|
187
|
-
};
|
|
185
|
+
declare type TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>;
|
|
188
186
|
export declare const TableHeader: React.FC<TableHeaderProps>;
|
|
189
187
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as e}from"./TableHeaderCell.js";const r={PRIMARY:"primary",PRIMARY_DARK:"primaryDark",LIGHT:"light"},i=l("thead",{variants:{theme:{[r.PRIMARY]:{[`${e}`]:{bg:"$primary"}},[r.PRIMARY_DARK]:{[`${e}`]:{bg:"$primaryDark"}},[r.LIGHT]:{[`${e}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),a=({theme:t="primaryDark",...m})=>o.createElement(i,{theme:t,...m});a.displayName="TableHeader";export{r as TABLE_HEADER_THEMES,a as TableHeader};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
3
|
interface ITableStickyColumnsContainerProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
|
|
5
|
+
numberOfStickyColumns?: number;
|
|
6
6
|
css?: CSS;
|
|
7
7
|
}
|
|
8
8
|
export declare const TableStickyColumnsContainer: React.FC<ITableStickyColumnsContainerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"react";import{Box as a}from"../box/Box.js";const i=({children:n,numberOfStickyColumns:t=0,css:l,...c})=>{const[o,p]=r.useState(!1);return r.createElement(a,{onScroll:s=>{const e=s.currentTarget.scrollLeft>0;e!==o&&p(e)},role:"scrollbar",css:{overflow:"auto",maxWidth:"100%",[`& td:nth-of-type(${t}), th:nth-of-type(${t})`]:{...o&&{boxShadow:"$colors$alpha200 -2px -3px 9px 1px",clipPath:"inset(0px -10px 0px 0px)"},...t===1&&{position:"sticky",left:"0",zIndex:"2"}},"& td":{bg:"inherit"},...l},...c},n)};export{i as TableStickyColumnsContainer};
|