@zextras/carbonio-design-system 2.0.0 → 2.1.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.
- package/CHANGELOG.md +15 -0
- package/dist/zapp-ui.bundle.d.ts +60 -27
- package/dist/zapp-ui.bundle.js +859 -459
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.1.0](https://github.com/Zextras/carbonio-design-system/compare/v2.0.0...v2.1.0) (2023-05-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **Banner:** create Banner component ([fbe28f5](https://github.com/Zextras/carbonio-design-system/commit/fbe28f5aa521e5269fdfeca0acaae5192cd4b29d)), closes [#183](https://github.com/Zextras/carbonio-design-system/issues/183)
|
|
11
|
+
* **ChipInput:** remove the default value for the limit of the chip ([1c11e5d](https://github.com/Zextras/carbonio-design-system/commit/1c11e5d82a410958728f420e16447c6732c859ca)), closes [#187](https://github.com/Zextras/carbonio-design-system/issues/187)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **DateTimePicker:** validate typed value of the input ([798700c](https://github.com/Zextras/carbonio-design-system/commit/798700c0e561dbf6b3c8ff116c2c116035f3ba8d)), closes [#185](https://github.com/Zextras/carbonio-design-system/issues/185)
|
|
17
|
+
* enable tooltip children ref ([b3e9b06](https://github.com/Zextras/carbonio-design-system/commit/b3e9b0642e8f3bf2a22987c75c99fbb1fb72d593)), closes [#186](https://github.com/Zextras/carbonio-design-system/issues/186)
|
|
18
|
+
* replace deprecated td tag attributes ([bab7d90](https://github.com/Zextras/carbonio-design-system/commit/bab7d905097e26f130466dec29425ba4f0d4045a)), closes [#184](https://github.com/Zextras/carbonio-design-system/issues/184)
|
|
19
|
+
|
|
5
20
|
## [2.0.0](https://github.com/Zextras/carbonio-design-system/compare/v1.2.0...v2.0.0) (2023-04-17)
|
|
6
21
|
|
|
7
22
|
|
package/dist/zapp-ui.bundle.d.ts
CHANGED
|
@@ -78,6 +78,12 @@ export declare type Action = {
|
|
|
78
78
|
iconType?: IconButtonProps['type'];
|
|
79
79
|
} & IconButtonProps & DropdownItem;
|
|
80
80
|
|
|
81
|
+
declare type ActionButton = ButtonProps & {
|
|
82
|
+
type?: never;
|
|
83
|
+
color?: never;
|
|
84
|
+
backgroundColor?: never;
|
|
85
|
+
};
|
|
86
|
+
|
|
81
87
|
export declare const Avatar: React_2.ForwardRefExoticComponent<AvatarPropTypes & React_2.RefAttributes<HTMLDivElement>>;
|
|
82
88
|
|
|
83
89
|
export declare interface AvatarPropTypes extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -132,6 +138,26 @@ declare type BadgeSkeletonProps = {
|
|
|
132
138
|
backgroundSize?: string;
|
|
133
139
|
};
|
|
134
140
|
|
|
141
|
+
export declare const Banner: React_2.ForwardRefExoticComponent<BannerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
|
|
143
|
+
export declare type BannerProps = HTMLAttributes<HTMLDivElement> & {
|
|
144
|
+
status?: 'success' | 'warning' | 'info' | 'error';
|
|
145
|
+
type?: 'standard' | 'fill' | 'outline';
|
|
146
|
+
title?: string;
|
|
147
|
+
description: string;
|
|
148
|
+
primaryAction?: ActionButton;
|
|
149
|
+
secondaryAction?: ActionButton;
|
|
150
|
+
moreInfoLabel?: string;
|
|
151
|
+
closeLabel?: string;
|
|
152
|
+
children?: never;
|
|
153
|
+
} & ({
|
|
154
|
+
showClose: true;
|
|
155
|
+
onClose: IconButtonProps['onClick'];
|
|
156
|
+
} | {
|
|
157
|
+
showClose?: false;
|
|
158
|
+
onClose?: never;
|
|
159
|
+
});
|
|
160
|
+
|
|
135
161
|
declare type BreadcrumbCollapersProps = {
|
|
136
162
|
all: string;
|
|
137
163
|
} & PaddingProps;
|
|
@@ -339,25 +365,21 @@ export declare type ChipAction = {
|
|
|
339
365
|
type: 'icon';
|
|
340
366
|
});
|
|
341
367
|
|
|
342
|
-
export declare
|
|
343
|
-
_newId?: number;
|
|
344
|
-
};
|
|
368
|
+
export declare const ChipInput: ChipInputType<any>;
|
|
345
369
|
|
|
346
|
-
export declare
|
|
347
|
-
|
|
348
|
-
export declare interface ChipInputProps extends Omit<ContainerProps, 'defaultValue' | 'onChange'> {
|
|
370
|
+
export declare interface ChipInputProps<TValue = unknown> extends Omit<ContainerProps, 'defaultValue' | 'onChange'> {
|
|
349
371
|
/** ref to the input element */
|
|
350
|
-
inputRef?: React_2.
|
|
372
|
+
inputRef?: React_2.ForwardedRef<HTMLInputElement> | null;
|
|
351
373
|
/** HTML input name */
|
|
352
374
|
inputName?: string;
|
|
353
375
|
/** Input Placeholder */
|
|
354
376
|
placeholder?: string;
|
|
355
377
|
/** ChipInput value */
|
|
356
|
-
value?: ChipItem[];
|
|
378
|
+
value?: ChipItem<TValue>[];
|
|
357
379
|
/** ChipInput default value */
|
|
358
|
-
defaultValue?: ChipItem[];
|
|
380
|
+
defaultValue?: ChipItem<TValue>[];
|
|
359
381
|
/** Callback to call when ChipInput's value changes */
|
|
360
|
-
onChange?: (items: ChipItem[]) => void;
|
|
382
|
+
onChange?: (items: ChipItem<TValue>[]) => void;
|
|
361
383
|
/**
|
|
362
384
|
* Dropdown items.
|
|
363
385
|
* If disableOptions is true but options are provided, dropdown is still shown.
|
|
@@ -371,13 +393,13 @@ export declare interface ChipInputProps extends Omit<ContainerProps, 'defaultVal
|
|
|
371
393
|
* - returns the keyup event object with an additional textContent value
|
|
372
394
|
* - the event is debounced using the debounce function from lodash
|
|
373
395
|
*/
|
|
374
|
-
onInputType?: (event: React_2.KeyboardEvent & {
|
|
396
|
+
onInputType?: (event: React_2.KeyboardEvent<HTMLInputElement> & {
|
|
375
397
|
textContent: string | null;
|
|
376
398
|
}) => void;
|
|
377
399
|
/** Debounce value in ms to which debounce the 'onInputType' callback */
|
|
378
400
|
onInputTypeDebounce?: number;
|
|
379
401
|
/** Callback called when a value is going to be added in the Chip Input, should return the configuration for the Chip */
|
|
380
|
-
onAdd?: (value: string | unknown) => ChipItem
|
|
402
|
+
onAdd?: (value: string | unknown) => ChipItem<TValue>;
|
|
381
403
|
/** Set the current input text as a Chip when it loses focus */
|
|
382
404
|
confirmChipOnBlur?: boolean;
|
|
383
405
|
/**
|
|
@@ -395,7 +417,7 @@ export declare interface ChipInputProps extends Omit<ContainerProps, 'defaultVal
|
|
|
395
417
|
* Set the label for the error
|
|
396
418
|
* @deprecated use description instead
|
|
397
419
|
*/
|
|
398
|
-
errorLabel?: string
|
|
420
|
+
errorLabel?: string;
|
|
399
421
|
/** Background color for the error status */
|
|
400
422
|
errorBackgroundColor?: keyof DefaultTheme['palette'];
|
|
401
423
|
/** Set the limit for chip inputs <br />
|
|
@@ -435,9 +457,9 @@ export declare interface ChipInputProps extends Omit<ContainerProps, 'defaultVal
|
|
|
435
457
|
/** Dropdown max height */
|
|
436
458
|
dropdownMaxHeight?: string;
|
|
437
459
|
/** Description for the input */
|
|
438
|
-
description?: string
|
|
460
|
+
description?: string;
|
|
439
461
|
/** Custom Chip component */
|
|
440
|
-
ChipComponent?: React_2.ComponentType<ChipItem
|
|
462
|
+
ChipComponent?: React_2.ComponentType<ChipItem<TValue>>;
|
|
441
463
|
/** allow to create chips from pasted values */
|
|
442
464
|
createChipOnPaste?: boolean;
|
|
443
465
|
/** Chip generation triggers on paste */
|
|
@@ -448,10 +470,14 @@ export declare interface ChipInputProps extends Omit<ContainerProps, 'defaultVal
|
|
|
448
470
|
maxHeight?: string;
|
|
449
471
|
}
|
|
450
472
|
|
|
451
|
-
export declare type
|
|
473
|
+
export declare type ChipInputType<TValue> = React_2.ForwardRefExoticComponent<ChipInputProps<TValue> & React_2.RefAttributes<HTMLDivElement>> & {
|
|
474
|
+
_newId?: number;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
export declare type ChipItem<TValue = unknown> = {
|
|
452
478
|
label?: string;
|
|
453
479
|
} & ChipProps & {
|
|
454
|
-
value?:
|
|
480
|
+
value?: TValue;
|
|
455
481
|
};
|
|
456
482
|
|
|
457
483
|
export declare interface ChipProps extends RowProps {
|
|
@@ -552,7 +578,7 @@ declare interface ContainerElProps {
|
|
|
552
578
|
orientation?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
553
579
|
/** Type of the Container's corners */
|
|
554
580
|
borderRadius?: 'regular' | 'round' | 'half' | 'none';
|
|
555
|
-
borderColor?: string | keyof DefaultTheme['palette']
|
|
581
|
+
borderColor?: string | keyof DefaultTheme['palette'] | Partial<Record<'top' | 'right' | 'bottom' | 'left', string | keyof DefaultTheme['palette']>>;
|
|
556
582
|
/** Container background color */
|
|
557
583
|
background?: string | keyof DefaultTheme['palette'];
|
|
558
584
|
/** Container height: <br/>
|
|
@@ -674,7 +700,7 @@ export declare type CustomModalProps = PickedModal & Omit<HTMLAttributes<HTMLDiv
|
|
|
674
700
|
|
|
675
701
|
export declare const DateTimePicker: React_2.ForwardRefExoticComponent<DateTimePickerProps & React_2.RefAttributes<DatePicker<never, undefined>>>;
|
|
676
702
|
|
|
677
|
-
export declare interface DateTimePickerProps extends Omit<ReactDatePickerProps, 'onChange'> {
|
|
703
|
+
export declare interface DateTimePickerProps extends Omit<ReactDatePickerProps, 'onChange' | 'placeholderText'> {
|
|
678
704
|
/** Input's background color */
|
|
679
705
|
backgroundColor?: keyof DefaultTheme['palette'];
|
|
680
706
|
/** Close icon to clear the Input */
|
|
@@ -703,16 +729,21 @@ export declare interface DateTimePickerProps extends Omit<ReactDatePickerProps,
|
|
|
703
729
|
enableChips?: boolean;
|
|
704
730
|
/** Pass chip props */
|
|
705
731
|
chipProps?: Partial<ChipProps>;
|
|
706
|
-
/**
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
732
|
+
/**
|
|
733
|
+
* Input width: <br/>
|
|
734
|
+
* <li>`fit`: shorthand for fit-content</li>
|
|
735
|
+
* <li>`fill`: semantic alternative for `100%`</li>
|
|
736
|
+
* <li>number: measure in px</li>
|
|
737
|
+
* <li>string: any measure in CSS syntax</li>
|
|
711
738
|
*/
|
|
712
739
|
width?: 'fit' | 'fill' | string | number;
|
|
713
|
-
/**
|
|
740
|
+
/**
|
|
741
|
+
* Use a custom component instead of the default one.
|
|
742
|
+
* The component will be cloned by react-datepicker.
|
|
743
|
+
* See "With Custom Input" section for more details.
|
|
744
|
+
*/
|
|
714
745
|
CustomComponent?: React_2.ComponentType<{
|
|
715
|
-
value?: string
|
|
746
|
+
value?: string;
|
|
716
747
|
onClick?: React_2.ReactEventHandler;
|
|
717
748
|
}>;
|
|
718
749
|
/** Disable the input */
|
|
@@ -1983,7 +2014,7 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
1983
2014
|
svg: IconComponent;
|
|
1984
2015
|
size: ThemeSizeObj;
|
|
1985
2016
|
};
|
|
1986
|
-
palette: Record<'currentColor' | 'transparent' | 'primary' | 'secondary' | 'header' | 'highlight' | 'gray0' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'warning' | 'error' | 'success' | 'info' | 'text' | 'shadow' | 'black' | 'white', ThemeColorObj>;
|
|
2017
|
+
palette: Record<'currentColor' | 'transparent' | 'primary' | 'secondary' | 'header' | 'highlight' | 'gray0' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'warning' | 'error' | 'success' | 'info' | 'text' | 'shadow' | 'successBanner' | 'warningBanner' | 'infoBanner' | 'errorBanner' | 'black' | 'white', ThemeColorObj>;
|
|
1987
2018
|
avatarColors: Record<`avatar_${number}`, string>;
|
|
1988
2019
|
}
|
|
1989
2020
|
|
|
@@ -2030,6 +2061,8 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
|
|
|
2030
2061
|
children: React_2.ReactElement;
|
|
2031
2062
|
/** time before tooltip shows, in milliseconds */
|
|
2032
2063
|
triggerDelay?: number;
|
|
2064
|
+
/** trigger ref that can be used instead of lost children ref caused by cloneElement */
|
|
2065
|
+
triggerRef?: React_2.Ref<HTMLElement>;
|
|
2033
2066
|
}
|
|
2034
2067
|
|
|
2035
2068
|
export declare const Transition: ForwardRefExoticComponent<PropsWithoutRef<TransitionProps> & RefAttributes<HTMLElement>> & {
|