@rolster/react-components 18.26.15 → 18.26.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/cjs/assets/{index-BRZjdUv6.css → index-Dzi7TziB.css} +50 -23
- package/dist/cjs/index.js +37 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-BRZjdUv6.css → index-Dzi7TziB.css} +50 -23
- package/dist/es/index.js +37 -7
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.css +50 -23
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.css.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.d.ts +3 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.js +11 -7
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.js.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.d.ts +8 -0
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.js +16 -0
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.js.map +1 -0
- package/dist/esm/components/organisms/Modal/Modal.css.map +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js +3 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/controllers/PortalController.d.ts +9 -0
- package/dist/esm/controllers/PortalController.js +14 -0
- package/dist/esm/controllers/PortalController.js.map +1 -0
- 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
|
@@ -2888,34 +2888,61 @@
|
|
|
2888
2888
|
} /*# sourceMappingURL=FieldSelect.css.map */
|
|
2889
2889
|
|
|
2890
2890
|
.rls-form-navigation {
|
|
2891
|
+
--pvt-component-transform: translateX(100%);
|
|
2892
|
+
--pvt-component-opacity: 0;
|
|
2893
|
+
--pvt-component-visibility: hidden;
|
|
2894
|
+
--pvt-component-transition: 160ms;
|
|
2895
|
+
--pvt-backdrop-opacity: 0;
|
|
2896
|
+
--pvt-backdrop-bottom: initial;
|
|
2891
2897
|
position: fixed;
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
height:
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
var(--rls-sizing-x8);
|
|
2901
|
-
box-sizing: border-box;
|
|
2902
|
-
background: var(--rls-app-color-050);
|
|
2903
|
-
border-radius: var(--rls-sizing-x4);
|
|
2904
|
-
box-shadow: var(--rls-dark-shadow-center-8);
|
|
2905
|
-
transform: translateX(calc(100% + var(--rls-sizing-x16)));
|
|
2906
|
-
transition: transform 240ms 0ms var(--rls-standard-curve);
|
|
2898
|
+
display: flex;
|
|
2899
|
+
top: 0rem;
|
|
2900
|
+
left: 0rem;
|
|
2901
|
+
width: 100%;
|
|
2902
|
+
height: 100%;
|
|
2903
|
+
z-index: var(--rls-z-index-24);
|
|
2904
|
+
visibility: hidden;
|
|
2905
|
+
justify-content: flex-end;
|
|
2907
2906
|
}
|
|
2908
2907
|
.rls-form-navigation--visible {
|
|
2909
|
-
|
|
2908
|
+
--pvt-component-visibility: visible;
|
|
2909
|
+
--pvt-component-opacity: 1;
|
|
2910
|
+
--pvt-component-transform: translateX(0%);
|
|
2911
|
+
--pvt-backdrop-bottom: 0rem;
|
|
2912
|
+
--pvt-backdrop-opacity: 1;
|
|
2913
|
+
visibility: visible;
|
|
2910
2914
|
}
|
|
2911
|
-
.rls-form-
|
|
2912
|
-
|
|
2915
|
+
.rls-form-navigation__component {
|
|
2916
|
+
position: absolute;
|
|
2917
|
+
display: flex;
|
|
2918
|
+
width: calc(100% - var(--rls-sizing-x16));
|
|
2919
|
+
max-width: var(--rlc-form-navigation-max-width, 160rem);
|
|
2920
|
+
height: 100%;
|
|
2921
|
+
flex-direction: column;
|
|
2922
|
+
opacity: var(--pvt-component-opacity);
|
|
2923
|
+
visibility: var(--pvt-component-visibility);
|
|
2924
|
+
z-index: var(--rls-z-index-2);
|
|
2925
|
+
border-radius: var(--rls-sizing-x4) 0rem 0rem var(--rls-sizing-x4);
|
|
2926
|
+
background: var(--rlc-form-navigation-background, var(--rls-app-color-050));
|
|
2927
|
+
transform: var(--pvt-component-transform);
|
|
2928
|
+
transition: opacity var(--pvt-component-transition) 0ms
|
|
2929
|
+
var(--rls-deceleration-curve),
|
|
2930
|
+
transform var(--pvt-component-transition) 0ms var(--rls-deceleration-curve),
|
|
2931
|
+
visibility var(--pvt-component-transition) 0ms var(--rls-deceleration-curve);
|
|
2913
2932
|
}
|
|
2914
|
-
.rls-form-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2933
|
+
.rls-form-navigation__backdrop {
|
|
2934
|
+
position: absolute;
|
|
2935
|
+
display: block;
|
|
2936
|
+
top: 0rem;
|
|
2937
|
+
left: 0rem;
|
|
2938
|
+
right: 0rem;
|
|
2939
|
+
bottom: var(--pvt-backdrop-bottom);
|
|
2940
|
+
opacity: var(--pvt-backdrop-opacity);
|
|
2941
|
+
z-index: 1;
|
|
2942
|
+
background: var(--rls-theme-backdrop-900);
|
|
2943
|
+
backdrop-filter: blur(2px);
|
|
2944
|
+
transition: opacity 120ms 0ms var(--rls-deceleration-curve),
|
|
2945
|
+
bottom 120ms 0ms var(--rls-deceleration-curve);
|
|
2919
2946
|
} /*# sourceMappingURL=FormNavigation.css.map */
|
|
2920
2947
|
|
|
2921
2948
|
.rls-image-editor {
|
package/dist/cjs/index.js
CHANGED
|
@@ -3362,11 +3362,39 @@ function RlsFieldSelect(props) {
|
|
|
3362
3362
|
return jsxRuntimeExports.jsx(RlsFieldSelectTemplate, { ...props, render: render });
|
|
3363
3363
|
}
|
|
3364
3364
|
|
|
3365
|
-
function RlsFormNavigation({ children, visible, rlsTheme }) {
|
|
3366
|
-
const
|
|
3367
|
-
return renderClassStatus('rls-form-navigation', { visible });
|
|
3368
|
-
}, [visible]);
|
|
3369
|
-
|
|
3365
|
+
function RlsFormNavigation({ onAutoClose, children, className, visible, rlsTheme }) {
|
|
3366
|
+
const classNameForm = require$$0.useMemo(() => {
|
|
3367
|
+
return renderClassStatus('rls-form-navigation', { visible }, className);
|
|
3368
|
+
}, [visible, className]);
|
|
3369
|
+
const onClickBackdrop = require$$0.useCallback(() => {
|
|
3370
|
+
onAutoClose && onAutoClose();
|
|
3371
|
+
}, [onAutoClose]);
|
|
3372
|
+
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);
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
function usePortalController(component) {
|
|
3376
|
+
const [children, setChildren] = require$$0.useState(component);
|
|
3377
|
+
const [visible, setVisible] = require$$0.useState(false);
|
|
3378
|
+
const open = require$$0.useCallback((children) => {
|
|
3379
|
+
setVisible(true);
|
|
3380
|
+
children && setChildren(children);
|
|
3381
|
+
}, []);
|
|
3382
|
+
const close = require$$0.useCallback(() => {
|
|
3383
|
+
setVisible(false);
|
|
3384
|
+
}, []);
|
|
3385
|
+
return { children, close, open, visible };
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
function useFormNavigationController(component) {
|
|
3389
|
+
const portal = usePortalController(component);
|
|
3390
|
+
const FormNavigation = require$$0.useMemo(() => {
|
|
3391
|
+
return (jsxRuntimeExports.jsx(RlsFormNavigation, { visible: portal.visible, children: portal.children }));
|
|
3392
|
+
}, [portal.children, portal.visible]);
|
|
3393
|
+
return {
|
|
3394
|
+
close: portal.close,
|
|
3395
|
+
FormNavigation,
|
|
3396
|
+
open: portal.open
|
|
3397
|
+
};
|
|
3370
3398
|
}
|
|
3371
3399
|
|
|
3372
3400
|
function useRelocationOnComponent({ container, element, onDrag }) {
|
|
@@ -3833,14 +3861,16 @@ function useSnackbar() {
|
|
|
3833
3861
|
visible: false
|
|
3834
3862
|
});
|
|
3835
3863
|
const onClose = require$$0.useCallback(() => {
|
|
3864
|
+
timeoutId.current && clearTimeout(timeoutId.current);
|
|
3865
|
+
timeoutId.current = undefined;
|
|
3836
3866
|
setState((state) => ({ ...state, visible: false }));
|
|
3837
3867
|
}, []);
|
|
3838
3868
|
const rlsSnackbar = (jsxRuntimeExports.jsx(RlsSnackbar, { ...state.config, visible: state.visible, onClose: onClose }));
|
|
3839
3869
|
require$$0.useEffect(() => {
|
|
3840
3870
|
if (state.visible) {
|
|
3841
3871
|
timeoutId.current = setTimeout(() => {
|
|
3842
|
-
setState((state) => ({ ...state, visible: false }));
|
|
3843
3872
|
timeoutId.current = undefined;
|
|
3873
|
+
setState((state) => ({ ...state, visible: false }));
|
|
3844
3874
|
}, duration.current);
|
|
3845
3875
|
}
|
|
3846
3876
|
else if (timeoutId.current) {
|
|
@@ -4013,6 +4043,7 @@ exports.useConfirmation = useConfirmation;
|
|
|
4013
4043
|
exports.useDatatable = useDatatable;
|
|
4014
4044
|
exports.useFieldAutocomplete = useFieldAutocomplete;
|
|
4015
4045
|
exports.useFieldSelect = useFieldSelect;
|
|
4046
|
+
exports.useFormNavigationController = useFormNavigationController;
|
|
4016
4047
|
exports.useFormSingleSelectionController = useFormSingleSelectionController;
|
|
4017
4048
|
exports.useFormToggleController = useFormToggleController;
|
|
4018
4049
|
exports.useImageEditorController = useImageEditorController;
|