@innovaccer/design-system 4.5.0 → 4.7.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/css/Readme.md +32 -32
  3. package/css/dist/index.css +1163 -1016
  4. package/css/dist/index.css.map +1 -1
  5. package/css/src/ai-components/button.module.css +3 -3
  6. package/css/src/ai-components/chat.module.css +24 -8
  7. package/css/src/ai-components/chip.module.css +38 -15
  8. package/css/src/ai-components/iconButton.module.css +33 -14
  9. package/css/src/components/actionButton.module.css +3 -3
  10. package/css/src/components/actionCard.module.css +4 -4
  11. package/css/src/components/avatar.module.css +15 -15
  12. package/css/src/components/avatarGroup.module.css +9 -9
  13. package/css/src/components/avatarSelection.module.css +15 -15
  14. package/css/src/components/badge.module.css +6 -6
  15. package/css/src/components/breadcrumbs.module.css +4 -4
  16. package/css/src/components/button.module.css +23 -23
  17. package/css/src/components/calendar.module.css +30 -30
  18. package/css/src/components/caption.module.css +2 -2
  19. package/css/src/components/card.module.css +7 -7
  20. package/css/src/components/cardSubdued.module.css +5 -5
  21. package/css/src/components/chat.module.css +8 -8
  22. package/css/src/components/chatBubble.module.css +14 -14
  23. package/css/src/components/chatSeparator.module.css +6 -6
  24. package/css/src/components/checkbox.module.css +22 -22
  25. package/css/src/components/chip.module.css +14 -14
  26. package/css/src/components/chipGroup.module.css +1 -1
  27. package/css/src/components/chipInput.module.css +16 -16
  28. package/css/src/components/choiceList.module.css +4 -4
  29. package/css/src/components/collapsible.module.css +4 -4
  30. package/css/src/components/dateRangePicker.module.css +3 -3
  31. package/css/src/components/dropdown.module.css +25 -25
  32. package/css/src/components/dropdownButton.module.css +12 -12
  33. package/css/src/components/dropzone.module.css +16 -16
  34. package/css/src/components/editableChipInput.module.css +9 -9
  35. package/css/src/components/editableDropdown.module.css +2 -2
  36. package/css/src/components/editableInput.module.css +11 -11
  37. package/css/src/components/emptyState.module.css +11 -11
  38. package/css/src/components/fileList.module.css +10 -10
  39. package/css/src/components/fileUploader.module.css +4 -4
  40. package/css/src/components/fullscreenModal.module.css +7 -7
  41. package/css/src/components/grid.module.css +39 -39
  42. package/css/src/components/horizontalNav.module.css +6 -6
  43. package/css/src/components/inlineMessage.module.css +7 -7
  44. package/css/src/components/input.module.css +15 -15
  45. package/css/src/components/label.module.css +7 -7
  46. package/css/src/components/legend.module.css +2 -2
  47. package/css/src/components/link.module.css +4 -4
  48. package/css/src/components/linkButton.module.css +3 -3
  49. package/css/src/components/listbox.module.css +9 -9
  50. package/css/src/components/menu.module.css +7 -7
  51. package/css/src/components/message.module.css +8 -8
  52. package/css/src/components/metaList.module.css +4 -4
  53. package/css/src/components/meter.module.css +6 -6
  54. package/css/src/components/metricInput.module.css +13 -13
  55. package/css/src/components/modal.module.css +9 -9
  56. package/css/src/components/navigation.module.css +19 -19
  57. package/css/src/components/overlay.module.css +6 -6
  58. package/css/src/components/pageHeader.module.css +8 -8
  59. package/css/src/components/pagination.module.css +9 -9
  60. package/css/src/components/pills.module.css +6 -6
  61. package/css/src/components/placeholder.module.css +3 -3
  62. package/css/src/components/popover.module.css +1 -1
  63. package/css/src/components/progressBar.module.css +24 -4
  64. package/css/src/components/progressRing.module.css +6 -6
  65. package/css/src/components/radio.module.css +31 -31
  66. package/css/src/components/select.module.css +17 -17
  67. package/css/src/components/selectionCard.module.css +12 -12
  68. package/css/src/components/sidesheet.module.css +10 -10
  69. package/css/src/components/slider.module.css +12 -12
  70. package/css/src/components/spinner.module.css +8 -8
  71. package/css/src/components/statusHint.module.css +5 -5
  72. package/css/src/components/stepper.module.css +5 -5
  73. package/css/src/components/subheading.module.css +1 -1
  74. package/css/src/components/switch.module.css +13 -13
  75. package/css/src/components/table.module.css +2 -2
  76. package/css/src/components/tabs.module.css +15 -15
  77. package/css/src/components/textarea.module.css +6 -6
  78. package/css/src/components/toast.module.css +16 -16
  79. package/css/src/components/tooltip.module.css +3 -3
  80. package/css/src/components/verticalNav.module.css +20 -20
  81. package/css/src/core/animation.css +4 -4
  82. package/css/src/utils/border.css +32 -0
  83. package/css/src/utils/spacing.css +270 -270
  84. package/css/src/utils/utility.css +4 -0
  85. package/css/src/variables/index.css +36 -3
  86. package/dist/brotli/index.js +1 -1
  87. package/dist/brotli/index.js.br +0 -0
  88. package/dist/cjs/index.js +1 -1
  89. package/dist/core/ai-components/AIIconButton/icons/SaraIconDefault.d.ts +6 -0
  90. package/dist/core/ai-components/AIIconButton/icons/SaraIconDisabled.d.ts +6 -0
  91. package/dist/core/ai-components/AIResponse/ChatBox.d.ts +7 -1
  92. package/dist/core/ai-components/AIResponse/index.d.ts +3 -0
  93. package/dist/core/components/atoms/heading/Heading.d.ts +2 -2
  94. package/dist/core/components/atoms/progressBar/ProgressBar.d.ts +4 -1
  95. package/dist/core/components/css-utilities/designTokens/Data.d.ts +8 -0
  96. package/dist/core/components/organisms/grid/Grid.d.ts +21 -0
  97. package/dist/core/components/organisms/grid/GridBody.d.ts +9 -1
  98. package/dist/core/components/organisms/grid/VirtualList.d.ts +14 -0
  99. package/dist/core/components/organisms/list/List.d.ts +4 -0
  100. package/dist/core/components/organisms/table/Header.d.ts +2 -0
  101. package/dist/core/components/organisms/table/Table.d.ts +18 -0
  102. package/dist/esm/index.js +1018 -635
  103. package/dist/gzip/index.js +1 -1
  104. package/dist/gzip/index.js.gz +0 -0
  105. package/dist/index.js +765 -398
  106. package/dist/index.js.map +1 -1
  107. package/dist/index.umd.css +1163 -1016
  108. package/dist/index.umd.js +1 -1
  109. package/dist/types/tsconfig.type.tsbuildinfo +68 -82
  110. package/package.json +1 -2
  111. package/types/types-tests.tsx +1 -1
  112. package/dist/core/ai-components/AIIconButton/icons/SaraDisabledBottom.d.ts +0 -6
  113. package/dist/core/ai-components/AIIconButton/icons/SaraDisabledTop.d.ts +0 -6
  114. package/dist/core/ai-components/AIIconButton/icons/SaraIconBottom.d.ts +0 -6
  115. package/dist/core/ai-components/AIIconButton/icons/SaraIconTop.d.ts +0 -6
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type SaraIconType = {
3
+ className?: string;
4
+ };
5
+ declare const SaraIconDefault: (props: SaraIconType) => React.JSX.Element;
6
+ export default SaraIconDefault;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type SaraIconType = {
3
+ className?: string;
4
+ };
5
+ declare const SaraIconDisabled: (props: SaraIconType) => React.JSX.Element;
6
+ export default SaraIconDisabled;
@@ -2,8 +2,14 @@ import * as React from 'react';
2
2
  import { TBaseHtmlProps } from "../common.type";
3
3
  export interface ChatBoxProps extends TBaseHtmlProps<HTMLDivElement> {
4
4
  children: React.ReactNode;
5
+ showGlow?: boolean;
5
6
  'data-test'?: string;
6
7
  className?: string;
7
8
  }
8
- export declare const ChatBox: (props: ChatBoxProps) => React.JSX.Element;
9
+ export declare const ChatBox: {
10
+ (props: ChatBoxProps): React.JSX.Element;
11
+ defaultProps: {
12
+ showGlow: boolean;
13
+ };
14
+ };
9
15
  export default ChatBox;
@@ -2,6 +2,9 @@ import * as React from 'react';
2
2
  import { TBaseHtmlProps } from "../common.type";
3
3
  export interface AIResponseProps extends TBaseHtmlProps<HTMLDivElement> {
4
4
  children: React.ReactNode;
5
+ showAvatar?: boolean;
6
+ metaData?: () => JSX.Element;
7
+ showGlow?: boolean;
5
8
  'data-test'?: string;
6
9
  className?: string;
7
10
  }
@@ -4,8 +4,8 @@ import { HeadingAppearance, TextColor } from "../../../common.type";
4
4
  export declare type HeadingSize = 's' | 'm' | 'l' | 'xl' | 'xxl';
5
5
  export interface HeadingProps extends BaseProps, BaseHtmlProps<HTMLHeadingElement> {
6
6
  children: React.ReactText;
7
- appearance: HeadingAppearance;
8
- size: HeadingSize;
7
+ appearance?: HeadingAppearance;
8
+ size?: HeadingSize;
9
9
  color?: TextColor;
10
10
  }
11
11
  export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -1,10 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { BaseProps } from "../../../utils/types";
3
3
  export declare type ProgressBarSize = 'small' | 'regular';
4
+ export declare type ProgressBarState = 'default' | 'indeterminate';
4
5
  export interface ProgressBarProps extends BaseProps {
5
- value: number;
6
+ value?: number;
6
7
  max: number;
7
8
  size: ProgressBarSize;
9
+ state?: ProgressBarState;
8
10
  }
9
11
  export declare const ProgressBar: {
10
12
  (props: ProgressBarProps): React.JSX.Element;
@@ -12,6 +14,7 @@ export declare const ProgressBar: {
12
14
  defaultProps: {
13
15
  max: number;
14
16
  size: string;
17
+ state: string;
15
18
  };
16
19
  };
17
20
  export default ProgressBar;
@@ -55,3 +55,11 @@ export declare const opacityData: {
55
55
  token: string;
56
56
  value: string;
57
57
  }[];
58
+ export declare const borderRadiusData: {
59
+ token: string;
60
+ value: string;
61
+ }[];
62
+ export declare const borderWidthData: {
63
+ token: string;
64
+ value: string;
65
+ }[];
@@ -25,6 +25,7 @@ export declare type fetchDataFunction = (options: FetchDataOptions) => Promise<{
25
25
  count: number;
26
26
  data: Data;
27
27
  schema: Schema;
28
+ totalRowsCount?: number;
28
29
  }>;
29
30
  export declare type updateSortingListFunction = (newSortingList: GridProps['sortingList']) => void;
30
31
  export declare type updateFilterListFunction = (newFilterList: GridProps['filterList']) => void;
@@ -73,6 +74,17 @@ export declare type GridSize = 'comfortable' | 'standard' | 'compressed' | 'tigh
73
74
  export declare type GridType = 'resource' | 'data';
74
75
  export declare type Data = RowData[];
75
76
  export declare type Schema = ColumnSchema[];
77
+ export declare type thresholdTypes = 'early' | 'balanced' | 'lazy' | 'at-end';
78
+ export interface VirtualRowProps {
79
+ visibleRows?: number;
80
+ buffer?: number;
81
+ }
82
+ export interface InfiniteScrollProps {
83
+ fetchRowsCount: number;
84
+ fetchThreshold: thresholdTypes;
85
+ fetchErrorRenderer?: (fetchNextRowsFn: () => Promise<void>) => React.ReactNode;
86
+ retryFetchRenderer?: () => React.ReactNode;
87
+ }
76
88
  export interface GridProps extends BaseProps {
77
89
  size: GridSize;
78
90
  type: GridType;
@@ -112,6 +124,15 @@ export interface GridProps extends BaseProps {
112
124
  headCellTooltip?: boolean;
113
125
  separator?: boolean;
114
126
  showFilters: boolean;
127
+ enableRowVirtualization?: boolean;
128
+ virtualRowOptions: VirtualRowProps;
129
+ enableInfiniteScroll?: boolean;
130
+ infiniteScrollOptions: InfiniteScrollProps;
131
+ onScroll?: (event: Event) => void;
132
+ fetchDataOnScroll?: (props: {
133
+ page: number;
134
+ rowsCount: number;
135
+ }) => Promise<Data>;
115
136
  }
116
137
  export interface GridState {
117
138
  init: boolean;
@@ -1,9 +1,17 @@
1
+ import * as React from 'react';
1
2
  import { GridState, onSelectFn, Schema, updatePrevPageInfoFunction } from "./Grid";
3
+ import { GridProps } from "../../../index.type";
2
4
  export interface GridBodyProps {
3
5
  schema: Schema;
4
6
  onSelect: onSelectFn;
5
7
  prevPageInfo: GridState['prevPageInfo'];
6
8
  updatePrevPageInfo: updatePrevPageInfoFunction;
9
+ virtualRowOptions: GridProps['virtualRowOptions'];
10
+ infiniteScrollOptions: GridProps['infiniteScrollOptions'];
11
+ enableInfiniteScroll?: GridProps['enableInfiniteScroll'];
12
+ onScroll?: GridProps['onScroll'];
13
+ fetchDataOnScroll?: GridProps['fetchDataOnScroll'];
14
+ enableRowVirtualization?: GridProps['enableRowVirtualization'];
7
15
  }
8
- export declare const GridBody: (props: GridBodyProps) => any;
16
+ export declare const GridBody: (props: GridBodyProps) => React.JSX.Element;
9
17
  export default GridBody;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { BaseProps } from "../../../utils/types";
3
+ export declare const isElementInView: (container: HTMLElement, element: Element) => boolean;
4
+ interface VirtualScrollProps extends BaseProps {
5
+ buffer?: number;
6
+ length?: number;
7
+ offset?: number;
8
+ minItemHeight: number;
9
+ totalLength: number;
10
+ renderItem: (index: number, item?: object) => React.ReactElement;
11
+ onScroll?: (event: Event, element: HTMLElement) => void;
12
+ }
13
+ declare const VirtualList: (props: VirtualScrollProps) => React.JSX.Element;
14
+ export default VirtualList;
@@ -31,6 +31,10 @@ export declare const List: {
31
31
  searchDebounceDuration: number;
32
32
  pageJumpDebounceDuration: number;
33
33
  errorTemplate: (props: import("../table").ErrorTemplateProps) => React.JSX.Element;
34
+ infiniteScrollOptions: {
35
+ fetchRowsCount: number;
36
+ fetchThreshold: string;
37
+ };
34
38
  };
35
39
  };
36
40
  export default List;
@@ -36,6 +36,8 @@ export interface HeaderProps extends ExternalHeaderProps {
36
36
  onClearSelection?: () => void;
37
37
  onSelectAllRows?: () => void;
38
38
  uniqueColumnName?: string;
39
+ totalRowsCount?: number;
40
+ enableInfiniteScroll?: boolean;
39
41
  }
40
42
  export declare const Header: {
41
43
  (props: HeaderProps): React.JSX.Element;
@@ -49,6 +49,11 @@ interface SharedTableProps extends BaseProps {
49
49
  selectDisabledRow?: boolean;
50
50
  uniqueColumnName?: string;
51
51
  checkboxAlignment?: 'top' | 'center' | 'bottom';
52
+ enableRowVirtualization?: GridProps['enableRowVirtualization'];
53
+ virtualRowOptions?: GridProps['virtualRowOptions'];
54
+ enableInfiniteScroll?: GridProps['enableInfiniteScroll'];
55
+ infiniteScrollOptions?: GridProps['infiniteScrollOptions'];
56
+ onScroll?: GridProps['onScroll'];
52
57
  }
53
58
  export declare type SyncTableProps = SharedTableProps & TableSyncProps;
54
59
  export declare type AsyncTableProps = SharedTableProps & AsyncProps;
@@ -67,6 +72,7 @@ interface TableState {
67
72
  loading: TableProps['loading'];
68
73
  error: TableProps['error'];
69
74
  errorType?: TableProps['errorType'];
75
+ totalRowsCount?: number;
70
76
  }
71
77
  export declare const defaultProps: {
72
78
  type: string;
@@ -92,6 +98,10 @@ export declare const defaultProps: {
92
98
  searchDebounceDuration: number;
93
99
  pageJumpDebounceDuration: number;
94
100
  errorTemplate: (props: ErrorTemplateProps) => React.JSX.Element;
101
+ infiniteScrollOptions: {
102
+ fetchRowsCount: number;
103
+ fetchThreshold: string;
104
+ };
95
105
  };
96
106
  export declare class Table extends React.Component<TableProps, TableState> {
97
107
  static defaultProps: {
@@ -118,6 +128,10 @@ export declare class Table extends React.Component<TableProps, TableState> {
118
128
  searchDebounceDuration: number;
119
129
  pageJumpDebounceDuration: number;
120
130
  errorTemplate: (props: ErrorTemplateProps) => React.JSX.Element;
131
+ infiniteScrollOptions: {
132
+ fetchRowsCount: number;
133
+ fetchThreshold: string;
134
+ };
121
135
  };
122
136
  debounceUpdate: () => void;
123
137
  selectedRowsRef: React.MutableRefObject<any>;
@@ -127,6 +141,10 @@ export declare class Table extends React.Component<TableProps, TableState> {
127
141
  componentDidMount(): void;
128
142
  componentDidUpdate(prevProps: TableProps, prevState: TableState): void;
129
143
  updateData: (searchUpdate?: boolean | undefined) => void;
144
+ fetchDataOnScroll: (props: {
145
+ page: number;
146
+ rowsCount: number;
147
+ }) => Promise<Data>;
130
148
  updateDataFn: () => void;
131
149
  onSelect: onSelectFn;
132
150
  onSelectAll: onSelectAllFunction;