@entur-partner/common 6.0.0 → 6.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 +22 -22
- package/dist/ConfirmModal.d.ts +1 -1
- package/dist/ErrorBoundary.d.ts +4 -4
- package/dist/ExpandableMultiLanguageInput.d.ts +3 -3
- package/dist/FeatureToggle.d.ts +2 -2
- package/dist/LanguageSelect.d.ts +1 -1
- package/dist/LinkButton.d.ts +2 -2
- package/dist/MultiLanguageInput.d.ts +1 -1
- package/dist/PageTitle.d.ts +3 -2
- package/dist/Stack.d.ts +2 -2
- package/dist/Text.d.ts +6 -6
- package/dist/common.cjs.development.js +172 -277
- 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 +174 -278
- package/dist/common.esm.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/styles.css +64 -64
- package/package.json +3 -3
- package/dist/PermissionCheckedRoute.d.ts +0 -11
package/dist/ActionBar.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './ActionBar.scss';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
export interface ActionBarProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare const ActionBarLeft: ({ children }: ActionBarProps) => JSX.Element;
|
|
7
|
-
declare const ActionBarRight: ({ children }: ActionBarProps) => JSX.Element;
|
|
8
|
-
declare const ActionBar: ({ children }: ActionBarProps) => JSX.Element;
|
|
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;
|
|
9
9
|
export { ActionBar, ActionBarLeft, ActionBarRight };
|
package/dist/Box.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import './Box.scss';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
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';
|
|
14
|
+
export type ResponsiveStyleSpacing = StyleSpacing | [StyleSpacing?, StyleSpacing?, StyleSpacing?];
|
|
15
|
+
export type ResponsiveStyleMargin = StyleMargin | [StyleMargin?, StyleMargin?, StyleMargin?];
|
|
16
|
+
export type ResponsiveStyleDisplay = StyleDisplay | [StyleDisplay?, StyleDisplay?, StyleDisplay?];
|
|
17
|
+
export type ResponsiveStyleJustifyContent = StyleJustifyContent | [StyleJustifyContent?, StyleJustifyContent?, StyleJustifyContent?];
|
|
18
|
+
export type ResponsiveStyleAlignItems = StyleAlignItems | [StyleAlignItems?, StyleAlignItems?, StyleAlignItems?];
|
|
19
|
+
export type ResponsiveStyleMaxWidth = StyleMaxWidth | [StyleMaxWidth?, StyleMaxWidth?, StyleMaxWidth?];
|
|
20
|
+
export type ResponsiveStyleWidth = StyleWidth | [StyleWidth?, StyleWidth?, StyleWidth?];
|
|
21
|
+
export type ResponsiveStyleFlexDirection = StyleFlexDirection | [StyleFlexDirection?, StyleFlexDirection?, StyleFlexDirection?];
|
|
22
|
+
export type ResponsiveStyleFlexWrap = StyleFlexWrap | [StyleFlexWrap?, StyleFlexWrap?, StyleFlexWrap?];
|
|
23
23
|
export interface BoxProps {
|
|
24
24
|
className?: string;
|
|
25
25
|
as?: React.ElementType;
|
|
@@ -50,7 +50,7 @@ export interface BoxProps {
|
|
|
50
50
|
flexDirection?: ResponsiveStyleFlexDirection;
|
|
51
51
|
flexWrap?: ResponsiveStyleFlexWrap;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
type ResponsiveProp = string | [string?, string?, string?];
|
|
54
54
|
export declare function responsiveProp(prefix: string, prop: ResponsiveProp): string[];
|
|
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) => 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) => React.JSX.Element;
|
|
56
56
|
export {};
|
package/dist/ConfirmModal.d.ts
CHANGED
|
@@ -22,6 +22,6 @@ interface DefaultConfirmModalHandler extends BaseConfirmModalProps {
|
|
|
22
22
|
cancel: string;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type ConfirmModalProps = CustomConfirmModalButtons | DefaultConfirmModalHandler;
|
|
26
26
|
export declare const ConfirmModal: FC<ConfirmModalProps>;
|
|
27
27
|
export {};
|
package/dist/ErrorBoundary.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { ReactNode, Component, ErrorInfo } from 'react';
|
|
2
|
-
|
|
2
|
+
type FallbackOptions = {
|
|
3
3
|
retry: () => void;
|
|
4
4
|
error: Error;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type RenderProp = (options: FallbackOptions) => ReactNode;
|
|
7
|
+
type Props = {
|
|
8
8
|
handleError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
9
9
|
fallback: ReactNode | RenderProp;
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type State = {
|
|
13
13
|
error: null | Error;
|
|
14
14
|
};
|
|
15
15
|
export declare class ErrorBoundary extends Component<Props, State> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VariantType } from '@entur/form';
|
|
3
3
|
import { LanguageKey, LanguageOption } from './LanguageSelect';
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export type MultiLanguageValues = Record<LanguageKey, string>;
|
|
5
|
+
type ExpandableMultiLanguageInputProps = {
|
|
6
6
|
title: string;
|
|
7
7
|
inputComponent: React.ElementType;
|
|
8
8
|
languages: LanguageOption[];
|
|
@@ -13,5 +13,5 @@ declare type ExpandableMultiLanguageInputProps = {
|
|
|
13
13
|
feedback?: (lang: LanguageKey) => string;
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
};
|
|
16
|
-
export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => JSX.Element;
|
|
16
|
+
export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => React.JSX.Element;
|
|
17
17
|
export {};
|
package/dist/FeatureToggle.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { 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 REACT_APP_ prefix. */
|
|
23
23
|
flag: string;
|
|
24
24
|
}
|
|
25
|
-
export declare const FeatureToggle: ({ children, flag }: FeatureToggleProps) => JSX.Element | null;
|
|
25
|
+
export declare const FeatureToggle: ({ children, flag }: FeatureToggleProps) => React.JSX.Element | null;
|
package/dist/LanguageSelect.d.ts
CHANGED
package/dist/LinkButton.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './LinkButton.scss';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
export interface LinkButtonProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
|
-
export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => JSX.Element;
|
|
8
|
+
export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import './MultiLanguageInput.scss';
|
|
|
2
2
|
import React, { FC, FocusEvent } from 'react';
|
|
3
3
|
import { VariantType } from '@entur/form';
|
|
4
4
|
import { LanguageOption } from './LanguageSelect';
|
|
5
|
-
|
|
5
|
+
type Values = {
|
|
6
6
|
[key: string]: string;
|
|
7
7
|
};
|
|
8
8
|
export interface MultiLanguageInputProps {
|
package/dist/PageTitle.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
2
3
|
readonly pathname: string;
|
|
3
4
|
readonly onBreadcrumbLookup: (path: string) => string | undefined;
|
|
4
5
|
};
|
|
@@ -10,5 +11,5 @@ declare type Props = {
|
|
|
10
11
|
* @param Props.onBreadcrumbLookup - A function that takes a path and returns a i18n translated string or undefined
|
|
11
12
|
* @returns A Helmet component with updated title
|
|
12
13
|
*/
|
|
13
|
-
export declare function PageTitle({ pathname, onBreadcrumbLookup }: Props): JSX.Element;
|
|
14
|
+
export declare function PageTitle({ pathname, onBreadcrumbLookup }: Props): React.JSX.Element;
|
|
14
15
|
export {};
|
package/dist/Stack.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ResponsiveStyleSpacing } from './Box';
|
|
3
3
|
export interface StackProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
space: ResponsiveStyleSpacing;
|
|
7
7
|
}
|
|
8
|
-
export declare const Stack: ({ children, space, className }: StackProps) => JSX.Element;
|
|
8
|
+
export declare const Stack: ({ children, space, className }: StackProps) => React.JSX.Element;
|
package/dist/Text.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './Text.scss';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { StyleColor } from './Box';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
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';
|
|
7
|
+
export type ResponsiveStyleFontSize = StyleFontSize | [StyleFontSize?, StyleFontSize?, StyleFontSize?];
|
|
8
|
+
export type ResponsiveStyleLineHeight = StyleLineHeight | [StyleLineHeight?, StyleLineHeight?, StyleLineHeight?];
|
|
9
9
|
export interface TextProps {
|
|
10
10
|
className?: string;
|
|
11
11
|
as?: React.ElementType;
|
|
@@ -16,5 +16,5 @@ export interface TextProps {
|
|
|
16
16
|
fontWeight?: StyleFontWeight;
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
}
|
|
19
|
-
export declare const Text: ({ as: component, children, fontSize, color, lineHeight, fontWeight, className, ...rest }: TextProps) => JSX.Element;
|
|
19
|
+
export declare const Text: ({ as: component, children, fontSize, color, lineHeight, fontWeight, className, ...rest }: TextProps) => React.JSX.Element;
|
|
20
20
|
export {};
|