@proteos/ui 0.53.0 → 0.54.0

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
@@ -5741,7 +5741,11 @@ function Radio({ children, className, ...props }) {
5741
5741
  {
5742
5742
  ...props,
5743
5743
  className: (renderProps) => chunkMWAXK66H_cjs.cn(
5744
- "group inline-flex items-center gap-2.5 cursor-pointer",
5744
+ // `relative` for the same reason as Checkbox / Switch: RAC's
5745
+ // visually-hidden <input> is absolutely positioned and must resolve
5746
+ // against this radio, not a far-away shell, or focusing it scrolls
5747
+ // the clipped page.
5748
+ "group relative inline-flex items-center gap-2.5 cursor-pointer",
5745
5749
  "font-sans text-[14px] text-ink-2 select-none",
5746
5750
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",
5747
5751
  typeof className === "function" ? className(renderProps) : className
@@ -7878,7 +7882,11 @@ function Switch({ children, labelPlacement = "end", className, ...props }) {
7878
7882
  {
7879
7883
  ...props,
7880
7884
  className: (renderProps) => chunkMWAXK66H_cjs.cn(
7881
- "group inline-flex items-center gap-3 cursor-pointer select-none",
7885
+ // `relative`: RAC's visually-hidden <input> is absolutely positioned;
7886
+ // without a positioned label it escapes an overflow-auto ancestor and
7887
+ // its containing block becomes the page shell, so focusing it (any
7888
+ // press) scrolls the clipped shell and the whole tab goes blank.
7889
+ "group relative inline-flex items-center gap-3 cursor-pointer select-none",
7882
7890
  "font-sans text-[14px] text-ink-2",
7883
7891
  labelPlacement === "start" && "flex-row-reverse",
7884
7892
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",