@tap-payments/os-micro-frontend-shared 0.1.241-test.2 → 0.1.241-test.3

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.
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps } from '@mui/material/Box';
3
+ interface CurrencyCountryFlagProps extends BoxProps {
4
+ code?: string;
5
+ }
6
+ declare function CurrencyCountryFlag({ code, ...props }: CurrencyCountryFlagProps): import("react/jsx-runtime").JSX.Element;
7
+ declare const _default: import("react").MemoExoticComponent<typeof CurrencyCountryFlag>;
8
+ export default _default;
@@ -0,0 +1,22 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { memo } from 'react';
14
+ import Box from '@mui/material/Box';
15
+ import { defaultCountryIcon, getCurrenciesIcon } from '../../constants/index.js';
16
+ function CurrencyCountryFlag(_a) {
17
+ var { code = '' } = _a, props = __rest(_a, ["code"]);
18
+ return (_jsx(Box, Object.assign({}, props, { component: "img", src: getCurrenciesIcon(code) || defaultCountryIcon, alt: code, loading: "lazy", onError: (e) => {
19
+ e.currentTarget.src = defaultCountryIcon;
20
+ } })));
21
+ }
22
+ export default memo(CurrencyCountryFlag);
@@ -0,0 +1,2 @@
1
+ import CurrencyCountryFlag from './CurrencyCountryFlag';
2
+ export default CurrencyCountryFlag;
@@ -0,0 +1,2 @@
1
+ import CurrencyCountryFlag from './CurrencyCountryFlag';
2
+ export default CurrencyCountryFlag;
@@ -122,3 +122,4 @@ export * from './ListLayout';
122
122
  export { default as MFWidgetLoader } from './MFWidgetLoader';
123
123
  export { default as BetaBanner } from './BetaBanner';
124
124
  export * from './Autocomplete';
125
+ export { default as CurrencyCountryFlag } from './CurrencyCountryFlag';
@@ -122,3 +122,4 @@ export * from './ListLayout';
122
122
  export { default as MFWidgetLoader } from './MFWidgetLoader';
123
123
  export { default as BetaBanner } from './BetaBanner';
124
124
  export * from './Autocomplete';
125
+ export { default as CurrencyCountryFlag } from './CurrencyCountryFlag';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.241-test.2",
5
- "testVersion": 2,
4
+ "version": "0.1.241-test.3",
5
+ "testVersion": 3,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",