@edux-design/forms 0.0.15 → 0.0.17

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
@@ -999,9 +999,13 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
999
999
  setActiveIndex((prev) => prev >= 0 ? prev : 0);
1000
1000
  }, [open, filteredOptions, singleSelectedValue, isMultiSelectEnabled]);
1001
1001
  const [contentWidth, setContentWidth] = (0, import_react10.useState)(0);
1002
+ const [portalContainer, setPortalContainer] = (0, import_react10.useState)(null);
1002
1003
  (0, import_react10.useLayoutEffect)(() => {
1003
1004
  if (anchorRef.current) {
1004
1005
  setContentWidth(anchorRef.current.offsetWidth);
1006
+ setPortalContainer(
1007
+ anchorRef.current.closest("[role='dialog']") ?? null
1008
+ );
1005
1009
  }
1006
1010
  }, [open]);
1007
1011
  const isNarrowPopover = contentWidth > 0 && contentWidth < 100;
@@ -1184,7 +1188,6 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
1184
1188
  },
1185
1189
  option.value
1186
1190
  )) : null;
1187
- console.log(inputDisplayValue);
1188
1191
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_popovers.Popover, { open, onOpenChange: handleOpenChange, children: [
1189
1192
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_popovers.PopoverAnchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1190
1193
  "div",
@@ -1292,6 +1295,7 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
1292
1295
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1293
1296
  import_popovers.PopoverContent,
1294
1297
  {
1298
+ container: portalContainer,
1295
1299
  side: "bottom",
1296
1300
  align: "start",
1297
1301
  sideOffset: 4,
package/dist/index.mjs CHANGED
@@ -970,9 +970,13 @@ var ComboboxRoot = forwardRef6(
970
970
  setActiveIndex((prev) => prev >= 0 ? prev : 0);
971
971
  }, [open, filteredOptions, singleSelectedValue, isMultiSelectEnabled]);
972
972
  const [contentWidth, setContentWidth] = useState3(0);
973
+ const [portalContainer, setPortalContainer] = useState3(null);
973
974
  useLayoutEffect(() => {
974
975
  if (anchorRef.current) {
975
976
  setContentWidth(anchorRef.current.offsetWidth);
977
+ setPortalContainer(
978
+ anchorRef.current.closest("[role='dialog']") ?? null
979
+ );
976
980
  }
977
981
  }, [open]);
978
982
  const isNarrowPopover = contentWidth > 0 && contentWidth < 100;
@@ -1155,7 +1159,6 @@ var ComboboxRoot = forwardRef6(
1155
1159
  },
1156
1160
  option.value
1157
1161
  )) : null;
1158
- console.log(inputDisplayValue);
1159
1162
  return /* @__PURE__ */ jsxs8(Popover, { open, onOpenChange: handleOpenChange, children: [
1160
1163
  /* @__PURE__ */ jsx9(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx9(
1161
1164
  "div",
@@ -1263,6 +1266,7 @@ var ComboboxRoot = forwardRef6(
1263
1266
  /* @__PURE__ */ jsx9(
1264
1267
  PopoverContent,
1265
1268
  {
1269
+ container: portalContainer,
1266
1270
  side: "bottom",
1267
1271
  align: "start",
1268
1272
  sideOffset: 4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edux-design/forms",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],