@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.js
CHANGED
|
@@ -5740,7 +5740,11 @@ function Radio({ children, className, ...props }) {
|
|
|
5740
5740
|
{
|
|
5741
5741
|
...props,
|
|
5742
5742
|
className: (renderProps) => cn(
|
|
5743
|
-
|
|
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
|
-
|
|
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",
|