@bigbinary/neeto-molecules 1.9.4 → 1.10.0
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/Currency.js +937 -0
- package/dist/Currency.js.map +1 -0
- package/dist/HelpPopover.js +4 -3
- package/dist/HelpPopover.js.map +1 -1
- package/dist/cjs/Currency.js +943 -0
- package/dist/cjs/Currency.js.map +1 -0
- package/dist/cjs/HelpPopover.js +4 -3
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +1 -0
- package/types/Currency.d.ts +35 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../src/components/Currency/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","import React, { useMemo } from \"react\";\n\nimport { isPresent, isNotEmpty } from \"neetocist\";\nimport { Select } from \"neetoui\";\nimport { Select as FormSelect } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport currencyData from \"./currencyData.json\";\n\nconst Currency = ({\n label,\n name = \"currency\",\n standalone = false,\n allowedCurrencies,\n ...otherSelectProps\n}) => {\n const { t } = useTranslation();\n\n const data = useMemo(() => {\n if (isPresent(allowedCurrencies) && isNotEmpty(allowedCurrencies)) {\n return currencyData.filter(item =>\n allowedCurrencies.includes(item.value)\n );\n }\n\n return currencyData;\n }, [allowedCurrencies]);\n\n const Component = standalone ? Select : FormSelect;\n\n return (\n <Component\n {...{ name }}\n label={label || t(\"neetoMolecules.common.currency\")}\n options={data}\n {...otherSelectProps}\n />\n );\n};\n\nCurrency.propTypes = {\n /**\n * Label for the currency input.\n */\n label: PropTypes.string,\n /**\n * Name for the currency input.\n */\n name: PropTypes.string,\n /**\n * To specify whether Currency can be used outside of formik.\n */\n standalone: PropTypes.bool,\n /**\n * To specify only a selected list of currencies to be used.\n */\n allowedCurrencies: PropTypes.arrayOf(PropTypes.string),\n};\n\nexport default Currency;\n"],"names":["objectWithoutPropertiesLoose","Currency","_ref","label","_ref$name","name","_ref$standalone","standalone","allowedCurrencies","otherSelectProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","data","useMemo","isPresent","isNotEmpty","currencyData","filter","item","includes","value","Component","Select","FormSelect","React","createElement","_extends","options"],"mappings":";;;;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,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AAAC,IAAI,EAAA;AAAA,QAAA,OAC7Bb,iBAAiB,CAACc,QAAQ,CAACD,IAAI,CAACE,KAAK,CAAC,CAAA;AAAA,OACxC,CAAC,CAAA;AACH,KAAA;AAEA,IAAA,OAAOJ,YAAY,CAAA;AACrB,GAAC,EAAE,CAACX,iBAAiB,CAAC,CAAC,CAAA;AAEvB,EAAA,IAAMgB,SAAS,GAAGjB,UAAU,GAAGkB,cAAM,GAAGC,aAAU,CAAA;AAElD,EAAA,oBACEC,yBAAA,CAAAC,aAAA,CAACJ,SAAS,EAAAK,QAAA,CAAA;AACFxB,IAAAA,IAAI,EAAJA,IAAI;AACVF,IAAAA,KAAK,EAAEA,KAAK,IAAIW,CAAC,CAAC,gCAAgC,CAAE;AACpDgB,IAAAA,OAAO,EAAEf,IAAAA;GACLN,EAAAA,gBAAgB,CACrB,CAAC,CAAA;AAEN;;;;"}
|
package/dist/cjs/HelpPopover.js
CHANGED
|
@@ -125,11 +125,12 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
125
125
|
ref: helpIconRef,
|
|
126
126
|
style: "text",
|
|
127
127
|
className: classNames__default["default"]("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
|
|
128
|
-
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends({
|
|
129
|
-
interactive: true,
|
|
128
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends({
|
|
130
129
|
appendTo: function appendTo() {
|
|
131
130
|
return document.body;
|
|
132
|
-
}
|
|
131
|
+
}
|
|
132
|
+
}, popoverProps, {
|
|
133
|
+
interactive: true,
|
|
133
134
|
arrow: isCompact ? undefined : true,
|
|
134
135
|
className: classNames__default["default"](_defineProperty({}, "neeto-ui-popover", !isCompact)),
|
|
135
136
|
reference: helpIconRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPopover.js","sources":["../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export const SIZE = { default: 16, large: 20 };\n","import React, { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n ...otherProps\n}) => {\n const helpIconRef = useRef();\n\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n return (\n <>\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={() => <Help size={SIZE[size]} />}\n ref={helpIconRef}\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 <Tooltip\n {...popoverProps}\n interactive\n appendTo={() => document.body}\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n reference={helpIconRef}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\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 label=\"View help article\"\n size=\"small\"\n {...helpLinkProps}\n data-cy=\"help-popover-link-button\"\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n />\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\nexport default HelpPopover;\n"],"names":["toPrimitive","toPropertyKey","objectWithoutPropertiesLoose","SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","otherProps","_objectWithoutProperties","_excluded","helpIconRef","useRef","isCompact","isNotPresent","React","createElement","Fragment","Button","_extends","icon","Help","ref","style","classNames","Tooltip","interactive","appendTo","document","body","arrow","undefined","_defineProperty","reference","role","theme","content","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;;;AAAe,SAAS,OAAO,CAAC,CAAC,EAAE;AACnC,EAAE,yBAAyB,CAAC;AAC5B;AACA,EAAE,OAAO,OAAO,GAAG,UAAU,IAAI,OAAO,MAAM,IAAI,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,GAAG,UAAU,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e;AACzBgC,MAAAA,KAAK,EAAC,mBAAmB;AACzBpC,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAA,EACRE,aAAa,EAAA;AACjB,MAAA,SAAA,EAAQ,0BAA0B;AAClC,MAAA,aAAA,EAAY,0BAA0B;AACtCkB,MAAAA,KAAK,EAAC,MAAM;AACZiB,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,CAChB,CAEA,CAAA;AACN,GAAA,CACF,CACD,CAAC,CAAA;AAEP;;;;"}
|
|
1
|
+
{"version":3,"file":"HelpPopover.js","sources":["../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export const SIZE = { default: 16, large: 20 };\n","import React, { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n ...otherProps\n}) => {\n const helpIconRef = useRef();\n\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n return (\n <>\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={() => <Help size={SIZE[size]} />}\n ref={helpIconRef}\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 <Tooltip\n appendTo={() => document.body}\n {...popoverProps}\n interactive\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n reference={helpIconRef}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\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 label=\"View help article\"\n size=\"small\"\n {...helpLinkProps}\n data-cy=\"help-popover-link-button\"\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n />\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\nexport default HelpPopover;\n"],"names":["toPrimitive","toPropertyKey","objectWithoutPropertiesLoose","SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","otherProps","_objectWithoutProperties","_excluded","helpIconRef","useRef","isCompact","isNotPresent","React","createElement","Fragment","Button","_extends","icon","Help","ref","style","classNames","Tooltip","appendTo","document","body","interactive","arrow","undefined","_defineProperty","reference","role","theme","content","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;;;AAAe,SAAS,OAAO,CAAC,CAAC,EAAE;AACnC,EAAE,yBAAyB,CAAC;AAC5B;AACA,EAAE,OAAO,OAAO,GAAG,UAAU,IAAI,OAAO,MAAM,IAAI,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE;AACpG,IAAI,OAAO,OAAO,CAAC,CAAC;AACpB,GAAG,GAAG,UAAU,CAAC,EAAE;AACnB,IAAI,OAAO,CAAC,IAAI,UAAU,IAAI,OAAO,MAAM,IAAI,CAAC,CAAC,WAAW,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AACxH,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAChB;;ACPe,SAAS,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;AAClD,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,OAAO,KAAK,CAAC;AAClE,EAAE,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACvC,EAAE,IAAI,IAAI,KAAK,SAAS,EAAE;AAC1B,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;AAClD,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,OAAO,GAAG,CAAC;AAC9C,IAAI,MAAM,IAAI,SAAS,CAAC,8CAA8C,CAAC,CAAC;AACxE,GAAG;AACH,EAAE,OAAO,CAAC,I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AAoB,KAAA,EAE/BI,KACI,CACR,EACA,OAAOG,WAAW,KAAK,QAAQ,IAAI,CAACS,SAAS,gBAC5CE,yBAAA,CAAAC,aAAA,CAACqB,kBAAU,EAAA;AACT,MAAA,SAAA,EAAQ,0BAA0B;AAClC,MAAA,aAAA,EAAY,0BAA0B;AACtCC,MAAAA,UAAU,EAAC,QAAQ;AACnBf,MAAAA,KAAK,EAAC,OAAA;AAAO,KAAA,EAEZnB,WACS,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZU,yBAAA,CAAAC,aAAA,CAACE,cAAM,EAAAC,QAAA,CAAA;AACLZ,MAAAA,SAAS,EAAC,eAAe;AACzBgC,MAAAA,KAAK,EAAC,mBAAmB;AACzBpC,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAA,EACRE,aAAa,EAAA;AACjB,MAAA,SAAA,EAAQ,0BAA0B;AAClC,MAAA,aAAA,EAAY,0BAA0B;AACtCkB,MAAAA,KAAK,EAAC,MAAM;AACZiB,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,CAChB,CAEA,CAAA;AACN,GAAA,CACF,CACD,CAAC,CAAA;AAEP;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
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>",
|
package/src/translations/en.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SelectProps } from "@bigbinary/neetoui";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Used in neeto products to select currencies.
|
|
6
|
+
*
|
|
7
|
+
* 
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* import * as yup from "yup";
|
|
12
|
+
* import Currency from "@bigbinary/neeto-molecules/Currency";
|
|
13
|
+
*
|
|
14
|
+
* const CurrencyContainer = () => {
|
|
15
|
+
* return (
|
|
16
|
+
* <Form
|
|
17
|
+
* formikProps={{
|
|
18
|
+
* initialValues: { currency: null },
|
|
19
|
+
* validationSchema: yup.object().shape({
|
|
20
|
+
* currency: yup.object().required(),
|
|
21
|
+
* }),
|
|
22
|
+
* }}
|
|
23
|
+
* >
|
|
24
|
+
* <Currency />
|
|
25
|
+
* <Button className="mt-5" label="Submit" type="submit" />
|
|
26
|
+
* </Form>
|
|
27
|
+
* );
|
|
28
|
+
* };
|
|
29
|
+
* @endexample
|
|
30
|
+
*/
|
|
31
|
+
const Currency: React.FC<{
|
|
32
|
+
standalone?: boolean;
|
|
33
|
+
allowedCurrencies?: string[];
|
|
34
|
+
}> & SelectProps;
|
|
35
|
+
export default Currency;
|