@itwin/core-react 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1621 -1609
- package/ContributeGuidelines.md +99 -99
- package/LICENSE.md +9 -9
- package/README.md +11 -11
- package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
- package/lib/cjs/core-react/UiCore.js +9 -5
- 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 +52 -51
- package/lib/cjs/core-react/_math.scss +13 -13
- package/lib/cjs/core-react/_scrollbar.scss +55 -51
- package/lib/cjs/core-react/_typography.scss +44 -44
- package/lib/cjs/core-react/_z-index.scss +47 -65
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js +14 -15
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +79 -79
- package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
- package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/Badge.js +3 -3
- 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.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/BadgeUtilities.js +3 -3
- package/lib/cjs/core-react/badge/BadgeUtilities.js.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.js +3 -3
- package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.js +4 -4
- 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 +3 -3
- package/lib/cjs/core-react/base/Centered.js.map +1 -1
- package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Div.js +3 -3
- package/lib/cjs/core-react/base/Div.js.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -4
- package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/base/FillCentered.js +3 -3
- package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.js +3 -3
- package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Gap.js +5 -5
- package/lib/cjs/core-react/base/Gap.js.map +1 -1
- package/lib/cjs/core-react/base/PointerEvents.js +3 -3
- package/lib/cjs/core-react/base/PointerEvents.js.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.js +3 -3
- 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 +27 -13
- package/lib/cjs/core-react/base/index.scss +5 -5
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.js +3 -3
- package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.scss +32 -33
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.js +4 -4
- package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.scss +22 -22
- package/lib/cjs/core-react/classes.scss +11 -11
- package/lib/cjs/core-react/colorthemes.scss +61 -61
- package/lib/cjs/core-react/colorvariables.scss +131 -131
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +7 -7
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.js +43 -25
- package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.scss +236 -236
- package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +3 -3
- package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +3 -3
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +16 -12
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +37 -15
- 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 +14 -12
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +3 -3
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/TildeFinder.js +15 -7
- package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts +6 -5
- package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.js +95 -88
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.scss +245 -245
- package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/GlobalDialog.js +11 -8
- package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/SimpleDialog.d.ts +68 -0
- package/lib/cjs/core-react/dialog/SimpleDialog.d.ts.map +1 -0
- package/lib/cjs/core-react/dialog/SimpleDialog.js +51 -0
- package/lib/cjs/core-react/dialog/SimpleDialog.js.map +1 -0
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js +16 -10
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +94 -85
- package/lib/cjs/core-react/enums/Alignment.js +3 -3
- package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
- package/lib/cjs/core-react/enums/CheckBoxState.js +3 -3
- package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
- package/lib/cjs/core-react/enums/Orientation.js +3 -3
- package/lib/cjs/core-react/enums/Orientation.js.map +1 -1
- package/lib/cjs/core-react/enums/SortDirection.js +3 -3
- package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
- package/lib/cjs/core-react/enums/TimeFormat.js +3 -3
- package/lib/cjs/core-react/enums/TimeFormat.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js +8 -5
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.scss +9 -9
- package/lib/cjs/core-react/expandable/classes.scss +9 -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.map +1 -1
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js +38 -15
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.js +33 -16
- package/lib/cjs/core-react/focustrap/FocusTrap.js.map +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.js +4 -7
- package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
- package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js +17 -13
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withTimeout.js +6 -8
- package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +5 -1
- package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/ConditionalIconItem.js +26 -9
- package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js +21 -11
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.scss +19 -20
- package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.js +4 -4
- package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.scss +15 -15
- package/lib/cjs/core-react/icons/WebFontIcon.js +3 -3
- 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 +18 -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 -12
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +6 -4
- 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 -21
- package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
- package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/Input.js +6 -7
- package/lib/cjs/core-react/inputs/Input.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js +10 -13
- package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.js +3 -3
- package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledComponentProps.js +3 -3
- package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/cjs/core-react/inputs/classes.scss +12 -8
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js +3 -4
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +34 -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 +2 -2
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +25 -16
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +88 -88
- package/lib/cjs/core-react/inputs/variables.scss +38 -38
- package/lib/cjs/core-react/layout-variables.scss +15 -17
- package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
- package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.js +20 -14
- 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.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.js +4 -4
- 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.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.js +9 -9
- 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 +3 -3
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js +5 -5
- 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.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.js +3 -3
- 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 +3 -3
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js +5 -5
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.scss +56 -56
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.js +19 -13
- package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.js +3 -3
- 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 +50 -31
- 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.d.ts.map +1 -1
- package/lib/cjs/core-react/radialmenu/Annulus.js +4 -4
- package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.js +26 -11
- 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 +17 -7
- package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.scss +47 -47
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.js +54 -19
- package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.scss +68 -68
- package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
- package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsManager.js +7 -8
- 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 +59 -41
- package/lib/cjs/core-react/style/colors.scss +77 -77
- package/lib/cjs/core-react/style/index.scss +10 -10
- package/lib/cjs/core-react/style/mixins.scss +23 -27
- package/lib/cjs/core-react/style/opacity.scss +16 -16
- package/lib/cjs/core-react/style/themecolors.scss +133 -123
- package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
- package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/Tabs.js +13 -11
- package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.js +3 -3
- package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/classes.scss +9 -7
- package/lib/cjs/core-react/tabs/index.scss +5 -5
- package/lib/cjs/core-react/tabs/tabs.scss +96 -96
- package/lib/cjs/core-react/tabs/vertical.scss +51 -51
- package/lib/cjs/core-react/text/BlockText.js +4 -4
- package/lib/cjs/core-react/text/BlockText.js.map +1 -1
- package/lib/cjs/core-react/text/BodyText.js +4 -4
- package/lib/cjs/core-react/text/BodyText.js.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.js +4 -4
- package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.js +5 -5
- 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.js +4 -4
- package/lib/cjs/core-react/text/MutedText.js.map +1 -1
- package/lib/cjs/core-react/text/StyledText.js +3 -3
- package/lib/cjs/core-react/text/StyledText.js.map +1 -1
- package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
- package/lib/cjs/core-react/text/TextProps.js +3 -3
- package/lib/cjs/core-react/text/TextProps.js.map +1 -1
- package/lib/cjs/core-react/text/block.scss +15 -15
- package/lib/cjs/core-react/text/body.scss +13 -13
- package/lib/cjs/core-react/text/classes.scss +18 -10
- package/lib/cjs/core-react/text/disabled.scss +9 -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 +9 -10
- package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Branch.js +3 -3
- package/lib/cjs/core-react/tree/Branch.js.map +1 -1
- package/lib/cjs/core-react/tree/Branch.scss +13 -13
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -3
- package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.scss +32 -32
- package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Node.js +12 -10
- package/lib/cjs/core-react/tree/Node.js.map +1 -1
- package/lib/cjs/core-react/tree/Node.scss +68 -68
- package/lib/cjs/core-react/tree/Placeholder.js +5 -5
- package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
- package/lib/cjs/core-react/tree/Placeholder.scss +17 -17
- package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Tree.js +20 -11
- 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.d.ts.map +1 -1
- package/lib/cjs/core-react/uistate/LocalStateStorage.js +7 -4
- package/lib/cjs/core-react/uistate/LocalStateStorage.js.map +1 -1
- package/lib/cjs/core-react/uistate/UiStateEntry.d.ts.map +1 -1
- package/lib/cjs/core-react/uistate/UiStateEntry.js +3 -3
- package/lib/cjs/core-react/uistate/UiStateEntry.js.map +1 -1
- package/lib/cjs/core-react/uistate/UiStateStorage.d.ts.map +1 -1
- package/lib/cjs/core-react/uistate/UiStateStorage.js +3 -3
- package/lib/cjs/core-react/uistate/UiStateStorage.js.map +1 -1
- package/lib/cjs/core-react/utils/IconHelper.d.ts +3 -1
- package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/IconHelper.js +35 -6
- package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.js +71 -41
- package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/cjs/core-react/utils/Point.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Point.js +3 -3
- package/lib/cjs/core-react/utils/Point.js.map +1 -1
- package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Props.js +3 -3
- package/lib/cjs/core-react/utils/Props.js.map +1 -1
- package/lib/cjs/core-react/utils/Rectangle.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Rectangle.js +15 -7
- package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +4 -2
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
- package/lib/cjs/core-react/utils/Size.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Size.js +4 -5
- package/lib/cjs/core-react/utils/Size.js.map +1 -1
- package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Timer.js +3 -3
- package/lib/cjs/core-react/utils/Timer.js.map +1 -1
- package/lib/cjs/core-react/utils/UiGeometry.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/UiGeometry.js +9 -5
- package/lib/cjs/core-react/utils/UiGeometry.js.map +1 -1
- package/lib/cjs/core-react/utils/flattenChildren.js +3 -3
- package/lib/cjs/core-react/utils/flattenChildren.js.map +1 -1
- package/lib/cjs/core-react/utils/getBestBWContrastColor.js +5 -5
- package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.js +4 -4
- package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/cjs/core-react/utils/getDisplayName.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/getDisplayName.js +3 -3
- package/lib/cjs/core-react/utils/getDisplayName.js.map +1 -1
- package/lib/cjs/core-react/utils/getUserColor.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/getUserColor.js +5 -4
- package/lib/cjs/core-react/utils/getUserColor.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +22 -11
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEventListener.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useEventListener.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useInterval.js +6 -4
- package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js +7 -4
- package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +15 -6
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefEffect.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useRefEffect.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefState.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useRefState.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.js +8 -6
- package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +43 -32
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useTargeted.js +7 -4
- package/lib/cjs/core-react/utils/hooks/useTargeted.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useThrottledFn.js +3 -3
- package/lib/cjs/core-react/utils/hooks/useThrottledFn.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
- package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
- package/lib/cjs/core-react/utils/isPromiseLike.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/isPromiseLike.js +6 -4
- package/lib/cjs/core-react/utils/isPromiseLike.js.map +1 -1
- package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
- package/lib/cjs/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
- package/lib/cjs/core-react/utils/reuseOrCreatePromise.js +33 -0
- package/lib/cjs/core-react/utils/reuseOrCreatePromise.js.map +1 -0
- package/lib/cjs/core-react/utils/shallowDiffers.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/shallowDiffers.js +3 -3
- package/lib/cjs/core-react/utils/shallowDiffers.js.map +1 -1
- package/lib/cjs/core-react/utils/typeUtils.js +3 -3
- package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
- package/lib/cjs/core-react.d.ts +3 -3
- package/lib/cjs/core-react.d.ts.map +1 -1
- package/lib/cjs/core-react.js +3 -3
- package/lib/cjs/core-react.js.map +1 -1
- package/lib/esm/core-react/UiCore.d.ts.map +1 -1
- package/lib/esm/core-react/UiCore.js +9 -5
- 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 +52 -51
- package/lib/esm/core-react/_math.scss +13 -13
- package/lib/esm/core-react/_scrollbar.scss +55 -51
- package/lib/esm/core-react/_typography.scss +44 -44
- package/lib/esm/core-react/_z-index.scss +47 -65
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js +14 -15
- package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.scss +79 -79
- package/lib/esm/core-react/badge/Badge.d.ts +1 -1
- package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/Badge.js +3 -3
- 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.d.ts.map +1 -1
- package/lib/esm/core-react/badge/BadgeUtilities.js +3 -3
- package/lib/esm/core-react/badge/BadgeUtilities.js.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.js +3 -3
- package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.js +4 -4
- 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 +3 -3
- package/lib/esm/core-react/base/Centered.js.map +1 -1
- package/lib/esm/core-react/base/Div.d.ts.map +1 -1
- package/lib/esm/core-react/base/Div.js +3 -3
- package/lib/esm/core-react/base/Div.js.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -4
- package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/esm/core-react/base/FillCentered.js +3 -3
- package/lib/esm/core-react/base/FillCentered.js.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.js +3 -3
- package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
- package/lib/esm/core-react/base/Gap.js +5 -5
- package/lib/esm/core-react/base/Gap.js.map +1 -1
- package/lib/esm/core-react/base/PointerEvents.js +3 -3
- package/lib/esm/core-react/base/PointerEvents.js.map +1 -1
- package/lib/esm/core-react/base/ScrollView.js +3 -3
- 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 +27 -13
- package/lib/esm/core-react/base/index.scss +5 -5
- package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.js +3 -3
- package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.scss +32 -33
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.js +4 -4
- package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.scss +22 -22
- package/lib/esm/core-react/classes.scss +11 -11
- package/lib/esm/core-react/colorthemes.scss +61 -61
- package/lib/esm/core-react/colorvariables.scss +131 -131
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +7 -7
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.js +43 -25
- package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.scss +236 -236
- package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +3 -3
- package/lib/esm/core-react/contextmenu/ContextMenuDirection.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +3 -3
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js +16 -12
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +37 -15
- 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 +14 -12
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.js +3 -3
- package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/TildeFinder.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/TildeFinder.js +15 -7
- package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts +6 -5
- package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.js +95 -88
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.scss +245 -245
- package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/GlobalDialog.js +11 -8
- package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/esm/core-react/dialog/SimpleDialog.d.ts +68 -0
- package/lib/esm/core-react/dialog/SimpleDialog.d.ts.map +1 -0
- package/lib/esm/core-react/dialog/SimpleDialog.js +47 -0
- package/lib/esm/core-react/dialog/SimpleDialog.js.map +1 -0
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.js +16 -10
- package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.scss +94 -85
- package/lib/esm/core-react/enums/Alignment.js +3 -3
- package/lib/esm/core-react/enums/Alignment.js.map +1 -1
- package/lib/esm/core-react/enums/CheckBoxState.js +3 -3
- package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
- package/lib/esm/core-react/enums/Orientation.js +3 -3
- package/lib/esm/core-react/enums/Orientation.js.map +1 -1
- package/lib/esm/core-react/enums/SortDirection.js +3 -3
- package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
- package/lib/esm/core-react/enums/TimeFormat.js +3 -3
- package/lib/esm/core-react/enums/TimeFormat.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js +8 -5
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.scss +9 -9
- package/lib/esm/core-react/expandable/classes.scss +9 -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.map +1 -1
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.js +38 -15
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.js.map +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.js +33 -16
- package/lib/esm/core-react/focustrap/FocusTrap.js.map +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.js +4 -7
- package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
- package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withOnOutsideClick.js +17 -13
- package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withTimeout.js +6 -8
- package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +5 -1
- package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -1
- package/lib/esm/core-react/icons/ConditionalIconItem.js +26 -9
- package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js +22 -12
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.scss +19 -20
- package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.js +4 -4
- package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.scss +15 -15
- package/lib/esm/core-react/icons/WebFontIcon.js +3 -3
- 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 +18 -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 -12
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +6 -4
- 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 -21
- package/lib/esm/core-react/inputs/Input.d.ts +1 -1
- package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/Input.js +6 -7
- package/lib/esm/core-react/inputs/Input.js.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js +11 -14
- package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/esm/core-react/inputs/InputStatus.js +3 -3
- package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledComponentProps.js +3 -3
- package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/esm/core-react/inputs/classes.scss +12 -8
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.js +3 -4
- package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.scss +34 -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 +2 -2
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js +26 -17
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +88 -88
- package/lib/esm/core-react/inputs/variables.scss +38 -38
- package/lib/esm/core-react/layout-variables.scss +15 -17
- package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
- package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.js +20 -14
- 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.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.js +4 -4
- 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.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.js +9 -9
- 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 +3 -3
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js +5 -5
- 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.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.js +3 -3
- 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 +3 -3
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js +6 -6
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.scss +56 -56
- package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.js +19 -13
- package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/esm/core-react/notification/MessageType.js +3 -3
- 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 +50 -31
- 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.d.ts.map +1 -1
- package/lib/esm/core-react/radialmenu/Annulus.js +4 -4
- package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.js +26 -11
- 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 +17 -7
- package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.scss +47 -47
- package/lib/esm/core-react/settings/SettingsContainer.d.ts +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.js +54 -19
- package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.scss +68 -68
- package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
- package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsManager.js +7 -8
- 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 +59 -41
- package/lib/esm/core-react/style/colors.scss +77 -77
- package/lib/esm/core-react/style/index.scss +10 -10
- package/lib/esm/core-react/style/mixins.scss +23 -27
- package/lib/esm/core-react/style/opacity.scss +16 -16
- package/lib/esm/core-react/style/themecolors.scss +133 -123
- package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
- package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/Tabs.js +13 -11
- package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.js +3 -3
- package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/esm/core-react/tabs/classes.scss +9 -7
- package/lib/esm/core-react/tabs/index.scss +5 -5
- package/lib/esm/core-react/tabs/tabs.scss +96 -96
- package/lib/esm/core-react/tabs/vertical.scss +51 -51
- package/lib/esm/core-react/text/BlockText.js +4 -4
- package/lib/esm/core-react/text/BlockText.js.map +1 -1
- package/lib/esm/core-react/text/BodyText.js +4 -4
- package/lib/esm/core-react/text/BodyText.js.map +1 -1
- package/lib/esm/core-react/text/DisabledText.js +4 -4
- package/lib/esm/core-react/text/DisabledText.js.map +1 -1
- package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/esm/core-react/text/FilteredText.js +5 -5
- 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.js +4 -4
- package/lib/esm/core-react/text/MutedText.js.map +1 -1
- package/lib/esm/core-react/text/StyledText.js +3 -3
- package/lib/esm/core-react/text/StyledText.js.map +1 -1
- package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
- package/lib/esm/core-react/text/TextProps.js +3 -3
- package/lib/esm/core-react/text/TextProps.js.map +1 -1
- package/lib/esm/core-react/text/block.scss +15 -15
- package/lib/esm/core-react/text/body.scss +13 -13
- package/lib/esm/core-react/text/classes.scss +18 -10
- package/lib/esm/core-react/text/disabled.scss +9 -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 +9 -10
- package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Branch.js +3 -3
- package/lib/esm/core-react/tree/Branch.js.map +1 -1
- package/lib/esm/core-react/tree/Branch.scss +13 -13
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js +3 -3
- package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.scss +32 -32
- package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Node.js +12 -10
- package/lib/esm/core-react/tree/Node.js.map +1 -1
- package/lib/esm/core-react/tree/Node.scss +68 -68
- package/lib/esm/core-react/tree/Placeholder.js +5 -5
- package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
- package/lib/esm/core-react/tree/Placeholder.scss +17 -17
- package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Tree.js +20 -11
- 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.d.ts.map +1 -1
- package/lib/esm/core-react/uistate/LocalStateStorage.js +7 -4
- package/lib/esm/core-react/uistate/LocalStateStorage.js.map +1 -1
- package/lib/esm/core-react/uistate/UiStateEntry.d.ts.map +1 -1
- package/lib/esm/core-react/uistate/UiStateEntry.js +3 -3
- package/lib/esm/core-react/uistate/UiStateEntry.js.map +1 -1
- package/lib/esm/core-react/uistate/UiStateStorage.d.ts.map +1 -1
- package/lib/esm/core-react/uistate/UiStateStorage.js +3 -3
- package/lib/esm/core-react/uistate/UiStateStorage.js.map +1 -1
- package/lib/esm/core-react/utils/IconHelper.d.ts +3 -1
- package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
- package/lib/esm/core-react/utils/IconHelper.js +35 -6
- package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.js +71 -41
- package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/esm/core-react/utils/Point.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Point.js +3 -3
- package/lib/esm/core-react/utils/Point.js.map +1 -1
- package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Props.js +3 -3
- package/lib/esm/core-react/utils/Props.js.map +1 -1
- package/lib/esm/core-react/utils/Rectangle.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Rectangle.js +15 -7
- package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +4 -2
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
- package/lib/esm/core-react/utils/Size.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Size.js +4 -5
- package/lib/esm/core-react/utils/Size.js.map +1 -1
- package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Timer.js +3 -3
- package/lib/esm/core-react/utils/Timer.js.map +1 -1
- package/lib/esm/core-react/utils/UiGeometry.d.ts.map +1 -1
- package/lib/esm/core-react/utils/UiGeometry.js +9 -5
- package/lib/esm/core-react/utils/UiGeometry.js.map +1 -1
- package/lib/esm/core-react/utils/flattenChildren.js +3 -3
- package/lib/esm/core-react/utils/flattenChildren.js.map +1 -1
- package/lib/esm/core-react/utils/getBestBWContrastColor.js +5 -5
- package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.js +4 -4
- package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/esm/core-react/utils/getDisplayName.d.ts.map +1 -1
- package/lib/esm/core-react/utils/getDisplayName.js +3 -3
- package/lib/esm/core-react/utils/getDisplayName.js.map +1 -1
- package/lib/esm/core-react/utils/getUserColor.d.ts.map +1 -1
- package/lib/esm/core-react/utils/getUserColor.js +5 -4
- package/lib/esm/core-react/utils/getUserColor.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +4 -4
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +22 -11
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.js +3 -3
- package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +3 -3
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEventListener.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEventListener.js +3 -3
- package/lib/esm/core-react/utils/hooks/useEventListener.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useInterval.js +6 -4
- package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useLifecycleLogging.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js +7 -4
- package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +15 -6
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +3 -3
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefEffect.js +3 -3
- package/lib/esm/core-react/utils/hooks/useRefEffect.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefState.js +3 -3
- package/lib/esm/core-react/utils/hooks/useRefState.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.js +8 -6
- package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +8 -8
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js +43 -32
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useTargeted.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useTargeted.js +7 -4
- package/lib/esm/core-react/utils/hooks/useTargeted.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useThrottledFn.js +3 -3
- package/lib/esm/core-react/utils/hooks/useThrottledFn.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js +3 -4
- package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js.map +1 -1
- package/lib/esm/core-react/utils/isPromiseLike.d.ts.map +1 -1
- package/lib/esm/core-react/utils/isPromiseLike.js +6 -4
- package/lib/esm/core-react/utils/isPromiseLike.js.map +1 -1
- package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts +14 -0
- package/lib/esm/core-react/utils/reuseOrCreatePromise.d.ts.map +1 -0
- package/lib/esm/core-react/utils/reuseOrCreatePromise.js +29 -0
- package/lib/esm/core-react/utils/reuseOrCreatePromise.js.map +1 -0
- package/lib/esm/core-react/utils/shallowDiffers.d.ts.map +1 -1
- package/lib/esm/core-react/utils/shallowDiffers.js +3 -3
- package/lib/esm/core-react/utils/shallowDiffers.js.map +1 -1
- package/lib/esm/core-react/utils/typeUtils.js +3 -3
- package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
- package/lib/esm/core-react.d.ts +3 -3
- package/lib/esm/core-react.d.ts.map +1 -1
- package/lib/esm/core-react.js +6 -6
- package/lib/esm/core-react.js.map +1 -1
- package/lib/public/locales/en/UiCore.json +31 -31
- package/package.json +8 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Dialog
|
|
7
7
|
*/
|
|
@@ -9,15 +9,15 @@ import "./MessageBox.scss";
|
|
|
9
9
|
import classnames from "classnames";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { MessageSeverity } from "@itwin/appui-abstract";
|
|
12
|
-
import {
|
|
13
|
-
import { SvgHelpCircular, SvgHelpCircularHollow, SvgInfoCircular, SvgInfoCircularHollow, SvgStatusError, SvgStatusErrorHollow, SvgStatusRejected, SvgStatusRejectedHollow, SvgStatusSuccess, SvgStatusSuccessHollow, SvgStatusWarning } from "@itwin/itwinui-icons-react";
|
|
12
|
+
import { SimpleDialog } from "../dialog/SimpleDialog";
|
|
13
|
+
import { SvgHelpCircular, SvgHelpCircularHollow, SvgInfoCircular, SvgInfoCircularHollow, SvgStatusError, SvgStatusErrorHollow, SvgStatusRejected, SvgStatusRejectedHollow, SvgStatusSuccess, SvgStatusSuccessHollow, SvgStatusWarning, } from "@itwin/itwinui-icons-react";
|
|
14
14
|
import { Icon } from "../icons/IconComponent";
|
|
15
15
|
/** Message Box React component.
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
18
|
class MessageBox extends React.PureComponent {
|
|
19
19
|
render() {
|
|
20
|
-
return (React.createElement(
|
|
20
|
+
return (React.createElement(SimpleDialog, { title: this.props.title, buttonCluster: this.props.buttonCluster, opened: this.props.opened, onClose: this.props.onClose, onEscape: this.props.onEscape, modal: this.props.modal, className: this.props.className, style: this.props.style, width: this.props.width },
|
|
21
21
|
React.createElement(MessageContainer, { severity: this.props.severity, className: this.props.contentClassName, style: this.props.contentStyle }, this.props.children)));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBox.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageBox.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,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K,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAClG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport \"./MessageBox.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport type { DialogButtonDef} from \"@itwin/appui-abstract\";\r\nimport { MessageSeverity } from \"@itwin/appui-abstract\";\r\nimport { Dialog } from \"../dialog/Dialog\";\r\nimport type { CommonProps } from \"../utils/Props\";\r\nimport { SvgHelpCircular, SvgHelpCircularHollow, SvgInfoCircular, SvgInfoCircularHollow, SvgStatusError, SvgStatusErrorHollow, SvgStatusRejected,\r\n SvgStatusRejectedHollow,\r\n SvgStatusSuccess, SvgStatusSuccessHollow, SvgStatusWarning } from \"@itwin/itwinui-icons-react\";\r\nimport type { IconSpec } from \"../icons/IconComponent\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[MessageBox]] component\r\n * @public\r\n */\r\nexport interface MessageBoxProps extends CommonProps {\r\n /** Severity of MessageBox */\r\n severity: MessageSeverity;\r\n /** whether to show dialog or not */\r\n opened: boolean;\r\n /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */\r\n buttonCluster: DialogButtonDef[];\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for <Esc> key */\r\n onEscape?: () => void;\r\n /** minimum width that the dialog may be resized to. Default: 400 */\r\n minWidth?: number;\r\n /** minimum height that the dialog may be resized to. Default: 400 */\r\n minHeight?: number;\r\n /** initial width of dialog.\r\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\r\n * Default: \"50%\"\r\n */\r\n width?: string | number;\r\n /** initial height of dialog.\r\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\r\n * Default: \"\"\r\n */\r\n height?: string | number;\r\n /** Whether to show background overlay. Default: true */\r\n modal?: boolean;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n /** Message content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** Message Box React component.\r\n * @public\r\n */\r\nexport class MessageBox extends React.PureComponent<MessageBoxProps> {\r\n public static defaultProps: Partial<MessageBoxProps> = {\r\n minWidth: 400,\r\n minHeight: 400,\r\n width: \"512px\",\r\n modal: true,\r\n };\r\n\r\n public override render(): JSX.Element {\r\n return (\r\n <Dialog\r\n title={this.props.title}\r\n buttonCluster={this.props.buttonCluster}\r\n opened={this.props.opened}\r\n width={this.props.width}\r\n onClose={this.props.onClose}\r\n onEscape={this.props.onEscape}\r\n modal={this.props.modal}\r\n className={this.props.className}\r\n style={this.props.style} >\r\n <MessageContainer severity={this.props.severity} className={this.props.contentClassName} style={this.props.contentStyle}>\r\n {this.props.children}\r\n </MessageContainer>\r\n </Dialog>\r\n );\r\n }\r\n}\r\n\r\n/** Properties for the [[MessageContainer]] component\r\n * @public\r\n */\r\nexport interface MessageContainerProps extends CommonProps {\r\n severity: MessageSeverity;\r\n /** Message Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** Message Container React component.\r\n * @public\r\n */\r\nexport class MessageContainer extends React.PureComponent<MessageContainerProps> {\r\n /** Returns the class name associated with the WebFont icon corresponding to the MessageSeverity.\r\n * @param severity MessageSeverity\r\n * @param _hollow @deprecated in 4.0. Ignored.\r\n * @deprecated in 4.0. Please use getIcon method\r\n */\r\n /* istanbul ignore next */\r\n public static getIconClassName(severity: MessageSeverity, _hollow?: boolean): string {\r\n let iconClassName = \"\";\r\n\r\n switch (severity) {\r\n case MessageSeverity.None:\r\n iconClassName = \"\";\r\n break;\r\n case MessageSeverity.Success:\r\n iconClassName = \"core-message-box-success\";\r\n break;\r\n case MessageSeverity.Information:\r\n iconClassName = \"core-message-box-information\";\r\n break;\r\n case MessageSeverity.Question:\r\n iconClassName = \"core-message-box-question\";\r\n break;\r\n case MessageSeverity.Warning:\r\n iconClassName = \"core-message-box-warning\"; // TODO - need icon-status-warning-hollow icon\r\n break;\r\n case MessageSeverity.Error:\r\n iconClassName = \"core-message-box-error\";\r\n break;\r\n case MessageSeverity.Fatal:\r\n iconClassName = \"core-message-box-fatal\";\r\n break;\r\n }\r\n\r\n return iconClassName;\r\n }\r\n\r\n /** Returns the React icon corresponding to the MessageSeverity.\r\n * @param severity MessageSeverity\r\n * @param hollow set to true to return the hollow form of the icon.\r\n * @returns IconSpec\r\n */\r\n /* ignore for unit tests and replace with visual testing */\r\n /* istanbul ignore next */\r\n public static getIcon(severity: MessageSeverity, hollow?: boolean): IconSpec {\r\n let iconSpec: IconSpec = \"\";\r\n switch (severity) {\r\n case MessageSeverity.None:\r\n iconSpec = \"\";\r\n break;\r\n case MessageSeverity.Success:\r\n iconSpec = hollow ? <SvgStatusSuccessHollow /> : <SvgStatusSuccess />;\r\n break;\r\n case MessageSeverity.Information:\r\n iconSpec = hollow ? <SvgInfoCircularHollow /> : <SvgInfoCircular />;\r\n break;\r\n case MessageSeverity.Question:\r\n iconSpec = hollow ? <SvgHelpCircularHollow /> : <SvgHelpCircular />;\r\n break;\r\n case MessageSeverity.Warning:\r\n iconSpec = <SvgStatusWarning />; // TODO - need icon-status-warning-hollow icon\r\n break;\r\n case MessageSeverity.Error:\r\n iconSpec = hollow ? <SvgStatusErrorHollow /> : <SvgStatusError />;\r\n break;\r\n case MessageSeverity.Fatal:\r\n iconSpec = hollow ? <SvgStatusRejectedHollow /> : <SvgStatusRejected />;\r\n break;\r\n }\r\n return iconSpec;\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const iconClassName = classnames(\r\n \"icon\",\r\n \"core-message-box-icon\"\r\n );\r\n\r\n const iconSpec = MessageContainer.getIcon(this.props.severity);\r\n\r\n return (\r\n <div className=\"core-message-box-container\">\r\n <div className={iconClassName} ><Icon iconSpec={iconSpec} /></div>\r\n <div className={classnames(\"core-message-box-content\", this.props.className)} style={this.props.style}>\r\n {this.props.children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MessageBox.js","sourceRoot":"","sources":["../../../../src/core-react/messagebox/MessageBox.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AA0C9C;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK,CAAC,aAA8B;IAQlD,MAAM;QACpB,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EACvC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,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pB,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;QAElE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE/D,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B;YACzC,6BAAK,SAAS,EAAE,aAAa;gBAC3B,oBAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACxB;YACN,6BACE,SAAS,EAAE,UAAU,CACnB,0BAA0B,EAC1B,IAAI,CAAC,KAAK,CAAC,SAAS,CACrB,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAEtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport \"./MessageBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { DialogButtonDef } from \"@itwin/appui-abstract\";\nimport { MessageSeverity } from \"@itwin/appui-abstract\";\nimport { SimpleDialog } from \"../dialog/SimpleDialog\";\nimport type { CommonProps } from \"../utils/Props\";\nimport {\n SvgHelpCircular,\n SvgHelpCircularHollow,\n SvgInfoCircular,\n SvgInfoCircularHollow,\n SvgStatusError,\n SvgStatusErrorHollow,\n SvgStatusRejected,\n SvgStatusRejectedHollow,\n SvgStatusSuccess,\n SvgStatusSuccessHollow,\n SvgStatusWarning,\n} from \"@itwin/itwinui-icons-react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\n\n/** Properties for the [[MessageBox]] component\n * @public\n */\nexport interface MessageBoxProps extends CommonProps {\n /** Severity of MessageBox */\n severity: MessageSeverity;\n /** whether to show dialog or not */\n opened: boolean;\n /** List of [[DialogButtonDef]] objects specifying buttons and associated onClick events */\n buttonCluster: DialogButtonDef[];\n /** Title to show in title bar of dialog */\n title?: string | React.ReactElement;\n /** onClick event for X button for dialog */\n onClose?: () => void;\n /** 'keyup' event for <Esc> key */\n onEscape?: () => void;\n /** minimum width that the dialog may be resized to. Default: 400 */\n minWidth?: number;\n /** minimum height that the dialog may be resized to. Default: 400 */\n minHeight?: number;\n /** initial width of dialog.\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\n * Default: \"50%\"\n */\n width?: string | number;\n /** initial height of dialog.\n * Displayed in px if value is a number, otherwise displayed in specified CSS unit.\n * Default: \"\"\n */\n height?: string | number;\n /** Whether to show background overlay. Default: true */\n modal?: boolean;\n /** Custom CSS class name for the content */\n contentClassName?: string;\n /** Custom CSS Style for the content */\n contentStyle?: React.CSSProperties;\n /** Message content */\n children?: React.ReactNode;\n}\n\n/** Message Box React component.\n * @public\n */\nexport class MessageBox extends React.PureComponent<MessageBoxProps> {\n public static defaultProps: Partial<MessageBoxProps> = {\n minWidth: 400,\n minHeight: 400,\n width: \"512px\",\n modal: true,\n };\n\n public override render(): React.ReactElement {\n return (\n <SimpleDialog\n title={this.props.title}\n buttonCluster={this.props.buttonCluster}\n opened={this.props.opened}\n onClose={this.props.onClose}\n onEscape={this.props.onEscape}\n modal={this.props.modal}\n className={this.props.className}\n style={this.props.style}\n width={this.props.width}\n >\n <MessageContainer\n severity={this.props.severity}\n className={this.props.contentClassName}\n style={this.props.contentStyle}\n >\n {this.props.children}\n </MessageContainer>\n </SimpleDialog>\n );\n }\n}\n\n/** Properties for the [[MessageContainer]] component\n * @public\n */\nexport interface MessageContainerProps extends CommonProps {\n severity: MessageSeverity;\n /** Message Content */\n children?: React.ReactNode;\n}\n\n/** Message Container React component.\n * @public\n */\nexport class MessageContainer extends React.PureComponent<MessageContainerProps> {\n /** Returns the class name associated with the WebFont icon corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n * @param _hollow @deprecated in 4.0. Ignored.\n * @deprecated in 4.0. Please use getIcon method\n */\n /* istanbul ignore next */\n public static getIconClassName(\n severity: MessageSeverity,\n _hollow?: boolean\n ): string {\n let iconClassName = \"\";\n\n switch (severity) {\n case MessageSeverity.None:\n iconClassName = \"\";\n break;\n case MessageSeverity.Success:\n iconClassName = \"core-message-box-success\";\n break;\n case MessageSeverity.Information:\n iconClassName = \"core-message-box-information\";\n break;\n case MessageSeverity.Question:\n iconClassName = \"core-message-box-question\";\n break;\n case MessageSeverity.Warning:\n iconClassName = \"core-message-box-warning\"; // TODO - need icon-status-warning-hollow icon\n break;\n case MessageSeverity.Error:\n iconClassName = \"core-message-box-error\";\n break;\n case MessageSeverity.Fatal:\n iconClassName = \"core-message-box-fatal\";\n break;\n }\n\n return iconClassName;\n }\n\n /** Returns the React icon corresponding to the MessageSeverity.\n * @param severity MessageSeverity\n * @param hollow set to true to return the hollow form of the icon.\n * @returns IconSpec\n */\n /* ignore for unit tests and replace with visual testing */\n /* istanbul ignore next */\n public static getIcon(severity: MessageSeverity, hollow?: boolean): IconSpec {\n let iconSpec: IconSpec = \"\";\n switch (severity) {\n case MessageSeverity.None:\n iconSpec = \"\";\n break;\n case MessageSeverity.Success:\n iconSpec = hollow ? <SvgStatusSuccessHollow /> : <SvgStatusSuccess />;\n break;\n case MessageSeverity.Information:\n iconSpec = hollow ? <SvgInfoCircularHollow /> : <SvgInfoCircular />;\n break;\n case MessageSeverity.Question:\n iconSpec = hollow ? <SvgHelpCircularHollow /> : <SvgHelpCircular />;\n break;\n case MessageSeverity.Warning:\n iconSpec = <SvgStatusWarning />; // TODO - need icon-status-warning-hollow icon\n break;\n case MessageSeverity.Error:\n iconSpec = hollow ? <SvgStatusErrorHollow /> : <SvgStatusError />;\n break;\n case MessageSeverity.Fatal:\n iconSpec = hollow ? <SvgStatusRejectedHollow /> : <SvgStatusRejected />;\n break;\n }\n return iconSpec;\n }\n\n public override render(): React.ReactElement {\n const iconClassName = classnames(\"icon\", \"core-message-box-icon\");\n\n const iconSpec = MessageContainer.getIcon(this.props.severity);\n\n return (\n <div className=\"core-message-box-container\">\n <div className={iconClassName}>\n <Icon iconSpec={iconSpec} />\n </div>\n <div\n className={classnames(\n \"core-message-box-content\",\n this.props.className\n )}\n style={this.props.style}\n >\n {this.props.children}\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "../icons/variables";
|
|
6
|
-
@import "../style/colors";
|
|
7
|
-
@import "../style/baseline";
|
|
8
|
-
|
|
9
|
-
.core-message-box-container {
|
|
10
|
-
display: flex;
|
|
11
|
-
color: var(--iui-color-text);
|
|
12
|
-
|
|
13
|
-
.core-message-box-icon {
|
|
14
|
-
flex: 0 0;
|
|
15
|
-
font-size: $uicore-icons-medium;
|
|
16
|
-
padding: 0 $uicore-unbordered-padding $uicore-unbordered-padding
|
|
17
|
-
$uicore-unbordered-padding;
|
|
18
|
-
margin-top: 10px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.core-message-box-content {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
flex: 1 1;
|
|
25
|
-
|
|
26
|
-
a {
|
|
27
|
-
// iTwinUI anchor link style
|
|
28
|
-
color: var(--iui-color-text-accent);
|
|
29
|
-
-webkit-tap-highlight-color: hsl(
|
|
30
|
-
var(--iui-color-accent-hsl) / var(--iui-opacity-6)
|
|
31
|
-
);
|
|
32
|
-
border-radius: var(--iui-border-radius-1);
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.core-message-box-success {
|
|
40
|
-
color: var(--iui-color-text-positive);
|
|
41
|
-
}
|
|
42
|
-
.core-message-box-information,
|
|
43
|
-
.core-message-box-question {
|
|
44
|
-
color: var(--iui-color-text-informational);
|
|
45
|
-
}
|
|
46
|
-
.core-message-box-warning {
|
|
47
|
-
color: var(--iui-color-text-warning);
|
|
48
|
-
}
|
|
49
|
-
.core-message-box-error,
|
|
50
|
-
.core-message-box-fatal {
|
|
51
|
-
color: var(--iui-color-text-negative);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.notifymessage-icon {
|
|
55
|
-
margin-right: 6px;
|
|
56
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@import "../icons/variables";
|
|
6
|
+
@import "../style/colors";
|
|
7
|
+
@import "../style/baseline";
|
|
8
|
+
|
|
9
|
+
.core-message-box-container {
|
|
10
|
+
display: flex;
|
|
11
|
+
color: var(--iui-color-text);
|
|
12
|
+
|
|
13
|
+
.core-message-box-icon {
|
|
14
|
+
flex: 0 0;
|
|
15
|
+
font-size: $uicore-icons-medium;
|
|
16
|
+
padding: 0 $uicore-unbordered-padding $uicore-unbordered-padding
|
|
17
|
+
$uicore-unbordered-padding;
|
|
18
|
+
margin-top: 10px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.core-message-box-content {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
flex: 1 1;
|
|
25
|
+
|
|
26
|
+
a {
|
|
27
|
+
// iTwinUI anchor link style
|
|
28
|
+
color: var(--iui-color-text-accent);
|
|
29
|
+
-webkit-tap-highlight-color: hsl(
|
|
30
|
+
var(--iui-color-accent-hsl) / var(--iui-opacity-6)
|
|
31
|
+
);
|
|
32
|
+
border-radius: var(--iui-border-radius-1);
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.core-message-box-success {
|
|
40
|
+
color: var(--iui-color-text-positive);
|
|
41
|
+
}
|
|
42
|
+
.core-message-box-information,
|
|
43
|
+
.core-message-box-question {
|
|
44
|
+
color: var(--iui-color-text-informational);
|
|
45
|
+
}
|
|
46
|
+
.core-message-box-warning {
|
|
47
|
+
color: var(--iui-color-text-warning);
|
|
48
|
+
}
|
|
49
|
+
.core-message-box-error,
|
|
50
|
+
.core-message-box-fatal {
|
|
51
|
+
color: var(--iui-color-text-negative);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.notifymessage-icon {
|
|
55
|
+
margin-right: 6px;
|
|
56
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,wBAAwB;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"MessageRenderer.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,wBAAwB;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,sBAyF1D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Notification
|
|
7
7
|
*/
|
|
@@ -15,24 +15,26 @@ export function MessageRenderer(props) {
|
|
|
15
15
|
let messageNode = null;
|
|
16
16
|
const OutElement = props.useSpan ? "span" : "div";
|
|
17
17
|
if (typeof props.message === "string") {
|
|
18
|
-
messageNode = React.createElement(OutElement, { className: props.className }, props.message);
|
|
18
|
+
messageNode = (React.createElement(OutElement, { className: props.className }, props.message));
|
|
19
19
|
}
|
|
20
20
|
else if (isHTMLElement(props.message)) {
|
|
21
21
|
// the esm build of dompurify has a default import but the cjs build does not
|
|
22
22
|
// if there is a default export, use it (likely esm), otherwise use the namespace
|
|
23
23
|
// istanbul ignore next
|
|
24
|
-
const sanitizer = DOMPurify
|
|
24
|
+
const sanitizer = DOMPurify ?? DOMPurifyNS; // `sanitizer` is default function name for "jam3/no-sanitizer-with-danger" ESLint rule
|
|
25
25
|
let validAnchors = false;
|
|
26
26
|
let hasAnchors = false;
|
|
27
27
|
// verify that the tag has proper relationships
|
|
28
28
|
const isAnchorValid = (anchor) => {
|
|
29
|
-
return anchor.hasAttribute("rel") &&
|
|
29
|
+
return (anchor.hasAttribute("rel") &&
|
|
30
|
+
(anchor.rel.includes("noopener") || anchor.rel.includes("noreferrer")));
|
|
30
31
|
};
|
|
31
32
|
// recursively check child elements for valid anchor tags
|
|
32
33
|
const checkChildAnchors = (parent) => {
|
|
33
34
|
const children = Array.from(parent.children);
|
|
34
35
|
for (const child of children) {
|
|
35
|
-
if (child.hasAttribute("target") &&
|
|
36
|
+
if (child.hasAttribute("target") &&
|
|
37
|
+
child.target === "_blank") {
|
|
36
38
|
hasAnchors = true;
|
|
37
39
|
validAnchors = isAnchorValid(child);
|
|
38
40
|
if (!validAnchors) {
|
|
@@ -46,7 +48,8 @@ export function MessageRenderer(props) {
|
|
|
46
48
|
// https://web.dev/external-anchors-use-rel-noopener/
|
|
47
49
|
// first check the message element
|
|
48
50
|
/* istanbul ignore else */
|
|
49
|
-
if (props.message.hasAttribute("target") &&
|
|
51
|
+
if (props.message.hasAttribute("target") &&
|
|
52
|
+
props.message.target === "_blank") {
|
|
50
53
|
hasAnchors = true;
|
|
51
54
|
validAnchors = isAnchorValid(props.message);
|
|
52
55
|
}
|
|
@@ -59,19 +62,22 @@ export function MessageRenderer(props) {
|
|
|
59
62
|
let sanitizedHtml;
|
|
60
63
|
if (hasAnchors && validAnchors) {
|
|
61
64
|
// all anchors are valid. do not remove the target attr
|
|
62
|
-
sanitizedHtml = sanitizer.sanitize(props.message.outerHTML, {
|
|
65
|
+
sanitizedHtml = sanitizer.sanitize(props.message.outerHTML, {
|
|
66
|
+
ADD_ATTR: ["target"],
|
|
67
|
+
});
|
|
63
68
|
}
|
|
64
69
|
else {
|
|
65
70
|
sanitizedHtml = sanitizer.sanitize(props.message.outerHTML);
|
|
66
71
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
messageNode = (React.createElement(OutElement, { className: props.className,
|
|
73
|
+
// we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above
|
|
74
|
+
// eslint-disable-next-line jam3/no-sanitizer-with-danger
|
|
75
|
+
dangerouslySetInnerHTML: { __html: sanitizedHtml } }));
|
|
70
76
|
}
|
|
71
77
|
else {
|
|
72
78
|
/* istanbul ignore else */
|
|
73
79
|
if (isReactMessage(props.message))
|
|
74
|
-
messageNode = React.createElement(OutElement, { className: props.className }, props.message.reactNode);
|
|
80
|
+
messageNode = (React.createElement(OutElement, { className: props.className }, props.message.reactNode));
|
|
75
81
|
}
|
|
76
82
|
return messageNode;
|
|
77
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageRenderer.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"MessageRenderer.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,SAAS,EAAE,KAAK,WAAW,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAe9D;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,IAAI,WAAW,GAAG,IAAI,CAAC;IACvB,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IAElD,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE;QACrC,WAAW,GAAG,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAG,KAAK,CAAC,OAAO,CAAc,CACrE,CAAC;KACH;SAAM,IAAI,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;QACvC,6EAA6E;QAC7E,iFAAiF;QACjF,uBAAuB;QACvB,MAAM,SAAS,GAAG,SAAS,IAAI,WAAW,CAAC,CAAC,uFAAuF;QAEnI,IAAI,YAAY,GAAG,KAAK,CAAC;QAC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IAAI,UAAU,IAAI,YAAY,EAAE;YAC9B,uDAAuD;YACvD,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE;gBAC1D,QAAQ,EAAE,CAAC,QAAQ,CAAC;aACrB,CAAC,CAAC;SACJ;aAAM;YACL,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;SAC7D;QAED,WAAW,GAAG,CACZ,oBAAC,UAAU,IACT,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,iFAAiF;YACjF,yDAAyD;YACzD,uBAAuB,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,GAClD,CACH,CAAC;KACH;SAAM;QACL,0BAA0B;QAC1B,IAAI,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC;YAC/B,WAAW,GAAG,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,IACnC,KAAK,CAAC,OAAO,CAAC,SAAS,CACb,CACd,CAAC;KACL;IAED,OAAO,WAAW,CAAC;AACrB,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 Notification\n */\n\nimport * as React from \"react\";\nimport DOMPurify, * as DOMPurifyNS from \"dompurify\";\nimport type { MessageType } from \"./MessageType\";\nimport { isHTMLElement, isReactMessage } from \"./MessageType\";\nimport type { ClassNameProps } from \"../utils/Props\";\n\n// cSpell:ignore dompurify\n\n/** Properties for the [[MessageRenderer]] component\n * @public\n */\nexport interface MessageRendererProps extends ClassNameProps {\n /** Message to render */\n message: MessageType;\n /** Indicates whether to use a `span` or `div` element for rendering */\n useSpan?: boolean;\n}\n\n/** React component renders a string, HTMLElement or React node in a `div` or `span`\n * @public\n */\nexport function MessageRenderer(props: MessageRendererProps) {\n let messageNode = null;\n const OutElement = props.useSpan ? \"span\" : \"div\";\n\n if (typeof props.message === \"string\") {\n messageNode = (\n <OutElement className={props.className}>{props.message}</OutElement>\n );\n } else if (isHTMLElement(props.message)) {\n // the esm build of dompurify has a default import but the cjs build does not\n // if there is a default export, use it (likely esm), otherwise use the namespace\n // istanbul ignore next\n const sanitizer = DOMPurify ?? DOMPurifyNS; // `sanitizer` is default function name for \"jam3/no-sanitizer-with-danger\" ESLint rule\n\n let validAnchors = false;\n let hasAnchors = false;\n\n // verify that the tag has proper relationships\n const isAnchorValid = (anchor: HTMLAnchorElement): boolean => {\n return (\n anchor.hasAttribute(\"rel\") &&\n (anchor.rel.includes(\"noopener\") || anchor.rel.includes(\"noreferrer\"))\n );\n };\n\n // recursively check child elements for valid anchor tags\n const checkChildAnchors = (parent: Element) => {\n const children = Array.from(parent.children);\n for (const child of children) {\n if (\n child.hasAttribute(\"target\") &&\n (child as HTMLAnchorElement).target === \"_blank\"\n ) {\n hasAnchors = true;\n validAnchors = isAnchorValid(child as HTMLAnchorElement);\n if (!validAnchors) {\n return;\n }\n }\n checkChildAnchors(child);\n }\n };\n\n // check for anchor tags in the message that have target _blank also have a relationship that avoids security holes\n // https://web.dev/external-anchors-use-rel-noopener/\n // first check the message element\n /* istanbul ignore else */\n if (\n props.message.hasAttribute(\"target\") &&\n (props.message as HTMLAnchorElement).target === \"_blank\"\n ) {\n hasAnchors = true;\n validAnchors = isAnchorValid(props.message as HTMLAnchorElement);\n } else {\n // if the message element is not an anchor, recursively verify it's children\n if (props.message.children) {\n checkChildAnchors(props.message);\n }\n }\n\n let sanitizedHtml;\n if (hasAnchors && validAnchors) {\n // all anchors are valid. do not remove the target attr\n sanitizedHtml = sanitizer.sanitize(props.message.outerHTML, {\n ADD_ATTR: [\"target\"],\n });\n } else {\n sanitizedHtml = sanitizer.sanitize(props.message.outerHTML);\n }\n\n messageNode = (\n <OutElement\n className={props.className}\n // we can safely disable jam3/no-sanitizer-with-danger as we are sanitizing above\n // eslint-disable-next-line jam3/no-sanitizer-with-danger\n dangerouslySetInnerHTML={{ __html: sanitizedHtml }}\n />\n );\n } else {\n /* istanbul ignore else */\n if (isReactMessage(props.message))\n messageNode = (\n <OutElement className={props.className}>\n {props.message.reactNode}\n </OutElement>\n );\n }\n\n return messageNode;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageType.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,2BAEjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"MessageType.d.ts","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,YAAa,WAAW,2BAEjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,YAChB,WAAW,4BAGrB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Notification
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageType.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"MessageType.js","sourceRoot":"","sources":["../../../../src/core-react/notification/MessageType.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAgBH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAoB,EAA0B,EAAE;IAC5E,OAAQ,OAAuB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC1D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAoB,EACK,EAAE;IAC3B,OAAQ,OAAwB,CAAC,SAAS,KAAK,SAAS,CAAC;AAC3D,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 Notification\n */\n\nimport type * as React from \"react\";\n\n/** Describes a React based message\n * @public\n */\nexport interface ReactMessage {\n reactNode: React.ReactNode;\n}\n\n/** Types for message\n * @public\n */\nexport type MessageType = string | HTMLElement | ReactMessage;\n\n/** HTMLElement type guard.\n * @internal\n */\nexport const isHTMLElement = (message: MessageType): message is HTMLElement => {\n return (message as HTMLElement).outerHTML !== undefined;\n};\n\n/** ReactMessage type guard.\n * @internal\n */\nexport const isReactMessage = (\n message: MessageType\n): message is ReactMessage => {\n return (message as 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QzB;IAEF,OAAO,CAAC,YAAY,CAQlB;IAEF,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,mBAAmB,CAiBzB;IAEF,OAAO,CAAC,kBAAkB,CAUxB;IAEF,OAAO,CAAC,eAAe,CAarB;IAEF,OAAO,CAAC,OAAO,CAQb;IAEF,OAAO,CAAC,KAAK,CAIX;IAEF,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,uBAAuB;IA6B/B,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,YAAY,CA6ElB;IAEF,OAAO,CAAC,uBAAuB;IAqF/B,OAAO,CAAC,SAAS,CAgCf;IAEF,OAAO,CAAC,mBAAmB,CAMzB;IAEc,MAAM;CAwDvB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Popup
|
|
7
7
|
*/
|
|
@@ -16,7 +16,6 @@ import { FocusTrap } from "../focustrap/FocusTrap";
|
|
|
16
16
|
*/
|
|
17
17
|
class Popup extends React.Component {
|
|
18
18
|
constructor(props) {
|
|
19
|
-
var _a, _b;
|
|
20
19
|
super(props);
|
|
21
20
|
this._popup = null;
|
|
22
21
|
this._bindWindowEvents = () => {
|
|
@@ -51,7 +50,8 @@ class Popup extends React.Component {
|
|
|
51
50
|
return;
|
|
52
51
|
if (this.props.isPinned)
|
|
53
52
|
return;
|
|
54
|
-
if (!this.props.closeOnNestedPopupOutsideClick &&
|
|
53
|
+
if (!this.props.closeOnNestedPopupOutsideClick &&
|
|
54
|
+
this.isInCorePopup(event.target))
|
|
55
55
|
return;
|
|
56
56
|
if (this.props.onOutsideClick)
|
|
57
57
|
return this.props.onOutsideClick(event);
|
|
@@ -64,7 +64,9 @@ class Popup extends React.Component {
|
|
|
64
64
|
return;
|
|
65
65
|
if (this.props.onContextMenu)
|
|
66
66
|
return this.props.onContextMenu(event);
|
|
67
|
-
const closeOnContextMenu = this.props.closeOnContextMenu !== undefined
|
|
67
|
+
const closeOnContextMenu = this.props.closeOnContextMenu !== undefined
|
|
68
|
+
? this.props.closeOnContextMenu
|
|
69
|
+
: true;
|
|
68
70
|
if (closeOnContextMenu)
|
|
69
71
|
this._hide();
|
|
70
72
|
};
|
|
@@ -102,7 +104,7 @@ class Popup extends React.Component {
|
|
|
102
104
|
this._getPosition = (position) => {
|
|
103
105
|
const activeWindow = this.getParentWindow();
|
|
104
106
|
const { target, offset, top, left } = this.props;
|
|
105
|
-
const offsetArrow =
|
|
107
|
+
const offsetArrow = this.props.showArrow ? 6 : 0;
|
|
106
108
|
// absolute position
|
|
107
109
|
if (this._isPositionAbsolute())
|
|
108
110
|
return { x: left, y: top };
|
|
@@ -118,7 +120,8 @@ class Popup extends React.Component {
|
|
|
118
120
|
switch (position) {
|
|
119
121
|
case RelativePosition.Top:
|
|
120
122
|
point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;
|
|
121
|
-
point.x =
|
|
123
|
+
point.x =
|
|
124
|
+
scrollX + targetRect.left + targetRect.width / 2 - popupWidth / 2;
|
|
122
125
|
break;
|
|
123
126
|
case RelativePosition.TopLeft:
|
|
124
127
|
point.y = scrollY + targetRect.top - popupHeight - offset - offsetArrow;
|
|
@@ -130,7 +133,8 @@ class Popup extends React.Component {
|
|
|
130
133
|
break;
|
|
131
134
|
case RelativePosition.Bottom:
|
|
132
135
|
point.y = scrollY + targetRect.bottom + offset + offsetArrow;
|
|
133
|
-
point.x =
|
|
136
|
+
point.x =
|
|
137
|
+
scrollX + targetRect.left + targetRect.width / 2 - popupWidth / 2;
|
|
134
138
|
break;
|
|
135
139
|
case RelativePosition.BottomLeft:
|
|
136
140
|
point.y = scrollY + targetRect.bottom + offset + offsetArrow;
|
|
@@ -141,7 +145,8 @@ class Popup extends React.Component {
|
|
|
141
145
|
point.x = scrollX + targetRect.right - popupWidth;
|
|
142
146
|
break;
|
|
143
147
|
case RelativePosition.Left:
|
|
144
|
-
point.y =
|
|
148
|
+
point.y =
|
|
149
|
+
scrollY + targetRect.top + targetRect.height / 2 - popupHeight / 2;
|
|
145
150
|
point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;
|
|
146
151
|
break;
|
|
147
152
|
case RelativePosition.LeftTop:
|
|
@@ -149,7 +154,8 @@ class Popup extends React.Component {
|
|
|
149
154
|
point.x = scrollX + targetRect.left - popupWidth - offset - offsetArrow;
|
|
150
155
|
break;
|
|
151
156
|
case RelativePosition.Right:
|
|
152
|
-
point.y =
|
|
157
|
+
point.y =
|
|
158
|
+
scrollY + targetRect.top + targetRect.height / 2 - popupHeight / 2;
|
|
153
159
|
point.x = scrollX + targetRect.right + offset + offsetArrow;
|
|
154
160
|
break;
|
|
155
161
|
case RelativePosition.RightTop:
|
|
@@ -191,7 +197,7 @@ class Popup extends React.Component {
|
|
|
191
197
|
this.setState({ animationEnded: true });
|
|
192
198
|
}
|
|
193
199
|
};
|
|
194
|
-
const parentDocument =
|
|
200
|
+
const parentDocument = this.props.target?.ownerDocument ?? document;
|
|
195
201
|
this.state = {
|
|
196
202
|
animationEnded: false,
|
|
197
203
|
isOpen: this.props.isOpen,
|
|
@@ -207,19 +213,17 @@ class Popup extends React.Component {
|
|
|
207
213
|
}
|
|
208
214
|
}
|
|
209
215
|
getParentWindow() {
|
|
210
|
-
var _a;
|
|
211
216
|
// istanbul ignore next
|
|
212
|
-
return
|
|
217
|
+
return this.state.parentDocument.defaultView ?? window;
|
|
213
218
|
}
|
|
214
219
|
componentDidUpdate(previousProps, prevState) {
|
|
215
|
-
var _a, _b;
|
|
216
220
|
if (this.state.position !== prevState.position) {
|
|
217
221
|
this.setState({ animationEnded: false });
|
|
218
222
|
}
|
|
219
223
|
if (this.props.target !== previousProps.target) {
|
|
220
224
|
// istanbul ignore next
|
|
221
225
|
{
|
|
222
|
-
const parentDocument =
|
|
226
|
+
const parentDocument = this.props.target?.ownerDocument ?? document;
|
|
223
227
|
if (parentDocument !== this.state.parentDocument) {
|
|
224
228
|
this._unBindWindowEvents();
|
|
225
229
|
this.setState({ parentDocument });
|
|
@@ -230,8 +234,8 @@ class Popup extends React.Component {
|
|
|
230
234
|
if (this.props.isOpen) {
|
|
231
235
|
const position = this._toggleRelativePosition();
|
|
232
236
|
const point = this._fitPopup(this._getPosition(position));
|
|
233
|
-
if (
|
|
234
|
-
|
|
237
|
+
if (Math.abs(this.state.left - point.x) < 3 &&
|
|
238
|
+
Math.abs(this.state.top - point.y) < 3 &&
|
|
235
239
|
this.state.position === position)
|
|
236
240
|
return;
|
|
237
241
|
this.setState({
|
|
@@ -287,7 +291,7 @@ class Popup extends React.Component {
|
|
|
287
291
|
});
|
|
288
292
|
}
|
|
289
293
|
_isPositionAbsolute() {
|
|
290
|
-
return
|
|
294
|
+
return this.props.top !== -1 && this.props.left !== -1;
|
|
291
295
|
}
|
|
292
296
|
_getClassNameByPosition(position) {
|
|
293
297
|
if (!this._isPositionAbsolute()) {
|
|
@@ -328,7 +332,8 @@ class Popup extends React.Component {
|
|
|
328
332
|
const borderTopWidth = parsePxString(style.borderTopWidth);
|
|
329
333
|
const borderBottomWidth = parsePxString(style.borderBottomWidth);
|
|
330
334
|
popupWidth = this._popup.clientWidth + borderLeftWidth + borderRightWidth;
|
|
331
|
-
popupHeight =
|
|
335
|
+
popupHeight =
|
|
336
|
+
this._popup.clientHeight + borderTopWidth + borderBottomWidth;
|
|
332
337
|
}
|
|
333
338
|
return { popupWidth, popupHeight };
|
|
334
339
|
}
|
|
@@ -342,13 +347,21 @@ class Popup extends React.Component {
|
|
|
342
347
|
let newPosition = position;
|
|
343
348
|
const activeWindow = this.getParentWindow();
|
|
344
349
|
// Note: Cannot use DOMRect yet since it's experimental and not available in all browsers (Nov. 2018)
|
|
345
|
-
const viewportRect = {
|
|
350
|
+
const viewportRect = {
|
|
351
|
+
left: activeWindow.scrollX,
|
|
352
|
+
top: activeWindow.scrollY,
|
|
353
|
+
right: activeWindow.scrollX + activeWindow.innerWidth,
|
|
354
|
+
bottom: activeWindow.scrollY + activeWindow.innerHeight,
|
|
355
|
+
};
|
|
346
356
|
const targetRect = target.getBoundingClientRect();
|
|
347
357
|
const { popupWidth, popupHeight } = this._getPopupDimensions();
|
|
348
358
|
const containerStyle = activeWindow.getComputedStyle(target);
|
|
349
|
-
const offsetArrow = this.props.showArrow
|
|
359
|
+
const offsetArrow = this.props.showArrow
|
|
360
|
+
? /* istanbul ignore next */ 10
|
|
361
|
+
: 2;
|
|
350
362
|
const bottomMargin = parseMargin(containerStyle.marginBottom);
|
|
351
|
-
if (
|
|
363
|
+
if (targetRect.bottom + popupHeight + bottomMargin + offsetArrow + offset >
|
|
364
|
+
viewportRect.bottom) {
|
|
352
365
|
if (newPosition === RelativePosition.Bottom)
|
|
353
366
|
newPosition = RelativePosition.Top;
|
|
354
367
|
else if (newPosition === RelativePosition.BottomLeft)
|
|
@@ -357,7 +370,8 @@ class Popup extends React.Component {
|
|
|
357
370
|
newPosition = RelativePosition.TopRight;
|
|
358
371
|
}
|
|
359
372
|
const topMargin = parseMargin(containerStyle.marginTop);
|
|
360
|
-
if (
|
|
373
|
+
if (targetRect.top - popupHeight - topMargin - offsetArrow - offset <
|
|
374
|
+
viewportRect.top) {
|
|
361
375
|
if (newPosition === RelativePosition.Top)
|
|
362
376
|
newPosition = RelativePosition.Bottom;
|
|
363
377
|
else if (newPosition === RelativePosition.TopLeft)
|
|
@@ -366,14 +380,16 @@ class Popup extends React.Component {
|
|
|
366
380
|
newPosition = RelativePosition.BottomRight;
|
|
367
381
|
}
|
|
368
382
|
const leftMargin = parseMargin(containerStyle.marginLeft);
|
|
369
|
-
if (
|
|
383
|
+
if (targetRect.left - popupWidth - leftMargin - offsetArrow - offset <
|
|
384
|
+
viewportRect.left) {
|
|
370
385
|
if (newPosition === RelativePosition.Left)
|
|
371
386
|
newPosition = RelativePosition.Right;
|
|
372
387
|
else if (newPosition === RelativePosition.LeftTop)
|
|
373
388
|
newPosition = RelativePosition.RightTop;
|
|
374
389
|
}
|
|
375
390
|
const rightMargin = parseMargin(containerStyle.marginRight);
|
|
376
|
-
if (
|
|
391
|
+
if (targetRect.right + popupWidth + rightMargin + offsetArrow + offset >
|
|
392
|
+
viewportRect.right) {
|
|
377
393
|
if (newPosition === RelativePosition.Right)
|
|
378
394
|
newPosition = RelativePosition.Left;
|
|
379
395
|
else if (newPosition === RelativePosition.RightTop)
|
|
@@ -382,9 +398,10 @@ class Popup extends React.Component {
|
|
|
382
398
|
return newPosition;
|
|
383
399
|
}
|
|
384
400
|
render() {
|
|
385
|
-
var _a;
|
|
386
401
|
const animate = this.props.animate !== undefined ? this.props.animate : true;
|
|
387
|
-
const className = classnames("core-popup", this._getClassNameByPosition(this.state.position), this.props.showShadow && "core-popup-shadow", this.props.showArrow && "arrow", !animate && "core-popup-animation-none", this.props.className, this.state.animationEnded && "core-animation-ended",
|
|
402
|
+
const className = classnames("core-popup", this._getClassNameByPosition(this.state.position), this.props.showShadow && "core-popup-shadow", this.props.showArrow && "arrow", !animate && "core-popup-animation-none", this.props.className, this.state.animationEnded && "core-animation-ended", !this.props.isOpen &&
|
|
403
|
+
this.props.keepContentsMounted &&
|
|
404
|
+
"core-popup-hidden");
|
|
388
405
|
const style = {
|
|
389
406
|
top: this.state.top,
|
|
390
407
|
left: this.state.left,
|
|
@@ -394,10 +411,12 @@ class Popup extends React.Component {
|
|
|
394
411
|
if (!this.props.isOpen && !this.props.keepContentsMounted) {
|
|
395
412
|
return null;
|
|
396
413
|
}
|
|
397
|
-
return ReactDOM.createPortal(
|
|
398
|
-
|
|
414
|
+
return ReactDOM.createPortal(React.createElement("div", { className: className, "data-testid": "core-popup", ref: (element) => {
|
|
415
|
+
this._popup = element;
|
|
416
|
+
}, style: style, role: role, "aria-modal": true, tabIndex: -1, "aria-label": this.props.ariaLabel, onAnimationEnd: this._handleAnimationEnd },
|
|
417
|
+
React.createElement(FocusTrap, { active: !!this.props.moveFocus, initialFocusElement: this.props.focusTarget, returnFocusOnDeactivate: true }, this.props.children)),
|
|
399
418
|
// istanbul ignore next
|
|
400
|
-
|
|
419
|
+
this.state.parentDocument.body.querySelector('[data-root-container="iui-root-id"]') ?? this.state.parentDocument.body);
|
|
401
420
|
}
|
|
402
421
|
}
|
|
403
422
|
Popup.defaultProps = {
|