@caratlogic/design-system 0.1.27 → 0.1.28

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.esm.js CHANGED
@@ -38274,23 +38274,30 @@ const NumberedStepCard = ({ step, title, description, className, }) => {
38274
38274
  function hasDetails(variant, hasDescription) {
38275
38275
  return variant === 'default' && hasDescription;
38276
38276
  }
38277
+ /** Dark mode: `--primary` is too dim on near-black, so the detailed active state uses the design's lighter green. */
38278
+ const DARK_ACTIVE_GREEN = 'dark:border-[#6FB98A]';
38279
+ const DARK_ACTIVE_GREEN_TEXT = 'dark:text-[#6FB98A]';
38277
38280
  function getListClassName(variant, detailed) {
38278
- return cn('inline-flex w-full items-center gap-1 bg-muted p-1', detailed ? 'rounded-xl' : variant === 'bordered' ? 'rounded-lg' : 'rounded-md');
38281
+ if (detailed) {
38282
+ // Light: a faint primary tint. Dark: `--muted` is a light overlay that would outshine the active segment.
38283
+ return 'inline-flex w-full items-center gap-1 rounded-xl border border-transparent bg-primary/5 p-1 dark:border-border dark:bg-black/25';
38284
+ }
38285
+ return cn('inline-flex w-full items-center gap-1 bg-muted p-1', variant === 'bordered' ? 'rounded-lg' : 'rounded-md');
38279
38286
  }
38280
38287
  function getSegmentClassName(variant, isActive, isDisabled, detailed = false) {
38281
- return cn('inline-flex cursor-pointer items-center justify-center gap-2 border px-3 text-sm font-medium transition-colors disabled:cursor-not-allowed', 'outline-none focus-visible:ring-2 focus-visible:ring-primary/30', detailed ? 'min-h-11 rounded-lg py-2 font-semibold' : 'h-7 rounded-md',
38288
+ return cn('inline-flex cursor-pointer items-center justify-center gap-2 border px-3 text-sm font-medium transition-colors disabled:cursor-not-allowed', 'outline-none focus-visible:ring-2 focus-visible:ring-primary/30', detailed ? 'min-h-11 rounded-lg border-2 py-2 font-semibold' : 'h-7 rounded-md',
38282
38289
  // Bordered tabs size to their content (Figma "Advance Tabs"); the others stretch to equal width.
38283
38290
  variant === 'bordered' ? 'shrink-0' : 'flex-1',
38284
38291
  // Every segment carries a border so the active one's primary border doesn't shift the layout.
38285
38292
  isActive
38286
- ? cn('border-primary bg-card shadow-xs', detailed ? 'text-primary dark:text-foreground' : 'text-primary')
38287
- : cn('border-transparent', variant === 'bordered' ? 'text-foreground' : 'text-muted-foreground', 'hover:text-foreground'), isDisabled && 'cursor-not-allowed opacity-50');
38293
+ ? cn('border-primary bg-card shadow-xs', detailed ? cn('text-primary dark:bg-muted dark:text-foreground dark:shadow-none', DARK_ACTIVE_GREEN) : 'text-primary')
38294
+ : cn('border-transparent', variant === 'bordered' || detailed ? 'text-secondary-foreground' : 'text-muted-foreground', variant === 'bordered' && 'text-foreground', 'hover:text-foreground'), isDisabled && 'cursor-not-allowed opacity-50');
38288
38295
  }
38289
38296
  function getIconClassName(detailed, isActive) {
38290
38297
  if (!detailed) {
38291
38298
  return 'inline-flex shrink-0 items-center [&_svg]:h-4 [&_svg]:w-4';
38292
38299
  }
38293
- return cn('inline-flex size-7 shrink-0 items-center justify-center rounded-full text-sm font-semibold [&_svg]:size-4', isActive ? 'bg-primary/10 text-primary' : 'bg-foreground/5 text-muted-foreground');
38300
+ return cn('inline-flex size-7 shrink-0 items-center justify-center rounded-full text-sm font-semibold [&_svg]:size-4', isActive ? cn('bg-primary/10 text-primary dark:bg-primary/25', DARK_ACTIVE_GREEN_TEXT) : 'bg-foreground/5 text-muted-foreground');
38294
38301
  }
38295
38302
  function getContentClassName(layout) {
38296
38303
  return layout === 'inline'
@@ -38298,7 +38305,7 @@ function getContentClassName(layout) {
38298
38305
  : 'flex min-w-0 flex-col items-center gap-0.5';
38299
38306
  }
38300
38307
  function getDescriptionClassName(isActive) {
38301
- return cn('truncate text-xs font-normal', isActive ? 'text-primary' : 'text-muted-foreground');
38308
+ return cn('truncate text-xs font-normal', isActive ? cn('text-primary', DARK_ACTIVE_GREEN_TEXT) : 'text-muted-foreground');
38302
38309
  }
38303
38310
 
38304
38311
  /**