@fixefy/fixefy-ui-components 0.3.109 → 0.3.111

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,12 @@
1
+ import React from 'react';
2
+ export type FairValueBadgePropsType = {
3
+ value?: string | number;
4
+ showValue?: boolean;
5
+ showLabel?: boolean;
6
+ labelPosition?: 'top' | 'bottom';
7
+ align?: 'flex-start' | 'center' | 'flex-end';
8
+ assetUrl?: string;
9
+ locale?: string;
10
+ currency?: string;
11
+ };
12
+ export declare const FxFairValueBadge: ({ value, showValue, showLabel, labelPosition, align, assetUrl, locale, currency }: FairValueBadgePropsType) => React.JSX.Element;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxFairValueBadge", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxFairValueBadge;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _fair_value_badgestyles = require("./styles/fair_value_badge.styles");
14
+ const _FxIcon = require("../FxIcon");
15
+ function _interop_require_default(obj) {
16
+ return obj && obj.__esModule ? obj : {
17
+ default: obj
18
+ };
19
+ }
20
+ const FxFairValueBadge = ({ value, showValue = true, showLabel = true, labelPosition = 'bottom', align = 'center', assetUrl, locale = 'en-US', currency = 'USD' })=>{
21
+ const displayValue = typeof value === 'number' ? value.toLocaleString(locale, {
22
+ style: 'currency',
23
+ currency,
24
+ minimumFractionDigits: 2,
25
+ maximumFractionDigits: 2
26
+ }) : value;
27
+ const badge = showLabel && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_fair_value_badgestyles.FairValueBadgeStyled, {
28
+ children: [
29
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
30
+ icon: "fixefy_icon_small_white.svg",
31
+ width: 12,
32
+ height: 12,
33
+ assetUrl: assetUrl
34
+ }),
35
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_fair_value_badgestyles.FairValueLabel, {
36
+ children: "Fair Value"
37
+ })
38
+ ]
39
+ });
40
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_fair_value_badgestyles.FairValueContainer, {
41
+ align: align,
42
+ children: [
43
+ labelPosition === 'top' && badge,
44
+ showValue && /*#__PURE__*/ (0, _jsxruntime.jsx)(_fair_value_badgestyles.FairValueAmount, {
45
+ children: displayValue
46
+ }),
47
+ labelPosition === 'bottom' && badge
48
+ ]
49
+ });
50
+ };
@@ -0,0 +1 @@
1
+ export { FxFairValueBadge, FairValueBadgePropsType } from './FxFairValueBadge';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ FairValueBadgePropsType: function() {
13
+ return _FxFairValueBadge.FairValueBadgePropsType;
14
+ },
15
+ FxFairValueBadge: function() {
16
+ return _FxFairValueBadge.FxFairValueBadge;
17
+ }
18
+ });
19
+ const _FxFairValueBadge = require("./FxFairValueBadge");
@@ -0,0 +1,4 @@
1
+ export declare const FairValueContainer: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
2
+ export declare const FairValueAmount: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
3
+ export declare const FairValueBadgeStyled: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
4
+ export declare const FairValueLabel: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ FairValueAmount: function() {
13
+ return FairValueAmount;
14
+ },
15
+ FairValueBadgeStyled: function() {
16
+ return FairValueBadgeStyled;
17
+ },
18
+ FairValueContainer: function() {
19
+ return FairValueContainer;
20
+ },
21
+ FairValueLabel: function() {
22
+ return FairValueLabel;
23
+ }
24
+ });
25
+ const _styles = require("@mui/material/styles");
26
+ const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
27
+ const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
28
+ function _interop_require_default(obj) {
29
+ return obj && obj.__esModule ? obj : {
30
+ default: obj
31
+ };
32
+ }
33
+ const FairValueContainer = (0, _styles.styled)(_Box.default)(({ align = 'center' })=>({
34
+ display: 'flex',
35
+ flexDirection: 'column',
36
+ alignItems: align,
37
+ justifyContent: 'center',
38
+ gap: '1px'
39
+ }));
40
+ const FairValueAmount = (0, _styles.styled)(_Typography.default)(({ theme })=>({
41
+ fontFamily: '"Open Sans", sans-serif',
42
+ fontWeight: 700,
43
+ fontSize: 14,
44
+ lineHeight: '20px',
45
+ letterSpacing: '0.1px',
46
+ color: theme.palette.primary.main,
47
+ textAlign: 'center',
48
+ width: '100%'
49
+ }));
50
+ const FairValueBadgeStyled = (0, _styles.styled)(_Box.default)({
51
+ display: 'flex',
52
+ alignItems: 'center',
53
+ gap: 4,
54
+ padding: '1px 6px',
55
+ borderRadius: 10,
56
+ background: 'linear-gradient(90deg, #3c636c 0%, #72b1c1 100%)'
57
+ });
58
+ const FairValueLabel = (0, _styles.styled)(_Typography.default)(({ theme })=>({
59
+ fontFamily: '"Open Sans", sans-serif',
60
+ fontWeight: 600,
61
+ fontSize: 10,
62
+ lineHeight: '16px',
63
+ letterSpacing: '0.5px',
64
+ textTransform: 'uppercase',
65
+ color: theme.palette.common.white,
66
+ whiteSpace: 'nowrap'
67
+ }));
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { FxAvatar, AvatarPropsType, BackgroundColorsType } from './FxAvatar';
5
5
  export { FxButton, ButtonPropsType } from './FxButton';
6
6
  export { FxChip, ChipPropsType } from './FxChip';
7
7
  export { FxDatesProgress } from './FxDatesProgress';
8
+ export { FxFairValueBadge, FairValueBadgePropsType } from './FxFairValueBadge';
8
9
  export { FxGridEmptyState } from './FxGridEmptyState';
9
10
  export { FxGridError } from './FxGridError';
10
11
  export { FxGeneralModal } from './FxGeneralModal';
package/dist/index.js CHANGED
@@ -42,6 +42,9 @@ _export(exports, {
42
42
  DataWrapper: function() {
43
43
  return _FxStyledComponents.DataWrapper;
44
44
  },
45
+ FairValueBadgePropsType: function() {
46
+ return _FxFairValueBadge.FairValueBadgePropsType;
47
+ },
45
48
  FxActionsTray: function() {
46
49
  return _FxActionsTray.FxActionsTray;
47
50
  },
@@ -69,6 +72,9 @@ _export(exports, {
69
72
  FxDatesProgress: function() {
70
73
  return _FxDatesProgress.FxDatesProgress;
71
74
  },
75
+ FxFairValueBadge: function() {
76
+ return _FxFairValueBadge.FxFairValueBadge;
77
+ },
72
78
  FxGeneralModal: function() {
73
79
  return _FxGeneralModal.FxGeneralModal;
74
80
  },
@@ -245,6 +251,7 @@ const _FxAvatar = require("./FxAvatar");
245
251
  const _FxButton = require("./FxButton");
246
252
  const _FxChip = require("./FxChip");
247
253
  const _FxDatesProgress = require("./FxDatesProgress");
254
+ const _FxFairValueBadge = require("./FxFairValueBadge");
248
255
  const _FxGridEmptyState = require("./FxGridEmptyState");
249
256
  const _FxGridError = require("./FxGridError");
250
257
  const _FxGeneralModal = require("./FxGeneralModal");
package/package.json CHANGED
@@ -73,5 +73,5 @@
73
73
  "require": "./dist/index.js"
74
74
  }
75
75
  },
76
- "version": "0.3.109"
76
+ "version": "0.3.111"
77
77
  }