@equinor/amplify-component-lib 9.16.1-beta.0 → 9.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/hooks/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/useSearchParameter.d.ts +12 -0
- package/dist/atoms/hooks/useSearchParameter.js +1 -0
- package/dist/atoms/hooks/useSelect.js +1 -1
- package/dist/atoms/index.d.ts +1 -0
- package/dist/atoms/index.js +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/IconToggleButton.js +1 -1
- package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
- package/dist/index.d.ts +5 -1
- 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.d.ts +2 -2
- package/dist/molecules/Chip/Chip.styles.js +1 -1
- package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
- package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/Dialog/Dialog.d.ts +2 -2
- package/dist/molecules/EquinorLogo/EquinorLogo.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/IconCell/IconCell.d.ts +2 -2
- package/dist/molecules/IconCell/IconCell.utils.js +1 -1
- package/dist/molecules/InfoElement/CopyText.js +1 -1
- package/dist/molecules/ListItem/ListItem.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.d.ts +2 -2
- 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 +6 -6
- 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 +3 -3
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/Select/AddTagItem.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +4 -4
- package/dist/molecules/Select/SelectMenuItem.js +1 -1
- 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/Sieve/Filter.d.ts +10 -0
- package/dist/molecules/Sieve/Filter.js +1 -0
- package/dist/molecules/Sieve/Sieve.d.ts +7 -0
- package/dist/molecules/Sieve/Sieve.js +1 -0
- package/dist/molecules/Sieve/Sieve.styles.js +43 -0
- package/dist/molecules/Sieve/Sieve.types.d.ts +28 -0
- package/dist/molecules/Sieve/Sort.js +1 -0
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/Stepper/Step/Step.js +1 -1
- package/dist/molecules/Stepper/Stepper.js +1 -1
- package/dist/molecules/Waves/Waves.js +1 -1
- package/dist/molecules/index.d.ts +3 -0
- 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/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/SideBar/MenuItem/BasicMenuItem.js +1 -1
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +1 -1
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +1 -1
- 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/Title.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/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/ReleaseNotesDialog.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +1 -1
- package/dist/organisms/TopBar/Tutorials/TutorialItem.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -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 +9 -5
|
@@ -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()},f=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()};return a(r,{children:[i(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange:f,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,11 +1,11 @@
|
|
|
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 react37 from "react";
|
|
5
5
|
import { FC } from "react";
|
|
6
6
|
import * as styled_components0 from "styled-components";
|
|
7
7
|
import { Editor } from "@tiptap/react";
|
|
8
|
-
import * as
|
|
8
|
+
import * as styled_components_dist_types5 from "styled-components/dist/types";
|
|
9
9
|
|
|
10
10
|
//#region src/molecules/RichTextEditor/MenuBar/MenuBar.d.ts
|
|
11
11
|
interface MenuBarProps extends Pick<ImageExtensionFnProps, 'onImageUpload'> {
|
|
@@ -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:
|
|
18
|
-
Bars:
|
|
19
|
-
Button:
|
|
20
|
-
Section:
|
|
17
|
+
Bar: styled_components_dist_types5.IStyledComponentBase<"web", styled_components0.FastOmit<react37.DetailedHTMLProps<react37.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
+
Bars: styled_components_dist_types5.IStyledComponentBase<"web", styled_components0.FastOmit<react37.DetailedHTMLProps<react37.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
+
Button: react37.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react37.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
Section: styled_components_dist_types5.IStyledComponentBase<"web", styled_components0.FastOmit<react37.DetailedHTMLProps<react37.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})=>o(r,{children:[a(i,{tooltip:`Add column left`,icon:e,onClick:
|
|
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})=>{let c=()=>s.chain().focus().addColumnBefore().run(),l=()=>s.chain().focus().addColumnAfter().run(),u=()=>s.chain().focus().deleteColumn().run();return o(r,{children:[a(i,{tooltip:`Add column left`,icon:e,onClick:c,disabled:!s.can().addColumnBefore()}),a(i,{tooltip:`Add column right`,icon:t,onClick:l,disabled:!s.can().addColumnAfter()}),a(i,{tooltip:`Remove column`,icon:n,onClick:u,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})=>a(n,{children:[i(r,{tooltip:`Merge selected cells`,icon:e,onClick:
|
|
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})=>{let s=()=>o.chain().focus().mergeCells().run(),c=()=>o.chain().focus().splitCell().run();return a(n,{children:[i(r,{tooltip:`Merge selected cells`,icon:e,onClick:s,disabled:!o.can().mergeCells()}),i(r,{tooltip:`Split selected cell`,icon:t,onClick:c,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})=>o(r,{children:[a(i,{tooltip:`Add row below`,icon:t,onClick:
|
|
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})=>{let c=()=>s.chain().focus().addRowAfter().run(),l=()=>s.chain().focus().addRowBefore().run(),u=()=>s.chain().focus().deleteRow().run();return o(r,{children:[a(i,{tooltip:`Add row below`,icon:t,onClick:c,disabled:!s.can().addRowAfter()}),a(i,{tooltip:`Add row above`,icon:e,onClick:l,disabled:!s.can().addRowBefore()}),a(i,{tooltip:`Remove row`,icon:n,onClick:u,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})=>a(n,{children:[i(r,{tooltip:`Toggle header row`,icon:t,onClick:
|
|
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})=>{let s=()=>o.chain().focus().toggleHeaderRow().run(),c=()=>o.chain().focus().toggleHeaderColumn().run();return a(n,{children:[i(r,{tooltip:`Toggle header row`,icon:t,onClick:s,disabled:!o.can().toggleHeaderRow()}),i(r,{tooltip:`Toggle header column`,icon:e,onClick:c,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})=>i&&!i.includes(t.TEXT_COLOR)?null:a(n,{title:`Text Color`,enterDelay:300,children:o(d,{children:[a(`input`,{type:`color`,onInput:
|
|
45
|
+
`,m=({editor:e,features:i})=>{let l=t=>{e.chain().focus().setColor(t.target.value).run()};return i&&!i.includes(t.TEXT_COLOR)?null:a(n,{title:`Text Color`,enterDelay:300,children:o(d,{children:[a(`input`,{type:`color`,onInput:l,"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){let r=n.dataTransfer?.files?.length;if(!r||e===void 0)return;let i=Array.from(n.dataTransfer.files).filter(e=>/image/i.test(e.type));if(i.length===0)return;n.preventDefault();let{schema:a}=t.state,o=t.posAtCoords({left:n.clientX,top:n.clientY});if(o)for(let n of i)e(n).then(e=>{if(!e)return;let n=a.nodes.image.create({src:e.src,alt:e.alt}),r=t.state.tr.insert(o.pos,n);t.dispatch(r)}).catch(e=>{console.error(e)})},paste(t,n){let r=n.clipboardData?.files?.length;if(!r||e===void 0)return;let i=Array.from(n.clipboardData.files).filter(e=>/image/i.test(e.type));if(i.length===0)return;n.preventDefault();let{schema:a}=t.state;for(let n of i)e(n).then(e=>{if(!e)return;let n=a.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};
|
|
@@ -4,13 +4,13 @@ import { MenuBarProps } from "./MenuBar/MenuBar.js";
|
|
|
4
4
|
import { RichTextEditor } from "./RichTextEditor.js";
|
|
5
5
|
import * as react28 from "react";
|
|
6
6
|
import * as _tiptap_react0 from "@tiptap/react";
|
|
7
|
-
import * as
|
|
7
|
+
import * as styled_components_dist_types1 from "styled-components/dist/types";
|
|
8
8
|
|
|
9
9
|
//#region src/molecules/RichTextEditor/index.d.ts
|
|
10
10
|
declare const RichText: {
|
|
11
|
-
Styling:
|
|
11
|
+
Styling: styled_components_dist_types1.IStyledComponentBase<"web", styled_components_dist_types1.Substitute<react28.DetailedHTMLProps<react28.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, EditorStylingProps>> & string;
|
|
12
12
|
Provider: react28.FC<EditorProviderProps>;
|
|
13
|
-
Content:
|
|
13
|
+
Content: styled_components_dist_types1.IStyledComponentBase<"web", styled_components_dist_types1.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> & react28.RefAttributes<HTMLDivElement>, RichTextContentProps>> & string & Omit<react28.MemoExoticComponent<react28.ForwardRefExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react28.RefAttributes<HTMLDivElement>>>, keyof react28.Component<any, {}, any>>;
|
|
14
14
|
Bar: react28.FC<MenuBarProps>;
|
|
15
15
|
};
|
|
16
16
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react45 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: react45.ForwardRefExoticComponent<SearchProps & react45.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})=>i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:
|
|
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})=>{let p=e=>{e.preventDefault(),e.key===`Enter`?u():c(e)};return i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:p,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 { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react49 from "react";
|
|
3
3
|
import "@equinor/eds-core-react";
|
|
4
4
|
import "styled-components";
|
|
5
5
|
import * as styled_components_dist_types10 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_types10.IStyledComponentBase<"web", styled_components_dist_types10.Substitute<((Omit<
|
|
14
|
+
declare const ComboBoxChip: styled_components_dist_types10.IStyledComponentBase<"web", styled_components_dist_types10.Substitute<((Omit<react49.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
15
15
|
onClick?: undefined;
|
|
16
16
|
onDelete?: undefined;
|
|
17
|
-
}) | ClickableChipProps | DeletableChipProps)) &
|
|
17
|
+
}) | ClickableChipProps | DeletableChipProps)) & react49.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types10.BaseObject, ComboBoxChipProps>> & string & Omit<react49.ForwardRefExoticComponent<(Omit<react49.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
18
18
|
onClick?: undefined;
|
|
19
19
|
onDelete?: undefined;
|
|
20
|
-
}) | ClickableChipProps | DeletableChipProps)) &
|
|
20
|
+
}) | ClickableChipProps | DeletableChipProps)) & react49.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react49.Component<any, {}, any>>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { ComboBoxChip };
|
|
@@ -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):[],I=F.includes(T.value),L=l(()=>`value`in e?_:s(T,e.values),[T,e]),R=l(()=>`value`in e?`none`:c(T,e.values),[T,e]),z=l(()=>Array(w).fill(0).map((e,t)=>m(r,{},`spacer-${e+t}`)),[w]),B=e=>{e.preventDefault(),O(T)},V=e=>{e.stopPropagation(),M(e=>!e)},H=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()},U=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:[z,m(a,{variant:`ghost_icon`,onClick:V,"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:U,onClick:B,children:A?m(A,{item:T,selectedState:R}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:L}),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:H,onItemSelect:O,parentHasNestedItems:!0,CustomMenuItemComponent:A},`child-${r}-${t.value}-${T.value}`))]}):`values`in e?h(i,{children:[z,m(o,{$depth:w,$paddedLeft:k,ref:e=>{E.current[S]=e},index:S,tabIndex:w,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:B,children:A?m(A,{item:T,selectedState:I?`selected`:`none`}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:I?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:B,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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react96 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: react96.ForwardRefExoticComponent<CheckboxProps$1 & react96.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 react100 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: react100.ForwardRefExoticComponent<RadioProps$1 & react100.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 react102 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: react102.ForwardRefExoticComponent<SwitchProps$1 & react102.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{useOutsideClick as t}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";import{Chip as n,MenuItem as r}from"./Sieve.styles.js";import{useRef as i,useState as a}from"react";import{Icon as o,Menu as s}from"@equinor/eds-core-react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{arrow_drop_right as d,checkbox as f,checkbox_outline as p,filter_list as m}from"@equinor/eds-icons";const{colors:h}=e,g=({options:e,filterValues:g,setFilterValues:_})=>{let v=i(null),[y,b]=a(null),x=i(null),S=i(null),[C,w]=a(-1),[T,E]=a(!1);t(v.current,e=>{y===null&&T&&x.current&&!x.current.contains(e.target)?E(!1):T&&y!==null&&x.current&&!x.current.contains(e.target)&&S.current&&!S.current.contains(e.target)&&(E(!1),w(-1),b(null))});let D=()=>{E(!T),w(-1),b(null)},O=(e,t)=>{C===t?(w(-1),b(null)):(w(t),b(e.currentTarget))},k=(e,t)=>{let n={...g};if(e in n&&n[e].some(e=>e.value===t.value)){let r=n[e].findIndex(e=>e.value===t.value);n[e].splice(r,1),n[e].length===0&&delete n[e]}else n[e]?n[e].push(t):n[e]=[t];Object.keys(n).flatMap(e=>n?.[e]).length===0&&(n=void 0),_(n)};return e.length===0?null:u(c,{children:[u(n,{ref:v,onClick:D,children:[`Filter by `,l(o,{data:m})]}),T&&l(s,{open:!0,ref:x,anchorEl:v.current,placement:`bottom-start`,children:l(s.Section,{title:`Filter by`,children:e.map((e,t)=>u(r,{active:C===t,onClick:e=>O(e,t),children:[e.label,l(o,{data:d,color:h.text.static_icons__tertiary.rgba})]},`filter-menu-item-${e.label}`))})}),C!==-1&&l(s,{open:!0,anchorEl:y,ref:S,placement:`right-start`,children:l(s.Section,{title:e[C].label,children:e[C]?.options.map(t=>u(r,{onClick:()=>k(e[C].label,t),children:[t.label,l(o,{data:g?.[e[C].label]?.some(e=>e.value===t.value)?f:p,color:h.interactive.primary__resting.rgba})]},`filter-option-${t.label}`))})})]})};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Container as e,FilterChip as t,Search as n,Wrapper as r}from"./Sieve.styles.js";import i from"./Filter.js";import a from"./Sort.js";import{useCallback as o,useEffect as s,useRef as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{debounce as f}from"lodash";import{useSearchParams as p}from"react-router-dom";const m=({searchPlaceholder:m,sortOptions:h,filterOptions:g,sieveValue:_,onUpdate:v,showChips:y=!0,minSearchWidth:b=`24rem`,syncWithSearchParams:x=!1,isLoadingOptions:S=!1,debounceSearchValue:C=!1,onIsTyping:w})=>{let[T,E]=l(_.searchValue??``),D=c(!1),[O,k]=p(),A=c(!1);s(()=>{if(!A.current&&x&&!S){let e=O.get(`search`)??void 0,t=g?.map(e=>e.label)??[],n={};for(let e of t){let t=g?.find(t=>t.label===e)?.options,r=JSON.parse(O.get(e.toLowerCase())??`[]`);t!==void 0&&(n[e]=t.filter(e=>r.includes(e.label)))}v({searchValue:e,filterValues:n,sortValue:_.sortValue}),A.current=!0}},[g,A,S,v,O,_.sortValue,x]);let j=c(`{}`);s(()=>{if(x&&A.current&&!S&&JSON.stringify(_)!==j.current){_.searchValue===void 0?O.delete(`search`):O.set(`search`,_.searchValue);let e=g?.map(e=>e.label)??[],t=_.filterValues;for(let n of e)t?.[n]&&t[n].length>0?O.set(n.toLowerCase(),JSON.stringify(t[n].map(e=>e.label))):O.delete(n.toLowerCase());j.current=JSON.stringify(_),k(O),v(_)}},[g,A,S,v,O,k,_,x]);let M=o((e,t)=>{let n={..._,[e]:t};v(n)},[v,_]),N=o(f((e,t)=>{M(e,t),w?.(!1),D.current=!1},800),[M,w]),P=(e,t)=>{let n={..._.filterValues},r=n[e].findIndex(e=>e.value===t.value);n[e].splice(r,1),n[e].length===0&&delete n[e],Object.keys(n).flatMap(e=>n?.[e]).length===0&&(n=void 0),M(`filterValues`,n)},F=()=>{M(`filterValues`,void 0)},I=e=>{C?(E(e.target.value),e.target.value===``?(N.cancel(),M(`searchValue`,void 0),w?.(!1),D.current=!1):(N(`searchValue`,e.target.value),D.current||=(w?.(!0),!0))):M(`searchValue`,e.target.value===``?void 0:e.target.value)};return d(r,{className:`sieve-container`,children:[d(e,{children:[u(n,{style:{minWidth:b},placeholder:m,value:C?T:_.searchValue??``,onChange:I}),h!==void 0&&u(a,{options:h,selectedOption:_.sortValue,setSelectedOption:e=>M(`sortValue`,e)}),g!==void 0&&u(i,{options:g,filterValues:_.filterValues,setFilterValues:e=>M(`filterValues`,e)})]}),y&&d(e,{children:[Object.keys(_.filterValues??{}).map(e=>_.filterValues?.[e].map(n=>u(t,{onDelete:()=>P(e,n),children:n?.label},`filter-chip-${n?.value}`))),_.filterValues&&Object.keys(_.filterValues).flatMap(e=>_.filterValues?.[e]).length>1&&u(t,{onDelete:F,children:`Remove all`})]})]})};export{m as Sieve};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Chip as n,Menu as r,Search as i}from"@equinor/eds-core-react";import a from"styled-components";const o=a.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: ${t.medium};
|
|
5
|
+
`,s=a.div`
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: ${t.medium};
|
|
8
|
+
align-items: center;
|
|
9
|
+
`,c=a(n)`
|
|
10
|
+
color: ${e.text.static_icons__default.rgba};
|
|
11
|
+
background: ${e.ui.background__light.rgba};
|
|
12
|
+
border: 1px solid ${e.ui.background__medium.rgba};
|
|
13
|
+
line-height: normal;
|
|
14
|
+
transition: background 0.15s ease-in;
|
|
15
|
+
|
|
16
|
+
svg {
|
|
17
|
+
z-index: auto;
|
|
18
|
+
fill: ${e.text.static_icons__default.rgba};
|
|
19
|
+
}
|
|
20
|
+
`,l=a(i)`
|
|
21
|
+
> div {
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
outline: none !important;
|
|
24
|
+
background: ${e.ui.background__default.rgba};
|
|
25
|
+
> input {
|
|
26
|
+
color: ${e.text.static_icons__default.rgba};
|
|
27
|
+
box-shadow: inset 0 -1px 0 0 ${e.text.static_icons__tertiary.rgba};
|
|
28
|
+
&:hover {
|
|
29
|
+
box-shadow: inset 0 -2px 0 0 ${e.text.static_icons__tertiary.rgba};
|
|
30
|
+
}
|
|
31
|
+
&:focus {
|
|
32
|
+
box-shadow: inset 0 -2px 0 0 ${e.interactive.primary__resting.rgba};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`,u=a(r.Item)`
|
|
37
|
+
outline: none !important;
|
|
38
|
+
> div {
|
|
39
|
+
grid-template-columns: 1fr auto;
|
|
40
|
+
}
|
|
41
|
+
`,d=a(n)`
|
|
42
|
+
background: none;
|
|
43
|
+
`;export{d as Chip,s as Container,c as FilterChip,u as MenuItem,l as Search,o as Wrapper};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SieveFilterGroup } from "./Filter.js";
|
|
2
|
+
|
|
3
|
+
//#region src/molecules/Sieve/Sieve.types.d.ts
|
|
4
|
+
interface SieveOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
type FilterValues = Record<string, SieveOption[]>;
|
|
9
|
+
interface SieveValue {
|
|
10
|
+
searchValue: string | undefined;
|
|
11
|
+
sortValue: SieveOption | undefined;
|
|
12
|
+
filterValues: FilterValues | undefined;
|
|
13
|
+
}
|
|
14
|
+
interface SieveProps {
|
|
15
|
+
searchPlaceholder: string;
|
|
16
|
+
sortOptions?: SieveOption[];
|
|
17
|
+
filterOptions?: SieveFilterGroup[];
|
|
18
|
+
sieveValue: SieveValue;
|
|
19
|
+
onUpdate: (value: SieveValue) => void;
|
|
20
|
+
showChips?: boolean;
|
|
21
|
+
minSearchWidth?: string;
|
|
22
|
+
syncWithSearchParams?: boolean;
|
|
23
|
+
isLoadingOptions?: boolean;
|
|
24
|
+
debounceSearchValue?: boolean;
|
|
25
|
+
onIsTyping?: (value: boolean) => void;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { type FilterValues, type SieveOption, type SieveProps, type SieveValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Chip as t,MenuItem as n}from"./Sieve.styles.js";import{useRef as r,useState as i}from"react";import{Icon as a,Menu as o}from"@equinor/eds-core-react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{radio_button_selected as u,radio_button_unselected as d,sort as f}from"@equinor/eds-icons";const p=({options:p,selectedOption:m,setSelectedOption:h})=>{let g=r(null),[_,v]=i(!1),y=()=>{v(!_)},b=()=>{v(!1)},x=e=>{h(e)};return p.length===0?null:l(s,{children:[l(t,{ref:g,onClick:y,children:[`Sort by `,c(a,{data:f})]}),_&&c(o,{open:!0,anchorEl:g.current,onClose:b,placement:`bottom-start`,children:c(o.Section,{title:`Sort by`,children:p.map(t=>l(n,{onClick:()=>x(t),children:[t.label,c(a,{data:m?.value===t.value?u:d,color:e.interactive.primary__resting.rgba})]},`sort-item-${t.value}`))})})]})};export{p as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react47 from "react";
|
|
2
2
|
import * as styled_components_dist_types8 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_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<
|
|
10
|
+
declare const SkeletonBase: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<react47.DetailedHTMLProps<react47.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
|
|
@@ -12,4 +12,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
|
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
}
|
|
14
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
|
|
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 default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import 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 from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: ${e.xx_large};
|
|
@@ -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`)}});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:
|
|
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`)}}),m=e=>{c.current=e,c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))};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:m,style:{top:p},children:a(t,{height:d,width:l,gradientColors:s})})};export{s as Waves};
|
|
@@ -29,6 +29,9 @@ import { Tab } from "./Tabs/Tabs.types.js";
|
|
|
29
29
|
import { Tabs, TabsProps } from "./Tabs/Tabs.js";
|
|
30
30
|
import { TableMenuBar, TextTable } from "./RichTextEditor/MenuBar/Table/TableBar.js";
|
|
31
31
|
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";
|
|
32
35
|
import { SingleFilterMenu, SingleFilterMenuProps } from "./SingleFilterMenu/SingleFilterMenu.js";
|
|
33
36
|
import { SkeletonBase, SkeletonBaseProps, skeletonBaseloading } from "./Skeleton/SkeletonBase/SkeletonBase.js";
|
|
34
37
|
import { SkeletonGradient, SkeletonGradientProps } from "./Skeleton/SkeletonGradient/SkeletonGradient.js";
|
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 l}from"./Chip/Chip.js";import{SkeletonBase 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 l}from"./Chip/Chip.js";import{SkeletonBase as ee,skeletonBaseloading as te}from"./Skeleton/SkeletonBase/SkeletonBase.js";import{ContentMenu as ne}from"./ContentMenu/ContentMenu.js";import{DatePicker as u}from"./DatePicker/DatePicker.js";import{DateRangePicker as d}from"./DateRangePicker/DateRangePicker.js";import{OptionalTooltip as f}from"./OptionalTooltip/OptionalTooltip.js";import{Dialog as p}from"./Dialog/Dialog.js";import{EquinorLogo as m}from"./EquinorLogo/EquinorLogo.js";import{FileProgress as h}from"./FileProgress/FileProgress.js";import{FileUploadArea as g}from"./FileUploadArea/FileUploadArea.js";import{IconCell as _}from"./IconCell/IconCell.js";import{InfoElement as v}from"./InfoElement/InfoElement.js";import{ProfileAvatar as y}from"./ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as b}from"./RichTextDisplay/RichTextDisplay.js";import{TableMenuBar as x,TextTable as S}from"./RichTextEditor/MenuBar/Table/TableBar.js";import{AmplifyBar as C,EditorMenu as w,EditorText as T}from"./RichTextEditor/MenuBar/MenuBar.js";import{RichTextEditor as E}from"./RichTextEditor/RichTextEditor.js";import{RichText as D}from"./RichTextEditor/index.js";import{Tabs as O}from"./Tabs/Tabs.js";import{Search as re}from"./Search/Search.js";import{Sieve as k}from"./Sieve/Sieve.js";import{SingleFilterMenu as A}from"./SingleFilterMenu/SingleFilterMenu.js";import{SkeletonGradient as j}from"./Skeleton/SkeletonGradient/SkeletonGradient.js";import{Stepper as M}from"./Stepper/Stepper.js";import{OptionDrawer as N}from"./OptionDrawer/OptionDrawer.js";import{ComboBoxChip as P}from"./Select/Select.styles.js";import{ComboBox as F}from"./Select/ComboBox/ComboBox.js";import{SingleSelect as I}from"./Select/SingleSelect/SingleSelect.js";import{FeedBackIcon as L}from"./FeedBackIcon/FeedBackIcon.js";import{ListItem as R}from"./ListItem/ListItem.js";import{Checkbox as z}from"./SelectionControls/Checkbox/Checkbox.js";import{Radio as B}from"./SelectionControls/Radio/Radio.js";import{Switch as V}from"./SelectionControls/Switch/Switch.js";import{Waves as H}from"./Waves/Waves.js";import{Accordion as U,Breadcrumbs as W,CircularProgress as G,Dialog as K,Divider as q,DotProgress as J,Icon as Y,LinearProgress as X,Menu as Z,TextField as Q,Typography as $}from"@equinor/eds-core-react";export{U as Accordion,W as Breadcrumbs,G as CircularProgress,q as Divider,J as DotProgress,K as EDSDialog,Y as Icon,X as LinearProgress,Z as Menu,Q as TextField,$ 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{useSearchParameter as n}from"../../../atoms/hooks/useSearchParameter.js";import{Question as r}from"./Question.js";import{useMemo as i}from"react";import{Typography as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.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:o
|
|
9
|
+
`,u=({categoryName:e,faqs:o})=>{let[u]=n({key:`search`}),[d]=n({key:`category`}),f=i(()=>o.toSorted((e,t)=>{let n=e.orderBy??0,r=t.orderBy??0;return n-r}),[o]),p=i(()=>u?f.filter(t=>t.question.toLowerCase().includes(u.toLowerCase())||t.answer.toLowerCase().includes(u.toLowerCase())||e.toLowerCase().includes(u.toLowerCase())):f,[e,u,f]);return d!==void 0&&p.length===0?s(l,{children:c(t,{center:!1,children:[s(t.Title,{title:`No Questions Found`}),s(t.Description,{text:`No questions or answers matches your search in this category`})]})}):p.length===0?null:c(l,{children:[s(a,{variant:`h4`,children:e}),p.map(e=>s(r,{...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),y=()=>u(e=>!e);return f(v,{onClick:y,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{useSearchParameter as t}from"../../atoms/hooks/useSearchParameter.js";import{useFaqsInApplication as n}from"../../atoms/hooks/useFaqsInApplication.js";import{Container as r}from"./Faq.styles.js";import{Header as i}from"./Header.js";import{Category as a}from"./Category/Category.js";import{CategorySkeleton as o}from"./CategorySkeleton.js";import{useMemo 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}=n(),[m]=t({key:`category`}),h=s(()=>{if(!f)return;if(!m)return f;let e=f.find(e=>e.id==Number(m));return[e]},[f,m]);return d(r,{children:[u(c,{variant:`h1`,bold:!0,children:`FAQ`}),u(i,{}),h&&h.length>0?h.map(e=>u(a,{...e},e.id)):p?d(l,{children:[u(o,{}),u(o,{}),u(o,{})]}):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{useSearchParameter as n}from"../../atoms/hooks/useSearchParameter.js";import{useFaqsInApplication as r}from"../../atoms/hooks/useFaqsInApplication.js";import{Tabs as i}from"../../molecules/Tabs/Tabs.js";import{useMemo as a}from"react";import{Search as o}from"@equinor/eds-core-react";import s from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=s.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
|
-
`,d=(
|
|
14
|
+
`,d=()=>{let{data:e}=r(),[t,s]=n({key:`category`}),[d,f]=n({key:`search`}),p=a(()=>e?[{value:`all`,label:`All categories`},...e.map(e=>({value:e.id.toString(),label:e.categoryName}))]:[{value:`all`,label:`All categories`}],[e]),m=e=>{f(e.target.value)},h=e=>{s(e===`all`?void 0:e)};return l(u,{children:[c(i,{style:{maxWidth:`100%`,width:`fit-content`},selected:t??`all`,onChange:h,options:p}),c(o,{value:d,onChange:m,placeholder:`Search for answer by keyword`})]})};export{d 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(``);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:
|
|
14
|
+
`,m=({setField:e,fields:c,isLoading:d,onChangedField:m,finishedText:h,showAccessITLink:g=!0,itemNameSingular:_=`field`})=>{let[v,y]=s(!1),b=o(``),x=t=>{t.name&&t.uuid&&(e({uuid:t.uuid,name:t.name,country:t.country??``}),b.current=t.name,y(!0))};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:x,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);return a(r,{children:[i(`button`,{ref:d,onClick:
|
|
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),f=()=>{u(!l),o?.(!l)},p=()=>{u(!1),o?.(!1)};return a(r,{children:[i(`button`,{ref:d,onClick:f,children:c}),l&&i(n,{open:!0,anchorEl:d.current,onClose:p,children:s})]})};export{o as ButtonWithMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react8 from "react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ReleaseNote } from "@equinor/subsurface-app-management";
|
|
4
4
|
|
|
@@ -7,9 +7,9 @@ type ReleaseNoteProps = {
|
|
|
7
7
|
actionMenu?: ReactNode;
|
|
8
8
|
expanded?: boolean;
|
|
9
9
|
} & ReleaseNote;
|
|
10
|
-
declare const ReleaseNote$1:
|
|
10
|
+
declare const ReleaseNote$1: react8.ForwardRefExoticComponent<{
|
|
11
11
|
actionMenu?: ReactNode;
|
|
12
12
|
expanded?: boolean;
|
|
13
|
-
} & ReleaseNote &
|
|
13
|
+
} & ReleaseNote & react8.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { ReleaseNote$1 as ReleaseNote, ReleaseNoteProps };
|
|
@@ -24,4 +24,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
24
24
|
display: flex;
|
|
25
25
|
gap: ${t.medium};
|
|
26
26
|
align-items: center;
|
|
27
|
-
`,C=d(({applicationName:n,releaseDate:d,createdDate:h,tags:C,version:w,title:T,body:E,actionMenu:D,expanded:O=!1},k)=>{let A=o({releaseDate:d,createdDate:h}),j=f(O?`auto`:c),[M,N]=p(O),[P,F]=p(i(E).length>0),I=f(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>c&&F(!0)}));return _(b,{ref:k,style:{paddingBottom:M?t.medium:void 0},children:[_(x,{children:[_(S,{children:[g(m,{variant:`caption`,color:e.text.static_icons__secondary.rgba,children:n}),_(m,{variant:`overline`,color:e.text.static_icons__tertiary.rgba,children:[r(A),w?` ・ ${w}`:``,` ・ `,a(E)]})]}),g(u,{tags:C,children:D})]}),g(m,{variant:`h4`,children:T}),g(v.div,{ref:
|
|
27
|
+
`,C=d(({applicationName:n,releaseDate:d,createdDate:h,tags:C,version:w,title:T,body:E,actionMenu:D,expanded:O=!1},k)=>{let A=o({releaseDate:d,createdDate:h}),j=f(O?`auto`:c),[M,N]=p(O),[P,F]=p(i(E).length>0),I=f(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>c&&F(!0)})),L=()=>{N(e=>!e)},R=e=>{e&&I.current.observe(e)};return _(b,{ref:k,style:{paddingBottom:M?t.medium:void 0},children:[_(x,{children:[_(S,{children:[g(m,{variant:`caption`,color:e.text.static_icons__secondary.rgba,children:n}),_(m,{variant:`overline`,color:e.text.static_icons__tertiary.rgba,children:[r(A),w?` ・ ${w}`:``,` ・ `,a(E)]})]}),g(u,{tags:C,children:D})]}),g(m,{variant:`h4`,children:T}),g(v.div,{ref:R,initial:{height:j.current},animate:{height:M?`auto`:c},style:{overflow:M?`auto`:void 0},children:g(s,{value:E,onImageRead:y.getReleaseNoteImage,padding:`none`})}),P&&!O&&g(l,{expanded:M,onToggleExpanded:L})]})});C.displayName=`ReleaseNote`;export{C as ReleaseNote};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){let t=e.split(/\s/g).length
|
|
1
|
+
function e(e){let t=e.split(/\s/g).length,n=Math.ceil(t/238);return`${n} min read`}function t(e){return e.releaseDate??e.createdDate}export{e as timeToRead,t as usingReleaseNoteDate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSideBar as e}from"../../../providers/SideBarProvider.js";import{OptionalTooltip as t}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as n,ItemText as r,Link as i,MenuItemWrapper as a}from"./MenuItem.styles.js";import{canNavigate as o,isCurrentUrl as s}from"./MenuItem.utils.js";import{useCallback as c,useMemo as l}from"react";import{Icon as u}from"@equinor/eds-core-react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{
|
|
1
|
+
import{useSideBar as e}from"../../../providers/SideBarProvider.js";import{OptionalTooltip as t}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as n,ItemText as r,Link as i,MenuItemWrapper as a}from"./MenuItem.styles.js";import{canNavigate as o,isCurrentUrl as s}from"./MenuItem.utils.js";import{useCallback as c,useMemo as l}from"react";import{Icon as u}from"@equinor/eds-core-react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{Feature as p}from"@equinor/subsurface-app-management";import{useLocation as m}from"react-router-dom";const h=({icon:h,link:g,onClick:_,replace:v=!1,name:y,disabled:b=!1,featureUuid:x,...S})=>{let{pathname:C}=m(),w=s({currentUrl:C,link:g}),{isOpen:T}=e(),E=o({currentUrl:C,link:g,replace:v,disabled:b}),D=c(e=>{if(!E){e.preventDefault();return}_&&_()},[E,_]),O=l(()=>d(t,{title:y,placement:`right`,children:d(a,{children:f(i,{to:g,$active:w,"aria-disabled":b,$disabled:b,onClick:D,tabIndex:0,$open:!0,"data-testid":`sidebar-menu-item`,replace:v,...S,children:[d(n,{"data-testid":`icon-container`,children:d(u,{data:h,size:24})}),T&&d(r,{$active:w,$disabled:b,variant:`button`,group:`navigation`,children:y})]})})}),[b,D,h,w,T,g,y,S,v]);return x?d(p,{featureUuid:x,children:O}):O};export{h as BasicMenuItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{useSideBar as n}from"../../../providers/SideBarProvider.js";import{usePrevious as r}from"../../../atoms/hooks/usePrevious.js";import{OptionalTooltip as i}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as a,ItemText as o,Link as s,MenuItemWrapper as c}from"./MenuItem.styles.js";import{isCurrentUrl as l}from"./MenuItem.utils.js";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{Icon as m,Menu as h}from"@equinor/eds-core-react";import g,{css as _}from"styled-components";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{chevron_down as x,chevron_up as S}from"@equinor/eds-icons";import{Link as C,useLocation as w}from"
|
|
1
|
+
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{useSideBar as n}from"../../../providers/SideBarProvider.js";import{usePrevious as r}from"../../../atoms/hooks/usePrevious.js";import{OptionalTooltip as i}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as a,ItemText as o,Link as s,MenuItemWrapper as c}from"./MenuItem.styles.js";import{isCurrentUrl as l}from"./MenuItem.utils.js";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{Icon as m,Menu as h}from"@equinor/eds-core-react";import g,{css as _}from"styled-components";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{chevron_down as x,chevron_up as S}from"@equinor/eds-icons";import{Link as C,useLocation as w}from"react-router-dom";const T=g.button`
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
display: grid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{Typography as n}from"@equinor/eds-core-react";import r from"styled-components";import{Link as i}from"
|
|
1
|
+
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{Typography as n}from"@equinor/eds-core-react";import r from"styled-components";import{Link as i}from"react-router-dom";const a=r.span`
|
|
2
2
|
width: 100%;
|
|
3
3
|
`,o=r(i)`
|
|
4
4
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=({currentUrl:e,link:t})=>e.includes(t)&&t!==`/`||t===e,t=({currentUrl:e,link:t})=>e.split(`?`)[0]===t,n=({currentUrl:n,link:r,disabled:i,replace:a})=>{let o=e({currentUrl:n,link:r}),s=t({currentUrl:n,link:r});return!i&&(!o||o&&!s&&a)};export{n as canNavigate,e as isCurrentUrl};
|
|
1
|
+
const e=({currentUrl:e,link:t})=>{let n=e.includes(t);return n&&t!==`/`||t===e},t=({currentUrl:e,link:t})=>{let n=e.split(`?`)[0];return n===t},n=({currentUrl:n,link:r,disabled:i,replace:a})=>{let o=e({currentUrl:n,link:r}),s=t({currentUrl:n,link:r});return!i&&(!o||o&&!s&&a)};export{n as canNavigate,e as isCurrentUrl};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react135 from "react";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/SideBar/SideBar.d.ts
|
|
@@ -16,6 +16,6 @@ interface SideBarWithCreate extends SideBarProps {
|
|
|
16
16
|
createDisabled?: boolean;
|
|
17
17
|
createActive?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare const SideBar:
|
|
19
|
+
declare const SideBar: react135.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react135.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SideBar };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react104 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Action.d.ts
|
|
4
4
|
interface ActionProps {
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
buttonText?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const Action:
|
|
8
|
+
declare const Action: react104.ForwardRefExoticComponent<ActionProps & react104.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Action };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react106 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Description.d.ts
|
|
4
4
|
interface DescriptionProps {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Description:
|
|
7
|
+
declare const Description: react106.ForwardRefExoticComponent<DescriptionProps & react106.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Description };
|