@vinyasa/typography 1.0.20
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/README.md +118 -0
- package/dist/cjs/blockquote.cjs +245 -0
- package/dist/cjs/blockquote.css +36 -0
- package/dist/cjs/caption.cjs +465 -0
- package/dist/cjs/caption.css +87 -0
- package/dist/cjs/code.cjs +357 -0
- package/dist/cjs/code.css +21 -0
- package/dist/cjs/heading.cjs +474 -0
- package/dist/cjs/heading.css +87 -0
- package/dist/cjs/index.cjs +1393 -0
- package/dist/cjs/index.css +165 -0
- package/dist/cjs/kbd.cjs +245 -0
- package/dist/cjs/kbd.css +13 -0
- package/dist/cjs/label.cjs +465 -0
- package/dist/cjs/label.css +87 -0
- package/dist/cjs/link.cjs +526 -0
- package/dist/cjs/link.css +95 -0
- package/dist/cjs/markdown-renderer.cjs +1085 -0
- package/dist/cjs/markdown-renderer.css +152 -0
- package/dist/cjs/paragraph.cjs +418 -0
- package/dist/cjs/paragraph.css +87 -0
- package/dist/cjs/text.cjs +389 -0
- package/dist/cjs/text.css +87 -0
- package/dist/esm/191.css +87 -0
- package/dist/esm/191.js +90 -0
- package/dist/esm/474.js +76 -0
- package/dist/esm/57.css +8 -0
- package/dist/esm/57.js +43 -0
- package/dist/esm/63.js +21 -0
- package/dist/esm/651.css +20 -0
- package/dist/esm/651.js +63 -0
- package/dist/esm/654.js +72 -0
- package/dist/esm/691.js +13 -0
- package/dist/esm/783.css +8 -0
- package/dist/esm/783.js +37 -0
- package/dist/esm/895.js +11 -0
- package/dist/esm/919.css +12 -0
- package/dist/esm/919.js +37 -0
- package/dist/esm/953.js +87 -0
- package/dist/esm/975.js +13 -0
- package/dist/esm/blockquote.d.ts +2 -0
- package/dist/esm/blockquote.js +1 -0
- package/dist/esm/caption.d.ts +2 -0
- package/dist/esm/caption.js +1 -0
- package/dist/esm/code.d.ts +2 -0
- package/dist/esm/code.js +1 -0
- package/dist/esm/components/blockquote/Blockquote.css.d.ts +1 -0
- package/dist/esm/components/blockquote/Blockquote.d.ts +5 -0
- package/dist/esm/components/blockquote/index.d.ts +1 -0
- package/dist/esm/components/caption/Caption.d.ts +4 -0
- package/dist/esm/components/caption/index.d.ts +1 -0
- package/dist/esm/components/code/Code.css.d.ts +14 -0
- package/dist/esm/components/code/Code.d.ts +13 -0
- package/dist/esm/components/code/index.d.ts +1 -0
- package/dist/esm/components/heading/Heading.d.ts +9 -0
- package/dist/esm/components/heading/index.d.ts +1 -0
- package/dist/esm/components/kbd/Kbd.css.d.ts +1 -0
- package/dist/esm/components/kbd/Kbd.d.ts +5 -0
- package/dist/esm/components/kbd/index.d.ts +1 -0
- package/dist/esm/components/label/Label.d.ts +8 -0
- package/dist/esm/components/label/index.d.ts +1 -0
- package/dist/esm/components/link/Link.css.d.ts +1 -0
- package/dist/esm/components/link/Link.d.ts +10 -0
- package/dist/esm/components/link/index.d.ts +1 -0
- package/dist/esm/components/markdown-renderer/MarkdownRenderer.d.ts +10 -0
- package/dist/esm/components/markdown-renderer/index.d.ts +1 -0
- package/dist/esm/components/paragraph/Paragraph.d.ts +4 -0
- package/dist/esm/components/paragraph/index.d.ts +1 -0
- package/dist/esm/components/text/Text.css.d.ts +74 -0
- package/dist/esm/components/text/Text.d.ts +14 -0
- package/dist/esm/components/text/index.d.ts +1 -0
- package/dist/esm/heading.d.ts +2 -0
- package/dist/esm/heading.js +1 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/kbd.d.ts +2 -0
- package/dist/esm/kbd.js +1 -0
- package/dist/esm/label.d.ts +2 -0
- package/dist/esm/label.js +1 -0
- package/dist/esm/link.d.ts +2 -0
- package/dist/esm/link.js +1 -0
- package/dist/esm/markdown-renderer.d.ts +2 -0
- package/dist/esm/markdown-renderer.js +1 -0
- package/dist/esm/paragraph.d.ts +2 -0
- package/dist/esm/paragraph.js +1 -0
- package/dist/esm/polymorphic.d.ts +5 -0
- package/dist/esm/spacing.d.ts +19 -0
- package/dist/esm/text.d.ts +2 -0
- package/dist/esm/text.js +1 -0
- package/package.json +134 -0
package/dist/esm/474.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { themeContract } from "@vinyasa/tokens";
|
|
2
|
+
const space = {
|
|
3
|
+
1: themeContract.space1,
|
|
4
|
+
2: themeContract.space2,
|
|
5
|
+
3: themeContract.space3,
|
|
6
|
+
4: themeContract.space4,
|
|
7
|
+
5: themeContract.space5,
|
|
8
|
+
6: themeContract.space6
|
|
9
|
+
};
|
|
10
|
+
const spacingPropertyMap = [
|
|
11
|
+
[
|
|
12
|
+
'm',
|
|
13
|
+
'margin'
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
'mx',
|
|
17
|
+
'marginInline'
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
'my',
|
|
21
|
+
'marginBlock'
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
'mt',
|
|
25
|
+
'marginTop'
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
'mr',
|
|
29
|
+
'marginRight'
|
|
30
|
+
],
|
|
31
|
+
[
|
|
32
|
+
'mb',
|
|
33
|
+
'marginBottom'
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
'ml',
|
|
37
|
+
'marginLeft'
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
'p',
|
|
41
|
+
'padding'
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
'px',
|
|
45
|
+
'paddingInline'
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
'py',
|
|
49
|
+
'paddingBlock'
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
'pt',
|
|
53
|
+
'paddingTop'
|
|
54
|
+
],
|
|
55
|
+
[
|
|
56
|
+
'pr',
|
|
57
|
+
'paddingRight'
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
'pb',
|
|
61
|
+
'paddingBottom'
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
'pl',
|
|
65
|
+
'paddingLeft'
|
|
66
|
+
]
|
|
67
|
+
];
|
|
68
|
+
const resolveSpacingStyle = (props)=>{
|
|
69
|
+
const style = {};
|
|
70
|
+
for (const [propKey, cssProperty] of spacingPropertyMap){
|
|
71
|
+
const value = props[propKey];
|
|
72
|
+
if (void 0 !== value) style[cssProperty] = space[value];
|
|
73
|
+
}
|
|
74
|
+
return style;
|
|
75
|
+
};
|
|
76
|
+
export { resolveSpacingStyle };
|
package/dist/esm/57.css
ADDED
package/dist/esm/57.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "./57.css";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { resolveSpacingStyle } from "./474.js";
|
|
5
|
+
import { Text as text_Text } from "./191.js";
|
|
6
|
+
var Link_css_link = '_1laoo9r0';
|
|
7
|
+
const Link = /*#__PURE__*/ forwardRef(({ size, weight, truncate, color = 'primary', m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children, ...rest }, ref)=>{
|
|
8
|
+
const classes = className ? `${Link_css_link} ${className}` : Link_css_link;
|
|
9
|
+
const spacingStyle = resolveSpacingStyle({
|
|
10
|
+
m,
|
|
11
|
+
mt,
|
|
12
|
+
mr,
|
|
13
|
+
mb,
|
|
14
|
+
ml,
|
|
15
|
+
mx,
|
|
16
|
+
my,
|
|
17
|
+
p,
|
|
18
|
+
pt,
|
|
19
|
+
pr,
|
|
20
|
+
pb,
|
|
21
|
+
pl,
|
|
22
|
+
px,
|
|
23
|
+
py
|
|
24
|
+
});
|
|
25
|
+
return /*#__PURE__*/ jsx(text_Text, {
|
|
26
|
+
...rest,
|
|
27
|
+
ref: ref,
|
|
28
|
+
as: "a",
|
|
29
|
+
size: size,
|
|
30
|
+
weight: weight,
|
|
31
|
+
truncate: truncate,
|
|
32
|
+
color: color,
|
|
33
|
+
className: classes,
|
|
34
|
+
style: {
|
|
35
|
+
...spacingStyle,
|
|
36
|
+
...style
|
|
37
|
+
},
|
|
38
|
+
children: children
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
Link.displayName = 'Link';
|
|
42
|
+
const link_Link = Link;
|
|
43
|
+
export { link_Link as Link };
|
package/dist/esm/63.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Text as text_Text } from "./191.js";
|
|
4
|
+
const levelDefaultSize = {
|
|
5
|
+
h1: '3xl',
|
|
6
|
+
h2: '2xl',
|
|
7
|
+
h3: 'xl',
|
|
8
|
+
h4: 'lg',
|
|
9
|
+
h5: 'md',
|
|
10
|
+
h6: 'sm'
|
|
11
|
+
};
|
|
12
|
+
const Heading = /*#__PURE__*/ forwardRef(({ as = 'h2', size, weight = 'bold', ...rest }, ref)=>/*#__PURE__*/ jsx(text_Text, {
|
|
13
|
+
ref: ref,
|
|
14
|
+
as: as,
|
|
15
|
+
size: size ?? levelDefaultSize[as],
|
|
16
|
+
weight: weight,
|
|
17
|
+
...rest
|
|
18
|
+
}));
|
|
19
|
+
Heading.displayName = 'Heading';
|
|
20
|
+
const heading_Heading = Heading;
|
|
21
|
+
export { heading_Heading as Heading };
|
package/dist/esm/651.css
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
._15gjhvw0 {
|
|
2
|
+
font-family: var(--vinyasa-font-family-mono);
|
|
3
|
+
font-size: var(--vinyasa-font-size-sm);
|
|
4
|
+
background-color: var(--vinyasa-secondary);
|
|
5
|
+
border-radius: var(--vinyasa-radius-sm);
|
|
6
|
+
color: var(--vinyasa-on-secondary);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
._15gjhvw1 {
|
|
10
|
+
padding: var(--vinyasa-space3);
|
|
11
|
+
display: block;
|
|
12
|
+
overflow-x: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
._15gjhvw2 {
|
|
16
|
+
padding-inline: var(--vinyasa-space1);
|
|
17
|
+
padding-block: .125em;
|
|
18
|
+
display: inline;
|
|
19
|
+
}
|
|
20
|
+
|
package/dist/esm/651.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "./651.css";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { createRuntimeFn } from "./953.js";
|
|
5
|
+
import { resolveSpacingStyle } from "./474.js";
|
|
6
|
+
var code = createRuntimeFn({
|
|
7
|
+
defaultClassName: '_15gjhvw0',
|
|
8
|
+
variantClassNames: {
|
|
9
|
+
block: {
|
|
10
|
+
true: '_15gjhvw1',
|
|
11
|
+
false: '_15gjhvw2'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
block: false
|
|
16
|
+
},
|
|
17
|
+
compoundVariants: []
|
|
18
|
+
});
|
|
19
|
+
const Code = /*#__PURE__*/ forwardRef(({ block = false, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children, ...rest }, ref)=>{
|
|
20
|
+
const classes = className ? `${code({
|
|
21
|
+
block
|
|
22
|
+
})} ${className}` : code({
|
|
23
|
+
block
|
|
24
|
+
});
|
|
25
|
+
const computedStyle = {
|
|
26
|
+
...resolveSpacingStyle({
|
|
27
|
+
m,
|
|
28
|
+
mt,
|
|
29
|
+
mr,
|
|
30
|
+
mb,
|
|
31
|
+
ml,
|
|
32
|
+
mx,
|
|
33
|
+
my,
|
|
34
|
+
p,
|
|
35
|
+
pt,
|
|
36
|
+
pr,
|
|
37
|
+
pb,
|
|
38
|
+
pl,
|
|
39
|
+
px,
|
|
40
|
+
py
|
|
41
|
+
}),
|
|
42
|
+
...style
|
|
43
|
+
};
|
|
44
|
+
if (block) return /*#__PURE__*/ jsx("pre", {
|
|
45
|
+
ref: ref,
|
|
46
|
+
className: classes,
|
|
47
|
+
style: computedStyle,
|
|
48
|
+
...rest,
|
|
49
|
+
children: /*#__PURE__*/ jsx("code", {
|
|
50
|
+
children: children
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
return /*#__PURE__*/ jsx("code", {
|
|
54
|
+
ref: ref,
|
|
55
|
+
className: classes,
|
|
56
|
+
style: computedStyle,
|
|
57
|
+
...rest,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
Code.displayName = 'Code';
|
|
62
|
+
const code_Code = Code;
|
|
63
|
+
export { code_Code as Code };
|
package/dist/esm/654.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import box from "@vinyasa/layout/box";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import react_markdown from "react-markdown";
|
|
5
|
+
import { Heading as heading_Heading } from "./63.js";
|
|
6
|
+
import { Paragraph as paragraph_Paragraph } from "./895.js";
|
|
7
|
+
import { Link as link_Link } from "./57.js";
|
|
8
|
+
import { Blockquote as blockquote_Blockquote } from "./783.js";
|
|
9
|
+
import { Code as code_Code } from "./651.js";
|
|
10
|
+
const components = {
|
|
11
|
+
h1: ({ id, children })=>/*#__PURE__*/ jsx(heading_Heading, {
|
|
12
|
+
as: "h1",
|
|
13
|
+
id: id,
|
|
14
|
+
children: children
|
|
15
|
+
}),
|
|
16
|
+
h2: ({ id, children })=>/*#__PURE__*/ jsx(heading_Heading, {
|
|
17
|
+
as: "h2",
|
|
18
|
+
id: id,
|
|
19
|
+
children: children
|
|
20
|
+
}),
|
|
21
|
+
h3: ({ id, children })=>/*#__PURE__*/ jsx(heading_Heading, {
|
|
22
|
+
as: "h3",
|
|
23
|
+
id: id,
|
|
24
|
+
children: children
|
|
25
|
+
}),
|
|
26
|
+
h4: ({ id, children })=>/*#__PURE__*/ jsx(heading_Heading, {
|
|
27
|
+
as: "h4",
|
|
28
|
+
id: id,
|
|
29
|
+
children: children
|
|
30
|
+
}),
|
|
31
|
+
h5: ({ id, children })=>/*#__PURE__*/ jsx(heading_Heading, {
|
|
32
|
+
as: "h5",
|
|
33
|
+
id: id,
|
|
34
|
+
children: children
|
|
35
|
+
}),
|
|
36
|
+
h6: ({ id, children })=>/*#__PURE__*/ jsx(heading_Heading, {
|
|
37
|
+
as: "h6",
|
|
38
|
+
id: id,
|
|
39
|
+
children: children
|
|
40
|
+
}),
|
|
41
|
+
p: ({ children })=>/*#__PURE__*/ jsx(paragraph_Paragraph, {
|
|
42
|
+
children: children
|
|
43
|
+
}),
|
|
44
|
+
a: ({ href, title, children })=>/*#__PURE__*/ jsx(link_Link, {
|
|
45
|
+
href: href,
|
|
46
|
+
title: title,
|
|
47
|
+
children: children
|
|
48
|
+
}),
|
|
49
|
+
blockquote: ({ children })=>/*#__PURE__*/ jsx(blockquote_Blockquote, {
|
|
50
|
+
children: children
|
|
51
|
+
}),
|
|
52
|
+
pre: ({ children })=>children,
|
|
53
|
+
code: ({ className, children })=>{
|
|
54
|
+
const isBlock = 'string' == typeof className && className.includes('language-');
|
|
55
|
+
return /*#__PURE__*/ jsx(code_Code, {
|
|
56
|
+
block: isBlock,
|
|
57
|
+
className: className,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const MarkdownRenderer = /*#__PURE__*/ forwardRef(({ children, ...rest }, ref)=>/*#__PURE__*/ jsx(box, {
|
|
63
|
+
ref: ref,
|
|
64
|
+
...rest,
|
|
65
|
+
children: /*#__PURE__*/ jsx(react_markdown, {
|
|
66
|
+
components: components,
|
|
67
|
+
children: children
|
|
68
|
+
})
|
|
69
|
+
}));
|
|
70
|
+
MarkdownRenderer.displayName = 'MarkdownRenderer';
|
|
71
|
+
const markdown_renderer_MarkdownRenderer = MarkdownRenderer;
|
|
72
|
+
export { markdown_renderer_MarkdownRenderer as MarkdownRenderer };
|
package/dist/esm/691.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Text as text_Text } from "./191.js";
|
|
4
|
+
const Label = /*#__PURE__*/ forwardRef(({ size = 'sm', weight = 'medium', ...props }, ref)=>/*#__PURE__*/ jsx(text_Text, {
|
|
5
|
+
ref: ref,
|
|
6
|
+
as: "label",
|
|
7
|
+
size: size,
|
|
8
|
+
weight: weight,
|
|
9
|
+
...props
|
|
10
|
+
}));
|
|
11
|
+
Label.displayName = 'Label';
|
|
12
|
+
const label_Label = Label;
|
|
13
|
+
export { label_Label as Label };
|
package/dist/esm/783.css
ADDED
package/dist/esm/783.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./783.css";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { resolveSpacingStyle } from "./474.js";
|
|
5
|
+
var blockquote = 'adxw6l0';
|
|
6
|
+
const Blockquote = /*#__PURE__*/ forwardRef(({ m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children, ...rest }, ref)=>{
|
|
7
|
+
const classes = className ? `${blockquote} ${className}` : blockquote;
|
|
8
|
+
const computedStyle = {
|
|
9
|
+
...resolveSpacingStyle({
|
|
10
|
+
m,
|
|
11
|
+
mt,
|
|
12
|
+
mr,
|
|
13
|
+
mb,
|
|
14
|
+
ml,
|
|
15
|
+
mx,
|
|
16
|
+
my,
|
|
17
|
+
p,
|
|
18
|
+
pt,
|
|
19
|
+
pr,
|
|
20
|
+
pb,
|
|
21
|
+
pl,
|
|
22
|
+
px,
|
|
23
|
+
py
|
|
24
|
+
}),
|
|
25
|
+
...style
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/ jsx("blockquote", {
|
|
28
|
+
ref: ref,
|
|
29
|
+
className: classes,
|
|
30
|
+
style: computedStyle,
|
|
31
|
+
...rest,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
Blockquote.displayName = 'Blockquote';
|
|
36
|
+
const blockquote_Blockquote = Blockquote;
|
|
37
|
+
export { blockquote_Blockquote as Blockquote };
|
package/dist/esm/895.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Text as text_Text } from "./191.js";
|
|
4
|
+
const Paragraph = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx(text_Text, {
|
|
5
|
+
ref: ref,
|
|
6
|
+
as: "p",
|
|
7
|
+
...props
|
|
8
|
+
}));
|
|
9
|
+
Paragraph.displayName = 'Paragraph';
|
|
10
|
+
const paragraph_Paragraph = Paragraph;
|
|
11
|
+
export { paragraph_Paragraph as Paragraph };
|
package/dist/esm/919.css
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._18ahdyj0 {
|
|
2
|
+
font-family: var(--vinyasa-font-family-mono);
|
|
3
|
+
font-size: var(--vinyasa-font-size-sm);
|
|
4
|
+
color: var(--vinyasa-on-secondary);
|
|
5
|
+
background-color: var(--vinyasa-secondary);
|
|
6
|
+
border: var(--vinyasa-border-width-thin) solid var(--vinyasa-border-color-default);
|
|
7
|
+
border-radius: var(--vinyasa-radius-sm);
|
|
8
|
+
padding-inline: var(--vinyasa-space2);
|
|
9
|
+
padding-block: .125em;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
|
package/dist/esm/919.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "./919.css";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { resolveSpacingStyle } from "./474.js";
|
|
5
|
+
var kbd = '_18ahdyj0';
|
|
6
|
+
const Kbd = /*#__PURE__*/ forwardRef(({ m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children, ...rest }, ref)=>{
|
|
7
|
+
const classes = className ? `${kbd} ${className}` : kbd;
|
|
8
|
+
const computedStyle = {
|
|
9
|
+
...resolveSpacingStyle({
|
|
10
|
+
m,
|
|
11
|
+
mt,
|
|
12
|
+
mr,
|
|
13
|
+
mb,
|
|
14
|
+
ml,
|
|
15
|
+
mx,
|
|
16
|
+
my,
|
|
17
|
+
p,
|
|
18
|
+
pt,
|
|
19
|
+
pr,
|
|
20
|
+
pb,
|
|
21
|
+
pl,
|
|
22
|
+
px,
|
|
23
|
+
py
|
|
24
|
+
}),
|
|
25
|
+
...style
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/ jsx("kbd", {
|
|
28
|
+
ref: ref,
|
|
29
|
+
className: classes,
|
|
30
|
+
style: computedStyle,
|
|
31
|
+
...rest,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
Kbd.displayName = 'Kbd';
|
|
36
|
+
const kbd_Kbd = Kbd;
|
|
37
|
+
export { kbd_Kbd as Kbd };
|
package/dist/esm/953.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
function toPrimitive(t, r) {
|
|
2
|
+
if ("object" != typeof t || !t) return t;
|
|
3
|
+
var e = t[Symbol.toPrimitive];
|
|
4
|
+
if (void 0 !== e) {
|
|
5
|
+
var i = e.call(t, r || "default");
|
|
6
|
+
if ("object" != typeof i) return i;
|
|
7
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
8
|
+
}
|
|
9
|
+
return ("string" === r ? String : Number)(t);
|
|
10
|
+
}
|
|
11
|
+
function toPropertyKey(t) {
|
|
12
|
+
var i = toPrimitive(t, "string");
|
|
13
|
+
return "symbol" == typeof i ? i : String(i);
|
|
14
|
+
}
|
|
15
|
+
function _defineProperty(obj, key, value) {
|
|
16
|
+
key = toPropertyKey(key);
|
|
17
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
18
|
+
value: value,
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true
|
|
22
|
+
});
|
|
23
|
+
else obj[key] = value;
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
function ownKeys(e, r) {
|
|
27
|
+
var t = Object.keys(e);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
30
|
+
r && (o = o.filter(function(r) {
|
|
31
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
32
|
+
})), t.push.apply(t, o);
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
36
|
+
function _objectSpread2(e) {
|
|
37
|
+
for(var r = 1; r < arguments.length; r++){
|
|
38
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
39
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
40
|
+
_defineProperty(e, r, t[r]);
|
|
41
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
42
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return e;
|
|
46
|
+
}
|
|
47
|
+
function mapValues(input, fn) {
|
|
48
|
+
var result = {};
|
|
49
|
+
for(var _key in input)result[_key] = fn(input[_key], _key);
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
|
|
53
|
+
for (var key of Object.keys(compoundCheck)){
|
|
54
|
+
var _selections$key;
|
|
55
|
+
if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
};
|
|
59
|
+
var createRuntimeFn = (config)=>{
|
|
60
|
+
var runtimeFn = (options)=>{
|
|
61
|
+
var className = config.defaultClassName;
|
|
62
|
+
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
63
|
+
for(var variantName in selections){
|
|
64
|
+
var _selections$variantNa;
|
|
65
|
+
var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
|
|
66
|
+
if (null != variantSelection) {
|
|
67
|
+
var selection = variantSelection;
|
|
68
|
+
if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
|
|
69
|
+
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
70
|
+
if (selectionClassName) className += ' ' + selectionClassName;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
|
|
74
|
+
return className;
|
|
75
|
+
};
|
|
76
|
+
runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
|
|
77
|
+
runtimeFn.classNames = {
|
|
78
|
+
get base () {
|
|
79
|
+
return config.defaultClassName.split(' ')[0];
|
|
80
|
+
},
|
|
81
|
+
get variants () {
|
|
82
|
+
return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
return runtimeFn;
|
|
86
|
+
};
|
|
87
|
+
export { createRuntimeFn };
|
package/dist/esm/975.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Text as text_Text } from "./191.js";
|
|
4
|
+
const Caption = /*#__PURE__*/ forwardRef(({ size = 'xs', color = 'muted', ...props }, ref)=>/*#__PURE__*/ jsx(text_Text, {
|
|
5
|
+
ref: ref,
|
|
6
|
+
as: "span",
|
|
7
|
+
size: size,
|
|
8
|
+
color: color,
|
|
9
|
+
...props
|
|
10
|
+
}));
|
|
11
|
+
Caption.displayName = 'Caption';
|
|
12
|
+
const caption_Caption = Caption;
|
|
13
|
+
export { caption_Caption as Caption };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Blockquote as default } from "./783.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Caption as default } from "./975.js";
|
package/dist/esm/code.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Code as default } from "./651.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const blockquote: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type BlockquoteProps = ComponentPropsWithoutRef<'blockquote'> & SpacingProps;
|
|
4
|
+
declare const Blockquote: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & SpacingProps & import("react").RefAttributes<HTMLQuoteElement>>;
|
|
5
|
+
export default Blockquote;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type BlockquoteProps } from './Blockquote';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type CaptionProps } from './Caption';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const code: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
block: {
|
|
3
|
+
true: {
|
|
4
|
+
display: "block";
|
|
5
|
+
padding: `var(--${string})`;
|
|
6
|
+
overflowX: "auto";
|
|
7
|
+
};
|
|
8
|
+
false: {
|
|
9
|
+
display: "inline";
|
|
10
|
+
paddingInline: `var(--${string})`;
|
|
11
|
+
paddingBlock: "0.125em";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type CodeProps = Omit<ComponentPropsWithoutRef<'code'>, 'children'> & SpacingProps & {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Renders `<pre><code>` for a multi-line block instead of inline `<code>`. */
|
|
6
|
+
block?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const Code: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "children"> & SpacingProps & {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/** Renders `<pre><code>` for a multi-line block instead of inline `<code>`. */
|
|
11
|
+
block?: boolean;
|
|
12
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
13
|
+
export default Code;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type CodeProps } from './Code';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TextProps } from '../text/Text';
|
|
2
|
+
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
3
|
+
export type HeadingProps = Omit<TextProps, 'as'> & {
|
|
4
|
+
as?: HeadingLevel;
|
|
5
|
+
};
|
|
6
|
+
declare const Heading: import("react").ForwardRefExoticComponent<Omit<TextProps, "as"> & {
|
|
7
|
+
as?: HeadingLevel;
|
|
8
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
9
|
+
export default Heading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type HeadingLevel, type HeadingProps } from './Heading';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const kbd: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type KbdProps = ComponentPropsWithoutRef<'kbd'> & SpacingProps;
|
|
4
|
+
declare const Kbd: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & SpacingProps & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
export default Kbd;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type KbdProps } from './Kbd';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TextProps } from '../text/Text';
|
|
2
|
+
export type LabelProps = Omit<TextProps, 'as'> & {
|
|
3
|
+
htmlFor?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const Label: import("react").ForwardRefExoticComponent<Omit<TextProps, "as"> & {
|
|
6
|
+
htmlFor?: string;
|
|
7
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
8
|
+
export default Label;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type LabelProps } from './Label';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const link: string;
|