@grantbii/design-system 1.0.66 → 1.0.67
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 +3 -0
- package/core/foundations/icons.d.ts +0 -4
- package/core/foundations/icons.js +0 -4
- package/core/foundations/index.d.ts +1 -1
- package/core/foundations/index.js +1 -1
- package/core/foundations/responsive.d.ts +3 -0
- package/core/foundations/responsive.js +3 -0
- package/core/foundations/types.d.ts +1 -0
- package/core/foundations/typography.d.ts +9 -13
- package/core/foundations/typography.js +19 -13
- package/core/molecules/FileDrop.js +27 -16
- package/core/molecules/Modal.d.ts +1 -2
- package/core/molecules/Modal.js +25 -15
- package/core/organisms/GrantMatch.d.ts +9 -11
- package/core/organisms/GrantMatch.js +129 -77
- package/package.json +2 -2
- package/stories/molecules/Modal.stories.d.ts +2 -5
- package/stories/molecules/Modal.stories.js +4 -17
- package/stories/organisms/GrantMatch.stories.d.ts +2 -6
- package/stories/organisms/GrantMatch.stories.js +15 -18
- package/tsconfig.tsbuildinfo +1 -1
- package/core/assets/icons/grant_match.webp +0 -0
- package/core/foundations/breakpoints.d.ts +0 -1
- package/core/foundations/breakpoints.js +0 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { GrantMatch } from "@/.";
|
|
3
|
+
import { useGrantMatchActiveQuery } from "@/core/organisms/GrantMatch";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import styled from "styled-components";
|
|
6
|
-
const GrantMatchExample = (
|
|
6
|
+
const GrantMatchExample = () => {
|
|
7
7
|
const [status, setStatus] = useState("pending query");
|
|
8
8
|
const performGrantMatch = (newQuery) => {
|
|
9
9
|
const fileNames = newQuery.files.map((file) => file.name).join(", ");
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const printableQuery = `files [${fileNames}] and text [${newQuery.text}]`;
|
|
11
|
+
setStatus(`finding grants using ${printableQuery}`);
|
|
12
|
+
setTimeout(() => setStatus(`found grants with ${printableQuery}`), 3000);
|
|
12
13
|
};
|
|
13
14
|
const resetGrantMatch = () => setStatus("pending query");
|
|
14
|
-
const grantMatchQueryProps =
|
|
15
|
-
return (_jsxs(Container, {
|
|
15
|
+
const grantMatchQueryProps = useGrantMatchActiveQuery({}, performGrantMatch, resetGrantMatch);
|
|
16
|
+
return (_jsxs(Container, { children: [_jsx(GrantMatch, Object.assign({}, grantMatchQueryProps)), _jsxs("p", { children: ["Status: ", status] })] }));
|
|
16
17
|
};
|
|
17
18
|
const Container = styled.div `
|
|
18
19
|
display: flex;
|
|
@@ -20,13 +21,12 @@ const Container = styled.div `
|
|
|
20
21
|
gap: 8px;
|
|
21
22
|
|
|
22
23
|
padding: 16px;
|
|
23
|
-
|
|
24
|
-
width: ${({ $isMobile = false }) => ($isMobile ? "360px" : "90vw")};
|
|
25
|
-
height: ${({ $isMobile = false }) => ($isMobile ? "600px" : "100vh")};
|
|
26
|
-
|
|
27
|
-
border: ${({ $isMobile = false }) => $isMobile ? `1px solid ${Colors.neutral.grey2}` : "none"};
|
|
28
|
-
border-radius: 32px;
|
|
29
24
|
`;
|
|
25
|
+
// width: ${({ $screenSize }) => ($screenSize === "small" ? "360px" : "90vw")};
|
|
26
|
+
// height: ${({ $screenSize }) => ($screenSize === "small" ? "600px" : "100vh")};
|
|
27
|
+
// border: ${({ $screenSize }) =>
|
|
28
|
+
// $screenSize === "small" ? `1px solid ${Colors.neutral.grey2}` : "none"};
|
|
29
|
+
// border-radius: 32px;
|
|
30
30
|
const meta = {
|
|
31
31
|
title: "Organisms/Grant Match",
|
|
32
32
|
component: GrantMatchExample,
|
|
@@ -36,9 +36,6 @@ const meta = {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
export default meta;
|
|
39
|
-
export const
|
|
40
|
-
args: {
|
|
41
|
-
};
|
|
42
|
-
export const Mobile = {
|
|
43
|
-
args: { isMobile: true },
|
|
39
|
+
export const Example = {
|
|
40
|
+
args: {},
|
|
44
41
|
};
|