@equinor/amplify-component-lib 9.16.0-beta.0 → 9.16.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/useOnScreenMultiple.js +1 -0
- package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
- package/dist/atoms/hooks/useRichTextImage.js +1 -0
- 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/animation.js +1 -0
- package/dist/atoms/style/colors.js +1 -0
- package/dist/atoms/style/darkTokens.js +219 -0
- package/dist/atoms/style/index.js +1 -1
- package/dist/atoms/style/lightTokens.js +158 -0
- package/dist/atoms/style/spacingTokens.js +50 -0
- package/dist/atoms/style/spacings.js +1 -0
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/date.js +1 -1
- package/dist/atoms/utils/map.js +1 -1
- package/dist/atoms/utils/richtext.js +1 -1
- package/dist/atoms/utils/size.js +1 -1
- package/dist/atoms/utils/skeleton.js +1 -0
- package/dist/atoms/utils/url.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.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/FluxMaps.js +1 -0
- 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/Badge/Badge.styles.js +17 -0
- 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/Button/Button.utils.js +1 -0
- package/dist/molecules/Chip/Chip.d.ts +2 -2
- package/dist/molecules/Chip/Chip.js +1 -1
- package/dist/molecules/Chip/Chip.styles.js +65 -0
- package/dist/molecules/Chip/InteractiveChip.js +1 -0
- package/dist/molecules/Chip/ReadOnlyChip.js +1 -0
- package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
- package/dist/molecules/ContentMenu/ContentMenu.styles.js +52 -0
- package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
- package/dist/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/molecules/DatePicker/DatePicker.styles.js +63 -0
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/molecules/Dialog/Dialog.d.ts +3 -3
- 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/EquinorLogo/EquinorLogo.utils.js +1 -0
- package/dist/molecules/FileProgress/CompactFileProgress.js +1 -0
- package/dist/molecules/FileProgress/CompactFileProgress.styles.js +100 -0
- package/dist/molecules/FileProgress/FileProgress.js +1 -1
- package/dist/molecules/FileProgress/FileProgress.utils.js +1 -0
- package/dist/molecules/FileProgress/RegularFileProgress.js +1 -0
- package/dist/molecules/FileProgress/RegularFileProgress.styles.js +35 -0
- package/dist/molecules/FileUploadArea/FileUploadArea.constants.js +1 -0
- package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
- package/dist/molecules/FileUploadArea/FileUploadArea.styles.js +18 -18
- package/dist/molecules/FileUploadArea/UploadIllustration.js +1 -0
- package/dist/molecules/FullPageSpinner/FullPageSpinner.js +8 -8
- package/dist/molecules/IconCell/IconCell.d.ts +2 -2
- package/dist/molecules/IconCell/IconCell.js +1 -1
- package/dist/molecules/IconCell/IconCell.styles.js +26 -26
- package/dist/molecules/IconCell/IconCell.utils.js +7 -7
- package/dist/molecules/InfoElement/CopyText.js +41 -0
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/ListItem/ListItem.d.ts +2 -2
- package/dist/molecules/ListItem/ListItem.js +13 -13
- package/dist/molecules/ListItem/ListItem.utils.js +1 -0
- package/dist/molecules/OptionDrawer/OptionDrawer.js +1 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.styles.js +36 -0
- package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -0
- 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/AddTagItem.js +1 -0
- package/dist/molecules/Select/ComboBox/ComboBox.js +1 -1
- package/dist/molecules/Select/GroupedSelectMenu.js +1 -0
- package/dist/molecules/Select/ListSelectMenu.js +1 -0
- package/dist/molecules/Select/Select.js +1 -0
- package/dist/molecules/Select/Select.styles.d.ts +5 -5
- package/dist/molecules/Select/Select.styles.js +61 -61
- package/dist/molecules/Select/Select.utils.js +1 -0
- package/dist/molecules/Select/SelectMenuItem.js +1 -0
- package/dist/molecules/Select/SelectMenuItem.utils.js +1 -0
- package/dist/molecules/Select/SingleSelect/SingleSelect.js +1 -1
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -1
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/SelectionControls/Radio/Radio.js +1 -1
- package/dist/molecules/SelectionControls/SelectionControls.styles.js +24 -24
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
- package/dist/molecules/SelectionControls/Switch/Switch.js +1 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +9 -9
- package/dist/molecules/Skeleton/Skeleton.styles.js +1 -0
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.js +7 -7
- package/dist/molecules/Skeleton/SkeletonField.js +8 -0
- package/dist/molecules/Skeleton/SkeletonGradient/SkeletonGradient.js +1 -1
- package/dist/molecules/Stepper/Step/Step.js +5 -5
- package/dist/molecules/Stepper/Step/StepIcon.js +19 -0
- package/dist/molecules/Stepper/StepLine.js +2 -2
- package/dist/molecules/Stepper/Stepper.js +4 -4
- package/dist/molecules/Stepper/SubTitle/SubStepIndicator.js +25 -0
- package/dist/molecules/Stepper/SubTitle/SubTitle.js +7 -0
- 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/TextField/TextField.js +74 -0
- package/dist/molecules/Waves/Waves.js +1 -1
- package/dist/molecules/index.d.ts +2 -2
- package/dist/molecules/index.js +1 -1
- package/dist/organisms/DataGrid/DataGrid.js +6 -6
- package/dist/organisms/Faq/Category/Category.js +9 -0
- package/dist/organisms/Faq/Category/Question.js +22 -0
- package/dist/organisms/Faq/CategorySkeleton.js +29 -0
- 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/AutoCompleteMenu.js +10 -0
- package/dist/organisms/Filter/AutoCompleteText.js +11 -0
- 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/Filter.utils.js +1 -0
- 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/MetaTags.js +10 -0
- package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
- package/dist/organisms/ReleaseNote/ReleaseNote.js +12 -12
- package/dist/organisms/ReleaseNote/ReleaseNote.utils.js +1 -1
- package/dist/organisms/ReleaseNote/ToggleExpanded.js +6 -6
- package/dist/organisms/SideBar/CreateItem.js +1 -0
- package/dist/organisms/SideBar/CreateItem.styles.js +33 -0
- package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -0
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +48 -0
- package/dist/organisms/SideBar/MenuItem/MenuItem.js +1 -0
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +37 -0
- package/dist/organisms/SideBar/MenuItem/MenuItem.utils.js +1 -0
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/SideBar/SideBar.js +1 -0
- package/dist/organisms/SideBar/SideBar.styles.js +41 -0
- package/dist/organisms/SideBar/ToggleOpen.js +1 -0
- package/dist/organisms/SideBar/ToggleOpen.styles.js +16 -0
- 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.constants.js +1 -0
- 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.d.ts +3 -3
- 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/Impersonate.utils.js +1 -0
- 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/ImpersonateMenu/hooks/useStartImpersonation.js +1 -0
- 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.styles.js +41 -0
- 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/ImageFile.js +7 -0
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.js +79 -0
- 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/Success.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.js +1 -0
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.styles.js +7 -0
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -0
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.styles.js +19 -0
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +1 -0
- 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/AuthProvider/AuthProvider.js +1 -0
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -0
- package/dist/providers/LoadingProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.utils.js +1 -0
- package/dist/providers/SideBarProvider.js +1 -1
- package/dist/providers/SnackbarProvider/SnackbarProvider.js +1 -0
- package/dist/providers/SnackbarProvider/SnackbarProvider.styles.js +41 -0
- package/dist/providers/SnackbarProvider/SnackbarProvider.utils.js +1 -0
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.utils.js +1 -0
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.constants.js +1 -0
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.js +1 -0
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +24 -0
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/StepIndicator.js +20 -0
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +75 -0
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +1 -0
- package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.js +1 -0
- package/package.json +2 -2
- package/dist/atoms/hooks/index.js +0 -1
- package/dist/providers/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";const n=()=>t(`svg`,{"data-testid":`upload-illustration`,width:`73`,height:`72`,viewBox:`0 0 73 72`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[e(`path`,{d:`M10.5269 25.5806C10.5269 24.4761 11.4223 23.5806 12.5269 23.5806H57.7912C58.8958 23.5806 59.7912 24.4761 59.7912 25.5806V60.1295C59.7912 61.234 58.8958 62.1295 57.7912 62.1295H12.5269C11.4223 62.1295 10.5269 61.234 10.5269 60.1295V25.5806Z`,fill:`#C9E0E2`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M57.7912 25.5806H12.5269L12.5269 60.1295H57.7912L57.7912 25.5806ZM12.5269 23.5806C11.4223 23.5806 10.5269 24.4761 10.5269 25.5806V60.1295C10.5269 61.234 11.4223 62.1295 12.5269 62.1295H57.7912C58.8958 62.1295 59.7912 61.234 59.7912 60.1295V25.5806C59.7912 24.4761 58.8958 23.5806 57.7912 23.5806H12.5269Z`,fill:`#007079`}),e(`path`,{d:`M61.8817 63.5719L66.7565 33.1905C66.9516 31.9751 66.0128 30.8737 64.7818 30.8737H43.0756C42.6971 30.8737 42.3263 30.9811 42.0064 31.1834L31.4559 37.8569C31.136 38.0593 30.7653 38.1667 30.3867 38.1667H7.75437C6.52339 38.1667 5.5846 39.2681 5.77963 40.4835L9.48431 63.5719C9.63993 64.5418 10.4768 65.2551 11.4591 65.2551H59.9069C60.8892 65.2551 61.726 64.5418 61.8817 63.5719Z`,fill:`white`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M43.0758 31.8737C42.8865 31.8737 42.7012 31.9274 42.5412 32.0285L42.0109 31.1901L42.5412 32.0285L31.9907 38.7021C31.5108 39.0056 30.9547 39.1667 30.387 39.1667H7.7546C7.13911 39.1667 6.66972 39.7174 6.76723 40.3251L10.4719 63.4135C10.5497 63.8984 10.9682 64.2551 11.4593 64.2551H59.9071C60.3983 64.2551 60.8167 63.8984 60.8945 63.4135L65.7694 33.0321C65.8669 32.4244 65.3975 31.8737 64.782 31.8737H43.0758ZM41.4721 30.3383C41.9519 30.0348 42.508 29.8737 43.0758 29.8737H64.782C66.6285 29.8737 68.0367 31.5258 67.7442 33.3489L62.8693 63.7303C62.6358 65.1851 61.3805 66.2551 59.9071 66.2551H11.4593C9.9859 66.2551 8.7306 65.1851 8.49717 63.7303L4.79249 40.642C4.49995 38.8188 5.90813 37.1667 7.7546 37.1667H30.387C30.5762 37.1667 30.7616 37.113 30.9215 37.0118L41.4721 30.3383Z`,fill:`#007079`}),e(`path`,{d:`M31.5987 48.072C31.5987 49.5367 30.7009 50.724 29.5933 50.724C28.4858 50.724 27.5879 49.5367 27.5879 48.072C27.5879 46.6073 28.4858 45.42 29.5933 45.42C30.7009 45.42 31.5987 46.6073 31.5987 48.072Z`,fill:`#007079`}),e(`path`,{d:`M42.4933 48.072C42.4933 49.5367 41.5954 50.724 40.4879 50.724C39.3803 50.724 38.4824 49.5367 38.4824 48.072C38.4824 46.6073 39.3803 45.42 40.4879 45.42C41.5954 45.42 42.4933 46.6073 42.4933 48.072Z`,fill:`#007079`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M29.0414 53.8623C29.4765 53.5221 30.1049 53.5991 30.4451 54.0342C31.1297 54.9099 32.4297 55.9577 34.0448 56.2581C35.5886 56.5452 37.5937 56.1826 39.8467 53.9411C40.2383 53.5516 40.8714 53.5533 41.2609 53.9448C41.6505 54.3363 41.6488 54.9695 41.2573 55.359C38.6077 57.9949 35.9599 58.6485 33.6791 58.2243C31.4698 57.8134 29.7737 56.4225 28.8695 55.266C28.5293 54.8309 28.6063 54.2024 29.0414 53.8623Z`,fill:`#007079`}),e(`path`,{d:`M37.4846 20.618L47.8301 2.79122L56.0429 7.50852L58.2518 15.7099L50.9237 28.3372L37.4846 20.618Z`,fill:`white`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M49.1637 2.13819L57.0901 6.69096L59.6027 16.0198L52.7382 27.8482C52.109 28.9325 50.7024 29.3074 49.6126 28.6814L37.7131 21.8466C36.6232 21.2206 36.2562 19.8269 36.8854 18.7427L46.048 2.9771C46.6772 1.89282 48.0738 1.51219 49.1637 2.13819ZM48.0197 4.1096L38.867 19.8809L50.7566 26.71L57.049 15.8673L52.0951 13.0218L54.9552 8.09327L48.0197 4.1096Z`,fill:`#007079`}),e(`path`,{d:`M19.3516 31.8552L22.7911 16.7257L29.7613 18.294L33.1937 23.7048L30.7573 34.4215L19.3516 31.8552Z`,fill:`white`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M23.6041 15.9592L30.3312 17.4728L34.2354 23.6274L31.9532 33.6661C31.744 34.5863 30.8161 35.169 29.8911 34.9608L19.7921 32.6885C18.8671 32.4804 18.2899 31.5591 18.4991 30.6388L21.5504 17.2558C21.7596 16.3355 22.6792 15.751 23.6041 15.9592ZM23.2238 17.6323L20.1808 31.0173L30.2714 33.2877L32.3635 24.0856L28.159 23.1395L29.11 18.9567L23.2238 17.6323Z`,fill:`#007079`}),e(`path`,{d:`M68.0528 61.742C68.0528 66.855 63.8864 71 58.7468 71C53.6073 71 49.4409 66.855 49.4409 61.742C49.4409 56.6289 53.6073 52.4839 58.7468 52.4839C63.8864 52.4839 68.0528 56.6289 68.0528 61.742Z`,fill:`white`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M58.7468 69.5C63.0652 69.5 66.5528 66.0193 66.5528 61.742C66.5528 57.4646 63.0652 53.9839 58.7468 53.9839C54.4284 53.9839 50.9409 57.4646 50.9409 61.742C50.9409 66.0193 54.4284 69.5 58.7468 69.5ZM58.7468 71C63.8864 71 68.0528 66.855 68.0528 61.742C68.0528 56.6289 63.8864 52.4839 58.7468 52.4839C53.6073 52.4839 49.4409 56.6289 49.4409 61.742C49.4409 66.855 53.6073 71 58.7468 71Z`,fill:`#007079`}),e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M60.3359 64V61.2903H62.1516L58.974 58.129L55.7964 61.2903H57.6122V64H60.3359ZM58.974 59.4071L59.9591 60.3871H59.428V63.0968H58.5201V60.3871H57.989L58.974 59.4071ZM62.1516 65.8064V64.9032H55.7964V65.8064H62.1516Z`,fill:`#007079`})]});export{n as UploadIllustration};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
${({$fixedPosition:e})=>e?
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{useMemo as t}from"react";import{Progress as n,Scrim as r,StarProgress as i}from"@equinor/eds-core-react";import a,{css as o}from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=a.div`
|
|
2
|
+
${({$fixedPosition:e})=>e?o`
|
|
3
3
|
position: fixed;
|
|
4
4
|
z-index: 500;
|
|
5
5
|
top: 0;
|
|
@@ -9,21 +9,21 @@ import{useMemo as e}from"react";import{jsx as t,jsxs as n}from"react/jsx-runtime
|
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: center;
|
|
12
|
-
`:
|
|
12
|
+
`:o`
|
|
13
13
|
position: absolute;
|
|
14
14
|
z-index: 500;
|
|
15
15
|
top: 50%;
|
|
16
16
|
left: 50%;
|
|
17
17
|
transform: translate(-50%, -50%);
|
|
18
18
|
`}
|
|
19
|
-
`,u=
|
|
19
|
+
`,u=a.div`
|
|
20
20
|
display: none;
|
|
21
21
|
visibility: hidden;
|
|
22
|
-
`,d=
|
|
22
|
+
`,d=a(n.Circular)`
|
|
23
23
|
circle {
|
|
24
|
-
stroke: ${
|
|
24
|
+
stroke: ${e.interactive.primary__resting.rgba};
|
|
25
25
|
}
|
|
26
26
|
circle:first-child {
|
|
27
|
-
stroke: ${
|
|
27
|
+
stroke: ${e.interactive.primary__hover_alt.rgba};
|
|
28
28
|
}
|
|
29
|
-
`,f=({variant:
|
|
29
|
+
`,f=({variant:e=`application`,withScrim:a=!1,fixedPosition:o=!1,children:f})=>{let p=t(()=>{switch(e){case`dots`:return s(n.Dots,{color:`primary`,"data-testid":`full-page-spinner-${e}`,size:48});case`circle`:return s(d,{"data-testid":`full-page-spinner-${e}`,size:48});case`equinor`:return s(i,{"data-testid":`full-page-spinner-${e}`,size:48});case`application`:return s(d,{"data-testid":`app-icon-svg`,size:48})}},[e]);return a?c(r,{open:!0,children:[p,f&&s(u,{children:f})]}):c(l,{$fixedPosition:o,children:[p,f&&s(u,{children:f})]})};export{f as FullPageSpinner};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconCellColor, IconCellState, IconCellVariant, IconCellVariants } from "./IconCell.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react15 from "react";
|
|
3
3
|
import { HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
4
4
|
import { IconData } from "@equinor/eds-icons";
|
|
5
5
|
|
|
@@ -49,6 +49,6 @@ type IconCellProps = ScribbledOutProps | RegularIconCellProps;
|
|
|
49
49
|
* @param {React.Ref<HTMLButtonElement>} ref - Ref forwarded to the inner button element.
|
|
50
50
|
* @returns {JSX.Element} The rendered IconCell.
|
|
51
51
|
*/
|
|
52
|
-
declare const IconCell:
|
|
52
|
+
declare const IconCell: react15.ForwardRefExoticComponent<IconCellProps & react15.RefAttributes<HTMLButtonElement>>;
|
|
53
53
|
//#endregion
|
|
54
54
|
export { IconCell, IconCellProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IconCellColors as
|
|
1
|
+
import{Theme as e}from"../../atoms/enums/Theme.js";import{ThemeProviderContext as t}from"../../providers/ThemeProvider/ThemeProvider.js";import{IconCellColors as n,IconCellStates as r,IconCellVariants as i}from"./IconCell.types.js";import{getIconCellColor as a,renderContent as o}from"./IconCell.utils.js";import{Button as s,Container as c,HelperIconContainer as l,IconContainer as u,Label as d}from"./IconCell.styles.js";import{forwardRef as f,useContext as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";const g=f(function(f,g){let _=p(t);if(f.variant===i.SCRIBBLED_OUT){let{className:e,as:t=`td`,noBottomBorder:n=!1}=f;return m(c,{className:e,as:t,children:m(s,{ref:g,$variant:i.SCRIBBLED_OUT,$noBottomBorder:n,$clickable:!1})})}let{icon:v,onClick:y,className:b,disabled:x=!1,selected:S=!1,color:C=n.DEFAULT,state:w=r.DEFAULT,label:T,variant:E=i.DEFAULT,helperIcon:D,noBottomBorder:O=!1,as:k=`td`,...A}=f,{backgroundColor:j,iconColor:M}=a(C,_?.theme??e.LIGHT);return m(c,{className:b,as:k,children:h(s,{ref:g,...A,$selected:S,disabled:x,onClick:y,$backgroundColor:j,$state:w,$variant:E,$noBottomBorder:O,$clickable:!!y&&!x,children:[m(u,{children:o(v,M)}),m(d,{children:m(`span`,{children:T})}),m(l,{children:D&&o(D,M)})]})})});g.displayName=`IconCell`;export{g as IconCell};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import{IconCellStates as
|
|
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{IconCellStates as r,IconCellVariants as i}from"./IconCell.types.js";import{getBackground as a,getBorderBottom as o,getSelectedBorder as s,stateBGColor as c}from"./IconCell.utils.js";import l from"styled-components";const u=(e=`rgba(0, 0, 0, 0.1)`)=>`
|
|
2
2
|
content: '';
|
|
3
3
|
position: absolute;
|
|
4
4
|
inset: 0;
|
|
5
5
|
background-color: ${e};
|
|
6
6
|
opacity: 0.7;
|
|
7
7
|
pointer-events: none;
|
|
8
|
-
`,d=
|
|
8
|
+
`,d=l.div`
|
|
9
9
|
min-width: 48px;
|
|
10
10
|
padding: 0;
|
|
11
|
-
`,f=
|
|
11
|
+
`,f=l.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
position: absolute;
|
|
14
|
-
bottom: ${
|
|
15
|
-
left: ${
|
|
16
|
-
padding-right: ${
|
|
14
|
+
bottom: ${n.small};
|
|
15
|
+
left: ${n.small};
|
|
16
|
+
padding-right: ${n.xx_small};
|
|
17
17
|
|
|
18
18
|
span {
|
|
19
19
|
font-size: 10px;
|
|
20
20
|
font-weight: 500;
|
|
21
21
|
position: relative;
|
|
22
|
-
color: ${
|
|
22
|
+
color: ${t.text.static_icons__default.rgba};
|
|
23
23
|
}
|
|
24
|
-
`,p=
|
|
24
|
+
`,p=l.div`
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
|
-
`,m=
|
|
27
|
+
`,m=l.div`
|
|
28
28
|
display: flex;
|
|
29
29
|
position: absolute;
|
|
30
|
-
top: ${
|
|
31
|
-
right: ${
|
|
30
|
+
top: ${n.small};
|
|
31
|
+
right: ${n.small};
|
|
32
32
|
|
|
33
33
|
svg {
|
|
34
34
|
width: 16px;
|
|
35
35
|
height: 16px;
|
|
36
36
|
position: relative;
|
|
37
37
|
}
|
|
38
|
-
`,h=
|
|
38
|
+
`,h=l.button`
|
|
39
39
|
display: flex;
|
|
40
40
|
width: 100%;
|
|
41
41
|
height: 100%;
|
|
@@ -43,15 +43,15 @@ import{IconCellStates as e,IconCellVariants as t}from"./IconCell.types.js";impor
|
|
|
43
43
|
position: relative;
|
|
44
44
|
justify-content: center;
|
|
45
45
|
overflow: hidden;
|
|
46
|
-
padding: ${
|
|
47
|
-
background: ${
|
|
48
|
-
transition: background ${
|
|
46
|
+
padding: ${n.small};
|
|
47
|
+
background: ${a};
|
|
48
|
+
transition: background ${e.transitionMS};
|
|
49
49
|
border: none;
|
|
50
|
-
border-bottom: ${
|
|
50
|
+
border-bottom: ${o};
|
|
51
51
|
cursor: ${({$clickable:e})=>e?`pinter`:`default`};
|
|
52
52
|
|
|
53
53
|
// Scribbled-out hides content
|
|
54
|
-
${({$variant:e})=>e===
|
|
54
|
+
${({$variant:e})=>e===i.SCRIBBLED_OUT&&`
|
|
55
55
|
${f}, ${m}, ${p} {
|
|
56
56
|
display: none;
|
|
57
57
|
}
|
|
@@ -59,11 +59,11 @@ import{IconCellStates as e,IconCellVariants as t}from"./IconCell.types.js";impor
|
|
|
59
59
|
|
|
60
60
|
// Selected state
|
|
61
61
|
${({$selected:e,$state:t})=>e&&`
|
|
62
|
-
border: 1px solid ${
|
|
62
|
+
border: 1px solid ${s(t)};
|
|
63
63
|
`}
|
|
64
64
|
|
|
65
65
|
// Overlay for Label & HelperIconContainer
|
|
66
|
-
${({$backgroundColor:
|
|
66
|
+
${({$backgroundColor:e,$variant:n,$state:a})=>{let o=n===i.COLOURED?a===r.DANGER?c[r.DANGER]:a===r.WARNING?c[r.WARNING]:e:t.ui.background__default.rgba;return`
|
|
67
67
|
${f}::before,
|
|
68
68
|
${m}::before {
|
|
69
69
|
${u(o)}
|
|
@@ -73,10 +73,10 @@ import{IconCellStates as e,IconCellVariants as t}from"./IconCell.types.js";impor
|
|
|
73
73
|
// Disabled state
|
|
74
74
|
&:disabled {
|
|
75
75
|
cursor: not-allowed;
|
|
76
|
-
background: ${({$variant:e})=>e===
|
|
76
|
+
background: ${({$variant:e})=>e===i.COLOURED?t.ui.background__light.rgba:`transparent`};
|
|
77
77
|
|
|
78
78
|
${f} span {
|
|
79
|
-
color: ${
|
|
79
|
+
color: ${t.interactive.disabled__text.rgba};
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
${p},${m} {
|
|
@@ -85,24 +85,24 @@ import{IconCellStates as e,IconCellVariants as t}from"./IconCell.types.js";impor
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
${({$selected:e})=>e&&`
|
|
88
|
-
border: 1px solid ${
|
|
88
|
+
border: 1px solid ${t.ui.background__light.rgba};
|
|
89
89
|
`}
|
|
90
90
|
|
|
91
|
-
border-bottom: 1px solid ${
|
|
91
|
+
border-bottom: 1px solid ${t.ui.background__medium.rgba};
|
|
92
92
|
|
|
93
93
|
${({$variant:e})=>`
|
|
94
94
|
${f}::before,
|
|
95
95
|
${m}::before {
|
|
96
|
-
background-color: ${e===
|
|
96
|
+
background-color: ${e===i.COLOURED?t.ui.background__light.rgba:t.ui.background__default.rgba};
|
|
97
97
|
}
|
|
98
98
|
`}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// Hover effect (only if clickable)
|
|
102
|
-
${({$clickable:
|
|
102
|
+
${({$clickable:t})=>t&&`
|
|
103
103
|
&:hover:not(:disabled)::after {
|
|
104
104
|
${u()}
|
|
105
|
-
animation: ${
|
|
105
|
+
animation: ${e.transitionMS} ease-in-out;
|
|
106
106
|
}
|
|
107
107
|
`}
|
|
108
108
|
`;export{h as Button,d as Container,m as HelperIconContainer,p as IconContainer,f as Label};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Theme as t}from"../../atoms/enums/Theme.js";import{IconCellColors as n,IconCellStates as r,IconCellVariants as i}from"./IconCell.types.js";import{Icon as a}from"@equinor/eds-core-react";import{jsx as o}from"react/jsx-runtime";const s=(e,t)=>e&&typeof e==`object`&&`prefix`in e?o(a,{data:e,color:t}):e,c=(r,i)=>{switch(r){case n.GREEN:case n.SUCCESS:return i===t.LIGHT?{backgroundColor:e.interactive.success__highlight.rgba,iconColor:e.dataviz.darkgreen.default}:{backgroundColor:e.dataviz.darkgreen.default,iconColor:e.dataviz.lightgreen.lighter};case n.RED:case n.ERROR:case n.DANGER:return i===t.LIGHT?{backgroundColor:e.interactive.danger__highlight.rgba,iconColor:e.interactive.danger__text.rgba}:{backgroundColor:e.ui.background__danger.rgba,iconColor:e.text.static_icons__default.rgba};case n.ORANGE:case n.WARNING:return i===t.LIGHT?{backgroundColor:e.interactive.warning__highlight.rgba,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.ui.background__warning.rgba,iconColor:e.text.static_icons__default.rgba};case n.BLUE:case n.INFO:return i===t.LIGHT?{backgroundColor:e.dataviz.lightblue.lighter,iconColor:e.dataviz.primary.darker}:{backgroundColor:e.dataviz.darkblue.default,iconColor:e.dataviz.lightblue.lighter};case n.LIGHTGREY:return i===t.LIGHT?{backgroundColor:e.ui.background__light.rgba,iconColor:e.dataviz.lightgray.darker}:{backgroundColor:e.ui.background__heavy.rgba,iconColor:e.text.static_icons__secondary.rgba};case n.PINK:return i===t.LIGHT?{backgroundColor:e.dataviz.darkpink.lighter,iconColor:e.dataviz.darkpink.darker}:{backgroundColor:e.dataviz.darkpink.darker,iconColor:e.dataviz.darkpink.lighter};case n.YELLOW:return i===t.LIGHT?{backgroundColor:e.dataviz.lightyellow.lighter,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.dataviz.darkyellow.darker,iconColor:e.dataviz.lightyellow.lighter};case n.PURPLE:return i===t.LIGHT?{backgroundColor:e.dataviz.lightpurple.lighter,iconColor:e.dataviz.darkpurple.darker}:{backgroundColor:e.dataviz.darkpurple.darker,iconColor:e.dataviz.lightpurple.lighter};case n.GREY:default:return i===t.LIGHT?{backgroundColor:e.ui.background__medium.rgba,iconColor:e.text.static_icons__default.rgba}:{backgroundColor:e.ui.background__light.rgba,iconColor:e.text.static_icons__default.rgba}}},l={[r.DANGER]:e.interactive.danger__resting.rgba,[r.WARNING]:e.interactive.warning__resting.rgba},u={[r.DANGER]:e.ui.background__danger.rgba,[r.WARNING]:e.ui.background__warning.rgba},d=(e,t)=>(t?l[t]:void 0)??e,f=({$noBottomBorder:t,$state:n,$backgroundColor:r})=>`1px solid ${t?r:d(e.ui.background__medium.rgba,n)}`,p=t=>d(e.text.static_icons__default.rgba,t),m=({$variant:t,$state:n,$backgroundColor:a=e.ui.background__default.rgba})=>t===i.SCRIBBLED_OUT?`repeating-linear-gradient(
|
|
2
2
|
20deg,
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
6
|
-
${
|
|
7
|
-
${
|
|
8
|
-
)`:
|
|
3
|
+
${e.ui.background__light_medium.rgba} 0px,
|
|
4
|
+
${e.ui.background__default.rgba} 1px,
|
|
5
|
+
${e.ui.background__default.rgba} 10px,
|
|
6
|
+
${e.ui.background__light_medium.rgba} 11px,
|
|
7
|
+
${e.ui.background__light_medium.rgba} 12px
|
|
8
|
+
)`:t===i.COLOURED?n===r.DANGER?u[r.DANGER]:n===r.WARNING?u[r.WARNING]:a:`transparent`;export{m as getBackground,f as getBorderBottom,c as getIconCellColor,p as getSelectedBorder,s as renderContent,u as stateBGColor};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import n,{useEffect as r,useRef as i,useState as a}from"react";import{Icon as o,Typography as s}from"@equinor/eds-core-react";import c,{keyframes as l}from"styled-components";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{copy as f}from"@equinor/eds-icons";const p=c.div`
|
|
2
|
+
position: relative;
|
|
3
|
+
pointer-events: auto;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
&:hover {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
`,m=l`
|
|
9
|
+
from {
|
|
10
|
+
opacity: 0;
|
|
11
|
+
background: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
to {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
background: ${e.ui.background__light.rgba};
|
|
17
|
+
}
|
|
18
|
+
`,h=c.div`
|
|
19
|
+
position: absolute;
|
|
20
|
+
padding: ${t.xx_small};
|
|
21
|
+
z-index: 1000;
|
|
22
|
+
top: 50%;
|
|
23
|
+
right: calc(${t.x_small} * -1);
|
|
24
|
+
transform: translate(100%, -50%);
|
|
25
|
+
animation: ${m} 0.25s;
|
|
26
|
+
background: ${e.ui.background__light.rgba};
|
|
27
|
+
border: 1px solid ${e.ui.background__medium.rgba};
|
|
28
|
+
border-radius: 2px;
|
|
29
|
+
p,
|
|
30
|
+
svg {
|
|
31
|
+
color: ${e.interactive.primary__resting.rgba};
|
|
32
|
+
}
|
|
33
|
+
p {
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
margin-top: 2px;
|
|
36
|
+
}
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: auto 2.75rem;
|
|
39
|
+
grid-gap: ${t.xx_small};
|
|
40
|
+
align-items: center;
|
|
41
|
+
`;var g=({children:e,textToCopy:t})=>{let n=i(!1),[c,l]=a(!1),[m,g]=a(`Copy`);return r(()=>(n.current=!0,()=>{n.current=!1}),[]),d(p,{onClick:()=>{navigator.clipboard.writeText(t),g(`Copied!`),setTimeout(()=>{n.current&&g(`Copy`)},3e3)},onMouseOver:()=>l(!0),onMouseOut:()=>l(!1),children:[e,c&&d(h,{children:[u(o,{data:f,size:16}),u(s,{variant:`overline`,children:m})]})]})};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react90 from "react";
|
|
2
2
|
import { FocusEventHandler, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
3
3
|
import { IconData } from "@equinor/eds-icons";
|
|
4
4
|
|
|
@@ -15,6 +15,6 @@ interface ListItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
15
15
|
isChild?: boolean;
|
|
16
16
|
borderBottom?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const ListItem:
|
|
18
|
+
declare const ListItem: react90.ForwardRefExoticComponent<ListItemProps & react90.RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { ListItem, ListItemProps };
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import{
|
|
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`
|
|
2
2
|
display: flex;
|
|
3
|
-
gap: ${
|
|
3
|
+
gap: ${n.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 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};
|
|
11
11
|
`:``}
|
|
12
12
|
&:disabled {
|
|
13
13
|
cursor: not-allowed;
|
|
14
14
|
background: transparent;
|
|
15
15
|
> section > p {
|
|
16
|
-
color: ${
|
|
16
|
+
color: ${t.interactive.disabled__text.rgba};
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
&:focus:not(:disabled) {
|
|
20
|
-
outline: 1px dashed ${
|
|
20
|
+
outline: 1px dashed ${t.interactive.primary__resting.rgba};
|
|
21
21
|
}
|
|
22
22
|
&:hover:not(:disabled) {
|
|
23
|
-
background: ${({$selected:e})=>e?
|
|
23
|
+
background: ${({$selected:e})=>e?t.interactive.primary__selected_hover.rgba:t.interactive.primary__hover_alt.rgba};
|
|
24
24
|
}
|
|
25
25
|
> section {
|
|
26
|
-
padding: ${
|
|
26
|
+
padding: ${n.small} 0};
|
|
27
27
|
}
|
|
28
|
-
`,d=
|
|
28
|
+
`,d=o.span`
|
|
29
29
|
margin-left: auto;
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
|
-
`,f=
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Icon as t}from"@equinor/eds-core-react";import{jsx as n}from"react/jsx-runtime";const r=r=>r&&typeof r==`object`&&`prefix`in r?n(t,{data:r,color:e.interactive.primary__resting.rgba}):r;export{r as renderContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import t from"styled-components";const n=t.div`
|
|
2
|
+
margin-left: ${({$section:e})=>e>0?`22px`:``};
|
|
3
|
+
opacity: 1;
|
|
4
|
+
color: ${e.text.static_icons__default.rgba};
|
|
5
|
+
`,r=t.button`
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex: 1;
|
|
9
|
+
align-items: center;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
transition: background-color 0.1s ease-in;
|
|
12
|
+
font-family: 'Equinor', sans-serif;
|
|
13
|
+
font-size: 1rem;
|
|
14
|
+
color: ${e.text.static_icons__default.rgba};
|
|
15
|
+
&:hover:not(:disabled) {
|
|
16
|
+
background-color: ${e.interactive.primary__hover_alt.rgba};
|
|
17
|
+
}
|
|
18
|
+
&:disabled {
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
color: ${e.interactive.disabled__text.rgba};
|
|
21
|
+
> button {
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
> span::before {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
svg {
|
|
30
|
+
fill: ${e.interactive.primary__resting.rgba};
|
|
31
|
+
}
|
|
32
|
+
`,i=t.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
${({$paddedLeft:e})=>e&&`margin-left: 40px`};
|
|
36
|
+
`;export{r as StyledOption,i as StyledOptionItem,n as StyledOptionWrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=t=>{if(t.length===0)return[];let n=[];return t.forEach(t=>{let r=e(t?.children??[]);n=[t,...n,...r]}),n},t=(t,n,r,i)=>{if(n.find(e=>e.id===t.id)!==void 0)return`CHECKED`;if(t.children===void 0||t.children.length===0||r&&!i)return`NONE`;let a=e(t?.children).map(e=>n.find(t=>t.id===e.id)!==void 0);return!r&&a.every(Boolean)?`CHECKED`:a.every(e=>!e)?`NONE`:`INTERMEDIATE`};export{t as getStatus};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react17 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: react17.ForwardRefExoticComponent<{
|
|
10
10
|
textTransform?: string;
|
|
11
11
|
} & {
|
|
12
12
|
placement?: _floating_ui_utils0.Placement;
|
|
13
|
-
title?:
|
|
13
|
+
title?: react17.ReactNode;
|
|
14
14
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
15
15
|
enterDelay?: number;
|
|
16
16
|
portalContainer?: HTMLElement;
|
|
17
|
-
} & Omit<
|
|
17
|
+
} & Omit<react17.HTMLAttributes<HTMLDivElement>, "title"> & react17.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{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)`
|
|
2
2
|
color: white;
|
|
3
3
|
text-transform: ${e=>e.textTransform};
|
|
4
|
-
`,o=e(({title:e,children:
|
|
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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react21 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: react21.ForwardRefExoticComponent<ProfileAvatarProps & react21.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{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=>e.split(`,`)[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`
|
|
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?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};
|
|
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=a
|
|
17
|
+
`,h=o(a)`
|
|
18
18
|
width: 70%;
|
|
19
|
-
`,g=
|
|
19
|
+
`,g=o.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
|
+
`,_=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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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 +1 @@
|
|
|
1
|
-
import{
|
|
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 +1 @@
|
|
|
1
|
-
import{
|
|
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()};return a(r,{children:[i(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange: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()},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,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 react31 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<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
+
Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
+
Button: react31.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react31.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.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{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`
|
|
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: ${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};
|
|
@@ -1,4 +1,4 @@
|
|
|
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{colors as t}from"../../../atoms/style/colors.js";import n from"styled-components";const{spacings:r,shape:i}=e,a=n.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=n.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: ${t.interactive.disabled__text.rgba};
|
|
47
47
|
}
|
|
48
|
-
`,s=e=>e.$active?
|
|
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};
|