@axzydev/axzy_ui_system 1.8.2 → 1.8.4

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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "packageManager": "pnpm@10.34.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
- "version": "1.8.2",
7
+ "version": "1.8.4",
8
8
  "type": "module",
9
9
  "sideEffects": [
10
10
  "*.css"
@@ -6,7 +6,8 @@ import clsx from "clsx";
6
6
  export type ITBentoTone = "plain" | "sea" | "lavender" | "mint" | "sun";
7
7
 
8
8
  export interface ITBentoTileProps {
9
- label: ReactNode;
9
+ /** Etiqueta superior; si se omite, la tarjeta se maqueta con `children`. */
10
+ label?: ReactNode;
10
11
  /** Ícono de línea a la izquierda de la etiqueta. */
11
12
  icon?: ReactNode;
12
13
  /** Cuántas columnas del mosaico ocupa (1–12). */
@@ -75,17 +76,17 @@ export function ITBentoTile({
75
76
  : undefined
76
77
  }
77
78
  >
78
- <h3 className="it-bento-tile__label">
79
- {icon}
80
- {label}
81
- </h3>
79
+ {label !== undefined && (
80
+ <h3 className="it-bento-tile__label">
81
+ {icon}
82
+ {label}
83
+ </h3>
84
+ )}
82
85
  {children}
83
86
  {(value !== undefined || caption || aside) && (
84
87
  <div className="it-bento-tile__foot">
85
- <div className="flex items-baseline gap-2">
86
- {value !== undefined && <div className="it-bento-tile__value">{value}</div>}
87
- {caption && <small className="it-bento-tile__caption">{caption}</small>}
88
- </div>
88
+ {value !== undefined && <div className="it-bento-tile__value">{value}</div>}
89
+ {caption && <small className="it-bento-tile__caption ml-auto">{caption}</small>}
89
90
  {aside}
90
91
  </div>
91
92
  )}
@@ -267,14 +268,15 @@ export function ITBentoWeekBars({
267
268
  todayColor = "var(--color-warning, #f2c14e)",
268
269
  }: ITBentoWeekBarsProps) {
269
270
  const max = Math.max(1, ...items.map((i) => i.value));
271
+ const BAR_MAX_PX = 52;
270
272
  return (
271
273
  <div className="mt-1 flex min-h-0 flex-1 items-end gap-1.5">
272
274
  {items.map((item, i) => (
273
- <div key={item.label} className="flex h-full flex-1 flex-col items-center justify-end gap-1 text-[10px]" style={{ color: "var(--it-bento-muted)" }}>
275
+ <div key={item.label} className="flex flex-1 flex-col items-center justify-end gap-1 text-[10px]" style={{ color: "var(--it-bento-muted)" }}>
274
276
  <i
275
277
  className="w-full rounded-t-[5px] rounded-b-[2px] transition-[height] duration-700"
276
278
  style={{
277
- height: `${Math.max(6, (item.value / max) * 100)}%`,
279
+ height: `${item.value === 0 ? 12 : Math.max(18, Math.round((item.value / max) * BAR_MAX_PX))}px`,
278
280
  background:
279
281
  item.tone === "today" ? todayColor : item.tone === "future" ? "color-mix(in srgb, currentColor 14%, transparent)" : color,
280
282
  transitionDelay: `${i * 60 + 150}ms`,