@obolnetwork/obol-ui 1.0.38 → 1.0.39
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/README.md +54 -0
- package/dist/__test__/components/atoms/Button.test.d.ts +1 -0
- package/dist/components/atoms/LogoCard/LogoCard.d.ts +0 -1
- package/dist/components/atoms/index.d.ts +5 -5
- package/dist/components/icons/AlertIcon.d.ts +0 -1
- package/dist/components/icons/ArrowForward.d.ts +0 -1
- package/dist/components/icons/ChevronDownIcon.d.ts +0 -1
- package/dist/components/icons/ChevronUpIcon.d.ts +0 -1
- package/dist/components/icons/CloseIcon.d.ts +0 -1
- package/dist/components/icons/Download.d.ts +0 -1
- package/dist/components/icons/Hexapod.d.ts +0 -1
- package/dist/components/icons/OpenInNew.d.ts +0 -1
- package/dist/components/icons/static-icons/BulletCheckIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/CheckIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/CheckboxIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/Coinbase.d.ts +0 -1
- package/dist/components/icons/static-icons/CopyIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/GithubIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/HelpIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/MenuIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/Metamask.d.ts +0 -1
- package/dist/components/icons/static-icons/MinusIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/PlusIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/TrashIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/TwitterIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/WaitingIcon.d.ts +0 -1
- package/dist/components/icons/static-icons/WalletConnect.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/circle/ObolDarkCircle.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/circle/ObolLightCircle.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/circle/index.d.ts +2 -2
- package/dist/components/icons/static-icons/obol/horizontal/ObolDarkBgH.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/horizontal/ObolLightBgH.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/horizontal/ObolSolidDarkBgH.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/horizontal/ObolSolidLightBgH.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/horizontal/index.d.ts +4 -4
- package/dist/components/icons/static-icons/obol/mark/ObolDarkBgMark.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/mark/ObolLightBgMark.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/mark/ObolSolidDarkBgMark.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/mark/ObolSolidLightBgMark.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/mark/index.d.ts +4 -4
- package/dist/components/icons/static-icons/obol/vertical/ObolDarkBgV.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/vertical/ObolLightBgV.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/vertical/ObolSolidDarkBgV.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/vertical/ObolSolidLightBgV.d.ts +0 -1
- package/dist/components/icons/static-icons/obol/vertical/index.d.ts +4 -4
- package/dist/components/icons/static-icons/planets/PlanetBlue.d.ts +0 -1
- package/dist/components/icons/static-icons/planets/PlanetGreen.d.ts +0 -1
- package/dist/components/icons/static-icons/planets/PlanetGrey.d.ts +0 -1
- package/dist/components/icons/static-icons/planets/PlanetMagenta.d.ts +0 -1
- package/dist/components/icons/static-icons/planets/PlanetOrange.d.ts +0 -1
- package/dist/components/icons/static-icons/planets/index.d.ts +5 -5
- package/dist/components/molecules/index.d.ts +8 -8
- package/dist/components/organisms/index.d.ts +4 -4
- package/dist/components/utils/hooks/index.d.ts +1 -1
- package/dist/components/utils/hooks/use-media-query.d.ts +1 -1
- package/dist/components/utils/index.d.ts +2 -2
- package/dist/components/utils/types.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +14 -13
- package/dist/index.js +14 -13
- package/dist/jest.config.d.ts +1 -0
- package/package.json +21 -2
- package/dist/components/organisms/ObolEcosystem/ObolEcosystem.d.ts +0 -1
package/README.md
CHANGED
|
@@ -18,6 +18,60 @@ You can start editing the page by modifying `pages/index.tsx`. The page auto-upd
|
|
|
18
18
|
|
|
19
19
|
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
|
20
20
|
|
|
21
|
+
## Testing
|
|
22
|
+
We use Jest and React Testing Library for testing our React components and functions. Jest is a testing framework that provides us with test runners, assertions, and mocks, while React Testing Library is a set of utilities that helps us write tests that are closer to how our end-users will interact with our application.
|
|
23
|
+
|
|
24
|
+
### Running tests
|
|
25
|
+
To run the tests, simply run the following command in your terminal:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
yarn run test
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This will start the Jest test runner, which will automatically find and run all the tests in our project that match the naming pattern *.test.js or *.spec.js. located at __tests__ You can also run a specific test file by running the following command:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn run test <path-to-file>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This will run only the tests in the Button.test.js file.
|
|
38
|
+
|
|
39
|
+
### Writing tests
|
|
40
|
+
We write tests using Jest and React Testing Library in the same file as the component or function we are testing. For example, if we are testing a component called Button, we would create a file called Button.test.js in the same directory as the Button.js file.
|
|
41
|
+
|
|
42
|
+
Here's an example test file:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { Button } from "../../../components/atoms/Button/Button";
|
|
46
|
+
import { render, screen } from "@testing-library/react";
|
|
47
|
+
import userEvent from "@testing-library/user-event";
|
|
48
|
+
|
|
49
|
+
describe("Button Component", () => {
|
|
50
|
+
describe("On Click Listener", () => {
|
|
51
|
+
const user = userEvent.setup();
|
|
52
|
+
const mockProps = {
|
|
53
|
+
onClick: jest.fn(),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
test("Calls onClick function passed in", async () => {
|
|
57
|
+
render(<Button {...mockProps}>test</Button>);
|
|
58
|
+
|
|
59
|
+
const testButton = screen.getByText("test");
|
|
60
|
+
await user.click(testButton);
|
|
61
|
+
|
|
62
|
+
expect(mockProps.onClick).toHaveBeenCalledTimes(1);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
In this example, we're testing the Button component by rendering it with different props and checking that the correct elements are present and that the onClick function is called when the button is clicked.
|
|
69
|
+
|
|
70
|
+
Husky and pre-commit hooks
|
|
71
|
+
We use Husky to manage Git hooks, such as pre-commit hooks. Our pre-commit hook runs the tests before committing any code changes, ensuring that we only commit code that passes all the tests.
|
|
72
|
+
|
|
73
|
+
If you try to commit changes that break the tests, Husky will prevent the commit from going through and display an error message in your terminal.
|
|
74
|
+
|
|
21
75
|
## Learn More
|
|
22
76
|
|
|
23
77
|
To learn more about Next.js, take a look at the following resources:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,8 +13,8 @@ export * from "./Toggle/Toggle";
|
|
|
13
13
|
export * from "./IconButton/IconButton";
|
|
14
14
|
export * from "./TextField/TextField";
|
|
15
15
|
export * from "./NumberField/NumberField";
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
16
|
+
export * from "./Tooltip/Tooltip";
|
|
17
|
+
export * from "./LoadingButton/LoadingButton";
|
|
18
|
+
export * from "./Checkbox/Checkbox";
|
|
19
|
+
export * from "./Switch/Switch";
|
|
20
|
+
export * from "./Dialog/Dialog";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./ObolDarkCircle";
|
|
2
|
+
export * from "./ObolLightCircle";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./ObolDarkBgH";
|
|
2
|
+
export * from "./ObolLightBgH";
|
|
3
|
+
export * from "./ObolSolidDarkBgH";
|
|
4
|
+
export * from "./ObolSolidLightBgH";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./ObolDarkBgMark";
|
|
2
|
+
export * from "./ObolLightBgMark";
|
|
3
|
+
export * from "./ObolSolidDarkBgMark";
|
|
4
|
+
export * from "./ObolSolidLightBgMark";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./ObolDarkBgV";
|
|
2
|
+
export * from "./ObolLightBgV";
|
|
3
|
+
export * from "./ObolSolidDarkBgV";
|
|
4
|
+
export * from "./ObolSolidLightBgV";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./PlanetGrey";
|
|
2
|
+
export * from "./PlanetBlue";
|
|
3
|
+
export * from "./PlanetOrange";
|
|
4
|
+
export * from "./PlanetGreen";
|
|
5
|
+
export * from "./PlanetMagenta";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * as Accordion from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
1
|
+
export * as Accordion from "./Accordion/Accordion";
|
|
2
|
+
export * from "./AdvisoryToggle/AdvisoryToggle";
|
|
3
|
+
export * from "./Card/Card";
|
|
4
|
+
export * from "./Navbar/Navbar";
|
|
5
|
+
export * from "./NotificationCard/NotificationCard";
|
|
6
|
+
export * from "./ProgressTracker/ProgressTracker";
|
|
7
|
+
export * from "./RadioGroup/RadioGroup";
|
|
8
|
+
export * from "./Table/Table";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./Advisory/Advisory";
|
|
2
|
+
export * from "./Footer/Footer";
|
|
3
|
+
export * from "./HeroSection/HeroSection";
|
|
4
|
+
export * from "./TwoColumnSection/TwoColumnSection";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./use-media-query";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mediaQueryKeys } from "../../../stitches.config";
|
|
2
|
-
declare type MediaQueryKeysType = typeof mediaQueryKeys[keyof typeof mediaQueryKeys];
|
|
2
|
+
declare type MediaQueryKeysType = (typeof mediaQueryKeys)[keyof typeof mediaQueryKeys];
|
|
3
3
|
export declare function useMediaQuery(query: MediaQueryKeysType): boolean;
|
|
4
4
|
export declare const MediaQueryKeys: {
|
|
5
5
|
readonly xs: "(max-width: 520px)";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./hooks";
|
|
2
|
+
export * from "./types";
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export * from "./components/icons";
|
|
|
3
3
|
export * from "./components/molecules";
|
|
4
4
|
export * from "./components/organisms";
|
|
5
5
|
export * from "./components/utils";
|
|
6
|
-
export { styled, css, theme, createTheme, getCssText, globalCss, keyframes, config, reset } from "./stitches.config";
|
|
6
|
+
export { styled, css, theme, createTheme, getCssText, globalCss, keyframes, config, reset, } from "./stitches.config";
|
package/dist/index.es.js
CHANGED
|
@@ -437,7 +437,7 @@ SvgIcon.defaultProps = {
|
|
|
437
437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
438
438
|
};
|
|
439
439
|
|
|
440
|
-
var Box = styled(
|
|
440
|
+
var Box = styled("div", {});
|
|
441
441
|
|
|
442
442
|
function modifyVariantsForStory(component) {
|
|
443
443
|
return component;
|
|
@@ -746,7 +746,7 @@ var Text = styled("span", {
|
|
|
746
746
|
display: "inline-block",
|
|
747
747
|
borderRadius: "$1",
|
|
748
748
|
padding: "0 $xxxs",
|
|
749
|
-
}
|
|
749
|
+
},
|
|
750
750
|
},
|
|
751
751
|
size: {
|
|
752
752
|
1: { fontSize: "$1" },
|
|
@@ -958,7 +958,7 @@ var Container = styled(Box, {
|
|
|
958
958
|
},
|
|
959
959
|
});
|
|
960
960
|
|
|
961
|
-
var Image = styled(
|
|
961
|
+
var Image = styled("img", {
|
|
962
962
|
// reset
|
|
963
963
|
verticalAlign: "middle",
|
|
964
964
|
maxWidth: "100%",
|
|
@@ -1147,7 +1147,6 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ className:
|
|
|
1147
1147
|
gridTemplateColumns: "1fr",
|
|
1148
1148
|
borderRadius: "$3",
|
|
1149
1149
|
backgroundColor: "$bg04",
|
|
1150
|
-
alignItems: "center",
|
|
1151
1150
|
width: "288px",
|
|
1152
1151
|
gap: "$lg",
|
|
1153
1152
|
py: "$xl",
|
|
@@ -1156,6 +1155,7 @@ var TeamMemberCard = function (props) { return (jsxs(Box, __assign({ className:
|
|
|
1156
1155
|
$$size: "160px",
|
|
1157
1156
|
width: "$$size",
|
|
1158
1157
|
height: "$$size",
|
|
1158
|
+
placeSelf: "center",
|
|
1159
1159
|
"@sm": { $$size: "100px" },
|
|
1160
1160
|
"&::after": {
|
|
1161
1161
|
position: "absolute",
|
|
@@ -1536,7 +1536,7 @@ var SwitchRoot = styled(ReactSwitch.Root, {
|
|
|
1536
1536
|
padding: "0",
|
|
1537
1537
|
"&[data-state='checked']": {
|
|
1538
1538
|
backgroundColor: "$obolGreen",
|
|
1539
|
-
}
|
|
1539
|
+
},
|
|
1540
1540
|
});
|
|
1541
1541
|
var SwitchThumb = styled(ReactSwitch.Thumb, {
|
|
1542
1542
|
display: "block",
|
|
@@ -1548,7 +1548,7 @@ var SwitchThumb = styled(ReactSwitch.Thumb, {
|
|
|
1548
1548
|
transform: "translateX(4px)",
|
|
1549
1549
|
"&[data-state='checked']": {
|
|
1550
1550
|
transform: "translateX(40px)",
|
|
1551
|
-
}
|
|
1551
|
+
},
|
|
1552
1552
|
});
|
|
1553
1553
|
var Switch = function (_a) {
|
|
1554
1554
|
var props = __rest(_a, []);
|
|
@@ -1741,7 +1741,7 @@ var AdvisoryToggleBullet = function (props) {
|
|
|
1741
1741
|
minHeight: "$2xl",
|
|
1742
1742
|
pl: "calc($2xl - 2px)",
|
|
1743
1743
|
ml: "-2px",
|
|
1744
|
-
borderLeft: "2px solid transparent"
|
|
1744
|
+
borderLeft: "2px solid transparent",
|
|
1745
1745
|
} }, { children: [props.state === "completed" ? (jsx(Box, { children: jsx(BulletCheckIcon, {}) })) : (jsx(Box, { children: jsx(Box, __assign({ css: {
|
|
1746
1746
|
display: "grid",
|
|
1747
1747
|
placeItems: "center",
|
|
@@ -2216,7 +2216,7 @@ var Advisory = function (_a) {
|
|
|
2216
2216
|
border: "2px solid $bg04",
|
|
2217
2217
|
borderRadius: "$3",
|
|
2218
2218
|
minHeight: "752px",
|
|
2219
|
-
} }, { children: [jsx(Box, __assign({ css: {
|
|
2219
|
+
} }, { children: [jsx(Box, __assign({ className: "advisory-toggles", css: {
|
|
2220
2220
|
display: "flex",
|
|
2221
2221
|
fd: "column",
|
|
2222
2222
|
flex: 1,
|
|
@@ -2225,6 +2225,7 @@ var Advisory = function (_a) {
|
|
|
2225
2225
|
borderRight: "2px solid $bg04",
|
|
2226
2226
|
btlr: "$2",
|
|
2227
2227
|
bblr: "$2",
|
|
2228
|
+
width: "330px",
|
|
2228
2229
|
} }, { children: jsx(ToggleGroup, __assign({ css: {
|
|
2229
2230
|
display: "flex",
|
|
2230
2231
|
fd: "column",
|
|
@@ -2236,7 +2237,7 @@ var Advisory = function (_a) {
|
|
|
2236
2237
|
onItemChange(content);
|
|
2237
2238
|
}
|
|
2238
2239
|
}
|
|
2239
|
-
} }, { children: props.items.map(function (item, index) { return (jsx(AdvisoryToggleItem, __assign({ disabled: item.state === "upcoming", value: item.value, "aria-label": item.title, css: { borderLeftWidth: "0px" }, "data-state-item": item.value === itemSelected.value ? "selected" : "" }, { children: jsx(AdvisoryToggleBullet, __assign({ state: item.state, rank: item.rank, onClick: function () { return console.log("enable next, complete this"); } }, { children: item.title }), ":ab".concat(index, ":")) }), ":at".concat(index, ":"))); }) })) })), jsx(Box, __assign({ css: {
|
|
2240
|
+
} }, { children: props.items.map(function (item, index) { return (jsx(AdvisoryToggleItem, __assign({ disabled: item.state === "upcoming", value: item.value, "aria-label": item.title, css: { borderLeftWidth: "0px" }, "data-state-item": item.value === itemSelected.value ? "selected" : "" }, { children: jsx(AdvisoryToggleBullet, __assign({ state: item.state, rank: item.rank, onClick: function () { return console.log("enable next, complete this"); } }, { children: item.title }), ":ab".concat(index, ":")) }), ":at".concat(index, ":"))); }) })) })), jsx(Box, __assign({ className: "advisory-content", css: {
|
|
2240
2241
|
display: "flex",
|
|
2241
2242
|
flex: 2,
|
|
2242
2243
|
fd: "column",
|
|
@@ -2321,10 +2322,10 @@ function useMediaQuery(query) {
|
|
|
2321
2322
|
return matches;
|
|
2322
2323
|
}
|
|
2323
2324
|
var MediaQueryKeys = {
|
|
2324
|
-
xs:
|
|
2325
|
-
sm:
|
|
2326
|
-
md:
|
|
2327
|
-
lg:
|
|
2325
|
+
xs: "(max-width: 520px)",
|
|
2326
|
+
sm: "(max-width: 900px)",
|
|
2327
|
+
md: "(max-width: 1200px)",
|
|
2328
|
+
lg: "(max-width: 1800px)",
|
|
2328
2329
|
};
|
|
2329
2330
|
|
|
2330
2331
|
var BASE_PATH = "/assets/hexapod.svg";
|
package/dist/index.js
CHANGED
|
@@ -471,7 +471,7 @@ SvgIcon.defaultProps = {
|
|
|
471
471
|
xmlns: "http://www.w3.org/2000/svg",
|
|
472
472
|
};
|
|
473
473
|
|
|
474
|
-
var Box = styled(
|
|
474
|
+
var Box = styled("div", {});
|
|
475
475
|
|
|
476
476
|
function modifyVariantsForStory(component) {
|
|
477
477
|
return component;
|
|
@@ -780,7 +780,7 @@ var Text = styled("span", {
|
|
|
780
780
|
display: "inline-block",
|
|
781
781
|
borderRadius: "$1",
|
|
782
782
|
padding: "0 $xxxs",
|
|
783
|
-
}
|
|
783
|
+
},
|
|
784
784
|
},
|
|
785
785
|
size: {
|
|
786
786
|
1: { fontSize: "$1" },
|
|
@@ -992,7 +992,7 @@ var Container = styled(Box, {
|
|
|
992
992
|
},
|
|
993
993
|
});
|
|
994
994
|
|
|
995
|
-
var Image = styled(
|
|
995
|
+
var Image = styled("img", {
|
|
996
996
|
// reset
|
|
997
997
|
verticalAlign: "middle",
|
|
998
998
|
maxWidth: "100%",
|
|
@@ -1181,7 +1181,6 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
|
|
|
1181
1181
|
gridTemplateColumns: "1fr",
|
|
1182
1182
|
borderRadius: "$3",
|
|
1183
1183
|
backgroundColor: "$bg04",
|
|
1184
|
-
alignItems: "center",
|
|
1185
1184
|
width: "288px",
|
|
1186
1185
|
gap: "$lg",
|
|
1187
1186
|
py: "$xl",
|
|
@@ -1190,6 +1189,7 @@ var TeamMemberCard = function (props) { return (jsxRuntime.jsxs(Box, __assign({
|
|
|
1190
1189
|
$$size: "160px",
|
|
1191
1190
|
width: "$$size",
|
|
1192
1191
|
height: "$$size",
|
|
1192
|
+
placeSelf: "center",
|
|
1193
1193
|
"@sm": { $$size: "100px" },
|
|
1194
1194
|
"&::after": {
|
|
1195
1195
|
position: "absolute",
|
|
@@ -1570,7 +1570,7 @@ var SwitchRoot = styled(ReactSwitch__namespace.Root, {
|
|
|
1570
1570
|
padding: "0",
|
|
1571
1571
|
"&[data-state='checked']": {
|
|
1572
1572
|
backgroundColor: "$obolGreen",
|
|
1573
|
-
}
|
|
1573
|
+
},
|
|
1574
1574
|
});
|
|
1575
1575
|
var SwitchThumb = styled(ReactSwitch__namespace.Thumb, {
|
|
1576
1576
|
display: "block",
|
|
@@ -1582,7 +1582,7 @@ var SwitchThumb = styled(ReactSwitch__namespace.Thumb, {
|
|
|
1582
1582
|
transform: "translateX(4px)",
|
|
1583
1583
|
"&[data-state='checked']": {
|
|
1584
1584
|
transform: "translateX(40px)",
|
|
1585
|
-
}
|
|
1585
|
+
},
|
|
1586
1586
|
});
|
|
1587
1587
|
var Switch = function (_a) {
|
|
1588
1588
|
var props = __rest(_a, []);
|
|
@@ -1775,7 +1775,7 @@ var AdvisoryToggleBullet = function (props) {
|
|
|
1775
1775
|
minHeight: "$2xl",
|
|
1776
1776
|
pl: "calc($2xl - 2px)",
|
|
1777
1777
|
ml: "-2px",
|
|
1778
|
-
borderLeft: "2px solid transparent"
|
|
1778
|
+
borderLeft: "2px solid transparent",
|
|
1779
1779
|
} }, { children: [props.state === "completed" ? (jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(BulletCheckIcon, {}) })) : (jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(Box, __assign({ css: {
|
|
1780
1780
|
display: "grid",
|
|
1781
1781
|
placeItems: "center",
|
|
@@ -2250,7 +2250,7 @@ var Advisory = function (_a) {
|
|
|
2250
2250
|
border: "2px solid $bg04",
|
|
2251
2251
|
borderRadius: "$3",
|
|
2252
2252
|
minHeight: "752px",
|
|
2253
|
-
} }, { children: [jsxRuntime.jsx(Box, __assign({ css: {
|
|
2253
|
+
} }, { children: [jsxRuntime.jsx(Box, __assign({ className: "advisory-toggles", css: {
|
|
2254
2254
|
display: "flex",
|
|
2255
2255
|
fd: "column",
|
|
2256
2256
|
flex: 1,
|
|
@@ -2259,6 +2259,7 @@ var Advisory = function (_a) {
|
|
|
2259
2259
|
borderRight: "2px solid $bg04",
|
|
2260
2260
|
btlr: "$2",
|
|
2261
2261
|
bblr: "$2",
|
|
2262
|
+
width: "330px",
|
|
2262
2263
|
} }, { children: jsxRuntime.jsx(ToggleGroup, __assign({ css: {
|
|
2263
2264
|
display: "flex",
|
|
2264
2265
|
fd: "column",
|
|
@@ -2270,7 +2271,7 @@ var Advisory = function (_a) {
|
|
|
2270
2271
|
onItemChange(content);
|
|
2271
2272
|
}
|
|
2272
2273
|
}
|
|
2273
|
-
} }, { children: props.items.map(function (item, index) { return (jsxRuntime.jsx(AdvisoryToggleItem, __assign({ disabled: item.state === "upcoming", value: item.value, "aria-label": item.title, css: { borderLeftWidth: "0px" }, "data-state-item": item.value === itemSelected.value ? "selected" : "" }, { children: jsxRuntime.jsx(AdvisoryToggleBullet, __assign({ state: item.state, rank: item.rank, onClick: function () { return console.log("enable next, complete this"); } }, { children: item.title }), ":ab".concat(index, ":")) }), ":at".concat(index, ":"))); }) })) })), jsxRuntime.jsx(Box, __assign({ css: {
|
|
2274
|
+
} }, { children: props.items.map(function (item, index) { return (jsxRuntime.jsx(AdvisoryToggleItem, __assign({ disabled: item.state === "upcoming", value: item.value, "aria-label": item.title, css: { borderLeftWidth: "0px" }, "data-state-item": item.value === itemSelected.value ? "selected" : "" }, { children: jsxRuntime.jsx(AdvisoryToggleBullet, __assign({ state: item.state, rank: item.rank, onClick: function () { return console.log("enable next, complete this"); } }, { children: item.title }), ":ab".concat(index, ":")) }), ":at".concat(index, ":"))); }) })) })), jsxRuntime.jsx(Box, __assign({ className: "advisory-content", css: {
|
|
2274
2275
|
display: "flex",
|
|
2275
2276
|
flex: 2,
|
|
2276
2277
|
fd: "column",
|
|
@@ -2355,10 +2356,10 @@ function useMediaQuery(query) {
|
|
|
2355
2356
|
return matches;
|
|
2356
2357
|
}
|
|
2357
2358
|
var MediaQueryKeys = {
|
|
2358
|
-
xs:
|
|
2359
|
-
sm:
|
|
2360
|
-
md:
|
|
2361
|
-
lg:
|
|
2359
|
+
xs: "(max-width: 520px)",
|
|
2360
|
+
sm: "(max-width: 900px)",
|
|
2361
|
+
md: "(max-width: 1200px)",
|
|
2362
|
+
lg: "(max-width: 1800px)",
|
|
2362
2363
|
};
|
|
2363
2364
|
|
|
2364
2365
|
var BASE_PATH = "/assets/hexapod.svg";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obolnetwork/obol-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
"storybook": "start-storybook -p 6006",
|
|
17
17
|
"build-storybook": "build-storybook",
|
|
18
18
|
"ds:build": "rollup -c",
|
|
19
|
-
"ds:release": "yarn ds:build && np"
|
|
19
|
+
"ds:release": "yarn ds:build && np",
|
|
20
|
+
"test": "jest",
|
|
21
|
+
"prepare": "husky install",
|
|
22
|
+
"format:write": "prettier --write \"**/*.{css,js,json,jsx,ts,tsx}\"",
|
|
23
|
+
"format": "prettier \"**/*.{css,js,json,jsx,ts,tsx}\""
|
|
20
24
|
},
|
|
21
25
|
"dependencies": {
|
|
22
26
|
"@radix-ui/react-accordion": "^0.1.6",
|
|
@@ -42,14 +46,25 @@
|
|
|
42
46
|
"@storybook/addon-links": "^6.5.12",
|
|
43
47
|
"@storybook/react": "^6.5.12",
|
|
44
48
|
"@storybook/testing-library": "^0.0.13",
|
|
49
|
+
"@testing-library/dom": "^9.0.0",
|
|
50
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
51
|
+
"@testing-library/react": "12.1.5",
|
|
52
|
+
"@testing-library/user-event": "^14.4.3",
|
|
45
53
|
"@types/node": "17.0.21",
|
|
46
54
|
"@types/react": "17.0.40",
|
|
47
55
|
"babel-loader": "^8.2.4",
|
|
56
|
+
"cross-env": "^7.0.3",
|
|
48
57
|
"eslint": "8.11.0",
|
|
49
58
|
"eslint-config-next": "12.1.0",
|
|
59
|
+
"eslint-config-prettier": "^8.6.0",
|
|
50
60
|
"eslint-plugin-storybook": "^0.6.4",
|
|
51
61
|
"figma-api": "^1.10.1",
|
|
62
|
+
"husky": ">=7",
|
|
63
|
+
"jest": "^29.4.3",
|
|
64
|
+
"jest-environment-jsdom": "^29.4.3",
|
|
65
|
+
"lint-staged": ">=10",
|
|
52
66
|
"np": "^7.6.1",
|
|
67
|
+
"prettier": "^2.8.4",
|
|
53
68
|
"rollup": "^2.70.1",
|
|
54
69
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
55
70
|
"storybook-addon-designs": "^6.3.1",
|
|
@@ -59,5 +74,9 @@
|
|
|
59
74
|
"publishConfig": {
|
|
60
75
|
"registry": "https://registry.npmjs.org/",
|
|
61
76
|
"access": "public"
|
|
77
|
+
},
|
|
78
|
+
"lint-staged": {
|
|
79
|
+
"*.js": "eslint --cache --fix",
|
|
80
|
+
"*.{js,css,md}": "prettier --write"
|
|
62
81
|
}
|
|
63
82
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ObolEcosystem: () => JSX.Element;
|