@eqtylab/equality 1.2.4 → 1.4.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/dist/index.d.cts CHANGED
@@ -51,14 +51,14 @@ declare const AlertDialogFooter: {
51
51
  declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
52
52
  declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
53
53
  declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
54
- variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
54
+ variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
55
55
  size?: "sm" | "md" | "lg" | null | undefined;
56
56
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
57
57
  prefix?: React$1.ReactNode;
58
58
  suffix?: React$1.ReactNode;
59
59
  } & React$1.RefAttributes<HTMLButtonElement>>;
60
60
  declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
61
- variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
61
+ variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
62
62
  size?: "sm" | "md" | "lg" | null | undefined;
63
63
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
64
64
  prefix?: React$1.ReactNode;
@@ -74,7 +74,8 @@ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitiv
74
74
  declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
75
75
 
76
76
  declare const badgeVariants: (props?: ({
77
- variant?: "success" | "warning" | "danger" | "primary" | "neutral" | null | undefined;
77
+ variant?: "success" | "warning" | "danger" | "primary" | "secondary" | "neutral" | null | undefined;
78
+ size?: "sm" | "md" | null | undefined;
78
79
  } & class_variance_authority_types.ClassProp) | undefined) => string;
79
80
  type BadgeDisplayMode = 'both' | 'text-only' | 'icon-only';
80
81
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
@@ -84,8 +85,10 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
84
85
  truncateLength?: number;
85
86
  icon?: React$1.ReactElement | string;
86
87
  display?: BadgeDisplayMode;
88
+ monospace?: boolean;
89
+ pill?: boolean;
87
90
  }
88
- declare function Badge({ className, variant, closeable, handleClosable, truncate, truncateLength, icon, display, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
91
+ declare function Badge({ className, variant, size, closeable, handleClosable, truncate, truncateLength, icon, display, monospace, pill, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
89
92
 
90
93
  var Light = {
91
94
  color: {
@@ -163,7 +166,7 @@ declare const BgGradient: ({ theme, placement, }: {
163
166
  }) => react_jsx_runtime.JSX.Element;
164
167
 
165
168
  declare const buttonVariants: (props?: ({
166
- variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
169
+ variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
167
170
  size?: "sm" | "md" | "lg" | null | undefined;
168
171
  } & class_variance_authority_types.ClassProp) | undefined) => string;
169
172
  type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
@@ -423,7 +426,6 @@ declare const ELEVATION: {
423
426
  BASE: string;
424
427
  RAISED: string;
425
428
  OVERLAY: string;
426
- FLOATING: string;
427
429
  };
428
430
  type Elevation = (typeof ELEVATION)[keyof typeof ELEVATION];
429
431
 
package/dist/index.d.ts CHANGED
@@ -51,14 +51,14 @@ declare const AlertDialogFooter: {
51
51
  declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
52
52
  declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
53
53
  declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
54
- variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
54
+ variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
55
55
  size?: "sm" | "md" | "lg" | null | undefined;
56
56
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
57
57
  prefix?: React$1.ReactNode;
58
58
  suffix?: React$1.ReactNode;
59
59
  } & React$1.RefAttributes<HTMLButtonElement>>;
60
60
  declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
61
- variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
61
+ variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
62
62
  size?: "sm" | "md" | "lg" | null | undefined;
63
63
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
64
64
  prefix?: React$1.ReactNode;
@@ -74,7 +74,8 @@ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitiv
74
74
  declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
75
75
 
76
76
  declare const badgeVariants: (props?: ({
77
- variant?: "success" | "warning" | "danger" | "primary" | "neutral" | null | undefined;
77
+ variant?: "success" | "warning" | "danger" | "primary" | "secondary" | "neutral" | null | undefined;
78
+ size?: "sm" | "md" | null | undefined;
78
79
  } & class_variance_authority_types.ClassProp) | undefined) => string;
79
80
  type BadgeDisplayMode = 'both' | 'text-only' | 'icon-only';
80
81
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
@@ -84,8 +85,10 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
84
85
  truncateLength?: number;
85
86
  icon?: React$1.ReactElement | string;
86
87
  display?: BadgeDisplayMode;
88
+ monospace?: boolean;
89
+ pill?: boolean;
87
90
  }
88
- declare function Badge({ className, variant, closeable, handleClosable, truncate, truncateLength, icon, display, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
91
+ declare function Badge({ className, variant, size, closeable, handleClosable, truncate, truncateLength, icon, display, monospace, pill, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
89
92
 
90
93
  var Light = {
91
94
  color: {
@@ -163,7 +166,7 @@ declare const BgGradient: ({ theme, placement, }: {
163
166
  }) => react_jsx_runtime.JSX.Element;
164
167
 
165
168
  declare const buttonVariants: (props?: ({
166
- variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
169
+ variant?: "link" | "danger" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
167
170
  size?: "sm" | "md" | "lg" | null | undefined;
168
171
  } & class_variance_authority_types.ClassProp) | undefined) => string;
169
172
  type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
@@ -423,7 +426,6 @@ declare const ELEVATION: {
423
426
  BASE: string;
424
427
  RAISED: string;
425
428
  OVERLAY: string;
426
- FLOATING: string;
427
429
  };
428
430
  type Elevation = (typeof ELEVATION)[keyof typeof ELEVATION];
429
431
 
package/dist/index.js CHANGED
@@ -281,8 +281,7 @@ var ELEVATION = {
281
281
  SUNKEN: "sunken",
282
282
  BASE: "base",
283
283
  RAISED: "raised",
284
- OVERLAY: "overlay",
285
- FLOATING: "floating"
284
+ OVERLAY: "overlay"
286
285
  };
287
286
  var generateElevationVariants = (styles61, baseClassName, defaultElevation) => {
288
287
  const classNames = {};
@@ -388,14 +387,20 @@ var badgeVariants = cva(styles7["badge"], {
388
387
  variants: {
389
388
  variant: {
390
389
  primary: styles7["badge--primary"],
390
+ secondary: styles7["badge--secondary"],
391
391
  danger: styles7["badge--danger"],
392
392
  neutral: styles7["badge--neutral"],
393
393
  warning: styles7["badge--warning"],
394
394
  success: styles7["badge--success"]
395
+ },
396
+ size: {
397
+ sm: styles7["badge--sm"],
398
+ md: styles7["badge--md"]
395
399
  }
396
400
  },
397
401
  defaultVariants: {
398
- variant: "primary"
402
+ variant: "primary",
403
+ size: "md"
399
404
  }
400
405
  });
401
406
  var defaultVariantIcons = {
@@ -406,12 +411,15 @@ var defaultVariantIcons = {
406
411
  function Badge({
407
412
  className,
408
413
  variant,
414
+ size,
409
415
  closeable,
410
416
  handleClosable,
411
417
  truncate = false,
412
418
  truncateLength = 50,
413
419
  icon,
414
420
  display = "both",
421
+ monospace = false,
422
+ pill = true,
415
423
  ...props
416
424
  }) {
417
425
  const effectiveIcon = icon ?? (variant ? defaultVariantIcons[variant] : void 0);
@@ -453,8 +461,11 @@ function Badge({
453
461
  "div",
454
462
  {
455
463
  className: cn(
456
- variant !== null && badgeVariants({ variant }),
464
+ variant !== null && badgeVariants({ variant, size }),
457
465
  variant === null && styles7["badge"],
466
+ variant === null && styles7[`badge--${size ?? "md"}`],
467
+ monospace && styles7["badge--monospace"],
468
+ !pill && styles7["badge--square"],
458
469
  isIconOnly && styles7["badge--icon-only"],
459
470
  className
460
471
  ),
@@ -1961,7 +1972,7 @@ var ListOrGridViewToggle = ({
1961
1972
  )
1962
1973
  ] });
1963
1974
  };
1964
- var Spinner = ({ size = "md", variant = "neutral" }) => {
1975
+ var Spinner = ({ size = "md", variant = "primary" }) => {
1965
1976
  return /* @__PURE__ */ jsxs("div", { className: styles29["spinner-container"], children: [
1966
1977
  /* @__PURE__ */ jsx("div", { className: cn(styles29["spinner"], styles29[size], styles29[variant]) }),
1967
1978
  /* @__PURE__ */ jsx("div", { className: cn(styles29["spinner-background"], styles29[size]) })