@registrucentras/rc-ses-react-components 1.11.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.
Files changed (29) hide show
  1. package/README.md +5 -1
  2. package/dist/components/common/SelectableCardList/index.d.ts +1 -1
  3. package/dist/components/common/Tooltip/index.d.ts +20 -0
  4. package/dist/library/index.d.ts +2 -0
  5. package/dist/library/types.d.ts +2 -1
  6. package/dist/registrucentras-rc-ses-react-components.cjs +10 -10
  7. package/dist/registrucentras-rc-ses-react-components.js +2875 -2739
  8. package/dist/stories/components/display/SelectableCardList.stories.d.ts +8 -1
  9. package/dist/stories/components/display/Tooltip.stories.d.ts +48 -0
  10. package/dist/theme/light/MuiTooltip.d.ts +3 -0
  11. package/package.json +1 -1
  12. package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +7 -5
  13. package/src/components/common/SelectableCardList/index.test.tsx +56 -2
  14. package/src/components/common/SelectableCardList/index.tsx +23 -10
  15. package/src/components/common/Tooltip/index.test.tsx +87 -0
  16. package/src/components/common/Tooltip/index.tsx +167 -0
  17. package/src/components/form/inputs/Select/index.test.tsx +102 -0
  18. package/src/components/form/inputs/Select/index.tsx +107 -53
  19. package/src/i18n/namespaces/common/en.json +3 -0
  20. package/src/i18n/namespaces/common/lt.json +3 -0
  21. package/src/library/index.ts +2 -0
  22. package/src/library/types.ts +2 -0
  23. package/src/stories/components/display/SelectableCardList.stories.tsx +16 -0
  24. package/src/stories/components/display/Tooltip.stories.tsx +67 -0
  25. package/src/stories/components/inputs/Select.stories.tsx +38 -2
  26. package/src/theme/light/MuiAutocomplete.ts +3 -1
  27. package/src/theme/light/MuiInputBase.ts +4 -0
  28. package/src/theme/light/MuiTooltip.ts +40 -0
  29. package/src/theme/light/index.tsx +2 -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
@@ -12,5 +12,5 @@ export interface SelectableCardListProps {
12
12
  onSelect: (id: string) => void;
13
13
  error?: ReactNode;
14
14
  }
15
- declare const SelectableCardList: ({ items, selectedId, onSelect, error, }: SelectableCardListProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const SelectableCardList: (props: SelectableCardListProps) => import("react/jsx-runtime").JSX.Element;
16
16
  export default SelectableCardList;
@@ -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;
@@ -19,6 +19,7 @@ import { default as RcSesTab } from '../components/common/Tabs/Tab';
19
19
  import { default as RcSesTabPanel } from '../components/common/Tabs/TabPanel';
20
20
  import { default as RcSesTabs } from '../components/common/Tabs/Tabs';
21
21
  import { default as RcSesTabsWrapper } from '../components/common/Tabs/TabsWrapper';
22
+ import { default as RcSesTooltip } from '../components/common/Tooltip';
22
23
  import { default as RcSesFormControlWrapper } from '../components/form/components/FormControlWrapper';
23
24
  import { default as RcSesCheckbox } from '../components/form/inputs/Checkbox';
24
25
  import { default as RcSesCheckboxFormControl } from '../components/form/inputs/CheckboxFormControl';
@@ -71,6 +72,7 @@ export { RcSesSearchInput };
71
72
  export { RcSesSearchableField };
72
73
  export { RcSesSelect };
73
74
  export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper };
75
+ export { RcSesTooltip };
74
76
  export { RcSesTextField };
75
77
  export { DataPagination };
76
78
  export { ListWithIcons };
@@ -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 };