@innovaccer/design-system 4.11.2 → 4.13.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 +101 -0
- package/css/dist/index.css +209 -26
- package/css/dist/index.css.map +1 -1
- package/css/src/components/button.module.css +2 -0
- package/css/src/components/chip.module.css +10 -2
- package/css/src/components/chipInput.module.css +36 -8
- package/css/src/components/editableInput.module.css +7 -2
- package/css/src/components/input.module.css +8 -0
- package/css/src/components/label.module.css +7 -0
- package/css/src/components/link.module.css +1 -0
- package/css/src/components/menu.module.css +7 -0
- package/css/src/components/message.module.css +30 -2
- package/css/src/components/metricInput.module.css +66 -9
- package/css/src/components/select.module.css +22 -1
- package/css/src/components/statusHint.module.css +1 -2
- package/css/src/components/textarea.module.css +6 -0
- package/css/src/components/tooltip.module.css +4 -0
- package/dist/brotli/index.js +1 -1
- package/dist/brotli/index.js.br +0 -0
- package/dist/cjs/index.js +1 -1
- package/dist/core/common.type.d.ts +1 -0
- package/dist/core/components/atoms/_chip/index.d.ts +2 -1
- package/dist/core/components/atoms/badge/Badge.d.ts +2 -2
- package/dist/core/components/atoms/chip/Chip.d.ts +2 -0
- package/dist/core/components/atoms/label/Label.d.ts +2 -0
- package/dist/core/components/atoms/message/Message.d.ts +2 -0
- package/dist/core/components/atoms/metricInput/MetricInput.d.ts +1 -1
- package/dist/core/components/atoms/statusHint/StatusHint.d.ts +2 -0
- package/dist/core/components/atoms/textarea/Textarea.d.ts +2 -0
- package/dist/core/components/molecules/chipInput/ChipInput.d.ts +2 -0
- package/dist/core/components/molecules/editableChipInput/EditableChipInput.d.ts +2 -0
- package/dist/core/components/molecules/tooltip/Tooltip.d.ts +2 -0
- package/dist/core/components/organisms/grid/Cell.d.ts +7 -2
- package/dist/core/components/organisms/grid/Grid.d.ts +3 -0
- package/dist/core/components/organisms/grid/GridContext.d.ts +2 -0
- package/dist/core/components/organisms/grid/utility.d.ts +1 -0
- package/dist/core/components/organisms/menu/MenuList.d.ts +3 -0
- package/dist/core/components/organisms/select/SelectContext.d.ts +2 -1
- package/dist/core/components/organisms/table/Header.d.ts +2 -0
- package/dist/core/components/organisms/verticalNav/MenuItem.d.ts +1 -0
- package/dist/core/components/organisms/verticalNav/VerticalNav.d.ts +1 -0
- package/dist/esm/index.js +464 -280
- package/dist/gzip/index.js +1 -1
- package/dist/gzip/index.js.gz +0 -0
- package/dist/index.js +505 -325
- package/dist/index.js.map +1 -1
- package/dist/index.umd.css +209 -26
- package/dist/index.umd.js +1 -1
- package/dist/types/tsconfig.type.tsbuildinfo +66 -62
- package/package.json +1 -1
|
@@ -22,3 +22,4 @@ export declare type OptionType = {
|
|
|
22
22
|
export declare type TListboxSize = 'standard' | 'compressed' | 'tight';
|
|
23
23
|
export declare type TEmptyStateSize = 'standard' | 'compressed' | 'tight' | 'large' | 'small';
|
|
24
24
|
export declare type TTabSize = 'regular' | 'small';
|
|
25
|
+
export declare type TChipSize = 'regular' | 'small';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Name } from "../chip/Chip";
|
|
3
3
|
import { BaseProps } from "../../../utils/types";
|
|
4
|
-
import { IconType } from "../../../common.type";
|
|
4
|
+
import { IconType, TChipSize } from "../../../common.type";
|
|
5
5
|
export interface GenericChipProps extends BaseProps {
|
|
6
6
|
label: string | React.ReactElement;
|
|
7
7
|
labelPrefix?: string;
|
|
@@ -14,6 +14,7 @@ export interface GenericChipProps extends BaseProps {
|
|
|
14
14
|
iconType?: IconType;
|
|
15
15
|
name: Name;
|
|
16
16
|
maxWidth: string | number;
|
|
17
|
+
size?: TChipSize;
|
|
17
18
|
}
|
|
18
19
|
export declare const GenericChip: {
|
|
19
20
|
(props: GenericChipProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BaseProps } from "../../../utils/types";
|
|
2
|
+
import { BaseProps, BaseHtmlProps } from "../../../utils/types";
|
|
3
3
|
import { AccentAppearance } from "../../../common.type";
|
|
4
|
-
export interface BadgeProps extends BaseProps {
|
|
4
|
+
export interface BadgeProps extends BaseProps, BaseHtmlProps<HTMLSpanElement> {
|
|
5
5
|
appearance: AccentAppearance;
|
|
6
6
|
subtle?: boolean;
|
|
7
7
|
children: React.ReactText;
|
|
@@ -3,11 +3,13 @@ import { BaseProps } from "../../../utils/types";
|
|
|
3
3
|
import { IconType } from "../../../common.type";
|
|
4
4
|
export declare type ChipType = 'action' | 'selection' | 'input';
|
|
5
5
|
export declare type Name = number | string | object;
|
|
6
|
+
export declare type ChipSize = 'regular' | 'small';
|
|
6
7
|
export interface ChipProps extends BaseProps {
|
|
7
8
|
label: string | React.ReactElement;
|
|
8
9
|
labelPrefix?: string;
|
|
9
10
|
icon?: string;
|
|
10
11
|
iconType?: IconType;
|
|
12
|
+
size?: ChipSize;
|
|
11
13
|
clearButton?: boolean;
|
|
12
14
|
disabled?: boolean;
|
|
13
15
|
selected?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseHtmlProps, BaseProps } from "../../../utils/types";
|
|
3
|
+
declare type LabelSize = 'small' | 'regular';
|
|
3
4
|
export interface LabelProps extends BaseProps, BaseHtmlProps<HTMLLabelElement> {
|
|
4
5
|
children: React.ReactNode;
|
|
5
6
|
disabled?: boolean;
|
|
@@ -7,6 +8,7 @@ export interface LabelProps extends BaseProps, BaseHtmlProps<HTMLLabelElement> {
|
|
|
7
8
|
optional?: boolean;
|
|
8
9
|
withInput?: boolean;
|
|
9
10
|
info?: string;
|
|
11
|
+
size?: LabelSize;
|
|
10
12
|
}
|
|
11
13
|
export declare const Label: {
|
|
12
14
|
(props: LabelProps): React.JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseProps } from "../../../utils/types";
|
|
3
3
|
import { MessageAppearance } from "../../../common.type";
|
|
4
|
+
declare type MessageSize = 'small' | 'regular';
|
|
4
5
|
export interface MessageProps extends BaseProps {
|
|
5
6
|
appearance: MessageAppearance;
|
|
6
7
|
title?: string;
|
|
8
|
+
size?: MessageSize;
|
|
7
9
|
children?: React.ReactNode;
|
|
8
10
|
description: string;
|
|
9
11
|
actions?: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseHtmlProps, BaseProps } from "../../../utils/types";
|
|
3
3
|
import { AutoComplete, IconType } from "../../../common.type";
|
|
4
|
-
export declare type MetricInputSize = 'regular' | 'large';
|
|
4
|
+
export declare type MetricInputSize = 'small' | 'regular' | 'large';
|
|
5
5
|
export interface MetricInputProps extends BaseProps, BaseHtmlProps<HTMLInputElement> {
|
|
6
6
|
name?: string;
|
|
7
7
|
value?: React.ReactText;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseProps } from "../../../utils/types";
|
|
3
3
|
import { MessageAppearance } from "../../../common.type";
|
|
4
|
+
declare type StatusHintSize = 'small' | 'regular';
|
|
4
5
|
export interface StatusHintProps extends BaseProps {
|
|
5
6
|
children: React.ReactText | React.ReactNode;
|
|
7
|
+
size?: StatusHintSize;
|
|
6
8
|
appearance: MessageAppearance;
|
|
7
9
|
truncateLabel?: boolean;
|
|
8
10
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseHtmlProps, BaseProps } from "../../../utils/types";
|
|
3
|
+
declare type TextareaSize = 'small' | 'regular';
|
|
3
4
|
export interface TextareaProps extends BaseProps, BaseHtmlProps<HTMLTextAreaElement> {
|
|
4
5
|
name?: string;
|
|
5
6
|
value?: string;
|
|
7
|
+
size?: TextareaSize;
|
|
6
8
|
defaultValue?: string;
|
|
7
9
|
placeholder?: string;
|
|
8
10
|
rows?: number;
|
|
@@ -9,9 +9,11 @@ declare type ChipOptions = {
|
|
|
9
9
|
maxWidth?: ChipProps['maxWidth'];
|
|
10
10
|
onClick?: (value: string, index: number) => void;
|
|
11
11
|
};
|
|
12
|
+
export declare type ChipInputSize = 'regular' | 'small';
|
|
12
13
|
export interface ChipInputProps extends BaseProps {
|
|
13
14
|
allowDuplicates: boolean;
|
|
14
15
|
chipOptions: ChipOptions;
|
|
16
|
+
size?: ChipInputSize;
|
|
15
17
|
disabled?: boolean;
|
|
16
18
|
error?: boolean;
|
|
17
19
|
placeholder?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseProps } from "../../../utils/types";
|
|
3
3
|
import { ChipInputProps } from "../../../index.type";
|
|
4
|
+
export declare type EditableChipInputSize = 'regular' | 'small';
|
|
4
5
|
export interface EditableChipInputProps extends BaseProps {
|
|
5
6
|
placeholder: string;
|
|
6
7
|
value?: string[];
|
|
8
|
+
size?: 'regular' | 'small';
|
|
7
9
|
onChange?: (chips: string[]) => void;
|
|
8
10
|
disableSaveAction?: boolean;
|
|
9
11
|
chipInputOptions: Omit<ChipInputProps, 'placeholder' | 'value' | 'defaultValue'>;
|
|
@@ -4,8 +4,10 @@ import { BaseProps } from "../../../utils/types";
|
|
|
4
4
|
declare type Position = 'top-start' | 'top' | 'top-end' | 'right' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left';
|
|
5
5
|
declare const tooltipPropsList: readonly ["trigger", "on", "open", "offset", "onToggle", "dark", "customStyle", "closeOnBackdropClick", "hideOnReferenceEscape", "closeOnScroll"];
|
|
6
6
|
declare type TooltipPopperProps = (typeof tooltipPropsList)[number];
|
|
7
|
+
declare type TooltipSize = 'small' | 'regular';
|
|
7
8
|
export interface TooltipProps extends Omit<PopoverProps, TooltipPopperProps>, BaseProps {
|
|
8
9
|
tooltip: string;
|
|
10
|
+
size?: TooltipSize;
|
|
9
11
|
showTooltip?: boolean;
|
|
10
12
|
children: PopoverProps['trigger'];
|
|
11
13
|
position: Position;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { RowData, ColumnSchema } from "./Grid";
|
|
2
|
+
import { RowData, ColumnSchema, SortType } from "./Grid";
|
|
3
3
|
import { GridHeadProps } from "./GridHead";
|
|
4
4
|
interface SharedCellProps {
|
|
5
5
|
schema: ColumnSchema;
|
|
@@ -19,7 +19,12 @@ declare type BodyCellProps = SharedCellProps & {
|
|
|
19
19
|
rowIndex: number;
|
|
20
20
|
expandedState: [boolean, React.Dispatch<React.SetStateAction<boolean>>];
|
|
21
21
|
};
|
|
22
|
-
export declare type HeaderCellRendererProps = HeaderCellProps & SharedCellProps
|
|
22
|
+
export declare type HeaderCellRendererProps = HeaderCellProps & SharedCellProps & {
|
|
23
|
+
sortingList: {
|
|
24
|
+
name: ColumnSchema['name'];
|
|
25
|
+
type: SortType;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
23
28
|
export declare type CellProps = Partial<HeaderCellProps> & Partial<BodyCellProps> & SharedCellProps & {
|
|
24
29
|
isHead?: boolean;
|
|
25
30
|
firstCell: boolean;
|
|
@@ -142,6 +142,7 @@ export interface GridProps extends BaseProps {
|
|
|
142
142
|
export interface GridState {
|
|
143
143
|
init: boolean;
|
|
144
144
|
prevPageInfo: PageInfo;
|
|
145
|
+
isSortingListUpdated: boolean;
|
|
145
146
|
}
|
|
146
147
|
export declare class Grid extends React.Component<GridProps, GridState> {
|
|
147
148
|
static defaultProps: GridProps;
|
|
@@ -161,6 +162,8 @@ export declare class Grid extends React.Component<GridProps, GridState> {
|
|
|
161
162
|
updateColumnSchema: updateColumnSchemaFunction;
|
|
162
163
|
reorderColumn: reorderColumnFunction;
|
|
163
164
|
updateSortingList: (sortingList: GridProps['sortingList']) => void;
|
|
165
|
+
scrollToTop: () => void;
|
|
166
|
+
updateIsSortingListUpdated: () => void;
|
|
164
167
|
updateFilterList: (filterList: GridProps['filterList']) => void;
|
|
165
168
|
onMenuChange: onMenuChangeFn;
|
|
166
169
|
onFilterChange: onFilterChangeFn;
|
|
@@ -3,6 +3,8 @@ import { GridProps } from "../../../index.type";
|
|
|
3
3
|
import { GridRef } from "./Grid";
|
|
4
4
|
declare type ContextProps = GridProps & {
|
|
5
5
|
ref: GridRef;
|
|
6
|
+
isSortingListUpdated: boolean;
|
|
7
|
+
updateIsSortingListUpdated: () => void;
|
|
6
8
|
};
|
|
7
9
|
declare const context: React.Context<ContextProps>;
|
|
8
10
|
export declare const GridProvider: React.Provider<ContextProps>;
|
|
@@ -11,3 +11,4 @@ export declare const getSelectAll: (tableData: Data, selectDisabledRow?: boolean
|
|
|
11
11
|
export declare const hasSchema: (schema: Schema) => boolean;
|
|
12
12
|
export declare const getSchema: (schema: GridProps['schema'], loading: GridProps['loading'], loaderSchema: GridProps['loaderSchema']) => GridProps['schema'];
|
|
13
13
|
export declare const getPluralSuffix: (count: number) => "" | "s";
|
|
14
|
+
export declare const isScrollAtTop: (enableRowVirtualization?: boolean | undefined, ref?: HTMLDivElement | undefined) => boolean;
|
|
@@ -7,6 +7,9 @@ export interface MenuListProps extends BaseProps {
|
|
|
7
7
|
tagName?: TagType;
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
+
export declare const MenuListContext: React.Context<{
|
|
11
|
+
size?: "standard" | "compressed" | "tight" | undefined;
|
|
12
|
+
}>;
|
|
10
13
|
export declare const MenuList: {
|
|
11
14
|
(props: MenuListProps): React.JSX.Element;
|
|
12
15
|
defaultProps: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { OptionType } from "../../../common.type";
|
|
2
|
+
import { OptionType, TListboxSize } from "../../../common.type";
|
|
3
3
|
export declare type ContextProps = {
|
|
4
4
|
openPopover?: boolean;
|
|
5
5
|
setOpenPopover?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -20,6 +20,7 @@ export declare type ContextProps = {
|
|
|
20
20
|
setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>>;
|
|
21
21
|
setHighlightFirstItem?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
22
22
|
setHighlightLastItem?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
23
|
+
size?: TListboxSize;
|
|
23
24
|
};
|
|
24
25
|
export declare const SelectContext: React.Context<ContextProps>;
|
|
25
26
|
export default SelectContext;
|
|
@@ -9,6 +9,8 @@ export interface ExternalHeaderProps {
|
|
|
9
9
|
customSelectionLabel?: string;
|
|
10
10
|
globalActionRenderer?: (data: Data) => React.ReactNode;
|
|
11
11
|
selectionActionRenderer?: (selectedRows: RowData[], selectAll?: boolean) => React.ReactNode;
|
|
12
|
+
selectedLabelRenderer?: (context: Record<string, any>) => string;
|
|
13
|
+
unSelectedLabelRenderer?: (context: Record<string, any>) => string;
|
|
12
14
|
}
|
|
13
15
|
export declare type updateSearchTermFunction = (newSearchTerm: string) => void;
|
|
14
16
|
export interface HeaderProps extends ExternalHeaderProps {
|
|
@@ -11,6 +11,7 @@ export interface MenuItemProps extends BaseProps {
|
|
|
11
11
|
isChildrenVisible?: boolean;
|
|
12
12
|
onClick?: (menu: Menu) => void;
|
|
13
13
|
customItemRenderer?: (props: MenuItemProps) => JSX.Element;
|
|
14
|
+
customOptionRenderer?: (props: MenuItemProps) => JSX.Element;
|
|
14
15
|
}
|
|
15
16
|
export declare const MenuItem: {
|
|
16
17
|
(props: MenuItemProps): React.JSX.Element | null;
|
|
@@ -10,6 +10,7 @@ export interface VerticalNavProps extends BaseProps {
|
|
|
10
10
|
expanded: boolean;
|
|
11
11
|
autoCollapse: boolean;
|
|
12
12
|
customItemRenderer?: (props: MenuItemProps) => JSX.Element;
|
|
13
|
+
customOptionRenderer?: (props: MenuItemProps) => JSX.Element;
|
|
13
14
|
showTooltip: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare const VerticalNav: {
|