@entur-partner/common 9.3.2 → 9.3.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/ActionBar.d.ts +2 -2
  2. package/dist/AuditInfo.d.ts +3 -3
  3. package/dist/Box.d.ts +15 -14
  4. package/dist/Breadcrumbs.d.ts +2 -2
  5. package/dist/ConfirmModal.d.ts +4 -3
  6. package/dist/Content.d.ts +4 -3
  7. package/dist/EnturPartnerLogo.d.ts +6 -5
  8. package/dist/ErrorBoundary.d.ts +1 -1
  9. package/dist/ExpandableMultiLanguageInput.d.ts +4 -4
  10. package/dist/FeatureToggle.d.ts +1 -1
  11. package/dist/FormatCurrencyAmount.d.ts +4 -3
  12. package/dist/FormatDateTime.d.ts +1 -1
  13. package/dist/LanguageSelect.d.ts +4 -4
  14. package/dist/Link.d.ts +2 -2
  15. package/dist/LinkButton.d.ts +3 -3
  16. package/dist/Menu.d.ts +4 -3
  17. package/dist/MultiLanguageInput.d.ts +5 -5
  18. package/dist/OrganisationDropdown.d.ts +2 -2
  19. package/dist/PageTitle.d.ts +1 -1
  20. package/dist/Pager.d.ts +1 -1
  21. package/dist/PermissionCheck.d.ts +2 -2
  22. package/dist/RouteLeavingGuard.d.ts +3 -3
  23. package/dist/Stack.d.ts +3 -2
  24. package/dist/StatusLabel.d.ts +2 -2
  25. package/dist/Text.d.ts +7 -6
  26. package/dist/Unbutton.d.ts +4 -4
  27. package/dist/UserMenu/components/CookieSettingsMenuItem.d.ts +2 -2
  28. package/dist/UserMenu/components/CustomOverflowMenu.d.ts +3 -3
  29. package/dist/UserMenu/components/CustomOverflowMenuItem.d.ts +2 -2
  30. package/dist/UserMenu/components/LanguageSwitchMenuItem.d.ts +2 -2
  31. package/dist/UserMenu/components/LogOutMenuItem.d.ts +2 -2
  32. package/dist/UserMenu/components/UserMenuItem.d.ts +2 -2
  33. package/dist/UserMenu/components/VersionMenuItem.d.ts +1 -1
  34. package/dist/UserMenu/index.d.ts +3 -3
  35. package/dist/UserMenu/useOutsideClick.d.ts +1 -1
  36. package/dist/common.cjs.development.js +793 -793
  37. package/dist/common.cjs.development.js.map +1 -1
  38. package/dist/common.cjs.production.min.js +1 -1
  39. package/dist/common.cjs.production.min.js.map +1 -1
  40. package/dist/common.esm.js +789 -789
  41. package/dist/common.esm.js.map +1 -1
  42. package/dist/index.d.ts +30 -30
  43. package/dist/styles.css +180 -180
  44. package/dist/useEventListener.d.ts +1 -3
  45. package/package.json +62 -62
  46. package/dist/helpers.d.ts +0 -1
@@ -1,5 +1,5 @@
1
- import './ActionBar.scss';
2
- import React, { ReactNode } from 'react';
1
+ import "./ActionBar.scss";
2
+ import React, { type ReactNode } from "react";
3
3
  export interface ActionBarProps {
4
4
  children: ReactNode;
5
5
  }
@@ -1,5 +1,5 @@
1
- import './AuditInfo.scss';
2
- import { FC } from 'react';
1
+ import "./AuditInfo.scss";
2
+ import { type FC } from "react";
3
3
  interface Item {
4
4
  label: string;
5
5
  value: Date | string;
@@ -8,7 +8,7 @@ export interface AuditInfoProps {
8
8
  items: Item[];
9
9
  locale: string;
10
10
  className?: string;
11
- [key: string]: any;
11
+ [key: string]: object | string | number | boolean | undefined;
12
12
  }
13
13
  export declare const AuditInfo: FC<AuditInfoProps>;
14
14
  export {};
package/dist/Box.d.ts CHANGED
@@ -1,16 +1,17 @@
1
- import './Box.scss';
2
- import React, { ReactNode } from 'react';
3
- type StyleSpacing = 'none' | 'extraSmall2' | 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'extraLarge2' | 'extraLarge3' | 'extraLarge4' | 'extraLarge5' | 'extraLarge6' | 'extraLarge7' | 'extraLarge8' | 'extraLarge9';
4
- type StyleMargin = StyleSpacing | 'auto';
5
- type StyleDisplay = 'block' | 'flex' | 'inline' | 'inline-block';
6
- type StyleJustifyContent = 'center' | 'space-between' | 'start' | 'end';
7
- type StyleAlignItems = 'center' | 'start' | 'end' | 'stretch' | 'baseline';
8
- type StyleMaxWidth = 'none' | 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'extraLarge2' | 'extraLarge3' | 'extraLarge4' | 'extraLarge5' | 'extraLarge6' | 'full';
9
- type StyleWidth = 'auto' | 'full';
10
- export type StyleBackground = 'blue' | 'lavender' | 'white' | 'blue70';
11
- export type StyleColor = 'blue' | 'lavender' | 'white' | 'black';
12
- type StyleFlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
13
- type StyleFlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
1
+ import "./Box.scss";
2
+ import type { ReactNode } from "react";
3
+ import React from "react";
4
+ type StyleSpacing = "none" | "extraSmall2" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "extraLarge7" | "extraLarge8" | "extraLarge9";
5
+ type StyleMargin = StyleSpacing | "auto";
6
+ type StyleDisplay = "block" | "flex" | "inline" | "inline-block";
7
+ type StyleJustifyContent = "center" | "space-between" | "start" | "end";
8
+ type StyleAlignItems = "center" | "start" | "end" | "stretch" | "baseline";
9
+ type StyleMaxWidth = "none" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "full";
10
+ type StyleWidth = "auto" | "full";
11
+ export type StyleBackground = "blue" | "lavender" | "white" | "blue70";
12
+ export type StyleColor = "blue" | "lavender" | "white" | "black";
13
+ type StyleFlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
14
+ type StyleFlexWrap = "wrap" | "nowrap" | "wrap-reverse";
14
15
  export type ResponsiveStyleSpacing = StyleSpacing | [StyleSpacing?, StyleSpacing?, StyleSpacing?];
15
16
  export type ResponsiveStyleMargin = StyleMargin | [StyleMargin?, StyleMargin?, StyleMargin?];
16
17
  export type ResponsiveStyleDisplay = StyleDisplay | [StyleDisplay?, StyleDisplay?, StyleDisplay?];
@@ -23,7 +24,7 @@ export type ResponsiveStyleFlexWrap = StyleFlexWrap | [StyleFlexWrap?, StyleFlex
23
24
  export interface BoxProps {
24
25
  className?: string;
25
26
  as?: React.ElementType;
26
- [key: string]: any;
27
+ [key: string]: object | string | number | boolean | undefined | ReactNode;
27
28
  children: ReactNode;
28
29
  contrast?: boolean;
29
30
  paddingTop?: ResponsiveStyleSpacing;
@@ -1,5 +1,5 @@
1
- import './Breadcrumbs.scss';
2
- import { FC, ReactElement } from 'react';
1
+ import "./Breadcrumbs.scss";
2
+ import { type FC, type ReactElement } from "react";
3
3
  export interface BreadcrumbsProps {
4
4
  pathname: string;
5
5
  onBreadcrumbLookup: (path: string) => string | undefined;
@@ -1,6 +1,7 @@
1
- import './ConfirmModal.scss';
2
- import React, { ReactNode, FC } from 'react';
3
- import { ModalProps } from '@entur/modal';
1
+ import "./ConfirmModal.scss";
2
+ import { type ModalProps } from "@entur/modal";
3
+ import type { FC, ReactNode } from "react";
4
+ import React from "react";
4
5
  export interface BaseConfirmModalProps extends Partial<ModalProps> {
5
6
  title: string;
6
7
  children: React.ReactNode;
package/dist/Content.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import './Content.scss';
2
- import React, { FC, ReactNode } from 'react';
1
+ import "./Content.scss";
2
+ import type { FC, ReactNode } from "react";
3
+ import React from "react";
3
4
  interface ContentProps {
4
5
  children: ReactNode;
5
- as?: 'main' | React.ElementType;
6
+ as?: "main" | React.ElementType;
6
7
  className?: string;
7
8
  }
8
9
  export declare const Content: FC<ContentProps>;
@@ -1,16 +1,17 @@
1
- import './EnturPartnerLogo.scss';
2
- import React, { FC } from 'react';
3
- import { Environment } from './environment';
1
+ import "./EnturPartnerLogo.scss";
2
+ import type { FC } from "react";
3
+ import React from "react";
4
+ import { Environment } from "./environment";
4
5
  interface LogoProps {
5
6
  title: string;
6
7
  className?: string;
7
8
  accentColor?: string;
8
- [key: string]: any;
9
+ [key: string]: object | string | number | boolean | undefined;
9
10
  }
10
11
  export declare const EnturPartnerLogoSvg: FC<LogoProps>;
11
12
  interface EnturPartnerLogoProps {
12
13
  altText: string;
13
- as?: 'div' | React.ElementType;
14
+ as?: "div" | React.ElementType;
14
15
  className?: string;
15
16
  environment?: Environment;
16
17
  }
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, Component, ErrorInfo } from 'react';
1
+ import React, { Component, type ErrorInfo, type ReactNode } from "react";
2
2
  type FallbackOptions = {
3
3
  retry: () => void;
4
4
  error: Error;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { VariantType } from '@entur/form';
3
- import { LanguageKey, LanguageOption } from './LanguageSelect';
1
+ import type { VariantType } from "@entur/form";
2
+ import React from "react";
3
+ import type { LanguageKey, LanguageOption } from "./LanguageSelect";
4
4
  export type MultiLanguageValues = Record<LanguageKey, string>;
5
5
  type ExpandableMultiLanguageInputProps = {
6
6
  title: string;
@@ -11,7 +11,7 @@ type ExpandableMultiLanguageInputProps = {
11
11
  name: string;
12
12
  variant?: (lang: LanguageKey) => VariantType;
13
13
  feedback?: (lang: LanguageKey) => string;
14
- [key: string]: any;
14
+ [key: string]: object | string | number | boolean | undefined;
15
15
  };
16
16
  export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => React.JSX.Element;
17
17
  export {};
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { type ReactNode } from "react";
2
2
  /**
3
3
  * Returns true if the provided flag exist in localStorage
4
4
  * or is set as an environment variable.
@@ -1,7 +1,8 @@
1
- import React, { FC } from 'react';
1
+ import type { FC } from "react";
2
+ import React from "react";
2
3
  export interface FormatCurrencyAmountProps {
3
4
  amount: number | string;
4
- as?: 'span' | React.ElementType;
5
- [key: string]: any;
5
+ as?: "span" | React.ElementType;
6
+ [key: string]: object | string | number | boolean | undefined;
6
7
  }
7
8
  export declare const FormatCurrencyAmount: FC<FormatCurrencyAmountProps>;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from "react";
2
2
  export interface FormatDateTimeProps {
3
3
  date: string | Date;
4
4
  locale: string;
@@ -1,6 +1,6 @@
1
- import './LanguageSelect.scss';
2
- import { FC } from 'react';
3
- export type LanguageKey = 'nob' | 'nno' | 'eng';
1
+ import "./LanguageSelect.scss";
2
+ import { type FC } from "react";
3
+ export type LanguageKey = "nob" | "nno" | "eng";
4
4
  export interface LanguageOption {
5
5
  value: LanguageKey;
6
6
  label: string;
@@ -11,6 +11,6 @@ export interface LanguageSelectProps {
11
11
  options: LanguageOption[];
12
12
  className?: string;
13
13
  onChange: (language: string) => void;
14
- [key: string]: any;
14
+ [key: string]: object | string | number | boolean | undefined;
15
15
  }
16
16
  export declare const LanguageSelect: FC<LanguageSelectProps>;
package/dist/Link.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { LinkProps } from 'react-router-dom';
1
+ import { type FC } from "react";
2
+ import { type LinkProps } from "react-router-dom";
3
3
  interface Props extends LinkProps {
4
4
  }
5
5
  export declare const Link: FC<Props>;
@@ -1,8 +1,8 @@
1
- import './LinkButton.scss';
2
- import React, { ReactNode } from 'react';
1
+ import "./LinkButton.scss";
2
+ import React, { type ReactNode } from "react";
3
3
  export interface LinkButtonProps {
4
4
  children: ReactNode;
5
5
  className?: string;
6
- [key: string]: any;
6
+ [key: string]: object | string | number | boolean | undefined | ReactNode;
7
7
  }
8
8
  export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => React.JSX.Element;
package/dist/Menu.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import './Menu.scss';
2
- import React, { FC, ReactNode } from 'react';
1
+ import "./Menu.scss";
2
+ import type { FC, ReactNode } from "react";
3
+ import React from "react";
3
4
  interface MenuProps {
4
5
  children: ReactNode;
5
- as?: 'div' | React.ElementType;
6
+ as?: "div" | React.ElementType;
6
7
  className?: string;
7
8
  }
8
9
  export declare const Menu: FC<MenuProps>;
@@ -1,7 +1,7 @@
1
- import './MultiLanguageInput.scss';
2
- import React, { FC, FocusEvent } from 'react';
3
- import { VariantType } from '@entur/form';
4
- import { LanguageOption } from './LanguageSelect';
1
+ import "./MultiLanguageInput.scss";
2
+ import type { VariantType } from "@entur/form";
3
+ import React, { type FC, type FocusEvent } from "react";
4
+ import { type LanguageOption } from "./LanguageSelect";
5
5
  type Values = {
6
6
  [key: string]: string;
7
7
  };
@@ -19,7 +19,7 @@ export interface MultiLanguageInputProps {
19
19
  alertLabel?: string;
20
20
  label?: string;
21
21
  defaultLanguage?: string;
22
- [key: string]: any;
22
+ [key: string]: object | string | number | boolean | undefined;
23
23
  }
24
24
  /**
25
25
  * @deprecated use ExpandableMultiLanguageInput
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from "react";
2
2
  interface OrganisationV3 {
3
3
  organisationId: number;
4
4
  tradingName: string;
@@ -8,7 +8,7 @@ interface OrganisationDropDownProps {
8
8
  onChange: (organisationId: number) => void;
9
9
  organisations: OrganisationV3[];
10
10
  selectedOrganisationId?: number;
11
- [key: string]: any;
11
+ [key: string]: object | string | number | boolean | undefined;
12
12
  }
13
13
  export declare const OrganisationDropDown: FC<OrganisationDropDownProps>;
14
14
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  type Props = {
3
3
  readonly pathname: string;
4
4
  readonly onBreadcrumbLookup: (path: string) => string | undefined;
package/dist/Pager.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from "react";
2
2
  export interface PagerProps {
3
3
  currentPage: number;
4
4
  collectionSize: number;
@@ -1,5 +1,5 @@
1
- import { ReactNode, FC } from 'react';
2
- import { BusinessCapability } from '@entur-partner/permission-client-node';
1
+ import type { BusinessCapability } from "@entur-partner/permission-client-node";
2
+ import { type FC, type ReactNode } from "react";
3
3
  /**
4
4
  * Note: We use BusinessCapability here, not because we only want to check
5
5
  * BusinessCapabilities but because it represents a minimal subset of what we
@@ -1,6 +1,6 @@
1
- import { FC, ReactNode } from 'react';
2
- import { Location } from 'history';
3
- import { ModalProps } from '@entur/modal';
1
+ import type { ModalProps } from "@entur/modal";
2
+ import type { Location } from "history";
3
+ import { type FC, type ReactNode } from "react";
4
4
  export interface RouteLeavingGuardProps extends Partial<ModalProps> {
5
5
  title: string;
6
6
  closeLabel: string;
package/dist/Stack.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import React, { ReactNode } from 'react';
2
- import { ResponsiveStyleSpacing } from './Box';
1
+ /** biome-ignore-all lint/suspicious/noArrayIndexKey: Ignore for now. Should be tested properly before doing changes */
2
+ import React, { type ReactNode } from "react";
3
+ import { type ResponsiveStyleSpacing } from "./Box";
3
4
  export interface StackProps {
4
5
  className?: string;
5
6
  children: ReactNode;
@@ -1,5 +1,5 @@
1
- import './StatusLabel.scss';
2
- import { FC } from 'react';
1
+ import "./StatusLabel.scss";
2
+ import { type FC } from "react";
3
3
  interface StatusLabelProps {
4
4
  label: string;
5
5
  active: boolean;
package/dist/Text.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import './Text.scss';
2
- import React, { ReactNode } from 'react';
3
- import { StyleColor } from './Box';
4
- type StyleFontSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'extraLarge2' | 'extraLarge3' | 'extraLarge4';
5
- type StyleFontWeight = 'body' | 'heading';
6
- type StyleLineHeight = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge' | 'extraLarge2' | 'extraLarge3' | 'extraLarge4' | 'extraLarge5' | 'extraLarge6' | 'extraLarge7';
1
+ import "./Text.scss";
2
+ import type { ReactNode } from "react";
3
+ import React from "react";
4
+ import { type StyleColor } from "./Box";
5
+ type StyleFontSize = "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4";
6
+ type StyleFontWeight = "body" | "heading";
7
+ type StyleLineHeight = "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "extraLarge7";
7
8
  export type ResponsiveStyleFontSize = StyleFontSize | [StyleFontSize?, StyleFontSize?, StyleFontSize?];
8
9
  export type ResponsiveStyleLineHeight = StyleLineHeight | [StyleLineHeight?, StyleLineHeight?, StyleLineHeight?];
9
10
  export interface TextProps {
@@ -1,7 +1,7 @@
1
- import './Unbutton.scss';
2
- import { FC } from 'react';
3
- import { ButtonProps } from '@entur/button';
4
- interface UnbuttonProps extends Omit<ButtonProps<any>, 'variant'> {
1
+ import "./Unbutton.scss";
2
+ import { Button, type ButtonProps } from "@entur/button";
3
+ import { type FC } from "react";
4
+ interface UnbuttonProps extends Omit<ButtonProps<typeof Button>, "variant"> {
5
5
  }
6
6
  export declare const Unbutton: FC<UnbuttonProps>;
7
7
  export {};
@@ -1,5 +1,5 @@
1
- import '../index.scss';
2
- import React from 'react';
1
+ import "../index.scss";
2
+ import React from "react";
3
3
  type Props = {
4
4
  name: string;
5
5
  setOpen: (open: boolean) => void;
@@ -1,6 +1,6 @@
1
- import '../index.scss';
2
- import React from 'react';
3
- import { Environment } from '../../environment';
1
+ import "../index.scss";
2
+ import React from "react";
3
+ import { Environment } from "../../environment";
4
4
  export declare const CustomOverflowMenu: React.FC<{
5
5
  className?: string;
6
6
  children: React.ReactNode;
@@ -1,3 +1,3 @@
1
- import '../index.scss';
2
- import React from 'react';
1
+ import "../index.scss";
2
+ import React from "react";
3
3
  export declare const CustomOverflowMenuItem: React.FC<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
@@ -1,5 +1,5 @@
1
- import '../index.scss';
2
- import React from 'react';
1
+ import "../index.scss";
2
+ import React from "react";
3
3
  type Props = {
4
4
  language: string;
5
5
  onLanguageChange: (language: string) => void;
@@ -1,5 +1,5 @@
1
- import '../index.scss';
2
- import React from 'react';
1
+ import "../index.scss";
2
+ import React from "react";
3
3
  type Props = {
4
4
  name: string;
5
5
  setOpen: (open: boolean) => void;
@@ -1,5 +1,5 @@
1
- import '../index.scss';
2
- import React from 'react';
1
+ import "../index.scss";
2
+ import React from "react";
3
3
  type Props = {
4
4
  name: string;
5
5
  setOpen: (open: boolean) => void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const VersionMenuItem: React.FC<{
3
3
  title: string;
4
4
  setOpen: (isOpen: boolean) => void;
@@ -1,6 +1,6 @@
1
- import './index.scss';
2
- import { FC } from 'react';
3
- import { Environment } from '../environment';
1
+ import "./index.scss";
2
+ import { type FC } from "react";
3
+ import type { Environment } from "../environment";
4
4
  interface UserMenuProps {
5
5
  userName: string;
6
6
  messages: {
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare function useOutsideClick(ref: React.RefObject<HTMLDivElement>, buttonRef: React.RefObject<HTMLButtonElement>, handler: () => void): void;