@obolnetwork/obol-ui 1.0.32 → 1.0.34

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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type * as Stitches from "@stitches/react";
3
3
  export declare const Text: import("@stitches/react/types/styled-component").StyledComponent<"span", {
4
- variant?: "body" | "h1" | "h2" | "h3" | "h4" | "h5" | "metadata" | "subline" | "ens" | undefined;
4
+ variant?: "body" | "pill" | "h1" | "h2" | "h3" | "h4" | "h5" | "metadata" | "subline" | "ens" | undefined;
5
5
  size?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | undefined;
6
6
  color?: "white" | "black" | "lightBackground" | "obolBlue" | "primaryBgDefault" | "primaryBgDefaultHover" | "primaryTextDefault" | "secondaryBgDefault" | "secondaryBgHover" | "grayBgDefault" | "gray2BgDefault" | "neutralDark" | "navButtonBgDefault" | "navButtonBgHover" | "cardBackgroundDark" | "cardBackgroundLight" | "textMiddle" | "textLight" | "textLighter" | "textTabHover" | "textTabInactive" | "textGreenDark" | "textGreenLight" | "textGreen1" | "textGreen2" | "textGreen3" | "textGreenHover" | "textCreateHover" | "textGrayHover" | "txButton" | "obolGreen" | "obolMidGreen" | "obolGreenHover" | "obolGreenLight" | "obolDarkDark" | "obolDisabled" | "linkButtonHover" | "progressTrackerGreen" | "coordinate" | "coordinateHover" | "test" | "testHover" | "create" | "createHover" | "light" | "body" | "muted" | "menu" | "bg01" | "bg02" | "bg03" | "bg04" | "bg05" | "tooltip" | "tooltip2" | undefined;
7
7
  glow?: boolean | "true" | undefined;
@@ -488,7 +488,7 @@ export declare const Text: import("@stitches/react/types/styled-component").Styl
488
488
  }>>;
489
489
  export default Text;
490
490
  export declare const TextStory: (props: Omit<import("@stitches/react/types/styled-component").TransformProps<{
491
- variant?: "body" | "h1" | "h2" | "h3" | "h4" | "h5" | "metadata" | "subline" | "ens" | undefined;
491
+ variant?: "body" | "pill" | "h1" | "h2" | "h3" | "h4" | "h5" | "metadata" | "subline" | "ens" | undefined;
492
492
  size?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | undefined;
493
493
  color?: "white" | "black" | "lightBackground" | "obolBlue" | "primaryBgDefault" | "primaryBgDefaultHover" | "primaryTextDefault" | "secondaryBgDefault" | "secondaryBgHover" | "grayBgDefault" | "gray2BgDefault" | "neutralDark" | "navButtonBgDefault" | "navButtonBgHover" | "cardBackgroundDark" | "cardBackgroundLight" | "textMiddle" | "textLight" | "textLighter" | "textTabHover" | "textTabInactive" | "textGreenDark" | "textGreenLight" | "textGreen1" | "textGreen2" | "textGreen3" | "textGreenHover" | "textCreateHover" | "textGrayHover" | "txButton" | "obolGreen" | "obolMidGreen" | "obolGreenHover" | "obolGreenLight" | "obolDarkDark" | "obolDisabled" | "linkButtonHover" | "progressTrackerGreen" | "coordinate" | "coordinateHover" | "test" | "testHover" | "create" | "createHover" | "light" | "body" | "muted" | "menu" | "bg01" | "bg02" | "bg03" | "bg04" | "bg05" | "tooltip" | "tooltip2" | undefined;
494
494
  glow?: boolean | "true" | undefined;
@@ -504,7 +504,7 @@ export declare const TextStory: (props: Omit<import("@stitches/react/types/style
504
504
  md: "(max-width: 1200px)";
505
505
  lg: "(max-width: 1800px)";
506
506
  }>, "color" | "size" | "inline" | "variant" | "glow"> & {
507
- variant?: "body" | "h1" | "h2" | "h3" | "h4" | "h5" | "metadata" | "subline" | "ens" | undefined;
507
+ variant?: "body" | "pill" | "h1" | "h2" | "h3" | "h4" | "h5" | "metadata" | "subline" | "ens" | undefined;
508
508
  size?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | undefined;
509
509
  color?: "white" | "black" | "lightBackground" | "obolBlue" | "primaryBgDefault" | "primaryBgDefaultHover" | "primaryTextDefault" | "secondaryBgDefault" | "secondaryBgHover" | "grayBgDefault" | "gray2BgDefault" | "neutralDark" | "navButtonBgDefault" | "navButtonBgHover" | "cardBackgroundDark" | "cardBackgroundLight" | "textMiddle" | "textLight" | "textLighter" | "textTabHover" | "textTabInactive" | "textGreenDark" | "textGreenLight" | "textGreen1" | "textGreen2" | "textGreen3" | "textGreenHover" | "textCreateHover" | "textGrayHover" | "txButton" | "obolGreen" | "obolMidGreen" | "obolGreenHover" | "obolGreenLight" | "obolDarkDark" | "obolDisabled" | "linkButtonHover" | "progressTrackerGreen" | "coordinate" | "coordinateHover" | "test" | "testHover" | "create" | "createHover" | "light" | "body" | "muted" | "menu" | "bg01" | "bg02" | "bg03" | "bg04" | "bg05" | "tooltip" | "tooltip2" | undefined;
510
510
  glow?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from "react";
2
2
  export declare const NotificationContainer: import("@stitches/react/types/styled-component").StyledComponent<import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
3
3
  motion: "(prefers-reduced-motion)";
4
4
  hover: "(any-hover: hover)";
@@ -959,7 +959,7 @@ export declare const NotificationContainer: import("@stitches/react/types/styled
959
959
  };
960
960
  }>>;
961
961
  export interface NotificationCardProps {
962
- heading: string;
962
+ heading: string | ReactNode;
963
963
  subHeading?: string;
964
964
  link?: string;
965
965
  linkText?: string;
package/dist/index.es.js CHANGED
@@ -735,6 +735,16 @@ var Text = styled("span", {
735
735
  fontSize: "$2",
736
736
  color: "$textMuted",
737
737
  },
738
+ pill: {
739
+ fontSize: "$3",
740
+ lineHeight: "16px",
741
+ color: "$$color",
742
+ border: " 1px solid $$color",
743
+ background: "rgba(60, 210, 221, 0.1)",
744
+ display: "inline-block",
745
+ borderRadius: "$1",
746
+ padding: "0 $xxxs",
747
+ }
738
748
  },
739
749
  size: {
740
750
  1: { fontSize: "$1" },
@@ -1212,7 +1222,7 @@ var LogoCard = function (props) {
1212
1222
  var ToggleGroup = styled(ToggleGroupPrimitive.Root, {});
1213
1223
  var ToggleGroupItem = styled(ToggleGroupPrimitive.Item, {});
1214
1224
 
1215
- var IconButton$1 = styled("button", {
1225
+ var IconButton = styled("button", {
1216
1226
  //reset
1217
1227
  all: "unset",
1218
1228
  alignItems: "center",
@@ -1266,7 +1276,7 @@ var IconButton$1 = styled("button", {
1266
1276
  },
1267
1277
  },
1268
1278
  });
1269
- var IconButtonStory = modifyVariantsForStory(IconButton$1);
1279
+ var IconButtonStory = modifyVariantsForStory(IconButton);
1270
1280
 
1271
1281
  var slideUpAndFade = keyframes({
1272
1282
  "0%": { opacity: 0, transform: "translateY(2px)" },
@@ -1412,7 +1422,7 @@ var TextFieldWithCopy = forwardRef(function (_a, ref) {
1412
1422
  onChange(e);
1413
1423
  }
1414
1424
  };
1415
- return (jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsx(TextField, __assign({}, props, { withCopy: true, ref: innerRef, value: inputValue, onChange: handleOnChange, css: { width: "$full" } })), jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsx(IconButton$1, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsx(CopyIcon, {}) : jsx(CheckIcon, {}) })) })), jsxs(Content$3, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
1425
+ return (jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsx(TextField, __assign({}, props, { withCopy: true, ref: innerRef, value: inputValue, onChange: handleOnChange, 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$3, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
1416
1426
  });
1417
1427
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1418
1428
 
@@ -1438,7 +1448,7 @@ var NumberField = forwardRef(function (_a, ref) {
1438
1448
  }
1439
1449
  };
1440
1450
  var handleOnChange = function (e) {
1441
- var value = e.target.value;
1451
+ var value = Number(e.target.value);
1442
1452
  if (value > max) {
1443
1453
  setQty(max);
1444
1454
  }
@@ -1488,7 +1498,7 @@ var NumberField = forwardRef(function (_a, ref) {
1488
1498
  borderRadius: 0,
1489
1499
  width: "95px",
1490
1500
  },
1491
- } }, { children: [jsx(IconButton$1, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: jsx(MinusIcon, {}) })), jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange, onBlur: onBlur, name: name }), jsx(IconButton$1, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: jsx(PlusIcon, {}) }))] })));
1501
+ } }, { children: [jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: jsx(MinusIcon, {}) })), jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange, onBlur: onBlur, name: name }), jsx(IconButton, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: jsx(PlusIcon, {}) }))] })));
1492
1502
  });
1493
1503
  NumberField.displayName = "NumberField";
1494
1504
 
@@ -1547,7 +1557,7 @@ var StyledContent$1 = styled(DialogPrimitive.Content, {
1547
1557
  });
1548
1558
  var Content$2 = function (_a) {
1549
1559
  var children = _a.children, props = __rest(_a, ["children"]);
1550
- return (jsxs(DialogPrimitive.Portal, __assign({ className: "dialog-portal-content" }, { children: [jsx(StyledOverlay, {}), jsx(StyledContent$1, __assign({}, props, { children: children }))] })));
1560
+ return (jsxs(DialogPrimitive.Portal, __assign({ className: "dialog-portal-content" }, { children: [jsx(StyledOverlay, { className: "dialog-overlay" }), jsx(StyledContent$1, __assign({ className: "dialog-styled-content" }, props, { children: children }))] })));
1551
1561
  };
1552
1562
  var StyledTitle = styled(DialogPrimitive.Title, {
1553
1563
  margin: 0,
@@ -1568,7 +1578,10 @@ var DialogContent = Content$2;
1568
1578
  var DialogTitle = StyledTitle;
1569
1579
  var DialogDescription = StyledDescription;
1570
1580
  var DialogClose = DialogPrimitive.Close;
1571
- var IconButton = styled("button", {
1581
+ var DialogStyledContent = StyledContent$1;
1582
+ var DialogOverlay = StyledOverlay;
1583
+ var DialogPortal = DialogPrimitive.Portal;
1584
+ var DialogIconButton = styled("button", {
1572
1585
  all: "unset",
1573
1586
  fontFamily: "inherit",
1574
1587
  borderRadius: "100%",
@@ -1585,7 +1598,7 @@ var IconButton = styled("button", {
1585
1598
  "&:hover": { backgroundColor: "$bg04" },
1586
1599
  "&:focus": { boxShadow: "0 0 0 2px $obolGreen" },
1587
1600
  });
1588
- var DialogComponent = function (props) { return (jsxs(Dialog, __assign({ css: props.css }, { children: [jsx(DialogTrigger, __assign({ asChild: true }, { children: props.triggerElement })), jsxs(DialogContent, { children: [jsx(DialogTitle, __assign({ className: "dialog-title", css: { mb: "$xl" } }, { children: props.title })), jsx(DialogDescription, __assign({ className: "dialog-description" }, { children: props.description })), props.children, jsx(DialogClose, __assign({ asChild: true }, { children: jsx(IconButton, __assign({ "aria-label": "Close" }, { children: jsx(Cross2Icon, {}) })) }))] })] }))); };
1601
+ var DialogComponent = function (props) { return (jsxs(Dialog, __assign({ css: props.css }, { children: [jsx(DialogTrigger, __assign({ asChild: true }, { children: props.triggerElement })), jsxs(DialogContent, { children: [jsx(DialogTitle, __assign({ className: "dialog-title", css: { mb: "$xl" } }, { children: props.title })), jsx(DialogDescription, __assign({ className: "dialog-description" }, { children: props.description })), props.children, jsx(DialogClose, __assign({ asChild: true }, { children: jsx(DialogIconButton, __assign({ "aria-label": "Close" }, { children: jsx(Cross2Icon, {}) })) }))] })] }))); };
1589
1602
 
1590
1603
  var slideDown = keyframes({
1591
1604
  from: { height: 0 },
@@ -1800,7 +1813,7 @@ var Navbar = function (_a) {
1800
1813
  },
1801
1814
  },
1802
1815
  } }, { children: children }))); };
1803
- var LogoIcon = function () { return (jsxs(Box, __assign({ css: {
1816
+ var LogoIcon = function () { return (jsxs(Box, __assign({ as: "a", css: {
1804
1817
  display: "flex",
1805
1818
  flex: 1,
1806
1819
  justifyContent: "flex-start",
@@ -1808,11 +1821,11 @@ var Navbar = function (_a) {
1808
1821
  "@sm": {
1809
1822
  pl: "$sm",
1810
1823
  },
1811
- } }, { children: [jsxs(Box, __assign({ as: "a", css: {
1824
+ }, href: "/" }, { children: [jsxs(Box, __assign({ css: {
1812
1825
  display: "flex",
1813
1826
  alignItems: "center",
1814
1827
  "@sm": { display: "none" },
1815
- }, href: "/" }, { children: [jsx(ObolDarkBgH, {}), logoText && (jsx(Text, __assign({ css: {
1828
+ } }, { children: [jsx(ObolDarkBgH, {}), logoText && (jsx(Text, __assign({ css: {
1816
1829
  fontSize: "28px",
1817
1830
  color: "$muted",
1818
1831
  fontWeight: "bold",
@@ -2136,7 +2149,7 @@ var SplitterTable = function (_a) {
2136
2149
  if (onUpdateRow)
2137
2150
  onUpdateRow(row.id, value, column.accessorKey);
2138
2151
  }, min: (_c = (_b = column.cell) === null || _b === void 0 ? void 0 : _b.config) === null || _c === void 0 ? void 0 : _c.min, max: (_e = (_d = column.cell) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e.max, type: (_g = (_f = column.cell) === null || _f === void 0 ? void 0 : _f.config) === null || _g === void 0 ? void 0 : _g.type, readOnly: !isEditable })) }), "cell ".concat(cellIndex)));
2139
- }), onRemoveRow && isRemovable && (jsx(Td, __assign({ splitter: true, size: "sm", css: { p: "$2" } }, { children: jsx(IconButton$1, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsx(TrashIcon, {}) })) })))] }, row.id));
2152
+ }), onRemoveRow && isRemovable && (jsx(Td, __assign({ splitter: true, size: "sm", css: { p: "$2" } }, { children: jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsx(TrashIcon, {}) })) })))] }, row.id));
2140
2153
  }), jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2141
2154
  };
2142
2155
  var Table = function (_a) {
@@ -2353,4 +2366,4 @@ var TwoColumnSection = function (_a) {
2353
2366
  } }, { children: !screenDownSm ? (jsx(Image, { src: image.basePath, width: "100%", height: "100%", alt: "Obol Logo" })) : (jsx(Image, { src: image.mobilePath || image.basePath, width: "100%", height: "100%", alt: "Obol Logo" })) }))] })));
2354
2367
  };
2355
2368
 
2356
- export { Accordion, Advisory, AdvisoryToggleBullet, AdvisoryToggleItem, AlertIcon, AloneIcon, ArrowForward, Box, BulletCheckIcon, Button, ButtonStory, Card, CheckIcon, Checkbox, CheckboxIcon, CheckboxIndicator, CheckboxRoot, ChevronDownIcon, ChevronUpIcon, CloseIcon, CodeIcon, Container, CopyIcon, CreateIcon, Dialog, DialogClose, DialogComponent, DialogContent, DialogDescription, DialogTitle, DialogTrigger, Download, ExistingGroupIcon, Flex, Footer, GithubIcon, GroupIcon, HelpIcon, HeroSection, Hexapod, HexapodMobile, IconButton$1 as IconButton, IconButtonStory, Image, Link, LinkStory, LoadingButton, LogoCard, MediaQueryKeys, MenuIcon, MigrateIcon, MinusIcon, Navbar, NotificationCard, NotificationContainer, NumberField, ObolDarkBgH, ObolDarkBgMark, ObolDarkBgV, ObolDarkCircle, ObolLightBgH, ObolLightBgMark, ObolLightBgV, ObolLightCircle, ObolSolidDarkBgH, ObolSolidDarkBgMark, ObolSolidDarkBgV, ObolSolidLightBgH, ObolSolidLightBgMark, ObolSolidLightBgV, OpenInNew, PlanetBlue, PlanetGreen, PlanetGrey, PlanetMagenta, PlanetOrange, PlusIcon, ProgressTracker, Provider, PublicGoodIcon, RadioGroup, RadioGroupComponent, RadioGroupIndicator, RadioGroupItem, RadioGroupItemLabel, RadioGroupRadio, RunIcon, Spin, SplitterTable, SvgIcon, Table, Tabs$1 as Tabs, TeamMemberCard, TestIcon, Text, TextField, TextFieldWithCopy, TextStory, ToggleCardItem, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipComponent, TooltipContent, TooltipTrigger, TrashIcon, TrustMinimisedIcon, TwitterIcon, TwoColumnSection, WaitingIcon, config, createTheme, css, getCssText, globalCss, keyframes, modifyVariantsForStory, reset, styled, theme, useMediaQuery };
2369
+ export { Accordion, Advisory, AdvisoryToggleBullet, AdvisoryToggleItem, AlertIcon, AloneIcon, ArrowForward, Box, BulletCheckIcon, Button, ButtonStory, Card, CheckIcon, Checkbox, CheckboxIcon, CheckboxIndicator, CheckboxRoot, ChevronDownIcon, ChevronUpIcon, CloseIcon, CodeIcon, Container, CopyIcon, CreateIcon, Dialog, DialogClose, DialogComponent, DialogContent, DialogDescription, DialogIconButton, DialogOverlay, DialogPortal, DialogStyledContent, DialogTitle, DialogTrigger, Download, ExistingGroupIcon, Flex, Footer, GithubIcon, GroupIcon, HelpIcon, HeroSection, Hexapod, HexapodMobile, IconButton, IconButtonStory, Image, Link, LinkStory, LoadingButton, LogoCard, MediaQueryKeys, MenuIcon, MigrateIcon, MinusIcon, Navbar, NotificationCard, NotificationContainer, NumberField, ObolDarkBgH, ObolDarkBgMark, ObolDarkBgV, ObolDarkCircle, ObolLightBgH, ObolLightBgMark, ObolLightBgV, ObolLightCircle, ObolSolidDarkBgH, ObolSolidDarkBgMark, ObolSolidDarkBgV, ObolSolidLightBgH, ObolSolidLightBgMark, ObolSolidLightBgV, OpenInNew, PlanetBlue, PlanetGreen, PlanetGrey, PlanetMagenta, PlanetOrange, PlusIcon, ProgressTracker, Provider, PublicGoodIcon, RadioGroup, RadioGroupComponent, RadioGroupIndicator, RadioGroupItem, RadioGroupItemLabel, RadioGroupRadio, RunIcon, Spin, SplitterTable, SvgIcon, Table, Tabs$1 as Tabs, TeamMemberCard, TestIcon, Text, TextField, TextFieldWithCopy, TextStory, ToggleCardItem, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipComponent, TooltipContent, TooltipTrigger, TrashIcon, TrustMinimisedIcon, TwitterIcon, TwoColumnSection, WaitingIcon, config, createTheme, css, getCssText, globalCss, keyframes, modifyVariantsForStory, reset, styled, theme, useMediaQuery };
package/dist/index.js CHANGED
@@ -768,6 +768,16 @@ var Text = styled("span", {
768
768
  fontSize: "$2",
769
769
  color: "$textMuted",
770
770
  },
771
+ pill: {
772
+ fontSize: "$3",
773
+ lineHeight: "16px",
774
+ color: "$$color",
775
+ border: " 1px solid $$color",
776
+ background: "rgba(60, 210, 221, 0.1)",
777
+ display: "inline-block",
778
+ borderRadius: "$1",
779
+ padding: "0 $xxxs",
780
+ }
771
781
  },
772
782
  size: {
773
783
  1: { fontSize: "$1" },
@@ -1245,7 +1255,7 @@ var LogoCard = function (props) {
1245
1255
  var ToggleGroup = styled(ToggleGroupPrimitive__namespace.Root, {});
1246
1256
  var ToggleGroupItem = styled(ToggleGroupPrimitive__namespace.Item, {});
1247
1257
 
1248
- var IconButton$1 = styled("button", {
1258
+ var IconButton = styled("button", {
1249
1259
  //reset
1250
1260
  all: "unset",
1251
1261
  alignItems: "center",
@@ -1299,7 +1309,7 @@ var IconButton$1 = styled("button", {
1299
1309
  },
1300
1310
  },
1301
1311
  });
1302
- var IconButtonStory = modifyVariantsForStory(IconButton$1);
1312
+ var IconButtonStory = modifyVariantsForStory(IconButton);
1303
1313
 
1304
1314
  var slideUpAndFade = keyframes({
1305
1315
  "0%": { opacity: 0, transform: "translateY(2px)" },
@@ -1445,7 +1455,7 @@ var TextFieldWithCopy = React.forwardRef(function (_a, ref) {
1445
1455
  onChange(e);
1446
1456
  }
1447
1457
  };
1448
- return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsxRuntime.jsx(TextField, __assign({}, props, { withCopy: true, ref: innerRef, value: inputValue, onChange: handleOnChange, css: { width: "$full" } })), jsxRuntime.jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsxRuntime.jsx(IconButton$1, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsxRuntime.jsx(CopyIcon, {}) : jsxRuntime.jsx(CheckIcon, {}) })) })), jsxRuntime.jsxs(Content$3, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
1458
+ return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsxRuntime.jsx(TextField, __assign({}, props, { withCopy: true, ref: innerRef, value: inputValue, onChange: handleOnChange, 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$3, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
1449
1459
  });
1450
1460
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1451
1461
 
@@ -1471,7 +1481,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
1471
1481
  }
1472
1482
  };
1473
1483
  var handleOnChange = function (e) {
1474
- var value = e.target.value;
1484
+ var value = Number(e.target.value);
1475
1485
  if (value > max) {
1476
1486
  setQty(max);
1477
1487
  }
@@ -1521,7 +1531,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
1521
1531
  borderRadius: 0,
1522
1532
  width: "95px",
1523
1533
  },
1524
- } }, { children: [jsxRuntime.jsx(IconButton$1, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: jsxRuntime.jsx(MinusIcon, {}) })), jsxRuntime.jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange, onBlur: onBlur, name: name }), jsxRuntime.jsx(IconButton$1, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: jsxRuntime.jsx(PlusIcon, {}) }))] })));
1534
+ } }, { children: [jsxRuntime.jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: jsxRuntime.jsx(MinusIcon, {}) })), jsxRuntime.jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange, onBlur: onBlur, name: name }), jsxRuntime.jsx(IconButton, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: jsxRuntime.jsx(PlusIcon, {}) }))] })));
1525
1535
  });
1526
1536
  NumberField.displayName = "NumberField";
1527
1537
 
@@ -1580,7 +1590,7 @@ var StyledContent$1 = styled(DialogPrimitive__namespace.Content, {
1580
1590
  });
1581
1591
  var Content$2 = function (_a) {
1582
1592
  var children = _a.children, props = __rest(_a, ["children"]);
1583
- return (jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, __assign({ className: "dialog-portal-content" }, { children: [jsxRuntime.jsx(StyledOverlay, {}), jsxRuntime.jsx(StyledContent$1, __assign({}, props, { children: children }))] })));
1593
+ return (jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, __assign({ className: "dialog-portal-content" }, { children: [jsxRuntime.jsx(StyledOverlay, { className: "dialog-overlay" }), jsxRuntime.jsx(StyledContent$1, __assign({ className: "dialog-styled-content" }, props, { children: children }))] })));
1584
1594
  };
1585
1595
  var StyledTitle = styled(DialogPrimitive__namespace.Title, {
1586
1596
  margin: 0,
@@ -1601,7 +1611,10 @@ var DialogContent = Content$2;
1601
1611
  var DialogTitle = StyledTitle;
1602
1612
  var DialogDescription = StyledDescription;
1603
1613
  var DialogClose = DialogPrimitive__namespace.Close;
1604
- var IconButton = styled("button", {
1614
+ var DialogStyledContent = StyledContent$1;
1615
+ var DialogOverlay = StyledOverlay;
1616
+ var DialogPortal = DialogPrimitive__namespace.Portal;
1617
+ var DialogIconButton = styled("button", {
1605
1618
  all: "unset",
1606
1619
  fontFamily: "inherit",
1607
1620
  borderRadius: "100%",
@@ -1618,7 +1631,7 @@ var IconButton = styled("button", {
1618
1631
  "&:hover": { backgroundColor: "$bg04" },
1619
1632
  "&:focus": { boxShadow: "0 0 0 2px $obolGreen" },
1620
1633
  });
1621
- var DialogComponent = function (props) { return (jsxRuntime.jsxs(Dialog, __assign({ css: props.css }, { children: [jsxRuntime.jsx(DialogTrigger, __assign({ asChild: true }, { children: props.triggerElement })), jsxRuntime.jsxs(DialogContent, { children: [jsxRuntime.jsx(DialogTitle, __assign({ className: "dialog-title", css: { mb: "$xl" } }, { children: props.title })), jsxRuntime.jsx(DialogDescription, __assign({ className: "dialog-description" }, { children: props.description })), props.children, jsxRuntime.jsx(DialogClose, __assign({ asChild: true }, { children: jsxRuntime.jsx(IconButton, __assign({ "aria-label": "Close" }, { children: jsxRuntime.jsx(reactIcons.Cross2Icon, {}) })) }))] })] }))); };
1634
+ var DialogComponent = function (props) { return (jsxRuntime.jsxs(Dialog, __assign({ css: props.css }, { children: [jsxRuntime.jsx(DialogTrigger, __assign({ asChild: true }, { children: props.triggerElement })), jsxRuntime.jsxs(DialogContent, { children: [jsxRuntime.jsx(DialogTitle, __assign({ className: "dialog-title", css: { mb: "$xl" } }, { children: props.title })), jsxRuntime.jsx(DialogDescription, __assign({ className: "dialog-description" }, { children: props.description })), props.children, jsxRuntime.jsx(DialogClose, __assign({ asChild: true }, { children: jsxRuntime.jsx(DialogIconButton, __assign({ "aria-label": "Close" }, { children: jsxRuntime.jsx(reactIcons.Cross2Icon, {}) })) }))] })] }))); };
1622
1635
 
1623
1636
  var slideDown = keyframes({
1624
1637
  from: { height: 0 },
@@ -1833,7 +1846,7 @@ var Navbar = function (_a) {
1833
1846
  },
1834
1847
  },
1835
1848
  } }, { children: children }))); };
1836
- var LogoIcon = function () { return (jsxRuntime.jsxs(Box, __assign({ css: {
1849
+ var LogoIcon = function () { return (jsxRuntime.jsxs(Box, __assign({ as: "a", css: {
1837
1850
  display: "flex",
1838
1851
  flex: 1,
1839
1852
  justifyContent: "flex-start",
@@ -1841,11 +1854,11 @@ var Navbar = function (_a) {
1841
1854
  "@sm": {
1842
1855
  pl: "$sm",
1843
1856
  },
1844
- } }, { children: [jsxRuntime.jsxs(Box, __assign({ as: "a", css: {
1857
+ }, href: "/" }, { children: [jsxRuntime.jsxs(Box, __assign({ css: {
1845
1858
  display: "flex",
1846
1859
  alignItems: "center",
1847
1860
  "@sm": { display: "none" },
1848
- }, href: "/" }, { children: [jsxRuntime.jsx(ObolDarkBgH, {}), logoText && (jsxRuntime.jsx(Text, __assign({ css: {
1861
+ } }, { children: [jsxRuntime.jsx(ObolDarkBgH, {}), logoText && (jsxRuntime.jsx(Text, __assign({ css: {
1849
1862
  fontSize: "28px",
1850
1863
  color: "$muted",
1851
1864
  fontWeight: "bold",
@@ -2169,7 +2182,7 @@ var SplitterTable = function (_a) {
2169
2182
  if (onUpdateRow)
2170
2183
  onUpdateRow(row.id, value, column.accessorKey);
2171
2184
  }, min: (_c = (_b = column.cell) === null || _b === void 0 ? void 0 : _b.config) === null || _c === void 0 ? void 0 : _c.min, max: (_e = (_d = column.cell) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e.max, type: (_g = (_f = column.cell) === null || _f === void 0 ? void 0 : _f.config) === null || _g === void 0 ? void 0 : _g.type, readOnly: !isEditable })) }), "cell ".concat(cellIndex)));
2172
- }), onRemoveRow && isRemovable && (jsxRuntime.jsx(Td, __assign({ splitter: true, size: "sm", css: { p: "$2" } }, { children: jsxRuntime.jsx(IconButton$1, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsxRuntime.jsx(TrashIcon, {}) })) })))] }, row.id));
2185
+ }), onRemoveRow && isRemovable && (jsxRuntime.jsx(Td, __assign({ splitter: true, size: "sm", css: { p: "$2" } }, { children: jsxRuntime.jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsxRuntime.jsx(TrashIcon, {}) })) })))] }, row.id));
2173
2186
  }), jsxRuntime.jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2174
2187
  };
2175
2188
  var Table = function (_a) {
@@ -2415,6 +2428,10 @@ exports.DialogClose = DialogClose;
2415
2428
  exports.DialogComponent = DialogComponent;
2416
2429
  exports.DialogContent = DialogContent;
2417
2430
  exports.DialogDescription = DialogDescription;
2431
+ exports.DialogIconButton = DialogIconButton;
2432
+ exports.DialogOverlay = DialogOverlay;
2433
+ exports.DialogPortal = DialogPortal;
2434
+ exports.DialogStyledContent = DialogStyledContent;
2418
2435
  exports.DialogTitle = DialogTitle;
2419
2436
  exports.DialogTrigger = DialogTrigger;
2420
2437
  exports.Download = Download;
@@ -2427,7 +2444,7 @@ exports.HelpIcon = HelpIcon;
2427
2444
  exports.HeroSection = HeroSection;
2428
2445
  exports.Hexapod = Hexapod;
2429
2446
  exports.HexapodMobile = HexapodMobile;
2430
- exports.IconButton = IconButton$1;
2447
+ exports.IconButton = IconButton;
2431
2448
  exports.IconButtonStory = IconButtonStory;
2432
2449
  exports.Image = Image;
2433
2450
  exports.Link = Link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",
@@ -35,22 +35,23 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@babel/core": "^7.17.8",
38
- "@storybook/addon-actions": "^6.4.20",
39
- "@storybook/addon-essentials": "^6.4.20",
40
- "@storybook/addon-interactions": "^6.4.20",
41
- "@storybook/addon-links": "^6.4.20",
42
- "@storybook/react": "^6.4.20",
43
- "@storybook/testing-library": "^0.0.9",
38
+ "@storybook/addon-actions": "^6.5.12",
39
+ "@storybook/addon-essentials": "^6.5.12",
40
+ "@storybook/addon-interactions": "^6.5.12",
41
+ "@storybook/addon-links": "^6.5.12",
42
+ "@storybook/react": "^6.5.12",
43
+ "@storybook/testing-library": "^0.0.13",
44
44
  "@types/node": "17.0.21",
45
45
  "@types/react": "17.0.40",
46
46
  "babel-loader": "^8.2.4",
47
47
  "eslint": "8.11.0",
48
48
  "eslint-config-next": "12.1.0",
49
+ "eslint-plugin-storybook": "^0.6.4",
49
50
  "figma-api": "^1.10.1",
50
51
  "np": "^7.6.1",
51
52
  "rollup": "^2.70.1",
52
53
  "rollup-plugin-typescript2": "^0.31.2",
53
- "storybook-addon-designs": "^6.2.1",
54
+ "storybook-addon-designs": "^6.3.1",
54
55
  "tslib": "^2.3.1",
55
56
  "typescript": "^4.6.3"
56
57
  },