@pushwoosh/kit-typography 1.5.2 → 1.7.0
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/code/code.styles.js +2 -2
- package/footnote/footnote.styles.js +2 -2
- package/global-styles/global-styles.component.js +1 -1
- package/h1/h1.styles.js +2 -2
- package/h2/h2.styles.js +2 -2
- package/h3/h3.styles.js +2 -2
- package/h4/h4.styles.js +2 -2
- package/h5/h5.styles.js +2 -2
- package/index.d.ts +2 -0
- package/index.js +2 -1
- package/map.d.ts +3 -0
- package/map.js +12 -0
- package/package.json +1 -1
- package/paragraph/paragraph.styles.js +2 -2
- package/text/Text.d.ts +5 -0
- package/text/Text.js +10 -0
package/code/code.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const CodeBox = styled.div.withConfig({
|
|
4
4
|
displayName: "CodeBox",
|
|
5
5
|
componentId: "sc-15hd43f-0"
|
|
6
|
-
})(["
|
|
6
|
+
})(["", ""], variants.code);
|
|
7
7
|
CodeBox.displayName = 'CodeBox';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const FootnoteBox = styled.div.withConfig({
|
|
4
4
|
displayName: "FootnoteBox",
|
|
5
5
|
componentId: "sc-1yebxfg-0"
|
|
6
|
-
})(["
|
|
6
|
+
})(["", ""], variants.footnote);
|
|
7
7
|
FootnoteBox.displayName = 'FootnoteBox';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createGlobalStyle } from 'styled-components';
|
|
2
2
|
import { Color, FontFamily, FontSize, FontWeight, LineHeight } from '@pushwoosh/kit-constants';
|
|
3
|
-
export const GlobalStyles = createGlobalStyle(["*,*::before,*::after{box-sizing:border-box;}body{color:", ";font-family:", ";font-size:", ";font-weight:", ";line-height:", ";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
|
|
3
|
+
export const GlobalStyles = createGlobalStyle(["*,*::before,*::after{box-sizing:border-box;}body{color:", ";font-family:", ";font-size:", ";font-weight:", ";line-height:", ";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}a{color:", ";&:hover{color:", ";}}button,a{&:focus{outline:none;}}"], Color.MAIN, FontFamily.MAIN, FontSize.REGULAR, FontWeight.REGULAR, LineHeight.REGULAR, Color.PRIMARY, Color.PRIMARY_HOVER);
|
|
4
4
|
GlobalStyles.displayName = 'GlobalStyles';
|
package/h1/h1.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const H1Box = styled.h1.withConfig({
|
|
4
4
|
displayName: "H1Box",
|
|
5
5
|
componentId: "sc-nenzzw-0"
|
|
6
|
-
})(["margin:0;
|
|
6
|
+
})(["margin:0;", ""], variants.h1);
|
|
7
7
|
H1Box.displayName = 'H1Box';
|
package/h2/h2.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const H2Box = styled.h2.withConfig({
|
|
4
4
|
displayName: "H2Box",
|
|
5
5
|
componentId: "sc-ev7pmn-0"
|
|
6
|
-
})(["margin:0;
|
|
6
|
+
})(["margin:0;", ""], variants.h2);
|
|
7
7
|
H2Box.displayName = 'H2Box';
|
package/h3/h3.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const H3Box = styled.h3.withConfig({
|
|
4
4
|
displayName: "H3Box",
|
|
5
5
|
componentId: "sc-mhts3r-0"
|
|
6
|
-
})(["margin:0;
|
|
6
|
+
})(["margin:0;", ""], variants.h3);
|
|
7
7
|
H3Box.displayName = 'H3Box';
|
package/h4/h4.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const H4Box = styled.h4.withConfig({
|
|
4
4
|
displayName: "H4Box",
|
|
5
5
|
componentId: "sc-1178dfn-0"
|
|
6
|
-
})(["margin:0;
|
|
6
|
+
})(["margin:0;", ""], variants.h4);
|
|
7
7
|
H4Box.displayName = 'H4Box';
|
package/h5/h5.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const H5Box = styled.h5.withConfig({
|
|
4
4
|
displayName: "H5Box",
|
|
5
5
|
componentId: "sc-1nc3vby-0"
|
|
6
|
-
})(["margin:0;
|
|
6
|
+
})(["margin:0;", " text-transform:uppercase;"], variants.h5);
|
|
7
7
|
H5Box.displayName = 'H5Box';
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/map.d.ts
ADDED
package/map.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { FontFamily, FontSize, LineHeight, FontWeight } from '@pushwoosh/kit-constants';
|
|
3
|
+
export const variants = {
|
|
4
|
+
standard: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.REGULAR, FontWeight.REGULAR, LineHeight.REGULAR),
|
|
5
|
+
footnote: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.SMALL, FontWeight.REGULAR, LineHeight.SMALL),
|
|
6
|
+
h1: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.HEADING1, FontWeight.BOLD, LineHeight.HEADING1),
|
|
7
|
+
h2: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.HEADING2, FontWeight.BOLD, LineHeight.HEADING2),
|
|
8
|
+
h3: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.HEADING3, FontWeight.BOLD, LineHeight.HEADING3),
|
|
9
|
+
h4: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.HEADING4, FontWeight.BOLD, LineHeight.HEADING4),
|
|
10
|
+
h5: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MAIN, FontSize.HEADING5, FontWeight.MEDIUM, LineHeight.HEADING5),
|
|
11
|
+
code: css(["font-family:", ";font-size:", ";font-weight:", ";line-height:", ";"], FontFamily.MONO, FontSize.REGULAR, FontWeight.REGULAR, LineHeight.REGULAR)
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { variants } from '../map';
|
|
3
3
|
export const ParagraphBox = styled.p.withConfig({
|
|
4
4
|
displayName: "ParagraphBox",
|
|
5
5
|
componentId: "sc-1o1vp14-0"
|
|
6
|
-
})(["margin:0;
|
|
6
|
+
})(["margin:0;", " & + &{margin:0.5em 0 0;}"], variants.standard);
|
|
7
7
|
ParagraphBox.displayName = 'ParagraphBox';
|
package/text/Text.d.ts
ADDED
package/text/Text.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { variants } from '../map';
|
|
3
|
+
export const Text = styled.span.withConfig({
|
|
4
|
+
displayName: "Text",
|
|
5
|
+
componentId: "sc-s3ssy9-0"
|
|
6
|
+
})(["", " ", "}"], ({
|
|
7
|
+
$color
|
|
8
|
+
}) => $color && `color: ${$color};`, ({
|
|
9
|
+
$variant = 'standard'
|
|
10
|
+
}) => variants[$variant]);
|