@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
import { type TextProps } from '../text/Text';
|
|
4
|
+
export type LinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'color'> & Pick<TextProps, 'size' | 'weight' | 'truncate'> & SpacingProps & {
|
|
5
|
+
color?: 'primary' | 'error';
|
|
6
|
+
};
|
|
7
|
+
declare const Link: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "color"> & Pick<TextProps, "size" | "weight" | "truncate"> & SpacingProps & {
|
|
8
|
+
color?: "primary" | "error";
|
|
9
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
export default Link;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type LinkProps } from './Link';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type BoxProps } from '@vinyasa/layout/box';
|
|
2
|
+
export type MarkdownRendererProps = Omit<BoxProps, 'children'> & {
|
|
3
|
+
/** Raw markdown source. */
|
|
4
|
+
children: string;
|
|
5
|
+
};
|
|
6
|
+
declare const MarkdownRenderer: import("react").ForwardRefExoticComponent<Omit<BoxProps, "children"> & {
|
|
7
|
+
/** Raw markdown source. */
|
|
8
|
+
children: string;
|
|
9
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
10
|
+
export default MarkdownRenderer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type MarkdownRendererProps } from './MarkdownRenderer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type ParagraphProps } from './Paragraph';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const text: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
size: {
|
|
3
|
+
xs: {
|
|
4
|
+
fontSize: `var(--${string})`;
|
|
5
|
+
};
|
|
6
|
+
sm: {
|
|
7
|
+
fontSize: `var(--${string})`;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
fontSize: `var(--${string})`;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
fontSize: `var(--${string})`;
|
|
14
|
+
};
|
|
15
|
+
xl: {
|
|
16
|
+
fontSize: `var(--${string})`;
|
|
17
|
+
};
|
|
18
|
+
'2xl': {
|
|
19
|
+
fontSize: `var(--${string})`;
|
|
20
|
+
};
|
|
21
|
+
'3xl': {
|
|
22
|
+
fontSize: `var(--${string})`;
|
|
23
|
+
};
|
|
24
|
+
'4xl': {
|
|
25
|
+
fontSize: `var(--${string})`;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
weight: {
|
|
29
|
+
regular: {
|
|
30
|
+
fontWeight: `var(--${string})`;
|
|
31
|
+
};
|
|
32
|
+
medium: {
|
|
33
|
+
fontWeight: `var(--${string})`;
|
|
34
|
+
};
|
|
35
|
+
semibold: {
|
|
36
|
+
fontWeight: `var(--${string})`;
|
|
37
|
+
};
|
|
38
|
+
bold: {
|
|
39
|
+
fontWeight: `var(--${string})`;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
align: {
|
|
43
|
+
left: {
|
|
44
|
+
textAlign: "left";
|
|
45
|
+
};
|
|
46
|
+
center: {
|
|
47
|
+
textAlign: "center";
|
|
48
|
+
};
|
|
49
|
+
right: {
|
|
50
|
+
textAlign: "right";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
color: {
|
|
54
|
+
default: {
|
|
55
|
+
color: `var(--${string})`;
|
|
56
|
+
};
|
|
57
|
+
muted: {
|
|
58
|
+
color: `var(--${string})`;
|
|
59
|
+
};
|
|
60
|
+
primary: {
|
|
61
|
+
color: `var(--${string})`;
|
|
62
|
+
};
|
|
63
|
+
error: {
|
|
64
|
+
color: `var(--${string})`;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
truncate: {
|
|
68
|
+
true: {
|
|
69
|
+
overflow: "hidden";
|
|
70
|
+
textOverflow: "ellipsis";
|
|
71
|
+
whiteSpace: "nowrap";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
3
|
+
import { type SpacingProps } from '../../spacing';
|
|
4
|
+
import { text } from './Text.css';
|
|
5
|
+
type TextVariants = RecipeVariants<typeof text>;
|
|
6
|
+
export type TextProps = PolymorphicProps & TextVariants & SpacingProps;
|
|
7
|
+
declare const Text: import("react").ForwardRefExoticComponent<PolymorphicProps & {
|
|
8
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | undefined;
|
|
9
|
+
weight?: "medium" | "bold" | "regular" | "semibold" | undefined;
|
|
10
|
+
align?: "left" | "right" | "center" | undefined;
|
|
11
|
+
color?: "default" | "muted" | "primary" | "error" | undefined;
|
|
12
|
+
truncate?: boolean | undefined;
|
|
13
|
+
} & SpacingProps & import("react").RefAttributes<HTMLElement>>;
|
|
14
|
+
export default Text;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type TextProps } from './Text';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Heading as default } from "./63.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Blockquote, type BlockquoteProps } from './components/blockquote';
|
|
2
|
+
export { default as Caption, type CaptionProps } from './components/caption';
|
|
3
|
+
export { default as Code, type CodeProps } from './components/code';
|
|
4
|
+
export { default as Heading, type HeadingLevel, type HeadingProps } from './components/heading';
|
|
5
|
+
export { default as Kbd, type KbdProps } from './components/kbd';
|
|
6
|
+
export { default as Label, type LabelProps } from './components/label';
|
|
7
|
+
export { default as Link, type LinkProps } from './components/link';
|
|
8
|
+
export { default as MarkdownRenderer, type MarkdownRendererProps, } from './components/markdown-renderer';
|
|
9
|
+
export { default as Paragraph, type ParagraphProps } from './components/paragraph';
|
|
10
|
+
export { default as Text, type TextProps } from './components/text';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Blockquote } from "./783.js";
|
|
2
|
+
export { Caption } from "./975.js";
|
|
3
|
+
export { Code } from "./651.js";
|
|
4
|
+
export { Heading } from "./63.js";
|
|
5
|
+
export { Kbd } from "./919.js";
|
|
6
|
+
export { Label } from "./691.js";
|
|
7
|
+
export { Link } from "./57.js";
|
|
8
|
+
export { MarkdownRenderer } from "./654.js";
|
|
9
|
+
export { Paragraph } from "./895.js";
|
|
10
|
+
export { Text } from "./191.js";
|
package/dist/esm/kbd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Kbd as default } from "./919.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Label as default } from "./691.js";
|
package/dist/esm/link.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Link as default } from "./57.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MarkdownRenderer as default } from "./654.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Paragraph as default } from "./895.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export type SpaceScale = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export interface SpacingProps {
|
|
4
|
+
m?: SpaceScale;
|
|
5
|
+
mt?: SpaceScale;
|
|
6
|
+
mr?: SpaceScale;
|
|
7
|
+
mb?: SpaceScale;
|
|
8
|
+
ml?: SpaceScale;
|
|
9
|
+
mx?: SpaceScale;
|
|
10
|
+
my?: SpaceScale;
|
|
11
|
+
p?: SpaceScale;
|
|
12
|
+
pt?: SpaceScale;
|
|
13
|
+
pr?: SpaceScale;
|
|
14
|
+
pb?: SpaceScale;
|
|
15
|
+
pl?: SpaceScale;
|
|
16
|
+
px?: SpaceScale;
|
|
17
|
+
py?: SpaceScale;
|
|
18
|
+
}
|
|
19
|
+
export declare const resolveSpacingStyle: (props: SpacingProps) => CSSProperties;
|
package/dist/esm/text.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Text as default } from "./191.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vinyasa/typography",
|
|
3
|
+
"version": "1.0.20",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.css"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"!dist/**/*.map",
|
|
12
|
+
"!dist/**/__story__/**",
|
|
13
|
+
"!dist/**/__test__/**",
|
|
14
|
+
"!dist/**/*.stories.d.ts",
|
|
15
|
+
"!dist/**/*.test.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist/cjs/index.cjs",
|
|
21
|
+
"module": "./dist/esm/index.js",
|
|
22
|
+
"style": "./dist/esm/index.css",
|
|
23
|
+
"types": "./dist/esm/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/esm/index.d.ts",
|
|
27
|
+
"import": "./dist/esm/index.js",
|
|
28
|
+
"require": "./dist/cjs/index.cjs",
|
|
29
|
+
"default": "./dist/esm/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./text": {
|
|
32
|
+
"types": "./dist/esm/text.d.ts",
|
|
33
|
+
"import": "./dist/esm/text.js",
|
|
34
|
+
"require": "./dist/cjs/text.cjs",
|
|
35
|
+
"default": "./dist/esm/text.js"
|
|
36
|
+
},
|
|
37
|
+
"./text/style.css": "./dist/esm/text.css",
|
|
38
|
+
"./heading": {
|
|
39
|
+
"types": "./dist/esm/heading.d.ts",
|
|
40
|
+
"import": "./dist/esm/heading.js",
|
|
41
|
+
"require": "./dist/cjs/heading.cjs",
|
|
42
|
+
"default": "./dist/esm/heading.js"
|
|
43
|
+
},
|
|
44
|
+
"./paragraph": {
|
|
45
|
+
"types": "./dist/esm/paragraph.d.ts",
|
|
46
|
+
"import": "./dist/esm/paragraph.js",
|
|
47
|
+
"require": "./dist/cjs/paragraph.cjs",
|
|
48
|
+
"default": "./dist/esm/paragraph.js"
|
|
49
|
+
},
|
|
50
|
+
"./label": {
|
|
51
|
+
"types": "./dist/esm/label.d.ts",
|
|
52
|
+
"import": "./dist/esm/label.js",
|
|
53
|
+
"require": "./dist/cjs/label.cjs",
|
|
54
|
+
"default": "./dist/esm/label.js"
|
|
55
|
+
},
|
|
56
|
+
"./caption": {
|
|
57
|
+
"types": "./dist/esm/caption.d.ts",
|
|
58
|
+
"import": "./dist/esm/caption.js",
|
|
59
|
+
"require": "./dist/cjs/caption.cjs",
|
|
60
|
+
"default": "./dist/esm/caption.js"
|
|
61
|
+
},
|
|
62
|
+
"./link": {
|
|
63
|
+
"types": "./dist/esm/link.d.ts",
|
|
64
|
+
"import": "./dist/esm/link.js",
|
|
65
|
+
"require": "./dist/cjs/link.cjs",
|
|
66
|
+
"default": "./dist/esm/link.js"
|
|
67
|
+
},
|
|
68
|
+
"./link/style.css": "./dist/esm/link.css",
|
|
69
|
+
"./code": {
|
|
70
|
+
"types": "./dist/esm/code.d.ts",
|
|
71
|
+
"import": "./dist/esm/code.js",
|
|
72
|
+
"require": "./dist/cjs/code.cjs",
|
|
73
|
+
"default": "./dist/esm/code.js"
|
|
74
|
+
},
|
|
75
|
+
"./code/style.css": "./dist/esm/code.css",
|
|
76
|
+
"./kbd": {
|
|
77
|
+
"types": "./dist/esm/kbd.d.ts",
|
|
78
|
+
"import": "./dist/esm/kbd.js",
|
|
79
|
+
"require": "./dist/cjs/kbd.cjs",
|
|
80
|
+
"default": "./dist/esm/kbd.js"
|
|
81
|
+
},
|
|
82
|
+
"./kbd/style.css": "./dist/esm/kbd.css",
|
|
83
|
+
"./blockquote": {
|
|
84
|
+
"types": "./dist/esm/blockquote.d.ts",
|
|
85
|
+
"import": "./dist/esm/blockquote.js",
|
|
86
|
+
"require": "./dist/cjs/blockquote.cjs",
|
|
87
|
+
"default": "./dist/esm/blockquote.js"
|
|
88
|
+
},
|
|
89
|
+
"./blockquote/style.css": "./dist/esm/blockquote.css",
|
|
90
|
+
"./markdown-renderer": {
|
|
91
|
+
"types": "./dist/esm/markdown-renderer.d.ts",
|
|
92
|
+
"import": "./dist/esm/markdown-renderer.js",
|
|
93
|
+
"require": "./dist/cjs/markdown-renderer.cjs",
|
|
94
|
+
"default": "./dist/esm/markdown-renderer.js"
|
|
95
|
+
},
|
|
96
|
+
"./style.css": "./dist/esm/index.css",
|
|
97
|
+
"./package.json": "./package.json"
|
|
98
|
+
},
|
|
99
|
+
"peerDependencies": {
|
|
100
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
101
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
102
|
+
"@vinyasa/tokens": "^1.0.20",
|
|
103
|
+
"@vinyasa/layout": "^1.0.20"
|
|
104
|
+
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"react-markdown": "^10.1.0"
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@rsbuild/plugin-react": "^2.1.0",
|
|
110
|
+
"@rslib/core": "^0.23.1",
|
|
111
|
+
"@storybook/react-vite": "^10.4.6",
|
|
112
|
+
"@types/node": "^26.0.1",
|
|
113
|
+
"@types/react": "^19.0.0",
|
|
114
|
+
"@vanilla-extract/css": "^1.21.0",
|
|
115
|
+
"@vanilla-extract/recipes": "^0.5.7",
|
|
116
|
+
"@vanilla-extract/vite-plugin": "^5.2.3",
|
|
117
|
+
"@vanilla-extract/webpack-plugin": "^2.3.27",
|
|
118
|
+
"typescript": "^5.7.3",
|
|
119
|
+
"@vinyasa/layout": "1.0.20",
|
|
120
|
+
"@vinyasa/tokens": "1.0.20"
|
|
121
|
+
},
|
|
122
|
+
"scripts": {
|
|
123
|
+
"build": "rslib build && node ../../scripts/postbuild-package.mjs",
|
|
124
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
125
|
+
"lint": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --ignore-pattern src/**/__story__/** --ignore-pattern src/**/__test__/**",
|
|
126
|
+
"lint:fix": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --ignore-pattern src/**/__story__/** --ignore-pattern src/**/__test__/** --fix",
|
|
127
|
+
"format": "prettier . --config ../../configs/prettier.config.json --ignore-path ../../configs/.prettierignore --write",
|
|
128
|
+
"format:check": "prettier . --config ../../configs/prettier.config.json --ignore-path ../../configs/.prettierignore --check",
|
|
129
|
+
"test": "vitest run --config vitest.config.ts",
|
|
130
|
+
"test:watch": "vitest --config vitest.config.ts",
|
|
131
|
+
"test:coverage": "vitest run --config vitest.config.ts --coverage",
|
|
132
|
+
"pack:check": "npm pack --dry-run"
|
|
133
|
+
}
|
|
134
|
+
}
|