@proteos/ui 0.53.0 → 0.54.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
@@ -1195,7 +1195,7 @@ function CardHeader({ className, ...props }) {
1195
1195
  ...props,
1196
1196
  className: cn(
1197
1197
  "flex justify-between items-center",
1198
- "px-5 py-5 border-b border-rule",
1198
+ "px-5 py-3 border-b border-rule",
1199
1199
  "bg-[color-mix(in_oklab,var(--color-surface-2)_60%,var(--color-surface))]",
1200
1200
  "font-mono text-[11.5px] uppercase tracking-[0.06em] text-ink-4",
1201
1201
  className
@@ -5740,7 +5740,11 @@ function Radio({ children, className, ...props }) {
5740
5740
  {
5741
5741
  ...props,
5742
5742
  className: (renderProps) => cn(
5743
- "group inline-flex items-center gap-2.5 cursor-pointer",
5743
+ // `relative` for the same reason as Checkbox / Switch: RAC's
5744
+ // visually-hidden <input> is absolutely positioned and must resolve
5745
+ // against this radio, not a far-away shell, or focusing it scrolls
5746
+ // the clipped page.
5747
+ "group relative inline-flex items-center gap-2.5 cursor-pointer",
5744
5748
  "font-sans text-[14px] text-ink-2 select-none",
5745
5749
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",
5746
5750
  typeof className === "function" ? className(renderProps) : className
@@ -7877,7 +7881,11 @@ function Switch({ children, labelPlacement = "end", className, ...props }) {
7877
7881
  {
7878
7882
  ...props,
7879
7883
  className: (renderProps) => cn(
7880
- "group inline-flex items-center gap-3 cursor-pointer select-none",
7884
+ // `relative`: RAC's visually-hidden <input> is absolutely positioned;
7885
+ // without a positioned label it escapes an overflow-auto ancestor and
7886
+ // its containing block becomes the page shell, so focusing it (any
7887
+ // press) scrolls the clipped shell and the whole tab goes blank.
7888
+ "group relative inline-flex items-center gap-3 cursor-pointer select-none",
7881
7889
  "font-sans text-[14px] text-ink-2",
7882
7890
  labelPlacement === "start" && "flex-row-reverse",
7883
7891
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",