@equinor/amplify-component-lib 10.2.0 → 10.4.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.d.ts +23 -1
- package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
- package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/index.d.ts +1 -0
- package/dist/atoms/index.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +1 -1
- package/dist/deprecated/IconToggleButton.d.ts +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/molecules/Chip/Chip.d.ts +2 -2
- 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/IconCell/IconCell.d.ts +2 -2
- package/dist/molecules/ListItem/ListItem.d.ts +2 -2
- package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +2 -2
- package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
- package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +5 -5
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/Select.styles.d.ts +4 -4
- package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.js +3 -4
- package/dist/molecules/TableHeader/TableHeader.d.ts +32 -0
- package/dist/molecules/TableHeader/TableHeader.js +1 -0
- package/dist/molecules/TableHeader/TableHeader.styles.js +48 -0
- package/dist/molecules/TableHeader/TableHeader.utils.js +1 -0
- package/dist/molecules/Tabs/Tab.styles.js +1 -1
- package/dist/molecules/Toast/Toast.d.ts +30 -0
- package/dist/molecules/Toast/Toast.js +1 -0
- package/dist/molecules/Toast/Toast.styles.js +117 -0
- package/dist/molecules/Toast/Toast.utils.js +1 -0
- package/dist/molecules/Waves/Waves.styles.js +1 -1
- package/dist/molecules/index.d.ts +2 -0
- package/dist/molecules/index.js +1 -1
- package/dist/organisms/Faq/AppPageWrapper.js +8 -0
- package/dist/organisms/Faq/Category/Category.js +1 -9
- package/dist/organisms/Faq/Category/Category.styles.js +14 -0
- package/dist/organisms/Faq/Category/CategorySkeleton.js +17 -0
- package/dist/organisms/Faq/Category/Question/Question.js +1 -0
- package/dist/organisms/Faq/Category/Question/Question.styles.js +64 -0
- package/dist/organisms/Faq/Category/Subcategory.js +34 -0
- package/dist/organisms/Faq/Faq.d.ts +5 -1
- package/dist/organisms/Faq/Faq.js +20 -1
- package/dist/organisms/Faq/Faq.utils.js +1 -0
- package/dist/organisms/Faq/Search.js +5 -0
- package/dist/organisms/Filter/Filter.d.ts +2 -2
- package/dist/organisms/Filter/Filter.js +1 -1
- package/dist/organisms/Filter/Filter.styles.js +1 -1
- 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/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/Illustration.js +1 -1
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- package/dist/organisms/Status/Title.d.ts +2 -2
- package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
- package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
- package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
- package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
- package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
- package/dist/organisms/TableOfContents/TableOfContents.styles.js +1 -3
- package/dist/organisms/TableOfContents/TableOfContentsItem.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/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -3
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
- package/dist/organisms/TopBar/TopBar.d.ts +0 -2
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBarInternalContextProvider.js +1 -0
- package/dist/providers/ToastProvider/ToastProvider.d.ts +15 -0
- package/dist/providers/ToastProvider/ToastProvider.js +8 -0
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.js +1 -1
- package/package.json +11 -11
- package/dist/organisms/Faq/Category/Question.js +0 -22
- package/dist/organisms/Faq/CategorySkeleton.js +0 -29
- package/dist/organisms/Faq/Faq.styles.js +0 -8
- package/dist/organisms/Faq/Header.js +0 -14
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{getButtonHoverColor as t,getHoverColor as n}from"./TableHeader.utils.js";import r,{css as i}from"styled-components";const a=r.th``,o=r.span`
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: ${e.small};
|
|
4
|
+
margin-left: auto;
|
|
5
|
+
`,s=r.span`
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: ${e.small};
|
|
8
|
+
padding: ${e.small};
|
|
9
|
+
align-items: center;
|
|
10
|
+
> ${o} > button {
|
|
11
|
+
margin-left: auto;
|
|
12
|
+
}
|
|
13
|
+
> ${o} > button:hover {
|
|
14
|
+
background: none;
|
|
15
|
+
&:before {
|
|
16
|
+
content: '';
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
position: absolute;
|
|
20
|
+
left: 0;
|
|
21
|
+
opacity: 0.15;
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
background: ${({$variant:e})=>t({variant:e})};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
${({$hasOnClick:e,$hasOnSort:r,$variant:a})=>!e&&!r?``:e?i`
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
&:hover {
|
|
29
|
+
background: ${n({variant:a})};
|
|
30
|
+
}
|
|
31
|
+
`:i`
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
&:hover:not(:has(> ${o} > button:hover)) {
|
|
34
|
+
> ${o} > button.sort-button {
|
|
35
|
+
&:before {
|
|
36
|
+
content: '';
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
position: absolute;
|
|
40
|
+
left: 0;
|
|
41
|
+
opacity: 0.15;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background: ${t({variant:a})};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`}
|
|
48
|
+
`;export{o as ActionsWrapper,s as Container,a as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{arrow_down as t,arrow_up as n,error_outlined as r,warning_outlined as i}from"@equinor/eds-icons";function a(e){if(e.leadingIcon)return e.leadingIcon;switch(e.variant){case`warning`:return i;case`error`:return r}}function o(t){switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba}return t.onClick?e.interactive.primary__resting.rgba:e.text.static_icons__tertiary.rgba}function s(t){switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba}return e.interactive.primary__resting.rgba}function c(e){switch(e){case`asc`:return n;case`desc`:return t}}function l(t){if(t.onClick)switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba;default:return e.interactive.primary__resting.rgba}return e.text.static_icons__default.rgba}function u(t){switch(t.variant){case`warning`:return e.interactive.warning__highlight.rgba;case`error`:return e.interactive.danger__highlight.rgba;default:return e.interactive.primary__hover_alt.rgba}}function d(t){switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba;default:return e.interactive.primary__hover.rgba}}export{s as getActionIconColor,d as getButtonHoverColor,u as getHoverColor,a as getLeadingIcon,o as getLeadingIconColor,c as getSortingIcon,l as getTextColor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{shape as n}from"../../atoms/style/index.js";import r from"styled-components";import{motion as i}from"
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{shape as n}from"../../atoms/style/index.js";import r from"styled-components";import{motion as i}from"motion/react";const a=r.button`
|
|
2
2
|
position: relative;
|
|
3
3
|
padding: ${t.medium};
|
|
4
4
|
display: flex;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC, RefObject } from "react";
|
|
2
|
+
import { IconData } from "@equinor/eds-icons";
|
|
3
|
+
|
|
4
|
+
//#region src/molecules/Toast/Toast.d.ts
|
|
5
|
+
interface ToastProps {
|
|
6
|
+
title: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
icon?: IconData;
|
|
9
|
+
variant?: 'neutral' | 'info' | 'warning' | 'error' | 'success';
|
|
10
|
+
description?: string;
|
|
11
|
+
action?: {
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
duration?: number;
|
|
16
|
+
ref?: RefObject<HTMLDivElement>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @param title - Title of the Toast
|
|
20
|
+
* @param onClose - Called when the Toast is closed either by the duration or by the close button
|
|
21
|
+
* @param icon - Icon in header, has defaults when using variants
|
|
22
|
+
* @param variant - Neutral/Info/Warning/Error/Success
|
|
23
|
+
* @param description - Description text
|
|
24
|
+
* @param action - Action button
|
|
25
|
+
* @param duration - Duration in seconds, if no duration is set it is persistent
|
|
26
|
+
* @param ref - Ref to the Toast container
|
|
27
|
+
*/
|
|
28
|
+
declare const Toast: FC<ToastProps>;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Toast, ToastProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{getHeaderIcon as n}from"./Toast.utils.js";import{Container as r,DurationBar as i,Header as a}from"./Toast.styles.js";import{useEffect as o}from"react";import{Icon as s,Typography as c}from"@equinor/eds-core-react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{close as d}from"@equinor/eds-icons";const f=({title:f,icon:p,onClose:m,variant:h,description:g,action:_,duration:v,ref:y})=>{if(v!==void 0&&v<=0)throw Error(`Duration must be a positive number`);o(()=>{if(!v)return;let e=setTimeout(()=>{m()},v*1e3);return()=>clearTimeout(e)},[v,m]);let b=()=>{_?.onClick(),m()},x=n({icon:p,variant:h});return u(r,{ref:y,$variant:h,children:[u(a,{children:[x&&l(s,{data:x}),l(c,{variant:`h6`,color:e.text.static_icons__default.rgba,children:f}),l(t,{variant:`ghost_icon`,onClick:m,children:l(s,{data:d})})]}),g&&l(c,{variant:`body_long`,color:e.text.static_icons__secondary.rgba,children:g}),_&&l(t,{variant:`outlined`,onClick:b,children:_.text}),v&&l(i,{role:`progressbar`,$variant:h,$duration:v})]})};export{f as Toast};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{shape as t}from"../../atoms/style/index.js";import{TOAST_COLORS as n}from"./Toast.utils.js";import r,{css as i,keyframes as a}from"styled-components";const o=r.header`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4
|
+
gap: ${e.small};
|
|
5
|
+
padding-right: 40px;
|
|
6
|
+
> h6 {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
}
|
|
10
|
+
&:has(> svg:first-child) {
|
|
11
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
12
|
+
}
|
|
13
|
+
> button {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: ${e.x_small};
|
|
16
|
+
right: ${e.x_small};
|
|
17
|
+
}
|
|
18
|
+
`,s=r.div`
|
|
19
|
+
position: relative;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: ${e.small};
|
|
23
|
+
border-radius: ${t.corners.borderRadius};
|
|
24
|
+
padding: ${e.medium_small} ${e.x_small} ${e.medium_small}
|
|
25
|
+
${e.medium_small};
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
min-width: 300px;
|
|
28
|
+
max-width: 420px;
|
|
29
|
+
> p,
|
|
30
|
+
> button {
|
|
31
|
+
margin: 0 ${e.small};
|
|
32
|
+
}
|
|
33
|
+
> p {
|
|
34
|
+
margin-right: ${e.medium};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
${({$variant:e})=>{let t=n[e??`neutral`];return i`
|
|
38
|
+
background: ${t.background};
|
|
39
|
+
|
|
40
|
+
> button {
|
|
41
|
+
margin-right: auto;
|
|
42
|
+
color: ${t.icon};
|
|
43
|
+
border-color: ${t.icon};
|
|
44
|
+
&:hover {
|
|
45
|
+
background: none;
|
|
46
|
+
color: ${t.actionHover};
|
|
47
|
+
border-color: ${t.actionHover};
|
|
48
|
+
&:before {
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: 0;
|
|
51
|
+
content: '';
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
background: ${t.icon};
|
|
55
|
+
opacity: 0.15;
|
|
56
|
+
overflow: visible;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
> ${o} {
|
|
62
|
+
> svg:first-child {
|
|
63
|
+
color: ${t.icon};
|
|
64
|
+
}
|
|
65
|
+
> button {
|
|
66
|
+
svg {
|
|
67
|
+
color: ${t.close};
|
|
68
|
+
}
|
|
69
|
+
&:hover {
|
|
70
|
+
background: none;
|
|
71
|
+
&:before {
|
|
72
|
+
position: absolute;
|
|
73
|
+
left: 0;
|
|
74
|
+
content: '';
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
background: ${t.close};
|
|
78
|
+
opacity: 0.15;
|
|
79
|
+
border-radius: 50%;
|
|
80
|
+
overflow: visible;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`}}
|
|
86
|
+
`,c=a`
|
|
87
|
+
from {
|
|
88
|
+
width: 100%
|
|
89
|
+
}
|
|
90
|
+
to {
|
|
91
|
+
width: 0
|
|
92
|
+
}
|
|
93
|
+
`,l=r.span`
|
|
94
|
+
background: white;
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 2px;
|
|
97
|
+
position: absolute;
|
|
98
|
+
bottom: 0;
|
|
99
|
+
left: 0;
|
|
100
|
+
&:after {
|
|
101
|
+
content: '';
|
|
102
|
+
position: absolute;
|
|
103
|
+
width: inherit;
|
|
104
|
+
height: inherit;
|
|
105
|
+
background: ${({$variant:e})=>n[e??`neutral`].background};
|
|
106
|
+
opacity: 0.5;
|
|
107
|
+
}
|
|
108
|
+
&:before {
|
|
109
|
+
content: '';
|
|
110
|
+
position: absolute;
|
|
111
|
+
width: inherit;
|
|
112
|
+
height: inherit;
|
|
113
|
+
background: ${({$variant:e})=>n[e??`neutral`].duration};
|
|
114
|
+
animation: ${c} ${({$duration:e})=>e}s linear;
|
|
115
|
+
animation-fill-mode: forwards;
|
|
116
|
+
}
|
|
117
|
+
`;export{s as Container,l as DurationBar,o as Header};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{check_circle_outlined as t,error_outlined as n,info_circle as r,warning_outlined as i}from"@equinor/eds-icons";function a({icon:e,variant:a}){if(e)return e;switch(a){case`info`:return r;case`warning`:return i;case`error`:return n;case`success`:return t;default:return}}const o={neutral:{background:e.ui.background__light.rgba,icon:e.text.static_icons__default.rgba,close:e.interactive.secondary__resting.rgba,actionHover:e.interactive.secondary__resting.rgba,duration:e.interactive.secondary__resting.rgba},info:{background:e.ui.background__info.rgba,icon:e.text.static_icons__default.rgba,close:e.interactive.secondary__resting.rgba,actionHover:e.interactive.secondary__resting.rgba,duration:e.interactive.secondary__resting.rgba},warning:{background:e.ui.background__warning.rgba,icon:e.interactive.warning__text.rgba,close:e.interactive.warning__text.rgba,actionHover:e.interactive.warning__hover.rgba,duration:e.interactive.warning__resting.rgba},error:{background:e.ui.background__danger.rgba,icon:e.interactive.danger__text.rgba,close:e.interactive.danger__text.rgba,actionHover:e.interactive.danger__hover.rgba,duration:e.interactive.danger__resting.rgba},success:{background:e.interactive.success__highlight.rgba,icon:e.interactive.success__text.rgba,close:e.interactive.success__text.rgba,actionHover:e.interactive.success__hover.rgba,duration:e.interactive.success__resting.rgba}};export{o as TOAST_COLORS,a as getHeaderIcon};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Toast, ToastProps } from "./Toast/Toast.js";
|
|
1
2
|
import { DEFAULT_FEATURES, EditorPanel, ImageExtensionFnProps, RichTextEditorFeatures } from "./RichTextEditor/RichTextEditor.types.js";
|
|
2
3
|
import { AmplifyKit } from "./RichTextEditor/custom-extensions/AmplifyKit.js";
|
|
3
4
|
import { SelectOption, SelectOptionRequired } from "./Select/Select.types.js";
|
|
@@ -36,6 +37,7 @@ import { OptionDrawerSelectItem } from "./OptionDrawer/OptionDrawer.types.js";
|
|
|
36
37
|
import { ComboBox, GroupedComboBoxProps, ListComboBoxProps } from "./Select/ComboBox/ComboBox.js";
|
|
37
38
|
import { ComboBoxChip } from "./Select/Select.styles.js";
|
|
38
39
|
import { GroupedSingleSelectProps, ListSingleSelectProps, SingleSelect } from "./Select/SingleSelect/SingleSelect.js";
|
|
40
|
+
import { TableHeader, TableHeaderProps } from "./TableHeader/TableHeader.js";
|
|
39
41
|
import { TextField as TextField$1, TextFieldProps as TextFieldProps$1 } from "./TextField/TextField.js";
|
|
40
42
|
import { FeedBackIcon, FeedBackIconProps } from "./FeedBackIcon/FeedBackIcon.js";
|
|
41
43
|
import { ListItem, ListItemProps } from "./ListItem/ListItem.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{
|
|
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{Button as i}from"./Button/Button.js";import{Toast as a}from"./Toast/Toast.js";import{AnimatedCheckmark as o}from"./AnimatedCheckmark/AnimatedCheckmark.js";import{ApplicationIcon as ee}from"./ApplicationIcon/ApplicationIcon.js";import{Badge as te}from"./Badge/Badge.js";import{Banner as ne}from"./Banner/Banner.js";import{Chip as re}from"./Chip/Chip.js";import{SkeletonBase as ie,skeletonBaseloading as s}from"./Skeleton/SkeletonBase/SkeletonBase.js";import{DatePicker as c}from"./DatePicker/DatePicker.js";import{DateRangePicker as l}from"./DateRangePicker/DateRangePicker.js";import{OptionalTooltip as u}from"./OptionalTooltip/OptionalTooltip.js";import{Dialog as d}from"./Dialog/Dialog.js";import{EquinorLogo as f}from"./EquinorLogo/EquinorLogo.js";import{FileProgress as p}from"./FileProgress/FileProgress.js";import{FileUploadArea as m}from"./FileUploadArea/FileUploadArea.js";import{IconCellColors as h,IconCellStates as g,IconCellVariants as _}from"./IconCell/IconCell.types.js";import{IconCell as v}from"./IconCell/IconCell.js";import{InfoElement as y}from"./InfoElement/InfoElement.js";import{ProfileAvatar as b}from"./ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as x}from"./RichTextDisplay/RichTextDisplay.js";import{TableMenuBar as S,TextTable as C}from"./RichTextEditor/MenuBar/Table/TableBar.js";import{TextField as w}from"./TextField/TextField.js";import{AmplifyBar as T,EditorMenu as E,EditorText as D}from"./RichTextEditor/MenuBar/MenuBar.js";import{RichTextEditor as O}from"./RichTextEditor/RichTextEditor.js";import{RichText as k}from"./RichTextEditor/index.js";import{Tabs as ae}from"./Tabs/Tabs.js";import{Search as A}from"./Search/Search.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{TableHeader as L}from"./TableHeader/TableHeader.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};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{spacings as e}from"../../atoms/style/spacings.js";import{styled as t}from"styled-components";import{jsx as n}from"react/jsx-runtime";const r=t.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: fit-content;
|
|
6
|
+
margin: 0 auto ${e.large};
|
|
7
|
+
max-width: 1280px;
|
|
8
|
+
`,i=({children:e,style:t})=>n(r,{style:t,children:e});export{i as AppPageWrapper};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: ${e.medium};
|
|
5
|
-
width: 100%;
|
|
6
|
-
&:has(> div > div > svg) {
|
|
7
|
-
transform: translateY(50%);
|
|
8
|
-
}
|
|
9
|
-
`,u=({categoryName:e,faqs:a,selectedTab:u})=>{let{search:d}=c({strict:!1}),f=r(()=>a.toSorted((e,t)=>(e.orderBy??0)-(t.orderBy??0)),[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};
|
|
1
|
+
import{Typography as e}from"../../../molecules/index.js";import{Question as t}from"./Question/Question.js";import{Container as n,Content as r,Header as i}from"./Category.styles.js";import{Subcategory as a}from"./Subcategory.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=({faqs:c,id:l,categoryName:u,subCategories:d})=>s(n,{children:[o(i,{id:`category-${l}`,children:o(e,{variant:`h4`,children:u})}),s(r,{children:[c?.map(e=>o(t,{...e},e.id)),d?.map(e=>o(a,{...e},e.id))]})]});export{c as Category};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{spacings as e}from"../../../atoms/style/spacings.js";import{HEADER_HEIGHT as t}from"../Faq.utils.js";import n from"styled-components";const r=n.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
margin-top: ${e.large};
|
|
5
|
+
gap: ${e.medium};
|
|
6
|
+
`,i=n.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
`,a=n.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
gap: ${e.small};
|
|
12
|
+
align-items: center;
|
|
13
|
+
scroll-margin-top: ${t}px;
|
|
14
|
+
`;export{r as Container,i as Content,a as Header};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{shape as e}from"../../../atoms/style/index.js";import{SkeletonBase as t}from"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import{Container as n,Header as r,TopRight as i,Wrapper as a}from"./Question/Question.styles.js";import{Container as o,Content as s}from"./Category.styles.js";import c from"styled-components";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=c(t)`
|
|
2
|
+
width: 20rem;
|
|
3
|
+
height: 1.6em;
|
|
4
|
+
border-radius: ${e.corners.borderRadius};
|
|
5
|
+
`,f=c(t)`
|
|
6
|
+
width: 10rem;
|
|
7
|
+
height: 1.25rem;
|
|
8
|
+
border-radius: ${e.corners.borderRadius};
|
|
9
|
+
`,p=c(t)`
|
|
10
|
+
width: 8rem;
|
|
11
|
+
height: 0.875rem;
|
|
12
|
+
border-radius: ${e.corners.borderRadius};
|
|
13
|
+
`,m=c(t)`
|
|
14
|
+
width: 1.5rem;
|
|
15
|
+
height: 1.5rem;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
`,h=()=>u(o,{"aria-label":`Loading FAQ category`,children:[l(d,{}),l(s,{children:Array.from({length:4}).fill(null).map((e,t)=>l(a,{children:u(n,{children:[l(r,{children:l(f,{})}),u(i,{children:[l(p,{}),l(m,{})]})]})},`question-card-${t.toString()}`))})]});export{h as CategorySkeleton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatDate as e}from"../../../../atoms/utils/date.js";import{usePrefetchRichTextImages as t}from"../../../../atoms/hooks/usePrefetchRichTextImages.js";import{RichTextDisplay as n}from"../../../../molecules/RichTextDisplay/RichTextDisplay.js";import{Container as r,ExpandWrapper as i,Header as a,TopRight as o,Wrapper as s}from"./Question.styles.js";import{useState as c}from"react";import{Button as l,Icon as u,Typography as d}from"@equinor/eds-core-react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{chevron_down as m,chevron_up as h}from"@equinor/eds-icons";import{AnimatePresence as g}from"motion/react";import{FaqService as _}from"@equinor/subsurface-app-management";const v=({id:v,question:y,createdDate:b,answer:x})=>{t({richTextValues:x?[x]:[],onImageRead:e=>_.getFaqImage(e)});let[S,C]=c(!1);return f(s,{children:p(r,{children:[f(a,{id:`faq-${v}`,children:f(d,{variant:`h4`,children:y})}),p(o,{children:[f(d,{group:`paragraph`,variant:`caption`,children:e(b)}),f(l,{variant:`ghost_icon`,onClick:()=>{C(e=>!e)},"data-testid":`toggle-open`,"aria-label":S?`Collapse answer to: ${y}`:`Expand answer to: ${y}`,children:f(u,{data:S?h:m})})]}),f(g,{children:S&&f(i,{initial:{height:0},exit:{height:0},animate:{height:`auto`},children:f(n,{value:x,onImageRead:e=>_.getFaqImage(e),padding:`none`})})})]})})};export{v as Question};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{colors as e}from"../../../../atoms/style/colors.js";import{spacings as t}from"../../../../atoms/style/spacings.js";import{shape as n}from"../../../../atoms/style/index.js";import{HEADER_HEIGHT as r}from"../../Faq.utils.js";import{styled as i}from"styled-components";import{motion as a}from"motion/react";const o=i.div`
|
|
2
|
+
flex-grow: 1;
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: 1fr auto;
|
|
5
|
+
align-items: center;
|
|
6
|
+
column-gap: ${t.medium};
|
|
7
|
+
padding: 0 ${t.medium};
|
|
8
|
+
`,s=i.div`
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
background: ${e.ui.background__default.rgba};
|
|
12
|
+
border-left: 1px solid ${e.ui.background__heavy.rgba};
|
|
13
|
+
border-right: 1px solid ${e.ui.background__heavy.rgba};
|
|
14
|
+
border-bottom: 1px solid ${e.ui.background__heavy.rgba};
|
|
15
|
+
&:first-child {
|
|
16
|
+
border-top-left-radius: ${n.corners.borderRadius};
|
|
17
|
+
border-top-right-radius: ${n.corners.borderRadius};
|
|
18
|
+
border-top: 1px solid ${e.ui.background__heavy.rgba};
|
|
19
|
+
}
|
|
20
|
+
&:last-child {
|
|
21
|
+
border-bottom-left-radius: ${n.corners.borderRadius};
|
|
22
|
+
border-bottom-right-radius: ${n.corners.borderRadius};
|
|
23
|
+
}
|
|
24
|
+
&::after {
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
z-index: 100;
|
|
27
|
+
content: '';
|
|
28
|
+
position: absolute;
|
|
29
|
+
left: calc(${t.small} * -1);
|
|
30
|
+
width: calc(100% + (${t.small} * 2));
|
|
31
|
+
height: 5px;
|
|
32
|
+
background-color: ${e.interactive.primary__resting.rgba};
|
|
33
|
+
border-radius: ${n.corners.borderRadius};
|
|
34
|
+
opacity: 0;
|
|
35
|
+
}
|
|
36
|
+
`,c=i.header`
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: ${t.x_small};
|
|
40
|
+
padding: ${t.medium} 0;
|
|
41
|
+
scroll-margin-top: ${r}px;
|
|
42
|
+
> div {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: ${t.x_small};
|
|
46
|
+
color: ${e.text.static_icons__tertiary.rgba};
|
|
47
|
+
}
|
|
48
|
+
`,l=i.section`
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: ${t.medium};
|
|
51
|
+
align-items: center;
|
|
52
|
+
`,u=i(a.div)`
|
|
53
|
+
grid-column: 1 / 3;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
> button {
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
margin-bottom: ${t.medium};
|
|
59
|
+
}
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
> div {
|
|
62
|
+
padding-bottom: ${t.medium};
|
|
63
|
+
}
|
|
64
|
+
`;export{o as Container,u as ExpandWrapper,c as Header,l as TopRight,s as Wrapper};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{shape as n}from"../../../atoms/style/index.js";import{Typography as r}from"../../../molecules/index.js";import{HEADER_HEIGHT as i}from"../Faq.utils.js";import{Question as a}from"./Question/Question.js";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: auto 1fr;
|
|
4
|
+
gap: ${t.medium};
|
|
5
|
+
padding: ${t.medium};
|
|
6
|
+
background: ${e.ui.background__default.rgba};
|
|
7
|
+
border-left: 1px solid ${e.ui.background__heavy.rgba};
|
|
8
|
+
border-right: 1px solid ${e.ui.background__heavy.rgba};
|
|
9
|
+
border-bottom: 1px solid ${e.ui.background__heavy.rgba};
|
|
10
|
+
&:first-child {
|
|
11
|
+
border-top-left-radius: ${n.corners.borderRadius};
|
|
12
|
+
border-top-right-radius: ${n.corners.borderRadius};
|
|
13
|
+
border-top: 1px solid ${e.ui.background__heavy.rgba};
|
|
14
|
+
}
|
|
15
|
+
&:last-child {
|
|
16
|
+
border-bottom-left-radius: ${n.corners.borderRadius};
|
|
17
|
+
border-bottom-right-radius: ${n.corners.borderRadius};
|
|
18
|
+
}
|
|
19
|
+
`,u=o.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: ${t.small};
|
|
22
|
+
align-items: center;
|
|
23
|
+
scroll-margin-top: ${i}px;
|
|
24
|
+
`,d=o.hr`
|
|
25
|
+
height: 100%;
|
|
26
|
+
width: 2px;
|
|
27
|
+
`,f=o.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: ${t.medium};
|
|
31
|
+
`,p=o.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
`,m=({id:t,faqs:n,categoryName:i})=>c(l,{"aria-label":`Subcategory: ${i}`,children:[s(d,{}),c(f,{children:[s(u,{id:`subcategory-${t}`,children:s(r,{variant:`h5`,color:e.text.static_icons__tertiary.rgba,children:i})}),s(p,{children:n?.map(e=>s(a,{...e},e.id))})]})]});export{m as Subcategory};
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Status as n}from"../Status/index.js";import{TableOfContentsProvider as r}from"../../providers/TableOfContentsProvider.js";import{useFaqsInApplication as i}from"../../atoms/hooks/useFaqsInApplication.js";import{TableOfContents as a}from"../TableOfContents/TableOfContents.js";import{HEADER_HEIGHT as o,categoryHasFaqs as s,filterCategory as c,mapCategoryToSearch as l}from"./Faq.utils.js";import{Category as u}from"./Category/Category.js";import{CategorySkeleton as d}from"./Category/CategorySkeleton.js";import{AppPageWrapper as f}from"./AppPageWrapper.js";import{Search as p}from"./Search.js";import{Typography as m}from"@equinor/eds-core-react";import h from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{useSearch as v}from"@tanstack/react-router";const y=h.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: ${({$showToc:e})=>e?`1fr 180px`:`1fr auto`};
|
|
4
|
+
gap: ${t.large};
|
|
5
|
+
`,b=h.div`
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: ${t.large};
|
|
9
|
+
`,x=h.div`
|
|
10
|
+
height: fit-content;
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: ${o}px;
|
|
13
|
+
grid-row: span 2;
|
|
14
|
+
`,S=h.div`
|
|
15
|
+
position: sticky;
|
|
16
|
+
top: 0;
|
|
17
|
+
padding: ${t.large} 0;
|
|
18
|
+
background: ${e.ui.background__light.rgba};
|
|
19
|
+
z-index: 100;
|
|
20
|
+
`,C=({searchPlaceholder:e,title:t})=>{let{search:o}=v({strict:!1}),{data:h,isLoading:C}=i(),w=!!o,T=(h??[]).map(e=>l(e,o)).filter(c),E=T.map(e=>({label:e.categoryName??``,value:`category-${e.id}`,count:(e.faqs??[]).length+(e.subCategories?e.subCategories.reduce((e,t)=>e+(t.faqs??[]).length,0):0),children:[...(e.faqs??[]).map(e=>({label:e.question??``,value:`faq-${e.id}`})),...(e.subCategories??[]).map(e=>({label:e.categoryName??``,value:`subcategory-${e.id}`,count:(e.faqs??[]).length}))]})),D=!C&&(T.length===0||T.every(e=>!s(e))),O=C||E.length>0;return _(f,{children:[g(S,{children:g(m,{variant:`h1`,bold:!0,children:t??`FAQ`})}),g(r,{items:E,hashNavigation:!0,children:_(y,{$showToc:O,children:[g(p,{placeholder:e}),g(x,{children:g(a,{})}),g(b,{children:C?Array.from({length:2}).fill(null).map((e,t)=>g(d,{},`category-${t.toString()}`)):D?g(n,{center:!1,children:g(n.Title,{title:`No FAQs ${w?`found`:`yet`}`})}):T.map(e=>g(u,{...e},e.id))})]})})]})};export{C as Faq};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=89,t=e=>{let t=(e.faqs?.length??0)>0,n=e.subCategories?.some(e=>(e.faqs?.length??0)>0);return t||!!n};function n(e,t){let n=t.toLowerCase();return!e.answer||!e.question?!1:n===``?!0:e.answer.toLowerCase().includes(n)||e.question.toLowerCase().includes(n)}function r(e){return t(e)}function i(e,t){let r=(e.faqs??[]).filter(e=>!t||n(e,t)),i=(e.subCategories??[]).map(e=>{let r=(e.faqs??[]).filter(e=>!t||n(e,t));return r.length>0?{...e,faqs:r}:null}).filter(Boolean);return{...e,faqs:r,subCategories:i}}export{e as HEADER_HEIGHT,t as categoryHasFaqs,r as filterCategory,i as mapCategoryToSearch};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Search as t}from"../../molecules/Search/Search.js";import{styled as n}from"styled-components";import{jsx as r}from"react/jsx-runtime";import{useNavigate as i,useSearch as a}from"@tanstack/react-router";const o=n(t)`
|
|
2
|
+
> div {
|
|
3
|
+
background: ${e.ui.background__default.rgba};
|
|
4
|
+
}
|
|
5
|
+
`,s=({placeholder:e})=>{let t=i({from:`/faq`}),{search:n}=a({strict:!1});return r(o,{value:n??``,onChange:e=>{e.target.value?t({to:`.`,search:{search:e.target.value},replace:!0}):t({to:`.`,search:void 0,replace:!0})},placeholder:e??`Search for something...`})};export{s as Search};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterProps } from "./Filter.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/Filter/Filter.d.ts
|
|
5
5
|
|
|
@@ -32,6 +32,6 @@ declare function Filter<T extends string>({
|
|
|
32
32
|
id,
|
|
33
33
|
openOnFocus,
|
|
34
34
|
...rest
|
|
35
|
-
}: FilterProps<T>):
|
|
35
|
+
}: FilterProps<T>): react_jsx_runtime5.JSX.Element;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { Filter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{Container as t,Content as n,SearchField as r,SearchFieldWrapper as i,Section as a,StyledChip as o,Wrapper as s}from"./Filter.styles.js";import{getFilteredAutoCompleteOptions as c}from"./Filter.utils.js";import{AutoCompleteMenu as l}from"./AutoCompleteMenu.js";import{AutoCompleteText as u}from"./AutoCompleteText.js";import{useRef as d,useState as f}from"react";import{Button as p,Icon as m,Typography as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{arrow_drop_down as v,arrow_drop_up as y,clear as b,info_circle as x,search as S}from"@equinor/eds-icons";import{AnimatePresence as C,motion as w}from"
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Container as t,Content as n,SearchField as r,SearchFieldWrapper as i,Section as a,StyledChip as o,Wrapper as s}from"./Filter.styles.js";import{getFilteredAutoCompleteOptions as c}from"./Filter.utils.js";import{AutoCompleteMenu as l}from"./AutoCompleteMenu.js";import{AutoCompleteText as u}from"./AutoCompleteText.js";import{useRef as d,useState as f}from"react";import{Button as p,Icon as m,Typography as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{arrow_drop_down as v,arrow_drop_up as y,clear as b,info_circle as x,search as S}from"@equinor/eds-icons";import{AnimatePresence as C,motion as w}from"motion/react";function T({values:T,search:E,onSearchChange:D,onSearchEnter:O,onClearFilter:k,onClearAllFilters:A,children:j,topContent:M,inlineContent:N,initialOpen:P=!1,placeholder:F=`Search...`,id:I,openOnFocus:L=!0,...R}){let z=d(null),B=d(null),[V,H]=f(P),[U,W]=f(void 0),G=d(P?`auto`:0),K=()=>{H(e=>!e),G.current===`auto`&&(G.current=0)},q=()=>{!V&&L&&H(!0)},J=()=>{z.current?.focus()},Y=e=>{if(!(`autoCompleteOptions`in R)){O(e);return}let t=c({searchValue:e,autoCompleteOptions:R.autoCompleteOptions});if(t.length===1){R.onAutoComplete(t[0].key,t[0]);return}O(e)},X=e=>{if(e.key===`Enter`&&E!==``)Y(E);else if(e.key===`Backspace`&&E===``){if(U===void 0){for(let e of Object.keys(T).toReversed())if(T[e].length>0){W(e);break}return}k(U,T[U].length-1),W(void 0)}},Z=Object.values(T).some(e=>e.length>0);return _(s,{id:I,children:[M,_(t,{children:[_(a,{ref:B,onClick:J,children:[g(m,{data:S,color:e.text.static_icons__tertiary.rgba}),Object.keys(T).flatMap(e=>T[e].map(({label:t,icon:n},r,i)=>g(o,{onDelete:()=>k(e,r),leadingIconData:n,$tryingToRemove:U===e&&r===i.length-1,children:t},`${t}-${r}-${e}`))),_(i,{children:[`autoCompleteOptions`in R&&R.autoCompleteOptions&&g(u,{search:E,autoCompleteOptions:R.autoCompleteOptions}),g(r,{ref:z,id:`filter-search-${I}`,type:`search`,autoComplete:`off`,value:E,placeholder:Z?void 0:F,onChange:D,onKeyDownCapture:X,onFocus:q})]}),Object.values(T).some(e=>e.length>0)&&g(p,{variant:`ghost_icon`,onClick:A,"data-testid":`clear-all-x`,children:g(m,{data:b,size:18,color:e.text.static_icons__tertiary.rgba})})]}),N,_(`button`,{onClick:K,"data-testid":`toggle-open-button`,children:[g(h,{variant:`button`,group:`navigation`,as:`span`,children:`Filters`}),g(m,{data:V?y:v,color:e.text.static_icons__tertiary.rgba})]})]}),g(C,{children:V&&g(w.div,{animate:{height:`auto`},initial:{height:G.current},exit:{height:0},children:_(n,{children:[_(`span`,{children:[g(m,{data:x,size:16,color:e.text.static_icons__tertiary.rgba}),g(h,{variant:`label`,group:`input`,color:e.text.static_icons__tertiary.rgba,children:`Type a keyword and press enter`})]}),j]})})}),`autoCompleteOptions`in R&&R.autoCompleteOptions&&g(l,{isFilterOpen:V,search:E,anchorElement:B.current,autoCompleteOptions:R.autoCompleteOptions,onAutoComplete:R.onAutoComplete,searchElement:z.current})]})}export{T as Filter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{shape as n,typography as r}from"../../atoms/style/index.js";import{Chip as i}from"../../molecules/Chip/Chip.js";import a,{css as o}from"styled-components";import{motion as s}from"
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{shape as n,typography as r}from"../../atoms/style/index.js";import{Chip as i}from"../../molecules/Chip/Chip.js";import a,{css as o}from"styled-components";import{motion as s}from"motion/react";const c=a.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
border: 1px solid ${e.ui.background__heavy.rgba};
|
|
4
4
|
background: ${e.ui.background__default.rgba};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Filter/SortMenu.d.ts
|
|
4
4
|
interface SortMenuProps<S> {
|
|
@@ -13,6 +13,6 @@ declare function SortMenu<S>({
|
|
|
13
13
|
value,
|
|
14
14
|
onChange,
|
|
15
15
|
items
|
|
16
|
-
}: SortMenuProps<S>):
|
|
16
|
+
}: SortMenuProps<S>): react_jsx_runtime4.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SortMenu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react98 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: react98.ForwardRefExoticComponent<{
|
|
11
11
|
actionMenu?: ReactNode;
|
|
12
12
|
expanded?: boolean;
|
|
13
|
-
} & ReleaseNote &
|
|
13
|
+
} & ReleaseNote & react98.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { ReleaseNote$1 as ReleaseNote, ReleaseNoteProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{shape as n}from"../../atoms/style/index.js";import{formatDate as r}from"../../atoms/utils/date.js";import{getImagesFromRichText as i}from"../../atoms/utils/richtext.js";import{timeToRead as a,usingReleaseNoteDate as o}from"./ReleaseNote.utils.js";import{RichTextDisplay as s}from"../../molecules/RichTextDisplay/RichTextDisplay.js";import{RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT as c}from"./ReleaseNote.constants.js";import{ToggleExpanded as l}from"./ToggleExpanded.js";import{MetaTags as u}from"./MetaTags.js";import{forwardRef as d,useRef as f,useState as p}from"react";import{Typography as m}from"@equinor/eds-core-react";import h from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{motion as v}from"
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{shape as n}from"../../atoms/style/index.js";import{formatDate as r}from"../../atoms/utils/date.js";import{getImagesFromRichText as i}from"../../atoms/utils/richtext.js";import{timeToRead as a,usingReleaseNoteDate as o}from"./ReleaseNote.utils.js";import{RichTextDisplay as s}from"../../molecules/RichTextDisplay/RichTextDisplay.js";import{RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT as c}from"./ReleaseNote.constants.js";import{ToggleExpanded as l}from"./ToggleExpanded.js";import{MetaTags as u}from"./MetaTags.js";import{forwardRef as d,useRef as f,useState as p}from"react";import{Typography as m}from"@equinor/eds-core-react";import h from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{motion as v}from"motion/react";import{ReleaseNotesService as y}from"@equinor/subsurface-app-management";const b=h.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
padding: ${t.medium};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react117 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: react117.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react117.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SideBar };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react127 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: react127.ForwardRefExoticComponent<ActionProps & react127.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Action };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react123 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: react123.ForwardRefExoticComponent<DescriptionProps & react123.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Description };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SHAPES as e,SHAPE_ANIMATIONS as t,SHAPE_INITIALS as n,SHAPE_TRANSITIONS as r}from"./Illustration.constants.js";import i from"styled-components";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{motion as s}from"
|
|
1
|
+
import{SHAPES as e,SHAPE_ANIMATIONS as t,SHAPE_INITIALS as n,SHAPE_TRANSITIONS as r}from"./Illustration.constants.js";import i from"styled-components";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{motion as s}from"motion/react";const c=i.div`
|
|
2
2
|
width: 328px;
|
|
3
3
|
height: 232px;
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react129 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/MissingAccesses.d.ts
|
|
4
4
|
interface AccessType {
|
|
@@ -9,6 +9,6 @@ interface MissingAccessesProps {
|
|
|
9
9
|
accesses?: AccessType[];
|
|
10
10
|
text?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const MissingAccesses:
|
|
12
|
+
declare const MissingAccesses: react129.ForwardRefExoticComponent<MissingAccessesProps & react129.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MissingAccesses };
|