@registrucentras/rc-ses-react-components 1.10.0 → 1.12.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/README.md +5 -1
- package/dist/components/common/Badge/index.d.ts +10 -0
- package/dist/components/common/SelectableCardList/index.d.ts +1 -1
- package/dist/components/common/Switch/index.d.ts +10 -0
- package/dist/components/common/Tooltip/index.d.ts +20 -0
- package/dist/library/index.d.ts +5 -1
- package/dist/library/types.d.ts +2 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +10 -10
- package/dist/registrucentras-rc-ses-react-components.js +3120 -2757
- package/dist/stories/components/display/Badge.stories.d.ts +9 -0
- package/dist/stories/components/display/SelectableCardList.stories.d.ts +8 -1
- package/dist/stories/components/display/Tooltip.stories.d.ts +48 -0
- package/dist/stories/components/inputs/Switch.stories.d.ts +17 -0
- package/dist/theme/light/MuiSwitch.d.ts +3 -0
- package/dist/theme/light/MuiTooltip.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/common/Badge/index.test.tsx +129 -0
- package/src/components/common/Badge/index.tsx +162 -0
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +7 -5
- package/src/components/common/SelectableCardList/index.test.tsx +56 -2
- package/src/components/common/SelectableCardList/index.tsx +23 -10
- package/src/components/common/Switch/index.test.tsx +214 -0
- package/src/components/common/Switch/index.tsx +49 -0
- package/src/components/common/Tooltip/index.test.tsx +87 -0
- package/src/components/common/Tooltip/index.tsx +167 -0
- package/src/components/form/inputs/Select/index.test.tsx +102 -0
- package/src/components/form/inputs/Select/index.tsx +107 -53
- package/src/i18n/namespaces/common/en.json +3 -0
- package/src/i18n/namespaces/common/lt.json +3 -0
- package/src/i18n/namespaces/input/en.json +6 -0
- package/src/i18n/namespaces/input/lt.json +6 -0
- package/src/library/index.ts +6 -0
- package/src/library/types.ts +2 -0
- package/src/stories/components/display/Badge.stories.tsx +165 -0
- package/src/stories/components/display/SelectableCardList.stories.tsx +16 -0
- package/src/stories/components/display/Tooltip.stories.tsx +67 -0
- package/src/stories/components/inputs/Select.stories.tsx +38 -2
- package/src/stories/components/inputs/Switch.stories.tsx +70 -0
- package/src/theme/light/MuiAutocomplete.ts +3 -1
- package/src/theme/light/MuiInputBase.ts +4 -0
- package/src/theme/light/MuiSwitch.tsx +77 -0
- package/src/theme/light/MuiTooltip.ts +40 -0
- package/src/theme/light/index.tsx +4 -0
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
- struktūriniai sąsajos išdėstymo komponentai formų ir paslaugos užsakymo puslapio atvaizdavimui;
|
|
6
6
|
- pavyzdinės (demo) formos komponentas su visais šioje bibliotekos versijoje prieinamais komponentais;
|
|
7
7
|
|
|
8
|
-
Prisidėjimo gairės pateiktos `CONTRIBUTING.md` faile.
|
|
8
|
+
Prisidėjimo gairės pateiktos [`CONTRIBUTING.md`](./CONTRIBUTING.md) faile. Prieš pradedant dirbti su
|
|
9
|
+
biblioteka jas reikia perskaityti: jose aprašyta prieigos ir dizaino derinimo tvarka, šakų bei pull
|
|
10
|
+
request'ų taisyklės ir versijų leidyba.
|
|
9
11
|
|
|
10
12
|
## Prerekvizitai
|
|
11
13
|
|
|
@@ -14,6 +16,8 @@ Prisidėjimo gairės pateiktos `CONTRIBUTING.md` faile.
|
|
|
14
16
|
```bash
|
|
15
17
|
git clone git@github.com:registrucentras/rc-ses-react-components.git
|
|
16
18
|
```
|
|
19
|
+
Paslaugų teikėjų komandos dirba fork modelyje, todėl klonuoja savo repozitorijos kopiją. Sąranka
|
|
20
|
+
aprašyta [`CONTRIBUTING.md`](./CONTRIBUTING.md) skyriuje „Lokalus paruošimas“;
|
|
17
21
|
3. Terminale atidarykite klonuoto projekto šakinį aplanką ir sudiekite projektui reikiamas bibliotekas:
|
|
18
22
|
```bash
|
|
19
23
|
npm i
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type RcSesBadgeProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
variant: 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'brand';
|
|
4
|
+
size: 'small' | 'regular';
|
|
5
|
+
showIcon?: boolean;
|
|
6
|
+
showClose?: boolean;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare function RcSesBadge(props: RcSesBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default RcSesBadge;
|
|
@@ -12,5 +12,5 @@ export interface SelectableCardListProps {
|
|
|
12
12
|
onSelect: (id: string) => void;
|
|
13
13
|
error?: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare const SelectableCardList: (
|
|
15
|
+
declare const SelectableCardList: (props: SelectableCardListProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default SelectableCardList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SwitchProps } from '@mui/material';
|
|
2
|
+
export type RcSesSwitchProps = SwitchProps & ({
|
|
3
|
+
label: string;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
} | {
|
|
6
|
+
label?: undefined;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
});
|
|
9
|
+
declare function RcSesSwitch(props: RcSesSwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default RcSesSwitch;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IconButtonProps, TooltipProps } from '@mui/material';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export type RcSesTooltipProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
placement?: TooltipProps['placement'];
|
|
6
|
+
} & ({
|
|
7
|
+
slotProps?: {
|
|
8
|
+
trigger?: Partial<IconButtonProps>;
|
|
9
|
+
};
|
|
10
|
+
children?: never;
|
|
11
|
+
} | {
|
|
12
|
+
slotProps?: never;
|
|
13
|
+
children: React.ReactElement;
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Controlled MUI Tooltip, ensures only one tooltip is visible and adds tap-to-dismiss to mobile
|
|
17
|
+
* (ClickAwayListener doesn't work with bubble itself)
|
|
18
|
+
*/
|
|
19
|
+
declare function RcSesTooltip({ title, placement, slotProps, children, }: RcSesTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default RcSesTooltip;
|
package/dist/library/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { default as RcSesIconProps } from '../assets/IconProps';
|
|
|
2
2
|
import { default as RcSesAccordion } from '../components/common/Accordion';
|
|
3
3
|
import { default as useAccordionController } from '../components/common/Accordion/hooks/useAccordionController';
|
|
4
4
|
import { default as RcSesAlert } from '../components/common/Alert';
|
|
5
|
+
import { default as RcSesBadge } from '../components/common/Badge';
|
|
5
6
|
import { default as RcSesBreadcrumbs } from '../components/common/Breadcrumbs';
|
|
6
7
|
import { default as RcSesButton } from '../components/common/Button';
|
|
7
8
|
import { default as RcSesButtonWithPopover } from '../components/common/Button/ButtonWithPopover';
|
|
@@ -13,10 +14,12 @@ import { default as ListWithIcons } from '../components/common/ListWithIcons';
|
|
|
13
14
|
import { default as RcSesSegmentedControl } from '../components/common/SegmentedControl';
|
|
14
15
|
import { default as RcSesSnackbar } from '../components/common/Snackbar';
|
|
15
16
|
import { RcSesSnackbarProvider, useSnackbar } from '../components/common/Snackbar/SnackbarProvider';
|
|
17
|
+
import { default as RcSesSwitch } from '../components/common/Switch';
|
|
16
18
|
import { default as RcSesTab } from '../components/common/Tabs/Tab';
|
|
17
19
|
import { default as RcSesTabPanel } from '../components/common/Tabs/TabPanel';
|
|
18
20
|
import { default as RcSesTabs } from '../components/common/Tabs/Tabs';
|
|
19
21
|
import { default as RcSesTabsWrapper } from '../components/common/Tabs/TabsWrapper';
|
|
22
|
+
import { default as RcSesTooltip } from '../components/common/Tooltip';
|
|
20
23
|
import { default as RcSesFormControlWrapper } from '../components/form/components/FormControlWrapper';
|
|
21
24
|
import { default as RcSesCheckbox } from '../components/form/inputs/Checkbox';
|
|
22
25
|
import { default as RcSesCheckboxFormControl } from '../components/form/inputs/CheckboxFormControl';
|
|
@@ -55,7 +58,7 @@ declare module '@mui/x-date-pickers/models' {
|
|
|
55
58
|
}
|
|
56
59
|
export { RcSesPalette, RcSesTheme };
|
|
57
60
|
export { RcSesAccordion, useAccordionController };
|
|
58
|
-
export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, RcSesModal, };
|
|
61
|
+
export { RcSesAlert, RcSesBadge, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesFullPageLoader, RcSesLoader, RcSesLoadingSpinner, RcSesCard, RcSesDialog, RcSesFooter, RcSesImageCard, RcSesSnackbar, RcSesSnackbarProvider, RcSesModal, RcSesSwitch, };
|
|
59
62
|
export { RcSesSegmentedControl };
|
|
60
63
|
export { RcSesCheckbox, RcSesCheckboxFormControl, RcSesSimpleCheckbox };
|
|
61
64
|
export { useSnackbar };
|
|
@@ -69,6 +72,7 @@ export { RcSesSearchInput };
|
|
|
69
72
|
export { RcSesSearchableField };
|
|
70
73
|
export { RcSesSelect };
|
|
71
74
|
export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper };
|
|
75
|
+
export { RcSesTooltip };
|
|
72
76
|
export { RcSesTextField };
|
|
73
77
|
export { DataPagination };
|
|
74
78
|
export { ListWithIcons };
|
package/dist/library/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ListWithIconsProps } from '../components/common/ListWithIcons';
|
|
|
3
3
|
import { ListWithIconsItemData } from '../components/common/ListWithIcons/ListWithIcons.types';
|
|
4
4
|
import { RcSesSegmentOption, RcSesSegmentedControlProps } from '../components/common/SegmentedControl';
|
|
5
5
|
import { RcSesSegmentButtonProps } from '../components/common/SegmentedControl/components/SegmentButton';
|
|
6
|
+
import { RcSesTooltipProps } from '../components/common/Tooltip';
|
|
6
7
|
import { RcSesFormControlLabelProps } from '../components/form/inputs/FormControlLabel';
|
|
7
8
|
import { SimpleCheckboxProps } from '../components/form/inputs/SimpleCheckbox';
|
|
8
9
|
import { RcSesCardFormContainerProps } from '../components/layout/ServiceFormContainer/CardFormContainer';
|
|
@@ -15,6 +16,6 @@ import { ModalVariant, RcSesModalProps } from '../components/overlays/Modal';
|
|
|
15
16
|
import { ButtonProps } from '../types/buttons/ButtonProps';
|
|
16
17
|
export type { ListWithIconsProps, ListWithIconsItemData };
|
|
17
18
|
export type { ButtonProps };
|
|
18
|
-
export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, RcSesSegmentedControlProps, RcSesSegmentButtonProps, RcSesSegmentOption, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, };
|
|
19
|
+
export type { RcSesFullPageLoaderProps, RcSesLoaderBackdrop, RcSesLoaderProps, RcSesLoaderSize, RcSesCardFormContainerProps, RcSesCardProps, RcSesSegmentedControlProps, RcSesSegmentButtonProps, RcSesSegmentOption, ServiceWizardStepperProps, SimpleCheckboxProps, RcSesFormControlLabelProps, RcSesLoadingSpinnerProps, RcSesSpinnerColor, RcSesTooltipProps, };
|
|
19
20
|
export type { RcSesDialogProps, DialogSize };
|
|
20
21
|
export type { RcSesModalProps, ModalVariant };
|