@atom-learning/components 2.31.2-beta.0 → 2.32.1
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/CHANGELOG.md +7 -0
- package/dist/components/data-table/DataTableGlobalFilter.js +1 -1
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/search-input/SearchInput.d.ts +2 -0
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/table/Table.d.ts +1 -5
- 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/text/Text.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/TableStickyColumnsContainer.d.ts +0 -9
- package/dist/components/table/TableStickyColumnsContainer.js +0 -1
- package/dist/components/table/useStickyColumnsCss.d.ts +0 -7
- package/dist/components/table/useStickyColumnsCss.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.32.1](https://github.com/Atom-Learning/components/compare/v2.32.0...v2.32.1) (2023-02-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add important to noCapsize CSS to prevent conflicts ([66d730a](https://github.com/Atom-Learning/components/commit/66d730adee94b237dbe58e1ab34518e25ae6790d))
|
|
7
|
+
|
|
1
8
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{debounce as p}from"throttle-debounce";import{OptionallyVisuallyHiddenContainer as u}from"../../utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js";import{Label as
|
|
1
|
+
import*as e from"react";import{debounce as p}from"throttle-debounce";import{OptionallyVisuallyHiddenContainer as u}from"../../utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js";import{Label as d}from"../label/Label.js";import{SearchInput as f}from"../search-input/SearchInput.js";import{useDataTable as g}from"./DataTableContext.js";const h=({onChange:a,label:t,hideLabel:r=!1,...n})=>{const{setGlobalFilter:o,getState:m,resetPagination:i}=g(),{globalFilter:b}=m(),s=p(250,l=>{const{target:{value:c}}=l;a==null||a(l),i(),o(c)});return e.createElement(e.Fragment,null,e.createElement(u,{hidden:r},e.createElement(d,{css:{mb:"$3"},htmlFor:t},t)),e.createElement(f,{...n,defaultValue:b,onChange:s,name:t}))};export{h as DataTableGlobalFilter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Table as
|
|
1
|
+
import*as e from"react";import{Table as i}from"../table/Table.js";import{DataTable as t}from"./DataTable.js";import{AsyncDataState as c}from"./DataTable.types.js";import{useDataTable as p}from"./DataTableContext.js";import{DataTableLoading as b}from"./DataTableLoading.js";const D=({sortable:a,striped:r,theme:o,css:m,...n})=>{const{asyncDataState:s}=p(),l=s===c.PENDING;return e.createElement(e.Fragment,null,e.createElement(b,null),e.createElement(i,{...n,css:{...m,...l&&{opacity:.5,pointerEvents:"none",transition:"opacity 250ms linear 150ms"}}},e.createElement(t.Head,{theme:o,sortable:a}),e.createElement(t.Body,{striped:r})))};export{D as DataTableTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{styled as
|
|
1
|
+
import*as i from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t=f("h2",{fontFamily:"$display",fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontWeight:600,fontSize:"$md",lineHeight:1.5,...e(.3864)},sm:{fontSize:"$lg",lineHeight:1.14,...e(.2174,.2254)},md:{fontSize:"$xl",lineHeight:1.14,...e(.2174,.2254)},lg:{fontSize:"$2xl",lineHeight:1.08,...e(.1865,.1945)},xl:{fontSize:"$3xl",lineHeight:1.12,...e(.206,.214)},xxl:{fontSize:"$4xl",lineHeight:1.06,...e(.1793,.1873)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}}}),n=i.forwardRef(({size:o="md",...l},a)=>i.createElement(t,{ref:a,size:o,...l}));n.displayName="Heading";export{n as Heading,t as StyledHeading};
|
|
@@ -5,6 +5,8 @@ export declare type SearchInputProps = React.ComponentProps<typeof Input> & {
|
|
|
5
5
|
size?: 'sm' | 'md';
|
|
6
6
|
css?: CSS;
|
|
7
7
|
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (newValue: string) => void;
|
|
8
10
|
clearText?: string;
|
|
9
11
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Search as
|
|
1
|
+
import{Search as H,Close as I}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as k}from"../action-icon/ActionIcon.js";import{Box as L}from"../box/Box.js";import{Icon as E}from"../icon/Icon.js";import{Input as $}from"../input/Input.js";import{styled as f}from"../../stitches.js";import{useCallbackRef as x}from"../../utilities/hooks/useCallbackRef.js";var N=(t=>(t.SEARCH="SEARCH",t.CLEAR="CLEAR",t))(N||{});const O=f(E,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),T=f($,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),h=e.forwardRef(({size:t="md",css:C,value:r,defaultValue:i="",onValueChange:n,clearText:b="Clear",onChange:c,...d},v)=>{const[u,R]=x(),[A,p]=e.useState(i),[S,m]=e.useState(i?"CLEAR":"SEARCH");e.useEffect(()=>{typeof r>"u"||(p(r),m(r?"CLEAR":"SEARCH"))},[r]),e.useImperativeHandle(v,()=>u.current);const w=()=>{var s,o;const a=u.current;if(!a)return;const l=(s=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:s.set;(o=l==null?void 0:l.call)==null||o.call(l,a,"");const z=new Event("input",{bubbles:!0});a.dispatchEvent(z),a.focus(),n==null||n("")},y=s=>{c==null||c(s);const o=s.target.value;p(o),n==null||n(o),m(o?"CLEAR":"SEARCH")},g=()=>S==="SEARCH"?e.createElement(O,{is:H,size:t,css:{size:t=="sm"?"$1":20}}):e.createElement(k,{label:b,theme:"neutral",size:t,css:{position:"absolute",top:"0",right:"$1"},onClick:w},e.createElement(E,{is:I}));return e.createElement(L,{css:{position:"relative",...C}},e.createElement(T,{ref:R,size:t,type:"search",...d,value:A,onChange:y,css:{pr:t==="sm"?"$5":"$6"}}),g())});h.displayName="SearchInput";export{h as SearchInput};
|
|
@@ -6,7 +6,6 @@ import { TableFooterCell } from './TableFooterCell';
|
|
|
6
6
|
import { TableHeader } from './TableHeader';
|
|
7
7
|
import { TableHeaderCell } from './TableHeaderCell';
|
|
8
8
|
import { TableRow } from './TableRow';
|
|
9
|
-
import { TableStickyColumnsContainer } from './TableStickyColumnsContainer';
|
|
10
9
|
declare type TableSubComponents = {
|
|
11
10
|
Body: typeof TableBody;
|
|
12
11
|
Cell: typeof TableCell;
|
|
@@ -15,7 +14,6 @@ declare type TableSubComponents = {
|
|
|
15
14
|
Header: typeof TableHeader;
|
|
16
15
|
HeaderCell: typeof TableHeaderCell;
|
|
17
16
|
Row: typeof TableRow;
|
|
18
|
-
StickyColumnsContainer: typeof TableStickyColumnsContainer;
|
|
19
17
|
};
|
|
20
18
|
declare const StyledTable: import("@stitches/react/types/styled-component").StyledComponent<"table", {
|
|
21
19
|
size?: "md" | "lg" | undefined;
|
|
@@ -196,8 +194,6 @@ declare const StyledTable: import("@stitches/react/types/styled-component").Styl
|
|
|
196
194
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
197
195
|
};
|
|
198
196
|
}>>;
|
|
199
|
-
declare type TableProps = React.ComponentProps<typeof StyledTable
|
|
200
|
-
numOfStickyColumns?: number;
|
|
201
|
-
};
|
|
197
|
+
declare type TableProps = React.ComponentProps<typeof StyledTable>;
|
|
202
198
|
export declare const Table: React.FC<TableProps> & TableSubComponents;
|
|
203
199
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as d from"react";import{styled as s}from"../../stitches.js";import{TableBody as m}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 f,TableRow as b}from"./TableRow.js";const n=s("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"}},[`${f}:last-child`]:{[`${o}:first-child`]:{borderBottomLeftRadius:"$0"},[`${o}:last-child`]:{borderBottomRightRadius:"$0"}}},square:{}}}}),e=({size:l="md",corners:a="round",...i})=>d.createElement(n,{size:l,corners:a,...i});e.Body=m,e.Cell=o,e.Footer=p,e.FooterCell=t,e.Header=$,e.HeaderCell=r,e.Row=b,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 d from"react";import{styled as r}from"../../stitches.js";import{StyledRow as i}from"./TableRow.js";const l=r("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),t=({striped:e=!0,...o})=>d.createElement(l,{striped:e,...o});t.displayName="TableBody";export{t 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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const i={size:{xs:{fontSize:"$xs",lineHeight:1.6,...e(.4364)},sm:{fontSize:"$sm",lineHeight:1.53,...e(.4056)},md:{fontSize:"$md",lineHeight:1.5,...e(.3864)},lg:{fontSize:"$lg",lineHeight:1.52,...e(.3983)},xl:{fontSize:"$xl",lineHeight:1.42,...e(.3506)}},noCapsize:{true:{"&::before, &::after":{display:"none"}}}},l=({size:t,noCapsize:n})=>({...i.size[t],...i.noCapsize[`${n}`]}),a=f("p",{fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:i}),
|
|
1
|
+
import*as o from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const i={size:{xs:{fontSize:"$xs",lineHeight:1.6,...e(.4364)},sm:{fontSize:"$sm",lineHeight:1.53,...e(.4056)},md:{fontSize:"$md",lineHeight:1.5,...e(.3864)},lg:{fontSize:"$lg",lineHeight:1.52,...e(.3983)},xl:{fontSize:"$xl",lineHeight:1.42,...e(.3506)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}},l=({size:t,noCapsize:n})=>({...i.size[t],...i.noCapsize[`${n}`]}),a=f("p",{fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:i}),r=o.forwardRef(({size:t="md",...n},s)=>o.createElement(a,{size:t,...n,ref:s}));r.displayName="Text";export{a as StyledText,r as Text,l as getTextVariant,i as textVariants};
|