@equinor/amplify-component-lib 11.0.5 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +1 -0
  2. package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
  3. package/dist/atoms/hooks/useSelect.d.ts +3 -3
  4. package/dist/atoms/index.js +1 -1
  5. package/dist/atoms/style/index.d.ts +1 -1
  6. package/dist/atoms/style/index.js +1 -1
  7. package/dist/atoms/utils/auth_environment.js +1 -1
  8. package/dist/atoms/utils/map.js +1 -1
  9. package/dist/atoms/utils/sort.js +1 -1
  10. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
  11. package/dist/deprecated/IconToggleButton.d.ts +2 -2
  12. package/dist/deprecated/IconToggleButton.js +1 -1
  13. package/dist/deprecated/OldStepper/OldStep.js +1 -1
  14. package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
  15. package/dist/index.d.ts +4 -1
  16. package/dist/index.js +1 -1
  17. package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.js +1 -1
  18. package/dist/molecules/Banner/Banner.utils.js +1 -1
  19. package/dist/molecules/Chip/Chip.d.ts +2 -2
  20. package/dist/molecules/Confetti/Confetti.constants.js +1 -1
  21. package/dist/molecules/Confetti/Confetti.js +1 -1
  22. package/dist/molecules/Confetti/utils/createConfetti.js +1 -1
  23. package/dist/molecules/Confetti/utils/drawShapes.js +1 -1
  24. package/dist/molecules/Confetti/utils/getDefaultColors.js +1 -0
  25. package/dist/molecules/Confetti/utils/seasonalColors.js +1 -1
  26. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  27. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
  28. package/dist/molecules/Dialog/Dialog.d.ts +2 -2
  29. package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
  30. package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
  31. package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
  32. package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
  33. package/dist/molecules/IconCell/IconCell.d.ts +2 -2
  34. package/dist/molecules/InfoElement/CopyText.js +5 -5
  35. package/dist/molecules/InfoElement/InfoElement.js +1 -1
  36. package/dist/molecules/InformationalNotice/InformationalNotice.utils.js +1 -1
  37. package/dist/molecules/ListItem/ListItem.d.ts +2 -2
  38. package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +2 -2
  39. package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
  40. package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
  41. package/dist/molecules/RichTextDisplay/RichTextDisplay.d.ts +1 -1
  42. package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
  43. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +7 -7
  44. package/dist/molecules/RichTextEditor/MenuBar/Table/TableDelete.js +1 -1
  45. package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +1 -1
  46. package/dist/molecules/RichTextEditor/RichTextEditor.styles.js +1 -1
  47. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
  48. package/dist/molecules/RichTextEditor/index.d.ts +6 -5
  49. package/dist/molecules/RichTextEditor/index.js +1 -1
  50. package/dist/molecules/Search/Search.d.ts +2 -2
  51. package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
  52. package/dist/molecules/Select/ListSelectPersistent.js +1 -1
  53. package/dist/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts +2 -2
  54. package/dist/molecules/Select/Select.styles.d.ts +9 -6
  55. package/dist/molecules/Select/Select.styles.js +7 -1
  56. package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
  57. package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
  58. package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
  59. package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
  60. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +4 -3
  61. package/dist/molecules/Stepper/Step/Step.js +1 -1
  62. package/dist/molecules/Stepper/Stepper.js +1 -1
  63. package/dist/molecules/Tabs/Tab.js +1 -1
  64. package/dist/molecules/TextField/TextField.js +3 -3
  65. package/dist/molecules/index.js +1 -1
  66. package/dist/organisms/DataGrid/DataGrid.d.ts +2 -2
  67. package/dist/organisms/Faq/Category/Category.styles.js +5 -5
  68. package/dist/organisms/Faq/Category/Question/Question.styles.js +7 -7
  69. package/dist/organisms/Faq/Category/Subcategory.js +7 -7
  70. package/dist/organisms/Faq/Faq.js +6 -6
  71. package/dist/organisms/Faq/Faq.utils.js +1 -1
  72. package/dist/organisms/FieldSelector/ChangingField.js +4 -4
  73. package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +4 -4
  74. package/dist/organisms/FieldSelector/SelectorCard/Skeleton.js +10 -10
  75. package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
  76. package/dist/organisms/ReleaseNote/ReleaseNote.js +4 -4
  77. package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.utils.js +1 -1
  78. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  79. package/dist/organisms/SideBar/SideBar.js +1 -1
  80. package/dist/organisms/SideSheet/SideSheet.d.ts +17 -0
  81. package/dist/organisms/SideSheet/SideSheet.js +1 -0
  82. package/dist/organisms/SideSheet/SideSheet.styles.js +39 -0
  83. package/dist/organisms/SideSheet/SideSheet.types.d.ts +23 -0
  84. package/dist/organisms/Status/Action.d.ts +2 -2
  85. package/dist/organisms/Status/Description.d.ts +2 -2
  86. package/dist/organisms/Status/Illustration.constants.js +1 -1
  87. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  88. package/dist/organisms/Status/Title.d.ts +2 -2
  89. package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
  90. package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
  91. package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
  92. package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
  93. package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
  94. package/dist/organisms/Template/Template.d.ts +5 -5
  95. package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
  96. package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
  97. package/dist/organisms/ToggleGroup/ToggleGroupOption.js +1 -1
  98. package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +1 -1
  99. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  100. package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
  101. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  102. package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +4 -3
  103. package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
  104. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
  105. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
  106. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Url.js +1 -1
  107. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +2 -2
  108. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
  109. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
  110. package/dist/organisms/TopBar/Resources/Resources.d.ts +0 -1
  111. package/dist/organisms/TopBar/Resources/Resources.js +1 -1
  112. package/dist/organisms/TopBar/TopBar.js +1 -1
  113. package/dist/organisms/TopBar/TopBar.styles.js +3 -3
  114. package/dist/organisms/TopBar/TopBarMenu.js +2 -2
  115. package/dist/organisms/TopBar/TransferToAppDialog.js +6 -6
  116. package/dist/organisms/index.d.ts +2 -0
  117. package/dist/organisms/index.js +1 -1
  118. package/dist/providers/AuthProvider/AuthProvider.js +1 -1
  119. package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
  120. package/dist/providers/ConfettiProvider/ConfettiProvider.js +1 -1
  121. package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.js +1 -0
  122. package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.styles.js +5 -0
  123. package/dist/providers/SurveyProvider/SurveyDialog/SurveyProgress.js +4 -0
  124. package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyFreeTextQuestion.js +5 -0
  125. package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyLinearScaleQuestion.js +10 -0
  126. package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyMultipleChoiceQuestion.js +5 -0
  127. package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyQuestion.js +1 -0
  128. package/dist/providers/SurveyProvider/SurveyDialog/UmuxDialog.js +5 -0
  129. package/dist/providers/SurveyProvider/SurveyProvider.d.ts +14 -0
  130. package/dist/providers/SurveyProvider/SurveyProvider.js +1 -0
  131. package/dist/providers/SurveyProvider/hooks/useSurvey.js +1 -0
  132. package/package.json +12 -12
  133. package/dist/_virtual/rolldown_runtime.js +0 -1
  134. package/dist/organisms/ReleaseNote/ReleaseNote.constants.js +0 -1
@@ -1,4 +1,4 @@
1
- import * as react17 from "react";
1
+ import * as react25 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: react17.ForwardRefExoticComponent<{
9
+ declare const OptionalTooltip: react25.ForwardRefExoticComponent<{
10
10
  textTransform?: string;
11
11
  } & {
12
12
  placement?: _floating_ui_utils0.Placement;
13
- title?: react17.ReactNode;
13
+ title?: react25.ReactNode;
14
14
  children: React.ReactElement & React.RefAttributes<HTMLElement>;
15
15
  enterDelay?: number;
16
16
  portalContainer?: HTMLElement;
17
- } & Omit<react17.HTMLAttributes<HTMLDivElement>, "title"> & react17.RefAttributes<HTMLDivElement>>;
17
+ } & Omit<react25.HTMLAttributes<HTMLDivElement>, "title"> & react25.RefAttributes<HTMLDivElement>>;
18
18
  //#endregion
19
19
  export { OptionalTooltip, OptionalTooltipProps };
@@ -1,4 +1,4 @@
1
- import * as react21 from "react";
1
+ import * as react29 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: react21.ForwardRefExoticComponent<ProfileAvatarProps & react21.RefAttributes<HTMLDivElement>>;
10
+ declare const ProfileAvatar: react29.ForwardRefExoticComponent<ProfileAvatarProps & react29.RefAttributes<HTMLDivElement>>;
11
11
  //#endregion
12
12
  export { ProfileAvatar, ProfileAvatarProps };
@@ -24,6 +24,6 @@ interface RichTextDisplayProps extends Pick<ImageExtensionFnProps, 'onImageRead'
24
24
  * @param extensions - additional extensions to be added
25
25
  * @param children - render prop for custom rendering, provides editor via callback
26
26
  */
27
- declare const RichTextDisplay: FC<RichTextDisplayProps & HTMLAttributes<HTMLDivElement>>;
27
+ declare const RichTextDisplay: FC<RichTextDisplayProps & Omit<HTMLAttributes<HTMLDivElement>, 'children'>>;
28
28
  //#endregion
29
29
  export { RichTextDisplay, RichTextDisplayProps };
@@ -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()};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
+ 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);return l&&!l.includes(e.IMAGES)?null: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:()=>{u.current&&u.current.click()},tooltip:`Add Image`})]})};export{s as AddImageButton};
@@ -1,11 +1,11 @@
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 react31 from "react";
4
+ import * as react42 from "react";
5
5
  import { FC } from "react";
6
- import * as styled_components0 from "styled-components";
6
+ import * as styled_components9 from "styled-components";
7
7
  import { Editor } from "@tiptap/react";
8
- import * as styled_components_dist_types3 from "styled-components/dist/types";
8
+ import * as styled_components_dist_types2 from "styled-components/dist/types";
9
9
 
10
10
  //#region src/molecules/RichTextEditor/MenuBar/MenuBar.d.ts
11
11
  interface MenuBarProps extends Pick<ImageExtensionFnProps, 'onImageUpload'> {
@@ -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<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;
17
+ Bar: styled_components_dist_types2.IStyledComponentBase<"web", styled_components9.FastOmit<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
18
+ Bars: styled_components_dist_types2.IStyledComponentBase<"web", styled_components9.FastOmit<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
19
+ Button: react42.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react42.RefAttributes<HTMLButtonElement>>;
20
+ Section: styled_components_dist_types2.IStyledComponentBase<"web", styled_components9.FastOmit<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<react42.DetailedHTMLProps<react42.HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
21
21
  AddImageButton: FC<AddImageProps>;
22
22
  };
23
23
  declare const EditorText: {
@@ -1 +1 @@
1
- import{MenuButton as e}from"../MenuButton.js";import{jsx as t}from"react/jsx-runtime";import{table_chart as n}from"@equinor/eds-icons";const r=({editor:r})=>{let i=()=>r.chain().focus().deleteTable().run();return t(e,{active:!0,"data-testid":`remove-table`,tooltip:`Remove table`,icon:n,onClick:i})};export{r as TableDelete};
1
+ import{MenuButton as e}from"../MenuButton.js";import{jsx as t}from"react/jsx-runtime";import{table_chart as n}from"@equinor/eds-icons";const r=({editor:r})=>t(e,{active:!0,"data-testid":`remove-table`,tooltip:`Remove table`,icon:n,onClick:()=>r.chain().focus().deleteTable().run()});export{r as TableDelete};
@@ -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})=>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};
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`,onChange: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};
@@ -29,7 +29,7 @@ import{VARIANT_COLORS as e,colors as t}from"../../atoms/style/colors.js";import{
29
29
  box-shadow: ${({$highlighted:n,$variant:r})=>n?`inset 0 -2px ${t.dataviz.darkblue.darker}`:r?`inset 0 -2px ${e[r]}`:`inset 0 -1px ${t.ui.background__medium.rgba}`};
30
30
  }
31
31
 
32
- padding: ${e=>{switch(e.$padding){case`sm`:return n.small;case`md`:return n.medium;case`lg`:return n.large;case`none`:default:return 0}}};
32
+ padding: ${e=>{switch(e.$padding){case`sm`:return n.small;case`md`:return n.medium;case`lg`:return n.large;default:return 0}}};
33
33
 
34
34
  a {
35
35
  color: ${t.interactive.primary__resting.rgba};
@@ -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){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};
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{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1,...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,17 @@ 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 react31 from "react";
6
+ import * as styled_components3 from "styled-components";
6
7
  import * as _tiptap_react0 from "@tiptap/react";
7
8
  import * as styled_components_dist_types0 from "styled-components/dist/types";
8
9
 
9
10
  //#region src/molecules/RichTextEditor/index.d.ts
10
11
  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.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react23.RefAttributes<HTMLDivElement>>, keyof react23.Component<any, {}, any>>;
14
- Bar: react23.FC<MenuBarProps>;
12
+ Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components3.FastOmit<styled_components3.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never> & Partial<Pick<styled_components3.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never>>> & string;
13
+ Provider: react31.FC<EditorProviderProps>;
14
+ Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components3.FastOmit<styled_components3.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react31.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never> & Partial<Pick<styled_components3.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react31.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never>>> & string & Omit<react31.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react31.RefAttributes<HTMLDivElement>>, keyof react31.Component<any, {}, any>>;
15
+ Bar: react31.FC<MenuBarProps>;
15
16
  };
16
17
  //#endregion
17
18
  export { RichText };
@@ -1 +1 @@
1
- import{EditorContent as e,EditorStyling as t}from"./RichTextEditor.styles.js";import{AmplifyBar as n}from"./MenuBar/MenuBar.js";import{EditorProvider as r}from"./EditorProvider.js";import{RichTextEditor as i}from"./RichTextEditor.js";const a={Styling:t,Provider:r,Content:e,Bar:n};export{a as RichText};
1
+ import{EditorContent as e,EditorStyling as t}from"./RichTextEditor.styles.js";import{AmplifyBar as n}from"./MenuBar/MenuBar.js";import{EditorProvider as r}from"./EditorProvider.js";import"./RichTextEditor.js";const i={Styling:t,Provider:r,Content:e,Bar:n};export{i as RichText};
@@ -1,10 +1,10 @@
1
- import * as react39 from "react";
1
+ import * as react56 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: react39.ForwardRefExoticComponent<SearchProps$1 & react39.RefAttributes<HTMLInputElement>>;
8
+ declare const Search$1: react56.ForwardRefExoticComponent<SearchProps$1 & react56.RefAttributes<HTMLInputElement>>;
9
9
  //#endregion
10
10
  export { Search$1 as Search };
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, SelectOptionRequired } 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/ComboBox/ComboBox.d.ts
5
5
  type ComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & (ListSelectProps<T> | GroupedSelectProps<T>);
@@ -17,6 +17,6 @@ type ComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & Mult
17
17
  * @param showSelectedAsText - If values should be shown as "5/10 Selected", defaults to false
18
18
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
19
19
  */
20
- declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime1.JSX.Element;
20
+ declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime2.JSX.Element;
21
21
  //#endregion
22
22
  export { ComboBox, ComboBoxProps };
@@ -1 +1 @@
1
- import{capitalize as e}from"../../atoms/utils/string.js";import{getChildOffset as t}from"./Select.utils.js";import{useListSelectItems as n}from"./Select.hooks.js";import{GroupTitle as r,NoItemsFoundText as i,NoTagFoundText as a}from"./Select.styles.js";import{SelectMenuItem as o}from"./SelectMenuItem.js";import{AddTagItem as s}from"./AddTagItem.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=d=>{let{search:f,itemRefs:p,onItemKeyDown:m,mode:h}=d,{filteredItems:g}=n(d);if(g.length===0&&(!d.onAddItem||f===``))return l(i,{children:`No items found`});let _=g.some(e=>e.children&&e.children.length>0),v=g.map((e,n)=>({childOffset:t(g,n),index:n,item:e,itemValue:e.value,parentHasNestedItems:_,...d}));if(`onAddItem`in d&&d.onAddItem&&f!==``&&(g.length===1&&g.at(0)?.label.toLowerCase()!==f.trim().toLowerCase()||g.length!==1)){let t=d.itemSingularWord?d.itemSingularWord:`tag`;return u(c,{children:[l(r,{group:`navigation`,variant:`label`,children:`Add ${t}`}),l(s,{index:0,itemRefs:p,onItemKeyDown:m,onAddItem:d.onAddItem,addItemSingularWord:t,mode:h,children:f}),l(r,{group:`navigation`,variant:`label`,children:`${e(t)} search results`}),v.length>0?v.map((e,t)=>l(o,{...e,index:t+1},`menu-item-${t}-${e.item.value}`)):u(a,{children:[`No `,t,` for "`,f,`" found.`]})]})}return v.map((e,t)=>l(o,{...e,index:t},`menu-item-${t}-${e.item.value}`))};export{d as ListSelectPersistent};
1
+ import{capitalize as e}from"../../atoms/utils/string.js";import{getChildOffset as t}from"./Select.utils.js";import{useListSelectItems as n}from"./Select.hooks.js";import{GroupTitle as r,NoItemsFoundText as i,NoTagFoundText as a}from"./Select.styles.js";import{SelectMenuItem as o}from"./SelectMenuItem.js";import{AddTagItem as s}from"./AddTagItem.js";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=d=>{let{search:f,itemRefs:p,onItemKeyDown:m,mode:h}=d,{filteredItems:g}=n(d);if(g.length===0&&(!d.onAddItem||f===``))return l(i,{children:`No items found`});let _=g.some(e=>e.children&&e.children.length>0),v=g.map((e,n)=>({childOffset:t(g,n),index:n,item:e,itemValue:e.value,parentHasNestedItems:_,...d,mode:h}));if(`onAddItem`in d&&d.onAddItem&&f!==``&&(g.length===1&&g.at(0)?.label.toLowerCase()!==f.trim().toLowerCase()||g.length!==1)){let t=d.itemSingularWord?d.itemSingularWord:`tag`;return u(c,{children:[l(r,{group:`navigation`,variant:`label`,children:`Add ${t}`}),l(s,{index:0,itemRefs:p,onItemKeyDown:m,onAddItem:d.onAddItem,addItemSingularWord:t,mode:h,children:f}),l(r,{group:`navigation`,variant:`label`,children:`${e(t)} search results`}),v.length>0?v.map((e,t)=>l(o,{...e,index:t+1},`menu-item-${t}-${e.item.value}`)):u(a,{children:[`No `,t,` for "`,f,`" found.`]})]})}return v.map((e,t)=>l(o,{...e,index:t},`menu-item-${t}-${e.item.value}`))};export{d as ListSelectPersistent};
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, PersistentSelectProps, SelectOptionRequired } from "../Select.types.js";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts
5
5
  type PersistentComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & PersistentSelectProps & (GroupedSelectProps<T> | ListSelectProps<T>);
@@ -18,6 +18,6 @@ type PersistentComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps
18
18
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
19
19
  * @param maxHeight - Max height of the persistent wrapper below the search field, optional
20
20
  */
21
- declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>): react_jsx_runtime2.JSX.Element;
21
+ declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>): react_jsx_runtime3.JSX.Element;
22
22
  //#endregion
23
23
  export { PersistentComboBox, PersistentComboBoxProps };
@@ -1,8 +1,8 @@
1
1
  import { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
2
- import * as react43 from "react";
2
+ import * as react62 from "react";
3
3
  import "@equinor/eds-core-react";
4
- import "styled-components";
5
- import * as styled_components_dist_types8 from "styled-components/dist/types";
4
+ import * as styled_components15 from "styled-components";
5
+ import * as styled_components_dist_types6 from "styled-components/dist/types";
6
6
 
7
7
  //#region src/molecules/Select/Select.styles.d.ts
8
8
 
@@ -11,12 +11,15 @@ 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<react43.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
14
+ declare const ComboBoxChip: styled_components_dist_types6.IStyledComponentBase<"web", styled_components15.FastOmit<styled_components15.FastOmit<((Omit<react62.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
15
15
  onClick?: undefined;
16
16
  onDelete?: undefined;
17
- }) | ClickableChipProps | DeletableChipProps)) & react43.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types8.BaseObject, ComboBoxChipProps>> & string & Omit<react43.ForwardRefExoticComponent<(Omit<react43.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
17
+ }) | ClickableChipProps | DeletableChipProps)) & react62.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types6.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never> & Partial<Pick<styled_components15.FastOmit<((Omit<react62.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
18
18
  onClick?: undefined;
19
19
  onDelete?: undefined;
20
- }) | ClickableChipProps | DeletableChipProps)) & react43.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react43.Component<any, {}, any>>;
20
+ }) | ClickableChipProps | DeletableChipProps)) & react62.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types6.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never>>> & string & Omit<react62.ForwardRefExoticComponent<(Omit<react62.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
21
+ onClick?: undefined;
22
+ onDelete?: undefined;
23
+ }) | ClickableChipProps | DeletableChipProps)) & react62.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react62.Component<any, {}, any>>;
21
24
  //#endregion
22
25
  export { ComboBoxChip };
@@ -234,7 +234,13 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
234
234
  color: ${r.text.static_icons__tertiary.rgba};
235
235
  top: calc(50%);
236
236
  transform: translate(0, -50%);
237
- `,D=u(E)`
237
+ `,D=u(l)`
238
+ user-select: none;
239
+ pointer-events: none;
240
+ position: absolute;
241
+ color: ${r.text.static_icons__tertiary.rgba};
242
+ top: calc(50%);
243
+ transform: translate(0, -50%);
238
244
  white-space: nowrap;
239
245
  overflow: hidden;
240
246
  text-overflow: ellipsis;
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, SelectOptionRequired, SingleSelectCommon } from "../Select.types.js";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/SingleSelect/SingleSelect.d.ts
5
5
  type SingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> & SingleSelectCommon<T> & (ListSelectProps<T> | GroupedSelectProps<T>);
@@ -15,6 +15,6 @@ type SingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> &
15
15
  * @param onSearchFilter - Custom filter function for search, default is "item.label.match(new RegExp(searchValue, 'i'))"
16
16
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
17
17
  */
18
- declare function SingleSelect<T extends SelectOptionRequired>(props: SingleSelectProps<T>): react_jsx_runtime3.JSX.Element;
18
+ declare function SingleSelect<T extends SelectOptionRequired>(props: SingleSelectProps<T>): react_jsx_runtime4.JSX.Element;
19
19
  //#endregion
20
20
  export { SingleSelect, SingleSelectProps };
@@ -1,4 +1,4 @@
1
- import * as react104 from "react";
1
+ import * as react166 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: react104.ForwardRefExoticComponent<CheckboxProps$1 & react104.RefAttributes<HTMLInputElement>>;
10
+ declare const Checkbox$1: react166.ForwardRefExoticComponent<CheckboxProps$1 & react166.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
@@ -1,4 +1,4 @@
1
- import * as react106 from "react";
1
+ import * as react162 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: react106.ForwardRefExoticComponent<RadioProps$1 & react106.RefAttributes<HTMLInputElement>>;
10
+ declare const Radio$1: react162.ForwardRefExoticComponent<RadioProps$1 & react162.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Radio$1 as Radio, RadioProps$1 as RadioProps };
@@ -1,10 +1,10 @@
1
- import * as react108 from "react";
1
+ import * as react164 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: react108.ForwardRefExoticComponent<SwitchProps$1 & react108.RefAttributes<HTMLInputElement>>;
8
+ declare const Switch$1: react164.ForwardRefExoticComponent<SwitchProps$1 & react164.RefAttributes<HTMLInputElement>>;
9
9
  //#endregion
10
10
  export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
@@ -1,5 +1,6 @@
1
- import * as react41 from "react";
2
- import * as styled_components_dist_types6 from "styled-components/dist/types";
1
+ import * as react58 from "react";
2
+ import * as styled_components12 from "styled-components";
3
+ import * as styled_components_dist_types5 from "styled-components/dist/types";
3
4
  import * as styled_components_dist_models_Keyframes0 from "styled-components/dist/models/Keyframes";
4
5
 
5
6
  //#region src/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts
@@ -7,6 +8,6 @@ declare const skeletonBaseloading: styled_components_dist_models_Keyframes0.defa
7
8
  interface SkeletonBaseProps {
8
9
  $offset?: number;
9
10
  }
10
- declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react41.DetailedHTMLProps<react41.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
11
+ declare const SkeletonBase: styled_components_dist_types5.IStyledComponentBase<"web", styled_components12.FastOmit<styled_components12.FastOmit<react58.DetailedHTMLProps<react58.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never> & Partial<Pick<styled_components12.FastOmit<react58.DetailedHTMLProps<react58.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never>>> & string;
11
12
  //#endregion
12
13
  export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
@@ -12,4 +12,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
12
12
  cursor: pointer;
13
13
  }
14
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};
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]);return l(u,{"data-testid":`step`,$clickable:t<d,onClick:()=>{t<d&&!m&&f(t)},$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};
@@ -1,4 +1,4 @@
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`
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,{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};
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{ActiveLine as n,Button as r,Count as i,Line as a}from"./Tab.styles.js";import{Icon as o,Typography as s}from"@equinor/eds-core-react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d={warning:e.interactive.warning__text.rgba,error:e.interactive.danger__text.rgba};function f({value:e,label:f,selectedIndex:p,index:m,onChange:h,onHover:g,centered:_,animated:v,disabled:y,leadingIcon:b,trailingIcon:x,variant:S,count:C}){let w=S?t(S):b,T=()=>{h(e)},E=()=>{g&&g(e)};return u(r,{role:`tab`,"aria-selected":p===m,onClick:T,onMouseEnter:E,$centered:_,disabled:y,children:[w?l(o,{data:w,size:24,style:S?{fill:d[S]}:void 0}):null,l(s,{as:`label`,variant:`menu_tabs`,group:`navigation`,children:f}),C===void 0?null:l(i,{className:`count`,children:l(s,{as:`span`,variant:`breadcrumb`,group:`navigation`,children:C})}),x?l(o,{data:x,size:24}):null,v?u(c,{children:[l(a,{className:`static-line`}),l(n,{animate:{left:`${(p-m)*100}%`}})]}):l(a,{className:`static-line`,$active:p===m})]})}export{f as Tab};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{ActiveLine as n,Button as r,Count as i,Line as a}from"./Tab.styles.js";import{Icon as o,Typography as s}from"@equinor/eds-core-react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d={warning:e.interactive.warning__text.rgba,error:e.interactive.danger__text.rgba};function f({value:e,label:f,selectedIndex:p,index:m,onChange:h,onHover:g,centered:_,animated:v,disabled:y,leadingIcon:b,trailingIcon:x,variant:S,count:C}){let w=S?t(S):b;return u(r,{role:`tab`,"aria-selected":p===m,onClick:()=>{h(e)},onMouseEnter:()=>{g&&g(e)},$centered:_,disabled:y,children:[w?l(o,{data:w,size:24,style:S?{fill:d[S]}:void 0}):null,l(s,{as:`label`,variant:`menu_tabs`,group:`navigation`,children:f}),C===void 0?null:l(i,{className:`count`,children:l(s,{as:`span`,variant:`breadcrumb`,group:`navigation`,children:C})}),x?l(o,{data:x,size:24}):null,v?u(c,{children:[l(a,{className:`static-line`}),l(n,{animate:{left:`${(p-m)*100}%`}})]}):l(a,{className:`static-line`,$active:p===m})]})}export{f as Tab};
@@ -1,4 +1,4 @@
1
- import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import{shape as i}from"../../atoms/style/index.js";import{getSkeletonHeight as a,getSkeletonTop as o}from"../../atoms/utils/skeleton.js";import{SkeletonBase as s}from"../Skeleton/SkeletonBase/SkeletonBase.js";import{InputExplanation as c}from"../InputExplanation/InputExplanation.js";import{useEffect as l,useRef as u,useState as d}from"react";import{TextField as f,Typography as p}from"@equinor/eds-core-react";import m,{css as h}from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=m.div`
1
+ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import{shape as i}from"../../atoms/style/index.js";import{getSkeletonHeight as a,getSkeletonTop as o}from"../../atoms/utils/skeleton.js";import{InputExplanation as s}from"../InputExplanation/InputExplanation.js";import{SkeletonBase as c}from"../Skeleton/SkeletonBase/SkeletonBase.js";import{useEffect as l,useRef as u,useState as d}from"react";import{TextField as f,Typography as p}from"@equinor/eds-core-react";import m,{css as h}from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=m.div`
2
2
  position: relative;
3
3
  height: fit-content;
4
4
  input,
@@ -71,7 +71,7 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
71
71
  }
72
72
  }
73
73
  `}
74
- `,y=m(s)`
74
+ `,y=m(c)`
75
75
  position: absolute;
76
76
  left: ${r.small};
77
77
  border-radius: ${i.corners.borderRadius};
@@ -83,4 +83,4 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
83
83
  display: flex;
84
84
  gap: ${r.x_small};
85
85
  align-items: center;
86
- `,S=e=>{if(e.maxCharacters&&`type`in e&&e.type!==`text`)throw Error('`maxCharacters` prop is not supported for input types other than "text".');if(e.explanation&&!e.label)throw Error("`explanation` prop requires a `label` to be set on the TextField.");let i={...e,variant:e.variant===`dirty`?void 0:e.variant},s=e.loading?void 0:e.variant,p=o(e),m=a(e),h=u(`${Math.max(20,Math.random()*80)}%`),[S,C]=d(typeof e.value==`string`?e.value.length:0),[w,T]=d(0),E=e=>{if(e){let t=e.getBoundingClientRect().width;T(t)}},D=t=>{e.onChange&&e.onChange(t),e.maxCharacters&&C(t.target.value.length)};return l(()=>{typeof e.value==`string`&&e.maxCharacters&&e.value.length!==S&&C(e.value.length)},[S,e.maxCharacters,e.value]),_(v,{ref:t=>{if(!t||!e.maxCharacters)return;let n=t.querySelector(`input, textarea`);n&&C(n.value.length)},$variant:s,$disabled:e.loading?!1:e.disabled,$helperRightWidth:w,style:{marginBottom:!e.helperText&&e.maxCharacters?`calc(${r.small} + 1rem)`:0},children:[g(f,{...i,label:i.label?_(x,{children:[i.label,e.explanation&&g(c,{position:e.explanationPosition,children:e.explanation})]}):void 0,disabled:e.loading||e.disabled,onChange:D}),e.loading&&g(y,{className:`skeleton`,role:`progressbar`,style:{top:p,height:m,width:h.current}}),e.maxCharacters&&_(b,{ref:E,variant:`helper`,group:`input`,color:i.variant?t[i.variant]:n.text.static_icons__tertiary.rgba,style:{bottom:e.helperText?`0`:`calc((${r.small} + 1rem) * -1)`},children:[S,` / `,e.maxCharacters]})]})};export{S as TextField};
86
+ `,S=e=>{if(e.maxCharacters&&`type`in e&&e.type!==`text`)throw Error('`maxCharacters` prop is not supported for input types other than "text".');if(e.explanation&&!e.label)throw Error("`explanation` prop requires a `label` to be set on the TextField.");let i={...e,variant:e.variant===`dirty`?void 0:e.variant},c=e.loading?void 0:e.variant,p=o(e),m=a(e),h=u(`${Math.max(20,Math.random()*80)}%`),[S,C]=d(typeof e.value==`string`?e.value.length:0),[w,T]=d(0),E=e=>{if(e){let t=e.getBoundingClientRect().width;T(t)}},D=t=>{e.onChange&&e.onChange(t),e.maxCharacters&&C(t.target.value.length)};return l(()=>{typeof e.value==`string`&&e.maxCharacters&&e.value.length!==S&&C(e.value.length)},[S,e.maxCharacters,e.value]),_(v,{ref:t=>{if(!t||!e.maxCharacters)return;let n=t.querySelector(`input, textarea`);n&&C(n.value.length)},$variant:c,$disabled:e.loading?!1:e.disabled,$helperRightWidth:w,style:{marginBottom:!e.helperText&&e.maxCharacters?`calc(${r.small} + 1rem)`:0},children:[g(f,{...i,label:i.label?_(x,{children:[i.label,e.explanation&&g(s,{position:e.explanationPosition,children:e.explanation})]}):void 0,disabled:e.loading||e.disabled,onChange:D}),e.loading&&g(y,{className:`skeleton`,role:`progressbar`,style:{top:p,height:m,width:h.current}}),e.maxCharacters&&_(b,{ref:E,variant:`helper`,group:`input`,color:i.variant?t[i.variant]:n.text.static_icons__tertiary.rgba,style:{bottom:e.helperText?`0`:`calc((${r.small} + 1rem) * -1)`},children:[S,` / `,e.maxCharacters]})]})};export{S as TextField};
@@ -1 +1 @@
1
- import{FullPageSpinner as e}from"./FullPageSpinner/FullPageSpinner.js";import{DEFAULT_FEATURES as t,RichTextEditorFeatures as n}from"./RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as ee}from"./RichTextEditor/custom-extensions/AmplifyKit.js";import{Button as te}from"./Button/Button.js";import{Toast as ne}from"./Toast/Toast.js";import{Confetti as re}from"./Confetti/Confetti.js";import{AnimatedCheckmark as ie}from"./AnimatedCheckmark/AnimatedCheckmark.js";import{ApplicationIcon as ae}from"./ApplicationIcon/ApplicationIcon.js";import{Badge as oe}from"./Badge/Badge.js";import{Banner as se}from"./Banner/Banner.js";import{Chip as ce}from"./Chip/Chip.js";import{SkeletonBase as r,skeletonBaseloading as i}from"./Skeleton/SkeletonBase/SkeletonBase.js";import{DatePicker as a}from"./DatePicker/DatePicker.js";import{DateRangePicker as o}from"./DateRangePicker/DateRangePicker.js";import{OptionalTooltip as s}from"./OptionalTooltip/OptionalTooltip.js";import{Dialog as c}from"./Dialog/Dialog.js";import{EquinorLogo as l}from"./EquinorLogo/EquinorLogo.js";import{FileProgress as u}from"./FileProgress/FileProgress.js";import{FileUploadArea as d}from"./FileUploadArea/FileUploadArea.js";import{IconCellColors as f,IconCellStates as p,IconCellVariants as m}from"./IconCell/IconCell.types.js";import{IconCell as h}from"./IconCell/IconCell.js";import{InfoElement as g}from"./InfoElement/InfoElement.js";import{InformationalNotice as _}from"./InformationalNotice/InformationalNotice.js";import{ProfileAvatar as v}from"./ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as y}from"./RichTextDisplay/RichTextDisplay.js";import{TableMenuBar as b,TextTable as x}from"./RichTextEditor/MenuBar/Table/TableBar.js";import{TextField as S}from"./TextField/TextField.js";import{AmplifyBar as C,EditorMenu as w,EditorText as T}from"./RichTextEditor/MenuBar/MenuBar.js";import{RichTextEditor as le}from"./RichTextEditor/RichTextEditor.js";import{RichText as E}from"./RichTextEditor/index.js";import{Tabs as D}from"./Tabs/Tabs.js";import{Search as O}from"./Search/Search.js";import{SkeletonGradient as k}from"./Skeleton/SkeletonGradient/SkeletonGradient.js";import{Stepper as A}from"./Stepper/Stepper.js";import{OptionDrawer as j}from"./OptionDrawer/OptionDrawer.js";import{ComboBoxChip as M}from"./Select/Select.styles.js";import{ComboBox as N}from"./Select/ComboBox/ComboBox.js";import{PersistentComboBox as P}from"./Select/PersistentComboBox/PersistentComboBox.js";import{SingleSelect as F}from"./Select/SingleSelect/SingleSelect.js";import{Tag as I}from"./Tag/Tag.js";import{TableHeader as L}from"./TableHeader/TableHeader.js";import{FeedBackIcon as R}from"./FeedBackIcon/FeedBackIcon.js";import{ListItem as z}from"./ListItem/ListItem.js";import{Checkbox as B}from"./SelectionControls/Checkbox/Checkbox.js";import{Radio as V}from"./SelectionControls/Radio/Radio.js";import{Switch as H}from"./SelectionControls/Switch/Switch.js";import{Waves as U}from"./Waves/Waves.js";import{Accordion as W,Breadcrumbs as G,CircularProgress as K,Dialog as q,Divider as J,DotProgress as Y,Icon as X,LinearProgress as Z,Menu as Q,Typography as $}from"@equinor/eds-core-react";export{W as Accordion,G as Breadcrumbs,K as CircularProgress,J as Divider,Y as DotProgress,q as EDSDialog,X as Icon,Z as LinearProgress,Q as Menu,$ as Typography};
1
+ import"./FullPageSpinner/FullPageSpinner.js";import"./RichTextEditor/RichTextEditor.types.js";import"./RichTextEditor/custom-extensions/AmplifyKit.js";import"./Button/Button.js";import"./Toast/Toast.js";import"./Confetti/Confetti.js";import"./Skeleton/SkeletonBase/SkeletonBase.js";import"./TextField/TextField.js";import"./SelectionControls/Checkbox/Checkbox.js";import"./SelectionControls/Radio/Radio.js";import"./AnimatedCheckmark/AnimatedCheckmark.js";import"./ApplicationIcon/ApplicationIcon.js";import"./Badge/Badge.js";import"./Banner/Banner.js";import"./Chip/Chip.js";import"./DatePicker/DatePicker.js";import"./DateRangePicker/DateRangePicker.js";import"./OptionalTooltip/OptionalTooltip.js";import"./Dialog/Dialog.js";import"./EquinorLogo/EquinorLogo.js";import"./FileProgress/FileProgress.js";import"./FileUploadArea/FileUploadArea.js";import"./IconCell/IconCell.types.js";import"./IconCell/IconCell.js";import"./InfoElement/InfoElement.js";import"./InformationalNotice/InformationalNotice.js";import"./ProfileAvatar/ProfileAvatar.js";import"./RichTextDisplay/RichTextDisplay.js";import"./RichTextEditor/MenuBar/Table/TableBar.js";import"./RichTextEditor/MenuBar/MenuBar.js";import"./RichTextEditor/RichTextEditor.js";import"./RichTextEditor/index.js";import"./Tabs/Tabs.js";import"./Search/Search.js";import"./Skeleton/SkeletonGradient/SkeletonGradient.js";import"./Stepper/Stepper.js";import"./OptionDrawer/OptionDrawer.js";import"./Select/Select.styles.js";import"./Select/ComboBox/ComboBox.js";import"./Select/PersistentComboBox/PersistentComboBox.js";import"./Select/SingleSelect/SingleSelect.js";import"./Tag/Tag.js";import"./TableHeader/TableHeader.js";import"./FeedBackIcon/FeedBackIcon.js";import"./ListItem/ListItem.js";import"./SelectionControls/Switch/Switch.js";import"./Waves/Waves.js";import{Accordion as e,Breadcrumbs as t,CircularProgress as n,Dialog as r,Divider as i,DotProgress as a,Icon as o,LinearProgress as s,Menu as c,Typography as l}from"@equinor/eds-core-react";export{e as Accordion,t as Breadcrumbs,n as CircularProgress,i as Divider,a as DotProgress,r as EDSDialog,o as Icon,s as LinearProgress,c as Menu,l as Typography};
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime4 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import { EdsDataGridProps } from "@equinor/eds-data-grid-react";
3
3
 
4
4
  //#region src/organisms/DataGrid/DataGrid.d.ts
5
- declare const DataGrid: <T>(props: EdsDataGridProps<T>) => react_jsx_runtime4.JSX.Element;
5
+ declare const DataGrid: <T>(props: EdsDataGridProps<T>) => react_jsx_runtime0.JSX.Element;
6
6
  //#endregion
7
7
  export { DataGrid };
@@ -1,14 +1,14 @@
1
- import{spacings as e}from"../../../atoms/style/spacings.js";import{HEADER_HEIGHT as t}from"../Faq.utils.js";import n from"styled-components";const r=n.div`
1
+ import{spacings as e}from"../../../atoms/style/spacings.js";import t from"styled-components";const n=t.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  margin-top: ${e.large};
5
5
  gap: ${e.medium};
6
- `,i=n.div`
6
+ `,r=t.div`
7
7
  display: flex;
8
8
  flex-direction: column;
9
- `,a=n.div`
9
+ `,i=t.div`
10
10
  display: flex;
11
11
  gap: ${e.small};
12
12
  align-items: center;
13
- scroll-margin-top: ${t}px;
14
- `;export{r as Container,i as Content,a as Header};
13
+ scroll-margin-top: ${89}px;
14
+ `;export{n as Container,r as Content,i as Header};
@@ -1,11 +1,11 @@
1
- import{colors as e}from"../../../../atoms/style/colors.js";import{spacings as t}from"../../../../atoms/style/spacings.js";import{shape as n}from"../../../../atoms/style/index.js";import{HEADER_HEIGHT as r}from"../../Faq.utils.js";import{styled as i}from"styled-components";import{motion as a}from"motion/react";const o=i.div`
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{styled as r}from"styled-components";import{motion as i}from"motion/react";const a=r.div`
2
2
  flex-grow: 1;
3
3
  display: grid;
4
4
  grid-template-columns: 1fr auto;
5
5
  align-items: center;
6
6
  column-gap: ${t.medium};
7
7
  padding: 0 ${t.medium};
8
- `,s=i.div`
8
+ `,o=r.div`
9
9
  position: relative;
10
10
  display: flex;
11
11
  background: ${e.ui.background__default.rgba};
@@ -33,23 +33,23 @@ import{colors as e}from"../../../../atoms/style/colors.js";import{spacings as t}
33
33
  border-radius: ${n.corners.borderRadius};
34
34
  opacity: 0;
35
35
  }
36
- `,c=i.header`
36
+ `,s=r.header`
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  gap: ${t.x_small};
40
40
  padding: ${t.medium} 0;
41
- scroll-margin-top: ${r}px;
41
+ scroll-margin-top: ${89}px;
42
42
  > div {
43
43
  display: flex;
44
44
  align-items: center;
45
45
  gap: ${t.x_small};
46
46
  color: ${e.text.static_icons__tertiary.rgba};
47
47
  }
48
- `,l=i.section`
48
+ `,c=r.section`
49
49
  display: flex;
50
50
  gap: ${t.medium};
51
51
  align-items: center;
52
- `,u=i(a.div)`
52
+ `,l=r(i.div)`
53
53
  grid-column: 1 / 3;
54
54
  display: flex;
55
55
  flex-direction: column;
@@ -61,4 +61,4 @@ import{colors as e}from"../../../../atoms/style/colors.js";import{spacings as t}
61
61
  > div {
62
62
  padding-bottom: ${t.medium};
63
63
  }
64
- `;export{o as Container,u as ExpandWrapper,c as Header,l as TopRight,s as Wrapper};
64
+ `;export{a as Container,l as ExpandWrapper,s as Header,c as TopRight,o as Wrapper};
@@ -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{Typography as r}from"../../../molecules/index.js";import{HEADER_HEIGHT as i}from"../Faq.utils.js";import{Question as a}from"./Question/Question.js";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
1
+ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{shape as n}from"../../../atoms/style/index.js";import{Typography as r}from"../../../molecules/index.js";import{Question as i}from"./Question/Question.js";import a from"styled-components";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=a.div`
2
2
  display: grid;
3
3
  grid-template-columns: auto 1fr;
4
4
  gap: ${t.medium};
@@ -16,19 +16,19 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
16
16
  border-bottom-left-radius: ${n.corners.borderRadius};
17
17
  border-bottom-right-radius: ${n.corners.borderRadius};
18
18
  }
19
- `,u=o.div`
19
+ `,l=a.div`
20
20
  display: flex;
21
21
  gap: ${t.small};
22
22
  align-items: center;
23
- scroll-margin-top: ${i}px;
24
- `,d=o.hr`
23
+ scroll-margin-top: ${89}px;
24
+ `,u=a.hr`
25
25
  height: 100%;
26
26
  width: 2px;
27
- `,f=o.div`
27
+ `,d=a.div`
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  gap: ${t.medium};
31
- `,p=o.div`
31
+ `,f=a.div`
32
32
  display: flex;
33
33
  flex-direction: column;
34
- `,m=({id:t,faqs:n,categoryName:i})=>c(l,{"aria-label":`Subcategory: ${i}`,children:[s(d,{}),c(f,{children:[s(u,{id:`subcategory-${t}`,children:s(r,{variant:`h5`,color:e.text.static_icons__tertiary.rgba,children:i})}),s(p,{children:n?.map(e=>s(a,{...e},e.id))})]})]});export{m as Subcategory};
34
+ `,p=({id:t,faqs:n,categoryName:a})=>s(c,{"aria-label":`Subcategory: ${a}`,children:[o(u,{}),s(d,{children:[o(l,{id:`subcategory-${t}`,children:o(r,{variant:`h5`,color:e.text.static_icons__tertiary.rgba,children:a})}),o(f,{children:n?.map(e=>o(i,{...e},e.id))})]})]});export{p as Subcategory};
@@ -1,20 +1,20 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Status as n}from"../Status/index.js";import{TableOfContentsProvider as r}from"../../providers/TableOfContentsProvider.js";import{useFaqsInApplication as i}from"../../atoms/hooks/useFaqsInApplication.js";import{TableOfContents as a}from"../TableOfContents/TableOfContents.js";import{HEADER_HEIGHT as o,categoryHasFaqs as s,filterCategory as c,mapCategoryToSearch as l}from"./Faq.utils.js";import{Category as u}from"./Category/Category.js";import{CategorySkeleton as d}from"./Category/CategorySkeleton.js";import{AppPageWrapper as f}from"./AppPageWrapper.js";import{Search as p}from"./Search.js";import{Typography as m}from"@equinor/eds-core-react";import h from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{useSearch as v}from"@tanstack/react-router";const y=h.div`
1
+ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Status as n}from"../Status/index.js";import{TableOfContentsProvider as r}from"../../providers/TableOfContentsProvider.js";import{useFaqsInApplication as i}from"../../atoms/hooks/useFaqsInApplication.js";import{TableOfContents as a}from"../TableOfContents/TableOfContents.js";import{categoryHasFaqs as o,filterCategory as s,mapCategoryToSearch as c}from"./Faq.utils.js";import{Category as l}from"./Category/Category.js";import{CategorySkeleton as u}from"./Category/CategorySkeleton.js";import{AppPageWrapper as d}from"./AppPageWrapper.js";import{Search as f}from"./Search.js";import{Typography as p}from"@equinor/eds-core-react";import m from"styled-components";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useSearch as _}from"@tanstack/react-router";const v=m.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${({$showToc:e})=>e?`1fr 180px`:`1fr auto`};
4
4
  gap: ${t.large};
5
- `,b=h.div`
5
+ `,y=m.div`
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  gap: ${t.large};
9
- `,x=h.div`
9
+ `,b=m.div`
10
10
  height: fit-content;
11
11
  position: sticky;
12
- top: ${o}px;
12
+ top: ${89}px;
13
13
  grid-row: span 2;
14
- `,S=h.div`
14
+ `,x=m.div`
15
15
  position: sticky;
16
16
  top: 0;
17
17
  padding: ${t.large} 0;
18
18
  background: ${e.ui.background__light.rgba};
19
19
  z-index: 100;
20
- `,C=({searchPlaceholder:e,title:t})=>{let{search:o}=v({strict:!1}),{data:h,isLoading:C}=i(),w=!!o,T=(h??[]).map(e=>l(e,o)).filter(c),E=T.map(e=>({label:e.categoryName??``,value:`category-${e.id}`,count:(e.faqs??[]).length+(e.subCategories?e.subCategories.reduce((e,t)=>e+(t.faqs??[]).length,0):0),children:[...(e.faqs??[]).map(e=>({label:e.question??``,value:`faq-${e.id}`})),...(e.subCategories??[]).map(e=>({label:e.categoryName??``,value:`subcategory-${e.id}`,count:(e.faqs??[]).length}))]})),D=!C&&(T.length===0||T.every(e=>!s(e))),O=C||E.length>0;return _(f,{children:[g(S,{children:g(m,{variant:`h1`,bold:!0,children:t??`FAQ`})}),g(r,{items:E,hashNavigation:!0,children:_(y,{$showToc:O,children:[g(p,{placeholder:e}),g(x,{children:g(a,{})}),g(b,{children:C?Array.from({length:2}).fill(null).map((e,t)=>g(d,{},`category-${t.toString()}`)):D?g(n,{center:!1,children:g(n.Title,{title:`No FAQs ${w?`found`:`yet`}`})}):T.map(e=>g(u,{...e},e.id))})]})})]})};export{C as Faq};
20
+ `,S=({searchPlaceholder:e,title:t})=>{let{search:m}=_({strict:!1}),{data:S,isLoading:C}=i(),w=!!m,T=(S??[]).map(e=>c(e,m)).filter(s),E=T.map(e=>({label:e.categoryName??``,value:`category-${e.id}`,count:(e.faqs??[]).length+(e.subCategories?e.subCategories.reduce((e,t)=>e+(t.faqs??[]).length,0):0),children:[...(e.faqs??[]).map(e=>({label:e.question??``,value:`faq-${e.id}`})),...(e.subCategories??[]).map(e=>({label:e.categoryName??``,value:`subcategory-${e.id}`,count:(e.faqs??[]).length}))]})),D=!C&&(T.length===0||T.every(e=>!o(e))),O=C||E.length>0;return g(d,{children:[h(x,{children:h(p,{variant:`h1`,bold:!0,children:t??`FAQ`})}),h(r,{items:E,hashNavigation:!0,children:g(v,{$showToc:O,children:[h(f,{placeholder:e}),h(b,{children:h(a,{})}),h(y,{children:C?Array.from({length:2}).fill(null).map((e,t)=>h(u,{},`category-${t.toString()}`)):D?h(n,{center:!1,children:h(n.Title,{title:`No FAQs ${w?`found`:`yet`}`})}):T.map(e=>h(l,{...e},e.id))})]})})]})};export{S as Faq};
@@ -1 +1 @@
1
- const e=89,t=e=>{let t=(e.faqs?.length??0)>0,n=e.subCategories?.some(e=>(e.faqs?.length??0)>0);return t||!!n};function n(e,t){let n=t.toLowerCase();return!e.answer||!e.question?!1:n===``?!0:e.answer.toLowerCase().includes(n)||e.question.toLowerCase().includes(n)}function r(e){return t(e)}function i(e,t){let r=(e.faqs??[]).filter(e=>!t||n(e,t)),i=(e.subCategories??[]).map(e=>{let r=(e.faqs??[]).filter(e=>!t||n(e,t));return r.length>0?{...e,faqs:r}:null}).filter(Boolean);return{...e,faqs:r,subCategories:i}}export{e as HEADER_HEIGHT,t as categoryHasFaqs,r as filterCategory,i as mapCategoryToSearch};
1
+ const e=e=>{let t=(e.faqs?.length??0)>0,n=e.subCategories?.some(e=>(e.faqs?.length??0)>0);return t||!!n};function t(e,t){let n=t.toLowerCase();return!e.answer||!e.question?!1:n===``?!0:e.answer.toLowerCase().includes(n)||e.question.toLowerCase().includes(n)}function n(t){return e(t)}function r(e,n){let r=(e.faqs??[]).filter(e=>!n||t(e,n)),i=(e.subCategories??[]).map(e=>{let r=(e.faqs??[]).filter(e=>!n||t(e,n));return r.length>0?{...e,faqs:r}:null}).filter(Boolean);return{...e,faqs:r,subCategories:i}}export{e as categoryHasFaqs,n as filterCategory,r as mapCategoryToSearch};