файл пакета→ .shtukbase/packages/keer-ui/library/lib/utils.ts
library/lib/utils.ts
43 строки, 1000 Б.
Файл как есть в пакете: код и комментарии в нём не переводятся.
- import { createCn } from "cn/config";
- /** The names of the text styles from styles/typography.css. */
- export const TEXT_STYLES = [
- "page-title",
- "section-title",
- "card-title",
- "metric",
- "body",
- "body-strong",
- "label",
- "caption",
- "field-label",
- "overline",
- "code",
- "table-head",
- "voice",
- "row-title",
- "row",
- "chip",
- "nav",
- "nav-strong",
- "brand",
- "account",
- "composer",
- ] as const;
- /**
- * Joining classes. Text styles (`text-body`, `text-caption`…) are an alloy of size, weight and spacing:
- * for merging they are a “text size”, not a color, otherwise `text-body text-muted-foreground` would lose the style.
- */
- export const cn = createCn({
- extend: {
- classGroups: {
- "font-size": [{ text: [...TEXT_STYLES] }],
- // The mockup weights between the usual ones: 450 and 550.
- "font-weight": [{ font: ["book", "strong"] }],
- },
- conflictingClassGroups: {
- "font-size": ["font-weight", "leading", "tracking"],
- },
- },
- });