@atom-learning/components 2.8.0-beta.2 → 2.9.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [2.9.0](https://github.com/Atom-Learning/components/compare/v2.8.0...v2.9.0) (2022-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Add new theme to AccordianTrigger ([e280e0f](https://github.com/Atom-Learning/components/commit/e280e0fed25a3e7ca0dd9f0e3ebb69d3e26144da))
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const StyledTrigger: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-accordion").AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>, {
|
|
3
|
-
theme?: "primaryDark" | "light" | undefined;
|
|
3
|
+
theme?: "primaryDark" | "light" | "tonal" | undefined;
|
|
4
4
|
}, {
|
|
5
5
|
sm: string;
|
|
6
6
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronDown as
|
|
1
|
+
import{ChevronDown as s}from"@atom-learning/icons";import{Trigger as l}from"@radix-ui/react-accordion";import{darken as r}from"color2k";import n from"react";import{styled as i,theme as f}from"../../stitches.js";import{Icon as d}from"../icon/Icon.js";const a=(t,e,o,m="#fff")=>({bg:t,color:m,"&[disabled]":{bg:"$tonal100",cursor:"not-allowed",color:"$tonal400"},"&:not([disabled]):hover":{bg:e},"&:not([disabled]):active":{bg:o}}),p=i(d,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),c=i(l,{border:0,py:"$3",px:"$4",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"},variants:{theme:{primaryDark:a("$primaryDark",r(f.colors.primaryDark.value,.1),r(f.colors.primaryDark.value,.15)),light:a("#fff",r("#fff",.1),r("#fff",.15),"$tonal600"),tonal:a("$tonal100",r("#fff",.1),r("#fff",.15),"$tonal500")}}}),g=({theme:t="primaryDark",children:e,...o})=>n.createElement(c,{theme:t,...o},e,n.createElement(p,{is:s}));export{g as AccordionTrigger};
|