/*!
 * 
 * [Dojo](https://dojo.io/)
 * Copyright [JS Foundation](https://js.foundation/) & contributors
 * [New BSD license](https://github.com/dojo/meta/blob/master/LICENSE)
 * All rights reserved
 * 
 */
(window.dojoWebpackJsonpdojo_widgets_custom_elements=window.dojoWebpackJsonpdojo_widgets_custom_elements||[]).push([[5],{105:function(e,t,n){e.exports={" _key":"@dojo/widgets/button",root:"button-m__root__wCywK",text:"button-m__text__2O-Nc",contained:"button-m__contained__1Zy4W",outlined:"button-m__outlined__1jdFs",popup:"button-m__popup__2Fl0t",disabled:"button-m__disabled__19w7M",icon:"button-m__icon__74zN4",iconOnly:"button-m__iconOnly__3wqUA",label:"button-m__label__3hxN8"}},28:function(e,t,n){"use strict";n.r(t),n.d(t,"Button",function(){return a});var o=n(86),i=n(5),r=n(81),s=n(80),c=n(105);const a=Object(i.a)({focus:o.b,theme:s.b}).properties().children()(function({children:e,id:t,middleware:{focus:n,theme:o},properties:s}){const{aria:a={},disabled:u,widgetId:l,name:d,type:b="button",value:p,onClick:_,onOut:m,onOver:f,onDown:h,onUp:O,onBlur:j,onFocus:g,title:v,kind:y="contained",iconPosition:w="before"}=s(),k=o.classes(c),$=l||`button-${t}`,[x]=e(),{label:P,icon:U}=Object(r.c)(x)?{label:e()}:x,E=U&&!P,A=Object(i.m)("span",{classes:k.icon},U);return Object(i.m)("button",Object.assign({classes:[o.variant(),k.root,u?k.disabled:null,"text"===y?k.text:null,"contained"===y?k.contained:null,"outlined"===y?k.outlined:null,E?k.iconOnly:null],title:v,disabled:u,id:$,focus:n.shouldFocus(),name:d,type:b,value:p,onblur:()=>j&&j(),onclick:e=>{e.stopPropagation(),_&&_()},onfocus:()=>g&&g(),onpointerenter:()=>f&&f(),onpointerleave:()=>m&&m(),onpointerdown:()=>h&&h(),onpointerup:()=>O&&O()},Object(r.b)(a)),U&&"before"===w?A:void 0,P?Object(i.m)("span",{classes:k.label},P):void 0,U&&"after"===w?A:void 0)});t.default=a},80:function(e,t,n){"use strict";n.d(t,"b",function(){return u});var o=n(5),i=n(83),r=n(12);const s=Object(o.a)({coreTheme:i.a}).properties();function c(e){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function a(e){return e&&e.hasOwnProperty("variant")}const u=s(function({middleware:{coreTheme:e},properties:t}){const{variant:n,get:o,set:i,classes:s}=e;return{compose:(n,o,i)=>{const s=function(){const{theme:n}=t();if(n)return n;const o=e.get();return Object(r.c)(o)?{theme:o.theme,variant:o.variant}:o?o.theme:void 0}(),u=n[" _key"],l=o[" _key"],d=Object.keys(n).reduce((e,t)=>" _key"===t?e:(i&&!e[`${i}${c(t)}`]&&(e[`${i}${c(t)}`]=" "),o[t]||(e[t]=" "),e),{" _key":l}),b=e.classes(d),p=e.classes(o);let _=e.classes(n);if(i){const e=Object.keys(Object.assign({},b,p)).reduce((e,t)=>{if(0===t.indexOf(i)&&t!==i){const n=function(e){return`${e.charAt(0).toLowerCase()}${e.slice(1)}`}(t.replace(i,"")),o="string"==typeof p[t]&&p[t].trim(),r="string"==typeof b[t]&&b[t].trim();!o&&r&&(e[n]=`${_[n]} ${r}`),o&&(e[n]=p[t])}return e},{});return _=Object.assign({},_,e),a(s)?{theme:{theme:Object.assign({},s.theme.theme,{[u]:_}),variants:s.theme.variants},variant:s.variant}:Object.assign({},s,{[u]:_})}const m=Object.keys(_).reduce((e,t)=>{if(" _key"===t)return e;const n="string"==typeof p[t]&&p[t].trim(),o="string"==typeof b[t]&&b[t].trim();return n?e[t]=n:o&&(e[t]=`${e[t]} ${o}`),e},Object.assign({},_));return a(s)?{theme:{theme:Object.assign({},s.theme.theme,{[u]:m}),variants:s.theme.variants},variant:s.variant}:Object.assign({},s,{[u]:m})},variant:()=>"inherit"===t().variant?void 0:n(),get:o,set:i,classes:s}});t.a=u},81:function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s});var o,i=n(5);function r(e){return Object.keys(e).reduce((t,n)=>(t[`aria-${n.toLowerCase()}`]=e[n],t),{})}function s(e){let t=null==e||"string"==typeof e||"boolean"==typeof e||Array.isArray(e)||Object(i.j)(e);try{t=t||Object(i.i)(e)}catch(e){}return t}!function(e){e[e.Down=40]="Down",e[e.End=35]="End",e[e.Enter=13]="Enter",e[e.Escape=27]="Escape",e[e.Home=36]="Home",e[e.Left=37]="Left",e[e.PageDown=34]="PageDown",e[e.PageUp=33]="PageUp",e[e.Right=39]="Right",e[e.Space=32]="Space",e[e.Tab=9]="Tab",e[e.Up=38]="Up"}(o||(o={}))}}]);
//# sourceMappingURL=button-8.0.0-beta.12.js.map