@mozaic-ds/web-components 0.10.1 → 0.11.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 (135) hide show
  1. package/package.json +2 -2
  2. package/public/{DataTableDefaultAction.nested-46712849.js → DataTableDefaultAction.nested-e758217a.js} +2 -2
  3. package/public/DataTableDefaultAction.nested-e758217a.js.map +1 -0
  4. package/public/DataTableUtilities-ccffa53e.js +2 -0
  5. package/public/DataTableUtilities-ccffa53e.js.map +1 -0
  6. package/public/adeo/{DataTableDefaultAction.nested-c4d942ab.js → DataTableDefaultAction.nested-be8d4e7b.js} +2 -2
  7. package/public/adeo/DataTableDefaultAction.nested-be8d4e7b.js.map +1 -0
  8. package/public/adeo/DataTableUtilities-ccffa53e.js +2 -0
  9. package/public/adeo/DataTableUtilities-ccffa53e.js.map +1 -0
  10. package/public/adeo/bundle.js +10 -0
  11. package/public/adeo/components/button/Button.js +1 -1
  12. package/public/adeo/components/button/Button.js.map +1 -1
  13. package/public/adeo/components/button/Button.svelte +1 -1
  14. package/public/adeo/components/datatable/DataTable.js +1 -1
  15. package/public/adeo/components/datatable/DataTable.js.map +1 -1
  16. package/public/adeo/components/datatable/DataTable.svelte +44 -19
  17. package/public/adeo/components/datatable/DataTableDefaultAction.nested.js +1 -1
  18. package/public/adeo/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
  19. package/public/adeo/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
  20. package/public/adeo/components/datatable/DataTableFooter.nested.js +1 -1
  21. package/public/adeo/components/datatable/data.d.ts.map +1 -1
  22. package/public/adeo/components/datatable/datatable.types.d.ts +16 -2
  23. package/public/adeo/components/datatable/datatable.types.d.ts.map +1 -1
  24. package/public/adeo/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +18 -0
  25. package/public/adeo/components/menu/Menu.js +2 -0
  26. package/public/adeo/components/menu/Menu.js.map +1 -0
  27. package/public/adeo/components/menu/Menu.svelte +54 -0
  28. package/public/adeo/components/menu/menu.types.d.ts +9 -0
  29. package/public/adeo/components/menu/menu.types.d.ts.map +1 -0
  30. package/public/adeo/components/ratings/StarsInput.js +1 -1
  31. package/public/adeo/components/ratings/StarsInput.js.map +1 -1
  32. package/public/adeo/components/segmentedcontrol/SegmentedControl.js +2 -0
  33. package/public/adeo/components/segmentedcontrol/SegmentedControl.js.map +1 -0
  34. package/public/adeo/components/segmentedcontrol/SegmentedControl.svelte +52 -0
  35. package/public/adeo/components/segmentedcontrol/segmentedControl.types.d.ts +8 -0
  36. package/public/adeo/components/segmentedcontrol/segmentedControl.types.d.ts.map +1 -0
  37. package/public/adeo/components/sidebar/sidebar-user.nested.js +1 -1
  38. package/public/adeo/components/sidebar/sidebar-user.nested.js.map +1 -1
  39. package/public/adeo/components/sidebar-user/sidebar-user.nested.svelte +1 -0
  40. package/public/adeo/components/starsinput/StarsInput.svelte +9 -2
  41. package/public/adeo/utilities/DataTableUtilities.d.ts.map +1 -1
  42. package/public/adeo/utilities/DataTableUtilities.ts +12 -0
  43. package/public/bricoman/{DataTableDefaultAction.nested-b325de83.js → DataTableDefaultAction.nested-41f58b1f.js} +2 -2
  44. package/public/bricoman/DataTableDefaultAction.nested-41f58b1f.js.map +1 -0
  45. package/public/bricoman/DataTableUtilities-ccffa53e.js +2 -0
  46. package/public/bricoman/DataTableUtilities-ccffa53e.js.map +1 -0
  47. package/public/bricoman/bundle.js +10 -0
  48. package/public/bricoman/components/button/Button.js +1 -1
  49. package/public/bricoman/components/button/Button.js.map +1 -1
  50. package/public/bricoman/components/button/Button.svelte +1 -1
  51. package/public/bricoman/components/datatable/DataTable.js +1 -1
  52. package/public/bricoman/components/datatable/DataTable.js.map +1 -1
  53. package/public/bricoman/components/datatable/DataTable.svelte +44 -19
  54. package/public/bricoman/components/datatable/DataTableDefaultAction.nested.js +1 -1
  55. package/public/bricoman/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
  56. package/public/bricoman/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
  57. package/public/bricoman/components/datatable/DataTableFooter.nested.js +1 -1
  58. package/public/bricoman/components/datatable/data.d.ts.map +1 -1
  59. package/public/bricoman/components/datatable/datatable.types.d.ts +16 -2
  60. package/public/bricoman/components/datatable/datatable.types.d.ts.map +1 -1
  61. package/public/bricoman/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +18 -0
  62. package/public/bricoman/components/menu/Menu.js +2 -0
  63. package/public/bricoman/components/menu/Menu.js.map +1 -0
  64. package/public/bricoman/components/menu/Menu.svelte +54 -0
  65. package/public/bricoman/components/menu/menu.types.d.ts +9 -0
  66. package/public/bricoman/components/menu/menu.types.d.ts.map +1 -0
  67. package/public/bricoman/components/ratings/StarsInput.js +1 -1
  68. package/public/bricoman/components/ratings/StarsInput.js.map +1 -1
  69. package/public/bricoman/components/segmentedcontrol/SegmentedControl.js +2 -0
  70. package/public/bricoman/components/segmentedcontrol/SegmentedControl.js.map +1 -0
  71. package/public/bricoman/components/segmentedcontrol/SegmentedControl.svelte +52 -0
  72. package/public/bricoman/components/segmentedcontrol/segmentedControl.types.d.ts +8 -0
  73. package/public/bricoman/components/segmentedcontrol/segmentedControl.types.d.ts.map +1 -0
  74. package/public/bricoman/components/sidebar/sidebar-user.nested.js +1 -1
  75. package/public/bricoman/components/sidebar/sidebar-user.nested.js.map +1 -1
  76. package/public/bricoman/components/sidebar-user/sidebar-user.nested.svelte +1 -0
  77. package/public/bricoman/components/starsinput/StarsInput.svelte +9 -2
  78. package/public/bricoman/utilities/DataTableUtilities.d.ts.map +1 -1
  79. package/public/bricoman/utilities/DataTableUtilities.ts +12 -0
  80. package/public/bundle.js +10 -0
  81. package/public/components/button/Button.js +1 -1
  82. package/public/components/button/Button.js.map +1 -1
  83. package/public/components/button/Button.svelte +1 -1
  84. package/public/components/datatable/DataTable.js +1 -1
  85. package/public/components/datatable/DataTable.js.map +1 -1
  86. package/public/components/datatable/DataTable.svelte +44 -19
  87. package/public/components/datatable/DataTableDefaultAction.nested.js +1 -1
  88. package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -1
  89. package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -1
  90. package/public/components/datatable/DataTableFooter.nested.js +1 -1
  91. package/public/components/datatable/data.d.ts.map +1 -1
  92. package/public/components/datatable/datatable.types.d.ts +16 -2
  93. package/public/components/datatable/datatable.types.d.ts.map +1 -1
  94. package/public/components/datatabledefaultaction/DataTableDefaultAction.nested.svelte +18 -0
  95. package/public/components/menu/Menu.js +2 -0
  96. package/public/components/menu/Menu.js.map +1 -0
  97. package/public/components/menu/Menu.svelte +54 -0
  98. package/public/components/menu/menu.types.d.ts +9 -0
  99. package/public/components/menu/menu.types.d.ts.map +1 -0
  100. package/public/components/ratings/StarsInput.js +1 -1
  101. package/public/components/ratings/StarsInput.js.map +1 -1
  102. package/public/components/segmentedcontrol/SegmentedControl.js +2 -0
  103. package/public/components/segmentedcontrol/SegmentedControl.js.map +1 -0
  104. package/public/components/segmentedcontrol/SegmentedControl.svelte +52 -0
  105. package/public/components/segmentedcontrol/segmentedControl.types.d.ts +8 -0
  106. package/public/components/segmentedcontrol/segmentedControl.types.d.ts.map +1 -0
  107. package/public/components/sidebar/sidebar-user.nested.js +1 -1
  108. package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
  109. package/public/components/sidebar-user/sidebar-user.nested.svelte +1 -0
  110. package/public/components/starsinput/StarsInput.svelte +9 -2
  111. package/public/utilities/DataTableUtilities.d.ts.map +1 -1
  112. package/public/utilities/DataTableUtilities.ts +12 -0
  113. package/public/utilities/components/datatable/data.d.ts.map +1 -1
  114. package/public/utilities/components/datatable/datatable.types.d.ts +16 -2
  115. package/public/utilities/components/datatable/datatable.types.d.ts.map +1 -1
  116. package/public/utilities/components/menu/menu.types.d.ts +9 -0
  117. package/public/utilities/components/menu/menu.types.d.ts.map +1 -0
  118. package/public/utilities/components/segmentedcontrol/segmentedControl.types.d.ts +8 -0
  119. package/public/utilities/components/segmentedcontrol/segmentedControl.types.d.ts.map +1 -0
  120. package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +1 -1
  121. package/public/utilities/stories/menu/Menu.stories.d.ts +5 -0
  122. package/public/utilities/stories/menu/Menu.stories.d.ts.map +1 -0
  123. package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +1 -1
  124. package/public/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts +5 -0
  125. package/public/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts.map +1 -0
  126. package/public/utilities/utilities/DataTableUtilities.d.ts.map +1 -1
  127. package/public/DataTableDefaultAction.nested-46712849.js.map +0 -1
  128. package/public/DataTableUtilities-313a448d.js +0 -2
  129. package/public/DataTableUtilities-313a448d.js.map +0 -1
  130. package/public/adeo/DataTableDefaultAction.nested-c4d942ab.js.map +0 -1
  131. package/public/adeo/DataTableUtilities-313a448d.js +0 -2
  132. package/public/adeo/DataTableUtilities-313a448d.js.map +0 -1
  133. package/public/bricoman/DataTableDefaultAction.nested-b325de83.js.map +0 -1
  134. package/public/bricoman/DataTableUtilities-313a448d.js +0 -2
  135. package/public/bricoman/DataTableUtilities-313a448d.js.map +0 -1
@@ -1,2 +1,2 @@
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,z as s,j as b,B as u,C as h,D as f,E as g,m as p,o as x,p as w,r as _,q as $,g as y,M as v,Z as k,K as z,x as j,A as q,G as C,t as E,k as N}from"../../index-c33b3772.js";import{c as R}from"../../EventForward-8492ff62.js";import A from"../loader/Loader.nested.js";function O(t){let o,e,n,r;const m=[B,S],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(),y(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):(v(),f(l[r],1,1,(()=>{l[r]=null})),g(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),h(n,1),n.m(o,null))},i(t){r||(h(n),r=!0)},o(t){f(n),r=!1},d(t){t&&x(o),l[e].d()}}}function S(t){let o,e,n=`<${P(t[2],t[6],t[5])} />`;return{c(){o=new k(!1),e=z(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${P(t[2],t[6],t[5])} />`)&&o.p(n)},i:d,o:d,d(t){t&&x(e),t&&o.d()}}}function B(t){let o,e;return o=new A({props:{size:"s",theme:t[11],text:""}}),{c(){j(o.$$.fragment)},m(t,i){q(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(h(o.$$.fragment,t),e=!0)},o(t){f(o.$$.fragment,t),e=!1},d(t){C(o,t)}}}function D(t){let o,e,n,r,m,d,a=t[13]&&"left"===t[12]&&!t[5]&&G(t),s=t[13]&&"right"===t[12]&&!t[5]&&J(t);return{c(){a&&a.c(),o=l(),e=c("span"),n=E(t[4]),r=l(),s&&s.c(),m=z(),y(e,"class","mc-button__label")},m(t,c){a&&a.m(t,c),i(t,o,c),i(t,e,c),b(e,n),i(t,r,c),s&&s.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&&h(a,1)):(a=G(t),a.c(),h(a,1),a.m(o.parentNode,o)):a&&(v(),f(a,1,1,(()=>{a=null})),g()),(!d||16&e)&&N(n,t[4]),t[13]&&"right"===t[12]&&!t[5]?s?(s.p(t,e),12320&e&&h(s,1)):(s=J(t),s.c(),h(s,1),s.m(m.parentNode,m)):s&&(v(),f(s,1,1,(()=>{s=null})),g())},i(t){d||(h(a),h(s),d=!0)},o(t){f(a),f(s),d=!1},d(t){a&&a.d(t),t&&x(o),t&&x(e),t&&x(r),s&&s.d(t),t&&x(m)}}}function F(t){let o,e,n,r;const m=[L,K],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(),y(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):(v(),f(l[r],1,1,(()=>{l[r]=null})),g(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),h(n,1),n.m(o,null))},i(t){r||(h(n),r=!0)},o(t){f(n),r=!1},d(t){t&&x(o),l[e].d()}}}function G(t){let o,e,n;return e=new A({props:{size:"s",theme:t[11],text:""}}),{c(){o=c("span"),j(e.$$.fragment),y(o,"class","mc-button__icon")},m(t,r){i(t,o,r),q(e,o,null),n=!0},p(t,o){const i={};2048&o&&(i.theme=t[11]),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){f(e.$$.fragment,t),n=!1},d(t){t&&x(o),C(e)}}}function J(t){let o,e,n;return e=new A({props:{size:"s",theme:t[11],text:""}}),{c(){o=c("span"),j(e.$$.fragment),y(o,"class","mc-button__icon")},m(t,r){i(t,o,r),q(e,o,null),n=!0},p(t,o){const i={};2048&o&&(i.theme=t[11]),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){f(e.$$.fragment,t),n=!1},d(t){t&&x(o),C(e)}}}function K(t){let o,e,n=`<${P(t[2],t[6],t[5])} size="100%" />`;return{c(){o=new k(!1),e=z(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${P(t[2],t[6],t[5])} size="100%" />`)&&o.p(n)},i:d,o:d,d(t){t&&x(e),t&&o.d()}}}function L(t){let o,e;return o=new A({props:{size:"m",theme:t[11],text:""}}),{c(){j(o.$$.fragment)},m(t,i){q(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(h(o.$$.fragment,t),e=!0)},o(t){f(o.$$.fragment,t),e=!1},d(t){C(o,t)}}}function M(t){let o,e,n,r;const m=[H,Z],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(),y(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):(v(),f(l[r],1,1,(()=>{l[r]=null})),g(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),h(n,1),n.m(o,null))},i(t){r||(h(n),r=!0)},o(t){f(n),r=!1},d(t){t&&x(o),l[e].d()}}}function Z(t){let o,e,n=`<${P(t[2],t[6],t[5])} />`;return{c(){o=new k(!1),e=z(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${P(t[2],t[6],t[5])} />`)&&o.p(n)},i:d,o:d,d(t){t&&x(e),t&&o.d()}}}function H(t){let o,e;return o=new A({props:{size:"s",theme:t[11],text:""}}),{c(){j(o.$$.fragment)},m(t,i){q(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(h(o.$$.fragment,t),e=!0)},o(t){f(o.$$.fragment,t),e=!1},d(t){C(o,t)}}}function I(t){let o,e,n,r,w,_,$,y,k,z=t[5]&&"left"===t[6]&&O(t);const j=[F,D],q=[];function C(t,o){return t[5]&&"only"===t[6]?0:1}n=C(t),r=q[n]=j[n](t);let E=t[5]&&"right"===t[6]&&M(t),N=[{type:t[8]},{class:_=t[15](t[1],t[0],t[2],t[3])+" "+t[10]},{disabled:t[7]},t[9]],R={};for(let t=0;t<N.length;t+=1)R=m(R,N[t]);return{c(){o=c("button"),z&&z.c(),e=l(),r.c(),w=l(),E&&E.c(),this.c=d,a(o,R),s(o,"mc-button--square",t[6])},m(r,m){i(r,o,m),z&&z.m(o,null),b(o,e),q[n].m(o,null),b(o,w),E&&E.m(o,null),o.autofocus&&o.focus(),$=!0,y||(k=u(t[14].call(null,o)),y=!0)},p(t,[i]){t[5]&&"left"===t[6]?z?(z.p(t,i),96&i&&h(z,1)):(z=O(t),z.c(),h(z,1),z.m(o,e)):z&&(v(),f(z,1,1,(()=>{z=null})),g());let m=n;n=C(t),n===m?q[n].p(t,i):(v(),f(q[m],1,1,(()=>{q[m]=null})),g(),r=q[n],r?r.p(t,i):(r=q[n]=j[n](t),r.c()),h(r,1),r.m(o,w)),t[5]&&"right"===t[6]?E?(E.p(t,i),96&i&&h(E,1)):(E=M(t),E.c(),h(E,1),E.m(o,null)):E&&(v(),f(E,1,1,(()=>{E=null})),g()),a(o,R=p(N,[(!$||256&i)&&{type:t[8]},(!$||1039&i&&_!==(_=t[15](t[1],t[0],t[2],t[3])+" "+t[10]))&&{class:_},(!$||128&i)&&{disabled:t[7]},512&i&&t[9]])),s(o,"mc-button--square",t[6])},i(t){$||(h(z),h(r),h(E),$=!0)},o(t){f(z),f(r),f(E),$=!1},d(t){t&&x(o),z&&z.d(),q[n].d(),E&&E.d(),y=!1,k()}}}function P(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 Q(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=w(o,a);var b,u,h;let{bordered:f=!1}=o,{theme:g}=o,{size:p="m"}=o,{full:x=!1}=o,{label:y}=o,{iconname:v}=o,{iconmode:k}=o,{disabled:z=!1}=o,{responsivesize:j}=o,{responsivewidth:q}=o,{type:C="button"}=o,{loader:E}=o;const N=R(_());return t.$$set=t=>{e(24,o=m(m({},o),$(t))),e(23,s=w(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,x=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,q=t.responsivewidth),"type"in t&&e(8,C=t.type),"loader"in t&&e(18,E=t.loader)},t.$$.update=()=>{262144&t.$$.dirty&&e(22,i=E?JSON.parse(E):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,x,y,v,k,z,C,d,l,c,r,n,N,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}`),q&&n.push(`mc-button--${q}`),n.join(" ")},j,q,E,b,u,h,i]}class T 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:#007f8c;font-family:"Roboto", sans-serif;font-weight:700;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:#006974;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006974}.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 #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.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:#007f8c;border-color:#007f8c;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#d9f0f3;color:#006974}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.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},Q,I,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{T as default};
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,z as s,j as b,B as u,C as h,D as f,E as g,m as p,o as x,p as w,r as _,q as $,g as y,M as v,Z as k,K as z,x as j,A as q,G as C,t as E,k as N}from"../../index-c33b3772.js";import{c as R}from"../../EventForward-8492ff62.js";import A from"../loader/Loader.nested.js";function O(t){let o,e,n,r;const m=[B,S],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(),y(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):(v(),f(l[r],1,1,(()=>{l[r]=null})),g(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),h(n,1),n.m(o,null))},i(t){r||(h(n),r=!0)},o(t){f(n),r=!1},d(t){t&&x(o),l[e].d()}}}function S(t){let o,e,n=`<${P(t[2],t[6],t[5])} />`;return{c(){o=new k(!1),e=z(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${P(t[2],t[6],t[5])} />`)&&o.p(n)},i:d,o:d,d(t){t&&x(e),t&&o.d()}}}function B(t){let o,e;return o=new A({props:{size:"s",theme:t[11],text:""}}),{c(){j(o.$$.fragment)},m(t,i){q(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(h(o.$$.fragment,t),e=!0)},o(t){f(o.$$.fragment,t),e=!1},d(t){C(o,t)}}}function D(t){let o,e,n,r,m,d,a=t[13]&&"left"===t[12]&&!t[5]&&G(t),s=t[13]&&"right"===t[12]&&!t[5]&&J(t);return{c(){a&&a.c(),o=l(),e=c("span"),n=E(t[4]),r=l(),s&&s.c(),m=z(),y(e,"class","mc-button__label")},m(t,c){a&&a.m(t,c),i(t,o,c),i(t,e,c),b(e,n),i(t,r,c),s&&s.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&&h(a,1)):(a=G(t),a.c(),h(a,1),a.m(o.parentNode,o)):a&&(v(),f(a,1,1,(()=>{a=null})),g()),(!d||16&e)&&N(n,t[4]),t[13]&&"right"===t[12]&&!t[5]?s?(s.p(t,e),12320&e&&h(s,1)):(s=J(t),s.c(),h(s,1),s.m(m.parentNode,m)):s&&(v(),f(s,1,1,(()=>{s=null})),g())},i(t){d||(h(a),h(s),d=!0)},o(t){f(a),f(s),d=!1},d(t){a&&a.d(t),t&&x(o),t&&x(e),t&&x(r),s&&s.d(t),t&&x(m)}}}function F(t){let o,e,n,r;const m=[L,K],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(),y(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):(v(),f(l[r],1,1,(()=>{l[r]=null})),g(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),h(n,1),n.m(o,null))},i(t){r||(h(n),r=!0)},o(t){f(n),r=!1},d(t){t&&x(o),l[e].d()}}}function G(t){let o,e,n;return e=new A({props:{size:"s",theme:t[11],text:""}}),{c(){o=c("span"),j(e.$$.fragment),y(o,"class","mc-button__icon")},m(t,r){i(t,o,r),q(e,o,null),n=!0},p(t,o){const i={};2048&o&&(i.theme=t[11]),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){f(e.$$.fragment,t),n=!1},d(t){t&&x(o),C(e)}}}function J(t){let o,e,n;return e=new A({props:{size:"s",theme:t[11],text:""}}),{c(){o=c("span"),j(e.$$.fragment),y(o,"class","mc-button__icon")},m(t,r){i(t,o,r),q(e,o,null),n=!0},p(t,o){const i={};2048&o&&(i.theme=t[11]),e.$set(i)},i(t){n||(h(e.$$.fragment,t),n=!0)},o(t){f(e.$$.fragment,t),n=!1},d(t){t&&x(o),C(e)}}}function K(t){let o,e,n=`<${P(t[2],t[6],t[5])} size="100%" />`;return{c(){o=new k(!1),e=z(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${P(t[2],t[6],t[5])} size="100%" />`)&&o.p(n)},i:d,o:d,d(t){t&&x(e),t&&o.d()}}}function L(t){let o,e;return o=new A({props:{size:"m",theme:t[11],text:""}}),{c(){j(o.$$.fragment)},m(t,i){q(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(h(o.$$.fragment,t),e=!0)},o(t){f(o.$$.fragment,t),e=!1},d(t){C(o,t)}}}function M(t){let o,e,n,r;const m=[H,Z],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(),y(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):(v(),f(l[r],1,1,(()=>{l[r]=null})),g(),n=l[e],n?n.p(t,i):(n=l[e]=m[e](t),n.c()),h(n,1),n.m(o,null))},i(t){r||(h(n),r=!0)},o(t){f(n),r=!1},d(t){t&&x(o),l[e].d()}}}function Z(t){let o,e,n=`<${P(t[2],t[6],t[5])} />`;return{c(){o=new k(!1),e=z(),o.a=e},m(t,r){o.m(n,t,r),i(t,e,r)},p(t,e){100&e&&n!==(n=`<${P(t[2],t[6],t[5])} />`)&&o.p(n)},i:d,o:d,d(t){t&&x(e),t&&o.d()}}}function H(t){let o,e;return o=new A({props:{size:"s",theme:t[11],text:""}}),{c(){j(o.$$.fragment)},m(t,i){q(o,t,i),e=!0},p(t,e){const i={};2048&e&&(i.theme=t[11]),o.$set(i)},i(t){e||(h(o.$$.fragment,t),e=!0)},o(t){f(o.$$.fragment,t),e=!1},d(t){C(o,t)}}}function I(t){let o,e,n,r,w,_,$,y,k,z=t[5]&&"left"===t[6]&&O(t);const j=[F,D],q=[];function C(t,o){return t[5]&&"only"===t[6]?0:1}n=C(t),r=q[n]=j[n](t);let E=t[5]&&"right"===t[6]&&M(t),N=[{type:t[8]},{class:_=t[15](t[1],t[0],t[2],t[3])+" "+t[10]},{disabled:t[7]},t[9]],R={};for(let t=0;t<N.length;t+=1)R=m(R,N[t]);return{c(){o=c("button"),z&&z.c(),e=l(),r.c(),w=l(),E&&E.c(),this.c=d,a(o,R),s(o,"mc-button--square","only"==t[6])},m(r,m){i(r,o,m),z&&z.m(o,null),b(o,e),q[n].m(o,null),b(o,w),E&&E.m(o,null),o.autofocus&&o.focus(),$=!0,y||(k=u(t[14].call(null,o)),y=!0)},p(t,[i]){t[5]&&"left"===t[6]?z?(z.p(t,i),96&i&&h(z,1)):(z=O(t),z.c(),h(z,1),z.m(o,e)):z&&(v(),f(z,1,1,(()=>{z=null})),g());let m=n;n=C(t),n===m?q[n].p(t,i):(v(),f(q[m],1,1,(()=>{q[m]=null})),g(),r=q[n],r?r.p(t,i):(r=q[n]=j[n](t),r.c()),h(r,1),r.m(o,w)),t[5]&&"right"===t[6]?E?(E.p(t,i),96&i&&h(E,1)):(E=M(t),E.c(),h(E,1),E.m(o,null)):E&&(v(),f(E,1,1,(()=>{E=null})),g()),a(o,R=p(N,[(!$||256&i)&&{type:t[8]},(!$||1039&i&&_!==(_=t[15](t[1],t[0],t[2],t[3])+" "+t[10]))&&{class:_},(!$||128&i)&&{disabled:t[7]},512&i&&t[9]])),s(o,"mc-button--square","only"==t[6])},i(t){$||(h(z),h(r),h(E),$=!0)},o(t){f(z),f(r),f(E),$=!1},d(t){t&&x(o),z&&z.d(),q[n].d(),E&&E.d(),y=!1,k()}}}function P(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 Q(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=w(o,a);var b,u,h;let{bordered:f=!1}=o,{theme:g}=o,{size:p="m"}=o,{full:x=!1}=o,{label:y}=o,{iconname:v}=o,{iconmode:k}=o,{disabled:z=!1}=o,{responsivesize:j}=o,{responsivewidth:q}=o,{type:C="button"}=o,{loader:E}=o;const N=R(_());return t.$$set=t=>{e(24,o=m(m({},o),$(t))),e(23,s=w(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,x=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,q=t.responsivewidth),"type"in t&&e(8,C=t.type),"loader"in t&&e(18,E=t.loader)},t.$$.update=()=>{262144&t.$$.dirty&&e(22,i=E?JSON.parse(E):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,x,y,v,k,z,C,d,l,c,r,n,N,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}`),q&&n.push(`mc-button--${q}`),n.join(" ")},j,q,E,b,u,h,i]}class T 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:#007f8c;font-family:"Roboto", sans-serif;font-weight:700;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:#006974;color:#ffffff}.mc-button.is-active,.mc-button:active{background-color:#006974}.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 #758992;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #758992}.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:#007f8c;border-color:#007f8c;background-color:#ffffff}.mc-button--bordered.is-hover,.mc-button--bordered:hover{background-color:#d9f0f3;color:#006974}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.mc-button--bordered.is-active,.mc-button--bordered:active{background-color:#91d5db;color:#004e57}.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},Q,I,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{T as default};
2
2
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../src/components/button/Button.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { createEventForwarder } from '../../utilities/EventForward';\n import Loader from '../loader/Loader.nested.svelte';\n import type {\n ButtonIconMode,\n ButtonSize,\n ButtonTheme,\n ButtonResponsiveSize,\n ButtonResponsiveWidth,\n ButtonType,\n ButtonLoader,\n } from './button.types';\n\n export let bordered = false;\n export let theme: ButtonTheme | undefined = undefined;\n export let size: ButtonSize = 'm';\n export let full = false;\n export let label: string;\n export let iconname: string | undefined;\n export let iconmode: ButtonIconMode | undefined;\n export let disabled = false;\n export let responsivesize: ButtonResponsiveSize = undefined;\n export let responsivewidth: ButtonResponsiveWidth = undefined;\n export let type: ButtonType = 'button';\n export let loader: string;\n\n const forwardEvents = createEventForwarder(get_current_component());\n\n $: loaderOpts = loader ? (JSON.parse(loader) as ButtonLoader) : undefined;\n $: isLoading = loaderOpts?.enabled ?? false;\n $: loaderPosition = loaderOpts?.position ?? 'left';\n $: loaderTheme = loaderOpts?.theme ?? 'primary';\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function generateIconName(\n size: ButtonSize,\n iconMode: ButtonIconMode,\n iconName: string,\n ): string {\n const isIconOnly = iconMode === 'only';\n let iconSize: string;\n\n switch (size) {\n case 's':\n iconSize = '24px';\n break;\n case 'm':\n iconSize = isIconOnly ? '32px' : '24px';\n break;\n case 'l':\n iconSize = isIconOnly ? '100%' : '32px';\n break;\n }\n\n return `${iconName} size=\"${iconSize}\" class=\"no\"`;\n }\n\n function getAppearanceClass(theme: ButtonTheme, isBordered: boolean): string {\n if (!isBordered && !theme) {\n return '';\n }\n\n const type = isBordered ? 'bordered' : 'solid';\n\n if (theme) {\n return `mc-button--${type}-${theme}`;\n }\n return `mc-button--${type}`;\n }\n\n function getClasses(\n theme: ButtonTheme,\n isBordered: boolean,\n size: ButtonSize,\n isFull: boolean,\n ): string {\n const classes = ['mc-button'];\n\n const appearanceClass = getAppearanceClass(theme, isBordered);\n if (appearanceClass) {\n classes.push(appearanceClass);\n }\n\n if (size) {\n classes.push(`mc-button--${size}`);\n }\n\n if (isFull) {\n classes.push(`mc-button--full`);\n } else {\n classes.push(`mc-button--fit`);\n }\n\n if (iconmode === 'only') {\n classes.push('mc-button--square');\n }\n\n if (responsivesize) {\n classes.push(`mc-button--${responsivesize}`);\n }\n\n if (responsivewidth) {\n classes.push(`mc-button--${responsivewidth}`);\n }\n\n return classes.join(' ');\n }\n</script>\n\n<button\n use:forwardEvents\n {type}\n class=\"{getClasses(theme, bordered, size, full)} {userClass}\"\n class:mc-button--square={iconmode}\n {disabled}\n {...attributes}\n>\n {#if iconname && iconmode === 'left'}\n <span class=\"mc-button__icon\">\n {#if isLoading && loaderPosition === 'left'}\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n {:else}\n {@html `<${generateIconName(size, iconmode, iconname)} />`}\n {/if}\n </span>\n {/if}\n\n {#if iconname && iconmode === 'only'}\n <span class=\"mc-button__icon\">\n {#if isLoading}\n <Loader size=\"m\" theme={loaderTheme} text=\"\" />\n {:else}\n {@html `<${generateIconName(size, iconmode, iconname)} size=\"100%\" />`}\n {/if}\n </span>\n {:else}\n {#if isLoading && loaderPosition === 'left' && !iconname}\n <span class=\"mc-button__icon\">\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n </span>\n {/if}\n <span class=\"mc-button__label\">{label}</span>\n {#if isLoading && loaderPosition === 'right' && !iconname}\n <span class=\"mc-button__icon\">\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n </span>\n {/if}\n {/if}\n\n {#if iconname && iconmode === 'right'}\n <span class=\"mc-button__icon\">\n {#if isLoading && loaderPosition === 'right'}\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n {:else}\n {@html `<${generateIconName(size, iconmode, iconname)} />`}\n {/if}\n </span>\n {/if}\n</button>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.button';\n\n .mc-button__icon {\n pointer-events: none;\n }\n</style>\n"],"names":["ctx","insert","target","span","anchor","raw_value","generateIconName","dirty","html_tag","p","if_block0","create_if_block_5","if_block1","create_if_block_4","create_if_block_6","create_if_block","button","class","button_class_value","size","iconMode","iconName","isIconOnly","iconSize","_a","_b","_c","bordered","$$props","theme","full","label","iconname","iconmode","disabled","responsivesize","responsivewidth","type","loader","forwardEvents","createEventForwarder","get_current_component","$$invalidate","loaderOpts","JSON","parse","undefined","isLoading","enabled","loaderPosition","position","loaderTheme","userClass","attributes","Object","assign","$$restProps","isBordered","isFull","classes","appearanceClass","getAppearanceClass","push","join"],"mappings":"+ZA4HWA,EAAS,KAAuB,SAAnBA,EAAc,IAAW,+FAD7CC,EAMMC,EAAAC,EAAAC,wPAFSC,EAAA,IAAAC,EAAiBN,EAAM,GAAAA,KAAUA,EAAQ,gFAAzC,IAAAO,GAAAF,KAAAA,EAAA,IAAAC,EAAiBN,EAAM,GAAAA,KAAUA,EAAQ,WAAAQ,EAAAC,EAAAJ,gGAF5BL,EAAW,+FAAXA,EAAW,6HAgBlCU,EAAAV,EAAa,KAAmB,SAAnBA,EAAmB,MAAWA,EAAQ,IAAAW,EAAAX,GAMnDY,EAAAZ,EAAa,KA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B,EACmB,cAAAQ,KAAQR,kBAEVQ,IAWGwB,CAAmBhC,EAAO4B,UAC9CG,GACFD,EAAQG,KAAKF,GAGXzC,GACFwC,EAAQG,KAAI,cAAe3C,KAGzBuC,EACFC,EAAQG,KAAI,mBAEZH,EAAQG,KAAI,kBAGG,SAAb7B,GACF0B,EAAQG,KAAK,qBAGX3B,GACFwB,EAAQG,KAAI,cAAe3B,KAGzBC,GACFuB,EAAQG,KAAI,cAAe1B,KAGtBuB,EAAQI,KAAK"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../src/components/button/Button.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { createEventForwarder } from '../../utilities/EventForward';\n import Loader from '../loader/Loader.nested.svelte';\n import type {\n ButtonIconMode,\n ButtonSize,\n ButtonTheme,\n ButtonResponsiveSize,\n ButtonResponsiveWidth,\n ButtonType,\n ButtonLoader,\n } from './button.types';\n\n export let bordered = false;\n export let theme: ButtonTheme | undefined = undefined;\n export let size: ButtonSize = 'm';\n export let full = false;\n export let label: string;\n export let iconname: string | undefined;\n export let iconmode: ButtonIconMode | undefined;\n export let disabled = false;\n export let responsivesize: ButtonResponsiveSize = undefined;\n export let responsivewidth: ButtonResponsiveWidth = undefined;\n export let type: ButtonType = 'button';\n export let loader: string;\n\n const forwardEvents = createEventForwarder(get_current_component());\n\n $: loaderOpts = loader ? (JSON.parse(loader) as ButtonLoader) : undefined;\n $: isLoading = loaderOpts?.enabled ?? false;\n $: loaderPosition = loaderOpts?.position ?? 'left';\n $: loaderTheme = loaderOpts?.theme ?? 'primary';\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function generateIconName(\n size: ButtonSize,\n iconMode: ButtonIconMode,\n iconName: string,\n ): string {\n const isIconOnly = iconMode === 'only';\n let iconSize: string;\n\n switch (size) {\n case 's':\n iconSize = '24px';\n break;\n case 'm':\n iconSize = isIconOnly ? '32px' : '24px';\n break;\n case 'l':\n iconSize = isIconOnly ? '100%' : '32px';\n break;\n }\n\n return `${iconName} size=\"${iconSize}\" class=\"no\"`;\n }\n\n function getAppearanceClass(theme: ButtonTheme, isBordered: boolean): string {\n if (!isBordered && !theme) {\n return '';\n }\n\n const type = isBordered ? 'bordered' : 'solid';\n\n if (theme) {\n return `mc-button--${type}-${theme}`;\n }\n return `mc-button--${type}`;\n }\n\n function getClasses(\n theme: ButtonTheme,\n isBordered: boolean,\n size: ButtonSize,\n isFull: boolean,\n ): string {\n const classes = ['mc-button'];\n\n const appearanceClass = getAppearanceClass(theme, isBordered);\n if (appearanceClass) {\n classes.push(appearanceClass);\n }\n\n if (size) {\n classes.push(`mc-button--${size}`);\n }\n\n if (isFull) {\n classes.push(`mc-button--full`);\n } else {\n classes.push(`mc-button--fit`);\n }\n\n if (iconmode === 'only') {\n classes.push('mc-button--square');\n }\n\n if (responsivesize) {\n classes.push(`mc-button--${responsivesize}`);\n }\n\n if (responsivewidth) {\n classes.push(`mc-button--${responsivewidth}`);\n }\n\n return classes.join(' ');\n }\n</script>\n\n<button\n use:forwardEvents\n {type}\n class=\"{getClasses(theme, bordered, size, full)} {userClass}\"\n class:mc-button--square={iconmode == 'only'}\n {disabled}\n {...attributes}\n>\n {#if iconname && iconmode === 'left'}\n <span class=\"mc-button__icon\">\n {#if isLoading && loaderPosition === 'left'}\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n {:else}\n {@html `<${generateIconName(size, iconmode, iconname)} />`}\n {/if}\n </span>\n {/if}\n\n {#if iconname && iconmode === 'only'}\n <span class=\"mc-button__icon\">\n {#if isLoading}\n <Loader size=\"m\" theme={loaderTheme} text=\"\" />\n {:else}\n {@html `<${generateIconName(size, iconmode, iconname)} size=\"100%\" />`}\n {/if}\n </span>\n {:else}\n {#if isLoading && loaderPosition === 'left' && !iconname}\n <span class=\"mc-button__icon\">\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n </span>\n {/if}\n <span class=\"mc-button__label\">{label}</span>\n {#if isLoading && loaderPosition === 'right' && !iconname}\n <span class=\"mc-button__icon\">\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n </span>\n {/if}\n {/if}\n\n {#if iconname && iconmode === 'right'}\n <span class=\"mc-button__icon\">\n {#if isLoading && loaderPosition === 'right'}\n <Loader size=\"s\" theme={loaderTheme} text=\"\" />\n {:else}\n {@html `<${generateIconName(size, iconmode, iconname)} />`}\n {/if}\n </span>\n {/if}\n</button>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.button';\n\n .mc-button__icon {\n pointer-events: none;\n }\n</style>\n"],"names":["ctx","insert","target","span","anchor","raw_value","generateIconName","dirty","html_tag","p","if_block0","create_if_block_5","if_block1","create_if_block_4","create_if_block_6","create_if_block","toggle_class","button","class","button_class_value","size","iconMode","iconName","isIconOnly","iconSize","_a","_b","_c","bordered","$$props","theme","full","label","iconname","iconmode","disabled","responsivesize","responsivewidth","type","loader","forwardEvents","createEventForwarder","get_current_component","$$invalidate","loaderOpts","JSON","parse","undefined","isLoading","enabled","loaderPosition","position","loaderTheme","userClass","attributes","Object","assign","$$restProps","isBordered","isFull","classes","appearanceClass","getAppearanceClass","push","join"],"mappings":"+ZA4HWA,EAAS,KAAuB,SAAnBA,EAAc,IAAW,+FAD7CC,EAMMC,EAAAC,EAAAC,wPAFSC,EAAA,IAAAC,EAAiBN,EAAM,GAAAA,KAAUA,EAAQ,gFAAzC,IAAAO,GAAAF,KAAAA,EAAA,IAAAC,EAAiBN,EAAM,GAAAA,KAAUA,EAAQ,WAAAQ,EAAAC,EAAAJ,gGAF5BL,EAAW,+FAAXA,EAAW,6HAgBlCU,EAAAV,EAAa,KAAmB,SAAnBA,EAAmB,MAAWA,EAAQ,IAAAW,EAAAX,GAMnDY,EAAAZ,EAAa,KAAmB,UAAnBA,EAAmB,MAAYA,EAAQ,IAAAa,EAAAb,6CADzBA,EAAK,sFAArCC,EAA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,IAWGwB,CAAmBhC,EAAO4B,UAC9CG,GACFD,EAAQG,KAAKF,GAGXzC,GACFwC,EAAQG,KAAI,cAAe3C,KAGzBuC,EACFC,EAAQG,KAAI,mBAEZH,EAAQG,KAAI,kBAGG,SAAb7B,GACF0B,EAAQG,KAAK,qBAGX3B,GACFwB,EAAQG,KAAI,cAAe3B,KAGzBC,GACFuB,EAAQG,KAAI,cAAe1B,KAGtBuB,EAAQI,KAAK"}
@@ -116,7 +116,7 @@
116
116
  use:forwardEvents
117
117
  {type}
118
118
  class="{getClasses(theme, bordered, size, full)} {userClass}"
119
- class:mc-button--square={iconmode}
119
+ class:mc-button--square={iconmode == 'only'}
120
120
  {disabled}
121
121
  {...attributes}
122
122
  >