@registrucentras/rc-ses-react-components 1.7.1 → 1.9.0

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.
Files changed (57) hide show
  1. package/dist/assets/icons/CheckCircleFillIcon.d.ts +1 -1
  2. package/dist/assets/icons/CopyIcon.d.ts +3 -0
  3. package/dist/assets/icons/InfoFillIcon.d.ts +1 -1
  4. package/dist/assets/icons/QuestionFillIcon.d.ts +1 -1
  5. package/dist/assets/icons/WarningFillIcon.d.ts +1 -1
  6. package/dist/components/common/Button/index.d.ts +1 -1
  7. package/dist/components/loaders/FullPageLoader/index.d.ts +9 -0
  8. package/dist/components/loaders/Loader/index.d.ts +26 -0
  9. package/dist/components/loaders/LoadingSpinner/index.d.ts +10 -0
  10. package/dist/components/overlays/Dialog/index.d.ts +11 -0
  11. package/dist/components/overlays/Modal/index.d.ts +16 -0
  12. package/dist/library/icons.d.ts +2 -1
  13. package/dist/library/index.d.ts +6 -1
  14. package/dist/library/types.d.ts +8 -1
  15. package/dist/registrucentras-rc-ses-react-components.cjs +10 -10
  16. package/dist/registrucentras-rc-ses-react-components.js +2009 -1680
  17. package/dist/stories/components/actions/Button.stories.d.ts +26 -0
  18. package/dist/stories/components/loaders/FullPageLoader.stories.d.ts +37 -0
  19. package/dist/stories/components/loaders/Loader.stories.d.ts +36 -0
  20. package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +62 -0
  21. package/dist/stories/components/overlays/Dialog.stories.d.ts +9 -0
  22. package/dist/stories/components/overlays/Modal.stories.d.ts +10 -0
  23. package/package.json +1 -1
  24. package/src/assets/icons/CheckCircleFillIcon.tsx +8 -2
  25. package/src/assets/icons/CopyIcon.tsx +23 -0
  26. package/src/assets/icons/InfoFillIcon.tsx +8 -2
  27. package/src/assets/icons/QuestionFillIcon.tsx +8 -2
  28. package/src/assets/icons/WarningFillIcon.tsx +8 -2
  29. package/src/components/common/Button/index.test.tsx +175 -0
  30. package/src/components/common/Button/index.tsx +46 -4
  31. package/src/components/common/Snackbar/index.test.tsx +10 -4
  32. package/src/components/form/inputs/CheckboxFormControl.test.tsx +11 -7
  33. package/src/components/loaders/FullPageLoader/index.test.tsx +80 -0
  34. package/src/components/loaders/FullPageLoader/index.tsx +68 -0
  35. package/src/components/loaders/Loader/index.test.tsx +58 -0
  36. package/src/components/loaders/Loader/index.tsx +65 -0
  37. package/src/components/loaders/LoadingSpinner/index.test.tsx +48 -0
  38. package/src/components/loaders/LoadingSpinner/index.tsx +70 -0
  39. package/src/components/overlays/Dialog/index.test.tsx +85 -0
  40. package/src/components/overlays/Dialog/index.tsx +85 -0
  41. package/src/components/overlays/Modal/index.test.tsx +94 -0
  42. package/src/components/overlays/Modal/index.tsx +116 -0
  43. package/src/i18n/namespaces/common/en.json +6 -0
  44. package/src/i18n/namespaces/common/lt.json +6 -0
  45. package/src/i18n/namespaces/input/en.json +18 -0
  46. package/src/i18n/namespaces/input/lt.json +18 -0
  47. package/src/library/icons.ts +2 -0
  48. package/src/library/index.ts +10 -0
  49. package/src/library/types.ts +19 -0
  50. package/src/setupTests.ts +13 -0
  51. package/src/stories/components/actions/Button.stories.tsx +201 -0
  52. package/src/stories/components/icons/Icons.stories.tsx +5 -0
  53. package/src/stories/components/loaders/FullPageLoader.stories.tsx +126 -0
  54. package/src/stories/components/loaders/Loader.stories.tsx +76 -0
  55. package/src/stories/components/loaders/LoadingSpinner.stories.tsx +126 -0
  56. package/src/stories/components/overlays/Dialog.stories.tsx +271 -0
  57. package/src/stories/components/overlays/Modal.stories.tsx +98 -0
@@ -1,3 +1,3 @@
1
1
  import { default as IconProps } from '../IconProps';
2
- declare function CheckCircleIcon({ className, fillColor, size, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function CheckCircleIcon({ className, fillColor, size, weight, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default CheckCircleIcon;
@@ -0,0 +1,3 @@
1
+ import { default as IconProps } from '../IconProps';
2
+ declare function CopyIcon({ className, fillColor, size, weight, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
3
+ export default CopyIcon;
@@ -1,3 +1,3 @@
1
1
  import { default as IconProps } from '../IconProps';
2
- declare function InfoFillIcon({ className, size, fillColor, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function InfoFillIcon({ className, size, fillColor, weight, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default InfoFillIcon;
@@ -1,3 +1,3 @@
1
1
  import { default as IconProps } from '../IconProps';
2
- declare function QuestionFillIcon({ className, size, fillColor, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function QuestionFillIcon({ className, size, fillColor, weight, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default QuestionFillIcon;
@@ -1,3 +1,3 @@
1
1
  import { default as IconProps } from '../IconProps';
2
- declare function WarningFillIcon({ className, size, fillColor, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function WarningFillIcon({ className, size, fillColor, weight, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default WarningFillIcon;
@@ -1,6 +1,6 @@
1
1
  import { ButtonProps } from '../../../types/buttons/ButtonProps';
2
2
  type Props = ButtonProps & {
3
- to?: string;
3
+ loading?: boolean;
4
4
  };
5
5
  declare function RcSesButton(props: Props): import("react/jsx-runtime").JSX.Element;
6
6
  export default RcSesButton;
@@ -0,0 +1,9 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import { RcSesLoaderProps } from '../Loader';
3
+ export type RcSesLoaderBackdrop = 'dark' | 'light';
4
+ type FullPageLoaderContentProps = Pick<RcSesLoaderProps, 'label' | 'showLabel'>;
5
+ export interface RcSesFullPageLoaderProps extends Omit<BoxProps, 'children' | 'sx'>, FullPageLoaderContentProps {
6
+ backdrop?: RcSesLoaderBackdrop;
7
+ }
8
+ declare function RcSesFullPageLoader({ backdrop, label, showLabel, ...props }: RcSesFullPageLoaderProps): import("react/jsx-runtime").JSX.Element;
9
+ export default RcSesFullPageLoader;
@@ -0,0 +1,26 @@
1
+ import { StackProps } from '@mui/material';
2
+ declare const LOADER_SIZE_MAP: {
3
+ readonly small: {
4
+ readonly gap: 1;
5
+ readonly spinnerSize: "24px";
6
+ readonly textVariant: "body2";
7
+ };
8
+ readonly medium: {
9
+ readonly gap: 1.5;
10
+ readonly spinnerSize: "40px";
11
+ readonly textVariant: "body1";
12
+ };
13
+ readonly large: {
14
+ readonly gap: 2;
15
+ readonly spinnerSize: "64px";
16
+ readonly textVariant: "body1";
17
+ };
18
+ };
19
+ export type RcSesLoaderSize = keyof typeof LOADER_SIZE_MAP;
20
+ export interface RcSesLoaderProps extends Omit<StackProps, 'children'> {
21
+ label?: string;
22
+ size?: RcSesLoaderSize;
23
+ showLabel?: boolean;
24
+ }
25
+ declare function RcSesLoader({ 'aria-label': ariaLabel, label, size, showLabel, sx, ...props }: RcSesLoaderProps): import("react/jsx-runtime").JSX.Element;
26
+ export default RcSesLoader;
@@ -0,0 +1,10 @@
1
+ import { ButtonOwnProps } from '@mui/material';
2
+ declare const VALID_SPINNER_COLORS: readonly ["primary", "secondary", "error", "warning", "info", "success", "inherit"];
3
+ export type RcSesSpinnerColor = (typeof VALID_SPINNER_COLORS)[number];
4
+ export declare function getSpinnerColor(color: ButtonOwnProps['color']): RcSesSpinnerColor;
5
+ export interface RcSesLoadingSpinnerProps {
6
+ color?: RcSesSpinnerColor;
7
+ size?: 'small' | 'medium' | 'large' | string;
8
+ }
9
+ declare function RcSesLoadingSpinner({ color, size, }: RcSesLoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
10
+ export default RcSesLoadingSpinner;
@@ -0,0 +1,11 @@
1
+ import { DialogProps as MuiDialogProps } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ export type DialogSize = 'sm' | 'md' | 'lg';
4
+ export interface RcSesDialogProps extends Omit<MuiDialogProps, 'children' | 'title' | 'PaperProps' | 'maxWidth'> {
5
+ dialogTitle: string | ReactNode;
6
+ children?: ReactNode;
7
+ actions: ReactNode;
8
+ size?: DialogSize;
9
+ }
10
+ declare function RcSesDialog({ dialogTitle, children, actions, onClose, size, ...props }: RcSesDialogProps): import("react/jsx-runtime").JSX.Element;
11
+ export default RcSesDialog;
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { RcSesDialogProps } from '../Dialog';
3
+ export type ModalVariant = 'destructive' | 'confirm' | 'success' | 'info';
4
+ export interface RcSesModalProps extends Omit<RcSesDialogProps, 'children' | 'dialogTitle' | 'actions'> {
5
+ title: string;
6
+ message: ReactNode;
7
+ variant?: ModalVariant;
8
+ showIcon?: boolean;
9
+ onPrimaryAction?: () => void;
10
+ onSecondaryAction?: () => void;
11
+ primaryActionLabel?: string;
12
+ secondaryActionLabel?: string;
13
+ actions?: ReactNode;
14
+ }
15
+ declare function RcSesModal({ title, message, variant, showIcon, onPrimaryAction, onSecondaryAction, primaryActionLabel, secondaryActionLabel, actions: customActions, ...props }: RcSesModalProps): import("react/jsx-runtime").JSX.Element;
16
+ export default RcSesModal;
@@ -19,6 +19,7 @@ import { default as CheckUncheckedBoldIcon } from '../assets/icons/CheckUnchecke
19
19
  import { default as CircleFilledIcon } from '../assets/icons/CircleFilledIcon';
20
20
  import { default as CloseIcon } from '../assets/icons/CloseIcon';
21
21
  import { default as CollapseChevronsIcon } from '../assets/icons/CollapseChevronsIcon';
22
+ import { default as CopyIcon } from '../assets/icons/CopyIcon';
22
23
  import { default as DotCircleFilledIcon } from '../assets/icons/DotCircleFilledIcon';
23
24
  import { default as ExpandChevronsIcon } from '../assets/icons/ExpandChevronsIcon';
24
25
  import { default as InfoFillIcon } from '../assets/icons/InfoFillIcon';
@@ -39,4 +40,4 @@ import { default as WarningCircleIcon } from '../assets/icons/WarningCircleIcon'
39
40
  import { default as WarningDiamondFillIcon } from '../assets/icons/WarningDiamondFillIcon';
40
41
  import { default as WarningFillIcon } from '../assets/icons/WarningFillIcon';
41
42
  import { default as XCircleFillIcon } from '../assets/icons/XCircleFillIcon';
42
- export { RcSesLogo, ArrowLeftIcon, ArrowRightIcon, ArrowsClockwiseIcon, BarcodeIcon, CalendarBlankIcon, CaretDoubleLeftBoldIcon, CaretDoubleRightBoldIcon, CaretDownBoldIcon, CaretDownFill, CaretDownIcon, CaretLeftBoldIcon, CaretLeftIcon, CaretRightBoldIcon, CheckBoldIcon, CheckCircleFillIcon, CheckIcon, CheckUncheckedBoldIcon, CircleFilledIcon, CloseIcon, CollapseChevronsIcon, DotCircleFilledIcon, ExpandChevronsIcon, InfoFillIcon, MagnifyingGlassIcon, MapPinAreaIcon, MinusBoldIcon, PencilSimpleLineIcon, PlusBoldIcon, QuestionFillIcon, QuestionIcon, ScalesIcon, ScrollIcon, SearchHelpIcon, SearchXIcon, SpinnerGapBoldIcon, UploadSimpleIcon, WarningDiamondFillIcon, WarningFillIcon, WarningCircleIcon, XCircleFillIcon, };
43
+ export { RcSesLogo, ArrowLeftIcon, ArrowRightIcon, ArrowsClockwiseIcon, BarcodeIcon, CalendarBlankIcon, CaretDoubleLeftBoldIcon, CaretDoubleRightBoldIcon, CaretDownBoldIcon, CaretDownFill, CaretDownIcon, CaretLeftBoldIcon, CaretLeftIcon, CaretRightBoldIcon, CheckBoldIcon, CheckCircleFillIcon, CheckIcon, CheckUncheckedBoldIcon, CircleFilledIcon, CloseIcon, CollapseChevronsIcon, CopyIcon, DotCircleFilledIcon, ExpandChevronsIcon, InfoFillIcon, MagnifyingGlassIcon, MapPinAreaIcon, MinusBoldIcon, PencilSimpleLineIcon, PlusBoldIcon, QuestionFillIcon, QuestionIcon, ScalesIcon, ScrollIcon, SearchHelpIcon, SearchXIcon, SpinnerGapBoldIcon, UploadSimpleIcon, WarningDiamondFillIcon, WarningFillIcon, WarningCircleIcon, XCircleFillIcon, };
@@ -39,6 +39,11 @@ import { default as RcSesCardFormContainer } from '../components/layout/ServiceF
39
39
  import { default as RcSesServiceHeader } from '../components/layout/ServiceHeader';
40
40
  import { default as RcSesServicePage } from '../components/layout/ServicePage';
41
41
  import { default as ServiceWizardStepper } from '../components/layout/ServiceWizardStepper';
42
+ import { default as RcSesFullPageLoader } from '../components/loaders/FullPageLoader';
43
+ import { default as RcSesLoader } from '../components/loaders/Loader';
44
+ import { default as RcSesLoadingSpinner } from '../components/loaders/LoadingSpinner';
45
+ import { default as RcSesDialog } from '../components/overlays/Dialog';
46
+ import { default as RcSesModal } from '../components/overlays/Modal';
42
47
  import { default as RcSesTheme } from '../theme/light';
43
48
  import { default as RcSesPalette } from '../theme/palette';
44
49
  import { default as SelectableCardList } from '../components/common/SelectableCardList';
@@ -49,7 +54,7 @@ declare module '@mui/x-date-pickers/models' {
49
54
  }
50
55
  export { RcSesPalette, RcSesTheme };
51
56
  export { RcSesAccordion, useAccordionController };
52
- export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesCard, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, };
57
+ export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, RcSesModal, };
53
58
  export { RcSesCheckbox, RcSesCheckboxFormControl, RcSesSimpleCheckbox };
54
59
  export { useSnackbar };
55
60
  export { RcSesDatepicker };
@@ -5,7 +5,14 @@ import { RcSesFormControlLabelProps } from '../components/form/inputs/FormContro
5
5
  import { SimpleCheckboxProps } from '../components/form/inputs/SimpleCheckbox';
6
6
  import { RcSesCardFormContainerProps } from '../components/layout/ServiceFormContainer/CardFormContainer';
7
7
  import { ServiceWizardStepperProps } from '../components/layout/ServiceWizardStepper';
8
+ import { RcSesFullPageLoaderProps, RcSesLoaderBackdrop } from '../components/loaders/FullPageLoader';
9
+ import { RcSesLoaderProps, RcSesLoaderSize } from '../components/loaders/Loader';
10
+ import { RcSesLoadingSpinnerProps, RcSesSpinnerColor } from '../components/loaders/LoadingSpinner';
11
+ import { DialogSize, RcSesDialogProps } from '../components/overlays/Dialog';
12
+ import { ModalVariant, RcSesModalProps } from '../components/overlays/Modal';
8
13
  import { ButtonProps } from '../types/buttons/ButtonProps';
9
14
  export type { ListWithIconsProps, ListWithIconsItemData };
10
15
  export type { ButtonProps };
11
- export type { RcSesCardFormContainerProps, RcSesCardProps, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, };
16
+ export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, };
17
+ export type { RcSesDialogProps, DialogSize };
18
+ export type { RcSesModalProps, ModalVariant };