@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.
@@ -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
- top: var(--rls-sizing-x8);
2893
- right: var(--rls-sizing-x8);
2894
- width: calc(100% - var(--rls-sizing-x16));
2895
- max-width: 160rem;
2896
- height: auto;
2897
- max-height: calc(var(--rls-html-max-height) - var(--rls-sizing-x16));
2898
- z-index: var(--rls-z-index-12);
2899
- padding: var(--rls-sizing-x8) var(--rls-sizing-x8) var(--rls-sizing-x12)
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
- transform: translateX(0%);
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-navigation__header {
2912
- margin-bottom: var(--rls-sizing-x8);
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-navigation__header .rls-button-action {
2915
- width: var(--rls-sizing-x12);
2916
- height: var(--rls-sizing-x12);
2917
- padding: 0rem;
2918
- float: right;
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/es/index.js CHANGED
@@ -3360,11 +3360,39 @@ function RlsFieldSelect(props) {
3360
3360
  return jsxRuntimeExports.jsx(RlsFieldSelectTemplate, { ...props, render: render });
3361
3361
  }
3362
3362
 
3363
- function RlsFormNavigation({ children, visible, rlsTheme }) {
3364
- const className = useMemo(() => {
3365
- return renderClassStatus('rls-form-navigation', { visible });
3366
- }, [visible]);
3367
- return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__body", children: children }) }));
3363
+ function RlsFormNavigation({ onAutoClose, children, className, visible, rlsTheme }) {
3364
+ const classNameForm = useMemo(() => {
3365
+ return renderClassStatus('rls-form-navigation', { visible }, className);
3366
+ }, [visible, className]);
3367
+ const onClickBackdrop = useCallback(() => {
3368
+ onAutoClose && onAutoClose();
3369
+ }, [onAutoClose]);
3370
+ 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);
3371
+ }
3372
+
3373
+ function usePortalController(component) {
3374
+ const [children, setChildren] = useState(component);
3375
+ const [visible, setVisible] = useState(false);
3376
+ const open = useCallback((children) => {
3377
+ setVisible(true);
3378
+ children && setChildren(children);
3379
+ }, []);
3380
+ const close = useCallback(() => {
3381
+ setVisible(false);
3382
+ }, []);
3383
+ return { children, close, open, visible };
3384
+ }
3385
+
3386
+ function useFormNavigationController(component) {
3387
+ const portal = usePortalController(component);
3388
+ const FormNavigation = useMemo(() => {
3389
+ return (jsxRuntimeExports.jsx(RlsFormNavigation, { visible: portal.visible, children: portal.children }));
3390
+ }, [portal.children, portal.visible]);
3391
+ return {
3392
+ close: portal.close,
3393
+ FormNavigation,
3394
+ open: portal.open
3395
+ };
3368
3396
  }
3369
3397
 
3370
3398
  function useRelocationOnComponent({ container, element, onDrag }) {
@@ -3831,14 +3859,16 @@ function useSnackbar() {
3831
3859
  visible: false
3832
3860
  });
3833
3861
  const onClose = useCallback(() => {
3862
+ timeoutId.current && clearTimeout(timeoutId.current);
3863
+ timeoutId.current = undefined;
3834
3864
  setState((state) => ({ ...state, visible: false }));
3835
3865
  }, []);
3836
3866
  const rlsSnackbar = (jsxRuntimeExports.jsx(RlsSnackbar, { ...state.config, visible: state.visible, onClose: onClose }));
3837
3867
  useEffect(() => {
3838
3868
  if (state.visible) {
3839
3869
  timeoutId.current = setTimeout(() => {
3840
- setState((state) => ({ ...state, visible: false }));
3841
3870
  timeoutId.current = undefined;
3871
+ setState((state) => ({ ...state, visible: false }));
3842
3872
  }, duration.current);
3843
3873
  }
3844
3874
  else if (timeoutId.current) {
@@ -3917,5 +3947,5 @@ function useDatatable() {
3917
3947
  return { scrolleable, tableRef };
3918
3948
  }
3919
3949
 
3920
- export { ConfirmationResult, RlsAlert, RlsAmount, RlsApplication, RlsAvatar, RlsBadge, RlsBallot, RlsBottomSheet, RlsBreadcrumb, RlsButton, RlsButtonAction, RlsButtonOption, RlsButtonProgress, RlsButtonToggle, RlsCard, RlsCheckBox, RlsCheckBoxControl, RlsConfirmation, RlsContent, RlsContext, RlsDatatable, RlsDatatableCell, RlsDatatableData, RlsDatatableFloating, RlsDatatableHeader, RlsDatatableRecord, RlsDatatableSubheader, RlsDatatableTitle, RlsDatatableTotals, RlsFieldAutocomplete, RlsFieldAutocompleteTemplate, RlsFieldDate, RlsFieldDateRange, RlsFieldDecimal, RlsFieldMoney, RlsFieldNumber, RlsFieldPassword, RlsFieldPercentage, RlsFieldReadonly, RlsFieldSelect, RlsFieldSelectTemplate, RlsFieldText, RlsFormNavigation, RlsIcon, RlsImage, RlsImageChooser, RlsImageEditor, RlsInput, RlsInputDecimal, RlsInputMoney, RlsInputNumber, RlsInputPassword, RlsInputPercentage, RlsInputSearch, RlsInputText, RlsLabel, RlsLabelCheckBox, RlsLabelRadioButton, RlsLabelSwitch, RlsMessageFormError, RlsMessageIcon, RlsModal, RlsModalSheet, RlsNavbar, RlsPagination, RlsPickerDate, RlsPickerDateRange, RlsPickerDay, RlsPickerDayRange, RlsPickerMonth, RlsPickerSelectorTitle, RlsPickerYear, RlsPoster, RlsProgressBar, RlsProgressCircular, RlsRadioButton, RlsSkeleton, RlsSkeletonText, RlsSlider, RlsSnackbar, RlsSpinner, RlsSwitch, RlsSwitchControl, RlsTabs, RlsTabularText, RlsToolbar, calculateImgDimension, rangeFormatTemplate, renderClassStatus, setErrorsI18n, useConfirmation, useDatatable, useFieldAutocomplete, useFieldSelect, useFormSingleSelectionController, useFormToggleController, useImageEditorController, useListController, useRelocationOnComponent, useResize, useSnackbar };
3950
+ export { ConfirmationResult, RlsAlert, RlsAmount, RlsApplication, RlsAvatar, RlsBadge, RlsBallot, RlsBottomSheet, RlsBreadcrumb, RlsButton, RlsButtonAction, RlsButtonOption, RlsButtonProgress, RlsButtonToggle, RlsCard, RlsCheckBox, RlsCheckBoxControl, RlsConfirmation, RlsContent, RlsContext, RlsDatatable, RlsDatatableCell, RlsDatatableData, RlsDatatableFloating, RlsDatatableHeader, RlsDatatableRecord, RlsDatatableSubheader, RlsDatatableTitle, RlsDatatableTotals, RlsFieldAutocomplete, RlsFieldAutocompleteTemplate, RlsFieldDate, RlsFieldDateRange, RlsFieldDecimal, RlsFieldMoney, RlsFieldNumber, RlsFieldPassword, RlsFieldPercentage, RlsFieldReadonly, RlsFieldSelect, RlsFieldSelectTemplate, RlsFieldText, RlsFormNavigation, RlsIcon, RlsImage, RlsImageChooser, RlsImageEditor, RlsInput, RlsInputDecimal, RlsInputMoney, RlsInputNumber, RlsInputPassword, RlsInputPercentage, RlsInputSearch, RlsInputText, RlsLabel, RlsLabelCheckBox, RlsLabelRadioButton, RlsLabelSwitch, RlsMessageFormError, RlsMessageIcon, RlsModal, RlsModalSheet, RlsNavbar, RlsPagination, RlsPickerDate, RlsPickerDateRange, RlsPickerDay, RlsPickerDayRange, RlsPickerMonth, RlsPickerSelectorTitle, RlsPickerYear, RlsPoster, RlsProgressBar, RlsProgressCircular, RlsRadioButton, RlsSkeleton, RlsSkeletonText, RlsSlider, RlsSnackbar, RlsSpinner, RlsSwitch, RlsSwitchControl, RlsTabs, RlsTabularText, RlsToolbar, calculateImgDimension, rangeFormatTemplate, renderClassStatus, setErrorsI18n, useConfirmation, useDatatable, useFieldAutocomplete, useFieldSelect, useFormNavigationController, useFormSingleSelectionController, useFormToggleController, useImageEditorController, useListController, useRelocationOnComponent, useResize, useSnackbar };
3921
3951
  //# sourceMappingURL=index.js.map