@registrucentras/rc-ses-react-components 2.0.0-rc.6 → 2.0.0-rc.8

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 (247) hide show
  1. package/dist/components/common/Accordion/hooks/useAccordionController.d.ts +2 -2
  2. package/dist/components/common/Accordion/types/AccordionControllerState.d.ts +2 -2
  3. package/dist/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +2 -2
  4. package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +2 -2
  5. package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +2 -2
  6. package/dist/components/common/Badge/index.d.ts +2 -2
  7. package/dist/components/common/Breadcrumbs/index.d.ts +4 -4
  8. package/dist/components/common/Card/index.d.ts +2 -2
  9. package/dist/components/common/CardShell/CardFooter/index.d.ts +1 -1
  10. package/dist/components/common/CardShell/CardFooter/types.d.ts +4 -9
  11. package/dist/components/common/CardShell/types.d.ts +4 -4
  12. package/dist/components/common/IconWithCircularBackground.d.ts +2 -2
  13. package/dist/components/common/IconWithSquareBackground/index.d.ts +2 -2
  14. package/dist/components/common/ImageCard/index.d.ts +2 -2
  15. package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +2 -2
  16. package/dist/components/common/SelectableCardList/index.d.ts +2 -2
  17. package/dist/components/common/ServiceLinks/types.d.ts +6 -6
  18. package/dist/components/common/SideNav/SideNav.types.d.ts +7 -5
  19. package/dist/components/common/SideNav/SideNavLayout.d.ts +1 -1
  20. package/dist/components/common/SideNav/components/SideNavPill.d.ts +2 -2
  21. package/dist/components/common/SideNav/components/SideNavPillList.d.ts +2 -2
  22. package/dist/components/common/SideNav/components/SideNavRow.d.ts +4 -3
  23. package/dist/components/common/SideNav/hooks/useKeepActiveItemInView.d.ts +19 -0
  24. package/dist/components/common/SideNav/hooks/useSideNavScrollSpy.d.ts +2 -2
  25. package/dist/components/common/SideNav/index.d.ts +2 -2
  26. package/dist/components/common/Tabs/TabPanel.d.ts +2 -2
  27. package/dist/components/common/Tabs/TabsWrapper.d.ts +2 -2
  28. package/dist/components/common/TitleBlock/types.d.ts +4 -4
  29. package/dist/components/form/components/FormControlWrapper/components/FieldSuffix.d.ts +2 -2
  30. package/dist/components/form/components/FormControlWrapper/index.d.ts +2 -2
  31. package/dist/components/form/inputs/RadioButtonGroup.d.ts +3 -3
  32. package/dist/components/form/inputs/SearchableField.d.ts +2 -2
  33. package/dist/components/form/inputs/Select/Select.types.d.ts +2 -2
  34. package/dist/components/layout/Footer/index.d.ts +2 -2
  35. package/dist/components/layout/ServiceFormActions.d.ts +2 -2
  36. package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.d.ts +2 -2
  37. package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/index.d.ts +2 -2
  38. package/dist/components/layout/ServiceHeader.d.ts +2 -2
  39. package/dist/components/layout/ServicePage.d.ts +2 -2
  40. package/dist/components/utils/normalizeSx.d.ts +1 -1
  41. package/dist/library/types.d.ts +2 -2
  42. package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
  43. package/dist/registrucentras-rc-ses-react-components.js +1767 -1672
  44. package/dist/theme/cards.d.ts +4 -0
  45. package/dist/types/assets/IconProps.d.ts +2 -2
  46. package/dist/types/cards/CardServiceProps.d.ts +2 -2
  47. package/dist/types/common/QuickLinkType.d.ts +2 -2
  48. package/dist/types/inputs/InputIconProps.d.ts +2 -2
  49. package/dist/types/lists/ListNewsItemType.d.ts +2 -2
  50. package/dist/types/lists/ListServicesItemType.d.ts +3 -3
  51. package/package.json +2 -1
  52. package/src/components/common/Accordion/hooks/useAccordionController.tsx +1 -1
  53. package/src/components/common/Accordion/index.tsx +1 -4
  54. package/src/components/common/Accordion/types/AccordionControllerState.ts +1 -1
  55. package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +1 -1
  56. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +1 -1
  57. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +1 -1
  58. package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +2 -2
  59. package/src/components/common/Badge/index.tsx +3 -3
  60. package/src/components/common/Breadcrumbs/index.tsx +5 -2
  61. package/src/components/common/Card/index.tsx +1 -1
  62. package/src/components/common/CardShell/CardFooter/index.tsx +5 -3
  63. package/src/components/common/CardShell/CardFooter/types.ts +2 -7
  64. package/src/components/common/CardShell/index.tsx +31 -7
  65. package/src/components/common/CardShell/types.ts +2 -2
  66. package/src/components/common/IconWithCircularBackground.tsx +7 -8
  67. package/src/components/common/IconWithSquareBackground/index.tsx +7 -8
  68. package/src/components/common/ImageCard/index.tsx +1 -1
  69. package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +18 -19
  70. package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +1 -1
  71. package/src/components/common/SelectableCardList/index.tsx +1 -1
  72. package/src/components/common/ServiceLinks/types.ts +3 -3
  73. package/src/components/common/SideNav/SideNav.types.ts +11 -3
  74. package/src/components/common/SideNav/SideNavLayout.tsx +3 -0
  75. package/src/components/common/SideNav/components/SideNavPill.tsx +1 -1
  76. package/src/components/common/SideNav/components/SideNavPillList.tsx +8 -23
  77. package/src/components/common/SideNav/components/SideNavRow.tsx +6 -2
  78. package/src/components/common/SideNav/hooks/useKeepActiveItemInView.test.ts +258 -0
  79. package/src/components/common/SideNav/hooks/useKeepActiveItemInView.ts +80 -0
  80. package/src/components/common/SideNav/hooks/useSideNavScrollSpy.test.ts +9 -2
  81. package/src/components/common/SideNav/hooks/useSideNavScrollSpy.ts +4 -3
  82. package/src/components/common/SideNav/index.test.tsx +51 -0
  83. package/src/components/common/SideNav/index.tsx +47 -12
  84. package/src/components/common/Snackbar/index.test.tsx +40 -0
  85. package/src/components/common/Snackbar/index.tsx +9 -3
  86. package/src/components/common/Tabs/TabPanel.tsx +1 -1
  87. package/src/components/common/Tabs/TabsWrapper.tsx +1 -1
  88. package/src/components/common/TitleBlock/index.test.tsx +9 -7
  89. package/src/components/common/TitleBlock/index.tsx +34 -11
  90. package/src/components/common/TitleBlock/types.ts +2 -2
  91. package/src/components/form/components/FormControlWrapper/components/FieldSuffix.tsx +1 -1
  92. package/src/components/form/components/FormControlWrapper/index.tsx +1 -1
  93. package/src/components/form/inputs/Datepicker/index.test.tsx +1 -1
  94. package/src/components/form/inputs/FileDropzone.tsx +1 -4
  95. package/src/components/form/inputs/NumberStepper.test.tsx +83 -0
  96. package/src/components/form/inputs/NumberStepper.tsx +7 -8
  97. package/src/components/form/inputs/RadioButtonGroup.test.tsx +1 -1
  98. package/src/components/form/inputs/RadioButtonGroup.tsx +2 -2
  99. package/src/components/form/inputs/SearchInput/index.tsx +1 -1
  100. package/src/components/form/inputs/SearchableField.test.tsx +2 -2
  101. package/src/components/form/inputs/SearchableField.tsx +1 -1
  102. package/src/components/form/inputs/Select/Select.types.ts +1 -1
  103. package/src/components/form/inputs/Select/index.test.tsx +3 -3
  104. package/src/components/layout/Footer/index.tsx +1 -1
  105. package/src/components/layout/ServiceFormActions.tsx +1 -1
  106. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +1 -1
  107. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +1 -1
  108. package/src/components/layout/ServiceHeader.tsx +1 -1
  109. package/src/components/layout/ServicePage.tsx +1 -1
  110. package/src/components/utils/normalizeSx.ts +2 -4
  111. package/src/examples/ListWithPagination/index.tsx +0 -2
  112. package/src/examples/MultipleStepForm/components/AdditionalServicesForm.tsx +1 -1
  113. package/src/examples/MultipleStepForm/components/ServiceIssuanceForm.tsx +1 -1
  114. package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +1 -1
  115. package/src/examples/MultipleStepForm/types/MultiStepFormModel.ts +1 -1
  116. package/src/examples/SingleStepForm/components/ObjectIdentifierSearchModal.tsx +2 -2
  117. package/src/examples/SingleStepForm/types/SingleStepFormModel.ts +1 -1
  118. package/src/library/types.ts +2 -1
  119. package/src/stories/Welcome.mdx +25 -2
  120. package/src/stories/{components/display → atoms}/Badge.stories.tsx +1 -1
  121. package/src/stories/{components/actions → atoms}/Button.stories.tsx +10 -15
  122. package/src/stories/{components/inputs → atoms}/Checkbox.stories.tsx +2 -2
  123. package/src/stories/{components/icons → atoms}/IconWithCircularBackground.stories.tsx +1 -1
  124. package/src/stories/{components/icons → atoms}/IconWithSquareBackground.stories.tsx +1 -1
  125. package/src/stories/{components/icons → atoms}/Icons.stories.tsx +2 -2
  126. package/src/stories/{components/loaders → atoms}/Loader.stories.tsx +1 -1
  127. package/src/stories/{components/loaders → atoms}/LoadingSpinner.stories.tsx +1 -1
  128. package/src/stories/{assets → atoms}/Logo.stories.tsx +1 -1
  129. package/src/stories/{components/inputs → atoms}/NumberStepper.stories.tsx +2 -2
  130. package/src/stories/{components/inputs → atoms}/PhoneInput.stories.tsx +2 -2
  131. package/src/stories/{components/inputs → atoms}/SearchInput.stories.tsx +1 -1
  132. package/src/stories/{components/inputs → atoms}/Select.stories.tsx +8 -10
  133. package/src/stories/{components/form → atoms}/SimpleCheckbox.stories.tsx +1 -1
  134. package/src/stories/{components/inputs → atoms}/Switch.stories.tsx +2 -2
  135. package/src/stories/{components/tabs → atoms}/Tab.stories.tsx +1 -1
  136. package/src/stories/{components/inputs → atoms}/TextField.stories.tsx +1 -1
  137. package/src/stories/{components/display → atoms}/Tooltip.stories.tsx +2 -2
  138. package/src/stories/{theme → foundations}/ThemedMuiComponents.stories.tsx +1 -1
  139. package/src/stories/{components/feedback → molecules}/Alert.stories.tsx +3 -3
  140. package/src/stories/{components/navigation → molecules}/Breadcrumbs.stories.tsx +1 -1
  141. package/src/stories/{components/actions → molecules}/ButtonWithPopover.stories.tsx +1 -1
  142. package/src/stories/{components/display → molecules}/Card.stories.tsx +1 -1
  143. package/src/stories/{components/display → molecules}/CardShell.stories.tsx +20 -1
  144. package/src/stories/{components/form → molecules}/CheckboxFormControl.stories.tsx +14 -22
  145. package/src/stories/{components/inputs → molecules}/DatePicker.stories.tsx +1 -1
  146. package/src/stories/{components/form → molecules}/FormControlWrapper.stories.tsx +1 -1
  147. package/src/stories/{components/display → molecules}/ImageCard.stories.tsx +1 -1
  148. package/src/stories/{components/display → molecules}/ListWithIcons.stories.tsx +1 -1
  149. package/src/stories/{components/inputs → molecules}/PhoneInputFormControl.stories.tsx +1 -1
  150. package/src/stories/{components/overlays → molecules}/Popover.stories.tsx +1 -1
  151. package/src/stories/{components/inputs → molecules}/RadioButtonGroup.stories.tsx +2 -2
  152. package/src/stories/{components/inputs → molecules}/SearchableField.stories.tsx +1 -1
  153. package/src/stories/{components/display → molecules}/SegmentedControl.stories.tsx +2 -2
  154. package/src/stories/{components/feedback → molecules}/Snackbar.stories.tsx +3 -3
  155. package/src/stories/{components/tabs → molecules}/TabPanel.stories.tsx +1 -1
  156. package/src/stories/{components/tabs → molecules}/Tabs.stories.tsx +1 -1
  157. package/src/stories/{components/tabs → molecules}/TabsWrapper.stories.tsx +1 -1
  158. package/src/stories/{components/display → molecules}/TitleBlock.stories.tsx +65 -3
  159. package/src/stories/{components/navigation → organisms}/Accordion.stories.tsx +1 -1
  160. package/src/stories/{components/display → organisms}/AdvancedList.stories.tsx +5 -5
  161. package/src/stories/{components/display → organisms}/AdvancedListItem.stories.tsx +1 -1
  162. package/src/stories/{components/form → organisms}/CardFormContainer.stories.tsx +1 -1
  163. package/src/stories/{components/navigation → organisms}/DataPagination.stories.tsx +1 -1
  164. package/src/stories/{components/overlays → organisms}/Dialog.stories.tsx +1 -1
  165. package/src/stories/{components/inputs → organisms}/FileDropzone.stories.tsx +2 -2
  166. package/src/stories/{components/inputs → organisms}/FileUpload.stories.tsx +2 -2
  167. package/src/stories/{components/layout → organisms}/Footer.stories.tsx +1 -1
  168. package/src/stories/{components/loaders → organisms}/FullPageLoader.stories.tsx +1 -1
  169. package/src/stories/{components/overlays → organisms}/Modal.stories.tsx +1 -1
  170. package/src/stories/{components/display → organisms}/SelectableCardList.stories.tsx +1 -1
  171. package/src/stories/{components/form → organisms}/ServiceFormActions.stories.tsx +1 -1
  172. package/src/stories/{components/form → organisms}/ServiceFormContainer.stories.tsx +1 -1
  173. package/src/stories/{components/layout → organisms}/ServiceHeader.stories.tsx +1 -1
  174. package/src/stories/{components/display → organisms}/ServiceLinks.stories.tsx +1 -1
  175. package/src/stories/{components/navigation → organisms}/ServiceWizardStepper.stories.tsx +3 -3
  176. package/src/stories/{components/navigation → organisms}/SideNav.stories.tsx +37 -4
  177. package/src/stories/{components/layout → templates}/ServicePage.stories.tsx +1 -1
  178. package/src/stubs/Component.tsx +4 -4
  179. package/src/theme/cards.ts +2 -0
  180. package/src/types/assets/IconProps.tsx +1 -1
  181. package/src/types/cards/CardServiceProps.tsx +1 -1
  182. package/src/types/common/QuickLinkType.tsx +1 -1
  183. package/src/types/inputs/InputIconProps.tsx +1 -1
  184. package/src/types/lists/ListNewsItemType.tsx +1 -1
  185. package/src/types/lists/ListServicesItemType.tsx +2 -2
  186. package/src/vite-env.d.ts +2 -2
  187. package/dist/stories/assets/Logo.stories.d.ts +0 -12
  188. package/dist/stories/components/actions/Button.stories.d.ts +0 -107
  189. package/dist/stories/components/actions/ButtonWithPopover.stories.d.ts +0 -7
  190. package/dist/stories/components/display/AdvancedList.stories.d.ts +0 -33
  191. package/dist/stories/components/display/AdvancedListItem.stories.d.ts +0 -33
  192. package/dist/stories/components/display/Badge.stories.d.ts +0 -9
  193. package/dist/stories/components/display/Card.stories.d.ts +0 -8
  194. package/dist/stories/components/display/CardShell.stories.d.ts +0 -17
  195. package/dist/stories/components/display/ImageCard.stories.d.ts +0 -8
  196. package/dist/stories/components/display/ListWithIcons.stories.d.ts +0 -34
  197. package/dist/stories/components/display/SegmentedControl.stories.d.ts +0 -202
  198. package/dist/stories/components/display/SelectableCardList.stories.d.ts +0 -37
  199. package/dist/stories/components/display/ServiceLinks.stories.d.ts +0 -28
  200. package/dist/stories/components/display/TitleBlock.stories.d.ts +0 -21
  201. package/dist/stories/components/display/Tooltip.stories.d.ts +0 -48
  202. package/dist/stories/components/feedback/Alert.stories.d.ts +0 -14
  203. package/dist/stories/components/feedback/Snackbar.stories.d.ts +0 -143
  204. package/dist/stories/components/form/CardFormContainer.stories.d.ts +0 -7
  205. package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +0 -9
  206. package/dist/stories/components/form/FormControlWrapper.stories.d.ts +0 -7
  207. package/dist/stories/components/form/ServiceFormActions.stories.d.ts +0 -6
  208. package/dist/stories/components/form/ServiceFormContainer.stories.d.ts +0 -15
  209. package/dist/stories/components/form/SimpleCheckbox.stories.d.ts +0 -19
  210. package/dist/stories/components/icons/IconWithCircularBackground.stories.d.ts +0 -6
  211. package/dist/stories/components/icons/IconWithSquareBackground.stories.d.ts +0 -7
  212. package/dist/stories/components/icons/Icons.stories.d.ts +0 -7
  213. package/dist/stories/components/inputs/Checkbox.stories.d.ts +0 -21
  214. package/dist/stories/components/inputs/DatePicker.stories.d.ts +0 -152
  215. package/dist/stories/components/inputs/FileDropzone.stories.d.ts +0 -6
  216. package/dist/stories/components/inputs/FileUpload.stories.d.ts +0 -18
  217. package/dist/stories/components/inputs/NumberStepper.stories.d.ts +0 -6
  218. package/dist/stories/components/inputs/PhoneInput.stories.d.ts +0 -10
  219. package/dist/stories/components/inputs/PhoneInputFormControl.stories.d.ts +0 -6
  220. package/dist/stories/components/inputs/RadioButtonGroup.stories.d.ts +0 -6
  221. package/dist/stories/components/inputs/SearchInput.stories.d.ts +0 -11
  222. package/dist/stories/components/inputs/SearchableField.stories.d.ts +0 -6
  223. package/dist/stories/components/inputs/Select.stories.d.ts +0 -7
  224. package/dist/stories/components/inputs/Switch.stories.d.ts +0 -17
  225. package/dist/stories/components/inputs/TextField.stories.d.ts +0 -6
  226. package/dist/stories/components/layout/Footer.stories.d.ts +0 -6
  227. package/dist/stories/components/layout/ServiceHeader.stories.d.ts +0 -7
  228. package/dist/stories/components/layout/ServicePage.stories.d.ts +0 -6
  229. package/dist/stories/components/loaders/FullPageLoader.stories.d.ts +0 -37
  230. package/dist/stories/components/loaders/Loader.stories.d.ts +0 -36
  231. package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +0 -62
  232. package/dist/stories/components/navigation/Accordion.stories.d.ts +0 -18
  233. package/dist/stories/components/navigation/Breadcrumbs.stories.d.ts +0 -6
  234. package/dist/stories/components/navigation/DataPagination.stories.d.ts +0 -47
  235. package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +0 -7
  236. package/dist/stories/components/navigation/SideNav.stories.d.ts +0 -7
  237. package/dist/stories/components/overlays/Dialog.stories.d.ts +0 -15
  238. package/dist/stories/components/overlays/Modal.stories.d.ts +0 -10
  239. package/dist/stories/components/overlays/Popover.stories.d.ts +0 -12
  240. package/dist/stories/components/tabs/Tab.stories.d.ts +0 -8
  241. package/dist/stories/components/tabs/TabPanel.stories.d.ts +0 -7
  242. package/dist/stories/components/tabs/Tabs.stories.d.ts +0 -7
  243. package/dist/stories/components/tabs/TabsWrapper.stories.d.ts +0 -6
  244. package/dist/stories/theme/ThemedMuiComponents.stories.d.ts +0 -25
  245. package/src/stories/components/display/Card.test.tsx +0 -19
  246. /package/src/stories/{components/actions → atoms}/Button.test.ts +0 -0
  247. /package/src/stories/{Colors.mdx → foundations/Colors.mdx} +0 -0
@@ -12,6 +12,7 @@ declare const card: {
12
12
  xs: string;
13
13
  md: string;
14
14
  };
15
+ footerGap: string;
15
16
  padding: {
16
17
  xs: string;
17
18
  md: string;
@@ -23,6 +24,7 @@ declare const subcard: {
23
24
  xs: string;
24
25
  md: string;
25
26
  };
27
+ footerGap: string;
26
28
  padding: {
27
29
  xs: string;
28
30
  md: string;
@@ -69,6 +71,7 @@ declare const _default: {
69
71
  xs: string;
70
72
  md: string;
71
73
  };
74
+ footerGap: string;
72
75
  padding: {
73
76
  xs: string;
74
77
  md: string;
@@ -91,6 +94,7 @@ declare const _default: {
91
94
  xs: string;
92
95
  md: string;
93
96
  };
97
+ footerGap: string;
94
98
  padding: {
95
99
  xs: string;
96
100
  md: string;
@@ -1,11 +1,11 @@
1
1
  import { ColorType } from '../common/ColorType';
2
- type IconProps = {
2
+ interface IconProps {
3
3
  className?: string;
4
4
  width?: number;
5
5
  height?: number;
6
6
  disabled?: boolean;
7
7
  color?: ColorType | string;
8
- };
8
+ }
9
9
  export declare const IconDefaultProps: {
10
10
  className: undefined;
11
11
  disabled: boolean;
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ColorType } from '../common/ColorType';
3
- export type CardServiceProps = {
3
+ export interface CardServiceProps {
4
4
  title: string;
5
5
  Icon: React.FunctionComponent;
6
6
  iconColor?: ColorType;
7
- };
7
+ }
@@ -1,5 +1,5 @@
1
- export type QuickLinkType = {
1
+ export interface QuickLinkType {
2
2
  name: string;
3
3
  title: string;
4
4
  Icon?: React.FC;
5
- };
5
+ }
@@ -1,4 +1,4 @@
1
- type InputIconProps = {
1
+ interface InputIconProps {
2
2
  disabled?: boolean;
3
- };
3
+ }
4
4
  export default InputIconProps;
@@ -1,5 +1,5 @@
1
- export type ListNewsItemType = {
1
+ export interface ListNewsItemType {
2
2
  title: string;
3
3
  date: Date | string;
4
4
  imgUrl: string;
5
- };
5
+ }
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
- export type ListServicesItemType = {
2
+ export interface ListServicesItemType {
3
3
  title: string;
4
4
  Icon?: React.FC | undefined;
5
5
  limit?: number | undefined;
6
- items: Array<string>;
7
- };
6
+ items: string[];
7
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@registrucentras/rc-ses-react-components",
3
3
  "author": "VĮ REGISTRŲ CENTRAS",
4
- "version": "2.0.0-rc.6",
4
+ "version": "2.0.0-rc.8",
5
5
  "description": "RC SES React komponentų biblioteka",
6
6
  "type": "module",
7
7
  "private": false,
@@ -30,6 +30,7 @@
30
30
  "preview": "vite preview",
31
31
  "lint": "eslint .",
32
32
  "lint:fix": "eslint --fix .",
33
+ "typecheck": "tsc -p ./tsconfig.json --noEmit",
33
34
  "storybook": "storybook dev -p 6006",
34
35
  "storybook-test": "test-storybook",
35
36
  "storybook-build": "storybook build",
@@ -2,7 +2,7 @@ import React from 'react'
2
2
 
3
3
  import { AccordionControllerState } from '../types/AccordionControllerState'
4
4
 
5
- type Props = {
5
+ interface Props {
6
6
  initialState: AccordionControllerState
7
7
  }
8
8
 
@@ -19,10 +19,7 @@ function RcSesAccordion(props: Props) {
19
19
  ? state[id]
20
20
  : { canToggle: true, disabled: false, expanded: false, title: '' }
21
21
 
22
- const handleOnChange = (
23
- event: React.SyntheticEvent<Element, Event>,
24
- isExpanded: boolean,
25
- ) => {
22
+ const handleOnChange = (event: React.SyntheticEvent, isExpanded: boolean) => {
26
23
  if (canToggle === false) return
27
24
 
28
25
  toggleAccordion(id, isExpanded)
@@ -1,4 +1,4 @@
1
- export type AccordionState = {
1
+ export interface AccordionState {
2
2
  canToggle?: boolean | undefined
3
3
  disabled?: boolean | undefined
4
4
  expanded: boolean | undefined
@@ -6,7 +6,7 @@ export type AdvancedListItemState = 'rest' | 'selected' | 'disabled' | 'error'
6
6
 
7
7
  export type AdvancedListItemStatusColor = 'grey' | 'warning' | 'success' | 'error'
8
8
 
9
- export type AdvancedListItemAction = {
9
+ export interface AdvancedListItemAction {
10
10
  label: string
11
11
  icon?: ComponentType<{ fillColor?: string; size?: number }>
12
12
  onClick: () => void
@@ -10,7 +10,7 @@ import palette from '@/theme/palette'
10
10
 
11
11
  import { AdvancedListItemLeading as AdvancedListItemLeadingData } from '../AdvancedListItem.types'
12
12
 
13
- type Props = {
13
+ interface Props {
14
14
  leading: AdvancedListItemLeadingData
15
15
  disabled?: boolean
16
16
  inputRef?: RefObject<HTMLInputElement>
@@ -16,7 +16,7 @@ import {
16
16
  AdvancedListItemTrailing as AdvancedListItemTrailingData,
17
17
  } from '../AdvancedListItem.types'
18
18
 
19
- type Props = {
19
+ interface Props {
20
20
  trailing: AdvancedListItemTrailingData
21
21
  disabled?: boolean
22
22
  }
@@ -496,7 +496,7 @@ describe('AdvancedListItem', () => {
496
496
 
497
497
  renderItem(<Wrapper />)
498
498
 
499
- const input = screen.getByLabelText('Company name') as HTMLInputElement
499
+ const input = screen.getByLabelText('Company name')
500
500
  fireEvent.change(input, { target: { value: 'UAB Įmonė' } })
501
501
  expect(input).toHaveValue('UAB Įmonė')
502
502
 
@@ -571,7 +571,7 @@ describe('AdvancedListItem', () => {
571
571
  />,
572
572
  )
573
573
 
574
- const field = screen.getByLabelText('Field') as HTMLInputElement
574
+ const field = screen.getByLabelText('Field')
575
575
  const contentContainer = field.closest('[id]') as HTMLElement
576
576
 
577
577
  // jsdom doesn't implement the `.inert` IDL property (it's always undefined there even
@@ -5,7 +5,7 @@ import CircleFilledIcon from '@/assets/icons/CircleFilledIcon'
5
5
  import CloseIcon from '@/assets/icons/CloseIcon'
6
6
  import { common, error, grey, primary, secondary, warning } from '@/theme/palette'
7
7
 
8
- export type RcSesBadgeProps = {
8
+ export interface RcSesBadgeProps {
9
9
  label: string
10
10
  variant: 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'brand'
11
11
  size: 'small' | 'regular'
@@ -14,7 +14,7 @@ export type RcSesBadgeProps = {
14
14
  onClose?: () => void
15
15
  }
16
16
 
17
- type VariantStyle = {
17
+ interface VariantStyle {
18
18
  border: string
19
19
  background: string
20
20
  iconColor: string
@@ -60,7 +60,7 @@ const variantStyles: Record<RcSesBadgeProps['variant'], VariantStyle> = {
60
60
  },
61
61
  }
62
62
 
63
- type SizeStyle = {
63
+ interface SizeStyle {
64
64
  height: string
65
65
  padding: string
66
66
  fontSize: string
@@ -1,8 +1,11 @@
1
1
  import { Link, Breadcrumbs as MuiBreadcrumbs, SxProps, Theme } from '@mui/material'
2
2
 
3
- export type BreadcrumbItem = { label: string; path: string }
3
+ export interface BreadcrumbItem {
4
+ label: string
5
+ path: string
6
+ }
4
7
 
5
- type Props = {
8
+ interface Props {
6
9
  path: BreadcrumbItem[]
7
10
  sx?: SxProps<Theme>
8
11
  }
@@ -13,7 +13,7 @@ import { ReactNode } from 'react'
13
13
  import normalizeSx from '@/components/utils/normalizeSx'
14
14
  import palette from '@/theme/palette'
15
15
 
16
- export type RcSesCardTestIds = {
16
+ export interface RcSesCardTestIds {
17
17
  root?: string
18
18
  image?: string
19
19
  header?: string
@@ -13,7 +13,6 @@ const justifyContent: Record<CardFooterAlign, string> = {
13
13
  function RcSesCardFooter({
14
14
  children,
15
15
  align = 'between',
16
- stretchOnMobile = true,
17
16
  className,
18
17
  testIds,
19
18
  }: RcSesCardFooterProps) {
@@ -21,13 +20,16 @@ function RcSesCardFooter({
21
20
  <Stack
22
21
  className={className}
23
22
  data-testid={testIds?.root}
24
- direction={{ xs: 'column', sm: 'row' }}
23
+ direction='row'
25
24
  spacing={cards.footer.gap}
25
+ // Flex gap instead of sibling margin, so wrapped lines pick up the
26
+ // vertical gap and the first child of each row has no stray left margin.
27
+ useFlexGap
26
28
  sx={{
27
29
  alignItems: 'center',
28
30
  justifyContent: justifyContent[align],
29
31
  width: '100%',
30
- ...(stretchOnMobile ? { '& > *': { width: { xs: '100%', sm: 'auto' } } } : {}),
32
+ flexWrap: 'wrap',
31
33
  }}
32
34
  >
33
35
  {children}
@@ -2,11 +2,11 @@ import { ReactNode } from 'react'
2
2
 
3
3
  export type CardFooterAlign = 'start' | 'between' | 'end'
4
4
 
5
- export type RcSesCardFooterTestIds = {
5
+ export interface RcSesCardFooterTestIds {
6
6
  root?: string
7
7
  }
8
8
 
9
- export type RcSesCardFooterProps = {
9
+ export interface RcSesCardFooterProps {
10
10
  children?: ReactNode
11
11
  /**
12
12
  * Horizontal distribution of the row. `between` pushes the first and last
@@ -14,11 +14,6 @@ export type RcSesCardFooterProps = {
14
14
  * primary action; `start` is a lone link such as "Žiūrėti visas".
15
15
  */
16
16
  align?: CardFooterAlign
17
- /**
18
- * Whether direct children stretch to the full width once the row stacks.
19
- * Right for buttons, wrong for a text link, which is why it is a prop.
20
- */
21
- stretchOnMobile?: boolean
22
17
  className?: string
23
18
  testIds?: RcSesCardFooterTestIds
24
19
  }
@@ -24,6 +24,12 @@ function RcSesCardShell({
24
24
  sx,
25
25
  ...boxProps
26
26
  }: ShellProps) {
27
+ const hasHeader = hasSlot(header)
28
+ const hasContent = hasSlot(children)
29
+ const hasFooter = hasSlot(footer)
30
+
31
+ const footerMt = hasHeader || hasContent ? cards[variant].footerGap : 0
32
+
27
33
  return (
28
34
  <Box
29
35
  {...boxProps}
@@ -42,31 +48,49 @@ function RcSesCardShell({
42
48
  ? 'none'
43
49
  : `${cards.borderWidth} solid ${cards.themes[theme].borderColor}`,
44
50
  borderRadius: cards[variant].borderRadius,
45
- gap: cards[variant].gap,
46
51
  p: cards[variant].padding,
47
52
  },
48
53
  ...(Array.isArray(sx) ? sx : [sx]),
49
54
  ]}
50
55
  >
51
- {hasSlot(header) ? (
52
- <Box data-testid={testIds?.header} sx={{ minWidth: 0, width: '100%' }}>
56
+ {hasHeader ? (
57
+ <Box
58
+ data-testid={testIds?.header}
59
+ sx={{
60
+ // When fullHeight has no content slot to grow, let the header take
61
+ // the free space so the footer's `mt: 'auto'` has room to expand
62
+ // above the footerGap minimum.
63
+ flexGrow: fullHeight && !hasContent ? 1 : 0,
64
+ minWidth: 0,
65
+ width: '100%',
66
+ }}
67
+ >
53
68
  {header}
54
69
  </Box>
55
70
  ) : null}
56
71
 
57
- {hasSlot(children) ? (
72
+ {hasContent ? (
58
73
  <Box
59
74
  data-testid={testIds?.content}
60
- sx={{ flexGrow: fullHeight ? 1 : 0, minWidth: 0, width: '100%' }}
75
+ sx={{
76
+ flexGrow: fullHeight ? 1 : 0,
77
+ minWidth: 0,
78
+ mt: hasHeader ? cards[variant].gap : 0,
79
+ width: '100%',
80
+ }}
61
81
  >
62
82
  {children}
63
83
  </Box>
64
84
  ) : null}
65
85
 
66
- {hasSlot(footer) ? (
86
+ {hasFooter ? (
67
87
  <Box
68
88
  data-testid={testIds?.footer}
69
- sx={{ minWidth: 0, mt: fullHeight ? 'auto' : 0, width: '100%' }}
89
+ sx={{
90
+ minWidth: 0,
91
+ mt: footerMt,
92
+ width: '100%',
93
+ }}
70
94
  >
71
95
  {footer}
72
96
  </Box>
@@ -4,14 +4,14 @@ export type CardShellVariant = 'card' | 'subcard'
4
4
 
5
5
  export type CardShellTheme = 'default' | 'brand' | 'sunken'
6
6
 
7
- export type RcSesCardShellTestIds = {
7
+ export interface RcSesCardShellTestIds {
8
8
  root?: string
9
9
  header?: string
10
10
  content?: string
11
11
  footer?: string
12
12
  }
13
13
 
14
- export type RcSesCardShellProps = {
14
+ export interface RcSesCardShellProps {
15
15
  variant?: CardShellVariant
16
16
  theme?: CardShellTheme
17
17
  fullHeight?: boolean
@@ -1,4 +1,4 @@
1
- import { Box, styled } from '@mui/material'
1
+ import { Box } from '@mui/material'
2
2
  import React, { memo, useMemo } from 'react'
3
3
 
4
4
  import IconProps from '@/assets/IconProps'
@@ -7,7 +7,7 @@ import palette from '@/theme/palette'
7
7
 
8
8
  type Shade = keyof (typeof palette)[keyof typeof palette]
9
9
 
10
- type Props = {
10
+ interface Props {
11
11
  bgShade?: Shade | 'white'
12
12
  color?: keyof typeof palette
13
13
  Icon: React.JSXElementConstructor<IconProps>
@@ -40,11 +40,6 @@ function IconWithCircularBackground(props: Props) {
40
40
  }
41
41
  }, [size])
42
42
 
43
- const StyledIcon = styled(Icon)({
44
- height: sizes[1],
45
- width: sizes[1],
46
- })
47
-
48
43
  return (
49
44
  <Box
50
45
  className='IconWithCircularBackground-root'
@@ -58,6 +53,10 @@ function IconWithCircularBackground(props: Props) {
58
53
  width: sizes[0],
59
54
  aspectRatio: '1 / 1',
60
55
 
56
+ svg: {
57
+ height: sizes[1],
58
+ width: sizes[1],
59
+ },
61
60
  'svg path': {
62
61
  fill: resolvePaletteColorPath(
63
62
  iconShade === 'white' ? 'white' : `${color}.${iconShade}`,
@@ -65,7 +64,7 @@ function IconWithCircularBackground(props: Props) {
65
64
  },
66
65
  }}
67
66
  >
68
- <StyledIcon />
67
+ <Icon />
69
68
  </Box>
70
69
  )
71
70
  }
@@ -1,4 +1,4 @@
1
- import { Box, styled } from '@mui/material'
1
+ import { Box } from '@mui/material'
2
2
  import React, { memo, useMemo } from 'react'
3
3
 
4
4
  import IconProps from '@/assets/IconProps'
@@ -9,7 +9,7 @@ import palette from '@/theme/palette'
9
9
  type SquareTileSize = 40 | 44
10
10
  type SquareTileVariant = 'solid' | 'soft' | 'muted'
11
11
 
12
- type Props = {
12
+ interface Props {
13
13
  Icon: React.JSXElementConstructor<IconProps>
14
14
  size?: SquareTileSize
15
15
  variant?: SquareTileVariant
@@ -52,11 +52,6 @@ function IconWithSquareBackground(props: Props) {
52
52
  }
53
53
  }, [variant])
54
54
 
55
- const StyledIcon = styled(Icon)({
56
- height: iconSize,
57
- width: iconSize,
58
- })
59
-
60
55
  return (
61
56
  <Box
62
57
  className='IconWithSquareBackground-root'
@@ -70,12 +65,16 @@ function IconWithSquareBackground(props: Props) {
70
65
  width: boxSize,
71
66
  aspectRatio: '1 / 1',
72
67
 
68
+ svg: {
69
+ height: iconSize,
70
+ width: iconSize,
71
+ },
73
72
  'svg path': {
74
73
  fill: resolvePaletteColorPath(iconColorPath),
75
74
  },
76
75
  }}
77
76
  >
78
- <StyledIcon />
77
+ <Icon />
79
78
  </Box>
80
79
  )
81
80
  }
@@ -7,7 +7,7 @@ export type RcSesImageCardTestIds = Pick<
7
7
  'root' | 'image' | 'header' | 'title' | 'description' | 'content'
8
8
  >
9
9
 
10
- export type RcSesImageCardProps = {
10
+ export interface RcSesImageCardProps {
11
11
  image: ReactNode
12
12
  title: ReactNode
13
13
  description?: ReactNode
@@ -55,27 +55,26 @@ const RcSesSegmentButton = React.forwardRef<HTMLButtonElement, RcSesSegmentButto
55
55
  }, [isDisabled, isSelected])
56
56
 
57
57
  const buttonStyles = useMemo(
58
- () =>
59
- ({
60
- flex: '0 1 auto',
61
- minWidth: '0',
62
- height: 'auto',
63
- wordBreak: 'break-word',
64
- fontFamily: '"Public Sans", sans-serif !important',
65
- border: `2px solid ${isFocused && !isDisabled ? primary['500'] : 'transparent'}`,
58
+ () => ({
59
+ flex: '0 1 auto',
60
+ minWidth: '0',
61
+ height: 'auto',
62
+ wordBreak: 'break-word',
63
+ fontFamily: '"Public Sans", sans-serif !important',
64
+ border: `2px solid ${isFocused && !isDisabled ? primary['500'] : 'transparent'}`,
66
65
 
67
- backgroundColor: isSelected
68
- ? `${primary['50']} !important`
69
- : 'transparent !important',
66
+ backgroundColor: isSelected
67
+ ? `${primary['50']} !important`
68
+ : 'transparent !important',
70
69
 
71
- color: textColor,
72
- cursor: isDisabled ? 'not-allowed' : 'pointer',
73
- fontWeight: 500,
74
- borderRadius: '8px',
75
- transition: 'all 150ms ease-in-out',
76
- whiteSpace: 'normal',
77
- ...sizeStyles,
78
- }) as React.CSSProperties,
70
+ color: textColor,
71
+ cursor: isDisabled ? 'not-allowed' : 'pointer',
72
+ fontWeight: 500,
73
+ borderRadius: '8px',
74
+ transition: 'all 150ms ease-in-out',
75
+ whiteSpace: 'normal',
76
+ ...sizeStyles,
77
+ }),
79
78
  [sizeStyles, isDisabled, isSelected, isFocused, textColor],
80
79
  )
81
80
 
@@ -7,7 +7,7 @@ import palette from '@/theme/palette'
7
7
 
8
8
  import { ListWithIconsItemData } from '../../ListWithIcons/ListWithIcons.types'
9
9
 
10
- type Props = {
10
+ interface Props {
11
11
  title: string
12
12
  subtitle?: string
13
13
  listItems: ListWithIconsItemData[]
@@ -5,7 +5,7 @@ import DataPagination from '../DataPagination'
5
5
  import { ListWithIconsItemData } from '../ListWithIcons/ListWithIcons.types'
6
6
  import SelectableCardListItem from './components/SelectableCardListItem'
7
7
 
8
- export type SelectableCardListItemData = {
8
+ export interface SelectableCardListItemData {
9
9
  id: string
10
10
  title: string
11
11
  subtitle?: string
@@ -1,13 +1,13 @@
1
1
  import { ElementType, ReactNode } from 'react'
2
2
 
3
- export type RcSesServiceLinksTestIds = {
3
+ export interface RcSesServiceLinksTestIds {
4
4
  root?: string
5
5
  item?: string
6
6
  itemLabel?: string
7
7
  itemIcon?: string
8
8
  }
9
9
 
10
- export type RcSesServiceLinkItem = {
10
+ export interface RcSesServiceLinkItem {
11
11
  label: ReactNode
12
12
  href?: string
13
13
  target?: string
@@ -20,7 +20,7 @@ export type RcSesServiceLinkItem = {
20
20
  key?: string
21
21
  }
22
22
 
23
- export type RcSesServiceLinksProps = {
23
+ export interface RcSesServiceLinksProps {
24
24
  items: RcSesServiceLinkItem[]
25
25
  dividers?: boolean
26
26
  isLoading?: boolean
@@ -1,24 +1,32 @@
1
1
  import { SxProps, Theme } from '@mui/material'
2
2
  import { ReactNode } from 'react'
3
3
 
4
- export type RcSesSideNavItem = {
4
+ export interface RcSesSideNavItem {
5
5
  id: string
6
6
  label: string
7
7
  count?: number
8
8
  }
9
9
 
10
- export type RcSesSideNavProps = {
10
+ // 'fit' - the nav hugs its items, however tall the list gets.
11
+ // 'scroll' - the desktop list is capped to the viewport and scrolls inside itself,
12
+ // keeping the active item reachable when there are more topics than fit.
13
+ export type RcSesSideNavOverflow = 'fit' | 'scroll'
14
+
15
+ export interface RcSesSideNavProps {
11
16
  // In document order - scroll-spy compares section positions in list order.
12
17
  items: RcSesSideNavItem[]
13
18
  activeItemId?: string
14
19
  onItemClick?: (id: string) => void
15
20
  title?: string
21
+ overflow?: RcSesSideNavOverflow
22
+ // Height of the sticky page header the nav sits below. Decides both where the
23
+ // nav sticks and, with overflow='scroll', how tall it may grow.
24
+ offset?: number
16
25
  sx?: SxProps<Theme>
17
26
  }
18
27
 
19
28
  export type RcSesSideNavLayoutProps = Omit<RcSesSideNavProps, 'sx'> & {
20
29
  children: ReactNode
21
30
  sidebarWidth?: string
22
- offset?: number
23
31
  sx?: SxProps<Theme>
24
32
  }
@@ -13,6 +13,7 @@ function RcSesSideNavLayout({
13
13
  activeItemId: controlledActiveItemId,
14
14
  onItemClick,
15
15
  title,
16
+ overflow,
16
17
  offset,
17
18
  sidebarWidth = '17rem',
18
19
  sx,
@@ -48,6 +49,8 @@ function RcSesSideNavLayout({
48
49
  activeItemId={activeItemId}
49
50
  onItemClick={handleItemClick}
50
51
  title={title}
52
+ overflow={overflow}
53
+ offset={offset}
51
54
  sx={{
52
55
  position: 'sticky',
53
56
  top: `${offset ?? 0}px`,
@@ -2,7 +2,7 @@ import { Box, Typography } from '@mui/material'
2
2
 
3
3
  import palette, { common } from '@/theme/palette'
4
4
 
5
- type Props = {
5
+ interface Props {
6
6
  label: string
7
7
  count?: number
8
8
  ariaLabel?: string