@equinor/subsurface-app-management 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +3 -4
  2. package/dist/api/core/ApiError.d.ts +10 -0
  3. package/dist/api/core/ApiError.js +1 -0
  4. package/dist/api/core/ApiRequestOptions.d.ts +13 -0
  5. package/dist/api/core/ApiResult.d.ts +7 -0
  6. package/dist/api/core/CancelablePromise.d.ts +26 -0
  7. package/dist/api/core/CancelablePromise.js +1 -0
  8. package/dist/api/core/OpenAPI.d.ts +32 -0
  9. package/dist/api/core/OpenAPI.js +1 -0
  10. package/dist/api/core/request.d.ts +13 -0
  11. package/dist/api/core/request.js +1 -0
  12. package/dist/api/index.d.ts +15 -0
  13. package/dist/api/models/AccessRole.d.ts +4 -0
  14. package/dist/api/models/Applications.d.ts +17 -0
  15. package/dist/api/models/CustomTutorialStep.d.ts +4 -0
  16. package/dist/api/models/Feature.d.ts +8 -0
  17. package/dist/api/models/FeatureToggleDto.d.ts +5 -0
  18. package/dist/api/models/GenericTutorialStep.d.ts +7 -0
  19. package/dist/api/models/GraphUser.d.ts +6 -0
  20. package/dist/api/models/ReleaseNote.d.ts +9 -0
  21. package/dist/api/models/ReleaseNotePatch.d.ts +8 -0
  22. package/dist/api/models/ServiceNowIncidentAttachmentResponse.d.ts +7 -0
  23. package/dist/api/models/ServiceNowIncidentResponse.d.ts +13 -0
  24. package/dist/api/models/ServiceNowUrgency.d.ts +5 -0
  25. package/dist/api/models/ServiceNowUrgency.js +1 -0
  26. package/dist/api/models/Tutorial.d.ts +13 -0
  27. package/dist/api/models/TutorialPosition.d.ts +7 -0
  28. package/dist/api/models/TutorialPosition.js +1 -0
  29. package/dist/api/models/TutorialStepBase.d.ts +4 -0
  30. package/dist/api/services/PortalService.d.ts +35 -0
  31. package/dist/api/services/PortalService.js +1 -0
  32. package/dist/api/services/ReleaseNotesService.d.ts +28 -0
  33. package/dist/api/services/ReleaseNotesService.js +1 -0
  34. package/dist/api/services/TutorialService.d.ts +12 -0
  35. package/dist/api/services/TutorialService.js +1 -0
  36. package/dist/components/Feature/Feature.d.ts +9 -0
  37. package/dist/components/Feature/Feature.js +1 -0
  38. package/dist/components/index.d.ts +1 -0
  39. package/dist/hooks/index.d.ts +7 -0
  40. package/dist/hooks/useFeatureToggling.d.ts +3 -0
  41. package/dist/hooks/useFeatureToggling.js +1 -0
  42. package/dist/hooks/useReleaseNotesQuery.d.ts +6 -0
  43. package/dist/hooks/useReleaseNotesQuery.js +1 -0
  44. package/dist/hooks/useSignalRMessages.d.ts +12 -0
  45. package/dist/hooks/useSignalRMessages.js +1 -0
  46. package/dist/index.d.ts +5 -0
  47. package/dist/index.js +1 -0
  48. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/clickbounds.js +1 -0
  49. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/colors.js +1 -0
  50. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/elevation.js +1 -0
  51. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/index.js +1 -0
  52. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/interactions.js +1 -0
  53. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/shape.js +1 -0
  54. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/spacings.js +1 -0
  55. package/dist/node_modules/@equinor/eds-tokens/dist/esm/base/typography.js +1 -0
  56. package/dist/providers/AuthProvider/AuthProvider.d.ts +17 -0
  57. package/dist/providers/AuthProvider/AuthProvider.js +1 -0
  58. package/dist/providers/AuthProvider/AuthProviderInner.d.ts +16 -0
  59. package/dist/providers/AuthProvider/AuthProviderInner.js +1 -0
  60. package/dist/providers/FeatureToggleProvider.d.ts +14 -0
  61. package/dist/providers/FeatureToggleProvider.js +1 -0
  62. package/dist/providers/ReleaseNotesProvider.d.ts +20 -0
  63. package/dist/providers/ReleaseNotesProvider.js +1 -0
  64. package/dist/providers/TutorialProvider/TutorialDialog.d.ts +3 -0
  65. package/dist/providers/TutorialProvider/TutorialDialog.js +1 -0
  66. package/dist/providers/TutorialProvider/TutorialProvider.const.d.ts +7 -0
  67. package/dist/providers/TutorialProvider/TutorialProvider.const.js +1 -0
  68. package/dist/providers/TutorialProvider/TutorialProvider.d.ts +30 -0
  69. package/dist/providers/TutorialProvider/TutorialProvider.hooks.d.ts +3 -0
  70. package/dist/providers/TutorialProvider/TutorialProvider.hooks.js +1 -0
  71. package/dist/providers/TutorialProvider/TutorialProvider.js +1 -0
  72. package/dist/providers/TutorialProvider/TutorialProvider.styles.d.ts +26 -0
  73. package/dist/providers/TutorialProvider/TutorialProvider.styles.js +67 -0
  74. package/dist/providers/TutorialProvider/TutorialProvider.types.d.ts +11 -0
  75. package/dist/providers/TutorialProvider/TutorialProvider.utils.d.ts +3 -0
  76. package/dist/providers/TutorialProvider/TutorialProvider.utils.js +1 -0
  77. package/dist/providers/TutorialProvider/TutorialProviderInner.d.ts +3 -0
  78. package/dist/providers/TutorialProvider/TutorialProviderInner.js +1 -0
  79. package/dist/providers/TutorialProvider/TutorialStepIndicator.d.ts +8 -0
  80. package/dist/providers/TutorialProvider/TutorialStepIndicator.js +25 -0
  81. package/dist/providers/TutorialStepsProvider.d.ts +13 -0
  82. package/dist/providers/TutorialStepsProvider.js +1 -0
  83. package/dist/providers/index.d.ts +6 -0
  84. package/dist/tests/browserMocks.d.ts +24 -0
  85. package/dist/tests/setupTests.d.ts +2 -0
  86. package/dist/tests/test-utils.d.ts +6 -0
  87. package/dist/types/Environment.d.ts +6 -0
  88. package/dist/types/Environment.js +1 -0
  89. package/dist/types/ReleaseNotes.d.ts +19 -0
  90. package/dist/types/ReleaseNotes.js +1 -0
  91. package/dist/types/index.d.ts +2 -0
  92. package/dist/utils/UtilStory.d.ts +7 -0
  93. package/dist/utils/auth_environment.d.ts +47 -0
  94. package/dist/utils/auth_environment.js +1 -0
  95. package/dist/utils/index.d.ts +2 -0
  96. package/dist/utils/localStorage.d.ts +2 -0
  97. package/dist/utils/localStorage.js +1 -0
  98. package/dist/utils/releaseNotes.d.ts +8 -0
  99. package/dist/utils/releaseNotes.js +1 -0
  100. package/package.json +5 -4
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
 
2
2
  <img alt="intro-logo" src="https://raw.githubusercontent.com/equinor/amplify-components/main/static/amplify_logo.png" width="300px" />
3
3
 
4
- This package contains components, utils, providers and hooks that are used to communicate with `equinor/sam` developed and used by the amplify team.
4
+ This package contains components, utils, providers and hooks that are used to communicate with `equinor/SubsurfAppManagement` developed by the amplify team.
5
5
 
6
6
 
7
- // TODO: Setup storybook
8
7
  # Quick links
9
- - [Storybook](https://storybook-subsurface-app-management.app.radix.equinor.com/)
8
+ - [Storybook](https://subsurface-management-storybook.app.radix.equinor.com/)
10
9
 
11
10
  # Building and publishing
12
11
 
13
12
  Build and publish is done automatically when code is merged into `main` branch, if the package.json version number is higher.
14
13
 
15
14
  # Latest version
16
- [![main](https://img.shields.io/npm/v/@equinor/amplify-components?color=%23c3f3d2&label=%40equinor%2Famplify-components&logo=npm&)](https://www.npmjs.com/package/@equinor/amplify-components)
15
+ [![main](https://img.shields.io/npm/v/@equinor/subsurface-app-management?color=%23c3f3d2&label=%40equinor%2Fsubsurface-app-management&logo=npm&)](https://www.npmjs.com/package/@equinor/subsurface-app-management)
@@ -0,0 +1,10 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import type { ApiResult } from './ApiResult';
3
+ export declare class ApiError extends Error {
4
+ readonly url: string;
5
+ readonly status: number;
6
+ readonly statusText: string;
7
+ readonly body: any;
8
+ readonly request: ApiRequestOptions;
9
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
10
+ }
@@ -0,0 +1 @@
1
+ class t extends Error{url;status;statusText;body;request;constructor(t,s,r){super(r),this.name="ApiError",this.url=s.url,this.status=s.status,this.statusText=s.statusText,this.body=s.body,this.request=t}}export{t as ApiError};
@@ -0,0 +1,13 @@
1
+ export type ApiRequestOptions = {
2
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
+ readonly url: string;
4
+ readonly path?: Record<string, any>;
5
+ readonly cookies?: Record<string, any>;
6
+ readonly headers?: Record<string, any>;
7
+ readonly query?: Record<string, any>;
8
+ readonly formData?: Record<string, any>;
9
+ readonly body?: any;
10
+ readonly mediaType?: string;
11
+ readonly responseHeader?: string;
12
+ readonly errors?: Record<number, string>;
13
+ };
@@ -0,0 +1,7 @@
1
+ export type ApiResult = {
2
+ readonly url: string;
3
+ readonly ok: boolean;
4
+ readonly status: number;
5
+ readonly statusText: string;
6
+ readonly body: any;
7
+ };
@@ -0,0 +1,26 @@
1
+ export declare class CancelError extends Error {
2
+ constructor(message: string);
3
+ get isCancelled(): boolean;
4
+ }
5
+ export interface OnCancel {
6
+ readonly isResolved: boolean;
7
+ readonly isRejected: boolean;
8
+ readonly isCancelled: boolean;
9
+ (cancelHandler: () => void): void;
10
+ }
11
+ export declare class CancelablePromise<T> implements Promise<T> {
12
+ readonly [Symbol.toStringTag]: string;
13
+ private _isResolved;
14
+ private _isRejected;
15
+ private _isCancelled;
16
+ private readonly _cancelHandlers;
17
+ private readonly _promise;
18
+ private _resolve?;
19
+ private _reject?;
20
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
21
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
22
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
23
+ finally(onFinally?: (() => void) | null): Promise<T>;
24
+ cancel(): void;
25
+ get isCancelled(): boolean;
26
+ }
@@ -0,0 +1 @@
1
+ class e extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}}class s{[Symbol.toStringTag];_isResolved;_isRejected;_isCancelled;_cancelHandlers;_promise;_resolve;_reject;constructor(e){this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise(((s,t)=>{this._resolve=s,this._reject=t;const i=e=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(e)};return Object.defineProperty(i,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(i,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(i,"isCancelled",{get:()=>this._isCancelled}),e((e=>{this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,this._resolve?.(e))}),(e=>{this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,this._reject?.(e))}),i)}))}then(e,s){return this._promise.then(e,s)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(){if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const e of this._cancelHandlers)e()}catch(e){return void console.warn("Cancellation threw an error",e)}this._cancelHandlers.length=0,this._reject?.(new e("Request aborted"))}}get isCancelled(){return this._isCancelled}}export{e as CancelError,s as CancelablePromise};
@@ -0,0 +1,32 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import { CancelablePromise } from './CancelablePromise';
3
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
4
+ type Headers = Record<string, string>;
5
+ export type OpenAPIConfig = {
6
+ BASE: string;
7
+ VERSION: string;
8
+ WITH_CREDENTIALS: boolean;
9
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
10
+ TOKEN?: string | Resolver<string>;
11
+ USERNAME?: string | Resolver<string>;
12
+ PASSWORD?: string | Resolver<string>;
13
+ HEADERS?: Headers | Resolver<Headers>;
14
+ ENCODE_PATH?: (path: string) => string;
15
+ };
16
+ export declare class TokenService {
17
+ /**
18
+ * @returns string Success
19
+ * @throws ApiError
20
+ */
21
+ static getAmplifyPortalToken(): CancelablePromise<string>;
22
+ /**
23
+ * @returns string Success
24
+ * @throws ApiError
25
+ */
26
+ static getAmplifyPortalProductionToken(): CancelablePromise<string>;
27
+ }
28
+ export declare const getPortalToken: () => Promise<string>;
29
+ export declare const OpenAPI: OpenAPIConfig;
30
+ export declare const OpenAPI_Portal: OpenAPIConfig;
31
+ export declare const OpenAPI_Portal_Prod: OpenAPIConfig;
32
+ export {};
@@ -0,0 +1 @@
1
+ import{auth as t,environment as o}from"../../utils/auth_environment.js";import{request as i}from"./request.js";import{getLocalStorage as e,updateLocalStorage as r}from"../../utils/localStorage.js";import{jwtDecode as E}from"jwt-decode";const{getToken:n}=t,{getApiUrl:a,getEnvironmentName:l}=o,p=l(import.meta.env.VITE_ENVIRONMENT_NAME),m="localhost"===p?"development":p;class A{static getAmplifyPortalToken(){return i(S,{method:"GET",url:"/api/v1/Token/AmplifyPortal"})}static getAmplifyPortalProductionToken(){return i(S,{method:"GET",url:"/api/v1/Token/AmplifyPortal/Production"})}}const T=t=>{if(0===t.length)return!1;try{return!(t=>{const o=E(t),i=(new Date).getTime()/1e3;return o.exp&&i>o.exp})(t)}catch(t){return!1}},d=async(t,o)=>{const i=e(t,"");if(T(i))return i;const E=await o();return r(t,E),E},c=async()=>d(`amplify-portal-${p}`,A.getAmplifyPortalToken),S={BASE:a(import.meta.env.VITE_API_URL),VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:n,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0},u={BASE:`https://api-amplify-portal-${m}.radix.equinor.com`,VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:c,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0},N={BASE:"https://api-amplify-portal-production.radix.equinor.com",VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:async()=>d("amplify-portal-production",A.getAmplifyPortalProductionToken),USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};export{S as OpenAPI,u as OpenAPI_Portal,N as OpenAPI_Portal_Prod,A as TokenService,c as getPortalToken};
@@ -0,0 +1,13 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import { CancelablePromise } from './CancelablePromise';
3
+ import type { OnCancel } from './CancelablePromise';
4
+ import type { OpenAPIConfig } from './OpenAPI';
5
+ export declare const sendRequest: (config: OpenAPIConfig, options: ApiRequestOptions, url: string, body: any, formData: FormData | undefined, headers: Headers, onCancel: OnCancel) => Promise<XMLHttpRequest>;
6
+ /**
7
+ * Request method
8
+ * @param config The OpenAPI configuration object
9
+ * @param options The request options from the service
10
+ * @returns CancelablePromise<T>
11
+ * @throws ApiError
12
+ */
13
+ export declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
@@ -0,0 +1 @@
1
+ import{ApiError as e}from"./ApiError.js";import{CancelablePromise as t}from"./CancelablePromise.js";const r=e=>null!=e,o=e=>"string"==typeof e,n=e=>o(e)&&""!==e,a=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),s=e=>e instanceof FormData,i=e=>{const t=[],o=(e,n)=>{r(n)&&(Array.isArray(n)?n.forEach((t=>{o(e,t)})):"object"==typeof n?Object.entries(n).forEach((([t,r])=>{o(`${e}[${t}]`,r)})):((e,r)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`)})(e,n))};return Object.entries(e).forEach((([e,t])=>{o(e,t)})),t.length>0?`?${t.join("&")}`:""},c=async(e,t)=>"function"==typeof t?t(e):t,p=async(e,t)=>{const i=await c(t,e.TOKEN),p=await c(t,e.USERNAME),y=await c(t,e.PASSWORD),f=await c(t,e.HEADERS),d=Object.entries({Accept:"application/json",...f,...t.headers}).filter((([e,t])=>r(t))).reduce(((e,[t,r])=>({...e,[t]:String(r)})),{});if(n(i)&&(d.Authorization=`Bearer ${i}`),n(p)&&n(y)){const e=(e=>{try{return btoa(e)}catch(t){return Buffer.from(e).toString("base64")}})(`${p}:${y}`);d.Authorization=`Basic ${e}`}return t.body&&(t.mediaType?d["Content-Type"]=t.mediaType:a(t.body)?d["Content-Type"]=t.body.type||"application/octet-stream":o(t.body)?d["Content-Type"]="text/plain":s(t.body)||(d["Content-Type"]="application/json")),new Headers(d)},y=async(e,t,r,o,n,a,s)=>{const i=new XMLHttpRequest;return i.open(t.method,r,!0),i.withCredentials=e.WITH_CREDENTIALS,a.forEach(((e,t)=>{i.setRequestHeader(t,e)})),new Promise(((e,t)=>{i.onload=()=>e(i),i.onabort=()=>t(new Error("Request aborted")),i.onerror=()=>t(new Error("Network error")),i.send(o??n),s((()=>i.abort()))}))},f=(n,c)=>new t((async(t,f,d)=>{try{const f=((e,t)=>{const r=e.ENCODE_PATH||encodeURI,o=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,o)=>t.path?.hasOwnProperty(o)?r(String(t.path[o])):e)),n=`${e.BASE}${o}`;return t.query?`${n}${i(t.query)}`:n})(n,c),b=(e=>{if(e.formData){const t=new FormData,n=(e,r)=>{o(r)||a(r)?t.append(e,r):t.append(e,JSON.stringify(r))};return Object.entries(e.formData).filter((([e,t])=>r(t))).forEach((([e,t])=>{Array.isArray(t)?t.forEach((t=>n(e,t))):n(e,t)})),t}})(c),l=(e=>{if(e.body)return e.mediaType?.includes("/json")?JSON.stringify(e.body):o(e.body)||a(e.body)||s(e.body)?e.body:JSON.stringify(e.body)})(c),h=await p(n,c);if(!d.isCancelled){const r=await y(n,c,f,l,b,h,d),a=(e=>{if(204!==e.status)try{const t=e.getResponseHeader("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?JSON.parse(e.responseText):e.responseText}catch(e){console.error(e)}})(r),s=((e,t)=>{if(t){const r=e.getResponseHeader(t);if(o(r))return r}})(r,c.responseHeader),i={url:f,ok:(u=r.status,u>=200&&u<300),status:r.status,statusText:r.statusText,body:s??a};((t,r)=>{const o={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...t.errors}[r.status];if(o)throw new e(t,r,o);if(!r.ok)throw new e(t,r,"Generic Error")})(c,i),t(i.body)}}catch(e){f(e)}var u}));export{f as request,y as sendRequest};
@@ -0,0 +1,15 @@
1
+ export { ApiError } from './core/ApiError';
2
+ export { CancelablePromise, CancelError } from './core/CancelablePromise';
3
+ export { OpenAPI } from './core/OpenAPI';
4
+ export { request } from './core/request';
5
+ export type { OpenAPIConfig } from './core/OpenAPI';
6
+ export type { Feature } from './models/Feature';
7
+ export type { CustomTutorialStep } from './models/CustomTutorialStep';
8
+ export type { GenericTutorialStep } from './models/GenericTutorialStep';
9
+ export type { Tutorial } from './models/Tutorial';
10
+ export type { FeatureToggleDto } from './models/FeatureToggleDto';
11
+ export type { GraphUser } from './models/GraphUser';
12
+ export type { ServiceNowIncidentResponse } from './models/ServiceNowIncidentResponse';
13
+ export type { ServiceNowIncidentAttachmentResponse } from './models/ServiceNowIncidentAttachmentResponse';
14
+ export { TutorialPosition } from './models/TutorialPosition';
15
+ export { ServiceNowUrgency } from './models/ServiceNowUrgency';
@@ -0,0 +1,4 @@
1
+ export type AccessRoles = {
2
+ role: string;
3
+ description: string;
4
+ };
@@ -0,0 +1,17 @@
1
+ import { AccessRoles } from './AccessRole';
2
+ export type AmplifyApplication = {
3
+ id: string;
4
+ name: string;
5
+ adGroups: Array<string>;
6
+ url: string;
7
+ accessRoles: Array<AccessRoles>;
8
+ description: string;
9
+ longDescription: string;
10
+ category: string;
11
+ version: string;
12
+ applicationInsightAPI: string;
13
+ apI_Id: string;
14
+ apiurl: string;
15
+ monitored: boolean;
16
+ productOwners: Array<string>;
17
+ };
@@ -0,0 +1,4 @@
1
+ import { TutorialStepBase } from './TutorialStepBase';
2
+ export type CustomTutorialStep = TutorialStepBase & {
3
+ key: string;
4
+ };
@@ -0,0 +1,8 @@
1
+ import type { GraphUser } from './GraphUser';
2
+ export type Feature = {
3
+ uuid: string;
4
+ featureKey: string;
5
+ description: string;
6
+ activeUsers: Array<GraphUser>;
7
+ activeEnvironments: Array<string>;
8
+ };
@@ -0,0 +1,5 @@
1
+ import type { Feature } from './Feature';
2
+ export type FeatureToggleDto = {
3
+ applicationName: string;
4
+ features: Array<Feature>;
5
+ };
@@ -0,0 +1,7 @@
1
+ import { TutorialStepBase } from './TutorialStepBase';
2
+ export type GenericTutorialStep = TutorialStepBase & {
3
+ title: string;
4
+ body: string;
5
+ key?: undefined;
6
+ imgUrl?: string;
7
+ };
@@ -0,0 +1,6 @@
1
+ export type GraphUser = {
2
+ id: string;
3
+ displayName: string;
4
+ mail: string;
5
+ userPrincipalName: string;
6
+ };
@@ -0,0 +1,9 @@
1
+ export type ReleaseNote = {
2
+ releaseId?: string | null;
3
+ applicationName?: string | null;
4
+ version?: string | null;
5
+ title?: string | null;
6
+ body?: string | null;
7
+ tags?: Array<string> | null;
8
+ createdDate?: string;
9
+ };
@@ -0,0 +1,8 @@
1
+ export type ReleaseNotePatch = {
2
+ releaseId?: string;
3
+ applicationName?: string | null;
4
+ version?: string | null;
5
+ title?: string | null;
6
+ body?: string | null;
7
+ tags?: Array<string> | null;
8
+ };
@@ -0,0 +1,7 @@
1
+ export type ServiceNowIncidentAttachmentResponse = {
2
+ tableName?: string | null;
3
+ tableSysId?: string | null;
4
+ sysId?: string | null;
5
+ contentType?: string | null;
6
+ fileName?: string | null;
7
+ };
@@ -0,0 +1,13 @@
1
+ import type { ServiceNowIncidentAttachmentResponse } from './ServiceNowIncidentAttachmentResponse';
2
+ export type ServiceNowIncidentResponse = {
3
+ number?: string | null;
4
+ assignmentGroup?: string | null;
5
+ configurationItem?: string | null;
6
+ title?: string | null;
7
+ description?: string | null;
8
+ caller?: string | null;
9
+ state?: string | null;
10
+ urgency?: string | null;
11
+ sysId?: string | null;
12
+ attachmentResponse?: ServiceNowIncidentAttachmentResponse;
13
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum ServiceNowUrgency {
2
+ CRITICAL = "Critical",
3
+ MODERATE = "Moderate",
4
+ NORMAL = "Normal"
5
+ }
@@ -0,0 +1 @@
1
+ var r;!function(r){r.CRITICAL="Critical",r.MODERATE="Moderate",r.NORMAL="Normal"}(r||(r={}));export{r as ServiceNowUrgency};
@@ -0,0 +1,13 @@
1
+ import { CustomTutorialStep } from './CustomTutorialStep';
2
+ import { GenericTutorialStep } from './GenericTutorialStep';
3
+ export type Tutorial = {
4
+ id: string;
5
+ name: string;
6
+ shortName: string;
7
+ path: string;
8
+ application: string;
9
+ steps: Array<CustomTutorialStep | GenericTutorialStep>;
10
+ showInProd: boolean;
11
+ willPopUp: boolean;
12
+ dynamicPositioning?: boolean | null;
13
+ };
@@ -0,0 +1,7 @@
1
+ export declare enum TutorialPosition {
2
+ TOP_LEFT = "TOP_LEFT",
3
+ TOP_RIGHT = "TOP_RIGHT",
4
+ BOTTOM_LEFT = "BOTTOM_LEFT",
5
+ BOTTOM_RIGHT = "BOTTOM_RIGHT",
6
+ CENTER = "CENTER"
7
+ }
@@ -0,0 +1 @@
1
+ var T;!function(T){T.TOP_LEFT="TOP_LEFT",T.TOP_RIGHT="TOP_RIGHT",T.BOTTOM_LEFT="BOTTOM_LEFT",T.BOTTOM_RIGHT="BOTTOM_RIGHT",T.CENTER="CENTER"}(T||(T={}));export{T as TutorialPosition};
@@ -0,0 +1,4 @@
1
+ import type { TutorialPosition } from './TutorialPosition';
2
+ export type TutorialStepBase = {
3
+ position?: TutorialPosition;
4
+ };
@@ -0,0 +1,35 @@
1
+ import type { CancelablePromise } from './..';
2
+ import { FeatureToggleDto } from './..';
3
+ import { ServiceNowIncidentResponse } from '../models/ServiceNowIncidentResponse';
4
+ import { AmplifyApplication } from '../models/Applications';
5
+ export declare class PortalService {
6
+ /**
7
+ * Creates a incident report in service now
8
+ * @param formData
9
+ * @returns any Success
10
+ * @throws ApiError
11
+ */
12
+ static createIncident(formData?: FormData): CancelablePromise<ServiceNowIncidentResponse>;
13
+ /**
14
+ * Uploads file to slack and links it to a channel defined in config
15
+ * @param formData
16
+ * @returns any Success
17
+ * @throws ApiError
18
+ */
19
+ static fileUpload(formData?: FormData): CancelablePromise<unknown>;
20
+ /**
21
+ * Posts a slack message to channel defined in config
22
+ * @param formData
23
+ * @returns any Success
24
+ * @throws ApiError
25
+ */
26
+ static postmessage(formData?: FormData): CancelablePromise<unknown>;
27
+ /**
28
+ * Gets a Feature Toggle from Application name
29
+ * @param applicationName name
30
+ * @returns FeatureToggleDto Success
31
+ * @throws ApiError
32
+ */
33
+ static getFeatureToggleFromApplicationName(applicationName: string): CancelablePromise<FeatureToggleDto>;
34
+ static userApplications(): CancelablePromise<Array<AmplifyApplication>>;
35
+ }
@@ -0,0 +1 @@
1
+ import{OpenAPI_Portal as e,OpenAPI_Portal_Prod as r}from"../core/OpenAPI.js";import{request as t}from"../core/request.js";import"../models/TutorialPosition.js";import"../models/ServiceNowUrgency.js";class o{static createIncident(r){return t(e,{method:"POST",url:"/api/v1/ServiceNow/incident",body:r})}static fileUpload(r){return t(e,{method:"POST",url:"/api/v1/Slack/fileUpload",body:r})}static postmessage(r){return t(e,{method:"POST",url:"/api/v1/Slack/postmessage",body:r})}static getFeatureToggleFromApplicationName(e){return t(r,{method:"GET",url:"/api/v1/FeatureToggle/{applicationName}",path:{applicationName:e},errors:{400:"Bad Request",404:"Not Found",500:"Server Error"}})}static userApplications(){return t(e,{method:"GET",url:"/api/v1/AmplifyApplication/userapplications",errors:{400:"Bad Request",500:"Server Error"}})}}export{o as PortalService};
@@ -0,0 +1,28 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class ReleaseNotesService {
3
+ /**
4
+ * @param applicationName
5
+ * @param version
6
+ * @param tags
7
+ * @returns any Success
8
+ * @throws ApiError
9
+ */
10
+ static getReleasenoteList(applicationName?: string, version?: string, tags?: Array<string>): CancelablePromise<any>;
11
+ /**
12
+ * @returns any Success
13
+ * @throws ApiError
14
+ */
15
+ static getMyReleasenotes(): CancelablePromise<any>;
16
+ /**
17
+ * @param applicationName
18
+ * @param releaseId
19
+ * @returns any Success
20
+ * @throws ApiError
21
+ */
22
+ static getReleasenote(applicationName: string, releaseId: string): CancelablePromise<any>;
23
+ /**
24
+ * @returns string Success
25
+ * @throws ApiError
26
+ */
27
+ static getContainerSasUri(): CancelablePromise<string>;
28
+ }
@@ -0,0 +1 @@
1
+ import{OpenAPI_Portal as e}from"../core/OpenAPI.js";import{request as t}from"../core/request.js";class a{static getReleasenoteList(a,r,s){return t(e,{method:"GET",url:"/api/v1/ReleaseNotes",query:{applicationName:a,version:r,tags:s}})}static getMyReleasenotes(){return t(e,{method:"GET",url:"/api/v1/ReleaseNotes/myreleasenotes"})}static getReleasenote(a,r){return t(e,{method:"GET",url:"/api/v1/ReleaseNotes/{applicationName}/{releaseId}",path:{applicationName:a,releaseId:r}})}static getContainerSasUri(){return t(e,{method:"GET",url:"/api/v1/ReleaseNotes/GetContainerSasUri",errors:{401:"Unauthorized"}})}}export{a as ReleaseNotesService};
@@ -0,0 +1,12 @@
1
+ import type { Tutorial } from '../models/Tutorial';
2
+ import type { CancelablePromise } from '../core/CancelablePromise';
3
+ export declare class TutorialService {
4
+ /**
5
+ * Gets all tutorials for Application
6
+ * @param applicationName
7
+ * @returns Tutorial Success
8
+ * @throws ApiError
9
+ */
10
+ static getTutorialsForApplication(applicationName: string): CancelablePromise<Array<Tutorial>>;
11
+ static getTutorialSasToken(): CancelablePromise<string>;
12
+ }
@@ -0,0 +1 @@
1
+ import{OpenAPI_Portal_Prod as t}from"../core/OpenAPI.js";import{request as o}from"../core/request.js";class r{static getTutorialsForApplication(r){return o(t,{method:"GET",url:"/api/v1/Tutorial/{applicationName}",path:{applicationName:r}})}static getTutorialSasToken(){return o(t,{method:"GET",url:"/api/v1/Tutorial/SASToken"})}}export{r as TutorialService};
@@ -0,0 +1,9 @@
1
+ import { DetailedHTMLProps, FC, HTMLAttributes, ReactNode } from 'react';
2
+ interface FeatureProps {
3
+ featureKey: string;
4
+ children: ReactNode;
5
+ fallback?: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
6
+ showIfKeyMissing?: boolean;
7
+ }
8
+ export declare const Feature: FC<FeatureProps>;
9
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as r,Fragment as o}from"react/jsx-runtime";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/TutorialStepsProvider.js";import{useFeatureToggling as e}from"../../hooks/useFeatureToggling.js";import"@tanstack/react-query";import"../../api/core/OpenAPI.js";import"../../utils/auth_environment.js";import"react";import"@equinor/amplify-components";import"@microsoft/signalr";import"../../types/Environment.js";const t=({featureKey:t,children:i,fallback:s,showIfKeyMissing:n=!0})=>{const{showContent:p}=e(t,n);return r(o,p?{children:i}:{children:s??null})};export{t as Feature};
@@ -0,0 +1 @@
1
+ export { Feature } from './Feature/Feature';
@@ -0,0 +1,7 @@
1
+ import { useAuth } from '../providers/AuthProvider/AuthProvider';
2
+ import { useReleaseNotes } from '../providers/ReleaseNotesProvider';
3
+ import { useTutorialSteps } from '../providers/TutorialStepsProvider';
4
+ import { useFeatureToggling } from './useFeatureToggling';
5
+ import { useReleaseNotesQuery } from './useReleaseNotesQuery';
6
+ import { useSignalRMessages } from './useSignalRMessages';
7
+ export { useAuth, useFeatureToggling, useReleaseNotesQuery, useSignalRMessages, useTutorialSteps, useReleaseNotes, };
@@ -0,0 +1,3 @@
1
+ export declare function useFeatureToggling(featureKey: string, showIfKeyMissing?: boolean): {
2
+ showContent: boolean;
3
+ };
@@ -0,0 +1 @@
1
+ import{useMemo as r}from"react";import{useFeatureToggleContext as e,isUserInActiveUserArray as t}from"../providers/FeatureToggleProvider.js";import{useAuth as o}from"../providers/AuthProvider/AuthProvider.js";import{environment as n}from"../utils/auth_environment.js";const{getEnvironmentName:i}=n;function s(n,s){const m=s??!0,{account:u}=o(),a=`${u?.username}`,v=i(import.meta.env.VITE_ENVIRONMENT_NAME),{features:c,isError:f}=e(),p=c?.find((r=>r.featureKey===n));return{showContent:r((()=>p?!!t(a,p.activeUsers)||p.activeEnvironments.includes(v):!f&&m),[m,v,p,f,a])}}export{s as useFeatureToggling};
@@ -0,0 +1,6 @@
1
+ import { ReleaseNote } from '../api/models/ReleaseNote';
2
+ interface ReleaseNotesQueryProps {
3
+ enabled?: boolean;
4
+ }
5
+ export declare function useReleaseNotesQuery(options?: ReleaseNotesQueryProps): import("@tanstack/react-query").UseQueryResult<ReleaseNote[], Error>;
6
+ export {};
@@ -0,0 +1 @@
1
+ import{useQuery as e}from"@tanstack/react-query";import{ReleaseNotesService as t}from"../api/services/ReleaseNotesService.js";import{environment as r}from"../utils/auth_environment.js";const{getAppName:n}=r;function o(r){const o=n(import.meta.env.VITE_NAME);return e({queryKey:["get-all-release-notes"],queryFn:()=>t.getReleasenoteList(o),enabled:r?.enabled??!0})}export{o as useReleaseNotesQuery};
@@ -0,0 +1,12 @@
1
+ export declare function useSignalRMessages<T extends {
2
+ SequenceNumber?: number | null;
3
+ Read?: boolean | null;
4
+ Subject?: string | null;
5
+ }>(topic: string): {
6
+ messages: T[];
7
+ hasUnreadMessages: boolean;
8
+ setMessageAsRead: (message: T) => void;
9
+ setAllMessagesAsRead: () => void;
10
+ deleteMessage: (message: T) => Promise<void>;
11
+ closeConnection: () => Promise<void>;
12
+ };
@@ -0,0 +1 @@
1
+ import{useRef as e,useState as r,useMemo as n,useEffect as t}from"react";import{usePrevious as o}from"@equinor/amplify-components";import*as s from"@microsoft/signalr";import{LogLevel as i}from"@microsoft/signalr";import{useQuery as a}from"@tanstack/react-query";import{getPortalToken as c}from"../api/core/OpenAPI.js";import{EnvironmentType as u}from"../types/Environment.js";import{environment as m}from"../utils/auth_environment.js";function p(p){const d=e(void 0),[f,l]=r([]),[g,b]=r(),[v,w]=r(),{data:y}=a({queryKey:["get-amplify-portal-token"],queryFn:()=>c()}),E=n((()=>{const e=m.getEnvironmentName(import.meta.env.VITE_ENVIRONMENT_NAME);return`wss://api-amplify-portal-${e===u.LOCALHOST?u.DEVELOP:e}.radix.equinor.com`}),[]),N=o(p),S=o(y);t((()=>{(async function(){if(void 0===y||N===p&&S===y)return;void 0!==d.current&&N&&S&&(N!==p||S!==y)&&await d.current.stop();const e=(new s.HubConnectionBuilder).configureLogging(i.Error).withUrl(`${E}/hubs/notifications`,{accessTokenFactory:()=>y,withCredentials:!1,skipNegotiation:!0,transport:s.HttpTransportType.WebSockets}).withAutomaticReconnect().build();try{await e.start(),e.on("ActiveMessages",((e,r)=>{l(r.map((r=>({...r,Subject:e}))).reverse())})),e.onreconnected((()=>e.invoke("Subscribe",p))),e.on("NewMessage",((e,r)=>{l((n=>[{...r,Subject:e},...n]))})),e.on("UpdateMessage",((e,r)=>{w({...r,Subject:e})})),e.on("Delete",((e,r)=>{b(r)})),e.on("Error",(e=>{throw new Error("Connection error: "+e)})),await e.invoke("Subscribe",p),await e.invoke("PeekMessages")}catch(e){console.error("Connection failed",e)}d.current=e})().catch((e=>{console.error("Error setting up connection",e)}))}),[E,p,y,N,S]),t((()=>{if(v){const e=f.findIndex((e=>e.SequenceNumber===v.SequenceNumber)),r=[...f];e>-1&&(r[e]=v,l(r),w(void 0))}}),[v,f]),t((()=>{if(g){const e=f.findIndex((e=>e.SequenceNumber===g)),r=[...f];e>-1&&(r.splice(e,1),l(r),b(void 0))}}),[g,f]);const h=e=>{d.current&&(e.Read=!e.Read,d.current.invoke("PatchMessage",e.SequenceNumber,e).catch((e=>{console.error("Error setting message as read",e)})))},q=n((()=>f.some((e=>!1===e.Read))),[f]);return{messages:f,hasUnreadMessages:q,setMessageAsRead:h,setAllMessagesAsRead:()=>{f.forEach((e=>{e.Read||h(e)}))},deleteMessage:async function(e){d.current&&null!==e.SequenceNumber&&(await d.current.invoke("DeleteMessage",e.SequenceNumber),b(e.SequenceNumber))},closeConnection:async()=>{if(d.current)return await d.current.stop()}}}export{p as useSignalRMessages};
@@ -0,0 +1,5 @@
1
+ export * from './components';
2
+ export * from './hooks';
3
+ export * from './providers';
4
+ export * from './types';
5
+ export * from './utils';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export{Feature}from"./components/Feature/Feature.js";export{default as AuthProvider,useAuth}from"./providers/AuthProvider/AuthProvider.js";export{default as ReleaseNotesProvider,useReleaseNotes}from"./providers/ReleaseNotesProvider.js";export{default as TutorialStepsProvider,useTutorialSteps}from"./providers/TutorialStepsProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{useSignalRMessages}from"./hooks/useSignalRMessages.js";export{default as TutorialProvider}from"./providers/TutorialProvider/TutorialProvider.js";export{default as FeatureToggleProvider}from"./providers/FeatureToggleProvider.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";export{auth,environment}from"./utils/auth_environment.js";
@@ -0,0 +1 @@
1
+ var p={jumbo__base:"88px",default__base:"48px",default__input:"56px",compact__standard:"32px",compact__input:"44px"};export{p as clickbounds};
@@ -0,0 +1 @@
1
+ var a={text:{static_icons__default:{hex:"#3d3d3d",hsla:"hsla(0, 0%, 23.9%, 1)",rgba:"var(--eds_text__static_icons__default, rgba(61, 61, 61, 1))"},static_icons__secondary:{hex:"#565656",hsla:"hsla(0, 0%, 33.7%, 1)",rgba:"var(--eds_text__static_icons__secondary, rgba(86, 86, 86, 1))"},static_icons__tertiary:{hex:"#6f6f6f",hsla:"hsla(0, 0%, 43.5%, 1)",rgba:"var(--eds_text__static_icons__tertiary, rgba(111, 111, 111, 1))"},static_icons__primary_white:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 1)",rgba:"var(--eds_text__static_icons__primary_white, rgba(255, 255, 255, 1))"}},ui:{background__default:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 1)",rgba:"var(--eds_ui_background__default, rgba(255, 255, 255, 1))"},background__semitransparent:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 0.2)",rgba:"var(--eds_ui_background__semitransparent, rgba(255, 255, 255, 0.2))"},background__light:{hex:"#f7f7f7",hsla:"hsla(0, 0%, 96.9%, 1)",rgba:"var(--eds_ui_background__light, rgba(247, 247, 247, 1))"},background__scrim:{hex:"#000000",hsla:"hsla(0, 0%, 0%, 0.4)",rgba:"var(--eds_ui_background__scrim, rgba(0, 0, 0, 0.4))"},background__overlay:{hex:"#000000",hsla:"hsla(0, 0%, 0%, 0.8)",rgba:"var(--eds_ui_background__overlay, rgba(0, 0, 0, 0.8))"},background__medium:{hex:"#dcdcdc",hsla:"hsla(0, 0%, 86.3%, 1)",rgba:"var(--eds_ui_background__medium, rgba(220, 220, 220, 1))"},background__info:{hex:"#d5eaf4",hsla:"hsla(199, 58.5%, 89.6%, 1)",rgba:"var(--eds_ui_background__info, rgba(213, 234, 244, 1))"},background__warning:{hex:"#ffe7d6",hsla:"hsla(25, 100%, 92%, 1)",rgba:"var(--eds_ui_background__warning, rgba(255, 231, 214, 1))"},background__danger:{hex:"#ffc1c1",hsla:"hsla(0, 100%, 87.8%, 1)",rgba:"var(--eds_ui_background__danger, rgba(255, 193, 193, 1))"}},infographic:{substitute__purple_berry:{hex:"#8c1159",hsla:"hsla(325, 78.3%, 30.8%, 1)",rgba:"var(--eds_infographic_substitute__purple_berry, rgba(140, 17, 89, 1))"},substitute__pink_rose:{hex:"#e24973",hsla:"hsla(344, 72.5%, 58.6%, 1)",rgba:"var(--eds_infographic_substitute__pink_rose, rgba(226, 73, 115, 1))"},substitute__pink_salmon:{hex:"#ff92a8",hsla:"hsla(348, 100%, 78.6%, 1)",rgba:"var(--eds_infographic_substitute__pink_salmon, rgba(255, 146, 168, 1))"},substitute__green_cucumber:{hex:"#005f57",hsla:"hsla(175, 100%, 18.6%, 1)",rgba:"var(--eds_infographic_substitute__green_cucumber, rgba(0, 95, 87, 1))"},substitute__green_succulent:{hex:"#00977b",hsla:"hsla(169, 100%, 29.6%, 1)",rgba:"var(--eds_infographic_substitute__green_succulent, rgba(0, 151, 123, 1))"},substitute__green_mint:{hex:"#40d38f",hsla:"hsla(152, 62.6%, 53.9%, 1)",rgba:"var(--eds_infographic_substitute__green_mint, rgba(64, 211, 143, 1))"},substitute__blue_ocean:{hex:"#004088",hsla:"hsla(212, 100%, 26.7%, 1)",rgba:"var(--eds_infographic_substitute__blue_ocean, rgba(0, 64, 136, 1))"},substitute__blue_overcast:{hex:"#0084c4",hsla:"hsla(200, 100%, 38.4%, 1)",rgba:"var(--eds_infographic_substitute__blue_overcast, rgba(0, 132, 196, 1))"},substitute__blue_sky:{hex:"#52c0ff",hsla:"hsla(202, 100%, 66.1%, 1)",rgba:"var(--eds_infographic_substitute__blue_sky, rgba(82, 192, 255, 1))"},primary__moss_green_100:{hex:"#007079",hsla:"hsla(184, 100%, 23.7%, 1)",rgba:"var(--eds_infographic_primary__moss_green_100, rgba(0, 112, 121, 1))"},primary__moss_green_55:{hex:"#73b1b5",hsla:"hsla(184, 30.8%, 58%, 1)",rgba:"var(--eds_infographic_primary__moss_green_55, rgba(115, 177, 181, 1))"},primary__moss_green_34:{hex:"#a8ced1",hsla:"hsla(184, 30.8%, 73.9%, 1)",rgba:"var(--eds_infographic_primary__moss_green_34, rgba(168, 206, 209, 1))"},primary__moss_green_21:{hex:"#c9e0e2",hsla:"hsla(185, 30.1%, 83.7%, 1)",rgba:"var(--eds_infographic_primary__moss_green_21, rgba(201, 224, 226, 1))"},primary__moss_green_13:{hex:"#deedee",hsla:"hsla(184, 32%, 90.2%, 1)",rgba:"var(--eds_infographic_primary__moss_green_13, rgba(222, 237, 238, 1))"},primary__energy_red_100:{hex:"#eb0037",hsla:"hsla(346, 100%, 46.1%, 1)",rgba:"var(--eds_infographic_primary__energy_red_100, rgba(235, 0, 55, 1))"},primary__energy_red_55:{hex:"#ff7d98",hsla:"hsla(348, 100%, 74.5%, 1)",rgba:"var(--eds_infographic_primary__energy_red_55, rgba(255, 125, 152, 1))"},primary__energy_red_34:{hex:"#ffaebf",hsla:"hsla(347, 100%, 84.1%, 1)",rgba:"var(--eds_infographic_primary__energy_red_34, rgba(255, 174, 191, 1))"},primary__energy_red_21:{hex:"#ffcdd7",hsla:"hsla(348, 100%, 90.2%, 1)",rgba:"var(--eds_infographic_primary__energy_red_21, rgba(255, 205, 215, 1))"},primary__energy_red_13:{hex:"#ffe0e7",hsla:"hsla(346, 100%, 93.9%, 1)",rgba:"var(--eds_infographic_primary__energy_red_13, rgba(255, 224, 231, 1))"},primary__weathered_red:{hex:"#7d0023",hsla:"hsla(343, 100%, 24.5%, 1)",rgba:"var(--eds_infographic_primary__weathered_red, rgba(125, 0, 35, 1))"},primary__slate_blue:{hex:"#243746",hsla:"hsla(206, 32.1%, 20.8%, 1)",rgba:"var(--eds_infographic_primary__slate_blue, rgba(36, 55, 70, 1))"},primary__spruce_wood:{hex:"#ffe7d6",hsla:"hsla(25, 100%, 92%, 1)",rgba:"var(--eds_infographic_primary__spruce_wood, rgba(255, 231, 214, 1))"},primary__mist_blue:{hex:"#d5eaf4",hsla:"hsla(199, 58.5%, 89.6%, 1)",rgba:"var(--eds_infographic_primary__mist_blue, rgba(213, 234, 244, 1))"},primary__lichen_green:{hex:"#e6faec",hsla:"hsla(138, 66.7%, 94.1%, 1)",rgba:"var(--eds_infographic_primary__lichen_green, rgba(230, 250, 236, 1))"}},logo:{fill_positive:{hex:"#eb0037",hsla:"hsla(346, 100%, 46.1%, 1)",rgba:"var(--eds_logo__fill_positive, rgba(235, 0, 55, 1))"},fill_negative:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 1)",rgba:"var(--eds_logo__fill_negative, rgba(255, 255, 255, 1))"}},interactive:{primary__selected_highlight:{hex:"#e6faec",hsla:"hsla(138, 66.7%, 94.1%, 1)",rgba:"var(--eds_interactive_primary__selected_highlight, rgba(230, 250, 236, 1))"},primary__selected_hover:{hex:"#c3f3d2",hsla:"hsla(139, 66.7%, 85.9%, 1)",rgba:"var(--eds_interactive_primary__selected_hover, rgba(195, 243, 210, 1))"},primary__resting:{hex:"#007079",hsla:"hsla(184, 100%, 23.7%, 1)",rgba:"var(--eds_interactive_primary__resting, rgba(0, 112, 121, 1))"},primary__hover:{hex:"#004f55",hsla:"hsla(184, 100%, 16.7%, 1)",rgba:"var(--eds_interactive_primary__hover, rgba(0, 79, 85, 1))"},primary__hover_alt:{hex:"#deedee",hsla:"hsla(184, 32%, 90.2%, 1)",rgba:"var(--eds_interactive_primary__hover_alt, rgba(222, 237, 238, 1))"},secondary__highlight:{hex:"#d5eaf4",hsla:"hsla(199, 58.5%, 89.6%, 1)",rgba:"var(--eds_interactive_secondary__highlight, rgba(213, 234, 244, 1))"},secondary__resting:{hex:"#243746",hsla:"hsla(206, 32.1%, 20.8%, 1)",rgba:"var(--eds_interactive_secondary__resting, rgba(36, 55, 70, 1))"},secondary__link_hover:{hex:"#17242f",hsla:"hsla(208, 34.3%, 13.7%, 1)",rgba:"var(--eds_interactive_secondary__link_hover, rgba(23, 36, 47, 1))"},danger__highlight:{hex:"#ffc1c1",hsla:"hsla(0, 100%, 87.8%, 1)",rgba:"var(--eds_interactive_danger__highlight, rgba(255, 193, 193, 1))"},danger__resting:{hex:"#eb0000",hsla:"hsla(0, 100%, 46.1%, 1)",rgba:"var(--eds_interactive_danger__resting, rgba(235, 0, 0, 1))"},danger__hover:{hex:"#b30d2f",hsla:"hsla(348, 86.5%, 37.6%, 1)",rgba:"var(--eds_interactive_danger__hover, rgba(179, 13, 47, 1))"},danger__text:{hex:"#b30d2f",hsla:"hsla(348, 86.5%, 37.6%, 1)",rgba:"var(--eds_interactive_danger__text, rgba(179, 13, 47, 1))"},warning__highlight:{hex:"#ffe7d6",hsla:"hsla(25, 100%, 92%, 1)",rgba:"var(--eds_interactive_warning__highlight, rgba(255, 231, 214, 1))"},warning__resting:{hex:"#ff9200",hsla:"hsla(34, 100%, 50%, 1)",rgba:"var(--eds_interactive_warning__resting, rgba(255, 146, 0, 1))"},warning__hover:{hex:"#ad6200",hsla:"hsla(34, 100%, 33.9%, 1)",rgba:"var(--eds_interactive_warning__hover, rgba(173, 98, 0, 1))"},warning__text:{hex:"#ad6200",hsla:"hsla(34, 100%, 33.9%, 1)",rgba:"var(--eds_interactive_warning__text, rgba(173, 98, 0, 1))"},success__highlight:{hex:"#e6faec",hsla:"hsla(138, 66.7%, 94.1%, 1)",rgba:"var(--eds_interactive_success__highlight, rgba(230, 250, 236, 1))"},success__resting:{hex:"#4bb748",hsla:"hsla(118, 43.5%, 50%, 1)",rgba:"var(--eds_interactive_success__resting, rgba(75, 183, 72, 1))"},success__hover:{hex:"#358132",hsla:"hsla(118, 44.1%, 35.1%, 1)",rgba:"var(--eds_interactive_success__hover, rgba(53, 129, 50, 1))"},success__text:{hex:"#358132",hsla:"hsla(118, 44.1%, 35.1%, 1)",rgba:"var(--eds_interactive_success__text, rgba(53, 129, 50, 1))"},table__cell__fill_resting:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 1)",rgba:"var(--eds_interactive_table__cell__fill_resting, rgba(255, 255, 255, 1))"},table__cell__fill_hover:{hex:"#eaeaea",hsla:"hsla(0, 0%, 91.8%, 1)",rgba:"var(--eds_interactive_table__cell__fill_hover, rgba(234, 234, 234, 1))"},table__cell__fill_activated:{hex:"#e6faec",hsla:"hsla(138, 66.7%, 94.1%, 1)",rgba:"var(--eds_interactive_table__cell__fill_activated, rgba(230, 250, 236, 1))"},table__header__fill_activated:{hex:"#eaeaea",hsla:"hsla(0, 0%, 91.8%, 1)",rgba:"var(--eds_interactive_table__header__fill_activated, rgba(234, 234, 234, 1))"},table__header__fill_hover:{hex:"#dcdcdc",hsla:"hsla(0, 0%, 86.3%, 1)",rgba:"var(--eds_interactive_table__header__fill_hover, rgba(220, 220, 220, 1))"},table__header__fill_resting:{hex:"#f7f7f7",hsla:"hsla(0, 0%, 96.9%, 1)",rgba:"var(--eds_interactive_table__header__fill_resting, rgba(247, 247, 247, 1))"},disabled__text:{hex:"#bebebe",hsla:"hsla(0, 0%, 74.5%, 1)",rgba:"var(--eds_interactive__disabled__text, rgba(190, 190, 190, 1))"},text_highlight:{hex:"#d5eaf4",hsla:"hsla(199, 58.5%, 89.6%, 1)",rgba:"var(--eds_interactive__text_highlight, rgba(213, 234, 244, 1))"},focus:{hex:"#007079",hsla:"hsla(184, 100%, 23.7%, 1)",rgba:"var(--eds_interactive__focus, rgba(0, 112, 121, 1))"},disabled__border:{hex:"#dcdcdc",hsla:"hsla(0, 0%, 86.3%, 1)",rgba:"var(--eds_interactive__disabled__border, rgba(220, 220, 220, 1))"},disabled__fill:{hex:"#eaeaea",hsla:"hsla(0, 0%, 91.8%, 1)",rgba:"var(--eds_interactive__disabled__fill, rgba(234, 234, 234, 1))"},link_on_interactive_colors:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 1)",rgba:"var(--eds_interactive__link_on_interactive_colors, rgba(255, 255, 255, 1))"},icon_on_interactive_colors:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 1)",rgba:"var(--eds_interactive__icon_on_interactive_colors, rgba(255, 255, 255, 1))"},link_in_snackbars:{hex:"#97cace",hsla:"hsla(184, 35.9%, 70%, 1)",rgba:"var(--eds_interactive__link_in_snackbars, rgba(151, 202, 206, 1))"},pressed_overlay_dark:{hex:"#000000",hsla:"hsla(0, 0%, 0%, 0.2)",rgba:"var(--eds_interactive__pressed_overlay_dark, rgba(0, 0, 0, 0.2))"},pressed_overlay_light:{hex:"#ffffff",hsla:"hsla(0, 0%, 100%, 0.2)",rgba:"var(--eds_interactive__pressed_overlay_light, rgba(255, 255, 255, 0.2))"}}};export{a as colors};
@@ -0,0 +1 @@
1
+ var p={raised:"0 1px 5px rgba(0, 0, 0, 0.2),0 3px 4px rgba(0, 0, 0, 0.12),0 2px 4px rgba(0, 0, 0, 0.14)",none:"0 0 1px rgba(0, 0, 0, 0.14)",overlay:"0 1px 10px rgba(0, 0, 0, 0.2),0 4px 5px rgba(0, 0, 0, 0.12),0 2px 4px rgba(0, 0, 0, 0.14)",sticky:"0 4px 5px rgba(0, 0, 0, 0.2),0 3px 14px rgba(0, 0, 0, 0.12),0 8px 10px rgba(0, 0, 0, 0.14)",temporary_nav:"0 7px 8px rgba(0, 0, 0, 0.2),0 5px 22px rgba(0, 0, 0, 0.12),0 12px 17px rgba(0, 0, 0, 0.14)",above_scrim:"0 11px 15px rgba(0, 0, 0, 0.2),0 9px 46px rgba(0, 0, 0, 0.12),0 24px 38px rgba(0, 0, 0, 0.14)"};export{p as elevation};
@@ -0,0 +1 @@
1
+ import{clickbounds as o}from"./clickbounds.js";import{colors as r}from"./colors.js";import{elevation as s}from"./elevation.js";import{interactions as i}from"./interactions.js";import{shape as p}from"./shape.js";import{typography as t}from"./typography.js";import{spacings as m}from"./spacings.js";var a={clickbounds:o,colors:r,elevation:s,interactions:i,shape:p,typography:t,spacings:m};export{a as tokens};
@@ -0,0 +1 @@
1
+ var e={_modes:{compact:{pressed_dark_overlay:{blendMode:"pass_through",pressedColor:"transparent"},focused:{style:"dashed",color:"rgba(0, 112, 121, 1)",width:"2px"},pressed_light_overlay:{blendMode:"pass_through",pressedColor:"rgba(255, 255, 255, 1)"}}},pressed_dark_overlay:{blendMode:"darken",pressedColor:"rgba(0, 0, 0, 0.2)"},focused:{style:"dashed",color:"rgba(0, 112, 121, 1)",width:"2px"},pressed_light_overlay:{blendMode:"pass_through",pressedColor:"rgba(255, 255, 255, 0.2)"}};export{e as interactions};
@@ -0,0 +1 @@
1
+ var i={_modes:{compact:{rounded:{minHeight:"24px",minWidth:"80px",borderRadius:"100px"},button:{minHeight:"24px",minWidth:"112px",borderRadius:"4px"},toggle:{minHeight:"24px",minWidth:"112px",borderRadius:"4px"},corners:{minHeight:"24px",minWidth:"112px",borderRadius:"4px"},icon_button:{minHeight:"32px",minWidth:"32px",borderRadius:"100px"},straight:{minHeight:"24px",minWidth:"112px",borderRadius:""},toggle_rounded_border:{minHeight:"24px",minWidth:"2px",borderRadius:""},toggle_straight_border:{minHeight:"24px",minWidth:"2px",borderRadius:""},circle:{minHeight:"24px",minWidth:"24px",borderRadius:"100px"}}},toggle_straight_border:{minHeight:"36px",minWidth:"4px",borderRadius:""},toggle_rounded_border:{minHeight:"36px",minWidth:"4px",borderRadius:""},circle:{minHeight:"40px",minWidth:"40px",borderRadius:"100px"},rounded:{minHeight:"40px",minWidth:"80px",borderRadius:"100px"},button:{minHeight:"36px",minWidth:"112px",borderRadius:"4px"},toggle:{minHeight:"36px",minWidth:"112px",borderRadius:"4px"},corners:{minHeight:"36px",minWidth:"112px",borderRadius:"4px"},icon_button:{minHeight:"40px",minWidth:"40px",borderRadius:"100px"},field:{minHeight:"56px",minWidth:"294px",borderRadius:""},straight:{minHeight:"36px",minWidth:"112px",borderRadius:""},caret:{minHeight:"8px",minWidth:"6px",borderRadius:""}};export{i as shape};
@@ -0,0 +1 @@
1
+ var x={comfortable:{xxx_large:"48px",xx_large:"40px",x_large:"32px",large:"24px",medium:"16px",medium_small:"12px",small:"8px",x_small:"4px",xx_small:"2px"}};export{x as spacings};
@@ -0,0 +1 @@
1
+ var e={heading:{h1_bold:{color:"var(--eds_heading__h1_bold_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"2.000rem",fontWeight:700,lineHeight:"1.250em",textAlign:"left"},h1:{color:"var(--eds_heading__h1_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"2.000rem",fontWeight:400,lineHeight:"1.250em",textAlign:"left"},h2:{color:"var(--eds_heading__h2_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.750rem",fontWeight:400,lineHeight:"1.250em",textAlign:"left"},h3:{color:"var(--eds_heading__h3_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.500rem",fontWeight:400,lineHeight:"1.250em",textAlign:"left"},h4:{color:"var(--eds_heading__h4_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.250rem",fontWeight:400,lineHeight:"1.600em",textAlign:"left"},h5:{color:"var(--eds_heading__h5_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.125rem",fontWeight:500,letterSpacing:"0.013em",lineHeight:"1.333em",textAlign:"left"},h6:{color:"var(--eds_heading__h6_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:500,letterSpacing:"0.013em",lineHeight:"1.500em",textAlign:"left"}},navigation:{menu_title:{color:"var(--eds_navigation__menu_title_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,letterSpacing:"0.013em",lineHeight:"1.000em",textAlign:"left"},menu_tabs:{color:"var(--eds_navigation__menu_tabs_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:500,letterSpacing:"0.013em",lineHeight:"1.000em",textAlign:"left"},label:{color:"var(--eds_navigation__label_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,lineHeight:"1.333em",textAlign:"left"},drawer_active:{color:"var(--eds_navigation__drawer_active_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:700,letterSpacing:"0.006em",lineHeight:"1.000em",textAlign:"left"},drawer_inactive:{color:"var(--eds_navigation__drawer_inactive_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:500,letterSpacing:"0.013em",lineHeight:"1.000em",textAlign:"left"},button:{color:"var(--eds_navigation__button_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textAlign:"left"},breadcrumb:{color:"var(--eds_navigation__breadcrumb_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textAlign:"left"},breadcrumb_hover:{color:"var(--eds_navigation__breadcrumb_hover_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textDecoration:"underline",textAlign:"left"},menu_title_hover:{color:"var(--eds_navigation__menu_title_hover_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,letterSpacing:"0.013em",lineHeight:"1.000em",textAlign:"left"}},input:{label:{color:"var(--eds_input__label_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,lineHeight:"1.333em",textAlign:"left"},text:{color:"var(--eds_input__text_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,letterSpacing:"0.025em",lineHeight:"1.500em",textAlign:"left"},text_monospaced:{fontFeature:"'tnum' on,'lnum' on",color:"var(--eds_input__text_monospaced_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,letterSpacing:"0.063em",lineHeight:"1.500em",textAlign:"left"},helper:{color:"var(--eds_input__helper_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,letterSpacing:"0.013em",lineHeight:"1.333em",textAlign:"left"}},paragraph:{body_short_italic:{color:"var(--eds_paragraph__body_short_italic_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,lineHeight:"1.250em",fontStyle:"italic",textAlign:"left"},caption:{color:"var(--eds_paragraph__caption_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textAlign:"left"},meta:{color:"var(--eds_paragraph__meta_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.625rem",fontWeight:500,lineHeight:"1.600em",textAlign:"left"},body_short:{color:"var(--eds_paragraph__body_short_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,lineHeight:"1.250em",textAlign:"left"},body_short_bold_italic:{color:"var(--eds_paragraph__body_short_bold_italic_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:700,lineHeight:"1.250em",fontStyle:"italic",textAlign:"left"},body_short_bold:{color:"var(--eds_paragraph__body_short_bold_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:700,lineHeight:"1.250em",textAlign:"left"},body_short_link:{color:"var(--eds_paragraph__body_short_link_color, rgba(0, 112, 121, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,lineHeight:"1.250em",textDecoration:"underline",textAlign:"left"},overline:{color:"var(--eds_paragraph__overline_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.625rem",fontWeight:500,letterSpacing:"0.069em",lineHeight:"1.600em",textTransform:"uppercase",textAlign:"left"},ingress:{color:"var(--eds_paragraph__ingress_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.125rem",fontWeight:400,lineHeight:"1.333em",textAlign:"left"},body_long:{color:"var(--eds_paragraph__body_long_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,lineHeight:"1.500em",textAlign:"left"},body_long_link:{color:"var(--eds_paragraph__body_long_link_color, rgba(0, 112, 121, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,lineHeight:"1.500em",textDecoration:"underline",textAlign:"left"},body_long_italic:{color:"var(--eds_paragraph__body_long_italic_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:400,lineHeight:"1.500em",fontStyle:"italic",textAlign:"left"},body_long_bold:{color:"var(--eds_paragraph__body_long_bold_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:700,lineHeight:"1.500em",textAlign:"left"},body_long_bold_italic:{color:"var(--eds_paragraph__body_long_bold_italic_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:700,lineHeight:"1.500em",fontStyle:"italic",textAlign:"left"}},table:{cell_header:{color:"var(--eds_table__cell_header_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:700,lineHeight:"1.429em",textAlign:"left"},cell_text:{color:"var(--eds_table__cell_text_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.429em",textAlign:"left"},cell_text_bold:{color:"var(--eds_table__cell_text_bold_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:700,lineHeight:"1.429em",textAlign:"left"},cell_text_link:{color:"var(--eds_table__cell_text_link_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.429em",textDecoration:"underline",textAlign:"left"},cell_numeric_monospaced:{fontFeature:"'tnum' on,'lnum' on",color:"var(--eds_table__cell_numeric_monospaced_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.429em",textAlign:"left"}},_modes:{compact:{table:{cell_header:{color:"var(--eds_table__cell_header_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:700,lineHeight:"1.143em",textAlign:"left"},cell_text:{color:"var(--eds_table__cell_text_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textAlign:"left"},cell_text_bold:{color:"var(--eds_table__cell_text_bold_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:700,lineHeight:"1.143em",textAlign:"left"},cell_text_link:{color:"var(--eds_table__cell_text_link_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textDecoration:"underline",textAlign:"left"},cell_numeric_monospaced:{fontFeature:"'tnum' on,'lnum' on",color:"var(--eds_table__cell_numeric_monospaced_color, rgba(0, 0, 0, 1))",fontFamily:"Equinor",fontSize:"0.875rem",fontWeight:500,lineHeight:"1.143em",textAlign:"left"}}}},ui:{tooltip:{color:"var(--eds_ui__tooltip_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,lineHeight:"1.333em",textAlign:"left"},snackbar:{color:"var(--eds_ui__snackbar_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,lineHeight:"1.333em",textAlign:"left"},accordion_header:{color:"var(--eds_ui__accordion_header_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"1.000rem",fontWeight:500,lineHeight:"1.500em",textAlign:"left"},chip__badge:{color:"var(--eds_ui__chip__badge_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,lineHeight:"1.333em",textAlign:"left"},chart:{color:"var(--eds_ui__chart_color, rgba(61, 61, 61, 1))",fontFamily:"Equinor",fontSize:"0.750rem",fontWeight:500,lineHeight:"1.333em",textAlign:"left"}}};export{e as typography};
@@ -0,0 +1,17 @@
1
+ import { FC, ReactElement, ReactNode } from 'react';
2
+ import { AccountInfo } from '@azure/msal-browser';
3
+ export type AuthState = 'loading' | 'authorized' | 'unauthorized';
4
+ export interface AuthContextType {
5
+ account: AccountInfo | undefined;
6
+ photo: string | undefined;
7
+ roles: string[] | undefined;
8
+ logout: () => void;
9
+ }
10
+ export declare const useAuth: () => AuthContextType;
11
+ interface AuthProviderProps {
12
+ children: ReactNode;
13
+ loadingComponent?: ReactElement;
14
+ unauthorizedComponent?: ReactElement;
15
+ }
16
+ declare const AuthProvider: FC<AuthProviderProps>;
17
+ export default AuthProvider;