UNPKG

@world-vision-canada/wvc-design-system

Version:

WVC Vue Design system is a fork of Vue Design System, an open-source tool for building Design Systems with Vue.js

642 lines (532 loc) 23.4 kB
((typeof self !== 'undefined' ? self : this)["webpackJsonpwvc"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpwvc"] || []).push([[10],{ /***/ "2350": /***/ (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 + ' */'; } /***/ }), /***/ "2877": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functional component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } /***/ }), /***/ "35d6": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesToShadowDOM; }); // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js /** * Translates the list format produced by css-loader into something * easier to manipulate. */ function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: media, sourceMap: sourceMap } if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }) } else { newStyles[id].parts.push(part) } } return styles } // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesShadow.js function addStylesToShadowDOM(parentId, list, shadowRoot) { var styles = listToStyles(parentId, list); addStyles(styles, shadowRoot); } /* type StyleObject = { id: number; parts: Array<StyleObjectPart> } type StyleObjectPart = { css: string; media: string; sourceMap: ?string } */ function addStyles(styles /* Array<StyleObject> */ , shadowRoot) { var injectedStyles = shadowRoot._injectedStyles || (shadowRoot._injectedStyles = {}); for (var i = 0; i < styles.length; i++) { var item = styles[i]; var style = injectedStyles[item.id]; if (!style) { for (var j = 0; j < item.parts.length; j++) { addStyle(item.parts[j], shadowRoot); } injectedStyles[item.id] = true; } } } function createStyleElement(shadowRoot) { var styleElement = document.createElement('style'); styleElement.type = 'text/css'; shadowRoot.appendChild(styleElement); return styleElement; } function addStyle(obj /* StyleObjectPart */ , shadowRoot) { var styleElement = createStyleElement(shadowRoot); var css = obj.css; var media = obj.media; var sourceMap = obj.sourceMap; if (media) { styleElement.setAttribute('media', media); } if (sourceMap) { // https://developer.chrome.com/devtools/docs/javascript-debugging // this makes source maps inside style tags work properly in Chrome css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'; // http://stackoverflow.com/a/26603875 css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'; } if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css; } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild); } styleElement.appendChild(document.createTextNode(css)); } } /***/ }), /***/ "3bf1": /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__("9cb4"); if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add CSS to Shadow Root var add = __webpack_require__("35d6").default module.exports.__inject__ = function (shadowRoot) { add("5c5f313e", content, shadowRoot) }; /***/ }), /***/ "4466": /***/ (function(module, exports) { module.exports = { functional: true, render(_h, _vm) { const { _c, _v, data, children = [] } = _vm; const { class: classNames, staticClass, style, staticStyle, attrs = {}, ...rest } = data; return _c( 'svg', { class: [classNames,staticClass], style: [style,staticStyle], attrs: Object.assign({"width":"16","height":"16","fill":"none","xmlns":"http://www.w3.org/2000/svg"}, attrs), ...rest, }, children.concat([_c('path',{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M16 8A8 8 0 110 8a8 8 0 0116 0zm-8 7A7 7 0 108 1a7 7 0 000 14z","fill":"currentColor"}}),_c('path',{attrs:{"d":"M8.71 3v3.596c0 .242-.005.478-.016.708a15.636 15.636 0 01-.096 1.416c-.022.241-.048.501-.08.78h-.972l-.089-.78a32.468 32.468 0 01-.096-1.416 30.47 30.47 0 01-.008-.708V3H8.71zM7 11.514c0-.14.024-.271.072-.395.054-.123.123-.23.21-.321.09-.091.197-.164.32-.218a.976.976 0 01.394-.08c.14 0 .27.027.394.08.123.054.23.127.32.218.092.09.161.198.21.321.053.124.08.255.08.395a1 1 0 01-.29.715.927.927 0 01-.32.21.976.976 0 01-.394.08.976.976 0 01-.394-.08.927.927 0 01-.32-.21 1.147 1.147 0 01-.21-.313A1.096 1.096 0 017 11.514z","fill":"currentColor"}})]) ) } } /***/ }), /***/ "594b": /***/ (function(module, exports) { module.exports = { functional: true, render(_h, _vm) { const { _c, _v, data, children = [] } = _vm; const { class: classNames, staticClass, style, staticStyle, attrs = {}, ...rest } = data; return _c( 'svg', { class: [classNames,staticClass], style: [style,staticStyle], attrs: Object.assign({"width":"21","height":"20","fill":"none","xmlns":"http://www.w3.org/2000/svg"}, attrs), ...rest, }, children.concat([_c('path',{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M20.003 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10 10 4.477 10 10zm-10 8.75a8.75 8.75 0 100-17.5 8.75 8.75 0 000 17.5z","fill":"currentColor"}}),_c('path',{attrs:{"d":"M10.891 3.75v4.495c0 .302-.007.597-.02.885a19.547 19.547 0 01-.12 1.77c-.027.301-.06.626-.1.975H9.434l-.11-.975a40.598 40.598 0 01-.12-1.77c-.007-.288-.01-.583-.01-.885V3.75h1.696zM8.753 14.392c0-.174.03-.339.09-.493.067-.154.154-.288.261-.402a1.29 1.29 0 01.402-.271c.154-.068.318-.101.492-.101s.338.034.492.1c.154.068.288.158.402.272.113.114.2.248.26.402.068.154.1.319.1.493 0 .18-.033.348-.1.503a1.182 1.182 0 01-.662.653 1.22 1.22 0 01-.492.1 1.22 1.22 0 01-.492-.1 1.156 1.156 0 01-.402-.261 1.432 1.432 0 01-.26-.392 1.37 1.37 0 01-.091-.503z","fill":"currentColor"}})]) ) } } /***/ }), /***/ "9cb4": /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__("2350")(false); // imports exports.push([module.i, "@import url(https://fonts.googleapis.com/css2?family=Karla:wght@700&family=Lato:ital,wght@0,400;0,700;1,400&display=swap);", ""]); // module exports.push([module.i, ".feedback[data-v-6c887ef1]{font-family:Lato;font-size:16px;line-height:24px;display:inline-flex;text-align:left}.feedback.theme-light[data-v-6c887ef1]{color:#007a00;background-color:transparent}.feedback.theme-dark[data-v-6c887ef1]{color:#fff;background-color:#007a00}.feedback.small[data-v-6c887ef1]{font-family:Lato;font-size:16px;line-height:24px}.feedback.contextual[data-v-6c887ef1],.feedback.contextual.small[data-v-6c887ef1]{font-family:Lato;font-size:14px;line-height:24px}.feedback.contextual .feedback__icon[data-v-6c887ef1]{min-width:16px;height:16px}.feedback.error.theme-light[data-v-6c887ef1]{color:#d0021b;background-color:transparent}.feedback.error.theme-dark[data-v-6c887ef1]{color:#fff;background-color:#d0021b}.feedback__icon[data-v-6c887ef1]{min-width:20px;height:20px;margin:4px 4px 28px;display:inline-flex}.feedback__text[data-v-6c887ef1]{text-align:left}", ""]); // exports /***/ }), /***/ "cbb2": /***/ (function(module, exports) { module.exports = { functional: true, render(_h, _vm) { const { _c, _v, data, children = [] } = _vm; const { class: classNames, staticClass, style, staticStyle, attrs = {}, ...rest } = data; return _c( 'svg', { class: [classNames,staticClass], style: [style,staticStyle], attrs: Object.assign({"width":"20","height":"20","fill":"none","xmlns":"http://www.w3.org/2000/svg"}, attrs), ...rest, }, children.concat([_c('path',{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M20 10c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0s10 4.477 10 10zm-10 8.75a8.75 8.75 0 100-17.5 8.75 8.75 0 000 17.5z","fill":"currentColor"}}),_c('path',{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M13.451 5.251l1.352 1.041-5.862 8.313-3.83-4.325 1.224-1.165 2.444 2.761 4.672-6.625z","fill":"currentColor"}})]) ) } } /***/ }), /***/ "d849": /***/ (function(module, exports) { module.exports = { functional: true, render(_h, _vm) { const { _c, _v, data, children = [] } = _vm; const { class: classNames, staticClass, style, staticStyle, attrs = {}, ...rest } = data; return _c( 'svg', { class: [classNames,staticClass], style: [style,staticStyle], attrs: Object.assign({"width":"16","height":"16","fill":"none","xmlns":"http://www.w3.org/2000/svg"}, attrs), ...rest, }, children.concat([_c('path',{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M16 8A8 8 0 110 8a8 8 0 0116 0zm-8 7A7 7 0 108 1a7 7 0 000 14z","fill":"currentColor"}}),_c('path',{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M10.76 4.2l1.082.834-4.69 6.65-3.064-3.46.979-.932 1.955 2.21L10.76 4.2z","fill":"currentColor"}})]) ) } } /***/ }), /***/ "dc3a": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WvcFeedback_vue_vue_type_style_index_0_id_6c887ef1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3bf1"); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WvcFeedback_vue_vue_type_style_index_0_id_6c887ef1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WvcFeedback_vue_vue_type_style_index_0_id_6c887ef1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WvcFeedback_vue_vue_type_style_index_0_id_6c887ef1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WvcFeedback_vue_vue_type_style_index_0_id_6c887ef1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_WvcFeedback_vue_vue_type_style_index_0_id_6c887ef1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "dfbb": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"01f5881a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/elements/WvcFeedback.vue?vue&type=template&id=6c887ef1&scoped=true& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:['feedback', _vm.classes, _vm.themeClass]},[(_vm.contextual)?[(_vm.error)?_c('NotificationErrorSm',{class:['feedback__icon'],attrs:{"aria-hidden":"true"}}):_c('NotificationSuccessSm',{class:['feedback__icon'],attrs:{"aria-hidden":"true"}})]:[(_vm.error)?_c('NotificationError',{class:['feedback__icon'],attrs:{"aria-hidden":"true"}}):_c('NotificationSuccess',{class:['feedback__icon'],attrs:{"aria-hidden":"true"}})],_c('span',{staticClass:"feedback__text",attrs:{"id":_vm.id,"role":"alert"}},[_vm._t("default")],2)],2)} var staticRenderFns = [] // CONCATENATED MODULE: ./src/elements/WvcFeedback.vue?vue&type=template&id=6c887ef1&scoped=true& // EXTERNAL MODULE: ./src/assets/icons/notificationError.svg var notificationError = __webpack_require__("594b"); var notificationError_default = /*#__PURE__*/__webpack_require__.n(notificationError); // EXTERNAL MODULE: ./src/assets/icons/notificationSuccess.svg var notificationSuccess = __webpack_require__("cbb2"); var notificationSuccess_default = /*#__PURE__*/__webpack_require__.n(notificationSuccess); // EXTERNAL MODULE: ./src/assets/icons/notificationErrorSmall.svg var notificationErrorSmall = __webpack_require__("4466"); var notificationErrorSmall_default = /*#__PURE__*/__webpack_require__.n(notificationErrorSmall); // EXTERNAL MODULE: ./src/assets/icons/notificationSuccessSmall.svg var notificationSuccessSmall = __webpack_require__("d849"); var notificationSuccessSmall_default = /*#__PURE__*/__webpack_require__.n(notificationSuccessSmall); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/elements/WvcFeedback.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var WvcFeedbackvue_type_script_lang_js_ = ({ name: 'WvcFeedback', components: { NotificationError: notificationError_default.a, NotificationSuccess: notificationSuccess_default.a, NotificationErrorSm: notificationErrorSmall_default.a, NotificationSuccessSm: notificationSuccessSmall_default.a }, props: { contextual: { type: Boolean, default: false }, dark: { type: Boolean, default: false }, error: { type: Boolean, default: false }, id: { type: String, default: '' }, small: { type: Boolean, default: false } }, computed: { themeClass: function themeClass() { return { 'theme-light': !this.dark, 'theme-dark': this.dark }; }, classes: function classes() { return { error: this.error, small: this.small, contextual: this.contextual }; } } }); // CONCATENATED MODULE: ./src/elements/WvcFeedback.vue?vue&type=script&lang=js& /* harmony default export */ var elements_WvcFeedbackvue_type_script_lang_js_ = (WvcFeedbackvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__("2877"); // CONCATENATED MODULE: ./src/elements/WvcFeedback.vue function injectStyles (context) { var style0 = __webpack_require__("dc3a") if (style0.__inject__) style0.__inject__(context) } /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( elements_WvcFeedbackvue_type_script_lang_js_, render, staticRenderFns, false, injectStyles, "6c887ef1", null ,true ) /* harmony default export */ var WvcFeedback = __webpack_exports__["default"] = (component.exports); /***/ }) }]); //# sourceMappingURL=wvc.common.10.js.map