@itwin/core-react 4.0.0-dev.8 → 4.0.0-dev.9
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 +1 -93
- 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/_typography.scss +7 -8
- package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +2 -3
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.js +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/cjs/core-react/button/button.scss +31 -42
- package/lib/cjs/core-react/button/variables.scss +10 -7
- package/lib/cjs/core-react/checkbox/checkbox.scss +11 -16
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/cjs/core-react/classes.scss +0 -4
- package/lib/cjs/core-react/colorthemes.scss +42 -10
- package/lib/cjs/core-react/colorvariables.scss +53 -15
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +2 -0
- 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/ContextMenu.scss +7 -8
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.scss +4 -5
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts +2 -0
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/expandable/list.scss +7 -17
- package/lib/cjs/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js +1 -7
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.js +2 -2
- package/lib/cjs/core-react/icons/SvgPath.js.map +1 -1
- package/lib/{esm/core-react/icons/SvgSprite.scss → cjs/core-react/icons/SvgPath.scss} +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +4 -5
- package/lib/cjs/core-react/index.scss +0 -4
- package/lib/cjs/core-react/inputs/Input.d.ts +2 -4
- package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/Input.js +1 -2
- package/lib/cjs/core-react/inputs/Input.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -0
- package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/cjs/core-react/inputs/classes.scss +0 -2
- package/lib/cjs/core-react/inputs/index.scss +1 -3
- package/lib/cjs/core-react/inputs/input-label.scss +90 -0
- package/lib/cjs/core-react/inputs/input.scss +36 -38
- package/lib/cjs/core-react/inputs/variables.scss +20 -15
- package/lib/cjs/core-react/listbox/Listbox.scss +3 -3
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -2
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js +1 -16
- package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.scss +4 -5
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts +4 -0
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/popup/Popup.d.ts +2 -0
- package/lib/cjs/core-react/popup/Popup.d.ts.map +1 -1
- package/lib/cjs/core-react/popup/Popup.js.map +1 -1
- package/lib/cjs/core-react/popup/Popup.scss +123 -123
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +4 -0
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.scss +1 -2
- package/lib/cjs/core-react/searchbox/SearchBox.scss +2 -4
- package/lib/cjs/core-react/settings/SettingsContainer.js +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.scss +8 -7
- package/lib/cjs/core-react/style/baseline.scss +6 -8
- package/lib/cjs/core-react/style/data-viz.scss +11 -14
- package/lib/cjs/core-react/style/itwinui-overrides.scss +0 -1
- package/lib/cjs/core-react/style/mixins.scss +0 -1
- package/lib/cjs/core-react/style/opacity.scss +9 -10
- package/lib/cjs/core-react/style/space.scss +9 -13
- package/lib/cjs/core-react/style/speed.scss +3 -4
- package/lib/cjs/core-react/style/typography.scss +26 -25
- package/lib/cjs/core-react/style/variables.scss +4 -5
- package/lib/cjs/core-react/tabs/Tabs.d.ts +1 -1
- package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/classes.scss +0 -1
- package/lib/cjs/core-react/tabs/index.scss +0 -1
- package/lib/cjs/core-react/tabs/tabs.scss +38 -49
- package/lib/cjs/core-react/tabs/vertical.scss +17 -23
- package/lib/cjs/core-react/text/classes.scss +0 -8
- package/lib/cjs/core-react/text/index.scss +0 -8
- package/lib/cjs/core-react/text/mixins.scss +8 -46
- package/lib/cjs/core-react/tree/Node.scss +5 -5
- package/lib/cjs/core-react.d.ts +1 -41
- package/lib/cjs/core-react.d.ts.map +1 -1
- package/lib/cjs/core-react.js +1 -41
- 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/_typography.scss +7 -8
- package/lib/esm/core-react/autosuggest/AutoSuggest.scss +2 -3
- package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.js +0 -1
- package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/esm/core-react/button/button.scss +31 -42
- package/lib/esm/core-react/button/variables.scss +10 -7
- package/lib/esm/core-react/checkbox/checkbox.scss +11 -16
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/esm/core-react/classes.scss +0 -4
- package/lib/esm/core-react/colorthemes.scss +42 -10
- package/lib/esm/core-react/colorvariables.scss +53 -15
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +2 -0
- 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/ContextMenu.scss +7 -8
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +2 -2
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.scss +4 -5
- package/lib/esm/core-react/expandable/ExpandableList.d.ts +2 -0
- package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/expandable/list.scss +7 -17
- package/lib/esm/core-react/hocs/withTimeout.js.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js +1 -7
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.js +2 -2
- package/lib/esm/core-react/icons/SvgPath.js.map +1 -1
- package/lib/{cjs/core-react/icons/SvgSprite.scss → esm/core-react/icons/SvgPath.scss} +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +4 -5
- package/lib/esm/core-react/index.scss +0 -4
- package/lib/esm/core-react/inputs/Input.d.ts +2 -4
- package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/Input.js +1 -2
- package/lib/esm/core-react/inputs/Input.js.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -0
- package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/esm/core-react/inputs/classes.scss +0 -2
- package/lib/esm/core-react/inputs/index.scss +1 -3
- package/lib/esm/core-react/inputs/input-label.scss +90 -0
- package/lib/esm/core-react/inputs/input.scss +36 -38
- package/lib/esm/core-react/inputs/variables.scss +20 -15
- package/lib/esm/core-react/listbox/Listbox.scss +3 -3
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -2
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js +1 -16
- package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.scss +4 -5
- package/lib/esm/core-react/messagebox/MessageBox.d.ts +4 -0
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/popup/Popup.d.ts +2 -0
- package/lib/esm/core-react/popup/Popup.d.ts.map +1 -1
- package/lib/esm/core-react/popup/Popup.js.map +1 -1
- package/lib/esm/core-react/popup/Popup.scss +123 -123
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +4 -0
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.scss +1 -2
- package/lib/esm/core-react/searchbox/SearchBox.scss +2 -4
- package/lib/esm/core-react/settings/SettingsContainer.js +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.scss +8 -7
- package/lib/esm/core-react/style/baseline.scss +6 -8
- package/lib/esm/core-react/style/data-viz.scss +11 -14
- package/lib/esm/core-react/style/itwinui-overrides.scss +0 -1
- package/lib/esm/core-react/style/mixins.scss +0 -1
- package/lib/esm/core-react/style/opacity.scss +9 -10
- package/lib/esm/core-react/style/space.scss +9 -13
- package/lib/esm/core-react/style/speed.scss +3 -4
- package/lib/esm/core-react/style/typography.scss +26 -25
- package/lib/esm/core-react/style/variables.scss +4 -5
- package/lib/esm/core-react/tabs/Tabs.d.ts +1 -1
- package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
- package/lib/esm/core-react/tabs/classes.scss +0 -1
- package/lib/esm/core-react/tabs/index.scss +0 -1
- package/lib/esm/core-react/tabs/tabs.scss +38 -49
- package/lib/esm/core-react/tabs/vertical.scss +17 -23
- package/lib/esm/core-react/text/classes.scss +0 -8
- package/lib/esm/core-react/text/index.scss +0 -8
- package/lib/esm/core-react/text/mixins.scss +8 -46
- package/lib/esm/core-react/tree/Node.scss +5 -5
- package/lib/esm/core-react.d.ts +1 -41
- package/lib/esm/core-react.d.ts.map +1 -1
- package/lib/esm/core-react.js +1 -41
- package/lib/esm/core-react.js.map +1 -1
- package/package.json +23 -21
- package/lib/cjs/core-react/badge/BetaBadge.scss +0 -9
- package/lib/cjs/core-react/button/Button.d.ts +0 -48
- package/lib/cjs/core-react/button/Button.d.ts.map +0 -1
- package/lib/cjs/core-react/button/Button.js +0 -86
- package/lib/cjs/core-react/button/Button.js.map +0 -1
- package/lib/cjs/core-react/checkbox/Checkbox.d.ts +0 -57
- package/lib/cjs/core-react/checkbox/Checkbox.d.ts.map +0 -1
- package/lib/cjs/core-react/checkbox/Checkbox.js +0 -65
- package/lib/cjs/core-react/checkbox/Checkbox.js.map +0 -1
- package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts +0 -47
- package/lib/cjs/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
- package/lib/cjs/core-react/dialog/DialogButtonDef.js +0 -38
- package/lib/cjs/core-react/dialog/DialogButtonDef.js.map +0 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +0 -34
- package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.js +0 -36
- package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +0 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.scss +0 -145
- package/lib/cjs/core-react/form/Field.d.ts +0 -20
- package/lib/cjs/core-react/form/Field.d.ts.map +0 -1
- package/lib/cjs/core-react/form/Field.js +0 -45
- package/lib/cjs/core-react/form/Field.js.map +0 -1
- package/lib/cjs/core-react/form/Form.d.ts +0 -132
- package/lib/cjs/core-react/form/Form.d.ts.map +0 -1
- package/lib/cjs/core-react/form/Form.js +0 -132
- package/lib/cjs/core-react/form/Form.js.map +0 -1
- package/lib/cjs/core-react/form/Form.scss +0 -78
- package/lib/cjs/core-react/icons/SvgSprite.d.ts +0 -21
- package/lib/cjs/core-react/icons/SvgSprite.d.ts.map +0 -1
- package/lib/cjs/core-react/icons/SvgSprite.js +0 -27
- package/lib/cjs/core-react/icons/SvgSprite.js.map +0 -1
- package/lib/cjs/core-react/inputs/LabeledInput.d.ts +0 -18
- package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +0 -1
- package/lib/cjs/core-react/inputs/LabeledInput.js +0 -34
- package/lib/cjs/core-react/inputs/LabeledInput.js.map +0 -1
- package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +0 -18
- package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
- package/lib/cjs/core-react/inputs/LabeledTextarea.js +0 -32
- package/lib/cjs/core-react/inputs/LabeledTextarea.js.map +0 -1
- package/lib/cjs/core-react/inputs/Textarea.d.ts +0 -23
- package/lib/cjs/core-react/inputs/Textarea.d.ts.map +0 -1
- package/lib/cjs/core-react/inputs/Textarea.js +0 -36
- package/lib/cjs/core-react/inputs/Textarea.js.map +0 -1
- package/lib/cjs/core-react/inputs/labeled-input.scss +0 -103
- package/lib/cjs/core-react/inputs/labeled-textarea.scss +0 -77
- package/lib/cjs/core-react/inputs/textarea.scss +0 -55
- package/lib/cjs/core-react/loading/Spinner.d.ts +0 -38
- package/lib/cjs/core-react/loading/Spinner.d.ts.map +0 -1
- package/lib/cjs/core-react/loading/Spinner.js +0 -61
- package/lib/cjs/core-react/loading/Spinner.js.map +0 -1
- package/lib/cjs/core-react/loading/Spinner.scss +0 -26
- package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts +0 -16
- package/lib/cjs/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
- package/lib/cjs/core-react/messagebox/MessageSeverity.js +0 -24
- package/lib/cjs/core-react/messagebox/MessageSeverity.js.map +0 -1
- package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +0 -29
- package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
- package/lib/cjs/core-react/progress-indicators/ProgressBar.js +0 -48
- package/lib/cjs/core-react/progress-indicators/ProgressBar.js.map +0 -1
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js +0 -74
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
- package/lib/cjs/core-react/progress-indicators/classes.scss +0 -33
- package/lib/cjs/core-react/progress-indicators/index.scss +0 -6
- package/lib/cjs/core-react/progress-indicators/progress-bar.scss +0 -91
- package/lib/cjs/core-react/progress-indicators/progress-spinner.scss +0 -132
- package/lib/cjs/core-react/radio/Radio.d.ts +0 -20
- package/lib/cjs/core-react/radio/Radio.d.ts.map +0 -1
- package/lib/cjs/core-react/radio/Radio.js +0 -28
- package/lib/cjs/core-react/radio/Radio.js.map +0 -1
- package/lib/cjs/core-react/radio/classes.scss +0 -7
- package/lib/cjs/core-react/radio/index.scss +0 -8
- package/lib/cjs/core-react/radio/radio.scss +0 -89
- package/lib/cjs/core-react/select/LabeledSelect.d.ts +0 -20
- package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +0 -1
- package/lib/cjs/core-react/select/LabeledSelect.js +0 -34
- package/lib/cjs/core-react/select/LabeledSelect.js.map +0 -1
- package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +0 -16
- package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
- package/lib/cjs/core-react/select/LabeledThemedSelect.js +0 -31
- package/lib/cjs/core-react/select/LabeledThemedSelect.js.map +0 -1
- package/lib/cjs/core-react/select/Select.d.ts +0 -53
- package/lib/cjs/core-react/select/Select.d.ts.map +0 -1
- package/lib/cjs/core-react/select/Select.js +0 -60
- package/lib/cjs/core-react/select/Select.js.map +0 -1
- package/lib/cjs/core-react/select/ThemedSelect.d.ts +0 -104
- package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +0 -1
- package/lib/cjs/core-react/select/ThemedSelect.js +0 -57
- package/lib/cjs/core-react/select/ThemedSelect.js.map +0 -1
- package/lib/cjs/core-react/select/classes.scss +0 -9
- package/lib/cjs/core-react/select/index.scss +0 -10
- package/lib/cjs/core-react/select/labeled-select.scss +0 -72
- package/lib/cjs/core-react/select/labeled-themed-select.scss +0 -77
- package/lib/cjs/core-react/select/modalHelper.d.ts +0 -5
- package/lib/cjs/core-react/select/modalHelper.d.ts.map +0 -1
- package/lib/cjs/core-react/select/modalHelper.js +0 -21
- package/lib/cjs/core-react/select/modalHelper.js.map +0 -1
- package/lib/cjs/core-react/select/select.scss +0 -74
- package/lib/cjs/core-react/select/themed-select.scss +0 -159
- package/lib/cjs/core-react/slider/Slider.d.ts +0 -80
- package/lib/cjs/core-react/slider/Slider.d.ts.map +0 -1
- package/lib/cjs/core-react/slider/Slider.js +0 -91
- package/lib/cjs/core-react/slider/Slider.js.map +0 -1
- package/lib/cjs/core-react/slider/Slider.scss +0 -96
- package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +0 -62
- package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +0 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.js +0 -104
- package/lib/cjs/core-react/splitbutton/SplitButton.js.map +0 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.scss +0 -137
- package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +0 -11
- package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
- package/lib/cjs/core-react/tabs/HorizontalTabs.js +0 -22
- package/lib/cjs/core-react/tabs/HorizontalTabs.js.map +0 -1
- package/lib/cjs/core-react/tabs/horizontal.scss +0 -77
- package/lib/cjs/core-react/text/Headline.d.ts +0 -11
- package/lib/cjs/core-react/text/Headline.d.ts.map +0 -1
- package/lib/cjs/core-react/text/Headline.js +0 -21
- package/lib/cjs/core-react/text/Headline.js.map +0 -1
- package/lib/cjs/core-react/text/LeadingText.d.ts +0 -11
- package/lib/cjs/core-react/text/LeadingText.d.ts.map +0 -1
- package/lib/cjs/core-react/text/LeadingText.js +0 -21
- package/lib/cjs/core-react/text/LeadingText.js.map +0 -1
- package/lib/cjs/core-react/text/LeadingText2.d.ts +0 -11
- package/lib/cjs/core-react/text/LeadingText2.d.ts.map +0 -1
- package/lib/cjs/core-react/text/LeadingText2.js +0 -21
- package/lib/cjs/core-react/text/LeadingText2.js.map +0 -1
- package/lib/cjs/core-react/text/SmallText.d.ts +0 -11
- package/lib/cjs/core-react/text/SmallText.d.ts.map +0 -1
- package/lib/cjs/core-react/text/SmallText.js +0 -21
- package/lib/cjs/core-react/text/SmallText.js.map +0 -1
- package/lib/cjs/core-react/text/Subheading.d.ts +0 -11
- package/lib/cjs/core-react/text/Subheading.d.ts.map +0 -1
- package/lib/cjs/core-react/text/Subheading.js +0 -21
- package/lib/cjs/core-react/text/Subheading.js.map +0 -1
- package/lib/cjs/core-react/text/Subheading2.d.ts +0 -11
- package/lib/cjs/core-react/text/Subheading2.d.ts.map +0 -1
- package/lib/cjs/core-react/text/Subheading2.js +0 -21
- package/lib/cjs/core-react/text/Subheading2.js.map +0 -1
- package/lib/cjs/core-react/text/Title.d.ts +0 -11
- package/lib/cjs/core-react/text/Title.d.ts.map +0 -1
- package/lib/cjs/core-react/text/Title.js +0 -21
- package/lib/cjs/core-react/text/Title.js.map +0 -1
- package/lib/cjs/core-react/text/Title2.d.ts +0 -11
- package/lib/cjs/core-react/text/Title2.d.ts.map +0 -1
- package/lib/cjs/core-react/text/Title2.js +0 -21
- package/lib/cjs/core-react/text/Title2.js.map +0 -1
- package/lib/cjs/core-react/text/headline.scss +0 -10
- package/lib/cjs/core-react/text/leading-2.scss +0 -11
- package/lib/cjs/core-react/text/leading.scss +0 -10
- package/lib/cjs/core-react/text/small.scss +0 -10
- package/lib/cjs/core-react/text/subheading-2.scss +0 -11
- package/lib/cjs/core-react/text/subheading.scss +0 -11
- package/lib/cjs/core-react/text/title-2.scss +0 -11
- package/lib/cjs/core-react/text/title.scss +0 -10
- package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +0 -11
- package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +0 -1
- package/lib/cjs/core-react/tiles/FeaturedTile.js +0 -21
- package/lib/cjs/core-react/tiles/FeaturedTile.js.map +0 -1
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js +0 -21
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
- package/lib/cjs/core-react/tiles/MinimalTile.d.ts +0 -11
- package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +0 -1
- package/lib/cjs/core-react/tiles/MinimalTile.js +0 -21
- package/lib/cjs/core-react/tiles/MinimalTile.js.map +0 -1
- package/lib/cjs/core-react/tiles/Tile.d.ts +0 -32
- package/lib/cjs/core-react/tiles/Tile.d.ts.map +0 -1
- package/lib/cjs/core-react/tiles/Tile.js +0 -40
- package/lib/cjs/core-react/tiles/Tile.js.map +0 -1
- package/lib/cjs/core-react/tiles/classes.scss +0 -7
- package/lib/cjs/core-react/tiles/index.scss +0 -5
- package/lib/cjs/core-react/tiles/tile.scss +0 -134
- package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +0 -26
- package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +0 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.js +0 -29
- package/lib/cjs/core-react/toggle/LabeledToggle.js.map +0 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.scss +0 -21
- package/lib/cjs/core-react/toggle/Toggle.d.ts +0 -52
- package/lib/cjs/core-react/toggle/Toggle.d.ts.map +0 -1
- package/lib/cjs/core-react/toggle/Toggle.js +0 -105
- package/lib/cjs/core-react/toggle/Toggle.js.map +0 -1
- package/lib/cjs/core-react/toggle/Toggle.scss +0 -135
- package/lib/cjs/core-react/tooltip/Tooltip.d.ts +0 -34
- package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +0 -1
- package/lib/cjs/core-react/tooltip/Tooltip.js +0 -57
- package/lib/cjs/core-react/tooltip/Tooltip.js.map +0 -1
- package/lib/cjs/core-react/tooltip/Tooltip.scss +0 -18
- package/lib/cjs/core-react/utils/PointProps.d.ts +0 -12
- package/lib/cjs/core-react/utils/PointProps.d.ts.map +0 -1
- package/lib/cjs/core-react/utils/PointProps.js +0 -10
- package/lib/cjs/core-react/utils/PointProps.js.map +0 -1
- package/lib/cjs/core-react/utils/UiEvent.d.ts +0 -10
- package/lib/cjs/core-react/utils/UiEvent.d.ts.map +0 -1
- package/lib/cjs/core-react/utils/UiEvent.js +0 -18
- package/lib/cjs/core-react/utils/UiEvent.js.map +0 -1
- package/lib/esm/core-react/badge/BetaBadge.scss +0 -9
- package/lib/esm/core-react/button/Button.d.ts +0 -48
- package/lib/esm/core-react/button/Button.d.ts.map +0 -1
- package/lib/esm/core-react/button/Button.js +0 -81
- package/lib/esm/core-react/button/Button.js.map +0 -1
- package/lib/esm/core-react/checkbox/Checkbox.d.ts +0 -57
- package/lib/esm/core-react/checkbox/Checkbox.d.ts.map +0 -1
- package/lib/esm/core-react/checkbox/Checkbox.js +0 -61
- package/lib/esm/core-react/checkbox/Checkbox.js.map +0 -1
- package/lib/esm/core-react/dialog/DialogButtonDef.d.ts +0 -47
- package/lib/esm/core-react/dialog/DialogButtonDef.d.ts.map +0 -1
- package/lib/esm/core-react/dialog/DialogButtonDef.js +0 -35
- package/lib/esm/core-react/dialog/DialogButtonDef.js.map +0 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +0 -34
- package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +0 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.js +0 -32
- package/lib/esm/core-react/expandable/ExpandableBlock.js.map +0 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.scss +0 -145
- package/lib/esm/core-react/form/Field.d.ts +0 -20
- package/lib/esm/core-react/form/Field.d.ts.map +0 -1
- package/lib/esm/core-react/form/Field.js +0 -41
- package/lib/esm/core-react/form/Field.js.map +0 -1
- package/lib/esm/core-react/form/Form.d.ts +0 -132
- package/lib/esm/core-react/form/Form.d.ts.map +0 -1
- package/lib/esm/core-react/form/Form.js +0 -128
- package/lib/esm/core-react/form/Form.js.map +0 -1
- package/lib/esm/core-react/form/Form.scss +0 -78
- package/lib/esm/core-react/icons/SvgSprite.d.ts +0 -21
- package/lib/esm/core-react/icons/SvgSprite.d.ts.map +0 -1
- package/lib/esm/core-react/icons/SvgSprite.js +0 -23
- package/lib/esm/core-react/icons/SvgSprite.js.map +0 -1
- package/lib/esm/core-react/inputs/LabeledInput.d.ts +0 -18
- package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +0 -1
- package/lib/esm/core-react/inputs/LabeledInput.js +0 -30
- package/lib/esm/core-react/inputs/LabeledInput.js.map +0 -1
- package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +0 -18
- package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +0 -1
- package/lib/esm/core-react/inputs/LabeledTextarea.js +0 -28
- package/lib/esm/core-react/inputs/LabeledTextarea.js.map +0 -1
- package/lib/esm/core-react/inputs/Textarea.d.ts +0 -23
- package/lib/esm/core-react/inputs/Textarea.d.ts.map +0 -1
- package/lib/esm/core-react/inputs/Textarea.js +0 -33
- package/lib/esm/core-react/inputs/Textarea.js.map +0 -1
- package/lib/esm/core-react/inputs/labeled-input.scss +0 -103
- package/lib/esm/core-react/inputs/labeled-textarea.scss +0 -77
- package/lib/esm/core-react/inputs/textarea.scss +0 -55
- package/lib/esm/core-react/loading/Spinner.d.ts +0 -38
- package/lib/esm/core-react/loading/Spinner.d.ts.map +0 -1
- package/lib/esm/core-react/loading/Spinner.js +0 -57
- package/lib/esm/core-react/loading/Spinner.js.map +0 -1
- package/lib/esm/core-react/loading/Spinner.scss +0 -26
- package/lib/esm/core-react/messagebox/MessageSeverity.d.ts +0 -16
- package/lib/esm/core-react/messagebox/MessageSeverity.d.ts.map +0 -1
- package/lib/esm/core-react/messagebox/MessageSeverity.js +0 -21
- package/lib/esm/core-react/messagebox/MessageSeverity.js.map +0 -1
- package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +0 -29
- package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +0 -1
- package/lib/esm/core-react/progress-indicators/ProgressBar.js +0 -44
- package/lib/esm/core-react/progress-indicators/ProgressBar.js.map +0 -1
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +0 -49
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +0 -1
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.js +0 -70
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.js.map +0 -1
- package/lib/esm/core-react/progress-indicators/classes.scss +0 -33
- package/lib/esm/core-react/progress-indicators/index.scss +0 -6
- package/lib/esm/core-react/progress-indicators/progress-bar.scss +0 -91
- package/lib/esm/core-react/progress-indicators/progress-spinner.scss +0 -132
- package/lib/esm/core-react/radio/Radio.d.ts +0 -20
- package/lib/esm/core-react/radio/Radio.d.ts.map +0 -1
- package/lib/esm/core-react/radio/Radio.js +0 -24
- package/lib/esm/core-react/radio/Radio.js.map +0 -1
- package/lib/esm/core-react/radio/classes.scss +0 -7
- package/lib/esm/core-react/radio/index.scss +0 -8
- package/lib/esm/core-react/radio/radio.scss +0 -89
- package/lib/esm/core-react/select/LabeledSelect.d.ts +0 -20
- package/lib/esm/core-react/select/LabeledSelect.d.ts.map +0 -1
- package/lib/esm/core-react/select/LabeledSelect.js +0 -30
- package/lib/esm/core-react/select/LabeledSelect.js.map +0 -1
- package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +0 -16
- package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +0 -1
- package/lib/esm/core-react/select/LabeledThemedSelect.js +0 -27
- package/lib/esm/core-react/select/LabeledThemedSelect.js.map +0 -1
- package/lib/esm/core-react/select/Select.d.ts +0 -53
- package/lib/esm/core-react/select/Select.d.ts.map +0 -1
- package/lib/esm/core-react/select/Select.js +0 -57
- package/lib/esm/core-react/select/Select.js.map +0 -1
- package/lib/esm/core-react/select/ThemedSelect.d.ts +0 -104
- package/lib/esm/core-react/select/ThemedSelect.d.ts.map +0 -1
- package/lib/esm/core-react/select/ThemedSelect.js +0 -53
- package/lib/esm/core-react/select/ThemedSelect.js.map +0 -1
- package/lib/esm/core-react/select/classes.scss +0 -9
- package/lib/esm/core-react/select/index.scss +0 -10
- package/lib/esm/core-react/select/labeled-select.scss +0 -72
- package/lib/esm/core-react/select/labeled-themed-select.scss +0 -77
- package/lib/esm/core-react/select/modalHelper.d.ts +0 -5
- package/lib/esm/core-react/select/modalHelper.d.ts.map +0 -1
- package/lib/esm/core-react/select/modalHelper.js +0 -17
- package/lib/esm/core-react/select/modalHelper.js.map +0 -1
- package/lib/esm/core-react/select/select.scss +0 -74
- package/lib/esm/core-react/select/themed-select.scss +0 -159
- package/lib/esm/core-react/slider/Slider.d.ts +0 -80
- package/lib/esm/core-react/slider/Slider.d.ts.map +0 -1
- package/lib/esm/core-react/slider/Slider.js +0 -87
- package/lib/esm/core-react/slider/Slider.js.map +0 -1
- package/lib/esm/core-react/slider/Slider.scss +0 -96
- package/lib/esm/core-react/splitbutton/SplitButton.d.ts +0 -62
- package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +0 -1
- package/lib/esm/core-react/splitbutton/SplitButton.js +0 -100
- package/lib/esm/core-react/splitbutton/SplitButton.js.map +0 -1
- package/lib/esm/core-react/splitbutton/SplitButton.scss +0 -137
- package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +0 -11
- package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +0 -1
- package/lib/esm/core-react/tabs/HorizontalTabs.js +0 -18
- package/lib/esm/core-react/tabs/HorizontalTabs.js.map +0 -1
- package/lib/esm/core-react/tabs/horizontal.scss +0 -77
- package/lib/esm/core-react/text/Headline.d.ts +0 -11
- package/lib/esm/core-react/text/Headline.d.ts.map +0 -1
- package/lib/esm/core-react/text/Headline.js +0 -17
- package/lib/esm/core-react/text/Headline.js.map +0 -1
- package/lib/esm/core-react/text/LeadingText.d.ts +0 -11
- package/lib/esm/core-react/text/LeadingText.d.ts.map +0 -1
- package/lib/esm/core-react/text/LeadingText.js +0 -17
- package/lib/esm/core-react/text/LeadingText.js.map +0 -1
- package/lib/esm/core-react/text/LeadingText2.d.ts +0 -11
- package/lib/esm/core-react/text/LeadingText2.d.ts.map +0 -1
- package/lib/esm/core-react/text/LeadingText2.js +0 -17
- package/lib/esm/core-react/text/LeadingText2.js.map +0 -1
- package/lib/esm/core-react/text/SmallText.d.ts +0 -11
- package/lib/esm/core-react/text/SmallText.d.ts.map +0 -1
- package/lib/esm/core-react/text/SmallText.js +0 -17
- package/lib/esm/core-react/text/SmallText.js.map +0 -1
- package/lib/esm/core-react/text/Subheading.d.ts +0 -11
- package/lib/esm/core-react/text/Subheading.d.ts.map +0 -1
- package/lib/esm/core-react/text/Subheading.js +0 -17
- package/lib/esm/core-react/text/Subheading.js.map +0 -1
- package/lib/esm/core-react/text/Subheading2.d.ts +0 -11
- package/lib/esm/core-react/text/Subheading2.d.ts.map +0 -1
- package/lib/esm/core-react/text/Subheading2.js +0 -17
- package/lib/esm/core-react/text/Subheading2.js.map +0 -1
- package/lib/esm/core-react/text/Title.d.ts +0 -11
- package/lib/esm/core-react/text/Title.d.ts.map +0 -1
- package/lib/esm/core-react/text/Title.js +0 -17
- package/lib/esm/core-react/text/Title.js.map +0 -1
- package/lib/esm/core-react/text/Title2.d.ts +0 -11
- package/lib/esm/core-react/text/Title2.d.ts.map +0 -1
- package/lib/esm/core-react/text/Title2.js +0 -17
- package/lib/esm/core-react/text/Title2.js.map +0 -1
- package/lib/esm/core-react/text/headline.scss +0 -10
- package/lib/esm/core-react/text/leading-2.scss +0 -11
- package/lib/esm/core-react/text/leading.scss +0 -10
- package/lib/esm/core-react/text/small.scss +0 -10
- package/lib/esm/core-react/text/subheading-2.scss +0 -11
- package/lib/esm/core-react/text/subheading.scss +0 -11
- package/lib/esm/core-react/text/title-2.scss +0 -11
- package/lib/esm/core-react/text/title.scss +0 -10
- package/lib/esm/core-react/tiles/FeaturedTile.d.ts +0 -11
- package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +0 -1
- package/lib/esm/core-react/tiles/FeaturedTile.js +0 -17
- package/lib/esm/core-react/tiles/FeaturedTile.js.map +0 -1
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +0 -11
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +0 -1
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.js +0 -17
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.js.map +0 -1
- package/lib/esm/core-react/tiles/MinimalTile.d.ts +0 -11
- package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +0 -1
- package/lib/esm/core-react/tiles/MinimalTile.js +0 -17
- package/lib/esm/core-react/tiles/MinimalTile.js.map +0 -1
- package/lib/esm/core-react/tiles/Tile.d.ts +0 -32
- package/lib/esm/core-react/tiles/Tile.d.ts.map +0 -1
- package/lib/esm/core-react/tiles/Tile.js +0 -36
- package/lib/esm/core-react/tiles/Tile.js.map +0 -1
- package/lib/esm/core-react/tiles/classes.scss +0 -7
- package/lib/esm/core-react/tiles/index.scss +0 -5
- package/lib/esm/core-react/tiles/tile.scss +0 -134
- package/lib/esm/core-react/toggle/LabeledToggle.d.ts +0 -26
- package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +0 -1
- package/lib/esm/core-react/toggle/LabeledToggle.js +0 -25
- package/lib/esm/core-react/toggle/LabeledToggle.js.map +0 -1
- package/lib/esm/core-react/toggle/LabeledToggle.scss +0 -21
- package/lib/esm/core-react/toggle/Toggle.d.ts +0 -52
- package/lib/esm/core-react/toggle/Toggle.d.ts.map +0 -1
- package/lib/esm/core-react/toggle/Toggle.js +0 -102
- package/lib/esm/core-react/toggle/Toggle.js.map +0 -1
- package/lib/esm/core-react/toggle/Toggle.scss +0 -135
- package/lib/esm/core-react/tooltip/Tooltip.d.ts +0 -34
- package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +0 -1
- package/lib/esm/core-react/tooltip/Tooltip.js +0 -52
- package/lib/esm/core-react/tooltip/Tooltip.js.map +0 -1
- package/lib/esm/core-react/tooltip/Tooltip.scss +0 -18
- package/lib/esm/core-react/utils/PointProps.d.ts +0 -12
- package/lib/esm/core-react/utils/PointProps.d.ts.map +0 -1
- package/lib/esm/core-react/utils/PointProps.js +0 -9
- package/lib/esm/core-react/utils/PointProps.js.map +0 -1
- package/lib/esm/core-react/utils/UiEvent.d.ts +0 -10
- package/lib/esm/core-react/utils/UiEvent.d.ts.map +0 -1
- package/lib/esm/core-react/utils/UiEvent.js +0 -14
- package/lib/esm/core-react/utils/UiEvent.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadialMenu.js","sourceRoot":"","sources":["../../../../src/core-react/radialmenu/RadialMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiCnD;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA2C;IAa/E,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;QAbP,UAAK,GAA0B,IAAI,CAAC;QACpC,oBAAe,GAAwB,IAAI,CAAC;QAMpD,gBAAgB;QACS,UAAK,GAA8B;YAC1D,OAAO,EAAE,EAAE;SACZ,CAAC;QA+EM,iBAAY,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC9C,IAAI,KAAK,CAAC,GAAG,KAAK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E,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,6BAA6B;gBAC9H,gCAAS,EAAE,KAAK,EAAE,8BAA8B,EAAE,EAAE,SAAS,EAAE,mCAAmC;oBAChG,6BAAK,SAAS,EAAC,8BAA8B;wBAC3C,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAI,CAC/B;oBACN,6BAAK,SAAS,EAAE,iCAAiC,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACQ,CACd,CACL,CAAC;IACJ,CAAC;CAsBF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RadialMenu\r\n */\r\n\r\nimport \"./RadialMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\nimport { Point } from \"../utils/Point\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { AnnularSector, Annulus } from \"./Annulus\";\r\n\r\n/** Properties for [[RadialMenu]]\r\n * @public\r\n */\r\nexport interface RadialMenuProps extends CommonProps {\r\n /** Whether to show RadialMenu */\r\n opened: boolean;\r\n /** Radius of inner portion of RadialMenu */\r\n innerRadius: number;\r\n /** Radius of outer portion of RadialMenu */\r\n outerRadius: number;\r\n /** Optional parameter to specify left position in viewport. */\r\n left?: number | string;\r\n /** Optional parameter to specify top position in viewport. */\r\n top?: number | string;\r\n /** Whether to rotate labels according to location on the RadialMenu, or to keep labels upright.\r\n * Default: false\r\n */\r\n labelRotate?: boolean;\r\n /** Which child RadialButton to highlight */\r\n selected?: number;\r\n /** triggered in case of onClick events anywhere other than radial menu */\r\n onBlur?: (event: any) => any;\r\n /** triggered onKeyUp for <Esc> key */\r\n onEsc?: (event: any) => any;\r\n}\r\n\r\n/** @internal */\r\ninterface RadialMenuState {\r\n sectors: AnnularSector[];\r\n}\r\n\r\n/**\r\n * A context menu arranged in a radial layout.\r\n * @public\r\n */\r\nexport class RadialMenu extends React.Component<RadialMenuProps, RadialMenuState> {\r\n private _root: HTMLDivElement | null = null;\r\n private _selectedButton: RadialButton | null = null;\r\n public static defaultProps: Partial<RadialMenuProps> = {\r\n labelRotate: false,\r\n selected: -1,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<RadialMenuState> = {\r\n sectors: [],\r\n };\r\n\r\n constructor(props: RadialMenuProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const width = 2 * (this.props.outerRadius + 1);\r\n let x = this.props.left, y = this.props.top;\r\n\r\n if (this.props.left && this.props.top && typeof this.props.left === \"number\" && typeof this.props.top === \"number\") {\r\n x = this.props.left;\r\n y = this.props.top;\r\n\r\n if (x < 0)\r\n x = 0;\r\n if (x > window.innerWidth - width)\r\n x = window.innerWidth - width;\r\n if (y < 0)\r\n y = 0;\r\n if (y > window.innerHeight - width)\r\n y = window.innerHeight - width;\r\n }\r\n\r\n const divStyle: React.CSSProperties = { left: x, top: y, ...this.props.style };\r\n\r\n return (\r\n <div\r\n ref={(el) => { this._root = el; }}\r\n className={classnames(\"core-radial-menu\", { opened: this.props.opened }, this.props.className)}\r\n style={divStyle}\r\n data-testid=\"core-radial-menu\"\r\n >\r\n <svg\r\n xmlns=\"http://w3.org/2000/svg\" version=\"1.1\"\r\n width={width} height={width}\r\n className={\"core-radial-menu-container\"}>\r\n {React.Children.map(this.props.children, (child, index) => {\r\n // istanbul ignore next\r\n if (!child || typeof child !== \"object\" || !(\"props\" in child))\r\n return child;\r\n\r\n const childElement = (child as React.ReactElement<any>);\r\n return React.cloneElement(childElement, {\r\n key: index,\r\n ref: (el: any) => {\r\n if (this.props.selected === index)\r\n this._selectedButton = el;\r\n },\r\n selected: index === this.props.selected,\r\n labelRotate: childElement.props.labelRotate || this.props.labelRotate,\r\n annularSector: this.state.sectors[index],\r\n });\r\n })}\r\n </svg>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n this._generateAnnularSectors();\r\n\r\n setTimeout(() => {\r\n window.addEventListener(\"keyup\", this._handleKeyUp);\r\n window.addEventListener(\"mouseup\", this._handleClick);\r\n });\r\n }\r\n\r\n public override componentWillUnmount() {\r\n window.removeEventListener(\"keyup\", this._handleKeyUp);\r\n window.removeEventListener(\"mouseup\", this._handleClick);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: RadialMenuProps) {\r\n if (prevProps.innerRadius !== this.props.innerRadius || prevProps.outerRadius !== this.props.outerRadius) {\r\n this._generateAnnularSectors();\r\n }\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.onEsc)\r\n this.props.onEsc(event);\r\n };\r\n\r\n private _handleClick = (event: MouseEvent) => {\r\n if (event.target instanceof HTMLElement && this._root && !event.target.contains(this._root) && this.props.onBlur)\r\n this.props.onBlur(event);\r\n };\r\n\r\n /** Manually call onSelect of highlighted button. */\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this._selectedButton)\r\n this._selectedButton.select();\r\n };\r\n\r\n private _generateAnnularSectors = () => {\r\n const n = React.Children.count(this.props.children);\r\n const angle = 2 * Math.PI / n;\r\n const outer = this.props.outerRadius;\r\n const inner = this.props.innerRadius;\r\n\r\n const offset = - Math.PI / 8;\r\n const annulus = new Annulus(new Point(outer + 1, outer + 1), inner + 1, outer - 1);\r\n const sectors: AnnularSector[] = [];\r\n for (let i = 0; i < n; i++) {\r\n sectors.push(new AnnularSector(annulus, angle * i + offset, angle * (i + 1) + offset));\r\n }\r\n this.setState({ sectors });\r\n };\r\n}\r\n\r\n/** Properties for [[RadialButton]] component\r\n * @public\r\n */\r\nexport interface RadialButtonProps extends CommonProps {\r\n /** Whether label is rotated to radial menu. Default: Inherit */\r\n labelRotate?: boolean;\r\n /** which icon to display in on the menu button */\r\n icon?: IconSpec;\r\n /** @internal */\r\n annularSector?: AnnularSector;\r\n /** listens to any onClick event, or any select event, which can be triggered by the select() method. */\r\n onSelect?: (e: any) => any;\r\n /** Whether item is highlighted */\r\n selected?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface RadialButtonState {\r\n hover: boolean;\r\n}\r\n\r\n/**\r\n * Button for use within a [[RadialMenu]]\r\n * @public\r\n */\r\nexport class RadialButton extends React.Component<RadialButtonProps, RadialButtonState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<RadialButtonState> = { hover: this.props.selected || false };\r\n\r\n constructor(props: RadialButtonProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const sector = this.props.annularSector;\r\n let p = new Point();\r\n let size = 0;\r\n let t = \"\";\r\n let path = \"\";\r\n\r\n if (sector) {\r\n size = sector.start.p1.getDistanceTo(sector.end.p2) * 2;\r\n path = sector.path;\r\n\r\n const parent = sector.parent;\r\n const { x: cx, y: cy } = parent.center;\r\n const r = (parent.inner.radius + parent.outer.radius) / 2;\r\n const angle = (sector.startAngle + sector.endAngle) / 2;\r\n p = new Point(cx + r * Math.cos(angle), cy + r * Math.sin(angle));\r\n\r\n if (this.props.labelRotate) {\r\n let a = angle * 180 / Math.PI + 90;\r\n while (a > 180)\r\n a -= 360;\r\n while (a < -180)\r\n /* istanbul ignore next */\r\n a += 360;\r\n if (a > 90)\r\n a -= 180;\r\n if (a < -90)\r\n a += 180;\r\n t = `rotate(${a} ${p.x}, ${p.y})`;\r\n }\r\n }\r\n\r\n return (\r\n <g\r\n onMouseOver={this._handleMouseOver}\r\n onMouseOut={this._handleMouseOut}\r\n onClick={this._handleClick}>\r\n <path\r\n className={classnames(\"core-radial-menu-sector\", { selected: this.state.hover }, this.props.className)}\r\n style={this.props.style}\r\n d={path}>\r\n </path>\r\n <foreignObject transform={t} x={p.x - size / 2} y={p.y - 16} width={size} height={size} className={\"core-radial-menu-button-svg\"}>\r\n <div {...{ xmlns: \"http://www.w3.org/1999/xhtml\" }} className={\"core-radial-menu-button-container\"}>\r\n <div className=\"core-radial-menu-button-icon\">\r\n <Icon iconSpec={this.props.icon} />\r\n </div>\r\n <div className={\"core-radial-menu-button-content\"}>\r\n {this.props.children}\r\n </div>\r\n </div>\r\n </foreignObject>\r\n </g>\r\n );\r\n }\r\n\r\n /** Manually call this.props.onSelect */\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this.props.onSelect)\r\n this.props.onSelect(undefined);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<SVGElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<SVGElement>) => {\r\n this.setState({ hover: true });\r\n };\r\n\r\n private _handleMouseOut = (_event: React.MouseEvent<SVGElement>) => {\r\n this.setState({ hover: false });\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"RadialMenu.js","sourceRoot":"","sources":["../../../../src/core-react/radialmenu/RadialMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCnD;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA2C;IAa/E,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;QAbP,UAAK,GAA0B,IAAI,CAAC;QACpC,oBAAe,GAAwB,I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AAI,GACF;YACP,uCAAe,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,6BAA6B;gBAC9H,gCAAS,EAAE,KAAK,EAAE,8BAA8B,EAAE,EAAE,SAAS,EAAE,mCAAmC;oBAChG,6BAAK,SAAS,EAAC,8BAA8B;wBAC3C,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAI,CAC/B;oBACN,6BAAK,SAAS,EAAE,iCAAiC,IAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAChB,CACF,CACQ,CACd,CACL,CAAC;IACJ,CAAC;CAsBF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RadialMenu\r\n */\r\n\r\nimport \"./RadialMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\nimport { Point } from \"../utils/Point\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { AnnularSector, Annulus } from \"./Annulus\";\r\n\r\n/** Properties for [[RadialMenu]]\r\n * @public\r\n */\r\nexport interface RadialMenuProps extends CommonProps {\r\n /** Whether to show RadialMenu */\r\n opened: boolean;\r\n /** Radius of inner portion of RadialMenu */\r\n innerRadius: number;\r\n /** Radius of outer portion of RadialMenu */\r\n outerRadius: number;\r\n /** Optional parameter to specify left position in viewport. */\r\n left?: number | string;\r\n /** Optional parameter to specify top position in viewport. */\r\n top?: number | string;\r\n /** Whether to rotate labels according to location on the RadialMenu, or to keep labels upright.\r\n * Default: false\r\n */\r\n labelRotate?: boolean;\r\n /** Which child RadialButton to highlight */\r\n selected?: number;\r\n /** triggered in case of onClick events anywhere other than radial menu */\r\n onBlur?: (event: any) => any;\r\n /** triggered onKeyUp for <Esc> key */\r\n onEsc?: (event: any) => any;\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface RadialMenuState {\r\n sectors: AnnularSector[];\r\n}\r\n\r\n/**\r\n * A context menu arranged in a radial layout.\r\n * @public\r\n */\r\nexport class RadialMenu extends React.Component<RadialMenuProps, RadialMenuState> {\r\n private _root: HTMLDivElement | null = null;\r\n private _selectedButton: RadialButton | null = null;\r\n public static defaultProps: Partial<RadialMenuProps> = {\r\n labelRotate: false,\r\n selected: -1,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<RadialMenuState> = {\r\n sectors: [],\r\n };\r\n\r\n constructor(props: RadialMenuProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const width = 2 * (this.props.outerRadius + 1);\r\n let x = this.props.left, y = this.props.top;\r\n\r\n if (this.props.left && this.props.top && typeof this.props.left === \"number\" && typeof this.props.top === \"number\") {\r\n x = this.props.left;\r\n y = this.props.top;\r\n\r\n if (x < 0)\r\n x = 0;\r\n if (x > window.innerWidth - width)\r\n x = window.innerWidth - width;\r\n if (y < 0)\r\n y = 0;\r\n if (y > window.innerHeight - width)\r\n y = window.innerHeight - width;\r\n }\r\n\r\n const divStyle: React.CSSProperties = { left: x, top: y, ...this.props.style };\r\n\r\n return (\r\n <div\r\n ref={(el) => { this._root = el; }}\r\n className={classnames(\"core-radial-menu\", { opened: this.props.opened }, this.props.className)}\r\n style={divStyle}\r\n data-testid=\"core-radial-menu\"\r\n >\r\n <svg\r\n xmlns=\"http://w3.org/2000/svg\" version=\"1.1\"\r\n width={width} height={width}\r\n className={\"core-radial-menu-container\"}>\r\n {React.Children.map(this.props.children, (child, index) => {\r\n // istanbul ignore next\r\n if (!child || typeof child !== \"object\" || !(\"props\" in child))\r\n return child;\r\n\r\n const childElement = (child as React.ReactElement<any>);\r\n return React.cloneElement(childElement, {\r\n key: index,\r\n ref: (el: any) => {\r\n if (this.props.selected === index)\r\n this._selectedButton = el;\r\n },\r\n selected: index === this.props.selected,\r\n labelRotate: childElement.props.labelRotate || this.props.labelRotate,\r\n annularSector: this.state.sectors[index],\r\n });\r\n })}\r\n </svg>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n this._generateAnnularSectors();\r\n\r\n setTimeout(() => {\r\n window.addEventListener(\"keyup\", this._handleKeyUp);\r\n window.addEventListener(\"mouseup\", this._handleClick);\r\n });\r\n }\r\n\r\n public override componentWillUnmount() {\r\n window.removeEventListener(\"keyup\", this._handleKeyUp);\r\n window.removeEventListener(\"mouseup\", this._handleClick);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: RadialMenuProps) {\r\n if (prevProps.innerRadius !== this.props.innerRadius || prevProps.outerRadius !== this.props.outerRadius) {\r\n this._generateAnnularSectors();\r\n }\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.onEsc)\r\n this.props.onEsc(event);\r\n };\r\n\r\n private _handleClick = (event: MouseEvent) => {\r\n if (event.target instanceof HTMLElement && this._root && !event.target.contains(this._root) && this.props.onBlur)\r\n this.props.onBlur(event);\r\n };\r\n\r\n /** Manually call onSelect of highlighted button. */\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this._selectedButton)\r\n this._selectedButton.select();\r\n };\r\n\r\n private _generateAnnularSectors = () => {\r\n const n = React.Children.count(this.props.children);\r\n const angle = 2 * Math.PI / n;\r\n const outer = this.props.outerRadius;\r\n const inner = this.props.innerRadius;\r\n\r\n const offset = - Math.PI / 8;\r\n const annulus = new Annulus(new Point(outer + 1, outer + 1), inner + 1, outer - 1);\r\n const sectors: AnnularSector[] = [];\r\n for (let i = 0; i < n; i++) {\r\n sectors.push(new AnnularSector(annulus, angle * i + offset, angle * (i + 1) + offset));\r\n }\r\n this.setState({ sectors });\r\n };\r\n}\r\n\r\n/** Properties for [[RadialButton]] component\r\n * @public\r\n */\r\nexport interface RadialButtonProps extends CommonProps {\r\n /** Whether label is rotated to radial menu. Default: Inherit */\r\n labelRotate?: boolean;\r\n /** which icon to display in on the menu button */\r\n icon?: IconSpec;\r\n /** @internal */\r\n annularSector?: AnnularSector;\r\n /** listens to any onClick event, or any select event, which can be triggered by the select() method. */\r\n onSelect?: (e: any) => any;\r\n /** Whether item is highlighted */\r\n selected?: boolean;\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\ninterface RadialButtonState {\r\n hover: boolean;\r\n}\r\n\r\n/**\r\n * Button for use within a [[RadialMenu]]\r\n * @public\r\n */\r\nexport class RadialButton extends React.Component<RadialButtonProps, RadialButtonState> {\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<RadialButtonState> = { hover: this.props.selected || false };\r\n\r\n constructor(props: RadialButtonProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const sector = this.props.annularSector;\r\n let p = new Point();\r\n let size = 0;\r\n let t = \"\";\r\n let path = \"\";\r\n\r\n if (sector) {\r\n size = sector.start.p1.getDistanceTo(sector.end.p2) * 2;\r\n path = sector.path;\r\n\r\n const parent = sector.parent;\r\n const { x: cx, y: cy } = parent.center;\r\n const r = (parent.inner.radius + parent.outer.radius) / 2;\r\n const angle = (sector.startAngle + sector.endAngle) / 2;\r\n p = new Point(cx + r * Math.cos(angle), cy + r * Math.sin(angle));\r\n\r\n if (this.props.labelRotate) {\r\n let a = angle * 180 / Math.PI + 90;\r\n while (a > 180)\r\n a -= 360;\r\n while (a < -180)\r\n /* istanbul ignore next */\r\n a += 360;\r\n if (a > 90)\r\n a -= 180;\r\n if (a < -90)\r\n a += 180;\r\n t = `rotate(${a} ${p.x}, ${p.y})`;\r\n }\r\n }\r\n\r\n return (\r\n <g\r\n onMouseOver={this._handleMouseOver}\r\n onMouseOut={this._handleMouseOut}\r\n onClick={this._handleClick}>\r\n <path\r\n className={classnames(\"core-radial-menu-sector\", { selected: this.state.hover }, this.props.className)}\r\n style={this.props.style}\r\n d={path}>\r\n </path>\r\n <foreignObject transform={t} x={p.x - size / 2} y={p.y - 16} width={size} height={size} className={\"core-radial-menu-button-svg\"}>\r\n <div {...{ xmlns: \"http://www.w3.org/1999/xhtml\" }} className={\"core-radial-menu-button-container\"}>\r\n <div className=\"core-radial-menu-button-icon\">\r\n <Icon iconSpec={this.props.icon} />\r\n </div>\r\n <div className={\"core-radial-menu-button-content\"}>\r\n {this.props.children}\r\n </div>\r\n </div>\r\n </foreignObject>\r\n </g>\r\n );\r\n }\r\n\r\n /** Manually call this.props.onSelect */\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this.props.onSelect)\r\n this.props.onSelect(undefined);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<SVGElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<SVGElement>) => {\r\n this.setState({ hover: true });\r\n };\r\n\r\n private _handleMouseOut = (_event: React.MouseEvent<SVGElement>) => {\r\n this.setState({ hover: false });\r\n };\r\n}\r\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
@import "../z-index";
|
|
6
6
|
@import "../style/themecolors";
|
|
7
7
|
@import "../icons/variables";
|
|
8
|
-
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
9
8
|
|
|
10
9
|
.core-radial-menu {
|
|
11
10
|
visibility: hidden;
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
.core-radial-menu-button-content {
|
|
48
47
|
cursor: default;
|
|
49
48
|
color: $buic-text-color;
|
|
50
|
-
font-size:
|
|
49
|
+
font-size: var(--iui-font-size-0);
|
|
51
50
|
user-select: none;
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
@import "../style/themecolors";
|
|
6
6
|
@import "../style/variables";
|
|
7
7
|
@import "~@itwin/itwinui-css/scss/inputs/input";
|
|
8
|
-
@import "~@itwin/itwinui-css/scss/style/space";
|
|
9
8
|
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
10
9
|
|
|
11
10
|
.core-searchbox {
|
|
@@ -16,13 +15,13 @@
|
|
|
16
15
|
//default values (height, width, font-size, color)
|
|
17
16
|
height: $uicore-component-height-normal;
|
|
18
17
|
width: 12em;
|
|
19
|
-
font-size:
|
|
18
|
+
font-size: var(--iui-font-size-1);
|
|
20
19
|
color: $buic-text-color;
|
|
21
20
|
|
|
22
21
|
input {
|
|
23
22
|
@include iui-input;
|
|
24
23
|
min-height: $uicore-component-height-normal;
|
|
25
|
-
padding:
|
|
24
|
+
padding: var(--iui-size-3xs) 2em var(--iui-size-3xs) 12px; //12px from design guide
|
|
26
25
|
height: 100%;
|
|
27
26
|
margin: 0;
|
|
28
27
|
color: inherit;
|
|
@@ -48,6 +47,5 @@
|
|
|
48
47
|
&:focus {
|
|
49
48
|
outline: none;
|
|
50
49
|
}
|
|
51
|
-
|
|
52
50
|
}
|
|
53
51
|
}
|
|
@@ -14,7 +14,7 @@ import { ConditionalBooleanValue } from "@itwin/appui-abstract";
|
|
|
14
14
|
const saveChanges = React.useCallback((afterSaveFunction: (args: any) => void, args?: any) => {
|
|
15
15
|
if (dataIsDirty) {
|
|
16
16
|
// prompt user to save changes passing in function and arguments to call after saving changes.
|
|
17
|
-
|
|
17
|
+
UiFramework.dialogs.modal.openDialog(<CustomSavePromptModalDialog customProps={customProps}
|
|
18
18
|
onDialogCloseArgs={args} onDialogClose={afterSaveFunction} />);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsContainer.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsContainer.tsx"],"names":[],"mappings":"AAAA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AAO,CAAC,QAAQ,IAAI,8BAAM,SAAS,EAAC,yCAAyC,IAAE,OAAO,CAAC,QAAQ,CAAQ,CACpG;YACN,6BAAK,SAAS,EAAC,wCAAwC,IACpD,OAAO,CAAC,IAAI,CACT,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Settings\r\n */\r\n\r\nimport \"./SettingsContainer.scss\";\r\nimport * as React from \"react\";\r\nimport { ActivateSettingsTabEventArgs, ProcessSettingsContainerCloseEventArgs, ProcessSettingsTabActivationEventArgs, SettingsManager, SettingsTabEntry } from \"./SettingsManager\";\r\nimport { VerticalTabs } from \"../tabs/VerticalTabs\";\r\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\r\n\r\n/* ---------------------------------------------------------------------------------------------------\r\n// A typical implementation of a saveFunction callback\r\nconst saveChanges = React.useCallback((afterSaveFunction: (args: any) => void, args?: any) => {\r\n if (dataIsDirty) {\r\n // prompt user to save changes passing in function and arguments to call after saving changes.\r\n ModalDialogManager.openDialog(<CustomSavePromptModalDialog customProps={customProps}\r\n onDialogCloseArgs={args} onDialogClose={afterSaveFunction} />);\r\n return;\r\n }\r\n afterSaveFunction(args);\r\n}, []);\r\n---------------------------------------------------------------------------------------------------------- */\r\n\r\n/** Hook to use within Settings Page component to allow saving the current page's data before the Setting Container is closed.\r\n * @public\r\n */\r\nexport function useSaveBeforeClosingSettingsContainer(settingsManager: SettingsManager, saveFunction: (closeFunc: (args: any) => void, closeFuncArgs?: any) => void) {\r\n React.useEffect (()=>{\r\n const handleProcessSettingsContainerClose = ({closeFunc, closeFuncArgs}: ProcessSettingsContainerCloseEventArgs) => {\r\n saveFunction (closeFunc, closeFuncArgs);\r\n };\r\n return settingsManager.onProcessSettingsContainerClose.addListener(handleProcessSettingsContainerClose);\r\n }, [saveFunction, settingsManager]);\r\n}\r\n\r\n/** Hook to use within Settings Page component to allow saving the current page's data before loading to the requested Setting Tab's page.\r\n * @public\r\n */\r\nexport function useSaveBeforeActivatingNewSettingsTab(settingsManager: SettingsManager, saveFunction: (tabSelectionFunc: (args: any) => void, requestedSettingsTabId?: string) => void) {\r\n React.useEffect (()=>{\r\n const handleProcessSettingsTabActivation = ({tabSelectionFunc, requestedSettingsTabId}: ProcessSettingsTabActivationEventArgs) => {\r\n saveFunction (tabSelectionFunc, requestedSettingsTabId);\r\n };\r\n return settingsManager.onProcessSettingsTabActivation.addListener(handleProcessSettingsTabActivation);\r\n }, [saveFunction, settingsManager]);\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SettingsContainerProps {\r\n tabs: SettingsTabEntry[];\r\n // sets tab to set as active tab\r\n currentSettingsTab?: SettingsTabEntry;\r\n // If plugging into a SPA and you need to modify the route, you can pass in additional logic here\r\n onSettingsTabSelected?: (tab: SettingsTabEntry) => void;\r\n // The SettingsManager that can have event handlers registered against it so pages can save its settings before the page is closed.\r\n settingsManager: SettingsManager;\r\n // if true show tab label as header above page contents.\r\n showHeader?: boolean;\r\n}\r\n\r\n/**\r\n * SettingsContainer component that displays Setting Tabs on Left and the P\r\n * Note: that SettingsContainer is not rendered if tabs array is empty\r\n * @public\r\n */\r\nexport const SettingsContainer = ({tabs, onSettingsTabSelected, currentSettingsTab, settingsManager, showHeader}: SettingsContainerProps) => {\r\n // sort the tabs based on itemPriority\r\n tabs = tabs.sort((a, b)=> a.itemPriority - b.itemPriority);\r\n\r\n const [openTab, setOpenTab] = React.useState(()=>{\r\n if (currentSettingsTab && !ConditionalBooleanValue.getValue(currentSettingsTab.isDisabled))\r\n return currentSettingsTab;\r\n else\r\n return tabs[0];\r\n });\r\n\r\n const processTabSelection = React.useCallback((tab: SettingsTabEntry) => {\r\n if (ConditionalBooleanValue.getValue(tab.isDisabled))\r\n return;\r\n onSettingsTabSelected && onSettingsTabSelected(tab);\r\n setOpenTab(tab);\r\n }, [onSettingsTabSelected]);\r\n\r\n const processTabSelectionById = React.useCallback((tabId: string) => {\r\n const tabToActivate = tabs.find((tab)=>tab.tabId === tabId);\r\n tabToActivate && processTabSelection (tabToActivate);\r\n }, [processTabSelection, tabs]);\r\n\r\n const onActivateTab = React.useCallback((tabIndex: number) => {\r\n const selectedTab = tabs[tabIndex];\r\n if (openTab && openTab.pageWillHandleCloseRequest)\r\n settingsManager.onProcessSettingsTabActivation.emit({ requestedSettingsTabId:selectedTab.tabId, tabSelectionFunc: processTabSelectionById});\r\n else\r\n processTabSelection(selectedTab);\r\n }, [openTab, processTabSelection, processTabSelectionById, settingsManager, tabs]);\r\n\r\n React.useEffect (()=>{\r\n const handleActivateSettingsTab = ({settingsTabId}: ActivateSettingsTabEventArgs) => {\r\n const idToFind = settingsTabId.toLowerCase();\r\n let tabToActivate = tabs.find((tab)=>tab.tabId.toLowerCase() === idToFind);\r\n if (!tabToActivate)\r\n tabToActivate = tabs.find((tab)=>tab.label.toLowerCase() === idToFind);\r\n // istanbul ignore else\r\n if (tabToActivate) {\r\n if (openTab && openTab.pageWillHandleCloseRequest)\r\n settingsManager.onProcessSettingsTabActivation.emit({ requestedSettingsTabId:tabToActivate.tabId, tabSelectionFunc: processTabSelectionById});\r\n else\r\n processTabSelection(tabToActivate);\r\n }\r\n };\r\n\r\n return settingsManager.onActivateSettingsTab.addListener(handleActivateSettingsTab);\r\n }, [openTab, processTabSelection, processTabSelectionById, settingsManager, settingsManager.onActivateSettingsTab, tabs]);\r\n\r\n React.useEffect (()=>{\r\n const handleSettingsContainerClose = ({closeFunc, closeFuncArgs}: ProcessSettingsContainerCloseEventArgs) => {\r\n if (openTab && openTab.pageWillHandleCloseRequest)\r\n settingsManager.onProcessSettingsContainerClose.emit({ closeFunc, closeFuncArgs });\r\n else\r\n closeFunc(closeFuncArgs);\r\n };\r\n return settingsManager.onCloseSettingsContainer.addListener(handleSettingsContainerClose);\r\n }, [openTab, processTabSelection, settingsManager, settingsManager.onActivateSettingsTab, tabs]);\r\n\r\n const labels=tabs.map((tab)=> {\r\n return {label:tab.label, subLabel: tab.subLabel, icon: tab.icon,\r\n tooltip: tab.tooltip, tabId: tab.tabId, disabled: ConditionalBooleanValue.getValue(tab.isDisabled)};\r\n });\r\n const activeIndex = tabs.findIndex((tab)=>tab.tabId === openTab.tabId);\r\n return (\r\n <div className=\"core-settings-container\">\r\n <div className=\"core-settings-container-left\">\r\n <VerticalTabs labels={labels} activeIndex={activeIndex} onActivateTab={onActivateTab} />\r\n </div>\r\n <div className=\"core-settings-container-right\">\r\n {showHeader && <div className=\"core-settings-container-right-header\">\r\n <span className=\"core-settings-container-main-header\">{openTab.label}</span>\r\n {openTab.subLabel && <span className=\"core-settings-container-main-sub-header\">{openTab.subLabel}</span>}\r\n </div>}\r\n <div className=\"core-settings-container-right-contents\">\r\n {openTab.page}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"SettingsContainer.js","sourceRoot":"","sources":["../../../../src/core-react/settings/SettingsContainer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;;;;;;6GAW6G;AAE7G;;GAEG;AACH,MAAM,UAAU,qCAAqC,CAAC,eAAgC,EAAE,YAA2E;IACjK,KAAK,CAAC,SAAS,CAAE,GAAE,EAAE;QACnB,MAAM,mCAAmC,GAAG,CAAC,EAAC,SAAS,EAAE,aAAa,EAAyC,EAAE,EAAE;YACjH,YAAY,CAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC1C,CAAC,CAAC;QACF,OAAO,eAAe,CAAC,+B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AK,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI;YAC7D,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAC,CAAC;IACxG,CAAC,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAC,EAAE,CAAA,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CACL,6BAAK,SAAS,EAAC,yBAAyB;QACtC,6BAAK,SAAS,EAAC,8BAA8B;YAC3C,oBAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,GAAI,CACpF;QACN,6BAAK,SAAS,EAAC,+BAA+B;YAC3C,UAAU,IAAI,6BAAK,SAAS,EAAC,sCAAsC;gBAClE,8BAAM,SAAS,EAAC,qCAAqC,IAAE,OAAO,CAAC,KAAK,CAAQ;gBAC3E,OAAO,CAAC,QAAQ,IAAI,8BAAM,SAAS,EAAC,yCAAyC,IAAE,OAAO,CAAC,QAAQ,CAAQ,CACpG;YACN,6BAAK,SAAS,EAAC,wCAAwC,IACpD,OAAO,CAAC,IAAI,CACT,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Settings\r\n */\r\n\r\nimport \"./SettingsContainer.scss\";\r\nimport * as React from \"react\";\r\nimport { ActivateSettingsTabEventArgs, ProcessSettingsContainerCloseEventArgs, ProcessSettingsTabActivationEventArgs, SettingsManager, SettingsTabEntry } from \"./SettingsManager\";\r\nimport { VerticalTabs } from \"../tabs/VerticalTabs\";\r\nimport { ConditionalBooleanValue } from \"@itwin/appui-abstract\";\r\n\r\n/* ---------------------------------------------------------------------------------------------------\r\n// A typical implementation of a saveFunction callback\r\nconst saveChanges = React.useCallback((afterSaveFunction: (args: any) => void, args?: any) => {\r\n if (dataIsDirty) {\r\n // prompt user to save changes passing in function and arguments to call after saving changes.\r\n UiFramework.dialogs.modal.openDialog(<CustomSavePromptModalDialog customProps={customProps}\r\n onDialogCloseArgs={args} onDialogClose={afterSaveFunction} />);\r\n return;\r\n }\r\n afterSaveFunction(args);\r\n}, []);\r\n---------------------------------------------------------------------------------------------------------- */\r\n\r\n/** Hook to use within Settings Page component to allow saving the current page's data before the Setting Container is closed.\r\n * @public\r\n */\r\nexport function useSaveBeforeClosingSettingsContainer(settingsManager: SettingsManager, saveFunction: (closeFunc: (args: any) => void, closeFuncArgs?: any) => void) {\r\n React.useEffect (()=>{\r\n const handleProcessSettingsContainerClose = ({closeFunc, closeFuncArgs}: ProcessSettingsContainerCloseEventArgs) => {\r\n saveFunction (closeFunc, closeFuncArgs);\r\n };\r\n return settingsManager.onProcessSettingsContainerClose.addListener(handleProcessSettingsContainerClose);\r\n }, [saveFunction, settingsManager]);\r\n}\r\n\r\n/** Hook to use within Settings Page component to allow saving the current page's data before loading to the requested Setting Tab's page.\r\n * @public\r\n */\r\nexport function useSaveBeforeActivatingNewSettingsTab(settingsManager: SettingsManager, saveFunction: (tabSelectionFunc: (args: any) => void, requestedSettingsTabId?: string) => void) {\r\n React.useEffect (()=>{\r\n const handleProcessSettingsTabActivation = ({tabSelectionFunc, requestedSettingsTabId}: ProcessSettingsTabActivationEventArgs) => {\r\n saveFunction (tabSelectionFunc, requestedSettingsTabId);\r\n };\r\n return settingsManager.onProcessSettingsTabActivation.addListener(handleProcessSettingsTabActivation);\r\n }, [saveFunction, settingsManager]);\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport interface SettingsContainerProps {\r\n tabs: SettingsTabEntry[];\r\n // sets tab to set as active tab\r\n currentSettingsTab?: SettingsTabEntry;\r\n // If plugging into a SPA and you need to modify the route, you can pass in additional logic here\r\n onSettingsTabSelected?: (tab: SettingsTabEntry) => void;\r\n // The SettingsManager that can have event handlers registered against it so pages can save its settings before the page is closed.\r\n settingsManager: SettingsManager;\r\n // if true show tab label as header above page contents.\r\n showHeader?: boolean;\r\n}\r\n\r\n/**\r\n * SettingsContainer component that displays Setting Tabs on Left and the P\r\n * Note: that SettingsContainer is not rendered if tabs array is empty\r\n * @public\r\n */\r\nexport const SettingsContainer = ({tabs, onSettingsTabSelected, currentSettingsTab, settingsManager, showHeader}: SettingsContainerProps) => {\r\n // sort the tabs based on itemPriority\r\n tabs = tabs.sort((a, b)=> a.itemPriority - b.itemPriority);\r\n\r\n const [openTab, setOpenTab] = React.useState(()=>{\r\n if (currentSettingsTab && !ConditionalBooleanValue.getValue(currentSettingsTab.isDisabled))\r\n return currentSettingsTab;\r\n else\r\n return tabs[0];\r\n });\r\n\r\n const processTabSelection = React.useCallback((tab: SettingsTabEntry) => {\r\n if (ConditionalBooleanValue.getValue(tab.isDisabled))\r\n return;\r\n onSettingsTabSelected && onSettingsTabSelected(tab);\r\n setOpenTab(tab);\r\n }, [onSettingsTabSelected]);\r\n\r\n const processTabSelectionById = React.useCallback((tabId: string) => {\r\n const tabToActivate = tabs.find((tab)=>tab.tabId === tabId);\r\n tabToActivate && processTabSelection (tabToActivate);\r\n }, [processTabSelection, tabs]);\r\n\r\n const onActivateTab = React.useCallback((tabIndex: number) => {\r\n const selectedTab = tabs[tabIndex];\r\n if (openTab && openTab.pageWillHandleCloseRequest)\r\n settingsManager.onProcessSettingsTabActivation.emit({ requestedSettingsTabId:selectedTab.tabId, tabSelectionFunc: processTabSelectionById});\r\n else\r\n processTabSelection(selectedTab);\r\n }, [openTab, processTabSelection, processTabSelectionById, settingsManager, tabs]);\r\n\r\n React.useEffect (()=>{\r\n const handleActivateSettingsTab = ({settingsTabId}: ActivateSettingsTabEventArgs) => {\r\n const idToFind = settingsTabId.toLowerCase();\r\n let tabToActivate = tabs.find((tab)=>tab.tabId.toLowerCase() === idToFind);\r\n if (!tabToActivate)\r\n tabToActivate = tabs.find((tab)=>tab.label.toLowerCase() === idToFind);\r\n // istanbul ignore else\r\n if (tabToActivate) {\r\n if (openTab && openTab.pageWillHandleCloseRequest)\r\n settingsManager.onProcessSettingsTabActivation.emit({ requestedSettingsTabId:tabToActivate.tabId, tabSelectionFunc: processTabSelectionById});\r\n else\r\n processTabSelection(tabToActivate);\r\n }\r\n };\r\n\r\n return settingsManager.onActivateSettingsTab.addListener(handleActivateSettingsTab);\r\n }, [openTab, processTabSelection, processTabSelectionById, settingsManager, settingsManager.onActivateSettingsTab, tabs]);\r\n\r\n React.useEffect (()=>{\r\n const handleSettingsContainerClose = ({closeFunc, closeFuncArgs}: ProcessSettingsContainerCloseEventArgs) => {\r\n if (openTab && openTab.pageWillHandleCloseRequest)\r\n settingsManager.onProcessSettingsContainerClose.emit({ closeFunc, closeFuncArgs });\r\n else\r\n closeFunc(closeFuncArgs);\r\n };\r\n return settingsManager.onCloseSettingsContainer.addListener(handleSettingsContainerClose);\r\n }, [openTab, processTabSelection, settingsManager, settingsManager.onActivateSettingsTab, tabs]);\r\n\r\n const labels=tabs.map((tab)=> {\r\n return {label:tab.label, subLabel: tab.subLabel, icon: tab.icon,\r\n tooltip: tab.tooltip, tabId: tab.tabId, disabled: ConditionalBooleanValue.getValue(tab.isDisabled)};\r\n });\r\n const activeIndex = tabs.findIndex((tab)=>tab.tabId === openTab.tabId);\r\n return (\r\n <div className=\"core-settings-container\">\r\n <div className=\"core-settings-container-left\">\r\n <VerticalTabs labels={labels} activeIndex={activeIndex} onActivateTab={onActivateTab} />\r\n </div>\r\n <div className=\"core-settings-container-right\">\r\n {showHeader && <div className=\"core-settings-container-right-header\">\r\n <span className=\"core-settings-container-main-header\">{openTab.label}</span>\r\n {openTab.subLabel && <span className=\"core-settings-container-main-sub-header\">{openTab.subLabel}</span>}\r\n </div>}\r\n <div className=\"core-settings-container-right-contents\">\r\n {openTab.page}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n"]}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
@import "../style/themecolors";
|
|
7
|
-
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
8
7
|
|
|
9
8
|
div.core-settings-container {
|
|
10
9
|
display: flex;
|
|
@@ -12,7 +11,9 @@ div.core-settings-container {
|
|
|
12
11
|
height: 100%;
|
|
13
12
|
width: 100%;
|
|
14
13
|
|
|
15
|
-
*,
|
|
14
|
+
*,
|
|
15
|
+
*:before,
|
|
16
|
+
*:after {
|
|
16
17
|
box-sizing: inherit;
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -20,7 +21,7 @@ div.core-settings-container {
|
|
|
20
21
|
min-width: 15em;
|
|
21
22
|
height: 100%;
|
|
22
23
|
overflow: auto;
|
|
23
|
-
|
|
24
|
+
> .uicore-tabs-vertical {
|
|
24
25
|
font-size: 16px;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -36,9 +37,9 @@ div.core-settings-container {
|
|
|
36
37
|
.core-settings-container-right-header {
|
|
37
38
|
display: flex;
|
|
38
39
|
width: 100%;
|
|
39
|
-
height: (
|
|
40
|
-
font-size:
|
|
41
|
-
font-weight:
|
|
40
|
+
height: calc(var(--iui-font-size-4) * 2);
|
|
41
|
+
font-size: var(--iui-font-size-4);
|
|
42
|
+
font-weight: var(--iui-font-weight-semibold);
|
|
42
43
|
padding-left: 15px;
|
|
43
44
|
align-items: center;
|
|
44
45
|
|
|
@@ -62,4 +63,4 @@ div.core-settings-container {
|
|
|
62
63
|
overflow: auto;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
}
|
|
66
|
+
}
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
5
|
+
$uicore-baseline: var(--iui-size-s);
|
|
6
|
+
$uicore-line-height: var(--iui-size-l); /// 22px; /// ~1.618;
|
|
6
7
|
|
|
7
|
-
$uicore-
|
|
8
|
-
$uicore-
|
|
9
|
-
|
|
10
|
-
$uicore-
|
|
11
|
-
$uicore-bordered-padding-large: $uicore-baseline * 2 - 1px;
|
|
12
|
-
$uicore-unbordered-padding: $uicore-baseline;
|
|
13
|
-
$uicore-unbordered-padding-large: $uicore-baseline * 2;
|
|
8
|
+
$uicore-bordered-padding: calc(var(--iui-size-s) - 1px);
|
|
9
|
+
$uicore-bordered-padding-large: calc(var(--iui-size-s) * 2 - 1px);
|
|
10
|
+
$uicore-unbordered-padding: var(--iui-size-s);
|
|
11
|
+
$uicore-unbordered-padding-large: calc(var(--iui-size-s) * 2);
|
|
@@ -2,22 +2,19 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/style/color";
|
|
6
|
-
|
|
7
|
-
// @warn "data-viz.scss is deprecated. Use '~@itwin/itwinui-css/scss/style/colors' instead.";
|
|
8
5
|
|
|
9
6
|
/** iTwin.js Data Visualization Colors */
|
|
10
7
|
|
|
11
|
-
$buic-dataviz-skyblue:
|
|
12
|
-
$buic-dataviz-celery:
|
|
13
|
-
$buic-dataviz-froly:
|
|
14
|
-
$buic-dataviz-steelblue:
|
|
15
|
-
$buic-dataviz-sunglow:
|
|
16
|
-
$buic-dataviz-seabuckthorn:
|
|
17
|
-
$buic-dataviz-montecarlo:
|
|
18
|
-
$buic-dataviz-poloblue:
|
|
19
|
-
$buic-dataviz-bouquet:
|
|
20
|
-
$buic-dataviz-ash:
|
|
21
|
-
$buic-dataviz-oak:
|
|
8
|
+
$buic-dataviz-skyblue: hsl(204 77% 67%);
|
|
9
|
+
$buic-dataviz-celery: hsl(72 51% 56%);
|
|
10
|
+
$buic-dataviz-froly: hsl(2 90% 70%);
|
|
11
|
+
$buic-dataviz-steelblue: hsl(200 41% 46%);
|
|
12
|
+
$buic-dataviz-sunglow: hsl(42 100% 60%);
|
|
13
|
+
$buic-dataviz-seabuckthorn: hsl(29 92% 61%);
|
|
14
|
+
$buic-dataviz-montecarlo: hsl(176 43% 62%);
|
|
15
|
+
$buic-dataviz-poloblue: hsl(211 44% 67%);
|
|
16
|
+
$buic-dataviz-bouquet: hsl(305 19% 55%);
|
|
17
|
+
$buic-dataviz-ash: hsl(42 15% 75%);
|
|
18
|
+
$buic-dataviz-oak: hsl(27 32% 49%);
|
|
22
19
|
|
|
23
20
|
// cSpell:ignore dataviz froly seabuckthorn montecarlo poloblue
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/style/mixins";
|
|
6
5
|
|
|
7
6
|
@mixin no-link {
|
|
8
7
|
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
5
|
/// Opacity stops:
|
|
7
6
|
|
|
8
|
-
$uicore-opacity-1:
|
|
9
|
-
$uicore-opacity-2:
|
|
10
|
-
$uicore-opacity-3:
|
|
11
|
-
$uicore-opacity-4:
|
|
12
|
-
$uicore-opacity-5:
|
|
13
|
-
$uicore-opacity-6:
|
|
7
|
+
$uicore-opacity-1: var(--iui-opacity-1);
|
|
8
|
+
$uicore-opacity-2: var(--iui-opacity-2);
|
|
9
|
+
$uicore-opacity-3: var(--iui-opacity-3);
|
|
10
|
+
$uicore-opacity-4: var(--iui-opacity-4);
|
|
11
|
+
$uicore-opacity-5: var(--iui-opacity-5);
|
|
12
|
+
$uicore-opacity-6: var(--iui-opacity-6);
|
|
14
13
|
|
|
15
|
-
$uicore-opacity-muted:
|
|
16
|
-
$uicore-opacity-disabled:
|
|
17
|
-
$uicore-opacity-boxshadow:
|
|
14
|
+
$uicore-opacity-muted: $uicore-opacity-3;
|
|
15
|
+
$uicore-opacity-disabled: $uicore-opacity-4;
|
|
16
|
+
$uicore-opacity-boxshadow: $uicore-opacity-4;
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
$uicore-
|
|
10
|
-
$uicore-
|
|
11
|
-
$uicore-
|
|
12
|
-
$uicore-
|
|
13
|
-
$uicore-
|
|
14
|
-
$uicore-l: $iui-l; // 24px
|
|
15
|
-
$uicore-xl: $iui-xl; // 32px
|
|
16
|
-
$uicore-xxl: $iui-xxl; // 64px
|
|
17
|
-
$uicore-3xl: $iui-3xl; // 96px
|
|
5
|
+
$uicore-xxs: var(--iui-size-3xs); // 2px
|
|
6
|
+
$uicore-xs: var(--iui-size-2xs); // 4px
|
|
7
|
+
$uicore-s: var(--iui-size-xs); // 8px
|
|
8
|
+
$uicore-sm: var(--iui-size-s); // 12px
|
|
9
|
+
$uicore-m: var(--iui-size-m); // 16px
|
|
10
|
+
$uicore-l: var(--iui-size-l); // 24px
|
|
11
|
+
$uicore-xl: var(--iui-size-xl); // 32px
|
|
12
|
+
$uicore-xxl: var(--iui-size-2xl); // 64px
|
|
13
|
+
$uicore-3xl: var(--iui-size-3xl); // 96px
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/style/speed";
|
|
6
5
|
|
|
7
6
|
// @warn "speed.scss is deprecated. Use '~@itwin/itwinui-css/scss/style/space' instead.";
|
|
8
7
|
|
|
9
8
|
/// Animation speed:
|
|
10
9
|
|
|
11
|
-
$uicore-speed-fast:
|
|
12
|
-
$uicore-speed:
|
|
13
|
-
$uicore-speed-slow:
|
|
10
|
+
$uicore-speed-fast: var(--iui-duration-1);
|
|
11
|
+
$uicore-speed: var(--iui-duration-2);
|
|
12
|
+
$uicore-speed-slow: var(--iui-duration-3);
|
|
@@ -8,36 +8,37 @@
|
|
|
8
8
|
|
|
9
9
|
/// Constants ------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
$uicore-sans:
|
|
12
|
-
$uicore-monospace:
|
|
13
|
-
|
|
14
|
-
$uicore-font-family:
|
|
15
|
-
|
|
16
|
-
$uicore-font-size:
|
|
17
|
-
$uicore-font-size-small:
|
|
18
|
-
$uicore-font-size-leading:
|
|
19
|
-
$uicore-font-size-subheading:
|
|
20
|
-
$uicore-font-size-title:
|
|
21
|
-
$uicore-font-size-headline:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
$uicore-cap-size
|
|
25
|
-
$uicore-cap-size-
|
|
26
|
-
$uicore-cap-size-
|
|
27
|
-
$uicore-cap-size-
|
|
28
|
-
$uicore-cap-size-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
$uicore-font-weight-
|
|
32
|
-
$uicore-font-weight-
|
|
33
|
-
$uicore-font-weight-
|
|
11
|
+
$uicore-sans: var(--iui-font-sans);
|
|
12
|
+
$uicore-monospace: var(--iui-font-mono);
|
|
13
|
+
|
|
14
|
+
$uicore-font-family: var(--iui-font-sans);
|
|
15
|
+
|
|
16
|
+
$uicore-font-size: var(--iui-font-size-1);
|
|
17
|
+
$uicore-font-size-small: var(--iui-font-size-0);
|
|
18
|
+
$uicore-font-size-leading: var(--iui-font-size-2);
|
|
19
|
+
$uicore-font-size-subheading: var(--iui-font-size-3);
|
|
20
|
+
$uicore-font-size-title: var(--iui-font-size-4);
|
|
21
|
+
$uicore-font-size-headline: var(--iui-font-size-5);
|
|
22
|
+
|
|
23
|
+
//TODO review this cap part
|
|
24
|
+
$uicore-cap-size: var(--iui-font-size-1);
|
|
25
|
+
$uicore-cap-size-small: var(--iui-font-size-0);
|
|
26
|
+
$uicore-cap-size-leading: var(--iui-font-size-2);
|
|
27
|
+
$uicore-cap-size-subheading: var(--iui-font-size-3);
|
|
28
|
+
$uicore-cap-size-title: var(--iui-font-size-4);
|
|
29
|
+
$uicore-cap-size-headline: var(--iui-font-size-5);
|
|
30
|
+
|
|
31
|
+
$uicore-font-weight-light: var(--iui-font-weight-light);
|
|
32
|
+
$uicore-font-weight-normal: var(--iui-font-weight-normal);
|
|
33
|
+
$uicore-font-weight-semibold: var(--iui-font-weight-semibold);
|
|
34
|
+
$uicore-font-weight-bold: var(--iui-font-weight-bold);
|
|
34
35
|
|
|
35
36
|
/// Font loading helpers -------------------------------------------------------
|
|
36
37
|
/// See: https://www.zachleat.com/web/comprehensive-webfonts
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
//TODO review this
|
|
40
|
+
$uicore-font-loaded-class: var(--iui-font-sans);
|
|
39
41
|
|
|
40
42
|
@mixin uicore-font-family {
|
|
41
|
-
|
|
42
43
|
@include iui-font-family;
|
|
43
44
|
}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/style/variables";
|
|
6
5
|
|
|
7
6
|
// @warn "variables.scss is deprecated. Use '~@itwin/itwinui-css/scss/style/variables' instead.";
|
|
8
7
|
|
|
9
|
-
$uicore-border-radius:
|
|
8
|
+
$uicore-border-radius: var(--iui-border-radius-1);
|
|
10
9
|
|
|
11
|
-
$uicore-component-height-small:
|
|
12
|
-
$uicore-component-height-normal:
|
|
13
|
-
$uicore-component-height-large:
|
|
10
|
+
$uicore-component-height-small: 24px;
|
|
11
|
+
$uicore-component-height-normal: 28px;
|
|
12
|
+
$uicore-component-height-large: 32px;
|
|
@@ -17,7 +17,7 @@ export interface TabLabel {
|
|
|
17
17
|
tooltip?: string | JSX.Element;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
}
|
|
20
|
-
/** Properties for the [[
|
|
20
|
+
/** Properties for the [[VerticalTabs]] component
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
23
|
export interface TabsProps extends React.AllHTMLAttributes<HTMLUListElement>, CommonProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/core-react/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAgBjD,SAAS,kBAAkB,CAAC,IAAuB;IACjD,OAAO,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC;AAED,SAAS,UAAU,CAAC,IAAuB;IACzC,OAAO,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC;AACpC,CAAC;AAkCD;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C,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,KAAK,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;;oBACb,6BAAK,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,QAAQ,IAAI,wBAAwB,CAAC;wBACzF,eAAe,IAAI,8BAAM,SAAS,EAAC,kBAAkB,IAAE,IAAI,CAAQ;wBACpE,6BAAK,SAAS,EAAC,sCAAsC;4BACnD,kCAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAQ;4BAC/D,QAAQ,IAAI,8BAAM,SAAS,EAAC,sBAAsB,IAAE,QAAQ,CAAQ,CACjE,CACF,CACJ,CACD,CAAC;QACR,CAAC,CACA,CACE,CACN,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tabs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Orientation } from \"../enums/Orientation\";\r\nimport { ItemKeyboardNavigator } from \"../focus/ItemKeyboardNavigator\";\r\nimport { IconHelper } from \"../utils/IconHelper\";\r\n\r\n/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element\r\n * to support react-tooltip component or a string that will be use to set the title property.\r\n * @public\r\n */\r\nexport interface TabLabel {\r\n label: string;\r\n subLabel?: string;\r\n icon?: string | JSX.Element;\r\n tabId: string; /* optional id added to tab so it can be used by react-tooltip */\r\n /** tooltip allows JSX.Element to support styled tooltips like react-tooltip. */\r\n tooltip?: string | JSX.Element;\r\n disabled?: boolean;\r\n}\r\n\r\nfunction isTabLabelWithIcon(item: string | TabLabel): item is TabLabel {\r\n return (typeof item !== \"string\") && !!(item).icon;\r\n}\r\n\r\nfunction isTabLabel(item: string | TabLabel): item is TabLabel {\r\n return (typeof item !== \"string\");\r\n}\r\n\r\n/** Properties for the [[HorizontalTabs]] and [[VerticalTabs]] components\r\n * @public\r\n */\r\nexport interface TabsProps extends React.AllHTMLAttributes<HTMLUListElement>, CommonProps {\r\n /** Text shown for each tab\r\n * @public */\r\n labels: Array<string | TabLabel>;\r\n /** Handler for activating a tab */\r\n onActivateTab?: (index: number) => any;\r\n /** Index of the initial active tab */\r\n activeIndex?: number;\r\n /** Indicates whether the bar on the active tab is green instead of the default blue */\r\n green?: boolean;\r\n}\r\n\r\n/** State for [[Tabs]] component\r\n * @internal\r\n */\r\ninterface TabsState {\r\n activeIndex: number;\r\n}\r\n\r\n/** Properties for the base [[Tabs]] component\r\n * @public\r\n */\r\nexport interface MainTabsProps extends TabsProps {\r\n /** Main CSS class name */\r\n mainClassName: string;\r\n /** Orientation of the Tabs list */\r\n orientation: Orientation;\r\n}\r\n\r\n/** Tabs meant to represent the current position in a page/section\r\n * @public\r\n */\r\nexport class Tabs extends React.PureComponent<MainTabsProps, TabsState> {\r\n private _anchorRefs: Array<React.RefObject<HTMLAnchorElement>> = [];\r\n private _itemKeyboardNavigator: ItemKeyboardNavigator;\r\n\r\n constructor(props: MainTabsProps) {\r\n super(props);\r\n\r\n const activeIndex = this.validateActiveIndex(props.activeIndex);\r\n this.state = {\r\n activeIndex,\r\n };\r\n\r\n props.labels.forEach(() => this._anchorRefs.push(React.createRef<HTMLAnchorElement>()));\r\n this._itemKeyboardNavigator = new ItemKeyboardNavigator(this._handleFocusItem, this._activateTab);\r\n }\r\n\r\n private validateActiveIndex(idx?: number): number {\r\n let activeIndex = 0;\r\n if (idx && idx >= 0 && idx < this.props.labels.length)\r\n activeIndex = idx;\r\n return activeIndex;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\r\n this._itemKeyboardNavigator.orientation = this.props.orientation;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: MainTabsProps) {\r\n if (prevProps.labels !== this.props.labels)\r\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\r\n\r\n if (prevProps.orientation !== this.props.orientation)\r\n this._itemKeyboardNavigator.orientation = this.props.orientation;\r\n\r\n if (prevProps.activeIndex !== this.props.activeIndex) {\r\n let hadFocus = false;\r\n const element = this._anchorRefs[this.state.activeIndex].current;\r\n // istanbul ignore else\r\n if (element && document.activeElement === element)\r\n hadFocus = true;\r\n const activeIndex = this.validateActiveIndex(this.props.activeIndex);\r\n\r\n this.setState(\r\n () => ({ activeIndex }),\r\n () => {\r\n // istanbul ignore else\r\n if (hadFocus) {\r\n const newElement = this._anchorRefs[activeIndex].current;\r\n // istanbul ignore else\r\n if (newElement)\r\n newElement.focus();\r\n }\r\n });\r\n }\r\n }\r\n\r\n private _handleFocusItem = (index: number) => {\r\n const itemRef = this._anchorRefs[index];\r\n // istanbul ignore else\r\n if (itemRef && itemRef.current)\r\n itemRef.current.focus();\r\n };\r\n\r\n private _handleTabClick = (index: number) => {\r\n this._activateTab(index);\r\n };\r\n\r\n /** Handle keydown on tabs */\r\n private _handleKeyDownEvent(event: React.KeyboardEvent, index: number) {\r\n this._itemKeyboardNavigator.handleKeyDownEvent(event, index);\r\n }\r\n\r\n /** Handle keyup on tabs */\r\n private _handleKeyUpEvent(event: React.KeyboardEvent, index: number) {\r\n this._itemKeyboardNavigator.handleKeyUpEvent(event, index);\r\n }\r\n\r\n private _activateTab = (index: number) => {\r\n this.props.onActivateTab && this.props.onActivateTab(index);\r\n this.setState({ activeIndex: index });\r\n };\r\n\r\n /** @internal */\r\n public override render(): JSX.Element {\r\n const ulClassNames = classnames(\r\n this.props.mainClassName,\r\n this.props.green && \"uicore-tabs-green\",\r\n this.props.className,\r\n );\r\n\r\n const anyIconsPresent = (this.props.labels.reduce((a, b) => a + (isTabLabelWithIcon(b) ? 1 : 0), 0)) > 0;\r\n\r\n return (\r\n <ul className={ulClassNames} style={this.props.style}\r\n role=\"tablist\"\r\n aria-orientation={this.props.orientation === Orientation.Vertical ? \"vertical\" : \"horizontal\"}\r\n >\r\n {this.props.labels.map((label, index) => {\r\n let disabled;\r\n let tooltipElement: JSX.Element | undefined;\r\n let title: string | undefined;\r\n let subLabel: string | undefined;\r\n let tabId = \"\";\r\n let icon;\r\n if (isTabLabel(label)) {\r\n icon = IconHelper.getIconReactNode(label.icon);\r\n subLabel = label.subLabel;\r\n disabled = label.disabled;\r\n tabId = label.tabId;\r\n if (React.isValidElement(label.tooltip))\r\n tooltipElement = label.tooltip;\r\n else if (typeof label.tooltip === \"string\")\r\n title = label.tooltip;\r\n }\r\n return <li key={index} title={title}\r\n className={classnames(index === this.state.activeIndex && \"core-active\", disabled && \"core-tab-item-disabled\")}\r\n role=\"tab\"\r\n aria-selected={index === this.state.activeIndex}\r\n data-for={`${tabId}`} /* to support react-tooltip */\r\n >\r\n {tooltipElement}\r\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\r\n <a ref={this._anchorRefs[index]}\r\n tabIndex={index === this.state.activeIndex ? 0 : -1}\r\n onClick={() => this._handleTabClick(index)}\r\n onKeyDown={(event) => this._handleKeyDownEvent(event, index)}\r\n onKeyUp={(event) => this._handleKeyUpEvent(event, index)}\r\n data-testid={`${tabId}`}\r\n role=\"button\"\r\n > <div className={classnames(\"uicore-tabs-inline-label\", disabled && \"core-tab-item-disabled\")}>\r\n {anyIconsPresent && <span className=\"uicore-tabs-icon\">{icon}</span>}\r\n <div className=\"uicore-tabs-label-subLabel-container\">\r\n <span>{(typeof label === \"string\") ? label : label.label}</span>\r\n {subLabel && <span className=\"uicore-tabs-subLabel\">{subLabel}</span>}\r\n </div>\r\n </div>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B,IAAE,QAAQ,CAAQ,CACjE,CACF,CACJ,CACD,CAAC;QACR,CAAC,CACA,CACE,CACN,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tabs\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Orientation } from \"../enums/Orientation\";\r\nimport { ItemKeyboardNavigator } from \"../focus/ItemKeyboardNavigator\";\r\nimport { IconHelper } from \"../utils/IconHelper\";\r\n\r\n/** TabLabel provides ability to define label, icon, and tooltip for a tab entry. The tooltip can be defined as JSX|Element\r\n * to support react-tooltip component or a string that will be use to set the title property.\r\n * @public\r\n */\r\nexport interface TabLabel {\r\n label: string;\r\n subLabel?: string;\r\n icon?: string | JSX.Element;\r\n tabId: string; /* optional id added to tab so it can be used by react-tooltip */\r\n /** tooltip allows JSX.Element to support styled tooltips like react-tooltip. */\r\n tooltip?: string | JSX.Element;\r\n disabled?: boolean;\r\n}\r\n\r\nfunction isTabLabelWithIcon(item: string | TabLabel): item is TabLabel {\r\n return (typeof item !== \"string\") && !!(item).icon;\r\n}\r\n\r\nfunction isTabLabel(item: string | TabLabel): item is TabLabel {\r\n return (typeof item !== \"string\");\r\n}\r\n\r\n/** Properties for the [[VerticalTabs]] component\r\n * @public\r\n */\r\nexport interface TabsProps extends React.AllHTMLAttributes<HTMLUListElement>, CommonProps {\r\n /** Text shown for each tab\r\n * @public */\r\n labels: Array<string | TabLabel>;\r\n /** Handler for activating a tab */\r\n onActivateTab?: (index: number) => any;\r\n /** Index of the initial active tab */\r\n activeIndex?: number;\r\n /** Indicates whether the bar on the active tab is green instead of the default blue */\r\n green?: boolean;\r\n}\r\n\r\n/** State for [[Tabs]] component\r\n * @internal\r\n */\r\ninterface TabsState {\r\n activeIndex: number;\r\n}\r\n\r\n/** Properties for the base [[Tabs]] component\r\n * @public\r\n */\r\nexport interface MainTabsProps extends TabsProps {\r\n /** Main CSS class name */\r\n mainClassName: string;\r\n /** Orientation of the Tabs list */\r\n orientation: Orientation;\r\n}\r\n\r\n/** Tabs meant to represent the current position in a page/section\r\n * @public\r\n */\r\nexport class Tabs extends React.PureComponent<MainTabsProps, TabsState> {\r\n private _anchorRefs: Array<React.RefObject<HTMLAnchorElement>> = [];\r\n private _itemKeyboardNavigator: ItemKeyboardNavigator;\r\n\r\n constructor(props: MainTabsProps) {\r\n super(props);\r\n\r\n const activeIndex = this.validateActiveIndex(props.activeIndex);\r\n this.state = {\r\n activeIndex,\r\n };\r\n\r\n props.labels.forEach(() => this._anchorRefs.push(React.createRef<HTMLAnchorElement>()));\r\n this._itemKeyboardNavigator = new ItemKeyboardNavigator(this._handleFocusItem, this._activateTab);\r\n }\r\n\r\n private validateActiveIndex(idx?: number): number {\r\n let activeIndex = 0;\r\n if (idx && idx >= 0 && idx < this.props.labels.length)\r\n activeIndex = idx;\r\n return activeIndex;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\r\n this._itemKeyboardNavigator.orientation = this.props.orientation;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: MainTabsProps) {\r\n if (prevProps.labels !== this.props.labels)\r\n this._itemKeyboardNavigator.itemCount = this.props.labels.length;\r\n\r\n if (prevProps.orientation !== this.props.orientation)\r\n this._itemKeyboardNavigator.orientation = this.props.orientation;\r\n\r\n if (prevProps.activeIndex !== this.props.activeIndex) {\r\n let hadFocus = false;\r\n const element = this._anchorRefs[this.state.activeIndex].current;\r\n // istanbul ignore else\r\n if (element && document.activeElement === element)\r\n hadFocus = true;\r\n const activeIndex = this.validateActiveIndex(this.props.activeIndex);\r\n\r\n this.setState(\r\n () => ({ activeIndex }),\r\n () => {\r\n // istanbul ignore else\r\n if (hadFocus) {\r\n const newElement = this._anchorRefs[activeIndex].current;\r\n // istanbul ignore else\r\n if (newElement)\r\n newElement.focus();\r\n }\r\n });\r\n }\r\n }\r\n\r\n private _handleFocusItem = (index: number) => {\r\n const itemRef = this._anchorRefs[index];\r\n // istanbul ignore else\r\n if (itemRef && itemRef.current)\r\n itemRef.current.focus();\r\n };\r\n\r\n private _handleTabClick = (index: number) => {\r\n this._activateTab(index);\r\n };\r\n\r\n /** Handle keydown on tabs */\r\n private _handleKeyDownEvent(event: React.KeyboardEvent, index: number) {\r\n this._itemKeyboardNavigator.handleKeyDownEvent(event, index);\r\n }\r\n\r\n /** Handle keyup on tabs */\r\n private _handleKeyUpEvent(event: React.KeyboardEvent, index: number) {\r\n this._itemKeyboardNavigator.handleKeyUpEvent(event, index);\r\n }\r\n\r\n private _activateTab = (index: number) => {\r\n this.props.onActivateTab && this.props.onActivateTab(index);\r\n this.setState({ activeIndex: index });\r\n };\r\n\r\n /** @internal */\r\n public override render(): JSX.Element {\r\n const ulClassNames = classnames(\r\n this.props.mainClassName,\r\n this.props.green && \"uicore-tabs-green\",\r\n this.props.className,\r\n );\r\n\r\n const anyIconsPresent = (this.props.labels.reduce((a, b) => a + (isTabLabelWithIcon(b) ? 1 : 0), 0)) > 0;\r\n\r\n return (\r\n <ul className={ulClassNames} style={this.props.style}\r\n role=\"tablist\"\r\n aria-orientation={this.props.orientation === Orientation.Vertical ? \"vertical\" : \"horizontal\"}\r\n >\r\n {this.props.labels.map((label, index) => {\r\n let disabled;\r\n let tooltipElement: JSX.Element | undefined;\r\n let title: string | undefined;\r\n let subLabel: string | undefined;\r\n let tabId = \"\";\r\n let icon;\r\n if (isTabLabel(label)) {\r\n icon = IconHelper.getIconReactNode(label.icon);\r\n subLabel = label.subLabel;\r\n disabled = label.disabled;\r\n tabId = label.tabId;\r\n if (React.isValidElement(label.tooltip))\r\n tooltipElement = label.tooltip;\r\n else if (typeof label.tooltip === \"string\")\r\n title = label.tooltip;\r\n }\r\n return <li key={index} title={title}\r\n className={classnames(index === this.state.activeIndex && \"core-active\", disabled && \"core-tab-item-disabled\")}\r\n role=\"tab\"\r\n aria-selected={index === this.state.activeIndex}\r\n data-for={`${tabId}`} /* to support react-tooltip */\r\n >\r\n {tooltipElement}\r\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\r\n <a ref={this._anchorRefs[index]}\r\n tabIndex={index === this.state.activeIndex ? 0 : -1}\r\n onClick={() => this._handleTabClick(index)}\r\n onKeyDown={(event) => this._handleKeyDownEvent(event, index)}\r\n onKeyUp={(event) => this._handleKeyUpEvent(event, index)}\r\n data-testid={`${tabId}`}\r\n role=\"button\"\r\n > <div className={classnames(\"uicore-tabs-inline-label\", disabled && \"core-tab-item-disabled\")}>\r\n {anyIconsPresent && <span className=\"uicore-tabs-icon\">{icon}</span>}\r\n <div className=\"uicore-tabs-label-subLabel-container\">\r\n <span>{(typeof label === \"string\") ? label : label.label}</span>\r\n {subLabel && <span className=\"uicore-tabs-subLabel\">{subLabel}</span>}\r\n </div>\r\n </div>\r\n </a>\r\n </li>;\r\n }\r\n )}\r\n </ul>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "./horizontal";
|
|
6
5
|
@import "./vertical";
|