UNPKG

omim

Version:

Material Design for Omi.

589 lines (556 loc) 170 kB
(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["MCard"] = factory(require("omi")); else root["MCard"] = 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/card/index.tsx"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/css-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/card/index.scss": /*!******************************************************************************************************************************************!*\ !*** ./node_modules/css-loader!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/card/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-card {\n border-radius: 4px;\n background-color: #ffffff;\n /* @alternate */\n background-color: var(--mdc-theme-surface, #ffffff);\n box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);\n display: flex;\n flex-direction: column;\n box-sizing: border-box; }\n\n.mdc-card--outlined {\n box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);\n border-width: 1px;\n border-style: solid;\n border-color: #e0e0e0; }\n\n.mdc-card__media {\n position: relative;\n box-sizing: border-box;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover; }\n .mdc-card__media::before {\n display: block;\n content: \"\"; }\n\n.mdc-card__media:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit; }\n\n.mdc-card__media:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit; }\n\n.mdc-card__media--square::before {\n margin-top: 100%; }\n\n.mdc-card__media--16-9::before {\n margin-top: 56.25%; }\n\n.mdc-card__media-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-sizing: border-box; }\n\n.mdc-card__primary-action {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n position: relative;\n outline: none;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n overflow: hidden; }\n\n.mdc-card__primary-action:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit; }\n\n.mdc-card__primary-action:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit; }\n\n.mdc-card__actions {\n display: flex;\n flex-direction: row;\n align-items: center;\n box-sizing: border-box;\n min-height: 52px;\n padding: 8px; }\n\n.mdc-card__actions--full-bleed {\n padding: 0; }\n\n.mdc-card__action-buttons,\n.mdc-card__action-icons {\n display: flex;\n flex-direction: row;\n align-items: center;\n box-sizing: border-box; }\n\n.mdc-card__action-icons {\n color: rgba(0, 0, 0, 0.6);\n flex-grow: 1;\n justify-content: flex-end; }\n\n.mdc-card__action-buttons + .mdc-card__action-icons {\n /* @noflip */\n margin-left: 16px;\n /* @noflip */\n margin-right: 0; }\n [dir=\"rtl\"] .mdc-card__action-buttons + .mdc-card__action-icons, .mdc-card__action-buttons + .mdc-card__action-icons[dir=\"rtl\"] {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 16px; }\n\n.mdc-card__action {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n box-sizing: border-box;\n justify-content: center;\n cursor: pointer;\n user-select: none; }\n .mdc-card__action:focus {\n outline: none; }\n\n.mdc-card__action--button {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 8px;\n padding: 0 8px; }\n [dir=\"rtl\"] .mdc-card__action--button, .mdc-card__action--button[dir=\"rtl\"] {\n /* @noflip */\n margin-left: 8px;\n /* @noflip */\n margin-right: 0; }\n .mdc-card__action--button:last-child {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 0; }\n [dir=\"rtl\"] .mdc-card__action--button:last-child, .mdc-card__action--button:last-child[dir=\"rtl\"] {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 0; }\n\n.mdc-card__actions--full-bleed .mdc-card__action--button {\n justify-content: space-between;\n width: 100%;\n height: auto;\n max-height: none;\n margin: 0;\n padding: 8px 16px;\n /* @noflip */\n text-align: left; }\n [dir=\"rtl\"] .mdc-card__actions--full-bleed .mdc-card__action--button, .mdc-card__actions--full-bleed .mdc-card__action--button[dir=\"rtl\"] {\n /* @noflip */\n text-align: right; }\n\n.mdc-card__action--icon {\n margin: -6px 0;\n padding: 12px; }\n\n.mdc-card__action--icon:not(:disabled) {\n color: rgba(0, 0, 0, 0.6); }\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.mdc-card__primary-action {\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 .mdc-card__primary-action::before, .mdc-card__primary-action::after {\n position: absolute;\n border-radius: 50%;\n opacity: 0;\n pointer-events: none;\n content: \"\"; }\n .mdc-card__primary-action::before {\n transition: opacity 15ms linear, background-color 15ms linear;\n z-index: 1; }\n .mdc-card__primary-action.mdc-ripple-upgraded::before {\n transform: scale(var(--mdc-ripple-fg-scale, 1)); }\n .mdc-card__primary-action.mdc-ripple-upgraded::after {\n top: 0;\n /* @noflip */\n left: 0;\n transform: scale(0);\n transform-origin: center center; }\n .mdc-card__primary-action.mdc-ripple-upgraded--unbounded::after {\n top: var(--mdc-ripple-top, 0);\n /* @noflip */\n left: var(--mdc-ripple-left, 0); }\n .mdc-card__primary-action.mdc-ripple-upgraded--foreground-activation::after {\n animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards; }\n .mdc-card__primary-action.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 .mdc-card__primary-action::before, .mdc-card__primary-action::after {\n top: calc(50% - 100%);\n /* @noflip */\n left: calc(50% - 100%);\n width: 200%;\n height: 200%; }\n .mdc-card__primary-action.mdc-ripple-upgraded::after {\n width: var(--mdc-ripple-fg-size, 100%);\n height: var(--mdc-ripple-fg-size, 100%); }\n .mdc-card__primary-action::before, .mdc-card__primary-action::after {\n background-color: #000000; }\n .mdc-card__primary-action:hover::before {\n opacity: 0.04; }\n .mdc-card__primary-action:not(.mdc-ripple-upgraded):focus::before, .mdc-card__primary-action.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.12; }\n .mdc-card__primary-action:not(.mdc-ripple-upgraded)::after {\n transition: opacity 150ms linear; }\n .mdc-card__primary-action:not(.mdc-ripple-upgraded):active::after {\n transition-duration: 75ms;\n opacity: 0.12; }\n .mdc-card__primary-action.mdc-ripple-upgraded {\n --mdc-ripple-fg-opacity: 0.12; }\n\n.mdc-typography {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased; }\n\n.mdc-typography--headline1 {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 6rem;\n line-height: 6rem;\n font-weight: 300;\n letter-spacing: -0.01562em;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--headline2 {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 3.75rem;\n line-height: 3.75rem;\n font-weight: 300;\n letter-spacing: -0.00833em;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--headline3 {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 3rem;\n line-height: 3.125rem;\n font-weight: 400;\n letter-spacing: normal;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--headline4 {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 2.125rem;\n line-height: 2.5rem;\n font-weight: 400;\n letter-spacing: 0.00735em;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--headline5 {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 400;\n letter-spacing: normal;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--headline6 {\n font-family: Roboto, sans-serif;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n font-size: 1.25rem;\n line-height: 2rem;\n font-weight: 500;\n letter-spacing: 0.0125em;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--subtitle1 {\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\n.mdc-typography--subtitle2 {\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.375rem;\n font-weight: 500;\n letter-spacing: 0.00714em;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--body1 {\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.5rem;\n font-weight: 400;\n letter-spacing: 0.03125em;\n text-decoration: inherit;\n text-transform: inherit; }\n\n.mdc-typography--body2 {\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\n.mdc-typography--caption {\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\n.mdc-typography--button {\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: 2.25rem;\n font-weight: 500;\n letter-spacing: 0.08929em;\n text-decoration: none;\n text-transform: uppercase; }\n\n.mdc-typography--overline {\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: 2rem;\n font-weight: 500;\n letter-spacing: 0.16667em;\n text-decoration: none;\n text-transform: uppercase; }\n\n.mdc-button {\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: 2.25rem;\n font-weight: 500;\n letter-spacing: 0.08929em;\n text-decoration: none;\n text-transform: uppercase;\n padding: 0 8px 0 8px;\n display: inline-flex;\n position: relative;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 64px;\n height: 36px;\n border: none;\n outline: none;\n /* @alternate */\n line-height: inherit;\n user-select: none;\n -webkit-appearance: none;\n overflow: hidden;\n vertical-align: middle;\n border-radius: 4px; }\n .mdc-button::-moz-focus-inner {\n padding: 0;\n border: 0; }\n .mdc-button:active {\n outline: none; }\n .mdc-button:hover {\n cursor: pointer; }\n .mdc-button:disabled {\n background-color: transparent;\n color: rgba(0, 0, 0, 0.37);\n cursor: default;\n pointer-events: none; }\n .mdc-button.mdc-button--dense {\n border-radius: 4px; }\n .mdc-button:not(:disabled) {\n background-color: transparent; }\n .mdc-button .mdc-button__icon {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 8px;\n display: inline-block;\n width: 18px;\n height: 18px;\n font-size: 18px;\n vertical-align: top; }\n [dir=\"rtl\"] .mdc-button .mdc-button__icon, .mdc-button .mdc-button__icon[dir=\"rtl\"] {\n /* @noflip */\n margin-left: 8px;\n /* @noflip */\n margin-right: 0; }\n .mdc-button:not(:disabled) {\n color: #0072d9;\n /* @alternate */\n color: var(--mdc-theme-primary, #0072d9); }\n\n.mdc-button__label + .mdc-button__icon {\n /* @noflip */\n margin-left: 8px;\n /* @noflip */\n margin-right: 0; }\n [dir=\"rtl\"] .mdc-button__label + .mdc-button__icon, .mdc-button__label + .mdc-button__icon[dir=\"rtl\"] {\n /* @noflip */\n margin-left: 0;\n /* @noflip */\n margin-right: 8px; }\n\nsvg.mdc-button__icon {\n fill: currentColor; }\n\n.mdc-button--raised .mdc-button__icon,\n.mdc-button--unelevated .mdc-button__icon,\n.mdc-button--outlined .mdc-button__icon {\n /* @noflip */\n margin-left: -4px;\n /* @noflip */\n margin-right: 8px; }\n [dir=\"rtl\"] .mdc-button--raised .mdc-button__icon, .mdc-button--raised .mdc-button__icon[dir=\"rtl\"], [dir=\"rtl\"]\n .mdc-button--unelevated .mdc-button__icon,\n .mdc-button--unelevated .mdc-button__icon[dir=\"rtl\"], [dir=\"rtl\"]\n .mdc-button--outlined .mdc-button__icon,\n .mdc-button--outlined .mdc-button__icon[dir=\"rtl\"] {\n /* @noflip */\n margin-left: 8px;\n /* @noflip */\n margin-right: -4px; }\n\n.mdc-button--raised .mdc-button__label + .mdc-button__icon,\n.mdc-button--unelevated .mdc-button__label + .mdc-button__icon,\n.mdc-button--outlined .mdc-button__label + .mdc-button__icon {\n /* @noflip */\n margin-left: 8px;\n /* @noflip */\n margin-right: -4px; }\n [dir=\"rtl\"] .mdc-button--raised .mdc-button__label + .mdc-button__icon, .mdc-button--raised .mdc-button__label + .mdc-button__icon[dir=\"rtl\"], [dir=\"rtl\"]\n .mdc-button--unelevated .mdc-button__label + .mdc-button__icon,\n .mdc-button--unelevated .mdc-button__label + .mdc-button__icon[dir=\"rtl\"], [dir=\"rtl\"]\n .mdc-button--outlined .mdc-button__label + .mdc-button__icon,\n .mdc-button--outlined .mdc-button__label + .mdc-button__icon[dir=\"rtl\"] {\n /* @noflip */\n margin-left: -4px;\n /* @noflip */\n margin-right: 8px; }\n\n.mdc-button--raised,\n.mdc-button--unelevated {\n padding: 0 16px 0 16px; }\n .mdc-button--raised:disabled,\n .mdc-button--unelevated:disabled {\n background-color: rgba(0, 0, 0, 0.12);\n color: rgba(0, 0, 0, 0.37); }\n .mdc-button--raised:not(:disabled),\n .mdc-button--unelevated:not(:disabled) {\n background-color: #0072d9; }\n @supports not (-ms-ime-align: auto) {\n .mdc-button--raised:not(:disabled),\n .mdc-button--unelevated:not(:disabled) {\n /* @alternate */\n background-color: var(--mdc-theme-primary, #0072d9); } }\n .mdc-button--raised:not(:disabled),\n .mdc-button--unelevated:not(:disabled) {\n color: #ffffff;\n /* @alternate */\n color: var(--mdc-theme-on-primary, #ffffff); }\n\n.mdc-button--raised {\n box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);\n transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1); }\n .mdc-button--raised:hover, .mdc-button--raised:focus {\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); }\n .mdc-button--raised:active {\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 .mdc-button--raised:disabled {\n box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12); }\n\n.mdc-button--outlined {\n border-style: solid;\n padding: 0 15px 0 15px;\n border-width: 1px; }\n .mdc-button--outlined:disabled {\n border-color: rgba(0, 0, 0, 0.37); }\n .mdc-button--outlined:not(:disabled) {\n border-color: #0072d9;\n /* @alternate */\n border-color: var(--mdc-theme-primary, #0072d9); }\n\n.mdc-button--dense {\n height: 32px;\n font-size: .8125rem; }\n\n.mdc-button {\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 .mdc-button::before, .mdc-button::after {\n position: absolute;\n border-radius: 50%;\n opacity: 0;\n pointer-events: none;\n content: \"\"; }\n .mdc-button::before {\n transition: opacity 15ms linear, background-color 15ms linear;\n z-index: 1; }\n .mdc-button.mdc-ripple-upgraded::before {\n transform: scale(var(--mdc-ripple-fg-scale, 1)); }\n .mdc-button.mdc-ripple-upgraded::after {\n top: 0;\n /* @noflip */\n left: 0;\n transform: scale(0);\n transform-origin: center center; }\n .mdc-button.mdc-ripple-upgraded--unbounded::after {\n top: var(--mdc-ripple-top, 0);\n /* @noflip */\n left: var(--mdc-ripple-left, 0); }\n .mdc-button.mdc-ripple-upgraded--foreground-activation::after {\n animation: mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards; }\n .mdc-button.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 .mdc-button::before, .mdc-button::after {\n top: calc(50% - 100%);\n /* @noflip */\n left: calc(50% - 100%);\n width: 200%;\n height: 200%; }\n .mdc-button.mdc-ripple-upgraded::after {\n width: var(--mdc-ripple-fg-size, 100%);\n height: var(--mdc-ripple-fg-size, 100%); }\n .mdc-button::before, .mdc-button::after {\n background-color: #0072d9; }\n @supports not (-ms-ime-align: auto) {\n .mdc-button::before, .mdc-button::after {\n /* @alternate */\n background-color: var(--mdc-theme-primary, #0072d9); } }\n .mdc-button:hover::before {\n opacity: 0.04; }\n .mdc-button:not(.mdc-ripple-upgraded):focus::before, .mdc-button.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.12; }\n .mdc-button:not(.mdc-ripple-upgraded)::after {\n transition: opacity 150ms linear; }\n .mdc-button:not(.mdc-ripple-upgraded):active::after {\n transition-duration: 75ms;\n opacity: 0.12; }\n .mdc-button.mdc-ripple-upgraded {\n --mdc-ripple-fg-opacity: 0.12; }\n\n.mdc-button--raised::before, .mdc-button--raised::after,\n.mdc-button--unelevated::before,\n.mdc-button--unelevated::after {\n background-color: #ffffff; }\n @supports not (-ms-ime-align: auto) {\n .mdc-button--raised::before, .mdc-button--raised::after,\n .mdc-button--unelevated::before,\n .mdc-button--unelevated::after {\n /* @alternate */\n background-color: var(--mdc-theme-on-primary, #ffffff); } }\n\n.mdc-button--raised:hover::before,\n.mdc-button--unelevated:hover::before {\n opacity: 0.08; }\n\n.mdc-button--raised:not(.mdc-ripple-upgraded):focus::before, .mdc-button--raised.mdc-ripple-upgraded--background-focused::before,\n.mdc-button--unelevated:not(.mdc-ripple-upgraded):focus::before,\n.mdc-button--unelevated.mdc-ripple-upgraded--background-focused::before {\n transition-duration: 75ms;\n opacity: 0.24; }\n\n.mdc-button--raised:not(.mdc-ripple-upgraded)::after,\n.mdc-button--unelevated:not(.mdc-ripple-upgraded)::after {\n transition: opacity 150ms linear; }\n\n.mdc-button--raised:not(.mdc-ripple-upgraded):active::after,\n.mdc-button--unelevated:not(.mdc-ripple-upgraded):active::after {\n transition-duration: 75ms;\n opacity: 0.24; }\n\n.mdc-button--raised.mdc-ripple-upgraded,\n.mdc-button--unelevated.mdc-ripple-upgraded {\n --mdc-ripple-fg-opacity: 0.24; }\n\n.material-icons {\n font-family: 'Material Icons';\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased; }\n\n.mdc-card__primary,\n.mdc-card__secondary {\n padding: 0px 16px 16px; }\n\n.mdc-typography--subtitle2 {\n padding: 0;\n margin: 0;\n opacity: 0.7; }\n\n.mdc-typography--headline6 {\n margin: 10px 0px 0px; }\n\n.mdc-typography--body2 {\n opacity: 0.63; }\n\n.over-img .mdc-card__secondary,\n.top-title .mdc-card__secondary {\n padding-top: 1rem; }\n\n.over-img .mdc-card__primary {\n color: white; }\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/card/index.scss": /*!*****************************!*\ !*** ./src/card/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/card/index.scss"); if (typeof result === "string") { module.exports = result; } else { module.exports = result.toString(); } /***/ }), /***/ "./src/card/index.tsx": /*!****************************!*\ !*** ./src/card/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/card/index.scss"); __webpack_require__(/*! ../icon-button */ "./src/icon-button/index.js"); //@ts-ignore __webpack_require__(/*! ../theme.ts */ "./src/theme.ts"); var Card = /** @class */ (function (_super) { __extends(Card, _super); function Card() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.btnClick = function (evt, index) { _this.fire('buttonaction', { index: index, target: evt.currentTarget }); }; _this.iconClick = function (evt, index) { _this.fire('iconaction', { index: index, target: evt.currentTarget, isOn: evt.detail.isOn }); }; return _this; } Card.prototype.render = function (props) { var _this = this; return (omi_1.h("div", __assign({}, omi_1.extractClass(props, 'mdc-card', { 'over-img': props.overImg, 'top-title': props.topTitle }), { style: "width:" + (props.width || '640px;') }), props.topTitle && omi_1.h("div", { class: "mdc-card__primary" }, omi_1.h("h2", { class: "mdc-typography mdc-typography--headline6" }, props.title), props.subTitle && omi_1.h("h3", { class: "mdc-typography mdc-typography--subtitle2" }, props.subTitle)), omi_1.h("div", { class: "mdc-card__primary-action mdc-ripple-upgraded", tabindex: "0" }, props.img && omi_1.h("div", { class: "mdc-card__media mdc-card__media--16-9", style: "background-image: url(" + props.img + ");" }, props.overImg && !props.topTitle && omi_1.h("div", { class: "mdc-card__primary" }, omi_1.h("h2", { class: "mdc-typography mdc-typography--headline6" }, props.title), props.subTitle && omi_1.h("h3", { class: "mdc-typography mdc-typography--subtitle2" }, props.subTitle))), !props.overImg && !props.topTitle && omi_1.h("div", { class: "mdc-card__primary" }, omi_1.h("h2", { class: "mdc-typography mdc-typography--headline6" }, props.title), props.subTitle && omi_1.h("h3", { class: "mdc-typography mdc-typography--subtitle2" }, props.subTitle)), omi_1.h("div", { class: "mdc-card__secondary mdc-typography mdc-typography--body2" }, props.content)), (props.buttons || props.icons) && omi_1.h("div", { class: "mdc-card__actions" }, props.buttons && omi_1.h("div", { class: "mdc-card__action-buttons" }, props.buttons.map(function (btn, index) { return omi_1.h("button", { onClick: function (_) { return _this.btnClick(_, index); }, class: "mdc-button mdc-card__action mdc-card__action--button mdc-ripple-upgraded" }, btn); })), props.icons && omi_1.h("div", { class: "mdc-card__action-icons" }, props.icons.map(function (icon, index) { if (typeof icon === 'string') return omi_1.h("m-icon-button", { onClick: function (_) { return _this.iconClick(_, index); }, icon: icon }); return omi_1.h("m-icon-button", { onChange: function (_) { return _this.iconClick(_, index); }, icons: icon }); }))))); }; Card.css = css; Card.propTypes = { width: String, img: String, title: String, subTitle: String, content: String, buttons: Object, icons: Object, topTitle: Boolean, overImg: Boolean }; Card = __decorate([ omi_1.tag('m-card') ], Card); return Card; }(omi_1.WeElement)); exports.default = Card; /***/ }), /***/ "./src/icon-button/index.js": /*!**********************************!*\ !*** ./src/icon-button/index.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { if (true) module.exports = factory(__webpack_require__(/*! omi */ "omi")); else {} })(window, function (__WEBPACK_EXTERNAL_MODULE_omi__) { return /******/ (function (modules) { /******/ // 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/icon-button/index.tsx"); /******/ })({ /***/ "./node_modules/_@material_base@1.0.0@@material/base/component.js": /*!************************************************************************!*\ !*** ./node_modules/_@material_base@1.0.0@@material/base/component.js ***! \************************************************************************/ /*! exports provided: MDCComponent, default */ /***/ (function (module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCComponent", function () { return MDCComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/_tslib@1.10.0@tslib/tslib.es6.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation */ "./node_modules/_@material_base@1.0.0@@material/base/foundation.js"); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCComponent = /** @class */ (function () { function MDCComponent(root, foundation) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } this.root_ = root; this.initialize.apply(this, tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"](args)); // Note that we initialize foundation here and not within the constructor's default param so that // this.root_ is defined and can be used within the foundation class. this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation; this.foundation_.init(); this.initialSyncWithDOM(); } MDCComponent.attachTo = function (root) { // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and // returns an instantiated component with its root set to that element. Also note that in the cases of // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized // from getDefaultFoundation(). return new MDCComponent(root, new _foundation__WEBPACK_IMPORTED_MODULE_1__["MDCFoundation"]({})); }; /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */ MDCComponent.prototype.initialize = function () { var _args = []; for (var _i = 0; _i < arguments.length; _i++) { _args[_i] = arguments[_i]; } // Subclasses can override this to do any additional setup work that would be considered part of a // "constructor". Essentially, it is a hook into the parent constructor before the foundation is // initialized. Any additional arguments besides root and foundation will be passed in here. }; MDCComponent.prototype.getDefaultFoundation = function () { // Subclasses must override this method to return a properly configured foundation class for the // component. throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' + 'foundation class'); }; MDCComponent.prototype.initialSyncWithDOM = function () { // Subclasses should override this method if they need to perform work to synchronize with a host DOM // object. An example of this would be a form control wrapper that needs to synchronize its internal state // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor. }; MDCComponent.prototype.destroy = function () { // Subclasses may implement this method to release any resources / deregister any listeners they have // attached. An example of this might be deregistering a resize event from the window object. this.foundation_.destroy(); }; MDCComponent.prototype.listen = function (evtType, handler) { this.root_.addEventListener(evtType, handler); }; MDCComponent.prototype.unlisten = function (evtType, handler) { this.root_.removeEventListener(evtType, handler); }; /** * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data. */ MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) { if (shouldBubble === void 0) { shouldBubble = false; } var evt; if (typeof CustomEvent === 'function') { evt = new CustomEvent(evtType, { bubbles: shouldBubble, detail: evtData, }); } else { evt = document.createEvent('CustomEvent'); evt.initCustomEvent(evtType, shouldBubble, false, evtData); } this.root_.dispatchEvent(evt); }; return MDCComponent; }()); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCComponent); //# sourceMappingURL=component.js.map /***/ }), /***/ "./node_modules/_@material_base@1.0.0@@material/base/foundation.js": /*!*************************************************************************!*\ !*** ./node_modules/_@material_base@1.0.0@@material/base/foundation.js ***! \*************************************************************************/ /*! exports provided: MDCFoundation, default */ /***/ (function (module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFoundation", function () { return MDCFoundation; }); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCFoundation = /** @class */ (function () { function MDCFoundation(adapter) { if (adapter === void 0) { adapter = {}; } this.adapter_ = adapter; }