@equinor/amplify-component-lib 9.17.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/_virtual/rolldown_runtime.js +1 -1
  2. package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
  3. package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
  4. package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
  5. package/dist/atoms/hooks/useRichTextImage.js +1 -1
  6. package/dist/atoms/hooks/useSelect.d.ts +3 -3
  7. package/dist/atoms/hooks/useSelect.js +1 -1
  8. package/dist/atoms/index.d.ts +0 -1
  9. package/dist/atoms/index.js +1 -1
  10. package/dist/atoms/style/index.d.ts +0 -3
  11. package/dist/atoms/style/index.js +1 -1
  12. package/dist/atoms/types/Guidelines.d.ts +1 -1
  13. package/dist/atoms/utils/auth_environment.js +1 -1
  14. package/dist/atoms/utils/date.js +1 -1
  15. package/dist/atoms/utils/map.js +1 -1
  16. package/dist/atoms/utils/size.js +1 -1
  17. package/dist/atoms/utils/url.js +1 -1
  18. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
  19. package/dist/deprecated/IconToggleButton.d.ts +2 -2
  20. package/dist/deprecated/IconToggleButton.js +1 -1
  21. package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
  22. package/dist/index.d.ts +5 -9
  23. package/dist/index.js +1 -1
  24. package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
  25. package/dist/molecules/Badge/Badge.styles.js +1 -1
  26. package/dist/molecules/Button/Button.js +1 -1
  27. package/dist/molecules/Chip/Chip.d.ts +2 -2
  28. package/dist/molecules/Chip/Chip.styles.js +1 -1
  29. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  30. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
  31. package/dist/molecules/Dialog/Dialog.d.ts +2 -2
  32. package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
  33. package/dist/molecules/FeedBackIcon/FeedBackIcon.js +1 -1
  34. package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
  35. package/dist/molecules/FileProgress/FileProgress.utils.js +1 -1
  36. package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
  37. package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
  38. package/dist/molecules/IconCell/IconCell.d.ts +2 -2
  39. package/dist/molecules/IconCell/IconCell.styles.js +3 -3
  40. package/dist/molecules/IconCell/IconCell.types.d.ts +6 -5
  41. package/dist/molecules/IconCell/IconCell.types.js +1 -1
  42. package/dist/molecules/IconCell/IconCell.utils.js +2 -2
  43. package/dist/molecules/InfoElement/CopyText.js +1 -1
  44. package/dist/molecules/ListItem/ListItem.d.ts +2 -2
  45. package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +2 -2
  46. package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -1
  47. package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
  48. package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
  49. package/dist/molecules/ProfileAvatar/ProfileAvatar.js +1 -1
  50. package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
  51. package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
  52. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +5 -5
  53. package/dist/molecules/RichTextEditor/MenuBar/Table/TableColumn.js +1 -1
  54. package/dist/molecules/RichTextEditor/MenuBar/Table/TableMerge.js +1 -1
  55. package/dist/molecules/RichTextEditor/MenuBar/Table/TableRow.js +1 -1
  56. package/dist/molecules/RichTextEditor/MenuBar/Table/ToggleTable.js +1 -1
  57. package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +1 -1
  58. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
  59. package/dist/molecules/RichTextEditor/index.d.ts +5 -5
  60. package/dist/molecules/Search/Search.d.ts +2 -2
  61. package/dist/molecules/Select/AddTagItem.js +1 -1
  62. package/dist/molecules/Select/GroupedSelectMenu.js +1 -1
  63. package/dist/molecules/Select/Select.js +1 -1
  64. package/dist/molecules/Select/Select.styles.d.ts +4 -4
  65. package/dist/molecules/Select/Select.styles.js +0 -1
  66. package/dist/molecules/Select/Select.utils.js +1 -1
  67. package/dist/molecules/Select/SelectMenuItem.js +1 -1
  68. package/dist/molecules/Select/SelectMenuItem.utils.js +1 -1
  69. package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
  70. package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
  71. package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
  72. package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
  73. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
  74. package/dist/molecules/Stepper/Step/Step.js +9 -9
  75. package/dist/molecules/Stepper/StepLine.js +1 -1
  76. package/dist/molecules/Stepper/Stepper.js +6 -4
  77. package/dist/molecules/TextField/TextField.d.ts +12 -0
  78. package/dist/molecules/TextField/TextField.js +3 -3
  79. package/dist/molecules/Waves/Waves.js +1 -1
  80. package/dist/molecules/index.d.ts +4 -8
  81. package/dist/molecules/index.js +1 -1
  82. package/dist/organisms/Faq/Category/Category.js +2 -2
  83. package/dist/organisms/Faq/Category/Question.js +1 -1
  84. package/dist/organisms/Faq/Faq.js +1 -1
  85. package/dist/organisms/Faq/Header.js +2 -2
  86. package/dist/organisms/FieldSelector/FieldSelector.js +1 -1
  87. package/dist/organisms/Filter/ButtonWithMenu.js +1 -1
  88. package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
  89. package/dist/organisms/ReleaseNote/ReleaseNote.js +1 -1
  90. package/dist/organisms/ReleaseNote/ReleaseNote.utils.js +1 -1
  91. package/dist/organisms/ReleaseNotesPage/ReleaseNoteFilter.js +12 -0
  92. package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.d.ts +6 -0
  93. package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.js +1 -0
  94. package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.styles.js +35 -0
  95. package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.utils.js +1 -0
  96. package/dist/organisms/ReleaseNotesPage/ReleasePosts/ReleasePost/ReleasePost.js +1 -0
  97. package/dist/organisms/ReleaseNotesPage/ReleasePosts/ReleasePost/ReleasePostSkeleton.js +37 -0
  98. package/dist/organisms/ReleaseNotesPage/ReleasePosts/ReleasePosts.js +17 -0
  99. package/dist/organisms/ReleaseNotesPage/hooks/useFilteredReleaseNotes.js +1 -0
  100. package/dist/organisms/ReleaseNotesPage/hooks/useReleaseNotesFilters.js +1 -0
  101. package/dist/organisms/SideBar/CreateItem.styles.js +8 -6
  102. package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -1
  103. package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +1 -1
  104. package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +1 -2
  105. package/dist/organisms/SideBar/MenuItem/MenuItem.utils.js +1 -1
  106. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  107. package/dist/organisms/Status/Action.d.ts +2 -2
  108. package/dist/organisms/Status/Description.d.ts +2 -2
  109. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  110. package/dist/organisms/Status/Title.d.ts +2 -2
  111. package/dist/organisms/Status/collections/BadRequest.js +2 -2
  112. package/dist/organisms/Status/collections/GenericError.js +1 -1
  113. package/dist/organisms/Status/collections/MissingAccessToApp.js +1 -1
  114. package/dist/organisms/Status/collections/MissingPermissions.js +1 -1
  115. package/dist/organisms/Status/collections/PageNotFound.js +2 -2
  116. package/dist/organisms/Status/collections/ServerError.js +2 -2
  117. package/dist/organisms/TableOfContents/TableOfContents.styles.js +1 -1
  118. package/dist/organisms/Template/Template.d.ts +3 -3
  119. package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
  120. package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
  121. package/dist/organisms/TopBar/Account/Account.js +1 -1
  122. package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
  123. package/dist/organisms/TopBar/Account/ImpersonateMenu/Actions.js +1 -1
  124. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
  125. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
  126. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
  127. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  128. package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
  129. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  130. package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +2 -2
  131. package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
  132. package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
  133. package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +2 -2
  134. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
  135. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +2 -2
  136. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
  137. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +1 -1
  138. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +1 -1
  139. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Url.js +1 -1
  140. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
  141. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
  142. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.js +1 -1
  143. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.styles.js +2 -5
  144. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
  145. package/dist/organisms/TopBar/Settings.js +1 -1
  146. package/dist/organisms/TopBar/TopBar.d.ts +1 -0
  147. package/dist/organisms/TopBar/TopBar.styles.js +1 -1
  148. package/dist/organisms/TopBar/Tutorials/TutorialItem.js +1 -1
  149. package/dist/organisms/index.d.ts +1 -0
  150. package/dist/organisms/index.js +1 -1
  151. package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
  152. package/dist/providers/ReleaseNotesProvider.d.ts +0 -1
  153. package/dist/providers/ReleaseNotesProvider.js +1 -1
  154. package/dist/providers/SideBarProvider.js +1 -1
  155. package/dist/providers/StepperProvider.js +1 -1
  156. package/dist/providers/TableOfContentsProvider.js +1 -1
  157. package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
  158. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
  159. package/package.json +12 -14
  160. package/dist/atoms/hooks/useSearchParameter.d.ts +0 -12
  161. package/dist/atoms/hooks/useSearchParameter.js +0 -1
  162. package/dist/molecules/ContentMenu/ContentMenu.d.ts +0 -17
  163. package/dist/molecules/ContentMenu/ContentMenu.js +0 -1
  164. package/dist/molecules/ContentMenu/ContentMenu.styles.js +0 -52
  165. package/dist/molecules/Sieve/Filter.d.ts +0 -10
  166. package/dist/molecules/Sieve/Filter.js +0 -1
  167. package/dist/molecules/Sieve/Sieve.d.ts +0 -7
  168. package/dist/molecules/Sieve/Sieve.js +0 -1
  169. package/dist/molecules/Sieve/Sieve.styles.js +0 -43
  170. package/dist/molecules/Sieve/Sieve.types.d.ts +0 -28
  171. package/dist/molecules/Sieve/Sort.js +0 -1
  172. package/dist/molecules/SingleFilterMenu/SingleFilterMenu.d.ts +0 -15
  173. package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +0 -20
  174. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +0 -1
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{OptionalTooltip as n}from"../OptionalTooltip/OptionalTooltip.js";import{DividerRow as r,MediumUploadWrapper as i,SmallUploadWrapper as a,UploadWrapper as o}from"./FileUploadArea.styles.js";import{FILE_UPLOAD_SCRIM_ID as s}from"./FileUploadArea.constants.js";import{UploadIllustration as c}from"./UploadIllustration.js";import{useEffect as l,useMemo as u}from"react";import{Icon as d,Typography as f}from"@equinor/eds-core-react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{folder as h}from"@equinor/eds-icons";import{useDropzone as g}from"react-dropzone";const _=({size:_=`large`,...v})=>{let{getRootProps:y,getInputProps:b,isDragActive:x}=g({...v});l(()=>{let t=()=>{if(!window.document.getElementById(s)){let t=document.createElement(`div`);t.id=s,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.width=`100%`,t.style.height=`100%`,t.style.backgroundColor=e.ui.background__scrim.rgba,t.style.zIndex=`9999`,t.style.pointerEvents=`none`,window.document.body.appendChild(t)}},n=()=>{let e=window.document.getElementById(s);e!==null&&e.remove()};return window.document.addEventListener(`dragover`,t),window.document.addEventListener(`dragend`,n),window.document.addEventListener(`mouseleave`,()=>n),()=>{window.document.removeEventListener(`dragover`,t),window.document.removeEventListener(`dragend`,n),window.document.removeEventListener(`mouseleave`,n)}},[]);let S=u(()=>{if(v.accept)return Object.values(v.accept).join(`, `)},[v.accept]);return _==`small`?m(a,{...y(),style:{background:x?e.interactive.primary__hover_alt.rgba:void 0},children:[p(`input`,{"data-testid":`file-upload-area-input`,...b()}),p(c,{}),p(f,{variant:`meta`,children:`Upload file`}),v.accept&&p(n,{title:`Supported filetypes: ${S}`,children:m(f,{variant:`meta`,children:[`(`,S,`)`]})})]}):_==`medium`?m(i,{...y(),style:{background:x?e.interactive.primary__hover_alt.rgba:void 0},children:[p(`input`,{"data-testid":`file-upload-area-input`,...b()}),p(c,{}),m(`section`,{children:[p(f,{variant:`button`,group:`navigation`,children:`Drag files here`}),v.accept&&p(n,{title:`Supported filetypes: ${S}`,children:p(f,{group:`paragraph`,variant:`meta`,color:e.text.static_icons__tertiary.rgba,children:S})})]}),m(r,{children:[p(`hr`,{}),p(f,{variant:`meta`,children:`OR`}),p(`hr`,{})]}),m(t,{variant:`ghost`,onClick:y().onClick,children:[p(d,{data:h}),`Browse files`]})]}):m(o,{...y(),onClick:void 0,style:{background:x?e.interactive.primary__hover_alt.rgba:void 0},children:[p(`input`,{"data-testid":`file-upload-area-input`,...b()}),p(c,{}),m(`section`,{children:[p(f,{variant:`button`,group:`navigation`,children:`Drag files here to upload.`}),v.accept&&m(f,{group:`paragraph`,variant:`meta`,color:e.text.static_icons__tertiary.rgba,children:[`Supported filetypes: `,S]})]}),m(r,{children:[p(`hr`,{}),p(f,{variant:`button`,group:`navigation`,children:`OR`}),p(`hr`,{})]}),m(t,{variant:`ghost`,onClick:y().onClick,children:[p(d,{data:h}),`Browse files`]})]})};export{_ as FileUploadArea};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{OptionalTooltip as n}from"../OptionalTooltip/OptionalTooltip.js";import{DividerRow as r,MediumUploadWrapper as i,SmallUploadWrapper as a,UploadWrapper as o}from"./FileUploadArea.styles.js";import{FILE_UPLOAD_SCRIM_ID as s}from"./FileUploadArea.constants.js";import{UploadIllustration as c}from"./UploadIllustration.js";import{useEffect as l,useMemo as u,useState as d}from"react";import{Icon as f,Typography as p}from"@equinor/eds-core-react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{folder as g}from"@equinor/eds-icons";import{useDropzone as _}from"react-dropzone";const v=({size:v=`large`,...y})=>{let{getRootProps:b,getInputProps:x,isDragActive:S}=_({...y}),[C,w]=d(!1);l(()=>{let e=e=>{e.preventDefault(),C||w(!0)},t=e=>{(e.clientX===0||e.clientY===0||e.clientX===window.innerWidth||e.clientY===window.innerHeight)&&w(!1)},n=()=>{w(!1)},r=()=>{w(!1)};return window.addEventListener(`dragover`,e),window.addEventListener(`dragleave`,t),window.addEventListener(`drop`,n),window.addEventListener(`dragend`,r),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`dragleave`,t),window.removeEventListener(`drop`,n),window.removeEventListener(`dragend`,r)}},[C]),l(()=>{if(C){if(!document.getElementById(s)){let t=document.createElement(`div`);t.id=s,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.width=`100%`,t.style.height=`100%`,t.style.backgroundColor=e.ui.background__scrim.rgba,t.style.zIndex=`9999`,t.style.pointerEvents=`none`,window.document.body.appendChild(t)}}else{let e=document.getElementById(s);e!==null&&e.remove()}},[C]);let T=u(()=>{if(y.accept)return Object.values(y.accept).join(`, `)},[y.accept]);return v==`small`?h(a,{...b(),style:{background:S?e.interactive.primary__hover_alt.rgba:void 0},children:[m(`input`,{"data-testid":`file-upload-area-input`,...x()}),m(c,{}),m(p,{variant:`meta`,children:`Upload file`}),y.accept&&m(n,{title:`Supported filetypes: ${T}`,children:h(p,{variant:`meta`,children:[`(`,T,`)`]})})]}):v==`medium`?h(i,{...b(),style:{background:S?e.interactive.primary__hover_alt.rgba:void 0},children:[m(`input`,{"data-testid":`file-upload-area-input`,...x()}),m(c,{}),h(`section`,{children:[m(p,{variant:`button`,group:`navigation`,children:`Drag files here`}),y.accept&&m(n,{title:`Supported filetypes: ${T}`,children:m(p,{group:`paragraph`,variant:`meta`,color:e.text.static_icons__tertiary.rgba,children:T})})]}),h(r,{children:[m(`hr`,{}),m(p,{variant:`meta`,children:`OR`}),m(`hr`,{})]}),h(t,{variant:`ghost`,onClick:b().onClick,children:[m(f,{data:g}),`Browse files`]})]}):h(o,{...b(),onClick:void 0,style:{background:S?e.interactive.primary__hover_alt.rgba:void 0},children:[m(`input`,{"data-testid":`file-upload-area-input`,...x()}),m(c,{}),h(`section`,{children:[m(p,{variant:`button`,group:`navigation`,children:`Drag files here to upload.`}),y.accept&&h(p,{group:`paragraph`,variant:`meta`,color:e.text.static_icons__tertiary.rgba,children:[`Supported filetypes: `,T]})]}),h(r,{children:[m(`hr`,{}),m(p,{variant:`button`,group:`navigation`,children:`OR`}),m(`hr`,{})]}),h(t,{variant:`ghost`,onClick:b().onClick,children:[m(f,{data:g}),`Browse files`]})]})};export{v as FileUploadArea};
@@ -1,5 +1,5 @@
1
1
  import { IconCellColor, IconCellState, IconCellVariant, IconCellVariants } from "./IconCell.types.js";
2
- import * as react15 from "react";
2
+ import * as react17 from "react";
3
3
  import { HTMLAttributes, MouseEventHandler, ReactNode } from "react";
4
4
  import { IconData } from "@equinor/eds-icons";
5
5
 
@@ -49,6 +49,6 @@ type IconCellProps = ScribbledOutProps | RegularIconCellProps;
49
49
  * @param {React.Ref<HTMLButtonElement>} ref - Ref forwarded to the inner button element.
50
50
  * @returns {JSX.Element} The rendered IconCell.
51
51
  */
52
- declare const IconCell: react15.ForwardRefExoticComponent<IconCellProps & react15.RefAttributes<HTMLButtonElement>>;
52
+ declare const IconCell: react17.ForwardRefExoticComponent<IconCellProps & react17.RefAttributes<HTMLButtonElement>>;
53
53
  //#endregion
54
54
  export { IconCell, IconCellProps };
@@ -63,12 +63,12 @@ import{animation as e}from"../../atoms/style/animation.js";import{colors as t}fr
63
63
  `}
64
64
 
65
65
  // Overlay for Label & HelperIconContainer
66
- ${({$backgroundColor:e,$variant:n,$state:a})=>{let o=n===i.COLOURED?a===r.DANGER?c[r.DANGER]:a===r.WARNING?c[r.WARNING]:e:t.ui.background__default.rgba;return`
66
+ ${({$backgroundColor:e,$variant:n,$state:a})=>`
67
67
  ${f}::before,
68
68
  ${m}::before {
69
- ${u(o)}
69
+ ${u(n===i.COLOURED?a===r.ERROR?c[r.ERROR]:a===r.WARNING?c[r.WARNING]:e:t.ui.background__default.rgba)}
70
70
  }
71
- `}}
71
+ `}
72
72
 
73
73
  // Disabled state
74
74
  &:disabled {
@@ -4,7 +4,6 @@ declare const IconCellColors: {
4
4
  readonly RED: "red";
5
5
  readonly ORANGE: "orange";
6
6
  readonly BLUE: "blue";
7
- readonly GREY: "grey";
8
7
  readonly LIGHTGREY: "lightgrey";
9
8
  readonly PINK: "pink";
10
9
  readonly YELLOW: "yellow";
@@ -12,8 +11,6 @@ declare const IconCellColors: {
12
11
  readonly SUCCESS: "success";
13
12
  readonly WARNING: "warning";
14
13
  readonly ERROR: "error";
15
- readonly INFO: "info";
16
- readonly DANGER: "danger";
17
14
  readonly DEFAULT: "default";
18
15
  };
19
16
  type IconCellColor = (typeof IconCellColors)[keyof typeof IconCellColors];
@@ -26,8 +23,12 @@ type IconCellVariant = (typeof IconCellVariants)[keyof typeof IconCellVariants];
26
23
  declare const IconCellStates: {
27
24
  readonly DEFAULT: "default";
28
25
  readonly WARNING: "warning";
29
- readonly DANGER: "danger";
26
+ readonly ERROR: "error";
30
27
  };
31
28
  type IconCellState = (typeof IconCellStates)[keyof typeof IconCellStates];
29
+ interface IconCellColorObject {
30
+ backgroundColor: string;
31
+ iconColor: string;
32
+ }
32
33
  //#endregion
33
- export { IconCellColor, IconCellColors, IconCellState, IconCellStates, IconCellVariant, IconCellVariants };
34
+ export { IconCellColor, IconCellColorObject, IconCellColors, IconCellState, IconCellStates, IconCellVariant, IconCellVariants };
@@ -1 +1 @@
1
- const e={GREEN:`green`,RED:`red`,ORANGE:`orange`,BLUE:`blue`,GREY:`grey`,LIGHTGREY:`lightgrey`,PINK:`pink`,YELLOW:`yellow`,PURPLE:`purple`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`,DANGER:`danger`,DEFAULT:`default`},t={DEFAULT:`default`,COLOURED:`colored`,SCRIBBLED_OUT:`scribbled-out`},n={DEFAULT:`default`,WARNING:`warning`,DANGER:`danger`};export{e as IconCellColors,n as IconCellStates,t as IconCellVariants};
1
+ const e={GREEN:`green`,RED:`red`,ORANGE:`orange`,BLUE:`blue`,LIGHTGREY:`lightgrey`,PINK:`pink`,YELLOW:`yellow`,PURPLE:`purple`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,DEFAULT:`default`},t={DEFAULT:`default`,COLOURED:`colored`,SCRIBBLED_OUT:`scribbled-out`},n={DEFAULT:`default`,WARNING:`warning`,ERROR:`error`};export{e as IconCellColors,n as IconCellStates,t as IconCellVariants};
@@ -1,8 +1,8 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{Theme as t}from"../../atoms/enums/Theme.js";import{IconCellColors as n,IconCellStates as r,IconCellVariants as i}from"./IconCell.types.js";import{Icon as a}from"@equinor/eds-core-react";import{jsx as o}from"react/jsx-runtime";const s=(e,t)=>e&&typeof e==`object`&&`prefix`in e?o(a,{data:e,color:t}):e,c=(r,i)=>{switch(r){case n.GREEN:case n.SUCCESS:return i===t.LIGHT?{backgroundColor:e.interactive.success__highlight.rgba,iconColor:e.dataviz.darkgreen.default}:{backgroundColor:e.dataviz.darkgreen.default,iconColor:e.dataviz.lightgreen.lighter};case n.RED:case n.ERROR:case n.DANGER:return i===t.LIGHT?{backgroundColor:e.interactive.danger__highlight.rgba,iconColor:e.interactive.danger__text.rgba}:{backgroundColor:e.ui.background__danger.rgba,iconColor:e.text.static_icons__default.rgba};case n.ORANGE:case n.WARNING:return i===t.LIGHT?{backgroundColor:e.interactive.warning__highlight.rgba,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.ui.background__warning.rgba,iconColor:e.text.static_icons__default.rgba};case n.BLUE:case n.INFO:return i===t.LIGHT?{backgroundColor:e.dataviz.lightblue.lighter,iconColor:e.dataviz.primary.darker}:{backgroundColor:e.dataviz.darkblue.default,iconColor:e.dataviz.lightblue.lighter};case n.LIGHTGREY:return i===t.LIGHT?{backgroundColor:e.ui.background__light.rgba,iconColor:e.dataviz.lightgray.darker}:{backgroundColor:e.ui.background__heavy.rgba,iconColor:e.text.static_icons__secondary.rgba};case n.PINK:return i===t.LIGHT?{backgroundColor:e.dataviz.darkpink.lighter,iconColor:e.dataviz.darkpink.darker}:{backgroundColor:e.dataviz.darkpink.darker,iconColor:e.dataviz.darkpink.lighter};case n.YELLOW:return i===t.LIGHT?{backgroundColor:e.dataviz.lightyellow.lighter,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.dataviz.darkyellow.darker,iconColor:e.dataviz.lightyellow.lighter};case n.PURPLE:return i===t.LIGHT?{backgroundColor:e.dataviz.lightpurple.lighter,iconColor:e.dataviz.darkpurple.darker}:{backgroundColor:e.dataviz.darkpurple.darker,iconColor:e.dataviz.lightpurple.lighter};case n.GREY:default:return i===t.LIGHT?{backgroundColor:e.ui.background__medium.rgba,iconColor:e.text.static_icons__default.rgba}:{backgroundColor:e.ui.background__light.rgba,iconColor:e.text.static_icons__default.rgba}}},l={[r.DANGER]:e.interactive.danger__resting.rgba,[r.WARNING]:e.interactive.warning__resting.rgba},u={[r.DANGER]:e.ui.background__danger.rgba,[r.WARNING]:e.ui.background__warning.rgba},d=(e,t)=>{let n=t?l[t]:void 0;return n??e},f=({$noBottomBorder:t,$state:n,$backgroundColor:r})=>{let i=t?r:d(e.ui.background__medium.rgba,n);return`1px solid ${i}`},p=t=>d(e.text.static_icons__default.rgba,t),m=({$variant:t,$state:n,$backgroundColor:a=e.ui.background__default.rgba})=>t===i.SCRIBBLED_OUT?`repeating-linear-gradient(
1
+ import{colors as e}from"../../atoms/style/colors.js";import{Theme as t}from"../../atoms/enums/Theme.js";import{IconCellColors as n,IconCellStates as r,IconCellVariants as i}from"./IconCell.types.js";import{Icon as a}from"@equinor/eds-core-react";import{jsx as o}from"react/jsx-runtime";const s=(e,t)=>e&&typeof e==`object`&&`prefix`in e?o(a,{data:e,color:t}):e,c=(r,i)=>{switch(r){case n.GREEN:case n.SUCCESS:return i===t.LIGHT?{backgroundColor:e.interactive.success__highlight.rgba,iconColor:e.dataviz.darkgreen.default}:{backgroundColor:e.dataviz.darkgreen.default,iconColor:e.dataviz.lightgreen.lighter};case n.RED:case n.ERROR:return i===t.LIGHT?{backgroundColor:e.interactive.danger__highlight.rgba,iconColor:e.interactive.danger__text.rgba}:{backgroundColor:e.ui.background__danger.rgba,iconColor:e.text.static_icons__default.rgba};case n.ORANGE:case n.WARNING:return i===t.LIGHT?{backgroundColor:e.interactive.warning__highlight.rgba,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.ui.background__warning.rgba,iconColor:e.text.static_icons__default.rgba};case n.BLUE:return i===t.LIGHT?{backgroundColor:e.dataviz.lightblue.lighter,iconColor:e.dataviz.primary.darker}:{backgroundColor:e.dataviz.darkblue.default,iconColor:e.dataviz.lightblue.lighter};case n.LIGHTGREY:return i===t.LIGHT?{backgroundColor:e.ui.background__light.rgba,iconColor:e.dataviz.lightgray.darker}:{backgroundColor:e.ui.background__heavy.rgba,iconColor:e.text.static_icons__secondary.rgba};case n.PINK:return i===t.LIGHT?{backgroundColor:e.dataviz.darkpink.lighter,iconColor:e.dataviz.darkpink.darker}:{backgroundColor:e.dataviz.darkpink.darker,iconColor:e.dataviz.darkpink.lighter};case n.YELLOW:return i===t.LIGHT?{backgroundColor:e.dataviz.lightyellow.lighter,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.dataviz.darkyellow.darker,iconColor:e.dataviz.lightyellow.lighter};case n.PURPLE:return i===t.LIGHT?{backgroundColor:e.dataviz.lightpurple.lighter,iconColor:e.dataviz.darkpurple.darker}:{backgroundColor:e.dataviz.darkpurple.darker,iconColor:e.dataviz.lightpurple.lighter};default:return i===t.LIGHT?{backgroundColor:e.ui.background__medium.rgba,iconColor:e.text.static_icons__default.rgba}:{backgroundColor:e.ui.background__light.rgba,iconColor:e.text.static_icons__default.rgba}}},l={[r.ERROR]:e.interactive.danger__resting.rgba,[r.WARNING]:e.interactive.warning__resting.rgba},u={[r.ERROR]:e.ui.background__danger.rgba,[r.WARNING]:e.ui.background__warning.rgba},d=(e,t)=>(t?l[t]:void 0)??e,f=({$noBottomBorder:t,$state:n,$backgroundColor:r})=>`1px solid ${t?r:d(e.ui.background__medium.rgba,n)}`,p=t=>d(e.text.static_icons__default.rgba,t),m=({$variant:t,$state:n,$backgroundColor:a=e.ui.background__default.rgba})=>t===i.SCRIBBLED_OUT?`repeating-linear-gradient(
2
2
  20deg,
3
3
  ${e.ui.background__light_medium.rgba} 0px,
4
4
  ${e.ui.background__default.rgba} 1px,
5
5
  ${e.ui.background__default.rgba} 10px,
6
6
  ${e.ui.background__light_medium.rgba} 11px,
7
7
  ${e.ui.background__light_medium.rgba} 12px
8
- )`:t===i.COLOURED?n===r.DANGER?u[r.DANGER]:n===r.WARNING?u[r.WARNING]:a:`transparent`;export{m as getBackground,f as getBorderBottom,c as getIconCellColor,p as getSelectedBorder,s as renderContent,u as stateBGColor};
8
+ )`:t===i.COLOURED?n===r.ERROR?u[r.ERROR]:n===r.WARNING?u[r.WARNING]:a:`transparent`;export{m as getBackground,f as getBorderBottom,c as getIconCellColor,p as getSelectedBorder,s as renderContent,u as stateBGColor};
@@ -38,4 +38,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
38
38
  grid-template-columns: auto 2.75rem;
39
39
  grid-gap: ${t.xx_small};
40
40
  align-items: center;
41
- `,g=({children:e,textToCopy:t})=>{let n=i(!1),[c,l]=a(!1),[m,g]=a(`Copy`),_=()=>{navigator.clipboard.writeText(t),g(`Copied!`),setTimeout(()=>{n.current&&g(`Copy`)},3e3)};return r(()=>(n.current=!0,()=>{n.current=!1}),[]),d(p,{onClick:_,onMouseOver:()=>l(!0),onMouseOut:()=>l(!1),children:[e,c&&d(h,{children:[u(o,{data:f,size:16}),u(s,{variant:`overline`,children:m})]})]})};export{g as default};
41
+ `;var g=({children:e,textToCopy:t})=>{let n=i(!1),[c,l]=a(!1),[m,g]=a(`Copy`);return r(()=>(n.current=!0,()=>{n.current=!1}),[]),d(p,{onClick:()=>{navigator.clipboard.writeText(t),g(`Copied!`),setTimeout(()=>{n.current&&g(`Copy`)},3e3)},onMouseOver:()=>l(!0),onMouseOut:()=>l(!1),children:[e,c&&d(h,{children:[u(o,{data:f,size:16}),u(s,{variant:`overline`,children:m})]})]})};export{g as default};
@@ -1,4 +1,4 @@
1
- import * as react97 from "react";
1
+ import * as react90 from "react";
2
2
  import { FocusEventHandler, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
3
3
  import { IconData } from "@equinor/eds-icons";
4
4
 
@@ -15,6 +15,6 @@ interface ListItemProps extends HTMLAttributes<HTMLButtonElement> {
15
15
  isChild?: boolean;
16
16
  borderBottom?: boolean;
17
17
  }
18
- declare const ListItem: react97.ForwardRefExoticComponent<ListItemProps & react97.RefAttributes<HTMLButtonElement>>;
18
+ declare const ListItem: react90.ForwardRefExoticComponent<ListItemProps & react90.RefAttributes<HTMLButtonElement>>;
19
19
  //#endregion
20
20
  export { ListItem, ListItemProps };
@@ -1,5 +1,5 @@
1
1
  import { ChangeEvent, MouseEvent } from "react";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/OptionDrawer/OptionDrawer.d.ts
5
5
  interface ToggleEventProps<T> {
@@ -43,7 +43,7 @@ declare const OptionDrawer: {
43
43
  openAll,
44
44
  showIntermediateParent,
45
45
  parentHasNestedItems
46
- }: OptionDrawerProps<T>): react_jsx_runtime2.JSX.Element;
46
+ }: OptionDrawerProps<T>): react_jsx_runtime1.JSX.Element;
47
47
  displayName: string;
48
48
  };
49
49
  //#endregion
@@ -1 +1 @@
1
- const e=t=>{if(t.length===0)return[];let n=[];return t.forEach(t=>{let r=e(t?.children??[]);n=[t,...n,...r]}),n},t=(t,n,r,i)=>{let a=n.find(e=>e.id===t.id)!==void 0;if(a)return`CHECKED`;if(t.children===void 0||t.children.length===0||r&&!i)return`NONE`;let o=e(t?.children).map(e=>n.find(t=>t.id===e.id)!==void 0);return!r&&o.every(Boolean)?`CHECKED`:o.every(e=>!e)?`NONE`:`INTERMEDIATE`};export{t as getStatus};
1
+ const e=t=>{if(t.length===0)return[];let n=[];return t.forEach(t=>{let r=e(t?.children??[]);n=[t,...n,...r]}),n},t=(t,n,r,i)=>{if(n.find(e=>e.id===t.id)!==void 0)return`CHECKED`;if(t.children===void 0||t.children.length===0||r&&!i)return`NONE`;let a=e(t?.children).map(e=>n.find(t=>t.id===e.id)!==void 0);return!r&&a.every(Boolean)?`CHECKED`:a.every(e=>!e)?`NONE`:`INTERMEDIATE`};export{t as getStatus};
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react27 from "react";
2
2
  import { TooltipProps } from "@equinor/eds-core-react";
3
3
  import * as _floating_ui_utils0 from "@floating-ui/utils";
4
4
 
@@ -6,14 +6,14 @@ import * as _floating_ui_utils0 from "@floating-ui/utils";
6
6
  type OptionalTooltipProps = {
7
7
  textTransform?: string;
8
8
  } & TooltipProps;
9
- declare const OptionalTooltip: react19.ForwardRefExoticComponent<{
9
+ declare const OptionalTooltip: react27.ForwardRefExoticComponent<{
10
10
  textTransform?: string;
11
11
  } & {
12
12
  placement?: _floating_ui_utils0.Placement;
13
- title?: react19.ReactNode;
13
+ title?: react27.ReactNode;
14
14
  children: React.ReactElement & React.RefAttributes<HTMLElement>;
15
15
  enterDelay?: number;
16
16
  portalContainer?: HTMLElement;
17
- } & Omit<react19.HTMLAttributes<HTMLDivElement>, "title"> & react19.RefAttributes<HTMLDivElement>>;
17
+ } & Omit<react27.HTMLAttributes<HTMLDivElement>, "title"> & react27.RefAttributes<HTMLDivElement>>;
18
18
  //#endregion
19
19
  export { OptionalTooltip, OptionalTooltipProps };
@@ -1,4 +1,4 @@
1
- import * as react17 from "react";
1
+ import * as react13 from "react";
2
2
 
3
3
  //#region src/molecules/ProfileAvatar/ProfileAvatar.d.ts
4
4
  interface ProfileAvatarProps {
@@ -7,6 +7,6 @@ interface ProfileAvatarProps {
7
7
  size?: 'small' | 'small-medium' | 'medium' | 'large' | 'x-large' | number;
8
8
  disabled?: boolean;
9
9
  }
10
- declare const ProfileAvatar: react17.ForwardRefExoticComponent<ProfileAvatarProps & react17.RefAttributes<HTMLDivElement>>;
10
+ declare const ProfileAvatar: react13.ForwardRefExoticComponent<ProfileAvatarProps & react13.RefAttributes<HTMLDivElement>>;
11
11
  //#endregion
12
12
  export { ProfileAvatar, ProfileAvatarProps };
@@ -1,4 +1,4 @@
1
- import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{colors as t}from"../../atoms/style/colors.js";import{forwardRef as n,useMemo as r}from"react";import{Avatar as i,Icon as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s}from"react/jsx-runtime";import{person as c}from"@equinor/eds-icons";const{shape:l,typography:u}=e,d=[t.infographic.primary__energy_red_55.rgba,t.infographic.primary__moss_green_55.rgba,t.infographic.substitute__green_mint.rgba,t.infographic.substitute__blue_overcast.rgba];function f(e){let t=e.replace(/ *\([^)]*\) */g,``).toUpperCase(),n=t.split(` `),r=t.includes(`,`),i=e=>{let t=e.split(`,`);return t[1].trim().charAt(0)};if(n.length===1&&n[0]!==``)return n[0].charAt(0);if(r)return i(t)+n[0].charAt(0);if(n.length>=2)return n[0].charAt(0)+n[n.length-1].charAt(0)}function p(e){let t=0;if(e)for(let n=0;n<e.length;n++)t+=e.charCodeAt(n);return d[t%d.length]}const m=o.div`
1
+ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{colors as t}from"../../atoms/style/colors.js";import{forwardRef as n,useMemo as r}from"react";import{Avatar as i,Icon as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s}from"react/jsx-runtime";import{person as c}from"@equinor/eds-icons";const{shape:l,typography:u}=e,d=[t.infographic.primary__energy_red_55.rgba,t.infographic.primary__moss_green_55.rgba,t.infographic.substitute__green_mint.rgba,t.infographic.substitute__blue_overcast.rgba];function f(e){let t=e.replace(/ *\([^)]*\) */g,``).toUpperCase(),n=t.split(` `),r=t.includes(`,`),i=e=>e.split(`,`)[1].trim().charAt(0);if(n.length===1&&n[0]!==``)return n[0].charAt(0);if(r)return i(t)+n[0].charAt(0);if(n.length>=2)return n[0].charAt(0)+n[n.length-1].charAt(0)}function p(e){let t=0;if(e)for(let n=0;n<e.length;n++)t+=e.charCodeAt(n);return d[t%d.length]}const m=o.div`
2
2
  width: ${e=>e.$size}px;
3
3
  height: ${e=>e.$size}px;
4
4
  position: relative;
@@ -1 +1 @@
1
- import{useAmplifyKit as e}from"../../atoms/hooks/useAmplifyKit.js";import{useEffect as t,useRef as n}from"react";import{useEditor as r}from"@tiptap/react";import{useQueryClient as i}from"@tanstack/react-query";const a=({children:a,content:o,features:s,placeholder:c,onUpdate:l,onImageUpload:u,onImageRead:d,onImageRemove:f,onRemovedImagesChange:p,extensions:m=[]})=>{let h=e({features:s,placeholder:c,onImageUpload:u,onImageRead:d}),g=i(),_=n([]),v=n([]),y=n([]),b=e=>{let t=[];e.getJSON().content?.forEach(e=>{e.type===`image`&&e.attrs?.src&&t.push(e.attrs.src)});for(let e of t)if(!_.current.includes(e))_.current.push(e);else if(_.current.includes(e)&&f){let t=g.getQueryData([e]);if(t){let n=t.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[n.length-1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);let s=new File([o],e,{type:r});u?.(s)}}let n=_.current.filter(e=>!t.includes(e)&&!v.current.includes(e));if(f)for(let e of n)f?.(e),v.current.push(e);p&&y.current.length!==n.length&&(p(v.current),y.current=n)},x=r({content:o,shouldRerenderOnTransaction:!0,extensions:[h,...m],onCreate:({editor:e})=>{b(e)},onUpdate:({editor:e})=>{b(e),l?.(e.getHTML())}});return t(()=>{x&&o!==x.getHTML()&&x.commands.setContent(o||``)},[o]),x?a(x):null};export{a as EditorProvider};
1
+ import{useAmplifyKit as e}from"../../atoms/hooks/useAmplifyKit.js";import{useEffect as t,useRef as n}from"react";import{useEditor as r}from"@tiptap/react";import{useQueryClient as i}from"@tanstack/react-query";const a=({children:a,content:o,features:s,placeholder:c,onUpdate:l,onImageUpload:u,onImageRead:d,onImageRemove:f,onRemovedImagesChange:p,extensions:m=[]})=>{let h=e({features:s,placeholder:c,onImageUpload:u,onImageRead:d}),g=i(),_=n([]),v=n([]),y=n([]),b=e=>{let t=[];e.getJSON().content?.forEach(e=>{e.type===`image`&&e.attrs?.src&&t.push(e.attrs.src)});for(let e of t)if(!_.current.includes(e))_.current.push(e);else if(_.current.includes(e)&&f){let t=g.getQueryData([e]);if(t){let n=t.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[n.length-1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);let s=new File([o],e,{type:r});u?.(s)}}let n=_.current.filter(e=>!t.includes(e)&&!v.current.includes(e));if(f)for(let e of n)f?.(e),v.current.push(e);else p&&y.current.length!==n.length&&(p(n),y.current=n)},x=r({content:o,shouldRerenderOnTransaction:!0,extensions:[h,...m],onCreate:({editor:e})=>{b(e)},onUpdate:({editor:e})=>{b(e),l?.(e.getHTML())}});return t(()=>{x&&o!==x.getHTML()&&x.commands.setContent(o||``)},[o]),x?a(x):null};export{a as EditorProvider};
@@ -1 +1 @@
1
- import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import{useRef as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{camera_add_photo as o}from"@equinor/eds-icons";const s=({onImageUpload:s,editor:c,features:l})=>{let u=n(null);if(l&&!l.includes(e.IMAGES))return null;let d=()=>{u.current&&u.current.click()},f=async e=>{let t=e.target.files;if(!t?.[0]){console.error(`Files undefined`);return}let n=await s?.(t[0]);n&&c?.chain().focus().setImage({src:n.src,alt:n.alt}).run()};return a(r,{children:[i(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange:f,style:{display:`none`},accept:`image/*, video/*`}),i(t.Button,{"data-testid":`add-image-button`,icon:o,onClick:d,tooltip:`Add Image`})]})};export{s as AddImageButton};
1
+ import{RichTextEditorFeatures as e}from"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import{useRef as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{camera_add_photo as o}from"@equinor/eds-icons";const s=({onImageUpload:s,editor:c,features:l})=>{let u=n(null);if(l&&!l.includes(e.IMAGES))return null;let d=()=>{u.current&&u.current.click()};return a(r,{children:[i(`input`,{ref:u,type:`file`,id:`img-input`,multiple:!1,onChange:async e=>{let t=e.target.files;if(!t?.[0]){console.error(`Files undefined`);return}let n=await s?.(t[0]);n&&c?.chain().focus().setImage({src:n.src,alt:n.alt}).run()},style:{display:`none`},accept:`image/*, video/*`}),i(t.Button,{"data-testid":`add-image-button`,icon:o,onClick:d,tooltip:`Add Image`})]})};export{s as AddImageButton};
@@ -1,7 +1,7 @@
1
1
  import { EditorPanel, ImageExtensionFnProps, RichTextEditorFeatures } from "../RichTextEditor.types.js";
2
2
  import { MenuButtonProps } from "./MenuButton.js";
3
3
  import { AddImageProps } from "./AddImageButton.js";
4
- import * as react32 from "react";
4
+ import * as react31 from "react";
5
5
  import { FC } from "react";
6
6
  import * as styled_components0 from "styled-components";
7
7
  import { Editor } from "@tiptap/react";
@@ -14,10 +14,10 @@ interface MenuBarProps extends Pick<ImageExtensionFnProps, 'onImageUpload'> {
14
14
  }
15
15
  declare const AmplifyBar: FC<MenuBarProps>;
16
16
  declare const EditorMenu: {
17
- Bar: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react32.DetailedHTMLProps<react32.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
18
- Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react32.DetailedHTMLProps<react32.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
- Button: react32.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react32.RefAttributes<HTMLButtonElement>>;
20
- Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react32.DetailedHTMLProps<react32.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
17
+ Bar: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
18
+ Bars: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
+ Button: react31.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react31.RefAttributes<HTMLButtonElement>>;
20
+ Section: styled_components_dist_types3.IStyledComponentBase<"web", styled_components0.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
21
21
  AddImageButton: FC<AddImageProps>;
22
22
  };
23
23
  declare const EditorText: {
@@ -1 +1 @@
1
- import{amplify_table_add_column_left as e,amplify_table_add_column_right as t,amplify_table_remove_column as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>{let c=()=>s.chain().focus().addColumnBefore().run(),l=()=>s.chain().focus().addColumnAfter().run(),u=()=>s.chain().focus().deleteColumn().run();return o(r,{children:[a(i,{tooltip:`Add column left`,icon:e,onClick:c,disabled:!s.can().addColumnBefore()}),a(i,{tooltip:`Add column right`,icon:t,onClick:l,disabled:!s.can().addColumnAfter()}),a(i,{tooltip:`Remove column`,icon:n,onClick:u,disabled:!s.can().deleteColumn()})]})};export{s as TableColumn};
1
+ import{amplify_table_add_column_left as e,amplify_table_add_column_right as t,amplify_table_remove_column as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>o(r,{children:[a(i,{tooltip:`Add column left`,icon:e,onClick:()=>s.chain().focus().addColumnBefore().run(),disabled:!s.can().addColumnBefore()}),a(i,{tooltip:`Add column right`,icon:t,onClick:()=>s.chain().focus().addColumnAfter().run(),disabled:!s.can().addColumnAfter()}),a(i,{tooltip:`Remove column`,icon:n,onClick:()=>s.chain().focus().deleteColumn().run(),disabled:!s.can().deleteColumn()})]});export{s as TableColumn};
@@ -1 +1 @@
1
- import{amplify_table_merge_cells as e,amplify_table_split_cell as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>{let s=()=>o.chain().focus().mergeCells().run(),c=()=>o.chain().focus().splitCell().run();return a(n,{children:[i(r,{tooltip:`Merge selected cells`,icon:e,onClick:s,disabled:!o.can().mergeCells()}),i(r,{tooltip:`Split selected cell`,icon:t,onClick:c,disabled:!o.can().splitCell()})]})};export{o as TableMerge};
1
+ import{amplify_table_merge_cells as e,amplify_table_split_cell as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>a(n,{children:[i(r,{tooltip:`Merge selected cells`,icon:e,onClick:()=>o.chain().focus().mergeCells().run(),disabled:!o.can().mergeCells()}),i(r,{tooltip:`Split selected cell`,icon:t,onClick:()=>o.chain().focus().splitCell().run(),disabled:!o.can().splitCell()})]});export{o as TableMerge};
@@ -1 +1 @@
1
- import{amplify_table_add_row_above as e,amplify_table_add_row_below as t,amplify_table_remove_row as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>{let c=()=>s.chain().focus().addRowAfter().run(),l=()=>s.chain().focus().addRowBefore().run(),u=()=>s.chain().focus().deleteRow().run();return o(r,{children:[a(i,{tooltip:`Add row below`,icon:t,onClick:c,disabled:!s.can().addRowAfter()}),a(i,{tooltip:`Add row above`,icon:e,onClick:l,disabled:!s.can().addRowBefore()}),a(i,{tooltip:`Remove row`,icon:n,onClick:u,disabled:!s.can().deleteRow()})]})};export{s as TableRow};
1
+ import{amplify_table_add_row_above as e,amplify_table_add_row_below as t,amplify_table_remove_row as n}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as r}from"../MenuBar.styles.js";import{MenuButton as i}from"../MenuButton.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>o(r,{children:[a(i,{tooltip:`Add row below`,icon:t,onClick:()=>s.chain().focus().addRowAfter().run(),disabled:!s.can().addRowAfter()}),a(i,{tooltip:`Add row above`,icon:e,onClick:()=>s.chain().focus().addRowBefore().run(),disabled:!s.can().addRowBefore()}),a(i,{tooltip:`Remove row`,icon:n,onClick:()=>s.chain().focus().deleteRow().run(),disabled:!s.can().deleteRow()})]});export{s as TableRow};
@@ -1 +1 @@
1
- import{amplify_table_column_heading as e,amplify_table_row_heading as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>{let s=()=>o.chain().focus().toggleHeaderRow().run(),c=()=>o.chain().focus().toggleHeaderColumn().run();return a(n,{children:[i(r,{tooltip:`Toggle header row`,icon:t,onClick:s,disabled:!o.can().toggleHeaderRow()}),i(r,{tooltip:`Toggle header column`,icon:e,onClick:c,disabled:!o.can().toggleHeaderColumn()})]})};export{o as ToggleTable};
1
+ import{amplify_table_column_heading as e,amplify_table_row_heading as t}from"../../../../atoms/icons/wysiwyg.js";import{MenuSection as n}from"../MenuBar.styles.js";import{MenuButton as r}from"../MenuButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>a(n,{children:[i(r,{tooltip:`Toggle header row`,icon:t,onClick:()=>o.chain().focus().toggleHeaderRow().run(),disabled:!o.can().toggleHeaderRow()}),i(r,{tooltip:`Toggle header column`,icon:e,onClick:()=>o.chain().focus().toggleHeaderColumn().run(),disabled:!o.can().toggleHeaderColumn()})]});export{o as ToggleTable};
@@ -42,4 +42,4 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
42
42
  bottom: 5px;
43
43
  height: 4px;
44
44
  width: 24px;
45
- `,m=({editor:e,features:i})=>{let l=t=>{e.chain().focus().setColor(t.target.value).run()};return i&&!i.includes(t.TEXT_COLOR)?null:a(n,{title:`Text Color`,enterDelay:300,children:o(d,{children:[a(`input`,{type:`color`,onInput:l,"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}),a(f,{children:a(r,{data:s})}),a(p,{style:{background:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}})]})})};export{m as TextColor};
45
+ `,m=({editor:e,features:i})=>i&&!i.includes(t.TEXT_COLOR)?null:a(n,{title:`Text Color`,enterDelay:300,children:o(d,{children:[a(`input`,{type:`color`,onInput:t=>{e.chain().focus().setColor(t.target.value).run()},"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}),a(f,{children:a(r,{data:s})}),a(p,{style:{background:e.getAttributes(`textStyle`)?.color||c.text.static_icons__default.hex}})]})});export{m as TextColor};
@@ -1 +1 @@
1
- import{useRichTextImage as e}from"../../../atoms/hooks/useRichTextImage.js";import{jsx as t}from"react/jsx-runtime";import{NodeViewWrapper as n,ReactNodeViewRenderer as r}from"@tiptap/react";import i from"@tiptap/extension-image";import{Plugin as a,PluginKey as o}from"@tiptap/pm/state";const s=r=>{let{src:i,alt:a}=r.node.attrs,o=r.extension.options.onImageRead,{data:s}=e(i,o);return t(n,{children:t(`img`,{src:s,alt:a})})};var c=i.extend({addOptions(){return{...this.parent?.(),onImageUpload:void 0,onImageRead:void 0}},addNodeView(){return r(s)},addProseMirrorPlugins(){let{onImageUpload:e}=this.options;return[new a({key:new o(`extendedImageHandler`),props:{handleDOMEvents:{drop(t,n){let r=n.dataTransfer?.files?.length;if(!r||e===void 0)return;let i=Array.from(n.dataTransfer.files).filter(e=>/image/i.test(e.type));if(i.length===0)return;n.preventDefault();let{schema:a}=t.state,o=t.posAtCoords({left:n.clientX,top:n.clientY});if(o)for(let n of i)e(n).then(e=>{if(!e)return;let n=a.nodes.image.create({src:e.src,alt:e.alt}),r=t.state.tr.insert(o.pos,n);t.dispatch(r)}).catch(e=>{console.error(e)})},paste(t,n){let r=n.clipboardData?.files?.length;if(!r||e===void 0)return;let i=Array.from(n.clipboardData.files).filter(e=>/image/i.test(e.type));if(i.length===0)return;n.preventDefault();let{schema:a}=t.state;for(let n of i)e(n).then(e=>{if(!e)return;let n=a.nodes.image.create({src:e.src,alt:e.src}),r=t.state.tr.replaceSelectionWith(n);t.dispatch(r)}).catch(e=>{console.error(e)})}}}})]}});export{c as default};
1
+ import{useRichTextImage as e}from"../../../atoms/hooks/useRichTextImage.js";import{jsx as t}from"react/jsx-runtime";import{NodeViewWrapper as n,ReactNodeViewRenderer as r}from"@tiptap/react";import i from"@tiptap/extension-image";import{Plugin as a,PluginKey as o}from"@tiptap/pm/state";const s=r=>{let{src:i,alt:a}=r.node.attrs,o=r.extension.options.onImageRead,{data:s}=e(i,o);return t(n,{children:t(`img`,{src:s,alt:a})})};var c=i.extend({addOptions(){return{...this.parent?.(),onImageUpload:void 0,onImageRead:void 0}},addNodeView(){return r(s)},addProseMirrorPlugins(){let{onImageUpload:e}=this.options;return[new a({key:new o(`extendedImageHandler`),props:{handleDOMEvents:{drop(t,n){if(!n.dataTransfer?.files?.length||e===void 0)return;let r=Array.from(n.dataTransfer.files).filter(e=>/image/i.test(e.type));if(r.length===0)return;n.preventDefault();let{schema:i}=t.state,a=t.posAtCoords({left:n.clientX,top:n.clientY});if(a)for(let n of r)e(n).then(e=>{if(!e)return;let n=i.nodes.image.create({src:e.src,alt:e.alt}),r=t.state.tr.insert(a.pos,n);t.dispatch(r)}).catch(e=>{console.error(e)})},paste(t,n){if(!n.clipboardData?.files?.length||e===void 0)return;let r=Array.from(n.clipboardData.files).filter(e=>/image/i.test(e.type));if(r.length===0)return;n.preventDefault();let{schema:i}=t.state;for(let n of r)e(n).then(e=>{if(!e)return;let n=i.nodes.image.create({src:e.src,alt:e.src}),r=t.state.tr.replaceSelectionWith(n);t.dispatch(r)}).catch(e=>{console.error(e)})}}}})]}});export{c as default};
@@ -2,16 +2,16 @@ import { EditorStylingProps, RichTextContentProps } from "./RichTextEditor.style
2
2
  import { EditorProviderProps } from "./EditorProvider.js";
3
3
  import { MenuBarProps } from "./MenuBar/MenuBar.js";
4
4
  import { RichTextEditor } from "./RichTextEditor.js";
5
- import * as react23 from "react";
5
+ import * as react19 from "react";
6
6
  import * as _tiptap_react0 from "@tiptap/react";
7
7
  import * as styled_components_dist_types0 from "styled-components/dist/types";
8
8
 
9
9
  //#region src/molecules/RichTextEditor/index.d.ts
10
10
  declare const RichText: {
11
- Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<react23.DetailedHTMLProps<react23.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, EditorStylingProps>> & string;
12
- Provider: react23.FC<EditorProviderProps>;
13
- Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> & react23.RefAttributes<HTMLDivElement>, RichTextContentProps>> & string & Omit<react23.MemoExoticComponent<react23.ForwardRefExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react23.RefAttributes<HTMLDivElement>>>, keyof react23.Component<any, {}, any>>;
14
- Bar: react23.FC<MenuBarProps>;
11
+ Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<react19.DetailedHTMLProps<react19.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, EditorStylingProps>> & string;
12
+ Provider: react19.FC<EditorProviderProps>;
13
+ Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> & react19.RefAttributes<HTMLDivElement>, RichTextContentProps>> & string & Omit<react19.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react19.RefAttributes<HTMLDivElement>>, keyof react19.Component<any, {}, any>>;
14
+ Bar: react19.FC<MenuBarProps>;
15
15
  };
16
16
  //#endregion
17
17
  export { RichText };
@@ -1,7 +1,7 @@
1
- import * as react40 from "react";
1
+ import * as react41 from "react";
2
2
  import { SearchProps } from "@equinor/eds-core-react";
3
3
 
4
4
  //#region src/molecules/Search/Search.d.ts
5
- declare const Search$1: react40.ForwardRefExoticComponent<SearchProps & react40.RefAttributes<HTMLInputElement>>;
5
+ declare const Search$1: react41.ForwardRefExoticComponent<SearchProps & react41.RefAttributes<HTMLInputElement>>;
6
6
  //#endregion
7
7
  export { Search$1 as Search };
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{MenuItemWrapper as t,StyledMenuItem as n}from"./Select.styles.js";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{add_box as o}from"@equinor/eds-icons";const s=({itemRefs:s,onItemKeyDown:c,index:l,onAddItem:u,addItemSingularWord:d,children:f})=>{let p=e=>{e.preventDefault(),e.key===`Enter`?u():c(e)};return i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:p,children:[i(r,{data:o,color:e.interactive.primary__resting.rgba}),a(`span`,{children:[`Add "`,f,`" as new `,d]})]})})};export{s as AddTagItem};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{MenuItemWrapper as t,StyledMenuItem as n}from"./Select.styles.js";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{add_box as o}from"@equinor/eds-icons";const s=({itemRefs:s,onItemKeyDown:c,index:l,onAddItem:u,addItemSingularWord:d,children:f})=>i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:e=>{e.preventDefault(),e.key===`Enter`?u():c(e)},children:[i(r,{data:o,color:e.interactive.primary__resting.rgba}),a(`span`,{children:[`Add "`,f,`" as new `,d]})]})});export{s as AddTagItem};
@@ -1 +1 @@
1
- import{getCumulativeArrayFromNumberedArray as e}from"./Select.utils.js";import{NoItemsFoundText as t}from"./Select.styles.js";import{SelectMenuItem as n}from"./SelectMenuItem.js";import{useMemo as r}from"react";import{Menu as i}from"@equinor/eds-core-react";import{jsx as a}from"react/jsx-runtime";const o=o=>{let{onItemSelect:s,onItemKeyDown:c,itemRefs:l,groups:u,search:d,onSearchFilter:f,CustomMenuItemComponent:p}=o,m=r(()=>{if(d===``)return u;let e=new RegExp(d.trim(),`i`);return u.map(t=>({title:t.title,items:t.items.filter(t=>f===void 0?t.label.match(e):f(d,t))})).filter(e=>e.items.length>0)},[u,f,d]),h=r(()=>{let t=m.map(e=>e.items.length);return e(t)},[m]);return m.length===0?a(t,{children:`No items found`}):`values`in o?m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,values:o.values,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`)):m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,value:o.value,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`))};export{o as GroupedSelectMenu};
1
+ import{getCumulativeArrayFromNumberedArray as e}from"./Select.utils.js";import{NoItemsFoundText as t}from"./Select.styles.js";import{SelectMenuItem as n}from"./SelectMenuItem.js";import{useMemo as r}from"react";import{Menu as i}from"@equinor/eds-core-react";import{jsx as a}from"react/jsx-runtime";const o=o=>{let{onItemSelect:s,onItemKeyDown:c,itemRefs:l,groups:u,search:d,onSearchFilter:f,CustomMenuItemComponent:p}=o,m=r(()=>{if(d===``)return u;let e=new RegExp(d.trim(),`i`);return u.map(t=>({title:t.title,items:t.items.filter(t=>f===void 0?t.label.match(e):f(d,t))})).filter(e=>e.items.length>0)},[u,f,d]),h=r(()=>e(m.map(e=>e.items.length)),[m]);return m.length===0?a(t,{children:`No items found`}):`values`in o?m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,values:o.values,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`)):m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,value:o.value,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`))};export{o as GroupedSelectMenu};
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{useSelect as n}from"../../atoms/hooks/useSelect.js";import{SkeletonField as r}from"../Skeleton/SkeletonField.js";import{useOutsideClick as i}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";import{ClearButton as ee,ComboBoxChip as a,Container as o,HelperWrapper as te,PlaceholderText as s,Section as c,StyledMenu as l,ValueText as u,Wrapper as ne}from"./Select.styles.js";import{GroupedSelectMenu as re}from"./GroupedSelectMenu.js";import{ListSelectMenu as d}from"./ListSelectMenu.js";import{useMemo as f,useRef as p}from"react";import{Icon as m,Label as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{arrow_drop_down as ie,arrow_drop_up as ae,clear as v}from"@equinor/eds-icons";const y=y=>{let{clearable:b=!0,loading:x=!1,disabled:S=!1,lightBackground:C=!1,underlineHighlight:w=!1,sortValues:T=!0,placeholder:E=`Select...`,label:D,helperText:O,showHelperIcon:k=!0,meta:A,id:j=`amplify-combobox-${D}`,variant:M,inDialog:N=!1,onSearchFilter:P,"data-testid":F,CustomMenuItemComponent:I}=y,{handleOnAddItem:L,handleOnClear:R,handleOnItemKeyDown:z,handleOnItemSelect:B,handleOnSearchChange:V,handleOnSearchKeyDown:H,handleToggleOpen:U,itemRefs:W,search:G,selectedValues:K,handleOnClose:q,handleOnOpen:oe,handleOnRemoveItem:J,open:Y,searchRef:se,tryingToRemoveItem:X}=n({...y,clearable:b,loading:x,disabled:S,lightBackground:C,underlineHighlight:w,sortValues:T,placeholder:E}),ce=p(`${Math.max(40,Math.random()*80)}%`),Z=p(null),Q=p(null),le=f(()=>!!D||!!A,[D,A]),ue=f(()=>!!O,[O]),$=f(()=>{if(k)return t(M)},[k,M]);i(Q.current,e=>{N&&Y&&e.target&&Z.current&&Q.current&&!Z.current.contains(e.target)&&!Q.current?.contains(e.target)&&q()});let de=f(()=>{if(`value`in y&&y.value&&`customValueComponent`in y&&y.customValueComponent)return g(y.customValueComponent,{item:y.value});if(`value`in y&&y.value)return g(u,{children:y.value.label});if(`showSelectedAsText`in y&&y.showSelectedAsText){let e=y.items?y.items.length:y.groups.flatMap(e=>e.items).length,t=typeof y.showSelectedAsText==`function`?y.showSelectedAsText({selectedAmount:K.length,totalAmount:e}):`${K.length}/${e} Selected`;return g(u,{children:t})}else return K.map(e=>`customValueComponent`in y&&y.customValueComponent?g(y.customValueComponent,{item:e,onDelete:()=>J(e),tryingToRemove:X!==void 0&&X.value===e.value},e.value):g(a,{"data-testid":`amplify-combobox-chip`,className:`amplify-combo-box-chip`,onDelete:()=>J(e),$tryingToRemove:X?.value===e.value,$lightBackground:C,children:e.label},e.value))},[K,X,C,y,J]);return _(`div`,{children:[le&&g(h,{label:D,meta:A,htmlFor:j,disabled:S}),_(ne,{children:[_(o,{"data-testid":F||`combobox-container`,ref:Z,onClick:oe,"aria-expanded":Y,$variant:M,$loading:x,$lightBackground:C,children:[_(c,{children:[!x&&G===``&&K.length===0&&g(s,{children:E}),(G===``&&`value`in y||`values`in y&&K.length>0&&(!y.showSelectedAsText||y.showSelectedAsText&&G===``))&&!x&&de,g(`input`,{id:j,disabled:S||x,ref:se,type:`search`,role:`combobox`,value:G,autoComplete:`off`,onChange:V,onKeyDownCapture:H}),x&&g(r,{role:`progressbar`,style:{width:ce.current,left:0,top:`50%`,transform:`translateY(-50%)`}})]}),g(m,{onClick:U,data:Y?ae:ie,color:x?e.interactive.disabled__fill.rgba:e.interactive.primary__resting.rgba}),b&&K.length>0&&!x&&g(ee,{id:`clear`,variant:`ghost_icon`,onClick:R,"data-testid":`clearBtn`,children:g(m,{data:v,size:18})})]}),ue&&_(te,{$variant:S?`disabled`:M,children:[$&&g(m,{data:$,size:16}),g(h,{label:O,htmlFor:j})]})]}),Y&&g(l,{ref:Q,open:!0,id:`combobox-menu`,anchorEl:Z.current,onClose:q,placement:`bottom`,style:{width:`${Z.current?.clientWidth}px`,maxWidth:`${Z.current?.clientWidth}px`},children:`groups`in y&&y.groups?g(re,{...y,search:G,itemRefs:W,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I}):g(d,{...y,search:G,itemRefs:W,onAddItem:y.onAddItem?L:void 0,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I})},`select-menu-${G}`)]})};export{y as Select};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{useSelect as n}from"../../atoms/hooks/useSelect.js";import{SkeletonField as r}from"../Skeleton/SkeletonField.js";import{useOutsideClick as i}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";import{ClearButton as ee,ComboBoxChip as te,Container as a,HelperWrapper as ne,PlaceholderText as o,Section as s,StyledMenu as c,ValueText as l,Wrapper as re}from"./Select.styles.js";import{GroupedSelectMenu as u}from"./GroupedSelectMenu.js";import{ListSelectMenu as d}from"./ListSelectMenu.js";import{useMemo as f,useRef as p}from"react";import{Icon as m,Label as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{arrow_drop_down as ie,arrow_drop_up as ae,clear as v}from"@equinor/eds-icons";const y=y=>{let{clearable:b=!0,loading:x=!1,disabled:S=!1,lightBackground:C=!1,underlineHighlight:w=!1,sortValues:T=!0,placeholder:E=`Select...`,label:D,helperText:O,showHelperIcon:k=!0,meta:A,id:j=`amplify-combobox-${D}`,variant:M,inDialog:N=!1,onSearchFilter:P,"data-testid":F,CustomMenuItemComponent:I}=y,{handleOnAddItem:L,handleOnClear:R,handleOnItemKeyDown:z,handleOnItemSelect:B,handleOnSearchChange:V,handleOnSearchKeyDown:H,handleToggleOpen:U,itemRefs:W,search:G,selectedValues:K,handleOnClose:q,handleOnOpen:oe,handleOnRemoveItem:J,open:Y,searchRef:se,tryingToRemoveItem:X}=n({...y,clearable:b,loading:x,disabled:S,lightBackground:C,underlineHighlight:w,sortValues:T,placeholder:E}),ce=p(`${Math.max(40,Math.random()*80)}%`),Z=p(null),Q=p(null),le=f(()=>!!D||!!A,[D,A]),ue=f(()=>!!O,[O]),$=f(()=>{if(k)return t(M)},[k,M]);i(Q.current,e=>{N&&Y&&e.target&&Z.current&&Q.current&&!Z.current.contains(e.target)&&!Q.current?.contains(e.target)&&q()});let de=f(()=>{if(`value`in y&&y.value&&`customValueComponent`in y&&y.customValueComponent)return g(y.customValueComponent,{item:y.value});if(`value`in y&&y.value)return g(l,{children:y.value.label});if(`showSelectedAsText`in y&&y.showSelectedAsText){let e=y.items?y.items.length:y.groups.flatMap(e=>e.items).length;return g(l,{children:typeof y.showSelectedAsText==`function`?y.showSelectedAsText({selectedAmount:K.length,totalAmount:e}):`${K.length}/${e} Selected`})}else return K.map(e=>`customValueComponent`in y&&y.customValueComponent?g(y.customValueComponent,{item:e,onDelete:()=>J(e),tryingToRemove:X!==void 0&&X.value===e.value},e.value):g(te,{"data-testid":`amplify-combobox-chip`,className:`amplify-combo-box-chip`,onDelete:()=>J(e),$tryingToRemove:X?.value===e.value,$lightBackground:C,children:e.label},e.value))},[K,X,C,y,J]);return _(`div`,{children:[le&&g(h,{label:D,meta:A,htmlFor:j,disabled:S}),_(re,{children:[_(a,{"data-testid":F||`combobox-container`,ref:Z,onClick:oe,"aria-expanded":Y,$variant:M,$loading:x,$lightBackground:C,children:[_(s,{children:[!x&&G===``&&K.length===0&&g(o,{children:E}),(G===``&&`value`in y||`values`in y&&K.length>0&&(!y.showSelectedAsText||y.showSelectedAsText&&G===``))&&!x&&de,g(`input`,{id:j,disabled:S||x,ref:se,type:`search`,role:`combobox`,value:G,autoComplete:`off`,onChange:V,onKeyDownCapture:H}),x&&g(r,{role:`progressbar`,style:{width:ce.current,left:0,top:`50%`,transform:`translateY(-50%)`}})]}),g(m,{onClick:U,data:Y?ae:ie,color:x?e.interactive.disabled__fill.rgba:e.interactive.primary__resting.rgba}),b&&K.length>0&&!x&&g(ee,{id:`clear`,variant:`ghost_icon`,onClick:R,"data-testid":`clearBtn`,children:g(m,{data:v,size:18})})]}),ue&&_(ne,{$variant:S?`disabled`:M,children:[$&&g(m,{data:$,size:16}),g(h,{label:O,htmlFor:j})]})]}),Y&&g(c,{ref:Q,open:!0,id:`combobox-menu`,anchorEl:Z.current,onClose:q,placement:`bottom`,style:{width:`${Z.current?.clientWidth}px`,maxWidth:`${Z.current?.clientWidth}px`},children:`groups`in y&&y.groups?g(u,{...y,search:G,itemRefs:W,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I}):g(d,{...y,search:G,itemRefs:W,onAddItem:y.onAddItem?L:void 0,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I})},`select-menu-${G}`)]})};export{y as Select};
@@ -1,5 +1,5 @@
1
1
  import { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
2
- import * as react44 from "react";
2
+ import * as react43 from "react";
3
3
  import "@equinor/eds-core-react";
4
4
  import "styled-components";
5
5
  import * as styled_components_dist_types8 from "styled-components/dist/types";
@@ -11,12 +11,12 @@ interface ComboBoxChipProps {
11
11
  $lightBackground?: boolean;
12
12
  className: string;
13
13
  }
14
- declare const ComboBoxChip: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<((Omit<react44.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
14
+ declare const ComboBoxChip: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<((Omit<react43.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
15
15
  onClick?: undefined;
16
16
  onDelete?: undefined;
17
- }) | ClickableChipProps | DeletableChipProps)) & react44.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types8.BaseObject, ComboBoxChipProps>> & string & Omit<react44.ForwardRefExoticComponent<(Omit<react44.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
17
+ }) | ClickableChipProps | DeletableChipProps)) & react43.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types8.BaseObject, ComboBoxChipProps>> & string & Omit<react43.ForwardRefExoticComponent<(Omit<react43.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
18
18
  onClick?: undefined;
19
19
  onDelete?: undefined;
20
- }) | ClickableChipProps | DeletableChipProps)) & react44.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react44.Component<any, {}, any>>;
20
+ }) | ClickableChipProps | DeletableChipProps)) & react43.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react43.Component<any, {}, any>>;
21
21
  //#endregion
22
22
  export { ComboBoxChip };
@@ -151,7 +151,6 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
151
151
  background: ${({$tryingToRemove:e,$lightBackground:t})=>e?r.interactive.primary__hover_alt.rgba:t?r.ui.background__light.rgba:r.ui.background__default.rgba} !important;
152
152
  `,_=l(s.Item)`
153
153
  flex-grow: 1;
154
- ${({$paddedLeft:e})=>e&&`margin-left: 36px`};
155
154
  padding-left: 10px;
156
155
 
157
156
  > div {
@@ -1 +1 @@
1
- function e(t,n){let r=t.length,i=t.slice(0,n).map(t=>e(t.children??[],0)).reduce((e,t)=>e+t,0);return r+i}const t=e=>{let t=e=>{if(!e?.length)return[];let n=e.flatMap(({children:e,value:t})=>e?.map(e=>({...e,parent:t}))??[]);return[...n,...t(n)]};return[...e,...t(e)]},n=e=>{let t=Array(e.length).fill(0);for(let n=1;n<e.length;n++)t[n]=t[n-1]+e[n-1];return t};export{t as flattenOptions,e as getChildOffset,n as getCumulativeArrayFromNumberedArray};
1
+ function e(t,n){return t.length+t.slice(0,n).map(t=>e(t.children??[],0)).reduce((e,t)=>e+t,0)}const t=e=>{let t=e=>{if(!e?.length)return[];let n=e.flatMap(({children:e,value:t})=>e?.map(e=>({...e,parent:t}))??[]);return[...n,...t(n)]};return[...e,...t(e)]},n=e=>{let t=Array(e.length).fill(0);for(let n=1;n<e.length;n++)t[n]=t[n-1]+e[n-1];return t};export{t as flattenOptions,e as getChildOffset,n as getCumulativeArrayFromNumberedArray};
@@ -1 +1 @@
1
- import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{spacings as t}from"../../atoms/style/spacings.js";import{getChildOffset as n}from"./Select.utils.js";import{MenuItemSpacer as r,MenuItemWrapper as i,SmallButton as a,StyledMenuItem as o}from"./Select.styles.js";import{getParentIcon as s,getParentState as c}from"./SelectMenuItem.utils.js";import{useMemo as l,useRef as u,useState as d}from"react";import{Icon as f}from"@equinor/eds-core-react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{checkbox as g,checkbox_outline as _,chevron_down as v,chevron_right as y}from"@equinor/eds-icons";const{colors:b}=e,x=e=>{let{index:S,childOffset:C,depth:w=0,item:T,itemRefs:E,onItemKeyDown:D,onItemSelect:O,parentHasNestedItems:k=!1,CustomMenuItemComponent:A}=e,[j,M]=d(!1),N=u(-1),P=u([]),F=`values`in e?e.values.map(({value:e})=>e):[],I=F.includes(T.value),L=l(()=>`value`in e?_:s(T,e.values),[T,e]),R=l(()=>`value`in e?`none`:c(T,e.values),[T,e]),z=l(()=>Array(w).fill(0).map((e,t)=>m(r,{},`spacer-${e+t}`)),[w]),B=e=>{e.preventDefault(),O(T)},V=e=>{e.stopPropagation(),M(e=>!e)},H=e=>{e.key===`ArrowDown`?N.current+=1:e.key===`ArrowUp`&&--N.current,N.current<=-1?(E.current[S]?.focus(),N.current=-1):N.current+C===P.current.length?(N.current=-1,D(e),M(!1)):N.current>=0&&N.current<P.current.length-C&&P.current[N.current+C]?.focus()},U=e=>{!j&&e.key===`ArrowDown`||e.key===`ArrowUp`?D(e):e.key===`ArrowRight`||e.key===`ArrowLeft`?M(e=>!e):j&&e.key===`ArrowDown`&&N.current===-1&&(N.current=0,P.current[N.current+C]?.focus())};return T.children&&T.children.length>0&&`values`in e?h(p,{children:[h(i,{style:{paddingLeft:w===0?t.small:0},children:[z,m(a,{variant:`ghost_icon`,onClick:V,"data-testid":`toggle-button`,children:m(f,{color:b.interactive.primary__resting.rgba,data:j?v:y})}),m(o,{$depth:w,ref:e=>{E.current[S]=e},index:S,closeMenuOnClick:!1,onKeyDownCapture:U,onClick:B,children:A?m(A,{item:T,selectedState:R}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:L}),m(`span`,{children:T.label})]})})]}),j&&T.children.map((t,r)=>m(x,{index:C+r,childOffset:C+n(T.children,r),depth:w+1,item:t,itemRefs:P,values:e.values,onItemKeyDown:H,onItemSelect:O,parentHasNestedItems:!0,CustomMenuItemComponent:A},`child-${r}-${t.value}-${T.value}`))]}):`values`in e?h(i,{children:[z,m(o,{$depth:w,$paddedLeft:k,ref:e=>{E.current[S]=e},index:S,tabIndex:w,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:B,children:A?m(A,{item:T,selectedState:I?`selected`:`none`}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:I?g:_}),m(`span`,{children:T.label})]})})]}):m(i,{children:m(o,{$depth:w,$selected:e.value&&T.value===e.value.value,ref:e=>{E.current[S]=e},index:S,onKeyDownCapture:D,onClick:B,children:A?m(A,{item:T,selectedState:e.value&&T.value===e.value.value?`selected`:`none`}):m(`span`,{children:T.label})})})};export{x as SelectMenuItem};
1
+ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{spacings as t}from"../../atoms/style/spacings.js";import{getChildOffset as n}from"./Select.utils.js";import{MenuItemSpacer as r,MenuItemWrapper as i,SmallButton as a,StyledMenuItem as o}from"./Select.styles.js";import{getParentIcon as s,getParentState as c}from"./SelectMenuItem.utils.js";import{useMemo as l,useRef as u,useState as d}from"react";import{Icon as f}from"@equinor/eds-core-react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{checkbox as g,checkbox_outline as _,chevron_down as v,chevron_right as y}from"@equinor/eds-icons";const{colors:b}=e,x=e=>{let{index:S,childOffset:C,depth:w=0,item:T,itemRefs:E,onItemKeyDown:D,onItemSelect:O,parentHasNestedItems:k=!1,CustomMenuItemComponent:A}=e,[j,M]=d(!1),N=u(-1),P=u([]),F=(`values`in e?e.values.map(({value:e})=>e):[]).includes(T.value),I=l(()=>`value`in e?_:s(T,e.values),[T,e]),L=l(()=>`value`in e?`none`:c(T,e.values),[T,e]),R=l(()=>Array(w).fill(0).map((e,t)=>m(r,{},`spacer-${e+t}`)),[w]),z=e=>{e.preventDefault(),O(T)},B=e=>{e.stopPropagation(),M(e=>!e)},V=e=>{e.key===`ArrowDown`?N.current+=1:e.key===`ArrowUp`&&--N.current,N.current<=-1?(E.current[S]?.focus(),N.current=-1):N.current+C===P.current.length?(N.current=-1,D(e),M(!1)):N.current>=0&&N.current<P.current.length-C&&P.current[N.current+C]?.focus()},H=e=>{!j&&e.key===`ArrowDown`||e.key===`ArrowUp`?D(e):e.key===`ArrowRight`||e.key===`ArrowLeft`?M(e=>!e):j&&e.key===`ArrowDown`&&N.current===-1&&(N.current=0,P.current[N.current+C]?.focus())};return T.children&&T.children.length>0&&`values`in e?h(p,{children:[h(i,{style:{paddingLeft:w===0?t.small:0},children:[R,m(a,{variant:`ghost_icon`,onClick:B,"data-testid":`toggle-button`,children:m(f,{color:b.interactive.primary__resting.rgba,data:j?v:y})}),m(o,{$depth:w,ref:e=>{E.current[S]=e},index:S,closeMenuOnClick:!1,onKeyDownCapture:H,onClick:z,children:A?m(A,{item:T,selectedState:L}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:I}),m(`span`,{children:T.label})]})})]}),j&&T.children.map((t,r)=>m(x,{index:C+r,childOffset:C+n(T.children,r),depth:w+1,item:t,itemRefs:P,values:e.values,onItemKeyDown:V,onItemSelect:O,parentHasNestedItems:!0,CustomMenuItemComponent:A},`child-${r}-${t.value}-${T.value}`))]}):`values`in e?h(i,{children:[R,m(o,{$depth:w,$paddedLeft:k,ref:e=>{E.current[S]=e},index:S,tabIndex:w,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:z,children:A?m(A,{item:T,selectedState:F?`selected`:`none`}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:F?g:_}),m(`span`,{children:T.label})]})})]}):m(i,{children:m(o,{$depth:w,$selected:e.value&&T.value===e.value.value,ref:e=>{E.current[S]=e},index:S,onKeyDownCapture:D,onClick:z,children:A?m(A,{item:T,selectedState:e.value&&T.value===e.value.value?`selected`:`none`}):m(`span`,{children:T.label})})})};export{x as SelectMenuItem};
@@ -1 +1 @@
1
- import{flattenOptions as e}from"./Select.utils.js";import{checkbox as t,checkbox_indeterminate as n,checkbox_outline as r}from"@equinor/eds-icons";const i={selected:t,indeterminate:n,none:r};function a(e,t){let n=o(e,t);return i[n]}function o(t,n){if(!t.children||t.children.length===0)return`none`;let r=n.some(e=>e.value===t.value),i=n.map(({value:e})=>e),a=e([t])?.map(({value:e})=>e);return r?`selected`:a.some(e=>i.includes(e))?`indeterminate`:`none`}export{a as getParentIcon,o as getParentState};
1
+ import{flattenOptions as e}from"./Select.utils.js";import{checkbox as t,checkbox_indeterminate as n,checkbox_outline as r}from"@equinor/eds-icons";const i={selected:t,indeterminate:n,none:r};function a(e,t){return i[o(e,t)]}function o(t,n){if(!t.children||t.children.length===0)return`none`;let r=n.some(e=>e.value===t.value),i=n.map(({value:e})=>e),a=e([t])?.map(({value:e})=>e);return r?`selected`:a.some(e=>i.includes(e))?`indeterminate`:`none`}export{a as getParentIcon,o as getParentState};
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, SelectOptionRequired, SingleSelectCommon } from "../Select.types.js";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/SingleSelect/SingleSelect.d.ts
5
5
  type ListSingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> & SingleSelectCommon<T> & ListSelectProps<T>;
@@ -16,6 +16,6 @@ type GroupedSingleSelectProps<T extends SelectOptionRequired> = CommonSelectProp
16
16
  * @param onSearchFilter - Custom filter function for search, default is "item.label.match(new RegExp(searchValue, 'i'))"
17
17
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
18
18
  */
19
- declare function SingleSelect<T extends SelectOptionRequired>(props: ListSingleSelectProps<T> | GroupedSingleSelectProps<T>): react_jsx_runtime1.JSX.Element;
19
+ declare function SingleSelect<T extends SelectOptionRequired>(props: ListSingleSelectProps<T> | GroupedSingleSelectProps<T>): react_jsx_runtime2.JSX.Element;
20
20
  //#endregion
21
21
  export { GroupedSingleSelectProps, ListSingleSelectProps, SingleSelect };
@@ -1,4 +1,4 @@
1
- import * as react91 from "react";
1
+ import * as react94 from "react";
2
2
  import { CheckboxProps } from "@equinor/eds-core-react";
3
3
 
4
4
  //#region src/molecules/SelectionControls/Checkbox/Checkbox.d.ts
@@ -7,6 +7,6 @@ interface CheckboxProps$1 extends CheckboxProps {
7
7
  outlined?: boolean;
8
8
  error?: boolean;
9
9
  }
10
- declare const Checkbox$1: react91.ForwardRefExoticComponent<CheckboxProps$1 & react91.RefAttributes<HTMLInputElement>>;
10
+ declare const Checkbox$1: react94.ForwardRefExoticComponent<CheckboxProps$1 & react94.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
@@ -1,4 +1,4 @@
1
- import * as react93 from "react";
1
+ import * as react92 from "react";
2
2
  import { RadioProps } from "@equinor/eds-core-react";
3
3
 
4
4
  //#region src/molecules/SelectionControls/Radio/Radio.d.ts
@@ -7,6 +7,6 @@ interface RadioProps$1 extends RadioProps {
7
7
  outlined?: boolean;
8
8
  error?: boolean;
9
9
  }
10
- declare const Radio$1: react93.ForwardRefExoticComponent<RadioProps$1 & react93.RefAttributes<HTMLInputElement>>;
10
+ declare const Radio$1: react92.ForwardRefExoticComponent<RadioProps$1 & react92.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Radio$1 as Radio, RadioProps$1 as RadioProps };
@@ -1,10 +1,10 @@
1
- import * as react95 from "react";
1
+ import * as react96 from "react";
2
2
  import { SwitchProps } from "@equinor/eds-core-react";
3
3
 
4
4
  //#region src/molecules/SelectionControls/Switch/Switch.d.ts
5
5
  interface SwitchProps$1 extends SwitchProps {
6
6
  outlined?: boolean;
7
7
  }
8
- declare const Switch$1: react95.ForwardRefExoticComponent<SwitchProps$1 & react95.RefAttributes<HTMLInputElement>>;
8
+ declare const Switch$1: react96.ForwardRefExoticComponent<SwitchProps$1 & react96.RefAttributes<HTMLInputElement>>;
9
9
  //#endregion
10
10
  export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
@@ -1,4 +1,4 @@
1
- import * as react42 from "react";
1
+ import * as react39 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<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
10
+ declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react39.DetailedHTMLProps<react39.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
11
11
  //#endregion
12
12
  export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
@@ -4,12 +4,12 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
4
4
  align-items: center;
5
5
  white-space: nowrap;
6
6
  ${({$disabled:e,$clickable:t})=>e?s`
7
- &:hover {
8
- cursor: not-allowed;
9
- }
10
- `:t&&s`
11
- &:hover {
12
- cursor: pointer;
13
- }
14
- `}
15
- `,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:d,setCurrentStep:f,isStepAtIndexDisabled:p}=n(),m=p(t),h=i(()=>t<d?`body_short`:`body_short_bold`,[d,t]),g=i(()=>t>d||m?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[d,t,m]),_=()=>{t<d&&!m&&f(t)};return l(u,{"data-testid":`step`,$clickable:t<d,onClick:_,$disabled:m,"aria-disabled":m,role:`button`,children:[c(r,{index:t,disabled:m}),(!o||d===t)&&c(a,{variant:h,color:g,children:s})]})};export{d as default};
7
+ &:hover {
8
+ cursor: not-allowed;
9
+ }
10
+ `:t?s`
11
+ &:hover {
12
+ cursor: pointer;
13
+ }
14
+ `:``}
15
+ `,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:d,setCurrentStep:f,isStepAtIndexDisabled:p}=n(),m=p(t),h=i(()=>t<d?`body_short`:`body_short_bold`,[d,t]),g=i(()=>t>d||m?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[d,t,m]),_=()=>{t<d&&!m&&f(t)};return l(u,{"data-testid":`step`,$clickable:t<d,onClick:_,$disabled:m,"aria-disabled":m,role:`button`,children:[c(r,{index:t,disabled:m}),(!o||d===t)&&c(a,{variant:h,color:g,children:s})]})};export{d as Step};
@@ -4,4 +4,4 @@ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/ind
4
4
  background: ${e=>e.$background};
5
5
  border: none;
6
6
  margin: 0;
7
- `,o=({done:e})=>{let n=t(()=>e?i.interactive.primary__resting.rgba:i.interactive.disabled__text.rgba,[e]);return r(a,{$background:n})};export{o as StepLine};
7
+ `,o=({done:e})=>r(a,{$background:t(()=>e?i.interactive.primary__resting.rgba:i.interactive.disabled__text.rgba,[e])});export{o as StepLine};
@@ -1,8 +1,8 @@
1
- import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import n from"./Step/Step.js";import{StepLine as r}from"./StepLine.js";import{SubTitle as i}from"./SubTitle/SubTitle.js";import{useMemo as a}from"react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
1
+ import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import{Step as n}from"./Step/Step.js";import{StepLine as r}from"./StepLine.js";import{SubTitle as i}from"./SubTitle/SubTitle.js";import{useMemo as a}from"react";import o,{css as s}from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e.xx_large};
5
- `,u=o.div`
5
+ `,d=o.div`
6
6
  display: grid;
7
7
  grid-template-columns:
8
8
  repeat(${({$stepAmount:e})=>e-1}, auto 1fr)
@@ -10,5 +10,7 @@ import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}
10
10
  grid-gap: ${e.small};
11
11
  align-items: center;
12
12
  width: 100%;
13
- ${({$maxWidth:e})=>e&&`max-width: ${e}`}
14
- `,d=({onlyShowCurrentStepLabel:e=!1,maxWidth:o})=>{let{steps:d,currentStep:f}=t(),p=a(()=>{let t=[];return d.forEach((i,a)=>{t.push(s(n,{index:a,onlyShowCurrentStepLabel:e,children:i.label},`step-${a}`)),a!==d.length-1&&t.push(s(r,{done:f>a},`step-line-${a}`))}),t},[f,e,d]);return c(l,{children:[s(u,{$stepAmount:d.length,$maxWidth:o,"data-testid":`stepper-container`,children:p}),s(i,{})]})};export{d as Stepper};
13
+ ${({$maxWidth:e})=>e?s`
14
+ max-width: ${e};
15
+ `:``}
16
+ `,f=({onlyShowCurrentStepLabel:e=!1,maxWidth:o})=>{let{steps:s,currentStep:f}=t(),p=a(()=>{let t=[];return s.forEach((i,a)=>{t.push(c(n,{index:a,onlyShowCurrentStepLabel:e,children:i.label},`step-${a}`)),a!==s.length-1&&t.push(c(r,{done:f>a},`step-line-${a}`))}),t},[f,e,s]);return l(u,{children:[c(d,{$stepAmount:s.length,$maxWidth:o,"data-testid":`stepper-container`,children:p}),c(i,{})]})};export{f as Stepper};