@grantbii/design-system 1.9.0 → 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.
- package/core/foundations/responsive.d.ts +0 -2
- package/core/foundations/responsive.js +0 -19
- package/core/foundations/responsive.js.map +1 -1
- package/core/integrations/fragments.d.ts +7 -0
- package/core/integrations/fragments.js +67 -0
- package/core/integrations/fragments.js.map +1 -0
- package/core/integrations/index.d.ts +2 -1
- package/core/integrations/index.js +2 -1
- package/core/integrations/index.js.map +1 -1
- package/core/integrations/{StyledComponentsRegistry.js → registry.js} +1 -1
- package/core/integrations/registry.js.map +1 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/core/integrations/StyledComponentsRegistry.js.map +0 -1
- /package/core/integrations/{StyledComponentsRegistry.d.ts → registry.d.ts} +0 -0
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import { css } from "styled-components";
|
|
2
1
|
export const WIDTH_BREAKPOINTS = {
|
|
3
2
|
laptop: "1024px",
|
|
4
3
|
};
|
|
5
|
-
export const SmallScreenOnly = css `
|
|
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 LargeScreenOnly = css `
|
|
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.
|
|
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"]}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../core/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,
|
|
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=
|
|
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"]}
|
package/package.json
CHANGED