@chayns-components/core 5.0.0-beta.230 → 5.0.0-beta.231

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.
@@ -41,8 +41,10 @@ const StyledAccordion = _styledComponents.default.div`
41
41
  ${_ref4 => {
42
42
  let {
43
43
  isOpen,
44
- isWrapped
44
+ isWrapped,
45
+ shouldForceBackground
45
46
  } = _ref4;
47
+ if (shouldForceBackground) return undefined;
46
48
  if (isWrapped) {
47
49
  return (0, _styledComponents.css)`
48
50
  :not(:last-child) {
@@ -69,49 +71,34 @@ const StyledAccordion = _styledComponents.default.div`
69
71
  }}
70
72
 
71
73
  ${_ref7 => {
72
- let {
73
- isOpen,
74
- isWrapped
75
- } = _ref7;
76
- return !isOpen && !isWrapped && (0, _styledComponents.css)`
77
- border-bottom-color: ${_ref8 => {
78
- let {
79
- theme
80
- } = _ref8;
81
- return theme.headline;
82
- }};
83
- `;
84
- }}
85
-
86
- ${_ref9 => {
87
74
  let {
88
75
  isParentWrapped
89
- } = _ref9;
76
+ } = _ref7;
90
77
  return isParentWrapped && (0, _styledComponents.css)`
91
78
  padding-left: 17px;
92
79
  `;
93
80
  }}
94
81
 
95
- ${_ref10 => {
82
+ ${_ref8 => {
96
83
  let {
97
84
  isWrapped
98
- } = _ref10;
85
+ } = _ref8;
99
86
  return !isWrapped && (0, _styledComponents.css)`
100
87
  margin-top: 10px;
101
88
  `;
102
89
  }}
103
90
 
104
- ${_ref11 => {
91
+ ${_ref9 => {
105
92
  let {
106
93
  isWrapped,
107
94
  shouldHideBackground
108
- } = _ref11;
95
+ } = _ref9;
109
96
  return !isWrapped && !shouldHideBackground && (0, _styledComponents.css)`
110
97
  &:hover {
111
- background-color: ${_ref12 => {
98
+ background-color: ${_ref10 => {
112
99
  let {
113
100
  theme
114
- } = _ref12;
101
+ } = _ref10;
115
102
  return theme['100'];
116
103
  }}; // ToDo: Add opacity here
117
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledAccordion","styled","div","_ref","isOpen","isWrapped","shouldForceBackground","shouldHideBackground","css","_ref2","theme","_ref3","_ref4","_ref5","headline","_ref6","undefined","_ref7","_ref8","_ref9","isParentWrapped","_ref10","_ref11","_ref12","exports"],"sources":["../../../src/components/accordion/Accordion.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { AccordionProps } from './Accordion';\n\ntype StyledMotionAccordionProps = WithTheme<{\n isOpen: boolean;\n isParentWrapped: boolean;\n}> &\n Pick<AccordionProps, 'isWrapped' | 'shouldForceBackground' | 'shouldHideBackground'>;\n\nexport const StyledAccordion = styled.div<StyledMotionAccordionProps>`\n ${({ isOpen, isWrapped, shouldForceBackground, shouldHideBackground }) =>\n (isOpen || shouldForceBackground) &&\n !isWrapped &&\n !shouldHideBackground &&\n css`\n background-color: ${({ theme }: StyledMotionAccordionProps) =>\n theme['100']}; // ToDo: Add opacity here\n border-radius: 3px; // ToDo: Add correct border-radius here\n box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.15); // ToDo: Add correct box-shadow here\n `}\n\n border-bottom: 1px solid transparent;\n margin-bottom: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '30px' : '0px')};\n transition: background-color 0.3s ease, border-bottom-color 0.3s ease, border-radius 0.3s ease,\n box-shadow 0.3s ease, margin-bottom 0.3s ease;\n\n ${({ isOpen, isWrapped }) => {\n if (isWrapped) {\n return css`\n :not(:last-child) {\n border-bottom-color: ${({ theme }: StyledMotionAccordionProps) =>\n theme.headline};\n }\n `;\n }\n\n if (!isOpen) {\n return css`\n border-bottom-color: ${({ theme }: StyledMotionAccordionProps) => theme.headline};\n `;\n }\n\n return undefined;\n }}\n\n ${({ isOpen, isWrapped }) =>\n !isOpen &&\n !isWrapped &&\n css`\n border-bottom-color: ${({ theme }: StyledMotionAccordionProps) => theme.headline};\n `}\n\n ${({ isParentWrapped }) =>\n isParentWrapped &&\n css`\n padding-left: 17px;\n `}\n\n ${({ isWrapped }) =>\n !isWrapped &&\n css`\n margin-top: 10px;\n `}\n\n ${({ isWrapped, shouldHideBackground }) =>\n !isWrapped &&\n !shouldHideBackground &&\n css`\n &:hover {\n background-color: ${({ theme }: StyledMotionAccordionProps) =>\n theme['100']}; // ToDo: Add opacity here\n }\n `}\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA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ACT,OAAO,IAAAI,qBAAG,CAAC;AACvB,uCAAuCO,KAAA;MAAA,IAAC;QAAEL;MAAkC,CAAC,GAAAK,KAAA;MAAA,OAAKL,KAAK,CAACI,QAAQ;IAAA,CAAC;AACjG,aAAa;EACL;EAEA,OAAOE,SAAS;AACpB,CAAE;AACN;AACA,MAAMC,KAAA;EAAA,IAAC;IAAEb,MAAM;IAAEC;EAAU,CAAC,GAAAY,KAAA;EAAA,OACpB,CAACb,MAAM,IACP,CAACC,SAAS,IACV,IAAAG,qBAAG,CAAC;AACZ,mCAAmCU,KAAA;IAAA,IAAC;MAAER;IAAkC,CAAC,GAAAQ,KAAA;IAAA,OAAKR,KAAK,CAACI,QAAQ;EAAA,CAAC;AAC7F,SAAS;AAAA,CAAC;AACV;AACA,MAAMK,KAAA;EAAA,IAAC;IAAEC;EAAgB,CAAC,GAAAD,KAAA;EAAA,OAClBC,eAAe,IACf,IAAAZ,qBAAG,CAAC;AACZ;AACA,SAAS;AAAA,CAAC;AACV;AACA,MAAMa,MAAA;EAAA,IAAC;IAAEhB;EAAU,CAAC,GAAAgB,MAAA;EAAA,OACZ,CAAChB,SAAS,IACV,IAAAG,qBAAG,CAAC;AACZ;AACA,SAAS;AAAA,CAAC;AACV;AACA,MAAMc,MAAA;EAAA,IAAC;IAAEjB,SAAS;IAAEE;EAAqB,CAAC,GAAAe,MAAA;EAAA,OAClC,CAACjB,SAAS,IACV,CAACE,oBAAoB,IACrB,IAAAC,qBAAG,CAAC;AACZ;AACA,oCAAoCe,MAAA;IAAA,IAAC;MAAEb;IAAkC,CAAC,GAAAa,MAAA;IAAA,OACtDb,KAAK,CAAC,KAAK,CAAC;EAAA,CAAC;AACjC;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAACc,OAAA,CAAAxB,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"Accordion.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledAccordion","styled","div","_ref","isOpen","isWrapped","shouldForceBackground","shouldHideBackground","css","_ref2","theme","_ref3","_ref4","undefined","_ref5","headline","_ref6","_ref7","isParentWrapped","_ref8","_ref9","_ref10","exports"],"sources":["../../../src/components/accordion/Accordion.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { AccordionProps } from './Accordion';\n\ntype StyledMotionAccordionProps = WithTheme<{\n isOpen: boolean;\n isParentWrapped: boolean;\n}> &\n Pick<AccordionProps, 'isWrapped' | 'shouldForceBackground' | 'shouldHideBackground'>;\n\nexport const StyledAccordion = styled.div<StyledMotionAccordionProps>`\n ${({ isOpen, isWrapped, shouldForceBackground, shouldHideBackground }) =>\n (isOpen || shouldForceBackground) &&\n !isWrapped &&\n !shouldHideBackground &&\n css`\n background-color: ${({ theme }: StyledMotionAccordionProps) =>\n theme['100']}; // ToDo: Add opacity here\n border-radius: 3px; // ToDo: Add correct border-radius here\n box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.15); // ToDo: Add correct box-shadow here\n `}\n\n border-bottom: 1px solid transparent;\n margin-bottom: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '30px' : '0px')};\n transition: background-color 0.3s ease, border-bottom-color 0.3s ease, border-radius 0.3s ease,\n box-shadow 0.3s ease, margin-bottom 0.3s ease;\n\n ${({ isOpen, isWrapped, shouldForceBackground }) => {\n if (shouldForceBackground) return undefined;\n\n if (isWrapped) {\n return css`\n :not(:last-child) {\n border-bottom-color: ${({ theme }: StyledMotionAccordionProps) =>\n theme.headline};\n }\n `;\n }\n\n if (!isOpen) {\n return css`\n border-bottom-color: ${({ theme }: StyledMotionAccordionProps) => theme.headline};\n `;\n }\n\n return undefined;\n }}\n\n ${({ isParentWrapped }) =>\n isParentWrapped &&\n css`\n padding-left: 17px;\n `}\n\n ${({ isWrapped }) =>\n !isWrapped &&\n css`\n margin-top: 10px;\n `}\n\n ${({ isWrapped, shouldHideBackground }) =>\n !isWrapped &&\n !shouldHideBackground &&\n css`\n &:hover {\n background-color: ${({ theme }: StyledMotionAccordionProps) =>\n theme['100']}; // ToDo: Add opacity here\n }\n `}\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CA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K,CAACK,QAAQ;IAAA,CAAC;AACjG,aAAa;EACL;EAEA,OAAOF,SAAS;AACpB,CAAE;AACN;AACA,MAAMI,KAAA;EAAA,IAAC;IAAEC;EAAgB,CAAC,GAAAD,KAAA;EAAA,OAClBC,eAAe,IACf,IAAAV,qBAAG,CAAC;AACZ;AACA,SAAS;AAAA,CAAC;AACV;AACA,MAAMW,KAAA;EAAA,IAAC;IAAEd;EAAU,CAAC,GAAAc,KAAA;EAAA,OACZ,CAACd,SAAS,IACV,IAAAG,qBAAG,CAAC;AACZ;AACA,SAAS;AAAA,CAAC;AACV;AACA,MAAMY,KAAA;EAAA,IAAC;IAAEf,SAAS;IAAEE;EAAqB,CAAC,GAAAa,KAAA;EAAA,OAClC,CAACf,SAAS,IACV,CAACE,oBAAoB,IACrB,IAAAC,qBAAG,CAAC;AACZ;AACA,oCAAoCa,MAAA;IAAA,IAAC;MAAEX;IAAkC,CAAC,GAAAW,MAAA;IAAA,OACtDX,KAAK,CAAC,KAAK,CAAC;EAAA,CAAC;AACjC;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAACY,OAAA,CAAAtB,eAAA,GAAAA,eAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.0-beta.230",
3
+ "version": "5.0.0-beta.231",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "keywords": [
6
6
  "chayns",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "60a9bcfe28da913ef51b63992e5ec2418479e453"
68
+ "gitHead": "653df1d13f88c0dfd0d20804e995f8c9670b9e25"
69
69
  }