@grantbii/design-system 1.8.1 → 1.9.1

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.
@@ -53,7 +53,7 @@ const BadgeLabel = styled.div `
53
53
  }
54
54
 
55
55
  @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
56
- font-size: ${Typography.HELPER_FONT_SIZES.big};
56
+ font-size: ${Typography.HELPER_FONT_SIZES.large};
57
57
  }
58
58
  `;
59
59
  const CloseButton = ({ onClick }) => (_jsx(BaseCloseButton, { type: "button", onClick: onClick, children: _jsx(Icons.XIcon, { size: 12 }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../core/atoms/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAcvE,MAAM,KAAK,GAAG,CAAC,EACb,KAAK,EACL,IAAI,EACJ,QAAQ,GAAG,EAAE,EACb,UAAU,GAAG,SAAS,EACtB,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,KAAK,GACM,EAAE,EAAE,CAAC,CAChB,MAAC,SAAS,IACR,OAAO,EAAE,OAAO,gBACJ,CAAC,CAAC,OAAO,sBACH,eAAe,YACzB,KAAK,aAEb,MAAC,YAAY,kBAAa,CAAC,CAAC,YAAY,kBAAgB,gBAAgB,aACrE,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,aAAa,cACZ,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,GAAI,GAC5C,CACjB,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,EAED,KAAC,UAAU,cAAE,KAAK,GAAc,IACnB,EAEd,YAAY,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,OAAO,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C,UAAU,CAAC,iBAAiB,CAAC,KAAK;;;qBAG9B,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACvC,UAAU,CAAC,iBAAiB,CAAC,GAAG;;CAEhD,CAAC;AAMF,MAAM,WAAW,GAAG,CAAC,EAAE,OAAO,EAAoB,EAAE,EAAE,CAAC,CACrD,KAAC,eAAe,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YAC7C,KAAC,KAAK,CAAC,KAAK,IAAC,IAAI,EAAE,EAAE,GAAI,GACT,CACnB,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;CAKpC,CAAC","sourcesContent":["import type { ComponentType, MouseEventHandler, ReactNode } from \"react\";\nimport styled from \"styled-components\";\nimport { Colors, Icons, Responsive, Typography } from \"../foundations\";\n\nexport type BadgeProps = {\n label: ReactNode;\n Icon?: ComponentType<Icons.IconProps>;\n iconSize?: string | number;\n iconWeight?: Icons.IconWeight;\n onClick?: MouseEventHandler<HTMLDivElement>;\n onClickClose?: MouseEventHandler<HTMLButtonElement>;\n labelWidthPixels?: number;\n backgroundColor?: string;\n color?: string;\n};\n\nconst Badge = ({\n label,\n Icon,\n iconSize = 20,\n iconWeight = \"regular\",\n onClick,\n onClickClose,\n labelWidthPixels,\n backgroundColor,\n color,\n}: BadgeProps) => (\n <BaseBadge\n onClick={onClick}\n $clickable={!!onClick}\n $backgroundColor={backgroundColor}\n $color={color}\n >\n <BadgeContent $closeable={!!onClickClose} $widthPixels={labelWidthPixels}>\n {Icon ? (\n <IconContainer>\n <Icon color={color} size={iconSize} weight={iconWeight} />\n </IconContainer>\n ) : (\n <></>\n )}\n\n <BadgeLabel>{label}</BadgeLabel>\n </BadgeContent>\n\n {onClickClose ? <CloseButton onClick={onClickClose} /> : <></>}\n </BaseBadge>\n);\n\nexport default Badge;\n\nconst BaseBadge = styled.div<{\n $clickable?: boolean;\n $backgroundColor?: string;\n $color?: string;\n}>`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n\n padding: 5px 15px;\n border-radius: 120px;\n\n color: ${({ $color = Colors.typography.blackHigh }) => $color};\n background-color: ${({ $backgroundColor = Colors.neutral.grey3 }) =>\n $backgroundColor};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n min-height: 27px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n min-height: 30px;\n }\n\n cursor: ${({ $clickable = false }) => ($clickable ? \"pointer\" : \"auto\")};\n`;\n\nconst BadgeContent = styled.div<{\n $closeable: boolean;\n $widthPixels?: number;\n}>`\n display: flex;\n align-items: center;\n gap: 10px;\n\n width: ${({ $widthPixels }) => ($widthPixels ? `${$widthPixels}px` : \"auto\")};\n max-width: ${({ $closeable }) => ($closeable ? \"calc(100% - 20px)\" : \"auto\")};\n`;\n\nconst IconContainer = styled.div<{ $iconSize?: string | number }>`\n display: flex;\n flex-direction: column;\n\n width: ${({ $iconSize = \"auto\" }) => $iconSize};\n min-width: ${({ $iconSize = \"auto\" }) => $iconSize};\n max-width: ${({ $iconSize = \"auto\" }) => $iconSize};\n`;\n\nconst BadgeLabel = styled.div`\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n font-weight: 500;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.big};\n }\n`;\n\ntype CloseButtonProps = {\n onClick: MouseEventHandler<HTMLButtonElement>;\n};\n\nconst CloseButton = ({ onClick }: CloseButtonProps) => (\n <BaseCloseButton type=\"button\" onClick={onClick}>\n <Icons.XIcon size={12} />\n </BaseCloseButton>\n);\n\nconst BaseCloseButton = styled.button`\n display: flex;\n flex-direction: column;\n\n min-width: 12px;\n`;\n"]}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../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react\";\nimport styled from \"styled-components\";\nimport { Colors, Icons, Responsive, Typography } from \"../foundations\";\n\nexport type BadgeProps = {\n label: ReactNode;\n Icon?: ComponentType<Icons.IconProps>;\n iconSize?: string | number;\n iconWeight?: Icons.IconWeight;\n onClick?: MouseEventHandler<HTMLDivElement>;\n onClickClose?: MouseEventHandler<HTMLButtonElement>;\n labelWidthPixels?: number;\n backgroundColor?: string;\n color?: string;\n};\n\nconst Badge = ({\n label,\n Icon,\n iconSize = 20,\n iconWeight = \"regular\",\n onClick,\n onClickClose,\n labelWidthPixels,\n backgroundColor,\n color,\n}: BadgeProps) => (\n <BaseBadge\n onClick={onClick}\n $clickable={!!onClick}\n $backgroundColor={backgroundColor}\n $color={color}\n >\n <BadgeContent $closeable={!!onClickClose} $widthPixels={labelWidthPixels}>\n {Icon ? (\n <IconContainer>\n <Icon color={color} size={iconSize} weight={iconWeight} />\n </IconContainer>\n ) : (\n <></>\n )}\n\n <BadgeLabel>{label}</BadgeLabel>\n </BadgeContent>\n\n {onClickClose ? <CloseButton onClick={onClickClose} /> : <></>}\n </BaseBadge>\n);\n\nexport default Badge;\n\nconst BaseBadge = styled.div<{\n $clickable?: boolean;\n $backgroundColor?: string;\n $color?: string;\n}>`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n\n padding: 5px 15px;\n border-radius: 120px;\n\n color: ${({ $color = Colors.typography.blackHigh }) => $color};\n background-color: ${({ $backgroundColor = Colors.neutral.grey3 }) =>\n $backgroundColor};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n min-height: 27px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n min-height: 30px;\n }\n\n cursor: ${({ $clickable = false }) => ($clickable ? \"pointer\" : \"auto\")};\n`;\n\nconst BadgeContent = styled.div<{\n $closeable: boolean;\n $widthPixels?: number;\n}>`\n display: flex;\n align-items: center;\n gap: 10px;\n\n width: ${({ $widthPixels }) => ($widthPixels ? `${$widthPixels}px` : \"auto\")};\n max-width: ${({ $closeable }) => ($closeable ? \"calc(100% - 20px)\" : \"auto\")};\n`;\n\nconst IconContainer = styled.div<{ $iconSize?: string | number }>`\n display: flex;\n flex-direction: column;\n\n width: ${({ $iconSize = \"auto\" }) => $iconSize};\n min-width: ${({ $iconSize = \"auto\" }) => $iconSize};\n max-width: ${({ $iconSize = \"auto\" }) => $iconSize};\n`;\n\nconst BadgeLabel = styled.div`\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n font-weight: 500;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.large};\n }\n`;\n\ntype CloseButtonProps = {\n onClick: MouseEventHandler<HTMLButtonElement>;\n};\n\nconst CloseButton = ({ onClick }: CloseButtonProps) => (\n <BaseCloseButton type=\"button\" onClick={onClick}>\n <Icons.XIcon size={12} />\n </BaseCloseButton>\n);\n\nconst BaseCloseButton = styled.button`\n display: flex;\n flex-direction: column;\n\n min-width: 12px;\n`;\n"]}
@@ -13,6 +13,7 @@ export const BaseButton = styled.div `
13
13
  font-weight: 500;
14
14
  font-size: 14px;
15
15
 
16
+ white-space: nowrap;
16
17
  text-decoration: ${({ $underline = false }) => $underline ? "underline" : "none"};
17
18
 
18
19
  color: ${({ $color = Colors.typography.whiteHigh }) => $color};
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../core/atoms/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAMlC;;;;;;WAMS,CAAC,EAAE,MAAM,GAA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K,CAAC,WAAW;IAC9B,YAAY,EAAE,KAAK,CAAC,WAAW;CAChC,CAAC","sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Colors, Icons } from \"../foundations\";\n\nexport const BaseButton = styled.div<{\n $underline?: boolean;\n $backgroundColor?: string;\n $borderColor?: string;\n $color?: string;\n $width?: string;\n}>`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n\n width: ${({ $width = \"auto\" }) => $width};\n\n padding: 10px 16px;\n\n font-weight: 500;\n font-size: 14px;\n\n text-decoration: ${({ $underline = false }) =>\n $underline ? \"underline\" : \"none\"};\n\n color: ${({ $color = Colors.typography.whiteHigh }) => $color};\n background-color: ${({\n $underline = false,\n $backgroundColor = Colors.main.grantbiiBlue,\n }) => ($underline ? \"transparent\" : $backgroundColor)};\n\n border: 1px solid ${({ $borderColor = \"transparent\" }) => $borderColor};\n border-radius: 8px;\n`;\n\nexport const LabelledInput = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const InputValidation = css`\n &:disabled {\n background-color: ${Colors.neutral.grey4};\n border: 1px solid ${Colors.neutral.grey3};\n outline: none;\n }\n\n &:valid {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.neutral.grey3};\n outline: none;\n }\n\n &:valid&:focus {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.accent.blue1};\n outline: 1px solid ${Colors.accent.blue1};\n }\n\n &:invalid {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.accent.red1};\n outline: none;\n }\n\n &:invalid&:focus {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.accent.red1};\n outline: 1px solid ${Colors.accent.red1};\n }\n`;\n\nexport const FILE_TYPE_ICON_MAP: { [mimeType: string]: Icons.Icon } = {\n \"application/pdf\": Icons.FilePdfIcon,\n \"image/png\": Icons.FilePngIcon,\n \"image/jpeg\": Icons.FileJpgIcon,\n};\n"]}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../core/atoms/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,CAAC,IAAI;;;;;wBAKlB,MAAM,CAAC,IAAI,CAAC,KAAK;wBACjB,MAAM,CAAC,MAAM,CAAC,IAAI;yBACjB,MAAM,CAAC,MAAM,CAAC,IAAI;;CAE1C,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IACpE,iBAAiB,EAAE,KAAK,CAAC,WAAW;IACpC,WAAW,EAAE,KAAK,CAAC,WAAW;IAC9B,YAAY,EAAE,KAAK,CAAC,WAAW;CAChC,CAAC","sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Colors, Icons } from \"../foundations\";\n\nexport const BaseButton = styled.div<{\n $underline?: boolean;\n $backgroundColor?: string;\n $borderColor?: string;\n $color?: string;\n $width?: string;\n}>`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n\n width: ${({ $width = \"auto\" }) => $width};\n\n padding: 10px 16px;\n\n font-weight: 500;\n font-size: 14px;\n\n white-space: nowrap;\n text-decoration: ${({ $underline = false }) =>\n $underline ? \"underline\" : \"none\"};\n\n color: ${({ $color = Colors.typography.whiteHigh }) => $color};\n background-color: ${({\n $underline = false,\n $backgroundColor = Colors.main.grantbiiBlue,\n }) => ($underline ? \"transparent\" : $backgroundColor)};\n\n border: 1px solid ${({ $borderColor = \"transparent\" }) => $borderColor};\n border-radius: 8px;\n`;\n\nexport const LabelledInput = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const InputValidation = css`\n &:disabled {\n background-color: ${Colors.neutral.grey4};\n border: 1px solid ${Colors.neutral.grey3};\n outline: none;\n }\n\n &:valid {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.neutral.grey3};\n outline: none;\n }\n\n &:valid&:focus {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.accent.blue1};\n outline: 1px solid ${Colors.accent.blue1};\n }\n\n &:invalid {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.accent.red1};\n outline: none;\n }\n\n &:invalid&:focus {\n background-color: ${Colors.base.white};\n border: 1px solid ${Colors.accent.red1};\n outline: 1px solid ${Colors.accent.red1};\n }\n`;\n\nexport const FILE_TYPE_ICON_MAP: { [mimeType: string]: Icons.Icon } = {\n \"application/pdf\": Icons.FilePdfIcon,\n \"image/png\": Icons.FilePngIcon,\n \"image/jpeg\": Icons.FileJpgIcon,\n};\n"]}
@@ -1,5 +1,3 @@
1
1
  export declare const WIDTH_BREAKPOINTS: {
2
2
  laptop: string;
3
3
  };
4
- export declare const SmallScreenOnly: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
- export declare const BigScreenOnly: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,23 +1,4 @@
1
- import styled from "styled-components";
2
1
  export const WIDTH_BREAKPOINTS = {
3
2
  laptop: "1024px",
4
3
  };
5
- export const SmallScreenOnly = styled.div `
6
- @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
7
- display: inline;
8
- }
9
-
10
- @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
11
- display: none;
12
- }
13
- `;
14
- export const BigScreenOnly = styled.div `
15
- @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
16
- display: none;
17
- }
18
-
19
- @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
20
- display: inline;
21
- }
22
- `;
23
4
  //# sourceMappingURL=responsive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../../core/foundations/responsive.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;oBACrB,iBAAiB,CAAC,MAAM;;;;qBAIvB,iBAAiB,CAAC,MAAM;;;CAG5C,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;oBACnB,iBAAiB,CAAC,MAAM;;;;qBAIvB,iBAAiB,CAAC,MAAM;;;CAG5C,CAAC","sourcesContent":["import styled from \"styled-components\";\n\nexport const WIDTH_BREAKPOINTS = {\n laptop: \"1024px\",\n};\n\nexport const SmallScreenOnly = styled.div`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n display: inline;\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n display: none;\n }\n`;\n\nexport const BigScreenOnly = styled.div`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n display: none;\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n display: inline;\n }\n`;\n"]}
1
+ {"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../../core/foundations/responsive.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,QAAQ;CACjB,CAAC","sourcesContent":["export const WIDTH_BREAKPOINTS = {\n laptop: \"1024px\",\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- export type ScreenSize = "big" | "small";
2
+ export type ScreenSize = "small" | "large";
3
3
  export type Option = {
4
4
  label: ReactNode;
5
5
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../core/foundations/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from \"react\";\n\nexport type ScreenSize = \"big\" | \"small\";\n\nexport type Option = {\n label: ReactNode;\n value: string;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../core/foundations/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from \"react\";\n\nexport type ScreenSize = \"small\" | \"large\";\n\nexport type Option = {\n label: ReactNode;\n value: string;\n};\n"]}
@@ -1,21 +1,21 @@
1
1
  export const TITLE_FONT_SIZES = {
2
- big: "24px",
3
2
  small: "22px",
3
+ large: "24px",
4
4
  };
5
5
  export const HEADER_FONT_SIZES = {
6
- big: "22px",
7
6
  small: "20px",
7
+ large: "22px",
8
8
  };
9
9
  export const SUBHEADER_FONT_SIZES = {
10
- big: "20px",
11
10
  small: "18px",
11
+ large: "20px",
12
12
  };
13
13
  export const BODY_FONT_SIZES = {
14
- big: "16px",
15
14
  small: "14px",
15
+ large: "16px",
16
16
  };
17
17
  export const HELPER_FONT_SIZES = {
18
- big: "14px",
19
18
  small: "12px",
19
+ large: "14px",
20
20
  };
21
21
  //# sourceMappingURL=typography.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../core/foundations/typography.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAc;IAC7C,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,MAAM;CACd,CAAC","sourcesContent":["import type { ScreenSize } from \"./types\";\n\ntype FontSizes = { [screenSize in ScreenSize]: string };\n\nexport const TITLE_FONT_SIZES: FontSizes = {\n big: \"24px\",\n small: \"22px\",\n};\n\nexport const HEADER_FONT_SIZES: FontSizes = {\n big: \"22px\",\n small: \"20px\",\n};\n\nexport const SUBHEADER_FONT_SIZES: FontSizes = {\n big: \"20px\",\n small: \"18px\",\n};\n\nexport const BODY_FONT_SIZES: FontSizes = {\n big: \"16px\",\n small: \"14px\",\n};\n\nexport const HELPER_FONT_SIZES: FontSizes = {\n big: \"14px\",\n small: \"12px\",\n};\n"]}
1
+ {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../core/foundations/typography.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAc;IAC7C,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;CACd,CAAC","sourcesContent":["import type { ScreenSize } from \"./types\";\n\ntype FontSizes = { [screenSize in ScreenSize]: string };\n\nexport const TITLE_FONT_SIZES: FontSizes = {\n small: \"22px\",\n large: \"24px\",\n};\n\nexport const HEADER_FONT_SIZES: FontSizes = {\n small: \"20px\",\n large: \"22px\",\n};\n\nexport const SUBHEADER_FONT_SIZES: FontSizes = {\n small: \"18px\",\n large: \"20px\",\n};\n\nexport const BODY_FONT_SIZES: FontSizes = {\n small: \"14px\",\n large: \"16px\",\n};\n\nexport const HELPER_FONT_SIZES: FontSizes = {\n small: \"12px\",\n large: \"14px\",\n};\n"]}
@@ -0,0 +1,7 @@
1
+ export declare const SmallScreenOnly: import("styled-components").RuleSet<object>;
2
+ export declare const LargeScreenOnly: import("styled-components").RuleSet<object>;
3
+ export declare const TitleFontSize: import("styled-components").RuleSet<object>;
4
+ export declare const HeaderFontSize: import("styled-components").RuleSet<object>;
5
+ export declare const SubheaderFontSize: import("styled-components").RuleSet<object>;
6
+ export declare const BodyFontSize: import("styled-components").RuleSet<object>;
7
+ export declare const HelperFontSize: import("styled-components").RuleSet<object>;
@@ -0,0 +1,67 @@
1
+ import { css } from "styled-components";
2
+ import { WIDTH_BREAKPOINTS } from "../foundations/responsive";
3
+ import { BODY_FONT_SIZES, HEADER_FONT_SIZES, HELPER_FONT_SIZES, SUBHEADER_FONT_SIZES, TITLE_FONT_SIZES, } from "../foundations/typography";
4
+ export const SmallScreenOnly = css `
5
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
6
+ display: inline;
7
+ }
8
+
9
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
10
+ display: none;
11
+ }
12
+ `;
13
+ export const LargeScreenOnly = css `
14
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
15
+ display: none;
16
+ }
17
+
18
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
19
+ display: inline;
20
+ }
21
+ `;
22
+ export const TitleFontSize = css `
23
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
24
+ font-size: ${TITLE_FONT_SIZES.small};
25
+ }
26
+
27
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
28
+ font-size: ${TITLE_FONT_SIZES.large};
29
+ }
30
+ `;
31
+ export const HeaderFontSize = css `
32
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
33
+ font-size: ${HEADER_FONT_SIZES.small};
34
+ }
35
+
36
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
37
+ font-size: ${HEADER_FONT_SIZES.large};
38
+ }
39
+ `;
40
+ export const SubheaderFontSize = css `
41
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
42
+ font-size: ${SUBHEADER_FONT_SIZES.small};
43
+ }
44
+
45
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
46
+ font-size: ${SUBHEADER_FONT_SIZES.large};
47
+ }
48
+ `;
49
+ export const BodyFontSize = css `
50
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
51
+ font-size: ${BODY_FONT_SIZES.small};
52
+ }
53
+
54
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
55
+ font-size: ${BODY_FONT_SIZES.large};
56
+ }
57
+ `;
58
+ export const HelperFontSize = css `
59
+ @media (width < ${WIDTH_BREAKPOINTS.laptop}) {
60
+ font-size: ${HELPER_FONT_SIZES.small};
61
+ }
62
+
63
+ @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {
64
+ font-size: ${HELPER_FONT_SIZES.large};
65
+ }
66
+ `;
67
+ //# sourceMappingURL=fragments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragments.js","sourceRoot":"","sources":["../../../core/integrations/fragments.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;oBACd,iBAAiB,CAAC,MAAM;;;;qBAIvB,iBAAiB,CAAC,MAAM;;;CAG5C,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;oBACd,iBAAiB,CAAC,MAAM;;;;qBAIvB,iBAAiB,CAAC,MAAM;;;CAG5C,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;oBACZ,iBAAiB,CAAC,MAAM;iBAC3B,gBAAgB,CAAC,KAAK;;;qBAGlB,iBAAiB,CAAC,MAAM;iBAC5B,gBAAgB,CAAC,KAAK;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;oBACb,iBAAiB,CAAC,MAAM;iBAC3B,iBAAiB,CAAC,KAAK;;;qBAGnB,iBAAiB,CAAC,MAAM;iBAC5B,iBAAiB,CAAC,KAAK;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;oBAChB,iBAAiB,CAAC,MAAM;iBAC3B,oBAAoB,CAAC,KAAK;;;qBAGtB,iBAAiB,CAAC,MAAM;iBAC5B,oBAAoB,CAAC,KAAK;;CAE1C,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;oBACX,iBAAiB,CAAC,MAAM;iBAC3B,eAAe,CAAC,KAAK;;;qBAGjB,iBAAiB,CAAC,MAAM;iBAC5B,eAAe,CAAC,KAAK;;CAErC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;oBACb,iBAAiB,CAAC,MAAM;iBAC3B,iBAAiB,CAAC,KAAK;;;qBAGnB,iBAAiB,CAAC,MAAM;iBAC5B,iBAAiB,CAAC,KAAK;;CAEvC,CAAC","sourcesContent":["import { css } from \"styled-components\";\nimport { WIDTH_BREAKPOINTS } from \"../foundations/responsive\";\nimport {\n BODY_FONT_SIZES,\n HEADER_FONT_SIZES,\n HELPER_FONT_SIZES,\n SUBHEADER_FONT_SIZES,\n TITLE_FONT_SIZES,\n} from \"../foundations/typography\";\n\nexport const SmallScreenOnly = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n display: inline;\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n display: none;\n }\n`;\n\nexport const LargeScreenOnly = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n display: none;\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n display: inline;\n }\n`;\n\nexport const TitleFontSize = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${TITLE_FONT_SIZES.small};\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${TITLE_FONT_SIZES.large};\n }\n`;\n\nexport const HeaderFontSize = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${HEADER_FONT_SIZES.small};\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${HEADER_FONT_SIZES.large};\n }\n`;\n\nexport const SubheaderFontSize = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${SUBHEADER_FONT_SIZES.small};\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${SUBHEADER_FONT_SIZES.large};\n }\n`;\n\nexport const BodyFontSize = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${BODY_FONT_SIZES.small};\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${BODY_FONT_SIZES.large};\n }\n`;\n\nexport const HelperFontSize = css`\n @media (width < ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${HELPER_FONT_SIZES.large};\n }\n`;\n"]}
@@ -1,2 +1,3 @@
1
- export { default as StyledComponentsRegistry } from "./StyledComponentsRegistry";
1
+ export * from "./fragments";
2
2
  export * from "./mappings";
3
+ export { default as StyledComponentsRegistry } from "./registry";
@@ -1,3 +1,4 @@
1
- export { default as StyledComponentsRegistry } from "./StyledComponentsRegistry";
1
+ export * from "./fragments";
2
2
  export * from "./mappings";
3
+ export { default as StyledComponentsRegistry } from "./registry";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../core/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,cAAc,YAAY,CAAC","sourcesContent":["export { default as StyledComponentsRegistry } from \"./StyledComponentsRegistry\";\nexport * from \"./mappings\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../core/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export * from \"./fragments\";\nexport * from \"./mappings\";\nexport { default as StyledComponentsRegistry } from \"./registry\";\n"]}
@@ -14,4 +14,4 @@ const StyledComponentsRegistry = ({ children }) => {
14
14
  return typeof window !== "undefined" ? (_jsx(_Fragment, { children: children })) : (_jsx(StyleSheetManager, { sheet: styledComponentsStyleSheet.instance, children: children }));
15
15
  };
16
16
  export default StyledComponentsRegistry;
17
- //# sourceMappingURL=StyledComponentsRegistry.js.map
17
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../core/integrations/registry.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAA0B,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,wBAAwB,GAAG,CAAC,EAAE,QAAQ,EAAqB,EAAE,EAAE;IACnE,sDAAsD;IACtD,0EAA0E;IAC1E,MAAM,CAAC,0BAA0B,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,gBAAgB,EAAE,CAAC,CAAC;IAE5E,qBAAqB,CAAC,GAAG,EAAE;QACzB,MAAM,MAAM,GAAG,0BAA0B,CAAC,eAAe,EAAE,CAAC;QAC5D,0BAA0B,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC/C,OAAO,4BAAG,MAAM,GAAI,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CACrC,4BAAG,QAAQ,GAAI,CAChB,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAAC,KAAK,EAAE,0BAA0B,CAAC,QAAQ,YAC1D,QAAQ,GACS,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC","sourcesContent":["import { useServerInsertedHTML } from \"next/navigation\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nconst StyledComponentsRegistry = ({ children }: PropsWithChildren) => {\n // Only create stylesheet once with lazy initial state\n // x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state\n const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet());\n\n useServerInsertedHTML(() => {\n const styles = styledComponentsStyleSheet.getStyleElement();\n styledComponentsStyleSheet.instance.clearTag();\n return <>{styles}</>;\n });\n\n return typeof window !== \"undefined\" ? (\n <>{children}</>\n ) : (\n <StyleSheetManager sheet={styledComponentsStyleSheet.instance}>\n {children}\n </StyleSheetManager>\n );\n};\n\nexport default StyledComponentsRegistry;\n"]}
@@ -62,7 +62,7 @@ const DropzoneText = styled.p `
62
62
  }
63
63
 
64
64
  @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
65
- font-size: ${Typography.BODY_FONT_SIZES.big};
65
+ font-size: ${Typography.BODY_FONT_SIZES.large};
66
66
  }
67
67
  `;
68
68
  const DropzoneSubtitle = styled.p `
@@ -77,7 +77,7 @@ const DropzoneSubtitle = styled.p `
77
77
  }
78
78
 
79
79
  @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
80
- font-size: ${Typography.HELPER_FONT_SIZES.big};
80
+ font-size: ${Typography.HELPER_FONT_SIZES.large};
81
81
  }
82
82
  `;
83
83
  const ErrorMessage = styled.p `
@@ -1 +1 @@
1
- {"version":3,"file":"FileDrop.js","sourceRoot":"","sources":["../../../core/molecules/FileDrop.tsx"],"names":[],"mappings":";A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C,SAAiB,EAAU,EAAE,CAC5D,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1B,MAAM,6BAA6B,GAAG,CACpC,QAAgB,EAChB,QAAgB,EACR,EAAE;IACV,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAClC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAClD,CAAC;IAEF,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,QAAQ,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAU,EAAE,CACpE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;AAEjD,MAAM,2BAA2B,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC/D,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\nimport styled from \"styled-components\";\nimport { FILE_TYPE_ICON_MAP } from \"../atoms/shared\";\nimport { Colors, Icons, Responsive, Typography } from \"../foundations\";\nimport Badges from \"./Badges\";\n\nconst DEFAULT_MAX_FILE_SIZE_MB = 5;\nconst DEFAULT_MAX_FILES = 5;\n\ntype FileDropzoneProps = {\n uploadedFiles: File[];\n uploadFiles: (acceptedFiles: File[]) => void;\n removeFile: (fileName: string) => void;\n errorMessage?: string;\n maxFiles?: number;\n maxSizeMB?: number;\n};\n\nconst FileDrop = ({\n uploadedFiles,\n uploadFiles,\n removeFile,\n errorMessage,\n maxFiles = DEFAULT_MAX_FILES,\n maxSizeMB = DEFAULT_MAX_FILE_SIZE_MB,\n}: FileDropzoneProps) => {\n const reachedMaxUploads = uploadedFiles.length >= maxFiles;\n\n const { getInputProps, getRootProps } = useDropzone({\n onDrop: uploadFiles,\n accept: {\n \"application/pdf\": [\".pdf\"],\n \"image/jpeg\": [\".jpeg\", \".jpg\"],\n \"image/png\": [\".png\"],\n },\n disabled: reachedMaxUploads,\n noClick: reachedMaxUploads,\n noDrag: reachedMaxUploads,\n multiple: true,\n });\n\n return (\n <BaseFileDrop>\n <Dropzone\n {...getRootProps()}\n $reachedMaxUploads={reachedMaxUploads}\n $hasError={!!errorMessage}\n >\n <input {...getInputProps()} type=\"file\" />\n <DropzoneContent maxFiles={maxFiles} maxSizeMB={maxSizeMB} />\n </Dropzone>\n\n {errorMessage ? <ErrorMessage>{errorMessage}</ErrorMessage> : <></>}\n\n <UploadedFiles uploadedFiles={uploadedFiles} removeFile={removeFile} />\n </BaseFileDrop>\n );\n};\n\nexport default FileDrop;\n\nconst BaseFileDrop = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 6px;\n`;\n\nconst Dropzone = styled.div<{\n $reachedMaxUploads: boolean;\n $hasError: boolean;\n}>`\n padding: 40px;\n border-radius: 8px;\n border: 1px solid\n ${({ $hasError }) =>\n $hasError ? Colors.accent.red1 : Colors.neutral.grey3};\n\n &:hover {\n cursor: ${({ $reachedMaxUploads }) =>\n $reachedMaxUploads ? \"not-allowed\" : \"pointer\"};\n }\n`;\n\ntype DropzoneContentProps = {\n maxFiles: number;\n maxSizeMB: number;\n};\n\nconst DropzoneContent = ({ maxFiles, maxSizeMB }: DropzoneContentProps) => (\n <BaseDropzoneContent>\n <Icons.FileDashedIcon\n weight=\"thin\"\n size={48}\n color={Colors.neutral.grey1}\n />\n <AllDropzoneText>\n <DropzoneText>\n {`Drop up to ${maxFiles} files here (up to ${maxSizeMB}MB each)`}\n </DropzoneText>\n\n <DropzoneSubtitle $isHighlighted>\n or click to browse with your file explorer\n </DropzoneSubtitle>\n\n <DropzoneSubtitle>Accepted file formats: pdf, png, jpg</DropzoneSubtitle>\n </AllDropzoneText>\n </BaseDropzoneContent>\n);\n\nconst BaseDropzoneContent = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n align-items: center;\n`;\n\nconst AllDropzoneText = styled.div`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nconst DropzoneText = styled.p`\n text-align: center;\n\n font-weight: 500;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.big};\n }\n`;\n\nconst DropzoneSubtitle = styled.p<{ $isHighlighted?: boolean }>`\n text-align: center;\n\n font-weight: 400;\n\n color: ${({ $isHighlighted = false }) =>\n $isHighlighted ? Colors.accent.yellow1 : Colors.typography.blackLow};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.big};\n }\n`;\n\nconst ErrorMessage = styled.p`\n color: ${Colors.accent.red1};\n`;\n\ntype UploadedFilesProps = {\n uploadedFiles: File[];\n removeFile: (fileName: string) => void;\n};\n\nconst UploadedFiles = ({ uploadedFiles, removeFile }: UploadedFilesProps) => {\n const fileBadgesProps = uploadedFiles.map(\n ({ name: fileName, type: fileType }) => ({\n label: getFileNameWithoutExtension(fileName),\n onClickClose: () => removeFile(fileName),\n Icon: FILE_TYPE_ICON_MAP[fileType] ?? Icons.FileIcon,\n }),\n );\n\n return <Badges allBadgeProps={fileBadgesProps} vertical />;\n};\n\nexport const useFileDrop = (\n initialFiles: File[] = [],\n maxFiles: number = DEFAULT_MAX_FILES,\n maxSizeMB: number = DEFAULT_MAX_FILE_SIZE_MB,\n) => {\n const [files, setFiles] = useState<File[]>(() => initialFiles);\n const [errorMessage, setErrorMessage] = useState<string | undefined>();\n\n const uploadFiles = (acceptedFiles: File[]) => {\n if (files.length + acceptedFiles.length > maxFiles) {\n setErrorMessage(() => `Maximum upload limit is ${maxFiles} files`);\n } else if (anyFileTooLarge(acceptedFiles, maxSizeMB)) {\n setErrorMessage(() => `Maximum file size is ${maxSizeMB}MB`);\n } else {\n setErrorMessage(() => undefined);\n setFiles((previousFiles) =>\n combineFilesWithoutDuplicates(previousFiles, acceptedFiles),\n );\n }\n };\n\n const removeFile = (fileName: string) => {\n setErrorMessage(() => undefined);\n setFiles((previousFiles) => filterFilesByName(previousFiles, fileName));\n };\n\n return {\n files,\n uploadFiles,\n removeFile,\n errorMessage,\n };\n};\n\nconst anyFileTooLarge = (files: File[], maxSizeMB: number): boolean =>\n files.some((file) => file.size > convertMegabytesToBytes(maxSizeMB));\n\nconst convertMegabytesToBytes = (megabytes: number): number =>\n megabytes * 1024 * 1024;\n\nconst combineFilesWithoutDuplicates = (\n oldFiles: File[],\n newFiles: File[],\n): File[] => {\n const newFileNames = newFiles.map((file) => file.name);\n const keptOldFiles = oldFiles.filter(\n (oldFile) => !newFileNames.includes(oldFile.name),\n );\n\n return [...keptOldFiles, ...newFiles];\n};\n\nconst filterFilesByName = (files: File[], fileName: string): File[] =>\n files.filter((file) => file.name !== fileName);\n\nconst getFileNameWithoutExtension = (fileName: string): string =>\n fileName.substring(0, fileName.lastIndexOf(\".\"));\n"]}
1
+ {"version":3,"file":"FileDrop.js","sourceRoot":"","sources":["../../../core/molecules/FileDrop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,KAA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CAAC,CAAC;IACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAClC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAClD,CAAC;IAEF,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,QAAQ,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAU,EAAE,CACpE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;AAEjD,MAAM,2BAA2B,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC/D,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\nimport styled from \"styled-components\";\nimport { FILE_TYPE_ICON_MAP } from \"../atoms/shared\";\nimport { Colors, Icons, Responsive, Typography } from \"../foundations\";\nimport Badges from \"./Badges\";\n\nconst DEFAULT_MAX_FILE_SIZE_MB = 5;\nconst DEFAULT_MAX_FILES = 5;\n\ntype FileDropzoneProps = {\n uploadedFiles: File[];\n uploadFiles: (acceptedFiles: File[]) => void;\n removeFile: (fileName: string) => void;\n errorMessage?: string;\n maxFiles?: number;\n maxSizeMB?: number;\n};\n\nconst FileDrop = ({\n uploadedFiles,\n uploadFiles,\n removeFile,\n errorMessage,\n maxFiles = DEFAULT_MAX_FILES,\n maxSizeMB = DEFAULT_MAX_FILE_SIZE_MB,\n}: FileDropzoneProps) => {\n const reachedMaxUploads = uploadedFiles.length >= maxFiles;\n\n const { getInputProps, getRootProps } = useDropzone({\n onDrop: uploadFiles,\n accept: {\n \"application/pdf\": [\".pdf\"],\n \"image/jpeg\": [\".jpeg\", \".jpg\"],\n \"image/png\": [\".png\"],\n },\n disabled: reachedMaxUploads,\n noClick: reachedMaxUploads,\n noDrag: reachedMaxUploads,\n multiple: true,\n });\n\n return (\n <BaseFileDrop>\n <Dropzone\n {...getRootProps()}\n $reachedMaxUploads={reachedMaxUploads}\n $hasError={!!errorMessage}\n >\n <input {...getInputProps()} type=\"file\" />\n <DropzoneContent maxFiles={maxFiles} maxSizeMB={maxSizeMB} />\n </Dropzone>\n\n {errorMessage ? <ErrorMessage>{errorMessage}</ErrorMessage> : <></>}\n\n <UploadedFiles uploadedFiles={uploadedFiles} removeFile={removeFile} />\n </BaseFileDrop>\n );\n};\n\nexport default FileDrop;\n\nconst BaseFileDrop = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 6px;\n`;\n\nconst Dropzone = styled.div<{\n $reachedMaxUploads: boolean;\n $hasError: boolean;\n}>`\n padding: 40px;\n border-radius: 8px;\n border: 1px solid\n ${({ $hasError }) =>\n $hasError ? Colors.accent.red1 : Colors.neutral.grey3};\n\n &:hover {\n cursor: ${({ $reachedMaxUploads }) =>\n $reachedMaxUploads ? \"not-allowed\" : \"pointer\"};\n }\n`;\n\ntype DropzoneContentProps = {\n maxFiles: number;\n maxSizeMB: number;\n};\n\nconst DropzoneContent = ({ maxFiles, maxSizeMB }: DropzoneContentProps) => (\n <BaseDropzoneContent>\n <Icons.FileDashedIcon\n weight=\"thin\"\n size={48}\n color={Colors.neutral.grey1}\n />\n <AllDropzoneText>\n <DropzoneText>\n {`Drop up to ${maxFiles} files here (up to ${maxSizeMB}MB each)`}\n </DropzoneText>\n\n <DropzoneSubtitle $isHighlighted>\n or click to browse with your file explorer\n </DropzoneSubtitle>\n\n <DropzoneSubtitle>Accepted file formats: pdf, png, jpg</DropzoneSubtitle>\n </AllDropzoneText>\n </BaseDropzoneContent>\n);\n\nconst BaseDropzoneContent = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n align-items: center;\n`;\n\nconst AllDropzoneText = styled.div`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nconst DropzoneText = styled.p`\n text-align: center;\n\n font-weight: 500;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.large};\n }\n`;\n\nconst DropzoneSubtitle = styled.p<{ $isHighlighted?: boolean }>`\n text-align: center;\n\n font-weight: 400;\n\n color: ${({ $isHighlighted = false }) =>\n $isHighlighted ? Colors.accent.yellow1 : Colors.typography.blackLow};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.large};\n }\n`;\n\nconst ErrorMessage = styled.p`\n color: ${Colors.accent.red1};\n`;\n\ntype UploadedFilesProps = {\n uploadedFiles: File[];\n removeFile: (fileName: string) => void;\n};\n\nconst UploadedFiles = ({ uploadedFiles, removeFile }: UploadedFilesProps) => {\n const fileBadgesProps = uploadedFiles.map(\n ({ name: fileName, type: fileType }) => ({\n label: getFileNameWithoutExtension(fileName),\n onClickClose: () => removeFile(fileName),\n Icon: FILE_TYPE_ICON_MAP[fileType] ?? Icons.FileIcon,\n }),\n );\n\n return <Badges allBadgeProps={fileBadgesProps} vertical />;\n};\n\nexport const useFileDrop = (\n initialFiles: File[] = [],\n maxFiles: number = DEFAULT_MAX_FILES,\n maxSizeMB: number = DEFAULT_MAX_FILE_SIZE_MB,\n) => {\n const [files, setFiles] = useState<File[]>(() => initialFiles);\n const [errorMessage, setErrorMessage] = useState<string | undefined>();\n\n const uploadFiles = (acceptedFiles: File[]) => {\n if (files.length + acceptedFiles.length > maxFiles) {\n setErrorMessage(() => `Maximum upload limit is ${maxFiles} files`);\n } else if (anyFileTooLarge(acceptedFiles, maxSizeMB)) {\n setErrorMessage(() => `Maximum file size is ${maxSizeMB}MB`);\n } else {\n setErrorMessage(() => undefined);\n setFiles((previousFiles) =>\n combineFilesWithoutDuplicates(previousFiles, acceptedFiles),\n );\n }\n };\n\n const removeFile = (fileName: string) => {\n setErrorMessage(() => undefined);\n setFiles((previousFiles) => filterFilesByName(previousFiles, fileName));\n };\n\n return {\n files,\n uploadFiles,\n removeFile,\n errorMessage,\n };\n};\n\nconst anyFileTooLarge = (files: File[], maxSizeMB: number): boolean =>\n files.some((file) => file.size > convertMegabytesToBytes(maxSizeMB));\n\nconst convertMegabytesToBytes = (megabytes: number): number =>\n megabytes * 1024 * 1024;\n\nconst combineFilesWithoutDuplicates = (\n oldFiles: File[],\n newFiles: File[],\n): File[] => {\n const newFileNames = newFiles.map((file) => file.name);\n const keptOldFiles = oldFiles.filter(\n (oldFile) => !newFileNames.includes(oldFile.name),\n );\n\n return [...keptOldFiles, ...newFiles];\n};\n\nconst filterFilesByName = (files: File[], fileName: string): File[] =>\n files.filter((file) => file.name !== fileName);\n\nconst getFileNameWithoutExtension = (fileName: string): string =>\n fileName.substring(0, fileName.lastIndexOf(\".\"));\n"]}
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Image from "next/image";
2
3
  import styled, { css } from "styled-components";
4
+ import grantMatchLogo from "../../assets/logos/grant_match_logo.webp";
3
5
  import { Colors, Icons, Responsive, Typography } from "../../foundations";
4
6
  import { useGrantMatchContext } from "./context";
5
- import grantMatchLogo from "../../assets/logos/grant_match_logo.webp";
6
- import Image from "next/image";
7
7
  const SearchBar = ({ textSearchCallback, openModalCallback, }) => {
8
8
  const { activeQuery, queryText } = useGrantMatchContext();
9
9
  return (_jsxs(BaseSearchBar, { children: [_jsxs(TextSearchArea, { "$showBorder": activeQuery.text !== "", children: [_jsx(QueryTextInput, {}), queryText !== "" ? (_jsx(ResetTextButton, {})) : (_jsx(ResetTextButtonPlaceholder, {}))] }), _jsx(TextSearchButton, { textSearchCallback: textSearchCallback }), _jsx(VerticalDivider, {}), _jsx(OpenModalButton, { openModalCallback: openModalCallback })] }));
@@ -66,7 +66,7 @@ const BaseQueryTextInput = styled.input `
66
66
  background-color: ${Colors.neutral.grey4};
67
67
  text-overflow: ellipsis;
68
68
  `;
69
- const BaseIconButton = styled.button `
69
+ const IconButton = css `
70
70
  display: flex;
71
71
  align-items: center;
72
72
  justify-content: center;
@@ -85,7 +85,9 @@ const ResetTextButton = () => {
85
85
  };
86
86
  return (_jsx(BaseResetTextButton, { type: "button", onClick: onClick, children: _jsx(Icons.XIcon, { size: 20, color: Colors.neutral.grey1 }) }));
87
87
  };
88
- const BaseResetTextButton = styled(BaseIconButton) `
88
+ const BaseResetTextButton = styled.button `
89
+ ${IconButton}
90
+
89
91
  background-color: ${Colors.neutral.grey4};
90
92
  border: 1px solid ${Colors.neutral.grey4};
91
93
  `;
@@ -106,7 +108,9 @@ const TextSearchButton = ({ textSearchCallback }) => {
106
108
  };
107
109
  return (_jsx(BaseSearchButton, { type: "button", onClick: onClickSearch, children: _jsx(Icons.MagnifyingGlassIcon, { size: 20, color: Colors.base.white }) }));
108
110
  };
109
- const BaseSearchButton = styled(BaseIconButton) `
111
+ const BaseSearchButton = styled.button `
112
+ ${IconButton}
113
+
110
114
  background-color: ${Colors.main.grantbiiBlue};
111
115
  border: 1px solid ${Colors.main.grantbiiBlue};
112
116
  `;
@@ -156,7 +160,7 @@ const BaseOpenModalButton = styled.button `
156
160
  width: 238px;
157
161
  min-width: 238px;
158
162
  padding: 2px 12px;
159
- font-size: ${Typography.HELPER_FONT_SIZES.big};
163
+ font-size: ${Typography.HELPER_FONT_SIZES.large};
160
164
  }
161
165
  `;
162
166
  const GrantMatchLogo = styled(Image) `
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../../core/organisms/GrantMatch/SearchBar.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB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F,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;;;;;CAMnC,CAAC;AAEF,MAAM,mBAAmB,GAAG,MAAM,CAAC,CAAC,CAAA;;;;;;oBAMhB,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;qBAIlC,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;CAGvD,CAAC","sourcesContent":["import type { KeyboardEvent } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { Colors, Icons, Responsive, Typography } from \"../../foundations\";\nimport { useGrantMatchContext } from \"./context\";\nimport grantMatchLogo from \"../../assets/logos/grant_match_logo.webp\";\nimport Image from \"next/image\";\n\ntype SearchBarProps = {\n textSearchCallback?: () => void;\n openModalCallback?: () => void;\n};\n\nconst SearchBar = ({\n textSearchCallback,\n openModalCallback,\n}: SearchBarProps) => {\n const { activeQuery, queryText } = useGrantMatchContext();\n\n return (\n <BaseSearchBar>\n <TextSearchArea $showBorder={activeQuery.text !== \"\"}>\n <QueryTextInput />\n\n {queryText !== \"\" ? (\n <ResetTextButton />\n ) : (\n <ResetTextButtonPlaceholder />\n )}\n </TextSearchArea>\n\n <TextSearchButton textSearchCallback={textSearchCallback} />\n <VerticalDivider />\n <OpenModalButton openModalCallback={openModalCallback} />\n </BaseSearchBar>\n );\n};\n\nexport default SearchBar;\n\nconst BaseSearchBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n width: 100%;\n\n color: ${Colors.typography.blackHigh};\n background-color: ${Colors.base.white};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 8px;\n padding: 0px;\n\n box-shadow: none;\n border-radius: 0px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 16px;\n padding: 12px 16px;\n\n box-shadow: 0px 0px 40px 0px #00000008;\n border-radius: 12px;\n }\n`;\n\nconst TextSearchArea = styled.div<{ $showBorder: boolean }>`\n display: flex;\n align-items: center;\n\n width: 100%;\n\n background-color: ${Colors.neutral.grey4};\n border-radius: 8px;\n\n border: 1px solid\n ${({ $showBorder }) =>\n $showBorder ? Colors.main.grantbiiOrange : Colors.neutral.grey4};\n`;\n\nconst QueryTextInput = () => {\n const { activeQuery, updateActiveQuery, queryText, updateQueryText } =\n useGrantMatchContext();\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === \"Enter\" && !event.repeat) {\n event.preventDefault();\n updateActiveQuery({ files: activeQuery.files, text: queryText });\n }\n };\n\n return (\n <BaseQueryTextInput\n value={queryText}\n onChange={(event) => updateQueryText(event.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Search grant or describe your project\"\n />\n );\n};\n\nconst BaseQueryTextInput = styled.input`\n width: 100%;\n margin-left: 16px;\n outline: none;\n border: none;\n\n background-color: ${Colors.neutral.grey4};\n text-overflow: ellipsis;\n`;\n\nconst BaseIconButton = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 38px;\n min-width: 38px;\n height: 38px;\n\n border-radius: 8px;\n`;\n\nconst ResetTextButton = () => {\n const { activeQuery, updateActiveQuery, updateQueryText } =\n useGrantMatchContext();\n\n const onClick = () => {\n updateQueryText(\"\");\n updateActiveQuery({ files: activeQuery.files, text: \"\" });\n };\n\n return (\n <BaseResetTextButton type=\"button\" onClick={onClick}>\n <Icons.XIcon size={20} color={Colors.neutral.grey1} />\n </BaseResetTextButton>\n );\n};\n\nconst BaseResetTextButton = styled(BaseIconButton)`\n background-color: ${Colors.neutral.grey4};\n border: 1px solid ${Colors.neutral.grey4};\n`;\n\nconst ResetTextButtonPlaceholder = styled.div`\n width: 40px;\n height: 40px;\n\n background-color: ${Colors.neutral.grey4};\n border-radius: 8px;\n`;\n\ntype TextSearchButtonProps = {\n textSearchCallback?: () => void;\n};\n\nconst TextSearchButton = ({ textSearchCallback }: TextSearchButtonProps) => {\n const { activeQuery, updateActiveQuery, queryText } = useGrantMatchContext();\n\n const onClickSearch = () => {\n if (textSearchCallback) {\n textSearchCallback();\n }\n\n updateActiveQuery({ files: activeQuery.files, text: queryText });\n };\n\n return (\n <BaseSearchButton type=\"button\" onClick={onClickSearch}>\n <Icons.MagnifyingGlassIcon size={20} color={Colors.base.white} />\n </BaseSearchButton>\n );\n};\n\nconst BaseSearchButton = styled(BaseIconButton)`\n background-color: ${Colors.main.grantbiiBlue};\n border: 1px solid ${Colors.main.grantbiiBlue};\n`;\n\nconst VerticalDivider = styled.div`\n height: 40px;\n border-left: 1px solid ${Colors.neutral.grey2};\n`;\n\ntype OpenModalButtonProps = {\n openModalCallback?: () => void;\n};\n\nconst OpenModalButton = ({ openModalCallback }: OpenModalButtonProps) => {\n const { activeQuery, openModal } = useGrantMatchContext();\n\n const onClickOpen = () => {\n if (openModalCallback) {\n openModalCallback();\n }\n\n openModal();\n };\n\n return (\n <BaseOpenModalButton\n onClick={onClickOpen}\n $hasActiveQueryFiles={activeQuery.files.length > 0}\n >\n <GrantMatchLogo\n src={grantMatchLogo}\n alt=\"Grant Match\"\n width={64}\n height={64}\n />\n <OpenModalButtonText>Get Personalized Grant Matches</OpenModalButtonText>\n </BaseOpenModalButton>\n );\n};\n\nconst BaseOpenModalButton = styled.button<{ $hasActiveQueryFiles: boolean }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n\n height: 38px;\n\n border: 1px solid ${Colors.main.grantbiiOrange};\n border-radius: 8px;\n\n ${({ $hasActiveQueryFiles }) =>\n $hasActiveQueryFiles\n ? css`\n background-color: ${Colors.main.grantbiiOrange};\n color: ${Colors.typography.whiteHigh};\n `\n : css`\n background-color: ${Colors.base.white};\n color: ${Colors.main.grantbiiOrange};\n `}\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 38px;\n min-width: 38px;\n padding: 0px;\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 238px;\n min-width: 238px;\n padding: 2px 12px;\n font-size: ${Typography.HELPER_FONT_SIZES.big};\n }\n`;\n\nconst GrantMatchLogo = styled(Image)`\n width: 18px;\n height: 18px;\n\n box-shadow: 0px 0px 3px 3px #ffe2b680;\n border-radius: 120px;\n`;\n\nconst OpenModalButtonText = styled.p`\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n display: none;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n display: inline;\n }\n`;\n"]}
1
+ {"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../../core/organisms/GrantMatch/SearchBar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAOjD,MAAM,SAAS,GAAG,CAAC,EACjB,kBAAkB,EAClB,iBAAiB,GACF,EAAE,EAAE;IACnB,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAE1D,OAAO,CACL,MAAC,aAAa,eACZ,MAAC,cAAc,mBAAc,WAAW,CAAC,IAAI,KAAK,EAAE,aAClD,KAAC,cAAc,KAAG,EAEjB,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,CAClB,KAAC,eAAe,KAAG,CACpB,CAAC,CAAC,CAAC,CACF,KAAC,0BAA0B,KAAG,CAC/B,IACc,EAEjB,KAAC,gBAAgB,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,EAC5D,KAAC,eAAe,KAAG,EACnB,KAAC,eAAe,IAAC,iBAAiB,EAAE,iBAAiB,GAAI,IAC3C,CAC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CAAC,cAAc;;;IAG5C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC7B,oBAAoB;IAClB,CAAC,CAAC,GAAG,CAAA;8BACmB,MAAM,CAAC,IAAI,CAAC,cAAc;mBACrC,MAAM,CAAC,UAAU,CAAC,SAAS;SACrC;IACH,CAAC,CAAC,GAAG,CAAA;8BACmB,MAAM,CAAC,IAAI,CAAC,KAAK;mBAC5B,MAAM,CAAC,IAAI,CAAC,cAAc;SACpC;;oBAEW,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;iBAItC,UAAU,CAAC,iBAAiB,CAAC,KAAK;;;qBAG9B,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;iBAIvC,UAAU,CAAC,iBAAiB,CAAC,KAAK;;CAElD,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;;;;;CAMnC,CAAC;AAEF,MAAM,mBAAmB,GAAG,MAAM,CAAC,CAAC,CAAA;;;;;;oBAMhB,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;qBAIlC,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;CAGvD,CAAC","sourcesContent":["import Image from \"next/image\";\nimport type { KeyboardEvent } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport grantMatchLogo from \"../../assets/logos/grant_match_logo.webp\";\nimport { Colors, Icons, Responsive, Typography } from \"../../foundations\";\nimport { useGrantMatchContext } from \"./context\";\n\ntype SearchBarProps = {\n textSearchCallback?: () => void;\n openModalCallback?: () => void;\n};\n\nconst SearchBar = ({\n textSearchCallback,\n openModalCallback,\n}: SearchBarProps) => {\n const { activeQuery, queryText } = useGrantMatchContext();\n\n return (\n <BaseSearchBar>\n <TextSearchArea $showBorder={activeQuery.text !== \"\"}>\n <QueryTextInput />\n\n {queryText !== \"\" ? (\n <ResetTextButton />\n ) : (\n <ResetTextButtonPlaceholder />\n )}\n </TextSearchArea>\n\n <TextSearchButton textSearchCallback={textSearchCallback} />\n <VerticalDivider />\n <OpenModalButton openModalCallback={openModalCallback} />\n </BaseSearchBar>\n );\n};\n\nexport default SearchBar;\n\nconst BaseSearchBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n width: 100%;\n\n color: ${Colors.typography.blackHigh};\n background-color: ${Colors.base.white};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 8px;\n padding: 0px;\n\n box-shadow: none;\n border-radius: 0px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 16px;\n padding: 12px 16px;\n\n box-shadow: 0px 0px 40px 0px #00000008;\n border-radius: 12px;\n }\n`;\n\nconst TextSearchArea = styled.div<{ $showBorder: boolean }>`\n display: flex;\n align-items: center;\n\n width: 100%;\n\n background-color: ${Colors.neutral.grey4};\n border-radius: 8px;\n\n border: 1px solid\n ${({ $showBorder }) =>\n $showBorder ? Colors.main.grantbiiOrange : Colors.neutral.grey4};\n`;\n\nconst QueryTextInput = () => {\n const { activeQuery, updateActiveQuery, queryText, updateQueryText } =\n useGrantMatchContext();\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === \"Enter\" && !event.repeat) {\n event.preventDefault();\n updateActiveQuery({ files: activeQuery.files, text: queryText });\n }\n };\n\n return (\n <BaseQueryTextInput\n value={queryText}\n onChange={(event) => updateQueryText(event.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Search grant or describe your project\"\n />\n );\n};\n\nconst BaseQueryTextInput = styled.input`\n width: 100%;\n margin-left: 16px;\n outline: none;\n border: none;\n\n background-color: ${Colors.neutral.grey4};\n text-overflow: ellipsis;\n`;\n\nconst IconButton = css`\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 38px;\n min-width: 38px;\n height: 38px;\n\n border-radius: 8px;\n`;\n\nconst ResetTextButton = () => {\n const { activeQuery, updateActiveQuery, updateQueryText } =\n useGrantMatchContext();\n\n const onClick = () => {\n updateQueryText(\"\");\n updateActiveQuery({ files: activeQuery.files, text: \"\" });\n };\n\n return (\n <BaseResetTextButton type=\"button\" onClick={onClick}>\n <Icons.XIcon size={20} color={Colors.neutral.grey1} />\n </BaseResetTextButton>\n );\n};\n\nconst BaseResetTextButton = styled.button`\n ${IconButton}\n\n background-color: ${Colors.neutral.grey4};\n border: 1px solid ${Colors.neutral.grey4};\n`;\n\nconst ResetTextButtonPlaceholder = styled.div`\n width: 40px;\n height: 40px;\n\n background-color: ${Colors.neutral.grey4};\n border-radius: 8px;\n`;\n\ntype TextSearchButtonProps = {\n textSearchCallback?: () => void;\n};\n\nconst TextSearchButton = ({ textSearchCallback }: TextSearchButtonProps) => {\n const { activeQuery, updateActiveQuery, queryText } = useGrantMatchContext();\n\n const onClickSearch = () => {\n if (textSearchCallback) {\n textSearchCallback();\n }\n\n updateActiveQuery({ files: activeQuery.files, text: queryText });\n };\n\n return (\n <BaseSearchButton type=\"button\" onClick={onClickSearch}>\n <Icons.MagnifyingGlassIcon size={20} color={Colors.base.white} />\n </BaseSearchButton>\n );\n};\n\nconst BaseSearchButton = styled.button`\n ${IconButton}\n\n background-color: ${Colors.main.grantbiiBlue};\n border: 1px solid ${Colors.main.grantbiiBlue};\n`;\n\nconst VerticalDivider = styled.div`\n height: 40px;\n border-left: 1px solid ${Colors.neutral.grey2};\n`;\n\ntype OpenModalButtonProps = {\n openModalCallback?: () => void;\n};\n\nconst OpenModalButton = ({ openModalCallback }: OpenModalButtonProps) => {\n const { activeQuery, openModal } = useGrantMatchContext();\n\n const onClickOpen = () => {\n if (openModalCallback) {\n openModalCallback();\n }\n\n openModal();\n };\n\n return (\n <BaseOpenModalButton\n onClick={onClickOpen}\n $hasActiveQueryFiles={activeQuery.files.length > 0}\n >\n <GrantMatchLogo\n src={grantMatchLogo}\n alt=\"Grant Match\"\n width={64}\n height={64}\n />\n <OpenModalButtonText>Get Personalized Grant Matches</OpenModalButtonText>\n </BaseOpenModalButton>\n );\n};\n\nconst BaseOpenModalButton = styled.button<{ $hasActiveQueryFiles: boolean }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n\n height: 38px;\n\n border: 1px solid ${Colors.main.grantbiiOrange};\n border-radius: 8px;\n\n ${({ $hasActiveQueryFiles }) =>\n $hasActiveQueryFiles\n ? css`\n background-color: ${Colors.main.grantbiiOrange};\n color: ${Colors.typography.whiteHigh};\n `\n : css`\n background-color: ${Colors.base.white};\n color: ${Colors.main.grantbiiOrange};\n `}\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 38px;\n min-width: 38px;\n padding: 0px;\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 238px;\n min-width: 238px;\n padding: 2px 12px;\n font-size: ${Typography.HELPER_FONT_SIZES.large};\n }\n`;\n\nconst GrantMatchLogo = styled(Image)`\n width: 18px;\n height: 18px;\n\n box-shadow: 0px 0px 3px 3px #ffe2b680;\n border-radius: 120px;\n`;\n\nconst OpenModalButtonText = styled.p`\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n display: none;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n display: inline;\n }\n`;\n"]}
@@ -61,7 +61,7 @@ const ErrorMessage = styled.p `
61
61
  }
62
62
 
63
63
  @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
64
- font-size: ${Typography.SUBHEADER_FONT_SIZES.big};
64
+ font-size: ${Typography.SUBHEADER_FONT_SIZES.large};
65
65
  }
66
66
  `;
67
67
  const ErrorDescription = styled.p `
@@ -72,7 +72,7 @@ const ErrorDescription = styled.p `
72
72
  }
73
73
 
74
74
  @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
75
- font-size: ${Typography.BODY_FONT_SIZES.big};
75
+ font-size: ${Typography.BODY_FONT_SIZES.large};
76
76
  }
77
77
  `;
78
78
  const SupportEmailLink = styled(Link) `
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingFailedSign.js","sourceRoot":"","sources":["../../../core/templates/LoadingFailedSign.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOhE,MAAM,iBAAiB,GAAG,CAAC,EACzB,YAAY,GAAG,wBAAwB,EACvC,aAAa,GACU,EAAE,EAAE,CAAC,CAC5B,MAAC,qBAAqB,eACpB,KAAC,kBAAkB,IACjB,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,YAAY,GACjB,EAEF,KAAC,iBAAiB,IAAC,YAAY,EAAE,YAAY,GAAI,EAEhD,aAAa,CAAC,CAAC,CAAC,CACf,KAAC,MAAM,IACL,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,aAAa,EACtB,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,EAClC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EACjC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,GAClC,CACH,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,IACqB,CACzB,CAAC;AAEF,eAAe,iBAAiB,CAAC;AAEjC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;sBAUlB,MAAM,CAAC,IAAI,CAAC,KAAK;;oBAEnB,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;;;;qBAOlC,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;wBAGhC,MAAM,CAAC,OAAO,CAAC,KAAK;;;CAG3C,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;oBACpB,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;;qBAKlC,UAAU,CAAC,iBAAiB,CAAC,MAAM;;;;CAIvD,CAAC;AAMF,MAAM,iBAAiB,GAAG,CAAC,EAAE,YAAY,EAA0B,EAAE,EAAE,CAAC,CACtE,MAAC,qBAAqB,eACpB,KAAC,YAAY,cAAE,YAAY,GAAgB,EAC3C,MAAC,gBAAgB,mDACiB,cAAM,oBAAe,GAAG,EACxD,KAAC,gBAAgB,IAAC,IAAI,EAAC,6BAA6B,qCAEjC,IACF,IACG,CACzB,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOvC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAA;;;oBAGT,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACtC,UAAU,CAAC,oBAAoB,CAAC,KAAK;;;qBAGjC,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACvC,UAAU,CAAC,oBAAoB,CAAC,GAAG;;CAEnD,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAA;;;oBAGb,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACtC,UAAU,CAAC,eAAe,CAAC,KAAK;;;qBAG5B,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACvC,UAAU,CAAC,eAAe,CAAC,GAAG;;CAE9C,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAEpC,CAAC","sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\nimport type { MouseEventHandler } from \"react\";\nimport styled from \"styled-components\";\nimport loadFailLogo from \"../assets/logos/load_fail_logo.webp\";\nimport { Button } from \"../atoms\";\nimport { Colors, Responsive, Typography } from \"../foundations\";\n\ntype LoadingFailedSignProps = {\n errorMessage?: string;\n onClickReload?: MouseEventHandler<HTMLButtonElement>;\n};\n\nconst LoadingFailedSign = ({\n errorMessage = \"Failed to load results\",\n onClickReload,\n}: LoadingFailedSignProps) => (\n <BaseLoadingFailedSign>\n <LoadingFailedImage\n src={loadFailLogo}\n width={693}\n height={641}\n alt={errorMessage}\n />\n\n <LoadingFailedText errorMessage={errorMessage} />\n\n {onClickReload ? (\n <Button\n label=\"Try Again\"\n onClick={onClickReload}\n backgroundColor={Colors.base.white}\n borderColor={Colors.neutral.grey3}\n color={Colors.typography.blackHigh}\n />\n ) : (\n <></>\n )}\n </BaseLoadingFailedSign>\n);\n\nexport default LoadingFailedSign;\n\nconst BaseLoadingFailedSign = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n width: 100%;\n height: 100%;\n padding: 24px;\n\n background-color: ${Colors.base.white};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 16px;\n\n border: none;\n border-radius: 0px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 24px;\n\n border: 1px solid ${Colors.neutral.grey3};\n border-radius: 12px;\n }\n`;\n\nconst LoadingFailedImage = styled(Image)`\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 151px;\n height: 140px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 173px;\n height: 160px;\n }\n`;\n\ntype LoadingFailedTextProps = {\n errorMessage: string;\n};\n\nconst LoadingFailedText = ({ errorMessage }: LoadingFailedTextProps) => (\n <BaseLoadingFailedText>\n <ErrorMessage>{errorMessage}</ErrorMessage>\n <ErrorDescription>\n Please try again in a moment or <br /> contact us at{\" \"}\n <SupportEmailLink href=\"mailto:support@grantbii.com\">\n support@grantbii.com\n </SupportEmailLink>\n </ErrorDescription>\n </BaseLoadingFailedText>\n);\n\nconst BaseLoadingFailedText = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n text-align: center;\n`;\n\nconst ErrorMessage = styled.p`\n font-weight: 700;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.SUBHEADER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.SUBHEADER_FONT_SIZES.big};\n }\n`;\n\nconst ErrorDescription = styled.p`\n font-weight: 400;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.big};\n }\n`;\n\nconst SupportEmailLink = styled(Link)`\n text-decoration: underline;\n`;\n"]}
1
+ {"version":3,"file":"LoadingFailedSign.js","sourceRoot":"","sources":["../../../core/templates/LoadingFailedSign.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOhE,MAAM,iBAAiB,GAAG,CAAC,EACzB,YAAY,GAAG,wBAAwB,EACvC,aAAa,GACU,EAAE,EAAE,CAAC,CAC5B,MAAC,qBAAqB,eACpB,KAAC,kBAAkB,IACjB,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,YAAY,GACjB,EAEF,KAAC,iBAAiB,IAAC,YAAY,EAAE,YAAY,GAAI,EAEhD,aAAa,CAAC,CAAC,CAAC,CACf,KAAC,MAAM,IACL,KAAK,E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MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAA;;;oBAGb,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACtC,UAAU,CAAC,eAAe,CAAC,KAAK;;;qBAG5B,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACvC,UAAU,CAAC,eAAe,CAAC,KAAK;;CAEhD,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAEpC,CAAC","sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\nimport type { MouseEventHandler } from \"react\";\nimport styled from \"styled-components\";\nimport loadFailLogo from \"../assets/logos/load_fail_logo.webp\";\nimport { Button } from \"../atoms\";\nimport { Colors, Responsive, Typography } from \"../foundations\";\n\ntype LoadingFailedSignProps = {\n errorMessage?: string;\n onClickReload?: MouseEventHandler<HTMLButtonElement>;\n};\n\nconst LoadingFailedSign = ({\n errorMessage = \"Failed to load results\",\n onClickReload,\n}: LoadingFailedSignProps) => (\n <BaseLoadingFailedSign>\n <LoadingFailedImage\n src={loadFailLogo}\n width={693}\n height={641}\n alt={errorMessage}\n />\n\n <LoadingFailedText errorMessage={errorMessage} />\n\n {onClickReload ? (\n <Button\n label=\"Try Again\"\n onClick={onClickReload}\n backgroundColor={Colors.base.white}\n borderColor={Colors.neutral.grey3}\n color={Colors.typography.blackHigh}\n />\n ) : (\n <></>\n )}\n </BaseLoadingFailedSign>\n);\n\nexport default LoadingFailedSign;\n\nconst BaseLoadingFailedSign = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n width: 100%;\n height: 100%;\n padding: 24px;\n\n background-color: ${Colors.base.white};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 16px;\n\n border: none;\n border-radius: 0px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n gap: 24px;\n\n border: 1px solid ${Colors.neutral.grey3};\n border-radius: 12px;\n }\n`;\n\nconst LoadingFailedImage = styled(Image)`\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 151px;\n height: 140px;\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n width: 173px;\n height: 160px;\n }\n`;\n\ntype LoadingFailedTextProps = {\n errorMessage: string;\n};\n\nconst LoadingFailedText = ({ errorMessage }: LoadingFailedTextProps) => (\n <BaseLoadingFailedText>\n <ErrorMessage>{errorMessage}</ErrorMessage>\n <ErrorDescription>\n Please try again in a moment or <br /> contact us at{\" \"}\n <SupportEmailLink href=\"mailto:support@grantbii.com\">\n support@grantbii.com\n </SupportEmailLink>\n </ErrorDescription>\n </BaseLoadingFailedText>\n);\n\nconst BaseLoadingFailedText = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n text-align: center;\n`;\n\nconst ErrorMessage = styled.p`\n font-weight: 700;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.SUBHEADER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.SUBHEADER_FONT_SIZES.large};\n }\n`;\n\nconst ErrorDescription = styled.p`\n font-weight: 400;\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.BODY_FONT_SIZES.large};\n }\n`;\n\nconst SupportEmailLink = styled(Link)`\n text-decoration: underline;\n`;\n"]}
@@ -34,7 +34,7 @@ const Tip = styled.p `
34
34
  }
35
35
 
36
36
  @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
37
- font-size: ${Typography.HELPER_FONT_SIZES.big};
37
+ font-size: ${Typography.HELPER_FONT_SIZES.large};
38
38
  }
39
39
  `;
40
40
  //# sourceMappingURL=PageLoader.js.map
@@ -1 +1 @@
1
- {"version":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C;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE3B,CAAC;AAEF,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAA;WACT,MAAM,CAAC,UAAU,CAAC,WAAW;;oBAEpB,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACtC,UAAU,CAAC,iBAAiB,CAAC,KAAK;;;qBAG9B,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACvC,UAAU,CAAC,iBAAiB,CAAC,GAAG;;CAEhD,CAAC","sourcesContent":["import { MoonLoader, PacmanLoader } from \"react-spinners\";\nimport type { LoaderSizeMarginProps } from \"react-spinners/helpers/props\";\nimport styled from \"styled-components\";\nimport { Colors, Responsive, Typography } from \"../foundations\";\n\ntype PageLoaderProps = {\n isPacman?: boolean;\n loadingText?: string;\n tip?: string;\n} & LoaderSizeMarginProps;\n\n/**\n * The animation to show when loading the whole page\n */\nconst PageLoader = ({\n loadingText,\n tip,\n isPacman = false,\n color = Colors.accent.blue1,\n size,\n ...restOfProps\n}: PageLoaderProps) => (\n <Background>\n {isPacman ? (\n <PacmanLoader color={color} size={size ? size : 20} {...restOfProps} />\n ) : (\n <MoonLoader color={color} size={size ? size : 32} {...restOfProps} />\n )}\n\n {loadingText || tip ? (\n <Text>\n {loadingText ? <LoadingText>{loadingText}</LoadingText> : <></>}\n {tip ? <Tip>{tip}</Tip> : <></>}\n </Text>\n ) : (\n <></>\n )}\n </Background>\n);\n\nexport default PageLoader;\n\nconst Background = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 20px;\n\n width: 100%;\n height: 100%;\n`;\n\nconst Text = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n`;\n\nconst LoadingText = styled.p`\n font-weight: 500;\n`;\n\nconst Tip = styled.p`\n color: ${Colors.typography.blackMedium};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.big};\n }\n`;\n"]}
1
+ {"version":3,"file":"PageLoader.js","sourceRoot":"","sources":["../../../core/templates/PageLoader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQhE;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,WAAW,EACX,GAAG,EACH,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAC3B,IAAI,EACJ,GAAG,WAAW,EACE,EAAE,EAAE,CAAC,CACrB,MAAC,UAAU,eACR,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAM,WAAW,GAAI,CACxE,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAM,WAAW,GAAI,CACtE,EAEA,WAAW,IAAI,GAAG,CAAC,CAAC,CAAC,CACpB,MAAC,IAAI,eACF,WAAW,CAAC,CAAC,CAAC,KAAC,WAAW,cAAE,WAAW,GAAe,CAAC,CAAC,CAAC,mBAAK,EAC9D,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,cAAE,GAAG,GAAO,CAAC,CAAC,CAAC,mBAAK,IAC1B,CACR,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,IACU,CACd,CAAC;AAEF,eAAe,UAAU,CAAC;AAE1B,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CAS5B,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKtB,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE3B,CAAC;AAEF,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAA;WACT,MAAM,CAAC,UAAU,CAAC,WAAW;;oBAEpB,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACtC,UAAU,CAAC,iBAAiB,CAAC,KAAK;;;qBAG9B,UAAU,CAAC,iBAAiB,CAAC,MAAM;iBACvC,UAAU,CAAC,iBAAiB,CAAC,KAAK;;CAElD,CAAC","sourcesContent":["import { MoonLoader, PacmanLoader } from \"react-spinners\";\nimport type { LoaderSizeMarginProps } from \"react-spinners/helpers/props\";\nimport styled from \"styled-components\";\nimport { Colors, Responsive, Typography } from \"../foundations\";\n\ntype PageLoaderProps = {\n isPacman?: boolean;\n loadingText?: string;\n tip?: string;\n} & LoaderSizeMarginProps;\n\n/**\n * The animation to show when loading the whole page\n */\nconst PageLoader = ({\n loadingText,\n tip,\n isPacman = false,\n color = Colors.accent.blue1,\n size,\n ...restOfProps\n}: PageLoaderProps) => (\n <Background>\n {isPacman ? (\n <PacmanLoader color={color} size={size ? size : 20} {...restOfProps} />\n ) : (\n <MoonLoader color={color} size={size ? size : 32} {...restOfProps} />\n )}\n\n {loadingText || tip ? (\n <Text>\n {loadingText ? <LoadingText>{loadingText}</LoadingText> : <></>}\n {tip ? <Tip>{tip}</Tip> : <></>}\n </Text>\n ) : (\n <></>\n )}\n </Background>\n);\n\nexport default PageLoader;\n\nconst Background = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 20px;\n\n width: 100%;\n height: 100%;\n`;\n\nconst Text = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n`;\n\nconst LoadingText = styled.p`\n font-weight: 500;\n`;\n\nconst Tip = styled.p`\n color: ${Colors.typography.blackMedium};\n\n @media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.small};\n }\n\n @media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {\n font-size: ${Typography.HELPER_FONT_SIZES.large};\n }\n`;\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@grantbii/design-system",
3
3
  "author": "Grantbii",
4
4
  "license": "UNLICENSED",
5
- "version": "1.8.1",
5
+ "version": "1.9.1",
6
6
  "description": "Grantbii's Design System",
7
7
  "homepage": "https://design.grantbii.com",
8
8
  "repository": {
@@ -20,10 +20,10 @@
20
20
  "build-storybook": "storybook build"
21
21
  },
22
22
  "dependencies": {
23
- "@grantbii/ui-core": "1.4.0",
23
+ "@grantbii/ui-core": "1.4.1",
24
24
  "@phosphor-icons/react": "2.1.10",
25
- "country-flag-icons": "1.5.21",
26
- "next": "16.0.1",
25
+ "country-flag-icons": "1.6.4",
26
+ "next": "16.0.3",
27
27
  "react": "19.2.0",
28
28
  "react-dom": "19.2.0",
29
29
  "react-dropzone": "14.3.8",
@@ -31,30 +31,30 @@
31
31
  "styled-components": "6.1.19"
32
32
  },
33
33
  "devDependencies": {
34
- "@chromatic-com/storybook": "4.1.2",
34
+ "@chromatic-com/storybook": "4.1.3",
35
35
  "@eslint/js": "9.39.1",
36
- "@next/eslint-plugin-next": "16.0.1",
37
- "@storybook/addon-a11y": "10.0.7",
38
- "@storybook/addon-docs": "10.0.7",
39
- "@storybook/addon-onboarding": "10.0.7",
40
- "@storybook/addon-vitest": "10.0.7",
41
- "@storybook/nextjs-vite": "10.0.7",
36
+ "@next/eslint-plugin-next": "16.0.3",
37
+ "@storybook/addon-a11y": "10.0.8",
38
+ "@storybook/addon-docs": "10.0.8",
39
+ "@storybook/addon-onboarding": "10.0.8",
40
+ "@storybook/addon-vitest": "10.0.8",
41
+ "@storybook/nextjs-vite": "10.0.8",
42
42
  "@types/node": "22.18.0",
43
- "@types/react": "19.2.3",
44
- "@types/react-dom": "19.2.2",
45
- "@vitest/browser": "4.0.8",
46
- "@vitest/browser-playwright": "4.0.8",
47
- "@vitest/coverage-v8": "4.0.8",
43
+ "@types/react": "19.2.6",
44
+ "@types/react-dom": "19.2.3",
45
+ "@vitest/browser": "4.0.13",
46
+ "@vitest/browser-playwright": "4.0.13",
47
+ "@vitest/coverage-v8": "4.0.13",
48
48
  "eslint": "9.39.1",
49
- "eslint-config-next": "16.0.1",
50
- "eslint-plugin-storybook": "10.0.7",
49
+ "eslint-config-next": "16.0.3",
50
+ "eslint-plugin-storybook": "10.0.8",
51
51
  "husky": "9.1.7",
52
- "lint-staged": "16.2.6",
52
+ "lint-staged": "16.2.7",
53
53
  "playwright": "1.56.1",
54
54
  "prettier": "3.6.2",
55
- "storybook": "10.0.7",
55
+ "storybook": "10.0.8",
56
56
  "typescript": "5.9.3",
57
- "vitest": "4.0.8"
57
+ "vitest": "4.0.13"
58
58
  },
59
59
  "lint-staged": {
60
60
  "**/*.{html,css,json,md,yaml}": [