@entur-partner/common 11.0.0 → 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.
- package/dist/ActionBar.d.ts +4 -4
- package/dist/Box.d.ts +3 -4
- package/dist/ConfirmModal.d.ts +1 -2
- package/dist/Content.d.ts +2 -3
- package/dist/EnturPartnerLogo.d.ts +2 -3
- package/dist/ErrorBoundary.d.ts +2 -2
- package/dist/ExpandableMultiLanguageInput.d.ts +3 -3
- package/dist/FeatureToggle.d.ts +2 -2
- package/dist/FormatCurrencyAmount.d.ts +2 -3
- package/dist/LinkButton.d.ts +2 -2
- package/dist/Menu.d.ts +2 -3
- package/dist/MultiLanguageInput.d.ts +2 -2
- package/dist/Stack.d.ts +2 -2
- package/dist/Text.d.ts +3 -4
- package/dist/common.cjs.development.js +477 -348
- package/dist/common.cjs.development.js.map +1 -1
- package/dist/common.cjs.production.min.js +1 -1
- package/dist/common.cjs.production.min.js.map +1 -1
- package/dist/common.esm.js +467 -338
- package/dist/common.esm.js.map +1 -1
- package/dist/styles.css +34 -34
- package/dist/user-menu/components/CookieSettingsMenuItem.d.ts +1 -2
- package/dist/user-menu/components/CustomOverflowMenu.d.ts +3 -3
- package/dist/user-menu/components/CustomOverflowMenuItem.d.ts +2 -2
- package/dist/user-menu/components/LocaleSwitchMenuItem.d.ts +1 -2
- package/dist/user-menu/components/LogOutMenuItem.d.ts +1 -2
- package/dist/user-menu/components/UserMenuItem.d.ts +1 -2
- package/dist/user-menu/components/VersionMenuItem.d.ts +2 -2
- package/dist/user-menu/components/useOutsideClick.d.ts +2 -2
- package/package.json +6 -6
package/dist/ActionBar.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./ActionBar.scss";
|
|
2
|
-
import
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
3
|
export interface ActionBarProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare const ActionBarLeft: ({ children }: ActionBarProps) =>
|
|
7
|
-
declare const ActionBarRight: ({ children }: ActionBarProps) =>
|
|
8
|
-
declare const ActionBar: ({ children }: ActionBarProps) =>
|
|
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?:
|
|
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) =>
|
|
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 {};
|
package/dist/ConfirmModal.d.ts
CHANGED
|
@@ -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:
|
|
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" |
|
|
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" |
|
|
13
|
+
as?: "div" | ElementType;
|
|
15
14
|
className?: string;
|
|
16
15
|
environment?: Environment;
|
|
17
16
|
}
|
package/dist/ErrorBoundary.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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 | bigint | boolean | Iterable<
|
|
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
|
|
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:
|
|
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) =>
|
|
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 {};
|
package/dist/FeatureToggle.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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) =>
|
|
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" |
|
|
4
|
+
as?: "span" | ElementType;
|
|
6
5
|
[key: string]: object | string | number | boolean | undefined;
|
|
7
6
|
}
|
|
8
7
|
export declare const FormatCurrencyAmount: FC<FormatCurrencyAmountProps>;
|
package/dist/LinkButton.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./LinkButton.scss";
|
|
2
|
-
import
|
|
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) =>
|
|
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" |
|
|
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
|
|
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:
|
|
11
|
+
inputComponent: ElementType;
|
|
12
12
|
values: {
|
|
13
13
|
[key: string]: string;
|
|
14
14
|
};
|
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
|
|
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) =>
|
|
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?:
|
|
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) =>
|
|
19
|
+
export declare const Text: ({ as: component, children, fontSize, color, lineHeight, fontWeight, className, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export {};
|