@eduardoalvarez/arrecife 0.5.1 → 0.7.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 +114 -0
- package/README.md +868 -467
- package/dist/brand/index.cjs +112 -95
- package/dist/brand/index.d.cts +40 -39
- package/dist/brand/index.d.ts +40 -39
- package/dist/brand/index.js +5 -4
- package/dist/catalog-D13txprv.d.cts +78 -0
- package/dist/catalog-D13txprv.d.ts +78 -0
- package/dist/chart/index.cjs +100 -83
- package/dist/chart/index.d.cts +66 -66
- package/dist/chart/index.d.ts +66 -66
- package/dist/chart/index.js +14 -12
- package/dist/chunk-2WPWEIMD.js +27 -0
- package/dist/chunk-45HVCTB7.js +70 -0
- package/dist/{chunk-ZEOQKRQ7.js → chunk-727HCBD4.js} +1 -1
- package/dist/chunk-CKRSQPTX.js +36 -0
- package/dist/chunk-E6KFUSKB.js +144 -0
- package/dist/chunk-GCRII2KQ.js +86 -0
- package/dist/{chunk-YZ2SDOVZ.js → chunk-JN3IS5OS.js} +30 -30
- package/dist/chunk-ODBFN44D.js +45 -0
- package/dist/chunk-OMKSESQB.js +300 -0
- package/dist/{chunk-VPT32GPG.js → chunk-TA7TLWW4.js} +2 -2
- package/dist/chunk-WGNIRIN7.js +42 -0
- package/dist/doctor.mjs +166 -0
- package/dist/form/index.cjs +109 -92
- package/dist/form/index.d.cts +43 -42
- package/dist/form/index.d.ts +43 -42
- package/dist/form/index.js +25 -23
- package/dist/icons/index.cjs +149 -0
- package/dist/icons/index.d.cts +94 -0
- package/dist/icons/index.d.ts +94 -0
- package/dist/icons/index.js +28 -0
- package/dist/index-DlAO2JZs.d.cts +47 -0
- package/dist/index-DlAO2JZs.d.ts +47 -0
- package/dist/index.cjs +1292 -983
- package/dist/index.d.cts +927 -806
- package/dist/index.d.ts +927 -806
- package/dist/index.js +809 -778
- package/dist/{label-DuTvJGxD.d.ts → label-MgHFKnFy.d.cts} +3 -3
- package/dist/{label-DuTvJGxD.d.cts → label-MgHFKnFy.d.ts} +3 -3
- package/dist/og/index.cjs +133 -132
- package/dist/og/index.d.cts +93 -89
- package/dist/og/index.d.ts +93 -89
- package/dist/og/index.js +106 -106
- package/dist/shiki/index.cjs +28 -30
- package/dist/shiki/index.d.cts +4 -4
- package/dist/shiki/index.d.ts +4 -4
- package/dist/shiki/index.js +12 -12
- package/dist/social/index.cjs +67 -0
- package/dist/social/index.d.cts +2 -0
- package/dist/social/index.d.ts +2 -0
- package/dist/social/index.js +2 -0
- package/dist/theme/index.cjs +97 -0
- package/dist/theme/index.d.cts +144 -0
- package/dist/theme/index.d.ts +144 -0
- package/dist/theme/index.js +2 -0
- package/dist/tokens/index.cjs +159 -88
- package/dist/tokens/index.d.cts +277 -165
- package/dist/tokens/index.d.ts +277 -165
- package/dist/tokens/index.js +2 -2
- package/dist/tokens/theme.css +165 -100
- package/dist/variants/index.cjs +195 -0
- package/dist/variants/index.d.cts +195 -0
- package/dist/variants/index.d.ts +195 -0
- package/dist/variants/index.js +3 -0
- package/llms.txt +1145 -746
- package/package.json +42 -11
- package/dist/catalogo-Du5ID-Hi.d.cts +0 -77
- package/dist/catalogo-Du5ID-Hi.d.ts +0 -77
- package/dist/chunk-E3OMP2DL.js +0 -36
- package/dist/chunk-KPZNNMV5.js +0 -83
- package/dist/chunk-NHS7ETKJ.js +0 -27
- package/dist/chunk-TSPJOM6K.js +0 -229
- package/dist/chunk-UOWIDFCB.js +0 -81
- package/dist/tema/index.cjs +0 -94
- package/dist/tema/index.d.cts +0 -110
- package/dist/tema/index.d.ts +0 -110
- package/dist/tema/index.js +0 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/brand/catalog.ts
|
|
2
|
+
var faces = {
|
|
3
|
+
annoyed: "face-annoyed.png",
|
|
4
|
+
confused: "face-confused.png",
|
|
5
|
+
hearts: "face-hearts.png",
|
|
6
|
+
laughing: "face-laughing.png",
|
|
7
|
+
shades: "face-shades.png",
|
|
8
|
+
waiting: "face-waiting.png",
|
|
9
|
+
wink: "face-wink.png"
|
|
10
|
+
};
|
|
11
|
+
var poses = {
|
|
12
|
+
desk: "pose-desk.png",
|
|
13
|
+
"laptop-coffee": "pose-laptop-coffee.png",
|
|
14
|
+
peek: "pose-peek.png",
|
|
15
|
+
surf: "pose-surf.png"
|
|
16
|
+
};
|
|
17
|
+
var fins = {
|
|
18
|
+
/** Two blues. For light backgrounds. */
|
|
19
|
+
color: "fin.png",
|
|
20
|
+
/** Single-ink silhouette. For dark backgrounds. */
|
|
21
|
+
foam: "fin-foam.png"
|
|
22
|
+
};
|
|
23
|
+
var faceUsage = {
|
|
24
|
+
wink: "Forms, a friendly footnote",
|
|
25
|
+
waiting: "No results, waiting state",
|
|
26
|
+
laughing: "Success, subscription confirmed",
|
|
27
|
+
shades: "Module or course completed",
|
|
28
|
+
hearts: "Gratitude, article OG",
|
|
29
|
+
confused: "404, page not found",
|
|
30
|
+
annoyed: "Server error, build failure"
|
|
31
|
+
};
|
|
32
|
+
var ASSETS_PATH = "/brand";
|
|
33
|
+
var faceList = Object.keys(faces);
|
|
34
|
+
var poseList = Object.keys(poses);
|
|
35
|
+
|
|
36
|
+
export { ASSETS_PATH, faceList, faceUsage, faces, fins, poseList, poses };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
// src/variants/button.ts
|
|
4
|
+
var button = cva(
|
|
5
|
+
[
|
|
6
|
+
"inline-flex cursor-pointer items-center justify-center gap-step-xs whitespace-nowrap select-none",
|
|
7
|
+
"rounded-control font-sans font-medium",
|
|
8
|
+
"transition-standard",
|
|
9
|
+
"focus-ring",
|
|
10
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
11
|
+
"[&_svg]:shrink-0"
|
|
12
|
+
],
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
variant: {
|
|
16
|
+
primary: [
|
|
17
|
+
"bg-accent text-accent-on hover:bg-accent-hover",
|
|
18
|
+
"light:bg-brand-hull light:text-accent-on light:hover:bg-text-secondary"
|
|
19
|
+
],
|
|
20
|
+
// The one control whose focus ring is not biolume. It is the system's
|
|
21
|
+
// only sand fill, and a biolume ring three pixels off a sand button puts
|
|
22
|
+
// both of the brand's accents in the same glance. See `decisions.md` § 37.
|
|
23
|
+
conversion: "bg-warm text-warm-on hover:bg-warm-hover focus-ring-warm",
|
|
24
|
+
secondary: [
|
|
25
|
+
"border-hairline-hover border bg-transparent text-text-primary",
|
|
26
|
+
"hover:border-accent hover:text-accent"
|
|
27
|
+
],
|
|
28
|
+
tertiary: [
|
|
29
|
+
"bg-transparent font-mono font-normal text-text-secondary",
|
|
30
|
+
"hover:text-accent hover:underline hover:underline-offset-4"
|
|
31
|
+
],
|
|
32
|
+
/** Irreversible only. Never for «cancel» on a form. */
|
|
33
|
+
destructive: "bg-danger text-danger-on hover:bg-danger-hover",
|
|
34
|
+
destructiveOutline: [
|
|
35
|
+
"border-danger text-danger border bg-transparent",
|
|
36
|
+
"hover:bg-danger hover:text-danger-on"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
sm: "h-8 px-control-sm text-label",
|
|
41
|
+
md: "h-10 px-control-md text-ui",
|
|
42
|
+
lg: "h-12 px-control-lg text-lead",
|
|
43
|
+
/** A 42×42 square, no text. `aria-label` is mandatory on it. */
|
|
44
|
+
icon: "size-control-icon p-0",
|
|
45
|
+
/** 32×32, for a table row. Same height as `sm`, and same mandatory `aria-label`. */
|
|
46
|
+
"icon-sm": "size-control-icon-sm p-0"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
compoundVariants: [
|
|
50
|
+
/**
|
|
51
|
+
* The tertiary has no box: neither horizontal padding nor control height.
|
|
52
|
+
* It goes here rather than as `px-0` on the variant so it beats the size's
|
|
53
|
+
* `px-*` without depending on the order cva concatenates classes in.
|
|
54
|
+
*/
|
|
55
|
+
{ variant: "tertiary", size: ["sm", "md", "lg"], class: "h-auto px-0" }
|
|
56
|
+
],
|
|
57
|
+
defaultVariants: { variant: "primary", size: "md" }
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
var badge = cva(
|
|
61
|
+
["inline-flex items-center gap-step-xs", "rounded-chip px-step-xs py-0.5", "font-sans text-tag", "transition-standard"],
|
|
62
|
+
{
|
|
63
|
+
variants: {
|
|
64
|
+
variant: {
|
|
65
|
+
neutral: "bg-surface-raised text-text-secondary",
|
|
66
|
+
accent: "bg-accent/8 text-text-primary",
|
|
67
|
+
warm: "bg-warm/8 text-text-primary",
|
|
68
|
+
success: "bg-success/8 text-text-primary",
|
|
69
|
+
warning: "bg-warning/8 text-text-primary",
|
|
70
|
+
error: "bg-error/8 text-text-primary"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: { variant: "neutral" }
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
var category = cva(
|
|
77
|
+
[
|
|
78
|
+
"inline-flex items-center gap-step-xs",
|
|
79
|
+
"rounded-pill px-step-sm py-0.5",
|
|
80
|
+
"font-mono text-chip",
|
|
81
|
+
"border transition-standard"
|
|
82
|
+
],
|
|
83
|
+
{
|
|
84
|
+
variants: {
|
|
85
|
+
active: {
|
|
86
|
+
false: "border-warm/28 bg-transparent text-warm",
|
|
87
|
+
true: "border-warm bg-warm text-warm-on"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: { active: false }
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
var metric = ["inline-flex items-center gap-step-xs", "rounded-pill", "font-mono text-chip text-text-muted"];
|
|
94
|
+
var alert = cva("w-full rounded-card border p-step-md font-sans text-ui", {
|
|
95
|
+
variants: {
|
|
96
|
+
variant: {
|
|
97
|
+
accent: "text-text-secondary",
|
|
98
|
+
success: "text-text-secondary",
|
|
99
|
+
warning: "text-text-secondary",
|
|
100
|
+
error: "text-text-secondary"
|
|
101
|
+
},
|
|
102
|
+
emphasis: {
|
|
103
|
+
subtle: "",
|
|
104
|
+
strong: ""
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
compoundVariants: [
|
|
108
|
+
{ variant: "accent", emphasis: "subtle", class: "border-accent/22 bg-accent/8" },
|
|
109
|
+
{ variant: "success", emphasis: "subtle", class: "border-success/22 bg-success/8" },
|
|
110
|
+
{ variant: "warning", emphasis: "subtle", class: "border-warning/22 bg-warning/8" },
|
|
111
|
+
{ variant: "error", emphasis: "subtle", class: "border-error/22 bg-error/8" },
|
|
112
|
+
{ variant: "accent", emphasis: "strong", class: "border-accent bg-accent/10" },
|
|
113
|
+
{ variant: "success", emphasis: "strong", class: "border-success bg-success/10" },
|
|
114
|
+
{ variant: "warning", emphasis: "strong", class: "border-warning bg-warning/10" },
|
|
115
|
+
{ variant: "error", emphasis: "strong", class: "border-error bg-error/10" }
|
|
116
|
+
],
|
|
117
|
+
defaultVariants: { variant: "accent", emphasis: "subtle" }
|
|
118
|
+
});
|
|
119
|
+
var avatar = cva(
|
|
120
|
+
"relative flex shrink-0 overflow-hidden rounded-pill bg-surface-raised border border-hairline",
|
|
121
|
+
{
|
|
122
|
+
variants: {
|
|
123
|
+
size: {
|
|
124
|
+
sm: "size-8",
|
|
125
|
+
md: "size-10",
|
|
126
|
+
lg: "size-14",
|
|
127
|
+
xl: "size-24"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
defaultVariants: { size: "md" }
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
// src/variants/card.ts
|
|
135
|
+
var CARD_SURFACE = "rounded-card border-hairline bg-surface border";
|
|
136
|
+
var CARD_HOVER = "transition-standard hover:border-hairline-hover";
|
|
137
|
+
var CARD = [
|
|
138
|
+
"group block cursor-pointer",
|
|
139
|
+
CARD_SURFACE,
|
|
140
|
+
CARD_HOVER,
|
|
141
|
+
"focus-ring"
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
export { CARD, CARD_HOVER, CARD_SURFACE, alert, avatar, badge, button, category, metric };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// src/theme/index.ts
|
|
2
|
+
var THEME_KEY = "arrecife-theme";
|
|
3
|
+
var THEME_ATTRIBUTE = "data-theme";
|
|
4
|
+
var THEME_EVENT = "arrecife:theme";
|
|
5
|
+
var isTheme = (value) => value === "dark" || value === "light";
|
|
6
|
+
function currentTheme() {
|
|
7
|
+
if (typeof document === "undefined") return "dark";
|
|
8
|
+
const set = document.documentElement.getAttribute(THEME_ATTRIBUTE);
|
|
9
|
+
return isTheme(set) ? set : "dark";
|
|
10
|
+
}
|
|
11
|
+
function storedTheme() {
|
|
12
|
+
if (typeof localStorage === "undefined") return null;
|
|
13
|
+
try {
|
|
14
|
+
const value = localStorage.getItem(THEME_KEY);
|
|
15
|
+
return isTheme(value) ? value : null;
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function preferredTheme({ base } = {}) {
|
|
21
|
+
const stored = storedTheme();
|
|
22
|
+
if (stored) return stored;
|
|
23
|
+
if (base) return base;
|
|
24
|
+
if (typeof matchMedia === "undefined") return "dark";
|
|
25
|
+
return matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark";
|
|
26
|
+
}
|
|
27
|
+
function applyTheme(theme, persist = true) {
|
|
28
|
+
if (typeof document === "undefined") return;
|
|
29
|
+
document.documentElement.setAttribute(THEME_ATTRIBUTE, theme);
|
|
30
|
+
document.documentElement.style.colorScheme = theme;
|
|
31
|
+
if (persist) {
|
|
32
|
+
try {
|
|
33
|
+
localStorage.setItem(THEME_KEY, theme);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
dispatchEvent(new CustomEvent(THEME_EVENT, { detail: theme }));
|
|
38
|
+
}
|
|
39
|
+
function toggleTheme() {
|
|
40
|
+
const next = currentTheme() === "dark" ? "light" : "dark";
|
|
41
|
+
applyTheme(next);
|
|
42
|
+
return next;
|
|
43
|
+
}
|
|
44
|
+
function watchTheme(onChange, options = {}) {
|
|
45
|
+
if (typeof window === "undefined") return () => {
|
|
46
|
+
};
|
|
47
|
+
const own = (event) => {
|
|
48
|
+
const detail = event.detail;
|
|
49
|
+
if (isTheme(detail)) onChange(detail);
|
|
50
|
+
};
|
|
51
|
+
const otherTab = (event) => {
|
|
52
|
+
if (event.key !== THEME_KEY) return;
|
|
53
|
+
const theme = isTheme(event.newValue) ? event.newValue : preferredTheme(options);
|
|
54
|
+
applyTheme(theme, false);
|
|
55
|
+
onChange(theme);
|
|
56
|
+
};
|
|
57
|
+
addEventListener(THEME_EVENT, own);
|
|
58
|
+
addEventListener("storage", otherTab);
|
|
59
|
+
return () => {
|
|
60
|
+
removeEventListener(THEME_EVENT, own);
|
|
61
|
+
removeEventListener("storage", otherTab);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function themeScript({ base } = {}) {
|
|
65
|
+
return [
|
|
66
|
+
"(function () {",
|
|
67
|
+
" var KEY = " + JSON.stringify(THEME_KEY) + ";",
|
|
68
|
+
" function resolve() {",
|
|
69
|
+
" try {",
|
|
70
|
+
" var stored = localStorage.getItem(KEY);",
|
|
71
|
+
' if (stored === "dark" || stored === "light") return stored;',
|
|
72
|
+
" } catch (e) {}",
|
|
73
|
+
base ? " return " + JSON.stringify(base) + ";" : ' return matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark";',
|
|
74
|
+
" }",
|
|
75
|
+
" function apply() {",
|
|
76
|
+
" var theme = resolve();",
|
|
77
|
+
" document.documentElement.setAttribute(" + JSON.stringify(THEME_ATTRIBUTE) + ", theme);",
|
|
78
|
+
" document.documentElement.style.colorScheme = theme;",
|
|
79
|
+
" }",
|
|
80
|
+
" apply();",
|
|
81
|
+
' document.addEventListener("astro:after-swap", apply);',
|
|
82
|
+
"})();"
|
|
83
|
+
].join("\n");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { THEME_ATTRIBUTE, THEME_EVENT, THEME_KEY, applyTheme, currentTheme, preferredTheme, storedTheme, themeScript, toggleTheme, watchTheme };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { naming, tagline } from './chunk-
|
|
1
|
+
import { cn } from './chunk-2WPWEIMD.js';
|
|
2
|
+
import { fins, ASSETS_PATH, poses, faces } from './chunk-CKRSQPTX.js';
|
|
3
|
+
import { naming, tagline } from './chunk-OMKSESQB.js';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
basePath =
|
|
6
|
+
function Isotype({
|
|
7
|
+
background = "dark",
|
|
8
|
+
basePath = ASSETS_PATH,
|
|
9
9
|
alt = "",
|
|
10
10
|
className,
|
|
11
11
|
...props
|
|
12
12
|
}) {
|
|
13
|
-
const
|
|
13
|
+
const file = background === "dark" ? fins.foam : fins.color;
|
|
14
14
|
return /* @__PURE__ */ jsx(
|
|
15
15
|
"img",
|
|
16
16
|
{
|
|
17
|
-
src: `${basePath}/${
|
|
17
|
+
src: `${basePath}/${file}`,
|
|
18
18
|
alt,
|
|
19
19
|
width: 147,
|
|
20
20
|
height: 111,
|
|
@@ -24,44 +24,44 @@ function Isotipo({
|
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
function Logo({
|
|
27
|
-
|
|
28
|
-
basePath =
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
background = "dark",
|
|
28
|
+
basePath = ASSETS_PATH,
|
|
29
|
+
isotypeOnly = false,
|
|
30
|
+
withTagline = false,
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
33
|
}) {
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
const withFin = /* @__PURE__ */ jsx(
|
|
35
|
+
Isotype,
|
|
36
36
|
{
|
|
37
|
-
|
|
37
|
+
background,
|
|
38
38
|
basePath,
|
|
39
|
-
alt:
|
|
40
|
-
className:
|
|
39
|
+
alt: isotypeOnly ? naming.wordmark : "",
|
|
40
|
+
className: withTagline ? "h-9 w-auto" : "h-7 w-auto"
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
const wordmark = /* @__PURE__ */ jsx("span", { className: "text-ui font-display text-text-primary font-bold tracking-[-0.02em]", children: naming.wordmark });
|
|
44
|
-
if (
|
|
45
|
-
return /* @__PURE__ */ jsx("span", { className: cn("gap-step-xs inline-flex items-center", className), ...props, children:
|
|
44
|
+
if (isotypeOnly) {
|
|
45
|
+
return /* @__PURE__ */ jsx("span", { className: cn("gap-step-xs inline-flex items-center", className), ...props, children: withFin });
|
|
46
46
|
}
|
|
47
|
-
if (
|
|
47
|
+
if (withTagline) {
|
|
48
48
|
return /* @__PURE__ */ jsxs("span", { className: cn("gap-step-sm inline-flex items-center", className), ...props, children: [
|
|
49
|
-
|
|
49
|
+
withFin,
|
|
50
50
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "bg-hairline h-8 w-px shrink-0" }),
|
|
51
51
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
52
52
|
wordmark,
|
|
53
|
-
/* @__PURE__ */ jsx("span", { className: "text-eyebrow font-mono text-text-muted uppercase", children: tagline.
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: "text-eyebrow font-mono text-text-muted uppercase", children: tagline.short })
|
|
54
54
|
] })
|
|
55
55
|
] });
|
|
56
56
|
}
|
|
57
57
|
return /* @__PURE__ */ jsxs("span", { className: cn("gap-step-xs inline-flex items-center", className), ...props, children: [
|
|
58
|
-
|
|
58
|
+
withFin,
|
|
59
59
|
wordmark
|
|
60
60
|
] });
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Mascot({
|
|
63
63
|
pose,
|
|
64
|
-
basePath =
|
|
64
|
+
basePath = ASSETS_PATH,
|
|
65
65
|
alt = "",
|
|
66
66
|
className,
|
|
67
67
|
...props
|
|
@@ -76,9 +76,9 @@ function Mascota({
|
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
basePath =
|
|
79
|
+
function MascotFace({
|
|
80
|
+
expression,
|
|
81
|
+
basePath = ASSETS_PATH,
|
|
82
82
|
alt = "",
|
|
83
83
|
className,
|
|
84
84
|
...props
|
|
@@ -86,7 +86,7 @@ function CaraDeMascota({
|
|
|
86
86
|
return /* @__PURE__ */ jsx(
|
|
87
87
|
"img",
|
|
88
88
|
{
|
|
89
|
-
src: `${basePath}/${
|
|
89
|
+
src: `${basePath}/${faces[expression]}`,
|
|
90
90
|
alt,
|
|
91
91
|
className: cn("h-auto w-full max-w-24 select-none", className),
|
|
92
92
|
...props
|
|
@@ -94,4 +94,4 @@ function CaraDeMascota({
|
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export {
|
|
97
|
+
export { Isotype, Logo, Mascot, MascotFace };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
// src/variants/typography.ts
|
|
4
|
+
var text = cva("", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
display: "text-display font-display",
|
|
8
|
+
// Large metrics: 46px of display. It is the only scale designed for a
|
|
9
|
+
// number, which is why its line height is 1.
|
|
10
|
+
stat: "text-stat font-display",
|
|
11
|
+
h1: "text-h1 font-display",
|
|
12
|
+
h2: "text-h2 font-display",
|
|
13
|
+
h3: "text-h3 font-display",
|
|
14
|
+
body: "text-body font-sans",
|
|
15
|
+
// 17px: the deck on interior pages and the large button.
|
|
16
|
+
lead: "text-lead font-sans",
|
|
17
|
+
ui: "text-ui font-sans",
|
|
18
|
+
label: "text-label font-sans",
|
|
19
|
+
// The two badge scales. `tag` is status (sans 12.5/500) and `chip` is
|
|
20
|
+
// category and metric (mono 11.5). Neither transforms the text.
|
|
21
|
+
tag: "text-tag font-sans",
|
|
22
|
+
chip: "text-chip font-mono",
|
|
23
|
+
// Mono with NO transform: dates, paths, versions, file names and the
|
|
24
|
+
// footer signature. It is the step that was missing, and the reason every
|
|
25
|
+
// call site ended up writing `variant="eyebrow" className="normal-case"`.
|
|
26
|
+
meta: "text-meta font-mono",
|
|
27
|
+
// `uppercase` does not fit in a size token: text-transform is not a
|
|
28
|
+
// modifier of --text-*. Which is why the variant sets it, not theme.css.
|
|
29
|
+
eyebrow: "text-eyebrow font-mono uppercase"
|
|
30
|
+
},
|
|
31
|
+
tone: {
|
|
32
|
+
primary: "text-text-primary",
|
|
33
|
+
secondary: "text-text-secondary",
|
|
34
|
+
muted: "text-text-muted",
|
|
35
|
+
accent: "text-accent",
|
|
36
|
+
warm: "text-warm",
|
|
37
|
+
success: "text-success",
|
|
38
|
+
warning: "text-warning",
|
|
39
|
+
error: "text-error"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: { variant: "body", tone: "primary" }
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export { text };
|