@shoplflow/base 0.13.4 → 0.13.5
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.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -208,9 +208,25 @@ var ModalProvider = ({ children }) => {
|
|
|
208
208
|
return /* @__PURE__ */ jsxRuntime.jsx(ModalContext.Provider, { value: openedModals, children: /* @__PURE__ */ jsxRuntime.jsx(ModalHandlerContext.Provider, { value: dispatch, children }) });
|
|
209
209
|
};
|
|
210
210
|
var ModalProvider_default = ModalProvider;
|
|
211
|
+
var PopperPortal = () => {
|
|
212
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: reactDom$1.createPortal(
|
|
213
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
id: "popper-portal-key",
|
|
217
|
+
style: {
|
|
218
|
+
zIndex: 20001
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
),
|
|
222
|
+
document.body
|
|
223
|
+
) });
|
|
224
|
+
};
|
|
225
|
+
var PopperPortal_default = PopperPortal;
|
|
211
226
|
var ShoplflowProvider = ({ children, domain = "SHOPL" }) => {
|
|
212
227
|
exports.useDomain(domain);
|
|
213
228
|
return /* @__PURE__ */ jsxRuntime.jsxs(ModalProvider_default, { children: [
|
|
229
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopperPortal_default, {}),
|
|
214
230
|
/* @__PURE__ */ jsxRuntime.jsx(exports.ModalProvider, {}),
|
|
215
231
|
children
|
|
216
232
|
] });
|
|
@@ -1503,7 +1519,7 @@ exports.PopperPortal = React3.forwardRef(
|
|
|
1503
1519
|
const { floatingStyles, setFloating, isOpen } = usePopper();
|
|
1504
1520
|
const animation = initialAnimation != null ? initialAnimation : fadeInOut;
|
|
1505
1521
|
const refs = useMergeRefs(ref, setFloating);
|
|
1506
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react$1.FloatingPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1522
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react$1.FloatingPortal, { id: "popper-portal-key", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1507
1523
|
framerMotion.motion.div,
|
|
1508
1524
|
{
|
|
1509
1525
|
initial: animation.initial,
|
|
@@ -1589,6 +1605,7 @@ exports.StyledDropdown = styled5__default.default.div`
|
|
|
1589
1605
|
exports.StyledDropdownContent = styled5__default.default.div`
|
|
1590
1606
|
display: flex;
|
|
1591
1607
|
flex-direction: column;
|
|
1608
|
+
background: ${exports.colorTokens.neutral0};
|
|
1592
1609
|
width: ${({ width }) => width != null ? width : "240px"};
|
|
1593
1610
|
padding: 4px;
|
|
1594
1611
|
border-radius: 6px;
|