@itwin/core-react 4.2.0 → 4.3.0-dev.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.
Files changed (125) hide show
  1. package/lib/cjs/core-react/_geometry.scss +3 -3
  2. package/lib/cjs/core-react/_math.scss +3 -3
  3. package/lib/cjs/core-react/_typography.scss +3 -3
  4. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +3 -3
  5. package/lib/cjs/core-react/badge/Badge.scss +3 -3
  6. package/lib/cjs/core-react/badge/NewBadge.scss +3 -3
  7. package/lib/cjs/core-react/base/base.scss +3 -3
  8. package/lib/cjs/core-react/base/index.scss +3 -3
  9. package/lib/cjs/core-react/classes.scss +3 -3
  10. package/lib/cjs/core-react/colorthemes.scss +3 -3
  11. package/lib/cjs/core-react/colorvariables.scss +3 -3
  12. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +3 -3
  13. package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -10
  14. package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
  15. package/lib/cjs/core-react/dialog/Dialog.js +69 -166
  16. package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
  17. package/lib/cjs/core-react/dialog/Dialog.scss +59 -217
  18. package/lib/cjs/core-react/expandable/index.scss +3 -3
  19. package/lib/cjs/core-react/expandable/list.scss +3 -3
  20. package/lib/cjs/core-react/icons/SvgPath.scss +3 -3
  21. package/lib/cjs/core-react/icons/WebFontIcon.scss +3 -3
  22. package/lib/cjs/core-react/icons/index.scss +3 -3
  23. package/lib/cjs/core-react/icons/mixins.scss +3 -3
  24. package/lib/cjs/core-react/icons/variables.scss +3 -3
  25. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +3 -3
  26. package/lib/cjs/core-react/index.scss +3 -3
  27. package/lib/cjs/core-react/inputs/index.scss +3 -3
  28. package/lib/cjs/core-react/inputs/input-label.scss +3 -3
  29. package/lib/cjs/core-react/inputs/input.scss +3 -3
  30. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +3 -3
  31. package/lib/cjs/core-react/inputs/variables.scss +3 -3
  32. package/lib/cjs/core-react/listbox/Listbox.scss +3 -3
  33. package/lib/cjs/core-react/loading/LoadingPrompt.scss +3 -3
  34. package/lib/cjs/core-react/loading/LoadingSpinner.scss +3 -3
  35. package/lib/cjs/core-react/loading/index.scss +3 -3
  36. package/lib/cjs/core-react/loading/mixins.scss +3 -3
  37. package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
  38. package/lib/cjs/core-react/messagebox/MessageBox.js +2 -2
  39. package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
  40. package/lib/cjs/core-react/messagebox/MessageBox.scss +3 -3
  41. package/lib/cjs/core-react/popup/Popup.scss +3 -3
  42. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +3 -3
  43. package/lib/cjs/core-react/searchbox/SearchBox.scss +3 -3
  44. package/lib/cjs/core-react/settings/SettingsContainer.scss +3 -3
  45. package/lib/cjs/core-react/style/baseline.scss +3 -3
  46. package/lib/cjs/core-react/style/index.scss +3 -3
  47. package/lib/cjs/core-react/style/opacity.scss +3 -3
  48. package/lib/cjs/core-react/tabs/index.scss +3 -3
  49. package/lib/cjs/core-react/tabs/tabs.scss +3 -3
  50. package/lib/cjs/core-react/tabs/vertical.scss +3 -3
  51. package/lib/cjs/core-react/text/FilteredText.scss +3 -3
  52. package/lib/cjs/core-react/text/block.scss +3 -3
  53. package/lib/cjs/core-react/text/body.scss +3 -3
  54. package/lib/cjs/core-react/text/index.scss +3 -3
  55. package/lib/cjs/core-react/text/mixins.scss +3 -3
  56. package/lib/cjs/core-react/tree/ExpansionToggle.scss +3 -3
  57. package/lib/cjs/core-react/tree/Placeholder.scss +3 -3
  58. package/lib/cjs/core-react/tree/Tree.scss +3 -3
  59. package/lib/esm/core-react/_geometry.scss +3 -3
  60. package/lib/esm/core-react/_math.scss +3 -3
  61. package/lib/esm/core-react/_typography.scss +3 -3
  62. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +3 -3
  63. package/lib/esm/core-react/badge/Badge.scss +3 -3
  64. package/lib/esm/core-react/badge/NewBadge.scss +3 -3
  65. package/lib/esm/core-react/base/base.scss +3 -3
  66. package/lib/esm/core-react/base/index.scss +3 -3
  67. package/lib/esm/core-react/classes.scss +3 -3
  68. package/lib/esm/core-react/colorthemes.scss +3 -3
  69. package/lib/esm/core-react/colorvariables.scss +3 -3
  70. package/lib/esm/core-react/contextmenu/ContextMenu.scss +3 -3
  71. package/lib/esm/core-react/dialog/Dialog.d.ts +3 -10
  72. package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
  73. package/lib/esm/core-react/dialog/Dialog.js +68 -165
  74. package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
  75. package/lib/esm/core-react/dialog/Dialog.scss +59 -217
  76. package/lib/esm/core-react/expandable/index.scss +3 -3
  77. package/lib/esm/core-react/expandable/list.scss +3 -3
  78. package/lib/esm/core-react/icons/SvgPath.scss +3 -3
  79. package/lib/esm/core-react/icons/WebFontIcon.scss +3 -3
  80. package/lib/esm/core-react/icons/index.scss +3 -3
  81. package/lib/esm/core-react/icons/mixins.scss +3 -3
  82. package/lib/esm/core-react/icons/variables.scss +3 -3
  83. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +3 -3
  84. package/lib/esm/core-react/index.scss +3 -3
  85. package/lib/esm/core-react/inputs/index.scss +3 -3
  86. package/lib/esm/core-react/inputs/input-label.scss +3 -3
  87. package/lib/esm/core-react/inputs/input.scss +3 -3
  88. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +3 -3
  89. package/lib/esm/core-react/inputs/variables.scss +3 -3
  90. package/lib/esm/core-react/listbox/Listbox.scss +3 -3
  91. package/lib/esm/core-react/loading/LoadingPrompt.scss +3 -3
  92. package/lib/esm/core-react/loading/LoadingSpinner.scss +3 -3
  93. package/lib/esm/core-react/loading/index.scss +3 -3
  94. package/lib/esm/core-react/loading/mixins.scss +3 -3
  95. package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
  96. package/lib/esm/core-react/messagebox/MessageBox.js +2 -2
  97. package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
  98. package/lib/esm/core-react/messagebox/MessageBox.scss +3 -3
  99. package/lib/esm/core-react/popup/Popup.scss +3 -3
  100. package/lib/esm/core-react/radialmenu/RadialMenu.scss +3 -3
  101. package/lib/esm/core-react/searchbox/SearchBox.scss +3 -3
  102. package/lib/esm/core-react/settings/SettingsContainer.scss +3 -3
  103. package/lib/esm/core-react/style/baseline.scss +3 -3
  104. package/lib/esm/core-react/style/index.scss +3 -3
  105. package/lib/esm/core-react/style/opacity.scss +3 -3
  106. package/lib/esm/core-react/tabs/index.scss +3 -3
  107. package/lib/esm/core-react/tabs/tabs.scss +3 -3
  108. package/lib/esm/core-react/tabs/vertical.scss +3 -3
  109. package/lib/esm/core-react/text/FilteredText.scss +3 -3
  110. package/lib/esm/core-react/text/block.scss +3 -3
  111. package/lib/esm/core-react/text/body.scss +3 -3
  112. package/lib/esm/core-react/text/index.scss +3 -3
  113. package/lib/esm/core-react/text/mixins.scss +3 -3
  114. package/lib/esm/core-react/tree/ExpansionToggle.scss +3 -3
  115. package/lib/esm/core-react/tree/Placeholder.scss +3 -3
  116. package/lib/esm/core-react/tree/Tree.scss +3 -3
  117. package/package.json +3 -3
  118. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts +0 -68
  119. package/lib/cjs/core-react/dialog/SimpleDialog.d.ts.map +0 -1
  120. package/lib/cjs/core-react/dialog/SimpleDialog.js +0 -51
  121. package/lib/cjs/core-react/dialog/SimpleDialog.js.map +0 -1
  122. package/lib/esm/core-react/dialog/SimpleDialog.d.ts +0 -68
  123. package/lib/esm/core-react/dialog/SimpleDialog.d.ts.map +0 -1
  124. package/lib/esm/core-react/dialog/SimpleDialog.js +0 -47
  125. package/lib/esm/core-react/dialog/SimpleDialog.js.map +0 -1
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @mixin triangle-common {
6
6
  width: 0;
7
7
  height: 0;
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @function sqrt($x, $iterations: 10) {
6
6
  $sqr: 1;
7
7
 
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "./style/opacity.scss";
6
6
 
7
7
  $title-weight: var(--iui-font-weight-normal);
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "../scrollbar";
6
6
  @import "../inputs/variables";
7
7
 
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "../style/themecolors";
6
6
 
7
7
  $icon-size: 16px;
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "../style/themecolors";
6
6
 
7
7
  .core-new-badge {
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "../_scrollbar";
6
6
 
7
7
  @mixin uicore-centered {
@@ -1,5 +1,5 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "./base";
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "./style/index";
6
6
  @import "./base/classes";
7
7
  @import "./expandable/classes";
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  // cspell:ignore colorvariables
6
6
 
7
7
  /** @note: This file should only be imported by UiCore.ts.
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
 
6
6
  // cspell:ignore mediumgray titlebar toolbutton outoffocus
7
7
 
@@ -1,7 +1,7 @@
1
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
- *--------------------------------------------------------------------------------------------*/
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
5
  @import "../icons/variables";
6
6
  @import "../inputs/variables";
7
7
  @import "../style/baseline";
@@ -45,7 +45,7 @@ export interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement
45
45
  footer?: string | React.ReactElement;
46
46
  /** List of DialogButtonDef objects specifying buttons and associated onClick events */
47
47
  buttonCluster?: DialogButtonDef[];
48
- /** Default alignment of dialog. Default: DialogAlignment.Center */
48
+ /** Default alignment of dialog. */
49
49
  alignment?: DialogAlignment;
50
50
  /** Initial x/left position of dialog in px. */
51
51
  x?: number;
@@ -63,9 +63,9 @@ export interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement
63
63
  height?: string | number;
64
64
  /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */
65
65
  minWidth?: string | number;
66
- /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */
66
+ /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 135px */
67
67
  minHeight?: string | number;
68
- /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */
68
+ /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100% */
69
69
  maxWidth?: string | number;
70
70
  /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */
71
71
  maxHeight?: string | number;
@@ -92,14 +92,10 @@ export interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement
92
92
  interface DialogState {
93
93
  rightResizing: boolean;
94
94
  downResizing: boolean;
95
- moving: boolean;
96
- grabOffsetX: number;
97
- grabOffsetY: number;
98
95
  x?: number;
99
96
  y?: number;
100
97
  width?: number;
101
98
  height?: number;
102
- positionSet: boolean;
103
99
  }
104
100
  /**
105
101
  * Dialog React component with optional resizing and dragging functionality
@@ -114,8 +110,6 @@ export declare class Dialog extends React.Component<DialogProps, DialogState> {
114
110
  constructor(props: DialogProps);
115
111
  private getParentWindow;
116
112
  componentWillUnmount(): void;
117
- /** Keep title bar of movable Dialog at least partially visible */
118
- private _handleAppWindowResize;
119
113
  componentDidMount(): void;
120
114
  handleRefSet: (containerDiv: HTMLDivElement | null) => void;
121
115
  render(): React.ReactElement;
@@ -126,7 +120,6 @@ export declare class Dialog extends React.Component<DialogProps, DialogState> {
126
120
  private _handleStartResizeRight;
127
121
  private _handleStartResizeDown;
128
122
  private _handleStartResizeDownRight;
129
- private _handleStartMove;
130
123
  private _handlePointerMove;
131
124
  private _handlePointerUp;
132
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAOxD;;GAEG;AACH,oBAAY,eAAe;IACzB,OAAO,aAAa;IACpB,GAAG,QAAQ;IACX,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,WAAW,iBAAiB;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EAC5D,WAAW;IACb,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAEhB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,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P,oBAAoB,IAAI,IAAI;IAW5B,iBAAiB,IAAI,IAAI;IAOlC,YAAY,iBAAkB,cAAc,GAAG,IAAI,UAExD;IAEc,MAAM,IAAI,KAAK,CAAC,YAAY;IA2J5C,OAAO,CAAC,4BAA4B;IAuBpC,SAAS,CAAC,gBAAgB,CACxB,aAAa,EAAE,eAAe,EAAE,GAAG,SAAS,EACjB,gBAAgB,GAAE,WAAW,CAAC,WAAW,CAAS,EAClD,mBAAmB,GAAE,OAAe,GAC9D,KAAK,CAAC,SAAS,EAAE,GAAG,SAAS;IAuEhC,OAAO,CAAC,YAAY,CAQlB;IAEF,SAAS,CAAC,2BAA2B,UAAW,kBAAkB,KAAG,IAAI,CAKvE;IAEF,OAAO,CAAC,uBAAuB,CAK7B;IAEF,OAAO,CAAC,sBAAsB,CAK5B;IAEF,OAAO,CAAC,2BAA2B,CAKjC;IAEF,OAAO,CAAC,kBAAkB,CAoCxB;IAEF,OAAO,CAAC,gBAAgB,CAiBtB;CACH"}
@@ -14,10 +14,8 @@ const React = require("react");
14
14
  const appui_abstract_1 = require("@itwin/appui-abstract");
15
15
  const DivWithOutsideClick_1 = require("../base/DivWithOutsideClick");
16
16
  const UiCore_1 = require("../UiCore");
17
- const FocusTrap_1 = require("../focustrap/FocusTrap");
18
17
  const itwinui_react_1 = require("@itwin/itwinui-react");
19
- const IconComponent_1 = require("../icons/IconComponent");
20
- const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
18
+ const itwinui_react_2 = require("@itwin/itwinui-react");
21
19
  // cspell:ignore focustrap
22
20
  /** Enum for dialog alignment
23
21
  * @public
@@ -43,28 +41,7 @@ class Dialog extends React.Component {
43
41
  super(props);
44
42
  this._parentDocument = document;
45
43
  this._containerRef = React.createRef();
46
- /** Keep title bar of movable Dialog at least partially visible */
47
44
  // istanbul ignore next
48
- this._handleAppWindowResize = () => {
49
- if (!this._containerRef.current || !this.props.movable)
50
- return;
51
- const parentWindow = this.getParentWindow();
52
- const { x, y } = this.state;
53
- let newX;
54
- let newY;
55
- if (undefined !== y && undefined !== x) {
56
- if (y > parentWindow.innerHeight - 32)
57
- newY = parentWindow.innerHeight - 32;
58
- if (x > parentWindow.innerWidth - 32)
59
- newX = parentWindow.innerWidth - 32;
60
- }
61
- if (newX !== undefined || newY !== undefined)
62
- this.setState({
63
- x: newX !== undefined ? newX : x,
64
- y: newY !== undefined ? newY : y,
65
- positionSet: true,
66
- });
67
- };
68
45
  this.handleRefSet = (containerDiv) => {
69
46
  if (containerDiv)
70
47
  this._parentDocument = containerDiv.ownerDocument;
@@ -100,29 +77,11 @@ class Dialog extends React.Component {
100
77
  const parentWindow = this.getParentWindow();
101
78
  parentWindow.addEventListener("pointermove", this._handlePointerMove, true);
102
79
  };
103
- this._handleStartMove = (event) => {
104
- if (!this.props.movable)
105
- return;
106
- event.preventDefault();
107
- // istanbul ignore else
108
- if (this._containerRef.current) {
109
- const rect = this._containerRef.current.getBoundingClientRect();
110
- const grabOffsetX = event.clientX - rect.left;
111
- const grabOffsetY = event.clientY - rect.top;
112
- this.setState({
113
- grabOffsetX,
114
- grabOffsetY,
115
- moving: true,
116
- });
117
- const parentWindow = this.getParentWindow();
118
- parentWindow.addEventListener("pointermove", this._handlePointerMove, true);
119
- }
120
- };
121
80
  this._handlePointerMove = (event) => {
122
- if ((!this.props.resizable && !this.props.movable) ||
123
- !this._containerRef.current)
81
+ // istanbul ignore next
82
+ if (!this.props.resizable || !this._containerRef.current)
124
83
  return;
125
- const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;
84
+ const { minWidth, maxWidth, minHeight, maxHeight } = this.props;
126
85
  let { x, y, width, height } = this.state;
127
86
  // istanbul ignore else
128
87
  if (x === undefined) {
@@ -133,57 +92,34 @@ class Dialog extends React.Component {
133
92
  (x = rect.left),
134
93
  (y = rect.top);
135
94
  }
136
- if (this.props.resizable) {
137
- if (this.state.rightResizing) {
138
- const pointerX = event.clientX;
139
- width = pointerX - x;
140
- // istanbul ignore else
141
- if (typeof minWidth === "number")
142
- width = Math.max(width, minWidth);
143
- if (maxWidth !== undefined && typeof maxWidth === "number")
144
- width = Math.min(width, maxWidth);
145
- }
146
- if (this.state.downResizing) {
147
- const pointerY = event.clientY;
148
- height = pointerY - y;
149
- // istanbul ignore else
150
- if (typeof minHeight === "number")
151
- height = Math.max(height, minHeight);
152
- if (maxHeight !== undefined && typeof maxHeight === "number")
153
- height = Math.min(height, maxHeight);
154
- }
155
- this.setState({ width, height });
95
+ if (this.state.rightResizing) {
96
+ const pointerX = event.clientX;
97
+ width = pointerX - x;
98
+ // istanbul ignore else
99
+ if (typeof minWidth === "number")
100
+ width = Math.max(width, minWidth);
101
+ if (maxWidth !== undefined && typeof maxWidth === "number")
102
+ width = Math.min(width, maxWidth);
156
103
  }
157
- // istanbul ignore next
158
- if (movable && this.state.moving) {
159
- x = event.clientX - this.state.grabOffsetX;
160
- y = event.clientY - this.state.grabOffsetY;
161
- if (y < 0)
162
- y = 0;
163
- if (event.view) {
164
- if (y > event.view.innerHeight - 32)
165
- y = event.view.innerHeight - 32;
166
- if (x > event.view.innerWidth - 32)
167
- x = event.view.innerWidth - 32;
168
- if (width) {
169
- if (x < 0 - width + 32)
170
- x = 0 - width + 32;
171
- }
172
- }
173
- this.setState({ x, y, positionSet: true });
104
+ if (this.state.downResizing) {
105
+ const pointerY = event.clientY;
106
+ height = pointerY - y;
107
+ // istanbul ignore else
108
+ if (typeof minHeight === "number")
109
+ height = Math.max(height, minHeight);
110
+ if (maxHeight !== undefined && typeof maxHeight === "number")
111
+ height = Math.min(height, maxHeight);
174
112
  }
113
+ this.setState({ width, height });
175
114
  };
176
115
  this._handlePointerUp = (_event) => {
177
- if (!this.props.movable && !this.props.resizable)
116
+ if (!this.props.resizable)
178
117
  return;
179
118
  // istanbul ignore else
180
119
  if (this._containerRef.current) {
181
120
  this.setState({
182
121
  rightResizing: false,
183
122
  downResizing: false,
184
- moving: false,
185
- grabOffsetX: 0,
186
- grabOffsetY: 0,
187
123
  });
188
124
  }
189
125
  const parentWindow = this.getParentWindow();
@@ -192,10 +128,6 @@ class Dialog extends React.Component {
192
128
  this.state = {
193
129
  rightResizing: false,
194
130
  downResizing: false,
195
- moving: false,
196
- grabOffsetX: 0,
197
- grabOffsetY: 0,
198
- positionSet: props.x !== undefined || props.y !== undefined,
199
131
  };
200
132
  }
201
133
  getParentWindow() {
@@ -207,118 +139,89 @@ class Dialog extends React.Component {
207
139
  parentWindow.removeEventListener("pointerup", this._handlePointerUp, true);
208
140
  parentWindow.removeEventListener("pointermove", this._handlePointerMove, true);
209
141
  this._parentDocument.removeEventListener("keyup", this._handleKeyUp, true);
210
- parentWindow.addEventListener("resize", this._handleAppWindowResize);
211
142
  }
212
143
  componentDidMount() {
213
144
  const parentWindow = this.getParentWindow();
214
145
  parentWindow.addEventListener("pointerup", this._handlePointerUp, true);
215
146
  this._parentDocument.addEventListener("keyup", this._handleKeyUp, true);
216
- parentWindow.addEventListener("resize", this._handleAppWindowResize);
217
147
  }
218
148
  render() {
219
149
  const { opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, minWidth, minHeight, x, y, width, height, maxHeight, maxWidth, backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName, modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, hideHeader, header, ...props } = this.props;
150
+ let initialOffset = {};
151
+ if (x || y) {
152
+ initialOffset = {
153
+ left: x ?? 0,
154
+ top: y ?? 0,
155
+ transform: "none",
156
+ };
157
+ }
220
158
  const containerStyle = {
159
+ ...initialOffset,
221
160
  margin: "",
222
- left: x,
223
- top: y,
224
161
  width,
225
162
  height,
226
163
  };
227
- if (this.state.x !== undefined || this.state.y !== undefined) {
228
- // istanbul ignore else
229
- if (this.state.x !== undefined) {
230
- containerStyle.marginLeft = "0";
231
- containerStyle.marginRight = "0";
232
- containerStyle.left = this.state.x;
233
- }
234
- // istanbul ignore else
235
- if (this.state.y !== undefined) {
236
- containerStyle.marginTop = "0";
237
- containerStyle.marginBottom = "0";
238
- containerStyle.top = this.state.y;
239
- }
240
- }
241
- if (this.state.width !== undefined || this.state.height !== undefined) {
242
- // istanbul ignore else
243
- if (this.state.width !== undefined)
244
- containerStyle.width = this.state.width;
245
- // istanbul ignore else
246
- if (this.state.height !== undefined)
247
- containerStyle.height = this.state.height;
248
- }
164
+ // istanbul ignore else
165
+ if (this.state.width !== undefined)
166
+ containerStyle.width = this.state.width;
167
+ // istanbul ignore else
168
+ if (this.state.height !== undefined)
169
+ containerStyle.height = this.state.height;
249
170
  const minMaxStyle = {
250
171
  minWidth,
251
172
  minHeight,
252
173
  maxWidth,
253
174
  maxHeight,
254
175
  };
255
- const buttons = this.getFooterButtons(buttonCluster);
256
- const footerElement = footer ||
257
- (buttons && buttons.length > 0 && (React.createElement("div", { className: "core-dialog-buttons" }, buttons)));
258
- const divStyle = {
259
- ...backgroundStyle,
260
- ...style,
176
+ const dialogBaseContainerStyle = {
177
+ ...containerStyle,
178
+ ...minMaxStyle,
261
179
  };
262
- const headerElement = header || (React.createElement("div", { className: (0, classnames_1.default)("core-dialog-head", { "core-dialog-movable": movable }, { "core-dialog-modal": modal }), "data-testid": "core-dialog-head", onPointerDown: this._handleStartMove },
263
- React.createElement("div", { className: "core-dialog-title", "data-testid": "core-dialog-title", style: titleStyle }, title),
264
- React.createElement("button", { className: "core-focus-trap-ignore-initial core-dialog-close icon", "data-testid": "core-dialog-close", onClick: onClose },
265
- React.createElement(IconComponent_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgClose, null) }))));
266
- return (React.createElement("div", { ref: this.handleRefSet, className: (0, classnames_1.default)("core-dialog", !modal && "core-dialog-hidden", opened && "core-dialog-opened", className), style: divStyle, "data-testid": "core-dialog-root", ...props }, opened && (React.createElement(DivWithOutsideClick_1.DivWithOutsideClick, { onOutsideClick: onOutsideClick },
267
- React.createElement(FocusTrap_1.FocusTrap, { active: trapFocus && modal, returnFocusOnDeactivate: true },
268
- React.createElement("div", { className: (0, classnames_1.default)("core-dialog-container", this.getCSSClassNameFromAlignment(alignment)), style: { ...containerStyle, ...minMaxStyle }, "data-testid": "core-dialog-container", onPointerDown: this._handleContainerPointerDown },
269
- React.createElement("div", { className: "core-dialog-area", ref: this._containerRef, style: minMaxStyle },
270
- !hideHeader && headerElement,
271
- React.createElement("div", { className: (0, classnames_1.default)("core-dialog-content", { "core-dialog-content-no-inset": !inset }, contentClassName), style: contentStyle }, this.props.children),
272
- footerElement && (React.createElement("div", { className: "core-dialog-footer", style: footerStyle }, footerElement)),
273
- React.createElement("div", { className: (0, classnames_1.default)("core-dialog-drag", "core-dialog-drag-right", { "core-dialog-drag-enabled": resizable }), "data-testid": "core-dialog-drag-right", onPointerDown: this._handleStartResizeRight }),
274
- React.createElement("div", { className: (0, classnames_1.default)("core-dialog-drag", "core-dialog-drag-bottom-mid", { "core-dialog-drag-enabled": resizable }), "data-testid": "core-dialog-drag-bottom", onPointerDown: this._handleStartResizeDown }),
275
- React.createElement("div", { className: (0, classnames_1.default)("core-dialog-drag", "core-dialog-drag-bottom-right", { "core-dialog-drag-enabled": resizable }), "data-testid": "core-dialog-drag-bottom-right", onPointerDown: this._handleStartResizeDownRight }))))))));
180
+ const buttons = this.getFooterButtons(buttonCluster, "high-visibility", true);
181
+ return (React.createElement(itwinui_react_1.Dialog, { isOpen: opened, onClose: onClose, closeOnExternalClick: false, closeOnEsc: false, style: style, className: (0, classnames_1.default)("core-dialog", className), isDraggable: movable, trapFocus: trapFocus && /* istanbul ignore next */ modal, preventDocumentScroll: true, "data-testid": "core-dialog-root", ...props },
182
+ modal && React.createElement(itwinui_react_1.Dialog.Backdrop, { style: backgroundStyle }),
183
+ React.createElement(DivWithOutsideClick_1.DivWithOutsideClick, { onOutsideClick: onOutsideClick },
184
+ React.createElement(itwinui_react_1.Dialog.Main, { ref: this._containerRef, className: (0, classnames_1.default)("core-dialog-main", alignment && this.getCSSClassNameFromAlignment(alignment)), "data-testid": "core-dialog-container", style: dialogBaseContainerStyle, onPointerDown: this._handleContainerPointerDown },
185
+ !hideHeader &&
186
+ (header || (React.createElement(itwinui_react_1.Dialog.TitleBar, { titleText: title, style: titleStyle, "data-testid": "core-dialog-head" }))),
187
+ React.createElement(itwinui_react_1.Dialog.Content, { className: contentClassName, style: { padding: inset ? undefined : 0, ...contentStyle } }, this.props.children),
188
+ footer || (React.createElement(itwinui_react_1.Dialog.ButtonBar, { style: footerStyle }, buttons)),
189
+ resizable && (React.createElement(React.Fragment, null,
190
+ React.createElement("div", { className: (0, classnames_1.default)("core-dialog-resize-bar", "core-drag-right"), onPointerDown: this._handleStartResizeRight, "data-testid": "core-dialog-drag-right" }),
191
+ React.createElement("div", { className: (0, classnames_1.default)("core-dialog-resize-bar", "core-drag-bottom-right"), onPointerDown: this._handleStartResizeDownRight, "data-testid": "core-dialog-drag-bottom-right" }),
192
+ React.createElement("div", { className: (0, classnames_1.default)("core-dialog-resize-bar", "core-drag-bottom"), onPointerDown: this._handleStartResizeDown, "data-testid": "core-dialog-drag-bottom" })))))));
276
193
  }
277
194
  getCSSClassNameFromAlignment(alignment) {
278
- let className = "";
279
- // Drop the alignment CSS class if the Dialog has been sized or moved.
280
- if (this.state.positionSet)
281
- return "";
282
- // istanbul ignore next
283
- if (!alignment)
284
- alignment = DialogAlignment.Center;
285
195
  switch (alignment) {
286
196
  case DialogAlignment.TopLeft:
287
- className = "core-dialog-top-left";
288
- break;
197
+ return "core-align-top-left";
289
198
  case DialogAlignment.Top:
290
- className = "core-dialog-top";
291
- break;
199
+ return "core-align-top";
292
200
  case DialogAlignment.TopRight:
293
- className = "core-dialog-top-right";
294
- break;
201
+ return "core-align-top-right";
295
202
  case DialogAlignment.Left:
296
- className = "core-dialog-left";
297
- break;
203
+ return "core-align-left";
298
204
  case DialogAlignment.Center:
299
- className = "core-dialog-center";
300
- break;
205
+ return "core-align-center";
301
206
  case DialogAlignment.Right:
302
- className = "core-dialog-right";
303
- break;
207
+ return "core-align-right";
304
208
  case DialogAlignment.BottomLeft:
305
- className = "core-dialog-bottom-left";
306
- break;
209
+ return "core-align-bottom-left";
307
210
  case DialogAlignment.Bottom:
308
- className = "core-dialog-bottom";
309
- break;
211
+ return "core-align-bottom";
310
212
  case DialogAlignment.BottomRight:
311
- className = "core-dialog-bottom-right";
312
- break;
213
+ return "core-align-bottom-right";
313
214
  }
314
- return className;
315
215
  }
316
- getFooterButtons(buttonCluster, primaryStyleType = "cta", noCoreButtonClasses = false) {
216
+ getFooterButtons(buttonCluster,
217
+ /* istanbul ignore next */ primaryStyleType = "cta",
218
+ /* istanbul ignore next */ noCoreButtonClasses = false) {
317
219
  if (buttonCluster === undefined)
318
220
  return undefined;
319
221
  const buttons = [];
320
222
  buttonCluster.forEach((button, index) => {
321
223
  let buttonText = "";
224
+ // istanbul ignore next
322
225
  let buttonClass = (0, classnames_1.default)(!noCoreButtonClasses && "core-dialog-button", !noCoreButtonClasses && `dialog-button-${button.type}`, button.className);
323
226
  let usePrimaryStyleType = false;
324
227
  switch (button.type) {
@@ -362,15 +265,15 @@ class Dialog extends React.Component {
362
265
  }
363
266
  if (button.label)
364
267
  buttonText = button.label;
365
- buttons.push(React.createElement(itwinui_react_1.Button, { className: buttonClass, disabled: button.disabled, styleType: usePrimaryStyleType ? primaryStyleType : undefined, key: index.toString(), onClick: button.onClick }, buttonText));
268
+ buttons.push(React.createElement(itwinui_react_2.Button, { className: buttonClass, disabled: button.disabled, styleType: usePrimaryStyleType ? primaryStyleType : undefined, key: index.toString(), onClick: button.onClick }, buttonText));
366
269
  });
367
270
  return buttons;
368
271
  }
369
272
  }
370
273
  Dialog.defaultProps = {
371
- alignment: DialogAlignment.Center,
372
274
  minWidth: 300,
373
- minHeight: 100,
275
+ minHeight: 135,
276
+ maxWidth: "100%",
374
277
  width: "50%",
375
278
  hideHeader: false,
376
279
  resizable: false,