@obolnetwork/obol-ui 1.0.12 → 1.0.15-0
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.
- package/dist/components/atoms/IconButton/IconButton.d.ts +4 -1
- package/dist/components/atoms/Image/Image.d.ts +1 -2
- package/dist/components/atoms/LoadingButton/LoadingButton.d.ts +2 -2
- package/dist/components/atoms/NumberField/NumberField.d.ts +5 -3
- package/dist/components/molecules/Table/Table.d.ts +18 -5
- package/dist/index.es.js +62 -31
- package/dist/index.js +62 -32
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import * as Stitches from "@stitches/react";
|
|
|
3
3
|
export declare const IconButton: import("@stitches/react/types/styled-component").StyledComponent<"button", {
|
|
4
4
|
ghost?: boolean | "true" | undefined;
|
|
5
5
|
fullWidth?: boolean | "true" | undefined;
|
|
6
|
+
borderDisabled?: boolean | "true" | undefined;
|
|
6
7
|
}, {
|
|
7
8
|
motion: "(prefers-reduced-motion)";
|
|
8
9
|
hover: "(any-hover: hover)";
|
|
@@ -488,6 +489,7 @@ export declare type IconButtonComponentProps = IconButtonComponentVariants;
|
|
|
488
489
|
export declare const IconButtonStory: (props: Omit<import("@stitches/react/types/styled-component").TransformProps<{
|
|
489
490
|
ghost?: boolean | "true" | undefined;
|
|
490
491
|
fullWidth?: boolean | "true" | undefined;
|
|
492
|
+
borderDisabled?: boolean | "true" | undefined;
|
|
491
493
|
}, {
|
|
492
494
|
motion: "(prefers-reduced-motion)";
|
|
493
495
|
hover: "(any-hover: hover)";
|
|
@@ -498,9 +500,10 @@ export declare const IconButtonStory: (props: Omit<import("@stitches/react/types
|
|
|
498
500
|
bp2: "(min-width: 900px)";
|
|
499
501
|
md: "(max-width: 1200px)";
|
|
500
502
|
lg: "(max-width: 1800px)";
|
|
501
|
-
}>, "ghost" | "fullWidth"> & {
|
|
503
|
+
}>, "ghost" | "fullWidth" | "borderDisabled"> & {
|
|
502
504
|
ghost?: boolean | undefined;
|
|
503
505
|
fullWidth?: boolean | undefined;
|
|
506
|
+
borderDisabled?: boolean | undefined;
|
|
504
507
|
} & {
|
|
505
508
|
children?: import("react").ReactNode;
|
|
506
509
|
disabled?: boolean | undefined;
|
|
@@ -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>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
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 {};
|
|
@@ -5,15 +5,28 @@ export interface RowItem {
|
|
|
5
5
|
}
|
|
6
6
|
export declare type RowTableType = Record<string, string | React.ReactNode>;
|
|
7
7
|
export declare type RowsTableType = RowItem[];
|
|
8
|
+
export declare type CellDef = {
|
|
9
|
+
component: "TextField" | "NumberField";
|
|
10
|
+
config?: {
|
|
11
|
+
type: "text" | "number";
|
|
12
|
+
max: number;
|
|
13
|
+
min: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare type ColumnDef<T> = {
|
|
17
|
+
accessorKey: keyof T;
|
|
18
|
+
header: string;
|
|
19
|
+
cell?: CellDef;
|
|
20
|
+
};
|
|
8
21
|
export interface TableProps {
|
|
9
|
-
rows:
|
|
10
|
-
columns:
|
|
22
|
+
rows: any[];
|
|
23
|
+
columns: ColumnDef<any>[];
|
|
11
24
|
}
|
|
12
25
|
export interface SplitterTableProps extends TableProps {
|
|
13
|
-
|
|
14
|
-
onAddRow(item: string): void;
|
|
26
|
+
onAddRow(item?: unknown): void;
|
|
15
27
|
onRemoveRow(item: string | number): void;
|
|
16
|
-
onUpdateRow(id: string, value: string): void;
|
|
28
|
+
onUpdateRow(id: string, value: string | number, accessorKey: unknown): void;
|
|
29
|
+
removeButton?: boolean;
|
|
17
30
|
}
|
|
18
31
|
export declare const SplitterTable: React.FC<SplitterTableProps>;
|
|
19
32
|
export declare const Table: React.FC<TableProps>;
|
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,11 @@ 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
|
+
});
|
|
931
934
|
|
|
932
935
|
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
936
|
|
|
@@ -1125,7 +1128,7 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ css: {
|
|
|
1125
1128
|
marginTop: "-103.5px",
|
|
1126
1129
|
},
|
|
1127
1130
|
},
|
|
1128
|
-
} }, { children: jsx(Image, { placeholder: 'blur',
|
|
1131
|
+
} }, { children: jsx(Image, { placeholder: 'blur', alt: props.heading, css: { borderRadius: "$round" }, src: props.image, width: 160, height: 160 }) })), jsxs(Box, __assign({ css: {
|
|
1129
1132
|
display: "grid",
|
|
1130
1133
|
justifyContent: "center",
|
|
1131
1134
|
"@sm": { justifyContent: "start" },
|
|
@@ -1166,7 +1169,7 @@ var LogoCard = function (props) {
|
|
|
1166
1169
|
width: "auto",
|
|
1167
1170
|
height: "60px",
|
|
1168
1171
|
},
|
|
1169
|
-
}, target: "_blank", href: props.logoCardLink }, { children: jsx(Box, __assign({ css: { position: "relative", width: "100%", height: "100%" } }, { children: jsx(Image, { src: props.image,
|
|
1172
|
+
}, target: "_blank", href: props.logoCardLink }, { children: jsx(Box, __assign({ css: { position: "relative", width: "100%", height: "100%" } }, { children: jsx(Image, { src: props.image, alt: props.heading }) })) })));
|
|
1170
1173
|
};
|
|
1171
1174
|
|
|
1172
1175
|
// Exports
|
|
@@ -1199,6 +1202,7 @@ var IconButton = styled("button", {
|
|
|
1199
1202
|
color: "$muted",
|
|
1200
1203
|
},
|
|
1201
1204
|
margin: 0,
|
|
1205
|
+
border: "2px solid transparent",
|
|
1202
1206
|
variants: {
|
|
1203
1207
|
ghost: {
|
|
1204
1208
|
true: {
|
|
@@ -1215,6 +1219,11 @@ var IconButton = styled("button", {
|
|
|
1215
1219
|
width: "$full",
|
|
1216
1220
|
},
|
|
1217
1221
|
},
|
|
1222
|
+
borderDisabled: {
|
|
1223
|
+
true: {
|
|
1224
|
+
border: "2px solid $bg04",
|
|
1225
|
+
},
|
|
1226
|
+
},
|
|
1218
1227
|
},
|
|
1219
1228
|
});
|
|
1220
1229
|
var IconButtonStory = modifyVariantsForStory(IconButton);
|
|
@@ -1357,11 +1366,11 @@ var TextFieldWithCopy = forwardRef(function (props, ref) {
|
|
|
1357
1366
|
TextFieldWithCopy.displayName = "TextFieldWithCopy";
|
|
1358
1367
|
|
|
1359
1368
|
var NumberField = forwardRef(function (_a, ref) {
|
|
1360
|
-
var _b = _a.max, max = _b === void 0 ? 10 : _b, _c = _a.min, min = _c === void 0 ?
|
|
1369
|
+
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;
|
|
1361
1370
|
var _d = useState(value || min), qty = _d[0], setQty = _d[1];
|
|
1362
1371
|
var handleOnDec = function (e) {
|
|
1363
1372
|
e.preventDefault();
|
|
1364
|
-
if (qty
|
|
1373
|
+
if (qty < min) {
|
|
1365
1374
|
setQty(min);
|
|
1366
1375
|
}
|
|
1367
1376
|
else {
|
|
@@ -1378,7 +1387,7 @@ var NumberField = forwardRef(function (_a, ref) {
|
|
|
1378
1387
|
}
|
|
1379
1388
|
};
|
|
1380
1389
|
var handleOnChange = function (e) {
|
|
1381
|
-
var value = e.target;
|
|
1390
|
+
var value = e.target.value;
|
|
1382
1391
|
if (value > max) {
|
|
1383
1392
|
setQty(max);
|
|
1384
1393
|
}
|
|
@@ -1393,9 +1402,10 @@ var NumberField = forwardRef(function (_a, ref) {
|
|
|
1393
1402
|
if (qty && onChangeValue) {
|
|
1394
1403
|
onChangeValue(qty);
|
|
1395
1404
|
}
|
|
1396
|
-
}, [qty
|
|
1405
|
+
}, [qty]);
|
|
1397
1406
|
return (jsxs(Box, __assign({ css: {
|
|
1398
1407
|
display: "flex",
|
|
1408
|
+
maxHeight: "$3xl",
|
|
1399
1409
|
"input::-webkit-inner-spin-button": {
|
|
1400
1410
|
"-webkit-appearance": "none",
|
|
1401
1411
|
margin: 0,
|
|
@@ -1427,7 +1437,7 @@ var NumberField = forwardRef(function (_a, ref) {
|
|
|
1427
1437
|
borderRadius: 0,
|
|
1428
1438
|
width: "95px",
|
|
1429
1439
|
},
|
|
1430
|
-
} }, { children: [jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec }, { 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 }, { children: "+" }))] })));
|
|
1440
|
+
} }, { 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: "+" }))] })));
|
|
1431
1441
|
});
|
|
1432
1442
|
NumberField.displayName = "NumberField";
|
|
1433
1443
|
|
|
@@ -1554,9 +1564,11 @@ var AdvisoryToggleBullet = function (props) {
|
|
|
1554
1564
|
} }, { children: props.rank }))), jsx(Text, __assign({ color: color }, { children: props.children }))] })));
|
|
1555
1565
|
};
|
|
1556
1566
|
|
|
1557
|
-
var CardImage = styled(Image
|
|
1567
|
+
var CardImage = styled(Image, {
|
|
1558
1568
|
btrr: "$4",
|
|
1559
1569
|
btlr: "$4",
|
|
1570
|
+
width: "100%",
|
|
1571
|
+
height: "100%",
|
|
1560
1572
|
});
|
|
1561
1573
|
var ToggleCardItem = styled(ToggleGroupItem, {
|
|
1562
1574
|
all: "unset",
|
|
@@ -1603,7 +1615,7 @@ var Card = function (_a) {
|
|
|
1603
1615
|
"@sm": {
|
|
1604
1616
|
width: "$full",
|
|
1605
1617
|
},
|
|
1606
|
-
} }, { children: jsx(CardImage, { src: props.image,
|
|
1618
|
+
} }, { children: jsx(CardImage, { src: props.image, alt: props.heading }) }))), jsxs(Box, __assign({ className: "box-card-icon", css: {
|
|
1607
1619
|
display: "flex",
|
|
1608
1620
|
p: "$xl",
|
|
1609
1621
|
gap: "$xl",
|
|
@@ -1751,14 +1763,14 @@ var ProgressTracker = function (props) {
|
|
|
1751
1763
|
display: "flex",
|
|
1752
1764
|
justifyContent: "space-between",
|
|
1753
1765
|
alignItems: "center",
|
|
1754
|
-
} }, { children: items.map(function (item, index) { return (jsx(Link, __assign({ disabled: item.status === "incomplete", href: item.status === "incomplete" ? "
|
|
1766
|
+
} }, { 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))); }) }))] })) })));
|
|
1755
1767
|
};
|
|
1756
1768
|
|
|
1757
1769
|
var StyledRadio = styled(RadioGroupPrimitive.Item, {
|
|
1758
1770
|
all: "unset",
|
|
1759
1771
|
backgroundColor: "$obolGreen",
|
|
1760
|
-
width:
|
|
1761
|
-
height:
|
|
1772
|
+
width: 18,
|
|
1773
|
+
height: 18,
|
|
1762
1774
|
borderRadius: "100%",
|
|
1763
1775
|
"&:hover": { filter: "brightness(90%)", cursor: "pointer" },
|
|
1764
1776
|
});
|
|
@@ -1773,10 +1785,10 @@ var StyledIndicator = styled(RadioGroupPrimitive.Indicator, {
|
|
|
1773
1785
|
content: '""',
|
|
1774
1786
|
display: "absolute",
|
|
1775
1787
|
position: "absolute",
|
|
1776
|
-
width:
|
|
1777
|
-
height:
|
|
1788
|
+
width: 10,
|
|
1789
|
+
height: 10,
|
|
1778
1790
|
borderRadius: "50%",
|
|
1779
|
-
boxShadow: "0 0 0
|
|
1791
|
+
boxShadow: "0 0 0 2px #0E1E22",
|
|
1780
1792
|
backgroundColor: "#2FE4AB",
|
|
1781
1793
|
},
|
|
1782
1794
|
});
|
|
@@ -1786,6 +1798,7 @@ var RadioGroupRadio = StyledRadio;
|
|
|
1786
1798
|
var RadioGroupIndicator = StyledIndicator;
|
|
1787
1799
|
var RadioGroupItemLabel = styled("label", {
|
|
1788
1800
|
color: "$textLight",
|
|
1801
|
+
fontWeight: "$bold",
|
|
1789
1802
|
fontSize: "$3",
|
|
1790
1803
|
lineHeight: 1,
|
|
1791
1804
|
userSelect: "none",
|
|
@@ -1795,7 +1808,7 @@ var RadioGroupItemLabel = styled("label", {
|
|
|
1795
1808
|
var RadioGroupItem = function (_a) {
|
|
1796
1809
|
var value = _a.value, label = _a.label, _b = _a.index, index = _b === void 0 ? 1 : _b;
|
|
1797
1810
|
var id = "id-:r".concat(index, ":");
|
|
1798
|
-
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 }))] })));
|
|
1811
|
+
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 }))] })));
|
|
1799
1812
|
};
|
|
1800
1813
|
var RadioGroupComponent = function (_a) {
|
|
1801
1814
|
var items = _a.items, value = _a.value, onValueChange = _a.onValueChange, props = __rest(_a, ["items", "value", "onValueChange"]);
|
|
@@ -1807,7 +1820,7 @@ var StyledTable = styled("table", {
|
|
|
1807
1820
|
borderRadius: "2px",
|
|
1808
1821
|
backgroundColor: "$bg02",
|
|
1809
1822
|
borderStyle: "hidden",
|
|
1810
|
-
boxShadow: "0 0 0 2px $bg04",
|
|
1823
|
+
boxShadow: "0 0 0 2px $colors$bg04",
|
|
1811
1824
|
width: "100%",
|
|
1812
1825
|
"& thead": {
|
|
1813
1826
|
color: "$body",
|
|
@@ -1840,6 +1853,7 @@ var Td = styled("td", {
|
|
|
1840
1853
|
noPadding: {
|
|
1841
1854
|
true: {
|
|
1842
1855
|
p: 0,
|
|
1856
|
+
backgroundColor: "$bg03",
|
|
1843
1857
|
},
|
|
1844
1858
|
},
|
|
1845
1859
|
size: {
|
|
@@ -1867,18 +1881,35 @@ var AddNewRow = function (props) {
|
|
|
1867
1881
|
};
|
|
1868
1882
|
// Components
|
|
1869
1883
|
var SplitterTable = function (_a) {
|
|
1870
|
-
var rows = _a.rows, columns = _a.columns,
|
|
1871
|
-
return (jsxs(StyledTable, { children: [jsxs("thead", { children: [jsx(Td, {}), columns.map(function (column, index) { return (jsx(Td, __assign({ css: { textAlign: "start" } }, { children: column }), "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 })),
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1884
|
+
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;
|
|
1885
|
+
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) {
|
|
1886
|
+
var _a;
|
|
1887
|
+
var isTextField = !!column.cell;
|
|
1888
|
+
return (jsx(Td, __assign({ noPadding: true, css: {
|
|
1889
|
+
"input::-webkit-inner-spin-button": {
|
|
1890
|
+
"-webkit-appearance": "none",
|
|
1891
|
+
margin: 0,
|
|
1892
|
+
},
|
|
1893
|
+
/* Firefox */
|
|
1894
|
+
"input[type=number]": {
|
|
1895
|
+
"-moz-appearance": "textfield",
|
|
1896
|
+
},
|
|
1897
|
+
} }, { children: isTextField ? (jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
|
|
1898
|
+
if (Number(e.target.value) > 100)
|
|
1899
|
+
e.target.value = 100;
|
|
1900
|
+
}, onChange: function (e) {
|
|
1901
|
+
var _a, _b;
|
|
1902
|
+
var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
|
|
1903
|
+
? Number(e.target.value)
|
|
1904
|
+
: e.target.value;
|
|
1905
|
+
onUpdateRow(row.id, value, column.accessorKey);
|
|
1906
|
+
} }, (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config))) : (row[column.accessorKey]) }), "cell ".concat(cellIndex)));
|
|
1907
|
+
}), 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(); } })] })] }));
|
|
1877
1908
|
};
|
|
1878
1909
|
var Table = function (_a) {
|
|
1879
1910
|
var rows = _a.rows, columns = _a.columns;
|
|
1880
|
-
return (jsxs(StyledTable, { children: [jsx("thead", { children: columns.map(function (column, index) { return (jsx(Td, { children: column }, "header-".concat(index))); }) }), jsx("tbody", { children: rows.map(function (row, rowIndex) { return (jsx("tr", { children:
|
|
1881
|
-
return (jsx(Td, { children: row.
|
|
1911
|
+
return (jsxs(StyledTable, { children: [jsx("thead", { children: columns.map(function (column, index) { return (jsx(Td, { children: column }, "header-".concat(index))); }) }), jsx("tbody", { children: rows.map(function (row, rowIndex) { return (jsx("tr", { children: columns.map(function (column, cellIndex) {
|
|
1912
|
+
return (jsx(Td, { children: row[column.accessorKey] }, "cell ".concat(cellIndex)));
|
|
1882
1913
|
}) }, "row ".concat(rowIndex))); }) })] }));
|
|
1883
1914
|
};
|
|
1884
1915
|
|
|
@@ -2043,7 +2074,7 @@ var HeroSection = function (_a) {
|
|
|
2043
2074
|
display: "flex",
|
|
2044
2075
|
justifyContent: "flex-end",
|
|
2045
2076
|
alignItems: "center",
|
|
2046
|
-
} }, { children: jsx(Image
|
|
2077
|
+
} }, { 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: {
|
|
2047
2078
|
width: "80%",
|
|
2048
2079
|
lineHeight: "$xl",
|
|
2049
2080
|
"@sm": {
|
|
@@ -2055,7 +2086,7 @@ var HeroSection = function (_a) {
|
|
|
2055
2086
|
display: "flex",
|
|
2056
2087
|
justifyContent: "flex-end",
|
|
2057
2088
|
alignItems: "center",
|
|
2058
|
-
} }, { children: jsx(Image
|
|
2089
|
+
} }, { children: jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
|
|
2059
2090
|
};
|
|
2060
2091
|
|
|
2061
2092
|
var TwoColumnSection = function (_a) {
|
|
@@ -2083,7 +2114,7 @@ var TwoColumnSection = function (_a) {
|
|
|
2083
2114
|
"@md": {
|
|
2084
2115
|
m: "0",
|
|
2085
2116
|
},
|
|
2086
|
-
} }, { children: !screenDownSm ? (jsx(Image
|
|
2117
|
+
} }, { 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" })) }))] })));
|
|
2087
2118
|
};
|
|
2088
2119
|
|
|
2089
2120
|
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,11 @@ 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
|
+
});
|
|
963
965
|
|
|
964
966
|
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
967
|
|
|
@@ -1157,7 +1159,7 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
|
|
|
1157
1159
|
marginTop: "-103.5px",
|
|
1158
1160
|
},
|
|
1159
1161
|
},
|
|
1160
|
-
} }, { children: jsxRuntime.jsx(Image, { placeholder: 'blur',
|
|
1162
|
+
} }, { 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
1163
|
display: "grid",
|
|
1162
1164
|
justifyContent: "center",
|
|
1163
1165
|
"@sm": { justifyContent: "start" },
|
|
@@ -1198,7 +1200,7 @@ var LogoCard = function (props) {
|
|
|
1198
1200
|
width: "auto",
|
|
1199
1201
|
height: "60px",
|
|
1200
1202
|
},
|
|
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,
|
|
1203
|
+
}, target: "_blank", href: props.logoCardLink }, { children: jsxRuntime.jsx(Box, __assign({ css: { position: "relative", width: "100%", height: "100%" } }, { children: jsxRuntime.jsx(Image, { src: props.image, alt: props.heading }) })) })));
|
|
1202
1204
|
};
|
|
1203
1205
|
|
|
1204
1206
|
// Exports
|
|
@@ -1231,6 +1233,7 @@ var IconButton = styled("button", {
|
|
|
1231
1233
|
color: "$muted",
|
|
1232
1234
|
},
|
|
1233
1235
|
margin: 0,
|
|
1236
|
+
border: "2px solid transparent",
|
|
1234
1237
|
variants: {
|
|
1235
1238
|
ghost: {
|
|
1236
1239
|
true: {
|
|
@@ -1247,6 +1250,11 @@ var IconButton = styled("button", {
|
|
|
1247
1250
|
width: "$full",
|
|
1248
1251
|
},
|
|
1249
1252
|
},
|
|
1253
|
+
borderDisabled: {
|
|
1254
|
+
true: {
|
|
1255
|
+
border: "2px solid $bg04",
|
|
1256
|
+
},
|
|
1257
|
+
},
|
|
1250
1258
|
},
|
|
1251
1259
|
});
|
|
1252
1260
|
var IconButtonStory = modifyVariantsForStory(IconButton);
|
|
@@ -1389,11 +1397,11 @@ var TextFieldWithCopy = React.forwardRef(function (props, ref) {
|
|
|
1389
1397
|
TextFieldWithCopy.displayName = "TextFieldWithCopy";
|
|
1390
1398
|
|
|
1391
1399
|
var NumberField = React.forwardRef(function (_a, ref) {
|
|
1392
|
-
var _b = _a.max, max = _b === void 0 ? 10 : _b, _c = _a.min, min = _c === void 0 ?
|
|
1400
|
+
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;
|
|
1393
1401
|
var _d = React.useState(value || min), qty = _d[0], setQty = _d[1];
|
|
1394
1402
|
var handleOnDec = function (e) {
|
|
1395
1403
|
e.preventDefault();
|
|
1396
|
-
if (qty
|
|
1404
|
+
if (qty < min) {
|
|
1397
1405
|
setQty(min);
|
|
1398
1406
|
}
|
|
1399
1407
|
else {
|
|
@@ -1410,7 +1418,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
|
|
|
1410
1418
|
}
|
|
1411
1419
|
};
|
|
1412
1420
|
var handleOnChange = function (e) {
|
|
1413
|
-
var value = e.target;
|
|
1421
|
+
var value = e.target.value;
|
|
1414
1422
|
if (value > max) {
|
|
1415
1423
|
setQty(max);
|
|
1416
1424
|
}
|
|
@@ -1425,9 +1433,10 @@ var NumberField = React.forwardRef(function (_a, ref) {
|
|
|
1425
1433
|
if (qty && onChangeValue) {
|
|
1426
1434
|
onChangeValue(qty);
|
|
1427
1435
|
}
|
|
1428
|
-
}, [qty
|
|
1436
|
+
}, [qty]);
|
|
1429
1437
|
return (jsxRuntime.jsxs(Box, __assign({ css: {
|
|
1430
1438
|
display: "flex",
|
|
1439
|
+
maxHeight: "$3xl",
|
|
1431
1440
|
"input::-webkit-inner-spin-button": {
|
|
1432
1441
|
"-webkit-appearance": "none",
|
|
1433
1442
|
margin: 0,
|
|
@@ -1459,7 +1468,7 @@ var NumberField = React.forwardRef(function (_a, ref) {
|
|
|
1459
1468
|
borderRadius: 0,
|
|
1460
1469
|
width: "95px",
|
|
1461
1470
|
},
|
|
1462
|
-
} }, { children: [jsxRuntime.jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec }, { 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 }, { children: "+" }))] })));
|
|
1471
|
+
} }, { 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: "+" }))] })));
|
|
1463
1472
|
});
|
|
1464
1473
|
NumberField.displayName = "NumberField";
|
|
1465
1474
|
|
|
@@ -1586,9 +1595,11 @@ var AdvisoryToggleBullet = function (props) {
|
|
|
1586
1595
|
} }, { children: props.rank }))), jsxRuntime.jsx(Text, __assign({ color: color }, { children: props.children }))] })));
|
|
1587
1596
|
};
|
|
1588
1597
|
|
|
1589
|
-
var CardImage = styled(
|
|
1598
|
+
var CardImage = styled(Image, {
|
|
1590
1599
|
btrr: "$4",
|
|
1591
1600
|
btlr: "$4",
|
|
1601
|
+
width: "100%",
|
|
1602
|
+
height: "100%",
|
|
1592
1603
|
});
|
|
1593
1604
|
var ToggleCardItem = styled(ToggleGroupItem, {
|
|
1594
1605
|
all: "unset",
|
|
@@ -1635,7 +1646,7 @@ var Card = function (_a) {
|
|
|
1635
1646
|
"@sm": {
|
|
1636
1647
|
width: "$full",
|
|
1637
1648
|
},
|
|
1638
|
-
} }, { children: jsxRuntime.jsx(CardImage, { src: props.image,
|
|
1649
|
+
} }, { children: jsxRuntime.jsx(CardImage, { src: props.image, alt: props.heading }) }))), jsxRuntime.jsxs(Box, __assign({ className: "box-card-icon", css: {
|
|
1639
1650
|
display: "flex",
|
|
1640
1651
|
p: "$xl",
|
|
1641
1652
|
gap: "$xl",
|
|
@@ -1783,14 +1794,14 @@ var ProgressTracker = function (props) {
|
|
|
1783
1794
|
display: "flex",
|
|
1784
1795
|
justifyContent: "space-between",
|
|
1785
1796
|
alignItems: "center",
|
|
1786
|
-
} }, { children: items.map(function (item, index) { return (jsxRuntime.jsx(Link, __assign({ disabled: item.status === "incomplete", href: item.status === "incomplete" ? "
|
|
1797
|
+
} }, { 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))); }) }))] })) })));
|
|
1787
1798
|
};
|
|
1788
1799
|
|
|
1789
1800
|
var StyledRadio = styled(RadioGroupPrimitive__namespace.Item, {
|
|
1790
1801
|
all: "unset",
|
|
1791
1802
|
backgroundColor: "$obolGreen",
|
|
1792
|
-
width:
|
|
1793
|
-
height:
|
|
1803
|
+
width: 18,
|
|
1804
|
+
height: 18,
|
|
1794
1805
|
borderRadius: "100%",
|
|
1795
1806
|
"&:hover": { filter: "brightness(90%)", cursor: "pointer" },
|
|
1796
1807
|
});
|
|
@@ -1805,10 +1816,10 @@ var StyledIndicator = styled(RadioGroupPrimitive__namespace.Indicator, {
|
|
|
1805
1816
|
content: '""',
|
|
1806
1817
|
display: "absolute",
|
|
1807
1818
|
position: "absolute",
|
|
1808
|
-
width:
|
|
1809
|
-
height:
|
|
1819
|
+
width: 10,
|
|
1820
|
+
height: 10,
|
|
1810
1821
|
borderRadius: "50%",
|
|
1811
|
-
boxShadow: "0 0 0
|
|
1822
|
+
boxShadow: "0 0 0 2px #0E1E22",
|
|
1812
1823
|
backgroundColor: "#2FE4AB",
|
|
1813
1824
|
},
|
|
1814
1825
|
});
|
|
@@ -1818,6 +1829,7 @@ var RadioGroupRadio = StyledRadio;
|
|
|
1818
1829
|
var RadioGroupIndicator = StyledIndicator;
|
|
1819
1830
|
var RadioGroupItemLabel = styled("label", {
|
|
1820
1831
|
color: "$textLight",
|
|
1832
|
+
fontWeight: "$bold",
|
|
1821
1833
|
fontSize: "$3",
|
|
1822
1834
|
lineHeight: 1,
|
|
1823
1835
|
userSelect: "none",
|
|
@@ -1827,7 +1839,7 @@ var RadioGroupItemLabel = styled("label", {
|
|
|
1827
1839
|
var RadioGroupItem = function (_a) {
|
|
1828
1840
|
var value = _a.value, label = _a.label, _b = _a.index, index = _b === void 0 ? 1 : _b;
|
|
1829
1841
|
var id = "id-:r".concat(index, ":");
|
|
1830
|
-
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 }))] })));
|
|
1842
|
+
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 }))] })));
|
|
1831
1843
|
};
|
|
1832
1844
|
var RadioGroupComponent = function (_a) {
|
|
1833
1845
|
var items = _a.items, value = _a.value, onValueChange = _a.onValueChange, props = __rest(_a, ["items", "value", "onValueChange"]);
|
|
@@ -1839,7 +1851,7 @@ var StyledTable = styled("table", {
|
|
|
1839
1851
|
borderRadius: "2px",
|
|
1840
1852
|
backgroundColor: "$bg02",
|
|
1841
1853
|
borderStyle: "hidden",
|
|
1842
|
-
boxShadow: "0 0 0 2px $bg04",
|
|
1854
|
+
boxShadow: "0 0 0 2px $colors$bg04",
|
|
1843
1855
|
width: "100%",
|
|
1844
1856
|
"& thead": {
|
|
1845
1857
|
color: "$body",
|
|
@@ -1872,6 +1884,7 @@ var Td = styled("td", {
|
|
|
1872
1884
|
noPadding: {
|
|
1873
1885
|
true: {
|
|
1874
1886
|
p: 0,
|
|
1887
|
+
backgroundColor: "$bg03",
|
|
1875
1888
|
},
|
|
1876
1889
|
},
|
|
1877
1890
|
size: {
|
|
@@ -1899,18 +1912,35 @@ var AddNewRow = function (props) {
|
|
|
1899
1912
|
};
|
|
1900
1913
|
// Components
|
|
1901
1914
|
var SplitterTable = function (_a) {
|
|
1902
|
-
var rows = _a.rows, columns = _a.columns,
|
|
1903
|
-
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-".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 })),
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1915
|
+
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;
|
|
1916
|
+
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) {
|
|
1917
|
+
var _a;
|
|
1918
|
+
var isTextField = !!column.cell;
|
|
1919
|
+
return (jsxRuntime.jsx(Td, __assign({ noPadding: true, css: {
|
|
1920
|
+
"input::-webkit-inner-spin-button": {
|
|
1921
|
+
"-webkit-appearance": "none",
|
|
1922
|
+
margin: 0,
|
|
1923
|
+
},
|
|
1924
|
+
/* Firefox */
|
|
1925
|
+
"input[type=number]": {
|
|
1926
|
+
"-moz-appearance": "textfield",
|
|
1927
|
+
},
|
|
1928
|
+
} }, { children: isTextField ? (jsxRuntime.jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
|
|
1929
|
+
if (Number(e.target.value) > 100)
|
|
1930
|
+
e.target.value = 100;
|
|
1931
|
+
}, onChange: function (e) {
|
|
1932
|
+
var _a, _b;
|
|
1933
|
+
var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
|
|
1934
|
+
? Number(e.target.value)
|
|
1935
|
+
: e.target.value;
|
|
1936
|
+
onUpdateRow(row.id, value, column.accessorKey);
|
|
1937
|
+
} }, (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config))) : (row[column.accessorKey]) }), "cell ".concat(cellIndex)));
|
|
1938
|
+
}), 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(); } })] })] }));
|
|
1909
1939
|
};
|
|
1910
1940
|
var Table = function (_a) {
|
|
1911
1941
|
var rows = _a.rows, columns = _a.columns;
|
|
1912
|
-
return (jsxRuntime.jsxs(StyledTable, { children: [jsxRuntime.jsx("thead", { children: columns.map(function (column, index) { return (jsxRuntime.jsx(Td, { children: column }, "header-".concat(index))); }) }), jsxRuntime.jsx("tbody", { children: rows.map(function (row, rowIndex) { return (jsxRuntime.jsx("tr", { children:
|
|
1913
|
-
return (jsxRuntime.jsx(Td, { children: row.
|
|
1942
|
+
return (jsxRuntime.jsxs(StyledTable, { children: [jsxRuntime.jsx("thead", { children: columns.map(function (column, index) { return (jsxRuntime.jsx(Td, { children: column }, "header-".concat(index))); }) }), jsxRuntime.jsx("tbody", { children: rows.map(function (row, rowIndex) { return (jsxRuntime.jsx("tr", { children: columns.map(function (column, cellIndex) {
|
|
1943
|
+
return (jsxRuntime.jsx(Td, { children: row[column.accessorKey] }, "cell ".concat(cellIndex)));
|
|
1914
1944
|
}) }, "row ".concat(rowIndex))); }) })] }));
|
|
1915
1945
|
};
|
|
1916
1946
|
|
|
@@ -2075,7 +2105,7 @@ var HeroSection = function (_a) {
|
|
|
2075
2105
|
display: "flex",
|
|
2076
2106
|
justifyContent: "flex-end",
|
|
2077
2107
|
alignItems: "center",
|
|
2078
|
-
} }, { children: jsxRuntime.jsx(
|
|
2108
|
+
} }, { 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: {
|
|
2079
2109
|
width: "80%",
|
|
2080
2110
|
lineHeight: "$xl",
|
|
2081
2111
|
"@sm": {
|
|
@@ -2087,7 +2117,7 @@ var HeroSection = function (_a) {
|
|
|
2087
2117
|
display: "flex",
|
|
2088
2118
|
justifyContent: "flex-end",
|
|
2089
2119
|
alignItems: "center",
|
|
2090
|
-
} }, { children: jsxRuntime.jsx(
|
|
2120
|
+
} }, { children: jsxRuntime.jsx(Image, { src: (image === null || image === void 0 ? void 0 : image.basePath) || BASE_PATH, alt: "Obol Logo", width: 912, height: 597 }) })))] })));
|
|
2091
2121
|
};
|
|
2092
2122
|
|
|
2093
2123
|
var TwoColumnSection = function (_a) {
|
|
@@ -2115,7 +2145,7 @@ var TwoColumnSection = function (_a) {
|
|
|
2115
2145
|
"@md": {
|
|
2116
2146
|
m: "0",
|
|
2117
2147
|
},
|
|
2118
|
-
} }, { children: !screenDownSm ? (jsxRuntime.jsx(
|
|
2148
|
+
} }, { 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" })) }))] })));
|
|
2119
2149
|
};
|
|
2120
2150
|
|
|
2121
2151
|
exports.Accordion = Accordion;
|