@mozaic-ds/web-components 0.4.1-beta.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/package.json +1 -1
  2. package/public/ClickOutside-63071e7a.js +15 -1
  3. package/public/ClickOutside-63071e7a.js.map +1 -1
  4. package/public/DataTableDefaultAction.nested-4da4dc44.js +759 -1
  5. package/public/DataTableDefaultAction.nested-4da4dc44.js.map +1 -1
  6. package/public/DataTableUtilities-60220c78.js +370 -1
  7. package/public/DataTableUtilities-60220c78.js.map +1 -1
  8. package/public/EventForward-8492ff62.js +109 -1
  9. package/public/EventForward-8492ff62.js.map +1 -1
  10. package/public/EventHandler-02058705.js +15 -1
  11. package/public/EventHandler-02058705.js.map +1 -1
  12. package/public/array-5b770a93.js +13 -1
  13. package/public/array-5b770a93.js.map +1 -1
  14. package/public/axis-fbc0f7b5.js +174 -1
  15. package/public/axis-fbc0f7b5.js.map +1 -1
  16. package/public/band-d7a07d2c.js +186 -1
  17. package/public/band-d7a07d2c.js.map +1 -1
  18. package/public/components/accordion/Accordion.js +365 -1
  19. package/public/components/accordion/Accordion.js.map +1 -1
  20. package/public/components/autocomplete/Autocomplete.js +1515 -1
  21. package/public/components/autocomplete/Autocomplete.js.map +1 -1
  22. package/public/components/badge/Badge.js +155 -1
  23. package/public/components/badge/Badge.js.map +1 -1
  24. package/public/components/badge/Badge.nested.js +101 -1
  25. package/public/components/badge/Badge.nested.js.map +1 -1
  26. package/public/components/breadcrumb/Breadcrumb.js +372 -1
  27. package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
  28. package/public/components/breadcrumb/Breadcrumb.nested.js +319 -1
  29. package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
  30. package/public/components/button/Button.js +1138 -1
  31. package/public/components/button/Button.js.map +1 -1
  32. package/public/components/card/Card.js +369 -1
  33. package/public/components/card/Card.js.map +1 -1
  34. package/public/components/chart/BarChart.js +582 -1
  35. package/public/components/chart/BarChart.js.map +1 -1
  36. package/public/components/chart/Donut.js +1189 -1
  37. package/public/components/chart/Donut.js.map +1 -1
  38. package/public/components/chart/GroupedBarChart.js +750 -1
  39. package/public/components/chart/GroupedBarChart.js.map +1 -1
  40. package/public/components/chart/LineChart.js +1731 -1
  41. package/public/components/chart/LineChart.js.map +1 -1
  42. package/public/components/chart/Radar.js +729 -1
  43. package/public/components/chart/Radar.js.map +1 -1
  44. package/public/components/chart/StackedBarChart.js +745 -1
  45. package/public/components/chart/StackedBarChart.js.map +1 -1
  46. package/public/components/checkbox/Checkbox.js +307 -1
  47. package/public/components/checkbox/Checkbox.js.map +1 -1
  48. package/public/components/checkboxgroup/checkboxGroup.js +404 -1
  49. package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
  50. package/public/components/datatable/DataTable.js +3064 -1
  51. package/public/components/datatable/DataTable.js.map +1 -1
  52. package/public/components/datatable/DataTableDefaultAction.nested.js +4 -1
  53. package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
  54. package/public/components/datatable/DataTableDefaultEdtion.nested.js +164 -1
  55. package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
  56. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +380 -1
  57. package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
  58. package/public/components/datatable/DataTableDefaultSelection.nested.js +424 -1
  59. package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
  60. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +263 -1
  61. package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
  62. package/public/components/datatable/DataTableFooter.nested.js +637 -1
  63. package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
  64. package/public/components/dropdown/Dropdown.js +1426 -1
  65. package/public/components/dropdown/Dropdown.js.map +1 -1
  66. package/public/components/field/Field.js +375 -1
  67. package/public/components/field/Field.js.map +1 -1
  68. package/public/components/fileuploader/FileUploader.js +555 -1
  69. package/public/components/fileuploader/FileUploader.js.map +1 -1
  70. package/public/components/fileuploader/ResultFile.nested.js +265 -1
  71. package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
  72. package/public/components/flag/Flag.js +174 -1
  73. package/public/components/flag/Flag.js.map +1 -1
  74. package/public/components/header/Header.js +903 -1
  75. package/public/components/header/Header.js.map +1 -1
  76. package/public/components/hero/Hero.js +271 -1
  77. package/public/components/hero/Hero.js.map +1 -1
  78. package/public/components/layer/Layer.js +453 -1
  79. package/public/components/layer/Layer.js.map +1 -1
  80. package/public/components/link/Link.js +380 -1
  81. package/public/components/link/Link.js.map +1 -1
  82. package/public/components/listbox/Listbox.js +595 -1
  83. package/public/components/listbox/Listbox.js.map +1 -1
  84. package/public/components/listbox/Listbox.nested.js +629 -1
  85. package/public/components/listbox/Listbox.nested.js.map +1 -1
  86. package/public/components/loader/Loader.js +246 -1
  87. package/public/components/loader/Loader.js.map +1 -1
  88. package/public/components/loader/Loader.nested.js +176 -1
  89. package/public/components/loader/Loader.nested.js.map +1 -1
  90. package/public/components/modal/Modal.js +395 -1
  91. package/public/components/modal/Modal.js.map +1 -1
  92. package/public/components/notification/Notification.js +458 -1
  93. package/public/components/notification/Notification.js.map +1 -1
  94. package/public/components/optionbutton/OptionButton.js +316 -1
  95. package/public/components/optionbutton/OptionButton.js.map +1 -1
  96. package/public/components/overlay/Overlay.js +104 -1
  97. package/public/components/overlay/Overlay.js.map +1 -1
  98. package/public/components/overlay/OverlayLoader.js +151 -1
  99. package/public/components/overlay/OverlayLoader.js.map +1 -1
  100. package/public/components/pagination/Pagination.js +613 -1
  101. package/public/components/pagination/Pagination.js.map +1 -1
  102. package/public/components/passwordinput/PasswordInput.js +291 -1
  103. package/public/components/passwordinput/PasswordInput.js.map +1 -1
  104. package/public/components/phonenumber/PhoneNumber.js +6894 -1
  105. package/public/components/phonenumber/PhoneNumber.js.map +1 -1
  106. package/public/components/phonenumber/PhoneNumber.svelte +72 -9
  107. package/public/components/price/Price.js +768 -1
  108. package/public/components/price/Price.js.map +1 -1
  109. package/public/components/progressbar/ProgressBar.js +278 -1
  110. package/public/components/progressbar/ProgressBar.js.map +1 -1
  111. package/public/components/quantityselector/QuantitySelector.js +333 -1
  112. package/public/components/quantityselector/QuantitySelector.js.map +1 -1
  113. package/public/components/radio/Radio.js +273 -1
  114. package/public/components/radio/Radio.js.map +1 -1
  115. package/public/components/radiogroup/RadioGroup.js +414 -1
  116. package/public/components/radiogroup/RadioGroup.js.map +1 -1
  117. package/public/components/ratings/StarsInput.js +292 -1
  118. package/public/components/ratings/StarsInput.js.map +1 -1
  119. package/public/components/ratings/StarsResult.js +246 -1
  120. package/public/components/ratings/StarsResult.js.map +1 -1
  121. package/public/components/select/Select.js +451 -1
  122. package/public/components/select/Select.js.map +1 -1
  123. package/public/components/sidebar/Sidebar.js +784 -1
  124. package/public/components/sidebar/Sidebar.js.map +1 -1
  125. package/public/components/sidebar/sidebar-feature-group.nested.js +594 -1
  126. package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
  127. package/public/components/sidebar/sidebar-feature.nested.js +402 -1
  128. package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
  129. package/public/components/sidebar/sidebar-section.nested.js +394 -1
  130. package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
  131. package/public/components/sidebar/sidebar-segment.nested.js +200 -1
  132. package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
  133. package/public/components/sidebar/sidebar-separator.nested.js +49 -1
  134. package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
  135. package/public/components/sidebar/sidebar-sub-features.nested.js +312 -1
  136. package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
  137. package/public/components/sidebar/sidebar-user.nested.js +733 -1
  138. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  139. package/public/components/stepper/Stepper.js +371 -1
  140. package/public/components/stepper/Stepper.js.map +1 -1
  141. package/public/components/tabs/Tabs.js +615 -1
  142. package/public/components/tabs/Tabs.js.map +1 -1
  143. package/public/components/tabs/Tabs.nested.js +472 -1
  144. package/public/components/tabs/Tabs.nested.js.map +1 -1
  145. package/public/components/tag/Tag.js +665 -1
  146. package/public/components/tag/Tag.js.map +1 -1
  147. package/public/components/tag/Tag.nested.js +554 -1
  148. package/public/components/tag/Tag.nested.js.map +1 -1
  149. package/public/components/taglist/TagList.js +475 -1
  150. package/public/components/taglist/TagList.js.map +1 -1
  151. package/public/components/textarea/Textarea.js +303 -1
  152. package/public/components/textarea/Textarea.js.map +1 -1
  153. package/public/components/textinput/Textinput.js +497 -1
  154. package/public/components/textinput/Textinput.js.map +1 -1
  155. package/public/components/textinput/Textinput.nested.js +320 -1
  156. package/public/components/textinput/Textinput.nested.js.map +1 -1
  157. package/public/components/toggle/Toggle.js +278 -1
  158. package/public/components/toggle/Toggle.js.map +1 -1
  159. package/public/components/tooltip/Tooltip.js +173 -1
  160. package/public/components/tooltip/Tooltip.js.map +1 -1
  161. package/public/index-c33b3772.js +873 -1
  162. package/public/index-c33b3772.js.map +1 -1
  163. package/public/linear-f46d7e9e.js +700 -1
  164. package/public/linear-f46d7e9e.js.map +1 -1
  165. package/public/path-1b5da959.js +186 -1
  166. package/public/path-1b5da959.js.map +1 -1
  167. package/public/sidebar-service-275bf9ef.js +129 -1
  168. package/public/sidebar-service-275bf9ef.js.map +1 -1
  169. package/public/symbol-b05a6e2b.js +169 -1
  170. package/public/symbol-b05a6e2b.js.map +1 -1
  171. package/public/transform-15d69d5d.js +2743 -1
  172. package/public/transform-15d69d5d.js.map +1 -1
  173. package/public/utilities/stories/phonenumber/PhoneNumber.stories.d.ts.map +1 -1
@@ -1,2 +1,1139 @@
1
- import{S as t,i as o,a as e,b as i,f as n,s as r,c as m,e as c,d as l,n as d,h as a,j as s,B as b,C as u,D as h,E as f,m as g,o as p,p as x,r as w,q as _,g as $,M as y,Z as v,K as k,x as z,A as j,G as E,t as q,k as C}from"../../index-c33b3772.js";import{c as N}from"../../EventForward-8492ff62.js";import S from"../loader/Loader.nested.js";function A(t){let o,e,n,r;const m=[M,L],l=[];function d(t,o){return t[13]&&"left"===t[12]?0:1}return e=d(t),n=l[e]=m[e](t),{c(){o=c("span"),n.c(),$(o,"class","mc-button__icon")},m(t,n){i(t,o,n),l[e].m(o,null),r=!0},p(t,i){let r=e;e=d(t),e===r?l[e].p(t,i):(y(),h(l[r],1,1,(()=>{l[r]=null})),f(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),u(n,1),n.m(o,null))},i(t){r||(u(n),r=!0)},o(t){h(n),r=!1},d(t){t&&p(o),l[e].d()}}}function L(t){let o,e,n=`<${H(t[2],t[6],t[5])} />`;return{c(){o=new v(!1),e=k(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${H(t[2],t[6],t[5])} />`)&&o.p(n)},i:d,o:d,d(t){t&&p(e),t&&o.d()}}}function M(t){let o,e;return o=new S({props:{size:"s",theme:t[11],text:"TEST"}}),{c(){z(o.$$.fragment)},m(t,i){j(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(u(o.$$.fragment,t),e=!0)},o(t){h(o.$$.fragment,t),e=!1},d(t){E(o,t)}}}function O(t){let o,e,n,r,m,d,a=t[13]&&"left"===t[12]&&!t[5]&&T(t),b=t[13]&&"right"===t[12]&&!t[5]&&B(t);return{c(){a&&a.c(),o=l(),e=c("span"),n=q(t[4]),r=l(),b&&b.c(),m=k(),$(e,"class","mc-button__label")},m(t,c){a&&a.m(t,c),i(t,o,c),i(t,e,c),s(e,n),i(t,r,c),b&&b.m(t,c),i(t,m,c),d=!0},p(t,e){t[13]&&"left"===t[12]&&!t[5]?a?(a.p(t,e),12320&e&&u(a,1)):(a=T(t),a.c(),u(a,1),a.m(o.parentNode,o)):a&&(y(),h(a,1,1,(()=>{a=null})),f()),(!d||16&e)&&C(n,t[4]),t[13]&&"right"===t[12]&&!t[5]?b?(b.p(t,e),12320&e&&u(b,1)):(b=B(t),b.c(),u(b,1),b.m(m.parentNode,m)):b&&(y(),h(b,1,1,(()=>{b=null})),f())},i(t){d||(u(a),u(b),d=!0)},o(t){h(a),h(b),d=!1},d(t){a&&a.d(t),t&&p(o),t&&p(e),t&&p(r),b&&b.d(t),t&&p(m)}}}function R(t){let o,e,n,r;const m=[F,D],l=[];function d(t,o){return t[13]?0:1}return e=d(t),n=l[e]=m[e](t),{c(){o=c("span"),n.c(),$(o,"class","mc-button__icon")},m(t,n){i(t,o,n),l[e].m(o,null),r=!0},p(t,i){let r=e;e=d(t),e===r?l[e].p(t,i):(y(),h(l[r],1,1,(()=>{l[r]=null})),f(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),u(n,1),n.m(o,null))},i(t){r||(u(n),r=!0)},o(t){h(n),r=!1},d(t){t&&p(o),l[e].d()}}}function T(t){let o,e,n;return e=new S({props:{size:"s",theme:t[11],text:""}}),{c(){o=c("span"),z(e.$$.fragment),$(o,"class","mc-button__icon")},m(t,r){i(t,o,r),j(e,o,null),n=!0},p(t,o){const i={};2048&o&&(i.theme=t[11]),e.$set(i)},i(t){n||(u(e.$$.fragment,t),n=!0)},o(t){h(e.$$.fragment,t),n=!1},d(t){t&&p(o),E(e)}}}function B(t){let o,e,n;return e=new S({props:{size:"s",theme:t[11],text:""}}),{c(){o=c("span"),z(e.$$.fragment),$(o,"class","mc-button__icon")},m(t,r){i(t,o,r),j(e,o,null),n=!0},p(t,o){const i={};2048&o&&(i.theme=t[11]),e.$set(i)},i(t){n||(u(e.$$.fragment,t),n=!0)},o(t){h(e.$$.fragment,t),n=!1},d(t){t&&p(o),E(e)}}}function D(t){let o,e,n=`<${H(t[2],t[6],t[5])} size="100%" />`;return{c(){o=new v(!1),e=k(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${H(t[2],t[6],t[5])} size="100%" />`)&&o.p(n)},i:d,o:d,d(t){t&&p(e),t&&o.d()}}}function F(t){let o,e;return o=new S({props:{size:"m",theme:t[11],text:""}}),{c(){z(o.$$.fragment)},m(t,i){j(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(u(o.$$.fragment,t),e=!0)},o(t){h(o.$$.fragment,t),e=!1},d(t){E(o,t)}}}function G(t){let o,e,n,r;const m=[K,J],l=[];function d(t,o){return t[13]&&"right"===t[12]?0:1}return e=d(t),n=l[e]=m[e](t),{c(){o=c("span"),n.c(),$(o,"class","mc-button__icon")},m(t,n){i(t,o,n),l[e].m(o,null),r=!0},p(t,i){let r=e;e=d(t),e===r?l[e].p(t,i):(y(),h(l[r],1,1,(()=>{l[r]=null})),f(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),u(n,1),n.m(o,null))},i(t){r||(u(n),r=!0)},o(t){h(n),r=!1},d(t){t&&p(o),l[e].d()}}}function J(t){let o,e,n=`<${H(t[2],t[6],t[5])} />`;return{c(){o=new v(!1),e=k(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${H(t[2],t[6],t[5])} />`)&&o.p(n)},i:d,o:d,d(t){t&&p(e),t&&o.d()}}}function K(t){let o,e;return o=new S({props:{size:"s",theme:t[11],text:""}}),{c(){z(o.$$.fragment)},m(t,i){j(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(u(o.$$.fragment,t),e=!0)},o(t){h(o.$$.fragment,t),e=!1},d(t){E(o,t)}}}function Z(t){let o,e,n,r,x,w,_,$,v,k=t[5]&&"left"===t[6]&&A(t);const z=[R,O],j=[];function E(t,o){return t[5]&&"only"===t[6]?0:1}n=E(t),r=j[n]=z[n](t);let q=t[5]&&"right"===t[6]&&G(t),C=[{type:t[8]},{class:w=t[15](t[1],t[0],t[2],t[3])+" "+t[10]},{disabled:t[7]},t[9]],N={};for(let t=0;t<C.length;t+=1)N=m(N,C[t]);return{c(){o=c("button"),k&&k.c(),e=l(),r.c(),x=l(),q&&q.c(),this.c=d,a(o,N)},m(r,m){i(r,o,m),k&&k.m(o,null),s(o,e),j[n].m(o,null),s(o,x),q&&q.m(o,null),o.autofocus&&o.focus(),_=!0,$||(v=b(t[14].call(null,o)),$=!0)},p(t,[i]){t[5]&&"left"===t[6]?k?(k.p(t,i),96&i&&u(k,1)):(k=A(t),k.c(),u(k,1),k.m(o,e)):k&&(y(),h(k,1,1,(()=>{k=null})),f());let m=n;n=E(t),n===m?j[n].p(t,i):(y(),h(j[m],1,1,(()=>{j[m]=null})),f(),r=j[n],r?r.p(t,i):(r=j[n]=z[n](t),r.c()),u(r,1),r.m(o,x)),t[5]&&"right"===t[6]?q?(q.p(t,i),96&i&&u(q,1)):(q=G(t),q.c(),u(q,1),q.m(o,null)):q&&(y(),h(q,1,1,(()=>{q=null})),f()),a(o,N=g(C,[(!_||256&i)&&{type:t[8]},(!_||1039&i&&w!==(w=t[15](t[1],t[0],t[2],t[3])+" "+t[10]))&&{class:w},(!_||128&i)&&{disabled:t[7]},512&i&&t[9]]))},i(t){_||(u(k),u(r),u(q),_=!0)},o(t){h(k),h(r),h(q),_=!1},d(t){t&&p(o),k&&k.d(),j[n].d(),q&&q.d(),$=!1,v()}}}function H(t,o,e){const i="only"===o;let n;switch(t){case"s":n="24px";break;case"m":n=i?"32px":"24px";break;case"l":n=i?"100%":"32px"}return`${e} size="${n}" class="no"`}function I(t,o,e){let i,n,r,c,l,d;const a=["bordered","theme","size","full","label","iconname","iconmode","disabled","responsivesize","responsivewidth","type","loader"];let s=x(o,a);var b,u,h;let{bordered:f=!1}=o,{theme:g}=o,{size:p="m"}=o,{full:$=!1}=o,{label:y}=o,{iconname:v}=o,{iconmode:k}=o,{disabled:z=!1}=o,{responsivesize:j}=o,{responsivewidth:E}=o,{type:q="button"}=o,{loader:C}=o;const S=N(w());return t.$$set=t=>{e(24,o=m(m({},o),_(t))),e(23,s=x(o,a)),"bordered"in t&&e(0,f=t.bordered),"theme"in t&&e(1,g=t.theme),"size"in t&&e(2,p=t.size),"full"in t&&e(3,$=t.full),"label"in t&&e(4,y=t.label),"iconname"in t&&e(5,v=t.iconname),"iconmode"in t&&e(6,k=t.iconmode),"disabled"in t&&e(7,z=t.disabled),"responsivesize"in t&&e(16,j=t.responsivesize),"responsivewidth"in t&&e(17,E=t.responsivewidth),"type"in t&&e(8,q=t.type),"loader"in t&&e(18,C=t.loader)},t.$$.update=()=>{262144&t.$$.dirty&&e(22,i=C?JSON.parse(C):void 0),4718592&t.$$.dirty&&e(13,n=null!==e(19,b=null==i?void 0:i.enabled)&&void 0!==b&&b),5242880&t.$$.dirty&&e(12,r=null!==e(20,u=null==i?void 0:i.position)&&void 0!==u?u:"left"),6291456&t.$$.dirty&&e(11,c=null!==e(21,h=null==i?void 0:i.theme)&&void 0!==h?h:"primary"),e(10,l=o.class),e(9,d=Object.assign({},s)),512&t.$$.dirty&&delete d.class},o=_(o),[f,g,p,$,y,v,k,z,q,d,l,c,r,n,S,function(t,o,e,i){const n=["mc-button"],r=function(t,o){if(!o&&!t)return"";const e=o?"bordered":"solid";return t?`mc-button--${e}-${t}`:`mc-button--${e}`}(t,o);return r&&n.push(r),e&&n.push(`mc-button--${e}`),i?n.push("mc-button--full"):n.push("mc-button--fit"),"only"===k&&n.push("mc-button--square"),j&&n.push(`mc-button--${j}`),E&&n.push(`mc-button--${E}`),n.join(" ")},j,E,C,b,u,h,i]}class P extends t{constructor(t){super();const m=document.createElement("style");m.textContent='.mc-button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;color:#ffffff;background-color:#188803;font-family:"LeroyMerlin", sans-serif;font-weight:600;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;fill:currentColor}.mc-button.is-hover,.mc-button:hover{background-color:#006902;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006902}.mc-button:disabled,.mc-button.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button .mc-button__icon:first-child,.mc-button .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button.is-focus,.mc-button:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-button--s{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s .mc-button__icon:first-child,.mc-button--s .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m .mc-button__icon:first-child,.mc-button--m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l .mc-button__icon{width:2rem;height:2rem}.mc-button--l .mc-button__icon:first-child,.mc-button--l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:0;padding:0}.mc-button__icon{-ms-flex-negative:0;flex-shrink:0}.mc-button__icon:last-child{margin-left:0.5rem;margin-right:-0.25rem}.mc-button__icon:first-child{margin-right:0.5rem;margin-left:-0.25rem}.mc-button__icon:only-child{margin:0}.mc-button__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none}.mc-button--solid-primary-02{background-color:#6a7081}.mc-button--solid-primary-02.is-hover,.mc-button--solid-primary-02:hover{background-color:#242938}.mc-button--solid-primary-02.is-active,.mc-button--solid-primary-02:active{background-color:#171b26}.mc-button--solid-primary-02:disabled,.mc-button--solid-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-neutral{background-color:#333333}.mc-button--solid-neutral.is-hover,.mc-button--solid-neutral:hover{background-color:#191919}.mc-button--solid-neutral.is-active,.mc-button--solid-neutral:active{background-color:#333333}.mc-button--solid-neutral:disabled,.mc-button--solid-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-danger{background-color:#c61112}.mc-button--solid-danger.is-hover,.mc-button--solid-danger:hover{background-color:#8c0003}.mc-button--solid-danger.is-active,.mc-button--solid-danger:active{background-color:#8c0003}.mc-button--solid-danger:disabled,.mc-button--solid-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered{color:#188803;border-color:#188803;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#ebf5de;color:#006902}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered:disabled,.mc-button--bordered.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-primary-02{color:#6a7081;border-color:#6a7081;background-color:#ffffff}.mc-button--bordered-primary-02.is-hover,.mc-button--bordered-primary-02:hover{background-color:#eeeff1;color:#6a7081}.mc-button--bordered-primary-02.is-active,.mc-button--bordered-primary-02:active{background-color:#cfd2d8}.mc-button--bordered-primary-02:disabled,.mc-button--bordered-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-neutral{color:#333333;border-color:#333333;background-color:#ffffff}.mc-button--bordered-neutral.is-hover,.mc-button--bordered-neutral:hover{background-color:#e6e6e6;color:#333333}.mc-button--bordered-neutral.is-active,.mc-button--bordered-neutral:active{background-color:#cccccc}.mc-button--bordered-neutral:disabled,.mc-button--bordered-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-danger{color:#c61112;border-color:#c61112;background-color:#ffffff}.mc-button--bordered-danger.is-hover,.mc-button--bordered-danger:hover{background-color:#fdeaea;color:#8c0003}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger:disabled,.mc-button--bordered-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}@media screen and (min-width: 680px){.mc-button--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-m .mc-button__icon:first-child,.mc-button--s\\@from-m .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-m .mc-button__icon:first-child,.mc-button--m\\@from-m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-m{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-m .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-m .mc-button__icon:first-child,.mc-button--l\\@from-m .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-m{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-m{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-m{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1024px){.mc-button--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-l .mc-button__icon:first-child,.mc-button--s\\@from-l .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-l{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-l .mc-button__icon:first-child,.mc-button--m\\@from-l .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-l .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-l .mc-button__icon:first-child,.mc-button--l\\@from-l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-l{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-l{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-l{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{padding:0}}@media screen and (min-width: 1280px){.mc-button--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xl .mc-button__icon:first-child,.mc-button--s\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl .mc-button__icon:first-child,.mc-button--m\\@from-xl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xl .mc-button__icon:first-child,.mc-button--l\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1920px){.mc-button--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xxl .mc-button__icon:first-child,.mc-button--s\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl .mc-button__icon:first-child,.mc-button--m\\@from-xxl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xxl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xxl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xxl .mc-button__icon:first-child,.mc-button--l\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xxl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xxl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}.mc-button__icon{pointer-events:none}',this.shadowRoot.appendChild(m),o(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},I,Z,r,{bordered:0,theme:1,size:2,full:3,label:4,iconname:5,iconmode:6,disabled:7,responsivesize:16,responsivewidth:17,type:8,loader:18},null),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["bordered","theme","size","full","label","iconname","iconmode","disabled","responsivesize","responsivewidth","type","loader"]}get bordered(){return this.$$.ctx[0]}set bordered(t){this.$$set({bordered:t}),n()}get theme(){return this.$$.ctx[1]}set theme(t){this.$$set({theme:t}),n()}get size(){return this.$$.ctx[2]}set size(t){this.$$set({size:t}),n()}get full(){return this.$$.ctx[3]}set full(t){this.$$set({full:t}),n()}get label(){return this.$$.ctx[4]}set label(t){this.$$set({label:t}),n()}get iconname(){return this.$$.ctx[5]}set iconname(t){this.$$set({iconname:t}),n()}get iconmode(){return this.$$.ctx[6]}set iconmode(t){this.$$set({iconmode:t}),n()}get disabled(){return this.$$.ctx[7]}set disabled(t){this.$$set({disabled:t}),n()}get responsivesize(){return this.$$.ctx[16]}set responsivesize(t){this.$$set({responsivesize:t}),n()}get responsivewidth(){return this.$$.ctx[17]}set responsivewidth(t){this.$$set({responsivewidth:t}),n()}get type(){return this.$$.ctx[8]}set type(t){this.$$set({type:t}),n()}get loader(){return this.$$.ctx[18]}set loader(t){this.$$set({loader:t}),n()}}export{P as default};
1
+ import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, c as assign, e as element, d as space, n as noop, h as set_attributes, j as append, B as action_destroyer, C as transition_in, D as transition_out, E as check_outros, m as get_spread_update, o as detach, p as compute_rest_props, r as get_current_component, q as exclude_internal_props, g as attr, M as group_outros, Z as HtmlTag, K as empty, x as create_component, A as mount_component, G as destroy_component, t as text, k as set_data } from '../../index-c33b3772.js';
2
+ import { c as createEventForwarder } from '../../EventForward-8492ff62.js';
3
+ import Loader_nested from '../loader/Loader.nested.js';
4
+
5
+ /* src/components/button/Button.svelte generated by Svelte v3.58.0 */
6
+
7
+ function create_if_block_6(ctx) {
8
+ let span;
9
+ let current_block_type_index;
10
+ let if_block;
11
+ let current;
12
+ const if_block_creators = [create_if_block_7, create_else_block_3];
13
+ const if_blocks = [];
14
+
15
+ function select_block_type(ctx, dirty) {
16
+ if (/*isLoading*/ ctx[13] && /*loaderPosition*/ ctx[12] === 'left') return 0;
17
+ return 1;
18
+ }
19
+
20
+ current_block_type_index = select_block_type(ctx);
21
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
22
+
23
+ return {
24
+ c() {
25
+ span = element("span");
26
+ if_block.c();
27
+ attr(span, "class", "mc-button__icon");
28
+ },
29
+ m(target, anchor) {
30
+ insert(target, span, anchor);
31
+ if_blocks[current_block_type_index].m(span, null);
32
+ current = true;
33
+ },
34
+ p(ctx, dirty) {
35
+ let previous_block_index = current_block_type_index;
36
+ current_block_type_index = select_block_type(ctx);
37
+
38
+ if (current_block_type_index === previous_block_index) {
39
+ if_blocks[current_block_type_index].p(ctx, dirty);
40
+ } else {
41
+ group_outros();
42
+
43
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
44
+ if_blocks[previous_block_index] = null;
45
+ });
46
+
47
+ check_outros();
48
+ if_block = if_blocks[current_block_type_index];
49
+
50
+ if (!if_block) {
51
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
52
+ if_block.c();
53
+ } else {
54
+ if_block.p(ctx, dirty);
55
+ }
56
+
57
+ transition_in(if_block, 1);
58
+ if_block.m(span, null);
59
+ }
60
+ },
61
+ i(local) {
62
+ if (current) return;
63
+ transition_in(if_block);
64
+ current = true;
65
+ },
66
+ o(local) {
67
+ transition_out(if_block);
68
+ current = false;
69
+ },
70
+ d(detaching) {
71
+ if (detaching) detach(span);
72
+ if_blocks[current_block_type_index].d();
73
+ }
74
+ };
75
+ }
76
+
77
+ // (92:6) {:else}
78
+ function create_else_block_3(ctx) {
79
+ let html_tag;
80
+ let raw_value = `<${generateIconName(/*size*/ ctx[2], /*iconmode*/ ctx[6], /*iconname*/ ctx[5])} />` + "";
81
+ let html_anchor;
82
+
83
+ return {
84
+ c() {
85
+ html_tag = new HtmlTag(false);
86
+ html_anchor = empty();
87
+ html_tag.a = html_anchor;
88
+ },
89
+ m(target, anchor) {
90
+ html_tag.m(raw_value, target, anchor);
91
+ insert(target, html_anchor, anchor);
92
+ },
93
+ p(ctx, dirty) {
94
+ if (dirty & /*size, iconmode, iconname*/ 100 && raw_value !== (raw_value = `<${generateIconName(/*size*/ ctx[2], /*iconmode*/ ctx[6], /*iconname*/ ctx[5])} />` + "")) html_tag.p(raw_value);
95
+ },
96
+ i: noop,
97
+ o: noop,
98
+ d(detaching) {
99
+ if (detaching) detach(html_anchor);
100
+ if (detaching) html_tag.d();
101
+ }
102
+ };
103
+ }
104
+
105
+ // (90:6) {#if isLoading && loaderPosition === 'left'}
106
+ function create_if_block_7(ctx) {
107
+ let loader_1;
108
+ let current;
109
+
110
+ loader_1 = new Loader_nested({
111
+ props: {
112
+ size: "s",
113
+ theme: /*loaderTheme*/ ctx[11],
114
+ text: "TEST"
115
+ }
116
+ });
117
+
118
+ return {
119
+ c() {
120
+ create_component(loader_1.$$.fragment);
121
+ },
122
+ m(target, anchor) {
123
+ mount_component(loader_1, target, anchor);
124
+ current = true;
125
+ },
126
+ p(ctx, dirty) {
127
+ const loader_1_changes = {};
128
+ if (dirty & /*loaderTheme*/ 2048) loader_1_changes.theme = /*loaderTheme*/ ctx[11];
129
+ loader_1.$set(loader_1_changes);
130
+ },
131
+ i(local) {
132
+ if (current) return;
133
+ transition_in(loader_1.$$.fragment, local);
134
+ current = true;
135
+ },
136
+ o(local) {
137
+ transition_out(loader_1.$$.fragment, local);
138
+ current = false;
139
+ },
140
+ d(detaching) {
141
+ destroy_component(loader_1, detaching);
142
+ }
143
+ };
144
+ }
145
+
146
+ // (106:2) {:else}
147
+ function create_else_block_2(ctx) {
148
+ let t0;
149
+ let span;
150
+ let t1;
151
+ let t2;
152
+ let if_block1_anchor;
153
+ let current;
154
+ let if_block0 = /*isLoading*/ ctx[13] && /*loaderPosition*/ ctx[12] === 'left' && !/*iconname*/ ctx[5] && create_if_block_5(ctx);
155
+ let if_block1 = /*isLoading*/ ctx[13] && /*loaderPosition*/ ctx[12] === 'right' && !/*iconname*/ ctx[5] && create_if_block_4(ctx);
156
+
157
+ return {
158
+ c() {
159
+ if (if_block0) if_block0.c();
160
+ t0 = space();
161
+ span = element("span");
162
+ t1 = text(/*label*/ ctx[4]);
163
+ t2 = space();
164
+ if (if_block1) if_block1.c();
165
+ if_block1_anchor = empty();
166
+ attr(span, "class", "mc-button__label");
167
+ },
168
+ m(target, anchor) {
169
+ if (if_block0) if_block0.m(target, anchor);
170
+ insert(target, t0, anchor);
171
+ insert(target, span, anchor);
172
+ append(span, t1);
173
+ insert(target, t2, anchor);
174
+ if (if_block1) if_block1.m(target, anchor);
175
+ insert(target, if_block1_anchor, anchor);
176
+ current = true;
177
+ },
178
+ p(ctx, dirty) {
179
+ if (/*isLoading*/ ctx[13] && /*loaderPosition*/ ctx[12] === 'left' && !/*iconname*/ ctx[5]) {
180
+ if (if_block0) {
181
+ if_block0.p(ctx, dirty);
182
+
183
+ if (dirty & /*isLoading, loaderPosition, iconname*/ 12320) {
184
+ transition_in(if_block0, 1);
185
+ }
186
+ } else {
187
+ if_block0 = create_if_block_5(ctx);
188
+ if_block0.c();
189
+ transition_in(if_block0, 1);
190
+ if_block0.m(t0.parentNode, t0);
191
+ }
192
+ } else if (if_block0) {
193
+ group_outros();
194
+
195
+ transition_out(if_block0, 1, 1, () => {
196
+ if_block0 = null;
197
+ });
198
+
199
+ check_outros();
200
+ }
201
+
202
+ if (!current || dirty & /*label*/ 16) set_data(t1, /*label*/ ctx[4]);
203
+
204
+ if (/*isLoading*/ ctx[13] && /*loaderPosition*/ ctx[12] === 'right' && !/*iconname*/ ctx[5]) {
205
+ if (if_block1) {
206
+ if_block1.p(ctx, dirty);
207
+
208
+ if (dirty & /*isLoading, loaderPosition, iconname*/ 12320) {
209
+ transition_in(if_block1, 1);
210
+ }
211
+ } else {
212
+ if_block1 = create_if_block_4(ctx);
213
+ if_block1.c();
214
+ transition_in(if_block1, 1);
215
+ if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
216
+ }
217
+ } else if (if_block1) {
218
+ group_outros();
219
+
220
+ transition_out(if_block1, 1, 1, () => {
221
+ if_block1 = null;
222
+ });
223
+
224
+ check_outros();
225
+ }
226
+ },
227
+ i(local) {
228
+ if (current) return;
229
+ transition_in(if_block0);
230
+ transition_in(if_block1);
231
+ current = true;
232
+ },
233
+ o(local) {
234
+ transition_out(if_block0);
235
+ transition_out(if_block1);
236
+ current = false;
237
+ },
238
+ d(detaching) {
239
+ if (if_block0) if_block0.d(detaching);
240
+ if (detaching) detach(t0);
241
+ if (detaching) detach(span);
242
+ if (detaching) detach(t2);
243
+ if (if_block1) if_block1.d(detaching);
244
+ if (detaching) detach(if_block1_anchor);
245
+ }
246
+ };
247
+ }
248
+
249
+ // (98:2) {#if iconname && iconmode === 'only'}
250
+ function create_if_block_2(ctx) {
251
+ let span;
252
+ let current_block_type_index;
253
+ let if_block;
254
+ let current;
255
+ const if_block_creators = [create_if_block_3, create_else_block_1];
256
+ const if_blocks = [];
257
+
258
+ function select_block_type_2(ctx, dirty) {
259
+ if (/*isLoading*/ ctx[13]) return 0;
260
+ return 1;
261
+ }
262
+
263
+ current_block_type_index = select_block_type_2(ctx);
264
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
265
+
266
+ return {
267
+ c() {
268
+ span = element("span");
269
+ if_block.c();
270
+ attr(span, "class", "mc-button__icon");
271
+ },
272
+ m(target, anchor) {
273
+ insert(target, span, anchor);
274
+ if_blocks[current_block_type_index].m(span, null);
275
+ current = true;
276
+ },
277
+ p(ctx, dirty) {
278
+ let previous_block_index = current_block_type_index;
279
+ current_block_type_index = select_block_type_2(ctx);
280
+
281
+ if (current_block_type_index === previous_block_index) {
282
+ if_blocks[current_block_type_index].p(ctx, dirty);
283
+ } else {
284
+ group_outros();
285
+
286
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
287
+ if_blocks[previous_block_index] = null;
288
+ });
289
+
290
+ check_outros();
291
+ if_block = if_blocks[current_block_type_index];
292
+
293
+ if (!if_block) {
294
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
295
+ if_block.c();
296
+ } else {
297
+ if_block.p(ctx, dirty);
298
+ }
299
+
300
+ transition_in(if_block, 1);
301
+ if_block.m(span, null);
302
+ }
303
+ },
304
+ i(local) {
305
+ if (current) return;
306
+ transition_in(if_block);
307
+ current = true;
308
+ },
309
+ o(local) {
310
+ transition_out(if_block);
311
+ current = false;
312
+ },
313
+ d(detaching) {
314
+ if (detaching) detach(span);
315
+ if_blocks[current_block_type_index].d();
316
+ }
317
+ };
318
+ }
319
+
320
+ // (107:4) {#if isLoading && loaderPosition === 'left' && !iconname}
321
+ function create_if_block_5(ctx) {
322
+ let span;
323
+ let loader_1;
324
+ let current;
325
+
326
+ loader_1 = new Loader_nested({
327
+ props: {
328
+ size: "s",
329
+ theme: /*loaderTheme*/ ctx[11],
330
+ text: ""
331
+ }
332
+ });
333
+
334
+ return {
335
+ c() {
336
+ span = element("span");
337
+ create_component(loader_1.$$.fragment);
338
+ attr(span, "class", "mc-button__icon");
339
+ },
340
+ m(target, anchor) {
341
+ insert(target, span, anchor);
342
+ mount_component(loader_1, span, null);
343
+ current = true;
344
+ },
345
+ p(ctx, dirty) {
346
+ const loader_1_changes = {};
347
+ if (dirty & /*loaderTheme*/ 2048) loader_1_changes.theme = /*loaderTheme*/ ctx[11];
348
+ loader_1.$set(loader_1_changes);
349
+ },
350
+ i(local) {
351
+ if (current) return;
352
+ transition_in(loader_1.$$.fragment, local);
353
+ current = true;
354
+ },
355
+ o(local) {
356
+ transition_out(loader_1.$$.fragment, local);
357
+ current = false;
358
+ },
359
+ d(detaching) {
360
+ if (detaching) detach(span);
361
+ destroy_component(loader_1);
362
+ }
363
+ };
364
+ }
365
+
366
+ // (113:4) {#if isLoading && loaderPosition === 'right' && !iconname}
367
+ function create_if_block_4(ctx) {
368
+ let span;
369
+ let loader_1;
370
+ let current;
371
+
372
+ loader_1 = new Loader_nested({
373
+ props: {
374
+ size: "s",
375
+ theme: /*loaderTheme*/ ctx[11],
376
+ text: ""
377
+ }
378
+ });
379
+
380
+ return {
381
+ c() {
382
+ span = element("span");
383
+ create_component(loader_1.$$.fragment);
384
+ attr(span, "class", "mc-button__icon");
385
+ },
386
+ m(target, anchor) {
387
+ insert(target, span, anchor);
388
+ mount_component(loader_1, span, null);
389
+ current = true;
390
+ },
391
+ p(ctx, dirty) {
392
+ const loader_1_changes = {};
393
+ if (dirty & /*loaderTheme*/ 2048) loader_1_changes.theme = /*loaderTheme*/ ctx[11];
394
+ loader_1.$set(loader_1_changes);
395
+ },
396
+ i(local) {
397
+ if (current) return;
398
+ transition_in(loader_1.$$.fragment, local);
399
+ current = true;
400
+ },
401
+ o(local) {
402
+ transition_out(loader_1.$$.fragment, local);
403
+ current = false;
404
+ },
405
+ d(detaching) {
406
+ if (detaching) detach(span);
407
+ destroy_component(loader_1);
408
+ }
409
+ };
410
+ }
411
+
412
+ // (102:6) {:else}
413
+ function create_else_block_1(ctx) {
414
+ let html_tag;
415
+ let raw_value = `<${generateIconName(/*size*/ ctx[2], /*iconmode*/ ctx[6], /*iconname*/ ctx[5])} size="100%" />` + "";
416
+ let html_anchor;
417
+
418
+ return {
419
+ c() {
420
+ html_tag = new HtmlTag(false);
421
+ html_anchor = empty();
422
+ html_tag.a = html_anchor;
423
+ },
424
+ m(target, anchor) {
425
+ html_tag.m(raw_value, target, anchor);
426
+ insert(target, html_anchor, anchor);
427
+ },
428
+ p(ctx, dirty) {
429
+ if (dirty & /*size, iconmode, iconname*/ 100 && raw_value !== (raw_value = `<${generateIconName(/*size*/ ctx[2], /*iconmode*/ ctx[6], /*iconname*/ ctx[5])} size="100%" />` + "")) html_tag.p(raw_value);
430
+ },
431
+ i: noop,
432
+ o: noop,
433
+ d(detaching) {
434
+ if (detaching) detach(html_anchor);
435
+ if (detaching) html_tag.d();
436
+ }
437
+ };
438
+ }
439
+
440
+ // (100:6) {#if isLoading}
441
+ function create_if_block_3(ctx) {
442
+ let loader_1;
443
+ let current;
444
+
445
+ loader_1 = new Loader_nested({
446
+ props: {
447
+ size: "m",
448
+ theme: /*loaderTheme*/ ctx[11],
449
+ text: ""
450
+ }
451
+ });
452
+
453
+ return {
454
+ c() {
455
+ create_component(loader_1.$$.fragment);
456
+ },
457
+ m(target, anchor) {
458
+ mount_component(loader_1, target, anchor);
459
+ current = true;
460
+ },
461
+ p(ctx, dirty) {
462
+ const loader_1_changes = {};
463
+ if (dirty & /*loaderTheme*/ 2048) loader_1_changes.theme = /*loaderTheme*/ ctx[11];
464
+ loader_1.$set(loader_1_changes);
465
+ },
466
+ i(local) {
467
+ if (current) return;
468
+ transition_in(loader_1.$$.fragment, local);
469
+ current = true;
470
+ },
471
+ o(local) {
472
+ transition_out(loader_1.$$.fragment, local);
473
+ current = false;
474
+ },
475
+ d(detaching) {
476
+ destroy_component(loader_1, detaching);
477
+ }
478
+ };
479
+ }
480
+
481
+ // (120:2) {#if iconname && iconmode === 'right'}
482
+ function create_if_block(ctx) {
483
+ let span;
484
+ let current_block_type_index;
485
+ let if_block;
486
+ let current;
487
+ const if_block_creators = [create_if_block_1, create_else_block];
488
+ const if_blocks = [];
489
+
490
+ function select_block_type_3(ctx, dirty) {
491
+ if (/*isLoading*/ ctx[13] && /*loaderPosition*/ ctx[12] === 'right') return 0;
492
+ return 1;
493
+ }
494
+
495
+ current_block_type_index = select_block_type_3(ctx);
496
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
497
+
498
+ return {
499
+ c() {
500
+ span = element("span");
501
+ if_block.c();
502
+ attr(span, "class", "mc-button__icon");
503
+ },
504
+ m(target, anchor) {
505
+ insert(target, span, anchor);
506
+ if_blocks[current_block_type_index].m(span, null);
507
+ current = true;
508
+ },
509
+ p(ctx, dirty) {
510
+ let previous_block_index = current_block_type_index;
511
+ current_block_type_index = select_block_type_3(ctx);
512
+
513
+ if (current_block_type_index === previous_block_index) {
514
+ if_blocks[current_block_type_index].p(ctx, dirty);
515
+ } else {
516
+ group_outros();
517
+
518
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
519
+ if_blocks[previous_block_index] = null;
520
+ });
521
+
522
+ check_outros();
523
+ if_block = if_blocks[current_block_type_index];
524
+
525
+ if (!if_block) {
526
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
527
+ if_block.c();
528
+ } else {
529
+ if_block.p(ctx, dirty);
530
+ }
531
+
532
+ transition_in(if_block, 1);
533
+ if_block.m(span, null);
534
+ }
535
+ },
536
+ i(local) {
537
+ if (current) return;
538
+ transition_in(if_block);
539
+ current = true;
540
+ },
541
+ o(local) {
542
+ transition_out(if_block);
543
+ current = false;
544
+ },
545
+ d(detaching) {
546
+ if (detaching) detach(span);
547
+ if_blocks[current_block_type_index].d();
548
+ }
549
+ };
550
+ }
551
+
552
+ // (124:6) {:else}
553
+ function create_else_block(ctx) {
554
+ let html_tag;
555
+ let raw_value = `<${generateIconName(/*size*/ ctx[2], /*iconmode*/ ctx[6], /*iconname*/ ctx[5])} />` + "";
556
+ let html_anchor;
557
+
558
+ return {
559
+ c() {
560
+ html_tag = new HtmlTag(false);
561
+ html_anchor = empty();
562
+ html_tag.a = html_anchor;
563
+ },
564
+ m(target, anchor) {
565
+ html_tag.m(raw_value, target, anchor);
566
+ insert(target, html_anchor, anchor);
567
+ },
568
+ p(ctx, dirty) {
569
+ if (dirty & /*size, iconmode, iconname*/ 100 && raw_value !== (raw_value = `<${generateIconName(/*size*/ ctx[2], /*iconmode*/ ctx[6], /*iconname*/ ctx[5])} />` + "")) html_tag.p(raw_value);
570
+ },
571
+ i: noop,
572
+ o: noop,
573
+ d(detaching) {
574
+ if (detaching) detach(html_anchor);
575
+ if (detaching) html_tag.d();
576
+ }
577
+ };
578
+ }
579
+
580
+ // (122:6) {#if isLoading && loaderPosition === 'right'}
581
+ function create_if_block_1(ctx) {
582
+ let loader_1;
583
+ let current;
584
+
585
+ loader_1 = new Loader_nested({
586
+ props: {
587
+ size: "s",
588
+ theme: /*loaderTheme*/ ctx[11],
589
+ text: ""
590
+ }
591
+ });
592
+
593
+ return {
594
+ c() {
595
+ create_component(loader_1.$$.fragment);
596
+ },
597
+ m(target, anchor) {
598
+ mount_component(loader_1, target, anchor);
599
+ current = true;
600
+ },
601
+ p(ctx, dirty) {
602
+ const loader_1_changes = {};
603
+ if (dirty & /*loaderTheme*/ 2048) loader_1_changes.theme = /*loaderTheme*/ ctx[11];
604
+ loader_1.$set(loader_1_changes);
605
+ },
606
+ i(local) {
607
+ if (current) return;
608
+ transition_in(loader_1.$$.fragment, local);
609
+ current = true;
610
+ },
611
+ o(local) {
612
+ transition_out(loader_1.$$.fragment, local);
613
+ current = false;
614
+ },
615
+ d(detaching) {
616
+ destroy_component(loader_1, detaching);
617
+ }
618
+ };
619
+ }
620
+
621
+ function create_fragment(ctx) {
622
+ let button;
623
+ let t0;
624
+ let current_block_type_index;
625
+ let if_block1;
626
+ let t1;
627
+ let button_class_value;
628
+ let current;
629
+ let mounted;
630
+ let dispose;
631
+ let if_block0 = /*iconname*/ ctx[5] && /*iconmode*/ ctx[6] === 'left' && create_if_block_6(ctx);
632
+ const if_block_creators = [create_if_block_2, create_else_block_2];
633
+ const if_blocks = [];
634
+
635
+ function select_block_type_1(ctx, dirty) {
636
+ if (/*iconname*/ ctx[5] && /*iconmode*/ ctx[6] === 'only') return 0;
637
+ return 1;
638
+ }
639
+
640
+ current_block_type_index = select_block_type_1(ctx);
641
+ if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
642
+ let if_block2 = /*iconname*/ ctx[5] && /*iconmode*/ ctx[6] === 'right' && create_if_block(ctx);
643
+
644
+ let button_levels = [
645
+ { type: /*type*/ ctx[8] },
646
+ {
647
+ class: button_class_value = "" + (/*getClasses*/ ctx[15](/*theme*/ ctx[1], /*bordered*/ ctx[0], /*size*/ ctx[2], /*full*/ ctx[3]) + " " + /*userClass*/ ctx[10])
648
+ },
649
+ { disabled: /*disabled*/ ctx[7] },
650
+ /*attributes*/ ctx[9]
651
+ ];
652
+
653
+ let button_data = {};
654
+
655
+ for (let i = 0; i < button_levels.length; i += 1) {
656
+ button_data = assign(button_data, button_levels[i]);
657
+ }
658
+
659
+ return {
660
+ c() {
661
+ button = element("button");
662
+ if (if_block0) if_block0.c();
663
+ t0 = space();
664
+ if_block1.c();
665
+ t1 = space();
666
+ if (if_block2) if_block2.c();
667
+ this.c = noop;
668
+ set_attributes(button, button_data);
669
+ },
670
+ m(target, anchor) {
671
+ insert(target, button, anchor);
672
+ if (if_block0) if_block0.m(button, null);
673
+ append(button, t0);
674
+ if_blocks[current_block_type_index].m(button, null);
675
+ append(button, t1);
676
+ if (if_block2) if_block2.m(button, null);
677
+ if (button.autofocus) button.focus();
678
+ current = true;
679
+
680
+ if (!mounted) {
681
+ dispose = action_destroyer(/*forwardEvents*/ ctx[14].call(null, button));
682
+ mounted = true;
683
+ }
684
+ },
685
+ p(ctx, [dirty]) {
686
+ if (/*iconname*/ ctx[5] && /*iconmode*/ ctx[6] === 'left') {
687
+ if (if_block0) {
688
+ if_block0.p(ctx, dirty);
689
+
690
+ if (dirty & /*iconname, iconmode*/ 96) {
691
+ transition_in(if_block0, 1);
692
+ }
693
+ } else {
694
+ if_block0 = create_if_block_6(ctx);
695
+ if_block0.c();
696
+ transition_in(if_block0, 1);
697
+ if_block0.m(button, t0);
698
+ }
699
+ } else if (if_block0) {
700
+ group_outros();
701
+
702
+ transition_out(if_block0, 1, 1, () => {
703
+ if_block0 = null;
704
+ });
705
+
706
+ check_outros();
707
+ }
708
+
709
+ let previous_block_index = current_block_type_index;
710
+ current_block_type_index = select_block_type_1(ctx);
711
+
712
+ if (current_block_type_index === previous_block_index) {
713
+ if_blocks[current_block_type_index].p(ctx, dirty);
714
+ } else {
715
+ group_outros();
716
+
717
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
718
+ if_blocks[previous_block_index] = null;
719
+ });
720
+
721
+ check_outros();
722
+ if_block1 = if_blocks[current_block_type_index];
723
+
724
+ if (!if_block1) {
725
+ if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
726
+ if_block1.c();
727
+ } else {
728
+ if_block1.p(ctx, dirty);
729
+ }
730
+
731
+ transition_in(if_block1, 1);
732
+ if_block1.m(button, t1);
733
+ }
734
+
735
+ if (/*iconname*/ ctx[5] && /*iconmode*/ ctx[6] === 'right') {
736
+ if (if_block2) {
737
+ if_block2.p(ctx, dirty);
738
+
739
+ if (dirty & /*iconname, iconmode*/ 96) {
740
+ transition_in(if_block2, 1);
741
+ }
742
+ } else {
743
+ if_block2 = create_if_block(ctx);
744
+ if_block2.c();
745
+ transition_in(if_block2, 1);
746
+ if_block2.m(button, null);
747
+ }
748
+ } else if (if_block2) {
749
+ group_outros();
750
+
751
+ transition_out(if_block2, 1, 1, () => {
752
+ if_block2 = null;
753
+ });
754
+
755
+ check_outros();
756
+ }
757
+
758
+ set_attributes(button, button_data = get_spread_update(button_levels, [
759
+ (!current || dirty & /*type*/ 256) && { type: /*type*/ ctx[8] },
760
+ (!current || dirty & /*theme, bordered, size, full, userClass*/ 1039 && button_class_value !== (button_class_value = "" + (/*getClasses*/ ctx[15](/*theme*/ ctx[1], /*bordered*/ ctx[0], /*size*/ ctx[2], /*full*/ ctx[3]) + " " + /*userClass*/ ctx[10]))) && { class: button_class_value },
761
+ (!current || dirty & /*disabled*/ 128) && { disabled: /*disabled*/ ctx[7] },
762
+ dirty & /*attributes*/ 512 && /*attributes*/ ctx[9]
763
+ ]));
764
+ },
765
+ i(local) {
766
+ if (current) return;
767
+ transition_in(if_block0);
768
+ transition_in(if_block1);
769
+ transition_in(if_block2);
770
+ current = true;
771
+ },
772
+ o(local) {
773
+ transition_out(if_block0);
774
+ transition_out(if_block1);
775
+ transition_out(if_block2);
776
+ current = false;
777
+ },
778
+ d(detaching) {
779
+ if (detaching) detach(button);
780
+ if (if_block0) if_block0.d();
781
+ if_blocks[current_block_type_index].d();
782
+ if (if_block2) if_block2.d();
783
+ mounted = false;
784
+ dispose();
785
+ }
786
+ };
787
+ }
788
+
789
+ function generateIconName(size, iconMode, iconName) {
790
+ const isIconOnly = iconMode === 'only';
791
+ let iconSize;
792
+
793
+ switch (size) {
794
+ case 's':
795
+ iconSize = '24px';
796
+ break;
797
+ case 'm':
798
+ iconSize = isIconOnly ? '32px' : '24px';
799
+ break;
800
+ case 'l':
801
+ iconSize = isIconOnly ? '100%' : '32px';
802
+ break;
803
+ }
804
+
805
+ return `${iconName} size="${iconSize}" class="no"`;
806
+ }
807
+
808
+ function getAppearanceClass(theme, isBordered) {
809
+ if (!isBordered && !theme) {
810
+ return '';
811
+ }
812
+
813
+ const type = isBordered ? 'bordered' : 'solid';
814
+
815
+ if (theme) {
816
+ return `mc-button--${type}-${theme}`;
817
+ }
818
+
819
+ return `mc-button--${type}`;
820
+ }
821
+
822
+ function instance($$self, $$props, $$invalidate) {
823
+ let loaderOpts;
824
+ let isLoading;
825
+ let loaderPosition;
826
+ let loaderTheme;
827
+ let userClass;
828
+ let attributes;
829
+
830
+ const omit_props_names = [
831
+ "bordered","theme","size","full","label","iconname","iconmode","disabled","responsivesize","responsivewidth","type","loader"
832
+ ];
833
+
834
+ let $$restProps = compute_rest_props($$props, omit_props_names);
835
+ var _a, _b, _c;
836
+ let { bordered = false } = $$props;
837
+ let { theme = undefined } = $$props;
838
+ let { size = 'm' } = $$props;
839
+ let { full = false } = $$props;
840
+ let { label } = $$props;
841
+ let { iconname } = $$props;
842
+ let { iconmode } = $$props;
843
+ let { disabled = false } = $$props;
844
+ let { responsivesize = undefined } = $$props;
845
+ let { responsivewidth = undefined } = $$props;
846
+ let { type = 'button' } = $$props;
847
+ let { loader } = $$props;
848
+ const forwardEvents = createEventForwarder(get_current_component());
849
+
850
+ function getClasses(theme, isBordered, size, isFull) {
851
+ const classes = ['mc-button'];
852
+ const appearanceClass = getAppearanceClass(theme, isBordered);
853
+
854
+ if (appearanceClass) {
855
+ classes.push(appearanceClass);
856
+ }
857
+
858
+ if (size) {
859
+ classes.push(`mc-button--${size}`);
860
+ }
861
+
862
+ if (isFull) {
863
+ classes.push(`mc-button--full`);
864
+ } else {
865
+ classes.push(`mc-button--fit`);
866
+ }
867
+
868
+ if (iconmode === 'only') {
869
+ classes.push('mc-button--square');
870
+ }
871
+
872
+ if (responsivesize) {
873
+ classes.push(`mc-button--${responsivesize}`);
874
+ }
875
+
876
+ if (responsivewidth) {
877
+ classes.push(`mc-button--${responsivewidth}`);
878
+ }
879
+
880
+ return classes.join(' ');
881
+ }
882
+
883
+ $$self.$$set = $$new_props => {
884
+ $$invalidate(24, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
885
+ $$invalidate(23, $$restProps = compute_rest_props($$props, omit_props_names));
886
+ if ('bordered' in $$new_props) $$invalidate(0, bordered = $$new_props.bordered);
887
+ if ('theme' in $$new_props) $$invalidate(1, theme = $$new_props.theme);
888
+ if ('size' in $$new_props) $$invalidate(2, size = $$new_props.size);
889
+ if ('full' in $$new_props) $$invalidate(3, full = $$new_props.full);
890
+ if ('label' in $$new_props) $$invalidate(4, label = $$new_props.label);
891
+ if ('iconname' in $$new_props) $$invalidate(5, iconname = $$new_props.iconname);
892
+ if ('iconmode' in $$new_props) $$invalidate(6, iconmode = $$new_props.iconmode);
893
+ if ('disabled' in $$new_props) $$invalidate(7, disabled = $$new_props.disabled);
894
+ if ('responsivesize' in $$new_props) $$invalidate(16, responsivesize = $$new_props.responsivesize);
895
+ if ('responsivewidth' in $$new_props) $$invalidate(17, responsivewidth = $$new_props.responsivewidth);
896
+ if ('type' in $$new_props) $$invalidate(8, type = $$new_props.type);
897
+ if ('loader' in $$new_props) $$invalidate(18, loader = $$new_props.loader);
898
+ };
899
+
900
+ $$self.$$.update = () => {
901
+ if ($$self.$$.dirty & /*loader*/ 262144) {
902
+ $$invalidate(22, loaderOpts = loader ? JSON.parse(loader) : undefined);
903
+ }
904
+
905
+ if ($$self.$$.dirty & /*loaderOpts, _a*/ 4718592) {
906
+ $$invalidate(13, isLoading = $$invalidate(19, _a = loaderOpts === null || loaderOpts === void 0
907
+ ? void 0
908
+ : loaderOpts.enabled) !== null && _a !== void 0
909
+ ? _a
910
+ : false);
911
+ }
912
+
913
+ if ($$self.$$.dirty & /*loaderOpts, _b*/ 5242880) {
914
+ $$invalidate(12, loaderPosition = $$invalidate(20, _b = loaderOpts === null || loaderOpts === void 0
915
+ ? void 0
916
+ : loaderOpts.position) !== null && _b !== void 0
917
+ ? _b
918
+ : 'left');
919
+ }
920
+
921
+ if ($$self.$$.dirty & /*loaderOpts, _c*/ 6291456) {
922
+ $$invalidate(11, loaderTheme = $$invalidate(21, _c = loaderOpts === null || loaderOpts === void 0
923
+ ? void 0
924
+ : loaderOpts.theme) !== null && _c !== void 0
925
+ ? _c
926
+ : 'primary');
927
+ }
928
+
929
+ $$invalidate(10, userClass = $$props.class);
930
+ $$invalidate(9, attributes = Object.assign({}, $$restProps));
931
+
932
+ if ($$self.$$.dirty & /*attributes*/ 512) {
933
+ delete attributes.class;
934
+ }
935
+ };
936
+
937
+ $$props = exclude_internal_props($$props);
938
+
939
+ return [
940
+ bordered,
941
+ theme,
942
+ size,
943
+ full,
944
+ label,
945
+ iconname,
946
+ iconmode,
947
+ disabled,
948
+ type,
949
+ attributes,
950
+ userClass,
951
+ loaderTheme,
952
+ loaderPosition,
953
+ isLoading,
954
+ forwardEvents,
955
+ getClasses,
956
+ responsivesize,
957
+ responsivewidth,
958
+ loader,
959
+ _a,
960
+ _b,
961
+ _c,
962
+ loaderOpts
963
+ ];
964
+ }
965
+
966
+ class Button extends SvelteElement {
967
+ constructor(options) {
968
+ super();
969
+ const style = document.createElement('style');
970
+ style.textContent = `.mc-button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;color:#ffffff;background-color:#188803;font-family:"LeroyMerlin", sans-serif;font-weight:600;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;fill:currentColor}.mc-button.is-hover,.mc-button:hover{background-color:#006902;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006902}.mc-button:disabled,.mc-button.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button .mc-button__icon:first-child,.mc-button .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button.is-focus,.mc-button:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-button--s{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s .mc-button__icon:first-child,.mc-button--s .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m .mc-button__icon:first-child,.mc-button--m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l .mc-button__icon{width:2rem;height:2rem}.mc-button--l .mc-button__icon:first-child,.mc-button--l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:0;padding:0}.mc-button__icon{-ms-flex-negative:0;flex-shrink:0}.mc-button__icon:last-child{margin-left:0.5rem;margin-right:-0.25rem}.mc-button__icon:first-child{margin-right:0.5rem;margin-left:-0.25rem}.mc-button__icon:only-child{margin:0}.mc-button__label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none}.mc-button--solid-primary-02{background-color:#6a7081}.mc-button--solid-primary-02.is-hover,.mc-button--solid-primary-02:hover{background-color:#242938}.mc-button--solid-primary-02.is-active,.mc-button--solid-primary-02:active{background-color:#171b26}.mc-button--solid-primary-02:disabled,.mc-button--solid-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-neutral{background-color:#333333}.mc-button--solid-neutral.is-hover,.mc-button--solid-neutral:hover{background-color:#191919}.mc-button--solid-neutral.is-active,.mc-button--solid-neutral:active{background-color:#333333}.mc-button--solid-neutral:disabled,.mc-button--solid-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--solid-danger{background-color:#c61112}.mc-button--solid-danger.is-hover,.mc-button--solid-danger:hover{background-color:#8c0003}.mc-button--solid-danger.is-active,.mc-button--solid-danger:active{background-color:#8c0003}.mc-button--solid-danger:disabled,.mc-button--solid-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered{color:#188803;border-color:#188803;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#ebf5de;color:#006902}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#c5e39e;color:#035010}.mc-button--bordered:disabled,.mc-button--bordered.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-primary-02{color:#6a7081;border-color:#6a7081;background-color:#ffffff}.mc-button--bordered-primary-02.is-hover,.mc-button--bordered-primary-02:hover{background-color:#eeeff1;color:#6a7081}.mc-button--bordered-primary-02.is-active,.mc-button--bordered-primary-02:active{background-color:#cfd2d8}.mc-button--bordered-primary-02:disabled,.mc-button--bordered-primary-02.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-neutral{color:#333333;border-color:#333333;background-color:#ffffff}.mc-button--bordered-neutral.is-hover,.mc-button--bordered-neutral:hover{background-color:#e6e6e6;color:#333333}.mc-button--bordered-neutral.is-active,.mc-button--bordered-neutral:active{background-color:#cccccc}.mc-button--bordered-neutral:disabled,.mc-button--bordered-neutral.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-button--bordered-danger{color:#c61112;border-color:#c61112;background-color:#ffffff}.mc-button--bordered-danger.is-hover,.mc-button--bordered-danger:hover{background-color:#fdeaea;color:#8c0003}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger.is-active,.mc-button--bordered-danger:active{background-color:#f8bcbb;color:#530000}.mc-button--bordered-danger:disabled,.mc-button--bordered-danger.is-disabled{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}@media screen and (min-width: 680px){.mc-button--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-m .mc-button__icon:first-child,.mc-button--s\\@from-m .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-m{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-m .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-m .mc-button__icon:first-child,.mc-button--m\\@from-m .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-m{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-m .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-m .mc-button__icon:first-child,.mc-button--l\\@from-m .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-m .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-m{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-m{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-m{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1024px){.mc-button--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-l .mc-button__icon:first-child,.mc-button--s\\@from-l .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-l{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-l .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-l .mc-button__icon:first-child,.mc-button--m\\@from-l .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-l{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-l .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-l .mc-button__icon:first-child,.mc-button--l\\@from-l .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-l .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-l{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-l{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-l{width:-webkit-fill-available;width:-moz-available;width:stretch}}.mc-button--square{padding:0}}@media screen and (min-width: 1280px){.mc-button--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xl .mc-button__icon:first-child,.mc-button--s\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xl .mc-button__icon:first-child,.mc-button--m\\@from-xl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xl .mc-button__icon:first-child,.mc-button--l\\@from-xl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}@media screen and (min-width: 1920px){.mc-button--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;padding:0.3125rem 1rem;min-height:2rem;min-width:2rem}.mc-button--s\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--s\\@from-xxl .mc-button__icon:first-child,.mc-button--s\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.1875rem;margin-top:-0.1875rem}.mc-button--s\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl{font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem}.mc-button--m\\@from-xxl .mc-button__icon{width:1.5rem;height:1.5rem}.mc-button--m\\@from-xxl .mc-button__icon:first-child,.mc-button--m\\@from-xxl .mc-button__icon:last-child{margin-bottom:-1px;margin-top:-1px}.mc-button--m\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--l\\@from-xxl{font-size:1.125rem;line-height:1.3333333333;padding:0.875rem 1.5rem;min-height:3.5rem;min-width:3.5rem}.mc-button--l\\@from-xxl .mc-button__icon{width:2rem;height:2rem}.mc-button--l\\@from-xxl .mc-button__icon:first-child,.mc-button--l\\@from-xxl .mc-button__icon:last-child{margin-bottom:-0.25rem;margin-top:-0.25rem}.mc-button--l\\@from-xxl .mc-button__icon:only-child{margin-bottom:0;margin-top:0;width:2rem;height:2rem}.mc-button--fit\\@from-xxl{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:auto}.mc-button--full\\@from-xxl{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}@supports (width: -webkit-fill-available) or (width: -moz-available) or (width: stretch){.mc-button--full\\@from-xxl{width:-webkit-fill-available;width:-moz-available;width:stretch}}}.mc-button__icon{pointer-events:none}`;
971
+ this.shadowRoot.appendChild(style);
972
+
973
+ init(
974
+ this,
975
+ {
976
+ target: this.shadowRoot,
977
+ props: attribute_to_object(this.attributes),
978
+ customElement: true
979
+ },
980
+ instance,
981
+ create_fragment,
982
+ safe_not_equal,
983
+ {
984
+ bordered: 0,
985
+ theme: 1,
986
+ size: 2,
987
+ full: 3,
988
+ label: 4,
989
+ iconname: 5,
990
+ iconmode: 6,
991
+ disabled: 7,
992
+ responsivesize: 16,
993
+ responsivewidth: 17,
994
+ type: 8,
995
+ loader: 18
996
+ },
997
+ null
998
+ );
999
+
1000
+ if (options) {
1001
+ if (options.target) {
1002
+ insert(options.target, this, options.anchor);
1003
+ }
1004
+
1005
+ if (options.props) {
1006
+ this.$set(options.props);
1007
+ flush();
1008
+ }
1009
+ }
1010
+ }
1011
+
1012
+ static get observedAttributes() {
1013
+ return [
1014
+ "bordered",
1015
+ "theme",
1016
+ "size",
1017
+ "full",
1018
+ "label",
1019
+ "iconname",
1020
+ "iconmode",
1021
+ "disabled",
1022
+ "responsivesize",
1023
+ "responsivewidth",
1024
+ "type",
1025
+ "loader"
1026
+ ];
1027
+ }
1028
+
1029
+ get bordered() {
1030
+ return this.$$.ctx[0];
1031
+ }
1032
+
1033
+ set bordered(bordered) {
1034
+ this.$$set({ bordered });
1035
+ flush();
1036
+ }
1037
+
1038
+ get theme() {
1039
+ return this.$$.ctx[1];
1040
+ }
1041
+
1042
+ set theme(theme) {
1043
+ this.$$set({ theme });
1044
+ flush();
1045
+ }
1046
+
1047
+ get size() {
1048
+ return this.$$.ctx[2];
1049
+ }
1050
+
1051
+ set size(size) {
1052
+ this.$$set({ size });
1053
+ flush();
1054
+ }
1055
+
1056
+ get full() {
1057
+ return this.$$.ctx[3];
1058
+ }
1059
+
1060
+ set full(full) {
1061
+ this.$$set({ full });
1062
+ flush();
1063
+ }
1064
+
1065
+ get label() {
1066
+ return this.$$.ctx[4];
1067
+ }
1068
+
1069
+ set label(label) {
1070
+ this.$$set({ label });
1071
+ flush();
1072
+ }
1073
+
1074
+ get iconname() {
1075
+ return this.$$.ctx[5];
1076
+ }
1077
+
1078
+ set iconname(iconname) {
1079
+ this.$$set({ iconname });
1080
+ flush();
1081
+ }
1082
+
1083
+ get iconmode() {
1084
+ return this.$$.ctx[6];
1085
+ }
1086
+
1087
+ set iconmode(iconmode) {
1088
+ this.$$set({ iconmode });
1089
+ flush();
1090
+ }
1091
+
1092
+ get disabled() {
1093
+ return this.$$.ctx[7];
1094
+ }
1095
+
1096
+ set disabled(disabled) {
1097
+ this.$$set({ disabled });
1098
+ flush();
1099
+ }
1100
+
1101
+ get responsivesize() {
1102
+ return this.$$.ctx[16];
1103
+ }
1104
+
1105
+ set responsivesize(responsivesize) {
1106
+ this.$$set({ responsivesize });
1107
+ flush();
1108
+ }
1109
+
1110
+ get responsivewidth() {
1111
+ return this.$$.ctx[17];
1112
+ }
1113
+
1114
+ set responsivewidth(responsivewidth) {
1115
+ this.$$set({ responsivewidth });
1116
+ flush();
1117
+ }
1118
+
1119
+ get type() {
1120
+ return this.$$.ctx[8];
1121
+ }
1122
+
1123
+ set type(type) {
1124
+ this.$$set({ type });
1125
+ flush();
1126
+ }
1127
+
1128
+ get loader() {
1129
+ return this.$$.ctx[18];
1130
+ }
1131
+
1132
+ set loader(loader) {
1133
+ this.$$set({ loader });
1134
+ flush();
1135
+ }
1136
+ }
1137
+
1138
+ export { Button as default };
2
1139
  //# sourceMappingURL=Button.js.map