omim
Version:
Material Design for Omi.
347 lines (309 loc) • 35.3 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("omi"));
else if(typeof define === 'function' && define.amd)
define(["omi"], factory);
else if(typeof exports === 'object')
exports["MMenu"] = factory(require("omi"));
else
root["MMenu"] = factory(root["Omi"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE_omi__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/menu/index.tsx");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/menu/index.scss":
/*!******************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/menu/index.scss ***!
\******************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports
// module
exports.push([module.i, ".mdc-list {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 1rem;\n line-height: 1.75rem;\n font-weight: 400;\n letter-spacing: 0.00937em;\n text-decoration: inherit;\n text-transform: inherit;\n /* @alternate */\n line-height: 1.5rem;\n margin: 0;\n padding: 8px 0;\n list-style-type: none;\n color: rgba(0, 0, 0, 0.87);\n /* @alternate */\n color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); }\n .mdc-list:focus {\n outline: none; }\n\n.mdc-list-item__secondary-text {\n color: rgba(0, 0, 0, 0.54);\n /* @alternate */\n color: var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54)); }\n\n.mdc-list-item__graphic {\n background-color: transparent; }\n\n.mdc-list-item__graphic {\n color: rgba(0, 0, 0, 0.38);\n /* @alternate */\n color: var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38)); }\n\n.mdc-list-item__meta {\n color: rgba(0, 0, 0, 0.38);\n /* @alternate */\n color: var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38)); }\n\n.mdc-list-group__subheader {\n color: rgba(0, 0, 0, 0.87);\n /* @alternate */\n color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87)); }\n\n.mdc-list--dense {\n padding-top: 4px;\n padding-bottom: 4px;\n font-size: .812rem; }\n\n.mdc-list-item {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: flex-start;\n height: 48px;\n padding: 0 16px;\n overflow: hidden; }\n .mdc-list-item:focus {\n outline: none; }\n\n.mdc-list-item--selected,\n.mdc-list-item--activated {\n color: #0072d9;\n /* @alternate */\n color: var(--mdc-theme-primary, #0072d9); }\n .mdc-list-item--selected .mdc-list-item__graphic,\n .mdc-list-item--activated .mdc-list-item__graphic {\n color: #0072d9;\n /* @alternate */\n color: var(--mdc-theme-primary, #0072d9); }\n\n.mdc-list-item--disabled {\n color: rgba(0, 0, 0, 0.38);\n /* @alternate */\n color: var(--mdc-theme-text-disabled-on-background, rgba(0, 0, 0, 0.38)); }\n\n.mdc-list-item__graphic {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 32px;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n fill: currentColor; }\n .mdc-list-item[dir=\"rtl\"] .mdc-list-item__graphic,\n [dir=\"rtl\"] .mdc-list-item .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 32px;\n /* @noflip */\n margin-right: 0; }\n\n.mdc-list .mdc-list-item__graphic {\n display: inline-flex; }\n\n.mdc-list-item__meta {\n /* @noflip */\n margin-left: auto;\n /* @noflip */\n margin-right: 0; }\n .mdc-list-item__meta:not(.material-icons) {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 0.75rem;\n line-height: 1.25rem;\n font-weight: 400;\n letter-spacing: 0.03333em;\n text-decoration: inherit;\n text-transform: inherit; }\n .mdc-list-item[dir=\"rtl\"] .mdc-list-item__meta,\n [dir=\"rtl\"] .mdc-list-item .mdc-list-item__meta {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: auto; }\n\n.mdc-list-item__text {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden; }\n\n.mdc-list-item__text[for] {\n pointer-events: none; }\n\n.mdc-list-item__primary-text {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: block;\n margin-top: 0;\n /* @alternate */\n line-height: normal;\n margin-bottom: -20px;\n display: block; }\n .mdc-list-item__primary-text::before {\n display: inline-block;\n width: 0;\n height: 32px;\n content: \"\";\n vertical-align: 0; }\n .mdc-list-item__primary-text::after {\n display: inline-block;\n width: 0;\n height: 20px;\n content: \"\";\n vertical-align: -20px; }\n .mdc-list--dense .mdc-list-item__primary-text {\n display: block;\n margin-top: 0;\n /* @alternate */\n line-height: normal;\n margin-bottom: -20px; }\n .mdc-list--dense .mdc-list-item__primary-text::before {\n display: inline-block;\n width: 0;\n height: 24px;\n content: \"\";\n vertical-align: 0; }\n .mdc-list--dense .mdc-list-item__primary-text::after {\n display: inline-block;\n width: 0;\n height: 20px;\n content: \"\";\n vertical-align: -20px; }\n\n.mdc-list-item__secondary-text {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 400;\n letter-spacing: 0.01786em;\n text-decoration: inherit;\n text-transform: inherit;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: block;\n margin-top: 0;\n /* @alternate */\n line-height: normal;\n display: block; }\n .mdc-list-item__secondary-text::before {\n display: inline-block;\n width: 0;\n height: 20px;\n content: \"\";\n vertical-align: 0; }\n .mdc-list--dense .mdc-list-item__secondary-text {\n display: block;\n margin-top: 0;\n /* @alternate */\n line-height: normal;\n font-size: inherit; }\n .mdc-list--dense .mdc-list-item__secondary-text::before {\n display: inline-block;\n width: 0;\n height: 20px;\n content: \"\";\n vertical-align: 0; }\n\n.mdc-list--dense .mdc-list-item {\n height: 40px; }\n\n.mdc-list--dense .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 36px;\n width: 20px;\n height: 20px; }\n .mdc-list-item[dir=\"rtl\"] .mdc-list--dense .mdc-list-item__graphic,\n [dir=\"rtl\"] .mdc-list-item .mdc-list--dense .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 36px;\n /* @noflip */\n margin-right: 0; }\n\n.mdc-list--avatar-list .mdc-list-item {\n height: 56px; }\n\n.mdc-list--avatar-list .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%; }\n .mdc-list-item[dir=\"rtl\"] .mdc-list--avatar-list .mdc-list-item__graphic,\n [dir=\"rtl\"] .mdc-list-item .mdc-list--avatar-list .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 16px;\n /* @noflip */\n margin-right: 0; }\n\n.mdc-list--two-line .mdc-list-item__text {\n align-self: flex-start; }\n\n.mdc-list--two-line .mdc-list-item {\n height: 72px; }\n\n.mdc-list--two-line.mdc-list--dense .mdc-list-item,\n.mdc-list--avatar-list.mdc-list--dense .mdc-list-item {\n height: 60px; }\n\n.mdc-list--avatar-list.mdc-list--dense .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 20px;\n width: 36px;\n height: 36px; }\n .mdc-list-item[dir=\"rtl\"] .mdc-list--avatar-list.mdc-list--dense .mdc-list-item__graphic,\n [dir=\"rtl\"] .mdc-list-item .mdc-list--avatar-list.mdc-list--dense .mdc-list-item__graphic {\n /* @noflip */\n margin-left: 20px;\n /* @noflip */\n margin-right: 0; }\n\n:not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item {\n cursor: pointer; }\n\na.mdc-list-item {\n color: inherit;\n text-decoration: none; }\n\n.mdc-list-divider {\n height: 0;\n margin: 0;\n border: none;\n border-bottom-width: 1px;\n border-bottom-style: solid; }\n\n.mdc-list-divider {\n border-bottom-color: rgba(0, 0, 0, 0.12); }\n\n.mdc-list-divider--padded {\n margin: 0 16px; }\n\n.mdc-list-divider--inset {\n /* @noflip */\n margin-left: 72px;\n /* @noflip */\n margin-right: 0;\n width: calc(100% - 72px); }\n .mdc-list-group[dir=\"rtl\"] .mdc-list-divider--inset,\n [dir=\"rtl\"] .mdc-list-group .mdc-list-divider--inset {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 72px; }\n\n.mdc-list-divider--inset.mdc-list-divider--padded {\n width: calc(100% - 72px - 16px); }\n\n.mdc-list-group .mdc-list {\n padding: 0; }\n\n.mdc-list-group__subheader {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 1rem;\n line-height: 1.75rem;\n font-weight: 400;\n letter-spacing: 0.00937em;\n text-decoration: inherit;\n text-transform: inherit;\n margin: 0.75rem 16px; }\n\n@keyframes mdc-ripple-fg-radius-in {\n from {\n animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); }\n to {\n transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); } }\n\n@keyframes mdc-ripple-fg-opacity-in {\n from {\n animation-timing-function: linear;\n opacity: 0; }\n to {\n opacity: var(--mdc-ripple-fg-opacity, 0); } }\n\n@keyframes mdc-ripple-fg-opacity-out {\n from {\n animation-timing-function: linear;\n opacity: var(--mdc-ripple-fg-opacity, 0); }\n to {\n opacity: 0; } }\n\n.mdc-ripple-surface--test-edge-var-bug {\n --mdc-ripple-surface-test-edge-var: 1px solid #000;\n visibility: hidden; }\n .mdc-ripple-surface--test-edge-var-bug::before {\n border: var(--mdc-ripple-surface-test-edge-var); }\n\n:not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item {\n --mdc-ripple-fg-size: 0;\n --mdc-ripple-left: 0;\n --mdc-ripple-top: 0;\n --mdc-ripple-fg-scale: 1;\n --mdc-ripple-fg-translate-end: 0;\n --mdc-ripple-fg-translate-start: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::after {\n position: absolute;\n border-radius: 50%;\n opacity: 0;\n pointer-events: none;\n content: \"\"; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::before {\n transition: opacity 15ms linear, background-color 15ms linear;\n z-index: 1; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded::before {\n transform: scale(var(--mdc-ripple-fg-scale, 1)); }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded::after {\n top: 0;\n /* @noflip */\n left: 0;\n transform: scale(0);\n transform-origin: center center; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--unbounded::after {\n top: var(--mdc-ripple-top, 0);\n /* @noflip */\n left: var(--mdc-ripple-left, 0); }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-activation::after {\n animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--foreground-deactivation::after {\n animation: mdc-ripple-fg-opacity-out 150ms;\n transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::after {\n top: calc(50% - 100%);\n /* @noflip */\n left: calc(50% - 100%);\n width: 200%;\n height: 200%; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded::after {\n width: var(--mdc-ripple-fg-size, 100%);\n height: var(--mdc-ripple-fg-size, 100%); }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item::after {\n background-color: #000000; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item:hover::before {\n opacity: 0.04; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):focus::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.12; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded)::after {\n transition: opacity 150ms linear; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item:not(.mdc-ripple-upgraded):active::after {\n transition-duration: 75ms;\n opacity: 0.12; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item.mdc-ripple-upgraded {\n --mdc-ripple-fg-opacity: 0.12; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated::before {\n opacity: 0.12; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated::after {\n background-color: #0072d9; }\n @supports not (-ms-ime-align: auto) {\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated::after {\n /* @alternate */\n background-color: var(--mdc-theme-primary, #0072d9); } }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated:hover::before {\n opacity: 0.16; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):focus::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.24; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded)::after {\n transition: opacity 150ms linear; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated:not(.mdc-ripple-upgraded):active::after {\n transition-duration: 75ms;\n opacity: 0.24; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--activated.mdc-ripple-upgraded {\n --mdc-ripple-fg-opacity: 0.24; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected::before {\n opacity: 0.08; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected::after {\n background-color: #0072d9; }\n @supports not (-ms-ime-align: auto) {\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected::after {\n /* @alternate */\n background-color: var(--mdc-theme-primary, #0072d9); } }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected:hover::before {\n opacity: 0.12; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):focus::before, :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.2; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded)::after {\n transition: opacity 150ms linear; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected:not(.mdc-ripple-upgraded):active::after {\n transition-duration: 75ms;\n opacity: 0.2; }\n :not(.mdc-list--non-interactive) > :not(.mdc-list-item--disabled).mdc-list-item--selected.mdc-ripple-upgraded {\n --mdc-ripple-fg-opacity: 0.2; }\n\n:not(.mdc-list--non-interactive) > .mdc-list-item--disabled {\n --mdc-ripple-fg-size: 0;\n --mdc-ripple-left: 0;\n --mdc-ripple-top: 0;\n --mdc-ripple-fg-scale: 1;\n --mdc-ripple-fg-translate-end: 0;\n --mdc-ripple-fg-translate-start: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::before, :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::after {\n position: absolute;\n border-radius: 50%;\n opacity: 0;\n pointer-events: none;\n content: \"\"; }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::before {\n transition: opacity 15ms linear, background-color 15ms linear;\n z-index: 1; }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded::before {\n transform: scale(var(--mdc-ripple-fg-scale, 1)); }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded::after {\n top: 0;\n /* @noflip */\n left: 0;\n transform: scale(0);\n transform-origin: center center; }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded--unbounded::after {\n top: var(--mdc-ripple-top, 0);\n /* @noflip */\n left: var(--mdc-ripple-left, 0); }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded--foreground-activation::after {\n animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards; }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded--foreground-deactivation::after {\n animation: mdc-ripple-fg-opacity-out 150ms;\n transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::before, :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::after {\n top: calc(50% - 100%);\n /* @noflip */\n left: calc(50% - 100%);\n width: 200%;\n height: 200%; }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded::after {\n width: var(--mdc-ripple-fg-size, 100%);\n height: var(--mdc-ripple-fg-size, 100%); }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::before, :not(.mdc-list--non-interactive) > .mdc-list-item--disabled::after {\n background-color: #000000; }\n :not(.mdc-list--non-interactive) > .mdc-list-item--disabled:not(.mdc-ripple-upgraded):focus::before, :not(.mdc-list--non-interactive) > .mdc-list-item--disabled.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.12; }\n\n.mdc-menu-surface {\n display: none;\n position: absolute;\n box-sizing: border-box;\n max-width: calc(100vw - 32px);\n max-height: calc(100vh - 32px);\n margin: 0;\n padding: 0;\n transform: scale(1);\n transform-origin: top left;\n opacity: 0;\n overflow: auto;\n will-change: transform, opacity;\n z-index: 8;\n transition: opacity 0.03s linear, transform 0.12s cubic-bezier(0, 0, 0.2, 1);\n box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);\n background-color: #ffffff;\n /* @alternate */\n background-color: var(--mdc-theme-surface, #ffffff);\n color: #000000;\n /* @alternate */\n color: var(--mdc-theme-on-surface, #000000);\n border-radius: 4px;\n /* @noflip */\n transform-origin-left: top left;\n /* @noflip */\n transform-origin-right: top right; }\n .mdc-menu-surface:focus {\n outline: none; }\n .mdc-menu-surface--open {\n display: inline-block;\n transform: scale(1);\n opacity: 1; }\n .mdc-menu-surface--animating-open {\n display: inline-block;\n transform: scale(0.8);\n opacity: 0; }\n .mdc-menu-surface--animating-closed {\n display: inline-block;\n opacity: 0;\n transition: opacity 0.075s linear; }\n [dir=\"rtl\"] .mdc-menu-surface, .mdc-menu-surface[dir=\"rtl\"] {\n /* @noflip */\n transform-origin-left: top right;\n /* @noflip */\n transform-origin-right: top left; }\n\n.mdc-menu-surface--anchor {\n position: relative;\n overflow: visible; }\n\n.mdc-menu-surface--fixed {\n position: fixed; }\n\n.mdc-menu {\n min-width: 112px; }\n .mdc-menu .mdc-list-item__meta {\n color: rgba(0, 0, 0, 0.87); }\n .mdc-menu .mdc-list-item__graphic {\n color: rgba(0, 0, 0, 0.87); }\n .mdc-menu .mdc-list {\n color: rgba(0, 0, 0, 0.87); }\n .mdc-menu .mdc-list-divider {\n margin: 8px 0; }\n .mdc-menu .mdc-list-item {\n user-select: none; }\n .mdc-menu .mdc-list-item--disabled {\n cursor: auto; }\n .mdc-menu a.mdc-list-item .mdc-list-item__text,\n .mdc-menu a.mdc-list-item .mdc-list-item__graphic {\n pointer-events: none; }\n\n.mdc-menu__selection-group {\n padding: 0;\n fill: currentColor; }\n .mdc-menu__selection-group .mdc-list-item {\n /* @noflip */\n padding-left: 56px;\n /* @noflip */\n padding-right: 16px; }\n [dir=\"rtl\"] .mdc-menu__selection-group .mdc-list-item, .mdc-menu__selection-group .mdc-list-item[dir=\"rtl\"] {\n /* @noflip */\n padding-left: 16px;\n /* @noflip */\n padding-right: 56px; }\n .mdc-menu__selection-group .mdc-menu__selection-group-icon {\n /* @noflip */\n left: 16px;\n /* @noflip */\n right: initial;\n display: none;\n position: absolute; }\n [dir=\"rtl\"] .mdc-menu__selection-group .mdc-menu__selection-group-icon, .mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=\"rtl\"] {\n /* @noflip */\n left: initial;\n /* @noflip */\n right: 16px; }\n\n.mdc-menu-item--selected .mdc-menu__selection-group-icon {\n display: inline; }\n\n:host {\n display: inline-block; }\n\n.mdc-menu-surface {\n position: unset;\n opacity: 1;\n display: block; }\n", ""]);
// exports
/***/ }),
/***/ "./node_modules/css-loader/lib/css-base.js":
/*!*************************************************!*\
!*** ./node_modules/css-loader/lib/css-base.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function(useSourceMap) {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = cssWithMappingToString(item, useSourceMap);
if(item[2]) {
return "@media " + item[2] + "{" + content + "}";
} else {
return content;
}
}).join("");
};
// import a list of modules into the list
list.i = function(modules, mediaQuery) {
if(typeof modules === "string")
modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for(var i = 0; i < this.length; i++) {
var id = this[i][0];
if(typeof id === "number")
alreadyImportedModules[id] = true;
}
for(i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if(mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if(mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
function cssWithMappingToString(item, useSourceMap) {
var content = item[1] || '';
var cssMapping = item[3];
if (!cssMapping) {
return content;
}
if (useSourceMap && typeof btoa === 'function') {
var sourceMapping = toComment(cssMapping);
var sourceURLs = cssMapping.sources.map(function (source) {
return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
});
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
}
return [content].join('\n');
}
// Adapted from convert-source-map (MIT)
function toComment(sourceMap) {
// eslint-disable-next-line no-undef
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
return '/*# ' + data + ' */';
}
/***/ }),
/***/ "./src/menu/index.scss":
/*!*****************************!*\
!*** ./src/menu/index.scss ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var result = __webpack_require__(/*! !../../node_modules/css-loader!../../node_modules/resolve-url-loader!../../node_modules/sass-loader/dist/cjs.js??ref--4-3!./index.scss */ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/menu/index.scss");
if (typeof result === "string") {
module.exports = result;
} else {
module.exports = result.toString();
}
/***/ }),
/***/ "./src/menu/index.tsx":
/*!****************************!*\
!*** ./src/menu/index.tsx ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var omi_1 = __webpack_require__(/*! omi */ "omi");
var css = __webpack_require__(/*! ./index.scss */ "./src/menu/index.scss");
//@ts-ignore
__webpack_require__(/*! ../theme.ts */ "./src/theme.ts");
var Menu = /** @class */ (function (_super) {
__extends(Menu, _super);
function Menu() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.clickHandler = function (item) {
if (!item.disabled) {
_this.fire('selected', item);
}
};
return _this;
}
Menu.prototype.render = function (props) {
var _this = this;
return (omi_1.h("div", __assign({}, omi_1.extractClass(props, 'mdc-menu mdc-menu-surface'), { tabIndex: -1 }),
omi_1.h("ul", { class: "mdc-list", role: "menu", "aria-hidden": "true", "aria-orientation": "vertical" }, props.list.map(function (item) { return omi_1.h("li", { onClick: function (_) { return _this.clickHandler(item); }, class: "mdc-list-item", role: "menuitem" },
omi_1.h("span", { class: omi_1.classNames('mdc-list-item__text', {
'mdc-list-item--disabled': item.disabled
}) }, item.text)); }))));
};
Menu.css = css;
Menu.defaultProps = {};
Menu.propTypes = {
list: Object
};
Menu = __decorate([
omi_1.tag('m-menu')
], Menu);
return Menu;
}(omi_1.WeElement));
exports.default = Menu;
/***/ }),
/***/ "./src/theme.ts":
/*!**********************!*\
!*** ./src/theme.ts ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
theme();
document.addEventListener('DOMContentLoaded', function () {
theme();
});
function theme() {
if (document.body && !document.body.style.getPropertyValue('--mdc-theme-primary')) {
document.body.style.setProperty('--mdc-theme-primary', '#0072d9');
document.body.style.setProperty('--mdc-theme-secondary', '#2170b8');
document.body.style.setProperty('--mdc-theme-error', '#f5222d');
document.body.style.setProperty('--mdc-theme-surface', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-primary', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-secondary', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-error', '#ffffff');
document.body.style.setProperty('--mdc-theme-on-surface', '#000000');
document.body.style.setProperty('--mdc-theme-background', '#ffffff');
document.body.style.setProperty('--mdc-shape-small-component-radius', '4px');
document.body.style.setProperty('--mdc-shape-medium-component-radius', '4px');
document.body.style.setProperty('--mdc-shape-large-component-radius', '0px');
document.body.style.setProperty('--mdc-typography--font-family', 'Roboto, sans-serif');
}
}
/***/ }),
/***/ "omi":
/*!******************************************************************************!*\
!*** external {"commonjs":"omi","commonjs2":"omi","amd":"omi","root":"Omi"} ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;
/***/ })
/******/ })["default"];
});
//# sourceMappingURL=index.js.map