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

2 lines 12.3 kB
(("undefined"!==typeof self?self:this)["webpackJsonpwvc"]=("undefined"!==typeof self?self:this)["webpackJsonpwvc"]||[]).push([[17],{"079d":function(t,e){t.exports={functional:!0,render(t,e){const{_c:a,_v:o,data:n,children:r=[]}=e,{class:i,staticClass:d,style:s,staticStyle:c,attrs:l={},...f}=n;return a("svg",{class:[i,d],style:[s,c],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",fill:"none"},l),...f},r.concat([a("path",{attrs:{fill:"currentColor","fill-rule":"evenodd",d:"M4.823 6L0 1.487 1.589 0 8 6l-6.411 6L0 10.513 4.823 6z","clip-rule":"evenodd"}})]))}}},2350:function(t,e){function a(t,e){var a=t[1]||"",n=t[3];if(!n)return a;if(e&&"function"===typeof btoa){var r=o(n),i=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[a].concat(i).concat([r]).join("\n")}return[a].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,"+e;return"/*# "+a+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=a(e,t);return e[2]?"@media "+e[2]+"{"+o+"}":o})).join("")},e.i=function(t,a){"string"===typeof t&&(t=[[null,t,""]]);for(var o={},n=0;n<this.length;n++){var r=this[n][0];"number"===typeof r&&(o[r]=!0)}for(n=0;n<t.length;n++){var i=t[n];"number"===typeof i[0]&&o[i[0]]||(a&&!i[2]?i[2]=a:a&&(i[2]="("+i[2]+") and ("+a+")"),e.push(i))}},e}},2877:function(t,e,a){"use strict";function o(t,e,a,o,n,r,i,d){var s,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=a,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),i?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=s):n&&(s=d?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),s)if(c.functional){c._injectStyles=s;var l=c.render;c.render=function(t,e){return s.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:c}}a.d(e,"a",(function(){return o}))},"35d6":function(t,e,a){"use strict";function o(t,e){for(var a=[],o={},n=0;n<e.length;n++){var r=e[n],i=r[0],d=r[1],s=r[2],c=r[3],l={id:t+":"+n,css:d,media:s,sourceMap:c};o[i]?o[i].parts.push(l):a.push(o[i]={id:i,parts:[l]})}return a}function n(t,e,a){var n=o(t,e);r(n,a)}function r(t,e){for(var a=e._injectedStyles||(e._injectedStyles={}),o=0;o<t.length;o++){var n=t[o],r=a[n.id];if(!r){for(var i=0;i<n.parts.length;i++)d(n.parts[i],e);a[n.id]=!0}}}function i(t){var e=document.createElement("style");return e.type="text/css",t.appendChild(e),e}function d(t,e){var a=i(e),o=t.css,n=t.media,r=t.sourceMap;if(n&&a.setAttribute("media",n),r&&(o+="\n/*# sourceURL="+r.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),a.styleSheet)a.styleSheet.cssText=o;else{while(a.firstChild)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(o))}}a.r(e),a.d(e,"default",(function(){return n}))},"40a8":function(t,e){t.exports={functional:!0,render(t,e){const{_c:a,_v:o,data:n,children:r=[]}=e,{class:i,staticClass:d,style:s,staticStyle:c,attrs:l={},...f}=n;return a("svg",{class:[i,d],style:[s,c],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"6",height:"9",fill:"none"},l),...f},r.concat([a("path",{attrs:{fill:"currentColor","fill-rule":"evenodd",d:"M3.617 4.5L0 1.115 1.192 0 6 4.5 1.192 9 0 7.885 3.617 4.5z","clip-rule":"evenodd"}})]))}}},5595:function(t,e,a){"use strict";a.r(e);var o=a("de6c"),n=a.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return o[t]}))}(r);e["default"]=n.a},de6c:function(t,e,a){var o=a("ef59");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var n=a("35d6").default;t.exports.__inject__=function(t){n("4dbeb35a",o,t)}},ef59:function(t,e,a){e=t.exports=a("2350")(!1),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Karla:wght@700&family=Lato:ital,wght@0,400;0,700;1,400&display=swap);",""]),e.push([t.i,'.button[data-v-1b6fe3e5]{box-sizing:border-box;padding:0;margin:0;will-change:transform;transition:all .2s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:600;font-family:Karla,Lato,Arial,sans-serif;text-transform:uppercase;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:4px;cursor:pointer;font-family:Karla;font-size:16px;letter-spacing:2.4px;line-height:24px;text-align:center;padding:12px 16px}.button[data-v-1b6fe3e5]:before{content:"";display:block;height:0;width:0;margin-top:-.1em}@media (max-width:1024px){.button[data-v-1b6fe3e5]{font-family:Karla;font-size:14px;letter-spacing:2.1px;line-height:24px;text-align:center;padding:8px 16px}}.button .icon-wrapper[data-v-1b6fe3e5],.button .icon-wrapper-sm[data-v-1b6fe3e5]{padding-left:8px;overflow:visible;align-items:center;height:100%}.button .icon-wrapper-sm>svg[data-v-1b6fe3e5],.button .icon-wrapper>svg[data-v-1b6fe3e5]{display:block;margin:0 auto;text-align:center}.button .icon-wrapper[data-v-1b6fe3e5]{display:flex}@media (max-width:1024px){.button .icon-wrapper[data-v-1b6fe3e5]{display:none}}.button .icon-wrapper-sm[data-v-1b6fe3e5]{display:none}@media (max-width:1024px){.button .icon-wrapper-sm[data-v-1b6fe3e5]{display:flex}}.button-primary.theme-light[data-v-1b6fe3e5],.button.theme-light[data-v-1b6fe3e5]{color:#fff;background-color:#0c6699;box-shadow:none;border:none}.button-primary.theme-light.hover[data-v-1b6fe3e5],.button-primary.theme-light[data-v-1b6fe3e5]:hover,.button.theme-light.hover[data-v-1b6fe3e5],.button.theme-light[data-v-1b6fe3e5]:hover{color:#fff;background-color:#0d4773;box-shadow:none}.button-primary.theme-light.focus[data-v-1b6fe3e5],.button-primary.theme-light[data-v-1b6fe3e5]:focus,.button.theme-light.focus[data-v-1b6fe3e5],.button.theme-light[data-v-1b6fe3e5]:focus{background-color:#0d4773;color:#fff;box-shadow:0 0 0 4px #0c6699;outline:none}.button-primary.theme-light.active[data-v-1b6fe3e5],.button-primary.theme-light.visited[data-v-1b6fe3e5],.button-primary.theme-light[data-v-1b6fe3e5]:active,.button-primary.theme-light[data-v-1b6fe3e5]:visited,.button.theme-light.active[data-v-1b6fe3e5],.button.theme-light.visited[data-v-1b6fe3e5],.button.theme-light[data-v-1b6fe3e5]:active,.button.theme-light[data-v-1b6fe3e5]:visited{transition:none;background-color:#337ab7;color:#fff;box-shadow:none}.button-primary.theme-light.disabled[data-v-1b6fe3e5],.button-primary.theme-light[data-v-1b6fe3e5]:disabled,.button.theme-light.disabled[data-v-1b6fe3e5],.button.theme-light[data-v-1b6fe3e5]:disabled{background-color:transparent;color:#999;box-shadow:none}.button-primary.theme-dark[data-v-1b6fe3e5],.button.theme-dark[data-v-1b6fe3e5]{color:#0c6699;background-color:#fff;box-shadow:none;border:none}.button-primary.theme-dark.hover[data-v-1b6fe3e5],.button-primary.theme-dark[data-v-1b6fe3e5]:hover,.button.theme-dark.hover[data-v-1b6fe3e5],.button.theme-dark[data-v-1b6fe3e5]:hover{color:#0d4773;background-color:#fff;box-shadow:none}.button-primary.theme-dark.focus[data-v-1b6fe3e5],.button-primary.theme-dark[data-v-1b6fe3e5]:focus,.button.theme-dark.focus[data-v-1b6fe3e5],.button.theme-dark[data-v-1b6fe3e5]:focus{background-color:#fff;color:#0d4773;box-shadow:0 0 0 4px #00acca;outline:none}.button-primary.theme-dark.active[data-v-1b6fe3e5],.button-primary.theme-dark.visited[data-v-1b6fe3e5],.button-primary.theme-dark[data-v-1b6fe3e5]:active,.button-primary.theme-dark[data-v-1b6fe3e5]:visited,.button.theme-dark.active[data-v-1b6fe3e5],.button.theme-dark.visited[data-v-1b6fe3e5],.button.theme-dark[data-v-1b6fe3e5]:active,.button.theme-dark[data-v-1b6fe3e5]:visited{transition:none;background-color:#0c6699;color:#fff;box-shadow:inset 0 0 0 2px #fff}.button-primary.theme-dark.disabled[data-v-1b6fe3e5],.button-primary.theme-dark[data-v-1b6fe3e5]:disabled,.button.theme-dark.disabled[data-v-1b6fe3e5],.button.theme-dark[data-v-1b6fe3e5]:disabled{background-color:transparent;color:#999;box-shadow:inset 0 0 0 2px #999}.button-secondary[data-v-1b6fe3e5]{text-align:left}.button-secondary.theme-light[data-v-1b6fe3e5]{color:#0c6699;background-color:#fff;box-shadow:inset 0 0 0 2px #0c6699;border:none}.button-secondary.theme-light.hover[data-v-1b6fe3e5],.button-secondary.theme-light[data-v-1b6fe3e5]:hover{color:#0d4773;background-color:#fff;box-shadow:inset 0 0 0 2px #0d4773}.button-secondary.theme-light.focus[data-v-1b6fe3e5],.button-secondary.theme-light[data-v-1b6fe3e5]:focus{background-color:#0d4773;color:#fff;box-shadow:0 0 0 4px #0c6699;outline:none}.button-secondary.theme-light.active[data-v-1b6fe3e5],.button-secondary.theme-light[data-v-1b6fe3e5]:active{transition:none;background-color:#fff;color:#337ab7;box-shadow:inset 0 0 0 2px #337ab7}.button-secondary.theme-light.disabled[data-v-1b6fe3e5],.button-secondary.theme-light[data-v-1b6fe3e5]:disabled{background-color:transparent;color:#999;box-shadow:inset 0 0 0 2px #999}.button-secondary.theme-dark[data-v-1b6fe3e5]{color:#fff;background-color:transparent;box-shadow:inset 0 0 0 2px #fff;border:none}.button-secondary.theme-dark.hover[data-v-1b6fe3e5],.button-secondary.theme-dark[data-v-1b6fe3e5]:hover{color:#333;background-color:#fff;box-shadow:inset 0 0 0 2px #fff}.button-secondary.theme-dark.focus[data-v-1b6fe3e5],.button-secondary.theme-dark[data-v-1b6fe3e5]:focus{background-color:#fff;box-shadow:0 0 0 4px #00acca;outline:none}.button-secondary.theme-dark.active[data-v-1b6fe3e5],.button-secondary.theme-dark[data-v-1b6fe3e5]:active{transition:none;background-color:transparent;color:#ccc;box-shadow:inset 0 0 0 2px #ccc}.button-secondary.theme-dark.disabled[data-v-1b6fe3e5],.button-secondary.theme-dark[data-v-1b6fe3e5]:disabled{background-color:transparent;color:#999;box-shadow:inset 0 0 0 2px #999}.full-width[data-v-1b6fe3e5]{width:100%}.button-submit-disabled.theme-light[data-v-1b6fe3e5]{color:#666!important;background-color:#f5f5f5!important;box-shadow:inset 0 0 0 2px #f5f5f5!important}.button-submit-disabled.theme-dark[data-v-1b6fe3e5]{color:#ccc!important;background-color:transparent!important;box-shadow:inset 0 0 0 2px #ccc!important}',""])},f9fd:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",{class:["button",t.themeClass,t.state,t.classes],style:{backgroundColor:t.backgroundColor,color:t.color},attrs:{"aria-describedby":t.ariaDescribedby,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabeledby,disabled:t.disabled,type:t.submit?"submit":"button",role:"button"}},[t._t("default"),t.hasIcon?[a("span",{staticClass:"icon-wrapper"},[t._t("icon")],2),a("span",{staticClass:"icon-wrapper-sm"},[t._t("icon-sm")],2)]:t._e(),!t.hasIcon&&t.secondary?[a("span",{staticClass:"icon-wrapper"},[a("IconChevron",{attrs:{"aria-hidden":"true"}})],1),a("span",{staticClass:"icon-wrapper-sm"},[a("IconChevronSm",{attrs:{"aria-hidden":"true"}})],1)]:t._e()],2)},n=[],r=a("079d"),i=a.n(r),d=a("40a8"),s=a.n(d),c={name:"WvcButton",components:{IconChevron:i.a,IconChevronSm:s.a},props:{ariaDescribedby:{type:String,default:null},ariaLabel:{type:String,default:null},ariaLabeledby:{type:String,default:null},dark:{type:Boolean,default:!1},backgroundColor:{type:String,default:null},color:{type:String,default:null},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1},state:{type:String,default:null,validator:function(t){return t.match(/(hover|focus|active|visited|disabled)/)}},submit:{type:Boolean,default:!1}},computed:{classes:function(){return{"button-primary":!this.secondary,"button-secondary":this.secondary,"full-width":this.fullWidth,"button-submit-disabled":this.disabled&&this.submit}},themeClass:function(){return{"theme-light":!this.dark,"theme-dark":this.dark}},hasIcon:function(){return this.$slots.icon}}},l=c,f=a("2877");function b(t){var e=a("5595");e.__inject__&&e.__inject__(t)}var u=Object(f["a"])(l,o,n,!1,b,"1b6fe3e5",null,!0);e["default"]=u.exports}}]); //# sourceMappingURL=wvc.umd.min.17.js.map