@registrucentras/rc-ses-react-components 2.0.0-rc.7 → 2.0.0-rc.9

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 (203) 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 +9 -6
  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/useElementHeight.d.ts +11 -0
  24. package/dist/components/common/SideNav/hooks/useKeepActiveItemInView.d.ts +19 -0
  25. package/dist/components/common/SideNav/hooks/useSideNavScrollSpy.d.ts +2 -2
  26. package/dist/components/common/SideNav/index.d.ts +2 -2
  27. package/dist/components/common/Tabs/TabPanel.d.ts +2 -2
  28. package/dist/components/common/Tabs/TabsWrapper.d.ts +2 -2
  29. package/dist/components/common/TitleBlock/types.d.ts +4 -4
  30. package/dist/components/form/components/FormControlWrapper/components/FieldSuffix.d.ts +2 -2
  31. package/dist/components/form/components/FormControlWrapper/index.d.ts +2 -2
  32. package/dist/components/form/inputs/RadioButtonGroup.d.ts +3 -3
  33. package/dist/components/form/inputs/SearchableField.d.ts +2 -2
  34. package/dist/components/form/inputs/Select/Select.types.d.ts +2 -2
  35. package/dist/components/layout/Footer/index.d.ts +2 -2
  36. package/dist/components/layout/ServiceFormActions.d.ts +2 -2
  37. package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.d.ts +2 -2
  38. package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/index.d.ts +2 -2
  39. package/dist/components/layout/ServiceHeader.d.ts +2 -2
  40. package/dist/components/layout/ServicePage.d.ts +2 -2
  41. package/dist/components/utils/normalizeSx.d.ts +1 -1
  42. package/dist/library/types.d.ts +2 -2
  43. package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
  44. package/dist/registrucentras-rc-ses-react-components.js +1660 -1589
  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 +6 -13
  63. package/src/components/common/CardShell/CardFooter/types.ts +2 -7
  64. package/src/components/common/CardShell/types.ts +2 -2
  65. package/src/components/common/IconWithCircularBackground.tsx +7 -8
  66. package/src/components/common/IconWithSquareBackground/index.tsx +7 -8
  67. package/src/components/common/ImageCard/index.tsx +1 -1
  68. package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +18 -19
  69. package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +1 -1
  70. package/src/components/common/SelectableCardList/index.tsx +1 -1
  71. package/src/components/common/ServiceLinks/types.ts +3 -3
  72. package/src/components/common/SideNav/SideNav.types.ts +22 -4
  73. package/src/components/common/SideNav/SideNavLayout.test.tsx +52 -0
  74. package/src/components/common/SideNav/SideNavLayout.tsx +23 -3
  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/useElementHeight.test.ts +135 -0
  79. package/src/components/common/SideNav/hooks/useElementHeight.ts +46 -0
  80. package/src/components/common/SideNav/hooks/useKeepActiveItemInView.test.ts +258 -0
  81. package/src/components/common/SideNav/hooks/useKeepActiveItemInView.ts +80 -0
  82. package/src/components/common/SideNav/hooks/useSideNavScrollSpy.test.ts +9 -2
  83. package/src/components/common/SideNav/hooks/useSideNavScrollSpy.ts +4 -3
  84. package/src/components/common/SideNav/index.test.tsx +51 -0
  85. package/src/components/common/SideNav/index.tsx +58 -13
  86. package/src/components/common/Snackbar/index.test.tsx +40 -0
  87. package/src/components/common/Snackbar/index.tsx +9 -3
  88. package/src/components/common/Tabs/TabPanel.tsx +1 -1
  89. package/src/components/common/Tabs/TabsWrapper.tsx +1 -1
  90. package/src/components/common/TitleBlock/index.test.tsx +9 -7
  91. package/src/components/common/TitleBlock/index.tsx +13 -9
  92. package/src/components/common/TitleBlock/types.ts +2 -2
  93. package/src/components/form/components/FormControlWrapper/components/FieldSuffix.tsx +1 -1
  94. package/src/components/form/components/FormControlWrapper/index.tsx +1 -1
  95. package/src/components/form/inputs/Datepicker/index.test.tsx +1 -1
  96. package/src/components/form/inputs/FileDropzone.tsx +1 -4
  97. package/src/components/form/inputs/NumberStepper.test.tsx +83 -0
  98. package/src/components/form/inputs/NumberStepper.tsx +7 -8
  99. package/src/components/form/inputs/RadioButtonGroup.test.tsx +1 -1
  100. package/src/components/form/inputs/RadioButtonGroup.tsx +2 -2
  101. package/src/components/form/inputs/SearchInput/index.tsx +1 -1
  102. package/src/components/form/inputs/SearchableField.test.tsx +2 -2
  103. package/src/components/form/inputs/SearchableField.tsx +1 -1
  104. package/src/components/form/inputs/Select/Select.types.ts +1 -1
  105. package/src/components/form/inputs/Select/index.test.tsx +3 -3
  106. package/src/components/layout/Footer/index.tsx +1 -1
  107. package/src/components/layout/ServiceFormActions.tsx +1 -1
  108. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +1 -1
  109. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +1 -1
  110. package/src/components/layout/ServiceHeader.tsx +1 -1
  111. package/src/components/layout/ServicePage.tsx +1 -1
  112. package/src/components/utils/normalizeSx.ts +2 -4
  113. package/src/examples/ListWithPagination/index.tsx +0 -2
  114. package/src/examples/MultipleStepForm/components/AdditionalServicesForm.tsx +1 -1
  115. package/src/examples/MultipleStepForm/components/ServiceIssuanceForm.tsx +1 -1
  116. package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +1 -1
  117. package/src/examples/MultipleStepForm/types/MultiStepFormModel.ts +1 -1
  118. package/src/examples/SingleStepForm/components/ObjectIdentifierSearchModal.tsx +2 -2
  119. package/src/examples/SingleStepForm/types/SingleStepFormModel.ts +1 -1
  120. package/src/library/types.ts +2 -1
  121. package/src/stories/atoms/Button.stories.tsx +9 -14
  122. package/src/stories/atoms/Checkbox.stories.tsx +1 -1
  123. package/src/stories/atoms/Icons.stories.tsx +1 -1
  124. package/src/stories/atoms/NumberStepper.stories.tsx +1 -1
  125. package/src/stories/atoms/PhoneInput.stories.tsx +1 -1
  126. package/src/stories/atoms/Select.stories.tsx +7 -9
  127. package/src/stories/atoms/Switch.stories.tsx +1 -1
  128. package/src/stories/molecules/Alert.stories.tsx +2 -2
  129. package/src/stories/molecules/CardShell.stories.tsx +4 -4
  130. package/src/stories/molecules/CheckboxFormControl.stories.tsx +13 -21
  131. package/src/stories/molecules/RadioButtonGroup.stories.tsx +1 -1
  132. package/src/stories/molecules/Snackbar.stories.tsx +2 -2
  133. package/src/stories/molecules/TitleBlock.stories.tsx +40 -1
  134. package/src/stories/organisms/AdvancedList.stories.tsx +4 -4
  135. package/src/stories/organisms/FileDropzone.stories.tsx +1 -1
  136. package/src/stories/organisms/FileUpload.stories.tsx +1 -1
  137. package/src/stories/organisms/SideNav.stories.tsx +41 -3
  138. package/src/stubs/Component.tsx +4 -4
  139. package/src/types/assets/IconProps.tsx +1 -1
  140. package/src/types/cards/CardServiceProps.tsx +1 -1
  141. package/src/types/common/QuickLinkType.tsx +1 -1
  142. package/src/types/inputs/InputIconProps.tsx +1 -1
  143. package/src/types/lists/ListNewsItemType.tsx +1 -1
  144. package/src/types/lists/ListServicesItemType.tsx +2 -2
  145. package/src/vite-env.d.ts +2 -2
  146. package/dist/stories/atoms/Badge.stories.d.ts +0 -9
  147. package/dist/stories/atoms/Button.stories.d.ts +0 -107
  148. package/dist/stories/atoms/Checkbox.stories.d.ts +0 -21
  149. package/dist/stories/atoms/IconWithCircularBackground.stories.d.ts +0 -6
  150. package/dist/stories/atoms/IconWithSquareBackground.stories.d.ts +0 -7
  151. package/dist/stories/atoms/Icons.stories.d.ts +0 -7
  152. package/dist/stories/atoms/Loader.stories.d.ts +0 -36
  153. package/dist/stories/atoms/LoadingSpinner.stories.d.ts +0 -62
  154. package/dist/stories/atoms/Logo.stories.d.ts +0 -12
  155. package/dist/stories/atoms/NumberStepper.stories.d.ts +0 -6
  156. package/dist/stories/atoms/PhoneInput.stories.d.ts +0 -10
  157. package/dist/stories/atoms/SearchInput.stories.d.ts +0 -11
  158. package/dist/stories/atoms/Select.stories.d.ts +0 -7
  159. package/dist/stories/atoms/SimpleCheckbox.stories.d.ts +0 -19
  160. package/dist/stories/atoms/Switch.stories.d.ts +0 -17
  161. package/dist/stories/atoms/Tab.stories.d.ts +0 -8
  162. package/dist/stories/atoms/TextField.stories.d.ts +0 -6
  163. package/dist/stories/atoms/Tooltip.stories.d.ts +0 -48
  164. package/dist/stories/foundations/ThemedMuiComponents.stories.d.ts +0 -25
  165. package/dist/stories/molecules/Alert.stories.d.ts +0 -14
  166. package/dist/stories/molecules/Breadcrumbs.stories.d.ts +0 -6
  167. package/dist/stories/molecules/ButtonWithPopover.stories.d.ts +0 -7
  168. package/dist/stories/molecules/Card.stories.d.ts +0 -8
  169. package/dist/stories/molecules/CardShell.stories.d.ts +0 -18
  170. package/dist/stories/molecules/CheckboxFormControl.stories.d.ts +0 -9
  171. package/dist/stories/molecules/DatePicker.stories.d.ts +0 -152
  172. package/dist/stories/molecules/FormControlWrapper.stories.d.ts +0 -7
  173. package/dist/stories/molecules/ImageCard.stories.d.ts +0 -8
  174. package/dist/stories/molecules/ListWithIcons.stories.d.ts +0 -34
  175. package/dist/stories/molecules/PhoneInputFormControl.stories.d.ts +0 -6
  176. package/dist/stories/molecules/Popover.stories.d.ts +0 -12
  177. package/dist/stories/molecules/RadioButtonGroup.stories.d.ts +0 -6
  178. package/dist/stories/molecules/SearchableField.stories.d.ts +0 -6
  179. package/dist/stories/molecules/SegmentedControl.stories.d.ts +0 -202
  180. package/dist/stories/molecules/Snackbar.stories.d.ts +0 -143
  181. package/dist/stories/molecules/TabPanel.stories.d.ts +0 -7
  182. package/dist/stories/molecules/Tabs.stories.d.ts +0 -7
  183. package/dist/stories/molecules/TabsWrapper.stories.d.ts +0 -6
  184. package/dist/stories/molecules/TitleBlock.stories.d.ts +0 -22
  185. package/dist/stories/organisms/Accordion.stories.d.ts +0 -18
  186. package/dist/stories/organisms/AdvancedList.stories.d.ts +0 -33
  187. package/dist/stories/organisms/AdvancedListItem.stories.d.ts +0 -33
  188. package/dist/stories/organisms/CardFormContainer.stories.d.ts +0 -7
  189. package/dist/stories/organisms/DataPagination.stories.d.ts +0 -47
  190. package/dist/stories/organisms/Dialog.stories.d.ts +0 -15
  191. package/dist/stories/organisms/FileDropzone.stories.d.ts +0 -6
  192. package/dist/stories/organisms/FileUpload.stories.d.ts +0 -18
  193. package/dist/stories/organisms/Footer.stories.d.ts +0 -6
  194. package/dist/stories/organisms/FullPageLoader.stories.d.ts +0 -37
  195. package/dist/stories/organisms/Modal.stories.d.ts +0 -10
  196. package/dist/stories/organisms/SelectableCardList.stories.d.ts +0 -37
  197. package/dist/stories/organisms/ServiceFormActions.stories.d.ts +0 -6
  198. package/dist/stories/organisms/ServiceFormContainer.stories.d.ts +0 -15
  199. package/dist/stories/organisms/ServiceHeader.stories.d.ts +0 -7
  200. package/dist/stories/organisms/ServiceLinks.stories.d.ts +0 -28
  201. package/dist/stories/organisms/ServiceWizardStepper.stories.d.ts +0 -7
  202. package/dist/stories/organisms/SideNav.stories.d.ts +0 -7
  203. package/dist/stories/templates/ServicePage.stories.d.ts +0 -6
@@ -7,7 +7,7 @@ import theme from '@/theme/light'
7
7
 
8
8
  import RcSesSelect from '.'
9
9
 
10
- type TestWrapperProps = {
10
+ interface TestWrapperProps {
11
11
  defaultValue?: string | null
12
12
  }
13
13
 
@@ -22,13 +22,13 @@ const options = [
22
22
  },
23
23
  ]
24
24
 
25
- type UnregisterTestWrapperProps = {
25
+ interface UnregisterTestWrapperProps {
26
26
  shouldUnregister?: boolean
27
27
  }
28
28
 
29
29
  const UnregisterTestWrapper = ({ shouldUnregister }: UnregisterTestWrapperProps) => {
30
30
  const { control, getValues } = useForm({
31
- defaultValues: { selection: 'short-option' as string | null },
31
+ defaultValues: { selection: 'short-option' },
32
32
  })
33
33
  const [mounted, setMounted] = useState(true)
34
34
  const [formValues, setFormValues] = useState('')
@@ -2,7 +2,7 @@ import { Box, Container, Typography } from '@mui/material'
2
2
 
3
3
  import palette from '@/theme/palette'
4
4
 
5
- type Props = {
5
+ interface Props {
6
6
  text: string
7
7
  }
8
8
 
@@ -6,7 +6,7 @@ import CaretLeftIcon from '@/assets/icons/CaretLeftIcon'
6
6
  import Button from '@/components/common/Button'
7
7
  import palette from '@/theme/palette'
8
8
 
9
- type Props = {
9
+ interface Props {
10
10
  onDiscard: () => void
11
11
  onSaveDraft: () => void
12
12
  onSubmit: () => void
@@ -5,7 +5,7 @@ import ExpandChevronsIcon from '@/assets/icons/ExpandChevronsIcon'
5
5
  import useAccordionController from '@/components/common/Accordion/hooks/useAccordionController'
6
6
  import Button from '@/components/common/Button'
7
7
 
8
- type Props = {
8
+ interface Props {
9
9
  controller: ReturnType<typeof useAccordionController>
10
10
  }
11
11
  function AccordionCollapseControls({ controller }: Props) {
@@ -9,7 +9,7 @@ import ServiceWizardStepper from '../../ServiceWizardStepper'
9
9
  import AccordionCollapseControls from './components/AccordionCollapseControls'
10
10
  import mapAccordionStateToSteps from './utils'
11
11
 
12
- type Props = {
12
+ interface Props {
13
13
  accordionController: ReturnType<typeof useAccordionController>
14
14
  children: React.ReactNode
15
15
  showAccordionCollapseControls?: boolean
@@ -5,7 +5,7 @@ import RcSesBreadcrumbs from '@/components/common/Breadcrumbs'
5
5
  import theme from '@/theme/light'
6
6
  import { common } from '@/theme/palette'
7
7
 
8
- type Props = {
8
+ interface Props {
9
9
  breadcrumbsProps: React.ComponentProps<typeof RcSesBreadcrumbs>
10
10
  children?: React.ReactNode
11
11
  title: string
@@ -1,6 +1,6 @@
1
1
  import { Box } from '@mui/material'
2
2
 
3
- type Props = {
3
+ interface Props {
4
4
  children: React.ReactNode
5
5
  }
6
6
  function ServicePage({ children }: Props) {
@@ -1,11 +1,9 @@
1
1
  import { SxProps, Theme } from '@mui/material'
2
2
 
3
3
  type SxEntry =
4
- Extract<SxProps<Theme>, ReadonlyArray<unknown>> extends ReadonlyArray<infer T>
5
- ? T
6
- : never
4
+ Extract<SxProps<Theme>, readonly unknown[]> extends readonly (infer T)[] ? T : never
7
5
 
8
- function isSxArray(sx: SxProps<Theme>): sx is ReadonlyArray<SxEntry> {
6
+ function isSxArray(sx: SxProps<Theme>): sx is readonly SxEntry[] {
9
7
  return Array.isArray(sx)
10
8
  }
11
9
 
@@ -58,8 +58,6 @@ function ListWithPagination() {
58
58
  const [selectedItemId, setSelectedItemId] = useState<string | null>(null)
59
59
 
60
60
  useEffect(() => {
61
- setIsLoading(true)
62
-
63
61
  const timer = setTimeout(() => {
64
62
  setData(mapToSelectableItems(mockApiData))
65
63
  setIsLoading(false)
@@ -2,7 +2,7 @@ import { useForm } from 'react-hook-form'
2
2
 
3
3
  import RcSesTextField from '@/components/form/inputs/TextField'
4
4
 
5
- type FormModel = {
5
+ interface FormModel {
6
6
  additionalServices: string
7
7
  }
8
8
 
@@ -4,7 +4,7 @@ import RcSesAlert from '@/components/common/Alert'
4
4
  import RcSesRadioButtonGroup from '@/components/form/inputs/RadioButtonGroup'
5
5
  import RcSesSelect from '@/components/form/inputs/Select'
6
6
 
7
- type FormModel = {
7
+ interface FormModel {
8
8
  issuanceMethod: string
9
9
  rcBranch: string
10
10
  }
@@ -2,7 +2,7 @@ import { useForm } from 'react-hook-form'
2
2
 
3
3
  import RcSesCheckbox from '@/components/form/inputs/Checkbox'
4
4
 
5
- type FormModel = {
5
+ interface FormModel {
6
6
  agreement: boolean
7
7
  }
8
8
 
@@ -1,4 +1,4 @@
1
- type MultiStepFormModel = {
1
+ interface MultiStepFormModel {
2
2
  purpose: string
3
3
  legalBasis: string
4
4
  agreement: boolean
@@ -19,7 +19,7 @@ import { useForm } from 'react-hook-form'
19
19
 
20
20
  import RcSesTextField from '@/components/form/inputs/TextField'
21
21
 
22
- type FormModel = {
22
+ interface FormModel {
23
23
  city: string
24
24
  street: string
25
25
  addressNo: string
@@ -27,7 +27,7 @@ type FormModel = {
27
27
  aptNo: string
28
28
  }
29
29
 
30
- type Props = {
30
+ interface Props {
31
31
  open: boolean
32
32
  onSubmit: (value: string) => void
33
33
  onClose: () => void
@@ -1,4 +1,4 @@
1
- type SingleStepFormModel = {
1
+ interface SingleStepFormModel {
2
2
  text: string
3
3
  multilineText: string
4
4
  selection: string
@@ -22,7 +22,7 @@ import {
22
22
  RcSesServiceLinksProps,
23
23
  RcSesServiceLinksTestIds,
24
24
  } from '@/components/common/ServiceLinks/types'
25
- import { RcSesSideNavItem } from '@/components/common/SideNav'
25
+ import { RcSesSideNavItem, RcSesSideNavOverflow } from '@/components/common/SideNav'
26
26
  import { RcSesSideNavLayoutProps } from '@/components/common/SideNav/SideNavLayout'
27
27
  import {
28
28
  RcSesTitleBlockProps,
@@ -81,6 +81,7 @@ export type {
81
81
  RcSesTooltipProps,
82
82
  RcSesSideNavItem,
83
83
  RcSesSideNavLayoutProps,
84
+ RcSesSideNavOverflow,
84
85
  }
85
86
  export type { RcSesDialogProps, DialogSize }
86
87
  export type { RcSesModalProps, ModalVariant }
@@ -6,12 +6,7 @@ import Button from '@/components/common/Button'
6
6
  import { grey } from '@/theme/palette'
7
7
  import { ButtonProps } from '@/types/buttons/ButtonProps'
8
8
 
9
- const variantOptions: Array<ButtonProps['variant']> = [
10
- 'contained',
11
- 'outlined',
12
- 'link',
13
- 'text',
14
- ]
9
+ const variantOptions: ButtonProps['variant'][] = ['contained', 'outlined', 'link', 'text']
15
10
  const colorOptions = [
16
11
  'primary',
17
12
  'secondary',
@@ -249,7 +244,7 @@ export const ErrorOutlined: Story = {
249
244
  export const LightOutlined: Story = {
250
245
  args: {
251
246
  variant: 'outlined',
252
- color: 'light' as any,
247
+ color: 'light',
253
248
  children: 'Light Button',
254
249
  },
255
250
  decorators: [
@@ -273,7 +268,7 @@ export const LightOutlined: Story = {
273
268
  export const LightOutlinedWithIcon: Story = {
274
269
  args: {
275
270
  variant: 'outlined',
276
- color: 'light' as any,
271
+ color: 'light',
277
272
  startIcon: <PlusBoldIcon />,
278
273
  children: 'Light Button with Icon',
279
274
  },
@@ -298,7 +293,7 @@ export const LightOutlinedWithIcon: Story = {
298
293
  export const LightOutlinedDisabled: Story = {
299
294
  args: {
300
295
  variant: 'outlined',
301
- color: 'light' as any,
296
+ color: 'light',
302
297
  children: 'Light Button Disabled',
303
298
  disabled: true,
304
299
  },
@@ -324,7 +319,7 @@ export const GhostOutlinedIconOnly: Story = {
324
319
  args: {
325
320
  'aria-label': 'Close',
326
321
  children: <PlusBoldIcon />,
327
- color: 'ghost' as any,
322
+ color: 'ghost',
328
323
  iconOnly: true,
329
324
  variant: 'outlined',
330
325
  },
@@ -350,7 +345,7 @@ export const GhostOutlinedIconOnlyDisabled: Story = {
350
345
  args: {
351
346
  'aria-label': 'Close',
352
347
  children: <PlusBoldIcon />,
353
- color: 'ghost' as any,
348
+ color: 'ghost',
354
349
  disabled: true,
355
350
  iconOnly: true,
356
351
  variant: 'outlined',
@@ -491,7 +486,7 @@ export const ErrorOutlinedLoading: Story = {
491
486
  export const LightOutlinedLoading: Story = {
492
487
  args: {
493
488
  variant: 'outlined',
494
- color: 'light' as any,
489
+ color: 'light',
495
490
  children: 'Light Button',
496
491
  loading: true,
497
492
  },
@@ -516,7 +511,7 @@ export const LightOutlinedLoading: Story = {
516
511
  export const LightOutlinedWithIconLoading: Story = {
517
512
  args: {
518
513
  variant: 'outlined',
519
- color: 'light' as any,
514
+ color: 'light',
520
515
  startIcon: <PlusBoldIcon />,
521
516
  children: 'Light Button with Icon',
522
517
  loading: true,
@@ -543,7 +538,7 @@ export const GhostOutlinedIconOnlyLoading: Story = {
543
538
  args: {
544
539
  'aria-label': 'Close',
545
540
  children: <PlusBoldIcon />,
546
- color: 'ghost' as any,
541
+ color: 'ghost',
547
542
  iconOnly: true,
548
543
  variant: 'outlined',
549
544
  loading: true,
@@ -11,7 +11,7 @@ const variants = ['outlined', 'flat']
11
11
 
12
12
  const lorem = 'Lorem Ipsum has been the standard.'
13
13
 
14
- type FormModel = {
14
+ interface FormModel {
15
15
  agreement: string
16
16
  }
17
17
 
@@ -51,7 +51,7 @@ import palette from '@/theme/palette'
51
51
 
52
52
  type StoryArgs = IconProps
53
53
 
54
- type IconStoryItem = {
54
+ interface IconStoryItem {
55
55
  name: string
56
56
  render: (args: StoryArgs) => ReactElement
57
57
  }
@@ -7,7 +7,7 @@ import FieldView from '@/components/storybook/FieldView'
7
7
  import Fields from '@/components/storybook/Fields'
8
8
  import PreviewTitle from '@/components/storybook/PreviewTitle'
9
9
 
10
- type FormModel = {
10
+ interface FormModel {
11
11
  countable: number
12
12
  countable2: number
13
13
  countable3: number
@@ -7,7 +7,7 @@ import FieldView from '@/components/storybook/FieldView'
7
7
  import Fields from '@/components/storybook/Fields'
8
8
  import PreviewTitle from '@/components/storybook/PreviewTitle'
9
9
 
10
- type FormModel = {
10
+ interface FormModel {
11
11
  phone: string
12
12
  phoneDisabled: string
13
13
  phoneError: string
@@ -237,7 +237,7 @@ export const Main: Story = {
237
237
  },
238
238
  }
239
239
 
240
- type VariantsFormModel = {
240
+ interface VariantsFormModel {
241
241
  singleSelect: string | null
242
242
  groupedSelect: string | null
243
243
  singleSearchSelect: string | null
@@ -266,14 +266,12 @@ const variantOptions = [
266
266
  },
267
267
  ]
268
268
 
269
- const groupedVariantOptions: Array<
270
- {
271
- group: string
272
- } & {
273
- value: string
274
- label: string
275
- }
276
- > = [
269
+ const groupedVariantOptions: ({
270
+ group: string
271
+ } & {
272
+ value: string
273
+ label: string
274
+ })[] = [
277
275
  { value: 'group-1-option-1', label: '1st option', group: 'GROUP 1' },
278
276
  { value: 'group-1-option-2', label: '2st option', group: 'GROUP 1' },
279
277
  { value: 'group-1-option-3', label: '3rd option', group: 'GROUP 1' },
@@ -15,7 +15,7 @@ const meta = {
15
15
  export default meta
16
16
  type Story = StoryObj<typeof meta>
17
17
 
18
- type ControlledDemoProps = {
18
+ interface ControlledDemoProps {
19
19
  initialChecked?: boolean
20
20
  disabled?: boolean
21
21
  label?: string
@@ -11,7 +11,7 @@ import PreviewTitle from '@/components/storybook/PreviewTitle'
11
11
  const lorem =
12
12
  "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard."
13
13
 
14
- const severities: Array<'grey' | 'info' | 'success' | 'warning' | 'error'> = [
14
+ const severities: ('grey' | 'info' | 'success' | 'warning' | 'error')[] = [
15
15
  'grey',
16
16
  'info',
17
17
  'success',
@@ -180,7 +180,7 @@ export const Toggles: Story = {
180
180
 
181
181
  function DismissibleTemplate() {
182
182
  const [visibleSeverities, setVisibleSeverities] = useState<
183
- Array<(typeof severities)[number]>
183
+ (typeof severities)[number][]
184
184
  >([...severities])
185
185
 
186
186
  return (
@@ -262,9 +262,9 @@ export const TabletViewport: Story = {
262
262
  globals: { viewport: { value: 'tablet768' } },
263
263
  }
264
264
 
265
- // Pins the CardFooter align='start' + single-action + stretchOnMobile={false}
266
- // path at 375, so the mobile left-align regression the FooterLink helper
267
- // depends on stays covered by the visual suite.
265
+ // Pins the CardFooter align='start' + single-action path at 375, so the
266
+ // mobile left-align regression the FooterLink helper depends on stays
267
+ // covered by the visual suite.
268
268
  export const LeftAlignedFooterMobileViewport: Story = {
269
269
  args: {
270
270
  variant: 'card',
@@ -272,7 +272,7 @@ export const LeftAlignedFooterMobileViewport: Story = {
272
272
  header: <SampleHeader />,
273
273
  children: <SampleContent />,
274
274
  footer: (
275
- <RcSesCardFooter align='start' stretchOnMobile={false}>
275
+ <RcSesCardFooter align='start'>
276
276
  <RcSesButton variant='link'>Peržiūrėti DUK</RcSesButton>
277
277
  </RcSesCardFooter>
278
278
  ),
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryContext, StoryObj } from '@storybook/react-vite'
2
- import { useForm } from 'react-hook-form'
2
+ import { useForm, useWatch } from 'react-hook-form'
3
3
 
4
4
  import RcSesCheckboxFormControl from '@/components/form/inputs/CheckboxFormControl'
5
5
  import RcSesFormControlLabel from '@/components/form/inputs/FormControlLabel'
@@ -46,7 +46,7 @@ const meta: Meta<typeof RcSesCheckboxFormControl> = {
46
46
  tags: ['autodocs'],
47
47
  }
48
48
 
49
- type FormModel = {
49
+ interface FormModel {
50
50
  agreement: string
51
51
  }
52
52
 
@@ -178,7 +178,7 @@ export const Loading: Story = {
178
178
  },
179
179
  }
180
180
 
181
- type IndeterminateFormModel = {
181
+ interface IndeterminateFormModel {
182
182
  parent: boolean
183
183
  child1: boolean
184
184
  child2: boolean
@@ -186,7 +186,7 @@ type IndeterminateFormModel = {
186
186
  }
187
187
 
188
188
  function CheckboxIndeterminateDemo() {
189
- const { control, watch, setValue } = useForm<IndeterminateFormModel>({
189
+ const { control, setValue } = useForm<IndeterminateFormModel>({
190
190
  mode: 'all',
191
191
  defaultValues: {
192
192
  parent: false,
@@ -196,11 +196,7 @@ function CheckboxIndeterminateDemo() {
196
196
  },
197
197
  })
198
198
 
199
- const child1Value = watch('child1')
200
- const child2Value = watch('child2')
201
- const child3Value = watch('child3')
202
-
203
- const childValues = [child1Value, child2Value, child3Value]
199
+ const childValues = useWatch({ control, name: ['child1', 'child2', 'child3'] })
204
200
 
205
201
  const handleParentChange = (newChildValues: boolean[]) => {
206
202
  setValue('child1', newChildValues[0])
@@ -232,7 +228,7 @@ function CheckboxIndeterminateDemo() {
232
228
  <RcSesFormControlLabel
233
229
  control={
234
230
  <RcSesSimpleCheckbox
235
- checked={child1Value}
231
+ checked={childValues[0]}
236
232
  onChange={(e) => setValue('child1', e.target.checked)}
237
233
  />
238
234
  }
@@ -241,7 +237,7 @@ function CheckboxIndeterminateDemo() {
241
237
  <RcSesFormControlLabel
242
238
  control={
243
239
  <RcSesSimpleCheckbox
244
- checked={child2Value}
240
+ checked={childValues[1]}
245
241
  onChange={(e) => setValue('child2', e.target.checked)}
246
242
  />
247
243
  }
@@ -250,7 +246,7 @@ function CheckboxIndeterminateDemo() {
250
246
  <RcSesFormControlLabel
251
247
  control={
252
248
  <RcSesSimpleCheckbox
253
- checked={child3Value}
249
+ checked={childValues[2]}
254
250
  onChange={(e) => setValue('child3', e.target.checked)}
255
251
  />
256
252
  }
@@ -302,7 +298,7 @@ export const Indeterminate: Story = {
302
298
  }
303
299
 
304
300
  function CheckboxIndeterminateLoadingDemo() {
305
- const { control, watch, setValue } = useForm<IndeterminateFormModel>({
301
+ const { control, setValue } = useForm<IndeterminateFormModel>({
306
302
  mode: 'all',
307
303
  defaultValues: {
308
304
  parent: false,
@@ -312,11 +308,7 @@ function CheckboxIndeterminateLoadingDemo() {
312
308
  },
313
309
  })
314
310
 
315
- const child1Value = watch('child1')
316
- const child2Value = watch('child2')
317
- const child3Value = watch('child3')
318
-
319
- const childValues = [child1Value, child2Value, child3Value]
311
+ const childValues = useWatch({ control, name: ['child1', 'child2', 'child3'] })
320
312
 
321
313
  const handleParentChange = (newChildValues: boolean[]) => {
322
314
  setValue('child1', newChildValues[0])
@@ -349,7 +341,7 @@ function CheckboxIndeterminateLoadingDemo() {
349
341
  <RcSesFormControlLabel
350
342
  control={
351
343
  <RcSesSimpleCheckbox
352
- checked={child1Value}
344
+ checked={childValues[0]}
353
345
  onChange={(e) => setValue('child1', e.target.checked)}
354
346
  loading
355
347
  />
@@ -360,7 +352,7 @@ function CheckboxIndeterminateLoadingDemo() {
360
352
  <RcSesFormControlLabel
361
353
  control={
362
354
  <RcSesSimpleCheckbox
363
- checked={child2Value}
355
+ checked={childValues[1]}
364
356
  onChange={(e) => setValue('child2', e.target.checked)}
365
357
  loading
366
358
  />
@@ -371,7 +363,7 @@ function CheckboxIndeterminateLoadingDemo() {
371
363
  <RcSesFormControlLabel
372
364
  control={
373
365
  <RcSesSimpleCheckbox
374
- checked={child3Value}
366
+ checked={childValues[2]}
375
367
  onChange={(e) => setValue('child3', e.target.checked)}
376
368
  loading
377
369
  />
@@ -7,7 +7,7 @@ import FieldView from '@/components/storybook/FieldView'
7
7
  import Fields from '@/components/storybook/Fields'
8
8
  import PreviewTitle from '@/components/storybook/PreviewTitle'
9
9
 
10
- type FormModel = {
10
+ interface FormModel {
11
11
  chooseOne: string
12
12
  }
13
13
 
@@ -160,7 +160,7 @@ function SnackbarDemoCompactWithText() {
160
160
  <Button
161
161
  key={snackbarState}
162
162
  variant='contained'
163
- color={getButtonColor(snackbarState) as any}
163
+ color={getButtonColor(snackbarState)}
164
164
  startIcon={<Icon />}
165
165
  onClick={() =>
166
166
  showSnackbar({ state: snackbarState, message, size: 'compact' })
@@ -233,7 +233,7 @@ function SnackbarDemoStandardWithButtons() {
233
233
  <Button
234
234
  key={snackbarState}
235
235
  variant='contained'
236
- color={getButtonColor(snackbarState) as any}
236
+ color={getButtonColor(snackbarState)}
237
237
  startIcon={<Icon />}
238
238
  onClick={() =>
239
239
  showSnackbar({
@@ -30,7 +30,7 @@ export default meta
30
30
  type Story = StoryObj<typeof RcSesTitleBlock>
31
31
 
32
32
  const FooterLink = ({ label, href }: { label: string; href: string }) => (
33
- <RcSesCardFooter align='start' stretchOnMobile={false}>
33
+ <RcSesCardFooter align='start'>
34
34
  <RcSesButton
35
35
  variant='link'
36
36
  href={href}
@@ -221,6 +221,45 @@ export const RowListWithIcons: Story = {
221
221
  },
222
222
  }
223
223
 
224
+ export const RowListWithIconsAndLongText: Story = {
225
+ render: () => {
226
+ const rowAId = 'row-list-long-text-a'
227
+ const rowBId = 'row-list-long-text-b'
228
+ return (
229
+ <Stack divider={<Divider flexItem />} spacing={3}>
230
+ <RcSesTitleBlock
231
+ headingId={rowAId}
232
+ title='Santuoką liudijančio įrašo, patvirtinančio santuokos sudarymo faktą užsienio valstybėje, užsakymas su visomis papildomomis pastabomis'
233
+ description='Oficialus santuokos faktą patvirtinantis įrašas, apimantis visus civilinės metrikacijos duomenis, reikalingus tolimesnėms teisinėms procedūroms tiek Lietuvoje, tiek užsienyje. Įrašas gali būti pateikiamas įvairioms institucijoms ir naudojamas kaip oficialus patvirtinimas.'
234
+ titleTone='brand'
235
+ icon={<RcSesIconWithSquareBackground Icon={InfoIcon} variant='soft' />}
236
+ actions={
237
+ <RcSesButton
238
+ variant='link'
239
+ id={`${rowAId}-cta`}
240
+ aria-labelledby={`${rowAId}-cta ${rowAId}`}
241
+ >
242
+ Plačiau
243
+ </RcSesButton>
244
+ }
245
+ />
246
+ <RcSesTitleBlock
247
+ headingId={rowBId}
248
+ title='Pažymos, patvirtinančios, kad nėra kliūčių Lietuvos Respublikos piliečiui sudaryti santuoką užsienio valstybėje, užsakymas'
249
+ description='Ši pažyma reikalinga tais atvejais, kai Lietuvos Respublikos pilietis planuoja sudaryti santuoką užsienio valstybėje ir vietos civilinės metrikacijos institucija reikalauja oficialaus patvirtinimo, kad asmens šeiminė padėtis Lietuvoje neturi kliūčių santuokos sudarymui.'
250
+ titleTone='brand'
251
+ icon={<RcSesIconWithSquareBackground Icon={InfoIcon} variant='soft' />}
252
+ actions={
253
+ <RcSesButton id={`${rowBId}-cta`} aria-labelledby={`${rowBId}-cta ${rowBId}`}>
254
+ Užsakyti
255
+ </RcSesButton>
256
+ }
257
+ />
258
+ </Stack>
259
+ )
260
+ },
261
+ }
262
+
224
263
  export const RowListWithIconsAndTwoActions: Story = {
225
264
  render: () => {
226
265
  const rowAId = 'row-list-two-actions-a'
@@ -13,7 +13,7 @@ import {
13
13
  } from '@mui/material'
14
14
  import type { Meta, StoryObj } from '@storybook/react-vite'
15
15
  import { useState } from 'react'
16
- import { useForm } from 'react-hook-form'
16
+ import { useForm, useWatch } from 'react-hook-form'
17
17
 
18
18
  import InfoFillIcon from '@/assets/icons/InfoFillIcon'
19
19
  import NotePencilIcon from '@/assets/icons/NotePencilIcon'
@@ -196,7 +196,7 @@ export const OwnerTypeExpand: Story = {
196
196
  render: () => <OwnerTypeExpandStory />,
197
197
  }
198
198
 
199
- type OwnerBranchFormModel = {
199
+ interface OwnerBranchFormModel {
200
200
  individual: { municipality: string | null }
201
201
  legalEntity: { legalForm: string | null }
202
202
  }
@@ -224,14 +224,14 @@ const RadioBranchFormStory = () => {
224
224
  const [ownerTypeId, setOwnerTypeId] = useState(OWNER_TYPE_OPTIONS[0].id)
225
225
  const [shouldUnregister, setShouldUnregister] = useState(true)
226
226
 
227
- const { control, watch } = useForm<OwnerBranchFormModel>({
227
+ const { control } = useForm<OwnerBranchFormModel>({
228
228
  defaultValues: {
229
229
  individual: { municipality: null },
230
230
  legalEntity: { legalForm: null },
231
231
  },
232
232
  })
233
233
 
234
- const formState = watch()
234
+ const formState = useWatch({ control })
235
235
 
236
236
  // The non-selected branch stays in form state when shouldUnregister is off, so the
237
237
  // submitted payload is built from the selected branch instead of the whole form.
@@ -7,7 +7,7 @@ import FieldView from '@/components/storybook/FieldView'
7
7
  import Fields from '@/components/storybook/Fields'
8
8
  import PreviewTitle from '@/components/storybook/PreviewTitle'
9
9
 
10
- type FormModel = {
10
+ interface FormModel {
11
11
  documents: File[]
12
12
  documentsDisabled: File[]
13
13
  documentsError: File[]
@@ -7,7 +7,7 @@ import FieldView from '@/components/storybook/FieldView'
7
7
  import Fields from '@/components/storybook/Fields'
8
8
  import PreviewTitle from '@/components/storybook/PreviewTitle'
9
9
 
10
- type FormModel = {
10
+ interface FormModel {
11
11
  uploadFile: string
12
12
  uploadFile2: string
13
13
  uploadFile3: string