@itwin/core-react 4.0.0-dev.2 → 4.0.0-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +144 -7
- package/ContributeGuidelines.md +17 -14
- package/LICENSE.md +1 -1
- package/README.md +2 -2
- package/lib/cjs/core-react/UiCore.js +1 -1
- package/lib/cjs/core-react/UiCore.js.map +1 -1
- package/lib/cjs/core-react/_geometry.scss +70 -70
- package/lib/cjs/core-react/_helpers.scss +51 -51
- package/lib/cjs/core-react/_math.scss +13 -13
- package/lib/cjs/core-react/_scrollbar.scss +51 -51
- package/lib/cjs/core-react/_typography.scss +44 -44
- package/lib/cjs/core-react/_z-index.scss +65 -65
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +2 -2
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +79 -82
- package/lib/cjs/core-react/badge/Badge.js.map +1 -1
- package/lib/cjs/core-react/badge/Badge.scss +13 -13
- package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.js +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.scss +9 -9
- package/lib/cjs/core-react/base/Centered.js.map +1 -1
- package/lib/cjs/core-react/base/Div.js.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/cjs/core-react/base/Gap.js +1 -1
- package/lib/cjs/core-react/base/Gap.js.map +1 -1
- package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
- package/lib/cjs/core-react/base/base.scss +42 -42
- package/lib/cjs/core-react/base/classes.scss +13 -13
- package/lib/cjs/core-react/base/index.scss +5 -5
- package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.scss +32 -32
- package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.scss +21 -22
- package/lib/cjs/core-react/classes.scss +11 -14
- package/lib/cjs/core-react/colorthemes.scss +61 -90
- package/lib/cjs/core-react/colorvariables.scss +131 -154
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.js +2 -3
- package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.scss +236 -237
- package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +5 -2
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +6 -4
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/TildeFinder.js +1 -1
- package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.js +18 -10
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.scss +245 -244
- package/lib/cjs/core-react/dialog/GlobalDialog.js +1 -2
- package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js +2 -2
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +85 -85
- package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
- package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
- package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
- package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
- package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.scss +8 -8
- package/lib/cjs/core-react/expandable/classes.scss +7 -7
- package/lib/cjs/core-react/expandable/index.scss +5 -5
- package/lib/cjs/core-react/expandable/list.scss +35 -35
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts +1 -1
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -2
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +27 -0
- package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
- package/lib/cjs/core-react/icons/ConditionalIconItem.js +65 -0
- package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -0
- package/lib/cjs/core-react/icons/IconComponent.d.ts +3 -2
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js +1 -7
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.scss +20 -20
- package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.js +2 -2
- package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
- package/lib/cjs/core-react/icons/{SvgSprite.scss → SvgPath.scss} +15 -15
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts +0 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.js +0 -1
- package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.scss +17 -17
- package/lib/cjs/core-react/icons/classes.scss +10 -10
- package/lib/cjs/core-react/icons/index.scss +6 -6
- package/lib/cjs/core-react/icons/mixins.scss +25 -25
- package/lib/cjs/core-react/icons/variables.scss +12 -21
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +54 -54
- package/lib/cjs/core-react/index.scss +21 -23
- package/lib/cjs/core-react/inputs/Input.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js +9 -1
- package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/cjs/core-react/inputs/classes.scss +8 -8
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +35 -35
- package/lib/cjs/core-react/inputs/index.scss +9 -9
- package/lib/cjs/core-react/inputs/input-label.scss +90 -90
- package/lib/cjs/core-react/inputs/input.scss +58 -58
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +6 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +13 -8
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +88 -89
- package/lib/cjs/core-react/inputs/variables.scss +38 -38
- package/lib/cjs/core-react/layout-variables.scss +17 -17
- package/lib/cjs/core-react/listbox/Listbox.d.ts +1 -1
- package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.js +2 -3
- package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.scss +54 -54
- package/lib/cjs/core-react/loading/LoadingBar.js +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.scss +29 -29
- package/lib/cjs/core-react/loading/LoadingPrompt.js +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.scss +33 -33
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.scss +26 -26
- package/lib/cjs/core-react/loading/LoadingStatus.js +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.scss +20 -20
- package/lib/cjs/core-react/loading/index.scss +5 -5
- package/lib/cjs/core-react/loading/mixins.scss +57 -57
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts +13 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js +55 -11
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.scss +56 -46
- package/lib/cjs/core-react/notification/MessageRenderer.js +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.d.ts +1 -1
- package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
- package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
- package/lib/cjs/core-react/popup/Popup.js +7 -8
- package/lib/cjs/core-react/popup/Popup.js.map +1 -1
- package/lib/cjs/core-react/popup/Popup.scss +240 -240
- package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.js +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.scss +55 -55
- package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.js +8 -6
- package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.scss +47 -51
- package/lib/cjs/core-react/settings/SettingsContainer.js +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.scss +68 -66
- package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/cjs/core-react/style/baseline.scss +11 -11
- package/lib/cjs/core-react/style/breakpoints.scss +41 -41
- package/lib/cjs/core-react/style/colors.scss +77 -77
- package/lib/cjs/core-react/style/index.scss +10 -17
- package/lib/cjs/core-react/style/mixins.scss +27 -27
- package/lib/cjs/core-react/style/opacity.scss +16 -16
- package/lib/cjs/core-react/style/themecolors.scss +123 -129
- package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/classes.scss +7 -7
- package/lib/cjs/core-react/tabs/index.scss +5 -5
- package/lib/cjs/core-react/tabs/tabs.scss +96 -106
- package/lib/cjs/core-react/tabs/vertical.scss +51 -58
- package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BlockText.js +1 -0
- package/lib/cjs/core-react/text/BlockText.js.map +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts +1 -0
- package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BodyText.js +2 -0
- package/lib/cjs/core-react/text/BodyText.js.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.js +1 -0
- package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.js +3 -3
- package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.scss +10 -10
- package/lib/cjs/core-react/text/MutedText.d.ts +1 -0
- package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/MutedText.js +2 -0
- package/lib/cjs/core-react/text/MutedText.js.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +1 -0
- package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/StyledText.js +1 -0
- package/lib/cjs/core-react/text/StyledText.js.map +1 -1
- package/lib/cjs/core-react/text/TextProps.js.map +1 -1
- package/lib/cjs/core-react/text/block.scss +15 -10
- package/lib/cjs/core-react/text/body.scss +13 -10
- package/lib/cjs/core-react/text/classes.scss +10 -10
- package/lib/cjs/core-react/text/disabled.scss +10 -10
- package/lib/cjs/core-react/text/index.scss +10 -10
- package/lib/cjs/core-react/text/mixins.scss +24 -24
- package/lib/cjs/core-react/text/muted.scss +10 -10
- package/lib/cjs/core-react/tree/Branch.js.map +1 -1
- package/lib/cjs/core-react/tree/Branch.scss +12 -12
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.scss +32 -28
- package/lib/cjs/core-react/tree/Node.d.ts +2 -2
- package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Node.js +2 -3
- package/lib/cjs/core-react/tree/Node.js.map +1 -1
- package/lib/cjs/core-react/tree/Node.scss +68 -84
- package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
- package/lib/cjs/core-react/tree/Placeholder.scss +17 -20
- package/lib/cjs/core-react/tree/Tree.js.map +1 -1
- package/lib/cjs/core-react/tree/Tree.scss +21 -21
- package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
- package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
- package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
- package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.js +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/cjs/core-react/utils/Point.js +4 -4
- package/lib/cjs/core-react/utils/Point.js.map +1 -1
- package/lib/cjs/core-react/utils/Props.d.ts +1 -1
- package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Props.js.map +1 -1
- package/lib/cjs/core-react/utils/Rectangle.js +7 -7
- package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
- package/lib/cjs/core-react/utils/Size.js +4 -4
- package/lib/cjs/core-react/utils/Size.js.map +1 -1
- package/lib/cjs/core-react/utils/Timer.d.ts +1 -1
- package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Timer.js.map +1 -1
- package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
- package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
- package/lib/cjs/core-react/utils/getBestBWContrastColor.js +3 -3
- package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.js +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
- package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +1 -2
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +2 -2
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +8 -13
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
- package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
- package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
- package/lib/cjs/core-react/utils/typeUtils.d.ts +1 -1
- package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
- package/lib/cjs/core-react.d.ts +1 -1
- package/lib/cjs/core-react.d.ts.map +1 -1
- package/lib/cjs/core-react.js +6 -2
- package/lib/cjs/core-react.js.map +1 -1
- package/lib/esm/core-react/UiCore.js +2 -1
- package/lib/esm/core-react/UiCore.js.map +1 -1
- package/lib/esm/core-react/_geometry.scss +70 -70
- package/lib/esm/core-react/_helpers.scss +51 -51
- package/lib/esm/core-react/_math.scss +13 -13
- package/lib/esm/core-react/_scrollbar.scss +51 -51
- package/lib/esm/core-react/_typography.scss +44 -44
- package/lib/esm/core-react/_z-index.scss +65 -65
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +2 -2
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.scss +79 -82
- package/lib/esm/core-react/badge/Badge.js.map +1 -1
- package/lib/esm/core-react/badge/Badge.scss +13 -13
- package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.js +0 -1
- package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.scss +9 -9
- package/lib/esm/core-react/base/Centered.js.map +1 -1
- package/lib/esm/core-react/base/Div.js.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/esm/core-react/base/FillCentered.js.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/esm/core-react/base/Gap.js +1 -1
- package/lib/esm/core-react/base/Gap.js.map +1 -1
- package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
- package/lib/esm/core-react/base/ScrollView.js.map +1 -1
- package/lib/esm/core-react/base/base.scss +42 -42
- package/lib/esm/core-react/base/classes.scss +13 -13
- package/lib/esm/core-react/base/index.scss +5 -5
- package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.scss +32 -32
- package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.scss +21 -22
- package/lib/esm/core-react/classes.scss +11 -14
- package/lib/esm/core-react/colorthemes.scss +61 -90
- package/lib/esm/core-react/colorvariables.scss +131 -154
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.js +3 -3
- package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.scss +236 -237
- package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js +2 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +6 -2
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +6 -4
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/TildeFinder.js +2 -1
- package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.js +19 -10
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.scss +245 -244
- package/lib/esm/core-react/dialog/GlobalDialog.js +1 -2
- package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.js +2 -2
- package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.scss +85 -85
- package/lib/esm/core-react/enums/Alignment.js.map +1 -1
- package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
- package/lib/esm/core-react/enums/Orientation.js.map +1 -1
- package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
- package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js +2 -1
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.scss +8 -8
- package/lib/esm/core-react/expandable/classes.scss +7 -7
- package/lib/esm/core-react/expandable/index.scss +5 -5
- package/lib/esm/core-react/expandable/list.scss +35 -35
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts +1 -1
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
- package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -2
- package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +27 -0
- package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
- package/lib/esm/core-react/icons/ConditionalIconItem.js +61 -0
- package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -0
- package/lib/esm/core-react/icons/IconComponent.d.ts +3 -2
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js +1 -7
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.scss +20 -20
- package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.js +2 -2
- package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
- package/lib/esm/core-react/icons/{SvgSprite.scss → SvgPath.scss} +15 -15
- package/lib/esm/core-react/icons/WebFontIcon.d.ts +0 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.js +0 -1
- package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.scss +17 -17
- package/lib/esm/core-react/icons/classes.scss +10 -10
- package/lib/esm/core-react/icons/index.scss +6 -6
- package/lib/esm/core-react/icons/mixins.scss +25 -25
- package/lib/esm/core-react/icons/variables.scss +12 -21
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +54 -54
- package/lib/esm/core-react/index.scss +21 -23
- package/lib/esm/core-react/inputs/Input.js.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js +9 -1
- package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/esm/core-react/inputs/classes.scss +8 -8
- package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.scss +35 -35
- package/lib/esm/core-react/inputs/index.scss +9 -9
- package/lib/esm/core-react/inputs/input-label.scss +90 -90
- package/lib/esm/core-react/inputs/input.scss +58 -58
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +6 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js +13 -8
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +88 -89
- package/lib/esm/core-react/inputs/variables.scss +38 -38
- package/lib/esm/core-react/layout-variables.scss +17 -17
- package/lib/esm/core-react/listbox/Listbox.d.ts +1 -1
- package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.js +2 -3
- package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.scss +54 -54
- package/lib/esm/core-react/loading/LoadingBar.js +2 -1
- package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.scss +29 -29
- package/lib/esm/core-react/loading/LoadingPrompt.js +2 -1
- package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.scss +33 -33
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js +2 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.scss +26 -26
- package/lib/esm/core-react/loading/LoadingStatus.js +2 -1
- package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.scss +20 -20
- package/lib/esm/core-react/loading/index.scss +5 -5
- package/lib/esm/core-react/loading/mixins.scss +57 -57
- package/lib/esm/core-react/messagebox/MessageBox.d.ts +13 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js +56 -11
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.scss +56 -46
- package/lib/esm/core-react/notification/MessageRenderer.js +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/esm/core-react/notification/MessageType.d.ts +1 -1
- package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/esm/core-react/notification/MessageType.js.map +1 -1
- package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
- package/lib/esm/core-react/popup/Popup.js +8 -8
- package/lib/esm/core-react/popup/Popup.js.map +1 -1
- package/lib/esm/core-react/popup/Popup.scss +240 -240
- package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.js +2 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.scss +55 -55
- package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.js +8 -6
- package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.scss +47 -51
- package/lib/esm/core-react/settings/SettingsContainer.js +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.scss +68 -66
- package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/esm/core-react/style/baseline.scss +11 -11
- package/lib/esm/core-react/style/breakpoints.scss +41 -41
- package/lib/esm/core-react/style/colors.scss +77 -77
- package/lib/esm/core-react/style/index.scss +10 -17
- package/lib/esm/core-react/style/mixins.scss +27 -27
- package/lib/esm/core-react/style/opacity.scss +16 -16
- package/lib/esm/core-react/style/themecolors.scss +123 -129
- package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/esm/core-react/tabs/classes.scss +7 -7
- package/lib/esm/core-react/tabs/index.scss +5 -5
- package/lib/esm/core-react/tabs/tabs.scss +96 -106
- package/lib/esm/core-react/tabs/vertical.scss +51 -58
- package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BlockText.js +1 -0
- package/lib/esm/core-react/text/BlockText.js.map +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts +1 -0
- package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BodyText.js +2 -0
- package/lib/esm/core-react/text/BodyText.js.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/DisabledText.js +1 -0
- package/lib/esm/core-react/text/DisabledText.js.map +1 -1
- package/lib/esm/core-react/text/FilteredText.js +3 -3
- package/lib/esm/core-react/text/FilteredText.js.map +1 -1
- package/lib/esm/core-react/text/FilteredText.scss +10 -10
- package/lib/esm/core-react/text/MutedText.d.ts +1 -0
- package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/esm/core-react/text/MutedText.js +2 -0
- package/lib/esm/core-react/text/MutedText.js.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +1 -0
- package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/StyledText.js +1 -0
- package/lib/esm/core-react/text/StyledText.js.map +1 -1
- package/lib/esm/core-react/text/TextProps.js.map +1 -1
- package/lib/esm/core-react/text/block.scss +15 -10
- package/lib/esm/core-react/text/body.scss +13 -10
- package/lib/esm/core-react/text/classes.scss +10 -10
- package/lib/esm/core-react/text/disabled.scss +10 -10
- package/lib/esm/core-react/text/index.scss +10 -10
- package/lib/esm/core-react/text/mixins.scss +24 -24
- package/lib/esm/core-react/text/muted.scss +10 -10
- package/lib/esm/core-react/tree/Branch.js.map +1 -1
- package/lib/esm/core-react/tree/Branch.scss +12 -12
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js +3 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.scss +32 -28
- package/lib/esm/core-react/tree/Node.d.ts +2 -2
- package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Node.js +2 -3
- package/lib/esm/core-react/tree/Node.js.map +1 -1
- package/lib/esm/core-react/tree/Node.scss +68 -84
- package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
- package/lib/esm/core-react/tree/Placeholder.scss +17 -20
- package/lib/esm/core-react/tree/Tree.js.map +1 -1
- package/lib/esm/core-react/tree/Tree.scss +21 -21
- package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
- package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
- package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
- package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.js +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/esm/core-react/utils/Point.js +4 -4
- package/lib/esm/core-react/utils/Point.js.map +1 -1
- package/lib/esm/core-react/utils/Props.d.ts +1 -1
- package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Props.js.map +1 -1
- package/lib/esm/core-react/utils/Rectangle.js +7 -7
- package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
- package/lib/esm/core-react/utils/Size.js +4 -4
- package/lib/esm/core-react/utils/Size.js.map +1 -1
- package/lib/esm/core-react/utils/Timer.d.ts +1 -1
- package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Timer.js.map +1 -1
- package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
- package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
- package/lib/esm/core-react/utils/getBestBWContrastColor.js +3 -3
- package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.js +1 -1
- package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
- package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +1 -2
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +2 -2
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js +8 -13
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
- package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
- package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
- package/lib/esm/core-react/utils/typeUtils.d.ts +1 -1
- package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
- package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
- package/lib/esm/core-react.d.ts +1 -1
- package/lib/esm/core-react.d.ts.map +1 -1
- package/lib/esm/core-react.js +1 -1
- package/lib/esm/core-react.js.map +1 -1
- package/lib/public/locales/en/UiCore.json +30 -30
- package/package.json +26 -26
- package/ThirdPartyNotices.md +0 -28
- package/lib/cjs/core-react/badge/BetaBadge.scss +0 -9
- package/lib/cjs/core-react/button/blue-large.scss +0 -12
- package/lib/cjs/core-react/button/blue.scss +0 -25
- package/lib/cjs/core-react/button/button.scss +0 -70
- package/lib/cjs/core-react/button/classes.scss +0 -14
- package/lib/cjs/core-react/button/disabled-large.scss +0 -12
- package/lib/cjs/core-react/button/disabled.scss +0 -17
- package/lib/cjs/core-react/button/hollow-large.scss +0 -13
- package/lib/cjs/core-react/button/hollow.scss +0 -30
- package/lib/cjs/core-react/button/index.scss +0 -14
- package/lib/cjs/core-react/button/primary-large.scss +0 -12
- package/lib/cjs/core-react/button/primary.scss +0 -25
- package/lib/cjs/core-react/button/variables.scss +0 -22
- package/lib/cjs/core-react/checkbox/checkbox.scss +0 -124
- package/lib/cjs/core-react/checkbox/classes.scss +0 -8
- package/lib/cjs/core-react/checkbox/index.scss +0 -8
- package/lib/cjs/core-react/icons/SvgSprite.d.ts +0 -21
- package/lib/cjs/core-react/icons/SvgSprite.d.ts.map +0 -1
- package/lib/cjs/core-react/icons/SvgSprite.js +0 -27
- package/lib/cjs/core-react/icons/SvgSprite.js.map +0 -1
- package/lib/cjs/core-react/style/data-viz.scss +0 -20
- package/lib/cjs/core-react/style/itwinui-overrides.scss +0 -24
- package/lib/cjs/core-react/style/space.scss +0 -13
- package/lib/cjs/core-react/style/speed.scss +0 -12
- package/lib/cjs/core-react/style/typography.scss +0 -44
- package/lib/cjs/core-react/style/variables.scss +0 -12
- package/lib/esm/core-react/badge/BetaBadge.scss +0 -9
- package/lib/esm/core-react/button/blue-large.scss +0 -12
- package/lib/esm/core-react/button/blue.scss +0 -25
- package/lib/esm/core-react/button/button.scss +0 -70
- package/lib/esm/core-react/button/classes.scss +0 -14
- package/lib/esm/core-react/button/disabled-large.scss +0 -12
- package/lib/esm/core-react/button/disabled.scss +0 -17
- package/lib/esm/core-react/button/hollow-large.scss +0 -13
- package/lib/esm/core-react/button/hollow.scss +0 -30
- package/lib/esm/core-react/button/index.scss +0 -14
- package/lib/esm/core-react/button/primary-large.scss +0 -12
- package/lib/esm/core-react/button/primary.scss +0 -25
- package/lib/esm/core-react/button/variables.scss +0 -22
- package/lib/esm/core-react/checkbox/checkbox.scss +0 -124
- package/lib/esm/core-react/checkbox/classes.scss +0 -8
- package/lib/esm/core-react/checkbox/index.scss +0 -8
- package/lib/esm/core-react/icons/SvgSprite.d.ts +0 -21
- package/lib/esm/core-react/icons/SvgSprite.d.ts.map +0 -1
- package/lib/esm/core-react/icons/SvgSprite.js +0 -23
- package/lib/esm/core-react/icons/SvgSprite.js.map +0 -1
- package/lib/esm/core-react/style/data-viz.scss +0 -20
- package/lib/esm/core-react/style/itwinui-overrides.scss +0 -24
- package/lib/esm/core-react/style/space.scss +0 -13
- package/lib/esm/core-react/style/speed.scss +0 -12
- package/lib/esm/core-react/style/typography.scss +0 -44
- package/lib/esm/core-react/style/variables.scss +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLifecycleLogging.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useLifecycleLogging.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,KAA0B,EAAE,OAA6B;IACzG,SAAS,CAAC,GAAG,EAAE;QACb,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,sBAAsB,CAAC,CAAC;QAEnE,OAAO,GAAG,EAAE;YACV,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,wBAAwB,CAAC,CAAC;QACvE,CAAC,CAAC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,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5C,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,mBAAmB,EAAE,SAAS,CAAC,CAAC;SAC5E;aAAM,IAAI,WAAW,CAAC,OAAO,KAAK,OAAO,EAAE;YAC1C,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,qBAAqB,EAAE,WAAW,CAAC,CAAC;SAChF;aAAM;YACL,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,0BAA0B,CAAC,CAAC;SACxE;QAED,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,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*--------------------------------------------------------------------------------------------*/\nimport { useEffect, useRef } from \"react\";\n\n/**\n * Logs to console information about component lifecycle: mounting, re-rendering and unmounting.\n * @internal\n */\nexport function useLifecycleLogging(name: string, props: Record<string, any>, context?: Record<string, any>) {\n useEffect(() => {\n // eslint-disable-next-line no-console\n console.log(`[useLifecycleLogging]: '${name}' Component mounted.`);\n\n return () => {\n // eslint-disable-next-line no-console\n console.log(`[useLifecycleLogging]: '${name}' Component unmounted.`);\n };\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const prevProps = useRef(props);\n const prevContext = useRef(context);\n const firstRun = useRef(true);\n useEffect(() => {\n if (firstRun.current) {\n firstRun.current = false;\n return;\n }\n\n function getDiff(prev: Record<string, any>, current: Record<string, any>): Record<string, any> {\n const diff: Record<string, { from: any, to: any }> = {};\n for (const key of Object.keys(current)) {\n if (prev[key] !== current[key]) {\n diff[key] = {\n from: prev[key],\n to: current[key],\n };\n }\n }\n\n return diff;\n }\n\n const propsDiff = getDiff(prevProps.current, props);\n const contextDiff = { from: context === undefined ? context : prevContext.current, to: context };\n\n if (Object.keys(propsDiff).length > 0 && prevContext.current !== context) {\n // eslint-disable-next-line no-console\n console.log(`[useLifecycleLogging]: '${name}' Props and context changed: `, propsDiff, contextDiff);\n } else if (Object.keys(propsDiff).length > 0) {\n // eslint-disable-next-line no-console\n console.log(`[useLifecycleLogging]: '${name}' Props changed: `, propsDiff);\n } else if (prevContext.current !== context) {\n // eslint-disable-next-line no-console\n console.log(`[useLifecycleLogging]: '${name}' Context changed: `, contextDiff);\n } else {\n // eslint-disable-next-line no-console\n console.log(`[useLifecycleLogging]: '${name}' Component re-rendered.`);\n }\n\n prevProps.current = props;\n prevContext.current = context;\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useLifecycleLogging.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useLifecycleLogging.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,KAA0B,EAAE,OAA6B;IACzG,SAAS,CAAC,GAAG,EAAE;QACb,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,sBAAsB,CAAC,CAAC;QAEnE,OAAO,GAAG,EAAE;YACV,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,wBAAwB,CAAC,CAAC;QACvE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kDAAkD;IAE1D,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,CAAC,OAAO,EA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AW,CAAC,CAAC;SAChF;aAAM;YACL,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,0BAA0B,CAAC,CAAC;SACxE;QAED,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { useEffect, useRef } from \"react\";\r\n\r\n/**\r\n * Logs to console information about component lifecycle: mounting, re-rendering and unmounting.\r\n * @internal\r\n */\r\nexport function useLifecycleLogging(name: string, props: Record<string, any>, context?: Record<string, any>) {\r\n useEffect(() => {\r\n // eslint-disable-next-line no-console\r\n console.log(`[useLifecycleLogging]: '${name}' Component mounted.`);\r\n\r\n return () => {\r\n // eslint-disable-next-line no-console\r\n console.log(`[useLifecycleLogging]: '${name}' Component unmounted.`);\r\n };\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const prevProps = useRef(props);\r\n const prevContext = useRef(context);\r\n const firstRun = useRef(true);\r\n useEffect(() => {\r\n if (firstRun.current) {\r\n firstRun.current = false;\r\n return;\r\n }\r\n\r\n function getDiff(prev: Record<string, any>, current: Record<string, any>): Record<string, any> {\r\n const diff: Record<string, { from: any, to: any }> = {};\r\n for (const key of Object.keys(current)) {\r\n if (prev[key] !== current[key]) {\r\n diff[key] = {\r\n from: prev[key],\r\n to: current[key],\r\n };\r\n }\r\n }\r\n\r\n return diff;\r\n }\r\n\r\n const propsDiff = getDiff(prevProps.current, props);\r\n const contextDiff = { from: context === undefined ? context : prevContext.current, to: context };\r\n\r\n if (Object.keys(propsDiff).length > 0 && prevContext.current !== context) {\r\n // eslint-disable-next-line no-console\r\n console.log(`[useLifecycleLogging]: '${name}' Props and context changed: `, propsDiff, contextDiff);\r\n } else if (Object.keys(propsDiff).length > 0) {\r\n // eslint-disable-next-line no-console\r\n console.log(`[useLifecycleLogging]: '${name}' Props changed: `, propsDiff);\r\n } else if (prevContext.current !== context) {\r\n // eslint-disable-next-line no-console\r\n console.log(`[useLifecycleLogging]: '${name}' Context changed: `, contextDiff);\r\n } else {\r\n // eslint-disable-next-line no-console\r\n console.log(`[useLifecycleLogging]: '${name}' Component re-rendered.`);\r\n }\r\n\r\n prevProps.current = props;\r\n prevContext.current = context;\r\n });\r\n}\r\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
/** @public */
|
|
6
|
-
export
|
|
6
|
+
export type OutsideClickEvent = PointerEvent | MouseEvent | TouchEvent;
|
|
7
7
|
/** Invokes onOutsideClick handler when user clicks outside of referenced element.
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnOutsideClick.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useOnOutsideClick.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,cAAc;AACd,
|
|
1
|
+
{"version":3,"file":"useOnOutsideClick.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useOnOutsideClick.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,cAAc;AACd,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;AAEvE;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EACjD,cAAc,CAAC,EAAE,MAAM,IAAI;AAC3B,gFAAgF;AAChF,qBAAqB,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,OAAO,sBAoE1D"}
|
|
@@ -1 +1 @@
|
|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AC7B,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;SAClD;aAAM;YACL,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAC/C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SACjD;QACD,OAAO,GAAG,EAAE;YACV,IAAI,uBAAuB,EAAE,EAAE;gBAC7B,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;aACrD;iBAAM;gBACL,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAClD,QAAQ,CAAC,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;aACpD;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAC5C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,iBAAiB,CAAC,OAAO,GAAG,IAAI,CAAC;QACnC,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,sBAAsB,CAAC,OAAO,CAAC;QAC7C,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { hasPointerEventsSupport } from \"../../base/PointerEvents\";\nimport { Timer } from \"../Timer\";\n\n/** @public */\nexport type OutsideClickEvent = PointerEvent | MouseEvent | TouchEvent;\n\n/** Invokes onOutsideClick handler when user clicks outside of referenced element.\n * @public\n */\nexport function useOnOutsideClick<T extends Element>(\n onOutsideClick?: () => void,\n /** Invoked for intermediate events. Return `false` to prevent outside click. */\n outsideEventPredicate?: (e: OutsideClickEvent) => boolean,\n) {\n const handleMouseEvents = React.useRef(true);\n const handleMouseEventsTimer = React.useRef(new Timer(1000));\n const ref = React.useRef<T>(null);\n const isDownOutside = React.useRef(false);\n React.useEffect(() => {\n const listener = (e: OutsideClickEvent) => {\n if (e.type === \"touchstart\") {\n // Skip mouse event handlers after touch event.\n handleMouseEvents.current = false;\n handleMouseEventsTimer.current.start();\n } else if (e.type === \"mousedown\" && !handleMouseEvents.current) {\n return;\n }\n const isOutsideEvent = !outsideEventPredicate || outsideEventPredicate(e);\n isDownOutside.current = (!!ref.current && (e.target instanceof Node) && !ref.current.contains(e.target)) && isOutsideEvent;\n };\n if (hasPointerEventsSupport()) {\n document.addEventListener(\"pointerdown\", listener);\n } else {\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n }\n return () => {\n if (hasPointerEventsSupport()) {\n document.removeEventListener(\"pointerdown\", listener);\n } else {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n }\n };\n }, [outsideEventPredicate]);\n React.useEffect(() => {\n const listener = (e: OutsideClickEvent) => {\n if (e.type === \"mouseup\" && !handleMouseEvents.current) {\n return;\n }\n onOutsideClick && isDownOutside.current && (!outsideEventPredicate || outsideEventPredicate(e)) &&\n ref.current && e.target instanceof Node && !ref.current.contains(e.target) && onOutsideClick();\n isDownOutside.current = false;\n };\n if (hasPointerEventsSupport()) {\n document.addEventListener(\"pointerup\", listener);\n } else {\n document.addEventListener(\"mouseup\", listener);\n document.addEventListener(\"touchend\", listener);\n }\n return () => {\n if (hasPointerEventsSupport()) {\n document.removeEventListener(\"pointerup\", listener);\n } else {\n document.removeEventListener(\"mouseup\", listener);\n document.removeEventListener(\"touchend\", listener);\n }\n };\n }, [onOutsideClick, outsideEventPredicate]);\n React.useEffect(() => {\n const listener = () => {\n handleMouseEvents.current = true;\n };\n const timer = handleMouseEventsTimer.current;\n timer.setOnExecute(listener);\n return () => {\n timer.setOnExecute(undefined);\n };\n }, []);\n return ref;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useOnOutsideClick.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useOnOutsideClick.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,cAA2B;AAC3B,gFAAgF;AAChF,qBAAyD;IAEzD,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,sBAAsB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAI,IAAI,CAAC,CAAC;IAClC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,CAAC,CAAoB,EAAE,EAAE;YACxC,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY,EAAE;gBAC3B,+CAA+C;gBAC/C,iBAAiB,CAAC,OAAO,GAAG,KAAK,CAAC;gBAClC,sBAAsB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;aACxC;iBAAM,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE;gBAC/D,OAAO;aACR;YACD,M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Y,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,cAAc,EAAE,CAAC;YACjG,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC;QAChC,CAAC,CAAC;QACF,IAAI,uBAAuB,EAAE,EAAE;YAC7B,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;SAClD;aAAM;YACL,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAC/C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SACjD;QACD,OAAO,GAAG,EAAE;YACV,IAAI,uBAAuB,EAAE,EAAE;gBAC7B,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;aACrD;iBAAM;gBACL,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAClD,QAAQ,CAAC,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;aACpD;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAC5C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,iBAAiB,CAAC,OAAO,GAAG,IAAI,CAAC;QACnC,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,sBAAsB,CAAC,OAAO,CAAC;QAC7C,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { hasPointerEventsSupport } from \"../../base/PointerEvents\";\r\nimport { Timer } from \"../Timer\";\r\n\r\n/** @public */\r\nexport type OutsideClickEvent = PointerEvent | MouseEvent | TouchEvent;\r\n\r\n/** Invokes onOutsideClick handler when user clicks outside of referenced element.\r\n * @public\r\n */\r\nexport function useOnOutsideClick<T extends Element>(\r\n onOutsideClick?: () => void,\r\n /** Invoked for intermediate events. Return `false` to prevent outside click. */\r\n outsideEventPredicate?: (e: OutsideClickEvent) => boolean,\r\n) {\r\n const handleMouseEvents = React.useRef(true);\r\n const handleMouseEventsTimer = React.useRef(new Timer(1000));\r\n const ref = React.useRef<T>(null);\r\n const isDownOutside = React.useRef(false);\r\n React.useEffect(() => {\r\n const listener = (e: OutsideClickEvent) => {\r\n if (e.type === \"touchstart\") {\r\n // Skip mouse event handlers after touch event.\r\n handleMouseEvents.current = false;\r\n handleMouseEventsTimer.current.start();\r\n } else if (e.type === \"mousedown\" && !handleMouseEvents.current) {\r\n return;\r\n }\r\n const isOutsideEvent = !outsideEventPredicate || outsideEventPredicate(e);\r\n isDownOutside.current = (!!ref.current && (e.target instanceof Node) && !ref.current.contains(e.target)) && isOutsideEvent;\r\n };\r\n if (hasPointerEventsSupport()) {\r\n document.addEventListener(\"pointerdown\", listener);\r\n } else {\r\n document.addEventListener(\"mousedown\", listener);\r\n document.addEventListener(\"touchstart\", listener);\r\n }\r\n return () => {\r\n if (hasPointerEventsSupport()) {\r\n document.removeEventListener(\"pointerdown\", listener);\r\n } else {\r\n document.removeEventListener(\"mousedown\", listener);\r\n document.removeEventListener(\"touchstart\", listener);\r\n }\r\n };\r\n }, [outsideEventPredicate]);\r\n React.useEffect(() => {\r\n const listener = (e: OutsideClickEvent) => {\r\n if (e.type === \"mouseup\" && !handleMouseEvents.current) {\r\n return;\r\n }\r\n onOutsideClick && isDownOutside.current && (!outsideEventPredicate || outsideEventPredicate(e)) &&\r\n ref.current && e.target instanceof Node && !ref.current.contains(e.target) && onOutsideClick();\r\n isDownOutside.current = false;\r\n };\r\n if (hasPointerEventsSupport()) {\r\n document.addEventListener(\"pointerup\", listener);\r\n } else {\r\n document.addEventListener(\"mouseup\", listener);\r\n document.addEventListener(\"touchend\", listener);\r\n }\r\n return () => {\r\n if (hasPointerEventsSupport()) {\r\n document.removeEventListener(\"pointerup\", listener);\r\n } else {\r\n document.removeEventListener(\"mouseup\", listener);\r\n document.removeEventListener(\"touchend\", listener);\r\n }\r\n };\r\n }, [onOutsideClick, outsideEventPredicate]);\r\n React.useEffect(() => {\r\n const listener = () => {\r\n handleMouseEvents.current = true;\r\n };\r\n const timer = handleMouseEventsTimer.current;\r\n timer.setOnExecute(listener);\r\n return () => {\r\n timer.setOnExecute(undefined);\r\n };\r\n }, []);\r\n return ref;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProximityToMouse.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useProximityToMouse.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,gBAAgB;AAChB,qBAAa,gBAAiB,SAAQ,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useProximityToMouse.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useProximityToMouse.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,gBAAgB;AAChB,qBAAa,gBAAiB,SAAQ,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;CAAG;AAEtE;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAClB,gBAAgB,SACtB,OAAO,+BAkCd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,kCAAkC,OAAO,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,uBAAuB,cACvB,MAAM,SACX,OAAO,yBAEZ,MAIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,mBAAoB,MAAM,KAAG,MAEhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,mBAAoB,MAAM,KAAG,MAElE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,mBAAoB,MAAM,KAAG,MAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,YAAa,MAAM,KAAG,MAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,YAAa,MAAM,KAAG,MAErD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,eAAgB,MAAM,KAAG,MAE7D,CAAC"}
|
|
@@ -59,7 +59,7 @@ export const TOOLBAR_BACKDROP_FILTER_BLUR_DEFAULT = 10;
|
|
|
59
59
|
* @internal
|
|
60
60
|
*/
|
|
61
61
|
export const calculateProximityScale = (proximity, snap = false, threshold = PROXIMITY_THRESHOLD_DEFAULT) => {
|
|
62
|
-
let scale = (
|
|
62
|
+
let scale = (proximity < threshold ? threshold - proximity : 0) / threshold;
|
|
63
63
|
if (snap && scale > 0)
|
|
64
64
|
scale = 1.0;
|
|
65
65
|
return scale;
|
|
@@ -86,7 +86,7 @@ export const calculateBackdropFilterBlur = (proximityScale) => {
|
|
|
86
86
|
* @internal
|
|
87
87
|
*/
|
|
88
88
|
export const getToolbarBackgroundColor = (opacity) => {
|
|
89
|
-
return `
|
|
89
|
+
return `hsl(var(--iui-color-background-hsl) / ${opacity})`;
|
|
90
90
|
};
|
|
91
91
|
/** Gets the Toolbar box-shadow based on a given opacity.
|
|
92
92
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProximityToMouse.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useProximityToMouse.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,gBAAgB;AAChB,MAAM,OAAO,gBAAiB,SAAQ,GAA6B;
|
|
1
|
+
{"version":3,"file":"useProximityToMouse.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useProximityToMouse.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,gBAAgB;AAChB,MAAM,OAAO,gBAAiB,SAAQ,GAA6B;CAAG;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,UAA4B,EAC5B,OAAgB,KAAK,EACrB,SAAS,GAAG,2BAA2B,EACvC,EAAE;IACF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEhE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,yBAAyB,GAAG,CAAC,CAAe,EAAE,EAAE;YACpD,IAAI,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;YAEhD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;gBAC5B,uBAAuB;gBACvB,IAAI,GAAG,CAAC,OAAO,E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AAG,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAC5E,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC;QAAE,KAAK,GAAG,GAAG,CAAC;IACnC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,cAAsB,EAAU,EAAE;IACxE,OAAO,uBAAuB,GAAG,cAAc,CAAC;AAClD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,cAAsB,EAAU,EAAE;IAC1E,OAAO,kCAAkC,GAAG,cAAc,CAAC;AAC7D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,cAAsB,EAAU,EAAE;IAC5E,OAAO,oCAAoC,GAAG,cAAc,CAAC;AAC/D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAU,EAAE;IACnE,OAAO,yCAAyC,OAAO,GAAG,CAAC;AAC7D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAU,EAAE;IAC7D,OAAO,6BAA6B,OAAO,GAAG,CAAC;AACjD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACrE,OAAO,QAAQ,UAAU,KAAK,CAAC;AACjC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Point } from \"../Point\";\r\nimport { Rectangle } from \"../Rectangle\";\r\n\r\n/** @internal */\r\nexport class WidgetElementSet extends Set<React.RefObject<Element>> {}\r\n\r\n/** Returns the proximity scale associated with the shortest distance from the element(s) to the mouse.\r\n * @internal\r\n */\r\nexport const useProximityToMouse = (\r\n elementSet: WidgetElementSet,\r\n snap: boolean = false,\r\n threshold = PROXIMITY_THRESHOLD_DEFAULT\r\n) => {\r\n const [proximityScale, setProximityScale] = React.useState(1.0);\r\n\r\n React.useEffect(() => {\r\n const handleDocumentPointerMove = (e: PointerEvent) => {\r\n let shortestProximity = Number.MAX_SAFE_INTEGER;\r\n\r\n for (const ref of elementSet) {\r\n // istanbul ignore else\r\n if (ref.current) {\r\n const clientRect = ref.current.getBoundingClientRect();\r\n const rectangle = Rectangle.create(clientRect);\r\n const point = new Point(e.pageX, e.pageY);\r\n shortestProximity = Math.min(\r\n rectangle.getShortestDistanceToPoint(point),\r\n shortestProximity\r\n );\r\n }\r\n }\r\n\r\n const scale = calculateProximityScale(shortestProximity, snap, threshold);\r\n if (scale !== proximityScale) setProximityScale(scale);\r\n };\r\n\r\n document.addEventListener(\"pointermove\", handleDocumentPointerMove);\r\n\r\n return () => {\r\n document.removeEventListener(\"pointermove\", handleDocumentPointerMove);\r\n };\r\n }, [elementSet, proximityScale, snap, threshold]);\r\n\r\n return proximityScale;\r\n};\r\n\r\n/** Default proximity threshold.\r\n * @internal\r\n */\r\nexport const PROXIMITY_THRESHOLD_DEFAULT = 100;\r\n\r\n/** Default toolbar opacity.\r\n * @internal\r\n */\r\nexport const TOOLBAR_OPACITY_DEFAULT = 0.5;\r\n\r\n/** Default toolbar box-shadow opacity.\r\n * @internal\r\n */\r\nexport const TOOLBAR_BOX_SHADOW_OPACITY_DEFAULT = 0.35;\r\n\r\n/** Default toolbar backdrop-filter blur.\r\n * @internal\r\n */\r\nexport const TOOLBAR_BACKDROP_FILTER_BLUR_DEFAULT = 10;\r\n\r\n/** Calculates a proximity scale for further calculations given the proximity and threshold.\r\n * @internal\r\n */\r\nexport const calculateProximityScale = (\r\n proximity: number,\r\n snap: boolean = false,\r\n threshold = PROXIMITY_THRESHOLD_DEFAULT\r\n): number => {\r\n let scale = (proximity < threshold ? threshold - proximity : 0) / threshold;\r\n if (snap && scale > 0) scale = 1.0;\r\n return scale;\r\n};\r\n\r\n/** Calculates a toolbar opacity based on a given proximity scale.\r\n * @internal\r\n */\r\nexport const calculateToolbarOpacity = (proximityScale: number): number => {\r\n return TOOLBAR_OPACITY_DEFAULT * proximityScale;\r\n};\r\n\r\n/** Calculates a box-shadow opacity based on a given proximity scale.\r\n * @internal\r\n */\r\nexport const calculateBoxShadowOpacity = (proximityScale: number): number => {\r\n return TOOLBAR_BOX_SHADOW_OPACITY_DEFAULT * proximityScale;\r\n};\r\n\r\n/** Calculates a backdrop-filter blur based on a given proximity scale.\r\n * @internal\r\n */\r\nexport const calculateBackdropFilterBlur = (proximityScale: number): number => {\r\n return TOOLBAR_BACKDROP_FILTER_BLUR_DEFAULT * proximityScale;\r\n};\r\n\r\n/** Gets the Toolbar background-color based on a given opacity.\r\n * @internal\r\n */\r\nexport const getToolbarBackgroundColor = (opacity: number): string => {\r\n return `hsl(var(--iui-color-background-hsl) / ${opacity})`;\r\n};\r\n\r\n/** Gets the Toolbar box-shadow based on a given opacity.\r\n * @internal\r\n */\r\nexport const getToolbarBoxShadow = (opacity: number): string => {\r\n return `0 1px 3px 0 rgba(0, 0, 0, ${opacity})`;\r\n};\r\n\r\n/** Gets the Toolbar backdrop-filter based on a given blur amount.\r\n * @internal\r\n */\r\nexport const getToolbarBackdropFilter = (filterBlur: number): string => {\r\n return `blur(${filterBlur}px)`;\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRefEffect.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefEffect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,UAAU,YAAY,CAAI,QAAuD,EAAE,IAAwB;IAC/G,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAsB,IAAI,CAAC,CAAC;IACxD,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,QAAkB,EAAE,EAAE;QAC9C,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,CAAC,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;IACpD,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,kDAAkD;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 Utilities\n */\n\nimport * as React from \"react\";\n\n/** Returns callback ref that is easy to setup and cleanup (API wise similar to React.useEffect).\n * @internal\n */\nexport function useRefEffect<T>(callback: (instance: T | null) => (void | (() => void)), deps: ReadonlyArray<any>) {\n const cleanup = React.useRef<(() => void) | null>(null);\n return React.useCallback((instance: T | null) => {\n cleanup.current && cleanup.current();\n const newCleanup = callback(instance);\n cleanup.current = !newCleanup ? null : newCleanup;\n }, deps); // eslint-disable-line react-hooks/exhaustive-deps\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useRefEffect.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefEffect.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,UAAU,YAAY,CAAI,QAAuD,EAAE,IAAwB;IAC/G,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAsB,IAAI,CAAC,CAAC;IACxD,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,QAAkB,EAAE,EAAE;QAC9C,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,CAAC,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;IACpD,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,kDAAkD;AAC9D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\n/** Returns callback ref that is easy to setup and cleanup (API wise similar to React.useEffect).\r\n * @internal\r\n */\r\nexport function useRefEffect<T>(callback: (instance: T | null) => (void | (() => void)), deps: ReadonlyArray<any>) {\r\n const cleanup = React.useRef<(() => void) | null>(null);\r\n return React.useCallback((instance: T | null) => {\r\n cleanup.current && cleanup.current();\r\n const newCleanup = callback(instance);\r\n cleanup.current = !newCleanup ? null : newCleanup;\r\n }, deps); // eslint-disable-line react-hooks/exhaustive-deps\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRefState.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefState.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAK,CAAC;IAClD,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAkB,EAAE,EAAE;QACnD,UAAU,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;IACpC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxB,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\";\n\n/** Hook used to store an HTMLElement in state by using ref callback returned from hook.\n * *Example:*\n * ``` tsx\n * const [divElementRef, divElement] = useRefState<HTMLDivElement>();\n * const ownerDoc = divElement?.ownerDocument ?? document;\n *\n * return (\n * <div ref={divElementRef} >\n * ....\n * </div>\n * );\n * ```\n * }\n\n * @internal\n */\nexport function useRefState<T>(): [React.Ref<T>, T | undefined] {\n const [element, setElement] = React.useState<T>();\n const ref = React.useCallback((instance: T | null) => {\n setElement(instance || undefined);\n }, []);\n return [ref, element];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useRefState.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefState.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAK,CAAC;IAClD,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,QAAkB,EAAE,EAAE;QACnD,UAAU,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;IACpC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\n/** Hook used to store an HTMLElement in state by using ref callback returned from hook.\r\n * *Example:*\r\n * ``` tsx\r\n * const [divElementRef, divElement] = useRefState<HTMLDivElement>();\r\n * const ownerDoc = divElement?.ownerDocument ?? document;\r\n *\r\n * return (\r\n * <div ref={divElementRef} >\r\n * ....\r\n * </div>\r\n * );\r\n * ```\r\n * }\r\n\r\n * @internal\r\n */\r\nexport function useRefState<T>(): [React.Ref<T>, T | undefined] {\r\n const [element, setElement] = React.useState<T>();\r\n const ref = React.useCallback((instance: T | null) => {\r\n setElement(instance || undefined);\r\n }, []);\r\n return [ref, element];\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
/** Hook used to combine multiple refs.
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare function useRefs<T>(...refs: ReadonlyArray<React.Ref<T
|
|
8
|
+
export declare function useRefs<T>(...refs: ReadonlyArray<React.Ref<T> | undefined>): (instance: T | null) => void;
|
|
9
9
|
/** Used to combine multiple refs for a class component.
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRefs.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefs.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"useRefs.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefs.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,cACrC,CAAC,GAAG,IAAI,UAY7C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,cAC5C,CAAC,GAAG,IAAI,UAY5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRefs.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefs.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,+BAA+B;AAC/B,SAAS,aAAa,CAAI,GAAiB;IACzC,OAAO,OAAO,GAAG,KAAK,UAAU,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"useRefs.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useRefs.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,+BAA+B;AAC/B,SAAS,aAAa,CAAI,GAAiB;IACzC,OAAO,OAAO,GAAG,KAAK,UAAU,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAI,GAAG,IAA6C;IACzE,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,QAAkB,EAAE,EAAE;QAC9C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,uBAAuB;YACvB,IAAI,GAAG,EAAE;gBACP,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE;oBACtB,GAAG,CAAC,QAAQ,CAAC,CAAC;iBACf;qBAAM;oBACJ,GAAwC,CAAC,OAAO,GAAG,QAAQ,CAAC;iBAC9D;aACF;SACF;IACH,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,kDAAkD;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAI,GAAG,IAAiC;IAC/D,OAAO,CAAC,CAAC,QAAkB,EAAE,EAAE;QAC7B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,uBAAuB;YACvB,IAAI,GAAG,EAAE;gBACP,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE;oBACtB,GAAG,CAAC,QAAQ,CAAC,CAAC;iBACf;qBAAM;oBACJ,GAAwC,CAAC,OAAO,GAAG,QAAQ,CAAC;iBAC9D;aACF;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\n/** Callback ref type guard. */\r\nfunction isRefCallback<T>(ref: React.Ref<T>): ref is (_: T | null) => void {\r\n return typeof ref === \"function\";\r\n}\r\n\r\n/** Hook used to combine multiple refs.\r\n * @internal\r\n */\r\nexport function useRefs<T>(...refs: ReadonlyArray<React.Ref<T> | undefined>) {\r\n return React.useCallback((instance: T | null) => {\r\n for (const ref of refs) {\r\n // istanbul ignore else\r\n if (ref) {\r\n if (isRefCallback(ref)) {\r\n ref(instance);\r\n } else {\r\n (ref as React.MutableRefObject<T | null>).current = instance;\r\n }\r\n }\r\n }\r\n }, [...refs]); // eslint-disable-line react-hooks/exhaustive-deps\r\n}\r\n\r\n/** Used to combine multiple refs for a class component.\r\n * @internal\r\n */\r\nexport function mergeRefs<T>(...refs: ReadonlyArray<React.Ref<T>>) {\r\n return ((instance: T | null) => {\r\n for (const ref of refs) {\r\n // istanbul ignore else\r\n if (ref) {\r\n if (isRefCallback(ref)) {\r\n ref(instance);\r\n } else {\r\n (ref as React.MutableRefObject<T | null>).current = instance;\r\n }\r\n }\r\n }\r\n });\r\n}\r\n"]}
|
|
@@ -20,20 +20,18 @@ export function useResizeObserver(onResize) {
|
|
|
20
20
|
const owningWindowRef = React.useRef(null);
|
|
21
21
|
// istanbul ignore next
|
|
22
22
|
const resizeObserverCleanup = () => {
|
|
23
|
-
var _a;
|
|
24
23
|
if (rafRef.current)
|
|
25
24
|
owningWindowRef.current.cancelAnimationFrame(rafRef.current);
|
|
26
|
-
|
|
25
|
+
resizeObserver.current?.disconnect();
|
|
27
26
|
resizeObserver.current = null;
|
|
28
27
|
};
|
|
29
28
|
React.useEffect(() => {
|
|
30
29
|
isMountedRef.current = true;
|
|
31
30
|
return () => {
|
|
32
|
-
var _a;
|
|
33
31
|
isMountedRef.current = false;
|
|
34
32
|
if (rafRef.current)
|
|
35
33
|
owningWindowRef.current.cancelAnimationFrame(rafRef.current);
|
|
36
|
-
|
|
34
|
+
owningWindowRef.current?.removeEventListener("beforeunload", resizeObserverCleanup);
|
|
37
35
|
};
|
|
38
36
|
}, []);
|
|
39
37
|
const processResize = React.useCallback((target) => {
|
|
@@ -70,8 +68,7 @@ export function useResizeObserver(onResize) {
|
|
|
70
68
|
setBounds(newBounds);
|
|
71
69
|
}
|
|
72
70
|
return () => {
|
|
73
|
-
|
|
74
|
-
instance && ( /* istanbul ignore next */(_a = resizeObserver.current) === null || _a === void 0 ? void 0 : _a.unobserve(instance));
|
|
71
|
+
instance && ( /* istanbul ignore next */resizeObserver.current?.unobserve(instance));
|
|
75
72
|
resizeObserver.current = null;
|
|
76
73
|
};
|
|
77
74
|
}, [handleResize, onResize]);
|
|
@@ -92,8 +89,8 @@ export function useResizeObserver(onResize) {
|
|
|
92
89
|
* @internal
|
|
93
90
|
*/
|
|
94
91
|
export function useLayoutResizeObserver(inElement, onResize) {
|
|
95
|
-
const inBoundingRect = inElement
|
|
96
|
-
const [bounds, setBounds] = React.useState({ width: inBoundingRect
|
|
92
|
+
const inBoundingRect = inElement?.getBoundingClientRect();
|
|
93
|
+
const [bounds, setBounds] = React.useState({ width: inBoundingRect?.width, height: inBoundingRect?.height });
|
|
97
94
|
const [watchedElement, setWatchedElement] = React.useState(inElement);
|
|
98
95
|
const resizeObserver = React.useRef(null);
|
|
99
96
|
const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active
|
|
@@ -101,10 +98,9 @@ export function useLayoutResizeObserver(inElement, onResize) {
|
|
|
101
98
|
const owningWindowRef = React.useRef(null);
|
|
102
99
|
// istanbul ignore next
|
|
103
100
|
const resizeObserverCleanup = () => {
|
|
104
|
-
var _a;
|
|
105
101
|
if (rafRef.current)
|
|
106
102
|
owningWindowRef.current.cancelAnimationFrame(rafRef.current);
|
|
107
|
-
|
|
103
|
+
resizeObserver.current?.disconnect();
|
|
108
104
|
resizeObserver.current = null;
|
|
109
105
|
};
|
|
110
106
|
React.useEffect(() => {
|
|
@@ -155,9 +151,8 @@ export function useLayoutResizeObserver(inElement, onResize) {
|
|
|
155
151
|
resizeObserver.current = new ResizeObserver(handleResize);
|
|
156
152
|
resizeObserver.current.observe(watchedElement);
|
|
157
153
|
return () => {
|
|
158
|
-
var _a;
|
|
159
154
|
// istanbul ignore next
|
|
160
|
-
|
|
155
|
+
resizeObserver.current?.disconnect();
|
|
161
156
|
resizeObserver.current = null;
|
|
162
157
|
};
|
|
163
158
|
}, [handleResize, watchedElement]);
|
|
@@ -193,7 +188,7 @@ export function ResizableContainerObserver({ onResize, children }) {
|
|
|
193
188
|
}, [hasChildren]);
|
|
194
189
|
const processResize = React.useCallback((width, height) => {
|
|
195
190
|
// istanbul ignore next
|
|
196
|
-
onResize(width
|
|
191
|
+
onResize(width ?? 0, height ?? 0);
|
|
197
192
|
}, [onResize]);
|
|
198
193
|
useLayoutResizeObserver(containerElement, processResize);
|
|
199
194
|
const style = hasChildren ? { width: "100%", height: "100%" } : { display: "none" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;IAEI;AACJ,MAAM,UAAU,iBAAiB,CAAoB,QAAkD;IACrG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAE,kEAAkE;IACnG,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAM,IAAI,CAAC,CAAC;IAEhD,uBAAuB;IACvB,MAAM,qBAAqB,GAAG,GAAG,EAAE;;QACjC,IAAI,MAAM,CAAC,OAAO;YAChB,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAA,cAAc,CAAC,OAAO,0CAAE,UAAU,EAAE,CAAC;QACrC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;IAChC,CAAC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE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,GAAG,IAAI,CAAC;YAC5B,MAAM,SAAS,GAAG,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC;YACvD,mBAAmB,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAC3G;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAc,EAAE,MAAe,EAAE,EAAE;QAC1E,uBAAuB;QACvB,QAAQ,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,uBAAuB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACzD,MAAM,KAAK,GAAwB,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAEzG,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,4BAA4B,EAAC,KAAK,EAAE,KAAK,IACxE,WAAW,IAAI,QAAQ,CACpB,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 Utilities\n */\nimport * as React from \"react\";\nimport { ResizeObserver } from \"./ResizeObserverPolyfill\";\nimport { useRefEffect } from \"./useRefEffect\";\nimport { useRefs } from \"./useRefs\";\n\n/** Uses ResizeObserver API to notify about element bound changes.\n * @internal\n */\nexport function useResizeObserver<T extends Element>(onResize?: (width: number, height: number) => void) {\n const [bounds, setBounds] = React.useState({ width: 0, height: 0 });\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\n const isMountedRef = React.useRef(false);\n const owningWindowRef = React.useRef<any>(null);\n\n // istanbul ignore next\n const resizeObserverCleanup = () => {\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n owningWindowRef.current?.removeEventListener(\"beforeunload\", resizeObserverCleanup);\n };\n }, []);\n\n const processResize = React.useCallback((target: HTMLElement) => {\n const newBounds = target.getBoundingClientRect();\n // istanbul ignore else\n if (isMountedRef.current && (bounds.width !== newBounds.width || bounds.height !== newBounds.height)) {\n setBounds(newBounds);\n onResize && onResize(newBounds.width, newBounds.height);\n }\n }, [onResize, bounds.height, bounds.width]);\n\n const handleResize = React.useCallback((entries: any[]) => {\n // istanbul ignore if\n if (!isMountedRef.current || !Array.isArray(entries) || 0 === entries.length) {\n return;\n }\n const target = entries[0].target as HTMLElement;\n // istanbul ignore next\n owningWindowRef.current && owningWindowRef.current.removeEventListener(\"beforeunload\", resizeObserverCleanup);\n\n owningWindowRef.current = target.ownerDocument.defaultView;\n // istanbul ignore else\n if (owningWindowRef.current) {\n owningWindowRef.current.addEventListener(\"unload\", resizeObserverCleanup);\n\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() => processResize(target));\n }\n }, [processResize]);\n\n const observerRef = useRefEffect((instance: T | null) => {\n resizeObserver.current = new ResizeObserver(handleResize);\n if (instance) {\n resizeObserver.current.observe(instance);\n const newBounds = instance.getBoundingClientRect();\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n\n return () => {\n instance && ( /* istanbul ignore next */resizeObserver.current?.unobserve(instance));\n resizeObserver.current = null;\n };\n }, [handleResize, onResize]);\n\n const handleRef = React.useCallback((instance: Element | null) => {\n const newBounds = instance && instance.getBoundingClientRect();\n // istanbul ignore if\n if (newBounds && (bounds.width !== newBounds.width || bounds.height !== newBounds.height)) {\n setBounds(newBounds);\n onResize && onResize(newBounds.width, newBounds.height);\n }\n }, [bounds.height, bounds.width, onResize]);\n\n const ref = useRefs(handleRef, observerRef);\n return ref;\n}\n\n/** React hook that uses ResizeObserver API to notify about element bound changes. Note: to work similar to ReactResizeDetector\n * width and height are initialized as undefined and only set during after mount if bounds are non-zero. This implementation properly\n * handles observing element in pop-out/child windows.\n * @internal\n */\nexport function useLayoutResizeObserver(inElement: HTMLElement | null, onResize?: (width?: number, height?: number) => void) {\n const inBoundingRect = inElement?.getBoundingClientRect();\n const [bounds, setBounds] = React.useState<{ width?: number, height?: number }>({ width: inBoundingRect?.width, height: inBoundingRect?.height });\n const [watchedElement, setWatchedElement] = React.useState(inElement);\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\n const isMountedRef = React.useRef(false);\n const owningWindowRef = React.useRef<any>(null);\n\n // istanbul ignore next\n const resizeObserverCleanup = () => {\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n\n React.useEffect(() => {\n isMountedRef.current = true;\n setWatchedElement(inElement);\n\n // istanbul ignore next\n if (inElement) {\n const newBounds = inElement.getBoundingClientRect();\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n\n return () => {\n isMountedRef.current = false;\n (rafRef.current && owningWindowRef.current) && owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n owningWindowRef.current && owningWindowRef.current.removeEventListener(\"beforeunload\", resizeObserverCleanup);\n };\n }, [onResize, inElement]);\n\n const processResize = React.useCallback((target: HTMLElement) => {\n const newBounds = target.getBoundingClientRect();\n // istanbul ignore next\n if (isMountedRef.current && (bounds.width !== newBounds.width || bounds.height !== newBounds.height)) {\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n }, [bounds.height, bounds.width, onResize]);\n\n const handleResize = React.useCallback((entries: any[]) => {\n // istanbul ignore next\n if (!isMountedRef.current || !Array.isArray(entries) || 0 === entries.length) {\n return;\n }\n const target = entries[0].target as HTMLElement;\n // istanbul ignore next\n if (owningWindowRef.current)\n owningWindowRef.current.removeEventListener(\"beforeunload\", resizeObserverCleanup);\n\n owningWindowRef.current = target.ownerDocument.defaultView;\n // istanbul ignore else\n if (owningWindowRef.current) {\n owningWindowRef.current.addEventListener(\"unload\", resizeObserverCleanup);\n\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() => processResize(target));\n }\n }, [processResize]);\n\n React.useLayoutEffect(() => {\n if (!watchedElement) {\n return;\n }\n resizeObserver.current = new ResizeObserver(handleResize);\n resizeObserver.current.observe(watchedElement);\n return () => {\n // istanbul ignore next\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n }, [handleResize, watchedElement]);\n\n return [bounds.width, bounds.height];\n}\n\n/** Prop the ElementResizeObserver sends to the render function.\n * @public\n */\nexport interface RenderPropsArgs {\n width?: number;\n height?: number;\n}\n\n/** ElementResizeObserver provides functionality similar to ReactResizeDetector when a render function is specified. This implementation properly handles\n * observing element in pop-out/child windows.\n * @public\n */\nexport function ElementResizeObserver({ watchedElement, render }: { watchedElement: HTMLElement | null, render: (props: RenderPropsArgs) => JSX.Element }) {\n const [width, height] = useLayoutResizeObserver(watchedElement);\n return render({ width, height });\n}\n\n/** ResizableContainerObserver is a component that provides the functionality similar to the ReactResizeDetector option that call a function when\n * the observed element is resized. This implementation properly handles observing element in pop-out/child windows. If children nodes are defined then\n * the div added by the component is considered the container whose size will be observed. If no children are provided then the component will report\n * size changes from its parent container.\n * @public\n */\nexport function ResizableContainerObserver({ onResize, children }: { onResize: (width: number, height: number) => void, children?: React.ReactNode }) {\n const containerRef = React.useRef<HTMLDivElement>(null); // set to non-zero when requestAnimationFrame processing is active\n const [containerElement, setContainerElement] = React.useState<HTMLElement | null>(null);\n const isMountedRef = React.useRef(false);\n const hasChildren = React.Children.count(children) !== 0;\n\n // if no children are specified then monitor size of parent element.\n React.useEffect(() => {\n // istanbul ignore next\n if (!isMountedRef.current && containerRef.current) {\n isMountedRef.current = true;\n const hasParent = !!containerRef.current.parentElement;\n setContainerElement(hasChildren && hasParent ? containerRef.current : containerRef.current.parentElement);\n }\n }, [hasChildren]);\n\n const processResize = React.useCallback((width?: number, height?: number) => {\n // istanbul ignore next\n onResize(width ?? 0, height ?? 0);\n }, [onResize]);\n\n useLayoutResizeObserver(containerElement, processResize);\n const style: React.CSSProperties = hasChildren ? { width: \"100%\", height: \"100%\" } : { display: \"none\" };\n\n return (\n <div ref={containerRef} className=\"uicore-resizable-container\" style={style}>\n {hasChildren && children}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;IAEI;AACJ,MAAM,UAAU,iBAAiB,CAAoB,QAAkD;IACrG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,Q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AAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAEzG,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,4BAA4B,EAAC,KAAK,EAAE,KAAK,IACxE,WAAW,IAAI,QAAQ,CACpB,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\nimport * as React from \"react\";\r\nimport { ResizeObserver } from \"./ResizeObserverPolyfill\";\r\nimport { useRefEffect } from \"./useRefEffect\";\r\nimport { useRefs } from \"./useRefs\";\r\n\r\n/** Uses ResizeObserver API to notify about element bound changes.\r\n * @internal\r\n */\r\nexport function useResizeObserver<T extends Element>(onResize?: (width: number, height: number) => void) {\r\n const [bounds, setBounds] = React.useState({ width: 0, height: 0 });\r\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\r\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\r\n const isMountedRef = React.useRef(false);\r\n const owningWindowRef = React.useRef<any>(null);\r\n\r\n // istanbul ignore next\r\n const resizeObserverCleanup = () => {\r\n if (rafRef.current)\r\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\r\n\r\n resizeObserver.current?.disconnect();\r\n resizeObserver.current = null;\r\n };\r\n\r\n React.useEffect(() => {\r\n isMountedRef.current = true;\r\n return () => {\r\n isMountedRef.current = false;\r\n if (rafRef.current)\r\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\r\n owningWindowRef.current?.removeEventListener(\"beforeunload\", resizeObserverCleanup);\r\n };\r\n }, []);\r\n\r\n const processResize = React.useCallback((target: HTMLElement) => {\r\n const newBounds = target.getBoundingClientRect();\r\n // istanbul ignore else\r\n if (isMountedRef.current && (bounds.width !== newBounds.width || bounds.height !== newBounds.height)) {\r\n setBounds(newBounds);\r\n onResize && onResize(newBounds.width, newBounds.height);\r\n }\r\n }, [onResize, bounds.height, bounds.width]);\r\n\r\n const handleResize = React.useCallback((entries: any[]) => {\r\n // istanbul ignore if\r\n if (!isMountedRef.current || !Array.isArray(entries) || 0 === entries.length) {\r\n return;\r\n }\r\n const target = entries[0].target as HTMLElement;\r\n // istanbul ignore next\r\n owningWindowRef.current && owningWindowRef.current.removeEventListener(\"beforeunload\", resizeObserverCleanup);\r\n\r\n owningWindowRef.current = target.ownerDocument.defaultView;\r\n // istanbul ignore else\r\n if (owningWindowRef.current) {\r\n owningWindowRef.current.addEventListener(\"unload\", resizeObserverCleanup);\r\n\r\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\r\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\r\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() => processResize(target));\r\n }\r\n }, [processResize]);\r\n\r\n const observerRef = useRefEffect((instance: T | null) => {\r\n resizeObserver.current = new ResizeObserver(handleResize);\r\n if (instance) {\r\n resizeObserver.current.observe(instance);\r\n const newBounds = instance.getBoundingClientRect();\r\n onResize && onResize(newBounds.width, newBounds.height);\r\n setBounds(newBounds);\r\n }\r\n\r\n return () => {\r\n instance && ( /* istanbul ignore next */resizeObserver.current?.unobserve(instance));\r\n resizeObserver.current = null;\r\n };\r\n }, [handleResize, onResize]);\r\n\r\n const handleRef = React.useCallback((instance: Element | null) => {\r\n const newBounds = instance && instance.getBoundingClientRect();\r\n // istanbul ignore if\r\n if (newBounds && (bounds.width !== newBounds.width || bounds.height !== newBounds.height)) {\r\n setBounds(newBounds);\r\n onResize && onResize(newBounds.width, newBounds.height);\r\n }\r\n }, [bounds.height, bounds.width, onResize]);\r\n\r\n const ref = useRefs(handleRef, observerRef);\r\n return ref;\r\n}\r\n\r\n/** React hook that uses ResizeObserver API to notify about element bound changes. Note: to work similar to ReactResizeDetector\r\n * width and height are initialized as undefined and only set during after mount if bounds are non-zero. This implementation properly\r\n * handles observing element in pop-out/child windows.\r\n * @internal\r\n */\r\nexport function useLayoutResizeObserver(inElement: HTMLElement | null, onResize?: (width?: number, height?: number) => void) {\r\n const inBoundingRect = inElement?.getBoundingClientRect();\r\n const [bounds, setBounds] = React.useState<{ width?: number, height?: number }>({ width: inBoundingRect?.width, height: inBoundingRect?.height });\r\n const [watchedElement, setWatchedElement] = React.useState(inElement);\r\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\r\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\r\n const isMountedRef = React.useRef(false);\r\n const owningWindowRef = React.useRef<any>(null);\r\n\r\n // istanbul ignore next\r\n const resizeObserverCleanup = () => {\r\n if (rafRef.current)\r\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\r\n\r\n resizeObserver.current?.disconnect();\r\n resizeObserver.current = null;\r\n };\r\n\r\n React.useEffect(() => {\r\n isMountedRef.current = true;\r\n setWatchedElement(inElement);\r\n\r\n // istanbul ignore next\r\n if (inElement) {\r\n const newBounds = inElement.getBoundingClientRect();\r\n onResize && onResize(newBounds.width, newBounds.height);\r\n setBounds(newBounds);\r\n }\r\n\r\n return () => {\r\n isMountedRef.current = false;\r\n (rafRef.current && owningWindowRef.current) && owningWindowRef.current.cancelAnimationFrame(rafRef.current);\r\n owningWindowRef.current && owningWindowRef.current.removeEventListener(\"beforeunload\", resizeObserverCleanup);\r\n };\r\n }, [onResize, inElement]);\r\n\r\n const processResize = React.useCallback((target: HTMLElement) => {\r\n const newBounds = target.getBoundingClientRect();\r\n // istanbul ignore next\r\n if (isMountedRef.current && (bounds.width !== newBounds.width || bounds.height !== newBounds.height)) {\r\n onResize && onResize(newBounds.width, newBounds.height);\r\n setBounds(newBounds);\r\n }\r\n }, [bounds.height, bounds.width, onResize]);\r\n\r\n const handleResize = React.useCallback((entries: any[]) => {\r\n // istanbul ignore next\r\n if (!isMountedRef.current || !Array.isArray(entries) || 0 === entries.length) {\r\n return;\r\n }\r\n const target = entries[0].target as HTMLElement;\r\n // istanbul ignore next\r\n if (owningWindowRef.current)\r\n owningWindowRef.current.removeEventListener(\"beforeunload\", resizeObserverCleanup);\r\n\r\n owningWindowRef.current = target.ownerDocument.defaultView;\r\n // istanbul ignore else\r\n if (owningWindowRef.current) {\r\n owningWindowRef.current.addEventListener(\"unload\", resizeObserverCleanup);\r\n\r\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\r\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\r\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() => processResize(target));\r\n }\r\n }, [processResize]);\r\n\r\n React.useLayoutEffect(() => {\r\n if (!watchedElement) {\r\n return;\r\n }\r\n resizeObserver.current = new ResizeObserver(handleResize);\r\n resizeObserver.current.observe(watchedElement);\r\n return () => {\r\n // istanbul ignore next\r\n resizeObserver.current?.disconnect();\r\n resizeObserver.current = null;\r\n };\r\n }, [handleResize, watchedElement]);\r\n\r\n return [bounds.width, bounds.height];\r\n}\r\n\r\n/** Prop the ElementResizeObserver sends to the render function.\r\n * @public\r\n */\r\nexport interface RenderPropsArgs {\r\n width?: number;\r\n height?: number;\r\n}\r\n\r\n/** ElementResizeObserver provides functionality similar to ReactResizeDetector when a render function is specified. This implementation properly handles\r\n * observing element in pop-out/child windows.\r\n * @public\r\n */\r\nexport function ElementResizeObserver({ watchedElement, render }: { watchedElement: HTMLElement | null, render: (props: RenderPropsArgs) => JSX.Element }) {\r\n const [width, height] = useLayoutResizeObserver(watchedElement);\r\n return render({ width, height });\r\n}\r\n\r\n/** ResizableContainerObserver is a component that provides the functionality similar to the ReactResizeDetector option that call a function when\r\n * the observed element is resized. This implementation properly handles observing element in pop-out/child windows. If children nodes are defined then\r\n * the div added by the component is considered the container whose size will be observed. If no children are provided then the component will report\r\n * size changes from its parent container.\r\n * @public\r\n */\r\nexport function ResizableContainerObserver({ onResize, children }: { onResize: (width: number, height: number) => void, children?: React.ReactNode }) {\r\n const containerRef = React.useRef<HTMLDivElement>(null); // set to non-zero when requestAnimationFrame processing is active\r\n const [containerElement, setContainerElement] = React.useState<HTMLElement | null>(null);\r\n const isMountedRef = React.useRef(false);\r\n const hasChildren = React.Children.count(children) !== 0;\r\n\r\n // if no children are specified then monitor size of parent element.\r\n React.useEffect(() => {\r\n // istanbul ignore next\r\n if (!isMountedRef.current && containerRef.current) {\r\n isMountedRef.current = true;\r\n const hasParent = !!containerRef.current.parentElement;\r\n setContainerElement(hasChildren && hasParent ? containerRef.current : containerRef.current.parentElement);\r\n }\r\n }, [hasChildren]);\r\n\r\n const processResize = React.useCallback((width?: number, height?: number) => {\r\n // istanbul ignore next\r\n onResize(width ?? 0, height ?? 0);\r\n }, [onResize]);\r\n\r\n useLayoutResizeObserver(containerElement, processResize);\r\n const style: React.CSSProperties = hasChildren ? { width: \"100%\", height: \"100%\" } : { display: \"none\" };\r\n\r\n return (\r\n <div ref={containerRef} className=\"uicore-resizable-container\" style={style}>\r\n {hasChildren && children}\r\n </div>\r\n );\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTargeted.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useTargeted.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAA6B,EAAE,EAAE;IAC3D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,yBAAyB,GAAG,CAAC,CAAe,EAAE,EAAE;YACpD,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,YAAY,IAAI,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3G,CAAC,CAAC;QACF,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;QACpE,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,mBAAmB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;QACzE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACV,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\n\n/** Returns a stateful value that indicates if the component is targeted/hovered.\n * @internal\n */\nexport const useTargeted = (ref: React.RefObject<Element>) => {\n const [targeted, setTargeted] = React.useState(false);\n React.useEffect(() => {\n const handleDocumentPointerMove = (e: PointerEvent) => {\n setTargeted(!!ref.current && !!e.target && (e.target instanceof Node) && ref.current.contains(e.target));\n };\n document.addEventListener(\"pointermove\", handleDocumentPointerMove);\n return () => {\n document.removeEventListener(\"pointermove\", handleDocumentPointerMove);\n };\n }, [ref]);\n return targeted;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"useTargeted.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useTargeted.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAA6B,EAAE,EAAE;IAC3D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,yBAAyB,GAAG,CAAC,CAAe,EAAE,EAAE;YACpD,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,YAAY,IAAI,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3G,CAAC,CAAC;QACF,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;QACpE,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,mBAAmB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;QACzE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACV,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\n/** Returns a stateful value that indicates if the component is targeted/hovered.\r\n * @internal\r\n */\r\nexport const useTargeted = (ref: React.RefObject<Element>) => {\r\n const [targeted, setTargeted] = React.useState(false);\r\n React.useEffect(() => {\r\n const handleDocumentPointerMove = (e: PointerEvent) => {\r\n setTargeted(!!ref.current && !!e.target && (e.target instanceof Node) && ref.current.contains(e.target));\r\n };\r\n document.addEventListener(\"pointermove\", handleDocumentPointerMove);\r\n return () => {\r\n document.removeEventListener(\"pointermove\", handleDocumentPointerMove);\r\n };\r\n }, [ref]);\r\n return targeted;\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThrottledFn.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useThrottledFn.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAUlC,MAAM,cAAc,GAAqB;IACvC,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,kBAAqB,EACrB,QAAgB,EAChB,YAAkC,EAClC,UAA4B,cAAc;IAE1C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1E,uDAAuD;IACvD,OAAO,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,YAAY,CAAC,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 Utilities\n */\n\nimport * as React from \"react\";\nimport { throttle } from \"lodash\";\n\n/** lodash throttle options\n * @internal\n */\nexport interface ThrottleSettings {\n leading: boolean;\n trailing: boolean;\n}\n\nconst defaultOptions: ThrottleSettings = {\n leading: false,\n trailing: true,\n};\n\n/** Used to throttle function calls\n * @internal\n */\nexport function useThrottledFn<T extends (...args: any) => any>(\n functionToThrottle: T,\n waitTime: number,\n dependencies: React.DependencyList,\n options: ThrottleSettings = defaultOptions,\n) {\n const throttledFunction = throttle(functionToThrottle, waitTime, options);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(throttledFunction, dependencies);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useThrottledFn.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useThrottledFn.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAUlC,MAAM,cAAc,GAAqB;IACvC,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,kBAAqB,EACrB,QAAgB,EAChB,YAAkC,EAClC,UAA4B,cAAc;IAE1C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1E,uDAAuD;IACvD,OAAO,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { throttle } from \"lodash\";\r\n\r\n/** lodash throttle options\r\n * @internal\r\n */\r\nexport interface ThrottleSettings {\r\n leading: boolean;\r\n trailing: boolean;\r\n}\r\n\r\nconst defaultOptions: ThrottleSettings = {\r\n leading: false,\r\n trailing: true,\r\n};\r\n\r\n/** Used to throttle function calls\r\n * @internal\r\n */\r\nexport function useThrottledFn<T extends (...args: any) => any>(\r\n functionToThrottle: T,\r\n waitTime: number,\r\n dependencies: React.DependencyList,\r\n options: ThrottleSettings = defaultOptions,\r\n) {\r\n const throttledFunction = throttle(functionToThrottle, waitTime, options);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n return React.useCallback(throttledFunction, dependencies);\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWidgetOpacityContext.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useWidgetOpacityContext.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAA4B;IACjF,YAAY,EAAE,0BAA0B,CAAC,CAAC,WAAqC,EAAE,EAAE,CAAC,KAAK,EAAE;IAC3F,cAAc,EAAE,GAAG;CACpB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAChD,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\";\n\n/** Properties for [[WidgetOpacityContext]]\n * @internal\n */\nexport interface WidgetOpacityContextProps {\n readonly onElementRef: (elementRef: React.RefObject<Element>) => void;\n readonly proximityScale: number;\n}\n\n/**\n * Context used by Widgets and child components to process opacity changes based on mouse proximity.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const WidgetOpacityContext = React.createContext<WidgetOpacityContextProps>({\n onElementRef: /* istanbul ignore next */ (_elementRef: React.RefObject<Element>) => void {},\n proximityScale: 1.0,\n});\n\n/** Hook for using [[WidgetOpacityContext]]\n * @internal\n */\nexport function useWidgetOpacityContext() {\n return React.useContext(WidgetOpacityContext);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useWidgetOpacityContext.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useWidgetOpacityContext.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAA4B;IACjF,YAAY,EAAE,0BAA0B,CAAC,CAAC,WAAqC,EAAE,EAAE,CAAC,KAAK,EAAE;IAC3F,cAAc,EAAE,GAAG;CACpB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAChD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport * as React from \"react\";\r\n\r\n/** Properties for [[WidgetOpacityContext]]\r\n * @internal\r\n */\r\nexport interface WidgetOpacityContextProps {\r\n readonly onElementRef: (elementRef: React.RefObject<Element>) => void;\r\n readonly proximityScale: number;\r\n}\r\n\r\n/**\r\n * Context used by Widgets and child components to process opacity changes based on mouse proximity.\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const WidgetOpacityContext = React.createContext<WidgetOpacityContextProps>({\r\n onElementRef: /* istanbul ignore next */ (_elementRef: React.RefObject<Element>) => void {},\r\n proximityScale: 1.0,\r\n});\r\n\r\n/** Hook for using [[WidgetOpacityContext]]\r\n * @internal\r\n */\r\nexport function useWidgetOpacityContext() {\r\n return React.useContext(WidgetOpacityContext);\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPromiseLike.js","sourceRoot":"","sources":["../../../../src/core-react/utils/isPromiseLike.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAQ,GAAW,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;AAC3F,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/** Checks if the specified argument is a promise\n * @internal\n */\nexport function isPromiseLike(obj: unknown): obj is PromiseLike<unknown> {\n return !!(obj && (typeof obj === \"object\") && (typeof (obj as any).then === \"function\"));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isPromiseLike.js","sourceRoot":"","sources":["../../../../src/core-react/utils/isPromiseLike.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAQ,GAAW,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Checks if the specified argument is a promise\r\n * @internal\r\n */\r\nexport function isPromiseLike(obj: unknown): obj is PromiseLike<unknown> {\r\n return !!(obj && (typeof obj === \"object\") && (typeof (obj as any).then === \"function\"));\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shallowDiffers.js","sourceRoot":"","sources":["../../../../src/core-react/utils/shallowDiffers.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAqC,EAAE,CAAqC,EAAW,EAAE;IACtH,IAAI,CAAC,KAAK,CAAC;QACT,OAAO,KAAK,CAAC;IACf,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS;QACpC,OAAO,IAAI,CAAC;IACd,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACX,OAAO,IAAI,CAAC;KACf;IACD,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACf,OAAO,IAAI,CAAC;KACf;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Performs a shallow difference check on two objects.\n * @internal\n */\nexport const shallowDiffers = (a: { [key: string]: any } | undefined, b: { [key: string]: any } | undefined): boolean => {\n if (a === b)\n return false;\n if (a === undefined || b === undefined)\n return true;\n for (const i in a) {\n if (!(i in b))\n return true;\n }\n for (const i in b) {\n if (a[i] !== b[i])\n return true;\n }\n return false;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"shallowDiffers.js","sourceRoot":"","sources":["../../../../src/core-react/utils/shallowDiffers.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAqC,EAAE,CAAqC,EAAW,EAAE;IACtH,IAAI,CAAC,KAAK,CAAC;QACT,OAAO,KAAK,CAAC;IACf,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS;QACpC,OAAO,IAAI,CAAC;IACd,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACX,OAAO,IAAI,CAAC;KACf;IACD,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACf,OAAO,IAAI,CAAC;KACf;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Performs a shallow difference check on two objects.\r\n * @internal\r\n */\r\nexport const shallowDiffers = (a: { [key: string]: any } | undefined, b: { [key: string]: any } | undefined): boolean => {\r\n if (a === b)\r\n return false;\r\n if (a === undefined || b === undefined)\r\n return true;\r\n for (const i in a) {\r\n if (!(i in b))\r\n return true;\r\n }\r\n for (const i in b) {\r\n if (a[i] !== b[i])\r\n return true;\r\n }\r\n return false;\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeUtils.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/typeUtils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"typeUtils.d.ts","sourceRoot":"","sources":["../../../../src/core-react/utils/typeUtils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../../../src/core-react/utils/typeUtils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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/** Used to omit properties in a given interface\n * @public\n */\nexport type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;\n"]}
|
|
1
|
+
{"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../../../src/core-react/utils/typeUtils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Used to omit properties in a given interface\r\n * @public\r\n */\r\nexport type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;\r\n"]}
|
package/lib/esm/core-react.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ export * from "./core-react/focustrap/FocusTrap";
|
|
|
34
34
|
export * from "./core-react/hocs/withIsPressed";
|
|
35
35
|
export * from "./core-react/hocs/withOnOutsideClick";
|
|
36
36
|
export * from "./core-react/hocs/withTimeout";
|
|
37
|
+
export * from "./core-react/icons/ConditionalIconItem";
|
|
37
38
|
export * from "./core-react/icons/IconComponent";
|
|
38
39
|
export * from "./core-react/icons/SvgPath";
|
|
39
|
-
export * from "./core-react/icons/SvgSprite";
|
|
40
40
|
export * from "./core-react/icons/WebFontIcon";
|
|
41
41
|
export * from "./core-react/autosuggest/AutoSuggest";
|
|
42
42
|
export * from "./core-react/imagecheckbox/ImageCheckBox";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-react.d.ts","sourceRoot":"","sources":["../../src/core-react.ts"],"names":[],"mappings":"AAOA,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAE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,6CAA6C,CAAC;AAE5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAE7D;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
package/lib/esm/core-react.js
CHANGED
|
@@ -39,9 +39,9 @@ export * from "./core-react/focustrap/FocusTrap";
|
|
|
39
39
|
export * from "./core-react/hocs/withIsPressed";
|
|
40
40
|
export * from "./core-react/hocs/withOnOutsideClick";
|
|
41
41
|
export * from "./core-react/hocs/withTimeout";
|
|
42
|
+
export * from "./core-react/icons/ConditionalIconItem";
|
|
42
43
|
export * from "./core-react/icons/IconComponent";
|
|
43
44
|
export * from "./core-react/icons/SvgPath";
|
|
44
|
-
export * from "./core-react/icons/SvgSprite";
|
|
45
45
|
export * from "./core-react/icons/WebFontIcon";
|
|
46
46
|
export * from "./core-react/autosuggest/AutoSuggest";
|
|
47
47
|
export * from "./core-react/imagecheckbox/ImageCheckBox";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-react.js","sourceRoot":"","sources":["../../src/core-react.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,gFAAgF;AAEhF,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,sCAAsC,CAAC;AAErD,cAAc,wCAAwC,CAAC;AAEvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAE1D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,gDAAgD,CAAC;AAE/D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,wCAAwC,CAAC;AAEvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,C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AAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAE7D;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\n// cSpell:ignore focustrap imagecheckbox iconinput hocs numberinput numericinput\n\nexport * from \"./core-react/UiCore\";\n\nexport * from \"./core-react/badge/Badge\";\nexport * from \"./core-react/badge/BadgeUtilities\";\nexport * from \"./core-react/badge/BetaBadge\";\nexport * from \"./core-react/badge/NewBadge\";\n\nexport * from \"./core-react/base/Div\";\nexport * from \"./core-react/base/DivWithOutsideClick\";\nexport * from \"./core-react/base/Centered\";\nexport * from \"./core-react/base/FillCentered\";\nexport * from \"./core-react/base/FlexWrapContainer\";\nexport * from \"./core-react/base/Gap\";\nexport * from \"./core-react/base/PointerEvents\";\nexport * from \"./core-react/base/ScrollView\";\n\nexport * from \"./core-react/button/UnderlinedButton\";\n\nexport * from \"./core-react/checklistbox/CheckListBox\";\n\nexport * from \"./core-react/contextmenu/ContextMenu\";\nexport * from \"./core-react/contextmenu/ContextMenuDirection\";\nexport * from \"./core-react/contextmenu/ContextMenuDivider\";\nexport * from \"./core-react/contextmenu/ContextMenuItem\";\nexport * from \"./core-react/contextmenu/ContextSubMenu\";\nexport * from \"./core-react/contextmenu/GlobalContextMenu\";\nexport * from \"./core-react/contextmenu/PopupContextMenu\";\n\nexport * from \"./core-react/dialog/Dialog\";\nexport * from \"./core-react/dialog/GlobalDialog\";\n\nexport * from \"./core-react/elementseparator/ElementSeparator\";\n\nexport * from \"./core-react/enums/Alignment\";\nexport * from \"./core-react/enums/CheckBoxState\";\nexport * from \"./core-react/enums/Orientation\";\nexport * from \"./core-react/enums/SortDirection\";\nexport * from \"./core-react/enums/TimeFormat\";\n\nexport * from \"./core-react/expandable/ExpandableList\";\n\nexport * from \"./core-react/focus/ItemKeyboardNavigator\";\nexport * from \"./core-react/focustrap/FocusTrap\";\n\nexport * from \"./core-react/hocs/withIsPressed\";\nexport * from \"./core-react/hocs/withOnOutsideClick\";\nexport * from \"./core-react/hocs/withTimeout\";\n\nexport * from \"./core-react/icons/IconComponent\";\nexport * from \"./core-react/icons/SvgPath\";\nexport * from \"./core-react/icons/SvgSprite\";\nexport * from \"./core-react/icons/WebFontIcon\";\n\nexport * from \"./core-react/autosuggest/AutoSuggest\";\n\nexport * from \"./core-react/imagecheckbox/ImageCheckBox\";\n\nexport * from \"./core-react/inputs/InputLabel\";\nexport * from \"./core-react/inputs/InputStatus\";\nexport * from \"./core-react/inputs/iconinput/IconInput\";\nexport * from \"./core-react/inputs/LabeledComponentProps\";\nexport * from \"./core-react/inputs/numberinput/NumberInput\";\n\nexport * from \"./core-react/listbox/Listbox\";\n\nexport * from \"./core-react/loading/LoadingBar\";\nexport * from \"./core-react/loading/LoadingPrompt\";\nexport * from \"./core-react/loading/LoadingSpinner\";\nexport * from \"./core-react/loading/LoadingStatus\";\n\nexport * from \"./core-react/messagebox/MessageBox\";\n\nexport * from \"./core-react/notification/MessageRenderer\";\nexport * from \"./core-react/notification/MessageType\";\n\nexport * from \"./core-react/popup/Popup\";\n\nexport * from \"./core-react/radialmenu/RadialMenu\";\nexport * from \"./core-react/radialmenu/Annulus\";\n\nexport * from \"./core-react/searchbox/SearchBox\";\n\nexport * from \"./core-react/settings/SettingsManager\";\nexport * from \"./core-react/settings/SettingsContainer\";\n\nexport * from \"./core-react/tabs/VerticalTabs\";\nexport * from \"./core-react/tabs/Tabs\";\n\nexport * from \"./core-react/text/BodyText\";\nexport * from \"./core-react/text/BlockText\";\nexport * from \"./core-react/text/DisabledText\";\nexport * from \"./core-react/text/FilteredText\";\nexport * from \"./core-react/text/MutedText\";\nexport * from \"./core-react/text/StyledText\";\nexport * from \"./core-react/text/TextProps\";\n\nexport { ExpansionToggle, ExpansionToggleProps } from \"./core-react/tree/ExpansionToggle\";\nexport { TreeBranch, TreeBranchProps } from \"./core-react/tree/Branch\";\nexport { TreeNode, TreeNodeProps, NodeCheckboxProps, NodeCheckboxRenderer, NodeCheckboxRenderProps } from \"./core-react/tree/Node\";\nexport { Tree, TreeProps } from \"./core-react/tree/Tree\";\nexport { TreeNodePlaceholder, TreeNodePlaceholderProps } from \"./core-react/tree/Placeholder\";\n\nexport * from \"./core-react/uistate/UiStateEntry\";\nexport * from \"./core-react/uistate/UiStateStorage\";\nexport * from \"./core-react/uistate/LocalStateStorage\";\n\nexport * from \"./core-react/utils/IconHelper\";\nexport * from \"./core-react/utils/Point\";\nexport * from \"./core-react/utils/Props\";\nexport * from \"./core-react/utils/Rectangle\";\nexport * from \"./core-react/utils/Size\";\nexport * from \"./core-react/utils/Timer\";\nexport * from \"./core-react/utils/UiGeometry\";\nexport * from \"./core-react/utils/flattenChildren\";\nexport * from \"./core-react/utils/getBestBWContrastColor\";\nexport * from \"./core-react/utils/getCssVariable\";\nexport * from \"./core-react/utils/getDisplayName\";\nexport * from \"./core-react/utils/getUserColor\";\nexport * from \"./core-react/utils/shallowDiffers\";\nexport * from \"./core-react/utils/typeUtils\";\nexport * from \"./core-react/utils/isPromiseLike\";\nexport * from \"./core-react/utils/ScrollPositionMaintainer\";\n\nexport * from \"./core-react/utils/hooks/useDisposable\";\nexport * from \"./core-react/utils/hooks/useEffectSkipFirst\";\nexport * from \"./core-react/utils/hooks/useEventListener\";\nexport * from \"./core-react/utils/hooks/ResizeObserverPolyfill\";\nexport * from \"./core-react/utils/hooks/useOnOutsideClick\";\nexport * from \"./core-react/utils/hooks/useProximityToMouse\";\nexport * from \"./core-react/utils/hooks/useRefEffect\";\nexport * from \"./core-react/utils/hooks/useRefs\";\nexport * from \"./core-react/utils/hooks/useRefState\";\nexport * from \"./core-react/utils/hooks/useResizeObserver\";\nexport * from \"./core-react/utils/hooks/useTargeted\";\nexport * from \"./core-react/utils/hooks/useWidgetOpacityContext\";\nexport * from \"./core-react/utils/hooks/useInterval\";\nexport * from \"./core-react/utils/hooks/useCrossOriginPopup\";\n\n/** @docs-package-description\n * The core-react package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu and SplitButton.\n * For more information, see [learning about core-react]($docs/learning/ui/core/index.md).\n */\n/**\n * @docs-group-description AutoSuggest\n * Component for input with an auto-suggestion dropdown.\n */\n/**\n * @docs-group-description Base\n * Low-level classes and components for building application UI.\n */\n/**\n * @docs-group-description Button\n * Components for working with various Buttons.\n */\n/**\n * @docs-group-description Checkbox\n * Component is a wrapper for the `<input type=\"checkbox\">` HTML element.\n */\n/**\n * @docs-group-description CheckListBox\n * Components for working with a Check listbox.\n */\n/**\n * @docs-group-description Common\n * Common classes and enums used across various UI components.\n */\n/**\n * @docs-group-description ContextMenu\n * Components for working with a Context Menu.\n */\n/**\n * @docs-group-description Dialog\n * Components for working with a Dialog or MessageBox.\n */\n/**\n * @docs-group-description ElementSeparator\n * Components for working with a ElementSeparator.\n */\n/**\n * @docs-group-description Expandable\n * Components for working with a ExpandableBlock or ExpandableList.\n */\n/**\n * @docs-group-description Form\n * Components used to create a Form using supplied properties to specify fields.\n */\n/**\n * @docs-group-description Icon\n * Component that renders core-react icon when given an icon name or SVG source.\n */\n/**\n * @docs-group-description Inputs\n * Components for working with input controls, such as Input, IconInput and NumberInput.\n */\n/**\n * @docs-group-description Loading\n * Components for working with Loading spinners and progress indicators and bars.\n */\n/**\n * @docs-group-description Notification\n * Components for working with messages and tooltips.\n */\n/**\n * @docs-group-description Popup\n * Components for working with a Popup.\n */\n/**\n * @docs-group-description RadialMenu\n * Components for working with a RadialMenu.\n */\n/**\n * @docs-group-description Radio\n * Component is a wrapper for the `<input type=\"radio\">` HTML element.\n */\n/**\n * @docs-group-description SearchBox\n * Components for working with a SearchBox.\n */\n/**\n * @docs-group-description Select\n * Component is a wrapper for the `<select>` HTML element.\n */\n/**\n * @docs-group-description Settings\n * Manager and UI Components that allow users to modify settings for different packages and extensions.\n */\n/**\n * @docs-group-description Slider\n * Component displays a range slider with thumbs for changing the value.\n */\n/**\n * @docs-group-description SplitButton\n * Components for working with a SplitButton.\n */\n/**\n * @docs-group-description Tabs\n * Components for working with horizontal or vertical tabs.\n */\n/**\n * @docs-group-description Text\n * Components for working with styled text.\n */\n/**\n * @docs-group-description Tiles\n * Components for a container rendering elements that can be grouped together.\n */\n/**\n * @docs-group-description Toggle\n * Components for working with a Toggle switch.\n */\n/**\n * @docs-group-description Tooltip\n * Components for working with a Tooltip.\n */\n/**\n * @docs-group-description Tree\n * Presentation React components for working with a Tree.\n */\n/**\n * @docs-group-description UiStateStorage\n * Interfaces and classes for working with persistent UI settings.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes, functions and React hooks for working with a UI.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"core-react.js","sourceRoot":"","sources":["../../src/core-react.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,gFAAgF;AAEhF,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,sCAAsC,CAAC;AAErD,cAAc,wCAAwC,CAAC;AAEvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAE1D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,gDAAgD,CAAC;AAE/D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;A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AGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n// cSpell:ignore focustrap imagecheckbox iconinput hocs numberinput numericinput\r\n\r\nexport * from \"./core-react/UiCore\";\r\n\r\nexport * from \"./core-react/badge/Badge\";\r\nexport * from \"./core-react/badge/BadgeUtilities\";\r\nexport * from \"./core-react/badge/BetaBadge\";\r\nexport * from \"./core-react/badge/NewBadge\";\r\n\r\nexport * from \"./core-react/base/Div\";\r\nexport * from \"./core-react/base/DivWithOutsideClick\";\r\nexport * from \"./core-react/base/Centered\";\r\nexport * from \"./core-react/base/FillCentered\";\r\nexport * from \"./core-react/base/FlexWrapContainer\";\r\nexport * from \"./core-react/base/Gap\";\r\nexport * from \"./core-react/base/PointerEvents\";\r\nexport * from \"./core-react/base/ScrollView\";\r\n\r\nexport * from \"./core-react/button/UnderlinedButton\";\r\n\r\nexport * from \"./core-react/checklistbox/CheckListBox\";\r\n\r\nexport * from \"./core-react/contextmenu/ContextMenu\";\r\nexport * from \"./core-react/contextmenu/ContextMenuDirection\";\r\nexport * from \"./core-react/contextmenu/ContextMenuDivider\";\r\nexport * from \"./core-react/contextmenu/ContextMenuItem\";\r\nexport * from \"./core-react/contextmenu/ContextSubMenu\";\r\nexport * from \"./core-react/contextmenu/GlobalContextMenu\";\r\nexport * from \"./core-react/contextmenu/PopupContextMenu\";\r\n\r\nexport * from \"./core-react/dialog/Dialog\";\r\nexport * from \"./core-react/dialog/GlobalDialog\";\r\n\r\nexport * from \"./core-react/elementseparator/ElementSeparator\";\r\n\r\nexport * from \"./core-react/enums/Alignment\";\r\nexport * from \"./core-react/enums/CheckBoxState\";\r\nexport * from \"./core-react/enums/Orientation\";\r\nexport * from \"./core-react/enums/SortDirection\";\r\nexport * from \"./core-react/enums/TimeFormat\";\r\n\r\nexport * from \"./core-react/expandable/ExpandableList\";\r\n\r\nexport * from \"./core-react/focus/ItemKeyboardNavigator\";\r\nexport * from \"./core-react/focustrap/FocusTrap\";\r\n\r\nexport * from \"./core-react/hocs/withIsPressed\";\r\nexport * from \"./core-react/hocs/withOnOutsideClick\";\r\nexport * from \"./core-react/hocs/withTimeout\";\r\n\r\nexport * from \"./core-react/icons/ConditionalIconItem\";\r\nexport * from \"./core-react/icons/IconComponent\";\r\nexport * from \"./core-react/icons/SvgPath\";\r\nexport * from \"./core-react/icons/WebFontIcon\";\r\n\r\nexport * from \"./core-react/autosuggest/AutoSuggest\";\r\n\r\nexport * from \"./core-react/imagecheckbox/ImageCheckBox\";\r\n\r\nexport * from \"./core-react/inputs/InputLabel\";\r\nexport * from \"./core-react/inputs/InputStatus\";\r\nexport * from \"./core-react/inputs/iconinput/IconInput\";\r\nexport * from \"./core-react/inputs/LabeledComponentProps\";\r\nexport * from \"./core-react/inputs/numberinput/NumberInput\";\r\n\r\nexport * from \"./core-react/listbox/Listbox\";\r\n\r\nexport * from \"./core-react/loading/LoadingBar\";\r\nexport * from \"./core-react/loading/LoadingPrompt\";\r\nexport * from \"./core-react/loading/LoadingSpinner\";\r\nexport * from \"./core-react/loading/LoadingStatus\";\r\n\r\nexport * from \"./core-react/messagebox/MessageBox\";\r\n\r\nexport * from \"./core-react/notification/MessageRenderer\";\r\nexport * from \"./core-react/notification/MessageType\";\r\n\r\nexport * from \"./core-react/popup/Popup\";\r\n\r\nexport * from \"./core-react/radialmenu/RadialMenu\";\r\nexport * from \"./core-react/radialmenu/Annulus\";\r\n\r\nexport * from \"./core-react/searchbox/SearchBox\";\r\n\r\nexport * from \"./core-react/settings/SettingsManager\";\r\nexport * from \"./core-react/settings/SettingsContainer\";\r\n\r\nexport * from \"./core-react/tabs/VerticalTabs\";\r\nexport * from \"./core-react/tabs/Tabs\";\r\n\r\nexport * from \"./core-react/text/BodyText\";\r\nexport * from \"./core-react/text/BlockText\";\r\nexport * from \"./core-react/text/DisabledText\";\r\nexport * from \"./core-react/text/FilteredText\";\r\nexport * from \"./core-react/text/MutedText\";\r\nexport * from \"./core-react/text/StyledText\";\r\nexport * from \"./core-react/text/TextProps\";\r\n\r\nexport { ExpansionToggle, ExpansionToggleProps } from \"./core-react/tree/ExpansionToggle\";\r\nexport { TreeBranch, TreeBranchProps } from \"./core-react/tree/Branch\";\r\nexport { TreeNode, TreeNodeProps, NodeCheckboxProps, NodeCheckboxRenderer, NodeCheckboxRenderProps } from \"./core-react/tree/Node\";\r\nexport { Tree, TreeProps } from \"./core-react/tree/Tree\";\r\nexport { TreeNodePlaceholder, TreeNodePlaceholderProps } from \"./core-react/tree/Placeholder\";\r\n\r\nexport * from \"./core-react/uistate/UiStateEntry\";\r\nexport * from \"./core-react/uistate/UiStateStorage\";\r\nexport * from \"./core-react/uistate/LocalStateStorage\";\r\n\r\nexport * from \"./core-react/utils/IconHelper\";\r\nexport * from \"./core-react/utils/Point\";\r\nexport * from \"./core-react/utils/Props\";\r\nexport * from \"./core-react/utils/Rectangle\";\r\nexport * from \"./core-react/utils/Size\";\r\nexport * from \"./core-react/utils/Timer\";\r\nexport * from \"./core-react/utils/UiGeometry\";\r\nexport * from \"./core-react/utils/flattenChildren\";\r\nexport * from \"./core-react/utils/getBestBWContrastColor\";\r\nexport * from \"./core-react/utils/getCssVariable\";\r\nexport * from \"./core-react/utils/getDisplayName\";\r\nexport * from \"./core-react/utils/getUserColor\";\r\nexport * from \"./core-react/utils/shallowDiffers\";\r\nexport * from \"./core-react/utils/typeUtils\";\r\nexport * from \"./core-react/utils/isPromiseLike\";\r\nexport * from \"./core-react/utils/ScrollPositionMaintainer\";\r\n\r\nexport * from \"./core-react/utils/hooks/useDisposable\";\r\nexport * from \"./core-react/utils/hooks/useEffectSkipFirst\";\r\nexport * from \"./core-react/utils/hooks/useEventListener\";\r\nexport * from \"./core-react/utils/hooks/ResizeObserverPolyfill\";\r\nexport * from \"./core-react/utils/hooks/useOnOutsideClick\";\r\nexport * from \"./core-react/utils/hooks/useProximityToMouse\";\r\nexport * from \"./core-react/utils/hooks/useRefEffect\";\r\nexport * from \"./core-react/utils/hooks/useRefs\";\r\nexport * from \"./core-react/utils/hooks/useRefState\";\r\nexport * from \"./core-react/utils/hooks/useResizeObserver\";\r\nexport * from \"./core-react/utils/hooks/useTargeted\";\r\nexport * from \"./core-react/utils/hooks/useWidgetOpacityContext\";\r\nexport * from \"./core-react/utils/hooks/useInterval\";\r\nexport * from \"./core-react/utils/hooks/useCrossOriginPopup\";\r\n\r\n/** @docs-package-description\r\n * The core-react package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu and SplitButton.\r\n * For more information, see [learning about core-react]($docs/learning/ui/core/index.md).\r\n */\r\n/**\r\n * @docs-group-description AutoSuggest\r\n * Component for input with an auto-suggestion dropdown.\r\n */\r\n/**\r\n * @docs-group-description Base\r\n * Low-level classes and components for building application UI.\r\n */\r\n/**\r\n * @docs-group-description Button\r\n * Components for working with various Buttons.\r\n */\r\n/**\r\n * @docs-group-description Checkbox\r\n * Component is a wrapper for the `<input type=\"checkbox\">` HTML element.\r\n */\r\n/**\r\n * @docs-group-description CheckListBox\r\n * Components for working with a Check listbox.\r\n */\r\n/**\r\n * @docs-group-description Common\r\n * Common classes and enums used across various UI components.\r\n */\r\n/**\r\n * @docs-group-description ContextMenu\r\n * Components for working with a Context Menu.\r\n */\r\n/**\r\n * @docs-group-description Dialog\r\n * Components for working with a Dialog or MessageBox.\r\n */\r\n/**\r\n * @docs-group-description ElementSeparator\r\n * Components for working with a ElementSeparator.\r\n */\r\n/**\r\n * @docs-group-description Expandable\r\n * Components for working with a ExpandableBlock or ExpandableList.\r\n */\r\n/**\r\n * @docs-group-description Form\r\n * Components used to create a Form using supplied properties to specify fields.\r\n */\r\n/**\r\n * @docs-group-description Icon\r\n * Component that renders core-react icon when given an icon name or SVG source.\r\n */\r\n/**\r\n * @docs-group-description Inputs\r\n * Components for working with input controls, such as Input, IconInput and NumberInput.\r\n */\r\n/**\r\n * @docs-group-description Loading\r\n * Components for working with Loading spinners and progress indicators and bars.\r\n */\r\n/**\r\n * @docs-group-description Notification\r\n * Components for working with messages and tooltips.\r\n */\r\n/**\r\n * @docs-group-description Popup\r\n * Components for working with a Popup.\r\n */\r\n/**\r\n * @docs-group-description RadialMenu\r\n * Components for working with a RadialMenu.\r\n */\r\n/**\r\n * @docs-group-description Radio\r\n * Component is a wrapper for the `<input type=\"radio\">` HTML element.\r\n */\r\n/**\r\n * @docs-group-description SearchBox\r\n * Components for working with a SearchBox.\r\n */\r\n/**\r\n * @docs-group-description Select\r\n * Component is a wrapper for the `<select>` HTML element.\r\n */\r\n/**\r\n * @docs-group-description Settings\r\n * Manager and UI Components that allow users to modify settings for different packages and extensions.\r\n */\r\n/**\r\n * @docs-group-description Slider\r\n * Component displays a range slider with thumbs for changing the value.\r\n */\r\n/**\r\n * @docs-group-description SplitButton\r\n * Components for working with a SplitButton.\r\n */\r\n/**\r\n * @docs-group-description Tabs\r\n * Components for working with horizontal or vertical tabs.\r\n */\r\n/**\r\n * @docs-group-description Text\r\n * Components for working with styled text.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Components for a container rendering elements that can be grouped together.\r\n */\r\n/**\r\n * @docs-group-description Toggle\r\n * Components for working with a Toggle switch.\r\n */\r\n/**\r\n * @docs-group-description Tooltip\r\n * Components for working with a Tooltip.\r\n */\r\n/**\r\n * @docs-group-description Tree\r\n * Presentation React components for working with a Tree.\r\n */\r\n/**\r\n * @docs-group-description UiStateStorage\r\n * Interfaces and classes for working with persistent UI settings.\r\n */\r\n/**\r\n * @docs-group-description Utilities\r\n * Various utility classes, functions and React hooks for working with a UI.\r\n */\r\n"]}
|