|
|
|
@ -0,0 +1,353 @@
|
|
|
|
|
(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["MBreadcrumb"] = factory(require("omi"));
|
|
|
|
|
else
|
|
|
|
|
root["MBreadcrumb"] = 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/breadcrumb/index.tsx");
|
|
|
|
|
/******/ })
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
/******/ ({
|
|
|
|
|
|
|
|
|
|
/***/ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.0@resolve-url-loader/index.js!./node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js?!./src/breadcrumb/index.scss":
|
|
|
|
|
/*!*****************************************************************************************************************************************************************************************************************!*\
|
|
|
|
|
!*** ./node_modules/_css-loader@1.0.1@css-loader!./node_modules/_resolve-url-loader@3.1.0@resolve-url-loader!./node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--4-3!./src/breadcrumb/index.scss ***!
|
|
|
|
|
\*****************************************************************************************************************************************************************************************************************/
|
|
|
|
|
/*! no static exports found */
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
exports = module.exports = __webpack_require__(/*! ../../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js */ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js")(false);
|
|
|
|
|
// imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// module
|
|
|
|
|
exports.push([module.i, ":host {\n display: block; }\n\nol {\n list-style-type: decimal;\n font-size: 14px;\n padding: 0;\n margin: 0; }\n\nli {\n list-style: none;\n display: inline-block;\n color: rgba(0, 0, 0, 0.45);\n vertical-align: middle; }\n\n.breadcrumb-li a {\n color: rgba(0, 0, 0, 0.45); }\n\na {\n text-decoration: none;\n display: inline-block;\n vertical-align: middle;\n line-height: 20px;\n height: 20px; }\n\n.split {\n margin: 0 8px; }\n\n.current {\n color: rgba(0, 0, 0, 0.7);\n vertical-align: middle;\n line-height: 20px;\n height: 20px; }\n\n.material-icons {\n font-family: 'Material Icons';\n font-weight: normal;\n font-style: normal;\n font-size: 18px;\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 vertical-align: top;\n margin-right: 3px;\n display: inline-block;\n line-height: 20px;\n height: 20px;\n max-width: 24px;\n overflow: hidden; }\n", ""]);
|
|
|
|
|
|
|
|
|
|
// exports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ "./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js":
|
|
|
|
|
/*!*******************************************************************!*\
|
|
|
|
|
!*** ./node_modules/_css-loader@1.0.1@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/breadcrumb/index.scss":
|
|
|
|
|
/*!***********************************!*\
|
|
|
|
|
!*** ./src/breadcrumb/index.scss ***!
|
|
|
|
|
\***********************************/
|
|
|
|
|
/*! no static exports found */
|
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = __webpack_require__(/*! !../../node_modules/_css-loader@1.0.1@css-loader!../../node_modules/_resolve-url-loader@3.1.0@resolve-url-loader!../../node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--4-3!./index.scss */ "./node_modules/_css-loader@1.0.1@css-loader/index.js!./node_modules/_resolve-url-loader@3.1.0@resolve-url-loader/index.js!./node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js?!./src/breadcrumb/index.scss");
|
|
|
|
|
|
|
|
|
|
if (typeof result === "string") {
|
|
|
|
|
module.exports = result;
|
|
|
|
|
} else {
|
|
|
|
|
module.exports = result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ "./src/breadcrumb/index.tsx":
|
|
|
|
|
/*!**********************************!*\
|
|
|
|
|
!*** ./src/breadcrumb/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/breadcrumb/index.scss");
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
__webpack_require__(/*! ../theme.ts */ "./src/theme.ts");
|
|
|
|
|
var Breadcrumb = /** @class */ (function (_super) {
|
|
|
|
|
__extends(Breadcrumb, _super);
|
|
|
|
|
function Breadcrumb() {
|
|
|
|
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
|
|
|
}
|
|
|
|
|
Breadcrumb.prototype.render = function (props) {
|
|
|
|
|
var items = [];
|
|
|
|
|
props.items.forEach(function (item, index) {
|
|
|
|
|
if (index !== props.items.length - 1) {
|
|
|
|
|
items.push(omi_1.h("li", { class: "breadcrumb-li" },
|
|
|
|
|
item.icon && omi_1.h("i", { class: "material-icons mdc-icon-button__icon" }, item.icon),
|
|
|
|
|
omi_1.h("a", { class: "", href: item.href }, item.text)), omi_1.h("li", { class: 'split' }, props.split));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
items.push(omi_1.h("li", { class: "current" },
|
|
|
|
|
item.icon && omi_1.h("i", { class: "material-icons mdc-icon-button__icon" }, item.icon),
|
|
|
|
|
item.text));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return (omi_1.h("nav", __assign({}, omi_1.extractClass(props, 'm-breadcrumb')),
|
|
|
|
|
omi_1.h("ol", { class: "breadcrumb-ol" }, items)));
|
|
|
|
|
};
|
|
|
|
|
Breadcrumb.css = css;
|
|
|
|
|
Breadcrumb.defaultProps = {
|
|
|
|
|
split: '/'
|
|
|
|
|
};
|
|
|
|
|
Breadcrumb.propTypes = {
|
|
|
|
|
items: Object,
|
|
|
|
|
split: String
|
|
|
|
|
};
|
|
|
|
|
Breadcrumb = __decorate([
|
|
|
|
|
omi_1.tag('m-breadcrumb')
|
|
|
|
|
], Breadcrumb);
|
|
|
|
|
return Breadcrumb;
|
|
|
|
|
}(omi_1.WeElement));
|
|
|
|
|
exports.default = Breadcrumb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ "./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
|