@equinor/amplify-component-lib 9.17.0 → 10.0.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/useFaqsInApplication.js +1 -1
- package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
- package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
- package/dist/atoms/hooks/useRichTextImage.js +1 -1
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/hooks/useSelect.js +1 -1
- package/dist/atoms/index.d.ts +0 -1
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/types/Guidelines.d.ts +1 -1
- 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/size.js +1 -1
- package/dist/atoms/utils/url.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.js +1 -1
- package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
- package/dist/index.d.ts +5 -9
- package/dist/index.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
- package/dist/molecules/Badge/Badge.styles.js +1 -1
- package/dist/molecules/Button/Button.js +1 -1
- package/dist/molecules/Chip/Chip.styles.js +1 -1
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/Dialog/Dialog.d.ts +2 -2
- package/dist/molecules/FileProgress/CompactFileProgress.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 +1 -1
- package/dist/molecules/IconCell/IconCell.styles.js +1 -1
- package/dist/molecules/IconCell/IconCell.types.d.ts +6 -5
- package/dist/molecules/IconCell/IconCell.types.js +1 -1
- package/dist/molecules/IconCell/IconCell.utils.js +2 -2
- package/dist/molecules/InfoElement/CopyText.js +1 -1
- package/dist/molecules/ListItem/ListItem.d.ts +2 -2
- package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +2 -2
- package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -1
- package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
- package/dist/molecules/ProfileAvatar/ProfileAvatar.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/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/TextColor.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/Search/Search.d.ts +2 -2
- package/dist/molecules/Select/AddTagItem.js +1 -1
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/Select.styles.d.ts +4 -4
- package/dist/molecules/Select/Select.styles.js +0 -1
- package/dist/molecules/Select/SelectMenuItem.js +1 -1
- package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/Stepper/Step/Step.js +9 -9
- package/dist/molecules/Stepper/Stepper.js +6 -4
- package/dist/molecules/TextField/TextField.d.ts +12 -0
- package/dist/molecules/TextField/TextField.js +3 -3
- package/dist/molecules/Waves/Waves.js +1 -1
- package/dist/molecules/index.d.ts +4 -8
- package/dist/molecules/index.js +1 -1
- package/dist/organisms/Faq/Category/Category.js +2 -2
- package/dist/organisms/Faq/Category/Question.js +1 -1
- package/dist/organisms/Faq/Faq.js +1 -1
- package/dist/organisms/Faq/Header.js +2 -2
- package/dist/organisms/FieldSelector/FieldSelector.js +1 -1
- package/dist/organisms/Filter/ButtonWithMenu.js +1 -1
- package/dist/organisms/Filter/Filter.d.ts +2 -2
- package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
- package/dist/organisms/Filter/SortMenu.d.ts +2 -2
- package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
- package/dist/organisms/ReleaseNote/ReleaseNote.js +1 -1
- package/dist/organisms/ReleaseNote/ReleaseNote.utils.js +1 -1
- package/dist/organisms/ReleaseNotesPage/ReleaseNoteFilter.js +12 -0
- package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.d.ts +6 -0
- package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.js +1 -0
- package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.styles.js +35 -0
- package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.utils.js +1 -0
- package/dist/organisms/ReleaseNotesPage/ReleasePosts/ReleasePost/ReleasePost.js +1 -0
- package/dist/organisms/ReleaseNotesPage/ReleasePosts/ReleasePost/ReleasePostSkeleton.js +37 -0
- package/dist/organisms/ReleaseNotesPage/ReleasePosts/ReleasePosts.js +17 -0
- package/dist/organisms/ReleaseNotesPage/hooks/useFilteredReleaseNotes.js +1 -0
- package/dist/organisms/ReleaseNotesPage/hooks/useReleaseNotesFilters.js +1 -0
- package/dist/organisms/SideBar/CreateItem.styles.js +8 -6
- package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -1
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +1 -1
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +1 -2
- package/dist/organisms/SideBar/MenuItem/MenuItem.utils.js +1 -1
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Description.d.ts +2 -2
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- 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.styles.js +1 -1
- package/dist/organisms/Template/Template.d.ts +3 -3
- package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
- package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Actions.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/ImpersonateMenu.js +1 -1
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +2 -2
- package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.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/Url.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.styles.js +2 -5
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
- package/dist/organisms/TopBar/Settings.js +1 -1
- package/dist/organisms/TopBar/TopBar.d.ts +1 -0
- package/dist/organisms/TopBar/TopBar.styles.js +1 -1
- package/dist/organisms/TopBar/Tutorials/TutorialItem.js +1 -1
- package/dist/organisms/index.d.ts +1 -0
- package/dist/organisms/index.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
- package/dist/providers/ReleaseNotesProvider.d.ts +0 -1
- package/dist/providers/ReleaseNotesProvider.js +1 -1
- package/dist/providers/SideBarProvider.js +1 -1
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.js +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
- package/package.json +8 -10
- package/dist/atoms/hooks/useSearchParameter.d.ts +0 -12
- package/dist/atoms/hooks/useSearchParameter.js +0 -1
- package/dist/molecules/ContentMenu/ContentMenu.d.ts +0 -17
- package/dist/molecules/ContentMenu/ContentMenu.js +0 -1
- package/dist/molecules/ContentMenu/ContentMenu.styles.js +0 -52
- package/dist/molecules/Sieve/Filter.d.ts +0 -10
- package/dist/molecules/Sieve/Filter.js +0 -1
- package/dist/molecules/Sieve/Sieve.d.ts +0 -7
- package/dist/molecules/Sieve/Sieve.js +0 -1
- package/dist/molecules/Sieve/Sieve.styles.js +0 -43
- package/dist/molecules/Sieve/Sieve.types.d.ts +0 -28
- package/dist/molecules/Sieve/Sort.js +0 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.d.ts +0 -15
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +0 -20
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +0 -1
|
@@ -38,4 +38,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
38
38
|
grid-template-columns: auto 2.75rem;
|
|
39
39
|
grid-gap: ${t.xx_small};
|
|
40
40
|
align-items: center;
|
|
41
|
-
|
|
41
|
+
`;var g=({children:e,textToCopy:t})=>{let n=i(!1),[c,l]=a(!1),[m,g]=a(`Copy`);return r(()=>(n.current=!0,()=>{n.current=!1}),[]),d(p,{onClick:()=>{navigator.clipboard.writeText(t),g(`Copied!`),setTimeout(()=>{n.current&&g(`Copy`)},3e3)},onMouseOver:()=>l(!0),onMouseOut:()=>l(!1),children:[e,c&&d(h,{children:[u(o,{data:f,size:16}),u(s,{variant:`overline`,children:m})]})]})};export{g as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react90 from "react";
|
|
2
2
|
import { FocusEventHandler, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
3
3
|
import { IconData } from "@equinor/eds-icons";
|
|
4
4
|
|
|
@@ -15,6 +15,6 @@ interface ListItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
15
15
|
isChild?: boolean;
|
|
16
16
|
borderBottom?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const ListItem:
|
|
18
|
+
declare const ListItem: react90.ForwardRefExoticComponent<ListItemProps & react90.RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { ListItem, ListItemProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, MouseEvent } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/OptionDrawer/OptionDrawer.d.ts
|
|
5
5
|
interface ToggleEventProps<T> {
|
|
@@ -43,7 +43,7 @@ declare const OptionDrawer: {
|
|
|
43
43
|
openAll,
|
|
44
44
|
showIntermediateParent,
|
|
45
45
|
parentHasNestedItems
|
|
46
|
-
}: OptionDrawerProps<T>):
|
|
46
|
+
}: OptionDrawerProps<T>): react_jsx_runtime0.JSX.Element;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
49
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=t=>{if(t.length===0)return[];let n=[];return t.forEach(t=>{let r=e(t?.children??[]);n=[t,...n,...r]}),n},t=(t,n,r,i)=>{
|
|
1
|
+
const e=t=>{if(t.length===0)return[];let n=[];return t.forEach(t=>{let r=e(t?.children??[]);n=[t,...n,...r]}),n},t=(t,n,r,i)=>{if(n.find(e=>e.id===t.id)!==void 0)return`CHECKED`;if(t.children===void 0||t.children.length===0||r&&!i)return`NONE`;let a=e(t?.children).map(e=>n.find(t=>t.id===e.id)!==void 0);return!r&&a.every(Boolean)?`CHECKED`:a.every(e=>!e)?`NONE`:`INTERMEDIATE`};export{t as getStatus};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react27 from "react";
|
|
2
2
|
import { TooltipProps } from "@equinor/eds-core-react";
|
|
3
3
|
import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
4
4
|
|
|
@@ -6,14 +6,14 @@ import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
|
6
6
|
type OptionalTooltipProps = {
|
|
7
7
|
textTransform?: string;
|
|
8
8
|
} & TooltipProps;
|
|
9
|
-
declare const OptionalTooltip:
|
|
9
|
+
declare const OptionalTooltip: react27.ForwardRefExoticComponent<{
|
|
10
10
|
textTransform?: string;
|
|
11
11
|
} & {
|
|
12
12
|
placement?: _floating_ui_utils0.Placement;
|
|
13
|
-
title?:
|
|
13
|
+
title?: react27.ReactNode;
|
|
14
14
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
15
15
|
enterDelay?: number;
|
|
16
16
|
portalContainer?: HTMLElement;
|
|
17
|
-
} & Omit<
|
|
17
|
+
} & Omit<react27.HTMLAttributes<HTMLDivElement>, "title"> & react27.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { OptionalTooltip, OptionalTooltipProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{colors as t}from"../../atoms/style/colors.js";import{forwardRef as n,useMemo as r}from"react";import{Avatar as i,Icon as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s}from"react/jsx-runtime";import{person as c}from"@equinor/eds-icons";const{shape:l,typography:u}=e,d=[t.infographic.primary__energy_red_55.rgba,t.infographic.primary__moss_green_55.rgba,t.infographic.substitute__green_mint.rgba,t.infographic.substitute__blue_overcast.rgba];function f(e){let t=e.replace(/ *\([^)]*\) */g,``).toUpperCase(),n=t.split(` `),r=t.includes(`,`),i=e=>
|
|
1
|
+
import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{colors as t}from"../../atoms/style/colors.js";import{forwardRef as n,useMemo as r}from"react";import{Avatar as i,Icon as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s}from"react/jsx-runtime";import{person as c}from"@equinor/eds-icons";const{shape:l,typography:u}=e,d=[t.infographic.primary__energy_red_55.rgba,t.infographic.primary__moss_green_55.rgba,t.infographic.substitute__green_mint.rgba,t.infographic.substitute__blue_overcast.rgba];function f(e){let t=e.replace(/ *\([^)]*\) */g,``).toUpperCase(),n=t.split(` `),r=t.includes(`,`),i=e=>e.split(`,`)[1].trim().charAt(0);if(n.length===1&&n[0]!==``)return n[0].charAt(0);if(r)return i(t)+n[0].charAt(0);if(n.length>=2)return n[0].charAt(0)+n[n.length-1].charAt(0)}function p(e){let t=0;if(e)for(let n=0;n<e.length;n++)t+=e.charCodeAt(n);return d[t%d.length]}const m=o.div`
|
|
2
2
|
width: ${e=>e.$size}px;
|
|
3
3
|
height: ${e=>e.$size}px;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import{useRef as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{camera_add_photo as o}from"@equinor/eds-icons";const s=({onImageUpload:s,editor:c,features:l})=>{let u=n(null);if(l&&!l.includes(e.IMAGES))return null;let d=()=>{u.current&&u.current.click()},
|
|
1
|
+
import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import{useRef as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{camera_add_photo as o}from"@equinor/eds-icons";const s=({onImageUpload:s,editor:c,features:l})=>{let u=n(null);if(l&&!l.includes(e.IMAGES))return null;let d=()=>{u.current&&u.current.click()};return a(r,{children:[i(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange:async e=>{let t=e.target.files;if(!t?.[0]){console.error(`Files undefined`);return}let n=await s?.(t[0]);n&&c?.chain().focus().setImage({src:n.src,alt:n.alt}).run()},style:{display:`none`},accept:`image/*, video/*`}),i(t.Button,{"data-testid":`add-image-button`,icon:o,onClick:d,tooltip:`Add Image`})]})};export{s as AddImageButton};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EditorPanel, ImageExtensionFnProps, RichTextEditorFeatures } from "../RichTextEditor.types.js";
|
|
2
2
|
import { MenuButtonProps } from "./MenuButton.js";
|
|
3
3
|
import { AddImageProps } from "./AddImageButton.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react31 from "react";
|
|
5
5
|
import { FC } from "react";
|
|
6
6
|
import * as styled_components0 from "styled-components";
|
|
7
7
|
import { Editor } from "@tiptap/react";
|
|
@@ -14,10 +14,10 @@ interface MenuBarProps extends Pick<ImageExtensionFnProps, 'onImageUpload'> {
|
|
|
14
14
|
}
|
|
15
15
|
declare const AmplifyBar: FC<MenuBarProps>;
|
|
16
16
|
declare const EditorMenu: {
|
|
17
|
-
Bar: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<
|
|
18
|
-
Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<
|
|
19
|
-
Button:
|
|
20
|
-
Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<
|
|
17
|
+
Bar: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
+
Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
+
Button: react31.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react31.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
21
21
|
AddImageButton: FC<AddImageProps>;
|
|
22
22
|
};
|
|
23
23
|
declare const EditorText: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{amplify_table_add_column_left as e,amplify_table_add_column_right as t,amplify_table_remove_column as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>
|
|
1
|
+
import{amplify_table_add_column_left as e,amplify_table_add_column_right as t,amplify_table_remove_column as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>o(r,{children:[a(i,{tooltip:`Add column left`,icon:e,onClick:()=>s.chain().focus().addColumnBefore().run(),disabled:!s.can().addColumnBefore()}),a(i,{tooltip:`Add column right`,icon:t,onClick:()=>s.chain().focus().addColumnAfter().run(),disabled:!s.can().addColumnAfter()}),a(i,{tooltip:`Remove column`,icon:n,onClick:()=>s.chain().focus().deleteColumn().run(),disabled:!s.can().deleteColumn()})]});export{s as TableColumn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{amplify_table_merge_cells as e,amplify_table_split_cell as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>
|
|
1
|
+
import{amplify_table_merge_cells as e,amplify_table_split_cell as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>a(n,{children:[i(r,{tooltip:`Merge selected cells`,icon:e,onClick:()=>o.chain().focus().mergeCells().run(),disabled:!o.can().mergeCells()}),i(r,{tooltip:`Split selected cell`,icon:t,onClick:()=>o.chain().focus().splitCell().run(),disabled:!o.can().splitCell()})]});export{o as TableMerge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{amplify_table_add_row_above as e,amplify_table_add_row_below as t,amplify_table_remove_row as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>
|
|
1
|
+
import{amplify_table_add_row_above as e,amplify_table_add_row_below as t,amplify_table_remove_row as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>o(r,{children:[a(i,{tooltip:`Add row below`,icon:t,onClick:()=>s.chain().focus().addRowAfter().run(),disabled:!s.can().addRowAfter()}),a(i,{tooltip:`Add row above`,icon:e,onClick:()=>s.chain().focus().addRowBefore().run(),disabled:!s.can().addRowBefore()}),a(i,{tooltip:`Remove row`,icon:n,onClick:()=>s.chain().focus().deleteRow().run(),disabled:!s.can().deleteRow()})]});export{s as TableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{amplify_table_column_heading as e,amplify_table_row_heading as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>
|
|
1
|
+
import{amplify_table_column_heading as e,amplify_table_row_heading as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>a(n,{children:[i(r,{tooltip:`Toggle header row`,icon:t,onClick:()=>o.chain().focus().toggleHeaderRow().run(),disabled:!o.can().toggleHeaderRow()}),i(r,{tooltip:`Toggle header column`,icon:e,onClick:()=>o.chain().focus().toggleHeaderColumn().run(),disabled:!o.can().toggleHeaderColumn()})]});export{o as ToggleTable};
|
|
@@ -42,4 +42,4 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
|
|
|
42
42
|
bottom: 5px;
|
|
43
43
|
height: 4px;
|
|
44
44
|
width: 24px;
|
|
45
|
-
`,m=({editor:e,features:i})=>
|
|
45
|
+
`,m=({editor:e,features:i})=>i&&!i.includes(t.TEXT_COLOR)?null:a(n,{title:`Text Color`,enterDelay:300,children:o(d,{children:[a(`input`,{type:`color`,onInput:t=>{e.chain().focus().setColor(t.target.value).run()},"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}),a(f,{children:a(r,{data:s})}),a(p,{style:{background:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}})]})});export{m as TextColor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRichTextImage as e}from"../../../atoms/hooks/useRichTextImage.js";import{jsx as t}from"react/jsx-runtime";import{NodeViewWrapper as n,ReactNodeViewRenderer as r}from"@tiptap/react";import i from"@tiptap/extension-image";import{Plugin as a,PluginKey as o}from"@tiptap/pm/state";const s=r=>{let{src:i,alt:a}=r.node.attrs,o=r.extension.options.onImageRead,{data:s}=e(i,o);return t(n,{children:t(`img`,{src:s,alt:a})})};var c=i.extend({addOptions(){return{...this.parent?.(),onImageUpload:void 0,onImageRead:void 0}},addNodeView(){return r(s)},addProseMirrorPlugins(){let{onImageUpload:e}=this.options;return[new a({key:new o(`extendedImageHandler`),props:{handleDOMEvents:{drop(t,n){
|
|
1
|
+
import{useRichTextImage as e}from"../../../atoms/hooks/useRichTextImage.js";import{jsx as t}from"react/jsx-runtime";import{NodeViewWrapper as n,ReactNodeViewRenderer as r}from"@tiptap/react";import i from"@tiptap/extension-image";import{Plugin as a,PluginKey as o}from"@tiptap/pm/state";const s=r=>{let{src:i,alt:a}=r.node.attrs,o=r.extension.options.onImageRead,{data:s}=e(i,o);return t(n,{children:t(`img`,{src:s,alt:a})})};var c=i.extend({addOptions(){return{...this.parent?.(),onImageUpload:void 0,onImageRead:void 0}},addNodeView(){return r(s)},addProseMirrorPlugins(){let{onImageUpload:e}=this.options;return[new a({key:new o(`extendedImageHandler`),props:{handleDOMEvents:{drop(t,n){if(!n.dataTransfer?.files?.length||e===void 0)return;let r=Array.from(n.dataTransfer.files).filter(e=>/image/i.test(e.type));if(r.length===0)return;n.preventDefault();let{schema:i}=t.state,a=t.posAtCoords({left:n.clientX,top:n.clientY});if(a)for(let n of r)e(n).then(e=>{if(!e)return;let n=i.nodes.image.create({src:e.src,alt:e.alt}),r=t.state.tr.insert(a.pos,n);t.dispatch(r)}).catch(e=>{console.error(e)})},paste(t,n){if(!n.clipboardData?.files?.length||e===void 0)return;let r=Array.from(n.clipboardData.files).filter(e=>/image/i.test(e.type));if(r.length===0)return;n.preventDefault();let{schema:i}=t.state;for(let n of r)e(n).then(e=>{if(!e)return;let n=i.nodes.image.create({src:e.src,alt:e.src}),r=t.state.tr.replaceSelectionWith(n);t.dispatch(r)}).catch(e=>{console.error(e)})}}}})]}});export{c as default};
|
|
@@ -2,16 +2,16 @@ import { EditorStylingProps, RichTextContentProps } from "./RichTextEditor.style
|
|
|
2
2
|
import { EditorProviderProps } from "./EditorProvider.js";
|
|
3
3
|
import { MenuBarProps } from "./MenuBar/MenuBar.js";
|
|
4
4
|
import { RichTextEditor } from "./RichTextEditor.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react19 from "react";
|
|
6
6
|
import * as _tiptap_react0 from "@tiptap/react";
|
|
7
7
|
import * as styled_components_dist_types0 from "styled-components/dist/types";
|
|
8
8
|
|
|
9
9
|
//#region src/molecules/RichTextEditor/index.d.ts
|
|
10
10
|
declare const RichText: {
|
|
11
|
-
Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<
|
|
12
|
-
Provider:
|
|
13
|
-
Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> &
|
|
14
|
-
Bar:
|
|
11
|
+
Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<react19.DetailedHTMLProps<react19.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, EditorStylingProps>> & string;
|
|
12
|
+
Provider: react19.FC<EditorProviderProps>;
|
|
13
|
+
Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> & react19.RefAttributes<HTMLDivElement>, RichTextContentProps>> & string & Omit<react19.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react19.RefAttributes<HTMLDivElement>>, keyof react19.Component<any, {}, any>>;
|
|
14
|
+
Bar: react19.FC<MenuBarProps>;
|
|
15
15
|
};
|
|
16
16
|
//#endregion
|
|
17
17
|
export { RichText };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react39 from "react";
|
|
2
2
|
import { SearchProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Search/Search.d.ts
|
|
5
|
-
declare const Search$1:
|
|
5
|
+
declare const Search$1: react39.ForwardRefExoticComponent<SearchProps & react39.RefAttributes<HTMLInputElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Search$1 as Search };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{MenuItemWrapper as t,StyledMenuItem as n}from"./Select.styles.js";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{add_box as o}from"@equinor/eds-icons";const s=({itemRefs:s,onItemKeyDown:c,index:l,onAddItem:u,addItemSingularWord:d,children:f})=>
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{MenuItemWrapper as t,StyledMenuItem as n}from"./Select.styles.js";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{add_box as o}from"@equinor/eds-icons";const s=({itemRefs:s,onItemKeyDown:c,index:l,onAddItem:u,addItemSingularWord:d,children:f})=>i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:e=>{e.preventDefault(),e.key===`Enter`?u():c(e)},children:[i(r,{data:o,color:e.interactive.primary__resting.rgba}),a(`span`,{children:[`Add "`,f,`" as new `,d]})]})});export{s as AddTagItem};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, SelectOptionRequired } from "../Select.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Select/ComboBox/ComboBox.d.ts
|
|
5
5
|
type ListComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & ListSelectProps<T>;
|
|
@@ -18,6 +18,6 @@ type GroupedComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T>
|
|
|
18
18
|
* @param showSelectedAsText - If values should be shown as "5/10 Selected", defaults to false
|
|
19
19
|
* @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
|
|
20
20
|
*/
|
|
21
|
-
declare function ComboBox<T extends SelectOptionRequired>(props: ListComboBoxProps<T> | GroupedComboBoxProps<T>):
|
|
21
|
+
declare function ComboBox<T extends SelectOptionRequired>(props: ListComboBoxProps<T> | GroupedComboBoxProps<T>): react_jsx_runtime1.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { ComboBox, GroupedComboBoxProps, ListComboBoxProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react43 from "react";
|
|
3
3
|
import "@equinor/eds-core-react";
|
|
4
4
|
import "styled-components";
|
|
5
5
|
import * as styled_components_dist_types8 from "styled-components/dist/types";
|
|
@@ -11,12 +11,12 @@ interface ComboBoxChipProps {
|
|
|
11
11
|
$lightBackground?: boolean;
|
|
12
12
|
className: string;
|
|
13
13
|
}
|
|
14
|
-
declare const ComboBoxChip: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<((Omit<
|
|
14
|
+
declare const ComboBoxChip: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<((Omit<react43.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
15
15
|
onClick?: undefined;
|
|
16
16
|
onDelete?: undefined;
|
|
17
|
-
}) | ClickableChipProps | DeletableChipProps)) &
|
|
17
|
+
}) | ClickableChipProps | DeletableChipProps)) & react43.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types8.BaseObject, ComboBoxChipProps>> & string & Omit<react43.ForwardRefExoticComponent<(Omit<react43.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
18
18
|
onClick?: undefined;
|
|
19
19
|
onDelete?: undefined;
|
|
20
|
-
}) | ClickableChipProps | DeletableChipProps)) &
|
|
20
|
+
}) | ClickableChipProps | DeletableChipProps)) & react43.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react43.Component<any, {}, any>>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { ComboBoxChip };
|
|
@@ -151,7 +151,6 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
|
|
|
151
151
|
background: ${({$tryingToRemove:e,$lightBackground:t})=>e?r.interactive.primary__hover_alt.rgba:t?r.ui.background__light.rgba:r.ui.background__default.rgba} !important;
|
|
152
152
|
`,_=l(s.Item)`
|
|
153
153
|
flex-grow: 1;
|
|
154
|
-
${({$paddedLeft:e})=>e&&`margin-left: 36px`};
|
|
155
154
|
padding-left: 10px;
|
|
156
155
|
|
|
157
156
|
> div {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{spacings as t}from"../../atoms/style/spacings.js";import{getChildOffset as n}from"./Select.utils.js";import{MenuItemSpacer as r,MenuItemWrapper as i,SmallButton as a,StyledMenuItem as o}from"./Select.styles.js";import{getParentIcon as s,getParentState as c}from"./SelectMenuItem.utils.js";import{useMemo as l,useRef as u,useState as d}from"react";import{Icon as f}from"@equinor/eds-core-react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{checkbox as g,checkbox_outline as _,chevron_down as v,chevron_right as y}from"@equinor/eds-icons";const{colors:b}=e,x=e=>{let{index:S,childOffset:C,depth:w=0,item:T,itemRefs:E,onItemKeyDown:D,onItemSelect:O,parentHasNestedItems:k=!1,CustomMenuItemComponent:A}=e,[j,M]=d(!1),N=u(-1),P=u([]),F
|
|
1
|
+
import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{spacings as t}from"../../atoms/style/spacings.js";import{getChildOffset as n}from"./Select.utils.js";import{MenuItemSpacer as r,MenuItemWrapper as i,SmallButton as a,StyledMenuItem as o}from"./Select.styles.js";import{getParentIcon as s,getParentState as c}from"./SelectMenuItem.utils.js";import{useMemo as l,useRef as u,useState as d}from"react";import{Icon as f}from"@equinor/eds-core-react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{checkbox as g,checkbox_outline as _,chevron_down as v,chevron_right as y}from"@equinor/eds-icons";const{colors:b}=e,x=e=>{let{index:S,childOffset:C,depth:w=0,item:T,itemRefs:E,onItemKeyDown:D,onItemSelect:O,parentHasNestedItems:k=!1,CustomMenuItemComponent:A}=e,[j,M]=d(!1),N=u(-1),P=u([]),F=(`values`in e?e.values.map(({value:e})=>e):[]).includes(T.value),I=l(()=>`value`in e?_:s(T,e.values),[T,e]),L=l(()=>`value`in e?`none`:c(T,e.values),[T,e]),R=l(()=>Array(w).fill(0).map((e,t)=>m(r,{},`spacer-${e+t}`)),[w]),z=e=>{e.preventDefault(),O(T)},B=e=>{e.stopPropagation(),M(e=>!e)},V=e=>{e.key===`ArrowDown`?N.current+=1:e.key===`ArrowUp`&&--N.current,N.current<=-1?(E.current[S]?.focus(),N.current=-1):N.current+C===P.current.length?(N.current=-1,D(e),M(!1)):N.current>=0&&N.current<P.current.length-C&&P.current[N.current+C]?.focus()},H=e=>{!j&&e.key===`ArrowDown`||e.key===`ArrowUp`?D(e):e.key===`ArrowRight`||e.key===`ArrowLeft`?M(e=>!e):j&&e.key===`ArrowDown`&&N.current===-1&&(N.current=0,P.current[N.current+C]?.focus())};return T.children&&T.children.length>0&&`values`in e?h(p,{children:[h(i,{style:{paddingLeft:w===0?t.small:0},children:[R,m(a,{variant:`ghost_icon`,onClick:B,"data-testid":`toggle-button`,children:m(f,{color:b.interactive.primary__resting.rgba,data:j?v:y})}),m(o,{$depth:w,ref:e=>{E.current[S]=e},index:S,closeMenuOnClick:!1,onKeyDownCapture:H,onClick:z,children:A?m(A,{item:T,selectedState:L}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:I}),m(`span`,{children:T.label})]})})]}),j&&T.children.map((t,r)=>m(x,{index:C+r,childOffset:C+n(T.children,r),depth:w+1,item:t,itemRefs:P,values:e.values,onItemKeyDown:V,onItemSelect:O,parentHasNestedItems:!0,CustomMenuItemComponent:A},`child-${r}-${t.value}-${T.value}`))]}):`values`in e?h(i,{children:[R,m(o,{$depth:w,$paddedLeft:k,ref:e=>{E.current[S]=e},index:S,tabIndex:w,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:z,children:A?m(A,{item:T,selectedState:F?`selected`:`none`}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:F?g:_}),m(`span`,{children:T.label})]})})]}):m(i,{children:m(o,{$depth:w,$selected:e.value&&T.value===e.value.value,ref:e=>{E.current[S]=e},index:S,onKeyDownCapture:D,onClick:z,children:A?m(A,{item:T,selectedState:e.value&&T.value===e.value.value?`selected`:`none`}):m(`span`,{children:T.label})})})};export{x as SelectMenuItem};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonSelectProps, GroupedSelectProps, ListSelectProps, SelectOptionRequired, SingleSelectCommon } from "../Select.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Select/SingleSelect/SingleSelect.d.ts
|
|
5
5
|
type ListSingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> & SingleSelectCommon<T> & ListSelectProps<T>;
|
|
@@ -16,6 +16,6 @@ type GroupedSingleSelectProps<T extends SelectOptionRequired> = CommonSelectProp
|
|
|
16
16
|
* @param onSearchFilter - Custom filter function for search, default is "item.label.match(new RegExp(searchValue, 'i'))"
|
|
17
17
|
* @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
|
|
18
18
|
*/
|
|
19
|
-
declare function SingleSelect<T extends SelectOptionRequired>(props: ListSingleSelectProps<T> | GroupedSingleSelectProps<T>):
|
|
19
|
+
declare function SingleSelect<T extends SelectOptionRequired>(props: ListSingleSelectProps<T> | GroupedSingleSelectProps<T>): react_jsx_runtime2.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { GroupedSingleSelectProps, ListSingleSelectProps, SingleSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react94 from "react";
|
|
2
2
|
import { CheckboxProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Checkbox/Checkbox.d.ts
|
|
@@ -7,6 +7,6 @@ interface CheckboxProps$1 extends CheckboxProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Checkbox$1:
|
|
10
|
+
declare const Checkbox$1: react94.ForwardRefExoticComponent<CheckboxProps$1 & react94.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react92 from "react";
|
|
2
2
|
import { RadioProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Radio/Radio.d.ts
|
|
@@ -7,6 +7,6 @@ interface RadioProps$1 extends RadioProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Radio$1:
|
|
10
|
+
declare const Radio$1: react92.ForwardRefExoticComponent<RadioProps$1 & react92.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Radio$1 as Radio, RadioProps$1 as RadioProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react96 from "react";
|
|
2
2
|
import { SwitchProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Switch/Switch.d.ts
|
|
5
5
|
interface SwitchProps$1 extends SwitchProps {
|
|
6
6
|
outlined?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Switch$1:
|
|
8
|
+
declare const Switch$1: react96.ForwardRefExoticComponent<SwitchProps$1 & react96.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react41 from "react";
|
|
2
2
|
import * as styled_components_dist_types6 from "styled-components/dist/types";
|
|
3
3
|
import * as styled_components_dist_models_Keyframes0 from "styled-components/dist/models/Keyframes";
|
|
4
4
|
|
|
@@ -7,6 +7,6 @@ declare const skeletonBaseloading: styled_components_dist_models_Keyframes0.defa
|
|
|
7
7
|
interface SkeletonBaseProps {
|
|
8
8
|
$offset?: number;
|
|
9
9
|
}
|
|
10
|
-
declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<
|
|
10
|
+
declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react41.DetailedHTMLProps<react41.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
|
|
@@ -4,12 +4,12 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
${({$disabled:e,$clickable:t})=>e?s`
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:d,setCurrentStep:f,isStepAtIndexDisabled:p}=n(),m=p(t),h=i(()=>t<d?`body_short`:`body_short_bold`,[d,t]),g=i(()=>t>d||m?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[d,t,m]),_=()=>{t<d&&!m&&f(t)};return l(u,{"data-testid":`step`,$clickable:t<d,onClick:_,$disabled:m,"aria-disabled":m,role:`button`,children:[c(r,{index:t,disabled:m}),(!o||d===t)&&c(a,{variant:h,color:g,children:s})]})};export{d as
|
|
7
|
+
&:hover {
|
|
8
|
+
cursor: not-allowed;
|
|
9
|
+
}
|
|
10
|
+
`:t?s`
|
|
11
|
+
&:hover {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
`:``}
|
|
15
|
+
`,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:d,setCurrentStep:f,isStepAtIndexDisabled:p}=n(),m=p(t),h=i(()=>t<d?`body_short`:`body_short_bold`,[d,t]),g=i(()=>t>d||m?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[d,t,m]),_=()=>{t<d&&!m&&f(t)};return l(u,{"data-testid":`step`,$clickable:t<d,onClick:_,$disabled:m,"aria-disabled":m,role:`button`,children:[c(r,{index:t,disabled:m}),(!o||d===t)&&c(a,{variant:h,color:g,children:s})]})};export{d as Step};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import n
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import{Step as n}from"./Step/Step.js";import{StepLine as r}from"./StepLine.js";import{SubTitle as i}from"./SubTitle/SubTitle.js";import{useMemo as a}from"react";import o,{css as s}from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: ${e.xx_large};
|
|
5
|
-
`,
|
|
5
|
+
`,d=o.div`
|
|
6
6
|
display: grid;
|
|
7
7
|
grid-template-columns:
|
|
8
8
|
repeat(${({$stepAmount:e})=>e-1}, auto 1fr)
|
|
@@ -10,5 +10,7 @@ import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}
|
|
|
10
10
|
grid-gap: ${e.small};
|
|
11
11
|
align-items: center;
|
|
12
12
|
width: 100%;
|
|
13
|
-
${({$maxWidth:e})=>e
|
|
14
|
-
|
|
13
|
+
${({$maxWidth:e})=>e?s`
|
|
14
|
+
max-width: ${e};
|
|
15
|
+
`:``}
|
|
16
|
+
`,f=({onlyShowCurrentStepLabel:e=!1,maxWidth:o})=>{let{steps:s,currentStep:f}=t(),p=a(()=>{let t=[];return s.forEach((i,a)=>{t.push(c(n,{index:a,onlyShowCurrentStepLabel:e,children:i.label},`step-${a}`)),a!==s.length-1&&t.push(c(r,{done:f>a},`step-line-${a}`))}),t},[f,e,s]);return l(u,{children:[c(d,{$stepAmount:s.length,$maxWidth:o,"data-testid":`stepper-container`,children:p}),c(i,{})]})};export{f as Stepper};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Variants } from "../../atoms/types/variants.js";
|
|
2
|
+
import { FC, InputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
3
|
+
import { TextFieldProps } from "@equinor/eds-core-react";
|
|
4
|
+
|
|
5
|
+
//#region src/molecules/TextField/TextField.d.ts
|
|
6
|
+
type TextFieldProps$1 = Omit<TextFieldProps, 'variant'> & {
|
|
7
|
+
variant?: Variants;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
} & (TextareaHTMLAttributes<HTMLTextAreaElement> | InputHTMLAttributes<HTMLInputElement>);
|
|
10
|
+
declare const TextField$1: FC<TextFieldProps$1>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { TextField$1 as TextField, TextFieldProps$1 as TextFieldProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import{shape as i}from"../../atoms/style/index.js";import{
|
|
1
|
+
import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import{shape as i}from"../../atoms/style/index.js";import{getSkeletonHeight as a,getSkeletonTop as o}from"../../atoms/utils/skeleton.js";import{SkeletonBase as s}from"../Skeleton/SkeletonBase/SkeletonBase.js";import{useRef as c}from"react";import{TextField as l}from"@equinor/eds-core-react";import u,{css as d}from"styled-components";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=u.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
input,
|
|
4
4
|
textarea {
|
|
@@ -66,9 +66,9 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
`}
|
|
69
|
-
`,h=u(
|
|
69
|
+
`,h=u(s)`
|
|
70
70
|
position: absolute;
|
|
71
71
|
left: ${r.small};
|
|
72
72
|
border-radius: ${i.corners.borderRadius};
|
|
73
73
|
transform: translateY(${r.x_small});
|
|
74
|
-
`,g=e=>{let t={...e,variant:e.variant===`dirty`?void 0:e.variant},n=e.loading?void 0:e.variant,r=
|
|
74
|
+
`,g=e=>{let t={...e,variant:e.variant===`dirty`?void 0:e.variant},n=e.loading?void 0:e.variant,r=o(e),i=a(e),s=c(`${Math.max(20,Math.random()*80)}%`);return p(m,{$variant:n,$disabled:e.loading?!1:e.disabled,children:[f(l,{...t,disabled:e.loading||e.disabled}),e.loading&&f(h,{className:`skeleton`,role:`progressbar`,style:{top:r,height:i,width:s.current}})]})};export{g as TextField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Container as e}from"./Waves.styles.js";import{WaveStatic as t}from"./WaveStatic.js";import{useEffect as n,useRef as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";import{useScroll as o}from"framer-motion";const s=({gradientColors:s})=>{let c=r(null),[l,u]=i(c.current?.clientWidth??0),[d,f]=i(c.current?.clientHeight??0),{scrollY:p}=o({container:{current:document.getElementById(`content`)}})
|
|
1
|
+
import{Container as e}from"./Waves.styles.js";import{WaveStatic as t}from"./WaveStatic.js";import{useEffect as n,useRef as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";import{useScroll as o}from"framer-motion";const s=({gradientColors:s})=>{let c=r(null),[l,u]=i(c.current?.clientWidth??0),[d,f]=i(c.current?.clientHeight??0),{scrollY:p}=o({container:{current:document.getElementById(`content`)}});return n(()=>{let e=()=>{c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),a(e,{ref:e=>{c.current=e,c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))},style:{top:p},children:a(t,{height:d,width:l,gradientColors:s})})};export{s as Waves};
|
|
@@ -7,7 +7,6 @@ import { Badge, BadgeProps } from "./Badge/Badge.js";
|
|
|
7
7
|
import { Banner, BannerProps } from "./Banner/Banner.js";
|
|
8
8
|
import { Button as Button$1, ButtonProps as ButtonProps$1 } from "./Button/Button.js";
|
|
9
9
|
import { BaseChipProps, Chip as Chip$1 } from "./Chip/Chip.js";
|
|
10
|
-
import { ContentMenu, ContentMenuProps } from "./ContentMenu/ContentMenu.js";
|
|
11
10
|
import { DatePicker as DatePicker$1, DatePickerProps as DatePickerProps$1 } from "./DatePicker/DatePicker.js";
|
|
12
11
|
import { DateRangePicker as DateRangePicker$1, DateRangePickerProps as DateRangePickerProps$1 } from "./DateRangePicker/DateRangePicker.js";
|
|
13
12
|
import { Dialog as Dialog$1, DialogAction, DialogProps as DialogProps$1 } from "./Dialog/Dialog.js";
|
|
@@ -16,7 +15,7 @@ import { FileProgressProps } from "./FileProgress/FileProgress.types.js";
|
|
|
16
15
|
import { FileProgress, FileProgressPropsExtension } from "./FileProgress/FileProgress.js";
|
|
17
16
|
import { FileUploadArea, FileUploadAreaProps } from "./FileUploadArea/FileUploadArea.js";
|
|
18
17
|
import { FullPageSpinner, FullPageSpinnerProps } from "./FullPageSpinner/FullPageSpinner.js";
|
|
19
|
-
import { IconCellColors, IconCellStates, IconCellVariants } from "./IconCell/IconCell.types.js";
|
|
18
|
+
import { IconCellColor, IconCellColorObject, IconCellColors, IconCellState, IconCellStates, IconCellVariant, IconCellVariants } from "./IconCell/IconCell.types.js";
|
|
20
19
|
import { IconCell, IconCellProps } from "./IconCell/IconCell.js";
|
|
21
20
|
import { InfoElement, InfoElementProps } from "./InfoElement/InfoElement.js";
|
|
22
21
|
import { OptionalTooltip, OptionalTooltipProps } from "./OptionalTooltip/OptionalTooltip.js";
|
|
@@ -29,10 +28,6 @@ import { Tab } from "./Tabs/Tabs.types.js";
|
|
|
29
28
|
import { Tabs, TabsProps } from "./Tabs/Tabs.js";
|
|
30
29
|
import { TableMenuBar, TextTable } from "./RichTextEditor/MenuBar/Table/TableBar.js";
|
|
31
30
|
import { Search as Search$1 } from "./Search/Search.js";
|
|
32
|
-
import { SieveFilterGroup } from "./Sieve/Filter.js";
|
|
33
|
-
import { FilterValues, SieveOption, SieveProps, SieveValue } from "./Sieve/Sieve.types.js";
|
|
34
|
-
import { Sieve } from "./Sieve/Sieve.js";
|
|
35
|
-
import { SingleFilterMenu, SingleFilterMenuProps } from "./SingleFilterMenu/SingleFilterMenu.js";
|
|
36
31
|
import { SkeletonBase, SkeletonBaseProps, skeletonBaseloading } from "./Skeleton/SkeletonBase/SkeletonBase.js";
|
|
37
32
|
import { SkeletonGradient, SkeletonGradientProps } from "./Skeleton/SkeletonGradient/SkeletonGradient.js";
|
|
38
33
|
import { Stepper, StepperProps } from "./Stepper/Stepper.js";
|
|
@@ -41,11 +36,12 @@ import { OptionDrawerSelectItem } from "./OptionDrawer/OptionDrawer.types.js";
|
|
|
41
36
|
import { ComboBox, GroupedComboBoxProps, ListComboBoxProps } from "./Select/ComboBox/ComboBox.js";
|
|
42
37
|
import { ComboBoxChip } from "./Select/Select.styles.js";
|
|
43
38
|
import { GroupedSingleSelectProps, ListSingleSelectProps, SingleSelect } from "./Select/SingleSelect/SingleSelect.js";
|
|
39
|
+
import { TextField as TextField$1, TextFieldProps as TextFieldProps$1 } from "./TextField/TextField.js";
|
|
44
40
|
import { FeedBackIcon, FeedBackIconProps } from "./FeedBackIcon/FeedBackIcon.js";
|
|
45
41
|
import { ListItem, ListItemProps } from "./ListItem/ListItem.js";
|
|
46
42
|
import { Checkbox as Checkbox$1, CheckboxProps as CheckboxProps$1 } from "./SelectionControls/Checkbox/Checkbox.js";
|
|
47
43
|
import { Radio as Radio$1, RadioProps as RadioProps$1 } from "./SelectionControls/Radio/Radio.js";
|
|
48
44
|
import { Switch as Switch$1, SwitchProps as SwitchProps$1 } from "./SelectionControls/Switch/Switch.js";
|
|
49
45
|
import { Waves } from "./Waves/Waves.js";
|
|
50
|
-
import { Accordion, AccordionHeaderActionsProps, AccordionHeaderProps, AccordionHeaderTitleProps, AccordionItemProps, AccordionPanelProps, AccordionProps, BreadcrumbProps, Breadcrumbs, BreadcrumbsProps, CircularProgress as CircularProgress$1, CircularProgressProps, Dialog as EDSDialog, DialogProps as EDSDialogProps, Divider as Divider$1, DividerProps, DotProgress as DotProgress$1, DotProgressProps, Icon as Icon$1, IconProps, LinearProgress as LinearProgress$1, LinearProgressProps, Menu as Menu$1, MenuProps, SearchProps as SearchProps$1,
|
|
51
|
-
export { Accordion, type AccordionHeaderActionsProps, type AccordionHeaderProps, type AccordionHeaderTitleProps, type AccordionItemProps, type AccordionPanelProps, type AccordionProps, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, CircularProgress$1 as CircularProgress, type CircularProgressProps, Divider$1 as Divider, type DividerProps, DotProgress$1 as DotProgress, type DotProgressProps, EDSDialog, type EDSDialogProps, Icon$1 as Icon, type IconProps, LinearProgress$1 as LinearProgress, type LinearProgressProps, Menu$1 as Menu, type MenuProps, type SearchProps$1 as SearchProps,
|
|
46
|
+
import { Accordion, AccordionHeaderActionsProps, AccordionHeaderProps, AccordionHeaderTitleProps, AccordionItemProps, AccordionPanelProps, AccordionProps, BreadcrumbProps, Breadcrumbs, BreadcrumbsProps, CircularProgress as CircularProgress$1, CircularProgressProps, Dialog as EDSDialog, DialogProps as EDSDialogProps, Divider as Divider$1, DividerProps, DotProgress as DotProgress$1, DotProgressProps, Icon as Icon$1, IconProps, LinearProgress as LinearProgress$1, LinearProgressProps, Menu as Menu$1, MenuProps, SearchProps as SearchProps$1, Typography as Typography$1, TypographyProps } from "@equinor/eds-core-react";
|
|
47
|
+
export { Accordion, type AccordionHeaderActionsProps, type AccordionHeaderProps, type AccordionHeaderTitleProps, type AccordionItemProps, type AccordionPanelProps, type AccordionProps, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, CircularProgress$1 as CircularProgress, type CircularProgressProps, Divider$1 as Divider, type DividerProps, DotProgress$1 as DotProgress, type DotProgressProps, EDSDialog, type EDSDialogProps, Icon$1 as Icon, type IconProps, LinearProgress$1 as LinearProgress, type LinearProgressProps, Menu$1 as Menu, type MenuProps, type SearchProps$1 as SearchProps, Typography$1 as Typography, type TypographyProps };
|
package/dist/molecules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FullPageSpinner as e}from"./FullPageSpinner/FullPageSpinner.js";import{DEFAULT_FEATURES as t,RichTextEditorFeatures as n}from"./RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as r}from"./RichTextEditor/custom-extensions/AmplifyKit.js";import{AnimatedCheckmark as i}from"./AnimatedCheckmark/AnimatedCheckmark.js";import{ApplicationIcon as a}from"./ApplicationIcon/ApplicationIcon.js";import{Badge as o}from"./Badge/Badge.js";import{Banner as s}from"./Banner/Banner.js";import{Button as c}from"./Button/Button.js";import{Chip as
|
|
1
|
+
import{FullPageSpinner as e}from"./FullPageSpinner/FullPageSpinner.js";import{DEFAULT_FEATURES as t,RichTextEditorFeatures as n}from"./RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as r}from"./RichTextEditor/custom-extensions/AmplifyKit.js";import{AnimatedCheckmark as i}from"./AnimatedCheckmark/AnimatedCheckmark.js";import{ApplicationIcon as a}from"./ApplicationIcon/ApplicationIcon.js";import{Badge as o}from"./Badge/Badge.js";import{Banner as s}from"./Banner/Banner.js";import{Button as c}from"./Button/Button.js";import{Chip as ee}from"./Chip/Chip.js";import{SkeletonBase as te,skeletonBaseloading as ne}from"./Skeleton/SkeletonBase/SkeletonBase.js";import{DatePicker as l}from"./DatePicker/DatePicker.js";import{DateRangePicker as u}from"./DateRangePicker/DateRangePicker.js";import{OptionalTooltip as d}from"./OptionalTooltip/OptionalTooltip.js";import{Dialog as f}from"./Dialog/Dialog.js";import{EquinorLogo as p}from"./EquinorLogo/EquinorLogo.js";import{FileProgress as m}from"./FileProgress/FileProgress.js";import{FileUploadArea as h}from"./FileUploadArea/FileUploadArea.js";import{IconCellColors as g,IconCellStates as _,IconCellVariants as v}from"./IconCell/IconCell.types.js";import{IconCell as y}from"./IconCell/IconCell.js";import{InfoElement as b}from"./InfoElement/InfoElement.js";import{ProfileAvatar as x}from"./ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as S}from"./RichTextDisplay/RichTextDisplay.js";import{TableMenuBar as C,TextTable as w}from"./RichTextEditor/MenuBar/Table/TableBar.js";import{TextField as T}from"./TextField/TextField.js";import{AmplifyBar as E,EditorMenu as D,EditorText as re}from"./RichTextEditor/MenuBar/MenuBar.js";import{RichTextEditor as O}from"./RichTextEditor/RichTextEditor.js";import{RichText as k}from"./RichTextEditor/index.js";import{Tabs as A}from"./Tabs/Tabs.js";import{Search as j}from"./Search/Search.js";import{SkeletonGradient as M}from"./Skeleton/SkeletonGradient/SkeletonGradient.js";import{Stepper as N}from"./Stepper/Stepper.js";import{OptionDrawer as P}from"./OptionDrawer/OptionDrawer.js";import{ComboBoxChip as F}from"./Select/Select.styles.js";import{ComboBox as I}from"./Select/ComboBox/ComboBox.js";import{SingleSelect as L}from"./Select/SingleSelect/SingleSelect.js";import{FeedBackIcon as R}from"./FeedBackIcon/FeedBackIcon.js";import{ListItem as z}from"./ListItem/ListItem.js";import{Checkbox as B}from"./SelectionControls/Checkbox/Checkbox.js";import{Radio as V}from"./SelectionControls/Radio/Radio.js";import{Switch as H}from"./SelectionControls/Switch/Switch.js";import{Waves as U}from"./Waves/Waves.js";import{Accordion as W,Breadcrumbs as G,CircularProgress as K,Dialog as q,Divider as J,DotProgress as Y,Icon as X,LinearProgress as Z,Menu as Q,Typography as $}from"@equinor/eds-core-react";export{W as Accordion,G as Breadcrumbs,K as CircularProgress,J as Divider,Y as DotProgress,q as EDSDialog,X as Icon,Z as LinearProgress,Q as Menu,$ as Typography};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{spacings as e}from"../../../atoms/style/spacings.js";import{Status as t}from"../../Status/index.js";import{
|
|
1
|
+
import{spacings as e}from"../../../atoms/style/spacings.js";import{Status as t}from"../../Status/index.js";import{Question as n}from"./Question.js";import{useMemo as r}from"react";import{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{useSearch as c}from"@tanstack/react-router";const l=a.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: ${e.medium};
|
|
@@ -6,4 +6,4 @@ import{spacings as e}from"../../../atoms/style/spacings.js";import{Status as t}f
|
|
|
6
6
|
&:has(> div > div > svg) {
|
|
7
7
|
transform: translateY(50%);
|
|
8
8
|
}
|
|
9
|
-
`,u=({categoryName:e,faqs:
|
|
9
|
+
`,u=({categoryName:e,faqs:a,selectedTab:u})=>{let{search:d}=c({strict:!1}),f=r(()=>a.toSorted((e,t)=>{let n=e.orderBy??0,r=t.orderBy??0;return n-r}),[a]),p=r(()=>d?f.filter(t=>t.question.toLowerCase().includes(d.toLowerCase())||t.answer.toLowerCase().includes(d.toLowerCase())||e.toLowerCase().includes(d.toLowerCase())):f,[e,d,f]);return u!==void 0&&p.length===0?o(l,{children:s(t,{center:!1,children:[o(t.Title,{title:`No Questions Found`}),o(t.Description,{text:`No questions or answers matches your search in this category`})]})}):p.length===0?null:s(l,{children:[o(i,{variant:`h4`,children:e}),p.map(e=>o(n,{...e},e.id))]})};export{u as Category};
|
|
@@ -19,4 +19,4 @@ import{animation as e}from"../../../atoms/style/animation.js";import{colors as t
|
|
|
19
19
|
background: ${t.interactive.primary__hover_alt.rgba};
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`,y=({question:e,answer:t,createdDate:n})=>{let[r,u]=s(!1),
|
|
22
|
+
`,y=({question:e,answer:t,createdDate:n})=>{let[r,u]=s(!1);return f(v,{onClick:()=>u(e=>!e),children:[d(l,{variant:`h4`,children:e}),d(l,{variant:`caption`,children:i(n)}),d(a,{variant:`ghost_icon`,children:d(c,{data:r?m:p})}),d(h,{children:r&&d(g.div,{style:{overflow:`hidden`},initial:{height:0},animate:{height:`auto`},exit:{height:0},children:d(o,{value:t,onImageRead:_.getFaqImage})})})]})};export{y as Question};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Status as e}from"../Status/index.js";import{
|
|
1
|
+
import{Status as e}from"../Status/index.js";import{useFaqsInApplication as t}from"../../atoms/hooks/useFaqsInApplication.js";import{Container as n}from"./Faq.styles.js";import{Header as r}from"./Header.js";import{Category as i}from"./Category/Category.js";import{CategorySkeleton as a}from"./CategorySkeleton.js";import{useMemo as o,useState as s}from"react";import{Typography as c}from"@equinor/eds-core-react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f=()=>{let{data:f,isLoading:p}=t(),[m,h]=s(void 0),g=o(()=>{if(f)return m?[f.find(e=>e.id==Number(m))]:f},[f,m]);return d(n,{children:[u(c,{variant:`h1`,bold:!0,children:`FAQ`}),u(r,{selectedTab:m,setSelectedTab:h}),g&&g.length>0?g.map(e=>u(i,{...e,selectedTab:m},e.id)):p?d(l,{children:[u(a,{}),u(a,{}),u(a,{})]}):u(e,{center:!1,children:u(e.Title,{title:`No FAQs available yet`})})]})};export{f as Faq};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{useFaqsInApplication as n}from"../../atoms/hooks/useFaqsInApplication.js";import{Tabs as r}from"../../molecules/Tabs/Tabs.js";import{useMemo as i}from"react";import{Search as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useNavigate as l,useSearch as u}from"@tanstack/react-router";const d=o.div`
|
|
2
2
|
position: sticky;
|
|
3
3
|
top: 0;
|
|
4
4
|
display: flex;
|
|
@@ -11,4 +11,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
11
11
|
> div[role='search'] > div {
|
|
12
12
|
background: ${e.ui.background__default.rgba};
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,f=({setSelectedTab:e,selectedTab:t})=>{let{data:o}=n(),f=l(),{search:p}=u({strict:!1}),m=i(()=>o?[{value:`all`,label:`All categories`},...o.map(e=>({value:e.id.toString(),label:e.categoryName}))]:[{value:`all`,label:`All categories`}],[o]);return c(d,{children:[s(r,{style:{maxWidth:`100%`,width:`fit-content`},selected:t??`all`,onChange:t=>{e(t===`all`?void 0:t)},options:m}),s(a,{value:p,onChange:e=>{e.target.value?f({to:`.`,search:{search:e.target.value}}):f({to:`.`,search:null})},placeholder:`Search for answer by keyword`})]})};export{f as Header};
|
|
@@ -11,4 +11,4 @@ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/ind
|
|
|
11
11
|
height: calc(100vh - 64px);
|
|
12
12
|
max-height: calc(100vh - 64px);
|
|
13
13
|
width: 100vw;
|
|
14
|
-
`,m=({setField:e,fields:c,isLoading:d,onChangedField:m,finishedText:h,showAccessITLink:g=!0,itemNameSingular:_=`field`})=>{let[v,y]=s(!1),b=o(``)
|
|
14
|
+
`,m=({setField:e,fields:c,isLoading:d,onChangedField:m,finishedText:h,showAccessITLink:g=!0,itemNameSingular:_=`field`})=>{let[v,y]=s(!1),b=o(``);return v?l(a,{fieldName:b.current,onChangedField:m,finishedText:h}):u(p,{className:`${n.FullWidth} ${n.WithoutScrollGutter}`,children:[l(f,{children:l(t,{})}),d?l(i,{}):l(r,{itemNameSingular:_,availableFields:c,onSelect:t=>{t.name&&t.uuid&&(e({uuid:t.uuid,name:t.name,country:t.country??``}),b.current=t.name,y(!0))},showAccessITLink:g})]})};export{m as FieldSelector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useState as t}from"react";import{Menu as n}from"@equinor/eds-core-react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";const o=({onOpenChange:o,menuItems:s,children:c})=>{let[l,u]=t(!1),d=e(null)
|
|
1
|
+
import{useRef as e,useState as t}from"react";import{Menu as n}from"@equinor/eds-core-react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";const o=({onOpenChange:o,menuItems:s,children:c})=>{let[l,u]=t(!1),d=e(null);return a(r,{children:[i(`button`,{ref:d,onClick:()=>{u(!l),o?.(!l)},children:c}),l&&i(n,{open:!0,anchorEl:d.current,onClose:()=>{u(!1),o?.(!1)},children:s})]})};export{o as ButtonWithMenu};
|