@chayns-components/core 5.0.0-beta.43 → 5.0.0-beta.44
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/lib/components/accordion/accordion-content/AccordionContent.d.ts +1 -0
- package/lib/components/accordion/accordion-content/AccordionContent.js +4 -2
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +2 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +13 -2
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,7 +10,8 @@ var _AccordionContent = require("./AccordionContent.styles");
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
const AccordionContent = _ref => {
|
|
12
12
|
let {
|
|
13
|
-
children
|
|
13
|
+
children,
|
|
14
|
+
maxHeight
|
|
14
15
|
} = _ref;
|
|
15
16
|
return /*#__PURE__*/_react.default.createElement(_Accordion.AccordionContext.Consumer, null, _ref2 => {
|
|
16
17
|
let {
|
|
@@ -18,7 +19,8 @@ const AccordionContent = _ref => {
|
|
|
18
19
|
} = _ref2;
|
|
19
20
|
return /*#__PURE__*/_react.default.createElement(_AccordionContent.StyledAccordionContent, {
|
|
20
21
|
className: "beta-chayns-accordion-content",
|
|
21
|
-
isWrapped: isWrapped
|
|
22
|
+
isWrapped: isWrapped,
|
|
23
|
+
maxHeight: maxHeight
|
|
22
24
|
}, children);
|
|
23
25
|
});
|
|
24
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContent.js","names":["AccordionContent","children","isWrapped","displayName"],"sources":["../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { AccordionContext } from '../Accordion';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({ children }) => (\n <AccordionContext.Consumer>\n {({ isWrapped }) => (\n <StyledAccordionContent
|
|
1
|
+
{"version":3,"file":"AccordionContent.js","names":["AccordionContent","children","maxHeight","isWrapped","displayName"],"sources":["../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { AccordionContext } from '../Accordion';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n maxHeight?: number;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({ children, maxHeight }) => (\n <AccordionContext.Consumer>\n {({ isWrapped }) => (\n <StyledAccordionContent\n className=\"beta-chayns-accordion-content\"\n isWrapped={isWrapped}\n maxHeight={maxHeight}\n >\n {children}\n </StyledAccordionContent>\n )}\n </AccordionContext.Consumer>\n);\n\nAccordionContent.displayName = 'AccordionContent';\n\nexport default AccordionContent;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAmE;AAUnE,MAAMA,gBAA2C,GAAG;EAAA,IAAC;IAAEC,QAAQ;IAAEC;EAAU,CAAC;EAAA,oBACxE,6BAAC,2BAAgB,CAAC,QAAQ,QACrB;IAAA,IAAC;MAAEC;IAAU,CAAC;IAAA,oBACX,6BAAC,wCAAsB;MACnB,SAAS,EAAC,+BAA+B;MACzC,SAAS,EAAEA,SAAU;MACrB,SAAS,EAAED;IAAU,GAEpBD,QAAQ,CACY;EAAA,CAC5B,CACuB;AAAA,CAC/B;AAEDD,gBAAgB,CAACI,WAAW,GAAG,kBAAkB;AAAC,eAEnCJ,gBAAgB;AAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { AccordionContentProps } from './AccordionContent';
|
|
1
2
|
export declare const StyledAccordionContent: import("styled-components").StyledComponent<"div", any, {
|
|
2
3
|
isWrapped: boolean;
|
|
3
4
|
} & {
|
|
4
5
|
theme: import("../../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
5
|
-
}, never>;
|
|
6
|
+
} & Pick<AccordionContentProps, "maxHeight">, never>;
|
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledAccordionContent = void 0;
|
|
7
|
-
var _styledComponents =
|
|
8
|
-
function
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
9
10
|
const StyledAccordionContent = _styledComponents.default.div`
|
|
10
11
|
color: ${_ref => {
|
|
11
12
|
let {
|
|
@@ -19,6 +20,16 @@ const StyledAccordionContent = _styledComponents.default.div`
|
|
|
19
20
|
} = _ref2;
|
|
20
21
|
return isWrapped ? '0 9px 18px 26px' : '0 9px 9px 10px';
|
|
21
22
|
}};
|
|
23
|
+
|
|
24
|
+
${_ref3 => {
|
|
25
|
+
let {
|
|
26
|
+
maxHeight
|
|
27
|
+
} = _ref3;
|
|
28
|
+
return typeof maxHeight === 'number' && (0, _styledComponents.css)`
|
|
29
|
+
max-height: ${maxHeight}px;
|
|
30
|
+
overflow-y: scroll;
|
|
31
|
+
`;
|
|
32
|
+
}}
|
|
22
33
|
`;
|
|
23
34
|
exports.StyledAccordionContent = StyledAccordionContent;
|
|
24
35
|
//# sourceMappingURL=AccordionContent.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContent.styles.js","names":["StyledAccordionContent","styled","div","theme","text","isWrapped"],"sources":["../../../../src/components/accordion/accordion-content/AccordionContent.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledAccordionContentProps = WithTheme<{\n isWrapped: boolean;\n}>;\n\nexport const StyledAccordionContent = styled.div<StyledAccordionContentProps>`\n color: ${({ theme }: StyledAccordionContentProps) => theme.text};\n padding: ${({ isWrapped }) => (isWrapped ? '0 9px 18px 26px' : '0 9px 9px 10px')};\n`;\n"],"mappings":";;;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"AccordionContent.styles.js","names":["StyledAccordionContent","styled","div","theme","text","isWrapped","maxHeight","css"],"sources":["../../../../src/components/accordion/accordion-content/AccordionContent.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport type { AccordionContentProps } from './AccordionContent';\n\ntype StyledAccordionContentProps = WithTheme<{\n isWrapped: boolean;\n}> &\n Pick<AccordionContentProps, 'maxHeight'>;\n\nexport const StyledAccordionContent = styled.div<StyledAccordionContentProps>`\n color: ${({ theme }: StyledAccordionContentProps) => theme.text};\n padding: ${({ isWrapped }) => (isWrapped ? '0 9px 18px 26px' : '0 9px 9px 10px')};\n\n ${({ maxHeight }) =>\n typeof maxHeight === 'number' &&\n css`\n max-height: ${maxHeight}px;\n overflow-y: scroll;\n `}\n`;\n"],"mappings":";;;;;;AAAA;AAAgD;AAAA;AASzC,MAAMA,sBAAsB,GAAGC,yBAAM,CAACC,GAAiC;AAC9E,aAAa;EAAA,IAAC;IAAEC;EAAmC,CAAC;EAAA,OAAKA,KAAK,CAACC,IAAI;AAAA,CAAC;AACpE,eAAe;EAAA,IAAC;IAAEC;EAAU,CAAC;EAAA,OAAMA,SAAS,GAAG,iBAAiB,GAAG,gBAAgB;AAAA,CAAE;AACrF;AACA,MAAM;EAAA,IAAC;IAAEC;EAAU,CAAC;EAAA,OACZ,OAAOA,SAAS,KAAK,QAAQ,IAC7B,IAAAC,qBAAG,CAAC;AACZ,0BAA0BD,SAAU;AACpC;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.44",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chayns",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "58aaa9d73f7b6fafac4d25d0a2412f620913992b"
|
|
66
66
|
}
|