@bigbinary/neeto-molecules 4.0.138 → 4.0.139

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.
@@ -20,7 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
20
  var HelpPopover = function HelpPopover(_ref) {
21
21
  var title = _ref.title,
22
22
  _ref$size = _ref.size,
23
- size = _ref$size === void 0 ? "default" : _ref$size,
23
+ size = _ref$size === void 0 ? "large" : _ref$size,
24
24
  description = _ref.description,
25
25
  helpLinkProps = _ref.helpLinkProps,
26
26
  popoverProps = _ref.popoverProps,
@@ -1 +1 @@
1
- {"version":3,"file":"HelpPopover.js","sources":["../src/components/HelpPopover/constants.js","../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"currentColor\",\n icon: IconComponent = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const popoverRef = useRef();\n\n return (\n <>\n <Button\n {...otherProps}\n data-testid=\"help-popover-button\"\n icon={() => <IconComponent color={iconColor} size={SIZE[size]} />}\n ref={popoverRef}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n <Popover\n appendTo={() => document.body}\n reference={popoverRef}\n {...popoverProps}\n >\n <div\n className=\"flex flex-col\"\n onClick={event => event.stopPropagation()}\n >\n {title && (\n <Popover.Title data-testid=\"help-popover-title\">\n {title}\n </Popover.Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-testid=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","IconComponent","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","popoverRef","useRef","_jsxs","_Fragment","children","_jsx","Button","_objectSpread","color","ref","style","classNames","Popover","appendTo","document","body","reference","onClick","event","stopPropagation","Title","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE;AAAG,CAAC;;;;;ACU9C,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAUX;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,SAAA,GAAAF,IAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI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AAA;QAAA,OAAQC,QAAQ,CAACC,IAAI;MAAA,CAAC;AAC9BC,MAAAA,SAAS,EAAEhB;AAAW,KAAA,EAClBd,YAAY,CAAA,EAAA,EAAA,EAAA;AAAAkB,MAAAA,QAAA,eAEhBF,IAAA,CAAA,KAAA,EAAA;AACEf,QAAAA,SAAS,EAAC,eAAe;AACzB8B,QAAAA,OAAO,EAAE,SAATA,OAAOA,CAAEC,KAAK,EAAA;AAAA,UAAA,OAAIA,KAAK,CAACC,eAAe,EAAE;QAAA,CAAC;AAAAf,QAAAA,QAAA,GAEzCvB,KAAK,iBACJwB,GAAA,CAACO,OAAO,CAACQ,KAAK,EAAA;AAAC,UAAA,aAAA,EAAY,oBAAoB;AAAAhB,UAAAA,QAAA,EAC5CvB;SACY,CAChB,EACA,OAAOG,WAAW,KAAK,QAAQ,gBAC9BqB,GAAA,CAACgB,UAAU,EAAA;AACT,UAAA,aAAA,EAAY,0BAA0B;AACtCC,UAAAA,UAAU,EAAC,QAAQ;AACnBZ,UAAAA,KAAK,EAAC,OAAO;AAAAN,UAAAA,QAAA,EAEZpB;AAAW,SACF,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZoB,GAAA,CAACC,MAAM,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACLpB,UAAAA,SAAS,EAAC,eAAe;AACzB,UAAA,aAAA,EAAY,0BAA0B;AACtCoC,UAAAA,KAAK,EAAExB,CAAC,CAAC,uCAAuC,CAAE;AAClDhB,UAAAA,IAAI,EAAC;AAAO,SAAA,EACRE,aAAa,CAAA,EAAA,EAAA,EAAA;AACjByB,UAAAA,KAAK,EAAC,MAAM;AACZc,UAAAA,MAAM,EAAC;AAAQ,SAAA,CAChB,CACF;OACE;AAAC,KAAA,CACC,CAAC;AAAA,GACV,CAAC;AAEP;;;;"}
1
+ {"version":3,"file":"HelpPopover.js","sources":["../src/components/HelpPopover/constants.js","../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst HelpPopover = ({\n title,\n size = \"large\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"currentColor\",\n icon: IconComponent = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const popoverRef = useRef();\n\n return (\n <>\n <Button\n {...otherProps}\n data-testid=\"help-popover-button\"\n icon={() => <IconComponent color={iconColor} size={SIZE[size]} />}\n ref={popoverRef}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n <Popover\n appendTo={() => document.body}\n reference={popoverRef}\n {...popoverProps}\n >\n <div\n className=\"flex flex-col\"\n onClick={event => event.stopPropagation()}\n >\n {title && (\n <Popover.Title data-testid=\"help-popover-title\">\n {title}\n </Popover.Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-testid=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","IconComponent","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","popoverRef","useRef","_jsxs","_Fragment","children","_jsx","Button","_objectSpread","color","ref","style","classNames","Popover","appendTo","document","body","reference","onClick","event","stopPropagation","Title","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE;AAAG,CAAC;;;;;ACU9C,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAUX;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,SAAA,GAAAF,IAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,MAAA,GAAG,OAAO,GAAAA,SAAA;IACdE,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAAC,cAAA,GAAAR,IAAA,CACTS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,cAAc,GAAAA,cAAA;IAAAE,SAAA,GAAAV,IAAA,CAC1BW,IAAI;AAAEC,IAAAA,aAAa,GAAAF,SAAA,KAAA,MAAA,GAAGG,IAAI,GAAAH,SAAA;AACvBI,IAAAA,UAAU,GAAAC,wBAAA,CAAAf,IAAA,EAAAgB,SAAA,CAAA;AAEb,EAAA,IAAAC,eAAA,GA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qB,GAAA,CAACgB,UAAU,EAAA;AACT,UAAA,aAAA,EAAY,0BAA0B;AACtCC,UAAAA,UAAU,EAAC,QAAQ;AACnBZ,UAAAA,KAAK,EAAC,OAAO;AAAAN,UAAAA,QAAA,EAEZpB;AAAW,SACF,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZoB,GAAA,CAACC,MAAM,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACLpB,UAAAA,SAAS,EAAC,eAAe;AACzB,UAAA,aAAA,EAAY,0BAA0B;AACtCoC,UAAAA,KAAK,EAAExB,CAAC,CAAC,uCAAuC,CAAE;AAClDhB,UAAAA,IAAI,EAAC;AAAO,SAAA,EACRE,aAAa,CAAA,EAAA,EAAA,EAAA;AACjByB,UAAAA,KAAK,EAAC,MAAM;AACZc,UAAAA,MAAM,EAAC;AAAQ,SAAA,CAChB,CACF;OACE;AAAC,KAAA,CACC,CAAC;AAAA,GACV,CAAC;AAEP;;;;"}
@@ -22,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
22
  var HelpPopover = function HelpPopover(_ref) {
23
23
  var title = _ref.title,
24
24
  _ref$size = _ref.size,
25
- size = _ref$size === void 0 ? "default" : _ref$size,
25
+ size = _ref$size === void 0 ? "large" : _ref$size,
26
26
  description = _ref.description,
27
27
  helpLinkProps = _ref.helpLinkProps,
28
28
  popoverProps = _ref.popoverProps,
@@ -1 +1 @@
1
- {"version":3,"file":"HelpPopover.js","sources":["../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"currentColor\",\n icon: IconComponent = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const popoverRef = useRef();\n\n return (\n <>\n <Button\n {...otherProps}\n data-testid=\"help-popover-button\"\n icon={() => <IconComponent color={iconColor} size={SIZE[size]} />}\n ref={popoverRef}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n <Popover\n appendTo={() => document.body}\n reference={popoverRef}\n {...popoverProps}\n >\n <div\n className=\"flex flex-col\"\n onClick={event => event.stopPropagation()}\n >\n {title && (\n <Popover.Title data-testid=\"help-popover-title\">\n {title}\n </Popover.Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-testid=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","IconComponent","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","popoverRef","useRef","_jsxs","_Fragment","children","_jsx","Button","_objectSpread","color","ref","style","classNames","Popover","appendTo","document","body","reference","onClick","event","stopPropagation","Title","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE;AAAG,CAAC;;;;;ACU9C,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAUX;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,SAAA,GAAAF,IAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,MAAA,GAAG,SAAS,GAAAA,SAAA;IAChBE,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAAC,cAAA,GAAAR,IAAA,CACTS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,cAAc,GAAAA,cAAA;IAAAE,SAAA,GAAAV,IAAA,CAC1BW,IAAI;AAAEC,IAAAA,aAAa,GAAAF,SAAA,KAAA,MAAA,GAAGG,IAAI,GAAAH,SAAA;AACvBI,IAAAA,UAAU,GAAAC,wBAAA,CAAAf,IAAA,EAAAgB,SAAA,CAAA;AAEb,EAAA,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AAET,EAAA,IAAMC,UAAU,GAAGC,YAAM,EAAE;EAE3B,oBACEC,eAAA,CAAAC,mBAAA,EAAA;IAAAC,QAAA,EAAA,cACEC,cAAA,CAACC,MAAM,EAAAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EACDb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AAC,aAAA,CAAAA,aAAA,CAAA;AACLpB,UAAAA,SAAS,EAAC,eAAe;AACzB,UAAA,aAAA,EAAY,0BAA0B;AACtCoC,UAAAA,KAAK,EAAExB,CAAC,CAAC,uCAAuC,CAAE;AAClDhB,UAAAA,IAAI,EAAC;AAAO,SAAA,EACRE,aAAa,CAAA,EAAA,EAAA,EAAA;AACjByB,UAAAA,KAAK,EAAC,MAAM;AACZc,UAAAA,MAAM,EAAC;AAAQ,SAAA,CAChB,CACF;OACE;AAAC,KAAA,CACC,CAAC;AAAA,GACV,CAAC;AAEP;;;;"}
1
+ {"version":3,"file":"HelpPopover.js","sources":["../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst HelpPopover = ({\n title,\n size = \"large\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"currentColor\",\n icon: IconComponent = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const popoverRef = useRef();\n\n return (\n <>\n <Button\n {...otherProps}\n data-testid=\"help-popover-button\"\n icon={() => <IconComponent color={iconColor} size={SIZE[size]} />}\n ref={popoverRef}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n <Popover\n appendTo={() => document.body}\n reference={popoverRef}\n {...popoverProps}\n >\n <div\n className=\"flex flex-col\"\n onClick={event => event.stopPropagation()}\n >\n {title && (\n <Popover.Title data-testid=\"help-popover-title\">\n {title}\n </Popover.Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-testid=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","IconComponent","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","popoverRef","useRef","_jsxs","_Fragment","children","_jsx","Button","_objectSpread","color","ref","style","classNames","Popover","appendTo","document","body","reference","onClick","event","stopPropagation","Title","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE;AAAG,CAAC;;;;;ACU9C,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAUX;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,SAAA,GAAAF,IAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,MAAA,GAAG,OAAO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;MAAA,CAAC;AAC9BC,MAAAA,SAAS,EAAEhB;AAAW,KAAA,EAClBd,YAAY,CAAA,EAAA,EAAA,EAAA;AAAAkB,MAAAA,QAAA,eAEhBF,eAAA,CAAA,KAAA,EAAA;AACEf,QAAAA,SAAS,EAAC,eAAe;AACzB8B,QAAAA,OAAO,EAAE,SAATA,OAAOA,CAAEC,KAAK,EAAA;AAAA,UAAA,OAAIA,KAAK,CAACC,eAAe,EAAE;QAAA,CAAC;AAAAf,QAAAA,QAAA,GAEzCvB,KAAK,iBACJwB,cAAA,CAACO,OAAO,CAACQ,KAAK,EAAA;AAAC,UAAA,aAAA,EAAY,oBAAoB;AAAAhB,UAAAA,QAAA,EAC5CvB;SACY,CAChB,EACA,OAAOG,WAAW,KAAK,QAAQ,gBAC9BqB,cAAA,CAACgB,UAAU,EAAA;AACT,UAAA,aAAA,EAAY,0BAA0B;AACtCC,UAAAA,UAAU,EAAC,QAAQ;AACnBZ,UAAAA,KAAK,EAAC,OAAO;AAAAN,UAAAA,QAAA,EAEZpB;AAAW,SACF,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZoB,cAAA,CAACC,MAAM,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACLpB,UAAAA,SAAS,EAAC,eAAe;AACzB,UAAA,aAAA,EAAY,0BAA0B;AACtCoC,UAAAA,KAAK,EAAExB,CAAC,CAAC,uCAAuC,CAAE;AAClDhB,UAAAA,IAAI,EAAC;AAAO,SAAA,EACRE,aAAa,CAAA,EAAA,EAAA,EAAA;AACjByB,UAAAA,KAAK,EAAC,MAAM;AACZc,UAAAA,MAAM,EAAC;AAAQ,SAAA,CAChB,CACF;OACE;AAAC,KAAA,CACC,CAAC;AAAA,GACV,CAAC;AAEP;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "4.0.138",
3
+ "version": "4.0.139",
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>",