@itwin/imodel-components-react 3.1.0-dev.7 → 3.1.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/CHANGELOG.md +74 -0
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +1 -0
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +3 -3
- package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +6 -6
- package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +1 -1
- package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts +0 -6
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +37 -46
- package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +10 -6
- package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +1 -0
- package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/cjs/imodel-components-react.d.ts +0 -1
- package/lib/cjs/imodel-components-react.d.ts.map +1 -1
- package/lib/cjs/imodel-components-react.js +0 -1
- package/lib/cjs/imodel-components-react.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
- package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +1 -0
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js +4 -4
- package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +2 -2
- package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +7 -7
- package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +2 -2
- package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts +0 -6
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +37 -46
- package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +10 -6
- package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +1 -0
- package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
- package/lib/esm/imodel-components-react.d.ts +0 -1
- package/lib/esm/imodel-components-react.d.ts.map +1 -1
- package/lib/esm/imodel-components-react.js +0 -1
- package/lib/esm/imodel-components-react.js.map +1 -1
- package/package.json +21 -21
- package/lib/cjs/imodel-components-react/timeline/ContextMenu.d.ts +0 -55
- package/lib/cjs/imodel-components-react/timeline/ContextMenu.d.ts.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/ContextMenu.js +0 -82
- package/lib/cjs/imodel-components-react/timeline/ContextMenu.js.map +0 -1
- package/lib/cjs/imodel-components-react/timeline/ContextMenu.scss +0 -81
- package/lib/esm/imodel-components-react/timeline/ContextMenu.d.ts +0 -55
- package/lib/esm/imodel-components-react/timeline/ContextMenu.d.ts.map +0 -1
- package/lib/esm/imodel-components-react/timeline/ContextMenu.js +0 -55
- package/lib/esm/imodel-components-react/timeline/ContextMenu.js.map +0 -1
- package/lib/esm/imodel-components-react/timeline/ContextMenu.scss +0 -81
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import "./ContextMenu.scss";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { RelativePosition } from "@itwin/appui-abstract";
|
|
4
|
-
import { CommonProps } from "@itwin/core-react";
|
|
5
|
-
/** Properties for [[ContextMenuItem]] component
|
|
6
|
-
* @internal
|
|
7
|
-
* @deprecated
|
|
8
|
-
*/
|
|
9
|
-
export interface MenuItem {
|
|
10
|
-
/** Name of the context menu item */
|
|
11
|
-
name?: string;
|
|
12
|
-
/** Optional icon */
|
|
13
|
-
icon?: string;
|
|
14
|
-
/** Disabled */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/** Checked or not */
|
|
17
|
-
checked?: boolean;
|
|
18
|
-
/** Separator */
|
|
19
|
-
isSeparator?: boolean;
|
|
20
|
-
/** Called when the item is clicked */
|
|
21
|
-
onClick?: () => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* A context menu item.
|
|
25
|
-
* @internal
|
|
26
|
-
* @deprecated
|
|
27
|
-
*/
|
|
28
|
-
export declare class ContextMenuItem extends React.Component<MenuItem> {
|
|
29
|
-
private _onClick;
|
|
30
|
-
render(): JSX.Element;
|
|
31
|
-
}
|
|
32
|
-
/** Properties for [[ContextMenu]] component
|
|
33
|
-
* @internal
|
|
34
|
-
* @deprecated
|
|
35
|
-
*/
|
|
36
|
-
export interface ContextMenuProps extends CommonProps {
|
|
37
|
-
/** Show or hide the context menu */
|
|
38
|
-
isOpened: boolean;
|
|
39
|
-
/** Position the context menu relative to the parent */
|
|
40
|
-
position: RelativePosition;
|
|
41
|
-
/** List of context menu items */
|
|
42
|
-
items?: MenuItem[];
|
|
43
|
-
/** Called when the mouse is clicked outside the context menu */
|
|
44
|
-
onClickOutside?: () => void;
|
|
45
|
-
/** parent element */
|
|
46
|
-
parent: HTMLElement | null;
|
|
47
|
-
}
|
|
48
|
-
/** Context menu for timeline component
|
|
49
|
-
* @internal
|
|
50
|
-
* @deprecated
|
|
51
|
-
*/
|
|
52
|
-
export declare class ContextMenu extends React.Component<ContextMenuProps> {
|
|
53
|
-
render(): JSX.Element;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=ContextMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/ContextMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAS,MAAM,mBAAmB,CAAC;AAIvD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;IAE5D,OAAO,CAAC,QAAQ,CAMd;IAGc,MAAM;CAqBvB;AAGD;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,iCAAiC;IACjC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,qBAAqB;IACrB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CAC5B;AAGD;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAEhD,MAAM;CAgBvB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import "./ContextMenu.scss";
|
|
6
|
-
import classnames from "classnames";
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import { Popup } from "@itwin/core-react";
|
|
9
|
-
/* istanbul ignore next */
|
|
10
|
-
/**
|
|
11
|
-
* A context menu item.
|
|
12
|
-
* @internal
|
|
13
|
-
* @deprecated
|
|
14
|
-
*/
|
|
15
|
-
export class ContextMenuItem extends React.Component {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this._onClick = (event) => {
|
|
19
|
-
event.stopPropagation();
|
|
20
|
-
// istanbul ignore else
|
|
21
|
-
if (!this.props.disabled && !this.props.isSeparator && this.props.onClick) {
|
|
22
|
-
this.props.onClick();
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
// istanbul ignore next - WIP
|
|
27
|
-
render() {
|
|
28
|
-
const menuClassName = classnames("contextmenu-item-wip", this.props.disabled && "disabled", this.props.checked && "checked");
|
|
29
|
-
return (React.createElement(React.Fragment, null,
|
|
30
|
-
this.props.isSeparator && React.createElement("div", { className: "separator", role: "separator" }),
|
|
31
|
-
!this.props.isSeparator &&
|
|
32
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
33
|
-
React.createElement("li", { className: menuClassName, onClick: this._onClick, role: "menuitem" },
|
|
34
|
-
this.props.checked && React.createElement("span", { className: "icon icon-checkmark" }),
|
|
35
|
-
(this.props.icon && !this.props.checked) && React.createElement("span", { className: classnames("user-icon icon", this.props.icon) }),
|
|
36
|
-
React.createElement("span", null, this.props.name))));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/* istanbul ignore next */
|
|
40
|
-
/** Context menu for timeline component
|
|
41
|
-
* @internal
|
|
42
|
-
* @deprecated
|
|
43
|
-
*/
|
|
44
|
-
export class ContextMenu extends React.Component {
|
|
45
|
-
// istanbul ignore next - WIP
|
|
46
|
-
render() {
|
|
47
|
-
const { items, parent, position, isOpened, onClickOutside } = this.props;
|
|
48
|
-
return (React.createElement(Popup, { isOpen: isOpened, target: parent, position: position, onClose: onClickOutside },
|
|
49
|
-
React.createElement("div", { "data-testid": "timeline-contextmenu-div", className: "contextmenu-wip" },
|
|
50
|
-
React.createElement("ul", null,
|
|
51
|
-
items && items.map((item, index) => (React.createElement(ContextMenuItem, { key: index, name: item.name, icon: item.icon, disabled: item.disabled, onClick: item.onClick, isSeparator: item.isSeparator }))),
|
|
52
|
-
this.props.children))));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=ContextMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAe,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAuBvD,0BAA0B;AAC1B;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAmB;IAA9D;;QAEU,aAAQ,GAAG,CAAC,KAAU,EAAE,EAAE;YAChC,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,uBAAuB;YACvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACzE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;aACtB;QACH,CAAC,CAAC;IAwBJ,CAAC;IAtBC,6BAA6B;IACb,MAAM;QACpB,MAAM,aAAa,GAAG,UAAU,CAC9B,sBAAsB,EACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,UAAU,EACjC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS,CAChC,CAAC;QAEF,OAAO,CACL;YACG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,6BAAK,SAAS,EAAC,WAAW,EAAC,IAAI,EAAC,WAAW,GAAG;YACxE,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW;gBACtB,iEAAiE;gBACjE,4BAAI,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,UAAU;oBAClE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,8BAAM,SAAS,EAAC,qBAAqB,GAAG;oBAC9D,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,8BAAM,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAI;oBAC/G,kCAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAQ,CAC3B,CAEN,CACJ,CAAC;IACJ,CAAC;CACF;AAoBD,0BAA0B;AAC1B;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA2B;IAChE,6BAA6B;IACb,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACzE,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;YAClF,4CAAiB,0BAA0B,EAAC,SAAS,EAAC,iBAAiB;gBACrE;oBACG,KAAK,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAc,EAAE,KAAa,EAAE,EAAE,CAAC,CACrD,oBAAC,eAAe,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,GAAI,CACjJ,CAAC;oBAED,IAAI,CAAC,KAAK,CAAC,QAAQ,CACjB,CACD,CACA,CACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport \"./ContextMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { RelativePosition } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, Popup } from \"@itwin/core-react\";\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/* istanbul ignore next */\r\n/** Properties for [[ContextMenuItem]] component\r\n * @internal\r\n * @deprecated\r\n */\r\nexport interface MenuItem {\r\n /** Name of the context menu item */\r\n name?: string;\r\n /** Optional icon */\r\n icon?: string;\r\n /** Disabled */\r\n disabled?: boolean;\r\n /** Checked or not */\r\n checked?: boolean;\r\n /** Separator */\r\n isSeparator?: boolean;\r\n /** Called when the item is clicked */\r\n onClick?: () => void;\r\n}\r\n\r\n/* istanbul ignore next */\r\n/**\r\n * A context menu item.\r\n * @internal\r\n * @deprecated\r\n */\r\nexport class ContextMenuItem extends React.Component<MenuItem> {\r\n\r\n private _onClick = (event: any) => {\r\n event.stopPropagation();\r\n // istanbul ignore else\r\n if (!this.props.disabled && !this.props.isSeparator && this.props.onClick) {\r\n this.props.onClick();\r\n }\r\n };\r\n\r\n // istanbul ignore next - WIP\r\n public override render() {\r\n const menuClassName = classnames(\r\n \"contextmenu-item-wip\",\r\n this.props.disabled && \"disabled\",\r\n this.props.checked && \"checked\",\r\n );\r\n\r\n return (\r\n <>\r\n {this.props.isSeparator && <div className=\"separator\" role=\"separator\" />}\r\n {!this.props.isSeparator &&\r\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\r\n <li className={menuClassName} onClick={this._onClick} role=\"menuitem\">\r\n {this.props.checked && <span className=\"icon icon-checkmark\" />}\r\n {(this.props.icon && !this.props.checked) && <span className={classnames(\"user-icon icon\", this.props.icon)} />}\r\n <span>{this.props.name}</span>\r\n </li>\r\n }\r\n </>\r\n );\r\n }\r\n}\r\n\r\n/* istanbul ignore next */\r\n/** Properties for [[ContextMenu]] component\r\n * @internal\r\n * @deprecated\r\n */\r\nexport interface ContextMenuProps extends CommonProps {\r\n /** Show or hide the context menu */\r\n isOpened: boolean;\r\n /** Position the context menu relative to the parent */\r\n position: RelativePosition;\r\n /** List of context menu items */\r\n items?: MenuItem[];\r\n /** Called when the mouse is clicked outside the context menu */\r\n onClickOutside?: () => void;\r\n /** parent element */\r\n parent: HTMLElement | null;\r\n}\r\n\r\n/* istanbul ignore next */\r\n/** Context menu for timeline component\r\n * @internal\r\n * @deprecated\r\n */\r\nexport class ContextMenu extends React.Component<ContextMenuProps> {\r\n // istanbul ignore next - WIP\r\n public override render() {\r\n const { items, parent, position, isOpened, onClickOutside } = this.props;\r\n return (\r\n <Popup isOpen={isOpened} target={parent} position={position} onClose={onClickOutside}>\r\n <div data-testid=\"timeline-contextmenu-div\" className=\"contextmenu-wip\">\r\n <ul>\r\n {items && items.map((item: MenuItem, index: number) => (\r\n <ContextMenuItem key={index} name={item.name} icon={item.icon} disabled={item.disabled} onClick={item.onClick} isSeparator={item.isSeparator} />\r\n ))\r\n }\r\n {this.props.children}\r\n </ul>\r\n </div>\r\n </Popup>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/core-react/lib/cjs/core-react/z-index";
|
|
6
|
-
@import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
|
|
7
|
-
|
|
8
|
-
// cspell:ignore contextmenu
|
|
9
|
-
|
|
10
|
-
.contextmenu-wip {
|
|
11
|
-
cursor: default;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
@include uicore-z-index(context-menu-z);
|
|
14
|
-
background: $buic-background-1;
|
|
15
|
-
border-radius: 3px;
|
|
16
|
-
max-width: 250px;
|
|
17
|
-
|
|
18
|
-
>ul {
|
|
19
|
-
margin: 0;
|
|
20
|
-
padding: 6px 0;
|
|
21
|
-
list-style: none;
|
|
22
|
-
|
|
23
|
-
>.separator {
|
|
24
|
-
padding: .5em 0;
|
|
25
|
-
position: relative;
|
|
26
|
-
|
|
27
|
-
&:before {
|
|
28
|
-
content: '';
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 50%;
|
|
31
|
-
left: 32px;
|
|
32
|
-
right: 4px;
|
|
33
|
-
width: auto;
|
|
34
|
-
height: 1px;
|
|
35
|
-
background: #dce0e3;
|
|
36
|
-
transform: translateY(-50%);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.contextmenu-item-wip {
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
margin: 0;
|
|
46
|
-
padding: .5em 0;
|
|
47
|
-
color: $buic-foreground-body;
|
|
48
|
-
font-size: 14px;
|
|
49
|
-
position: relative;
|
|
50
|
-
user-select: none;
|
|
51
|
-
|
|
52
|
-
>.user-icon,
|
|
53
|
-
>.icon-checkmark {
|
|
54
|
-
position: absolute;
|
|
55
|
-
left: 10px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// text
|
|
59
|
-
>span:last-child {
|
|
60
|
-
padding-left: 32px;
|
|
61
|
-
padding-right: 1em;
|
|
62
|
-
text-overflow: ellipsis;
|
|
63
|
-
white-space: nowrap;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:hover:not(.disabled) {
|
|
68
|
-
background: $buic-row-hover;
|
|
69
|
-
color: $buic-foreground-activehover;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&.disabled {
|
|
74
|
-
color: $buic-foreground-disabled;
|
|
75
|
-
cursor: default;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
>.icon-checkmark {
|
|
79
|
-
color: $buic-foreground-primary;
|
|
80
|
-
}
|
|
81
|
-
}
|