@databiosphere/findable-ui 41.2.0 → 42.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (464) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +25 -0
  3. package/lib/components/DataDictionary/components/Description/description.styles.d.ts +1 -1
  4. package/lib/components/DataDictionary/components/Description/description.styles.js +5 -5
  5. package/lib/components/DataDictionary/components/Entity/entity.js +2 -2
  6. package/lib/components/DataDictionary/components/Entity/entity.styles.js +2 -2
  7. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.d.ts +1 -1
  8. package/lib/components/DataDictionary/components/Filters/filters.styles.d.ts +1 -1
  9. package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.js +2 -2
  10. package/lib/components/DataDictionary/components/Layout/components/TitleLayout/titleLayout.styles.js +2 -2
  11. package/lib/components/DataDictionary/components/Outline/outline.styles.js +4 -4
  12. package/lib/components/DataDictionary/components/Table/table.styles.d.ts +1 -1
  13. package/lib/components/DataDictionary/components/Title/title.styles.d.ts +1 -1
  14. package/lib/components/DataDictionary/components/Tooltip/components/Title/constants.d.ts +1 -2
  15. package/lib/components/DataDictionary/components/Tooltip/components/Title/constants.js +0 -4
  16. package/lib/components/DataDictionary/components/Tooltip/components/Title/title.js +4 -4
  17. package/lib/components/DataDictionary/components/Tooltip/constants.js +8 -7
  18. package/lib/components/DataDictionary/dataDictionary.styles.js +2 -2
  19. package/lib/components/Detail/components/Table/table.js +2 -3
  20. package/lib/components/Error/error.js +4 -3
  21. package/lib/components/Error/error.styles.js +4 -4
  22. package/lib/components/Export/components/ExportForm/exportForm.styles.d.ts +3 -3
  23. package/lib/components/Export/components/ExportForm/exportForm.styles.js +11 -11
  24. package/lib/components/Export/components/ExportMethod/exportMethod.js +4 -3
  25. package/lib/components/Export/components/ExportMethod/exportMethod.styles.d.ts +0 -4
  26. package/lib/components/Export/components/ExportMethod/exportMethod.styles.js +0 -6
  27. package/lib/components/Export/components/ExportSummary/exportSummary.styles.js +6 -5
  28. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/FormStep/formStep.js +5 -3
  29. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/FormStep/formStep.styles.js +1 -1
  30. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.js +2 -2
  31. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.styles.js +10 -10
  32. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.styles.js +7 -7
  33. package/lib/components/Export/export.styles.d.ts +1 -1
  34. package/lib/components/Export/export.styles.js +6 -6
  35. package/lib/components/Filter/components/ClearAllFilters/clearAllFilters.styles.d.ts +1 -1
  36. package/lib/components/Filter/components/FilterCountChip/filterCountChip.styles.d.ts +1 -1
  37. package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +1 -1
  38. package/lib/components/Filter/components/FilterLabel/filterLabel.styles.js +2 -3
  39. package/lib/components/Filter/components/FilterList/filterList.styles.d.ts +1 -1
  40. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.styles.js +2 -2
  41. package/lib/components/Filter/components/FilterNoResultsFound/filterNoResultsFound.js +3 -2
  42. package/lib/components/Filter/components/FilterRange/filterRange.styles.js +2 -2
  43. package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +1 -1
  44. package/lib/components/Filter/components/FilterTag/filterTag.styles.js +2 -1
  45. package/lib/components/Filter/components/Filters/filters.js +1 -1
  46. package/lib/components/Filter/components/Filters/filters.styles.d.ts +1 -1
  47. package/lib/components/Filter/components/Filters/filters.styles.js +4 -4
  48. package/lib/components/Filter/components/HighlightedLabel/highlightedLabel.styles.js +2 -1
  49. package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.js +4 -4
  50. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.js +7 -8
  51. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.js +2 -2
  52. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.js +5 -6
  53. package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.styles.js +2 -2
  54. package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.js +3 -4
  55. package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.js +3 -3
  56. package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.js +2 -2
  57. package/lib/components/Filter/components/controls/Controls/controls.js +1 -1
  58. package/lib/components/Filter/components/controls/Controls/controls.styles.d.ts +1 -1
  59. package/lib/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.styles.d.ts +1 -1
  60. package/lib/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.styles.js +2 -2
  61. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.styles.d.ts +1 -1
  62. package/lib/components/Filter/components/views/select/components/ListItemButton/listItemButton.d.ts +1 -1
  63. package/lib/components/Filter/components/views/select/components/ListItemButton/listItemButton.styles.d.ts +1 -1
  64. package/lib/components/Filter/components/views/select/components/ListItemText/components/Count/count.js +1 -1
  65. package/lib/components/Filter/components/views/select/components/ListItemText/components/Term/term.js +1 -1
  66. package/lib/components/Index/components/EntityView/components/controls/ExportButton/exportButton.styles.js +2 -2
  67. package/lib/components/Index/components/EntityView/components/controls/FilterButton/filterButton.styles.d.ts +1 -1
  68. package/lib/components/Index/components/EntityView/components/controls/FilterButton/filterButton.styles.js +2 -2
  69. package/lib/components/Index/components/EntityView/components/layout/Summary/summary.js +2 -2
  70. package/lib/components/Index/components/EntityView/components/layout/Summary/summary.styles.d.ts +1 -1
  71. package/lib/components/Index/components/EntityView/components/layout/Summary/summary.styles.js +2 -1
  72. package/lib/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.styles.d.ts +1 -1
  73. package/lib/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.styles.js +2 -2
  74. package/lib/components/Index/components/EntityView/components/views/ChartView/chartView.js +1 -1
  75. package/lib/components/Index/components/EntityView/components/views/ChartView/chartView.styles.d.ts +1 -1
  76. package/lib/components/Index/components/EntityView/components/views/ChartView/components/Chart/chart.styles.d.ts +1 -1
  77. package/lib/components/Index/components/EntityView/components/views/ChartView/components/Chart/chart.styles.js +4 -4
  78. package/lib/components/Index/index.styles.d.ts +4 -4
  79. package/lib/components/Index/index.styles.js +2 -2
  80. package/lib/components/Layout/components/BackPage/backPageView.styles.js +11 -10
  81. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.styles.js +3 -3
  82. package/lib/components/Layout/components/BackPage/components/BackPageHero/components/Actions/actions.styles.js +2 -2
  83. package/lib/components/Layout/components/BackPage/components/BackPageHero/components/SubTitle/subTitle.js +2 -2
  84. package/lib/components/Layout/components/ContentLayout/contentLayout.styles.js +18 -19
  85. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.js +2 -2
  86. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.d.ts +1 -1
  87. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js +2 -2
  88. package/lib/components/Layout/components/Footer/footer.styles.js +8 -8
  89. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +4 -4
  90. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.js +2 -1
  91. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/Button/button.styles.d.ts +1 -1
  92. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Content/components/Navigation/navigation.styles.js +3 -3
  93. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/Button/button.styles.d.ts +1 -1
  94. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.js +4 -4
  95. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.styles.js +6 -5
  96. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.styles.d.ts +1 -1
  97. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.styles.js +7 -7
  98. package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenuItems/navigationMenuItems.js +5 -5
  99. package/lib/components/Layout/components/Header/components/Content/components/Navigation/navigation.styles.js +2 -2
  100. package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.js +2 -2
  101. package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.d.ts +1 -1
  102. package/lib/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.js +4 -4
  103. package/lib/components/Layout/components/Header/header.styles.js +2 -2
  104. package/lib/components/Layout/components/Nav/components/NavBarHero/navBarHero.styles.js +2 -1
  105. package/lib/components/Layout/components/Nav/nav.styles.d.ts +1 -1
  106. package/lib/components/Layout/components/Nav/nav.styles.js +8 -6
  107. package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +1 -1
  108. package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.js +5 -4
  109. package/lib/components/Layout/components/Outline/outline.styles.d.ts +2 -2
  110. package/lib/components/Layout/components/Outline/outline.styles.js +8 -8
  111. package/lib/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.styles.js +6 -6
  112. package/lib/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.styles.js +5 -5
  113. package/lib/components/Layout/components/Sidebar/components/SidebarLabel/sidebarLabel.js +2 -2
  114. package/lib/components/Layout/components/Sidebar/components/SidebarPositioner/sidebarPositioner.styles.js +2 -2
  115. package/lib/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.js +2 -2
  116. package/lib/components/Layout/components/Sidebar/sidebar.js +4 -5
  117. package/lib/components/Layout/components/Sidebar/sidebar.styles.js +2 -2
  118. package/lib/components/Links/components/Link/link.js +2 -1
  119. package/lib/components/Loading/loading.js +2 -1
  120. package/lib/components/Loading/loading.styles.js +2 -2
  121. package/lib/components/Login/components/Button/button.styles.d.ts +1 -1
  122. package/lib/components/Login/components/Section/components/Consent/consent.js +2 -2
  123. package/lib/components/Login/components/Section/components/Consent/consent.styles.d.ts +1 -1
  124. package/lib/components/Login/components/Section/components/Consent/consent.styles.js +1 -1
  125. package/lib/components/Login/components/Section/components/Warning/warning.js +1 -1
  126. package/lib/components/Login/login.js +6 -5
  127. package/lib/components/Login/login.styles.d.ts +2 -12
  128. package/lib/components/Login/login.styles.js +4 -13
  129. package/lib/components/MarkdownRenderer/components/Table/table.styles.js +2 -2
  130. package/lib/components/MarkdownRenderer/markdownRenderer.js +1 -1
  131. package/lib/components/NoResults/noResults.js +1 -1
  132. package/lib/components/NoResults/noResults.styles.js +2 -2
  133. package/lib/components/Project/components/Contacts/contacts.js +2 -1
  134. package/lib/components/Project/components/Details/details.js +3 -2
  135. package/lib/components/Project/components/SupplementaryLinks/supplementaryLinks.styles.js +2 -1
  136. package/lib/components/Stepper/components/Step/components/StepContent/stepContent.styles.js +2 -2
  137. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.d.ts +1 -1
  138. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.js +3 -3
  139. package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.js +5 -5
  140. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/constants.js +1 -1
  141. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.d.ts +1 -1
  142. package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.js +1 -1
  143. package/lib/components/Stepper/components/Step/step.styles.d.ts +1 -1
  144. package/lib/components/Stepper/components/Step/step.styles.js +5 -5
  145. package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.d.ts +1 -1
  146. package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +5 -6
  147. package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.js +2 -2
  148. package/lib/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.styles.js +2 -2
  149. package/lib/components/Support/components/SupportRequest/components/SupportRequestSubmitted/supportRequestSubmitted.js +3 -3
  150. package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +6 -6
  151. package/lib/components/Table/common/gridTable.styles.js +1 -2
  152. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.styles.d.ts +1 -1
  153. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.styles.js +2 -2
  154. package/lib/components/Table/components/PaginationSummary/paginationSummary.js +5 -4
  155. package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.js +3 -2
  156. package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.styles.d.ts +1 -1
  157. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.js +2 -2
  158. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.js +5 -5
  159. package/lib/components/Table/components/TableCell/components/LinkCell/stories/args.js +1 -1
  160. package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.js +2 -2
  161. package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.js +1 -1
  162. package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.d.ts +1 -1
  163. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.d.ts +1 -1
  164. package/lib/components/Table/components/TablePagination/tablePagination.js +1 -1
  165. package/lib/components/Table/components/TablePagination/tablePagination.styles.d.ts +1 -1
  166. package/lib/components/Table/components/TableRow/tableRow.styles.js +2 -2
  167. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.js +2 -2
  168. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.js +5 -5
  169. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.js +2 -2
  170. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.js +5 -5
  171. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.js +2 -2
  172. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.js +1 -1
  173. package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.js +2 -2
  174. package/lib/components/Table/table.js +2 -3
  175. package/lib/components/Table/table.styles.js +2 -2
  176. package/lib/components/common/Accordion/accordion.js +2 -2
  177. package/lib/components/common/Alert/alert.styles.js +3 -3
  178. package/lib/components/common/Banner/banner.styles.js +4 -4
  179. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.js +4 -4
  180. package/lib/components/common/Button/components/DropdownButton/dropdownButton.styles.d.ts +1 -1
  181. package/lib/components/common/Button/components/HelpIconButton/helpIconButton.styles.js +2 -1
  182. package/lib/components/common/Button/components/NavigationButton/navigationButton.styles.js +5 -4
  183. package/lib/components/common/Card/card.styles.js +2 -2
  184. package/lib/components/common/Card/components/CardActions/cardActions.styles.js +2 -2
  185. package/lib/components/common/Card/components/CardSecondaryText/cardSecondaryText.d.ts +2 -5
  186. package/lib/components/common/Card/components/CardSecondaryText/cardSecondaryText.js +3 -3
  187. package/lib/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.d.ts +2 -5
  188. package/lib/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.js +4 -4
  189. package/lib/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.styles.d.ts +2 -2
  190. package/lib/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.styles.js +1 -1
  191. package/lib/components/common/Card/components/CardText/cardText.d.ts +2 -5
  192. package/lib/components/common/Card/components/CardText/cardText.js +3 -3
  193. package/lib/components/common/Card/components/CardTitle/cardTitle.d.ts +2 -5
  194. package/lib/components/common/Card/components/CardTitle/cardTitle.js +3 -3
  195. package/lib/components/common/Code/code.styles.js +10 -9
  196. package/lib/components/common/Dot/dot.styles.js +2 -1
  197. package/lib/components/common/Form/components/Input/input.js +2 -2
  198. package/lib/components/common/Form/components/Input/input.styles.d.ts +1 -1
  199. package/lib/components/common/Form/components/Input/input.styles.js +4 -4
  200. package/lib/components/common/Form/components/Select/select.js +2 -2
  201. package/lib/components/common/Form/components/Select/select.styles.d.ts +1 -1
  202. package/lib/components/common/Form/components/Select/select.styles.js +3 -3
  203. package/lib/components/common/Form/components/UploadFile/uploadFile.js +3 -3
  204. package/lib/components/common/Form/components/UploadFile/uploadFile.styles.d.ts +1 -1
  205. package/lib/components/common/Form/components/UploadFile/uploadFile.styles.js +10 -10
  206. package/lib/components/common/IconBadge/iconBadge.styles.js +13 -13
  207. package/lib/components/common/IconButton/iconButton.styles.d.ts +1 -1
  208. package/lib/components/common/IconButton/iconButton.styles.js +3 -3
  209. package/lib/components/common/Input/input.js +2 -2
  210. package/lib/components/common/Input/input.styles.d.ts +1 -1
  211. package/lib/components/common/Input/input.styles.js +3 -2
  212. package/lib/components/common/KeyValuePairs/components/KeyElType/keyElType.js +1 -1
  213. package/lib/components/common/KeyValuePairs/components/ValueElType/valueElType.js +1 -1
  214. package/lib/components/common/LoginDialog/constants.js +2 -2
  215. package/lib/components/common/MDXMarkdown/components/Section/mdxSection.styles.js +4 -4
  216. package/lib/components/common/Paper/components/FlatPaper/flatPaper.styles.d.ts +1 -1
  217. package/lib/components/common/Paper/components/FluidPaper/fluidPaper.styles.d.ts +1 -1
  218. package/lib/components/common/Paper/components/FluidPaper/fluidPaper.styles.js +2 -2
  219. package/lib/components/common/Paper/components/RoundedPaper/roundedPaper.styles.d.ts +1 -1
  220. package/lib/components/common/Paper/paper.styles.js +24 -24
  221. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.js +6 -6
  222. package/lib/components/common/Section/components/CollapsableSection/collapsableSection.js +8 -8
  223. package/lib/components/common/Section/components/CollapsableSection/collapsableSection.styles.d.ts +1 -1
  224. package/lib/components/common/Section/components/CollapsableSection/collapsableSection.styles.js +6 -5
  225. package/lib/components/common/Section/components/SectionTitle/sectionTitle.js +2 -1
  226. package/lib/components/common/Section/section.styles.d.ts +1 -1
  227. package/lib/components/common/Section/section.styles.js +4 -4
  228. package/lib/components/common/Socials/socials.styles.js +3 -3
  229. package/lib/components/common/StatusIcon/statusIcon.styles.js +13 -12
  230. package/lib/components/common/Tabs/tabs.styles.d.ts +1 -1
  231. package/lib/components/common/Tag/tag.d.ts +3 -6
  232. package/lib/components/common/Tag/tag.js +3 -2
  233. package/lib/components/common/Tag/tag.stories.d.ts +1 -1
  234. package/lib/components/common/Tag/tag.styles.d.ts +10 -2
  235. package/lib/components/common/Tag/tag.styles.js +4 -3
  236. package/lib/components/common/Title/title.js +1 -1
  237. package/lib/components/common/Typography/TypographyWordBreak/TypographyWordBreak.js +2 -1
  238. package/lib/styles/common/constants/app.d.ts +3 -0
  239. package/lib/styles/common/constants/app.js +3 -0
  240. package/lib/styles/common/constants/colorMixes.d.ts +1 -0
  241. package/lib/styles/common/constants/colorMixes.js +1 -0
  242. package/lib/styles/common/constants/font.d.ts +18 -0
  243. package/lib/styles/common/constants/font.js +18 -0
  244. package/lib/styles/common/constants/palette.d.ts +45 -45
  245. package/lib/styles/common/constants/palette.js +45 -45
  246. package/lib/styles/common/constants/shadows.js +3 -3
  247. package/lib/styles/common/mixins/breakpoints.d.ts +9 -7
  248. package/lib/styles/common/mixins/breakpoints.js +8 -7
  249. package/lib/styles/common/mui/typography.d.ts +32 -3
  250. package/lib/styles/common/mui/typography.js +22 -10
  251. package/lib/theme/common/breakpoints.d.ts +6 -27
  252. package/lib/theme/common/breakpoints.js +14 -36
  253. package/lib/theme/common/components.d.ts +2 -226
  254. package/lib/theme/common/components.js +1045 -1223
  255. package/lib/theme/common/fontStyles.d.ts +8 -0
  256. package/lib/theme/common/fontStyles.js +12 -0
  257. package/lib/theme/common/palette.d.ts +2 -42
  258. package/lib/theme/common/palette.js +22 -73
  259. package/lib/theme/common/typography.d.ts +2 -70
  260. package/lib/theme/common/typography.js +78 -126
  261. package/lib/theme/components/muiAlert.d.ts +2 -2
  262. package/lib/theme/components/muiAlert.js +95 -96
  263. package/lib/theme/components/muiAlertTitle.js +2 -2
  264. package/lib/theme/components/muiTableCell.d.ts +2 -2
  265. package/lib/theme/components/muiTableCell.js +43 -46
  266. package/lib/theme/theme.d.ts +0 -7
  267. package/lib/theme/theme.js +22 -100
  268. package/lib/theme/types.d.ts +4 -0
  269. package/lib/theme/types.js +1 -0
  270. package/package.json +1 -1
  271. package/src/components/DataDictionary/components/Description/description.styles.ts +5 -8
  272. package/src/components/DataDictionary/components/Entity/entity.styles.ts +2 -2
  273. package/src/components/DataDictionary/components/Entity/entity.tsx +2 -2
  274. package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.ts +2 -2
  275. package/src/components/DataDictionary/components/Layout/components/TitleLayout/titleLayout.styles.ts +2 -2
  276. package/src/components/DataDictionary/components/Outline/outline.styles.ts +4 -8
  277. package/src/components/DataDictionary/components/Tooltip/components/Title/constants.ts +1 -6
  278. package/src/components/DataDictionary/components/Tooltip/components/Title/title.tsx +8 -4
  279. package/src/components/DataDictionary/components/Tooltip/constants.ts +8 -7
  280. package/src/components/DataDictionary/dataDictionary.styles.ts +2 -5
  281. package/src/components/Detail/components/Table/table.tsx +2 -3
  282. package/src/components/Error/error.styles.ts +4 -4
  283. package/src/components/Error/error.tsx +10 -3
  284. package/src/components/Export/components/ExportForm/exportForm.styles.ts +12 -12
  285. package/src/components/Export/components/ExportMethod/exportMethod.styles.ts +0 -7
  286. package/src/components/Export/components/ExportMethod/exportMethod.tsx +14 -3
  287. package/src/components/Export/components/ExportSummary/exportSummary.styles.ts +6 -5
  288. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/FormStep/formStep.styles.ts +1 -1
  289. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/FormStep/formStep.tsx +9 -8
  290. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.styles.ts +10 -15
  291. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/terraSetUpForm.tsx +5 -2
  292. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.styles.ts +7 -7
  293. package/src/components/Export/export.styles.ts +7 -7
  294. package/src/components/Filter/components/FilterLabel/filterLabel.styles.ts +2 -3
  295. package/src/components/Filter/components/FilterMenuSearch/filterMenuSearch.styles.ts +2 -2
  296. package/src/components/Filter/components/FilterNoResultsFound/filterNoResultsFound.tsx +4 -3
  297. package/src/components/Filter/components/FilterRange/filterRange.styles.ts +2 -2
  298. package/src/components/Filter/components/FilterTag/filterTag.styles.ts +2 -1
  299. package/src/components/Filter/components/Filters/filters.styles.ts +4 -4
  300. package/src/components/Filter/components/Filters/filters.tsx +1 -1
  301. package/src/components/Filter/components/HighlightedLabel/highlightedLabel.styles.ts +2 -1
  302. package/src/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.ts +4 -4
  303. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.tsx +7 -11
  304. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.tsx +3 -3
  305. package/src/components/Filter/components/SearchAllFilters/searchAllFilters.styles.ts +2 -2
  306. package/src/components/Filter/components/SearchAllFilters/searchAllFilters.tsx +7 -8
  307. package/src/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.tsx +3 -7
  308. package/src/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.ts +3 -3
  309. package/src/components/Filter/components/VariableSizeListItem/variableSizeListItem.tsx +3 -3
  310. package/src/components/Filter/components/controls/Controls/controls.tsx +1 -1
  311. package/src/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.styles.ts +2 -2
  312. package/src/components/Filter/components/views/select/components/ListItemText/components/Count/count.tsx +1 -1
  313. package/src/components/Filter/components/views/select/components/ListItemText/components/Term/term.tsx +1 -1
  314. package/src/components/Index/components/EntityView/components/controls/ExportButton/exportButton.styles.ts +2 -2
  315. package/src/components/Index/components/EntityView/components/controls/FilterButton/filterButton.styles.ts +2 -2
  316. package/src/components/Index/components/EntityView/components/layout/Summary/summary.styles.ts +2 -1
  317. package/src/components/Index/components/EntityView/components/layout/Summary/summary.tsx +2 -2
  318. package/src/components/Index/components/EntityView/components/slots/EntityViewSlot/entityViewSlot.styles.ts +2 -2
  319. package/src/components/Index/components/EntityView/components/views/ChartView/chartView.tsx +1 -1
  320. package/src/components/Index/components/EntityView/components/views/ChartView/components/Chart/chart.styles.ts +4 -4
  321. package/src/components/Index/index.styles.ts +2 -2
  322. package/src/components/Layout/components/BackPage/backPageView.styles.ts +11 -10
  323. package/src/components/Layout/components/BackPage/components/BackPageHero/backPageHero.styles.ts +3 -3
  324. package/src/components/Layout/components/BackPage/components/BackPageHero/components/Actions/actions.styles.ts +2 -2
  325. package/src/components/Layout/components/BackPage/components/BackPageHero/components/SubTitle/subTitle.tsx +6 -2
  326. package/src/components/Layout/components/ContentLayout/contentLayout.styles.ts +20 -36
  327. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.tsx +5 -2
  328. package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.ts +2 -2
  329. package/src/components/Layout/components/Footer/footer.styles.ts +8 -8
  330. package/src/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.ts +2 -1
  331. package/src/components/Layout/components/Header/components/Content/components/Actions/components/Menu/components/Content/components/Navigation/navigation.styles.ts +3 -6
  332. package/src/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchBar/searchBar.styles.ts +4 -7
  333. package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationDrawer/navigationDrawer.styles.ts +6 -8
  334. package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.styles.ts +8 -12
  335. package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenuItems/navigationMenuItems.tsx +5 -10
  336. package/src/components/Layout/components/Header/components/Content/components/Navigation/navigation.styles.ts +2 -2
  337. package/src/components/Layout/components/Header/components/Content/components/Slogan/slogan.styles.ts +4 -4
  338. package/src/components/Layout/components/Header/components/Content/components/Slogan/slogan.tsx +5 -2
  339. package/src/components/Layout/components/Header/header.styles.ts +2 -2
  340. package/src/components/Layout/components/Nav/components/NavBarHero/navBarHero.styles.ts +2 -1
  341. package/src/components/Layout/components/Nav/nav.styles.ts +8 -10
  342. package/src/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.ts +5 -4
  343. package/src/components/Layout/components/Outline/outline.styles.ts +10 -13
  344. package/src/components/Layout/components/Sidebar/components/SidebarButton/sidebarButton.styles.ts +7 -10
  345. package/src/components/Layout/components/Sidebar/components/SidebarDrawer/sidebarDrawer.styles.ts +5 -8
  346. package/src/components/Layout/components/Sidebar/components/SidebarLabel/sidebarLabel.tsx +5 -2
  347. package/src/components/Layout/components/Sidebar/components/SidebarPositioner/sidebarPositioner.styles.ts +2 -2
  348. package/src/components/Layout/components/Sidebar/components/SidebarTools/sidebarTools.styles.ts +2 -2
  349. package/src/components/Layout/components/Sidebar/sidebar.styles.ts +2 -2
  350. package/src/components/Layout/components/Sidebar/sidebar.tsx +4 -8
  351. package/src/components/Links/components/Link/link.tsx +2 -1
  352. package/src/components/Loading/loading.styles.ts +2 -2
  353. package/src/components/Loading/loading.tsx +6 -1
  354. package/src/components/Login/components/Section/components/Consent/consent.styles.ts +1 -1
  355. package/src/components/Login/components/Section/components/Consent/consent.tsx +4 -2
  356. package/src/components/Login/components/Section/components/Warning/warning.tsx +1 -1
  357. package/src/components/Login/login.styles.ts +5 -19
  358. package/src/components/Login/login.tsx +30 -7
  359. package/src/components/MarkdownRenderer/components/Table/table.styles.ts +2 -2
  360. package/src/components/MarkdownRenderer/markdownRenderer.tsx +1 -1
  361. package/src/components/NoResults/noResults.styles.ts +2 -2
  362. package/src/components/NoResults/noResults.tsx +1 -1
  363. package/src/components/Project/components/Contacts/contacts.tsx +7 -1
  364. package/src/components/Project/components/Details/details.tsx +7 -2
  365. package/src/components/Project/components/SupplementaryLinks/supplementaryLinks.styles.ts +2 -1
  366. package/src/components/Stepper/components/Step/components/StepContent/stepContent.styles.ts +2 -2
  367. package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.ts +3 -6
  368. package/src/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.ts +5 -9
  369. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/constants.ts +1 -1
  370. package/src/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.ts +1 -1
  371. package/src/components/Stepper/components/Step/step.styles.ts +6 -6
  372. package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +5 -6
  373. package/src/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.styles.ts +2 -2
  374. package/src/components/Support/components/SupportRequest/components/SupportRequestForm/supportRequestForm.tsx +5 -2
  375. package/src/components/Support/components/SupportRequest/components/SupportRequestSubmitted/supportRequestSubmitted.tsx +8 -6
  376. package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +6 -10
  377. package/src/components/Table/common/gridTable.styles.ts +1 -2
  378. package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.styles.ts +2 -2
  379. package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +9 -4
  380. package/src/components/Table/components/TableCell/components/BasicCell/basicCell.tsx +10 -2
  381. package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.ts +5 -5
  382. package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.tsx +3 -3
  383. package/src/components/Table/components/TableCell/components/LinkCell/stories/args.ts +1 -1
  384. package/src/components/Table/components/TableCell/components/NTagCell/nTagCell.tsx +6 -3
  385. package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.tsx +1 -1
  386. package/src/components/Table/components/TablePagination/tablePagination.tsx +1 -1
  387. package/src/components/Table/components/TableRow/tableRow.styles.ts +2 -2
  388. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.ts +5 -5
  389. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.tsx +6 -2
  390. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.ts +6 -6
  391. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.tsx +3 -3
  392. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.ts +1 -1
  393. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.tsx +5 -2
  394. package/src/components/Table/components/TableToolbar/components/RowSelection/rowSelection.tsx +2 -2
  395. package/src/components/Table/table.styles.ts +2 -2
  396. package/src/components/Table/table.tsx +2 -3
  397. package/src/components/common/Accordion/accordion.tsx +4 -2
  398. package/src/components/common/Alert/alert.styles.ts +3 -6
  399. package/src/components/common/Banner/banner.styles.ts +4 -4
  400. package/src/components/common/Banner/components/CookieBanner/cookieBanner.styles.ts +4 -4
  401. package/src/components/common/Button/components/HelpIconButton/helpIconButton.styles.ts +2 -1
  402. package/src/components/common/Button/components/NavigationButton/navigationButton.styles.ts +5 -4
  403. package/src/components/common/Card/card.styles.ts +2 -2
  404. package/src/components/common/Card/components/CardActions/cardActions.styles.ts +2 -2
  405. package/src/components/common/Card/components/CardSecondaryText/cardSecondaryText.tsx +7 -16
  406. package/src/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.styles.ts +1 -1
  407. package/src/components/common/Card/components/CardSecondaryTitle/cardSecondaryTitle.tsx +9 -17
  408. package/src/components/common/Card/components/CardText/cardText.tsx +8 -14
  409. package/src/components/common/Card/components/CardTitle/cardTitle.tsx +9 -14
  410. package/src/components/common/Code/code.styles.ts +11 -10
  411. package/src/components/common/Dot/dot.styles.ts +2 -1
  412. package/src/components/common/Form/components/Input/input.styles.ts +4 -4
  413. package/src/components/common/Form/components/Input/input.tsx +6 -2
  414. package/src/components/common/Form/components/Select/select.styles.ts +3 -3
  415. package/src/components/common/Form/components/Select/select.tsx +6 -2
  416. package/src/components/common/Form/components/UploadFile/uploadFile.styles.ts +10 -17
  417. package/src/components/common/Form/components/UploadFile/uploadFile.tsx +7 -3
  418. package/src/components/common/IconBadge/iconBadge.styles.ts +13 -22
  419. package/src/components/common/IconButton/iconButton.styles.ts +3 -3
  420. package/src/components/common/Input/input.styles.ts +3 -2
  421. package/src/components/common/Input/input.tsx +6 -2
  422. package/src/components/common/KeyValuePairs/components/KeyElType/keyElType.tsx +1 -1
  423. package/src/components/common/KeyValuePairs/components/ValueElType/valueElType.tsx +1 -1
  424. package/src/components/common/LoginDialog/constants.ts +2 -2
  425. package/src/components/common/MDXMarkdown/components/Section/mdxSection.styles.ts +4 -8
  426. package/src/components/common/Paper/components/FluidPaper/fluidPaper.styles.ts +2 -2
  427. package/src/components/common/Paper/paper.styles.ts +24 -24
  428. package/src/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.ts +6 -12
  429. package/src/components/common/Section/components/CollapsableSection/collapsableSection.styles.ts +6 -5
  430. package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +11 -8
  431. package/src/components/common/Section/components/SectionTitle/sectionTitle.tsx +3 -2
  432. package/src/components/common/Section/section.styles.ts +5 -5
  433. package/src/components/common/Socials/socials.styles.ts +3 -3
  434. package/src/components/common/StatusIcon/statusIcon.styles.ts +13 -12
  435. package/src/components/common/Tag/tag.styles.ts +4 -3
  436. package/src/components/common/Tag/tag.tsx +14 -11
  437. package/src/components/common/Title/title.tsx +1 -1
  438. package/src/components/common/Typography/TypographyWordBreak/TypographyWordBreak.tsx +2 -1
  439. package/src/styles/common/constants/app.ts +3 -0
  440. package/src/styles/common/constants/colorMixes.ts +1 -0
  441. package/src/styles/common/constants/font.ts +18 -0
  442. package/src/styles/common/constants/palette.ts +45 -45
  443. package/src/styles/common/constants/shadows.ts +3 -3
  444. package/src/styles/common/mixins/breakpoints.ts +19 -14
  445. package/src/styles/common/mui/typography.ts +26 -14
  446. package/src/theme/common/breakpoints.ts +16 -38
  447. package/src/theme/common/components.ts +1046 -1249
  448. package/src/theme/common/fontStyles.ts +17 -0
  449. package/src/theme/common/palette.ts +30 -75
  450. package/src/theme/common/typography.ts +85 -147
  451. package/src/theme/components/muiAlert.ts +96 -97
  452. package/src/theme/components/muiAlertTitle.ts +2 -2
  453. package/src/theme/components/muiTableCell.ts +44 -47
  454. package/src/theme/theme.ts +25 -107
  455. package/src/theme/types.ts +5 -0
  456. package/tests/theme.test.ts +465 -0
  457. package/tests/tsconfig.json +1 -1
  458. package/types/data-explorer-ui.d.ts +73 -48
  459. package/lib/styles/common/mixins/colors.d.ts +0 -25
  460. package/lib/styles/common/mixins/colors.js +0 -32
  461. package/lib/styles/common/mixins/fonts.d.ts +0 -16
  462. package/lib/styles/common/mixins/fonts.js +0 -30
  463. package/src/styles/common/mixins/colors.ts +0 -71
  464. package/src/styles/common/mixins/fonts.ts +0 -52
@@ -0,0 +1,465 @@
1
+ import {
2
+ createTheme,
3
+ CssVarsTheme,
4
+ Palette,
5
+ PaletteColor,
6
+ Theme,
7
+ ThemeOptions,
8
+ ThemeVars,
9
+ TypographyStyle,
10
+ } from "@mui/material";
11
+ import { components as componentsValues } from "../src/theme/common/components";
12
+ import { palette as paletteValues } from "../src/theme/common/palette";
13
+ import { typography as typographyValues } from "../src/theme/common/typography";
14
+ import { createAppTheme } from "../src/theme/theme";
15
+
16
+ type GenericRecord<T = unknown> = Record<string, T>;
17
+
18
+ const CUSTOM_BODY_400: TypographyStyle = {
19
+ fontSize: "80px",
20
+ };
21
+
22
+ const CUSTOM_BREAKPOINTS = {
23
+ values: {
24
+ lg: 1280,
25
+ md: 1024,
26
+ sm: 600,
27
+ xl: 1600,
28
+ xs: 0,
29
+ },
30
+ };
31
+
32
+ const CUSTOM_PALETTE_PRIMARY = {
33
+ main: "#00ffb6",
34
+ };
35
+
36
+ const DEFAULT_BODY_400: TypographyStyle = {
37
+ fontFamily: "Inter",
38
+ fontSize: "14px",
39
+ fontWeight: 400,
40
+ lineHeight: "20px",
41
+ };
42
+
43
+ const DEFAULT_BREAKPOINTS = {
44
+ values: {
45
+ lg: 1440,
46
+ md: 1280,
47
+ sm: 768,
48
+ xs: 0,
49
+ },
50
+ };
51
+
52
+ const DEFAULT_PALETTE_ALERT = {
53
+ light: "#FED3D1",
54
+ lightest: "#FFF4F4",
55
+ main: "#B42318",
56
+ };
57
+
58
+ const DEFAULT_PALETTE_BACKGROUND = {
59
+ default: "#F6F6F7",
60
+ };
61
+
62
+ const DEFAULT_PALETTE_INFO = {
63
+ contrastText: "#00729C",
64
+ light: "#97D6EA",
65
+ lightest: "#F2FAFC",
66
+ main: "#00729C",
67
+ };
68
+
69
+ const DEFAULT_PALETTE_INK = {
70
+ light: "#637381",
71
+ main: "#212B36",
72
+ };
73
+
74
+ const DEFAULT_PALETTE_PRIMARY = {
75
+ dark: "#005EA9",
76
+ lightest: "#E6EFF6",
77
+ main: "#1C7CC7",
78
+ };
79
+
80
+ const DEFAULT_PALETTE_SMOKE = {
81
+ dark: "#C4CDD5",
82
+ light: "#F6F6F7",
83
+ lightest: "#FAFBFB",
84
+ main: "#E1E3E5",
85
+ };
86
+
87
+ const DEFAULT_PALETTE_SUCCESS = {
88
+ light: "#AEE9D1",
89
+ lightest: "#F1F8F5",
90
+ main: "#287555",
91
+ };
92
+
93
+ const DEFAULT_PALETTE_TEXT = {
94
+ primary: "#212B36",
95
+ };
96
+
97
+ const DEFAULT_PALETTE_WARNING = {
98
+ contrastText: "#B54708",
99
+ light: "#FFD79D",
100
+ lightest: "#FFFAEB",
101
+ main: "#B54708",
102
+ };
103
+
104
+ const DEFAULT_SHADOWS = [
105
+ "none",
106
+ "0 1px 4px 0 #00000012",
107
+ "0 8px 8px -4px #10182808, 0 20px 24px -4px #10182814",
108
+ ];
109
+
110
+ const CUSTOM_OPTIONS: ThemeOptions = {
111
+ breakpoints: CUSTOM_BREAKPOINTS,
112
+ palette: { primary: CUSTOM_PALETTE_PRIMARY },
113
+ typography: {
114
+ "body-400": CUSTOM_BODY_400,
115
+ fontFamily: "Roboto",
116
+ },
117
+ };
118
+
119
+ describe("Theme Configuration", () => {
120
+ let baseTheme: Theme;
121
+ let theme: Theme;
122
+ let customTheme: Theme;
123
+
124
+ beforeEach(() => {
125
+ baseTheme = createTheme();
126
+ theme = createAppTheme();
127
+ customTheme = createAppTheme(CUSTOM_OPTIONS);
128
+ });
129
+
130
+ describe("CSS Variables", () => {
131
+ it("should have css variables enabled", () => {
132
+ expect("vars" in theme).toBe(true);
133
+ });
134
+ });
135
+
136
+ describe("CSS Variables Configuration", () => {
137
+ let vars: CssVarsTheme["vars"];
138
+
139
+ beforeEach(() => {
140
+ vars = theme.vars;
141
+ expect(vars).toBeDefined();
142
+ });
143
+
144
+ it("should have custom 'app' var exposed as CSS variables", () => {
145
+ const appValue = vars.app?.fontFamily;
146
+ expect(appValue).toBeDefined();
147
+ expect(appValue).toContain(theme.typography.fontFamily);
148
+ });
149
+
150
+ it("should have fonts exposed as CSS variables", () => {
151
+ expect(vars.font).toBeDefined();
152
+
153
+ Object.keys(typographyValues(baseTheme))
154
+ .filter(filterTypographyVariants)
155
+ .forEach((variant) => {
156
+ // Test the variant exists in both theme and vars.
157
+ expect(variant in theme.typography).toBe(true);
158
+ expect(variant in vars.font).toBe(true);
159
+
160
+ const typography = theme.typography as unknown as GenericRecord;
161
+ const font = vars.font as unknown as GenericRecord;
162
+
163
+ // Get the font and typography variable value.
164
+ const fontValue = font[variant];
165
+ const typographyValue = typography[variant] as TypographyStyle;
166
+
167
+ // Ensure the font family is defined.
168
+ expect(typographyValue.fontFamily).toBeDefined();
169
+
170
+ // Check variable pattern.
171
+ expect(fontValue).toMatch(new RegExp(`^var\\(--font-${variant}`));
172
+
173
+ // Check font size and line height format.
174
+ expect(fontValue).toMatch(/\d+px\/\d+px/);
175
+
176
+ // Check ends with font-family.
177
+ expect(fontValue).toMatch(
178
+ new RegExp(`${typographyValue.fontFamily}\\)$`)
179
+ );
180
+
181
+ // Full pattern test.
182
+ expect(fontValue).toMatch(
183
+ new RegExp(
184
+ `^var\\(--font-${variant},\\s+\\d+\\s+\\d+px\\/\\d+px\\s+${typographyValue.fontFamily}\\)$`
185
+ )
186
+ );
187
+ });
188
+ });
189
+
190
+ it("should have palette colors exposed as CSS variables", () => {
191
+ expect(vars.palette).toBeDefined();
192
+
193
+ Object.keys(paletteValues).forEach((color) => {
194
+ // Test the color exists in both theme and vars.
195
+ expect(color in theme.palette).toBe(true);
196
+ expect(color in vars.palette).toBe(true);
197
+
198
+ const palette = theme.palette;
199
+ const paletteColor = palette[color as keyof Palette];
200
+ const varsPalette = vars.palette;
201
+ const varsColor = varsPalette[color as keyof ThemeVars["palette"]];
202
+
203
+ // We only expect the return varsColor to be an object.
204
+ expect(varsColor).toBeInstanceOf(Object);
205
+
206
+ Object.entries(paletteColor).forEach(([shade, value]) => {
207
+ // Test the shade exists in the vars.
208
+ expect(shade in (varsColor as object)).toBe(true);
209
+
210
+ // Full pattern test.
211
+ expect((vars.palette as any)[color][shade]).toEqual(
212
+ `var(--palette-${color}-${shade}, ${value})`
213
+ );
214
+ });
215
+ });
216
+ });
217
+
218
+ it("should have shadow values exposed as CSS variables", () => {
219
+ expect(vars.shadows).toBeDefined();
220
+ vars.shadows.forEach((shadow, i) => {
221
+ // Full pattern test.
222
+ expect(shadow).toEqual(`var(--shadows-${i}, ${theme.shadows[i]})`);
223
+ });
224
+ });
225
+ });
226
+
227
+ describe("Breakpoint Configuration", () => {
228
+ it("should use default breakpoint values when no custom options provided", () => {
229
+ expect(theme.breakpoints.values).toEqual(DEFAULT_BREAKPOINTS.values);
230
+ });
231
+
232
+ it("should override breakpoints when custom values provided", () => {
233
+ expect(customTheme.breakpoints.values).toEqual(CUSTOM_BREAKPOINTS.values);
234
+ });
235
+ });
236
+
237
+ describe("Components Configuration", () => {
238
+ it("should initialize with default components settings", () => {
239
+ expect(theme.components).toBeDefined();
240
+ });
241
+
242
+ it("should apply configured components variants", () => {
243
+ expect(componentsValues).toBeDefined();
244
+ Object.keys(componentsValues!).forEach((component) => {
245
+ expect(component in theme.components!).toBe(true);
246
+ });
247
+ });
248
+
249
+ it("should override MuiToolbar component breakpoints when custom values provided", () => {
250
+ // Get the component styleOverrides.
251
+ const styleOverrides = customTheme.components?.MuiToolbar?.styleOverrides;
252
+ expect(styleOverrides).toBeDefined();
253
+
254
+ // The root property should be a function that receives theme.
255
+ const rootFunction = styleOverrides?.root;
256
+ expect(typeof rootFunction).toBe("function");
257
+
258
+ if (typeof rootFunction === "function") {
259
+ // Call the function with the custom theme to get the computed styles.
260
+ const computedStyles = rootFunction({
261
+ ownerState: {},
262
+ theme: customTheme,
263
+ });
264
+
265
+ // Verify that the computed styles contain the custom breakpoint values.
266
+ // The breakpoint functions should generate media queries using custom values.
267
+ expect(computedStyles).toBeDefined();
268
+
269
+ const styleKeys = Object.keys(computedStyles!);
270
+
271
+ // Confirm that breakpoint-based custom styles are present.
272
+ expect(
273
+ hasBreakpointKey(styleKeys, CUSTOM_BREAKPOINTS.values.xs)
274
+ ).toBeTruthy();
275
+ expect(
276
+ hasBreakpointKey(styleKeys, CUSTOM_BREAKPOINTS.values.lg)
277
+ ).toBeTruthy();
278
+ }
279
+ });
280
+ });
281
+
282
+ describe("Palette Configuration", () => {
283
+ it("should initialize with default palette settings", () => {
284
+ expect(theme.palette).toBeDefined();
285
+ });
286
+
287
+ it("should apply default alert colors", () => {
288
+ expect("alert" in theme.palette).toBe(true);
289
+ validatePaletteColor(theme.palette.alert, DEFAULT_PALETTE_ALERT);
290
+ });
291
+
292
+ it("should apply default background color", () => {
293
+ expect(theme.palette.background.default).toEqual(
294
+ DEFAULT_PALETTE_BACKGROUND.default
295
+ );
296
+ });
297
+
298
+ it("should apply default info colors", () => {
299
+ expect("info" in theme.palette).toBe(true);
300
+ validatePaletteColor(theme.palette.info, DEFAULT_PALETTE_INFO);
301
+ });
302
+
303
+ it("should apply default ink colors", () => {
304
+ expect("ink" in theme.palette).toBe(true);
305
+ validatePaletteColor(theme.palette.ink, DEFAULT_PALETTE_INK);
306
+ });
307
+
308
+ it("should apply default primary color", () => {
309
+ validatePaletteColor(theme.palette.primary, DEFAULT_PALETTE_PRIMARY);
310
+ });
311
+
312
+ it("should apply default smoke colors", () => {
313
+ expect("smoke" in theme.palette).toBe(true);
314
+ validatePaletteColor(theme.palette.smoke, DEFAULT_PALETTE_SMOKE);
315
+ });
316
+
317
+ it("should apply default success color", () => {
318
+ validatePaletteColor(theme.palette.success, DEFAULT_PALETTE_SUCCESS);
319
+ });
320
+
321
+ it("should apply default text color", () => {
322
+ expect(theme.palette.text.primary).toEqual(DEFAULT_PALETTE_TEXT.primary);
323
+ });
324
+
325
+ it("should apply default warning colors", () => {
326
+ validatePaletteColor(theme.palette.warning, DEFAULT_PALETTE_WARNING);
327
+ });
328
+
329
+ it("should apply custom primary color when specified", () => {
330
+ expect(customTheme.palette.primary.main).toEqual(
331
+ CUSTOM_PALETTE_PRIMARY.main
332
+ );
333
+ // Validate that primary dark and lightest are not overridden.
334
+ validatePaletteColor(customTheme.palette.primary, {
335
+ dark: DEFAULT_PALETTE_PRIMARY.dark,
336
+ lightest: DEFAULT_PALETTE_PRIMARY.lightest,
337
+ });
338
+ });
339
+ });
340
+
341
+ describe("Shadow Configuration", () => {
342
+ it("should initialize with default shadow settings", () => {
343
+ expect(theme.shadows).toBeDefined();
344
+ });
345
+
346
+ it("should have the correct number of shadows", () => {
347
+ expect(theme.shadows.length).toBe(25);
348
+ });
349
+
350
+ it("should have the correct default shadow values", () => {
351
+ expect(theme.shadows[0]).toBe(DEFAULT_SHADOWS[0]);
352
+ expect(theme.shadows[1]).toBe(DEFAULT_SHADOWS[1]);
353
+ expect(theme.shadows[2]).toBe(DEFAULT_SHADOWS[2]);
354
+ });
355
+ });
356
+
357
+ describe("Typography Configuration", () => {
358
+ it("should initialize with default typography settings", () => {
359
+ expect(theme.typography).toBeDefined();
360
+ });
361
+
362
+ it("should apply configured typography variants", () => {
363
+ Object.keys(typographyValues(baseTheme))
364
+ .filter(filterTypographyVariants)
365
+ .forEach((variant) => {
366
+ expect(variant in theme.typography).toBe(true);
367
+ });
368
+ });
369
+
370
+ it("should apply configured body-400 typography styles", () => {
371
+ expect("body-400" in theme.typography).toBe(true);
372
+ validateTypographyStyle(theme.typography["body-400"], DEFAULT_BODY_400);
373
+ });
374
+
375
+ it("should override body-400 typography styles when custom values provided", () => {
376
+ expect("body-400" in customTheme.typography).toBe(true);
377
+ validateTypographyStyle(
378
+ customTheme.typography["body-400"],
379
+ CUSTOM_BODY_400
380
+ );
381
+ });
382
+
383
+ it("should apply custom body-400 styles to CSS variables", () => {
384
+ const fontValue = customTheme.vars?.font?.["body-400"];
385
+ const variant = customTheme.typography["body-400"];
386
+ expect(fontValue).toBeDefined();
387
+ expect(fontValue).toContain(variant.fontSize);
388
+ });
389
+
390
+ it("should apply custom fontFamily to CSS variables", () => {
391
+ const appValue = customTheme.vars?.app?.fontFamily;
392
+ const fontFamily = customTheme.typography.fontFamily;
393
+ expect(appValue).toBeDefined();
394
+ expect(appValue).toContain(fontFamily);
395
+ });
396
+ });
397
+ });
398
+
399
+ /**
400
+ * Filters typography variant keys to exclude specific predefined variant types.
401
+ * @param value - The typography variant key to be evaluated.
402
+ * @returns Returns true if the variant key is not among the excluded keys; otherwise false.
403
+ */
404
+ function filterTypographyVariants(value: string): boolean {
405
+ return !/fontFamily|fontSize|fontWeightLight|fontWeightRegular|fontWeightMedium|fontWeightBold|htmlFontSize|allVariants/.test(
406
+ value
407
+ );
408
+ }
409
+
410
+ /**
411
+ * Checks if a style key exists for a given breakpoint.
412
+ * @param keys - Style keys.
413
+ * @param breakpoint - Breakpoint.
414
+ * @returns True if the style key exists for the given breakpoint, false otherwise.
415
+ */
416
+ function hasBreakpointKey(keys: string[], breakpoint: number): boolean {
417
+ return keys.some(
418
+ (key) => /^@media/.test(key) && key.includes(String(breakpoint))
419
+ );
420
+ }
421
+
422
+ /**
423
+ * Type guard to check if a value is a PaletteColor.
424
+ * @param color - Color.
425
+ * @returns True if the color is a valid PaletteColor, false otherwise.
426
+ */
427
+ function isPaletteColor(color: unknown): color is PaletteColor {
428
+ return (
429
+ color !== null &&
430
+ typeof color === "object" &&
431
+ "light" in color &&
432
+ "main" in color
433
+ );
434
+ }
435
+
436
+ /**
437
+ * Validates that a palette color (like theme.palette.alert)
438
+ * has the expected values for given keys.
439
+ * @param actual - Actual palette color object to validate.
440
+ * @param expected - An object containing the expected key-value pairs.
441
+ */
442
+ function validatePaletteColor(
443
+ actual: unknown,
444
+ expected: Record<string, string>
445
+ ): void {
446
+ expect(isPaletteColor(actual)).toBe(true);
447
+ for (const [key, value] of Object.entries(expected)) {
448
+ expect((actual as Record<string, unknown>)[key]).toEqual(value);
449
+ }
450
+ }
451
+
452
+ /**
453
+ * Validates that a typography variant (like theme.typography["body-400"])
454
+ * has the expected typography style values.
455
+ * @param actual - Actual typography style to validate.
456
+ * @param expected - Expected typography style values.
457
+ */
458
+ export function validateTypographyStyle(
459
+ actual: TypographyStyle,
460
+ expected: TypographyStyle
461
+ ): void {
462
+ for (const [key, value] of Object.entries(expected)) {
463
+ expect(actual[key]).toEqual(value);
464
+ }
465
+ }
@@ -4,5 +4,5 @@
4
4
  "rootDir": "../"
5
5
  },
6
6
  "extends": "../tsconfig.json",
7
- "include": ["./**/*.ts"]
7
+ "include": ["./**/*.ts", "../types/*.d.ts"]
8
8
  }
@@ -122,6 +122,20 @@ declare module "@mui/material/Tabs" {
122
122
  /* eslint-disable sonarjs/no-duplicate-string -- ignoring duplicate strings here */
123
123
 
124
124
  declare module "@mui/material/styles" {
125
+ interface CssVarsTheme {
126
+ vars: CssVarsTheme["vars"] & {
127
+ app?: {
128
+ fontFamily?: string;
129
+ };
130
+ };
131
+ }
132
+
133
+ interface ThemeVars {
134
+ app?: {
135
+ fontFamily?: string;
136
+ };
137
+ }
138
+
125
139
  interface BreakpointOverrides {
126
140
  lg: true;
127
141
  md: true;
@@ -150,42 +164,53 @@ declare module "@mui/material/styles" {
150
164
  lightest?: string;
151
165
  }
152
166
 
167
+ interface Theme {
168
+ app?: {
169
+ fontFamily?: string;
170
+ };
171
+ }
172
+
173
+ interface ThemeOptions {
174
+ app?: {
175
+ fontFamily?: string;
176
+ };
177
+ }
178
+
153
179
  interface TypographyVariants {
154
- "text-body-400": TypographyStyleOptions;
155
- "text-body-400-2lines": TypographyStyleOptions;
156
- "text-body-500": TypographyStyleOptions;
157
- "text-body-500-2lines": TypographyStyleOptions;
158
- "text-body-large-400": TypographyStyleOptions;
159
- "text-body-large-400-2lines": TypographyStyleOptions;
160
- "text-body-large-500": TypographyStyleOptions;
161
- "text-body-small-400": TypographyStyleOptions;
162
- "text-body-small-400-2lines": TypographyStyleOptions;
163
- "text-body-small-500": TypographyStyleOptions;
164
- "text-heading": TypographyStyleOptions;
165
- "text-heading-large": TypographyStyleOptions;
166
- "text-heading-small": TypographyStyleOptions;
167
- "text-heading-xlarge": TypographyStyleOptions;
168
- "text-heading-xsmall": TypographyStyleOptions;
169
- "text-uppercase-500": TypographyStyleOptions;
180
+ "body-400": TypographyStyleOptions;
181
+ "body-400-2lines": TypographyStyleOptions;
182
+ "body-500": TypographyStyleOptions;
183
+ "body-large-400": TypographyStyleOptions;
184
+ "body-large-400-2lines": TypographyStyleOptions;
185
+ "body-large-500": TypographyStyleOptions;
186
+ "body-small-400": TypographyStyleOptions;
187
+ "body-small-400-2lines": TypographyStyleOptions;
188
+ "body-small-500": TypographyStyleOptions;
189
+ heading: TypographyStyleOptions;
190
+ "heading-large": TypographyStyleOptions;
191
+ "heading-small": TypographyStyleOptions;
192
+ "heading-xlarge": TypographyStyleOptions;
193
+ "heading-xsmall": TypographyStyleOptions;
194
+ "uppercase-500": TypographyStyleOptions;
170
195
  }
171
196
 
172
197
  interface TypographyVariantsOptions {
173
- "text-body-400"?: TypographyStyleOptions;
174
- "text-body-400-2lines"?: TypographyStyleOptions;
175
- "text-body-500"?: TypographyStyleOptions;
176
- "text-body-500-2lines"?: TypographyStyleOptions;
177
- "text-body-large-400"?: TypographyStyleOptions;
178
- "text-body-large-400-2lines"?: TypographyStyleOptions;
179
- "text-body-large-500"?: TypographyStyleOptions;
180
- "text-body-small-400"?: TypographyStyleOptions;
181
- "text-body-small-400-2lines"?: TypographyStyleOptions;
182
- "text-body-small-500"?: TypographyStyleOptions;
183
- "text-heading"?: TypographyStyleOptions;
184
- "text-heading-large"?: TypographyStyleOptions;
185
- "text-heading-small"?: TypographyStyleOptions;
186
- "text-heading-xlarge"?: TypographyStyleOptions;
187
- "text-heading-xsmall"?: TypographyStyleOptions;
188
- "text-uppercase-500"?: TypographyStyleOptions;
198
+ "body-400"?: TypographyStyleOptions;
199
+ "body-400-2lines"?: TypographyStyleOptions;
200
+ "body-500"?: TypographyStyleOptions;
201
+ "body-500-2lines"?: TypographyStyleOptions;
202
+ "body-large-400"?: TypographyStyleOptions;
203
+ "body-large-400-2lines"?: TypographyStyleOptions;
204
+ "body-large-500"?: TypographyStyleOptions;
205
+ "body-small-400"?: TypographyStyleOptions;
206
+ "body-small-400-2lines"?: TypographyStyleOptions;
207
+ "body-small-500"?: TypographyStyleOptions;
208
+ heading?: TypographyStyleOptions;
209
+ "heading-large"?: TypographyStyleOptions;
210
+ "heading-small"?: TypographyStyleOptions;
211
+ "heading-xlarge"?: TypographyStyleOptions;
212
+ "heading-xsmall"?: TypographyStyleOptions;
213
+ "uppercase-500"?: TypographyStyleOptions;
189
214
  }
190
215
  }
191
216
 
@@ -193,22 +218,22 @@ declare module "@mui/material/styles" {
193
218
 
194
219
  declare module "@mui/material/Typography" {
195
220
  interface TypographyPropsVariantOverrides {
196
- "text-body-400": true;
197
- "text-body-400-2lines": true;
198
- "text-body-500": true;
199
- "text-body-500-2lines": true;
200
- "text-body-large-400": true;
201
- "text-body-large-400-2lines": true;
202
- "text-body-large-500": true;
203
- "text-body-small-400": true;
204
- "text-body-small-400-2lines": true;
205
- "text-body-small-500": true;
206
- "text-heading": true;
207
- "text-heading-large": true;
208
- "text-heading-small": true;
209
- "text-heading-xlarge": true;
210
- "text-heading-xsmall": true;
211
- "text-uppercase-500": true;
221
+ "body-400": true;
222
+ "body-400-2lines": true;
223
+ "body-500": true;
224
+ "body-500-2lines": true;
225
+ "body-large-400": true;
226
+ "body-large-400-2lines": true;
227
+ "body-large-500": true;
228
+ "body-small-400": true;
229
+ "body-small-400-2lines": true;
230
+ "body-small-500": true;
231
+ heading: true;
232
+ "heading-large": true;
233
+ "heading-small": true;
234
+ "heading-xlarge": true;
235
+ "heading-xsmall": true;
236
+ "uppercase-500": true;
212
237
  }
213
238
  }
214
239
 
@@ -1,25 +0,0 @@
1
- import { CommonColors, PaletteColor } from "@mui/material/styles";
2
- import { ThemeProps } from "../../../theme/theme";
3
- export declare const alertLight: ({ theme }: ThemeProps) => PaletteColor["light"];
4
- export declare const alertLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
5
- export declare const alertMain: ({ theme }: ThemeProps) => PaletteColor["main"];
6
- export declare const errorMain: ({ theme }: ThemeProps) => PaletteColor["main"];
7
- export declare const infoLight: ({ theme }: ThemeProps) => PaletteColor["light"];
8
- export declare const infoLightest: ({ theme }: ThemeProps) => PaletteColor["lightest"];
9
- export declare const infoMain: ({ theme }: ThemeProps) => PaletteColor["main"];
10
- export declare const inkLight: ({ theme }: ThemeProps) => PaletteColor["light"];
11
- export declare const inkMain: ({ theme }: ThemeProps) => PaletteColor["main"];
12
- export declare const primaryDark: ({ theme }: ThemeProps) => PaletteColor["dark"];
13
- export declare const primaryLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
14
- export declare const primaryMain: ({ theme }: ThemeProps) => PaletteColor["main"];
15
- export declare const smokeDark: ({ theme }: ThemeProps) => PaletteColor["dark"];
16
- export declare const smokeLight: ({ theme }: ThemeProps) => PaletteColor["light"];
17
- export declare const smokeLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
18
- export declare const smokeMain: ({ theme }: ThemeProps) => PaletteColor["main"];
19
- export declare const successLight: ({ theme }: ThemeProps) => PaletteColor["light"];
20
- export declare const successLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
21
- export declare const successMain: ({ theme }: ThemeProps) => PaletteColor["main"];
22
- export declare const warningLight: ({ theme }: ThemeProps) => PaletteColor["light"];
23
- export declare const warningLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
24
- export declare const warningMain: ({ theme }: ThemeProps) => PaletteColor["main"];
25
- export declare const white: ({ theme }: ThemeProps) => CommonColors["white"];
@@ -1,32 +0,0 @@
1
- // Alert
2
- export const alertLight = ({ theme }) => theme.palette.alert.light;
3
- export const alertLightest = ({ theme, }) => theme.palette.alert.lightest;
4
- export const alertMain = ({ theme }) => theme.palette.alert.main;
5
- // Error
6
- export const errorMain = ({ theme }) => theme.palette.error.main;
7
- // Info
8
- export const infoLight = ({ theme }) => theme.palette.info.light;
9
- export const infoLightest = ({ theme }) => theme.palette.info.lightest;
10
- export const infoMain = ({ theme }) => theme.palette.info.main;
11
- // Ink
12
- export const inkLight = ({ theme }) => theme.palette.ink.light;
13
- export const inkMain = ({ theme }) => theme.palette.ink.main;
14
- // Primary
15
- export const primaryDark = ({ theme }) => theme.palette.primary.dark;
16
- export const primaryLightest = ({ theme, }) => theme.palette.primary.lightest;
17
- export const primaryMain = ({ theme }) => theme.palette.primary.main;
18
- // Smoke
19
- export const smokeDark = ({ theme }) => theme.palette.smoke.dark;
20
- export const smokeLight = ({ theme }) => theme.palette.smoke.light;
21
- export const smokeLightest = ({ theme, }) => theme.palette.smoke.lightest;
22
- export const smokeMain = ({ theme }) => theme.palette.smoke.main;
23
- // Success
24
- export const successLight = ({ theme }) => theme.palette.success.light;
25
- export const successLightest = ({ theme, }) => theme.palette.success.lightest;
26
- export const successMain = ({ theme }) => theme.palette.success.main;
27
- // Warning
28
- export const warningLight = ({ theme }) => theme.palette.warning.light;
29
- export const warningLightest = ({ theme, }) => theme.palette.warning.lightest;
30
- export const warningMain = ({ theme }) => theme.palette.warning.main;
31
- // White
32
- export const white = ({ theme }) => theme.palette.common.white;