@axzydev/axzy_ui_system 1.8.3 → 1.8.5
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/dist/index.cjs +17 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/layered.css +1 -1
- package/package.json +1 -1
- package/src/components/organisms/bento/bento.tsx +45 -10
- package/src/index.css +30 -0
- package/src/index.ts +3 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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="
|
|
86
|
-
|
|
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
|
)}
|
|
@@ -275,7 +276,7 @@ export function ITBentoWeekBars({
|
|
|
275
276
|
<i
|
|
276
277
|
className="w-full rounded-t-[5px] rounded-b-[2px] transition-[height] duration-700"
|
|
277
278
|
style={{
|
|
278
|
-
height: `${Math.max(
|
|
279
|
+
height: `${item.value === 0 ? 12 : Math.max(18, Math.round((item.value / max) * BAR_MAX_PX))}px`,
|
|
279
280
|
background:
|
|
280
281
|
item.tone === "today" ? todayColor : item.tone === "future" ? "color-mix(in srgb, currentColor 14%, transparent)" : color,
|
|
281
282
|
transitionDelay: `${i * 60 + 150}ms`,
|
|
@@ -403,6 +404,40 @@ export function ITBentoFeed({ groups, onItemClick, maxHeight = 330 }: ITBentoFee
|
|
|
403
404
|
);
|
|
404
405
|
}
|
|
405
406
|
|
|
407
|
+
export interface ITBentoPillProps {
|
|
408
|
+
/** Contenido de la píldora (texto corto). */
|
|
409
|
+
children: ReactNode;
|
|
410
|
+
/** Punto de color a la izquierda; si se omite, no se dibuja. */
|
|
411
|
+
dot?: string;
|
|
412
|
+
/** Color del texto (por defecto hereda el de la tarjeta). */
|
|
413
|
+
color?: string;
|
|
414
|
+
className?: string;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Píldora de dato dentro de una tarjeta bento: fondo traslúcido del color del
|
|
419
|
+
* texto y, opcionalmente, un punto de color. Reemplaza los `<span class="…">`
|
|
420
|
+
* hechos a mano en los héroes (no usa clases sueltas ni estilos por pantalla).
|
|
421
|
+
*/
|
|
422
|
+
export function ITBentoPill({ children, dot, color, className }: ITBentoPillProps) {
|
|
423
|
+
return (
|
|
424
|
+
<span className={clsx("it-bento-pill", className)} style={color ? { color } : undefined}>
|
|
425
|
+
{dot && <i className="it-bento-pill__dot" style={{ background: dot }} aria-hidden />}
|
|
426
|
+
<span className="it-bento-pill__text">{children}</span>
|
|
427
|
+
</span>
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export interface ITBentoPillRowProps {
|
|
432
|
+
children: ReactNode;
|
|
433
|
+
className?: string;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/** Fila que acomoda las píldoras de una tarjeta y las deja bajar de línea. */
|
|
437
|
+
export function ITBentoPillRow({ children, className }: ITBentoPillRowProps) {
|
|
438
|
+
return <div className={clsx("flex flex-wrap items-center gap-1.5", className)}>{children}</div>;
|
|
439
|
+
}
|
|
440
|
+
|
|
406
441
|
export interface ITBentoLiveProps {
|
|
407
442
|
label: string;
|
|
408
443
|
className?: string;
|
package/src/index.css
CHANGED
|
@@ -845,3 +845,33 @@
|
|
|
845
845
|
transition: none !important;
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
+
|
|
849
|
+
/* Píldoras de datos del mosaico bento: chips traslúcidos que heredan el color de
|
|
850
|
+
la tarjeta (funcionan igual sobre tarjeta oscura o clara) con un punto de color. */
|
|
851
|
+
.it-bento-pill {
|
|
852
|
+
display: inline-flex;
|
|
853
|
+
align-items: center;
|
|
854
|
+
gap: 6px;
|
|
855
|
+
max-width: 100%;
|
|
856
|
+
padding: 4px 10px;
|
|
857
|
+
border-radius: 999px;
|
|
858
|
+
font-size: 11.5px;
|
|
859
|
+
font-weight: 600;
|
|
860
|
+
line-height: 1.2;
|
|
861
|
+
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.it-bento-pill__dot {
|
|
865
|
+
display: inline-block;
|
|
866
|
+
flex: none;
|
|
867
|
+
width: 7px;
|
|
868
|
+
height: 7px;
|
|
869
|
+
border-radius: 999px;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
.it-bento-pill__text {
|
|
873
|
+
min-width: 0;
|
|
874
|
+
overflow: hidden;
|
|
875
|
+
text-overflow: ellipsis;
|
|
876
|
+
white-space: nowrap;
|
|
877
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
ITBentoWeekBars,
|
|
21
21
|
ITBentoDonut,
|
|
22
22
|
ITBentoFeed,
|
|
23
|
+
ITBentoPill,
|
|
24
|
+
ITBentoPillRow,
|
|
23
25
|
ITBentoLive,
|
|
24
26
|
useITBentoCountUp,
|
|
25
27
|
} from "./components/organisms/bento/bento";
|
|
@@ -265,7 +267,7 @@ export {
|
|
|
265
267
|
// Components
|
|
266
268
|
ITAccordion,
|
|
267
269
|
ITBentoGrid, ITBentoTile, ITBentoGauge, ITBentoWaves, ITBentoSpark, ITBentoSegments,
|
|
268
|
-
ITBentoWeekBars, ITBentoDonut, ITBentoFeed, ITBentoLive, useITBentoCountUp,
|
|
270
|
+
ITBentoWeekBars, ITBentoDonut, ITBentoFeed, ITBentoPill, ITBentoPillRow, ITBentoLive, useITBentoCountUp,
|
|
269
271
|
ITAlert, ITAvatar, ITBadget, ITBreadcrumbs, ITButton,
|
|
270
272
|
ITCalendar,
|
|
271
273
|
ITCard, ITCheckbox, ITChip, ITChipInput, ITConfirmDialog, ITDataTable, ITDatePicker,
|