@equinor/amplify-component-lib 8.0.2 → 8.2.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/useReleaseNotesQuery.js +1 -1
- package/dist/atoms/hooks/useSelect.d.ts +1 -0
- package/dist/atoms/hooks/useSelect.js +1 -1
- package/dist/atoms/icons/map.js +1 -1
- package/dist/atoms/icons/other.js +1 -1
- package/dist/atoms/style/colors.d.ts +436 -4
- package/dist/atoms/style/colors.js +1 -1
- package/dist/atoms/style/darkTokens.d.ts +1 -1
- package/dist/atoms/style/darkTokens.js +153 -1
- package/dist/atoms/style/lightTokens.d.ts +1 -0
- package/dist/atoms/style/lightTokens.js +43 -0
- package/dist/atoms/style/spacingTokens.d.ts +1 -1
- package/dist/atoms/style/spacingTokens.js +40 -1
- package/dist/atoms/utils/index.d.ts +3 -2
- package/dist/atoms/utils/reactquery.d.ts +4 -0
- package/dist/atoms/utils/reactquery.js +1 -0
- package/dist/atoms/utils/richtext.d.ts +20 -0
- package/dist/atoms/utils/richtext.js +1 -0
- package/dist/deprecated/CommentField/CommentField.js +1 -1
- package/dist/deprecated/ConfirmationPopup.js +2 -2
- package/dist/deprecated/DataCard.js +8 -8
- package/dist/deprecated/EditableField.js +2 -2
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +2 -2
- package/dist/deprecated/HeaderDrawer.js +5 -5
- package/dist/deprecated/MultiSelectDrawer.js +4 -4
- package/dist/deprecated/SingleSelectDrawer.js +3 -3
- package/dist/deprecated/Workflow/WorkflowDescription.js +5 -5
- package/dist/index.js +1 -1
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.d.ts +2 -3
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.js +1 -24
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.styles.d.ts +6 -0
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.styles.js +19 -0
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.utils.d.ts +2 -0
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.utils.js +1 -0
- package/dist/molecules/ApplicationIcon/ApplicationIcon.constants.d.ts +3 -3
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.types.d.ts +1 -0
- package/dist/molecules/ApplicationIcon/ApplicationIcon.utils.d.ts +2 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.d.ts +1 -2
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.styles.d.ts +19 -15
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.styles.js +14 -14
- package/dist/molecules/ApplicationIcon/ApplicationIconData/AppIconSvg.d.ts +4 -3
- package/dist/molecules/ApplicationIcon/ApplicationIconData/AppIconSvg.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconData/ApplicationIconCollection.d.ts +6 -3
- package/dist/molecules/ApplicationIcon/ApplicationIconData/ApplicationIconCollection.js +1 -1
- package/dist/molecules/Badge/Badge.js +1 -1
- package/dist/molecules/Badge/Badge.styles.js +2 -2
- package/dist/molecules/Chip/Chip.d.ts +4 -7
- package/dist/molecules/Chip/Chip.js +1 -1
- package/dist/molecules/Chip/Chip.styles.js +13 -13
- package/dist/molecules/Chip/InteractiveChip.js +1 -1
- package/dist/molecules/Chip/ReadOnlyChip.d.ts +2 -2
- package/dist/molecules/ContentMenu/ContentMenu.js +19 -19
- package/dist/molecules/EquinorLogo/EquinorLogo.js +1 -1
- package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
- package/dist/molecules/FileProgress/CompactFileProgress.styles.js +23 -23
- package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
- package/dist/molecules/FileProgress/RegularFileProgress.styles.js +10 -10
- package/dist/molecules/FileUploadArea/FileUploadArea.js +6 -6
- package/dist/molecules/FullPageSpinner/FullPageSpinner.js +5 -5
- package/dist/molecules/InfoElement/CopyText.js +9 -9
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/ListItem/ListItem.js +8 -8
- package/dist/molecules/OptionDrawer/OptionDrawer.styles.js +11 -11
- package/dist/molecules/ProfileAvatar/ProfileAvatar.js +6 -6
- package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.js +6 -6
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.styles.js +4 -4
- package/dist/molecules/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/index.js +1 -1
- package/dist/molecules/Select/GroupedSelectMenu.js +1 -1
- package/dist/molecules/Select/Select.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +3 -4
- package/dist/molecules/Select/Select.styles.js +42 -36
- package/dist/molecules/Select/Select.types.d.ts +3 -0
- package/dist/molecules/Select/SelectMenu.js +1 -1
- package/dist/molecules/Select/SelectMenuItem.js +1 -1
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +6 -0
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -0
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +6 -0
- package/dist/molecules/SelectionControls/Radio/Radio.js +1 -0
- package/dist/molecules/SelectionControls/SelectionControls.styles.d.ts +5 -0
- package/dist/molecules/SelectionControls/SelectionControls.styles.js +66 -0
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +5 -0
- package/dist/molecules/SelectionControls/Switch/Switch.js +1 -0
- package/dist/molecules/Sieve/Sieve.styles.js +16 -16
- package/dist/molecules/Sieve/Sort.js +1 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +9 -9
- package/dist/molecules/Stepper/Step.js +2 -2
- package/dist/molecules/Stepper/Stepper.js +2 -2
- package/dist/molecules/TextField/TextField.js +3 -3
- package/dist/molecules/Waves/NoiseSvg.d.ts +2 -0
- package/dist/molecules/Waves/NoiseSvg.js +1 -0
- package/dist/molecules/Waves/Waves.js +1 -48
- package/dist/molecules/Waves/Waves.styles.d.ts +10 -0
- package/dist/molecules/Waves/Waves.styles.js +48 -0
- package/dist/molecules/index.d.ts +9 -3
- package/dist/organisms/ErrorPage/Description.js +1 -1
- package/dist/organisms/ErrorPage/Details.js +6 -6
- package/dist/organisms/ErrorPage/ErrorPage.js +2 -2
- package/dist/organisms/ErrorPage/MissingAccesses.js +2 -2
- package/dist/organisms/ErrorPage/Title.js +1 -1
- package/dist/organisms/ErrorPage/collections/PageNotFound.js +1 -1
- package/dist/organisms/ErrorPage/collections/Unauthorized.js +1 -1
- package/dist/organisms/FieldSelector/ChangingField.js +1 -1
- package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +2 -2
- package/dist/organisms/FieldSelector/SelectorCard/Skeleton.js +4 -4
- package/dist/organisms/FullPageStatus/FullPageStatus.js +2 -2
- package/dist/organisms/SideBar/MenuItem.styles.js +3 -3
- package/dist/organisms/SideBar/SideBar.styles.js +3 -3
- package/dist/organisms/SideBar/ToggleOpen.styles.js +5 -5
- package/dist/organisms/TableOfContents/TableOfContents.constants.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.js +3 -3
- package/dist/organisms/Template/Template.js +10 -9
- package/dist/organisms/TopBar/Account/Account.styles.js +7 -7
- package/dist/organisms/TopBar/Actions.js +2 -2
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.styles.js +5 -5
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.js +4 -4
- package/dist/organisms/TopBar/Guidelines/Item.js +2 -2
- package/dist/organisms/TopBar/Guidelines/Section.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +4 -4
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.js +4 -4
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +4 -4
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/FilterHeader/FilterHeader.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/FilterHeader/FilterHeader.styles.js +3 -3
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotes.styles.js +3 -3
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesHeader.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesHeader.styles.js +4 -4
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesTypes/ReleaseNotesTypes.styles.js +12 -12
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePost/ReleasePost.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePost/ReleasePost.styles.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePosts.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePosts.styles.js +4 -4
- package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +2 -2
- package/dist/organisms/TopBar/Resources/Resources.js +4 -4
- package/dist/organisms/TopBar/Settings.d.ts +3 -16
- package/dist/organisms/TopBar/Settings.js +2 -2
- package/dist/organisms/TopBar/Settings.types.d.ts +28 -0
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +13 -13
- package/dist/organisms/TopBar/TopBarMenu.js +3 -3
- package/dist/organisms/TopBar/TransferToAppDialog.js +2 -2
- package/dist/organisms/index.d.ts +2 -1
- package/dist/providers/AuthProvider/AuthProvider.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
- package/dist/tests/mockHandlers.d.ts +3 -0
- package/dist/tests/msalMock.d.ts +1 -0
- package/dist/tests/setupTests.d.ts +2 -0
- package/package.json +2 -3
- package/dist/atoms/utils/getFeatures.d.ts +0 -8
- package/dist/atoms/utils/getFeatures.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{Menu as i}from"@equinor/eds-core-react";import{NoItemsFoundText as m}from"./Select.styles.js";import{getCumulativeArrayFromNumberedArray as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{Menu as i}from"@equinor/eds-core-react";import{NoItemsFoundText as m}from"./Select.styles.js";import{getCumulativeArrayFromNumberedArray as n}from"./Select.utils.js";import{SelectMenuItem as o}from"./SelectMenuItem.js";const l=l=>{const{onItemSelect:r,onItemKeyDown:s,itemRefs:c,groups:u,search:a,onMouseEnterItem:f}=l,p=t((()=>{if(""===a)return u;const e=new RegExp(a,"i");return u.map((t=>({title:t.title,items:t.items.filter((t=>t.label.match(e)))}))).filter((e=>e.items.length>0))}),[u,a]),d=t((()=>{const e=p.map((e=>e.items.length));return n(e)}),[p]);return 0===p.length?e(m,{children:"No items found"}):"values"in l?p.map(((t,m)=>e(i.Section,{index:m,title:t.title,children:t.items.map(((i,n)=>e(o,{index:n+d[m],childOffset:0,item:i,multiselect:!0,itemRefs:c,onItemKeyDown:s,onItemSelect:r,onMouseEnterItem:f,values:l.values},`${t.title}-${m}-item-${i.value}`)))},`${t.title}-${m}`))):p.map(((t,m)=>e(i.Section,{index:m,title:t.title,children:t.items.map(((i,n)=>e(o,{index:n+d[m],childOffset:0,item:i,itemRefs:c,onItemKeyDown:s,onItemSelect:r,onMouseEnterItem:f},`${t.title}-${m}-item-${i.value}`)))},`${t.title}-${m}`)))};export{l as GroupedSelectMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useRef as
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useRef as n,useMemo as t}from"react";import{Label as l,CircularProgress as r,Icon as a}from"@equinor/eds-core-react";import{arrow_drop_up as i,arrow_drop_down as c,clear as s}from"@equinor/eds-icons";import{tokens as d}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{useSelect as m}from"../../atoms/hooks/useSelect.js";import{GroupedSelectMenu as h}from"./GroupedSelectMenu.js";import{ValueText as u,StyledChip as p,Container as g,Section as b,PlaceholderText as f,ClearButton as v,StyledMenu as y}from"./Select.styles.js";import{SelectMenu as O}from"./SelectMenu.js";import{useOutsideClick as k}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";const{colors:C}=d,I=d=>{const{clearable:I=!0,loading:S=!1,disabled:x=!1,lightBackground:j=!1,underlineHighlight:D=!1,sortValues:R=!0,placeholder:w="Select...",label:M,meta:$,id:B=`amplify-combobox-${M}`,variant:K,inDialog:_=!1}=d,{handleOnClear:q,handleOnItemKeyDown:E,handleOnItemSelect:T,handleOnSearchChange:V,handleOnSearchKeyDown:z,handleToggleOpen:H,itemRefs:P,search:A,selectedValues:F,handleOnClose:G,handleOnOpen:N,handleOnRemoveItem:W,handleOnMouseEnterItem:J,open:L,searchRef:Q,tryingToRemoveItem:U}=m({...d,clearable:I,loading:S,disabled:x,lightBackground:j,underlineHighlight:D,sortValues:R,placeholder:w}),X=n(null),Y=n(null),Z=t((()=>!!M||!!$),[M,$]);k(Y.current,(e=>{_&&L&&e.target&&X.current&&Y.current&&!X.current.contains(e.target)&&!Y.current?.contains(e.target)&&G()}));const ee=t((()=>"value"in d&&d.value?e(u,{children:d.value.label}):F.map((o=>e(p,{"data-testid":"amplify-combobox-chip",className:"amplify-combo-box-chip",onDelete:()=>W(o),$tryingToRemove:U?.value===o.value,$lightBackground:j,children:o.label},o.value)))),[F,U,j,d,W]);return o("div",{children:[o(g,{"data-testid":"combobox-container",ref:X,onClick:N,"aria-expanded":L,$variant:K,$lightBackground:j,$shouldShowTopMargin:Z,children:[Z&&e(l,{label:M,meta:$,htmlFor:B}),o(b,{children:[""===A&&0===F.length&&e(f,{children:w}),(""===A||"values"in d&&F.length>0)&&ee,e("input",{id:B,disabled:x||S,ref:Q,type:"search",role:"combobox",value:A,autoComplete:"off",onChange:V,onKeyDownCapture:z})]}),S?e(r,{size:16}):e(a,{onClick:H,data:L?i:c,color:C.interactive.primary__resting.rgba}),I&&F.length>0&&!S&&e(v,{variant:"ghost_icon",onClick:q,"data-testid":"clearBtn",children:e(a,{data:s,size:18})})]}),L&&e(y,{ref:Y,open:!0,id:"combobox-menu",anchorEl:X.current,onClose:G,placement:"bottom",matchAnchorWidth:!0,children:d.groups?e(h,{...d,search:A,itemRefs:P,onItemSelect:T,onItemKeyDown:E,onMouseEnterItem:J}):e(O,{...d,search:A,itemRefs:P,onItemSelect:T,onItemKeyDown:E,onMouseEnterItem:J,selectableParent:"values"in d&&d.selectableParent})})]})};export{I as Select};
|
|
@@ -26,10 +26,9 @@ interface StyledChipProps {
|
|
|
26
26
|
$lightBackground?: boolean;
|
|
27
27
|
className: string;
|
|
28
28
|
}
|
|
29
|
-
declare const StyledChip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../Chip/Chip").BaseChipProps
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
}, keyof import("react").Component<any, {}, any>>;
|
|
29
|
+
declare const StyledChip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("../Chip/Chip").BaseChipProps & import("react").RefAttributes<HTMLDivElement | HTMLButtonElement>, "ref"> & {
|
|
30
|
+
ref?: ((instance: HTMLDivElement | HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement | HTMLButtonElement> | null | undefined;
|
|
31
|
+
}, StyledChipProps>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Chip/Chip").BaseChipProps & import("react").RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
|
|
33
32
|
interface CustomMenuItemProps {
|
|
34
33
|
$paddedLeft?: boolean;
|
|
35
34
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";export{Button}from"@equinor/eds-core-react";import{
|
|
1
|
+
import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";export{Button}from"@equinor/eds-core-react";import{colors as a}from"../../atoms/style/colors.js";import{spacings as o}from"../../atoms/style/spacings.js";import{Chip as i}from"../Chip/Chip.js";import n from"styled-components";const s={warning:a.interactive.warning__resting.rgba,error:a.interactive.danger__resting.rgba,success:a.interactive.success__resting.rgba,dirty:a.dataviz.darkblue.darker},l=n.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: 1fr auto;
|
|
5
5
|
align-items: center;
|
|
6
6
|
padding: 6px 8px;
|
|
7
7
|
|
|
8
|
-
${({$variant:r})=>r?`box-shadow: inset 0 -2px 0 0 ${
|
|
8
|
+
${({$variant:r})=>r?`box-shadow: inset 0 -2px 0 0 ${s[r]}`:`box-shadow: inset 0 -1px 0 0 ${a.text.static_icons__tertiary.rgba}`};
|
|
9
9
|
|
|
10
|
-
${({$lightBackground:r})=>r?`background-color: ${
|
|
10
|
+
${({$lightBackground:r})=>r?`background-color: ${a.ui.background__default.rgba}`:`background-color: ${a.ui.background__light.rgba}`};
|
|
11
11
|
|
|
12
12
|
&[aria-expanded='true'] {
|
|
13
|
-
box-shadow: inset 0 -2px 0 0 ${
|
|
13
|
+
box-shadow: inset 0 -2px 0 0 ${a.interactive.primary__resting.rgba};
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
${({$shouldShowTopMargin:r})=>r&&"margin-top: 1rem;"};
|
|
@@ -28,7 +28,7 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
28
28
|
> svg:not([role='progressbar']) {
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
&:hover {
|
|
31
|
-
background: ${
|
|
31
|
+
background: ${a.interactive.primary__hover_alt.rgba};
|
|
32
32
|
border-radius: 50%;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -38,20 +38,20 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
38
38
|
box-shadow: none;
|
|
39
39
|
> svg:not([role='progressbar']) {
|
|
40
40
|
cursor: not-allowed;
|
|
41
|
-
fill: ${
|
|
41
|
+
fill: ${a.interactive.disabled__text.rgba};
|
|
42
42
|
&:hover {
|
|
43
43
|
background: transparent;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
> label {
|
|
47
|
-
color: ${
|
|
47
|
+
color: ${a.interactive.disabled__text.rgba};
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,c=n.section`
|
|
51
51
|
position: relative;
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-wrap: wrap;
|
|
54
|
-
gap: ${
|
|
54
|
+
gap: ${o.x_small};
|
|
55
55
|
min-height: 24px;
|
|
56
56
|
input[type='search'] {
|
|
57
57
|
background: transparent;
|
|
@@ -59,7 +59,7 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
59
59
|
flex-grow: 1;
|
|
60
60
|
padding: 0;
|
|
61
61
|
font-family: 'Equinor', sans-serif;
|
|
62
|
-
color: ${
|
|
62
|
+
color: ${a.text.static_icons__default.rgba};
|
|
63
63
|
outline: none;
|
|
64
64
|
border: none;
|
|
65
65
|
}
|
|
@@ -74,14 +74,14 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
74
74
|
}
|
|
75
75
|
&:has(input:disabled) {
|
|
76
76
|
> p {
|
|
77
|
-
color: ${
|
|
77
|
+
color: ${a.interactive.disabled__text.rgba};
|
|
78
78
|
}
|
|
79
79
|
> .amplify-combo-box-chip {
|
|
80
80
|
cursor: not-allowed;
|
|
81
|
-
background: ${
|
|
82
|
-
color: ${
|
|
81
|
+
background: ${a.interactive.disabled__fill.rgba};
|
|
82
|
+
color: ${a.interactive.disabled__text.rgba};
|
|
83
83
|
> svg {
|
|
84
|
-
fill: ${
|
|
84
|
+
fill: ${a.interactive.disabled__text.rgba};
|
|
85
85
|
&:hover {
|
|
86
86
|
cursor: not-allowed;
|
|
87
87
|
background: none;
|
|
@@ -89,7 +89,7 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
92
|
+
`,d=n(r)`
|
|
93
93
|
position: absolute;
|
|
94
94
|
top: 50%;
|
|
95
95
|
transform: translate(0, -50%);
|
|
@@ -97,17 +97,17 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
97
97
|
width: 24px;
|
|
98
98
|
height: 24px;
|
|
99
99
|
svg {
|
|
100
|
-
fill: ${
|
|
100
|
+
fill: ${a.text.static_icons__secondary.rgba};
|
|
101
101
|
}
|
|
102
102
|
&:after {
|
|
103
103
|
width: 24px;
|
|
104
104
|
height: 24px;
|
|
105
105
|
left: 0;
|
|
106
106
|
}
|
|
107
|
-
`,
|
|
108
|
-
background: ${({$tryingToRemove:r,$lightBackground:e})=>r?
|
|
109
|
-
`,
|
|
110
|
-
flex: 1;
|
|
107
|
+
`,g=n(i)`
|
|
108
|
+
background: ${({$tryingToRemove:r,$lightBackground:e})=>r?a.interactive.primary__hover_alt.rgba:e?a.ui.background__light.rgba:a.ui.background__default.rgba} !important;
|
|
109
|
+
`,p=n(e.Item)`
|
|
110
|
+
flex-grow: 1;
|
|
111
111
|
border-radius: 2px;
|
|
112
112
|
${({$paddedLeft:r})=>r&&"margin-left: 36px"};
|
|
113
113
|
padding-left: 10px;
|
|
@@ -117,33 +117,39 @@ import{Button as r,Menu as e,Typography as t}from"@equinor/eds-core-react";expor
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
&:focus-visible {
|
|
120
|
-
background: ${
|
|
120
|
+
background: ${a.interactive.primary__hover_alt.rgba};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/* Hide any background change on hover since we set focus on hover now */
|
|
123
124
|
&:hover {
|
|
124
|
-
background: ${
|
|
125
|
+
background: ${a.interactive.primary__hover_alt.rgba};
|
|
126
|
+
background: transparent;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:focus-visible {
|
|
130
|
+
background: ${a.interactive.primary__hover_alt.rgba};
|
|
125
131
|
}
|
|
126
|
-
`,
|
|
127
|
-
height: calc(100% + ${
|
|
132
|
+
`,b=n.hr`
|
|
133
|
+
height: calc(100% + ${o.medium} * 2);
|
|
128
134
|
justify-self: center;
|
|
129
|
-
width: ${
|
|
130
|
-
`,
|
|
135
|
+
width: ${o.x_large};
|
|
136
|
+
`,u=n(t)`
|
|
131
137
|
position: absolute;
|
|
132
|
-
color: ${
|
|
138
|
+
color: ${a.text.static_icons__tertiary.rgba};
|
|
133
139
|
top: calc(50%);
|
|
134
140
|
transform: translate(0, -50%);
|
|
135
|
-
`,
|
|
136
|
-
color: ${
|
|
137
|
-
`,
|
|
138
|
-
margin-left: ${
|
|
139
|
-
`,
|
|
141
|
+
`,_=n(u)`
|
|
142
|
+
color: ${a.text.static_icons__default.rgba};
|
|
143
|
+
`,h=n(t)`
|
|
144
|
+
margin-left: ${o.medium};
|
|
145
|
+
`,m=n(e)`
|
|
140
146
|
max-height: 20rem;
|
|
141
147
|
overflow: auto;
|
|
142
|
-
|
|
148
|
+
`,v=n.div`
|
|
143
149
|
display: flex;
|
|
144
150
|
align-items: center;
|
|
145
|
-
padding: 0 ${
|
|
146
|
-
`,
|
|
151
|
+
padding: 0 ${o.small};
|
|
152
|
+
`,x=n(r)`
|
|
147
153
|
width: 36px;
|
|
148
154
|
height: 36px;
|
|
149
|
-
`;export{
|
|
155
|
+
`;export{d as ClearButton,l as Container,b as MenuItemSpacer,v as MenuItemWrapper,h as NoItemsFoundText,u as PlaceholderText,c as Section,x as SmallButton,g as StyledChip,m as StyledMenu,p as StyledMenuItem,s as VARIANT_COLORS,_ as ValueText};
|
|
@@ -31,6 +31,7 @@ export interface SelectMenuProps<T extends SelectOptionRequired> {
|
|
|
31
31
|
itemRefs: MutableRefObject<(HTMLButtonElement | null)[]>;
|
|
32
32
|
onItemKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
33
33
|
onItemSelect: (item: SelectOption<T>) => void;
|
|
34
|
+
onMouseEnterItem: (index: number) => void;
|
|
34
35
|
selectableParent?: boolean;
|
|
35
36
|
}
|
|
36
37
|
interface SelectMenuItemProps<T extends SelectOptionRequired> {
|
|
@@ -65,5 +66,7 @@ export interface CommonSelectProps {
|
|
|
65
66
|
clearable?: boolean;
|
|
66
67
|
meta?: string;
|
|
67
68
|
onSearchChange?: (inputValue: string) => void;
|
|
69
|
+
inDialog?: boolean;
|
|
70
|
+
onOpenCallback?: (value: boolean) => void;
|
|
68
71
|
}
|
|
69
72
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{NoItemsFoundText as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{NoItemsFoundText as n}from"./Select.styles.js";import{flattenOptions as m,getChildOffset as l}from"./Select.utils.js";import{SelectMenuItem as s}from"./SelectMenuItem.js";const r=r=>{const{search:o,items:i,onItemSelect:a,itemRefs:c,onItemKeyDown:u,onMouseEnterItem:f,selectableParent:p}=r,I=t((()=>{if(""===o)return i;const e=new RegExp(o,"i");return m(i).map((({value:e,label:t})=>({value:e,label:t}))).filter((t=>t.label.match(e)))}),[i,o]);if(0===I.length)return e(n,{children:"No items found"});const d=I.some((e=>e.children&&e.children.length>0));return"values"in r?I.map(((t,n)=>e(s,{childOffset:l(I,n),index:n,multiselect:!0,item:t,itemRefs:c,onItemKeyDown:u,onItemSelect:a,onMouseEnterItem:f,values:r.values,selectableParent:p,parentHasNestedItems:d},`menu-item-${n}-${t.value}`))):I.map(((t,n)=>e(s,{childOffset:l(I,n),index:n,item:t,itemRefs:c,onItemKeyDown:u,onItemSelect:a,onMouseEnterItem:f,selectableParent:p,parentHasNestedItems:d},`menu-item-${n}-${t.value}`)))};export{r as SelectMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as n,useRef as
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as n,useRef as o,useMemo as c}from"react";import{Icon as i}from"@equinor/eds-core-react";import{checkbox_outline as l,checkbox as u,checkbox_indeterminate as a,chevron_down as s,chevron_right as d}from"@equinor/eds-icons";import{tokens as m}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{MenuItemSpacer as p,MenuItemWrapper as f,SmallButton as h,StyledMenuItem as v}from"./Select.styles.js";import{flattenOptions as y,getChildOffset as g}from"./Select.utils.js";const{colors:w}=m,k=m=>{const{index:b,childOffset:_,depth:x=0,item:C,multiselect:I,itemRefs:A,onItemKeyDown:D,onMouseEnterItem:$,onItemSelect:M,selectableParent:E=!0,parentHasNestedItems:K=!1}=m,[j,O]=n(!1),S=o(-1),q=o([]),P=("values"in m?m.values.map((({value:e})=>e)):[]).includes(C.value),R=c((()=>{if(!I||!C.children||0===C.children.length)return l;if(P)return u;if([C,...C.children].some((e=>m.values.find((r=>r.value===e.value)))))return a;const e=m.values.map((({value:e})=>e)),r=y([C])?.map((({value:e})=>e));return r.some((r=>e.includes(r)))?a:l}),[C,I,m,P]),H=c((()=>new Array(x).fill(0).map(((r,t)=>e(p,{},`spacer-${r+t}`)))),[x]),L=()=>{if(M(C),!I)return void O((e=>!e));const e=!m.values.map((({value:e})=>e)).includes(C.value);O(e)},N=()=>{$(b)},U=e=>{e.stopPropagation(),O((e=>!e))},z=e=>{"ArrowDown"===e.key?S.current+=1:"ArrowUp"===e.key&&(S.current-=1),S.current<=-1?(A.current[b]?.focus(),S.current=-1):S.current+_===q.current.length?(S.current=-1,D(e),O(!1)):S.current>=0&&S.current<q.current.length-_&&q.current[S.current+_]?.focus()},B=e=>{j||"ArrowDown"!==e.key&&"ArrowUp"!==e.key?"ArrowRight"===e.key||"ArrowLeft"===e.key?O((e=>!e)):j&&"ArrowDown"===e.key&&-1===S.current&&(S.current=0,q.current[S.current+_]?.focus()):D(e)},F=e=>{S.current=e,q.current.at(e)?.focus()};return C.children&&C.children.length>0&&I?r(t,{children:[r(f,{children:[H,e(h,{variant:"ghost_icon",onClick:U,"data-testid":"toggle-button",children:e(i,{color:w.interactive.primary__resting.rgba,data:j?s:d})}),r(v,{$depth:x,ref:e=>{A.current[b]=e},index:b,closeMenuOnClick:!1,onKeyDownCapture:B,onMouseEnter:N,onClick:L,children:[e(i,{color:E?w.interactive.primary__resting.rgba:w.interactive.disabled__fill.rgba,data:R}),C.label]})]}),j&&C.children.map(((r,t)=>e(k,{index:_+t,childOffset:_+g(C.children,t),depth:x+1,multiselect:!0,item:r,itemRefs:q,values:m.values,onItemKeyDown:z,onItemSelect:M,onMouseEnterItem:F,selectableParent:E,parentHasNestedItems:!0},`child-${t}-${r.value}-${C.value}`)))]}):I?r(f,{children:[H,r(v,{$depth:x,$paddedLeft:K,ref:e=>{A.current[b]=e},index:b,tabIndex:x,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:L,onMouseEnter:N,children:[e(i,{color:w.interactive.primary__resting.rgba,data:P?u:l}),C.label]})]}):e(f,{children:e(v,{$depth:x,ref:e=>{A.current[b]=e},index:b,onKeyDownCapture:D,onClick:L,onMouseEnter:N,children:C.label})})};export{k as SelectMenuItem};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CheckboxProps as EDSCheckboxProps } from '@equinor/eds-core-react';
|
|
2
|
+
export interface CheckboxProps extends EDSCheckboxProps {
|
|
3
|
+
label: string;
|
|
4
|
+
outlined?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Checkbox as r}from"@equinor/eds-core-react";import{Wrapper as t}from"../SelectionControls.styles.js";const i=e(((e,i)=>o(t,{$outlined:e.outlined||!1,children:o(r,{ref:i,...e})})));i.displayName="Checkbox";export{i as Checkbox};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RadioProps as EDSRadioProps } from '@equinor/eds-core-react';
|
|
2
|
+
export interface RadioProps extends EDSRadioProps {
|
|
3
|
+
label: string;
|
|
4
|
+
outlined?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{forwardRef as r}from"react";import{Radio as e}from"@equinor/eds-core-react";import{Wrapper as t}from"../SelectionControls.styles.js";const i=r(((r,i)=>o(t,{$outlined:r.outlined||!1,children:o(e,{ref:i,...r})})));i.displayName="Radio";export{i as Radio};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
interface WrapperProps {
|
|
2
|
+
$outlined: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, WrapperProps>> & string;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import{tokens as t}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{animation as a}from"../../atoms/style/animation.js";import"../../atoms/style/colors.js";import{spacings as e}from"../../atoms/style/spacings.js";import i,{css as r}from"styled-components";const{colors:s,shape:o}=t,n=i.span`
|
|
2
|
+
> label {
|
|
3
|
+
padding: 0 ${e.large} 0 ${e.small};
|
|
4
|
+
border-radius: ${o.button.borderRadius};
|
|
5
|
+
transition: background ${a.transitionMS};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Radio / Checkbox hover state override */
|
|
9
|
+
> label > span:before {
|
|
10
|
+
background-color: transparent !important;
|
|
11
|
+
}
|
|
12
|
+
/* Switch hover state override */
|
|
13
|
+
> label > span > input[type='checkbox'] + span {
|
|
14
|
+
background: transparent !important;
|
|
15
|
+
}
|
|
16
|
+
svg {
|
|
17
|
+
transition: fill ${a.transitionMS};
|
|
18
|
+
}
|
|
19
|
+
input:not(:checked) {
|
|
20
|
+
~ svg {
|
|
21
|
+
fill: ${s.text.static_icons__tertiary.rgba};
|
|
22
|
+
&:hover {
|
|
23
|
+
fill: ${s.text.static_icons__default.rgba};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/* Switch dot override */
|
|
28
|
+
> label:has(input:checked) > span > span > span:last-child {
|
|
29
|
+
background: ${s.interactive.primary__resting.rgba};
|
|
30
|
+
}
|
|
31
|
+
> label:has(input:not(:checked)) > span > span > span:last-child {
|
|
32
|
+
background: ${s.text.static_icons__tertiary.rgba};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
> label:hover:not(:has(input:disabled)) {
|
|
36
|
+
background: ${s.interactive.primary__hover_alt.rgba};
|
|
37
|
+
svg {
|
|
38
|
+
fill: ${s.text.static_icons__default.rgba};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
> label:focus:not(:hover):not(:has(input:disabled)) {
|
|
43
|
+
outline: 1px dashed ${s.interactive.primary__resting.rgba};
|
|
44
|
+
outline-offset: -1px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:has(input:disabled) {
|
|
48
|
+
span:last-child {
|
|
49
|
+
color: ${s.interactive.disabled__text.rgba};
|
|
50
|
+
}
|
|
51
|
+
svg {
|
|
52
|
+
fill: ${s.interactive.disabled__text.rgba};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${({$outlined:t})=>{if(t)return r`
|
|
57
|
+
> label {
|
|
58
|
+
outline: 1px solid ${s.ui.background__medium.rgba};
|
|
59
|
+
}
|
|
60
|
+
&:has(input:disabled) {
|
|
61
|
+
svg {
|
|
62
|
+
fill: ${s.interactive.disabled__border.rgba};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`}}
|
|
66
|
+
`;export{n as Wrapper};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SwitchProps as EDSSwitchProps } from '@equinor/eds-core-react';
|
|
2
|
+
export interface SwitchProps extends EDSSwitchProps {
|
|
3
|
+
outlined?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Switch as t}from"@equinor/eds-core-react";import{Wrapper as e}from"../SelectionControls.styles.js";const i=o(((o,i)=>r(e,{$outlined:o.outlined||!1,children:r(t,{ref:i,...o})})));i.displayName="Switch";export{i as Switch};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import{Chip as o,Search as
|
|
1
|
+
import{Chip as o,Search as t,Menu as i}from"@equinor/eds-core-react";import{colors as e}from"../../atoms/style/colors.js";import{spacings as a}from"../../atoms/style/spacings.js";import r from"styled-components";const n=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
gap: ${
|
|
5
|
-
`,
|
|
4
|
+
gap: ${a.medium};
|
|
5
|
+
`,s=r.div`
|
|
6
6
|
display: flex;
|
|
7
|
-
gap: ${
|
|
7
|
+
gap: ${a.medium};
|
|
8
8
|
align-items: center;
|
|
9
|
-
`,
|
|
10
|
-
color: ${
|
|
11
|
-
background: ${
|
|
12
|
-
border: 1px solid ${
|
|
9
|
+
`,d=r(o)`
|
|
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
13
|
line-height: normal;
|
|
14
14
|
transition: background 0.15s ease-in;
|
|
15
15
|
|
|
16
16
|
svg {
|
|
17
17
|
z-index: auto;
|
|
18
|
-
fill: ${
|
|
18
|
+
fill: ${e.text.static_icons__default.rgba};
|
|
19
19
|
}
|
|
20
|
-
`,c=
|
|
20
|
+
`,c=r(t)`
|
|
21
21
|
> div {
|
|
22
22
|
box-shadow: none;
|
|
23
23
|
outline: none !important;
|
|
24
|
-
background: ${
|
|
24
|
+
background: ${e.ui.background__default.rgba};
|
|
25
25
|
> input {
|
|
26
|
-
color: ${
|
|
26
|
+
color: ${e.text.static_icons__default.rgba};
|
|
27
27
|
}
|
|
28
28
|
> input:focus {
|
|
29
|
-
box-shadow: inset 0px -2px 0px 0px ${
|
|
29
|
+
box-shadow: inset 0px -2px 0px 0px ${e.interactive.primary__resting.rgba};
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,l=
|
|
32
|
+
`,l=r(i.Item)`
|
|
33
33
|
outline: none !important;
|
|
34
34
|
> div {
|
|
35
35
|
grid-template-columns: 1fr auto;
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,u=r(o)`
|
|
38
38
|
background: none;
|
|
39
|
-
`;export{
|
|
39
|
+
`;export{u as Chip,s as Container,d as FilterChip,l as MenuItem,c as Search,n as Wrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useRef as o,useState as i}from"react";import{Icon as l,Menu as n}from"@equinor/eds-core-react";import{sort as c,radio_button_selected as a,radio_button_unselected as s}from"@equinor/eds-icons";import{colors as m}from"../../atoms/style/colors.js";import{Chip as p,MenuItem as d}from"./Sieve.styles.js";const u=({options:u,selectedOption:f,setSelectedOption:h})=>{const b=o(null),[v,y]=i(!1);return 0===u.length?null:e(t,{children:[e(p,{ref:b,onClick:()=>{y(!v)},children:["Sort by ",r(l,{data:c})]}),v&&r(n,{open:!0,anchorEl:b.current,onClose:()=>{y(!1)},placement:"bottom-start",children:r(n.Section,{title:"Sort by",children:u.map((t=>e(d,{onClick:()=>(e=>{h(e)})(t),children:[t.label,r(l,{data:f?.value===t.value?a:s,color:m.interactive.primary__resting.rgba})]},`sort-item-${t.value}`)))})})]})};export{u as default};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useState as n}from"react";import{Chip as t,Button as i,Menu as a,Icon as r,Typography as d}from"@equinor/eds-core-react";import{filter_list as l}from"@equinor/eds-icons";import{tokens as s}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../../atoms/style/colors.js";import{spacings as c}from"../../atoms/style/spacings.js";import m from"styled-components";const{colors:u}=s,p=m.div`
|
|
2
2
|
margin-left: auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
gap: 25px;
|
|
6
|
-
`,g=
|
|
7
|
-
background: ${
|
|
8
|
-
`,f=
|
|
6
|
+
`,g=m(t)`
|
|
7
|
+
background: ${o=>o.$backgroundColor};
|
|
8
|
+
`,f=m(i)`
|
|
9
9
|
justify-self: flex-end;
|
|
10
|
-
`,h=
|
|
10
|
+
`,h=m(a)`
|
|
11
11
|
overflow-y: auto;
|
|
12
|
-
`,v=
|
|
12
|
+
`,v=m.div`
|
|
13
13
|
padding: ${c.medium};
|
|
14
14
|
padding-left: ${c.large};
|
|
15
|
-
`,b=
|
|
15
|
+
`,b=m(a.Item)`
|
|
16
16
|
&:focus {
|
|
17
17
|
outline: none;
|
|
18
|
-
background: ${
|
|
18
|
+
background: ${u.ui.background__light.rgba};
|
|
19
19
|
}
|
|
20
|
-
`,C=({onChange:
|
|
20
|
+
`,C=({onChange:t,customIcon:i,menuTitle:a,data:s,showChip:c=!1,chipColor:m=u.ui.background__default.rgba})=>{const[C,k]=n(!1),[y,_]=n(null),[x,$]=n(),j=()=>k(!1);return o(p,{children:[c&&x&&e(g,{"data-testid":"chip",onDelete:()=>{j(),t(void 0),$(void 0)},variant:"default",$backgroundColor:m,children:x}),e(f,{"data-testid":"menuButton",variant:"ghost_icon",onClick:o=>(o=>{const e=o.target;_(e),k(!C)})(o),children:e(r,{data:i??l})}),o(h,{open:C,anchorEl:y,onClose:j,placement:"bottom-end","data-testid":"menuContainer",children:[e(v,{children:e(d,{group:"navigation",variant:"label",children:a})}),s.map(((o,n)=>e(b,{onClick:()=>{return e=o,k(!1),void(x===e?($(void 0),t(void 0)):($(e),t(e)));var e},disabled:x===o&&c,active:x===o&&!c,children:e(d,{group:"navigation",variant:"menu_title",as:"span",children:o})},o+n)))]})]})};C.displayName="SingleFilterMenu";export{C as SingleFilterMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as t,useMemo as i}from"react";import{Typography as n,Icon as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as t,useMemo as i}from"react";import{Typography as n,Icon as o}from"@equinor/eds-core-react";import{check as a}from"@equinor/eds-icons";import{tokens as s}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../../atoms/style/colors.js";import{spacings as l}from"../../atoms/style/spacings.js";import d from"styled-components";const{colors:c,shape:p}=s,m=d.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: ${l.small};
|
|
4
4
|
align-items: center;
|
|
@@ -22,4 +22,4 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as t,useMemo a
|
|
|
22
22
|
> svg {
|
|
23
23
|
transform: scale(0.9);
|
|
24
24
|
}
|
|
25
|
-
`,_=({currentIndex:s,setCurrentIndex:l,index:d,onlyShowCurrentStepLabel:p=!1,children:_})=>{const[b,g]=t(null),h=i((()=>e(u,d>=s?{$filled:d===s,children:e(n,{variant:"caption",children:d+1})}:{$outlined:!0,"data-testid":"wrapper",children:e(
|
|
25
|
+
`,_=({currentIndex:s,setCurrentIndex:l,index:d,onlyShowCurrentStepLabel:p=!1,children:_})=>{const[b,g]=t(null),h=i((()=>e(u,d>=s?{$filled:d===s,children:e(n,{variant:"caption",children:d+1})}:{$outlined:!0,"data-testid":"wrapper",children:e(o,{data:a,color:c.interactive.primary__resting.rgba})})),[d,s]),x=i((()=>d<s?"body_short":"body_short_bold"),[s,d]),f=i((()=>d>s?c.interactive.disabled__text.rgba:c.text.static_icons__default.rgba),[s,d]);return r(m,{"data-testid":"step",ref:e=>{null===b&&null!==e&&g(e)},style:null===b||p?void 0:{width:`calc(${b.clientWidth}px)`},$clickable:d<s,onClick:()=>{d<s&&l(d)},children:[h,(!p||s===d)&&e(n,{variant:x,color:f,children:_})]})};export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{spacings as r}from"../../atoms/style/spacings.js";import
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import o from"./Step.js";import n from"./StepLine.js";import s from"styled-components";const i=s.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns:
|
|
4
4
|
repeat(${({$stepAmount:t})=>t-1}, auto 1fr)
|
|
@@ -7,4 +7,4 @@ import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{s
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
width: 100%;
|
|
9
9
|
${({$maxWidth:t})=>t&&`max-width: ${t}`}
|
|
10
|
-
`,
|
|
10
|
+
`,m=({current:r,setCurrent:s,steps:m,onlyShowCurrentStepLabel:p=!1,maxWidth:a})=>{const d=e((()=>{const e=[];return m.forEach(((i,a)=>{e.push(t(o,{index:a,currentIndex:r,setCurrentIndex:s,onlyShowCurrentStepLabel:p,children:i},`step-${a}`)),a!==m.length-1&&e.push(t(n,{done:r>a},`step-line-${a}`))})),e}),[r,p,s,m]);return t(i,{$stepAmount:m.length,$maxWidth:a,"data-testid":"stepper-container",children:d})};export{m as Stepper};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{TextField as n}from"@equinor/eds-core-react";import{
|
|
2
|
-
${t=>t.variant?`\n input, textarea {\n color: ${
|
|
3
|
-
`,
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{TextField as n}from"@equinor/eds-core-react";import{colors as o}from"../../atoms/style/colors.js";import r from"styled-components";const e=r(n)`
|
|
2
|
+
${t=>t.variant?`\n input, textarea {\n color: ${o.text.static_icons__default.rgba}\n }\n `:`\n input, textarea {\n color: ${o.text.static_icons__default.rgba}\n }\n div:focus-within {\n outline: none !important;\n input, textarea{\n box-shadow: inset 0 -2px 0 0 ${o.interactive.primary__resting.rgba};\n }\n }\n `}
|
|
3
|
+
`,i=n=>t(e,{...n});export{i as TextField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";const i=()=>e("svg",{viewBox:"0 0 1500 1500",xmlns:"http://www.w3.org/2000/svg",children:[t("filter",{id:"noiseFilter",children:t("feTurbulence",{type:"fractalNoise",baseFrequency:1.5,numOctaves:3,stitchTiles:"stitch"})}),t("rect",{width:"100%",height:"100%",filter:"url(#noiseFilter)"})]});export{i as NoiseSvg};
|
|
@@ -1,48 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
2
|
-
--topGradientColor: #77d9dd;
|
|
3
|
-
--bottomGradientColor: #407577;
|
|
4
|
-
|
|
5
|
-
height: calc(100vh - 64px);
|
|
6
|
-
width: 100%;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
position: relative;
|
|
9
|
-
background: linear-gradient(
|
|
10
|
-
180deg,
|
|
11
|
-
var(--bottomGradientColor) 0%,
|
|
12
|
-
var(--topGradientColor) 100%
|
|
13
|
-
);
|
|
14
|
-
> svg {
|
|
15
|
-
position: absolute;
|
|
16
|
-
filter: grayscale(1);
|
|
17
|
-
mix-blend-mode: color-burn;
|
|
18
|
-
z-index: 0;
|
|
19
|
-
}
|
|
20
|
-
`,n=a.div`
|
|
21
|
-
--heightFromBottom: ${({heightFromBottom:t})=>`${t}px`};
|
|
22
|
-
bottom: var(--heightFromBottom);
|
|
23
|
-
width: 100%;
|
|
24
|
-
--rotate3d: rotateX(330deg) rotateY(-15deg) scaleX(1.2);
|
|
25
|
-
position: absolute;
|
|
26
|
-
`,l=o`
|
|
27
|
-
0% {
|
|
28
|
-
transform: var(--rotate3d) translateY(-2px) rotateX(0) scaleY(1);
|
|
29
|
-
}
|
|
30
|
-
50% {
|
|
31
|
-
transform: var(--rotate3d) translateY(5px) rotateX(60deg) scaleY(0.8);
|
|
32
|
-
}
|
|
33
|
-
100% {
|
|
34
|
-
transform: var(--rotate3d) translateY(-2px) rotateX(0) scaleY(1);
|
|
35
|
-
}
|
|
36
|
-
`,s=a.div`
|
|
37
|
-
position: absolute;
|
|
38
|
-
height: 100%;
|
|
39
|
-
min-height: 1000px;
|
|
40
|
-
width: 100%;
|
|
41
|
-
top: ${({waveIntervalDist:t})=>`${t}rem`};
|
|
42
|
-
transform-origin: top;
|
|
43
|
-
transform: var(--rotate3d) translateY(-2px) scaleY(1);
|
|
44
|
-
filter: grayscale(1);
|
|
45
|
-
mix-blend-mode: overlay;
|
|
46
|
-
|
|
47
|
-
animation: ${l} 5.5s infinite ease alternate;
|
|
48
|
-
`,d=()=>t("svg",{viewBox:"0 0 1500 1500",xmlns:"http://www.w3.org/2000/svg",children:[e("filter",{id:"noiseFilter",children:e("feTurbulence",{type:"fractalNoise",baseFrequency:1.5,numOctaves:3,stitchTiles:"stitch"})}),e("rect",{width:"100%",height:"100%",filter:"url(#noiseFilter)"})]}),m=({waveIntervalDist:a=3,waveDelay:o=.75,numWaves:l=10,heightFromBottom:m=600})=>{const h=Array.from({length:l},((t,e)=>({waveIntervalDist:e*a,delay:e*o,altWave:e%2==0})));return t(i,{children:[e(d,{}),e(n,{heightFromBottom:m,children:h.map(((t,a)=>e(s,{waveIntervalDist:t.waveIntervalDist,style:{animationDelay:`${t.delay}s`},children:e(r,{index:a,isAltWave:t.altWave})},a)))})]})};export{m as Waves};
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{NoiseSvg as a}from"./NoiseSvg.js";import{Container as r,WaveInnerContainer as i,Wave as o}from"./Waves.styles.js";import{WaveShapeWithNoise as s}from"./WaveShapeWithNoise.js";const l=({waveIntervalDist:l=3,waveDelay:m=.75,numWaves:n=10,heightFromBottom:v=600})=>{const h=Array.from({length:n},((e,t)=>({waveIntervalDist:t*l,delay:t*m,altWave:t%2==0})));return e(r,{children:[t(a,{}),t(i,{$heightFromBottom:v,children:h.map(((e,a)=>t(o,{$waveIntervalDist:e.waveIntervalDist,style:{animationDelay:`${e.delay}s`},children:t(s,{index:a,isAltWave:e.altWave})},a)))})]})};export{l as Waves};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface WaveInnerContainerProps {
|
|
2
|
+
$heightFromBottom: number;
|
|
3
|
+
}
|
|
4
|
+
export declare const WaveInnerContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WaveInnerContainerProps>> & string;
|
|
5
|
+
interface WaveProps {
|
|
6
|
+
$waveIntervalDist: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const Wave: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WaveProps>> & string;
|
|
9
|
+
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
export {};
|