@edux-design/forms 0.0.17 → 0.0.18
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -246,6 +246,7 @@ declare const Option: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
|
246
246
|
* @property {string} [contentClassName] - optional class for the popover content
|
|
247
247
|
* @property {string} [listClassName] - optional class for the list element
|
|
248
248
|
* @property {string} [optionClassName] - optional class for each option
|
|
249
|
+
* @property {HTMLElement|null} [portalContainer] - explicit portal container for the popover content
|
|
249
250
|
* @property {"default"|"small"} [size="default"] - size variant for the combobox input
|
|
250
251
|
* @property {"full"|"small"|"medium"|"large"} [width="full"] - width size for the combobox container
|
|
251
252
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -246,6 +246,7 @@ declare const Option: react.ForwardRefExoticComponent<react.RefAttributes<any>>;
|
|
|
246
246
|
* @property {string} [contentClassName] - optional class for the popover content
|
|
247
247
|
* @property {string} [listClassName] - optional class for the list element
|
|
248
248
|
* @property {string} [optionClassName] - optional class for each option
|
|
249
|
+
* @property {HTMLElement|null} [portalContainer] - explicit portal container for the popover content
|
|
249
250
|
* @property {"default"|"small"} [size="default"] - size variant for the combobox input
|
|
250
251
|
* @property {"full"|"small"|"medium"|"large"} [width="full"] - width size for the combobox container
|
|
251
252
|
*/
|
package/dist/index.js
CHANGED
|
@@ -884,6 +884,7 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
|
|
|
884
884
|
contentClassName,
|
|
885
885
|
listClassName,
|
|
886
886
|
optionClassName,
|
|
887
|
+
portalContainer: portalContainer2,
|
|
887
888
|
size = "default",
|
|
888
889
|
width = "full",
|
|
889
890
|
...inputProps
|
|
@@ -999,11 +1000,11 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
|
|
|
999
1000
|
setActiveIndex((prev) => prev >= 0 ? prev : 0);
|
|
1000
1001
|
}, [open, filteredOptions, singleSelectedValue, isMultiSelectEnabled]);
|
|
1001
1002
|
const [contentWidth, setContentWidth] = (0, import_react10.useState)(0);
|
|
1002
|
-
const [
|
|
1003
|
+
const [inferredPortalContainer2, setInferredPortalContainer] = (0, import_react10.useState)(null);
|
|
1003
1004
|
(0, import_react10.useLayoutEffect)(() => {
|
|
1004
1005
|
if (anchorRef.current) {
|
|
1005
1006
|
setContentWidth(anchorRef.current.offsetWidth);
|
|
1006
|
-
|
|
1007
|
+
setInferredPortalContainer(
|
|
1007
1008
|
anchorRef.current.closest("[role='dialog']") ?? null
|
|
1008
1009
|
);
|
|
1009
1010
|
}
|
|
@@ -1295,7 +1296,7 @@ var ComboboxRoot = (0, import_react10.forwardRef)(
|
|
|
1295
1296
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1296
1297
|
import_popovers.PopoverContent,
|
|
1297
1298
|
{
|
|
1298
|
-
container:
|
|
1299
|
+
container: resolvedPortalContainer,
|
|
1299
1300
|
side: "bottom",
|
|
1300
1301
|
align: "start",
|
|
1301
1302
|
sideOffset: 4,
|
|
@@ -1406,6 +1407,7 @@ var ComboboxOption = (0, import_react10.forwardRef)(function ComboboxOption2({ c
|
|
|
1406
1407
|
ComboboxOption.displayName = OPTION_COMPONENT_NAME;
|
|
1407
1408
|
ComboboxRoot.Option = ComboboxOption;
|
|
1408
1409
|
var Option = ComboboxOption;
|
|
1410
|
+
var resolvedPortalContainer = portalContainer ?? inferredPortalContainer;
|
|
1409
1411
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1410
1412
|
0 && (module.exports = {
|
|
1411
1413
|
Checkbox,
|
package/dist/index.mjs
CHANGED
|
@@ -855,6 +855,7 @@ var ComboboxRoot = forwardRef6(
|
|
|
855
855
|
contentClassName,
|
|
856
856
|
listClassName,
|
|
857
857
|
optionClassName,
|
|
858
|
+
portalContainer: portalContainer2,
|
|
858
859
|
size = "default",
|
|
859
860
|
width = "full",
|
|
860
861
|
...inputProps
|
|
@@ -970,11 +971,11 @@ var ComboboxRoot = forwardRef6(
|
|
|
970
971
|
setActiveIndex((prev) => prev >= 0 ? prev : 0);
|
|
971
972
|
}, [open, filteredOptions, singleSelectedValue, isMultiSelectEnabled]);
|
|
972
973
|
const [contentWidth, setContentWidth] = useState3(0);
|
|
973
|
-
const [
|
|
974
|
+
const [inferredPortalContainer2, setInferredPortalContainer] = useState3(null);
|
|
974
975
|
useLayoutEffect(() => {
|
|
975
976
|
if (anchorRef.current) {
|
|
976
977
|
setContentWidth(anchorRef.current.offsetWidth);
|
|
977
|
-
|
|
978
|
+
setInferredPortalContainer(
|
|
978
979
|
anchorRef.current.closest("[role='dialog']") ?? null
|
|
979
980
|
);
|
|
980
981
|
}
|
|
@@ -1266,7 +1267,7 @@ var ComboboxRoot = forwardRef6(
|
|
|
1266
1267
|
/* @__PURE__ */ jsx9(
|
|
1267
1268
|
PopoverContent,
|
|
1268
1269
|
{
|
|
1269
|
-
container:
|
|
1270
|
+
container: resolvedPortalContainer,
|
|
1270
1271
|
side: "bottom",
|
|
1271
1272
|
align: "start",
|
|
1272
1273
|
sideOffset: 4,
|
|
@@ -1377,6 +1378,7 @@ var ComboboxOption = forwardRef6(function ComboboxOption2({ children, label, ...
|
|
|
1377
1378
|
ComboboxOption.displayName = OPTION_COMPONENT_NAME;
|
|
1378
1379
|
ComboboxRoot.Option = ComboboxOption;
|
|
1379
1380
|
var Option = ComboboxOption;
|
|
1381
|
+
var resolvedPortalContainer = portalContainer ?? inferredPortalContainer;
|
|
1380
1382
|
export {
|
|
1381
1383
|
Checkbox,
|
|
1382
1384
|
ComboboxRoot as Combobox,
|