@obolnetwork/obol-ui 1.0.15-0 → 1.0.17

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.
@@ -9,8 +9,8 @@ export declare type CellDef = {
9
9
  component: "TextField" | "NumberField";
10
10
  config?: {
11
11
  type: "text" | "number";
12
- max: number;
13
- min: number;
12
+ max?: number;
13
+ min?: number;
14
14
  };
15
15
  };
16
16
  export declare type ColumnDef<T> = {
package/dist/index.es.js CHANGED
@@ -929,7 +929,8 @@ var Container = styled(Box, {
929
929
  var Image = styled('img', {
930
930
  // reset
931
931
  verticalAlign: "middle",
932
- maxWidth: "100%"
932
+ maxWidth: "100%",
933
+ maxHeight: "100%",
933
934
  });
934
935
 
935
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" }) }))); };
@@ -1117,7 +1118,7 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ css: {
1117
1118
  "@sm": { $$size: "100px" },
1118
1119
  "&::after": {
1119
1120
  position: "absolute",
1120
- marginTop: "-163.5px",
1121
+ marginTop: "-160px",
1121
1122
  borderRadius: "$round",
1122
1123
  display: "block",
1123
1124
  content: "",
@@ -1125,10 +1126,10 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ css: {
1125
1126
  height: "$$size",
1126
1127
  background: "hsla(161, 77%, 54%, 0.2)",
1127
1128
  "@sm": {
1128
- marginTop: "-103.5px",
1129
+ marginTop: "-100px",
1129
1130
  },
1130
1131
  },
1131
- } }, { children: jsx(Image, { placeholder: 'blur', 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: {
1132
1133
  display: "grid",
1133
1134
  justifyContent: "center",
1134
1135
  "@sm": { justifyContent: "start" },
@@ -1169,7 +1170,13 @@ var LogoCard = function (props) {
1169
1170
  width: "auto",
1170
1171
  height: "60px",
1171
1172
  },
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 }) })) })));
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 }) })) })));
1173
1180
  };
1174
1181
 
1175
1182
  // Exports
@@ -1863,6 +1870,20 @@ var Td = styled("td", {
1863
1870
  },
1864
1871
  },
1865
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
+ });
1866
1887
  var Tr = styled("tr", {});
1867
1888
  var BoxBorderTop = styled(Box, {
1868
1889
  borderTop: "2px solid $bg04",
@@ -1882,7 +1903,7 @@ var AddNewRow = function (props) {
1882
1903
  // Components
1883
1904
  var SplitterTable = function (_a) {
1884
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;
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) {
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) {
1886
1907
  var _a;
1887
1908
  var isTextField = !!column.cell;
1888
1909
  return (jsx(Td, __assign({ noPadding: true, css: {
@@ -1895,8 +1916,13 @@ var SplitterTable = function (_a) {
1895
1916
  "-moz-appearance": "textfield",
1896
1917
  },
1897
1918
  } }, { children: isTextField ? (jsx(TextField, __assign({ defaultValue: row[column.accessorKey], onInput: function (e) {
1898
- if (Number(e.target.value) > 100)
1899
- e.target.value = 100;
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
+ }
1900
1926
  }, onChange: function (e) {
1901
1927
  var _a, _b;
1902
1928
  var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
package/dist/index.js CHANGED
@@ -960,7 +960,8 @@ var Container = styled(Box, {
960
960
  var Image = styled('img', {
961
961
  // reset
962
962
  verticalAlign: "middle",
963
- maxWidth: "100%"
963
+ maxWidth: "100%",
964
+ maxHeight: "100%",
964
965
  });
965
966
 
966
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" }) }))); };
@@ -1148,7 +1149,7 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
1148
1149
  "@sm": { $$size: "100px" },
1149
1150
  "&::after": {
1150
1151
  position: "absolute",
1151
- marginTop: "-163.5px",
1152
+ marginTop: "-160px",
1152
1153
  borderRadius: "$round",
1153
1154
  display: "block",
1154
1155
  content: "",
@@ -1156,10 +1157,10 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
1156
1157
  height: "$$size",
1157
1158
  background: "hsla(161, 77%, 54%, 0.2)",
1158
1159
  "@sm": {
1159
- marginTop: "-103.5px",
1160
+ marginTop: "-100px",
1160
1161
  },
1161
1162
  },
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: {
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: {
1163
1164
  display: "grid",
1164
1165
  justifyContent: "center",
1165
1166
  "@sm": { justifyContent: "start" },
@@ -1200,7 +1201,13 @@ var LogoCard = function (props) {
1200
1201
  width: "auto",
1201
1202
  height: "60px",
1202
1203
  },
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 }) })) })));
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 }) })) })));
1204
1211
  };
1205
1212
 
1206
1213
  // Exports
@@ -1894,6 +1901,20 @@ var Td = styled("td", {
1894
1901
  },
1895
1902
  },
1896
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
+ });
1897
1918
  var Tr = styled("tr", {});
1898
1919
  var BoxBorderTop = styled(Box, {
1899
1920
  borderTop: "2px solid $bg04",
@@ -1913,7 +1934,7 @@ var AddNewRow = function (props) {
1913
1934
  // Components
1914
1935
  var SplitterTable = function (_a) {
1915
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;
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) {
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) {
1917
1938
  var _a;
1918
1939
  var isTextField = !!column.cell;
1919
1940
  return (jsxRuntime.jsx(Td, __assign({ noPadding: true, css: {
@@ -1926,8 +1947,13 @@ var SplitterTable = function (_a) {
1926
1947
  "-moz-appearance": "textfield",
1927
1948
  },
1928
1949
  } }, { 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;
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
+ }
1931
1957
  }, onChange: function (e) {
1932
1958
  var _a, _b;
1933
1959
  var value = ((_b = (_a = column.cell) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.type) === "number"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.15-0",
3
+ "version": "1.0.17",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",