@obolnetwork/obol-ui 1.0.20 → 1.0.22

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/index.es.js CHANGED
@@ -1370,7 +1370,7 @@ var TextFieldWithCopy = forwardRef(function (props, ref) {
1370
1370
  useTimeout(function () {
1371
1371
  setIsCopied(false);
1372
1372
  }, isCopied ? 3000 : null);
1373
- return (jsxs(Box, __assign({ css: { display: "flex" } }, { children: [jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props)), jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsx(IconButton, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsx(CopyIcon, {}) : jsx(CheckIcon, {}) })) })), jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
1373
+ return (jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props, { css: { width: "$full" } })), jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsx(IconButton, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsx(CopyIcon, {}) : jsx(CheckIcon, {}) })) })), jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
1374
1374
  });
1375
1375
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1376
1376
 
@@ -1718,11 +1718,13 @@ var NotificationContainer = styled(Box, {
1718
1718
  borderRadius: "$1",
1719
1719
  display: "flex",
1720
1720
  gap: "$xs",
1721
- p: "$md",
1721
+ p: "$sm",
1722
+ boxSizing: "border-box",
1723
+ width: "$full",
1722
1724
  });
1723
1725
  var NotificationCard = function (_a) {
1724
1726
  var heading = _a.heading, subHeading = _a.subHeading, link = _a.link, _b = _a.linkText, linkText = _b === void 0 ? "More on Charon" : _b;
1725
- return (jsxs(NotificationContainer, { children: [jsx(Box, { children: jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3" } }, { children: subHeading })))] })), link && (jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsx(ArrowForward, { size: "md" })] })))] }))] }));
1727
+ return (jsxs(NotificationContainer, { children: [jsx(Box, { children: jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3", lineHeight: "24px" } }, { children: subHeading })))] })), link && (jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsx(ArrowForward, { size: "md" })] })))] }))] }));
1726
1728
  };
1727
1729
 
1728
1730
  var ProgressTracker = function (_a) {
@@ -1951,7 +1953,7 @@ var SplitterTable = function (_a) {
1951
1953
  var _a, _b, _c, _d;
1952
1954
  var inputValue = e.target.value === ""
1953
1955
  ? 0
1954
- : parseFloat(e.target.value);
1956
+ : parseFloat(e.target.value).toFixed(2);
1955
1957
  if (((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number") {
1956
1958
  if ((_d = (_c = column.cell) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.totalCell) {
1957
1959
  var value = rows.reduce(function (prev, curr, indx) {
@@ -1973,9 +1975,9 @@ var SplitterTable = function (_a) {
1973
1975
  var _a, _b;
1974
1976
  var inputValue = e.target.value === ""
1975
1977
  ? 0
1976
- : parseFloat(e.target.value);
1978
+ : +parseFloat(e.target.value).toFixed(2);
1977
1979
  var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
1978
- ? inputValue.toFixed(2)
1980
+ ? inputValue
1979
1981
  : e.target.value;
1980
1982
  if (onUpdateRow)
1981
1983
  onUpdateRow(row.id, value, column.accessorKey);
package/dist/index.js CHANGED
@@ -1401,7 +1401,7 @@ var TextFieldWithCopy = React.forwardRef(function (props, ref) {
1401
1401
  useTimeout(function () {
1402
1402
  setIsCopied(false);
1403
1403
  }, isCopied ? 3000 : null);
1404
- return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex" } }, { children: [jsxRuntime.jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props)), jsxRuntime.jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsxRuntime.jsx(IconButton, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsxRuntime.jsx(CopyIcon, {}) : jsxRuntime.jsx(CheckIcon, {}) })) })), jsxRuntime.jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
1404
+ return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsxRuntime.jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props, { css: { width: "$full" } })), jsxRuntime.jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsxRuntime.jsx(IconButton, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsxRuntime.jsx(CopyIcon, {}) : jsxRuntime.jsx(CheckIcon, {}) })) })), jsxRuntime.jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
1405
1405
  });
1406
1406
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1407
1407
 
@@ -1749,11 +1749,13 @@ var NotificationContainer = styled(Box, {
1749
1749
  borderRadius: "$1",
1750
1750
  display: "flex",
1751
1751
  gap: "$xs",
1752
- p: "$md",
1752
+ p: "$sm",
1753
+ boxSizing: "border-box",
1754
+ width: "$full",
1753
1755
  });
1754
1756
  var NotificationCard = function (_a) {
1755
1757
  var heading = _a.heading, subHeading = _a.subHeading, link = _a.link, _b = _a.linkText, linkText = _b === void 0 ? "More on Charon" : _b;
1756
- return (jsxRuntime.jsxs(NotificationContainer, { children: [jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsxRuntime.jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsxRuntime.jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3" } }, { children: subHeading })))] })), link && (jsxRuntime.jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsxRuntime.jsx(ArrowForward, { size: "md" })] })))] }))] }));
1758
+ return (jsxRuntime.jsxs(NotificationContainer, { children: [jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsxRuntime.jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsxRuntime.jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3", lineHeight: "24px" } }, { children: subHeading })))] })), link && (jsxRuntime.jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsxRuntime.jsx(ArrowForward, { size: "md" })] })))] }))] }));
1757
1759
  };
1758
1760
 
1759
1761
  var ProgressTracker = function (_a) {
@@ -1982,7 +1984,7 @@ var SplitterTable = function (_a) {
1982
1984
  var _a, _b, _c, _d;
1983
1985
  var inputValue = e.target.value === ""
1984
1986
  ? 0
1985
- : parseFloat(e.target.value);
1987
+ : parseFloat(e.target.value).toFixed(2);
1986
1988
  if (((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number") {
1987
1989
  if ((_d = (_c = column.cell) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.totalCell) {
1988
1990
  var value = rows.reduce(function (prev, curr, indx) {
@@ -2004,9 +2006,9 @@ var SplitterTable = function (_a) {
2004
2006
  var _a, _b;
2005
2007
  var inputValue = e.target.value === ""
2006
2008
  ? 0
2007
- : parseFloat(e.target.value);
2009
+ : +parseFloat(e.target.value).toFixed(2);
2008
2010
  var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
2009
- ? inputValue.toFixed(2)
2011
+ ? inputValue
2010
2012
  : e.target.value;
2011
2013
  if (onUpdateRow)
2012
2014
  onUpdateRow(row.id, value, column.accessorKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",