@itwin/core-react 4.14.1 → 4.15.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 +20 -1
- package/lib/cjs/core-react/UiCore.d.ts +1 -1
- package/lib/cjs/core-react/UiCore.js +1 -1
- package/lib/cjs/core-react/UiCore.js.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/cjs/core-react/base/Centered.d.ts +1 -1
- package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Centered.js +2 -1
- package/lib/cjs/core-react/base/Centered.js.map +1 -1
- package/lib/cjs/core-react/base/Div.d.ts +2 -2
- package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Div.js +1 -1
- package/lib/cjs/core-react/base/Div.js.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.js +4 -2
- package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/base/FillCentered.d.ts +1 -1
- package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/FillCentered.js +2 -1
- package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.js +2 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/cjs/core-react/base/Gap.d.ts +2 -2
- package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Gap.js +1 -1
- package/lib/cjs/core-react/base/Gap.js.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.d.ts +1 -1
- package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.js +2 -1
- package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts +2 -2
- package/lib/cjs/core-react/button/UnderlinedButton.js +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -4
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.js +3 -3
- package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +1 -0
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.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 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts +4 -5
- package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.js +3 -3
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +3 -3
- package/lib/cjs/core-react/dialog/GlobalDialog.js +1 -1
- package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +3 -3
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/cjs/core-react/enums/Alignment.d.ts +2 -0
- package/lib/cjs/core-react/enums/Alignment.d.ts.map +1 -1
- package/lib/cjs/core-react/enums/Alignment.js +2 -0
- package/lib/cjs/core-react/enums/Alignment.js.map +1 -1
- package/lib/cjs/core-react/enums/CheckBoxState.d.ts +1 -0
- package/lib/cjs/core-react/enums/CheckBoxState.d.ts.map +1 -1
- package/lib/cjs/core-react/enums/CheckBoxState.js.map +1 -1
- package/lib/cjs/core-react/enums/SortDirection.d.ts +1 -0
- package/lib/cjs/core-react/enums/SortDirection.d.ts.map +1 -1
- package/lib/cjs/core-react/enums/SortDirection.js +1 -0
- package/lib/cjs/core-react/enums/SortDirection.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -2
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -0
- package/lib/cjs/core-react/hocs/withIsPressed.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.js +1 -0
- package/lib/cjs/core-react/hocs/withIsPressed.js.map +1 -1
- package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -0
- package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -0
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -0
- package/lib/cjs/core-react/hocs/withTimeout.d.ts.map +1 -1
- package/lib/cjs/core-react/hocs/withTimeout.js +4 -1
- package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts +2 -0
- package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.js +2 -0
- package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts +2 -0
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.js +2 -0
- package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/Input.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -2
- package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.d.ts +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.js +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -2
- package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +2 -2
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.d.ts +7 -7
- package/lib/cjs/core-react/listbox/Listbox.js +3 -3
- package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.d.ts +2 -2
- package/lib/cjs/core-react/loading/LoadingBar.js +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +2 -2
- package/lib/cjs/core-react/loading/LoadingPrompt.js +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +3 -3
- package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.d.ts +2 -2
- package/lib/cjs/core-react/loading/LoadingStatus.js +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts +5 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js +8 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -0
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.js +2 -0
- package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.d.ts +2 -0
- package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.js.map +1 -1
- package/lib/cjs/core-react/popup/Popup.d.ts +6 -1
- package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
- package/lib/cjs/core-react/popup/Popup.js +9 -2
- package/lib/cjs/core-react/popup/Popup.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -4
- package/lib/cjs/core-react/radialmenu/RadialMenu.js +2 -2
- package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.d.ts +2 -2
- package/lib/cjs/core-react/searchbox/SearchBox.js +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsManager.d.ts +8 -8
- package/lib/cjs/core-react/settings/SettingsManager.js +4 -4
- package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
- package/lib/cjs/core-react/tabs/Tabs.js +1 -1
- package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.js +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/cjs/core-react/text/BlockText.d.ts +1 -1
- package/lib/cjs/core-react/text/BlockText.js +1 -1
- package/lib/cjs/core-react/text/BlockText.js.map +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
- package/lib/cjs/core-react/text/BodyText.js +1 -1
- package/lib/cjs/core-react/text/BodyText.js.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts +1 -1
- package/lib/cjs/core-react/text/DisabledText.js +1 -1
- package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.d.ts +2 -0
- package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.js +2 -0
- package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
- package/lib/cjs/core-react/text/MutedText.d.ts +1 -1
- package/lib/cjs/core-react/text/MutedText.js +1 -1
- package/lib/cjs/core-react/text/MutedText.js.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
- package/lib/cjs/core-react/text/StyledText.js +1 -1
- package/lib/cjs/core-react/text/StyledText.js.map +1 -1
- package/lib/cjs/core-react/text/TextProps.d.ts +1 -1
- package/lib/cjs/core-react/text/TextProps.js.map +1 -1
- package/lib/cjs/core-react/tree/Branch.d.ts +2 -0
- package/lib/cjs/core-react/tree/Branch.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Branch.js +2 -0
- package/lib/cjs/core-react/tree/Branch.js.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +2 -0
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js +2 -0
- package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/cjs/core-react/tree/Node.d.ts +3 -3
- package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Node.js +6 -1
- package/lib/cjs/core-react/tree/Node.js.map +1 -1
- package/lib/cjs/core-react/tree/Placeholder.d.ts +2 -0
- package/lib/cjs/core-react/tree/Placeholder.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Placeholder.js +2 -0
- package/lib/cjs/core-react/tree/Placeholder.js.map +1 -1
- package/lib/cjs/core-react/tree/Tree.d.ts +2 -0
- package/lib/cjs/core-react/tree/Tree.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Tree.js +2 -0
- package/lib/cjs/core-react/tree/Tree.js.map +1 -1
- package/lib/cjs/core-react/utils/IconHelper.d.ts +1 -0
- package/lib/cjs/core-react/utils/IconHelper.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/IconHelper.js +2 -0
- package/lib/cjs/core-react/utils/IconHelper.js.map +1 -1
- package/lib/cjs/core-react/utils/Props.d.ts +5 -1
- package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Props.js.map +1 -1
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +3 -0
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
- package/lib/cjs/core-react/utils/Timer.d.ts +2 -0
- package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Timer.js +2 -0
- package/lib/cjs/core-react/utils/Timer.js.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.d.ts +2 -0
- package/lib/cjs/core-react/utils/getCssVariable.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.js +3 -0
- package/lib/cjs/core-react/utils/getCssVariable.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 +1 -0
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +1 -0
- package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.js +1 -0
- package/lib/cjs/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useInterval.d.ts +1 -0
- package/lib/cjs/core-react/utils/hooks/useInterval.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useInterval.js +1 -0
- package/lib/cjs/core-react/utils/hooks/useInterval.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +1 -0
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +2 -0
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/cjs/core-react/utils/typeUtils.d.ts +1 -0
- package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/typeUtils.js.map +1 -1
- package/lib/cjs/core-react.d.ts +0 -1
- package/lib/cjs/core-react.d.ts.map +1 -1
- package/lib/cjs/core-react.js +2 -1
- package/lib/cjs/core-react.js.map +1 -1
- package/lib/esm/core-react/UiCore.d.ts +1 -1
- package/lib/esm/core-react/UiCore.js +1 -1
- package/lib/esm/core-react/UiCore.js.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/esm/core-react/base/Centered.d.ts +1 -1
- package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
- package/lib/esm/core-react/base/Centered.js +2 -1
- package/lib/esm/core-react/base/Centered.js.map +1 -1
- package/lib/esm/core-react/base/Div.d.ts +2 -2
- package/lib/esm/core-react/base/Div.d.ts.map +1 -1
- package/lib/esm/core-react/base/Div.js +1 -1
- package/lib/esm/core-react/base/Div.js.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.js +4 -2
- package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/esm/core-react/base/FillCentered.d.ts +1 -1
- package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/esm/core-react/base/FillCentered.js +2 -1
- package/lib/esm/core-react/base/FillCentered.js.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.js +2 -1
- package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/esm/core-react/base/Gap.d.ts +2 -2
- package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
- package/lib/esm/core-react/base/Gap.js +1 -1
- package/lib/esm/core-react/base/Gap.js.map +1 -1
- package/lib/esm/core-react/base/ScrollView.d.ts +1 -1
- package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/esm/core-react/base/ScrollView.js +2 -1
- package/lib/esm/core-react/base/ScrollView.js.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.d.ts +2 -2
- package/lib/esm/core-react/button/UnderlinedButton.js +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -4
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.js +3 -3
- package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +1 -0
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.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 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts +4 -5
- package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.js +3 -3
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/dialog/GlobalDialog.d.ts +3 -3
- package/lib/esm/core-react/dialog/GlobalDialog.js +1 -1
- package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +3 -3
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.js +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/esm/core-react/enums/Alignment.d.ts +2 -0
- package/lib/esm/core-react/enums/Alignment.d.ts.map +1 -1
- package/lib/esm/core-react/enums/Alignment.js +2 -0
- package/lib/esm/core-react/enums/Alignment.js.map +1 -1
- package/lib/esm/core-react/enums/CheckBoxState.d.ts +1 -0
- package/lib/esm/core-react/enums/CheckBoxState.d.ts.map +1 -1
- package/lib/esm/core-react/enums/CheckBoxState.js.map +1 -1
- package/lib/esm/core-react/enums/SortDirection.d.ts +1 -0
- package/lib/esm/core-react/enums/SortDirection.d.ts.map +1 -1
- package/lib/esm/core-react/enums/SortDirection.js +1 -0
- package/lib/esm/core-react/enums/SortDirection.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -2
- package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -0
- package/lib/esm/core-react/hocs/withIsPressed.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.js +1 -0
- package/lib/esm/core-react/hocs/withIsPressed.js.map +1 -1
- package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -0
- package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -0
- package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -0
- package/lib/esm/core-react/hocs/withTimeout.d.ts.map +1 -1
- package/lib/esm/core-react/hocs/withTimeout.js +4 -1
- package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts +2 -0
- package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.js +2 -0
- package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts +2 -0
- package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.js +2 -0
- package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +2 -2
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/Input.js.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -2
- package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/esm/core-react/inputs/InputStatus.d.ts +1 -1
- package/lib/esm/core-react/inputs/InputStatus.js +1 -1
- package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -2
- package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +2 -2
- package/lib/esm/core-react/inputs/iconinput/IconInput.js +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +3 -3
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.d.ts +7 -7
- package/lib/esm/core-react/listbox/Listbox.js +3 -3
- package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.d.ts +2 -2
- package/lib/esm/core-react/loading/LoadingBar.js +1 -1
- package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.d.ts +2 -2
- package/lib/esm/core-react/loading/LoadingPrompt.js +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +3 -3
- package/lib/esm/core-react/loading/LoadingSpinner.js +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.d.ts +2 -2
- package/lib/esm/core-react/loading/LoadingStatus.js +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts +5 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js +8 -1
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -0
- package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.js +2 -0
- package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/esm/core-react/notification/MessageType.d.ts +2 -0
- package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/esm/core-react/notification/MessageType.js.map +1 -1
- package/lib/esm/core-react/popup/Popup.d.ts +6 -1
- package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
- package/lib/esm/core-react/popup/Popup.js +9 -2
- package/lib/esm/core-react/popup/Popup.js.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -4
- package/lib/esm/core-react/radialmenu/RadialMenu.js +2 -2
- package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.d.ts +2 -2
- package/lib/esm/core-react/searchbox/SearchBox.js +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsManager.d.ts +8 -8
- package/lib/esm/core-react/settings/SettingsManager.js +4 -4
- package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
- package/lib/esm/core-react/tabs/Tabs.js +1 -1
- package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.js +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/esm/core-react/text/BlockText.d.ts +1 -1
- package/lib/esm/core-react/text/BlockText.js +1 -1
- package/lib/esm/core-react/text/BlockText.js.map +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts +1 -1
- package/lib/esm/core-react/text/BodyText.js +1 -1
- package/lib/esm/core-react/text/BodyText.js.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts +1 -1
- package/lib/esm/core-react/text/DisabledText.js +1 -1
- package/lib/esm/core-react/text/DisabledText.js.map +1 -1
- package/lib/esm/core-react/text/FilteredText.d.ts +2 -0
- package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/esm/core-react/text/FilteredText.js +2 -0
- package/lib/esm/core-react/text/FilteredText.js.map +1 -1
- package/lib/esm/core-react/text/MutedText.d.ts +1 -1
- package/lib/esm/core-react/text/MutedText.js +1 -1
- package/lib/esm/core-react/text/MutedText.js.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +2 -2
- package/lib/esm/core-react/text/StyledText.js +1 -1
- package/lib/esm/core-react/text/StyledText.js.map +1 -1
- package/lib/esm/core-react/text/TextProps.d.ts +1 -1
- package/lib/esm/core-react/text/TextProps.js.map +1 -1
- package/lib/esm/core-react/tree/Branch.d.ts +2 -0
- package/lib/esm/core-react/tree/Branch.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Branch.js +2 -0
- package/lib/esm/core-react/tree/Branch.js.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts +2 -0
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js +2 -0
- package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/esm/core-react/tree/Node.d.ts +3 -3
- package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Node.js +6 -1
- package/lib/esm/core-react/tree/Node.js.map +1 -1
- package/lib/esm/core-react/tree/Placeholder.d.ts +2 -0
- package/lib/esm/core-react/tree/Placeholder.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Placeholder.js +2 -0
- package/lib/esm/core-react/tree/Placeholder.js.map +1 -1
- package/lib/esm/core-react/tree/Tree.d.ts +2 -0
- package/lib/esm/core-react/tree/Tree.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Tree.js +2 -0
- package/lib/esm/core-react/tree/Tree.js.map +1 -1
- package/lib/esm/core-react/utils/IconHelper.d.ts +1 -0
- package/lib/esm/core-react/utils/IconHelper.d.ts.map +1 -1
- package/lib/esm/core-react/utils/IconHelper.js +2 -0
- package/lib/esm/core-react/utils/IconHelper.js.map +1 -1
- package/lib/esm/core-react/utils/Props.d.ts +5 -1
- package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Props.js.map +1 -1
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +1 -0
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts.map +1 -1
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +3 -0
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.js.map +1 -1
- package/lib/esm/core-react/utils/Timer.d.ts +2 -0
- package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Timer.js +2 -0
- package/lib/esm/core-react/utils/Timer.js.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.d.ts +2 -0
- package/lib/esm/core-react/utils/getCssVariable.d.ts.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.js +3 -0
- package/lib/esm/core-react/utils/getCssVariable.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 +1 -0
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +1 -0
- package/lib/esm/core-react/utils/hooks/useDisposable.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.js +1 -0
- package/lib/esm/core-react/utils/hooks/useDisposable.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts +1 -0
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +1 -0
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useInterval.d.ts +1 -0
- package/lib/esm/core-react/utils/hooks/useInterval.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useInterval.js +1 -0
- package/lib/esm/core-react/utils/hooks/useInterval.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +5 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +1 -0
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +2 -0
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js +2 -0
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/esm/core-react/utils/typeUtils.d.ts +1 -0
- package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
- package/lib/esm/core-react/utils/typeUtils.js.map +1 -1
- package/lib/esm/core-react.d.ts +0 -1
- package/lib/esm/core-react.d.ts.map +1 -1
- package/lib/esm/core-react.js +2 -1
- package/lib/esm/core-react.js.map +1 -1
- package/package.json +2 -2
|
@@ -19,7 +19,7 @@ const useTranslation_1 = require("../l10n/useTranslation");
|
|
|
19
19
|
/** Input box for entering text to search for.
|
|
20
20
|
* The SearchBox has an icon right-justified and bounded by the box and shows a Search or Clear icon.
|
|
21
21
|
* @public
|
|
22
|
-
* @deprecated in 4.12.
|
|
22
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/searchbox iTwinUI SearchBox} instead.
|
|
23
23
|
*/
|
|
24
24
|
class SearchBox extends React.Component {
|
|
25
25
|
constructor(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.js","sourceRoot":"","sources":["../../../../src/core-react/searchbox/SearchBox.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,4BAA0B;AAC1B,2CAAoC;AACpC,+BAA+B;AAC/B,6CAAkC;AAElC,wDAA6C;AAE7C,0DAA8C;AAC9C,oEAAiE;AACjE,2DAAwD;AA6BxD;;;;GAIG;AACH,MAAa,SAAU,SAAQ,KAAK,CAAC,SAAyC;IAS5E,YAAY,KAAqB;QAC/B,KAAK,CAAC,KAAK,CAAC,CAAC;QATP,kBAAa,GAA4B,IAAI,CAAC;QAC9C,eAAU,GAAW,CAAC,CAAC;QAE/B,gBAAgB;QACS,UAAK,GAA6B;YACzD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE;SACrC,CAAC;QA8CF,6HAA6H;QACrH,oBAAe,GAAG,CAAC,KAAa,EAAE,aAAqB,EAAE,EAAE;YACjE,IAAI,KAAK,KAAK,aAAa;gBAAE,OAAO;YAEpC,IAAI,CAAC,QAAQ,CACX,CAAC,UAAU,EAAE,EAAE;gBACb,OAAO;oBACL,KAAK;iBACN,CAAC;YACJ,CAAC,EACD,GAAG,EAAE;gBACH,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9C,CAAC,CACF,CAAC;QACJ,CAAC,CAAC;QACM,iBAAY,GAAG,CAAC,MAAY,EAAQ,EAAE;YAC5C,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;YAEvC,IAAI,IAAI,CAAC,aAAa;gBAAE,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;YAEzD,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,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,EAAE,CAAC,CAAC,EACZ,WAAW,EAAE,WAAW;gBAExB,8BAAM,SAAS,EAAE,aAAa;oBAC5B,oBAAC,oBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACvB,CACS,CACd,CACP,CAAC;IACJ,CAAC;IA6De,oBAAoB;QAClC,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEM,KAAK;QACV,IAAI,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;CACF;AAvHD,8BAuHC;AAED,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,SAAS,cAAc,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACtD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IACvC,OAAO,CACL,oBAAC,qBAAK,IACJ,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,IAAI,SAAS,CAAC,gBAAgB,CAAC,KACnD,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,EACvB,WAAW,EACX,GAAG,KAAK,EAC+C;IACvD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IACvC,MAAM,WAAW,GAAG,SAAS,CAC3B,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CACjD,CAAC;IACF,OAAO,6BAAK,KAAK,EAAE,WAAW,KAAM,KAAK,GAAI,CAAC;AAChD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module SearchBox\n */\n\nimport \"./SearchBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { SvgClose, SvgSearch } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../l10n/useTranslation\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[SearchBox]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link SearchBox}.\n */\nexport interface SearchBoxProps extends CommonProps {\n /** Value to set SearchBox to initially */\n initialValue?: string;\n /** Placeholder value to show in gray before anything is entered in */\n placeholder?: string;\n /** Triggered when the content of SearchBox is changed */\n onValueChanged: (value: string) => void;\n /** Frequency to poll for changes in value, in milliseconds */\n valueChangedDelay?: number;\n /** Listens for <Enter> keypress */\n onEnterPressed?: () => void;\n /** Listens for <Esc> keypress */\n onEscPressed?: () => void;\n /** Listens for onClick event for Clear (x) icon */\n onClear?: () => void;\n}\n\ninterface SearchBoxState {\n value: string;\n}\n\n/** Input box for entering text to search for.\n * The SearchBox has an icon right-justified and bounded by the box and shows a Search or Clear icon.\n * @public\n * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/searchbox iTwinUI SearchBox} instead.\n */\nexport class SearchBox extends React.Component<SearchBoxProps, SearchBoxState> {\n private _inputElement: HTMLInputElement | null = null;\n private _timeoutId: number = 0;\n\n /** @internal */\n public override readonly state: Readonly<SearchBoxState> = {\n value: this.props.initialValue || \"\",\n };\n\n constructor(props: SearchBoxProps) {\n super(props);\n }\n\n /** @internal */\n public override render(): React.ReactNode {\n const searchClassName = classnames(\"core-searchbox\", this.props.className);\n const emptyString = this.state.value === \"\";\n const iconClassName = classnames(\"core-searchbox-icon\", \"icon\");\n const iconSpec: IconSpec = emptyString ? <SvgSearch /> : <SvgClose />;\n return (\n <div\n className={searchClassName}\n style={this.props.style}\n data-testid=\"core-searchbox-instance\"\n >\n <SearchBoxInput\n defaultValue={this.props.initialValue}\n ref={(el) => {\n this._inputElement = el;\n }}\n onChange={this._trackChange}\n onKeyDown={this._handleKeyDown}\n onPaste={this._trackChange}\n onCut={this._trackChange}\n placeholder={this.props.placeholder}\n role=\"searchbox\"\n data-testid=\"core-searchbox-input\"\n />\n <SearchBoxButton\n className=\"core-searchbox-button\"\n onClick={this._handleIconClick}\n role=\"button\"\n tabIndex={-1}\n emptyString={emptyString}\n >\n <span className={iconClassName}>\n <Icon iconSpec={iconSpec} />\n </span>\n </SearchBoxButton>\n </div>\n );\n }\n\n /** Wrapper for onValueChanged to make sure we don't call search unless the new value is different from the previous value */\n private _onValueChanged = (value: string, previousValue: string) => {\n if (value === previousValue) return;\n\n this.setState(\n (_prevState) => {\n return {\n value,\n };\n },\n () => {\n this.props.onValueChanged(this.state.value);\n }\n );\n };\n private _trackChange = (_event?: any): void => {\n let value = \"\";\n const previousValue = this.state.value;\n\n if (this._inputElement) value = this._inputElement.value;\n\n if (this.props.valueChangedDelay) {\n this._unsetTimeout();\n this._timeoutId = window.setTimeout(() => {\n this._onValueChanged(value, previousValue);\n }, this.props.valueChangedDelay);\n } else {\n this._onValueChanged(value, previousValue);\n }\n };\n\n private _handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case Key.Escape.valueOf():\n if (this.props.onEscPressed) this.props.onEscPressed();\n break;\n case Key.Enter.valueOf():\n if (this.props.onEnterPressed) this.props.onEnterPressed();\n break;\n }\n };\n\n private _handleIconClick = (_event: React.MouseEvent<HTMLElement>): void => {\n if (this._inputElement) {\n const clear = this.state.value !== \"\";\n this._inputElement.value = \"\";\n if (clear && this.props.onClear) this.props.onClear();\n this._inputElement.focus();\n }\n this._trackChange();\n };\n\n private _unsetTimeout = (): void => {\n if (this._timeoutId) {\n window.clearTimeout(this._timeoutId);\n this._timeoutId = 0;\n }\n };\n\n public override componentWillUnmount() {\n this._unsetTimeout();\n }\n\n public focus() {\n if (this._inputElement) this._inputElement.focus();\n }\n}\n\nconst SearchBoxInput = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<typeof Input>\n>(function SearchBoxInput({ placeholder, ...props }, ref) {\n const { translate } = useTranslation();\n return (\n <Input\n ref={ref}\n placeholder={placeholder || translate(\"general.search\")}\n {...props}\n />\n );\n});\n\nfunction SearchBoxButton({\n emptyString,\n ...props\n}: React.ComponentProps<\"div\"> & { emptyString: boolean }) {\n const { translate } = useTranslation();\n const buttonTitle = translate(\n emptyString ? \"general.search\" : \"general.clear\"\n );\n return <div title={buttonTitle} {...props} />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SearchBox.js","sourceRoot":"","sources":["../../../../src/core-react/searchbox/SearchBox.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,4BAA0B;AAC1B,2CAAoC;AACpC,+BAA+B;AAC/B,6CAAkC;AAElC,wDAA6C;AAE7C,0DAA8C;AAC9C,oEAAiE;AACjE,2DAAwD;AA6BxD;;;;GAIG;AACH,MAAa,SAAU,SAAQ,KAAK,CAAC,SAAyC;IAS5E,YAAY,KAAqB;QAC/B,KAAK,CAAC,KAAK,CAAC,CAAC;QATP,kBAAa,GAA4B,IAAI,CAAC;QAC9C,eAAU,GAAW,CAAC,CAAC;QAE/B,gBAAgB;QACS,UAAK,GAA6B;YACzD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE;SACrC,CAAC;QA8CF,6HAA6H;QACrH,oBAAe,GAAG,CAAC,KAAa,EAAE,aAAqB,EAAE,EAAE;YACjE,IAAI,KAAK,KAAK,aAAa;gBAAE,OAAO;YAEpC,IAAI,CAAC,QAAQ,CACX,CAAC,UAAU,EAAE,EAAE;gBACb,OAAO;oBACL,KAAK;iBACN,CAAC;YACJ,CAAC,EACD,GAAG,EAAE;gBACH,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9C,CAAC,CACF,CAAC;QACJ,CAAC,CAAC;QACM,iBAAY,GAAG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AC;AAChD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module SearchBox\n */\n\nimport \"./SearchBox.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport type { IconSpec } from \"../icons/IconComponent\";\nimport { Icon } from \"../icons/IconComponent\";\nimport { SvgClose, SvgSearch } from \"@itwin/itwinui-icons-react\";\nimport { useTranslation } from \"../l10n/useTranslation\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[SearchBox]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link SearchBox}.\n */\nexport interface SearchBoxProps extends CommonProps {\n /** Value to set SearchBox to initially */\n initialValue?: string;\n /** Placeholder value to show in gray before anything is entered in */\n placeholder?: string;\n /** Triggered when the content of SearchBox is changed */\n onValueChanged: (value: string) => void;\n /** Frequency to poll for changes in value, in milliseconds */\n valueChangedDelay?: number;\n /** Listens for <Enter> keypress */\n onEnterPressed?: () => void;\n /** Listens for <Esc> keypress */\n onEscPressed?: () => void;\n /** Listens for onClick event for Clear (x) icon */\n onClear?: () => void;\n}\n\ninterface SearchBoxState {\n value: string;\n}\n\n/** Input box for entering text to search for.\n * The SearchBox has an icon right-justified and bounded by the box and shows a Search or Clear icon.\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/searchbox iTwinUI SearchBox} instead.\n */\nexport class SearchBox extends React.Component<SearchBoxProps, SearchBoxState> {\n private _inputElement: HTMLInputElement | null = null;\n private _timeoutId: number = 0;\n\n /** @internal */\n public override readonly state: Readonly<SearchBoxState> = {\n value: this.props.initialValue || \"\",\n };\n\n constructor(props: SearchBoxProps) {\n super(props);\n }\n\n /** @internal */\n public override render(): React.ReactNode {\n const searchClassName = classnames(\"core-searchbox\", this.props.className);\n const emptyString = this.state.value === \"\";\n const iconClassName = classnames(\"core-searchbox-icon\", \"icon\");\n const iconSpec: IconSpec = emptyString ? <SvgSearch /> : <SvgClose />;\n return (\n <div\n className={searchClassName}\n style={this.props.style}\n data-testid=\"core-searchbox-instance\"\n >\n <SearchBoxInput\n defaultValue={this.props.initialValue}\n ref={(el) => {\n this._inputElement = el;\n }}\n onChange={this._trackChange}\n onKeyDown={this._handleKeyDown}\n onPaste={this._trackChange}\n onCut={this._trackChange}\n placeholder={this.props.placeholder}\n role=\"searchbox\"\n data-testid=\"core-searchbox-input\"\n />\n <SearchBoxButton\n className=\"core-searchbox-button\"\n onClick={this._handleIconClick}\n role=\"button\"\n tabIndex={-1}\n emptyString={emptyString}\n >\n <span className={iconClassName}>\n <Icon iconSpec={iconSpec} />\n </span>\n </SearchBoxButton>\n </div>\n );\n }\n\n /** Wrapper for onValueChanged to make sure we don't call search unless the new value is different from the previous value */\n private _onValueChanged = (value: string, previousValue: string) => {\n if (value === previousValue) return;\n\n this.setState(\n (_prevState) => {\n return {\n value,\n };\n },\n () => {\n this.props.onValueChanged(this.state.value);\n }\n );\n };\n private _trackChange = (_event?: any): void => {\n let value = \"\";\n const previousValue = this.state.value;\n\n if (this._inputElement) value = this._inputElement.value;\n\n if (this.props.valueChangedDelay) {\n this._unsetTimeout();\n this._timeoutId = window.setTimeout(() => {\n this._onValueChanged(value, previousValue);\n }, this.props.valueChangedDelay);\n } else {\n this._onValueChanged(value, previousValue);\n }\n };\n\n private _handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case Key.Escape.valueOf():\n if (this.props.onEscPressed) this.props.onEscPressed();\n break;\n case Key.Enter.valueOf():\n if (this.props.onEnterPressed) this.props.onEnterPressed();\n break;\n }\n };\n\n private _handleIconClick = (_event: React.MouseEvent<HTMLElement>): void => {\n if (this._inputElement) {\n const clear = this.state.value !== \"\";\n this._inputElement.value = \"\";\n if (clear && this.props.onClear) this.props.onClear();\n this._inputElement.focus();\n }\n this._trackChange();\n };\n\n private _unsetTimeout = (): void => {\n if (this._timeoutId) {\n window.clearTimeout(this._timeoutId);\n this._timeoutId = 0;\n }\n };\n\n public override componentWillUnmount() {\n this._unsetTimeout();\n }\n\n public focus() {\n if (this._inputElement) this._inputElement.focus();\n }\n}\n\nconst SearchBoxInput = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<typeof Input>\n>(function SearchBoxInput({ placeholder, ...props }, ref) {\n const { translate } = useTranslation();\n return (\n <Input\n ref={ref}\n placeholder={placeholder || translate(\"general.search\")}\n {...props}\n />\n );\n});\n\nfunction SearchBoxButton({\n emptyString,\n ...props\n}: React.ComponentProps<\"div\"> & { emptyString: boolean }) {\n const { translate } = useTranslation();\n const buttonTitle = translate(\n emptyString ? \"general.search\" : \"general.clear\"\n );\n return <div title={buttonTitle} {...props} />;\n}\n"]}
|
|
@@ -29,13 +29,13 @@ export interface SettingsTabEntry {
|
|
|
29
29
|
}
|
|
30
30
|
/** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.
|
|
31
31
|
* @public
|
|
32
|
-
* @deprecated in 4.13.
|
|
32
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
33
33
|
*/
|
|
34
34
|
export declare class SettingsProvidersChangedEvent extends BeUiEvent<SettingsProvidersChangedEventArgs> {
|
|
35
35
|
}
|
|
36
36
|
/** Arguments of [[this.onSettingsProvidersChanged]] event.
|
|
37
37
|
* @public
|
|
38
|
-
* @deprecated in 4.13.
|
|
38
|
+
* @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.
|
|
39
39
|
*/
|
|
40
40
|
export interface SettingsProvidersChangedEventArgs {
|
|
41
41
|
readonly providers: ReadonlyArray<SettingsTabsProvider>;
|
|
@@ -43,13 +43,13 @@ export interface SettingsProvidersChangedEventArgs {
|
|
|
43
43
|
/** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current
|
|
44
44
|
* settings page to save its settings before activating the new SettingTab.
|
|
45
45
|
* @public
|
|
46
|
-
* @deprecated in 4.13.
|
|
46
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
47
47
|
*/
|
|
48
48
|
export declare class ProcessSettingsTabActivationEvent extends BeUiEvent<ProcessSettingsTabActivationEventArgs> {
|
|
49
49
|
}
|
|
50
50
|
/** Arguments of [[this.onProcessSettingsTabActivation]] event.
|
|
51
51
|
* @public
|
|
52
|
-
* @deprecated in 4.13.
|
|
52
|
+
* @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.
|
|
53
53
|
*/
|
|
54
54
|
export interface ProcessSettingsTabActivationEventArgs {
|
|
55
55
|
readonly tabSelectionFunc: (tabId: string) => void;
|
|
@@ -58,13 +58,13 @@ export interface ProcessSettingsTabActivationEventArgs {
|
|
|
58
58
|
/** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current
|
|
59
59
|
* settings page to save its settings before calling the function to close the container.
|
|
60
60
|
* @public
|
|
61
|
-
* @deprecated in 4.13.
|
|
61
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
62
62
|
*/
|
|
63
63
|
export declare class ProcessSettingsContainerCloseEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {
|
|
64
64
|
}
|
|
65
65
|
/** Arguments of [[this.onProcessSettingsContainerClose]] event.
|
|
66
66
|
* @public
|
|
67
|
-
* @deprecated in 4.13.
|
|
67
|
+
* @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.
|
|
68
68
|
*/
|
|
69
69
|
export interface ProcessSettingsContainerCloseEventArgs {
|
|
70
70
|
readonly closeFunc: (args: any) => void;
|
|
@@ -72,13 +72,13 @@ export interface ProcessSettingsContainerCloseEventArgs {
|
|
|
72
72
|
}
|
|
73
73
|
/** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).
|
|
74
74
|
* @public
|
|
75
|
-
* @deprecated in 4.13.
|
|
75
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
76
76
|
*/
|
|
77
77
|
export declare class ActivateSettingsTabEvent extends BeUiEvent<ActivateSettingsTabEventArgs> {
|
|
78
78
|
}
|
|
79
79
|
/** Arguments of [[this.onActivateSettingsTab]] event.
|
|
80
80
|
* @public
|
|
81
|
-
* @deprecated in 4.13.
|
|
81
|
+
* @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.
|
|
82
82
|
*/
|
|
83
83
|
export interface ActivateSettingsTabEventArgs {
|
|
84
84
|
readonly settingsTabId: string;
|
|
@@ -12,7 +12,7 @@ const core_bentley_1 = require("@itwin/core-bentley");
|
|
|
12
12
|
const UiCore_1 = require("../UiCore");
|
|
13
13
|
/** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated in 4.13.
|
|
15
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line deprecation/deprecation
|
|
18
18
|
class SettingsProvidersChangedEvent extends core_bentley_1.BeUiEvent {
|
|
@@ -21,7 +21,7 @@ exports.SettingsProvidersChangedEvent = SettingsProvidersChangedEvent;
|
|
|
21
21
|
/** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current
|
|
22
22
|
* settings page to save its settings before activating the new SettingTab.
|
|
23
23
|
* @public
|
|
24
|
-
* @deprecated in 4.13.
|
|
24
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
25
25
|
*/
|
|
26
26
|
// eslint-disable-next-line deprecation/deprecation
|
|
27
27
|
class ProcessSettingsTabActivationEvent extends core_bentley_1.BeUiEvent {
|
|
@@ -30,7 +30,7 @@ exports.ProcessSettingsTabActivationEvent = ProcessSettingsTabActivationEvent;
|
|
|
30
30
|
/** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current
|
|
31
31
|
* settings page to save its settings before calling the function to close the container.
|
|
32
32
|
* @public
|
|
33
|
-
* @deprecated in 4.13.
|
|
33
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
34
34
|
*/
|
|
35
35
|
// eslint-disable-next-line deprecation/deprecation
|
|
36
36
|
class ProcessSettingsContainerCloseEvent extends core_bentley_1.BeUiEvent {
|
|
@@ -38,7 +38,7 @@ class ProcessSettingsContainerCloseEvent extends core_bentley_1.BeUiEvent {
|
|
|
38
38
|
exports.ProcessSettingsContainerCloseEvent = ProcessSettingsContainerCloseEvent;
|
|
39
39
|
/** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).
|
|
40
40
|
* @public
|
|
41
|
-
* @deprecated in 4.13.
|
|
41
|
+
* @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
|
|
42
42
|
*/
|
|
43
43
|
// eslint-disable-next-line deprecation/deprecation
|
|
44
44
|
class ActivateSettingsTabEvent extends core_bentley_1.BeUiEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsManager.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAwD;AAExD,sCAAmC;AA2BnC;;;GAGG;AACH,mDAAmD;AACnD,MAAa,6BAA8B,SAAQ,wBAA4C;CAAG;AAAlG,sEAAkG;AAUlG;;;;GAIG;AACH,mDAAmD;AACnD,MAAa,iCAAkC,SAAQ,wBAAgD;CAAG;AAA1G,8EAA0G;AAW1G;;;;GAIG;AACH,mDAAmD;AACnD,MAAa,kCAAmC,SAAQ,wBAAiD;CAAG;AAA5G,gFAA4G;AAW5G;;;GAGG;AACH,mDAAmD;AACnD,MAAa,w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AE,CAAC;YACnB,MAAM,gBAAgB,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;YAC/D,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC;QACpC,CAAC;aAAM,CAAC;YACN,qBAAM,CAAC,OAAO,CACZ,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,gCAAgC,gBAAgB,CAAC,EAAE,8BAA8B,CAClF,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,sBAAsB,CAAC,UAAkB;QAC9C,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;QAC5E,IAAI,gBAAgB,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACvD,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC;YAClC,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,mFAAmF;IAC5E,iBAAiB,CACtB,OAAe,EACf,UAAkB;QAElB,MAAM,iBAAiB,GAAuB,EAAE,CAAC;QACjD,2CAA2C;QAC3C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5B,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACzD,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC3B,CAAC;CACF;AAlGD,0CAkGC","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 Settings\n */\n\nimport { BeUiEvent, Logger } from \"@itwin/core-bentley\";\nimport type { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { UiCore } from \"../UiCore\";\n\n/** Interface used to populate a tab entry in the SettingContainer control\n * @public\n */\nexport interface SettingsTabEntry {\n /** unique id for entry */\n readonly tabId: string;\n /** localized display label */\n readonly label: string;\n /** Setting page content to display when tab item is selected. */\n readonly page: React.ReactElement;\n /** Setting to true if page will register to watch for stage closing event so it can save any dirty settings. Page component should register and handle the events:\n * `settingsManager.onProcessSettingsTabActivation` and `settingsManager.onProcessSettingsContainerClose` */\n readonly pageWillHandleCloseRequest?: boolean;\n /** used to determine position in tablist */\n readonly itemPriority: number;\n /** Optional Subtitle to show below label. */\n readonly subLabel?: string;\n /** Icon specification */\n readonly icon?: string | React.ReactElement;\n /** Tooltip. Allows JSX|Element to support react-tooltip component */\n readonly tooltip?: string | React.ReactElement;\n /** Allows Settings entry to be disabled */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n}\n\n/** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class SettingsProvidersChangedEvent extends BeUiEvent<SettingsProvidersChangedEventArgs> {}\n\n/** Arguments of [[this.onSettingsProvidersChanged]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface SettingsProvidersChangedEventArgs {\n readonly providers: ReadonlyArray<SettingsTabsProvider>;\n}\n\n/** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current\n * settings page to save its settings before activating the new SettingTab.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ProcessSettingsTabActivationEvent extends BeUiEvent<ProcessSettingsTabActivationEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsTabActivation]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ProcessSettingsTabActivationEventArgs {\n readonly tabSelectionFunc: (tabId: string) => void;\n readonly requestedSettingsTabId: string;\n}\n\n/** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current\n * settings page to save its settings before calling the function to close the container.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ProcessSettingsContainerCloseEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsContainerClose]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ProcessSettingsContainerCloseEventArgs {\n readonly closeFunc: (args: any) => void;\n readonly closeFuncArgs?: any;\n}\n\n/** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ActivateSettingsTabEvent extends BeUiEvent<ActivateSettingsTabEventArgs> {}\n\n/** Arguments of [[this.onActivateSettingsTab]] event.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ActivateSettingsTabEventArgs {\n readonly settingsTabId: string;\n}\n\n/** Setting Provider interface. Implemented by classes that want to supply settings pages for display in the SettingContainer. The\n * classes that implement this interface need to be registered with the [[SettingsManager]].\n * @public\n */\nexport interface SettingsTabsProvider {\n /** Id of provider, used to remove registration. */\n readonly id: string;\n getSettingEntries(\n stageId: string,\n stageUsage: string\n ): ReadonlyArray<SettingsTabEntry> | undefined;\n}\n\n/** Settings Manager class. Hold registration of settings providers and supplies events for the provided settings pages to listen.\n * @public\n */\nexport class SettingsManager {\n private _providers: ReadonlyArray<SettingsTabsProvider> = [];\n\n /** Event raised when SettingsProviders are changed.\n */\n public readonly onSettingsProvidersChanged =\n new SettingsProvidersChangedEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised solely for a settings page to monitor so it can save its settings before continuing tab activation.\n * See React hook function `useSaveBeforeActivatingNewSettingsTab`.\n */\n public readonly onProcessSettingsTabActivation =\n new ProcessSettingsTabActivationEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised when the settings container will be closed. Any setting page component that is 'modal' should register to\n * listen to this event so that it can save its state before closing. See React hook function `useSaveBeforeClosingSettingsContainer`.\n */\n public readonly onProcessSettingsContainerClose =\n new ProcessSettingsContainerCloseEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised to change the active settings tab shown in UI. Monitored by the SettingsContainer.\n * @internal\n */\n public readonly onActivateSettingsTab =\n new BeUiEvent<ActivateSettingsTabEventArgs>(); // eslint-disable-line deprecation/deprecation\n\n /** Event monitored by SettingsContainer to process request to close the settings container.\n * @internal\n */\n public readonly onCloseSettingsContainer =\n new BeUiEvent<ProcessSettingsContainerCloseEventArgs>(); // eslint-disable-line deprecation/deprecation\n\n /** @public */\n public get providers(): ReadonlyArray<SettingsTabsProvider> {\n return this._providers;\n }\n public set providers(p: ReadonlyArray<SettingsTabsProvider>) {\n this._providers = p;\n this.onSettingsProvidersChanged.emit({ providers: p });\n }\n\n /** Called by application when an tool, keyin, or other process want to change the active settings tab/page giving the current tab/page and opportunity\n * to save its state.\n */\n public activateSettingsTab(settingsTabId: string) {\n this.onActivateSettingsTab.emit({ settingsTabId });\n }\n\n /** Called by application when the Settings Container is to be closed. The function to invoke to actually close the Settings Container is\n * passed in and executed once the active settings tab/page has a chance to save its settings.\n */\n public closeSettingsContainer(\n closeFunc: (args: any) => void,\n closeFuncArgs?: any\n ) {\n this.onCloseSettingsContainer.emit({ closeFunc, closeFuncArgs });\n }\n\n public addSettingsProvider(settingsProvider: SettingsTabsProvider): void {\n const foundProvider = this._providers.find(\n (p) => p.id === settingsProvider.id\n );\n if (!foundProvider) {\n const updatedProviders = [...this.providers, settingsProvider];\n this.providers = updatedProviders;\n } else {\n Logger.logInfo(\n UiCore.loggerCategory(this),\n `Settings Provider with id of ${settingsProvider.id} has already been registered`\n );\n }\n }\n\n public removeSettingsProvider(providerId: string): boolean {\n let result = false;\n const updatedProviders = this._providers.filter((p) => p.id !== providerId);\n if (updatedProviders.length !== this._providers.length) {\n this.providers = updatedProviders;\n result = true;\n }\n\n return result;\n }\n\n /** Get an array of SettingsTabEntry objects to populate the settings container. */\n public getSettingEntries(\n stageId: string,\n stageUsage: string\n ): Array<SettingsTabEntry> {\n const allSettingEntries: SettingsTabEntry[] = [];\n // Consult the registered SettingsProviders\n this._providers.forEach((p) => {\n const entries = p.getSettingEntries(stageId, stageUsage);\n entries && allSettingEntries.push(...entries);\n });\n\n return allSettingEntries;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SettingsManager.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAwD;AAExD,sCAAmC;AA2BnC;;;GAGG;AACH,mDAAmD;AACnD,MAAa,6BAA8B,SAAQ,wBAA4C;CAAG;AAAlG,sEAAkG;AAUlG;;;;GAIG;AACH,mDAAmD;AACnD,MAAa,iCAAkC,SAAQ,wBAAgD;CAAG;AAA1G,8EAA0G;AAW1G;;;;GAIG;AACH,mDAAmD;AACnD,MAAa,kCAAmC,SAAQ,wBAAiD;CAAG;AAA5G,gFAA4G;AAW5G;;;GAGG;AACH,mDAAmD;AACnD,MAAa,wBAAyB,SAAQ,wBAAuC;CAAG;AAAxF,4DAAwF;AAuBxF;;GAEG;AACH,MAAa,eAAe;IAA5B;QACU,eAAU,GAAwC,EAAE,CAAC;QAE7D;WACG;QACa,+BAA0B,GACxC,IAAI,6BAA6B,EAAE,CAAC,CAAC,8CAA8C;QAErF;;WAEG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CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,gCAAgC,gBAAgB,CAAC,EAAE,8BAA8B,CAClF,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,sBAAsB,CAAC,UAAkB;QAC9C,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;QAC5E,IAAI,gBAAgB,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACvD,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC;YAClC,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,mFAAmF;IAC5E,iBAAiB,CACtB,OAAe,EACf,UAAkB;QAElB,MAAM,iBAAiB,GAAuB,EAAE,CAAC;QACjD,2CAA2C;QAC3C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5B,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACzD,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC3B,CAAC;CACF;AAlGD,0CAkGC","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 Settings\n */\n\nimport { BeUiEvent, Logger } from \"@itwin/core-bentley\";\nimport type { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\nimport { UiCore } from \"../UiCore\";\n\n/** Interface used to populate a tab entry in the SettingContainer control\n * @public\n */\nexport interface SettingsTabEntry {\n /** unique id for entry */\n readonly tabId: string;\n /** localized display label */\n readonly label: string;\n /** Setting page content to display when tab item is selected. */\n readonly page: React.ReactElement;\n /** Setting to true if page will register to watch for stage closing event so it can save any dirty settings. Page component should register and handle the events:\n * `settingsManager.onProcessSettingsTabActivation` and `settingsManager.onProcessSettingsContainerClose` */\n readonly pageWillHandleCloseRequest?: boolean;\n /** used to determine position in tablist */\n readonly itemPriority: number;\n /** Optional Subtitle to show below label. */\n readonly subLabel?: string;\n /** Icon specification */\n readonly icon?: string | React.ReactElement;\n /** Tooltip. Allows JSX|Element to support react-tooltip component */\n readonly tooltip?: string | React.ReactElement;\n /** Allows Settings entry to be disabled */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n}\n\n/** Event class for [[this.onSettingsProvidersChanged]] which is emitted when a new SettingsTabsProvider is added or removed.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class SettingsProvidersChangedEvent extends BeUiEvent<SettingsProvidersChangedEventArgs> {}\n\n/** Arguments of [[this.onSettingsProvidersChanged]] event.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface SettingsProvidersChangedEventArgs {\n readonly providers: ReadonlyArray<SettingsTabsProvider>;\n}\n\n/** Event class for [[this.onProcessSettingsTabActivation]] which is emitted when a new Tab needs to be activated. This allows the current\n * settings page to save its settings before activating the new SettingTab.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ProcessSettingsTabActivationEvent extends BeUiEvent<ProcessSettingsTabActivationEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsTabActivation]] event.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ProcessSettingsTabActivationEventArgs {\n readonly tabSelectionFunc: (tabId: string) => void;\n readonly requestedSettingsTabId: string;\n}\n\n/** Event class for [[this.onProcessSettingsContainerClose]] which is emitted when the settings container will be closed. This allows the current\n * settings page to save its settings before calling the function to close the container.\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ProcessSettingsContainerCloseEvent extends BeUiEvent<ProcessSettingsContainerCloseEventArgs> {}\n\n/** Arguments of [[this.onProcessSettingsContainerClose]] event.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ProcessSettingsContainerCloseEventArgs {\n readonly closeFunc: (args: any) => void;\n readonly closeFuncArgs?: any;\n}\n\n/** Event class for [[this.onActivateSettingsTab]] which is emitted when API call needs to set the active settings tab (ie via Tool key-in).\n * @public\n * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ActivateSettingsTabEvent extends BeUiEvent<ActivateSettingsTabEventArgs> {}\n\n/** Arguments of [[this.onActivateSettingsTab]] event.\n * @public\n * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ActivateSettingsTabEventArgs {\n readonly settingsTabId: string;\n}\n\n/** Setting Provider interface. Implemented by classes that want to supply settings pages for display in the SettingContainer. The\n * classes that implement this interface need to be registered with the [[SettingsManager]].\n * @public\n */\nexport interface SettingsTabsProvider {\n /** Id of provider, used to remove registration. */\n readonly id: string;\n getSettingEntries(\n stageId: string,\n stageUsage: string\n ): ReadonlyArray<SettingsTabEntry> | undefined;\n}\n\n/** Settings Manager class. Hold registration of settings providers and supplies events for the provided settings pages to listen.\n * @public\n */\nexport class SettingsManager {\n private _providers: ReadonlyArray<SettingsTabsProvider> = [];\n\n /** Event raised when SettingsProviders are changed.\n */\n public readonly onSettingsProvidersChanged =\n new SettingsProvidersChangedEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised solely for a settings page to monitor so it can save its settings before continuing tab activation.\n * See React hook function `useSaveBeforeActivatingNewSettingsTab`.\n */\n public readonly onProcessSettingsTabActivation =\n new ProcessSettingsTabActivationEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised when the settings container will be closed. Any setting page component that is 'modal' should register to\n * listen to this event so that it can save its state before closing. See React hook function `useSaveBeforeClosingSettingsContainer`.\n */\n public readonly onProcessSettingsContainerClose =\n new ProcessSettingsContainerCloseEvent(); // eslint-disable-line deprecation/deprecation\n\n /** Event raised to change the active settings tab shown in UI. Monitored by the SettingsContainer.\n * @internal\n */\n public readonly onActivateSettingsTab =\n new BeUiEvent<ActivateSettingsTabEventArgs>(); // eslint-disable-line deprecation/deprecation\n\n /** Event monitored by SettingsContainer to process request to close the settings container.\n * @internal\n */\n public readonly onCloseSettingsContainer =\n new BeUiEvent<ProcessSettingsContainerCloseEventArgs>(); // eslint-disable-line deprecation/deprecation\n\n /** @public */\n public get providers(): ReadonlyArray<SettingsTabsProvider> {\n return this._providers;\n }\n public set providers(p: ReadonlyArray<SettingsTabsProvider>) {\n this._providers = p;\n this.onSettingsProvidersChanged.emit({ providers: p });\n }\n\n /** Called by application when an tool, keyin, or other process want to change the active settings tab/page giving the current tab/page and opportunity\n * to save its state.\n */\n public activateSettingsTab(settingsTabId: string) {\n this.onActivateSettingsTab.emit({ settingsTabId });\n }\n\n /** Called by application when the Settings Container is to be closed. The function to invoke to actually close the Settings Container is\n * passed in and executed once the active settings tab/page has a chance to save its settings.\n */\n public closeSettingsContainer(\n closeFunc: (args: any) => void,\n closeFuncArgs?: any\n ) {\n this.onCloseSettingsContainer.emit({ closeFunc, closeFuncArgs });\n }\n\n public addSettingsProvider(settingsProvider: SettingsTabsProvider): void {\n const foundProvider = this._providers.find(\n (p) => p.id === settingsProvider.id\n );\n if (!foundProvider) {\n const updatedProviders = [...this.providers, settingsProvider];\n this.providers = updatedProviders;\n } else {\n Logger.logInfo(\n UiCore.loggerCategory(this),\n `Settings Provider with id of ${settingsProvider.id} has already been registered`\n );\n }\n }\n\n public removeSettingsProvider(providerId: string): boolean {\n let result = false;\n const updatedProviders = this._providers.filter((p) => p.id !== providerId);\n if (updatedProviders.length !== this._providers.length) {\n this.providers = updatedProviders;\n result = true;\n }\n\n return result;\n }\n\n /** Get an array of SettingsTabEntry objects to populate the settings container. */\n public getSettingEntries(\n stageId: string,\n stageUsage: string\n ): Array<SettingsTabEntry> {\n const allSettingEntries: SettingsTabEntry[] = [];\n // Consult the registered SettingsProviders\n this._providers.forEach((p) => {\n const entries = p.getSettingEntries(stageId, stageUsage);\n entries && allSettingEntries.push(...entries);\n });\n\n return allSettingEntries;\n }\n}\n"]}
|
|
@@ -7,7 +7,7 @@ import { Orientation } from "../enums/Orientation";
|
|
|
7
7
|
/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element
|
|
8
8
|
* to support react-tooltip component or a string that will be use to set the title property.
|
|
9
9
|
* @public
|
|
10
|
-
* @deprecated in 4.12.
|
|
10
|
+
* @deprecated in 4.12.0. Interface used in a deprecated component {@link Tabs}.
|
|
11
11
|
*/
|
|
12
12
|
export interface TabLabel {
|
|
13
13
|
label: string;
|
|
@@ -20,7 +20,7 @@ export interface TabLabel {
|
|
|
20
20
|
}
|
|
21
21
|
/** Properties for the [[VerticalTabs]] component
|
|
22
22
|
* @public
|
|
23
|
-
* @deprecated in 4.12.
|
|
23
|
+
* @deprecated in 4.12.0. Props of deprecated component {@link Tabs}.
|
|
24
24
|
*/
|
|
25
25
|
export interface TabsProps extends React.AllHTMLAttributes<HTMLUListElement>, CommonProps {
|
|
26
26
|
/** Text shown for each tab */
|
|
@@ -37,7 +37,7 @@ interface TabsState {
|
|
|
37
37
|
}
|
|
38
38
|
/** Properties for the base [[Tabs]] component
|
|
39
39
|
* @public
|
|
40
|
-
* @deprecated in 4.12.
|
|
40
|
+
* @deprecated in 4.12.0. Props of deprecated component {@link Tabs}.
|
|
41
41
|
*/
|
|
42
42
|
export interface MainTabsProps extends TabsProps {
|
|
43
43
|
/** Main CSS class name */
|
|
@@ -47,7 +47,7 @@ export interface MainTabsProps extends TabsProps {
|
|
|
47
47
|
}
|
|
48
48
|
/** Tabs meant to represent the current position in a page/section
|
|
49
49
|
* @public
|
|
50
|
-
* @deprecated in 4.12.
|
|
50
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.
|
|
51
51
|
*/
|
|
52
52
|
export declare class Tabs extends React.PureComponent<MainTabsProps, TabsState> {
|
|
53
53
|
private _anchorRefs;
|
|
@@ -21,7 +21,7 @@ function isTabLabel(item) {
|
|
|
21
21
|
}
|
|
22
22
|
/** Tabs meant to represent the current position in a page/section
|
|
23
23
|
* @public
|
|
24
|
-
* @deprecated in 4.12.
|
|
24
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.
|
|
25
25
|
*/
|
|
26
26
|
class Tabs extends React.PureComponent {
|
|
27
27
|
constructor(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/Tabs.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAE/B,sDAAmD;AACnD,0EAAuE;AACvE,oDAAiD;AAmBjD,SAAS,kBAAkB,CAAC,IAAuB;IACjD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,SAAS,UAAU,CAAC,IAAuB;IACzC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAkCD;;;GAGG;AACH,MAAa,IAAK,SAAQ,KAAK,CAAC,aAAuC;IAIrE,YAAY,KAAoB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAJP,gBAAW,GAA8C,EAAE,CAAC;QA0D5D,qBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE;YAC3C,MAAM,O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,SAAS,EAAE,IAAA,oBAAU,EACnB,0BAA0B,EAC1B,QAAQ,IAAI,wBAAwB,CACrC;wBAEA,eAAe,IAAI,CAClB,8BAAM,SAAS,EAAC,kBAAkB,IAAE,IAAI,CAAQ,CACjD;wBACD,6BAAK,SAAS,EAAC,sCAAsC;4BACnD,kCACG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAC3C;4BACN,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,sBAAsB,IAAE,QAAQ,CAAQ,CACzD,CACG,CACF,CACJ,CACD,CACN,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC;IACJ,CAAC;CACF;AA7KD,oBA6KC","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 Tabs\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Orientation } from \"../enums/Orientation\";\nimport { ItemKeyboardNavigator } from \"../focus/ItemKeyboardNavigator\";\nimport { IconHelper } from \"../utils/IconHelper\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element\n * to support react-tooltip component or a string that will be use to set the title property.\n * @public\n * @deprecated in 4.12.x. Interface used in a deprecated component {@link Tabs}.\n */\nexport interface TabLabel {\n label: string;\n subLabel?: string;\n icon?: string | React.ReactElement;\n tabId: string /* optional id added to tab so it can be used by react-tooltip */;\n /** tooltip allows React.ReactElement to support styled tooltips like react-tooltip. */\n tooltip?: string | React.ReactElement;\n disabled?: boolean;\n}\n\nfunction isTabLabelWithIcon(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\" && !!item.icon;\n}\n\nfunction isTabLabel(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\";\n}\n\n/** Properties for the [[VerticalTabs]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link Tabs}.\n */\nexport interface TabsProps\n extends React.AllHTMLAttributes<HTMLUListElement>,\n CommonProps {\n /** Text shown for each tab */\n labels: Array<string | TabLabel>;\n /** Handler for activating a tab */\n onActivateTab?: (index: number) => any;\n /** Index of the initial active tab */\n activeIndex?: number;\n /** Indicates whether the bar on the active tab is green instead of the default blue */\n green?: boolean;\n}\n\ninterface TabsState {\n activeIndex: number;\n}\n\n/** Properties for the base [[Tabs]] component\n * @public\n * @deprecated in 4.12.x. Props of deprecated component {@link Tabs}.\n */\nexport interface MainTabsProps extends TabsProps {\n /** Main CSS class name */\n mainClassName: string;\n /** Orientation of the Tabs list */\n orientation: Orientation;\n}\n\n/** Tabs meant to represent the current position in a page/section\n * @public\n * @deprecated in 4.12.x. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.\n */\nexport class Tabs extends React.PureComponent<MainTabsProps, TabsState> {\n private _anchorRefs: Array<React.RefObject<HTMLAnchorElement>> = [];\n private _itemKeyboardNavigator: ItemKeyboardNavigator;\n\n constructor(props: MainTabsProps) {\n super(props);\n\n const activeIndex = this.validateActiveIndex(props.activeIndex);\n this.state = {\n activeIndex,\n };\n\n props.labels.forEach(() =>\n this._anchorRefs.push(React.createRef<HTMLAnchorElement>())\n );\n this._itemKeyboardNavigator = new ItemKeyboardNavigator(\n this._handleFocusItem,\n this._activateTab\n );\n }\n\n private validateActiveIndex(idx?: number): number {\n let activeIndex = 0;\n if (idx && idx >= 0 && idx < this.props.labels.length) activeIndex = idx;\n return activeIndex;\n }\n\n /** @internal */\n public override componentDidMount() {\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: MainTabsProps) {\n if (prevProps.labels !== this.props.labels)\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n\n if (prevProps.orientation !== this.props.orientation)\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n\n if (prevProps.activeIndex !== this.props.activeIndex) {\n let hadFocus = false;\n const element = this._anchorRefs[this.state.activeIndex].current;\n if (element && document.activeElement === element) hadFocus = true;\n const activeIndex = this.validateActiveIndex(this.props.activeIndex);\n\n this.setState(\n () => ({ activeIndex }),\n () => {\n if (hadFocus) {\n const newElement = this._anchorRefs[activeIndex].current;\n if (newElement) newElement.focus();\n }\n }\n );\n }\n }\n\n private _handleFocusItem = (index: number) => {\n const itemRef = this._anchorRefs[index];\n if (itemRef && itemRef.current) itemRef.current.focus();\n };\n\n private _handleTabClick = (index: number) => {\n this._activateTab(index);\n };\n\n /** Handle keydown on tabs */\n private _handleKeyDownEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyDownEvent(event, index);\n }\n\n /** Handle keyup on tabs */\n private _handleKeyUpEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyUpEvent(event, index);\n }\n\n private _activateTab = (index: number) => {\n this.props.onActivateTab && this.props.onActivateTab(index);\n this.setState({ activeIndex: index });\n };\n\n /** @internal */\n public override render(): React.ReactElement {\n const ulClassNames = classnames(\n this.props.mainClassName,\n this.props.green && \"uicore-tabs-green\",\n this.props.className\n );\n\n const anyIconsPresent =\n this.props.labels.reduce(\n (a, b) => a + (isTabLabelWithIcon(b) ? 1 : 0),\n 0\n ) > 0;\n\n return (\n <ul\n className={ulClassNames}\n style={this.props.style}\n role=\"tablist\"\n aria-orientation={\n this.props.orientation === Orientation.Vertical\n ? \"vertical\"\n : \"horizontal\"\n }\n >\n {this.props.labels.map((label, index) => {\n let disabled;\n let tooltipElement: React.ReactElement | undefined;\n let title: string | undefined;\n let subLabel: string | undefined;\n let tabId = \"\";\n let icon;\n if (isTabLabel(label)) {\n icon = IconHelper.getIconReactNode(label.icon);\n subLabel = label.subLabel;\n disabled = label.disabled;\n tabId = label.tabId;\n if (React.isValidElement(label.tooltip))\n tooltipElement = label.tooltip;\n else if (typeof label.tooltip === \"string\") title = label.tooltip;\n }\n return (\n <li\n key={index}\n title={title}\n className={classnames(\n index === this.state.activeIndex && \"core-active\",\n disabled && \"core-tab-item-disabled\"\n )}\n role=\"tab\"\n aria-selected={index === this.state.activeIndex}\n data-for={`${tabId}`} /* to support react-tooltip */\n >\n {tooltipElement}\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n ref={this._anchorRefs[index]}\n tabIndex={index === this.state.activeIndex ? 0 : -1}\n onClick={() => this._handleTabClick(index)}\n onKeyDown={(event) => this._handleKeyDownEvent(event, index)}\n onKeyUp={(event) => this._handleKeyUpEvent(event, index)}\n data-testid={`${tabId}`}\n role=\"button\"\n >\n {\" \"}\n <div\n className={classnames(\n \"uicore-tabs-inline-label\",\n disabled && \"core-tab-item-disabled\"\n )}\n >\n {anyIconsPresent && (\n <span className=\"uicore-tabs-icon\">{icon}</span>\n )}\n <div className=\"uicore-tabs-label-subLabel-container\">\n <span>\n {typeof label === \"string\" ? label : label.label}\n </span>\n {subLabel && (\n <span className=\"uicore-tabs-subLabel\">{subLabel}</span>\n )}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/Tabs.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAE/B,sDAAmD;AACnD,0EAAuE;AACvE,oDAAiD;AAmBjD,SAAS,kBAAkB,CAAC,IAAuB;IACjD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,SAAS,UAAU,CAAC,IAAuB;IACzC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAkCD;;;GAGG;AACH,MA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AK,CAAC,EAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,iBAC3C,GAAG,KAAK,EAAE,EACvB,IAAI,EAAC,QAAQ;oBAEZ,GAAG;oBACJ,6BACE,SAAS,EAAE,IAAA,oBAAU,EACnB,0BAA0B,EAC1B,QAAQ,IAAI,wBAAwB,CACrC;wBAEA,eAAe,IAAI,CAClB,8BAAM,SAAS,EAAC,kBAAkB,IAAE,IAAI,CAAQ,CACjD;wBACD,6BAAK,SAAS,EAAC,sCAAsC;4BACnD,kCACG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAC3C;4BACN,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,sBAAsB,IAAE,QAAQ,CAAQ,CACzD,CACG,CACF,CACJ,CACD,CACN,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC;IACJ,CAAC;CACF;AA7KD,oBA6KC","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 Tabs\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"../utils/Props\";\nimport { Orientation } from \"../enums/Orientation\";\nimport { ItemKeyboardNavigator } from \"../focus/ItemKeyboardNavigator\";\nimport { IconHelper } from \"../utils/IconHelper\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element\n * to support react-tooltip component or a string that will be use to set the title property.\n * @public\n * @deprecated in 4.12.0. Interface used in a deprecated component {@link Tabs}.\n */\nexport interface TabLabel {\n label: string;\n subLabel?: string;\n icon?: string | React.ReactElement;\n tabId: string /* optional id added to tab so it can be used by react-tooltip */;\n /** tooltip allows React.ReactElement to support styled tooltips like react-tooltip. */\n tooltip?: string | React.ReactElement;\n disabled?: boolean;\n}\n\nfunction isTabLabelWithIcon(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\" && !!item.icon;\n}\n\nfunction isTabLabel(item: string | TabLabel): item is TabLabel {\n return typeof item !== \"string\";\n}\n\n/** Properties for the [[VerticalTabs]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link Tabs}.\n */\nexport interface TabsProps\n extends React.AllHTMLAttributes<HTMLUListElement>,\n CommonProps {\n /** Text shown for each tab */\n labels: Array<string | TabLabel>;\n /** Handler for activating a tab */\n onActivateTab?: (index: number) => any;\n /** Index of the initial active tab */\n activeIndex?: number;\n /** Indicates whether the bar on the active tab is green instead of the default blue */\n green?: boolean;\n}\n\ninterface TabsState {\n activeIndex: number;\n}\n\n/** Properties for the base [[Tabs]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link Tabs}.\n */\nexport interface MainTabsProps extends TabsProps {\n /** Main CSS class name */\n mainClassName: string;\n /** Orientation of the Tabs list */\n orientation: Orientation;\n}\n\n/** Tabs meant to represent the current position in a page/section\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/tabs iTwinUI Tabs} instead.\n */\nexport class Tabs extends React.PureComponent<MainTabsProps, TabsState> {\n private _anchorRefs: Array<React.RefObject<HTMLAnchorElement>> = [];\n private _itemKeyboardNavigator: ItemKeyboardNavigator;\n\n constructor(props: MainTabsProps) {\n super(props);\n\n const activeIndex = this.validateActiveIndex(props.activeIndex);\n this.state = {\n activeIndex,\n };\n\n props.labels.forEach(() =>\n this._anchorRefs.push(React.createRef<HTMLAnchorElement>())\n );\n this._itemKeyboardNavigator = new ItemKeyboardNavigator(\n this._handleFocusItem,\n this._activateTab\n );\n }\n\n private validateActiveIndex(idx?: number): number {\n let activeIndex = 0;\n if (idx && idx >= 0 && idx < this.props.labels.length) activeIndex = idx;\n return activeIndex;\n }\n\n /** @internal */\n public override componentDidMount() {\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: MainTabsProps) {\n if (prevProps.labels !== this.props.labels)\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\n\n if (prevProps.orientation !== this.props.orientation)\n this._itemKeyboardNavigator.orientation = this.props.orientation;\n\n if (prevProps.activeIndex !== this.props.activeIndex) {\n let hadFocus = false;\n const element = this._anchorRefs[this.state.activeIndex].current;\n if (element && document.activeElement === element) hadFocus = true;\n const activeIndex = this.validateActiveIndex(this.props.activeIndex);\n\n this.setState(\n () => ({ activeIndex }),\n () => {\n if (hadFocus) {\n const newElement = this._anchorRefs[activeIndex].current;\n if (newElement) newElement.focus();\n }\n }\n );\n }\n }\n\n private _handleFocusItem = (index: number) => {\n const itemRef = this._anchorRefs[index];\n if (itemRef && itemRef.current) itemRef.current.focus();\n };\n\n private _handleTabClick = (index: number) => {\n this._activateTab(index);\n };\n\n /** Handle keydown on tabs */\n private _handleKeyDownEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyDownEvent(event, index);\n }\n\n /** Handle keyup on tabs */\n private _handleKeyUpEvent(event: React.KeyboardEvent, index: number) {\n this._itemKeyboardNavigator.handleKeyUpEvent(event, index);\n }\n\n private _activateTab = (index: number) => {\n this.props.onActivateTab && this.props.onActivateTab(index);\n this.setState({ activeIndex: index });\n };\n\n /** @internal */\n public override render(): React.ReactElement {\n const ulClassNames = classnames(\n this.props.mainClassName,\n this.props.green && \"uicore-tabs-green\",\n this.props.className\n );\n\n const anyIconsPresent =\n this.props.labels.reduce(\n (a, b) => a + (isTabLabelWithIcon(b) ? 1 : 0),\n 0\n ) > 0;\n\n return (\n <ul\n className={ulClassNames}\n style={this.props.style}\n role=\"tablist\"\n aria-orientation={\n this.props.orientation === Orientation.Vertical\n ? \"vertical\"\n : \"horizontal\"\n }\n >\n {this.props.labels.map((label, index) => {\n let disabled;\n let tooltipElement: React.ReactElement | undefined;\n let title: string | undefined;\n let subLabel: string | undefined;\n let tabId = \"\";\n let icon;\n if (isTabLabel(label)) {\n icon = IconHelper.getIconReactNode(label.icon);\n subLabel = label.subLabel;\n disabled = label.disabled;\n tabId = label.tabId;\n if (React.isValidElement(label.tooltip))\n tooltipElement = label.tooltip;\n else if (typeof label.tooltip === \"string\") title = label.tooltip;\n }\n return (\n <li\n key={index}\n title={title}\n className={classnames(\n index === this.state.activeIndex && \"core-active\",\n disabled && \"core-tab-item-disabled\"\n )}\n role=\"tab\"\n aria-selected={index === this.state.activeIndex}\n data-for={`${tabId}`} /* to support react-tooltip */\n >\n {tooltipElement}\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <a\n ref={this._anchorRefs[index]}\n tabIndex={index === this.state.activeIndex ? 0 : -1}\n onClick={() => this._handleTabClick(index)}\n onKeyDown={(event) => this._handleKeyDownEvent(event, index)}\n onKeyUp={(event) => this._handleKeyUpEvent(event, index)}\n data-testid={`${tabId}`}\n role=\"button\"\n >\n {\" \"}\n <div\n className={classnames(\n \"uicore-tabs-inline-label\",\n disabled && \"core-tab-item-disabled\"\n )}\n >\n {anyIconsPresent && (\n <span className=\"uicore-tabs-icon\">{icon}</span>\n )}\n <div className=\"uicore-tabs-label-subLabel-container\">\n <span>\n {typeof label === \"string\" ? label : label.label}\n </span>\n {subLabel && (\n <span className=\"uicore-tabs-subLabel\">{subLabel}</span>\n )}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n );\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { TabsProps } from "./Tabs";
|
|
6
6
|
/** Vertical tabs meant to represent the current position in a page/section
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated in 4.12.
|
|
8
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/tabs#vertical iTwinUI Tabs} instead.
|
|
9
9
|
*/
|
|
10
10
|
export declare function VerticalTabs(props: TabsProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=VerticalTabs.d.ts.map
|
|
@@ -14,7 +14,7 @@ const Orientation_1 = require("../enums/Orientation");
|
|
|
14
14
|
/* eslint-disable deprecation/deprecation */
|
|
15
15
|
/** Vertical tabs meant to represent the current position in a page/section
|
|
16
16
|
* @public
|
|
17
|
-
* @deprecated in 4.12.
|
|
17
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/tabs#vertical iTwinUI Tabs} instead.
|
|
18
18
|
*/
|
|
19
19
|
function VerticalTabs(props) {
|
|
20
20
|
return (React.createElement(Tabs_1.Tabs, { mainClassName: "uicore-tabs-vertical", orientation: Orientation_1.Orientation.Vertical, ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,iCAA8B;AAC9B,sDAAmD;AAEnD,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,CACL,oBAAC,WAAI,IACH,aAAa,EAAC,sBAAsB,EACpC,WAAW,EAAE,yBAAW,CAAC,QAAQ,KAC7B,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AARD,oCAQC","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 Tabs\n */\n\nimport * as React from \"react\";\nimport type { TabsProps } from \"./Tabs\";\nimport { Tabs } from \"./Tabs\";\nimport { Orientation } from \"../enums/Orientation\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Vertical tabs meant to represent the current position in a page/section\n * @public\n * @deprecated in 4.12.
|
|
1
|
+
{"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/VerticalTabs.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,iCAA8B;AAC9B,sDAAmD;AAEnD,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,CACL,oBAAC,WAAI,IACH,aAAa,EAAC,sBAAsB,EACpC,WAAW,EAAE,yBAAW,CAAC,QAAQ,KAC7B,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AARD,oCAQC","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 Tabs\n */\n\nimport * as React from \"react\";\nimport type { TabsProps } from \"./Tabs\";\nimport { Tabs } from \"./Tabs\";\nimport { Orientation } from \"../enums/Orientation\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Vertical tabs meant to represent the current position in a page/section\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/tabs#vertical iTwinUI Tabs} instead.\n */\nexport function VerticalTabs(props: TabsProps) {\n return (\n <Tabs\n mainClassName=\"uicore-tabs-vertical\"\n orientation={Orientation.Vertical}\n {...props}\n />\n );\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled block text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated in 4.12.
|
|
8
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
|
|
9
9
|
*/
|
|
10
10
|
export declare function BlockText(props: TextProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=BlockText.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled block text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated in 4.12.
|
|
15
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line deprecation/deprecation
|
|
18
18
|
function BlockText(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAHD,8BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled block text React functional component\n * @public\n * @deprecated in 4.12.
|
|
1
|
+
{"version":3,"file":"BlockText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BlockText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAHD,8BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled block text React functional component\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BlockText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-block\" />;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled body text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated in 4.0 Use `<Text variant='body' />` from iTwinUI-react package.
|
|
8
|
+
* @deprecated in 4.0.0. Use `<Text variant='body' />` from iTwinUI-react package.
|
|
9
9
|
*/
|
|
10
10
|
export declare function BodyText(props: TextProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=BodyText.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled body text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated in 4.0 Use `<Text variant='body' />` from iTwinUI-react package.
|
|
15
|
+
* @deprecated in 4.0.0. Use `<Text variant='body' />` from iTwinUI-react package.
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line deprecation/deprecation
|
|
18
18
|
function BodyText(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BodyText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,QAAQ,CAAC,KAAgB;IACvC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,kBAAkB,GAAG,CAAC;AACpE,CAAC;AAHD,4BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled body text React functional component\n * @public\n * @deprecated in 4.0 Use `<Text variant='body' />` from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BodyText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-body\" />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BodyText.js","sourceRoot":"","sources":["../../../../src/core-react/text/BodyText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,QAAQ,CAAC,KAAgB;IACvC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,kBAAkB,GAAG,CAAC;AACpE,CAAC;AAHD,4BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled body text React functional component\n * @public\n * @deprecated in 4.0.0. Use `<Text variant='body' />` from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function BodyText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-body\" />;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled disabled text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated in 4.12.
|
|
8
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
|
|
9
9
|
*/
|
|
10
10
|
export declare function DisabledText(props: TextProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=DisabledText.d.ts.map
|
|
@@ -13,7 +13,7 @@ const StyledText_1 = require("./StyledText");
|
|
|
13
13
|
/* eslint-disable deprecation/deprecation */
|
|
14
14
|
/** Styled disabled text React functional component
|
|
15
15
|
* @public
|
|
16
|
-
* @deprecated in 4.12.
|
|
16
|
+
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.
|
|
17
17
|
*/
|
|
18
18
|
function DisabledText(props) {
|
|
19
19
|
return React.createElement(StyledText_1.StyledText, { ...props, mainClassName: "uicore-text-disabled" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisabledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,+BAA+B;AAC/B,6CAA0C;AAG1C,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACxE,CAAC;AAFD,oCAEC","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 Text\n */\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Styled disabled text React functional component\n * @public\n * @deprecated in 4.12.
|
|
1
|
+
{"version":3,"file":"DisabledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/DisabledText.tsx"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,+BAA+B;AAC/B,6CAA0C;AAG1C,4CAA4C;AAE5C;;;GAGG;AACH,SAAgB,YAAY,CAAC,KAAgB;IAC3C,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,sBAAsB,GAAG,CAAC;AACxE,CAAC;AAFD,oCAEC","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 Text\n */\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Styled disabled text React functional component\n * @public\n * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/typography#text iTwinUI Text} instead.\n */\nexport function DisabledText(props: TextProps) {\n return <StyledText {...props} mainClassName=\"uicore-text-disabled\" />;\n}\n"]}
|
|
@@ -7,6 +7,7 @@ import type { IMatch } from "../utils/matches";
|
|
|
7
7
|
import "./FilteredText.scss";
|
|
8
8
|
/** Props supported by [FilteredText] component
|
|
9
9
|
* @alpha
|
|
10
|
+
* @deprecated in 4.15.0. Props of deprecated {@link FilteredText} component.
|
|
10
11
|
*/
|
|
11
12
|
export interface FilteredTextProps extends CommonProps {
|
|
12
13
|
/** string that matched a filter string */
|
|
@@ -20,6 +21,7 @@ export interface FilteredTextProps extends CommonProps {
|
|
|
20
21
|
}
|
|
21
22
|
/** Component used to highlight filter matches within a text string.
|
|
22
23
|
* @alpha
|
|
24
|
+
* @deprecated in 4.15.0. Used internally.
|
|
23
25
|
*/
|
|
24
26
|
export declare function FilteredText(props: FilteredTextProps): React.JSX.Element;
|
|
25
27
|
//# sourceMappingURL=FilteredText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteredText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,qBAAqB,CAAC;AAE7B
|
|
1
|
+
{"version":3,"file":"FilteredText.d.ts","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,qBAAqB,CAAC;AAE7B;;;GAGG;AAEH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC;AAED;;;GAGG;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA2DpD"}
|
|
@@ -14,7 +14,9 @@ const classnames_1 = require("classnames");
|
|
|
14
14
|
require("./FilteredText.scss");
|
|
15
15
|
/** Component used to highlight filter matches within a text string.
|
|
16
16
|
* @alpha
|
|
17
|
+
* @deprecated in 4.15.0. Used internally.
|
|
17
18
|
*/
|
|
19
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
18
20
|
function FilteredText(props) {
|
|
19
21
|
const { value, className, matches, matchClassName, matchStyle, ...otherProps } = props;
|
|
20
22
|
if (matches && matches.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteredText.js","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2BAA2B;AAE3B,+BAA+B;AAC/B,2CAAoC;AAGpC,+BAA6B;
|
|
1
|
+
{"version":3,"file":"FilteredText.js","sourceRoot":"","sources":["../../../../src/core-react/text/FilteredText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2BAA2B;AAE3B,+BAA+B;AAC/B,2CAAoC;AAGpC,+BAA6B;AAkB7B;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,YAAY,CAAC,KAAwB;IACnD,MAAM,EACJ,KAAK,EACL,SAAS,EACT,OAAO,EACP,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,KAAK,GAAsB,EAAE,CAAC;QAEpC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ;gBACzB,KAAK,CAAC,IAAI,CACR,8BAAM,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,8BAA8B,IAC1D,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CACjC,CACR,CAAC;YACJ,KAAK,CAAC,IAAI,CACR,8BACE,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,IAAA,oBAAU,EAAC,4BAA4B,EAAE,cAAc,CAAC,IAElE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CACjC,CACR,CAAC;YACF,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;QACtB,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,QAAQ,GAAG,MAAM,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CACR,8BAAM,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,8BAA8B,IAC1D,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAC7B,CACR,CAAC;QACJ,CAAC;QACD,OAAO,CACL,gCACM,UAAU,EACd,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,CAAC,EACxD,KAAK,EAAE,KAAK,IAEX,KAAK,CACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iCACM,UAAU,EACd,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAsB,EAAE,SAAS,CAAC,EACxD,KAAK,EAAE,KAAK,IAEX,KAAK,CACD,CACR,CAAC;AACJ,CAAC;AA3DD,oCA2DC","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 Text\n */\n\n// cSpell:ignore focusvalue\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport type { CommonProps } from \"../utils/Props\";\nimport type { IMatch } from \"../utils/matches\";\nimport \"./FilteredText.scss\";\n\n/** Props supported by [FilteredText] component\n * @alpha\n * @deprecated in 4.15.0. Props of deprecated {@link FilteredText} component.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface FilteredTextProps extends CommonProps {\n /** string that matched a filter string */\n value: string;\n /** define array of start and end positions of filter matches. */\n matches?: IMatch[];\n /** holds class name for matching span text. */\n matchClassName?: string;\n /** holds style for matching span text. */\n matchStyle?: React.CSSProperties;\n}\n\n/** Component used to highlight filter matches within a text string.\n * @alpha\n * @deprecated in 4.15.0. Used internally.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function FilteredText(props: FilteredTextProps) {\n const {\n value,\n className,\n matches,\n matchClassName,\n matchStyle,\n ...otherProps\n } = props;\n if (matches && matches.length > 0) {\n const spans: React.ReactNode[] = [];\n\n let startPos = 0;\n for (const span of matches) {\n if (span.start !== startPos)\n spans.push(\n <span key={startPos} className=\"uicore-partial-filtered-text\">\n {value.substring(startPos, span.start)}\n </span>\n );\n spans.push(\n <span\n key={span.start}\n style={matchStyle}\n className={classnames(\"uicore-filtered-text-match\", matchClassName)}\n >\n {value.substring(span.start, span.end)}\n </span>\n );\n startPos = span.end;\n }\n const endPos = value.length;\n if (startPos < endPos) {\n spans.push(\n <span key={startPos} className=\"uicore-partial-filtered-text\">\n {value.substring(startPos, endPos)}\n </span>\n );\n }\n return (\n <div\n {...otherProps}\n className={classnames(\"uicore-filtered-text\", className)}\n title={value}\n >\n {spans}\n </div>\n );\n }\n\n return (\n <span\n {...otherProps}\n className={classnames(\"uicore-filtered-text\", className)}\n title={value}\n >\n {value}\n </span>\n );\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Styled muted/gray text React functional component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated in 4.0 Use \<Text isMuted /\> from iTwinUI-react package.
|
|
8
|
+
* @deprecated in 4.0.0. Use \<Text isMuted /\> from iTwinUI-react package.
|
|
9
9
|
*/
|
|
10
10
|
export declare function MutedText(props: TextProps): React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=MutedText.d.ts.map
|
|
@@ -12,7 +12,7 @@ const React = require("react");
|
|
|
12
12
|
const StyledText_1 = require("./StyledText");
|
|
13
13
|
/** Styled muted/gray text React functional component
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated in 4.0 Use \<Text isMuted /\> from iTwinUI-react package.
|
|
15
|
+
* @deprecated in 4.0.0. Use \<Text isMuted /\> from iTwinUI-react package.
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line deprecation/deprecation
|
|
18
18
|
function MutedText(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutedText.js","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAHD,8BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled muted/gray text React functional component\n * @public\n * @deprecated in 4.0 Use \\<Text isMuted /\\> from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function MutedText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-muted\" />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MutedText.js","sourceRoot":"","sources":["../../../../src/core-react/text/MutedText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,6CAA0C;AAG1C;;;GAGG;AACH,mDAAmD;AACnD,SAAgB,SAAS,CAAC,KAAgB;IACxC,mDAAmD;IACnD,OAAO,oBAAC,uBAAU,OAAK,KAAK,EAAE,aAAa,EAAC,mBAAmB,GAAG,CAAC;AACrE,CAAC;AAHD,8BAGC","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 Text\n */\n\nimport * as React from \"react\";\nimport { StyledText } from \"./StyledText\";\nimport type { TextProps } from \"./TextProps\";\n\n/** Styled muted/gray text React functional component\n * @public\n * @deprecated in 4.0.0. Use \\<Text isMuted /\\> from iTwinUI-react package.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function MutedText(props: TextProps) {\n // eslint-disable-next-line deprecation/deprecation\n return <StyledText {...props} mainClassName=\"uicore-text-muted\" />;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import type { TextProps } from "./TextProps";
|
|
6
6
|
/** Properties for [[StyledText]] component
|
|
7
7
|
* @public
|
|
8
|
-
* @deprecated in 4.12.
|
|
8
|
+
* @deprecated in 4.12.0. Props of deprecated component {@link StyledText}.
|
|
9
9
|
*/
|
|
10
10
|
export interface StyledTextProps extends TextProps {
|
|
11
11
|
/** Main CSS class name */
|
|
@@ -13,7 +13,7 @@ export interface StyledTextProps extends TextProps {
|
|
|
13
13
|
}
|
|
14
14
|
/** The base component for other text components that pass a main CSS class name.
|
|
15
15
|
* @public
|
|
16
|
-
* @deprecated in 4.0 Use \<Text /\> component from iTwinUI-react library.
|
|
16
|
+
* @deprecated in 4.0.0. Use \<Text /\> component from iTwinUI-react library.
|
|
17
17
|
*/
|
|
18
18
|
export declare function StyledText(props: StyledTextProps): React.JSX.Element;
|
|
19
19
|
//# sourceMappingURL=StyledText.d.ts.map
|
|
@@ -12,7 +12,7 @@ const classnames_1 = require("classnames");
|
|
|
12
12
|
const React = require("react");
|
|
13
13
|
/** The base component for other text components that pass a main CSS class name.
|
|
14
14
|
* @public
|
|
15
|
-
* @deprecated in 4.0 Use \<Text /\> component from iTwinUI-react library.
|
|
15
|
+
* @deprecated in 4.0.0. Use \<Text /\> component from iTwinUI-react library.
|
|
16
16
|
*/
|
|
17
17
|
function StyledText(props) {
|
|
18
18
|
const { mainClassName, className, style, children, ...spanProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAc/B;;;GAGG;AACH,SAAgB,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE1E,OAAO,CACL,iCACM,SAAS,EACb,SAAS,EAAE,IAAA,oBAAU,EAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC;AAZD,gCAYC","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 Text\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[StyledText]] component\n * @public\n * @deprecated in 4.12.
|
|
1
|
+
{"version":3,"file":"StyledText.js","sourceRoot":"","sources":["../../../../src/core-react/text/StyledText.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAc/B;;;GAGG;AACH,SAAgB,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE1E,OAAO,CACL,iCACM,SAAS,EACb,SAAS,EAAE,IAAA,oBAAU,EAAC,aAAa,EAAE,SAAS,CAAC,EAC/C,KAAK,EAAE,KAAK,IAEX,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC;AAZD,gCAYC","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 Text\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { TextProps } from \"./TextProps\";\n\n/* eslint-disable deprecation/deprecation */\n\n/** Properties for [[StyledText]] component\n * @public\n * @deprecated in 4.12.0. Props of deprecated component {@link StyledText}.\n */\nexport interface StyledTextProps extends TextProps {\n /** Main CSS class name */\n mainClassName: string;\n}\n\n/** The base component for other text components that pass a main CSS class name.\n * @public\n * @deprecated in 4.0.0. Use \\<Text /\\> component from iTwinUI-react library.\n */\nexport function StyledText(props: StyledTextProps) {\n const { mainClassName, className, style, children, ...spanProps } = props;\n\n return (\n <span\n {...spanProps}\n className={classnames(mainClassName, className)}\n style={style}\n >\n {children}\n </span>\n );\n}\n"]}
|