@equinor/amplify-component-lib 11.0.3 → 11.0.5

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.
Files changed (27) hide show
  1. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
  2. package/dist/deprecated/IconToggleButton.d.ts +2 -2
  3. package/dist/molecules/Banner/Banner.styles.js +1 -1
  4. package/dist/molecules/Chip/Chip.d.ts +2 -2
  5. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  6. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
  7. package/dist/molecules/Search/Search.d.ts +2 -2
  8. package/dist/molecules/Select/SearchBar.js +1 -1
  9. package/dist/molecules/Select/Select.styles.js +12 -7
  10. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
  11. package/dist/organisms/Filter/Filter.d.ts +2 -2
  12. package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
  13. package/dist/organisms/Filter/SortMenu.d.ts +2 -2
  14. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  15. package/dist/organisms/Status/Action.d.ts +2 -2
  16. package/dist/organisms/Status/Description.d.ts +2 -2
  17. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  18. package/dist/organisms/Status/Title.d.ts +2 -2
  19. package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
  20. package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
  21. package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
  22. package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
  23. package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
  24. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  25. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  26. package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +16 -6
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import * as react1 from "react";
1
+ import * as react0 from "react";
2
2
  import { IconData } from "@equinor/eds-icons";
3
3
 
4
4
  //#region src/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts
@@ -12,6 +12,6 @@ interface ExpandingIconButtonProps {
12
12
  /**
13
13
  * @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
14
14
  */
15
- declare const ExpandingIconButton: react1.ForwardRefExoticComponent<ExpandingIconButtonProps & react1.RefAttributes<HTMLDivElement>>;
15
+ declare const ExpandingIconButton: react0.ForwardRefExoticComponent<ExpandingIconButtonProps & react0.RefAttributes<HTMLDivElement>>;
16
16
  //#endregion
17
17
  export { ExpandingIconButton };
@@ -1,4 +1,4 @@
1
- import * as react3 from "react";
1
+ import * as react1 from "react";
2
2
  import { IconData } from "@equinor/eds-icons";
3
3
 
4
4
  //#region src/deprecated/IconToggleButton.d.ts
@@ -21,6 +21,6 @@ interface IconToggleButtonProps {
21
21
  /**
22
22
  * @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
23
23
  */
24
- declare const IconToggleButton: react3.ForwardRefExoticComponent<IconToggleButtonProps & react3.RefAttributes<HTMLButtonElement>>;
24
+ declare const IconToggleButton: react1.ForwardRefExoticComponent<IconToggleButtonProps & react1.RefAttributes<HTMLButtonElement>>;
25
25
  //#endregion
26
26
  export { IconToggleButton };
@@ -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";const i={info:{background:e.interactive.secondary__highlight.rgba,fill:e.interactive.secondary__resting.rgba},warning:{background:e.interactive.warning__highlight.rgba,fill:e.interactive.warning__resting.rgba},danger:{background:e.interactive.danger__highlight.rgba,fill:e.interactive.danger__text.rgba}},a={comfortable:{padding:t.medium_small,gap:t.medium},compact:{padding:`${t.x_small} ${t.small}`,gap:t.medium_small}},o=r.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 from"styled-components";const i={info:{background:e.ui.background__info.rgba,fill:e.interactive.secondary__resting.rgba},warning:{background:e.ui.background__warning.rgba,fill:e.interactive.warning__text.rgba},danger:{background:e.ui.background__danger.rgba,fill:e.interactive.danger__text.rgba}},a={comfortable:{padding:t.medium_small,gap:t.medium},compact:{padding:`${t.x_small} ${t.small}`,gap:t.medium_small}},o=r.div`
2
2
  height: fit-content;
3
3
  display: grid;
4
4
  grid-template-columns: auto 1fr;
@@ -1,4 +1,4 @@
1
- import * as react7 from "react";
1
+ import * as react5 from "react";
2
2
  import { HTMLAttributes, KeyboardEvent, MouseEvent, ReactNode } from "react";
3
3
  import { IconData } from "@equinor/eds-icons";
4
4
 
@@ -25,6 +25,6 @@ type DeletableChipProps = BaseChipProps & InteractiveChipBase & {
25
25
  onDelete: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
26
26
  };
27
27
  type ChipProps = Omit<HTMLAttributes<HTMLDivElement | HTMLButtonElement>, 'onClick'> & (ReadOnlyChipProps | ClickableChipProps | DeletableChipProps);
28
- declare const Chip: react7.ForwardRefExoticComponent<ChipProps & react7.RefAttributes<HTMLDivElement | HTMLButtonElement>>;
28
+ declare const Chip: react5.ForwardRefExoticComponent<ChipProps & react5.RefAttributes<HTMLDivElement | HTMLButtonElement>>;
29
29
  //#endregion
30
30
  export { BaseChipProps, Chip, ClickableChipProps, DeletableChipProps };
@@ -1,5 +1,5 @@
1
1
  import { Variants } from "../../atoms/types/variants.js";
2
- import * as react9 from "react";
2
+ import * as react7 from "react";
3
3
  import { DatePickerProps } from "@equinor/eds-core-react";
4
4
 
5
5
  //#region src/molecules/DatePicker/DatePicker.d.ts
@@ -9,11 +9,11 @@ type DatePickerProps$1 = Omit<DatePickerProps, 'variant' | 'defaultValue'> & {
9
9
  meta?: string;
10
10
  loading?: boolean;
11
11
  };
12
- declare const DatePicker$1: react9.ForwardRefExoticComponent<Omit<DatePickerProps, "defaultValue" | "variant"> & {
12
+ declare const DatePicker$1: react7.ForwardRefExoticComponent<Omit<DatePickerProps, "defaultValue" | "variant"> & {
13
13
  variant?: Variants;
14
14
  defaultValue?: Date | undefined;
15
15
  meta?: string;
16
16
  loading?: boolean;
17
- } & react9.RefAttributes<HTMLDivElement>>;
17
+ } & react7.RefAttributes<HTMLDivElement>>;
18
18
  //#endregion
19
19
  export { DatePicker$1 as DatePicker, DatePickerProps$1 as DatePickerProps };
@@ -1,5 +1,5 @@
1
1
  import { Variants } from "../../atoms/types/variants.js";
2
- import * as react5 from "react";
2
+ import * as react9 from "react";
3
3
  import { DateRangePickerProps } from "@equinor/eds-core-react";
4
4
 
5
5
  //#region src/molecules/DateRangePicker/DateRangePicker.d.ts
@@ -8,10 +8,10 @@ type DateRangePickerProps$1 = Omit<DateRangePickerProps, 'variant'> & {
8
8
  meta?: string;
9
9
  loading?: boolean;
10
10
  };
11
- declare const DateRangePicker$1: react5.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
11
+ declare const DateRangePicker$1: react9.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
12
12
  variant?: Variants;
13
13
  meta?: string;
14
14
  loading?: boolean;
15
- } & react5.RefAttributes<HTMLDivElement>>;
15
+ } & react9.RefAttributes<HTMLDivElement>>;
16
16
  //#endregion
17
17
  export { DateRangePicker$1 as DateRangePicker, DateRangePickerProps$1 as DateRangePickerProps };
@@ -1,10 +1,10 @@
1
- import * as react41 from "react";
1
+ import * as react39 from "react";
2
2
  import { SearchProps } from "@equinor/eds-core-react";
3
3
 
4
4
  //#region src/molecules/Search/Search.d.ts
5
5
  interface SearchProps$1 extends SearchProps {
6
6
  lightBackground?: boolean;
7
7
  }
8
- declare const Search$1: react41.ForwardRefExoticComponent<SearchProps$1 & react41.RefAttributes<HTMLInputElement>>;
8
+ declare const Search$1: react39.ForwardRefExoticComponent<SearchProps$1 & react39.RefAttributes<HTMLInputElement>>;
9
9
  //#endregion
10
10
  export { Search$1 as Search };
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{SkeletonField as n}from"../Skeleton/SkeletonField.js";import{ClearButton as r,ComboBoxChip as i,Container as a,HelperWrapper as o,PlaceholderText as s,Section as c,ValueText as l,Wrapper as u}from"./Select.styles.js";import{Icon as d}from"../index.js";import{useMemo as f,useRef as p}from"react";import{Label as m}from"@equinor/eds-core-react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{arrow_drop_down as _,arrow_drop_up as v,clear as y}from"@equinor/eds-icons";const b=({props:b,anchorRef:x,handleOnClear:S,handleOnSearchChange:C,handleOnSearchKeyDown:w,handleToggleOpen:T,search:E,selectedValues:D,handleOnOpen:O,handleOnRemoveItem:k,open:A,searchRef:j,tryingToRemoveItem:M})=>{let{clearable:N=!0,loading:P=!1,disabled:F=!1,lightBackground:I=!1,placeholder:L=`Select...`,label:R,helperText:z,showHelperIcon:B=!0,id:V=`amplify-combobox-${R}`,variant:H,"data-testid":U,mode:W=`menu`}=b,G=p(`${Math.max(40,Math.random()*80)}%`),K=f(()=>!!z,[z]),q=f(()=>{if(B)return t(H)},[B,H]),J=f(()=>{if(`value`in b&&b.value&&`customValueComponent`in b&&b.customValueComponent)return h(b.customValueComponent,{item:b.value});if(`value`in b&&b.value)return h(l,{children:b.value.label});if(`showSelectedAsText`in b&&b.showSelectedAsText){let e=b.items?b.items.length:b.groups.flatMap(e=>e.items).length;return h(l,{children:typeof b.showSelectedAsText==`function`?b.showSelectedAsText({selectedAmount:D.length,totalAmount:e}):`${D.length}/${e} Selected`})}else return D.map(e=>`customValueComponent`in b&&b.customValueComponent?h(b.customValueComponent,{item:e,onDelete:()=>k(e),tryingToRemove:M!==void 0&&M.value===e.value},e.value):h(i,{"data-testid":`amplify-combobox-chip`,className:`amplify-combo-box-chip`,onDelete:()=>k(e),$tryingToRemove:M?.value===e.value,$lightBackground:I,children:e.label},e.value))},[D,M,I,b,k]);return g(u,{$showBackgroundColor:W===`persistent`,children:[g(a,{"data-testid":U||`combobox-container`,ref:x,onClick:O,"aria-expanded":A,$variant:H,$loading:P,$lightBackground:I,children:[g(c,{children:[!P&&E===``&&D.length===0&&h(s,{children:L}),(E===``&&`value`in b||`values`in b&&D.length>0&&(!b.showSelectedAsText||b.showSelectedAsText&&E===``))&&!P&&J,h(`input`,{id:V,disabled:F||P,ref:j,type:`search`,role:`combobox`,value:E,autoComplete:`off`,onChange:C,onKeyDownCapture:w}),P&&h(n,{role:`progressbar`,style:{width:G.current,left:0,top:`50%`,transform:`translateY(-50%)`},"data-testid":`select-loading-skeleton`})]}),W===`menu`&&h(d,{onClick:T,data:A?v:_,color:P?e.interactive.disabled__fill.rgba:e.interactive.primary__resting.rgba}),N&&D.length>0&&!P&&h(r,{id:`clear`,variant:`ghost_icon`,onClick:S,"data-testid":`clearBtn`,$rightPadding:W===`menu`,disabled:F,children:h(d,{data:y,size:18})})]}),K&&g(o,{$borderBottom:W===`persistent`,$variant:F?`disabled`:H,children:[q&&h(d,{data:q,size:16}),h(m,{label:z,htmlFor:V})]})]})};export{b as SearchBar};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{SkeletonField as n}from"../Skeleton/SkeletonField.js";import{ClearButton as r,ComboBoxChip as i,Container as a,HelperWrapper as o,PlaceholderText as s,Section as c,ValueText as l,Wrapper as u}from"./Select.styles.js";import{Icon as d}from"../index.js";import{useMemo as f,useRef as p}from"react";import{Label as m}from"@equinor/eds-core-react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{arrow_drop_down as _,arrow_drop_up as v,clear as y}from"@equinor/eds-icons";const b=({props:b,anchorRef:x,handleOnClear:S,handleOnSearchChange:C,handleOnSearchKeyDown:w,handleToggleOpen:T,search:E,selectedValues:D,handleOnOpen:O,handleOnRemoveItem:k,open:A,searchRef:j,tryingToRemoveItem:M})=>{let{clearable:N=!0,loading:P=!1,disabled:F=!1,lightBackground:I=!1,placeholder:L=`Select...`,label:R,helperText:z,showHelperIcon:B=!0,id:V=`amplify-combobox-${R}`,variant:H,"data-testid":U,mode:W=`menu`}=b,G=p(`${Math.max(40,Math.random()*80)}%`),K=f(()=>!!z,[z]),q=f(()=>{if(B)return t(H)},[B,H]),J=f(()=>{if(`value`in b&&b.value&&`customValueComponent`in b&&b.customValueComponent)return h(b.customValueComponent,{item:b.value});if(`value`in b&&b.value)return h(l,{children:b.value.label});if(`showSelectedAsText`in b&&b.showSelectedAsText){let e=b.items?b.items.length:b.groups.flatMap(e=>e.items).length;return h(l,{children:typeof b.showSelectedAsText==`function`?b.showSelectedAsText({selectedAmount:D.length,totalAmount:e}):`${D.length}/${e} Selected`})}else return D.map(e=>`customValueComponent`in b&&b.customValueComponent?h(b.customValueComponent,{item:e,onDelete:()=>k(e),tryingToRemove:M!==void 0&&M.value===e.value},e.value):h(i,{"data-testid":`amplify-combobox-chip`,className:`amplify-combo-box-chip`,onDelete:()=>k(e),$tryingToRemove:M?.value===e.value,$lightBackground:I,children:e.label},e.value))},[D,M,I,b,k]);return g(u,{$showBackgroundColor:W===`persistent`,children:[g(a,{"data-testid":U||`combobox-container`,ref:x,onClick:O,"aria-expanded":A,$variant:H,$loading:P,$lightBackground:I,children:[g(c,{children:[!P&&E===``&&D.length===0&&h(s,{children:L}),(E===``&&`value`in b||`values`in b&&D.length>0&&(!b.showSelectedAsText||b.showSelectedAsText&&E===``))&&!P&&J,h(`input`,{id:V,disabled:F||P,ref:j,type:`search`,role:`combobox`,value:E,autoComplete:`off`,onChange:C,onKeyDownCapture:w,"aria-invalid":H===`error`?!0:void 0}),P&&h(n,{role:`progressbar`,style:{width:G.current,left:0,top:`50%`,transform:`translateY(-50%)`},"data-testid":`select-loading-skeleton`})]}),W===`menu`&&h(d,{onClick:T,data:A?v:_,color:P?e.interactive.disabled__fill.rgba:e.interactive.primary__resting.rgba}),N&&D.length>0&&!P&&h(r,{id:`clear`,variant:`ghost_icon`,onClick:S,"data-testid":`clearBtn`,$rightPadding:W===`menu`,disabled:F,children:h(d,{data:y,size:18})})]}),K&&g(o,{$borderBottom:W===`persistent`,$variant:F?`disabled`:H,children:[q&&h(d,{data:q,size:16}),h(m,{label:z,htmlFor:V})]})]})};export{b as SearchBar};
@@ -172,7 +172,7 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
172
172
  `,x=u(c.Item)`
173
173
  flex-grow: 1;
174
174
  padding-left: 10px;
175
-
175
+
176
176
  > div {
177
177
  grid-auto-columns: auto;
178
178
  justify-content: flex-start;
@@ -186,14 +186,16 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
186
186
  outline: 2px dashed ${r.interactive.primary__resting.rgba};
187
187
  }
188
188
 
189
- ${({$selected:e})=>e?d`
190
- background: ${r.interactive.primary__selected_highlight.rgba};
189
+ ${({$selected:e})=>e?d`
190
+ background: ${r.interactive.primary__selected_highlight.rgba};
191
191
 
192
- &:hover {
193
- background: ${r.interactive.primary__selected_hover.rgba};
194
- }
195
- `:``}}
192
+ &:hover {
193
+ background: ${r.interactive.primary__selected_hover.rgba};
194
+ }
195
+ `:``}
196
196
  `,S=u.div`
197
+ position: relative;
198
+ isolation: isolate;
197
199
  border: 1px solid ${r.ui.background__heavy.rgba};
198
200
  border-radius: ${a.corners.borderRadius};
199
201
  overflow: auto;
@@ -202,6 +204,7 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
202
204
  `,C=u.div`
203
205
  position: sticky;
204
206
  top: 0;
207
+ z-index: 1;
205
208
  `,w=u.button`
206
209
  width: 100%;
207
210
  display: flex;
@@ -252,7 +255,9 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
252
255
  `,j=u.div`
253
256
  display: flex;
254
257
  align-items: center;
258
+ gap: ${i.small};
255
259
  `,M=u(s)`
256
260
  width: 36px;
257
261
  height: 36px;
262
+ flex-shrink: 0;
258
263
  `;export{_ as ClearButton,v as ComboBoxChip,h as Container,b as GroupTitle,m as HelperWrapper,p as LabelWrapper,T as MenuItemSpacer,j as MenuItemWrapper,k as NoItemsFoundText,O as NoTagFoundText,S as PersistentComboBoxWrapper,y as PersistentGroupsWrapper,w as PersistentListItem,C as PersistentStickyWrapper,E as PlaceholderText,g as Section,M as SmallButton,A as StyledMenu,x as StyledMenuItem,D as ValueText,f as Wrapper};
@@ -1,4 +1,4 @@
1
- import * as react39 from "react";
1
+ import * as react41 from "react";
2
2
  import * as styled_components_dist_types6 from "styled-components/dist/types";
3
3
  import * as styled_components_dist_models_Keyframes0 from "styled-components/dist/models/Keyframes";
4
4
 
@@ -7,6 +7,6 @@ declare const skeletonBaseloading: styled_components_dist_models_Keyframes0.defa
7
7
  interface SkeletonBaseProps {
8
8
  $offset?: number;
9
9
  }
10
- declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react39.DetailedHTMLProps<react39.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
10
+ declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react41.DetailedHTMLProps<react41.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
11
11
  //#endregion
12
12
  export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
@@ -1,5 +1,5 @@
1
1
  import { FilterProps } from "./Filter.types.js";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime6 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>): react_jsx_runtime11.JSX.Element;
35
+ }: FilterProps<T>): react_jsx_runtime6.JSX.Element;
36
36
  //#endregion
37
37
  export { Filter };
@@ -1,6 +1,6 @@
1
1
  import { SelectOptionRequired } from "../../molecules/Select/Select.types.js";
2
2
  import { FilterProps } from "./Filter.types.js";
3
- import * as react_jsx_runtime12 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/organisms/Filter/QuickFilter.d.ts
6
6
  interface QuickFilterProps<T extends string> {
@@ -14,6 +14,6 @@ declare function QuickFilter<T extends string>({
14
14
  items,
15
15
  onQuickFilter,
16
16
  label
17
- }: QuickFilterProps<T>): react_jsx_runtime12.JSX.Element;
17
+ }: QuickFilterProps<T>): react_jsx_runtime7.JSX.Element;
18
18
  //#endregion
19
19
  export { QuickFilter };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 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>): react_jsx_runtime10.JSX.Element;
16
+ }: SortMenuProps<S>): react_jsx_runtime5.JSX.Element;
17
17
  //#endregion
18
18
  export { SortMenu };
@@ -1,4 +1,4 @@
1
- import * as react137 from "react";
1
+ import * as react129 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: react137.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react137.RefAttributes<HTMLDivElement>>;
19
+ declare const SideBar: react129.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react129.RefAttributes<HTMLDivElement>>;
20
20
  //#endregion
21
21
  export { SideBar };
@@ -1,10 +1,10 @@
1
- import * as react131 from "react";
1
+ import * as react137 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: react131.ForwardRefExoticComponent<ActionProps & react131.RefAttributes<HTMLButtonElement>>;
8
+ declare const Action: react137.ForwardRefExoticComponent<ActionProps & react137.RefAttributes<HTMLButtonElement>>;
9
9
  //#endregion
10
10
  export { Action };
@@ -1,9 +1,9 @@
1
- import * as react133 from "react";
1
+ import * as react139 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: react133.ForwardRefExoticComponent<DescriptionProps & react133.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Description: react139.ForwardRefExoticComponent<DescriptionProps & react139.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Description };
@@ -1,4 +1,4 @@
1
- import * as react135 from "react";
1
+ import * as react141 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: react141.ForwardRefExoticComponent<MissingAccessesProps & react141.RefAttributes<HTMLDivElement>>;
13
13
  //#endregion
14
14
  export { MissingAccesses };
@@ -1,9 +1,9 @@
1
- import * as react129 from "react";
1
+ import * as react135 from "react";
2
2
 
3
3
  //#region src/organisms/Status/Title.d.ts
4
4
  interface TitleProps {
5
5
  title?: string;
6
6
  }
7
- declare const Title: react129.ForwardRefExoticComponent<TitleProps & react129.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Title: react135.ForwardRefExoticComponent<TitleProps & react135.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Title };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/BadRequest.d.ts
4
4
  interface BadRequestProps {
@@ -12,6 +12,6 @@ declare const BadRequest: ({
12
12
  redirectFallbackUrl,
13
13
  onBackClick,
14
14
  hideBackButton
15
- }: BadRequestProps) => react_jsx_runtime6.JSX.Element;
15
+ }: BadRequestProps) => react_jsx_runtime10.JSX.Element;
16
16
  //#endregion
17
17
  export { BadRequest };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/GenericError.d.ts
4
4
  interface GenericErrorProps {
@@ -14,6 +14,6 @@ declare const GenericError: ({
14
14
  redirectFallbackUrl,
15
15
  onBackClick,
16
16
  hideBackButton
17
- }: GenericErrorProps) => react_jsx_runtime5.JSX.Element;
17
+ }: GenericErrorProps) => react_jsx_runtime12.JSX.Element;
18
18
  //#endregion
19
19
  export { GenericError };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime7 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/MissingPermissions.d.ts
4
4
  interface MissingPermissionsProps {
@@ -14,6 +14,6 @@ declare const MissingPermissions: ({
14
14
  redirectFallbackUrl,
15
15
  onBackClick,
16
16
  hideBackButton
17
- }: MissingPermissionsProps) => react_jsx_runtime7.JSX.Element;
17
+ }: MissingPermissionsProps) => react_jsx_runtime8.JSX.Element;
18
18
  //#endregion
19
19
  export { MissingPermissions };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime9 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_runtime8.JSX.Element;
15
+ }: PageNotFoundProps) => react_jsx_runtime9.JSX.Element;
16
16
  //#endregion
17
17
  export { PageNotFound };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 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_runtime9.JSX.Element;
15
+ }: ServerErrorProps) => react_jsx_runtime11.JSX.Element;
16
16
  //#endregion
17
17
  export { ServerError };
@@ -1,7 +1,7 @@
1
- import * as react141 from "react";
1
+ import * as react133 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/Actions.d.ts
5
- declare const Actions: react141.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react141.RefAttributes<HTMLDivElement>>;
5
+ declare const Actions: react133.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react133.RefAttributes<HTMLDivElement>>;
6
6
  //#endregion
7
7
  export { Actions };
@@ -1,5 +1,5 @@
1
1
  import { Field } from "../../../atoms/types/Field.js";
2
- import * as react139 from "react";
2
+ import * as react131 from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/FieldMenu/FieldMenu.d.ts
5
5
  interface FieldMenuProps {
@@ -8,6 +8,6 @@ interface FieldMenuProps {
8
8
  itemNameSingular?: string;
9
9
  showAccessITLink?: boolean;
10
10
  }
11
- declare const FieldMenu: react139.ForwardRefExoticComponent<FieldMenuProps & react139.RefAttributes<HTMLDivElement>>;
11
+ declare const FieldMenu: react131.ForwardRefExoticComponent<FieldMenuProps & react131.RefAttributes<HTMLDivElement>>;
12
12
  //#endregion
13
13
  export { FieldMenu };
@@ -31,7 +31,9 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
31
31
  top: 0;
32
32
  transform: translate(-50%, 0) rotate(45deg);
33
33
  `}}const S=f(v(l))`
34
- width: 360px;
34
+ width: ${({$hasImage:e})=>e?`fit-content`:`360px`};
35
+ max-width: 90vw;
36
+ max-height: 90vh;
35
37
  padding: ${t.medium};
36
38
  background: ${e.ui.background__tutorial_card.rgba};
37
39
  display: flex;
@@ -47,10 +49,6 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
47
49
  gap: ${t.small};
48
50
  align-items: center;
49
51
  }
50
- > img {
51
- max-height: 170px;
52
- object-fit: contain;
53
- }
54
52
  ${({$highlightingElement:t,$caretPosition:n})=>t&&p`
55
53
  transform: translateX(-50%);
56
54
  &:before {
@@ -64,6 +62,18 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
64
62
  }
65
63
  `}
66
64
  `,C=f.div`
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: ${t.medium};
68
+ overflow: auto;
69
+ > img {
70
+ max-width: 100%;
71
+ width: fit-content;
72
+ height: fit-content;
73
+ object-fit: contain;
74
+ align-self: center;
75
+ }
76
+ `,w=f.div`
67
77
  display: flex;
68
78
  justify-content: flex-end;
69
79
  gap: ${t.small};
@@ -72,4 +82,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
72
82
  margin-right: auto;
73
83
  }
74
84
  }
75
- `,w=({contentRef:t,isHighlighting:n,id:l,top:f,left:p,width:v,height:x,name:w,steps:T})=>{let{customStepContent:E}=o(),{activeTutorial:D,activeStep:O,skipTutorial:k,startTutorial:A,goToNextStep:j,goToPreviousStep:M}=b(),{data:N}=y(D?.steps.at(O)?.imgUrl??void 0),[P,F]=s(void 0),{style:I,highlightingElement:L,caretPosition:R}=i({contentRef:t,top:f,left:p,width:v,height:x,popoverSize:P}),z=e=>{if(!e){F(void 0);return}F({width:e.clientWidth,height:e.clientHeight})},B=()=>{k(l)},V=()=>{A(l)};if(O!==void 0&&T[O].custom&&!E[T[O].id])throw Error(`[TutorialHighlightingProvider]: Custom step content not found, tutorial ID: ${l}, step ID: ${T[O].id}`);return!L&&n?null:!D||O===void 0?g(S,{ref:z,style:{...I},$highlightingElement:L,$caretPosition:R,...r,children:[g(`header`,{children:[h(u,{data:_,color:e.interactive.primary__resting.rgba}),h(d,{variant:`h6`,children:w})]}),g(C,{children:[h(c,{variant:`ghost`,onClick:B,children:`Skip`}),h(c,{onClick:V,children:`Start tour`})]})]}):g(S,{ref:z,style:{...I,width:T[O].custom?`auto`:void 0},$caretPosition:R,$highlightingElement:L,...r,children:[T[O].custom?E[T[O].id]:g(m,{children:[g(`header`,{children:[h(u,{data:_,color:e.interactive.primary__resting.rgba}),h(d,{variant:`h6`,children:T[O]?.title})]}),h(d,{variant:`body_short`,children:T[O]?.body}),N?h(`img`,{src:N,alt:T[O].title}):null]}),g(C,{children:[h(c,{variant:`outlined`,disabled:O===0,onClick:M,children:`Back`}),h(c,{variant:`ghost`,onClick:B,children:`Cancel`}),h(c,{onClick:j,children:O===T.length-1?`Finish`:`Next`})]}),h(a,{stepAmount:T.length})]})};export{w as TutorialPopover};
85
+ `,T=({contentRef:t,isHighlighting:n,id:l,top:f,left:p,width:v,height:x,name:T,steps:E})=>{let{customStepContent:D}=o(),{activeTutorial:O,activeStep:k,skipTutorial:A,startTutorial:j,goToNextStep:M,goToPreviousStep:N}=b(),{data:P}=y(O?.steps.at(k)?.imgUrl??void 0),[F,I]=s(void 0),{style:L,highlightingElement:R,caretPosition:z}=i({contentRef:t,top:f,left:p,width:v,height:x,popoverSize:F}),B=e=>{if(!e){I(void 0);return}I({width:e.clientWidth,height:e.clientHeight})},V=()=>{A(l)},H=()=>{j(l)};if(k!==void 0&&E[k].custom&&!D[E[k].id])throw Error(`[TutorialHighlightingProvider]: Custom step content not found, tutorial ID: ${l}, step ID: ${E[k].id}`);return!R&&n?null:!O||k===void 0?g(S,{ref:B,style:{...L},$highlightingElement:R,$caretPosition:z,$hasImage:!1,...r,children:[g(`header`,{children:[h(u,{data:_,color:e.interactive.primary__resting.rgba}),h(d,{variant:`h6`,children:T})]}),g(w,{children:[h(c,{variant:`ghost`,onClick:V,children:`Skip`}),h(c,{onClick:H,children:`Start tour`})]})]}):g(S,{ref:B,style:{...L,width:E[k].custom?`auto`:void 0},$caretPosition:z,$highlightingElement:R,$hasImage:!!P,...r,children:[E[k].custom?D[E[k].id]:g(m,{children:[g(`header`,{children:[h(u,{data:_,color:e.interactive.primary__resting.rgba}),h(d,{variant:`h6`,children:E[k]?.title})]}),g(C,{children:[h(d,{variant:`body_short`,children:E[k]?.body}),P?h(`img`,{src:/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(P)?P:`data:image/png;base64,${P}`,alt:E[k]?.title??``}):null]})]}),g(w,{children:[h(c,{variant:`outlined`,disabled:k===0,onClick:N,children:`Back`}),h(c,{variant:`ghost`,onClick:V,children:`Cancel`}),h(c,{onClick:M,children:k===E.length-1?`Finish`:`Next`})]}),h(a,{stepAmount:E.length})]})};export{T as TutorialPopover};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/amplify-component-lib",
3
- "version": "11.0.3",
3
+ "version": "11.0.5",
4
4
  "description": "Frontend Typescript components for the Amplify team",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",