@obolnetwork/obol-ui 1.0.21 → 1.0.24

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.
@@ -0,0 +1,484 @@
1
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2
+ import React from "react";
3
+ export declare const CheckboxRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>>, {}, {
4
+ motion: "(prefers-reduced-motion)";
5
+ hover: "(any-hover: hover)";
6
+ dark: "(prefers-color-scheme: dark)";
7
+ light: "(prefers-color-scheme: light)";
8
+ xs: "(max-width: 520px)";
9
+ sm: "(max-width: 900px)";
10
+ bp2: "(min-width: 900px)";
11
+ md: "(max-width: 1200px)";
12
+ lg: "(max-width: 1800px)";
13
+ }, import("@stitches/react/types/css-util").CSS<{
14
+ motion: "(prefers-reduced-motion)";
15
+ hover: "(any-hover: hover)";
16
+ dark: "(prefers-color-scheme: dark)";
17
+ light: "(prefers-color-scheme: light)";
18
+ xs: "(max-width: 520px)";
19
+ sm: "(max-width: 900px)";
20
+ bp2: "(min-width: 900px)";
21
+ md: "(max-width: 1200px)";
22
+ lg: "(max-width: 1800px)";
23
+ }, {
24
+ colors: {
25
+ white: string;
26
+ black: string;
27
+ lightBackground: string;
28
+ obolBlue: string;
29
+ primaryBgDefault: string;
30
+ primaryBgDefaultHover: string;
31
+ primaryTextDefault: string;
32
+ secondaryBgDefault: string;
33
+ secondaryBgHover: string;
34
+ grayBgDefault: string;
35
+ gray2BgDefault: string;
36
+ neutralDark: string;
37
+ navButtonBgDefault: string;
38
+ navButtonBgHover: string;
39
+ cardBackgroundDark: string;
40
+ cardBackgroundLight: string;
41
+ textMiddle: string;
42
+ textLight: string;
43
+ textLighter: string;
44
+ textTabHover: string;
45
+ textTabInactive: string;
46
+ textGreenDark: string;
47
+ textGreenLight: string;
48
+ textGreen1: string;
49
+ textGreen2: string;
50
+ textGreen3: string;
51
+ textGreenHover: string;
52
+ textCreateHover: string;
53
+ textGrayHover: string;
54
+ txButton: string;
55
+ obolGreen: string;
56
+ obolMidGreen: string;
57
+ obolGreenHover: string;
58
+ obolGreenLight: string;
59
+ obolDarkDark: string;
60
+ obolDisabled: string;
61
+ linkButtonHover: string;
62
+ progressTrackerGreen: string;
63
+ coordinate: string;
64
+ coordinateHover: string;
65
+ test: string;
66
+ testHover: string;
67
+ create: string;
68
+ createHover: string;
69
+ light: string;
70
+ body: string;
71
+ muted: string;
72
+ menu: string;
73
+ bg01: string;
74
+ bg02: string;
75
+ bg03: string;
76
+ bg04: string;
77
+ bg05: string;
78
+ tooltip: string;
79
+ tooltip2: string;
80
+ };
81
+ space: {
82
+ 1: string;
83
+ 2: string;
84
+ xxxs: string;
85
+ xxs: string;
86
+ xs: string;
87
+ sm: string;
88
+ md: string;
89
+ lg: string;
90
+ xl: string;
91
+ "2xl": string;
92
+ "3xl": string;
93
+ "4xl": string;
94
+ "5xl": string;
95
+ "6xl": string;
96
+ "7xl": string;
97
+ };
98
+ sizes: {
99
+ 1: string;
100
+ 2: string;
101
+ xxxs: string;
102
+ xxs: string;
103
+ xs: string;
104
+ sm: string;
105
+ md: string;
106
+ lg: string;
107
+ xl: string;
108
+ "2xl": string;
109
+ "3xl": string;
110
+ "4xl": string;
111
+ "5xl": string;
112
+ "6xl": string;
113
+ "7xl": string;
114
+ max: string;
115
+ min: string;
116
+ full: string;
117
+ };
118
+ radii: {
119
+ 1: string;
120
+ 2: string;
121
+ 3: string;
122
+ 4: string;
123
+ 5: string;
124
+ round: string;
125
+ pill: string;
126
+ };
127
+ fontSizes: {
128
+ 1: string;
129
+ 2: string;
130
+ 3: string;
131
+ 4: string;
132
+ 5: string;
133
+ 6: string;
134
+ 7: string;
135
+ 8: string;
136
+ 9: string;
137
+ 10: string;
138
+ 11: string;
139
+ };
140
+ fontWeights: {
141
+ hairline: number;
142
+ thin: number;
143
+ light: number;
144
+ normal: number;
145
+ medium: number;
146
+ semibold: number;
147
+ bold: number;
148
+ extrabold: number;
149
+ black: number;
150
+ };
151
+ lineHeights: {
152
+ normal: string;
153
+ none: number;
154
+ shorter: number;
155
+ short: number;
156
+ base: number;
157
+ tall: number;
158
+ tall2: number;
159
+ taller: string;
160
+ };
161
+ letterSpacings: {
162
+ tighter: string;
163
+ tight: string;
164
+ normal: string;
165
+ wide: string;
166
+ wider: string;
167
+ widest: string;
168
+ };
169
+ borderWidths: unknown;
170
+ borderStyles: unknown;
171
+ shadows: unknown;
172
+ zIndices: unknown;
173
+ transitions: unknown;
174
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
175
+ p: (value: {
176
+ readonly [$$PropertyValue]: "padding";
177
+ }) => {
178
+ padding: {
179
+ readonly [$$PropertyValue]: "padding";
180
+ };
181
+ };
182
+ pt: (value: {
183
+ readonly [$$PropertyValue]: "paddingTop";
184
+ }) => {
185
+ paddingTop: {
186
+ readonly [$$PropertyValue]: "paddingTop";
187
+ };
188
+ };
189
+ pr: (value: {
190
+ readonly [$$PropertyValue]: "paddingRight";
191
+ }) => {
192
+ paddingRight: {
193
+ readonly [$$PropertyValue]: "paddingRight";
194
+ };
195
+ };
196
+ pb: (value: {
197
+ readonly [$$PropertyValue]: "paddingBottom";
198
+ }) => {
199
+ paddingBottom: {
200
+ readonly [$$PropertyValue]: "paddingBottom";
201
+ };
202
+ };
203
+ pl: (value: {
204
+ readonly [$$PropertyValue]: "paddingLeft";
205
+ }) => {
206
+ paddingLeft: {
207
+ readonly [$$PropertyValue]: "paddingLeft";
208
+ };
209
+ };
210
+ px: (value: {
211
+ readonly [$$PropertyValue]: "paddingLeft";
212
+ }) => {
213
+ paddingLeft: {
214
+ readonly [$$PropertyValue]: "paddingLeft";
215
+ };
216
+ paddingRight: {
217
+ readonly [$$PropertyValue]: "paddingLeft";
218
+ };
219
+ };
220
+ py: (value: {
221
+ readonly [$$PropertyValue]: "paddingTop";
222
+ }) => {
223
+ paddingTop: {
224
+ readonly [$$PropertyValue]: "paddingTop";
225
+ };
226
+ paddingBottom: {
227
+ readonly [$$PropertyValue]: "paddingTop";
228
+ };
229
+ };
230
+ m: (value: {
231
+ readonly [$$PropertyValue]: "margin";
232
+ }) => {
233
+ margin: {
234
+ readonly [$$PropertyValue]: "margin";
235
+ };
236
+ };
237
+ mt: (value: {
238
+ readonly [$$PropertyValue]: "marginTop";
239
+ }) => {
240
+ marginTop: {
241
+ readonly [$$PropertyValue]: "marginTop";
242
+ };
243
+ };
244
+ mr: (value: {
245
+ readonly [$$PropertyValue]: "marginRight";
246
+ }) => {
247
+ marginRight: {
248
+ readonly [$$PropertyValue]: "marginRight";
249
+ };
250
+ };
251
+ mb: (value: {
252
+ readonly [$$PropertyValue]: "marginBottom";
253
+ }) => {
254
+ marginBottom: {
255
+ readonly [$$PropertyValue]: "marginBottom";
256
+ };
257
+ };
258
+ ml: (value: {
259
+ readonly [$$PropertyValue]: "marginLeft";
260
+ }) => {
261
+ marginLeft: {
262
+ readonly [$$PropertyValue]: "marginLeft";
263
+ };
264
+ };
265
+ mx: (value: {
266
+ readonly [$$PropertyValue]: "marginLeft";
267
+ }) => {
268
+ marginLeft: {
269
+ readonly [$$PropertyValue]: "marginLeft";
270
+ };
271
+ marginRight: {
272
+ readonly [$$PropertyValue]: "marginLeft";
273
+ };
274
+ };
275
+ my: (value: {
276
+ readonly [$$PropertyValue]: "marginTop";
277
+ }) => {
278
+ marginTop: {
279
+ readonly [$$PropertyValue]: "marginTop";
280
+ };
281
+ marginBottom: {
282
+ readonly [$$PropertyValue]: "marginTop";
283
+ };
284
+ };
285
+ ta: (value: {
286
+ readonly [$$PropertyValue]: "textAlign";
287
+ }) => {
288
+ textAlign: {
289
+ readonly [$$PropertyValue]: "textAlign";
290
+ };
291
+ };
292
+ fd: (value: {
293
+ readonly [$$PropertyValue]: "flexDirection";
294
+ }) => {
295
+ flexDirection: {
296
+ readonly [$$PropertyValue]: "flexDirection";
297
+ };
298
+ };
299
+ fw: (value: {
300
+ readonly [$$PropertyValue]: "flexWrap";
301
+ }) => {
302
+ flexWrap: {
303
+ readonly [$$PropertyValue]: "flexWrap";
304
+ };
305
+ };
306
+ ai: (value: {
307
+ readonly [$$PropertyValue]: "alignItems";
308
+ }) => {
309
+ alignItems: {
310
+ readonly [$$PropertyValue]: "alignItems";
311
+ };
312
+ };
313
+ ac: (value: {
314
+ readonly [$$PropertyValue]: "alignContent";
315
+ }) => {
316
+ alignContent: {
317
+ readonly [$$PropertyValue]: "alignContent";
318
+ };
319
+ };
320
+ jc: (value: {
321
+ readonly [$$PropertyValue]: "justifyContent";
322
+ }) => {
323
+ justifyContent: {
324
+ readonly [$$PropertyValue]: "justifyContent";
325
+ };
326
+ };
327
+ as: (value: {
328
+ readonly [$$PropertyValue]: "alignSelf";
329
+ }) => {
330
+ alignSelf: {
331
+ readonly [$$PropertyValue]: "alignSelf";
332
+ };
333
+ };
334
+ fg: (value: {
335
+ readonly [$$PropertyValue]: "flexGrow";
336
+ }) => {
337
+ flexGrow: {
338
+ readonly [$$PropertyValue]: "flexGrow";
339
+ };
340
+ };
341
+ fs: (value: {
342
+ readonly [$$PropertyValue]: "flexShrink";
343
+ }) => {
344
+ flexShrink: {
345
+ readonly [$$PropertyValue]: "flexShrink";
346
+ };
347
+ };
348
+ fb: (value: {
349
+ readonly [$$PropertyValue]: "flexBasis";
350
+ }) => {
351
+ flexBasis: {
352
+ readonly [$$PropertyValue]: "flexBasis";
353
+ };
354
+ };
355
+ bc: (value: {
356
+ readonly [$$PropertyValue]: "backgroundColor";
357
+ }) => {
358
+ backgroundColor: {
359
+ readonly [$$PropertyValue]: "backgroundColor";
360
+ };
361
+ };
362
+ br: (value: {
363
+ readonly [$$PropertyValue]: "borderRadius";
364
+ }) => {
365
+ borderRadius: {
366
+ readonly [$$PropertyValue]: "borderRadius";
367
+ };
368
+ };
369
+ btrr: (value: {
370
+ readonly [$$PropertyValue]: "borderTopRightRadius";
371
+ }) => {
372
+ borderTopRightRadius: {
373
+ readonly [$$PropertyValue]: "borderTopRightRadius";
374
+ };
375
+ };
376
+ bbrr: (value: {
377
+ readonly [$$PropertyValue]: "borderBottomRightRadius";
378
+ }) => {
379
+ borderBottomRightRadius: {
380
+ readonly [$$PropertyValue]: "borderBottomRightRadius";
381
+ };
382
+ };
383
+ bblr: (value: {
384
+ readonly [$$PropertyValue]: "borderBottomLeftRadius";
385
+ }) => {
386
+ borderBottomLeftRadius: {
387
+ readonly [$$PropertyValue]: "borderBottomLeftRadius";
388
+ };
389
+ };
390
+ btlr: (value: {
391
+ readonly [$$PropertyValue]: "borderTopLeftRadius";
392
+ }) => {
393
+ borderTopLeftRadius: {
394
+ readonly [$$PropertyValue]: "borderTopLeftRadius";
395
+ };
396
+ };
397
+ bs: (value: {
398
+ readonly [$$PropertyValue]: "boxShadow";
399
+ }) => {
400
+ boxShadow: {
401
+ readonly [$$PropertyValue]: "boxShadow";
402
+ };
403
+ };
404
+ lh: (value: {
405
+ readonly [$$PropertyValue]: "lineHeight";
406
+ }) => {
407
+ lineHeight: {
408
+ readonly [$$PropertyValue]: "lineHeight";
409
+ };
410
+ };
411
+ ox: (value: {
412
+ readonly [$$PropertyValue]: "overflowX";
413
+ }) => {
414
+ overflowX: {
415
+ readonly [$$PropertyValue]: "overflowX";
416
+ };
417
+ };
418
+ oy: (value: {
419
+ readonly [$$PropertyValue]: "overflowY";
420
+ }) => {
421
+ overflowY: {
422
+ readonly [$$PropertyValue]: "overflowY";
423
+ };
424
+ };
425
+ pe: (value: {
426
+ readonly [$$PropertyValue]: "pointerEvents";
427
+ }) => {
428
+ pointerEvents: {
429
+ readonly [$$PropertyValue]: "pointerEvents";
430
+ };
431
+ };
432
+ us: (value: {
433
+ readonly [$$PropertyValue]: "userSelect";
434
+ }) => {
435
+ WebkitUserSelect: {
436
+ readonly [$$PropertyValue]: "userSelect";
437
+ };
438
+ userSelect: {
439
+ readonly [$$PropertyValue]: "userSelect";
440
+ };
441
+ };
442
+ userSelect: (value: {
443
+ readonly [$$PropertyValue]: "userSelect";
444
+ }) => {
445
+ WebkitUserSelect: {
446
+ readonly [$$PropertyValue]: "userSelect";
447
+ };
448
+ userSelect: {
449
+ readonly [$$PropertyValue]: "userSelect";
450
+ };
451
+ };
452
+ size: (value: {
453
+ readonly [$$PropertyValue]: "width";
454
+ }) => {
455
+ width: {
456
+ readonly [$$PropertyValue]: "width";
457
+ };
458
+ height: {
459
+ readonly [$$PropertyValue]: "width";
460
+ };
461
+ };
462
+ appearance: (value: {
463
+ readonly [$$PropertyValue]: "appearance";
464
+ }) => {
465
+ WebkitAppearance: {
466
+ readonly [$$PropertyValue]: "appearance";
467
+ };
468
+ appearance: {
469
+ readonly [$$PropertyValue]: "appearance";
470
+ };
471
+ };
472
+ backgroundClip: (value: {
473
+ readonly [$$PropertyValue]: "backgroundClip";
474
+ }) => {
475
+ WebkitBackgroundClip: {
476
+ readonly [$$PropertyValue]: "backgroundClip";
477
+ };
478
+ backgroundClip: {
479
+ readonly [$$PropertyValue]: "backgroundClip";
480
+ };
481
+ };
482
+ }>>;
483
+ export declare const CheckboxIndicator: React.ForwardRefExoticComponent<CheckboxPrimitive.CheckboxIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
484
+ export declare const Checkbox: React.FC<CheckboxPrimitive.CheckboxProps>;
@@ -4,6 +4,8 @@ export declare const SvgIcon: import("@stitches/react/types/styled-component").S
4
4
  color?: "white" | "black" | "lightBackground" | "obolBlue" | "primaryBgDefault" | "primaryBgDefaultHover" | "primaryTextDefault" | "secondaryBgDefault" | "secondaryBgHover" | "grayBgDefault" | "gray2BgDefault" | "neutralDark" | "navButtonBgDefault" | "navButtonBgHover" | "cardBackgroundDark" | "cardBackgroundLight" | "textMiddle" | "textLight" | "textLighter" | "textTabHover" | "textTabInactive" | "textGreenDark" | "textGreenLight" | "textGreen1" | "textGreen2" | "textGreen3" | "textGreenHover" | "textCreateHover" | "textGrayHover" | "txButton" | "obolGreen" | "obolMidGreen" | "obolGreenHover" | "obolGreenLight" | "obolDarkDark" | "obolDisabled" | "linkButtonHover" | "progressTrackerGreen" | "coordinate" | "coordinateHover" | "test" | "testHover" | "create" | "createHover" | "light" | "body" | "muted" | "menu" | "bg01" | "bg02" | "bg03" | "bg04" | "bg05" | "tooltip" | "tooltip2" | "inherit" | undefined;
5
5
  size?: "inherit" | "sm" | "md" | "lg" | "xl" | undefined;
6
6
  fillColor?: boolean | "true" | "false" | undefined;
7
+ strokeColor?: boolean | "true" | "false" | undefined;
8
+ transform?: "xAxis" | undefined;
7
9
  }, {
8
10
  motion: "(prefers-reduced-motion)";
9
11
  hover: "(any-hover: hover)";
@@ -14,3 +14,5 @@ export * from "./IconButton/IconButton";
14
14
  export * from "./TextField/TextField";
15
15
  export * from "./NumberField/NumberField";
16
16
  export * from './Tooltip/Tooltip';
17
+ export * from './LoadingButton/LoadingButton';
18
+ export * from './Checkbox/Checkbox';
@@ -26,7 +26,10 @@ export * from "./static-icons/GroupIcon";
26
26
  export * from "./static-icons/ExistingGroupIcon";
27
27
  export * from "./static-icons/CopyIcon";
28
28
  export * from "./static-icons/CheckIcon";
29
+ export * from "./static-icons/CheckboxIcon";
29
30
  export * from "./static-icons/TrashIcon";
30
31
  export * from "./static-icons/BulletCheckIcon";
31
32
  export * from "./static-icons/HelpIcon";
32
33
  export * from "./static-icons/WaitingIcon";
34
+ export * from "./static-icons/MinusIcon";
35
+ export * from "./static-icons/PlusIcon";
@@ -0,0 +1 @@
1
+ export declare const CheckboxIcon: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const MinusIcon: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PlusIcon: () => JSX.Element;
@@ -8,6 +8,7 @@ export interface StepProps {
8
8
  }
9
9
  interface ProgressTrackerProps {
10
10
  items: StepProps[];
11
+ currentStep?: StepProps;
11
12
  }
12
13
  export declare const ProgressTracker: React.FC<ProgressTrackerProps>;
13
14
  export {};
package/dist/index.es.js CHANGED
@@ -4,6 +4,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
5
5
  import React, { forwardRef, useState, useRef, useEffect, useLayoutEffect } from 'react';
6
6
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
7
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
7
8
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
8
9
  import { useRouter } from 'next/router';
9
10
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
@@ -401,6 +402,23 @@ var SvgIcon = styled("svg", {
401
402
  },
402
403
  },
403
404
  },
405
+ strokeColor: {
406
+ true: {
407
+ "& path": {
408
+ stroke: "$$color",
409
+ },
410
+ },
411
+ false: {
412
+ "& path": {
413
+ stroke: "none",
414
+ },
415
+ },
416
+ },
417
+ transform: {
418
+ xAxis: {
419
+ transform: "scale(-1)",
420
+ },
421
+ },
404
422
  },
405
423
  defaultVariants: {
406
424
  size: "sm",
@@ -1096,6 +1114,8 @@ var CopyIcon = function () { return (jsxs("svg", __assign({ width: "24", height:
1096
1114
 
1097
1115
  var CheckIcon = function () { return (jsxs("svg", __assign({ width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("path", { d: "M0.5 12C0.5 5.37258 5.87258 0 12.5 0V0C19.1274 0 24.5 5.37258 24.5 12V12C24.5 18.6274 19.1274 24 12.5 24V24C5.87258 24 0.5 18.6274 0.5 12V12Z", fill: "#1D5249" }), jsx("path", { d: "M10.6818 14.3284L8.29545 11.8209L7.5 12.6567L10.6818 16L17.5 8.83582L16.7045 8L10.6818 14.3284Z", fill: "#2FE4AB", stroke: "#2FE4AB" })] }))); };
1098
1116
 
1117
+ var CheckboxIcon = function () { return (jsx("svg", __assign({ width: "12", height: "9", viewBox: "0 0 12 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M4.33317 6.63449L2.14567 4.33598L1.4165 5.10215L4.33317 8.16683L10.5832 1.59967L9.854 0.833496L4.33317 6.63449Z", fill: "#9CC2C9", stroke: "#9CC2C9" }) }))); };
1118
+
1099
1119
  var TrashIcon = function () { return (jsx("svg", __assign({ width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M16.5 9V19H8.5V9H16.5ZM15 3H10L9 4H5.5V6H19.5V4H16L15 3ZM18.5 7H6.5V19C6.5 20.1 7.4 21 8.5 21H16.5C17.6 21 18.5 20.1 18.5 19V7Z", fill: "#DAEEF3" }) }))); };
1100
1120
 
1101
1121
  var BulletCheckIcon = function () { return (jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("path", { id: "background", d: "M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z", fill: "#1D5249" }), jsx("path", { id: "check", d: "M10.1818 14.3284L7.79545 11.8209L7 12.6567L10.1818 16L17 8.83582L16.2045 8L10.1818 14.3284Z", fill: "#2FE4AB", stroke: "#2FE4AB" })] }))); };
@@ -1104,6 +1124,10 @@ var HelpIcon = function () { return (jsx("svg", __assign({ width: "25", height:
1104
1124
 
1105
1125
  var WaitingIcon = function () { return (jsxs("svg", __assign({ width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsx("rect", { x: "0.5", width: "24", height: "24", rx: "12", fill: "#243D42" }), jsx("path", { d: "M12.5 0C5.9 0 0.5 5.4 0.5 12C0.5 18.6 5.9 24 12.5 24C19.1 24 24.5 18.6 24.5 12C24.5 5.4 19.1 0 12.5 0ZM12.5 21.6C7.208 21.6 2.9 17.292 2.9 12C2.9 6.708 7.208 2.4 12.5 2.4C17.792 2.4 22.1 6.708 22.1 12C22.1 17.292 17.792 21.6 12.5 21.6ZM13.1 6H11.3V13.2L17.54 17.04L18.5 15.48L13.1 12.24V6Z", fill: "#475E64" })] }))); };
1106
1126
 
1127
+ var MinusIcon = function () { return (jsx("svg", __assign({ width: "15", height: "2", viewBox: "0 0 15 2", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M14.5 2H0.5V0H14.5V2Z", fill: "#DAEEF3" }) }))); };
1128
+
1129
+ var PlusIcon = function () { return (jsx("svg", __assign({ width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsx("path", { d: "M14 8H8V14H6V8H0V6H6V0H8V6H14V8Z", fill: "#DAEEF3" }) }))); };
1130
+
1107
1131
  var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ css: {
1108
1132
  display: "grid",
1109
1133
  gridTemplateColumns: "1fr",
@@ -1209,6 +1233,10 @@ var IconButton = styled("button", {
1209
1233
  "&:disabled": {
1210
1234
  backgroundColor: "$bg02",
1211
1235
  color: "$muted",
1236
+ "& path": {
1237
+ stroke: "$muted",
1238
+ fill: "$muted",
1239
+ },
1212
1240
  },
1213
1241
  margin: 0,
1214
1242
  border: "2px solid transparent",
@@ -1358,9 +1386,10 @@ var Content$2 = styled(TooltipContent, {
1358
1386
  fill: "$bg05",
1359
1387
  },
1360
1388
  });
1361
- var TextFieldWithCopy = forwardRef(function (props, ref) {
1389
+ var TextFieldWithCopy = forwardRef(function (props) {
1362
1390
  var _a = useState(), inputValue = _a[0], setInputValue = _a[1];
1363
1391
  var _b = useState(false), isCopied = _b[0], setIsCopied = _b[1];
1392
+ var ref = useRef(null);
1364
1393
  var copyToClipBoard = function (content) {
1365
1394
  if (content) {
1366
1395
  navigator.clipboard.writeText(content);
@@ -1370,7 +1399,9 @@ var TextFieldWithCopy = forwardRef(function (props, ref) {
1370
1399
  useTimeout(function () {
1371
1400
  setIsCopied(false);
1372
1401
  }, isCopied ? 3000 : null);
1373
- return (jsxs(Box, __assign({ css: { display: "flex" } }, { children: [jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props)), jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsx(IconButton, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsx(CopyIcon, {}) : jsx(CheckIcon, {}) })) })), jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
1402
+ return (jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props, { css: { width: "$full" } })), jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsx(IconButton, __assign({ onClick: function () {
1403
+ return copyToClipBoard(ref && ref.current && ref.current.value);
1404
+ } }, { children: !isCopied ? jsx(CopyIcon, {}) : jsx(CheckIcon, {}) })) })), jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsx(TooltipArrow, {})] }))] }))] })));
1374
1405
  });
1375
1406
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1376
1407
 
@@ -1446,10 +1477,30 @@ var NumberField = forwardRef(function (_a, ref) {
1446
1477
  borderRadius: 0,
1447
1478
  width: "95px",
1448
1479
  },
1449
- } }, { 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: "+" }))] })));
1480
+ } }, { children: [jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: jsx(MinusIcon, {}) })), jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange, onBlur: onBlur, name: name }), jsx(IconButton, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: jsx(PlusIcon, {}) }))] })));
1450
1481
  });
1451
1482
  NumberField.displayName = "NumberField";
1452
1483
 
1484
+ var LoadingButton = function (_a) {
1485
+ var loading = _a.loading, children = _a.children, props = __rest(_a, ["loading", "children"]);
1486
+ return (jsxs(Button, __assign({}, props, { children: [loading && jsx(Spin, {}), children] })));
1487
+ };
1488
+
1489
+ var CheckboxRoot = styled(CheckboxPrimitive.Root, {
1490
+ bc: "$bg03",
1491
+ size: "$lg",
1492
+ border: "2px solid $body",
1493
+ br: "$1",
1494
+ display: "flex",
1495
+ alignItems: "center",
1496
+ justifyContent: "center",
1497
+ });
1498
+ var CheckboxIndicator = CheckboxPrimitive.Indicator;
1499
+ var Checkbox = function (_a) {
1500
+ var props = __rest(_a, []);
1501
+ return (jsx(CheckboxRoot, __assign({}, props, { children: jsx(CheckboxIndicator, { children: jsx(CheckboxIcon, {}) }) })));
1502
+ };
1503
+
1453
1504
  var slideDown = keyframes({
1454
1505
  from: { height: 0 },
1455
1506
  to: { height: "var(--radix-accordion-content-height)" },
@@ -1718,24 +1769,37 @@ var NotificationContainer = styled(Box, {
1718
1769
  borderRadius: "$1",
1719
1770
  display: "flex",
1720
1771
  gap: "$xs",
1721
- p: "$md",
1772
+ p: "$sm",
1773
+ boxSizing: "border-box",
1774
+ width: "$full",
1722
1775
  });
1723
1776
  var NotificationCard = function (_a) {
1724
1777
  var heading = _a.heading, subHeading = _a.subHeading, link = _a.link, _b = _a.linkText, linkText = _b === void 0 ? "More on Charon" : _b;
1725
- return (jsxs(NotificationContainer, { children: [jsx(Box, { children: jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3" } }, { children: subHeading })))] })), link && (jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsx(ArrowForward, { size: "md" })] })))] }))] }));
1778
+ return (jsxs(NotificationContainer, { children: [jsx(Box, { children: jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3", lineHeight: "24px" } }, { children: subHeading })))] })), link && (jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsx(ArrowForward, { size: "md" })] })))] }))] }));
1726
1779
  };
1727
1780
 
1728
1781
  var ProgressTracker = function (_a) {
1729
- var items = _a.items;
1782
+ var items = _a.items, currentStep = _a.currentStep;
1730
1783
  var _b = useState(items), steps = _b[0], setSteps = _b[1];
1731
1784
  var _c = useState(0), width = _c[0], setWidth = _c[1];
1732
1785
  useEffect(function () {
1733
- var _count = items.filter(function (item) { return item.status === "complete"; }).length;
1786
+ var _count = 0;
1787
+ if (currentStep) {
1788
+ items.every(function (item) {
1789
+ if (item.href === currentStep.href)
1790
+ return false;
1791
+ _count++;
1792
+ return true;
1793
+ });
1794
+ }
1795
+ else {
1796
+ _count = items.filter(function (item) { return item.status === "complete"; }).length;
1797
+ }
1734
1798
  var offset = 100 / items.length / 2;
1735
1799
  var width = (100 / items.length) * _count + offset;
1736
1800
  setWidth(width);
1737
1801
  setSteps(items);
1738
- }, [items]);
1802
+ }, [items, currentStep]);
1739
1803
  return (jsx(Box, __assign({ css: { backgroundColor: "$bg02", py: "$3xl", px: "$6xl" } }, { children: jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$md" } }, { children: [jsx(Box, __assign({ className: "progress-bar-behind", css: {
1740
1804
  height: "$xxs",
1741
1805
  borderRadius: "$3",
@@ -1871,6 +1935,10 @@ var Td = styled("td", {
1871
1935
  borderRadius: 0,
1872
1936
  width: "100%",
1873
1937
  },
1938
+ textOverflow: 'ellipsis',
1939
+ maxWidth: 0,
1940
+ whiteSpace: 'nowrap',
1941
+ overflow: 'hidden',
1874
1942
  variants: {
1875
1943
  splitter: {
1876
1944
  true: {
@@ -1936,7 +2004,7 @@ var SplitterTable = function (_a) {
1936
2004
  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 (_a, rowIndex) {
1937
2005
  var _b = _a.isRemovable, isRemovable = _b === void 0 ? true : _b, _c = _a.isEditable, isEditable = _c === void 0 ? true : _c, row = __rest(_a, ["isRemovable", "isEditable"]);
1938
2006
  return (jsxs("tr", { children: [jsx(Td, __assign({ textCenter: true, size: "sm" }, { children: rowIndex + 1 })), columns.map(function (column, cellIndex) {
1939
- var _a, _b;
2007
+ var _a, _b, _c, _d, _e, _f, _g;
1940
2008
  var isTextField = ((_a = column.cell) === null || _a === void 0 ? void 0 : _a.component) === "TextField";
1941
2009
  return (jsx(Td, __assign({ splitter: true, css: {
1942
2010
  "input::-webkit-inner-spin-button": {
@@ -1947,7 +2015,7 @@ var SplitterTable = function (_a) {
1947
2015
  "input[type=number]": {
1948
2016
  "-moz-appearance": "textfield",
1949
2017
  },
1950
- } }, { children: isTextField && (jsx(TextField, __assign({ css: { color: "$body", fontWeight: "$bold" }, defaultValue: row[column.accessorKey], step: "any", onInput: function (e) {
2018
+ } }, { children: isTextField && (jsx(TextField, { css: { color: "$body", fontWeight: "$bold" }, defaultValue: row[column.accessorKey], step: "any", onInput: function (e) {
1951
2019
  var _a, _b, _c, _d;
1952
2020
  var inputValue = e.target.value === ""
1953
2021
  ? 0
@@ -1979,7 +2047,7 @@ var SplitterTable = function (_a) {
1979
2047
  : e.target.value;
1980
2048
  if (onUpdateRow)
1981
2049
  onUpdateRow(row.id, value, column.accessorKey);
1982
- } }, (_b = column.cell) === null || _b === void 0 ? void 0 : _b.config, { readOnly: !isEditable }))) }), "cell ".concat(cellIndex)));
2050
+ }, min: (_c = (_b = column.cell) === null || _b === void 0 ? void 0 : _b.config) === null || _c === void 0 ? void 0 : _c.min, max: (_e = (_d = column.cell) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e.max, type: (_g = (_f = column.cell) === null || _f === void 0 ? void 0 : _f.config) === null || _g === void 0 ? void 0 : _g.type, readOnly: !isEditable })) }), "cell ".concat(cellIndex)));
1983
2051
  }), onRemoveRow && isRemovable && (jsx(Td, __assign({ splitter: true, size: "sm", css: { p: "$2" } }, { children: jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsx(TrashIcon, {}) })) })))] }, row.id));
1984
2052
  }), jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
1985
2053
  };
@@ -2194,4 +2262,4 @@ var TwoColumnSection = function (_a) {
2194
2262
  } }, { 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" })) }))] })));
2195
2263
  };
2196
2264
 
2197
- 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, WaitingIcon, config, createTheme, css, getCssText, globalCss, keyframes, modifyVariantsForStory, reset, styled, theme, useMediaQuery };
2265
+ export { Accordion, Advisory, AdvisoryToggleBullet, AdvisoryToggleItem, AlertIcon, AloneIcon, ArrowForward, Box, BulletCheckIcon, Button, ButtonStory, Card, CheckIcon, Checkbox, CheckboxIcon, CheckboxIndicator, CheckboxRoot, ChevronDownIcon, ChevronUpIcon, CloseIcon, CodeIcon, Container, CopyIcon, CreateIcon, Download, ExistingGroupIcon, Flex, Footer, GithubIcon, GroupIcon, HelpIcon, HeroSection, Hexapod, HexapodMobile, IconButton, IconButtonStory, Image, Link, LinkStory, LoadingButton, LogoCard, MediaQueryKeys, MenuIcon, MigrateIcon, MinusIcon, Navbar, NotificationCard, NotificationContainer, NumberField, ObolDarkBgH, ObolDarkBgMark, ObolDarkBgV, ObolDarkCircle, ObolLightBgH, ObolLightBgMark, ObolLightBgV, ObolLightCircle, ObolSolidDarkBgH, ObolSolidDarkBgMark, ObolSolidDarkBgV, ObolSolidLightBgH, ObolSolidLightBgMark, ObolSolidLightBgV, OpenInNew, PlanetBlue, PlanetGreen, PlanetGrey, PlanetMagenta, PlanetOrange, PlusIcon, ProgressTracker, Provider, PublicGoodIcon, RadioGroup, RadioGroupComponent, RadioGroupIndicator, RadioGroupItem, RadioGroupItemLabel, RadioGroupRadio, RunIcon, Spin, SplitterTable, SvgIcon, Table, Tabs$1 as Tabs, TeamMemberCard, TestIcon, Text, TextField, TextFieldWithCopy, TextStory, ToggleCardItem, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipComponent, TooltipContent, TooltipTrigger, TrashIcon, TrustMinimisedIcon, TwitterIcon, TwoColumnSection, WaitingIcon, config, createTheme, css, getCssText, globalCss, keyframes, modifyVariantsForStory, reset, styled, theme, useMediaQuery };
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ var jsxRuntime = require('react/jsx-runtime');
8
8
  var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
9
9
  var React = require('react');
10
10
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
11
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
11
12
  var AccordionPrimitive = require('@radix-ui/react-accordion');
12
13
  var router = require('next/router');
13
14
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
@@ -36,6 +37,7 @@ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
36
37
  var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
37
38
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
39
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
40
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
39
41
  var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
40
42
  var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
41
43
 
@@ -432,6 +434,23 @@ var SvgIcon = styled("svg", {
432
434
  },
433
435
  },
434
436
  },
437
+ strokeColor: {
438
+ true: {
439
+ "& path": {
440
+ stroke: "$$color",
441
+ },
442
+ },
443
+ false: {
444
+ "& path": {
445
+ stroke: "none",
446
+ },
447
+ },
448
+ },
449
+ transform: {
450
+ xAxis: {
451
+ transform: "scale(-1)",
452
+ },
453
+ },
435
454
  },
436
455
  defaultVariants: {
437
456
  size: "sm",
@@ -1127,6 +1146,8 @@ var CopyIcon = function () { return (jsxRuntime.jsxs("svg", __assign({ width: "2
1127
1146
 
1128
1147
  var CheckIcon = function () { return (jsxRuntime.jsxs("svg", __assign({ width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("path", { d: "M0.5 12C0.5 5.37258 5.87258 0 12.5 0V0C19.1274 0 24.5 5.37258 24.5 12V12C24.5 18.6274 19.1274 24 12.5 24V24C5.87258 24 0.5 18.6274 0.5 12V12Z", fill: "#1D5249" }), jsxRuntime.jsx("path", { d: "M10.6818 14.3284L8.29545 11.8209L7.5 12.6567L10.6818 16L17.5 8.83582L16.7045 8L10.6818 14.3284Z", fill: "#2FE4AB", stroke: "#2FE4AB" })] }))); };
1129
1148
 
1149
+ var CheckboxIcon = function () { return (jsxRuntime.jsx("svg", __assign({ width: "12", height: "9", viewBox: "0 0 12 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsxRuntime.jsx("path", { d: "M4.33317 6.63449L2.14567 4.33598L1.4165 5.10215L4.33317 8.16683L10.5832 1.59967L9.854 0.833496L4.33317 6.63449Z", fill: "#9CC2C9", stroke: "#9CC2C9" }) }))); };
1150
+
1130
1151
  var TrashIcon = function () { return (jsxRuntime.jsx("svg", __assign({ width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsxRuntime.jsx("path", { d: "M16.5 9V19H8.5V9H16.5ZM15 3H10L9 4H5.5V6H19.5V4H16L15 3ZM18.5 7H6.5V19C6.5 20.1 7.4 21 8.5 21H16.5C17.6 21 18.5 20.1 18.5 19V7Z", fill: "#DAEEF3" }) }))); };
1131
1152
 
1132
1153
  var BulletCheckIcon = function () { return (jsxRuntime.jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("path", { id: "background", d: "M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z", fill: "#1D5249" }), jsxRuntime.jsx("path", { id: "check", d: "M10.1818 14.3284L7.79545 11.8209L7 12.6567L10.1818 16L17 8.83582L16.2045 8L10.1818 14.3284Z", fill: "#2FE4AB", stroke: "#2FE4AB" })] }))); };
@@ -1135,6 +1156,10 @@ var HelpIcon = function () { return (jsxRuntime.jsx("svg", __assign({ width: "25
1135
1156
 
1136
1157
  var WaitingIcon = function () { return (jsxRuntime.jsxs("svg", __assign({ width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("rect", { x: "0.5", width: "24", height: "24", rx: "12", fill: "#243D42" }), jsxRuntime.jsx("path", { d: "M12.5 0C5.9 0 0.5 5.4 0.5 12C0.5 18.6 5.9 24 12.5 24C19.1 24 24.5 18.6 24.5 12C24.5 5.4 19.1 0 12.5 0ZM12.5 21.6C7.208 21.6 2.9 17.292 2.9 12C2.9 6.708 7.208 2.4 12.5 2.4C17.792 2.4 22.1 6.708 22.1 12C22.1 17.292 17.792 21.6 12.5 21.6ZM13.1 6H11.3V13.2L17.54 17.04L18.5 15.48L13.1 12.24V6Z", fill: "#475E64" })] }))); };
1137
1158
 
1159
+ var MinusIcon = function () { return (jsxRuntime.jsx("svg", __assign({ width: "15", height: "2", viewBox: "0 0 15 2", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsxRuntime.jsx("path", { d: "M14.5 2H0.5V0H14.5V2Z", fill: "#DAEEF3" }) }))); };
1160
+
1161
+ var PlusIcon = function () { return (jsxRuntime.jsx("svg", __assign({ width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: jsxRuntime.jsx("path", { d: "M14 8H8V14H6V8H0V6H6V0H8V6H14V8Z", fill: "#DAEEF3" }) }))); };
1162
+
1138
1163
  var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({ css: {
1139
1164
  display: "grid",
1140
1165
  gridTemplateColumns: "1fr",
@@ -1240,6 +1265,10 @@ var IconButton = styled("button", {
1240
1265
  "&:disabled": {
1241
1266
  backgroundColor: "$bg02",
1242
1267
  color: "$muted",
1268
+ "& path": {
1269
+ stroke: "$muted",
1270
+ fill: "$muted",
1271
+ },
1243
1272
  },
1244
1273
  margin: 0,
1245
1274
  border: "2px solid transparent",
@@ -1389,9 +1418,10 @@ var Content$2 = styled(TooltipContent, {
1389
1418
  fill: "$bg05",
1390
1419
  },
1391
1420
  });
1392
- var TextFieldWithCopy = React.forwardRef(function (props, ref) {
1421
+ var TextFieldWithCopy = React.forwardRef(function (props) {
1393
1422
  var _a = React.useState(), inputValue = _a[0], setInputValue = _a[1];
1394
1423
  var _b = React.useState(false), isCopied = _b[0], setIsCopied = _b[1];
1424
+ var ref = React.useRef(null);
1395
1425
  var copyToClipBoard = function (content) {
1396
1426
  if (content) {
1397
1427
  navigator.clipboard.writeText(content);
@@ -1401,7 +1431,9 @@ var TextFieldWithCopy = React.forwardRef(function (props, ref) {
1401
1431
  useTimeout(function () {
1402
1432
  setIsCopied(false);
1403
1433
  }, isCopied ? 3000 : null);
1404
- return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex" } }, { children: [jsxRuntime.jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props)), jsxRuntime.jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsxRuntime.jsx(IconButton, __assign({ onClick: function () { return copyToClipBoard(inputValue); } }, { children: !isCopied ? jsxRuntime.jsx(CopyIcon, {}) : jsxRuntime.jsx(CheckIcon, {}) })) })), jsxRuntime.jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
1434
+ return (jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", width: "$full" } }, { children: [jsxRuntime.jsx(TextField, __assign({ withCopy: true, ref: ref, value: inputValue, onChange: function (e) { return setInputValue(e.target.value); } }, props, { css: { width: "$full" } })), jsxRuntime.jsxs(Tooltip, __assign({ open: isCopied }, { children: [jsxRuntime.jsx(TooltipTrigger, __assign({ asChild: true }, { children: jsxRuntime.jsx(IconButton, __assign({ onClick: function () {
1435
+ return copyToClipBoard(ref && ref.current && ref.current.value);
1436
+ } }, { children: !isCopied ? jsxRuntime.jsx(CopyIcon, {}) : jsxRuntime.jsx(CheckIcon, {}) })) })), jsxRuntime.jsxs(Content$2, __assign({ side: "bottom", sideOffset: 5 }, { children: ["Copied!", jsxRuntime.jsx(TooltipArrow, {})] }))] }))] })));
1405
1437
  });
1406
1438
  TextFieldWithCopy.displayName = "TextFieldWithCopy";
1407
1439
 
@@ -1477,10 +1509,30 @@ var NumberField = React.forwardRef(function (_a, ref) {
1477
1509
  borderRadius: 0,
1478
1510
  width: "95px",
1479
1511
  },
1480
- } }, { 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: "+" }))] })));
1512
+ } }, { children: [jsxRuntime.jsx(IconButton, __assign({ disabled: qty <= min, className: "dec-button", onClick: handleOnDec, borderDisabled: qty <= min }, { children: jsxRuntime.jsx(MinusIcon, {}) })), jsxRuntime.jsx(TextField, { css: { borderRightStyle: "none", borderLeftStyle: "none" }, type: "number", ref: ref, value: qty, onChange: handleOnChange, onBlur: onBlur, name: name }), jsxRuntime.jsx(IconButton, __assign({ disabled: qty >= max, className: "inc-button", onClick: handleOnInc, borderDisabled: qty >= max }, { children: jsxRuntime.jsx(PlusIcon, {}) }))] })));
1481
1513
  });
1482
1514
  NumberField.displayName = "NumberField";
1483
1515
 
1516
+ var LoadingButton = function (_a) {
1517
+ var loading = _a.loading, children = _a.children, props = __rest(_a, ["loading", "children"]);
1518
+ return (jsxRuntime.jsxs(Button, __assign({}, props, { children: [loading && jsxRuntime.jsx(Spin, {}), children] })));
1519
+ };
1520
+
1521
+ var CheckboxRoot = styled(CheckboxPrimitive__namespace.Root, {
1522
+ bc: "$bg03",
1523
+ size: "$lg",
1524
+ border: "2px solid $body",
1525
+ br: "$1",
1526
+ display: "flex",
1527
+ alignItems: "center",
1528
+ justifyContent: "center",
1529
+ });
1530
+ var CheckboxIndicator = CheckboxPrimitive__namespace.Indicator;
1531
+ var Checkbox = function (_a) {
1532
+ var props = __rest(_a, []);
1533
+ return (jsxRuntime.jsx(CheckboxRoot, __assign({}, props, { children: jsxRuntime.jsx(CheckboxIndicator, { children: jsxRuntime.jsx(CheckboxIcon, {}) }) })));
1534
+ };
1535
+
1484
1536
  var slideDown = keyframes({
1485
1537
  from: { height: 0 },
1486
1538
  to: { height: "var(--radix-accordion-content-height)" },
@@ -1749,24 +1801,37 @@ var NotificationContainer = styled(Box, {
1749
1801
  borderRadius: "$1",
1750
1802
  display: "flex",
1751
1803
  gap: "$xs",
1752
- p: "$md",
1804
+ p: "$sm",
1805
+ boxSizing: "border-box",
1806
+ width: "$full",
1753
1807
  });
1754
1808
  var NotificationCard = function (_a) {
1755
1809
  var heading = _a.heading, subHeading = _a.subHeading, link = _a.link, _b = _a.linkText, linkText = _b === void 0 ? "More on Charon" : _b;
1756
- return (jsxRuntime.jsxs(NotificationContainer, { children: [jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsxRuntime.jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsxRuntime.jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3" } }, { children: subHeading })))] })), link && (jsxRuntime.jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsxRuntime.jsx(ArrowForward, { size: "md" })] })))] }))] }));
1810
+ return (jsxRuntime.jsxs(NotificationContainer, { children: [jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(AlertIcon, { size: "lg", color: "body" }) }), jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$sm" } }, { children: [jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$xs" } }, { children: [jsxRuntime.jsx(Text, __assign({ variant: "body" }, { children: heading })), subHeading && (jsxRuntime.jsx(Text, __assign({ css: { color: "$textLight", fontSize: "$3", lineHeight: "24px" } }, { children: subHeading })))] })), link && (jsxRuntime.jsxs(Link, __assign({ target: "_blank", href: link }, { children: [linkText, jsxRuntime.jsx(ArrowForward, { size: "md" })] })))] }))] }));
1757
1811
  };
1758
1812
 
1759
1813
  var ProgressTracker = function (_a) {
1760
- var items = _a.items;
1814
+ var items = _a.items, currentStep = _a.currentStep;
1761
1815
  var _b = React.useState(items), steps = _b[0], setSteps = _b[1];
1762
1816
  var _c = React.useState(0), width = _c[0], setWidth = _c[1];
1763
1817
  React.useEffect(function () {
1764
- var _count = items.filter(function (item) { return item.status === "complete"; }).length;
1818
+ var _count = 0;
1819
+ if (currentStep) {
1820
+ items.every(function (item) {
1821
+ if (item.href === currentStep.href)
1822
+ return false;
1823
+ _count++;
1824
+ return true;
1825
+ });
1826
+ }
1827
+ else {
1828
+ _count = items.filter(function (item) { return item.status === "complete"; }).length;
1829
+ }
1765
1830
  var offset = 100 / items.length / 2;
1766
1831
  var width = (100 / items.length) * _count + offset;
1767
1832
  setWidth(width);
1768
1833
  setSteps(items);
1769
- }, [items]);
1834
+ }, [items, currentStep]);
1770
1835
  return (jsxRuntime.jsx(Box, __assign({ css: { backgroundColor: "$bg02", py: "$3xl", px: "$6xl" } }, { children: jsxRuntime.jsxs(Box, __assign({ css: { display: "flex", fd: "column", gap: "$md" } }, { children: [jsxRuntime.jsx(Box, __assign({ className: "progress-bar-behind", css: {
1771
1836
  height: "$xxs",
1772
1837
  borderRadius: "$3",
@@ -1902,6 +1967,10 @@ var Td = styled("td", {
1902
1967
  borderRadius: 0,
1903
1968
  width: "100%",
1904
1969
  },
1970
+ textOverflow: 'ellipsis',
1971
+ maxWidth: 0,
1972
+ whiteSpace: 'nowrap',
1973
+ overflow: 'hidden',
1905
1974
  variants: {
1906
1975
  splitter: {
1907
1976
  true: {
@@ -1967,7 +2036,7 @@ var SplitterTable = function (_a) {
1967
2036
  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 (_a, rowIndex) {
1968
2037
  var _b = _a.isRemovable, isRemovable = _b === void 0 ? true : _b, _c = _a.isEditable, isEditable = _c === void 0 ? true : _c, row = __rest(_a, ["isRemovable", "isEditable"]);
1969
2038
  return (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx(Td, __assign({ textCenter: true, size: "sm" }, { children: rowIndex + 1 })), columns.map(function (column, cellIndex) {
1970
- var _a, _b;
2039
+ var _a, _b, _c, _d, _e, _f, _g;
1971
2040
  var isTextField = ((_a = column.cell) === null || _a === void 0 ? void 0 : _a.component) === "TextField";
1972
2041
  return (jsxRuntime.jsx(Td, __assign({ splitter: true, css: {
1973
2042
  "input::-webkit-inner-spin-button": {
@@ -1978,7 +2047,7 @@ var SplitterTable = function (_a) {
1978
2047
  "input[type=number]": {
1979
2048
  "-moz-appearance": "textfield",
1980
2049
  },
1981
- } }, { children: isTextField && (jsxRuntime.jsx(TextField, __assign({ css: { color: "$body", fontWeight: "$bold" }, defaultValue: row[column.accessorKey], step: "any", onInput: function (e) {
2050
+ } }, { children: isTextField && (jsxRuntime.jsx(TextField, { css: { color: "$body", fontWeight: "$bold" }, defaultValue: row[column.accessorKey], step: "any", onInput: function (e) {
1982
2051
  var _a, _b, _c, _d;
1983
2052
  var inputValue = e.target.value === ""
1984
2053
  ? 0
@@ -2010,7 +2079,7 @@ var SplitterTable = function (_a) {
2010
2079
  : e.target.value;
2011
2080
  if (onUpdateRow)
2012
2081
  onUpdateRow(row.id, value, column.accessorKey);
2013
- } }, (_b = column.cell) === null || _b === void 0 ? void 0 : _b.config, { readOnly: !isEditable }))) }), "cell ".concat(cellIndex)));
2082
+ }, min: (_c = (_b = column.cell) === null || _b === void 0 ? void 0 : _b.config) === null || _c === void 0 ? void 0 : _c.min, max: (_e = (_d = column.cell) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e.max, type: (_g = (_f = column.cell) === null || _f === void 0 ? void 0 : _f.config) === null || _g === void 0 ? void 0 : _g.type, readOnly: !isEditable })) }), "cell ".concat(cellIndex)));
2014
2083
  }), onRemoveRow && isRemovable && (jsxRuntime.jsx(Td, __assign({ splitter: true, size: "sm", css: { p: "$2" } }, { children: jsxRuntime.jsx(IconButton, __assign({ ghost: true, onClick: function () { return onRemoveRow(row.id); } }, { children: jsxRuntime.jsx(TrashIcon, {}) })) })))] }, row.id));
2015
2084
  }), jsxRuntime.jsx(AddNewRow, { onAddRow: onAddRow, totalSplitFooter: totalSplitFooter })] })] }));
2016
2085
  };
@@ -2238,6 +2307,10 @@ exports.Button = Button;
2238
2307
  exports.ButtonStory = ButtonStory;
2239
2308
  exports.Card = Card;
2240
2309
  exports.CheckIcon = CheckIcon;
2310
+ exports.Checkbox = Checkbox;
2311
+ exports.CheckboxIcon = CheckboxIcon;
2312
+ exports.CheckboxIndicator = CheckboxIndicator;
2313
+ exports.CheckboxRoot = CheckboxRoot;
2241
2314
  exports.ChevronDownIcon = ChevronDownIcon;
2242
2315
  exports.ChevronUpIcon = ChevronUpIcon;
2243
2316
  exports.CloseIcon = CloseIcon;
@@ -2260,10 +2333,12 @@ exports.IconButtonStory = IconButtonStory;
2260
2333
  exports.Image = Image;
2261
2334
  exports.Link = Link;
2262
2335
  exports.LinkStory = LinkStory;
2336
+ exports.LoadingButton = LoadingButton;
2263
2337
  exports.LogoCard = LogoCard;
2264
2338
  exports.MediaQueryKeys = MediaQueryKeys;
2265
2339
  exports.MenuIcon = MenuIcon;
2266
2340
  exports.MigrateIcon = MigrateIcon;
2341
+ exports.MinusIcon = MinusIcon;
2267
2342
  exports.Navbar = Navbar;
2268
2343
  exports.NotificationCard = NotificationCard;
2269
2344
  exports.NotificationContainer = NotificationContainer;
@@ -2288,6 +2363,7 @@ exports.PlanetGreen = PlanetGreen;
2288
2363
  exports.PlanetGrey = PlanetGrey;
2289
2364
  exports.PlanetMagenta = PlanetMagenta;
2290
2365
  exports.PlanetOrange = PlanetOrange;
2366
+ exports.PlusIcon = PlusIcon;
2291
2367
  exports.ProgressTracker = ProgressTracker;
2292
2368
  exports.Provider = Provider;
2293
2369
  exports.PublicGoodIcon = PublicGoodIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-ui",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "license": "MIT",
@@ -20,6 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@radix-ui/react-accordion": "^0.1.6",
23
+ "@radix-ui/react-checkbox": "^1.0.0",
23
24
  "@radix-ui/react-dialog": "^0.1.7",
24
25
  "@radix-ui/react-icons": "^1.1.1",
25
26
  "@radix-ui/react-radio-group": "^0.1.5",