@bigbinary/neeto-molecules 5.1.13 → 5.1.15

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.
@@ -2,7 +2,6 @@
2
2
 
3
3
  var neetoAtoms = require('@bigbinary/neeto-atoms');
4
4
  var formik = require('@bigbinary/neeto-atoms/formik');
5
- var ramda = require('ramda');
6
5
  var reactI18next = require('react-i18next');
7
6
  var yup = require('yup');
8
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -84,10 +83,11 @@ var ConfirmationModal = function ConfirmationModal(_ref) {
84
83
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
85
84
  children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Dialog.Body, {
86
85
  className: "flex flex-col gap-y-4",
87
- children: [ramda.type(description) === "String" ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
86
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
87
+ as: "div",
88
88
  variant: "body2",
89
89
  children: description
90
- }) : description, /*#__PURE__*/jsxRuntime.jsx(formik.Input, {
90
+ }), /*#__PURE__*/jsxRuntime.jsx(formik.Input, {
91
91
  autoFocus: true,
92
92
  "data-testid": "confirmation-modal-input",
93
93
  label: deleteInputLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationModal.js","sources":["../../../src/v2/components/ConfirmationModal/constants.js","../../../src/v2/components/ConfirmationModal/utils.js","../../../src/v2/components/ConfirmationModal/index.jsx"],"sourcesContent":["export const INITIAL_VALUES = { confirmationText: \"\" };\n","import * as yup from \"yup\";\n\nexport const deletionValidationSchema = confirmationText =>\n yup.object({\n confirmationText: yup.string().required(\"\").oneOf([confirmationText], \"\"),\n });\n","import { Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { ActionBlock, Form, Input } from \"@bigbinary/neeto-atoms/formik\";\nimport PropTypes from \"prop-types\";\nimport { type } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { INITIAL_VALUES } from \"./constants\";\nimport { deletionValidationSchema } from \"./utils\";\n\nconst ConfirmationModal = ({\n buttonLabel,\n confirmationText,\n description = \"\",\n isOpen = true,\n isSubmitting = false,\n title = \"\",\n onClose,\n onSubmit,\n deleteConfirmationMessage,\n}) => {\n const { t } = useTranslation();\n\n const formikProps = {\n initialValues: INITIAL_VALUES,\n validationSchema: deletionValidationSchema(confirmationText),\n onSubmit,\n };\n\n const deleteInputLabel = deleteConfirmationMessage || (\n <Trans\n components={{ strong: <strong /> }}\n i18nKey=\"neetoMolecules.confirmationModal.deleteConfirmationMessage\"\n values={{ value: confirmationText }}\n />\n );\n\n return (\n <Dialog\n {...{ isOpen, onClose }}\n aria-describedby={undefined}\n data-testid=\"confirmation-modal\"\n >\n <Dialog.Header>\n <Dialog.Title data-testid=\"confirmation-modal-title\">\n {title}\n </Dialog.Title>\n </Dialog.Header>\n <Form {...{ formikProps }} className=\"flex flex-col gap-5\">\n {({ values }) => (\n <>\n <Dialog.Body className=\"flex flex-col gap-y-4\">\n {type(description) === \"String\" ? (\n <Typography variant=\"body2\">{description}</Typography>\n ) : (\n description\n )}\n <Input\n autoFocus\n data-testid=\"confirmation-modal-input\"\n label={deleteInputLabel}\n labelProps={{ className: \"block w-full\" }}\n name=\"confirmationText\"\n type=\"text\"\n />\n </Dialog.Body>\n <Dialog.Footer>\n <ActionBlock\n position=\"right\"\n cancelButtonProps={{\n label: t(\"neetoMolecules.common.actions.cancel\"),\n variant: \"ghost\",\n onClick: onClose,\n disabled: false,\n type: \"button\",\n }}\n submitButtonProps={{\n \"data-testid\": \"delete-continue-button\",\n label: buttonLabel,\n loading: isSubmitting,\n variant: \"destructive\",\n disabled:\n isSubmitting ||\n confirmationText !== values.confirmationText,\n }}\n />\n </Dialog.Footer>\n </>\n )}\n </Form>\n </Dialog>\n );\n};\n\nConfirmationModal.propTypes = {\n /**\n * Label of the action button in the Modal\n */\n buttonLabel: PropTypes.string,\n /**\n * Text that is expected to be entered by the user\n */\n confirmationText: PropTypes.string,\n /**\n * Modal description\n */\n description: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n PropTypes.string,\n ]),\n /**\n * To be passed to loading prop of the action button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To specify whether the modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * Title of the modal\n */\n title: PropTypes.string,\n /**\n * Handler function that is invoked when the close button is clicked\n */\n onClose: PropTypes.func,\n /**\n * Handler function that is invoked when the action button is clicked\n */\n onSubmit: PropTypes.func,\n /**\n * Message that will be shown as the label of the confirmation input field.\n */\n deleteConfirmationMessage: PropTypes.string,\n};\n\nexport default ConfirmationModal;\n"],"names":["INITIAL_VALUES","confirmationText","deletionValidationSchema","yup","object","string","required","oneOf","ConfirmationModal","_ref","buttonLabel","_ref$description","description","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$title","title","onClose","onSubmit","deleteConfirmationMessage","_useTranslation","useTranslation","t","formikProps","initialValues","validationSchema","deleteInputLabel","_jsx","Trans","components","strong","i18nKey","values","value","_jsxs","Dialog","undefined","children","Header","Title","Form","className","_ref2","_Fragment","Body","type","Typography","variant","Input","autoFocus","label","labelProps","name","Footer","ActionBlock","position","cancelButtonProps","onClick","disabled","submitButtonProps","loading"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAAEC,EAAAA,gBAAgB,EAAE;AAAG,CAAC;;ACE/C,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGD,gBAAgB,EAAA;EAAA,OACtDE,cAAG,CAACC,MAAM,CAAC;AACTH,IAAAA,gBAAgB,EAAEE,cAAG,CAACE,MAAM,EAAE,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAACN,gBAAgB,CAAC,EAAE,EAAE;AAC1E,GAAC,CAAC;AAAA,CAAA;;ACIJ,IAAMO,i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,eACdlB,cAAA,CAACQ,iBAAM,CAACkB,MAAM,EAAA;YAAAhB,QAAA,eACZV,cAAA,CAAC2B,kBAAW,EAAA;AACVC,cAAAA,QAAQ,EAAC,OAAO;AAChBC,cAAAA,iBAAiB,EAAE;AACjBN,gBAAAA,KAAK,EAAE5B,CAAC,CAAC,sCAAsC,CAAC;AAChDyB,gBAAAA,OAAO,EAAE,OAAO;AAChBU,gBAAAA,OAAO,EAAExC,OAAO;AAChByC,gBAAAA,QAAQ,EAAE,KAAK;AACfb,gBAAAA,IAAI,EAAE;eACN;AACFc,cAAAA,iBAAiB,EAAE;AACjB,gBAAA,aAAa,EAAE,wBAAwB;AACvCT,gBAAAA,KAAK,EAAE1C,WAAW;AAClBoD,gBAAAA,OAAO,EAAE9C,YAAY;AACrBiC,gBAAAA,OAAO,EAAE,aAAa;AACtBW,gBAAAA,QAAQ,EACN5C,YAAY,IACZf,gBAAgB,KAAKiC,MAAM,CAACjC;AAChC;aACD;AAAC,WACW,CAAC;AAAA,SAChB,CAAC;AAAA,MAAA;AACJ,KACG,CAAC;AAAA,GACD,CAAC;AAEb;;;;"}
1
+ {"version":3,"file":"ConfirmationModal.js","sources":["../../../src/v2/components/ConfirmationModal/constants.js","../../../src/v2/components/ConfirmationModal/utils.js","../../../src/v2/components/ConfirmationModal/index.jsx"],"sourcesContent":["export const INITIAL_VALUES = { confirmationText: \"\" };\n","import * as yup from \"yup\";\n\nexport const deletionValidationSchema = confirmationText =>\n yup.object({\n confirmationText: yup.string().required(\"\").oneOf([confirmationText], \"\"),\n });\n","import { Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { ActionBlock, Form, Input } from \"@bigbinary/neeto-atoms/formik\";\nimport PropTypes from \"prop-types\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { INITIAL_VALUES } from \"./constants\";\nimport { deletionValidationSchema } from \"./utils\";\n\nconst ConfirmationModal = ({\n buttonLabel,\n confirmationText,\n description = \"\",\n isOpen = true,\n isSubmitting = false,\n title = \"\",\n onClose,\n onSubmit,\n deleteConfirmationMessage,\n}) => {\n const { t } = useTranslation();\n\n const formikProps = {\n initialValues: INITIAL_VALUES,\n validationSchema: deletionValidationSchema(confirmationText),\n onSubmit,\n };\n\n const deleteInputLabel = deleteConfirmationMessage || (\n <Trans\n components={{ strong: <strong /> }}\n i18nKey=\"neetoMolecules.confirmationModal.deleteConfirmationMessage\"\n values={{ value: confirmationText }}\n />\n );\n\n return (\n <Dialog\n {...{ isOpen, onClose }}\n aria-describedby={undefined}\n data-testid=\"confirmation-modal\"\n >\n <Dialog.Header>\n <Dialog.Title data-testid=\"confirmation-modal-title\">\n {title}\n </Dialog.Title>\n </Dialog.Header>\n <Form {...{ formikProps }} className=\"flex flex-col gap-5\">\n {({ values }) => (\n <>\n <Dialog.Body className=\"flex flex-col gap-y-4\">\n <Typography as=\"div\" variant=\"body2\">\n {description}\n </Typography>\n <Input\n autoFocus\n data-testid=\"confirmation-modal-input\"\n label={deleteInputLabel}\n labelProps={{ className: \"block w-full\" }}\n name=\"confirmationText\"\n type=\"text\"\n />\n </Dialog.Body>\n <Dialog.Footer>\n <ActionBlock\n position=\"right\"\n cancelButtonProps={{\n label: t(\"neetoMolecules.common.actions.cancel\"),\n variant: \"ghost\",\n onClick: onClose,\n disabled: false,\n type: \"button\",\n }}\n submitButtonProps={{\n \"data-testid\": \"delete-continue-button\",\n label: buttonLabel,\n loading: isSubmitting,\n variant: \"destructive\",\n disabled:\n isSubmitting ||\n confirmationText !== values.confirmationText,\n }}\n />\n </Dialog.Footer>\n </>\n )}\n </Form>\n </Dialog>\n );\n};\n\nConfirmationModal.propTypes = {\n /**\n * Label of the action button in the Modal\n */\n buttonLabel: PropTypes.string,\n /**\n * Text that is expected to be entered by the user\n */\n confirmationText: PropTypes.string,\n /**\n * Modal description\n */\n description: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n PropTypes.string,\n ]),\n /**\n * To be passed to loading prop of the action button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To specify whether the modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * Title of the modal\n */\n title: PropTypes.string,\n /**\n * Handler function that is invoked when the close button is clicked\n */\n onClose: PropTypes.func,\n /**\n * Handler function that is invoked when the action button is clicked\n */\n onSubmit: PropTypes.func,\n /**\n * Message that will be shown as the label of the confirmation input field.\n */\n deleteConfirmationMessage: PropTypes.string,\n};\n\nexport default ConfirmationModal;\n"],"names":["INITIAL_VALUES","confirmationText","deletionValidationSchema","yup","object","string","required","oneOf","ConfirmationModal","_ref","buttonLabel","_ref$description","description","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$title","title","onClose","onSubmit","deleteConfirmationMessage","_useTranslation","useTranslation","t","formikProps","initialValues","validationSchema","deleteInputLabel","_jsx","Trans","components","strong","i18nKey","values","value","_jsxs","Dialog","undefined","children","Header","Title","Form","className","_ref2","_Fragment","Body","Typography","as","variant","Input","autoFocus","label","labelProps","name","type","Footer","ActionBlock","position","cancelButtonProps","onClick","disabled","submitButtonProps","loading"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAAEC,EAAAA,gBAAgB,EAAE;AAAG,CAAC;;ACE/C,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGD,gBAAgB,EAAA;EAAA,OACtDE,cAAG,CAACC,MAAM,CAAC;AACTH,IAAAA,gBAAgB,EAAEE,cAAG,CAACE,MAAM,EAAE,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAACN,gBAAgB,CAAC,EAAE,EAAE;AAC1E,GAAC,CAAC;AAAA,CAAA;;ACGJ,IAAMO,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAUjB;AAAA,EAAA,IATJC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXT,gBAAgB,GAAAQ,IAAA,CAAhBR,gBAAgB;IAAAU,gBAAA,GAAAF,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AAsC,CAAC;AAChDyB,gBAAAA,OAAO,EAAE,OAAO;AAChBW,gBAAAA,OAAO,EAAEzC,OAAO;AAChB0C,gBAAAA,QAAQ,EAAE,KAAK;AACfN,gBAAAA,IAAI,EAAE;eACN;AACFO,cAAAA,iBAAiB,EAAE;AACjB,gBAAA,aAAa,EAAE,wBAAwB;AACvCV,gBAAAA,KAAK,EAAE1C,WAAW;AAClBqD,gBAAAA,OAAO,EAAE/C,YAAY;AACrBiC,gBAAAA,OAAO,EAAE,aAAa;AACtBY,gBAAAA,QAAQ,EACN7C,YAAY,IACZf,gBAAgB,KAAKiC,MAAM,CAACjC;AAChC;aACD;AAAC,WACW,CAAC;AAAA,SAChB,CAAC;AAAA,MAAA;AACJ,KACG,CAAC;AAAA,GACD,CAAC;AAEb;;;;"}
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var neetoAtoms = require('@bigbinary/neeto-atoms');
4
+ var classnames = require('classnames');
5
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
6
+ var index = require('../index-JY2zVpnv.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ require('../_commonjsHelpers-BJu3ubxk.js');
9
+
10
+ var MobilePreviewHeader = reactUtils.withT(function (_ref) {
11
+ var t = _ref.t,
12
+ _ref$className = _ref.className,
13
+ className = _ref$className === void 0 ? "" : _ref$className,
14
+ _ref$message = _ref.message,
15
+ message = _ref$message === void 0 ? "" : _ref$message;
16
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
17
+ className: classnames("bg-muted px-6 py-5", className),
18
+ "data-testid": "mobile-preview-header",
19
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
20
+ variant: "body2",
21
+ children: message || t("neetoMolecules.mobilePreview.message")
22
+ })
23
+ });
24
+ });
25
+ MobilePreviewHeader.propTypes = {
26
+ className: index.PropTypes.string,
27
+ message: index.PropTypes.node
28
+ };
29
+
30
+ module.exports = MobilePreviewHeader;
31
+ //# sourceMappingURL=MobilePreviewHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobilePreviewHeader.js","sources":["../../../src/v2/components/MobilePreviewHeader/index.jsx"],"sourcesContent":["import { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { withT } from \"neetocommons/react-utils\";\nimport PropTypes from \"prop-types\";\n\nconst MobilePreviewHeader = withT(({ t, className = \"\", message = \"\" }) => (\n <div\n className={classnames(\"bg-muted px-6 py-5\", className)}\n data-testid=\"mobile-preview-header\"\n >\n <Typography variant=\"body2\">\n {message || t(\"neetoMolecules.mobilePreview.message\")}\n </Typography>\n </div>\n));\n\nMobilePreviewHeader.propTypes = {\n className: PropTypes.string,\n message: PropTypes.node,\n};\n\nexport default MobilePreviewHeader;\n"],"names":["MobilePreviewHeader","withT","_ref","t","_ref$className","className","_ref$message","message","_jsx","classnames","children","Typography","variant","propTypes","PropTypes","string","node"],"mappings":";;;;;;;;;AAKA,IAAMA,mBAAmB,GAAGC,gBAAK,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,cAAA,GAAAF,IAAA,CAAEG,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,YAAA;AAAA,EAAA,oBAClEE,cAAA,CAAA,KAAA,EAAA;AACEH,IAAAA,SAAS,EAAEI,UAAU,CAAC,oBAAoB,EAAEJ,SAAS,CAAE;AACvD,IAAA,aAAA,EAAY,uBAAuB;IAAAK,QAAA,eAEnCF,cAAA,CAACG,qBAAU,EAAA;AAACC,MAAAA,OAAO,EAAC,OAAO;AAAAF,MAAAA,QAAA,EACxBH,OAAO,IAAIJ,CAAC,CAAC,sCAAsC;KAC1C;AAAC,GACV,CAAC;AAAA,CACP;AAEDH,mBAAmB,CAACa,SAAS,GAAG;EAC9BR,SAAS,EAAES,eAAS,CAACC,MAAM;EAC3BR,OAAO,EAAEO,eAAS,CAACE;AACrB,CAAC;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { Dialog, Typography } from '@bigbinary/neeto-atoms';
2
2
  import { Form, Input, ActionBlock } from '@bigbinary/neeto-atoms/formik';
3
- import { type } from 'ramda';
4
3
  import { useTranslation, Trans } from 'react-i18next';
5
4
  import * as yup from 'yup';
6
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -63,10 +62,11 @@ var ConfirmationModal = function ConfirmationModal(_ref) {
63
62
  return /*#__PURE__*/jsxs(Fragment, {
64
63
  children: [/*#__PURE__*/jsxs(Dialog.Body, {
65
64
  className: "flex flex-col gap-y-4",
66
- children: [type(description) === "String" ? /*#__PURE__*/jsx(Typography, {
65
+ children: [/*#__PURE__*/jsx(Typography, {
66
+ as: "div",
67
67
  variant: "body2",
68
68
  children: description
69
- }) : description, /*#__PURE__*/jsx(Input, {
69
+ }), /*#__PURE__*/jsx(Input, {
70
70
  autoFocus: true,
71
71
  "data-testid": "confirmation-modal-input",
72
72
  label: deleteInputLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationModal.js","sources":["../../src/v2/components/ConfirmationModal/constants.js","../../src/v2/components/ConfirmationModal/utils.js","../../src/v2/components/ConfirmationModal/index.jsx"],"sourcesContent":["export const INITIAL_VALUES = { confirmationText: \"\" };\n","import * as yup from \"yup\";\n\nexport const deletionValidationSchema = confirmationText =>\n yup.object({\n confirmationText: yup.string().required(\"\").oneOf([confirmationText], \"\"),\n });\n","import { Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { ActionBlock, Form, Input } from \"@bigbinary/neeto-atoms/formik\";\nimport PropTypes from \"prop-types\";\nimport { type } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { INITIAL_VALUES } from \"./constants\";\nimport { deletionValidationSchema } from \"./utils\";\n\nconst ConfirmationModal = ({\n buttonLabel,\n confirmationText,\n description = \"\",\n isOpen = true,\n isSubmitting = false,\n title = \"\",\n onClose,\n onSubmit,\n deleteConfirmationMessage,\n}) => {\n const { t } = useTranslation();\n\n const formikProps = {\n initialValues: INITIAL_VALUES,\n validationSchema: deletionValidationSchema(confirmationText),\n onSubmit,\n };\n\n const deleteInputLabel = deleteConfirmationMessage || (\n <Trans\n components={{ strong: <strong /> }}\n i18nKey=\"neetoMolecules.confirmationModal.deleteConfirmationMessage\"\n values={{ value: confirmationText }}\n />\n );\n\n return (\n <Dialog\n {...{ isOpen, onClose }}\n aria-describedby={undefined}\n data-testid=\"confirmation-modal\"\n >\n <Dialog.Header>\n <Dialog.Title data-testid=\"confirmation-modal-title\">\n {title}\n </Dialog.Title>\n </Dialog.Header>\n <Form {...{ formikProps }} className=\"flex flex-col gap-5\">\n {({ values }) => (\n <>\n <Dialog.Body className=\"flex flex-col gap-y-4\">\n {type(description) === \"String\" ? (\n <Typography variant=\"body2\">{description}</Typography>\n ) : (\n description\n )}\n <Input\n autoFocus\n data-testid=\"confirmation-modal-input\"\n label={deleteInputLabel}\n labelProps={{ className: \"block w-full\" }}\n name=\"confirmationText\"\n type=\"text\"\n />\n </Dialog.Body>\n <Dialog.Footer>\n <ActionBlock\n position=\"right\"\n cancelButtonProps={{\n label: t(\"neetoMolecules.common.actions.cancel\"),\n variant: \"ghost\",\n onClick: onClose,\n disabled: false,\n type: \"button\",\n }}\n submitButtonProps={{\n \"data-testid\": \"delete-continue-button\",\n label: buttonLabel,\n loading: isSubmitting,\n variant: \"destructive\",\n disabled:\n isSubmitting ||\n confirmationText !== values.confirmationText,\n }}\n />\n </Dialog.Footer>\n </>\n )}\n </Form>\n </Dialog>\n );\n};\n\nConfirmationModal.propTypes = {\n /**\n * Label of the action button in the Modal\n */\n buttonLabel: PropTypes.string,\n /**\n * Text that is expected to be entered by the user\n */\n confirmationText: PropTypes.string,\n /**\n * Modal description\n */\n description: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n PropTypes.string,\n ]),\n /**\n * To be passed to loading prop of the action button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To specify whether the modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * Title of the modal\n */\n title: PropTypes.string,\n /**\n * Handler function that is invoked when the close button is clicked\n */\n onClose: PropTypes.func,\n /**\n * Handler function that is invoked when the action button is clicked\n */\n onSubmit: PropTypes.func,\n /**\n * Message that will be shown as the label of the confirmation input field.\n */\n deleteConfirmationMessage: PropTypes.string,\n};\n\nexport default ConfirmationModal;\n"],"names":["INITIAL_VALUES","confirmationText","deletionValidationSchema","yup","object","string","required","oneOf","ConfirmationModal","_ref","buttonLabel","_ref$description","description","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$title","title","onClose","onSubmit","deleteConfirmationMessage","_useTranslation","useTranslation","t","formikProps","initialValues","validationSchema","deleteInputLabel","_jsx","Trans","components","strong","i18nKey","values","value","_jsxs","Dialog","undefined","children","Header","Title","Form","className","_ref2","_Fragment","Body","type","Typography","variant","Input","autoFocus","label","labelProps","name","Footer","ActionBlock","position","cancelButtonProps","onClick","disabled","submitButtonProps","loading"],"mappings":";;;;;;;AAAO,IAAMA,cAAc,GAAG;AAAEC,EAAAA,gBAAgB,EAAE;AAAG,CAAC;;ACE/C,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGD,gBAAgB,EAAA;EAAA,OACtDE,GAAG,CAACC,MAAM,CAAC;AACTH,IAAAA,gBAAgB,EAAEE,GAAG,CAACE,MAAM,EAAE,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAACN,gBAAgB,CAAC,EAAE,EAAE;AAC1E,GAAC,CAAC;AAAA,CAAA;;ACIJ,IAAMO,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAUjB;AAAA,EAAA,IATJC,WAAW,GAAAD,IAAA,CAA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AAAA,QAAQ,EAAC,OAAO;AAChBC,cAAAA,iBAAiB,EAAE;AACjBN,gBAAAA,KAAK,EAAE5B,CAAC,CAAC,sCAAsC,CAAC;AAChDyB,gBAAAA,OAAO,EAAE,OAAO;AAChBU,gBAAAA,OAAO,EAAExC,OAAO;AAChByC,gBAAAA,QAAQ,EAAE,KAAK;AACfb,gBAAAA,IAAI,EAAE;eACN;AACFc,cAAAA,iBAAiB,EAAE;AACjB,gBAAA,aAAa,EAAE,wBAAwB;AACvCT,gBAAAA,KAAK,EAAE1C,WAAW;AAClBoD,gBAAAA,OAAO,EAAE9C,YAAY;AACrBiC,gBAAAA,OAAO,EAAE,aAAa;AACtBW,gBAAAA,QAAQ,EACN5C,YAAY,IACZf,gBAAgB,KAAKiC,MAAM,CAACjC;AAChC;aACD;AAAC,WACW,CAAC;AAAA,SAChB,CAAC;AAAA,MAAA;AACJ,KACG,CAAC;AAAA,GACD,CAAC;AAEb;;;;"}
1
+ {"version":3,"file":"ConfirmationModal.js","sources":["../../src/v2/components/ConfirmationModal/constants.js","../../src/v2/components/ConfirmationModal/utils.js","../../src/v2/components/ConfirmationModal/index.jsx"],"sourcesContent":["export const INITIAL_VALUES = { confirmationText: \"\" };\n","import * as yup from \"yup\";\n\nexport const deletionValidationSchema = confirmationText =>\n yup.object({\n confirmationText: yup.string().required(\"\").oneOf([confirmationText], \"\"),\n });\n","import { Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { ActionBlock, Form, Input } from \"@bigbinary/neeto-atoms/formik\";\nimport PropTypes from \"prop-types\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { INITIAL_VALUES } from \"./constants\";\nimport { deletionValidationSchema } from \"./utils\";\n\nconst ConfirmationModal = ({\n buttonLabel,\n confirmationText,\n description = \"\",\n isOpen = true,\n isSubmitting = false,\n title = \"\",\n onClose,\n onSubmit,\n deleteConfirmationMessage,\n}) => {\n const { t } = useTranslation();\n\n const formikProps = {\n initialValues: INITIAL_VALUES,\n validationSchema: deletionValidationSchema(confirmationText),\n onSubmit,\n };\n\n const deleteInputLabel = deleteConfirmationMessage || (\n <Trans\n components={{ strong: <strong /> }}\n i18nKey=\"neetoMolecules.confirmationModal.deleteConfirmationMessage\"\n values={{ value: confirmationText }}\n />\n );\n\n return (\n <Dialog\n {...{ isOpen, onClose }}\n aria-describedby={undefined}\n data-testid=\"confirmation-modal\"\n >\n <Dialog.Header>\n <Dialog.Title data-testid=\"confirmation-modal-title\">\n {title}\n </Dialog.Title>\n </Dialog.Header>\n <Form {...{ formikProps }} className=\"flex flex-col gap-5\">\n {({ values }) => (\n <>\n <Dialog.Body className=\"flex flex-col gap-y-4\">\n <Typography as=\"div\" variant=\"body2\">\n {description}\n </Typography>\n <Input\n autoFocus\n data-testid=\"confirmation-modal-input\"\n label={deleteInputLabel}\n labelProps={{ className: \"block w-full\" }}\n name=\"confirmationText\"\n type=\"text\"\n />\n </Dialog.Body>\n <Dialog.Footer>\n <ActionBlock\n position=\"right\"\n cancelButtonProps={{\n label: t(\"neetoMolecules.common.actions.cancel\"),\n variant: \"ghost\",\n onClick: onClose,\n disabled: false,\n type: \"button\",\n }}\n submitButtonProps={{\n \"data-testid\": \"delete-continue-button\",\n label: buttonLabel,\n loading: isSubmitting,\n variant: \"destructive\",\n disabled:\n isSubmitting ||\n confirmationText !== values.confirmationText,\n }}\n />\n </Dialog.Footer>\n </>\n )}\n </Form>\n </Dialog>\n );\n};\n\nConfirmationModal.propTypes = {\n /**\n * Label of the action button in the Modal\n */\n buttonLabel: PropTypes.string,\n /**\n * Text that is expected to be entered by the user\n */\n confirmationText: PropTypes.string,\n /**\n * Modal description\n */\n description: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n PropTypes.string,\n ]),\n /**\n * To be passed to loading prop of the action button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To specify whether the modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * Title of the modal\n */\n title: PropTypes.string,\n /**\n * Handler function that is invoked when the close button is clicked\n */\n onClose: PropTypes.func,\n /**\n * Handler function that is invoked when the action button is clicked\n */\n onSubmit: PropTypes.func,\n /**\n * Message that will be shown as the label of the confirmation input field.\n */\n deleteConfirmationMessage: PropTypes.string,\n};\n\nexport default ConfirmationModal;\n"],"names":["INITIAL_VALUES","confirmationText","deletionValidationSchema","yup","object","string","required","oneOf","ConfirmationModal","_ref","buttonLabel","_ref$description","description","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$title","title","onClose","onSubmit","deleteConfirmationMessage","_useTranslation","useTranslation","t","formikProps","initialValues","validationSchema","deleteInputLabel","_jsx","Trans","components","strong","i18nKey","values","value","_jsxs","Dialog","undefined","children","Header","Title","Form","className","_ref2","_Fragment","Body","Typography","as","variant","Input","autoFocus","label","labelProps","name","type","Footer","ActionBlock","position","cancelButtonProps","onClick","disabled","submitButtonProps","loading"],"mappings":";;;;;;AAAO,IAAMA,cAAc,GAAG;AAAEC,EAAAA,gBAAgB,EAAE;AAAG,CAAC;;ACE/C,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGD,gBAAgB,EAAA;EAAA,OACtDE,GAAG,CAACC,MAAM,CAAC;AACTH,IAAAA,gBAAgB,EAAEE,GAAG,CAACE,MAAM,EAAE,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAACN,gBAAgB,CAAC,EAAE,EAAE;AAC1E,GAAC,CAAC;AAAA,CAAA;;ACGJ,IAAMO,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAUjB;AAAA,EAAA,IATJC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXT,gBAAgB,GAAAQ,IAAA,CAAhBR,gBAAgB;IAAAU,gBAAA,GAAAF,IAAA,CAChBG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,gBAAA;IAAAE,WAAA,GAAAJ,IAAA,CAChBK,MAAM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;eACN;AACFO,cAAAA,iBAAiB,EAAE;AACjB,gBAAA,aAAa,EAAE,wBAAwB;AACvCV,gBAAAA,KAAK,EAAE1C,WAAW;AAClBqD,gBAAAA,OAAO,EAAE/C,YAAY;AACrBiC,gBAAAA,OAAO,EAAE,aAAa;AACtBY,gBAAAA,QAAQ,EACN7C,YAAY,IACZf,gBAAgB,KAAKiC,MAAM,CAACjC;AAChC;aACD;AAAC,WACW,CAAC;AAAA,SAChB,CAAC;AAAA,MAAA;AACJ,KACG,CAAC;AAAA,GACD,CAAC;AAEb;;;;"}
@@ -0,0 +1,29 @@
1
+ import { Typography } from '@bigbinary/neeto-atoms';
2
+ import classnames from 'classnames';
3
+ import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
4
+ import { P as PropTypes } from '../index-DAYCJu79.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+ import '../_commonjsHelpers-BFTU3MAI.js';
7
+
8
+ var MobilePreviewHeader = withT(function (_ref) {
9
+ var t = _ref.t,
10
+ _ref$className = _ref.className,
11
+ className = _ref$className === void 0 ? "" : _ref$className,
12
+ _ref$message = _ref.message,
13
+ message = _ref$message === void 0 ? "" : _ref$message;
14
+ return /*#__PURE__*/jsx("div", {
15
+ className: classnames("bg-muted px-6 py-5", className),
16
+ "data-testid": "mobile-preview-header",
17
+ children: /*#__PURE__*/jsx(Typography, {
18
+ variant: "body2",
19
+ children: message || t("neetoMolecules.mobilePreview.message")
20
+ })
21
+ });
22
+ });
23
+ MobilePreviewHeader.propTypes = {
24
+ className: PropTypes.string,
25
+ message: PropTypes.node
26
+ };
27
+
28
+ export { MobilePreviewHeader as default };
29
+ //# sourceMappingURL=MobilePreviewHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobilePreviewHeader.js","sources":["../../src/v2/components/MobilePreviewHeader/index.jsx"],"sourcesContent":["import { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { withT } from \"neetocommons/react-utils\";\nimport PropTypes from \"prop-types\";\n\nconst MobilePreviewHeader = withT(({ t, className = \"\", message = \"\" }) => (\n <div\n className={classnames(\"bg-muted px-6 py-5\", className)}\n data-testid=\"mobile-preview-header\"\n >\n <Typography variant=\"body2\">\n {message || t(\"neetoMolecules.mobilePreview.message\")}\n </Typography>\n </div>\n));\n\nMobilePreviewHeader.propTypes = {\n className: PropTypes.string,\n message: PropTypes.node,\n};\n\nexport default MobilePreviewHeader;\n"],"names":["MobilePreviewHeader","withT","_ref","t","_ref$className","className","_ref$message","message","_jsx","classnames","children","Typography","variant","propTypes","PropTypes","string","node"],"mappings":";;;;;;;AAKA,IAAMA,mBAAmB,GAAGC,KAAK,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,cAAA,GAAAF,IAAA,CAAEG,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,YAAA;AAAA,EAAA,oBAClEE,GAAA,CAAA,KAAA,EAAA;AACEH,IAAAA,SAAS,EAAEI,UAAU,CAAC,oBAAoB,EAAEJ,SAAS,CAAE;AACvD,IAAA,aAAA,EAAY,uBAAuB;IAAAK,QAAA,eAEnCF,GAAA,CAACG,UAAU,EAAA;AAACC,MAAAA,OAAO,EAAC,OAAO;AAAAF,MAAAA,QAAA,EACxBH,OAAO,IAAIJ,CAAC,CAAC,sCAAsC;KAC1C;AAAC,GACV,CAAC;AAAA,CACP;AAEDH,mBAAmB,CAACa,SAAS,GAAG;EAC9BR,SAAS,EAAES,SAAS,CAACC,MAAM;EAC3BR,OAAO,EAAEO,SAAS,CAACE;AACrB,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "5.1.13",
3
+ "version": "5.1.15",
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>",
@@ -67,7 +67,7 @@
67
67
  "@bigbinary/neeto-hotkeys": "1.0.9",
68
68
  "@bigbinary/neeto-icons": "1.20.89",
69
69
  "@bigbinary/neeto-image-uploader-frontend": "4.0.6",
70
- "@bigbinary/neeto-team-members-frontend": "5.0.50",
70
+ "@bigbinary/neeto-team-members-frontend": "5.0.51",
71
71
  "@bigbinary/neeto-time-zones": "0.8.25",
72
72
  "@bigbinary/neetoui": "8.8.1",
73
73
  "@dnd-kit/core": "^6.3.1",
@@ -243,7 +243,7 @@
243
243
  "@bigbinary/neeto-hotkeys": "1.0.9",
244
244
  "@bigbinary/neeto-icons": "1.20.89",
245
245
  "@bigbinary/neeto-image-uploader-frontend": "4.0.6",
246
- "@bigbinary/neeto-team-members-frontend": "5.0.50",
246
+ "@bigbinary/neeto-team-members-frontend": "5.0.51",
247
247
  "@bigbinary/neeto-time-zones": "0.8.25",
248
248
  "@bigbinary/neetoui": "8.8.1",
249
249
  "@dnd-kit/core": "^6.2.0",