@registrucentras/rc-ses-react-components 1.6.4 → 1.6.6
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/IconProps.d.ts +2 -0
- package/dist/assets/icons/ArrowsClockwiseIcon.d.ts +3 -0
- package/dist/assets/icons/CheckIcon.d.ts +3 -0
- package/dist/assets/icons/PencilSimpleLineIcon.d.ts +3 -0
- package/dist/components/common/Card/index.d.ts +4 -1
- package/dist/components/form/inputs/SearchInput/index.d.ts +27 -0
- package/dist/components/form/inputs/Select/Select.types.d.ts +5 -0
- package/dist/components/form/inputs/Select/hooks/useFilteredOptions.d.ts +3 -0
- package/dist/components/form/inputs/Select/hooks/useSelectAllLogic.d.ts +7 -0
- package/dist/components/form/inputs/{Select.d.ts → Select/index.d.ts} +12 -12
- package/dist/library/icons.d.ts +3 -1
- package/dist/library/index.d.ts +2 -0
- package/dist/registrucentras-rc-ses-react-components.cjs +11 -11
- package/dist/registrucentras-rc-ses-react-components.js +3346 -2752
- package/dist/stories/components/display/Card.stories.d.ts +6 -47
- package/dist/stories/components/display/ImageCard.stories.d.ts +6 -6
- package/dist/stories/components/feedback/Alert.stories.d.ts +7 -16
- package/dist/stories/components/form/CardFormContainer.stories.d.ts +5 -5
- package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +3 -23
- package/dist/stories/components/form/ServiceFormActions.stories.d.ts +3 -9
- package/dist/stories/components/icons/Icons.stories.d.ts +3 -2
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +3 -29
- package/dist/stories/components/inputs/NumberStepper.stories.d.ts +3 -31
- package/dist/stories/components/inputs/RadioButtonGroup.stories.d.ts +4 -32
- package/dist/stories/components/inputs/SearchInput.stories.d.ts +11 -0
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +3 -332
- package/dist/stories/components/inputs/Select.stories.d.ts +4 -871
- package/dist/stories/components/inputs/TextField.stories.d.ts +3 -610
- package/dist/stories/components/layout/Footer.stories.d.ts +3 -5
- package/dist/stories/components/navigation/Breadcrumbs.stories.d.ts +4 -6
- package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +5 -5
- package/dist/theme/light/MuiOutlinedInput.d.ts +3 -0
- package/package.json +1 -1
- package/src/assets/IconProps.ts +2 -0
- package/src/assets/icons/ArrowsClockwiseIcon.tsx +16 -0
- package/src/assets/icons/CheckIcon.tsx +23 -0
- package/src/assets/icons/PencilSimpleLineIcon.tsx +17 -0
- package/src/components/common/Card/index.test.tsx +8 -0
- package/src/components/common/Card/index.tsx +64 -25
- package/src/components/common/SelectableCardList/index.tsx +2 -1
- package/src/components/form/components/FormControlWrapper/index.tsx +6 -1
- package/src/components/form/inputs/PhoneInputFormControl/index.tsx +11 -3
- package/src/components/form/inputs/SearchInput/index.test.tsx +203 -0
- package/src/components/form/inputs/SearchInput/index.tsx +282 -0
- package/src/components/form/inputs/Select/Select.types.ts +5 -0
- package/src/components/form/inputs/Select/hooks/useFilteredOptions.ts +18 -0
- package/src/components/form/inputs/Select/hooks/useSelectAllLogic.ts +22 -0
- package/src/components/form/inputs/Select/index.tsx +494 -0
- package/src/i18n/namespaces/input/en.json +5 -0
- package/src/i18n/namespaces/input/lt.json +5 -0
- package/src/library/icons.ts +4 -0
- package/src/library/index.ts +2 -0
- package/src/stories/components/display/Card.stories.tsx +64 -47
- package/src/stories/components/display/ImageCard.stories.tsx +29 -27
- package/src/stories/components/feedback/Alert.stories.tsx +59 -50
- package/src/stories/components/form/CardFormContainer.stories.tsx +77 -63
- package/src/stories/components/form/CheckboxFormControl.stories.tsx +29 -71
- package/src/stories/components/form/ServiceFormActions.stories.tsx +18 -21
- package/src/stories/components/form/ServiceFormContainer.stories.tsx +1 -1
- package/src/stories/components/icons/Icons.stories.tsx +6 -2
- package/src/stories/components/inputs/FileDropzone.stories.tsx +17 -34
- package/src/stories/components/inputs/NumberStepper.stories.tsx +32 -60
- package/src/stories/components/inputs/RadioButtonGroup.stories.tsx +22 -20
- package/src/stories/components/inputs/SearchInput.stories.tsx +134 -0
- package/src/stories/components/inputs/SearchableField.stories.tsx +16 -14
- package/src/stories/components/inputs/Select.stories.tsx +245 -13
- package/src/stories/components/inputs/TextField.stories.tsx +47 -47
- package/src/stories/components/layout/Footer.stories.tsx +6 -6
- package/src/stories/components/navigation/Breadcrumbs.stories.tsx +6 -8
- package/src/stories/components/navigation/ServiceWizardStepper.stories.tsx +29 -22
- package/src/theme/light/MuiAutocomplete.ts +52 -3
- package/src/theme/light/MuiOutlinedInput.ts +15 -0
- package/src/theme/light/index.tsx +2 -0
- package/src/components/form/inputs/Select.tsx +0 -152
|
@@ -4,6 +4,7 @@ export type RcSesCardTestIds = {
|
|
|
4
4
|
root?: string;
|
|
5
5
|
image?: string;
|
|
6
6
|
header?: string;
|
|
7
|
+
headerAction?: string;
|
|
7
8
|
title?: string;
|
|
8
9
|
description?: string;
|
|
9
10
|
content?: string;
|
|
@@ -15,6 +16,7 @@ export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
|
15
16
|
title: ReactNode;
|
|
16
17
|
description?: ReactNode;
|
|
17
18
|
image?: ReactNode;
|
|
19
|
+
headerAction?: ReactNode;
|
|
18
20
|
centered?: boolean;
|
|
19
21
|
contentBackground?: boolean;
|
|
20
22
|
children?: ReactNode;
|
|
@@ -26,11 +28,12 @@ export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
|
26
28
|
content?: BoxProps;
|
|
27
29
|
description?: TypographyProps;
|
|
28
30
|
header?: StackProps;
|
|
31
|
+
headerAction?: BoxProps;
|
|
29
32
|
image?: BoxProps;
|
|
30
33
|
leadingActions?: StackProps;
|
|
31
34
|
title?: TypographyProps;
|
|
32
35
|
trailingActions?: StackProps;
|
|
33
36
|
};
|
|
34
37
|
};
|
|
35
|
-
declare function RcSesCard({ title, description, image, centered, contentBackground, children, leadingActions, trailingActions, testIds, slotProps, sx, ...cardProps }: RcSesCardProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare function RcSesCard({ title, description, image, headerAction, centered, contentBackground, children, leadingActions, trailingActions, testIds, slotProps, sx, ...cardProps }: RcSesCardProps): import("react/jsx-runtime").JSX.Element;
|
|
36
39
|
export default RcSesCard;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { OutlinedTextFieldProps } from '@mui/material/TextField';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { UseControllerProps } from 'react-hook-form';
|
|
4
|
+
import { RcSesFormControlWrapperProps } from '../../components/FormControlWrapper';
|
|
5
|
+
import { ButtonProps } from '../../../../types/buttons/ButtonProps';
|
|
6
|
+
type TControllerProps = UseControllerProps<any, any>;
|
|
7
|
+
type ImmediateControllerProps = 'control' | 'rules' | 'disabled' | 'name';
|
|
8
|
+
type TFieldProps = Omit<OutlinedTextFieldProps, 'variant' | 'value' | 'defaultValue'>;
|
|
9
|
+
type TWrapperProps = RcSesFormControlWrapperProps;
|
|
10
|
+
type ImmediateWrapperProps = 'id' | 'label' | 'errors' | 'labelSubtitle';
|
|
11
|
+
type TSearchButtonProps = Partial<ButtonProps>;
|
|
12
|
+
declare const RcSesSearchInput: React.ForwardRefExoticComponent<Pick<TControllerProps, ImmediateControllerProps> & Pick<RcSesFormControlWrapperProps, ImmediateWrapperProps> & {
|
|
13
|
+
onSearch: (value: string) => void;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
onlyNumbers?: boolean;
|
|
16
|
+
placeholder?: TFieldProps["placeholder"];
|
|
17
|
+
sideLabel?: boolean;
|
|
18
|
+
showSearchButton?: boolean;
|
|
19
|
+
searchButtonLabel?: string;
|
|
20
|
+
slotProps?: {
|
|
21
|
+
controller?: Partial<Omit<TControllerProps, ImmediateControllerProps>>;
|
|
22
|
+
field?: Partial<TFieldProps>;
|
|
23
|
+
searchButton?: TSearchButtonProps;
|
|
24
|
+
wrapper?: Partial<Omit<TWrapperProps, ImmediateWrapperProps>>;
|
|
25
|
+
};
|
|
26
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
27
|
+
export default RcSesSearchInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Option } from '../Select.types';
|
|
2
|
+
type OnChange = (values: string[]) => void;
|
|
3
|
+
declare function useSelectAll(options: Option[], selectedValues: string[], onChange: OnChange): {
|
|
4
|
+
allSelected: boolean;
|
|
5
|
+
toggle: () => void;
|
|
6
|
+
};
|
|
7
|
+
export default useSelectAll;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
2
2
|
import { UseControllerProps } from 'react-hook-form';
|
|
3
|
-
import { RcSesFormControlWrapperProps } from '
|
|
4
|
-
|
|
5
|
-
description?: string;
|
|
6
|
-
label: string;
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
3
|
+
import { RcSesFormControlWrapperProps } from '../../components/FormControlWrapper';
|
|
4
|
+
import { Option } from './Select.types';
|
|
9
5
|
type TControllerProps = UseControllerProps<any, any>;
|
|
10
6
|
type ImmediateControllerProps = 'control' | 'rules' | 'name' | 'disabled';
|
|
11
|
-
type TFieldProps = Omit<AutocompleteProps<Option | '', false, boolean, false>, 'value' | 'disableClearable'>;
|
|
12
|
-
type ImmediateFieldProps = 'onInputChange';
|
|
13
7
|
type TWrapperProps = RcSesFormControlWrapperProps;
|
|
14
8
|
type ImmediateWrapperProps = 'id' | 'label' | 'errors';
|
|
15
|
-
type Props = Pick<TControllerProps, ImmediateControllerProps> & Pick<
|
|
9
|
+
type Props = Pick<TControllerProps, ImmediateControllerProps> & Pick<TWrapperProps, ImmediateWrapperProps> & {
|
|
10
|
+
multiple?: boolean;
|
|
16
11
|
clearable?: boolean;
|
|
12
|
+
limitTags?: number;
|
|
17
13
|
loading?: boolean;
|
|
18
|
-
options:
|
|
14
|
+
options: Option[];
|
|
19
15
|
placeholder?: string;
|
|
16
|
+
dropdownLabel?: string;
|
|
17
|
+
dropdownSearch?: boolean;
|
|
18
|
+
dropdownSearchPlaceholder?: string;
|
|
19
|
+
selectAll?: boolean;
|
|
20
|
+
onInputChange?: AutocompleteProps<Option, boolean, boolean, false>['onInputChange'];
|
|
20
21
|
slotProps?: {
|
|
21
|
-
|
|
22
|
-
field?: Partial<Omit<TFieldProps, ImmediateFieldProps>>;
|
|
22
|
+
field?: Partial<Omit<AutocompleteProps<Option, boolean, boolean, false>, 'renderInput' | 'options' | 'value'>>;
|
|
23
23
|
wrapper?: Partial<Omit<TWrapperProps, ImmediateWrapperProps>>;
|
|
24
24
|
};
|
|
25
25
|
};
|
package/dist/library/icons.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as RcSesLogo } from '../assets/Logo';
|
|
2
2
|
import { default as ArrowLeftIcon } from '../assets/icons/ArrowLeftIcon';
|
|
3
3
|
import { default as ArrowRightIcon } from '../assets/icons/ArrowRightIcon';
|
|
4
|
+
import { default as ArrowsClockwiseIcon } from '../assets/icons/ArrowsClockwiseIcon';
|
|
4
5
|
import { default as BarcodeIcon } from '../assets/icons/BarcodeIcon';
|
|
5
6
|
import { default as CalendarBlankIcon } from '../assets/icons/CalendarBlankIcon';
|
|
6
7
|
import { default as CaretDoubleLeftBoldIcon } from '../assets/icons/CaretDoubleLeftBoldIcon';
|
|
@@ -23,6 +24,7 @@ import { default as InfoFillIcon } from '../assets/icons/InfoFillIcon';
|
|
|
23
24
|
import { default as MagnifyingGlassIcon } from '../assets/icons/MagnifyingGlassIcon';
|
|
24
25
|
import { default as MapPinAreaIcon } from '../assets/icons/MapPinAreaIcon';
|
|
25
26
|
import { default as MinusBoldIcon } from '../assets/icons/MinusBoldIcon';
|
|
27
|
+
import { default as PencilSimpleLineIcon } from '../assets/icons/PencilSimpleLineIcon';
|
|
26
28
|
import { default as PlusBoldIcon } from '../assets/icons/PlusBoldIcon';
|
|
27
29
|
import { default as QuestionFillIcon } from '../assets/icons/QuestionFillIcon';
|
|
28
30
|
import { default as QuestionIcon } from '../assets/icons/QuestionIcon';
|
|
@@ -34,4 +36,4 @@ import { default as WarningCircleIcon } from '../assets/icons/WarningCircleIcon'
|
|
|
34
36
|
import { default as WarningDiamondFillIcon } from '../assets/icons/WarningDiamondFillIcon';
|
|
35
37
|
import { default as WarningFillIcon } from '../assets/icons/WarningFillIcon';
|
|
36
38
|
import { default as XCircleFillIcon } from '../assets/icons/XCircleFillIcon';
|
|
37
|
-
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, WarningCircleIcon, XCircleFillIcon, };
|
|
39
|
+
export { RcSesLogo, ArrowLeftIcon, ArrowRightIcon, ArrowsClockwiseIcon, BarcodeIcon, CalendarBlankIcon, CaretDoubleLeftBoldIcon, CaretDoubleRightBoldIcon, CaretDownBoldIcon, CaretDownFill, CaretDownIcon, CaretLeftBoldIcon, CaretLeftIcon, CaretRightBoldIcon, CheckBoldIcon, CheckCircleFillIcon, CheckUncheckedBoldIcon, CircleFilledIcon, CloseIcon, CollapseChevronsIcon, DotCircleFilledIcon, ExpandChevronsIcon, InfoFillIcon, MagnifyingGlassIcon, MapPinAreaIcon, MinusBoldIcon, PencilSimpleLineIcon, PlusBoldIcon, QuestionFillIcon, QuestionIcon, ScalesIcon, ScrollIcon, SpinnerGapBoldIcon, UploadSimpleIcon, WarningDiamondFillIcon, WarningFillIcon, WarningCircleIcon, XCircleFillIcon, };
|
package/dist/library/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { default as RcSesNumberStepper } from '../components/form/inputs/NumberS
|
|
|
24
24
|
import { default as RcSesPhoneInput } from '../components/form/inputs/PhoneInput';
|
|
25
25
|
import { default as RcSesPhoneInputFormControl } from '../components/form/inputs/PhoneInputFormControl';
|
|
26
26
|
import { default as RcSesRadioButtonGroup } from '../components/form/inputs/RadioButtonGroup';
|
|
27
|
+
import { default as RcSesSearchInput } from '../components/form/inputs/SearchInput';
|
|
27
28
|
import { default as RcSesSearchableField } from '../components/form/inputs/SearchableField';
|
|
28
29
|
import { default as RcSesSelect } from '../components/form/inputs/Select';
|
|
29
30
|
import { default as RcSesTextField } from '../components/form/inputs/TextField';
|
|
@@ -52,6 +53,7 @@ export { RcSesFileDropzone };
|
|
|
52
53
|
export { RcSesNumberStepper };
|
|
53
54
|
export { RcSesPhoneInput, RcSesPhoneInputFormControl };
|
|
54
55
|
export { RcSesRadioButtonGroup };
|
|
56
|
+
export { RcSesSearchInput };
|
|
55
57
|
export { RcSesSearchableField };
|
|
56
58
|
export { RcSesSelect };
|
|
57
59
|
export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper };
|