@obolnetwork/obol-ui 1.0.30 → 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.
@@ -6,8 +6,9 @@ export declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrim
6
6
  export declare const TooltipContent: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
7
7
  export declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
8
8
  export interface TooltipComponentProps extends TooltipPrimitive.TooltipProps {
9
+ content: React.ReactNode | string;
9
10
  side?: "top" | "bottom" | "right" | "left";
10
11
  sideOffset?: number;
11
- content: React.ReactNode | string;
12
+ showOnClick?: boolean;
12
13
  }
13
14
  export declare const TooltipComponent: React.FC<TooltipComponentProps>;
@@ -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
@@ -2,9 +2,11 @@ import { createStitches } from '@stitches/react';
2
2
  import * as TabsPrimitive from '@radix-ui/react-tabs';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
5
- import React, { forwardRef, useState, useRef, useImperativeHandle, useEffect, useLayoutEffect } from 'react';
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,
@@ -1134,11 +1136,10 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ className:
1134
1136
  borderRadius: "$3",
1135
1137
  backgroundColor: "$bg04",
1136
1138
  alignItems: "center",
1137
- justifyItems: "center",
1138
1139
  width: "288px",
1139
1140
  gap: "$lg",
1140
1141
  py: "$xl",
1141
- "@sm": { gridTemplateColumns: "1fr 2fr", p: "$sm" },
1142
+ "@sm": { gridTemplateColumns: "1fr 2fr", p: "$sm", height: "116px" },
1142
1143
  } }, { children: [jsx(Box, __assign({ css: {
1143
1144
  $$size: "160px",
1144
1145
  width: "$$size",
@@ -1160,7 +1161,7 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ className:
1160
1161
  } }, { children: jsx(Image, { placeholder: "blur", alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxs(Box, __assign({ css: {
1161
1162
  display: "grid",
1162
1163
  justifyContent: "center",
1163
- "@sm": { justifyContent: "start" },
1164
+ "@sm": { justifyContent: "start", gridTemplateRows: "3fr 1fr" },
1164
1165
  gap: "$sm",
1165
1166
  } }, { children: [jsxs(Box, __assign({ css: {
1166
1167
  display: "flex",
@@ -1211,7 +1212,7 @@ var LogoCard = function (props) {
1211
1212
  var ToggleGroup = styled(ToggleGroupPrimitive.Root, {});
1212
1213
  var ToggleGroupItem = styled(ToggleGroupPrimitive.Item, {});
1213
1214
 
1214
- var IconButton = styled("button", {
1215
+ var IconButton$1 = styled("button", {
1215
1216
  //reset
1216
1217
  all: "unset",
1217
1218
  alignItems: "center",
@@ -1265,7 +1266,7 @@ var IconButton = styled("button", {
1265
1266
  },
1266
1267
  },
1267
1268
  });
1268
- var IconButtonStory = modifyVariantsForStory(IconButton);
1269
+ var IconButtonStory = modifyVariantsForStory(IconButton$1);
1269
1270
 
1270
1271
  var slideUpAndFade = keyframes({
1271
1272
  "0%": { opacity: 0, transform: "translateY(2px)" },
@@ -1283,7 +1284,7 @@ var slideLeftAndFade = keyframes({
1283
1284
  "0%": { opacity: 0, transform: "translateX(2px)" },
1284
1285
  "100%": { opacity: 1, transform: "translateX(0)" },
1285
1286
  });
1286
- var StyledContent$1 = styled(TooltipPrimitive.Content, {
1287
+ var StyledContent$2 = styled(TooltipPrimitive.Content, {
1287
1288
  borderRadius: "$1",
1288
1289
  padding: "$sm",
1289
1290
  fontSize: "$3",
@@ -1316,8 +1317,10 @@ var TooltipTrigger = TooltipPrimitive.Trigger;
1316
1317
  var TooltipContent = TooltipPrimitive.Content;
1317
1318
  var TooltipArrow = TooltipPrimitive.Arrow;
1318
1319
  var TooltipComponent = function (_a) {
1319
- 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, props = __rest(_a, ["side", "sideOffset", "children", "content"]);
1320
- return (jsxs(Tooltip, __assign({}, props, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: children })), jsxs(StyledContent$1, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsx(StyledArrow, { className: "arrow" })] }))] })));
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"]);
1321
+ var _d = useState(false), open = _d[0], setOpen = _d[1];
1322
+ var StyledContentComp = (jsxs(StyledContent$2, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsx(StyledArrow, { className: "arrow" })] })));
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] }))) })));
1321
1324
  };
1322
1325
  TooltipComponent.displayName = "Tooltip";
1323
1326
 
@@ -1377,7 +1380,7 @@ function useTimeout(callback, delay) {
1377
1380
  return function () { return clearTimeout(id); };
1378
1381
  }, [delay]);
1379
1382
  }
1380
- var Content$2 = styled(TooltipContent, {
1383
+ var Content$3 = styled(TooltipContent, {
1381
1384
  borderRadius: "$1",
1382
1385
  backgroundColor: "$bg05",
1383
1386
  p: "$xxs",
@@ -1409,7 +1412,7 @@ var TextFieldWithCopy = forwardRef(function (_a, ref) {
1409
1412
  onChange(e);
1410
1413
  }
1411
1414
  };
1412
- 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, {})] }))] }))] })));
1413
1416
  });
1414
1417
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1415
1418
 
@@ -1485,7 +1488,7 @@ var NumberField = forwardRef(function (_a, ref) {
1485
1488
  borderRadius: 0,
1486
1489
  width: "95px",
1487
1490
  },
1488
- } }, { 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, {}) }))] })));
1489
1492
  });
1490
1493
  NumberField.displayName = "NumberField";
1491
1494
 
@@ -1509,6 +1512,81 @@ var Checkbox = function (_a) {
1509
1512
  return (jsx(CheckboxRoot, __assign({}, props, { children: jsx(CheckboxIndicator, { children: jsx(CheckboxIcon, {}) }) })));
1510
1513
  };
1511
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
+
1512
1590
  var slideDown = keyframes({
1513
1591
  from: { height: 0 },
1514
1592
  to: { height: "var(--radix-accordion-content-height)" },
@@ -2058,7 +2136,7 @@ var SplitterTable = function (_a) {
2058
2136
  if (onUpdateRow)
2059
2137
  onUpdateRow(row.id, value, column.accessorKey);
2060
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)));
2061
- }), 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));
2062
2140
  }), jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2063
2141
  };
2064
2142
  var Table = function (_a) {
@@ -2275,4 +2353,4 @@ var TwoColumnSection = function (_a) {
2275
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" })) }))] })));
2276
2354
  };
2277
2355
 
2278
- 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,
@@ -1166,11 +1169,10 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
1166
1169
  borderRadius: "$3",
1167
1170
  backgroundColor: "$bg04",
1168
1171
  alignItems: "center",
1169
- justifyItems: "center",
1170
1172
  width: "288px",
1171
1173
  gap: "$lg",
1172
1174
  py: "$xl",
1173
- "@sm": { gridTemplateColumns: "1fr 2fr", p: "$sm" },
1175
+ "@sm": { gridTemplateColumns: "1fr 2fr", p: "$sm", height: "116px" },
1174
1176
  } }, { children: [jsxRuntime.jsx(Box, __assign({ css: {
1175
1177
  $$size: "160px",
1176
1178
  width: "$$size",
@@ -1192,7 +1194,7 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
1192
1194
  } }, { children: jsxRuntime.jsx(Image, { placeholder: "blur", alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxRuntime.jsxs(Box, __assign({ css: {
1193
1195
  display: "grid",
1194
1196
  justifyContent: "center",
1195
- "@sm": { justifyContent: "start" },
1197
+ "@sm": { justifyContent: "start", gridTemplateRows: "3fr 1fr" },
1196
1198
  gap: "$sm",
1197
1199
  } }, { children: [jsxRuntime.jsxs(Box, __assign({ css: {
1198
1200
  display: "flex",
@@ -1243,7 +1245,7 @@ var LogoCard = function (props) {
1243
1245
  var ToggleGroup = styled(ToggleGroupPrimitive__namespace.Root, {});
1244
1246
  var ToggleGroupItem = styled(ToggleGroupPrimitive__namespace.Item, {});
1245
1247
 
1246
- var IconButton = styled("button", {
1248
+ var IconButton$1 = styled("button", {
1247
1249
  //reset
1248
1250
  all: "unset",
1249
1251
  alignItems: "center",
@@ -1297,7 +1299,7 @@ var IconButton = styled("button", {
1297
1299
  },
1298
1300
  },
1299
1301
  });
1300
- var IconButtonStory = modifyVariantsForStory(IconButton);
1302
+ var IconButtonStory = modifyVariantsForStory(IconButton$1);
1301
1303
 
1302
1304
  var slideUpAndFade = keyframes({
1303
1305
  "0%": { opacity: 0, transform: "translateY(2px)" },
@@ -1315,7 +1317,7 @@ var slideLeftAndFade = keyframes({
1315
1317
  "0%": { opacity: 0, transform: "translateX(2px)" },
1316
1318
  "100%": { opacity: 1, transform: "translateX(0)" },
1317
1319
  });
1318
- var StyledContent$1 = styled(TooltipPrimitive__namespace.Content, {
1320
+ var StyledContent$2 = styled(TooltipPrimitive__namespace.Content, {
1319
1321
  borderRadius: "$1",
1320
1322
  padding: "$sm",
1321
1323
  fontSize: "$3",
@@ -1348,8 +1350,10 @@ var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
1348
1350
  var TooltipContent = TooltipPrimitive__namespace.Content;
1349
1351
  var TooltipArrow = TooltipPrimitive__namespace.Arrow;
1350
1352
  var TooltipComponent = function (_a) {
1351
- 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, props = __rest(_a, ["side", "sideOffset", "children", "content"]);
1352
- return (jsxRuntime.jsxs(Tooltip, __assign({}, props, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: children })), jsxRuntime.jsxs(StyledContent$1, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsxRuntime.jsx(StyledArrow, { className: "arrow" })] }))] })));
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"]);
1354
+ var _d = React.useState(false), open = _d[0], setOpen = _d[1];
1355
+ var StyledContentComp = (jsxRuntime.jsxs(StyledContent$2, __assign({ className: "tooltip-content", side: side, sideOffset: sideOffset }, { children: [content, jsxRuntime.jsx(StyledArrow, { className: "arrow" })] })));
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] }))) })));
1353
1357
  };
1354
1358
  TooltipComponent.displayName = "Tooltip";
1355
1359
 
@@ -1409,7 +1413,7 @@ function useTimeout(callback, delay) {
1409
1413
  return function () { return clearTimeout(id); };
1410
1414
  }, [delay]);
1411
1415
  }
1412
- var Content$2 = styled(TooltipContent, {
1416
+ var Content$3 = styled(TooltipContent, {
1413
1417
  borderRadius: "$1",
1414
1418
  backgroundColor: "$bg05",
1415
1419
  p: "$xxs",
@@ -1441,7 +1445,7 @@ var TextFieldWithCopy = React.forwardRef(function (_a, ref) {
1441
1445
  onChange(e);
1442
1446
  }
1443
1447
  };
1444
- 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, {})] }))] }))] })));
1445
1449
  });
1446
1450
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1447
1451
 
@@ -1517,7 +1521,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
1517
1521
  borderRadius: 0,
1518
1522
  width: "95px",
1519
1523
  },
1520
- } }, { 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, {}) }))] })));
1521
1525
  });
1522
1526
  NumberField.displayName = "NumberField";
1523
1527
 
@@ -1541,6 +1545,81 @@ var Checkbox = function (_a) {
1541
1545
  return (jsxRuntime.jsx(CheckboxRoot, __assign({}, props, { children: jsxRuntime.jsx(CheckboxIndicator, { children: jsxRuntime.jsx(CheckboxIcon, {}) }) })));
1542
1546
  };
1543
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
+
1544
1623
  var slideDown = keyframes({
1545
1624
  from: { height: 0 },
1546
1625
  to: { height: "var(--radix-accordion-content-height)" },
@@ -2090,7 +2169,7 @@ var SplitterTable = function (_a) {
2090
2169
  if (onUpdateRow)
2091
2170
  onUpdateRow(row.id, value, column.accessorKey);
2092
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)));
2093
- }), 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));
2094
2173
  }), jsxRuntime.jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2095
2174
  };
2096
2175
  var Table = function (_a) {
@@ -2331,6 +2410,13 @@ exports.CodeIcon = CodeIcon;
2331
2410
  exports.Container = Container;
2332
2411
  exports.CopyIcon = CopyIcon;
2333
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;
2334
2420
  exports.Download = Download;
2335
2421
  exports.ExistingGroupIcon = ExistingGroupIcon;
2336
2422
  exports.Flex = Flex;
@@ -2341,7 +2427,7 @@ exports.HelpIcon = HelpIcon;
2341
2427
  exports.HeroSection = HeroSection;
2342
2428
  exports.Hexapod = Hexapod;
2343
2429
  exports.HexapodMobile = HexapodMobile;
2344
- exports.IconButton = IconButton;
2430
+ exports.IconButton = IconButton$1;
2345
2431
  exports.IconButtonStory = IconButtonStory;
2346
2432
  exports.Image = Image;
2347
2433
  exports.Link = Link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",