@work-rjkashyap/unified-ui 0.1.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/CHANGELOG.md +152 -0
- package/README.md +365 -0
- package/dist/chunk-2JFREULQ.cjs +29 -0
- package/dist/chunk-2RGLRX6K.cjs +279 -0
- package/dist/chunk-3HHJAYQI.cjs +469 -0
- package/dist/chunk-5S5DMH5G.cjs +5983 -0
- package/dist/chunk-BIW2RPDU.cjs +73 -0
- package/dist/chunk-CWETOWRM.mjs +456 -0
- package/dist/chunk-ECIGDEAH.cjs +140 -0
- package/dist/chunk-EO4WROWH.mjs +432 -0
- package/dist/chunk-EZ2L3XPS.mjs +83 -0
- package/dist/chunk-I74E52C5.mjs +271 -0
- package/dist/chunk-ITBG42M5.mjs +133 -0
- package/dist/chunk-IWJ5VMZ7.mjs +323 -0
- package/dist/chunk-KHON2AEM.cjs +342 -0
- package/dist/chunk-LSNKPQP7.cjs +58 -0
- package/dist/chunk-M2LNQWOB.mjs +63 -0
- package/dist/chunk-NMPHV6ZD.mjs +27 -0
- package/dist/chunk-QXR4VY7Q.cjs +268 -0
- package/dist/chunk-SSGN5QDC.mjs +248 -0
- package/dist/chunk-X2WCY4VB.mjs +5836 -0
- package/dist/chunk-XCKK6P46.cjs +91 -0
- package/dist/chunk-ZBN26FLO.mjs +46 -0
- package/dist/chunk-ZPIPKY2J.cjs +478 -0
- package/dist/components.cjs +477 -0
- package/dist/components.d.cts +3077 -0
- package/dist/components.d.ts +3077 -0
- package/dist/components.mjs +4 -0
- package/dist/index.cjs +1027 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.mjs +17 -0
- package/dist/motion-D9wQbcKL.d.cts +80 -0
- package/dist/motion-D9wQbcKL.d.ts +80 -0
- package/dist/motion.cjs +216 -0
- package/dist/motion.d.cts +104 -0
- package/dist/motion.d.ts +104 -0
- package/dist/motion.mjs +3 -0
- package/dist/primitives.cjs +57 -0
- package/dist/primitives.d.cts +390 -0
- package/dist/primitives.d.ts +390 -0
- package/dist/primitives.mjs +4 -0
- package/dist/theme.cjs +38 -0
- package/dist/theme.d.cts +117 -0
- package/dist/theme.d.ts +117 -0
- package/dist/theme.mjs +5 -0
- package/dist/tokens.cjs +137 -0
- package/dist/tokens.d.cts +30 -0
- package/dist/tokens.d.ts +30 -0
- package/dist/tokens.mjs +4 -0
- package/dist/typography-DlvVjEdE.d.cts +146 -0
- package/dist/typography-DlvVjEdE.d.ts +146 -0
- package/dist/utils.cjs +164 -0
- package/dist/utils.d.cts +521 -0
- package/dist/utils.d.ts +521 -0
- package/dist/utils.mjs +3 -0
- package/dist/z-index-B_nTQ3qo.d.cts +422 -0
- package/dist/z-index-B_nTQ3qo.d.ts +422 -0
- package/package.json +183 -0
- package/styles.css +500 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { zIndex, shadow, radius, semanticLight, shadowDark, semanticDark } from './chunk-IWJ5VMZ7.mjs';
|
|
2
|
+
import { fontFamily } from './chunk-ITBG42M5.mjs';
|
|
3
|
+
import { easingCSS, durationCSS } from './chunk-EZ2L3XPS.mjs';
|
|
4
|
+
import { createContext, useContext, useState, useEffect, useMemo, useCallback } from 'react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/theme/contract.ts
|
|
8
|
+
var PREFIX = "--ds";
|
|
9
|
+
var colorVarNames = {
|
|
10
|
+
background: `${PREFIX}-color-background`,
|
|
11
|
+
foreground: `${PREFIX}-color-foreground`,
|
|
12
|
+
surface: `${PREFIX}-color-surface`,
|
|
13
|
+
surfaceRaised: `${PREFIX}-color-surface-raised`,
|
|
14
|
+
surfaceOverlay: `${PREFIX}-color-surface-overlay`,
|
|
15
|
+
muted: `${PREFIX}-color-muted`,
|
|
16
|
+
mutedForeground: `${PREFIX}-color-muted-foreground`,
|
|
17
|
+
primary: `${PREFIX}-color-primary`,
|
|
18
|
+
primaryForeground: `${PREFIX}-color-primary-foreground`,
|
|
19
|
+
primaryHover: `${PREFIX}-color-primary-hover`,
|
|
20
|
+
primaryActive: `${PREFIX}-color-primary-active`,
|
|
21
|
+
primaryMuted: `${PREFIX}-color-primary-muted`,
|
|
22
|
+
primaryMutedForeground: `${PREFIX}-color-primary-muted-foreground`,
|
|
23
|
+
secondary: `${PREFIX}-color-secondary`,
|
|
24
|
+
secondaryForeground: `${PREFIX}-color-secondary-foreground`,
|
|
25
|
+
secondaryHover: `${PREFIX}-color-secondary-hover`,
|
|
26
|
+
secondaryActive: `${PREFIX}-color-secondary-active`,
|
|
27
|
+
success: `${PREFIX}-color-success`,
|
|
28
|
+
successForeground: `${PREFIX}-color-success-foreground`,
|
|
29
|
+
successMuted: `${PREFIX}-color-success-muted`,
|
|
30
|
+
successMutedForeground: `${PREFIX}-color-success-muted-foreground`,
|
|
31
|
+
warning: `${PREFIX}-color-warning`,
|
|
32
|
+
warningForeground: `${PREFIX}-color-warning-foreground`,
|
|
33
|
+
warningMuted: `${PREFIX}-color-warning-muted`,
|
|
34
|
+
warningMutedForeground: `${PREFIX}-color-warning-muted-foreground`,
|
|
35
|
+
danger: `${PREFIX}-color-danger`,
|
|
36
|
+
dangerForeground: `${PREFIX}-color-danger-foreground`,
|
|
37
|
+
dangerHover: `${PREFIX}-color-danger-hover`,
|
|
38
|
+
dangerActive: `${PREFIX}-color-danger-active`,
|
|
39
|
+
dangerMuted: `${PREFIX}-color-danger-muted`,
|
|
40
|
+
dangerMutedForeground: `${PREFIX}-color-danger-muted-foreground`,
|
|
41
|
+
info: `${PREFIX}-color-info`,
|
|
42
|
+
infoForeground: `${PREFIX}-color-info-foreground`,
|
|
43
|
+
infoMuted: `${PREFIX}-color-info-muted`,
|
|
44
|
+
infoMutedForeground: `${PREFIX}-color-info-muted-foreground`,
|
|
45
|
+
border: `${PREFIX}-color-border`,
|
|
46
|
+
borderMuted: `${PREFIX}-color-border-muted`,
|
|
47
|
+
borderStrong: `${PREFIX}-color-border-strong`,
|
|
48
|
+
focusRing: `${PREFIX}-color-focus-ring`,
|
|
49
|
+
input: `${PREFIX}-color-input`,
|
|
50
|
+
inputForeground: `${PREFIX}-color-input-foreground`,
|
|
51
|
+
inputPlaceholder: `${PREFIX}-color-input-placeholder`,
|
|
52
|
+
disabled: `${PREFIX}-color-disabled`,
|
|
53
|
+
disabledForeground: `${PREFIX}-color-disabled-foreground`
|
|
54
|
+
};
|
|
55
|
+
var radiusVarNames = {
|
|
56
|
+
none: `${PREFIX}-radius-none`,
|
|
57
|
+
sm: `${PREFIX}-radius-sm`,
|
|
58
|
+
md: `${PREFIX}-radius-md`,
|
|
59
|
+
lg: `${PREFIX}-radius-lg`,
|
|
60
|
+
xl: `${PREFIX}-radius-xl`,
|
|
61
|
+
full: `${PREFIX}-radius-full`
|
|
62
|
+
};
|
|
63
|
+
var shadowVarNames = {
|
|
64
|
+
none: `${PREFIX}-shadow-none`,
|
|
65
|
+
xs: `${PREFIX}-shadow-xs`,
|
|
66
|
+
sm: `${PREFIX}-shadow-sm`,
|
|
67
|
+
md: `${PREFIX}-shadow-md`,
|
|
68
|
+
lg: `${PREFIX}-shadow-lg`,
|
|
69
|
+
xl: `${PREFIX}-shadow-xl`,
|
|
70
|
+
"2xl": `${PREFIX}-shadow-2xl`,
|
|
71
|
+
focusRing: `${PREFIX}-shadow-focus-ring`
|
|
72
|
+
};
|
|
73
|
+
var zIndexVarNames = {
|
|
74
|
+
base: `${PREFIX}-z-base`,
|
|
75
|
+
dropdown: `${PREFIX}-z-dropdown`,
|
|
76
|
+
sticky: `${PREFIX}-z-sticky`,
|
|
77
|
+
overlay: `${PREFIX}-z-overlay`,
|
|
78
|
+
modal: `${PREFIX}-z-modal`,
|
|
79
|
+
popover: `${PREFIX}-z-popover`,
|
|
80
|
+
toast: `${PREFIX}-z-toast`,
|
|
81
|
+
tooltip: `${PREFIX}-z-tooltip`,
|
|
82
|
+
max: `${PREFIX}-z-max`
|
|
83
|
+
};
|
|
84
|
+
var durationVarNames = {
|
|
85
|
+
instant: `${PREFIX}-duration-instant`,
|
|
86
|
+
fast: `${PREFIX}-duration-fast`,
|
|
87
|
+
moderate: `${PREFIX}-duration-moderate`,
|
|
88
|
+
normal: `${PREFIX}-duration-normal`,
|
|
89
|
+
slow: `${PREFIX}-duration-slow`,
|
|
90
|
+
slower: `${PREFIX}-duration-slower`,
|
|
91
|
+
slowest: `${PREFIX}-duration-slowest`
|
|
92
|
+
};
|
|
93
|
+
var easingVarNames = {
|
|
94
|
+
standard: `${PREFIX}-easing-standard`,
|
|
95
|
+
decelerate: `${PREFIX}-easing-decelerate`,
|
|
96
|
+
accelerate: `${PREFIX}-easing-accelerate`,
|
|
97
|
+
emphasize: `${PREFIX}-easing-emphasize`,
|
|
98
|
+
linear: `${PREFIX}-easing-linear`,
|
|
99
|
+
snap: `${PREFIX}-easing-snap`
|
|
100
|
+
};
|
|
101
|
+
var fontFamilyVarNames = {
|
|
102
|
+
display: `${PREFIX}-font-display`,
|
|
103
|
+
sans: `${PREFIX}-font-sans`,
|
|
104
|
+
serif: `${PREFIX}-font-serif`,
|
|
105
|
+
mono: `${PREFIX}-font-mono`,
|
|
106
|
+
inherit: `${PREFIX}-font-inherit`
|
|
107
|
+
};
|
|
108
|
+
function mapRecord(varNames, values) {
|
|
109
|
+
const result = {};
|
|
110
|
+
for (const key of Object.keys(varNames)) {
|
|
111
|
+
result[varNames[key]] = values[key];
|
|
112
|
+
}
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
function buildLightThemeVars() {
|
|
116
|
+
return {
|
|
117
|
+
...mapRecord(colorVarNames, semanticLight),
|
|
118
|
+
...mapRecord(radiusVarNames, radius),
|
|
119
|
+
...mapRecord(shadowVarNames, shadow),
|
|
120
|
+
...mapRecord(zIndexVarNames, zIndex),
|
|
121
|
+
...mapRecord(durationVarNames, durationCSS),
|
|
122
|
+
...mapRecord(easingVarNames, easingCSS),
|
|
123
|
+
...mapRecord(fontFamilyVarNames, fontFamily)
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function buildDarkThemeVars() {
|
|
127
|
+
return {
|
|
128
|
+
...mapRecord(colorVarNames, semanticDark),
|
|
129
|
+
...mapRecord(radiusVarNames, radius),
|
|
130
|
+
...mapRecord(shadowVarNames, shadowDark),
|
|
131
|
+
...mapRecord(zIndexVarNames, zIndex),
|
|
132
|
+
...mapRecord(durationVarNames, durationCSS),
|
|
133
|
+
...mapRecord(easingVarNames, easingCSS),
|
|
134
|
+
...mapRecord(fontFamilyVarNames, fontFamily)
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function varsToCSS(vars) {
|
|
138
|
+
return Object.entries(vars).map(([prop, value]) => ` ${prop}: ${value};`).join("\n");
|
|
139
|
+
}
|
|
140
|
+
function buildThemeCSS() {
|
|
141
|
+
const lightVars = buildLightThemeVars();
|
|
142
|
+
const darkVars = buildDarkThemeVars();
|
|
143
|
+
return `:root {
|
|
144
|
+
${varsToCSS(lightVars)}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.dark {
|
|
148
|
+
${varsToCSS(darkVars)}
|
|
149
|
+
}`;
|
|
150
|
+
}
|
|
151
|
+
var contract = {
|
|
152
|
+
color: colorVarNames,
|
|
153
|
+
radius: radiusVarNames,
|
|
154
|
+
shadow: shadowVarNames,
|
|
155
|
+
zIndex: zIndexVarNames,
|
|
156
|
+
duration: durationVarNames,
|
|
157
|
+
easing: easingVarNames,
|
|
158
|
+
fontFamily: fontFamilyVarNames
|
|
159
|
+
};
|
|
160
|
+
var cssVar = {
|
|
161
|
+
/** Returns `rgb(var(--ds-color-<key>))` for use in style props */
|
|
162
|
+
color: (key) => `rgb(var(${colorVarNames[key]}))`,
|
|
163
|
+
/** Returns `rgb(var(--ds-color-<key>) / <alpha>)` for colors with opacity */
|
|
164
|
+
colorAlpha: (key, alpha) => `rgb(var(${colorVarNames[key]}) / ${alpha})`,
|
|
165
|
+
/** Returns `var(--ds-radius-<key>)` */
|
|
166
|
+
radius: (key) => `var(${radiusVarNames[key]})`,
|
|
167
|
+
/** Returns `var(--ds-shadow-<key>)` */
|
|
168
|
+
shadow: (key) => `var(${shadowVarNames[key]})`,
|
|
169
|
+
/** Returns `var(--ds-z-<key>)` */
|
|
170
|
+
zIndex: (key) => `var(${zIndexVarNames[key]})`,
|
|
171
|
+
/** Returns `var(--ds-duration-<key>)` */
|
|
172
|
+
duration: (key) => `var(${durationVarNames[key]})`,
|
|
173
|
+
/** Returns `var(--ds-easing-<key>)` */
|
|
174
|
+
easing: (key) => `var(${easingVarNames[key]})`,
|
|
175
|
+
/** Returns `var(--ds-font-<key>)` */
|
|
176
|
+
fontFamily: (key) => `var(${fontFamilyVarNames[key]})`,
|
|
177
|
+
/** Returns the raw `var(--ds-color-<key>)` channels without rgb() wrapping */
|
|
178
|
+
colorChannels: (key) => `var(${colorVarNames[key]})`
|
|
179
|
+
};
|
|
180
|
+
var DSThemeContext = createContext(null);
|
|
181
|
+
function useDSTheme() {
|
|
182
|
+
const ctx = useContext(DSThemeContext);
|
|
183
|
+
if (!ctx) {
|
|
184
|
+
throw new Error(
|
|
185
|
+
"useDSTheme must be used within a <DSThemeProvider>. Wrap your application (or layout) with <DSThemeProvider>."
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return ctx;
|
|
189
|
+
}
|
|
190
|
+
function getSystemPreference() {
|
|
191
|
+
if (typeof window === "undefined") return "light";
|
|
192
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
193
|
+
}
|
|
194
|
+
function resolveTheme(theme) {
|
|
195
|
+
if (theme === "system") return getSystemPreference();
|
|
196
|
+
return theme;
|
|
197
|
+
}
|
|
198
|
+
var STORAGE_KEY = "ds-theme-preference";
|
|
199
|
+
function getStoredTheme() {
|
|
200
|
+
if (typeof window === "undefined") return "system";
|
|
201
|
+
try {
|
|
202
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
203
|
+
if (stored === "light" || stored === "dark" || stored === "system") {
|
|
204
|
+
return stored;
|
|
205
|
+
}
|
|
206
|
+
} catch {
|
|
207
|
+
}
|
|
208
|
+
return "system";
|
|
209
|
+
}
|
|
210
|
+
function storeTheme(theme) {
|
|
211
|
+
try {
|
|
212
|
+
localStorage.setItem(STORAGE_KEY, theme);
|
|
213
|
+
} catch {
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
function DSThemeProvider({
|
|
217
|
+
children,
|
|
218
|
+
defaultTheme,
|
|
219
|
+
manageHtmlClass = false
|
|
220
|
+
}) {
|
|
221
|
+
const [theme, setThemeState] = useState(
|
|
222
|
+
() => defaultTheme ?? getStoredTheme()
|
|
223
|
+
);
|
|
224
|
+
const [systemPreference, setSystemPreference] = useState("light");
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
setSystemPreference(getSystemPreference());
|
|
227
|
+
const mql = window.matchMedia("(prefers-color-scheme: dark)");
|
|
228
|
+
const handler = (e) => {
|
|
229
|
+
setSystemPreference(e.matches ? "dark" : "light");
|
|
230
|
+
};
|
|
231
|
+
mql.addEventListener("change", handler);
|
|
232
|
+
return () => mql.removeEventListener("change", handler);
|
|
233
|
+
}, []);
|
|
234
|
+
const resolvedTheme = useMemo(
|
|
235
|
+
() => theme === "system" ? systemPreference : theme,
|
|
236
|
+
[theme, systemPreference]
|
|
237
|
+
);
|
|
238
|
+
useEffect(() => {
|
|
239
|
+
if (!manageHtmlClass) return;
|
|
240
|
+
const root = document.documentElement;
|
|
241
|
+
if (resolvedTheme === "dark") {
|
|
242
|
+
root.classList.add("dark");
|
|
243
|
+
} else {
|
|
244
|
+
root.classList.remove("dark");
|
|
245
|
+
}
|
|
246
|
+
}, [resolvedTheme, manageHtmlClass]);
|
|
247
|
+
const setTheme = useCallback((newTheme) => {
|
|
248
|
+
setThemeState(newTheme);
|
|
249
|
+
storeTheme(newTheme);
|
|
250
|
+
}, []);
|
|
251
|
+
const toggleTheme = useCallback(() => {
|
|
252
|
+
setThemeState((current) => {
|
|
253
|
+
const resolved = resolveTheme(current);
|
|
254
|
+
const next = resolved === "dark" ? "light" : "dark";
|
|
255
|
+
storeTheme(next);
|
|
256
|
+
return next;
|
|
257
|
+
});
|
|
258
|
+
}, []);
|
|
259
|
+
const value = useMemo(
|
|
260
|
+
() => ({
|
|
261
|
+
theme,
|
|
262
|
+
resolvedTheme,
|
|
263
|
+
setTheme,
|
|
264
|
+
toggleTheme
|
|
265
|
+
}),
|
|
266
|
+
[theme, resolvedTheme, setTheme, toggleTheme]
|
|
267
|
+
);
|
|
268
|
+
return /* @__PURE__ */ jsx(DSThemeContext.Provider, { value, children });
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export { DSThemeProvider, buildDarkThemeVars, buildLightThemeVars, buildThemeCSS, contract, cssVar, useDSTheme };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// src/tokens/typography.ts
|
|
2
|
+
var fontFamily = {
|
|
3
|
+
/** Display — used for hero headings, marketing text, landing pages */
|
|
4
|
+
display: "'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
5
|
+
/** Sans — primary UI typeface for all interface text */
|
|
6
|
+
sans: "'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
7
|
+
/** Serif — long-form reading, editorial content, blog posts */
|
|
8
|
+
serif: "'Lora', Georgia, 'Times New Roman', serif",
|
|
9
|
+
/** Mono — code blocks, technical values, tabular data */
|
|
10
|
+
mono: "'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace",
|
|
11
|
+
/** Inherit — use parent's font (escape hatch for third-party integration) */
|
|
12
|
+
inherit: "inherit"
|
|
13
|
+
};
|
|
14
|
+
var fontSize = {
|
|
15
|
+
xs: "12px",
|
|
16
|
+
sm: "14px",
|
|
17
|
+
base: "16px",
|
|
18
|
+
lg: "18px",
|
|
19
|
+
xl: "20px",
|
|
20
|
+
"2xl": "24px",
|
|
21
|
+
"3xl": "30px"
|
|
22
|
+
};
|
|
23
|
+
var lineHeight = {
|
|
24
|
+
none: "1",
|
|
25
|
+
tight: "1.25",
|
|
26
|
+
snug: "1.375",
|
|
27
|
+
normal: "1.5",
|
|
28
|
+
relaxed: "1.625",
|
|
29
|
+
/** Fixed pixel values for precise control */
|
|
30
|
+
"16": "16px",
|
|
31
|
+
"20": "20px",
|
|
32
|
+
"24": "24px",
|
|
33
|
+
"28": "28px",
|
|
34
|
+
"32": "32px",
|
|
35
|
+
"36": "36px"
|
|
36
|
+
};
|
|
37
|
+
var fontWeight = {
|
|
38
|
+
regular: "400",
|
|
39
|
+
medium: "500",
|
|
40
|
+
semibold: "600",
|
|
41
|
+
bold: "700"
|
|
42
|
+
};
|
|
43
|
+
var letterSpacing = {
|
|
44
|
+
tighter: "-0.05em",
|
|
45
|
+
tight: "-0.025em",
|
|
46
|
+
normal: "0em",
|
|
47
|
+
wide: "0.025em",
|
|
48
|
+
wider: "0.05em"
|
|
49
|
+
};
|
|
50
|
+
var typographyVariants = {
|
|
51
|
+
/** Page titles — 30px bold, tight leading, sans font */
|
|
52
|
+
heading1: {
|
|
53
|
+
fontSize: fontSize["3xl"],
|
|
54
|
+
lineHeight: lineHeight["36"],
|
|
55
|
+
fontWeight: fontWeight.bold,
|
|
56
|
+
letterSpacing: letterSpacing.tight,
|
|
57
|
+
fontFamily: "sans"
|
|
58
|
+
},
|
|
59
|
+
/** Section titles — 24px semibold, sans font */
|
|
60
|
+
heading2: {
|
|
61
|
+
fontSize: fontSize["2xl"],
|
|
62
|
+
lineHeight: lineHeight["32"],
|
|
63
|
+
fontWeight: fontWeight.semibold,
|
|
64
|
+
letterSpacing: letterSpacing.tight,
|
|
65
|
+
fontFamily: "sans"
|
|
66
|
+
},
|
|
67
|
+
/** Subsection titles — 20px semibold, sans font */
|
|
68
|
+
heading3: {
|
|
69
|
+
fontSize: fontSize.xl,
|
|
70
|
+
lineHeight: lineHeight["28"],
|
|
71
|
+
fontWeight: fontWeight.semibold,
|
|
72
|
+
letterSpacing: letterSpacing.normal,
|
|
73
|
+
fontFamily: "sans"
|
|
74
|
+
},
|
|
75
|
+
/** Card titles, sidebar headings — 18px medium, sans font */
|
|
76
|
+
subheading: {
|
|
77
|
+
fontSize: fontSize.lg,
|
|
78
|
+
lineHeight: lineHeight["28"],
|
|
79
|
+
fontWeight: fontWeight.medium,
|
|
80
|
+
letterSpacing: letterSpacing.normal,
|
|
81
|
+
fontFamily: "sans"
|
|
82
|
+
},
|
|
83
|
+
/** Default body text — 16px regular, sans font */
|
|
84
|
+
body: {
|
|
85
|
+
fontSize: fontSize.base,
|
|
86
|
+
lineHeight: lineHeight["24"],
|
|
87
|
+
fontWeight: fontWeight.regular,
|
|
88
|
+
letterSpacing: letterSpacing.normal,
|
|
89
|
+
fontFamily: "sans"
|
|
90
|
+
},
|
|
91
|
+
/** Compact body text — 14px regular, sans font */
|
|
92
|
+
bodySm: {
|
|
93
|
+
fontSize: fontSize.sm,
|
|
94
|
+
lineHeight: lineHeight["20"],
|
|
95
|
+
fontWeight: fontWeight.regular,
|
|
96
|
+
letterSpacing: letterSpacing.normal,
|
|
97
|
+
fontFamily: "sans"
|
|
98
|
+
},
|
|
99
|
+
/** Captions, helper text, timestamps — 12px regular, sans font */
|
|
100
|
+
caption: {
|
|
101
|
+
fontSize: fontSize.xs,
|
|
102
|
+
lineHeight: lineHeight["16"],
|
|
103
|
+
fontWeight: fontWeight.regular,
|
|
104
|
+
letterSpacing: letterSpacing.wide,
|
|
105
|
+
fontFamily: "sans"
|
|
106
|
+
},
|
|
107
|
+
/** Form labels, badges — 14px medium, sans font */
|
|
108
|
+
label: {
|
|
109
|
+
fontSize: fontSize.sm,
|
|
110
|
+
lineHeight: lineHeight["20"],
|
|
111
|
+
fontWeight: fontWeight.medium,
|
|
112
|
+
letterSpacing: letterSpacing.normal,
|
|
113
|
+
fontFamily: "sans"
|
|
114
|
+
},
|
|
115
|
+
/** Overline / eyebrow text — 12px semibold, uppercased in usage, sans font */
|
|
116
|
+
overline: {
|
|
117
|
+
fontSize: fontSize.xs,
|
|
118
|
+
lineHeight: lineHeight["16"],
|
|
119
|
+
fontWeight: fontWeight.semibold,
|
|
120
|
+
letterSpacing: letterSpacing.wider,
|
|
121
|
+
fontFamily: "sans"
|
|
122
|
+
},
|
|
123
|
+
/** Code / monospace inline text — 14px regular, mono font */
|
|
124
|
+
code: {
|
|
125
|
+
fontSize: fontSize.sm,
|
|
126
|
+
lineHeight: lineHeight["20"],
|
|
127
|
+
fontWeight: fontWeight.regular,
|
|
128
|
+
letterSpacing: letterSpacing.normal,
|
|
129
|
+
fontFamily: "mono"
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export { fontFamily, fontSize, fontWeight, letterSpacing, lineHeight, typographyVariants };
|