@obolnetwork/obol-ui 1.0.14 → 1.0.16
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
|
-
|
|
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 {
|
|
4
|
-
interface LoadingButtonProps extends
|
|
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>;
|
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(
|
|
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: "-
|
|
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: "-
|
|
1129
|
+
marginTop: "-100px",
|
|
1126
1130
|
},
|
|
1127
1131
|
},
|
|
1128
|
-
} }, { children: jsx(Image, { placeholder:
|
|
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({
|
|
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
|
|
@@ -1399,7 +1409,7 @@ var NumberField = forwardRef(function (_a, ref) {
|
|
|
1399
1409
|
if (qty && onChangeValue) {
|
|
1400
1410
|
onChangeValue(qty);
|
|
1401
1411
|
}
|
|
1402
|
-
}, [qty
|
|
1412
|
+
}, [qty]);
|
|
1403
1413
|
return (jsxs(Box, __assign({ css: {
|
|
1404
1414
|
display: "flex",
|
|
1405
1415
|
maxHeight: "$3xl",
|
|
@@ -1561,9 +1571,11 @@ var AdvisoryToggleBullet = function (props) {
|
|
|
1561
1571
|
} }, { children: props.rank }))), jsx(Text, __assign({ color: color }, { children: props.children }))] })));
|
|
1562
1572
|
};
|
|
1563
1573
|
|
|
1564
|
-
var CardImage = styled(Image
|
|
1574
|
+
var CardImage = styled(Image, {
|
|
1565
1575
|
btrr: "$4",
|
|
1566
1576
|
btlr: "$4",
|
|
1577
|
+
width: "100%",
|
|
1578
|
+
height: "100%",
|
|
1567
1579
|
});
|
|
1568
1580
|
var ToggleCardItem = styled(ToggleGroupItem, {
|
|
1569
1581
|
all: "unset",
|
|
@@ -1610,7 +1622,7 @@ var Card = function (_a) {
|
|
|
1610
1622
|
"@sm": {
|
|
1611
1623
|
width: "$full",
|
|
1612
1624
|
},
|
|
1613
|
-
} }, { children: jsx(CardImage, { src: props.image,
|
|
1625
|
+
} }, { children: jsx(CardImage, { src: props.image, alt: props.heading }) }))), jsxs(Box, __assign({ className: "box-card-icon", css: {
|
|
1614
1626
|
display: "flex",
|
|
1615
1627
|
p: "$xl",
|
|
1616
1628
|
gap: "$xl",
|
|
@@ -1764,8 +1776,8 @@ var ProgressTracker = function (props) {
|
|
|
1764
1776
|
var StyledRadio = styled(RadioGroupPrimitive.Item, {
|
|
1765
1777
|
all: "unset",
|
|
1766
1778
|
backgroundColor: "$obolGreen",
|
|
1767
|
-
width:
|
|
1768
|
-
height:
|
|
1779
|
+
width: 18,
|
|
1780
|
+
height: 18,
|
|
1769
1781
|
borderRadius: "100%",
|
|
1770
1782
|
"&:hover": { filter: "brightness(90%)", cursor: "pointer" },
|
|
1771
1783
|
});
|
|
@@ -1783,7 +1795,7 @@ var StyledIndicator = styled(RadioGroupPrimitive.Indicator, {
|
|
|
1783
1795
|
width: 10,
|
|
1784
1796
|
height: 10,
|
|
1785
1797
|
borderRadius: "50%",
|
|
1786
|
-
boxShadow: "0 0 0
|
|
1798
|
+
boxShadow: "0 0 0 2px #0E1E22",
|
|
1787
1799
|
backgroundColor: "#2FE4AB",
|
|
1788
1800
|
},
|
|
1789
1801
|
});
|
|
@@ -1858,6 +1870,20 @@ var Td = styled("td", {
|
|
|
1858
1870
|
},
|
|
1859
1871
|
},
|
|
1860
1872
|
});
|
|
1873
|
+
var Th = styled("th", {
|
|
1874
|
+
border: "2px solid $bg04",
|
|
1875
|
+
py: "$sm",
|
|
1876
|
+
px: "$sm",
|
|
1877
|
+
textAlign: "center",
|
|
1878
|
+
color: "$body",
|
|
1879
|
+
fontWeight: "$bold",
|
|
1880
|
+
fontSize: "$4",
|
|
1881
|
+
"& input": {
|
|
1882
|
+
border: "none",
|
|
1883
|
+
borderRadius: 0,
|
|
1884
|
+
width: "100%",
|
|
1885
|
+
},
|
|
1886
|
+
});
|
|
1861
1887
|
var Tr = styled("tr", {});
|
|
1862
1888
|
var BoxBorderTop = styled(Box, {
|
|
1863
1889
|
borderTop: "2px solid $bg04",
|
|
@@ -1877,7 +1903,7 @@ var AddNewRow = function (props) {
|
|
|
1877
1903
|
// Components
|
|
1878
1904
|
var SplitterTable = function (_a) {
|
|
1879
1905
|
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;
|
|
1880
|
-
return (jsxs(StyledTable, { children: [
|
|
1906
|
+
return (jsxs(StyledTable, { children: [jsx("thead", { children: jsxs("tr", { children: [jsx(Th, {}), columns.map(function (column, index) { return (jsx(Th, __assign({ css: { textAlign: "start" } }, { children: column.header }), "header-".concat(index))); }), jsx(Th, {})] }) }), 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) {
|
|
1881
1907
|
var _a;
|
|
1882
1908
|
var isTextField = !!column.cell;
|
|
1883
1909
|
return (jsx(Td, __assign({ noPadding: true, css: {
|
|
@@ -1890,8 +1916,13 @@ var SplitterTable = function (_a) {
|
|
|
1890
1916
|
"-moz-appearance": "textfield",
|
|
1891
1917
|
},
|
|
1892
1918
|
} }, { children: isTextField ? (jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
|
|
1893
|
-
|
|
1894
|
-
|
|
1919
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1920
|
+
if (((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number") {
|
|
1921
|
+
if ((_d = (_c = column.cell) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.max) {
|
|
1922
|
+
if (Number(e.target.value) > ((_f = (_e = column.cell) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.max))
|
|
1923
|
+
e.target.value = (_h = (_g = column.cell) === null || _g === void 0 ? void 0 : _g.config) === null || _h === void 0 ? void 0 : _h.max;
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1895
1926
|
}, onChange: function (e) {
|
|
1896
1927
|
var _a, _b;
|
|
1897
1928
|
var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
|
|
@@ -2069,7 +2100,7 @@ var HeroSection = function (_a) {
|
|
|
2069
2100
|
display: "flex",
|
|
2070
2101
|
justifyContent: "flex-end",
|
|
2071
2102
|
alignItems: "center",
|
|
2072
|
-
} }, { children: jsx(Image
|
|
2103
|
+
} }, { 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: {
|
|
2073
2104
|
width: "80%",
|
|
2074
2105
|
lineHeight: "$xl",
|
|
2075
2106
|
"@sm": {
|
|
@@ -2081,7 +2112,7 @@ var HeroSection = function (_a) {
|
|
|
2081
2112
|
display: "flex",
|
|
2082
2113
|
justifyContent: "flex-end",
|
|
2083
2114
|
alignItems: "center",
|
|
2084
|
-
} }, { children: jsx(Image
|
|
2115
|
+
} }, { children: jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
|
|
2085
2116
|
};
|
|
2086
2117
|
|
|
2087
2118
|
var TwoColumnSection = function (_a) {
|
|
@@ -2109,7 +2140,7 @@ var TwoColumnSection = function (_a) {
|
|
|
2109
2140
|
"@md": {
|
|
2110
2141
|
m: "0",
|
|
2111
2142
|
},
|
|
2112
|
-
} }, { children: !screenDownSm ? (jsx(Image
|
|
2143
|
+
} }, { 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" })) }))] })));
|
|
2113
2144
|
};
|
|
2114
2145
|
|
|
2115
2146
|
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(
|
|
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: "-
|
|
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: "-
|
|
1160
|
+
marginTop: "-100px",
|
|
1158
1161
|
},
|
|
1159
1162
|
},
|
|
1160
|
-
} }, { children: jsxRuntime.jsx(Image, { placeholder:
|
|
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({
|
|
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
|
|
@@ -1431,7 +1440,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
|
|
|
1431
1440
|
if (qty && onChangeValue) {
|
|
1432
1441
|
onChangeValue(qty);
|
|
1433
1442
|
}
|
|
1434
|
-
}, [qty
|
|
1443
|
+
}, [qty]);
|
|
1435
1444
|
return (jsxRuntime.jsxs(Box, __assign({ css: {
|
|
1436
1445
|
display: "flex",
|
|
1437
1446
|
maxHeight: "$3xl",
|
|
@@ -1593,9 +1602,11 @@ var AdvisoryToggleBullet = function (props) {
|
|
|
1593
1602
|
} }, { children: props.rank }))), jsxRuntime.jsx(Text, __assign({ color: color }, { children: props.children }))] })));
|
|
1594
1603
|
};
|
|
1595
1604
|
|
|
1596
|
-
var CardImage = styled(
|
|
1605
|
+
var CardImage = styled(Image, {
|
|
1597
1606
|
btrr: "$4",
|
|
1598
1607
|
btlr: "$4",
|
|
1608
|
+
width: "100%",
|
|
1609
|
+
height: "100%",
|
|
1599
1610
|
});
|
|
1600
1611
|
var ToggleCardItem = styled(ToggleGroupItem, {
|
|
1601
1612
|
all: "unset",
|
|
@@ -1642,7 +1653,7 @@ var Card = function (_a) {
|
|
|
1642
1653
|
"@sm": {
|
|
1643
1654
|
width: "$full",
|
|
1644
1655
|
},
|
|
1645
|
-
} }, { children: jsxRuntime.jsx(CardImage, { src: props.image,
|
|
1656
|
+
} }, { children: jsxRuntime.jsx(CardImage, { src: props.image, alt: props.heading }) }))), jsxRuntime.jsxs(Box, __assign({ className: "box-card-icon", css: {
|
|
1646
1657
|
display: "flex",
|
|
1647
1658
|
p: "$xl",
|
|
1648
1659
|
gap: "$xl",
|
|
@@ -1796,8 +1807,8 @@ var ProgressTracker = function (props) {
|
|
|
1796
1807
|
var StyledRadio = styled(RadioGroupPrimitive__namespace.Item, {
|
|
1797
1808
|
all: "unset",
|
|
1798
1809
|
backgroundColor: "$obolGreen",
|
|
1799
|
-
width:
|
|
1800
|
-
height:
|
|
1810
|
+
width: 18,
|
|
1811
|
+
height: 18,
|
|
1801
1812
|
borderRadius: "100%",
|
|
1802
1813
|
"&:hover": { filter: "brightness(90%)", cursor: "pointer" },
|
|
1803
1814
|
});
|
|
@@ -1815,7 +1826,7 @@ var StyledIndicator = styled(RadioGroupPrimitive__namespace.Indicator, {
|
|
|
1815
1826
|
width: 10,
|
|
1816
1827
|
height: 10,
|
|
1817
1828
|
borderRadius: "50%",
|
|
1818
|
-
boxShadow: "0 0 0
|
|
1829
|
+
boxShadow: "0 0 0 2px #0E1E22",
|
|
1819
1830
|
backgroundColor: "#2FE4AB",
|
|
1820
1831
|
},
|
|
1821
1832
|
});
|
|
@@ -1890,6 +1901,20 @@ var Td = styled("td", {
|
|
|
1890
1901
|
},
|
|
1891
1902
|
},
|
|
1892
1903
|
});
|
|
1904
|
+
var Th = styled("th", {
|
|
1905
|
+
border: "2px solid $bg04",
|
|
1906
|
+
py: "$sm",
|
|
1907
|
+
px: "$sm",
|
|
1908
|
+
textAlign: "center",
|
|
1909
|
+
color: "$body",
|
|
1910
|
+
fontWeight: "$bold",
|
|
1911
|
+
fontSize: "$4",
|
|
1912
|
+
"& input": {
|
|
1913
|
+
border: "none",
|
|
1914
|
+
borderRadius: 0,
|
|
1915
|
+
width: "100%",
|
|
1916
|
+
},
|
|
1917
|
+
});
|
|
1893
1918
|
var Tr = styled("tr", {});
|
|
1894
1919
|
var BoxBorderTop = styled(Box, {
|
|
1895
1920
|
borderTop: "2px solid $bg04",
|
|
@@ -1909,7 +1934,7 @@ var AddNewRow = function (props) {
|
|
|
1909
1934
|
// Components
|
|
1910
1935
|
var SplitterTable = function (_a) {
|
|
1911
1936
|
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;
|
|
1912
|
-
return (jsxRuntime.jsxs(StyledTable, { children: [jsxRuntime.
|
|
1937
|
+
return (jsxRuntime.jsxs(StyledTable, { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx(Th, {}), columns.map(function (column, index) { return (jsxRuntime.jsx(Th, __assign({ css: { textAlign: "start" } }, { children: column.header }), "header-".concat(index))); }), jsxRuntime.jsx(Th, {})] }) }), 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) {
|
|
1913
1938
|
var _a;
|
|
1914
1939
|
var isTextField = !!column.cell;
|
|
1915
1940
|
return (jsxRuntime.jsx(Td, __assign({ noPadding: true, css: {
|
|
@@ -1922,8 +1947,13 @@ var SplitterTable = function (_a) {
|
|
|
1922
1947
|
"-moz-appearance": "textfield",
|
|
1923
1948
|
},
|
|
1924
1949
|
} }, { children: isTextField ? (jsxRuntime.jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
|
|
1925
|
-
|
|
1926
|
-
|
|
1950
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1951
|
+
if (((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number") {
|
|
1952
|
+
if ((_d = (_c = column.cell) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.max) {
|
|
1953
|
+
if (Number(e.target.value) > ((_f = (_e = column.cell) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.max))
|
|
1954
|
+
e.target.value = (_h = (_g = column.cell) === null || _g === void 0 ? void 0 : _g.config) === null || _h === void 0 ? void 0 : _h.max;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1927
1957
|
}, onChange: function (e) {
|
|
1928
1958
|
var _a, _b;
|
|
1929
1959
|
var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
|
|
@@ -2101,7 +2131,7 @@ var HeroSection = function (_a) {
|
|
|
2101
2131
|
display: "flex",
|
|
2102
2132
|
justifyContent: "flex-end",
|
|
2103
2133
|
alignItems: "center",
|
|
2104
|
-
} }, { children: jsxRuntime.jsx(
|
|
2134
|
+
} }, { 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: {
|
|
2105
2135
|
width: "80%",
|
|
2106
2136
|
lineHeight: "$xl",
|
|
2107
2137
|
"@sm": {
|
|
@@ -2113,7 +2143,7 @@ var HeroSection = function (_a) {
|
|
|
2113
2143
|
display: "flex",
|
|
2114
2144
|
justifyContent: "flex-end",
|
|
2115
2145
|
alignItems: "center",
|
|
2116
|
-
} }, { children: jsxRuntime.jsx(
|
|
2146
|
+
} }, { children: jsxRuntime.jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
|
|
2117
2147
|
};
|
|
2118
2148
|
|
|
2119
2149
|
var TwoColumnSection = function (_a) {
|
|
@@ -2141,7 +2171,7 @@ var TwoColumnSection = function (_a) {
|
|
|
2141
2171
|
"@md": {
|
|
2142
2172
|
m: "0",
|
|
2143
2173
|
},
|
|
2144
|
-
} }, { children: !screenDownSm ? (jsxRuntime.jsx(
|
|
2174
|
+
} }, { 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" })) }))] })));
|
|
2145
2175
|
};
|
|
2146
2176
|
|
|
2147
2177
|
exports.Accordion = Accordion;
|