@atom-learning/components 1.15.0 → 1.16.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.
- package/CHANGELOG.md +3 -5
- package/dist/components/grid/Grid.d.ts +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/table/TableRow.js +1 -1
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
## [1.16.2](https://github.com/Atom-Learning/components/compare/v1.16.1...v1.16.2) (2022-06-23)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
* table theme neutral ([504cd81](https://github.com/Atom-Learning/components/commit/504cd8157d11e73503cbcc2c1ec88fc05db2248d))
|
|
8
|
-
* update theme naming ([cc75f0b](https://github.com/Atom-Learning/components/commit/cc75f0ba9ede6ee4597975a04099e318133c148d))
|
|
6
|
+
* table row striped layout ([48e1074](https://github.com/Atom-Learning/components/commit/48e10746fa1c0f80758d0c17ca9d96b6ff77bdfd))
|
|
9
7
|
|
|
10
8
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
11
9
|
|
|
@@ -267,7 +267,7 @@ declare const GridContainer: import("@stitches/react/types/styled-component").St
|
|
|
267
267
|
};
|
|
268
268
|
}>>;
|
|
269
269
|
declare type GridProps = React.ComponentProps<typeof GridContainer> & {
|
|
270
|
-
minItemSize
|
|
270
|
+
minItemSize?: string;
|
|
271
271
|
maxItemSize?: string;
|
|
272
272
|
};
|
|
273
273
|
export declare const Grid: React.FC<GridProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as i}from"react";import{theme as o,styled as d}from"../../stitches.js";const c=Object.keys(o.space).reduce((e,a)=>({...e,[a]:{gap:`$space$${a}`}}),{}),m=d("div",{display:"grid",variants:{gap:c}}),t=({css:e,gap:a=2,minItemSize:r,maxItemSize:p="1fr",...s})=>i(m,{css:{...r&&{gridTemplateColumns:`repeat(auto-fit, minmax(${r}, ${p}))`},...e},gap:a,...s});t.displayName="Grid";export{t as Grid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as o}from"../../stitches.js";const e=o("tr",{bg:"unset"});e.displayName="TableRow";export{e as TableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as B,ChevronRight as P}from"@atom-learning/icons";import{List as F}from"@radix-ui/react-tabs";import{opacify as L}from"color2k";import o,{useRef as M,useState as h,useCallback as X,useEffect as W}from"react";import{debounce as _}from"throttle-debounce";import{ActionIcon as j}from"../action-icon/ActionIcon.js";import{Flex as q}from"../flex/Flex.js";import{Icon as y}from"../icon/Icon.js";import{theme as G,styled as E}from"../../stitches.js";import{TabTrigger as k}from"./TabTrigger.js";import{passPropsToChildren as x}from"./utils.js";const H=L("white",-.2),J=L(G.colors.primaryDark.value,-.2),T=E(j,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${H} !important`},dark:{bg:`${J} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),C=E(F,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}},appearance:{uppercase:{textTransform:"uppercase"}}}}),K=({children:d,theme:l,appearance:p,enableTabScrolling:z,scrollPercentage:R=10,...u})=>{const n=M(null),[g,c]=h(!1),[
|
|
1
|
+
import{ChevronLeft as B,ChevronRight as P}from"@atom-learning/icons";import{List as F}from"@radix-ui/react-tabs";import{opacify as L}from"color2k";import o,{useRef as M,useState as h,useCallback as X,useEffect as W}from"react";import{debounce as _}from"throttle-debounce";import{ActionIcon as j}from"../action-icon/ActionIcon.js";import{Flex as q}from"../flex/Flex.js";import{Icon as y}from"../icon/Icon.js";import{theme as G,styled as E}from"../../stitches.js";import{TabTrigger as k}from"./TabTrigger.js";import{passPropsToChildren as x}from"./utils.js";const H=L("white",-.2),J=L(G.colors.primaryDark.value,-.2),T=E(j,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${H} !important`},dark:{bg:`${J} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),C=E(F,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}},appearance:{uppercase:{"& button":{textTransform:"uppercase"}}}}}),K=({children:d,theme:l,appearance:p,enableTabScrolling:z,scrollPercentage:R=10,...u})=>{const n=M(null),[g,c]=h(!1),[b,a]=h(!1),[$,A]=h(),v=X(t=>{const e=n.current;if(e){const{scrollWidth:i,scrollLeft:s,offsetWidth:f}=e,w=Math.round(i*(R/100));let m=s;if(t==="right"){const r=s+w;m=r+f<=i?r:i-f}else{const r=s-w;m=r>0?r:0}e.scroll({left:m,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:r,scrollLeft:S,offsetWidth:D}=e,I=r-(S+D);S===0?(c(!1),a(!0)):I<5?(a(!1),c(!0)):(c(!0),a(!0))},500)}},[]);return W(()=>{const t=_(500,()=>{A(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),W(()=>{var t;const e=n.current;if(e){const{offsetWidth:i,scrollWidth:s}=e,f=s>i;(t=e.scroll)==null||t.call(e,{left:0}),c(!1),a(f)}},[$]),g||b||z?o.createElement(q,{css:{position:"relative"}},o.createElement(T,{size:"xl",label:"Scroll Left",theme:l,onClick:()=>v("left"),visible:g,css:{left:0}},o.createElement(y,{is:B,size:"lg"})),o.createElement(C,{...u,ref:n,appearance:p,theme:l},x(d,{theme:l},[k])),o.createElement(T,{size:"xl",label:"Scroll right",theme:l,onClick:()=>v("right"),visible:b,css:{right:0}},o.createElement(y,{is:P,size:"lg"}))):o.createElement(C,{theme:l,...u,appearance:p,ref:n},x(d,{theme:l},[k]))};export{K as TriggerListWrapper};
|