@equinor/amplify-component-lib 9.15.3-beta.1 → 9.16.0-beta.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 (341) hide show
  1. package/dist/atoms/hooks/index.js +1 -0
  2. package/dist/atoms/hooks/useAmplifyKit.js +1 -1
  3. package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
  4. package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
  5. package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
  6. package/dist/atoms/hooks/useSelect.d.ts +3 -3
  7. package/dist/atoms/hooks/useSelect.js +1 -1
  8. package/dist/atoms/index.js +1 -1
  9. package/dist/atoms/style/index.js +1 -1
  10. package/dist/atoms/utils/auth_environment.js +1 -1
  11. package/dist/atoms/utils/date.d.ts +1 -1
  12. package/dist/atoms/utils/richtext.js +1 -1
  13. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
  14. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +4 -4
  15. package/dist/deprecated/IconToggleButton.d.ts +2 -2
  16. package/dist/deprecated/IconToggleButton.js +1 -1
  17. package/dist/deprecated/OldStepper/OldStep.js +3 -3
  18. package/dist/deprecated/OldStepper/OldStepLine.js +2 -2
  19. package/dist/deprecated/OldStepper/OldStepper.js +3 -3
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.js +1 -1
  22. package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
  23. package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +4 -4
  24. package/dist/molecules/ApplicationIcon/ApplicationIconCollection.js +1 -1
  25. package/dist/molecules/ApplicationIcon/Icons/Acquire.js +1 -1
  26. package/dist/molecules/ApplicationIcon/Icons/Adca.js +1 -1
  27. package/dist/molecules/ApplicationIcon/Icons/Bravos.js +1 -1
  28. package/dist/molecules/ApplicationIcon/Icons/Dasha.js +1 -1
  29. package/dist/molecules/ApplicationIcon/Icons/Fallback.js +1 -1
  30. package/dist/molecules/ApplicationIcon/Icons/ForecastFormatter.js +1 -1
  31. package/dist/molecules/ApplicationIcon/Icons/FourDInsight.js +1 -1
  32. package/dist/molecules/ApplicationIcon/Icons/InPress.js +1 -1
  33. package/dist/molecules/ApplicationIcon/Icons/JsEmbark.js +1 -1
  34. package/dist/molecules/ApplicationIcon/Icons/LoggingQualification.js +1 -1
  35. package/dist/molecules/ApplicationIcon/Icons/Orca.js +1 -1
  36. package/dist/molecules/ApplicationIcon/Icons/Premo.js +1 -1
  37. package/dist/molecules/ApplicationIcon/Icons/Pwex.js +1 -1
  38. package/dist/molecules/ApplicationIcon/Icons/Recap.js +1 -1
  39. package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.js +1 -1
  40. package/dist/molecules/Badge/Badge.js +1 -1
  41. package/dist/molecules/Banner/Banner.js +1 -1
  42. package/dist/molecules/Banner/Banner.styles.js +3 -3
  43. package/dist/molecules/Button/Button.js +3 -3
  44. package/dist/molecules/Chip/Chip.d.ts +2 -2
  45. package/dist/molecules/Chip/Chip.js +1 -1
  46. package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
  47. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  48. package/dist/molecules/DatePicker/DatePicker.js +1 -1
  49. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
  50. package/dist/molecules/DateRangePicker/DateRangePicker.js +1 -1
  51. package/dist/molecules/Dialog/Dialog.d.ts +1 -1
  52. package/dist/molecules/Dialog/Dialog.js +1 -1
  53. package/dist/molecules/Dialog/Dialog.styles.js +10 -10
  54. package/dist/molecules/Dialog/DialogAction.js +1 -1
  55. package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
  56. package/dist/molecules/EquinorLogo/EquinorLogo.js +1 -1
  57. package/dist/molecules/FileProgress/FileProgress.js +1 -1
  58. package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
  59. package/dist/molecules/FileUploadArea/FileUploadArea.styles.js +18 -18
  60. package/dist/molecules/FullPageSpinner/FullPageSpinner.js +8 -8
  61. package/dist/molecules/IconCell/IconCell.d.ts +54 -0
  62. package/dist/molecules/IconCell/IconCell.js +1 -0
  63. package/dist/molecules/IconCell/IconCell.styles.js +108 -0
  64. package/dist/molecules/IconCell/IconCell.types.d.ts +33 -0
  65. package/dist/molecules/IconCell/IconCell.types.js +1 -0
  66. package/dist/molecules/IconCell/IconCell.utils.js +8 -0
  67. package/dist/molecules/InfoElement/InfoElement.js +1 -1
  68. package/dist/molecules/ListItem/ListItem.js +13 -13
  69. package/dist/molecules/OptionDrawer/OptionDrawer.js +1 -1
  70. package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
  71. package/dist/molecules/OptionalTooltip/OptionalTooltip.js +2 -2
  72. package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
  73. package/dist/molecules/ProfileAvatar/ProfileAvatar.js +6 -6
  74. package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
  75. package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
  76. package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
  77. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +5 -5
  78. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.js +5 -5
  79. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.styles.js +4 -4
  80. package/dist/molecules/RichTextEditor/MenuBar/MenuButton.js +1 -1
  81. package/dist/molecules/RichTextEditor/MenuBar/Table/TableColumn.js +1 -1
  82. package/dist/molecules/RichTextEditor/MenuBar/Table/TableMerge.js +1 -1
  83. package/dist/molecules/RichTextEditor/MenuBar/Table/TableRow.js +1 -1
  84. package/dist/molecules/RichTextEditor/MenuBar/Table/ToggleTable.js +1 -1
  85. package/dist/molecules/RichTextEditor/MenuBar/TextClearFormatting.js +2 -2
  86. package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +4 -4
  87. package/dist/molecules/RichTextEditor/MenuBar/TextHeaders.js +1 -1
  88. package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +2 -2
  89. package/dist/molecules/RichTextEditor/RichTextEditor.js +1 -1
  90. package/dist/molecules/RichTextEditor/RichTextEditor.styles.js +23 -23
  91. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedHeaders.js +1 -1
  92. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
  93. package/dist/molecules/RichTextEditor/index.d.ts +5 -5
  94. package/dist/molecules/RichTextEditor/index.js +1 -1
  95. package/dist/molecules/Search/Search.d.ts +2 -2
  96. package/dist/molecules/Search/Search.js +8 -8
  97. package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
  98. package/dist/molecules/Select/ComboBox/ComboBox.js +1 -1
  99. package/dist/molecules/Select/Select.styles.d.ts +4 -4
  100. package/dist/molecules/Select/Select.styles.js +61 -61
  101. package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
  102. package/dist/molecules/Select/SingleSelect/SingleSelect.js +1 -1
  103. package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -1
  104. package/dist/molecules/SelectionControls/Radio/Radio.js +1 -1
  105. package/dist/molecules/SelectionControls/SelectionControls.styles.js +24 -24
  106. package/dist/molecules/SelectionControls/Switch/Switch.js +1 -1
  107. package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +9 -9
  108. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
  109. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.js +7 -7
  110. package/dist/molecules/Skeleton/SkeletonGradient/SkeletonGradient.js +1 -1
  111. package/dist/molecules/Stepper/Step/Step.js +5 -5
  112. package/dist/molecules/Stepper/StepLine.js +2 -2
  113. package/dist/molecules/Stepper/Stepper.js +4 -4
  114. package/dist/molecules/Tabs/Tab.js +1 -1
  115. package/dist/molecules/Tabs/Tab.styles.js +22 -22
  116. package/dist/molecules/Tabs/Tabs.js +4 -4
  117. package/dist/molecules/Tabs/Tabs.types.d.ts +1 -1
  118. package/dist/molecules/index.d.ts +5 -5
  119. package/dist/molecules/index.js +1 -1
  120. package/dist/organisms/DataGrid/DataGrid.js +6 -6
  121. package/dist/organisms/Faq/Faq.js +1 -1
  122. package/dist/organisms/Faq/Faq.styles.js +3 -3
  123. package/dist/organisms/Faq/Header.js +7 -7
  124. package/dist/organisms/FieldSelector/ChangingField.js +8 -8
  125. package/dist/organisms/FieldSelector/FieldSelector.js +3 -3
  126. package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +18 -18
  127. package/dist/organisms/FieldSelector/SelectorCard/Skeleton.js +6 -6
  128. package/dist/organisms/Filter/ButtonWithMenu.js +1 -1
  129. package/dist/organisms/Filter/Filter.js +1 -1
  130. package/dist/organisms/Filter/Filter.styles.js +39 -39
  131. package/dist/organisms/Filter/QuickFilter.js +1 -1
  132. package/dist/organisms/Filter/SortMenu.js +2 -2
  133. package/dist/organisms/PageTitle/PageTitle.js +1 -1
  134. package/dist/organisms/ReleaseNote/ReleaseNote.js +12 -12
  135. package/dist/organisms/ReleaseNote/ToggleExpanded.js +6 -6
  136. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  137. package/dist/organisms/SideBar/index.js +1 -1
  138. package/dist/organisms/Status/Action.d.ts +2 -2
  139. package/dist/organisms/Status/Action.js +1 -1
  140. package/dist/organisms/Status/Description.d.ts +2 -2
  141. package/dist/organisms/Status/Description.js +1 -1
  142. package/dist/organisms/Status/Illustration.js +2 -2
  143. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  144. package/dist/organisms/Status/MissingAccesses.js +4 -4
  145. package/dist/organisms/Status/Status.js +4 -4
  146. package/dist/organisms/Status/Title.d.ts +2 -2
  147. package/dist/organisms/Status/Title.js +1 -1
  148. package/dist/organisms/Status/collections/ApiResponseError.js +1 -1
  149. package/dist/organisms/Status/collections/BadRequest.js +2 -2
  150. package/dist/organisms/Status/collections/GenericError.js +1 -1
  151. package/dist/organisms/Status/collections/MissingAccessToApp.js +1 -1
  152. package/dist/organisms/Status/collections/MissingPermissions.js +1 -1
  153. package/dist/organisms/Status/collections/PageNotFound.js +2 -2
  154. package/dist/organisms/Status/collections/ServerError.js +2 -2
  155. package/dist/organisms/TableOfContents/TableOfContents.constants.js +1 -1
  156. package/dist/organisms/TableOfContents/TableOfContents.js +1 -1
  157. package/dist/organisms/TableOfContents/TableOfContents.styles.js +32 -32
  158. package/dist/organisms/TableOfContents/TableOfContentsItem.js +4 -4
  159. package/dist/organisms/Template/Template.js +7 -7
  160. package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
  161. package/dist/organisms/ToggleGroup/ToggleGroup.js +12 -12
  162. package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
  163. package/dist/organisms/ToggleGroup/ToggleGroupOption.js +20 -20
  164. package/dist/organisms/TopBar/Account/Account.js +1 -1
  165. package/dist/organisms/TopBar/Account/Account.styles.js +24 -24
  166. package/dist/organisms/TopBar/Account/AccountAvatar.js +7 -7
  167. package/dist/organisms/TopBar/Account/AccountButton.js +5 -5
  168. package/dist/organisms/TopBar/Account/ActiveUserImpersonationButton.js +4 -4
  169. package/dist/organisms/TopBar/Account/ImpersonateAvatar.js +4 -4
  170. package/dist/organisms/TopBar/Account/ImpersonateButton.js +4 -4
  171. package/dist/organisms/TopBar/Account/ImpersonateMenu/Actions.js +6 -6
  172. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateNewUserButton.js +4 -4
  173. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
  174. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.styles.js +1 -1
  175. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
  176. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.styles.js +8 -8
  177. package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.constants.js +1 -1
  178. package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.styles.js +4 -4
  179. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
  180. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.js +8 -8
  181. package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +6 -6
  182. package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.styles.js +16 -16
  183. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useActiveImpersonationUser.js +1 -1
  184. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useAllAppRoles.js +1 -1
  185. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useCanImpersonate.js +1 -1
  186. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useGetAllImpersonationUsersForApp.js +1 -1
  187. package/dist/organisms/TopBar/Account/RoleChips.js +1 -1
  188. package/dist/organisms/TopBar/Account/RoleList.js +7 -7
  189. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  190. package/dist/organisms/TopBar/Actions.js +3 -3
  191. package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
  192. package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.styles.js +24 -24
  193. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  194. package/dist/organisms/TopBar/FieldMenu/FieldMenu.js +1 -1
  195. package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.js +24 -24
  196. package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +2 -2
  197. package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
  198. package/dist/organisms/TopBar/Guidelines/Item.js +3 -3
  199. package/dist/organisms/TopBar/Guidelines/Section.js +7 -7
  200. package/dist/organisms/TopBar/Notifications/FilterOptions.js +6 -6
  201. package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
  202. package/dist/organisms/TopBar/Notifications/NotificationsInner.js +3 -3
  203. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +4 -4
  204. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ExperienceDue3Weeks.js +2 -2
  205. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/MergedBranchOrca.js +2 -2
  206. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +4 -4
  207. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReadyToBePublished.js +2 -2
  208. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReadyToReportNotification.js +4 -4
  209. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/RequestChangeOrca.js +2 -2
  210. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/RequestReviewOrca.js +2 -2
  211. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReviewQANotification.js +2 -2
  212. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
  213. package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.style.js +9 -9
  214. package/dist/organisms/TopBar/Resources/Feedback/Feedback.const.js +1 -1
  215. package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +7 -7
  216. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +3 -3
  217. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
  218. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +3 -3
  219. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +2 -2
  220. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Title.js +2 -2
  221. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +2 -2
  222. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Url.js +2 -2
  223. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +3 -3
  224. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +3 -3
  225. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +2 -2
  226. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +3 -3
  227. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +8 -8
  228. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
  229. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +3 -3
  230. package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
  231. package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +7 -7
  232. package/dist/organisms/TopBar/Resources/Resources.js +4 -4
  233. package/dist/organisms/TopBar/Settings.js +11 -11
  234. package/dist/organisms/TopBar/TopBar.js +1 -1
  235. package/dist/organisms/TopBar/TopBar.styles.js +22 -22
  236. package/dist/organisms/TopBar/TopBarMenu.js +4 -4
  237. package/dist/organisms/TopBar/TransferToAppDialog.js +11 -11
  238. package/dist/organisms/TopBar/Tutorials/TutorialItem.js +8 -8
  239. package/dist/organisms/TopBar/Tutorials/Tutorials.js +1 -1
  240. package/dist/organisms/TopBar/Tutorials/Tutorials.styles.js +6 -6
  241. package/dist/organisms/index.js +1 -1
  242. package/dist/providers/LoadingProvider.js +1 -1
  243. package/dist/providers/ReleaseNotesProvider.js +1 -1
  244. package/dist/providers/SideBarProvider.js +1 -1
  245. package/dist/providers/StepperProvider.js +1 -1
  246. package/dist/providers/TableOfContentsProvider.js +1 -1
  247. package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
  248. package/dist/providers/index.js +1 -0
  249. package/package.json +3 -3
  250. package/dist/atoms/hooks/useOnScreenMultiple.js +0 -1
  251. package/dist/atoms/hooks/useRichTextImage.js +0 -1
  252. package/dist/atoms/style/animation.js +0 -1
  253. package/dist/atoms/style/colors.js +0 -1
  254. package/dist/atoms/style/darkTokens.js +0 -219
  255. package/dist/atoms/style/lightTokens.js +0 -158
  256. package/dist/atoms/style/spacingTokens.js +0 -50
  257. package/dist/atoms/style/spacings.js +0 -1
  258. package/dist/atoms/utils/skeleton.js +0 -1
  259. package/dist/molecules/ApplicationIcon/Icons/FluxMaps.js +0 -1
  260. package/dist/molecules/Badge/Badge.styles.js +0 -17
  261. package/dist/molecules/Button/Button.utils.js +0 -1
  262. package/dist/molecules/Chip/Chip.styles.js +0 -65
  263. package/dist/molecules/Chip/InteractiveChip.js +0 -1
  264. package/dist/molecules/Chip/ReadOnlyChip.js +0 -1
  265. package/dist/molecules/ContentMenu/ContentMenu.styles.js +0 -52
  266. package/dist/molecules/DatePicker/DatePicker.styles.js +0 -63
  267. package/dist/molecules/EquinorLogo/EquinorLogo.utils.js +0 -1
  268. package/dist/molecules/FileProgress/CompactFileProgress.js +0 -1
  269. package/dist/molecules/FileProgress/CompactFileProgress.styles.js +0 -100
  270. package/dist/molecules/FileProgress/FileProgress.utils.js +0 -1
  271. package/dist/molecules/FileProgress/RegularFileProgress.js +0 -1
  272. package/dist/molecules/FileProgress/RegularFileProgress.styles.js +0 -35
  273. package/dist/molecules/FileUploadArea/FileUploadArea.constants.js +0 -1
  274. package/dist/molecules/FileUploadArea/UploadIllustration.js +0 -1
  275. package/dist/molecules/InfoElement/CopyText.js +0 -41
  276. package/dist/molecules/ListItem/ListItem.utils.js +0 -1
  277. package/dist/molecules/OptionDrawer/OptionDrawer.styles.js +0 -36
  278. package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +0 -1
  279. package/dist/molecules/Select/AddTagItem.js +0 -1
  280. package/dist/molecules/Select/GroupedSelectMenu.js +0 -1
  281. package/dist/molecules/Select/ListSelectMenu.js +0 -1
  282. package/dist/molecules/Select/Select.js +0 -1
  283. package/dist/molecules/Select/Select.utils.js +0 -1
  284. package/dist/molecules/Select/SelectMenuItem.js +0 -1
  285. package/dist/molecules/Select/SelectMenuItem.utils.js +0 -1
  286. package/dist/molecules/Sieve/Filter.d.ts +0 -10
  287. package/dist/molecules/Sieve/Filter.js +0 -1
  288. package/dist/molecules/Sieve/Sieve.d.ts +0 -7
  289. package/dist/molecules/Sieve/Sieve.js +0 -1
  290. package/dist/molecules/Sieve/Sieve.styles.js +0 -43
  291. package/dist/molecules/Sieve/Sieve.types.d.ts +0 -26
  292. package/dist/molecules/Sieve/Sort.js +0 -1
  293. package/dist/molecules/Skeleton/Skeleton.styles.js +0 -1
  294. package/dist/molecules/Skeleton/SkeletonField.js +0 -8
  295. package/dist/molecules/Stepper/Step/StepIcon.js +0 -19
  296. package/dist/molecules/Stepper/SubTitle/SubStepIndicator.js +0 -25
  297. package/dist/molecules/Stepper/SubTitle/SubTitle.js +0 -7
  298. package/dist/molecules/TextField/TextField.js +0 -74
  299. package/dist/organisms/Faq/Category/Category.js +0 -9
  300. package/dist/organisms/Faq/Category/Question.js +0 -22
  301. package/dist/organisms/Faq/CategorySkeleton.js +0 -29
  302. package/dist/organisms/Filter/AutoCompleteMenu.js +0 -10
  303. package/dist/organisms/Filter/AutoCompleteText.js +0 -11
  304. package/dist/organisms/Filter/Filter.utils.js +0 -1
  305. package/dist/organisms/ReleaseNote/MetaTags.js +0 -10
  306. package/dist/organisms/SideBar/CreateItem.js +0 -1
  307. package/dist/organisms/SideBar/CreateItem.styles.js +0 -33
  308. package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +0 -1
  309. package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +0 -48
  310. package/dist/organisms/SideBar/MenuItem/MenuItem.js +0 -1
  311. package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +0 -37
  312. package/dist/organisms/SideBar/MenuItem/MenuItem.utils.js +0 -1
  313. package/dist/organisms/SideBar/SideBar.js +0 -1
  314. package/dist/organisms/SideBar/SideBar.styles.js +0 -41
  315. package/dist/organisms/SideBar/ToggleOpen.js +0 -1
  316. package/dist/organisms/SideBar/ToggleOpen.styles.js +0 -16
  317. package/dist/organisms/Status/Illustration.constants.js +0 -1
  318. package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.utils.js +0 -1
  319. package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useStartImpersonation.js +0 -1
  320. package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.js +0 -41
  321. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +0 -7
  322. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.js +0 -79
  323. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.js +0 -1
  324. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.styles.js +0 -7
  325. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +0 -1
  326. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.styles.js +0 -19
  327. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +0 -1
  328. package/dist/providers/AuthProvider/AuthProvider.js +0 -1
  329. package/dist/providers/AuthProvider/AuthProviderInner.js +0 -1
  330. package/dist/providers/ReleaseNotesProvider.utils.js +0 -1
  331. package/dist/providers/SnackbarProvider/SnackbarProvider.js +0 -1
  332. package/dist/providers/SnackbarProvider/SnackbarProvider.styles.js +0 -41
  333. package/dist/providers/SnackbarProvider/SnackbarProvider.utils.js +0 -1
  334. package/dist/providers/TableOfContentsProvider.utils.js +0 -1
  335. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.constants.js +0 -1
  336. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.js +0 -1
  337. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +0 -24
  338. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/StepIndicator.js +0 -20
  339. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +0 -75
  340. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +0 -1
  341. package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.js +0 -1
@@ -0,0 +1,108 @@
1
+ import{IconCellStates as e,IconCellVariants as t}from"./IconCell.types.js";import{getBackground as n,getBorderBottom as r,getSelectedBorder as i,stateBGColor as a}from"./IconCell.utils.js";import o from"styled-components";import{animation as s,colors as c,spacings as l}from"src/atoms/style";const u=(e=`rgba(0, 0, 0, 0.1)`)=>`
2
+ content: '';
3
+ position: absolute;
4
+ inset: 0;
5
+ background-color: ${e};
6
+ opacity: 0.7;
7
+ pointer-events: none;
8
+ `,d=o.div`
9
+ min-width: 48px;
10
+ padding: 0;
11
+ `,f=o.div`
12
+ display: flex;
13
+ position: absolute;
14
+ bottom: ${l.small};
15
+ left: ${l.small};
16
+ padding-right: ${l.xx_small};
17
+
18
+ span {
19
+ font-size: 10px;
20
+ font-weight: 500;
21
+ position: relative;
22
+ color: ${c.text.static_icons__default.rgba};
23
+ }
24
+ `,p=o.div`
25
+ display: flex;
26
+ align-items: center;
27
+ `,m=o.div`
28
+ display: flex;
29
+ position: absolute;
30
+ top: ${l.small};
31
+ right: ${l.small};
32
+
33
+ svg {
34
+ width: 16px;
35
+ height: 16px;
36
+ position: relative;
37
+ }
38
+ `,h=o.button`
39
+ display: flex;
40
+ width: 100%;
41
+ height: 100%;
42
+ min-height: 52px;
43
+ position: relative;
44
+ justify-content: center;
45
+ overflow: hidden;
46
+ padding: ${l.small};
47
+ background: ${n};
48
+ transition: background ${s.transitionMS};
49
+ border: none;
50
+ border-bottom: ${r};
51
+ cursor: ${({$clickable:e})=>e?`pinter`:`default`};
52
+
53
+ // Scribbled-out hides content
54
+ ${({$variant:e})=>e===t.SCRIBBLED_OUT&&`
55
+ ${f}, ${m}, ${p} {
56
+ display: none;
57
+ }
58
+ `}
59
+
60
+ // Selected state
61
+ ${({$selected:e,$state:t})=>e&&`
62
+ border: 1px solid ${i(t)};
63
+ `}
64
+
65
+ // Overlay for Label & HelperIconContainer
66
+ ${({$backgroundColor:n,$variant:r,$state:i})=>{let o=r===t.COLOURED?i===e.DANGER?a[e.DANGER]:i===e.WARNING?a[e.WARNING]:n:c.ui.background__default.rgba;return`
67
+ ${f}::before,
68
+ ${m}::before {
69
+ ${u(o)}
70
+ }
71
+ `}}
72
+
73
+ // Disabled state
74
+ &:disabled {
75
+ cursor: not-allowed;
76
+ background: ${({$variant:e})=>e===t.COLOURED?c.ui.background__light.rgba:`transparent`};
77
+
78
+ ${f} span {
79
+ color: ${c.interactive.disabled__text.rgba};
80
+ }
81
+
82
+ ${p},${m} {
83
+ opacity: 0.3;
84
+ filter: grayscale(100%);
85
+ }
86
+
87
+ ${({$selected:e})=>e&&`
88
+ border: 1px solid ${c.ui.background__light.rgba};
89
+ `}
90
+
91
+ border-bottom: 1px solid ${c.ui.background__medium.rgba};
92
+
93
+ ${({$variant:e})=>`
94
+ ${f}::before,
95
+ ${m}::before {
96
+ background-color: ${e===t.COLOURED?c.ui.background__light.rgba:c.ui.background__default.rgba};
97
+ }
98
+ `}
99
+ }
100
+
101
+ // Hover effect (only if clickable)
102
+ ${({$clickable:e})=>e&&`
103
+ &:hover:not(:disabled)::after {
104
+ ${u()}
105
+ animation: ${s.transitionMS} ease-in-out;
106
+ }
107
+ `}
108
+ `;export{h as Button,d as Container,m as HelperIconContainer,p as IconContainer,f as Label};
@@ -0,0 +1,33 @@
1
+ //#region src/molecules/IconCell/IconCell.types.d.ts
2
+ declare const IconCellColors: {
3
+ readonly GREEN: "green";
4
+ readonly RED: "red";
5
+ readonly ORANGE: "orange";
6
+ readonly BLUE: "blue";
7
+ readonly GREY: "grey";
8
+ readonly LIGHTGREY: "lightgrey";
9
+ readonly PINK: "pink";
10
+ readonly YELLOW: "yellow";
11
+ readonly PURPLE: "purple";
12
+ readonly SUCCESS: "success";
13
+ readonly WARNING: "warning";
14
+ readonly ERROR: "error";
15
+ readonly INFO: "info";
16
+ readonly DANGER: "danger";
17
+ readonly DEFAULT: "default";
18
+ };
19
+ type IconCellColor = (typeof IconCellColors)[keyof typeof IconCellColors];
20
+ declare const IconCellVariants: {
21
+ readonly DEFAULT: "default";
22
+ readonly COLOURED: "colored";
23
+ readonly SCRIBBLED_OUT: "scribbled-out";
24
+ };
25
+ type IconCellVariant = (typeof IconCellVariants)[keyof typeof IconCellVariants];
26
+ declare const IconCellStates: {
27
+ readonly DEFAULT: "default";
28
+ readonly WARNING: "warning";
29
+ readonly DANGER: "danger";
30
+ };
31
+ type IconCellState = (typeof IconCellStates)[keyof typeof IconCellStates];
32
+ //#endregion
33
+ export { IconCellColor, IconCellColors, IconCellState, IconCellStates, IconCellVariant, IconCellVariants };
@@ -0,0 +1 @@
1
+ const e={GREEN:`green`,RED:`red`,ORANGE:`orange`,BLUE:`blue`,GREY:`grey`,LIGHTGREY:`lightgrey`,PINK:`pink`,YELLOW:`yellow`,PURPLE:`purple`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`,DANGER:`danger`,DEFAULT:`default`},t={DEFAULT:`default`,COLOURED:`colored`,SCRIBBLED_OUT:`scribbled-out`},n={DEFAULT:`default`,WARNING:`warning`,DANGER:`danger`};export{e as IconCellColors,n as IconCellStates,t as IconCellVariants};
@@ -0,0 +1,8 @@
1
+ import{IconCellColors as e,IconCellStates as t,IconCellVariants as n}from"./IconCell.types.js";import{jsx as r}from"react/jsx-runtime";import{Icon as i}from"@equinor/eds-core-react";import{Theme as a,colors as o}from"src/atoms";const s=(e,t)=>e&&typeof e==`object`&&`prefix`in e?r(i,{data:e,color:t}):e,c=(t,n)=>{switch(t){case e.GREEN:case e.SUCCESS:return n===a.LIGHT?{backgroundColor:o.interactive.success__highlight.rgba,iconColor:o.dataviz.darkgreen.default}:{backgroundColor:o.dataviz.darkgreen.default,iconColor:o.dataviz.lightgreen.lighter};case e.RED:case e.ERROR:case e.DANGER:return n===a.LIGHT?{backgroundColor:o.interactive.danger__highlight.rgba,iconColor:o.interactive.danger__text.rgba}:{backgroundColor:o.ui.background__danger.rgba,iconColor:o.text.static_icons__default.rgba};case e.ORANGE:case e.WARNING:return n===a.LIGHT?{backgroundColor:o.interactive.warning__highlight.rgba,iconColor:o.dataviz.darkyellow.darker}:{backgroundColor:o.ui.background__warning.rgba,iconColor:o.text.static_icons__default.rgba};case e.BLUE:case e.INFO:return n===a.LIGHT?{backgroundColor:o.dataviz.lightblue.lighter,iconColor:o.dataviz.primary.darker}:{backgroundColor:o.dataviz.darkblue.default,iconColor:o.dataviz.lightblue.lighter};case e.LIGHTGREY:return n===a.LIGHT?{backgroundColor:o.ui.background__light.rgba,iconColor:o.dataviz.lightgray.darker}:{backgroundColor:o.ui.background__heavy.rgba,iconColor:o.text.static_icons__secondary.rgba};case e.PINK:return n===a.LIGHT?{backgroundColor:o.dataviz.darkpink.lighter,iconColor:o.dataviz.darkpink.darker}:{backgroundColor:o.dataviz.darkpink.darker,iconColor:o.dataviz.darkpink.lighter};case e.YELLOW:return n===a.LIGHT?{backgroundColor:o.dataviz.lightyellow.lighter,iconColor:o.dataviz.darkyellow.darker}:{backgroundColor:o.dataviz.darkyellow.darker,iconColor:o.dataviz.lightyellow.lighter};case e.PURPLE:return n===a.LIGHT?{backgroundColor:o.dataviz.lightpurple.lighter,iconColor:o.dataviz.darkpurple.darker}:{backgroundColor:o.dataviz.darkpurple.darker,iconColor:o.dataviz.lightpurple.lighter};case e.GREY:default:return n===a.LIGHT?{backgroundColor:o.ui.background__medium.rgba,iconColor:o.text.static_icons__default.rgba}:{backgroundColor:o.ui.background__light.rgba,iconColor:o.text.static_icons__default.rgba}}},l={[t.DANGER]:o.interactive.danger__resting.rgba,[t.WARNING]:o.interactive.warning__resting.rgba},u={[t.DANGER]:o.ui.background__danger.rgba,[t.WARNING]:o.ui.background__warning.rgba},d=(e,t)=>{let n=t?l[t]:void 0;return n??e},f=({$noBottomBorder:e,$state:t,$backgroundColor:n})=>{let r=e?n:d(o.ui.background__medium.rgba,t);return`1px solid ${r}`},p=e=>d(o.text.static_icons__default.rgba,e),m=({$variant:e,$state:r,$backgroundColor:i=o.ui.background__default.rgba})=>e===n.SCRIBBLED_OUT?`repeating-linear-gradient(
2
+ 20deg,
3
+ ${o.ui.background__light_medium.rgba} 0px,
4
+ ${o.ui.background__default.rgba} 1px,
5
+ ${o.ui.background__default.rgba} 10px,
6
+ ${o.ui.background__light_medium.rgba} 11px,
7
+ ${o.ui.background__light_medium.rgba} 12px
8
+ )`:e===n.COLOURED?r===t.DANGER?u[t.DANGER]:r===t.WARNING?u[t.WARNING]:i:`transparent`;export{m as getBackground,f as getBorderBottom,c as getIconCellColor,p as getSelectedBorder,s as renderContent,u as stateBGColor};
@@ -1 +1 @@
1
- import e from"./CopyText.js";import t,{forwardRef as n}from"react";import{Typography as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=n(({title:t,content:n,copyableContent:o,capitalizeContent:s},c)=>{if(typeof n!=`string`&&(o||s))throw Error(`copyableContent and capitalizeContent only works when content is string`);let l=typeof n==`string`?i(r,{variant:`h6`,children:s?n.toUpperCase():n}):n;return a(`div`,{ref:c,children:[i(r,{group:`paragraph`,variant:`overline`,children:t?.toUpperCase()}),o&&typeof n==`string`?i(e,{textToCopy:n,children:l}):l]})});o.displayName=`InfoElement`;export{o as InfoElement};
1
+ import e,{forwardRef as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{Typography as i}from"@equinor/eds-core-react";import a from"src/molecules/InfoElement/CopyText";const o=t(({title:e,content:t,copyableContent:o,capitalizeContent:s},c)=>{if(typeof t!=`string`&&(o||s))throw Error(`copyableContent and capitalizeContent only works when content is string`);let l=typeof t==`string`?n(i,{variant:`h6`,children:s?t.toUpperCase():t}):t;return r(`div`,{ref:c,children:[n(i,{group:`paragraph`,variant:`overline`,children:e?.toUpperCase()}),o&&typeof t==`string`?n(a,{textToCopy:t,children:l}):l]})});o.displayName=`InfoElement`;export{o as InfoElement};
@@ -1,32 +1,32 @@
1
- import{animation as e}from"../../atoms/style/animation.js";import{colors as t}from"../../atoms/style/colors.js";import{spacings as n}from"../../atoms/style/spacings.js";import{renderContent as r}from"./ListItem.utils.js";import{forwardRef as i}from"react";import{Typography as a}from"@equinor/eds-core-react";import o,{css as s}from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=o.button`
1
+ import{forwardRef as e}from"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r,{css as i}from"styled-components";import{Typography as a}from"@equinor/eds-core-react";import{animation as o,colors as s,spacings as c}from"src/atoms/style";import{renderContent as l}from"src/molecules/ListItem/ListItem.utils";const u=r.button`
2
2
  display: flex;
3
- gap: ${n.small};
3
+ gap: ${c.small};
4
4
  align-items: center;
5
5
  min-width: 210px;
6
- padding: ${({$isChild:e,$borderBottom:t})=>{let r=`${n.small} ${n.large} ${n.small}`;return t&&(r=`${n.small} ${n.large} calc(${n.small} - 1px)`),e?`${r} ${n.xx_large}`:`${r} ${n.medium}`}};
7
- background: ${({$selected:e})=>e?t.interactive.primary__selected_highlight.rgba:`transparent`};
8
- transition: background ${e.transitionMS};
9
- ${({$borderBottom:e})=>e?s`
10
- border-bottom: 1px solid ${t.ui.background__medium.rgba};
6
+ padding: ${({$isChild:e,$borderBottom:t})=>{let n=`${c.small} ${c.large} ${c.small}`;return t&&(n=`${c.small} ${c.large} calc(${c.small} - 1px)`),e?`${n} ${c.xx_large}`:`${n} ${c.medium}`}};
7
+ background: ${({$selected:e})=>e?s.interactive.primary__selected_highlight.rgba:`transparent`};
8
+ transition: background ${o.transitionMS};
9
+ ${({$borderBottom:e})=>e?i`
10
+ border-bottom: 1px solid ${s.ui.background__medium.rgba};
11
11
  `:``}
12
12
  &:disabled {
13
13
  cursor: not-allowed;
14
14
  background: transparent;
15
15
  > section > p {
16
- color: ${t.interactive.disabled__text.rgba};
16
+ color: ${s.interactive.disabled__text.rgba};
17
17
  }
18
18
  }
19
19
  &:focus:not(:disabled) {
20
- outline: 1px dashed ${t.interactive.primary__resting.rgba};
20
+ outline: 1px dashed ${s.interactive.primary__resting.rgba};
21
21
  }
22
22
  &:hover:not(:disabled) {
23
- background: ${({$selected:e})=>e?t.interactive.primary__selected_hover.rgba:t.interactive.primary__hover_alt.rgba};
23
+ background: ${({$selected:e})=>e?s.interactive.primary__selected_hover.rgba:s.interactive.primary__hover_alt.rgba};
24
24
  }
25
25
  > section {
26
- padding: ${n.small} 0};
26
+ padding: ${c.small} 0};
27
27
  }
28
- `,d=o.span`
28
+ `,d=r.span`
29
29
  margin-left: auto;
30
30
  display: flex;
31
31
  align-items: center;
32
- `,f=i(({label:e,onClick:t,onFocus:n,onBlur:i,className:o,disabled:s=!1,leadingContent:f,trailingContent:p,isChild:m=!1,selected:h=!1,borderBottom:g=!1},_)=>l(u,{ref:_,className:o,$isChild:m,$selected:h,$borderBottom:g,disabled:s,onClick:t,onFocus:n,onBlur:i,children:[f&&r(f),c(`section`,{children:c(a,{variant:`button`,group:`navigation`,children:e})}),p&&c(d,{children:r(p)})]}));f.displayName=`ListItem`;export{f as ListItem};
32
+ `,f=e(({label:e,onClick:r,onFocus:i,onBlur:o,className:s,disabled:c=!1,leadingContent:f,trailingContent:p,isChild:m=!1,selected:h=!1,borderBottom:g=!1},_)=>n(u,{ref:_,className:s,$isChild:m,$selected:h,$borderBottom:g,disabled:c,onClick:r,onFocus:i,onBlur:o,children:[f&&l(f),t(`section`,{children:t(a,{variant:`button`,group:`navigation`,children:e})}),p&&t(d,{children:l(p)})]}));f.displayName=`ListItem`;export{f as ListItem};
@@ -1 +1 @@
1
- import{StyledOption as e,StyledOptionItem as t,StyledOptionWrapper as n}from"./OptionDrawer.styles.js";import{getStatus as r}from"./OptionDrawer.utils.js";import{useEffect as i,useState as a}from"react";import{Button as o,Checkbox as s,Icon as c}from"@equinor/eds-core-react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{chevron_down as d,chevron_right as f}from"@equinor/eds-icons";const p=({item:m,onToggle:h,section:g=0,selectedItems:_=[],singleSelect:v=!1,openAll:y,showIntermediateParent:b=!1,parentHasNestedItems:x=!1})=>{let[S,C]=a(!1),[w,T]=a(r(m,_,v,b));i(()=>{T(r(m,_,v,b))},[m,_,v,b]),i(()=>{C(!!y)},[y]);let E=e=>{m.children&&m.children.length!==0&&C(e=>!e);let t=m.children?.length!==0&&!v&&m.children!==void 0?[...m.children]:[m];w===`CHECKED`?(h({items:t,toggle:!1,event:e}),C(!1)):(w===`NONE`||w===`INTERMEDIATE`)&&(h({items:t,toggle:!0,event:e}),C(!0))},D=()=>{C(e=>!e)},O=m.children&&m.children.length!==0;return u(n,{$section:g,"data-testid":m.id,children:[u(t,{$paddedLeft:x&&!O,children:[O&&l(o,{variant:`ghost_icon`,onClick:D,"data-testid":`chevron-toggler-option-drawer`,children:l(c,{data:S?d:f})}),u(e,{$section:g,onClick:E,disabled:!!m.disabled,children:[l(s,{indeterminate:w===`INTERMEDIATE`,checked:w===`CHECKED`,color:`secondary`,disabled:!!m.disabled,onChange:()=>null}),m.label]})]}),S&&m.children?.map(e=>l(p,{section:g+1,onToggle:h,selectedItems:_,item:e,singleSelect:v,openAll:y,showIntermediateParent:b,parentHasNestedItems:!0},`OptionDrawer-${e.id}`))]},`StyledOptionWrapper-${m.id}`)};p.displayName=`OptionDrawer`;export{p as OptionDrawer};
1
+ import{useEffect as e,useState as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{chevron_down as i,chevron_right as a}from"@equinor/eds-icons";import{Button as o,Checkbox as s,Icon as c}from"@equinor/eds-core-react";import{StyledOption as l,StyledOptionItem as u,StyledOptionWrapper as d}from"src/molecules/OptionDrawer/OptionDrawer.styles";import{getStatus as f}from"src/molecules/OptionDrawer/OptionDrawer.utils";const p=({item:m,onToggle:h,section:g=0,selectedItems:_=[],singleSelect:v=!1,openAll:y,showIntermediateParent:b=!1,parentHasNestedItems:x=!1})=>{let[S,C]=t(!1),[w,T]=t(f(m,_,v,b));e(()=>{T(f(m,_,v,b))},[m,_,v,b]),e(()=>{C(!!y)},[y]);let E=e=>{m.children&&m.children.length!==0&&C(e=>!e);let t=m.children?.length!==0&&!v&&m.children!==void 0?[...m.children]:[m];w===`CHECKED`?(h({items:t,toggle:!1,event:e}),C(!1)):(w===`NONE`||w===`INTERMEDIATE`)&&(h({items:t,toggle:!0,event:e}),C(!0))},D=()=>{C(e=>!e)},O=m.children&&m.children.length!==0;return r(d,{$section:g,"data-testid":m.id,children:[r(u,{$paddedLeft:x&&!O,children:[O&&n(o,{variant:`ghost_icon`,onClick:D,"data-testid":`chevron-toggler-option-drawer`,children:n(c,{data:S?i:a})}),r(l,{$section:g,onClick:E,disabled:!!m.disabled,children:[n(s,{indeterminate:w===`INTERMEDIATE`,checked:w===`CHECKED`,color:`secondary`,disabled:!!m.disabled,onChange:()=>null}),m.label]})]}),S&&m.children?.map(e=>n(p,{section:g+1,onToggle:h,selectedItems:_,item:e,singleSelect:v,openAll:y,showIntermediateParent:b,parentHasNestedItems:!0},`OptionDrawer-${e.id}`))]},`StyledOptionWrapper-${m.id}`)};p.displayName=`OptionDrawer`;export{p as OptionDrawer};
@@ -1,4 +1,4 @@
1
- import * as react26 from "react";
1
+ import * as react15 from "react";
2
2
  import { TooltipProps } from "@equinor/eds-core-react";
3
3
  import * as _floating_ui_utils0 from "@floating-ui/utils";
4
4
 
@@ -6,14 +6,14 @@ import * as _floating_ui_utils0 from "@floating-ui/utils";
6
6
  type OptionalTooltipProps = {
7
7
  textTransform?: string;
8
8
  } & TooltipProps;
9
- declare const OptionalTooltip: react26.ForwardRefExoticComponent<{
9
+ declare const OptionalTooltip: react15.ForwardRefExoticComponent<{
10
10
  textTransform?: string;
11
11
  } & {
12
12
  placement?: _floating_ui_utils0.Placement;
13
- title?: react26.ReactNode;
13
+ title?: react15.ReactNode;
14
14
  children: React.ReactElement & React.RefAttributes<HTMLElement>;
15
15
  enterDelay?: number;
16
16
  portalContainer?: HTMLElement;
17
- } & Omit<react26.HTMLAttributes<HTMLDivElement>, "title"> & react26.RefAttributes<HTMLDivElement>>;
17
+ } & Omit<react15.HTMLAttributes<HTMLDivElement>, "title"> & react15.RefAttributes<HTMLDivElement>>;
18
18
  //#endregion
19
19
  export { OptionalTooltip, OptionalTooltipProps };
@@ -1,4 +1,4 @@
1
- import{forwardRef as e}from"react";import{Tooltip as t}from"@equinor/eds-core-react";import n from"styled-components";import{Fragment as r,jsx as i}from"react/jsx-runtime";const a=n(t)`
1
+ import{forwardRef as e}from"react";import{Fragment as t,jsx as n}from"react/jsx-runtime";import r from"styled-components";import{Tooltip as i}from"@equinor/eds-core-react";const a=r(i)`
2
2
  color: white;
3
3
  text-transform: ${e=>e.textTransform};
4
- `,o=e(({title:e,children:t,...n},o)=>e===void 0?i(r,{children:t}):i(a,{ref:o,title:e,...n,children:t}));o.displayName=`OptionalTooltip`;export{o as OptionalTooltip};
4
+ `,o=e(({title:e,children:r,...i},o)=>e===void 0?n(t,{children:r}):n(a,{ref:o,title:e,...i,children:r}));o.displayName=`OptionalTooltip`;export{o as OptionalTooltip};
@@ -1,4 +1,4 @@
1
- import * as react24 from "react";
1
+ import * as react19 from "react";
2
2
 
3
3
  //#region src/molecules/ProfileAvatar/ProfileAvatar.d.ts
4
4
  interface ProfileAvatarProps {
@@ -7,6 +7,6 @@ interface ProfileAvatarProps {
7
7
  size?: 'small' | 'small-medium' | 'medium' | 'large' | 'x-large' | number;
8
8
  disabled?: boolean;
9
9
  }
10
- declare const ProfileAvatar: react24.ForwardRefExoticComponent<ProfileAvatarProps & react24.RefAttributes<HTMLDivElement>>;
10
+ declare const ProfileAvatar: react19.ForwardRefExoticComponent<ProfileAvatarProps & react19.RefAttributes<HTMLDivElement>>;
11
11
  //#endregion
12
12
  export { ProfileAvatar, ProfileAvatarProps };
@@ -1,12 +1,12 @@
1
- import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{colors as t}from"../../atoms/style/colors.js";import{forwardRef as n,useMemo as r}from"react";import{Avatar as i,Icon as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s}from"react/jsx-runtime";import{person as c}from"@equinor/eds-icons";const{shape:l,typography:u}=e,d=[t.infographic.primary__energy_red_55.rgba,t.infographic.primary__moss_green_55.rgba,t.infographic.substitute__green_mint.rgba,t.infographic.substitute__blue_overcast.rgba];function f(e){let t=e.replace(/ *\([^)]*\) */g,``).toUpperCase(),n=t.split(` `),r=t.includes(`,`),i=e=>{let t=e.split(`,`);return t[1].trim().charAt(0)};if(n.length===1&&n[0]!==``)return n[0].charAt(0);if(r)return i(t)+n[0].charAt(0);if(n.length>=2)return n[0].charAt(0)+n[n.length-1].charAt(0)}function p(e){let t=0;if(e)for(let n=0;n<e.length;n++)t+=e.charCodeAt(n);return d[t%d.length]}const m=o.div`
1
+ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{forwardRef as t,useMemo as n}from"react";import{jsx as r}from"react/jsx-runtime";import{person as i}from"@equinor/eds-icons";import a from"styled-components";import{Avatar as o,Icon as s}from"@equinor/eds-core-react";import{colors as c}from"src/atoms/style";const{shape:l,typography:u}=e,d=[c.infographic.primary__energy_red_55.rgba,c.infographic.primary__moss_green_55.rgba,c.infographic.substitute__green_mint.rgba,c.infographic.substitute__blue_overcast.rgba];function f(e){let t=e.replace(/ *\([^)]*\) */g,``).toUpperCase(),n=t.split(` `),r=t.includes(`,`),i=e=>{let t=e.split(`,`);return t[1].trim().charAt(0)};if(n.length===1&&n[0]!==``)return n[0].charAt(0);if(r)return i(t)+n[0].charAt(0);if(n.length>=2)return n[0].charAt(0)+n[n.length-1].charAt(0)}function p(e){let t=0;if(e)for(let n=0;n<e.length;n++)t+=e.charCodeAt(n);return d[t%d.length]}const m=a.div`
2
2
  width: ${e=>e.$size}px;
3
3
  height: ${e=>e.$size}px;
4
4
  position: relative;
5
5
  font-size: ${e=>e.$fontSize}px;
6
6
  font-family: ${u.heading.h6.fontFamily};
7
7
  border-radius: ${l.circle.borderRadius};
8
- background: ${e=>e.disabled?t.interactive.disabled__border.rgba:e.$background};
9
- color: ${e=>e.disabled?t.text.static_icons__default.rgba:t.text.static_icons__primary_white.rgba};
8
+ background: ${e=>e.disabled?c.interactive.disabled__border.rgba:e.$background};
9
+ color: ${e=>e.disabled?c.text.static_icons__default.rgba:c.text.static_icons__primary_white.rgba};
10
10
  display: flex;
11
11
  justify-content: center;
12
12
  align-items: center;
@@ -14,13 +14,13 @@ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/ind
14
14
  line-height: ${e=>e.$fontSize-4}px;
15
15
  height: ${e=>e.$fontSize-4}px;
16
16
  }
17
- `,h=o(a)`
17
+ `,h=a(s)`
18
18
  width: 70%;
19
- `,g=o.div`
19
+ `,g=a.div`
20
20
  width: ${({$size:e})=>e}px;
21
21
  height: ${({$size:e})=>e}px;
22
22
  > div {
23
23
  width: inherit;
24
24
  height: inherit;
25
25
  }
26
- `,_=n(({url:e,name:t,size:n=`medium`,disabled:a=!1},o)=>{let l=r(()=>!t||t.trim().length===0?s(h,{data:c}):f(t),[t]),u=r(()=>{switch(n){case`small`:return 16;case`small-medium`:return 24;case`medium`:case void 0:return 32;case`large`:return 40;case`x-large`:return 48;default:return n}},[n]),d=r(()=>{switch(n){case`small`:return 6;case`small-medium`:return 10;case`medium`:case void 0:return 14;case`large`:return 16;case`x-large`:return 18;default:return n/2}},[n]),_=r(()=>{if(e)try{if(btoa(atob(e))===e)return`data:image/png;base64, ${e}`}catch{return e}return``},[e]);return _===``?s(m,{$background:p(t),$size:u,$fontSize:d,disabled:a,ref:o,children:s(`span`,{children:l})}):s(g,{$size:u,"data-testid":`avatar-wrapper`,children:s(i,{alt:`user-avatar-${t}`,src:_,disabled:a,ref:o})})});_.displayName=`ProfileAvatar`;export{_ as ProfileAvatar};
26
+ `,_=t(({url:e,name:t,size:a=`medium`,disabled:s=!1},c)=>{let l=n(()=>!t||t.trim().length===0?r(h,{data:i}):f(t),[t]),u=n(()=>{switch(a){case`small`:return 16;case`small-medium`:return 24;case`medium`:case void 0:return 32;case`large`:return 40;case`x-large`:return 48;default:return a}},[a]),d=n(()=>{switch(a){case`small`:return 6;case`small-medium`:return 10;case`medium`:case void 0:return 14;case`large`:return 16;case`x-large`:return 18;default:return a/2}},[a]),_=n(()=>{if(e)try{if(btoa(atob(e))===e)return`data:image/png;base64, ${e}`}catch{return e}return``},[e]);return _===``?r(m,{$background:p(t),$size:u,$fontSize:d,disabled:s,ref:c,children:r(`span`,{children:l})}):r(g,{$size:u,"data-testid":`avatar-wrapper`,children:r(o,{alt:`user-avatar-${t}`,src:_,disabled:s,ref:c})})});_.displayName=`ProfileAvatar`;export{_ as ProfileAvatar};
@@ -1 +1 @@
1
- import{DEFAULT_FEATURES as e}from"../RichTextEditor/RichTextEditor.types.js";import{useAmplifyKit as t}from"../../atoms/hooks/useAmplifyKit.js";import{EditorContent as n,EditorStyling as r}from"../RichTextEditor/RichTextEditor.styles.js";import{useEffect as i,useRef as a}from"react";import{jsx as o}from"react/jsx-runtime";import{useEditor as s}from"@tiptap/react";const c=({value:c,imgReadToken:l,onImageRead:u,lightBackground:d=!0,padding:f=`md`,extensions:p,children:m,...h})=>{let g=t({features:e,onImageRead:u}),_=s({shouldRerenderOnTransaction:!0,extensions:p||[g],content:l?c?.replaceAll(/(<img src=")(.+)("\/>)/g,`$1$2?${l}$3`):c,editable:!1}),v=a(c);return i(()=>{_&&c&&c!==v.current&&(_.commands.setContent(c),v.current=c)},[_,c]),_?m?m(_):o(r,{$lightBackground:d,$padding:f,...h,children:o(n,{editor:_,readOnly:!0})}):null};export{c as RichTextDisplay};
1
+ import{useEffect as e,useRef as t}from"react";import{jsx as n}from"react/jsx-runtime";import{DEFAULT_FEATURES as r}from"src/molecules/RichTextEditor/RichTextEditor.types";import{useEditor as i}from"@tiptap/react";import{useAmplifyKit as a}from"src/atoms/hooks/useAmplifyKit";import{EditorContent as o,EditorStyling as s}from"src/molecules/RichTextEditor/RichTextEditor.styles";const c=({value:c,imgReadToken:l,onImageRead:u,lightBackground:d=!0,padding:f=`md`,extensions:p,children:m,...h})=>{let g=a({features:r,onImageRead:u}),_=i({shouldRerenderOnTransaction:!0,extensions:p||[g],content:l?c?.replaceAll(/(<img src=")(.+)("\/>)/g,`$1$2?${l}$3`):c,editable:!1}),v=t(c);return e(()=>{_&&c&&c!==v.current&&(_.commands.setContent(c),v.current=c)},[_,c]),_?m?m(_):n(s,{$lightBackground:d,$padding:f,...h,children:n(o,{editor:_,readOnly:!0})}):null};export{c as RichTextDisplay};
@@ -1 +1 @@
1
- import{useAmplifyKit as e}from"../../atoms/hooks/useAmplifyKit.js";import{useEffect as t,useRef as n}from"react";import{useEditor as r}from"@tiptap/react";import{useQueryClient as i}from"@tanstack/react-query";const a=({children:a,content:o,features:s,placeholder:c,onUpdate:l,onImageUpload:u,onImageRead:d,onImageRemove:f,onRemovedImagesChange:p,extensions:m=[]})=>{let h=e({features:s,placeholder:c,onImageUpload:u,onImageRead:d}),g=i(),_=n([]),v=n([]),y=n([]),b=e=>{let t=[];e.getJSON().content?.forEach(e=>{e.type===`image`&&e.attrs?.src&&t.push(e.attrs.src)});for(let e of t)if(!_.current.includes(e))_.current.push(e);else if(_.current.includes(e)&&f){let t=g.getQueryData([e]);if(t){let n=t.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[n.length-1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);let s=new File([o],e,{type:r});u?.(s)}}let n=_.current.filter(e=>!t.includes(e)&&!v.current.includes(e));if(f)for(let e of n)f?.(e),v.current.push(e);p&&y.current.length!==n.length&&(p(v.current),y.current=n)},x=r({content:o,shouldRerenderOnTransaction:!0,extensions:[h,...m],onCreate:({editor:e})=>{b(e)},onUpdate:({editor:e})=>{b(e),l?.(e.getHTML())}});return t(()=>{x&&o!==x.getHTML()&&x.commands.setContent(o||``)},[o]),x?a(x):null};export{a as EditorProvider};
1
+ import{useEffect as e,useRef as t}from"react";import{useQueryClient as n}from"@tanstack/react-query";import{useEditor as r}from"@tiptap/react";import{useAmplifyKit as i}from"src/atoms/hooks/useAmplifyKit";const a=({children:a,content:o,features:s,placeholder:c,onUpdate:l,onImageUpload:u,onImageRead:d,onImageRemove:f,onRemovedImagesChange:p,extensions:m=[]})=>{let h=i({features:s,placeholder:c,onImageUpload:u,onImageRead:d}),g=n(),_=t([]),v=t([]),y=t([]),b=e=>{let t=[];e.getJSON().content?.forEach(e=>{e.type===`image`&&e.attrs?.src&&t.push(e.attrs.src)});for(let e of t)if(!_.current.includes(e))_.current.push(e);else if(_.current.includes(e)&&f){let t=g.getQueryData([e]);if(t){let n=t.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[n.length-1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);let s=new File([o],e,{type:r});u?.(s)}}let n=_.current.filter(e=>!t.includes(e)&&!v.current.includes(e));if(f)for(let e of n)f?.(e),v.current.push(e);p&&y.current.length!==n.length&&(p(v.current),y.current=n)},x=r({content:o,shouldRerenderOnTransaction:!0,extensions:[h,...m],onCreate:({editor:e})=>{b(e)},onUpdate:({editor:e})=>{b(e),l?.(e.getHTML())}});return e(()=>{x&&o!==x.getHTML()&&x.commands.setContent(o||``)},[o]),x?a(x):null};export{a as EditorProvider};
@@ -1 +1 @@
1
- import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import{useRef as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{camera_add_photo as o}from"@equinor/eds-icons";const s=({onImageUpload:s,editor:c,features:l})=>{let u=n(null);if(l&&!l.includes(e.IMAGES))return null;let d=()=>{u.current&&u.current.click()},f=async e=>{let t=e.target.files;if(!t?.[0]){console.error(`Files undefined`);return}let n=await s?.(t[0]);n&&c?.chain().focus().setImage({src:n.src,alt:n.alt}).run()};return a(r,{children:[i(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange:f,style:{display:`none`},accept:`image/*, video/*`}),i(t.Button,{"data-testid":`add-image-button`,icon:o,onClick:d,tooltip:`Add Image`})]})};export{s as AddImageButton};
1
+ import{EditorMenu as e}from"./MenuBar.js";import{useRef as t}from"react";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{RichTextEditorFeatures as a}from"src/molecules/RichTextEditor/RichTextEditor.types";import{camera_add_photo as o}from"@equinor/eds-icons";const s=({onImageUpload:s,editor:c,features:l})=>{let u=t(null);if(l&&!l.includes(a.IMAGES))return null;let d=()=>{u.current&&u.current.click()},f=async e=>{let t=e.target.files;if(!t?.[0]){console.error(`Files undefined`);return}let n=await s?.(t[0]);n&&c?.chain().focus().setImage({src:n.src,alt:n.alt}).run()};return i(n,{children:[r(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange:f,style:{display:`none`},accept:`image/*, video/*`}),r(e.Button,{"data-testid":`add-image-button`,icon:o,onClick:d,tooltip:`Add Image`})]})};export{s as AddImageButton};
@@ -1,7 +1,7 @@
1
1
  import { EditorPanel, ImageExtensionFnProps, RichTextEditorFeatures } from "../RichTextEditor.types.js";
2
2
  import { MenuButtonProps } from "./MenuButton.js";
3
3
  import { AddImageProps } from "./AddImageButton.js";
4
- import * as react32 from "react";
4
+ import * as react30 from "react";
5
5
  import { FC } from "react";
6
6
  import * as styled_components0 from "styled-components";
7
7
  import { Editor } from "@tiptap/react";
@@ -14,10 +14,10 @@ interface MenuBarProps extends Pick<ImageExtensionFnProps, 'onImageUpload'> {
14
14
  }
15
15
  declare const AmplifyBar: FC<MenuBarProps>;
16
16
  declare const EditorMenu: {
17
- Bar: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react32.DetailedHTMLProps<react32.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
18
- Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react32.DetailedHTMLProps<react32.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
- Button: react32.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react32.RefAttributes<HTMLButtonElement>>;
20
- Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react32.DetailedHTMLProps<react32.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
17
+ Bar: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react30.DetailedHTMLProps<react30.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
18
+ Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react30.DetailedHTMLProps<react30.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
+ Button: react30.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react30.RefAttributes<HTMLButtonElement>>;
20
+ Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react30.DetailedHTMLProps<react30.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
21
21
  AddImageButton: FC<AddImageProps>;
22
22
  };
23
23
  declare const EditorText: {
@@ -1,10 +1,10 @@
1
- import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{MenuSection as n}from"./MenuBar.styles.js";import{MenuButton as r}from"./MenuButton.js";import{TextTable as i}from"./Table/Table.js";import{TableMenuBar as a}from"./Table/TableBar.js";import{AddImageButton as o}from"./AddImageButton.js";import{TextAlignment as s}from"./TextAlignment.js";import{TextClearFormatting as c}from"./TextClearFormatting.js";import{TextCode as l}from"./TextCode.js";import{TextColor as u}from"./TextColor.js";import{TextFormatting as d}from"./TextFormatting.js";import{TextHeaders as f}from"./TextHeaders.js";import{TextHighlight as p}from"./TextHighlight.js";import{TextHistory as m}from"./TextHistory.js";import{TextLinks as h}from"./TextLinks.js";import{TextLists as g}from"./TextLists.js";import _ from"styled-components";import{jsx as v,jsxs as y}from"react/jsx-runtime";const b=_.div`
1
+ import{MenuSection as e}from"./MenuBar.styles.js";import{MenuButton as t}from"./MenuButton.js";import{TextTable as n}from"./Table/Table.js";import{TableMenuBar as r}from"./Table/TableBar.js";import{AddImageButton as i}from"./AddImageButton.js";import{TextAlignment as a}from"./TextAlignment.js";import{TextClearFormatting as o}from"./TextClearFormatting.js";import{TextCode as s}from"./TextCode.js";import{TextColor as c}from"./TextColor.js";import{TextFormatting as l}from"./TextFormatting.js";import{TextHeaders as u}from"./TextHeaders.js";import{TextHighlight as d}from"./TextHighlight.js";import{TextHistory as f}from"./TextHistory.js";import{TextLinks as p}from"./TextLinks.js";import{TextLists as m}from"./TextLists.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";import{colors as v,spacings as y}from"src/atoms/style";const b=_.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  `,x=_.div`
5
5
  display: flex;
6
6
  flex-wrap: wrap;
7
- gap: ${t.small};
8
- padding: ${t.small};
9
- border-bottom: 1px solid ${e.ui.background__medium.rgba};
10
- `,S=({editor:e,features:t,onImageUpload:n})=>t.length===0?null:y(b,{children:[y(x,{children:[v(m,{editor:e,features:t}),v(d,{editor:e,features:t}),v(f,{editor:e,features:t}),v(g,{editor:e,features:t}),v(u,{editor:e,features:t}),v(p,{editor:e,features:t}),v(l,{editor:e,features:t}),v(s,{editor:e,features:t}),v(h,{editor:e,features:t}),v(o,{editor:e,features:t,onImageUpload:n}),v(i,{editor:e,features:t}),v(c,{editor:e,features:t})]}),v(a,{editor:e})]}),C={Bar:x,Bars:b,Button:r,Section:n,AddImageButton:o},w={History:m,Formatting:d,Headers:f,Lists:g,Color:u,Code:l,Links:h,Table:i,TableBar:a,Alignment:s,ClearFormatting:c};export{S as AmplifyBar,C as EditorMenu,w as EditorText};
7
+ gap: ${y.small};
8
+ padding: ${y.small};
9
+ border-bottom: 1px solid ${v.ui.background__medium.rgba};
10
+ `,S=({editor:e,features:t,onImageUpload:_})=>t.length===0?null:g(b,{children:[g(x,{children:[h(f,{editor:e,features:t}),h(l,{editor:e,features:t}),h(u,{editor:e,features:t}),h(m,{editor:e,features:t}),h(c,{editor:e,features:t}),h(d,{editor:e,features:t}),h(s,{editor:e,features:t}),h(a,{editor:e,features:t}),h(p,{editor:e,features:t}),h(i,{editor:e,features:t,onImageUpload:_}),h(n,{editor:e,features:t}),h(o,{editor:e,features:t})]}),h(r,{editor:e})]}),C={Bar:x,Bars:b,Button:t,Section:e,AddImageButton:i},w={History:f,Formatting:l,Headers:u,Lists:m,Color:c,Code:s,Links:p,Table:n,TableBar:r,Alignment:a,ClearFormatting:o};export{S as AmplifyBar,C as EditorMenu,w as EditorText};
@@ -1,4 +1,4 @@
1
- import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{colors as t}from"../../../atoms/style/colors.js";import n from"styled-components";const{spacings:r,shape:i}=e,a=n.section`
1
+ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import t from"styled-components";import{colors as n}from"src/atoms/style";const{spacings:r,shape:i}=e,a=t.section`
2
2
  display: flex;
3
3
  > div:not(:first-child):not(:last-child) {
4
4
  > button {
@@ -17,7 +17,7 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
17
17
  border-top-left-radius: 0;
18
18
  }
19
19
  }
20
- `,o=n.button`
20
+ `,o=t.button`
21
21
  display: flex;
22
22
  align-items: center;
23
23
  border-radius: ${i.button.borderRadius};
@@ -43,6 +43,6 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
43
43
  }
44
44
 
45
45
  &:disabled > svg {
46
- fill: ${t.interactive.disabled__text.rgba};
46
+ fill: ${n.interactive.disabled__text.rgba};
47
47
  }
48
- `,s=e=>e.$active?t.ui.background__light.rgba:t.interactive.primary__resting.rgba,c=e=>e.$active?t.text.static_icons__primary_white.rgba:t.interactive.primary__hover.rgba,l=e=>e.$active?t.interactive.primary__resting.rgba:t.ui.background__light.rgba,u=e=>e.$active?t.interactive.primary__hover.rgba:t.interactive.primary__hover_alt.rgba;export{o as MenuButtonStyle,a as MenuSection};
48
+ `,s=e=>e.$active?n.ui.background__light.rgba:n.interactive.primary__resting.rgba,c=e=>e.$active?n.text.static_icons__primary_white.rgba:n.interactive.primary__hover.rgba,l=e=>e.$active?n.interactive.primary__resting.rgba:n.ui.background__light.rgba,u=e=>e.$active?n.interactive.primary__hover.rgba:n.interactive.primary__hover_alt.rgba;export{o as MenuButtonStyle,a as MenuSection};
@@ -1 +1 @@
1
- import{OptionalTooltip as e}from"../../OptionalTooltip/OptionalTooltip.js";import{MenuButtonStyle as t}from"./MenuBar.styles.js";import{forwardRef as n}from"react";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=n(({icon:n,onClick:o,active:s=!1,disabled:c=!1,tooltip:l,children:u,...d},f)=>i(e,{title:l,enterDelay:300,children:i(`div`,{children:a(t,{ref:f,$active:s,onClick:o,disabled:c,type:`button`,...d,children:[i(r,{data:n}),u]})})}));o.displayName=`MenuButton`;export{o as MenuButton};
1
+ import{MenuButtonStyle as e}from"./MenuBar.styles.js";import{forwardRef as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{Icon as i}from"@equinor/eds-core-react";import{OptionalTooltip as a}from"src/molecules/OptionalTooltip/OptionalTooltip";const o=t(({icon:t,onClick:o,active:s=!1,disabled:c=!1,tooltip:l,children:u,...d},f)=>n(a,{title:l,enterDelay:300,children:n(`div`,{children:r(e,{ref:f,$active:s,onClick:o,disabled:c,type:`button`,...d,children:[n(i,{data:t}),u]})})}));o.displayName=`MenuButton`;export{o as MenuButton};
@@ -1 +1 @@
1
- import{amplify_table_add_column_left as e,amplify_table_add_column_right as t,amplify_table_remove_column as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>{let c=()=>s.chain().focus().addColumnBefore().run(),l=()=>s.chain().focus().addColumnAfter().run(),u=()=>s.chain().focus().deleteColumn().run();return o(r,{children:[a(i,{tooltip:`Add column left`,icon:e,onClick:c,disabled:!s.can().addColumnBefore()}),a(i,{tooltip:`Add column right`,icon:t,onClick:l,disabled:!s.can().addColumnAfter()}),a(i,{tooltip:`Remove column`,icon:n,onClick:u,disabled:!s.can().deleteColumn()})]})};export{s as TableColumn};
1
+ import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{amplify_table_add_column_left as i,amplify_table_add_column_right as a,amplify_table_remove_column as o}from"src/atoms/icons/wysiwyg";const s=({editor:s})=>{let c=()=>s.chain().focus().addColumnBefore().run(),l=()=>s.chain().focus().addColumnAfter().run(),u=()=>s.chain().focus().deleteColumn().run();return r(e,{children:[n(t,{tooltip:`Add column left`,icon:i,onClick:c,disabled:!s.can().addColumnBefore()}),n(t,{tooltip:`Add column right`,icon:a,onClick:l,disabled:!s.can().addColumnAfter()}),n(t,{tooltip:`Remove column`,icon:o,onClick:u,disabled:!s.can().deleteColumn()})]})};export{s as TableColumn};
@@ -1 +1 @@
1
- import{amplify_table_merge_cells as e,amplify_table_split_cell as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>{let s=()=>o.chain().focus().mergeCells().run(),c=()=>o.chain().focus().splitCell().run();return a(n,{children:[i(r,{tooltip:`Merge selected cells`,icon:e,onClick:s,disabled:!o.can().mergeCells()}),i(r,{tooltip:`Split selected cell`,icon:t,onClick:c,disabled:!o.can().splitCell()})]})};export{o as TableMerge};
1
+ import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{amplify_table_merge_cells as i,amplify_table_split_cell as a}from"src/atoms/icons/wysiwyg";const o=({editor:o})=>{let s=()=>o.chain().focus().mergeCells().run(),c=()=>o.chain().focus().splitCell().run();return r(e,{children:[n(t,{tooltip:`Merge selected cells`,icon:i,onClick:s,disabled:!o.can().mergeCells()}),n(t,{tooltip:`Split selected cell`,icon:a,onClick:c,disabled:!o.can().splitCell()})]})};export{o as TableMerge};
@@ -1 +1 @@
1
- import{amplify_table_add_row_above as e,amplify_table_add_row_below as t,amplify_table_remove_row as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>{let c=()=>s.chain().focus().addRowAfter().run(),l=()=>s.chain().focus().addRowBefore().run(),u=()=>s.chain().focus().deleteRow().run();return o(r,{children:[a(i,{tooltip:`Add row below`,icon:t,onClick:c,disabled:!s.can().addRowAfter()}),a(i,{tooltip:`Add row above`,icon:e,onClick:l,disabled:!s.can().addRowBefore()}),a(i,{tooltip:`Remove row`,icon:n,onClick:u,disabled:!s.can().deleteRow()})]})};export{s as TableRow};
1
+ import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{amplify_table_add_row_above as i,amplify_table_add_row_below as a,amplify_table_remove_row as o}from"src/atoms/icons/wysiwyg";const s=({editor:s})=>{let c=()=>s.chain().focus().addRowAfter().run(),l=()=>s.chain().focus().addRowBefore().run(),u=()=>s.chain().focus().deleteRow().run();return r(e,{children:[n(t,{tooltip:`Add row below`,icon:a,onClick:c,disabled:!s.can().addRowAfter()}),n(t,{tooltip:`Add row above`,icon:i,onClick:l,disabled:!s.can().addRowBefore()}),n(t,{tooltip:`Remove row`,icon:o,onClick:u,disabled:!s.can().deleteRow()})]})};export{s as TableRow};
@@ -1 +1 @@
1
- import{amplify_table_column_heading as e,amplify_table_row_heading as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>{let s=()=>o.chain().focus().toggleHeaderRow().run(),c=()=>o.chain().focus().toggleHeaderColumn().run();return a(n,{children:[i(r,{tooltip:`Toggle header row`,icon:t,onClick:s,disabled:!o.can().toggleHeaderRow()}),i(r,{tooltip:`Toggle header column`,icon:e,onClick:c,disabled:!o.can().toggleHeaderColumn()})]})};export{o as ToggleTable};
1
+ import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{amplify_table_column_heading as i,amplify_table_row_heading as a}from"src/atoms/icons/wysiwyg";const o=({editor:o})=>{let s=()=>o.chain().focus().toggleHeaderRow().run(),c=()=>o.chain().focus().toggleHeaderColumn().run();return r(e,{children:[n(t,{tooltip:`Toggle header row`,icon:a,onClick:s,disabled:!o.can().toggleHeaderRow()}),n(t,{tooltip:`Toggle header column`,icon:i,onClick:c,disabled:!o.can().toggleHeaderColumn()})]})};export{o as ToggleTable};
@@ -1,4 +1,4 @@
1
- import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{RichTextEditorFeatures as t}from"../RichTextEditor.types.js";import{EditorMenu as n}from"./MenuBar.js";import r from"styled-components";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{format_clear as s}from"@equinor/eds-icons";const{colors:c}=e,l=r.hr`
1
+ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{RichTextEditorFeatures as t}from"../RichTextEditor.types.js";import{EditorMenu as n}from"./MenuBar.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{format_clear as o}from"@equinor/eds-icons";import s from"styled-components";const{colors:c}=e,l=s.hr`
2
2
  width: 1px;
3
3
  background: ${c.ui.background__medium.rgba};
4
- `,u=({editor:e,features:r})=>{let c=()=>e.chain().focus().clearNodes().unsetAllMarks().run();if(!(r&&!r.includes(t.CLEAR_FORMATTING)))return o(i,{children:[a(l,{}),a(n.Button,{icon:s,onClick:c,"data-testid":`clear-formatting`,tooltip:`Clear Formatting`})]})};export{u as TextClearFormatting};
4
+ `,u=({editor:e,features:s})=>{let c=()=>e.chain().focus().clearNodes().unsetAllMarks().run();if(!(s&&!s.includes(t.CLEAR_FORMATTING)))return a(r,{children:[i(l,{}),i(n.Button,{icon:o,onClick:c,"data-testid":`clear-formatting`,tooltip:`Clear Formatting`})]})};export{u as TextClearFormatting};
@@ -1,4 +1,4 @@
1
- import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{RichTextEditorFeatures as t}from"../RichTextEditor.types.js";import{OptionalTooltip as n}from"../../OptionalTooltip/OptionalTooltip.js";import{Icon as r}from"@equinor/eds-core-react";import i from"styled-components";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{format_color_text as s}from"@equinor/eds-icons";const{colors:c,spacings:l,shape:u}=e,d=i.div`
1
+ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{RichTextEditorFeatures as t}from"../RichTextEditor.types.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{format_color_text as i}from"@equinor/eds-icons";import a from"styled-components";import{Icon as o}from"@equinor/eds-core-react";import{OptionalTooltip as s}from"src/molecules/OptionalTooltip/OptionalTooltip";const{colors:c,spacings:l,shape:u}=e,d=a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${l.comfortable.medium};
@@ -29,17 +29,17 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
29
29
  fill: ${c.interactive.primary__hover.rgba};
30
30
  }
31
31
  }
32
- `,f=i.span`
32
+ `,f=a.span`
33
33
  position: absolute;
34
34
  left: 50%;
35
35
  top: calc(50% + ${l.comfortable.x_small} / 2);
36
36
  transform: translate(-50%, -50%);
37
37
  pointer-events: none;
38
- `,p=i.span`
38
+ `,p=a.span`
39
39
  position: absolute;
40
40
  left: 50%;
41
41
  transform: translateX(-50%);
42
42
  bottom: 5px;
43
43
  height: 4px;
44
44
  width: 24px;
45
- `,m=({editor:e,features:i})=>{let l=t=>{e.chain().focus().setColor(t.target.value).run()};return i&&!i.includes(t.TEXT_COLOR)?null:a(n,{title:`Text Color`,enterDelay:300,children:o(d,{children:[a(`input`,{type:`color`,onInput:l,"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}),a(f,{children:a(r,{data:s})}),a(p,{style:{background:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}})]})})};export{m as TextColor};
45
+ `,m=({editor:e,features:a})=>{let l=t=>{e.chain().focus().setColor(t.target.value).run()};return a&&!a.includes(t.TEXT_COLOR)?null:n(s,{title:`Text Color`,enterDelay:300,children:r(d,{children:[n(`input`,{type:`color`,onInput:l,"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}),n(f,{children:n(o,{data:i})}),n(p,{style:{background:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}})]})})};export{m as TextColor};
@@ -1 +1 @@
1
- import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{amplify_h2 as t,amplify_h3 as n}from"../../../atoms/icons/wysiwyg.js";import{EditorMenu as r}from"./MenuBar.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o,features:s})=>{let c=()=>o.chain().focus().toggleHeading({level:2}).run(),l=()=>o.chain().focus().toggleHeading({level:3}).run();if(!(s&&!s.includes(e.HEADERS)))return a(r.Section,{children:[i(r.Button,{"data-testid":`h2-button`,active:o.isActive(`heading`,{level:2}),icon:t,onClick:c,tooltip:`Heading 2`}),i(r.Button,{"data-testid":`h3-button`,active:o.isActive(`heading`,{level:3}),icon:n,onClick:l,tooltip:`Heading 3`})]})};export{o as TextHeaders};
1
+ import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{amplify_h2 as i,amplify_h3 as a}from"src/atoms/icons/wysiwyg";const o=({editor:o,features:s})=>{let c=()=>o.chain().focus().toggleHeading({level:2}).run(),l=()=>o.chain().focus().toggleHeading({level:3}).run();if(!(s&&!s.includes(e.HEADERS)))return r(t.Section,{children:[n(t.Button,{"data-testid":`h2-button`,active:o.isActive(`heading`,{level:2}),icon:i,onClick:c,tooltip:`Heading 2`}),n(t.Button,{"data-testid":`h3-button`,active:o.isActive(`heading`,{level:3}),icon:a,onClick:l,tooltip:`Heading 3`})]})};export{o as TextHeaders};
@@ -1,6 +1,6 @@
1
- import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{RichTextEditorFeatures as t}from"../RichTextEditor.types.js";import{isValidUrl as n}from"../../../atoms/utils/url.js";import{TextField as r}from"../../TextField/TextField.js";import{EditorMenu as i}from"./MenuBar.js";import{useRef as a,useState as o}from"react";import{Button as s,Icon as c,Popover as l}from"@equinor/eds-core-react";import u from"styled-components";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{link as m,link_off as h}from"@equinor/eds-icons";const{spacings:g}=e,_=u.div`
1
+ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{RichTextEditorFeatures as t}from"../RichTextEditor.types.js";import{EditorMenu as n}from"./MenuBar.js";import{useRef as r,useState as i}from"react";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";import{link as c,link_off as l}from"@equinor/eds-icons";import u from"styled-components";import{Button as d,Icon as f,Popover as p}from"@equinor/eds-core-react";import{isValidUrl as m}from"src/atoms/utils/url";import{TextField as h}from"src/molecules/TextField/TextField";const{spacings:g}=e,_=u.div`
2
2
  display: flex;
3
3
  gap: ${g.comfortable.medium};
4
4
  padding: ${g.comfortable.small};
5
5
  width: 15rem;
6
- `,v=({editor:e,features:u})=>{let[g,v]=o(!1),y=a(null),b=a(``),[x,S]=o(!1),C=()=>{v(e=>!e),e.chain().focus().setHighlight({color:`#accef7`}).run()},w=()=>{v(!1),b.current=``,e.chain().focus().unsetHighlight().run()},T=e=>{b.current=e.target.value},E=e=>{e.key===`Enter`&&D()},D=()=>{if(!n(b.current)){S(!0);return}b.current.includes(`http`)||(b.current=`https://${b.current}`),e.chain().focus().extendMarkRange(`link`).setLink({href:b.current}).run(),w(),x&&S(!1)},O=()=>e?.chain().focus().unsetLink().run();if(!(u&&!u.includes(t.LINKS)))return p(d,{children:[p(i.Section,{children:[f(i.Button,{active:g,ref:y,icon:m,onClick:C,disabled:e.state.selection.empty,"data-testid":`link-button`,tooltip:`Link`}),f(i.Button,{icon:h,onClick:O,disabled:!e.isActive(`link`),"data-testid":`unsetlink-button`,tooltip:`Remove Link`})]}),g&&f(l,{open:!0,anchorEl:y.current,onClose:w,children:p(_,{children:[f(r,{inputRef:e=>{e?.focus()},id:`link`,placeholder:`Insert link`,autoComplete:`off`,inputIcon:f(c,{data:m}),onChange:T,onKeyDown:E,variant:x?`error`:void 0}),f(s,{variant:`outlined`,onClick:D,children:`Save`})]})})]})};export{v as TextLinks};
6
+ `,v=({editor:e,features:u})=>{let[g,v]=i(!1),y=r(null),b=r(``),[x,S]=i(!1),C=()=>{v(e=>!e),e.chain().focus().setHighlight({color:`#accef7`}).run()},w=()=>{v(!1),b.current=``,e.chain().focus().unsetHighlight().run()},T=e=>{b.current=e.target.value},E=e=>{e.key===`Enter`&&D()},D=()=>{if(!m(b.current)){S(!0);return}b.current.includes(`http`)||(b.current=`https://${b.current}`),e.chain().focus().extendMarkRange(`link`).setLink({href:b.current}).run(),w(),x&&S(!1)},O=()=>e?.chain().focus().unsetLink().run();if(!(u&&!u.includes(t.LINKS)))return s(a,{children:[s(n.Section,{children:[o(n.Button,{active:g,ref:y,icon:c,onClick:C,disabled:e.state.selection.empty,"data-testid":`link-button`,tooltip:`Link`}),o(n.Button,{icon:l,onClick:O,disabled:!e.isActive(`link`),"data-testid":`unsetlink-button`,tooltip:`Remove Link`})]}),g&&o(p,{open:!0,anchorEl:y.current,onClose:w,children:s(_,{children:[o(h,{inputRef:e=>{e?.focus()},id:`link`,placeholder:`Insert link`,autoComplete:`off`,inputIcon:o(f,{data:c}),onChange:T,onKeyDown:E,variant:x?`error`:void 0}),o(d,{variant:`outlined`,onClick:D,children:`Save`})]})})]})};export{v as TextLinks};
@@ -1 +1 @@
1
- import{VARIANT_COLORS as e,VARIANT_HELPER_TEXT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{getFeatures as r}from"../../atoms/utils/richtext.js";import{getVariantIcon as i}from"../../atoms/utils/forms.js";import{EditorContent as a,EditorStyling as o,HelperWrapper as s,LabelWrapper as c,Wrapper as l}from"./RichTextEditor.styles.js";import{AmplifyBar as u}from"./MenuBar/MenuBar.js";import{EditorProvider as d}from"./EditorProvider.js";import{Icon as f,Typography as p}from"@equinor/eds-core-react";import{jsx as m,jsxs as h}from"react/jsx-runtime";const g=({value:g,onChange:_,onImageUpload:v,onImageRead:y,onImageRemove:b,onRemovedImagesChange:x,placeholder:S,features:C,extendFeatures:w,removeFeatures:T,padding:E=`md`,maxHeight:D,minHeight:O,lightBackground:k,border:A=!0,highlighted:j=!1,variant:M,label:N,meta:P,helperText:F})=>{if(b&&x)throw Error(`onImageRemove and onRemovedImagesChange cannot be used together`);let I=r({features:C,extendFeatures:w,removeFeatures:T,onImageUpload:v}),L=i(M);return m(d,{content:g,onUpdate:_,features:I,placeholder:S,onImageUpload:v,onImageRead:y,onImageRemove:b,onRemovedImagesChange:x,children:r=>h(l,{style:{height:D===void 0?`100%`:void 0},children:[N&&h(c,{children:[m(p,{variant:`label`,group:`input`,children:N}),P&&m(p,{variant:`helper`,group:`input`,children:P})]}),h(o,{"data-testid":`richtext-editor`,$border:A,$padding:E,$lightBackground:k,$highlighted:j,$variant:M,children:[m(u,{editor:r,features:I,onImageUpload:v}),m(a,{editor:r,$maxHeight:D,$minHeight:O})]}),F&&h(s,{children:[L&&M?m(f,{data:L,size:16,color:e[M]}):null,m(p,{variant:`helper`,group:`input`,color:M?t[M]:n.text.static_icons__tertiary.rgba,children:F})]})]})})};export{g as RichTextEditor};
1
+ import{AmplifyBar as e}from"./MenuBar/MenuBar.js";import{EditorProvider as t}from"./EditorProvider.js";import{EditorContent as n,EditorStyling as r,HelperWrapper as i,LabelWrapper as a,Wrapper as o}from"./RichTextEditor.styles.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{VARIANT_COLORS as l,VARIANT_HELPER_TEXT_COLORS as u,colors as d}from"src/atoms/style/colors";import{Icon as f,Typography as p}from"@equinor/eds-core-react";import{getVariantIcon as m}from"src/atoms/utils/forms";import{getFeatures as h}from"src/atoms/utils/richtext";const g=({value:g,onChange:_,onImageUpload:v,onImageRead:y,onImageRemove:b,onRemovedImagesChange:x,placeholder:S,features:C,extendFeatures:w,removeFeatures:T,padding:E=`md`,maxHeight:D,minHeight:O,lightBackground:k,border:A=!0,highlighted:j=!1,variant:M,label:N,meta:P,helperText:F})=>{if(b&&x)throw Error(`onImageRemove and onRemovedImagesChange cannot be used together`);let I=h({features:C,extendFeatures:w,removeFeatures:T,onImageUpload:v}),L=m(M);return s(t,{content:g,onUpdate:_,features:I,placeholder:S,onImageUpload:v,onImageRead:y,onImageRemove:b,onRemovedImagesChange:x,children:t=>c(o,{style:{height:D===void 0?`100%`:void 0},children:[N&&c(a,{children:[s(p,{variant:`label`,group:`input`,children:N}),P&&s(p,{variant:`helper`,group:`input`,children:P})]}),c(r,{"data-testid":`richtext-editor`,$border:A,$padding:E,$lightBackground:k,$highlighted:j,$variant:M,children:[s(e,{editor:t,features:I,onImageUpload:v}),s(n,{editor:t,$maxHeight:D,$minHeight:O})]}),F&&c(i,{children:[L&&M?s(f,{data:L,size:16,color:l[M]}):null,s(p,{variant:`helper`,group:`input`,color:M?u[M]:d.text.static_icons__tertiary.rgba,children:F})]})]})})};export{g as RichTextEditor};