@registrucentras/rc-ses-react-components 1.12.0 → 2.0.0-rc.1

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 (331) hide show
  1. package/dist/assets/icons/ArrowLeftIcon.d.ts +1 -1
  2. package/dist/assets/icons/ArrowRightIcon.d.ts +1 -1
  3. package/dist/assets/icons/ArrowsClockwiseIcon.d.ts +1 -1
  4. package/dist/assets/icons/BarcodeIcon.d.ts +1 -1
  5. package/dist/assets/icons/CalendarBlankIcon.d.ts +1 -1
  6. package/dist/assets/icons/CaretDoubleLeftBoldIcon.d.ts +1 -1
  7. package/dist/assets/icons/CaretDoubleRightBoldIcon.d.ts +1 -1
  8. package/dist/assets/icons/CaretDownBoldIcon.d.ts +1 -1
  9. package/dist/assets/icons/CaretDownFill.d.ts +1 -1
  10. package/dist/assets/icons/CaretDownIcon.d.ts +1 -1
  11. package/dist/assets/icons/CaretLeftBoldIcon.d.ts +1 -1
  12. package/dist/assets/icons/CaretLeftIcon.d.ts +1 -1
  13. package/dist/assets/icons/CaretRightBoldIcon.d.ts +1 -1
  14. package/dist/assets/icons/CaretUpBoldIcon.d.ts +3 -0
  15. package/dist/assets/icons/CaretUpIcon.d.ts +3 -0
  16. package/dist/assets/icons/CheckBoldIcon.d.ts +1 -1
  17. package/dist/assets/icons/CheckCircleFillIcon.d.ts +1 -1
  18. package/dist/assets/icons/CheckIcon.d.ts +1 -1
  19. package/dist/assets/icons/CheckUncheckedBoldIcon.d.ts +1 -1
  20. package/dist/assets/icons/CircleFilledIcon.d.ts +1 -1
  21. package/dist/assets/icons/CloseIcon.d.ts +1 -1
  22. package/dist/assets/icons/CollapseChevronsIcon.d.ts +1 -1
  23. package/dist/assets/icons/CopyIcon.d.ts +1 -1
  24. package/dist/assets/icons/DotCircleFilledIcon.d.ts +1 -1
  25. package/dist/assets/icons/ExpandChevronsIcon.d.ts +1 -1
  26. package/dist/assets/icons/InfoFillIcon.d.ts +1 -1
  27. package/dist/assets/icons/ListIcon.d.ts +3 -0
  28. package/dist/assets/icons/MagnifyingGlassIcon.d.ts +1 -1
  29. package/dist/assets/icons/MapPinAreaIcon.d.ts +1 -1
  30. package/dist/assets/icons/MinusBoldIcon.d.ts +1 -1
  31. package/dist/assets/icons/MinusIcon.d.ts +3 -0
  32. package/dist/assets/icons/NotePencilIcon.d.ts +3 -0
  33. package/dist/assets/icons/PencilSimpleLineIcon.d.ts +1 -1
  34. package/dist/assets/icons/PlusBoldIcon.d.ts +1 -1
  35. package/dist/assets/icons/PlusIcon.d.ts +3 -0
  36. package/dist/assets/icons/QuestionFillIcon.d.ts +1 -1
  37. package/dist/assets/icons/QuestionIcon.d.ts +1 -1
  38. package/dist/assets/icons/ScalesIcon.d.ts +1 -1
  39. package/dist/assets/icons/ScrollIcon.d.ts +1 -1
  40. package/dist/assets/icons/SearchHelpIcon.d.ts +1 -1
  41. package/dist/assets/icons/SearchXIcon.d.ts +1 -1
  42. package/dist/assets/icons/SpinnerGapBoldIcon.d.ts +1 -1
  43. package/dist/assets/icons/TrashIcon.d.ts +3 -0
  44. package/dist/assets/icons/UploadSimpleIcon.d.ts +1 -1
  45. package/dist/assets/icons/UserIcon.d.ts +3 -0
  46. package/dist/assets/icons/WarningCircleIcon.d.ts +1 -1
  47. package/dist/assets/icons/WarningDiamondFillIcon.d.ts +1 -1
  48. package/dist/assets/icons/WarningFillIcon.d.ts +1 -1
  49. package/dist/assets/icons/XCircleFillIcon.d.ts +1 -1
  50. package/dist/components/common/Accordion/index.d.ts +1 -1
  51. package/dist/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +106 -0
  52. package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +12 -0
  53. package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +7 -0
  54. package/dist/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.d.ts +2 -0
  55. package/dist/components/common/AdvancedList/components/AdvancedListItem/index.d.ts +4 -0
  56. package/dist/components/common/AdvancedList/index.d.ts +11 -0
  57. package/dist/components/common/Alert/index.d.ts +1 -1
  58. package/dist/components/common/Badge/index.d.ts +1 -1
  59. package/dist/components/common/Breadcrumbs/index.d.ts +1 -1
  60. package/dist/components/common/Button/ButtonWithPopover.d.ts +1 -1
  61. package/dist/components/common/Button/index.d.ts +13 -5
  62. package/dist/components/common/Card/index.d.ts +1 -1
  63. package/dist/components/common/DataPagination/components/DataPaginationSkeleton.d.ts +1 -1
  64. package/dist/components/common/DataPagination/components/PaginationButton.d.ts +1 -1
  65. package/dist/components/common/DataPagination/index.d.ts +1 -1
  66. package/dist/components/common/IconWithCircularBackground.d.ts +1 -1
  67. package/dist/components/common/ImageCard/index.d.ts +1 -1
  68. package/dist/components/common/ListWithIcons/components/ListWithIconsItem.d.ts +1 -1
  69. package/dist/components/common/ListWithIcons/index.d.ts +1 -1
  70. package/dist/components/common/Popover/index.d.ts +1 -1
  71. package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +4 -1
  72. package/dist/components/common/SelectableCardList/index.d.ts +4 -1
  73. package/dist/components/common/Snackbar/SnackbarProvider.d.ts +1 -1
  74. package/dist/components/common/Snackbar/index.d.ts +1 -1
  75. package/dist/components/common/Switch/index.d.ts +1 -1
  76. package/dist/components/common/Tabs/TabPanel.d.ts +1 -1
  77. package/dist/components/common/Tabs/TabsWrapper.d.ts +1 -1
  78. package/dist/components/common/Tooltip/index.d.ts +1 -1
  79. package/dist/components/form/components/FormControlWrapper/components/FieldSuffix.d.ts +1 -1
  80. package/dist/components/form/components/FormControlWrapper/index.d.ts +1 -1
  81. package/dist/components/form/inputs/Checkbox.d.ts +1 -1
  82. package/dist/components/form/inputs/CheckboxFormControl.d.ts +1 -1
  83. package/dist/components/form/inputs/Datepicker/components/RcSesDatepickerActionBar.d.ts +1 -1
  84. package/dist/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.d.ts +2 -1
  85. package/dist/components/form/inputs/Datepicker/index.d.ts +1 -1
  86. package/dist/components/form/inputs/FileDropzone.d.ts +1 -1
  87. package/dist/components/form/inputs/FileUpload.d.ts +1 -1
  88. package/dist/components/form/inputs/FormControlLabel.d.ts +2 -2
  89. package/dist/components/form/inputs/NumberStepper.d.ts +2 -1
  90. package/dist/components/form/inputs/PhoneInput.d.ts +2 -1
  91. package/dist/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.d.ts +1 -1
  92. package/dist/components/form/inputs/PhoneInputFormControl/components/ListboxComponent.d.ts +13 -0
  93. package/dist/components/form/inputs/PhoneInputFormControl/components/PopperComponent.d.ts +1 -1
  94. package/dist/components/form/inputs/PhoneInputFormControl/components/RowComponent.d.ts +5 -2
  95. package/dist/components/form/inputs/PhoneInputFormControl/index.d.ts +2 -1
  96. package/dist/components/form/inputs/Select/index.d.ts +2 -1
  97. package/dist/components/form/inputs/SimpleCheckbox.d.ts +2 -1
  98. package/dist/components/layout/Footer/index.d.ts +1 -1
  99. package/dist/components/layout/ServiceFormActions.d.ts +1 -1
  100. package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.d.ts +1 -1
  101. package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/index.d.ts +1 -1
  102. package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +1 -1
  103. package/dist/components/layout/ServiceHeader.d.ts +1 -1
  104. package/dist/components/layout/ServicePage.d.ts +1 -1
  105. package/dist/components/layout/ServiceWizardStepper/components/CustomStepIcon.d.ts +1 -1
  106. package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +1 -1
  107. package/dist/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.d.ts +1 -1
  108. package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +1 -1
  109. package/dist/components/layout/ServiceWizardStepper/index.d.ts +1 -1
  110. package/dist/components/loaders/FullPageLoader/index.d.ts +1 -1
  111. package/dist/components/loaders/Loader/index.d.ts +1 -1
  112. package/dist/components/loaders/LoadingSpinner/index.d.ts +1 -1
  113. package/dist/components/overlays/Dialog/index.d.ts +1 -1
  114. package/dist/components/overlays/Modal/index.d.ts +1 -1
  115. package/dist/components/utils/loading.d.ts +1 -1
  116. package/dist/i18n/@mui/x-date-pickers/ltLT.d.ts +1 -71
  117. package/dist/library/icons.d.ts +9 -1
  118. package/dist/library/index.d.ts +3 -0
  119. package/dist/registrucentras-rc-ses-react-components.cjs +1 -30
  120. package/dist/registrucentras-rc-ses-react-components.js +6698 -7777
  121. package/dist/stories/assets/Logo.stories.d.ts +1 -1
  122. package/dist/stories/components/actions/Button.stories.d.ts +6 -5
  123. package/dist/stories/components/actions/ButtonWithPopover.stories.d.ts +1 -1
  124. package/dist/stories/components/display/AdvancedList.stories.d.ts +32 -0
  125. package/dist/stories/components/display/AdvancedListItem.stories.d.ts +33 -0
  126. package/dist/stories/components/display/Badge.stories.d.ts +1 -1
  127. package/dist/stories/components/display/Card.stories.d.ts +1 -1
  128. package/dist/stories/components/display/ImageCard.stories.d.ts +1 -1
  129. package/dist/stories/components/display/ListWithIcons.stories.d.ts +2 -2
  130. package/dist/stories/components/display/SegmentedControl.stories.d.ts +9 -9
  131. package/dist/stories/components/display/SelectableCardList.stories.d.ts +2 -2
  132. package/dist/stories/components/display/Tooltip.stories.d.ts +2 -2
  133. package/dist/stories/components/feedback/Alert.stories.d.ts +1 -1
  134. package/dist/stories/components/feedback/Snackbar.stories.d.ts +7 -7
  135. package/dist/stories/components/form/CardFormContainer.stories.d.ts +1 -1
  136. package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +1 -1
  137. package/dist/stories/components/form/FormControlWrapper.stories.d.ts +1 -1
  138. package/dist/stories/components/form/ServiceFormActions.stories.d.ts +1 -1
  139. package/dist/stories/components/form/ServiceFormContainer.stories.d.ts +2 -2
  140. package/dist/stories/components/form/SimpleCheckbox.stories.d.ts +1 -1
  141. package/dist/stories/components/icons/IconWithCircularBackground.stories.d.ts +1 -1
  142. package/dist/stories/components/icons/Icons.stories.d.ts +1 -1
  143. package/dist/stories/components/inputs/Checkbox.stories.d.ts +2 -2
  144. package/dist/stories/components/inputs/DatePicker.stories.d.ts +25 -2
  145. package/dist/stories/components/inputs/FileDropzone.stories.d.ts +1 -1
  146. package/dist/stories/components/inputs/FileUpload.stories.d.ts +2 -2
  147. package/dist/stories/components/inputs/NumberStepper.stories.d.ts +1 -1
  148. package/dist/stories/components/inputs/PhoneInput.stories.d.ts +2 -2
  149. package/dist/stories/components/inputs/PhoneInputFormControl.stories.d.ts +1 -1
  150. package/dist/stories/components/inputs/RadioButtonGroup.stories.d.ts +1 -1
  151. package/dist/stories/components/inputs/SearchInput.stories.d.ts +1 -1
  152. package/dist/stories/components/inputs/SearchableField.stories.d.ts +1 -1
  153. package/dist/stories/components/inputs/Select.stories.d.ts +1 -1
  154. package/dist/stories/components/inputs/Switch.stories.d.ts +1 -1
  155. package/dist/stories/components/inputs/TextField.stories.d.ts +1 -1
  156. package/dist/stories/components/layout/Footer.stories.d.ts +1 -1
  157. package/dist/stories/components/layout/ServiceHeader.stories.d.ts +1 -1
  158. package/dist/stories/components/layout/ServicePage.stories.d.ts +1 -1
  159. package/dist/stories/components/loaders/FullPageLoader.stories.d.ts +1 -1
  160. package/dist/stories/components/loaders/Loader.stories.d.ts +1 -1
  161. package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +4 -4
  162. package/dist/stories/components/navigation/Accordion.stories.d.ts +2 -2
  163. package/dist/stories/components/navigation/Breadcrumbs.stories.d.ts +1 -1
  164. package/dist/stories/components/navigation/DataPagination.stories.d.ts +2 -2
  165. package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +1 -1
  166. package/dist/stories/components/overlays/Dialog.stories.d.ts +7 -1
  167. package/dist/stories/components/overlays/Modal.stories.d.ts +1 -1
  168. package/dist/stories/components/overlays/Popover.stories.d.ts +12 -0
  169. package/dist/stories/components/tabs/Tab.stories.d.ts +1 -1
  170. package/dist/stories/components/tabs/TabPanel.stories.d.ts +1 -1
  171. package/dist/stories/components/tabs/Tabs.stories.d.ts +1 -1
  172. package/dist/stories/components/tabs/TabsWrapper.stories.d.ts +1 -1
  173. package/dist/stories/theme/ThemedMuiComponents.stories.d.ts +25 -0
  174. package/dist/theme/motion.d.ts +16 -0
  175. package/package.json +64 -62
  176. package/src/assets/icons/CaretUpBoldIcon.tsx +17 -0
  177. package/src/assets/icons/CaretUpIcon.tsx +9 -0
  178. package/src/assets/icons/ListIcon.tsx +17 -0
  179. package/src/assets/icons/MinusIcon.tsx +9 -0
  180. package/src/assets/icons/NotePencilIcon.tsx +9 -0
  181. package/src/assets/icons/PlusIcon.tsx +9 -0
  182. package/src/assets/icons/TrashIcon.tsx +23 -0
  183. package/src/assets/icons/UserIcon.tsx +17 -0
  184. package/src/components/common/Accordion/index.tsx +0 -1
  185. package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +100 -0
  186. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +224 -0
  187. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +263 -0
  188. package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.test.ts +80 -0
  189. package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.ts +28 -0
  190. package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +631 -0
  191. package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +332 -0
  192. package/src/components/common/AdvancedList/index.test.tsx +97 -0
  193. package/src/components/common/AdvancedList/index.tsx +52 -0
  194. package/src/components/common/Alert/index.test.tsx +1 -1
  195. package/src/components/common/Badge/index.test.tsx +1 -1
  196. package/src/components/common/Button/index.test.tsx +5 -2
  197. package/src/components/common/Button/index.tsx +25 -5
  198. package/src/components/common/Card/index.test.tsx +1 -1
  199. package/src/components/common/DataPagination/index.test.tsx +1 -1
  200. package/src/components/common/DataPagination/index.tsx +14 -2
  201. package/src/components/common/ImageCard/index.test.tsx +1 -1
  202. package/src/components/common/ListWithIcons/index.test.tsx +1 -1
  203. package/src/components/common/SegmentedControl/components/SegmentButton/index.test.tsx +1 -1
  204. package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +2 -0
  205. package/src/components/common/SegmentedControl/index.test.tsx +1 -1
  206. package/src/components/common/SelectableCardList/components/SelectableCardListItem.test.tsx +50 -0
  207. package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +48 -2
  208. package/src/components/common/SelectableCardList/index.test.tsx +1 -1
  209. package/src/components/common/SelectableCardList/index.tsx +6 -0
  210. package/src/components/common/Snackbar/SnackbarProvider.tsx +1 -1
  211. package/src/components/common/Snackbar/index.test.tsx +1 -1
  212. package/src/components/common/Snackbar/index.tsx +3 -1
  213. package/src/components/common/Switch/index.test.tsx +1 -1
  214. package/src/components/common/Switch/index.tsx +21 -6
  215. package/src/components/common/Tooltip/index.test.tsx +2 -4
  216. package/src/components/common/Tooltip/index.tsx +5 -4
  217. package/src/components/form/components/FormControlWrapper/const/FormControlLayoutVariables.ts +1 -1
  218. package/src/components/form/inputs/CheckboxFormControl.tsx +7 -3
  219. package/src/components/form/inputs/Datepicker/components/RcSesDatepickerActionBar.tsx +8 -5
  220. package/src/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.tsx +12 -12
  221. package/src/components/form/inputs/Datepicker/index.tsx +37 -32
  222. package/src/components/form/inputs/FileDropzone.tsx +6 -1
  223. package/src/components/form/inputs/NumberStepper.tsx +10 -5
  224. package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +15 -11
  225. package/src/components/form/inputs/PhoneInputFormControl/components/ListboxComponent.tsx +31 -27
  226. package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +8 -4
  227. package/src/components/form/inputs/PhoneInputFormControl/index.test.tsx +57 -2
  228. package/src/components/form/inputs/PhoneInputFormControl/index.tsx +66 -53
  229. package/src/components/form/inputs/RadioButtonGroup.tsx +0 -1
  230. package/src/components/form/inputs/SearchInput/index.test.tsx +1 -1
  231. package/src/components/form/inputs/SearchInput/index.tsx +23 -13
  232. package/src/components/form/inputs/SearchableField.test.tsx +126 -0
  233. package/src/components/form/inputs/SearchableField.tsx +29 -24
  234. package/src/components/form/inputs/Select/index.test.tsx +1 -1
  235. package/src/components/form/inputs/Select/index.tsx +95 -65
  236. package/src/components/form/inputs/TextField.tsx +1 -7
  237. package/src/components/layout/Footer/index.test.tsx +1 -1
  238. package/src/components/layout/ServiceFormActions.tsx +3 -3
  239. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +2 -2
  240. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +2 -2
  241. package/src/components/layout/ServiceFormContainer/CardFormContainer/index.test.tsx +1 -1
  242. package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +2 -1
  243. package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +8 -6
  244. package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +2 -1
  245. package/src/components/loaders/FullPageLoader/index.test.tsx +1 -1
  246. package/src/components/loaders/FullPageLoader/index.tsx +4 -3
  247. package/src/components/loaders/Loader/index.test.tsx +1 -1
  248. package/src/components/loaders/Loader/index.tsx +14 -4
  249. package/src/components/loaders/LoadingSpinner/index.test.tsx +1 -1
  250. package/src/components/overlays/Dialog/index.test.tsx +1 -1
  251. package/src/components/overlays/Dialog/index.tsx +7 -5
  252. package/src/components/overlays/Modal/index.test.tsx +1 -1
  253. package/src/components/overlays/Modal/index.tsx +4 -2
  254. package/src/env.tsx +1 -1
  255. package/src/examples/MultipleStepForm/components/ServiceDetailsForm.tsx +0 -5
  256. package/src/examples/MultipleStepForm/components/ServiceIssuanceForm.tsx +0 -2
  257. package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +2 -2
  258. package/src/examples/SingleStepForm/components/ObjectIdentifierSearchModal.tsx +12 -8
  259. package/src/examples/SingleStepForm/index.tsx +0 -2
  260. package/src/i18n/@mui/x-date-pickers/ltLT.ts +15 -1
  261. package/src/i18n/namespaces/common/en.json +11 -0
  262. package/src/i18n/namespaces/common/lt.json +11 -0
  263. package/src/library/icons.ts +16 -0
  264. package/src/library/index.ts +3 -0
  265. package/src/main.tsx +1 -1
  266. package/src/setupTests.ts +7 -1
  267. package/src/stories/Colors.mdx +1 -1
  268. package/src/stories/Welcome.mdx +1 -1
  269. package/src/stories/assets/Logo.stories.tsx +1 -1
  270. package/src/stories/components/actions/Button.stories.tsx +2 -2
  271. package/src/stories/components/actions/ButtonWithPopover.stories.tsx +1 -1
  272. package/src/stories/components/display/AdvancedList.stories.tsx +529 -0
  273. package/src/stories/components/display/AdvancedListItem.stories.tsx +653 -0
  274. package/src/stories/components/display/Badge.stories.tsx +24 -5
  275. package/src/stories/components/display/Card.stories.tsx +1 -1
  276. package/src/stories/components/display/ImageCard.stories.tsx +1 -1
  277. package/src/stories/components/display/ListWithIcons.stories.tsx +1 -1
  278. package/src/stories/components/display/SegmentedControl.stories.tsx +1 -1
  279. package/src/stories/components/display/SelectableCardList.stories.tsx +4 -1
  280. package/src/stories/components/display/Tooltip.stories.tsx +1 -1
  281. package/src/stories/components/feedback/Alert.stories.tsx +1 -1
  282. package/src/stories/components/feedback/Snackbar.stories.tsx +1 -1
  283. package/src/stories/components/form/CardFormContainer.stories.tsx +1 -1
  284. package/src/stories/components/form/CheckboxFormControl.stories.tsx +1 -1
  285. package/src/stories/components/form/FormControlWrapper.stories.tsx +1 -1
  286. package/src/stories/components/form/ServiceFormActions.stories.tsx +1 -1
  287. package/src/stories/components/form/ServiceFormContainer.stories.tsx +1 -3
  288. package/src/stories/components/form/SimpleCheckbox.stories.tsx +1 -1
  289. package/src/stories/components/icons/IconWithCircularBackground.stories.tsx +1 -1
  290. package/src/stories/components/icons/Icons.stories.tsx +1 -2
  291. package/src/stories/components/inputs/Checkbox.stories.tsx +1 -2
  292. package/src/stories/components/inputs/DatePicker.stories.tsx +38 -4
  293. package/src/stories/components/inputs/FileDropzone.stories.tsx +1 -1
  294. package/src/stories/components/inputs/FileUpload.stories.tsx +1 -2
  295. package/src/stories/components/inputs/NumberStepper.stories.tsx +1 -1
  296. package/src/stories/components/inputs/PhoneInput.stories.tsx +1 -2
  297. package/src/stories/components/inputs/PhoneInputFormControl.stories.tsx +3 -2
  298. package/src/stories/components/inputs/RadioButtonGroup.stories.tsx +1 -1
  299. package/src/stories/components/inputs/SearchInput.stories.tsx +2 -2
  300. package/src/stories/components/inputs/SearchableField.stories.tsx +1 -1
  301. package/src/stories/components/inputs/Select.stories.tsx +1 -2
  302. package/src/stories/components/inputs/Switch.stories.tsx +1 -1
  303. package/src/stories/components/inputs/TextField.stories.tsx +1 -1
  304. package/src/stories/components/layout/Footer.stories.tsx +1 -1
  305. package/src/stories/components/layout/ServiceHeader.stories.tsx +1 -1
  306. package/src/stories/components/layout/ServicePage.stories.tsx +1 -1
  307. package/src/stories/components/loaders/FullPageLoader.stories.tsx +1 -1
  308. package/src/stories/components/loaders/Loader.stories.tsx +1 -1
  309. package/src/stories/components/loaders/LoadingSpinner.stories.tsx +1 -1
  310. package/src/stories/components/navigation/Accordion.stories.tsx +1 -2
  311. package/src/stories/components/navigation/Breadcrumbs.stories.tsx +1 -1
  312. package/src/stories/components/navigation/DataPagination.stories.tsx +8 -2
  313. package/src/stories/components/navigation/ServiceWizardStepper.stories.tsx +1 -1
  314. package/src/stories/components/overlays/Dialog.stories.tsx +35 -1
  315. package/src/stories/components/overlays/Modal.stories.tsx +1 -1
  316. package/src/stories/components/overlays/Popover.stories.tsx +65 -0
  317. package/src/stories/components/tabs/Tab.stories.tsx +12 -1
  318. package/src/stories/components/tabs/TabPanel.stories.tsx +1 -1
  319. package/src/stories/components/tabs/Tabs.stories.tsx +1 -1
  320. package/src/stories/components/tabs/TabsWrapper.stories.tsx +1 -1
  321. package/src/stories/theme/ThemedMuiComponents.stories.tsx +177 -0
  322. package/src/theme/light/MuiAlert.tsx +82 -75
  323. package/src/theme/light/MuiLinearProgress.ts +6 -2
  324. package/src/theme/light/MuiPickersLayout.ts +4 -4
  325. package/src/theme/light/MuiTabs.tsx +2 -1
  326. package/src/theme/motion.tsx +10 -0
  327. package/src/types/common/ColorType.tsx +1 -7
  328. package/dist/components/form/inputs/PhoneInputFormControl/components/OuterElementType.d.ts +0 -5
  329. package/dist/components/form/inputs/PhoneInputFormControl/hooks/useResetCache.d.ts +0 -4
  330. package/src/components/form/inputs/PhoneInputFormControl/components/OuterElementType.tsx +0 -13
  331. package/src/components/form/inputs/PhoneInputFormControl/hooks/useResetCache.ts +0 -14
@@ -0,0 +1,224 @@
1
+ import { Avatar, Box, IconButton, Radio, Stack, Typography } from '@mui/material'
2
+ import { RefObject } from 'react'
3
+ import { useTranslation } from 'react-i18next'
4
+
5
+ import CaretDownIcon from '@/assets/icons/CaretDownIcon'
6
+ import CaretUpIcon from '@/assets/icons/CaretUpIcon'
7
+ import ListIcon from '@/assets/icons/ListIcon'
8
+ import RcSesSimpleCheckbox from '@/components/form/inputs/SimpleCheckbox'
9
+ import palette from '@/theme/palette'
10
+
11
+ import { AdvancedListItemLeading as AdvancedListItemLeadingData } from '../AdvancedListItem.types'
12
+
13
+ type Props = {
14
+ leading: AdvancedListItemLeadingData
15
+ disabled?: boolean
16
+ inputRef?: RefObject<HTMLInputElement>
17
+ expandableId?: string
18
+ expanded?: boolean
19
+ titleId?: string
20
+ }
21
+
22
+ const stop = (e: { stopPropagation: () => void }) => e.stopPropagation()
23
+
24
+ const getAccessibleNameProps = (
25
+ explicitLabel: string | undefined,
26
+ titleId: string | undefined,
27
+ ) => {
28
+ if (explicitLabel) return { 'aria-label': explicitLabel }
29
+ if (titleId) return { 'aria-labelledby': titleId }
30
+ return {}
31
+ }
32
+
33
+ const AdvancedListItemLeading = ({
34
+ leading,
35
+ disabled,
36
+ inputRef,
37
+ expandableId,
38
+ expanded,
39
+ titleId,
40
+ }: Props) => {
41
+ const { t } = useTranslation('common', {
42
+ keyPrefix: 'components.AdvancedListItemLeading',
43
+ })
44
+
45
+ if (leading.type === 'reorder') {
46
+ return (
47
+ <Stack
48
+ onClick={stop}
49
+ sx={{
50
+ alignItems: 'center',
51
+ }}
52
+ >
53
+ {!!leading.onMoveUp && (
54
+ <IconButton
55
+ aria-label={t('moveUp')}
56
+ size='small'
57
+ disabled={disabled || leading.moveUpDisabled}
58
+ onClick={(e) => {
59
+ stop(e)
60
+ leading.onMoveUp?.()
61
+ }}
62
+ sx={{ padding: '0.125rem' }}
63
+ >
64
+ <CaretUpIcon size={16} weight='regular' fillColor={palette.primary[700]} />
65
+ </IconButton>
66
+ )}
67
+ {!!leading.onMoveDown && (
68
+ <IconButton
69
+ aria-label={t('moveDown')}
70
+ size='small'
71
+ disabled={disabled || leading.moveDownDisabled}
72
+ onClick={(e) => {
73
+ stop(e)
74
+ leading.onMoveDown?.()
75
+ }}
76
+ sx={{ padding: '0.125rem' }}
77
+ >
78
+ <CaretDownIcon size={16} fillColor={palette.primary[700]} />
79
+ </IconButton>
80
+ )}
81
+ </Stack>
82
+ )
83
+ }
84
+
85
+ if (leading.type === 'drag') {
86
+ return (
87
+ <Box
88
+ aria-label={leading['aria-label']}
89
+ aria-hidden={!leading['aria-label']}
90
+ sx={{
91
+ display: 'flex',
92
+ alignItems: 'center',
93
+ justifyContent: 'center',
94
+ width: '1.5rem',
95
+ height: '1.5rem',
96
+ cursor: disabled ? 'default' : 'grab',
97
+ }}
98
+ >
99
+ <ListIcon size={20} fillColor={palette.grey[500]} />
100
+ </Box>
101
+ )
102
+ }
103
+
104
+ if (leading.type === 'icon') {
105
+ const { icon: Icon } = leading
106
+
107
+ return (
108
+ <Box
109
+ aria-label={leading['aria-label']}
110
+ aria-hidden={!leading['aria-label']}
111
+ sx={{
112
+ display: 'flex',
113
+ alignItems: 'center',
114
+ justifyContent: 'center',
115
+ width: '1.5rem',
116
+ height: '1.5rem',
117
+ }}
118
+ >
119
+ <Icon size={24} fillColor={palette.grey[700]} />
120
+ </Box>
121
+ )
122
+ }
123
+
124
+ if (leading.type === 'avatar') {
125
+ return (
126
+ <Avatar
127
+ src={leading.src}
128
+ alt={leading.alt}
129
+ sx={{
130
+ display: 'flex',
131
+ width: '2rem',
132
+ height: '2rem',
133
+ justifyContent: 'center',
134
+ alignItems: 'center',
135
+ backgroundColor: palette.grey[100],
136
+ color: palette.grey[600],
137
+ fontSize: '0.8125rem',
138
+ fontWeight: 400,
139
+ lineHeight: '1.125rem',
140
+ }}
141
+ >
142
+ {leading.initials}
143
+ </Avatar>
144
+ )
145
+ }
146
+
147
+ if (leading.type === 'index') {
148
+ return (
149
+ <Box
150
+ sx={{
151
+ display: 'flex',
152
+ alignItems: 'center',
153
+ justifyContent: 'center',
154
+ width: '1.5rem',
155
+ height: '1.5rem',
156
+ }}
157
+ >
158
+ <Typography
159
+ variant='body2'
160
+ sx={{ fontSize: '0.9375rem', fontWeight: 400, lineHeight: '1.375rem' }}
161
+ color={palette.grey[600]}
162
+ >
163
+ {leading.index}
164
+ </Typography>
165
+ </Box>
166
+ )
167
+ }
168
+
169
+ if (leading.type === 'checkbox') {
170
+ return (
171
+ <RcSesSimpleCheckbox
172
+ checked={leading.checked}
173
+ disabled={disabled}
174
+ // MUI 9 replaced inputRef/inputProps with the `input` slot.
175
+ slotProps={{
176
+ input: {
177
+ ref: inputRef,
178
+ ...getAccessibleNameProps(leading['aria-label'], titleId),
179
+ ...(expandableId && {
180
+ 'aria-expanded': expanded,
181
+ 'aria-controls': expandableId,
182
+ }),
183
+ },
184
+ }}
185
+ onClick={stop}
186
+ onChange={(e) => {
187
+ stop(e)
188
+ leading.onChange(e.target.checked)
189
+ }}
190
+ sx={{ padding: 0 }}
191
+ />
192
+ )
193
+ }
194
+ // change to RcSesRadio when it is implemented
195
+ if (leading.type === 'radio') {
196
+ return (
197
+ <Radio
198
+ checked={leading.checked}
199
+ disabled={disabled}
200
+ name={leading.name}
201
+ slotProps={{
202
+ input: {
203
+ ref: inputRef,
204
+ ...getAccessibleNameProps(leading['aria-label'], titleId),
205
+ ...(expandableId && {
206
+ 'aria-expanded': expanded,
207
+ 'aria-controls': expandableId,
208
+ }),
209
+ },
210
+ }}
211
+ onClick={stop}
212
+ onChange={(e) => {
213
+ stop(e)
214
+ leading.onChange(e.target.checked)
215
+ }}
216
+ sx={{ padding: 0 }}
217
+ />
218
+ )
219
+ }
220
+
221
+ return null
222
+ }
223
+
224
+ export default AdvancedListItemLeading
@@ -0,0 +1,263 @@
1
+ import { Box, IconButton, Radio, Stack, Typography } from '@mui/material'
2
+ import { useTranslation } from 'react-i18next'
3
+
4
+ import CaretRightBoldIcon from '@/assets/icons/CaretRightBoldIcon'
5
+ import MinusRegularIcon from '@/assets/icons/MinusIcon'
6
+ import PlusRegularIcon from '@/assets/icons/PlusIcon'
7
+ import TrashIcon from '@/assets/icons/TrashIcon'
8
+ import RcSesBadge, { type RcSesBadgeProps } from '@/components/common/Badge'
9
+ import RcSesButton from '@/components/common/Button'
10
+ import RcSesSwitch from '@/components/common/Switch'
11
+ import RcSesSimpleCheckbox from '@/components/form/inputs/SimpleCheckbox'
12
+ import palette from '@/theme/palette'
13
+
14
+ import {
15
+ AdvancedListItemStatusColor,
16
+ AdvancedListItemTrailing as AdvancedListItemTrailingData,
17
+ } from '../AdvancedListItem.types'
18
+
19
+ type Props = {
20
+ trailing: AdvancedListItemTrailingData
21
+ disabled?: boolean
22
+ }
23
+
24
+ const NO_SHRINK_SX = { flexShrink: 0 } as const
25
+
26
+ const STEPPER_BUTTON_SX = {
27
+ padding: '0.5rem 0.25rem',
28
+ borderRadius: '0.375rem',
29
+ } as const
30
+
31
+ const STATUS_VARIANT_MAP: Record<
32
+ AdvancedListItemStatusColor,
33
+ RcSesBadgeProps['variant']
34
+ > = {
35
+ grey: 'neutral',
36
+ warning: 'warning',
37
+ success: 'success',
38
+ error: 'error',
39
+ }
40
+
41
+ const PRICE_BLOCK_SX = {
42
+ display: 'inline-flex',
43
+ flexDirection: 'column',
44
+ justifyContent: 'center',
45
+ alignItems: 'flex-end',
46
+ gap: '0.125rem',
47
+ } as const
48
+
49
+ const ACTION_BUTTON_SX = {
50
+ height: 'auto',
51
+ padding: '0.5rem 0.25rem',
52
+ fontWeight: 500,
53
+ lineHeight: '1.25rem',
54
+ color: palette.primary[700],
55
+ '&:not(.Mui-disabled) svg path': {
56
+ fill: palette.primary[700],
57
+ },
58
+ '.MuiButton-startIcon': {
59
+ marginRight: '0.375rem',
60
+ },
61
+ } as const
62
+
63
+ const stop = (e: React.SyntheticEvent) => e.stopPropagation()
64
+
65
+ const stopAnd = (fn: () => void) => (e: React.SyntheticEvent) => {
66
+ stop(e)
67
+ fn()
68
+ }
69
+
70
+ const withStop =
71
+ <E extends React.SyntheticEvent>(handler: (e: E) => void) =>
72
+ (e: E) => {
73
+ stop(e)
74
+ handler(e)
75
+ }
76
+
77
+ const AdvancedListItemTrailing = ({ trailing, disabled }: Props) => {
78
+ const { t } = useTranslation('common', {
79
+ keyPrefix: 'components.AdvancedListItemTrailing',
80
+ })
81
+
82
+ if (trailing.type === 'actions') {
83
+ return (
84
+ <Stack
85
+ direction='row'
86
+ onClick={stop}
87
+ sx={[
88
+ {
89
+ gap: '0.5rem',
90
+ },
91
+ ...(Array.isArray(NO_SHRINK_SX) ? NO_SHRINK_SX : [NO_SHRINK_SX]),
92
+ ]}
93
+ >
94
+ {trailing.actions.map(
95
+ ({ label, icon: Icon, disabled: actionDisabled, onClick }) => (
96
+ <RcSesButton
97
+ key={label}
98
+ variant='link'
99
+ disabled={disabled || actionDisabled}
100
+ startIcon={Icon ? <Icon size={20} /> : undefined}
101
+ onClick={stopAnd(onClick)}
102
+ sx={ACTION_BUTTON_SX}
103
+ >
104
+ {label}
105
+ </RcSesButton>
106
+ ),
107
+ )}
108
+ </Stack>
109
+ )
110
+ }
111
+
112
+ if (trailing.type === 'toggle') {
113
+ return (
114
+ <RcSesSwitch
115
+ checked={trailing.checked}
116
+ disabled={disabled}
117
+ ariaLabel={trailing['aria-label'] ?? t('toggle')}
118
+ onClick={stop}
119
+ onChange={withStop((e) => trailing.onChange(e.target.checked))}
120
+ />
121
+ )
122
+ }
123
+
124
+ if (trailing.type === 'status') {
125
+ return (
126
+ <RcSesBadge
127
+ label={trailing.label}
128
+ variant={STATUS_VARIANT_MAP[trailing.color ?? 'grey']}
129
+ size='small'
130
+ />
131
+ )
132
+ }
133
+
134
+ if (trailing.type === 'price') {
135
+ return (
136
+ <Stack
137
+ direction='row'
138
+ sx={[
139
+ {
140
+ alignItems: 'center',
141
+ gap: '0.5rem',
142
+ },
143
+ ...(Array.isArray(NO_SHRINK_SX) ? NO_SHRINK_SX : [NO_SHRINK_SX]),
144
+ ]}
145
+ >
146
+ <Box sx={PRICE_BLOCK_SX}>
147
+ <Typography
148
+ variant='body1'
149
+ sx={{ fontSize: '1rem', fontWeight: 600, lineHeight: '1.375rem' }}
150
+ color={palette.grey[900]}
151
+ >
152
+ {trailing.amount}
153
+ </Typography>
154
+ {!!trailing.caption && (
155
+ <Typography
156
+ variant='caption'
157
+ sx={{ fontSize: '0.8125rem', lineHeight: '1.125rem' }}
158
+ color={palette.grey[600]}
159
+ >
160
+ {trailing.caption}
161
+ </Typography>
162
+ )}
163
+ </Box>
164
+ {!!trailing.onDelete && (
165
+ <IconButton
166
+ aria-label={trailing.deleteAriaLabel ?? t('delete')}
167
+ size='small'
168
+ disabled={disabled}
169
+ onClick={stopAnd(() => trailing.onDelete?.())}
170
+ sx={{ padding: '0.5rem 0.25rem' }}
171
+ >
172
+ <TrashIcon size={20} fillColor={palette.grey[700]} />
173
+ </IconButton>
174
+ )}
175
+ </Stack>
176
+ )
177
+ }
178
+
179
+ if (trailing.type === 'checkbox') {
180
+ return (
181
+ <RcSesSimpleCheckbox
182
+ checked={trailing.checked}
183
+ disabled={disabled}
184
+ slotProps={{ input: { 'aria-label': trailing['aria-label'] } }}
185
+ onClick={stop}
186
+ onChange={withStop((e) => trailing.onChange(e.target.checked))}
187
+ sx={{ padding: 0, ...NO_SHRINK_SX }}
188
+ />
189
+ )
190
+ }
191
+ // change to RcSesRadio when it is implemented
192
+ if (trailing.type === 'radio') {
193
+ return (
194
+ <Radio
195
+ checked={trailing.checked}
196
+ disabled={disabled}
197
+ name={trailing.name}
198
+ slotProps={{ input: { 'aria-label': trailing['aria-label'] } }}
199
+ onClick={stop}
200
+ onChange={withStop((e) => trailing.onChange(e.target.checked))}
201
+ sx={{ padding: 0, ...NO_SHRINK_SX }}
202
+ />
203
+ )
204
+ }
205
+
206
+ if (trailing.type === 'chevron') {
207
+ return (
208
+ <Box sx={{ display: 'flex', flexShrink: 0 }} aria-hidden>
209
+ <CaretRightBoldIcon size={16} fillColor={palette.grey[500]} />
210
+ </Box>
211
+ )
212
+ }
213
+
214
+ if (trailing.type === 'stepper') {
215
+ const { value, onChange, min, max } = trailing
216
+ const atMin = min !== undefined && value <= min
217
+ const atMax = max !== undefined && value >= max
218
+
219
+ return (
220
+ <Stack
221
+ direction='row'
222
+ onClick={stop}
223
+ sx={[
224
+ {
225
+ alignItems: 'center',
226
+ gap: '0.25rem',
227
+ },
228
+ ...(Array.isArray(NO_SHRINK_SX) ? NO_SHRINK_SX : [NO_SHRINK_SX]),
229
+ ]}
230
+ >
231
+ <IconButton
232
+ aria-label={t('decrease')}
233
+ size='small'
234
+ disabled={disabled || atMin}
235
+ onClick={stopAnd(() => onChange(value - 1))}
236
+ sx={STEPPER_BUTTON_SX}
237
+ >
238
+ <MinusRegularIcon size={20} fillColor={palette.primary[700]} />
239
+ </IconButton>
240
+ <Typography
241
+ aria-label={trailing['aria-label']}
242
+ variant='body2'
243
+ sx={{ minWidth: '1.5rem', textAlign: 'center', fontWeight: 600 }}
244
+ >
245
+ {value}
246
+ </Typography>
247
+ <IconButton
248
+ aria-label={t('increase')}
249
+ size='small'
250
+ disabled={disabled || atMax}
251
+ onClick={stopAnd(() => onChange(value + 1))}
252
+ sx={STEPPER_BUTTON_SX}
253
+ >
254
+ <PlusRegularIcon size={20} fillColor={palette.primary[700]} />
255
+ </IconButton>
256
+ </Stack>
257
+ )
258
+ }
259
+
260
+ return null
261
+ }
262
+
263
+ export default AdvancedListItemTrailing
@@ -0,0 +1,80 @@
1
+ import { act, renderHook } from '@testing-library/react'
2
+ import { afterEach, describe, expect, test, vi } from 'vitest'
3
+
4
+ import usePrefersReducedMotion from './usePrefersReducedMotion'
5
+
6
+ const QUERY = '(prefers-reduced-motion: reduce)'
7
+
8
+ const createMatchMediaMock = (initialMatches: boolean) => {
9
+ let matches = initialMatches
10
+ const listeners = new Set<() => void>()
11
+
12
+ const mediaQueryList = {
13
+ get matches() {
14
+ return matches
15
+ },
16
+ addEventListener: vi.fn((_event: string, listener: () => void) => {
17
+ listeners.add(listener)
18
+ }),
19
+ removeEventListener: vi.fn((_event: string, listener: () => void) => {
20
+ listeners.delete(listener)
21
+ }),
22
+ }
23
+
24
+ return {
25
+ matchMedia: vi.fn(() => mediaQueryList),
26
+ mediaQueryList,
27
+ setMatches: (next: boolean) => {
28
+ matches = next
29
+ listeners.forEach((listener) => listener())
30
+ },
31
+ }
32
+ }
33
+
34
+ describe('usePrefersReducedMotion', () => {
35
+ afterEach(() => {
36
+ vi.unstubAllGlobals()
37
+ })
38
+
39
+ test('reflects the current matchMedia value on mount', () => {
40
+ const { matchMedia } = createMatchMediaMock(true)
41
+ vi.stubGlobal('matchMedia', matchMedia)
42
+
43
+ const { result } = renderHook(() => usePrefersReducedMotion())
44
+
45
+ expect(result.current).toBe(true)
46
+ expect(matchMedia).toHaveBeenCalledWith(QUERY)
47
+ })
48
+
49
+ test('updates when the OS-level preference changes', () => {
50
+ const { matchMedia, setMatches } = createMatchMediaMock(false)
51
+ vi.stubGlobal('matchMedia', matchMedia)
52
+
53
+ const { result } = renderHook(() => usePrefersReducedMotion())
54
+ expect(result.current).toBe(false)
55
+
56
+ act(() => setMatches(true))
57
+
58
+ expect(result.current).toBe(true)
59
+ })
60
+
61
+ test('unsubscribes the change listener on unmount', () => {
62
+ const { matchMedia, mediaQueryList } = createMatchMediaMock(false)
63
+ vi.stubGlobal('matchMedia', matchMedia)
64
+
65
+ const { unmount } = renderHook(() => usePrefersReducedMotion())
66
+ expect(mediaQueryList.addEventListener).toHaveBeenCalledTimes(1)
67
+
68
+ unmount()
69
+
70
+ expect(mediaQueryList.removeEventListener).toHaveBeenCalledTimes(1)
71
+ })
72
+
73
+ test('falls back to false when matchMedia is unsupported (SSR-safe)', () => {
74
+ vi.stubGlobal('matchMedia', undefined)
75
+
76
+ const { result } = renderHook(() => usePrefersReducedMotion())
77
+
78
+ expect(result.current).toBe(false)
79
+ })
80
+ })
@@ -0,0 +1,28 @@
1
+ import { useEffect, useState } from 'react'
2
+
3
+ const QUERY = '(prefers-reduced-motion: reduce)'
4
+
5
+ const supportsMatchMedia = () =>
6
+ typeof window !== 'undefined' && typeof window.matchMedia === 'function'
7
+
8
+ const usePrefersReducedMotion = () => {
9
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(
10
+ () => supportsMatchMedia() && window.matchMedia(QUERY).matches,
11
+ )
12
+
13
+ useEffect(() => {
14
+ if (!supportsMatchMedia()) {
15
+ return undefined
16
+ }
17
+
18
+ const mediaQueryList = window.matchMedia(QUERY)
19
+ const listener = () => setPrefersReducedMotion(mediaQueryList.matches)
20
+
21
+ mediaQueryList.addEventListener('change', listener)
22
+ return () => mediaQueryList.removeEventListener('change', listener)
23
+ }, [])
24
+
25
+ return prefersReducedMotion
26
+ }
27
+
28
+ export default usePrefersReducedMotion