@equinor/amplify-component-lib 10.5.1 → 10.6.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.
@@ -1,6 +1,6 @@
1
- import * as react145 from "react";
1
+ import * as react147 from "react";
2
2
 
3
3
  //#region src/atoms/hooks/useLocalStorage.d.ts
4
- declare const useLocalStorage: <T>(key: string, defaultState: T, keepAliveMs?: number) => readonly [T, react145.Dispatch<react145.SetStateAction<T>>, () => void];
4
+ declare const useLocalStorage: <T>(key: string, defaultState: T, keepAliveMs?: number) => readonly [T, react147.Dispatch<react147.SetStateAction<T>>, () => void];
5
5
  //#endregion
6
6
  export { useLocalStorage };
@@ -1,6 +1,6 @@
1
1
  import { SelectOption, SelectOptionRequired } from "../../molecules/Select/Select.types.js";
2
2
  import { SelectComponentProps } from "../../molecules/Select/Select.js";
3
- import * as react147 from "react";
3
+ import * as react145 from "react";
4
4
  import { ChangeEvent, KeyboardEvent } from "react";
5
5
 
6
6
  //#region src/atoms/hooks/useSelect.d.ts
@@ -16,8 +16,8 @@ declare const useSelect: <T extends SelectOptionRequired>(props: SelectComponent
16
16
  handleOnOpen: () => void;
17
17
  handleOnRemoveItem: (item: SelectOption<T>) => void;
18
18
  search: string;
19
- searchRef: react147.RefObject<HTMLInputElement | null>;
20
- itemRefs: react147.RefObject<(HTMLButtonElement | null)[]>;
19
+ searchRef: react145.RefObject<HTMLInputElement | null>;
20
+ itemRefs: react145.RefObject<(HTMLButtonElement | null)[]>;
21
21
  selectedValues: T[];
22
22
  open: boolean;
23
23
  tryingToRemoveItem: T | undefined;
@@ -179,7 +179,7 @@ import{css as e}from"styled-components";const t=e`
179
179
  );
180
180
 
181
181
  --eds_interactive__icon_on_interactive_colors: var(
182
- --eds_text__static_icons__default
182
+ --eds_text__static_icons__primary_white
183
183
  );
184
184
 
185
185
  --eds_ui__chip__badge_color: var(--eds_text__static_icons__default);
@@ -1,4 +1,4 @@
1
- import * as react13 from "react";
1
+ import * as react11 from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { ButtonProps, DialogProps } from "@equinor/eds-core-react";
4
4
  import { IconData } from "@equinor/eds-icons";
@@ -51,6 +51,6 @@ interface DialogProps$1 extends Omit<DialogProps, 'title'> {
51
51
  * @param additionalInfo - Defaults to empty, and won't show the additional info button
52
52
  * Also inherits props from EDS dialog
53
53
  */
54
- declare const Dialog$1: react13.ForwardRefExoticComponent<DialogProps$1 & react13.RefAttributes<HTMLDivElement>>;
54
+ declare const Dialog$1: react11.ForwardRefExoticComponent<DialogProps$1 & react11.RefAttributes<HTMLDivElement>>;
55
55
  //#endregion
56
56
  export { Dialog$1 as Dialog, DialogAction, DialogProps$1 as DialogProps };
@@ -1,11 +1,11 @@
1
1
  import { SizeIconProps } from "../../atoms/types/Icon.js";
2
- import * as react11 from "react";
2
+ import * as react13 from "react";
3
3
 
4
4
  //#region src/molecules/EquinorLogo/EquinorLogo.d.ts
5
5
  interface EquinorLogoProps extends Partial<SizeIconProps> {
6
6
  large?: boolean;
7
7
  color?: 'red' | 'white' | 'black';
8
8
  }
9
- declare const EquinorLogo: react11.ForwardRefExoticComponent<EquinorLogoProps & react11.RefAttributes<SVGSVGElement>>;
9
+ declare const EquinorLogo: react13.ForwardRefExoticComponent<EquinorLogoProps & react13.RefAttributes<SVGSVGElement>>;
10
10
  //#endregion
11
11
  export { EquinorLogo, EquinorLogoProps };
@@ -1,10 +1,10 @@
1
- import { FC } from "react";
1
+ import { FC, ReactNode } from "react";
2
2
 
3
3
  //#region src/molecules/InformationalNotice/InformationalNotice.d.ts
4
4
  interface InformationalNoticeProps {
5
5
  color?: 'grey' | 'white';
6
6
  spacing?: 'compact' | 'comfortable';
7
- children: string;
7
+ children: string | ReactNode | ReactNode[];
8
8
  }
9
9
  declare const InformationalNotice: FC<InformationalNoticeProps>;
10
10
  //#endregion
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{Container as t}from"./InformationalNotice.styles.js";import{getIconSize as n}from"./InformationalNotice.utils.js";import{Icon as r,Typography as i}from"@equinor/eds-core-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{info_circle as s}from"@equinor/eds-icons";const c=({children:c,color:l=`grey`,spacing:u=`comfortable`})=>o(t,{$spacing:u,$color:l,children:[a(r,{data:s,color:e.text.static_icons__default.rgba,size:n(u)}),a(i,{variant:`body_long`,children:c})]});export{c as InformationalNotice};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{Container as t}from"./InformationalNotice.styles.js";import{getIconSize as n}from"./InformationalNotice.utils.js";import{Icon as r,Typography as i}from"@equinor/eds-core-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{info_circle as s}from"@equinor/eds-icons";const c=({children:c,color:l=`grey`,spacing:u=`comfortable`})=>o(t,{$spacing:u,$color:l,children:[a(r,{data:s,color:e.text.static_icons__default.rgba,size:n(u)}),typeof c==`string`?a(i,{variant:`body_long`,children:c}):c]});export{c as InformationalNotice};
@@ -1,9 +1,10 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import n,{css as r}from"styled-components";const i={compact:{gap:t.medium_small,padding:t.small},comfortable:{gap:t.medium,padding:t.medium_small}},a=n.div`
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,{css as i}from"styled-components";const a={compact:{gap:t.medium_small,padding:t.small},comfortable:{gap:t.medium,padding:t.medium_small}},o=r.div`
2
2
  display: grid;
3
3
  grid-template-columns: auto 1fr;
4
+ border-radius: ${n.corners.borderRadius};
4
5
  background: ${({$color:t})=>t===`white`?e.ui.background__default.rgba:e.ui.background__light.rgba};
5
- ${({$spacing:e})=>{let{gap:t,padding:n}=i[e];return r`
6
+ ${({$spacing:e})=>{let{gap:t,padding:n}=a[e];return i`
6
7
  padding: ${n};
7
8
  gap: ${t};
8
9
  `}}
9
- `;export{a as Container};
10
+ `;export{o as Container};
@@ -1 +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};
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{useRef as c,useState as l}from"react";import{Button as u,Icon as d,Typography as f}from"@equinor/eds-core-react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{chevron_down as h,chevron_up as g}from"@equinor/eds-icons";import{AnimatePresence as _}from"motion/react";import{useLocation as v}from"@tanstack/react-router";import{FaqService as y}from"@equinor/subsurface-app-management";const b=({id:b,question:x,createdDate:S,answer:C})=>{t({richTextValues:C?[C]:[],onImageRead:e=>y.getFaqImage(e)});let{hash:w}=v(),T=c(w===`faq-${b}`),[E,D]=l(T.current);return p(s,{children:m(r,{children:[p(a,{id:`faq-${b}`,children:p(f,{variant:`h4`,children:x})}),m(o,{children:[p(f,{group:`paragraph`,variant:`caption`,children:e(S)}),p(u,{variant:`ghost_icon`,onClick:()=>{D(e=>!e),T.current&&=!1},"data-testid":`toggle-open`,"aria-label":E?`Collapse answer to: ${x}`:`Expand answer to: ${x}`,children:p(d,{data:E?g:h})})]}),p(_,{children:E&&p(i,{initial:{height:T.current?`auto`:0},exit:{height:0},animate:{height:`auto`},children:p(n,{value:C,onImageRead:e=>y.getFaqImage(e),padding:`none`})})})]})})};export{b as Question};
@@ -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"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
+ import{colors as e}from"../../atoms/style/colors.js";import{Container as t,Content as n,SearchAndValuesWrapper as r,SearchField as i,SearchFieldWrapper as a,Section as o,StyledChip as s,Wrapper as c}from"./Filter.styles.js";import{getFilteredAutoCompleteOptions as l}from"./Filter.utils.js";import{AutoCompleteMenu as u}from"./AutoCompleteMenu.js";import{AutoCompleteText as d}from"./AutoCompleteText.js";import{useRef as f,useState as p}from"react";import{Button as m,Icon as h,Typography as g}from"@equinor/eds-core-react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{arrow_drop_down as y,arrow_drop_up as b,clear as x,info_circle as S,search as C}from"@equinor/eds-icons";import{AnimatePresence as w,motion as T}from"motion/react";function E({values:E,search:D,onSearchChange:O,onSearchEnter:k,onClearFilter:A,onClearAllFilters:j,children:M,topContent:N,inlineContent:P,initialOpen:F=!1,placeholder:I=`Search...`,id:L,openOnFocus:R=!0,...z}){let B=f(null),V=f(null),[H,U]=p(F),[W,G]=p(void 0),K=f(F?`auto`:0),q=()=>{U(e=>!e),K.current===`auto`&&(K.current=0)},J=()=>{!H&&R&&U(!0)},Y=()=>{B.current?.focus()},X=e=>{if(!(`autoCompleteOptions`in z)){k(e);return}let t=l({searchValue:e,autoCompleteOptions:z.autoCompleteOptions});if(t.length===1){z.onAutoComplete(t[0].key,t[0]);return}k(e)},Z=e=>{if(e.key===`Enter`&&D!==``)X(D);else if(e.key===`Backspace`&&D===``){if(W===void 0){for(let e of Object.keys(E).toReversed())if(E[e].length>0){G(e);break}return}A(W,E[W].length-1),G(void 0)}},Q=Object.values(E).some(e=>e.length>0);return v(c,{id:L,children:[N,v(t,{children:[v(o,{ref:V,onClick:Y,children:[_(h,{data:C,color:e.text.static_icons__tertiary.rgba}),v(r,{children:[Object.keys(E).flatMap(e=>E[e].map(({label:t,icon:n},r,i)=>_(s,{onDelete:()=>A(e,r),leadingIconData:n,$tryingToRemove:W===e&&r===i.length-1,children:t},`${t}-${r}-${e}`))),v(a,{children:[`autoCompleteOptions`in z&&z.autoCompleteOptions&&_(d,{search:D,autoCompleteOptions:z.autoCompleteOptions}),_(i,{ref:B,id:`filter-search-${L}`,type:`search`,autoComplete:`off`,value:D,placeholder:Q?void 0:I,onChange:O,onKeyDownCapture:Z,onFocus:J})]})]}),Object.values(E).some(e=>e.length>0)&&_(m,{variant:`ghost_icon`,onClick:j,"data-testid":`clear-all-x`,children:_(h,{data:x,size:18,color:e.text.static_icons__tertiary.rgba})})]}),P,v(`button`,{onClick:q,"data-testid":`toggle-open-button`,children:[_(g,{variant:`button`,group:`navigation`,as:`span`,children:`Filters`}),_(h,{data:H?b:y,color:e.text.static_icons__tertiary.rgba})]})]}),_(w,{children:H&&_(T.div,{animate:{height:`auto`},initial:{height:K.current},exit:{height:0},children:v(n,{children:[v(`span`,{children:[_(h,{data:S,size:16,color:e.text.static_icons__tertiary.rgba}),_(g,{variant:`label`,group:`input`,color:e.text.static_icons__tertiary.rgba,children:`Type a keyword and press enter`})]}),M]})})}),`autoCompleteOptions`in z&&z.autoCompleteOptions&&_(u,{isFilterOpen:H,search:D,anchorElement:V.current,autoCompleteOptions:z.autoCompleteOptions,onAutoComplete:z.onAutoComplete,searchElement:B.current})]})}export{E as Filter};
@@ -42,9 +42,8 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
42
42
  }
43
43
  min-height: calc(48px - (2 * ${t.medium_small}));
44
44
  align-items: center;
45
- flex-grow: 1;
46
45
  display: flex;
47
- flex-wrap: wrap;
46
+ flex-grow: 1;
48
47
  gap: ${t.x_small};
49
48
  padding: ${t.medium_small} ${t.small};
50
49
  cursor: text;
@@ -66,7 +65,12 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
66
65
  height: 24px;
67
66
  }
68
67
  }
69
- `,d=a.input`
68
+ `,d=a.span`
69
+ display: flex;
70
+ flex-wrap: wrap;
71
+ flex-grow: 1;
72
+ gap: ${t.x_small};
73
+ `,f=a.input`
70
74
  background: transparent;
71
75
  width: 0;
72
76
  flex-grow: 1;
@@ -86,7 +90,7 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
86
90
  &::-webkit-search-results-decoration {
87
91
  display: none;
88
92
  }
89
- `,f=a(s.div)`
93
+ `,p=a(s.div)`
90
94
  border-bottom-left-radius: ${n.corners.borderRadius};
91
95
  border-bottom-right-radius: ${n.corners.borderRadius};
92
96
  background: ${e.ui.background__default.rgba};
@@ -99,12 +103,12 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
99
103
  display: flex;
100
104
  gap: ${t.x_small};
101
105
  }
102
- `,p=a(i)`
106
+ `,m=a(i)`
103
107
  ${({$tryingToRemove:t})=>{if(t)return o`
104
108
  background: ${e.interactive.primary__hover_alt.rgba};
105
109
  `}}
106
- `,m=a.section`
110
+ `,h=a.section`
107
111
  position: relative;
108
112
  flex-grow: 1;
109
113
  display: flex;
110
- `;export{l as Container,f as Content,d as SearchField,m as SearchFieldWrapper,u as Section,p as StyledChip,c as Wrapper};
114
+ `;export{l as Container,p as Content,d as SearchAndValuesWrapper,f as SearchField,h as SearchFieldWrapper,u as Section,m as StyledChip,c as Wrapper};
@@ -24,4 +24,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
24
24
  display: flex;
25
25
  gap: ${t.medium};
26
26
  align-items: center;
27
- `,C=d(({applicationName:n,releaseDate:d,createdDate:h,tags:C,version:w,title:T,body:E,actionMenu:D,expanded:O=!1},k)=>{let A=o({releaseDate:d,createdDate:h}),j=f(O?`auto`:c),[M,N]=p(O),[P,F]=p(i(E).length>0),I=f(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>c&&F(!0)}));return _(b,{ref:k,style:{paddingBottom:M?t.medium:void 0},children:[_(x,{children:[_(S,{children:[g(m,{variant:`caption`,color:e.text.static_icons__secondary.rgba,children:n}),_(m,{variant:`overline`,color:e.text.static_icons__tertiary.rgba,children:[r(A),w?` ・ ${w}`:``,` ・ `,a(E)]})]}),g(u,{tags:C,children:D})]}),g(m,{variant:`h4`,children:T}),g(v.div,{ref:e=>{e&&I.current.observe(e)},initial:{height:j.current},animate:{height:M?`auto`:c},style:{overflow:M?`auto`:void 0},children:g(s,{value:E,onImageRead:y.getReleaseNoteImage,padding:`none`})}),P&&!O&&g(l,{expanded:M,onToggleExpanded:()=>{N(e=>!e)}})]})});C.displayName=`ReleaseNote`;export{C as ReleaseNote};
27
+ `,C=d(({applicationName:d,releaseDate:h,createdDate:C,tags:w,version:T,title:E,body:D,actionMenu:O,expanded:k=!1},A)=>{let j=o({releaseDate:h,createdDate:C}),M=f(k?`auto`:c),[N,P]=p(k),[F,I]=p(i(D).length>0),L=f(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>c&&I(!0)}));return _(b,{ref:A,style:{paddingBottom:N?t.medium:void 0},children:[_(x,{children:[_(S,{children:[g(m,{variant:`caption`,color:e.text.static_icons__secondary.rgba,children:d}),_(m,{variant:`overline`,color:e.text.static_icons__tertiary.rgba,children:[r(j),T?` ・ ${T}`:``,` ・ `,a(D)]})]}),g(u,{tags:w,children:O})]}),g(m,{variant:`h4`,children:E}),g(v.div,{ref:e=>{e&&L.current.observe(e)},initial:{height:M.current},animate:{height:N?`auto`:c},style:{overflow:N?`auto`:void 0,marginBottom:N&&F?`calc(${t.medium} + ${n.button.minHeight})`:void 0},children:g(s,{value:D,onImageRead:y.getReleaseNoteImage,padding:`none`})}),F&&!k&&g(l,{expanded:N,onToggleExpanded:()=>{P(e=>!e)}})]})});C.displayName=`ReleaseNote`;export{C as ReleaseNote};
@@ -1,9 +1,9 @@
1
- import * as react137 from "react";
1
+ import * as react135 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: react137.ForwardRefExoticComponent<DescriptionProps & react137.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Description: react135.ForwardRefExoticComponent<DescriptionProps & react135.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Description };
@@ -1,4 +1,4 @@
1
- import * as react135 from "react";
1
+ import * as react137 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: react135.ForwardRefExoticComponent<MissingAccessesProps & react135.RefAttributes<HTMLDivElement>>;
12
+ declare const MissingAccesses: react137.ForwardRefExoticComponent<MissingAccessesProps & react137.RefAttributes<HTMLDivElement>>;
13
13
  //#endregion
14
14
  export { MissingAccesses };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/PageNotFound.d.ts
4
4
  interface PageNotFoundProps {
@@ -12,6 +12,6 @@ declare const PageNotFound: ({
12
12
  redirectFallbackUrl,
13
13
  onBackClick,
14
14
  hideBackButton
15
- }: PageNotFoundProps) => react_jsx_runtime11.JSX.Element;
15
+ }: PageNotFoundProps) => react_jsx_runtime12.JSX.Element;
16
16
  //#endregion
17
17
  export { PageNotFound };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/ServerError.d.ts
4
4
  interface ServerErrorProps {
@@ -12,6 +12,6 @@ declare const ServerError: ({
12
12
  redirectFallbackUrl,
13
13
  onBackClick,
14
14
  hideBackButton
15
- }: ServerErrorProps) => react_jsx_runtime12.JSX.Element;
15
+ }: ServerErrorProps) => react_jsx_runtime11.JSX.Element;
16
16
  //#endregion
17
17
  export { ServerError };
@@ -1,4 +1,5 @@
1
1
  import { ReactElement } from "react";
2
+ import { TooltipProps } from "@equinor/eds-core-react";
2
3
  import { IconData } from "@equinor/eds-icons";
3
4
 
4
5
  //#region src/organisms/ToggleGroup/ToggleGroup.types.d.ts
@@ -8,12 +9,18 @@ interface ToggleGroupOptionWithLabel {
8
9
  }
9
10
  interface ToggleGroupOptionOnlyIcon {
10
11
  icon: IconData;
12
+ tooltip?: undefined;
13
+ }
14
+ interface ToggleGroupOptionOnlyIconWithTooltip {
15
+ icon: IconData;
16
+ tooltip: string;
17
+ tooltipPlacement?: TooltipProps['placement'];
11
18
  }
12
19
  type ToggleGroupOption = {
13
20
  onToggle: (newValue: boolean) => void;
14
21
  checked: boolean;
15
22
  disabled?: boolean;
16
- } & (ToggleGroupOptionWithLabel | ToggleGroupOptionOnlyIcon);
23
+ } & (ToggleGroupOptionWithLabel | ToggleGroupOptionOnlyIcon | ToggleGroupOptionOnlyIconWithTooltip);
17
24
  /**
18
25
  * @param variant - Defaults to 'filled'
19
26
  */
@@ -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{forwardRef as r}from"react";import{Icon as i,Typography as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.button`
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{OptionalTooltip as r}from"../../molecules/OptionalTooltip/OptionalTooltip.js";import{forwardRef as i}from"react";import{Icon as a,Typography as o}from"@equinor/eds-core-react";import s from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=s.button`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  padding: calc(${t.medium_small} / 2); // 6px in comfortable
@@ -55,4 +55,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
55
55
  fill: ${e.interactive.disabled__text.rgba};
56
56
  }
57
57
  }
58
- `,u=r(({checked:e,onToggle:t,icon:n,disabled:r,...o},u)=>{let d=()=>{t(!e)};return c(l,{ref:u,"aria-checked":e,onClick:d,disabled:r,...o,children:[n?s(i,{data:n,size:24}):null,`label`in o?s(a,{as:`span`,variant:`button`,group:`navigation`,children:o.label}):null]})});u.displayName=`ToggleGroupOption`;export{u as ToggleGroupOption};
58
+ `,d=i(({checked:e,onToggle:t,icon:n,disabled:i,...s},d)=>{let f=`tooltip`in s?{...s,tooltip:void 0,toolTipPlacement:void 0}:{...s},p=()=>{t(!e)};return l(u,{ref:d,"aria-checked":e,onClick:p,disabled:i,...f,children:[n?`tooltip`in s&&s.tooltip?c(r,{title:s.tooltip,placement:s.tooltipPlacement,children:c(a,{data:n,size:24})}):c(a,{data:n,size:24}):null,`label`in s?c(o,{as:`span`,variant:`button`,group:`navigation`,children:s.label}):null]})});d.displayName=`ToggleGroupOption`;export{d as ToggleGroupOption};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/amplify-component-lib",
3
- "version": "10.5.1",
3
+ "version": "10.6.0",
4
4
  "description": "Frontend Typescript components for the Amplify team",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",