@fabio.caffarello/react-design-system 3.2.0 → 3.3.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.js CHANGED
@@ -5487,6 +5487,40 @@ const Al = Me(
5487
5487
  "hover:bg-surface-hover",
5488
5488
  "focus:ring-line-focus",
5489
5489
  f("none", "p")
5490
+ ),
5491
+ // Textual call-to-action — brand-coloured text, underline on
5492
+ // hover, no chrome (no surface, no border). Padding is zeroed
5493
+ // out per size in compoundVariants so the bounding box hugs
5494
+ // the text (height intrinsic). Issue #156.
5495
+ //
5496
+ // Focus ring: `focus:ring-line-focus` keeps the same focus
5497
+ // family the other no-chrome variants use (ghost, outline,
5498
+ // iconOnly). The base's `focus:ring-2` + `focus:ring-offset-2`
5499
+ // produce a 2px ring 2px away from the text bounding box; the
5500
+ // 2px offset is rendered in surface-base so the ring contrasts
5501
+ // against surface (≥3:1 for WCAG 2.4.11, verified) rather than
5502
+ // colliding with the brand-coloured text. The element keeps
5503
+ // `getRadiusClass("md")` from the base, which is invisible
5504
+ // without chrome but rounds the focus ring corners.
5505
+ //
5506
+ // hover:underline pairs with `underline-offset-4` so the
5507
+ // underline that appears on hover sits clear of the descenders
5508
+ // (WCAG-aligned with link best practice). At rest the link
5509
+ // carries no underline — the brand colour alone signals
5510
+ // affordance, matching the shadcn convention this variant is
5511
+ // modelled on (see issue body).
5512
+ //
5513
+ // disabled: inherits opacity-50 + cursor-not-allowed from the
5514
+ // base. We do NOT special-case `disabled:no-underline` because
5515
+ // a disabled link should still receive the same visual
5516
+ // treatment as a disabled chrome variant — the opacity and
5517
+ // cursor signal the disabled state.
5518
+ link: j(
5519
+ "bg-transparent",
5520
+ "text-fg-brand",
5521
+ "underline-offset-4",
5522
+ "hover:underline",
5523
+ "focus:ring-line-focus"
5490
5524
  )
5491
5525
  },
5492
5526
  size: {
@@ -5526,6 +5560,27 @@ const Al = Me(
5526
5560
  variant: "iconOnly",
5527
5561
  size: "lg",
5528
5562
  class: j("h-12", "w-12", f("none", "p"))
5563
+ },
5564
+ // Link variant zeroes the size's padding via compoundVariants so
5565
+ // the override runs AFTER the size block's `px-N`/`py-N` and
5566
+ // twMerge picks the zero value (`cn` joins variant before
5567
+ // compound). The size's typography and gap survive — the link's
5568
+ // text scales with size and icons still get gap-N when present.
5569
+ // Issue #156.
5570
+ {
5571
+ variant: "link",
5572
+ size: "sm",
5573
+ class: j(f("none", "px"), f("none", "py"))
5574
+ },
5575
+ {
5576
+ variant: "link",
5577
+ size: "md",
5578
+ class: j(f("none", "px"), f("none", "py"))
5579
+ },
5580
+ {
5581
+ variant: "link",
5582
+ size: "lg",
5583
+ class: j(f("none", "px"), f("none", "py"))
5529
5584
  }
5530
5585
  ],
5531
5586
  defaultVariants: {
@@ -8384,7 +8439,7 @@ const rs = Le(function(d) {
8384
8439
  role: b,
8385
8440
  tabIndex: x,
8386
8441
  onClick: a,
8387
- onKeyDown: g,
8442
+ onKeyDown: p ? g : void 0,
8388
8443
  "aria-label": o,
8389
8444
  "aria-labelledby": i
8390
8445
  }, c), {