@itwin/core-react 4.0.0-dev.1 → 4.0.0-dev.11
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.js +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +7 -10
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.js +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.scss +1 -1
- package/lib/cjs/core-react/button/blue.scss +3 -11
- package/lib/cjs/core-react/button/button.scss +31 -42
- package/lib/cjs/core-react/button/hollow.scss +5 -5
- package/lib/cjs/core-react/button/primary.scss +3 -11
- package/lib/cjs/core-react/button/variables.scss +10 -7
- package/lib/cjs/core-react/checkbox/checkbox.scss +15 -20
- 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/checklistbox/CheckListBox.scss +1 -1
- package/lib/cjs/core-react/classes.scss +0 -5
- package/lib/cjs/core-react/colorthemes.scss +15 -12
- package/lib/cjs/core-react/colorvariables.scss +65 -50
- 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 +19 -21
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +5 -2
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +7 -3
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.js +16 -7
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.scss +27 -27
- package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +1 -1
- 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/ConditionalIconItem.d.ts +27 -0
- package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
- package/lib/cjs/core-react/icons/ConditionalIconItem.js +65 -0
- package/lib/cjs/core-react/icons/ConditionalIconItem.js.map +1 -0
- package/lib/cjs/core-react/icons/IconComponent.d.ts +3 -2
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js +1 -7
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/icons/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/icons/WebFontIcon.d.ts +0 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.js +0 -1
- package/lib/cjs/core-react/icons/WebFontIcon.js.map +1 -1
- package/lib/cjs/core-react/icons/variables.scss +0 -9
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +6 -7
- 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 +9 -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/numberinput/NumberInput.d.ts +5 -0
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +13 -8
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +12 -13
- package/lib/cjs/core-react/inputs/variables.scss +20 -15
- package/lib/cjs/core-react/listbox/Listbox.scss +11 -11
- package/lib/cjs/core-react/loading/LoadingPrompt.scss +2 -2
- 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 +5 -6
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts +17 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js +54 -10
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.scss +24 -14
- 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 +4 -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 +2 -3
- package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.js +8 -6
- package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.scss +5 -10
- 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 +11 -8
- 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/mixins.scss +2 -3
- 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 -7
- package/lib/cjs/core-react/style/themecolors.scss +0 -6
- package/lib/cjs/core-react/style/typography.scss +22 -26
- package/lib/cjs/core-react/style/variables.scss +4 -8
- 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 +40 -61
- package/lib/cjs/core-react/tabs/vertical.scss +20 -33
- package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BlockText.js +1 -0
- package/lib/cjs/core-react/text/BlockText.js.map +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts +1 -0
- package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BodyText.js +2 -0
- package/lib/cjs/core-react/text/BodyText.js.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.js +1 -0
- package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
- package/lib/cjs/core-react/text/MutedText.d.ts +1 -0
- package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/MutedText.js +2 -0
- package/lib/cjs/core-react/text/MutedText.js.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +1 -0
- package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/StyledText.js +1 -0
- package/lib/cjs/core-react/text/StyledText.js.map +1 -1
- package/lib/cjs/core-react/text/block.scss +9 -4
- package/lib/cjs/core-react/text/body.scss +7 -4
- 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 +10 -48
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js +3 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.scss +7 -4
- package/lib/cjs/core-react/tree/Node.scss +8 -9
- package/lib/cjs/core-react/tree/Placeholder.scss +1 -4
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +2 -2
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useRefs.js.map +1 -1
- package/lib/cjs/core-react.d.ts +2 -41
- package/lib/cjs/core-react.d.ts.map +1 -1
- package/lib/cjs/core-react.js +2 -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.js +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.scss +7 -10
- package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.js +0 -1
- package/lib/esm/core-react/badge/BetaBadge.js.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.scss +1 -1
- package/lib/esm/core-react/button/blue.scss +3 -11
- package/lib/esm/core-react/button/button.scss +31 -42
- package/lib/esm/core-react/button/hollow.scss +5 -5
- package/lib/esm/core-react/button/primary.scss +3 -11
- package/lib/esm/core-react/button/variables.scss +10 -7
- package/lib/esm/core-react/checkbox/checkbox.scss +15 -20
- 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/checklistbox/CheckListBox.scss +1 -1
- package/lib/esm/core-react/classes.scss +0 -5
- package/lib/esm/core-react/colorthemes.scss +15 -12
- package/lib/esm/core-react/colorvariables.scss +65 -50
- 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 +19 -21
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +6 -3
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +7 -3
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.js +16 -7
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.scss +27 -27
- package/lib/esm/core-react/elementseparator/ElementSeparator.scss +1 -1
- 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/ConditionalIconItem.d.ts +27 -0
- package/lib/esm/core-react/icons/ConditionalIconItem.d.ts.map +1 -0
- package/lib/esm/core-react/icons/ConditionalIconItem.js +61 -0
- package/lib/esm/core-react/icons/ConditionalIconItem.js.map +1 -0
- package/lib/esm/core-react/icons/IconComponent.d.ts +3 -2
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js +1 -7
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/icons/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/icons/WebFontIcon.d.ts +0 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.js +0 -1
- package/lib/esm/core-react/icons/WebFontIcon.js.map +1 -1
- package/lib/esm/core-react/icons/variables.scss +0 -9
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +6 -7
- 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 +9 -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/numberinput/NumberInput.d.ts +5 -0
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js +13 -8
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +12 -13
- package/lib/esm/core-react/inputs/variables.scss +20 -15
- package/lib/esm/core-react/listbox/Listbox.scss +11 -11
- package/lib/esm/core-react/loading/LoadingPrompt.scss +2 -2
- 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 +5 -6
- package/lib/esm/core-react/messagebox/MessageBox.d.ts +17 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js +54 -10
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.scss +24 -14
- 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 +4 -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 +2 -3
- package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.js +8 -6
- package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.scss +5 -10
- 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 +11 -8
- 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/mixins.scss +2 -3
- 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 -7
- package/lib/esm/core-react/style/themecolors.scss +0 -6
- package/lib/esm/core-react/style/typography.scss +22 -26
- package/lib/esm/core-react/style/variables.scss +4 -8
- 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 +40 -61
- package/lib/esm/core-react/tabs/vertical.scss +20 -33
- package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BlockText.js +1 -0
- package/lib/esm/core-react/text/BlockText.js.map +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts +1 -0
- package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BodyText.js +2 -0
- package/lib/esm/core-react/text/BodyText.js.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/DisabledText.js +1 -0
- package/lib/esm/core-react/text/DisabledText.js.map +1 -1
- package/lib/esm/core-react/text/MutedText.d.ts +1 -0
- package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/esm/core-react/text/MutedText.js +2 -0
- package/lib/esm/core-react/text/MutedText.js.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +1 -0
- package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/StyledText.js +1 -0
- package/lib/esm/core-react/text/StyledText.js.map +1 -1
- package/lib/esm/core-react/text/block.scss +9 -4
- package/lib/esm/core-react/text/body.scss +7 -4
- 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 +10 -48
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js +3 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.scss +7 -4
- package/lib/esm/core-react/tree/Node.scss +8 -9
- package/lib/esm/core-react/tree/Placeholder.scss +1 -4
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +2 -2
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useRefs.js.map +1 -1
- package/lib/esm/core-react.d.ts +2 -41
- package/lib/esm/core-react.d.ts.map +1 -1
- package/lib/esm/core-react.js +2 -41
- package/lib/esm/core-react.js.map +1 -1
- package/package.json +27 -35
- 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/style/itwinui-overrides.scss +0 -25
- 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/style/itwinui-overrides.scss +0 -25
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,98 +1,6 @@
|
|
|
1
1
|
# Change Log - @itwin/core-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
4
|
-
|
|
5
|
-
## 3.5.5
|
|
6
|
-
Thu, 26 Jan 2023 22:53:27 GMT
|
|
7
|
-
|
|
8
|
-
_Version update only_
|
|
9
|
-
|
|
10
|
-
## 3.5.4
|
|
11
|
-
Wed, 18 Jan 2023 15:27:15 GMT
|
|
12
|
-
|
|
13
|
-
_Version update only_
|
|
14
|
-
|
|
15
|
-
## 3.5.3
|
|
16
|
-
Fri, 13 Jan 2023 17:23:07 GMT
|
|
17
|
-
|
|
18
|
-
_Version update only_
|
|
19
|
-
|
|
20
|
-
## 3.5.2
|
|
21
|
-
Wed, 11 Jan 2023 16:46:30 GMT
|
|
22
|
-
|
|
23
|
-
_Version update only_
|
|
24
|
-
|
|
25
|
-
## 3.5.1
|
|
26
|
-
Thu, 15 Dec 2022 16:38:29 GMT
|
|
27
|
-
|
|
28
|
-
_Version update only_
|
|
29
|
-
|
|
30
|
-
## 3.5.0
|
|
31
|
-
Wed, 07 Dec 2022 19:12:37 GMT
|
|
32
|
-
|
|
33
|
-
### Updates
|
|
34
|
-
|
|
35
|
-
- Unpin classnames package, fix invalid use of classnames
|
|
36
|
-
- Change core-dialog-hidden class so that modeless dialogs will be compatible with iTwinUI components.
|
|
37
|
-
- Use --buic-toolbar-opacity to set the opacity of toolbar items.
|
|
38
|
-
|
|
39
|
-
## 3.4.7
|
|
40
|
-
Wed, 30 Nov 2022 14:28:19 GMT
|
|
41
|
-
|
|
42
|
-
_Version update only_
|
|
43
|
-
|
|
44
|
-
## 3.4.6
|
|
45
|
-
Tue, 22 Nov 2022 14:24:19 GMT
|
|
46
|
-
|
|
47
|
-
_Version update only_
|
|
48
|
-
|
|
49
|
-
## 3.4.5
|
|
50
|
-
Thu, 17 Nov 2022 21:32:50 GMT
|
|
51
|
-
|
|
52
|
-
_Version update only_
|
|
53
|
-
|
|
54
|
-
## 3.4.4
|
|
55
|
-
Thu, 10 Nov 2022 19:32:17 GMT
|
|
56
|
-
|
|
57
|
-
_Version update only_
|
|
58
|
-
|
|
59
|
-
## 3.4.3
|
|
60
|
-
Fri, 28 Oct 2022 13:34:58 GMT
|
|
61
|
-
|
|
62
|
-
_Version update only_
|
|
63
|
-
|
|
64
|
-
## 3.4.2
|
|
65
|
-
Mon, 24 Oct 2022 13:23:45 GMT
|
|
66
|
-
|
|
67
|
-
_Version update only_
|
|
68
|
-
|
|
69
|
-
## 3.4.1
|
|
70
|
-
Mon, 17 Oct 2022 20:06:51 GMT
|
|
71
|
-
|
|
72
|
-
_Version update only_
|
|
73
|
-
|
|
74
|
-
## 3.4.0
|
|
75
|
-
Thu, 13 Oct 2022 20:24:47 GMT
|
|
76
|
-
|
|
77
|
-
### Updates
|
|
78
|
-
|
|
79
|
-
- Added data uri handling for svg components
|
|
80
|
-
- Updated Node types declaration to support latest v16
|
|
81
|
-
|
|
82
|
-
## 3.3.5
|
|
83
|
-
Tue, 27 Sep 2022 11:50:59 GMT
|
|
84
|
-
|
|
85
|
-
_Version update only_
|
|
86
|
-
|
|
87
|
-
## 3.3.4
|
|
88
|
-
Thu, 08 Sep 2022 19:00:05 GMT
|
|
89
|
-
|
|
90
|
-
_Version update only_
|
|
91
|
-
|
|
92
|
-
## 3.3.3
|
|
93
|
-
Tue, 06 Sep 2022 20:54:19 GMT
|
|
94
|
-
|
|
95
|
-
_Version update only_
|
|
3
|
+
This log was last generated on Thu, 01 Sep 2022 14:37:22 GMT and should not be manually modified.
|
|
96
4
|
|
|
97
5
|
## 3.3.2
|
|
98
6
|
Thu, 01 Sep 2022 14:37:22 GMT
|
|
@@ -29,7 +29,7 @@ export declare class UiCore {
|
|
|
29
29
|
static get localization(): Localization;
|
|
30
30
|
/** The internationalization service namespace. */
|
|
31
31
|
static get localizationNamespace(): string;
|
|
32
|
-
/** Calls localization.
|
|
32
|
+
/** Calls localization.getLocalizedStringWithNamespace with the "UiCore" namespace. Do NOT include the namespace in the key.
|
|
33
33
|
* @internal
|
|
34
34
|
*/
|
|
35
35
|
static translate(key: string | string[]): string;
|
|
@@ -60,7 +60,7 @@ class UiCore {
|
|
|
60
60
|
static get localizationNamespace() {
|
|
61
61
|
return "UiCore";
|
|
62
62
|
}
|
|
63
|
-
/** Calls localization.
|
|
63
|
+
/** Calls localization.getLocalizedStringWithNamespace with the "UiCore" namespace. Do NOT include the namespace in the key.
|
|
64
64
|
* @internal
|
|
65
65
|
*/
|
|
66
66
|
static translate(key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4EAA4E;AAC5E,8BAA4B;AAC5B,iCAA+B;AAC/B,mCAAiC;AACjC,0BAAwB;AAExB,sDAA6C;AAE7C,0DAA8D;AAC9D,+DAA4D;AAC5D,2CAA2C;AAE3C;;;GAGG;AACH,MAAa,MAAM;IAIjB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,MAAM,CAAC,YAAY,EAAE;YACvB,qBAAM,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,kCAAkC,CAAC,CAAC;YAClF,OAAO;SACR;QAED,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC;QACpC,MAAM,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC3E,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS;YACvD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,mCAAgB,CAAC,CAAC;QAE/D,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,IAAI,MAAM,CAAC,aAAa;YACtB,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACzE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;QAEjC,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,gDAAgD;IACzC,MAAM,KAAK,WAAW,KAAc,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAExE;;OAEG;IACI,MAAM,KAAK,YAAY;QAC5B,uBAAuB;QACvB,IAAI,CAAC,MAAM,CAAC,aAAa;YACvB,MAAM,IAAI,wBAAO,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4FAA4F,CAAC,CAAC;QAC/I,uBAAuB;QACvB,OAAO,MAAM,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,qBAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4FAA4F,CAAC,CAAC;YAC3I,OAAO,EAAE,CAAC;SACX;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,IAAA,6BAAY,EAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;;AAvEH,wBAyEC;AAxEgB,mBAAY,GAAG,KAAK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Import color variables, layout variables and Sass classes barrel file */\r\nimport \"./colorthemes.scss\";\r\nimport \"./colorvariables.scss\";\r\nimport \"./layout-variables.scss\";\r\nimport \"./classes.scss\";\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\nimport { getClassName, UiError } from \"@itwin/appui-abstract\";\r\nimport { IconWebComponent } from \"./utils/IconWebComponent\";\r\n// cSpell:ignore colorthemes colorvariables\r\n\r\n/**\r\n * Manages the Localization service for the core-react package.\r\n * @public\r\n */\r\nexport class UiCore {\r\n private static _initialized = false;\r\n private static _localization?: Localization;\r\n\r\n /**\r\n * Registers the Localization service namespace for UiCore.\r\n * @param localization The internationalization service created by the host application.\r\n */\r\n public static async initialize(localization: Localization): Promise<void> {\r\n if (UiCore._initialized) {\r\n Logger.logInfo(UiCore.loggerCategory(UiCore), `UiCore.initialize already called`);\r\n return;\r\n }\r\n\r\n UiCore._localization = localization;\r\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\r\n if (window.customElements.get(\"svg-loader\") === undefined)\r\n window.customElements.define(\"svg-loader\", IconWebComponent);\r\n\r\n UiCore._initialized = true;\r\n }\r\n\r\n /** Unregisters the UiCore localization namespace */\r\n public static terminate() {\r\n if (UiCore._localization)\r\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\r\n UiCore._localization = undefined;\r\n\r\n UiCore._initialized = false;\r\n }\r\n\r\n /** Determines if UiCore has been initialized */\r\n public static get initialized(): boolean { return UiCore._initialized; }\r\n\r\n /** The internationalization service created by the host application.\r\n * @internal\r\n */\r\n public static get localization(): Localization {\r\n // istanbul ignore else\r\n if (!UiCore._localization)\r\n throw new UiError(UiCore.loggerCategory(this), \"localization: UiCore.initialize has not been called. Unable to return Localization object.\");\r\n // istanbul ignore next\r\n return UiCore._localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiCore\";\r\n }\r\n\r\n /** Calls localization.
|
|
1
|
+
{"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,4EAA4E;AAC5E,8BAA4B;AAC5B,iCAA+B;AAC/B,mCAAiC;AACjC,0BAAwB;AAExB,sDAA6C;AAE7C,0DAA8D;AAC9D,+DAA4D;AAC5D,2CAA2C;AAE3C;;;GAGG;AACH,MAAa,MAAM;IAIjB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,MAAM,CAAC,YAAY,EAAE;YACvB,qBAAM,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,kCAAkC,CAAC,CAAC;YAClF,OAAO;SACR;QAED,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC;QACpC,MAAM,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAC3E,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS;YACvD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,mCAAgB,CAAC,CAAC;QAE/D,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,IAAI,MAAM,CAAC,aAAa;YACtB,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACzE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;QAEjC,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,gDAAgD;IACzC,MAAM,KAAK,WAAW,KAAc,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAExE;;OAEG;IACI,MAAM,KAAK,YAAY;QAC5B,uBAAuB;QACvB,IAAI,CAAC,MAAM,CAAC,aAAa;YACvB,MAAM,IAAI,wBAAO,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4FAA4F,CAAC,CAAC;QAC/I,uBAAuB;QACvB,OAAO,MAAM,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,qBAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,4FAA4F,CAAC,CAAC;YAC3I,OAAO,EAAE,CAAC;SACX;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,IAAA,6BAAY,EAAC,GAAG,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;;AAvEH,wBAyEC;AAxEgB,mBAAY,GAAG,KAAK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Import color variables, layout variables and Sass classes barrel file */\r\nimport \"./colorthemes.scss\";\r\nimport \"./colorvariables.scss\";\r\nimport \"./layout-variables.scss\";\r\nimport \"./classes.scss\";\r\n\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\nimport { getClassName, UiError } from \"@itwin/appui-abstract\";\r\nimport { IconWebComponent } from \"./utils/IconWebComponent\";\r\n// cSpell:ignore colorthemes colorvariables\r\n\r\n/**\r\n * Manages the Localization service for the core-react package.\r\n * @public\r\n */\r\nexport class UiCore {\r\n private static _initialized = false;\r\n private static _localization?: Localization;\r\n\r\n /**\r\n * Registers the Localization service namespace for UiCore.\r\n * @param localization The internationalization service created by the host application.\r\n */\r\n public static async initialize(localization: Localization): Promise<void> {\r\n if (UiCore._initialized) {\r\n Logger.logInfo(UiCore.loggerCategory(UiCore), `UiCore.initialize already called`);\r\n return;\r\n }\r\n\r\n UiCore._localization = localization;\r\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\r\n if (window.customElements.get(\"svg-loader\") === undefined)\r\n window.customElements.define(\"svg-loader\", IconWebComponent);\r\n\r\n UiCore._initialized = true;\r\n }\r\n\r\n /** Unregisters the UiCore localization namespace */\r\n public static terminate() {\r\n if (UiCore._localization)\r\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\r\n UiCore._localization = undefined;\r\n\r\n UiCore._initialized = false;\r\n }\r\n\r\n /** Determines if UiCore has been initialized */\r\n public static get initialized(): boolean { return UiCore._initialized; }\r\n\r\n /** The internationalization service created by the host application.\r\n * @internal\r\n */\r\n public static get localization(): Localization {\r\n // istanbul ignore else\r\n if (!UiCore._localization)\r\n throw new UiError(UiCore.loggerCategory(this), \"localization: UiCore.initialize has not been called. Unable to return Localization object.\");\r\n // istanbul ignore next\r\n return UiCore._localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiCore\";\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiCore\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n if (!UiCore._localization) {\r\n Logger.logError(UiCore.loggerCategory(this), `translate: UiCore must be initialize with a localization provider. Returning blank string.`);\r\n return \"\";\r\n }\r\n return UiCore._localization.getLocalizedString(key, { ns: UiCore.localizationNamespace });\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"core-react\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiCore.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -3,18 +3,17 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "./style/opacity.scss";
|
|
6
|
-
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
7
6
|
|
|
8
|
-
$title-weight:
|
|
9
|
-
$title-size:
|
|
7
|
+
$title-weight: var(--iui-font-weight-normal);
|
|
8
|
+
$title-size: var(--iui-font-size-2);
|
|
10
9
|
$title-opacity: $uicore-opacity-1;
|
|
11
10
|
|
|
12
|
-
$body-weight:
|
|
13
|
-
$body-size:
|
|
11
|
+
$body-weight: var(--iui-font-weight-light);
|
|
12
|
+
$body-size: var(--iui-font-size-1);
|
|
14
13
|
$body-opacity: $uicore-opacity-2;
|
|
15
14
|
|
|
16
|
-
$body1-weight:
|
|
17
|
-
$body1-size:
|
|
15
|
+
$body1-weight: var(--iui-font-weight-normal);
|
|
16
|
+
$body1-size: var(--iui-font-size-1);
|
|
18
17
|
$body1-opacity: $uicore-opacity-2;
|
|
19
18
|
|
|
20
19
|
@mixin title($rgb: unset) {
|
|
@@ -42,4 +41,4 @@ $body1-opacity: $uicore-opacity-2;
|
|
|
42
41
|
@if $rgb != unset {
|
|
43
42
|
color: rgba($rgb, $body1-opacity);
|
|
44
43
|
}
|
|
45
|
-
}
|
|
44
|
+
}
|
|
@@ -95,7 +95,7 @@ class AutoSuggest extends React.PureComponent {
|
|
|
95
95
|
this._theme = {
|
|
96
96
|
container: "uicore-autosuggest__container",
|
|
97
97
|
containerOpen: "uicore-autosuggest__container--open",
|
|
98
|
-
input: "uicore-autosuggest__input",
|
|
98
|
+
input: "iui-input uicore-autosuggest__input",
|
|
99
99
|
inputOpen: "uicore-autosuggest__input--open",
|
|
100
100
|
inputFocused: "uicore-autosuggest__input--focused",
|
|
101
101
|
suggestionsContainer: "uicore-autosuggest__suggestions-container",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoSuggest.js","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,+BAA+B;AAC/B,sDAAsD;AACtD,sDAA6C;AAC7C,0DAAmD;AAEnD,sCAAmC;AAoEnC;;GAEG;AACH,MAAa,WAAY,SAAQ,KAAK,CAAC,aAAiD;IAGtF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,eAAU,GAAG,KAAK,CAAC;QAkCnB,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,IAAI,QAAQ,GAAG,EAAE,CAAC;YAElB,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW;gBACnD,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;iBAC7B,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK;gBACrB,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAE5B,IAAI,CAAC,QAAQ,CAAC;gBACZ,UAAU,EAAE,QAAQ;aACrB,CAAC,CAAC;QACL,CAAC,CAAC;QAEM,aAAQ,GAAG,CAAC,CAAqC,EAAE,EAAE;YAC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C,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjE,MAAM,UAAU,GAAiD;YAC/D,GAAG,KAAK;YACR,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,WAAW,EAAE,gBAAgB;YAC7B,SAAS,EAAE,QAAQ;SACpB,CAAC;QAEF,OAAO;QACL,2EAA2E;QAC3E,mEAAmE;QACnE,6BAAK,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc;YAC3F,oBAAC,gBAAgB,IACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,WAAW,EAAE,WAAW,EACxB,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAC9D,kBAAkB,EAAE,IAAI,CAAC,mBAAmB,EAC5C,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EACxC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,uBAAuB,EAAE,uBAAuB,EAChD,oBAAoB,EAAE,oBAAoB,EAC1C,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,CAAC;CACF;AAvMD,kCAuMC","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 AutoSuggest\r\n */\r\n\r\nimport \"./AutoSuggest.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactAutosuggest from \"react-autosuggest\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { UiCore } from \"../UiCore\";\r\n\r\n/** Data for the [[AutoSuggest]] options\r\n * @public\r\n */\r\nexport interface AutoSuggestData {\r\n /** Value of [[AutoSuggest]] option. */\r\n value: string;\r\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\r\n label: string;\r\n}\r\n\r\n/** Prototype for function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\r\n\r\n/** Prototype for async function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\r\n\r\n/** Properties for the [[AutoSuggest]] component.\r\n * @public\r\n */\r\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Optional input value override. */\r\n value?: string;\r\n /** Options for dropdown. */\r\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\r\n /** Asynchronously calculate suggestions for any given input value. */\r\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\r\n /** Gets a label associated with a given value */\r\n getLabel?: (value: string | undefined) => string;\r\n /** Handler for when suggested selected. */\r\n onSuggestionSelected: (selected: AutoSuggestData) => void;\r\n /** Handler for Enter key. */\r\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Escape key. */\r\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Tab key. */\r\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for input receiving focus. */\r\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\r\n /** Called every time you need to clear suggestions. */\r\n onSuggestionsClearRequested?: () => void;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n\r\n /** Use it only if you need to customize the rendering of the input.\r\n * @internal\r\n */\r\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\r\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\r\n * @internal\r\n */\r\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\r\n\r\n /** @internal */\r\n alwaysRenderSuggestions?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface AutoSuggestState {\r\n inputValue: string;\r\n suggestions: AutoSuggestData[];\r\n}\r\n\r\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\r\n * @public\r\n */\r\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\r\n private _isMounted = false;\r\n\r\n constructor(props: AutoSuggestProps) {\r\n super(props);\r\n\r\n // Autosuggest is a controlled component.\r\n // This means that you need to provide an input value\r\n // and an onChange handler that updates this value (see below).\r\n // Suggestions also need to be provided to the Autosuggest,\r\n // and they are initially empty because the Autosuggest is closed.\r\n this.state = {\r\n inputValue: this.getLabel(props.value),\r\n suggestions: [],\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\r\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\r\n this.setState((_prevState, props) => ({\r\n inputValue: this.getLabel(props.value),\r\n }));\r\n }\r\n }\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n let newValue = \"\";\r\n\r\n if (e.target.tagName === \"LI\" && e.target.textContent)\r\n newValue = e.target.textContent;\r\n else if (e.target.value)\r\n newValue = e.target.value;\r\n\r\n this.setState({\r\n inputValue: newValue,\r\n });\r\n };\r\n\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onInputFocus)\r\n this.props.onInputFocus(e);\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to update suggestions. */\r\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\r\n const value = request.value;\r\n const suggestions = await this._getSuggestions(value);\r\n\r\n if (this._isMounted)\r\n this.setState({ suggestions });\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to clear suggestions. */\r\n private _onSuggestionsClearRequested = () => {\r\n this.setState({ suggestions: [] });\r\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\r\n };\r\n\r\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\r\n this.props.onSuggestionSelected(data.suggestion);\r\n };\r\n\r\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\r\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\r\n if (typeof this.props.options === \"function\")\r\n return Promise.resolve(this.props.options(value));\r\n\r\n if (this.props.getSuggestions)\r\n return this.props.getSuggestions(value);\r\n\r\n if (this.props.options === undefined) {\r\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\r\n return Promise.resolve([]);\r\n }\r\n\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return Promise.resolve(\r\n inputLength === 0 ?\r\n /* istanbul ignore next */[] :\r\n this.props.options.filter((data: AutoSuggestData) => {\r\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\r\n })\r\n );\r\n };\r\n\r\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\r\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\r\n\r\n /** Render each suggestion. */\r\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\r\n <span>\r\n {suggestion.label}\r\n </span>\r\n );\r\n\r\n private getLabel(value: string | undefined): string {\r\n let label = \"\";\r\n\r\n if (this.props.getLabel) {\r\n label = this.props.getLabel(value);\r\n } else if (this.props.options instanceof Array) {\r\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\r\n if (entry)\r\n label = entry.label;\r\n } else {\r\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\r\n }\r\n\r\n return label;\r\n }\r\n\r\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n switch (e.key) {\r\n case SpecialKey.Enter:\r\n // istanbul ignore else\r\n if (this.props.onPressEnter)\r\n this.props.onPressEnter(e);\r\n break;\r\n case SpecialKey.Escape:\r\n // istanbul ignore else\r\n if (this.props.onPressEscape)\r\n this.props.onPressEscape(e);\r\n break;\r\n case SpecialKey.Tab:\r\n // istanbul ignore else\r\n if (this.props.onPressTab)\r\n this.props.onPressTab(e);\r\n break;\r\n }\r\n };\r\n\r\n private _theme = {\r\n container: \"uicore-autosuggest__container\",\r\n containerOpen: \"uicore-autosuggest__container--open\",\r\n input: \"uicore-autosuggest__input\",\r\n inputOpen: \"uicore-autosuggest__input--open\",\r\n inputFocused: \"uicore-autosuggest__input--focused\",\r\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\r\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\r\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\r\n suggestion: \"uicore-autosuggest__suggestion\",\r\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\r\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\r\n sectionContainer: \"uicore-autosuggest__section-container\",\r\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\r\n sectionTitle: \"uicore-autosuggest__section-title\",\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const { inputValue, suggestions } = this.state;\r\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\r\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\r\n\r\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\r\n ...props,\r\n value: inputValue,\r\n onChange: this._onChange,\r\n onFocus: this._onFocus,\r\n placeholder: inputPlaceholder,\r\n autoFocus: setFocus,\r\n };\r\n\r\n return (\r\n // The onKeyDown event handler is only being used to capture bubbled events\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\r\n <ReactAutosuggest\r\n theme={this._theme}\r\n suggestions={suggestions}\r\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\r\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\r\n getSuggestionValue={this._getSuggestionValue}\r\n renderSuggestion={this._renderSuggestion}\r\n inputProps={inputProps}\r\n onSuggestionSelected={this._onSuggestionSelected}\r\n alwaysRenderSuggestions={alwaysRenderSuggestions}\r\n renderInputComponent={renderInputComponent}\r\n renderSuggestionsContainer={renderSuggestionsContainer}\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AutoSuggest.js","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAA4B;AAC5B,+BAA+B;AAC/B,sDAAsD;AACtD,sDAA6C;AAC7C,0DAAmD;AAEnD,sCAAmC;AAoEnC;;GAEG;AACH,MAAa,WAAY,SAAQ,KAAK,CAAC,aAAiD;IAGtF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,eAAU,GAAG,KAAK,CAAC;QAkCnB,cAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;YAC7D,I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AAoB,EAC1C,0BAA0B,EAAE,0BAA0B,GACtD,CACE,CACP,CAAC;IACJ,CAAC;CACF;AAvMD,kCAuMC","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 AutoSuggest\r\n */\r\n\r\nimport \"./AutoSuggest.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactAutosuggest from \"react-autosuggest\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { UiCore } from \"../UiCore\";\r\n\r\n/** Data for the [[AutoSuggest]] options\r\n * @public\r\n */\r\nexport interface AutoSuggestData {\r\n /** Value of [[AutoSuggest]] option. */\r\n value: string;\r\n /** Label of [[AutoSuggest]] option. This is shown in the dropdown. */\r\n label: string;\r\n}\r\n\r\n/** Prototype for function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[];\r\n\r\n/** Prototype for async function returning AutoSuggestData\r\n * @public\r\n */\r\nexport type AsyncGetAutoSuggestDataFunc = (value: string) => Promise<AutoSuggestData[]>;\r\n\r\n/** Properties for the [[AutoSuggest]] component.\r\n * @public\r\n */\r\nexport interface AutoSuggestProps extends React.InputHTMLAttributes<HTMLInputElement>, CommonProps {\r\n /** Optional input value override. */\r\n value?: string;\r\n /** Options for dropdown. */\r\n options?: AutoSuggestData[] | GetAutoSuggestDataFunc;\r\n /** Asynchronously calculate suggestions for any given input value. */\r\n getSuggestions?: AsyncGetAutoSuggestDataFunc;\r\n /** Gets a label associated with a given value */\r\n getLabel?: (value: string | undefined) => string;\r\n /** Handler for when suggested selected. */\r\n onSuggestionSelected: (selected: AutoSuggestData) => void;\r\n /** Handler for Enter key. */\r\n onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Escape key. */\r\n onPressEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for Tab key. */\r\n onPressTab?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\r\n /** Handler for input receiving focus. */\r\n onInputFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;\r\n /** Called every time you need to clear suggestions. */\r\n onSuggestionsClearRequested?: () => void;\r\n /** Indicates whether to set focus to the input element */\r\n setFocus?: boolean;\r\n\r\n /** Use it only if you need to customize the rendering of the input.\r\n * @internal\r\n */\r\n renderInputComponent?: any; // ReactAutosuggest.RenderInputComponent<AutoSuggestData>; NOTE: changed to \"any\" because build was failing with RenderInputComponent is not generic?\r\n /** Use it if you want to customize things inside the suggestions container beyond rendering the suggestions themselves.\r\n * @internal\r\n */\r\n renderSuggestionsContainer?: ReactAutosuggest.RenderSuggestionsContainer;\r\n\r\n /** @internal */\r\n alwaysRenderSuggestions?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface AutoSuggestState {\r\n inputValue: string;\r\n suggestions: AutoSuggestData[];\r\n}\r\n\r\n/** Auto Suggest React component. Uses the react-autosuggest component internally.\r\n * @public\r\n */\r\nexport class AutoSuggest extends React.PureComponent<AutoSuggestProps, AutoSuggestState> {\r\n private _isMounted = false;\r\n\r\n constructor(props: AutoSuggestProps) {\r\n super(props);\r\n\r\n // Autosuggest is a controlled component.\r\n // This means that you need to provide an input value\r\n // and an onChange handler that updates this value (see below).\r\n // Suggestions also need to be provided to the Autosuggest,\r\n // and they are initially empty because the Autosuggest is closed.\r\n this.state = {\r\n inputValue: this.getLabel(props.value),\r\n suggestions: [],\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: AutoSuggestProps) {\r\n if (this.props.value !== prevProps.value || this.props.options !== prevProps.options) {\r\n this.setState((_prevState, props) => ({\r\n inputValue: this.getLabel(props.value),\r\n }));\r\n }\r\n }\r\n\r\n private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n let newValue = \"\";\r\n\r\n if (e.target.tagName === \"LI\" && e.target.textContent)\r\n newValue = e.target.textContent;\r\n else if (e.target.value)\r\n newValue = e.target.value;\r\n\r\n this.setState({\r\n inputValue: newValue,\r\n });\r\n };\r\n\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this.props.onInputFocus)\r\n this.props.onInputFocus(e);\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to update suggestions. */\r\n private _onSuggestionsFetchRequested = async (request: ReactAutosuggest.SuggestionsFetchRequestedParams): Promise<void> => {\r\n const value = request.value;\r\n const suggestions = await this._getSuggestions(value);\r\n\r\n if (this._isMounted)\r\n this.setState({ suggestions });\r\n };\r\n\r\n /** Autosuggest will call this function every time you need to clear suggestions. */\r\n private _onSuggestionsClearRequested = () => {\r\n this.setState({ suggestions: [] });\r\n this.props.onSuggestionsClearRequested && this.props.onSuggestionsClearRequested();\r\n };\r\n\r\n private _onSuggestionSelected = (_event: React.FormEvent<any>, data: ReactAutosuggest.SuggestionSelectedEventData<AutoSuggestData>): void => {\r\n this.props.onSuggestionSelected(data.suggestion);\r\n };\r\n\r\n /** Teach Autosuggest how to calculate suggestions for any given input value. */\r\n private _getSuggestions = async (value: string): Promise<AutoSuggestData[]> => {\r\n if (typeof this.props.options === \"function\")\r\n return Promise.resolve(this.props.options(value));\r\n\r\n if (this.props.getSuggestions)\r\n return this.props.getSuggestions(value);\r\n\r\n if (this.props.options === undefined) {\r\n Logger.logError(UiCore.loggerCategory(this), `props.options or props.getSuggestions should be provided`);\r\n return Promise.resolve([]);\r\n }\r\n\r\n const inputValue = value.trim().toLowerCase();\r\n const inputLength = inputValue.length;\r\n\r\n return Promise.resolve(\r\n inputLength === 0 ?\r\n /* istanbul ignore next */[] :\r\n this.props.options.filter((data: AutoSuggestData) => {\r\n return data.label.toLowerCase().includes(inputValue) || data.value.toLowerCase().includes(inputValue);\r\n })\r\n );\r\n };\r\n\r\n /** When suggestion is clicked, Autosuggest needs to populate the input based on the clicked suggestion. */\r\n private _getSuggestionValue = (suggestion: AutoSuggestData) => suggestion.label;\r\n\r\n /** Render each suggestion. */\r\n private _renderSuggestion = (suggestion: AutoSuggestData) => (\r\n <span>\r\n {suggestion.label}\r\n </span>\r\n );\r\n\r\n private getLabel(value: string | undefined): string {\r\n let label = \"\";\r\n\r\n if (this.props.getLabel) {\r\n label = this.props.getLabel(value);\r\n } else if (this.props.options instanceof Array) {\r\n const entry = this.props.options.find((data: AutoSuggestData) => data.value === value);\r\n if (entry)\r\n label = entry.label;\r\n } else {\r\n Logger.logError(UiCore.loggerCategory(this), `props.getLabel should be provided when props.options is a function`);\r\n }\r\n\r\n return label;\r\n }\r\n\r\n private _handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n switch (e.key) {\r\n case SpecialKey.Enter:\r\n // istanbul ignore else\r\n if (this.props.onPressEnter)\r\n this.props.onPressEnter(e);\r\n break;\r\n case SpecialKey.Escape:\r\n // istanbul ignore else\r\n if (this.props.onPressEscape)\r\n this.props.onPressEscape(e);\r\n break;\r\n case SpecialKey.Tab:\r\n // istanbul ignore else\r\n if (this.props.onPressTab)\r\n this.props.onPressTab(e);\r\n break;\r\n }\r\n };\r\n\r\n private _theme = {\r\n container: \"uicore-autosuggest__container\",\r\n containerOpen: \"uicore-autosuggest__container--open\",\r\n input: \"iui-input uicore-autosuggest__input\",\r\n inputOpen: \"uicore-autosuggest__input--open\",\r\n inputFocused: \"uicore-autosuggest__input--focused\",\r\n suggestionsContainer: \"uicore-autosuggest__suggestions-container\",\r\n suggestionsContainerOpen: \"uicore-autosuggest__suggestions-container--open\",\r\n suggestionsList: \"uicore-autosuggest__suggestions-list\",\r\n suggestion: \"uicore-autosuggest__suggestion\",\r\n suggestionFirst: \"uicore-autosuggest__suggestion--first\",\r\n suggestionHighlighted: \"uicore-autosuggest__suggestion--highlighted\",\r\n sectionContainer: \"uicore-autosuggest__section-container\",\r\n sectionContainerFirst: \"uicore-autosuggest__section-container--first\",\r\n sectionTitle: \"uicore-autosuggest__section-title\",\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const { inputValue, suggestions } = this.state;\r\n const { value, onChange, placeholder, options, onSuggestionSelected, setFocus, alwaysRenderSuggestions, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onPressEnter, onPressEscape, onPressTab, onInputFocus, getLabel, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n getSuggestions, // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-unused-vars\r\n renderInputComponent, renderSuggestionsContainer, onSuggestionsClearRequested, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const inputPlaceholder = (!inputValue) ? placeholder : undefined;\r\n\r\n const inputProps: ReactAutosuggest.InputProps<AutoSuggestData> = {\r\n ...props,\r\n value: inputValue,\r\n onChange: this._onChange,\r\n onFocus: this._onFocus,\r\n placeholder: inputPlaceholder,\r\n autoFocus: setFocus,\r\n };\r\n\r\n return (\r\n // The onKeyDown event handler is only being used to capture bubbled events\r\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\r\n <div className={this.props.className} style={this.props.style} onKeyDown={this._handleKeyDown}>\r\n <ReactAutosuggest\r\n theme={this._theme}\r\n suggestions={suggestions}\r\n onSuggestionsFetchRequested={this._onSuggestionsFetchRequested}\r\n onSuggestionsClearRequested={this._onSuggestionsClearRequested}\r\n getSuggestionValue={this._getSuggestionValue}\r\n renderSuggestion={this._renderSuggestion}\r\n inputProps={inputProps}\r\n onSuggestionSelected={this._onSuggestionSelected}\r\n alwaysRenderSuggestions={alwaysRenderSuggestions}\r\n renderInputComponent={renderInputComponent}\r\n renderSuggestionsContainer={renderSuggestionsContainer}\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -5,17 +5,14 @@
|
|
|
5
5
|
@import "../scrollbar";
|
|
6
6
|
@import "../inputs/variables";
|
|
7
7
|
@import "../style/variables";
|
|
8
|
-
@import "~@itwin/itwinui-css/scss/inputs/input";
|
|
9
|
-
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
10
8
|
|
|
11
9
|
.uicore-autosuggest__container {
|
|
12
10
|
position: relative;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
.uicore-autosuggest__input {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
padding: $uicore-iui-input-padding;
|
|
14
|
+
min-height: $uicore-component-height-normal !important;
|
|
15
|
+
padding: $uicore-iui-input-padding !important;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
.uicore-autosuggest__input--focused {
|
|
@@ -40,8 +37,8 @@
|
|
|
40
37
|
position: absolute;
|
|
41
38
|
top: 24px;
|
|
42
39
|
width: 100%;
|
|
43
|
-
border: 1px solid
|
|
44
|
-
background-color:
|
|
40
|
+
border: 1px solid var(--iui-color-border-foreground);
|
|
41
|
+
background-color: var(--iui-color-background);
|
|
45
42
|
border-bottom-left-radius: 4px;
|
|
46
43
|
border-bottom-right-radius: 4px;
|
|
47
44
|
box-sizing: border-box;
|
|
@@ -65,7 +62,7 @@
|
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
.uicore-autosuggest__suggestion--highlighted {
|
|
68
|
-
background-color:
|
|
65
|
+
background-color: var(--iui-color-background-accent-muted);
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
.uicore-autosuggest__section-container {
|
|
@@ -78,6 +75,6 @@
|
|
|
78
75
|
|
|
79
76
|
.uicore-autosuggest__section-title {
|
|
80
77
|
padding: 10px 0 0 10px;
|
|
81
|
-
font-size:
|
|
78
|
+
font-size: var(--iui-font-size-0);
|
|
82
79
|
color: $buic-background-table-header;
|
|
83
|
-
}
|
|
80
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"BetaBadge.d.ts","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,eAS3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BetaBadge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"BetaBadge.js","sourceRoot":"","sources":["../../../../src/core-react/badge/BetaBadge.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAAoC;AACpC,+BAA+B;AAE/B,mCAAgC;AAChC,+EAA0D;AAE1D;;GAEG;AACH,SAAgB,SAAS,CAAC,KAAkB;IAC1C,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,sBAAsB,EACjD,KAAK,CAAC,SAAS,CAChB,CAAC;IACF,OAAO,oBAAC,aAAK,OACP,KAAK,EACT,GAAG,EAAE,qCAAa,EAClB,SAAS,EAAE,SAAS,GACpB,CAAC;AACL,CAAC;AATD,8BASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Badge } from \"./Badge\";\r\nimport betaBadgeIcon from \"./technical-preview-badge.svg\";\r\n\r\n/** Beta Badge React component\r\n * @internal\r\n */\r\nexport function BetaBadge(props: CommonProps) {\r\n const className = classnames(\"core-badge-betaBadge\",\r\n props.className,\r\n );\r\n return <Badge\r\n {...props}\r\n svg={betaBadgeIcon}\r\n className={className}\r\n />;\r\n}\r\n"]}
|
|
@@ -3,23 +3,15 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "../style/index";
|
|
6
|
-
|
|
7
6
|
@import "./button";
|
|
8
7
|
@import "./disabled";
|
|
9
8
|
|
|
10
|
-
|
|
11
9
|
@mixin uicore-buttons-blue {
|
|
12
|
-
|
|
13
10
|
@include uicore-buttons-button;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
color: $buic-accessory-hollow;
|
|
11
|
+
background: var(--iui-color-background-accent);
|
|
12
|
+
color: var(--iui-color-white);
|
|
17
13
|
|
|
18
14
|
&:hover {
|
|
19
|
-
background-color:
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:active {
|
|
23
|
-
background-color: $uicore-blue-4;
|
|
15
|
+
background-color: var(--iui-color-background-accent-hover);
|
|
24
16
|
}
|
|
25
17
|
}
|
|
@@ -3,35 +3,30 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "./variables";
|
|
6
|
-
@import "~@itwin/itwinui-css/scss/style/speed";
|
|
7
|
-
@import "~@itwin/itwinui-css/scss/style/typography";
|
|
8
|
-
@import "~@itwin/itwinui-css/scss/style/variables";
|
|
9
6
|
|
|
10
7
|
// cspell:ignore unbordered
|
|
11
8
|
|
|
12
9
|
/// Mixins ---------------------------------------------------------------------
|
|
13
10
|
|
|
14
11
|
@mixin uicore-buttons-button {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
font-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
box-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
transition: all $iui-speed-fast ease-in-out;
|
|
12
|
+
display: inline-block;
|
|
13
|
+
|
|
14
|
+
padding: $uicore-button-padding $uicore-unbordered-padding;
|
|
15
|
+
margin: $uicore-inputs-margin 0;
|
|
16
|
+
border-radius: var(--iui-border-radius-1);
|
|
17
|
+
line-height: $uicore-button-line-height;
|
|
18
|
+
outline: none;
|
|
19
|
+
font-family: var(--iui-font-sans);
|
|
20
|
+
font-size: var(--iui-font-size-1);
|
|
21
|
+
text-decoration: none;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
box-shadow: transparent 0px 1px 1px inset;
|
|
25
|
+
border: 1px solid transparent;
|
|
26
|
+
transition: all var(--iui-duration-1) ease-in-out;
|
|
31
27
|
|
|
32
28
|
&:active,
|
|
33
29
|
&:focus {
|
|
34
|
-
|
|
35
30
|
@include uicore-buttons-button-focused;
|
|
36
31
|
}
|
|
37
32
|
|
|
@@ -39,43 +34,37 @@
|
|
|
39
34
|
&[disabled]:hover,
|
|
40
35
|
&[disabled]:active,
|
|
41
36
|
&[disabled]:focus {
|
|
42
|
-
|
|
43
37
|
@include uicore-buttons-button-disabled;
|
|
44
38
|
}
|
|
45
39
|
}
|
|
46
40
|
|
|
47
41
|
@mixin uicore-buttons-button-focused {
|
|
48
|
-
|
|
49
|
-
box-shadow: $uicore-button-focus-boxshadow;
|
|
42
|
+
box-shadow: $uicore-button-focus-boxshadow;
|
|
50
43
|
}
|
|
51
44
|
|
|
52
45
|
@mixin uicore-buttons-button-unbordered {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
box-shadow: transparent 0px 1px 1px inset;
|
|
46
|
+
border-color: transparent;
|
|
47
|
+
box-shadow: transparent 0px 1px 1px inset;
|
|
56
48
|
}
|
|
57
49
|
|
|
58
50
|
@mixin uicore-buttons-button-disabled {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
cursor: not-allowed;
|
|
51
|
+
opacity: $uicore-opacity-disabled;
|
|
52
|
+
background-color: $uicore-gray;
|
|
53
|
+
border: 0;
|
|
54
|
+
color: var(--iui-color-white);
|
|
55
|
+
cursor: not-allowed;
|
|
65
56
|
}
|
|
66
57
|
|
|
67
58
|
@mixin uicore-buttons-large-size {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
font-
|
|
72
|
-
font-weight: $iui-font-weight-normal;
|
|
59
|
+
padding: $uicore-inputs-padding-large $uicore-unbordered-padding-large;
|
|
60
|
+
margin: $uicore-inputs-margin-large 0;
|
|
61
|
+
font-size: var(--iui-font-size-2);
|
|
62
|
+
font-weight: var(--iui-font-weight-normal);
|
|
73
63
|
}
|
|
74
64
|
|
|
75
65
|
@mixin uicore-buttons-large-bordered-size {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
font-
|
|
80
|
-
font-weight: $iui-font-weight-normal;
|
|
66
|
+
padding: $uicore-button-padding-bordered-large $uicore-bordered-padding-large;
|
|
67
|
+
margin: $uicore-inputs-margin-large 0;
|
|
68
|
+
font-size: var(--iui-font-size-2);
|
|
69
|
+
font-weight: var(--iui-font-weight-normal);
|
|
81
70
|
}
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
@include uicore-buttons-button;
|
|
14
14
|
|
|
15
15
|
padding: $uicore-button-padding-bordered $uicore-bordered-padding;
|
|
16
|
-
border-color:
|
|
16
|
+
border-color: var(--iui-color-border-foreground);
|
|
17
17
|
background-color: transparent;
|
|
18
|
-
color:
|
|
18
|
+
color: var(--iui-color-text);
|
|
19
19
|
|
|
20
20
|
&:hover {
|
|
21
21
|
|
|
22
|
-
border-color:
|
|
23
|
-
color:
|
|
22
|
+
border-color: var(--iui-color-border-foreground-hover);
|
|
23
|
+
color: var(--iui-color-text-hover);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
&:active, &:focus {
|
|
27
27
|
|
|
28
|
-
border-color:
|
|
28
|
+
border-color: var(--iui-color-border-foreground-hover);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -3,23 +3,15 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "../style/index";
|
|
6
|
-
|
|
7
6
|
@import "./button";
|
|
8
7
|
@import "./disabled";
|
|
9
8
|
|
|
10
|
-
|
|
11
9
|
@mixin uicore-buttons-primary {
|
|
12
|
-
|
|
13
10
|
@include uicore-buttons-button;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
color: $buic-accessory-hollow;
|
|
11
|
+
background: var(--iui-color-background-positive);
|
|
12
|
+
color: var(--iui-color-white);
|
|
17
13
|
|
|
18
14
|
&:hover {
|
|
19
|
-
background-color:
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:active {
|
|
23
|
-
background-color: $uicore-green-4;
|
|
15
|
+
background-color: var(--iui-color-background-positive-hover);
|
|
24
16
|
}
|
|
25
17
|
}
|
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
// cspell:ignore unbordered
|
|
10
10
|
|
|
11
11
|
$uicore-button-height: 28px;
|
|
12
|
-
$uicore-button-line-height:
|
|
13
|
-
$uicore-button-padding: (
|
|
14
|
-
0.5
|
|
15
|
-
|
|
16
|
-
$uicore-button-padding-bordered
|
|
17
|
-
$uicore-
|
|
18
|
-
$uicore-
|
|
12
|
+
$uicore-button-line-height: calc(var(--iui-size-s) * 1.5);
|
|
13
|
+
$uicore-button-padding: calc(
|
|
14
|
+
(#{$uicore-button-height} - #{$uicore-button-line-height}) * 0.5
|
|
15
|
+
);
|
|
16
|
+
$uicore-button-padding-bordered: calc(#{$uicore-button-padding} - 1px);
|
|
17
|
+
$uicore-button-padding-bordered-large: calc(
|
|
18
|
+
#{$uicore-inputs-padding-large} - 1px
|
|
19
|
+
);
|
|
20
|
+
$uicore-unbordered-padding: var(--iui-size-s);
|
|
21
|
+
$uicore-bordered-padding: calc(#{$uicore-unbordered-padding} - 1px);
|
|
19
22
|
$uicore-button-focus-boxshadow: $buic-focus-boxshadow 0px 0px 0px 2px;
|