@activecollab/components 2.0.239 → 2.0.241
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/cjs/components/Dialog/Dialog.js +6 -2
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/Dialog/Styles.js +6 -3
- package/dist/cjs/components/Dialog/Styles.js.map +1 -1
- package/dist/cjs/components/Display/DisplayCurrency.js +14 -5
- package/dist/cjs/components/Display/DisplayCurrency.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.d.ts +1 -0
- package/dist/esm/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +4 -1
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/Styles.d.ts +3 -1
- package/dist/esm/components/Dialog/Styles.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Styles.js +2 -2
- package/dist/esm/components/Dialog/Styles.js.map +1 -1
- package/dist/esm/components/Display/DisplayCurrency.d.ts +1 -0
- package/dist/esm/components/Display/DisplayCurrency.d.ts.map +1 -1
- package/dist/esm/components/Display/DisplayCurrency.js +14 -5
- package/dist/esm/components/Display/DisplayCurrency.js.map +1 -1
- package/dist/index.js +23 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ var _Styles = require("./Styles");
|
|
|
14
14
|
var _Modal = require("../Modal");
|
|
15
15
|
var _Transitions = require("../Transitions");
|
|
16
16
|
var _SlideFromTop = require("../Transitions/SlideFromTop");
|
|
17
|
-
var _excluded = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"]; // import { DialogContext } from "./DialogContext";
|
|
17
|
+
var _excluded = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside", "fullWidth"]; // import { DialogContext } from "./DialogContext";
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -34,6 +34,8 @@ var _Dialog = exports._Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
34
34
|
_ref$animate = _ref.animate,
|
|
35
35
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
36
36
|
onClickOutside = _ref.onClickOutside,
|
|
37
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
38
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
37
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
40
|
var animateDialog = function animateDialog() {
|
|
39
41
|
switch (animate) {
|
|
@@ -41,13 +43,15 @@ var _Dialog = exports._Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
41
43
|
return /*#__PURE__*/_react.default.createElement(_Transitions.Fade, {
|
|
42
44
|
in: open
|
|
43
45
|
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledDialog, {
|
|
46
|
+
$fullWidth: fullWidth,
|
|
44
47
|
className: (0, _classnames.default)("c-dialog", className)
|
|
45
48
|
}, children));
|
|
46
49
|
default:
|
|
47
50
|
return /*#__PURE__*/_react.default.createElement(_SlideFromTop.SlideFromTop, {
|
|
48
51
|
in: open
|
|
49
52
|
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledDialog, {
|
|
50
|
-
className: (0, _classnames.default)("c-dialog", className)
|
|
53
|
+
className: (0, _classnames.default)("c-dialog", className),
|
|
54
|
+
$fullWidth: fullWidth
|
|
51
55
|
}, children));
|
|
52
56
|
}
|
|
53
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_DialogActions","_DialogContent","_DialogContentDivider","_DialogTitle","_Styles","_Modal","_Transitions","_SlideFromTop","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","_Dialog","exports","forwardRef","_ref","ref","children","_ref$open","open","onClose","className","_ref$enableBackground","enableBackgroundClick","_ref$disableCloseOnEs","disableCloseOnEsc","_ref$animate","animate","onClickOutside","rest","animateDialog","createElement","Fade","in","StyledDialog","classnames","SlideFromTop","Modal","disableBackgroundClick","displayName","Dialog","Title","DialogTitle","Content","DialogContent","ContentDivider","DialogContentDivider","Actions","DialogActions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogActions } from \"./DialogActions\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogTitle } from \"./DialogTitle\";\nimport { StyledDialog } from \"./Styles\";\nimport { Modal } from \"../Modal\";\nimport { Fade } from \"../Transitions\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\n\nexport interface DialogProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n animate?: \"fade\" | \"slide\";\n onClickOutside?: (event) => void;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n animate = \"slide\",\n onClickOutside,\n ...rest\n },\n ref\n ) => {\n const animateDialog = () => {\n switch (animate) {\n case \"fade\":\n return (\n <Fade in={open}>\n <StyledDialog
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_DialogActions","_DialogContent","_DialogContentDivider","_DialogTitle","_Styles","_Modal","_Transitions","_SlideFromTop","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","_Dialog","exports","forwardRef","_ref","ref","children","_ref$open","open","onClose","className","_ref$enableBackground","enableBackgroundClick","_ref$disableCloseOnEs","disableCloseOnEsc","_ref$animate","animate","onClickOutside","_ref$fullWidth","fullWidth","rest","animateDialog","createElement","Fade","in","StyledDialog","$fullWidth","classnames","SlideFromTop","Modal","disableBackgroundClick","displayName","Dialog","Title","DialogTitle","Content","DialogContent","ContentDivider","DialogContentDivider","Actions","DialogActions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogActions } from \"./DialogActions\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogTitle } from \"./DialogTitle\";\nimport { StyledDialog } from \"./Styles\";\nimport { Modal } from \"../Modal\";\nimport { Fade } from \"../Transitions\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\n\nexport interface DialogProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n animate?: \"fade\" | \"slide\";\n onClickOutside?: (event) => void;\n fullWidth?: boolean;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n animate = \"slide\",\n onClickOutside,\n fullWidth = false,\n ...rest\n },\n ref\n ) => {\n const animateDialog = () => {\n switch (animate) {\n case \"fade\":\n return (\n <Fade in={open}>\n <StyledDialog\n $fullWidth={fullWidth}\n className={classnames(\"c-dialog\", className)}\n >\n {children}\n </StyledDialog>\n </Fade>\n );\n default:\n return (\n <SlideFromTop in={open}>\n <StyledDialog\n className={classnames(\"c-dialog\", className)}\n $fullWidth={fullWidth}\n >\n {children}\n </StyledDialog>\n </SlideFromTop>\n );\n }\n };\n\n return (\n // <DialogContext.Provider value={{}}>\n\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n onClickOutside={onClickOutside}\n {...rest}\n >\n {animateDialog()}\n </Modal>\n // </DialogContext.Provider>\n );\n }\n);\n\n_Dialog.displayName = \"Dialog\";\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757\nexport const Dialog = Object.assign({}, _Dialog, {\n Title: DialogTitle,\n Content: DialogContent,\n ContentDivider: DialogContentDivider,\n Actions: DialogActions,\n});\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OAAO,EAAE;EAC/CgC,KAAK,EAAEC,wBAAW;EAClBC,OAAO,EAAEC,4BAAa;EACtBC,cAAc,EAAEC,0CAAoB;EACpCC,OAAO,EAAEC;AACX,CAAC,CAAC"}
|
|
@@ -4,15 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledDialogTitle = exports.StyledDialogContentDivider = exports.StyledDialogContent = exports.StyledDialogActions = exports.StyledDialog = void 0;
|
|
7
|
-
var _styledComponents =
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _BoxSizingStyle = require("../BoxSizingStyle");
|
|
9
9
|
var _BreakPoints = require("../BreakPoints");
|
|
10
10
|
var _FontStyle = require("../FontStyle");
|
|
11
|
-
function
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
13
|
var StyledDialog = exports.StyledDialog = _styledComponents.default.div.withConfig({
|
|
13
14
|
displayName: "Styles__StyledDialog",
|
|
14
15
|
componentId: "sc-jwpvgm-0"
|
|
15
|
-
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;", " ", " ", "{width:540px;margin:126px auto 30px auto;}"],
|
|
16
|
+
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;", " ", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], function (props) {
|
|
17
|
+
return props.$fullWidth && (0, _styledComponents.css)(["width:calc(100% - 32px);max-width:640px;margin-left:16px;margin-right:16px;"]);
|
|
18
|
+
}, _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle, _BreakPoints.screen.sm);
|
|
16
19
|
StyledDialog.displayName = "StyledDialog";
|
|
17
20
|
var StyledDialogTitle = exports.StyledDialogTitle = _styledComponents.default.div.withConfig({
|
|
18
21
|
displayName: "Styles__StyledDialogTitle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["_styledComponents","
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireWildcard","require","_BoxSizingStyle","_BreakPoints","_FontStyle","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledDialog","exports","styled","div","withConfig","displayName","componentId","props","$fullWidth","css","FontStyle","BoxSizingStyle","screen","sm","StyledDialogTitle","StyledDialogContent","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledDialog = styled.div<{ $fullWidth?: boolean }>`\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n max-height: calc(100vh - 156px);\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n width: 310px;\n margin: 60px auto 30px auto;\n position: relative;\n\n ${(props) =>\n props.$fullWidth &&\n css`\n width: calc(100% - 32px);\n max-width: 640px;\n margin-left: 16px;\n margin-right: 16px;\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n ${screen.sm} {\n width: 540px;\n margin: 126px auto 30px auto;\n }\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\nexport const StyledDialogContent = styled.div`\n padding: 20px 30px;\n max-height: 580px;\n overflow-y: auto;\n flex: 1 1 auto;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAyC,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAA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AiB,CAACT,WAAW,GAAG,mBAAmB;AAE5C,IAAMU,mBAAmB,GAAAd,OAAA,CAAAc,mBAAA,GAAGb,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,mFAMzCI,oBAAS,EACTC,8BAAc,CACjB;AACDI,mBAAmB,CAACV,WAAW,GAAG,qBAAqB;AAEhD,IAAMW,0BAA0B,GAAAf,OAAA,CAAAe,0BAAA,GAAGd,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8DAGnD;AACDU,0BAA0B,CAACX,WAAW,GAAG,4BAA4B;AAE9D,IAAMY,mBAAmB,GAAAhB,OAAA,CAAAgB,mBAAA,GAAGf,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oCAGzCI,oBAAS,EACTC,8BAAc,CACjB;AACDM,mBAAmB,CAACZ,WAAW,GAAG,qBAAqB"}
|
|
@@ -8,7 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _utils = require("../../utils");
|
|
9
9
|
var _Tooltip = require("../Tooltip");
|
|
10
10
|
var _Typography = require("../Typography/Typography");
|
|
11
|
-
var _excluded = ["value", "variant", "currencyCode", "currencyPosition", "thousandSeparator", "decimalSeparator", "trimDecimals", "decimalSpaces", "format", "disableTooltip", "className", "as"];
|
|
11
|
+
var _excluded = ["value", "variant", "currencyCode", "currencyPosition", "thousandSeparator", "decimalSeparator", "trimDecimals", "decimalSpaces", "format", "disableTooltip", "className", "as", "currencyClassName"];
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -37,9 +37,10 @@ var DisplayCurrency = exports.DisplayCurrency = /*#__PURE__*/(0, _react.forwardR
|
|
|
37
37
|
className = _ref.className,
|
|
38
38
|
_ref$as = _ref.as,
|
|
39
39
|
as = _ref$as === void 0 ? "span" : _ref$as,
|
|
40
|
+
currencyClassName = _ref.currencyClassName,
|
|
40
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
var formattedValue = (0, _utils.
|
|
42
|
-
var formattedLongValue = (0, _utils.
|
|
42
|
+
var formattedValue = (0, _utils.formatNumber)(value, thousandSeparator, decimalSeparator, trimDecimals, decimalSpaces, "short", 10000);
|
|
43
|
+
var formattedLongValue = (0, _utils.formatNumber)(value, thousandSeparator, decimalSeparator, trimDecimals, decimalSpaces, "long", 10000);
|
|
43
44
|
if (format === "short") {
|
|
44
45
|
return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
45
46
|
title: (0, _utils.formatCurrency)(value, thousandSeparator, decimalSeparator, false, decimalSpaces, "long", currencyCode, currencyPosition),
|
|
@@ -49,14 +50,22 @@ var DisplayCurrency = exports.DisplayCurrency = /*#__PURE__*/(0, _react.forwardR
|
|
|
49
50
|
variant: variant,
|
|
50
51
|
className: className,
|
|
51
52
|
ref: ref
|
|
52
|
-
}, rest),
|
|
53
|
+
}, rest), currencyPosition === "left" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
54
|
+
className: currencyClassName
|
|
55
|
+
}, currencyCode), " ", formattedValue) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formattedValue, " ", /*#__PURE__*/_react.default.createElement("span", {
|
|
56
|
+
className: currencyClassName
|
|
57
|
+
}, currencyCode))));
|
|
53
58
|
}
|
|
54
59
|
return /*#__PURE__*/_react.default.createElement(_Typography.Typography, _extends({
|
|
55
60
|
as: as,
|
|
56
61
|
variant: variant,
|
|
57
62
|
className: className,
|
|
58
63
|
ref: ref
|
|
59
|
-
}, rest),
|
|
64
|
+
}, rest), currencyPosition === "left" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
65
|
+
className: currencyClassName
|
|
66
|
+
}, currencyCode), " ", formattedLongValue) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formattedLongValue, " ", /*#__PURE__*/_react.default.createElement("span", {
|
|
67
|
+
className: currencyClassName
|
|
68
|
+
}, currencyCode)));
|
|
60
69
|
});
|
|
61
70
|
DisplayCurrency.displayName = "DisplayCurrency";
|
|
62
71
|
//# sourceMappingURL=DisplayCurrency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayCurrency.js","names":["_react","_interopRequireWildcard","require","_utils","_Tooltip","_Typography","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","DisplayCurrency","exports","forwardRef","_ref","ref","value","_ref$variant","variant","_ref$currencyCode","currencyCode","_ref$currencyPosition","currencyPosition","_ref$thousandSeparato","thousandSeparator","_ref$decimalSeparator","decimalSeparator","_ref$trimDecimals","trimDecimals","_ref$decimalSpaces","decimalSpaces","_ref$format","format","_ref$disableTooltip","disableTooltip","className","_ref$as","as","rest","formattedValue","
|
|
1
|
+
{"version":3,"file":"DisplayCurrency.js","names":["_react","_interopRequireWildcard","require","_utils","_Tooltip","_Typography","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","DisplayCurrency","exports","forwardRef","_ref","ref","value","_ref$variant","variant","_ref$currencyCode","currencyCode","_ref$currencyPosition","currencyPosition","_ref$thousandSeparato","thousandSeparator","_ref$decimalSeparator","decimalSeparator","_ref$trimDecimals","trimDecimals","_ref$decimalSpaces","decimalSpaces","_ref$format","format","_ref$disableTooltip","disableTooltip","className","_ref$as","as","currencyClassName","rest","formattedValue","formatNumber","formattedLongValue","createElement","Tooltip","title","formatCurrency","disable","includes","Typography","Fragment","displayName"],"sources":["../../../../src/components/Display/DisplayCurrency.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { DisplayNumberProps } from \"./types\";\nimport { formatCurrency, formatNumber } from \"../../utils\";\nimport { Tooltip } from \"../Tooltip\";\nimport { Typography } from \"../Typography/Typography\";\n\nexport const DisplayCurrency = forwardRef<\n HTMLSpanElement,\n Omit<DisplayNumberProps, \"shortenThreshold\"> & {\n currencyCode?: string;\n currencyPosition?: string;\n currencyClassName?: string;\n }\n>(\n (\n {\n value,\n variant = \"Body 2\",\n currencyCode = \"USD\",\n currencyPosition = \"right\",\n thousandSeparator = \",\",\n decimalSeparator = \".\",\n trimDecimals = true,\n decimalSpaces = 2,\n format = \"long\",\n disableTooltip = false,\n className,\n as = \"span\",\n currencyClassName,\n ...rest\n },\n ref\n ) => {\n const formattedValue = formatNumber(\n value,\n thousandSeparator,\n decimalSeparator,\n trimDecimals,\n decimalSpaces,\n \"short\",\n 10000\n );\n\n const formattedLongValue = formatNumber(\n value,\n thousandSeparator,\n decimalSeparator,\n trimDecimals,\n decimalSpaces,\n \"long\",\n 10000\n );\n\n if (format === \"short\") {\n return (\n <Tooltip\n title={formatCurrency(\n value,\n thousandSeparator,\n decimalSeparator,\n false,\n decimalSpaces,\n \"long\",\n currencyCode,\n currencyPosition\n )}\n disable={\n disableTooltip ||\n (!formattedLongValue.includes(thousandSeparator) &&\n !formattedLongValue.includes(decimalSeparator))\n }\n >\n <Typography\n as={as}\n variant={variant}\n className={className}\n ref={ref}\n {...rest}\n >\n {currencyPosition === \"left\" ? (\n <>\n <span className={currencyClassName}>{currencyCode}</span>{\" \"}\n {formattedValue}\n </>\n ) : (\n <>\n {formattedValue}{\" \"}\n <span className={currencyClassName}>{currencyCode}</span>\n </>\n )}\n </Typography>\n </Tooltip>\n );\n }\n\n return (\n <Typography\n as={as}\n variant={variant}\n className={className}\n ref={ref}\n {...rest}\n >\n {currencyPosition === \"left\" ? (\n <>\n <span className={currencyClassName}>{currencyCode}</span>{\" \"}\n {formattedLongValue}\n </>\n ) : (\n <>\n {formattedLongValue}{\" \"}\n <span className={currencyClassName}>{currencyCode}</span>\n </>\n )}\n </Typography>\n );\n }\n);\n\nDisplayCurrency.displayName = \"DisplayCurrency\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAsD,IAAAI,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,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A,CAACzE,WAAA,CAAA+E,UAAU,EAAAxD,QAAA;IACT4C,EAAE,EAAEA,EAAG;IACPnB,OAAO,EAAEA,OAAQ;IACjBiB,SAAS,EAAEA,SAAU;IACrBpB,GAAG,EAAEA;EAAI,GACLwB,IAAI,GAEPjB,gBAAgB,KAAK,MAAM,gBAC1BzD,MAAA,CAAAa,OAAA,CAAAiE,aAAA,CAAA9E,MAAA,CAAAa,OAAA,CAAAwE,QAAA,qBACErF,MAAA,CAAAa,OAAA,CAAAiE,aAAA;IAAMR,SAAS,EAAEG;EAAkB,GAAElB,YAAmB,CAAC,EAAC,GAAG,EAC5DsB,kBACD,CAAC,gBAEH7E,MAAA,CAAAa,OAAA,CAAAiE,aAAA,CAAA9E,MAAA,CAAAa,OAAA,CAAAwE,QAAA,QACGR,kBAAkB,EAAE,GAAG,eACxB7E,MAAA,CAAAa,OAAA,CAAAiE,aAAA;IAAMR,SAAS,EAAEG;EAAkB,GAAElB,YAAmB,CACxD,CAEM,CAAC;AAEjB,CACF,CAAC;AAEDT,eAAe,CAACwC,WAAW,GAAG,iBAAiB"}
|
|
@@ -7,6 +7,7 @@ export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
disableCloseOnEsc?: boolean;
|
|
8
8
|
animate?: "fade" | "slide";
|
|
9
9
|
onClickOutside?: (event: any) => void;
|
|
10
|
+
fullWidth?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const _Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
12
13
|
children?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,cAAc,EAAqB,MAAM,OAAO,CAAC;AAe7E,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,cAAc,EAAqB,MAAM,OAAO,CAAC;AAe7E,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,OAAO;;wCA+DnB,CAAC;AAKF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAKjB,CAAC"}
|
|
@@ -22,6 +22,7 @@ export const _Dialog = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
22
22
|
disableCloseOnEsc = false,
|
|
23
23
|
animate = "slide",
|
|
24
24
|
onClickOutside,
|
|
25
|
+
fullWidth = false,
|
|
25
26
|
...rest
|
|
26
27
|
} = _ref;
|
|
27
28
|
const animateDialog = () => {
|
|
@@ -30,13 +31,15 @@ export const _Dialog = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
30
31
|
return /*#__PURE__*/React.createElement(Fade, {
|
|
31
32
|
in: open
|
|
32
33
|
}, /*#__PURE__*/React.createElement(StyledDialog, {
|
|
34
|
+
$fullWidth: fullWidth,
|
|
33
35
|
className: classnames("c-dialog", className)
|
|
34
36
|
}, children));
|
|
35
37
|
default:
|
|
36
38
|
return /*#__PURE__*/React.createElement(SlideFromTop, {
|
|
37
39
|
in: open
|
|
38
40
|
}, /*#__PURE__*/React.createElement(StyledDialog, {
|
|
39
|
-
className: classnames("c-dialog", className)
|
|
41
|
+
className: classnames("c-dialog", className),
|
|
42
|
+
$fullWidth: fullWidth
|
|
40
43
|
}, children));
|
|
41
44
|
}
|
|
42
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["React","forwardRef","classnames","DialogActions","DialogContent","DialogContentDivider","DialogTitle","StyledDialog","Modal","Fade","SlideFromTop","_Dialog","_ref","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","animate","onClickOutside","rest","animateDialog","createElement","in","_extends","disableBackgroundClick","displayName","Dialog","Object","assign","Title","Content","ContentDivider","Actions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogActions } from \"./DialogActions\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogTitle } from \"./DialogTitle\";\nimport { StyledDialog } from \"./Styles\";\nimport { Modal } from \"../Modal\";\nimport { Fade } from \"../Transitions\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\n\nexport interface DialogProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n animate?: \"fade\" | \"slide\";\n onClickOutside?: (event) => void;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n animate = \"slide\",\n onClickOutside,\n ...rest\n },\n ref\n ) => {\n const animateDialog = () => {\n switch (animate) {\n case \"fade\":\n return (\n <Fade in={open}>\n <StyledDialog
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["React","forwardRef","classnames","DialogActions","DialogContent","DialogContentDivider","DialogTitle","StyledDialog","Modal","Fade","SlideFromTop","_Dialog","_ref","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","animate","onClickOutside","fullWidth","rest","animateDialog","createElement","in","$fullWidth","_extends","disableBackgroundClick","displayName","Dialog","Object","assign","Title","Content","ContentDivider","Actions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes, PropsWithChildren } from \"react\";\n\nimport classnames from \"classnames\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogActions } from \"./DialogActions\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogTitle } from \"./DialogTitle\";\nimport { StyledDialog } from \"./Styles\";\nimport { Modal } from \"../Modal\";\nimport { Fade } from \"../Transitions\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\n\nexport interface DialogProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n animate?: \"fade\" | \"slide\";\n onClickOutside?: (event) => void;\n fullWidth?: boolean;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n animate = \"slide\",\n onClickOutside,\n fullWidth = false,\n ...rest\n },\n ref\n ) => {\n const animateDialog = () => {\n switch (animate) {\n case \"fade\":\n return (\n <Fade in={open}>\n <StyledDialog\n $fullWidth={fullWidth}\n className={classnames(\"c-dialog\", className)}\n >\n {children}\n </StyledDialog>\n </Fade>\n );\n default:\n return (\n <SlideFromTop in={open}>\n <StyledDialog\n className={classnames(\"c-dialog\", className)}\n $fullWidth={fullWidth}\n >\n {children}\n </StyledDialog>\n </SlideFromTop>\n );\n }\n };\n\n return (\n // <DialogContext.Provider value={{}}>\n\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n onClickOutside={onClickOutside}\n {...rest}\n >\n {animateDialog()}\n </Modal>\n // </DialogContext.Provider>\n );\n }\n);\n\n_Dialog.displayName = \"Dialog\";\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757\nexport const Dialog = Object.assign({}, _Dialog, {\n Title: DialogTitle,\n Content: DialogContent,\n ContentDivider: DialogContentDivider,\n Actions: DialogActions,\n});\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,QAA2C,OAAO;AAE5E,OAAOC,UAAU,MAAM,YAAY;;AAEnC;;AAEA,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,IAAI,QAAQ,gBAAgB;AACrC,SAASC,YAAY,QAAQ,6BAA6B;AAa1D,OAAO,MAAMC,OAAO,gBAAGV,UAAU,CAI/B,CAAAW,IAAA,EAaEC,GAAG,KACA;EAAA,IAbH;IACEC,QAAQ;IACRC,IAAI,GAAG,KAAK;IACZC,OAAO;IACPC,SAAS;IACTC,qBAAqB,GAAG,KAAK;IAC7BC,iBAAiB,GAAG,KAAK;IACzBC,OAAO,GAAG,OAAO;IACjBC,cAAc;IACdC,SA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").StyledComponent<"div", any, {
|
|
1
|
+
export declare const StyledDialog: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$fullWidth?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
2
4
|
export declare const StyledDialogTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
5
|
export declare const StyledDialogContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
6
|
export declare const StyledDialogContentDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;SA6BxB,CAAC;AAIF,eAAO,MAAM,iBAAiB,oEAK7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAQ/B,CAAC;AAGF,eAAO,MAAM,0BAA0B,oEAGtC,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAK/B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
import { BoxSizingStyle } from "../BoxSizingStyle";
|
|
3
3
|
import { screen } from "../BreakPoints";
|
|
4
4
|
import { FontStyle } from "../FontStyle";
|
|
5
5
|
export const StyledDialog = styled.div.withConfig({
|
|
6
6
|
displayName: "Styles__StyledDialog",
|
|
7
7
|
componentId: "sc-jwpvgm-0"
|
|
8
|
-
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], FontStyle, BoxSizingStyle, screen.sm);
|
|
8
|
+
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;", " ", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], props => props.$fullWidth && css(["width:calc(100% - 32px);max-width:640px;margin-left:16px;margin-right:16px;"]), FontStyle, BoxSizingStyle, screen.sm);
|
|
9
9
|
StyledDialog.displayName = "StyledDialog";
|
|
10
10
|
export const StyledDialogTitle = styled.div.withConfig({
|
|
11
11
|
displayName: "Styles__StyledDialogTitle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","BoxSizingStyle","screen","FontStyle","StyledDialog","div","withConfig","displayName","componentId","sm","StyledDialogTitle","StyledDialogContent","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledDialog = styled.div
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","screen","FontStyle","StyledDialog","div","withConfig","displayName","componentId","props","$fullWidth","sm","StyledDialogTitle","StyledDialogContent","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledDialog = styled.div<{ $fullWidth?: boolean }>`\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n max-height: calc(100vh - 156px);\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n width: 310px;\n margin: 60px auto 30px auto;\n position: relative;\n\n ${(props) =>\n props.$fullWidth &&\n css`\n width: calc(100% - 32px);\n max-width: 640px;\n margin-left: 16px;\n margin-right: 16px;\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n ${screen.sm} {\n width: 540px;\n margin: 126px auto 30px auto;\n }\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\nexport const StyledDialogContent = styled.div`\n padding: 20px 30px;\n max-height: 580px;\n overflow-y: auto;\n flex: 1 1 auto;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,YAAY,GAAGL,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,uUAajCC,KAAK,IACNA,KAAK,CAACC,UAAU,IAChBV,GAAG,iFAKF,EAEDG,SAAS,EACTF,cAAc,EAEdC,MAAM,CAACS,EAAE,CAIZ;AAEDP,YAAY,CAACG,WAAW,GAAG,cAAc;AAEzC,OAAO,MAAMK,iBAAiB,GAAGb,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oCAGvCL,SAAS,EACTF,cAAc,CACjB;AACDW,iBAAiB,CAACL,WAAW,GAAG,mBAAmB;AAEnD,OAAO,MAAMM,mBAAmB,GAAGd,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,mFAMzCL,SAAS,EACTF,cAAc,CACjB;AACDY,mBAAmB,CAACN,WAAW,GAAG,qBAAqB;AAEvD,OAAO,MAAMO,0BAA0B,GAAGf,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8DAGnD;AACDM,0BAA0B,CAACP,WAAW,GAAG,4BAA4B;AAErE,OAAO,MAAMQ,mBAAmB,GAAGhB,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oCAGzCL,SAAS,EACTF,cAAc,CACjB;AACDc,mBAAmB,CAACR,WAAW,GAAG,qBAAqB"}
|
|
@@ -3,5 +3,6 @@ import { DisplayNumberProps } from "./types";
|
|
|
3
3
|
export declare const DisplayCurrency: React.ForwardRefExoticComponent<Omit<Omit<DisplayNumberProps, "shortenThreshold"> & {
|
|
4
4
|
currencyCode?: string | undefined;
|
|
5
5
|
currencyPosition?: string | undefined;
|
|
6
|
+
currencyClassName?: string | undefined;
|
|
6
7
|
}, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
7
8
|
//# sourceMappingURL=DisplayCurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayCurrency.d.ts","sourceRoot":"","sources":["../../../../src/components/Display/DisplayCurrency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"DisplayCurrency.d.ts","sourceRoot":"","sources":["../../../../src/components/Display/DisplayCurrency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,eAAO,MAAM,eAAe;;;;iDA+G3B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { formatCurrency } from "../../utils";
|
|
3
|
+
import { formatCurrency, formatNumber } from "../../utils";
|
|
4
4
|
import { Tooltip } from "../Tooltip";
|
|
5
5
|
import { Typography } from "../Typography/Typography";
|
|
6
6
|
export const DisplayCurrency = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -17,10 +17,11 @@ export const DisplayCurrency = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
17
17
|
disableTooltip = false,
|
|
18
18
|
className,
|
|
19
19
|
as = "span",
|
|
20
|
+
currencyClassName,
|
|
20
21
|
...rest
|
|
21
22
|
} = _ref;
|
|
22
|
-
const formattedValue =
|
|
23
|
-
const formattedLongValue =
|
|
23
|
+
const formattedValue = formatNumber(value, thousandSeparator, decimalSeparator, trimDecimals, decimalSpaces, "short", 10000);
|
|
24
|
+
const formattedLongValue = formatNumber(value, thousandSeparator, decimalSeparator, trimDecimals, decimalSpaces, "long", 10000);
|
|
24
25
|
if (format === "short") {
|
|
25
26
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
27
|
title: formatCurrency(value, thousandSeparator, decimalSeparator, false, decimalSpaces, "long", currencyCode, currencyPosition),
|
|
@@ -30,14 +31,22 @@ export const DisplayCurrency = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
30
31
|
variant: variant,
|
|
31
32
|
className: className,
|
|
32
33
|
ref: ref
|
|
33
|
-
}, rest),
|
|
34
|
+
}, rest), currencyPosition === "left" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
35
|
+
className: currencyClassName
|
|
36
|
+
}, currencyCode), " ", formattedValue) : /*#__PURE__*/React.createElement(React.Fragment, null, formattedValue, " ", /*#__PURE__*/React.createElement("span", {
|
|
37
|
+
className: currencyClassName
|
|
38
|
+
}, currencyCode))));
|
|
34
39
|
}
|
|
35
40
|
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
36
41
|
as: as,
|
|
37
42
|
variant: variant,
|
|
38
43
|
className: className,
|
|
39
44
|
ref: ref
|
|
40
|
-
}, rest),
|
|
45
|
+
}, rest), currencyPosition === "left" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
46
|
+
className: currencyClassName
|
|
47
|
+
}, currencyCode), " ", formattedLongValue) : /*#__PURE__*/React.createElement(React.Fragment, null, formattedLongValue, " ", /*#__PURE__*/React.createElement("span", {
|
|
48
|
+
className: currencyClassName
|
|
49
|
+
}, currencyCode)));
|
|
41
50
|
});
|
|
42
51
|
DisplayCurrency.displayName = "DisplayCurrency";
|
|
43
52
|
//# sourceMappingURL=DisplayCurrency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayCurrency.js","names":["React","forwardRef","formatCurrency","Tooltip","Typography","DisplayCurrency","_ref","ref","value","variant","currencyCode","currencyPosition","thousandSeparator","decimalSeparator","trimDecimals","decimalSpaces","format","disableTooltip","className","as","rest","formattedValue","formattedLongValue","createElement","title","disable","includes","_extends","displayName"],"sources":["../../../../src/components/Display/DisplayCurrency.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { DisplayNumberProps } from \"./types\";\nimport { formatCurrency } from \"../../utils\";\nimport { Tooltip } from \"../Tooltip\";\nimport { Typography } from \"../Typography/Typography\";\n\nexport const DisplayCurrency = forwardRef<\n HTMLSpanElement,\n Omit<DisplayNumberProps, \"shortenThreshold\"> & {\n currencyCode?: string;\n currencyPosition?: string;\n }\n>(\n (\n {\n value,\n variant = \"Body 2\",\n currencyCode = \"USD\",\n currencyPosition = \"right\",\n thousandSeparator = \",\",\n decimalSeparator = \".\",\n trimDecimals = true,\n decimalSpaces = 2,\n format = \"long\",\n disableTooltip = false,\n className,\n as = \"span\",\n ...rest\n },\n ref\n ) => {\n const formattedValue =
|
|
1
|
+
{"version":3,"file":"DisplayCurrency.js","names":["React","forwardRef","formatCurrency","formatNumber","Tooltip","Typography","DisplayCurrency","_ref","ref","value","variant","currencyCode","currencyPosition","thousandSeparator","decimalSeparator","trimDecimals","decimalSpaces","format","disableTooltip","className","as","currencyClassName","rest","formattedValue","formattedLongValue","createElement","title","disable","includes","_extends","Fragment","displayName"],"sources":["../../../../src/components/Display/DisplayCurrency.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { DisplayNumberProps } from \"./types\";\nimport { formatCurrency, formatNumber } from \"../../utils\";\nimport { Tooltip } from \"../Tooltip\";\nimport { Typography } from \"../Typography/Typography\";\n\nexport const DisplayCurrency = forwardRef<\n HTMLSpanElement,\n Omit<DisplayNumberProps, \"shortenThreshold\"> & {\n currencyCode?: string;\n currencyPosition?: string;\n currencyClassName?: string;\n }\n>(\n (\n {\n value,\n variant = \"Body 2\",\n currencyCode = \"USD\",\n currencyPosition = \"right\",\n thousandSeparator = \",\",\n decimalSeparator = \".\",\n trimDecimals = true,\n decimalSpaces = 2,\n format = \"long\",\n disableTooltip = false,\n className,\n as = \"span\",\n currencyClassName,\n ...rest\n },\n ref\n ) => {\n const formattedValue = formatNumber(\n value,\n thousandSeparator,\n decimalSeparator,\n trimDecimals,\n decimalSpaces,\n \"short\",\n 10000\n );\n\n const formattedLongValue = formatNumber(\n value,\n thousandSeparator,\n decimalSeparator,\n trimDecimals,\n decimalSpaces,\n \"long\",\n 10000\n );\n\n if (format === \"short\") {\n return (\n <Tooltip\n title={formatCurrency(\n value,\n thousandSeparator,\n decimalSeparator,\n false,\n decimalSpaces,\n \"long\",\n currencyCode,\n currencyPosition\n )}\n disable={\n disableTooltip ||\n (!formattedLongValue.includes(thousandSeparator) &&\n !formattedLongValue.includes(decimalSeparator))\n }\n >\n <Typography\n as={as}\n variant={variant}\n className={className}\n ref={ref}\n {...rest}\n >\n {currencyPosition === \"left\" ? (\n <>\n <span className={currencyClassName}>{currencyCode}</span>{\" \"}\n {formattedValue}\n </>\n ) : (\n <>\n {formattedValue}{\" \"}\n <span className={currencyClassName}>{currencyCode}</span>\n </>\n )}\n </Typography>\n </Tooltip>\n );\n }\n\n return (\n <Typography\n as={as}\n variant={variant}\n className={className}\n ref={ref}\n {...rest}\n >\n {currencyPosition === \"left\" ? (\n <>\n <span className={currencyClassName}>{currencyCode}</span>{\" \"}\n {formattedLongValue}\n </>\n ) : (\n <>\n {formattedLongValue}{\" \"}\n <span className={currencyClassName}>{currencyCode}</span>\n </>\n )}\n </Typography>\n );\n }\n);\n\nDisplayCurrency.displayName = \"DisplayCurrency\";\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAGzC,SAASC,cAAc,EAAEC,YAAY,QAAQ,aAAa;AAC1D,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,UAAU,QAAQ,0BAA0B;AAErD,OAAO,MAAMC,eAAe,gBAAGL,UAAU,CAQvC,CAAAM,IAAA,EAiBEC,GAAG,KACA;EAAA,IAjBH;IACEC,KAAK;IACLC,OAAO,GAAG,QAAQ;IAClBC,YAAY,GAAG,KAAK;IACpBC,gBAAgB,GAAG,OAAO;IAC1BC,iBAAiB,GAAG,GAAG;IACvBC,gBAAgB,GAAG,GAAG;IACtBC,YAAY,GAAG,IAAI;IACnBC,aAAa,GAAG,CAAC;IACjBC,MAAM,GAAG,MAAM;IACfC,cAAc,GAAG,KAAK;IACtBC,SAAS;IACTC,EAAE,GAAG,MAAM;IACXC,iBAAiB;IACjB,GAAGC;EACL,CAAC,GAAAf,IAAA;EAGD,MAAMgB,cAAc,GAAGpB,YAAY,CACjCM,KAAK,EACLI,iBAAiB,EACjBC,gBAAgB,EAChBC,YAAY,EACZC,aAAa,EACb,OAAO,EACP,KACF,CAAC;EAED,MAAMQ,kBAAkB,GAAGrB,Y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B,aAAA,CAAAzB,KAAA,CAAA8B,QAAA,qBACE9B,KAAA,CAAAyB,aAAA;IAAMN,SAAS,EAAEE;EAAkB,GAAEV,YAAmB,CAAC,EAAC,GAAG,EAC5Da,kBACD,CAAC,gBAEHxB,KAAA,CAAAyB,aAAA,CAAAzB,KAAA,CAAA8B,QAAA,QACGN,kBAAkB,EAAE,GAAG,eACxBxB,KAAA,CAAAyB,aAAA;IAAMN,SAAS,EAAEE;EAAkB,GAAEV,YAAmB,CACxD,CAEM,CAAC;AAEjB,CACF,CAAC;AAEDL,eAAe,CAACyB,WAAW,GAAG,iBAAiB"}
|
package/dist/index.js
CHANGED
|
@@ -12559,7 +12559,9 @@
|
|
|
12559
12559
|
var StyledDialog = styled__default["default"].div.withConfig({
|
|
12560
12560
|
displayName: "Styles__StyledDialog",
|
|
12561
12561
|
componentId: "sc-jwpvgm-0"
|
|
12562
|
-
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;", " ", " ", "{width:540px;margin:126px auto 30px auto;}"],
|
|
12562
|
+
})(["display:flex;flex-direction:column;flex:1 1 auto;max-height:calc(100vh - 156px);background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:8px;width:310px;margin:60px auto 30px auto;position:relative;", " ", " ", " ", "{width:540px;margin:126px auto 30px auto;}"], function (props) {
|
|
12563
|
+
return props.$fullWidth && styled.css(["width:calc(100% - 32px);max-width:640px;margin-left:16px;margin-right:16px;"]);
|
|
12564
|
+
}, FontStyle, BoxSizingStyle, screen.sm);
|
|
12563
12565
|
StyledDialog.displayName = "StyledDialog";
|
|
12564
12566
|
var StyledDialogTitle = styled__default["default"].div.withConfig({
|
|
12565
12567
|
displayName: "Styles__StyledDialogTitle",
|
|
@@ -13052,7 +13054,7 @@
|
|
|
13052
13054
|
};
|
|
13053
13055
|
Scale.displayName = "Scale";
|
|
13054
13056
|
|
|
13055
|
-
var _excluded$1a = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
|
|
13057
|
+
var _excluded$1a = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside", "fullWidth"];
|
|
13056
13058
|
var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13057
13059
|
var children = _ref.children,
|
|
13058
13060
|
_ref$open = _ref.open,
|
|
@@ -13066,6 +13068,8 @@
|
|
|
13066
13068
|
_ref$animate = _ref.animate,
|
|
13067
13069
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
13068
13070
|
onClickOutside = _ref.onClickOutside,
|
|
13071
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
13072
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
13069
13073
|
rest = _objectWithoutProperties(_ref, _excluded$1a);
|
|
13070
13074
|
var animateDialog = function animateDialog() {
|
|
13071
13075
|
switch (animate) {
|
|
@@ -13073,13 +13077,15 @@
|
|
|
13073
13077
|
return /*#__PURE__*/React__default["default"].createElement(Fade, {
|
|
13074
13078
|
in: open
|
|
13075
13079
|
}, /*#__PURE__*/React__default["default"].createElement(StyledDialog, {
|
|
13080
|
+
$fullWidth: fullWidth,
|
|
13076
13081
|
className: classNames__default["default"]("c-dialog", className)
|
|
13077
13082
|
}, children));
|
|
13078
13083
|
default:
|
|
13079
13084
|
return /*#__PURE__*/React__default["default"].createElement(SlideFromTop, {
|
|
13080
13085
|
in: open
|
|
13081
13086
|
}, /*#__PURE__*/React__default["default"].createElement(StyledDialog, {
|
|
13082
|
-
className: classNames__default["default"]("c-dialog", className)
|
|
13087
|
+
className: classNames__default["default"]("c-dialog", className),
|
|
13088
|
+
$fullWidth: fullWidth
|
|
13083
13089
|
}, children));
|
|
13084
13090
|
}
|
|
13085
13091
|
};
|
|
@@ -19923,7 +19929,7 @@
|
|
|
19923
19929
|
});
|
|
19924
19930
|
DisplayNumber.displayName = "DisplayNumber";
|
|
19925
19931
|
|
|
19926
|
-
var _excluded$z = ["value", "variant", "currencyCode", "currencyPosition", "thousandSeparator", "decimalSeparator", "trimDecimals", "decimalSpaces", "format", "disableTooltip", "className", "as"];
|
|
19932
|
+
var _excluded$z = ["value", "variant", "currencyCode", "currencyPosition", "thousandSeparator", "decimalSeparator", "trimDecimals", "decimalSpaces", "format", "disableTooltip", "className", "as", "currencyClassName"];
|
|
19927
19933
|
var DisplayCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
19928
19934
|
var value = _ref.value,
|
|
19929
19935
|
_ref$variant = _ref.variant,
|
|
@@ -19947,9 +19953,10 @@
|
|
|
19947
19953
|
className = _ref.className,
|
|
19948
19954
|
_ref$as = _ref.as,
|
|
19949
19955
|
as = _ref$as === void 0 ? "span" : _ref$as,
|
|
19956
|
+
currencyClassName = _ref.currencyClassName,
|
|
19950
19957
|
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
19951
|
-
var formattedValue =
|
|
19952
|
-
var formattedLongValue =
|
|
19958
|
+
var formattedValue = formatNumber(value, thousandSeparator, decimalSeparator, trimDecimals, decimalSpaces, "short", 10000);
|
|
19959
|
+
var formattedLongValue = formatNumber(value, thousandSeparator, decimalSeparator, trimDecimals, decimalSpaces, "long", 10000);
|
|
19953
19960
|
if (format === "short") {
|
|
19954
19961
|
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
19955
19962
|
title: formatCurrency(value, thousandSeparator, decimalSeparator, false, decimalSpaces, "long", currencyCode, currencyPosition),
|
|
@@ -19959,14 +19966,22 @@
|
|
|
19959
19966
|
variant: variant,
|
|
19960
19967
|
className: className,
|
|
19961
19968
|
ref: ref
|
|
19962
|
-
}, rest),
|
|
19969
|
+
}, rest), currencyPosition === "left" ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
19970
|
+
className: currencyClassName
|
|
19971
|
+
}, currencyCode), " ", formattedValue) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, formattedValue, " ", /*#__PURE__*/React__default["default"].createElement("span", {
|
|
19972
|
+
className: currencyClassName
|
|
19973
|
+
}, currencyCode))));
|
|
19963
19974
|
}
|
|
19964
19975
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
19965
19976
|
as: as,
|
|
19966
19977
|
variant: variant,
|
|
19967
19978
|
className: className,
|
|
19968
19979
|
ref: ref
|
|
19969
|
-
}, rest),
|
|
19980
|
+
}, rest), currencyPosition === "left" ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
19981
|
+
className: currencyClassName
|
|
19982
|
+
}, currencyCode), " ", formattedLongValue) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, formattedLongValue, " ", /*#__PURE__*/React__default["default"].createElement("span", {
|
|
19983
|
+
className: currencyClassName
|
|
19984
|
+
}, currencyCode)));
|
|
19970
19985
|
});
|
|
19971
19986
|
DisplayCurrency.displayName = "DisplayCurrency";
|
|
19972
19987
|
|