@skodaflow/web-library 3.3.0-alpha.1 → 3.4.0-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.
@@ -0,0 +1,8 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export type AlertProps = PropsWithChildren<{
3
+ type?: 'success' | 'warning' | 'error';
4
+ actions?: React.ReactNode;
5
+ width?: string | number;
6
+ direction?: 'rtl' | 'ltr';
7
+ }>;
8
+ export declare const Alert: React.FC<AlertProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { OverrideProps } from '@mui/material/OverridableComponent';
3
+ export interface AlertButtonTypeMap<P = {}, C extends React.ElementType = 'button'> {
4
+ props: P;
5
+ defaultComponent: C;
6
+ }
7
+ export type AlertButtonProps<C extends React.ElementType, P = {}> = OverrideProps<AlertButtonTypeMap<P, C>, C> & {
8
+ component?: C;
9
+ };
10
+ export declare function AlertButton<C extends React.ElementType = 'button'>(props: AlertButtonProps<C>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './Alert';
2
+ export * from './AlertButton';
@@ -81,5 +81,7 @@ export interface CardMenuProps extends React.HTMLAttributes<HTMLDivElement> {
81
81
  * The toggle label displayed when groupToggleSelection is true. Default is "Select all".
82
82
  */
83
83
  toggleLabel?: string;
84
+ /** Renders the popper with border radius */
85
+ rounded?: boolean;
84
86
  }
85
87
  export declare const CardMenu: React.ForwardRefExoticComponent<CardMenuProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,16 +1,7 @@
1
- /// <reference types="react" />
2
- export declare const PopperStyled: import("@emotion/styled").StyledComponent<Omit<import("@mui/base").PopperProps<"div">, "direction"> & {
3
- component?: import("react").ElementType<any>;
4
- components?: {
5
- Root?: import("react").ElementType<any>;
6
- };
7
- componentsProps?: {
8
- root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperRootSlotPropsOverrides, import("@mui/base").PopperOwnProps>;
9
- };
10
- sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
11
- } & import("react").RefAttributes<HTMLDivElement> & {
1
+ export declare const PopperStyled: import("@emotion/styled").StyledComponent<import("@mui/base").PopperOwnProps & Omit<any, keyof import("@mui/base").PopperOwnProps> & {
12
2
  theme?: import("@emotion/react").Theme;
13
3
  } & {
14
4
  theme?: any;
15
5
  isMobile?: boolean;
6
+ rounded?: boolean;
16
7
  }, {}, {}>;
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  * @description Base definition of SkodaFlow Chip independent on core implementation.
5
5
  * Properties are inherited from HTML div element
6
6
  */
7
- export interface ChipImageProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ export interface ChipImageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
8
8
  /**
9
9
  * The label referenced to the text field.
10
10
  */
@@ -30,13 +30,13 @@ export interface ChipImageProps extends React.HTMLAttributes<HTMLDivElement> {
30
30
  */
31
31
  imageAlt: string;
32
32
  /**
33
- * Default state of the chip image. If true the chip image is checked.
33
+ * State of the chip image. If true the chip image is checked.
34
34
  */
35
35
  isChecked?: boolean;
36
36
  /**
37
37
  * Event triggered whenever the chip image is clicked.
38
38
  */
39
- onChange?(e: React.ChangeEvent<HTMLInputElement>): void;
39
+ onChange?(e: React.ChangeEvent<HTMLInputElement>, checked: boolean): void;
40
40
  /**
41
41
  * Name attribute of the component.
42
42
  */
@@ -41,4 +41,5 @@ export * from './avatar';
41
41
  export * from './closeDialogButton';
42
42
  export * from './iconButton';
43
43
  export * from './helperTextContent';
44
+ export * from './alert';
44
45
  export { Typography } from '@mui/material';
@@ -21,8 +21,11 @@ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
21
21
  labelMoreItem?: string;
22
22
  /**
23
23
  * the default active tab on mount
24
+ * @deprecated Use property `activeTab` instead
24
25
  */
25
26
  defaultActiveTab: string | number;
27
+ /** Specifies which tab is active */
28
+ activeTab: string | number;
26
29
  /**
27
30
  * If true and on mobile view, tabs are rendered as mobile secondary navigation view
28
31
  */
@@ -0,0 +1,3 @@
1
+ import { Theme } from '@mui/material';
2
+ import { Components } from '@mui/material/styles/components';
3
+ export declare const flowAutocomplete: Components<Theme>['MuiAutocomplete'];
@@ -1,4 +1,4 @@
1
- import { Theme } from '@mui/material/styles';
1
+ import { BreakpointsOptions, Theme } from '@mui/material/styles';
2
2
  import React from 'react';
3
3
  import './theme.extensions';
4
4
  import { TypographySize } from './theme.typography';
@@ -6,7 +6,7 @@ import { TypographySize } from './theme.typography';
6
6
  * @deprecated use `skodaThemeProvider` component instead
7
7
  * @param typographySize
8
8
  */
9
- export declare const createSkodaTheme: (typographySize: TypographySize) => Theme;
9
+ export declare const createSkodaTheme: (typographySize: TypographySize, breakpointsOptions?: BreakpointsOptions) => Theme;
10
10
  /**
11
11
  * @deprecated use `SkodaThemeProvider` instead
12
12
  */
@@ -21,5 +21,6 @@ export declare class SkodaTheme extends React.Component {
21
21
  }
22
22
  export type SkodaThemeProviderProps = {
23
23
  children?: React.ReactNode;
24
+ useContainerBreakpoints?: boolean;
24
25
  };
25
26
  export declare const SkodaThemeProvider: React.FC<SkodaThemeProviderProps>;
@@ -1,7 +1,8 @@
1
1
  import { TypographyOptions } from '@mui/material/styles/createTypography';
2
+ import { BreakpointsOptions } from '@mui/system';
2
3
  export type TypographySize = 'small' | 'medium' | 'large';
3
4
  export declare const getTypography: (element: string, size: TypographySize) => any;
4
- export declare const useTypographySize: () => TypographySize;
5
+ export declare const useTypographySize: (breakpointsOptions?: BreakpointsOptions) => TypographySize;
5
6
  /**
6
7
  * Making typography responsive using mediaquery makes theming of components very complicated.
7
8
  * This new approach resolves typography by provided size. To calculate size use useTypographySize hook.