@asdp/ferryui 0.1.22-dev.9719 → 0.1.22-dev.9767

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.mjs CHANGED
@@ -4251,6 +4251,15 @@ var InputDynamic = ({
4251
4251
  const shouldFocusRef = useRef(false);
4252
4252
  const isBackspaceNavigationRef = useRef(false);
4253
4253
  const rawEmailOrPhoneInputRef = useRef("");
4254
+ const [selectPortalTarget, setSelectPortalTarget] = useState(null);
4255
+ useEffect(() => {
4256
+ if (typeof document !== "undefined") {
4257
+ const provider = document.querySelector(
4258
+ ".fui-FluentProvider"
4259
+ );
4260
+ setSelectPortalTarget(provider ?? document.body);
4261
+ }
4262
+ }, []);
4254
4263
  const getPhoneInputValue = (val) => {
4255
4264
  let cleaned = val.startsWith("+") ? stripNonDigits(val.substring(1)) : stripNonDigits(val);
4256
4265
  if (onlyCountries && onlyCountries.length > 0 && cleaned) {
@@ -4336,7 +4345,12 @@ var InputDynamic = ({
4336
4345
  menuPortal: (base) => ({
4337
4346
  ...base,
4338
4347
  zIndex: 9999999,
4339
- borderRadius: tokens.borderRadiusMedium
4348
+ borderRadius: tokens.borderRadiusMedium,
4349
+ // Explicitly set typography so portal children inherit correct values
4350
+ // regardless of where in the DOM tree the portal is mounted
4351
+ fontSize: tokens.fontSizeBase400,
4352
+ fontFamily: tokens.fontFamilyBase,
4353
+ lineHeight: tokens.lineHeightBase400
4340
4354
  }),
4341
4355
  control: getControlStyles,
4342
4356
  menu: (provided) => ({
@@ -4839,7 +4853,10 @@ var InputDynamic = ({
4839
4853
  getOptionLabel: (option) => option.label,
4840
4854
  getOptionValue: (option) => option.value,
4841
4855
  isOptionDisabled: (option) => option.disabled || false,
4842
- menuPlacement
4856
+ menuPlacement: menuPlacement || "auto",
4857
+ menuShouldScrollIntoView: false,
4858
+ menuPortalTarget: selectPortalTarget,
4859
+ menuPosition: "fixed"
4843
4860
  }
4844
4861
  );
4845
4862
  case "country":
@@ -4899,7 +4916,10 @@ var InputDynamic = ({
4899
4916
  ]
4900
4917
  }
4901
4918
  ),
4902
- menuPlacement
4919
+ menuPlacement: menuPlacement || "auto",
4920
+ menuShouldScrollIntoView: false,
4921
+ menuPortalTarget: selectPortalTarget,
4922
+ menuPosition: "fixed"
4903
4923
  }
4904
4924
  );
4905
4925
  case "phone": {