@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.
- package/dist/atoms/hooks/index.js +1 -0
- package/dist/atoms/hooks/useAmplifyKit.js +1 -1
- package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
- package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
- package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/hooks/useSelect.js +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/style/index.js +1 -1
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/date.d.ts +1 -1
- package/dist/atoms/utils/richtext.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +4 -4
- package/dist/deprecated/IconToggleButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.js +1 -1
- package/dist/deprecated/OldStepper/OldStep.js +3 -3
- package/dist/deprecated/OldStepper/OldStepLine.js +2 -2
- package/dist/deprecated/OldStepper/OldStepper.js +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +4 -4
- package/dist/molecules/ApplicationIcon/ApplicationIconCollection.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Acquire.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Adca.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Bravos.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Dasha.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Fallback.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/ForecastFormatter.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/FourDInsight.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/InPress.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/JsEmbark.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/LoggingQualification.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Orca.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Premo.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Pwex.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Recap.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.js +1 -1
- package/dist/molecules/Badge/Badge.js +1 -1
- package/dist/molecules/Banner/Banner.js +1 -1
- package/dist/molecules/Banner/Banner.styles.js +3 -3
- package/dist/molecules/Button/Button.js +3 -3
- package/dist/molecules/Chip/Chip.d.ts +2 -2
- package/dist/molecules/Chip/Chip.js +1 -1
- package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
- package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
- package/dist/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/molecules/Dialog/Dialog.d.ts +1 -1
- package/dist/molecules/Dialog/Dialog.js +1 -1
- package/dist/molecules/Dialog/Dialog.styles.js +10 -10
- package/dist/molecules/Dialog/DialogAction.js +1 -1
- package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
- package/dist/molecules/EquinorLogo/EquinorLogo.js +1 -1
- package/dist/molecules/FileProgress/FileProgress.js +1 -1
- package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
- package/dist/molecules/FileUploadArea/FileUploadArea.styles.js +18 -18
- package/dist/molecules/FullPageSpinner/FullPageSpinner.js +8 -8
- package/dist/molecules/IconCell/IconCell.d.ts +54 -0
- package/dist/molecules/IconCell/IconCell.js +1 -0
- package/dist/molecules/IconCell/IconCell.styles.js +108 -0
- package/dist/molecules/IconCell/IconCell.types.d.ts +33 -0
- package/dist/molecules/IconCell/IconCell.types.js +1 -0
- package/dist/molecules/IconCell/IconCell.utils.js +8 -0
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/ListItem/ListItem.js +13 -13
- package/dist/molecules/OptionDrawer/OptionDrawer.js +1 -1
- package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
- package/dist/molecules/OptionalTooltip/OptionalTooltip.js +2 -2
- package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
- package/dist/molecules/ProfileAvatar/ProfileAvatar.js +6 -6
- package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
- package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +5 -5
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.js +5 -5
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.styles.js +4 -4
- package/dist/molecules/RichTextEditor/MenuBar/MenuButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableColumn.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableMerge.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableRow.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/ToggleTable.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextClearFormatting.js +2 -2
- package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +4 -4
- package/dist/molecules/RichTextEditor/MenuBar/TextHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +2 -2
- package/dist/molecules/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/molecules/RichTextEditor/RichTextEditor.styles.js +23 -23
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
- package/dist/molecules/RichTextEditor/index.d.ts +5 -5
- package/dist/molecules/RichTextEditor/index.js +1 -1
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/Search/Search.js +8 -8
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/ComboBox/ComboBox.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +4 -4
- package/dist/molecules/Select/Select.styles.js +61 -61
- package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
- package/dist/molecules/Select/SingleSelect/SingleSelect.js +1 -1
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -1
- package/dist/molecules/SelectionControls/Radio/Radio.js +1 -1
- package/dist/molecules/SelectionControls/SelectionControls.styles.js +24 -24
- package/dist/molecules/SelectionControls/Switch/Switch.js +1 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +9 -9
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.js +7 -7
- package/dist/molecules/Skeleton/SkeletonGradient/SkeletonGradient.js +1 -1
- package/dist/molecules/Stepper/Step/Step.js +5 -5
- package/dist/molecules/Stepper/StepLine.js +2 -2
- package/dist/molecules/Stepper/Stepper.js +4 -4
- package/dist/molecules/Tabs/Tab.js +1 -1
- package/dist/molecules/Tabs/Tab.styles.js +22 -22
- package/dist/molecules/Tabs/Tabs.js +4 -4
- package/dist/molecules/Tabs/Tabs.types.d.ts +1 -1
- package/dist/molecules/index.d.ts +5 -5
- package/dist/molecules/index.js +1 -1
- package/dist/organisms/DataGrid/DataGrid.js +6 -6
- package/dist/organisms/Faq/Faq.js +1 -1
- package/dist/organisms/Faq/Faq.styles.js +3 -3
- package/dist/organisms/Faq/Header.js +7 -7
- package/dist/organisms/FieldSelector/ChangingField.js +8 -8
- package/dist/organisms/FieldSelector/FieldSelector.js +3 -3
- package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +18 -18
- package/dist/organisms/FieldSelector/SelectorCard/Skeleton.js +6 -6
- package/dist/organisms/Filter/ButtonWithMenu.js +1 -1
- package/dist/organisms/Filter/Filter.js +1 -1
- package/dist/organisms/Filter/Filter.styles.js +39 -39
- package/dist/organisms/Filter/QuickFilter.js +1 -1
- package/dist/organisms/Filter/SortMenu.js +2 -2
- package/dist/organisms/PageTitle/PageTitle.js +1 -1
- package/dist/organisms/ReleaseNote/ReleaseNote.js +12 -12
- package/dist/organisms/ReleaseNote/ToggleExpanded.js +6 -6
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/SideBar/index.js +1 -1
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Action.js +1 -1
- package/dist/organisms/Status/Description.d.ts +2 -2
- package/dist/organisms/Status/Description.js +1 -1
- package/dist/organisms/Status/Illustration.js +2 -2
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- package/dist/organisms/Status/MissingAccesses.js +4 -4
- package/dist/organisms/Status/Status.js +4 -4
- package/dist/organisms/Status/Title.d.ts +2 -2
- package/dist/organisms/Status/Title.js +1 -1
- package/dist/organisms/Status/collections/ApiResponseError.js +1 -1
- package/dist/organisms/Status/collections/BadRequest.js +2 -2
- package/dist/organisms/Status/collections/GenericError.js +1 -1
- package/dist/organisms/Status/collections/MissingAccessToApp.js +1 -1
- package/dist/organisms/Status/collections/MissingPermissions.js +1 -1
- package/dist/organisms/Status/collections/PageNotFound.js +2 -2
- package/dist/organisms/Status/collections/ServerError.js +2 -2
- package/dist/organisms/TableOfContents/TableOfContents.constants.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.js +32 -32
- package/dist/organisms/TableOfContents/TableOfContentsItem.js +4 -4
- package/dist/organisms/Template/Template.js +7 -7
- package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroup.js +12 -12
- package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.js +20 -20
- package/dist/organisms/TopBar/Account/Account.js +1 -1
- package/dist/organisms/TopBar/Account/Account.styles.js +24 -24
- package/dist/organisms/TopBar/Account/AccountAvatar.js +7 -7
- package/dist/organisms/TopBar/Account/AccountButton.js +5 -5
- package/dist/organisms/TopBar/Account/ActiveUserImpersonationButton.js +4 -4
- package/dist/organisms/TopBar/Account/ImpersonateAvatar.js +4 -4
- package/dist/organisms/TopBar/Account/ImpersonateButton.js +4 -4
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Actions.js +6 -6
- package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateNewUserButton.js +4 -4
- package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.styles.js +8 -8
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.constants.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.styles.js +4 -4
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.js +8 -8
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +6 -6
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.styles.js +16 -16
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useActiveImpersonationUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useAllAppRoles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useCanImpersonate.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useGetAllImpersonationUsersForApp.js +1 -1
- package/dist/organisms/TopBar/Account/RoleChips.js +1 -1
- package/dist/organisms/TopBar/Account/RoleList.js +7 -7
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/Actions.js +3 -3
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.styles.js +24 -24
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.js +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.js +24 -24
- package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +2 -2
- package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Item.js +3 -3
- package/dist/organisms/TopBar/Guidelines/Section.js +7 -7
- package/dist/organisms/TopBar/Notifications/FilterOptions.js +6 -6
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsInner.js +3 -3
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +4 -4
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ExperienceDue3Weeks.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/MergedBranchOrca.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +4 -4
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReadyToBePublished.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReadyToReportNotification.js +4 -4
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/RequestChangeOrca.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/RequestReviewOrca.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReviewQANotification.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.style.js +9 -9
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.const.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +7 -7
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Title.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Url.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +8 -8
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +7 -7
- package/dist/organisms/TopBar/Resources/Resources.js +4 -4
- package/dist/organisms/TopBar/Settings.js +11 -11
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +22 -22
- package/dist/organisms/TopBar/TopBarMenu.js +4 -4
- package/dist/organisms/TopBar/TransferToAppDialog.js +11 -11
- package/dist/organisms/TopBar/Tutorials/TutorialItem.js +8 -8
- package/dist/organisms/TopBar/Tutorials/Tutorials.js +1 -1
- package/dist/organisms/TopBar/Tutorials/Tutorials.styles.js +6 -6
- package/dist/organisms/index.js +1 -1
- package/dist/providers/LoadingProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.js +1 -1
- package/dist/providers/SideBarProvider.js +1 -1
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.js +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/providers/index.js +1 -0
- package/package.json +3 -3
- package/dist/atoms/hooks/useOnScreenMultiple.js +0 -1
- package/dist/atoms/hooks/useRichTextImage.js +0 -1
- package/dist/atoms/style/animation.js +0 -1
- package/dist/atoms/style/colors.js +0 -1
- package/dist/atoms/style/darkTokens.js +0 -219
- package/dist/atoms/style/lightTokens.js +0 -158
- package/dist/atoms/style/spacingTokens.js +0 -50
- package/dist/atoms/style/spacings.js +0 -1
- package/dist/atoms/utils/skeleton.js +0 -1
- package/dist/molecules/ApplicationIcon/Icons/FluxMaps.js +0 -1
- package/dist/molecules/Badge/Badge.styles.js +0 -17
- package/dist/molecules/Button/Button.utils.js +0 -1
- package/dist/molecules/Chip/Chip.styles.js +0 -65
- package/dist/molecules/Chip/InteractiveChip.js +0 -1
- package/dist/molecules/Chip/ReadOnlyChip.js +0 -1
- package/dist/molecules/ContentMenu/ContentMenu.styles.js +0 -52
- package/dist/molecules/DatePicker/DatePicker.styles.js +0 -63
- package/dist/molecules/EquinorLogo/EquinorLogo.utils.js +0 -1
- package/dist/molecules/FileProgress/CompactFileProgress.js +0 -1
- package/dist/molecules/FileProgress/CompactFileProgress.styles.js +0 -100
- package/dist/molecules/FileProgress/FileProgress.utils.js +0 -1
- package/dist/molecules/FileProgress/RegularFileProgress.js +0 -1
- package/dist/molecules/FileProgress/RegularFileProgress.styles.js +0 -35
- package/dist/molecules/FileUploadArea/FileUploadArea.constants.js +0 -1
- package/dist/molecules/FileUploadArea/UploadIllustration.js +0 -1
- package/dist/molecules/InfoElement/CopyText.js +0 -41
- package/dist/molecules/ListItem/ListItem.utils.js +0 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.styles.js +0 -36
- package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +0 -1
- package/dist/molecules/Select/AddTagItem.js +0 -1
- package/dist/molecules/Select/GroupedSelectMenu.js +0 -1
- package/dist/molecules/Select/ListSelectMenu.js +0 -1
- package/dist/molecules/Select/Select.js +0 -1
- package/dist/molecules/Select/Select.utils.js +0 -1
- package/dist/molecules/Select/SelectMenuItem.js +0 -1
- package/dist/molecules/Select/SelectMenuItem.utils.js +0 -1
- package/dist/molecules/Sieve/Filter.d.ts +0 -10
- package/dist/molecules/Sieve/Filter.js +0 -1
- package/dist/molecules/Sieve/Sieve.d.ts +0 -7
- package/dist/molecules/Sieve/Sieve.js +0 -1
- package/dist/molecules/Sieve/Sieve.styles.js +0 -43
- package/dist/molecules/Sieve/Sieve.types.d.ts +0 -26
- package/dist/molecules/Sieve/Sort.js +0 -1
- package/dist/molecules/Skeleton/Skeleton.styles.js +0 -1
- package/dist/molecules/Skeleton/SkeletonField.js +0 -8
- package/dist/molecules/Stepper/Step/StepIcon.js +0 -19
- package/dist/molecules/Stepper/SubTitle/SubStepIndicator.js +0 -25
- package/dist/molecules/Stepper/SubTitle/SubTitle.js +0 -7
- package/dist/molecules/TextField/TextField.js +0 -74
- package/dist/organisms/Faq/Category/Category.js +0 -9
- package/dist/organisms/Faq/Category/Question.js +0 -22
- package/dist/organisms/Faq/CategorySkeleton.js +0 -29
- package/dist/organisms/Filter/AutoCompleteMenu.js +0 -10
- package/dist/organisms/Filter/AutoCompleteText.js +0 -11
- package/dist/organisms/Filter/Filter.utils.js +0 -1
- package/dist/organisms/ReleaseNote/MetaTags.js +0 -10
- package/dist/organisms/SideBar/CreateItem.js +0 -1
- package/dist/organisms/SideBar/CreateItem.styles.js +0 -33
- package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +0 -1
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +0 -48
- package/dist/organisms/SideBar/MenuItem/MenuItem.js +0 -1
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +0 -37
- package/dist/organisms/SideBar/MenuItem/MenuItem.utils.js +0 -1
- package/dist/organisms/SideBar/SideBar.js +0 -1
- package/dist/organisms/SideBar/SideBar.styles.js +0 -41
- package/dist/organisms/SideBar/ToggleOpen.js +0 -1
- package/dist/organisms/SideBar/ToggleOpen.styles.js +0 -16
- package/dist/organisms/Status/Illustration.constants.js +0 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.utils.js +0 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useStartImpersonation.js +0 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.js +0 -41
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +0 -7
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.js +0 -79
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.js +0 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.styles.js +0 -7
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +0 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.styles.js +0 -19
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +0 -1
- package/dist/providers/AuthProvider/AuthProvider.js +0 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +0 -1
- package/dist/providers/ReleaseNotesProvider.utils.js +0 -1
- package/dist/providers/SnackbarProvider/SnackbarProvider.js +0 -1
- package/dist/providers/SnackbarProvider/SnackbarProvider.styles.js +0 -41
- package/dist/providers/SnackbarProvider/SnackbarProvider.utils.js +0 -1
- package/dist/providers/TableOfContentsProvider.utils.js +0 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.constants.js +0 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.js +0 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +0 -24
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/StepIndicator.js +0 -20
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +0 -75
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +0 -1
- 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"
|
|
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{
|
|
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: ${
|
|
3
|
+
gap: ${c.small};
|
|
4
4
|
align-items: center;
|
|
5
5
|
min-width: 210px;
|
|
6
|
-
padding: ${({$isChild:e,$borderBottom:t})=>{let
|
|
7
|
-
background: ${({$selected:e})=>e?
|
|
8
|
-
transition: background ${
|
|
9
|
-
${({$borderBottom:e})=>e?
|
|
10
|
-
border-bottom: 1px solid ${
|
|
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: ${
|
|
16
|
+
color: ${s.interactive.disabled__text.rgba};
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
&:focus:not(:disabled) {
|
|
20
|
-
outline: 1px dashed ${
|
|
20
|
+
outline: 1px dashed ${s.interactive.primary__resting.rgba};
|
|
21
21
|
}
|
|
22
22
|
&:hover:not(:disabled) {
|
|
23
|
-
background: ${({$selected:e})=>e?
|
|
23
|
+
background: ${({$selected:e})=>e?s.interactive.primary__selected_hover.rgba:s.interactive.primary__hover_alt.rgba};
|
|
24
24
|
}
|
|
25
25
|
> section {
|
|
26
|
-
padding: ${
|
|
26
|
+
padding: ${c.small} 0};
|
|
27
27
|
}
|
|
28
|
-
`,d=
|
|
28
|
+
`,d=r.span`
|
|
29
29
|
margin-left: auto;
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
|
-
`,f=
|
|
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{
|
|
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
|
|
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:
|
|
9
|
+
declare const OptionalTooltip: react15.ForwardRefExoticComponent<{
|
|
10
10
|
textTransform?: string;
|
|
11
11
|
} & {
|
|
12
12
|
placement?: _floating_ui_utils0.Placement;
|
|
13
|
-
title?:
|
|
13
|
+
title?: react15.ReactNode;
|
|
14
14
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
15
15
|
enterDelay?: number;
|
|
16
16
|
portalContainer?: HTMLElement;
|
|
17
|
-
} & Omit<
|
|
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{
|
|
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:
|
|
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
|
|
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:
|
|
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{
|
|
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?
|
|
9
|
-
color: ${e=>e.disabled?
|
|
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=
|
|
17
|
+
`,h=a(s)`
|
|
18
18
|
width: 70%;
|
|
19
|
-
`,g=
|
|
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
|
-
`,_=
|
|
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{
|
|
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{
|
|
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{
|
|
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
|
|
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<
|
|
18
|
-
Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<
|
|
19
|
-
Button:
|
|
20
|
-
Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<
|
|
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{
|
|
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: ${
|
|
8
|
-
padding: ${
|
|
9
|
-
border-bottom: 1px solid ${
|
|
10
|
-
`,S=({editor:e,features:t,onImageUpload:
|
|
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
|
|
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=
|
|
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: ${
|
|
46
|
+
fill: ${n.interactive.disabled__text.rgba};
|
|
47
47
|
}
|
|
48
|
-
`,s=e=>e.$active?
|
|
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{
|
|
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{
|
|
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{
|
|
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{
|
|
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{
|
|
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
|
|
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:
|
|
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{
|
|
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=
|
|
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=
|
|
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:
|
|
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{
|
|
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{
|
|
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]=
|
|
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{
|
|
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};
|