@nextcloud/vue
Version:
Nextcloud vue components
66 lines (65 loc) • 2.09 kB
JavaScript
require('../assets/NcKbd-BGW1_Jb7.css');
"use strict";
const Vue = require("vue");
const _l10n = require("../chunks/_l10n-DM-VRK9x.cjs");
const platform = require("../chunks/platform-oKxQ1agV.cjs");
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs");
_l10n.register();
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
__name: "NcKbd",
props: {
symbol: { default: void 0 },
mac: { type: [Boolean, null], default: platform.isMac }
},
setup(__props) {
const props = __props;
const labels = Vue.computed(() => ({
ArrowUp: "↑",
ArrowDown: "↓",
ArrowLeft: "←",
ArrowRight: "→",
Control: !props.mac ? _l10n.t("Ctrl") : "⌘",
Alt: !props.mac ? _l10n.t("Alt") : "⌥",
Shift: !props.mac ? _l10n.t("Shift") : "⇧",
Enter: !props.mac ? _l10n.t("Enter") : "⏎",
Tab: !props.mac ? _l10n.t("Tab") : "⇥",
Delete: !props.mac ? _l10n.t("Delete") : "⌫",
Escape: !props.mac ? _l10n.t("Escape") : "⎋",
Space: _l10n.t("Space")
// TRANSLATORS: Space key on keyboard
}));
const label = Vue.computed(() => props.symbol && labels.value[props.symbol] || props.symbol);
return { __sfc: true, props, labels, label };
}
});
const kbd = "_kbd_lf0a1_20";
const style0 = {
"material-design-icon": "_material-design-icon_lf0a1_12",
kbd
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
return _c("kbd", { class: _vm.$style.kbd }, [_vm._t("default", function() {
return [_vm._v(" " + _vm._s(_setup.label) + " ")];
})], 2);
};
var _sfc_staticRenderFns = [];
const __cssModules = {
"$style": style0
};
function _sfc_injectStyles(ctx) {
for (var key in __cssModules) {
this[key] = __cssModules[key];
}
}
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns,
false,
_sfc_injectStyles,
null
);
const NcKbd = __component__.exports;
module.exports = NcKbd;
//# sourceMappingURL=NcKbd.cjs.map