@registrucentras/rc-ses-react-components 1.4.1 → 1.5.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.
- package/dist/components/common/Accordion/hooks/useAccordionController.d.ts +1 -0
- package/dist/components/common/Card/index.d.ts +7 -2
- package/dist/components/common/ImageCard/index.d.ts +13 -0
- package/dist/components/common/ListWithIcons/components/ListWithIconsItem.d.ts +9 -0
- package/dist/components/common/ListWithIcons/index.d.ts +14 -0
- package/dist/components/layout/Footer/index.d.ts +5 -0
- package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +3 -2
- package/dist/components/layout/ServiceWizardStepper/StepperTypes.d.ts +0 -3
- package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +2 -1
- package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +2 -1
- package/dist/components/layout/ServiceWizardStepper/components/StyledStepLabel.d.ts +2 -2
- package/dist/components/layout/ServiceWizardStepper/index.d.ts +3 -2
- package/dist/library/icons.d.ts +1 -3
- package/dist/library/index.d.ts +6 -14
- package/dist/library/types.d.ts +2 -0
- package/dist/registrucentras-rc-ses-react-components.cjs +11 -11
- package/dist/registrucentras-rc-ses-react-components.js +2530 -2251
- package/dist/stories/ServiceWizardStepper.stories.d.ts +5 -5
- package/dist/stories/components/Card.stories.d.ts +26 -1
- package/dist/stories/components/ImageCard.stories.d.ts +8 -0
- package/dist/stories/components/ListWithIcons.stories.d.ts +33 -0
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +32 -0
- package/dist/stories/components/inputs/PhoneInput.stories.d.ts +24 -0
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +2 -2
- package/dist/stories/components/inputs/Select.stories.d.ts +3 -3
- package/dist/stories/components/inputs/TextField.stories.d.ts +5 -5
- package/dist/stories/components/layout/Footer.stories.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/common/Accordion/hooks/useAccordionController.tsx +43 -11
- package/src/components/common/Card/index.test.tsx +36 -0
- package/src/components/common/Card/index.tsx +62 -22
- package/src/components/common/DataPagination/components/PaginationButton.tsx +1 -1
- package/src/components/common/DataPagination/index.tsx +1 -1
- package/src/components/common/ImageCard/index.test.tsx +78 -0
- package/src/components/common/ImageCard/index.tsx +43 -0
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +94 -0
- package/src/components/common/ListWithIcons/index.test.tsx +75 -0
- package/src/components/common/ListWithIcons/index.tsx +47 -0
- package/src/components/form/inputs/CheckboxFormControl.tsx +1 -1
- package/src/components/form/inputs/FileDropzone.tsx +1 -1
- package/src/components/form/inputs/FileUpload.tsx +9 -3
- package/src/components/form/inputs/NumberStepper.tsx +2 -2
- package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +1 -0
- package/src/components/form/inputs/RadioButtonGroup.tsx +1 -1
- package/src/components/layout/Footer/index.test.tsx +20 -0
- package/src/components/layout/Footer/index.tsx +33 -0
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +21 -4
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/utils.ts +0 -1
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.test.tsx +14 -12
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.tsx +4 -1
- package/src/components/layout/ServiceWizardStepper/StepperTypes.ts +0 -3
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.test.tsx +33 -4
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +6 -2
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +34 -7
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +4 -2
- package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +4 -2
- package/src/components/layout/ServiceWizardStepper/index.tsx +13 -21
- package/src/examples/CardMultipleStepForm/index.tsx +18 -31
- package/src/examples/HorizontalMultiStepForm/index.tsx +22 -17
- package/src/examples/ListWithPagination/index.tsx +41 -11
- package/src/library/icons.ts +3 -2
- package/src/library/index.ts +14 -22
- package/src/library/types.ts +6 -0
- package/src/stories/ServiceWizardStepper.stories.tsx +28 -14
- package/src/stories/components/Card.stories.tsx +18 -0
- package/src/stories/components/ImageCard.stories.tsx +54 -0
- package/src/stories/components/ListWithIcons.stories.tsx +74 -0
- package/src/stories/components/form/CardFormContainer.stories.tsx +22 -32
- package/src/stories/components/inputs/FileDropzone.stories.tsx +117 -0
- package/src/stories/components/inputs/PhoneInput.stories.tsx +110 -0
- package/src/stories/components/layout/Footer.stories.tsx +19 -0
- package/src/theme/light/MuiAutocomplete.ts +4 -0
- package/src/theme/light/MuiCard.tsx +16 -2
- package/src/theme/light/MuiInputBase.ts +3 -1
|
@@ -5,6 +5,7 @@ type Props = {
|
|
|
5
5
|
declare function useAccordionController({ initialState }: Props): {
|
|
6
6
|
collapseAll: () => void;
|
|
7
7
|
expandAll: () => void;
|
|
8
|
+
open: (id: string) => void;
|
|
8
9
|
state: AccordionControllerState;
|
|
9
10
|
toggleAccordion: (id: string, isExpanded: boolean) => void;
|
|
10
11
|
};
|
|
@@ -2,6 +2,7 @@ import { BoxProps, CardProps, StackProps, TypographyProps } from '@mui/material'
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export type RcSesCardTestIds = {
|
|
4
4
|
root?: string;
|
|
5
|
+
image?: string;
|
|
5
6
|
header?: string;
|
|
6
7
|
title?: string;
|
|
7
8
|
description?: string;
|
|
@@ -13,7 +14,10 @@ export type RcSesCardTestIds = {
|
|
|
13
14
|
export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
14
15
|
title: ReactNode;
|
|
15
16
|
description?: ReactNode;
|
|
16
|
-
|
|
17
|
+
image?: ReactNode;
|
|
18
|
+
centered?: boolean;
|
|
19
|
+
contentBackground?: boolean;
|
|
20
|
+
children?: ReactNode;
|
|
17
21
|
leadingActions?: ReactNode;
|
|
18
22
|
trailingActions?: ReactNode;
|
|
19
23
|
testIds?: RcSesCardTestIds;
|
|
@@ -22,10 +26,11 @@ export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
|
22
26
|
content?: BoxProps;
|
|
23
27
|
description?: TypographyProps;
|
|
24
28
|
header?: StackProps;
|
|
29
|
+
image?: BoxProps;
|
|
25
30
|
leadingActions?: StackProps;
|
|
26
31
|
title?: TypographyProps;
|
|
27
32
|
trailingActions?: StackProps;
|
|
28
33
|
};
|
|
29
34
|
};
|
|
30
|
-
declare function RcSesCard({ title, description, children, leadingActions, trailingActions, testIds, slotProps, sx, ...cardProps }: RcSesCardProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
declare function RcSesCard({ title, description, image, centered, contentBackground, children, leadingActions, trailingActions, testIds, slotProps, sx, ...cardProps }: RcSesCardProps): import("react/jsx-runtime").JSX.Element;
|
|
31
36
|
export default RcSesCard;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RcSesCardProps, RcSesCardTestIds } from '../Card';
|
|
3
|
+
export type RcSesImageCardTestIds = Pick<RcSesCardTestIds, 'root' | 'image' | 'header' | 'title' | 'description' | 'content'>;
|
|
4
|
+
export type RcSesImageCardProps = {
|
|
5
|
+
image: ReactNode;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
button?: ReactNode;
|
|
9
|
+
testIds?: RcSesImageCardTestIds;
|
|
10
|
+
slotProps?: RcSesCardProps['slotProps'];
|
|
11
|
+
};
|
|
12
|
+
declare function RcSesImageCard({ image, title, description, button, testIds, slotProps, }: RcSesImageCardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default RcSesImageCard;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
icon?: React.ReactNode;
|
|
3
|
+
text?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ListWithIconsItem: ({ icon, text, disabled, tooltip, isLoading }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ListWithIconsItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ListWithIconsItemData {
|
|
2
|
+
id: string;
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
text?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListWithIconsProps {
|
|
9
|
+
items: ListWithIconsItemData[];
|
|
10
|
+
layout?: 'horizontal' | 'vertical';
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const ListWithIcons: ({ items, layout, isLoading }: ListWithIconsProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default ListWithIcons;
|
|
@@ -3,9 +3,10 @@ import { StepItem } from '../../ServiceWizardStepper/StepperTypes';
|
|
|
3
3
|
export type LayoutMode = 'column' | 'row';
|
|
4
4
|
export interface RcSesCardFormContainerProps extends RcSesCardProps {
|
|
5
5
|
steps: StepItem[];
|
|
6
|
-
onStepClick?: (
|
|
6
|
+
onStepClick?: (index: number) => void;
|
|
7
|
+
activeStep: number;
|
|
7
8
|
layout?: LayoutMode;
|
|
8
9
|
isLoading?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare const RcSesCardFormContainer: ({ steps, onStepClick, layout, children, isLoading, ...cardProps }: RcSesCardFormContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const RcSesCardFormContainer: ({ steps, onStepClick, activeStep, layout, children, isLoading, ...cardProps }: RcSesCardFormContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default RcSesCardFormContainer;
|
|
@@ -5,6 +5,7 @@ interface DesktopStepperProps {
|
|
|
5
5
|
handleStepClick: (index: number) => void;
|
|
6
6
|
resolvedOrientation: 'vertical' | 'horizontal';
|
|
7
7
|
isLoading?: boolean;
|
|
8
|
+
getStepState: (index: number) => 'completed' | 'active' | 'pending';
|
|
8
9
|
}
|
|
9
|
-
declare const DesktopStepper: ({ stepEntries, activeStep, handleStepClick, resolvedOrientation, isLoading, }: DesktopStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const DesktopStepper: ({ stepEntries, activeStep, handleStepClick, resolvedOrientation, isLoading, getStepState, }: DesktopStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default DesktopStepper;
|
|
@@ -3,6 +3,7 @@ interface MobileStepperProps {
|
|
|
3
3
|
stepEntries: StepItem[];
|
|
4
4
|
activeStep: number;
|
|
5
5
|
handleStepClick: (index: number) => void;
|
|
6
|
+
getStepState: (index: number) => 'completed' | 'active' | 'pending';
|
|
6
7
|
}
|
|
7
|
-
declare const MobileStepper: ({ stepEntries, activeStep, handleStepClick, }: MobileStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const MobileStepper: ({ stepEntries, activeStep, handleStepClick, getStepState, }: MobileStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default MobileStepper;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StepItem } from '../StepperTypes';
|
|
2
1
|
import { StyledComponent } from '@emotion/styled';
|
|
3
2
|
import { StepLabelProps, Theme } from '@mui/material';
|
|
4
3
|
import { MUIStyledCommonProps } from '@mui/system';
|
|
4
|
+
export type StepState = 'completed' | 'active' | 'pending';
|
|
5
5
|
interface StyledStepLabelProps {
|
|
6
|
-
stepState:
|
|
6
|
+
stepState: StepState;
|
|
7
7
|
orientation?: 'vertical' | 'horizontal';
|
|
8
8
|
isLast?: boolean;
|
|
9
9
|
}
|
|
@@ -2,8 +2,9 @@ import { StepItem } from './StepperTypes';
|
|
|
2
2
|
export interface ServiceWizardStepperProps {
|
|
3
3
|
orientation?: 'vertical' | 'horizontal';
|
|
4
4
|
steps: StepItem[];
|
|
5
|
-
|
|
5
|
+
activeStep: number;
|
|
6
|
+
onStepClick?: (index: number) => void;
|
|
6
7
|
isLoading?: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare function ServiceWizardStepper({ steps, orientation, onStepClick, isLoading, }: ServiceWizardStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function ServiceWizardStepper({ steps, activeStep, orientation, onStepClick, isLoading, }: ServiceWizardStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default ServiceWizardStepper;
|
package/dist/library/icons.d.ts
CHANGED
|
@@ -33,6 +33,4 @@ import { default as UploadSimpleIcon } from '../assets/icons/UploadSimpleIcon';
|
|
|
33
33
|
import { default as WarningDiamondFillIcon } from '../assets/icons/WarningDiamondFillIcon';
|
|
34
34
|
import { default as WarningFillIcon } from '../assets/icons/WarningFillIcon';
|
|
35
35
|
import { default as XCircleFillIcon } from '../assets/icons/XCircleFillIcon';
|
|
36
|
-
export { RcSesLogo };
|
|
37
|
-
export { ArrowRightIcon, ArrowLeftIcon };
|
|
38
|
-
export { BarcodeIcon, CalendarBlankIcon, CaretDoubleLeftBoldIcon, CaretDoubleRightBoldIcon, CaretDownBoldIcon, CaretDownFill, CaretDownIcon, CaretLeftBoldIcon, CaretLeftIcon, CaretRightBoldIcon, CheckBoldIcon, CheckCircleFillIcon, CheckUncheckedBoldIcon, CircleFilledIcon, CloseIcon, CollapseChevronsIcon, DotCircleFilledIcon, ExpandChevronsIcon, InfoFillIcon, MagnifyingGlassIcon, MapPinAreaIcon, MinusBoldIcon, PlusBoldIcon, QuestionFillIcon, QuestionIcon, ScalesIcon, ScrollIcon, SpinnerGapBoldIcon, UploadSimpleIcon, WarningDiamondFillIcon, WarningFillIcon, XCircleFillIcon, };
|
|
36
|
+
export { RcSesLogo, ArrowLeftIcon, ArrowRightIcon, BarcodeIcon, CalendarBlankIcon, CaretDoubleLeftBoldIcon, CaretDoubleRightBoldIcon, CaretDownBoldIcon, CaretDownFill, CaretDownIcon, CaretLeftBoldIcon, CaretLeftIcon, CaretRightBoldIcon, CheckBoldIcon, CheckCircleFillIcon, CheckUncheckedBoldIcon, CircleFilledIcon, CloseIcon, CollapseChevronsIcon, DotCircleFilledIcon, ExpandChevronsIcon, InfoFillIcon, MagnifyingGlassIcon, MapPinAreaIcon, MinusBoldIcon, PlusBoldIcon, QuestionFillIcon, QuestionIcon, ScalesIcon, ScrollIcon, SpinnerGapBoldIcon, UploadSimpleIcon, WarningDiamondFillIcon, WarningFillIcon, XCircleFillIcon, };
|
package/dist/library/index.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { default as RcSesIconProps } from '../assets/IconProps';
|
|
2
|
-
import { default as RcSesLogo } from '../assets/Logo';
|
|
3
|
-
import { default as ArrowLeftIcon } from '../assets/icons/ArrowLeftIcon';
|
|
4
|
-
import { default as ArrowRightIcon } from '../assets/icons/ArrowRightIcon';
|
|
5
|
-
import { default as CaretDoubleLeftBoldIcon } from '../assets/icons/CaretDoubleLeftBoldIcon';
|
|
6
|
-
import { default as CaretDoubleRightBoldIcon } from '../assets/icons/CaretDoubleRightBoldIcon';
|
|
7
|
-
import { default as CaretDownBoldIcon } from '../assets/icons/CaretDownBoldIcon';
|
|
8
|
-
import { default as CaretDownIcon } from '../assets/icons/CaretDownIcon';
|
|
9
|
-
import { default as CaretLeftBoldIcon } from '../assets/icons/CaretLeftBoldIcon';
|
|
10
|
-
import { default as CaretLeftIcon } from '../assets/icons/CaretLeftIcon';
|
|
11
|
-
import { default as CaretRightBoldIcon } from '../assets/icons/CaretRightBoldIcon';
|
|
12
2
|
import { default as RcSesAccordion } from '../components/common/Accordion';
|
|
13
3
|
import { default as useAccordionController } from '../components/common/Accordion/hooks/useAccordionController';
|
|
14
4
|
import { default as RcSesAlert } from '../components/common/Alert';
|
|
@@ -18,6 +8,8 @@ import { default as RcSesButtonWithPopover } from '../components/common/Button/B
|
|
|
18
8
|
import { default as RcSesCard } from '../components/common/Card';
|
|
19
9
|
import { default as DataPagination } from '../components/common/DataPagination';
|
|
20
10
|
import { default as RcSesIconWithCircularBackground } from '../components/common/IconWithCircularBackground';
|
|
11
|
+
import { default as RcSesImageCard } from '../components/common/ImageCard';
|
|
12
|
+
import { default as ListWithIcons } from '../components/common/ListWithIcons';
|
|
21
13
|
import { default as RcSesTab } from '../components/common/Tabs/Tab';
|
|
22
14
|
import { default as RcSesTabPanel } from '../components/common/Tabs/TabPanel';
|
|
23
15
|
import { default as RcSesTabs } from '../components/common/Tabs/Tabs';
|
|
@@ -35,6 +27,7 @@ import { default as RcSesRadioButtonGroup } from '../components/form/inputs/Radi
|
|
|
35
27
|
import { default as RcSesSearchableField } from '../components/form/inputs/SearchableField';
|
|
36
28
|
import { default as RcSesSelect } from '../components/form/inputs/Select';
|
|
37
29
|
import { default as RcSesTextField } from '../components/form/inputs/TextField';
|
|
30
|
+
import { default as RcSesFooter } from '../components/layout/Footer';
|
|
38
31
|
import { default as RcSesServiceFormActions } from '../components/layout/ServiceFormActions';
|
|
39
32
|
import { default as RcSesServiceFormContainer } from '../components/layout/ServiceFormContainer/AccordionFormContainer';
|
|
40
33
|
import { default as RcSesCardFormContainer } from '../components/layout/ServiceFormContainer/CardFormContainer';
|
|
@@ -50,7 +43,7 @@ declare module '@mui/x-date-pickers/models' {
|
|
|
50
43
|
}
|
|
51
44
|
export { RcSesPalette, RcSesTheme };
|
|
52
45
|
export { RcSesAccordion, useAccordionController };
|
|
53
|
-
export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesCard };
|
|
46
|
+
export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesCard, RcSesFooter, RcSesImageCard, };
|
|
54
47
|
export { RcSesCheckbox, RcSesCheckboxFormControl };
|
|
55
48
|
export { RcSesDatepicker };
|
|
56
49
|
export { RcSesFileUpload };
|
|
@@ -63,11 +56,10 @@ export { RcSesSelect };
|
|
|
63
56
|
export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper };
|
|
64
57
|
export { RcSesTextField };
|
|
65
58
|
export { DataPagination };
|
|
59
|
+
export { ListWithIcons };
|
|
66
60
|
export { ServiceWizardStepper };
|
|
67
61
|
export type * from './types';
|
|
68
62
|
export { RcSesServiceFormActions, RcSesServiceFormContainer, RcSesCardFormContainer, RcSesFormControlWrapper, RcSesServiceHeader, RcSesServicePage, };
|
|
69
63
|
export type { RcSesIconProps };
|
|
70
64
|
export { RcSesIconWithCircularBackground };
|
|
71
|
-
export
|
|
72
|
-
export { ArrowRightIcon, ArrowLeftIcon };
|
|
73
|
-
export { CaretDoubleLeftBoldIcon, CaretDoubleRightBoldIcon, CaretDownBoldIcon, CaretDownIcon, CaretLeftBoldIcon, CaretLeftIcon, CaretRightBoldIcon, };
|
|
65
|
+
export * from './icons';
|
package/dist/library/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RcSesCardProps } from '../components/common/Card';
|
|
2
|
+
import { ListWithIconsItemData, ListWithIconsProps } from '../components/common/ListWithIcons';
|
|
2
3
|
import { RcSesCardFormContainerProps } from '../components/layout/ServiceFormContainer/CardFormContainer';
|
|
3
4
|
import { ServiceWizardStepperProps } from '../components/layout/ServiceWizardStepper';
|
|
5
|
+
export type { ListWithIconsProps, ListWithIconsItemData };
|
|
4
6
|
export type { RcSesCardFormContainerProps, RcSesCardProps, ServiceWizardStepperProps };
|