@caratlogic/design-system 0.1.38 → 0.1.39

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
@@ -15484,7 +15484,10 @@ function formatRuleValue(value, unit) {
15484
15484
  const number = value.toLocaleString('en-US', { maximumFractionDigits: 2 });
15485
15485
  if (!unit)
15486
15486
  return number;
15487
- return unit === '%' ? `${number}%` : `${number} ${unit}`;
15487
+ // Symbols sit right after the number (`60%`, `34°`); words take a space (`2 ct`).
15488
+ return unit === '%' || unit === '°'
15489
+ ? `${number}${unit}`
15490
+ : `${number} ${unit}`;
15488
15491
  }
15489
15492
  /** The help popover's rule list for a column's typical range; rules use short numbers (`1k`) that the field accepts as typed. */
15490
15493
  function buildNumberRuleHelp({ low, high, exact, unit, } = DEFAULT_NUMBER_RULE_EXAMPLES) {
@@ -15739,8 +15742,10 @@ function getPanelClassName(variant, active, className) {
15739
15742
  return cn('flex min-w-0 flex-col gap-3', variant === 'card' && 'rounded-xl border bg-card p-4', variant === 'card' && (active ? 'border-primary' : 'border-border'), variant === 'popover' && 'p-3', className);
15740
15743
  }
15741
15744
  function getTitleClassName(variant) {
15742
- return cn('flex items-center gap-2 text-foreground', variant === 'section'
15743
- ? 'text-xs font-medium text-label'
15745
+ return cn('flex items-center gap-2 text-foreground',
15746
+ // A section title is a field name: between the card title and grey helper text.
15747
+ variant === 'section'
15748
+ ? 'text-xs font-medium text-foreground/70'
15744
15749
  : 'text-sm font-semibold');
15745
15750
  }
15746
15751