@grantbii/design-system 1.0.73 → 1.0.75
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.
|
@@ -17,7 +17,7 @@ import { RadioButton } from "../atoms";
|
|
|
17
17
|
const RadioButtons = ({ name, options }) => {
|
|
18
18
|
return (_jsx(RadioGroup, { children: options.map((_a) => {
|
|
19
19
|
var { value } = _a, props = __rest(_a, ["value"]);
|
|
20
|
-
return (_createElement(RadioButton, Object.assign({}, props, { key: `${name}-${value}`,
|
|
20
|
+
return (_createElement(RadioButton, Object.assign({}, props, { key: `${name}-${value}`, value: value, name: name })));
|
|
21
21
|
}) }));
|
|
22
22
|
};
|
|
23
23
|
export default RadioButtons;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from "styled-components";
|
|
3
3
|
import { Colors, Icons, Responsive, Typography } from "../../foundations";
|
|
4
4
|
import { useGrantMatchContext } from "./context";
|
|
5
5
|
const SearchBar = () => {
|
|
6
|
-
const { activeQuery } = useGrantMatchContext();
|
|
7
|
-
return (_jsxs(BaseSearchBar, { "$hasActiveQueryText": activeQuery.text !== "", children: [_jsx(QueryTextInput, {}), _jsxs(Buttons, { children: [_jsx(ResetTextButton, {}), _jsx(SearchButton, {}), _jsx(FileDropButton, {})] })] }));
|
|
6
|
+
const { activeQuery, queryText } = useGrantMatchContext();
|
|
7
|
+
return (_jsxs(BaseSearchBar, { "$hasActiveQueryText": activeQuery.text !== "", children: [_jsx(QueryTextInput, {}), _jsxs(Buttons, { children: [queryText !== "" ? _jsx(ResetTextButton, {}) : _jsx(_Fragment, {}), _jsx(SearchButton, {}), _jsx(FileDropButton, {})] })] }));
|
|
8
8
|
};
|
|
9
9
|
export default SearchBar;
|
|
10
10
|
const BaseSearchBar = styled.div `
|
|
@@ -20,15 +20,15 @@ const BaseSearchBar = styled.div `
|
|
|
20
20
|
border-radius: 12px;
|
|
21
21
|
|
|
22
22
|
@media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
23
|
-
gap:
|
|
23
|
+
gap: 6px;
|
|
24
|
+
padding: 6px;
|
|
24
25
|
width: 100%;
|
|
25
|
-
padding: 6px 16px;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
29
29
|
gap: 10px;
|
|
30
|
-
width: 480px;
|
|
31
30
|
padding: 10px;
|
|
31
|
+
width: 480px;
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
34
|
const QueryTextInput = () => {
|
|
@@ -50,16 +50,23 @@ const BaseQueryTextInput = styled.input `
|
|
|
50
50
|
const Buttons = styled.div `
|
|
51
51
|
display: flex;
|
|
52
52
|
align-items: center;
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
@media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
55
|
+
gap: 6px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
59
|
+
gap: 10px;
|
|
60
|
+
}
|
|
54
61
|
`;
|
|
55
62
|
const BaseIconButton = styled.button `
|
|
56
63
|
display: flex;
|
|
57
64
|
align-items: center;
|
|
58
65
|
justify-content: center;
|
|
59
66
|
|
|
60
|
-
height:
|
|
61
|
-
width:
|
|
62
|
-
min-width:
|
|
67
|
+
height: 31px;
|
|
68
|
+
width: 31px;
|
|
69
|
+
min-width: 31px;
|
|
63
70
|
|
|
64
71
|
border-radius: 8px;
|
|
65
72
|
`;
|
|
@@ -73,6 +80,7 @@ const ResetTextButton = () => {
|
|
|
73
80
|
};
|
|
74
81
|
const BaseResetTextButton = styled(BaseIconButton) `
|
|
75
82
|
background-color: ${Colors.base.white};
|
|
83
|
+
border: 1px solid ${Colors.base.white};
|
|
76
84
|
`;
|
|
77
85
|
const SearchButton = () => {
|
|
78
86
|
const { activeQuery, updateActiveQuery, queryText } = useGrantMatchContext();
|
|
@@ -80,7 +88,8 @@ const SearchButton = () => {
|
|
|
80
88
|
return (_jsx(BaseSearchButton, { type: "button", onClick: onClick, children: _jsx(Icons.MagnifyingGlassIcon, { size: 16, color: Colors.neutral.grey1 }) }));
|
|
81
89
|
};
|
|
82
90
|
const BaseSearchButton = styled(BaseIconButton) `
|
|
83
|
-
background-color: ${Colors.neutral.
|
|
91
|
+
background-color: ${Colors.neutral.grey4};
|
|
92
|
+
border: 1px solid ${Colors.neutral.grey3};
|
|
84
93
|
`;
|
|
85
94
|
const FileDropButton = () => {
|
|
86
95
|
const { activeQuery, openModal } = useGrantMatchContext();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { checkGrantMatchActive } from "@grantbii/ui-base/match/
|
|
3
|
+
import { checkGrantMatchActive } from "@grantbii/ui-base/match/validations";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import { useModal } from "../../molecules";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { LogicValue } from "@grantbii/ui-base/grant/enums";
|
|
4
4
|
import styled from "styled-components";
|
|
5
5
|
import { RadioButton } from "../atoms";
|
|
6
|
-
const YesNoOptions = ({ name, yesProps, noProps, unsureProps, }) => (_jsxs(RadioGroup, { children: [_jsx(RadioButton, Object.assign({}, yesProps, {
|
|
6
|
+
const YesNoOptions = ({ name, yesProps, noProps, unsureProps, }) => (_jsxs(RadioGroup, { children: [_jsx(RadioButton, Object.assign({}, yesProps, { label: LogicValue.YES, value: LogicValue.YES, name: name })), _jsx(RadioButton, Object.assign({}, noProps, { label: LogicValue.NO, value: LogicValue.NO, name: name })), unsureProps ? (_jsx(RadioButton, Object.assign({}, unsureProps, { label: LogicValue.UNSURE, value: LogicValue.UNSURE, name: name }))) : (_jsx(_Fragment, {}))] }));
|
|
7
7
|
export default YesNoOptions;
|
|
8
8
|
const RadioGroup = styled.div `
|
|
9
9
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grantbii/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.75",
|
|
4
4
|
"description": "Grantbii's Design System",
|
|
5
5
|
"homepage": "https://design.grantbii.com",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build-storybook": "storybook build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@grantbii/ui-base": "1.0.
|
|
21
|
+
"@grantbii/ui-base": "1.0.26",
|
|
22
22
|
"@phosphor-icons/react": "^2.1.10",
|
|
23
23
|
"country-flag-icons": "^1.5.19",
|
|
24
24
|
"next": "^15.5.2",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@storybook/addon-vitest": "^9.1.3",
|
|
39
39
|
"@storybook/nextjs-vite": "^9.1.3",
|
|
40
40
|
"@types/node": "^20",
|
|
41
|
-
"@types/react": "^19.1.
|
|
42
|
-
"@types/react-dom": "^19.1.
|
|
41
|
+
"@types/react": "^19.1.12",
|
|
42
|
+
"@types/react-dom": "^19.1.9",
|
|
43
43
|
"@vitest/browser": "^3.2.4",
|
|
44
44
|
"@vitest/coverage-v8": "^3.2.4",
|
|
45
45
|
"eslint": "^9.34.0",
|