@itwin/appui-react 5.35.1 → 5.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/lib/appui-react/accudraw/AccuDrawFieldContainer.d.ts.map +1 -1
  3. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js +8 -2
  4. package/lib/appui-react/accudraw/AccuDrawFieldContainer.js.map +1 -1
  5. package/lib/appui-react/accudraw/AccuDrawInputField.d.ts.map +1 -1
  6. package/lib/appui-react/accudraw/AccuDrawInputField.js +3 -3
  7. package/lib/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
  8. package/lib/appui-react/accudraw/Calculator.d.ts.map +1 -1
  9. package/lib/appui-react/accudraw/Calculator.js +3 -2
  10. package/lib/appui-react/accudraw/Calculator.js.map +1 -1
  11. package/lib/appui-react/accudraw/CalculatorPopup.d.ts.map +1 -1
  12. package/lib/appui-react/accudraw/CalculatorPopup.js +3 -4
  13. package/lib/appui-react/accudraw/CalculatorPopup.js.map +1 -1
  14. package/lib/appui-react/accudraw/MenuButton.d.ts.map +1 -1
  15. package/lib/appui-react/accudraw/MenuButton.js +3 -2
  16. package/lib/appui-react/accudraw/MenuButton.js.map +1 -1
  17. package/lib/appui-react/backstage/Backstage.d.ts.map +1 -1
  18. package/lib/appui-react/backstage/Backstage.js +2 -3
  19. package/lib/appui-react/backstage/Backstage.js.map +1 -1
  20. package/lib/appui-react/childwindow/ChildWindowRenderer.scss +1 -1
  21. package/lib/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  22. package/lib/appui-react/configurableui/ConfigurableUiContent.js +9 -3
  23. package/lib/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  24. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.d.ts.map +1 -1
  25. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js +3 -2
  26. package/lib/appui-react/cursor/cursorprompt/CursorPrompt.js.map +1 -1
  27. package/lib/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  28. package/lib/appui-react/dialog/DialogManagerBase.js +8 -6
  29. package/lib/appui-react/dialog/DialogManagerBase.js.map +1 -1
  30. package/lib/appui-react/editors/LockEditor.d.ts.map +1 -1
  31. package/lib/appui-react/editors/LockEditor.js +2 -1
  32. package/lib/appui-react/editors/LockEditor.js.map +1 -1
  33. package/lib/appui-react/editors/LockProvider.d.ts.map +1 -1
  34. package/lib/appui-react/editors/LockProvider.js +2 -1
  35. package/lib/appui-react/editors/LockProvider.js.map +1 -1
  36. package/lib/appui-react/frontstage/ModalFrontstageButton.d.ts.map +1 -1
  37. package/lib/appui-react/frontstage/ModalFrontstageButton.js +2 -1
  38. package/lib/appui-react/frontstage/ModalFrontstageButton.js.map +1 -1
  39. package/lib/appui-react/frontstage/ModalSettingsStage.d.ts.map +1 -1
  40. package/lib/appui-react/frontstage/ModalSettingsStage.js +2 -1
  41. package/lib/appui-react/frontstage/ModalSettingsStage.js.map +1 -1
  42. package/lib/appui-react/frontstage/NestedFrontstage.d.ts.map +1 -1
  43. package/lib/appui-react/frontstage/NestedFrontstage.js +2 -1
  44. package/lib/appui-react/frontstage/NestedFrontstage.js.map +1 -1
  45. package/lib/appui-react/frontstage/NestedFrontstageAppButton.d.ts.map +1 -1
  46. package/lib/appui-react/frontstage/NestedFrontstageAppButton.js +3 -1
  47. package/lib/appui-react/frontstage/NestedFrontstageAppButton.js.map +1 -1
  48. package/lib/appui-react/layout/tool-settings/Docked.d.ts.map +1 -1
  49. package/lib/appui-react/layout/tool-settings/Docked.js +14 -8
  50. package/lib/appui-react/layout/tool-settings/Docked.js.map +1 -1
  51. package/lib/appui-react/layout/tool-settings/Handle.d.ts.map +1 -1
  52. package/lib/appui-react/layout/tool-settings/Handle.js +4 -2
  53. package/lib/appui-react/layout/tool-settings/Handle.js.map +1 -1
  54. package/lib/appui-react/layout/tool-settings/Overflow.d.ts.map +1 -1
  55. package/lib/appui-react/layout/tool-settings/Overflow.js +2 -1
  56. package/lib/appui-react/layout/tool-settings/Overflow.js.map +1 -1
  57. package/lib/appui-react/layout/widget/Dock.d.ts.map +1 -1
  58. package/lib/appui-react/layout/widget/Dock.js +2 -1
  59. package/lib/appui-react/layout/widget/Dock.js.map +1 -1
  60. package/lib/appui-react/layout/widget/MenuTab.d.ts.map +1 -1
  61. package/lib/appui-react/layout/widget/MenuTab.js +2 -1
  62. package/lib/appui-react/layout/widget/MenuTab.js.map +1 -1
  63. package/lib/appui-react/layout/widget/Overflow.d.ts.map +1 -1
  64. package/lib/appui-react/layout/widget/Overflow.js +2 -1
  65. package/lib/appui-react/layout/widget/Overflow.js.map +1 -1
  66. package/lib/appui-react/layout/widget/PinToggle.d.ts.map +1 -1
  67. package/lib/appui-react/layout/widget/PinToggle.js +2 -1
  68. package/lib/appui-react/layout/widget/PinToggle.js.map +1 -1
  69. package/lib/appui-react/layout/widget/PopoutToggle.d.ts.map +1 -1
  70. package/lib/appui-react/layout/widget/PopoutToggle.js +2 -1
  71. package/lib/appui-react/layout/widget/PopoutToggle.js.map +1 -1
  72. package/lib/appui-react/layout/widget/SendBack.d.ts.map +1 -1
  73. package/lib/appui-react/layout/widget/SendBack.js +2 -1
  74. package/lib/appui-react/layout/widget/SendBack.js.map +1 -1
  75. package/lib/appui-react/layout/widget/Tab.scss +9 -2
  76. package/lib/appui-react/layout/widget/widget-content-layout/header/HeaderIconToolbar.d.ts.map +1 -1
  77. package/lib/appui-react/layout/widget/widget-content-layout/header/HeaderIconToolbar.js +4 -2
  78. package/lib/appui-react/layout/widget/widget-content-layout/header/HeaderIconToolbar.js.map +1 -1
  79. package/lib/appui-react/layout/widget/widget-content-layout/header/HeaderSearch.d.ts.map +1 -1
  80. package/lib/appui-react/layout/widget/widget-content-layout/header/HeaderSearch.js +4 -3
  81. package/lib/appui-react/layout/widget/widget-content-layout/header/HeaderSearch.js.map +1 -1
  82. package/lib/appui-react/messages/InputField.d.ts.map +1 -1
  83. package/lib/appui-react/messages/InputField.js +11 -10
  84. package/lib/appui-react/messages/InputField.js.map +1 -1
  85. package/lib/appui-react/navigationaids/SheetNavigationAid.d.ts.map +1 -1
  86. package/lib/appui-react/navigationaids/SheetNavigationAid.js +4 -2
  87. package/lib/appui-react/navigationaids/SheetNavigationAid.js.map +1 -1
  88. package/lib/appui-react/navigationaids/SheetsModalFrontstage.d.ts.map +1 -1
  89. package/lib/appui-react/navigationaids/SheetsModalFrontstage.js +4 -3
  90. package/lib/appui-react/navigationaids/SheetsModalFrontstage.js.map +1 -1
  91. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.d.ts +2 -2
  92. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.d.ts.map +1 -1
  93. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.js +11 -14
  94. package/lib/appui-react/navigationaids/StandardRotationNavigationAid.js.map +1 -1
  95. package/lib/appui-react/new-editors/LockEditor.d.ts.map +1 -1
  96. package/lib/appui-react/new-editors/LockEditor.js +2 -3
  97. package/lib/appui-react/new-editors/LockEditor.js.map +1 -1
  98. package/lib/appui-react/pickers/ListPicker.d.ts.map +1 -1
  99. package/lib/appui-react/pickers/ListPicker.js +9 -17
  100. package/lib/appui-react/pickers/ListPicker.js.map +1 -1
  101. package/lib/appui-react/pickers/ViewSelector.d.ts.map +1 -1
  102. package/lib/appui-react/pickers/ViewSelector.js +2 -4
  103. package/lib/appui-react/pickers/ViewSelector.js.map +1 -1
  104. package/lib/appui-react/preview/PreviewFeatures.d.ts +9 -0
  105. package/lib/appui-react/preview/PreviewFeatures.d.ts.map +1 -1
  106. package/lib/appui-react/preview/PreviewFeatures.js +6 -1
  107. package/lib/appui-react/preview/PreviewFeatures.js.map +1 -1
  108. package/lib/appui-react/preview/control-widget-visibility/AddWidgetButton.d.ts.map +1 -1
  109. package/lib/appui-react/preview/control-widget-visibility/AddWidgetButton.js +2 -1
  110. package/lib/appui-react/preview/control-widget-visibility/AddWidgetButton.js.map +1 -1
  111. package/lib/appui-react/preview/control-widget-visibility/CloseWidgetButton.d.ts.map +1 -1
  112. package/lib/appui-react/preview/control-widget-visibility/CloseWidgetButton.js +2 -1
  113. package/lib/appui-react/preview/control-widget-visibility/CloseWidgetButton.js.map +1 -1
  114. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.d.ts.map +1 -1
  115. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.js +2 -1
  116. package/lib/appui-react/preview/control-widget-visibility/NavigationWidget.js.map +1 -1
  117. package/lib/appui-react/preview/enable-maximized-widget/MaximizeToggle.d.ts.map +1 -1
  118. package/lib/appui-react/preview/enable-maximized-widget/MaximizeToggle.js +3 -2
  119. package/lib/appui-react/preview/enable-maximized-widget/MaximizeToggle.js.map +1 -1
  120. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.d.ts.map +1 -1
  121. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.js +3 -1
  122. package/lib/appui-react/preview/reparent-popout-widgets/PopoutThemeProvider.js.map +1 -1
  123. package/lib/appui-react/preview/use-stratakit/StrataKitIcon.d.ts +26 -0
  124. package/lib/appui-react/preview/use-stratakit/StrataKitIcon.d.ts.map +1 -0
  125. package/lib/appui-react/preview/use-stratakit/StrataKitIcon.js +59 -0
  126. package/lib/appui-react/preview/use-stratakit/StrataKitIcon.js.map +1 -0
  127. package/lib/appui-react/preview/use-stratakit/StrataKitIconModules.d.ts +8 -0
  128. package/lib/appui-react/preview/use-stratakit/StrataKitIconModules.d.ts.map +1 -0
  129. package/lib/appui-react/preview/use-stratakit/StrataKitIconModules.js +6 -0
  130. package/lib/appui-react/preview/use-stratakit/StrataKitIconModules.js.map +1 -0
  131. package/lib/appui-react/preview/use-stratakit/StrataKitPortalProvider.d.ts +10 -0
  132. package/lib/appui-react/preview/use-stratakit/StrataKitPortalProvider.d.ts.map +1 -0
  133. package/lib/appui-react/preview/use-stratakit/StrataKitPortalProvider.js +26 -0
  134. package/lib/appui-react/preview/use-stratakit/StrataKitPortalProvider.js.map +1 -0
  135. package/lib/appui-react/preview/use-stratakit/useStrataKitModules.d.ts +7 -0
  136. package/lib/appui-react/preview/use-stratakit/useStrataKitModules.d.ts.map +1 -0
  137. package/lib/appui-react/preview/use-stratakit/useStrataKitModules.js +13 -0
  138. package/lib/appui-react/preview/use-stratakit/useStrataKitModules.js.map +1 -0
  139. package/lib/appui-react/preview/use-stratakit/webFontToStrataKitIcon.d.ts +12 -0
  140. package/lib/appui-react/preview/use-stratakit/webFontToStrataKitIcon.d.ts.map +1 -0
  141. package/lib/appui-react/preview/use-stratakit/webFontToStrataKitIcon.js +603 -0
  142. package/lib/appui-react/preview/use-stratakit/webFontToStrataKitIcon.js.map +1 -0
  143. package/lib/appui-react/preview/widget-action-dropdown/MoreButton.d.ts.map +1 -1
  144. package/lib/appui-react/preview/widget-action-dropdown/MoreButton.js +2 -1
  145. package/lib/appui-react/preview/widget-action-dropdown/MoreButton.js.map +1 -1
  146. package/lib/appui-react/preview/widget-tab-actions/Widget.d.ts.map +1 -1
  147. package/lib/appui-react/preview/widget-tab-actions/Widget.js +5 -6
  148. package/lib/appui-react/preview/widget-tab-actions/Widget.js.map +1 -1
  149. package/lib/appui-react/selection/SelectionContextItemDef.d.ts.map +1 -1
  150. package/lib/appui-react/selection/SelectionContextItemDef.js +7 -8
  151. package/lib/appui-react/selection/SelectionContextItemDef.js.map +1 -1
  152. package/lib/appui-react/settings/quantityformatting/QuantityFormat.d.ts.map +1 -1
  153. package/lib/appui-react/settings/quantityformatting/QuantityFormat.js +2 -1
  154. package/lib/appui-react/settings/quantityformatting/QuantityFormat.js.map +1 -1
  155. package/lib/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
  156. package/lib/appui-react/settings/ui/UiSettingsPage.js +2 -1
  157. package/lib/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
  158. package/lib/appui-react/statusbar/LabelIndicator.d.ts.map +1 -1
  159. package/lib/appui-react/statusbar/LabelIndicator.js +2 -2
  160. package/lib/appui-react/statusbar/LabelIndicator.js.map +1 -1
  161. package/lib/appui-react/statusbar/Overflow.d.ts +1 -1
  162. package/lib/appui-react/statusbar/Overflow.d.ts.map +1 -1
  163. package/lib/appui-react/statusbar/Overflow.js +3 -2
  164. package/lib/appui-react/statusbar/Overflow.js.map +1 -1
  165. package/lib/appui-react/statusfields/SelectionCount.d.ts +1 -1
  166. package/lib/appui-react/statusfields/SelectionCount.d.ts.map +1 -1
  167. package/lib/appui-react/statusfields/SelectionCount.js +3 -3
  168. package/lib/appui-react/statusfields/SelectionCount.js.map +1 -1
  169. package/lib/appui-react/statusfields/SnapMode.d.ts.map +1 -1
  170. package/lib/appui-react/statusfields/SnapMode.js +12 -10
  171. package/lib/appui-react/statusfields/SnapMode.js.map +1 -1
  172. package/lib/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
  173. package/lib/appui-react/statusfields/ViewAttributes.js +2 -1
  174. package/lib/appui-react/statusfields/ViewAttributes.js.map +1 -1
  175. package/lib/appui-react/statusfields/message-center/MessageCenterField.d.ts.map +1 -1
  176. package/lib/appui-react/statusfields/message-center/MessageCenterField.js +11 -10
  177. package/lib/appui-react/statusfields/message-center/MessageCenterField.js.map +1 -1
  178. package/lib/appui-react/statusfields/message-center/MessageCenterField.scss +16 -0
  179. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
  180. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js +107 -109
  181. package/lib/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  182. package/lib/appui-react/toolbar/new-toolbars/GroupItem.d.ts.map +1 -1
  183. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js +2 -4
  184. package/lib/appui-react/toolbar/new-toolbars/GroupItem.js.map +1 -1
  185. package/lib/appui-react/toolbar/new-toolbars/Item.d.ts.map +1 -1
  186. package/lib/appui-react/toolbar/new-toolbars/Item.js +2 -4
  187. package/lib/appui-react/toolbar/new-toolbars/Item.js.map +1 -1
  188. package/lib/appui-react/toolbar/new-toolbars/OverflowButton.d.ts.map +1 -1
  189. package/lib/appui-react/toolbar/new-toolbars/OverflowButton.js +2 -1
  190. package/lib/appui-react/toolbar/new-toolbars/OverflowButton.js.map +1 -1
  191. package/lib/appui-react/tools/CoreToolDefinitions.d.ts.map +1 -1
  192. package/lib/appui-react/tools/CoreToolDefinitions.js +5 -5
  193. package/lib/appui-react/tools/CoreToolDefinitions.js.map +1 -1
  194. package/lib/appui-react/tools/KeyinPaletteTools.d.ts.map +1 -1
  195. package/lib/appui-react/tools/KeyinPaletteTools.js +2 -1
  196. package/lib/appui-react/tools/KeyinPaletteTools.js.map +1 -1
  197. package/lib/appui-react/tools/OpenSettingsTool.d.ts.map +1 -1
  198. package/lib/appui-react/tools/OpenSettingsTool.js +2 -1
  199. package/lib/appui-react/tools/OpenSettingsTool.js.map +1 -1
  200. package/lib/appui-react/tools/defineToolIcons.js +13 -2
  201. package/lib/appui-react/tools/defineToolIcons.js.map +1 -1
  202. package/lib/appui-react/utils/PropsHelper.d.ts.map +1 -1
  203. package/lib/appui-react/utils/PropsHelper.js +2 -2
  204. package/lib/appui-react/utils/PropsHelper.js.map +1 -1
  205. package/lib/appui-react/widget-panels/Frontstage.js +1 -1
  206. package/lib/appui-react/widget-panels/Frontstage.js.map +1 -1
  207. package/lib/appui-react/widget-panels/Tab.d.ts.map +1 -1
  208. package/lib/appui-react/widget-panels/Tab.js +4 -6
  209. package/lib/appui-react/widget-panels/Tab.js.map +1 -1
  210. package/lib/appui-react/widgets/BackstageAppButton.d.ts.map +1 -1
  211. package/lib/appui-react/widgets/BackstageAppButton.js +3 -5
  212. package/lib/appui-react/widgets/BackstageAppButton.js.map +1 -1
  213. package/lib/cjs/appui-react/childwindow/ChildWindowRenderer.scss +1 -1
  214. package/lib/cjs/appui-react/layout/widget/Tab.scss +9 -2
  215. package/lib/cjs/appui-react/statusfields/message-center/MessageCenterField.scss +16 -0
  216. package/lib/esm/appui-react/childwindow/ChildWindowRenderer.scss +1 -1
  217. package/lib/esm/appui-react/layout/widget/Tab.scss +9 -2
  218. package/lib/esm/appui-react/statusfields/message-center/MessageCenterField.scss +16 -0
  219. package/lib/useStrataKit.d.ts +1017 -0
  220. package/lib/useStrataKit.d.ts.map +1 -0
  221. package/lib/useStrataKit.js +693 -0
  222. package/lib/useStrataKit.js.map +1 -0
  223. package/package.json +22 -7
  224. package/lib/appui-react/icons/SvgSelectionClear.d.ts +0 -7
  225. package/lib/appui-react/icons/SvgSelectionClear.d.ts.map +0 -1
  226. package/lib/appui-react/icons/SvgSelectionClear.js +0 -14
  227. package/lib/appui-react/icons/SvgSelectionClear.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LockProvider.js","sourceRoot":"","sources":["../../../src/appui-react/editors/LockProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAW5C,SAAS,CAAC,CAAC;AAEb,gBAAgB;AAChB,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAA2B;IAChE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAE1D,EAAE,CAAC,CAAC;IACN,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CACzC,CAAC,YAAoB,EAAE,cAAuB,EAAE,EAAE;QAChD,kBAAkB,CAChB,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YAChB,IAAI,cAAc,EAAE,CAAC;gBACn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,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,QAAQ;gBAAE,OAAO;YACtB,IAAI,CAAC,YAAY;gBAAE,OAAO;YAE1B,QAAQ,CAAC,qBAAqB,CAAC;gBAC7B,KAAK,EAAE;oBACL,GAAG,YAAY,CAAC,KAAK;oBACrB,KAAK,EAAE,CAAC,QAAQ;iBACjB;gBACD,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI;aACzC,CAAC,CAAC;YACH,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAC/B,CAAC,IAEA,QAAQ,CAAC,CAAC,CAAC,oBAAC,OAAO,OAAG,CAAC,CAAC,CAAC,oBAAC,eAAe,OAAG,CACjB,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport * as React from \"react\";\nimport type { UiLayoutDataProvider } from \"@itwin/appui-abstract\";\nimport { InputWithDecorations } from \"@itwin/itwinui-react\";\nimport { SvgLock, SvgLockUnlocked } from \"@itwin/itwinui-icons-react\";\nimport { produce } from \"immer\";\nimport { usePreviewFeatures } from \"../preview/PreviewFeatures.js\";\n\n/** This is used to notify the parent component that the lock decoration is displayed in the editor\n * and a separate lock component should not be displayed as a sibling.\n * @internal\n */\nexport const LockContext = React.createContext<\n | {\n /** Describes if the lock is displayed as an editor decoration. */\n lockDecorations: Record<string, true>;\n /** Called by editors that display lock decoration. */\n setLockDecoration: (\n propertyName: string,\n lockDecoration: boolean\n ) => void;\n }\n | undefined\n>(undefined);\n\n/** @internal */\nexport function LockProvider({ children }: React.PropsWithChildren) {\n const [lockDecorations, setLockDecorations] = React.useState<\n Record<string, true>\n >({});\n const setLockDecoration = React.useCallback(\n (propertyName: string, lockDecoration: boolean) => {\n setLockDecorations(\n produce((draft) => {\n if (lockDecoration) {\n draft[propertyName] = true;\n return;\n }\n\n delete draft[propertyName];\n })\n );\n },\n []\n );\n return (\n <LockContext.Provider\n value={React.useMemo(\n () => ({\n lockDecorations,\n setLockDecoration,\n }),\n [lockDecorations, setLockDecoration]\n )}\n >\n {children}\n </LockContext.Provider>\n );\n}\n\n/** Additional context for property editors that support lock decoration.\n * @internal\n */\nexport const PropertyEditorContext = React.createContext<\n | {\n uiDataProvider: UiLayoutDataProvider;\n itemPropertyName: string;\n /** Specified when rendering a lock editor. */\n lockPropertyName: string | undefined;\n }\n | undefined\n>(undefined);\n\ntype PropertyEditorContextType = React.ContextType<\n typeof PropertyEditorContext\n>;\n\ninterface PropertyEditorProviderProps\n extends NonNullable<PropertyEditorContextType> {\n children?: React.ReactNode;\n}\n\n/** @internal */\nexport function PropertyEditorProvider(props: PropertyEditorProviderProps) {\n const { children, uiDataProvider, itemPropertyName, lockPropertyName } =\n props;\n return (\n <PropertyEditorContext.Provider\n value={React.useMemo(\n () => ({\n uiDataProvider,\n itemPropertyName,\n lockPropertyName,\n }),\n [uiDataProvider, itemPropertyName, lockPropertyName]\n )}\n >\n {children}\n </PropertyEditorContext.Provider>\n );\n}\n\n/** Returns `true` if the lock decoration should be displayed.\n * @internal\n */\nexport function useLockDecoration() {\n const { lockPropertyName, itemPropertyName, uiDataProvider } =\n React.useContext(PropertyEditorContext) ?? {};\n const { toolSettingsLockButton } = usePreviewFeatures();\n const dialogItem = React.useMemo(\n () =>\n uiDataProvider?.items.find(\n (item) => item.property.name === itemPropertyName\n ),\n [uiDataProvider, itemPropertyName]\n );\n return (\n !!toolSettingsLockButton && !lockPropertyName && !!dialogItem?.lockProperty\n );\n}\n\ninterface UseLockPropertyArgs {\n provider: UiLayoutDataProvider;\n itemPropertyName: string;\n}\n\n/** @internal */\nexport function useLockProperty(args: UseLockPropertyArgs | undefined) {\n const { provider, itemPropertyName } = args ?? {};\n const subscribe = React.useCallback(\n (onStoreChange: () => void) => {\n const listeners = provider\n ? [\n provider.onItemsReloadedEvent.addListener(onStoreChange),\n provider.onSyncPropertiesChangeEvent.addListener(onStoreChange),\n ]\n : [];\n return () => listeners.forEach((l) => l());\n },\n [provider]\n );\n const getSnapshot = React.useCallback(() => {\n const dialogItem = provider?.items.find(\n (item) => item.property.name === itemPropertyName\n );\n return dialogItem?.lockProperty;\n }, [provider, itemPropertyName]);\n return React.useSyncExternalStore(subscribe, getSnapshot);\n}\n\n/** This component displays a lock button in the property editor when the `toolSettingsLockButton` preview feature is enabled.\n * @alpha\n */\nexport function LockButtonInputDecoration() {\n const { itemPropertyName, uiDataProvider: provider } =\n React.useContext(PropertyEditorContext) ?? {};\n const { setLockDecoration } = React.useContext(LockContext) ?? {};\n const lockDecoration = useLockDecoration();\n\n const lockProperty = useLockProperty(\n provider && itemPropertyName\n ? {\n provider,\n itemPropertyName,\n }\n : undefined\n );\n\n React.useLayoutEffect(() => {\n if (!lockDecoration) return;\n if (!setLockDecoration) return;\n if (!itemPropertyName) return;\n setLockDecoration(itemPropertyName, true);\n return () => {\n setLockDecoration(itemPropertyName, false);\n };\n }, [setLockDecoration, itemPropertyName, lockDecoration]);\n\n if (!lockDecoration) return null;\n\n const isLocked = !!lockProperty?.value.value;\n const displayLabel = lockProperty?.property.displayLabel;\n const label = displayLabel ? displayLabel : \"Toggle lock\";\n const disabled = lockProperty?.isDisabled;\n return (\n <InputWithDecorations.Button\n isActive={isLocked}\n label={label}\n disabled={disabled}\n size=\"small\"\n styleType=\"borderless\"\n onClick={() => {\n if (!provider) return;\n if (!lockProperty) return;\n\n provider.applyUiPropertyChange({\n value: {\n ...lockProperty.value,\n value: !isLocked,\n },\n propertyName: lockProperty.property.name,\n });\n provider.reloadDialogItems();\n }}\n >\n {isLocked ? <SvgLock /> : <SvgLockUnlocked />}\n </InputWithDecorations.Button>\n );\n}\n"]}
1
+ {"version":3,"file":"LockProvider.js","sourceRoot":"","sources":["../../../src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AAC,CACV,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,OAAO,EACjE,QAAQ,EAAE,oBAAC,OAAO,OAAG,GACrB,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,gCAAgC,CAAC,CAAC,eAAe,EAE9D,QAAQ,EAAE,oBAAC,eAAe,OAAG,GAC7B,CACH,CAC2B,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport * as React from \"react\";\nimport type { UiLayoutDataProvider } from \"@itwin/appui-abstract\";\nimport { InputWithDecorations } from \"@itwin/itwinui-react\";\nimport { SvgLock, SvgLockUnlocked } from \"@itwin/itwinui-icons-react\";\nimport { produce } from \"immer\";\nimport { usePreviewFeatures } from \"../preview/PreviewFeatures.js\";\nimport { StrataKitIcon } from \"../preview/use-stratakit/StrataKitIcon.js\";\n\n/** This is used to notify the parent component that the lock decoration is displayed in the editor\n * and a separate lock component should not be displayed as a sibling.\n * @internal\n */\nexport const LockContext = React.createContext<\n | {\n /** Describes if the lock is displayed as an editor decoration. */\n lockDecorations: Record<string, true>;\n /** Called by editors that display lock decoration. */\n setLockDecoration: (\n propertyName: string,\n lockDecoration: boolean\n ) => void;\n }\n | undefined\n>(undefined);\n\n/** @internal */\nexport function LockProvider({ children }: React.PropsWithChildren) {\n const [lockDecorations, setLockDecorations] = React.useState<\n Record<string, true>\n >({});\n const setLockDecoration = React.useCallback(\n (propertyName: string, lockDecoration: boolean) => {\n setLockDecorations(\n produce((draft) => {\n if (lockDecoration) {\n draft[propertyName] = true;\n return;\n }\n\n delete draft[propertyName];\n })\n );\n },\n []\n );\n return (\n <LockContext.Provider\n value={React.useMemo(\n () => ({\n lockDecorations,\n setLockDecoration,\n }),\n [lockDecorations, setLockDecoration]\n )}\n >\n {children}\n </LockContext.Provider>\n );\n}\n\n/** Additional context for property editors that support lock decoration.\n * @internal\n */\nexport const PropertyEditorContext = React.createContext<\n | {\n uiDataProvider: UiLayoutDataProvider;\n itemPropertyName: string;\n /** Specified when rendering a lock editor. */\n lockPropertyName: string | undefined;\n }\n | undefined\n>(undefined);\n\ntype PropertyEditorContextType = React.ContextType<\n typeof PropertyEditorContext\n>;\n\ninterface PropertyEditorProviderProps\n extends NonNullable<PropertyEditorContextType> {\n children?: React.ReactNode;\n}\n\n/** @internal */\nexport function PropertyEditorProvider(props: PropertyEditorProviderProps) {\n const { children, uiDataProvider, itemPropertyName, lockPropertyName } =\n props;\n return (\n <PropertyEditorContext.Provider\n value={React.useMemo(\n () => ({\n uiDataProvider,\n itemPropertyName,\n lockPropertyName,\n }),\n [uiDataProvider, itemPropertyName, lockPropertyName]\n )}\n >\n {children}\n </PropertyEditorContext.Provider>\n );\n}\n\n/** Returns `true` if the lock decoration should be displayed.\n * @internal\n */\nexport function useLockDecoration() {\n const { lockPropertyName, itemPropertyName, uiDataProvider } =\n React.useContext(PropertyEditorContext) ?? {};\n const { toolSettingsLockButton } = usePreviewFeatures();\n const dialogItem = React.useMemo(\n () =>\n uiDataProvider?.items.find(\n (item) => item.property.name === itemPropertyName\n ),\n [uiDataProvider, itemPropertyName]\n );\n return (\n !!toolSettingsLockButton && !lockPropertyName && !!dialogItem?.lockProperty\n );\n}\n\ninterface UseLockPropertyArgs {\n provider: UiLayoutDataProvider;\n itemPropertyName: string;\n}\n\n/** @internal */\nexport function useLockProperty(args: UseLockPropertyArgs | undefined) {\n const { provider, itemPropertyName } = args ?? {};\n const subscribe = React.useCallback(\n (onStoreChange: () => void) => {\n const listeners = provider\n ? [\n provider.onItemsReloadedEvent.addListener(onStoreChange),\n provider.onSyncPropertiesChangeEvent.addListener(onStoreChange),\n ]\n : [];\n return () => listeners.forEach((l) => l());\n },\n [provider]\n );\n const getSnapshot = React.useCallback(() => {\n const dialogItem = provider?.items.find(\n (item) => item.property.name === itemPropertyName\n );\n return dialogItem?.lockProperty;\n }, [provider, itemPropertyName]);\n return React.useSyncExternalStore(subscribe, getSnapshot);\n}\n\n/** This component displays a lock button in the property editor when the `toolSettingsLockButton` preview feature is enabled.\n * @alpha\n */\nexport function LockButtonInputDecoration() {\n const { itemPropertyName, uiDataProvider: provider } =\n React.useContext(PropertyEditorContext) ?? {};\n const { setLockDecoration } = React.useContext(LockContext) ?? {};\n const lockDecoration = useLockDecoration();\n\n const lockProperty = useLockProperty(\n provider && itemPropertyName\n ? {\n provider,\n itemPropertyName,\n }\n : undefined\n );\n\n React.useLayoutEffect(() => {\n if (!lockDecoration) return;\n if (!setLockDecoration) return;\n if (!itemPropertyName) return;\n setLockDecoration(itemPropertyName, true);\n return () => {\n setLockDecoration(itemPropertyName, false);\n };\n }, [setLockDecoration, itemPropertyName, lockDecoration]);\n\n if (!lockDecoration) return null;\n\n const isLocked = !!lockProperty?.value.value;\n const displayLabel = lockProperty?.property.displayLabel;\n const label = displayLabel ? displayLabel : \"Toggle lock\";\n const disabled = lockProperty?.isDisabled;\n\n return (\n <InputWithDecorations.Button\n isActive={isLocked}\n label={label}\n disabled={disabled}\n size=\"small\"\n styleType=\"borderless\"\n onClick={() => {\n if (!provider) return;\n if (!lockProperty) return;\n\n provider.applyUiPropertyChange({\n value: {\n ...lockProperty.value,\n value: !isLocked,\n },\n propertyName: lockProperty.property.name,\n });\n provider.reloadDialogItems();\n }}\n >\n {isLocked ? (\n <StrataKitIcon\n href={(importIcon) => importIcon(\"@stratakit/icons/lock\").svgLock}\n iconNode={<SvgLock />}\n />\n ) : (\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/lock-unlocked\").svgLockUnlocked\n }\n iconNode={<SvgLockUnlocked />}\n />\n )}\n </InputWithDecorations.Button>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalFrontstageButton.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalFrontstageButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,UAAU,0BAA2B,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC3E,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAsBtE"}
1
+ {"version":3,"file":"ModalFrontstageButton.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalFrontstageButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,UAAU,0BAA2B,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC3E,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBA8BtE"}
@@ -11,6 +11,7 @@ import { SvgProgressBackwardCircular } from "@itwin/itwinui-icons-react";
11
11
  import { UiFramework } from "../UiFramework.js";
12
12
  import { useTranslation } from "../hooks/useTranslation.js";
13
13
  import { IconButton } from "@itwin/itwinui-react";
14
+ import { StrataKitIcon } from "../preview/use-stratakit/StrataKitIcon.js";
14
15
  /** Button usually shown in the top-left corner of the modal frontstage. By default closes the modal frontstage.
15
16
  * @public
16
17
  */
@@ -18,7 +19,7 @@ export function ModalFrontstageButton(props) {
18
19
  const { translate } = useTranslation();
19
20
  const { label, icon, onClick } = props;
20
21
  const defaultLabel = translate("modalFrontstage.backButtonTitle");
21
- const defaultIcon = React.createElement(SvgProgressBackwardCircular, null);
22
+ const defaultIcon = (React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/chevron-left").svgChevronLeft, iconNode: React.createElement(SvgProgressBackwardCircular, null) }));
22
23
  const defaultOnClick = React.useCallback(() => {
23
24
  UiFramework.frontstages.closeModalFrontstage();
24
25
  }, []);
@@ -1 +1 @@
1
- {"version":3,"file":"ModalFrontstageButton.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalFrontstageButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAclD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiC;IACrE,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,YAAY,GAAG,SAAS,CAAC,iCAAiC,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,oBAAC,2BAA2B,OAAG,CAAC;IAEpD,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAC5C,WAAW,CAAC,WAAW,CAAC,oBAAoB,EAAE,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,UAAU,IACT,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAClC,KAAK,EAAE,KAAK,IAAI,YAAY,EAC5B,SAAS,EAAE;YACT,SAAS,EAAE,4CAA4C;SACxD,IAEA,IAAI,IAAI,WAAW,CACT,CACd,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport \"./ModalFrontstageButton.scss\";\nimport * as React from \"react\";\nimport { SvgProgressBackwardCircular } from \"@itwin/itwinui-icons-react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { IconButton } from \"@itwin/itwinui-react\";\n\ntype IconButtonProps = React.ComponentProps<typeof IconButton>;\n\ninterface ModalFrontstageButtonProps extends Pick<IconButtonProps, \"onClick\"> {\n children?: never;\n /** If specified overrides the default icon. */\n icon?: React.ReactNode;\n /** If specified overrides the default label. */\n label?: string;\n /** If specified overrides the default behavior of closing the modal frontstage. */\n onClick?: IconButtonProps[\"onClick\"];\n}\n\n/** Button usually shown in the top-left corner of the modal frontstage. By default closes the modal frontstage.\n * @public\n */\nexport function ModalFrontstageButton(props: ModalFrontstageButtonProps) {\n const { translate } = useTranslation();\n const { label, icon, onClick } = props;\n const defaultLabel = translate(\"modalFrontstage.backButtonTitle\");\n const defaultIcon = <SvgProgressBackwardCircular />;\n\n const defaultOnClick = React.useCallback(() => {\n UiFramework.frontstages.closeModalFrontstage();\n }, []);\n\n return (\n <IconButton\n className=\"uifw-frontstage-modalFrontstageButton\"\n onClick={onClick ?? defaultOnClick}\n label={label ?? defaultLabel}\n iconProps={{\n className: \"uifw-frontstage-modalFrontstageButton_icon\",\n }}\n >\n {icon ?? defaultIcon}\n </IconButton>\n );\n}\n"]}
1
+ {"version":3,"file":"ModalFrontstageButton.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalFrontstageButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAc1E;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiC;IACrE,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,YAAY,GAAG,SAAS,CAAC,iCAAiC,CAAC,CAAC;IAElE,MAAM,WAAW,GAAG,CAClB,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,+BAA+B,CAAC,CAAC,cAAc,EAE5D,QAAQ,EAAE,oBAAC,2BAA2B,OAAG,GACzC,CACH,CAAC;IAEF,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAC5C,WAAW,CAAC,WAAW,CAAC,oBAAoB,EAAE,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,UAAU,IACT,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAClC,KAAK,EAAE,KAAK,IAAI,YAAY,EAC5B,SAAS,EAAE;YACT,SAAS,EAAE,4CAA4C;SACxD,IAEA,IAAI,IAAI,WAAW,CACT,CACd,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport \"./ModalFrontstageButton.scss\";\nimport * as React from \"react\";\nimport { SvgProgressBackwardCircular } from \"@itwin/itwinui-icons-react\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { IconButton } from \"@itwin/itwinui-react\";\nimport { StrataKitIcon } from \"../preview/use-stratakit/StrataKitIcon.js\";\n\ntype IconButtonProps = React.ComponentProps<typeof IconButton>;\n\ninterface ModalFrontstageButtonProps extends Pick<IconButtonProps, \"onClick\"> {\n children?: never;\n /** If specified overrides the default icon. */\n icon?: React.ReactNode;\n /** If specified overrides the default label. */\n label?: string;\n /** If specified overrides the default behavior of closing the modal frontstage. */\n onClick?: IconButtonProps[\"onClick\"];\n}\n\n/** Button usually shown in the top-left corner of the modal frontstage. By default closes the modal frontstage.\n * @public\n */\nexport function ModalFrontstageButton(props: ModalFrontstageButtonProps) {\n const { translate } = useTranslation();\n const { label, icon, onClick } = props;\n const defaultLabel = translate(\"modalFrontstage.backButtonTitle\");\n\n const defaultIcon = (\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/chevron-left\").svgChevronLeft\n }\n iconNode={<SvgProgressBackwardCircular />}\n />\n );\n\n const defaultOnClick = React.useCallback(() => {\n UiFramework.frontstages.closeModalFrontstage();\n }, []);\n\n return (\n <IconButton\n className=\"uifw-frontstage-modalFrontstageButton\"\n onClick={onClick ?? defaultOnClick}\n label={label ?? defaultLabel}\n iconProps={{\n className: \"uifw-frontstage-modalFrontstageButton_icon\",\n }}\n >\n {icon ?? defaultIcon}\n </IconButton>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalSettingsStage.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalSettingsStage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAkEhF;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,mBAAmB;IAG9C,oBAAoB,CAAC,EAAE,MAAM;IAFhD,OAAc,EAAE,SAAoC;IAC7C,KAAK,SAAwD;gBACjD,oBAAoB,CAAC,EAAE,MAAM,YAAA;IACzC,kBAAkB,UAAQ;IACjC,IAAW,OAAO,IAAI,KAAK,CAAC,SAAS,CAIpC;IACD,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAI9B;WAEU,sBAAsB,CAClC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM;WAgBR,iBAAiB,CAAC,kBAAkB,CAAC,EAAE,MAAM;CAiC5D"}
1
+ {"version":3,"file":"ModalSettingsStage.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalSettingsStage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAmEhF;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,mBAAmB;IAG9C,oBAAoB,CAAC,EAAE,MAAM;IAFhD,OAAc,EAAE,SAAoC;IAC7C,KAAK,SAAwD;gBACjD,oBAAoB,CAAC,EAAE,MAAM,YAAA;IACzC,kBAAkB,UAAQ;IACjC,IAAW,OAAO,IAAI,KAAK,CAAC,SAAS,CAIpC;IACD,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAI9B;WAEU,sBAAsB,CAClC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM;WAuBR,iBAAiB,CAAC,kBAAkB,CAAC,EAAE,MAAM;CAiC5D"}
@@ -17,6 +17,7 @@ import { SyncUiEventId } from "../syncui/UiSyncEvent.js";
17
17
  import { StageUsage } from "./StageUsage.js";
18
18
  import { BackstageItemUtilities } from "../backstage/BackstageItemUtilities.js";
19
19
  import { useTranslation } from "../hooks/useTranslation.js";
20
+ import { StrataKitIcon } from "../preview/use-stratakit/StrataKitIcon.js";
20
21
  function ModalSettingsStage({ initialSettingsTabId, }) {
21
22
  const { translate } = useTranslation();
22
23
  const id = UiFramework.frontstages.activeFrontstageDef?.id ?? "none";
@@ -68,7 +69,7 @@ export class SettingsModalFrontstage {
68
69
  itemPriority,
69
70
  execute: () => UiFramework.frontstages.openModalFrontstage(new SettingsModalFrontstage()),
70
71
  label: UiFramework.translate("settings.settingsStageLabel"),
71
- icon: React.createElement(SvgSettings, null),
72
+ icon: (React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/settings").svgSettings, iconNode: React.createElement(SvgSettings, null) })),
72
73
  isHidden: SettingsModalFrontstage.noSettingsAvailable(),
73
74
  });
74
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ModalSettingsStage.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalSettingsStage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH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ACH,CAAC;YACD,WAAW,CAAC,WAAW,CAAC,mBAAmB,CACzC,IAAI,uBAAuB,CAAC,kBAAkB,CAAC,CAChD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAC3C,wCAAwC,CACzC,CAAC;YACF,MAAM,IAAI,GAAG,IAAI,oBAAoB,CACnC,qBAAqB,CAAC,IAAI,EAC1B,WAAW,CAAC,SAAS,CAAC,8BAA8B,CAAC,EACrD,eAAe,EACf,iBAAiB,CAAC,KAAK,CACxB,CAAC;YACF,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,CAAC,OAAO,CACZ,WAAW,CAAC,cAAc,CAAC,yBAAyB,CAAC,EACrD,eAAe,CAChB,CAAC;QACJ,CAAC;IACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport \"./ModalSettingsStage.scss\";\nimport * as React from \"react\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport {\n IModelApp,\n NotifyMessageDetails,\n OutputMessagePriority,\n OutputMessageType,\n} from \"@itwin/core-frontend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Centered, SettingsContainer } from \"@itwin/core-react\";\nimport { SvgSettings } from \"@itwin/itwinui-icons-react\";\nimport type { ModalFrontstageInfo } from \"../framework/FrameworkFrontstages.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { SyncUiEventId } from \"../syncui/UiSyncEvent.js\";\nimport { StageUsage } from \"./StageUsage.js\";\nimport { BackstageItemUtilities } from \"../backstage/BackstageItemUtilities.js\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\n\nfunction ModalSettingsStage({\n initialSettingsTabId,\n}: {\n initialSettingsTabId?: string;\n}) {\n const { translate } = useTranslation();\n\n const id = UiFramework.frontstages.activeFrontstageDef?.id ?? \"none\";\n const stageUsage =\n UiFramework.frontstages.activeFrontstageDef?.usage ?? StageUsage.General;\n const tabEntries = UiFramework.settingsManager.getSettingEntries(\n id,\n stageUsage\n );\n\n const currentSettingsTab = React.useCallback(() => {\n const categoryToFind = initialSettingsTabId\n ? initialSettingsTabId.toLowerCase()\n : tabEntries[0].tabId.toLowerCase();\n let foundTab = tabEntries.find(\n (entry) => entry.tabId.toLowerCase() === categoryToFind\n );\n if (!foundTab)\n foundTab = tabEntries.find(\n (entry) => entry.label.toLowerCase() === categoryToFind\n );\n return foundTab;\n }, [initialSettingsTabId, tabEntries]);\n\n React.useEffect(() => {\n return UiFramework.frontstages.onCloseModalFrontstageRequestedEvent.addListener(\n ({ modalFrontstage, stageCloseFunc }) => {\n if (\n modalFrontstage instanceof SettingsModalFrontstage &&\n stageCloseFunc\n ) {\n UiFramework.settingsManager.closeSettingsContainer(stageCloseFunc);\n }\n }\n );\n }, [tabEntries]);\n\n return (\n <div className=\"uifw-settings-container\">\n {tabEntries.length ? (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <SettingsContainer\n tabs={tabEntries}\n currentSettingsTab={currentSettingsTab()}\n settingsManager={UiFramework.settingsManager}\n />\n ) : (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <Centered>{translate(\"settings.noSettingsAvailable\")}</Centered>\n )}\n </div>\n );\n}\n\n/** Modal frontstage displaying and editing settings from registered settings providers. See [SettingsManager]($core-react)\n * and [SettingsContainer]($core-react).\n * @beta\n */\nexport class SettingsModalFrontstage implements ModalFrontstageInfo {\n public static id = \"appui-react.modalSettingsStage\";\n public title = UiFramework.translate(\"settings.settingsStageLabel\");\n constructor(public initialSettingsTabId?: string) {}\n public notifyCloseRequest = true;\n public get content(): React.ReactNode {\n return (\n <ModalSettingsStage initialSettingsTabId={this.initialSettingsTabId} />\n );\n }\n private static noSettingsAvailable = () =>\n new ConditionalBooleanValue(\n () => 0 === UiFramework.settingsManager.providers.length,\n [SyncUiEventId.SettingsProvidersChanged]\n );\n\n public static getBackstageActionItem(\n groupPriority: number,\n itemPriority: number\n ) {\n return BackstageItemUtilities.createActionItem({\n id: SettingsModalFrontstage.id,\n groupPriority,\n itemPriority,\n execute: () =>\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage()\n ),\n label: UiFramework.translate(\"settings.settingsStageLabel\"),\n icon: <SvgSettings />,\n isHidden: SettingsModalFrontstage.noSettingsAvailable(),\n });\n }\n\n public static showSettingsStage(initialSettingsTab?: string) {\n if (UiFramework.settingsManager.providers.length) {\n // Check to see if it is already open\n if (\n UiFramework.frontstages.activeModalFrontstage &&\n UiFramework.frontstages.activeModalFrontstage instanceof\n SettingsModalFrontstage\n ) {\n if (initialSettingsTab) {\n UiFramework.settingsManager.activateSettingsTab(initialSettingsTab);\n return;\n }\n }\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage(initialSettingsTab)\n );\n } else {\n const detailedMessage = UiFramework.translate(\n \"settings.noSettingsProvidersRegistered\"\n );\n const info = new NotifyMessageDetails(\n OutputMessagePriority.Info,\n UiFramework.translate(\"settings.noSettingsAvailable\"),\n detailedMessage,\n OutputMessageType.Toast\n );\n IModelApp.notifications.outputMessage(info);\n Logger.logInfo(\n UiFramework.loggerCategory(\"SettingsModalFrontstage\"),\n detailedMessage\n );\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ModalSettingsStage.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/ModalSettingsStage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC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AAC,WAAW,CAAC,mBAAmB,CACzC,IAAI,uBAAuB,CAAC,kBAAkB,CAAC,CAChD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAC3C,wCAAwC,CACzC,CAAC;YACF,MAAM,IAAI,GAAG,IAAI,oBAAoB,CACnC,qBAAqB,CAAC,IAAI,EAC1B,WAAW,CAAC,SAAS,CAAC,8BAA8B,CAAC,EACrD,eAAe,EACf,iBAAiB,CAAC,KAAK,CACxB,CAAC;YACF,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,CAAC,OAAO,CACZ,WAAW,CAAC,cAAc,CAAC,yBAAyB,CAAC,EACrD,eAAe,CAChB,CAAC;QACJ,CAAC;IACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport \"./ModalSettingsStage.scss\";\nimport * as React from \"react\";\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport {\n IModelApp,\n NotifyMessageDetails,\n OutputMessagePriority,\n OutputMessageType,\n} from \"@itwin/core-frontend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Centered, SettingsContainer } from \"@itwin/core-react\";\nimport { SvgSettings } from \"@itwin/itwinui-icons-react\";\nimport type { ModalFrontstageInfo } from \"../framework/FrameworkFrontstages.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { SyncUiEventId } from \"../syncui/UiSyncEvent.js\";\nimport { StageUsage } from \"./StageUsage.js\";\nimport { BackstageItemUtilities } from \"../backstage/BackstageItemUtilities.js\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { StrataKitIcon } from \"../preview/use-stratakit/StrataKitIcon.js\";\n\nfunction ModalSettingsStage({\n initialSettingsTabId,\n}: {\n initialSettingsTabId?: string;\n}) {\n const { translate } = useTranslation();\n\n const id = UiFramework.frontstages.activeFrontstageDef?.id ?? \"none\";\n const stageUsage =\n UiFramework.frontstages.activeFrontstageDef?.usage ?? StageUsage.General;\n const tabEntries = UiFramework.settingsManager.getSettingEntries(\n id,\n stageUsage\n );\n\n const currentSettingsTab = React.useCallback(() => {\n const categoryToFind = initialSettingsTabId\n ? initialSettingsTabId.toLowerCase()\n : tabEntries[0].tabId.toLowerCase();\n let foundTab = tabEntries.find(\n (entry) => entry.tabId.toLowerCase() === categoryToFind\n );\n if (!foundTab)\n foundTab = tabEntries.find(\n (entry) => entry.label.toLowerCase() === categoryToFind\n );\n return foundTab;\n }, [initialSettingsTabId, tabEntries]);\n\n React.useEffect(() => {\n return UiFramework.frontstages.onCloseModalFrontstageRequestedEvent.addListener(\n ({ modalFrontstage, stageCloseFunc }) => {\n if (\n modalFrontstage instanceof SettingsModalFrontstage &&\n stageCloseFunc\n ) {\n UiFramework.settingsManager.closeSettingsContainer(stageCloseFunc);\n }\n }\n );\n }, [tabEntries]);\n\n return (\n <div className=\"uifw-settings-container\">\n {tabEntries.length ? (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <SettingsContainer\n tabs={tabEntries}\n currentSettingsTab={currentSettingsTab()}\n settingsManager={UiFramework.settingsManager}\n />\n ) : (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <Centered>{translate(\"settings.noSettingsAvailable\")}</Centered>\n )}\n </div>\n );\n}\n\n/** Modal frontstage displaying and editing settings from registered settings providers. See [SettingsManager]($core-react)\n * and [SettingsContainer]($core-react).\n * @beta\n */\nexport class SettingsModalFrontstage implements ModalFrontstageInfo {\n public static id = \"appui-react.modalSettingsStage\";\n public title = UiFramework.translate(\"settings.settingsStageLabel\");\n constructor(public initialSettingsTabId?: string) {}\n public notifyCloseRequest = true;\n public get content(): React.ReactNode {\n return (\n <ModalSettingsStage initialSettingsTabId={this.initialSettingsTabId} />\n );\n }\n private static noSettingsAvailable = () =>\n new ConditionalBooleanValue(\n () => 0 === UiFramework.settingsManager.providers.length,\n [SyncUiEventId.SettingsProvidersChanged]\n );\n\n public static getBackstageActionItem(\n groupPriority: number,\n itemPriority: number\n ) {\n return BackstageItemUtilities.createActionItem({\n id: SettingsModalFrontstage.id,\n groupPriority,\n itemPriority,\n execute: () =>\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage()\n ),\n label: UiFramework.translate(\"settings.settingsStageLabel\"),\n icon: (\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/settings\").svgSettings\n }\n iconNode={<SvgSettings />}\n />\n ),\n isHidden: SettingsModalFrontstage.noSettingsAvailable(),\n });\n }\n\n public static showSettingsStage(initialSettingsTab?: string) {\n if (UiFramework.settingsManager.providers.length) {\n // Check to see if it is already open\n if (\n UiFramework.frontstages.activeModalFrontstage &&\n UiFramework.frontstages.activeModalFrontstage instanceof\n SettingsModalFrontstage\n ) {\n if (initialSettingsTab) {\n UiFramework.settingsManager.activateSettingsTab(initialSettingsTab);\n return;\n }\n }\n UiFramework.frontstages.openModalFrontstage(\n new SettingsModalFrontstage(initialSettingsTab)\n );\n } else {\n const detailedMessage = UiFramework.translate(\n \"settings.noSettingsProvidersRegistered\"\n );\n const info = new NotifyMessageDetails(\n OutputMessagePriority.Info,\n UiFramework.translate(\"settings.noSettingsAvailable\"),\n detailedMessage,\n OutputMessageType.Toast\n );\n IModelApp.notifications.outputMessage(info);\n Logger.logInfo(\n UiFramework.loggerCategory(\"SettingsModalFrontstage\"),\n detailedMessage\n );\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NestedFrontstage.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,sDAAsD;IACtD,WAAkB,+BAA+B,mBAUhD;CACF"}
1
+ {"version":3,"file":"NestedFrontstage.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,sDAAsD;IACtD,WAAkB,+BAA+B,mBAiBhD;CACF"}
@@ -9,6 +9,7 @@ import * as React from "react";
9
9
  import { SvgProgressBackwardCircular } from "@itwin/itwinui-icons-react";
10
10
  import { CommandItemDef } from "../shared/CommandItemDef.js";
11
11
  import { UiFramework } from "../UiFramework.js";
12
+ import { StrataKitIcon } from "../preview/use-stratakit/StrataKitIcon.js";
12
13
  /** Nested Frontstage related classes and commands
13
14
  * @public
14
15
  * @deprecated in 4.15.0. Use {@link NestedFrontstageAppButton} component instead.
@@ -19,7 +20,7 @@ export class NestedFrontstage {
19
20
  // eslint-disable-next-line @typescript-eslint/no-deprecated
20
21
  return new CommandItemDef({
21
22
  commandId: "backToPreviousFrontstage",
22
- iconSpec: React.createElement(SvgProgressBackwardCircular, null),
23
+ iconSpec: (React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/chevron-left").svgChevronLeft, iconNode: React.createElement(SvgProgressBackwardCircular, null) })),
23
24
  labelKey: "UiFramework:commands.backToPreviousFrontstage",
24
25
  execute: async () => {
25
26
  await UiFramework.frontstages.closeNestedFrontstage();
@@ -1 +1 @@
1
- {"version":3,"file":"NestedFrontstage.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAC3B,sDAAsD;IAC/C,MAAM,KAAK,+BAA+B;QAC/C,4DAA4D;QAC5D,OAAO,IAAI,cAAc,CAAC;YACxB,SAAS,EAAE,0BAA0B;YACrC,QAAQ,EAAE,oBAAC,2BAA2B,OAAG;YACzC,QAAQ,EAAE,+CAA+C;YACzD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,WAAW,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;YACxD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport * as React from \"react\";\nimport { SvgProgressBackwardCircular } from \"@itwin/itwinui-icons-react\";\nimport { CommandItemDef } from \"../shared/CommandItemDef.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { NestedFrontstageAppButton } from \"./NestedFrontstageAppButton.js\";\n\n/** Nested Frontstage related classes and commands\n * @public\n * @deprecated in 4.15.0. Use {@link NestedFrontstageAppButton} component instead.\n */\nexport class NestedFrontstage {\n /** Command that returns to the previous Frontstage */\n public static get backToPreviousFrontstageCommand() {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return new CommandItemDef({\n commandId: \"backToPreviousFrontstage\",\n iconSpec: <SvgProgressBackwardCircular />,\n labelKey: \"UiFramework:commands.backToPreviousFrontstage\",\n execute: async () => {\n await UiFramework.frontstages.closeNestedFrontstage();\n },\n });\n }\n}\n"]}
1
+ {"version":3,"file":"NestedFrontstage.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstage.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAC3B,sDAAsD;IAC/C,MAAM,KAAK,+BAA+B;QAC/C,4DAA4D;QAC5D,OAAO,IAAI,cAAc,CAAC;YACxB,SAAS,EAAE,0BAA0B;YACrC,QAAQ,EAAE,CACR,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,+BAA+B,CAAC,CAAC,cAAc,EAE5D,QAAQ,EAAE,oBAAC,2BAA2B,OAAG,GACzC,CACH;YACD,QAAQ,EAAE,+CAA+C;YACzD,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,WAAW,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;YACxD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport * as React from \"react\";\nimport { SvgProgressBackwardCircular } from \"@itwin/itwinui-icons-react\";\nimport { CommandItemDef } from \"../shared/CommandItemDef.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport type { NestedFrontstageAppButton } from \"./NestedFrontstageAppButton.js\";\nimport { StrataKitIcon } from \"../preview/use-stratakit/StrataKitIcon.js\";\n\n/** Nested Frontstage related classes and commands\n * @public\n * @deprecated in 4.15.0. Use {@link NestedFrontstageAppButton} component instead.\n */\nexport class NestedFrontstage {\n /** Command that returns to the previous Frontstage */\n public static get backToPreviousFrontstageCommand() {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return new CommandItemDef({\n commandId: \"backToPreviousFrontstage\",\n iconSpec: (\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/chevron-left\").svgChevronLeft\n }\n iconNode={<SvgProgressBackwardCircular />}\n />\n ),\n labelKey: \"UiFramework:commands.backToPreviousFrontstage\",\n execute: async () => {\n await UiFramework.frontstages.closeNestedFrontstage();\n },\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NestedFrontstageAppButton.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstageAppButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,iEAAiE;AACjE,UAAU,8BAA8B;IACtC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,OAAO,GACR,EAAE,8BAA8B,qBAmBhC"}
1
+ {"version":3,"file":"NestedFrontstageAppButton.d.ts","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstageAppButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,iEAAiE;AACjE,UAAU,8BAA8B;IACtC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,OAAO,GACR,EAAE,8BAA8B,qBA2BhC"}
@@ -10,13 +10,15 @@ import { SvgProgressBackwardCircular } from "@itwin/itwinui-icons-react";
10
10
  import { useTranslation } from "../hooks/useTranslation.js";
11
11
  import { UiFramework } from "../UiFramework.js";
12
12
  import { BackstageAppButton } from "../widgets/BackstageAppButton.js";
13
+ import { StrataKitIcon } from "../preview/use-stratakit/StrataKitIcon.js";
13
14
  /** App button used in a nested frontstage. By default closes the top-most nested frontstage.
14
15
  * @public
15
16
  */
16
17
  export function NestedFrontstageAppButton({ icon, label, onClick, }) {
18
+ const defaultIcon = (React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/chevron-left").svgChevronLeft, iconNode: React.createElement(SvgProgressBackwardCircular, null) }));
17
19
  const { translate } = useTranslation();
18
20
  label = label ?? translate("commands.backToPreviousFrontstage");
19
- icon = icon ?? React.createElement(SvgProgressBackwardCircular, null);
21
+ icon = icon ?? defaultIcon;
20
22
  return (React.createElement(BackstageAppButton, { label: label, iconNode: icon, execute: () => {
21
23
  if (onClick) {
22
24
  onClick();
@@ -1 +1 @@
1
- {"version":3,"file":"NestedFrontstageAppButton.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstageAppButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAYtE;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,OAAO,GACwB;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,KAAK,GAAG,KAAK,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAChE,IAAI,GAAG,IAAI,IAAI,oBAAC,2BAA2B,OAAG,CAAC;IAE/C,OAAO,CACL,oBAAC,kBAAkB,IACjB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,EAAE,CAAC;gBACV,OAAO;YACT,CAAC;YAED,KAAK,WAAW,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;QACvD,CAAC,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport * as React from \"react\";\nimport { SvgProgressBackwardCircular } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { BackstageAppButton } from \"../widgets/BackstageAppButton.js\";\n\n/** Properties of {@link NestedFrontstageAppButton} component. */\ninterface NestedFrontstageAppButtonProps {\n /** If specified overrides the default icon. */\n icon?: React.ReactNode;\n /** If specified overrides the default label. */\n label?: string;\n /** If specified overrides the default action that closes the nested frontstage. */\n onClick?: () => void;\n}\n\n/** App button used in a nested frontstage. By default closes the top-most nested frontstage.\n * @public\n */\nexport function NestedFrontstageAppButton({\n icon,\n label,\n onClick,\n}: NestedFrontstageAppButtonProps) {\n const { translate } = useTranslation();\n label = label ?? translate(\"commands.backToPreviousFrontstage\");\n icon = icon ?? <SvgProgressBackwardCircular />;\n\n return (\n <BackstageAppButton\n label={label}\n iconNode={icon}\n execute={() => {\n if (onClick) {\n onClick();\n return;\n }\n\n void UiFramework.frontstages.closeNestedFrontstage();\n }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"NestedFrontstageAppButton.js","sourceRoot":"","sources":["../../../src/appui-react/frontstage/NestedFrontstageAppButton.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAY1E;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,OAAO,GACwB;IAC/B,MAAM,WAAW,GAAG,CAClB,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,+BAA+B,CAAC,CAAC,cAAc,EAE5D,QAAQ,EAAE,oBAAC,2BAA2B,OAAG,GACzC,CACH,CAAC;IAEF,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,KAAK,GAAG,KAAK,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAChE,IAAI,GAAG,IAAI,IAAI,WAAW,CAAC;IAC3B,OAAO,CACL,oBAAC,kBAAkB,IACjB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,EAAE,CAAC;gBACV,OAAO;YACT,CAAC;YAED,KAAK,WAAW,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;QACvD,CAAC,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Frontstage\n */\n\nimport * as React from \"react\";\nimport { SvgProgressBackwardCircular } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../hooks/useTranslation.js\";\nimport { UiFramework } from \"../UiFramework.js\";\nimport { BackstageAppButton } from \"../widgets/BackstageAppButton.js\";\nimport { StrataKitIcon } from \"../preview/use-stratakit/StrataKitIcon.js\";\n\n/** Properties of {@link NestedFrontstageAppButton} component. */\ninterface NestedFrontstageAppButtonProps {\n /** If specified overrides the default icon. */\n icon?: React.ReactNode;\n /** If specified overrides the default label. */\n label?: string;\n /** If specified overrides the default action that closes the nested frontstage. */\n onClick?: () => void;\n}\n\n/** App button used in a nested frontstage. By default closes the top-most nested frontstage.\n * @public\n */\nexport function NestedFrontstageAppButton({\n icon,\n label,\n onClick,\n}: NestedFrontstageAppButtonProps) {\n const defaultIcon = (\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/chevron-left\").svgChevronLeft\n }\n iconNode={<SvgProgressBackwardCircular />}\n />\n );\n\n const { translate } = useTranslation();\n label = label ?? translate(\"commands.backToPreviousFrontstage\");\n icon = icon ?? defaultIcon;\n return (\n <BackstageAppButton\n label={label}\n iconNode={icon}\n execute={() => {\n if (onClick) {\n onClick();\n return;\n }\n\n void UiFramework.frontstages.closeNestedFrontstage();\n }}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Docked.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Docked.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,gBAAgB;AAChB,wBAAgB,8BAA8B,SAAK;AA0BnD;;GAEG;AAEH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1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AAM,KAAK,IAAI;IAC/B,+CAA+C;IAC/C,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI;IACpC,kEAAkE;IAClE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI;IAC5C,mCAAmC;IACnC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;CAC1B,CAuFA;AAED,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAOD,gBAAgB;AAChB,wBAAgB,oBAAoB,uCAEnC;AAeD,gBAAgB;AAChB,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACnC,KAAK,EAAE,SAAS,MAAM,EAAE,WAUzB"}
@@ -92,14 +92,8 @@ export function DockedToolSettings(props) {
92
92
  return (React.createElement("div", { "data-toolsettings-provider": props.itemId, className: className, ref: refs, style: props.style },
93
93
  React.createElement(DockedToolSettingsHandle, { onResize: handleHandleResize }),
94
94
  dockedChildren.map(([key, child]) => {
95
- return (React.createElement(TransitionGroup, { appear: animateToolSettings, enter: animateToolSettings, key: key },
96
- React.createElement(CSSTransition, { in: animateToolSettings, timeout: 400, classNames: {
97
- appear: "toolsettings-appear",
98
- enter: "toolsettings-appear",
99
- appearActive: "toolsettings-appear-active",
100
- enterActive: "toolsettings-appear-active",
101
- } },
102
- React.createElement(DockedToolSettingsEntry, { key: key, entryKey: key, getOnResize: getOnEntryResize }, child))));
95
+ return (React.createElement(DockedToolSettingsEntryTransition, { animate: animateToolSettings, key: key },
96
+ React.createElement(DockedToolSettingsEntry, { key: key, entryKey: key, getOnResize: getOnEntryResize }, child)));
103
97
  }),
104
98
  (!overflown || overflown.length > 0) && (React.createElement(React.Fragment, null,
105
99
  React.createElement(DockedToolSettingsOverflow, { onClick: onOverflowClick, onResize: handleOverflowResize, ref: targetRef }),
@@ -108,6 +102,18 @@ export function DockedToolSettings(props) {
108
102
  return React.createElement(OverflowLabelAndEditor, { key: key, wrapper: child });
109
103
  }))))))));
110
104
  }
105
+ function DockedToolSettingsEntryTransition({ animate, children, }) {
106
+ // Without a `nodeRef`, `CSSTransition` falls back to `findDOMNode`, which React 19 removed.
107
+ const nodeRef = React.useRef(null);
108
+ return (React.createElement(TransitionGroup, { appear: animate, enter: animate, component: null },
109
+ React.createElement(CSSTransition, { nodeRef: nodeRef, in: animate, timeout: 400, classNames: {
110
+ appear: "toolsettings-appear",
111
+ enter: "toolsettings-appear",
112
+ appearActive: "toolsettings-appear-active",
113
+ enterActive: "toolsettings-appear-active",
114
+ } },
115
+ React.createElement("div", { ref: nodeRef }, children))));
116
+ }
111
117
  function DockedToolSettingsEntry({ children, entryKey, getOnResize, }) {
112
118
  const onResize = React.useMemo(() => getOnResize(entryKey), [getOnResize, entryKey]);
113
119
  const entry = React.useMemo(() => ({
@@ -1 +1 @@
1
- {"version":3,"file":"Docked.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Docked.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;A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IACD,OAAO,GAAqB,CAAC;AAC/B,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAoC;IACjE,OAAO,CACL,6BAAK,SAAS,EAAC,oCAAoC,IAAE,KAAK,CAAC,QAAQ,CAAO,CAC3E,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,YAAY,CAC1B,IAAmC,EACnC,KAAwB;IAExB,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,cAAc,CAAC,WAAwB;IAC9C,4DAA4D;IAC5D,MAAM,GAAG,GAAG,sBAAsB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACvD,IAAI,KAAK,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IACzB,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport \"./Docked.scss\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { getCssVariableAsNumber } from \"@itwin/core-react\";\nimport { useRefs, useResizeObserver } from \"@itwin/core-react/internal\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { CSSTransition, TransitionGroup } from \"react-transition-group\";\nimport { AnimateDockedToolSettingsContext } from \"../base/NineZone.js\";\nimport { DockedToolSettingsHandle } from \"./Handle.js\";\nimport { DockedToolSettingsOverflow } from \"./Overflow.js\";\nimport { ToolSettingsOverflowPanel } from \"./Panel.js\";\n\n/** @internal */\nexport function onOverflowLabelAndEditorResize() {}\n\n/** This component takes a DockedToolSetting \"wrapper\" component and extract only the label and editor components from it */\nfunction OverflowLabelAndEditor({ wrapper }: { wrapper: React.ReactNode }) {\n assert(React.isValidElement(wrapper));\n const entryValue = React.useMemo<DockedToolSettingsEntryContextArgs>(\n () => ({\n isOverflown: true,\n onResize: onOverflowLabelAndEditorResize,\n }),\n []\n );\n const wrapperChildren = (wrapper as React.ReactElement<any>).props.children;\n return (\n <>\n <DockedToolSettingsEntryContext.Provider value={entryValue}>\n {wrapperChildren &&\n React.Children.map(\n wrapperChildren,\n (child: React.ReactNode): React.ReactNode => child\n )}\n </DockedToolSettingsEntryContext.Provider>\n </>\n );\n}\n\n/** Properties of [[DockedToolSettings]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DockedToolSettingsProps extends CommonProps {\n /** Tool settings content. */\n children?: React.ReactNode;\n /** Container for overflown entries. */\n panelContainer?: React.ComponentType<{ children?: React.ReactNode }>;\n}\n\n/** Component that displays tool settings as a bar across the top of the content view.\n * @internal\n */\nexport function DockedToolSettings(props: DockedToolSettingsProps) {\n const [open, setOpen] = React.useState(false);\n const animateToolSettings = React.useContext(\n AnimateDockedToolSettingsContext\n );\n\n const ref = React.useRef<HTMLDivElement>(null);\n const width = React.useRef<number | undefined>(undefined);\n const handleWidth = React.useRef<number | undefined>(undefined);\n const childrenKeys = React.Children.toArray(props.children).map(\n (child, index) => getChildKey(child, index)\n );\n const [\n overflown,\n handleContainerResize,\n handleOverflowResize,\n getOnEntryResize,\n handleGapResize,\n ] = useOverflow(childrenKeys);\n const onResize = React.useCallback(() => {\n let gapSize = 0;\n if (ref.current) {\n gapSize = getGapVariable(ref.current);\n handleGapResize(gapSize);\n }\n width.current !== undefined &&\n handleWidth.current !== undefined &&\n handleContainerResize(width.current - handleWidth.current - gapSize);\n }, [handleContainerResize, handleGapResize]);\n const handleHandleResize = React.useCallback(\n (w: number) => {\n handleWidth.current = w;\n onResize();\n },\n [onResize]\n );\n const handleResize = React.useCallback(\n (w: number) => {\n width.current = w;\n onResize();\n },\n [onResize]\n );\n const resizeObserverRef = useResizeObserver(handleResize);\n\n const onOverflowClick = React.useCallback(() => {\n setOpen((prev) => !prev);\n }, []);\n const handleOnClose = React.useCallback(() => {\n setOpen(false);\n }, []);\n const targetRef = React.useRef<HTMLDivElement>(null);\n const refs = useRefs(ref, resizeObserverRef);\n const children = React.useMemo(\n () => React.Children.toArray(props.children),\n [props.children]\n );\n const dockedChildren = children.reduce<Array<[string, React.ReactNode]>>(\n (acc, child, index) => {\n const key = getChildKey(child, index);\n if (!overflown || overflown.indexOf(key) < 0) {\n acc.push([key, child]);\n }\n return acc;\n },\n []\n );\n const overflownChildren = overflown\n ? children.reduce<Array<[string, React.ReactNode]>>((acc, child, index) => {\n const key = getChildKey(child, index);\n if (overflown.indexOf(key) >= 0) {\n acc.push([key, child]);\n }\n return acc;\n }, [])\n : [];\n const PanelContainer = props.panelContainer\n ? props.panelContainer\n : DefaultPanelContainer;\n const className = classnames(\"uifw-toolSettings-docked\", props.className);\n return (\n <div\n data-toolsettings-provider={props.itemId}\n className={className}\n ref={refs}\n style={props.style}\n >\n <DockedToolSettingsHandle onResize={handleHandleResize} />\n {dockedChildren.map(([key, child]) => {\n return (\n <TransitionGroup\n appear={animateToolSettings}\n enter={animateToolSettings}\n key={key}\n >\n <CSSTransition\n in={animateToolSettings}\n timeout={400}\n classNames={{\n appear: \"toolsettings-appear\",\n enter: \"toolsettings-appear\",\n appearActive: \"toolsettings-appear-active\",\n enterActive: \"toolsettings-appear-active\",\n }}\n >\n <DockedToolSettingsEntry\n key={key}\n entryKey={key}\n getOnResize={getOnEntryResize}\n >\n {child}\n </DockedToolSettingsEntry>\n </CSSTransition>\n </TransitionGroup>\n );\n })}\n {(!overflown || overflown.length > 0) && (\n <>\n <DockedToolSettingsOverflow\n onClick={onOverflowClick}\n onResize={handleOverflowResize}\n ref={targetRef}\n />\n {overflownChildren.length > 0 && open && targetRef.current && (\n <ToolSettingsOverflowPanel\n onClose={handleOnClose}\n open\n target={targetRef.current}\n >\n <PanelContainer>\n {overflownChildren.map(([key, child]) => {\n return <OverflowLabelAndEditor key={key} wrapper={child} />;\n })}\n </PanelContainer>\n </ToolSettingsOverflowPanel>\n )}\n </>\n )}\n </div>\n );\n}\n\ninterface DockedToolSettingsEntryProps {\n children?: React.ReactNode;\n entryKey: string;\n getOnResize: (key: string) => (w: number) => void;\n}\n\nfunction DockedToolSettingsEntry({\n children,\n entryKey,\n getOnResize,\n}: DockedToolSettingsEntryProps) {\n const onResize = React.useMemo(\n () => getOnResize(entryKey),\n [getOnResize, entryKey]\n );\n const entry = React.useMemo<DockedToolSettingsEntryContextArgs>(\n () => ({\n isOverflown: false,\n onResize,\n }),\n [onResize]\n );\n return (\n <DockedToolSettingsEntryContext.Provider value={entry}>\n {children}\n </DockedToolSettingsEntryContext.Provider>\n );\n}\n\n/** Returns key of a child. Must be used along with React.Children.toArray to preserve the semantics of children.\n * @internal\n */\nexport function getChildKey(child: React.ReactNode, index: number) {\n if (React.isValidElement(child) && child.key !== null) {\n return child.key.toString();\n }\n return index.toString();\n}\n\n/** Returns a subset of docked entry keys that exceed given width and should be overflown.\n * @internal\n */\nexport function getOverflown(\n width: number,\n docked: ReadonlyArray<readonly [string, number]>,\n overflowWidth: number,\n activeIndex?: number,\n gapSize = 0\n) {\n let settingsWidth = 0;\n\n // Avoid adding gap to first item.\n let firstItem = true;\n const getGapSize = () => {\n if (firstItem) {\n firstItem = false;\n return 0;\n }\n return gapSize;\n };\n\n // Make sure active item is always visible.\n if (activeIndex !== undefined && docked.length > activeIndex) {\n const activeWidth = docked[activeIndex];\n settingsWidth += activeWidth[1] + getGapSize();\n }\n\n let i = 0;\n\n for (; i < docked.length; i++) {\n // Skip active item.\n if (i === activeIndex) continue;\n\n const itemWidth = docked[i][1];\n const newSettingsWidth = settingsWidth + itemWidth + getGapSize();\n\n // Items overflow, add an overflow button.\n if (newSettingsWidth > width) {\n settingsWidth += overflowWidth + getGapSize();\n break;\n }\n\n // Items fit, add an item.\n settingsWidth = newSettingsWidth;\n }\n\n // Remove items until they fit.\n let j = i;\n if (j < docked.length) {\n for (; j > 0; j--) {\n if (j === activeIndex) continue;\n if (settingsWidth <= width) break;\n const itemWidth = docked[j][1];\n settingsWidth -= itemWidth + gapSize;\n }\n }\n\n const overflown = new Array<string>();\n for (i = j; i < docked.length; i++) {\n if (i === activeIndex) continue;\n overflown.push(docked[i][0]);\n }\n return overflown;\n}\n\n/** Hook that returns a list of overflown children keys.\n * @internal\n */\nexport function useOverflow(\n itemKeys: ReadonlyArray<string>,\n activeItemIndex?: number\n): [\n /** Keys of overflown items. */\n ReadonlyArray<string> | undefined,\n /** Function to update container size. */\n (containerSize: number) => void,\n /** Function to update overflow button size. */\n (overflowButtonSize: number) => void,\n /** Returns a function to update an entry size for a given key. */\n (key: string) => (entrySize: number) => void,\n /** Function to update gap size. */\n (gapSize: number) => void\n] {\n const [overflown, setOverflown] = React.useState<ReadonlyArray<string>>();\n const entryWidths = React.useRef(new Map<string, number | undefined>());\n const width = React.useRef<number | undefined>(undefined);\n const overflowWidth = React.useRef<number | undefined>(undefined);\n const gapSize = React.useRef(0);\n\n const calculateOverflow = React.useCallback(() => {\n const widths = verifiedMapEntries(entryWidths.current);\n if (\n width.current === undefined ||\n widths === undefined ||\n overflowWidth.current === undefined\n ) {\n setOverflown(undefined);\n return;\n }\n\n // Calculate overflow.\n const newOverflown = getOverflown(\n width.current,\n [...widths.entries()],\n overflowWidth.current,\n activeItemIndex,\n gapSize.current\n );\n setOverflown((prevOverflown) => {\n return eqlOverflown(prevOverflown, newOverflown)\n ? prevOverflown\n : newOverflown;\n });\n }, [activeItemIndex]);\n\n React.useLayoutEffect(() => {\n const newEntryWidths = new Map<string, number | undefined>();\n for (const itemKey of itemKeys) {\n const lastW = entryWidths.current.get(itemKey);\n newEntryWidths.set(itemKey, lastW);\n }\n entryWidths.current = newEntryWidths;\n calculateOverflow();\n }, [itemKeys, calculateOverflow]);\n\n const handleContainerResize = React.useCallback(\n (w: number) => {\n const calculate = width.current !== w;\n width.current = w;\n calculate && calculateOverflow();\n },\n [calculateOverflow]\n );\n\n const handleOverflowResize = React.useCallback(\n (w: number) => {\n const calculate = overflowWidth.current !== w;\n overflowWidth.current = w;\n calculate && calculateOverflow();\n },\n [calculateOverflow]\n );\n\n const handleEntryResize = React.useCallback(\n (key: string) => (w: number) => {\n const oldW = entryWidths.current.get(key);\n if (oldW === w) return;\n entryWidths.current.set(key, w);\n calculateOverflow();\n },\n [calculateOverflow]\n );\n\n const handleGapResize = React.useCallback(\n (w: number) => {\n if (gapSize.current === w) return;\n gapSize.current = w;\n calculateOverflow();\n },\n [calculateOverflow]\n );\n\n return [\n overflown,\n handleContainerResize,\n handleOverflowResize,\n handleEntryResize,\n handleGapResize,\n ];\n}\n\ninterface DockedToolSettingsEntryContextArgs {\n readonly isOverflown: boolean;\n readonly onResize: (w: number) => void;\n}\n\nconst DockedToolSettingsEntryContext =\n React.createContext<DockedToolSettingsEntryContextArgs>(null!);\nDockedToolSettingsEntryContext.displayName =\n \"nz:DockedToolSettingsEntryContext\";\n\n/** @internal */\nexport function useToolSettingsEntry() {\n return React.useContext(DockedToolSettingsEntryContext);\n}\n\nfunction verifiedMapEntries<T>(map: Map<string, T | undefined>) {\n for (const [, val] of map) {\n if (val === undefined) return undefined;\n }\n return map as Map<string, T>;\n}\n\nfunction DefaultPanelContainer(props: { children: React.ReactNode }) {\n return (\n <div className=\"uifw-toolSettings-docked_container\">{props.children}</div>\n );\n}\n\n/** @internal */\nexport function eqlOverflown(\n prev: readonly string[] | undefined,\n value: readonly string[]\n) {\n if (!prev) return false;\n if (prev.length !== value.length) return false;\n for (let i = 0; i < prev.length; i++) {\n const p = prev[i];\n const v = value[i];\n if (p !== v) return false;\n }\n return true;\n}\n\nfunction getGapVariable(htmlElement: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const gap = getCssVariableAsNumber(\"gap\", htmlElement);\n if (isNaN(gap)) return 0;\n return gap;\n}\n"]}
1
+ {"version":3,"file":"Docked.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Docked.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,gBAAgB;AAChB,MAAM,UAAU,8BAA8B,KAAI,CAAC;AAEnD,4HAA4H;AAC5H,SAAS,sBAAsB,CAAC,EAAE,OAAO,EAAgC;IACvE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAC9B,GAAG,EAAE,CAAC,CAAC;QACL,WAAW,EAAE,IAAI;QACjB,QAAQ,EAAE,8BAA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AED,SAAS,qBAAqB,CAAC,KAAoC;IACjE,OAAO,CACL,6BAAK,SAAS,EAAC,oCAAoC,IAAE,KAAK,CAAC,QAAQ,CAAO,CAC3E,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,YAAY,CAC1B,IAAmC,EACnC,KAAwB;IAExB,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,cAAc,CAAC,WAAwB;IAC9C,4DAA4D;IAC5D,MAAM,GAAG,GAAG,sBAAsB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACvD,IAAI,KAAK,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IACzB,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport \"./Docked.scss\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { getCssVariableAsNumber } from \"@itwin/core-react\";\nimport { useRefs, useResizeObserver } from \"@itwin/core-react/internal\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { CSSTransition, TransitionGroup } from \"react-transition-group\";\nimport { AnimateDockedToolSettingsContext } from \"../base/NineZone.js\";\nimport { DockedToolSettingsHandle } from \"./Handle.js\";\nimport { DockedToolSettingsOverflow } from \"./Overflow.js\";\nimport { ToolSettingsOverflowPanel } from \"./Panel.js\";\n\n/** @internal */\nexport function onOverflowLabelAndEditorResize() {}\n\n/** This component takes a DockedToolSetting \"wrapper\" component and extract only the label and editor components from it */\nfunction OverflowLabelAndEditor({ wrapper }: { wrapper: React.ReactNode }) {\n assert(React.isValidElement(wrapper));\n const entryValue = React.useMemo<DockedToolSettingsEntryContextArgs>(\n () => ({\n isOverflown: true,\n onResize: onOverflowLabelAndEditorResize,\n }),\n []\n );\n const wrapperChildren = (wrapper as React.ReactElement<any>).props.children;\n return (\n <>\n <DockedToolSettingsEntryContext.Provider value={entryValue}>\n {wrapperChildren &&\n React.Children.map(\n wrapperChildren,\n (child: React.ReactNode): React.ReactNode => child\n )}\n </DockedToolSettingsEntryContext.Provider>\n </>\n );\n}\n\n/** Properties of [[DockedToolSettings]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DockedToolSettingsProps extends CommonProps {\n /** Tool settings content. */\n children?: React.ReactNode;\n /** Container for overflown entries. */\n panelContainer?: React.ComponentType<{ children?: React.ReactNode }>;\n}\n\n/** Component that displays tool settings as a bar across the top of the content view.\n * @internal\n */\nexport function DockedToolSettings(props: DockedToolSettingsProps) {\n const [open, setOpen] = React.useState(false);\n const animateToolSettings = React.useContext(\n AnimateDockedToolSettingsContext\n );\n\n const ref = React.useRef<HTMLDivElement>(null);\n const width = React.useRef<number | undefined>(undefined);\n const handleWidth = React.useRef<number | undefined>(undefined);\n const childrenKeys = React.Children.toArray(props.children).map(\n (child, index) => getChildKey(child, index)\n );\n const [\n overflown,\n handleContainerResize,\n handleOverflowResize,\n getOnEntryResize,\n handleGapResize,\n ] = useOverflow(childrenKeys);\n const onResize = React.useCallback(() => {\n let gapSize = 0;\n if (ref.current) {\n gapSize = getGapVariable(ref.current);\n handleGapResize(gapSize);\n }\n width.current !== undefined &&\n handleWidth.current !== undefined &&\n handleContainerResize(width.current - handleWidth.current - gapSize);\n }, [handleContainerResize, handleGapResize]);\n const handleHandleResize = React.useCallback(\n (w: number) => {\n handleWidth.current = w;\n onResize();\n },\n [onResize]\n );\n const handleResize = React.useCallback(\n (w: number) => {\n width.current = w;\n onResize();\n },\n [onResize]\n );\n const resizeObserverRef = useResizeObserver(handleResize);\n\n const onOverflowClick = React.useCallback(() => {\n setOpen((prev) => !prev);\n }, []);\n const handleOnClose = React.useCallback(() => {\n setOpen(false);\n }, []);\n const targetRef = React.useRef<HTMLDivElement>(null);\n const refs = useRefs(ref, resizeObserverRef);\n const children = React.useMemo(\n () => React.Children.toArray(props.children),\n [props.children]\n );\n const dockedChildren = children.reduce<Array<[string, React.ReactNode]>>(\n (acc, child, index) => {\n const key = getChildKey(child, index);\n if (!overflown || overflown.indexOf(key) < 0) {\n acc.push([key, child]);\n }\n return acc;\n },\n []\n );\n const overflownChildren = overflown\n ? children.reduce<Array<[string, React.ReactNode]>>((acc, child, index) => {\n const key = getChildKey(child, index);\n if (overflown.indexOf(key) >= 0) {\n acc.push([key, child]);\n }\n return acc;\n }, [])\n : [];\n const PanelContainer = props.panelContainer\n ? props.panelContainer\n : DefaultPanelContainer;\n const className = classnames(\"uifw-toolSettings-docked\", props.className);\n return (\n <div\n data-toolsettings-provider={props.itemId}\n className={className}\n ref={refs}\n style={props.style}\n >\n <DockedToolSettingsHandle onResize={handleHandleResize} />\n {dockedChildren.map(([key, child]) => {\n return (\n <DockedToolSettingsEntryTransition\n animate={animateToolSettings}\n key={key}\n >\n <DockedToolSettingsEntry\n key={key}\n entryKey={key}\n getOnResize={getOnEntryResize}\n >\n {child}\n </DockedToolSettingsEntry>\n </DockedToolSettingsEntryTransition>\n );\n })}\n {(!overflown || overflown.length > 0) && (\n <>\n <DockedToolSettingsOverflow\n onClick={onOverflowClick}\n onResize={handleOverflowResize}\n ref={targetRef}\n />\n {overflownChildren.length > 0 && open && targetRef.current && (\n <ToolSettingsOverflowPanel\n onClose={handleOnClose}\n open\n target={targetRef.current}\n >\n <PanelContainer>\n {overflownChildren.map(([key, child]) => {\n return <OverflowLabelAndEditor key={key} wrapper={child} />;\n })}\n </PanelContainer>\n </ToolSettingsOverflowPanel>\n )}\n </>\n )}\n </div>\n );\n}\n\nfunction DockedToolSettingsEntryTransition({\n animate,\n children,\n}: {\n animate: boolean;\n children?: React.ReactNode;\n}) {\n // Without a `nodeRef`, `CSSTransition` falls back to `findDOMNode`, which React 19 removed.\n const nodeRef = React.useRef<HTMLDivElement>(null);\n return (\n <TransitionGroup appear={animate} enter={animate} component={null}>\n <CSSTransition\n nodeRef={nodeRef}\n in={animate}\n timeout={400}\n classNames={{\n appear: \"toolsettings-appear\",\n enter: \"toolsettings-appear\",\n appearActive: \"toolsettings-appear-active\",\n enterActive: \"toolsettings-appear-active\",\n }}\n >\n <div ref={nodeRef}>{children}</div>\n </CSSTransition>\n </TransitionGroup>\n );\n}\n\ninterface DockedToolSettingsEntryProps {\n children?: React.ReactNode;\n entryKey: string;\n getOnResize: (key: string) => (w: number) => void;\n}\n\nfunction DockedToolSettingsEntry({\n children,\n entryKey,\n getOnResize,\n}: DockedToolSettingsEntryProps) {\n const onResize = React.useMemo(\n () => getOnResize(entryKey),\n [getOnResize, entryKey]\n );\n const entry = React.useMemo<DockedToolSettingsEntryContextArgs>(\n () => ({\n isOverflown: false,\n onResize,\n }),\n [onResize]\n );\n return (\n <DockedToolSettingsEntryContext.Provider value={entry}>\n {children}\n </DockedToolSettingsEntryContext.Provider>\n );\n}\n\n/** Returns key of a child. Must be used along with React.Children.toArray to preserve the semantics of children.\n * @internal\n */\nexport function getChildKey(child: React.ReactNode, index: number) {\n if (React.isValidElement(child) && child.key !== null) {\n return child.key.toString();\n }\n return index.toString();\n}\n\n/** Returns a subset of docked entry keys that exceed given width and should be overflown.\n * @internal\n */\nexport function getOverflown(\n width: number,\n docked: ReadonlyArray<readonly [string, number]>,\n overflowWidth: number,\n activeIndex?: number,\n gapSize = 0\n) {\n let settingsWidth = 0;\n\n // Avoid adding gap to first item.\n let firstItem = true;\n const getGapSize = () => {\n if (firstItem) {\n firstItem = false;\n return 0;\n }\n return gapSize;\n };\n\n // Make sure active item is always visible.\n if (activeIndex !== undefined && docked.length > activeIndex) {\n const activeWidth = docked[activeIndex];\n settingsWidth += activeWidth[1] + getGapSize();\n }\n\n let i = 0;\n\n for (; i < docked.length; i++) {\n // Skip active item.\n if (i === activeIndex) continue;\n\n const itemWidth = docked[i][1];\n const newSettingsWidth = settingsWidth + itemWidth + getGapSize();\n\n // Items overflow, add an overflow button.\n if (newSettingsWidth > width) {\n settingsWidth += overflowWidth + getGapSize();\n break;\n }\n\n // Items fit, add an item.\n settingsWidth = newSettingsWidth;\n }\n\n // Remove items until they fit.\n let j = i;\n if (j < docked.length) {\n for (; j > 0; j--) {\n if (j === activeIndex) continue;\n if (settingsWidth <= width) break;\n const itemWidth = docked[j][1];\n settingsWidth -= itemWidth + gapSize;\n }\n }\n\n const overflown = new Array<string>();\n for (i = j; i < docked.length; i++) {\n if (i === activeIndex) continue;\n overflown.push(docked[i][0]);\n }\n return overflown;\n}\n\n/** Hook that returns a list of overflown children keys.\n * @internal\n */\nexport function useOverflow(\n itemKeys: ReadonlyArray<string>,\n activeItemIndex?: number\n): [\n /** Keys of overflown items. */\n ReadonlyArray<string> | undefined,\n /** Function to update container size. */\n (containerSize: number) => void,\n /** Function to update overflow button size. */\n (overflowButtonSize: number) => void,\n /** Returns a function to update an entry size for a given key. */\n (key: string) => (entrySize: number) => void,\n /** Function to update gap size. */\n (gapSize: number) => void\n] {\n const [overflown, setOverflown] = React.useState<ReadonlyArray<string>>();\n const entryWidths = React.useRef(new Map<string, number | undefined>());\n const width = React.useRef<number | undefined>(undefined);\n const overflowWidth = React.useRef<number | undefined>(undefined);\n const gapSize = React.useRef(0);\n\n const calculateOverflow = React.useCallback(() => {\n const widths = verifiedMapEntries(entryWidths.current);\n if (\n width.current === undefined ||\n widths === undefined ||\n overflowWidth.current === undefined\n ) {\n setOverflown(undefined);\n return;\n }\n\n // Calculate overflow.\n const newOverflown = getOverflown(\n width.current,\n [...widths.entries()],\n overflowWidth.current,\n activeItemIndex,\n gapSize.current\n );\n setOverflown((prevOverflown) => {\n return eqlOverflown(prevOverflown, newOverflown)\n ? prevOverflown\n : newOverflown;\n });\n }, [activeItemIndex]);\n\n React.useLayoutEffect(() => {\n const newEntryWidths = new Map<string, number | undefined>();\n for (const itemKey of itemKeys) {\n const lastW = entryWidths.current.get(itemKey);\n newEntryWidths.set(itemKey, lastW);\n }\n entryWidths.current = newEntryWidths;\n calculateOverflow();\n }, [itemKeys, calculateOverflow]);\n\n const handleContainerResize = React.useCallback(\n (w: number) => {\n const calculate = width.current !== w;\n width.current = w;\n calculate && calculateOverflow();\n },\n [calculateOverflow]\n );\n\n const handleOverflowResize = React.useCallback(\n (w: number) => {\n const calculate = overflowWidth.current !== w;\n overflowWidth.current = w;\n calculate && calculateOverflow();\n },\n [calculateOverflow]\n );\n\n const handleEntryResize = React.useCallback(\n (key: string) => (w: number) => {\n const oldW = entryWidths.current.get(key);\n if (oldW === w) return;\n entryWidths.current.set(key, w);\n calculateOverflow();\n },\n [calculateOverflow]\n );\n\n const handleGapResize = React.useCallback(\n (w: number) => {\n if (gapSize.current === w) return;\n gapSize.current = w;\n calculateOverflow();\n },\n [calculateOverflow]\n );\n\n return [\n overflown,\n handleContainerResize,\n handleOverflowResize,\n handleEntryResize,\n handleGapResize,\n ];\n}\n\ninterface DockedToolSettingsEntryContextArgs {\n readonly isOverflown: boolean;\n readonly onResize: (w: number) => void;\n}\n\nconst DockedToolSettingsEntryContext =\n React.createContext<DockedToolSettingsEntryContextArgs>(null!);\nDockedToolSettingsEntryContext.displayName =\n \"nz:DockedToolSettingsEntryContext\";\n\n/** @internal */\nexport function useToolSettingsEntry() {\n return React.useContext(DockedToolSettingsEntryContext);\n}\n\nfunction verifiedMapEntries<T>(map: Map<string, T | undefined>) {\n for (const [, val] of map) {\n if (val === undefined) return undefined;\n }\n return map as Map<string, T>;\n}\n\nfunction DefaultPanelContainer(props: { children: React.ReactNode }) {\n return (\n <div className=\"uifw-toolSettings-docked_container\">{props.children}</div>\n );\n}\n\n/** @internal */\nexport function eqlOverflown(\n prev: readonly string[] | undefined,\n value: readonly string[]\n) {\n if (!prev) return false;\n if (prev.length !== value.length) return false;\n for (let i = 0; i < prev.length; i++) {\n const p = prev[i];\n const v = value[i];\n if (p !== v) return false;\n }\n return true;\n}\n\nfunction getGapVariable(htmlElement: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const gap = getCssVariableAsNumber(\"gap\", htmlElement);\n if (isNaN(gap)) return 0;\n return gap;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Handle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAarD;;GAEG;AAEH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,qBA8B5E"}
1
+ {"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Handle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAcrD;;GAEG;AAEH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,qBAuC5E"}
@@ -14,6 +14,7 @@ import { getUniqueId, NineZoneDispatchContext, useLabel, } from "../base/NineZon
14
14
  import { useDrag } from "../widget/TabBar.js";
15
15
  import { SvgDragHandleVertical } from "@itwin/itwinui-icons-react";
16
16
  import { Icon } from "@itwin/itwinui-react";
17
+ import { StrataKitIcon } from "../../preview/use-stratakit/StrataKitIcon.js";
17
18
  /** Component that displays tool settings as a bar across the top of the content view.
18
19
  * @internal
19
20
  */
@@ -37,7 +38,8 @@ export function DockedToolSettingsHandle(props) {
37
38
  const title = useLabel("toolSettingsHandleTitle");
38
39
  const className = classnames("nz-toolSettings-handle", props.className);
39
40
  return (React.createElement("div", { className: className, ref: refs, style: props.style, title: title },
40
- React.createElement(Icon, { size: "large" },
41
- React.createElement(SvgDragHandleVertical, null))));
41
+ React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/drag-handle-vertical")
42
+ .svgDragHandleVerticalLarge, size: "large", iconNode: React.createElement(Icon, { size: "large" },
43
+ React.createElement(SvgDragHandleVertical, null)) })));
42
44
  }
43
45
  //# sourceMappingURL=Handle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Handle.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Handle.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,QAAQ,GACT,MAAM,qBAAqB,CAAC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,IAAI,IAAC,IAAI,EAAC,OAAO;YAChB,oBAAC,qBAAqB,OAAG,CACpB,CACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport \"./Handle.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { Point } from \"@itwin/core-react/internal\";\nimport { useRefs, useResizeObserver } from \"@itwin/core-react/internal\";\nimport { useDragToolSettings } from \"../base/DragManager.js\";\nimport {\n getUniqueId,\n NineZoneDispatchContext,\n useLabel,\n} from \"../base/NineZone.js\";\nimport { useDrag } from \"../widget/TabBar.js\";\nimport { SvgDragHandleVertical } from \"@itwin/itwinui-icons-react\";\nimport { Icon } from \"@itwin/itwinui-react\";\n\n/** Properties of [[DockedToolSettingsHandle]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DockedToolSettingsHandleProps extends CommonProps {\n onResize?: (w: number) => void;\n}\n\n/** Component that displays tool settings as a bar across the top of the content view.\n * @internal\n */\nexport function DockedToolSettingsHandle(props: DockedToolSettingsHandleProps) {\n const dispatch = React.useContext(NineZoneDispatchContext);\n const resizeObserverRef = useResizeObserver<HTMLDivElement>(props.onResize);\n const newFloatingWidgetId = React.useMemo(() => getUniqueId(), []);\n const onDragStart = useDragToolSettings({ newFloatingWidgetId });\n const handleDragStart = React.useCallback(\n (initialPointerPosition: Point) => {\n onDragStart({\n initialPointerPosition,\n pointerPosition: initialPointerPosition,\n });\n dispatch({\n type: \"TOOL_SETTINGS_DRAG_START\",\n newFloatingWidgetId,\n });\n },\n [dispatch, newFloatingWidgetId, onDragStart]\n );\n const dragRef = useDrag(handleDragStart);\n const refs = useRefs(dragRef, resizeObserverRef);\n const title = useLabel(\"toolSettingsHandleTitle\");\n const className = classnames(\"nz-toolSettings-handle\", props.className);\n\n return (\n <div className={className} ref={refs} style={props.style} title={title}>\n <Icon size=\"large\">\n <SvgDragHandleVertical />\n </Icon>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Handle.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Handle.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAU7E;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC3D,MAAM,iBAAiB,GAAG,iBAAiB,CAAiB,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5E,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,WAAW,GAAG,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACjE,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CACvC,CAAC,sBAA6B,EAAE,EAAE;QAChC,WAAW,CAAC;YACV,sBAAsB;YACtB,eAAe,EAAE,sBAAsB;SACxC,CAAC,CAAC;QACH,QAAQ,CAAC;YACP,IAAI,EAAE,0BAA0B;YAChC,mBAAmB;SACpB,CAAC,CAAC;IACL,CAAC,EACD,CAAC,QAAQ,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAC7C,CAAC;IACF,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACzC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,UAAU,CAAC,wBAAwB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAExE,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK;QACpE,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,uCAAuC,CAAC;iBAChD,0BAA0B,EAE/B,IAAI,EAAC,OAAO,EACZ,QAAQ,EACN,oBAAC,IAAI,IAAC,IAAI,EAAC,OAAO;gBAChB,oBAAC,qBAAqB,OAAG,CACpB,GAET,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport \"./Handle.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { Point } from \"@itwin/core-react/internal\";\nimport { useRefs, useResizeObserver } from \"@itwin/core-react/internal\";\nimport { useDragToolSettings } from \"../base/DragManager.js\";\nimport {\n getUniqueId,\n NineZoneDispatchContext,\n useLabel,\n} from \"../base/NineZone.js\";\nimport { useDrag } from \"../widget/TabBar.js\";\nimport { SvgDragHandleVertical } from \"@itwin/itwinui-icons-react\";\nimport { Icon } from \"@itwin/itwinui-react\";\nimport { StrataKitIcon } from \"../../preview/use-stratakit/StrataKitIcon.js\";\n\n/** Properties of [[DockedToolSettingsHandle]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DockedToolSettingsHandleProps extends CommonProps {\n onResize?: (w: number) => void;\n}\n\n/** Component that displays tool settings as a bar across the top of the content view.\n * @internal\n */\nexport function DockedToolSettingsHandle(props: DockedToolSettingsHandleProps) {\n const dispatch = React.useContext(NineZoneDispatchContext);\n const resizeObserverRef = useResizeObserver<HTMLDivElement>(props.onResize);\n const newFloatingWidgetId = React.useMemo(() => getUniqueId(), []);\n const onDragStart = useDragToolSettings({ newFloatingWidgetId });\n const handleDragStart = React.useCallback(\n (initialPointerPosition: Point) => {\n onDragStart({\n initialPointerPosition,\n pointerPosition: initialPointerPosition,\n });\n dispatch({\n type: \"TOOL_SETTINGS_DRAG_START\",\n newFloatingWidgetId,\n });\n },\n [dispatch, newFloatingWidgetId, onDragStart]\n );\n const dragRef = useDrag(handleDragStart);\n const refs = useRefs(dragRef, resizeObserverRef);\n const title = useLabel(\"toolSettingsHandleTitle\");\n const className = classnames(\"nz-toolSettings-handle\", props.className);\n\n return (\n <div className={className} ref={refs} style={props.style} title={title}>\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/drag-handle-vertical\")\n .svgDragHandleVerticalLarge\n }\n size=\"large\"\n iconNode={\n <Icon size=\"large\">\n <SvgDragHandleVertical />\n </Icon>\n }\n />\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Overflow.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Overflow.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,iBAAiB,CAAC;AAEzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD;;GAEG;AAEH,MAAM,WAAW,+BAAgC,SAAQ,WAAW;IAClE,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,wGAqBrC,CAAC"}
1
+ {"version":3,"file":"Overflow.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Overflow.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,iBAAiB,CAAC;AAEzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOrD;;GAEG;AAEH,MAAM,WAAW,+BAAgC,SAAQ,WAAW;IAClE,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,wGA0BrC,CAAC"}
@@ -12,6 +12,7 @@ import { useRefs, useResizeObserver } from "@itwin/core-react/internal";
12
12
  import { IconButton } from "@itwin/itwinui-react";
13
13
  import { SvgMore } from "@itwin/itwinui-icons-react";
14
14
  import { useLabel } from "../base/NineZone.js";
15
+ import { StrataKitIcon } from "../../preview/use-stratakit/StrataKitIcon.js";
15
16
  /** Entry point to overflown tool settings of [[DockedToolSettings]] component.
16
17
  * @internal
17
18
  */
@@ -21,6 +22,6 @@ export const DockedToolSettingsOverflow = React.forwardRef(function DockedToolSe
21
22
  const className = classnames("nz-toolSettings-overflow", props.className);
22
23
  const moreToolSettingsTitle = useLabel("moreToolSettingsTitle");
23
24
  return (React.createElement(IconButton, { className: className, onClick: props.onClick, ref: refs, style: props.style, styleType: "borderless", label: moreToolSettingsTitle },
24
- React.createElement(SvgMore, null)));
25
+ React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/more-horizontal").svgMoreHorizontal, iconNode: React.createElement(SvgMore, null) })));
25
26
  });
26
27
  //# sourceMappingURL=Overflow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Overflow.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Overflow.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,iBAAiB,CAAC;AACzB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAa/C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,UAAU,CAGxD,SAAS,0BAA0B,CAAC,KAAK,EAAE,GAAG;IAC9C,MAAM,KAAK,GAAG,iBAAiB,CAAiB,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACjC,MAAM,SAAS,GAAG,UAAU,CAAC,0BAA0B,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1E,MAAM,qBAAqB,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IAEhE,OAAO,CACL,oBAAC,UAAU,IACT,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,qBAAqB;QAE5B,oBAAC,OAAO,OAAG,CACA,CACd,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport \"./Overflow.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { useRefs, useResizeObserver } from \"@itwin/core-react/internal\";\nimport { IconButton } from \"@itwin/itwinui-react\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\nimport { useLabel } from \"../base/NineZone.js\";\n\n/** Properties of [[ToolSettingsOverflow]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DockedToolSettingsOverflowProps extends CommonProps {\n /** Function called when button is clicked. */\n onClick?: () => void;\n /** Function called when button is resized. */\n onResize?: (w: number) => void;\n}\n\n/** Entry point to overflown tool settings of [[DockedToolSettings]] component.\n * @internal\n */\nexport const DockedToolSettingsOverflow = React.forwardRef<\n HTMLDivElement,\n DockedToolSettingsOverflowProps\n>(function DockedToolSettingsOverflow(props, ref) {\n const roRef = useResizeObserver<HTMLDivElement>(props.onResize);\n const refs = useRefs(roRef, ref);\n const className = classnames(\"nz-toolSettings-overflow\", props.className);\n const moreToolSettingsTitle = useLabel(\"moreToolSettingsTitle\");\n\n return (\n <IconButton\n className={className}\n onClick={props.onClick}\n ref={refs}\n style={props.style}\n styleType=\"borderless\"\n label={moreToolSettingsTitle}\n >\n <SvgMore />\n </IconButton>\n );\n});\n"]}
1
+ {"version":3,"file":"Overflow.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/tool-settings/Overflow.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,iBAAiB,CAAC;AACzB,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAa7E;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,UAAU,CAGxD,SAAS,0BAA0B,CAAC,KAAK,EAAE,GAAG;IAC9C,MAAM,KAAK,GAAG,iBAAiB,CAAiB,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACjC,MAAM,SAAS,GAAG,UAAU,CAAC,0BAA0B,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1E,MAAM,qBAAqB,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IAEhE,OAAO,CACL,oBAAC,UAAU,IACT,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,qBAAqB;QAE5B,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,kCAAkC,CAAC,CAAC,iBAAiB,EAElE,QAAQ,EAAE,oBAAC,OAAO,OAAG,GACrB,CACS,CACd,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ToolSettings\n */\n\nimport \"./Overflow.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { useRefs, useResizeObserver } from \"@itwin/core-react/internal\";\nimport { IconButton } from \"@itwin/itwinui-react\";\nimport { SvgMore } from \"@itwin/itwinui-icons-react\";\nimport { useLabel } from \"../base/NineZone.js\";\nimport { StrataKitIcon } from \"../../preview/use-stratakit/StrataKitIcon.js\";\n\n/** Properties of [[ToolSettingsOverflow]] component.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DockedToolSettingsOverflowProps extends CommonProps {\n /** Function called when button is clicked. */\n onClick?: () => void;\n /** Function called when button is resized. */\n onResize?: (w: number) => void;\n}\n\n/** Entry point to overflown tool settings of [[DockedToolSettings]] component.\n * @internal\n */\nexport const DockedToolSettingsOverflow = React.forwardRef<\n HTMLDivElement,\n DockedToolSettingsOverflowProps\n>(function DockedToolSettingsOverflow(props, ref) {\n const roRef = useResizeObserver<HTMLDivElement>(props.onResize);\n const refs = useRefs(roRef, ref);\n const className = classnames(\"nz-toolSettings-overflow\", props.className);\n const moreToolSettingsTitle = useLabel(\"moreToolSettingsTitle\");\n\n return (\n <IconButton\n className={className}\n onClick={props.onClick}\n ref={refs}\n style={props.style}\n styleType=\"borderless\"\n label={moreToolSettingsTitle}\n >\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/more-horizontal\").svgMoreHorizontal\n }\n iconNode={<SvgMore />}\n />\n </IconButton>\n );\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Dock.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/widget/Dock.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,gBAAgB;AAChB,wBAAgB,IAAI,sBAenB;AAED,gBAAgB;AAChB,wBAAgB,OAAO,YAItB"}
1
+ {"version":3,"file":"Dock.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/widget/Dock.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,gBAAgB;AAChB,wBAAgB,IAAI,sBAsBnB;AAED,gBAAgB;AAChB,wBAAgB,OAAO,YAItB"}
@@ -12,12 +12,13 @@ import { WidgetAction } from "./WidgetAction.js";
12
12
  import { useIsToolSettingsTab } from "./useIsToolSettingsTab.js";
13
13
  import { useIsMaximizedWidget } from "../../preview/enable-maximized-widget/useMaximizedWidget.js";
14
14
  import { useTranslation } from "../../hooks/useTranslation.js";
15
+ import { StrataKitIcon } from "../../preview/use-stratakit/StrataKitIcon.js";
15
16
  /** @internal */
16
17
  export function Dock() {
17
18
  const dispatch = React.useContext(NineZoneDispatchContext);
18
19
  const { translate } = useTranslation();
19
20
  const label = translate("widget.tooltips.dockToolSettings");
20
- return (React.createElement(WidgetAction, { icon: React.createElement(SvgDockTop, null), label: label, onClick: () => {
21
+ return (React.createElement(WidgetAction, { icon: React.createElement(StrataKitIcon, { href: (importIcon) => importIcon("@stratakit/icons/dock-top").svgDockTop, iconNode: React.createElement(SvgDockTop, null) }), label: label, onClick: () => {
21
22
  dispatch({
22
23
  type: "TOOL_SETTINGS_DOCK",
23
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Dock.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/widget/Dock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,gBAAgB;AAChB,MAAM,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC3D,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAC5D,OAAO,CACL,oBAAC,YAAY,IACX,IAAI,EAAE,oBAAC,UAAU,OAAG,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE;YACZ,QAAQ,CAAC;gBACP,IAAI,EAAE,oBAAoB;aAC3B,CAAC,CAAC;QACL,CAAC,GACD,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,OAAO;IACrB,MAAM,cAAc,GAAG,oBAAoB,EAAE,CAAC;IAC9C,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IACjD,OAAO,cAAc,IAAI,CAAC,iBAAiB,CAAC;AAC9C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport * as React from \"react\";\nimport { SvgDockTop } from \"@itwin/itwinui-icons-react\";\nimport { NineZoneDispatchContext } from \"../base/NineZone.js\";\nimport { WidgetAction } from \"./WidgetAction.js\";\nimport { useIsToolSettingsTab } from \"./useIsToolSettingsTab.js\";\nimport { useIsMaximizedWidget } from \"../../preview/enable-maximized-widget/useMaximizedWidget.js\";\nimport { useTranslation } from \"../../hooks/useTranslation.js\";\n\n/** @internal */\nexport function Dock() {\n const dispatch = React.useContext(NineZoneDispatchContext);\n const { translate } = useTranslation();\n const label = translate(\"widget.tooltips.dockToolSettings\");\n return (\n <WidgetAction\n icon={<SvgDockTop />}\n label={label}\n onClick={() => {\n dispatch({\n type: \"TOOL_SETTINGS_DOCK\",\n });\n }}\n />\n );\n}\n\n/** @internal */\nexport function useDock() {\n const isToolSettings = useIsToolSettingsTab();\n const isMaximizedWidget = useIsMaximizedWidget();\n return isToolSettings && !isMaximizedWidget;\n}\n"]}
1
+ {"version":3,"file":"Dock.js","sourceRoot":"","sources":["../../../../src/appui-react/layout/widget/Dock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAE7E,gBAAgB;AAChB,MAAM,UAAU,IAAI;IAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC3D,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAC5D,OAAO,CACL,oBAAC,YAAY,IACX,IAAI,EACF,oBAAC,aAAa,IACZ,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,CACnB,UAAU,CAAC,2BAA2B,CAAC,CAAC,UAAU,EAEpD,QAAQ,EAAE,oBAAC,UAAU,OAAG,GACxB,EAEJ,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE;YACZ,QAAQ,CAAC;gBACP,IAAI,EAAE,oBAAoB;aAC3B,CAAC,CAAC;QACL,CAAC,GACD,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,OAAO;IACrB,MAAM,cAAc,GAAG,oBAAoB,EAAE,CAAC;IAC9C,MAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IACjD,OAAO,cAAc,IAAI,CAAC,iBAAiB,CAAC;AAC9C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Widget\n */\n\nimport * as React from \"react\";\nimport { SvgDockTop } from \"@itwin/itwinui-icons-react\";\nimport { NineZoneDispatchContext } from \"../base/NineZone.js\";\nimport { WidgetAction } from \"./WidgetAction.js\";\nimport { useIsToolSettingsTab } from \"./useIsToolSettingsTab.js\";\nimport { useIsMaximizedWidget } from \"../../preview/enable-maximized-widget/useMaximizedWidget.js\";\nimport { useTranslation } from \"../../hooks/useTranslation.js\";\nimport { StrataKitIcon } from \"../../preview/use-stratakit/StrataKitIcon.js\";\n\n/** @internal */\nexport function Dock() {\n const dispatch = React.useContext(NineZoneDispatchContext);\n const { translate } = useTranslation();\n const label = translate(\"widget.tooltips.dockToolSettings\");\n return (\n <WidgetAction\n icon={\n <StrataKitIcon\n href={(importIcon) =>\n importIcon(\"@stratakit/icons/dock-top\").svgDockTop\n }\n iconNode={<SvgDockTop />}\n />\n }\n label={label}\n onClick={() => {\n dispatch({\n type: \"TOOL_SETTINGS_DOCK\",\n });\n }}\n />\n );\n}\n\n/** @internal */\nexport function useDock() {\n const isToolSettings = useIsToolSettingsTab();\n const isMaximizedWidget = useIsMaximizedWidget();\n return isToolSettings && !isMaximizedWidget;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuTab.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/widget/MenuTab.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC3B;AAED,gBAAgB;AAChB,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAsCtD"}
1
+ {"version":3,"file":"MenuTab.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/layout/widget/MenuTab.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC3B;AAED,gBAAgB;AAChB,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAiDtD"}