@mediaradar/design-components 0.5.0 → 0.5.1

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 CHANGED
@@ -464,7 +464,13 @@ function CheckBox({ checked, indeterminate, onChange, ariaLabel, disabled, testI
464
464
  "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
465
465
  "focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
466
466
  on ? "border-transparent bg-brand-primaryAction text-white" : "border-border-interactive bg-input hover:border-brand-primaryAction",
467
- disabled && "cursor-not-allowed opacity-50"
467
+ // Cancels the unchecked hover-border preview when disabled -- without
468
+ // this, a disabled box still visually previews the "you can click
469
+ // this" affordance on hover even though the click does nothing.
470
+ // Found empirically reconciling this against insights-studio-
471
+ // prototype's own (more complete) local CheckBox during its
472
+ // migration -- that version already had this guard.
473
+ disabled && "cursor-not-allowed opacity-50 hover:border-border-interactive"
468
474
  ].filter(Boolean).join(" "),
469
475
  children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Minus, { size: 13, strokeWidth: 3 }) : checked ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react4.Check, { size: 13, strokeWidth: 3 }) : null
470
476
  }