@connectif/ui-components 2.2.0 → 2.3.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.
@@ -1,2 +1,3 @@
1
- import { Components, Theme } from '@mui/material';
2
- export declare const alertTheme: Components<Theme>['MuiAlert'];
1
+ import { Components } from '@mui/material';
2
+ import type { CustomTheme } from '../../theme/CustomTheme';
3
+ export declare const alertTheme: Components<CustomTheme>['MuiAlert'];
@@ -1,2 +1,3 @@
1
- import { Components, Theme } from '@mui/material';
2
- export declare const alertTitleTheme: Components<Theme>['MuiAlertTitle'];
1
+ import { Components } from '@mui/material';
2
+ import type { CustomTheme } from '../../theme/CustomTheme';
3
+ export declare const alertTitleTheme: Components<CustomTheme>['MuiAlertTitle'];
@@ -25,6 +25,10 @@ export interface EnhancedCardTitleProps {
25
25
  * Size of the title. By default the size is determined according to parent EnhancedCard size.
26
26
  */
27
27
  size?: 'S' | 'M';
28
+ /**
29
+ * Padding around the title. Default is 'none'.
30
+ */
31
+ padding?: string;
28
32
  /**
29
33
  * Data test id. By default the dataTest of parent EnhancedCard is used to compose a dataTest string.
30
34
  */
@@ -5,72 +5,7 @@ import { variants } from '../../theme/Typography';
5
5
  import { ChipProps as MuiChipProps } from '@mui/material/Chip';
6
6
  import { AvatarProps } from '../avatar';
7
7
  import { Link } from '@mui/material';
8
- declare const variantStyles: {
9
- default: {
10
- backgroundColor: string;
11
- color: string;
12
- hoverBackgroundColor: string;
13
- borderColor: string;
14
- iconColor: string;
15
- avatarColor: string;
16
- };
17
- primary: {
18
- backgroundColor: string;
19
- color: string;
20
- hoverBackgroundColor: string;
21
- borderColor: string;
22
- iconColor: string;
23
- avatarColor: string;
24
- };
25
- success: {
26
- backgroundColor: string;
27
- color: string;
28
- hoverBackgroundColor: string;
29
- borderColor: string;
30
- iconColor: string;
31
- avatarColor: string;
32
- };
33
- error: {
34
- backgroundColor: string;
35
- color: string;
36
- hoverBackgroundColor: string;
37
- borderColor: string;
38
- iconColor: string;
39
- avatarColor: string;
40
- };
41
- warning: {
42
- backgroundColor: string;
43
- color: string;
44
- hoverBackgroundColor: string;
45
- borderColor: string;
46
- iconColor: string;
47
- avatarColor: string;
48
- };
49
- dark: {
50
- backgroundColor: string;
51
- color: string;
52
- hoverBackgroundColor: string;
53
- borderColor: string;
54
- iconColor: string;
55
- avatarColor: string;
56
- };
57
- darker: {
58
- backgroundColor: string;
59
- color: string;
60
- hoverBackgroundColor: string;
61
- borderColor: string;
62
- iconColor: string;
63
- avatarColor: string;
64
- };
65
- black: {
66
- backgroundColor: string;
67
- color: string;
68
- hoverBackgroundColor: string;
69
- borderColor: string;
70
- iconColor: string;
71
- avatarColor: string;
72
- };
73
- };
8
+ type ChipVariant = 'default' | 'primary' | 'success' | 'error' | 'warning' | 'dark' | 'darker' | 'black';
74
9
  declare const sizeStyles: {
75
10
  XS: {
76
11
  borderRadius: string;
@@ -951,7 +886,7 @@ export type ChipProps = Pick<MuiChipProps, 'id' | 'label' | 'sx' | 'onClick' | '
951
886
  /**
952
887
  * The variant to use.
953
888
  */
954
- variant?: keyof typeof variantStyles;
889
+ variant?: ChipVariant;
955
890
  /**
956
891
  * The size of the chip.
957
892
  */
@@ -976,7 +911,7 @@ export type ChipProps = Pick<MuiChipProps, 'id' | 'label' | 'sx' | 'onClick' | '
976
911
  * A component that displays a chip containing simple text.
977
912
  * If chips doesn't fit in the available space, they will be truncated with ellipsis.
978
913
  */
979
- declare const Chip: React.ForwardRefExoticComponent<Pick<MuiChipProps, "id" | "sx" | "label" | "onClick" | "onMouseEnter" | "onMouseLeave" | "onDelete"> & {
914
+ declare const Chip: React.ForwardRefExoticComponent<Pick<MuiChipProps, "label" | "id" | "sx" | "onClick" | "onMouseEnter" | "onMouseLeave" | "onDelete"> & {
980
915
  /**
981
916
  * The icon to display
982
917
  */
@@ -1015,7 +950,7 @@ declare const Chip: React.ForwardRefExoticComponent<Pick<MuiChipProps, "id" | "s
1015
950
  /**
1016
951
  * The variant to use.
1017
952
  */
1018
- variant?: keyof typeof variantStyles;
953
+ variant?: ChipVariant;
1019
954
  /**
1020
955
  * The size of the chip.
1021
956
  */
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SvgIconProps } from '@mui/material';
3
- import { icons } from './icons';
3
+ import { IconId } from './icons';
4
+ export { IconId } from './icons';
4
5
  export declare const iconSizes: {
5
6
  readonly XXS: 12;
6
7
  readonly XS: 16;
@@ -10,7 +11,6 @@ export declare const iconSizes: {
10
11
  readonly XL: 48;
11
12
  readonly XXL: 72;
12
13
  };
13
- export type IconId = keyof typeof icons;
14
14
  export type IconProps = Pick<SvgIconProps, 'sx'> & {
15
15
  /**
16
16
  * The ID of the icon to display.
@@ -1955,3 +1955,10 @@ export declare const icons: {
1955
1955
  'database-export': string;
1956
1956
  };
1957
1957
  export declare const iconIds: string[];
1958
+ declare let customIcons: Record<string, string>;
1959
+ export declare function registerCustomIcons(newIcons: Record<string, string>): void;
1960
+ export { customIcons };
1961
+ export interface IconRegistry {
1962
+ }
1963
+ export type IconId = keyof typeof icons | keyof IconRegistry;
1964
+ export declare function getIconPath(icon: IconId): string;
@@ -1,4 +1,4 @@
1
1
  export { default as Icon, iconSizes } from './Icon';
2
- export type { IconProps, IconId } from './Icon';
3
- export { iconIds } from './icons';
2
+ export type { IconProps } from './Icon';
3
+ export { iconIds, registerCustomIcons, IconRegistry, getIconPath, IconId } from './icons';
4
4
  export { default as StackedIcons, StackedIconsProps } from './StackedIcons';
@@ -56,7 +56,7 @@ export type NumberFieldProps = Omit<TextFieldProps, 'value' | 'onChange' | 'mult
56
56
  * The exposed `ref` property is the refference to the native &lt;input&gt; element,
57
57
  * typed as React.Ref&lt;HTMLInputElement&gt;
58
58
  */
59
- declare const NumberField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "type" | "onChange" | "onScroll" | "defaultValue" | "value" | "multiline"> & {
59
+ declare const NumberField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "type" | "onChange" | "onScroll" | "value" | "defaultValue" | "multiline"> & {
60
60
  /**
61
61
  * The numeric value of this input.
62
62
  */