@eduardoalvarez/arrecife 0.5.0 → 0.6.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +706 -470
  3. package/dist/brand/index.cjs +112 -95
  4. package/dist/brand/index.d.cts +40 -39
  5. package/dist/brand/index.d.ts +40 -39
  6. package/dist/brand/index.js +5 -4
  7. package/dist/catalog-D13txprv.d.cts +78 -0
  8. package/dist/catalog-D13txprv.d.ts +78 -0
  9. package/dist/chart/index.cjs +100 -83
  10. package/dist/chart/index.d.cts +66 -66
  11. package/dist/chart/index.d.ts +66 -66
  12. package/dist/chart/index.js +14 -12
  13. package/dist/chunk-25YNFCIF.js +141 -0
  14. package/dist/{chunk-YZ2SDOVZ.js → chunk-6O3KWB6P.js} +30 -30
  15. package/dist/chunk-CKRSQPTX.js +36 -0
  16. package/dist/{chunk-ZEOQKRQ7.js → chunk-DKCN7BAL.js} +1 -1
  17. package/dist/chunk-GCRII2KQ.js +86 -0
  18. package/dist/chunk-JMOOFZ3B.js +42 -0
  19. package/dist/chunk-O4TAH7YJ.js +276 -0
  20. package/dist/chunk-ODBFN44D.js +45 -0
  21. package/dist/{chunk-VPT32GPG.js → chunk-PMN7NR3G.js} +2 -2
  22. package/dist/chunk-XKYHTOUJ.js +27 -0
  23. package/dist/form/index.cjs +109 -92
  24. package/dist/form/index.d.cts +43 -42
  25. package/dist/form/index.d.ts +43 -42
  26. package/dist/form/index.js +25 -23
  27. package/dist/index.cjs +1068 -929
  28. package/dist/index.d.cts +770 -773
  29. package/dist/index.d.ts +770 -773
  30. package/dist/index.js +629 -675
  31. package/dist/{label-DuTvJGxD.d.ts → label-MgHFKnFy.d.cts} +3 -3
  32. package/dist/{label-DuTvJGxD.d.cts → label-MgHFKnFy.d.ts} +3 -3
  33. package/dist/og/index.cjs +130 -130
  34. package/dist/og/index.d.cts +93 -89
  35. package/dist/og/index.d.ts +93 -89
  36. package/dist/og/index.js +106 -106
  37. package/dist/shiki/index.cjs +28 -30
  38. package/dist/shiki/index.d.cts +4 -4
  39. package/dist/shiki/index.d.ts +4 -4
  40. package/dist/shiki/index.js +12 -12
  41. package/dist/theme/index.cjs +97 -0
  42. package/dist/theme/index.d.cts +144 -0
  43. package/dist/theme/index.d.ts +144 -0
  44. package/dist/theme/index.js +2 -0
  45. package/dist/tokens/index.cjs +133 -86
  46. package/dist/tokens/index.d.cts +246 -161
  47. package/dist/tokens/index.d.ts +246 -161
  48. package/dist/tokens/index.js +2 -2
  49. package/dist/tokens/theme.css +133 -98
  50. package/dist/variants/index.cjs +192 -0
  51. package/dist/variants/index.d.cts +192 -0
  52. package/dist/variants/index.d.ts +192 -0
  53. package/dist/variants/index.js +3 -0
  54. package/llms.txt +810 -744
  55. package/package.json +20 -11
  56. package/dist/catalogo-Du5ID-Hi.d.cts +0 -77
  57. package/dist/catalogo-Du5ID-Hi.d.ts +0 -77
  58. package/dist/chunk-E3OMP2DL.js +0 -36
  59. package/dist/chunk-KPZNNMV5.js +0 -83
  60. package/dist/chunk-NHS7ETKJ.js +0 -27
  61. package/dist/chunk-TSPJOM6K.js +0 -229
  62. package/dist/chunk-UOWIDFCB.js +0 -81
  63. package/dist/tema/index.cjs +0 -94
  64. package/dist/tema/index.d.cts +0 -110
  65. package/dist/tema/index.d.ts +0 -110
  66. package/dist/tema/index.js +0 -2
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The brand catalog: which pieces of Tiburoncín exist and what their file is
3
+ * called. Pure data, no React, so the OG templates and any script can read it
4
+ * too.
5
+ *
6
+ * Adding a new piece means dropping the PNG into `assets/brand/` and adding one
7
+ * line here. The type updates itself and autocomplete offers it immediately.
8
+ */
9
+ /**
10
+ * The faces. They are used only in empty states, confirmations, errors, course
11
+ * progress and celebration — never in a hero, pricing, services, contact or CV.
12
+ * That is why `EmptyState` takes a face and `PageHeader` does not.
13
+ */
14
+ declare const faces: {
15
+ readonly annoyed: "face-annoyed.png";
16
+ readonly confused: "face-confused.png";
17
+ readonly hearts: "face-hearts.png";
18
+ readonly laughing: "face-laughing.png";
19
+ readonly shades: "face-shades.png";
20
+ readonly waiting: "face-waiting.png";
21
+ readonly wink: "face-wink.png";
22
+ };
23
+ /** Full-body poses. */
24
+ declare const poses: {
25
+ readonly desk: "pose-desk.png";
26
+ readonly 'laptop-coffee': "pose-laptop-coffee.png";
27
+ readonly peek: "pose-peek.png";
28
+ readonly surf: "pose-surf.png";
29
+ };
30
+ /**
31
+ * The fin, in its two variants.
32
+ *
33
+ * The fin's body is nearly black, so on a dark background the two-blue variant
34
+ * disappears. `foam` is the single-ink silhouette — 94 % of its pixels are
35
+ * `#EDF4F3`, which is the foam token — and it is the one that reads over abyss.
36
+ */
37
+ declare const fins: {
38
+ /** Two blues. For light backgrounds. */
39
+ readonly color: "fin.png";
40
+ /** Single-ink silhouette. For dark backgrounds. */
41
+ readonly foam: "fin-foam.png";
42
+ };
43
+ /**
44
+ * The assigned use of each face, from the manual's inventory.
45
+ *
46
+ * This is not loose documentation: it is the part of the humour contract that
47
+ * can be written as data. The manual assigns a situation to each face, and
48
+ * without this the choice was made by eye at every call site — which is how
49
+ * `annoyed` ends up on a confirmation and `hearts` on an error.
50
+ *
51
+ * One is missing: the manual lists eight faces and `head-5` (surprise ·
52
+ * destructive confirmation) has no PNG in `assets/brand/`. When it arrives, it
53
+ * goes in here and in `faces` at the same time.
54
+ */
55
+ declare const faceUsage: {
56
+ readonly wink: "Forms, a friendly footnote";
57
+ readonly waiting: "No results, waiting state";
58
+ readonly laughing: "Success, subscription confirmed";
59
+ readonly shades: "Module or course completed";
60
+ readonly hearts: "Gratitude, article OG";
61
+ readonly confused: "404, page not found";
62
+ readonly annoyed: "Server error, build failure";
63
+ };
64
+ type Face = keyof typeof faces;
65
+ type Pose = keyof typeof poses;
66
+ type Fin = keyof typeof fins;
67
+ /** Which background the piece will sit on. It decides which fin is used. */
68
+ type Background = 'dark' | 'light';
69
+ /**
70
+ * Where the PNGs are served from. `/brand` by default, which is where they
71
+ * already live in all five projects (`public/brand/`), so there is nothing to
72
+ * configure.
73
+ */
74
+ declare const ASSETS_PATH = "/brand";
75
+ declare const faceList: readonly Face[];
76
+ declare const poseList: readonly Pose[];
77
+
78
+ export { ASSETS_PATH as A, type Background as B, type Face as F, type Pose as P, type Fin as a, faceUsage as b, faces as c, fins as d, poses as e, faceList as f, poseList as p };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The brand catalog: which pieces of Tiburoncín exist and what their file is
3
+ * called. Pure data, no React, so the OG templates and any script can read it
4
+ * too.
5
+ *
6
+ * Adding a new piece means dropping the PNG into `assets/brand/` and adding one
7
+ * line here. The type updates itself and autocomplete offers it immediately.
8
+ */
9
+ /**
10
+ * The faces. They are used only in empty states, confirmations, errors, course
11
+ * progress and celebration — never in a hero, pricing, services, contact or CV.
12
+ * That is why `EmptyState` takes a face and `PageHeader` does not.
13
+ */
14
+ declare const faces: {
15
+ readonly annoyed: "face-annoyed.png";
16
+ readonly confused: "face-confused.png";
17
+ readonly hearts: "face-hearts.png";
18
+ readonly laughing: "face-laughing.png";
19
+ readonly shades: "face-shades.png";
20
+ readonly waiting: "face-waiting.png";
21
+ readonly wink: "face-wink.png";
22
+ };
23
+ /** Full-body poses. */
24
+ declare const poses: {
25
+ readonly desk: "pose-desk.png";
26
+ readonly 'laptop-coffee': "pose-laptop-coffee.png";
27
+ readonly peek: "pose-peek.png";
28
+ readonly surf: "pose-surf.png";
29
+ };
30
+ /**
31
+ * The fin, in its two variants.
32
+ *
33
+ * The fin's body is nearly black, so on a dark background the two-blue variant
34
+ * disappears. `foam` is the single-ink silhouette — 94 % of its pixels are
35
+ * `#EDF4F3`, which is the foam token — and it is the one that reads over abyss.
36
+ */
37
+ declare const fins: {
38
+ /** Two blues. For light backgrounds. */
39
+ readonly color: "fin.png";
40
+ /** Single-ink silhouette. For dark backgrounds. */
41
+ readonly foam: "fin-foam.png";
42
+ };
43
+ /**
44
+ * The assigned use of each face, from the manual's inventory.
45
+ *
46
+ * This is not loose documentation: it is the part of the humour contract that
47
+ * can be written as data. The manual assigns a situation to each face, and
48
+ * without this the choice was made by eye at every call site — which is how
49
+ * `annoyed` ends up on a confirmation and `hearts` on an error.
50
+ *
51
+ * One is missing: the manual lists eight faces and `head-5` (surprise ·
52
+ * destructive confirmation) has no PNG in `assets/brand/`. When it arrives, it
53
+ * goes in here and in `faces` at the same time.
54
+ */
55
+ declare const faceUsage: {
56
+ readonly wink: "Forms, a friendly footnote";
57
+ readonly waiting: "No results, waiting state";
58
+ readonly laughing: "Success, subscription confirmed";
59
+ readonly shades: "Module or course completed";
60
+ readonly hearts: "Gratitude, article OG";
61
+ readonly confused: "404, page not found";
62
+ readonly annoyed: "Server error, build failure";
63
+ };
64
+ type Face = keyof typeof faces;
65
+ type Pose = keyof typeof poses;
66
+ type Fin = keyof typeof fins;
67
+ /** Which background the piece will sit on. It decides which fin is used. */
68
+ type Background = 'dark' | 'light';
69
+ /**
70
+ * Where the PNGs are served from. `/brand` by default, which is where they
71
+ * already live in all five projects (`public/brand/`), so there is nothing to
72
+ * configure.
73
+ */
74
+ declare const ASSETS_PATH = "/brand";
75
+ declare const faceList: readonly Face[];
76
+ declare const poseList: readonly Pose[];
77
+
78
+ export { ASSETS_PATH as A, type Background as B, type Face as F, type Pose as P, type Fin as a, faceUsage as b, faces as c, fins as d, poses as e, faceList as f, poseList as p };
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var recharts = require('recharts');
@@ -10,56 +11,56 @@ var jsxRuntime = require('react/jsx-runtime');
10
11
  // src/chart/index.tsx
11
12
  var typeScale = {
12
13
  display: { family: "display", size: 76, lineHeight: 0.96, weight: 800, tracking: "-0.035em" },
13
- /** Métricas grandes. Números, no prosa: interlineado 1 y sin descendentes. */
14
+ /** Large metrics. Numbers, not prose: line height 1 and no descenders. */
14
15
  stat: { family: "display", size: 46, lineHeight: 1, weight: 800, tracking: "-0.035em" },
15
16
  h1: { family: "display", size: 44, lineHeight: 1.05, weight: 700, tracking: "-0.03em" },
16
17
  h2: { family: "display", size: 30, lineHeight: 1.1, weight: 600, tracking: "-0.02em" },
17
18
  h3: { family: "display", size: 25, lineHeight: 1.15, weight: 600, tracking: "-0.02em" },
18
19
  body: { family: "sans", size: 18, lineHeight: 1.75, weight: 400 },
19
20
  /**
20
- * 17px. El botón grande y la bajada de las páginas internas.
21
+ * 17px. The large button, and the deck on interior pages.
21
22
  *
22
- * Entra como escalón propio porque el documento lo usa DOS veces y en piezas
23
- * distintas: «lg 15px 30px r12» con texto de 17, y «h1 44/700 · bajada 17px ·
24
- * párrafo de contexto 15px». Un solo uso no habría justificado partir la
25
- * distancia entre `ui` (15) y `body` (18); dos sí.
23
+ * It earns its own step because the identity document uses it TWICE, in two
24
+ * different pieces: «lg 15/30 r12» with 17px text, and «h1 44/700 · deck 17px
25
+ * · context paragraph 15px». One use would not have justified splitting the
26
+ * gap between `ui` (15) and `body` (18); two did.
26
27
  */
27
28
  lead: { family: "sans", size: 17, lineHeight: 1.5, weight: 400 },
28
29
  ui: { family: "sans", size: 15, lineHeight: 1.6, weight: 400 },
29
30
  label: { family: "sans", size: 13, lineHeight: 1.5, weight: 500 },
30
31
  /**
31
- * La escala de las etiquetas de estado: sans 12.5/500, cuadrada.
32
+ * The status-badge scale: sans 12.5/500, squared off.
32
33
  *
33
- * Es medio píxel por debajo de `label`, y esta vez el medio píxel sí importa:
34
- * una etiqueta de estado va dentro de una tabla o al lado de un título, y a 13
35
- * competía con el texto que acompaña. El documento la da en 12.5 y se ve.
34
+ * That is half a pixel below `label`, and this time the half pixel matters: a
35
+ * status badge sits inside a table or next to a title, and at 13 it competed
36
+ * with the text it accompanies. The document specifies 12.5 and it shows.
36
37
  */
37
38
  tag: { family: "sans", size: 12.5, lineHeight: 1.4, weight: 500 },
38
39
  /**
39
- * La escala de categoría y métrica: mono 11.5.
40
+ * The category and metric scale: mono 11.5.
40
41
  *
41
- * Rompe el suelo de `limits.minScreenPx`, y es a propósito. Ese suelo protege
42
- * al TEXTO —lo que se lee en una frase—, y una píldora de una palabra no es
43
- * texto corrido: es una marca. El contraste sigue medido y pasa AA (plancton
44
- * 5.57:1 sobre abismo), que es la parte que no se negocia.
42
+ * It breaks the floor set by `limits.minScreenPx`, deliberately. That floor
43
+ * protects TEXT — what you read in a sentence — and a one-word pill is not
44
+ * running text: it is a mark. Contrast is still measured and still passes AA
45
+ * (plankton 5.57:1 over abyss), which is the part that is not negotiable.
45
46
  *
46
- * A 13 las tres familias de etiqueta salían del tamaño de un botón pequeño y
47
- * pesaban más que el título que acompañan. Ver `docs/decisiones.md`.
47
+ * At 13 the three badge families grew past the size of a small button and
48
+ * outweighed the title they accompany. See `docs/decisions.md`.
48
49
  */
49
50
  chip: { family: "mono", size: 11.5, lineHeight: 1.4, weight: 400 },
50
51
  /**
51
- * Mono SIN transformar: fechas, rutas, versiones, nombres de archivo, la firma
52
- * del footer y las métricas de etiqueta. Es la mayoría del mono del sistema.
52
+ * Mono with NO transform: dates, paths, versions, file names, the footer
53
+ * signature and metric labels. It is most of the mono in the system.
53
54
  *
54
- * Existe porque `eyebrow` lleva `uppercase` de fábrica y no es una preferencia
55
- * que se pueda apagar: es la escala del eyebrow. Un `18 ago 2026` en versalitas
56
- * o un `pose-laptop-coffee.png` en mayúsculas están mal, y sin este escalón la
57
- * única salida era un `normal-case` en cada sitio de uso.
55
+ * It exists because `eyebrow` ships `uppercase` and that is not a preference
56
+ * you can switch off: it IS the eyebrow scale. An `18 Aug 2026` in small caps
57
+ * or a `pose-laptop-coffee.png` in all caps are wrong, and without this step
58
+ * the only way out was a `normal-case` at every call site.
58
59
  *
59
- * El documento dice 12.5. Son 13 por la misma razón por la que `textMuted` se
60
- * corrigió: `limits.minScreenPx` es 13 y plancton «nunca bajo 13px». Esta
61
- * escala es justo donde se escriben las metas en muted, así que ponerla en
62
- * 12.5 habría dejado ilegible su uso más común por medio píxel.
60
+ * The document says 12.5. This is 13 for the same reason `textMuted` was
61
+ * corrected: `limits.minScreenPx` is 13 and plankton is «never under 13px».
62
+ * This scale is exactly where muted metadata gets written, so putting it at
63
+ * 12.5 would have made its most common use illegible by half a pixel.
63
64
  */
64
65
  meta: { family: "mono", size: 13, lineHeight: 1.6, weight: 400 },
65
66
  eyebrow: { family: "mono", size: 12, tracking: "0.12em", transform: "uppercase" }
@@ -75,8 +76,24 @@ var control = {
75
76
  sm: 14,
76
77
  md: 22,
77
78
  lg: 30,
78
- /** Botón de icono: cuadrado, sin texto. */
79
- icon: 42
79
+ /** Icon button: square, no text. */
80
+ icon: 42,
81
+ /**
82
+ * The dense icon button, 32×32.
83
+ *
84
+ * 42 is the right measure for a control you hit with a thumb, and the four
85
+ * reading sites are where that fits. `cursos` is the odd one out: it is the
86
+ * only admin app of the set, with three actions per table row, and at 42 the
87
+ * row grows with them — the original used 24 and 28.
88
+ *
89
+ * It is 32 and not 28 because 32 is `sm`'s height. A dense icon button lines
90
+ * up with a small text button, so a toolbar mixing the two stays on one
91
+ * baseline; 28 would have been a fifth height that matches nothing.
92
+ *
93
+ * It does not replace `icon`. A page's primary action stays at 42; this is for
94
+ * a row of a table. See `docs/decisions.md` § 22.
95
+ */
96
+ iconSm: 32
80
97
  };
81
98
  var spacing = {
82
99
  stepXs: 8,
@@ -88,67 +105,52 @@ var spacing = {
88
105
  };
89
106
 
90
107
  // src/lib/cn.ts
91
- var kebab = (nombre) => nombre.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
92
- var escalas = Object.keys(typeScale);
93
- var radios = Object.keys(radius);
94
- var espacios = Object.keys(spacing).map(kebab);
95
- var controles = Object.keys(control).map((nombre) => `control-${kebab(nombre)}`);
108
+ var kebab = (name) => name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
109
+ var scales = Object.keys(typeScale);
110
+ var radii = Object.keys(radius);
111
+ var namespaces = Object.keys(spacing).map(kebab);
112
+ var controls = Object.keys(control).map((name) => `control-${kebab(name)}`);
96
113
  var twMerge = tailwindMerge.extendTailwindMerge({
97
114
  extend: {
98
115
  classGroups: {
99
- "font-size": [{ text: escalas }],
100
- rounded: [{ rounded: radios }],
101
- p: [{ p: espacios }],
102
- px: [{ px: [...espacios, ...controles] }],
103
- py: [{ py: espacios }],
104
- gap: [{ gap: espacios }],
105
- size: [{ size: controles }]
116
+ "font-size": [{ text: scales }],
117
+ rounded: [{ rounded: radii }],
118
+ p: [{ p: namespaces }],
119
+ px: [{ px: [...namespaces, ...controls] }],
120
+ py: [{ py: namespaces }],
121
+ gap: [{ gap: namespaces }],
122
+ size: [{ size: controls }]
106
123
  }
107
124
  }
108
125
  });
109
126
  function cn(...inputs) {
110
127
  return twMerge(clsx.clsx(inputs));
111
128
  }
112
- var ETIQUETA = {
113
- display: "h1",
114
- stat: "p",
115
- h1: "h1",
116
- h2: "h2",
117
- h3: "h3",
118
- body: "p",
119
- lead: "p",
120
- ui: "p",
121
- label: "span",
122
- tag: "span",
123
- meta: "p",
124
- chip: "span",
125
- eyebrow: "p"
126
- };
127
- var texto = classVarianceAuthority.cva("", {
129
+ var text = classVarianceAuthority.cva("", {
128
130
  variants: {
129
131
  variant: {
130
132
  display: "text-display font-display",
131
- // Métricas grandes: 46px de display. Es la única escala pensada para un
132
- // número, y por eso el interlineado es 1.
133
+ // Large metrics: 46px of display. It is the only scale designed for a
134
+ // number, which is why its line height is 1.
133
135
  stat: "text-stat font-display",
134
136
  h1: "text-h1 font-display",
135
137
  h2: "text-h2 font-display",
136
138
  h3: "text-h3 font-display",
137
139
  body: "text-body font-sans",
138
- // 17px: la bajada de las páginas internas y el botón grande.
140
+ // 17px: the deck on interior pages and the large button.
139
141
  lead: "text-lead font-sans",
140
142
  ui: "text-ui font-sans",
141
143
  label: "text-label font-sans",
142
- // Las dos escalas de etiqueta. `tag` es el estado (sans 12.5/500) y `chip`
143
- // la categoría y la métrica (mono 11.5). Ninguna transforma el texto.
144
+ // The two badge scales. `tag` is status (sans 12.5/500) and `chip` is
145
+ // category and metric (mono 11.5). Neither transforms the text.
144
146
  tag: "text-tag font-sans",
145
147
  chip: "text-chip font-mono",
146
- // Mono SIN transformar: fechas, rutas, versiones, nombres de archivo y la
147
- // firma del footer. Es el escalón que faltaba, y por el que cada sitio de
148
- // uso terminaba escribiendo `variant="eyebrow" className="normal-case"`.
148
+ // Mono with NO transform: dates, paths, versions, file names and the
149
+ // footer signature. It is the step that was missing, and the reason every
150
+ // call site ended up writing `variant="eyebrow" className="normal-case"`.
149
151
  meta: "text-meta font-mono",
150
- // `uppercase` no cabe en un token de tamaño: text-transform no es un
151
- // modificador de --text-*. Por eso lo pone la variante y no theme.css.
152
+ // `uppercase` does not fit in a size token: text-transform is not a
153
+ // modifier of --text-*. Which is why the variant sets it, not theme.css.
152
154
  eyebrow: "text-eyebrow font-mono uppercase"
153
155
  },
154
156
  tone: {
@@ -164,6 +166,21 @@ var texto = classVarianceAuthority.cva("", {
164
166
  },
165
167
  defaultVariants: { variant: "body", tone: "primary" }
166
168
  });
169
+ var LABEL = {
170
+ display: "h1",
171
+ stat: "p",
172
+ h1: "h1",
173
+ h2: "h2",
174
+ h3: "h3",
175
+ body: "p",
176
+ lead: "p",
177
+ ui: "p",
178
+ label: "span",
179
+ tag: "span",
180
+ meta: "p",
181
+ chip: "span",
182
+ eyebrow: "p"
183
+ };
167
184
  function Text({
168
185
  className,
169
186
  variant,
@@ -174,19 +191,19 @@ function Text({
174
191
  children,
175
192
  ...props
176
193
  }) {
177
- const escala = variant ?? "body";
178
- const limitar = measure ?? escala === "body";
179
- const clases = cn(texto({ variant, tone }), limitar && "max-w-measure", className);
194
+ const scale = variant ?? "body";
195
+ const clamp = measure ?? scale === "body";
196
+ const classes = cn(text({ variant, tone }), clamp && "max-w-measure", className);
180
197
  if (asChild) {
181
- return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { className: clases, ...props, children });
198
+ return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { className: classes, ...props, children });
182
199
  }
183
- const Etiqueta = as ?? ETIQUETA[escala];
184
- return /* @__PURE__ */ jsxRuntime.jsx(Etiqueta, { className: clases, ...props, children });
200
+ const Label = as ?? LABEL[scale];
201
+ return /* @__PURE__ */ jsxRuntime.jsx(Label, { className: classes, ...props, children });
185
202
  }
186
- function colorDeSerie(indice) {
187
- return `var(--color-serie-${Math.abs(indice) % 4 + 1})`;
203
+ function seriesColor(index) {
204
+ return `var(--color-series-${Math.abs(index) % 4 + 1})`;
188
205
  }
189
- var COLORES_DE_SERIE = [0, 1, 2, 3].map(colorDeSerie);
206
+ var SERIES_COLORS = [0, 1, 2, 3].map(seriesColor);
190
207
  function ChartContainer({
191
208
  label,
192
209
  summary,
@@ -201,9 +218,9 @@ function ChartContainer({
201
218
  "aria-label": label,
202
219
  className: cn(
203
220
  "w-full",
204
- // La rejilla y los ejes, con los tokens del sistema en vez de los grises
205
- // por defecto de Recharts. Van como variantes de descendiente porque los
206
- // nodos los pinta la librería y no hay dónde ponerles una clase.
221
+ // The grid and the axes, with the system's tokens instead of Recharts'
222
+ // default greys. They go as descendant variants because the nodes are
223
+ // painted by the library and there is nowhere to put a class on them.
207
224
  "[&_.recharts-cartesian-grid_line]:stroke-hairline",
208
225
  "[&_.recharts-cartesian-axis-line]:stroke-hairline",
209
226
  "[&_.recharts-cartesian-axis-tick_text]:fill-text-muted",
@@ -253,7 +270,7 @@ function ChartTooltipContent({
253
270
  {
254
271
  "aria-hidden": "true",
255
272
  className: "rounded-chip size-2 shrink-0",
256
- style: { backgroundColor: item.color ?? colorDeSerie(i) }
273
+ style: { backgroundColor: item.color ?? seriesColor(i) }
257
274
  }
258
275
  ),
259
276
  /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", variant: "label", tone: "secondary", className: "font-normal", children: item.name }),
@@ -271,17 +288,17 @@ function ChartLegendContent({ payload, className }) {
271
288
  {
272
289
  "aria-hidden": "true",
273
290
  className: "rounded-chip size-2 shrink-0",
274
- style: { backgroundColor: item.color ?? colorDeSerie(i) }
291
+ style: { backgroundColor: item.color ?? seriesColor(i) }
275
292
  }
276
293
  ),
277
294
  /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", variant: "label", tone: "secondary", className: "font-normal", children: item.value })
278
295
  ] }, `${String(item.dataKey ?? item.value ?? i)}`)) });
279
296
  }
280
297
 
281
- exports.COLORES_DE_SERIE = COLORES_DE_SERIE;
282
298
  exports.ChartContainer = ChartContainer;
283
299
  exports.ChartLegend = ChartLegend;
284
300
  exports.ChartLegendContent = ChartLegendContent;
285
301
  exports.ChartTooltip = ChartTooltip;
286
302
  exports.ChartTooltipContent = ChartTooltipContent;
287
- exports.colorDeSerie = colorDeSerie;
303
+ exports.SERIES_COLORS = SERIES_COLORS;
304
+ exports.seriesColor = seriesColor;