@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.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4260,6 +4260,15 @@ var InputDynamic = ({
|
|
|
4260
4260
|
const shouldFocusRef = React.useRef(false);
|
|
4261
4261
|
const isBackspaceNavigationRef = React.useRef(false);
|
|
4262
4262
|
const rawEmailOrPhoneInputRef = React.useRef("");
|
|
4263
|
+
const [selectPortalTarget, setSelectPortalTarget] = React.useState(null);
|
|
4264
|
+
React.useEffect(() => {
|
|
4265
|
+
if (typeof document !== "undefined") {
|
|
4266
|
+
const provider = document.querySelector(
|
|
4267
|
+
".fui-FluentProvider"
|
|
4268
|
+
);
|
|
4269
|
+
setSelectPortalTarget(provider ?? document.body);
|
|
4270
|
+
}
|
|
4271
|
+
}, []);
|
|
4263
4272
|
const getPhoneInputValue = (val) => {
|
|
4264
4273
|
let cleaned = val.startsWith("+") ? stripNonDigits(val.substring(1)) : stripNonDigits(val);
|
|
4265
4274
|
if (onlyCountries && onlyCountries.length > 0 && cleaned) {
|
|
@@ -4345,7 +4354,12 @@ var InputDynamic = ({
|
|
|
4345
4354
|
menuPortal: (base) => ({
|
|
4346
4355
|
...base,
|
|
4347
4356
|
zIndex: 9999999,
|
|
4348
|
-
borderRadius: reactComponents.tokens.borderRadiusMedium
|
|
4357
|
+
borderRadius: reactComponents.tokens.borderRadiusMedium,
|
|
4358
|
+
// Explicitly set typography so portal children inherit correct values
|
|
4359
|
+
// regardless of where in the DOM tree the portal is mounted
|
|
4360
|
+
fontSize: reactComponents.tokens.fontSizeBase400,
|
|
4361
|
+
fontFamily: reactComponents.tokens.fontFamilyBase,
|
|
4362
|
+
lineHeight: reactComponents.tokens.lineHeightBase400
|
|
4349
4363
|
}),
|
|
4350
4364
|
control: getControlStyles,
|
|
4351
4365
|
menu: (provided) => ({
|
|
@@ -4848,7 +4862,10 @@ var InputDynamic = ({
|
|
|
4848
4862
|
getOptionLabel: (option) => option.label,
|
|
4849
4863
|
getOptionValue: (option) => option.value,
|
|
4850
4864
|
isOptionDisabled: (option) => option.disabled || false,
|
|
4851
|
-
menuPlacement
|
|
4865
|
+
menuPlacement: menuPlacement || "auto",
|
|
4866
|
+
menuShouldScrollIntoView: false,
|
|
4867
|
+
menuPortalTarget: selectPortalTarget,
|
|
4868
|
+
menuPosition: "fixed"
|
|
4852
4869
|
}
|
|
4853
4870
|
);
|
|
4854
4871
|
case "country":
|
|
@@ -4908,7 +4925,10 @@ var InputDynamic = ({
|
|
|
4908
4925
|
]
|
|
4909
4926
|
}
|
|
4910
4927
|
),
|
|
4911
|
-
menuPlacement
|
|
4928
|
+
menuPlacement: menuPlacement || "auto",
|
|
4929
|
+
menuShouldScrollIntoView: false,
|
|
4930
|
+
menuPortalTarget: selectPortalTarget,
|
|
4931
|
+
menuPosition: "fixed"
|
|
4912
4932
|
}
|
|
4913
4933
|
);
|
|
4914
4934
|
case "phone": {
|