@bigbinary/neeto-molecules 1.1.9 → 1.1.10
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.
|
@@ -745,10 +745,11 @@ var classnames$1 = {exports: {}};
|
|
|
745
745
|
var classnames = classnames$1.exports;
|
|
746
746
|
|
|
747
747
|
var KEY_SHORTFORM_MAP = {
|
|
748
|
-
command: "
|
|
748
|
+
command: "⌘",
|
|
749
749
|
escape: "esc",
|
|
750
750
|
control: "ctrl",
|
|
751
|
-
option: "opt"
|
|
751
|
+
option: "opt",
|
|
752
|
+
"return": "enter"
|
|
752
753
|
};
|
|
753
754
|
var MAC_TO_WINDOWS_KEYS_MAP = {
|
|
754
755
|
option: "alt",
|
|
@@ -761,6 +762,13 @@ var OS = {
|
|
|
761
762
|
windows: "Windows"
|
|
762
763
|
};
|
|
763
764
|
var FULL_SHORTCUTS_LINK_PROP_NAME = "fullShortcutsLink";
|
|
765
|
+
var TOOLTIP_CONTENT = {
|
|
766
|
+
"⌘": "command",
|
|
767
|
+
esc: "escape",
|
|
768
|
+
ctrl: "control",
|
|
769
|
+
opt: "option",
|
|
770
|
+
backspace: "delete"
|
|
771
|
+
};
|
|
764
772
|
|
|
765
773
|
function _typeof(obj) {
|
|
766
774
|
"@babel/helpers - typeof";
|
|
@@ -2099,6 +2107,16 @@ var getGlobalShortcuts = function getGlobalShortcuts() {
|
|
|
2099
2107
|
}
|
|
2100
2108
|
});
|
|
2101
2109
|
};
|
|
2110
|
+
var getTooltipProps = function getTooltipProps(key) {
|
|
2111
|
+
if (TOOLTIP_CONTENT[key]) {
|
|
2112
|
+
return {
|
|
2113
|
+
position: "top",
|
|
2114
|
+
content: TOOLTIP_CONTENT[key],
|
|
2115
|
+
followCursor: "horizontal"
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
return null;
|
|
2119
|
+
};
|
|
2102
2120
|
|
|
2103
2121
|
var HotKey = function HotKey(_ref) {
|
|
2104
2122
|
var description = _ref.description,
|
|
@@ -2131,7 +2149,8 @@ var HotKey = function HotKey(_ref) {
|
|
|
2131
2149
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
2132
2150
|
key: idx
|
|
2133
2151
|
}, /*#__PURE__*/React.createElement(Kbd, {
|
|
2134
|
-
keyName: keyName
|
|
2152
|
+
keyName: keyName,
|
|
2153
|
+
tooltipProps: getTooltipProps(keyName)
|
|
2135
2154
|
}), isSequentialHotkey && idx + 1 !== sequences.length && /*#__PURE__*/React.createElement(Kbd, {
|
|
2136
2155
|
keyName: "then"
|
|
2137
2156
|
}));
|