@obolnetwork/obol-ui 1.0.31 → 1.0.32

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.
@@ -16,3 +16,4 @@ export * from "./NumberField/NumberField";
16
16
  export * from './Tooltip/Tooltip';
17
17
  export * from './LoadingButton/LoadingButton';
18
18
  export * from './Checkbox/Checkbox';
19
+ export * from './Dialog/Dialog';
package/dist/index.es.js CHANGED
@@ -5,6 +5,8 @@ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
5
5
  import React, { useState, forwardRef, useRef, useImperativeHandle, useEffect, useLayoutEffect } from 'react';
6
6
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
7
7
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
+ import { Cross2Icon } from '@radix-ui/react-icons';
9
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
8
10
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
9
11
  import { useRouter } from 'next/router';
10
12
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
@@ -863,14 +865,14 @@ var StyledTrigger$1 = styled(TabsPrimitive.Trigger, {
863
865
  boxShadow: "inset 0 -2px 0 0 currentColor",
864
866
  },
865
867
  });
866
- var StyledContent$2 = styled(TabsPrimitive.Content, {
868
+ var StyledContent$3 = styled(TabsPrimitive.Content, {
867
869
  flexGrow: 1,
868
870
  });
869
871
  // Exports
870
872
  var Tabs = StyledTabs;
871
873
  var TabsList = StyledList;
872
874
  var TabsTrigger = StyledTrigger$1;
873
- var TabsContent = StyledContent$2;
875
+ var TabsContent = StyledContent$3;
874
876
 
875
877
  var Tabs$1 = /*#__PURE__*/Object.freeze({
876
878
  __proto__: null,
@@ -1210,7 +1212,7 @@ var LogoCard = function (props) {
1210
1212
  var ToggleGroup = styled(ToggleGroupPrimitive.Root, {});
1211
1213
  var ToggleGroupItem = styled(ToggleGroupPrimitive.Item, {});
1212
1214
 
1213
- var IconButton = styled("button", {
1215
+ var IconButton$1 = styled("button", {
1214
1216
  //reset
1215
1217
  all: "unset",
1216
1218
  alignItems: "center",
@@ -1264,7 +1266,7 @@ var IconButton = styled("button", {
1264
1266
  },
1265
1267
  },
1266
1268
  });
1267
- var IconButtonStory = modifyVariantsForStory(IconButton);
1269
+ var IconButtonStory = modifyVariantsForStory(IconButton$1);
1268
1270
 
1269
1271
  var slideUpAndFade = keyframes({
1270
1272
  "0%": { opacity: 0, transform: "translateY(2px)" },
@@ -1282,7 +1284,7 @@ var slideLeftAndFade = keyframes({
1282
1284
  "0%": { opacity: 0, transform: "translateX(2px)" },
1283
1285
  "100%": { opacity: 1, transform: "translateX(0)" },
1284
1286
  });
1285
- var StyledContent$1 = styled(TooltipPrimitive.Content, {
1287
+ var StyledContent$2 = styled(TooltipPrimitive.Content, {
1286
1288
  borderRadius: "$1",
1287
1289
  padding: "$sm",
1288
1290
  fontSize: "$3",
@@ -1317,7 +1319,7 @@ var TooltipArrow = TooltipPrimitive.Arrow;
1317
1319
  var TooltipComponent = function (_a) {
1318
1320
  var _b = _a.side, side = _b === void 0 ? "bottom" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 5 : _c, children = _a.children, content = _a.content, showOnClick = _a.showOnClick, props = __rest(_a, ["side", "sideOffset", "children", "content", "showOnClick"]);
1319
1321
  var _d = useState(false), open = _d[0], setOpen = _d[1];
1320
- var StyledContentComp = (jsxs(StyledContent$1, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsx(StyledArrow, { className: "arrow" })] })));
1322
+ var StyledContentComp = (jsxs(StyledContent$2, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsx(StyledArrow, { className: "arrow" })] })));
1321
1323
  return (jsx(Provider, __assign({ delayDuration: 0, skipDelayDuration: 100 }, { children: showOnClick ? (jsxs(Tooltip, __assign({}, props, { open: open, onOpenChange: function () { return setOpen(false); } }, { children: [jsx(TooltipTrigger, __assign({ onClick: function () { return setOpen(true); }, asChild: true }, { children: children })), StyledContentComp] }))) : (jsxs(Tooltip, __assign({}, props, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: children })), StyledContentComp] }))) })));
1322
1324
  };
1323
1325
  TooltipComponent.displayName = "Tooltip";
@@ -1378,7 +1380,7 @@ function useTimeout(callback, delay) {
1378
1380
  return function () { return clearTimeout(id); };
1379
1381
  }, [delay]);
1380
1382
  }
1381
- var Content$2 = styled(TooltipContent, {
1383
+ var Content$3 = styled(TooltipContent, {
1382
1384
  borderRadius: "$1",
1383
1385
  backgroundColor: "$bg05",
1384
1386
  p: "$xxs",
@@ -1410,7 +1412,7 @@ var TextFieldWithCopy = forwardRef(function (_a, ref) {
1410
1412
  onChange(e);
1411
1413
  }
1412
1414
  };
1413
- 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$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
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, {})] }))] }))] })));
1414
1416
  });
1415
1417
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1416
1418
 
@@ -1486,7 +1488,7 @@ var NumberField = forwardRef(function (_a, ref) {
1486
1488
  borderRadius: 0,
1487
1489
  width: "95px",
1488
1490
  },
1489
- } }, { 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, {}) }))] })));
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, {}) }))] })));
1490
1492
  });
1491
1493
  NumberField.displayName = "NumberField";
1492
1494
 
@@ -1510,6 +1512,81 @@ var Checkbox = function (_a) {
1510
1512
  return (jsx(CheckboxRoot, __assign({}, props, { children: jsx(CheckboxIndicator, { children: jsx(CheckboxIcon, {}) }) })));
1511
1513
  };
1512
1514
 
1515
+ var overlayShow = keyframes({
1516
+ "0%": { opacity: 0 },
1517
+ "100%": { opacity: 1 },
1518
+ });
1519
+ var contentShow = keyframes({
1520
+ "0%": { opacity: 0, transform: "translate(-50%, -48%) scale(.96)" },
1521
+ "100%": { opacity: 1, transform: "translate(-50%, -50%) scale(1)" },
1522
+ });
1523
+ var StyledOverlay = styled(DialogPrimitive.Overlay, {
1524
+ backgroundColor: "hsla(190, 32%, 10%, 0.5)",
1525
+ position: "fixed",
1526
+ inset: 0,
1527
+ "@media (prefers-reduced-motion: no-preference)": {
1528
+ animation: "".concat(overlayShow, " 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards"),
1529
+ },
1530
+ });
1531
+ var StyledContent$1 = styled(DialogPrimitive.Content, {
1532
+ backgroundColor: "$bg02",
1533
+ borderRadius: 6,
1534
+ boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
1535
+ position: "fixed",
1536
+ top: "50%",
1537
+ left: "50%",
1538
+ transform: "translate(-50%, -50%)",
1539
+ width: "90vw",
1540
+ maxWidth: "450px",
1541
+ maxHeight: "85vh",
1542
+ padding: "$3xl",
1543
+ "@media (prefers-reduced-motion: no-preference)": {
1544
+ animation: "".concat(contentShow, " 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards"),
1545
+ },
1546
+ "&:focus": { outline: "none" },
1547
+ });
1548
+ var Content$2 = function (_a) {
1549
+ 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 }))] })));
1551
+ };
1552
+ var StyledTitle = styled(DialogPrimitive.Title, {
1553
+ margin: 0,
1554
+ fontWeight: "$bold",
1555
+ color: "$textLight",
1556
+ fontSize: "$8",
1557
+ textAlign: "center",
1558
+ });
1559
+ var StyledDescription = styled(DialogPrimitive.Description, {
1560
+ margin: "10px 0 20px",
1561
+ color: "$body",
1562
+ fontSize: 15,
1563
+ lineHeight: 1.5,
1564
+ });
1565
+ var Dialog = styled(DialogPrimitive.Root, {});
1566
+ var DialogTrigger = DialogPrimitive.Trigger;
1567
+ var DialogContent = Content$2;
1568
+ var DialogTitle = StyledTitle;
1569
+ var DialogDescription = StyledDescription;
1570
+ var DialogClose = DialogPrimitive.Close;
1571
+ var IconButton = styled("button", {
1572
+ all: "unset",
1573
+ fontFamily: "inherit",
1574
+ borderRadius: "100%",
1575
+ height: 25,
1576
+ width: 25,
1577
+ display: "inline-flex",
1578
+ alignItems: "center",
1579
+ justifyContent: "center",
1580
+ color: "$obolGreen",
1581
+ position: "absolute",
1582
+ top: 10,
1583
+ right: 10,
1584
+ cursor: "pointer",
1585
+ "&:hover": { backgroundColor: "$bg04" },
1586
+ "&:focus": { boxShadow: "0 0 0 2px $obolGreen" },
1587
+ });
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, {}) })) }))] })] }))); };
1589
+
1513
1590
  var slideDown = keyframes({
1514
1591
  from: { height: 0 },
1515
1592
  to: { height: "var(--radix-accordion-content-height)" },
@@ -2059,7 +2136,7 @@ var SplitterTable = function (_a) {
2059
2136
  if (onUpdateRow)
2060
2137
  onUpdateRow(row.id, value, column.accessorKey);
2061
2138
  }, 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)));
2062
- }), 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));
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));
2063
2140
  }), jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2064
2141
  };
2065
2142
  var Table = function (_a) {
@@ -2276,4 +2353,4 @@ var TwoColumnSection = function (_a) {
2276
2353
  } }, { 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" })) }))] })));
2277
2354
  };
2278
2355
 
2279
- 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, 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 };
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 };
package/dist/index.js CHANGED
@@ -9,6 +9,8 @@ var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
9
9
  var React = require('react');
10
10
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
11
11
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
12
+ var reactIcons = require('@radix-ui/react-icons');
13
+ var DialogPrimitive = require('@radix-ui/react-dialog');
12
14
  var AccordionPrimitive = require('@radix-ui/react-accordion');
13
15
  var router = require('next/router');
14
16
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
@@ -38,6 +40,7 @@ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup
38
40
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
39
41
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
40
42
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
43
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
41
44
  var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
42
45
  var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
43
46
 
@@ -895,14 +898,14 @@ var StyledTrigger$1 = styled(TabsPrimitive__namespace.Trigger, {
895
898
  boxShadow: "inset 0 -2px 0 0 currentColor",
896
899
  },
897
900
  });
898
- var StyledContent$2 = styled(TabsPrimitive__namespace.Content, {
901
+ var StyledContent$3 = styled(TabsPrimitive__namespace.Content, {
899
902
  flexGrow: 1,
900
903
  });
901
904
  // Exports
902
905
  var Tabs = StyledTabs;
903
906
  var TabsList = StyledList;
904
907
  var TabsTrigger = StyledTrigger$1;
905
- var TabsContent = StyledContent$2;
908
+ var TabsContent = StyledContent$3;
906
909
 
907
910
  var Tabs$1 = /*#__PURE__*/Object.freeze({
908
911
  __proto__: null,
@@ -1242,7 +1245,7 @@ var LogoCard = function (props) {
1242
1245
  var ToggleGroup = styled(ToggleGroupPrimitive__namespace.Root, {});
1243
1246
  var ToggleGroupItem = styled(ToggleGroupPrimitive__namespace.Item, {});
1244
1247
 
1245
- var IconButton = styled("button", {
1248
+ var IconButton$1 = styled("button", {
1246
1249
  //reset
1247
1250
  all: "unset",
1248
1251
  alignItems: "center",
@@ -1296,7 +1299,7 @@ var IconButton = styled("button", {
1296
1299
  },
1297
1300
  },
1298
1301
  });
1299
- var IconButtonStory = modifyVariantsForStory(IconButton);
1302
+ var IconButtonStory = modifyVariantsForStory(IconButton$1);
1300
1303
 
1301
1304
  var slideUpAndFade = keyframes({
1302
1305
  "0%": { opacity: 0, transform: "translateY(2px)" },
@@ -1314,7 +1317,7 @@ var slideLeftAndFade = keyframes({
1314
1317
  "0%": { opacity: 0, transform: "translateX(2px)" },
1315
1318
  "100%": { opacity: 1, transform: "translateX(0)" },
1316
1319
  });
1317
- var StyledContent$1 = styled(TooltipPrimitive__namespace.Content, {
1320
+ var StyledContent$2 = styled(TooltipPrimitive__namespace.Content, {
1318
1321
  borderRadius: "$1",
1319
1322
  padding: "$sm",
1320
1323
  fontSize: "$3",
@@ -1349,7 +1352,7 @@ var TooltipArrow = TooltipPrimitive__namespace.Arrow;
1349
1352
  var TooltipComponent = function (_a) {
1350
1353
  var _b = _a.side, side = _b === void 0 ? "bottom" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 5 : _c, children = _a.children, content = _a.content, showOnClick = _a.showOnClick, props = __rest(_a, ["side", "sideOffset", "children", "content", "showOnClick"]);
1351
1354
  var _d = React.useState(false), open = _d[0], setOpen = _d[1];
1352
- var StyledContentComp = (jsxRuntime.jsxs(StyledContent$1, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsxRuntime.jsx(StyledArrow, { className: "arrow" })] })));
1355
+ var StyledContentComp = (jsxRuntime.jsxs(StyledContent$2, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsxRuntime.jsx(StyledArrow, { className: "arrow" })] })));
1353
1356
  return (jsxRuntime.jsx(Provider, __assign({ delayDuration: 0, skipDelayDuration: 100 }, { children: showOnClick ? (jsxRuntime.jsxs(Tooltip, __assign({}, props, { open: open, onOpenChange: function () { return setOpen(false); } }, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ onClick: function () { return setOpen(true); }, asChild: true }, { children: children })), StyledContentComp] }))) : (jsxRuntime.jsxs(Tooltip, __assign({}, props, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: children })), StyledContentComp] }))) })));
1354
1357
  };
1355
1358
  TooltipComponent.displayName = "Tooltip";
@@ -1410,7 +1413,7 @@ function useTimeout(callback, delay) {
1410
1413
  return function () { return clearTimeout(id); };
1411
1414
  }, [delay]);
1412
1415
  }
1413
- var Content$2 = styled(TooltipContent, {
1416
+ var Content$3 = styled(TooltipContent, {
1414
1417
  borderRadius: "$1",
1415
1418
  backgroundColor: "$bg05",
1416
1419
  p: "$xxs",
@@ -1442,7 +1445,7 @@ var TextFieldWithCopy = React.forwardRef(function (_a, ref) {
1442
1445
  onChange(e);
1443
1446
  }
1444
1447
  };
1445
- 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$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
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, {})] }))] }))] })));
1446
1449
  });
1447
1450
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1448
1451
 
@@ -1518,7 +1521,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
1518
1521
  borderRadius: 0,
1519
1522
  width: "95px",
1520
1523
  },
1521
- } }, { 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, {}) }))] })));
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, {}) }))] })));
1522
1525
  });
1523
1526
  NumberField.displayName = "NumberField";
1524
1527
 
@@ -1542,6 +1545,81 @@ var Checkbox = function (_a) {
1542
1545
  return (jsxRuntime.jsx(CheckboxRoot, __assign({}, props, { children: jsxRuntime.jsx(CheckboxIndicator, { children: jsxRuntime.jsx(CheckboxIcon, {}) }) })));
1543
1546
  };
1544
1547
 
1548
+ var overlayShow = keyframes({
1549
+ "0%": { opacity: 0 },
1550
+ "100%": { opacity: 1 },
1551
+ });
1552
+ var contentShow = keyframes({
1553
+ "0%": { opacity: 0, transform: "translate(-50%, -48%) scale(.96)" },
1554
+ "100%": { opacity: 1, transform: "translate(-50%, -50%) scale(1)" },
1555
+ });
1556
+ var StyledOverlay = styled(DialogPrimitive__namespace.Overlay, {
1557
+ backgroundColor: "hsla(190, 32%, 10%, 0.5)",
1558
+ position: "fixed",
1559
+ inset: 0,
1560
+ "@media (prefers-reduced-motion: no-preference)": {
1561
+ animation: "".concat(overlayShow, " 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards"),
1562
+ },
1563
+ });
1564
+ var StyledContent$1 = styled(DialogPrimitive__namespace.Content, {
1565
+ backgroundColor: "$bg02",
1566
+ borderRadius: 6,
1567
+ boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
1568
+ position: "fixed",
1569
+ top: "50%",
1570
+ left: "50%",
1571
+ transform: "translate(-50%, -50%)",
1572
+ width: "90vw",
1573
+ maxWidth: "450px",
1574
+ maxHeight: "85vh",
1575
+ padding: "$3xl",
1576
+ "@media (prefers-reduced-motion: no-preference)": {
1577
+ animation: "".concat(contentShow, " 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards"),
1578
+ },
1579
+ "&:focus": { outline: "none" },
1580
+ });
1581
+ var Content$2 = function (_a) {
1582
+ 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 }))] })));
1584
+ };
1585
+ var StyledTitle = styled(DialogPrimitive__namespace.Title, {
1586
+ margin: 0,
1587
+ fontWeight: "$bold",
1588
+ color: "$textLight",
1589
+ fontSize: "$8",
1590
+ textAlign: "center",
1591
+ });
1592
+ var StyledDescription = styled(DialogPrimitive__namespace.Description, {
1593
+ margin: "10px 0 20px",
1594
+ color: "$body",
1595
+ fontSize: 15,
1596
+ lineHeight: 1.5,
1597
+ });
1598
+ var Dialog = styled(DialogPrimitive__namespace.Root, {});
1599
+ var DialogTrigger = DialogPrimitive__namespace.Trigger;
1600
+ var DialogContent = Content$2;
1601
+ var DialogTitle = StyledTitle;
1602
+ var DialogDescription = StyledDescription;
1603
+ var DialogClose = DialogPrimitive__namespace.Close;
1604
+ var IconButton = styled("button", {
1605
+ all: "unset",
1606
+ fontFamily: "inherit",
1607
+ borderRadius: "100%",
1608
+ height: 25,
1609
+ width: 25,
1610
+ display: "inline-flex",
1611
+ alignItems: "center",
1612
+ justifyContent: "center",
1613
+ color: "$obolGreen",
1614
+ position: "absolute",
1615
+ top: 10,
1616
+ right: 10,
1617
+ cursor: "pointer",
1618
+ "&:hover": { backgroundColor: "$bg04" },
1619
+ "&:focus": { boxShadow: "0 0 0 2px $obolGreen" },
1620
+ });
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, {}) })) }))] })] }))); };
1622
+
1545
1623
  var slideDown = keyframes({
1546
1624
  from: { height: 0 },
1547
1625
  to: { height: "var(--radix-accordion-content-height)" },
@@ -2091,7 +2169,7 @@ var SplitterTable = function (_a) {
2091
2169
  if (onUpdateRow)
2092
2170
  onUpdateRow(row.id, value, column.accessorKey);
2093
2171
  }, 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)));
2094
- }), 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));
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));
2095
2173
  }), jsxRuntime.jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2096
2174
  };
2097
2175
  var Table = function (_a) {
@@ -2332,6 +2410,13 @@ exports.CodeIcon = CodeIcon;
2332
2410
  exports.Container = Container;
2333
2411
  exports.CopyIcon = CopyIcon;
2334
2412
  exports.CreateIcon = CreateIcon;
2413
+ exports.Dialog = Dialog;
2414
+ exports.DialogClose = DialogClose;
2415
+ exports.DialogComponent = DialogComponent;
2416
+ exports.DialogContent = DialogContent;
2417
+ exports.DialogDescription = DialogDescription;
2418
+ exports.DialogTitle = DialogTitle;
2419
+ exports.DialogTrigger = DialogTrigger;
2335
2420
  exports.Download = Download;
2336
2421
  exports.ExistingGroupIcon = ExistingGroupIcon;
2337
2422
  exports.Flex = Flex;
@@ -2342,7 +2427,7 @@ exports.HelpIcon = HelpIcon;
2342
2427
  exports.HeroSection = HeroSection;
2343
2428
  exports.Hexapod = Hexapod;
2344
2429
  exports.HexapodMobile = HexapodMobile;
2345
- exports.IconButton = IconButton;
2430
+ exports.IconButton = IconButton$1;
2346
2431
  exports.IconButtonStory = IconButtonStory;
2347
2432
  exports.Image = Image;
2348
2433
  exports.Link = Link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",