@obolnetwork/obol-ui 1.0.13 → 1.0.15

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,5 +1,4 @@
1
- import ImageNext from "next/image";
2
- export declare const Image: import("@stitches/react/types/styled-component").StyledComponent<typeof ImageNext, {}, {
1
+ export declare const Image: import("@stitches/react/types/styled-component").StyledComponent<"img", {}, {
3
2
  motion: "(prefers-reduced-motion)";
4
3
  hover: "(any-hover: hover)";
5
4
  dark: "(prefers-color-scheme: dark)";
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { CSS } from "../../../stitches.config";
3
- import { ComponentProps } from "../Button/Button";
4
- interface LoadingButtonProps extends ComponentProps {
3
+ import { ButtonComponentProps } from "../Button/Button";
4
+ interface LoadingButtonProps extends ButtonComponentProps {
5
5
  css?: CSS;
6
6
  }
7
7
  export declare const LoadingButton: React.FC<LoadingButtonProps>;
@@ -1,9 +1,11 @@
1
- /// <reference types="react" />
1
+ import { FocusEventHandler } from "react";
2
2
  interface NumberFieldProps {
3
- value?: number;
4
- onChangeValue?(value: number): void;
5
3
  max?: number;
6
4
  min?: number;
5
+ value?: number;
6
+ onChangeValue?(value: number): void;
7
+ onBlur?: FocusEventHandler<HTMLInputElement> | undefined;
8
+ name?: string;
7
9
  }
8
10
  export declare const NumberField: import("react").ForwardRefExoticComponent<NumberFieldProps & import("react").RefAttributes<HTMLInputElement>>;
9
11
  export {};
@@ -23,9 +23,9 @@ export interface TableProps {
23
23
  columns: ColumnDef<any>[];
24
24
  }
25
25
  export interface SplitterTableProps extends TableProps {
26
- onAddRow(item: string): void;
26
+ onAddRow(item?: unknown): void;
27
27
  onRemoveRow(item: string | number): void;
28
- onUpdateRow(id: string, value: string, accessorKey: unknown): void;
28
+ onUpdateRow(id: string, value: string | number, accessorKey: unknown): void;
29
29
  removeButton?: boolean;
30
30
  }
31
31
  export declare const SplitterTable: React.FC<SplitterTableProps>;
package/dist/index.es.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createStitches } from '@stitches/react';
2
2
  import * as TabsPrimitive from '@radix-ui/react-tabs';
3
- import Image$1 from 'next/image';
4
3
  import { jsx, jsxs } from 'react/jsx-runtime';
5
4
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
6
5
  import React, { forwardRef, useState, useRef, useEffect, useLayoutEffect } from 'react';
@@ -927,7 +926,12 @@ var Container = styled(Box, {
927
926
  },
928
927
  });
929
928
 
930
- var Image = styled(Image$1, {});
929
+ var Image = styled('img', {
930
+ // reset
931
+ verticalAlign: "middle",
932
+ maxWidth: "100%",
933
+ maxHeight: "100%",
934
+ });
931
935
 
932
936
  var ArrowForward = function (props) { return (jsx(SvgIcon, __assign({}, props, { children: jsx("path", { d: "M9.99992 3.3335L9.05992 4.2735L12.1133 7.3335H1.33325V8.66683H12.1133L9.05325 11.7268L9.99992 12.6668L14.6666 8.00016L9.99992 3.3335Z", stroke: "currentColor", fill: "currentColor" }) }))); };
933
937
 
@@ -1114,7 +1118,7 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ css: {
1114
1118
  "@sm": { $$size: "100px" },
1115
1119
  "&::after": {
1116
1120
  position: "absolute",
1117
- marginTop: "-163.5px",
1121
+ marginTop: "-160px",
1118
1122
  borderRadius: "$round",
1119
1123
  display: "block",
1120
1124
  content: "",
@@ -1122,10 +1126,10 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ css: {
1122
1126
  height: "$$size",
1123
1127
  background: "hsla(161, 77%, 54%, 0.2)",
1124
1128
  "@sm": {
1125
- marginTop: "-103.5px",
1129
+ marginTop: "-100px",
1126
1130
  },
1127
1131
  },
1128
- } }, { children: jsx(Image, { placeholder: 'blur', blurDataURL: "/assets/team/Collin.png", alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxs(Box, __assign({ css: {
1132
+ } }, { children: jsx(Image, { placeholder: "blur", alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxs(Box, __assign({ css: {
1129
1133
  display: "grid",
1130
1134
  justifyContent: "center",
1131
1135
  "@sm": { justifyContent: "start" },
@@ -1166,7 +1170,13 @@ var LogoCard = function (props) {
1166
1170
  width: "auto",
1167
1171
  height: "60px",
1168
1172
  },
1169
- }, target: "_blank", href: props.logoCardLink }, { children: jsx(Box, __assign({ css: { position: "relative", width: "100%", height: "100%" } }, { children: jsx(Image, { src: props.image, layout: "fill", objectFit: "contain", alt: props.heading, quality: 100 }) })) })));
1173
+ }, target: "_blank", href: props.logoCardLink }, { children: jsx(Box, __assign({ className: "logo-card-container", css: {
1174
+ display: "flex",
1175
+ justifyContent: "center",
1176
+ position: "relative",
1177
+ width: "100%",
1178
+ height: "100%",
1179
+ } }, { children: jsx(Image, { css: { objectFit: "contain" }, src: props.image, alt: props.heading }) })) })));
1170
1180
  };
1171
1181
 
1172
1182
  // Exports
@@ -1363,11 +1373,11 @@ var TextFieldWithCopy = forwardRef(function (props, ref) {
1363
1373
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1364
1374
 
1365
1375
  var NumberField = forwardRef(function (_a, ref) {
1366
- var _b = _a.max, max = _b === void 0 ? 10 : _b, _c = _a.min, min = _c === void 0 ? 1 : _c, value = _a.value, onChangeValue = _a.onChangeValue;
1376
+ var _b = _a.max, max = _b === void 0 ? 10 : _b, _c = _a.min, min = _c === void 0 ? 0 : _c, value = _a.value, onChangeValue = _a.onChangeValue, onBlur = _a.onBlur, name = _a.name;
1367
1377
  var _d = useState(value || min), qty = _d[0], setQty = _d[1];
1368
1378
  var handleOnDec = function (e) {
1369
1379
  e.preventDefault();
1370
- if (qty <= min) {
1380
+ if (qty < min) {
1371
1381
  setQty(min);
1372
1382
  }
1373
1383
  else {
@@ -1384,7 +1394,7 @@ var NumberField = forwardRef(function (_a, ref) {
1384
1394
  }
1385
1395
  };
1386
1396
  var handleOnChange = function (e) {
1387
- var value = e.target;
1397
+ var value = e.target.value;
1388
1398
  if (value > max) {
1389
1399
  setQty(max);
1390
1400
  }
@@ -1399,9 +1409,10 @@ var NumberField = forwardRef(function (_a, ref) {
1399
1409
  if (qty && onChangeValue) {
1400
1410
  onChangeValue(qty);
1401
1411
  }
1402
- }, [qty, onChangeValue]);
1412
+ }, [qty]);
1403
1413
  return (jsxs(Box, __assign({ css: {
1404
1414
  display: "flex",
1415
+ maxHeight: "$3xl",
1405
1416
  "input::-webkit-inner-spin-button": {
1406
1417
  "-webkit-appearance": "none",
1407
1418
  margin: 0,
@@ -1433,7 +1444,7 @@ var NumberField = forwardRef(function (_a, ref) {
1433
1444
  borderRadius: 0,
1434
1445
  width: "95px",
1435
1446
  },
1436
- } }, { children: [jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: "-" })), jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange }), jsx(IconButton, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: "+" }))] })));
1447
+ } }, { children: [jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: "-" })), 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: "+" }))] })));
1437
1448
  });
1438
1449
  NumberField.displayName = "NumberField";
1439
1450
 
@@ -1560,9 +1571,11 @@ var AdvisoryToggleBullet = function (props) {
1560
1571
  } }, { children: props.rank }))), jsx(Text, __assign({ color: color }, { children: props.children }))] })));
1561
1572
  };
1562
1573
 
1563
- var CardImage = styled(Image$1, {
1574
+ var CardImage = styled(Image, {
1564
1575
  btrr: "$4",
1565
1576
  btlr: "$4",
1577
+ width: "100%",
1578
+ height: "100%",
1566
1579
  });
1567
1580
  var ToggleCardItem = styled(ToggleGroupItem, {
1568
1581
  all: "unset",
@@ -1609,7 +1622,7 @@ var Card = function (_a) {
1609
1622
  "@sm": {
1610
1623
  width: "$full",
1611
1624
  },
1612
- } }, { children: jsx(CardImage, { src: props.image, layout: "fill", objectFit: "fill", alt: props.heading }) }))), jsxs(Box, __assign({ className: "box-card-icon", css: {
1625
+ } }, { children: jsx(CardImage, { src: props.image, alt: props.heading }) }))), jsxs(Box, __assign({ className: "box-card-icon", css: {
1613
1626
  display: "flex",
1614
1627
  p: "$xl",
1615
1628
  gap: "$xl",
@@ -1757,14 +1770,14 @@ var ProgressTracker = function (props) {
1757
1770
  display: "flex",
1758
1771
  justifyContent: "space-between",
1759
1772
  alignItems: "center",
1760
- } }, { children: items.map(function (item, index) { return (jsx(Link, __assign({ disabled: item.status === "incomplete", href: item.status === "incomplete" ? "javascript:void(0)" : item.href }, { children: item.title }), ":l".concat(index))); }) }))] })) })));
1773
+ } }, { children: items.map(function (item, index) { return (jsx(Link, __assign({ disabled: item.status === "incomplete", href: item.status === "incomplete" ? "#" : item.href }, { children: item.title }), ":l".concat(index))); }) }))] })) })));
1761
1774
  };
1762
1775
 
1763
1776
  var StyledRadio = styled(RadioGroupPrimitive.Item, {
1764
1777
  all: "unset",
1765
1778
  backgroundColor: "$obolGreen",
1766
- width: 25,
1767
- height: 25,
1779
+ width: 18,
1780
+ height: 18,
1768
1781
  borderRadius: "100%",
1769
1782
  "&:hover": { filter: "brightness(90%)", cursor: "pointer" },
1770
1783
  });
@@ -1779,10 +1792,10 @@ var StyledIndicator = styled(RadioGroupPrimitive.Indicator, {
1779
1792
  content: '""',
1780
1793
  display: "absolute",
1781
1794
  position: "absolute",
1782
- width: 11,
1783
- height: 11,
1795
+ width: 10,
1796
+ height: 10,
1784
1797
  borderRadius: "50%",
1785
- boxShadow: "0 0 0 4px #0E1E22",
1798
+ boxShadow: "0 0 0 2px #0E1E22",
1786
1799
  backgroundColor: "#2FE4AB",
1787
1800
  },
1788
1801
  });
@@ -1792,6 +1805,7 @@ var RadioGroupRadio = StyledRadio;
1792
1805
  var RadioGroupIndicator = StyledIndicator;
1793
1806
  var RadioGroupItemLabel = styled("label", {
1794
1807
  color: "$textLight",
1808
+ fontWeight: "$bold",
1795
1809
  fontSize: "$3",
1796
1810
  lineHeight: 1,
1797
1811
  userSelect: "none",
@@ -1801,7 +1815,7 @@ var RadioGroupItemLabel = styled("label", {
1801
1815
  var RadioGroupItem = function (_a) {
1802
1816
  var value = _a.value, label = _a.label, _b = _a.index, index = _b === void 0 ? 1 : _b;
1803
1817
  var id = "id-:r".concat(index, ":");
1804
- return (jsxs(Box, __assign({ css: { display: "flex", margin: "10px 0", alignItems: "center" } }, { children: [jsx(RadioGroupRadio, __assign({ value: value, id: id }, { children: jsx(RadioGroupPrimitive.RadioGroupIndicator, {}) })), jsx(RadioGroupItemLabel, __assign({ htmlFor: id }, { children: label }))] })));
1818
+ return (jsxs(Box, __assign({ css: { display: "flex", margin: "10px 0", alignItems: "center" } }, { children: [jsx(RadioGroupRadio, __assign({ value: value, id: id }, { children: jsx(RadioGroupPrimitive.RadioGroupIndicator, { className: "indicator" }) })), jsx(RadioGroupItemLabel, __assign({ htmlFor: id }, { children: label }))] })));
1805
1819
  };
1806
1820
  var RadioGroupComponent = function (_a) {
1807
1821
  var items = _a.items, value = _a.value, onValueChange = _a.onValueChange, props = __rest(_a, ["items", "value", "onValueChange"]);
@@ -1846,6 +1860,7 @@ var Td = styled("td", {
1846
1860
  noPadding: {
1847
1861
  true: {
1848
1862
  p: 0,
1863
+ backgroundColor: "$bg03",
1849
1864
  },
1850
1865
  },
1851
1866
  size: {
@@ -1876,7 +1891,6 @@ var SplitterTable = function (_a) {
1876
1891
  var rows = _a.rows, columns = _a.columns, onAddRow = _a.onAddRow, onRemoveRow = _a.onRemoveRow, onUpdateRow = _a.onUpdateRow, _b = _a.removeButton, removeButton = _b === void 0 ? true : _b;
1877
1892
  return (jsxs(StyledTable, { children: [jsxs("thead", { children: [jsx(Td, {}), columns.map(function (column, index) { return (jsx(Td, __assign({ css: { textAlign: "start" } }, { children: column.header }), "header-".concat(index))); }), jsx(Td, {})] }), jsxs("tbody", { children: [rows.map(function (row, rowIndex) { return (jsxs("tr", { children: [jsx(Td, __assign({ size: "sm" }, { children: rowIndex + 1 })), columns.map(function (column, cellIndex) {
1878
1893
  var _a;
1879
- // if (column === "id") return null;
1880
1894
  var isTextField = !!column.cell;
1881
1895
  return (jsx(Td, __assign({ noPadding: true, css: {
1882
1896
  "input::-webkit-inner-spin-button": {
@@ -1887,10 +1901,17 @@ var SplitterTable = function (_a) {
1887
1901
  "input[type=number]": {
1888
1902
  "-moz-appearance": "textfield",
1889
1903
  },
1890
- } }, { children: isTextField ? (jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onChange: function (e) {
1891
- return onUpdateRow(row.id, e.target.value, column.accessorKey);
1904
+ } }, { children: isTextField ? (jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
1905
+ if (Number(e.target.value) > 100)
1906
+ e.target.value = 100;
1907
+ }, onChange: function (e) {
1908
+ var _a, _b;
1909
+ var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
1910
+ ? Number(e.target.value)
1911
+ : e.target.value;
1912
+ onUpdateRow(row.id, value, column.accessorKey);
1892
1913
  } }, (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config))) : (row[column.accessorKey]) }), "cell ".concat(cellIndex)));
1893
- }), removeButton && (jsx(Td, __assign({ size: "sm" }, { children: jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsx(TrashIcon, {}) })) })))] }, row.id)); }), jsx(AddNewRow, { handleOnClick: function () { return onAddRow(""); } })] })] }));
1914
+ }), removeButton && (jsx(Td, __assign({ size: "sm" }, { children: jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsx(TrashIcon, {}) })) })))] }, row.id)); }), jsx(AddNewRow, { handleOnClick: function () { return onAddRow(); } })] })] }));
1894
1915
  };
1895
1916
  var Table = function (_a) {
1896
1917
  var rows = _a.rows, columns = _a.columns;
@@ -2060,7 +2081,7 @@ var HeroSection = function (_a) {
2060
2081
  display: "flex",
2061
2082
  justifyContent: "flex-end",
2062
2083
  alignItems: "center",
2063
- } }, { children: jsx(Image$1, { priority: true, src: (image === null || image === void 0 ? void 0 : image.basePath) || MOBILE_PATH, alt: "Obol Logo", width: 343, height: 226 }) }))), jsx(Text, __assign({ css: {
2084
+ } }, { children: jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || MOBILE_PATH, alt: "Obol Logo", width: 343, height: 226 }) }))), jsx(Text, __assign({ css: {
2064
2085
  width: "80%",
2065
2086
  lineHeight: "$xl",
2066
2087
  "@sm": {
@@ -2072,7 +2093,7 @@ var HeroSection = function (_a) {
2072
2093
  display: "flex",
2073
2094
  justifyContent: "flex-end",
2074
2095
  alignItems: "center",
2075
- } }, { children: jsx(Image$1, { priority: true, src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
2096
+ } }, { children: jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
2076
2097
  };
2077
2098
 
2078
2099
  var TwoColumnSection = function (_a) {
@@ -2100,7 +2121,7 @@ var TwoColumnSection = function (_a) {
2100
2121
  "@md": {
2101
2122
  m: "0",
2102
2123
  },
2103
- } }, { children: !screenDownSm ? (jsx(Image$1, { src: image.basePath, alt: "Obol Logo", objectFit: "fill", layout: "fill" })) : (jsx(Image$1, { src: image.mobilePath || image.basePath, alt: "Obol Logo", objectFit: "fill", layout: "fill" })) }))] })));
2124
+ } }, { 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" })) }))] })));
2104
2125
  };
2105
2126
 
2106
2127
  export { Accordion, Advisory, AdvisoryToggleBullet, AdvisoryToggleItem, AlertIcon, AloneIcon, ArrowForward, Box, BulletCheckIcon, Button, ButtonStory, Card, CheckIcon, ChevronDownIcon, ChevronUpIcon, CloseIcon, CodeIcon, Container, CopyIcon, CreateIcon, Download, ExistingGroupIcon, Flex, Footer, GithubIcon, GroupIcon, HelpIcon, HeroSection, Hexapod, HexapodMobile, IconButton, IconButtonStory, Image, Link, LinkStory, LogoCard, MediaQueryKeys, MenuIcon, MigrateIcon, Navbar, NotificationCard, NotificationContainer, NumberField, ObolDarkBgH, ObolDarkBgMark, ObolDarkBgV, ObolDarkCircle, ObolLightBgH, ObolLightBgMark, ObolLightBgV, ObolLightCircle, ObolSolidDarkBgH, ObolSolidDarkBgMark, ObolSolidDarkBgV, ObolSolidLightBgH, ObolSolidLightBgMark, ObolSolidLightBgV, OpenInNew, PlanetBlue, PlanetGreen, PlanetGrey, PlanetMagenta, PlanetOrange, 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, config, createTheme, css, getCssText, globalCss, keyframes, modifyVariantsForStory, reset, styled, theme, useMediaQuery };
package/dist/index.js CHANGED
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var react = require('@stitches/react');
6
6
  var TabsPrimitive = require('@radix-ui/react-tabs');
7
- var Image$1 = require('next/image');
8
7
  var jsxRuntime = require('react/jsx-runtime');
9
8
  var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
10
9
  var React = require('react');
@@ -34,7 +33,6 @@ function _interopNamespace(e) {
34
33
  }
35
34
 
36
35
  var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
37
- var Image__default = /*#__PURE__*/_interopDefaultLegacy(Image$1);
38
36
  var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
39
37
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
40
38
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
@@ -959,7 +957,12 @@ var Container = styled(Box, {
959
957
  },
960
958
  });
961
959
 
962
- var Image = styled(Image__default["default"], {});
960
+ var Image = styled('img', {
961
+ // reset
962
+ verticalAlign: "middle",
963
+ maxWidth: "100%",
964
+ maxHeight: "100%",
965
+ });
963
966
 
964
967
  var ArrowForward = function (props) { return (jsxRuntime.jsx(SvgIcon, __assign({}, props, { children: jsxRuntime.jsx("path", { d: "M9.99992 3.3335L9.05992 4.2735L12.1133 7.3335H1.33325V8.66683H12.1133L9.05325 11.7268L9.99992 12.6668L14.6666 8.00016L9.99992 3.3335Z", stroke: "currentColor", fill: "currentColor" }) }))); };
965
968
 
@@ -1146,7 +1149,7 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
1146
1149
  "@sm": { $$size: "100px" },
1147
1150
  "&::after": {
1148
1151
  position: "absolute",
1149
- marginTop: "-163.5px",
1152
+ marginTop: "-160px",
1150
1153
  borderRadius: "$round",
1151
1154
  display: "block",
1152
1155
  content: "",
@@ -1154,10 +1157,10 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
1154
1157
  height: "$$size",
1155
1158
  background: "hsla(161, 77%, 54%, 0.2)",
1156
1159
  "@sm": {
1157
- marginTop: "-103.5px",
1160
+ marginTop: "-100px",
1158
1161
  },
1159
1162
  },
1160
- } }, { children: jsxRuntime.jsx(Image, { placeholder: 'blur', blurDataURL: "/assets/team/Collin.png", alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxRuntime.jsxs(Box, __assign({ css: {
1163
+ } }, { children: jsxRuntime.jsx(Image, { placeholder: "blur", alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxRuntime.jsxs(Box, __assign({ css: {
1161
1164
  display: "grid",
1162
1165
  justifyContent: "center",
1163
1166
  "@sm": { justifyContent: "start" },
@@ -1198,7 +1201,13 @@ var LogoCard = function (props) {
1198
1201
  width: "auto",
1199
1202
  height: "60px",
1200
1203
  },
1201
- }, target: "_blank", href: props.logoCardLink }, { children: jsxRuntime.jsx(Box, __assign({ css: { position: "relative", width: "100%", height: "100%" } }, { children: jsxRuntime.jsx(Image, { src: props.image, layout: "fill", objectFit: "contain", alt: props.heading, quality: 100 }) })) })));
1204
+ }, target: "_blank", href: props.logoCardLink }, { children: jsxRuntime.jsx(Box, __assign({ className: "logo-card-container", css: {
1205
+ display: "flex",
1206
+ justifyContent: "center",
1207
+ position: "relative",
1208
+ width: "100%",
1209
+ height: "100%",
1210
+ } }, { children: jsxRuntime.jsx(Image, { css: { objectFit: "contain" }, src: props.image, alt: props.heading }) })) })));
1202
1211
  };
1203
1212
 
1204
1213
  // Exports
@@ -1395,11 +1404,11 @@ var TextFieldWithCopy = React.forwardRef(function (props, ref) {
1395
1404
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1396
1405
 
1397
1406
  var NumberField = React.forwardRef(function (_a, ref) {
1398
- var _b = _a.max, max = _b === void 0 ? 10 : _b, _c = _a.min, min = _c === void 0 ? 1 : _c, value = _a.value, onChangeValue = _a.onChangeValue;
1407
+ var _b = _a.max, max = _b === void 0 ? 10 : _b, _c = _a.min, min = _c === void 0 ? 0 : _c, value = _a.value, onChangeValue = _a.onChangeValue, onBlur = _a.onBlur, name = _a.name;
1399
1408
  var _d = React.useState(value || min), qty = _d[0], setQty = _d[1];
1400
1409
  var handleOnDec = function (e) {
1401
1410
  e.preventDefault();
1402
- if (qty <= min) {
1411
+ if (qty < min) {
1403
1412
  setQty(min);
1404
1413
  }
1405
1414
  else {
@@ -1416,7 +1425,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
1416
1425
  }
1417
1426
  };
1418
1427
  var handleOnChange = function (e) {
1419
- var value = e.target;
1428
+ var value = e.target.value;
1420
1429
  if (value > max) {
1421
1430
  setQty(max);
1422
1431
  }
@@ -1431,9 +1440,10 @@ var NumberField = React.forwardRef(function (_a, ref) {
1431
1440
  if (qty && onChangeValue) {
1432
1441
  onChangeValue(qty);
1433
1442
  }
1434
- }, [qty, onChangeValue]);
1443
+ }, [qty]);
1435
1444
  return (jsxRuntime.jsxs(Box, __assign({ css: {
1436
1445
  display: "flex",
1446
+ maxHeight: "$3xl",
1437
1447
  "input::-webkit-inner-spin-button": {
1438
1448
  "-webkit-appearance": "none",
1439
1449
  margin: 0,
@@ -1465,7 +1475,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
1465
1475
  borderRadius: 0,
1466
1476
  width: "95px",
1467
1477
  },
1468
- } }, { children: [jsxRuntime.jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: "-" })), jsxRuntime.jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange }), jsxRuntime.jsx(IconButton, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: "+" }))] })));
1478
+ } }, { children: [jsxRuntime.jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: "-" })), 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: "+" }))] })));
1469
1479
  });
1470
1480
  NumberField.displayName = "NumberField";
1471
1481
 
@@ -1592,9 +1602,11 @@ var AdvisoryToggleBullet = function (props) {
1592
1602
  } }, { children: props.rank }))), jsxRuntime.jsx(Text, __assign({ color: color }, { children: props.children }))] })));
1593
1603
  };
1594
1604
 
1595
- var CardImage = styled(Image__default["default"], {
1605
+ var CardImage = styled(Image, {
1596
1606
  btrr: "$4",
1597
1607
  btlr: "$4",
1608
+ width: "100%",
1609
+ height: "100%",
1598
1610
  });
1599
1611
  var ToggleCardItem = styled(ToggleGroupItem, {
1600
1612
  all: "unset",
@@ -1641,7 +1653,7 @@ var Card = function (_a) {
1641
1653
  "@sm": {
1642
1654
  width: "$full",
1643
1655
  },
1644
- } }, { children: jsxRuntime.jsx(CardImage, { src: props.image, layout: "fill", objectFit: "fill", alt: props.heading }) }))), jsxRuntime.jsxs(Box, __assign({ className: "box-card-icon", css: {
1656
+ } }, { children: jsxRuntime.jsx(CardImage, { src: props.image, alt: props.heading }) }))), jsxRuntime.jsxs(Box, __assign({ className: "box-card-icon", css: {
1645
1657
  display: "flex",
1646
1658
  p: "$xl",
1647
1659
  gap: "$xl",
@@ -1789,14 +1801,14 @@ var ProgressTracker = function (props) {
1789
1801
  display: "flex",
1790
1802
  justifyContent: "space-between",
1791
1803
  alignItems: "center",
1792
- } }, { children: items.map(function (item, index) { return (jsxRuntime.jsx(Link, __assign({ disabled: item.status === "incomplete", href: item.status === "incomplete" ? "javascript:void(0)" : item.href }, { children: item.title }), ":l".concat(index))); }) }))] })) })));
1804
+ } }, { children: items.map(function (item, index) { return (jsxRuntime.jsx(Link, __assign({ disabled: item.status === "incomplete", href: item.status === "incomplete" ? "#" : item.href }, { children: item.title }), ":l".concat(index))); }) }))] })) })));
1793
1805
  };
1794
1806
 
1795
1807
  var StyledRadio = styled(RadioGroupPrimitive__namespace.Item, {
1796
1808
  all: "unset",
1797
1809
  backgroundColor: "$obolGreen",
1798
- width: 25,
1799
- height: 25,
1810
+ width: 18,
1811
+ height: 18,
1800
1812
  borderRadius: "100%",
1801
1813
  "&:hover": { filter: "brightness(90%)", cursor: "pointer" },
1802
1814
  });
@@ -1811,10 +1823,10 @@ var StyledIndicator = styled(RadioGroupPrimitive__namespace.Indicator, {
1811
1823
  content: '""',
1812
1824
  display: "absolute",
1813
1825
  position: "absolute",
1814
- width: 11,
1815
- height: 11,
1826
+ width: 10,
1827
+ height: 10,
1816
1828
  borderRadius: "50%",
1817
- boxShadow: "0 0 0 4px #0E1E22",
1829
+ boxShadow: "0 0 0 2px #0E1E22",
1818
1830
  backgroundColor: "#2FE4AB",
1819
1831
  },
1820
1832
  });
@@ -1824,6 +1836,7 @@ var RadioGroupRadio = StyledRadio;
1824
1836
  var RadioGroupIndicator = StyledIndicator;
1825
1837
  var RadioGroupItemLabel = styled("label", {
1826
1838
  color: "$textLight",
1839
+ fontWeight: "$bold",
1827
1840
  fontSize: "$3",
1828
1841
  lineHeight: 1,
1829
1842
  userSelect: "none",
@@ -1833,7 +1846,7 @@ var RadioGroupItemLabel = styled("label", {
1833
1846
  var RadioGroupItem = function (_a) {
1834
1847
  var value = _a.value, label = _a.label, _b = _a.index, index = _b === void 0 ? 1 : _b;
1835
1848
  var id = "id-:r".concat(index, ":");
1836
- return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", margin: "10px 0", alignItems: "center" } }, { children: [jsxRuntime.jsx(RadioGroupRadio, __assign({ value: value, id: id }, { children: jsxRuntime.jsx(RadioGroupPrimitive__namespace.RadioGroupIndicator, {}) })), jsxRuntime.jsx(RadioGroupItemLabel, __assign({ htmlFor: id }, { children: label }))] })));
1849
+ return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", margin: "10px 0", alignItems: "center" } }, { children: [jsxRuntime.jsx(RadioGroupRadio, __assign({ value: value, id: id }, { children: jsxRuntime.jsx(RadioGroupPrimitive__namespace.RadioGroupIndicator, { className: "indicator" }) })), jsxRuntime.jsx(RadioGroupItemLabel, __assign({ htmlFor: id }, { children: label }))] })));
1837
1850
  };
1838
1851
  var RadioGroupComponent = function (_a) {
1839
1852
  var items = _a.items, value = _a.value, onValueChange = _a.onValueChange, props = __rest(_a, ["items", "value", "onValueChange"]);
@@ -1878,6 +1891,7 @@ var Td = styled("td", {
1878
1891
  noPadding: {
1879
1892
  true: {
1880
1893
  p: 0,
1894
+ backgroundColor: "$bg03",
1881
1895
  },
1882
1896
  },
1883
1897
  size: {
@@ -1908,7 +1922,6 @@ var SplitterTable = function (_a) {
1908
1922
  var rows = _a.rows, columns = _a.columns, onAddRow = _a.onAddRow, onRemoveRow = _a.onRemoveRow, onUpdateRow = _a.onUpdateRow, _b = _a.removeButton, removeButton = _b === void 0 ? true : _b;
1909
1923
  return (jsxRuntime.jsxs(StyledTable, { children: [jsxRuntime.jsxs("thead", { children: [jsxRuntime.jsx(Td, {}), columns.map(function (column, index) { return (jsxRuntime.jsx(Td, __assign({ css: { textAlign: "start" } }, { children: column.header }), "header-".concat(index))); }), jsxRuntime.jsx(Td, {})] }), jsxRuntime.jsxs("tbody", { children: [rows.map(function (row, rowIndex) { return (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx(Td, __assign({ size: "sm" }, { children: rowIndex + 1 })), columns.map(function (column, cellIndex) {
1910
1924
  var _a;
1911
- // if (column === "id") return null;
1912
1925
  var isTextField = !!column.cell;
1913
1926
  return (jsxRuntime.jsx(Td, __assign({ noPadding: true, css: {
1914
1927
  "input::-webkit-inner-spin-button": {
@@ -1919,10 +1932,17 @@ var SplitterTable = function (_a) {
1919
1932
  "input[type=number]": {
1920
1933
  "-moz-appearance": "textfield",
1921
1934
  },
1922
- } }, { children: isTextField ? (jsxRuntime.jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onChange: function (e) {
1923
- return onUpdateRow(row.id, e.target.value, column.accessorKey);
1935
+ } }, { children: isTextField ? (jsxRuntime.jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
1936
+ if (Number(e.target.value) > 100)
1937
+ e.target.value = 100;
1938
+ }, onChange: function (e) {
1939
+ var _a, _b;
1940
+ var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
1941
+ ? Number(e.target.value)
1942
+ : e.target.value;
1943
+ onUpdateRow(row.id, value, column.accessorKey);
1924
1944
  } }, (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config))) : (row[column.accessorKey]) }), "cell ".concat(cellIndex)));
1925
- }), removeButton && (jsxRuntime.jsx(Td, __assign({ size: "sm" }, { children: jsxRuntime.jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsxRuntime.jsx(TrashIcon, {}) })) })))] }, row.id)); }), jsxRuntime.jsx(AddNewRow, { handleOnClick: function () { return onAddRow(""); } })] })] }));
1945
+ }), removeButton && (jsxRuntime.jsx(Td, __assign({ size: "sm" }, { children: jsxRuntime.jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsxRuntime.jsx(TrashIcon, {}) })) })))] }, row.id)); }), jsxRuntime.jsx(AddNewRow, { handleOnClick: function () { return onAddRow(); } })] })] }));
1926
1946
  };
1927
1947
  var Table = function (_a) {
1928
1948
  var rows = _a.rows, columns = _a.columns;
@@ -2092,7 +2112,7 @@ var HeroSection = function (_a) {
2092
2112
  display: "flex",
2093
2113
  justifyContent: "flex-end",
2094
2114
  alignItems: "center",
2095
- } }, { children: jsxRuntime.jsx(Image__default["default"], { priority: true, src: (image === null || image === void 0 ? void 0 : image.basePath) || MOBILE_PATH, alt: "Obol Logo", width: 343, height: 226 }) }))), jsxRuntime.jsx(Text, __assign({ css: {
2115
+ } }, { children: jsxRuntime.jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || MOBILE_PATH, alt: "Obol Logo", width: 343, height: 226 }) }))), jsxRuntime.jsx(Text, __assign({ css: {
2096
2116
  width: "80%",
2097
2117
  lineHeight: "$xl",
2098
2118
  "@sm": {
@@ -2104,7 +2124,7 @@ var HeroSection = function (_a) {
2104
2124
  display: "flex",
2105
2125
  justifyContent: "flex-end",
2106
2126
  alignItems: "center",
2107
- } }, { children: jsxRuntime.jsx(Image__default["default"], { priority: true, src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
2127
+ } }, { children: jsxRuntime.jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
2108
2128
  };
2109
2129
 
2110
2130
  var TwoColumnSection = function (_a) {
@@ -2132,7 +2152,7 @@ var TwoColumnSection = function (_a) {
2132
2152
  "@md": {
2133
2153
  m: "0",
2134
2154
  },
2135
- } }, { children: !screenDownSm ? (jsxRuntime.jsx(Image__default["default"], { src: image.basePath, alt: "Obol Logo", objectFit: "fill", layout: "fill" })) : (jsxRuntime.jsx(Image__default["default"], { src: image.mobilePath || image.basePath, alt: "Obol Logo", objectFit: "fill", layout: "fill" })) }))] })));
2155
+ } }, { children: !screenDownSm ? (jsxRuntime.jsx(Image, { src: image.basePath, width: "100%", height: "100%", alt: "Obol Logo" })) : (jsxRuntime.jsx(Image, { src: image.mobilePath || image.basePath, width: "100%", height: "100%", alt: "Obol Logo" })) }))] })));
2136
2156
  };
2137
2157
 
2138
2158
  exports.Accordion = Accordion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",