@registrucentras/rc-ses-react-components 2.5.1 → 2.7.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/assets/icons/phosphorIcons.d.ts +4 -0
- package/dist/components/common/FilterChip/index.d.ts +8 -0
- package/dist/components/common/StepCard/StepCardFooter/index.d.ts +4 -1
- package/dist/components/common/StepCard/index.d.ts +1 -1
- package/dist/components/common/StepCard/types.d.ts +31 -0
- package/dist/components/overlays/BottomSheet/index.d.ts +3 -1
- package/dist/components/overlays/Drawer/Drawer.types.d.ts +4 -0
- package/dist/components/overlays/Drawer/index.d.ts +1 -1
- package/dist/library/index.d.ts +2 -1
- package/dist/library/types.d.ts +3 -2
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +1480 -1363
- package/package.json +1 -1
- package/src/assets/icons/phosphorIcons.ts +2 -0
- package/src/components/common/FilterChip/index.test.tsx +71 -0
- package/src/components/common/FilterChip/index.tsx +89 -0
- package/src/components/common/StepCard/StepCardFooter/index.test.tsx +187 -0
- package/src/components/common/StepCard/StepCardFooter/index.tsx +59 -24
- package/src/components/common/StepCard/index.test.tsx +31 -0
- package/src/components/common/StepCard/index.tsx +4 -0
- package/src/components/common/StepCard/types.ts +33 -0
- package/src/components/overlays/BottomSheet/index.test.tsx +31 -0
- package/src/components/overlays/BottomSheet/index.tsx +15 -2
- package/src/components/overlays/Drawer/Drawer.types.ts +4 -0
- package/src/components/overlays/Drawer/index.test.tsx +31 -0
- package/src/components/overlays/Drawer/index.tsx +13 -2
- package/src/i18n/namespaces/input/en.json +6 -0
- package/src/i18n/namespaces/input/lt.json +6 -0
- package/src/library/index.ts +3 -1
- package/src/library/types.ts +6 -0
- package/src/stories/atoms/FilterChip.stories.tsx +104 -0
- package/src/stories/molecules/StepCard.stories.tsx +86 -2
- package/src/stories/organisms/BottomSheet.stories.tsx +18 -0
- package/src/stories/organisms/Drawer.stories.tsx +36 -0
|
@@ -107,6 +107,10 @@ export declare const ExpandChevronsIcon: {
|
|
|
107
107
|
({ fillColor, size, weight, ...rest }: __DTS_DEFAULT_0__): import("react").JSX.Element;
|
|
108
108
|
displayName: string;
|
|
109
109
|
};
|
|
110
|
+
export declare const FunnelIcon: {
|
|
111
|
+
({ fillColor, size, weight, ...rest }: __DTS_DEFAULT_0__): import("react").JSX.Element;
|
|
112
|
+
displayName: string;
|
|
113
|
+
};
|
|
110
114
|
export declare const InfoFillIcon: {
|
|
111
115
|
({ fillColor, size, weight, ...rest }: __DTS_DEFAULT_0__): import("react").JSX.Element;
|
|
112
116
|
displayName: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
export interface RcSesFilterChipProps {
|
|
3
|
+
label: string;
|
|
4
|
+
onRemove: () => void;
|
|
5
|
+
testId?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const RcSesFilterChip: ForwardRefExoticComponent<RcSesFilterChipProps & RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default RcSesFilterChip;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RcSesStepCardActions } from '../types';
|
|
1
2
|
export interface RcSesStepCardFooterProps {
|
|
2
3
|
activeStep: number;
|
|
3
4
|
stepCount: number;
|
|
@@ -5,6 +6,8 @@ export interface RcSesStepCardFooterProps {
|
|
|
5
6
|
onBack?: () => void;
|
|
6
7
|
onCancel?: () => void;
|
|
7
8
|
totalPrice?: string;
|
|
9
|
+
totalPriceLabel?: string;
|
|
10
|
+
actions?: RcSesStepCardActions;
|
|
8
11
|
}
|
|
9
12
|
export declare const stepCardFooterLeadingSx: {
|
|
10
13
|
readonly width: {
|
|
@@ -30,5 +33,5 @@ export declare const stepCardFooterTrailingSx: {
|
|
|
30
33
|
readonly sm: 1;
|
|
31
34
|
};
|
|
32
35
|
};
|
|
33
|
-
declare function RcSesStepCardFooter({ activeStep, stepCount, onNext, onBack, onCancel, totalPrice, }: RcSesStepCardFooterProps): import("react").JSX.Element;
|
|
36
|
+
declare function RcSesStepCardFooter({ activeStep, stepCount, onNext, onBack, onCancel, totalPrice, totalPriceLabel, actions, }: RcSesStepCardFooterProps): import("react").JSX.Element;
|
|
34
37
|
export default RcSesStepCardFooter;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RcSesStepCardProps } from './types';
|
|
2
|
-
declare function RcSesStepCard({ activeStep, stepCount, onNext, onBack, onCancel, totalPrice, title, description, footer, children, testIds, }: RcSesStepCardProps): import("react").JSX.Element;
|
|
2
|
+
declare function RcSesStepCard({ activeStep, stepCount, onNext, onBack, onCancel, totalPrice, totalPriceLabel, actions, title, description, footer, children, testIds, }: RcSesStepCardProps): import("react").JSX.Element;
|
|
3
3
|
export default RcSesStepCard;
|
|
@@ -6,6 +6,30 @@ export interface RcSesStepCardTestIds {
|
|
|
6
6
|
content?: string;
|
|
7
7
|
footer?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface RcSesStepCardAction {
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* `undefined` keeps the default icon (arrows, or the cart on the last step),
|
|
13
|
+
* `null` renders none, a node replaces the icon.
|
|
14
|
+
*/
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Id of a `<form>` rendered elsewhere. The button becomes that form's submit
|
|
18
|
+
* button (`type="submit" form={id}`). The click handler still fires.
|
|
19
|
+
*/
|
|
20
|
+
form?: string;
|
|
21
|
+
/** Shows a spinner in the icon's place and disables the button. */
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface RcSesStepCardActions {
|
|
26
|
+
/** The trailing CTA on every step, including the last. */
|
|
27
|
+
next?: RcSesStepCardAction;
|
|
28
|
+
/** The leading "Atgal" button (middle + last step). */
|
|
29
|
+
back?: RcSesStepCardAction;
|
|
30
|
+
/** The leading "Atšaukti" button (first step). `false` removes it. */
|
|
31
|
+
cancel?: RcSesStepCardAction | false;
|
|
32
|
+
}
|
|
9
33
|
export interface RcSesStepCardProps extends Pick<RcSesTitleBlockBaseProps, 'title' | 'description'> {
|
|
10
34
|
/**
|
|
11
35
|
* Zero-based index of the currently active step. Drives the step-position
|
|
@@ -29,6 +53,13 @@ export interface RcSesStepCardProps extends Pick<RcSesTitleBlockBaseProps, 'titl
|
|
|
29
53
|
* locale + currency stay a consumer concern.
|
|
30
54
|
*/
|
|
31
55
|
totalPrice?: string;
|
|
56
|
+
/** Replaces the default caption of `totalPrice`. */
|
|
57
|
+
totalPriceLabel?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Overrides for the default footer: label, icon, form submit,
|
|
60
|
+
* loading and disabled. Ignored when `footer` is set.
|
|
61
|
+
*/
|
|
62
|
+
actions?: RcSesStepCardActions;
|
|
32
63
|
/**
|
|
33
64
|
* Replaces the whole default footer, including the step-position variants.
|
|
34
65
|
* Use when a step needs an entirely custom action row.
|
|
@@ -7,11 +7,13 @@ export interface RcSesBottomSheetProps extends Omit<MuiDialogProps, 'children' |
|
|
|
7
7
|
onBack?: () => void;
|
|
8
8
|
primaryActionLabel?: string;
|
|
9
9
|
onPrimaryAction?: () => void;
|
|
10
|
+
primaryActionDisabled?: boolean;
|
|
10
11
|
secondaryActionLabel?: string;
|
|
11
12
|
onSecondaryAction?: () => void;
|
|
13
|
+
secondaryActionDisabled?: boolean;
|
|
12
14
|
disableBackdropClose?: boolean;
|
|
13
15
|
size?: 'sm' | 'md';
|
|
14
16
|
onClose?: (event: unknown, reason: 'backdropClick' | 'escapeKeyDown' | 'swipeDown') => void;
|
|
15
17
|
}
|
|
16
|
-
declare function RcSesBottomSheet({ title, children, showBack, onBack, primaryActionLabel, onPrimaryAction, secondaryActionLabel, onSecondaryAction, onClose, disableBackdropClose, size, open, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, scroll, transitionDuration, ...props }: RcSesBottomSheetProps): import("react").JSX.Element;
|
|
18
|
+
declare function RcSesBottomSheet({ title, children, showBack, onBack, primaryActionLabel, onPrimaryAction, primaryActionDisabled, secondaryActionLabel, onSecondaryAction, secondaryActionDisabled, onClose, disableBackdropClose, size, open, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, scroll, transitionDuration, ...props }: RcSesBottomSheetProps): import("react").JSX.Element;
|
|
17
19
|
export default RcSesBottomSheet;
|
|
@@ -19,10 +19,14 @@ export interface RcSesDrawerProps {
|
|
|
19
19
|
secondaryActionLabel?: string;
|
|
20
20
|
/** Callback fired when secondary action button is clicked */
|
|
21
21
|
onSecondaryAction?: () => void;
|
|
22
|
+
/** Whether the secondary action button is disabled */
|
|
23
|
+
secondaryActionDisabled?: boolean;
|
|
22
24
|
/** Label for the primary (right) action button */
|
|
23
25
|
primaryActionLabel?: string;
|
|
24
26
|
/** Callback fired when primary action button is clicked */
|
|
25
27
|
onPrimaryAction?: () => void;
|
|
28
|
+
/** Whether the primary action button is disabled */
|
|
29
|
+
primaryActionDisabled?: boolean;
|
|
26
30
|
/** Test IDs for testing */
|
|
27
31
|
testIds?: RcSesDrawerTestIds;
|
|
28
32
|
/** Optional CSS class name */
|
|
@@ -4,6 +4,6 @@ import { RcSesDrawerProps, RcSesDrawerTestIds } from './Drawer.types';
|
|
|
4
4
|
* Built on MUI Dialog for proper focus management, scroll locking, and DOM handling.
|
|
5
5
|
* Composition: Header (title + close button), scrollable body, and optional footer.
|
|
6
6
|
*/
|
|
7
|
-
declare const RcSesDrawer: ({ isOpen, onClose, title, children, secondaryActionLabel, onSecondaryAction, primaryActionLabel, onPrimaryAction, testIds, className, }: RcSesDrawerProps) => import("react").JSX.Element;
|
|
7
|
+
declare const RcSesDrawer: ({ isOpen, onClose, title, children, secondaryActionLabel, onSecondaryAction, secondaryActionDisabled, primaryActionLabel, onPrimaryAction, primaryActionDisabled, testIds, className, }: RcSesDrawerProps) => import("react").JSX.Element;
|
|
8
8
|
export default RcSesDrawer;
|
|
9
9
|
export type { RcSesDrawerProps, RcSesDrawerTestIds };
|
package/dist/library/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { default as RcSesCard } from '../components/common/Card';
|
|
|
13
13
|
import { default as RcSesCardShell } from '../components/common/CardShell';
|
|
14
14
|
import { default as RcSesCardFooter } from '../components/common/CardShell/CardFooter';
|
|
15
15
|
import { default as DataPagination } from '../components/common/DataPagination';
|
|
16
|
+
import { default as RcSesFilterChip } from '../components/common/FilterChip';
|
|
16
17
|
import { default as RcSesIconWithCircularBackground } from '../components/common/IconWithCircularBackground';
|
|
17
18
|
import { default as RcSesIconWithSquareBackground } from '../components/common/IconWithSquareBackground';
|
|
18
19
|
import { default as RcSesImageCard } from '../components/common/ImageCard';
|
|
@@ -71,7 +72,7 @@ declare module '@mui/x-date-pickers/models' {
|
|
|
71
72
|
export { RcSesPalette, RcSesTheme };
|
|
72
73
|
export { RcSesAccordion, useAccordionController };
|
|
73
74
|
export { RcSesAdvancedList, RcSesAdvancedListItem, RcSesAdvancedListItemShell };
|
|
74
|
-
export { RcSesAlert, RcSesBadge, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesCardShell, RcSesTitleBlock, RcSesCardFooter, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider,
|
|
75
|
+
export { RcSesAlert, RcSesBadge, RcSesFilterChip, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesCardShell, RcSesTitleBlock, RcSesCardFooter, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, RcSesStepCard, RcSesSwitch, RcSesModal, RcSesBottomSheet, RcSesDrawer, };
|
|
75
76
|
export { RcSesSegmentedControl };
|
|
76
77
|
export { RcSesSideNavLayout };
|
|
77
78
|
export { RcSesCheckbox, RcSesCheckboxFormControl, RcSesSimpleCheckbox };
|
package/dist/library/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AdvancedListItemShellProps, AdvancedListItemShellState, AdvancedListIte
|
|
|
2
2
|
import { RcSesCardProps } from '../components/common/Card';
|
|
3
3
|
import { CardFooterAlign, RcSesCardFooterProps, RcSesCardFooterTestIds } from '../components/common/CardShell/CardFooter/types';
|
|
4
4
|
import { CardShellTheme, CardShellVariant, RcSesCardShellProps, RcSesCardShellTestIds } from '../components/common/CardShell/types';
|
|
5
|
+
import { RcSesFilterChipProps } from '../components/common/FilterChip';
|
|
5
6
|
import { ListWithIconsProps } from '../components/common/ListWithIcons';
|
|
6
7
|
import { ListWithIconsItemData, ListWithIconsItemTone, PaletteColor } from '../components/common/ListWithIcons/ListWithIcons.types';
|
|
7
8
|
import { RcSesSegmentOption, RcSesSegmentedControlProps } from '../components/common/SegmentedControl';
|
|
@@ -9,7 +10,7 @@ import { RcSesSegmentButtonProps } from '../components/common/SegmentedControl/c
|
|
|
9
10
|
import { RcSesServiceLinkItem, RcSesServiceLinksProps, RcSesServiceLinksTestIds } from '../components/common/ServiceLinks/types';
|
|
10
11
|
import { RcSesSideNavItem, RcSesSideNavOverflow } from '../components/common/SideNav';
|
|
11
12
|
import { RcSesSideNavLayoutProps } from '../components/common/SideNav/SideNavLayout';
|
|
12
|
-
import { RcSesStepCardProps, RcSesStepCardTestIds } from '../components/common/StepCard/types';
|
|
13
|
+
import { RcSesStepCardAction, RcSesStepCardActions, RcSesStepCardProps, RcSesStepCardTestIds } from '../components/common/StepCard/types';
|
|
13
14
|
import { RcSesTitleBlockProps, RcSesTitleBlockTestIds, TitleBlockHeadingLevel, TitleBlockTitleVariant } from '../components/common/TitleBlock/types';
|
|
14
15
|
import { RcSesTooltipProps } from '../components/common/Tooltip';
|
|
15
16
|
import { RcSesFormControlLabelProps } from '../components/form/inputs/FormControlLabel';
|
|
@@ -28,7 +29,7 @@ export type { ListWithIconsProps, ListWithIconsItemData, ListWithIconsItemTone,
|
|
|
28
29
|
export type { RcSesServiceLinksProps, RcSesServiceLinkItem, RcSesServiceLinksTestIds };
|
|
29
30
|
export type { ButtonProps };
|
|
30
31
|
export type { AdvancedListItemShellProps, AdvancedListItemShellState, AdvancedListItemShellTestIds, };
|
|
31
|
-
export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, RcSesCardShellProps, RcSesCardShellTestIds, RcSesTitleBlockProps, RcSesTitleBlockTestIds, RcSesCardFooterProps, RcSesCardFooterTestIds, CardFooterAlign, CardShellVariant, CardShellTheme, TitleBlockHeadingLevel, TitleBlockTitleVariant, RcSesSegmentedControlProps, RcSesSegmentButtonProps, RcSesSegmentOption, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, RcSesTooltipProps, RcSesSideNavItem, RcSesSideNavLayoutProps, RcSesSideNavOverflow, RcSesStepCardProps, RcSesStepCardTestIds, };
|
|
32
|
+
export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, RcSesFilterChipProps, RcSesCardShellProps, RcSesCardShellTestIds, RcSesTitleBlockProps, RcSesTitleBlockTestIds, RcSesCardFooterProps, RcSesCardFooterTestIds, CardFooterAlign, CardShellVariant, CardShellTheme, TitleBlockHeadingLevel, TitleBlockTitleVariant, RcSesSegmentedControlProps, RcSesSegmentButtonProps, RcSesSegmentOption, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, RcSesTooltipProps, RcSesSideNavItem, RcSesSideNavLayoutProps, RcSesSideNavOverflow, RcSesStepCardAction, RcSesStepCardActions, RcSesStepCardProps, RcSesStepCardTestIds, };
|
|
32
33
|
export type { RcSesDialogProps, DialogSize };
|
|
33
34
|
export type { RcSesModalProps, ModalVariant };
|
|
34
35
|
export type { RcSesBottomSheetProps };
|