@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
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{elevation as t}from"../../atoms/style/index.js";import{Theme as n}from"../../atoms/enums/Theme.js";import{ThemeProviderContext as r}from"../../providers/ThemeProvider/ThemeProvider.js";import{TopBarMenu as i}from"./TopBarMenu.js";import{TopBarButton as a}from"./TopBar.styles.js";import{useContext as o,useMemo as s,useRef as c,useState as l}from"react";import{Icon as u,Radio as d,Typography as f}from"@equinor/eds-core-react";import p from"styled-components";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{settings as _}from"@equinor/eds-icons";const v=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
align-items: center;
|
|
5
|
-
gap: ${
|
|
6
|
-
padding: 0 ${
|
|
5
|
+
gap: ${e.x_small};
|
|
6
|
+
padding: 0 ${e.large} 0 ${e.small};
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
> span {
|
|
9
|
-
padding: ${
|
|
9
|
+
padding: ${e.small} ${e.x_small};
|
|
10
10
|
}
|
|
11
|
-
`,y=
|
|
11
|
+
`,y=p.div`
|
|
12
12
|
width: 64px;
|
|
13
13
|
height: 32px;
|
|
14
14
|
background-color: ${e=>e.$color};
|
|
15
|
-
box-shadow: ${
|
|
15
|
+
box-shadow: ${t.raised};
|
|
16
16
|
border-radius: 4px;
|
|
17
|
-
`,b=
|
|
17
|
+
`,b=p.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
|
-
gap: ${
|
|
20
|
+
gap: ${e.medium};
|
|
21
21
|
> div > p {
|
|
22
|
-
padding-top: ${
|
|
23
|
-
padding-left: ${
|
|
22
|
+
padding-top: ${e.small};
|
|
23
|
+
padding-left: ${e.medium};
|
|
24
24
|
}
|
|
25
|
-
`,x=({allSettings:
|
|
25
|
+
`,x=({allSettings:e,children:t})=>{let p=c(null),[x,S]=l(!1),C=o(r),w=()=>S(!1),T=()=>S(!x),E=s(()=>C?[{title:`Theme`,value:C.theme,onChange:e=>C.setTheme(e),items:[{label:`Light Mode`,name:`theme-group`,value:n.LIGHT,colorBox:`#ffffff`},{label:`Dark Mode`,name:`theme-group`,value:n.DARK,colorBox:`#243746`}]},...e??[]]:e??[],[e,C]);if(E.length===0)throw Error(`Empty settings in TopBar.Settings!`);return g(m,{children:[h(a,{variant:`ghost_icon`,onClick:T,ref:p,children:h(u,{data:_,size:24})}),g(i,{open:x,title:`Settings`,onClose:w,anchorEl:p.current,children:[h(b,{children:E.map((e,t)=>g(`div`,{children:[h(f,{variant:`overline`,children:e.title}),e.items.map((t,n)=>g(v,{children:[h(d,{id:t.label,disabled:t.disabled,label:t.label,name:e.title,value:`${t.label}-${n}`,checked:e.value===t.value,onChange:()=>e.onChange?.(t.value)}),t.colorBox&&h(y,{$color:t.colorBox,"data-testid":`colorbox-${t.colorBox}`}),t.text&&h(f,{variant:`h6`,children:t.text}),t.element&&t.element]},n))]},t))}),t]})]})};x.displayName=`TopBar.Settings`;export{x as Settings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AppAndFieldContainer as
|
|
1
|
+
import{EnvironmentType as e}from"../../atoms/enums/Environment.js";import{ApplicationIcon as t}from"../../molecules/ApplicationIcon/ApplicationIcon.js";import{AppAndFieldContainer as n,AppIdentifier as r,AppName as i,Bar as a,CircularProgress as o,EnvironmentTag as s}from"./TopBar.styles.js";import{FieldMenu as c}from"./FieldMenu/FieldMenu.js";import l,{forwardRef as u}from"react";import{Typography as d}from"@equinor/eds-core-react";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=u(({id:l,children:u,headerLink:m,applicationIcon:h,applicationName:g,environment:_,isFetching:v=!1,capitalize:y=!1,availableFields:b,onSelectField:x,currentField:S,showAccessITLink:C,itemNameSingular:w},T)=>p(a,{ref:T,children:[p(n,{id:l,children:[p(r,{tabIndex:0,to:m||`/`,children:[f(t,{name:h,size:32,withHover:!0}),f(i,{group:`navigation`,variant:`menu_title`,$capitalize:y,children:y?g.toLowerCase():g})]}),b&&x&&f(c,{availableFields:b,onSelect:x,currentField:S,showAccessITLink:C,itemNameSingular:w}),v&&f(o,{size:16})]}),(_===e.DEVELOP||_===e.STAGING||_===e.LOCALHOST)&&f(s,{$environmentType:_,children:f(d,{group:`heading`,variant:`h5`,children:_})}),u]}));m.displayName=`TopBar`;export{m as TopBar};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import{
|
|
2
|
-
border-bottom: 1px solid ${
|
|
3
|
-
padding-left: ${
|
|
1
|
+
import{EnvironmentType as e}from"../../atoms/enums/Environment.js";import{colors as t}from"../../atoms/style/colors.js";import{spacings as n}from"../../atoms/style/spacings.js";import{Button as r,CircularProgress as i,TopBar as a,Typography as o}from"@equinor/eds-core-react";import s,{css as c}from"styled-components";import{Link as l}from"@tanstack/react-router";const u=s(a)`
|
|
2
|
+
border-bottom: 1px solid ${t.ui.background__medium.rgba};
|
|
3
|
+
padding-left: ${n.medium};
|
|
4
4
|
align-content: center;
|
|
5
5
|
position: relative;
|
|
6
|
-
`,d=
|
|
6
|
+
`,d=s(l)`
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: row;
|
|
9
9
|
align-items: center;
|
|
10
|
-
gap: ${
|
|
10
|
+
gap: ${n.medium_small};
|
|
11
11
|
padding: 0;
|
|
12
|
-
outline-offset: ${
|
|
12
|
+
outline-offset: ${n.x_small};
|
|
13
13
|
text-decoration: none;
|
|
14
14
|
&:hover {
|
|
15
15
|
border-radius: 4px;
|
|
16
16
|
outline: none;
|
|
17
17
|
}
|
|
18
|
-
`,f=
|
|
18
|
+
`,f=s(a.Header)`
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
gap: ${
|
|
22
|
-
`,p=
|
|
21
|
+
gap: ${n.medium};
|
|
22
|
+
`,p=s(o)`
|
|
23
23
|
text-transform: ${e=>e.$capitalize?`capitalize`:`none`};
|
|
24
|
-
`,m=
|
|
24
|
+
`,m=s(i)`
|
|
25
25
|
circle {
|
|
26
|
-
stroke: ${
|
|
26
|
+
stroke: ${t.interactive.primary__resting.rgba};
|
|
27
27
|
}
|
|
28
28
|
circle:first-child {
|
|
29
|
-
stroke: ${
|
|
29
|
+
stroke: ${t.interactive.primary__hover_alt.rgba};
|
|
30
30
|
}
|
|
31
|
-
`;function h(
|
|
32
|
-
background-color: ${
|
|
33
|
-
border: 1px solid ${
|
|
34
|
-
`}const g=
|
|
31
|
+
`;function h(n){let r=`none`,i=`none`;return n===e.LOCALHOST?(r=t.interactive.disabled__fill.rgba,i=t.interactive.disabled__text.rgba):n===e.DEVELOP?(r=t.ui.background__info.rgba,i=t.infographic.substitute__blue_overcast.rgba):n===e.STAGING&&(r=t.ui.background__warning.rgba,i=t.interactive.warning__text.rgba),`
|
|
32
|
+
background-color: ${r};
|
|
33
|
+
border: 1px solid ${i};
|
|
34
|
+
`}const g=s.div`
|
|
35
35
|
width: 214px;
|
|
36
36
|
height: 36px;
|
|
37
37
|
border-radius: 4px;
|
|
@@ -43,22 +43,22 @@ import{Link as e}from"@tanstack/react-router";import{EnvironmentType as t}from"s
|
|
|
43
43
|
transform: translateX(-50%);
|
|
44
44
|
text-transform: capitalize;
|
|
45
45
|
${e=>h(e.$environmentType)}
|
|
46
|
-
`,_=
|
|
47
|
-
background-color: ${
|
|
46
|
+
`,_=s.div`
|
|
47
|
+
background-color: ${t.interactive.danger__resting.rgba};
|
|
48
48
|
width: 10px;
|
|
49
49
|
height: 10px;
|
|
50
50
|
border-radius: 50%;
|
|
51
51
|
position: absolute;
|
|
52
52
|
right: 2px;
|
|
53
53
|
top: 4px;
|
|
54
|
-
border: 2px solid ${
|
|
54
|
+
border: 2px solid ${t.text.static_icons__primary_white.rgba};
|
|
55
55
|
// Box-sizing is a quickfix for use in PWEX because of global styling
|
|
56
56
|
box-sizing: content-box;
|
|
57
|
-
`,v=
|
|
57
|
+
`,v=s(r)`
|
|
58
58
|
&:hover ${_} {
|
|
59
|
-
border: 2px solid ${
|
|
59
|
+
border: 2px solid ${t.interactive.primary__hover_alt.rgba};
|
|
60
60
|
}
|
|
61
|
-
${({$fieldSelector:e})=>{if(!e)return
|
|
61
|
+
${({$fieldSelector:e})=>{if(!e)return c`
|
|
62
62
|
height: 36px;
|
|
63
63
|
width: 36px;
|
|
64
64
|
`}}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import e,{forwardRef as
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import t,{forwardRef as n,useEffect as r}from"react";import{Menu as i}from"@equinor/eds-core-react";import a from"styled-components";import{jsx as o}from"react/jsx-runtime";const s=a(i)`
|
|
2
2
|
padding: 0 !important;
|
|
3
3
|
min-width: 350px;
|
|
4
4
|
width: fit-content;
|
|
5
5
|
border-radius: 5px;
|
|
6
|
-
${({$withGap:
|
|
7
|
-
gap: ${
|
|
6
|
+
${({$withGap:t})=>t&&` > div[role="menu"] {
|
|
7
|
+
gap: ${e.large};
|
|
8
8
|
|
|
9
9
|
}
|
|
10
10
|
`}
|
|
11
|
-
`,c=
|
|
11
|
+
`,c=n(({open:e,onClose:t,children:n,anchorEl:i,isNotification:a,withGap:c=!1},l)=>(r(()=>{let n=()=>{e&&t()};return window.addEventListener(`resize`,n),()=>{window.removeEventListener(`resize`,n)}},[e,t]),e?o(s,{open:e,onClose:t,anchorEl:i,placement:a?`bottom`:`bottom-end`,"data-testid":`top-bar-menu`,ref:l,$withGap:c,children:n}):null));c.displayName=`TopBarMenu`;export{c as TopBarMenu};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{capitalize as t}from"../../atoms/utils/string.js";import{useFakeProgress as n}from"../../atoms/hooks/useFakeProgress.js";import{AnimatedCheckmark as r}from"../../molecules/AnimatedCheckmark/AnimatedCheckmark.js";import i from"react";import{Button as a,Dialog as o,Icon as s,LinearProgress as c,Typography as l}from"@equinor/eds-core-react";import u from"styled-components";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{close as m}from"@equinor/eds-icons";const h=u(o)`
|
|
2
2
|
width: 400px;
|
|
3
3
|
height: 323px;
|
|
4
|
-
`,g=
|
|
5
|
-
gap: ${
|
|
4
|
+
`,g=u.div`
|
|
5
|
+
gap: ${e.medium};
|
|
6
6
|
position: absolute;
|
|
7
7
|
top: 50%;
|
|
8
8
|
left: 50%;
|
|
@@ -14,20 +14,20 @@ import e from"react";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runt
|
|
|
14
14
|
|
|
15
15
|
width: 100%;
|
|
16
16
|
max-width: 370px;
|
|
17
|
-
padding: ${
|
|
18
|
-
`,_=
|
|
17
|
+
padding: ${e.medium} ${e.large};
|
|
18
|
+
`,_=u(l)`
|
|
19
19
|
span {
|
|
20
20
|
text-transform: capitalize;
|
|
21
21
|
}
|
|
22
|
-
`,v=
|
|
22
|
+
`,v=u.div`
|
|
23
23
|
display: flex;
|
|
24
24
|
flex-direction: column;
|
|
25
|
-
gap: ${
|
|
26
|
-
`,y=
|
|
25
|
+
gap: ${e.large};
|
|
26
|
+
`,y=u.div`
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
|
-
gap: ${
|
|
29
|
+
gap: ${e.small};
|
|
30
30
|
width: 100%;
|
|
31
31
|
align-items: center;
|
|
32
|
-
padding: ${
|
|
33
|
-
`,b=({onClose:e,applicationName:
|
|
32
|
+
padding: ${e.large} 0;
|
|
33
|
+
`,b=({onClose:e,applicationName:i,url:u})=>{let{finished:b,progress:x}=n({onDone:()=>window.open(u,`_self`)});return f(d,{children:p(h,{open:!0,children:[p(o.Header,{children:[`Open link`,f(a,{variant:`ghost_icon`,onClick:e,"data-testid":`close-transfer-app`,children:f(s,{data:m})})]}),f(o.CustomContent,{children:f(g,{children:b?p(y,{children:[f(_,{variant:`h3`,children:f(`span`,{children:t(i)})}),f(r,{size:`small`})]}):p(v,{children:[p(l,{variant:`h3`,children:[`Transferring you to application.`,`.`.repeat(x/35)]}),f(c,{variant:`determinate`,value:x})]})})})]})})};export{b as TransferToAppDialog};
|
|
@@ -1,21 +1,21 @@
|
|
|
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{Icon as r,Typography as i}from"@equinor/eds-core-react";import a from"styled-components";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{check as c,chevron_right as l}from"@equinor/eds-icons";import{useTutorials as u}from"@equinor/subsurface-app-management";const d=a.button`
|
|
2
2
|
display: grid;
|
|
3
3
|
align-items: center;
|
|
4
4
|
grid-template-columns: 1fr auto;
|
|
5
|
-
row-gap: ${
|
|
6
|
-
padding: ${
|
|
7
|
-
transition: background ${
|
|
5
|
+
row-gap: ${n.small};
|
|
6
|
+
padding: ${n.medium};
|
|
7
|
+
transition: background ${e.transitionMS};
|
|
8
8
|
> header {
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
|
-
gap: ${
|
|
11
|
+
gap: ${n.small};
|
|
12
12
|
grid-column: span 2;
|
|
13
13
|
> p {
|
|
14
|
-
color: ${
|
|
14
|
+
color: ${t.interactive.primary__resting.rgba};
|
|
15
15
|
font-weight: 500;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
&:hover {
|
|
19
|
-
background: ${
|
|
19
|
+
background: ${t.interactive.primary__hover_alt.rgba};
|
|
20
20
|
}
|
|
21
|
-
`,f=({onTutorialStart:
|
|
21
|
+
`,f=({onTutorialStart:e,onClose:n,id:a,name:f})=>{let{startTutorial:p,seenTutorialIDs:m}=u(),h=m.includes(a);return s(d,{onClick:()=>{p(a),e?.(a),n()},children:[h&&s(`header`,{children:[o(r,{data:c,size:16,color:t.interactive.primary__resting.rgba}),o(i,{varinat:`caption`,children:`COMPLETED`})]}),o(i,{variant:`h4`,children:f}),o(r,{data:l,color:t.interactive.primary__resting.rgba})]})};export{f as TutorialItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TopBarMenu as e}from"../TopBarMenu.js";import{TopBarButton as t}from"../TopBar.styles.js";import{TutorialItem as n}from"./TutorialItem.js";import{Container as r,TutorialList as i}from"./Tutorials.styles.js";import{useRef as a,useState as o}from"react";import{Divider as s,Icon as c,Typography as l}from"@equinor/eds-core-react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{youtube_alt as p}from"@equinor/eds-icons";import{useTutorials as m}from"@equinor/subsurface-app-management";const h=({filterTutorials:h,onTutorialStart:g,..._})=>{let{allTutorials:v,tutorialsOnThisPage:y}=m(),[b,x]=o(!1),S=a(null),C=h?v.filter(h):v,w=h?y.filter(h):y,T=C.filter(e=>w.findIndex(t=>t.id===e.id)===-1),E=()=>x(e=>!e);return f(u,{children:[d(t,{variant:`ghost_icon`,ref:S,onClick:E,..._,children:d(c,{data:p})}),b&&d(e,{open:!0,onClose:E,anchorEl:S.current,children:f(r,{children:[f(l,{variant:`h4`,children:[`Available Tutorials (`,C.length,`)`]}),w.length>0&&f(i,{children:[d(l,{variant:`caption`,children:`For current page`}),w.map(e=>d(n,{onTutorialStart:g,onClose:E,...e},e.id))]}),w.length>0&&w.length>0&&d(s,{}),T.length>0&&f(i,{children:[d(l,{variant:`caption`,children:`For other pages`}),T.map(e=>d(n,{onTutorialStart:g,onClose:E,...e},e.id))]})]})})]})};export{h as Tutorials};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{spacings as e}from"../../../atoms/style/spacings.js";import t from"styled-components";const n=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
padding: ${
|
|
4
|
+
padding: ${e.large};
|
|
5
5
|
width: 520px;
|
|
6
6
|
> h4 {
|
|
7
|
-
margin-bottom: ${
|
|
7
|
+
margin-bottom: ${e.x_large};
|
|
8
8
|
}
|
|
9
9
|
> hr {
|
|
10
|
-
margin-bottom: ${
|
|
10
|
+
margin-bottom: ${e.x_large};
|
|
11
11
|
}
|
|
12
|
-
`,r=
|
|
12
|
+
`,r=t.section`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
> p:first-child {
|
|
16
|
-
margin-bottom: ${
|
|
16
|
+
margin-bottom: ${e.medium_small};
|
|
17
17
|
}
|
|
18
18
|
`;export{n as Container,r as TutorialList};
|
package/dist/organisms/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Status as e}from"./Status/index.js";import{MissingAccessToApp as t}from"./Status/collections/MissingAccessToApp.js";import{DataGrid as n}from"./DataGrid/DataGrid.js";import{Template as r}from"./Template/Template.js";import{FieldSelector as i}from"./FieldSelector/FieldSelector.js";import{Filter as a}from"./Filter/index.js";import{SideBar as o}from"./SideBar/index.js";import{ReleaseNote as s}from"./ReleaseNote/ReleaseNote.js";import{TopBar as c}from"./TopBar/index.js";import{BadRequest as l}from"./Status/collections/BadRequest.js";import{GenericError as u}from"./Status/collections/GenericError.js";import{MissingPermissions as d}from"./Status/collections/MissingPermissions.js";import{PageNotFound as f}from"./Status/collections/PageNotFound.js";import{ServerError as p}from"./Status/collections/ServerError.js";import{ApiResponseError as m}from"./Status/collections/ApiResponseError.js";import{TableOfContents as h}from"./TableOfContents/TableOfContents.js";import{PageTitle as g}from"./PageTitle/PageTitle.js";import{ToggleGroup as _}from"./ToggleGroup/index.js";import{Faq as v}from"./Faq/Faq.js";import{Card as y}from"@equinor/eds-core-react";export{y as Card};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{auth as e,environment as t}from"../../atoms/utils/auth_environment.js";import{AuthProviderInner as n}from"./AuthProviderInner.js";import{createContext as r,useContext as i,useMemo as a,useState as o}from"react";import{MsalProvider as s}from"@azure/msal-react";import{jsx as c}from"react/jsx-runtime";const{msalApp:l}=e,{getIsMock:u,getMockUserPhoto:d,getMockRoles:f}=t,p=r(void 0),m=()=>{let e=i(p);if(e===void 0)throw Error(`useAuth must be used within a AuthContext provider`);return e},h={homeAccountId:`mock-home-account-id`,environment:`mock`,tenantId:`mock-tenant-id`,username:`MOCK@equinor.com`,localAccountId:`mock-local-account-id`,name:`Mock mocksnes`,idToken:`fake`,idTokenClaims:{id:`claim`},nativeAccountId:`accountid`,authorityType:`authority`,tenantProfiles:new Map},g=({children:e,loadingComponent:t,unauthorizedComponent:r,withoutLoader:i=!1,withoutBackend:m=!1})=>{let[g,_]=o(void 0),[v,y]=o(),[b,x]=o(`loading`),[S,C]=o(),w=a(()=>u(import.meta.env.VITE_IS_MOCK),[]),T=a(()=>d(import.meta.env.VITE_MOCK_USER_PHOTO),[]),E=a(()=>f(import.meta.env.VITE_MOCK_ROLES),[]);return w?(b===`loading`&&setTimeout(()=>{x(`authorized`)},1e3),c(p.Provider,{value:{roles:E,account:h,photo:T,logout:()=>console.log(`Logged out the user!`),authState:b},children:e})):c(p.Provider,{value:{roles:v,account:g,photo:S,logout:()=>l.logoutRedirect(),authState:b},children:c(s,{instance:l,children:c(n,{loadingComponent:t,unauthorizedComponent:r,account:g,setAccount:_,setRoles:y,setPhoto:C,authState:b,setAuthState:x,withoutLoader:i,withoutBackend:m,children:e})})})};export{g as AuthProvider,m as useAuth};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{auth as e,environment as t}from"../../atoms/utils/auth_environment.js";import{FullPageSpinner as n}from"../../molecules/FullPageSpinner/FullPageSpinner.js";import{MissingAccessToApp as r}from"../../organisms/Status/collections/MissingAccessToApp.js";import{useEffect as i,useRef as a,useState as o}from"react";import{useMsal as s,useMsalAuthentication as c}from"@azure/msal-react";import{InteractionRequiredAuthError as l,InteractionType as u}from"@azure/msal-browser";import{jsx as d}from"react/jsx-runtime";import{jwtDecode as f}from"jwt-decode";const{GRAPH_ENDPOINTS:p,GRAPH_REQUESTS_LOGIN:m,GRAPH_REQUESTS_PHOTO:h,GRAPH_REQUESTS_BACKEND:g,fetchMsGraph:_,isInIframe:v}=e,{getApiScope:y}=t,b=({children:e,account:t,setAccount:b,setPhoto:x,setRoles:S,authState:C,setAuthState:w,withoutLoader:T,loadingComponent:E,unauthorizedComponent:D,withoutBackend:O})=>{let{instance:k,accounts:A,inProgress:j}=s(),{login:M,result:N,error:P,acquireToken:F}=c(u.Silent,m),[I,L]=o(!1),R=a(!1);return i(()=>{I||(async()=>{console.log(`[AuthProvider] Initializing`),await k.initialize(),console.log(`[AuthProvider] Finished initializing`),L(!0)})().catch(e=>{console.error(`[AuthProvider] Error during initialization`,e)})},[k,I]),i(()=>{I&&(P instanceof l&&!v()&&C!==`unauthorized`?(console.error(P),console.log(`[AuthProvider] No account found, need to login via. redirect`),M(u.Redirect,m).catch(e=>{console.error(`[AuthProvider] Error during login`,e)})):N?.account&&!t?(console.log(`[AuthProvider] Found account in useMsalAuth result, setting that one as active`),k.setActiveAccount(N.account),b(N.account)):A.length>0&&!t?(console.log(`[AuthProvider] Found account in accounts array, setting that one as active`),k.setActiveAccount(A[0]),b(A[0])):P&&console.error(`[AuthProvider] Unexpected error:`,P))},[t,A,P,k,I,M,N,b,C]),i(()=>{if(!t||!I||R.current||j!==`none`)return;R.current=!0;let e=async()=>{try{let e=await F(u.Silent,h);if(e){let t=await _(p.PHOTO,e.accessToken);if(t.status===404)return null;let n=await t.blob(),r=(window.URL??window.webkitURL).createObjectURL(n);x(r)}}catch(e){console.error(e)}},n=async()=>{try{let e=await F(u.Silent,g(y(import.meta.env.VITE_API_SCOPE)));if(console.log(`[AuthProvider] Successfully acquired token`),e&&e.accessToken){console.log(`[AuthProvider] Decoding token`);let t=f(e.accessToken);if(console.log(`[AuthProvider] Token was valid`),t.roles)console.log(`[AuthProvider] Found roles`),S(t.roles);else throw Error(`Could not find roles in token`);w(`authorized`)}}catch(e){console.error(`[AuthProvider] Token error when trying to get roles!`,e),w(`unauthorized`)}};(async()=>{await e(),O?w(`authorized`):await n()})()},[t,F,P,I,j,w,x,S,O]),C===`unauthorized`?D??d(r,{}):T?e:C===`loading`||t===void 0?E??d(n,{variant:`application`}):e};export{b as AuthProviderInner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{FullPageSpinner as e}from"../molecules/FullPageSpinner/FullPageSpinner.js";import{useAuth as t}from"./AuthProvider/AuthProvider.js";import{useEffect as n,useState as r}from"react";import{jsx as i}from"react/jsx-runtime";import{SAM_QUERIES as a}from"@equinor/subsurface-app-management";import{useIsFetching as o}from"@tanstack/react-query";const s=({customQueryKeys:s=[],children:c})=>{let{authState:l}=t(),u=o({predicate:e=>a.some(t=>e.queryKey.includes(t))||s.some(t=>e.queryKey.includes(t))})>0,[d,f]=r(!0);return n(()=>{l===`authorized`&&!u&&d&&f(!1)},[l,u,d]),l===`authorized`?d?i(e,{variant:`application`,fixedPosition:!0,children:c}):c:i(e,{variant:`application`,fixedPosition:!0})};export{s as LoadingProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{EnvironmentType as e}from"../atoms/enums/Environment.js";import{environment as t}from"../atoms/utils/auth_environment.js";import{useLocalStorage as n}from"../atoms/hooks/useLocalStorage.js";import{usingReleaseNoteDate as r}from"../organisms/ReleaseNote/ReleaseNote.utils.js";import{environmentAndAppNameToURL as i}from"../organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js";import{sortReleaseNotesByDate as a}from"./ReleaseNotesProvider.utils.js";import{createContext as o,useContext as s,useEffect as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";import{useReleaseNotesQuery as d}from"@equinor/subsurface-app-management";const{getEnvironmentName:f,getAppName:p}=t,m=o(void 0),h=()=>{let e=s(m);if(e===void 0)throw Error(`useReleaseNotes must be used within a ReleaseNotesProvider`);return e},g=1e3*60*60*24*14,_=({children:t,enabled:o,popUpNewReleaseNote:s=!1})=>{let{data:h}=d({enabled:o}),[_,v]=l(!1),[y,b]=n(`release-notes-was-viewed-key`,``,g),x=h?.toSorted(a).at(0),S=p(import.meta.env.VITE_NAME),C=f(import.meta.env.VITE_ENVIRONMENT_NAME),w=C===e.LOCALHOST?e.DEVELOP:C,T=i(w,S);return c(()=>{if(!x||!s)return;let e=new Date(r(x)).getTime();Date.now()-e<=g&&y!==x.releaseId&&(v(!0),b(x.releaseId))},[y,x,s,b]),u(m.Provider,{value:{open:_,setOpen:v,mostRecentReleaseNote:x,showAllReleaseNotesLink:T},children:t})};export{_ as ReleaseNotesProvider,h as useReleaseNotes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{sortByDate as e}from"../atoms/utils/sort.js";const t=(t,n)=>e(t.releaseDate??t.createdDate,n.releaseDate??n.createdDate);export{t as sortReleaseNotesByDate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as e,useContext as t,useReducer as n}from"react";import{jsx as r}from"react/jsx-runtime";
|
|
1
|
+
import{createContext as e,useContext as t,useReducer as n}from"react";import{jsx as r}from"react/jsx-runtime";function i(){let e=t(a);if(e===void 0)throw Error(`Sidebar hook must be used within Provider`);return e}const a=e(void 0),o=`amplify-sidebar-state`,s=()=>{let e=localStorage.getItem(o);return e?JSON.parse(e):{isOpen:!1}},c=e=>{localStorage.setItem(o,JSON.stringify(e))},l=(e,t)=>(c(t),t),u=({children:e})=>{let[t,i]=n(l,s());return r(a.Provider,{value:{isOpen:t.isOpen,setIsOpen:e=>{i({isOpen:e})}},children:e})};export{u as SideBarProvider,i as useSideBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{StyledSnackbar as e}from"./SnackbarProvider.styles.js";import{snackbarIcon as t}from"./SnackbarProvider.utils.js";import{createContext as n,useCallback as r,useContext as i,useState as a}from"react";import{Button as o,Icon as s,Snackbar as c,Typography as l}from"@equinor/eds-core-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{close as f}from"@equinor/eds-icons";const p=n(void 0),m=()=>{let e=i(p);if(e===void 0)throw Error(`useSnackbar must be used within a SnackbarContextProvider`);return e},h=({children:n,...i})=>{let[m,h]=a(!1),[g,_]=a(void 0),[v,y]=a(i),[b,x]=a(),S=r((e,t)=>{_(typeof e==`string`?{text:e,variant:`info`}:e),y(t?.customProps??i),x(t?.action??void 0),h(!0)},[i]),C=e=>{x(t=>t&&{...t,disabled:e})},w=()=>h(!1),T=()=>{h(!1),v.onClose&&v.onClose()};return d(p.Provider,{value:{showSnackbar:S,setActionDisabledState:C,hideSnackbar:w},children:[n,d(e,{$variant:g?.variant,open:m,onClose:T,autoHideDuration:v.autoHideDuration,placement:v.placement,children:[g&&u(s,{data:t(g.variant)}),u(l,{variant:`body_short`,children:g?.text}),b&&u(c.Action,{children:u(o,{disabled:b.disabled,variant:`ghost`,onClick:b.handler,children:b.text})}),u(o,{variant:`ghost_icon`,onClick:T,children:u(s,{data:f})})]})]})};export{h as SnackbarProvider,m as useSnackbar};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Snackbar as n}from"@equinor/eds-core-react";import r,{css as i}from"styled-components";const a={info:{outline:e.text.static_icons__default.rgba,text:e.text.static_icons__primary_white.rgba,icon:e.text.static_icons__primary_white.rgba},warning:{outline:e.interactive.warning__highlight.rgba,text:e.ui.background__warning.rgba,icon:e.interactive.warning__resting.rgba},error:{outline:e.interactive.danger__highlight.rgba,text:e.ui.background__danger.rgba,icon:e.interactive.danger__resting.rgba}},o=r(n)`
|
|
2
|
+
display: grid;
|
|
3
|
+
align-items: center;
|
|
4
|
+
grid-template-columns: auto 1fr auto;
|
|
5
|
+
gap: ${t.small};
|
|
6
|
+
max-width: 512px;
|
|
7
|
+
min-width: calc(300px - ${t.medium} * 2);
|
|
8
|
+
background: ${e.text.static_icons__default.rgba};
|
|
9
|
+
padding: ${t.small} ${t.small} ${t.small}
|
|
10
|
+
${t.medium};
|
|
11
|
+
min-height: unset;
|
|
12
|
+
&:has(div > button) {
|
|
13
|
+
grid-template-columns: auto 1fr auto auto;
|
|
14
|
+
}
|
|
15
|
+
> div > button:hover,
|
|
16
|
+
> button:hover {
|
|
17
|
+
color: ${e.text.static_icons__default.rgba};
|
|
18
|
+
background: ${e.ui.background__light.rgba};
|
|
19
|
+
svg {
|
|
20
|
+
fill: ${e.text.static_icons__default.rgba};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
> button {
|
|
24
|
+
height: 36px;
|
|
25
|
+
width: 36px;
|
|
26
|
+
}
|
|
27
|
+
${({$variant:e})=>{if(!e)return``;let{outline:t,text:n,icon:r}=a[e];return i`
|
|
28
|
+
outline: 1px solid ${t};
|
|
29
|
+
|
|
30
|
+
p,
|
|
31
|
+
button {
|
|
32
|
+
color: ${n};
|
|
33
|
+
}
|
|
34
|
+
svg {
|
|
35
|
+
fill: ${n};
|
|
36
|
+
}
|
|
37
|
+
> svg:first-child {
|
|
38
|
+
fill: ${r};
|
|
39
|
+
}
|
|
40
|
+
`}}
|
|
41
|
+
`;export{o as StyledSnackbar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{error_outlined as e,info_circle as t,warning_outlined as n}from"@equinor/eds-icons";function r(r){switch(r){case`info`:return t;case`warning`:return n;case`error`:return e}}export{r as snackbarIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as e,useCallback as t,useContext as n,useState as r}from"react";import{jsx as i}from"react/jsx-runtime";import{useLocation as a,useNavigate as o,useParams as s}from"@tanstack/react-router";const c=e(void 0)
|
|
1
|
+
import{createContext as e,useCallback as t,useContext as n,useState as r}from"react";import{jsx as i}from"react/jsx-runtime";import{useLocation as a,useNavigate as o,useParams as s}from"@tanstack/react-router";const c=e(void 0);function l(){let e=n(c);if(!e)throw Error(`useStepper must be used within a StepperProvider`);return e}const u=({steps:e,children:n,isStepDisabled:l,...u})=>{let{step:d}=s({strict:!1}),f=o(),p=a().pathname.split(`/`).slice(0,-1).join(`/`),m=u.syncToURLParam?Number(d):u?.initialStep??0;if(u.syncToURLParam&&d&&isNaN(Number(d)))throw Error(`Step URL param must be a valid number when using "syncToURLParam"`);if(e.length<2)throw Error(`Stepper must have at least 2 steps`);let[h,g]=r(m),_=u.syncToURLParam?Number(d):h,[v,y]=r(0);if(m>=e.length||m<0)throw Error(`initialStep must be a valid index of the steps array`);let b=e=>{u.syncToURLParam?f({to:`${p}/${e}`}):g(e)},x=()=>{v!==0&&y(0)},S=()=>{if(`subSteps`in e[_]&&e[_].subSteps&&v<e[_].subSteps.length-1){y(e=>e+1);return}_!==e.length-1&&(b(_+1),x())},C=()=>{if(v>0&&`subSteps`in e[_]&&e[_].subSteps&&e[_].subSteps.length>0){y(e=>e-1);return}if(_===0)return;b(_-1);let t=e.at(_-1);t&&`subSteps`in t&&t.subSteps&&y(t.subSteps.length-1)},w=t(t=>l?l({step:e[t],stepIndex:t,currentStep:e[_],currentStepIndex:_}):!1,[l,_,e]);return i(c.Provider,{value:{steps:e,currentStep:_,currentSubStep:v,setCurrentStep:b,goToNextStep:S,goToPreviousStep:C,isStepAtIndexDisabled:w},children:n})};export{u as StepperProvider,l as useStepper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as
|
|
1
|
+
import{useOnScreenMultiple as e}from"../atoms/hooks/useOnScreenMultiple.js";import{getValues as t}from"./TableOfContentsProvider.utils.js";import{createContext as n,useCallback as r,useContext as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";import{useLocation as u,useNavigate as d}from"@tanstack/react-router";const f=n(void 0);function p(){let e=i(f);if(e===void 0)throw Error(`'useTableOfContents' must be used within provider`);return e}const m=({items:n,children:i,hashNavigation:p})=>{let m=d(),{hash:h}=u(),[g,_]=c(n[0]?.value),[v,y]=c([]),b=s(!1),x=o(()=>n.flatMap(e=>t([],e)),[n]);a(()=>{y(x.map(e=>document.getElementById(e)))},[x]),a(()=>{h.length||(b.current=!0)},[h]);let S=r(e=>e.value===g?!0:e.children&&g?t([],e).includes(g):!1,[g]),C=e(v),w=s(-1),T=r((e,t)=>{let n=x.findIndex(t=>t===e);if(p){_(x[n]),m({to:`.`,hash:`#${x[n]}`,hashScrollIntoView:!1,replace:!0});return}let r=v[n];if(r){let e=t?.behavior??`smooth`;r.scrollIntoView({block:`start`,behavior:e}),w.current=n;let i=1/0,a=0,o=()=>{let e=r?.getBoundingClientRect().top;if(e===i){if(a+=1,a>1){_(x[n]),w.current=-1;return}}else a=0,i=e;requestAnimationFrame(o)};requestAnimationFrame(o)}},[v,p,m,x]);return a(()=>{if(h&&!b.current){b.current=!0;let e=decodeURIComponent(h.replace(`#`,``));if(!e.length||!x.includes(e))return;_(e),m({to:`.`,hash:`#${e}`,hashScrollIntoView:{block:`start`,behavior:`instant`},replace:!0})}},[h,m,x]),a(()=>{if(C.length===0||C.length!==x.length||w.current!==-1||!b.current)return;let e=-1;for(let t=C.length-1;t>=0;t--)C[t]&&(e=t);e===-1||x.at(e)===void 0||(_(x[e]),p&&m({to:`.`,hash:`#${x[e]}`,hashScrollIntoView:!1,replace:!0}))},[T,p,m,x,C]),l(f.Provider,{value:{items:n,selected:g,setSelected:T,isActive:S},children:i})};export{m as TableOfContentsProvider,p as useTableOfContents};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t,n){if(n.children){let r=[...t,n.value];for(let t of n.children)r.push(...e([],t));return r}return[...t,n.value]}export{e as getValues};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useLocalStorage as e}from"../../atoms/hooks/useLocalStorage.js";import{THEME_LOCALSTORAGE_KEY as t}from"./ThemeProvider.constants.js";import{Theme as n}from"../../atoms/enums/Theme.js";import{createContext as r,useContext as i,useEffect as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=r(void 0);function c(){let e=i(s);if(e===void 0)throw Error(`ThemeProvider must be used within Provider`);return e}const l=({children:r})=>{let[i,c]=e(t,n.LIGHT);return a(()=>{document.documentElement.setAttribute(`data-theme`,i)},[i]),o(s.Provider,{value:{theme:i,setTheme:e=>{c(e)}},children:r})};export{l as ThemeProvider,s as ThemeProviderContext,c as useThemeProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={initial:{opacity:0},animate:{opacity:1},transition:{delay:.5,duration:.5}};export{e as TUTORIAL_HIGHLIGHT_ANIMATION_PROPS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TutorialHighlightingProviderInner as e}from"./TutorialHighlightingProviderInner.js";import{createContext as t,useContext as n}from"react";import{jsx as r}from"react/jsx-runtime";import{TutorialProvider as i}from"@equinor/subsurface-app-management";const a=t(void 0);function o(){let e=n(a);if(!e)throw Error(`useTutorialHighlighting must be used within a TutorialHighlightingProvider`);return e}const s=({children:t,contentRef:n,customStepContent:o})=>r(a.Provider,{value:{customStepContent:o??{}},children:r(i,{children:r(e,{contentRef:n,children:t})})});export{s as TutorialHighlightingProvider,o as useTutorialHighlighting};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{getHighlightElementBoundingBox as t}from"../../atoms/utils/tutorials.js";import{useReversedScrollY as n}from"./hooks/useReversedScrollY.js";import{TUTORIAL_HIGHLIGHT_ANIMATION_PROPS as r}from"./TutorialHighlightingProvider.constants.js";import{TutorialPopover as i}from"./TutorialPopover/TutorialPopover.js";import{useEffect as a,useState as o}from"react";import s from"styled-components";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{motion as d}from"framer-motion";import{useTutorials as f}from"@equinor/subsurface-app-management";import{useIsFetching as p}from"@tanstack/react-query";const m=s.svg`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
width: 100vw;
|
|
7
|
+
z-index: 9999999;
|
|
8
|
+
background: none;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
`,h=s.div`
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: ${e.medium};
|
|
17
|
+
z-index: 99999999;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
width: 100vw;
|
|
21
|
+
height: 100vh;
|
|
22
|
+
background: none;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
`,g=({children:e,contentRef:s})=>{let{activeTutorial:g,activeStep:_,unseenTutorialsOnThisPage:v}=f(),y=p()>0,b=n(s),[x,S]=o({width:window.innerWidth,height:window.innerHeight});a(()=>{let e=()=>{S({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let[C,w]=o([]);a(()=>{y||(async()=>{if(g&&_!==void 0){if(!g.steps[_].highlightElement)return w([]);let e=await t(g.id,_,x);return w(e?[e]:[])}let e=await Promise.all(v.map(e=>{if(e.steps.at(0)?.highlightElement)return t(e.id,0,x)}));return w(e.filter(e=>e!==void 0))})()},[_,g,y,v,x]);let T=g?[g]:v.filter(e=>e.steps[0].highlightElement&&C.some(e=>e.id)||!e.steps[0].highlightElement);return T.length>0?u(c,{children:[e,l(h,{children:T.map(e=>{let t=C.find(t=>t.id===e.id);return l(i,{isHighlighting:C.length>0,contentRef:s,...e,...t},e.id)})}),u(m,{children:[u(`mask`,{id:`tutorials-rectangles`,children:[l(`rect`,{width:`100%`,height:`100%`,fill:`white`}),l(d.g,{style:{translateY:b},children:C.map(e=>l(d.path,{"data-testid":`tutorial-mask-${e.id}`,initial:{opacity:0,d:`M ${e.left} ${e.top} h ${e.width} v ${e.height} h -${e.width} Z`},animate:{opacity:1,d:`M ${e.left} ${e.top} h ${e.width} v ${e.height} h -${e.width} Z`},fill:`black`},e.id))})]}),l(d.rect,{width:`100%`,height:`100%`,fill:`rgba(111, 111, 111, 0.35)`,mask:`url(#tutorials-rectangles)`,...r})]})]}):l(c,{children:e})};export{g as TutorialHighlightingProviderInner};
|
|
@@ -0,0 +1,20 @@
|
|
|
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{shape as r}from"../../../atoms/style/index.js";import i from"styled-components";import{jsx as a}from"react/jsx-runtime";import{useTutorials as o}from"@equinor/subsurface-app-management";const s=i.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: ${n.x_small};
|
|
4
|
+
`,c=i.span`
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
height: 4px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
background: ${t.interactive.tutorial__inactive_step.rgba};
|
|
9
|
+
border-radius: ${r.rounded.borderRadius};
|
|
10
|
+
position: relative;
|
|
11
|
+
&:after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
background: ${t.interactive.tutorial__active_step.rgba};
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
transition: left ${e.transitionMS};
|
|
18
|
+
left: calc(${({$index:e,$activeIndex:t})=>(t-e)*100}%);
|
|
19
|
+
}
|
|
20
|
+
`,l=({stepAmount:e})=>{let{activeStep:t}=o();return a(s,{style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.from({length:e}).map((e,n)=>a(c,{$index:n,$activeIndex:t},n))})};export{l as StepIndicator};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{elevation as n}from"../../../atoms/style/index.js";import{TUTORIAL_HIGHLIGHT_ANIMATION_PROPS as r}from"../TutorialHighlightingProvider.constants.js";import{useTutorialPopoverPosition as i}from"./hooks/useTutorialPopoverPosition.js";import{StepIndicator as a}from"./StepIndicator.js";import{useTutorialHighlighting as o}from"../TutorialHighlightingProvider.js";import{useState as s}from"react";import{Button as c,Card as l,Icon as u,Typography as d}from"@equinor/eds-core-react";import f,{css as p}from"styled-components";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{info_circle as _}from"@equinor/eds-icons";import{motion as v}from"framer-motion";import{useTutorialStepImage as y,useTutorials as b}from"@equinor/subsurface-app-management";function x(e){switch(e){case`top`:return p`
|
|
2
|
+
left: 50%;
|
|
3
|
+
top: 0;
|
|
4
|
+
transform: translate(-50%, 0) rotate(45deg);
|
|
5
|
+
`;case`top-right`:return p`
|
|
6
|
+
right: 0;
|
|
7
|
+
top: 0;
|
|
8
|
+
transform: translate(-50%, 0) rotate(45deg);
|
|
9
|
+
`;case`right`:return p`
|
|
10
|
+
right: 0;
|
|
11
|
+
top: 50%;
|
|
12
|
+
transform: translate(0, -50%) rotate(45deg);
|
|
13
|
+
`;case`bottom-right`:return p`
|
|
14
|
+
right: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
transform: translate(-50%, 0) rotate(45deg);
|
|
17
|
+
`;case`bottom`:return p`
|
|
18
|
+
left: 50%;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
transform: translate(-50%, 0) rotate(45deg);
|
|
21
|
+
`;case`bottom-left`:return p`
|
|
22
|
+
left: 24px;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
transform: translate(-50%, 0) rotate(45deg);
|
|
25
|
+
`;case`left`:return p`
|
|
26
|
+
left: 0;
|
|
27
|
+
top: 50%;
|
|
28
|
+
transform: translate(0, -50%) rotate(45deg);
|
|
29
|
+
`;case`top-left`:return p`
|
|
30
|
+
left: 24px;
|
|
31
|
+
top: 0;
|
|
32
|
+
transform: translate(-50%, 0) rotate(45deg);
|
|
33
|
+
`}}const S=f(v(l))`
|
|
34
|
+
width: 360px;
|
|
35
|
+
padding: ${t.medium};
|
|
36
|
+
background: ${e.ui.background__tutorial_card.rgba};
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: ${t.medium};
|
|
40
|
+
transition:
|
|
41
|
+
top 400ms,
|
|
42
|
+
left 400ms;
|
|
43
|
+
box-shadow: ${n.above_scrim};
|
|
44
|
+
pointer-events: auto;
|
|
45
|
+
> header {
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: ${t.small};
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
> img {
|
|
51
|
+
max-height: 170px;
|
|
52
|
+
object-fit: contain;
|
|
53
|
+
}
|
|
54
|
+
${({$highlightingElement:t,$caretPosition:n})=>t&&p`
|
|
55
|
+
transform: translateX(-50%);
|
|
56
|
+
&:before {
|
|
57
|
+
z-index: -1;
|
|
58
|
+
content: '';
|
|
59
|
+
width: 32px;
|
|
60
|
+
height: 32px;
|
|
61
|
+
background: ${e.ui.background__tutorial_card.rgba};
|
|
62
|
+
position: absolute;
|
|
63
|
+
${x(n)}
|
|
64
|
+
}
|
|
65
|
+
`}
|
|
66
|
+
`,C=f.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: flex-end;
|
|
69
|
+
gap: ${t.small};
|
|
70
|
+
&:has(> :last-child:nth-child(3)) {
|
|
71
|
+
> button:first-child {
|
|
72
|
+
margin-right: auto;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`,w=({contentRef:t,isHighlighting:n,id:l,top:f,left:p,width:v,height:x,name:w,steps:T})=>{let{customStepContent:E}=o(),{activeTutorial:D,activeStep:O,skipTutorial:k,startTutorial:A,goToNextStep:j,goToPreviousStep:M}=b(),{data:N}=y(D?.steps.at(O)?.imgUrl??void 0),[P,F]=s(void 0),{style:I,highlightingElement:L,caretPosition:R}=i({contentRef:t,top:f,left:p,width:v,height:x,popoverSize:P}),z=e=>{if(!e){F(void 0);return}F({width:e.clientWidth,height:e.clientHeight})},B=()=>{k(l)},V=()=>{A(l)};if(O!==void 0&&T[O].custom&&!E[T[O].id])throw Error(`[TutorialHighlightingProvider]: Custom step content not found, tutorial ID: ${l}, step ID: ${T[O].id}`);return!L&&n?null:!D||O===void 0?g(S,{ref:z,style:{...I},$highlightingElement:L,$caretPosition:R,...r,children:[g(`header`,{children:[h(u,{data:_,color:e.interactive.primary__resting.rgba}),h(d,{variant:`h6`,children:w})]}),g(C,{children:[h(c,{variant:`ghost`,onClick:B,children:`Skip`}),h(c,{onClick:V,children:`Start tour`})]})]}):g(S,{ref:z,style:{...I,width:T[O].custom?`auto`:void 0},$caretPosition:R,$highlightingElement:L,...r,children:[T[O].custom?E[T[O].id]:g(m,{children:[g(`header`,{children:[h(u,{data:_,color:e.interactive.primary__resting.rgba}),h(d,{variant:`h6`,children:T[O]?.title})]}),h(d,{variant:`body_short`,children:T[O]?.body}),N?h(`img`,{src:N,alt:T[O].title}):null]}),g(C,{children:[h(c,{variant:`outlined`,disabled:O===0,onClick:M,children:`Back`}),h(c,{variant:`ghost`,onClick:B,children:`Cancel`}),h(c,{onClick:j,children:O===T.length-1?`Finish`:`Next`})]}),h(a,{stepAmount:T.length})]})};export{w as TutorialPopover};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useReversedScrollY as e}from"../../hooks/useReversedScrollY.js";import{useTransform as t}from"framer-motion";function n({top:n,left:r,width:i,height:a,popoverSize:o,contentRef:s}){let c=e(s),l=n&&a?n+a+16:void 0,u=r&&i?r+i/2:void 0,d=!!l&&!!u,f=`top`,p=(o?.width??0)/2+16,m=window.innerWidth-16,h=window.innerHeight-16,g=n!==void 0&&a!==void 0&&r!==void 0&&i!==void 0&&u!==void 0&&o!==void 0&&u<o.width/2,_=n!==void 0&&a!==void 0&&r!==void 0&&i!==void 0&&u!==void 0&&o!==void 0&&u+o.width>window.innerWidth;g?(u=r+i+o.width/2+16,l=n-o.height/2-16/4,f=`left`):_&&(u=r-o.width/2-16,l=n-o.height/2-16/4,f=`right`);let v=n!==void 0&&a!==void 0&&l!==void 0&&o!==void 0&&n+a/2+o.height>=window.innerHeight,y=n!==void 0&&a!==void 0&&l!==void 0&&o!==void 0&&l<o.height;y?l=n+a+16:v&&(l=n-o.height-a-32),g&&(y||v)?u=r+o?.width/2:_&&(y||v)&&(u=r+i-o?.width/2),y&&g?f=`top-left`:y&&_&&(f=`top-right`),v&&g?f=`bottom-left`:v&&_?f=`bottom-right`:v&&(f=`bottom`);let b=t(c,e=>{if(!d||!l)return null;let t=e+l;return t<32?32:t>h?h:t});return u&&u<p?u=p:u&&u>m&&(u=m),{style:{position:d?`absolute`:void 0,top:b,left:u},highlightingElement:d,caretPosition:f}}export{n as useTutorialPopoverPosition};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useScroll as e,useTransform as t}from"framer-motion";function n(n){let{scrollY:r}=e({container:n});return t(r,e=>e>0?e*-1:0)}export{n as useReversedScrollY};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/amplify-component-lib",
|
|
3
|
-
"version": "9.16.0-beta.
|
|
3
|
+
"version": "9.16.0-beta.1",
|
|
4
4
|
"description": "Frontend Typescript components for the Amplify team",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"resize-observer-polyfill": "^1.5.1",
|
|
96
96
|
"resolve-tspaths": "^0.8.23",
|
|
97
97
|
"storybook": "^9.1.1",
|
|
98
|
-
"tsdown": "^0.14.
|
|
98
|
+
"tsdown": "^0.14.2",
|
|
99
99
|
"typescript": "^5.8.2",
|
|
100
100
|
"typescript-eslint": "^8.26.1",
|
|
101
101
|
"uuid": "^11.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useAmplifyKit as e}from"./useAmplifyKit.js";import{useDebounce as t}from"./useDebounce.js";import{useFakeProgress as n}from"./useFakeProgress.js";import{useLocalStorage as r}from"./useLocalStorage.js";import{usePrevious as i}from"./usePrevious.js";import{useSelect as a}from"./useSelect.js";import{usePrefetchRichTextImages as o}from"./usePrefetchRichTextImages.js";import{useFaqsInApplication as s}from"./useFaqsInApplication.js";import{useAuth as c}from"src/providers/AuthProvider/AuthProvider";import{useSnackbar as l}from"src/providers/SnackbarProvider/SnackbarProvider";import{useOnScreenMultiple as u}from"src/atoms/hooks/useOnScreenMultiple";import{useNotification as d}from"src/organisms/TopBar/Notifications/NotificationProvider";import{useReleaseNotes as f}from"src/providers/ReleaseNotesProvider";import{useSideBar as p}from"src/providers/SideBarProvider";import{useStepper as m}from"src/providers/StepperProvider";import{useTableOfContents as h}from"src/providers/TableOfContentsProvider";import{useThemeProvider as g}from"src/providers/ThemeProvider/ThemeProvider";export{c as useAuth,d as useNotification,u as useOnScreenMultiple,f as useReleaseNotes,p as useSideBar,l as useSnackbar,m as useStepper,h as useTableOfContents,g as useThemeProvider};
|
package/dist/providers/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SideBarProvider as e}from"./SideBarProvider.js";import{TableOfContentsProvider as t}from"./TableOfContentsProvider.js";import{ReleaseNotesProvider as n}from"./ReleaseNotesProvider.js";import{LoadingProvider as r}from"./LoadingProvider.js";import{ThemeProvider as i}from"./ThemeProvider/ThemeProvider.js";import{StepperProvider as a}from"./StepperProvider.js";import{AuthProvider as o}from"src/providers/AuthProvider/AuthProvider";import{SnackbarProvider as s}from"src/providers/SnackbarProvider/SnackbarProvider";import{TutorialHighlightingProvider as c}from"src/providers/TutorialHighlightingProvider/TutorialHighlightingProvider";export{o as AuthProvider,s as SnackbarProvider,c as TutorialHighlightingProvider};
|