onekijs-ui 0.18.2 → 0.19.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/dist/components/accordion/AccordionService.d.ts +2 -1
- package/dist/components/accordion/components/AccordionComponent.d.ts +1 -1
- package/dist/components/accordion/hooks/useAccordionPanel.d.ts +1 -1
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/typings.d.ts +5 -3
- package/dist/components/button/typings.d.ts +1 -0
- package/dist/components/icon/RefreshIcon.d.ts +4 -0
- package/dist/components/list/components/CollectionListComponent.d.ts +1 -1
- package/dist/components/list/components/ListBodyComponent.d.ts +1 -1
- package/dist/components/list/components/LoadingItem.d.ts +1 -0
- package/dist/components/list/components/VirtualListComponent.d.ts +1 -1
- package/dist/components/table/components/TableActionComponent.d.ts +3 -0
- package/dist/components/table/components/TableLoadingComponent.d.ts +1 -1
- package/dist/components/table/components/TableLoadingRowComponent.d.ts +2 -1
- package/dist/components/table/typings.d.ts +5 -0
- package/dist/index.js +190 -60
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +190 -60
- package/dist/index.module.js.map +1 -1
- package/dist/styles/border.d.ts +1 -1
- package/dist/styles/size.d.ts +6 -6
- package/dist/styles/typings.d.ts +21 -7
- package/dist/styles/typography.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/accordion/AccordionService.ts +21 -6
- package/src/components/accordion/components/AccordionComponent.tsx +2 -2
- package/src/components/accordion/components/AccordionPanel.tsx +6 -3
- package/src/components/accordion/hooks/useAccordionPanel.ts +2 -2
- package/src/components/accordion/index.ts +1 -1
- package/src/components/accordion/style.ts +2 -2
- package/src/components/accordion/typings.ts +5 -3
- package/src/components/button/style.ts +16 -7
- package/src/components/button/typings.ts +1 -0
- package/src/components/icon/RefreshIcon.tsx +41 -0
- package/src/components/list/components/CollectionListComponent.tsx +1 -1
- package/src/components/list/components/ListBodyComponent.tsx +18 -5
- package/src/components/list/components/LoadingItem.tsx +4 -2
- package/src/components/list/components/VirtualListComponent.tsx +2 -2
- package/src/components/list/hooks/useListView.tsx +4 -1
- package/src/components/notifications/components/NotificationsComponent.tsx +7 -1
- package/src/components/notifications/style.ts +13 -2
- package/src/components/select/components/SelectOptionComponent.tsx +4 -2
- package/src/components/table/components/ControllerTableComponent.tsx +38 -19
- package/src/components/table/components/TableActionComponent.tsx +22 -0
- package/src/components/table/components/TableBodyComponent.tsx +12 -4
- package/src/components/table/components/TableBodyRowComponent.tsx +15 -14
- package/src/components/table/components/TableLoadingComponent.tsx +1 -1
- package/src/components/table/components/TableLoadingRowComponent.tsx +7 -3
- package/src/components/table/style.ts +16 -1
- package/src/components/table/typings.ts +5 -0
- package/src/styles/typings.ts +21 -7
- package/src/theme/base.tsx +21 -7
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DefaultService } from 'onekijs-framework';
|
|
2
2
|
import { AccordionState } from './typings';
|
|
3
3
|
export declare class AccordionService extends DefaultService<AccordionState> {
|
|
4
|
-
initPanel(uid: string, initialActive?: boolean): void;
|
|
4
|
+
initPanel(uid: string, initialActive?: boolean, initialExpand?: boolean): void;
|
|
5
|
+
activate(uid: string): void;
|
|
5
6
|
collapse(uid: string): void;
|
|
6
7
|
expand(uid: string): void;
|
|
7
8
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AccordionPanelState } from '../typings';
|
|
2
|
-
declare const useAccordionPanel: (initialActive?: boolean) => AccordionPanelState | undefined;
|
|
2
|
+
declare const useAccordionPanel: (initialActive?: boolean, initialExpand?: boolean) => AccordionPanelState | undefined;
|
|
3
3
|
export default useAccordionPanel;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnonymousObject, AnyFunction, FCC } from 'onekijs-framework';
|
|
2
2
|
export type AccordionPanelProps<T = string> = {
|
|
3
3
|
initialActive?: boolean;
|
|
4
|
+
initialExpand?: boolean;
|
|
4
5
|
title: T;
|
|
5
6
|
Component?: FCC<AccordionPanelTitleProps<T>>;
|
|
6
7
|
link?: string;
|
|
@@ -16,6 +17,7 @@ export type AccordionPanelState = {
|
|
|
16
17
|
uid: string;
|
|
17
18
|
collapsing?: boolean;
|
|
18
19
|
expanding?: boolean;
|
|
20
|
+
expanded?: boolean;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* @group Accordion
|
|
@@ -34,14 +36,14 @@ export type AccordionProps = {
|
|
|
34
36
|
/**
|
|
35
37
|
* @defaultValue false
|
|
36
38
|
*/
|
|
37
|
-
|
|
39
|
+
multiExpand?: boolean;
|
|
38
40
|
/**
|
|
39
41
|
* @defaultValue 150
|
|
40
42
|
*/
|
|
41
43
|
animate?: number;
|
|
42
44
|
/**
|
|
43
45
|
* push means that the height of the accordion panel is derived from the height of its content
|
|
44
|
-
* pushToBottom means that the height of the accordion panel is the remaining space given by the accordion's container after removing the space taken by the other accordion panel titles (do not work if
|
|
46
|
+
* pushToBottom means that the height of the accordion panel is the remaining space given by the accordion's container after removing the space taken by the other accordion panel titles (do not work if multiExpand is true)
|
|
45
47
|
*
|
|
46
48
|
* @defaultValue push
|
|
47
49
|
*/
|
|
@@ -49,7 +51,7 @@ export type AccordionProps = {
|
|
|
49
51
|
};
|
|
50
52
|
export type AccordionState = {
|
|
51
53
|
panels: AnonymousObject<AccordionPanelState>;
|
|
52
|
-
|
|
54
|
+
multiExpand?: boolean;
|
|
53
55
|
animate: number;
|
|
54
56
|
mode?: 'push' | 'pushToBottom';
|
|
55
57
|
};
|
|
@@ -7,6 +7,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
7
7
|
pattern?: 'solid' | 'outline' | 'flat';
|
|
8
8
|
IconComponent?: React.FC<ButtonProps>;
|
|
9
9
|
loading?: boolean;
|
|
10
|
+
size?: 'small' | 'medium' | 'large';
|
|
10
11
|
}
|
|
11
12
|
export interface SubmitButtonProps extends ButtonProps {
|
|
12
13
|
showErrors?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CollectionListProps, ListItem } from '../typings';
|
|
3
|
-
declare const CollectionListComponent: <T = any, I extends ListItem<T> = ListItem<T>>({ autoRefresh, className, controller, follow, height, ItemComponent, ItemLoadingComponent, ItemContentComponent, NotFoundComponent, itemHeight, preload, keyboardNavigable, increment, multiSelect, onItemActivate, onItemHighlight, onItemSelect, onItemDeactivate, onItemUnhighlight, onItemUnselect, paddingEnd, paddingStart, virtual, style, tail, }: CollectionListProps<T, I>) => React.JSX.Element;
|
|
3
|
+
declare const CollectionListComponent: <T extends unknown = any, I extends ListItem<T> = ListItem<T>>({ autoRefresh, className, controller, follow, height, ItemComponent, ItemLoadingComponent, ItemContentComponent, NotFoundComponent, itemHeight, preload, keyboardNavigable, increment, multiSelect, onItemActivate, onItemHighlight, onItemSelect, onItemDeactivate, onItemUnhighlight, onItemUnselect, paddingEnd, paddingStart, virtual, style, tail, }: CollectionListProps<T, I>) => React.JSX.Element;
|
|
4
4
|
export default CollectionListComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListBodyProps, ListItem } from '../typings';
|
|
3
|
-
declare const ListBodyComponent: <T = any, I extends ListItem<T> = ListItem<T>>({ autoRefresh, bodyRef, className, follow, height, items, ItemComponent, ItemLoadingComponent, ItemContentComponent, NotFoundComponent, keyboardNavigable, ListComponent, multiSelect, onItemActivate, onItemDeactivate, onItemSelect, onItemUnselect, onItemHighlight, onItemUnhighlight, parentRef, scrollToIndex, service, state, style, tail, totalSize, virtualItems, VirtualListComponent, LoadingComponent, }: ListBodyProps<T, I>) => React.JSX.Element | null;
|
|
3
|
+
declare const ListBodyComponent: <T extends unknown = any, I extends ListItem<T> = ListItem<T>>({ autoRefresh, bodyRef, className, follow, height, items, ItemComponent, ItemLoadingComponent, ItemContentComponent, NotFoundComponent, keyboardNavigable, ListComponent, multiSelect, onItemActivate, onItemDeactivate, onItemSelect, onItemUnselect, onItemHighlight, onItemUnhighlight, parentRef, scrollToIndex, service, state, style, tail, totalSize, virtualItems, VirtualListComponent, LoadingComponent, }: ListBodyProps<T, I>) => React.JSX.Element | null;
|
|
4
4
|
export default ListBodyComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListItem, VirtualListProps } from '../typings';
|
|
3
|
-
declare const VirtualListComponent: <T = any, I extends ListItem<T> = ListItem<T>>({ items, ItemComponent, ItemLoadingComponent, ItemContentComponent, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }: VirtualListProps<T, I>) => React.JSX.Element;
|
|
3
|
+
declare const VirtualListComponent: <T extends unknown = any, I extends ListItem<T> = ListItem<T>>({ items, ItemComponent, ItemLoadingComponent, ItemContentComponent, onItemClick, onItemMouseEnter, onItemMouseLeave, virtualItems, }: VirtualListProps<T, I>) => React.JSX.Element;
|
|
4
4
|
export default VirtualListComponent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const _default: import("styled-components").StyledComponent<React.FC<
|
|
2
|
+
declare const _default: import("styled-components").StyledComponent<React.FC<{}>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { TableBodyRowProps } from '../typings';
|
|
3
|
+
declare const _default: import("styled-components").StyledComponent<React.FC<TableBodyRowProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
4
|
export default _default;
|
|
@@ -8,6 +8,7 @@ import { ListItemProps, ListItems, ListNotFoundProps, ListState, UseListOptions
|
|
|
8
8
|
import { FormSelectProps, SelectBroker, SelectItem, SelectProps } from '../select/typings';
|
|
9
9
|
import { TextareaProps } from '../textarea/typings';
|
|
10
10
|
import TableService from './TableService';
|
|
11
|
+
import { ButtonProps } from '../button/typings';
|
|
11
12
|
export type ArrayTableProps<T = any, I extends TableItem<T> = TableItem<T>> = TableConfig<T, I> & {
|
|
12
13
|
adapter?: TableItemAdapter<T>;
|
|
13
14
|
columns?: TableColumn<T, I>[];
|
|
@@ -68,6 +69,7 @@ export type TableBodyRowProps<T = any, I extends TableItem<T> = TableItem<T>> =
|
|
|
68
69
|
onCollapsed?: (item: I | undefined, index: number) => void;
|
|
69
70
|
};
|
|
70
71
|
export type TableConfig<T = any, I extends TableItem<T> = TableItem<T>> = {
|
|
72
|
+
ActionComponent?: React.FC;
|
|
71
73
|
autoRefresh?: number;
|
|
72
74
|
bodyClassName?: string;
|
|
73
75
|
BodyComponent?: React.FC<TableBodyProps<T, I>>;
|
|
@@ -87,6 +89,7 @@ export type TableConfig<T = any, I extends TableItem<T> = TableItem<T>> = {
|
|
|
87
89
|
height?: string | number;
|
|
88
90
|
highlightRow?: boolean;
|
|
89
91
|
increment?: number;
|
|
92
|
+
itemHeight?: number | ((index: number) => number);
|
|
90
93
|
LoadingComponent?: React.FC;
|
|
91
94
|
LoadingRowComponent?: React.FC;
|
|
92
95
|
NotFoundComponent?: React.FC<TableNotFoundProps> | null;
|
|
@@ -101,6 +104,8 @@ export type TableConfig<T = any, I extends TableItem<T> = TableItem<T>> = {
|
|
|
101
104
|
preload?: number;
|
|
102
105
|
rowClassName?: string | ((item: I | undefined, rowIndex: number, columns: TableColumn<T, I>[]) => string);
|
|
103
106
|
RowComponent?: React.FC<TableBodyRowProps<T, I>>;
|
|
107
|
+
refreshButtonKind?: ButtonProps['kind'];
|
|
108
|
+
showRefreshButton?: boolean;
|
|
104
109
|
sortable?: boolean;
|
|
105
110
|
stripRows?: boolean;
|
|
106
111
|
tail?: boolean;
|