@oliasoft-open-source/react-ui-library 7.2.0 → 8.0.0-beta-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/README.md +22 -29
- package/dist/components/actions/actions.d.ts +1 -0
- package/dist/components/actions/actions.d.ts.map +1 -1
- package/dist/components/actions/actions.interface.d.ts +5 -15
- package/dist/components/actions/actions.interface.d.ts.map +1 -1
- package/dist/components/heading/heading.d.ts.map +1 -1
- package/dist/components/list/list-row/list-heading.d.ts +2 -1
- package/dist/components/list/list-row/list-heading.d.ts.map +1 -1
- package/dist/components/list/list.interface.d.ts +2 -17
- package/dist/components/list/list.interface.d.ts.map +1 -1
- package/dist/components/list/list.stories-data.d.ts +8 -8
- package/dist/components/menu/index.d.ts +0 -1
- package/dist/components/menu/index.d.ts.map +1 -1
- package/dist/components/menu/is-menu-empty.d.ts +3 -0
- package/dist/components/menu/is-menu-empty.d.ts.map +1 -0
- package/dist/components/menu/layer/divider.d.ts.map +1 -1
- package/dist/components/menu/layer/heading.d.ts.map +1 -1
- package/dist/components/menu/layer/layer.d.ts +4 -4
- package/dist/components/menu/layer/layer.d.ts.map +1 -1
- package/dist/components/menu/layer/option.d.ts +5 -4
- package/dist/components/menu/layer/option.d.ts.map +1 -1
- package/dist/components/menu/layer/section.d.ts +6 -4
- package/dist/components/menu/layer/section.d.ts.map +1 -1
- package/dist/components/menu/menu-popover.d.ts +11 -0
- package/dist/components/menu/menu-popover.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +3 -48
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.interface.d.ts +44 -21
- package/dist/components/menu/menu.interface.d.ts.map +1 -1
- package/dist/components/menu/menu.stories-data.d.ts +27 -1
- package/dist/components/menu/menu.stories-data.d.ts.map +1 -1
- package/dist/components/menu/menu.stories.d.ts +0 -1
- package/dist/components/menu/menu.stories.d.ts.map +1 -1
- package/dist/components/menu/menu.test-case.stories.d.ts +13 -2
- package/dist/components/menu/menu.test-case.stories.d.ts.map +1 -1
- package/dist/components/menu/trigger/button.d.ts +4 -15
- package/dist/components/menu/trigger/button.d.ts.map +1 -1
- package/dist/components/menu/trigger/component.d.ts +9 -5
- package/dist/components/menu/trigger/component.d.ts.map +1 -1
- package/dist/components/menu/trigger/trigger.d.ts +12 -22
- package/dist/components/menu/trigger/trigger.d.ts.map +1 -1
- package/dist/components/option-dropdown/option-dropdown.d.ts.map +1 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/unit-input/unit-input.test-case.stories.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/helpers/merge-refs.d.ts +6 -0
- package/dist/helpers/merge-refs.d.ts.map +1 -0
- package/dist/helpers/overlay-trigger/index.d.ts +2 -0
- package/dist/helpers/overlay-trigger/index.d.ts.map +1 -1
- package/dist/helpers/overlay-trigger/use-overlay-top-layer-dismiss.d.ts +23 -0
- package/dist/helpers/overlay-trigger/use-overlay-top-layer-dismiss.d.ts.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1997 -1987
- package/package.json +6 -6
- package/dist/components/menu/layer/path.d.ts +0 -6
- package/dist/components/menu/layer/path.d.ts.map +0 -1
- package/dist/components/popover/use-popover-top-layer-dismiss.d.ts +0 -20
- package/dist/components/popover/use-popover-top-layer-dismiss.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1173,31 +1173,26 @@ The `Menu` component is used to render a menu with various options or sections.
|
|
|
1173
1173
|
|
|
1174
1174
|
### Props
|
|
1175
1175
|
|
|
1176
|
-
| Prop | Description
|
|
1177
|
-
| -------------------- |
|
|
1178
|
-
| `menu` | An object containing properties for configuring the menu.
|
|
1179
|
-
| `
|
|
1180
|
-
| `
|
|
1181
|
-
| `
|
|
1182
|
-
| `
|
|
1183
|
-
| `
|
|
1184
|
-
| `
|
|
1185
|
-
| `
|
|
1186
|
-
| `
|
|
1187
|
-
| `
|
|
1188
|
-
| `
|
|
1189
|
-
| `
|
|
1190
|
-
| `
|
|
1191
|
-
| `
|
|
1192
|
-
| `
|
|
1193
|
-
| `
|
|
1194
|
-
| `
|
|
1195
|
-
| `
|
|
1196
|
-
| `isNested` | A boolean indicating whether the menu is nested. | `false` |
|
|
1197
|
-
| `tooltip` | The tooltip for the menu. | `null` |
|
|
1198
|
-
| `error` | The error message for the menu. | `null` |
|
|
1199
|
-
| `warning` | The warning message for the menu. | `null` |
|
|
1200
|
-
| `title` | The title text for the menu. | `''` (empty) |
|
|
1176
|
+
| Prop | Description | Default Value |
|
|
1177
|
+
| -------------------- | --------------------------------------------------------------------------------- | ------------- |
|
|
1178
|
+
| `menu` | An object containing properties for configuring the menu. | `{}` |
|
|
1179
|
+
| `width` | The width of the menu. | - |
|
|
1180
|
+
| `disabled` | A boolean indicating whether the menu is disabled. | `false` |
|
|
1181
|
+
| `badgeTitle` | The title text for a badge, if applicable. | `''` (empty) |
|
|
1182
|
+
| `badgeDot` | A boolean indicating whether to display a dot badge. | `false` |
|
|
1183
|
+
| `loading` | A boolean indicating whether the menu is in a loading state. | `false` |
|
|
1184
|
+
| `fullHeightTrigger` | A boolean indicating whether the trigger should have full height. | `false` |
|
|
1185
|
+
| `closeOnOptionClick` | A boolean indicating whether the menu should close when an option is clicked. | `false` |
|
|
1186
|
+
| `groupOrder` | The order of the menu group. | `null` |
|
|
1187
|
+
| `maxHeight` | The maximum height of the menu. | - |
|
|
1188
|
+
| `testId` | A string representing the test ID for testing purposes. | - |
|
|
1189
|
+
| `open` | A boolean indicating whether the menu is open. | `false` |
|
|
1190
|
+
| `setOpen` | A function to set the open state of the menu. | - |
|
|
1191
|
+
| `tooltip` | The tooltip for the menu. | `null` |
|
|
1192
|
+
| `error` | The error message for the menu. | `null` |
|
|
1193
|
+
| `warning` | The warning message for the menu. | `null` |
|
|
1194
|
+
| `tabIndex` | Tab index for the menu trigger. | - |
|
|
1195
|
+
| `active` | Whether the trigger appears active. | `false` |
|
|
1201
1196
|
|
|
1202
1197
|
### Menu Properties
|
|
1203
1198
|
|
|
@@ -1208,10 +1203,9 @@ The `menu` prop accepts an object with the following properties:
|
|
|
1208
1203
|
- `colored`: A boolean indicating whether the menu is colored or a string representing the color.
|
|
1209
1204
|
- `small`: A boolean indicating whether the menu is small.
|
|
1210
1205
|
- `label`: The label for the menu.
|
|
1211
|
-
- `component`: The component to render
|
|
1212
|
-
- `sections`: The sections of the menu.
|
|
1206
|
+
- `component`: The component to render as the menu trigger.
|
|
1207
|
+
- `sections`: The sections of the menu. Option `url` navigates via MenuItem `href`. For SPA routing, use `onClick` with `preventDefault` and your router’s `navigate`.
|
|
1213
1208
|
- `placement`: The placement of the menu.
|
|
1214
|
-
- `possiblePlacements`: The possible placements of the menu.
|
|
1215
1209
|
- `showAllButton`: The configuration for the "show all" button.
|
|
1216
1210
|
- `testId`: The test ID for the menu.
|
|
1217
1211
|
- `fullHeightTrigger`: A boolean indicating whether the trigger should have full height.
|
|
@@ -1229,7 +1223,6 @@ The `menu` prop accepts an object with the following properties:
|
|
|
1229
1223
|
sections: [<MenuItem key="1" label="Item 1" />, <MenuItem key="2" label="Item 2" />],
|
|
1230
1224
|
placement: 'bottom-end',
|
|
1231
1225
|
testId: 'menu-test-id',
|
|
1232
|
-
fullHeightTrigger: true,
|
|
1233
1226
|
}}
|
|
1234
1227
|
open={true}
|
|
1235
1228
|
setOpen={(state) => setOpen(state)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TEmpty } from '../../typings/common-type-definitions';
|
|
3
3
|
import { IAction, ISubAction } from './actions.interface';
|
|
4
|
+
export type { IAction, ISubAction } from './actions.interface';
|
|
4
5
|
export interface ISubMenuProps {
|
|
5
6
|
subActions: ISubAction[];
|
|
6
7
|
subMenuIcon?: ReactNode | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/actions/actions.tsx"],"names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AED,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,4CAuD1C,CAAC"}
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TStringOrNumber } from '../../typings/common-type-definitions';
|
|
3
3
|
import { IMenuSection } from '../menu/menu.interface';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
icon?: ReactNode;
|
|
8
|
-
onClick?: TFunction;
|
|
9
|
-
testId?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
menu?: {
|
|
12
|
-
trigger: string;
|
|
13
|
-
label: ReactNode | string;
|
|
14
|
-
sections?: ReactNode | IMenuSection[];
|
|
15
|
-
testId?: string;
|
|
16
|
-
};
|
|
4
|
+
/** Menu section shape; `type` optional (Actions defaults to Option). */
|
|
5
|
+
export interface ISubAction extends Pick<IMenuSection, 'label' | 'icon' | 'onClick' | 'testId' | 'disabled' | 'menu'> {
|
|
6
|
+
type?: IMenuSection['type'];
|
|
17
7
|
}
|
|
18
8
|
export interface IAction {
|
|
19
|
-
label?:
|
|
9
|
+
label?: ReactNode;
|
|
20
10
|
childComponent?: ReactNode | (() => ReactNode);
|
|
21
11
|
subActions?: ISubAction[];
|
|
22
12
|
primary?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.interface.d.ts","sourceRoot":"","sources":["../../../src/components/actions/actions.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"actions.interface.d.ts","sourceRoot":"","sources":["../../../src/components/actions/actions.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,wEAAwE;AACxE,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACnH,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,cAAc,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;IAC/C,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,UAAU,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAK1E,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AASD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAC/F,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,OAAO,0FAwDnB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { TEmpty, TStringOrNumber } from '../../../typings/common-type-definitions';
|
|
3
|
+
import { IAction } from '../../actions/actions.interface';
|
|
3
4
|
export interface IListHeadingProps {
|
|
4
5
|
name: TStringOrNumber | ReactNode;
|
|
5
|
-
actions?:
|
|
6
|
+
actions?: IAction[];
|
|
6
7
|
toggleNarrow?: boolean;
|
|
7
8
|
onToggleNarrow?: TEmpty;
|
|
8
9
|
stickyHeader?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-heading.d.ts","sourceRoot":"","sources":["../../../../src/components/list/list-row/list-heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"list-heading.d.ts","sourceRoot":"","sources":["../../../../src/components/list/list-row/list-heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAI1E,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAG1D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,0FAoBvB,CAAC"}
|
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TEmpty } from '../../typings/common-type-definitions';
|
|
3
|
+
import { IAction } from '../actions/actions.interface';
|
|
3
4
|
import { IListItem } from './list-row/list-row.interface';
|
|
4
|
-
interface ISubAction {
|
|
5
|
-
label: string;
|
|
6
|
-
icon: ReactNode;
|
|
7
|
-
onClick: TEmpty;
|
|
8
|
-
}
|
|
9
|
-
interface IListAction {
|
|
10
|
-
label: string;
|
|
11
|
-
icon?: ReactNode;
|
|
12
|
-
onClick?: TEmpty;
|
|
13
|
-
primary?: boolean;
|
|
14
|
-
subActions?: ISubAction[];
|
|
15
|
-
childComponent?: ReactNode;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
tooltip?: ReactNode | string;
|
|
18
|
-
}
|
|
19
5
|
export interface IListData {
|
|
20
6
|
name?: ReactNode | string;
|
|
21
|
-
actions?:
|
|
7
|
+
actions?: IAction[];
|
|
22
8
|
items: IListItem[];
|
|
23
9
|
}
|
|
24
10
|
export interface IScrollDetails {
|
|
@@ -35,5 +21,4 @@ export interface IToggleNarrowProps {
|
|
|
35
21
|
toggleNarrow?: boolean;
|
|
36
22
|
onClickToggleNarrow?: TEmpty;
|
|
37
23
|
}
|
|
38
|
-
export {};
|
|
39
24
|
//# sourceMappingURL=list.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.interface.d.ts","sourceRoot":"","sources":["../../../src/components/list/list.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list.interface.d.ts","sourceRoot":"","sources":["../../../src/components/list/list.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -62,7 +62,7 @@ export declare const listJsx: {
|
|
|
62
62
|
testId?: string;
|
|
63
63
|
level?: number;
|
|
64
64
|
label?: import('./list-row/list-row.interface').ILabel;
|
|
65
|
-
actions?: import('
|
|
65
|
+
actions?: import('../..').IAction[];
|
|
66
66
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
67
67
|
type?: string;
|
|
68
68
|
metaCount?: number;
|
|
@@ -157,7 +157,7 @@ export declare const listBadges: {
|
|
|
157
157
|
metadata?: string | React.ReactElement;
|
|
158
158
|
testId?: string;
|
|
159
159
|
level?: number;
|
|
160
|
-
actions?: import('
|
|
160
|
+
actions?: import('../..').IAction[];
|
|
161
161
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
162
162
|
type?: string;
|
|
163
163
|
metaCount?: number;
|
|
@@ -183,7 +183,7 @@ export declare const listBadgeSmall: {
|
|
|
183
183
|
metadata?: string | React.ReactElement;
|
|
184
184
|
testId?: string;
|
|
185
185
|
level?: number;
|
|
186
|
-
actions?: import('
|
|
186
|
+
actions?: import('../..').IAction[];
|
|
187
187
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
188
188
|
type?: string;
|
|
189
189
|
metaCount?: number;
|
|
@@ -208,7 +208,7 @@ export declare const listSubheadingsBadges: {
|
|
|
208
208
|
metadata?: string | React.ReactElement;
|
|
209
209
|
testId?: string;
|
|
210
210
|
level?: number;
|
|
211
|
-
actions?: import('
|
|
211
|
+
actions?: import('../..').IAction[];
|
|
212
212
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
213
213
|
type?: string;
|
|
214
214
|
metaCount?: number;
|
|
@@ -274,7 +274,7 @@ export declare const listDetails: {
|
|
|
274
274
|
title?: string;
|
|
275
275
|
level?: number;
|
|
276
276
|
label?: import('./list-row/list-row.interface').ILabel;
|
|
277
|
-
actions?: import('
|
|
277
|
+
actions?: import('../..').IAction[];
|
|
278
278
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
279
279
|
type?: string;
|
|
280
280
|
metaCount?: number;
|
|
@@ -297,7 +297,7 @@ export declare const listExpanding: {
|
|
|
297
297
|
testId?: string;
|
|
298
298
|
level?: number;
|
|
299
299
|
label?: import('./list-row/list-row.interface').ILabel;
|
|
300
|
-
actions?: import('
|
|
300
|
+
actions?: import('../..').IAction[];
|
|
301
301
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
302
302
|
type?: string;
|
|
303
303
|
metaCount?: number;
|
|
@@ -336,7 +336,7 @@ export declare const listIconTooltip: {
|
|
|
336
336
|
testId?: string;
|
|
337
337
|
level?: number;
|
|
338
338
|
label?: import('./list-row/list-row.interface').ILabel;
|
|
339
|
-
actions?: import('
|
|
339
|
+
actions?: import('../..').IAction[];
|
|
340
340
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
341
341
|
type?: string;
|
|
342
342
|
metaCount?: number;
|
|
@@ -359,7 +359,7 @@ export declare const listCounts: {
|
|
|
359
359
|
testId?: string;
|
|
360
360
|
level?: number;
|
|
361
361
|
label?: import('./list-row/list-row.interface').ILabel;
|
|
362
|
-
actions?: import('
|
|
362
|
+
actions?: import('../..').IAction[];
|
|
363
363
|
id?: import('../../typings/common-type-definitions').TStringOrNumber;
|
|
364
364
|
type?: string;
|
|
365
365
|
component?: React.ElementType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/menu/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-menu-empty.d.ts","sourceRoot":"","sources":["../../../src/components/menu/is-menu-empty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,KAAG,OAG/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/divider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/divider.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,+CAAiD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,GAAI,kCAAkC,aAAa,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,GAAI,kCAAkC,aAAa,4CAStE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { TEmpty, TStringOrNumber } from '../../../typings/common-type-definitions';
|
|
3
3
|
import { IMenuSection, IMenuShowAllButton } from '../menu.interface';
|
|
4
4
|
export interface IMenuLayerProps {
|
|
@@ -7,11 +7,11 @@ export interface IMenuLayerProps {
|
|
|
7
7
|
width?: TStringOrNumber;
|
|
8
8
|
closeOnOptionClick?: boolean;
|
|
9
9
|
close?: TEmpty;
|
|
10
|
-
|
|
11
|
-
path?: any;
|
|
10
|
+
closeParent?: TEmpty;
|
|
12
11
|
maxHeight?: TStringOrNumber;
|
|
13
12
|
showAllButton?: IMenuShowAllButton;
|
|
14
13
|
testId?: string;
|
|
14
|
+
triggerRef?: React.RefObject<HTMLElement | null>;
|
|
15
15
|
}
|
|
16
|
-
export declare const Layer: ({ sections, isNested, width, closeOnOptionClick, close,
|
|
16
|
+
export declare const Layer: ({ sections, isNested, width, closeOnOptionClick, close, closeParent, maxHeight, showAllButton, testId, triggerRef, }: IMenuLayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
//# sourceMappingURL=layer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/layer.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/layer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkB,SAAS,EAAY,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGrE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,KAAK,GAAI,sHAWnB,eAAe,4CAwFjB,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { TChangeEventHandler, TEmpty } from '../../../typings/common-type-definitions';
|
|
3
|
+
import { IAction } from '../../actions/actions.interface';
|
|
3
4
|
export interface IOptionProps {
|
|
4
|
-
actions?:
|
|
5
|
+
actions?: IAction[];
|
|
5
6
|
label: ReactNode;
|
|
6
7
|
url?: string;
|
|
7
8
|
onClick?: (evt: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
8
9
|
description?: string;
|
|
9
|
-
icon?:
|
|
10
|
+
icon?: ReactNode;
|
|
10
11
|
selected?: boolean;
|
|
11
12
|
closeOnOptionClick?: boolean;
|
|
12
13
|
close?: TEmpty;
|
|
14
|
+
closeParent?: TEmpty;
|
|
13
15
|
disabled?: boolean;
|
|
14
16
|
inline?: boolean;
|
|
15
17
|
title?: string;
|
|
@@ -17,7 +19,6 @@ export interface IOptionProps {
|
|
|
17
19
|
uploadType?: string;
|
|
18
20
|
onChange?: TChangeEventHandler;
|
|
19
21
|
testId?: string;
|
|
20
|
-
component?: React.ElementType;
|
|
21
22
|
}
|
|
22
|
-
export declare const Option: ({ actions, label, url, onClick, description, icon, selected, closeOnOptionClick, close, disabled, inline, title, upload, uploadType, onChange, testId,
|
|
23
|
+
export declare const Option: ({ actions, label, url, onClick, description, icon, selected, closeOnOptionClick, close, closeParent, disabled, inline, title, upload, uploadType, onChange, testId, }: IOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
//# sourceMappingURL=option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/option.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/option.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAI5F,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAW1D,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,GAAI,uKAkBpB,YAAY,4CAsFd,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { TEmpty, TStringOrNumber } from '../../../typings/common-type-definitions';
|
|
2
3
|
import { IMenuSection } from '../menu.interface';
|
|
3
4
|
export interface ISectionProps {
|
|
4
5
|
section: IMenuSection;
|
|
5
6
|
closeOnOptionClick?: boolean;
|
|
6
|
-
close
|
|
7
|
-
|
|
8
|
-
path: string;
|
|
7
|
+
close?: TEmpty;
|
|
8
|
+
closeParent?: TEmpty;
|
|
9
9
|
maxHeight?: TStringOrNumber;
|
|
10
|
+
width?: TStringOrNumber;
|
|
11
|
+
triggerRef?: React.RefObject<HTMLElement | null>;
|
|
10
12
|
}
|
|
11
|
-
export declare const Section: ({ section, closeOnOptionClick, close,
|
|
13
|
+
export declare const Section: ({ section, closeOnOptionClick, close, closeParent, maxHeight, width, triggerRef, }: ISectionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
14
|
//# sourceMappingURL=section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/layer/section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAO1E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAClD;AAUD,eAAO,MAAM,OAAO,GAAI,oFAQrB,aAAa,mDA+Ef,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
export interface IMenuPopoverProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
placement?: string;
|
|
5
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
6
|
+
portalTriggerRef?: RefObject<HTMLElement | null>;
|
|
7
|
+
isNested?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MenuPopover: ({ children, placement, triggerRef, portalTriggerRef, isNested, className, }: IMenuPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=menu-popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-popover.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu-popover.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUpD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,gBAAgB,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,6EAOzB,iBAAiB,4CAsBnB,CAAC"}
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { TGroupOrder, TTriggerType } from '../../typings/common-types';
|
|
5
|
-
import { IMenuSection, IMenuShowAllButton } from './menu.interface';
|
|
6
|
-
export interface IMenuProps {
|
|
7
|
-
menu: {
|
|
8
|
-
trigger: TTriggerType | string;
|
|
9
|
-
title?: string;
|
|
10
|
-
colored?: boolean | string;
|
|
11
|
-
small?: boolean;
|
|
12
|
-
label?: ReactNode | string;
|
|
13
|
-
component?: ReactNode;
|
|
14
|
-
sections?: ReactNode | IMenuSection[];
|
|
15
|
-
placement?: string;
|
|
16
|
-
possiblePlacements?: Placement[];
|
|
17
|
-
showAllButton?: IMenuShowAllButton;
|
|
18
|
-
testId?: string;
|
|
19
|
-
fullHeightTrigger?: boolean;
|
|
20
|
-
};
|
|
21
|
-
active?: boolean;
|
|
22
|
-
contextMenu?: boolean;
|
|
23
|
-
width?: TStringOrNumber;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
badgeTitle?: string;
|
|
26
|
-
badgeDot?: boolean;
|
|
27
|
-
loading?: boolean;
|
|
28
|
-
fullHeightTrigger?: boolean;
|
|
29
|
-
closeOnOptionClick?: boolean;
|
|
30
|
-
groupOrder?: TGroupOrder;
|
|
31
|
-
overflowContainer?: boolean;
|
|
32
|
-
maxHeight?: TStringOrNumber;
|
|
33
|
-
testId?: string;
|
|
34
|
-
open?: boolean;
|
|
35
|
-
setOpen?: (state: boolean) => void;
|
|
36
|
-
closeParent?: TEmpty;
|
|
37
|
-
tree?: any;
|
|
38
|
-
path?: any;
|
|
39
|
-
isNested?: boolean;
|
|
40
|
-
tooltip?: any;
|
|
41
|
-
error?: any;
|
|
42
|
-
warning?: any;
|
|
43
|
-
title?: string;
|
|
44
|
-
selected?: boolean;
|
|
45
|
-
tabIndex?: number;
|
|
46
|
-
}
|
|
47
|
-
export declare const DropDownMenu: (props: IMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export declare const Menu: (props: IMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { IMenuProps } from './menu.interface';
|
|
2
|
+
export type { IMenuProps, IMenuMenu, IMenuSection, INestedMenu } from './menu.interface';
|
|
3
|
+
export declare const Menu: ({ menu, width, disabled, badgeTitle, badgeDot, loading, closeOnOptionClick, maxHeight, testId, open: openProp, setOpen: setOpenProp, tooltip, error, warning, tabIndex, active, fullHeightTrigger, groupOrder, }: IMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
4
|
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEzF,eAAO,MAAM,IAAI,GAAI,kNAmBlB,UAAU,4CA2FZ,CAAC"}
|
|
@@ -1,8 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TChangeEventHandler, TFunction, TStringOrNumber } from '../../typings/common-type-definitions';
|
|
3
|
+
import { TGroupOrder, TTriggerType } from '../../typings/common-types';
|
|
4
|
+
import { IAction } from '../actions/actions.interface';
|
|
5
5
|
import { TMenuType } from './types';
|
|
6
|
+
/** Top-level `menu` prop. `sections` may be custom ReactNode. */
|
|
7
|
+
export interface IMenuMenu {
|
|
8
|
+
trigger: TTriggerType | string;
|
|
9
|
+
title?: string;
|
|
10
|
+
colored?: boolean | string;
|
|
11
|
+
small?: boolean;
|
|
12
|
+
label?: ReactNode | string;
|
|
13
|
+
component?: ReactNode;
|
|
14
|
+
sections?: ReactNode | IMenuSection[];
|
|
15
|
+
placement?: string;
|
|
16
|
+
showAllButton?: IMenuShowAllButton;
|
|
17
|
+
testId?: string;
|
|
18
|
+
fullHeightTrigger?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Nested submenu — `sections` must be `IMenuSection[]`, not custom ReactNode. */
|
|
21
|
+
export type INestedMenu = Omit<IMenuMenu, 'sections'> & {
|
|
22
|
+
sections?: IMenuSection[];
|
|
23
|
+
};
|
|
24
|
+
export interface IMenuProps {
|
|
25
|
+
menu: IMenuMenu;
|
|
26
|
+
active?: boolean;
|
|
27
|
+
width?: TStringOrNumber;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
badgeTitle?: string;
|
|
30
|
+
badgeDot?: boolean;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
fullHeightTrigger?: boolean;
|
|
33
|
+
closeOnOptionClick?: boolean;
|
|
34
|
+
groupOrder?: TGroupOrder;
|
|
35
|
+
maxHeight?: TStringOrNumber;
|
|
36
|
+
testId?: string;
|
|
37
|
+
open?: boolean;
|
|
38
|
+
setOpen?: (state: boolean) => void;
|
|
39
|
+
tooltip?: TStringOrNumber | ReactNode;
|
|
40
|
+
error?: string;
|
|
41
|
+
warning?: string;
|
|
42
|
+
tabIndex?: number;
|
|
43
|
+
}
|
|
6
44
|
export interface IMenuSection {
|
|
7
45
|
type: TMenuType | string;
|
|
8
46
|
label?: ReactNode;
|
|
@@ -16,14 +54,13 @@ export interface IMenuSection {
|
|
|
16
54
|
title?: string;
|
|
17
55
|
download?: boolean;
|
|
18
56
|
onChange?: TChangeEventHandler;
|
|
19
|
-
menu?:
|
|
57
|
+
menu?: INestedMenu;
|
|
20
58
|
visible?: boolean;
|
|
21
59
|
closeOnOptionClick?: boolean;
|
|
22
|
-
actions?:
|
|
60
|
+
actions?: IAction[];
|
|
23
61
|
url?: string;
|
|
24
62
|
upload?: boolean;
|
|
25
63
|
uploadType?: string;
|
|
26
|
-
component?: ElementType;
|
|
27
64
|
}
|
|
28
65
|
export interface IMenuShowAllButton {
|
|
29
66
|
visible: boolean;
|
|
@@ -31,18 +68,4 @@ export interface IMenuShowAllButton {
|
|
|
31
68
|
showLessTitle: string;
|
|
32
69
|
additionalSections: IMenuSection[];
|
|
33
70
|
}
|
|
34
|
-
export interface IUseContextMenuProps {
|
|
35
|
-
sections: ReactNode | IMenuSection[];
|
|
36
|
-
width?: TStringOrNumber;
|
|
37
|
-
placement?: string;
|
|
38
|
-
possiblePlacements: Placement[];
|
|
39
|
-
closeOnOptionClick: boolean;
|
|
40
|
-
closeParent?: TEmpty;
|
|
41
|
-
tree: any;
|
|
42
|
-
path: string;
|
|
43
|
-
groupOrder?: TGroupOrder;
|
|
44
|
-
overflowContainer: boolean;
|
|
45
|
-
maxHeight?: TStringOrNumber;
|
|
46
|
-
testId?: string;
|
|
47
|
-
}
|
|
48
71
|
//# sourceMappingURL=menu.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.interface.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"menu.interface.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS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