@redocly/theme 0.1.20 → 0.1.23
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/Button/Button.d.ts +4 -3
- package/Button/Button.js +29 -2
- package/Footer/Footer.js +4 -1
- package/JsonViewer/JsonViewer.js +1 -2
- package/JsonViewer/index.d.ts +0 -1
- package/JsonViewer/index.js +0 -1
- package/Markdown/Admonition.js +1 -1
- package/Markdown/CodeSample/CodeSample.js +15 -5
- package/Markdown/CodeSample/index.d.ts +0 -1
- package/Markdown/CodeSample/index.js +0 -1
- package/Navbar/Navbar.d.ts +1 -1
- package/Navbar/Navbar.js +10 -1
- package/PageNavigation/NextPageLink.js +8 -5
- package/PageNavigation/PreviousPageLink.js +8 -5
- package/Search/SidebarSearch.d.ts +2 -0
- package/Search/SidebarSearch.js +15 -0
- package/Sidebar/MenuGroup.js +2 -2
- package/Sidebar/SidebarLayout.d.ts +1 -1
- package/Sidebar/SidebarLayout.js +8 -0
- package/TableOfContent/TableOfContent.js +8 -1
- package/Typography/CompactTypography.d.ts +11 -0
- package/Typography/CompactTypography.js +18 -0
- package/Typography/Emphasis.d.ts +3 -0
- package/Typography/Emphasis.js +15 -0
- package/Typography/H1.d.ts +3 -0
- package/Typography/H1.js +16 -0
- package/Typography/H2.d.ts +3 -0
- package/Typography/H2.js +16 -0
- package/Typography/H3.d.ts +3 -0
- package/Typography/H3.js +16 -0
- package/Typography/SectionHeader.d.ts +1 -0
- package/Typography/SectionHeader.js +13 -0
- package/Typography/Typography.d.ts +8 -0
- package/Typography/Typography.js +22 -0
- package/Typography/index.d.ts +7 -0
- package/{Headings → Typography}/index.js +7 -1
- package/{ui → icons/AlertIcon}/AlertIcon.d.ts +2 -2
- package/{ui → icons/AlertIcon}/AlertIcon.js +1 -1
- package/icons/AlertIcon/index.d.ts +2 -0
- package/icons/AlertIcon/index.js +5 -0
- package/icons/ArrowIcon/ArrowIcon.d.ts +7 -0
- package/{ui/Arrow.js → icons/ArrowIcon/ArrowIcon.js} +3 -3
- package/icons/ArrowIcon/index.d.ts +2 -0
- package/icons/ArrowIcon/index.js +5 -0
- package/icons/index.d.ts +2 -0
- package/icons/index.js +2 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/mocks/constants/index.d.ts +2 -0
- package/mocks/constants/index.js +5 -0
- package/mocks/hooks/index.d.ts +6 -0
- package/mocks/hooks/index.js +16 -0
- package/package.json +1 -1
- package/settings.yaml +15 -0
- package/src/Button/Button.tsx +21 -1
- package/src/Footer/Footer.tsx +5 -1
- package/src/JsonViewer/JsonViewer.tsx +106 -2
- package/src/JsonViewer/index.ts +0 -1
- package/src/Markdown/Admonition.tsx +1 -1
- package/src/Markdown/CodeSample/CodeSample.tsx +160 -6
- package/src/Markdown/CodeSample/index.ts +0 -1
- package/src/Navbar/Navbar.tsx +13 -2
- package/src/PageNavigation/NextPageLink.tsx +9 -3
- package/src/PageNavigation/PreviousPageLink.tsx +9 -3
- package/src/Search/SidebarSearch.tsx +13 -0
- package/src/Sidebar/MenuGroup.tsx +2 -2
- package/src/Sidebar/SidebarLayout.tsx +10 -1
- package/src/TableOfContent/TableOfContent.tsx +7 -1
- package/src/Typography/CompactTypography.ts +9 -0
- package/src/Typography/Emphasis.ts +7 -0
- package/src/Typography/H1.ts +12 -0
- package/src/Typography/H2.ts +12 -0
- package/src/Typography/H3.ts +11 -0
- package/src/Typography/SectionHeader.ts +11 -0
- package/src/Typography/Typography.ts +21 -0
- package/src/Typography/index.ts +7 -0
- package/src/{ui → icons/AlertIcon}/AlertIcon.tsx +3 -3
- package/src/icons/AlertIcon/index.ts +2 -0
- package/src/{ui/Arrow.tsx → icons/ArrowIcon/ArrowIcon.tsx} +5 -5
- package/src/icons/ArrowIcon/index.ts +2 -0
- package/src/icons/index.ts +2 -0
- package/src/index.ts +1 -1
- package/src/mocks/constants/index.ts +2 -0
- package/src/mocks/hooks/index.ts +17 -0
- package/src/ui/Jumbotron.tsx +1 -1
- package/src/ui/index.tsx +0 -4
- package/ui/Jumbotron.js +1 -1
- package/ui/index.d.ts +0 -4
- package/ui/index.js +0 -4
- package/Headings/Headings.d.ts +0 -3
- package/Headings/Headings.js +0 -16
- package/Headings/index.d.ts +0 -1
- package/JsonViewer/styled.d.ts +0 -1
- package/JsonViewer/styled.js +0 -10
- package/Markdown/CodeSample/styled.d.ts +0 -4
- package/Markdown/CodeSample/styled.js +0 -85
- package/src/Headings/Headings.ts +0 -23
- package/src/Headings/index.ts +0 -1
- package/src/JsonViewer/styled.ts +0 -110
- package/src/Markdown/CodeSample/styled.ts +0 -209
- package/src/ui/Button.tsx +0 -19
- package/src/ui/Typography.tsx +0 -90
- package/ui/Arrow.d.ts +0 -7
- package/ui/Button.d.ts +0 -7
- package/ui/Button.js +0 -30
- package/ui/Typography.d.ts +0 -41
- package/ui/Typography.js +0 -59
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
export const CodeSampleButtonContainer = styled.div`
|
|
4
|
-
position: absolute;
|
|
5
|
-
top: 12px;
|
|
6
|
-
right: 5px;
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
export const CopyCodeButton = styled.div`
|
|
10
|
-
padding: 0 5px;
|
|
11
|
-
border-radius: 4px;
|
|
12
|
-
display: none;
|
|
13
|
-
&:hover {
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const DoneIndicator = styled.div`
|
|
19
|
-
padding: 0 5px;
|
|
20
|
-
border-radius: 4px;
|
|
21
|
-
cursor: default;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
// const lightStyleTokens = css`
|
|
25
|
-
// .token.comment,
|
|
26
|
-
// .token.prolog,
|
|
27
|
-
// .token.doctype,
|
|
28
|
-
// .token.cdata {
|
|
29
|
-
// color: #999988;
|
|
30
|
-
// font-style: italic;
|
|
31
|
-
// }
|
|
32
|
-
// .token.namespace {
|
|
33
|
-
// opacity: 0.7;
|
|
34
|
-
// }
|
|
35
|
-
// .token.string,
|
|
36
|
-
// .token.attr-value {
|
|
37
|
-
// color: #e3116c;
|
|
38
|
-
// }
|
|
39
|
-
// .token.punctuation,
|
|
40
|
-
// .token.operator {
|
|
41
|
-
// color: #393a34; /* no highlight */
|
|
42
|
-
// }
|
|
43
|
-
// .token.entity,
|
|
44
|
-
// .token.url,
|
|
45
|
-
// .token.symbol,
|
|
46
|
-
// .token.number,
|
|
47
|
-
// .token.boolean,
|
|
48
|
-
// .token.variable,
|
|
49
|
-
// .token.constant,
|
|
50
|
-
// .token.property,
|
|
51
|
-
// .token.regex,
|
|
52
|
-
// .token.inserted {
|
|
53
|
-
// color: #36acaa;
|
|
54
|
-
// }
|
|
55
|
-
// .token.atrule,
|
|
56
|
-
// .token.keyword,
|
|
57
|
-
// .token.attr-name,
|
|
58
|
-
// .language-autohotkey .token.selector {
|
|
59
|
-
// color: #00a4db;
|
|
60
|
-
// }
|
|
61
|
-
// .token.function,
|
|
62
|
-
// .token.deleted,
|
|
63
|
-
// .language-autohotkey .token.tag {
|
|
64
|
-
// color: #9a050f;
|
|
65
|
-
// }
|
|
66
|
-
// .token.tag,
|
|
67
|
-
// .token.selector,
|
|
68
|
-
// .language-autohotkey .token.keyword {
|
|
69
|
-
// color: #00009f;
|
|
70
|
-
// }
|
|
71
|
-
// `;
|
|
72
|
-
|
|
73
|
-
const darkStyleTokens = css`
|
|
74
|
-
.token.comment,
|
|
75
|
-
.token.prolog,
|
|
76
|
-
.token.doctype,
|
|
77
|
-
.token.cdata {
|
|
78
|
-
color: hsl(30, 20%, 50%);
|
|
79
|
-
}
|
|
80
|
-
.token.property,
|
|
81
|
-
.token.tag,
|
|
82
|
-
.token.number,
|
|
83
|
-
.token.constant,
|
|
84
|
-
.token.symbol {
|
|
85
|
-
color: #62bff9;
|
|
86
|
-
}
|
|
87
|
-
.token.boolean {
|
|
88
|
-
color: firebrick;
|
|
89
|
-
}
|
|
90
|
-
.token.selector,
|
|
91
|
-
.token.attr-name,
|
|
92
|
-
.token.string,
|
|
93
|
-
.token.char,
|
|
94
|
-
.token.builtin,
|
|
95
|
-
.token.inserted {
|
|
96
|
-
color: #a0fbaa;
|
|
97
|
-
& + a,
|
|
98
|
-
& + a:visited {
|
|
99
|
-
color: #4ed2ba;
|
|
100
|
-
text-decoration: underline;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
.token.operator,
|
|
104
|
-
.token.entity,
|
|
105
|
-
.token.url,
|
|
106
|
-
.token.variable {
|
|
107
|
-
color: hsl(40, 90%, 60%);
|
|
108
|
-
}
|
|
109
|
-
.token.atrule,
|
|
110
|
-
.token.attr-value,
|
|
111
|
-
.token.keyword {
|
|
112
|
-
color: hsl(350, 40%, 70%);
|
|
113
|
-
}
|
|
114
|
-
.token.regex,
|
|
115
|
-
.token.important {
|
|
116
|
-
color: #e90;
|
|
117
|
-
}
|
|
118
|
-
.token.deleted {
|
|
119
|
-
color: red;
|
|
120
|
-
}
|
|
121
|
-
`;
|
|
122
|
-
|
|
123
|
-
export const Wrapper = styled.div`
|
|
124
|
-
overflow: auto;
|
|
125
|
-
border-radius: 4px;
|
|
126
|
-
position: relative;
|
|
127
|
-
|
|
128
|
-
${CopyCodeButton},
|
|
129
|
-
${DoneIndicator} {
|
|
130
|
-
color: rgba(255, 255, 255, 0.15);
|
|
131
|
-
}
|
|
132
|
-
${CopyCodeButton}:hover {
|
|
133
|
-
color: #fff;
|
|
134
|
-
background-color: rgba(255, 255, 255, 0.15);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&:hover {
|
|
138
|
-
${CodeSampleButtonContainer} ${CopyCodeButton} {
|
|
139
|
-
display: block;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
pre {
|
|
143
|
-
white-space: var(--code-wrap);
|
|
144
|
-
color: white;
|
|
145
|
-
padding: 12px 14px 15px 14px;
|
|
146
|
-
overflow-x: auto;
|
|
147
|
-
line-height: normal;
|
|
148
|
-
border-radius: 4px;
|
|
149
|
-
font-family: var(--code-font-family);
|
|
150
|
-
background-color: var(--code-block-preformatted-background-color);
|
|
151
|
-
code {
|
|
152
|
-
background-color: transparent;
|
|
153
|
-
border: 0;
|
|
154
|
-
padding: 0;
|
|
155
|
-
color: white;
|
|
156
|
-
&:before,
|
|
157
|
-
&:after {
|
|
158
|
-
content: none;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
pre[class*='language-'] {
|
|
163
|
-
padding: 1em;
|
|
164
|
-
margin: 0.5em 0;
|
|
165
|
-
overflow: auto;
|
|
166
|
-
border: 0;
|
|
167
|
-
border-radius: var(--global-border-radius);
|
|
168
|
-
}
|
|
169
|
-
code[class='language-text'] {
|
|
170
|
-
line-height: 1.2em;
|
|
171
|
-
display: inline-flex;
|
|
172
|
-
white-space: pre-wrap;
|
|
173
|
-
overflow-wrap: anywhere;
|
|
174
|
-
}
|
|
175
|
-
code[class*='language-'],
|
|
176
|
-
pre[class*='language-'] {
|
|
177
|
-
text-align: left;
|
|
178
|
-
white-space: pre;
|
|
179
|
-
word-spacing: normal;
|
|
180
|
-
word-break: normal;
|
|
181
|
-
word-wrap: normal;
|
|
182
|
-
line-height: 1.5;
|
|
183
|
-
-moz-tab-size: 4;
|
|
184
|
-
-o-tab-size: 4;
|
|
185
|
-
tab-size: 4;
|
|
186
|
-
-webkit-hyphens: none;
|
|
187
|
-
-moz-hyphens: none;
|
|
188
|
-
-ms-hyphens: none;
|
|
189
|
-
hyphens: none;
|
|
190
|
-
.token.important,
|
|
191
|
-
.token.bold {
|
|
192
|
-
font-weight: bold;
|
|
193
|
-
}
|
|
194
|
-
.token.italic {
|
|
195
|
-
font-style: italic;
|
|
196
|
-
}
|
|
197
|
-
.token.entity {
|
|
198
|
-
cursor: help;
|
|
199
|
-
}
|
|
200
|
-
.token.punctuation {
|
|
201
|
-
opacity: 0.7;
|
|
202
|
-
}
|
|
203
|
-
.namespace {
|
|
204
|
-
opacity: 0.7;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
${darkStyleTokens};
|
|
208
|
-
}
|
|
209
|
-
`;
|
package/src/ui/Button.tsx
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { LinkProps } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
import { Button as RefDocsButton, ButtonProps } from '@theme/Button';
|
|
5
|
-
import { Link } from '@portal/Link';
|
|
6
|
-
|
|
7
|
-
const StyledButtonAsLink = RefDocsButton.withComponent(Link);
|
|
8
|
-
|
|
9
|
-
export function Button(
|
|
10
|
-
props: ButtonProps & Partial<LinkProps<never>> & { ref?: any; external?: boolean },
|
|
11
|
-
): JSX.Element {
|
|
12
|
-
if (props.to) {
|
|
13
|
-
return <StyledButtonAsLink {...props} role="button" data-component-name="ui/Button" />;
|
|
14
|
-
} else {
|
|
15
|
-
return (
|
|
16
|
-
<RefDocsButton {...(props as ButtonProps)} role="button" data-component-name="ui/Button" />
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src/ui/Typography.tsx
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { color, typography as typographySystem, ColorProps, TypographyProps } from 'styled-system';
|
|
3
|
-
|
|
4
|
-
import { typography } from '@theme/utils';
|
|
5
|
-
|
|
6
|
-
type HeadingProps = TypographyProps &
|
|
7
|
-
ColorProps & {
|
|
8
|
-
mt?: string;
|
|
9
|
-
mb?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Emphasis = styled.strong.attrs(() => ({
|
|
13
|
-
'data-component-name': 'ui/Typography/Emphasis',
|
|
14
|
-
}))`
|
|
15
|
-
font-weight: var(--font-weight-bold);
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const H1 = styled.h1.attrs(() => ({
|
|
19
|
-
'data-component-name': 'ui/Typography/H1',
|
|
20
|
-
}))<HeadingProps>`
|
|
21
|
-
${typography('h1', 'h')};
|
|
22
|
-
margin: 1.35em 0 0.9em;
|
|
23
|
-
&& {
|
|
24
|
-
${({ mt }) => mt && `margin-top: ${mt};`}
|
|
25
|
-
${({ mb }) => mb && `margin-bottom: ${mb};`}
|
|
26
|
-
${color}
|
|
27
|
-
${typographySystem}
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
export const H2 = styled.h2.attrs(() => ({
|
|
32
|
-
'data-component-name': 'ui/Typography/H2',
|
|
33
|
-
}))<HeadingProps>`
|
|
34
|
-
${typography('h2', 'h')};
|
|
35
|
-
margin: 1.25em 0 0.8em;
|
|
36
|
-
&& {
|
|
37
|
-
${({ mt }) => mt && `margin-top: ${mt};`}
|
|
38
|
-
${({ mb }) => mb && `margin-bottom: ${mb};`}
|
|
39
|
-
${color}
|
|
40
|
-
${typographySystem}
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
export const H3 = styled.h3.attrs(() => ({
|
|
45
|
-
'data-component-name': 'ui/Typography/H3',
|
|
46
|
-
}))<HeadingProps>`
|
|
47
|
-
${typography('h3', 'h')};
|
|
48
|
-
margin: 1.25em 0 0.8em;
|
|
49
|
-
&& {
|
|
50
|
-
${({ mt }) => mt && `margin-top: ${mt};`}
|
|
51
|
-
${({ mb }) => mb && `margin-bottom: ${mb};`}
|
|
52
|
-
${color}
|
|
53
|
-
${typographySystem}
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
export const SectionHeader = styled.h2`
|
|
58
|
-
color: var(--h-color);
|
|
59
|
-
font-size: 1.75em;
|
|
60
|
-
font-weight: var(--font-weight-regular);
|
|
61
|
-
text-align: center;
|
|
62
|
-
margin: 2.65em 0;
|
|
63
|
-
padding: 0 20px;
|
|
64
|
-
font-family: var(--h-font-family);
|
|
65
|
-
`;
|
|
66
|
-
|
|
67
|
-
export const Typography = styled.p.attrs(() => ({
|
|
68
|
-
'data-component-name': 'ui/Typography/Typography',
|
|
69
|
-
}))<
|
|
70
|
-
TypographyProps & {
|
|
71
|
-
color?: string;
|
|
72
|
-
mt?: string;
|
|
73
|
-
mb?: string;
|
|
74
|
-
}
|
|
75
|
-
>`
|
|
76
|
-
font-size: var(--font-size-base);
|
|
77
|
-
font-family: var(--font-family-base);
|
|
78
|
-
line-height: var(--line-height-base);
|
|
79
|
-
color: var(--color-content);
|
|
80
|
-
${color};
|
|
81
|
-
margin-top: ${({ mt }) => mt || '1em'};
|
|
82
|
-
margin-bottom: ${({ mb }) => mb || '1em'};
|
|
83
|
-
${typographySystem}
|
|
84
|
-
`;
|
|
85
|
-
|
|
86
|
-
export const CompactTypography = styled(Typography).attrs(() => ({
|
|
87
|
-
mt: '0em',
|
|
88
|
-
mb: '0em',
|
|
89
|
-
'data-component-name': 'ui/Typography/CompactTypography',
|
|
90
|
-
}))``;
|
package/ui/Arrow.d.ts
DELETED
package/ui/Button.d.ts
DELETED
package/ui/Button.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Button = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var Button_1 = require("../Button");
|
|
20
|
-
var Link_1 = require("../mocks/Link");
|
|
21
|
-
var StyledButtonAsLink = Button_1.Button.withComponent(Link_1.Link);
|
|
22
|
-
function Button(props) {
|
|
23
|
-
if (props.to) {
|
|
24
|
-
return react_1.default.createElement(StyledButtonAsLink, __assign({}, props, { role: "button", "data-component-name": "ui/Button" }));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return (react_1.default.createElement(Button_1.Button, __assign({}, props, { role: "button", "data-component-name": "ui/Button" })));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.Button = Button;
|
package/ui/Typography.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ColorProps, TypographyProps } from 'styled-system';
|
|
2
|
-
export declare const Emphasis: import("styled-components").StyledComponent<"strong", any, {
|
|
3
|
-
'data-component-name': string;
|
|
4
|
-
}, "data-component-name">;
|
|
5
|
-
export declare const H1: import("styled-components").StyledComponent<"h1", any, {
|
|
6
|
-
'data-component-name': string;
|
|
7
|
-
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
8
|
-
mt?: string | undefined;
|
|
9
|
-
mb?: string | undefined;
|
|
10
|
-
}, "data-component-name">;
|
|
11
|
-
export declare const H2: import("styled-components").StyledComponent<"h2", any, {
|
|
12
|
-
'data-component-name': string;
|
|
13
|
-
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
14
|
-
mt?: string | undefined;
|
|
15
|
-
mb?: string | undefined;
|
|
16
|
-
}, "data-component-name">;
|
|
17
|
-
export declare const H3: import("styled-components").StyledComponent<"h3", any, {
|
|
18
|
-
'data-component-name': string;
|
|
19
|
-
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
20
|
-
mt?: string | undefined;
|
|
21
|
-
mb?: string | undefined;
|
|
22
|
-
}, "data-component-name">;
|
|
23
|
-
export declare const SectionHeader: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
24
|
-
export declare const Typography: import("styled-components").StyledComponent<"p", any, {
|
|
25
|
-
'data-component-name': string;
|
|
26
|
-
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
27
|
-
color?: string | undefined;
|
|
28
|
-
mt?: string | undefined;
|
|
29
|
-
mb?: string | undefined;
|
|
30
|
-
}, "data-component-name">;
|
|
31
|
-
export declare const CompactTypography: import("styled-components").StyledComponent<"p", any, {
|
|
32
|
-
'data-component-name': string;
|
|
33
|
-
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
34
|
-
color?: string | undefined;
|
|
35
|
-
mt?: string | undefined;
|
|
36
|
-
mb?: string | undefined;
|
|
37
|
-
} & {
|
|
38
|
-
mt: string;
|
|
39
|
-
mb: string;
|
|
40
|
-
'data-component-name': string;
|
|
41
|
-
}, "data-component-name" | "mt" | "mb">;
|
package/ui/Typography.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.CompactTypography = exports.Typography = exports.SectionHeader = exports.H3 = exports.H2 = exports.H1 = exports.Emphasis = void 0;
|
|
11
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
var styled_system_1 = require("styled-system");
|
|
13
|
-
var utils_1 = require("../utils");
|
|
14
|
-
exports.Emphasis = styled_components_1.default.strong.attrs(function () { return ({
|
|
15
|
-
'data-component-name': 'ui/Typography/Emphasis',
|
|
16
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-weight: var(--font-weight-bold);\n"], ["\n font-weight: var(--font-weight-bold);\n"])));
|
|
17
|
-
exports.H1 = styled_components_1.default.h1.attrs(function () { return ({
|
|
18
|
-
'data-component-name': 'ui/Typography/H1',
|
|
19
|
-
}); })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n margin: 1.35em 0 0.9em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"], ["\n ", ";\n margin: 1.35em 0 0.9em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"])), (0, utils_1.typography)('h1', 'h'), function (_a) {
|
|
20
|
-
var mt = _a.mt;
|
|
21
|
-
return mt && "margin-top: ".concat(mt, ";");
|
|
22
|
-
}, function (_a) {
|
|
23
|
-
var mb = _a.mb;
|
|
24
|
-
return mb && "margin-bottom: ".concat(mb, ";");
|
|
25
|
-
}, styled_system_1.color, styled_system_1.typography);
|
|
26
|
-
exports.H2 = styled_components_1.default.h2.attrs(function () { return ({
|
|
27
|
-
'data-component-name': 'ui/Typography/H2',
|
|
28
|
-
}); })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"], ["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"])), (0, utils_1.typography)('h2', 'h'), function (_a) {
|
|
29
|
-
var mt = _a.mt;
|
|
30
|
-
return mt && "margin-top: ".concat(mt, ";");
|
|
31
|
-
}, function (_a) {
|
|
32
|
-
var mb = _a.mb;
|
|
33
|
-
return mb && "margin-bottom: ".concat(mb, ";");
|
|
34
|
-
}, styled_system_1.color, styled_system_1.typography);
|
|
35
|
-
exports.H3 = styled_components_1.default.h3.attrs(function () { return ({
|
|
36
|
-
'data-component-name': 'ui/Typography/H3',
|
|
37
|
-
}); })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"], ["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"])), (0, utils_1.typography)('h3', 'h'), function (_a) {
|
|
38
|
-
var mt = _a.mt;
|
|
39
|
-
return mt && "margin-top: ".concat(mt, ";");
|
|
40
|
-
}, function (_a) {
|
|
41
|
-
var mb = _a.mb;
|
|
42
|
-
return mb && "margin-bottom: ".concat(mb, ";");
|
|
43
|
-
}, styled_system_1.color, styled_system_1.typography);
|
|
44
|
-
exports.SectionHeader = styled_components_1.default.h2(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: var(--h-color);\n font-size: 1.75em;\n font-weight: var(--font-weight-regular);\n text-align: center;\n margin: 2.65em 0;\n padding: 0 20px;\n font-family: var(--h-font-family);\n"], ["\n color: var(--h-color);\n font-size: 1.75em;\n font-weight: var(--font-weight-regular);\n text-align: center;\n margin: 2.65em 0;\n padding: 0 20px;\n font-family: var(--h-font-family);\n"])));
|
|
45
|
-
exports.Typography = styled_components_1.default.p.attrs(function () { return ({
|
|
46
|
-
'data-component-name': 'ui/Typography/Typography',
|
|
47
|
-
}); })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: var(--font-size-base);\n font-family: var(--font-family-base);\n line-height: var(--line-height-base);\n color: var(--color-content);\n ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"], ["\n font-size: var(--font-size-base);\n font-family: var(--font-family-base);\n line-height: var(--line-height-base);\n color: var(--color-content);\n ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"])), styled_system_1.color, function (_a) {
|
|
48
|
-
var mt = _a.mt;
|
|
49
|
-
return mt || '1em';
|
|
50
|
-
}, function (_a) {
|
|
51
|
-
var mb = _a.mb;
|
|
52
|
-
return mb || '1em';
|
|
53
|
-
}, styled_system_1.typography);
|
|
54
|
-
exports.CompactTypography = (0, styled_components_1.default)(exports.Typography).attrs(function () { return ({
|
|
55
|
-
mt: '0em',
|
|
56
|
-
mb: '0em',
|
|
57
|
-
'data-component-name': 'ui/Typography/CompactTypography',
|
|
58
|
-
}); })(templateObject_7 || (templateObject_7 = __makeTemplateObject([""], [""])));
|
|
59
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|