@rolster/react-components 18.26.22 → 18.26.23
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/cjs/index.js +17 -23
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +17 -24
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.d.ts +4 -6
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.js +6 -12
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.js.map +1 -1
- package/dist/esm/controllers/PortalController.d.ts +3 -6
- package/dist/esm/controllers/PortalController.js +3 -5
- package/dist/esm/controllers/PortalController.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -3399,29 +3399,11 @@ function RlsFormNavigation({ onAutoClose, children, className, visible, rlsTheme
|
|
|
3399
3399
|
return ReactDOM.createPortal(jsxRuntimeExports.jsxs("div", { className: classNameForm, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__component", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__backdrop", onClick: onClickBackdrop })] }), document.body);
|
|
3400
3400
|
}
|
|
3401
3401
|
|
|
3402
|
-
function
|
|
3403
|
-
const
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
children && setChildren(children);
|
|
3408
|
-
}, []);
|
|
3409
|
-
const close = require$$0.useCallback(() => {
|
|
3410
|
-
setVisible(false);
|
|
3411
|
-
}, []);
|
|
3412
|
-
return { children, close, open, visible };
|
|
3413
|
-
}
|
|
3414
|
-
|
|
3415
|
-
function useFormNavigationController(component) {
|
|
3416
|
-
const portal = usePortalController(component);
|
|
3417
|
-
const FormNavigation = require$$0.useMemo(() => {
|
|
3418
|
-
return (jsxRuntimeExports.jsx(RlsFormNavigation, { visible: portal.visible, children: portal.children }));
|
|
3419
|
-
}, [portal.children, portal.visible]);
|
|
3420
|
-
return {
|
|
3421
|
-
close: portal.close,
|
|
3422
|
-
FormNavigation,
|
|
3423
|
-
open: portal.open
|
|
3424
|
-
};
|
|
3402
|
+
function useFormNavigationController(portal) {
|
|
3403
|
+
const FormNavigation = require$$0.useCallback(({ children }) => {
|
|
3404
|
+
return (jsxRuntimeExports.jsx(RlsFormNavigation, { visible: portal.visible, children: children }));
|
|
3405
|
+
}, [portal.visible]);
|
|
3406
|
+
return FormNavigation;
|
|
3425
3407
|
}
|
|
3426
3408
|
|
|
3427
3409
|
function useRelocationOnComponent({ container, element, onDrag }) {
|
|
@@ -3953,6 +3935,17 @@ function RlsApplication({ children }) {
|
|
|
3953
3935
|
}, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children, RlsSnackbar] }), RlsConfirmation] }));
|
|
3954
3936
|
}
|
|
3955
3937
|
|
|
3938
|
+
function usePortalController() {
|
|
3939
|
+
const [visible, setVisible] = require$$0.useState(false);
|
|
3940
|
+
const open = require$$0.useCallback(() => {
|
|
3941
|
+
setVisible(true);
|
|
3942
|
+
}, []);
|
|
3943
|
+
const close = require$$0.useCallback(() => {
|
|
3944
|
+
setVisible(false);
|
|
3945
|
+
}, []);
|
|
3946
|
+
return { close, open, visible };
|
|
3947
|
+
}
|
|
3948
|
+
|
|
3956
3949
|
exports.ConfirmationResult = ConfirmationResult;
|
|
3957
3950
|
exports.RlsAlert = RlsAlert;
|
|
3958
3951
|
exports.RlsAmount = RlsAmount;
|
|
@@ -4052,6 +4045,7 @@ exports.useFormSingleSelectionController = useFormSingleSelectionController;
|
|
|
4052
4045
|
exports.useFormToggleController = useFormToggleController;
|
|
4053
4046
|
exports.useImageEditorController = useImageEditorController;
|
|
4054
4047
|
exports.useListController = useListController;
|
|
4048
|
+
exports.usePortalController = usePortalController;
|
|
4055
4049
|
exports.useRelocationOnComponent = useRelocationOnComponent;
|
|
4056
4050
|
exports.useResize = useResize;
|
|
4057
4051
|
exports.useSnackbar = useSnackbar;
|