@zextras/carbonio-design-system 6.0.2-react18.0 → 7.0.0-devel.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/.storybook/main.ts +19 -0
- package/.storybook/preview.tsx +20 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/zapp-ui.bundle.d.ts +133 -97
- package/dist/{zapp-ui.bundle.cjs → zapp-ui.bundle.js} +18123 -773
- package/package.json +26 -30
- package/release.config.mjs +32 -0
- package/sonar-project.properties +10 -0
- package/styleguide.theme.js +10 -0
- package/dist/zapp-ui.bundle.mjs +0 -32432
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)', '../docs/**/*.mdx'],
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-webpack5-compiler-babel',
|
|
7
|
+
'@storybook/addon-essentials',
|
|
8
|
+
'@storybook/addon-interactions',
|
|
9
|
+
'@storybook/test',
|
|
10
|
+
],
|
|
11
|
+
framework: {
|
|
12
|
+
name: '@storybook/react-webpack5',
|
|
13
|
+
options: {}
|
|
14
|
+
},
|
|
15
|
+
typescript: {
|
|
16
|
+
reactDocgen: 'react-docgen-typescript'
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export default config;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from '../src';
|
|
4
|
+
import { StoryFn, Preview } from '@storybook/react';
|
|
5
|
+
|
|
6
|
+
export const decorators = [
|
|
7
|
+
(Story: StoryFn) => (
|
|
8
|
+
<ThemeProvider>
|
|
9
|
+
<Story />
|
|
10
|
+
</ThemeProvider>
|
|
11
|
+
),
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const preview: Preview = {
|
|
15
|
+
parameters: {
|
|
16
|
+
actions: { argTypesRegex: '^on.*' },
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default preview;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.40.1"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/dist/zapp-ui.bundle.d.ts
CHANGED
|
@@ -88,11 +88,11 @@ declare type ActionButton = ButtonProps & {
|
|
|
88
88
|
backgroundColor?: never;
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
declare type AnyColor = LiteralUnion<PaletteColor, string>;
|
|
91
|
+
export declare type AnyColor = LiteralUnion<PaletteColor, string>;
|
|
92
92
|
|
|
93
|
-
export declare const Avatar: React_2.ForwardRefExoticComponent<
|
|
93
|
+
export declare const Avatar: React_2.ForwardRefExoticComponent<AvatarComponentProps & Omit<React_2.HTMLAttributes<HTMLDivElement>, keyof AvatarComponentProps> & React_2.RefAttributes<HTMLDivElement>>;
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
declare interface AvatarComponentProps {
|
|
96
96
|
/** size of the Avatar circle */
|
|
97
97
|
size?: keyof DefaultTheme['sizes']['avatar'];
|
|
98
98
|
/** url to the profile picture */
|
|
@@ -119,6 +119,8 @@ export declare interface AvatarPropTypes extends HTMLAttributes<HTMLDivElement>
|
|
|
119
119
|
disabled?: boolean;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
export declare type AvatarPropTypes = AvatarComponentProps & Omit<HTMLAttributes<HTMLDivElement>, keyof AvatarComponentProps>;
|
|
123
|
+
|
|
122
124
|
declare type AvatarSkeletonComponentProps = {
|
|
123
125
|
variant?: string;
|
|
124
126
|
radius?: string;
|
|
@@ -126,15 +128,17 @@ declare type AvatarSkeletonComponentProps = {
|
|
|
126
128
|
width?: string;
|
|
127
129
|
};
|
|
128
130
|
|
|
129
|
-
export declare const Badge: React_2.ForwardRefExoticComponent<
|
|
131
|
+
export declare const Badge: React_2.ForwardRefExoticComponent<BadgeComponentProps & Omit<React_2.HTMLAttributes<HTMLSpanElement>, keyof BadgeComponentProps> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
130
132
|
|
|
131
|
-
|
|
133
|
+
declare interface BadgeComponentProps {
|
|
132
134
|
/** Badge type */
|
|
133
135
|
type?: 'read' | 'unread';
|
|
134
136
|
/** Badge text */
|
|
135
137
|
value: string | number;
|
|
136
138
|
}
|
|
137
139
|
|
|
140
|
+
export declare type BadgeProps = BadgeComponentProps & Omit<HTMLAttributes<HTMLSpanElement>, keyof BadgeComponentProps>;
|
|
141
|
+
|
|
138
142
|
declare type BadgeSkeletonProps = {
|
|
139
143
|
variant?: string;
|
|
140
144
|
radius?: string;
|
|
@@ -170,7 +174,7 @@ export declare type BannerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
170
174
|
|
|
171
175
|
declare type BareModalProps = {
|
|
172
176
|
/** Modal background */
|
|
173
|
-
background?:
|
|
177
|
+
background?: AnyColor;
|
|
174
178
|
/** Modal size */
|
|
175
179
|
size?: 'extrasmall' | 'small' | 'medium' | 'large';
|
|
176
180
|
/** Boolean to show the modal */
|
|
@@ -215,16 +219,16 @@ declare type ButtonColorsByType = ({
|
|
|
215
219
|
type?: 'default' | 'outlined';
|
|
216
220
|
} & ({
|
|
217
221
|
/** Main color */
|
|
218
|
-
color?:
|
|
222
|
+
color?: AnyColor;
|
|
219
223
|
} | {
|
|
220
224
|
/** Background color of the button (only for 'default' and 'outlined' types, to use instead of color for more specificity) */
|
|
221
|
-
backgroundColor?:
|
|
225
|
+
backgroundColor?: AnyColor;
|
|
222
226
|
/** Specific color of the content (only for 'default' and 'outlined' types, to use instead of color for more specificity) */
|
|
223
|
-
labelColor?:
|
|
227
|
+
labelColor?: AnyColor;
|
|
224
228
|
})) | {
|
|
225
229
|
type: 'ghost';
|
|
226
230
|
/** Main color */
|
|
227
|
-
color?:
|
|
231
|
+
color?: AnyColor;
|
|
228
232
|
};
|
|
229
233
|
|
|
230
234
|
declare type ButtonIconPlacement = 'left' | 'right';
|
|
@@ -262,7 +266,7 @@ declare type ButtonPropsInternal = {
|
|
|
262
266
|
} | {
|
|
263
267
|
/** Size variant of the button */
|
|
264
268
|
size?: ButtonSize;
|
|
265
|
-
secondaryAction?:
|
|
269
|
+
secondaryAction?: never;
|
|
266
270
|
}) & ButtonColorsByType;
|
|
267
271
|
|
|
268
272
|
export declare interface ButtonSecondaryAction {
|
|
@@ -303,7 +307,6 @@ export declare class Catcher extends React_2.Component<CatcherProps, CatcherStat
|
|
|
303
307
|
export declare interface CatcherProps {
|
|
304
308
|
/** error callback, use this to perform operations when an error is caught */
|
|
305
309
|
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
306
|
-
children?: React_2.ReactNode;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
declare interface CatcherState {
|
|
@@ -323,7 +326,7 @@ export declare interface CheckboxProps extends Omit<ContainerProps, 'onChange' |
|
|
|
323
326
|
*/
|
|
324
327
|
iconSize?: keyof DefaultTheme['sizes']['icon'];
|
|
325
328
|
/** Checkbox color */
|
|
326
|
-
iconColor?:
|
|
329
|
+
iconColor?: AnyColor;
|
|
327
330
|
/** Checkbox text */
|
|
328
331
|
label?: string;
|
|
329
332
|
/** Checkbox padding */
|
|
@@ -524,7 +527,7 @@ export declare interface ChipProps extends RowProps {
|
|
|
524
527
|
tooltipPlacement?: React_2.ComponentPropsWithoutRef<typeof Tooltip>['placement'];
|
|
525
528
|
}
|
|
526
529
|
|
|
527
|
-
export declare type CloseModalFn = () => void;
|
|
530
|
+
export declare type CloseModalFn = (id: string) => void;
|
|
528
531
|
|
|
529
532
|
export declare type CloseSnackbarFn = () => void;
|
|
530
533
|
|
|
@@ -586,42 +589,42 @@ declare interface ContainerElProps {
|
|
|
586
589
|
* number: measure in px
|
|
587
590
|
* string: any measure in CSS syntax
|
|
588
591
|
*/
|
|
589
|
-
height?: 'fit' | 'fill'
|
|
592
|
+
height?: LiteralUnion<'fit' | 'fill', CSSStyleDeclaration['height']> | number;
|
|
590
593
|
/** Container minHeight: <br/>
|
|
591
594
|
* `fit`: shorthand for fit-content
|
|
592
595
|
* `fill`: semantic alternative for `100%`
|
|
593
596
|
* number: measure in px
|
|
594
597
|
* string: any measure in CSS syntax
|
|
595
598
|
*/
|
|
596
|
-
minHeight?: 'fit' | 'fill'
|
|
599
|
+
minHeight?: LiteralUnion<'fit' | 'fill', CSSStyleDeclaration['minHeight']> | number;
|
|
597
600
|
/** Container maxHeight: <br/>
|
|
598
601
|
* `fit`: shorthand for fit-content
|
|
599
602
|
* `fill`: semantic alternative for `100%`
|
|
600
603
|
* number: measure in px
|
|
601
604
|
* string: any measure in CSS syntax
|
|
602
605
|
*/
|
|
603
|
-
maxHeight?: 'fit' | 'fill'
|
|
606
|
+
maxHeight?: LiteralUnion<'fit' | 'fill', CSSStyleDeclaration['maxHeight']> | number;
|
|
604
607
|
/** Container width: <br/>
|
|
605
608
|
* `fit`: shorthand for fit-content
|
|
606
609
|
* `fill`: semantic alternative for `100%`
|
|
607
610
|
* number: measure in px
|
|
608
611
|
* string: any measure in CSS syntax
|
|
609
612
|
*/
|
|
610
|
-
width?: 'fit' | 'fill'
|
|
613
|
+
width?: LiteralUnion<'fit' | 'fill', CSSStyleDeclaration['width']> | number;
|
|
611
614
|
/** Container minWidth: <br/>
|
|
612
615
|
* `fit`: shorthand for fit-content
|
|
613
616
|
* `fill`: semantic alternative for `100%`
|
|
614
617
|
* number: measure in px
|
|
615
618
|
* string: any measure in CSS syntax
|
|
616
619
|
*/
|
|
617
|
-
minWidth?: 'fit' | 'fill'
|
|
620
|
+
minWidth?: LiteralUnion<'fit' | 'fill', CSSStyleDeclaration['minWidth']> | number;
|
|
618
621
|
/** Container maxWidth: <br/>
|
|
619
622
|
* `fit`: shorthand for fit-content
|
|
620
623
|
* `fill`: semantic alternative for `100%`
|
|
621
624
|
* number: measure in px
|
|
622
625
|
* string: any measure in CSS syntax
|
|
623
626
|
*/
|
|
624
|
-
maxWidth?: 'fit' | 'fill'
|
|
627
|
+
maxWidth?: LiteralUnion<'fit' | 'fill', CSSStyleDeclaration['maxWidth']> | number;
|
|
625
628
|
/** Container flex alignment along the main axis */
|
|
626
629
|
mainAlignment?: 'stretch' | 'center' | 'baseline' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'unset';
|
|
627
630
|
/** Container flex alignment along the cross axis */
|
|
@@ -678,9 +681,13 @@ declare type ControlledTableProps = {
|
|
|
678
681
|
multiSelect?: true;
|
|
679
682
|
});
|
|
680
683
|
|
|
681
|
-
export declare type CreateModalArgs = [modalProps: ModalProps
|
|
684
|
+
export declare type CreateModalArgs = [modalProps: ModalProps & {
|
|
685
|
+
id: string;
|
|
686
|
+
}, customModal?: false] | [customModalProps: CustomModalProps & {
|
|
687
|
+
id: string;
|
|
688
|
+
}, customModal: true];
|
|
682
689
|
|
|
683
|
-
export declare type CreateModalFn = (...args: CreateModalArgs) =>
|
|
690
|
+
export declare type CreateModalFn = (...args: CreateModalArgs) => void;
|
|
684
691
|
|
|
685
692
|
export declare type CreateSnackbarFn = (props: CreateSnackbarFnArgs) => CloseSnackbarFn;
|
|
686
693
|
|
|
@@ -757,28 +764,30 @@ export declare interface DateTimePickerProps extends Omit<ReactDatePickerProps,
|
|
|
757
764
|
disabled?: boolean;
|
|
758
765
|
}
|
|
759
766
|
|
|
760
|
-
export declare const DefaultHeaderFactory:
|
|
767
|
+
export declare const DefaultHeaderFactory: React_2.VFC<THeaderProps>;
|
|
761
768
|
|
|
762
|
-
export declare const DefaultRowFactory:
|
|
769
|
+
export declare const DefaultRowFactory: React_2.VFC<TRowProps>;
|
|
763
770
|
|
|
764
771
|
export declare const DefaultTabBarItem: React_2.ForwardRefExoticComponent<DefaultTabBarItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
765
772
|
|
|
766
773
|
export declare interface DefaultTabBarItemProps extends ContainerProps {
|
|
767
774
|
item: Item;
|
|
768
775
|
selected: boolean;
|
|
769
|
-
background:
|
|
770
|
-
onClick:
|
|
771
|
-
underlineColor:
|
|
776
|
+
background: string | keyof DefaultTheme['palette'];
|
|
777
|
+
onClick: React_2.ReactEventHandler;
|
|
778
|
+
underlineColor: string | keyof DefaultTheme['palette'];
|
|
772
779
|
forceWidthEquallyDistributed: boolean;
|
|
773
780
|
}
|
|
774
781
|
|
|
775
|
-
export declare const Divider: React_2.ForwardRefExoticComponent<Partial<
|
|
782
|
+
export declare const Divider: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLDivElement>, "color"> & Partial<DividerComponentProps> & React_2.RefAttributes<HTMLDivElement>>;
|
|
776
783
|
|
|
777
|
-
|
|
784
|
+
declare interface DividerComponentProps {
|
|
778
785
|
/** Divider color */
|
|
779
|
-
color:
|
|
786
|
+
color: AnyColor;
|
|
780
787
|
}
|
|
781
788
|
|
|
789
|
+
export declare type DividerProps = Omit<HTMLAttributes<HTMLDivElement>, keyof DividerComponentProps> & Partial<DividerComponentProps>;
|
|
790
|
+
|
|
782
791
|
export declare const Drag: React_2.ForwardRefExoticComponent<DragProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
783
792
|
|
|
784
793
|
export declare type DragObj = {
|
|
@@ -927,6 +936,10 @@ export declare const FormRow: React_2.ForwardRefExoticComponent<FormElementProps
|
|
|
927
936
|
|
|
928
937
|
export declare const FormSection: React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
929
938
|
|
|
939
|
+
declare type FormSectionSkeletonProps = {
|
|
940
|
+
variant: string;
|
|
941
|
+
};
|
|
942
|
+
|
|
930
943
|
export declare const FormSubSection: React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
931
944
|
|
|
932
945
|
export declare const generateColorSet: ({ regular, hover, active, disabled, focus }: Pick<ThemeColorObj, 'regular'> & Partial<Omit<ThemeColorObj, 'regular'>>, dark?: boolean) => ThemeColorObj;
|
|
@@ -990,7 +1003,7 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
990
1003
|
|
|
991
1004
|
declare type HTMLTextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
992
1005
|
|
|
993
|
-
export declare const Icon: React_2.ForwardRefExoticComponent<
|
|
1006
|
+
export declare const Icon: React_2.ForwardRefExoticComponent<IconComponentProps & StyledIconProps & React_2.RefAttributes<SVGSVGElement>>;
|
|
994
1007
|
|
|
995
1008
|
export declare const IconButton: React_2.ForwardRefExoticComponent<IconButtonProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
996
1009
|
|
|
@@ -1047,23 +1060,15 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1047
1060
|
|
|
1048
1061
|
declare type IconComponent = (props: SVGProps<SVGSVGElement>) => React_2.JSX.Element;
|
|
1049
1062
|
|
|
1050
|
-
|
|
1063
|
+
declare interface IconComponentProps extends SVGAttributes<SVGSVGElement> {
|
|
1051
1064
|
/** Icon to show. It can be a string key for the theme icons or a custom icon component */
|
|
1052
1065
|
icon: keyof DefaultTheme['icons'] | IconComponent;
|
|
1053
|
-
/** whether the icon is in a disabled element */
|
|
1054
|
-
disabled?: boolean;
|
|
1055
1066
|
}
|
|
1056
1067
|
|
|
1057
|
-
export declare
|
|
1058
|
-
/** Icon Color */
|
|
1059
|
-
color?: AnyColor;
|
|
1060
|
-
/** Icon size */
|
|
1061
|
-
size?: keyof DefaultTheme['sizes']['icon'];
|
|
1062
|
-
}
|
|
1068
|
+
export declare type IconProps = IconComponentProps & StyledIconProps;
|
|
1063
1069
|
|
|
1064
1070
|
declare type IconSkeletonProps = {
|
|
1065
1071
|
variant?: string;
|
|
1066
|
-
backgroundSize?: string;
|
|
1067
1072
|
size?: keyof typeof SIZES;
|
|
1068
1073
|
width?: string;
|
|
1069
1074
|
};
|
|
@@ -1114,7 +1119,7 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1114
1119
|
/** on Enter key callback */
|
|
1115
1120
|
onEnter?: (e: KeyboardEvent) => void;
|
|
1116
1121
|
/** Description of the input */
|
|
1117
|
-
description?: string
|
|
1122
|
+
description?: string;
|
|
1118
1123
|
}
|
|
1119
1124
|
|
|
1120
1125
|
export declare function isThemeColor(color: string, theme: DefaultTheme): color is ThemePaletteColorKey;
|
|
@@ -1151,6 +1156,10 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1151
1156
|
haveToPreventDefault?: boolean;
|
|
1152
1157
|
};
|
|
1153
1158
|
|
|
1159
|
+
declare type KeysWithPrefix<TObject, TPrefix extends string, TKeys extends keyof TObject = keyof TObject> = {
|
|
1160
|
+
[K in TKeys as K extends string ? WithPrefix<K, TPrefix> : never]: TObject[K];
|
|
1161
|
+
};
|
|
1162
|
+
|
|
1154
1163
|
export declare interface LabelFactoryProps<T = string> {
|
|
1155
1164
|
label: string | undefined;
|
|
1156
1165
|
open: boolean;
|
|
@@ -1176,7 +1185,17 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1176
1185
|
|
|
1177
1186
|
export declare const ListItem: React_2.ForwardRefExoticComponent<ListItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1178
1187
|
|
|
1179
|
-
export declare interface ListItemProps
|
|
1188
|
+
export declare interface ListItemProps {
|
|
1189
|
+
/** Base background color for the item */
|
|
1190
|
+
background?: AnyColor;
|
|
1191
|
+
/** Background color for the selected status */
|
|
1192
|
+
selectedBackground?: AnyColor;
|
|
1193
|
+
/** Background color for the active status */
|
|
1194
|
+
activeBackground?: AnyColor;
|
|
1195
|
+
/** Define if the item is active in order to show the activeBackground */
|
|
1196
|
+
active?: boolean;
|
|
1197
|
+
/** Define if the item is selected in order to show the selectedBackground */
|
|
1198
|
+
selected?: boolean;
|
|
1180
1199
|
/**
|
|
1181
1200
|
* Ref of the list used to set the visibility of the item.
|
|
1182
1201
|
* The ref is set by the list itself.
|
|
@@ -1194,13 +1213,16 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1194
1213
|
key: NonNullable<React_2.HTMLProps<HTMLDivElement>['key']>;
|
|
1195
1214
|
}
|
|
1196
1215
|
|
|
1216
|
+
/**
|
|
1217
|
+
* @deprecated Use ListItemProps instead
|
|
1218
|
+
*/
|
|
1197
1219
|
export declare interface ListItemWrapperProps {
|
|
1198
1220
|
/** Base background color for the item */
|
|
1199
|
-
background?:
|
|
1221
|
+
background?: AnyColor;
|
|
1200
1222
|
/** Background color for the selected status */
|
|
1201
|
-
selectedBackground?:
|
|
1223
|
+
selectedBackground?: AnyColor;
|
|
1202
1224
|
/** Background color for the active status */
|
|
1203
|
-
activeBackground?:
|
|
1225
|
+
activeBackground?: AnyColor;
|
|
1204
1226
|
/** Define if the item is active in order to show the activeBackground */
|
|
1205
1227
|
active?: boolean;
|
|
1206
1228
|
/** Define if the item is selected in order to show the selectedBackground */
|
|
@@ -1259,7 +1281,6 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1259
1281
|
|
|
1260
1282
|
declare type LogoSkeletonProps = {
|
|
1261
1283
|
variant?: string;
|
|
1262
|
-
backgroundSize?: string;
|
|
1263
1284
|
radius?: string;
|
|
1264
1285
|
size?: keyof typeof SIZES;
|
|
1265
1286
|
width?: string;
|
|
@@ -1267,7 +1288,7 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1267
1288
|
};
|
|
1268
1289
|
|
|
1269
1290
|
export declare const Modal: React_2.ForwardRefExoticComponent<{
|
|
1270
|
-
background?:
|
|
1291
|
+
background?: AnyColor | undefined;
|
|
1271
1292
|
size?: "small" | "extrasmall" | "medium" | "large" | undefined;
|
|
1272
1293
|
open?: boolean | undefined;
|
|
1273
1294
|
zIndex?: number | undefined;
|
|
@@ -1278,7 +1299,7 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1278
1299
|
onClose?: ((event: KeyboardEvent | React_2.MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
1279
1300
|
containerWindow?: Window | undefined;
|
|
1280
1301
|
} & Omit<React_2.HTMLAttributes<HTMLDivElement>, "title" | keyof {
|
|
1281
|
-
background?:
|
|
1302
|
+
background?: AnyColor | undefined;
|
|
1282
1303
|
size?: "small" | "extrasmall" | "medium" | "large" | undefined;
|
|
1283
1304
|
open?: boolean | undefined;
|
|
1284
1305
|
zIndex?: number | undefined;
|
|
@@ -1301,14 +1322,18 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1301
1322
|
closeIconTooltip?: string | undefined;
|
|
1302
1323
|
} & Omit<React_2.HTMLAttributes<HTMLDivElement>, "title"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1303
1324
|
|
|
1304
|
-
export declare const ModalBody:
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1325
|
+
export declare const ModalBody: React_2.ForwardRefExoticComponent<ModalBodyProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1326
|
+
|
|
1327
|
+
export declare interface ModalBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
1328
|
+
/** Max height of the body container */
|
|
1329
|
+
maxHeight?: string;
|
|
1330
|
+
/** Align text to the center */
|
|
1331
|
+
centered?: boolean;
|
|
1332
|
+
}
|
|
1308
1333
|
|
|
1309
1334
|
export declare const ModalFooter: ({ customFooter, ...modalFooterContentProps }: ModalFooterProps) => React_2.JSX.Element;
|
|
1310
1335
|
|
|
1311
|
-
export declare const ModalFooterContent:
|
|
1336
|
+
export declare const ModalFooterContent: React_2.VFC<ModalFooterContentProps>;
|
|
1312
1337
|
|
|
1313
1338
|
export declare type ModalFooterContentProps = Omit<ModalFooterProps, 'customFooter'>;
|
|
1314
1339
|
|
|
@@ -1352,17 +1377,20 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1352
1377
|
export declare const ModalHeader: ({ centered, onClose, showCloseIcon, title, type, closeIconTooltip }: ModalHeaderProps) => React_2.JSX.Element;
|
|
1353
1378
|
|
|
1354
1379
|
export declare interface ModalHeaderProps {
|
|
1355
|
-
centered?: boolean
|
|
1356
|
-
type?: 'default' | 'error'
|
|
1357
|
-
title?: string | React_2.ReactElement
|
|
1358
|
-
showCloseIcon?: boolean
|
|
1359
|
-
onClose?: (
|
|
1380
|
+
centered?: boolean;
|
|
1381
|
+
type?: 'default' | 'error';
|
|
1382
|
+
title?: string | React_2.ReactElement;
|
|
1383
|
+
showCloseIcon?: boolean;
|
|
1384
|
+
onClose?: (event: React_2.MouseEvent | KeyboardEvent) => void;
|
|
1360
1385
|
closeIconTooltip?: string;
|
|
1361
1386
|
}
|
|
1362
1387
|
|
|
1363
1388
|
export declare function ModalManager({ children }: ModalManagerProps): React_2.JSX.Element;
|
|
1364
1389
|
|
|
1365
|
-
export declare const ModalManagerContext: React_2.Context<
|
|
1390
|
+
export declare const ModalManagerContext: React_2.Context<{
|
|
1391
|
+
createModal: CreateModalFn;
|
|
1392
|
+
closeModal: CloseModalFn;
|
|
1393
|
+
} | undefined>;
|
|
1366
1394
|
|
|
1367
1395
|
export declare type ModalManagerProps = React_2.PropsWithChildren<Record<string, unknown>>;
|
|
1368
1396
|
|
|
@@ -1434,7 +1462,13 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1434
1462
|
maxVisible?: number;
|
|
1435
1463
|
};
|
|
1436
1464
|
|
|
1437
|
-
export declare const Padding: React_2.ForwardRefExoticComponent<
|
|
1465
|
+
export declare const Padding: React_2.ForwardRefExoticComponent<PaddingProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1466
|
+
|
|
1467
|
+
declare type PaddingComponentProps = {
|
|
1468
|
+
width?: string;
|
|
1469
|
+
height?: string;
|
|
1470
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
1471
|
+
} & PaddingObj;
|
|
1438
1472
|
|
|
1439
1473
|
export declare type PaddingObj = {
|
|
1440
1474
|
value: string | keyof DefaultTheme['sizes']['padding'] | 0;
|
|
@@ -1450,17 +1484,13 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1450
1484
|
left: string | keyof DefaultTheme['sizes']['padding'] | 0;
|
|
1451
1485
|
}>;
|
|
1452
1486
|
|
|
1453
|
-
export declare type PaddingProps =
|
|
1454
|
-
width?: string;
|
|
1455
|
-
height?: string;
|
|
1456
|
-
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
1457
|
-
} & PaddingObj & HTMLAttributes<HTMLDivElement>;
|
|
1487
|
+
export declare type PaddingProps = PaddingComponentProps & Omit<HTMLAttributes<HTMLDivElement>, keyof PaddingComponentProps>;
|
|
1458
1488
|
|
|
1459
1489
|
declare type PaddingString = `${string | keyof DefaultTheme['sizes']['padding']}`;
|
|
1460
1490
|
|
|
1461
1491
|
declare type PaddingStringComposition = PaddingString | `${PaddingString} | ${PaddingString}` | `${PaddingString} ${PaddingString} ${PaddingString}` | `${PaddingString} ${PaddingString} ${PaddingString} ${PaddingString}`;
|
|
1462
1492
|
|
|
1463
|
-
declare type PaletteColor = keyof DefaultTheme['palette'];
|
|
1493
|
+
export declare type PaletteColor = keyof DefaultTheme['palette'];
|
|
1464
1494
|
|
|
1465
1495
|
export declare const Paragraph: React_2.ForwardRefExoticComponent<TextProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1466
1496
|
|
|
@@ -1615,9 +1645,6 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1615
1645
|
|
|
1616
1646
|
export declare interface RowProps extends ContainerProps {
|
|
1617
1647
|
display?: string;
|
|
1618
|
-
flexBasis?: string;
|
|
1619
|
-
flexGrow?: 'unset' | number;
|
|
1620
|
-
flexShrink?: 'unset' | number;
|
|
1621
1648
|
order?: 'unset' | number;
|
|
1622
1649
|
takeAvailableSpace?: boolean;
|
|
1623
1650
|
}
|
|
@@ -1669,8 +1696,8 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1669
1696
|
|
|
1670
1697
|
declare type ShapeType = 'round' | 'square';
|
|
1671
1698
|
|
|
1672
|
-
export declare type Shimmer = React_2.
|
|
1673
|
-
[K in keyof typeof ShimmerObject]: React_2.
|
|
1699
|
+
export declare type Shimmer = React_2.VFC<SkeletonProps> & {
|
|
1700
|
+
[K in keyof typeof ShimmerObject]: React_2.VFC<Parameters<(typeof ShimmerObject)[K]>[number]>;
|
|
1674
1701
|
};
|
|
1675
1702
|
|
|
1676
1703
|
export declare const Shimmer: Shimmer;
|
|
@@ -1682,25 +1709,19 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1682
1709
|
iconEnd: boolean;
|
|
1683
1710
|
badge: boolean;
|
|
1684
1711
|
}) => React_2.JSX.Element;
|
|
1685
|
-
Avatar: ({ size, ...rest }: AvatarSkeletonComponentProps) => React_2.JSX.Element;
|
|
1686
|
-
Badge: ({ size, ...rest }: BadgeSkeletonProps) => React_2.JSX.Element;
|
|
1687
|
-
Button: ({ size, ...rest }: ButtonSkeletonProps) => React_2.JSX.Element;
|
|
1688
|
-
Checkbox: ({ size, ...rest }: IconSkeletonProps) => React_2.JSX.Element;
|
|
1712
|
+
Avatar: ({ size, width, variant, radius, ...rest }: AvatarSkeletonComponentProps) => React_2.JSX.Element;
|
|
1713
|
+
Badge: ({ size, variant, radius, width, height, ...rest }: BadgeSkeletonProps) => React_2.JSX.Element;
|
|
1714
|
+
Button: ({ size, width, variant, radius, height, ...rest }: ButtonSkeletonProps) => React_2.JSX.Element;
|
|
1715
|
+
Checkbox: ({ size, variant, width, ...rest }: IconSkeletonProps) => React_2.JSX.Element;
|
|
1689
1716
|
EmailChip: ({ width, iconStart, iconEnd, iconEndAdditional }: {
|
|
1690
1717
|
width?: string;
|
|
1691
1718
|
iconStart?: boolean;
|
|
1692
1719
|
iconEnd?: boolean;
|
|
1693
1720
|
iconEndAdditional?: boolean;
|
|
1694
1721
|
}) => React_2.JSX.Element;
|
|
1695
|
-
FormSection:
|
|
1696
|
-
variant:
|
|
1697
|
-
|
|
1698
|
-
}, never>;
|
|
1699
|
-
FormSubSection: StyledComponent<React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>, DefaultTheme, {
|
|
1700
|
-
variant: string;
|
|
1701
|
-
backgroundSize: string;
|
|
1702
|
-
}, never>;
|
|
1703
|
-
Icon: ({ size, ...rest }: IconSkeletonProps) => React_2.JSX.Element;
|
|
1722
|
+
FormSection: ({ variant }: FormSectionSkeletonProps) => React_2.JSX.Element;
|
|
1723
|
+
FormSubSection: ({ variant }: FormSectionSkeletonProps) => React_2.JSX.Element;
|
|
1724
|
+
Icon: ({ size, variant, width, ...rest }: IconSkeletonProps) => React_2.JSX.Element;
|
|
1704
1725
|
Input: ({ width, checkbox }: {
|
|
1705
1726
|
width?: string;
|
|
1706
1727
|
checkbox?: boolean;
|
|
@@ -1709,16 +1730,16 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1709
1730
|
width?: string;
|
|
1710
1731
|
type?: number;
|
|
1711
1732
|
}) => React_2.JSX.Element;
|
|
1712
|
-
Logo: ({ size, ...rest }: LogoSkeletonProps) => React_2.JSX.Element;
|
|
1713
|
-
Text: StyledComponent<"div", DefaultTheme, SkeletonProps
|
|
1714
|
-
Quota: (
|
|
1715
|
-
Searchbar: (
|
|
1733
|
+
Logo: ({ size, variant, radius, height, width, ...rest }: LogoSkeletonProps) => React_2.JSX.Element;
|
|
1734
|
+
Text: StyledComponent<"div", DefaultTheme, With$Prefix<SkeletonProps>, never>;
|
|
1735
|
+
Quota: ({ radius, height, width, variant, orientation, mainAlignment }: SkeletonProps) => React_2.JSX.Element;
|
|
1736
|
+
Searchbar: ({ radius, height, variant, orientation, mainAlignment, width }: SkeletonProps) => React_2.JSX.Element;
|
|
1716
1737
|
Snackbar: ({ width, elementStart, elementEnd }: {
|
|
1717
1738
|
width?: string;
|
|
1718
1739
|
elementStart?: boolean;
|
|
1719
1740
|
elementEnd?: boolean;
|
|
1720
1741
|
}) => React_2.JSX.Element;
|
|
1721
|
-
Stepper: ({ size, steppersNumber,
|
|
1742
|
+
Stepper: ({ size, steppersNumber, variant, radius, width }: AvatarSkeletonComponentProps & {
|
|
1722
1743
|
steppersNumber: number;
|
|
1723
1744
|
}) => React_2.JSX.Element;
|
|
1724
1745
|
TableListItem: ({ width, type }: {
|
|
@@ -1739,7 +1760,6 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1739
1760
|
|
|
1740
1761
|
export declare type SkeletonProps = {
|
|
1741
1762
|
variant?: string;
|
|
1742
|
-
backgroundSize?: string;
|
|
1743
1763
|
radius?: string;
|
|
1744
1764
|
orientation?: string;
|
|
1745
1765
|
mainAlignment?: string;
|
|
@@ -1815,7 +1835,16 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1815
1835
|
export declare const Spinner: React_2.ForwardRefExoticComponent<SpinnerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1816
1836
|
|
|
1817
1837
|
export declare interface SpinnerProps extends HTMLAttributes<HTMLDivElement> {
|
|
1818
|
-
color:
|
|
1838
|
+
color: AnyColor;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
declare interface StyledIconProps {
|
|
1842
|
+
/** Icon Color */
|
|
1843
|
+
color?: AnyColor;
|
|
1844
|
+
/** Icon size */
|
|
1845
|
+
size?: keyof DefaultTheme['sizes']['icon'];
|
|
1846
|
+
/** whether the icon is in a disabled element */
|
|
1847
|
+
disabled?: boolean;
|
|
1819
1848
|
}
|
|
1820
1849
|
|
|
1821
1850
|
declare type StyleObj = HTMLAttributes<HTMLDivElement>['style'];
|
|
@@ -1861,11 +1890,11 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1861
1890
|
/** id of the selected item */
|
|
1862
1891
|
selected: string;
|
|
1863
1892
|
/** change callback, is called with the new selected id */
|
|
1864
|
-
onChange: (ev: React_2.
|
|
1893
|
+
onChange: (ev: React_2.SyntheticEvent, selectedId: string) => void;
|
|
1865
1894
|
/** background color of the tabBar */
|
|
1866
|
-
background:
|
|
1895
|
+
background: string | keyof DefaultTheme['palette'];
|
|
1867
1896
|
/** underline color of the selected tab */
|
|
1868
|
-
underlineColor?:
|
|
1897
|
+
underlineColor?: string | keyof DefaultTheme['palette'];
|
|
1869
1898
|
/** Force tabs to have all the same width */
|
|
1870
1899
|
forceWidthEquallyDistributed?: boolean;
|
|
1871
1900
|
}
|
|
@@ -2031,7 +2060,7 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
2031
2060
|
|
|
2032
2061
|
declare type ThemePaletteObj = DefaultTheme['palette'];
|
|
2033
2062
|
|
|
2034
|
-
export declare const ThemeProvider:
|
|
2063
|
+
export declare const ThemeProvider: React_2.FC<ThemeProviderProps>;
|
|
2035
2064
|
|
|
2036
2065
|
export declare interface ThemeProviderProps {
|
|
2037
2066
|
extension?: (theme: DefaultTheme) => DefaultTheme;
|
|
@@ -2184,7 +2213,10 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
2184
2213
|
*/
|
|
2185
2214
|
export declare function useKeyboard(ref: React_2.RefObject<HTMLElement>, presets: KeyboardPresetObj[]): void;
|
|
2186
2215
|
|
|
2187
|
-
export declare function useModal():
|
|
2216
|
+
export declare function useModal(): {
|
|
2217
|
+
createModal: CreateModalFn;
|
|
2218
|
+
closeModal: CloseModalFn;
|
|
2219
|
+
};
|
|
2188
2220
|
|
|
2189
2221
|
export declare function useScreenMode(target?: Window): ScreenMode;
|
|
2190
2222
|
|
|
@@ -2194,6 +2226,10 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
2194
2226
|
|
|
2195
2227
|
export declare const useTheme: () => DefaultTheme;
|
|
2196
2228
|
|
|
2229
|
+
declare type With$Prefix<TProps> = KeysWithPrefix<TProps, '$'>;
|
|
2230
|
+
|
|
2231
|
+
declare type WithPrefix<TString extends string, TPrefix extends string> = `${TPrefix}${TString}`;
|
|
2232
|
+
|
|
2197
2233
|
export declare function ZimbraClassicThemeContextProvider({ styleSheetTarget, children, extension, loadDefaultFont }: ZimbraClassicThemeContextProviderProps): React_2.JSX.Element;
|
|
2198
2234
|
|
|
2199
2235
|
export declare interface ZimbraClassicThemeContextProviderProps {
|