@grantbii/design-system 1.9.3 → 1.9.4
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/core/atoms/shared.js +13 -13
- package/core/atoms/shared.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/core/atoms/shared.js
CHANGED
|
@@ -28,19 +28,6 @@ export const LabelledInput = styled.div `
|
|
|
28
28
|
gap: 8px;
|
|
29
29
|
`;
|
|
30
30
|
export const InputValidation = css `
|
|
31
|
-
${({ $hasError = false }) => $hasError
|
|
32
|
-
? css `
|
|
33
|
-
background-color: ${Colors.base.white};
|
|
34
|
-
border: 2px solid ${Colors.accent.red1};
|
|
35
|
-
outline: none;
|
|
36
|
-
|
|
37
|
-
&:focus {
|
|
38
|
-
border: 2px solid ${Colors.accent.red1};
|
|
39
|
-
outline: 1px solid ${Colors.accent.red1};
|
|
40
|
-
}
|
|
41
|
-
`
|
|
42
|
-
: ""}
|
|
43
|
-
|
|
44
31
|
&:disabled {
|
|
45
32
|
background-color: ${Colors.neutral.grey4};
|
|
46
33
|
border: 1px solid ${Colors.neutral.grey3};
|
|
@@ -70,6 +57,19 @@ export const InputValidation = css `
|
|
|
70
57
|
border: 1px solid ${Colors.accent.red1};
|
|
71
58
|
outline: 1px solid ${Colors.accent.red1};
|
|
72
59
|
}
|
|
60
|
+
|
|
61
|
+
${({ $hasError = false }) => $hasError
|
|
62
|
+
? css `
|
|
63
|
+
background-color: ${Colors.base.white};
|
|
64
|
+
border: 2px solid ${Colors.accent.red1};
|
|
65
|
+
outline: none;
|
|
66
|
+
|
|
67
|
+
&:focus {
|
|
68
|
+
border: 2px solid ${Colors.accent.red1};
|
|
69
|
+
outline: 1px solid ${Colors.accent.red1};
|
|
70
|
+
}
|
|
71
|
+
`
|
|
72
|
+
: ""}
|
|
73
73
|
`;
|
|
74
74
|
export const FILE_TYPE_ICON_MAP = {
|
|
75
75
|
"application/pdf": Icons.FilePdfIcon,
|
package/core/atoms/shared.js.map
CHANGED
|
@@ -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,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM;;;;;;;;qBAQrB,CAAC,EAAE,UAAU,GAAG,KAAK,EAAE,EAAE,EAAE,CAC5C,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM;;WAE1B,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE,CAAC,MAAM;sBACzC,CAAC,EACnB,UAAU,GAAG,KAAK,EAClB,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,GAC5C,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,gBAAgB,CAAC;;sBAEjC,CAAC,EAAE,YAAY,GAAG,aAAa,EAAE,EAAE,EAAE,CAAC,YAAY;;CAEvE,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAItC,CAAC;AAMF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAsB
|
|
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,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EAAE,EAAE,EAAE,CAC1B,SAAS;IACP,CAAC,CAAC,GAAG,CAAA;8BACmB,MAAM,CAAC,IAAI,CAAC,KAAK;8BACjB,MAAM,CAAC,MAAM,CAAC,IAAI;;;;gCAIhB,MAAM,CAAC,MAAM,CAAC,IAAI;iCACjB,MAAM,CAAC,MAAM,CAAC,IAAI;;SAE1C;IACH,CAAC,CAAC,EAAE;CACT,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 type InputValidationProps = {\n $hasError?: boolean;\n};\n\nexport const InputValidation = css<InputValidationProps>`\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 ${({ $hasError = false }) =>\n $hasError\n ? css`\n background-color: ${Colors.base.white};\n border: 2px solid ${Colors.accent.red1};\n outline: none;\n\n &:focus {\n border: 2px solid ${Colors.accent.red1};\n outline: 1px solid ${Colors.accent.red1};\n }\n `\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"]}
|
package/package.json
CHANGED