@edux-design/forms 0.0.18 → 0.0.19
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 +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -884,7 +884,7 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
|
|
|
884
884
|
contentClassName,
|
|
885
885
|
listClassName,
|
|
886
886
|
optionClassName,
|
|
887
|
-
portalContainer
|
|
887
|
+
portalContainer,
|
|
888
888
|
size = "default",
|
|
889
889
|
width = "full",
|
|
890
890
|
...inputProps
|
|
@@ -1000,7 +1000,7 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
|
|
|
1000
1000
|
setActiveIndex((prev) => prev >= 0 ? prev : 0);
|
|
1001
1001
|
}, [open, filteredOptions, singleSelectedValue, isMultiSelectEnabled]);
|
|
1002
1002
|
const [contentWidth, setContentWidth] = (0, import_react10.useState)(0);
|
|
1003
|
-
const [
|
|
1003
|
+
const [inferredPortalContainer, setInferredPortalContainer] = (0, import_react10.useState)(null);
|
|
1004
1004
|
(0, import_react10.useLayoutEffect)(() => {
|
|
1005
1005
|
if (anchorRef.current) {
|
|
1006
1006
|
setContentWidth(anchorRef.current.offsetWidth);
|
|
@@ -1009,6 +1009,7 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
|
|
|
1009
1009
|
);
|
|
1010
1010
|
}
|
|
1011
1011
|
}, [open]);
|
|
1012
|
+
const resolvedPortalContainer = portalContainer ?? inferredPortalContainer;
|
|
1012
1013
|
const isNarrowPopover = contentWidth > 0 && contentWidth < 100;
|
|
1013
1014
|
const emitChange = (0, import_react10.useCallback)(
|
|
1014
1015
|
(nextValue, option) => {
|
|
@@ -1407,7 +1408,6 @@ var ComboboxOption = (0, import_react10.forwardRef)(function ComboboxOption2({ c
|
|
|
1407
1408
|
ComboboxOption.displayName = OPTION_COMPONENT_NAME;
|
|
1408
1409
|
ComboboxRoot.Option = ComboboxOption;
|
|
1409
1410
|
var Option = ComboboxOption;
|
|
1410
|
-
var resolvedPortalContainer = portalContainer ?? inferredPortalContainer;
|
|
1411
1411
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1412
1412
|
0 && (module.exports = {
|
|
1413
1413
|
Checkbox,
|
package/dist/index.mjs
CHANGED
|
@@ -855,7 +855,7 @@ var ComboboxRoot = forwardRef6(
|
|
|
855
855
|
contentClassName,
|
|
856
856
|
listClassName,
|
|
857
857
|
optionClassName,
|
|
858
|
-
portalContainer
|
|
858
|
+
portalContainer,
|
|
859
859
|
size = "default",
|
|
860
860
|
width = "full",
|
|
861
861
|
...inputProps
|
|
@@ -971,7 +971,7 @@ var ComboboxRoot = forwardRef6(
|
|
|
971
971
|
setActiveIndex((prev) => prev >= 0 ? prev : 0);
|
|
972
972
|
}, [open, filteredOptions, singleSelectedValue, isMultiSelectEnabled]);
|
|
973
973
|
const [contentWidth, setContentWidth] = useState3(0);
|
|
974
|
-
const [
|
|
974
|
+
const [inferredPortalContainer, setInferredPortalContainer] = useState3(null);
|
|
975
975
|
useLayoutEffect(() => {
|
|
976
976
|
if (anchorRef.current) {
|
|
977
977
|
setContentWidth(anchorRef.current.offsetWidth);
|
|
@@ -980,6 +980,7 @@ var ComboboxRoot = forwardRef6(
|
|
|
980
980
|
);
|
|
981
981
|
}
|
|
982
982
|
}, [open]);
|
|
983
|
+
const resolvedPortalContainer = portalContainer ?? inferredPortalContainer;
|
|
983
984
|
const isNarrowPopover = contentWidth > 0 && contentWidth < 100;
|
|
984
985
|
const emitChange = useCallback4(
|
|
985
986
|
(nextValue, option) => {
|
|
@@ -1378,7 +1379,6 @@ var ComboboxOption = forwardRef6(function ComboboxOption2({ children, label, ...
|
|
|
1378
1379
|
ComboboxOption.displayName = OPTION_COMPONENT_NAME;
|
|
1379
1380
|
ComboboxRoot.Option = ComboboxOption;
|
|
1380
1381
|
var Option = ComboboxOption;
|
|
1381
|
-
var resolvedPortalContainer = portalContainer ?? inferredPortalContainer;
|
|
1382
1382
|
export {
|
|
1383
1383
|
Checkbox,
|
|
1384
1384
|
ComboboxRoot as Combobox,
|