@pepperi-addons/ngx-lib-react 0.5.14 → 0.5.16
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/elements/main.js +1 -1
- package/package.json +1 -1
- package/pep-page-layout.js +8 -1
- package/pep-remote-loader.js +1 -1
package/package.json
CHANGED
package/pep-page-layout.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
|
+
const ContentSlot = ({ slotAttribute, children }) => {
|
|
4
|
+
const slotProps = {
|
|
5
|
+
[slotAttribute]: '',
|
|
6
|
+
style: { display: 'contents' },
|
|
7
|
+
};
|
|
8
|
+
return _jsx("div", { ...slotProps, children: children });
|
|
9
|
+
};
|
|
3
10
|
export const PepPageLayout = ({ addPadding = false, showShadow = false, headerArea, sideArea, topArea, mainArea, children }) => {
|
|
4
11
|
const elementRef = useRef(null);
|
|
5
12
|
useEffect(() => {
|
|
@@ -14,6 +21,6 @@ export const PepPageLayout = ({ addPadding = false, showShadow = false, headerAr
|
|
|
14
21
|
element.showShadow = showShadow;
|
|
15
22
|
}, 0);
|
|
16
23
|
}, [addPadding, showShadow]);
|
|
17
|
-
return (_jsxs("pep-page-layout-element", { ref: elementRef, children: [headerArea && _jsx(
|
|
24
|
+
return (_jsxs("pep-page-layout-element", { ref: elementRef, children: [headerArea && _jsx(ContentSlot, { slotAttribute: "pep-header-area", children: headerArea }), sideArea && _jsx(ContentSlot, { slotAttribute: "pep-side-area", children: sideArea }), topArea && _jsx(ContentSlot, { slotAttribute: "pep-top-area", children: topArea }), mainArea && _jsx(ContentSlot, { slotAttribute: "pep-main-area", children: mainArea }), children] }));
|
|
18
25
|
};
|
|
19
26
|
//# sourceMappingURL=pep-page-layout.js.map
|
package/pep-remote-loader.js
CHANGED
|
@@ -21,6 +21,6 @@ export const PepRemoteLoader = ({ keyProp, options, props, events, onLoad, ...re
|
|
|
21
21
|
el.addEventListener('load', handler);
|
|
22
22
|
return () => el.removeEventListener('load', handler);
|
|
23
23
|
}, [onLoad]);
|
|
24
|
-
return _jsx("pep-remote-loader-element", { ref: ref, ...rest }, keyProp);
|
|
24
|
+
return _jsx("pep-remote-loader-element-element", { ref: ref, ...rest }, keyProp);
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=pep-remote-loader.js.map
|