@bigbinary/neeto-molecules 3.16.0 → 3.16.1
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/dist/EmailPreview.js
CHANGED
|
@@ -25,7 +25,7 @@ var EmailPreview = withT(function (_ref) {
|
|
|
25
25
|
return /*#__PURE__*/jsxs("div", {
|
|
26
26
|
"data-cy": "email-preview-card",
|
|
27
27
|
"data-testid": "email-preview",
|
|
28
|
-
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", className),
|
|
28
|
+
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light flex flex-1 flex-col border", className),
|
|
29
29
|
children: [/*#__PURE__*/jsxs("div", {
|
|
30
30
|
className: "neeto-ui-border-gray-300 space-y-3 border-b p-6",
|
|
31
31
|
children: [/*#__PURE__*/jsxs("div", {
|
package/dist/EmailPreview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailPreview.js","sources":["../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 space-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"space-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,IAAI,CAACC,aAAa,CAAC,CAAA;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IAAAC,cAAA,GAAAT,IAAA,CACJU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,aAAa,GAAAX,IAAA,CAAbW,aAAa,CAAA;AAAA,EAAA,oBAEbC,IAAA,CAAA,KAAA,EAAA;AACE,IAAA,SAAA,EAAQ,oBAAoB;AAC5B,IAAA,aAAA,EAAY,eAAe;AAC3BF,IAAAA,SAAS,EAAEG,UAAU,CACnB,
|
|
1
|
+
{"version":3,"file":"EmailPreview.js","sources":["../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 space-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"space-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,IAAI,CAACC,aAAa,CAAC,CAAA;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IAAAC,cAAA,GAAAT,IAAA,CACJU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE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CAACE,MAAM;AAClC;AACF;AACA;EACErB,IAAI,EAAEmB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACElB,aAAa,EAAEgB,SAAS,CAACE,MAAAA;AAC3B,CAAC;;;;"}
|
package/dist/cjs/EmailPreview.js
CHANGED
|
@@ -27,7 +27,7 @@ var EmailPreview = withT(function (_ref) {
|
|
|
27
27
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
28
28
|
"data-cy": "email-preview-card",
|
|
29
29
|
"data-testid": "email-preview",
|
|
30
|
-
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", className),
|
|
30
|
+
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light flex flex-1 flex-col border", className),
|
|
31
31
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
32
32
|
className: "neeto-ui-border-gray-300 space-y-3 border-b p-6",
|
|
33
33
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailPreview.js","sources":["../../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 space-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"space-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,UAAI,CAACC,aAAa,CAAC,CAAA;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IAAAC,cAAA,GAAAT,IAAA,CACJU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,aAAa,GAAAX,IAAA,CAAbW,aAAa,CAAA;AAAA,EAAA,oBAEbC,eAAA,CAAA,KAAA,EAAA;AACE,IAAA,SAAA,EAAQ,oBAAoB;AAC5B,IAAA,aAAA,EAAY,eAAe;AAC3BF,IAAAA,SAAS,EAAEG,UAAU,CACnB,
|
|
1
|
+
{"version":3,"file":"EmailPreview.js","sources":["../../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 space-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"space-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,UAAI,CAACC,aAAa,CAAC,CAAA;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IAAAC,cAAA,GAAAT,IAAA,CACJU,SAAS;AAATA,IAAAA,SAAS,G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B;AACF;AACA;EACEtB,gBAAgB,EAAEoB,eAAS,CAACE,MAAM;AAClC;AACF;AACA;EACErB,IAAI,EAAEmB,eAAS,CAACE,MAAM;AACtB;AACF;AACA;EACElB,aAAa,EAAEgB,eAAS,CAACE,MAAAA;AAC3B,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.1",
|
|
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>",
|