@equinor/amplify-component-lib 9.11.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 +10 -0
- package/dist/atoms/style/lightTokens.js +10 -0
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/date.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.d.ts +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconCollection.d.ts +1 -0
- package/dist/molecules/ApplicationIcon/ApplicationIconCollection.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Acquire.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Acquire.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Bravos.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Bravos.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Dasha.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Dasha.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Fallback.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Fallback.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/FourDInsight.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/FourDInsight.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/InPress.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/InPress.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/JsEmbark.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/JsEmbark.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/LoggingQualification.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/LoggingQualification.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Orca.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Orca.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Premo.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Premo.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Pwex.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Pwex.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Recap.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/Icons/Recap.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Sam.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.d.ts +2 -0
- package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.js +1 -0
- 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/FileProgress/RegularFileProgress.styles.js +5 -3
- 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 +6 -6
- package/dist/molecules/Select/Select.styles.js +44 -43
- package/dist/molecules/Select/Select.types.d.ts +5 -2
- 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,4 +1,4 @@
|
|
|
1
|
-
import { FC, KeyboardEvent, RefObject } from 'react';
|
|
1
|
+
import { FC, KeyboardEvent, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { Variants } from '../../atoms/types/variants';
|
|
3
3
|
export interface SelectOptionRequired {
|
|
4
4
|
value: string;
|
|
@@ -10,6 +10,9 @@ export type SelectOption<T extends SelectOptionRequired> = T & {
|
|
|
10
10
|
export interface SingleSelectCommon<T extends SelectOptionRequired> {
|
|
11
11
|
value: SelectOption<T> | undefined;
|
|
12
12
|
onSelect: (value: SelectOption<T> | undefined) => void;
|
|
13
|
+
customValueComponent?: FC<{
|
|
14
|
+
item: SelectOption<T>;
|
|
15
|
+
}>;
|
|
13
16
|
}
|
|
14
17
|
interface MultiSelectBase<T extends SelectOptionRequired> {
|
|
15
18
|
values: SelectOption<T>[];
|
|
@@ -102,7 +105,7 @@ export type CommonSelectProps<T extends SelectOptionRequired> = {
|
|
|
102
105
|
lightBackground?: boolean;
|
|
103
106
|
underlineHighlight?: boolean;
|
|
104
107
|
clearable?: boolean;
|
|
105
|
-
meta?:
|
|
108
|
+
meta?: ReactNode;
|
|
106
109
|
onSearchChange?: (inputValue: string) => void;
|
|
107
110
|
inDialog?: boolean;
|
|
108
111
|
onOpenCallback?: (value: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(n,r){return n.length+n.slice(0,r).map(
|
|
1
|
+
function e(n,r){return n.length+n.slice(0,r).map(n=>e(n.children??[],0)).reduce((e,n)=>e+n,0)}const n=e=>{const n=e=>{if(!e?.length)return[];const r=e.flatMap(({children:e,value:n})=>e?.map(e=>({...e,parent:n}))??[]);return[...r,...n(r)]};return[...e,...n(e)]},r=e=>{const n=new Array(e.length).fill(0);for(let r=1;r<e.length;r++)n[r]=n[r-1]+e[r-1];return n};export{n as flattenOptions,e as getChildOffset,r as getCumulativeArrayFromNumberedArray};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as n,useRef as l,useMemo as o}from"react";import{Icon as i}from"@equinor/eds-core-react";import{checkbox_outline as c,chevron_down as a,chevron_right as s,checkbox as u}from"@equinor/eds-icons";import{tokens as d}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{getChildOffset as m}from"./Select.utils.js";import{getParentIcon as p,getParentState as h}from"./SelectMenuItem.utils.js";import{spacings as v}from"../../atoms/style/spacings.js";import{MenuItemSpacer as f,MenuItemWrapper as y,SmallButton as g,StyledMenuItem as w}from"./Select.styles.js";const{colors:k}=d,C=d=>{const{index:I,childOffset:b,depth:x=0,item:D,itemRefs:$,onItemKeyDown:A,onItemSelect:S,parentHasNestedItems:_=!1,CustomMenuItemComponent:j}=d,[K,M]=n(!1),O=l(-1),q=l([]),L=("values"in d?d.values.map((
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as n,useRef as l,useMemo as o}from"react";import{Icon as i}from"@equinor/eds-core-react";import{checkbox_outline as c,chevron_down as a,chevron_right as s,checkbox as u}from"@equinor/eds-icons";import{tokens as d}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{getChildOffset as m}from"./Select.utils.js";import{getParentIcon as p,getParentState as h}from"./SelectMenuItem.utils.js";import{spacings as v}from"../../atoms/style/spacings.js";import{MenuItemSpacer as f,MenuItemWrapper as y,SmallButton as g,StyledMenuItem as w}from"./Select.styles.js";const{colors:k}=d,C=d=>{const{index:I,childOffset:b,depth:x=0,item:D,itemRefs:$,onItemKeyDown:A,onItemSelect:S,parentHasNestedItems:_=!1,CustomMenuItemComponent:j}=d,[K,M]=n(!1),O=l(-1),q=l([]),L=("values"in d?d.values.map(({value:e})=>e):[]).includes(D.value),R=o(()=>"value"in d?c:p(D,d.values),[D,d]),H=o(()=>"value"in d?"none":h(D,d.values),[D,d]),N=o(()=>new Array(x).fill(0).map((r,t)=>e(f,{},`spacer-${r+t}`)),[x]),U=e=>{e.preventDefault(),S(D)},P=e=>{e.stopPropagation(),M(e=>!e)},z=e=>{"ArrowDown"===e.key?O.current+=1:"ArrowUp"===e.key&&(O.current-=1),O.current<=-1?($.current[I]?.focus(),O.current=-1):O.current+b===q.current.length?(O.current=-1,A(e),M(!1)):O.current>=0&&O.current<q.current.length-b&&q.current[O.current+b]?.focus()},B=e=>{!K&&"ArrowDown"===e.key||"ArrowUp"===e.key?A(e):"ArrowRight"===e.key||"ArrowLeft"===e.key?M(e=>!e):K&&"ArrowDown"===e.key&&-1===O.current&&(O.current=0,q.current[O.current+b]?.focus())};return D.children&&D.children.length>0&&"values"in d?r(t,{children:[r(y,{style:{paddingLeft:0===x?v.small:0},children:[N,e(g,{variant:"ghost_icon",onClick:P,"data-testid":"toggle-button",children:e(i,{color:k.interactive.primary__resting.rgba,data:K?a:s})}),e(w,{$depth:x,ref:e=>{$.current[I]=e},index:I,closeMenuOnClick:!1,onKeyDownCapture:B,onClick:U,children:j?e(j,{item:D,selectedState:H}):r(t,{children:[e(i,{color:k.interactive.primary__resting.rgba,data:R}),e("span",{children:D.label})]})})]}),K&&D.children.map((r,t)=>e(C,{index:b+t,childOffset:b+m(D.children,t),depth:x+1,item:r,itemRefs:q,values:d.values,onItemKeyDown:z,onItemSelect:S,parentHasNestedItems:!0,CustomMenuItemComponent:j},`child-${t}-${r.value}-${D.value}`))]}):"values"in d?r(y,{children:[N,e(w,{$depth:x,$paddedLeft:_,ref:e=>{$.current[I]=e},index:I,tabIndex:x,closeMenuOnClick:!1,onKeyDownCapture:A,onClick:U,children:j?e(j,{item:D,selectedState:L?"selected":"none"}):r(t,{children:[e(i,{color:k.interactive.primary__resting.rgba,data:L?u:c}),e("span",{children:D.label})]})})]}):e(y,{children:e(w,{$depth:x,$selected:d.value&&D.value===d.value.value,ref:e=>{$.current[I]=e},index:I,onKeyDownCapture:A,onClick:U,children:j?e(j,{item:D,selectedState:d.value&&D.value===d.value.value?"selected":"none"}):e("span",{children:D.label})})})};export{C as SelectMenuItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkbox_outline as e,checkbox_indeterminate as n,checkbox as t}from"@equinor/eds-icons";import{flattenOptions as o}from"./Select.utils.js";const r={selected:t,indeterminate:n,none:e};function i(e,n){const t=c(e,n);return r[t]}function c(e,n){if(!e.children||0===e.children.length)return"none";const t=n.some(
|
|
1
|
+
import{checkbox_outline as e,checkbox_indeterminate as n,checkbox as t}from"@equinor/eds-icons";import{flattenOptions as o}from"./Select.utils.js";const r={selected:t,indeterminate:n,none:e};function i(e,n){const t=c(e,n);return r[t]}function c(e,n){if(!e.children||0===e.children.length)return"none";const t=n.some(n=>n.value===e.value),r=n.map(({value:e})=>e),i=o([e])?.map(({value:e})=>e);return t?"selected":i.some(e=>r.includes(e))?"indeterminate":"none"}export{i as getParentIcon,c as getParentState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Checkbox as e}from"@equinor/eds-core-react";import{Wrapper as t}from"../SelectionControls.styles.js";const i=o((
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Checkbox as e}from"@equinor/eds-core-react";import{Wrapper as t}from"../SelectionControls.styles.js";const i=o((o,i)=>{const{outlined:c,error:m,...n}=o;return r(t,{$outlined:c||!1,$error:m,children:r(e,{ref:i,...n})})});i.displayName="Checkbox";export{i as Checkbox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Radio as o}from"@equinor/eds-core-react";import{Wrapper as t}from"../SelectionControls.styles.js";const i=e((
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Radio as o}from"@equinor/eds-core-react";import{Wrapper as t}from"../SelectionControls.styles.js";const i=e((e,i)=>{const{outlined:c,error:d,...m}=e;return r(t,{$outlined:c||!1,$error:d,children:r(o,{ref:i,...m,checked:!!m.checked||void 0})})});i.displayName="Radio";export{i as Radio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import{Switch as e}from"@equinor/eds-core-react";import{Wrapper as o}from"../SelectionControls.styles.js";const i=t((
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import{Switch as e}from"@equinor/eds-core-react";import{Wrapper as o}from"../SelectionControls.styles.js";const i=t((t,i)=>{const{outlined:s,...c}=t;return r(o,{$outlined:s||!1,className:"switch",children:r(e,{ref:i,...c})})});i.displayName="Switch";export{i as Switch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as l}from"react/jsx-runtime";import{useRef as r,useState as n}from"react";import{Icon as i,Menu as o}from"@equinor/eds-core-react";import{filter_list as a,arrow_drop_right as c,checkbox as s,checkbox_outline as u}from"@equinor/eds-icons";import{tokens as m}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{Chip as d,MenuItem as p}from"./Sieve.styles.js";import{useOutsideClick as f}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";const{colors:h}=m,b=({options:m,filterValues:b,setFilterValues:g})=>{const v=r(null),[k,_]=n(null),y=r(null),j=r(null),[x,q]=n(-1),[C,F]=n(!1);f(v.current,
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as l}from"react/jsx-runtime";import{useRef as r,useState as n}from"react";import{Icon as i,Menu as o}from"@equinor/eds-core-react";import{filter_list as a,arrow_drop_right as c,checkbox as s,checkbox_outline as u}from"@equinor/eds-icons";import{tokens as m}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{Chip as d,MenuItem as p}from"./Sieve.styles.js";import{useOutsideClick as f}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";const{colors:h}=m,b=({options:m,filterValues:b,setFilterValues:g})=>{const v=r(null),[k,_]=n(null),y=r(null),j=r(null),[x,q]=n(-1),[C,F]=n(!1);f(v.current,e=>{null===k&&C&&y.current&&!y.current.contains(e.target)?F(!1):C&&null!==k&&y.current&&!y.current.contains(e.target)&&j.current&&!j.current.contains(e.target)&&(F(!1),q(-1),_(null))});return 0===m.length?null:e(t,{children:[e(d,{ref:v,onClick:()=>{F(!C),q(-1),_(null)},children:["Filter by ",l(i,{data:a})]}),C&&l(o,{open:!0,ref:y,anchorEl:v.current,placement:"bottom-start",children:l(o.Section,{title:"Filter by",children:m.map((t,r)=>e(p,{active:x===r,onClick:e=>((e,t)=>{x===t?(q(-1),_(null)):(q(t),_(e.currentTarget))})(e,r),children:[t.label,l(i,{data:c,color:h.text.static_icons__tertiary.rgba})]},`filter-menu-item-${t.label}`))})}),-1!==x&&l(o,{open:!0,anchorEl:k,ref:j,placement:"right-start",children:l(o.Section,{title:m[x].label,children:m[x]?.options.map(t=>e(p,{onClick:()=>((e,t)=>{let l={...b};if(e in l&&l[e].some(e=>e.value===t.value)){const r=l[e].findIndex(e=>e.value===t.value);l[e].splice(r,1),0===l[e].length&&delete l[e]}else l[e]?l[e].push(t):l[e]=[t];0===Object.keys(l).flatMap(e=>l?.[e]).length&&(l=void 0),g(l)})(m[x].label,t),children:[t.label,l(i,{data:b?.[m[x].label]?.some(e=>e.value===t.value)?s:u,color:h.interactive.primary__resting.rgba})]},`filter-option-${t.label}`))})})]})};export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as l,useEffect as a,useCallback as s}from"react";import{
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as l,useEffect as a,useCallback as s}from"react";import{useSearch as o}from"@tanstack/react-router";import i from"./Filter.js";import{Wrapper as n,Container as c,Search as u,FilterChip as f}from"./Sieve.styles.js";import h from"./Sort.js";import{l as d}from"../../_virtual/lodash.js";const p=({searchPlaceholder:p,sortOptions:V,filterOptions:m,sieveValue:v,onUpdate:g,showChips:O=!0,minSearchWidth:b="24rem",syncWithSearchParams:y=!1,isLoadingOptions:S=!1,debounceSearchValue:j=!1,onIsTyping:C})=>{const[N,k]=r(v.searchValue??""),w=l(!1),[J,L]=o({strict:!1}),x=l(!1);a(()=>{if(!x.current&&y&&!S){const e=J.get("search")??void 0,t=m?.map(e=>e.label)??[],r={};for(const e of t){const t=m?.find(t=>t.label===e)?.options,l=JSON.parse(J.get(e.toLowerCase())??"[]");void 0!==t&&(r[e]=t.filter(e=>l.includes(e.label)))}g({searchValue:e,filterValues:r,sortValue:v.sortValue}),x.current=!0}},[m,x,S,g,J,v.sortValue,y]);const W=l("{}");a(()=>{if(y&&x.current&&!S&&JSON.stringify(v)!==W.current){void 0===v.searchValue?J.delete("search"):J.set("search",v.searchValue);const e=m?.map(e=>e.label)??[],t=v.filterValues;for(const r of e)t?.[r]&&t[r].length>0?J.set(r.toLowerCase(),JSON.stringify(t[r].map(e=>e.label))):J.delete(r.toLowerCase());W.current=JSON.stringify(v),L(J),g(v)}},[m,x,S,g,J,L,v,y]);const D=s((e,t)=>{const r={...v,[e]:t};g(r)},[g,v]),F=s(d.debounce((e,t)=>{D(e,t),C?.(!1),w.current=!1},800),[D,C]);return e(n,{className:"sieve-container",children:[e(c,{children:[t(u,{style:{minWidth:b},placeholder:p,value:j?N:v.searchValue??"",onChange:e=>{j?(k(e.target.value),""===e.target.value?(F.cancel(),D("searchValue",void 0),C?.(!1),w.current=!1):(F("searchValue",e.target.value),w.current||(C?.(!0),w.current=!0))):D("searchValue",""!==e.target.value?e.target.value:void 0)}}),void 0!==V&&t(h,{options:V,selectedOption:v.sortValue,setSelectedOption:e=>D("sortValue",e)}),void 0!==m&&t(i,{options:m,filterValues:v.filterValues,setFilterValues:e=>D("filterValues",e)})]}),O&&e(c,{children:[Object.keys(v.filterValues??{}).map(e=>v.filterValues?.[e].map(r=>t(f,{onDelete:()=>((e,t)=>{let r={...v.filterValues};const l=r[e].findIndex(e=>e.value===t.value);r[e].splice(l,1),0===r[e].length&&delete r[e],0===Object.keys(r).flatMap(e=>r?.[e]).length&&(r=void 0),D("filterValues",r)})(e,r),children:r?.label},`filter-chip-${r?.value}`))),v.filterValues&&Object.keys(v.filterValues).flatMap(e=>v.filterValues?.[e]).length>1&&t(f,{onDelete:()=>{D("filterValues",void 0)},children:"Remove all"})]})]})};export{p as Sieve};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useRef as o,useState as i}from"react";import{Icon as l,Menu as n}from"@equinor/eds-core-react";import{sort as c,radio_button_selected as a,radio_button_unselected as s}from"@equinor/eds-icons";import{colors as m}from"../../atoms/style/colors.js";import{Chip as p,MenuItem as d}from"./Sieve.styles.js";const u=({options:u,selectedOption:f,setSelectedOption:h})=>{const b=o(null),[v,y]=i(!1);return 0===u.length?null:e(t,{children:[e(p,{ref:b,onClick:()=>{y(!v)},children:["Sort by ",r(l,{data:c})]}),v&&r(n,{open:!0,anchorEl:b.current,onClose:()=>{y(!1)},placement:"bottom-start",children:r(n.Section,{title:"Sort by",children:u.map(
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useRef as o,useState as i}from"react";import{Icon as l,Menu as n}from"@equinor/eds-core-react";import{sort as c,radio_button_selected as a,radio_button_unselected as s}from"@equinor/eds-icons";import{colors as m}from"../../atoms/style/colors.js";import{Chip as p,MenuItem as d}from"./Sieve.styles.js";const u=({options:u,selectedOption:f,setSelectedOption:h})=>{const b=o(null),[v,y]=i(!1);return 0===u.length?null:e(t,{children:[e(p,{ref:b,onClick:()=>{y(!v)},children:["Sort by ",r(l,{data:c})]}),v&&r(n,{open:!0,anchorEl:b.current,onClose:()=>{y(!1)},placement:"bottom-start",children:r(n.Section,{title:"Sort by",children:u.map(t=>e(d,{onClick:()=>(e=>{h(e)})(t),children:[t.label,r(l,{data:f?.value===t.value?a:s,color:m.interactive.primary__resting.rgba})]},`sort-item-${t.value}`))})})]})};export{u as default};
|
|
@@ -17,4 +17,4 @@ import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useState as n}from"reac
|
|
|
17
17
|
outline: none;
|
|
18
18
|
background: ${u.ui.background__light.rgba};
|
|
19
19
|
}
|
|
20
|
-
`,C=({onChange:t,customIcon:i,menuTitle:a,data:s,showChip:c=!1,chipColor:m=u.ui.background__default.rgba})=>{const[C,k]=n(!1),[y,_]=n(null),[x,$]=n(),j=()=>k(!1);return o(p,{children:[c&&x&&e(g,{"data-testid":"chip",onDelete:()=>{j(),t(void 0),$(void 0)},variant:"default",$backgroundColor:m,children:x}),e(f,{"data-testid":"menuButton",variant:"ghost_icon",onClick:o=>(o=>{const e=o.target;_(e),k(!C)})(o),children:e(r,{data:i??l})}),o(h,{open:C,anchorEl:y,onClose:j,placement:"bottom-end","data-testid":"menuContainer",children:[e(v,{children:e(d,{group:"navigation",variant:"label",children:a})}),s.map((
|
|
20
|
+
`,C=({onChange:t,customIcon:i,menuTitle:a,data:s,showChip:c=!1,chipColor:m=u.ui.background__default.rgba})=>{const[C,k]=n(!1),[y,_]=n(null),[x,$]=n(),j=()=>k(!1);return o(p,{children:[c&&x&&e(g,{"data-testid":"chip",onDelete:()=>{j(),t(void 0),$(void 0)},variant:"default",$backgroundColor:m,children:x}),e(f,{"data-testid":"menuButton",variant:"ghost_icon",onClick:o=>(o=>{const e=o.target;_(e),k(!C)})(o),children:e(r,{data:i??l})}),o(h,{open:C,anchorEl:y,onClose:j,placement:"bottom-end","data-testid":"menuContainer",children:[e(v,{children:e(d,{group:"navigation",variant:"label",children:a})}),s.map((o,n)=>e(b,{onClick:()=>{return e=o,k(!1),void(x===e?($(void 0),t(void 0)):($(e),t(e)));var e},disabled:x===o&&c,active:x===o&&!c,children:e(d,{group:"navigation",variant:"menu_title",as:"span",children:o})},o+n))]})]})};C.displayName="SingleFilterMenu";export{C as SingleFilterMenu};
|
|
@@ -12,4 +12,4 @@ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useMemo as t}from"react
|
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
}
|
|
14
14
|
`}
|
|
15
|
-
`,p=({index:s,onlyShowCurrentStepLabel:d=!1,children:n})=>{const{currentStep:p,setCurrentStep:m,isStepAtIndexDisabled:b}=l(),f=b(s),u=t((
|
|
15
|
+
`,p=({index:s,onlyShowCurrentStepLabel:d=!1,children:n})=>{const{currentStep:p,setCurrentStep:m,isStepAtIndexDisabled:b}=l(),f=b(s),u=t(()=>s<p?"body_short":"body_short_bold",[p,s]),h=t(()=>s>p||f?i.interactive.disabled__text.rgba:i.text.static_icons__default.rgba,[p,s,f]);return e(c,{"data-testid":"step",$clickable:s<p,onClick:()=>{s<p&&!f&&m(s)},$disabled:f,"aria-disabled":f,role:"button",children:[r(a,{index:s,disabled:f}),(!d||p===s)&&r(o,{variant:u,color:h,children:n})]})};export{p as Step,p as default};
|
|
@@ -4,4 +4,4 @@ import{jsx as r}from"react/jsx-runtime";import{useMemo as e}from"react";import{t
|
|
|
4
4
|
background: ${r=>r.$background};
|
|
5
5
|
border: none;
|
|
6
6
|
margin: 0;
|
|
7
|
-
`,s=({done:o})=>{const t=e((
|
|
7
|
+
`,s=({done:o})=>{const t=e(()=>o?n.interactive.primary__resting.rgba:n.interactive.disabled__text.rgba,[o]);return r(i,{$background:t})};export{s as StepLine};
|
|
@@ -11,4 +11,4 @@ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useMemo as r}from"react
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
width: 100%;
|
|
13
13
|
${({$maxWidth:t})=>t&&`max-width: ${t}`}
|
|
14
|
-
`,d=({onlyShowCurrentStepLabel:p=!1,maxWidth:n})=>{const{steps:d,currentStep:c}=m(),u=r((
|
|
14
|
+
`,d=({onlyShowCurrentStepLabel:p=!1,maxWidth:n})=>{const{steps:d,currentStep:c}=m(),u=r(()=>{const e=[];return d.forEach((r,s)=>{e.push(t(o,{index:s,onlyShowCurrentStepLabel:p,children:r.label},`step-${s}`)),s!==d.length-1&&e.push(t(i,{done:c>s},`step-line-${s}`))}),e},[c,p,d]);return e(l,{children:[t(a,{$stepAmount:d.length,$maxWidth:n,"data-testid":"stepper-container",children:u}),t(s,{})]})};export{d as Stepper};
|
|
@@ -22,4 +22,4 @@ import{jsx as t}from"react/jsx-runtime";import{shape as r}from"../../../atoms/st
|
|
|
22
22
|
transition: left ${s.transitionMS};
|
|
23
23
|
left: ${({$index:t,$currentIndex:r})=>100*(r-t)}%;
|
|
24
24
|
}
|
|
25
|
-
`,m=()=>{const{currentSubStep:r,steps:o,currentStep:i}=e(),n=o[i].subSteps.length;return t(a,{$amountOfSubSteps:n,children:new Array(n).fill(null).map((
|
|
25
|
+
`,m=()=>{const{currentSubStep:r,steps:o,currentStep:i}=e(),n=o[i].subSteps.length;return t(a,{$amountOfSubSteps:n,children:new Array(n).fill(null).map((e,o)=>t(p,{$index:o,$currentIndex:r},o))})};export{m as SubStepIndicator};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{colors as i}from"../../../atoms/style/colors.js";import{spacings as r}from"../../../atoms/style/spacings.js";import"../../AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../ApplicationIcon/ApplicationIcon.js";import"../../Badge/Badge.styles.js";import{Typography as o}from"@equinor/eds-core-react";import"../../Banner/Banner.styles.js";import"@equinor/eds-icons";import"../../Button/Button.js";import"../../Chip/Chip.js";import"react";import"../../ContentMenu/ContentMenu.styles.js";import"../../DatePicker/DatePicker.js";import"../../Dialog/Dialog.js";import"../../EquinorLogo/EquinorLogo.js";import"../../FileProgress/CompactFileProgress.styles.js";import"../../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"../../RichTextEditor/RichTextEditor.types.js";import"../../FileProgress/RegularFileProgress.styles.js";import"../../FileUploadArea/FileUploadArea.js";import"../../FullPageSpinner/FullPageSpinner.js";import"../../InfoElement/InfoElement.js";import"../../OptionalTooltip/OptionalTooltip.js";import"../../ProfileAvatar/ProfileAvatar.js";import"@tiptap/react";import"../../RichTextEditor/custom-extensions/AmplifyKit.js";import"../../RichTextEditor/RichTextEditor.styles.js";import"../../RichTextEditor/MenuBar/MenuBar.js";import"@tanstack/react-query";import"../../Tabs/Tabs.js";import"../../RichTextEditor/MenuBar/MenuBar.styles.js";import"../../RichTextEditor/MenuBar/MenuButton.js";import"../../Search/Search.js";import"react-router
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{colors as i}from"../../../atoms/style/colors.js";import{spacings as r}from"../../../atoms/style/spacings.js";import"../../AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../../ApplicationIcon/ApplicationIcon.js";import"../../Badge/Badge.styles.js";import{Typography as o}from"@equinor/eds-core-react";import"../../Banner/Banner.styles.js";import"@equinor/eds-icons";import"../../Button/Button.js";import"../../Chip/Chip.js";import"react";import"../../ContentMenu/ContentMenu.styles.js";import"../../DatePicker/DatePicker.js";import"../../Dialog/Dialog.js";import"../../EquinorLogo/EquinorLogo.js";import"../../FileProgress/CompactFileProgress.styles.js";import"../../../atoms/utils/auth_environment.js";import"html2canvas";import"proj4";import"../../RichTextEditor/RichTextEditor.types.js";import"../../FileProgress/RegularFileProgress.styles.js";import"../../FileUploadArea/FileUploadArea.js";import"../../FullPageSpinner/FullPageSpinner.js";import"../../InfoElement/InfoElement.js";import"../../OptionalTooltip/OptionalTooltip.js";import"../../ProfileAvatar/ProfileAvatar.js";import"@tiptap/react";import"../../RichTextEditor/custom-extensions/AmplifyKit.js";import"../../RichTextEditor/RichTextEditor.styles.js";import"../../RichTextEditor/MenuBar/MenuBar.js";import"@tanstack/react-query";import"../../Tabs/Tabs.js";import"../../RichTextEditor/MenuBar/MenuBar.styles.js";import"../../RichTextEditor/MenuBar/MenuButton.js";import"../../Search/Search.js";import"@tanstack/react-router";import"../../Sieve/Sieve.styles.js";import"../../../_virtual/lodash.js";import"../../SingleFilterMenu/SingleFilterMenu.js";import"../../Skeleton/SkeletonBase/SkeletonBase.js";import"../../Skeleton/Skeleton.styles.js";import"../Stepper.js";import"../../OptionDrawer/OptionDrawer.js";import"../../Select/Select.styles.js";import"../../ListItem/ListItem.js";import"../../SelectionControls/Checkbox/Checkbox.js";import"../../SelectionControls/Radio/Radio.js";import"../../SelectionControls/Switch/Switch.js";import"../../Waves/Waves.styles.js";import"framer-motion";import{SubStepIndicator as s}from"./SubStepIndicator.js";import{useStepper as n}from"../../../providers/StepperProvider.js";import p from"styled-components";const a=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: ${r.small};
|
|
@@ -15,4 +15,4 @@ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useRef as
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
order: 1;
|
|
18
|
-
`;function p({options:m,selected:h,centered:p=!0,animated:b=!0,scrollable:g=!0,amountPerScrollPage:v,onChange:x,onHover:w,ref:y,...C}){const S=o(null),[T,j]=l(!1),[P,W]=l(0),[k,z]=l(!0),[A,L]=l(!0);if(void 0!==v&&v<=0)throw new Error("[ACL - Tabs]: Amount per scroll page must be greater than 0");if(void 0!==v&&!g)throw new Error("[ACL - Tabs]: amountPerScrollPage was set but scrollable is false!");const M=m.findIndex(
|
|
18
|
+
`;function p({options:m,selected:h,centered:p=!0,animated:b=!0,scrollable:g=!0,amountPerScrollPage:v,onChange:x,onHover:w,ref:y,...C}){const S=o(null),[T,j]=l(!1),[P,W]=l(0),[k,z]=l(!0),[A,L]=l(!0);if(void 0!==v&&v<=0)throw new Error("[ACL - Tabs]: Amount per scroll page must be greater than 0");if(void 0!==v&&!g)throw new Error("[ACL - Tabs]: amountPerScrollPage was set but scrollable is false!");const M=m.findIndex(e=>e.value===h);n(()=>{if(!g||!S.current)return void(T&&j(!1));const e=new ResizeObserver(([e])=>{const r=e.target;W(Math.round(e.borderBoxSize[0].inlineSize)),j(r.scrollWidth>r.clientWidth),r.scrollTo(0,0)});return e.observe(S.current,{box:"border-box"}),z(!0),L(!1),()=>{e.disconnect()}},[g,T]);const $=e=>()=>{if(!S.current||!P)return;let r=S.current.scrollLeft;"left"===e?(r-=P,r=Math.max(0,r)):(r+=P,r=Math.min(r,S.current.scrollWidth)),S.current.scrollTo({top:0,left:r,behavior:"smooth"}),z(r<=0),L(r+P>=S.current.scrollWidth)};return e(f,{...C,ref:y,children:[r(u,{ref:S,style:v&&T?{display:"grid",gridTemplateColumns:`repeat(${m.length}, ${P/v}px)`}:void 0,children:m.map((e,t)=>r(d,{selectedIndex:M,index:t,onChange:x,onHover:w,centered:p,animated:b,...e},e.label))}),T?e(t,{children:[r(i,{"aria-label":"Scroll tabs left",variant:"ghost_icon",disabled:k,onClick:$("left"),children:r(a,{data:s})}),r(i,{"aria-label":"Scroll tabs right",variant:"ghost_icon",disabled:A,onClick:$("right"),children:r(a,{data:c})})]}):null]})}export{p as Tabs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useRef as e,useState as r,useEffect as n}from"react";import{Container as i}from"./Waves.styles.js";import{WaveStatic as o}from"./WaveStatic.js";import{useScroll as c}from"framer-motion";const s=({gradientColors:s})=>{const l=e(null),[m,u]=r(l.current?.clientWidth??0),[d,a]=r(l.current?.clientHeight??0),{scrollY:h}=c({container:{current:document.getElementById("content")}});return n((
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useRef as e,useState as r,useEffect as n}from"react";import{Container as i}from"./Waves.styles.js";import{WaveStatic as o}from"./WaveStatic.js";import{useScroll as c}from"framer-motion";const s=({gradientColors:s})=>{const l=e(null),[m,u]=r(l.current?.clientWidth??0),[d,a]=r(l.current?.clientHeight??0),{scrollY:h}=c({container:{current:document.getElementById("content")}});return n(()=>{const t=()=>{l.current&&(u(l.current.clientWidth),a(l.current.clientHeight))};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t(i,{ref:t=>{l.current=t,l.current&&(u(l.current.clientWidth),a(l.current.clientHeight))},style:{top:h},children:t(o,{height:d,width:m,gradientColors:s})})};export{s as Waves};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as t}from"react";const e=(e,n)=>{t((
|
|
1
|
+
import{useEffect as t}from"react";const e=(e,n)=>{t(()=>{const t=t=>{e&&!e.contains(t.target)&&n(t)};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[e,n])};export{e as useOutsideClick};
|