@bigbinary/neeto-molecules 3.15.15 → 3.15.16
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/README.md +1 -0
- package/dist/CardLayout.js +42 -0
- package/dist/CardLayout.js.map +1 -0
- package/dist/cjs/CardLayout.js +44 -0
- package/dist/cjs/CardLayout.js.map +1 -0
- package/package.json +1 -1
- package/types/CardLayout.d.ts +33 -0
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ https://neeto-molecules.neeto.com/
|
|
|
17
17
|
- [BrowserSupport](./docs/components/BrowserSupport.md)
|
|
18
18
|
- [Builder](./docs/components/Builder.md)
|
|
19
19
|
- [CalendarView](./docs/components/CalendarView.md)
|
|
20
|
+
- [CardLayout](./docs/components/CardLayout.md)
|
|
20
21
|
- [Codeblock](./docs/components/Codeblock.md)
|
|
21
22
|
- [Columns](./docs/components/Columns.md)
|
|
22
23
|
- [ConfirmationModal](./docs/components/ConfirmationModal.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import classnames from 'classnames';
|
|
2
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var CardLayout = function CardLayout(_ref) {
|
|
6
|
+
var _ref$className = _ref.className,
|
|
7
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
8
|
+
_ref$containerClassNa = _ref.containerClassName,
|
|
9
|
+
containerClassName = _ref$containerClassNa === void 0 ? "" : _ref$containerClassNa,
|
|
10
|
+
_ref$title = _ref.title,
|
|
11
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
12
|
+
_ref$description = _ref.description,
|
|
13
|
+
description = _ref$description === void 0 ? null : _ref$description,
|
|
14
|
+
actionBlock = _ref.actionBlock,
|
|
15
|
+
children = _ref.children;
|
|
16
|
+
return /*#__PURE__*/jsx("div", {
|
|
17
|
+
"data-testid": "neeto-molecules-card-container",
|
|
18
|
+
className: classnames(["neeto-molecules-card__container mx-auto w-full max-w-3xl", containerClassName]),
|
|
19
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
20
|
+
"data-testid": "neeto-molecules-card",
|
|
21
|
+
className: classnames(["neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border", className]),
|
|
22
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
23
|
+
className: "neeto-molecules-card__content p-4",
|
|
24
|
+
children: [title && /*#__PURE__*/jsx(Typography, {
|
|
25
|
+
className: "mb-2",
|
|
26
|
+
style: "h2",
|
|
27
|
+
children: title
|
|
28
|
+
}), description && /*#__PURE__*/jsx(Typography, {
|
|
29
|
+
className: "mb-3",
|
|
30
|
+
style: "body1",
|
|
31
|
+
children: description
|
|
32
|
+
}), children]
|
|
33
|
+
}), actionBlock && /*#__PURE__*/jsx("div", {
|
|
34
|
+
className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4", className]),
|
|
35
|
+
children: actionBlock
|
|
36
|
+
})]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { CardLayout as default };
|
|
42
|
+
//# sourceMappingURL=CardLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sources":["../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4\">\n {title && (\n <Typography className=\"mb-2\" style=\"h2\">\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-3\" style=\"body1\">\n {description}\n </Typography>\n )}\n {children}\n </div>\n {actionBlock && (\n <div\n className={classnames([\n \"neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4\",\n className,\n ])}\n >\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nCardLayout.propTypes = {\n /**\n * To set the title of the card.\n */\n title: PropTypes.string,\n /**\n * To set the description of the card.\n */\n description: PropTypes.node,\n /**\n * To set custom class name to the card.\n */\n className: PropTypes.string,\n /**\n * To set custom class name to the card container.\n */\n containerClassName: PropTypes.string,\n /**\n * To specify the content to be rendered in the card footer.\n */\n actionBlock: PropTypes.node,\n /**\n * To specify the components to be rendered inside the card.\n */\n children: PropTypes.node,\n};\n\nexport default CardLayout;\n"],"names":["CardLayout","_ref","_ref$className","className","_ref$containerClassNa","containerClassName","_ref$title","title","_ref$description","description","actionBlock","children","_jsx","classnames","_jsxs","Typography","style"],"mappings":";;;;AAIA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CACdE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,qBAAA,GAAAH,IAAA,CACdI,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;IAAAE,UAAA,GAAAL,IAAA,CACvBM,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,UAAA;IAAAE,gBAAA,GAAAP,IAAA,CACZQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAA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inary/neetoui/Typography');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var CardLayout = function CardLayout(_ref) {
|
|
8
|
+
var _ref$className = _ref.className,
|
|
9
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
10
|
+
_ref$containerClassNa = _ref.containerClassName,
|
|
11
|
+
containerClassName = _ref$containerClassNa === void 0 ? "" : _ref$containerClassNa,
|
|
12
|
+
_ref$title = _ref.title,
|
|
13
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
14
|
+
_ref$description = _ref.description,
|
|
15
|
+
description = _ref$description === void 0 ? null : _ref$description,
|
|
16
|
+
actionBlock = _ref.actionBlock,
|
|
17
|
+
children = _ref.children;
|
|
18
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
19
|
+
"data-testid": "neeto-molecules-card-container",
|
|
20
|
+
className: classnames(["neeto-molecules-card__container mx-auto w-full max-w-3xl", containerClassName]),
|
|
21
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
22
|
+
"data-testid": "neeto-molecules-card",
|
|
23
|
+
className: classnames(["neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border", className]),
|
|
24
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
25
|
+
className: "neeto-molecules-card__content p-4",
|
|
26
|
+
children: [title && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
27
|
+
className: "mb-2",
|
|
28
|
+
style: "h2",
|
|
29
|
+
children: title
|
|
30
|
+
}), description && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
31
|
+
className: "mb-3",
|
|
32
|
+
style: "body1",
|
|
33
|
+
children: description
|
|
34
|
+
}), children]
|
|
35
|
+
}), actionBlock && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36
|
+
className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4", className]),
|
|
37
|
+
children: actionBlock
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
module.exports = CardLayout;
|
|
44
|
+
//# sourceMappingURL=CardLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sources":["../../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4\">\n {title && (\n <Typography className=\"mb-2\" style=\"h2\">\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-3\" style=\"body1\">\n {description}\n </Typography>\n )}\n {children}\n </div>\n {actionBlock && (\n <div\n className={classnames([\n \"neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4\",\n className,\n ])}\n >\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nCardLayout.propTypes = {\n /**\n * To set the title of the card.\n */\n title: PropTypes.string,\n /**\n * To set the description of the card.\n */\n description: PropTypes.node,\n /**\n * To set custom class name to the card.\n */\n className: PropTypes.string,\n /**\n * To set custom class name to the card container.\n */\n containerClassName: PropTypes.string,\n /**\n * To specify the content to be rendered in the card footer.\n */\n actionBlock: PropTypes.node,\n /**\n * To specify the components to be rendered inside the card.\n */\n children: PropTypes.node,\n};\n\nexport default CardLayout;\n"],"names":["CardLayout","_ref","_ref$className","className","_ref$containerClassNa","containerClassName","_ref$title","title","_ref$description","description","actionBlock","children","_jsx","classnames","_jsxs","Typography","style"],"mappings":";;;;;;AAIA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CACdE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,qBAAA,GAAAH,IAAA,CACdI,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;IAAAE,UAAA,GAAAL,IAAA,CACvBM,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,UAAA;IAAAE,gBAAA,GAAAP,IAAA,CACZQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;IAClBE,WAAW,GAAAT,IAAA,CAAXS,WAAW;IACXC,QAAQ,GAAAV,IAAA,CAARU,QAAQ,CAAA;AAAA,EAAA,oBAERC,cAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,gCAAgC;IAC5CT,SAAS,EAAEU,UAAU,CAAC,CACpB,0DAA0D,EAC1DR,kBAAkB,CACnB,CAAE;AAAAM,IAAAA,QAAA,eAEHG,eAAA,CAAA,KAAA,EAAA;AACE,MAAA,aAAA,EAAY,sBAAsB;MAClCX,SAAS,EAAEU,UAAU,CAAC,CACpB,sFAAsF,EACtFV,SAAS,CACV,CAAE;AAAAQ,MAAAA,QAAA,gBAEHG,eAAA,CAAA,KAAA,EAAA;AAAKX,QAAAA,SAAS,EAAC,mCAAmC;AAAAQ,QAAAA,QAAA,EAC/CJ,CAAAA,KAAK,iBACJK,cAAA,CAACG,UAAU,EAAA;AAACZ,UAAAA,SAAS,EAAC,MAAM;AAACa,UAAAA,KAAK,EAAC,IAAI;AAAAL,UAAAA,QAAA,EACpCJ,KAAAA;AAAK,SACI,CACb,EACAE,WAAW,iBACVG,cAAA,CAACG,UAAU,EAAA;AAACZ,UAAAA,SAAS,EAAC,MAAM;AAACa,UAAAA,KAAK,EAAC,OAAO;AAAAL,UAAAA,QAAA,EACvCF,WAAAA;SACS,CACb,EACAE,QAAQ,CAAA;AAAA,OACN,CAAC,EACLD,WAAW,iBACVE,cAAA,CAAA,KAAA,EAAA;QACET,SAAS,EAAEU,UAAU,CAAC,CACpB,sHAAsH,EACtHV,SAAS,CACV,CAAE;AAAAQ,QAAAA,QAAA,EAEFD,WAAAA;AAAW,OACT,CACN,CAAA;KACE,CAAA;AAAC,GACH,CAAC,CAAA;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.16",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* The CardLayout component is used to render the content wrapped in the card
|
|
6
|
+
*
|
|
7
|
+
* layout.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* import CardLayout from "@bigbinary/neeto-molecules/CardLayout";
|
|
12
|
+
*
|
|
13
|
+
* const Component = () => (
|
|
14
|
+
* <CardLayout
|
|
15
|
+
* title="Set start day of the week"
|
|
16
|
+
* description="Choose your preferred start day of the week. This setting will be applied to all calendars."
|
|
17
|
+
* actionBlock={<Button label="Primary action" />}
|
|
18
|
+
* >
|
|
19
|
+
* {children}
|
|
20
|
+
* </CardLayout>
|
|
21
|
+
* );
|
|
22
|
+
* @endexample
|
|
23
|
+
*/
|
|
24
|
+
declare const CardLayout: React.FC<{
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: React.ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
containerClassName?: string;
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
actionBlock?: React.ReactNode;
|
|
31
|
+
}>;
|
|
32
|
+
|
|
33
|
+
export { CardLayout as default };
|