design-zystem 1.0.400 → 1.0.402

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.
@@ -727,6 +727,7 @@ declare const TableHeaderCell: ({ children, width, sticky, stickyOffset, surface
727
727
  interface TableRowProps {
728
728
  children?: ReactNode;
729
729
  onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
730
+ onDoubleClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
730
731
  className?: string;
731
732
  /** Teinte de fond brute (ex: statut métier) — hors palette fermée. */
732
733
  backgroundColor?: HexColor;
@@ -805,6 +806,8 @@ interface AvatarProps extends Omit<ComponentPropsWithoutRef<typeof RadixAvatar.R
805
806
  name?: string;
806
807
  src?: string | null;
807
808
  color?: ColorToken;
809
+ backgroundColor?: HexColor;
810
+ textColor?: HexColor;
808
811
  badge?: AvatarBadgeConfig;
809
812
  }
810
813
  /** Sans `children` : mode raccourci, auto-compose Image/Fallback/Badge à partir de `name`/`src`/`color`/`badge`. Avec `children` : composition manuelle (`AvatarImage`, `AvatarFallback`, `AvatarBadge`) pour un contrôle total. */
@@ -813,6 +816,8 @@ type AvatarImageProps = ComponentPropsWithoutRef<typeof RadixAvatar.Image>;
813
816
  declare const AvatarImage: react.ForwardRefExoticComponent<Omit<RadixAvatar.AvatarImageProps & react.RefAttributes<HTMLImageElement>, "ref"> & react.RefAttributes<HTMLImageElement>>;
814
817
  interface AvatarFallbackProps extends ComponentPropsWithoutRef<typeof RadixAvatar.Fallback> {
815
818
  color?: ColorToken;
819
+ backgroundColor?: HexColor;
820
+ textColor?: HexColor;
816
821
  }
817
822
  declare const AvatarFallback: react.ForwardRefExoticComponent<AvatarFallbackProps & react.RefAttributes<HTMLSpanElement>>;
818
823
  interface AvatarBadgeProps extends HTMLAttributes<HTMLDivElement> {
@@ -727,6 +727,7 @@ declare const TableHeaderCell: ({ children, width, sticky, stickyOffset, surface
727
727
  interface TableRowProps {
728
728
  children?: ReactNode;
729
729
  onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
730
+ onDoubleClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
730
731
  className?: string;
731
732
  /** Teinte de fond brute (ex: statut métier) — hors palette fermée. */
732
733
  backgroundColor?: HexColor;
@@ -805,6 +806,8 @@ interface AvatarProps extends Omit<ComponentPropsWithoutRef<typeof RadixAvatar.R
805
806
  name?: string;
806
807
  src?: string | null;
807
808
  color?: ColorToken;
809
+ backgroundColor?: HexColor;
810
+ textColor?: HexColor;
808
811
  badge?: AvatarBadgeConfig;
809
812
  }
810
813
  /** Sans `children` : mode raccourci, auto-compose Image/Fallback/Badge à partir de `name`/`src`/`color`/`badge`. Avec `children` : composition manuelle (`AvatarImage`, `AvatarFallback`, `AvatarBadge`) pour un contrôle total. */
@@ -813,6 +816,8 @@ type AvatarImageProps = ComponentPropsWithoutRef<typeof RadixAvatar.Image>;
813
816
  declare const AvatarImage: react.ForwardRefExoticComponent<Omit<RadixAvatar.AvatarImageProps & react.RefAttributes<HTMLImageElement>, "ref"> & react.RefAttributes<HTMLImageElement>>;
814
817
  interface AvatarFallbackProps extends ComponentPropsWithoutRef<typeof RadixAvatar.Fallback> {
815
818
  color?: ColorToken;
819
+ backgroundColor?: HexColor;
820
+ textColor?: HexColor;
816
821
  }
817
822
  declare const AvatarFallback: react.ForwardRefExoticComponent<AvatarFallbackProps & react.RefAttributes<HTMLSpanElement>>;
818
823
  interface AvatarBadgeProps extends HTMLAttributes<HTMLDivElement> {
package/dist/ui/index.js CHANGED
@@ -3459,6 +3459,7 @@ var TableRow = (0, import_react26.forwardRef)(
3459
3459
  ({
3460
3460
  children,
3461
3461
  onClick,
3462
+ onDoubleClick,
3462
3463
  className,
3463
3464
  backgroundColor,
3464
3465
  accentColor,
@@ -3469,9 +3470,10 @@ var TableRow = (0, import_react26.forwardRef)(
3469
3470
  ref,
3470
3471
  "data-index": dataIndex,
3471
3472
  onClick,
3473
+ onDoubleClick,
3472
3474
  className: cn(
3473
3475
  "border-t border-grey-200 transition-colors hover:bg-black/[0.025]",
3474
- onClick && "cursor-pointer",
3476
+ (onClick || onDoubleClick) && "cursor-pointer",
3475
3477
  accentColor && "border-l-4",
3476
3478
  className
3477
3479
  ),
@@ -3740,6 +3742,8 @@ var Avatar = (0, import_react27.forwardRef)(
3740
3742
  name,
3741
3743
  src,
3742
3744
  color,
3745
+ backgroundColor,
3746
+ textColor,
3743
3747
  badge,
3744
3748
  className,
3745
3749
  style,
@@ -3750,6 +3754,8 @@ var Avatar = (0, import_react27.forwardRef)(
3750
3754
  "name",
3751
3755
  "src",
3752
3756
  "color",
3757
+ "backgroundColor",
3758
+ "textColor",
3753
3759
  "badge",
3754
3760
  "className",
3755
3761
  "style",
@@ -3765,11 +3771,19 @@ var Avatar = (0, import_react27.forwardRef)(
3765
3771
  shape === "circle" ? "rounded-full" : "rounded-[4px]",
3766
3772
  className
3767
3773
  ),
3768
- style: __spreadValues({ width: size, height: size }, style)
3774
+ style: __spreadValues({ width: size, height: size, backgroundColor }, style)
3769
3775
  }, props), {
3770
3776
  children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3771
3777
  src && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AvatarImage, { src, alt: name }),
3772
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AvatarFallback, { color, children: getInitials({ name }) }),
3778
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3779
+ AvatarFallback,
3780
+ {
3781
+ color,
3782
+ backgroundColor,
3783
+ textColor,
3784
+ children: getInitials({ name })
3785
+ }
3786
+ ),
3773
3787
  badge && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3774
3788
  FaIcon,
3775
3789
  {
@@ -3811,22 +3825,40 @@ var FALLBACK_COLOR_CLASS = {
3811
3825
  "orange-600": "bg-orange-600 text-white",
3812
3826
  "purple-700": "bg-purple-700 text-white"
3813
3827
  };
3814
- var AvatarFallback = (0, import_react27.forwardRef)((_a, ref) => {
3815
- var _b = _a, { color = "grey-600", className, style } = _b, props = __objRest(_b, ["color", "className", "style"]);
3816
- const size = useAvatarSize();
3817
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3818
- RadixAvatar.Fallback,
3819
- __spreadValues({
3820
- ref,
3821
- className: cn(
3822
- "flex h-full w-full select-none items-center justify-center rounded-[inherit] font-semibold",
3823
- FALLBACK_COLOR_CLASS[color],
3824
- className
3825
- ),
3826
- style: __spreadValues({ fontSize: Math.round(size * 0.4) }, style)
3827
- }, props)
3828
- );
3829
- });
3828
+ var AvatarFallback = (0, import_react27.forwardRef)(
3829
+ (_a, ref) => {
3830
+ var _b = _a, {
3831
+ color = "grey-600",
3832
+ backgroundColor,
3833
+ textColor,
3834
+ className,
3835
+ style
3836
+ } = _b, props = __objRest(_b, [
3837
+ "color",
3838
+ "backgroundColor",
3839
+ "textColor",
3840
+ "className",
3841
+ "style"
3842
+ ]);
3843
+ const size = useAvatarSize();
3844
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3845
+ RadixAvatar.Fallback,
3846
+ __spreadValues({
3847
+ ref,
3848
+ className: cn(
3849
+ "flex h-full w-full select-none items-center justify-center rounded-[inherit] font-semibold",
3850
+ FALLBACK_COLOR_CLASS[color],
3851
+ className
3852
+ ),
3853
+ style: __spreadValues({
3854
+ fontSize: Math.round(size * 0.4),
3855
+ backgroundColor,
3856
+ color: textColor
3857
+ }, style)
3858
+ }, props)
3859
+ );
3860
+ }
3861
+ );
3830
3862
  AvatarFallback.displayName = "AvatarFallback";
3831
3863
  var AvatarBadge = (0, import_react27.forwardRef)(
3832
3864
  (_a, ref) => {
package/dist/ui/index.mjs CHANGED
@@ -3272,6 +3272,7 @@ var TableRow = forwardRef17(
3272
3272
  ({
3273
3273
  children,
3274
3274
  onClick,
3275
+ onDoubleClick,
3275
3276
  className,
3276
3277
  backgroundColor,
3277
3278
  accentColor,
@@ -3282,9 +3283,10 @@ var TableRow = forwardRef17(
3282
3283
  ref,
3283
3284
  "data-index": dataIndex,
3284
3285
  onClick,
3286
+ onDoubleClick,
3285
3287
  className: cn(
3286
3288
  "border-t border-grey-200 transition-colors hover:bg-black/[0.025]",
3287
- onClick && "cursor-pointer",
3289
+ (onClick || onDoubleClick) && "cursor-pointer",
3288
3290
  accentColor && "border-l-4",
3289
3291
  className
3290
3292
  ),
@@ -3560,6 +3562,8 @@ var Avatar = forwardRef18(
3560
3562
  name,
3561
3563
  src,
3562
3564
  color,
3565
+ backgroundColor,
3566
+ textColor,
3563
3567
  badge,
3564
3568
  className,
3565
3569
  style,
@@ -3570,6 +3574,8 @@ var Avatar = forwardRef18(
3570
3574
  "name",
3571
3575
  "src",
3572
3576
  "color",
3577
+ "backgroundColor",
3578
+ "textColor",
3573
3579
  "badge",
3574
3580
  "className",
3575
3581
  "style",
@@ -3585,11 +3591,19 @@ var Avatar = forwardRef18(
3585
3591
  shape === "circle" ? "rounded-full" : "rounded-[4px]",
3586
3592
  className
3587
3593
  ),
3588
- style: __spreadValues({ width: size, height: size }, style)
3594
+ style: __spreadValues({ width: size, height: size, backgroundColor }, style)
3589
3595
  }, props), {
3590
3596
  children: children != null ? children : /* @__PURE__ */ jsxs21(Fragment3, { children: [
3591
3597
  src && /* @__PURE__ */ jsx44(AvatarImage, { src, alt: name }),
3592
- /* @__PURE__ */ jsx44(AvatarFallback, { color, children: getInitials({ name }) }),
3598
+ /* @__PURE__ */ jsx44(
3599
+ AvatarFallback,
3600
+ {
3601
+ color,
3602
+ backgroundColor,
3603
+ textColor,
3604
+ children: getInitials({ name })
3605
+ }
3606
+ ),
3593
3607
  badge && /* @__PURE__ */ jsx44(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ jsx44(
3594
3608
  FaIcon,
3595
3609
  {
@@ -3631,22 +3645,40 @@ var FALLBACK_COLOR_CLASS = {
3631
3645
  "orange-600": "bg-orange-600 text-white",
3632
3646
  "purple-700": "bg-purple-700 text-white"
3633
3647
  };
3634
- var AvatarFallback = forwardRef18((_a, ref) => {
3635
- var _b = _a, { color = "grey-600", className, style } = _b, props = __objRest(_b, ["color", "className", "style"]);
3636
- const size = useAvatarSize();
3637
- return /* @__PURE__ */ jsx44(
3638
- RadixAvatar.Fallback,
3639
- __spreadValues({
3640
- ref,
3641
- className: cn(
3642
- "flex h-full w-full select-none items-center justify-center rounded-[inherit] font-semibold",
3643
- FALLBACK_COLOR_CLASS[color],
3644
- className
3645
- ),
3646
- style: __spreadValues({ fontSize: Math.round(size * 0.4) }, style)
3647
- }, props)
3648
- );
3649
- });
3648
+ var AvatarFallback = forwardRef18(
3649
+ (_a, ref) => {
3650
+ var _b = _a, {
3651
+ color = "grey-600",
3652
+ backgroundColor,
3653
+ textColor,
3654
+ className,
3655
+ style
3656
+ } = _b, props = __objRest(_b, [
3657
+ "color",
3658
+ "backgroundColor",
3659
+ "textColor",
3660
+ "className",
3661
+ "style"
3662
+ ]);
3663
+ const size = useAvatarSize();
3664
+ return /* @__PURE__ */ jsx44(
3665
+ RadixAvatar.Fallback,
3666
+ __spreadValues({
3667
+ ref,
3668
+ className: cn(
3669
+ "flex h-full w-full select-none items-center justify-center rounded-[inherit] font-semibold",
3670
+ FALLBACK_COLOR_CLASS[color],
3671
+ className
3672
+ ),
3673
+ style: __spreadValues({
3674
+ fontSize: Math.round(size * 0.4),
3675
+ backgroundColor,
3676
+ color: textColor
3677
+ }, style)
3678
+ }, props)
3679
+ );
3680
+ }
3681
+ );
3650
3682
  AvatarFallback.displayName = "AvatarFallback";
3651
3683
  var AvatarBadge = forwardRef18(
3652
3684
  (_a, ref) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.400",
3
+ "version": "1.0.402",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",