@equinor/amplify-component-lib 12.0.5 → 12.0.7
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/atoms/hooks/useAmplifyKit.js +1 -1
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/richtext.js +2 -2
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.d.ts +2 -2
- package/dist/molecules/Chip/Chip.d.ts +2 -2
- 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/IconCell/IconCell.d.ts +2 -2
- package/dist/molecules/IconCell/IconCell.js +1 -1
- package/dist/molecules/IconCell/IconCell.utils.js +2 -2
- 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/RichTextEditor/MenuBar/AddImageButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +7 -7
- package/dist/molecules/RichTextEditor/MenuBar/Table/Table.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextAlignment.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextClearFormatting.js +3 -3
- package/dist/molecules/RichTextEditor/MenuBar/TextCode.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +14 -14
- package/dist/molecules/RichTextEditor/MenuBar/TextFormatting.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextHighlight.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextHistory.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +4 -4
- package/dist/molecules/RichTextEditor/MenuBar/TextLists.js +1 -1
- package/dist/molecules/RichTextEditor/RichTextEditor.types.js +1 -1
- package/dist/molecules/RichTextEditor/index.d.ts +7 -7
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts +2 -2
- package/dist/molecules/Select/Select.styles.d.ts +7 -7
- package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
- 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 -4
- package/dist/molecules/TableHeader/TableHeader.js +1 -1
- package/dist/organisms/DataGrid/DataGrid.d.ts +2 -2
- package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/SideSheet/SideSheet.d.ts +1 -0
- package/dist/organisms/SideSheet/SideSheet.js +1 -1
- package/dist/organisms/SideSheet/SideSheet.styles.js +9 -3
- package/dist/organisms/SideSheet/SideSheet.types.d.ts +4 -1
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Description.d.ts +2 -2
- 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/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/TopBar/Account/Account.js +1 -1
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/organisms/TopBar/Notifications/FilterOptions.js +17 -17
- package/dist/organisms/TopBar/Notifications/NotificationsInner.js +3 -3
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReadyToReportNotification.js +6 -6
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/RequestReviewOrca.js +4 -4
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.const.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.types.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +5 -5
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +4 -4
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/Resources.js +3 -3
- package/dist/organisms/TopBar/Settings.js +4 -4
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +25 -25
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.js +1 -1
- package/dist/providers/SurveyProvider/SurveyProvider.js +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/package.json +3 -3
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/Notifications.types.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../molecules/RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as e}from"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import{useMemo as t}from"react";const n=({features:n,placeholder:r,onImageUpload:i,onImageRead:a})=>t(()=>e.configure({placeholder:r?{placeholder:r}:void 0,link:n?.includes(`links`)?{}:!1,table:n?.includes(`table`)?{}:!1,textAlign:n?.includes(`alignment`)?{}:!1,bulletList:n?.includes(`lists`)?{}:!1,orderedList:n?.includes(`lists`)?{}:!1,codeBlockLowlight:n?.includes(`code`)?{}:!1,image:n?.includes(`images`)?{onImageUpload:i,onImageRead:a}:!1,heading:n?.includes(`headers`)?{}:!1}),[r,n,i,a]);export{n as useAmplifyKit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../enums/Environment.js";import{PublicClientApplication as e}from"@azure/msal-browser";const t=[`IS_MOCK`,`ALLOWED_PARENT_DOMAINS`,`SERVICE_NOW_CONFIGURATION_ITEM`,`API_CLIENT_ID`],n=e=>{if(!window._env_)return``;if(window._env_[e]===void 0&&!t.includes(e))throw Error(`Missing required environment variable: `+e);return window._env_[e]},r=e=>e||n(`NAME`),i=e=>e||n(`CLIENT_ID`),a=e=>e||n(`API_URL`),o=e=>e||n(`API_SCOPE`),s=e=>e||n(`API_CLIENT_ID`),c=e=>e||n(`ENVIRONMENT_NAME`),l=e=>e||n(`SERVICE_NOW_CONFIGURATION_ITEM`),u=e=>e===void 0?!1:e===`true`,d=e=>e===void 0?[`admin`]:JSON.parse(e),f=e=>e?e.split(`;`):n(`ALLOWED_PARENT_DOMAINS`)?.split(`;`)||[],p=e=>{if(e!==void 0)return`https://avatars.githubusercontent.com/u/97165289`};function m(){let e=import.meta.env.VITE_ENVIRONMENT_NAME;return e||=n(`ENVIRONMENT_NAME`),e===`production`?`https://jsembark.equinor.com`:`https://client-amplify-portal-${e===`localhost`?`development`:e}.radix.equinor.com`}const h=m(),g={PHOTO:`https://graph.microsoft.com/v1.0/me/photos/96x96/$value`},_=(e,t)=>fetch(e,{headers:{Authorization:`Bearer ${t}`}}),v={OPENID:`openid`,PROFILE:`profile`,USER_READ:`User.Read`},y={scopes:[v.OPENID,v.PROFILE,v.USER_READ]},b={scopes:[v.USER_READ]},x=e=>({scopes:[e]}),S=()=>window.self!==window.top,C=new e({auth:{clientId:i(import.meta.env.VITE_CLIENT_ID),authority:`https://login.microsoftonline.com/StatoilSRM.onmicrosoft.com/`,redirectUri:window.location.origin},cache:{cacheLocation:`localStorage`}}),w=f(import.meta.env.ALLOWED_PARENT_DOMAINS);window.addEventListener(`message`,async e=>{if(w.includes(e.origin)){let t=e.data;if(t){await C.initialize();try{await C.ssoSilent({sid:t}),console.log(`postMessage successfully logged in user!`)}catch(e){console.error(`Something went wrong with postMessage`),console.error(e)}}}});const T={fetchMsGraph:_,GRAPH_SCOPES:v,GRAPH_REQUESTS_LOGIN:y,GRAPH_REQUESTS_PHOTO:b,GRAPH_REQUESTS_BACKEND:x,GRAPH_ENDPOINTS:g,msalApp:C,getToken:async()=>{if(u(import.meta.env.VITE_IS_MOCK))return``;let e=C.getActiveAccount(),t=C.getAllAccounts();return!e&&t.length===0?``:(await C.acquireTokenSilent(x(o(import.meta.env.VITE_API_SCOPE)))).accessToken},isReaderOnly:e=>e?!e.some(e=>e.includes(`WRITE`)):!0,isInIframe:S},E={getConfig:n,getAppName:r,getClientId:i,getApiUrl:a,getApiScope:o,getApiClientId:s,getEnvironmentName:c,getIsMock:u,getMockUserPhoto:p,getMockRoles:d,getServiceNowConfigurationItem:l,PORTAL_URL_WITHOUT_LOCALHOST:h};export{T as auth,E as environment};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_FEATURES as e
|
|
2
|
-
Either add the onImageUpload function or remove RichTextEditorFeatures.IMAGES from the features array`);return
|
|
1
|
+
import{DEFAULT_FEATURES as e}from"../../molecules/RichTextEditor/RichTextEditor.types.js";function t({features:t,extendFeatures:n,removeFeatures:r,onImageUpload:i}){let a=t??e,o=n??[],s=[...a,...o].filter(e=>!r?.includes(e)).filter((e,t,n)=>t===n.indexOf(e));if(s.includes(`images`)&&i===void 0)throw Error(`onImageUpload cannot be undefined when features include images!
|
|
2
|
+
Either add the onImageUpload function or remove RichTextEditorFeatures.IMAGES from the features array`);return s}const n=/(<img src=".*?" alt="(.*?)">)/g,r=/(<img alt="(.*?)" \/>)/g;function i(e){if(!e)return[];let t=[],n=e.matchAll(r);for(let e of n)t.push(e[2]);return t}function a(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>{typeof r.result==`string`&&t(r.result)},r.onerror=n})}function o(e){return e.replaceAll(n,`<img alt="$2" />`)}function s(e){let t=[],n=e.matchAll(/(<img src="(.*?)" alt=".*?">)/g);for(let e of n)t.push(e[2]);return t}export{r as IMG_WITH_ALT,n as IMG_WITH_SRC_AND_ALT,o as cleanRichTextValue,i as extractImageUrls,t as getFeatures,s as getImagesFromRichText,a as imageToB64};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react1 from "react";
|
|
2
2
|
import { IconData } from "@equinor/eds-icons";
|
|
3
3
|
|
|
4
4
|
//#region src/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts
|
|
@@ -12,6 +12,6 @@ interface ExpandingIconButtonProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
|
|
14
14
|
*/
|
|
15
|
-
declare const ExpandingIconButton:
|
|
15
|
+
declare const ExpandingIconButton: react1.ForwardRefExoticComponent<ExpandingIconButtonProps & react1.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ExpandingIconButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 from "react";
|
|
2
2
|
import { IconData } from "@equinor/eds-icons";
|
|
3
3
|
|
|
4
4
|
//#region src/deprecated/IconToggleButton.d.ts
|
|
@@ -21,6 +21,6 @@ interface IconToggleButtonProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
|
|
23
23
|
*/
|
|
24
|
-
declare const IconToggleButton:
|
|
24
|
+
declare const IconToggleButton: react0.ForwardRefExoticComponent<IconToggleButtonProps & react0.RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { IconToggleButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react13 from "react";
|
|
2
2
|
import { HTMLAttributes, KeyboardEvent, MouseEvent, ReactNode } from "react";
|
|
3
3
|
import { IconData } from "@equinor/eds-icons";
|
|
4
4
|
|
|
@@ -25,6 +25,6 @@ type DeletableChipProps = BaseChipProps & InteractiveChipBase & {
|
|
|
25
25
|
onDelete: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
26
26
|
};
|
|
27
27
|
type ChipProps = Omit<HTMLAttributes<HTMLDivElement | HTMLButtonElement>, 'onClick'> & (ReadOnlyChipProps | ClickableChipProps | DeletableChipProps);
|
|
28
|
-
declare const Chip:
|
|
28
|
+
declare const Chip: react13.ForwardRefExoticComponent<ChipProps & react13.RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { BaseChipProps, Chip, ClickableChipProps, DeletableChipProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Variants } from "../../atoms/types/variants.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react17 from "react";
|
|
3
3
|
import { DatePickerProps } from "@equinor/eds-core-react";
|
|
4
4
|
|
|
5
5
|
//#region src/molecules/DatePicker/DatePicker.d.ts
|
|
@@ -9,11 +9,11 @@ type DatePickerProps$1 = Omit<DatePickerProps, 'variant' | 'defaultValue'> & {
|
|
|
9
9
|
meta?: string;
|
|
10
10
|
loading?: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare const DatePicker$1:
|
|
12
|
+
declare const DatePicker$1: react17.ForwardRefExoticComponent<Omit<DatePickerProps, "defaultValue" | "variant"> & {
|
|
13
13
|
variant?: Variants;
|
|
14
14
|
defaultValue?: Date | undefined;
|
|
15
15
|
meta?: string;
|
|
16
16
|
loading?: boolean;
|
|
17
|
-
} &
|
|
17
|
+
} & react17.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { DatePicker$1 as DatePicker, DatePickerProps$1 as DatePickerProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Variants } from "../../atoms/types/variants.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react19 from "react";
|
|
3
3
|
import { DateRangePickerProps } from "@equinor/eds-core-react";
|
|
4
4
|
|
|
5
5
|
//#region src/molecules/DateRangePicker/DateRangePicker.d.ts
|
|
@@ -8,10 +8,10 @@ type DateRangePickerProps$1 = Omit<DateRangePickerProps, 'variant'> & {
|
|
|
8
8
|
meta?: string;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const DateRangePicker$1:
|
|
11
|
+
declare const DateRangePicker$1: react19.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
|
|
12
12
|
variant?: Variants;
|
|
13
13
|
meta?: string;
|
|
14
14
|
loading?: boolean;
|
|
15
|
-
} &
|
|
15
|
+
} & react19.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DateRangePicker$1 as DateRangePicker, DateRangePickerProps$1 as DateRangePickerProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react21 from "react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ButtonProps, DialogProps } from "@equinor/eds-core-react";
|
|
4
4
|
import { IconData } from "@equinor/eds-icons";
|
|
@@ -51,6 +51,6 @@ interface DialogProps$1 extends Omit<DialogProps, 'title'> {
|
|
|
51
51
|
* @param additionalInfo - Defaults to empty, and won't show the additional info button
|
|
52
52
|
* Also inherits props from EDS dialog
|
|
53
53
|
*/
|
|
54
|
-
declare const Dialog$1:
|
|
54
|
+
declare const Dialog$1: react21.ForwardRefExoticComponent<DialogProps$1 & react21.RefAttributes<HTMLDivElement>>;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { Dialog$1 as Dialog, DialogAction, DialogProps$1 as DialogProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SizeIconProps } from "../../atoms/types/Icon.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react15 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/EquinorLogo/EquinorLogo.d.ts
|
|
5
5
|
interface EquinorLogoProps extends Partial<SizeIconProps> {
|
|
6
6
|
large?: boolean;
|
|
7
7
|
color?: 'red' | 'white' | 'black';
|
|
8
8
|
}
|
|
9
|
-
declare const EquinorLogo:
|
|
9
|
+
declare const EquinorLogo: react15.ForwardRefExoticComponent<EquinorLogoProps & react15.RefAttributes<SVGSVGElement>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { EquinorLogo, EquinorLogoProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconCellColor, IconCellState, IconCellVariant, IconCellVariants } from "./IconCell.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react23 from "react";
|
|
3
3
|
import { HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
4
4
|
import { IconData } from "@equinor/eds-icons";
|
|
5
5
|
|
|
@@ -49,6 +49,6 @@ type IconCellProps = ScribbledOutProps | RegularIconCellProps;
|
|
|
49
49
|
* @param {React.Ref<HTMLButtonElement>} ref - Ref forwarded to the inner button element.
|
|
50
50
|
* @returns {JSX.Element} The rendered IconCell.
|
|
51
51
|
*/
|
|
52
|
-
declare const IconCell:
|
|
52
|
+
declare const IconCell: react23.ForwardRefExoticComponent<IconCellProps & react23.RefAttributes<HTMLButtonElement>>;
|
|
53
53
|
//#endregion
|
|
54
54
|
export { IconCell, IconCellProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../atoms/enums/Theme.js";import{ThemeProviderContext as e}from"../../providers/ThemeProvider/ThemeProvider.js";import{IconCellColors as t,IconCellStates as n,IconCellVariants as r}from"./IconCell.types.js";import{getIconCellColor as i,renderContent as a}from"./IconCell.utils.js";import{Button as o,Container as s,HelperIconContainer as c,IconContainer as l,Label as u}from"./IconCell.styles.js";import{forwardRef as d,useContext as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=d(function(d,h){let g=f(e);if(d.variant===r.SCRIBBLED_OUT){let{className:e,as:t=`td`,noBottomBorder:n=!1}=d;return p(s,{className:e,as:t,children:p(o,{ref:h,$variant:r.SCRIBBLED_OUT,$noBottomBorder:n,$clickable:!1})})}let{icon:_,onClick:v,className:y,disabled:b=!1,selected:x=!1,color:S=t.DEFAULT,state:C=n.DEFAULT,label:w,variant:T=r.DEFAULT,helperIcon:E,noBottomBorder:D=!1,as:O=`td`,...k}=d,{backgroundColor:A,iconColor:j}=i(S,g?.theme??`light`);return p(s,{className:y,as:O,children:m(o,{ref:h,...k,$selected:x,disabled:b,onClick:v,$backgroundColor:A,$state:C,$variant:T,$noBottomBorder:D,$clickable:!!v&&!b,children:[p(l,{children:a(_,j)}),p(u,{children:p(`span`,{children:w})}),p(c,{children:E&&a(E,j)})]})})});h.displayName=`IconCell`;export{h as IconCell};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import"../../atoms/enums/Theme.js";import{IconCellColors as t,IconCellStates as n,IconCellVariants as r}from"./IconCell.types.js";import{Icon as i}from"@equinor/eds-core-react";import{jsx as a}from"react/jsx-runtime";const o=(e,t)=>e&&typeof e==`object`&&`prefix`in e?a(i,{data:e,color:t}):e,s=(n,r)=>{switch(n){case t.GREEN:case t.SUCCESS:return r===`light`?{backgroundColor:e.interactive.success__highlight.rgba,iconColor:e.dataviz.darkgreen.default}:{backgroundColor:e.dataviz.darkgreen.default,iconColor:e.dataviz.lightgreen.lighter};case t.RED:case t.ERROR:return r===`light`?{backgroundColor:e.interactive.danger__highlight.rgba,iconColor:e.interactive.danger__text.rgba}:{backgroundColor:e.ui.background__danger.rgba,iconColor:e.text.static_icons__default.rgba};case t.ORANGE:case t.WARNING:return r===`light`?{backgroundColor:e.interactive.warning__highlight.rgba,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.ui.background__warning.rgba,iconColor:e.text.static_icons__default.rgba};case t.BLUE:return r===`light`?{backgroundColor:e.dataviz.lightblue.lighter,iconColor:e.dataviz.primary.darker}:{backgroundColor:e.dataviz.darkblue.default,iconColor:e.dataviz.lightblue.lighter};case t.LIGHTGREY:return r===`light`?{backgroundColor:e.ui.background__light.rgba,iconColor:e.dataviz.lightgray.darker}:{backgroundColor:e.ui.background__heavy.rgba,iconColor:e.text.static_icons__secondary.rgba};case t.PINK:return r===`light`?{backgroundColor:e.dataviz.darkpink.lighter,iconColor:e.dataviz.darkpink.darker}:{backgroundColor:e.dataviz.darkpink.darker,iconColor:e.dataviz.darkpink.lighter};case t.YELLOW:return r===`light`?{backgroundColor:e.dataviz.lightyellow.lighter,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.dataviz.darkyellow.darker,iconColor:e.dataviz.lightyellow.lighter};case t.PURPLE:return r===`light`?{backgroundColor:e.dataviz.lightpurple.lighter,iconColor:e.dataviz.darkpurple.darker}:{backgroundColor:e.dataviz.darkpurple.darker,iconColor:e.dataviz.lightpurple.lighter};default:return r===`light`?{backgroundColor:e.ui.background__medium.rgba,iconColor:e.text.static_icons__default.rgba}:{backgroundColor:e.ui.background__light.rgba,iconColor:e.text.static_icons__default.rgba}}},c={[n.ERROR]:e.interactive.danger__resting.rgba,[n.WARNING]:e.interactive.warning__resting.rgba},l={[n.ERROR]:e.ui.background__danger.rgba,[n.WARNING]:e.ui.background__warning.rgba},u=(e,t)=>(t?c[t]:void 0)??e,d=({$noBottomBorder:t,$state:n,$backgroundColor:r})=>`1px solid ${t?r:u(e.ui.background__medium.rgba,n)}`,f=t=>u(e.text.static_icons__default.rgba,t),p=({$variant:t,$state:i,$backgroundColor:a=e.ui.background__default.rgba})=>t===r.SCRIBBLED_OUT?`repeating-linear-gradient(
|
|
2
2
|
20deg,
|
|
3
3
|
${e.ui.background__light_medium.rgba} 0px,
|
|
4
4
|
${e.ui.background__default.rgba} 1px,
|
|
5
5
|
${e.ui.background__default.rgba} 10px,
|
|
6
6
|
${e.ui.background__light_medium.rgba} 11px,
|
|
7
7
|
${e.ui.background__light_medium.rgba} 12px
|
|
8
|
-
)`:t===
|
|
8
|
+
)`:t===r.COLOURED?i===n.ERROR?l[n.ERROR]:i===n.WARNING?l[n.WARNING]:a:`transparent`;export{p as getBackground,d as getBorderBottom,s as getIconCellColor,f as getSelectedBorder,o as renderContent,l as stateBGColor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react160 from "react";
|
|
2
2
|
import { FocusEventHandler, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
3
3
|
import { IconData } from "@equinor/eds-icons";
|
|
4
4
|
|
|
@@ -15,6 +15,6 @@ interface ListItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
15
15
|
isChild?: boolean;
|
|
16
16
|
borderBottom?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const ListItem:
|
|
18
|
+
declare const ListItem: react160.ForwardRefExoticComponent<ListItemProps & react160.RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { ListItem, ListItemProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, MouseEvent } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/OptionDrawer/OptionDrawer.d.ts
|
|
5
5
|
interface ToggleEventProps<T> {
|
|
@@ -43,7 +43,7 @@ declare const OptionDrawer: {
|
|
|
43
43
|
openAll,
|
|
44
44
|
showIntermediateParent,
|
|
45
45
|
parentHasNestedItems
|
|
46
|
-
}: OptionDrawerProps<T>):
|
|
46
|
+
}: OptionDrawerProps<T>): react_jsx_runtime1.JSX.Element;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
49
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react27 from "react";
|
|
2
2
|
import { TooltipProps } from "@equinor/eds-core-react";
|
|
3
3
|
import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
4
4
|
|
|
@@ -6,14 +6,14 @@ import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
|
6
6
|
type OptionalTooltipProps = {
|
|
7
7
|
textTransform?: string;
|
|
8
8
|
} & TooltipProps;
|
|
9
|
-
declare const OptionalTooltip:
|
|
9
|
+
declare const OptionalTooltip: react27.ForwardRefExoticComponent<{
|
|
10
10
|
textTransform?: string;
|
|
11
11
|
} & {
|
|
12
12
|
placement?: _floating_ui_utils0.Placement;
|
|
13
|
-
title?:
|
|
13
|
+
title?: react27.ReactNode;
|
|
14
14
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
15
15
|
enterDelay?: number;
|
|
16
16
|
portalContainer?: HTMLElement;
|
|
17
|
-
} & Omit<
|
|
17
|
+
} & Omit<react27.HTMLAttributes<HTMLDivElement>, "title"> & react27.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { OptionalTooltip, OptionalTooltipProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react25 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:
|
|
10
|
+
declare const ProfileAvatar: react25.ForwardRefExoticComponent<ProfileAvatarProps & react25.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ProfileAvatar, ProfileAvatarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{useRef as t}from"react";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{camera_add_photo as a}from"@equinor/eds-icons";const o=({onImageUpload:o,editor:s,features:c})=>{let l=t(null);return c&&!c.includes(`images`)?null:i(n,{children:[r(`input`,{ref:l,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 o?.(t[0]);n&&s?.chain().focus().setImage({src:n.src,alt:n.alt}).run()},style:{display:`none`},accept:`image/*, video/*`}),r(e.Button,{"data-testid":`add-image-button`,icon:a,onClick:()=>{l.current&&l.current.click()},tooltip:`Add Image`})]})};export{o 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
|
|
4
|
+
import * as react31 from "react";
|
|
5
5
|
import { FC } from "react";
|
|
6
|
-
import * as
|
|
6
|
+
import * as styled_components3 from "styled-components";
|
|
7
7
|
import { Editor } from "@tiptap/react";
|
|
8
|
-
import * as
|
|
8
|
+
import * as styled_components_dist_types0 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_types0.IStyledComponentBase<"web", styled_components3.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
18
|
+
Bars: styled_components_dist_types0.IStyledComponentBase<"web", styled_components3.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
19
|
+
Button: react31.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react31.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
Section: styled_components_dist_types0.IStyledComponentBase<"web", styled_components3.FastOmit<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<react31.DetailedHTMLProps<react31.HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
|
|
21
21
|
AddImageButton: FC<AddImageProps>;
|
|
22
22
|
};
|
|
23
23
|
declare const EditorText: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../RichTextEditor.types.js";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,features:i})=>{if(!(i&&!i.includes(`table`))&&!r.isActive(`table`))return t(e,{"data-testid":`add-table-button`,icon:n,onClick:()=>{r.chain().focus().insertTable({rows:1,cols:3,withHeaderRow:!1}).run()},tooltip:`Add Table`})};export{r as TextTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{format_align_center as r,format_align_left as i,format_align_right as a}from"@equinor/eds-icons";const o=({editor:o,features:s})=>{let c=()=>o.chain().focus().setTextAlign(`left`).run(),l=()=>o.chain().focus().setTextAlign(`center`).run(),u=()=>o.chain().focus().setTextAlign(`right`).run();if(!(s&&!s.includes(`alignment`)))return n(e.Section,{children:[t(e.Button,{active:o.isActive({textAlign:`left`}),"data-testid":`align-left-button`,icon:i,onClick:c,tooltip:`Align Left`}),t(e.Button,{active:o.isActive({textAlign:`center`}),"data-testid":`align-center-button`,icon:r,onClick:l,tooltip:`Align Center`}),t(e.Button,{active:o.isActive({textAlign:`right`}),"data-testid":`align-right-button`,icon:a,onClick:u,tooltip:`Align Right`})]})};export{o as TextAlignment};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import
|
|
1
|
+
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import n from"styled-components";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{format_clear as o}from"@equinor/eds-icons";const{colors:s}=e,c=n.hr`
|
|
2
2
|
width: 1px;
|
|
3
|
-
background: ${
|
|
4
|
-
`,
|
|
3
|
+
background: ${s.ui.background__medium.rgba};
|
|
4
|
+
`,l=({editor:e,features:n})=>{let s=()=>e.chain().focus().clearNodes().unsetAllMarks().run();if(!(n&&!n.includes(`clear-formatting`)))return a(r,{children:[i(c,{}),i(t.Button,{icon:o,onClick:s,"data-testid":`clear-formatting`,tooltip:`Clear Formatting`})]})};export{l as TextClearFormatting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t}from"react/jsx-runtime";import{code as n}from"@equinor/eds-icons";const r=({editor:r,features:i})=>{let a=()=>r.chain().focus().toggleCodeBlock().run();if(!(i&&!i.includes(`code`)))return t(e.Button,{active:r.isActive(`codeBlock`),icon:n,onClick:a,"data-testid":`code-button`,tooltip:`Code Block`})};export{r as TextCode};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import
|
|
1
|
+
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../RichTextEditor.types.js";import{OptionalTooltip as t}from"../../OptionalTooltip/OptionalTooltip.js";import{Icon as n}from"@equinor/eds-core-react";import r from"styled-components";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{format_color_text as o}from"@equinor/eds-icons";const{colors:s,spacings:c,shape:l}=e,u=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
gap: ${
|
|
4
|
+
gap: ${c.comfortable.medium};
|
|
5
5
|
position: relative;
|
|
6
|
-
background: ${
|
|
7
|
-
border-radius: ${
|
|
6
|
+
background: ${s.ui.background__light.rgba};
|
|
7
|
+
border-radius: ${l.button.borderRadius};
|
|
8
8
|
transition: 200ms background;
|
|
9
9
|
> input {
|
|
10
|
-
border-radius: ${
|
|
11
|
-
width: calc(24px + (${
|
|
12
|
-
height: calc(24px + (${
|
|
10
|
+
border-radius: ${l.button.borderRadius};
|
|
11
|
+
width: calc(24px + (${c.comfortable.x_small}) * 2);
|
|
12
|
+
height: calc(24px + (${c.comfortable.x_small}) * 2);
|
|
13
13
|
opacity: 0;
|
|
14
14
|
&:hover {
|
|
15
15
|
cursor: pointer;
|
|
@@ -19,27 +19,27 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
svg {
|
|
22
|
-
fill: ${
|
|
22
|
+
fill: ${s.interactive.primary__resting.rgba};
|
|
23
23
|
transition: 200ms fill;
|
|
24
24
|
}
|
|
25
25
|
&:hover {
|
|
26
|
-
background: ${
|
|
26
|
+
background: ${s.interactive.primary__hover_alt.rgba};
|
|
27
27
|
|
|
28
28
|
svg {
|
|
29
|
-
fill: ${
|
|
29
|
+
fill: ${s.interactive.primary__hover.rgba};
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,d=r.span`
|
|
33
33
|
position: absolute;
|
|
34
34
|
left: 50%;
|
|
35
|
-
top: calc(50% + ${
|
|
35
|
+
top: calc(50% + ${c.comfortable.x_small} / 2);
|
|
36
36
|
transform: translate(-50%, -50%);
|
|
37
37
|
pointer-events: none;
|
|
38
|
-
`,
|
|
38
|
+
`,f=r.span`
|
|
39
39
|
position: absolute;
|
|
40
40
|
left: 50%;
|
|
41
41
|
transform: translateX(-50%);
|
|
42
42
|
bottom: 5px;
|
|
43
43
|
height: 4px;
|
|
44
44
|
width: 24px;
|
|
45
|
-
`,
|
|
45
|
+
`,p=({editor:e,features:r})=>r&&!r.includes(`text-color`)?null:i(t,{title:`Text Color`,enterDelay:300,children:a(u,{children:[i(`input`,{type:`color`,onChange:t=>{e.chain().focus().setColor(t.target.value).run()},"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||s.text.static_icons__default.hex}),i(d,{children:i(n,{data:o})}),i(f,{style:{background:e.getAttributes(`textStyle`)?.color||s.text.static_icons__default.hex}})]})});export{p as TextColor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{format_bold as r,format_italics as i}from"@equinor/eds-icons";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().toggleBold().run(),c=()=>a.chain().focus().toggleItalic().run();if(!(o&&!o.includes(`formatting`)))return n(e.Section,{children:[t(e.Button,{active:a.isActive(`bold`),"data-testid":`bold-button`,icon:r,onClick:s,tooltip:`Bold`}),t(e.Button,{active:a.isActive(`italic`),"data-testid":`italic-button`,icon:i,onClick:c,tooltip:`Italic`})]})};export{a as TextFormatting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{amplify_h2 as e,amplify_h3 as t}from"../../../atoms/icons/wysiwyg.js";import{EditorMenu as n}from"./MenuBar.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().toggleHeading({level:2}).run(),c=()=>a.chain().focus().toggleHeading({level:3}).run();if(!(o&&!o.includes(`headers`)))return i(n.Section,{children:[r(n.Button,{"data-testid":`h2-button`,active:a.isActive(`heading`,{level:2}),icon:e,onClick:s,tooltip:`Heading 2`}),r(n.Button,{"data-testid":`h3-button`,active:a.isActive(`heading`,{level:3}),icon:t,onClick:c,tooltip:`Heading 3`})]})};export{a as TextHeaders};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t}from"react/jsx-runtime";import{format_color_fill as n}from"@equinor/eds-icons";const r=({editor:r,features:i})=>i&&!i.includes(`highlight`)?null:t(e.Button,{"data-testid":`highlight-button`,active:r.isActive(`highlight`),icon:n,onClick:()=>r.chain().focus().toggleHighlight().run(),tooltip:`Highlight`});export{r as TextHighlight};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{redo as r,undo as i}from"@equinor/eds-icons";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().undo().run(),c=()=>a.chain().focus().redo().run();if(!(o&&!o.includes(`undoRedo`)))return n(e.Section,{children:[t(e.Button,{icon:i,onClick:s,"data-testid":`undo-button`,disabled:!a.can().undo(),tooltip:`Undo`}),t(e.Button,{icon:r,onClick:c,"data-testid":`redo-button`,disabled:!a.can().redo(),tooltip:`Redo`})]})};export{a as TextHistory};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import
|
|
1
|
+
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../RichTextEditor.types.js";import{isValidUrl as t}from"../../../atoms/utils/url.js";import{TextField as n}from"../../TextField/TextField.js";import{EditorMenu as r}from"./MenuBar.js";import{useRef as i,useState as a}from"react";import{Button as o,Icon as s,Popover as c}from"@equinor/eds-core-react";import l from"styled-components";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{link as p,link_off as m}from"@equinor/eds-icons";const{spacings:h}=e,g=l.div`
|
|
2
2
|
display: flex;
|
|
3
|
-
gap: ${
|
|
4
|
-
padding: ${
|
|
3
|
+
gap: ${h.comfortable.medium};
|
|
4
|
+
padding: ${h.comfortable.small};
|
|
5
5
|
width: 15rem;
|
|
6
|
-
`,
|
|
6
|
+
`,_=({editor:e,features:l})=>{let[h,_]=a(!1),v=i(null),y=i(``),[b,x]=a(!1),S=()=>{_(e=>!e),e.chain().focus().setHighlight({color:`#accef7`}).run()},C=()=>{_(!1),y.current=``,e.chain().focus().unsetHighlight().run()},w=e=>{y.current=e.target.value},T=e=>{e.key===`Enter`&&E()},E=()=>{if(!t(y.current)){x(!0);return}y.current.includes(`http`)||(y.current=`https://${y.current}`),e.chain().focus().extendMarkRange(`link`).setLink({href:y.current}).run(),C(),b&&x(!1)},D=()=>e?.chain().focus().unsetLink().run();if(!(l&&!l.includes(`links`)))return f(u,{children:[f(r.Section,{children:[d(r.Button,{active:h,ref:v,icon:p,onClick:S,disabled:e.state.selection.empty,"data-testid":`link-button`,tooltip:`Link`}),d(r.Button,{icon:m,onClick:D,disabled:!e.isActive(`link`),"data-testid":`unsetlink-button`,tooltip:`Remove Link`})]}),h&&d(c,{open:!0,anchorEl:v.current,onClose:C,children:f(g,{children:[d(n,{id:`link`,placeholder:`Insert link`,autoComplete:`off`,autoFocus:!0,inputIcon:d(s,{data:p}),onChange:w,onKeyDown:T,variant:b?`error`:void 0}),d(o,{variant:`outlined`,onClick:E,children:`Save`})]})})]})};export{_ as TextLinks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{format_list_bulleted as r,format_list_numbered as i}from"@equinor/eds-icons";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().toggleBulletList().run(),c=()=>a.chain().focus().toggleOrderedList().run();if(!(o&&!o.includes(`lists`)))return n(e.Section,{children:[t(e.Button,{active:a.isActive(`bulletList`),icon:r,onClick:s,"data-testid":`bullet-list-button`,tooltip:`Bullet List`}),t(e.Button,{active:a.isActive(`orderedList`),icon:i,onClick:c,"data-testid":`ordered-list-button`,tooltip:`Ordered List`})]})};export{a as TextLists};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=function(e){return e.UNDO_REDO=`undoRedo`,e.FORMATTING=`formatting`,e.HEADERS=`headers`,e.LISTS=`lists`,e.TEXT_COLOR=`text-color`,e.CODE=`code`,e.ALIGNMENT=`alignment`,e.LINKS=`links`,e.IMAGES=`images`,e.CLEAR_FORMATTING=`clear-formatting`,e.TABLE=`table`,e.HIGHLIGHT=`highlight`,e}({});const t=[
|
|
1
|
+
let e=function(e){return e.UNDO_REDO=`undoRedo`,e.FORMATTING=`formatting`,e.HEADERS=`headers`,e.LISTS=`lists`,e.TEXT_COLOR=`text-color`,e.CODE=`code`,e.ALIGNMENT=`alignment`,e.LINKS=`links`,e.IMAGES=`images`,e.CLEAR_FORMATTING=`clear-formatting`,e.TABLE=`table`,e.HIGHLIGHT=`highlight`,e}({});const t=[`undoRedo`,`formatting`,`headers`,`lists`,`text-color`,`code`,`alignment`,`links`,`images`,`table`,`clear-formatting`];export{t as DEFAULT_FEATURES,e as RichTextEditorFeatures};
|
|
@@ -2,17 +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
|
|
6
|
-
import * as
|
|
5
|
+
import * as react45 from "react";
|
|
6
|
+
import * as styled_components6 from "styled-components";
|
|
7
7
|
import * as _tiptap_react0 from "@tiptap/react";
|
|
8
|
-
import * as
|
|
8
|
+
import * as styled_components_dist_types3 from "styled-components/dist/types";
|
|
9
9
|
|
|
10
10
|
//#region src/molecules/RichTextEditor/index.d.ts
|
|
11
11
|
declare const RichText: {
|
|
12
|
-
Styling:
|
|
13
|
-
Provider:
|
|
14
|
-
Content:
|
|
15
|
-
Bar:
|
|
12
|
+
Styling: styled_components_dist_types3.IStyledComponentBase<"web", styled_components6.FastOmit<styled_components6.FastOmit<react45.DetailedHTMLProps<react45.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never> & Partial<Pick<styled_components6.FastOmit<react45.DetailedHTMLProps<react45.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never>>> & string;
|
|
13
|
+
Provider: react45.FC<EditorProviderProps>;
|
|
14
|
+
Content: styled_components_dist_types3.IStyledComponentBase<"web", styled_components6.FastOmit<styled_components6.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react45.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never> & Partial<Pick<styled_components6.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react45.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never>>> & string & Omit<react45.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react45.RefAttributes<HTMLDivElement>>, keyof react45.Component<any, {}, any>>;
|
|
15
|
+
Bar: react45.FC<MenuBarProps>;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
18
18
|
export { RichText };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
|
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>):
|
|
20
|
+
declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime2.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { ComboBox, ComboBoxProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, PersistentSelectProps, SelectOptionRequired } from "../Select.types.js";
|
|
2
|
-
import * as
|
|
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>):
|
|
21
|
+
declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>): react_jsx_runtime3.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PersistentComboBox, PersistentComboBoxProps };
|