@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteos/ui",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "description": "Proteos React component library (React Aria Components + Tailwind v4).",
6
6
  "repository": {
@@ -56,7 +56,7 @@
56
56
  "tailwind-variants": "^3.2.2",
57
57
  "tailwindcss": "^4.2.4",
58
58
  "thinking-orbs": "^0.3.1",
59
- "@proteos/sdk": "0.53.0"
59
+ "@proteos/sdk": "0.54.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@biomejs/biome": "^2.4.13",
@@ -72,7 +72,11 @@ export function Radio({ children, className, ...props }: RadioProps) {
72
72
  {...props}
73
73
  className={(renderProps) =>
74
74
  cn(
75
- 'group inline-flex items-center gap-2.5 cursor-pointer',
75
+ // `relative` for the same reason as Checkbox / Switch: RAC's
76
+ // visually-hidden <input> is absolutely positioned and must resolve
77
+ // against this radio, not a far-away shell, or focusing it scrolls
78
+ // the clipped page.
79
+ 'group relative inline-flex items-center gap-2.5 cursor-pointer',
76
80
  'font-sans text-[14px] text-ink-2 select-none',
77
81
  'data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed',
78
82
  typeof className === 'function' ? className(renderProps) : className,
@@ -15,7 +15,11 @@ export function Switch({ children, labelPlacement = 'end', className, ...props }
15
15
  {...props}
16
16
  className={(renderProps) =>
17
17
  cn(
18
- 'group inline-flex items-center gap-3 cursor-pointer select-none',
18
+ // `relative`: RAC's visually-hidden <input> is absolutely positioned;
19
+ // without a positioned label it escapes an overflow-auto ancestor and
20
+ // its containing block becomes the page shell, so focusing it (any
21
+ // press) scrolls the clipped shell and the whole tab goes blank.
22
+ 'group relative inline-flex items-center gap-3 cursor-pointer select-none',
19
23
  'font-sans text-[14px] text-ink-2',
20
24
  labelPlacement === 'start' && 'flex-row-reverse',
21
25
  'data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed',