@equinor/amplify-component-lib 11.1.0 → 12.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.
- package/dist/_virtual/_rolldown/runtime.js +1 -0
- package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/style/index.d.ts +1 -1
- package/dist/atoms/style/index.js +1 -1
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/map.js +1 -1
- package/dist/atoms/utils/sort.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.js +1 -1
- package/dist/deprecated/OldStepper/OldStep.js +1 -1
- package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.js +1 -1
- package/dist/molecules/Banner/Banner.utils.js +1 -1
- package/dist/molecules/Chip/Chip.d.ts +2 -2
- package/dist/molecules/Confetti/Confetti.constants.js +1 -1
- package/dist/molecules/Confetti/utils/createConfetti.js +1 -1
- package/dist/molecules/Confetti/utils/drawShapes.js +1 -1
- package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/Dialog/Dialog.d.ts +2 -2
- package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
- package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
- package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
- package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
- package/dist/molecules/IconCell/IconCell.d.ts +2 -2
- package/dist/molecules/InfoElement/CopyText.js +5 -5
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/InformationalNotice/InformationalNotice.utils.js +1 -1
- package/dist/molecules/ListItem/ListItem.d.ts +2 -2
- package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +2 -2
- package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
- package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
- package/dist/molecules/RichTextDisplay/RichTextDisplay.d.ts +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +7 -7
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableDelete.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +1 -1
- package/dist/molecules/RichTextEditor/RichTextEditor.styles.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
- package/dist/molecules/RichTextEditor/index.d.ts +6 -5
- package/dist/molecules/RichTextEditor/index.js +1 -1
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/ListSelectPersistent.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +9 -6
- package/dist/molecules/Select/Select.styles.js +7 -1
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +4 -3
- package/dist/molecules/Stepper/Step/Step.js +1 -1
- package/dist/molecules/Stepper/Stepper.js +1 -1
- package/dist/molecules/Tabs/Tab.js +1 -1
- package/dist/molecules/TextField/TextField.js +3 -3
- package/dist/molecules/index.js +1 -1
- package/dist/organisms/Faq/Category/Category.styles.js +5 -5
- package/dist/organisms/Faq/Category/Question/Question.styles.js +7 -7
- package/dist/organisms/Faq/Category/Subcategory.js +7 -7
- package/dist/organisms/Faq/Faq.js +6 -6
- package/dist/organisms/Faq/Faq.utils.js +1 -1
- package/dist/organisms/FieldSelector/ChangingField.js +4 -4
- package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +4 -4
- package/dist/organisms/FieldSelector/SelectorCard/Skeleton.js +10 -10
- package/dist/organisms/Filter/Filter.d.ts +2 -2
- package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
- package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
- package/dist/organisms/ReleaseNote/ReleaseNote.js +4 -4
- package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.utils.js +1 -1
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/SideBar/SideBar.js +1 -1
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Description.d.ts +2 -2
- package/dist/organisms/Status/Illustration.constants.js +1 -1
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- package/dist/organisms/Status/Title.d.ts +2 -2
- package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
- package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
- package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
- package/dist/organisms/Template/Template.d.ts +5 -5
- package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +1 -1
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +4 -3
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Url.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Resources.d.ts +0 -1
- package/dist/organisms/TopBar/Resources/Resources.js +1 -1
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +3 -3
- package/dist/organisms/TopBar/TopBarMenu.js +2 -2
- package/dist/organisms/TopBar/TransferToAppDialog.js +6 -6
- package/dist/organisms/index.js +1 -1
- package/dist/providers/AuthProvider/AuthProvider.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
- package/dist/providers/ConfettiProvider/ConfettiProvider.js +1 -1
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.js +1 -0
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.styles.js +5 -0
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyProgress.js +4 -0
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyFreeTextQuestion.js +5 -0
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyLinearScaleQuestion.js +10 -0
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyMultipleChoiceQuestion.js +5 -0
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyQuestion.js +1 -0
- package/dist/providers/SurveyProvider/SurveyDialog/UmuxDialog.js +5 -0
- package/dist/providers/SurveyProvider/SurveyProvider.d.ts +14 -0
- package/dist/providers/SurveyProvider/SurveyProvider.js +1 -0
- package/dist/providers/SurveyProvider/hooks/useSurvey.js +1 -0
- package/package.json +12 -12
- package/dist/_virtual/rolldown_runtime.js +0 -1
- package/dist/organisms/ReleaseNote/ReleaseNote.constants.js +0 -1
|
@@ -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
|
|
4
|
+
import * as react35 from "react";
|
|
5
5
|
import { FC } from "react";
|
|
6
|
-
import * as
|
|
6
|
+
import * as styled_components5 from "styled-components";
|
|
7
7
|
import { Editor } from "@tiptap/react";
|
|
8
|
-
import * as
|
|
8
|
+
import * as styled_components_dist_types1 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:
|
|
18
|
-
Bars:
|
|
19
|
-
Button:
|
|
20
|
-
Section:
|
|
17
|
+
Bar: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
18
|
+
Bars: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
19
|
+
Button: react35.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react35.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
Section: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<react35.DetailedHTMLProps<react35.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})=>
|
|
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`,
|
|
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;
|
|
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{
|
|
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
|
|
5
|
+
import * as react24 from "react";
|
|
6
|
+
import * as styled_components0 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",
|
|
12
|
-
Provider:
|
|
13
|
-
Content: styled_components_dist_types0.IStyledComponentBase<"web",
|
|
14
|
-
Bar:
|
|
12
|
+
Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<react24.DetailedHTMLProps<react24.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never> & Partial<Pick<styled_components0.FastOmit<react24.DetailedHTMLProps<react24.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never>>> & string;
|
|
13
|
+
Provider: react24.FC<EditorProviderProps>;
|
|
14
|
+
Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react24.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never> & Partial<Pick<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react24.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never>>> & string & Omit<react24.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react24.RefAttributes<HTMLDivElement>>, keyof react24.Component<any, {}, any>>;
|
|
15
|
+
Bar: react24.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
|
|
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
|
|
1
|
+
import * as react49 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:
|
|
8
|
+
declare const Search$1: react49.ForwardRefExoticComponent<SearchProps$1 & react49.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
|
|
2
|
+
import * as react_jsx_runtime1 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>):
|
|
20
|
+
declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime1.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,8 +1,8 @@
|
|
|
1
1
|
import { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react55 from "react";
|
|
3
3
|
import "@equinor/eds-core-react";
|
|
4
|
-
import "styled-components";
|
|
5
|
-
import * as
|
|
4
|
+
import * as styled_components11 from "styled-components";
|
|
5
|
+
import * as styled_components_dist_types5 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:
|
|
14
|
+
declare const ComboBoxChip: styled_components_dist_types5.IStyledComponentBase<"web", styled_components11.FastOmit<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
15
15
|
onClick?: undefined;
|
|
16
16
|
onDelete?: undefined;
|
|
17
|
-
}) | ClickableChipProps | DeletableChipProps)) &
|
|
17
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never> & Partial<Pick<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
18
18
|
onClick?: undefined;
|
|
19
19
|
onDelete?: undefined;
|
|
20
|
-
}) | ClickableChipProps | DeletableChipProps)) &
|
|
20
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never>>> & string & Omit<react55.ForwardRefExoticComponent<(Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
21
|
+
onClick?: undefined;
|
|
22
|
+
onDelete?: undefined;
|
|
23
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react55.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(
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react155 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:
|
|
10
|
+
declare const Checkbox$1: react155.ForwardRefExoticComponent<CheckboxProps$1 & react155.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react157 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:
|
|
10
|
+
declare const Radio$1: react157.ForwardRefExoticComponent<RadioProps$1 & react157.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Radio$1 as Radio, RadioProps$1 as RadioProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react159 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:
|
|
8
|
+
declare const Switch$1: react159.ForwardRefExoticComponent<SwitchProps$1 & react159.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react51 from "react";
|
|
2
|
+
import * as styled_components8 from "styled-components";
|
|
3
|
+
import * as styled_components_dist_types4 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:
|
|
11
|
+
declare const SkeletonBase: styled_components_dist_types4.IStyledComponentBase<"web", styled_components8.FastOmit<styled_components8.FastOmit<react51.DetailedHTMLProps<react51.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never> & Partial<Pick<styled_components8.FastOmit<react51.DetailedHTMLProps<react51.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])
|
|
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
|
|
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
|
|
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{
|
|
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(
|
|
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},
|
|
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};
|
package/dist/molecules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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,14 +1,14 @@
|
|
|
1
|
-
import{spacings as e}from"../../../atoms/style/spacings.js";import
|
|
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
|
-
`,
|
|
6
|
+
`,r=t.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
|
-
`,
|
|
9
|
+
`,i=t.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
gap: ${e.small};
|
|
12
12
|
align-items: center;
|
|
13
|
-
scroll-margin-top: ${
|
|
14
|
-
`;export{
|
|
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{
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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: ${
|
|
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
|
-
`,
|
|
48
|
+
`,c=r.section`
|
|
49
49
|
display: flex;
|
|
50
50
|
gap: ${t.medium};
|
|
51
51
|
align-items: center;
|
|
52
|
-
`,
|
|
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{
|
|
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{
|
|
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
|
-
`,
|
|
19
|
+
`,l=a.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
gap: ${t.small};
|
|
22
22
|
align-items: center;
|
|
23
|
-
scroll-margin-top: ${
|
|
24
|
-
`,
|
|
23
|
+
scroll-margin-top: ${89}px;
|
|
24
|
+
`,u=a.hr`
|
|
25
25
|
height: 100%;
|
|
26
26
|
width: 2px;
|
|
27
|
-
`,
|
|
27
|
+
`,d=a.div`
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
gap: ${t.medium};
|
|
31
|
-
`,
|
|
31
|
+
`,f=a.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
|
-
`,
|
|
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{
|
|
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
|
-
`,
|
|
5
|
+
`,y=m.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
gap: ${t.large};
|
|
9
|
-
`,
|
|
9
|
+
`,b=m.div`
|
|
10
10
|
height: fit-content;
|
|
11
11
|
position: sticky;
|
|
12
|
-
top: ${
|
|
12
|
+
top: ${89}px;
|
|
13
13
|
grid-row: span 2;
|
|
14
|
-
`,
|
|
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
|
-
`,
|
|
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=
|
|
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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{capitalize as n}from"../../atoms/utils/string.js";import{useFakeProgress as r}from"../../atoms/hooks/useFakeProgress.js";import{AnimatedCheckmark as i}from"../../molecules/AnimatedCheckmark/AnimatedCheckmark.js";import
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{capitalize as n}from"../../atoms/utils/string.js";import{useFakeProgress as r}from"../../atoms/hooks/useFakeProgress.js";import{AnimatedCheckmark as i}from"../../molecules/AnimatedCheckmark/AnimatedCheckmark.js";import"react";import{LinearProgress as a,Typography as o}from"@equinor/eds-core-react";import s from"styled-components";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=s.div`
|
|
2
2
|
gap: ${t.medium};
|
|
3
3
|
position: absolute;
|
|
4
4
|
top: 50%;
|
|
@@ -11,14 +11,14 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
11
11
|
min-height: calc(100vh - (${t.xxx_large} * 4));
|
|
12
12
|
width: 100%;
|
|
13
13
|
max-width: 370px;
|
|
14
|
-
`,
|
|
14
|
+
`,f=s(a)`
|
|
15
15
|
background-color: ${e.interactive.primary__hover_alt.rgba};
|
|
16
16
|
|
|
17
17
|
div {
|
|
18
18
|
background-color: ${e.interactive.primary__resting.rgba};
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,p=s(o)`
|
|
21
21
|
span {
|
|
22
22
|
text-transform: capitalize;
|
|
23
23
|
}
|
|
24
|
-
`,
|
|
24
|
+
`,m=({fieldName:e,onChangedField:t,finishedText:a})=>{let{finished:s,progress:m}=r({onDone:t});return l(d,{children:s?u(c,{children:[u(p,{variant:`h3`,children:[`Changed to `,l(`span`,{children:n(e)})]}),l(i,{}),l(o,{variant:`h6`,children:a})]}):u(c,{children:[u(o,{variant:`h3`,children:[`Changing field.`,`.`.repeat(m/35)]}),l(f,{variant:`determinate`,value:m})]})})};export{m as ChangingField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{elevation as n,shape as r}from"../../../atoms/style/index.js";import{SingleSelect as i}from"../../../molecules/Select/SingleSelect/SingleSelect.js";import
|
|
1
|
+
import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{elevation as n,shape as r}from"../../../atoms/style/index.js";import{SingleSelect as i}from"../../../molecules/Select/SingleSelect/SingleSelect.js";import{useMemo as a,useState as o}from"react";import{Button as s,Card as c,Icon as l,Typography as u}from"@equinor/eds-core-react";import d from"styled-components";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{arrow_forward as m}from"@equinor/eds-icons";const h=d(c)`
|
|
2
2
|
position: absolute;
|
|
3
3
|
left: 50%;
|
|
4
4
|
top: 50%;
|
|
@@ -27,14 +27,14 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
|
|
|
27
27
|
grid-gap: ${t.medium};
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`,g=d.div`
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
33
|
gap: ${t.small};
|
|
34
34
|
> h6 {
|
|
35
35
|
text-transform: capitalize;
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,_=d.a`
|
|
38
38
|
padding: ${t.small} ${t.medium};
|
|
39
39
|
transition: background-color 200ms ease;
|
|
40
40
|
font-size: 14px;
|
|
@@ -54,4 +54,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
|
|
|
54
54
|
background-color: ${e.interactive.primary__hover_alt.rgba};
|
|
55
55
|
cursor: pointer;
|
|
56
56
|
}
|
|
57
|
-
`,
|
|
57
|
+
`,v=({availableFields:e,onSelect:t,itemNameSingular:n,showAccessITLink:r=!0})=>{let[c,d]=o(),v=()=>{c!==void 0&&t({name:c.name,uuid:c.uuid,country:c.country})},y=e=>{d(e)},b=a(()=>{let t=[];for(let n of e)n.name?t.push({label:n.name,value:n.name,...n}):console.error(`Field with no name found!:`,n);return t},[e]);return p(h,{children:[p(u,{variant:`h3`,children:[`Please select a `,n]}),p(`div`,{children:[p(`section`,{children:[f(i,{lightBackground:!0,value:c,items:b,placeholder:`Select a ${n}...`,onSelect:y}),f(s,{"data-testid":`nextButton`,variant:`contained_icon`,disabled:c===void 0,onClick:v,children:f(l,{data:m})})]}),r&&p(g,{children:[p(u,{variant:`overline`,children:[`Missing a `,n,`?`]}),f(_,{tabIndex:0,"data-testid":`missing-access`,href:`https://accessit.equinor.com/#`,target:`_blank`,children:`Go to AccessIT`})]})]})]})};export{v as SelectorCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
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{SkeletonBase as n}from"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import
|
|
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{SkeletonBase as n}from"../../../molecules/Skeleton/SkeletonBase/SkeletonBase.js";import"react";import{Card as r}from"@equinor/eds-core-react";import i from"styled-components";import{jsx as a,jsxs as o}from"react/jsx-runtime";const{elevation:s,shape:c}=e,l=i(r)`
|
|
2
2
|
position: absolute;
|
|
3
3
|
left: 50%;
|
|
4
4
|
top: 50%;
|
|
@@ -8,17 +8,17 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
|
|
|
8
8
|
width: 25rem;
|
|
9
9
|
align-items: center;
|
|
10
10
|
padding: ${t.large};
|
|
11
|
-
box-shadow: ${
|
|
12
|
-
border-radius: ${
|
|
11
|
+
box-shadow: ${s.raised};
|
|
12
|
+
border-radius: ${c.corners.borderRadius};
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: row;
|
|
15
15
|
justify-content: space-between;
|
|
16
|
-
`,
|
|
16
|
+
`,u=i(n)`
|
|
17
17
|
width: calc((25rem - 2 * ${t.large}) * 0.8);
|
|
18
|
-
height: calc(${
|
|
19
|
-
`,
|
|
20
|
-
width: ${
|
|
21
|
-
height: ${
|
|
18
|
+
height: calc(${c.button.minHeight});
|
|
19
|
+
`,d=i(n)`
|
|
20
|
+
width: ${c.icon_button.minWidth};
|
|
21
|
+
height: ${c.icon_button.minHeight};
|
|
22
22
|
|
|
23
|
-
border-radius: ${
|
|
24
|
-
`,
|
|
23
|
+
border-radius: ${c.icon_button.borderRadius};
|
|
24
|
+
`,f=()=>o(l,{children:[a(u,{role:`busy`}),a(d,{role:`busy`})]});export{f as SelectorSkeleton};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterProps } from "./Filter.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/Filter/Filter.d.ts
|
|
5
5
|
|
|
@@ -32,6 +32,6 @@ declare function Filter<T extends string>({
|
|
|
32
32
|
id,
|
|
33
33
|
openOnFocus,
|
|
34
34
|
...rest
|
|
35
|
-
}: FilterProps<T>):
|
|
35
|
+
}: FilterProps<T>): react_jsx_runtime6.JSX.Element;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { Filter };
|