@entur-partner/common 11.0.0-alpha.1 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/ActionBar.d.ts +4 -4
  2. package/dist/Box.d.ts +3 -4
  3. package/dist/ConfirmModal.d.ts +1 -2
  4. package/dist/Content.d.ts +2 -3
  5. package/dist/EnturPartnerLogo.d.ts +2 -3
  6. package/dist/ErrorBoundary.d.ts +2 -2
  7. package/dist/ExpandableMultiLanguageInput.d.ts +3 -3
  8. package/dist/FeatureToggle.d.ts +2 -2
  9. package/dist/FormatCurrencyAmount.d.ts +2 -3
  10. package/dist/LinkButton.d.ts +2 -2
  11. package/dist/Menu.d.ts +2 -3
  12. package/dist/MultiLanguageInput.d.ts +2 -2
  13. package/dist/RouteLeavingGuard.d.ts +1 -1
  14. package/dist/Stack.d.ts +2 -2
  15. package/dist/Text.d.ts +3 -4
  16. package/dist/common.cjs.development.js +522 -422
  17. package/dist/common.cjs.development.js.map +1 -1
  18. package/dist/common.cjs.production.min.js +1 -1
  19. package/dist/common.cjs.production.min.js.map +1 -1
  20. package/dist/common.esm.js +516 -416
  21. package/dist/common.esm.js.map +1 -1
  22. package/dist/index.d.ts +1 -2
  23. package/dist/styles.css +82 -153
  24. package/dist/{UserMenu/index.d.ts → user-menu/UserMenu.d.ts} +4 -11
  25. package/dist/user-menu/components/CookieSettingsMenuItem.d.ts +6 -0
  26. package/dist/{UserMenu → user-menu}/components/CustomOverflowMenu.d.ts +3 -4
  27. package/dist/user-menu/components/CustomOverflowMenuItem.d.ts +2 -0
  28. package/dist/user-menu/components/LocaleSwitchMenuItem.d.ts +6 -0
  29. package/dist/user-menu/components/LogOutMenuItem.d.ts +6 -0
  30. package/dist/user-menu/components/UserMenuItem.d.ts +6 -0
  31. package/dist/user-menu/components/VersionMenuItem.d.ts +5 -0
  32. package/dist/user-menu/components/useOutsideClick.d.ts +2 -0
  33. package/package.json +11 -8
  34. package/dist/BetaTopNavigation.d.ts +0 -9
  35. package/dist/UserMenu/components/CookieSettingsMenuItem.d.ts +0 -9
  36. package/dist/UserMenu/components/CustomOverflowMenuItem.d.ts +0 -3
  37. package/dist/UserMenu/components/LanguageSwitchMenuItem.d.ts +0 -10
  38. package/dist/UserMenu/components/LogOutMenuItem.d.ts +0 -9
  39. package/dist/UserMenu/components/UserMenuItem.d.ts +0 -9
  40. package/dist/UserMenu/components/VersionMenuItem.d.ts +0 -5
  41. package/dist/UserMenu/useOutsideClick.d.ts +0 -2
@@ -1,9 +1,9 @@
1
1
  import "./ActionBar.scss";
2
- import React, { type ReactNode } from "react";
2
+ import { type ReactNode } from "react";
3
3
  export interface ActionBarProps {
4
4
  children: ReactNode;
5
5
  }
6
- declare const ActionBarLeft: ({ children }: ActionBarProps) => React.JSX.Element;
7
- declare const ActionBarRight: ({ children }: ActionBarProps) => React.JSX.Element;
8
- declare const ActionBar: ({ children }: ActionBarProps) => React.JSX.Element;
6
+ declare const ActionBarLeft: ({ children }: ActionBarProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const ActionBarRight: ({ children }: ActionBarProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const ActionBar: ({ children }: ActionBarProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export { ActionBar, ActionBarLeft, ActionBarRight };
package/dist/Box.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import "./Box.scss";
2
- import type { ReactNode } from "react";
3
- import React from "react";
2
+ import type { ElementType, ReactNode } from "react";
4
3
  type StyleSpacing = "none" | "extraSmall2" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "extraLarge7" | "extraLarge8" | "extraLarge9";
5
4
  type StyleMargin = StyleSpacing | "auto";
6
5
  type StyleDisplay = "block" | "flex" | "inline" | "inline-block";
@@ -23,7 +22,7 @@ export type ResponsiveStyleFlexDirection = StyleFlexDirection | [StyleFlexDirect
23
22
  export type ResponsiveStyleFlexWrap = StyleFlexWrap | [StyleFlexWrap?, StyleFlexWrap?, StyleFlexWrap?];
24
23
  export interface BoxProps {
25
24
  className?: string;
26
- as?: React.ElementType;
25
+ as?: ElementType;
27
26
  [key: string]: object | string | number | boolean | undefined | ReactNode;
28
27
  children: ReactNode;
29
28
  contrast?: boolean;
@@ -53,5 +52,5 @@ export interface BoxProps {
53
52
  }
54
53
  type ResponsiveProp = string | [string?, string?, string?];
55
54
  export declare function responsiveProp(prefix: string, prop: ResponsiveProp): string[];
56
- export declare const Box: ({ as: Component, children, contrast, paddingTop, paddingRight, paddingBottom, paddingLeft, paddingX, paddingY, padding, marginTop, marginRight, marginBottom, marginLeft, marginX, marginY, margin, display, justifyContent, alignItems, maxWidth, width, background, color, flexDirection, flexWrap, className, ...rest }: BoxProps) => React.JSX.Element;
55
+ export declare const Box: ({ as: Component, children, contrast, paddingTop, paddingRight, paddingBottom, paddingLeft, paddingX, paddingY, padding, marginTop, marginRight, marginBottom, marginLeft, marginX, marginY, margin, display, justifyContent, alignItems, maxWidth, width, background, color, flexDirection, flexWrap, className, ...rest }: BoxProps) => import("react/jsx-runtime").JSX.Element;
57
56
  export {};
@@ -1,10 +1,9 @@
1
1
  import "./ConfirmModal.scss";
2
2
  import { type ModalProps } from "@entur/modal";
3
3
  import type { FC, ReactNode } from "react";
4
- import React from "react";
5
4
  export interface BaseConfirmModalProps extends Partial<ModalProps> {
6
5
  title: string;
7
- children: React.ReactNode;
6
+ children: ReactNode;
8
7
  closeLabel: string;
9
8
  /** Deprecated use children prop */
10
9
  message?: ReactNode;
package/dist/Content.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import "./Content.scss";
2
- import type { FC, ReactNode } from "react";
3
- import React from "react";
2
+ import type { ElementType, FC, ReactNode } from "react";
4
3
  interface ContentProps {
5
4
  children: ReactNode;
6
- as?: "main" | React.ElementType;
5
+ as?: "main" | ElementType;
7
6
  className?: string;
8
7
  }
9
8
  export declare const Content: FC<ContentProps>;
@@ -1,6 +1,5 @@
1
1
  import "./EnturPartnerLogo.scss";
2
- import type { FC } from "react";
3
- import React from "react";
2
+ import type { ElementType, FC } from "react";
4
3
  import { Environment } from "./environment";
5
4
  interface LogoProps {
6
5
  title: string;
@@ -11,7 +10,7 @@ interface LogoProps {
11
10
  export declare const EnturPartnerLogoSvg: FC<LogoProps>;
12
11
  interface EnturPartnerLogoProps {
13
12
  altText: string;
14
- as?: "div" | React.ElementType;
13
+ as?: "div" | ElementType;
15
14
  className?: string;
16
15
  environment?: Environment;
17
16
  }
@@ -1,4 +1,4 @@
1
- import React, { Component, type ErrorInfo, type ReactNode } from "react";
1
+ import { Component, type ErrorInfo, type ReactNode } from "react";
2
2
  type FallbackOptions = {
3
3
  retry: () => void;
4
4
  error: Error;
@@ -16,7 +16,7 @@ export declare class ErrorBoundary extends Component<Props, State> {
16
16
  constructor(props: Props);
17
17
  static getDerivedStateFromError(error: Error): State;
18
18
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
19
- render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
19
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
20
20
  }
21
21
  export declare const LANGUAGE_STORAGE_KEY = "EP::locale";
22
22
  export {};
@@ -1,10 +1,10 @@
1
1
  import type { VariantType } from "@entur/form";
2
- import React from "react";
2
+ import type { ElementType } from "react";
3
3
  import type { LanguageKey, LanguageOption } from "./LanguageSelect";
4
4
  export type MultiLanguageValues = Record<LanguageKey, string>;
5
5
  type ExpandableMultiLanguageInputProps = {
6
6
  title: string;
7
- inputComponent: React.ElementType;
7
+ inputComponent: ElementType;
8
8
  languages: LanguageOption[];
9
9
  values: MultiLanguageValues;
10
10
  onChange: (values: MultiLanguageValues) => void;
@@ -13,5 +13,5 @@ type ExpandableMultiLanguageInputProps = {
13
13
  feedback?: (lang: LanguageKey) => string;
14
14
  [key: string]: object | string | number | boolean | undefined;
15
15
  };
16
- export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => React.JSX.Element;
16
+ export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export {};
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from "react";
1
+ import { 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.
@@ -22,4 +22,4 @@ export interface FeatureToggleProps {
22
22
  * you can drop the VITE_APP_ prefix. */
23
23
  flag: string;
24
24
  }
25
- export declare const FeatureToggle: ({ children, flag }: FeatureToggleProps) => React.JSX.Element | null;
25
+ export declare const FeatureToggle: ({ children, flag }: FeatureToggleProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +1,7 @@
1
- import type { FC } from "react";
2
- import React from "react";
1
+ import type { ElementType, FC } from "react";
3
2
  export interface FormatCurrencyAmountProps {
4
3
  amount: number | string;
5
- as?: "span" | React.ElementType;
4
+ as?: "span" | ElementType;
6
5
  [key: string]: object | string | number | boolean | undefined;
7
6
  }
8
7
  export declare const FormatCurrencyAmount: FC<FormatCurrencyAmountProps>;
@@ -1,8 +1,8 @@
1
1
  import "./LinkButton.scss";
2
- import React, { type ReactNode } from "react";
2
+ import { type ReactNode } from "react";
3
3
  export interface LinkButtonProps {
4
4
  children: ReactNode;
5
5
  className?: string;
6
6
  [key: string]: object | string | number | boolean | undefined | ReactNode;
7
7
  }
8
- export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => React.JSX.Element;
8
+ export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => import("react/jsx-runtime").JSX.Element;
package/dist/Menu.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import "./Menu.scss";
2
- import type { FC, ReactNode } from "react";
3
- import React from "react";
2
+ import type { ElementType, FC, ReactNode } from "react";
4
3
  interface MenuProps {
5
4
  children: ReactNode;
6
- as?: "div" | React.ElementType;
5
+ as?: "div" | ElementType;
7
6
  className?: string;
8
7
  }
9
8
  export declare const Menu: FC<MenuProps>;
@@ -1,6 +1,6 @@
1
1
  import "./MultiLanguageInput.scss";
2
2
  import type { VariantType } from "@entur/form";
3
- import React, { type FC, type FocusEvent } from "react";
3
+ import { type ElementType, type FC, type FocusEvent } from "react";
4
4
  import { type LanguageOption } from "./LanguageSelect";
5
5
  type Values = {
6
6
  [key: string]: string;
@@ -8,7 +8,7 @@ type Values = {
8
8
  export interface MultiLanguageInputProps {
9
9
  className?: string;
10
10
  onBlur?: (e: FocusEvent<HTMLDivElement>) => void;
11
- inputComponent: React.ElementType;
11
+ inputComponent: ElementType;
12
12
  values: {
13
13
  [key: string]: string;
14
14
  };
@@ -1,6 +1,6 @@
1
1
  import type { ModalProps } from "@entur/modal";
2
- import type { Location } from "history";
3
2
  import { type FC, type ReactNode } from "react";
3
+ import { type Location } from "react-router-dom";
4
4
  export interface RouteLeavingGuardProps extends Partial<ModalProps> {
5
5
  title: string;
6
6
  closeLabel: string;
package/dist/Stack.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /** biome-ignore-all lint/suspicious/noArrayIndexKey: Ignore for now. Should be tested properly before doing changes */
2
- import React, { type ReactNode } from "react";
2
+ import { type ReactNode } from "react";
3
3
  import { type ResponsiveStyleSpacing } from "./Box";
4
4
  export interface StackProps {
5
5
  className?: string;
6
6
  children: ReactNode;
7
7
  space: ResponsiveStyleSpacing;
8
8
  }
9
- export declare const Stack: ({ children, space, className }: StackProps) => React.JSX.Element;
9
+ export declare const Stack: ({ children, space, className }: StackProps) => import("react/jsx-runtime").JSX.Element;
package/dist/Text.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import "./Text.scss";
2
- import type { ReactNode } from "react";
3
- import React from "react";
2
+ import type { ElementType, ReactNode } from "react";
4
3
  import { type StyleColor } from "./Box";
5
4
  type StyleFontSize = "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4";
6
5
  type StyleFontWeight = "body" | "heading";
@@ -9,7 +8,7 @@ export type ResponsiveStyleFontSize = StyleFontSize | [StyleFontSize?, StyleFont
9
8
  export type ResponsiveStyleLineHeight = StyleLineHeight | [StyleLineHeight?, StyleLineHeight?, StyleLineHeight?];
10
9
  export interface TextProps {
11
10
  className?: string;
12
- as?: React.ElementType;
11
+ as?: ElementType;
13
12
  children: ReactNode;
14
13
  fontSize?: ResponsiveStyleFontSize;
15
14
  lineHeight?: ResponsiveStyleLineHeight;
@@ -17,5 +16,5 @@ export interface TextProps {
17
16
  fontWeight?: StyleFontWeight;
18
17
  [key: string]: any;
19
18
  }
20
- export declare const Text: ({ as: component, children, fontSize, color, lineHeight, fontWeight, className, ...rest }: TextProps) => React.JSX.Element;
19
+ export declare const Text: ({ as: component, children, fontSize, color, lineHeight, fontWeight, className, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
21
20
  export {};