@jalvin/ui 1.0.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.
@@ -0,0 +1,137 @@
1
+ import type { CSSProperties } from "react";
2
+ export interface TextStyleDef {
3
+ fontSize: string;
4
+ fontWeight: number | "bold" | "normal";
5
+ lineHeight: string;
6
+ letterSpacing?: string;
7
+ }
8
+ export declare const TextStyle: {
9
+ displayLarge: {
10
+ fontSize: string;
11
+ fontWeight: number;
12
+ lineHeight: string;
13
+ };
14
+ displayMedium: {
15
+ fontSize: string;
16
+ fontWeight: number;
17
+ lineHeight: string;
18
+ };
19
+ displaySmall: {
20
+ fontSize: string;
21
+ fontWeight: number;
22
+ lineHeight: string;
23
+ };
24
+ headlineLarge: {
25
+ fontSize: string;
26
+ fontWeight: number;
27
+ lineHeight: string;
28
+ };
29
+ headlineMedium: {
30
+ fontSize: string;
31
+ fontWeight: number;
32
+ lineHeight: string;
33
+ };
34
+ headlineSmall: {
35
+ fontSize: string;
36
+ fontWeight: number;
37
+ lineHeight: string;
38
+ };
39
+ titleLarge: {
40
+ fontSize: string;
41
+ fontWeight: number;
42
+ lineHeight: string;
43
+ };
44
+ titleMedium: {
45
+ fontSize: string;
46
+ fontWeight: number;
47
+ lineHeight: string;
48
+ letterSpacing: string;
49
+ };
50
+ titleSmall: {
51
+ fontSize: string;
52
+ fontWeight: number;
53
+ lineHeight: string;
54
+ letterSpacing: string;
55
+ };
56
+ bodyLarge: {
57
+ fontSize: string;
58
+ fontWeight: number;
59
+ lineHeight: string;
60
+ letterSpacing: string;
61
+ };
62
+ bodyMedium: {
63
+ fontSize: string;
64
+ fontWeight: number;
65
+ lineHeight: string;
66
+ letterSpacing: string;
67
+ };
68
+ bodySmall: {
69
+ fontSize: string;
70
+ fontWeight: number;
71
+ lineHeight: string;
72
+ letterSpacing: string;
73
+ };
74
+ labelLarge: {
75
+ fontSize: string;
76
+ fontWeight: number;
77
+ lineHeight: string;
78
+ letterSpacing: string;
79
+ };
80
+ labelMedium: {
81
+ fontSize: string;
82
+ fontWeight: number;
83
+ lineHeight: string;
84
+ letterSpacing: string;
85
+ };
86
+ labelSmall: {
87
+ fontSize: string;
88
+ fontWeight: number;
89
+ lineHeight: string;
90
+ letterSpacing: string;
91
+ };
92
+ h1: {
93
+ fontSize: string;
94
+ fontWeight: "bold";
95
+ lineHeight: string;
96
+ };
97
+ h2: {
98
+ fontSize: string;
99
+ fontWeight: "bold";
100
+ lineHeight: string;
101
+ };
102
+ h3: {
103
+ fontSize: string;
104
+ fontWeight: "bold";
105
+ lineHeight: string;
106
+ };
107
+ h4: {
108
+ fontSize: string;
109
+ fontWeight: "bold";
110
+ lineHeight: string;
111
+ };
112
+ body: {
113
+ fontSize: string;
114
+ fontWeight: "normal";
115
+ lineHeight: string;
116
+ };
117
+ caption: {
118
+ fontSize: string;
119
+ fontWeight: "normal";
120
+ lineHeight: string;
121
+ };
122
+ button: {
123
+ fontSize: string;
124
+ fontWeight: number;
125
+ lineHeight: string;
126
+ letterSpacing: string;
127
+ };
128
+ code: {
129
+ fontSize: string;
130
+ fontWeight: "normal";
131
+ lineHeight: string;
132
+ letterSpacing: string;
133
+ };
134
+ };
135
+ export type TextStyleKey = keyof typeof TextStyle;
136
+ export declare function textStyleToCSS(style: TextStyleDef): CSSProperties;
137
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BkB,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAC;AAElD,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,CAEjE"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextStyle = void 0;
4
+ exports.textStyleToCSS = textStyleToCSS;
5
+ exports.TextStyle = {
6
+ displayLarge: { fontSize: "3.5rem", fontWeight: 400, lineHeight: "4rem" },
7
+ displayMedium: { fontSize: "2.8rem", fontWeight: 400, lineHeight: "3.2rem" },
8
+ displaySmall: { fontSize: "2.25rem", fontWeight: 400, lineHeight: "2.75rem" },
9
+ headlineLarge: { fontSize: "2rem", fontWeight: 400, lineHeight: "2.5rem" },
10
+ headlineMedium: { fontSize: "1.75rem", fontWeight: 400, lineHeight: "2.25rem" },
11
+ headlineSmall: { fontSize: "1.5rem", fontWeight: 400, lineHeight: "2rem" },
12
+ titleLarge: { fontSize: "1.375rem", fontWeight: 500, lineHeight: "1.75rem" },
13
+ titleMedium: { fontSize: "1rem", fontWeight: 500, lineHeight: "1.5rem", letterSpacing: "0.009em" },
14
+ titleSmall: { fontSize: "0.875rem", fontWeight: 500, lineHeight: "1.25rem", letterSpacing: "0.007em" },
15
+ bodyLarge: { fontSize: "1rem", fontWeight: 400, lineHeight: "1.5rem", letterSpacing: "0.009em" },
16
+ bodyMedium: { fontSize: "0.875rem", fontWeight: 400, lineHeight: "1.25rem", letterSpacing: "0.018em" },
17
+ bodySmall: { fontSize: "0.75rem", fontWeight: 400, lineHeight: "1rem", letterSpacing: "0.025em" },
18
+ labelLarge: { fontSize: "0.875rem", fontWeight: 500, lineHeight: "1.25rem", letterSpacing: "0.007em" },
19
+ labelMedium: { fontSize: "0.75rem", fontWeight: 500, lineHeight: "1rem", letterSpacing: "0.031em" },
20
+ labelSmall: { fontSize: "0.6875rem", fontWeight: 500, lineHeight: "1rem", letterSpacing: "0.045em" },
21
+ // Shortcuts
22
+ h1: { fontSize: "2rem", fontWeight: "bold", lineHeight: "2.5rem" },
23
+ h2: { fontSize: "1.5rem", fontWeight: "bold", lineHeight: "2rem" },
24
+ h3: { fontSize: "1.25rem", fontWeight: "bold", lineHeight: "1.75rem" },
25
+ h4: { fontSize: "1.125rem", fontWeight: "bold", lineHeight: "1.5rem" },
26
+ body: { fontSize: "1rem", fontWeight: "normal", lineHeight: "1.5rem" },
27
+ caption: { fontSize: "0.75rem", fontWeight: "normal", lineHeight: "1rem" },
28
+ button: { fontSize: "0.875rem", fontWeight: 500, lineHeight: "1rem", letterSpacing: "0.031em" },
29
+ code: { fontSize: "0.875rem", fontWeight: "normal", lineHeight: "1.4rem", letterSpacing: "-0.01em" },
30
+ };
31
+ function textStyleToCSS(style) {
32
+ return style;
33
+ }
34
+ //# sourceMappingURL=typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.js","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":";;;AA2CA,wCAEC;AApCY,QAAA,SAAS,GAAG;IACvB,YAAY,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAG,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAyB;IACjG,aAAa,EAAC,EAAE,QAAQ,EAAE,QAAQ,EAAG,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAyB;IACnG,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAyB;IAEpG,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAG,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAyB;IAClG,cAAc,EAAC,EAAE,QAAQ,EAAE,SAAS,EAAC,UAAU,E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B;IAE3H,YAAY;IACZ,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAM,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAyB;IAC7F,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAI,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAyB;IAC3F,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAG,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAyB;IAC9F,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAyB;IAC7F,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAI,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAyB;IAC/F,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAyB;IACjG,MAAM,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAyB;IACtH,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAyB;CACrF,CAAC;AAIzC,SAAgB,cAAc,CAAC,KAAmB;IAChD,OAAO,KAAsB,CAAC;AAChC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@jalvin/ui",
3
+ "version": "1.0.0",
4
+ "description": "Jalvin UI — Compose-style component library (Column, Row, Box, Button, Text, …)",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "peerDependencies": {
22
+ "react": ">=18.0.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^20.0.0",
26
+ "@types/react": "^18.0.0",
27
+ "react": "^19.2.5",
28
+ "typescript": "^5.4.0"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.json",
32
+ "typecheck": "tsc -p tsconfig.json --noEmit",
33
+ "clean": "rm -rf dist"
34
+ }
35
+ }