@equinor/amplify-component-lib 9.12.0 → 9.13.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/hooks/index.d.ts +0 -1
- package/dist/atoms/hooks/useAmplifyKit.js +1 -1
- package/dist/atoms/hooks/useDebounce.js +1 -1
- package/dist/atoms/hooks/useFakeProgress.js +1 -1
- package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
- package/dist/atoms/hooks/useLocalStorage.js +1 -1
- package/dist/atoms/hooks/useOnScreenMultiple.js +1 -1
- package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
- package/dist/atoms/hooks/usePrevious.js +1 -1
- package/dist/atoms/hooks/useSelect.js +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/style/colors.d.ts +3 -0
- package/dist/atoms/style/colors.js +1 -1
- package/dist/atoms/style/darkTokens.js +1 -0
- package/dist/atoms/style/lightTokens.js +1 -0
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/export.js +1 -1
- package/dist/atoms/utils/richtext.js +1 -1
- package/dist/atoms/utils/string.js +1 -1
- package/dist/atoms/utils/tutorials.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +1 -1
- package/dist/deprecated/IconToggleButton.js +1 -1
- package/dist/deprecated/OldStepper/OldStep.js +1 -1
- package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
- package/dist/deprecated/OldStepper/OldStepper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Acquire.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/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/Sam.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.js +1 -1
- package/dist/molecules/Badge/Badge.js +1 -1
- package/dist/molecules/Button/Button.js +1 -1
- package/dist/molecules/Chip/Chip.js +1 -1
- package/dist/molecules/Chip/InteractiveChip.js +1 -1
- package/dist/molecules/Chip/ReadOnlyChip.js +1 -1
- package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
- package/dist/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/molecules/Dialog/Dialog.js +1 -1
- package/dist/molecules/Dialog/DialogAction.js +1 -1
- package/dist/molecules/EquinorLogo/EquinorLogo.js +1 -1
- package/dist/molecules/FeedBackIcon/FeedBackIcon.js +1 -1
- package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
- package/dist/molecules/FileProgress/CompactFileProgress.styles.d.ts +2 -2
- package/dist/molecules/FileProgress/FileProgress.js +1 -1
- package/dist/molecules/FileProgress/FileProgress.utils.js +1 -1
- package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
- package/dist/molecules/FileUploadArea/FileUploadArea.js +2 -2
- package/dist/molecules/FullPageSpinner/FullPageSpinner.js +1 -1
- package/dist/molecules/InfoElement/CopyText.js +1 -1
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/ListItem/ListItem.js +2 -2
- package/dist/molecules/ListItem/ListItem.utils.js +1 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.js +1 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -1
- package/dist/molecules/OptionalTooltip/OptionalTooltip.js +1 -1
- package/dist/molecules/ProfileAvatar/ProfileAvatar.js +1 -1
- package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
- package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +1 -1
- package/dist/molecules/RichTextEditor/RichTextEditor.styles.d.ts +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/AmplifyKit.js +1 -1
- 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 +1 -1
- package/dist/molecules/Search/Search.js +1 -1
- package/dist/molecules/Select/GroupedSelectMenu.js +1 -1
- package/dist/molecules/Select/ListSelectMenu.js +1 -1
- package/dist/molecules/Select/Select.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +5 -5
- package/dist/molecules/Select/Select.types.d.ts +3 -0
- package/dist/molecules/Select/Select.utils.js +1 -1
- package/dist/molecules/Select/SelectMenuItem.js +1 -1
- package/dist/molecules/Select/SelectMenuItem.utils.js +1 -1
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -1
- package/dist/molecules/SelectionControls/Radio/Radio.js +1 -1
- package/dist/molecules/SelectionControls/Switch/Switch.js +1 -1
- package/dist/molecules/Sieve/Filter.js +1 -1
- package/dist/molecules/Sieve/Sieve.js +1 -1
- package/dist/molecules/Sieve/Sort.js +1 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +1 -1
- package/dist/molecules/Stepper/Step/Step.js +1 -1
- package/dist/molecules/Stepper/StepLine.js +1 -1
- package/dist/molecules/Stepper/Stepper.js +1 -1
- package/dist/molecules/Stepper/SubTitle/SubStepIndicator.js +1 -1
- package/dist/molecules/Stepper/SubTitle/SubTitle.js +1 -1
- package/dist/molecules/Tabs/Tabs.js +1 -1
- package/dist/molecules/Waves/Waves.js +1 -1
- package/dist/node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js +1 -1
- package/dist/node_modules/lodash/lodash.js +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +1 -1
- package/dist/organisms/Faq/Category/Category.js +3 -3
- package/dist/organisms/Faq/Category/Question.js +2 -2
- package/dist/organisms/Faq/CategorySkeleton.js +1 -1
- package/dist/organisms/Faq/Faq.js +1 -1
- package/dist/organisms/Faq/Header.js +2 -2
- package/dist/organisms/FieldSelector/ChangingField.js +7 -7
- package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +2 -2
- package/dist/organisms/Filter/Filter.js +1 -1
- package/dist/organisms/Filter/Filter.styles.js +4 -4
- 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 +1 -1
- package/dist/organisms/ReleaseNote/ReleaseNote.js +2 -2
- package/dist/organisms/ReleaseNote/ToggleExpanded.js +1 -1
- package/dist/organisms/SideBar/CreateItem.styles.js +1 -1
- package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -1
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +2 -2
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.d.ts +295 -2
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +2 -2
- package/dist/organisms/SideBar/SideBar.js +1 -1
- package/dist/organisms/Status/Action.js +1 -1
- package/dist/organisms/Status/Description.js +1 -1
- package/dist/organisms/Status/Illustration.constants.js +1 -1
- package/dist/organisms/Status/Illustration.js +1 -1
- package/dist/organisms/Status/MissingAccesses.js +1 -1
- package/dist/organisms/Status/Title.js +1 -1
- package/dist/organisms/Status/collections/BadRequest.js +1 -1
- 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 +1 -1
- package/dist/organisms/Status/collections/ServerError.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.d.ts +294 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.js +2 -2
- package/dist/organisms/TableOfContents/TableOfContentsItem.js +1 -1
- package/dist/organisms/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.js +1 -1
- package/dist/organisms/TopBar/Account/Account.js +1 -1
- package/dist/organisms/TopBar/Account/AccountAvatar.js +1 -1
- package/dist/organisms/TopBar/Account/AccountButton.js +2 -2
- package/dist/organisms/TopBar/Account/ActiveUserImpersonationButton.js +2 -2
- package/dist/organisms/TopBar/Account/ImpersonateAvatar.js +2 -2
- package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.constants.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useCreateImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useDeleteImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useEditImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useMappedRoles.js +1 -1
- package/dist/organisms/TopBar/Actions.js +1 -1
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.js +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.d.ts +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Item.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Section.js +1 -1
- package/dist/organisms/TopBar/Notifications/FilterOptions.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsInner.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.js +5 -5
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +1 -1
- package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +1 -1
- package/dist/organisms/TopBar/Resources/Resources.js +1 -1
- package/dist/organisms/TopBar/Settings.js +1 -1
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.d.ts +295 -2
- package/dist/organisms/TopBar/TopBar.styles.js +6 -6
- package/dist/organisms/TopBar/TopBarMenu.js +1 -1
- package/dist/organisms/TopBar/TransferToAppDialog.js +1 -1
- package/dist/organisms/TopBar/Tutorials/Tutorials.js +1 -1
- package/dist/providers/AuthProvider/AuthProvider.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
- package/dist/providers/LoadingProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.utils.js +1 -1
- package/dist/providers/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.js +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/StepIndicator.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +6 -6
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.js +1 -1
- package/package.json +5 -9
- package/dist/atoms/hooks/useSearchParameter.d.ts +0 -5
- package/dist/atoms/hooks/useSearchParameter.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{jsxs as t,jsx as r,Fragment as
|
|
1
|
+
import{jsxs as t,jsx as r,Fragment as i}from"react/jsx-runtime";import{useState as e}from"react";import{Card as o,Icon as a,Typography as n,Button as s}from"@equinor/eds-core-react";import{info_circle as l}from"@equinor/eds-icons";import{useTutorials as d,useTutorialStepImage as h}from"@equinor/subsurface-app-management";import{useTutorialHighlighting as m}from"../TutorialHighlightingProvider.js";import{TUTORIAL_HIGHLIGHT_ANIMATION_PROPS as c}from"../TutorialHighlightingProvider.constants.js";import{useTutorialPopoverPosition as g}from"./hooks/useTutorialPopoverPosition.js";import{StepIndicator as p}from"./StepIndicator.js";import{elevation as u}from"../../../atoms/style/index.js";import{motion as f}from"framer-motion";import v,{css as b}from"styled-components";import{spacings as x}from"../../../atoms/style/spacings.js";import{colors as $}from"../../../atoms/style/colors.js";const y=v(f(o))`
|
|
2
2
|
width: 360px;
|
|
3
3
|
padding: ${x.medium};
|
|
4
|
-
background: ${
|
|
4
|
+
background: ${$.ui.background__tutorial_card.rgba};
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
gap: ${x.medium};
|
|
8
8
|
transition:
|
|
9
9
|
top 400ms,
|
|
10
10
|
left 400ms;
|
|
11
|
-
box-shadow: ${
|
|
11
|
+
box-shadow: ${u.raised};
|
|
12
12
|
pointer-events: auto;
|
|
13
13
|
> header {
|
|
14
14
|
display: flex;
|
|
@@ -26,7 +26,7 @@ import{jsxs as t,jsx as r,Fragment as e}from"react/jsx-runtime";import{useState
|
|
|
26
26
|
content: '';
|
|
27
27
|
width: 32px;
|
|
28
28
|
height: 32px;
|
|
29
|
-
background: ${
|
|
29
|
+
background: ${$.ui.background__tutorial_card.rgba};
|
|
30
30
|
position: absolute;
|
|
31
31
|
${function(t){switch(t){case"top":return b`
|
|
32
32
|
left: 50%;
|
|
@@ -63,7 +63,7 @@ import{jsxs as t,jsx as r,Fragment as e}from"react/jsx-runtime";import{useState
|
|
|
63
63
|
`}}(r)}
|
|
64
64
|
}
|
|
65
65
|
`}
|
|
66
|
-
`,
|
|
66
|
+
`,k=v.div`
|
|
67
67
|
display: flex;
|
|
68
68
|
justify-content: flex-end;
|
|
69
69
|
gap: ${x.small};
|
|
@@ -72,4 +72,4 @@ import{jsxs as t,jsx as r,Fragment as e}from"react/jsx-runtime";import{useState
|
|
|
72
72
|
margin-right: auto;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`,
|
|
75
|
+
`,_=({isHighlighting:o,id:u,top:f,left:v,width:b,height:x,name:_,steps:j})=>{const{customStepContent:w}=m(),{activeTutorial:P,activeStep:T,skipTutorial:C,startTutorial:S,goToNextStep:E,goToPreviousStep:H}=d(),{data:q}=h(P?.steps.at(T)?.imgUrl??void 0),[I,z]=e(void 0),{style:D,highlightingElement:N,caretPosition:A}=g({top:f,left:v,width:b,height:x,popoverSize:I}),B=t=>{z(t?{width:t.clientWidth,height:t.clientHeight}:void 0)},F=()=>{C(u)},U=()=>{S(u)};if(void 0!==T&&j[T].custom&&!w[j[T].id])throw new Error(`[TutorialHighlightingProvider]: Custom step content not found, tutorial ID: ${u}, step ID: ${j[T].id}`);return!N&&o?null:t(y,P&&void 0!==T?{ref:B,style:{...D,width:j[T].custom?"auto":void 0},$caretPosition:A,$highlightingElement:N,...c,children:[j[T].custom?w[j[T].id]:t(i,{children:[t("header",{children:[r(a,{data:l,color:$.interactive.primary__resting.rgba}),r(n,{variant:"h6",children:j[T]?.title})]}),r(n,{variant:"body_short",children:j[T]?.body}),q?r("img",{src:q,alt:j[T].title}):null]}),t(k,{children:[r(s,{variant:"outlined",disabled:0===T,onClick:H,children:"Back"}),r(s,{variant:"ghost",onClick:F,children:"Cancel"}),r(s,{onClick:E,children:T===j.length-1?"Finish":"Next"})]}),r(p,{stepAmount:j.length})]}:{ref:B,style:{...D},$highlightingElement:N,$caretPosition:A,...c,children:[t("header",{children:[r(a,{data:l,color:$.interactive.primary__resting.rgba}),r(n,{variant:"h6",children:_})]}),t(k,{children:[r(s,{variant:"ghost",onClick:F,children:"Skip"}),r(s,{onClick:U,children:"Start tour"})]})]})};export{_ as TutorialPopover};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useReversedScrollY as i}from"../../hooks/useReversedScrollY.js";import{useTransform as o}from"framer-motion";const t=16;function d({top:d,left:e,width:h,height:n,popoverSize:v}){const r=i();let w=d&&n?d+n+t:void 0,l=e&&h?e+h/2:void 0;const s=!!w&&!!l;let g="top";const p=(v?.width??0)/2+t,c=window.innerWidth-t,f=window.innerHeight-t,m=void 0!==d&&void 0!==n&&void 0!==e&&void 0!==h&&void 0!==l&&void 0!==v&&l<v.width/2,u=void 0!==d&&void 0!==n&&void 0!==e&&void 0!==h&&void 0!==l&&void 0!==v&&l+v.width>window.innerWidth;m?(l=e+h+v.width/2+t,w=d-v.height/2-4,g="left"):u&&(l=e-v.width/2-t,w=d-v.height/2-4,g="right");const b=void 0!==d&&void 0!==n&&void 0!==w&&void 0!==v&&d+n/2+v.height>=window.innerHeight,a=void 0!==d&&void 0!==n&&void 0!==w&&void 0!==v&&w<v.height;a?w=d+n+t:b&&(w=d-v.height-n-32),m&&(a||b)?l=e+v?.width/2:u&&(a||b)&&(l=e+h-v?.width/2),a&&m?g="top-left":a&&u&&(g="top-right"),b&&m?g="bottom-left":b&&u?g="bottom-right":b&&(g="bottom");const H=o(r,
|
|
1
|
+
import{useReversedScrollY as i}from"../../hooks/useReversedScrollY.js";import{useTransform as o}from"framer-motion";const t=16;function d({top:d,left:e,width:h,height:n,popoverSize:v}){const r=i();let w=d&&n?d+n+t:void 0,l=e&&h?e+h/2:void 0;const s=!!w&&!!l;let g="top";const p=(v?.width??0)/2+t,c=window.innerWidth-t,f=window.innerHeight-t,m=void 0!==d&&void 0!==n&&void 0!==e&&void 0!==h&&void 0!==l&&void 0!==v&&l<v.width/2,u=void 0!==d&&void 0!==n&&void 0!==e&&void 0!==h&&void 0!==l&&void 0!==v&&l+v.width>window.innerWidth;m?(l=e+h+v.width/2+t,w=d-v.height/2-4,g="left"):u&&(l=e-v.width/2-t,w=d-v.height/2-4,g="right");const b=void 0!==d&&void 0!==n&&void 0!==w&&void 0!==v&&d+n/2+v.height>=window.innerHeight,a=void 0!==d&&void 0!==n&&void 0!==w&&void 0!==v&&w<v.height;a?w=d+n+t:b&&(w=d-v.height-n-32),m&&(a||b)?l=e+v?.width/2:u&&(a||b)&&(l=e+h-v?.width/2),a&&m?g="top-left":a&&u&&(g="top-right"),b&&m?g="bottom-left":b&&u?g="bottom-right":b&&(g="bottom");const H=o(r,i=>{if(!s||!w)return null;const o=i+w;return o<32?32:o>f?f:o});return l&&l<p?l=p:l&&l>c&&(l=c),{style:{position:s?"absolute":void 0,top:H,left:l},highlightingElement:s,caretPosition:g}}export{t as CARET_OFFSET,d as useTutorialPopoverPosition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useScroll as t,useTransform as n}from"framer-motion";function o(){const{scrollY:o}=t({container:{current:document.getElementById("content")}});return n(o,
|
|
1
|
+
import{useScroll as t,useTransform as n}from"framer-motion";function o(){const{scrollY:o}=t({container:{current:document.getElementById("content")}});return n(o,t=>t>0?-1*t:0)}export{o as useReversedScrollY};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/amplify-component-lib",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.13.0-beta.0",
|
|
4
4
|
"description": "Frontend Typescript components for the Amplify team",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@equinor/eds-icons": "^0.22.0",
|
|
96
|
-
"@equinor/subsurface-app-management": "
|
|
96
|
+
"@equinor/subsurface-app-management": "4.4.2-beta.0",
|
|
97
97
|
"@eslint/js": "^9.22.0",
|
|
98
98
|
"@faker-js/faker": "^9.6.0",
|
|
99
99
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
@@ -124,7 +124,6 @@
|
|
|
124
124
|
"@types/random-seed": "^0.3.5",
|
|
125
125
|
"@types/react": "^19.0.10",
|
|
126
126
|
"@types/react-dom": "^19.0.4",
|
|
127
|
-
"@types/react-router-dom": "^5.3.3",
|
|
128
127
|
"@types/styled-components": "^5.1.34",
|
|
129
128
|
"@types/uuid": "^10.0.0",
|
|
130
129
|
"@types/wicg-file-system-access": "^2023.10.5",
|
|
@@ -145,8 +144,6 @@
|
|
|
145
144
|
"prettier": "^3.5.3",
|
|
146
145
|
"react": "^19.0.0",
|
|
147
146
|
"react-dom": "^19.0.0",
|
|
148
|
-
"react-router": "^6.28.0",
|
|
149
|
-
"react-router-dom": "^6.28.0",
|
|
150
147
|
"resize-observer-polyfill": "^1.5.1",
|
|
151
148
|
"resolve-tspaths": "^0.8.23",
|
|
152
149
|
"rollup": "^4.35.0",
|
|
@@ -168,12 +165,11 @@
|
|
|
168
165
|
},
|
|
169
166
|
"peerDependencies": {
|
|
170
167
|
"@equinor/eds-icons": "*",
|
|
171
|
-
"@equinor/subsurface-app-management": "
|
|
168
|
+
"@equinor/subsurface-app-management": "4.4.2-beta.0",
|
|
172
169
|
"@tanstack/react-query": "*",
|
|
170
|
+
"@tanstack/react-router": "*",
|
|
173
171
|
"react": "^19.0.0",
|
|
174
|
-
"react-dom": "^19.0.0"
|
|
175
|
-
"react-router": "^6.28.0",
|
|
176
|
-
"react-router-dom": "^6.28.0"
|
|
172
|
+
"react-dom": "^19.0.0"
|
|
177
173
|
},
|
|
178
174
|
"msw": {
|
|
179
175
|
"workerDirectory": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRef as r}from"react";import{useSearchParams as t}from"react-router-dom";function e({key:e,initialValue:n,parser:o}){const[i,c]=t(),s=r(!1),a=i.get(e)??void 0,u=o&&a?o(a):a,f=s.current||void 0!==u?u:n,l=r=>{if(s.current||(s.current=!0),r instanceof Function){const t=r(f);l(t)}else{const t=new URLSearchParams(i),n="string"==typeof r?r:JSON.stringify(r);void 0===n||""===n||"null"===n||"[]"===n||"{}"===n?t.delete(e):t.set(e,n),c(t)}};return[f,l]}export{e as useSearchParameter};
|