@connectif/ui-components 1.0.7 → 2.0.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.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { EnhancedCardSubtitleProps } from './EnhancedCardSubtitle';
3
3
  import { EnhancedCardTitleProps } from './EnhancedCardTitle';
4
4
  export interface EnhancedCardRowProps {
5
+ children: React.ReactNode;
5
6
  gap?: string;
6
7
  justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
7
8
  titleProps?: EnhancedCardTitleProps;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
1
  import './EchartsConfig';
2
+ import ReactEChartsCore from 'echarts-for-react/lib/core';
3
3
  import { IncrementLabelType } from '../../propTypes/IncrementLabel';
4
4
  import { ChartTooltipEntryFormatter } from '../../utils/ChartUtils';
5
5
  type YAxisLabelFormatter = (value: number) => string;
@@ -8,7 +8,7 @@ export type BarChartProps = {
8
8
  * The css style to apply to the chart container.
9
9
  * Use this to set specific with, padding, background color, etc.
10
10
  */
11
- style?: React.CSSProperties;
11
+ style?: ReactEChartsCore['props']['style'];
12
12
  /**
13
13
  * The categories to display on the x axis.
14
14
  */
@@ -1,11 +1,12 @@
1
1
  import { ChartTooltipEntryFormatter } from '../../utils/ChartUtils';
2
+ import ReactEChartsCore from 'echarts-for-react/lib/core';
2
3
  type YAxisLabelFormatter = (value: number) => string;
3
4
  export type CategorizedChartProps = {
4
5
  /**
5
6
  * The css style to apply to the chart container.
6
7
  * Use this to set specific with, padding, background color, etc.
7
8
  */
8
- style?: React.CSSProperties;
9
+ style?: ReactEChartsCore['props']['style'];
9
10
  /**
10
11
  * The categories to display on the x axis.
11
12
  */
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
1
  import './EchartsConfig';
2
+ import ReactEChartsCore from 'echarts-for-react/lib/core';
3
3
  import { IncrementLabelType } from '../../propTypes/IncrementLabel';
4
4
  import { ChartTooltipEntryFormatter } from '../../utils/ChartUtils';
5
5
  type YAxisLabelFormatter = (value: number) => string;
@@ -8,7 +8,7 @@ export type FunnelChartProps = {
8
8
  * The css style to apply to the chart container.
9
9
  * Use this to set specific with, padding, background color, etc.
10
10
  */
11
- style?: React.CSSProperties;
11
+ style?: ReactEChartsCore['props']['style'];
12
12
  /**
13
13
  * The categories to display on the x axis.
14
14
  */
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { SxProps } from '@mui/material';
3
3
  type InfoBoxVariant = 'default';
4
4
  export type InfoBoxProps = {
5
+ children: React.ReactNode;
5
6
  variant?: InfoBoxVariant;
6
7
  collapsedHeight?: number;
7
8
  sx?: SxProps;
@@ -1,8 +1,7 @@
1
- import { TimeFieldProps as MuiTimeFieldProps } from '@mui/x-date-pickers';
2
1
  import { TextFieldProps } from './TextField';
3
2
  export type TimeFieldProps = Omit<TextFieldProps, 'value' | 'onChange' | 'multiline' | 'type' | 'isClearable' | 'defaultValue'> & {
4
- value: MuiTimeFieldProps<Date>['value'];
5
- onChange?: MuiTimeFieldProps<Date>['onChange'];
3
+ value: Date;
4
+ onChange?: (value: Date, context: unknown) => void;
6
5
  /**
7
6
  * Wether show or not the minutes part
8
7
  */
@@ -1,7 +1,12 @@
1
1
  import { GridProps as MuiGridProps } from '@mui/material/Grid';
2
- export type GridProps = Pick<MuiGridProps, 'children' | 'xs' | 'md' | 'lg' | 'xl' | 'columns' | 'spacing' | 'sx' | 'container' | 'item' | 'className'>;
2
+ export type GridProps = Pick<MuiGridProps, 'children' | 'columns' | 'spacing' | 'sx' | 'container' | 'className'> & {
3
+ xs?: number;
4
+ md?: number;
5
+ lg?: number;
6
+ xl?: number;
7
+ };
3
8
  /**
4
9
  * A basic grid system. See https://mui.com/material-ui/react-grid/ for more detailed usage.
5
10
  */
6
- declare const Grid: (props: GridProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const Grid: ({ xs, md, lg, xl, ...rest }: GridProps) => import("react/jsx-runtime").JSX.Element;
7
12
  export default Grid;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export declare function SwipeableViews({ className, index, style, slideStyle, onChangeIndex, children, ...rootProps }: {
3
+ className?: string;
4
+ index: number;
5
+ style?: React.CSSProperties;
6
+ slideStyle?: React.CSSProperties;
7
+ onChangeIndex: (index: number) => void;
8
+ } & React.HTMLProps<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,10 @@
1
- declare const MarkdownRenderer: ({ text }: {
1
+ import { TypographyVariant } from '../../theme/Typography';
2
+ type MarkdownContainerProps = {
3
+ color: string;
4
+ backgroundColor?: string;
5
+ variant?: TypographyVariant;
6
+ };
7
+ declare const MarkdownRenderer: ({ text, ...rest }: MarkdownContainerProps & {
2
8
  text: string;
3
9
  }) => import("react/jsx-runtime").JSX.Element;
4
10
  export default MarkdownRenderer;
@@ -55,5 +55,49 @@ export type TooltipProps = Pick<MuiTooltipProps, 'children' | 'disableHoverListe
55
55
  * - https://mui.com/material-ui/guides/composition/#caveat-with-refs
56
56
  * - https://reactjs.org/docs/forwarding-refs.html#forwarding-refs-to-dom-components
57
57
  */
58
- declare const Tooltip: ({ children, title, placement, interactive, allowDisabled, variant, textVariant, enableArrow, borderRadius, popperClass, zIndex, ...rest }: TooltipProps) => React.ReactElement<any, any>;
58
+ declare const Tooltip: React.ForwardRefExoticComponent<Pick<MuiTooltipProps, "open" | "children" | "disableHoverListener"> & {
59
+ /**
60
+ * The content to display in the tooltip.
61
+ */
62
+ title: NonNullable<React.ReactNode>;
63
+ /**
64
+ * The placement of the tooltip.
65
+ */
66
+ placement?: "top" | "bottom" | "left" | "right";
67
+ /**
68
+ * If set, it won't close when the user hovers over the tooltip
69
+ */
70
+ interactive?: boolean;
71
+ /**
72
+ * If set, tooltip will show up in disabled elements such as buttons and text fields. Default is false.
73
+ */
74
+ allowDisabled?: boolean;
75
+ /**
76
+ * The background color of the tooltip
77
+ * @default 'default'
78
+ */
79
+ variant?: TooltipVariant;
80
+ /**
81
+ * The variant of the text in the tooltip
82
+ */
83
+ textVariant?: TypographyProps["variant"];
84
+ /**
85
+ * If set, the arrow will be shown
86
+ * @default false
87
+ */
88
+ enableArrow?: boolean;
89
+ /**
90
+ * The border radius of the tooltip
91
+ * @default 4
92
+ */
93
+ borderRadius?: number;
94
+ /**
95
+ * Class to override .MuiTooltip-popper styles
96
+ */
97
+ popperClass?: string;
98
+ /**
99
+ * zIndex to set in tooltip
100
+ */
101
+ zIndex?: number;
102
+ } & React.RefAttributes<HTMLDivElement>>;
59
103
  export default Tooltip;
@@ -25,7 +25,7 @@ export type TypographyProps = Pick<MuiTypographyProps, 'noWrap' | 'sx' | 'childr
25
25
  /**
26
26
  * A component that displays text.
27
27
  */
28
- declare const Typography: React.ForwardRefExoticComponent<Pick<MuiTypographyProps, "id" | "className" | "children" | "sx" | "onMouseEnter" | "onMouseLeave" | "noWrap"> & {
28
+ declare const Typography: React.ForwardRefExoticComponent<Pick<MuiTypographyProps, "id" | "className" | "sx" | "children" | "onMouseEnter" | "onMouseLeave" | "noWrap"> & {
29
29
  variant?: TypographyVariant;
30
30
  /**
31
31
  * Color of the text.