@registrucentras/rc-ses-react-components 2.0.0-rc.1 → 2.0.0-rc.3
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/CardShell/CardFooter/index.d.ts +3 -0
- package/dist/components/common/CardShell/CardFooter/types.d.ts +21 -0
- package/dist/components/common/CardShell/CardHeader/index.d.ts +3 -0
- package/dist/components/common/CardShell/CardHeader/types.d.ts +33 -0
- package/dist/components/common/CardShell/index.d.ts +5 -0
- package/dist/components/common/CardShell/types.d.ts +24 -0
- package/dist/components/form/inputs/Select/index.d.ts +1 -0
- package/dist/library/index.d.ts +4 -1
- package/dist/library/types.d.ts +4 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +2634 -2319
- package/dist/stories/components/display/AdvancedList.stories.d.ts +1 -0
- package/dist/stories/components/display/CardShell.stories.d.ts +17 -0
- package/dist/stories/components/inputs/DatePicker.stories.d.ts +107 -0
- package/dist/theme/cards.d.ts +114 -0
- package/dist/theme/light/MuiPickersOutlinedInput.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +6 -2
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +11 -4
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +12 -4
- package/src/components/common/Card/index.tsx +2 -2
- package/src/components/common/CardShell/CardFooter/index.test.tsx +52 -0
- package/src/components/common/CardShell/CardFooter/index.tsx +38 -0
- package/src/components/common/CardShell/CardFooter/types.ts +24 -0
- package/src/components/common/CardShell/CardHeader/index.test.tsx +207 -0
- package/src/components/common/CardShell/CardHeader/index.tsx +104 -0
- package/src/components/common/CardShell/CardHeader/types.ts +36 -0
- package/src/components/common/CardShell/index.test.tsx +137 -0
- package/src/components/common/CardShell/index.tsx +75 -0
- package/src/components/common/CardShell/types.ts +28 -0
- package/src/components/form/inputs/Datepicker/index.test.tsx +117 -0
- package/src/components/form/inputs/FileDropzone.tsx +1 -0
- package/src/components/form/inputs/FileUpload.tsx +1 -0
- package/src/components/form/inputs/NumberStepper.tsx +1 -0
- package/src/components/form/inputs/PhoneInputFormControl/index.tsx +1 -1
- package/src/components/form/inputs/RadioButtonGroup.test.tsx +71 -0
- package/src/components/form/inputs/RadioButtonGroup.tsx +1 -0
- package/src/components/form/inputs/Select/index.test.tsx +57 -0
- package/src/components/form/inputs/Select/index.tsx +2 -0
- package/src/components/layout/Footer/index.test.tsx +13 -0
- package/src/components/layout/Footer/index.tsx +5 -2
- package/src/library/index.ts +6 -0
- package/src/library/types.ts +26 -0
- package/src/stories/components/display/AdvancedList.stories.tsx +131 -0
- package/src/stories/components/display/CardShell.stories.tsx +261 -0
- package/src/stories/components/inputs/DatePicker.stories.tsx +105 -9
- package/src/theme/cards.ts +60 -0
- package/src/theme/light/MuiPickersLayout.ts +10 -1
- package/src/theme/light/MuiPickersOutlinedInput.ts +88 -0
- package/src/theme/light/index.tsx +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type CardFooterAlign = 'start' | 'between' | 'end';
|
|
3
|
+
export type RcSesCardFooterTestIds = {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
6
|
+
export type RcSesCardFooterProps = {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Horizontal distribution of the row. `between` pushes the first and last
|
|
10
|
+
* child apart, which is the cancel/continue pattern; `end` is the single
|
|
11
|
+
* primary action; `start` is a lone link such as "Žiūrėti visas".
|
|
12
|
+
*/
|
|
13
|
+
align?: CardFooterAlign;
|
|
14
|
+
/**
|
|
15
|
+
* Whether direct children stretch to the full width once the row stacks.
|
|
16
|
+
* Right for buttons, wrong for a text link, which is why it is a prop.
|
|
17
|
+
*/
|
|
18
|
+
stretchOnMobile?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
testIds?: RcSesCardFooterTestIds;
|
|
21
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type CardHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export type RcSesCardHeaderTestIds = {
|
|
4
|
+
root?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
heading?: string;
|
|
7
|
+
badge?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
actions?: string;
|
|
10
|
+
};
|
|
11
|
+
export type RcSesCardHeaderProps = {
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
headingLevel?: CardHeadingLevel;
|
|
14
|
+
/**
|
|
15
|
+
* Decorative leading visual, `Icon-tile` once SAV-6476 lands. Rendered
|
|
16
|
+
* `aria-hidden`, so it never contributes to the heading's accessible name.
|
|
17
|
+
*/
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Count rendered as a Neutral/Small `Badge` inside the heading, so it is
|
|
21
|
+
* announced together with the title. Intended for short section headings.
|
|
22
|
+
*/
|
|
23
|
+
count?: number;
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Up to two CTAs, rendered at the end of the header row. A trailing
|
|
27
|
+
* affordance such as the Category-tile chevron is not a CTA and will need its
|
|
28
|
+
* own slot.
|
|
29
|
+
*/
|
|
30
|
+
actions?: ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
testIds?: RcSesCardHeaderTestIds;
|
|
33
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { RcSesCardShellProps } from './types';
|
|
3
|
+
type ShellProps = RcSesCardShellProps & Omit<BoxProps, keyof RcSesCardShellProps | 'children'>;
|
|
4
|
+
declare function RcSesCardShell({ variant, theme, fullHeight, header, children, footer, className, testIds, sx, ...boxProps }: ShellProps): import("react").JSX.Element;
|
|
5
|
+
export default RcSesCardShell;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type CardShellVariant = 'card' | 'subcard';
|
|
3
|
+
export type CardShellTheme = 'default' | 'brand' | 'sunken';
|
|
4
|
+
export type RcSesCardShellTestIds = {
|
|
5
|
+
root?: string;
|
|
6
|
+
header?: string;
|
|
7
|
+
content?: string;
|
|
8
|
+
footer?: string;
|
|
9
|
+
};
|
|
10
|
+
export type RcSesCardShellProps = {
|
|
11
|
+
variant?: CardShellVariant;
|
|
12
|
+
theme?: CardShellTheme;
|
|
13
|
+
fullHeight?: boolean;
|
|
14
|
+
/** Header row, normally `RcSesCardHeader`. The shell only provides the slot. */
|
|
15
|
+
header?: ReactNode;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Footer row, normally `RcSesCardFooter`. The shell only provides the slot, so
|
|
19
|
+
* direction and alignment belong to the footer block rather than here.
|
|
20
|
+
*/
|
|
21
|
+
footer?: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
testIds?: RcSesCardShellTestIds;
|
|
24
|
+
};
|
|
@@ -20,6 +20,7 @@ type Props = Pick<TControllerProps, ImmediateControllerProps> & Pick<TWrapperPro
|
|
|
20
20
|
selectAll?: boolean;
|
|
21
21
|
onInputChange?: AutocompleteProps<Option, boolean, boolean, false>['onInputChange'];
|
|
22
22
|
slotProps?: {
|
|
23
|
+
controller?: Partial<Omit<TControllerProps, ImmediateControllerProps>>;
|
|
23
24
|
field?: Partial<Omit<AutocompleteProps<Option, boolean, boolean, false>, 'renderInput' | 'options' | 'value'>>;
|
|
24
25
|
wrapper?: Partial<Omit<TWrapperProps, ImmediateWrapperProps>>;
|
|
25
26
|
};
|
package/dist/library/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ import { default as RcSesBreadcrumbs } from '../components/common/Breadcrumbs';
|
|
|
9
9
|
import { default as RcSesButton } from '../components/common/Button';
|
|
10
10
|
import { default as RcSesButtonWithPopover } from '../components/common/Button/ButtonWithPopover';
|
|
11
11
|
import { default as RcSesCard } from '../components/common/Card';
|
|
12
|
+
import { default as RcSesCardShell } from '../components/common/CardShell';
|
|
13
|
+
import { default as RcSesCardFooter } from '../components/common/CardShell/CardFooter';
|
|
14
|
+
import { default as RcSesCardHeader } from '../components/common/CardShell/CardHeader';
|
|
12
15
|
import { default as DataPagination } from '../components/common/DataPagination';
|
|
13
16
|
import { default as RcSesIconWithCircularBackground } from '../components/common/IconWithCircularBackground';
|
|
14
17
|
import { default as RcSesImageCard } from '../components/common/ImageCard';
|
|
@@ -61,7 +64,7 @@ declare module '@mui/x-date-pickers/models' {
|
|
|
61
64
|
export { RcSesPalette, RcSesTheme };
|
|
62
65
|
export { RcSesAccordion, useAccordionController };
|
|
63
66
|
export { RcSesAdvancedList, RcSesAdvancedListItem };
|
|
64
|
-
export { RcSesAlert, RcSesBadge, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, RcSesModal, RcSesSwitch, };
|
|
67
|
+
export { RcSesAlert, RcSesBadge, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesCardShell, RcSesCardHeader, RcSesCardFooter, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, RcSesModal, RcSesSwitch, };
|
|
65
68
|
export { RcSesSegmentedControl };
|
|
66
69
|
export { RcSesCheckbox, RcSesCheckboxFormControl, RcSesSimpleCheckbox };
|
|
67
70
|
export { useSnackbar };
|
package/dist/library/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { RcSesCardProps } from '../components/common/Card';
|
|
2
|
+
import { CardFooterAlign, RcSesCardFooterProps, RcSesCardFooterTestIds } from '../components/common/CardShell/CardFooter/types';
|
|
3
|
+
import { CardHeadingLevel, RcSesCardHeaderProps, RcSesCardHeaderTestIds } from '../components/common/CardShell/CardHeader/types';
|
|
4
|
+
import { CardShellTheme, CardShellVariant, RcSesCardShellProps, RcSesCardShellTestIds } from '../components/common/CardShell/types';
|
|
2
5
|
import { ListWithIconsProps } from '../components/common/ListWithIcons';
|
|
3
6
|
import { ListWithIconsItemData } from '../components/common/ListWithIcons/ListWithIcons.types';
|
|
4
7
|
import { RcSesSegmentOption, RcSesSegmentedControlProps } from '../components/common/SegmentedControl';
|
|
@@ -16,6 +19,6 @@ import { ModalVariant, RcSesModalProps } from '../components/overlays/Modal';
|
|
|
16
19
|
import { ButtonProps } from '../types/buttons/ButtonProps';
|
|
17
20
|
export type { ListWithIconsProps, ListWithIconsItemData };
|
|
18
21
|
export type { ButtonProps };
|
|
19
|
-
export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, RcSesSegmentedControlProps, RcSesSegmentButtonProps, RcSesSegmentOption, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, RcSesTooltipProps, };
|
|
22
|
+
export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, RcSesCardShellProps, RcSesCardShellTestIds, RcSesCardHeaderProps, RcSesCardHeaderTestIds, RcSesCardFooterProps, RcSesCardFooterTestIds, CardFooterAlign, CardShellVariant, CardShellTheme, CardHeadingLevel, RcSesSegmentedControlProps, RcSesSegmentButtonProps, RcSesSegmentOption, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, RcSesTooltipProps, };
|
|
20
23
|
export type { RcSesDialogProps, DialogSize };
|
|
21
24
|
export type { RcSesModalProps, ModalVariant };
|