@itwin/core-react 5.0.5 → 5.2.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 (185) hide show
  1. package/CHANGELOG.md +33 -19
  2. package/lib/cjs/core-react/colorthemes.scss +0 -1
  3. package/lib/cjs/core-react/colorvariables.scss +0 -2
  4. package/lib/cjs/core-react/inputs/variables.scss +0 -2
  5. package/lib/cjs/core-react/style/themecolors.scss +0 -2
  6. package/lib/core-react/UiCore.js +1 -1
  7. package/lib/core-react/UiCore.js.map +1 -1
  8. package/lib/core-react/autosuggest/AutoSuggest.d.ts +1 -0
  9. package/lib/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
  10. package/lib/core-react/autosuggest/AutoSuggest.js +1 -0
  11. package/lib/core-react/autosuggest/AutoSuggest.js.map +1 -1
  12. package/lib/core-react/badge/Badge.js.map +1 -1
  13. package/lib/core-react/badge/BadgeType.d.ts +1 -1
  14. package/lib/core-react/badge/BadgeType.js +1 -1
  15. package/lib/core-react/badge/BadgeType.js.map +1 -1
  16. package/lib/core-react/base/Centered.js +2 -2
  17. package/lib/core-react/base/Centered.js.map +1 -1
  18. package/lib/core-react/base/Div.js +1 -1
  19. package/lib/core-react/base/Div.js.map +1 -1
  20. package/lib/core-react/base/DivWithOutsideClick.d.ts +2 -2
  21. package/lib/core-react/base/DivWithOutsideClick.js +2 -2
  22. package/lib/core-react/base/DivWithOutsideClick.js.map +1 -1
  23. package/lib/core-react/base/FillCentered.js +2 -2
  24. package/lib/core-react/base/FillCentered.js.map +1 -1
  25. package/lib/core-react/base/FlexWrapContainer.js +2 -2
  26. package/lib/core-react/base/FlexWrapContainer.js.map +1 -1
  27. package/lib/core-react/base/Gap.js +1 -1
  28. package/lib/core-react/base/Gap.js.map +1 -1
  29. package/lib/core-react/base/ScrollView.js +2 -2
  30. package/lib/core-react/base/ScrollView.js.map +1 -1
  31. package/lib/core-react/button/UnderlinedButton.js +1 -1
  32. package/lib/core-react/button/UnderlinedButton.js.map +1 -1
  33. package/lib/core-react/checklistbox/CheckListBox.js +1 -1
  34. package/lib/core-react/checklistbox/CheckListBox.js.map +1 -1
  35. package/lib/core-react/colorthemes.scss +0 -1
  36. package/lib/core-react/colorvariables.scss +0 -2
  37. package/lib/core-react/contextmenu/ContextMenu.d.ts +1 -0
  38. package/lib/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
  39. package/lib/core-react/contextmenu/ContextMenu.js +1 -0
  40. package/lib/core-react/contextmenu/ContextMenu.js.map +1 -1
  41. package/lib/core-react/contextmenu/ContextMenuDivider.js +1 -1
  42. package/lib/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
  43. package/lib/core-react/contextmenu/ContextMenuItem.d.ts +1 -0
  44. package/lib/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
  45. package/lib/core-react/contextmenu/ContextMenuItem.js +2 -1
  46. package/lib/core-react/contextmenu/ContextMenuItem.js.map +1 -1
  47. package/lib/core-react/contextmenu/ContextSubMenu.d.ts +1 -0
  48. package/lib/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
  49. package/lib/core-react/contextmenu/ContextSubMenu.js +2 -1
  50. package/lib/core-react/contextmenu/ContextSubMenu.js.map +1 -1
  51. package/lib/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
  52. package/lib/core-react/contextmenu/PopupContextMenu.js.map +1 -1
  53. package/lib/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
  54. package/lib/core-react/dialog/Dialog.d.ts.map +1 -1
  55. package/lib/core-react/dialog/Dialog.js +14 -14
  56. package/lib/core-react/dialog/Dialog.js.map +1 -1
  57. package/lib/core-react/dialog/GlobalDialog.js +3 -3
  58. package/lib/core-react/dialog/GlobalDialog.js.map +1 -1
  59. package/lib/core-react/elementseparator/ElementSeparator.js.map +1 -1
  60. package/lib/core-react/enums/CheckBoxState.js.map +1 -1
  61. package/lib/core-react/expandable/ExpandableList.js +3 -3
  62. package/lib/core-react/expandable/ExpandableList.js.map +1 -1
  63. package/lib/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
  64. package/lib/core-react/focustrap/FocusTrap.js +2 -2
  65. package/lib/core-react/focustrap/FocusTrap.js.map +1 -1
  66. package/lib/core-react/hocs/withIsPressed.d.ts +1 -1
  67. package/lib/core-react/hocs/withIsPressed.d.ts.map +1 -1
  68. package/lib/core-react/hocs/withIsPressed.js.map +1 -1
  69. package/lib/core-react/hocs/withOnOutsideClick.d.ts +3 -3
  70. package/lib/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
  71. package/lib/core-react/hocs/withOnOutsideClick.js.map +1 -1
  72. package/lib/core-react/hocs/withTimeout.d.ts +3 -1
  73. package/lib/core-react/hocs/withTimeout.d.ts.map +1 -1
  74. package/lib/core-react/hocs/withTimeout.js +3 -2
  75. package/lib/core-react/hocs/withTimeout.js.map +1 -1
  76. package/lib/core-react/icons/ConditionalIconItem.js +1 -1
  77. package/lib/core-react/icons/ConditionalIconItem.js.map +1 -1
  78. package/lib/core-react/icons/IconComponent.d.ts.map +1 -1
  79. package/lib/core-react/icons/IconComponent.js +2 -5
  80. package/lib/core-react/icons/IconComponent.js.map +1 -1
  81. package/lib/core-react/icons/SvgPath.js +1 -1
  82. package/lib/core-react/icons/SvgPath.js.map +1 -1
  83. package/lib/core-react/icons/WebFontIcon.js +1 -1
  84. package/lib/core-react/icons/WebFontIcon.js.map +1 -1
  85. package/lib/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
  86. package/lib/core-react/inputs/Input.js.map +1 -1
  87. package/lib/core-react/inputs/InputLabel.js.map +1 -1
  88. package/lib/core-react/inputs/LabeledComponentProps.js.map +1 -1
  89. package/lib/core-react/inputs/iconinput/IconInput.js +2 -2
  90. package/lib/core-react/inputs/iconinput/IconInput.js.map +1 -1
  91. package/lib/core-react/inputs/numberinput/NumberInput.js.map +1 -1
  92. package/lib/core-react/inputs/variables.scss +0 -2
  93. package/lib/core-react/l10n/useTranslation.js +1 -1
  94. package/lib/core-react/l10n/useTranslation.js.map +1 -1
  95. package/lib/core-react/listbox/Listbox.js.map +1 -1
  96. package/lib/core-react/loading/LoadingBar.js.map +1 -1
  97. package/lib/core-react/loading/LoadingPrompt.js.map +1 -1
  98. package/lib/core-react/loading/LoadingSpinner.js.map +1 -1
  99. package/lib/core-react/loading/LoadingStatus.js.map +1 -1
  100. package/lib/core-react/messagebox/MessageBox.js.map +1 -1
  101. package/lib/core-react/notification/MessageRenderer.d.ts.map +1 -1
  102. package/lib/core-react/notification/MessageRenderer.js +4 -7
  103. package/lib/core-react/notification/MessageRenderer.js.map +1 -1
  104. package/lib/core-react/notification/MessageType.d.ts.map +1 -1
  105. package/lib/core-react/notification/MessageType.js.map +1 -1
  106. package/lib/core-react/popup/Popup.d.ts +2 -1
  107. package/lib/core-react/popup/Popup.d.ts.map +1 -1
  108. package/lib/core-react/popup/Popup.js +5 -4
  109. package/lib/core-react/popup/Popup.js.map +1 -1
  110. package/lib/core-react/radialmenu/RadialMenu.d.ts +1 -0
  111. package/lib/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
  112. package/lib/core-react/radialmenu/RadialMenu.js +1 -0
  113. package/lib/core-react/radialmenu/RadialMenu.js.map +1 -1
  114. package/lib/core-react/searchbox/SearchBox.js.map +1 -1
  115. package/lib/core-react/settings/SettingsContainer.js +1 -1
  116. package/lib/core-react/settings/SettingsContainer.js.map +1 -1
  117. package/lib/core-react/settings/SettingsManager.js.map +1 -1
  118. package/lib/core-react/style/themecolors.scss +0 -2
  119. package/lib/core-react/tabs/Tabs.d.ts +1 -0
  120. package/lib/core-react/tabs/Tabs.d.ts.map +1 -1
  121. package/lib/core-react/tabs/Tabs.js +1 -0
  122. package/lib/core-react/tabs/Tabs.js.map +1 -1
  123. package/lib/core-react/tabs/VerticalTabs.js +1 -1
  124. package/lib/core-react/tabs/VerticalTabs.js.map +1 -1
  125. package/lib/core-react/text/BlockText.js +2 -2
  126. package/lib/core-react/text/BlockText.js.map +1 -1
  127. package/lib/core-react/text/BodyText.js +2 -2
  128. package/lib/core-react/text/BodyText.js.map +1 -1
  129. package/lib/core-react/text/DisabledText.js +1 -1
  130. package/lib/core-react/text/DisabledText.js.map +1 -1
  131. package/lib/core-react/text/FilteredText.d.ts.map +1 -1
  132. package/lib/core-react/text/FilteredText.js +1 -2
  133. package/lib/core-react/text/FilteredText.js.map +1 -1
  134. package/lib/core-react/text/MutedText.js +2 -2
  135. package/lib/core-react/text/MutedText.js.map +1 -1
  136. package/lib/core-react/text/StyledText.js.map +1 -1
  137. package/lib/core-react/text/TextProps.js.map +1 -1
  138. package/lib/core-react/tree/Branch.js +1 -1
  139. package/lib/core-react/tree/Branch.js.map +1 -1
  140. package/lib/core-react/tree/ExpansionToggle.js.map +1 -1
  141. package/lib/core-react/tree/Node.js.map +1 -1
  142. package/lib/core-react/tree/Placeholder.js +1 -1
  143. package/lib/core-react/tree/Placeholder.js.map +1 -1
  144. package/lib/core-react/tree/Tree.d.ts.map +1 -1
  145. package/lib/core-react/tree/Tree.js +4 -4
  146. package/lib/core-react/tree/Tree.js.map +1 -1
  147. package/lib/core-react/uistate/LocalStateStorage.js +1 -1
  148. package/lib/core-react/uistate/LocalStateStorage.js.map +1 -1
  149. package/lib/core-react/uistate/UiStateEntry.d.ts.map +1 -1
  150. package/lib/core-react/uistate/UiStateEntry.js +1 -1
  151. package/lib/core-react/uistate/UiStateEntry.js.map +1 -1
  152. package/lib/core-react/uistate/UiStateStorage.js.map +1 -1
  153. package/lib/core-react/utils/IconHelper.js +1 -1
  154. package/lib/core-react/utils/IconHelper.js.map +1 -1
  155. package/lib/core-react/utils/IconWebComponent.d.ts.map +1 -1
  156. package/lib/core-react/utils/IconWebComponent.js +3 -6
  157. package/lib/core-react/utils/IconWebComponent.js.map +1 -1
  158. package/lib/core-react/utils/Props.js.map +1 -1
  159. package/lib/core-react/utils/Rectangle.js.map +1 -1
  160. package/lib/core-react/utils/ScrollPositionMaintainer.js +4 -4
  161. package/lib/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
  162. package/lib/core-react/utils/Size.js.map +1 -1
  163. package/lib/core-react/utils/Timer.js +1 -1
  164. package/lib/core-react/utils/Timer.js.map +1 -1
  165. package/lib/core-react/utils/flattenChildren.d.ts.map +1 -1
  166. package/lib/core-react/utils/getBestBWContrastColor.d.ts.map +1 -1
  167. package/lib/core-react/utils/getBestBWContrastColor.js +1 -1
  168. package/lib/core-react/utils/getBestBWContrastColor.js.map +1 -1
  169. package/lib/core-react/utils/getCssVariable.js +1 -1
  170. package/lib/core-react/utils/getCssVariable.js.map +1 -1
  171. package/lib/core-react/utils/getDisplayName.d.ts.map +1 -1
  172. package/lib/core-react/utils/hooks/useCrossOriginPopup.js +1 -1
  173. package/lib/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
  174. package/lib/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
  175. package/lib/core-react/utils/hooks/useResizeObserver.js +1 -1
  176. package/lib/core-react/utils/hooks/useResizeObserver.js.map +1 -1
  177. package/lib/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
  178. package/lib/core-react/utils/shallowDiffers.d.ts.map +1 -1
  179. package/lib/core-react.js +1 -1
  180. package/lib/core-react.js.map +1 -1
  181. package/lib/esm/core-react/colorthemes.scss +0 -1
  182. package/lib/esm/core-react/colorvariables.scss +0 -2
  183. package/lib/esm/core-react/inputs/variables.scss +0 -2
  184. package/lib/esm/core-react/style/themecolors.scss +0 -2
  185. package/package.json +14 -14
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log - @itwin/core-react
2
2
 
3
- This log was last generated on Tue, 21 Jan 2025 11:38:58 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 27 Feb 2025 08:07:36 GMT and should not be manually modified.
4
+
5
+ ## 5.2.0
6
+ Thu, 27 Feb 2025 08:07:36 GMT
7
+
8
+ ### Updates
9
+
10
+ - Update `dompurify` dependency version.
11
+
12
+ ## 5.1.0
13
+ Thu, 30 Jan 2025 09:15:23 GMT
14
+
15
+ ### Updates
16
+
17
+ - cSpell fixes
4
18
 
5
19
  ## 5.0.5
6
20
  Tue, 21 Jan 2025 11:38:58 GMT
@@ -239,7 +253,7 @@ Tue, 06 Feb 2024 08:56:40 GMT
239
253
 
240
254
  - ignore appui-abstract eslint deprecation m
241
255
  - Deprecated `useDisposable` hook.
242
- - Removed appui-layout-react metions from Readme.md
256
+ - Removed appui-layout-react mentions from Readme.md
243
257
 
244
258
  ## 4.8.3
245
259
  Tue, 30 Jan 2024 09:04:27 GMT
@@ -288,7 +302,7 @@ Wed, 25 Oct 2023 09:39:22 GMT
288
302
 
289
303
  ### Updates
290
304
 
291
- - Fix broken datauri containing commas in `IconWebComponent`.
305
+ - Fix broken dataUri containing commas in `IconWebComponent`.
292
306
 
293
307
  ## 4.6.2
294
308
  Tue, 17 Oct 2023 19:16:23 GMT
@@ -564,7 +578,7 @@ Wed, 13 Jul 2022 15:45:52 GMT
564
578
 
565
579
  ### Updates
566
580
 
567
- - Added a 'repositionOnResize' property on the 'Popup' component, to avoid closing the popup everythime the browser window is resized.
581
+ - Added a 'repositionOnResize' property on the 'Popup' component, to avoid closing the popup every time the browser window is resized.
568
582
 
569
583
  ## 3.2.4
570
584
  Tue, 21 Jun 2022 18:06:33 GMT
@@ -586,7 +600,7 @@ Tue, 07 Jun 2022 15:02:56 GMT
586
600
 
587
601
  ### Updates
588
602
 
589
- - Backport change to update panel background to use same as buic-background-dialog so dispabled itwin ui components display properly.
603
+ - Backport change to update panel background to use same as buic-background-dialog so disabled itwin ui components display properly.
590
604
 
591
605
  ## 3.2.0
592
606
  Fri, 20 May 2022 13:10:54 GMT
@@ -597,7 +611,7 @@ Fri, 20 May 2022 13:10:54 GMT
597
611
  - ListBox component: `onKeyPress` has been deprecated, switch to `onKeyDown`
598
612
  - Fix for losing viewport content after clicking PW link
599
613
  - Implement svg icons loading as a web component.
600
- - Allow React icons to be used on Wedget tabs, backstage, and status bar items
614
+ - Allow React icons to be used on Widget tabs, backstage, and status bar items
601
615
 
602
616
  ## 3.1.3
603
617
  Fri, 15 Apr 2022 13:49:25 GMT
@@ -652,7 +666,7 @@ Mon, 24 Jan 2022 14:00:52 GMT
652
666
  - remove ClientRequestContext and its subclasses
653
667
  - Replace usage of I18N with generic Localization interface.
654
668
  - Update snapshots
655
- - Fix Select menu position when redered in a Popup.
669
+ - Fix Select menu position when rendered in a Popup.
656
670
  - Support for TypeDoc v0.22.7. Fix various broken docs links.
657
671
  - Deprecate obsolete code.
658
672
  - Create empty frontstage and UiItemsProviders to populate it and update how ContentGroups are defined.
@@ -1022,7 +1036,7 @@ Fri, 02 Apr 2021 13:18:42 GMT
1022
1036
 
1023
1037
  - Add SettingsManager and SettingsContainer for displaying app settings UI.
1024
1038
  - fix height in number control.
1025
- - Fix for listbox not rerendering when selectedVaue prop is changed.
1039
+ - Fix for listBox not rerendering when selectedValue prop is changed.
1026
1040
  - Add option to show/hide settings category header text.
1027
1041
  - Improved ui-components test coverage to 100%
1028
1042
  - Support for Focus into Tool Settings
@@ -1354,7 +1368,7 @@ Tue, 28 Jul 2020 16:26:24 GMT
1354
1368
  - Allowing Input component user to override the type
1355
1369
  - Fix ThemeSelect formatOptionLabel prop to return React.ReactNode.
1356
1370
  - Added Arrow key navigation in Tabs components. Added ItemKeyboardNavigator.
1357
- - Add aria props into ThemedSelectProps for accessibility. addclassName prop to ThemedSelectProps as requested for styling purposes.
1371
+ - Add aria props into ThemedSelectProps for accessibility. addClassName prop to ThemedSelectProps as requested for styling purposes.
1358
1372
  - Changed toolbar opacity processing to affect all components in widget.
1359
1373
  - Add border prop to ImageCheckBox
1360
1374
  - Replace slider specific Tooltip with generic Tooltip.
@@ -1443,7 +1457,7 @@ Wed, 06 May 2020 13:17:49 GMT
1443
1457
  - Made React functional component specifications consistent across UI packages
1444
1458
  - Slider component tooltipBelow prop & tooltip styling
1445
1459
  - Added API in MessageManager to display either a Toast or Sticky message using React components.
1446
- - Updates to remove need for svg-sprite-loader, use defualt CRA svgr loader instead.
1460
+ - Updates to remove need for svg-sprite-loader, use default CRA svgr loader instead.
1447
1461
  - Revert back to using svg-sprite-loader and sprite resourceQuery.
1448
1462
  - Upgrade to Rush 5.23.2
1449
1463
  - Fixed Safari browser issues
@@ -1471,7 +1485,7 @@ Wed, 06 May 2020 13:17:49 GMT
1471
1485
  - Added UiSetting. Saving/restoring settings in ui-test-app.
1472
1486
  - Remove support for the iModel.js module system by no longer delivering modules.
1473
1487
  - Update Select control to allow placeholder text to be re-displayed by setting value to undefined.
1474
- - set z-index on toolsettings overflow panel
1488
+ - set z-index on toolSettings overflow panel
1475
1489
 
1476
1490
  ## 1.14.1
1477
1491
  Wed, 22 Apr 2020 19:04:00 GMT
@@ -1536,7 +1550,7 @@ Fri, 22 Nov 2019 14:03:34 GMT
1536
1550
  - Update Icon package version
1537
1551
  - Fixed Dialog position after moving or resizing. Fixed sizing on Firefox for different alignments.
1538
1552
  - Implemented more efficient CSS animation for Spinner component
1539
- - Added slight delay before spinner animation. LoadingSpinnner tests in SpinnerTestDialog.
1553
+ - Added slight delay before spinner animation. LoadingSpinner tests in SpinnerTestDialog.
1540
1554
  - Tablet responsive UI
1541
1555
  - Added StatusBarComposer, StatusBarItem, StatusBarManager and StatusBarItemsManager
1542
1556
  - Added tslint-react-hooks to UI packages
@@ -1548,7 +1562,7 @@ Fri, 01 Nov 2019 13:28:37 GMT
1548
1562
 
1549
1563
  ### Updates
1550
1564
 
1551
- - Provide a generic Form component to replace the one in Design Review Saftibase and Risk Manangement stages.
1565
+ - Provide a generic Form component to replace the one in Design Review Safetibase and Risk Management stages.
1552
1566
  - Added badge support to context menu items. Moved some Plugin Ui definitions to ui-abstract.
1553
1567
  - Added support for English key-ins in addition to translated key-ins
1554
1568
  - Fix centering and sizing of dialogs in FireFox.
@@ -1586,7 +1600,7 @@ Tue, 10 Sep 2019 12:09:49 GMT
1586
1600
  - Updated inputs and button padding for iModel.js. Fixed Popup colors & z-index.
1587
1601
  - Added support for content view minSize properties
1588
1602
  - Addressed some warnings introduced with React 16.9
1589
- - Listening for onSelectedViewportChanged to set active content view for viewports
1603
+ - Listening for onSelectedViewportChanged to set active content view for viewPorts
1590
1604
  - Fixed new lint issue in getDisplayName
1591
1605
  - Allow an app to specify touch-specific instructions in tool assistance.
1592
1606
  - Add a `ScrollPositionMaintainer` helper to recursively save and restore scroll position
@@ -1711,7 +1725,7 @@ Wed, 06 Mar 2019 15:41:22 GMT
1711
1725
  - Use new buildIModelJsBuild script
1712
1726
  - Changed Checkbox container from <label> to <span>, because the former caused weird visual glitch when clicked on.
1713
1727
  - Color tweaks
1714
- - Fixed submenus, added default autoselect for hotkeys
1728
+ - Fixed submenus, added default autoSelect for hotkeys
1715
1729
  - Added tests for Dialog and Context Menu
1716
1730
  - Remove unneeded typedoc plugin dependency
1717
1731
  - Minor UI Color Theme changes
@@ -1843,10 +1857,10 @@ Mon, 03 Dec 2018 18:52:58 GMT
1843
1857
  ### Updates
1844
1858
 
1845
1859
  - Fixed Dialog modal backdrop show/hide
1846
- - Reduced the amount of unneded event calls in Dialog component and changed it to use Pointer events instead of Mouse+Touch.
1860
+ - Reduced the amount of unneeded event calls in Dialog component and changed it to use Pointer events instead of Mouse+Touch.
1847
1861
  - Added a vertical/horizontal line that is visible when hovered on ElementSeparator component.
1848
1862
  - Renamed expandable block css class from core-property-block to core-expandable-block.
1849
- - Added a way to put Popups in fixed position and cleand up the refs.
1863
+ - Added a way to put Popups in fixed position and cleaned up the refs.
1850
1864
  - Added Omit type definition to Utils.
1851
1865
  - Removed ConfigurableUiManager.addFrontstageDef and other unused/old methods and components
1852
1866
  - Add Placeholder that can be displayed instead of tree node while it's being loaded
@@ -1856,10 +1870,10 @@ Mon, 26 Nov 2018 19:38:42 GMT
1856
1870
 
1857
1871
  ### Updates
1858
1872
 
1859
- - Reduced the amount of unneded event calls in Dialog component and changed it to use Pointer events instead of Mouse+Touch.
1873
+ - Reduced the amount of unneeded event calls in Dialog component and changed it to use Pointer events instead of Mouse+Touch.
1860
1874
  - Added a vertical/horizontal line that is visible when hovered on ElementSeparator component.
1861
1875
  - Renamed expandable block css class from core-property-block to core-expandable-block.
1862
- - Added a way to put Popups in fixed position and cleand up the refs.
1876
+ - Added a way to put Popups in fixed position and cleaned up the refs.
1863
1877
  - Added Omit type definition to Utils.
1864
1878
 
1865
1879
  ## 0.169.0
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- // cspell:ignore colorvariables
6
5
 
7
6
  /** @note: This file should only be imported by UiCore.ts.
8
7
  * It should NOT be imported by any *.scss or other ui-core files.
@@ -3,8 +3,6 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
 
6
- // cspell:ignore mediumgray titlebar toolbutton outoffocus
7
-
8
6
  /** @note: This file should only be imported by UiCore.ts.
9
7
  * It should NOT be imported by any *.scss or other ui-core files.
10
8
  */
@@ -5,8 +5,6 @@
5
5
  @forward "../style/baseline";
6
6
  @forward "../style/themecolors";
7
7
 
8
- // cspell:ignore unbordered
9
-
10
8
  $uicore-inputs-height: 22px;
11
9
  $uicore-inputs-height-large: 40px;
12
10
  $uicore-line-height: calc(var(--iui-size-s) * 1.4);
@@ -3,8 +3,6 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
 
6
- // cspell:ignore scrollbar titlebar toolbutton outoffocus boxshadow mediumgray
7
-
8
6
  $buic-background-1: var(--buic-background-1);
9
7
  $buic-background-2: var(--buic-background-2);
10
8
  $buic-background-3: var(--buic-background-3);
@@ -11,7 +11,7 @@ import "./colorvariables.scss";
11
11
  import "./layout-variables.scss";
12
12
  import "./classes.scss";
13
13
  import { Logger } from "@itwin/core-bentley";
14
- /* eslint-disable deprecation/deprecation */
14
+ /* eslint-disable @typescript-eslint/no-deprecated */
15
15
  /** Manages the Localization service for the core-react package.
16
16
  * @public
17
17
  * @deprecated in 4.16.0. `@itwin/core-react` package is deprecated, see used modules for suggested replacements.
@@ -1 +1 @@
1
- {"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,4CAA4C;AAE5C;;;GAGG;AACH,MAAM,OAAO,MAAM;IAIjB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;YACxB,MAAM,CAAC,OAAO,CACZ,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,EAC/B,kCAAkC,CACnC,CAAC;YACF,OAAO;QACT,CAAC;QAED,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC;QACpC,MAAM,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAE3E,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,IAAI,MAAM,CAAC,aAAa;YACtB,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACzE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;QAEjC,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,gDAAgD;IACzC,MAAM,KAAK,WAAW;QAC3B,OAAO,MAAM,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YAC1B,MAAM,CAAC,QAAQ,CACb,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,EAC/B,4FAA4F,CAC7F,CAAC;YACF,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAC5C,GAAG,MAAM,CAAC,qBAAqB,IAAI,GAAG,EAAE,CACzC,CAAC;IACJ,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,IAAY;QACvC,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;IACzC,CAAC;;AAlEc,mBAAY,GAAG,KAAK,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 Utilities\n */\n\n/** Import color variables, layout variables and Sass classes barrel file */\nimport \"./colorthemes.scss\";\nimport \"./colorvariables.scss\";\nimport \"./layout-variables.scss\";\nimport \"./classes.scss\";\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Manages the Localization service for the core-react package.\n * @public\n * @deprecated in 4.16.0. `@itwin/core-react` package is deprecated, see used modules for suggested replacements.\n */\nexport class UiCore {\n private static _initialized = false;\n private static _localization?: Localization;\n\n /**\n * Registers the Localization service namespace for UiCore.\n * @param localization The internationalization service created by the host application.\n */\n public static async initialize(localization: Localization): Promise<void> {\n if (UiCore._initialized) {\n Logger.logInfo(\n UiCore.loggerCategory(\"UiCore\"),\n `UiCore.initialize already called`\n );\n return;\n }\n\n UiCore._localization = localization;\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\n\n UiCore._initialized = true;\n }\n\n /** Unregisters the UiCore localization namespace */\n public static terminate() {\n if (UiCore._localization)\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\n UiCore._localization = undefined;\n\n UiCore._initialized = false;\n }\n\n /** Determines if UiCore has been initialized */\n public static get initialized(): boolean {\n return UiCore._initialized;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiCore\";\n }\n\n /** Calls localization.getLocalizedString with the \"UiCore\" namespace. Do NOT include the namespace in the key.\n * @deprecated in 4.12.0. Do not use this internally, this is replaced by `useTranslation`.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiCore._localization) {\n Logger.logError(\n UiCore.loggerCategory(\"UiCore\"),\n `translate: UiCore must be initialize with a localization provider. Returning blank string.`\n );\n return \"\";\n }\n return UiCore._localization.getLocalizedString(\n `${UiCore.localizationNamespace}:${key}`\n );\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"core-react\";\n }\n\n /** @internal */\n public static loggerCategory(name: string): string {\n return `${UiCore.packageName}.${name}`;\n }\n}\n"]}
1
+ {"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,qDAAqD;AAErD;;;GAGG;AACH,MAAM,OAAO,MAAM;IAIjB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;YACxB,MAAM,CAAC,OAAO,C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c,mBAAY,GAAG,KAAK,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 Utilities\n */\n\n/** Import color variables, layout variables and Sass classes barrel file */\nimport \"./colorthemes.scss\";\nimport \"./colorvariables.scss\";\nimport \"./layout-variables.scss\";\nimport \"./classes.scss\";\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Manages the Localization service for the core-react package.\n * @public\n * @deprecated in 4.16.0. `@itwin/core-react` package is deprecated, see used modules for suggested replacements.\n */\nexport class UiCore {\n private static _initialized = false;\n private static _localization?: Localization;\n\n /**\n * Registers the Localization service namespace for UiCore.\n * @param localization The internationalization service created by the host application.\n */\n public static async initialize(localization: Localization): Promise<void> {\n if (UiCore._initialized) {\n Logger.logInfo(\n UiCore.loggerCategory(\"UiCore\"),\n `UiCore.initialize already called`\n );\n return;\n }\n\n UiCore._localization = localization;\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\n\n UiCore._initialized = true;\n }\n\n /** Unregisters the UiCore localization namespace */\n public static terminate() {\n if (UiCore._localization)\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\n UiCore._localization = undefined;\n\n UiCore._initialized = false;\n }\n\n /** Determines if UiCore has been initialized */\n public static get initialized(): boolean {\n return UiCore._initialized;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiCore\";\n }\n\n /** Calls localization.getLocalizedString with the \"UiCore\" namespace. Do NOT include the namespace in the key.\n * @deprecated in 4.12.0. Do not use this internally, this is replaced by `useTranslation`.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiCore._localization) {\n Logger.logError(\n UiCore.loggerCategory(\"UiCore\"),\n `translate: UiCore must be initialize with a localization provider. Returning blank string.`\n );\n return \"\";\n }\n return UiCore._localization.getLocalizedString(\n `${UiCore.localizationNamespace}:${key}`\n );\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"core-react\";\n }\n\n /** @internal */\n public static loggerCategory(name: string): string {\n return `${UiCore.packageName}.${name}`;\n }\n}\n"]}
@@ -76,6 +76,7 @@ export declare class AutoSuggest extends React.PureComponent<AutoSuggestProps, A
76
76
  constructor(props: AutoSuggestProps);
77
77
  componentDidMount(): void;
78
78
  componentWillUnmount(): void;
79
+ /** @internal */
79
80
  componentDidUpdate(prevProps: AutoSuggestProps): void;
80
81
  private _onChange;
81
82
  private _onFocus;
@@ -1 +1 @@
1
- {"version":3,"file":"AutoSuggest.d.ts","sourceRoot":"","sources":["../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,EAAE,CAAC;AAE1E;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EACjD,WAAW;IACb,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,eAAe,EAAE,GAAG,sBA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,qBAAa,WAAY,SAAQ,KAAK,CAAC,aAAa,CAClD,gBAAgB,EAChB,gBAAgB,CACjB;IACC,OAAO,CAAC,UAAU,CAAS;gBAEf,KAAK,EAAE,gBAAgB;IAcnB,iBAAiB;IAIjB,oBAAoB;IAIpC,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,gBAAgB;IAW9D,OAAO,CAAC,SAAS,CAUf;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,qFAAqF;IACrF,OAAO,CAAC,4BAA4B,CAOlC;IAEF,oFAAoF;IACpF,OAAO,CAAC,4BAA4B,CAIlC;IAEF,OAAO,CAAC,qBAAqB,CAK3B;IAEF,gFAAgF;IAChF,OAAO,CAAC,eAAe,CA6BrB;IAEF,4GAA4G;IAC5G,OAAO,CAAC,mBAAmB,CACR;IAEnB,8BAA8B;IAC9B,OAAO,CAAC,iBAAiB,CAEvB;IAEF,OAAO,CAAC,QAAQ;IAoBhB,OAAO,CAAC,cAAc,CAYpB;IAEF,OAAO,CAAC,MAAM,CAeZ;IAEc,MAAM,IAAI,KAAK,CAAC,YAAY;CAgE7C"}
@@ -121,6 +121,7 @@ export class AutoSuggest extends React.PureComponent {
121
121
  componentWillUnmount() {
122
122
  this._isMounted = false;
123
123
  }
124
+ /** @internal */
124
125
  componentDidUpdate(prevProps) {
125
126
  if (this.props.value !== prevProps.value ||
126
127
  this.props.options !== prevProps.options) {
@@ -1 +1 @@
1
- {"version":3,"file":"AutoSuggest.js","sourceRoot":"","sources":["../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AACjD,OAA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AI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,cAAc;YAE9B,oBAAC,gBAAgB,IACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,WAAW,EACxB,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,kBAAkB,EAAE,IAAI,CAAC,mBAAmB,EAC5C,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EACxC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,uBAAuB,EAAE,uBAAuB,EAChD,oBAAoB,EAClB,oBAAoB,IAAI,2BAA2B,EAErD,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,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 AutoSuggest\n */\n\nimport \"./AutoSuggest.scss\";\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport ReactAutosuggest from \"react-autosuggest\";\nimport { Key } from \"ts-key-enum\";\nimport type { CommonProps } from \"../utils/Props.js\";\nimport { UiCore } from \"../UiCore.js\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Data for the [[AutoSuggest]] options\n * @public\n * @deprecated in 4.16.0. Used in a deprecated interface {@link AutoSuggestProps}.\n */\nexport interface AutoSuggestData {\n /** Value of [[AutoSuggest]] option. */\n value: string;\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\n label: string;\n}\n\n/** Prototype for function returning AutoSuggestData\n * @public\n * @deprecated in 4.16.0. Used in a deprecated interface {@link AutoSuggestProps}.\n */\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\n\n/** Prototype for async function returning AutoSuggestData\n * @public\n * @deprecated in 4.16.0. Used in a deprecated interface {@link AutoSuggestProps}.\n */\nexport type AsyncGetAutoSuggestDataFunc = (\n value: string\n) => Promise<AutoSuggestData[]>;\n\n/** Properties for the [[AutoSuggest]] component.\n * @public\n * @deprecated in 4.16.0. Props of deprecated {@link AutoSuggest} component.\n */\nexport interface AutoSuggestProps\n extends React.InputHTMLAttributes<HTMLInputElement>,\n CommonProps {\n /** Optional input value override. */\n value?: string;\n /** Options for dropdown. */\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\n /** Asynchronously calculate suggestions for any given input value. */\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\n /** Gets a label associated with a given value */\n getLabel?: (value: string | undefined) => string;\n /** Handler for when suggested selected. */\n onSuggestionSelected: (selected: AutoSuggestData) => void;\n /** Handler for Enter key. */\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Escape key. */\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Tab key. */\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for input receiving focus. */\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\n /** Called every time you need to clear suggestions. */\n onSuggestionsClearRequested?: () => void;\n /** Indicates whether to set focus to the input element */\n setFocus?: boolean;\n\n /** Use it only if you need to customize the rendering of the input.\n * @internal\n */\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\n * @internal\n */\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\n\n /** @internal */\n alwaysRenderSuggestions?: boolean;\n}\n\ninterface AutoSuggestState {\n inputValue: string;\n suggestions: AutoSuggestData[];\n}\n\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\n * @public\n * @deprecated in 4.16.0. Use {@link https://itwinui.bentley.com/ iTwinUI components} instead.\n */\nexport class AutoSuggest extends React.PureComponent<\n AutoSuggestProps,\n AutoSuggestState\n> {\n private _isMounted = false;\n\n constructor(props: AutoSuggestProps) {\n super(props);\n\n // Autosuggest is a controlled component.\n // This means that you need to provide an input value\n // and an onChange handler that updates this value (see below).\n // Suggestions also need to be provided to the Autosuggest,\n // and they are initially empty because the Autosuggest is closed.\n this.state = {\n inputValue: this.getLabel(props.value),\n suggestions: [],\n };\n }\n\n public override componentDidMount() {\n this._isMounted = true;\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\n if (\n this.props.value !== prevProps.value ||\n this.props.options !== prevProps.options\n ) {\n this.setState((_prevState, props) => ({\n inputValue: this.getLabel(props.value),\n }));\n }\n }\n\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n let newValue = \"\";\n\n if (e.target.tagName === \"LI\" && e.target.textContent)\n newValue = e.target.textContent;\n else if (e.target.value) newValue = e.target.value;\n\n this.setState({\n inputValue: newValue,\n });\n };\n\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (this.props.onInputFocus) this.props.onInputFocus(e);\n };\n\n /** Autosuggest will call this function every time you need to update suggestions. */\n private _onSuggestionsFetchRequested = async (\n request: ReactAutosuggest.SuggestionsFetchRequestedParams\n ): Promise<void> => {\n const value = request.value;\n const suggestions = await this._getSuggestions(value);\n\n if (this._isMounted) this.setState({ suggestions });\n };\n\n /** Autosuggest will call this function every time you need to clear suggestions. */\n private _onSuggestionsClearRequested = () => {\n this.setState({ suggestions: [] });\n this.props.onSuggestionsClearRequested &&\n this.props.onSuggestionsClearRequested();\n };\n\n private _onSuggestionSelected = (\n _event: React.FormEvent<any>,\n data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>\n ): void => {\n this.props.onSuggestionSelected(data.suggestion);\n };\n\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\n private _getSuggestions = async (\n value: string\n ): Promise<AutoSuggestData[]> => {\n if (typeof this.props.options === \"function\")\n return Promise.resolve(this.props.options(value));\n\n if (this.props.getSuggestions) return this.props.getSuggestions(value);\n\n if (this.props.options === undefined) {\n Logger.logError(\n UiCore.loggerCategory(\"AutoSuggest\"),\n `props.options or props.getSuggestions should be provided`\n );\n return Promise.resolve([]);\n }\n\n const inputValue = value.trim().toLowerCase();\n const inputLength = inputValue.length;\n\n return Promise.resolve(\n inputLength === 0\n ? []\n : this.props.options.filter((data: AutoSuggestData) => {\n return (\n data.label.toLowerCase().includes(inputValue) ||\n data.value.toLowerCase().includes(inputValue)\n );\n })\n );\n };\n\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\n private _getSuggestionValue = (suggestion: AutoSuggestData) =>\n suggestion.label;\n\n /** Render each suggestion. */\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\n <span>{suggestion.label}</span>\n );\n\n private getLabel(value: string | undefined): string {\n let label = \"\";\n\n if (this.props.getLabel) {\n label = this.props.getLabel(value);\n } else if (this.props.options instanceof Array) {\n const entry = this.props.options.find(\n (data: AutoSuggestData) => data.value === value\n );\n if (entry) label = entry.label;\n } else {\n Logger.logError(\n UiCore.loggerCategory(\"AutoSuggest\"),\n `props.getLabel should be provided when props.options is a function`\n );\n }\n\n return label;\n }\n\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case Key.Enter.valueOf():\n if (this.props.onPressEnter) this.props.onPressEnter(e);\n break;\n case Key.Escape.valueOf():\n if (this.props.onPressEscape) this.props.onPressEscape(e);\n break;\n case Key.Tab.valueOf():\n if (this.props.onPressTab) this.props.onPressTab(e);\n break;\n }\n };\n\n private _theme = {\n container: \"uicore-autosuggest__container\",\n containerOpen: \"uicore-autosuggest__container--open\",\n input: \"uicore-autosuggest__input\",\n inputOpen: \"uicore-autosuggest__input--open\",\n inputFocused: \"uicore-autosuggest__input--focused\",\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\n suggestion: \"uicore-autosuggest__suggestion\",\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\n sectionContainer: \"uicore-autosuggest__section-container\",\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\n sectionTitle: \"uicore-autosuggest__section-title\",\n };\n\n public override render(): React.ReactElement {\n const { inputValue, suggestions } = this.state;\n const {\n value,\n onChange,\n placeholder,\n options,\n onSuggestionSelected,\n setFocus,\n alwaysRenderSuggestions,\n onPressEnter,\n onPressEscape,\n onPressTab,\n onInputFocus,\n getLabel,\n getSuggestions,\n renderInputComponent,\n renderSuggestionsContainer,\n onSuggestionsClearRequested,\n ...props\n } = this.props;\n const inputPlaceholder = !inputValue ? placeholder : undefined;\n\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\n ...props,\n value: inputValue,\n onChange: this._onChange,\n onFocus: this._onFocus,\n placeholder: inputPlaceholder,\n autoFocus: setFocus,\n };\n\n const defaultRenderInputComponent: React.ComponentProps<\n typeof ReactAutosuggest\n >[\"renderInputComponent\"] = (renderInputProps) => {\n const { size, ...other } = renderInputProps;\n return <Input {...other} />;\n };\n return (\n // The onKeyDown event handler is only being used to capture bubbled events\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={this.props.className}\n style={this.props.style}\n onKeyDown={this._handleKeyDown}\n >\n <ReactAutosuggest\n theme={this._theme}\n suggestions={suggestions}\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\n getSuggestionValue={this._getSuggestionValue}\n renderSuggestion={this._renderSuggestion}\n inputProps={inputProps}\n onSuggestionSelected={this._onSuggestionSelected}\n alwaysRenderSuggestions={alwaysRenderSuggestions}\n renderInputComponent={\n renderInputComponent || defaultRenderInputComponent\n }\n renderSuggestionsContainer={renderSuggestionsContainer}\n />\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"AutoSuggest.js","sourceRoot":"","sources":["../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA6EtC;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,aAGtC;IAGC,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,eAAU,GAAG,KAAK,CAAC;QAoCnB,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,IAAI,QAAQ,GAAG,EAAE,CAAC;YAElB,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW;gBACnD,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;iBAC7B,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK;gBAAE,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAEnD,IAAI,CAAC,QAAQ,CAAC;gBACZ,UAAU,EAAE,QAAQ;aACrB,CAAC,CAAC;QACL,CAAC,CAAC;QAEM,aAAQ,GAAG,CAAC,CAAqC,EAAE,EAAE;YAC3D,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC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AAI,CAAC,SAAS;YACxB,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,WAAW,EAAE,gBAAgB;YAC7B,SAAS,EAAE,QAAQ;SACpB,CAAC;QAEF,MAAM,2BAA2B,GAEL,CAAC,gBAAgB,EAAE,EAAE;YAC/C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,gBAAgB,CAAC;YAC5C,OAAO,oBAAC,KAAK,OAAK,KAAK,GAAI,CAAC;QAC9B,CAAC,CAAC;QACF,OAAO;QACL,2EAA2E;QAC3E,mEAAmE;QACnE,6BACE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,cAAc;YAE9B,oBAAC,gBAAgB,IACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,WAAW,EACxB,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,kBAAkB,EAAE,IAAI,CAAC,mBAAmB,EAC5C,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EACxC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,uBAAuB,EAAE,uBAAuB,EAChD,oBAAoB,EAClB,oBAAoB,IAAI,2BAA2B,EAErD,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,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 AutoSuggest\n */\n\nimport \"./AutoSuggest.scss\";\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport ReactAutosuggest from \"react-autosuggest\";\nimport { Key } from \"ts-key-enum\";\nimport type { CommonProps } from \"../utils/Props.js\";\nimport { UiCore } from \"../UiCore.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Data for the [[AutoSuggest]] options\n * @public\n * @deprecated in 4.16.0. Used in a deprecated interface {@link AutoSuggestProps}.\n */\nexport interface AutoSuggestData {\n /** Value of [[AutoSuggest]] option. */\n value: string;\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\n label: string;\n}\n\n/** Prototype for function returning AutoSuggestData\n * @public\n * @deprecated in 4.16.0. Used in a deprecated interface {@link AutoSuggestProps}.\n */\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\n\n/** Prototype for async function returning AutoSuggestData\n * @public\n * @deprecated in 4.16.0. Used in a deprecated interface {@link AutoSuggestProps}.\n */\nexport type AsyncGetAutoSuggestDataFunc = (\n value: string\n) => Promise<AutoSuggestData[]>;\n\n/** Properties for the [[AutoSuggest]] component.\n * @public\n * @deprecated in 4.16.0. Props of deprecated {@link AutoSuggest} component.\n */\nexport interface AutoSuggestProps\n extends React.InputHTMLAttributes<HTMLInputElement>,\n CommonProps {\n /** Optional input value override. */\n value?: string;\n /** Options for dropdown. */\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\n /** Asynchronously calculate suggestions for any given input value. */\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\n /** Gets a label associated with a given value */\n getLabel?: (value: string | undefined) => string;\n /** Handler for when suggested selected. */\n onSuggestionSelected: (selected: AutoSuggestData) => void;\n /** Handler for Enter key. */\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Escape key. */\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for Tab key. */\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n /** Handler for input receiving focus. */\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\n /** Called every time you need to clear suggestions. */\n onSuggestionsClearRequested?: () => void;\n /** Indicates whether to set focus to the input element */\n setFocus?: boolean;\n\n /** Use it only if you need to customize the rendering of the input.\n * @internal\n */\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\n * @internal\n */\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\n\n /** @internal */\n alwaysRenderSuggestions?: boolean;\n}\n\ninterface AutoSuggestState {\n inputValue: string;\n suggestions: AutoSuggestData[];\n}\n\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\n * @public\n * @deprecated in 4.16.0. Use {@link https://itwinui.bentley.com/ iTwinUI components} instead.\n */\nexport class AutoSuggest extends React.PureComponent<\n AutoSuggestProps,\n AutoSuggestState\n> {\n private _isMounted = false;\n\n constructor(props: AutoSuggestProps) {\n super(props);\n\n // Autosuggest is a controlled component.\n // This means that you need to provide an input value\n // and an onChange handler that updates this value (see below).\n // Suggestions also need to be provided to the Autosuggest,\n // and they are initially empty because the Autosuggest is closed.\n this.state = {\n inputValue: this.getLabel(props.value),\n suggestions: [],\n };\n }\n\n public override componentDidMount() {\n this._isMounted = true;\n }\n\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\n if (\n this.props.value !== prevProps.value ||\n this.props.options !== prevProps.options\n ) {\n this.setState((_prevState, props) => ({\n inputValue: this.getLabel(props.value),\n }));\n }\n }\n\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n let newValue = \"\";\n\n if (e.target.tagName === \"LI\" && e.target.textContent)\n newValue = e.target.textContent;\n else if (e.target.value) newValue = e.target.value;\n\n this.setState({\n inputValue: newValue,\n });\n };\n\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (this.props.onInputFocus) this.props.onInputFocus(e);\n };\n\n /** Autosuggest will call this function every time you need to update suggestions. */\n private _onSuggestionsFetchRequested = async (\n request: ReactAutosuggest.SuggestionsFetchRequestedParams\n ): Promise<void> => {\n const value = request.value;\n const suggestions = await this._getSuggestions(value);\n\n if (this._isMounted) this.setState({ suggestions });\n };\n\n /** Autosuggest will call this function every time you need to clear suggestions. */\n private _onSuggestionsClearRequested = () => {\n this.setState({ suggestions: [] });\n this.props.onSuggestionsClearRequested &&\n this.props.onSuggestionsClearRequested();\n };\n\n private _onSuggestionSelected = (\n _event: React.FormEvent<any>,\n data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>\n ): void => {\n this.props.onSuggestionSelected(data.suggestion);\n };\n\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\n private _getSuggestions = async (\n value: string\n ): Promise<AutoSuggestData[]> => {\n if (typeof this.props.options === \"function\")\n return Promise.resolve(this.props.options(value));\n\n if (this.props.getSuggestions) return this.props.getSuggestions(value);\n\n if (this.props.options === undefined) {\n Logger.logError(\n UiCore.loggerCategory(\"AutoSuggest\"),\n `props.options or props.getSuggestions should be provided`\n );\n return Promise.resolve([]);\n }\n\n const inputValue = value.trim().toLowerCase();\n const inputLength = inputValue.length;\n\n return Promise.resolve(\n inputLength === 0\n ? []\n : this.props.options.filter((data: AutoSuggestData) => {\n return (\n data.label.toLowerCase().includes(inputValue) ||\n data.value.toLowerCase().includes(inputValue)\n );\n })\n );\n };\n\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\n private _getSuggestionValue = (suggestion: AutoSuggestData) =>\n suggestion.label;\n\n /** Render each suggestion. */\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\n <span>{suggestion.label}</span>\n );\n\n private getLabel(value: string | undefined): string {\n let label = \"\";\n\n if (this.props.getLabel) {\n label = this.props.getLabel(value);\n } else if (this.props.options instanceof Array) {\n const entry = this.props.options.find(\n (data: AutoSuggestData) => data.value === value\n );\n if (entry) label = entry.label;\n } else {\n Logger.logError(\n UiCore.loggerCategory(\"AutoSuggest\"),\n `props.getLabel should be provided when props.options is a function`\n );\n }\n\n return label;\n }\n\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n switch (e.key) {\n case Key.Enter.valueOf():\n if (this.props.onPressEnter) this.props.onPressEnter(e);\n break;\n case Key.Escape.valueOf():\n if (this.props.onPressEscape) this.props.onPressEscape(e);\n break;\n case Key.Tab.valueOf():\n if (this.props.onPressTab) this.props.onPressTab(e);\n break;\n }\n };\n\n private _theme = {\n container: \"uicore-autosuggest__container\",\n containerOpen: \"uicore-autosuggest__container--open\",\n input: \"uicore-autosuggest__input\",\n inputOpen: \"uicore-autosuggest__input--open\",\n inputFocused: \"uicore-autosuggest__input--focused\",\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\n suggestion: \"uicore-autosuggest__suggestion\",\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\n sectionContainer: \"uicore-autosuggest__section-container\",\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\n sectionTitle: \"uicore-autosuggest__section-title\",\n };\n\n public override render(): React.ReactElement {\n const { inputValue, suggestions } = this.state;\n const {\n value,\n onChange,\n placeholder,\n options,\n onSuggestionSelected,\n setFocus,\n alwaysRenderSuggestions,\n onPressEnter,\n onPressEscape,\n onPressTab,\n onInputFocus,\n getLabel,\n getSuggestions,\n renderInputComponent,\n renderSuggestionsContainer,\n onSuggestionsClearRequested,\n ...props\n } = this.props;\n const inputPlaceholder = !inputValue ? placeholder : undefined;\n\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\n ...props,\n value: inputValue,\n onChange: this._onChange,\n onFocus: this._onFocus,\n placeholder: inputPlaceholder,\n autoFocus: setFocus,\n };\n\n const defaultRenderInputComponent: React.ComponentProps<\n typeof ReactAutosuggest\n >[\"renderInputComponent\"] = (renderInputProps) => {\n const { size, ...other } = renderInputProps;\n return <Input {...other} />;\n };\n return (\n // The onKeyDown event handler is only being used to capture bubbled events\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={this.props.className}\n style={this.props.style}\n onKeyDown={this._handleKeyDown}\n >\n <ReactAutosuggest\n theme={this._theme}\n suggestions={suggestions}\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\n getSuggestionValue={this._getSuggestionValue}\n renderSuggestion={this._renderSuggestion}\n inputProps={inputProps}\n onSuggestionSelected={this._onSuggestionSelected}\n alwaysRenderSuggestions={alwaysRenderSuggestions}\n renderInputComponent={\n renderInputComponent || defaultRenderInputComponent\n }\n renderSuggestionsContainer={renderSuggestionsContainer}\n />\n </div>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAWvD;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,EAAc;IACxC,IAAI,IAAI,KAAK,SAAS,CAAC,gBAAgB,IAAI,IAAI,KAAK,mBAAmB;QACrE,OAAO,oBAAC,qBAAqB,OAAG,CAAC;IACnC,IAAI,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,oBAAC,QAAQ,OAAG,CAAC;IAClE,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,oBAAC,eAAe,OAAG,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,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 Utilities\n */\n\nimport * as React from \"react\";\nimport type { BadgeKind } from \"./BadgeType.js\";\nimport { BadgeType } from \"./BadgeType.js\";\nimport { TechnicalPreviewBadge } from \"./TechnicalPreviewBadge.js\";\nimport { NewBadge } from \"./NewBadge.js\";\nimport { DeprecatedBadge } from \"./DeprecatedBadge.js\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for the {@link Badge} component.\n * @internal\n */\nexport interface BadgeProps {\n type?: BadgeType | BadgeKind;\n}\n\n/** Badge component that renders based on a badge type.\n * @internal\n */\nexport function Badge({ type }: BadgeProps) {\n if (type === BadgeType.TechnicalPreview || type === \"technical-preview\")\n return <TechnicalPreviewBadge />;\n if (type === BadgeType.New || type === \"new\") return <NewBadge />;\n if (type === \"deprecated\") return <DeprecatedBadge />;\n return null;\n}\n"]}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/core-react/badge/Badge.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAWvD;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,EAAc;IACxC,IAAI,IAAI,KAAK,SAAS,CAAC,gBAAgB,IAAI,IAAI,KAAK,mBAAmB;QACrE,OAAO,oBAAC,qBAAqB,OAAG,CAAC;IACnC,IAAI,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,oBAAC,QAAQ,OAAG,CAAC;IAClE,IAAI,IAAI,KAAK,YAAY;QAAE,OAAO,oBAAC,eAAe,OAAG,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,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 Utilities\n */\n\nimport * as React from \"react\";\nimport type { BadgeKind } from \"./BadgeType.js\";\nimport { BadgeType } from \"./BadgeType.js\";\nimport { TechnicalPreviewBadge } from \"./TechnicalPreviewBadge.js\";\nimport { NewBadge } from \"./NewBadge.js\";\nimport { DeprecatedBadge } from \"./DeprecatedBadge.js\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Properties for the {@link Badge} component.\n * @internal\n */\nexport interface BadgeProps {\n type?: BadgeType | BadgeKind;\n}\n\n/** Badge component that renders based on a badge type.\n * @internal\n */\nexport function Badge({ type }: BadgeProps) {\n if (type === BadgeType.TechnicalPreview || type === \"technical-preview\")\n return <TechnicalPreviewBadge />;\n if (type === BadgeType.New || type === \"new\") return <NewBadge />;\n if (type === \"deprecated\") return <DeprecatedBadge />;\n return null;\n}\n"]}
@@ -9,7 +9,7 @@ import { BadgeType as _BadgeType } from "@itwin/appui-abstract";
9
9
  export type BadgeType = _BadgeType;
10
10
  /** Specifies type of badge, if any, that should be overlaid on UI component.
11
11
  * @public
12
- * @deprecated in 4.16.0. Usevalues from badge kind string union instead.
12
+ * @deprecated in 4.16.0. UseValues from badge kind string union instead.
13
13
  */
14
14
  export declare const BadgeType: typeof _BadgeType;
15
15
  /** Type of badge that should be overlaid on UI component.
@@ -8,7 +8,7 @@
8
8
  import { BadgeType as _BadgeType } from "@itwin/appui-abstract";
9
9
  /** Specifies type of badge, if any, that should be overlaid on UI component.
10
10
  * @public
11
- * @deprecated in 4.16.0. Usevalues from badge kind string union instead.
11
+ * @deprecated in 4.16.0. UseValues from badge kind string union instead.
12
12
  */
13
13
  export const BadgeType = _BadgeType; // eslint-disable-line @typescript-eslint/no-redeclare
14
14
  //# sourceMappingURL=BadgeType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeType.js","sourceRoot":"","sources":["../../../src/core-react/badge/BadgeType.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAQhE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,sDAAsD","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 Utilities\n */\n\nimport { BadgeType as _BadgeType } from \"@itwin/appui-abstract\";\n\n/** Specifies type of badge, if any, that should be overlaid on UI component.\n * @public\n * @deprecated in 4.16.0. Use values from badge kind string union instead.\n */\nexport type BadgeType = _BadgeType;\n\n/** Specifies type of badge, if any, that should be overlaid on UI component.\n * @public\n * @deprecated in 4.16.0. Usevalues from badge kind string union instead.\n */\nexport const BadgeType = _BadgeType; // eslint-disable-line @typescript-eslint/no-redeclare\n\n/** Type of badge that should be overlaid on UI component.\n * @internal\n */\nexport type BadgeKind =\n | \"technical-preview\"\n | \"new\"\n | \"deprecated\"\n | (string & {});\n"]}
1
+ {"version":3,"file":"BadgeType.js","sourceRoot":"","sources":["../../../src/core-react/badge/BadgeType.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAQhE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,sDAAsD","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 Utilities\n */\n\nimport { BadgeType as _BadgeType } from \"@itwin/appui-abstract\";\n\n/** Specifies type of badge, if any, that should be overlaid on UI component.\n * @public\n * @deprecated in 4.16.0. Use values from badge kind string union instead.\n */\nexport type BadgeType = _BadgeType;\n\n/** Specifies type of badge, if any, that should be overlaid on UI component.\n * @public\n * @deprecated in 4.16.0. UseValues from badge kind string union instead.\n */\nexport const BadgeType = _BadgeType; // eslint-disable-line @typescript-eslint/no-redeclare\n\n/** Type of badge that should be overlaid on UI component.\n * @internal\n */\nexport type BadgeKind =\n | \"technical-preview\"\n | \"new\"\n | \"deprecated\"\n | (string & {});\n"]}
@@ -12,9 +12,9 @@ import { Div } from "./Div.js";
12
12
  * @public
13
13
  * @deprecated in 4.12.0. Use CSS to style an element or {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead, i.e. `<Flex justifyContent="center" />`.
14
14
  */
15
- // eslint-disable-next-line deprecation/deprecation
15
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
16
16
  export function Centered(props) {
17
- // eslint-disable-next-line deprecation/deprecation
17
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
18
18
  return React.createElement(Div, { ...props, mainClassName: "uicore-centered" });
19
19
  }
20
20
  //# sourceMappingURL=Centered.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Centered.js","sourceRoot":"","sources":["../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;GAIG;AACH,mDAAmD;AACnD,MAAM,UAAU,QAAQ,CAAC,KAAqB;IAC5C,mDAAmD;IACnD,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,iBAAiB,GAAG,CAAC;AAC5D,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Centered React functional component.\n * Displays content centered vertically and horizontally.\n * @public\n * @deprecated in 4.12.0. Use CSS to style an element or {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead, i.e. `<Flex justifyContent=\"center\" />`.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function Centered(props: CommonDivProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <Div {...props} mainClassName=\"uicore-centered\" />;\n}\n"]}
1
+ {"version":3,"file":"Centered.js","sourceRoot":"","sources":["../../../src/core-react/base/Centered.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;GAIG;AACH,4DAA4D;AAC5D,MAAM,UAAU,QAAQ,CAAC,KAAqB;IAC5C,4DAA4D;IAC5D,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,iBAAiB,GAAG,CAAC;AAC5D,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Centered React functional component.\n * Displays content centered vertically and horizontally.\n * @public\n * @deprecated in 4.12.0. Use CSS to style an element or {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead, i.e. `<Flex justifyContent=\"center\" />`.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function Centered(props: CommonDivProps) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return <Div {...props} mainClassName=\"uicore-centered\" />;\n}\n"]}
@@ -11,7 +11,7 @@ import * as React from "react";
11
11
  * @public
12
12
  * @deprecated in 4.12.0. Use HTMLDivElement instead i.e. `<div />`.
13
13
  */
14
- // eslint-disable-next-line deprecation/deprecation
14
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
15
15
  export function Div(props) {
16
16
  const { mainClassName, className, style, children, ...divProps } = props;
17
17
  return (React.createElement("div", { ...divProps, className: classnames(mainClassName, className), style: style }, children));
@@ -1 +1 @@
1
- {"version":3,"file":"Div.js","sourceRoot":"","sources":["../../../src/core-react/base/Div.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL,gCACM,QAAQ,EACZ,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACL,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 Base\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\n\n/** Properties for the [[Div]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link Div}.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface DivProps extends CommonDivProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** Base div element React component\n * @public\n * @deprecated in 4.12.0. Use HTMLDivElement instead i.e. `<div />`.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function Div(props: DivProps) {\n const { mainClassName, className, style, children, ...divProps } = props;\n\n return (\n <div\n {...divProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Div.js","sourceRoot":"","sources":["../../../src/core-react/base/Div.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;GAGG;AACH,4DAA4D;AAC5D,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL,gCACM,QAAQ,EACZ,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACL,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 Base\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\n\n/** Properties for the [[Div]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link Div}.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DivProps extends CommonDivProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** Base div element React component\n * @public\n * @deprecated in 4.12.0. Use HTMLDivElement instead i.e. `<div />`.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function Div(props: DivProps) {\n const { mainClassName, className, style, children, ...divProps } = props;\n\n return (\n <div\n {...divProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </div>\n );\n}\n"]}
@@ -9,7 +9,7 @@ import type { CommonDivProps } from "../utils/Props.js";
9
9
  */
10
10
  export declare const DivWithOutsideClick: {
11
11
  new (props: CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps): {
12
- outsideClickContainerDiv?: HTMLDivElement | null | undefined;
12
+ outsideClickContainerDiv?: HTMLDivElement | null;
13
13
  isDownOutside: boolean;
14
14
  isInCorePopup(element: HTMLElement): boolean;
15
15
  onOutsideClick(e: MouseEvent): any;
@@ -41,7 +41,7 @@ export declare const DivWithOutsideClick: {
41
41
  UNSAFE_componentWillUpdate?(nextProps: Readonly<CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps>, nextState: Readonly<{}>, nextContext: any): void;
42
42
  };
43
43
  new (props: CommonDivProps & import("../hocs/withOnOutsideClick.js").WithOnOutsideClickProps, context: any): {
44
- outsideClickContainerDiv?: HTMLDivElement | null | undefined;
44
+ outsideClickContainerDiv?: HTMLDivElement | null;
45
45
  isDownOutside: boolean;
46
46
  isInCorePopup(element: HTMLElement): boolean;
47
47
  onOutsideClick(e: MouseEvent): any;
@@ -11,7 +11,7 @@ import { withOnOutsideClick } from "../hocs/withOnOutsideClick.js";
11
11
  * @public
12
12
  * @deprecated in 4.12.0. Use props of a basic component, like {@link https://itwinui.bentley.com/docs/popover iTwinUI popover `closeOnOutsideClick`} or {@link useOnOutsideClick} hook.
13
13
  */
14
- // eslint-disable-next-line deprecation/deprecation
15
- export const DivWithOutsideClick = withOnOutsideClick((props) => React.createElement("div", { ...props }) // eslint-disable-line deprecation/deprecation
14
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
15
+ export const DivWithOutsideClick = withOnOutsideClick((props) => React.createElement("div", { ...props }) // eslint-disable-line @typescript-eslint/no-deprecated
16
16
  );
17
17
  //# sourceMappingURL=DivWithOutsideClick.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DivWithOutsideClick.js","sourceRoot":"","sources":["../../../src/core-react/base/DivWithOutsideClick.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAInE;;;GAGG;AACH,mDAAmD;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CACnD,CAAC,KAAqB,EAAE,EAAE,CAAC,gCAAS,KAAK,GAAI,CAAC,8CAA8C;CAC7F,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 Base\n */\n\nimport * as React from \"react\";\nimport { withOnOutsideClick } from \"../hocs/withOnOutsideClick.js\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport type { useOnOutsideClick } from \"../utils/hooks/useOnOutsideClick.js\";\n\n/** Div element with Outside Click behavior\n * @public\n * @deprecated in 4.12.0. Use props of a basic component, like {@link https://itwinui.bentley.com/docs/popover iTwinUI popover `closeOnOutsideClick`} or {@link useOnOutsideClick} hook.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const DivWithOutsideClick = withOnOutsideClick(\n (props: CommonDivProps) => <div {...props} /> // eslint-disable-line deprecation/deprecation\n);\n"]}
1
+ {"version":3,"file":"DivWithOutsideClick.js","sourceRoot":"","sources":["../../../src/core-react/base/DivWithOutsideClick.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAInE;;;GAGG;AACH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CACnD,CAAC,KAAqB,EAAE,EAAE,CAAC,gCAAS,KAAK,GAAI,CAAC,uDAAuD;CACtG,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 Base\n */\n\nimport * as React from \"react\";\nimport { withOnOutsideClick } from \"../hocs/withOnOutsideClick.js\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport type { useOnOutsideClick } from \"../utils/hooks/useOnOutsideClick.js\";\n\n/** Div element with Outside Click behavior\n * @public\n * @deprecated in 4.12.0. Use props of a basic component, like {@link https://itwinui.bentley.com/docs/popover iTwinUI popover `closeOnOutsideClick`} or {@link useOnOutsideClick} hook.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport const DivWithOutsideClick = withOnOutsideClick(\n (props: CommonDivProps) => <div {...props} /> // eslint-disable-line @typescript-eslint/no-deprecated\n);\n"]}
@@ -12,9 +12,9 @@ import { Div } from "./Div.js";
12
12
  * @public
13
13
  * @deprecated in 4.12.0. Use CSS to style an element or {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead.
14
14
  */
15
- // eslint-disable-next-line deprecation/deprecation
15
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
16
16
  export function FillCentered(props) {
17
- // eslint-disable-next-line deprecation/deprecation
17
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
18
18
  return React.createElement(Div, { ...props, mainClassName: "uicore-fill-centered" });
19
19
  }
20
20
  //# sourceMappingURL=FillCentered.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FillCentered.js","sourceRoot":"","sources":["../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;GAIG;AACH,mDAAmD;AACnD,MAAM,UAAU,YAAY,CAAC,KAAqB;IAChD,mDAAmD;IACnD,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACjE,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Full height & width and centered React functional component.\n * Displays content centered vertically and horizontally and has a height and width of 100%.\n * @public\n * @deprecated in 4.12.0. Use CSS to style an element or {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FillCentered(props: CommonDivProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <Div {...props} mainClassName=\"uicore-fill-centered\" />;\n}\n"]}
1
+ {"version":3,"file":"FillCentered.js","sourceRoot":"","sources":["../../../src/core-react/base/FillCentered.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;GAIG;AACH,4DAA4D;AAC5D,MAAM,UAAU,YAAY,CAAC,KAAqB;IAChD,4DAA4D;IAC5D,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACjE,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Full height & width and centered React functional component.\n * Displays content centered vertically and horizontally and has a height and width of 100%.\n * @public\n * @deprecated in 4.12.0. Use CSS to style an element or {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function FillCentered(props: CommonDivProps) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return <Div {...props} mainClassName=\"uicore-fill-centered\" />;\n}\n"]}
@@ -13,9 +13,9 @@ import { Div } from "./Div.js";
13
13
  * @public
14
14
  * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead.
15
15
  */
16
- // eslint-disable-next-line deprecation/deprecation
16
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
17
17
  export function FlexWrapContainer(props) {
18
- // eslint-disable-next-line deprecation/deprecation
18
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
19
19
  return React.createElement(Div, { ...props, mainClassName: "uicore-flex-wrap-container" });
20
20
  }
21
21
  //# sourceMappingURL=FlexWrapContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlexWrapContainer.js","sourceRoot":"","sources":["../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;GAKG;AACH,mDAAmD;AACnD,MAAM,UAAU,iBAAiB,CAAC,KAAqB;IACrD,mDAAmD;IACnD,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,4BAA4B,GAAG,CAAC;AACvE,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Flex Wrap Container React functional component.\n * Wraps content onto multiple lines and\n * has the 'display: flex' and 'flex-wrap: wrap' CSS properties.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FlexWrapContainer(props: CommonDivProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <Div {...props} mainClassName=\"uicore-flex-wrap-container\" />;\n}\n"]}
1
+ {"version":3,"file":"FlexWrapContainer.js","sourceRoot":"","sources":["../../../src/core-react/base/FlexWrapContainer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;GAKG;AACH,4DAA4D;AAC5D,MAAM,UAAU,iBAAiB,CAAC,KAAqB;IACrD,4DAA4D;IAC5D,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,4BAA4B,GAAG,CAAC;AACvE,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Flex Wrap Container React functional component.\n * Wraps content onto multiple lines and\n * has the 'display: flex' and 'flex-wrap: wrap' CSS properties.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex} instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function FlexWrapContainer(props: CommonDivProps) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return <Div {...props} mainClassName=\"uicore-flex-wrap-container\" />;\n}\n"]}
@@ -10,7 +10,7 @@ import * as React from "react";
10
10
  * @public
11
11
  * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex `gap`} or {@link https://itwinui.bentley.com/docs/variables#size iTwinUI size variables} instead.
12
12
  */
13
- // eslint-disable-next-line deprecation/deprecation
13
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
14
14
  export function Gap(props) {
15
15
  const { size, style, ...rest } = props;
16
16
  const paddingLeft = size ?? "10px";
@@ -1 +1 @@
1
- {"version":3,"file":"Gap.js","sourceRoot":"","sources":["../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,IAAI,MAAM,CAAC;IAEnC,OAAO,8BAAM,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,KAAM,IAAI,GAAI,CAAC;AAC9D,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props.js\";\n\n/** Properties for the [[Gap]] component.\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link Gap}.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface GapProps extends CommonProps {\n size?: string;\n}\n\n/** Horizontal gap or space React component. Defaults to 10px.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex `gap`} or {@link https://itwinui.bentley.com/docs/variables#size iTwinUI size variables} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function Gap(props: GapProps) {\n const { size, style, ...rest } = props;\n const paddingLeft = size ?? \"10px\";\n\n return <span style={{ ...style, paddingLeft }} {...rest} />;\n}\n"]}
1
+ {"version":3,"file":"Gap.js","sourceRoot":"","sources":["../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B;;;GAGG;AACH,4DAA4D;AAC5D,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,IAAI,MAAM,CAAC;IAEnC,OAAO,8BAAM,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,KAAM,IAAI,GAAI,CAAC;AAC9D,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props.js\";\n\n/** Properties for the [[Gap]] component.\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link Gap}.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface GapProps extends CommonProps {\n size?: string;\n}\n\n/** Horizontal gap or space React component. Defaults to 10px.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/flex iTwinUI Flex `gap`} or {@link https://itwinui.bentley.com/docs/variables#size iTwinUI size variables} instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function Gap(props: GapProps) {\n const { size, style, ...rest } = props;\n const paddingLeft = size ?? \"10px\";\n\n return <span style={{ ...style, paddingLeft }} {...rest} />;\n}\n"]}
@@ -13,9 +13,9 @@ import { Div } from "./Div.js";
13
13
  * @public
14
14
  * @deprecated in 4.12.0. Use {@link https://developer.mozilla.org/en-US/docs/Web/CSS/overflow overflow property} instead.
15
15
  */
16
- // eslint-disable-next-line deprecation/deprecation
16
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
17
17
  export function ScrollView(props) {
18
- // eslint-disable-next-line deprecation/deprecation
18
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
19
19
  return React.createElement(Div, { ...props, mainClassName: "uicore-scrollview" });
20
20
  }
21
21
  //# sourceMappingURL=ScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;GAKG;AACH,mDAAmD;AACnD,MAAM,UAAU,UAAU,CAAC,KAAqB;IAC9C,mDAAmD;IACnD,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AAC9D,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Scroll View React functional component.\n * Scrolls content vertically and\n * has the 'overflow-y: auto' CSS property and has a height and width of 100%.\n * @public\n * @deprecated in 4.12.0. Use {@link https://developer.mozilla.org/en-US/docs/Web/CSS/overflow overflow property} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function ScrollView(props: CommonDivProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <Div {...props} mainClassName=\"uicore-scrollview\" />;\n}\n"]}
1
+ {"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;GAKG;AACH,4DAA4D;AAC5D,MAAM,UAAU,UAAU,CAAC,KAAqB;IAC9C,4DAA4D;IAC5D,OAAO,oBAAC,GAAG,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AAC9D,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 Base\n */\n\nimport * as React from \"react\";\nimport type { CommonDivProps } from \"../utils/Props.js\";\nimport { Div } from \"./Div.js\";\n\n/** Scroll View React functional component.\n * Scrolls content vertically and\n * has the 'overflow-y: auto' CSS property and has a height and width of 100%.\n * @public\n * @deprecated in 4.12.0. Use {@link https://developer.mozilla.org/en-US/docs/Web/CSS/overflow overflow property} instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function ScrollView(props: CommonDivProps) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return <Div {...props} mainClassName=\"uicore-scrollview\" />;\n}\n"]}